aural-ui 2.0.1 → 2.0.3

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