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