aural-ui 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +456 -0
- package/dist/components/aspect-ratio/AspectRatio.stories.tsx +1327 -0
- package/dist/components/aspect-ratio/index.tsx +10 -0
- package/dist/components/aspect-ratio/meta.ts +8 -0
- package/dist/components/avatar/Avatar.stories.tsx +645 -0
- package/dist/components/avatar/index.tsx +50 -0
- package/dist/components/avatar/meta.ts +8 -0
- package/dist/components/badge/Badge.stories.tsx +169 -0
- package/dist/components/badge/index.tsx +28 -0
- package/dist/components/badge/meta.ts +6 -0
- package/dist/components/banner/Banner.stories.tsx +475 -0
- package/dist/components/banner/index.tsx +256 -0
- package/dist/components/banner/meta.ts +36 -0
- package/dist/components/button/Button.stories.tsx +74 -0
- package/dist/components/button/index.tsx +158 -0
- package/dist/components/button/meta.ts +33 -0
- package/dist/components/card/Card.stories.tsx +377 -0
- package/dist/components/card/index.tsx +85 -0
- package/dist/components/card/meta.ts +14 -0
- package/dist/components/char-count/CharCount.stories.tsx +334 -0
- package/dist/components/char-count/index.tsx +51 -0
- package/dist/components/char-count/meta.ts +13 -0
- package/dist/components/checkbox/Checkbox.stories.tsx +209 -0
- package/dist/components/checkbox/index.tsx +34 -0
- package/dist/components/checkbox/meta.ts +19 -0
- package/dist/components/chip/Chip.stories.tsx +207 -0
- package/dist/components/chip/index.tsx +92 -0
- package/dist/components/chip/meta.ts +17 -0
- package/dist/components/circular-loader/CircularLoader.stories.tsx +741 -0
- package/dist/components/circular-loader/index.tsx +138 -0
- package/dist/components/circular-loader/meta.ts +11 -0
- package/dist/components/collapsible/Collapsible.stories.tsx +319 -0
- package/dist/components/collapsible/index.tsx +158 -0
- package/dist/components/collapsible/meta.ts +22 -0
- package/dist/components/command/Command.stories.tsx +996 -0
- package/dist/components/command/index.tsx +324 -0
- package/dist/components/command/meta.ts +18 -0
- package/dist/components/dialog/Dialog.stories.tsx +963 -0
- package/dist/components/dialog/index.tsx +250 -0
- package/dist/components/dialog/meta.ts +28 -0
- package/dist/components/divider/Divider.stories.tsx +633 -0
- package/dist/components/divider/index.tsx +181 -0
- package/dist/components/divider/meta.ts +12 -0
- package/dist/components/dot-loader/DotLoader.stories.tsx +352 -0
- package/dist/components/dot-loader/index.tsx +78 -0
- package/dist/components/dot-loader/meta.ts +14 -0
- package/dist/components/dropdown/Dropdown.stories.tsx +1210 -0
- package/dist/components/dropdown/index.tsx +479 -0
- package/dist/components/dropdown/meta.ts +21 -0
- package/dist/components/form/Form.stories.tsx +320 -0
- package/dist/components/form/index.tsx +183 -0
- package/dist/components/form/meta.ts +11 -0
- package/dist/components/helper-text/HelperText.stories.tsx +254 -0
- package/dist/components/helper-text/index.tsx +102 -0
- package/dist/components/helper-text/meta.ts +18 -0
- package/dist/components/hover-card/HoverCard.stories.tsx +1328 -0
- package/dist/components/hover-card/index.tsx +42 -0
- package/dist/components/hover-card/meta.ts +12 -0
- package/dist/components/icon-button/IconButton.stories.tsx +252 -0
- package/dist/components/icon-button/index.tsx +130 -0
- package/dist/components/icon-button/meta.ts +20 -0
- package/dist/components/if-else/if-else.stories.tsx +100 -0
- package/dist/components/if-else/index.tsx +56 -0
- package/dist/components/if-else/meta.ts +6 -0
- package/dist/components/index.ts +70 -0
- package/dist/components/input/Input.stories.tsx +431 -0
- package/dist/components/input/index.tsx +487 -0
- package/dist/components/input/meta.ts +28 -0
- package/dist/components/label/Label.stories.tsx +200 -0
- package/dist/components/label/index.tsx +43 -0
- package/dist/components/label/meta.ts +14 -0
- package/dist/components/list/List.stories.tsx +963 -0
- package/dist/components/list/index.tsx +567 -0
- package/dist/components/list/meta.ts +24 -0
- package/dist/components/marquee/Marquee.stories.tsx +819 -0
- package/dist/components/marquee/index.tsx +107 -0
- package/dist/components/marquee/meta.ts +6 -0
- package/dist/components/overlay/Overlay.stories.tsx +954 -0
- package/dist/components/overlay/index.tsx +58 -0
- package/dist/components/overlay/meta.ts +10 -0
- package/dist/components/pagination/Pagination.stories.tsx +354 -0
- package/dist/components/pagination/index.tsx +455 -0
- package/dist/components/pagination/meta.ts +29 -0
- package/dist/components/popover/Popover.stories.tsx +1037 -0
- package/dist/components/popover/index.tsx +67 -0
- package/dist/components/popover/meta.ts +12 -0
- package/dist/components/radio/Radio.stories.tsx +146 -0
- package/dist/components/radio/index.tsx +41 -0
- package/dist/components/radio/meta.ts +19 -0
- package/dist/components/resizable/Resizable.stories.tsx +866 -0
- package/dist/components/resizable/index.tsx +55 -0
- package/dist/components/resizable/meta.ts +12 -0
- package/dist/components/scroll-area/ScrollArea.stories.tsx +1104 -0
- package/dist/components/scroll-area/index.tsx +55 -0
- package/dist/components/scroll-area/meta.ts +8 -0
- package/dist/components/search/Search.stories.tsx +678 -0
- package/dist/components/search/index.tsx +141 -0
- package/dist/components/search/meta.ts +6 -0
- package/dist/components/select/Select.stories.tsx +962 -0
- package/dist/components/select/index.tsx +512 -0
- package/dist/components/select/meta.ts +40 -0
- package/dist/components/sheet/Sheet.stories.tsx +1060 -0
- package/dist/components/sheet/index.tsx +440 -0
- package/dist/components/sheet/meta.ts +38 -0
- package/dist/components/skelton/Skelton.stories.tsx +859 -0
- package/dist/components/skelton/index.tsx +17 -0
- package/dist/components/skelton/meta.ts +6 -0
- package/dist/components/slider/Slider.stories.tsx +876 -0
- package/dist/components/slider/index.tsx +156 -0
- package/dist/components/slider/meta.ts +29 -0
- package/dist/components/stepper/Stepper.stories.tsx +639 -0
- package/dist/components/stepper/index.tsx +650 -0
- package/dist/components/stepper/meta.ts +19 -0
- package/dist/components/switch/Switch.stories.tsx +85 -0
- package/dist/components/switch/index.tsx +37 -0
- package/dist/components/switch/meta.ts +24 -0
- package/dist/components/switch-case/SwitchCase.stories.tsx +209 -0
- package/dist/components/switch-case/index.tsx +89 -0
- package/dist/components/switch-case/meta.ts +6 -0
- package/dist/components/table/Table.stories.tsx +1095 -0
- package/dist/components/table/index.tsx +113 -0
- package/dist/components/table/meta.ts +20 -0
- package/dist/components/tabs/Tabs.stories.tsx +1379 -0
- package/dist/components/tabs/index.tsx +186 -0
- package/dist/components/tabs/meta.ts +25 -0
- package/dist/components/tag/Tag.stories.tsx +625 -0
- package/dist/components/tag/index.tsx +320 -0
- package/dist/components/tag/meta.ts +52 -0
- package/dist/components/textarea/TextArea.stories.tsx +723 -0
- package/dist/components/textarea/index.tsx +480 -0
- package/dist/components/textarea/meta.ts +23 -0
- package/dist/components/toast/Toast.stories.tsx +1427 -0
- package/dist/components/toast/index.tsx +26 -0
- package/dist/components/toast/meta.ts +19 -0
- package/dist/components/toggle/Toggle.stories.tsx +1093 -0
- package/dist/components/toggle/index.tsx +44 -0
- package/dist/components/toggle/meta.ts +19 -0
- package/dist/components/tooltip/Tooltip.stories.tsx +1548 -0
- package/dist/components/tooltip/index.tsx +304 -0
- package/dist/components/tooltip/meta.ts +21 -0
- package/dist/components/typography/Typography.stories.tsx +197 -0
- package/dist/components/typography/index.tsx +184 -0
- package/dist/components/typography/meta.ts +38 -0
- package/dist/fonts/LabGrotesque-Regular.ttf +0 -0
- package/dist/fonts/LabGrotesqueTRIAL-Bold.otf +0 -0
- package/dist/fonts/LabGrotesqueTRIAL-Light.otf +0 -0
- package/dist/fonts/LabGrotesqueTRIAL-Medium.otf +0 -0
- package/dist/fonts/LabGrotesqueTRIAL-Regular.otf +0 -0
- package/dist/fonts/PPSupplySans-Regular (1).otf +0 -0
- package/dist/fonts/PPSupplySans-Regular.otf +0 -0
- package/dist/fonts/PPSupplySans-Ultralight.otf +0 -0
- package/dist/hooks/index.ts +3 -0
- package/dist/hooks/use-previous/UsePrevious.stories.tsx +997 -0
- package/dist/hooks/use-previous/index.ts +15 -0
- package/dist/hooks/use-previous/meta.ts +6 -0
- package/dist/hooks/use-standalone-pagination/UseStandalonePagination.stories.tsx +983 -0
- package/dist/hooks/use-standalone-pagination/index.ts +146 -0
- package/dist/hooks/use-standalone-pagination/meta.ts +6 -0
- package/dist/icons/Icons.stories.tsx +29 -0
- package/dist/icons/alert-icon/AlertIcon.stories.tsx +991 -0
- package/dist/icons/alert-icon/index.tsx +48 -0
- package/dist/icons/alert-icon/meta.ts +8 -0
- package/dist/icons/all-icons.tsx +738 -0
- package/dist/icons/angle-down-icon/AngleDownIcon.stories.tsx +1031 -0
- package/dist/icons/angle-down-icon/index.tsx +25 -0
- package/dist/icons/angle-down-icon/meta.ts +8 -0
- package/dist/icons/arrow-box-left-icon/ArrowBoxLeftIcon.stories.tsx +1080 -0
- package/dist/icons/arrow-box-left-icon/index.tsx +24 -0
- package/dist/icons/arrow-box-left-icon/meta.ts +8 -0
- package/dist/icons/arrow-right-icon/ArrowRightIcon.stories.tsx +1151 -0
- package/dist/icons/arrow-right-icon/index.tsx +26 -0
- package/dist/icons/arrow-right-icon/meta.ts +8 -0
- package/dist/icons/arrow-right-up-icon/ArrowRightUpIcon.stories.tsx +1273 -0
- package/dist/icons/arrow-right-up-icon/index.tsx +24 -0
- package/dist/icons/arrow-right-up-icon/meta.ts +8 -0
- package/dist/icons/art-board-icon/ArtBoardIcon.stories.tsx +670 -0
- package/dist/icons/art-board-icon/index.tsx +24 -0
- package/dist/icons/art-board-icon/meta.ts +7 -0
- package/dist/icons/audio-bar-icon/AudioBarIcon.stories.tsx +1244 -0
- package/dist/icons/audio-bar-icon/index.tsx +19 -0
- package/dist/icons/audio-bar-icon/meta.ts +8 -0
- package/dist/icons/bubble-check-icon/BubbleCheckIcon.stories.tsx +1239 -0
- package/dist/icons/bubble-check-icon/index.tsx +24 -0
- package/dist/icons/bubble-check-icon/meta.ts +8 -0
- package/dist/icons/bubble-crossed-icon/BubbleCrossedIcon.stories.tsx +1228 -0
- package/dist/icons/bubble-crossed-icon/index.tsx +24 -0
- package/dist/icons/bubble-crossed-icon/meta.ts +8 -0
- package/dist/icons/bubble-sparkle-icon/BubbleSparkleIcon.stories.tsx +912 -0
- package/dist/icons/bubble-sparkle-icon/index.tsx +26 -0
- package/dist/icons/bubble-sparkle-icon/meta.ts +8 -0
- package/dist/icons/chevron-double-left-icon/ChevronDoubleLeftIcon.stories.tsx +1021 -0
- package/dist/icons/chevron-double-left-icon/index.tsx +34 -0
- package/dist/icons/chevron-double-left-icon/meta.ts +8 -0
- package/dist/icons/chevron-double-right-icon/ChevronDoubleRightIcon.stories.tsx +1021 -0
- package/dist/icons/chevron-double-right-icon/index.tsx +34 -0
- package/dist/icons/chevron-double-right-icon/meta.ts +8 -0
- package/dist/icons/chevron-down-icon/ChevronDownIcon.stories.tsx +1001 -0
- package/dist/icons/chevron-down-icon/index.tsx +27 -0
- package/dist/icons/chevron-down-icon/meta.ts +8 -0
- package/dist/icons/chevron-left-icon/ChevronLeftIcon.stories.tsx +1029 -0
- package/dist/icons/chevron-left-icon/index.tsx +27 -0
- package/dist/icons/chevron-left-icon/meta.ts +8 -0
- package/dist/icons/chevron-right-icon/ChevronRightIcon.stories.tsx +1021 -0
- package/dist/icons/chevron-right-icon/index.tsx +27 -0
- package/dist/icons/chevron-right-icon/meta.ts +8 -0
- package/dist/icons/chevron-up-icon/ChevronUpIcon.stories.tsx +1036 -0
- package/dist/icons/chevron-up-icon/index.tsx +27 -0
- package/dist/icons/chevron-up-icon/meta.ts +8 -0
- package/dist/icons/command-icon/CommandIcon.stories.tsx +1098 -0
- package/dist/icons/command-icon/index.tsx +24 -0
- package/dist/icons/command-icon/meta.ts +8 -0
- package/dist/icons/cross-circle-icon/CrossCircleIcon.stories.tsx +1061 -0
- package/dist/icons/cross-circle-icon/index.tsx +23 -0
- package/dist/icons/cross-circle-icon/meta.ts +8 -0
- package/dist/icons/cross-icon/CrossIcon.stories.tsx +1027 -0
- package/dist/icons/cross-icon/index.tsx +24 -0
- package/dist/icons/cross-icon/meta.ts +8 -0
- package/dist/icons/edit-big-icon/EditBigIcon.stories.tsx +1092 -0
- package/dist/icons/edit-big-icon/index.tsx +22 -0
- package/dist/icons/edit-big-icon/meta.ts +8 -0
- package/dist/icons/eye-close-icon/EyeCloseIcon.stories.tsx +1090 -0
- package/dist/icons/eye-close-icon/index.tsx +26 -0
- package/dist/icons/eye-close-icon/meta.ts +8 -0
- package/dist/icons/eye-open-icon/EyeOpenIcon.stories.tsx +1098 -0
- package/dist/icons/eye-open-icon/index.tsx +24 -0
- package/dist/icons/eye-open-icon/meta.ts +8 -0
- package/dist/icons/feature-shine-icon/FeatureShineIcon.stories.tsx +1071 -0
- package/dist/icons/feature-shine-icon/index.tsx +29 -0
- package/dist/icons/feature-shine-icon/meta.ts +8 -0
- package/dist/icons/file-chart-icon/FileChartIcon.stories.tsx +1115 -0
- package/dist/icons/file-chart-icon/index.tsx +24 -0
- package/dist/icons/file-chart-icon/meta.ts +8 -0
- package/dist/icons/file-text-icon/FileTextIcon.stories.tsx +668 -0
- package/dist/icons/file-text-icon/index.tsx +24 -0
- package/dist/icons/file-text-icon/meta.ts +8 -0
- package/dist/icons/grip-vertical-icon/GripVerticalIcon.stories.tsx +1239 -0
- package/dist/icons/grip-vertical-icon/index.tsx +28 -0
- package/dist/icons/grip-vertical-icon/meta.ts +8 -0
- package/dist/icons/image-icon/ImageIcon.stories.tsx +1181 -0
- package/dist/icons/image-icon/index.tsx +24 -0
- package/dist/icons/image-icon/meta.ts +8 -0
- package/dist/icons/import-folder-icon/ImportFolderIcon.stories.tsx +1248 -0
- package/dist/icons/import-folder-icon/index.tsx +22 -0
- package/dist/icons/import-folder-icon/meta.ts +8 -0
- package/dist/icons/index.ts +46 -0
- package/dist/icons/light-bulb-simple-icon/LightBulbSimpleIcon.stories.tsx +1272 -0
- package/dist/icons/light-bulb-simple-icon/index.tsx +24 -0
- package/dist/icons/light-bulb-simple-icon/meta.ts +8 -0
- package/dist/icons/magic-book-icon/MagicBookIcon.stories.tsx +1245 -0
- package/dist/icons/magic-book-icon/index.tsx +32 -0
- package/dist/icons/magic-book-icon/meta.ts +8 -0
- package/dist/icons/maintenance-icon/MaintenanceIcon.stories.tsx +1251 -0
- package/dist/icons/maintenance-icon/index.tsx +23 -0
- package/dist/icons/maintenance-icon/meta.ts +8 -0
- package/dist/icons/message-icon/MessageIcon.stories.tsx +595 -0
- package/dist/icons/message-icon/index.tsx +30 -0
- package/dist/icons/message-icon/meta.ts +8 -0
- package/dist/icons/move-horizontal-icon/MoveHorizontalIcon.stories.tsx +1245 -0
- package/dist/icons/move-horizontal-icon/index.tsx +23 -0
- package/dist/icons/move-horizontal-icon/meta.ts +8 -0
- package/dist/icons/move-vertical-icon/MoveVerticalIcon.stories.tsx +1196 -0
- package/dist/icons/move-vertical-icon/index.tsx +23 -0
- package/dist/icons/move-vertical-icon/meta.ts +8 -0
- package/dist/icons/page-search-icon/PageSearchIcon.stories.tsx +1167 -0
- package/dist/icons/page-search-icon/index.tsx +21 -0
- package/dist/icons/page-search-icon/meta.ts +8 -0
- package/dist/icons/pencil-icon/PencilIcon.stories.tsx +1131 -0
- package/dist/icons/pencil-icon/index.tsx +21 -0
- package/dist/icons/pencil-icon/meta.ts +8 -0
- package/dist/icons/plus-icon/PlusIcon.stories.tsx +1151 -0
- package/dist/icons/plus-icon/index.tsx +24 -0
- package/dist/icons/plus-icon/meta.ts +8 -0
- package/dist/icons/search-icon/SearchIcon.stories.tsx +1181 -0
- package/dist/icons/search-icon/index.tsx +24 -0
- package/dist/icons/search-icon/meta.ts +8 -0
- package/dist/icons/site-logo-icon/SiteLogoIcon.stories.tsx +1167 -0
- package/dist/icons/site-logo-icon/index.tsx +79 -0
- package/dist/icons/site-logo-icon/meta.ts +8 -0
- package/dist/icons/spinner-gradient-icon/SpinnerGradientIcon.stories.tsx +637 -0
- package/dist/icons/spinner-gradient-icon/index.tsx +53 -0
- package/dist/icons/spinner-gradient-icon/meta.ts +8 -0
- package/dist/icons/spinner-solid-icon/SpinnerSolidIcon.stories.tsx +644 -0
- package/dist/icons/spinner-solid-icon/index.tsx +59 -0
- package/dist/icons/spinner-solid-icon/meta.ts +8 -0
- package/dist/icons/spinner-solid-neutral-icon/SpinnerSolidINeutralcon.stories.tsx +736 -0
- package/dist/icons/spinner-solid-neutral-icon/index.tsx +53 -0
- package/dist/icons/spinner-solid-neutral-icon/meta.ts +8 -0
- package/dist/icons/tick-circle-icon/TickCircleIcon.stories.tsx +1204 -0
- package/dist/icons/tick-circle-icon/index.tsx +23 -0
- package/dist/icons/tick-circle-icon/meta.ts +8 -0
- package/dist/icons/tick-icon/TickIcon.stories.tsx +1340 -0
- package/dist/icons/tick-icon/index.tsx +24 -0
- package/dist/icons/tick-icon/meta.ts +8 -0
- package/dist/icons/trash-icon/TrashIcon.stories.tsx +996 -0
- package/dist/icons/trash-icon/index.tsx +24 -0
- package/dist/icons/trash-icon/meta.ts +8 -0
- package/dist/icons/upload-icon/UploadIcon.stories.tsx +947 -0
- package/dist/icons/upload-icon/index.tsx +24 -0
- package/dist/icons/upload-icon/meta.ts +8 -0
- package/dist/icons/vertical-menu-icon/VerticalMenuIcon.stories.tsx +1045 -0
- package/dist/icons/vertical-menu-icon/index.tsx +27 -0
- package/dist/icons/vertical-menu-icon/meta.ts +8 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +206 -0
- package/dist/lib/utils.ts +6 -0
- package/dist/styles/aural-theme.css +1008 -0
- package/package.json +142 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Pocket FM
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,456 @@
|
|
|
1
|
+
# Aural UI
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/aural-ui)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
[](https://www.npmjs.com/package/aural-ui)
|
|
6
|
+
[](https://img.shields.io/bundlephobia/minzip/aural-ui)
|
|
7
|
+
[](https://img.shields.io/badge/TypeScript-Ready-blue.svg)
|
|
8
|
+
|
|
9
|
+
A modern CLI toolkit for seamlessly integrating customizable UI components into
|
|
10
|
+
React projects. Quickly scaffold, add, and manage production-ready components
|
|
11
|
+
with minimal configuration.
|
|
12
|
+
|
|
13
|
+
## Table of Contents
|
|
14
|
+
|
|
15
|
+
- [Features](#features)
|
|
16
|
+
- [Architecture](#architecture)
|
|
17
|
+
- [Technology Stack](#technology-stack)
|
|
18
|
+
- [Installation](#installation)
|
|
19
|
+
- [Getting Started](#getting-started)
|
|
20
|
+
- [Usage Examples](#usage-examples)
|
|
21
|
+
- [Configuration](#configuration)
|
|
22
|
+
- [Project Setup](#project-setup)
|
|
23
|
+
- [Component Development](#component-development)
|
|
24
|
+
- [Adding a New Component](#adding-a-new-component)
|
|
25
|
+
- [Adding a New Hook](#adding-a-new-hook)
|
|
26
|
+
- [Adding a New Icon](#adding-a-new-icon)
|
|
27
|
+
- [Adding a New Utility](#adding-a-new-utility)
|
|
28
|
+
- [Storybook](#storybook)
|
|
29
|
+
- [Running Storybook Locally](#running-storybook-locally)
|
|
30
|
+
- [Theme Support](#theme-support)
|
|
31
|
+
- [Deployment](#deployment)
|
|
32
|
+
- [Pros and Cons](#pros-and-cons)
|
|
33
|
+
- [Contributing](#contributing)
|
|
34
|
+
- [Publishing to npm](#publishing-to-npm)
|
|
35
|
+
- [License](#license)
|
|
36
|
+
|
|
37
|
+
## Features
|
|
38
|
+
|
|
39
|
+
- 🚀 **Quick Setup**: Initialize your project with a single command
|
|
40
|
+
- 🧩 **Component Library**: Ready-to-use React components styled with Tailwind
|
|
41
|
+
CSS
|
|
42
|
+
- 🔌 **Plug & Play**: Automatically adds components to your project structure
|
|
43
|
+
- ✨ **Modern UI**: Components built with modern design patterns
|
|
44
|
+
- 🎨 **Customizable**: Easy to customize and extend components
|
|
45
|
+
- 📦 **Zero Config**: Works out of the box with sensible defaults
|
|
46
|
+
- 🌙 **Theme Support**: Built-in theming capabilities
|
|
47
|
+
- 📚 **Storybook Integration**: Full documentation and visual testing
|
|
48
|
+
|
|
49
|
+
## Architecture
|
|
50
|
+
|
|
51
|
+
Aural UI follows a modular architecture designed for flexibility and easy
|
|
52
|
+
maintenance:
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
aural-ui/
|
|
56
|
+
├── src/
|
|
57
|
+
│ ├── cli/ # CLI commands and utilities
|
|
58
|
+
│ ├── core/ # Core library functionalities
|
|
59
|
+
│ │ ├── constants/ # Shared constants
|
|
60
|
+
│ │ ├── services/ # Core services
|
|
61
|
+
│ │ ├── templates/ # Component and project templates
|
|
62
|
+
│ │ ├── utils/ # Shared utility functions
|
|
63
|
+
│ │ └── validation/ # Validation utilities
|
|
64
|
+
│ └── ui/ # UI components and related files
|
|
65
|
+
│ ├── components/ # React component library
|
|
66
|
+
│ ├── hooks/ # React custom hooks
|
|
67
|
+
│ ├── icons/ # SVG icon components
|
|
68
|
+
│ ├── lib/ # UI library utilities
|
|
69
|
+
│ └── styles/ # Theme and styling utilities
|
|
70
|
+
├── dist/ # Built distribution files
|
|
71
|
+
└── storybook-static/ # Built Storybook documentation
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Key Architectural Concepts
|
|
75
|
+
|
|
76
|
+
- **CLI-First Approach**: Primary interaction through command-line interface
|
|
77
|
+
- **Component Isolation**: Components are self-contained with their own logic
|
|
78
|
+
and styling
|
|
79
|
+
- **Theme System**: Centralized theming with token-based design
|
|
80
|
+
- **Documentation as Code**: Integrated documentation with Storybook
|
|
81
|
+
|
|
82
|
+
## Technology Stack
|
|
83
|
+
|
|
84
|
+
- **Core**:
|
|
85
|
+
|
|
86
|
+
- React (>=19.1.0)
|
|
87
|
+
- TypeScript
|
|
88
|
+
- Node.js (>=14.16)
|
|
89
|
+
|
|
90
|
+
- **Styling**:
|
|
91
|
+
|
|
92
|
+
- Tailwind CSS
|
|
93
|
+
- CSS Variables for theming
|
|
94
|
+
|
|
95
|
+
- **Component Design**:
|
|
96
|
+
|
|
97
|
+
- Radix UI (headless components)
|
|
98
|
+
- ARIA-compliant patterns
|
|
99
|
+
|
|
100
|
+
- **Development Tools**:
|
|
101
|
+
|
|
102
|
+
- Storybook
|
|
103
|
+
- Changesets (for versioning)
|
|
104
|
+
- Vitest (testing)
|
|
105
|
+
- TSup (bundling)
|
|
106
|
+
|
|
107
|
+
- **CLI Framework**:
|
|
108
|
+
- Commander.js
|
|
109
|
+
- Inquirer
|
|
110
|
+
- Chalk
|
|
111
|
+
- Ora
|
|
112
|
+
|
|
113
|
+
## Installation
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
# Install globally (recommended)
|
|
117
|
+
npm install -g aural-ui
|
|
118
|
+
|
|
119
|
+
# Or install as a project dependency
|
|
120
|
+
npm install aural-ui --save-dev
|
|
121
|
+
|
|
122
|
+
# Or use directly with npx
|
|
123
|
+
npx aural-ui [command]
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Getting Started
|
|
127
|
+
|
|
128
|
+
### Initialize Your Project
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
npx aural-ui init
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
This command will:
|
|
135
|
+
|
|
136
|
+
- Create configuration for your project
|
|
137
|
+
- Detect your project structure
|
|
138
|
+
- Set up the component directory
|
|
139
|
+
|
|
140
|
+
### Adding Components
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
npx aural-ui add [component-name]
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
## Configuration
|
|
147
|
+
|
|
148
|
+
Aural UI creates a configuration file (`aural-ui.json`) in your project root
|
|
149
|
+
with the following default settings:
|
|
150
|
+
|
|
151
|
+
```json
|
|
152
|
+
{
|
|
153
|
+
"framework": "react",
|
|
154
|
+
"styling": "tailwind",
|
|
155
|
+
"componentsDir": "src/components/aural-ui",
|
|
156
|
+
"libDir": "src/lib",
|
|
157
|
+
"tailwind": {
|
|
158
|
+
"css": "src/index.css",
|
|
159
|
+
"theme": "rose"
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
You can modify this file to customize how Aural UI integrates with your project.
|
|
165
|
+
|
|
166
|
+
## Project Setup
|
|
167
|
+
|
|
168
|
+
For developers who want to contribute to Aural UI itself:
|
|
169
|
+
|
|
170
|
+
1. Clone the repository:
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
git clone https://github.com/YourOrganization/aural-ui.git
|
|
174
|
+
cd aural-ui
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
2. Install dependencies:
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
npm install
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
3. Run validation:
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
npm run validate
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
4. Start development mode:
|
|
190
|
+
```bash
|
|
191
|
+
npm run dev
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### Building the Project
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
npm run build
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
This command runs the validation script first and then builds the project using
|
|
201
|
+
TSup.
|
|
202
|
+
|
|
203
|
+
## Component Development
|
|
204
|
+
|
|
205
|
+
### Adding a New Component
|
|
206
|
+
|
|
207
|
+
1. Create a new directory in `src/ui/components/[component-name]` with:
|
|
208
|
+
|
|
209
|
+
- `[component-name].tsx` - Component implementation
|
|
210
|
+
- `[component-name].stories.tsx` - Storybook documentation
|
|
211
|
+
- `[component-name].test.tsx` - Component tests
|
|
212
|
+
- `meta.ts` - Meta registration
|
|
213
|
+
|
|
214
|
+
2. Follow the component structure pattern:
|
|
215
|
+
|
|
216
|
+
```tsx
|
|
217
|
+
import { cn } from "src/lib/utils"
|
|
218
|
+
|
|
219
|
+
export interface ComponentNameProps {
|
|
220
|
+
className?: string
|
|
221
|
+
// Other props...
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export function ComponentName({ className, ...props }: ComponentNameProps) {
|
|
225
|
+
return (
|
|
226
|
+
<div className={cn("aui-component-base", className)} {...props}>
|
|
227
|
+
{/* Component content */}
|
|
228
|
+
</div>
|
|
229
|
+
)
|
|
230
|
+
}
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
3. Export the component in the appropriate index file.
|
|
234
|
+
|
|
235
|
+
### Adding a New Hook
|
|
236
|
+
|
|
237
|
+
1. Create a new file in `src/ui/hooks/use-hook-name.ts`:
|
|
238
|
+
|
|
239
|
+
```tsx
|
|
240
|
+
export function useHookName(params) {
|
|
241
|
+
// Hook implementation
|
|
242
|
+
return {
|
|
243
|
+
// Hook return values
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
2. Create tests in `src/ui/hooks/use-hook-name.test.tsx`
|
|
249
|
+
|
|
250
|
+
3. Create a story in `src/ui/hooks/use-hook-name.stories.tsx` with usage
|
|
251
|
+
examples
|
|
252
|
+
|
|
253
|
+
4. Export the hook in `src/ui/hooks/index.ts`
|
|
254
|
+
|
|
255
|
+
5. Create meta registration in `src/ui/hooks/meta.ts`
|
|
256
|
+
|
|
257
|
+
### Adding a New Icon
|
|
258
|
+
|
|
259
|
+
1. Optimize the SVG using a tool like SVGO
|
|
260
|
+
|
|
261
|
+
2. Create a new file in `src/ui/icons/icon-name.tsx`:
|
|
262
|
+
|
|
263
|
+
```tsx
|
|
264
|
+
export function IconName(props: React.SVGProps<SVGSVGElement>) {
|
|
265
|
+
return (
|
|
266
|
+
<svg
|
|
267
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
268
|
+
viewBox="0 0 24 24"
|
|
269
|
+
fill="none"
|
|
270
|
+
stroke="currentColor"
|
|
271
|
+
{...props}
|
|
272
|
+
>
|
|
273
|
+
{/* SVG paths */}
|
|
274
|
+
</svg>
|
|
275
|
+
)
|
|
276
|
+
}
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
3. Export the icon in `src/ui/icons/index.ts`
|
|
280
|
+
|
|
281
|
+
4. Create tests in `src/ui/icons/icon-name.test.tsx`
|
|
282
|
+
|
|
283
|
+
5. Create story in `src/ui/icons/icon-name.stories.tsx`
|
|
284
|
+
|
|
285
|
+
6. Create meta registration in `src/ui/hooks/meta.ts`
|
|
286
|
+
|
|
287
|
+
### Adding a New Utility
|
|
288
|
+
|
|
289
|
+
1. Create a new file in `src/core/utils/utility-name.ts` with appropriate
|
|
290
|
+
functionality
|
|
291
|
+
|
|
292
|
+
2. Add tests in `src/core/utils/utility-name.test.ts`
|
|
293
|
+
|
|
294
|
+
3. Add story in `src/core/utils/utility-name.stories.ts`
|
|
295
|
+
|
|
296
|
+
4. Export the utility in `src/core/utils/index.ts`
|
|
297
|
+
|
|
298
|
+
5. Create meta registration in `src/ui/hooks/meta.ts`
|
|
299
|
+
|
|
300
|
+
## Storybook
|
|
301
|
+
|
|
302
|
+
Aural UI uses Storybook for component documentation and development.
|
|
303
|
+
|
|
304
|
+
### Running Storybook Locally
|
|
305
|
+
|
|
306
|
+
```bash
|
|
307
|
+
# Install dependencies
|
|
308
|
+
npm install
|
|
309
|
+
|
|
310
|
+
# Generate theme files (automatically runs before storybook)
|
|
311
|
+
npm run theme
|
|
312
|
+
|
|
313
|
+
# Start Storybook development server
|
|
314
|
+
npm run storybook
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
This will start the Storybook development server at `http://localhost:6006`.
|
|
318
|
+
|
|
319
|
+
### Theme Support
|
|
320
|
+
|
|
321
|
+
Aural UI includes integrated theme support that is automatically initialized
|
|
322
|
+
when running Storybook:
|
|
323
|
+
|
|
324
|
+
- Theme tokens are defined in `src/ui/styles/themes/`
|
|
325
|
+
- The `npm run theme` command generates CSS variables from these tokens
|
|
326
|
+
- Storybook includes a theme switcher to preview components in different themes
|
|
327
|
+
|
|
328
|
+
To create a custom theme:
|
|
329
|
+
|
|
330
|
+
1. Create a new theme file in `src/ui/styles/themes/your-theme.ts`
|
|
331
|
+
|
|
332
|
+
## Deployment
|
|
333
|
+
|
|
334
|
+
### Storybook Deployment
|
|
335
|
+
|
|
336
|
+
The Storybook documentation is automatically deployed to Netlify whenever
|
|
337
|
+
changes are pushed to the main branch:
|
|
338
|
+
|
|
339
|
+
1. Build the Storybook for production:
|
|
340
|
+
|
|
341
|
+
```bash
|
|
342
|
+
npm run build-storybook
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
2. The built Storybook is available in the `storybook-static` directory
|
|
346
|
+
|
|
347
|
+
3. CI/CD automatically deploys this directory to Netlify
|
|
348
|
+
|
|
349
|
+
### Live Storybook
|
|
350
|
+
|
|
351
|
+
The Storybook documentation is available online:
|
|
352
|
+
|
|
353
|
+
[https://aural-ui.netlify.app/](https://aural-ui.netlify.app/)
|
|
354
|
+
|
|
355
|
+
## Pros and Cons
|
|
356
|
+
|
|
357
|
+
### Pros
|
|
358
|
+
|
|
359
|
+
- ✅ **Easy Integration**: Simple CLI commands to add components to any project
|
|
360
|
+
- ✅ **Modern Stack**: Built with modern React patterns and TypeScript
|
|
361
|
+
- ✅ **Theming**: Robust theme system for customization
|
|
362
|
+
- ✅ **Accessibility**: Components follow WAI-ARIA guidelines
|
|
363
|
+
- ✅ **Well-Documented**: Thorough documentation with Storybook
|
|
364
|
+
- ✅ **Minimum Dependencies**: Core library has minimal external dependencies
|
|
365
|
+
- ✅ **TypeScript Support**: Full type definitions for all components
|
|
366
|
+
|
|
367
|
+
## Contributing
|
|
368
|
+
|
|
369
|
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
370
|
+
|
|
371
|
+
### Development Workflow
|
|
372
|
+
|
|
373
|
+
1. Fork the repository
|
|
374
|
+
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
|
|
375
|
+
3. Run validation and tests (`npm run validate && npm test`)
|
|
376
|
+
4. Commit your changes with a descriptive message
|
|
377
|
+
5. Push to the branch (`git push origin feature/amazing-feature`)
|
|
378
|
+
6. Open a Pull Request
|
|
379
|
+
|
|
380
|
+
### Contribution Guidelines
|
|
381
|
+
|
|
382
|
+
- Follow the existing code style and conventions
|
|
383
|
+
- Write tests for new functionality
|
|
384
|
+
- Update documentation for any new or changed features
|
|
385
|
+
- Add a changeset for version management (`npm run changeset`)
|
|
386
|
+
- Ensure all tests pass before submitting a pull request
|
|
387
|
+
|
|
388
|
+
### Setup Development Environment
|
|
389
|
+
|
|
390
|
+
```bash
|
|
391
|
+
# Clone your fork
|
|
392
|
+
git clone https://github.com/your-username/aural-ui.git
|
|
393
|
+
cd aural-ui
|
|
394
|
+
|
|
395
|
+
# Install dependencies
|
|
396
|
+
npm install
|
|
397
|
+
|
|
398
|
+
# Create a branch
|
|
399
|
+
git checkout -b feature/your-feature-name
|
|
400
|
+
|
|
401
|
+
# Run development mode
|
|
402
|
+
npm run dev
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
## Publishing to npm
|
|
406
|
+
|
|
407
|
+
### Manual Publishing
|
|
408
|
+
|
|
409
|
+
If you're a maintainer of this package, follow these steps to publish to npm
|
|
410
|
+
manually:
|
|
411
|
+
|
|
412
|
+
1. Update the version in `package.json` (follow [semver](https://semver.org/))
|
|
413
|
+
2. Make sure all tests pass with `npm test`
|
|
414
|
+
3. Build the package with `npm run build`
|
|
415
|
+
4. Log in to npm with `npm login`
|
|
416
|
+
5. Publish with `npm publish`
|
|
417
|
+
|
|
418
|
+
The `prepublishOnly` script will automatically run the build before publishing.
|
|
419
|
+
|
|
420
|
+
### Automated Publishing with GitHub Actions
|
|
421
|
+
|
|
422
|
+
This project uses GitHub Actions to automatically publish to npm when changes
|
|
423
|
+
are pushed to the main branch. The workflow:
|
|
424
|
+
|
|
425
|
+
1. Checks out the repository
|
|
426
|
+
2. Sets up Node.js
|
|
427
|
+
3. Configures Git and npm authentication
|
|
428
|
+
4. Installs dependencies and builds the package
|
|
429
|
+
5. Uses [Changesets](https://github.com/changesets/changesets) to create a
|
|
430
|
+
release PR or publish to npm
|
|
431
|
+
|
|
432
|
+
#### Setting up NPM_TOKEN for GitHub Actions
|
|
433
|
+
|
|
434
|
+
To enable automated publishing, you need to add your npm token as a repository
|
|
435
|
+
secret:
|
|
436
|
+
|
|
437
|
+
1. Generate an npm access token:
|
|
438
|
+
|
|
439
|
+
- Log in to your npm account at https://www.npmjs.com/
|
|
440
|
+
- Click on your profile picture → Access Tokens
|
|
441
|
+
- Click "Generate New Token" and select "Automation" type
|
|
442
|
+
- Copy the generated token (you won't see it again)
|
|
443
|
+
|
|
444
|
+
2. Add the token to GitHub repository secrets:
|
|
445
|
+
- Go to your GitHub repository → Settings → Secrets and variables → Actions
|
|
446
|
+
- Click "New repository secret"
|
|
447
|
+
- Set the name as "NPM_TOKEN" and paste your npm token as the value
|
|
448
|
+
- Click "Add secret"
|
|
449
|
+
|
|
450
|
+
## License
|
|
451
|
+
|
|
452
|
+
MIT © [Sawan Kumar](mailto:sawan.kumar@pocketfm.com)
|
|
453
|
+
|
|
454
|
+
---
|
|
455
|
+
|
|
456
|
+
Built with ❤️ by the team at [Pocket FM](https://pocketfm.com/)
|