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 { CopyIcon } from "src/ui/icons/copy-icon"
5
+ import { ImportFolderIcon } from "src/ui/icons/import-folder-icon"
6
+ import { ShareIcon } from "src/ui/icons/share-icon"
7
+ import { UploadIcon } from "src/ui/icons/upload-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 { DownloadIcon } from "."
5
19
 
6
20
  const meta: Meta<typeof DownloadIcon> = {
@@ -18,695 +32,72 @@ const meta: Meta<typeof DownloadIcon> = {
18
32
  },
19
33
  docs: {
20
34
  page: () => (
21
- <>
22
- {/* Override default docs styling */}
23
- <style>
24
- {`
25
- .sbdocs-wrapper {
26
- padding: 0 ;
27
- max-width: none ;
28
- background: transparent ;
29
- }
30
- .sbdocs-content {
31
- max-width: none ;
32
- padding: 0 ;
33
- margin: 0 ;
34
- background: transparent ;
35
- }
36
- .docs-story {
37
- background: transparent ;
38
- }
39
- .sbdocs {
40
- background: transparent ;
41
- }
42
- body {
43
- background: var(--color-fm-surface-primary) ;
44
- }
45
- #storybook-docs {
46
- background: var(--color-fm-surface-primary) ;
47
- }
48
- .sbdocs-preview {
49
- background: transparent ;
50
- border: none ;
51
- }
52
- .sbdocs-h1, .sbdocs-h2, .sbdocs-h3, .sbdocs-h4, .sbdocs-h5, .sbdocs-h6 {
53
- color: var(--color-fm-icon-active) ;
54
- }
55
- .sbdocs-p, .sbdocs-li {
56
- color: var(--color-fm-secondary) ;
57
- }
58
- .sbdocs-code {
59
- background: var(--color-fm-surface-secondary) ;
60
- color: var(--color-fm-secondary-500) ;
61
- border: 1px solid var(--color-fm-divider-secondary) ;
62
- }
63
- .sbdocs-pre {
64
- background: var(--color-fm-surface-secondary) ;
65
- border: 1px solid var(--color-fm-divider-secondary) ;
66
- }
67
- .sbdocs-table {
68
- background: var(--color-fm-surface-secondary) ;
69
- border: 1px solid var(--color-fm-divider-secondary) ;
70
- }
71
- .sbdocs-table th {
72
- background: var(--color-fm-surface-secondary) ;
73
- color: var(--color-fm-icon-active) ;
74
- border-bottom: 1px solid var(--color-fm-divider-secondary) ;
75
- }
76
- .sbdocs-table td {
77
- color: var(--color-fm-secondary) ;
78
- border-bottom: 1px solid var(--color-fm-divider-tertiary) ;
79
- }
80
- `}
81
- </style>
82
-
83
- <div className="bg-fm-surface-primary min-h-screen">
84
- {/* Header */}
85
- <div className="border-fm-divider-secondary bg-fm-surface-secondary relative overflow-hidden border-b backdrop-blur-xl">
86
- <div className="from-fm-surface-tertiary/10 to-fm-surface-tertiary/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-divider-primary from-fm-surface-tertiary/20 to-fm-surface-tertiary/20 !mx-auto flex h-24 w-24 items-center justify-center rounded-2xl border bg-linear-to-br">
90
- <DownloadIcon className="text-fm-placeholder h-12 w-12" />
91
- </div>
92
- <h1 className="!text-fm-primary text-5xl font-bold">
93
- DownloadIcon
94
- </h1>
95
- <p className="text-fm-secondary! !mx-auto max-w-3xl text-xl leading-relaxed">
96
- A straightforward download icon ideal for saving files,
97
- exporting data, or initiating downloads. Designed with
98
- clarity and scalability in mind. Built with accessibility in
99
- mind using Radix UI's AccessibleIcon wrapper.
100
- </p>
101
-
102
- {/* Stats */}
103
- <div className="flex items-center justify-center gap-8 pt-8">
104
- <div className="text-center">
105
- <div className="text-fm-secondary text-3xl font-bold">
106
- Accessible
107
- </div>
108
- <div className="text-fm-tertiary text-sm">
109
- Screen reader friendly
110
- </div>
111
- </div>
112
- <div className="bg-fm-divider-primary h-8 w-px" />
113
- <div className="text-center">
114
- <div className="text-fm-secondary text-3xl font-bold">
115
- Minimal
116
- </div>
117
- <div className="text-fm-tertiary text-sm">
118
- Clean stroke design
119
- </div>
120
- </div>
121
- <div className="bg-fm-divider-primary h-8 w-px" />
122
- <div className="text-center">
123
- <div className="text-fm-secondary text-3xl font-bold">
124
- Versatile
125
- </div>
126
- <div className="text-fm-tertiary text-sm">
127
- Perfect at any size
128
- </div>
129
- </div>
130
- </div>
131
- </div>
132
- </div>
133
- </div>
134
-
135
- {/* Content */}
136
- <div className="!mx-auto max-w-7xl !space-y-16 px-6 py-12">
137
- {/* Quick Usage */}
138
- <div className="!space-y-8">
139
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
140
- Quick Start
141
- </h2>
142
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
143
- <div className="!space-y-4">
144
- <h3 className="!text-fm-secondary text-xl font-semibold">
145
- Basic Usage
146
- </h3>
147
- <div className="bg-fm-surface-secondary rounded-lg p-4">
148
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
149
- {`import { DownloadIcon } from "@icons/cross-icon"
150
-
151
- function CloseButton() {
35
+ <AuralIconDocsPage
36
+ accentToken="positive"
37
+ features={[
38
+ { title: "Download", description: "Save content to device" },
39
+ {
40
+ title: "Offline Access",
41
+ description: "Enable offline listening",
42
+ },
43
+ { title: "Accessible", description: "ARIA-ready by default" },
44
+ ]}
45
+ quickStart={{
46
+ codeExample: `import { DownloadIcon } from "src/ui/icons/download-icon"
47
+
48
+ function DownloadButton() {
152
49
  return (
153
- <button className="p-2 hover:bg-white/10 rounded-lg">
154
- <DownloadIcon className="h-5 w-5 text-gray-400 " />
50
+ <button className="flex items-center gap-2">
51
+ <DownloadIcon className="h-5 w-5 text-fm-icon-active" />
52
+ <span>Download</span>
155
53
  </button>
156
54
  )
157
- }`}
158
- </pre>
159
- </div>
160
- </div>
161
-
162
- <div className="!space-y-4">
163
- <h3 className="!text-fm-secondary text-xl font-semibold">
164
- Live Preview
165
- </h3>
166
- <div className="border-fm-divider-secondary bg-fm-surface-secondary flex h-32 items-center justify-center rounded-lg border">
167
- <button className="border-fm-divider-primary bg-fm-surface-secondary hover:bg-fm-surface-secondary rounded-lg border p-3 transition-colors">
168
- <DownloadIcon className="text-fm-secondary h-6 w-6" />
169
- </button>
170
- </div>
171
- </div>
172
- </div>
173
- </div>
174
-
175
- {/* Props Documentation */}
176
- <div className="!space-y-8">
177
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
178
- Props & Configuration
179
- </h2>
180
-
181
- <div className="border-fm-divider-secondary bg-fm-surface-secondary overflow-hidden rounded-lg border">
182
- <div className="bg-fm-surface-secondary p-4">
183
- <h3 className="text-fm-icon-active! text-xl font-semibold">
184
- Props
185
- </h3>
186
- </div>
187
- <table className="!my-0 w-full">
188
- <thead className="bg-fm-surface-secondary">
189
- <tr className="border-fm-divider-secondary border-b">
190
- <th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
191
- Prop
192
- </th>
193
- <th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
194
- Type
195
- </th>
196
- <th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
197
- Default
198
- </th>
199
- <th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
200
- Description
201
- </th>
202
- </tr>
203
- </thead>
204
- <tbody>
205
- {" "}
206
- <tr className="bg-fm-surface-secondary!">
207
- <td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
208
- withAccessibility
209
- </td>
210
- <td className="text-fm-secondary! px-6 py-4 text-sm">
211
- boolean
212
- </td>
213
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
214
- true
215
- </td>
216
- <td className="text-fm-secondary! px-6 py-4 text-sm">
217
- Whether to wrap the icon with accessibility feature
218
- </td>
219
- </tr>
220
- <tr className="border-fm-divider-tertiary bg-fm-surface-secondary! border-b">
221
- <td className="!text-fm-secondary px-6 py-4 font-mono text-sm">
222
- height
223
- </td>
224
- <td className="text-fm-secondary! px-6 py-4 text-sm">
225
- number | string
226
- </td>
227
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
228
- 20
229
- </td>
230
- <td className="text-fm-secondary! px-6 py-4 text-sm">
231
- Height of the icon in pixels
232
- </td>
233
- </tr>
234
- <tr className="border-fm-divider-tertiary border-b">
235
- <td className="!text-fm-secondary px-6 py-4 font-mono text-sm">
236
- stroke
237
- </td>
238
- <td className="text-fm-secondary! px-6 py-4 text-sm">
239
- string
240
- </td>
241
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
242
- currentColor
243
- </td>
244
- <td className="text-fm-secondary! px-6 py-4 text-sm">
245
- Stroke color of the icon
246
- </td>
247
- </tr>
248
- <tr className="border-fm-divider-tertiary bg-fm-surface-secondary! border-b">
249
- <td className="!text-fm-secondary px-6 py-4 font-mono text-sm">
250
- strokeWidth
251
- </td>
252
- <td className="text-fm-secondary! px-6 py-4 text-sm">
253
- string | number
254
- </td>
255
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
256
- 1.5
257
- </td>
258
- <td className="text-fm-secondary! px-6 py-4 text-sm">
259
- Width of the stroke
260
- </td>
261
- </tr>
262
- <tr className="border-fm-divider-tertiary border-b">
263
- <td className="!text-fm-secondary px-6 py-4 font-mono text-sm">
264
- className
265
- </td>
266
- <td className="text-fm-secondary! px-6 py-4 text-sm">
267
- string
268
- </td>
269
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
270
- -
271
- </td>
272
- <td className="text-fm-secondary! px-6 py-4 text-sm">
273
- CSS classes for styling (use for overrides)
274
- </td>
275
- </tr>
276
- <tr className="bg-fm-surface-secondary!">
277
- <td className="!text-fm-secondary px-6 py-4 font-mono text-sm">
278
- ...svgProps
279
- </td>
280
- <td className="text-fm-secondary! px-6 py-4 text-sm">
281
- SVGProps
282
- </td>
283
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
284
- -
285
- </td>
286
- <td className="text-fm-secondary! px-6 py-4 text-sm">
287
- All standard SVG element props
288
- </td>
289
- </tr>
290
- </tbody>
291
- </table>
292
- </div>
293
- </div>
294
-
295
- {/* Size Variations */}
296
- <div className="!space-y-8">
297
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
298
- Size Variations
299
- </h2>
300
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-8">
301
- <div className="!space-y-6">
302
- <div className="grid grid-cols-1 gap-8 md:grid-cols-2">
303
- <div className="!space-y-4">
304
- <h3 className="!text-fm-secondary text-lg font-semibold">
305
- Standard Sizes
306
- </h3>
307
- <div className="bg-fm-surface-secondary flex items-end gap-6 rounded-lg p-6">
308
- <div className="text-center">
309
- <DownloadIcon className="text-fm-placeholder !mx-auto mb-2 h-3 w-3" />
310
- <span className="text-fm-tertiary text-xs">
311
- 12px
312
- </span>
313
- </div>
314
- <div className="text-center">
315
- <DownloadIcon className="text-fm-placeholder !mx-auto mb-2 h-4 w-4" />
316
- <span className="text-fm-tertiary text-xs">
317
- 16px
318
- </span>
319
- </div>
320
- <div className="text-center">
321
- <DownloadIcon className="text-fm-placeholder !mx-auto mb-2 h-5 w-5" />
322
- <span className="text-fm-tertiary text-xs">
323
- 20px
324
- </span>
325
- </div>
326
- <div className="text-center">
327
- <DownloadIcon className="text-fm-placeholder !mx-auto mb-2 h-6 w-6" />
328
- <span className="text-fm-tertiary text-xs">
329
- 24px
330
- </span>
331
- </div>
332
- <div className="text-center">
333
- <DownloadIcon className="text-fm-placeholder !mx-auto mb-2 h-8 w-8" />
334
- <span className="text-fm-tertiary text-xs">
335
- 32px
336
- </span>
337
- </div>
338
- <div className="text-center">
339
- <DownloadIcon className="text-fm-placeholder !mx-auto mb-2 h-12 w-12" />
340
- <span className="text-fm-tertiary text-xs">
341
- 48px
342
- </span>
343
- </div>
344
- </div>
345
- </div>
346
-
347
- <div className="!space-y-4">
348
- <h3 className="!text-fm-secondary text-lg font-semibold">
349
- Code Example
350
- </h3>
351
- <div className="bg-fm-surface-secondary rounded-lg p-4">
352
- <pre className="text-fm-icon-info! overflow-x-auto text-sm">
353
- {`// Small (16px)
354
- <DownloadIcon className="h-4 w-4 " />
355
-
356
- // Medium (24px)
357
- <DownloadIcon className="h-6 w-6 " />
358
-
359
- // Large (32px)
360
- <DownloadIcon className="h-8 w-8 " />
361
-
362
- // Custom size
363
- <DownloadIcon width={40} height={40} />`}
364
- </pre>
365
- </div>
366
- </div>
367
- </div>
368
- </div>
369
- </div>
370
- </div>
371
-
372
- {/* Color Variations */}
373
- <div className="!space-y-8">
374
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
375
- Color Variations
376
- </h2>
377
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
378
- <div className="!space-y-4">
379
- <h3 className="!text-fm-secondary text-lg font-semibold">
380
- Semantic Colors
381
- </h3>
382
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
383
- <div className="flex items-center gap-4">
384
- <DownloadIcon className="text-fm-placeholder h-6 w-6" />
385
- <div>
386
- <div className="text-fm-icon-active text-sm font-medium">
387
- Default / Neutral
388
- </div>
389
- <div className="text-fm-tertiary text-xs">
390
- text-fm-placeholder
391
- </div>
392
- </div>
393
- </div>
394
- <div className="flex items-center gap-4">
395
- <DownloadIcon className="text-fm-icon-negative h-6 w-6" />
396
- <div>
397
- <div className="text-fm-icon-active text-sm font-medium">
398
- Close / Error
399
- </div>
400
- <div className="text-fm-tertiary text-xs">
401
- text-fm-icon-negative
402
- </div>
403
- </div>
404
- </div>
405
- <div className="flex items-center gap-4">
406
- <DownloadIcon className="text-fm-tertiary h-6 w-6" />
407
- <div>
408
- <div className="text-fm-icon-active text-sm font-medium">
409
- Muted
410
- </div>
411
- <div className="text-fm-tertiary text-xs">
412
- text-fm-tertiary
413
- </div>
414
- </div>
415
- </div>
416
- <div className="flex items-center gap-4">
417
- <DownloadIcon className="text-fm-secondary h-6 w-6" />
418
- <div>
419
- <div className="text-fm-icon-active text-sm font-medium">
420
- Light
421
- </div>
422
- <div className="text-fm-tertiary text-xs">
423
- text-fm-secondary
424
- </div>
425
- </div>
426
- </div>
427
- </div>
428
- </div>
429
-
430
- <div className="!space-y-4">
431
- <h3 className="!text-fm-secondary text-lg font-semibold">
432
- Custom Colors
433
- </h3>
434
- <div className="bg-fm-surface-secondary rounded-lg p-4">
435
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
436
- {`// Using Tailwind classes with
437
- <DownloadIcon className="h-6 w-6 text-gray-400 " />
438
- <DownloadIcon className="h-6 w-6 text-red-500 " />
439
-
440
- // Using CSS custom properties
441
- <DownloadIcon
442
- className="h-6 w-6 "
443
- style={{ color: 'var(--color-text-secondary)' }}
444
- />
445
-
446
- // Direct stroke prop
447
- <DownloadIcon
448
- width={24}
449
- height={24}
450
- stroke="#6b7280"
451
- />`}
452
- </pre>
453
- </div>
454
- </div>
455
- </div>
456
- </div>
457
-
458
- {/* Usage Examples */}
459
- <div className="!space-y-8">
460
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
461
- Usage Examples
462
- </h2>
463
-
464
- <div className="!space-y-4">
465
- <div className="flex items-center gap-4">
466
- <button className="border-fm-secondary-500/30 bg-fm-secondary-500/10 text-fm-secondary-600 hover:bg-fm-secondary-500/20 flex items-center gap-2 rounded-lg border px-4 py-2 transition-colors">
467
- <DownloadIcon className="h-4 w-4" />
468
- Download File
469
- </button>
470
- <button className="border-fm-divider-primary bg-fm-surface-secondary text-fm-icon-active hover:bg-fm-surface-secondary flex items-center justify-center rounded-full border p-3 transition-colors">
471
- <DownloadIcon className="h-5 w-5" />
472
- </button>
473
- </div>
474
- <div className="bg-fm-surface-secondary rounded-lg p-4">
475
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
476
- {`// Text button
477
- <button className="flex items-center gap-2 bg-purple-500/10 border border-purple-500/30 px-4 py-2 rounded-lg">
478
- <DownloadIcon className="h-4 w-4" />
479
- Download File
480
- </button>
481
-
482
- // Icon-only button
483
- <button className="flex items-center justify-center bg-white/5 border border-white/20 p-3 rounded-full">
484
- <DownloadIcon className="h-5 w-5" />
485
- </button>`}
486
- </pre>
487
- </div>
488
- </div>
489
- </div>
490
-
491
- {/* Accessibility */}
492
- <div className="!space-y-8">
493
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
494
- Accessibility Features
495
- </h2>
496
- <div className="grid grid-cols-1 gap-8 md:grid-cols-2">
497
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
498
- <h3 className="text-fm-icon-positive! text-lg font-semibold">
499
- ✅ Built-in Features
500
- </h3>
501
- <ul className="text-fm-secondary! !space-y-2 text-sm">
502
- <li className="text-fm-secondary!">
503
- Uses Radix UI AccessibleIcon wrapper
504
- </li>
505
- <li className="text-fm-secondary!">
506
- Provides screen reader label "Cross icon"
507
- </li>
508
- <li className="text-fm-secondary!">
509
- Supports keyboard navigation when interactive
510
- </li>
511
- <li className="text-fm-secondary!">
512
- Maintains proper color contrast ratios
513
- </li>
514
- <li className="text-fm-secondary!">
515
- Scales with user's font size preferences
516
- </li>
517
- </ul>
518
- </div>
519
-
520
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
521
- <h3 className="!text-fm-secondary text-lg font-semibold">
522
- 💡 Best Practices
523
- </h3>
524
- <ul className="text-fm-secondary !space-y-2 text-sm">
525
- <li className="text-fm-secondary!">
526
- Always provide proper button labels for close actions
527
- </li>
528
- <li className="text-fm-secondary!">
529
- Use consistent placement for close buttons
530
- </li>
531
- <li className="text-fm-secondary!">
532
- Ensure sufficient touch target size (44px minimum)
533
- </li>
534
- <li className="text-fm-secondary!">
535
- Provide visible focus states for keyboard users
536
- </li>
537
- <li className="text-fm-secondary!">
538
- Consider escape key functionality for modals
539
- </li>
540
- </ul>
541
- </div>
542
- </div>
543
-
544
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-6">
545
- <h3 className="text-fm-secondary-600! mb-4 text-lg font-semibold">
546
- Proper ARIA Implementation
547
- </h3>
548
- <div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
549
- {/* Code Block */}
550
- <div className="bg-fm-surface-secondary rounded-lg p-4">
551
- <pre className="text-fm-icon-info! overflow-x-auto text-sm">
552
- {`// Download report button with ARIA
553
- <button
554
- aria-label="Download monthly report"
555
- className="p-2 hover:bg-white/10 rounded"
556
- onClick={downloadReport}
557
- >
558
- <DownloadIcon className="h-5 w-5 text-gray-400" />
559
- </button>
560
-
561
- // Export data action
562
- <button
563
- aria-label="Export table data as CSV"
564
- onClick={exportData}
565
- >
566
- <DownloadIcon className="h-4 w-4 text-gray-400" />
567
- </button>
568
-
569
- // Save invoice button
570
- <button
571
- aria-label="Save invoice as PDF"
572
- onClick={saveInvoice}
573
- >
574
- <DownloadIcon className="h-4 w-4 text-gray-400" />
575
- </button>`}
576
- </pre>
577
- </div>
578
-
579
- {/* Explanation Block */}
580
- <div className="!space-y-4">
581
- <p className="text-fm-secondary! text-sm">
582
- When using <code>DownloadIcon</code> for download or
583
- export actions, make sure to include clear and
584
- descriptive <code>aria-label</code>s that explain what
585
- is being downloaded or saved.
586
- </p>
587
- <div className="border-fm-divider-secondary bg-fm-surface-tertiary/10 rounded-lg border p-4">
588
- <div className="text-fm-secondary flex items-center gap-2 text-sm">
589
- <DownloadIcon className="h-4 w-4" />
590
- <span>
591
- Accessibility labels help users understand the
592
- download purpose
593
- </span>
594
- </div>
595
- </div>
596
- </div>
597
- </div>
598
- </div>
599
- </div>
600
-
601
- {/* Related Icons */}
602
- <div className="!space-y-8">
603
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
604
- Related Icons
605
- </h2>
606
- <div className="grid grid-cols-2 gap-6 md:grid-cols-4">
607
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
608
- <div className="bg-fm-icon-negative/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
609
- <span className="text-fm-icon-active! !text-2xl">⊗</span>
610
- </div>
611
- <div>
612
- <div className="text-fm-icon-active font-medium">
613
- CrossCircleIcon
614
- </div>
615
- <div className="text-fm-tertiary text-xs">
616
- Cross with circle
617
- </div>
618
- </div>
619
- </div>
620
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
621
- <div className="bg-fm-surface-tertiary/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
622
- <span className="text-fm-icon-active! !text-2xl">−</span>
623
- </div>
624
- <div>
625
- <div className="text-fm-icon-active font-medium">
626
- MinusIcon
627
- </div>
628
- <div className="text-fm-tertiary text-xs">Minimize</div>
629
- </div>
630
- </div>
631
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
632
- <div className="bg-fm-icon-warning/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
633
- <span className="text-fm-icon-active! !text-2xl">⚠</span>
634
- </div>
635
- <div>
636
- <div className="text-fm-icon-active font-medium">
637
- AlertIcon
638
- </div>
639
- <div className="text-fm-tertiary text-xs">
640
- Warning states
641
- </div>
642
- </div>
643
- </div>
644
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
645
- <div className="bg-fm-icon-info/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
646
- <span className="text-fm-icon-active! !text-2xl">ℹ</span>
647
- </div>
648
- <div>
649
- <div className="text-fm-icon-active font-medium">
650
- InfoIcon
651
- </div>
652
- <div className="text-fm-tertiary text-xs">
653
- Information
654
- </div>
655
- </div>
656
- </div>
657
- </div>
658
- </div>
659
- </div>
660
-
661
- {/* Footer */}
662
- <div className="border-fm-divider-secondary bg-fm-surface-secondary border-t backdrop-blur-xl">
663
- <div className="!mx-auto max-w-7xl px-6 py-8">
664
- <div className="!space-y-4 text-center">
665
- <p className="text-fm-tertiary!">
666
- DownloadIcon is part of the Aural UI icon library, built
667
- with simplicity and accessibility in mind.
668
- </p>
669
- <p className="text-fm-placeholder! text-sm">
670
- All icons use Radix UI's AccessibleIcon for screen reader
671
- compatibility and follow WCAG guidelines.
672
- </p>
673
- </div>
674
- </div>
675
- </div>
676
- </div>
677
- </>
55
+ }`,
56
+ livePreview: (
57
+ <button className="flex items-center gap-2">
58
+ <DownloadIcon className="text-fm-icon-active h-6 w-6" />
59
+ </button>
60
+ ),
61
+ }}
62
+ relatedIcons={[
63
+ {
64
+ name: "UploadIcon",
65
+ description: "Upload / send to cloud",
66
+ icon: UploadIcon,
67
+ accentToken: "info",
68
+ },
69
+ {
70
+ name: "ShareIcon",
71
+ description: "Share content icon",
72
+ icon: ShareIcon,
73
+ accentToken: "positive",
74
+ },
75
+ {
76
+ name: "CopyIcon",
77
+ description: "Copy to clipboard icon",
78
+ icon: CopyIcon,
79
+ accentToken: "warning",
80
+ },
81
+ {
82
+ name: "ImportFolderIcon",
83
+ description: "Import folder icon",
84
+ icon: ImportFolderIcon,
85
+ accentToken: "negative",
86
+ },
87
+ ]}
88
+ />
678
89
  ),
679
90
  },
680
91
  },
681
92
  tags: ["autodocs"],
682
93
  argTypes: {
683
- width: {
684
- control: { type: "range", min: 8, max: 96, step: 2 },
685
- description: "Width of the icon in pixels",
686
- },
687
- withAccessibility: {
688
- control: "boolean",
689
- description: "Whether to wrap the icon with accessibility features",
690
- },
691
- height: {
692
- control: { type: "range", min: 8, max: 96, step: 2 },
693
- description: "Height of the icon in pixels",
694
- },
695
- stroke: {
696
- control: "color",
697
- description: "Stroke color of the icon",
698
- },
699
- strokeWidth: {
700
- control: { type: "range", min: 0.5, max: 4, step: 0.5 },
701
- description: "Width of the stroke",
702
- },
703
94
  className: {
704
95
  control: "text",
705
- description: "CSS classes for styling (use for overrides)",
96
+ description: "CSS classes including color token",
706
97
  },
707
- onClick: {
708
- action: "clicked",
709
- description: "Click handler for interactive use",
98
+ withAccessibility: {
99
+ control: "boolean",
100
+ description: "Wrap with accessibility label",
710
101
  },
711
102
  },
712
103
  }
@@ -714,212 +105,87 @@ function CloseButton() {
714
105
  export default meta
715
106
  type Story = StoryObj<typeof DownloadIcon>
716
107
 
717
- // Story parameters for consistent dark theme
718
- const storyParameters = {
719
- backgrounds: {
720
- default: "dark",
721
- values: [
722
- { name: "dark", value: "var(--color-fm-surface-primary)" },
723
- { name: "darker", value: "var(--color-fm-neutral-0)" },
724
- ],
725
- },
726
- }
727
-
728
108
  export const Default: Story = {
729
109
  args: {
730
- className: "h-6 w-6 text-fm-placeholder ",
110
+ className: "h-6 w-6 text-fm-icon-active",
731
111
  withAccessibility: true,
732
112
  },
733
- parameters: storyParameters,
734
113
  render: (args) => (
735
- <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">
114
+ <IconDefaultCanvas>
736
115
  <DownloadIcon {...args} />
737
- </div>
116
+ </IconDefaultCanvas>
738
117
  ),
739
118
  }
740
119
 
741
120
  export const SizeVariations: Story = {
742
- parameters: {
743
- ...storyParameters,
744
- docs: {
745
- description: {
746
- story:
747
- "DownloadIcon in different sizes, from small UI elements to large displays.",
748
- },
749
- },
750
- },
751
- render: () => (
752
- <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">
753
- <div className="text-center">
754
- <DownloadIcon className="text-fm-placeholder !mx-auto mb-2 h-3 w-3" />
755
- <span className="text-fm-tertiary text-xs">12px</span>
756
- </div>
757
- <div className="text-center">
758
- <DownloadIcon className="text-fm-placeholder !mx-auto mb-2 h-4 w-4" />
759
- <span className="text-fm-tertiary text-xs">16px</span>
760
- </div>
761
- <div className="text-center">
762
- <DownloadIcon className="text-fm-placeholder !mx-auto mb-2 h-5 w-5" />
763
- <span className="text-fm-tertiary text-xs">20px</span>
764
- </div>
765
- <div className="text-center">
766
- <DownloadIcon className="text-fm-placeholder !mx-auto mb-2 h-6 w-6" />
767
- <span className="text-fm-tertiary text-xs">24px</span>
768
- </div>
769
- <div className="text-center">
770
- <DownloadIcon className="text-fm-placeholder !mx-auto mb-2 h-8 w-8" />
771
- <span className="text-fm-tertiary text-xs">32px</span>
772
- </div>
773
- <div className="text-center">
774
- <DownloadIcon className="text-fm-placeholder !mx-auto mb-2 h-12 w-12" />
775
- <span className="text-fm-tertiary text-xs">48px</span>
776
- </div>
777
- </div>
778
- ),
121
+ render: () => <IconSizeVariations icon={DownloadIcon} />,
779
122
  }
780
123
 
781
124
  export const ColorVariations: Story = {
782
- parameters: {
783
- ...storyParameters,
784
- docs: {
785
- description: {
786
- story:
787
- "DownloadIcon in different semantic colors for various use cases.",
788
- },
789
- },
790
- },
791
- render: () => (
792
- <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">
793
- <div className="text-center">
794
- <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">
795
- <DownloadIcon className="text-fm-placeholder h-8 w-8" />
796
- </div>
797
- <div className="text-fm-icon-active text-sm font-medium">Default</div>
798
- <div className="text-fm-placeholder text-xs">text-fm-placeholder</div>
799
- </div>
800
- <div className="text-center">
801
- <div className="border-fm-icon-negative/30 bg-fm-icon-negative/20 !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
802
- <DownloadIcon className="text-fm-icon-negative h-8 w-8" />
803
- </div>
804
- <div className="text-fm-icon-active text-sm font-medium">
805
- Close/Error
806
- </div>
807
- <div className="text-fm-icon-negative text-xs">
808
- text-fm-icon-negative
809
- </div>
810
- </div>
811
- <div className="text-center">
812
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
813
- <DownloadIcon className="text-fm-tertiary h-8 w-8" />
814
- </div>
815
- <div className="text-fm-icon-active text-sm font-medium">Muted</div>
816
- <div className="text-fm-tertiary text-xs">text-fm-tertiary</div>
817
- </div>
818
- <div className="text-center">
819
- <div className="border-fm-divider-primary bg-fm-icon-inactive/20 !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
820
- <DownloadIcon className="text-fm-secondary h-8 w-8" />
821
- </div>
822
- <div className="text-fm-icon-active text-sm font-medium">Light</div>
823
- <div className="text-fm-secondary text-xs">text-fm-secondary</div>
824
- </div>
825
- </div>
826
- ),
125
+ render: () => <IconColorVariations icon={DownloadIcon} />,
827
126
  }
828
127
 
829
128
  export const UsageExamples: Story = {
830
- parameters: {
831
- ...storyParameters,
832
- docs: {
833
- description: {
834
- story:
835
- "Real-world usage examples showing DownloadIcon in different UI contexts.",
836
- },
837
- },
838
- },
839
129
  render: () => (
840
- <div className="from-fm-surface-primary to-fm-surface-secondary min-h-dvh !space-y-8 rounded-lg bg-linear-to-br p-8">
841
- {/* Modal Close Button */}
842
- <div className="!space-y-2">
843
- <h3 className="text-fm-icon-active text-sm font-medium">
844
- Modal Close Button
845
- </h3>
846
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-6">
847
- <div className="mb-4 flex items-center justify-between">
848
- <h3 className="text-fm-icon-active text-lg font-semibold">
849
- Settings
850
- </h3>
851
- <button className="hover:bg-fm-surface-secondary rounded-lg p-2 transition-colors">
852
- <DownloadIcon className="text-fm-placeholder h-5 w-5" />
853
- </button>
130
+ <IconUsageCanvas>
131
+ <IconUsageSection title="Download Episode">
132
+ <button className="border-fm-divider-secondary bg-fm-surface-secondary flex items-center gap-2 rounded-xl border px-4 py-2">
133
+ <DownloadIcon className="text-fm-icon-active h-4 w-4" />
134
+ <span className="text-fm-primary font-fm-text text-sm">
135
+ Download for offline
136
+ </span>
137
+ </button>
138
+ </IconUsageSection>
139
+
140
+ <IconUsageSection title="Story Card Actions">
141
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary w-full max-w-sm rounded-xl border p-4">
142
+ <div className="flex items-center gap-3">
143
+ <div className="bg-fm-divider-secondary h-14 w-14 shrink-0 rounded-xl" />
144
+ <div className="flex-1">
145
+ <div className="text-fm-primary font-fm-text text-sm font-medium">
146
+ Midnight Echoes
147
+ </div>
148
+ <div className="text-fm-secondary font-fm-text text-xs">
149
+ 12 episodes
150
+ </div>
151
+ </div>
152
+ <div className="flex gap-2">
153
+ <button>
154
+ <DownloadIcon className="text-fm-icon-active h-5 w-5" />
155
+ </button>
156
+ <button>
157
+ <ShareIcon className="text-fm-icon-inactive h-5 w-5" />
158
+ </button>
159
+ </div>
854
160
  </div>
855
- <p className="text-fm-secondary">
856
- Configure your application preferences and settings.
857
- </p>
858
- </div>
859
- </div>
860
-
861
- {/* Search Clear Button */}
862
- <div className="!space-y-2">
863
- <h3 className="text-fm-icon-active text-sm font-medium">
864
- Search Clear Button
865
- </h3>
866
- <div className="relative">
867
- <input
868
- type="text"
869
- className="border-fm-divider-primary bg-fm-surface-secondary text-fm-icon-active focus:border-fm-divider-primary w-full rounded-lg border px-3 py-2 pr-10 placeholder-white/50 focus:ring-2 focus:ring-gray-400/20"
870
- placeholder="Search..."
871
- defaultValue="Sample query"
872
- />
873
- <button className="hover:bg-fm-surface-secondary absolute top-1/2 right-3 -translate-y-1/2 rounded p-0.5">
874
- <DownloadIcon className="text-fm-placeholder h-4 w-4" />
875
- </button>
876
161
  </div>
877
- </div>
878
-
879
- {/* Tab Close Button */}
880
- <div className="!space-y-2">
881
- <h3 className="text-fm-icon-active text-sm font-medium">
882
- Tab Close Button
883
- </h3>
884
- <div className="border-fm-divider-secondary flex border-b">
885
- <div className="border-fm-icon-info text-fm-icon-info flex items-center gap-2 border-b-2 px-4 py-2">
886
- <span>Component.tsx</span>
887
- <button className="hover:bg-fm-icon-info/20 rounded p-0.5">
888
- <DownloadIcon className="text-fm-icon-info h-3 w-3" />
889
- </button>
890
- </div>
891
- <div className="text-fm-tertiary hover:text-fm-icon-active flex items-center gap-2 px-4 py-2">
892
- <span>utils.ts</span>
893
- <button className="hover:bg-fm-surface-secondary rounded p-0.5 opacity-60 hover:opacity-100">
894
- <DownloadIcon className="text-fm-placeholder h-3 w-3" />
895
- </button>
162
+ </IconUsageSection>
163
+
164
+ <IconUsageSection title="Downloading State">
165
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary flex w-full max-w-sm items-center gap-3 rounded-xl border px-4 py-3">
166
+ <DownloadIcon className="text-fm-icon-info h-5 w-5" />
167
+ <div className="flex-1">
168
+ <div className="text-fm-primary font-fm-text text-sm">
169
+ Downloading...
170
+ </div>
171
+ <div className="bg-fm-divider-secondary mt-1 h-1 w-full overflow-hidden rounded-full">
172
+ <div className="bg-fm-icon-info h-full w-2/3 rounded-full" />
173
+ </div>
896
174
  </div>
897
175
  </div>
898
- </div>
899
- </div>
176
+ </IconUsageSection>
177
+ </IconUsageCanvas>
900
178
  ),
901
179
  }
902
180
 
903
181
  export const Playground: Story = {
904
- parameters: {
905
- ...storyParameters,
906
- docs: {
907
- description: {
908
- story:
909
- "Interactive playground to experiment with different DownloadIcon configurations.",
910
- },
911
- },
912
- },
913
182
  args: {
914
- width: 32,
915
- height: 32,
916
- className: "text-fm-placeholder ",
183
+ className: "h-8 w-8 text-fm-icon-active",
184
+ withAccessibility: true,
917
185
  },
918
186
  render: (args) => (
919
- <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">
920
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-8">
921
- <DownloadIcon {...args} />
922
- </div>
923
- </div>
187
+ <IconPlaygroundCanvas>
188
+ <DownloadIcon {...args} />
189
+ </IconPlaygroundCanvas>
924
190
  ),
925
191
  }