aural-ui 4.0.1 → 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 (174) hide show
  1. package/dist/components/aspect-ratio/AspectRatio.stories.tsx +290 -1228
  2. package/dist/components/avatar/Avatar.stories.tsx +219 -235
  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/card/Card.stories.tsx +619 -301
  8. package/dist/components/char-count/CharCount.stories.tsx +350 -248
  9. package/dist/components/checkbox/Checkbox.stories.tsx +309 -167
  10. package/dist/components/chip/Chip.stories.tsx +362 -168
  11. package/dist/components/circular-loader/CircularLoader.stories.tsx +221 -636
  12. package/dist/components/clamp-lines/ClampLines.stories.tsx +246 -117
  13. package/dist/components/collapsible/Collapsible.stories.tsx +391 -252
  14. package/dist/components/command/Command.stories.tsx +530 -867
  15. package/dist/components/dialog/Dialog.stories.tsx +501 -950
  16. package/dist/components/divider/Divider.stories.tsx +264 -527
  17. package/dist/components/dot-loader/DotLoader.stories.tsx +256 -257
  18. package/dist/components/drawer/Drawer.stories.tsx +659 -1023
  19. package/dist/components/dropdown/Dropdown.stories.tsx +643 -1028
  20. package/dist/components/form/Form.stories.tsx +560 -274
  21. package/dist/components/helper-text/HelperText.stories.tsx +199 -200
  22. package/dist/components/hover-card/HoverCard.stories.tsx +318 -1254
  23. package/dist/components/icon-button/IconButton.stories.tsx +837 -194
  24. package/dist/components/if-else/if-else.stories.tsx +370 -83
  25. package/dist/components/input/Input.stories.tsx +436 -368
  26. package/dist/components/label/Label.stories.tsx +156 -154
  27. package/dist/components/list/List.stories.tsx +484 -835
  28. package/dist/components/marquee/Marquee.stories.tsx +356 -712
  29. package/dist/components/otp-inputs/OtpInputs.stories.tsx +352 -422
  30. package/dist/components/overlay/Overlay.stories.tsx +452 -824
  31. package/dist/components/pagination/Pagination.stories.tsx +721 -210
  32. package/dist/components/popover/Popover.stories.tsx +481 -896
  33. package/dist/components/radio/Radio.stories.tsx +432 -124
  34. package/dist/components/resizable/Resizable.stories.tsx +495 -799
  35. package/dist/components/scroll-area/ScrollArea.stories.tsx +383 -1059
  36. package/dist/components/search/Search.stories.tsx +312 -595
  37. package/dist/components/select/Select.stories.tsx +684 -789
  38. package/dist/components/sheet/Sheet.stories.tsx +671 -950
  39. package/dist/components/skelton/Skelton.stories.tsx +230 -764
  40. package/dist/components/slider/Slider.stories.tsx +383 -760
  41. package/dist/components/stepper/Stepper.stories.tsx +371 -514
  42. package/dist/components/switch/Switch.stories.tsx +461 -208
  43. package/dist/components/switch-case/SwitchCase.stories.tsx +367 -188
  44. package/dist/components/table/Table.stories.tsx +770 -916
  45. package/dist/components/tabs/Tabs.stories.tsx +458 -1455
  46. package/dist/components/tag/Tag.stories.tsx +714 -542
  47. package/dist/components/textarea/TextArea.stories.tsx +621 -562
  48. package/dist/components/thumbnail-tags/ThumbnailTags.stories.tsx +228 -154
  49. package/dist/components/toast/Toast.stories.tsx +452 -1339
  50. package/dist/components/toggle/Toggle.stories.tsx +488 -931
  51. package/dist/components/tooltip/Tooltip.stories.tsx +344 -1388
  52. package/dist/components/typography/Typography.stories.tsx +406 -89
  53. package/dist/hooks/use-change-state/UseChangeState.stories.tsx +309 -606
  54. package/dist/hooks/use-previous/UsePrevious.stories.tsx +367 -917
  55. package/dist/hooks/use-standalone-pagination/UseStandalonePagination.stories.tsx +639 -867
  56. package/dist/icons/Icons.stories.tsx +0 -12
  57. package/dist/icons/ai-avatar-icon/AiAvatarIcon.stories.tsx +223 -1060
  58. package/dist/icons/alert-icon/AlertIcon.stories.tsx +106 -968
  59. package/dist/icons/all-icons.tsx +37 -16
  60. package/dist/icons/angle-down-icon/AngleDownIcon.stories.tsx +137 -1010
  61. package/dist/icons/apple-logo-icon/AppleLogoIcon.stories.tsx +145 -935
  62. package/dist/icons/arrow-box-left-icon/ArrowBoxLeftIcon.stories.tsx +132 -1046
  63. package/dist/icons/arrow-corner-up-left-icon/ArrowCornerUpLeftIcon.stories.tsx +134 -986
  64. package/dist/icons/arrow-corner-up-right-icon/ArrowCornerUpRightIcon.stories.tsx +135 -1028
  65. package/dist/icons/arrow-left-icon/ArrowLeftIcon.stories.tsx +133 -971
  66. package/dist/icons/arrow-right-icon/ArrowRightIcon.stories.tsx +145 -1123
  67. package/dist/icons/arrow-right-up-icon/ArrowRightUpIcon.stories.tsx +143 -1252
  68. package/dist/icons/art-board-icon/ArtBoardIcon.stories.tsx +123 -632
  69. package/dist/icons/audio-bar-icon/AudioBarIcon.stories.tsx +141 -1223
  70. package/dist/icons/backward-ten-seconds-icon/BackwardTenSecondsIcon.stories.tsx +164 -1018
  71. package/dist/icons/bubble-check-icon/BubbleCheckIcon.stories.tsx +121 -1236
  72. package/dist/icons/bubble-crossed-icon/BubbleCrossedIcon.stories.tsx +121 -1213
  73. package/dist/icons/bubble-sparkle-icon/BubbleSparkleIcon.stories.tsx +116 -893
  74. package/dist/icons/camera-icon/CameraIcon.stories.tsx +109 -1254
  75. package/dist/icons/capital-a-letter-icon/CapitalALetterIcon.stories.tsx +114 -975
  76. package/dist/icons/chevron-double-left-icon/ChevronDoubleLeftIcon.stories.tsx +157 -994
  77. package/dist/icons/chevron-double-right-icon/ChevronDoubleRightIcon.stories.tsx +160 -992
  78. package/dist/icons/chevron-down-icon/ChevronDownIcon.stories.tsx +140 -970
  79. package/dist/icons/chevron-left-icon/ChevronLeftIcon.stories.tsx +126 -993
  80. package/dist/icons/chevron-right-icon/ChevronRightIcon.stories.tsx +144 -987
  81. package/dist/icons/chevron-up-icon/ChevronUpIcon.stories.tsx +141 -1007
  82. package/dist/icons/circle-tick-icon/CircleTickIcon.stories.tsx +147 -1187
  83. package/dist/icons/circular-play-icon/CircularPlayIcon.stories.tsx +110 -476
  84. package/dist/icons/coin-icon/CoinIcon.stories.tsx +120 -1364
  85. package/dist/icons/coin-toons-icon/CoinToonsIcon.stories.tsx +113 -1360
  86. package/dist/icons/column-wide-add-icon/ColumnWideAddIcon.stories.tsx +111 -942
  87. package/dist/icons/command-icon/CommandIcon.stories.tsx +124 -1087
  88. package/dist/icons/copy-icon/CopyIcon.stories.tsx +119 -996
  89. package/dist/icons/cross-circle-icon/CrossCircleIcon.stories.tsx +144 -1046
  90. package/dist/icons/cross-icon/CrossIcon.stories.tsx +136 -999
  91. package/dist/icons/download-icon/DownloadIcon.stories.tsx +123 -857
  92. package/dist/icons/edit-big-icon/EditBigIcon.stories.tsx +121 -1080
  93. package/dist/icons/email-icon/EmailIcon.stories.tsx +112 -979
  94. package/dist/icons/expand-icon/ExpandIcon.stories.tsx +109 -1146
  95. package/dist/icons/eye-close-icon/EyeCloseIcon.stories.tsx +141 -1068
  96. package/dist/icons/eye-open-icon/EyeOpenIcon.stories.tsx +140 -1081
  97. package/dist/icons/feature-shine-icon/FeatureShineIcon.stories.tsx +124 -1050
  98. package/dist/icons/file-chart-icon/FileChartIcon.stories.tsx +123 -1091
  99. package/dist/icons/file-text-icon/FileTextIcon.stories.tsx +122 -633
  100. package/dist/icons/filter-bar-row-icon/FilterBarRowIcon.stories.tsx +116 -1087
  101. package/dist/icons/forward-ten-seconds-icon/ForwardTenSecondsIcon.stories.tsx +166 -1020
  102. package/dist/icons/git-branch-icon/GitBranchIcon.stories.tsx +112 -1182
  103. package/dist/icons/git-fork-icon/GitForkIcon.stories.tsx +112 -1155
  104. package/dist/icons/globe-icon/GlobeIcon.stories.tsx +127 -325
  105. package/dist/icons/google-logo-icon/GoogleLogoIcon.stories.tsx +142 -985
  106. package/dist/icons/grip-vertical-icon/GripVerticalIcon.stories.tsx +116 -1217
  107. package/dist/icons/head-icon/HeadIcon.stories.tsx +108 -953
  108. package/dist/icons/heart-icon/HeartIcon.stories.tsx +117 -1060
  109. package/dist/icons/image-avatar-sparkle-icon/ImageAvatarSparkleIcon.stories.tsx +116 -716
  110. package/dist/icons/image-icon/ImageIcon.stories.tsx +102 -1164
  111. package/dist/icons/import-folder-icon/ImportFolderIcon.stories.tsx +108 -1233
  112. package/dist/icons/import-left-arrow-folder-icon/ImportLeftArrowFolderIcon.stories.tsx +133 -1289
  113. package/dist/icons/indian-flag-icon/IndianFlagIcon.stories.tsx +155 -1012
  114. package/dist/icons/instagram-icon/InstagramIcon.stories.tsx +158 -1438
  115. package/dist/icons/layout-column-icon/LayoutColumnIcon.stories.tsx +121 -1011
  116. package/dist/icons/layout-left-icon/LayoutLeftIcon.stories.tsx +116 -981
  117. package/dist/icons/layout-right-icon/LayoutRightIcon.stories.tsx +116 -979
  118. package/dist/icons/light-bulb-simple-icon/LightBulbSimpleIcon.stories.tsx +105 -1252
  119. package/dist/icons/linked-in-icon/LinkedInIcon.stories.tsx +151 -1554
  120. package/dist/icons/magic-book-icon/MagicBookIcon.stories.tsx +107 -1227
  121. package/dist/icons/magic-edit-icon/MagicEditIcon.stories.tsx +116 -707
  122. package/dist/icons/maintenance-icon/MaintenanceIcon.stories.tsx +119 -1226
  123. package/dist/icons/message-icon/MessageIcon.stories.tsx +111 -557
  124. package/dist/icons/minimize-icon/MinimizeIcon.stories.tsx +112 -1198
  125. package/dist/icons/moon-icon/MoonIcon.stories.tsx +117 -557
  126. package/dist/icons/move-horizontal-icon/MoveHorizontalIcon.stories.tsx +106 -1235
  127. package/dist/icons/move-vertical-icon/MoveVerticalIcon.stories.tsx +112 -1185
  128. package/dist/icons/musical-note-icon/MusicalNoteIcon.stories.tsx +116 -1012
  129. package/dist/icons/notepad-icon/NotepadIcon.stories.tsx +108 -1137
  130. package/dist/icons/notes-icon/NotesIcon.stories.tsx +116 -1138
  131. package/dist/icons/page-search-icon/PageSearchIcon.stories.tsx +106 -1146
  132. package/dist/icons/page-text-icon/PageTextIcon.stories.tsx +119 -719
  133. package/dist/icons/paint-roll-icon/PaintRollIcon.stories.tsx +110 -999
  134. package/dist/icons/paper-plane-icon/PaperPlaneIcon.stories.tsx +109 -912
  135. package/dist/icons/pause-icon/PauseIcon.stories.tsx +110 -1041
  136. package/dist/icons/pencil-icon/PencilIcon.stories.tsx +112 -1109
  137. package/dist/icons/phone-icon/PhoneIcon.stories.tsx +112 -1023
  138. package/dist/icons/plus-icon/PlusIcon.stories.tsx +103 -1132
  139. package/dist/icons/pocket-studio-icon/PocketStudioIcon.stories.tsx +104 -870
  140. package/dist/icons/scroll-down-icon/ScrollDownIcon.stories.tsx +99 -476
  141. package/dist/icons/search-icon/SearchIcon.stories.tsx +108 -1161
  142. package/dist/icons/setting-icon/SettingIcon.stories.tsx +104 -1009
  143. package/dist/icons/share-icon/ShareIcon.stories.tsx +117 -1064
  144. package/dist/icons/shield-icon/ShieldIcon.stories.tsx +114 -974
  145. package/dist/icons/site-logo-icon/SiteLogoIcon.stories.tsx +134 -1160
  146. package/dist/icons/skip-backward-icon/SkipBackwardIcon.stories.tsx +169 -1017
  147. package/dist/icons/skip-forward-icon/SkipForwardIcon.stories.tsx +161 -1016
  148. package/dist/icons/sparkles-soft-icon/SparklesSoftIcon.stories.tsx +102 -1001
  149. package/dist/icons/spinner-gradient-icon/SpinnerGradientIcon.stories.tsx +155 -593
  150. package/dist/icons/spinner-solid-icon/SpinnerSolidIcon.stories.tsx +155 -608
  151. package/dist/icons/spinner-solid-neutral-icon/SpinnerSolidINeutralcon.stories.tsx +142 -712
  152. package/dist/icons/star-icon/StarIcon.stories.tsx +120 -946
  153. package/dist/icons/store-coin-icon/StoreCoinIcon.stories.tsx +109 -1013
  154. package/dist/icons/suggestion-icon/SuggestionIcon.stories.tsx +113 -891
  155. package/dist/icons/sun-icon/SunIcon.stories.tsx +117 -864
  156. package/dist/icons/text-color-icon/TextColorIcon.stories.tsx +113 -989
  157. package/dist/icons/text-indicator-icon/TextIndicatorIcon.stories.tsx +120 -1027
  158. package/dist/icons/threads-icon/ThreadsIcon.stories.tsx +153 -1476
  159. package/dist/icons/tick-circle-icon/TickCircleIcon.stories.tsx +143 -1187
  160. package/dist/icons/tick-icon/TickIcon.stories.tsx +142 -1322
  161. package/dist/icons/trash-icon/TrashIcon.stories.tsx +105 -970
  162. package/dist/icons/twitter-x-icon/TwitterXIcon.stories.tsx +154 -1457
  163. package/dist/icons/upload-icon/UploadIcon.stories.tsx +112 -930
  164. package/dist/icons/vertical-menu-icon/VerticalMenuIcon.stories.tsx +115 -1019
  165. package/dist/icons/video-play-list-icon/VideoPlaylistIcon.stories.tsx +122 -1092
  166. package/dist/icons/voice-playing-icon/VoicePlayingIcon.stories.tsx +120 -1401
  167. package/dist/icons/volume-full-icon/VolumeFullIcon.stories.tsx +107 -1212
  168. package/dist/icons/volume-half-icon/VolumeHalfIcon.stories.tsx +109 -1122
  169. package/dist/icons/volume-off-icon/VolumeOffIcon.stories.tsx +112 -1124
  170. package/dist/icons/warning-icon/WarningIcon.stories.tsx +119 -1083
  171. package/dist/icons/youtube-icon/YoutubeIcon.stories.tsx +158 -983
  172. package/dist/index.cjs +1 -1
  173. package/dist/index.js +1 -1
  174. package/package.json +1 -1
@@ -1,6 +1,20 @@
1
1
  import React from "react"
2
2
  import type { Meta, StoryObj } from "@storybook/react-vite"
3
3
 
4
+ import { AngleDownIcon } from "src/ui/icons/angle-down-icon"
5
+ import { ChevronDownIcon } from "src/ui/icons/chevron-down-icon"
6
+ import { GripVerticalIcon } from "src/ui/icons/grip-vertical-icon"
7
+ import { MoveVerticalIcon } from "src/ui/icons/move-vertical-icon"
8
+ import {
9
+ IconColorVariations,
10
+ IconDefaultCanvas,
11
+ IconPlaygroundCanvas,
12
+ IconSizeVariations,
13
+ IconUsageCanvas,
14
+ IconUsageSection,
15
+ } from "src/ui/story-spec/icons/icon-story-canvas"
16
+ import { AuralIconDocsPage } from "src/ui/story-spec/icons/icon-story-docs-page"
17
+
4
18
  import { ScrollDownIcon } from "."
5
19
 
6
20
  const meta: Meta<typeof ScrollDownIcon> = {
@@ -18,371 +32,69 @@ const meta: Meta<typeof ScrollDownIcon> = {
18
32
  },
19
33
  docs: {
20
34
  page: () => (
21
- <>
22
- <style>
23
- {`
24
- .sbdocs-wrapper { padding: 0 !important; max-width: none !important; background: transparent !important; }
25
- .sbdocs-content { max-width: none !important; padding: 0 !important; margin: 0 !important; background: transparent !important; }
26
- .docs-story, .sbdocs { background: transparent !important; }
27
- body, #storybook-docs { background: var(--color-fm-surface-primary) !important; }
28
- .sbdocs-preview { background: transparent !important; border: none !important; }
29
- .sbdocs-h1, .sbdocs-h2, .sbdocs-h3, .sbdocs-h4, .sbdocs-h5, .sbdocs-h6 { color: var(--color-fm-icon-active) !important; }
30
- .sbdocs-p, .sbdocs-li { color: var(--color-fm-secondary) !important; }
31
- .sbdocs-code { background: var(--color-fm-surface-secondary) !important; color: var(--color-fm-secondary-500) !important; border: 1px solid var(--color-fm-divider-secondary) !important; }
32
- .sbdocs-pre { background: var(--color-fm-surface-secondary) !important; border: 1px solid var(--color-fm-divider-secondary) !important; }
33
- .sbdocs-table { background: var(--color-fm-surface-secondary) !important; border: 1px solid var(--color-fm-divider-secondary) !important; }
34
- .sbdocs-table th { background: var(--color-fm-surface-secondary) !important; color: var(--color-fm-icon-active) !important; border-bottom: 1px solid var(--color-fm-divider-secondary) !important; }
35
- .sbdocs-table td { color: var(--color-fm-secondary) !important; border-bottom: 1px solid var(--color-fm-divider-tertiary) !important; }
36
- `}
37
- </style>
38
-
39
- <div className="bg-fm-surface-primary min-h-screen">
40
- <div className="border-fm-divider-secondary bg-fm-surface-secondary relative overflow-hidden border-b backdrop-blur-xl">
41
- <div className="from-fm-secondary-500/10 to-fm-secondary-500/10 absolute inset-0 bg-linear-to-r via-transparent" />
42
- <div className="relative !mx-auto max-w-7xl px-6 py-16">
43
- <div className="!space-y-6 text-center">
44
- <div className="border-fm-secondary-500/30 from-fm-secondary-500/20 to-fm-secondary-500/20 !mx-auto flex h-24 w-24 items-center justify-center rounded-2xl border bg-linear-to-br">
45
- <ScrollDownIcon className="text-fm-icon-active h-12 w-12" />
46
- </div>
47
- <h1 className="!text-fm-primary text-5xl font-bold">
48
- ScrollDownIcon
49
- </h1>
50
- <p className="text-fm-secondary! !mx-auto max-w-3xl text-xl leading-relaxed">
51
- A double-chevron scroll-down icon for scroll hints,
52
- &quot;see more&quot; prompts, and navigation. Built with
53
- accessibility in mind using Radix UI&apos;s AccessibleIcon
54
- wrapper.
55
- </p>
56
- <div className="flex items-center justify-center gap-8 pt-8">
57
- <div className="text-center">
58
- <div className="text-fm-secondary-600 text-3xl font-bold">
59
- Scroll
60
- </div>
61
- <div className="text-fm-tertiary text-sm">
62
- Scroll hint / see more
63
- </div>
64
- </div>
65
- <div className="bg-fm-divider-primary h-8 w-px" />
66
- <div className="text-center">
67
- <div className="text-fm-secondary-600 text-3xl font-bold">
68
- Accessible
69
- </div>
70
- <div className="text-fm-tertiary text-sm">
71
- Screen reader friendly
72
- </div>
73
- </div>
74
- <div className="bg-fm-divider-primary h-8 w-px" />
75
- <div className="text-center">
76
- <div className="text-fm-icon-info text-3xl font-bold">
77
- Minimal
78
- </div>
79
- <div className="text-fm-tertiary text-sm">
80
- Clean stroke design
81
- </div>
82
- </div>
83
- </div>
84
- </div>
85
- </div>
86
- </div>
87
-
88
- <div className="!mx-auto max-w-7xl !space-y-16 px-6 py-12">
89
- <div className="!space-y-8">
90
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
91
- Quick Start
92
- </h2>
93
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
94
- <div className="!space-y-4">
95
- <h3 className="text-fm-secondary-600! text-xl font-semibold">
96
- Basic Usage
97
- </h3>
98
- <div className="bg-fm-surface-secondary rounded-lg p-4">
99
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
100
- {`import { ScrollDownIcon } from "@icons/scroll-down-icon"
35
+ <AuralIconDocsPage
36
+ accentToken="info"
37
+ features={[
38
+ { title: "Scroll", description: "Scroll down indicator" },
39
+ { title: "Navigate", description: "Navigate to next section" },
40
+ { title: "Accessible", description: "ARIA-ready by default" },
41
+ ]}
42
+ quickStart={{
43
+ codeExample: `import { ScrollDownIcon } from "src/ui/icons/scroll-down-icon"
101
44
 
102
45
  function ScrollHint() {
103
46
  return (
104
- <div className="flex justify-center py-4">
105
- <ScrollDownIcon className="h-8 w-8 text-white" />
47
+ <div className="flex flex-col items-center gap-1">
48
+ <ScrollDownIcon className="h-5 w-5 text-fm-icon-inactive" />
49
+ <span className="text-xs">Scroll down</span>
106
50
  </div>
107
51
  )
108
- }`}
109
- </pre>
110
- </div>
111
- </div>
112
- <div className="!space-y-4">
113
- <h3 className="text-fm-secondary-600! text-xl font-semibold">
114
- Live Preview
115
- </h3>
116
- <div className="border-fm-divider-secondary bg-fm-surface-secondary flex h-32 items-center justify-center rounded-lg border">
117
- <ScrollDownIcon className="text-fm-icon-active h-10 w-10" />
118
- </div>
119
- </div>
120
- </div>
121
- </div>
122
-
123
- <div className="!space-y-8">
124
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
125
- Props & Configuration
126
- </h2>
127
- <div className="border-fm-divider-secondary bg-fm-surface-secondary overflow-hidden rounded-lg border">
128
- <div className="bg-fm-surface-secondary p-4">
129
- <h3 className="text-fm-icon-active! text-xl font-semibold">
130
- Props
131
- </h3>
132
- </div>
133
- <table className="!my-0 w-full">
134
- <thead className="bg-fm-surface-secondary">
135
- <tr className="border-fm-divider-secondary border-b">
136
- <th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
137
- Prop
138
- </th>
139
- <th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
140
- Type
141
- </th>
142
- <th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
143
- Default
144
- </th>
145
- <th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
146
- Description
147
- </th>
148
- </tr>
149
- </thead>
150
- <tbody>
151
- <tr className="bg-fm-surface-secondary!">
152
- <td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
153
- withAccessibility
154
- </td>
155
- <td className="text-fm-secondary! px-6 py-4 text-sm">
156
- boolean
157
- </td>
158
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
159
- true
160
- </td>
161
- <td className="text-fm-secondary! px-6 py-4 text-sm">
162
- Whether to wrap the icon with accessibility feature
163
- </td>
164
- </tr>
165
- <tr className="border-fm-divider-tertiary bg-fm-surface-secondary! border-b">
166
- <td className="text-fm-secondary-600! px-6 py-4 font-mono text-sm">
167
- width
168
- </td>
169
- <td className="text-fm-secondary! px-6 py-4 text-sm">
170
- number | string
171
- </td>
172
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
173
- 26
174
- </td>
175
- <td className="text-fm-secondary! px-6 py-4 text-sm">
176
- Width of the icon
177
- </td>
178
- </tr>
179
- <tr className="border-fm-divider-tertiary bg-fm-surface-secondary! border-b">
180
- <td className="text-fm-secondary-600! px-6 py-4 font-mono text-sm">
181
- height
182
- </td>
183
- <td className="text-fm-secondary! px-6 py-4 text-sm">
184
- number | string
185
- </td>
186
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
187
- 26
188
- </td>
189
- <td className="text-fm-secondary! px-6 py-4 text-sm">
190
- Height of the icon
191
- </td>
192
- </tr>
193
- <tr className="border-fm-divider-tertiary border-b">
194
- <td className="text-fm-secondary-600! px-6 py-4 font-mono text-sm">
195
- stroke
196
- </td>
197
- <td className="text-fm-secondary! px-6 py-4 text-sm">
198
- string
199
- </td>
200
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
201
- white (in SVG)
202
- </td>
203
- <td className="text-fm-secondary! px-6 py-4 text-sm">
204
- Stroke color; use className (e.g. text-fm-icon-active)
205
- to override
206
- </td>
207
- </tr>
208
- <tr className="border-fm-divider-tertiary bg-fm-surface-secondary! border-b">
209
- <td className="text-fm-secondary-600! px-6 py-4 font-mono text-sm">
210
- strokeWidth
211
- </td>
212
- <td className="text-fm-secondary! px-6 py-4 text-sm">
213
- string | number
214
- </td>
215
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
216
- 1.17857
217
- </td>
218
- <td className="text-fm-secondary! px-6 py-4 text-sm">
219
- Width of the stroke
220
- </td>
221
- </tr>
222
- <tr className="border-fm-divider-tertiary bg-fm-surface-secondary! border-b">
223
- <td className="text-fm-secondary-600! px-6 py-4 font-mono text-sm">
224
- className
225
- </td>
226
- <td className="text-fm-secondary! px-6 py-4 text-sm">
227
- string
228
- </td>
229
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
230
- -
231
- </td>
232
- <td className="text-fm-secondary! px-6 py-4 text-sm">
233
- CSS classes for styling
234
- </td>
235
- </tr>
236
- <tr className="bg-fm-surface-secondary!">
237
- <td className="text-fm-secondary-600! px-6 py-4 font-mono text-sm">
238
- ...svgProps
239
- </td>
240
- <td className="text-fm-secondary! px-6 py-4 text-sm">
241
- SVGProps
242
- </td>
243
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
244
- -
245
- </td>
246
- <td className="text-fm-secondary! px-6 py-4 text-sm">
247
- All standard SVG element props
248
- </td>
249
- </tr>
250
- </tbody>
251
- </table>
252
- </div>
253
- </div>
254
-
255
- <div className="!space-y-8">
256
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
257
- Size Variations
258
- </h2>
259
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-8">
260
- <div className="bg-fm-surface-secondary flex items-end justify-center gap-6 rounded-lg p-6">
261
- <div className="text-center">
262
- <ScrollDownIcon className="text-fm-icon-active !mx-auto mb-2 h-4 w-4" />
263
- <span className="text-fm-tertiary text-xs">16px</span>
264
- </div>
265
- <div className="text-center">
266
- <ScrollDownIcon className="text-fm-icon-active !mx-auto mb-2 h-6 w-6" />
267
- <span className="text-fm-tertiary text-xs">24px</span>
268
- </div>
269
- <div className="text-center">
270
- <ScrollDownIcon className="text-fm-icon-active !mx-auto mb-2 h-8 w-8" />
271
- <span className="text-fm-tertiary text-xs">32px</span>
272
- </div>
273
- <div className="text-center">
274
- <ScrollDownIcon className="text-fm-icon-active !mx-auto mb-2 h-10 w-10" />
275
- <span className="text-fm-tertiary text-xs">40px</span>
276
- </div>
277
- <div className="text-center">
278
- <ScrollDownIcon className="text-fm-icon-active !mx-auto mb-2 h-12 w-12" />
279
- <span className="text-fm-tertiary text-xs">48px</span>
280
- </div>
281
- </div>
282
- </div>
52
+ }`,
53
+ livePreview: (
54
+ <div className="flex flex-col items-center gap-1">
55
+ <ScrollDownIcon className="text-fm-icon-inactive h-6 w-6" />
283
56
  </div>
284
-
285
- <div className="!space-y-8">
286
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
287
- Usage Examples
288
- </h2>
289
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
290
- <div className="!space-y-4">
291
- <h3 className="text-fm-secondary-600! text-lg font-semibold">
292
- Scroll hint
293
- </h3>
294
- <div className="border-fm-divider-secondary bg-fm-surface-secondary flex flex-col items-center gap-2 rounded-lg border p-6">
295
- <span className="text-fm-secondary text-sm">
296
- Scroll for more
297
- </span>
298
- <ScrollDownIcon className="text-fm-icon-active/80 h-8 w-8" />
299
- </div>
300
- </div>
301
- <div className="!space-y-4">
302
- <h3 className="text-fm-secondary-600! text-lg font-semibold">
303
- Hero CTA
304
- </h3>
305
- <div className="border-fm-divider-secondary bg-fm-surface-secondary flex flex-col items-center gap-4 rounded-lg border p-8">
306
- <h4 className="text-fm-icon-active text-lg font-semibold">
307
- Welcome
308
- </h4>
309
- <p className="text-fm-secondary text-center text-sm">
310
- Explore below
311
- </p>
312
- <button className="border-fm-divider-primary bg-fm-surface-secondary hover:bg-fm-surface-secondary flex items-center justify-center rounded-full border p-2 transition-colors">
313
- <ScrollDownIcon className="text-fm-icon-active h-6 w-6" />
314
- </button>
315
- </div>
316
- </div>
317
- </div>
318
- </div>
319
-
320
- <div className="!space-y-8">
321
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
322
- Accessibility
323
- </h2>
324
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-6">
325
- <ul className="text-fm-secondary! !space-y-2 text-sm">
326
- <li>
327
- Uses Radix UI AccessibleIcon with label &quot;Scroll down
328
- icon&quot;
329
- </li>
330
- <li>
331
- When used in a button, add aria-label e.g. &quot;Scroll
332
- down&quot; or &quot;See more content&quot;
333
- </li>
334
- <li>
335
- Ensure sufficient touch target size for interactive use
336
- </li>
337
- </ul>
338
- </div>
339
- </div>
340
- </div>
341
-
342
- <div className="border-fm-divider-secondary bg-fm-surface-secondary border-t backdrop-blur-xl">
343
- <div className="!mx-auto max-w-7xl px-6 py-8">
344
- <div className="!space-y-4 text-center">
345
- <p className="text-fm-tertiary!">
346
- ScrollDownIcon is part of the Aural UI icon library for
347
- scroll and navigation hints.
348
- </p>
349
- <p className="text-fm-placeholder! text-sm">
350
- Uses Radix UI AccessibleIcon for screen reader
351
- compatibility.
352
- </p>
353
- </div>
354
- </div>
355
- </div>
356
- </div>
357
- </>
57
+ ),
58
+ }}
59
+ relatedIcons={[
60
+ {
61
+ name: "ChevronDownIcon",
62
+ description: "Chevron pointing down",
63
+ icon: ChevronDownIcon,
64
+ accentToken: "info",
65
+ },
66
+ {
67
+ name: "AngleDownIcon",
68
+ description: "Angle / caret down icon",
69
+ icon: AngleDownIcon,
70
+ accentToken: "positive",
71
+ },
72
+ {
73
+ name: "MoveVerticalIcon",
74
+ description: "Move vertically icon",
75
+ icon: MoveVerticalIcon,
76
+ accentToken: "warning",
77
+ },
78
+ {
79
+ name: "GripVerticalIcon",
80
+ description: "Vertical grip drag handle",
81
+ icon: GripVerticalIcon,
82
+ accentToken: "negative",
83
+ },
84
+ ]}
85
+ />
358
86
  ),
359
87
  },
360
88
  },
361
89
  tags: ["autodocs"],
362
90
  argTypes: {
363
- width: {
364
- control: { type: "range", min: 8, max: 96, step: 2 },
365
- description: "Width of the icon in pixels",
366
- },
367
- height: {
368
- control: { type: "range", min: 8, max: 96, step: 2 },
369
- description: "Height of the icon in pixels",
91
+ className: {
92
+ control: "text",
93
+ description: "CSS classes including color token",
370
94
  },
371
95
  withAccessibility: {
372
96
  control: "boolean",
373
- description: "Whether to wrap the icon with accessibility features",
374
- },
375
- stroke: {
376
- control: "color",
377
- description: "Stroke color of the icon",
378
- },
379
- strokeWidth: {
380
- control: { type: "range", min: 0.5, max: 3, step: 0.25 },
381
- description: "Width of the stroke",
382
- },
383
- className: {
384
- control: "text",
385
- description: "CSS classes for styling",
97
+ description: "Wrap with accessibility label",
386
98
  },
387
99
  },
388
100
  }
@@ -390,156 +102,67 @@ function ScrollHint() {
390
102
  export default meta
391
103
  type Story = StoryObj<typeof ScrollDownIcon>
392
104
 
393
- const storyParameters = {
394
- backgrounds: {
395
- default: "dark",
396
- values: [
397
- { name: "dark", value: "var(--color-fm-surface-primary)" },
398
- { name: "darker", value: "var(--color-fm-neutral-0)" },
399
- ],
400
- },
401
- }
402
-
403
105
  export const Default: Story = {
404
106
  args: {
405
- width: 26,
406
- height: 26,
407
- className: "text-fm-icon-active",
107
+ className: "h-6 w-6 text-fm-icon-inactive",
408
108
  withAccessibility: true,
409
109
  },
410
- parameters: storyParameters,
411
110
  render: (args) => (
412
- <div className="from-fm-surface-primary to-fm-surface-secondary flex h-32 min-h-dvh items-center justify-center rounded-lg bg-linear-to-br">
111
+ <IconDefaultCanvas>
413
112
  <ScrollDownIcon {...args} />
414
- </div>
113
+ </IconDefaultCanvas>
415
114
  ),
416
115
  }
417
116
 
418
117
  export const SizeVariations: Story = {
419
- parameters: {
420
- ...storyParameters,
421
- docs: {
422
- description: {
423
- story: "ScrollDownIcon in different sizes for scroll hints and CTAs.",
424
- },
425
- },
426
- },
427
- render: () => (
428
- <div className="from-fm-surface-primary to-fm-surface-secondary flex h-64 min-h-dvh items-center justify-center gap-8 rounded-lg bg-linear-to-br p-8">
429
- <div className="text-center">
430
- <ScrollDownIcon className="text-fm-icon-active !mx-auto mb-2 h-4 w-4" />
431
- <span className="text-fm-tertiary text-xs">16px</span>
432
- </div>
433
- <div className="text-center">
434
- <ScrollDownIcon className="text-fm-icon-active !mx-auto mb-2 h-6 w-6" />
435
- <span className="text-fm-tertiary text-xs">24px</span>
436
- </div>
437
- <div className="text-center">
438
- <ScrollDownIcon className="text-fm-icon-active !mx-auto mb-2 h-8 w-8" />
439
- <span className="text-fm-tertiary text-xs">32px</span>
440
- </div>
441
- <div className="text-center">
442
- <ScrollDownIcon className="text-fm-icon-active !mx-auto mb-2 h-10 w-10" />
443
- <span className="text-fm-tertiary text-xs">40px</span>
444
- </div>
445
- <div className="text-center">
446
- <ScrollDownIcon className="text-fm-icon-active !mx-auto mb-2 h-12 w-12" />
447
- <span className="text-fm-tertiary text-xs">48px</span>
448
- </div>
449
- </div>
450
- ),
118
+ render: () => <IconSizeVariations icon={ScrollDownIcon} />,
451
119
  }
452
120
 
453
121
  export const ColorVariations: Story = {
454
- parameters: {
455
- ...storyParameters,
456
- docs: {
457
- description: {
458
- story: "ScrollDownIcon with different colors for context and branding.",
459
- },
460
- },
461
- },
462
- render: () => (
463
- <div className="from-fm-surface-primary to-fm-surface-secondary grid min-h-dvh grid-cols-2 items-center justify-center gap-6 rounded-lg bg-linear-to-br p-8 md:grid-cols-4">
464
- <div className="text-center">
465
- <div className="border-fm-secondary-500/30 bg-fm-secondary-500/20 !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
466
- <ScrollDownIcon className="text-fm-icon-active h-8 w-8" />
467
- </div>
468
- <div className="text-fm-icon-active text-sm font-medium">Primary</div>
469
- </div>
470
- <div className="text-center">
471
- <div className="border-fm-divider-primary bg-fm-surface-tertiary/20 !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
472
- <ScrollDownIcon className="text-fm-secondary h-8 w-8" />
473
- </div>
474
- <div className="text-fm-icon-active text-sm font-medium">Neutral</div>
475
- </div>
476
- <div className="text-center">
477
- <div className="border-fm-divider-primary bg-fm-surface-secondary !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
478
- <ScrollDownIcon className="text-fm-icon-active/90 h-8 w-8" />
479
- </div>
480
- <div className="text-fm-icon-active text-sm font-medium">Overlay</div>
481
- </div>
482
- <div className="text-center">
483
- <div className="border-fm-secondary-500/30 bg-fm-secondary-500/20 !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
484
- <ScrollDownIcon className="text-fm-icon-active h-8 w-8" />
485
- </div>
486
- <div className="text-fm-icon-active text-sm font-medium">Accent</div>
487
- </div>
488
- </div>
489
- ),
122
+ render: () => <IconColorVariations icon={ScrollDownIcon} />,
490
123
  }
491
124
 
492
125
  export const UsageExamples: Story = {
493
- parameters: {
494
- ...storyParameters,
495
- docs: {
496
- description: {
497
- story: "Real-world usage: scroll hint and hero CTA.",
498
- },
499
- },
500
- },
501
126
  render: () => (
502
- <div className="from-fm-surface-primary to-fm-surface-secondary min-h-dvh !space-y-8 rounded-lg bg-linear-to-br p-8">
503
- <div className="!space-y-2">
504
- <h3 className="text-fm-icon-active text-sm font-medium">Scroll hint</h3>
505
- <div className="border-fm-divider-secondary bg-fm-surface-secondary flex flex-col items-center gap-2 rounded-lg border p-6">
506
- <span className="text-fm-secondary text-sm">Scroll for more</span>
507
- <ScrollDownIcon className="text-fm-icon-active/80 h-8 w-8" />
127
+ <IconUsageCanvas>
128
+ <IconUsageSection title="Scroll Hint">
129
+ <div className="flex flex-col items-center gap-2 py-2">
130
+ <ScrollDownIcon className="text-fm-icon-inactive h-6 w-6" />
131
+ <span className="text-fm-secondary font-fm-text text-xs">
132
+ Scroll to read more
133
+ </span>
508
134
  </div>
509
- </div>
510
- <div className="!space-y-2">
511
- <h3 className="text-fm-icon-active text-sm font-medium">Hero CTA</h3>
512
- <div className="border-fm-divider-secondary bg-fm-surface-secondary flex flex-col items-center gap-4 rounded-lg border p-8">
513
- <h4 className="text-fm-icon-active text-lg font-semibold">Welcome</h4>
514
- <p className="text-fm-secondary text-center text-sm">Explore below</p>
515
- <button className="border-fm-divider-primary bg-fm-surface-secondary hover:bg-fm-surface-secondary flex items-center justify-center rounded-full border p-2 transition-colors">
516
- <ScrollDownIcon className="text-fm-icon-active h-6 w-6" />
517
- </button>
135
+ </IconUsageSection>
136
+
137
+ <IconUsageSection title="Section Navigator">
138
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary flex w-full max-w-sm items-center justify-between rounded-xl border px-4 py-3">
139
+ <span className="text-fm-primary font-fm-text text-sm">
140
+ Section 1 of 5
141
+ </span>
142
+ <ScrollDownIcon className="text-fm-icon-active h-5 w-5" />
518
143
  </div>
519
- </div>
520
- </div>
144
+ </IconUsageSection>
145
+
146
+ <IconUsageSection title="Loading More Indicator">
147
+ <div className="flex flex-col items-center gap-1 py-2">
148
+ <ScrollDownIcon className="text-fm-icon-inactive h-5 w-5 animate-bounce" />
149
+ <span className="text-fm-tertiary font-fm-text text-xs">
150
+ Scroll for more
151
+ </span>
152
+ </div>
153
+ </IconUsageSection>
154
+ </IconUsageCanvas>
521
155
  ),
522
156
  }
523
157
 
524
158
  export const Playground: Story = {
525
- parameters: {
526
- ...storyParameters,
527
- docs: {
528
- description: {
529
- story: "Interactive playground for ScrollDownIcon.",
530
- },
531
- },
532
- },
533
159
  args: {
534
- width: 26,
535
- height: 26,
536
- className: "text-fm-icon-active",
160
+ className: "h-8 w-8 text-fm-icon-inactive",
161
+ withAccessibility: true,
537
162
  },
538
163
  render: (args) => (
539
- <div className="from-fm-surface-primary to-fm-surface-secondary flex h-64 min-h-dvh items-center justify-center rounded-lg bg-linear-to-br">
540
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-8">
541
- <ScrollDownIcon {...args} />
542
- </div>
543
- </div>
164
+ <IconPlaygroundCanvas>
165
+ <ScrollDownIcon {...args} />
166
+ </IconPlaygroundCanvas>
544
167
  ),
545
168
  }