aural-ui 3.0.7 → 4.1.0

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