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,21 @@
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 { ChevronLeftIcon } from "src/ui/icons/chevron-left-icon"
6
+ import { ChevronRightIcon } from "src/ui/icons/chevron-right-icon"
7
+ import { ChevronUpIcon } from "src/ui/icons/chevron-up-icon"
8
+ import {
9
+ IconColorVariations,
10
+ IconDefaultCanvas,
11
+ IconDirectionalVariations,
12
+ IconPlaygroundCanvas,
13
+ IconSizeVariations,
14
+ IconUsageCanvas,
15
+ IconUsageSection,
16
+ } from "src/ui/story-spec/icons/icon-story-canvas"
17
+ import { AuralIconDocsPage } from "src/ui/story-spec/icons/icon-story-docs-page"
18
+
4
19
  import { ChevronDownIcon } from "."
5
20
 
6
21
  const meta: Meta<typeof ChevronDownIcon> = {
@@ -11,791 +26,80 @@ const meta: Meta<typeof ChevronDownIcon> = {
11
26
  backgrounds: {
12
27
  default: "dark",
13
28
  values: [
14
- { name: "dark", value: "#0a0a0a" },
15
- { name: "darker", value: "#000000" },
16
- { name: "light", value: "#ffffff" },
29
+ { name: "dark", value: "var(--color-fm-surface-primary)" },
30
+ { name: "darker", value: "var(--color-fm-neutral-0)" },
31
+ { name: "light", value: "var(--color-fm-neutral-1100)" },
17
32
  ],
18
33
  },
19
34
  docs: {
20
35
  page: () => (
21
- <>
22
- {/* Override default docs styling */}
23
- <style>
24
- {`
25
- .sbdocs-wrapper {
26
- padding: 0 ;
27
- max-width: none ;
28
- background: transparent ;
29
- }
30
- .sbdocs-content {
31
- max-width: none ;
32
- padding: 0 ;
33
- margin: 0 ;
34
- background: transparent ;
35
- }
36
- .docs-story {
37
- background: transparent ;
38
- }
39
- .sbdocs {
40
- background: transparent ;
41
- }
42
- body {
43
- background: #0a0a0a ;
44
- }
45
- #storybook-docs {
46
- background: #0a0a0a ;
47
- }
48
- .sbdocs-preview {
49
- background: transparent ;
50
- border: none ;
51
- }
52
- .sbdocs-h1, .sbdocs-h2, .sbdocs-h3, .sbdocs-h4, .sbdocs-h5, .sbdocs-h6 {
53
- color: white ;
54
- }
55
- .sbdocs-p, .sbdocs-li {
56
- color: rgba(255, 255, 255, 0.7) ;
57
- }
58
- .sbdocs-code {
59
- background: rgba(255, 255, 255, 0.1) ;
60
- color: rgba(168, 85, 247, 1) ;
61
- border: 1px solid rgba(255, 255, 255, 0.1) ;
62
- }
63
- .sbdocs-pre {
64
- background: rgba(0, 0, 0, 0.4) ;
65
- border: 1px solid rgba(255, 255, 255, 0.1) ;
66
- }
67
- .sbdocs-table {
68
- background: rgba(255, 255, 255, 0.05) ;
69
- border: 1px solid rgba(255, 255, 255, 0.1) ;
70
- }
71
- .sbdocs-table th {
72
- background: rgba(255, 255, 255, 0.05) ;
73
- color: white ;
74
- border-bottom: 1px solid rgba(255, 255, 255, 0.1) ;
75
- }
76
- .sbdocs-table td {
77
- color: rgba(255, 255, 255, 0.7) ;
78
- border-bottom: 1px solid rgba(255, 255, 255, 0.05) ;
79
- }
80
- `}
81
- </style>
82
-
83
- <div className="min-h-screen bg-gradient-to-br from-gray-900 via-blue-900/20 to-gray-900">
84
- {/* Header */}
85
- <div className="relative overflow-hidden border-b border-white/10 bg-black/20 backdrop-blur-xl">
86
- <div className="absolute inset-0 bg-gradient-to-r from-blue-500/10 via-transparent to-indigo-500/10" />
87
- <div className="relative !mx-auto max-w-7xl px-6 py-16">
88
- <div className="!space-y-6 text-center">
89
- <div className="!mx-auto flex h-24 w-24 items-center justify-center rounded-2xl border border-blue-500/30 bg-gradient-to-br from-blue-500/20 to-indigo-500/20">
90
- <ChevronDownIcon className="h-12 w-12 text-blue-400" />
91
- </div>
92
- <h1 className="!text-fm-primary text-5xl font-bold">
93
- ChevronDownIcon
94
- </h1>
95
- <p className="!mx-auto max-w-3xl text-xl leading-relaxed !text-white/70">
96
- A versatile chevron down icon for dropdowns, collapsible
97
- content, and downward navigation. Built with accessibility
98
- in mind using Radix UI's AccessibleIcon wrapper.
99
- </p>
100
-
101
- {/* Stats */}
102
- <div className="flex items-center justify-center gap-8 pt-8">
103
- <div className="text-center">
104
- <div className="text-3xl font-bold text-blue-300">
105
- Accessible
106
- </div>
107
- <div className="text-sm text-white/60">
108
- Screen reader friendly
109
- </div>
110
- </div>
111
- <div className="h-8 w-px bg-white/20" />
112
- <div className="text-center">
113
- <div className="text-3xl font-bold text-indigo-300">
114
- Scalable
115
- </div>
116
- <div className="text-sm text-white/60">
117
- Any size needed
118
- </div>
119
- </div>
120
- <div className="h-8 w-px bg-white/20" />
121
- <div className="text-center">
122
- <div className="text-3xl font-bold text-cyan-300">
123
- Versatile
124
- </div>
125
- <div className="text-sm text-white/60">
126
- Multiple use cases
127
- </div>
128
- </div>
129
- </div>
130
- </div>
131
- </div>
132
- </div>
133
-
134
- {/* Content */}
135
- <div className="!mx-auto max-w-7xl !space-y-16 px-6 py-12">
136
- {/* Quick Usage */}
137
- <div className="!space-y-8">
138
- <h2 className="text-center text-3xl font-bold !text-white">
139
- Quick Start
140
- </h2>
141
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
142
- <div className="!space-y-4">
143
- <h3 className="text-xl font-semibold !text-blue-300">
144
- Basic Usage
145
- </h3>
146
- <div className="rounded-lg bg-black/40 p-4">
147
- <pre className="overflow-x-auto text-sm !text-green-300">
148
- {`import { ChevronDownIcon } from "@icons/chevron-down-icon"
149
-
150
- function DropdownButton() {
36
+ <AuralIconDocsPage
37
+ accentToken="info"
38
+ features={[
39
+ {
40
+ title: "Directional",
41
+ description: "Rotates to all 4 directions",
42
+ },
43
+ { title: "currentColor", description: "Responds to text tokens" },
44
+ { title: "Accessible", description: "ARIA-ready by default" },
45
+ ]}
46
+ quickStart={{
47
+ codeExample: `import { ChevronDownIcon } from "src/ui/icons/chevron-down-icon"
48
+
49
+ function Accordion() {
151
50
  return (
152
51
  <button className="flex items-center gap-2">
153
- <span>Select Option</span>
154
- <ChevronDownIcon className="h-4 w-4 text-blue-400 " />
52
+ Section title
53
+ <ChevronDownIcon className="h-4 w-4 text-fm-icon-active" />
155
54
  </button>
156
55
  )
157
- }`}
158
- </pre>
159
- </div>
160
- </div>
161
-
162
- <div className="!space-y-4">
163
- <h3 className="text-xl font-semibold !text-blue-300">
164
- Live Preview
165
- </h3>
166
- <div className="flex h-32 items-center justify-center rounded-lg border border-white/10 bg-white/5">
167
- <button className="flex items-center gap-3 rounded-lg border border-blue-500/20 bg-blue-500/10 px-4 py-2 transition-colors hover:bg-blue-500/20">
168
- <span className="text-white">Select Option</span>
169
- <ChevronDownIcon className="h-4 w-4 text-blue-400" />
170
- </button>
171
- </div>
172
- </div>
173
- </div>
174
- </div>
175
-
176
- {/* Props Documentation */}
177
- <div className="!space-y-8">
178
- <h2 className="text-center text-3xl font-bold !text-white">
179
- Props & Configuration
180
- </h2>
181
-
182
- <div className="overflow-hidden rounded-lg border border-white/10 bg-white/5">
183
- <div className="bg-white/5 p-4">
184
- <h3 className="text-xl font-semibold !text-white">Props</h3>
185
- </div>
186
- <table className="!my-0 w-full">
187
- <thead className="bg-white/5">
188
- <tr className="border-b border-white/10">
189
- <th className="px-6 py-4 text-left text-sm font-semibold !text-white">
190
- Prop
191
- </th>
192
- <th className="px-6 py-4 text-left text-sm font-semibold !text-white">
193
- Type
194
- </th>
195
- <th className="px-6 py-4 text-left text-sm font-semibold !text-white">
196
- Default
197
- </th>
198
- <th className="px-6 py-4 text-left text-sm font-semibold !text-white">
199
- Description
200
- </th>
201
- </tr>
202
- </thead>
203
- <tbody>
204
- {" "}
205
- <tr className="!bg-black/10">
206
- <td className="px-6 py-4 font-mono text-sm !text-blue-300">
207
- withAccessibility
208
- </td>
209
- <td className="px-6 py-4 text-sm !text-white/70">
210
- boolean
211
- </td>
212
- <td className="px-6 py-4 text-sm !text-white/50">
213
- true
214
- </td>
215
- <td className="px-6 py-4 text-sm !text-white/70">
216
- Whether to wrap the icon with accessibility feature
217
- </td>
218
- </tr>
219
- <tr className="border-b border-white/5 !bg-black/10">
220
- <td className="px-6 py-4 font-mono text-sm !text-blue-300">
221
- height
222
- </td>
223
- <td className="px-6 py-4 text-sm !text-white/70">
224
- number | string
225
- </td>
226
- <td className="px-6 py-4 text-sm !text-white/50">24</td>
227
- <td className="px-6 py-4 text-sm !text-white/70">
228
- Height of the icon in pixels
229
- </td>
230
- </tr>
231
- <tr className="border-b border-white/5">
232
- <td className="px-6 py-4 font-mono text-sm !text-blue-300">
233
- stroke
234
- </td>
235
- <td className="px-6 py-4 text-sm !text-white/70">
236
- string
237
- </td>
238
- <td className="px-6 py-4 text-sm !text-white/50">
239
- currentColor
240
- </td>
241
- <td className="px-6 py-4 text-sm !text-white/70">
242
- Stroke color of the icon
243
- </td>
244
- </tr>
245
- <tr className="border-b border-white/5 !bg-black/10">
246
- <td className="px-6 py-4 font-mono text-sm !text-blue-300">
247
- className
248
- </td>
249
- <td className="px-6 py-4 text-sm !text-white/70">
250
- string
251
- </td>
252
- <td className="px-6 py-4 text-sm !text-white/50">-</td>
253
- <td className="px-6 py-4 text-sm !text-white/70">
254
- CSS classes for styling (use for overrides)
255
- </td>
256
- </tr>
257
- <tr className="border-b border-white/5">
258
- <td className="px-6 py-4 font-mono text-sm !text-blue-300">
259
- strokeWidth
260
- </td>
261
- <td className="px-6 py-4 text-sm !text-white/70">
262
- number | string
263
- </td>
264
- <td className="px-6 py-4 text-sm !text-white/50">
265
- 1.5
266
- </td>
267
- <td className="px-6 py-4 text-sm !text-white/70">
268
- Stroke width of the chevron line
269
- </td>
270
- </tr>
271
- <tr className="!bg-black/10">
272
- <td className="px-6 py-4 font-mono text-sm !text-blue-300">
273
- ...svgProps
274
- </td>
275
- <td className="px-6 py-4 text-sm !text-white/70">
276
- SVGProps
277
- </td>
278
- <td className="px-6 py-4 text-sm !text-white/50">-</td>
279
- <td className="px-6 py-4 text-sm !text-white/70">
280
- All standard SVG element props
281
- </td>
282
- </tr>
283
- </tbody>
284
- </table>
285
- </div>
286
- </div>
287
-
288
- {/* Size Variations */}
289
- <div className="!space-y-8">
290
- <h2 className="text-center text-3xl font-bold !text-white">
291
- Size Variations
292
- </h2>
293
- <div className="rounded-lg border border-white/10 bg-white/5 p-8">
294
- <div className="!space-y-6">
295
- <div className="grid grid-cols-1 gap-8 md:grid-cols-2">
296
- <div className="!space-y-4">
297
- <h3 className="text-lg font-semibold !text-blue-300">
298
- Standard Sizes
299
- </h3>
300
- <div className="flex items-end gap-6 rounded-lg bg-black/20 p-6">
301
- <div className="text-center">
302
- <ChevronDownIcon className="!mx-auto mb-2 h-3 w-3 text-blue-400" />
303
- <span className="text-xs text-white/60">12px</span>
304
- </div>
305
- <div className="text-center">
306
- <ChevronDownIcon className="!mx-auto mb-2 h-4 w-4 text-blue-400" />
307
- <span className="text-xs text-white/60">16px</span>
308
- </div>
309
- <div className="text-center">
310
- <ChevronDownIcon className="!mx-auto mb-2 h-5 w-5 text-blue-400" />
311
- <span className="text-xs text-white/60">20px</span>
312
- </div>
313
- <div className="text-center">
314
- <ChevronDownIcon className="!mx-auto mb-2 h-6 w-6 text-blue-400" />
315
- <span className="text-xs text-white/60">24px</span>
316
- </div>
317
- <div className="text-center">
318
- <ChevronDownIcon className="!mx-auto mb-2 h-8 w-8 text-blue-400" />
319
- <span className="text-xs text-white/60">32px</span>
320
- </div>
321
- <div className="text-center">
322
- <ChevronDownIcon className="!mx-auto mb-2 h-12 w-12 text-blue-400" />
323
- <span className="text-xs text-white/60">48px</span>
324
- </div>
325
- </div>
326
- </div>
327
-
328
- <div className="!space-y-4">
329
- <h3 className="text-lg font-semibold !text-blue-300">
330
- Code Example
331
- </h3>
332
- <div className="rounded-lg bg-black/40 p-4">
333
- <pre className="overflow-x-auto text-sm !text-green-300">
334
- {`// Small (16px)
335
- <ChevronDownIcon className="h-4 w-4 " />
336
-
337
- // Medium (24px)
338
- <ChevronDownIcon className="h-6 w-6 " />
339
-
340
- // Large (32px)
341
- <ChevronDownIcon className="h-8 w-8 " />
342
-
343
- // Custom size
344
- <ChevronDownIcon width={40} height={40} />`}
345
- </pre>
346
- </div>
347
- </div>
348
- </div>
349
- </div>
350
- </div>
351
- </div>
352
-
353
- {/* Color Variations */}
354
- <div className="!space-y-8">
355
- <h2 className="text-center text-3xl font-bold !text-white">
356
- Color Variations
357
- </h2>
358
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
359
- <div className="!space-y-4">
360
- <h3 className="text-lg font-semibold !text-blue-300">
361
- Semantic Colors
362
- </h3>
363
- <div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
364
- <div className="flex items-center gap-4">
365
- <ChevronDownIcon className="h-6 w-6 text-blue-400" />
366
- <div>
367
- <div className="text-sm font-medium text-white">
368
- Primary
369
- </div>
370
- <div className="text-xs text-white/60">
371
- text-blue-400
372
- </div>
373
- </div>
374
- </div>
375
- <div className="flex items-center gap-4">
376
- <ChevronDownIcon className="h-6 w-6 text-gray-400" />
377
- <div>
378
- <div className="text-sm font-medium text-white">
379
- Secondary
380
- </div>
381
- <div className="text-xs text-white/60">
382
- text-gray-400
383
- </div>
384
- </div>
385
- </div>
386
- <div className="flex items-center gap-4">
387
- <ChevronDownIcon className="h-6 w-6 text-indigo-400" />
388
- <div>
389
- <div className="text-sm font-medium text-white">
390
- Accent
391
- </div>
392
- <div className="text-xs text-white/60">
393
- text-indigo-400
394
- </div>
395
- </div>
396
- </div>
397
- <div className="flex items-center gap-4">
398
- <ChevronDownIcon className="h-6 w-6 text-white/40" />
399
- <div>
400
- <div className="text-sm font-medium text-white">
401
- Disabled
402
- </div>
403
- <div className="text-xs text-white/60">
404
- text-white/40
405
- </div>
406
- </div>
407
- </div>
408
- </div>
409
- </div>
410
-
411
- <div className="!space-y-4">
412
- <h3 className="text-lg font-semibold !text-blue-300">
413
- Custom Colors
414
- </h3>
415
- <div className="rounded-lg bg-black/40 p-4">
416
- <pre className="overflow-x-auto text-sm !text-green-300">
417
- {`// Using Tailwind classes with
418
- <ChevronDownIcon className="h-6 w-6 text-blue-400 " />
419
- <ChevronDownIcon className="h-6 w-6 text-indigo-500 " />
420
-
421
- // Using CSS custom properties
422
- <ChevronDownIcon
423
- className="h-6 w-6 "
424
- style={{ color: 'var(--color-primary)' }}
425
- />
426
-
427
- // Direct stroke prop
428
- <ChevronDownIcon
429
- width={24}
430
- height={24}
431
- stroke="#3b82f6"
432
- />`}
433
- </pre>
434
- </div>
435
- </div>
436
- </div>
437
- </div>
438
-
439
- {/* Usage Examples */}
440
- <div className="!space-y-8">
441
- <h2 className="text-center text-3xl font-bold !text-white">
442
- Usage Examples
443
- </h2>
444
-
445
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
446
- {/* Dropdown Menu */}
447
- <div className="!space-y-4">
448
- <h3 className="text-lg font-semibold !text-blue-300">
449
- Dropdown Menu
450
- </h3>
451
- <div className="!space-y-4">
452
- <div className="relative">
453
- <button className="flex w-full items-center justify-between rounded-lg border border-white/20 bg-white/5 px-4 py-3 text-left text-white transition-colors hover:bg-white/10">
454
- <span>Select an option</span>
455
- <ChevronDownIcon className="h-4 w-4 text-blue-400 transition-transform" />
456
- </button>
457
- <div className="absolute top-full z-10 mt-1 w-full rounded-lg border border-white/10 bg-white/5 py-2 shadow-xl backdrop-blur-sm">
458
- <div className="px-4 py-2 text-sm text-white/80 hover:bg-white/10">
459
- Option 1
460
- </div>
461
- <div className="px-4 py-2 text-sm text-white/80 hover:bg-white/10">
462
- Option 2
463
- </div>
464
- <div className="px-4 py-2 text-sm text-white/80 hover:bg-white/10">
465
- Option 3
466
- </div>
467
- </div>
468
- </div>
469
- <div className="rounded-lg bg-black/40 p-4">
470
- <pre className="overflow-x-auto text-sm !text-green-300">
471
- {`<button className="flex w-full items-center justify-between bg-white/5 border border-white/20 px-4 py-3 rounded-lg">
472
- <span>Select an option</span>
473
- <ChevronDownIcon className="h-4 w-4 text-blue-400 transition-transform " />
474
- </button>
475
-
476
- // With rotation on open
477
- <ChevronDownIcon className="h-4 w-4 text-blue-400 transition-transform rotate-180 " />`}
478
- </pre>
479
- </div>
480
- </div>
481
- </div>
482
-
483
- {/* Accordion */}
484
- <div className="!space-y-4">
485
- <h3 className="text-lg font-semibold !text-blue-300">
486
- Accordion/Collapsible
487
- </h3>
488
- <div className="!space-y-4">
489
- <div className="rounded-lg border border-white/10 bg-white/5">
490
- <button className="flex w-full items-center justify-between p-4 text-left transition-colors hover:bg-white/10">
491
- <h4 className="font-medium !text-white">
492
- Frequently Asked Questions
493
- </h4>
494
- <ChevronDownIcon className="h-5 w-5 text-blue-400 transition-transform" />
495
- </button>
496
- <div className="border-t border-white/10 p-4">
497
- <p className="text-sm !text-white/70">
498
- Here are some answers to common questions about our
499
- service...
500
- </p>
501
- </div>
502
- </div>
503
- <div className="rounded-lg bg-black/40 p-4">
504
- <pre className="overflow-x-auto text-sm !text-green-300">
505
- {`// Collapsible section header
506
- <button className="flex w-full items-center justify-between p-4 text-left">
507
- <h4 className="font-medium text-white">Section Title</h4>
508
- <ChevronDownIcon className="h-5 w-5 text-blue-400 transition-transform " />
509
- </button>
510
-
511
- // Rotated when expanded
512
- <ChevronDownIcon className="h-5 w-5 text-blue-400 transition-transform rotate-180 " />`}
513
- </pre>
514
- </div>
515
- </div>
516
- </div>
517
-
518
- {/* Select Input */}
519
- <div className="!space-y-4">
520
- <h3 className="text-lg font-semibold !text-blue-300">
521
- Select Input
522
- </h3>
523
- <div className="!space-y-4">
524
- <div className="!space-y-2">
525
- <label className="text-sm font-medium !text-white">
526
- Country
527
- </label>
528
- <div className="relative">
529
- <select className="w-full appearance-none rounded-lg border border-white/20 bg-white/5 px-4 py-3 pr-10 !text-white focus:border-blue-500 focus:ring-2 focus:ring-blue-500/20">
530
- <option>United States</option>
531
- <option>Canada</option>
532
- <option>United Kingdom</option>
533
- </select>
534
- <ChevronDownIcon className="pointer-events-none absolute top-1/2 right-3 h-4 w-4 -translate-y-1/2 text-blue-400" />
535
- </div>
536
- </div>
537
- <div className="rounded-lg bg-black/40 p-4">
538
- <pre className="overflow-x-auto text-sm !text-green-300">
539
- {`// Custom select with icon
540
- <div className="relative">
541
- <select className="w-full appearance-none bg-white/5 border border-white/20 px-4 py-3 pr-10 rounded-lg">
542
- <option>Select option...</option>
543
- </select>
544
- <ChevronDownIcon className="pointer-events-none absolute right-3 top-1/2 h-4 w-4 -translate-y-1/2 text-blue-400 " />
545
- </div>`}
546
- </pre>
547
- </div>
548
- </div>
549
- </div>
550
-
551
- {/* Sort Controls */}
552
- <div className="!space-y-4">
553
- <h3 className="text-lg font-semibold !text-blue-300">
554
- Sort Controls
555
- </h3>
556
- <div className="!space-y-4">
557
- <div className="flex items-center gap-4">
558
- <span className="text-sm text-white/70">Sort by:</span>
559
- <button className="flex items-center gap-2 rounded-lg border border-white/20 bg-white/5 px-3 py-2 text-sm text-white transition-colors hover:bg-white/10">
560
- <span>Date</span>
561
- <ChevronDownIcon className="h-3 w-3 text-blue-400" />
562
- </button>
563
- <button className="flex items-center gap-2 rounded-lg border border-blue-500/30 bg-blue-500/10 px-3 py-2 text-sm text-blue-200 transition-colors hover:bg-blue-500/20">
564
- <span>Name</span>
565
- <ChevronDownIcon className="h-3 w-3 rotate-180 text-blue-400" />
566
- </button>
567
- </div>
568
- <div className="rounded-lg bg-black/40 p-4">
569
- <pre className="overflow-x-auto text-sm !text-green-300">
570
- {`// Sort button with direction indicator
571
- <button className="flex items-center gap-2 bg-white/5 border border-white/20 px-3 py-2 rounded-lg">
572
- <span>Name</span>
573
- <ChevronDownIcon className="h-3 w-3 text-blue-400 " />
574
- </button>
575
-
576
- // Ascending sort (rotated)
577
- <ChevronDownIcon className="h-3 w-3 text-blue-400 rotate-180 " />`}
578
- </pre>
579
- </div>
580
- </div>
581
- </div>
582
- </div>
583
- </div>
584
-
585
- {/* Accessibility */}
586
- <div className="!space-y-8">
587
- <h2 className="text-center text-3xl font-bold !text-white">
588
- Accessibility Features
589
- </h2>
590
- <div className="grid grid-cols-1 gap-8 md:grid-cols-2">
591
- <div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
592
- <h3 className="text-lg font-semibold !text-green-300">
593
- ✅ Built-in Features
594
- </h3>
595
- <ul className="!space-y-2 text-sm !text-white/70">
596
- <li className="!text-white/70">
597
- Uses Radix UI AccessibleIcon wrapper
598
- </li>
599
- <li className="!text-white/70">
600
- Provides screen reader label "Chevron Down Icon"
601
- </li>
602
- <li className="!text-white/70">
603
- Supports keyboard navigation when interactive
604
- </li>
605
- <li className="!text-white/70">
606
- Maintains proper color contrast ratios
607
- </li>
608
- <li className="!text-white/70">
609
- Scales with user's font size preferences
610
- </li>
611
- </ul>
612
- </div>
613
-
614
- <div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
615
- <h3 className="text-lg font-semibold !text-blue-300">
616
- 💡 Best Practices
617
- </h3>
618
- <ul className="!space-y-2 text-sm text-white/70">
619
- <li className="!text-white/70">
620
- Use aria-expanded for expandable elements
621
- </li>
622
- <li className="!text-white/70">
623
- Provide context with aria-labels
624
- </li>
625
- <li className="!text-white/70">
626
- Animate transitions for visual feedback
627
- </li>
628
- <li className="!text-white/70">
629
- Add focus states for interactive elements
630
- </li>
631
- <li className="!text-white/70">
632
- Consider disabled states when appropriate
633
- </li>
634
- </ul>
635
- </div>
636
- </div>
637
-
638
- <div className="rounded-lg border border-white/10 bg-white/5 p-6">
639
- <h3 className="mb-4 text-lg font-semibold !text-purple-300">
640
- Proper ARIA Implementation
641
- </h3>
642
- <div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
643
- <div className="rounded-lg bg-black/40 p-4">
644
- <pre className="overflow-x-auto text-sm !text-blue-300">
645
- {`// Dropdown button with proper ARIA states
646
- <button
647
- aria-expanded={isOpen}
648
- aria-haspopup="listbox"
649
- className="flex items-center gap-2"
650
- >
651
- Select option
652
- <ChevronDownIcon
653
- className={cn(
654
- "h-4 w-4 text-blue-400 transition-transform ",
655
- isOpen && "rotate-180"
656
- )}
657
- />
658
- </button>
659
-
660
- // Collapsible section
661
- <button
662
- aria-expanded={isExpanded}
663
- aria-controls="content-section"
664
- >
665
- <ChevronDownIcon className="h-4 w-4 " />
666
- </button>
667
-
668
- // Select with screen reader support
669
- <select aria-label="Choose country">
670
- <option>Select...</option>
671
- </select>`}
672
- </pre>
673
- </div>
674
- <div className="!space-y-4">
675
- <p className="text-sm !text-white/70">
676
- Always use proper ARIA attributes to communicate state
677
- changes to screen readers. The chevron rotation provides
678
- visual feedback while ARIA states provide programmatic
679
- information.
680
- </p>
681
- <div className="rounded-lg border border-blue-500/20 bg-blue-500/10 p-4">
682
- <div className="flex items-center gap-2 text-sm text-blue-200">
683
- <ChevronDownIcon className="h-4 w-4" />
684
- <span>
685
- Combine visual and programmatic accessibility
686
- </span>
687
- </div>
688
- </div>
689
- </div>
690
- </div>
691
- </div>
692
- </div>
693
-
694
- {/* Related Icons */}
695
- <div className="!space-y-8">
696
- <h2 className="text-center text-3xl font-bold !text-white">
697
- Related Icons
698
- </h2>
699
- <div className="grid grid-cols-2 gap-6 md:grid-cols-4">
700
- <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
701
- <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-blue-500/20">
702
- <span className="!text-2xl !text-white">↑</span>
703
- </div>
704
- <div>
705
- <div className="font-medium text-white">
706
- ChevronUpIcon
707
- </div>
708
- <div className="text-xs text-white/60">
709
- Upward direction
710
- </div>
711
- </div>
712
- </div>
713
- <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
714
- <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-indigo-500/20">
715
- <span className="!text-2xl !text-white">→</span>
716
- </div>
717
- <div>
718
- <div className="font-medium text-white">
719
- ChevronRightIcon
720
- </div>
721
- <div className="text-xs text-white/60">
722
- Right direction
723
- </div>
724
- </div>
725
- </div>
726
- <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
727
- <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-purple-500/20">
728
- <span className="!text-2xl !text-white">←</span>
729
- </div>
730
- <div>
731
- <div className="font-medium text-white">
732
- ChevronLeftIcon
733
- </div>
734
- <div className="text-xs text-white/60">
735
- Left direction
736
- </div>
737
- </div>
738
- </div>
739
- <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
740
- <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-cyan-500/20">
741
- <span className="!text-2xl !text-white">⤋</span>
742
- </div>
743
- <div>
744
- <div className="font-medium text-white">
745
- ArrowDownIcon
746
- </div>
747
- <div className="text-xs text-white/60">Arrow variant</div>
748
- </div>
749
- </div>
750
- </div>
751
- </div>
752
- </div>
753
-
754
- {/* Footer */}
755
- <div className="border-t border-white/10 bg-black/20 backdrop-blur-xl">
756
- <div className="!mx-auto max-w-7xl px-6 py-8">
757
- <div className="!space-y-4 text-center">
758
- <p className="!text-white/60">
759
- ChevronDownIcon is part of the Aural UI icon library, built
760
- with accessibility and intuitive navigation in mind.
761
- </p>
762
- <p className="text-sm !text-white/40">
763
- All icons use Radix UI's AccessibleIcon for screen reader
764
- compatibility and follow WCAG guidelines.
765
- </p>
766
- </div>
767
- </div>
768
- </div>
769
- </div>
770
- </>
56
+ }`,
57
+ livePreview: (
58
+ <button className="text-fm-primary font-fm-text flex items-center gap-2 text-sm">
59
+ Section title
60
+ <ChevronDownIcon className="text-fm-icon-active h-4 w-4" />
61
+ </button>
62
+ ),
63
+ }}
64
+ relatedIcons={[
65
+ {
66
+ name: "ChevronUpIcon",
67
+ description: "Points upward",
68
+ icon: ChevronUpIcon,
69
+ accentToken: "info",
70
+ },
71
+ {
72
+ name: "ChevronLeftIcon",
73
+ description: "Points left",
74
+ icon: ChevronLeftIcon,
75
+ accentToken: "positive",
76
+ },
77
+ {
78
+ name: "ChevronRightIcon",
79
+ description: "Points right",
80
+ icon: ChevronRightIcon,
81
+ accentToken: "warning",
82
+ },
83
+ {
84
+ name: "AngleDownIcon",
85
+ description: "Angle chevron",
86
+ icon: AngleDownIcon,
87
+ accentToken: "negative",
88
+ },
89
+ ]}
90
+ />
771
91
  ),
772
92
  },
773
93
  },
774
94
  tags: ["autodocs"],
775
95
  argTypes: {
776
- width: {
777
- control: { type: "range", min: 8, max: 96, step: 2 },
778
- description: "Width of the icon in pixels",
96
+ className: {
97
+ control: "text",
98
+ description: "CSS classes including size and color token",
779
99
  },
780
100
  withAccessibility: {
781
101
  control: "boolean",
782
- description: "Whether to wrap the icon with accessibility features",
783
- },
784
- height: {
785
- control: { type: "range", min: 8, max: 96, step: 2 },
786
- description: "Height of the icon in pixels",
787
- },
788
- stroke: {
789
- control: "color",
790
- description: "Stroke color of the icon",
791
- },
792
- strokeWidth: {
793
- control: { type: "range", min: 0.5, max: 3, step: 0.1 },
794
- description: "Stroke width of the chevron line",
795
- },
796
- className: {
797
- control: "text",
798
- description: "CSS classes for styling (use for overrides)",
102
+ description: "Wrap with accessibility label",
799
103
  },
800
104
  },
801
105
  }
@@ -803,207 +107,105 @@ function DropdownButton() {
803
107
  export default meta
804
108
  type Story = StoryObj<typeof ChevronDownIcon>
805
109
 
806
- // Story parameters for consistent dark theme
807
- const storyParameters = {
808
- backgrounds: {
809
- default: "dark",
810
- values: [
811
- { name: "dark", value: "#0a0a0a" },
812
- { name: "darker", value: "#000000" },
813
- ],
814
- },
815
- }
816
-
817
110
  export const Default: Story = {
818
111
  args: {
819
- width: 24,
820
- height: 24,
821
- className: "text-blue-400 ",
112
+ className: "h-6 w-6 text-fm-icon-active",
822
113
  withAccessibility: true,
823
114
  },
824
- parameters: storyParameters,
825
115
  render: (args) => (
826
- <div className="flex h-32 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
116
+ <IconDefaultCanvas>
827
117
  <ChevronDownIcon {...args} />
828
- </div>
118
+ </IconDefaultCanvas>
829
119
  ),
830
120
  }
831
121
 
832
122
  export const SizeVariations: Story = {
833
- parameters: {
834
- ...storyParameters,
835
- docs: {
836
- description: {
837
- story:
838
- "ChevronDownIcon in different sizes, from small UI elements to large displays.",
839
- },
840
- },
841
- },
842
- render: () => (
843
- <div className="flex h-64 min-h-dvh items-center justify-center gap-8 rounded-lg bg-gradient-to-br from-gray-900 to-gray-800 p-8">
844
- <div className="text-center">
845
- <ChevronDownIcon className="!mx-auto mb-2 h-3 w-3 text-blue-400" />
846
- <span className="text-xs text-white/60">12px</span>
847
- </div>
848
- <div className="text-center">
849
- <ChevronDownIcon className="!mx-auto mb-2 h-4 w-4 text-blue-400" />
850
- <span className="text-xs text-white/60">16px</span>
851
- </div>
852
- <div className="text-center">
853
- <ChevronDownIcon className="!mx-auto mb-2 h-5 w-5 text-blue-400" />
854
- <span className="text-xs text-white/60">20px</span>
855
- </div>
856
- <div className="text-center">
857
- <ChevronDownIcon className="!mx-auto mb-2 h-6 w-6 text-blue-400" />
858
- <span className="text-xs text-white/60">24px</span>
859
- </div>
860
- <div className="text-center">
861
- <ChevronDownIcon className="!mx-auto mb-2 h-8 w-8 text-blue-400" />
862
- <span className="text-xs text-white/60">32px</span>
863
- </div>
864
- <div className="text-center">
865
- <ChevronDownIcon className="!mx-auto mb-2 h-12 w-12 text-blue-400" />
866
- <span className="text-xs text-white/60">48px</span>
867
- </div>
868
- </div>
869
- ),
123
+ render: () => <IconSizeVariations icon={ChevronDownIcon} />,
870
124
  }
871
125
 
872
126
  export const ColorVariations: Story = {
873
- parameters: {
874
- ...storyParameters,
875
- docs: {
876
- description: {
877
- story:
878
- "ChevronDownIcon in different semantic colors for various UI contexts.",
879
- },
880
- },
881
- },
127
+ render: () => <IconColorVariations icon={ChevronDownIcon} />,
128
+ }
129
+
130
+ export const DirectionalVariations: Story = {
882
131
  render: () => (
883
- <div className="grid min-h-dvh grid-cols-2 items-center justify-center gap-6 rounded-lg bg-gradient-to-br from-gray-900 to-gray-800 p-8 md:grid-cols-4">
884
- <div className="text-center">
885
- <div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-blue-500/30 bg-blue-500/20">
886
- <ChevronDownIcon className="h-8 w-8 text-blue-400" />
887
- </div>
888
- <div className="text-sm font-medium text-white">Primary</div>
889
- <div className="text-xs text-blue-400">text-blue-400</div>
890
- </div>
891
- <div className="text-center">
892
- <div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-gray-500/30 bg-gray-500/20">
893
- <ChevronDownIcon className="h-8 w-8 text-gray-400" />
894
- </div>
895
- <div className="text-sm font-medium text-white">Secondary</div>
896
- <div className="text-xs text-gray-400">text-gray-400</div>
897
- </div>
898
- <div className="text-center">
899
- <div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-indigo-500/30 bg-indigo-500/20">
900
- <ChevronDownIcon className="h-8 w-8 text-indigo-400" />
901
- </div>
902
- <div className="text-sm font-medium text-white">Accent</div>
903
- <div className="text-xs text-indigo-400">text-indigo-400</div>
904
- </div>
905
- <div className="text-center">
906
- <div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-white/10 bg-white/5">
907
- <ChevronDownIcon className="h-8 w-8 text-white/40" />
908
- </div>
909
- <div className="text-sm font-medium text-white">Disabled</div>
910
- <div className="text-xs text-white/40">text-white/40</div>
911
- </div>
912
- </div>
132
+ <IconDirectionalVariations
133
+ icon={ChevronDownIcon}
134
+ directions={[
135
+ { label: "Down", className: "h-8 w-8 text-fm-icon-active" },
136
+ {
137
+ label: "Right",
138
+ className: "h-8 w-8 text-fm-icon-active -rotate-90",
139
+ },
140
+ { label: "Up", className: "h-8 w-8 text-fm-icon-active rotate-180" },
141
+ { label: "Left", className: "h-8 w-8 text-fm-icon-active rotate-90" },
142
+ ]}
143
+ />
913
144
  ),
914
145
  }
915
146
 
916
147
  export const UsageExamples: Story = {
917
- parameters: {
918
- ...storyParameters,
919
- docs: {
920
- description: {
921
- story:
922
- "Real-world usage examples showing ChevronDownIcon in different UI contexts.",
923
- },
924
- },
925
- },
926
148
  render: () => (
927
- <div className="min-h-dvh !space-y-8 rounded-lg bg-gradient-to-br from-gray-900 to-gray-800 p-8">
928
- {/* Dropdown Menu */}
929
- <div className="!space-y-2">
930
- <h3 className="text-sm font-medium text-white">Dropdown Menu</h3>
931
- <div className="relative">
932
- <button className="flex w-full items-center justify-between rounded-lg border border-white/20 bg-white/5 px-4 py-3 text-left text-white transition-colors hover:bg-white/10">
933
- <span>Select an option</span>
934
- <ChevronDownIcon className="h-4 w-4 text-blue-400 transition-transform" />
935
- </button>
149
+ <IconUsageCanvas>
150
+ <IconUsageSection title="Accordion">
151
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary w-full max-w-sm space-y-px overflow-hidden rounded-xl border">
152
+ {["Getting started", "Configuration", "Advanced usage"].map(
153
+ (item, i) => (
154
+ <button
155
+ key={item}
156
+ className="border-fm-divider-secondary flex w-full items-center justify-between border-b px-4 py-3 last:border-b-0"
157
+ >
158
+ <span className="text-fm-primary font-fm-text text-sm">
159
+ {item}
160
+ </span>
161
+ <ChevronDownIcon
162
+ className={`text-fm-icon-active h-4 w-4 transition-transform ${i === 0 ? "rotate-180" : ""}`}
163
+ />
164
+ </button>
165
+ )
166
+ )}
936
167
  </div>
937
- </div>
938
-
939
- {/* Accordion */}
940
- <div className="!space-y-2">
941
- <h3 className="text-sm font-medium text-white">
942
- Accordion/Collapsible
943
- </h3>
944
- <div className="rounded-lg border border-white/10 bg-white/5">
945
- <button className="flex w-full items-center justify-between p-4 text-left transition-colors hover:bg-white/10">
946
- <h4 className="font-medium text-white">
947
- Frequently Asked Questions
948
- </h4>
949
- <ChevronDownIcon className="h-5 w-5 text-blue-400 transition-transform" />
950
- </button>
951
- </div>
952
- </div>
953
-
954
- {/* Select Input */}
955
- <div className="!space-y-2">
956
- <h3 className="text-sm font-medium text-white">Select Input</h3>
957
- <div className="relative">
958
- <select className="w-full appearance-none rounded-lg border border-white/20 bg-white/5 px-4 py-3 pr-10 text-white focus:border-blue-500 focus:ring-2 focus:ring-blue-500/20">
959
- <option>United States</option>
960
- <option>Canada</option>
961
- <option>United Kingdom</option>
962
- </select>
963
- <ChevronDownIcon className="pointer-events-none absolute top-1/2 right-3 h-4 w-4 -translate-y-1/2 text-blue-400" />
168
+ </IconUsageSection>
169
+
170
+ <IconUsageSection title="Select / Dropdown Trigger">
171
+ <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">
172
+ <span className="text-fm-primary font-fm-text text-sm">
173
+ Select an option
174
+ </span>
175
+ <ChevronDownIcon className="text-fm-icon-inactive h-4 w-4" />
964
176
  </div>
965
- </div>
966
-
967
- {/* Sort Controls */}
968
- <div className="!space-y-2">
969
- <h3 className="text-sm font-medium text-white">Sort Controls</h3>
970
- <div className="flex items-center gap-4">
971
- <span className="text-sm text-white/70">Sort by:</span>
972
- <button className="flex items-center gap-2 rounded-lg border border-white/20 bg-white/5 px-3 py-2 text-sm text-white transition-colors hover:bg-white/10">
973
- <span>Date</span>
974
- <ChevronDownIcon className="h-3 w-3 text-blue-400" />
975
- </button>
976
- <button className="flex items-center gap-2 rounded-lg border border-blue-500/30 bg-blue-500/10 px-3 py-2 text-sm text-blue-200 transition-colors hover:bg-blue-500/20">
977
- <span>Name</span>
978
- <ChevronDownIcon className="h-3 w-3 rotate-180 text-blue-400" />
979
- </button>
177
+ </IconUsageSection>
178
+
179
+ <IconUsageSection title="Sortable Table Header">
180
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary w-full max-w-sm overflow-hidden rounded-xl border">
181
+ <div className="border-fm-divider-secondary flex items-center justify-between border-b px-4 py-2">
182
+ <span className="text-fm-secondary font-fm-text text-xs font-medium uppercase">
183
+ Title
184
+ </span>
185
+ <ChevronDownIcon className="text-fm-icon-info h-3 w-3" />
186
+ </div>
187
+ {["Episode 1", "Episode 2", "Episode 3"].map((ep) => (
188
+ <div
189
+ key={ep}
190
+ className="border-fm-divider-secondary border-b px-4 py-2.5 last:border-b-0"
191
+ >
192
+ <span className="text-fm-primary font-fm-text text-sm">{ep}</span>
193
+ </div>
194
+ ))}
980
195
  </div>
981
- </div>
982
- </div>
196
+ </IconUsageSection>
197
+ </IconUsageCanvas>
983
198
  ),
984
199
  }
985
200
 
986
201
  export const Playground: Story = {
987
- parameters: {
988
- ...storyParameters,
989
- docs: {
990
- description: {
991
- story:
992
- "Interactive playground to experiment with different ChevronDownIcon configurations.",
993
- },
994
- },
995
- },
996
202
  args: {
997
- width: 32,
998
- height: 32,
999
- className: "text-blue-400 ",
1000
- strokeWidth: 1.5,
203
+ className: "h-8 w-8 text-fm-icon-active",
204
+ withAccessibility: true,
1001
205
  },
1002
206
  render: (args) => (
1003
- <div className="flex h-64 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
1004
- <div className="rounded-lg border border-white/10 bg-white/5 p-8">
1005
- <ChevronDownIcon {...args} />
1006
- </div>
1007
- </div>
207
+ <IconPlaygroundCanvas>
208
+ <ChevronDownIcon {...args} />
209
+ </IconPlaygroundCanvas>
1008
210
  ),
1009
211
  }