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
|
@@ -0,0 +1,963 @@
|
|
|
1
|
+
import React from "react"
|
|
2
|
+
import { Badge } from "@components/badge"
|
|
3
|
+
import {
|
|
4
|
+
BubbleCheckIcon,
|
|
5
|
+
BubbleSparkleIcon,
|
|
6
|
+
EditBigIcon,
|
|
7
|
+
EyeOpenIcon,
|
|
8
|
+
FeatureShineIcon,
|
|
9
|
+
FileChartIcon,
|
|
10
|
+
ImageIcon,
|
|
11
|
+
ImportFolderIcon,
|
|
12
|
+
LightBulbSimpleIcon,
|
|
13
|
+
MagicBookIcon,
|
|
14
|
+
MaintenanceIcon,
|
|
15
|
+
SearchIcon,
|
|
16
|
+
TickIcon,
|
|
17
|
+
TrashIcon,
|
|
18
|
+
UploadIcon,
|
|
19
|
+
} from "@icons/index"
|
|
20
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
21
|
+
|
|
22
|
+
import {
|
|
23
|
+
List,
|
|
24
|
+
ListCheckboxItem,
|
|
25
|
+
ListGroup,
|
|
26
|
+
ListItem,
|
|
27
|
+
ListLabel,
|
|
28
|
+
ListRadioGroup,
|
|
29
|
+
ListRadioItem,
|
|
30
|
+
ListSeparator,
|
|
31
|
+
ListSubTrigger,
|
|
32
|
+
} from "."
|
|
33
|
+
|
|
34
|
+
const meta: Meta<typeof List> = {
|
|
35
|
+
title: "Components/UI/List",
|
|
36
|
+
component: List,
|
|
37
|
+
parameters: {
|
|
38
|
+
layout: "fullscreen",
|
|
39
|
+
backgrounds: {
|
|
40
|
+
default: "dark",
|
|
41
|
+
values: [
|
|
42
|
+
{ name: "dark", value: "#0a0a0a" },
|
|
43
|
+
{ name: "light", value: "#ffffff" },
|
|
44
|
+
],
|
|
45
|
+
},
|
|
46
|
+
docs: {
|
|
47
|
+
description: {
|
|
48
|
+
component: `
|
|
49
|
+
# List Component
|
|
50
|
+
|
|
51
|
+
A comprehensive atomic list component system that provides building blocks for creating rich interactive lists, menus, and selection interfaces. Built following atomic design principles.
|
|
52
|
+
|
|
53
|
+
## Atomic Components
|
|
54
|
+
|
|
55
|
+
### Container Level
|
|
56
|
+
- **List**: Main container with styling variants and border options
|
|
57
|
+
- **ListGroup**: Semantic grouping wrapper for related list items
|
|
58
|
+
|
|
59
|
+
### Content Level
|
|
60
|
+
- **ListItem**: Basic interactive list item with states and variants
|
|
61
|
+
- **ListCheckboxItem**: Checkbox-enabled list item for multi-selection
|
|
62
|
+
- **ListRadioItem**: Radio button list item for single selection within groups
|
|
63
|
+
- **ListLabel**: Semantic label component for list sections
|
|
64
|
+
- **ListSeparator**: Visual separator using design system divider
|
|
65
|
+
- **ListSubTrigger**: List item with chevron for nested navigation
|
|
66
|
+
|
|
67
|
+
## Features
|
|
68
|
+
|
|
69
|
+
- **Atomic Design**: Composable components following atomic design principles
|
|
70
|
+
- **Flexible Styling**: CVA variants for size, state, and visual styling
|
|
71
|
+
- **Interactive States**: Hover, focus, selected, and disabled states
|
|
72
|
+
- **Selection Patterns**: Support for single, multi, and radio group selection
|
|
73
|
+
- **Keyboard Navigation**: Full keyboard accessibility support
|
|
74
|
+
- **Icon Integration**: Seamless icon support with proper sizing and coloring
|
|
75
|
+
- **Shortcuts Display**: Built-in keyboard shortcut display
|
|
76
|
+
- **Custom Styling**: Extensive customization through classes prop
|
|
77
|
+
- **Semantic HTML**: Proper ARIA roles and attributes for accessibility
|
|
78
|
+
|
|
79
|
+
## Usage Examples
|
|
80
|
+
|
|
81
|
+
### Basic List
|
|
82
|
+
\`\`\`tsx
|
|
83
|
+
<List>
|
|
84
|
+
<ListItem>
|
|
85
|
+
<FileChartIcon />
|
|
86
|
+
Basic Item
|
|
87
|
+
</ListItem>
|
|
88
|
+
<ListSeparator />
|
|
89
|
+
<ListItem selected>
|
|
90
|
+
<ImageIcon />
|
|
91
|
+
Selected Item
|
|
92
|
+
</ListItem>
|
|
93
|
+
</List>
|
|
94
|
+
\`\`\`
|
|
95
|
+
|
|
96
|
+
### Grouped List with Labels
|
|
97
|
+
\`\`\`tsx
|
|
98
|
+
<List>
|
|
99
|
+
<ListGroup>
|
|
100
|
+
<ListLabel>Actions</ListLabel>
|
|
101
|
+
<ListItem>
|
|
102
|
+
<EditBigIcon />
|
|
103
|
+
Edit File
|
|
104
|
+
<CommandShortcut>⌘E</CommandShortcut>
|
|
105
|
+
</ListItem>
|
|
106
|
+
<ListItem variant="destructive">
|
|
107
|
+
<TrashIcon />
|
|
108
|
+
Delete
|
|
109
|
+
</ListItem>
|
|
110
|
+
</ListGroup>
|
|
111
|
+
</List>
|
|
112
|
+
\`\`\`
|
|
113
|
+
|
|
114
|
+
### Selection Lists
|
|
115
|
+
\`\`\`tsx
|
|
116
|
+
<List>
|
|
117
|
+
<ListCheckboxItem checked onCheckedChange={setChecked}>
|
|
118
|
+
Multi-select Item
|
|
119
|
+
</ListCheckboxItem>
|
|
120
|
+
|
|
121
|
+
<ListRadioGroup value={value} onValueChange={setValue}>
|
|
122
|
+
<ListRadioItem value="option1">Option 1</ListRadioItem>
|
|
123
|
+
<ListRadioItem value="option2">Option 2</ListRadioItem>
|
|
124
|
+
</ListRadioGroup>
|
|
125
|
+
</List>
|
|
126
|
+
\`\`\`
|
|
127
|
+
|
|
128
|
+
### Custom Styling
|
|
129
|
+
\`\`\`tsx
|
|
130
|
+
<List
|
|
131
|
+
variant="elevated"
|
|
132
|
+
size="lg"
|
|
133
|
+
borderVariant="success"
|
|
134
|
+
classes={{ root: "custom-list" }}
|
|
135
|
+
>
|
|
136
|
+
<ListItem
|
|
137
|
+
size="lg"
|
|
138
|
+
classes={{ root: "custom-item" }}
|
|
139
|
+
>
|
|
140
|
+
Custom Styled Item
|
|
141
|
+
</ListItem>
|
|
142
|
+
</List>
|
|
143
|
+
\`\`\`
|
|
144
|
+
`,
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
tags: ["autodocs"],
|
|
149
|
+
argTypes: {
|
|
150
|
+
variant: {
|
|
151
|
+
control: "select",
|
|
152
|
+
options: ["default", "elevated", "flat"],
|
|
153
|
+
description: "Visual style variant of the list container",
|
|
154
|
+
},
|
|
155
|
+
size: {
|
|
156
|
+
control: "select",
|
|
157
|
+
options: ["sm", "default", "lg", "xl"],
|
|
158
|
+
description: "Size variant affecting minimum width",
|
|
159
|
+
},
|
|
160
|
+
rounded: {
|
|
161
|
+
control: "select",
|
|
162
|
+
options: ["none", "sm", "default", "lg"],
|
|
163
|
+
description: "Border radius variant",
|
|
164
|
+
},
|
|
165
|
+
borderVariant: {
|
|
166
|
+
control: "select",
|
|
167
|
+
options: ["default", "error", "warning", "success", "info"],
|
|
168
|
+
description: "Color variant for the top border accent",
|
|
169
|
+
},
|
|
170
|
+
showBorder: {
|
|
171
|
+
control: "boolean",
|
|
172
|
+
description: "Whether to show the top accent border",
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export default meta
|
|
178
|
+
type Story = StoryObj<typeof List>
|
|
179
|
+
|
|
180
|
+
// 1. Basic List
|
|
181
|
+
export const BasicList: Story = {
|
|
182
|
+
args: {
|
|
183
|
+
variant: "default",
|
|
184
|
+
size: "default",
|
|
185
|
+
rounded: "default",
|
|
186
|
+
borderVariant: "default",
|
|
187
|
+
showBorder: true,
|
|
188
|
+
},
|
|
189
|
+
render: (args) => (
|
|
190
|
+
<div className="mx-auto max-w-md p-8">
|
|
191
|
+
<h3 className="mb-4 text-lg font-medium text-white">Basic List</h3>
|
|
192
|
+
<List {...args} className="backdrop-blur-none">
|
|
193
|
+
<ListItem>
|
|
194
|
+
<FileChartIcon />
|
|
195
|
+
Documents
|
|
196
|
+
</ListItem>
|
|
197
|
+
<ListItem>
|
|
198
|
+
<ImageIcon />
|
|
199
|
+
Images
|
|
200
|
+
</ListItem>
|
|
201
|
+
<ListItem selected>
|
|
202
|
+
<MagicBookIcon />
|
|
203
|
+
Magic Book (Selected)
|
|
204
|
+
</ListItem>
|
|
205
|
+
<ListItem disabled>
|
|
206
|
+
<TrashIcon />
|
|
207
|
+
Disabled Item
|
|
208
|
+
</ListItem>
|
|
209
|
+
</List>
|
|
210
|
+
</div>
|
|
211
|
+
),
|
|
212
|
+
parameters: {
|
|
213
|
+
docs: {
|
|
214
|
+
description: {
|
|
215
|
+
story:
|
|
216
|
+
"Basic list with icons and different states including selected and disabled items.",
|
|
217
|
+
},
|
|
218
|
+
},
|
|
219
|
+
},
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
// 2. List with Groups and Labels
|
|
223
|
+
export const GroupedList: Story = {
|
|
224
|
+
render: () => (
|
|
225
|
+
<div className="mx-auto max-w-md p-8">
|
|
226
|
+
<h3 className="mb-4 text-lg font-medium text-white">
|
|
227
|
+
Grouped List with Labels
|
|
228
|
+
</h3>
|
|
229
|
+
<List>
|
|
230
|
+
<ListGroup>
|
|
231
|
+
<ListLabel>File Operations</ListLabel>
|
|
232
|
+
<ListItem>
|
|
233
|
+
<FileChartIcon />
|
|
234
|
+
New Document
|
|
235
|
+
<span className="ml-auto text-xs opacity-60">⌘N</span>
|
|
236
|
+
</ListItem>
|
|
237
|
+
<ListItem>
|
|
238
|
+
<ImportFolderIcon />
|
|
239
|
+
Open Folder
|
|
240
|
+
<span className="ml-auto text-xs opacity-60">⌘O</span>
|
|
241
|
+
</ListItem>
|
|
242
|
+
<ListItem>
|
|
243
|
+
<EditBigIcon />
|
|
244
|
+
Edit File
|
|
245
|
+
<span className="ml-auto text-xs opacity-60">⌘E</span>
|
|
246
|
+
</ListItem>
|
|
247
|
+
</ListGroup>
|
|
248
|
+
|
|
249
|
+
<ListSeparator />
|
|
250
|
+
|
|
251
|
+
<ListGroup>
|
|
252
|
+
<ListLabel>Actions</ListLabel>
|
|
253
|
+
<ListItem>
|
|
254
|
+
<BubbleSparkleIcon />
|
|
255
|
+
Share
|
|
256
|
+
<Badge color="info" className="ml-auto">
|
|
257
|
+
New
|
|
258
|
+
</Badge>
|
|
259
|
+
</ListItem>
|
|
260
|
+
<ListItem>
|
|
261
|
+
<UploadIcon />
|
|
262
|
+
Upload
|
|
263
|
+
</ListItem>
|
|
264
|
+
<ListSubTrigger>
|
|
265
|
+
<MaintenanceIcon />
|
|
266
|
+
More Options
|
|
267
|
+
</ListSubTrigger>
|
|
268
|
+
</ListGroup>
|
|
269
|
+
|
|
270
|
+
<ListSeparator />
|
|
271
|
+
|
|
272
|
+
<ListGroup>
|
|
273
|
+
<ListLabel>Dangerous Actions</ListLabel>
|
|
274
|
+
<ListItem variant="destructive">
|
|
275
|
+
<TrashIcon />
|
|
276
|
+
Delete
|
|
277
|
+
<span className="ml-auto text-xs opacity-60">⌘⌫</span>
|
|
278
|
+
</ListItem>
|
|
279
|
+
</ListGroup>
|
|
280
|
+
</List>
|
|
281
|
+
</div>
|
|
282
|
+
),
|
|
283
|
+
parameters: {
|
|
284
|
+
docs: {
|
|
285
|
+
description: {
|
|
286
|
+
story:
|
|
287
|
+
"Organized list with groups, labels, separators, shortcuts, badges, and a sub-trigger for nested navigation.",
|
|
288
|
+
},
|
|
289
|
+
},
|
|
290
|
+
},
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
// 3. Selection Lists
|
|
294
|
+
export const SelectionLists: Story = {
|
|
295
|
+
render: () => {
|
|
296
|
+
const [checkedItems, setCheckedItems] = React.useState<string[]>([
|
|
297
|
+
"item1",
|
|
298
|
+
"item3",
|
|
299
|
+
])
|
|
300
|
+
const [radioValue, setRadioValue] = React.useState("option2")
|
|
301
|
+
|
|
302
|
+
const handleCheckboxChange = (itemId: string, checked: boolean) => {
|
|
303
|
+
setCheckedItems((prev) =>
|
|
304
|
+
checked ? [...prev, itemId] : prev.filter((id) => id !== itemId)
|
|
305
|
+
)
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
return (
|
|
309
|
+
<div className="space-y-8 p-8">
|
|
310
|
+
<h3 className="text-center text-lg font-medium text-white">
|
|
311
|
+
Selection Lists
|
|
312
|
+
</h3>
|
|
313
|
+
|
|
314
|
+
<div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
|
|
315
|
+
{/* Checkbox List */}
|
|
316
|
+
<div className="space-y-4">
|
|
317
|
+
<h4 className="text-sm font-medium text-white/70">
|
|
318
|
+
Multi-Select (Checkbox)
|
|
319
|
+
</h4>
|
|
320
|
+
<List size="default">
|
|
321
|
+
<ListLabel>Choose Features</ListLabel>
|
|
322
|
+
<ListCheckboxItem
|
|
323
|
+
checked={checkedItems.includes("item1")}
|
|
324
|
+
onCheckedChange={(checked) =>
|
|
325
|
+
handleCheckboxChange("item1", checked)
|
|
326
|
+
}
|
|
327
|
+
>
|
|
328
|
+
<FeatureShineIcon />
|
|
329
|
+
Advanced Analytics
|
|
330
|
+
</ListCheckboxItem>
|
|
331
|
+
<ListCheckboxItem
|
|
332
|
+
checked={checkedItems.includes("item2")}
|
|
333
|
+
onCheckedChange={(checked) =>
|
|
334
|
+
handleCheckboxChange("item2", checked)
|
|
335
|
+
}
|
|
336
|
+
>
|
|
337
|
+
<BubbleSparkleIcon />
|
|
338
|
+
Real-time Sync
|
|
339
|
+
</ListCheckboxItem>
|
|
340
|
+
<ListCheckboxItem
|
|
341
|
+
checked={checkedItems.includes("item3")}
|
|
342
|
+
onCheckedChange={(checked) =>
|
|
343
|
+
handleCheckboxChange("item3", checked)
|
|
344
|
+
}
|
|
345
|
+
>
|
|
346
|
+
<LightBulbSimpleIcon />
|
|
347
|
+
AI Suggestions
|
|
348
|
+
</ListCheckboxItem>
|
|
349
|
+
<ListCheckboxItem
|
|
350
|
+
disabled
|
|
351
|
+
checked={checkedItems.includes("item4")}
|
|
352
|
+
onCheckedChange={(checked) =>
|
|
353
|
+
handleCheckboxChange("item4", checked)
|
|
354
|
+
}
|
|
355
|
+
>
|
|
356
|
+
<MaintenanceIcon />
|
|
357
|
+
Premium Feature (Disabled)
|
|
358
|
+
</ListCheckboxItem>
|
|
359
|
+
</List>
|
|
360
|
+
|
|
361
|
+
{checkedItems.length > 0 && (
|
|
362
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-3">
|
|
363
|
+
<p className="text-xs text-white/60">
|
|
364
|
+
Selected: {checkedItems.length} feature
|
|
365
|
+
{checkedItems.length !== 1 ? "s" : ""}
|
|
366
|
+
</p>
|
|
367
|
+
</div>
|
|
368
|
+
)}
|
|
369
|
+
</div>
|
|
370
|
+
|
|
371
|
+
{/* Radio List */}
|
|
372
|
+
<div className="space-y-4">
|
|
373
|
+
<h4 className="text-sm font-medium text-white/70">
|
|
374
|
+
Single Select (Radio)
|
|
375
|
+
</h4>
|
|
376
|
+
<List size="default">
|
|
377
|
+
<ListLabel>Choose Theme</ListLabel>
|
|
378
|
+
<ListRadioGroup value={radioValue} onValueChange={setRadioValue}>
|
|
379
|
+
<ListRadioItem value="option1">
|
|
380
|
+
<EyeOpenIcon />
|
|
381
|
+
Light Theme
|
|
382
|
+
</ListRadioItem>
|
|
383
|
+
<ListRadioItem value="option2">
|
|
384
|
+
<MaintenanceIcon />
|
|
385
|
+
Dark Theme
|
|
386
|
+
</ListRadioItem>
|
|
387
|
+
<ListRadioItem value="option3">
|
|
388
|
+
<FeatureShineIcon />
|
|
389
|
+
Auto Theme
|
|
390
|
+
</ListRadioItem>
|
|
391
|
+
<ListRadioItem value="option4" disabled>
|
|
392
|
+
<BubbleSparkleIcon />
|
|
393
|
+
Custom Theme (Pro)
|
|
394
|
+
</ListRadioItem>
|
|
395
|
+
</ListRadioGroup>
|
|
396
|
+
</List>
|
|
397
|
+
|
|
398
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-3">
|
|
399
|
+
<p className="text-xs text-white/60">
|
|
400
|
+
Selected:{" "}
|
|
401
|
+
{radioValue === "option1"
|
|
402
|
+
? "Light Theme"
|
|
403
|
+
: radioValue === "option2"
|
|
404
|
+
? "Dark Theme"
|
|
405
|
+
: radioValue === "option3"
|
|
406
|
+
? "Auto Theme"
|
|
407
|
+
: "Custom Theme"}
|
|
408
|
+
</p>
|
|
409
|
+
</div>
|
|
410
|
+
</div>
|
|
411
|
+
</div>
|
|
412
|
+
</div>
|
|
413
|
+
)
|
|
414
|
+
},
|
|
415
|
+
parameters: {
|
|
416
|
+
docs: {
|
|
417
|
+
description: {
|
|
418
|
+
story:
|
|
419
|
+
"Interactive selection lists showing checkbox multi-select and radio single-select patterns with state management.",
|
|
420
|
+
},
|
|
421
|
+
},
|
|
422
|
+
},
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
// 4. List Variants
|
|
426
|
+
export const ListVariants: Story = {
|
|
427
|
+
render: () => (
|
|
428
|
+
<div className="space-y-8 p-8">
|
|
429
|
+
<h3 className="text-center text-lg font-medium text-white">
|
|
430
|
+
List Variants
|
|
431
|
+
</h3>
|
|
432
|
+
|
|
433
|
+
<div className="grid grid-cols-1 gap-6 lg:grid-cols-3">
|
|
434
|
+
{/* Default Variant */}
|
|
435
|
+
<div className="space-y-4">
|
|
436
|
+
<h4 className="text-sm font-medium text-white/70">Default</h4>
|
|
437
|
+
<List variant="default" size="default">
|
|
438
|
+
<ListItem>
|
|
439
|
+
<FileChartIcon />
|
|
440
|
+
Default Style
|
|
441
|
+
</ListItem>
|
|
442
|
+
<ListItem selected>
|
|
443
|
+
<ImageIcon />
|
|
444
|
+
Selected Item
|
|
445
|
+
</ListItem>
|
|
446
|
+
<ListItem>
|
|
447
|
+
<MagicBookIcon />
|
|
448
|
+
Regular Item
|
|
449
|
+
</ListItem>
|
|
450
|
+
</List>
|
|
451
|
+
</div>
|
|
452
|
+
|
|
453
|
+
{/* Elevated Variant */}
|
|
454
|
+
<div className="space-y-4">
|
|
455
|
+
<h4 className="text-sm font-medium text-white/70">Elevated</h4>
|
|
456
|
+
<List variant="elevated" size="default">
|
|
457
|
+
<ListItem>
|
|
458
|
+
<FeatureShineIcon />
|
|
459
|
+
Elevated Style
|
|
460
|
+
</ListItem>
|
|
461
|
+
<ListItem selected>
|
|
462
|
+
<BubbleSparkleIcon />
|
|
463
|
+
More Shadow
|
|
464
|
+
</ListItem>
|
|
465
|
+
<ListItem>
|
|
466
|
+
<LightBulbSimpleIcon />
|
|
467
|
+
Premium Feel
|
|
468
|
+
</ListItem>
|
|
469
|
+
</List>
|
|
470
|
+
</div>
|
|
471
|
+
|
|
472
|
+
{/* Flat Variant */}
|
|
473
|
+
<div className="space-y-4">
|
|
474
|
+
<h4 className="text-sm font-medium text-white/70">Flat</h4>
|
|
475
|
+
<List variant="flat" size="default">
|
|
476
|
+
<ListItem>
|
|
477
|
+
<MaintenanceIcon />
|
|
478
|
+
Flat Style
|
|
479
|
+
</ListItem>
|
|
480
|
+
<ListItem selected>
|
|
481
|
+
<EyeOpenIcon />
|
|
482
|
+
Minimal Shadow
|
|
483
|
+
</ListItem>
|
|
484
|
+
<ListItem>
|
|
485
|
+
<SearchIcon />
|
|
486
|
+
Clean Look
|
|
487
|
+
</ListItem>
|
|
488
|
+
</List>
|
|
489
|
+
</div>
|
|
490
|
+
</div>
|
|
491
|
+
</div>
|
|
492
|
+
),
|
|
493
|
+
parameters: {
|
|
494
|
+
docs: {
|
|
495
|
+
description: {
|
|
496
|
+
story:
|
|
497
|
+
"Different visual variants of the list component: default, elevated (more shadow), and flat (minimal shadow).",
|
|
498
|
+
},
|
|
499
|
+
},
|
|
500
|
+
},
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
// 5. List Sizes
|
|
504
|
+
export const ListSizes: Story = {
|
|
505
|
+
render: () => (
|
|
506
|
+
<div className="space-y-8 p-8">
|
|
507
|
+
<h3 className="text-center text-lg font-medium text-white">List Sizes</h3>
|
|
508
|
+
|
|
509
|
+
<div className="grid grid-cols-1 gap-6 lg:grid-cols-2 xl:grid-cols-4">
|
|
510
|
+
{/* Small */}
|
|
511
|
+
<div className="space-y-4">
|
|
512
|
+
<h4 className="text-sm font-medium text-white/70">Small</h4>
|
|
513
|
+
<List size="sm">
|
|
514
|
+
<ListItem size="sm">
|
|
515
|
+
<FileChartIcon />
|
|
516
|
+
Small Item
|
|
517
|
+
</ListItem>
|
|
518
|
+
<ListItem size="sm" selected>
|
|
519
|
+
<ImageIcon />
|
|
520
|
+
Selected
|
|
521
|
+
</ListItem>
|
|
522
|
+
</List>
|
|
523
|
+
</div>
|
|
524
|
+
|
|
525
|
+
{/* Default */}
|
|
526
|
+
<div className="space-y-4">
|
|
527
|
+
<h4 className="text-sm font-medium text-white/70">Default</h4>
|
|
528
|
+
<List size="default">
|
|
529
|
+
<ListItem size="default">
|
|
530
|
+
<MagicBookIcon />
|
|
531
|
+
Default Item
|
|
532
|
+
</ListItem>
|
|
533
|
+
<ListItem size="default" selected>
|
|
534
|
+
<FeatureShineIcon />
|
|
535
|
+
Selected
|
|
536
|
+
</ListItem>
|
|
537
|
+
</List>
|
|
538
|
+
</div>
|
|
539
|
+
|
|
540
|
+
{/* Large */}
|
|
541
|
+
<div className="space-y-4">
|
|
542
|
+
<h4 className="text-sm font-medium text-white/70">Large</h4>
|
|
543
|
+
<List size="lg">
|
|
544
|
+
<ListItem size="lg">
|
|
545
|
+
<BubbleSparkleIcon />
|
|
546
|
+
Large Item
|
|
547
|
+
</ListItem>
|
|
548
|
+
<ListItem size="lg" selected>
|
|
549
|
+
<LightBulbSimpleIcon />
|
|
550
|
+
Selected
|
|
551
|
+
</ListItem>
|
|
552
|
+
</List>
|
|
553
|
+
</div>
|
|
554
|
+
|
|
555
|
+
{/* Extra Large */}
|
|
556
|
+
<div className="space-y-4">
|
|
557
|
+
<h4 className="text-sm font-medium text-white/70">Extra Large</h4>
|
|
558
|
+
<List size="xl">
|
|
559
|
+
<ListItem size="lg">
|
|
560
|
+
<MaintenanceIcon />
|
|
561
|
+
XL Container
|
|
562
|
+
</ListItem>
|
|
563
|
+
<ListItem size="lg" selected>
|
|
564
|
+
<EyeOpenIcon />
|
|
565
|
+
Large Items
|
|
566
|
+
</ListItem>
|
|
567
|
+
</List>
|
|
568
|
+
</div>
|
|
569
|
+
</div>
|
|
570
|
+
</div>
|
|
571
|
+
),
|
|
572
|
+
parameters: {
|
|
573
|
+
docs: {
|
|
574
|
+
description: {
|
|
575
|
+
story:
|
|
576
|
+
"Different size variants affecting the minimum width of list containers and padding of list items.",
|
|
577
|
+
},
|
|
578
|
+
},
|
|
579
|
+
},
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
// 6. Border Variants
|
|
583
|
+
export const BorderVariants: Story = {
|
|
584
|
+
render: () => (
|
|
585
|
+
<div className="space-y-8 p-8">
|
|
586
|
+
<h3 className="text-center text-lg font-medium text-white">
|
|
587
|
+
Border Variants
|
|
588
|
+
</h3>
|
|
589
|
+
|
|
590
|
+
<div className="grid grid-cols-1 gap-6 lg:grid-cols-3 xl:grid-cols-5">
|
|
591
|
+
{/* Default */}
|
|
592
|
+
<div className="space-y-4">
|
|
593
|
+
<h4 className="text-sm font-medium text-white/70">Default</h4>
|
|
594
|
+
<List borderVariant="default">
|
|
595
|
+
<ListItem>
|
|
596
|
+
<FileChartIcon />
|
|
597
|
+
Neutral
|
|
598
|
+
</ListItem>
|
|
599
|
+
<ListItem>
|
|
600
|
+
<ImageIcon />
|
|
601
|
+
Border
|
|
602
|
+
</ListItem>
|
|
603
|
+
</List>
|
|
604
|
+
</div>
|
|
605
|
+
|
|
606
|
+
{/* Success */}
|
|
607
|
+
<div className="space-y-4">
|
|
608
|
+
<h4 className="text-sm font-medium text-white/70">Success</h4>
|
|
609
|
+
<List borderVariant="success">
|
|
610
|
+
<ListItem>
|
|
611
|
+
<BubbleCheckIcon />
|
|
612
|
+
Success
|
|
613
|
+
</ListItem>
|
|
614
|
+
<ListItem>
|
|
615
|
+
<TickIcon />
|
|
616
|
+
Complete
|
|
617
|
+
</ListItem>
|
|
618
|
+
</List>
|
|
619
|
+
</div>
|
|
620
|
+
|
|
621
|
+
{/* Error */}
|
|
622
|
+
<div className="space-y-4">
|
|
623
|
+
<h4 className="text-sm font-medium text-white/70">Error</h4>
|
|
624
|
+
<List borderVariant="error">
|
|
625
|
+
<ListItem>
|
|
626
|
+
<TrashIcon />
|
|
627
|
+
Error
|
|
628
|
+
</ListItem>
|
|
629
|
+
<ListItem>
|
|
630
|
+
<MaintenanceIcon />
|
|
631
|
+
Issues
|
|
632
|
+
</ListItem>
|
|
633
|
+
</List>
|
|
634
|
+
</div>
|
|
635
|
+
|
|
636
|
+
{/* Warning */}
|
|
637
|
+
<div className="space-y-4">
|
|
638
|
+
<h4 className="text-sm font-medium text-white/70">Warning</h4>
|
|
639
|
+
<List borderVariant="warning">
|
|
640
|
+
<ListItem>
|
|
641
|
+
<LightBulbSimpleIcon />
|
|
642
|
+
Warning
|
|
643
|
+
</ListItem>
|
|
644
|
+
<ListItem>
|
|
645
|
+
<MaintenanceIcon />
|
|
646
|
+
Caution
|
|
647
|
+
</ListItem>
|
|
648
|
+
</List>
|
|
649
|
+
</div>
|
|
650
|
+
|
|
651
|
+
{/* Info */}
|
|
652
|
+
<div className="space-y-4">
|
|
653
|
+
<h4 className="text-sm font-medium text-white/70">Info</h4>
|
|
654
|
+
<List borderVariant="info">
|
|
655
|
+
<ListItem>
|
|
656
|
+
<FeatureShineIcon />
|
|
657
|
+
Info
|
|
658
|
+
</ListItem>
|
|
659
|
+
<ListItem>
|
|
660
|
+
<BubbleSparkleIcon />
|
|
661
|
+
Details
|
|
662
|
+
</ListItem>
|
|
663
|
+
</List>
|
|
664
|
+
</div>
|
|
665
|
+
</div>
|
|
666
|
+
|
|
667
|
+
{/* No Border */}
|
|
668
|
+
<div className="mx-auto max-w-md">
|
|
669
|
+
<h4 className="mb-4 text-sm font-medium text-white/70">No Border</h4>
|
|
670
|
+
<List showBorder={false}>
|
|
671
|
+
<ListItem>
|
|
672
|
+
<SearchIcon />
|
|
673
|
+
No top border
|
|
674
|
+
</ListItem>
|
|
675
|
+
<ListItem>
|
|
676
|
+
<EyeOpenIcon />
|
|
677
|
+
Clean look
|
|
678
|
+
</ListItem>
|
|
679
|
+
</List>
|
|
680
|
+
</div>
|
|
681
|
+
</div>
|
|
682
|
+
),
|
|
683
|
+
parameters: {
|
|
684
|
+
docs: {
|
|
685
|
+
description: {
|
|
686
|
+
story:
|
|
687
|
+
"Different border color variants for semantic meaning and option to hide the border entirely.",
|
|
688
|
+
},
|
|
689
|
+
},
|
|
690
|
+
},
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
// 7. Custom Styling
|
|
694
|
+
export const CustomStyling: Story = {
|
|
695
|
+
render: () => (
|
|
696
|
+
<div className="space-y-8 p-8">
|
|
697
|
+
<h3 className="text-center text-lg font-medium text-white">
|
|
698
|
+
Custom Styling
|
|
699
|
+
</h3>
|
|
700
|
+
|
|
701
|
+
<div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
|
|
702
|
+
{/* Custom Classes */}
|
|
703
|
+
<div className="space-y-4">
|
|
704
|
+
<h4 className="text-sm font-medium text-white/70">Custom Classes</h4>
|
|
705
|
+
<List
|
|
706
|
+
className="border-purple-500/30 bg-purple-900/10"
|
|
707
|
+
classes={{
|
|
708
|
+
root: "backdrop-blur-xl",
|
|
709
|
+
border: "bg-gradient-to-r from-purple-500 to-pink-500",
|
|
710
|
+
}}
|
|
711
|
+
borderVariant="info"
|
|
712
|
+
>
|
|
713
|
+
<ListItem
|
|
714
|
+
classes={{
|
|
715
|
+
root: "hover:bg-purple-500/20 text-purple-100",
|
|
716
|
+
}}
|
|
717
|
+
>
|
|
718
|
+
<FeatureShineIcon />
|
|
719
|
+
Purple Theme
|
|
720
|
+
</ListItem>
|
|
721
|
+
<ListItem
|
|
722
|
+
selected
|
|
723
|
+
classes={{
|
|
724
|
+
root: "bg-purple-500/30 text-white",
|
|
725
|
+
}}
|
|
726
|
+
>
|
|
727
|
+
<BubbleSparkleIcon />
|
|
728
|
+
Custom Selected
|
|
729
|
+
</ListItem>
|
|
730
|
+
<ListItem
|
|
731
|
+
classes={{
|
|
732
|
+
root: "hover:bg-purple-500/20 text-purple-100",
|
|
733
|
+
}}
|
|
734
|
+
>
|
|
735
|
+
<MagicBookIcon />
|
|
736
|
+
Magic Item
|
|
737
|
+
</ListItem>
|
|
738
|
+
</List>
|
|
739
|
+
</div>
|
|
740
|
+
|
|
741
|
+
{/* Complex Layout */}
|
|
742
|
+
<div className="space-y-4">
|
|
743
|
+
<h4 className="text-sm font-medium text-white/70">Complex Layout</h4>
|
|
744
|
+
<List variant="elevated" size="lg">
|
|
745
|
+
<ListLabel size="lg">Premium Features</ListLabel>
|
|
746
|
+
<ListItem size="lg">
|
|
747
|
+
<div className="flex items-center gap-3">
|
|
748
|
+
<div className="rounded-full bg-green-500/20 p-2">
|
|
749
|
+
<TickIcon className="size-4 text-green-400" />
|
|
750
|
+
</div>
|
|
751
|
+
<div className="flex-1">
|
|
752
|
+
<div className="font-medium text-white">
|
|
753
|
+
Advanced Analytics
|
|
754
|
+
</div>
|
|
755
|
+
<div className="text-xs text-white/60">
|
|
756
|
+
Deep insights and reporting
|
|
757
|
+
</div>
|
|
758
|
+
</div>
|
|
759
|
+
<Badge color="positive">Active</Badge>
|
|
760
|
+
</div>
|
|
761
|
+
</ListItem>
|
|
762
|
+
<ListItem size="lg">
|
|
763
|
+
<div className="flex items-center gap-3">
|
|
764
|
+
<div className="rounded-full bg-blue-500/20 p-2">
|
|
765
|
+
<FeatureShineIcon className="size-4 text-blue-400" />
|
|
766
|
+
</div>
|
|
767
|
+
<div className="flex-1">
|
|
768
|
+
<div className="font-medium text-white">AI Assistant</div>
|
|
769
|
+
<div className="text-xs text-white/60">
|
|
770
|
+
Intelligent automation
|
|
771
|
+
</div>
|
|
772
|
+
</div>
|
|
773
|
+
<Badge color="info">Beta</Badge>
|
|
774
|
+
</div>
|
|
775
|
+
</ListItem>
|
|
776
|
+
<ListItem size="lg" disabled>
|
|
777
|
+
<div className="flex items-center gap-3">
|
|
778
|
+
<div className="rounded-full bg-gray-500/20 p-2">
|
|
779
|
+
<LightBulbSimpleIcon className="size-4 text-gray-400" />
|
|
780
|
+
</div>
|
|
781
|
+
<div className="flex-1">
|
|
782
|
+
<div className="font-medium">Custom Workflows</div>
|
|
783
|
+
<div className="text-xs text-white/40">Coming soon</div>
|
|
784
|
+
</div>
|
|
785
|
+
<Badge color="neutral">Soon</Badge>
|
|
786
|
+
</div>
|
|
787
|
+
</ListItem>
|
|
788
|
+
</List>
|
|
789
|
+
</div>
|
|
790
|
+
</div>
|
|
791
|
+
</div>
|
|
792
|
+
),
|
|
793
|
+
parameters: {
|
|
794
|
+
docs: {
|
|
795
|
+
description: {
|
|
796
|
+
story:
|
|
797
|
+
"Examples of custom styling using classes prop and complex layouts with rich content, badges, and custom color schemes.",
|
|
798
|
+
},
|
|
799
|
+
},
|
|
800
|
+
},
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
// 8. Interactive Showcase
|
|
804
|
+
export const InteractiveShowcase: Story = {
|
|
805
|
+
render: () => {
|
|
806
|
+
const [selectedItems, setSelectedItems] = React.useState<string[]>([
|
|
807
|
+
"item2",
|
|
808
|
+
])
|
|
809
|
+
const [checkedFeatures, setCheckedFeatures] = React.useState<string[]>([
|
|
810
|
+
"analytics",
|
|
811
|
+
])
|
|
812
|
+
const [theme, setTheme] = React.useState("dark")
|
|
813
|
+
|
|
814
|
+
const handleItemSelect = (itemId: string) => {
|
|
815
|
+
setSelectedItems([itemId])
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
const handleFeatureToggle = (featureId: string, checked: boolean) => {
|
|
819
|
+
setCheckedFeatures((prev) =>
|
|
820
|
+
checked ? [...prev, featureId] : prev.filter((id) => id !== featureId)
|
|
821
|
+
)
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
return (
|
|
825
|
+
<div className="space-y-8 p-8">
|
|
826
|
+
<h3 className="text-center text-lg font-medium text-white">
|
|
827
|
+
Interactive Showcase
|
|
828
|
+
</h3>
|
|
829
|
+
|
|
830
|
+
<div className="grid grid-cols-1 gap-8 lg:grid-cols-3">
|
|
831
|
+
{/* Navigation List */}
|
|
832
|
+
<div className="space-y-4">
|
|
833
|
+
<h4 className="text-sm font-medium text-white/70">Navigation</h4>
|
|
834
|
+
<List>
|
|
835
|
+
<ListLabel>Main Menu</ListLabel>
|
|
836
|
+
<ListItem
|
|
837
|
+
selected={selectedItems.includes("item1")}
|
|
838
|
+
onClick={() => handleItemSelect("item1")}
|
|
839
|
+
className="cursor-pointer"
|
|
840
|
+
>
|
|
841
|
+
<FileChartIcon />
|
|
842
|
+
Dashboard
|
|
843
|
+
</ListItem>
|
|
844
|
+
<ListItem
|
|
845
|
+
selected={selectedItems.includes("item2")}
|
|
846
|
+
onClick={() => handleItemSelect("item2")}
|
|
847
|
+
className="cursor-pointer"
|
|
848
|
+
>
|
|
849
|
+
<ImageIcon />
|
|
850
|
+
Media Library
|
|
851
|
+
<Badge color="info" className="ml-auto">
|
|
852
|
+
12
|
|
853
|
+
</Badge>
|
|
854
|
+
</ListItem>
|
|
855
|
+
<ListItem
|
|
856
|
+
selected={selectedItems.includes("item3")}
|
|
857
|
+
onClick={() => handleItemSelect("item3")}
|
|
858
|
+
className="cursor-pointer"
|
|
859
|
+
>
|
|
860
|
+
<MaintenanceIcon />
|
|
861
|
+
Settings
|
|
862
|
+
</ListItem>
|
|
863
|
+
<ListSeparator />
|
|
864
|
+
<ListSubTrigger>
|
|
865
|
+
<BubbleSparkleIcon />
|
|
866
|
+
Advanced Options
|
|
867
|
+
</ListSubTrigger>
|
|
868
|
+
</List>
|
|
869
|
+
</div>
|
|
870
|
+
|
|
871
|
+
{/* Feature Selection */}
|
|
872
|
+
<div className="space-y-4">
|
|
873
|
+
<h4 className="text-sm font-medium text-white/70">Features</h4>
|
|
874
|
+
<List borderVariant="success">
|
|
875
|
+
<ListLabel>Enable Features</ListLabel>
|
|
876
|
+
<ListCheckboxItem
|
|
877
|
+
checked={checkedFeatures.includes("analytics")}
|
|
878
|
+
onCheckedChange={(checked) =>
|
|
879
|
+
handleFeatureToggle("analytics", checked)
|
|
880
|
+
}
|
|
881
|
+
>
|
|
882
|
+
<FeatureShineIcon />
|
|
883
|
+
Analytics
|
|
884
|
+
</ListCheckboxItem>
|
|
885
|
+
<ListCheckboxItem
|
|
886
|
+
checked={checkedFeatures.includes("ai")}
|
|
887
|
+
onCheckedChange={(checked) =>
|
|
888
|
+
handleFeatureToggle("ai", checked)
|
|
889
|
+
}
|
|
890
|
+
>
|
|
891
|
+
<LightBulbSimpleIcon />
|
|
892
|
+
AI Features
|
|
893
|
+
</ListCheckboxItem>
|
|
894
|
+
<ListCheckboxItem
|
|
895
|
+
checked={checkedFeatures.includes("sync")}
|
|
896
|
+
onCheckedChange={(checked) =>
|
|
897
|
+
handleFeatureToggle("sync", checked)
|
|
898
|
+
}
|
|
899
|
+
>
|
|
900
|
+
<BubbleSparkleIcon />
|
|
901
|
+
Real-time Sync
|
|
902
|
+
</ListCheckboxItem>
|
|
903
|
+
</List>
|
|
904
|
+
</div>
|
|
905
|
+
|
|
906
|
+
{/* Theme Selection */}
|
|
907
|
+
<div className="space-y-4">
|
|
908
|
+
<h4 className="text-sm font-medium text-white/70">Theme</h4>
|
|
909
|
+
<List borderVariant="info">
|
|
910
|
+
<ListLabel>Appearance</ListLabel>
|
|
911
|
+
<ListRadioGroup value={theme}>
|
|
912
|
+
<ListRadioItem value="light" onSelect={setTheme}>
|
|
913
|
+
<EyeOpenIcon />
|
|
914
|
+
Light Theme
|
|
915
|
+
</ListRadioItem>
|
|
916
|
+
<ListRadioItem value="dark" onSelect={setTheme}>
|
|
917
|
+
<MaintenanceIcon />
|
|
918
|
+
Dark Theme
|
|
919
|
+
</ListRadioItem>
|
|
920
|
+
<ListRadioItem value="auto" onSelect={setTheme}>
|
|
921
|
+
<FeatureShineIcon />
|
|
922
|
+
Auto Theme
|
|
923
|
+
</ListRadioItem>
|
|
924
|
+
</ListRadioGroup>
|
|
925
|
+
</List>
|
|
926
|
+
</div>
|
|
927
|
+
</div>
|
|
928
|
+
|
|
929
|
+
{/* Status Display */}
|
|
930
|
+
<div className="mx-auto max-w-2xl rounded-lg border border-white/10 bg-white/5 p-4">
|
|
931
|
+
<h4 className="mb-3 text-sm font-medium text-white">Current State</h4>
|
|
932
|
+
<div className="grid grid-cols-1 gap-3 text-xs text-white/60 md:grid-cols-3">
|
|
933
|
+
<div>
|
|
934
|
+
<strong>Selected Page:</strong>{" "}
|
|
935
|
+
{selectedItems.includes("item1")
|
|
936
|
+
? "Dashboard"
|
|
937
|
+
: selectedItems.includes("item2")
|
|
938
|
+
? "Media Library"
|
|
939
|
+
: selectedItems.includes("item3")
|
|
940
|
+
? "Settings"
|
|
941
|
+
: "None"}
|
|
942
|
+
</div>
|
|
943
|
+
<div>
|
|
944
|
+
<strong>Enabled Features:</strong>{" "}
|
|
945
|
+
{checkedFeatures.length > 0 ? checkedFeatures.join(", ") : "None"}
|
|
946
|
+
</div>
|
|
947
|
+
<div>
|
|
948
|
+
<strong>Theme:</strong> {theme}
|
|
949
|
+
</div>
|
|
950
|
+
</div>
|
|
951
|
+
</div>
|
|
952
|
+
</div>
|
|
953
|
+
)
|
|
954
|
+
},
|
|
955
|
+
parameters: {
|
|
956
|
+
docs: {
|
|
957
|
+
description: {
|
|
958
|
+
story:
|
|
959
|
+
"Fully interactive showcase demonstrating navigation selection, feature toggles, and theme selection with real-time state updates.",
|
|
960
|
+
},
|
|
961
|
+
},
|
|
962
|
+
},
|
|
963
|
+
}
|