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