aural-ui 3.0.7 → 4.0.1
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/dist/components/aspect-ratio/AspectRatio.stories.tsx +271 -242
- package/dist/components/avatar/Avatar.stories.tsx +84 -70
- package/dist/components/button/Button.stories.tsx +7 -7
- package/dist/components/button/index.tsx +7 -7
- package/dist/components/card/Card.stories.tsx +3 -3
- package/dist/components/char-count/CharCount.stories.tsx +9 -9
- package/dist/components/circular-loader/CircularLoader.stories.tsx +109 -93
- package/dist/components/collapsible/Collapsible.stories.tsx +1 -1
- package/dist/components/command/Command.stories.tsx +52 -38
- package/dist/components/dialog/Dialog.stories.tsx +89 -84
- package/dist/components/divider/Divider.stories.tsx +86 -60
- package/dist/components/dot-loader/DotLoader.stories.tsx +12 -12
- package/dist/components/drawer/Drawer.stories.tsx +74 -44
- package/dist/components/drawer/index.tsx +3 -3
- package/dist/components/dropdown/Dropdown.stories.tsx +42 -32
- package/dist/components/helper-text/HelperText.stories.tsx +2 -2
- package/dist/components/hover-card/HoverCard.stories.tsx +211 -178
- package/dist/components/input/Input.stories.tsx +2 -2
- package/dist/components/label/Label.stories.tsx +10 -10
- package/dist/components/list/List.stories.tsx +58 -44
- package/dist/components/marquee/Marquee.stories.tsx +131 -113
- package/dist/components/otp-inputs/OtpInputs.stories.tsx +47 -35
- package/dist/components/overlay/Overlay.stories.tsx +98 -92
- package/dist/components/overlay/index.tsx +4 -4
- package/dist/components/popover/Popover.stories.tsx +132 -106
- package/dist/components/radio/Radio.stories.tsx +2 -2
- package/dist/components/resizable/Resizable.stories.tsx +186 -138
- package/dist/components/scroll-area/ScrollArea.stories.tsx +174 -120
- package/dist/components/search/Search.stories.tsx +81 -59
- package/dist/components/select/Select.stories.tsx +3 -1
- package/dist/components/sheet/Sheet.stories.tsx +68 -54
- package/dist/components/slider/Slider.stories.tsx +71 -47
- package/dist/components/stepper/Stepper.stories.tsx +16 -16
- package/dist/components/switch/Switch.stories.tsx +12 -12
- package/dist/components/table/Table.stories.tsx +8 -6
- package/dist/components/tabs/Tabs.stories.tsx +324 -268
- package/dist/components/textarea/TextArea.stories.tsx +1 -1
- package/dist/components/thumbnail-tags/ThumbnailTags.stories.tsx +16 -10
- package/dist/components/toast/Toast.stories.tsx +51 -45
- package/dist/components/toggle/Toggle.stories.tsx +111 -89
- package/dist/components/tooltip/Tooltip.stories.tsx +160 -144
- package/dist/icons/Icons.stories.tsx +2 -2
- package/dist/icons/ai-avatar-icon/AiAvatarIcon.stories.tsx +287 -237
- package/dist/icons/alert-icon/AlertIcon.stories.tsx +290 -248
- package/dist/icons/all-icons.tsx +97 -81
- package/dist/icons/angle-down-icon/AngleDownIcon.stories.tsx +312 -270
- package/dist/icons/apple-logo-icon/AppleLogoIcon.stories.tsx +294 -244
- package/dist/icons/arrow-box-left-icon/ArrowBoxLeftIcon.stories.tsx +309 -279
- package/dist/icons/arrow-corner-up-left-icon/ArrowCornerUpLeftIcon.stories.tsx +294 -258
- package/dist/icons/arrow-corner-up-right-icon/ArrowCornerUpRightIcon.stories.tsx +289 -255
- package/dist/icons/arrow-left-icon/ArrowLeftIcon.stories.tsx +288 -256
- package/dist/icons/arrow-right-icon/ArrowRightIcon.stories.tsx +322 -288
- package/dist/icons/arrow-right-up-icon/ArrowRightUpIcon.stories.tsx +340 -296
- package/dist/icons/art-board-icon/ArtBoardIcon.stories.tsx +197 -177
- package/dist/icons/audio-bar-icon/AudioBarIcon.stories.tsx +390 -328
- package/dist/icons/backward-ten-seconds-icon/BackwardTenSecondsIcon.stories.tsx +313 -277
- package/dist/icons/bubble-check-icon/BubbleCheckIcon.stories.tsx +367 -309
- package/dist/icons/bubble-crossed-icon/BubbleCrossedIcon.stories.tsx +356 -308
- package/dist/icons/bubble-sparkle-icon/BubbleSparkleIcon.stories.tsx +280 -234
- package/dist/icons/camera-icon/CameraIcon.stories.tsx +370 -326
- package/dist/icons/capital-a-letter-icon/CapitalALetterIcon.stories.tsx +300 -256
- package/dist/icons/chevron-double-left-icon/ChevronDoubleLeftIcon.stories.tsx +298 -262
- package/dist/icons/chevron-double-right-icon/ChevronDoubleRightIcon.stories.tsx +294 -260
- package/dist/icons/chevron-down-icon/ChevronDownIcon.stories.tsx +291 -259
- package/dist/icons/chevron-left-icon/ChevronLeftIcon.stories.tsx +286 -256
- package/dist/icons/chevron-right-icon/ChevronRightIcon.stories.tsx +282 -256
- package/dist/icons/chevron-up-icon/ChevronUpIcon.stories.tsx +292 -256
- package/dist/icons/circle-tick-icon/CircleTickIcon.stories.tsx +338 -290
- package/dist/icons/circular-play-icon/CircularPlayIcon.stories.tsx +167 -148
- package/dist/icons/coin-icon/CoinIcon.stories.tsx +342 -296
- package/dist/icons/coin-toons-icon/CoinToonsIcon.stories.tsx +342 -296
- package/dist/icons/column-wide-add-icon/ColumnWideAddIcon.stories.tsx +280 -238
- package/dist/icons/command-icon/CommandIcon.stories.tsx +328 -280
- package/dist/icons/copy-icon/CopyIcon.stories.tsx +294 -256
- package/dist/icons/cross-circle-icon/CrossCircleIcon.stories.tsx +285 -235
- package/dist/icons/cross-icon/CrossIcon.stories.tsx +308 -266
- package/dist/icons/download-icon/DownloadIcon.stories.tsx +271 -231
- package/dist/icons/edit-big-icon/EditBigIcon.stories.tsx +330 -278
- package/dist/icons/email-icon/EmailIcon.stories.tsx +303 -257
- package/dist/icons/expand-icon/ExpandIcon.stories.tsx +324 -286
- package/dist/icons/eye-close-icon/EyeCloseIcon.stories.tsx +317 -271
- package/dist/icons/eye-open-icon/EyeOpenIcon.stories.tsx +320 -272
- package/dist/icons/feature-shine-icon/FeatureShineIcon.stories.tsx +322 -280
- package/dist/icons/file-chart-icon/FileChartIcon.stories.tsx +315 -277
- package/dist/icons/file-text-icon/FileTextIcon.stories.tsx +199 -177
- package/dist/icons/filter-bar-row-icon/FilterBarRowIcon.stories.tsx +304 -264
- package/dist/icons/forward-ten-seconds-icon/ForwardTenSecondsIcon.stories.tsx +311 -277
- package/dist/icons/git-branch-icon/GitBranchIcon.stories.tsx +327 -287
- package/dist/icons/git-fork-icon/GitForkIcon.stories.tsx +314 -278
- package/dist/icons/globe-icon/GlobeIcon.stories.tsx +113 -98
- package/dist/icons/google-logo-icon/GoogleLogoIcon.stories.tsx +274 -226
- package/dist/icons/grip-vertical-icon/GripVerticalIcon.stories.tsx +349 -303
- package/dist/icons/head-icon/HeadIcon.stories.tsx +286 -246
- package/dist/icons/heart-icon/HeartIcon.stories.tsx +312 -268
- package/dist/icons/image-avatar-sparkle-icon/ImageAvatarSparkleIcon.stories.tsx +246 -210
- package/dist/icons/image-icon/ImageIcon.stories.tsx +330 -284
- package/dist/icons/import-folder-icon/ImportFolderIcon.stories.tsx +326 -282
- package/dist/icons/import-left-arrow-folder-icon/ImportLeftArrowFolderIcon.stories.tsx +330 -294
- package/dist/icons/indian-flag-icon/IndianFlagIcon.stories.tsx +288 -234
- package/dist/icons/instagram-icon/InstagramIcon.stories.tsx +386 -330
- package/dist/icons/layout-column-icon/LayoutColumnIcon.stories.tsx +305 -263
- package/dist/icons/layout-left-icon/LayoutLeftIcon.stories.tsx +295 -259
- package/dist/icons/layout-right-icon/LayoutRightIcon.stories.tsx +296 -256
- package/dist/icons/light-bulb-simple-icon/LightBulbSimpleIcon.stories.tsx +322 -282
- package/dist/icons/linked-in-icon/LinkedInIcon.stories.tsx +399 -359
- package/dist/icons/magic-book-icon/MagicBookIcon.stories.tsx +314 -272
- package/dist/icons/magic-edit-icon/MagicEditIcon.stories.tsx +238 -206
- package/dist/icons/maintenance-icon/MaintenanceIcon.stories.tsx +322 -276
- package/dist/icons/message-icon/MessageIcon.stories.tsx +192 -170
- package/dist/icons/minimize-icon/MinimizeIcon.stories.tsx +348 -304
- package/dist/icons/moon-icon/MoonIcon.stories.tsx +191 -167
- package/dist/icons/move-horizontal-icon/MoveHorizontalIcon.stories.tsx +380 -326
- package/dist/icons/move-vertical-icon/MoveVerticalIcon.stories.tsx +345 -291
- package/dist/icons/musical-note-icon/MusicalNoteIcon.stories.tsx +310 -266
- package/dist/icons/notepad-icon/NotepadIcon.stories.tsx +311 -271
- package/dist/icons/notes-icon/NotesIcon.stories.tsx +311 -271
- package/dist/icons/page-search-icon/PageSearchIcon.stories.tsx +309 -271
- package/dist/icons/page-text-icon/PageTextIcon.stories.tsx +248 -210
- package/dist/icons/paint-roll-icon/PaintRollIcon.stories.tsx +310 -262
- package/dist/icons/paper-plane-icon/PaperPlaneIcon.stories.tsx +274 -236
- package/dist/icons/pause-icon/PauseIcon.stories.tsx +324 -280
- package/dist/icons/pencil-icon/PencilIcon.stories.tsx +323 -281
- package/dist/icons/phone-icon/PhoneIcon.stories.tsx +288 -240
- package/dist/icons/plus-icon/PlusIcon.stories.tsx +315 -273
- package/dist/icons/pocket-studio-icon/PocketStudioIcon.stories.tsx +278 -234
- package/dist/icons/scroll-down-icon/ScrollDownIcon.stories.tsx +161 -151
- package/dist/icons/search-icon/SearchIcon.stories.tsx +324 -284
- package/dist/icons/setting-icon/SettingIcon.stories.tsx +306 -264
- package/dist/icons/share-icon/ShareIcon.stories.tsx +314 -272
- package/dist/icons/shield-icon/ShieldIcon.stories.tsx +281 -235
- package/dist/icons/site-logo-icon/SiteLogoIcon.stories.tsx +309 -250
- package/dist/icons/skip-backward-icon/SkipBackwardIcon.stories.tsx +317 -279
- package/dist/icons/skip-forward-icon/SkipForwardIcon.stories.tsx +315 -279
- package/dist/icons/sparkles-soft-icon/SparklesSoftIcon.stories.tsx +299 -253
- package/dist/icons/spinner-gradient-icon/SpinnerGradientIcon.stories.tsx +185 -169
- package/dist/icons/spinner-gradient-icon/index.tsx +6 -1
- package/dist/icons/spinner-solid-icon/SpinnerSolidIcon.stories.tsx +192 -168
- package/dist/icons/spinner-solid-icon/index.tsx +6 -1
- package/dist/icons/spinner-solid-neutral-icon/SpinnerSolidINeutralcon.stories.tsx +212 -178
- package/dist/icons/spinner-solid-neutral-icon/index.tsx +1 -1
- package/dist/icons/star-icon/StarIcon.stories.tsx +290 -244
- package/dist/icons/store-coin-icon/StoreCoinIcon.stories.tsx +286 -234
- package/dist/icons/suggestion-icon/SuggestionIcon.stories.tsx +272 -230
- package/dist/icons/sun-icon/SunIcon.stories.tsx +262 -226
- package/dist/icons/text-color-icon/TextColorIcon.stories.tsx +321 -279
- package/dist/icons/text-indicator-icon/TextIndicatorIcon.stories.tsx +332 -282
- package/dist/icons/threads-icon/ThreadsIcon.stories.tsx +394 -342
- package/dist/icons/tick-circle-icon/TickCircleIcon.stories.tsx +338 -290
- package/dist/icons/tick-icon/TickIcon.stories.tsx +364 -315
- package/dist/icons/trash-icon/TrashIcon.stories.tsx +293 -253
- package/dist/icons/twitter-x-icon/TwitterXIcon.stories.tsx +396 -338
- package/dist/icons/upload-icon/UploadIcon.stories.tsx +291 -247
- package/dist/icons/vertical-menu-icon/VerticalMenuIcon.stories.tsx +309 -271
- package/dist/icons/video-play-list-icon/VideoPlaylistIcon.stories.tsx +336 -290
- package/dist/icons/voice-playing-icon/VoicePlayingIcon.stories.tsx +382 -334
- package/dist/icons/volume-full-icon/VolumeFullIcon.stories.tsx +349 -305
- package/dist/icons/volume-half-icon/VolumeHalfIcon.stories.tsx +327 -295
- package/dist/icons/volume-off-icon/VolumeOffIcon.stories.tsx +336 -296
- package/dist/icons/warning-icon/WarningIcon.stories.tsx +314 -274
- package/dist/icons/youtube-icon/YoutubeIcon.stories.tsx +311 -261
- package/dist/index.cjs +84 -84
- package/dist/index.js +84 -84
- package/dist/styles/aural-all-theme.css +1222 -0
- package/dist/styles/{aural-theme.css → aural-dark-theme.css} +15 -3
- package/dist/styles/aural-light-theme.css +1047 -0
- package/package.json +1 -1
|
@@ -175,14 +175,16 @@ export const Basic: Story = {
|
|
|
175
175
|
export const Variants: Story = {
|
|
176
176
|
render: () => (
|
|
177
177
|
<div className="flex flex-col gap-8 p-8">
|
|
178
|
-
<h3 className="text-center text-lg font-medium
|
|
178
|
+
<h3 className="text-fm-primary text-center text-lg font-medium">
|
|
179
179
|
Toggle Variants
|
|
180
180
|
</h3>
|
|
181
181
|
|
|
182
182
|
<div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
|
|
183
183
|
{/* Default Variant */}
|
|
184
184
|
<div className="space-y-4">
|
|
185
|
-
<h4 className="text-sm font-medium
|
|
185
|
+
<h4 className="text-fm-secondary text-sm font-medium">
|
|
186
|
+
Default Variant
|
|
187
|
+
</h4>
|
|
186
188
|
<div className="flex flex-wrap gap-4">
|
|
187
189
|
<Toggle aria-label="Default unpressed">Default</Toggle>
|
|
188
190
|
<Toggle defaultPressed aria-label="Default pressed">
|
|
@@ -196,7 +198,9 @@ export const Variants: Story = {
|
|
|
196
198
|
|
|
197
199
|
{/* Outline Variant */}
|
|
198
200
|
<div className="space-y-4">
|
|
199
|
-
<h4 className="text-sm font-medium
|
|
201
|
+
<h4 className="text-fm-secondary text-sm font-medium">
|
|
202
|
+
Outline Variant
|
|
203
|
+
</h4>
|
|
200
204
|
<div className="flex flex-wrap gap-4">
|
|
201
205
|
<Toggle variant="outline" aria-label="Outline unpressed">
|
|
202
206
|
Outline
|
|
@@ -216,7 +220,9 @@ export const Variants: Story = {
|
|
|
216
220
|
|
|
217
221
|
{/* Filled Variant */}
|
|
218
222
|
<div className="space-y-4">
|
|
219
|
-
<h4 className="text-sm font-medium
|
|
223
|
+
<h4 className="text-fm-secondary text-sm font-medium">
|
|
224
|
+
Filled Variant
|
|
225
|
+
</h4>
|
|
220
226
|
<div className="flex flex-wrap gap-4">
|
|
221
227
|
<Toggle variant="filled" aria-label="Filled unpressed">
|
|
222
228
|
Filled
|
|
@@ -246,14 +252,14 @@ export const Variants: Story = {
|
|
|
246
252
|
export const Sizes: Story = {
|
|
247
253
|
render: () => (
|
|
248
254
|
<div className="space-y-8 p-8">
|
|
249
|
-
<h3 className="text-center text-lg font-medium
|
|
255
|
+
<h3 className="text-fm-primary text-center text-lg font-medium">
|
|
250
256
|
Toggle Sizes
|
|
251
257
|
</h3>
|
|
252
258
|
|
|
253
259
|
<div className="space-y-6">
|
|
254
260
|
{/* Size Comparison */}
|
|
255
261
|
<div className="space-y-4">
|
|
256
|
-
<h4 className="text-center text-sm font-medium
|
|
262
|
+
<h4 className="text-fm-secondary text-center text-sm font-medium">
|
|
257
263
|
Size Comparison
|
|
258
264
|
</h4>
|
|
259
265
|
<div className="flex items-center justify-center gap-4">
|
|
@@ -261,26 +267,26 @@ export const Sizes: Story = {
|
|
|
261
267
|
<Toggle size="sm" aria-label="Small toggle">
|
|
262
268
|
Small
|
|
263
269
|
</Toggle>
|
|
264
|
-
<span className="text-
|
|
270
|
+
<span className="text-fm-secondary text-xs">Small (32px)</span>
|
|
265
271
|
</div>
|
|
266
272
|
<div className="flex flex-col items-center gap-2">
|
|
267
273
|
<Toggle size="default" aria-label="Default toggle">
|
|
268
274
|
Default
|
|
269
275
|
</Toggle>
|
|
270
|
-
<span className="text-
|
|
276
|
+
<span className="text-fm-secondary text-xs">Default (36px)</span>
|
|
271
277
|
</div>
|
|
272
278
|
<div className="flex flex-col items-center gap-2">
|
|
273
279
|
<Toggle size="lg" aria-label="Large toggle">
|
|
274
280
|
Large
|
|
275
281
|
</Toggle>
|
|
276
|
-
<span className="text-
|
|
282
|
+
<span className="text-fm-secondary text-xs">Large (40px)</span>
|
|
277
283
|
</div>
|
|
278
284
|
</div>
|
|
279
285
|
</div>
|
|
280
286
|
|
|
281
287
|
{/* Sizes with Icons */}
|
|
282
288
|
<div className="space-y-4">
|
|
283
|
-
<h4 className="text-center text-sm font-medium
|
|
289
|
+
<h4 className="text-fm-secondary text-center text-sm font-medium">
|
|
284
290
|
With Icons
|
|
285
291
|
</h4>
|
|
286
292
|
<div className="flex items-center justify-center gap-4">
|
|
@@ -301,7 +307,7 @@ export const Sizes: Story = {
|
|
|
301
307
|
|
|
302
308
|
{/* Icon Only Sizes */}
|
|
303
309
|
<div className="space-y-4">
|
|
304
|
-
<h4 className="text-center text-sm font-medium
|
|
310
|
+
<h4 className="text-fm-secondary text-center text-sm font-medium">
|
|
305
311
|
Icon Only
|
|
306
312
|
</h4>
|
|
307
313
|
<div className="flex items-center justify-center gap-4">
|
|
@@ -338,14 +344,14 @@ export const IconToggles: Story = {
|
|
|
338
344
|
|
|
339
345
|
return (
|
|
340
346
|
<div className="space-y-8 p-8">
|
|
341
|
-
<h3 className="text-center text-lg font-medium
|
|
347
|
+
<h3 className="text-fm-primary text-center text-lg font-medium">
|
|
342
348
|
Icon Toggles
|
|
343
349
|
</h3>
|
|
344
350
|
|
|
345
351
|
<div className="space-y-6">
|
|
346
352
|
{/* Icon with Text */}
|
|
347
353
|
<div className="space-y-4">
|
|
348
|
-
<h4 className="text-center text-sm font-medium
|
|
354
|
+
<h4 className="text-fm-secondary text-center text-sm font-medium">
|
|
349
355
|
Icon with Text
|
|
350
356
|
</h4>
|
|
351
357
|
<div className="flex flex-wrap justify-center gap-4">
|
|
@@ -380,7 +386,7 @@ export const IconToggles: Story = {
|
|
|
380
386
|
|
|
381
387
|
{/* Icon Only */}
|
|
382
388
|
<div className="space-y-4">
|
|
383
|
-
<h4 className="text-center text-sm font-medium
|
|
389
|
+
<h4 className="text-fm-secondary text-center text-sm font-medium">
|
|
384
390
|
Icon Only
|
|
385
391
|
</h4>
|
|
386
392
|
<div className="flex flex-wrap justify-center gap-4">
|
|
@@ -408,12 +414,14 @@ export const IconToggles: Story = {
|
|
|
408
414
|
|
|
409
415
|
{/* Different Variants */}
|
|
410
416
|
<div className="space-y-4">
|
|
411
|
-
<h4 className="text-center text-sm font-medium
|
|
417
|
+
<h4 className="text-fm-secondary text-center text-sm font-medium">
|
|
412
418
|
Different Variants
|
|
413
419
|
</h4>
|
|
414
420
|
<div className="grid grid-cols-1 gap-4 lg:grid-cols-2">
|
|
415
421
|
<div className="space-y-2">
|
|
416
|
-
<span className="text-
|
|
422
|
+
<span className="text-fm-secondary text-xs">
|
|
423
|
+
Default Variant
|
|
424
|
+
</span>
|
|
417
425
|
<div className="flex flex-wrap gap-2">
|
|
418
426
|
<Toggle aria-label="Default alert">
|
|
419
427
|
<AlertIcon />
|
|
@@ -428,7 +436,9 @@ export const IconToggles: Story = {
|
|
|
428
436
|
</div>
|
|
429
437
|
|
|
430
438
|
<div className="space-y-2">
|
|
431
|
-
<span className="text-
|
|
439
|
+
<span className="text-fm-secondary text-xs">
|
|
440
|
+
Outline Variant
|
|
441
|
+
</span>
|
|
432
442
|
<div className="flex flex-wrap gap-2">
|
|
433
443
|
<Toggle variant="outline" aria-label="Outline alert">
|
|
434
444
|
<AlertIcon />
|
|
@@ -479,18 +489,18 @@ export const InteractiveStates: Story = {
|
|
|
479
489
|
|
|
480
490
|
return (
|
|
481
491
|
<div className="space-y-8 p-8">
|
|
482
|
-
<h3 className="text-center text-lg font-medium
|
|
492
|
+
<h3 className="text-fm-primary text-center text-lg font-medium">
|
|
483
493
|
Interactive States
|
|
484
494
|
</h3>
|
|
485
495
|
|
|
486
496
|
<div className="space-y-6">
|
|
487
497
|
{/* Text Formatting Toolbar */}
|
|
488
498
|
<div className="space-y-4">
|
|
489
|
-
<h4 className="text-center text-sm font-medium
|
|
499
|
+
<h4 className="text-fm-secondary text-center text-sm font-medium">
|
|
490
500
|
Text Formatting Toolbar
|
|
491
501
|
</h4>
|
|
492
502
|
<div className="flex justify-center">
|
|
493
|
-
<div className="flex items-center gap-1 rounded-lg border
|
|
503
|
+
<div className="border-fm-divider-secondary bg-fm-surface-secondary flex items-center gap-1 rounded-lg border p-2">
|
|
494
504
|
<Toggle
|
|
495
505
|
size="sm"
|
|
496
506
|
pressed={states.bold}
|
|
@@ -515,7 +525,7 @@ export const InteractiveStates: Story = {
|
|
|
515
525
|
>
|
|
516
526
|
<span className="underline">U</span>
|
|
517
527
|
</Toggle>
|
|
518
|
-
<div className="mx-2 h-6 w-px
|
|
528
|
+
<div className="bg-fm-surface-tertiary mx-2 h-6 w-px"></div>
|
|
519
529
|
<Toggle size="sm" aria-label="Add item">
|
|
520
530
|
<PlusIcon />
|
|
521
531
|
</Toggle>
|
|
@@ -528,14 +538,14 @@ export const InteractiveStates: Story = {
|
|
|
528
538
|
|
|
529
539
|
{/* Settings Panel */}
|
|
530
540
|
<div className="space-y-4">
|
|
531
|
-
<h4 className="text-center text-sm font-medium
|
|
541
|
+
<h4 className="text-fm-secondary text-center text-sm font-medium">
|
|
532
542
|
Settings Panel
|
|
533
543
|
</h4>
|
|
534
544
|
<div className="mx-auto max-w-xs space-y-3">
|
|
535
|
-
<div className="flex items-center justify-between rounded-lg border
|
|
545
|
+
<div className="border-fm-divider-secondary bg-fm-surface-secondary flex items-center justify-between rounded-lg border p-3">
|
|
536
546
|
<div className="flex items-center gap-3">
|
|
537
|
-
<AlertIcon className="h-4 w-4
|
|
538
|
-
<span className="text-
|
|
547
|
+
<AlertIcon className="text-fm-icon-info h-4 w-4" />
|
|
548
|
+
<span className="text-fm-primary text-sm">Notifications</span>
|
|
539
549
|
</div>
|
|
540
550
|
<Toggle
|
|
541
551
|
size="sm"
|
|
@@ -545,10 +555,10 @@ export const InteractiveStates: Story = {
|
|
|
545
555
|
/>
|
|
546
556
|
</div>
|
|
547
557
|
|
|
548
|
-
<div className="flex items-center justify-between rounded-lg border
|
|
558
|
+
<div className="border-fm-divider-secondary bg-fm-surface-secondary flex items-center justify-between rounded-lg border p-3">
|
|
549
559
|
<div className="flex items-center gap-3">
|
|
550
|
-
<TickCircleIcon className="h-4 w-4
|
|
551
|
-
<span className="text-
|
|
560
|
+
<TickCircleIcon className="text-fm-icon-positive h-4 w-4" />
|
|
561
|
+
<span className="text-fm-primary text-sm">Auto Save</span>
|
|
552
562
|
</div>
|
|
553
563
|
<Toggle
|
|
554
564
|
size="sm"
|
|
@@ -558,10 +568,10 @@ export const InteractiveStates: Story = {
|
|
|
558
568
|
/>
|
|
559
569
|
</div>
|
|
560
570
|
|
|
561
|
-
<div className="flex items-center justify-between rounded-lg border
|
|
571
|
+
<div className="border-fm-divider-secondary bg-fm-surface-secondary flex items-center justify-between rounded-lg border p-3">
|
|
562
572
|
<div className="flex items-center gap-3">
|
|
563
|
-
<EyeOpenIcon className="h-4 w-4
|
|
564
|
-
<span className="text-
|
|
573
|
+
<EyeOpenIcon className="text-fm-icon-brand-secondary h-4 w-4" />
|
|
574
|
+
<span className="text-fm-primary text-sm">Dark Mode</span>
|
|
565
575
|
</div>
|
|
566
576
|
<Toggle
|
|
567
577
|
size="sm"
|
|
@@ -575,15 +585,21 @@ export const InteractiveStates: Story = {
|
|
|
575
585
|
|
|
576
586
|
{/* State Display */}
|
|
577
587
|
<div className="space-y-4">
|
|
578
|
-
<h4 className="text-center text-sm font-medium
|
|
588
|
+
<h4 className="text-fm-secondary text-center text-sm font-medium">
|
|
579
589
|
Current States
|
|
580
590
|
</h4>
|
|
581
|
-
<div className="mx-auto max-w-md rounded-lg border
|
|
591
|
+
<div className="border-fm-divider-secondary bg-fm-surface-secondary mx-auto max-w-md rounded-lg border p-4">
|
|
582
592
|
<div className="grid grid-cols-2 gap-2 text-xs">
|
|
583
593
|
{Object.entries(states).map(([key, value]) => (
|
|
584
594
|
<div key={key} className="flex justify-between">
|
|
585
|
-
<span className="text-
|
|
586
|
-
<span
|
|
595
|
+
<span className="text-fm-secondary capitalize">{key}:</span>
|
|
596
|
+
<span
|
|
597
|
+
className={
|
|
598
|
+
value
|
|
599
|
+
? "text-fm-icon-positive"
|
|
600
|
+
: "text-fm-icon-negative"
|
|
601
|
+
}
|
|
602
|
+
>
|
|
587
603
|
{value ? "ON" : "OFF"}
|
|
588
604
|
</span>
|
|
589
605
|
</div>
|
|
@@ -609,27 +625,29 @@ export const InteractiveStates: Story = {
|
|
|
609
625
|
export const AccessibilityDemo: Story = {
|
|
610
626
|
render: () => (
|
|
611
627
|
<div className="space-y-8 p-8">
|
|
612
|
-
<h3 className="text-center text-lg font-medium
|
|
628
|
+
<h3 className="text-fm-primary text-center text-lg font-medium">
|
|
613
629
|
Accessibility Features
|
|
614
630
|
</h3>
|
|
615
631
|
|
|
616
632
|
<div className="space-y-6">
|
|
617
|
-
<div className="
|
|
618
|
-
<h4 className="mb-2 text-sm font-medium
|
|
633
|
+
<div className="border-fm-divider-secondary bg-fm-surface-info-sec rounded-lg border p-4">
|
|
634
|
+
<h4 className="text-fm-info mb-2 text-sm font-medium">
|
|
619
635
|
Keyboard Navigation
|
|
620
636
|
</h4>
|
|
621
|
-
<p className="mb-2 text-xs
|
|
637
|
+
<p className="text-fm-info-sec mb-2 text-xs">
|
|
622
638
|
Try these keyboard interactions:
|
|
623
639
|
</p>
|
|
624
|
-
<ul className="space-y-1 text-xs
|
|
640
|
+
<ul className="text-fm-info-sec space-y-1 text-xs">
|
|
625
641
|
<li>
|
|
626
|
-
• <kbd className="
|
|
627
|
-
toggles
|
|
642
|
+
• <kbd className="bg-fm-surface-secondary rounded px-1">Tab</kbd>{" "}
|
|
643
|
+
to focus toggles
|
|
628
644
|
</li>
|
|
629
645
|
<li>
|
|
630
|
-
•
|
|
631
|
-
<kbd className="
|
|
632
|
-
|
|
646
|
+
•{" "}
|
|
647
|
+
<kbd className="bg-fm-surface-secondary rounded px-1">Space</kbd>{" "}
|
|
648
|
+
or{" "}
|
|
649
|
+
<kbd className="bg-fm-surface-secondary rounded px-1">Enter</kbd>{" "}
|
|
650
|
+
to toggle state
|
|
633
651
|
</li>
|
|
634
652
|
<li>• Clear focus indicators show current position</li>
|
|
635
653
|
<li>• Screen readers announce pressed state</li>
|
|
@@ -638,7 +656,7 @@ export const AccessibilityDemo: Story = {
|
|
|
638
656
|
|
|
639
657
|
{/* Keyboard Accessible Examples */}
|
|
640
658
|
<div className="space-y-4">
|
|
641
|
-
<h4 className="text-sm font-medium
|
|
659
|
+
<h4 className="text-fm-secondary text-sm font-medium">
|
|
642
660
|
Keyboard Accessible Toggles
|
|
643
661
|
</h4>
|
|
644
662
|
<div className="flex flex-wrap justify-center gap-4">
|
|
@@ -668,12 +686,12 @@ export const AccessibilityDemo: Story = {
|
|
|
668
686
|
|
|
669
687
|
{/* ARIA Labels Demo */}
|
|
670
688
|
<div className="space-y-4">
|
|
671
|
-
<h4 className="text-sm font-medium
|
|
689
|
+
<h4 className="text-fm-secondary text-sm font-medium">
|
|
672
690
|
ARIA Labels Best Practices
|
|
673
691
|
</h4>
|
|
674
692
|
<div className="grid grid-cols-1 gap-4 lg:grid-cols-2">
|
|
675
693
|
<div className="space-y-3">
|
|
676
|
-
<span className="text-
|
|
694
|
+
<span className="text-fm-secondary text-xs">Good Examples</span>
|
|
677
695
|
<div className="space-y-2">
|
|
678
696
|
<Toggle aria-label="Toggle notifications - receive alerts when new messages arrive">
|
|
679
697
|
<AlertIcon />
|
|
@@ -687,8 +705,8 @@ export const AccessibilityDemo: Story = {
|
|
|
687
705
|
</div>
|
|
688
706
|
|
|
689
707
|
<div className="space-y-3">
|
|
690
|
-
<span className="text-
|
|
691
|
-
<div className="
|
|
708
|
+
<span className="text-fm-secondary text-xs">Code Examples</span>
|
|
709
|
+
<div className="border-fm-divider-secondary bg-fm-surface-secondary text-fm-tertiary rounded border p-3 font-mono text-xs">
|
|
692
710
|
<div>aria-label="Toggle notifications"</div>
|
|
693
711
|
<div>aria-label="Show/hide password"</div>
|
|
694
712
|
<div>aria-label="Enable dark mode"</div>
|
|
@@ -697,11 +715,11 @@ export const AccessibilityDemo: Story = {
|
|
|
697
715
|
</div>
|
|
698
716
|
</div>
|
|
699
717
|
|
|
700
|
-
<div className="
|
|
701
|
-
<h4 className="mb-2 text-sm font-medium
|
|
718
|
+
<div className="border-fm-divider-warning bg-fm-surface-warning-sec rounded-lg border p-4">
|
|
719
|
+
<h4 className="text-fm-warning mb-2 text-sm font-medium">
|
|
702
720
|
Best Practices
|
|
703
721
|
</h4>
|
|
704
|
-
<ul className="space-y-1 text-xs
|
|
722
|
+
<ul className="text-fm-warning-sec space-y-1 text-xs">
|
|
705
723
|
<li>• Always provide descriptive aria-label attributes</li>
|
|
706
724
|
<li>• Include current state in label when helpful</li>
|
|
707
725
|
<li>• Use consistent toggle patterns across your app</li>
|
|
@@ -750,17 +768,17 @@ export const UseCases: Story = {
|
|
|
750
768
|
|
|
751
769
|
return (
|
|
752
770
|
<div className="space-y-8 p-8">
|
|
753
|
-
<h3 className="text-center text-lg font-medium
|
|
771
|
+
<h3 className="text-fm-primary text-center text-lg font-medium">
|
|
754
772
|
Real-world Use Cases
|
|
755
773
|
</h3>
|
|
756
774
|
|
|
757
775
|
<div className="space-y-8">
|
|
758
776
|
{/* Editor Toolbar */}
|
|
759
777
|
<div className="space-y-4">
|
|
760
|
-
<h4 className="text-sm font-medium
|
|
778
|
+
<h4 className="text-fm-secondary text-sm font-medium">
|
|
761
779
|
Editor Toolbar
|
|
762
780
|
</h4>
|
|
763
|
-
<div className="rounded-lg border
|
|
781
|
+
<div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-4">
|
|
764
782
|
<div className="flex items-center gap-1">
|
|
765
783
|
<Toggle
|
|
766
784
|
size="sm"
|
|
@@ -778,7 +796,7 @@ export const UseCases: Story = {
|
|
|
778
796
|
>
|
|
779
797
|
<span className="text-sm italic">I</span>
|
|
780
798
|
</Toggle>
|
|
781
|
-
<div className="mx-2 h-4 w-px
|
|
799
|
+
<div className="bg-fm-surface-tertiary mx-2 h-4 w-px"></div>
|
|
782
800
|
<Toggle
|
|
783
801
|
size="sm"
|
|
784
802
|
pressed={toolbar.list}
|
|
@@ -795,7 +813,7 @@ export const UseCases: Story = {
|
|
|
795
813
|
>
|
|
796
814
|
<span className="font-mono text-sm"></></span>
|
|
797
815
|
</Toggle>
|
|
798
|
-
<div className="mx-2 h-4 w-px
|
|
816
|
+
<div className="bg-fm-surface-tertiary mx-2 h-4 w-px"></div>
|
|
799
817
|
<Toggle size="sm" aria-label="Insert image">
|
|
800
818
|
<FileChartIcon />
|
|
801
819
|
</Toggle>
|
|
@@ -808,19 +826,19 @@ export const UseCases: Story = {
|
|
|
808
826
|
|
|
809
827
|
{/* User Preferences */}
|
|
810
828
|
<div className="space-y-4">
|
|
811
|
-
<h4 className="text-sm font-medium
|
|
829
|
+
<h4 className="text-fm-secondary text-sm font-medium">
|
|
812
830
|
User Preferences
|
|
813
831
|
</h4>
|
|
814
832
|
<div className="grid grid-cols-1 gap-3 lg:grid-cols-2">
|
|
815
833
|
<div className="space-y-3">
|
|
816
|
-
<div className="flex items-center justify-between rounded-lg border
|
|
834
|
+
<div className="border-fm-divider-secondary bg-fm-surface-secondary flex items-center justify-between rounded-lg border p-3">
|
|
817
835
|
<div className="flex items-center gap-3">
|
|
818
|
-
<AlertIcon className="h-4 w-4
|
|
836
|
+
<AlertIcon className="text-fm-icon-info h-4 w-4" />
|
|
819
837
|
<div>
|
|
820
|
-
<div className="text-
|
|
838
|
+
<div className="text-fm-primary text-sm">
|
|
821
839
|
Push Notifications
|
|
822
840
|
</div>
|
|
823
|
-
<div className="text-
|
|
841
|
+
<div className="text-fm-secondary text-xs">
|
|
824
842
|
Get notified of updates
|
|
825
843
|
</div>
|
|
826
844
|
</div>
|
|
@@ -832,12 +850,12 @@ export const UseCases: Story = {
|
|
|
832
850
|
/>
|
|
833
851
|
</div>
|
|
834
852
|
|
|
835
|
-
<div className="flex items-center justify-between rounded-lg border
|
|
853
|
+
<div className="border-fm-divider-secondary bg-fm-surface-secondary flex items-center justify-between rounded-lg border p-3">
|
|
836
854
|
<div className="flex items-center gap-3">
|
|
837
|
-
<TickCircleIcon className="h-4 w-4
|
|
855
|
+
<TickCircleIcon className="text-fm-icon-positive h-4 w-4" />
|
|
838
856
|
<div>
|
|
839
|
-
<div className="text-
|
|
840
|
-
<div className="text-
|
|
857
|
+
<div className="text-fm-primary text-sm">Auto Save</div>
|
|
858
|
+
<div className="text-fm-secondary text-xs">
|
|
841
859
|
Save changes automatically
|
|
842
860
|
</div>
|
|
843
861
|
</div>
|
|
@@ -851,12 +869,14 @@ export const UseCases: Story = {
|
|
|
851
869
|
</div>
|
|
852
870
|
|
|
853
871
|
<div className="space-y-3">
|
|
854
|
-
<div className="flex items-center justify-between rounded-lg border
|
|
872
|
+
<div className="border-fm-divider-secondary bg-fm-surface-secondary flex items-center justify-between rounded-lg border p-3">
|
|
855
873
|
<div className="flex items-center gap-3">
|
|
856
|
-
<EyeOpenIcon className="h-4 w-4
|
|
874
|
+
<EyeOpenIcon className="text-fm-icon-brand-secondary h-4 w-4" />
|
|
857
875
|
<div>
|
|
858
|
-
<div className="text-
|
|
859
|
-
|
|
876
|
+
<div className="text-fm-primary text-sm">
|
|
877
|
+
Preview Mode
|
|
878
|
+
</div>
|
|
879
|
+
<div className="text-fm-secondary text-xs">
|
|
860
880
|
Show live preview
|
|
861
881
|
</div>
|
|
862
882
|
</div>
|
|
@@ -868,12 +888,12 @@ export const UseCases: Story = {
|
|
|
868
888
|
/>
|
|
869
889
|
</div>
|
|
870
890
|
|
|
871
|
-
<div className="flex items-center justify-between rounded-lg border
|
|
891
|
+
<div className="border-fm-divider-secondary bg-fm-surface-secondary flex items-center justify-between rounded-lg border p-3">
|
|
872
892
|
<div className="flex items-center gap-3">
|
|
873
893
|
<span className="text-lg">🌙</span>
|
|
874
894
|
<div>
|
|
875
|
-
<div className="text-
|
|
876
|
-
<div className="text-
|
|
895
|
+
<div className="text-fm-primary text-sm">Dark Mode</div>
|
|
896
|
+
<div className="text-fm-secondary text-xs">
|
|
877
897
|
Use dark theme
|
|
878
898
|
</div>
|
|
879
899
|
</div>
|
|
@@ -890,10 +910,10 @@ export const UseCases: Story = {
|
|
|
890
910
|
|
|
891
911
|
{/* Filter Toolbar */}
|
|
892
912
|
<div className="space-y-4">
|
|
893
|
-
<h4 className="text-sm font-medium
|
|
913
|
+
<h4 className="text-fm-secondary text-sm font-medium">
|
|
894
914
|
Filter Toolbar
|
|
895
915
|
</h4>
|
|
896
|
-
<div className="rounded-lg border
|
|
916
|
+
<div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-4">
|
|
897
917
|
<div className="flex flex-wrap gap-2">
|
|
898
918
|
<Toggle
|
|
899
919
|
variant="outline"
|
|
@@ -934,8 +954,10 @@ export const UseCases: Story = {
|
|
|
934
954
|
|
|
935
955
|
{/* View Options */}
|
|
936
956
|
<div className="space-y-4">
|
|
937
|
-
<h4 className="text-sm font-medium
|
|
938
|
-
|
|
957
|
+
<h4 className="text-fm-secondary text-sm font-medium">
|
|
958
|
+
View Options
|
|
959
|
+
</h4>
|
|
960
|
+
<div className="border-fm-divider-secondary bg-fm-surface-secondary flex justify-center gap-1 rounded-lg border p-1">
|
|
939
961
|
<Toggle size="sm" defaultPressed aria-label="Grid view">
|
|
940
962
|
Grid
|
|
941
963
|
</Toggle>
|
|
@@ -973,14 +995,14 @@ export const ControlledVsUncontrolled: Story = {
|
|
|
973
995
|
|
|
974
996
|
return (
|
|
975
997
|
<div className="space-y-8 p-8">
|
|
976
|
-
<h3 className="text-center text-lg font-medium
|
|
998
|
+
<h3 className="text-fm-primary text-center text-lg font-medium">
|
|
977
999
|
Controlled vs Uncontrolled
|
|
978
1000
|
</h3>
|
|
979
1001
|
|
|
980
1002
|
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
981
1003
|
{/* Uncontrolled */}
|
|
982
1004
|
<div className="space-y-4">
|
|
983
|
-
<h4 className="text-sm font-medium
|
|
1005
|
+
<h4 className="text-fm-secondary text-sm font-medium">
|
|
984
1006
|
Uncontrolled (Internal State)
|
|
985
1007
|
</h4>
|
|
986
1008
|
<div className="space-y-3">
|
|
@@ -993,7 +1015,7 @@ export const ControlledVsUncontrolled: Story = {
|
|
|
993
1015
|
With Icon
|
|
994
1016
|
</Toggle>
|
|
995
1017
|
</div>
|
|
996
|
-
<div className="
|
|
1018
|
+
<div className="border-fm-divider-secondary bg-fm-surface-secondary text-fm-tertiary rounded border p-3 font-mono text-xs">
|
|
997
1019
|
<div>{"<Toggle>"}</div>
|
|
998
1020
|
<div>{" Default State"}</div>
|
|
999
1021
|
<div>{"</Toggle>"}</div>
|
|
@@ -1006,7 +1028,7 @@ export const ControlledVsUncontrolled: Story = {
|
|
|
1006
1028
|
|
|
1007
1029
|
{/* Controlled */}
|
|
1008
1030
|
<div className="space-y-4">
|
|
1009
|
-
<h4 className="text-sm font-medium
|
|
1031
|
+
<h4 className="text-fm-secondary text-sm font-medium">
|
|
1010
1032
|
Controlled (External State)
|
|
1011
1033
|
</h4>
|
|
1012
1034
|
<div className="space-y-3">
|
|
@@ -1037,7 +1059,7 @@ export const ControlledVsUncontrolled: Story = {
|
|
|
1037
1059
|
</div>
|
|
1038
1060
|
</div>
|
|
1039
1061
|
|
|
1040
|
-
<div className="
|
|
1062
|
+
<div className="border-fm-divider-secondary bg-fm-surface-secondary text-fm-tertiary rounded border p-3 font-mono text-xs">
|
|
1041
1063
|
<div>{"const [state, setState] = useState(false)"}</div>
|
|
1042
1064
|
<br />
|
|
1043
1065
|
<div>{"<Toggle"}</div>
|
|
@@ -1050,16 +1072,16 @@ export const ControlledVsUncontrolled: Story = {
|
|
|
1050
1072
|
</div>
|
|
1051
1073
|
</div>
|
|
1052
1074
|
|
|
1053
|
-
<div className="
|
|
1054
|
-
<h4 className="mb-2 text-sm font-medium
|
|
1075
|
+
<div className="border-fm-divider-secondary bg-fm-surface-info-sec rounded-lg border p-4">
|
|
1076
|
+
<h4 className="text-fm-info mb-2 text-sm font-medium">
|
|
1055
1077
|
When to Use Each
|
|
1056
1078
|
</h4>
|
|
1057
1079
|
<div className="grid grid-cols-1 gap-4 lg:grid-cols-2">
|
|
1058
1080
|
<div>
|
|
1059
|
-
<h5 className="mb-1 text-xs font-medium
|
|
1081
|
+
<h5 className="text-fm-info mb-1 text-xs font-medium">
|
|
1060
1082
|
Uncontrolled
|
|
1061
1083
|
</h5>
|
|
1062
|
-
<ul className="space-y-1 text-xs
|
|
1084
|
+
<ul className="text-fm-info-sec space-y-1 text-xs">
|
|
1063
1085
|
<li>• Simple on/off toggles</li>
|
|
1064
1086
|
<li>• No external state dependency</li>
|
|
1065
1087
|
<li>• Form elements</li>
|
|
@@ -1067,10 +1089,10 @@ export const ControlledVsUncontrolled: Story = {
|
|
|
1067
1089
|
</ul>
|
|
1068
1090
|
</div>
|
|
1069
1091
|
<div>
|
|
1070
|
-
<h5 className="mb-1 text-xs font-medium
|
|
1092
|
+
<h5 className="text-fm-info mb-1 text-xs font-medium">
|
|
1071
1093
|
Controlled
|
|
1072
1094
|
</h5>
|
|
1073
|
-
<ul className="space-y-1 text-xs
|
|
1095
|
+
<ul className="text-fm-info-sec space-y-1 text-xs">
|
|
1074
1096
|
<li>• Complex state management</li>
|
|
1075
1097
|
<li>• Multiple dependent toggles</li>
|
|
1076
1098
|
<li>• Form validation</li>
|