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 { ArrowLeftIcon } from "src/ui/icons/arrow-left-icon"
5
+ import { ArrowRightIcon } from "src/ui/icons/arrow-right-icon"
6
+ import { ChevronDownIcon } from "src/ui/icons/chevron-down-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 { AngleDownIcon } from "."
5
20
 
6
21
  const meta: Meta<typeof AngleDownIcon> = {
@@ -11,798 +26,80 @@ const meta: Meta<typeof AngleDownIcon> = {
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-purple-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-purple-500/10 via-transparent to-blue-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-purple-500/20">
90
- <AngleDownIcon className="h-12 w-12 text-blue-400" />
91
- </div>
92
- <h1 className="!text-fm-primary text-5xl font-bold">
93
- AngleDownIcon
94
- </h1>
95
- <p className="!mx-auto max-w-3xl text-xl leading-relaxed !text-white/70">
96
- A directional icon for dropdowns, accordions, and
97
- collapsible content. Essential for navigation and
98
- interactive UI elements that expand downward.
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
- Navigation
106
- </div>
107
- <div className="text-sm text-white/60">
108
- Directional guidance
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-purple-300">
114
- Interactive
115
- </div>
116
- <div className="text-sm text-white/60">
117
- Dropdown friendly
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-green-300">
123
- Animated
124
- </div>
125
- <div className="text-sm text-white/60">
126
- Smooth transitions
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 { AngleDownIcon } from "@icons/angle-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 { AngleDownIcon } from "src/ui/icons/angle-down-icon"
48
+
49
+ function ExpandButton() {
151
50
  return (
152
51
  <button className="flex items-center gap-2">
153
- <span>Options</span>
154
- <AngleDownIcon className="h-4 w-4 text-gray-400" />
52
+ Show more
53
+ <AngleDownIcon 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-2 rounded-lg border border-blue-500/20 bg-blue-500/10 px-4 py-2 text-white transition-colors hover:bg-blue-500/20">
168
- <span>Options</span>
169
- <AngleDownIcon className="h-4 w-4 text-blue-400 transition-transform hover:rotate-180" />
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">16</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
- strokeWidth
248
- </td>
249
- <td className="px-6 py-4 text-sm !text-white/70">
250
- number | string
251
- </td>
252
- <td className="px-6 py-4 text-sm !text-white/50">2</td>
253
- <td className="px-6 py-4 text-sm !text-white/70">
254
- Stroke width of the icon
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
- className
260
- </td>
261
- <td className="px-6 py-4 text-sm !text-white/70">
262
- string
263
- </td>
264
- <td className="px-6 py-4 text-sm !text-white/50">-</td>
265
- <td className="px-6 py-4 text-sm !text-white/70">
266
- CSS classes for styling
267
- </td>
268
- </tr>
269
- <tr className="!bg-black/10">
270
- <td className="px-6 py-4 font-mono text-sm !text-blue-300">
271
- ...svgProps
272
- </td>
273
- <td className="px-6 py-4 text-sm !text-white/70">
274
- SVGProps
275
- </td>
276
- <td className="px-6 py-4 text-sm !text-white/50">-</td>
277
- <td className="px-6 py-4 text-sm !text-white/70">
278
- All standard SVG element props
279
- </td>
280
- </tr>
281
- </tbody>
282
- </table>
283
- </div>
284
- </div>
285
-
286
- {/* Size Variations */}
287
- <div className="!space-y-8">
288
- <h2 className="text-center text-3xl font-bold !text-white">
289
- Size Variations
290
- </h2>
291
- <div className="rounded-lg border border-white/10 bg-white/5 p-8">
292
- <div className="!space-y-6">
293
- <div className="grid grid-cols-1 gap-8 md:grid-cols-2">
294
- <div className="!space-y-4">
295
- <h3 className="text-lg font-semibold !text-blue-300">
296
- Standard Sizes
297
- </h3>
298
- <div className="flex items-end gap-6 rounded-lg bg-black/20 p-6">
299
- <div className="text-center">
300
- <AngleDownIcon className="!mx-auto mb-2 h-3 w-3 text-blue-400" />
301
- <span className="text-xs text-white/60">12px</span>
302
- </div>
303
- <div className="text-center">
304
- <AngleDownIcon className="!mx-auto mb-2 h-4 w-4 text-blue-400" />
305
- <span className="text-xs text-white/60">16px</span>
306
- </div>
307
- <div className="text-center">
308
- <AngleDownIcon className="!mx-auto mb-2 h-5 w-5 text-blue-400" />
309
- <span className="text-xs text-white/60">20px</span>
310
- </div>
311
- <div className="text-center">
312
- <AngleDownIcon className="!mx-auto mb-2 h-6 w-6 text-blue-400" />
313
- <span className="text-xs text-white/60">24px</span>
314
- </div>
315
- <div className="text-center">
316
- <AngleDownIcon className="!mx-auto mb-2 h-8 w-8 text-blue-400" />
317
- <span className="text-xs text-white/60">32px</span>
318
- </div>
319
- <div className="text-center">
320
- <AngleDownIcon className="!mx-auto mb-2 h-12 w-12 text-blue-400" />
321
- <span className="text-xs text-white/60">48px</span>
322
- </div>
323
- </div>
324
- </div>
325
-
326
- <div className="!space-y-4">
327
- <h3 className="text-lg font-semibold !text-blue-300">
328
- Code Example
329
- </h3>
330
- <div className="rounded-lg bg-black/40 p-4">
331
- <pre className="overflow-x-auto text-sm !text-green-300">
332
- {`// Small (16px)
333
- <AngleDownIcon className="h-4 w-4" />
334
-
335
- // Medium (24px)
336
- <AngleDownIcon className="h-6 w-6" />
337
-
338
- // Large (32px)
339
- <AngleDownIcon className="h-8 w-8" />
340
-
341
- // Custom size
342
- <AngleDownIcon width={40} height={40} />`}
343
- </pre>
344
- </div>
345
- </div>
346
- </div>
347
- </div>
348
- </div>
349
- </div>
350
-
351
- {/* Direction & Animation */}
352
- <div className="!space-y-8">
353
- <h2 className="text-center text-3xl font-bold !text-white">
354
- Direction & Animation
355
- </h2>
356
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
357
- <div className="!space-y-4">
358
- <h3 className="text-lg font-semibold !text-blue-300">
359
- Directional Variants
360
- </h3>
361
- <div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
362
- <div className="grid grid-cols-2 gap-4">
363
- <div className="flex flex-col items-center gap-2">
364
- <AngleDownIcon className="h-6 w-6 text-blue-400" />
365
- <span className="text-xs !text-white/60">
366
- Down (Default)
367
- </span>
368
- </div>
369
- <div className="flex flex-col items-center gap-2">
370
- <AngleDownIcon className="h-6 w-6 rotate-180 text-blue-400" />
371
- <span className="text-xs !text-white/60">
372
- Up (rotate-180)
373
- </span>
374
- </div>
375
- <div className="flex flex-col items-center gap-2">
376
- <AngleDownIcon className="h-6 w-6 -rotate-90 text-blue-400" />
377
- <span className="text-xs !text-white/60">
378
- Right (-rotate-90)
379
- </span>
380
- </div>
381
- <div className="flex flex-col items-center gap-2">
382
- <AngleDownIcon className="h-6 w-6 rotate-90 text-blue-400" />
383
- <span className="text-xs !text-white/60">
384
- Left (rotate-90)
385
- </span>
386
- </div>
387
- </div>
388
- </div>
389
- </div>
390
-
391
- <div className="!space-y-4">
392
- <h3 className="text-lg font-semibold !text-blue-300">
393
- Animation Examples
394
- </h3>
395
- <div className="rounded-lg bg-black/40 p-4">
396
- <pre className="overflow-x-auto text-sm !text-green-300">
397
- {`// Smooth rotation transition
398
- <AngleDownIcon className="h-4 w-4 transition-transform duration-200 hover:rotate-180" />
399
-
400
- // Accordion toggle animation
401
- <AngleDownIcon className={\`h-4 w-4 transition-transform \${isOpen ? 'rotate-180' : ''}\`} />
402
-
403
- // Dropdown state animation
404
- <AngleDownIcon className="h-4 w-4 transition-all group-hover:rotate-180 group-hover:text-blue-300" />`}
405
- </pre>
406
- </div>
407
- </div>
408
- </div>
409
- </div>
410
-
411
- {/* Usage Examples */}
412
- <div className="!space-y-8">
413
- <h2 className="text-center text-3xl font-bold !text-white">
414
- Usage Examples
415
- </h2>
416
-
417
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
418
- {/* Dropdown Menu */}
419
- <div className="!space-y-4">
420
- <h3 className="text-lg font-semibold !text-blue-300">
421
- Dropdown Menu
422
- </h3>
423
- <div className="!space-y-4">
424
- <div className="relative">
425
- <button className="flex w-full items-center justify-between rounded-lg border border-white/10 bg-white/5 px-4 py-3 text-white transition-colors hover:bg-white/10">
426
- <span>Select an option</span>
427
- <AngleDownIcon className="h-4 w-4 text-gray-400 transition-transform group-hover:rotate-180" />
428
- </button>
429
- </div>
430
- <div className="rounded-lg bg-black/40 p-4">
431
- <pre className="overflow-x-auto text-sm !text-green-300">
432
- {`<button className="flex items-center justify-between w-full px-4 py-3 bg-white/5 border border-white/10 rounded-lg">
433
- <span>Select an option</span>
434
- <AngleDownIcon className="h-4 w-4 text-gray-400 transition-transform group-hover:rotate-180" />
435
- </button>`}
436
- </pre>
437
- </div>
438
- </div>
439
- </div>
440
-
441
- {/* Accordion */}
442
- <div className="!space-y-4">
443
- <h3 className="text-lg font-semibold !text-blue-300">
444
- Accordion Header
445
- </h3>
446
- <div className="!space-y-4">
447
- <div className="rounded-lg border border-white/10 bg-white/5">
448
- <button className="flex w-full items-center justify-between p-4 text-left transition-colors hover:bg-white/5">
449
- <h4 className="font-medium !text-white">
450
- Frequently Asked Questions
451
- </h4>
452
- <AngleDownIcon className="h-5 w-5 text-blue-400 transition-transform" />
453
- </button>
454
- </div>
455
- <div className="rounded-lg bg-black/40 p-4">
456
- <pre className="overflow-x-auto text-sm !text-green-300">
457
- {`<button className="flex items-center justify-between w-full p-4 text-left">
458
- <h4 className="font-medium text-white">Frequently Asked Questions</h4>
459
- <AngleDownIcon className={\`h-5 w-5 text-blue-400 transition-transform \${isOpen ? 'rotate-180' : ''}\`} />
460
- </button>`}
461
- </pre>
462
- </div>
463
- </div>
464
- </div>
465
-
466
- {/* Select Input */}
467
- <div className="!space-y-4">
468
- <h3 className="text-lg font-semibold !text-blue-300">
469
- Select Input
470
- </h3>
471
- <div className="!space-y-4">
472
- <div className="!space-y-2">
473
- <label className="text-sm font-medium !text-white">
474
- Country
475
- </label>
476
- <div className="relative">
477
- <select className="w-full appearance-none rounded-lg border border-white/10 bg-white/5 px-3 py-2 pr-10 !text-white focus:border-blue-500 focus:ring-2 focus:ring-blue-500/20">
478
- <option value="">Choose a country</option>
479
- <option value="us">United States</option>
480
- <option value="ca">Canada</option>
481
- <option value="uk">United Kingdom</option>
482
- </select>
483
- <AngleDownIcon className="pointer-events-none absolute top-1/2 right-3 h-4 w-4 -translate-y-1/2 text-gray-400" />
484
- </div>
485
- </div>
486
- <div className="rounded-lg bg-black/40 p-4">
487
- <pre className="overflow-x-auto text-sm !text-green-300">
488
- {`<div className="relative">
489
- <select className="w-full appearance-none pr-10 ...">
490
- <option>Choose a country</option>
491
- <!-- options -->
492
- </select>
493
- <AngleDownIcon className="absolute right-3 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400 pointer-events-none" />
494
- </div>`}
495
- </pre>
496
- </div>
497
- </div>
498
- </div>
499
-
500
- {/* Navigation Submenu */}
501
- <div className="!space-y-4">
502
- <h3 className="text-lg font-semibold !text-blue-300">
503
- Navigation Submenu
504
- </h3>
505
- <div className="!space-y-4">
506
- <nav className="rounded-lg border border-white/10 bg-white/5 p-4">
507
- <ul className="!list-none !space-y-2">
508
- <li>
509
- <button className="flex w-full items-center justify-between rounded px-3 py-2 text-left transition-colors hover:bg-white/10">
510
- <span className="!text-white">Products</span>
511
- <AngleDownIcon className="h-4 w-4 text-gray-400" />
512
- </button>
513
- </li>
514
- <li>
515
- <button className="flex w-full items-center justify-between rounded px-3 py-2 text-left transition-colors hover:bg-white/10">
516
- <span className="!text-white">Services</span>
517
- <AngleDownIcon className="h-4 w-4 text-gray-400" />
518
- </button>
519
- </li>
520
- </ul>
521
- </nav>
522
- <div className="rounded-lg bg-black/40 p-4">
523
- <pre className="overflow-x-auto text-sm !text-green-300">
524
- {`<button className="flex items-center justify-between w-full px-3 py-2">
525
- <span>Products</span>
526
- <AngleDownIcon className="h-4 w-4 text-gray-400" />
527
- </button>`}
528
- </pre>
529
- </div>
530
- </div>
531
- </div>
532
-
533
- {/* Sort Dropdown */}
534
- <div className="!space-y-4">
535
- <h3 className="text-lg font-semibold !text-blue-300">
536
- Sort Dropdown
537
- </h3>
538
- <div className="!space-y-4">
539
- <div className="flex items-center gap-2">
540
- <span className="text-sm !text-white/70">Sort by:</span>
541
- <button className="flex items-center gap-2 rounded border border-white/10 bg-white/5 px-3 py-1 text-sm transition-colors hover:bg-white/10">
542
- <span className="!text-white">Date</span>
543
- <AngleDownIcon className="h-3 w-3 text-gray-400" />
544
- </button>
545
- </div>
546
- <div className="rounded-lg bg-black/40 p-4">
547
- <pre className="overflow-x-auto text-sm !text-green-300">
548
- {`<button className="flex items-center gap-2 px-3 py-1 text-sm border border-white/10 bg-white/5 rounded">
549
- <span>Date</span>
550
- <AngleDownIcon className="h-3 w-3 text-gray-400" />
551
- </button>`}
552
- </pre>
553
- </div>
554
- </div>
555
- </div>
556
-
557
- {/* Collapsible Section */}
558
- <div className="!space-y-4">
559
- <h3 className="text-lg font-semibold !text-blue-300">
560
- Collapsible Section
561
- </h3>
562
- <div className="!space-y-4">
563
- <div className="rounded-lg border border-white/10 bg-white/5 p-4">
564
- <button className="mb-3 flex w-full items-center justify-between">
565
- <h4 className="font-medium !text-white">
566
- Advanced Settings
567
- </h4>
568
- <AngleDownIcon className="h-4 w-4 text-blue-400" />
569
- </button>
570
- <div className="rounded border border-white/5 bg-white/5 p-3">
571
- <p className="text-sm !text-white/70">
572
- Additional configuration options will appear here
573
- when expanded.
574
- </p>
575
- </div>
576
- </div>
577
- <div className="rounded-lg bg-black/40 p-4">
578
- <pre className="overflow-x-auto text-sm !text-green-300">
579
- {`<button className="flex items-center justify-between w-full mb-3" onClick={toggleExpanded}>
580
- <h4 className="font-medium text-white">Advanced Settings</h4>
581
- <AngleDownIcon className={\`h-4 w-4 text-blue-400 transition-transform \${isExpanded ? 'rotate-180' : ''}\`} />
582
- </button>
583
- {isExpanded && (
584
- <div className="bg-white/5 border border-white/5 rounded p-3">
585
- {/* Content */}
586
- </div>
587
- )}`}
588
- </pre>
589
- </div>
590
- </div>
591
- </div>
592
- </div>
593
- </div>
594
-
595
- {/* Accessibility */}
596
- <div className="!space-y-8">
597
- <h2 className="text-center text-3xl font-bold !text-white">
598
- Accessibility Features
599
- </h2>
600
- <div className="grid grid-cols-1 gap-8 md:grid-cols-2">
601
- <div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
602
- <h3 className="text-lg font-semibold !text-green-300">
603
- ✅ Built-in Features
604
- </h3>
605
- <ul className="!space-y-2 text-sm !text-white/70">
606
- <li className="!text-white/70">
607
- Uses Radix UI AccessibleIcon wrapper
608
- </li>
609
- <li className="!text-white/70">
610
- Provides screen reader label "Angle down icon"
611
- </li>
612
- <li className="!text-white/70">
613
- Supports keyboard navigation in interactive contexts
614
- </li>
615
- <li className="!text-white/70">
616
- Maintains proper color contrast ratios
617
- </li>
618
- <li className="!text-white/70">
619
- Respects user's motion preferences
620
- </li>
621
- </ul>
622
- </div>
623
-
624
- <div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
625
- <h3 className="text-lg font-semibold !text-blue-300">
626
- 💡 Best Practices
627
- </h3>
628
- <ul className="!space-y-2 text-sm text-white/70">
629
- <li className="!text-white/70">
630
- Use with proper ARIA labels for dropdowns
631
- </li>
632
- <li className="!text-white/70">
633
- Indicate expanded/collapsed state clearly
634
- </li>
635
- <li className="!text-white/70">
636
- Provide keyboard shortcuts for power users
637
- </li>
638
- <li className="!text-white/70">
639
- Use consistent animation directions
640
- </li>
641
- <li className="!text-white/70">
642
- Test with screen readers
643
- </li>
644
- </ul>
645
- </div>
646
- </div>
647
-
648
- <div className="rounded-lg border border-white/10 bg-white/5 p-6">
649
- <h3 className="mb-4 text-lg font-semibold !text-purple-300">
650
- Accessible Dropdown Implementation
651
- </h3>
652
- <div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
653
- <div className="rounded-lg bg-black/40 p-4">
654
- <pre className="overflow-x-auto text-sm !text-blue-300">
655
- {`// Accessible dropdown with proper ARIA attributes
656
- function AccessibleDropdown() {
657
- const [isOpen, setIsOpen] = useState(false)
658
-
659
- return (
660
- <div className="relative">
661
- <button
662
- aria-expanded={isOpen}
663
- aria-haspopup="listbox"
664
- onClick={() => setIsOpen(!isOpen)}
665
- className="flex items-center justify-between w-full"
666
- >
667
- <span>Select option</span>
668
- <AngleDownIcon
669
- className={\`h-4 w-4 transition-transform \${isOpen ? 'rotate-180' : ''}\`}
670
- aria-hidden="true"
56
+ }`,
57
+ livePreview: (
58
+ <button className="text-fm-primary font-fm-text flex items-center gap-2 text-sm">
59
+ Show more
60
+ <AngleDownIcon className="text-fm-icon-active h-4 w-4" />
61
+ </button>
62
+ ),
63
+ }}
64
+ relatedIcons={[
65
+ {
66
+ name: "ChevronDownIcon",
67
+ description: "Sharper chevron down",
68
+ icon: ChevronDownIcon,
69
+ accentToken: "info",
70
+ },
71
+ {
72
+ name: "ChevronUpIcon",
73
+ description: "Points upward",
74
+ icon: ChevronUpIcon,
75
+ accentToken: "positive",
76
+ },
77
+ {
78
+ name: "ArrowLeftIcon",
79
+ description: "Left-pointing arrow",
80
+ icon: ArrowLeftIcon,
81
+ accentToken: "warning",
82
+ },
83
+ {
84
+ name: "ArrowRightIcon",
85
+ description: "Right-pointing arrow",
86
+ icon: ArrowRightIcon,
87
+ accentToken: "negative",
88
+ },
89
+ ]}
671
90
  />
672
- </button>
673
-
674
- {isOpen && (
675
- <ul role="listbox" className="absolute top-full left-0 w-full">
676
- {/* Options */}
677
- </ul>
678
- )}
679
- </div>
680
- )
681
- }`}
682
- </pre>
683
- </div>
684
- <div className="!space-y-4">
685
- <p className="text-sm !text-white/70">
686
- This implementation includes proper ARIA attributes for
687
- screen readers and keyboard navigation support.
688
- </p>
689
- <div className="rounded-lg border border-blue-500/20 bg-blue-500/10 p-4">
690
- <div className="flex items-center gap-2 text-sm !text-blue-200">
691
- <AngleDownIcon className="h-4 w-4" />
692
- <span>
693
- The icon is marked as aria-hidden since the button
694
- already provides context
695
- </span>
696
- </div>
697
- </div>
698
- </div>
699
- </div>
700
- </div>
701
- </div>
702
-
703
- {/* Related Icons */}
704
- <div className="!space-y-8">
705
- <h2 className="text-center text-3xl font-bold !text-white">
706
- Related Icons
707
- </h2>
708
- <div className="grid grid-cols-2 gap-6 md:grid-cols-4">
709
- <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
710
- <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-blue-500/20">
711
- <AngleDownIcon className="h-6 w-6 rotate-180 text-blue-400" />
712
- </div>
713
- <div>
714
- <div className="font-medium text-white">AngleUpIcon</div>
715
- <div className="text-xs text-white/60">
716
- Upward direction
717
- </div>
718
- </div>
719
- </div>
720
- <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
721
- <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-green-500/20">
722
- <AngleDownIcon className="h-6 w-6 -rotate-90 text-green-400" />
723
- </div>
724
- <div>
725
- <div className="font-medium text-white">
726
- AngleRightIcon
727
- </div>
728
- <div className="text-xs text-white/60">
729
- Right direction
730
- </div>
731
- </div>
732
- </div>
733
- <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
734
- <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-purple-500/20">
735
- <AngleDownIcon className="h-6 w-6 rotate-90 text-purple-400" />
736
- </div>
737
- <div>
738
- <div className="font-medium text-white">
739
- AngleLeftIcon
740
- </div>
741
- <div className="text-xs text-white/60">
742
- Left direction
743
- </div>
744
- </div>
745
- </div>
746
- <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
747
- <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-orange-500/20">
748
- <span className="text-2xl">⚡</span>
749
- </div>
750
- <div>
751
- <div className="font-medium text-white">ChevronIcon</div>
752
- <div className="text-xs text-white/60">
753
- Alternative style
754
- </div>
755
- </div>
756
- </div>
757
- </div>
758
- </div>
759
- </div>
760
-
761
- {/* Footer */}
762
- <div className="border-t border-white/10 bg-black/20 backdrop-blur-xl">
763
- <div className="!mx-auto max-w-7xl px-6 py-8">
764
- <div className="!space-y-4 text-center">
765
- <p className="!text-white/60">
766
- AngleDownIcon is part of the Aural UI icon library, designed
767
- for intuitive navigation and interaction.
768
- </p>
769
- <p className="text-sm !text-white/40">
770
- Perfect for dropdowns, accordions, and any collapsible
771
- content that requires directional indication.
772
- </p>
773
- </div>
774
- </div>
775
- </div>
776
- </div>
777
- </>
778
91
  ),
779
92
  },
780
93
  },
781
94
  tags: ["autodocs"],
782
95
  argTypes: {
783
- width: {
784
- control: { type: "range", min: 8, max: 96, step: 2 },
785
- description: "Width of the icon in pixels",
96
+ className: {
97
+ control: "text",
98
+ description: "CSS classes including size and color token",
786
99
  },
787
100
  withAccessibility: {
788
101
  control: "boolean",
789
- description: "Whether to wrap the icon with accessibility features",
790
- },
791
- height: {
792
- control: { type: "range", min: 8, max: 96, step: 2 },
793
- description: "Height of the icon in pixels",
794
- },
795
- stroke: {
796
- control: "color",
797
- description: "Stroke color of the icon",
798
- },
799
- strokeWidth: {
800
- control: { type: "range", min: 1, max: 4, step: 0.5 },
801
- description: "Stroke width of the icon",
802
- },
803
- className: {
804
- control: "text",
805
- description: "CSS classes for styling",
102
+ description: "Wrap with accessibility label",
806
103
  },
807
104
  },
808
105
  }
@@ -810,230 +107,102 @@ function AccessibleDropdown() {
810
107
  export default meta
811
108
  type Story = StoryObj<typeof AngleDownIcon>
812
109
 
813
- // Story parameters for consistent dark theme
814
- const storyParameters = {
815
- backgrounds: {
816
- default: "dark",
817
- values: [
818
- { name: "dark", value: "#0a0a0a" },
819
- { name: "darker", value: "#000000" },
820
- ],
821
- },
822
- }
823
-
824
110
  export const Default: Story = {
825
111
  args: {
826
- width: 24,
827
- height: 24,
828
- className: "text-blue-400",
112
+ className: "h-6 w-6 text-fm-icon-active",
829
113
  withAccessibility: true,
830
114
  },
831
- parameters: storyParameters,
832
115
  render: (args) => (
833
- <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>
834
117
  <AngleDownIcon {...args} />
835
- </div>
118
+ </IconDefaultCanvas>
836
119
  ),
837
120
  }
838
121
 
839
122
  export const SizeVariations: Story = {
840
- parameters: {
841
- ...storyParameters,
842
- docs: {
843
- description: {
844
- story:
845
- "AngleDownIcon in different sizes, from small UI elements to large displays.",
846
- },
847
- },
848
- },
849
- render: () => (
850
- <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">
851
- <div className="text-center">
852
- <AngleDownIcon className="!mx-auto mb-2 h-3 w-3 text-blue-400" />
853
- <span className="text-xs text-white/60">12px</span>
854
- </div>
855
- <div className="text-center">
856
- <AngleDownIcon className="!mx-auto mb-2 h-4 w-4 text-blue-400" />
857
- <span className="text-xs text-white/60">16px</span>
858
- </div>
859
- <div className="text-center">
860
- <AngleDownIcon className="!mx-auto mb-2 h-5 w-5 text-blue-400" />
861
- <span className="text-xs text-white/60">20px</span>
862
- </div>
863
- <div className="text-center">
864
- <AngleDownIcon className="!mx-auto mb-2 h-6 w-6 text-blue-400" />
865
- <span className="text-xs text-white/60">24px</span>
866
- </div>
867
- <div className="text-center">
868
- <AngleDownIcon className="!mx-auto mb-2 h-8 w-8 text-blue-400" />
869
- <span className="text-xs text-white/60">32px</span>
870
- </div>
871
- <div className="text-center">
872
- <AngleDownIcon className="!mx-auto mb-2 h-12 w-12 text-blue-400" />
873
- <span className="text-xs text-white/60">48px</span>
874
- </div>
875
- </div>
876
- ),
123
+ render: () => <IconSizeVariations icon={AngleDownIcon} />,
124
+ }
125
+
126
+ export const ColorVariations: Story = {
127
+ render: () => <IconColorVariations icon={AngleDownIcon} />,
877
128
  }
878
129
 
879
130
  export const DirectionalVariations: Story = {
880
- parameters: {
881
- ...storyParameters,
882
- docs: {
883
- description: {
884
- story:
885
- "AngleDownIcon rotated to different directions for various navigation purposes.",
886
- },
887
- },
888
- },
889
131
  render: () => (
890
- <div className="grid min-h-dvh grid-cols-2 items-center justify-center gap-8 rounded-lg bg-gradient-to-br from-gray-900 to-gray-800 p-8 md:grid-cols-4">
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-blue-500/30 bg-blue-500/20">
893
- <AngleDownIcon className="h-8 w-8 text-blue-400" />
894
- </div>
895
- <div className="text-sm font-medium text-white">Down</div>
896
- <div className="text-xs text-blue-400">Default</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-purple-500/30 bg-purple-500/20">
900
- <AngleDownIcon className="h-8 w-8 rotate-180 text-purple-400" />
901
- </div>
902
- <div className="text-sm font-medium text-white">Up</div>
903
- <div className="text-xs text-purple-400">rotate-180</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-green-500/30 bg-green-500/20">
907
- <AngleDownIcon className="h-8 w-8 -rotate-90 text-green-400" />
908
- </div>
909
- <div className="text-sm font-medium text-white">Right</div>
910
- <div className="text-xs text-green-400">-rotate-90</div>
911
- </div>
912
- <div className="text-center">
913
- <div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-orange-500/30 bg-orange-500/20">
914
- <AngleDownIcon className="h-8 w-8 rotate-90 text-orange-400" />
915
- </div>
916
- <div className="text-sm font-medium text-white">Left</div>
917
- <div className="text-xs text-orange-400">rotate-90</div>
918
- </div>
919
- </div>
132
+ <IconDirectionalVariations
133
+ icon={AngleDownIcon}
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
+ />
920
144
  ),
921
145
  }
922
146
 
923
147
  export const UsageExamples: Story = {
924
- parameters: {
925
- ...storyParameters,
926
- docs: {
927
- description: {
928
- story:
929
- "Real-world usage examples showing AngleDownIcon in different UI contexts.",
930
- },
931
- },
932
- },
933
148
  render: () => (
934
- <div className="min-h-dvh !space-y-8 rounded-lg bg-gradient-to-br from-gray-900 to-gray-800 p-8">
935
- {/* Dropdown */}
936
- <div className="!space-y-2">
937
- <h3 className="text-sm font-medium text-white">Dropdown Menu</h3>
938
- <button className="flex w-full items-center justify-between rounded-lg border border-white/10 bg-white/5 px-4 py-3 text-white transition-colors hover:bg-white/10">
939
- <span>Select an option</span>
940
- <AngleDownIcon className="h-4 w-4 text-gray-400 transition-transform hover:rotate-180" />
941
- </button>
942
- </div>
943
-
944
- {/* Accordion */}
945
- <div className="!space-y-2">
946
- <h3 className="text-sm font-medium text-white">Accordion</h3>
947
- <div className="rounded-lg border border-white/10 bg-white/5">
948
- <button className="flex w-full items-center justify-between p-4 text-left transition-colors hover:bg-white/5">
949
- <h4 className="font-medium text-white">
950
- Frequently Asked Questions
951
- </h4>
952
- <AngleDownIcon className="h-5 w-5 text-blue-400 transition-transform" />
953
- </button>
149
+ <IconUsageCanvas>
150
+ <IconUsageSection title="Expandable Section">
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
+ {["Overview", "Details", "Settings"].map((item, i) => (
153
+ <button
154
+ key={item}
155
+ className="border-fm-divider-secondary flex w-full items-center justify-between border-b px-4 py-3 last:border-b-0"
156
+ >
157
+ <span className="text-fm-primary font-fm-text text-sm">
158
+ {item}
159
+ </span>
160
+ <AngleDownIcon
161
+ className={`text-fm-icon-active h-4 w-4 transition-transform ${i === 0 ? "rotate-180" : ""}`}
162
+ />
163
+ </button>
164
+ ))}
954
165
  </div>
955
- </div>
956
-
957
- {/* Select Input */}
958
- <div className="!space-y-2">
959
- <h3 className="text-sm font-medium text-white">Select Input</h3>
960
- <div className="relative">
961
- <select className="w-full appearance-none rounded-lg border border-white/10 bg-white/5 px-3 py-2 pr-10 text-white focus:border-blue-500 focus:ring-2 focus:ring-blue-500/20">
962
- <option value="">Choose a country</option>
963
- <option value="us">United States</option>
964
- <option value="ca">Canada</option>
965
- </select>
966
- <AngleDownIcon className="pointer-events-none absolute top-1/2 right-3 h-4 w-4 -translate-y-1/2 text-gray-400" />
166
+ </IconUsageSection>
167
+
168
+ <IconUsageSection title="Select Trigger">
169
+ <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">
170
+ <span className="text-fm-primary font-fm-text text-sm">
171
+ Choose category
172
+ </span>
173
+ <AngleDownIcon className="text-fm-icon-inactive h-4 w-4" />
967
174
  </div>
968
- </div>
969
-
970
- {/* Sort Dropdown */}
971
- <div className="!space-y-2">
972
- <h3 className="text-sm font-medium text-white">Sort Dropdown</h3>
973
- <div className="flex items-center gap-2">
974
- <span className="text-sm text-white/70">Sort by:</span>
975
- <button className="flex items-center gap-2 rounded border border-white/10 bg-white/5 px-3 py-1 text-sm transition-colors hover:bg-white/10">
976
- <span className="text-white">Date</span>
977
- <AngleDownIcon className="h-3 w-3 text-gray-400" />
978
- </button>
175
+ </IconUsageSection>
176
+
177
+ <IconUsageSection title="Navigation Menu">
178
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary w-full max-w-sm overflow-hidden rounded-xl border">
179
+ {["Library", "Discover", "More"].map((item, i) => (
180
+ <div
181
+ key={item}
182
+ className="border-fm-divider-secondary flex items-center justify-between border-b px-4 py-3 last:border-b-0"
183
+ >
184
+ <span className="text-fm-primary font-fm-text text-sm">
185
+ {item}
186
+ </span>
187
+ {i === 2 && (
188
+ <AngleDownIcon className="text-fm-icon-inactive h-4 w-4" />
189
+ )}
190
+ </div>
191
+ ))}
979
192
  </div>
980
- </div>
981
- </div>
982
- ),
983
- }
984
-
985
- export const AnimatedStates: Story = {
986
- parameters: {
987
- ...storyParameters,
988
- docs: {
989
- description: {
990
- story:
991
- "AngleDownIcon with different animation states for interactive elements.",
992
- },
993
- },
994
- },
995
- render: () => (
996
- <div className="grid min-h-dvh grid-cols-1 items-center gap-8 rounded-lg bg-gradient-to-br from-gray-900 to-gray-800 p-8 md:grid-cols-2">
997
- <div className="text-center">
998
- <h3 className="mb-4 text-lg font-medium text-white">Hover Animation</h3>
999
- <button className="group rounded-lg border border-blue-500/30 bg-blue-500/10 px-6 py-3 transition-colors hover:bg-blue-500/20">
1000
- <AngleDownIcon className="h-6 w-6 text-blue-400 transition-transform duration-300 group-hover:rotate-180" />
1001
- </button>
1002
- <p className="mt-2 text-xs text-white/60">Hover to rotate</p>
1003
- </div>
1004
-
1005
- <div className="text-center">
1006
- <h3 className="mb-4 text-lg font-medium text-white">Toggle State</h3>
1007
- <button className="rounded-lg border border-green-500/30 bg-green-500/10 px-6 py-3 transition-colors hover:bg-green-500/20">
1008
- <AngleDownIcon className="h-6 w-6 rotate-180 text-green-400 transition-transform duration-300" />
1009
- </button>
1010
- <p className="mt-2 text-xs text-white/60">Expanded state</p>
1011
- </div>
1012
- </div>
193
+ </IconUsageSection>
194
+ </IconUsageCanvas>
1013
195
  ),
1014
196
  }
1015
197
 
1016
198
  export const Playground: Story = {
1017
- parameters: {
1018
- ...storyParameters,
1019
- docs: {
1020
- description: {
1021
- story:
1022
- "Interactive playground to experiment with different AngleDownIcon configurations.",
1023
- },
1024
- },
1025
- },
1026
199
  args: {
1027
- width: 32,
1028
- height: 32,
1029
- className: "text-blue-400",
1030
- strokeWidth: 2,
200
+ className: "h-8 w-8 text-fm-icon-active",
201
+ withAccessibility: true,
1031
202
  },
1032
203
  render: (args) => (
1033
- <div className="flex h-64 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
1034
- <div className="rounded-lg border border-white/10 bg-white/5 p-8">
1035
- <AngleDownIcon {...args} />
1036
- </div>
1037
- </div>
204
+ <IconPlaygroundCanvas>
205
+ <AngleDownIcon {...args} />
206
+ </IconPlaygroundCanvas>
1038
207
  ),
1039
208
  }