aural-ui 4.0.1 → 4.2.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 (175) hide show
  1. package/README.md +8 -1
  2. package/dist/components/aspect-ratio/AspectRatio.stories.tsx +290 -1228
  3. package/dist/components/avatar/Avatar.stories.tsx +219 -235
  4. package/dist/components/badge/Badge.stories.tsx +379 -116
  5. package/dist/components/banner/Banner.stories.tsx +445 -391
  6. package/dist/components/breadcrumb/Breadcrumb.stories.tsx +453 -199
  7. package/dist/components/button/Button.stories.tsx +585 -230
  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 -636
  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 +530 -867
  16. package/dist/components/dialog/Dialog.stories.tsx +501 -950
  17. package/dist/components/divider/Divider.stories.tsx +264 -527
  18. package/dist/components/dot-loader/DotLoader.stories.tsx +256 -257
  19. package/dist/components/drawer/Drawer.stories.tsx +659 -1023
  20. package/dist/components/dropdown/Dropdown.stories.tsx +643 -1028
  21. package/dist/components/form/Form.stories.tsx +560 -274
  22. package/dist/components/helper-text/HelperText.stories.tsx +199 -200
  23. package/dist/components/hover-card/HoverCard.stories.tsx +318 -1254
  24. package/dist/components/icon-button/IconButton.stories.tsx +837 -194
  25. package/dist/components/if-else/if-else.stories.tsx +370 -83
  26. package/dist/components/input/Input.stories.tsx +436 -368
  27. package/dist/components/label/Label.stories.tsx +156 -154
  28. package/dist/components/list/List.stories.tsx +484 -835
  29. package/dist/components/marquee/Marquee.stories.tsx +356 -712
  30. package/dist/components/otp-inputs/OtpInputs.stories.tsx +352 -422
  31. package/dist/components/overlay/Overlay.stories.tsx +452 -824
  32. package/dist/components/pagination/Pagination.stories.tsx +721 -210
  33. package/dist/components/popover/Popover.stories.tsx +481 -896
  34. package/dist/components/radio/Radio.stories.tsx +432 -124
  35. package/dist/components/resizable/Resizable.stories.tsx +495 -799
  36. package/dist/components/scroll-area/ScrollArea.stories.tsx +383 -1059
  37. package/dist/components/search/Search.stories.tsx +312 -595
  38. package/dist/components/select/Select.stories.tsx +684 -789
  39. package/dist/components/sheet/Sheet.stories.tsx +671 -950
  40. package/dist/components/skelton/Skelton.stories.tsx +230 -764
  41. package/dist/components/slider/Slider.stories.tsx +383 -760
  42. package/dist/components/stepper/Stepper.stories.tsx +371 -514
  43. package/dist/components/switch/Switch.stories.tsx +461 -208
  44. package/dist/components/switch-case/SwitchCase.stories.tsx +367 -188
  45. package/dist/components/table/Table.stories.tsx +770 -916
  46. package/dist/components/tabs/Tabs.stories.tsx +458 -1455
  47. package/dist/components/tag/Tag.stories.tsx +714 -542
  48. package/dist/components/textarea/TextArea.stories.tsx +621 -562
  49. package/dist/components/thumbnail-tags/ThumbnailTags.stories.tsx +228 -154
  50. package/dist/components/toast/Toast.stories.tsx +452 -1339
  51. package/dist/components/toggle/Toggle.stories.tsx +488 -931
  52. package/dist/components/tooltip/Tooltip.stories.tsx +344 -1388
  53. package/dist/components/typography/Typography.stories.tsx +406 -89
  54. package/dist/hooks/use-change-state/UseChangeState.stories.tsx +309 -606
  55. package/dist/hooks/use-previous/UsePrevious.stories.tsx +367 -917
  56. package/dist/hooks/use-standalone-pagination/UseStandalonePagination.stories.tsx +639 -867
  57. package/dist/icons/Icons.stories.tsx +0 -12
  58. package/dist/icons/ai-avatar-icon/AiAvatarIcon.stories.tsx +223 -1060
  59. package/dist/icons/alert-icon/AlertIcon.stories.tsx +106 -968
  60. package/dist/icons/all-icons.tsx +37 -16
  61. package/dist/icons/angle-down-icon/AngleDownIcon.stories.tsx +137 -1010
  62. package/dist/icons/apple-logo-icon/AppleLogoIcon.stories.tsx +145 -935
  63. package/dist/icons/arrow-box-left-icon/ArrowBoxLeftIcon.stories.tsx +132 -1046
  64. package/dist/icons/arrow-corner-up-left-icon/ArrowCornerUpLeftIcon.stories.tsx +134 -986
  65. package/dist/icons/arrow-corner-up-right-icon/ArrowCornerUpRightIcon.stories.tsx +135 -1028
  66. package/dist/icons/arrow-left-icon/ArrowLeftIcon.stories.tsx +133 -971
  67. package/dist/icons/arrow-right-icon/ArrowRightIcon.stories.tsx +145 -1123
  68. package/dist/icons/arrow-right-up-icon/ArrowRightUpIcon.stories.tsx +143 -1252
  69. package/dist/icons/art-board-icon/ArtBoardIcon.stories.tsx +123 -632
  70. package/dist/icons/audio-bar-icon/AudioBarIcon.stories.tsx +141 -1223
  71. package/dist/icons/backward-ten-seconds-icon/BackwardTenSecondsIcon.stories.tsx +164 -1018
  72. package/dist/icons/bubble-check-icon/BubbleCheckIcon.stories.tsx +121 -1236
  73. package/dist/icons/bubble-crossed-icon/BubbleCrossedIcon.stories.tsx +121 -1213
  74. package/dist/icons/bubble-sparkle-icon/BubbleSparkleIcon.stories.tsx +116 -893
  75. package/dist/icons/camera-icon/CameraIcon.stories.tsx +109 -1254
  76. package/dist/icons/capital-a-letter-icon/CapitalALetterIcon.stories.tsx +114 -975
  77. package/dist/icons/chevron-double-left-icon/ChevronDoubleLeftIcon.stories.tsx +157 -994
  78. package/dist/icons/chevron-double-right-icon/ChevronDoubleRightIcon.stories.tsx +160 -992
  79. package/dist/icons/chevron-down-icon/ChevronDownIcon.stories.tsx +140 -970
  80. package/dist/icons/chevron-left-icon/ChevronLeftIcon.stories.tsx +126 -993
  81. package/dist/icons/chevron-right-icon/ChevronRightIcon.stories.tsx +144 -987
  82. package/dist/icons/chevron-up-icon/ChevronUpIcon.stories.tsx +141 -1007
  83. package/dist/icons/circle-tick-icon/CircleTickIcon.stories.tsx +147 -1187
  84. package/dist/icons/circular-play-icon/CircularPlayIcon.stories.tsx +110 -476
  85. package/dist/icons/coin-icon/CoinIcon.stories.tsx +120 -1364
  86. package/dist/icons/coin-toons-icon/CoinToonsIcon.stories.tsx +113 -1360
  87. package/dist/icons/column-wide-add-icon/ColumnWideAddIcon.stories.tsx +111 -942
  88. package/dist/icons/command-icon/CommandIcon.stories.tsx +124 -1087
  89. package/dist/icons/copy-icon/CopyIcon.stories.tsx +119 -996
  90. package/dist/icons/cross-circle-icon/CrossCircleIcon.stories.tsx +144 -1046
  91. package/dist/icons/cross-icon/CrossIcon.stories.tsx +136 -999
  92. package/dist/icons/download-icon/DownloadIcon.stories.tsx +123 -857
  93. package/dist/icons/edit-big-icon/EditBigIcon.stories.tsx +121 -1080
  94. package/dist/icons/email-icon/EmailIcon.stories.tsx +112 -979
  95. package/dist/icons/expand-icon/ExpandIcon.stories.tsx +109 -1146
  96. package/dist/icons/eye-close-icon/EyeCloseIcon.stories.tsx +141 -1068
  97. package/dist/icons/eye-open-icon/EyeOpenIcon.stories.tsx +140 -1081
  98. package/dist/icons/feature-shine-icon/FeatureShineIcon.stories.tsx +124 -1050
  99. package/dist/icons/file-chart-icon/FileChartIcon.stories.tsx +123 -1091
  100. package/dist/icons/file-text-icon/FileTextIcon.stories.tsx +122 -633
  101. package/dist/icons/filter-bar-row-icon/FilterBarRowIcon.stories.tsx +116 -1087
  102. package/dist/icons/forward-ten-seconds-icon/ForwardTenSecondsIcon.stories.tsx +166 -1020
  103. package/dist/icons/git-branch-icon/GitBranchIcon.stories.tsx +112 -1182
  104. package/dist/icons/git-fork-icon/GitForkIcon.stories.tsx +112 -1155
  105. package/dist/icons/globe-icon/GlobeIcon.stories.tsx +127 -325
  106. package/dist/icons/google-logo-icon/GoogleLogoIcon.stories.tsx +142 -985
  107. package/dist/icons/grip-vertical-icon/GripVerticalIcon.stories.tsx +116 -1217
  108. package/dist/icons/head-icon/HeadIcon.stories.tsx +108 -953
  109. package/dist/icons/heart-icon/HeartIcon.stories.tsx +117 -1060
  110. package/dist/icons/image-avatar-sparkle-icon/ImageAvatarSparkleIcon.stories.tsx +116 -716
  111. package/dist/icons/image-icon/ImageIcon.stories.tsx +102 -1164
  112. package/dist/icons/import-folder-icon/ImportFolderIcon.stories.tsx +108 -1233
  113. package/dist/icons/import-left-arrow-folder-icon/ImportLeftArrowFolderIcon.stories.tsx +133 -1289
  114. package/dist/icons/indian-flag-icon/IndianFlagIcon.stories.tsx +155 -1012
  115. package/dist/icons/instagram-icon/InstagramIcon.stories.tsx +158 -1438
  116. package/dist/icons/layout-column-icon/LayoutColumnIcon.stories.tsx +121 -1011
  117. package/dist/icons/layout-left-icon/LayoutLeftIcon.stories.tsx +116 -981
  118. package/dist/icons/layout-right-icon/LayoutRightIcon.stories.tsx +116 -979
  119. package/dist/icons/light-bulb-simple-icon/LightBulbSimpleIcon.stories.tsx +105 -1252
  120. package/dist/icons/linked-in-icon/LinkedInIcon.stories.tsx +151 -1554
  121. package/dist/icons/magic-book-icon/MagicBookIcon.stories.tsx +107 -1227
  122. package/dist/icons/magic-edit-icon/MagicEditIcon.stories.tsx +116 -707
  123. package/dist/icons/maintenance-icon/MaintenanceIcon.stories.tsx +119 -1226
  124. package/dist/icons/message-icon/MessageIcon.stories.tsx +111 -557
  125. package/dist/icons/minimize-icon/MinimizeIcon.stories.tsx +112 -1198
  126. package/dist/icons/moon-icon/MoonIcon.stories.tsx +117 -557
  127. package/dist/icons/move-horizontal-icon/MoveHorizontalIcon.stories.tsx +106 -1235
  128. package/dist/icons/move-vertical-icon/MoveVerticalIcon.stories.tsx +112 -1185
  129. package/dist/icons/musical-note-icon/MusicalNoteIcon.stories.tsx +116 -1012
  130. package/dist/icons/notepad-icon/NotepadIcon.stories.tsx +108 -1137
  131. package/dist/icons/notes-icon/NotesIcon.stories.tsx +116 -1138
  132. package/dist/icons/page-search-icon/PageSearchIcon.stories.tsx +106 -1146
  133. package/dist/icons/page-text-icon/PageTextIcon.stories.tsx +119 -719
  134. package/dist/icons/paint-roll-icon/PaintRollIcon.stories.tsx +110 -999
  135. package/dist/icons/paper-plane-icon/PaperPlaneIcon.stories.tsx +109 -912
  136. package/dist/icons/pause-icon/PauseIcon.stories.tsx +110 -1041
  137. package/dist/icons/pencil-icon/PencilIcon.stories.tsx +112 -1109
  138. package/dist/icons/phone-icon/PhoneIcon.stories.tsx +112 -1023
  139. package/dist/icons/plus-icon/PlusIcon.stories.tsx +103 -1132
  140. package/dist/icons/pocket-studio-icon/PocketStudioIcon.stories.tsx +104 -870
  141. package/dist/icons/scroll-down-icon/ScrollDownIcon.stories.tsx +99 -476
  142. package/dist/icons/search-icon/SearchIcon.stories.tsx +108 -1161
  143. package/dist/icons/setting-icon/SettingIcon.stories.tsx +104 -1009
  144. package/dist/icons/share-icon/ShareIcon.stories.tsx +117 -1064
  145. package/dist/icons/shield-icon/ShieldIcon.stories.tsx +114 -974
  146. package/dist/icons/site-logo-icon/SiteLogoIcon.stories.tsx +134 -1160
  147. package/dist/icons/skip-backward-icon/SkipBackwardIcon.stories.tsx +169 -1017
  148. package/dist/icons/skip-forward-icon/SkipForwardIcon.stories.tsx +161 -1016
  149. package/dist/icons/sparkles-soft-icon/SparklesSoftIcon.stories.tsx +102 -1001
  150. package/dist/icons/spinner-gradient-icon/SpinnerGradientIcon.stories.tsx +155 -593
  151. package/dist/icons/spinner-solid-icon/SpinnerSolidIcon.stories.tsx +155 -608
  152. package/dist/icons/spinner-solid-neutral-icon/SpinnerSolidINeutralcon.stories.tsx +142 -712
  153. package/dist/icons/star-icon/StarIcon.stories.tsx +120 -946
  154. package/dist/icons/store-coin-icon/StoreCoinIcon.stories.tsx +109 -1013
  155. package/dist/icons/suggestion-icon/SuggestionIcon.stories.tsx +113 -891
  156. package/dist/icons/sun-icon/SunIcon.stories.tsx +117 -864
  157. package/dist/icons/text-color-icon/TextColorIcon.stories.tsx +113 -989
  158. package/dist/icons/text-indicator-icon/TextIndicatorIcon.stories.tsx +120 -1027
  159. package/dist/icons/threads-icon/ThreadsIcon.stories.tsx +153 -1476
  160. package/dist/icons/tick-circle-icon/TickCircleIcon.stories.tsx +143 -1187
  161. package/dist/icons/tick-icon/TickIcon.stories.tsx +142 -1322
  162. package/dist/icons/trash-icon/TrashIcon.stories.tsx +105 -970
  163. package/dist/icons/twitter-x-icon/TwitterXIcon.stories.tsx +154 -1457
  164. package/dist/icons/upload-icon/UploadIcon.stories.tsx +112 -930
  165. package/dist/icons/vertical-menu-icon/VerticalMenuIcon.stories.tsx +115 -1019
  166. package/dist/icons/video-play-list-icon/VideoPlaylistIcon.stories.tsx +122 -1092
  167. package/dist/icons/voice-playing-icon/VoicePlayingIcon.stories.tsx +120 -1401
  168. package/dist/icons/volume-full-icon/VolumeFullIcon.stories.tsx +107 -1212
  169. package/dist/icons/volume-half-icon/VolumeHalfIcon.stories.tsx +109 -1122
  170. package/dist/icons/volume-off-icon/VolumeOffIcon.stories.tsx +112 -1124
  171. package/dist/icons/warning-icon/WarningIcon.stories.tsx +119 -1083
  172. package/dist/icons/youtube-icon/YoutubeIcon.stories.tsx +158 -983
  173. package/dist/index.cjs +90 -90
  174. package/dist/index.js +90 -90
  175. package/package.json +8 -3
@@ -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 { ChevronRightIcon } from "src/ui/icons/chevron-right-icon"
7
+ import { ChevronUpIcon } from "src/ui/icons/chevron-up-icon"
8
+ import {
9
+ IconColorVariations,
10
+ IconDefaultCanvas,
11
+ IconDirectionalVariations,
12
+ IconPlaygroundCanvas,
13
+ IconSizeVariations,
14
+ IconUsageCanvas,
15
+ IconUsageSection,
16
+ } from "src/ui/story-spec/icons/icon-story-canvas"
17
+ import { AuralIconDocsPage } from "src/ui/story-spec/icons/icon-story-docs-page"
18
+
4
19
  import { ChevronLeftIcon } from "."
5
20
 
6
21
  const meta: Meta<typeof ChevronLeftIcon> = {
@@ -18,832 +33,73 @@ const meta: Meta<typeof ChevronLeftIcon> = {
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: var(--color-fm-surface-primary) ;
44
- }
45
- #storybook-docs {
46
- background: var(--color-fm-surface-primary) ;
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: var(--color-fm-icon-active) ;
54
- }
55
- .sbdocs-p, .sbdocs-li {
56
- color: var(--color-fm-secondary) ;
57
- }
58
- .sbdocs-code {
59
- background: var(--color-fm-surface-secondary) ;
60
- color: var(--color-fm-secondary-500) ;
61
- border: 1px solid var(--color-fm-divider-secondary) ;
62
- }
63
- .sbdocs-pre {
64
- background: var(--color-fm-surface-secondary) ;
65
- border: 1px solid var(--color-fm-divider-secondary) ;
66
- }
67
- .sbdocs-table {
68
- background: var(--color-fm-surface-secondary) ;
69
- border: 1px solid var(--color-fm-divider-secondary) ;
70
- }
71
- .sbdocs-table th {
72
- background: var(--color-fm-surface-secondary) ;
73
- color: var(--color-fm-icon-active) ;
74
- border-bottom: 1px solid var(--color-fm-divider-secondary) ;
75
- }
76
- .sbdocs-table td {
77
- color: var(--color-fm-secondary) ;
78
- border-bottom: 1px solid var(--color-fm-divider-tertiary) ;
79
- }
80
- `}
81
- </style>
82
-
83
- <div className="bg-fm-surface-primary min-h-screen">
84
- {/* Header */}
85
- <div className="border-fm-divider-secondary bg-fm-surface-secondary relative overflow-hidden border-b backdrop-blur-xl">
86
- <div className="from-fm-secondary-500/10 to-fm-secondary-500/10 absolute inset-0 bg-linear-to-r via-transparent" />
87
- <div className="relative !mx-auto max-w-7xl px-6 py-16">
88
- <div className="!space-y-6 text-center">
89
- <div className="border-fm-secondary-500/30 from-fm-secondary-500/20 to-fm-secondary-500/20 !mx-auto flex h-24 w-24 items-center justify-center rounded-2xl border bg-linear-to-br">
90
- <ChevronLeftIcon className="text-fm-secondary-600 h-12 w-12" />
91
- </div>
92
- <h1 className="!text-fm-primary text-5xl font-bold">
93
- ChevronLeftIcon
94
- </h1>
95
- <p className="text-fm-secondary! !mx-auto max-w-3xl text-xl leading-relaxed">
96
- A versatile chevron left icon for navigation, back buttons,
97
- and leftward direction indicators. Built with accessibility
98
- in mind using Radix UI's AccessibleIcon wrapper.
99
- </p>
100
-
101
- {/* Stats */}
102
- <div className="flex items-center justify-center gap-8 pt-8">
103
- <div className="text-center">
104
- <div className="text-fm-secondary-600 text-3xl font-bold">
105
- Accessible
106
- </div>
107
- <div className="text-fm-tertiary text-sm">
108
- Screen reader friendly
109
- </div>
110
- </div>
111
- <div className="bg-fm-divider-primary h-8 w-px" />
112
- <div className="text-center">
113
- <div className="text-fm-secondary-600 text-3xl font-bold">
114
- Scalable
115
- </div>
116
- <div className="text-fm-tertiary text-sm">
117
- Any size needed
118
- </div>
119
- </div>
120
- <div className="bg-fm-divider-primary h-8 w-px" />
121
- <div className="text-center">
122
- <div className="text-fm-icon-info text-3xl font-bold">
123
- Navigation
124
- </div>
125
- <div className="text-fm-tertiary text-sm">
126
- Leftward movement
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-fm-icon-active! text-center text-3xl font-bold">
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-fm-secondary-600! text-xl font-semibold">
144
- Basic Usage
145
- </h3>
146
- <div className="bg-fm-surface-secondary rounded-lg p-4">
147
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
148
- {`import { ChevronLeftIcon } from "@icons/chevron-left-icon"
36
+ <AuralIconDocsPage
37
+ accentToken="positive"
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 { ChevronLeftIcon } from "src/ui/icons/chevron-left-icon"
149
48
 
150
49
  function BackButton() {
151
50
  return (
152
- <button className="flex items-center gap-2">
153
- <ChevronLeftIcon className="h-4 w-4 text-purple-400 " />
154
- <span>Go Back</span>
51
+ <button className="flex items-center gap-1">
52
+ <ChevronLeftIcon className="h-4 w-4 text-fm-icon-active" />
53
+ Back
155
54
  </button>
156
55
  )
157
- }`}
158
- </pre>
159
- </div>
160
- </div>
161
-
162
- <div className="!space-y-4">
163
- <h3 className="text-fm-secondary-600! text-xl font-semibold">
164
- Live Preview
165
- </h3>
166
- <div className="border-fm-divider-secondary bg-fm-surface-secondary flex h-32 items-center justify-center rounded-lg border">
167
- <button className="border-fm-secondary-500/20 bg-fm-secondary-500/10 hover:bg-fm-secondary-500/20 flex items-center gap-3 rounded-lg border px-4 py-2 transition-colors">
168
- <ChevronLeftIcon className="text-fm-secondary-600 h-4 w-4" />
169
- <span className="text-fm-icon-active">Go Back</span>
170
- </button>
171
- </div>
172
- </div>
173
- </div>
174
- </div>
175
-
176
- {/* Props Documentation */}
177
- <div className="!space-y-8">
178
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
179
- Props & Configuration
180
- </h2>
181
-
182
- <div className="border-fm-divider-secondary bg-fm-surface-secondary overflow-hidden rounded-lg border">
183
- <div className="bg-fm-surface-secondary p-4">
184
- <h3 className="text-fm-icon-active! text-xl font-semibold">
185
- Props
186
- </h3>
187
- </div>
188
- <table className="!my-0 w-full">
189
- <thead className="bg-fm-surface-secondary">
190
- <tr className="border-fm-divider-secondary border-b">
191
- <th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
192
- Prop
193
- </th>
194
- <th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
195
- Type
196
- </th>
197
- <th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
198
- Default
199
- </th>
200
- <th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
201
- Description
202
- </th>
203
- </tr>
204
- </thead>
205
- <tbody>
206
- {" "}
207
- <tr className="bg-fm-surface-secondary!">
208
- <td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
209
- withAccessibility
210
- </td>
211
- <td className="text-fm-secondary! px-6 py-4 text-sm">
212
- boolean
213
- </td>
214
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
215
- true
216
- </td>
217
- <td className="text-fm-secondary! px-6 py-4 text-sm">
218
- Whether to wrap the icon with accessibility feature
219
- </td>
220
- </tr>
221
- <tr className="border-fm-divider-tertiary bg-fm-surface-secondary! border-b">
222
- <td className="text-fm-secondary-600! px-6 py-4 font-mono text-sm">
223
- height
224
- </td>
225
- <td className="text-fm-secondary! px-6 py-4 text-sm">
226
- number | string
227
- </td>
228
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
229
- 24
230
- </td>
231
- <td className="text-fm-secondary! px-6 py-4 text-sm">
232
- Height of the icon in pixels
233
- </td>
234
- </tr>
235
- <tr className="border-fm-divider-tertiary border-b">
236
- <td className="text-fm-secondary-600! px-6 py-4 font-mono text-sm">
237
- stroke
238
- </td>
239
- <td className="text-fm-secondary! px-6 py-4 text-sm">
240
- string
241
- </td>
242
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
243
- currentColor
244
- </td>
245
- <td className="text-fm-secondary! px-6 py-4 text-sm">
246
- Stroke color of the icon
247
- </td>
248
- </tr>
249
- <tr className="border-fm-divider-tertiary bg-fm-surface-secondary! border-b">
250
- <td className="text-fm-secondary-600! px-6 py-4 font-mono text-sm">
251
- className
252
- </td>
253
- <td className="text-fm-secondary! px-6 py-4 text-sm">
254
- string
255
- </td>
256
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
257
- -
258
- </td>
259
- <td className="text-fm-secondary! px-6 py-4 text-sm">
260
- CSS classes for styling (use for overrides)
261
- </td>
262
- </tr>
263
- <tr className="border-fm-divider-tertiary border-b">
264
- <td className="text-fm-secondary-600! px-6 py-4 font-mono text-sm">
265
- strokeWidth
266
- </td>
267
- <td className="text-fm-secondary! px-6 py-4 text-sm">
268
- number | string
269
- </td>
270
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
271
- 1.5
272
- </td>
273
- <td className="text-fm-secondary! px-6 py-4 text-sm">
274
- Stroke width of the chevron line
275
- </td>
276
- </tr>
277
- <tr className="bg-fm-surface-secondary!">
278
- <td className="text-fm-secondary-600! px-6 py-4 font-mono text-sm">
279
- ...svgProps
280
- </td>
281
- <td className="text-fm-secondary! px-6 py-4 text-sm">
282
- SVGProps
283
- </td>
284
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
285
- -
286
- </td>
287
- <td className="text-fm-secondary! px-6 py-4 text-sm">
288
- All standard SVG element props
289
- </td>
290
- </tr>
291
- </tbody>
292
- </table>
293
- </div>
294
- </div>
295
-
296
- {/* Size Variations */}
297
- <div className="!space-y-8">
298
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
299
- Size Variations
300
- </h2>
301
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-8">
302
- <div className="!space-y-6">
303
- <div className="grid grid-cols-1 gap-8 md:grid-cols-2">
304
- <div className="!space-y-4">
305
- <h3 className="text-fm-secondary-600! text-lg font-semibold">
306
- Standard Sizes
307
- </h3>
308
- <div className="bg-fm-surface-secondary flex items-end gap-6 rounded-lg p-6">
309
- <div className="text-center">
310
- <ChevronLeftIcon className="text-fm-secondary-600 !mx-auto mb-2 h-3 w-3" />
311
- <span className="text-fm-tertiary text-xs">
312
- 12px
313
- </span>
314
- </div>
315
- <div className="text-center">
316
- <ChevronLeftIcon className="text-fm-secondary-600 !mx-auto mb-2 h-4 w-4" />
317
- <span className="text-fm-tertiary text-xs">
318
- 16px
319
- </span>
320
- </div>
321
- <div className="text-center">
322
- <ChevronLeftIcon className="text-fm-secondary-600 !mx-auto mb-2 h-5 w-5" />
323
- <span className="text-fm-tertiary text-xs">
324
- 20px
325
- </span>
326
- </div>
327
- <div className="text-center">
328
- <ChevronLeftIcon className="text-fm-secondary-600 !mx-auto mb-2 h-6 w-6" />
329
- <span className="text-fm-tertiary text-xs">
330
- 24px
331
- </span>
332
- </div>
333
- <div className="text-center">
334
- <ChevronLeftIcon className="text-fm-secondary-600 !mx-auto mb-2 h-8 w-8" />
335
- <span className="text-fm-tertiary text-xs">
336
- 32px
337
- </span>
338
- </div>
339
- <div className="text-center">
340
- <ChevronLeftIcon className="text-fm-secondary-600 !mx-auto mb-2 h-12 w-12" />
341
- <span className="text-fm-tertiary text-xs">
342
- 48px
343
- </span>
344
- </div>
345
- </div>
346
- </div>
347
-
348
- <div className="!space-y-4">
349
- <h3 className="text-fm-secondary-600! text-lg font-semibold">
350
- Code Example
351
- </h3>
352
- <div className="bg-fm-surface-secondary rounded-lg p-4">
353
- <pre className="text-fm-icon-info! overflow-x-auto text-sm">
354
- {`// Small (16px)
355
- <ChevronLeftIcon className="h-4 w-4 " />
356
-
357
- // Medium (24px)
358
- <ChevronLeftIcon className="h-6 w-6 " />
359
-
360
- // Large (32px)
361
- <ChevronLeftIcon className="h-8 w-8 " />
362
-
363
- // Custom size
364
- <ChevronLeftIcon width={40} height={40} />`}
365
- </pre>
366
- </div>
367
- </div>
368
- </div>
369
- </div>
370
- </div>
371
- </div>
372
-
373
- {/* Color Variations */}
374
- <div className="!space-y-8">
375
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
376
- Color Variations
377
- </h2>
378
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
379
- <div className="!space-y-4">
380
- <h3 className="text-fm-secondary-600! text-lg font-semibold">
381
- Semantic Colors
382
- </h3>
383
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
384
- <div className="flex items-center gap-4">
385
- <ChevronLeftIcon className="text-fm-secondary-600 h-6 w-6" />
386
- <div>
387
- <div className="text-fm-icon-active text-sm font-medium">
388
- Primary
389
- </div>
390
- <div className="text-fm-tertiary text-xs">
391
- text-fm-secondary-600
392
- </div>
393
- </div>
394
- </div>
395
- <div className="flex items-center gap-4">
396
- <ChevronLeftIcon className="text-fm-placeholder h-6 w-6" />
397
- <div>
398
- <div className="text-fm-icon-active text-sm font-medium">
399
- Secondary
400
- </div>
401
- <div className="text-fm-tertiary text-xs">
402
- text-fm-placeholder
403
- </div>
404
- </div>
405
- </div>
406
- <div className="flex items-center gap-4">
407
- <ChevronLeftIcon className="text-fm-secondary-600 h-6 w-6" />
408
- <div>
409
- <div className="text-fm-icon-active text-sm font-medium">
410
- Accent
411
- </div>
412
- <div className="text-fm-tertiary text-xs">
413
- text-fm-secondary-600
414
- </div>
415
- </div>
416
- </div>
417
- <div className="flex items-center gap-4">
418
- <ChevronLeftIcon className="text-fm-placeholder h-6 w-6" />
419
- <div>
420
- <div className="text-fm-icon-active text-sm font-medium">
421
- Disabled
422
- </div>
423
- <div className="text-fm-tertiary text-xs">
424
- text-fm-placeholder
425
- </div>
426
- </div>
427
- </div>
428
- </div>
429
- </div>
430
-
431
- <div className="!space-y-4">
432
- <h3 className="text-fm-secondary-600! text-lg font-semibold">
433
- Custom Colors
434
- </h3>
435
- <div className="bg-fm-surface-secondary rounded-lg p-4">
436
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
437
- {`// Using Tailwind classes with
438
- <ChevronLeftIcon className="h-6 w-6 text-purple-400 " />
439
- <ChevronLeftIcon className="h-6 w-6 text-pink-500 " />
440
-
441
- // Using CSS custom properties
442
- <ChevronLeftIcon
443
- className="h-6 w-6 "
444
- style={{ color: 'var(--color-primary)' }}
445
- />
446
-
447
- // Direct stroke prop
448
- <ChevronLeftIcon
449
- width={24}
450
- height={24}
451
- stroke="#8b5cf6"
452
- />`}
453
- </pre>
454
- </div>
455
- </div>
456
- </div>
457
- </div>
458
-
459
- {/* Usage Examples */}
460
- <div className="!space-y-8">
461
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
462
- Usage Examples
463
- </h2>
464
-
465
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
466
- {/* Back Button */}
467
- <div className="!space-y-4">
468
- <h3 className="text-fm-secondary-600! text-lg font-semibold">
469
- Back Button
470
- </h3>
471
- <div className="!space-y-4">
472
- <div className="flex items-center gap-4">
473
- <button className="border-fm-secondary-500/30 bg-fm-secondary-500/10 text-fm-secondary-600 hover:bg-fm-secondary-500/20 flex items-center gap-2 rounded-lg border px-4 py-2 transition-colors">
474
- <ChevronLeftIcon className="h-4 w-4" />
475
- Back
476
- </button>
477
- <button className="border-fm-divider-primary bg-fm-surface-secondary text-fm-icon-active hover:bg-fm-surface-secondary flex items-center gap-2 rounded-lg border px-4 py-2 transition-colors">
478
- <ChevronLeftIcon className="h-4 w-4" />
479
- Previous Page
480
- </button>
481
- </div>
482
- <div className="bg-fm-surface-secondary rounded-lg p-4">
483
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
484
- {`// Back button
485
- <button className="flex items-center gap-2 bg-purple-500/10 border border-purple-500/30 px-4 py-2 rounded-lg">
486
- <ChevronLeftIcon className="h-4 w-4 " />
487
- Back
488
- </button>
489
-
490
- // Navigation button
491
- <button className="flex items-center gap-2 bg-white/5 border border-white/20 px-4 py-2 rounded-lg">
492
- <ChevronLeftIcon className="h-4 w-4 " />
493
- Previous Page
494
- </button>`}
495
- </pre>
496
- </div>
497
- </div>
498
- </div>
499
-
500
- {/* Breadcrumb Navigation */}
501
- <div className="!space-y-4">
502
- <h3 className="text-fm-secondary-600! text-lg font-semibold">
503
- Breadcrumb Navigation
504
- </h3>
505
- <div className="!space-y-4">
506
- <nav className="flex items-center gap-2 text-sm">
507
- <button className="text-fm-secondary-600 hover:text-fm-secondary-600 flex items-center gap-1">
508
- <ChevronLeftIcon className="h-3 w-3" />
509
- <span>Dashboard</span>
510
- </button>
511
- <span className="text-fm-placeholder">/</span>
512
- <button className="text-fm-secondary-600 hover:text-fm-secondary-600 flex items-center gap-1">
513
- <ChevronLeftIcon className="h-3 w-3" />
514
- <span>Projects</span>
515
- </button>
516
- <span className="text-fm-placeholder">/</span>
517
- <span className="text-fm-icon-active">
518
- Current Page
519
- </span>
520
- </nav>
521
- <div className="bg-fm-surface-secondary rounded-lg p-4">
522
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
523
- {`// Breadcrumb with back navigation
524
- <nav className="flex items-center gap-2 text-sm">
525
- <button className="flex items-center gap-1 text-purple-400 hover:text-purple-300">
526
- <ChevronLeftIcon className="h-3 w-3 " />
527
- <span>Dashboard</span>
528
- </button>
529
- <span className="text-white/40">/</span>
530
- <button className="flex items-center gap-1 text-purple-400 hover:text-purple-300">
531
- <ChevronLeftIcon className="h-3 w-3 " />
532
- <span>Projects</span>
533
- </button>
534
- <span className="text-white/40">/</span>
535
- <span className="text-white">Current Page</span>
536
- </nav>`}
537
- </pre>
538
- </div>
539
- </div>
540
- </div>
541
-
542
- {/* Pagination */}
543
- <div className="!space-y-4">
544
- <h3 className="text-fm-secondary-600! text-lg font-semibold">
545
- Pagination Controls
546
- </h3>
547
- <div className="!space-y-4">
548
- <div className="flex items-center gap-2">
549
- <button className="border-fm-divider-primary bg-fm-surface-secondary text-fm-icon-active hover:bg-fm-surface-secondary flex items-center justify-center rounded-lg border p-2">
550
- <ChevronLeftIcon className="h-4 w-4" />
551
- </button>
552
- <div className="flex items-center gap-1">
553
- <button className="border-fm-secondary-500/30 bg-fm-secondary-500/20 text-fm-secondary-600 rounded-lg border px-3 py-1">
554
- 1
555
- </button>
556
- <button className="text-fm-tertiary hover:bg-fm-surface-secondary rounded-lg px-3 py-1">
557
- 2
558
- </button>
559
- <button className="text-fm-tertiary hover:bg-fm-surface-secondary rounded-lg px-3 py-1">
560
- 3
561
- </button>
562
- </div>
563
- <button className="border-fm-divider-primary bg-fm-surface-secondary text-fm-icon-active hover:bg-fm-surface-secondary flex items-center justify-center rounded-lg border p-2">
564
- <ChevronLeftIcon className="h-4 w-4 rotate-180" />
565
- </button>
566
- </div>
567
- <div className="bg-fm-surface-secondary rounded-lg p-4">
568
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
569
- {`// Previous button
570
- <button className="flex items-center justify-center bg-white/5 border border-white/20 p-2 rounded-lg">
571
- <ChevronLeftIcon className="h-4 w-4 " />
572
- </button>
573
-
574
- // Next button (rotated left icon)
575
- <button className="flex items-center justify-center bg-white/5 border border-white/20 p-2 rounded-lg">
576
- <ChevronLeftIcon className="h-4 w-4 rotate-180 " />
577
- </button>`}
578
- </pre>
579
- </div>
580
- </div>
581
- </div>
582
-
583
- {/* Sidebar Toggle */}
584
- <div className="!space-y-4">
585
- <h3 className="text-fm-secondary-600! text-lg font-semibold">
586
- Sidebar Toggle
587
- </h3>
588
- <div className="!space-y-4">
589
- <div className="flex items-center gap-4">
590
- <div className="relative">
591
- <div className="border-fm-divider-secondary bg-fm-surface-secondary h-24 w-64 rounded-lg border p-4">
592
- <div className="mb-2 flex items-center justify-between">
593
- <span className="text-fm-icon-active text-sm font-medium">
594
- Sidebar
595
- </span>
596
- <button className="text-fm-secondary-600 hover:bg-fm-surface-secondary rounded p-1">
597
- <ChevronLeftIcon className="h-4 w-4" />
598
- </button>
599
- </div>
600
- <div className="!space-y-1">
601
- <div className="bg-fm-surface-secondary h-2 w-20 rounded"></div>
602
- <div className="bg-fm-surface-secondary h-2 w-16 rounded"></div>
603
- </div>
604
- </div>
605
- </div>
606
- <div className="border-fm-divider-secondary bg-fm-surface-secondary h-24 w-32 rounded-lg border p-4">
607
- <button className="text-fm-secondary-600 hover:bg-fm-surface-secondary rounded p-1">
608
- <ChevronLeftIcon className="h-4 w-4 rotate-180" />
609
- </button>
610
- </div>
611
- </div>
612
- <div className="bg-fm-surface-secondary rounded-lg p-4">
613
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
614
- {`// Collapse sidebar
615
- <button className="rounded p-1 text-purple-400 hover:bg-white/10">
616
- <ChevronLeftIcon className="h-4 w-4 " />
617
- </button>
618
-
619
- // Expand sidebar (rotated)
620
- <button className="rounded p-1 text-purple-400 hover:bg-white/10">
621
- <ChevronLeftIcon className="h-4 w-4 rotate-180 " />
622
- </button>`}
623
- </pre>
624
- </div>
625
- </div>
626
- </div>
627
- </div>
628
- </div>
629
-
630
- {/* Accessibility */}
631
- <div className="!space-y-8">
632
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
633
- Accessibility Features
634
- </h2>
635
- <div className="grid grid-cols-1 gap-8 md:grid-cols-2">
636
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
637
- <h3 className="text-fm-icon-positive! text-lg font-semibold">
638
- ✅ Built-in Features
639
- </h3>
640
- <ul className="text-fm-secondary! !space-y-2 text-sm">
641
- <li className="text-fm-secondary!">
642
- Uses Radix UI AccessibleIcon wrapper
643
- </li>
644
- <li className="text-fm-secondary!">
645
- Provides screen reader label "Chevron Left icon"
646
- </li>
647
- <li className="text-fm-secondary!">
648
- Supports keyboard navigation when interactive
649
- </li>
650
- <li className="text-fm-secondary!">
651
- Maintains proper color contrast ratios
652
- </li>
653
- <li className="text-fm-secondary!">
654
- Scales with user's font size preferences
655
- </li>
656
- </ul>
657
- </div>
658
-
659
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
660
- <h3 className="text-fm-secondary-600! text-lg font-semibold">
661
- 💡 Best Practices
662
- </h3>
663
- <ul className="text-fm-secondary !space-y-2 text-sm">
664
- <li className="text-fm-secondary!">
665
- Use descriptive aria-labels for navigation buttons
666
- </li>
667
- <li className="text-fm-secondary!">
668
- Provide keyboard shortcuts for common actions
669
- </li>
670
- <li className="text-fm-secondary!">
671
- Ensure sufficient touch target size (44px minimum)
672
- </li>
673
- <li className="text-fm-secondary!">
674
- Add focus states for interactive elements
675
- </li>
676
- <li className="text-fm-secondary!">
677
- Consider disabled states when navigation unavailable
678
- </li>
679
- </ul>
680
- </div>
681
- </div>
682
-
683
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-6">
684
- <h3 className="text-fm-secondary-600! mb-4 text-lg font-semibold">
685
- Proper ARIA Implementation
686
- </h3>
687
- <div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
688
- <div className="bg-fm-surface-secondary rounded-lg p-4">
689
- <pre className="text-fm-icon-info! overflow-x-auto text-sm">
690
- {`// Navigation button with proper ARIA
691
- <button
692
- aria-label="Go back to previous page"
693
- className="flex items-center gap-2"
694
- >
695
- <ChevronLeftIcon className="h-4 w-4 " />
696
- Back
697
- </button>
698
-
699
- // Pagination with context
700
- <button
701
- aria-label="Go to previous page"
702
- disabled={currentPage === 1}
703
- >
704
- <ChevronLeftIcon className="h-4 w-4 " />
705
- </button>
706
-
707
- // Sidebar toggle with state
708
- <button
709
- aria-label={sidebarOpen ? "Collapse sidebar" : "Expand sidebar"}
710
- aria-expanded={sidebarOpen}
711
- >
712
- <ChevronLeftIcon
713
- className={cn(
714
- "h-4 w-4 transition-transform ",
715
- !sidebarOpen && "rotate-180"
716
- )}
717
- />
718
- </button>`}
719
- </pre>
720
- </div>
721
- <div className="!space-y-4">
722
- <p className="text-fm-secondary! text-sm">
723
- Always provide context-appropriate ARIA labels for
724
- navigation elements. The chevron direction should match
725
- the action being performed.
726
- </p>
727
- <div className="border-fm-secondary-500/20 bg-fm-secondary-500/10 rounded-lg border p-4">
728
- <div className="text-fm-secondary-600 flex items-center gap-2 text-sm">
729
- <ChevronLeftIcon className="h-4 w-4" />
730
- <span>
731
- Consider the user's mental model of navigation
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-fm-icon-active! text-center text-3xl font-bold">
743
- Related Icons
744
- </h2>
745
- <div className="grid grid-cols-2 gap-6 md:grid-cols-4">
746
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
747
- <div className="bg-fm-secondary-500/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
748
- <span className="text-fm-icon-active! !text-2xl">→</span>
749
- </div>
750
- <div>
751
- <div className="text-fm-icon-active font-medium">
752
- ChevronRightIcon
753
- </div>
754
- <div className="text-fm-tertiary text-xs">
755
- Right direction
756
- </div>
757
- </div>
758
- </div>
759
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
760
- <div className="bg-fm-secondary-500/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
761
- <span className="text-fm-icon-active! !text-2xl">↑</span>
762
- </div>
763
- <div>
764
- <div className="text-fm-icon-active font-medium">
765
- ChevronUpIcon
766
- </div>
767
- <div className="text-fm-tertiary text-xs">
768
- Upward direction
769
- </div>
770
- </div>
771
- </div>
772
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
773
- <div className="bg-fm-icon-info/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
774
- <span className="text-fm-icon-active! !text-2xl">↓</span>
775
- </div>
776
- <div>
777
- <div className="text-fm-icon-active font-medium">
778
- ChevronDownIcon
779
- </div>
780
- <div className="text-fm-tertiary text-xs">
781
- Downward direction
782
- </div>
783
- </div>
784
- </div>
785
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
786
- <div className="bg-fm-icon-info/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
787
- <span className="text-fm-icon-active! !text-2xl">←</span>
788
- </div>
789
- <div>
790
- <div className="text-fm-icon-active font-medium">
791
- ArrowLeftIcon
792
- </div>
793
- <div className="text-fm-tertiary text-xs">
794
- Arrow variant
795
- </div>
796
- </div>
797
- </div>
798
- </div>
799
- </div>
800
- </div>
801
-
802
- {/* Footer */}
803
- <div className="border-fm-divider-secondary bg-fm-surface-secondary border-t backdrop-blur-xl">
804
- <div className="!mx-auto max-w-7xl px-6 py-8">
805
- <div className="!space-y-4 text-center">
806
- <p className="text-fm-tertiary!">
807
- ChevronLeftIcon is part of the Aural UI icon library, built
808
- with accessibility and intuitive navigation in mind.
809
- </p>
810
- <p className="text-fm-placeholder! text-sm">
811
- All icons use Radix UI's AccessibleIcon for screen reader
812
- compatibility and follow WCAG guidelines.
813
- </p>
814
- </div>
815
- </div>
816
- </div>
817
- </div>
818
- </>
56
+ }`,
57
+ livePreview: (
58
+ <button className="text-fm-primary font-fm-text flex items-center gap-1 text-sm">
59
+ <ChevronLeftIcon className="text-fm-icon-active h-4 w-4" />
60
+ Back
61
+ </button>
62
+ ),
63
+ }}
64
+ relatedIcons={[
65
+ {
66
+ name: "ChevronRightIcon",
67
+ description: "Points right",
68
+ icon: ChevronRightIcon,
69
+ accentToken: "info",
70
+ },
71
+ {
72
+ name: "ChevronDownIcon",
73
+ description: "Points downward",
74
+ icon: ChevronDownIcon,
75
+ accentToken: "positive",
76
+ },
77
+ {
78
+ name: "ChevronUpIcon",
79
+ description: "Points upward",
80
+ icon: ChevronUpIcon,
81
+ accentToken: "warning",
82
+ },
83
+ {
84
+ name: "AngleDownIcon",
85
+ description: "Softer angle chevron",
86
+ icon: AngleDownIcon,
87
+ accentToken: "negative",
88
+ },
89
+ ]}
90
+ />
819
91
  ),
820
92
  },
821
93
  },
822
94
  tags: ["autodocs"],
823
95
  argTypes: {
824
- width: {
825
- control: { type: "range", min: 8, max: 96, step: 2 },
826
- description: "Width of the icon in pixels",
96
+ className: {
97
+ control: "text",
98
+ description: "CSS classes including size and color token",
827
99
  },
828
100
  withAccessibility: {
829
101
  control: "boolean",
830
- description: "Whether to wrap the icon with accessibility features",
831
- },
832
- height: {
833
- control: { type: "range", min: 8, max: 96, step: 2 },
834
- description: "Height of the icon in pixels",
835
- },
836
- stroke: {
837
- control: "color",
838
- description: "Stroke color of the icon",
839
- },
840
- strokeWidth: {
841
- control: { type: "range", min: 0.5, max: 3, step: 0.1 },
842
- description: "Stroke width of the chevron line",
843
- },
844
- className: {
845
- control: "text",
846
- description: "CSS classes for styling (use for overrides)",
102
+ description: "Wrap with accessibility label",
847
103
  },
848
104
  },
849
105
  }
@@ -851,217 +107,94 @@ function BackButton() {
851
107
  export default meta
852
108
  type Story = StoryObj<typeof ChevronLeftIcon>
853
109
 
854
- // Story parameters for consistent dark theme
855
- const storyParameters = {
856
- backgrounds: {
857
- default: "dark",
858
- values: [
859
- { name: "dark", value: "var(--color-fm-surface-primary)" },
860
- { name: "darker", value: "var(--color-fm-neutral-0)" },
861
- ],
862
- },
863
- }
864
-
865
110
  export const Default: Story = {
866
111
  args: {
867
- width: 24,
868
- height: 24,
869
- className: "text-fm-secondary-600 ",
112
+ className: "h-6 w-6 text-fm-icon-active",
870
113
  withAccessibility: true,
871
114
  },
872
- parameters: storyParameters,
873
115
  render: (args) => (
874
- <div className="from-fm-surface-primary to-fm-surface-secondary flex h-32 min-h-dvh items-center justify-center rounded-lg bg-linear-to-br">
116
+ <IconDefaultCanvas>
875
117
  <ChevronLeftIcon {...args} />
876
- </div>
118
+ </IconDefaultCanvas>
877
119
  ),
878
120
  }
879
121
 
880
122
  export const SizeVariations: Story = {
881
- parameters: {
882
- ...storyParameters,
883
- docs: {
884
- description: {
885
- story:
886
- "ChevronLeftIcon in different sizes, from small UI elements to large displays.",
887
- },
888
- },
889
- },
890
- render: () => (
891
- <div className="from-fm-surface-primary to-fm-surface-secondary flex h-64 min-h-dvh items-center justify-center gap-8 rounded-lg bg-linear-to-br p-8">
892
- <div className="text-center">
893
- <ChevronLeftIcon className="text-fm-secondary-600 !mx-auto mb-2 h-3 w-3" />
894
- <span className="text-fm-tertiary text-xs">12px</span>
895
- </div>
896
- <div className="text-center">
897
- <ChevronLeftIcon className="text-fm-secondary-600 !mx-auto mb-2 h-4 w-4" />
898
- <span className="text-fm-tertiary text-xs">16px</span>
899
- </div>
900
- <div className="text-center">
901
- <ChevronLeftIcon className="text-fm-secondary-600 !mx-auto mb-2 h-5 w-5" />
902
- <span className="text-fm-tertiary text-xs">20px</span>
903
- </div>
904
- <div className="text-center">
905
- <ChevronLeftIcon className="text-fm-secondary-600 !mx-auto mb-2 h-6 w-6" />
906
- <span className="text-fm-tertiary text-xs">24px</span>
907
- </div>
908
- <div className="text-center">
909
- <ChevronLeftIcon className="text-fm-secondary-600 !mx-auto mb-2 h-8 w-8" />
910
- <span className="text-fm-tertiary text-xs">32px</span>
911
- </div>
912
- <div className="text-center">
913
- <ChevronLeftIcon className="text-fm-secondary-600 !mx-auto mb-2 h-12 w-12" />
914
- <span className="text-fm-tertiary text-xs">48px</span>
915
- </div>
916
- </div>
917
- ),
123
+ render: () => <IconSizeVariations icon={ChevronLeftIcon} />,
918
124
  }
919
125
 
920
126
  export const ColorVariations: Story = {
921
- parameters: {
922
- ...storyParameters,
923
- docs: {
924
- description: {
925
- story:
926
- "ChevronLeftIcon in different semantic colors for various navigation contexts.",
927
- },
928
- },
929
- },
127
+ render: () => <IconColorVariations icon={ChevronLeftIcon} />,
128
+ }
129
+
130
+ export const DirectionalVariations: Story = {
930
131
  render: () => (
931
- <div className="from-fm-surface-primary to-fm-surface-secondary grid min-h-dvh grid-cols-2 items-center justify-center gap-6 rounded-lg bg-linear-to-br p-8 md:grid-cols-4">
932
- <div className="text-center">
933
- <div className="border-fm-secondary-500/30 bg-fm-secondary-500/20 !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
934
- <ChevronLeftIcon className="text-fm-secondary-600 h-8 w-8" />
935
- </div>
936
- <div className="text-fm-icon-active text-sm font-medium">Primary</div>
937
- <div className="text-fm-secondary-600 text-xs">
938
- text-fm-secondary-600
939
- </div>
940
- </div>
941
- <div className="text-center">
942
- <div className="border-fm-divider-primary bg-fm-surface-tertiary/20 !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
943
- <ChevronLeftIcon className="text-fm-placeholder h-8 w-8" />
944
- </div>
945
- <div className="text-fm-icon-active text-sm font-medium">Secondary</div>
946
- <div className="text-fm-placeholder text-xs">text-fm-placeholder</div>
947
- </div>
948
- <div className="text-center">
949
- <div className="border-fm-secondary-500/30 bg-fm-secondary-500/20 !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
950
- <ChevronLeftIcon className="text-fm-secondary-600 h-8 w-8" />
951
- </div>
952
- <div className="text-fm-icon-active text-sm font-medium">Accent</div>
953
- <div className="text-fm-secondary-600 text-xs">
954
- text-fm-secondary-600
955
- </div>
956
- </div>
957
- <div className="text-center">
958
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
959
- <ChevronLeftIcon className="text-fm-placeholder h-8 w-8" />
960
- </div>
961
- <div className="text-fm-icon-active text-sm font-medium">Disabled</div>
962
- <div className="text-fm-placeholder text-xs">text-fm-placeholder</div>
963
- </div>
964
- </div>
132
+ <IconDirectionalVariations
133
+ icon={ChevronLeftIcon}
134
+ directions={[
135
+ { label: "Left", className: "h-8 w-8 text-fm-icon-active" },
136
+ {
137
+ label: "Down",
138
+ className: "h-8 w-8 text-fm-icon-active -rotate-90",
139
+ },
140
+ { label: "Right", className: "h-8 w-8 text-fm-icon-active rotate-180" },
141
+ { label: "Up", className: "h-8 w-8 text-fm-icon-active rotate-90" },
142
+ ]}
143
+ />
965
144
  ),
966
145
  }
967
146
 
968
147
  export const UsageExamples: Story = {
969
- parameters: {
970
- ...storyParameters,
971
- docs: {
972
- description: {
973
- story:
974
- "Real-world usage examples showing ChevronLeftIcon in different navigation contexts.",
975
- },
976
- },
977
- },
978
148
  render: () => (
979
- <div className="from-fm-surface-primary to-fm-surface-secondary min-h-dvh !space-y-8 rounded-lg bg-linear-to-br p-8">
980
- {/* Back Button */}
981
- <div className="!space-y-2">
982
- <h3 className="text-fm-icon-active text-sm font-medium">Back Button</h3>
983
- <div className="flex items-center gap-4">
984
- <button className="border-fm-secondary-500/30 bg-fm-secondary-500/10 text-fm-secondary-600 hover:bg-fm-secondary-500/20 flex items-center gap-2 rounded-lg border px-4 py-2 transition-colors">
985
- <ChevronLeftIcon className="h-4 w-4" />
986
- Back
987
- </button>
988
- <button className="border-fm-divider-primary bg-fm-surface-secondary text-fm-icon-active hover:bg-fm-surface-secondary flex items-center gap-2 rounded-lg border px-4 py-2 transition-colors">
989
- <ChevronLeftIcon className="h-4 w-4" />
990
- Previous Page
991
- </button>
992
- </div>
993
- </div>
994
-
995
- {/* Pagination */}
996
- <div className="!space-y-2">
997
- <h3 className="text-fm-icon-active text-sm font-medium">
998
- Pagination Controls
999
- </h3>
1000
- <div className="flex items-center gap-2">
1001
- <button className="border-fm-divider-primary bg-fm-surface-secondary text-fm-icon-active hover:bg-fm-surface-secondary flex items-center justify-center rounded-lg border p-2">
1002
- <ChevronLeftIcon className="h-4 w-4" />
1003
- </button>
1004
- <div className="flex items-center gap-1">
1005
- <button className="border-fm-secondary-500/30 bg-fm-secondary-500/20 text-fm-secondary-600 rounded-lg border px-3 py-1">
1006
- 1
1007
- </button>
1008
- <button className="text-fm-tertiary hover:bg-fm-surface-secondary rounded-lg px-3 py-1">
1009
- 2
1010
- </button>
1011
- <button className="text-fm-tertiary hover:bg-fm-surface-secondary rounded-lg px-3 py-1">
1012
- 3
149
+ <IconUsageCanvas>
150
+ <IconUsageSection title="Back Navigation">
151
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary w-full max-w-sm rounded-xl border p-4">
152
+ <div className="flex items-center gap-2">
153
+ <button className="border-fm-divider-secondary flex items-center gap-1.5 rounded-lg border px-3 py-2">
154
+ <ChevronLeftIcon className="text-fm-icon-active h-4 w-4" />
155
+ <span className="text-fm-primary font-fm-text text-sm">Back</span>
1013
156
  </button>
157
+ <span className="text-fm-secondary font-fm-text text-sm">
158
+ Episode List
159
+ </span>
1014
160
  </div>
1015
- <button className="border-fm-divider-primary bg-fm-surface-secondary text-fm-icon-active hover:bg-fm-surface-secondary flex items-center justify-center rounded-lg border p-2">
1016
- <ChevronLeftIcon className="h-4 w-4 rotate-180" />
1017
- </button>
1018
161
  </div>
1019
- </div>
162
+ </IconUsageSection>
1020
163
 
1021
- {/* Breadcrumb */}
1022
- <div className="!space-y-2">
1023
- <h3 className="text-fm-icon-active text-sm font-medium">
1024
- Breadcrumb Navigation
1025
- </h3>
1026
- <nav className="flex items-center gap-2 text-sm">
1027
- <button className="text-fm-secondary-600 hover:text-fm-secondary-600 flex items-center gap-1">
1028
- <ChevronLeftIcon className="h-3 w-3" />
1029
- <span>Dashboard</span>
164
+ <IconUsageSection title="Carousel Control">
165
+ <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">
166
+ <button className="border-fm-divider-secondary flex h-8 w-8 items-center justify-center rounded-full border">
167
+ <ChevronLeftIcon className="text-fm-icon-active h-4 w-4" />
168
+ </button>
169
+ <span className="text-fm-secondary font-fm-text text-sm">3 / 10</span>
170
+ <button className="border-fm-divider-secondary flex h-8 w-8 items-center justify-center rounded-full border">
171
+ <ChevronRightIcon className="text-fm-icon-active h-4 w-4" />
1030
172
  </button>
1031
- <span className="text-fm-placeholder">/</span>
1032
- <button className="text-fm-secondary-600 hover:text-fm-secondary-600 flex items-center gap-1">
1033
- <ChevronLeftIcon className="h-3 w-3" />
1034
- <span>Projects</span>
173
+ </div>
174
+ </IconUsageSection>
175
+
176
+ <IconUsageSection title="Sidebar Toggle">
177
+ <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">
178
+ <span className="text-fm-primary font-fm-text text-sm font-medium">
179
+ Navigation
180
+ </span>
181
+ <button aria-label="Collapse sidebar">
182
+ <ChevronLeftIcon className="text-fm-icon-inactive h-5 w-5" />
1035
183
  </button>
1036
- <span className="text-fm-placeholder">/</span>
1037
- <span className="text-fm-icon-active">Current Page</span>
1038
- </nav>
1039
- </div>
1040
- </div>
184
+ </div>
185
+ </IconUsageSection>
186
+ </IconUsageCanvas>
1041
187
  ),
1042
188
  }
1043
189
 
1044
190
  export const Playground: Story = {
1045
- parameters: {
1046
- ...storyParameters,
1047
- docs: {
1048
- description: {
1049
- story:
1050
- "Interactive playground to experiment with different ChevronLeftIcon configurations.",
1051
- },
1052
- },
1053
- },
1054
191
  args: {
1055
- width: 32,
1056
- height: 32,
1057
- className: "text-fm-secondary-600 ",
1058
- strokeWidth: 1.5,
192
+ className: "h-8 w-8 text-fm-icon-active",
193
+ withAccessibility: true,
1059
194
  },
1060
195
  render: (args) => (
1061
- <div className="from-fm-surface-primary to-fm-surface-secondary flex h-64 min-h-dvh items-center justify-center rounded-lg bg-linear-to-br">
1062
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-8">
1063
- <ChevronLeftIcon {...args} />
1064
- </div>
1065
- </div>
196
+ <IconPlaygroundCanvas>
197
+ <ChevronLeftIcon {...args} />
198
+ </IconPlaygroundCanvas>
1066
199
  ),
1067
200
  }