aural-ui 3.0.7 → 4.1.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.
Files changed (183) hide show
  1. package/dist/components/aspect-ratio/AspectRatio.stories.tsx +290 -1199
  2. package/dist/components/avatar/Avatar.stories.tsx +235 -237
  3. package/dist/components/badge/Badge.stories.tsx +379 -116
  4. package/dist/components/banner/Banner.stories.tsx +445 -391
  5. package/dist/components/breadcrumb/Breadcrumb.stories.tsx +453 -199
  6. package/dist/components/button/Button.stories.tsx +585 -230
  7. package/dist/components/button/index.tsx +7 -7
  8. package/dist/components/card/Card.stories.tsx +619 -301
  9. package/dist/components/char-count/CharCount.stories.tsx +350 -248
  10. package/dist/components/checkbox/Checkbox.stories.tsx +309 -167
  11. package/dist/components/chip/Chip.stories.tsx +362 -168
  12. package/dist/components/circular-loader/CircularLoader.stories.tsx +221 -620
  13. package/dist/components/clamp-lines/ClampLines.stories.tsx +246 -117
  14. package/dist/components/collapsible/Collapsible.stories.tsx +391 -252
  15. package/dist/components/command/Command.stories.tsx +533 -856
  16. package/dist/components/dialog/Dialog.stories.tsx +505 -949
  17. package/dist/components/divider/Divider.stories.tsx +265 -502
  18. package/dist/components/dot-loader/DotLoader.stories.tsx +256 -257
  19. package/dist/components/drawer/Drawer.stories.tsx +659 -993
  20. package/dist/components/drawer/index.tsx +3 -3
  21. package/dist/components/dropdown/Dropdown.stories.tsx +643 -1018
  22. package/dist/components/form/Form.stories.tsx +560 -274
  23. package/dist/components/helper-text/HelperText.stories.tsx +199 -200
  24. package/dist/components/hover-card/HoverCard.stories.tsx +318 -1221
  25. package/dist/components/icon-button/IconButton.stories.tsx +837 -194
  26. package/dist/components/if-else/if-else.stories.tsx +370 -83
  27. package/dist/components/input/Input.stories.tsx +436 -368
  28. package/dist/components/label/Label.stories.tsx +156 -154
  29. package/dist/components/list/List.stories.tsx +485 -822
  30. package/dist/components/marquee/Marquee.stories.tsx +356 -694
  31. package/dist/components/otp-inputs/OtpInputs.stories.tsx +352 -410
  32. package/dist/components/overlay/Overlay.stories.tsx +452 -818
  33. package/dist/components/overlay/index.tsx +4 -4
  34. package/dist/components/pagination/Pagination.stories.tsx +721 -210
  35. package/dist/components/popover/Popover.stories.tsx +484 -873
  36. package/dist/components/radio/Radio.stories.tsx +432 -124
  37. package/dist/components/resizable/Resizable.stories.tsx +496 -752
  38. package/dist/components/scroll-area/ScrollArea.stories.tsx +384 -1006
  39. package/dist/components/search/Search.stories.tsx +314 -575
  40. package/dist/components/select/Select.stories.tsx +684 -787
  41. package/dist/components/sheet/Sheet.stories.tsx +671 -936
  42. package/dist/components/skelton/Skelton.stories.tsx +230 -764
  43. package/dist/components/slider/Slider.stories.tsx +384 -737
  44. package/dist/components/stepper/Stepper.stories.tsx +371 -514
  45. package/dist/components/switch/Switch.stories.tsx +461 -208
  46. package/dist/components/switch-case/SwitchCase.stories.tsx +367 -188
  47. package/dist/components/table/Table.stories.tsx +770 -914
  48. package/dist/components/tabs/Tabs.stories.tsx +459 -1400
  49. package/dist/components/tag/Tag.stories.tsx +714 -542
  50. package/dist/components/textarea/TextArea.stories.tsx +621 -562
  51. package/dist/components/thumbnail-tags/ThumbnailTags.stories.tsx +228 -148
  52. package/dist/components/toast/Toast.stories.tsx +452 -1333
  53. package/dist/components/toggle/Toggle.stories.tsx +488 -909
  54. package/dist/components/tooltip/Tooltip.stories.tsx +344 -1372
  55. package/dist/components/typography/Typography.stories.tsx +406 -89
  56. package/dist/hooks/use-change-state/UseChangeState.stories.tsx +309 -606
  57. package/dist/hooks/use-previous/UsePrevious.stories.tsx +367 -917
  58. package/dist/hooks/use-standalone-pagination/UseStandalonePagination.stories.tsx +639 -867
  59. package/dist/icons/Icons.stories.tsx +0 -12
  60. package/dist/icons/ai-avatar-icon/AiAvatarIcon.stories.tsx +226 -1013
  61. package/dist/icons/alert-icon/AlertIcon.stories.tsx +109 -929
  62. package/dist/icons/all-icons.tsx +124 -87
  63. package/dist/icons/angle-down-icon/AngleDownIcon.stories.tsx +140 -971
  64. package/dist/icons/apple-logo-icon/AppleLogoIcon.stories.tsx +148 -888
  65. package/dist/icons/arrow-box-left-icon/ArrowBoxLeftIcon.stories.tsx +135 -1019
  66. package/dist/icons/arrow-corner-up-left-icon/ArrowCornerUpLeftIcon.stories.tsx +137 -953
  67. package/dist/icons/arrow-corner-up-right-icon/ArrowCornerUpRightIcon.stories.tsx +138 -997
  68. package/dist/icons/arrow-left-icon/ArrowLeftIcon.stories.tsx +136 -942
  69. package/dist/icons/arrow-right-icon/ArrowRightIcon.stories.tsx +148 -1092
  70. package/dist/icons/arrow-right-up-icon/ArrowRightUpIcon.stories.tsx +146 -1211
  71. package/dist/icons/art-board-icon/ArtBoardIcon.stories.tsx +126 -615
  72. package/dist/icons/audio-bar-icon/AudioBarIcon.stories.tsx +144 -1164
  73. package/dist/icons/backward-ten-seconds-icon/BackwardTenSecondsIcon.stories.tsx +167 -985
  74. package/dist/icons/bubble-check-icon/BubbleCheckIcon.stories.tsx +122 -1179
  75. package/dist/icons/bubble-crossed-icon/BubbleCrossedIcon.stories.tsx +124 -1168
  76. package/dist/icons/bubble-sparkle-icon/BubbleSparkleIcon.stories.tsx +119 -850
  77. package/dist/icons/camera-icon/CameraIcon.stories.tsx +112 -1213
  78. package/dist/icons/capital-a-letter-icon/CapitalALetterIcon.stories.tsx +117 -934
  79. package/dist/icons/chevron-double-left-icon/ChevronDoubleLeftIcon.stories.tsx +160 -961
  80. package/dist/icons/chevron-double-right-icon/ChevronDoubleRightIcon.stories.tsx +163 -961
  81. package/dist/icons/chevron-down-icon/ChevronDownIcon.stories.tsx +144 -942
  82. package/dist/icons/chevron-left-icon/ChevronLeftIcon.stories.tsx +129 -966
  83. package/dist/icons/chevron-right-icon/ChevronRightIcon.stories.tsx +147 -964
  84. package/dist/icons/chevron-up-icon/ChevronUpIcon.stories.tsx +145 -975
  85. package/dist/icons/circle-tick-icon/CircleTickIcon.stories.tsx +150 -1142
  86. package/dist/icons/circular-play-icon/CircularPlayIcon.stories.tsx +114 -461
  87. package/dist/icons/coin-icon/CoinIcon.stories.tsx +124 -1322
  88. package/dist/icons/coin-toons-icon/CoinToonsIcon.stories.tsx +117 -1318
  89. package/dist/icons/column-wide-add-icon/ColumnWideAddIcon.stories.tsx +114 -903
  90. package/dist/icons/command-icon/CommandIcon.stories.tsx +127 -1042
  91. package/dist/icons/copy-icon/CopyIcon.stories.tsx +123 -962
  92. package/dist/icons/cross-circle-icon/CrossCircleIcon.stories.tsx +147 -999
  93. package/dist/icons/cross-icon/CrossIcon.stories.tsx +139 -960
  94. package/dist/icons/download-icon/DownloadIcon.stories.tsx +126 -820
  95. package/dist/icons/edit-big-icon/EditBigIcon.stories.tsx +124 -1031
  96. package/dist/icons/email-icon/EmailIcon.stories.tsx +115 -936
  97. package/dist/icons/expand-icon/ExpandIcon.stories.tsx +112 -1111
  98. package/dist/icons/eye-close-icon/EyeCloseIcon.stories.tsx +144 -1025
  99. package/dist/icons/eye-open-icon/EyeOpenIcon.stories.tsx +143 -1036
  100. package/dist/icons/feature-shine-icon/FeatureShineIcon.stories.tsx +127 -1011
  101. package/dist/icons/file-chart-icon/FileChartIcon.stories.tsx +126 -1056
  102. package/dist/icons/file-text-icon/FileTextIcon.stories.tsx +125 -614
  103. package/dist/icons/filter-bar-row-icon/FilterBarRowIcon.stories.tsx +119 -1050
  104. package/dist/icons/forward-ten-seconds-icon/ForwardTenSecondsIcon.stories.tsx +169 -989
  105. package/dist/icons/git-branch-icon/GitBranchIcon.stories.tsx +115 -1145
  106. package/dist/icons/git-fork-icon/GitForkIcon.stories.tsx +115 -1122
  107. package/dist/icons/globe-icon/GlobeIcon.stories.tsx +130 -313
  108. package/dist/icons/google-logo-icon/GoogleLogoIcon.stories.tsx +145 -940
  109. package/dist/icons/grip-vertical-icon/GripVerticalIcon.stories.tsx +119 -1174
  110. package/dist/icons/head-icon/HeadIcon.stories.tsx +111 -916
  111. package/dist/icons/heart-icon/HeartIcon.stories.tsx +120 -1019
  112. package/dist/icons/image-avatar-sparkle-icon/ImageAvatarSparkleIcon.stories.tsx +119 -683
  113. package/dist/icons/image-icon/ImageIcon.stories.tsx +105 -1121
  114. package/dist/icons/import-folder-icon/ImportFolderIcon.stories.tsx +111 -1192
  115. package/dist/icons/import-left-arrow-folder-icon/ImportLeftArrowFolderIcon.stories.tsx +136 -1256
  116. package/dist/icons/indian-flag-icon/IndianFlagIcon.stories.tsx +159 -962
  117. package/dist/icons/instagram-icon/InstagramIcon.stories.tsx +161 -1385
  118. package/dist/icons/layout-column-icon/LayoutColumnIcon.stories.tsx +124 -972
  119. package/dist/icons/layout-left-icon/LayoutLeftIcon.stories.tsx +119 -948
  120. package/dist/icons/layout-right-icon/LayoutRightIcon.stories.tsx +119 -942
  121. package/dist/icons/light-bulb-simple-icon/LightBulbSimpleIcon.stories.tsx +108 -1215
  122. package/dist/icons/linked-in-icon/LinkedInIcon.stories.tsx +154 -1517
  123. package/dist/icons/magic-book-icon/MagicBookIcon.stories.tsx +110 -1188
  124. package/dist/icons/magic-edit-icon/MagicEditIcon.stories.tsx +119 -678
  125. package/dist/icons/maintenance-icon/MaintenanceIcon.stories.tsx +123 -1184
  126. package/dist/icons/message-icon/MessageIcon.stories.tsx +114 -538
  127. package/dist/icons/minimize-icon/MinimizeIcon.stories.tsx +116 -1158
  128. package/dist/icons/moon-icon/MoonIcon.stories.tsx +120 -536
  129. package/dist/icons/move-horizontal-icon/MoveHorizontalIcon.stories.tsx +109 -1184
  130. package/dist/icons/move-vertical-icon/MoveVerticalIcon.stories.tsx +115 -1134
  131. package/dist/icons/musical-note-icon/MusicalNoteIcon.stories.tsx +119 -971
  132. package/dist/icons/notepad-icon/NotepadIcon.stories.tsx +111 -1100
  133. package/dist/icons/notes-icon/NotesIcon.stories.tsx +119 -1101
  134. package/dist/icons/page-search-icon/PageSearchIcon.stories.tsx +109 -1111
  135. package/dist/icons/page-text-icon/PageTextIcon.stories.tsx +122 -684
  136. package/dist/icons/paint-roll-icon/PaintRollIcon.stories.tsx +113 -954
  137. package/dist/icons/paper-plane-icon/PaperPlaneIcon.stories.tsx +112 -877
  138. package/dist/icons/pause-icon/PauseIcon.stories.tsx +113 -1000
  139. package/dist/icons/pencil-icon/PencilIcon.stories.tsx +115 -1070
  140. package/dist/icons/phone-icon/PhoneIcon.stories.tsx +115 -978
  141. package/dist/icons/plus-icon/PlusIcon.stories.tsx +106 -1093
  142. package/dist/icons/pocket-studio-icon/PocketStudioIcon.stories.tsx +107 -829
  143. package/dist/icons/scroll-down-icon/ScrollDownIcon.stories.tsx +102 -469
  144. package/dist/icons/search-icon/SearchIcon.stories.tsx +111 -1124
  145. package/dist/icons/setting-icon/SettingIcon.stories.tsx +107 -970
  146. package/dist/icons/share-icon/ShareIcon.stories.tsx +120 -1025
  147. package/dist/icons/shield-icon/ShieldIcon.stories.tsx +117 -931
  148. package/dist/icons/site-logo-icon/SiteLogoIcon.stories.tsx +137 -1104
  149. package/dist/icons/skip-backward-icon/SkipBackwardIcon.stories.tsx +172 -982
  150. package/dist/icons/skip-forward-icon/SkipForwardIcon.stories.tsx +164 -983
  151. package/dist/icons/sparkles-soft-icon/SparklesSoftIcon.stories.tsx +105 -958
  152. package/dist/icons/spinner-gradient-icon/SpinnerGradientIcon.stories.tsx +158 -580
  153. package/dist/icons/spinner-gradient-icon/index.tsx +6 -1
  154. package/dist/icons/spinner-solid-icon/SpinnerSolidIcon.stories.tsx +158 -587
  155. package/dist/icons/spinner-solid-icon/index.tsx +6 -1
  156. package/dist/icons/spinner-solid-neutral-icon/SpinnerSolidINeutralcon.stories.tsx +146 -682
  157. package/dist/icons/spinner-solid-neutral-icon/index.tsx +1 -1
  158. package/dist/icons/star-icon/StarIcon.stories.tsx +124 -904
  159. package/dist/icons/store-coin-icon/StoreCoinIcon.stories.tsx +112 -964
  160. package/dist/icons/suggestion-icon/SuggestionIcon.stories.tsx +116 -852
  161. package/dist/icons/sun-icon/SunIcon.stories.tsx +120 -831
  162. package/dist/icons/text-color-icon/TextColorIcon.stories.tsx +116 -950
  163. package/dist/icons/text-indicator-icon/TextIndicatorIcon.stories.tsx +123 -980
  164. package/dist/icons/threads-icon/ThreadsIcon.stories.tsx +156 -1427
  165. package/dist/icons/tick-circle-icon/TickCircleIcon.stories.tsx +146 -1142
  166. package/dist/icons/tick-icon/TickIcon.stories.tsx +145 -1276
  167. package/dist/icons/trash-icon/TrashIcon.stories.tsx +108 -933
  168. package/dist/icons/twitter-x-icon/TwitterXIcon.stories.tsx +157 -1402
  169. package/dist/icons/upload-icon/UploadIcon.stories.tsx +115 -889
  170. package/dist/icons/vertical-menu-icon/VerticalMenuIcon.stories.tsx +118 -984
  171. package/dist/icons/video-play-list-icon/VideoPlaylistIcon.stories.tsx +125 -1049
  172. package/dist/icons/voice-playing-icon/VoicePlayingIcon.stories.tsx +123 -1356
  173. package/dist/icons/volume-full-icon/VolumeFullIcon.stories.tsx +110 -1171
  174. package/dist/icons/volume-half-icon/VolumeHalfIcon.stories.tsx +112 -1093
  175. package/dist/icons/volume-off-icon/VolumeOffIcon.stories.tsx +115 -1087
  176. package/dist/icons/warning-icon/WarningIcon.stories.tsx +122 -1046
  177. package/dist/icons/youtube-icon/YoutubeIcon.stories.tsx +161 -936
  178. package/dist/index.cjs +84 -84
  179. package/dist/index.js +84 -84
  180. package/dist/styles/aural-all-theme.css +1222 -0
  181. package/dist/styles/{aural-theme.css → aural-dark-theme.css} +15 -3
  182. package/dist/styles/aural-light-theme.css +1047 -0
  183. package/package.json +1 -1
@@ -1,6 +1,8 @@
1
1
  import React from "react"
2
2
  import type { Meta, StoryObj } from "@storybook/react-vite"
3
3
 
4
+ import { AuralComponentDocsPage } from "src/ui/story-spec/components/component-story-docs-page"
5
+
4
6
  import { Divider } from "."
5
7
 
6
8
  const meta: Meta<typeof Divider> = {
@@ -8,93 +10,29 @@ const meta: Meta<typeof Divider> = {
8
10
  component: Divider,
9
11
  parameters: {
10
12
  layout: "centered",
11
- backgrounds: {
12
- default: "dark",
13
- values: [
14
- { name: "dark", value: "#0a0a0a" },
15
- { name: "light", value: "#ffffff" },
16
- ],
17
- },
18
13
  docs: {
19
14
  description: {
20
- component: `
21
- A versatile divider component built on Radix UI Divider with dark theme optimization and multiple visual styles.
22
-
23
- ## Overview
24
-
25
- The Divider component provides clear visual separation between content sections, improving layout organization and readability. It supports multiple variants including solid, stylized, and dashed styles with flexible sizing and orientation options.
26
-
27
- ## Features
28
- - **Multiple Variants**: Primary, secondary, stylised, and dashed styles
29
- - **Flexible Sizing**: Four size options from thin to large
30
- - **Dual Orientation**: Horizontal and vertical layouts
31
- - **Dark Theme Optimized**: Designed for dark interfaces
32
- - **Accessibility Ready**: Built on Radix UI Divider primitive
33
- - **Stylised Option**: Includes decorative audio bar icon
34
- - **Dashed Style**: Perfect for subtle separations and grouped content
35
-
36
- ## Design Tokens
37
- - Uses \`--fm-divider-primary\`, \`--fm-divider-secondary\`, \`--fm-divider-tertiary\` color tokens
38
- - Responsive sizing with consistent visual hierarchy
39
- - Semantic color mapping for different use cases
40
-
41
- ## Usage
42
-
43
- ### Basic Divider
44
- \`\`\`tsx
45
- import { Divider } from '@/ui/components/divider'
46
-
47
- export default function Example() {
48
- return (
49
- <div className="space-y-4">
50
- <p>Content above</p>
51
- <Divider />
52
- <p>Content below</p>
53
- </div>
54
- )
55
- }
56
- \`\`\`
57
-
58
- ### Dashed Divider
59
- \`\`\`tsx
60
- export default function DashedExample() {
61
- return (
62
- <div className="space-y-4">
63
- <h3>Section Title</h3>
64
- <Divider variant="dashed" />
65
- <p>Section content with subtle separation</p>
66
- </div>
67
- )
68
- }
69
- \`\`\`
70
-
71
- ### Vertical Divider
72
- \`\`\`tsx
73
- export default function VerticalExample() {
74
- return (
75
- <div className="flex items-center gap-4">
76
- <span>Item 1</span>
77
- <Divider orientation="vertical" className="h-6" />
78
- <span>Item 2</span>
79
- </div>
80
- )
81
- }
82
- \`\`\`
83
-
84
- ### Stylised Divider
85
- \`\`\`tsx
86
- export default function StylisedExample() {
87
- return (
88
- <div className="space-y-6">
89
- <section>Main content section</section>
90
- <Divider variant="stylised" />
91
- <section>Next content section</section>
92
- </div>
93
- )
94
- }
95
- \`\`\`
96
- `,
15
+ component:
16
+ "A versatile divider built on Radix UI Separator with four visual variants (primary, secondary, stylised, dashed), four size steps, and horizontal/vertical orientation. The stylised variant renders a decorative audio-bar icon, making it ideal for section breaks in audio streaming interfaces.",
97
17
  },
18
+ page: () => (
19
+ <AuralComponentDocsPage
20
+ features={[
21
+ {
22
+ title: "4 Visual Variants",
23
+ description: "Primary to stylised",
24
+ },
25
+ {
26
+ title: "Orientations",
27
+ description: "Horizontal or vertical",
28
+ },
29
+ {
30
+ title: "Size Steps",
31
+ description: "Hairline to bold",
32
+ },
33
+ ]}
34
+ />
35
+ ),
98
36
  },
99
37
  },
100
38
  tags: ["autodocs"],
@@ -102,7 +40,7 @@ export default function StylisedExample() {
102
40
  variant: {
103
41
  control: "select",
104
42
  options: ["primary", "secondary", "stylised", "dashed"],
105
- description: "The visual style of the divider",
43
+ description: "Visual style of the divider.",
106
44
  table: {
107
45
  type: { summary: "string" },
108
46
  defaultValue: { summary: "primary" },
@@ -111,7 +49,7 @@ export default function StylisedExample() {
111
49
  size: {
112
50
  control: "select",
113
51
  options: ["half_default", "full_default", "full_medium", "full_large"],
114
- description: "The size/thickness of the divider",
52
+ description: "Thickness / extent of the divider line.",
115
53
  table: {
116
54
  type: { summary: "string" },
117
55
  defaultValue: { summary: "full_default" },
@@ -120,7 +58,7 @@ export default function StylisedExample() {
120
58
  orientation: {
121
59
  control: "select",
122
60
  options: ["horizontal", "vertical"],
123
- description: "The orientation of the divider",
61
+ description: "Direction of the divider.",
124
62
  table: {
125
63
  type: { summary: "string" },
126
64
  defaultValue: { summary: "horizontal" },
@@ -129,7 +67,7 @@ export default function StylisedExample() {
129
67
  decorative: {
130
68
  control: "boolean",
131
69
  description:
132
- "Whether the Divider is decorative (hidden from screen readers)",
70
+ "When true the element is hidden from the accessibility tree.",
133
71
  table: {
134
72
  type: { summary: "boolean" },
135
73
  defaultValue: { summary: "true" },
@@ -137,18 +75,12 @@ export default function StylisedExample() {
137
75
  },
138
76
  className: {
139
77
  control: "text",
140
- description: "Additional CSS classes for custom styling",
141
- table: {
142
- type: { summary: "string" },
143
- },
78
+ description: "Extra classes applied to the separator element.",
144
79
  },
145
80
  wrapperClassName: {
146
81
  control: "text",
147
82
  description:
148
- "CSS classes for the wrapper element (used with stylised variant)",
149
- table: {
150
- type: { summary: "string" },
151
- },
83
+ "Extra classes applied to the outer wrapper (used by the stylised variant to position the audio-bar icon).",
152
84
  },
153
85
  },
154
86
  }
@@ -156,451 +88,299 @@ export default function StylisedExample() {
156
88
  export default meta
157
89
  type Story = StoryObj<typeof Divider>
158
90
 
159
- export const Primary: Story = {
160
- args: {
161
- variant: "primary",
162
- size: "full_default",
163
- className: "my-4 min-w-96",
164
- },
165
- parameters: {
166
- docs: {
167
- description: {
168
- story:
169
- "The default primary divider with medium opacity, perfect for standard content separation.",
170
- },
171
- },
172
- },
173
- }
91
+ // ─── 1. AllVariants ──────────────────────────────────────────────────────────
174
92
 
175
- export const Secondary: Story = {
176
- args: {
177
- variant: "secondary",
178
- size: "full_default",
179
- className: "my-4 min-w-96",
180
- },
181
- parameters: {
182
- docs: {
183
- description: {
184
- story:
185
- "A lighter secondary divider for subtle separations within grouped content.",
93
+ export const AllVariants: Story = {
94
+ render: () => {
95
+ const variants = [
96
+ {
97
+ key: "primary",
98
+ label: "Primary",
99
+ desc: "Standard line for main content separation",
186
100
  },
187
- },
188
- },
189
- }
190
-
191
- export const Dashed: Story = {
192
- args: {
193
- variant: "dashed",
194
- size: "full_default",
195
- className: "my-4 min-w-96",
196
- },
197
- parameters: {
198
- docs: {
199
- description: {
200
- story:
201
- "A dashed divider style perfect for indicating temporary or conditional separations.",
101
+ {
102
+ key: "secondary",
103
+ label: "Secondary",
104
+ desc: "Subtler line for related-content groups",
202
105
  },
203
- },
204
- },
205
- }
206
-
207
- export const Stylised: Story = {
208
- args: {
209
- variant: "stylised",
210
- size: "full_default",
211
- className: "my-4 min-w-96",
212
- },
213
- parameters: {
214
- docs: {
215
- description: {
216
- story:
217
- "A decorative divider with an audio bar icon, ideal for section breaks in audio/media interfaces.",
106
+ {
107
+ key: "stylised",
108
+ label: "Stylised",
109
+ desc: "Decorative audio-bar accent for section breaks",
218
110
  },
219
- },
220
- },
221
- }
222
-
223
- export const SizeVariations: Story = {
224
- render: () => (
225
- <div className="w-full max-w-2xl space-y-8 rounded-lg bg-gray-900 p-6">
226
- <div className="text-center">
227
- <h3 className="mb-2 text-lg font-medium text-white">Size Variations</h3>
228
- <p className="text-sm text-white/60">
229
- Different thickness options for various use cases
230
- </p>
231
- </div>
232
-
233
- <div className="space-y-6">
234
- {(
235
- [
236
- {
237
- size: "half_default",
238
- label: "Half Default",
239
- description: "50% width, minimal thickness",
240
- },
241
- {
242
- size: "full_default",
243
- label: "Full Default",
244
- description: "Standard thickness for most use cases",
245
- },
246
- {
247
- size: "full_medium",
248
- label: "Full Medium",
249
- description: "Medium thickness for emphasis",
250
- },
251
- {
252
- size: "full_large",
253
- label: "Full Large",
254
- description: "Bold thickness for strong separation",
255
- },
256
- ] as const
257
- ).map((item) => (
258
- <div key={item.size} className="space-y-3">
259
- <div className="flex items-center justify-between">
260
- <h4 className="text-sm font-medium text-white">{item.label}</h4>
261
- <span className="text-xs text-white/40">{item.description}</span>
262
- </div>
263
- <Divider variant="primary" size={item.size} />
264
- </div>
265
- ))}
266
- </div>
267
- </div>
268
- ),
269
- parameters: {
270
- docs: {
271
- description: {
272
- story:
273
- "Comparison of all available size options for dividers, from subtle to prominent separations.",
111
+ {
112
+ key: "dashed",
113
+ label: "Dashed",
114
+ desc: "Soft dashed line for optional or conditional breaks",
274
115
  },
275
- },
276
- },
277
- }
278
-
279
- export const VariantComparison: Story = {
280
- render: () => (
281
- <div className="w-full max-w-2xl space-y-8 rounded-lg bg-gray-900 p-6">
282
- <div className="text-center">
283
- <h3 className="mb-2 text-lg font-medium text-white">
284
- Variant Comparison
285
- </h3>
286
- <p className="text-sm text-white/60">
287
- Different visual styles for various design needs
288
- </p>
289
- </div>
116
+ ] as const
290
117
 
291
- <div className="space-y-8">
292
- {(
293
- [
294
- {
295
- variant: "primary",
296
- label: "Primary",
297
- description: "Standard divider for main content separation",
298
- useCase: "Main sections, page content",
299
- },
300
- {
301
- variant: "secondary",
302
- label: "Secondary",
303
- description: "Subtle divider for related content groups",
304
- useCase: "Subsections, related items",
305
- },
306
- {
307
- variant: "dashed",
308
- label: "Dashed",
309
- description:
310
- "Dotted line for temporary or conditional separations",
311
- useCase: "Grouped items, optional content",
312
- },
313
- {
314
- variant: "stylised",
315
- label: "Stylised",
316
- description: "Decorative divider with audio bar icon",
317
- useCase: "Section breaks, audio interfaces",
318
- },
319
- ] as const
320
- ).map((item) => (
321
- <div key={item.variant} className="space-y-3">
322
- <div className="space-y-1">
323
- <h4 className="text-sm font-medium text-white">{item.label}</h4>
324
- <p className="text-xs text-white/60">{item.description}</p>
325
- <p className="text-xs text-white/40">Use case: {item.useCase}</p>
326
- </div>
327
- <Divider variant={item.variant} size="full_default" />
328
- </div>
329
- ))}
330
- </div>
331
- </div>
332
- ),
333
- parameters: {
334
- docs: {
335
- description: {
336
- story:
337
- "Side-by-side comparison of all divider variants with their recommended use cases.",
338
- },
339
- },
340
- },
341
- }
342
-
343
- export const DashedVariations: Story = {
344
- render: () => (
345
- <div className="w-full max-w-2xl space-y-8 rounded-lg bg-gray-900 p-6">
346
- <div className="text-center">
347
- <h3 className="mb-2 text-lg font-medium text-white">
348
- Dashed Divider Variations
349
- </h3>
350
- <p className="text-sm text-white/60">
351
- Different sizes and orientations of dashed dividers
352
- </p>
353
- </div>
354
-
355
- <div className="space-y-6">
118
+ return (
119
+ <div className="space-y-8" style={{ width: 560 }}>
120
+ {/* Horizontal */}
356
121
  <div>
357
- <h4 className="mb-4 text-sm font-medium text-white">
358
- Horizontal Dashed
122
+ <h4 className="text-fm-secondary font-fm-text text-fm-md leading-fm-md mb-4 font-medium">
123
+ Horizontal
359
124
  </h4>
360
- <div className="space-y-4">
361
- {(
362
- [
363
- { size: "half_default", label: "Half Width" },
364
- { size: "full_default", label: "Full Width" },
365
- { size: "full_medium", label: "Medium Thickness" },
366
- { size: "full_large", label: "Large Thickness" },
367
- ] as const
368
- ).map((item) => (
369
- <div key={item.size} className="space-y-2">
370
- <span className="text-xs text-white/60">{item.label}</span>
371
- <Divider variant="dashed" size={item.size} />
125
+ <div className="space-y-6">
126
+ {variants.map(({ key, label, desc }) => (
127
+ <div key={key} className="space-y-2 text-center">
128
+ <Divider
129
+ variant={key}
130
+ size="full_default"
131
+ orientation="horizontal"
132
+ />
133
+ <p className="text-fm-secondary font-fm-text text-fm-sm leading-fm-sm">
134
+ {label} {desc}
135
+ </p>
372
136
  </div>
373
137
  ))}
374
138
  </div>
375
139
  </div>
376
140
 
141
+ {/* Vertical */}
377
142
  <div>
378
- <h4 className="mb-4 text-sm font-medium text-white">
379
- Vertical Dashed
143
+ <h4 className="text-fm-secondary font-fm-text text-fm-md leading-fm-md mb-4 font-medium">
144
+ Vertical
380
145
  </h4>
381
- <div className="flex h-16 items-center gap-6">
382
- {(
383
- [
384
- { size: "half_default", label: "Half" },
385
- { size: "full_default", label: "Full" },
386
- { size: "full_medium", label: "Medium" },
387
- { size: "full_large", label: "Large" },
388
- ] as const
389
- ).map((item) => (
390
- <div key={item.size} className="flex flex-col items-center gap-2">
391
- <span className="text-xs text-white/60">{item.label}</span>
392
- <Divider
393
- variant="dashed"
394
- size={item.size}
395
- orientation="vertical"
396
- className="h-12"
397
- />
146
+ <div className="flex flex-wrap items-center justify-center gap-10">
147
+ {variants.map(({ key, label }) => (
148
+ <div key={key} className="space-y-2 text-center">
149
+ <div className="flex h-16 items-center justify-center">
150
+ <Divider
151
+ variant={key}
152
+ size="full_default"
153
+ orientation="vertical"
154
+ className="h-12"
155
+ />
156
+ </div>
157
+ <p className="text-fm-secondary font-fm-text text-fm-sm leading-fm-sm">
158
+ {label}
159
+ </p>
398
160
  </div>
399
161
  ))}
400
162
  </div>
401
163
  </div>
402
164
  </div>
403
- </div>
404
- ),
165
+ )
166
+ },
405
167
  parameters: {
406
168
  docs: {
407
169
  description: {
408
170
  story:
409
- "Comprehensive showcase of dashed divider options in both horizontal and vertical orientations.",
171
+ "Full matrix of all four variants in both horizontal and vertical orientations, each with a short label describing its intended use.",
410
172
  },
411
173
  },
412
174
  },
413
175
  }
414
176
 
415
- export const OrientationExample: Story = {
416
- render: () => (
417
- <div className="w-full max-w-2xl space-y-8 rounded-lg bg-gray-900 p-6">
418
- <div className="text-center">
419
- <h3 className="mb-2 text-lg font-medium text-white">
420
- Orientation Examples
421
- </h3>
422
- <p className="text-sm text-white/60">
423
- Horizontal and vertical divider usage in layouts
424
- </p>
425
- </div>
177
+ // ─── 2. Sizes ────────────────────────────────────────────────────────────────
178
+
179
+ export const Sizes: Story = {
180
+ render: () => {
181
+ const sizes = [
182
+ {
183
+ key: "half_default",
184
+ label: "Half Default",
185
+ sub: "50% width · hairline",
186
+ },
187
+ {
188
+ key: "full_default",
189
+ label: "Full Default",
190
+ sub: "100% width · hairline",
191
+ },
192
+ {
193
+ key: "full_medium",
194
+ label: "Full Medium",
195
+ sub: "100% width · 4 px",
196
+ },
197
+ {
198
+ key: "full_large",
199
+ label: "Full Large",
200
+ sub: "100% width · 8 px",
201
+ },
202
+ ] as const
426
203
 
427
- <div className="space-y-8">
428
- {/* Horizontal Example */}
429
- <div className="space-y-4">
430
- <h4 className="text-sm font-medium text-white">
431
- Horizontal Dividers
204
+ return (
205
+ <div className="space-y-8" style={{ width: 520 }}>
206
+ {/* Horizontal sizes */}
207
+ <div>
208
+ <h4 className="text-fm-secondary font-fm-text text-fm-md leading-fm-md mb-4 font-medium">
209
+ Horizontal — primary variant
432
210
  </h4>
433
- <div className="space-y-4 rounded-lg bg-white/5 p-4">
434
- <div className="text-sm text-white/80">Section A: User Profile</div>
435
- <Divider variant="primary" />
436
- <div className="text-sm text-white/80">
437
- Section B: Account Settings
438
- </div>
439
- <Divider variant="dashed" />
440
- <div className="text-sm text-white/80">
441
- Section C: Privacy Options
442
- </div>
211
+ <div className="space-y-6">
212
+ {sizes.map(({ key, label, sub }) => (
213
+ <div key={key} className="space-y-2 text-center">
214
+ <Divider
215
+ variant="primary"
216
+ size={key}
217
+ orientation="horizontal"
218
+ />
219
+ <p className="text-fm-secondary font-fm-text text-fm-sm leading-fm-sm">
220
+ {label}
221
+ <span className="text-fm-tertiary"> — {sub}</span>
222
+ </p>
223
+ </div>
224
+ ))}
443
225
  </div>
444
226
  </div>
445
227
 
446
- {/* Vertical Example */}
447
- <div className="space-y-4">
448
- <h4 className="text-sm font-medium text-white">Vertical Dividers</h4>
449
- <div className="flex items-center gap-6 rounded-lg bg-white/5 p-4">
450
- <div className="text-sm text-white/80">Profile</div>
451
- <Divider variant="primary" orientation="vertical" className="h-8" />
452
- <div className="text-sm text-white/80">Settings</div>
453
- <Divider variant="dashed" orientation="vertical" className="h-8" />
454
- <div className="text-sm text-white/80">Help</div>
455
- <Divider
456
- variant="secondary"
457
- orientation="vertical"
458
- className="h-8"
459
- />
460
- <div className="text-sm text-white/80">Logout</div>
228
+ {/* Vertical sizes */}
229
+ <div>
230
+ <h4 className="text-fm-secondary font-fm-text text-fm-md leading-fm-md mb-4 font-medium">
231
+ Vertical primary variant
232
+ </h4>
233
+ <div className="flex flex-wrap items-end justify-center gap-8">
234
+ {sizes.map(({ key, label }) => (
235
+ <div key={key} className="space-y-2 text-center">
236
+ <div className="flex h-20 items-center justify-center">
237
+ <Divider
238
+ variant="primary"
239
+ size={key}
240
+ orientation="vertical"
241
+ className="h-full"
242
+ />
243
+ </div>
244
+ <p className="text-fm-secondary font-fm-text text-fm-sm leading-fm-sm">
245
+ {label}
246
+ </p>
247
+ </div>
248
+ ))}
461
249
  </div>
462
250
  </div>
463
251
  </div>
464
- </div>
465
- ),
252
+ )
253
+ },
466
254
  parameters: {
467
255
  docs: {
468
256
  description: {
469
257
  story:
470
- "Real-world examples showing how to use dividers in both horizontal and vertical layouts.",
258
+ "Side-by-side size comparison for both orientations, from the hairline default to the bold large variant.",
471
259
  },
472
260
  },
473
261
  },
474
262
  }
475
263
 
476
- export const RealWorldUsage: Story = {
477
- render: () => (
478
- <div className="w-full max-w-4xl space-y-8 rounded-lg bg-gray-900 p-6">
479
- <div className="text-center">
480
- <h3 className="mb-2 text-lg font-medium text-white">
481
- Real World Usage
482
- </h3>
483
- <p className="text-sm text-white/60">
484
- Practical examples in common UI patterns
485
- </p>
486
- </div>
264
+ // ─── 3. UseCases ─────────────────────────────────────────────────────────────
487
265
 
488
- <div className="grid grid-cols-1 gap-8 md:grid-cols-2">
489
- {/* Card Layout */}
490
- <div className="space-y-4">
491
- <h4 className="text-sm font-medium text-white">Card Layout</h4>
492
- <div className="space-y-4 rounded-lg bg-white/5 p-4">
493
- <div className="flex items-center gap-3">
494
- <div className="h-10 w-10 rounded-full bg-blue-600"></div>
495
- <div>
496
- <div className="text-sm font-medium text-white">John Doe</div>
497
- <div className="text-xs text-white/60">Product Designer</div>
498
- </div>
499
- </div>
500
- <Divider variant="dashed" />
501
- <div className="text-sm text-white/80">
502
- Passionate about creating intuitive user experiences and
503
- innovative design solutions.
504
- </div>
505
- <Divider variant="secondary" />
506
- <div className="flex gap-4 text-xs text-white/60">
507
- <span>Joined: Jan 2024</span>
508
- <span>Projects: 12</span>
266
+ export const UseCases: Story = {
267
+ render: () => (
268
+ <div className="mx-auto max-w-3xl space-y-8 p-8">
269
+ {/* Podcast episode card */}
270
+ <div>
271
+ <h4 className="text-fm-secondary font-fm-text text-fm-md leading-fm-md mb-4 font-medium">
272
+ Podcast episode card
273
+ </h4>
274
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary mx-auto max-w-md space-y-4 rounded-xl border p-5">
275
+ <div className="flex items-center gap-3">
276
+ <div className="bg-fm-surface-tertiary h-12 w-12 shrink-0 rounded-lg" />
277
+ <div>
278
+ <p className="text-fm-primary font-fm-brand text-fm-md leading-fm-md font-semibold">
279
+ The Sound Lab · Ep. 42
280
+ </p>
281
+ <p className="text-fm-tertiary font-fm-text text-fm-sm leading-fm-sm">
282
+ 45 min · Anya Reeves
283
+ </p>
509
284
  </div>
510
285
  </div>
286
+ <Divider variant="secondary" size="full_default" />
287
+ <p className="text-fm-secondary font-fm-text text-fm-sm leading-fm-sm">
288
+ Mixing live orchestral recordings, spatial audio formats, and the
289
+ future of independent streaming.
290
+ </p>
291
+ <Divider variant="dashed" size="full_default" />
292
+ <div className="flex items-center justify-between">
293
+ <span className="text-fm-tertiary font-fm-text text-fm-sm leading-fm-sm">
294
+ 2.4k plays
295
+ </span>
296
+ <span className="text-fm-tertiary font-fm-text text-fm-sm leading-fm-sm">
297
+ ★ 4.9
298
+ </span>
299
+ </div>
511
300
  </div>
301
+ </div>
512
302
 
513
- {/* Navigation Layout */}
514
- <div className="space-y-4">
515
- <h4 className="text-sm font-medium text-white">Navigation Menu</h4>
516
- <div className="space-y-3 rounded-lg bg-white/5 p-4">
517
- <div className="cursor-pointer text-sm text-white hover:text-blue-400">
518
- Dashboard
519
- </div>
520
- <Divider variant="secondary" />
521
- <div className="cursor-pointer text-sm text-white hover:text-blue-400">
522
- Projects
523
- </div>
524
- <Divider variant="secondary" />
525
- <div className="cursor-pointer text-sm text-white hover:text-blue-400">
526
- Team
527
- </div>
528
- <Divider variant="dashed" />
529
- <div className="cursor-pointer text-sm text-white hover:text-blue-400">
530
- Settings
531
- </div>
532
- <Divider variant="primary" />
533
- <div className="cursor-pointer text-sm text-red-400 hover:text-red-300">
534
- Logout
535
- </div>
303
+ {/* Section break with stylised divider */}
304
+ <div>
305
+ <h4 className="text-fm-secondary font-fm-text text-fm-md leading-fm-md mb-4 font-medium">
306
+ Section break stylised
307
+ </h4>
308
+ <div className="mx-auto max-w-md space-y-4">
309
+ <div className="space-y-2">
310
+ <p className="text-fm-primary font-fm-brand text-fm-md leading-fm-md font-semibold">
311
+ Featured Releases
312
+ </p>
313
+ <p className="text-fm-secondary font-fm-text text-fm-sm leading-fm-sm">
314
+ New albums curated by Aural editors this week.
315
+ </p>
316
+ </div>
317
+ <Divider variant="stylised" size="full_default" />
318
+ <div className="space-y-2">
319
+ <p className="text-fm-primary font-fm-brand text-fm-md leading-fm-md font-semibold">
320
+ Trending Now
321
+ </p>
322
+ <p className="text-fm-secondary font-fm-text text-fm-sm leading-fm-sm">
323
+ Tracks climbing the charts across all genres.
324
+ </p>
536
325
  </div>
537
326
  </div>
327
+ </div>
538
328
 
539
- {/* Timeline Layout */}
540
- <div className="space-y-4">
541
- <h4 className="text-sm font-medium text-white">Content Timeline</h4>
542
- <div className="space-y-4 rounded-lg bg-white/5 p-4">
543
- <div className="space-y-2">
544
- <div className="text-sm font-medium text-white">
545
- Project Started
546
- </div>
547
- <div className="text-xs text-white/60">
548
- Initial setup and planning phase
549
- </div>
550
- </div>
551
- <Divider variant="stylised" />
552
- <div className="space-y-2">
553
- <div className="text-sm font-medium text-white">
554
- Development Phase
555
- </div>
556
- <div className="text-xs text-white/60">
557
- Core features implementation
558
- </div>
559
- </div>
560
- <Divider variant="dashed" />
561
- <div className="space-y-2">
562
- <div className="text-sm font-medium text-white">Testing & QA</div>
563
- <div className="text-xs text-white/60">
564
- Quality assurance and bug fixes
565
- </div>
566
- </div>
329
+ {/* Inline toolbar with vertical dividers */}
330
+ <div>
331
+ <h4 className="text-fm-secondary font-fm-text text-fm-md leading-fm-md mb-4 font-medium">
332
+ Player toolbar vertical dividers
333
+ </h4>
334
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary mx-auto max-w-md rounded-xl border px-5 py-3">
335
+ <div className="flex items-center gap-4">
336
+ <button className="text-fm-tertiary font-fm-text text-fm-sm leading-fm-sm hover:text-fm-primary cursor-pointer outline-none">
337
+ Queue
338
+ </button>
339
+ <Divider
340
+ variant="secondary"
341
+ orientation="vertical"
342
+ className="h-5"
343
+ />
344
+ <button className="text-fm-tertiary font-fm-text text-fm-sm leading-fm-sm hover:text-fm-primary cursor-pointer outline-none">
345
+ Lyrics
346
+ </button>
347
+ <Divider variant="dashed" orientation="vertical" className="h-5" />
348
+ <button className="text-fm-tertiary font-fm-text text-fm-sm leading-fm-sm hover:text-fm-primary cursor-pointer outline-none">
349
+ Related
350
+ </button>
351
+ <Divider variant="primary" orientation="vertical" className="h-5" />
352
+ <button className="text-fm-tertiary font-fm-text text-fm-sm leading-fm-sm hover:text-fm-primary cursor-pointer outline-none">
353
+ Share
354
+ </button>
567
355
  </div>
568
356
  </div>
357
+ </div>
569
358
 
570
- {/* Toolbar Layout */}
571
- <div className="space-y-4">
572
- <h4 className="text-sm font-medium text-white">Toolbar Actions</h4>
573
- <div className="rounded-lg bg-white/5 p-4">
574
- <div className="flex items-center gap-4">
575
- <button className="text-sm text-white/80 hover:text-white">
576
- Edit
577
- </button>
578
- <Divider
579
- variant="secondary"
580
- orientation="vertical"
581
- className="h-6"
582
- />
583
- <button className="text-sm text-white/80 hover:text-white">
584
- Share
585
- </button>
586
- <Divider
587
- variant="dashed"
588
- orientation="vertical"
589
- className="h-6"
590
- />
591
- <button className="text-sm text-white/80 hover:text-white">
592
- Export
593
- </button>
594
- <Divider
595
- variant="primary"
596
- orientation="vertical"
597
- className="h-6"
598
- />
599
- <button className="text-sm text-red-400 hover:text-red-300">
600
- Delete
601
- </button>
602
- </div>
603
- </div>
359
+ {/* Artist profile settings panel */}
360
+ <div>
361
+ <h4 className="text-fm-secondary font-fm-text text-fm-md leading-fm-md mb-4 font-medium">
362
+ Settings panel grouped sections
363
+ </h4>
364
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary mx-auto max-w-md space-y-3 rounded-xl border p-5">
365
+ <p className="text-fm-primary font-fm-brand text-fm-md leading-fm-md font-semibold">
366
+ Account
367
+ </p>
368
+ <Divider variant="primary" size="full_default" />
369
+ <p className="text-fm-secondary font-fm-text text-fm-sm leading-fm-sm">
370
+ Profile · Subscription · Billing
371
+ </p>
372
+ <Divider variant="secondary" size="full_default" />
373
+ <p className="text-fm-primary font-fm-brand text-fm-md leading-fm-md font-semibold">
374
+ Playback
375
+ </p>
376
+ <Divider variant="primary" size="full_default" />
377
+ <p className="text-fm-secondary font-fm-text text-fm-sm leading-fm-sm">
378
+ Audio quality · Downloads · Crossfade
379
+ </p>
380
+ <Divider variant="dashed" size="full_default" />
381
+ <p className="text-fm-tertiary font-fm-text text-fm-sm leading-fm-sm">
382
+ Advanced settings
383
+ </p>
604
384
  </div>
605
385
  </div>
606
386
  </div>
@@ -609,24 +389,7 @@ export const RealWorldUsage: Story = {
609
389
  docs: {
610
390
  description: {
611
391
  story:
612
- "Real-world UI patterns showing effective use of different divider variants in common interface layouts.",
613
- },
614
- },
615
- },
616
- }
617
-
618
- export const InteractivePlayground: Story = {
619
- args: {
620
- variant: "primary",
621
- size: "full_default",
622
- orientation: "horizontal",
623
- className: "my-4 min-w-96",
624
- },
625
- parameters: {
626
- docs: {
627
- description: {
628
- story:
629
- "Interactive playground to experiment with all divider properties and see live changes.",
392
+ "Real-world scenarios from an audio streaming context: episode cards, stylised section breaks, inline player toolbars with vertical dividers, and a settings panel with grouped sections.",
630
393
  },
631
394
  },
632
395
  },