aural-ui 2.1.0 → 2.1.1

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 (88) hide show
  1. package/dist/icons/apple-logo-icon/AppleLogoIcon.stories.tsx +952 -0
  2. package/dist/icons/apple-logo-icon/index.tsx +26 -0
  3. package/dist/icons/apple-logo-icon/meta.ts +8 -0
  4. package/dist/icons/arrow-left-icon/ArrowLeftIcon.stories.tsx +1008 -0
  5. package/dist/icons/arrow-left-icon/index.tsx +24 -0
  6. package/dist/icons/arrow-left-icon/meta.ts +8 -0
  7. package/dist/icons/backward-ten-seconds-icon/BackwardTenSecondsIcon.stories.tsx +1050 -0
  8. package/dist/icons/backward-ten-seconds-icon/index.tsx +35 -0
  9. package/dist/icons/backward-ten-seconds-icon/meta.ts +8 -0
  10. package/dist/icons/camera-icon/CameraIcon.stories.tsx +1271 -0
  11. package/dist/icons/camera-icon/index.tsx +22 -0
  12. package/dist/icons/camera-icon/meta.ts +8 -0
  13. package/dist/icons/coin-icon/CoinIcon.stories.tsx +1382 -0
  14. package/dist/icons/coin-icon/index.tsx +36 -0
  15. package/dist/icons/coin-icon/meta.ts +8 -0
  16. package/dist/icons/email-icon/EmailIcon.stories.tsx +995 -0
  17. package/dist/icons/email-icon/index.tsx +22 -0
  18. package/dist/icons/email-icon/meta.ts +8 -0
  19. package/dist/icons/expand-icon/ExpandIcon.stories.tsx +1167 -0
  20. package/dist/icons/expand-icon/index.tsx +22 -0
  21. package/dist/icons/expand-icon/meta.ts +8 -0
  22. package/dist/icons/forward-ten-seconds-icon/ForwardTenSecondsIcon.stories.tsx +1054 -0
  23. package/dist/icons/forward-ten-seconds-icon/index.tsx +33 -0
  24. package/dist/icons/forward-ten-seconds-icon/meta.ts +8 -0
  25. package/dist/icons/google-logo-icon/GoogleLogoIcon.stories.tsx +1004 -0
  26. package/dist/icons/google-logo-icon/index.tsx +34 -0
  27. package/dist/icons/google-logo-icon/meta.ts +8 -0
  28. package/dist/icons/heart-icon/HeartIcon.stories.tsx +1080 -0
  29. package/dist/icons/heart-icon/index.tsx +21 -0
  30. package/dist/icons/heart-icon/meta.ts +8 -0
  31. package/dist/icons/index.ts +32 -4
  32. package/dist/icons/indian-flag-icon/IndianFlagIcon.stories.tsx +1020 -0
  33. package/dist/icons/indian-flag-icon/index.tsx +46 -0
  34. package/dist/icons/indian-flag-icon/meta.ts +8 -0
  35. package/dist/icons/instagram-icon/InstagramIcon.stories.tsx +1449 -0
  36. package/dist/icons/instagram-icon/index.tsx +17 -0
  37. package/dist/icons/instagram-icon/meta.ts +8 -0
  38. package/dist/icons/linked-in-icon/LinkedInIcon.stories.tsx +1582 -0
  39. package/dist/icons/linked-in-icon/index.tsx +17 -0
  40. package/dist/icons/linked-in-icon/meta.ts +8 -0
  41. package/dist/icons/minimize-icon/MinimizeIcon.stories.tsx +1214 -0
  42. package/dist/icons/minimize-icon/index.tsx +22 -0
  43. package/dist/icons/minimize-icon/meta.ts +8 -0
  44. package/dist/icons/pause-icon/PauseIcon.stories.tsx +1060 -0
  45. package/dist/icons/pause-icon/index.tsx +30 -0
  46. package/dist/icons/pause-icon/meta.ts +8 -0
  47. package/dist/icons/share-icon/ShareIcon.stories.tsx +1081 -0
  48. package/dist/icons/share-icon/index.tsx +22 -0
  49. package/dist/icons/share-icon/meta.ts +8 -0
  50. package/dist/icons/skip-backward-icon/SkipBackwardIcon.stories.tsx +1047 -0
  51. package/dist/icons/skip-backward-icon/index.tsx +29 -0
  52. package/dist/icons/skip-backward-icon/meta.ts +8 -0
  53. package/dist/icons/skip-forward-icon/SkipForwardIcon.stories.tsx +1049 -0
  54. package/dist/icons/skip-forward-icon/index.tsx +29 -0
  55. package/dist/icons/skip-forward-icon/meta.ts +8 -0
  56. package/dist/icons/store-coin-icon/StoreCoinIcon.stories.tsx +1020 -0
  57. package/dist/icons/store-coin-icon/index.tsx +35 -0
  58. package/dist/icons/store-coin-icon/meta.ts +8 -0
  59. package/dist/icons/threads-icon/ThreadsIcon.stories.tsx +1489 -0
  60. package/dist/icons/threads-icon/index.tsx +17 -0
  61. package/dist/icons/threads-icon/meta.ts +8 -0
  62. package/dist/icons/twitter-x-icon/TwitterXIcon.stories.tsx +1463 -0
  63. package/dist/icons/twitter-x-icon/index.tsx +17 -0
  64. package/dist/icons/twitter-x-icon/meta.ts +8 -0
  65. package/dist/icons/video-play-list-icon/VideoPlaylistIcon.stories.tsx +1105 -0
  66. package/dist/icons/video-play-list-icon/index.tsx +22 -0
  67. package/dist/icons/video-play-list-icon/meta.ts +8 -0
  68. package/dist/icons/voice-playing-icon/VoicePlayingIcon.stories.tsx +1416 -0
  69. package/dist/icons/voice-playing-icon/index.tsx +24 -0
  70. package/dist/icons/voice-playing-icon/meta.ts +8 -0
  71. package/dist/icons/volume-full-icon/VolumeFullIcon.stories.tsx +1230 -0
  72. package/dist/icons/volume-full-icon/index.tsx +25 -0
  73. package/dist/icons/volume-full-icon/meta.ts +8 -0
  74. package/dist/icons/volume-half-icon/VolumeHalfIcon.stories.tsx +1153 -0
  75. package/dist/icons/volume-half-icon/index.tsx +25 -0
  76. package/dist/icons/volume-half-icon/meta.ts +8 -0
  77. package/dist/icons/volume-off-icon/VolumeOffIcon.stories.tsx +1144 -0
  78. package/dist/icons/volume-off-icon/index.tsx +26 -0
  79. package/dist/icons/volume-off-icon/meta.ts +8 -0
  80. package/dist/icons/warning-icon/WarningIcon.stories.tsx +1106 -0
  81. package/dist/icons/warning-icon/index.tsx +27 -0
  82. package/dist/icons/warning-icon/meta.ts +8 -0
  83. package/dist/icons/youtube-icon/YoutubeIcon.stories.tsx +996 -0
  84. package/dist/icons/youtube-icon/index.tsx +24 -0
  85. package/dist/icons/youtube-icon/meta.ts +8 -0
  86. package/dist/index.js +1 -1
  87. package/dist/styles/aural-theme.css +9 -0
  88. package/package.json +1 -1
@@ -0,0 +1,1416 @@
1
+ import React from "react"
2
+ import type { Meta, StoryObj } from "@storybook/react"
3
+
4
+ import { VoicePlayingIcon } from "."
5
+
6
+ const meta: Meta<typeof VoicePlayingIcon> = {
7
+ title: "Icons/VoicePlayingIcon",
8
+ component: VoicePlayingIcon,
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-emerald-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-emerald-500/10 via-transparent to-teal-500/10" />
87
+ <div className="relative !mx-auto max-w-7xl px-6 py-16">
88
+ <div className="!space-y-6 text-center">
89
+ <div className="!mx-auto flex h-24 w-24 items-center justify-center rounded-2xl border border-emerald-500/30 bg-gradient-to-br from-emerald-500/20 to-teal-500/20">
90
+ <VoicePlayingIcon className="h-12 w-12 text-emerald-400" />
91
+ </div>
92
+ <h1 className="text-5xl font-bold !text-white">
93
+ VoicePlayingIcon
94
+ </h1>
95
+ <p className="!mx-auto max-w-3xl text-xl leading-relaxed !text-white/70">
96
+ An animated audio visualizer icon featuring dynamic sound
97
+ bars that represent active voice playback. Perfect for
98
+ podcast players, voice message interfaces, audio recording
99
+ apps, voice assistants, and any interface where audio
100
+ activity visualization is needed.
101
+ </p>
102
+
103
+ {/* Stats */}
104
+ <div className="flex items-center justify-center gap-8 pt-8">
105
+ <div className="text-center">
106
+ <div className="text-3xl font-bold text-emerald-300">
107
+ Voice Playback
108
+ </div>
109
+ <div className="text-sm text-white/60">
110
+ Audio visualization
111
+ </div>
112
+ </div>
113
+ <div className="h-8 w-px bg-white/20" />
114
+ <div className="text-center">
115
+ <div className="text-3xl font-bold text-teal-300">
116
+ Live Activity
117
+ </div>
118
+ <div className="text-sm text-white/60">
119
+ Real-time feedback
120
+ </div>
121
+ </div>
122
+ <div className="h-8 w-px bg-white/20" />
123
+ <div className="text-center">
124
+ <div className="text-3xl font-bold text-cyan-300">
125
+ Interactive
126
+ </div>
127
+ <div className="text-sm text-white/60">
128
+ Visual engagement
129
+ </div>
130
+ </div>
131
+ </div>
132
+ </div>
133
+ </div>
134
+ </div>
135
+
136
+ {/* Content */}
137
+ <div className="!mx-auto max-w-7xl !space-y-16 px-6 py-12">
138
+ {/* Quick Usage */}
139
+ <div className="!space-y-8">
140
+ <h2 className="text-center text-3xl font-bold !text-white">
141
+ Quick Start
142
+ </h2>
143
+ <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
144
+ <div className="!space-y-4">
145
+ <h3 className="text-xl font-semibold !text-emerald-300">
146
+ Basic Usage
147
+ </h3>
148
+ <div className="rounded-lg bg-black/40 p-4">
149
+ <pre className="overflow-x-auto text-sm !text-green-300">
150
+ {`import { VoicePlayingIcon } from "@icons/voice-playing-icon"
151
+
152
+ function VoiceMessage({ isPlaying }) {
153
+ return (
154
+ <button className="flex items-center gap-2">
155
+ {isPlaying ? (
156
+ <VoicePlayingIcon className="h-5 w-5 text-emerald-400" />
157
+ ) : (
158
+ <PlayIcon className="h-5 w-5 text-white/60" />
159
+ )}
160
+ <span>Voice Message</span>
161
+ </button>
162
+ )
163
+ }`}
164
+ </pre>
165
+ </div>
166
+ </div>
167
+
168
+ <div className="!space-y-4">
169
+ <h3 className="text-xl font-semibold !text-emerald-300">
170
+ Live Preview
171
+ </h3>
172
+ <div className="flex h-32 items-center justify-center rounded-lg border border-white/10 bg-white/5">
173
+ <div className="flex items-center gap-3 rounded-lg border border-emerald-500/20 bg-emerald-500/10 px-4 py-2">
174
+ <VoicePlayingIcon className="h-5 w-5 text-emerald-400" />
175
+ <span className="font-medium text-emerald-300">
176
+ Now Playing
177
+ </span>
178
+ </div>
179
+ </div>
180
+ </div>
181
+ </div>
182
+ </div>
183
+
184
+ {/* Props Documentation */}
185
+ <div className="!space-y-8">
186
+ <h2 className="text-center text-3xl font-bold !text-white">
187
+ Props & Configuration
188
+ </h2>
189
+
190
+ <div className="overflow-hidden rounded-lg border border-white/10 bg-white/5">
191
+ <div className="bg-white/5 p-4">
192
+ <h3 className="text-xl font-semibold !text-white">Props</h3>
193
+ </div>
194
+ <table className="!my-0 w-full">
195
+ <thead className="bg-white/5">
196
+ <tr className="border-b border-white/10">
197
+ <th className="px-6 py-4 text-left text-sm font-semibold !text-white">
198
+ Prop
199
+ </th>
200
+ <th className="px-6 py-4 text-left text-sm font-semibold !text-white">
201
+ Type
202
+ </th>
203
+ <th className="px-6 py-4 text-left text-sm font-semibold !text-white">
204
+ Default
205
+ </th>
206
+ <th className="px-6 py-4 text-left text-sm font-semibold !text-white">
207
+ Description
208
+ </th>
209
+ </tr>
210
+ </thead>
211
+ <tbody>
212
+ <tr className="border-b border-white/5">
213
+ <td className="px-6 py-4 font-mono text-sm !text-emerald-300">
214
+ width
215
+ </td>
216
+ <td className="px-6 py-4 text-sm !text-white/70">
217
+ number | string
218
+ </td>
219
+ <td className="px-6 py-4 text-sm !text-white/50">24</td>
220
+ <td className="px-6 py-4 text-sm !text-white/70">
221
+ Width of the icon in pixels
222
+ </td>
223
+ </tr>
224
+ <tr className="border-b border-white/5 !bg-black/10">
225
+ <td className="px-6 py-4 font-mono text-sm !text-emerald-300">
226
+ height
227
+ </td>
228
+ <td className="px-6 py-4 text-sm !text-white/70">
229
+ number | string
230
+ </td>
231
+ <td className="px-6 py-4 text-sm !text-white/50">24</td>
232
+ <td className="px-6 py-4 text-sm !text-white/70">
233
+ Height of the icon in pixels
234
+ </td>
235
+ </tr>
236
+ <tr className="border-b border-white/5">
237
+ <td className="px-6 py-4 font-mono text-sm !text-emerald-300">
238
+ stroke
239
+ </td>
240
+ <td className="px-6 py-4 text-sm !text-white/70">
241
+ string
242
+ </td>
243
+ <td className="px-6 py-4 text-sm !text-white/50">
244
+ currentColor
245
+ </td>
246
+ <td className="px-6 py-4 text-sm !text-white/70">
247
+ Stroke color of the audio bars
248
+ </td>
249
+ </tr>
250
+ <tr className="border-b border-white/5 !bg-black/10">
251
+ <td className="px-6 py-4 font-mono text-sm !text-emerald-300">
252
+ strokeWidth
253
+ </td>
254
+ <td className="px-6 py-4 text-sm !text-white/70">
255
+ string | number
256
+ </td>
257
+ <td className="px-6 py-4 text-sm !text-white/50">
258
+ 1.5
259
+ </td>
260
+ <td className="px-6 py-4 text-sm !text-white/70">
261
+ Width of the audio bar strokes
262
+ </td>
263
+ </tr>
264
+ <tr className="border-b border-white/5">
265
+ <td className="px-6 py-4 font-mono text-sm !text-emerald-300">
266
+ strokeLinecap
267
+ </td>
268
+ <td className="px-6 py-4 text-sm !text-white/70">
269
+ string
270
+ </td>
271
+ <td className="px-6 py-4 text-sm !text-white/50">
272
+ square
273
+ </td>
274
+ <td className="px-6 py-4 text-sm !text-white/70">
275
+ Line cap style (square for clean bar edges)
276
+ </td>
277
+ </tr>
278
+ <tr className="border-b border-white/5 !bg-black/10">
279
+ <td className="px-6 py-4 font-mono text-sm !text-emerald-300">
280
+ className
281
+ </td>
282
+ <td className="px-6 py-4 text-sm !text-white/70">
283
+ string
284
+ </td>
285
+ <td className="px-6 py-4 text-sm !text-white/50">-</td>
286
+ <td className="px-6 py-4 text-sm !text-white/70">
287
+ CSS classes for styling and animations
288
+ </td>
289
+ </tr>
290
+ <tr className="!bg-black/10">
291
+ <td className="px-6 py-4 font-mono text-sm !text-emerald-300">
292
+ ...svgProps
293
+ </td>
294
+ <td className="px-6 py-4 text-sm !text-white/70">
295
+ SVGProps
296
+ </td>
297
+ <td className="px-6 py-4 text-sm !text-white/50">-</td>
298
+ <td className="px-6 py-4 text-sm !text-white/70">
299
+ All standard SVG element props
300
+ </td>
301
+ </tr>
302
+ </tbody>
303
+ </table>
304
+ </div>
305
+
306
+ <div className="rounded-lg border border-emerald-500/20 bg-emerald-500/10 p-4">
307
+ <div className="flex items-center gap-2 text-sm text-emerald-200">
308
+ <VoicePlayingIcon className="h-4 w-4" />
309
+ <span>
310
+ <strong>Animation Tip:</strong> Use CSS animations or
311
+ transitions with the className prop to create dynamic
312
+ audio visualizations that respond to actual audio levels.
313
+ </span>
314
+ </div>
315
+ </div>
316
+ </div>
317
+
318
+ {/* Size Variations */}
319
+ <div className="!space-y-8">
320
+ <h2 className="text-center text-3xl font-bold !text-white">
321
+ Size Variations
322
+ </h2>
323
+ <div className="rounded-lg border border-white/10 bg-white/5 p-8">
324
+ <div className="!space-y-6">
325
+ <div className="grid grid-cols-1 gap-8 md:grid-cols-2">
326
+ <div className="!space-y-4">
327
+ <h3 className="text-lg font-semibold !text-emerald-300">
328
+ Standard Sizes
329
+ </h3>
330
+ <div className="flex items-end gap-6 rounded-lg bg-black/20 p-6">
331
+ <div className="text-center">
332
+ <VoicePlayingIcon className="!mx-auto mb-2 h-3 w-3 text-emerald-400" />
333
+ <span className="text-xs text-white/60">12px</span>
334
+ </div>
335
+ <div className="text-center">
336
+ <VoicePlayingIcon className="!mx-auto mb-2 h-4 w-4 text-emerald-400" />
337
+ <span className="text-xs text-white/60">16px</span>
338
+ </div>
339
+ <div className="text-center">
340
+ <VoicePlayingIcon className="!mx-auto mb-2 h-5 w-5 text-emerald-400" />
341
+ <span className="text-xs text-white/60">20px</span>
342
+ </div>
343
+ <div className="text-center">
344
+ <VoicePlayingIcon className="!mx-auto mb-2 h-6 w-6 text-emerald-400" />
345
+ <span className="text-xs text-white/60">24px</span>
346
+ </div>
347
+ <div className="text-center">
348
+ <VoicePlayingIcon className="!mx-auto mb-2 h-8 w-8 text-emerald-400" />
349
+ <span className="text-xs text-white/60">32px</span>
350
+ </div>
351
+ <div className="text-center">
352
+ <VoicePlayingIcon className="!mx-auto mb-2 h-12 w-12 text-emerald-400" />
353
+ <span className="text-xs text-white/60">48px</span>
354
+ </div>
355
+ </div>
356
+ </div>
357
+
358
+ <div className="!space-y-4">
359
+ <h3 className="text-lg font-semibold !text-emerald-300">
360
+ Code Example
361
+ </h3>
362
+ <div className="rounded-lg bg-black/40 p-4">
363
+ <pre className="overflow-x-auto text-sm !text-cyan-300">
364
+ {`// Small (16px) - inline indicators
365
+ <VoicePlayingIcon className="h-4 w-4" />
366
+
367
+ // Medium (24px) - standard interface
368
+ <VoicePlayingIcon className="h-6 w-6" />
369
+
370
+ // Large (32px) - prominent displays
371
+ <VoicePlayingIcon className="h-8 w-8" />
372
+
373
+ // Custom size
374
+ <VoicePlayingIcon width={40} height={40} />`}
375
+ </pre>
376
+ </div>
377
+ </div>
378
+ </div>
379
+ </div>
380
+ </div>
381
+ </div>
382
+
383
+ {/* Color Variations */}
384
+ <div className="!space-y-8">
385
+ <h2 className="text-center text-3xl font-bold !text-white">
386
+ Color Variations
387
+ </h2>
388
+ <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
389
+ <div className="!space-y-4">
390
+ <h3 className="text-lg font-semibold !text-emerald-300">
391
+ Semantic Colors
392
+ </h3>
393
+ <div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
394
+ <div className="flex items-center gap-4">
395
+ <VoicePlayingIcon className="h-6 w-6 text-emerald-400" />
396
+ <div>
397
+ <div className="text-sm font-medium text-white">
398
+ Voice Active
399
+ </div>
400
+ <div className="text-xs text-white/60">
401
+ text-emerald-400
402
+ </div>
403
+ </div>
404
+ </div>
405
+ <div className="flex items-center gap-4">
406
+ <VoicePlayingIcon className="h-6 w-6 text-blue-400" />
407
+ <div>
408
+ <div className="text-sm font-medium text-white">
409
+ Audio Playback
410
+ </div>
411
+ <div className="text-xs text-white/60">
412
+ text-blue-400
413
+ </div>
414
+ </div>
415
+ </div>
416
+ <div className="flex items-center gap-4">
417
+ <VoicePlayingIcon className="h-6 w-6 text-purple-400" />
418
+ <div>
419
+ <div className="text-sm font-medium text-white">
420
+ Live Recording
421
+ </div>
422
+ <div className="text-xs text-white/60">
423
+ text-purple-400
424
+ </div>
425
+ </div>
426
+ </div>
427
+ <div className="flex items-center gap-4">
428
+ <VoicePlayingIcon className="h-6 w-6 text-orange-400" />
429
+ <div>
430
+ <div className="text-sm font-medium text-white">
431
+ Music Playing
432
+ </div>
433
+ <div className="text-xs text-white/60">
434
+ text-orange-400
435
+ </div>
436
+ </div>
437
+ </div>
438
+ </div>
439
+ </div>
440
+
441
+ <div className="!space-y-4">
442
+ <h3 className="text-lg font-semibold !text-emerald-300">
443
+ Animation Examples
444
+ </h3>
445
+ <div className="rounded-lg bg-black/40 p-4">
446
+ <pre className="overflow-x-auto text-sm !text-green-300">
447
+ {`// Pulsing animation for active voice
448
+ <VoicePlayingIcon
449
+ className="h-6 w-6 text-emerald-400 animate-pulse"
450
+ />
451
+
452
+ // Custom animation with opacity
453
+ <VoicePlayingIcon
454
+ className="h-6 w-6 text-blue-400 opacity-75
455
+ hover:opacity-100 transition-opacity"
456
+ />
457
+
458
+ // Breathing effect with scale
459
+ <VoicePlayingIcon
460
+ className="h-6 w-6 text-purple-400
461
+ animate-[breath_2s_ease-in-out_infinite]"
462
+ />
463
+
464
+ // Color transition on state change
465
+ <VoicePlayingIcon
466
+ className={isActive
467
+ ? "h-6 w-6 text-emerald-400 transition-colors"
468
+ : "h-6 w-6 text-white/40 transition-colors"
469
+ }
470
+ />`}
471
+ </pre>
472
+ </div>
473
+ </div>
474
+ </div>
475
+ </div>
476
+
477
+ {/* Usage Examples */}
478
+ <div className="!space-y-8">
479
+ <h2 className="text-center text-3xl font-bold !text-white">
480
+ Usage Examples
481
+ </h2>
482
+
483
+ <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
484
+ {/* Voice Message Interface */}
485
+ <div className="!space-y-4">
486
+ <h3 className="text-lg font-semibold !text-emerald-300">
487
+ Voice Message Player
488
+ </h3>
489
+ <div className="!space-y-4">
490
+ <div className="rounded-lg border border-white/10 bg-white/5 p-6">
491
+ <div className="space-y-4">
492
+ <div className="flex items-center gap-3 rounded-lg border border-emerald-500/20 bg-emerald-500/10 p-3">
493
+ <div className="flex h-10 w-10 items-center justify-center rounded-full bg-emerald-500/20">
494
+ <span className="text-sm">👤</span>
495
+ </div>
496
+ <div className="flex-1">
497
+ <div className="mb-1 flex items-center justify-between">
498
+ <span className="text-sm font-medium text-white">
499
+ Sarah Connor
500
+ </span>
501
+ <span className="text-xs text-white/60">
502
+ 2:34
503
+ </span>
504
+ </div>
505
+ <div className="flex items-center gap-2">
506
+ <button className="rounded border border-emerald-500/30 bg-emerald-500/20 p-1.5 transition-colors hover:bg-emerald-500/30">
507
+ <VoicePlayingIcon className="h-4 w-4 text-emerald-400" />
508
+ </button>
509
+ <div className="h-1 flex-1 overflow-hidden rounded-full bg-white/10">
510
+ <div
511
+ className="h-full rounded-full bg-emerald-400"
512
+ style={{ width: "45%" }}
513
+ ></div>
514
+ </div>
515
+ <span className="text-xs text-emerald-400">
516
+ 0:32
517
+ </span>
518
+ </div>
519
+ </div>
520
+ </div>
521
+ <div className="flex items-center gap-3 rounded-lg border border-white/10 bg-white/5 p-3">
522
+ <div className="flex h-10 w-10 items-center justify-center rounded-full bg-white/10">
523
+ <span className="text-sm">👤</span>
524
+ </div>
525
+ <div className="flex-1">
526
+ <div className="mb-1 flex items-center justify-between">
527
+ <span className="text-sm font-medium text-white">
528
+ John Smith
529
+ </span>
530
+ <span className="text-xs text-white/60">
531
+ 1:45
532
+ </span>
533
+ </div>
534
+ <div className="flex items-center gap-2">
535
+ <button className="rounded border border-white/20 bg-white/10 p-1.5 transition-colors hover:bg-white/20">
536
+ <div className="relative h-4 w-4">
537
+ <div className="absolute inset-0 ml-1 border-y-2 border-l-4 border-y-transparent border-l-white"></div>
538
+ </div>
539
+ </button>
540
+ <div className="h-1 flex-1 rounded-full bg-white/10">
541
+ <div
542
+ className="h-full rounded-full bg-white/20"
543
+ style={{ width: "0%" }}
544
+ ></div>
545
+ </div>
546
+ <span className="text-xs text-white/60">
547
+ 1:45
548
+ </span>
549
+ </div>
550
+ </div>
551
+ </div>
552
+ <div className="flex items-center gap-3 rounded-lg border border-white/10 bg-white/5 p-3">
553
+ <div className="flex h-10 w-10 items-center justify-center rounded-full bg-white/10">
554
+ <span className="text-sm">👤</span>
555
+ </div>
556
+ <div className="flex-1">
557
+ <div className="mb-1 flex items-center justify-between">
558
+ <span className="text-sm font-medium text-white">
559
+ Alex Johnson
560
+ </span>
561
+ <span className="text-xs text-white/60">
562
+ 0:58
563
+ </span>
564
+ </div>
565
+ <div className="flex items-center gap-2">
566
+ <button className="rounded border border-white/20 bg-white/10 p-1.5 transition-colors hover:bg-white/20">
567
+ <div className="relative h-4 w-4">
568
+ <div className="absolute inset-0 ml-1 border-y-2 border-l-4 border-y-transparent border-l-white"></div>
569
+ </div>
570
+ </button>
571
+ <div className="h-1 flex-1 rounded-full bg-white/10">
572
+ <div
573
+ className="h-full rounded-full bg-white/20"
574
+ style={{ width: "0%" }}
575
+ ></div>
576
+ </div>
577
+ <span className="text-xs text-white/60">
578
+ 0:58
579
+ </span>
580
+ </div>
581
+ </div>
582
+ </div>
583
+ </div>
584
+ </div>
585
+ <div className="rounded-lg bg-black/40 p-4">
586
+ <pre className="overflow-x-auto text-sm !text-green-300">
587
+ {`// Voice message player with visual feedback
588
+ <div className="voice-message-list">
589
+ {voiceMessages.map(message => (
590
+ <div key={message.id} className="voice-message-item">
591
+ <Avatar user={message.sender} />
592
+ <div className="message-content">
593
+ <div className="message-header">
594
+ <span className="sender-name">{message.sender.name}</span>
595
+ <span className="message-duration">{message.duration}</span>
596
+ </div>
597
+ <div className="playback-controls">
598
+ <button
599
+ onClick={() => togglePlayback(message.id)}
600
+ className="play-button"
601
+ aria-label={
602
+ isPlaying(message.id) ? 'Pause voice message' : 'Play voice message'
603
+ }
604
+ >
605
+ {isPlaying(message.id) ? (
606
+ <VoicePlayingIcon className="h-4 w-4 text-emerald-400" />
607
+ ) : (
608
+ <PlayIcon className="h-4 w-4 text-white/60" />
609
+ )}
610
+ </button>
611
+ <WaveformProgress
612
+ progress={getPlaybackProgress(message.id)}
613
+ duration={message.duration}
614
+ />
615
+ <PlaybackTime
616
+ current={getCurrentTime(message.id)}
617
+ total={message.duration}
618
+ />
619
+ </div>
620
+ </div>
621
+ </div>
622
+ ))}
623
+ </div>`}
624
+ </pre>
625
+ </div>
626
+ </div>
627
+ </div>
628
+
629
+ {/* Podcast Player */}
630
+ <div className="!space-y-4">
631
+ <h3 className="text-lg font-semibold !text-emerald-300">
632
+ Podcast Player
633
+ </h3>
634
+ <div className="!space-y-4">
635
+ <div className="rounded-lg border border-white/10 bg-white/5 p-6">
636
+ <div className="overflow-hidden rounded-lg border border-white/20 bg-black/50">
637
+ <div className="border-b border-white/10 p-4">
638
+ <div className="flex items-center gap-4">
639
+ <div className="flex h-16 w-16 items-center justify-center rounded-lg bg-gradient-to-br from-purple-500/20 to-blue-500/20">
640
+ <span className="text-2xl">🎙️</span>
641
+ </div>
642
+ <div className="flex-1">
643
+ <h4 className="text-lg font-semibold text-white">
644
+ Tech Talk Daily
645
+ </h4>
646
+ <p className="text-sm text-white/60">
647
+ Episode 42: AI and the Future
648
+ </p>
649
+ <div className="mt-2 flex items-center gap-2">
650
+ <VoicePlayingIcon className="h-4 w-4 text-emerald-400" />
651
+ <span className="text-xs text-emerald-400">
652
+ Now Playing
653
+ </span>
654
+ <span className="text-xs text-white/40">
655
+
656
+ </span>
657
+ <span className="text-xs text-white/60">
658
+ 15:32 / 45:20
659
+ </span>
660
+ </div>
661
+ </div>
662
+ </div>
663
+ </div>
664
+ <div className="space-y-4 p-4">
665
+ <div className="h-2 w-full overflow-hidden rounded-full bg-white/10">
666
+ <div
667
+ className="h-full rounded-full bg-emerald-400"
668
+ style={{ width: "34%" }}
669
+ ></div>
670
+ </div>
671
+ <div className="flex items-center justify-center gap-4">
672
+ <button className="rounded p-2 transition-colors hover:bg-white/10">
673
+ <div className="h-5 w-5 -translate-x-1 transform border-l-2 border-white"></div>
674
+ </button>
675
+ <button className="rounded-full border border-emerald-500/30 bg-emerald-500/20 p-3 transition-colors hover:bg-emerald-500/30">
676
+ <div className="flex h-6 w-6 items-center justify-center rounded-sm bg-white/20">
677
+ <div className="mr-1 h-4 w-1 rounded bg-white"></div>
678
+ <div className="h-4 w-1 rounded bg-white"></div>
679
+ </div>
680
+ </button>
681
+ <button className="rounded p-2 transition-colors hover:bg-white/10">
682
+ <div className="h-5 w-5 translate-x-1 transform border-r-2 border-white"></div>
683
+ </button>
684
+ </div>
685
+ <div className="flex items-center justify-between text-xs text-white/60">
686
+ <span>Previous: Episode 41</span>
687
+ <span>Next: Episode 43</span>
688
+ </div>
689
+ </div>
690
+ </div>
691
+ </div>
692
+ <div className="rounded-lg bg-black/40 p-4">
693
+ <pre className="overflow-x-auto text-sm !text-green-300">
694
+ {`// Podcast player with visual playback indicator
695
+ <div className="podcast-player">
696
+ <div className="episode-info">
697
+ <PodcastArtwork episode={currentEpisode} />
698
+ <div className="episode-details">
699
+ <h3 className="episode-title">{currentEpisode.title}</h3>
700
+ <p className="episode-subtitle">{currentEpisode.subtitle}</p>
701
+ <div className="playback-status">
702
+ {isPlaying ? (
703
+ <>
704
+ <VoicePlayingIcon className="h-4 w-4 text-emerald-400" />
705
+ <span className="status-text">Now Playing</span>
706
+ </>
707
+ ) : (
708
+ <>
709
+ <PauseIcon className="h-4 w-4 text-white/60" />
710
+ <span className="status-text">Paused</span>
711
+ </>
712
+ )}
713
+ <PlaybackTime
714
+ current={currentTime}
715
+ total={duration}
716
+ />
717
+ </div>
718
+ </div>
719
+ </div>
720
+ <ProgressBar
721
+ progress={playbackProgress}
722
+ onSeek={handleSeek}
723
+ />
724
+ <PlayerControls
725
+ isPlaying={isPlaying}
726
+ onPlayPause={togglePlayback}
727
+ onPrevious={playPrevious}
728
+ onNext={playNext}
729
+ />
730
+ </div>`}
731
+ </pre>
732
+ </div>
733
+ </div>
734
+ </div>
735
+
736
+ {/* Voice Assistant */}
737
+ <div className="!space-y-4">
738
+ <h3 className="text-lg font-semibold !text-emerald-300">
739
+ Voice Assistant
740
+ </h3>
741
+ <div className="!space-y-4">
742
+ <div className="rounded-lg border border-white/10 bg-white/5 p-6">
743
+ <div className="overflow-hidden rounded-lg border border-white/20 bg-black/50">
744
+ <div className="border-b border-white/10 bg-gradient-to-r from-blue-500/20 to-purple-500/20 p-4">
745
+ <div className="text-center">
746
+ <div className="mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-full bg-white/10">
747
+ <VoicePlayingIcon className="h-8 w-8 text-blue-400" />
748
+ </div>
749
+ <h4 className="text-lg font-semibold text-white">
750
+ AI Assistant
751
+ </h4>
752
+ <p className="text-sm text-blue-400">
753
+ Listening and responding...
754
+ </p>
755
+ </div>
756
+ </div>
757
+ <div className="space-y-3 p-4">
758
+ <div className="rounded-lg bg-white/5 p-3">
759
+ <div className="mb-2 flex items-center gap-2">
760
+ <span className="text-xs text-white/60">
761
+ You said:
762
+ </span>
763
+ </div>
764
+ <p className="text-sm text-white">
765
+ "What's the weather like today?"
766
+ </p>
767
+ </div>
768
+ <div className="rounded-lg border border-blue-500/20 bg-blue-500/10 p-3">
769
+ <div className="mb-2 flex items-center gap-2">
770
+ <VoicePlayingIcon className="h-3 w-3 text-blue-400" />
771
+ <span className="text-xs text-blue-400">
772
+ Assistant responding:
773
+ </span>
774
+ </div>
775
+ <p className="text-sm text-white">
776
+ Today's weather is sunny with a high of 72°F and
777
+ a low of 58°F. Perfect day for outdoor
778
+ activities!
779
+ </p>
780
+ </div>
781
+ <div className="text-center">
782
+ <button className="rounded-lg border border-blue-500/30 bg-blue-500/20 px-4 py-2 text-blue-300 transition-colors hover:bg-blue-500/30">
783
+ Tap to speak again
784
+ </button>
785
+ </div>
786
+ </div>
787
+ </div>
788
+ </div>
789
+ <div className="rounded-lg bg-black/40 p-4">
790
+ <pre className="overflow-x-auto text-sm !text-green-300">
791
+ {`// Voice assistant with speech indicators
792
+ <div className="voice-assistant">
793
+ <div className="assistant-avatar">
794
+ <div className="avatar-circle">
795
+ <VoicePlayingIcon
796
+ className={isResponding
797
+ ? "h-8 w-8 text-blue-400 animate-pulse"
798
+ : "h-8 w-8 text-white/40"
799
+ }
800
+ />
801
+ </div>
802
+ <div className="assistant-info">
803
+ <h3>AI Assistant</h3>
804
+ <p className={isResponding ? "text-blue-400" : "text-white/60"}>
805
+ {isResponding ? "Listening and responding..." : "Ready to help"}
806
+ </p>
807
+ </div>
808
+ </div>
809
+ <div className="conversation-history">
810
+ {messages.map(message => (
811
+ <div key={message.id} className="message">
812
+ {message.type === 'assistant' && (
813
+ <div className="assistant-message">
814
+ <div className="message-header">
815
+ <VoicePlayingIcon className="h-3 w-3 text-blue-400" />
816
+ <span>Assistant responding:</span>
817
+ </div>
818
+ <p className="message-text">{message.text}</p>
819
+ </div>
820
+ )}
821
+ </div>
822
+ ))}
823
+ </div>
824
+ <VoiceInput
825
+ isListening={isListening}
826
+ onSpeechStart={handleSpeechStart}
827
+ onSpeechEnd={handleSpeechEnd}
828
+ />
829
+ </div>`}
830
+ </pre>
831
+ </div>
832
+ </div>
833
+ </div>
834
+
835
+ {/* Audio Recording */}
836
+ <div className="!space-y-4">
837
+ <h3 className="text-lg font-semibold !text-emerald-300">
838
+ Audio Recording Studio
839
+ </h3>
840
+ <div className="!space-y-4">
841
+ <div className="rounded-lg border border-white/10 bg-white/5 p-6">
842
+ <div className="overflow-hidden rounded-lg border border-white/20 bg-black/50">
843
+ <div className="border-b border-white/10 bg-white/5 p-4">
844
+ <div className="flex items-center justify-between">
845
+ <h4 className="text-lg font-semibold text-white">
846
+ Audio Studio
847
+ </h4>
848
+ <div className="flex items-center gap-2">
849
+ <div className="h-3 w-3 animate-pulse rounded-full bg-red-500"></div>
850
+ <span className="text-sm text-red-400">
851
+ Recording
852
+ </span>
853
+ </div>
854
+ </div>
855
+ </div>
856
+ <div className="space-y-4 p-4">
857
+ <div className="grid grid-cols-4 gap-3">
858
+ <div className="rounded-lg border border-green-500/20 bg-green-500/10 p-3 text-center">
859
+ <VoicePlayingIcon className="mx-auto mb-2 h-6 w-6 text-green-400" />
860
+ <div className="text-xs text-white">
861
+ Track 1
862
+ </div>
863
+ <div className="text-xs text-green-400">
864
+ Active
865
+ </div>
866
+ </div>
867
+ <div className="rounded-lg border border-white/10 bg-white/5 p-3 text-center">
868
+ <VoicePlayingIcon className="mx-auto mb-2 h-6 w-6 text-white/40" />
869
+ <div className="text-xs text-white">
870
+ Track 2
871
+ </div>
872
+ <div className="text-xs text-white/40">
873
+ Muted
874
+ </div>
875
+ </div>
876
+ <div className="rounded-lg border border-purple-500/20 bg-purple-500/10 p-3 text-center">
877
+ <VoicePlayingIcon className="mx-auto mb-2 h-6 w-6 text-purple-400" />
878
+ <div className="text-xs text-white">
879
+ Track 3
880
+ </div>
881
+ <div className="text-xs text-purple-400">
882
+ Monitor
883
+ </div>
884
+ </div>
885
+ <div className="rounded-lg border border-white/10 bg-white/5 p-3 text-center">
886
+ <VoicePlayingIcon className="mx-auto mb-2 h-6 w-6 text-white/40" />
887
+ <div className="text-xs text-white">
888
+ Track 4
889
+ </div>
890
+ <div className="text-xs text-white/40">
891
+ Standby
892
+ </div>
893
+ </div>
894
+ </div>
895
+ <div className="flex items-center justify-between">
896
+ <div className="flex items-center gap-3">
897
+ <button className="rounded border border-red-500/30 bg-red-500/20 px-4 py-2 text-red-400 transition-colors hover:bg-red-500/30">
898
+ Stop Recording
899
+ </button>
900
+ <button className="rounded border border-white/20 bg-white/10 px-4 py-2 text-white transition-colors hover:bg-white/20">
901
+ Playback
902
+ </button>
903
+ </div>
904
+ <div className="text-sm text-white/60">
905
+ Recording: 02:34
906
+ </div>
907
+ </div>
908
+ </div>
909
+ </div>
910
+ </div>
911
+ <div className="rounded-lg bg-black/40 p-4">
912
+ <pre className="overflow-x-auto text-sm !text-green-300">
913
+ {`// Multi-track audio recording studio
914
+ <div className="audio-studio">
915
+ <div className="studio-header">
916
+ <h3>Audio Studio</h3>
917
+ <RecordingStatus isRecording={isRecording} />
918
+ </div>
919
+ <div className="track-grid">
920
+ {audioTracks.map((track, index) => (
921
+ <div key={track.id} className="audio-track">
922
+ <VoicePlayingIcon
923
+ className={
924
+ track.status === 'active'
925
+ ? 'h-6 w-6 text-green-400'
926
+ : track.status === 'monitoring'
927
+ ? 'h-6 w-6 text-purple-400'
928
+ : 'h-6 w-6 text-white/40'
929
+ }
930
+ />
931
+ <div className="track-info">
932
+ <div className="track-name">Track {index + 1}</div>
933
+ <div className="track-status">{track.status}</div>
934
+ </div>
935
+ <TrackControls
936
+ track={track}
937
+ onMute={handleMute}
938
+ onSolo={handleSolo}
939
+ onRecord={handleRecord}
940
+ />
941
+ </div>
942
+ ))}
943
+ </div>
944
+ <RecordingControls
945
+ isRecording={isRecording}
946
+ recordingTime={recordingTime}
947
+ onRecord={toggleRecording}
948
+ onPlayback={startPlayback}
949
+ />
950
+ </div>`}
951
+ </pre>
952
+ </div>
953
+ </div>
954
+ </div>
955
+ </div>
956
+ </div>
957
+
958
+ {/* Accessibility */}
959
+ <div className="!space-y-8">
960
+ <h2 className="text-center text-3xl font-bold !text-white">
961
+ Accessibility Features
962
+ </h2>
963
+ <div className="grid grid-cols-1 gap-8 md:grid-cols-2">
964
+ <div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
965
+ <h3 className="text-lg font-semibold !text-green-300">
966
+ ✅ Built-in Features
967
+ </h3>
968
+ <ul className="!space-y-2 text-sm !text-white/70">
969
+ <li className="!text-white/70">
970
+ Uses Radix UI AccessibleIcon wrapper
971
+ </li>
972
+ <li className="!text-white/70">
973
+ Provides screen reader label "Voice playing icon"
974
+ </li>
975
+ <li className="!text-white/70">
976
+ Supports keyboard navigation when interactive
977
+ </li>
978
+ <li className="!text-white/70">
979
+ High contrast colors for visual accessibility
980
+ </li>
981
+ <li className="!text-white/70">
982
+ Square strokeLinecap for crisp audio bar appearance
983
+ </li>
984
+ </ul>
985
+ </div>
986
+
987
+ <div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
988
+ <h3 className="text-lg font-semibold !text-emerald-300">
989
+ 💡 Best Practices
990
+ </h3>
991
+ <ul className="!space-y-2 text-sm text-white/70">
992
+ <li className="!text-white/70">
993
+ Always announce playback state changes to screen readers
994
+ </li>
995
+ <li className="!text-white/70">
996
+ Provide audio level feedback for users with hearing aids
997
+ </li>
998
+ <li className="!text-white/70">
999
+ Use consistent animation timing for predictable behavior
1000
+ </li>
1001
+ <li className="!text-white/70">
1002
+ Consider reduced motion preferences for animations
1003
+ </li>
1004
+ <li className="!text-white/70">
1005
+ Pair with text labels for clearer context
1006
+ </li>
1007
+ </ul>
1008
+ </div>
1009
+ </div>
1010
+
1011
+ <div className="rounded-lg border border-white/10 bg-white/5 p-6">
1012
+ <h3 className="mb-4 text-lg font-semibold !text-blue-300">
1013
+ Proper ARIA Implementation
1014
+ </h3>
1015
+ <div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
1016
+ <div className="rounded-lg bg-black/40 p-4">
1017
+ <pre className="overflow-x-auto text-sm !text-cyan-300">
1018
+ {`// Voice message with playback status
1019
+ <div className="voice-message">
1020
+ <button
1021
+ aria-label={isPlaying ? 'Pause voice message' : 'Play voice message'}
1022
+ aria-pressed={isPlaying}
1023
+ onClick={togglePlayback}
1024
+ >
1025
+ {isPlaying ? (
1026
+ <VoicePlayingIcon className="h-4 w-4 text-emerald-400" />
1027
+ ) : (
1028
+ <PlayIcon className="h-4 w-4 text-white/60" />
1029
+ )}
1030
+ </button>
1031
+ <div
1032
+ role="progressbar"
1033
+ aria-valuenow={playbackProgress}
1034
+ aria-valuemin={0}
1035
+ aria-valuemax={100}
1036
+ aria-label="Voice message playback progress"
1037
+ >
1038
+ <ProgressBar progress={playbackProgress} />
1039
+ </div>
1040
+ </div>
1041
+
1042
+ // Live audio indicator
1043
+ <div
1044
+ role="status"
1045
+ aria-live="polite"
1046
+ aria-label="Audio status indicator"
1047
+ >
1048
+ <VoicePlayingIcon
1049
+ className="h-5 w-5 text-emerald-400"
1050
+ aria-hidden="true"
1051
+ />
1052
+ <span className="sr-only">
1053
+ {isActive ? 'Audio is currently playing' : 'Audio is paused'}
1054
+ </span>
1055
+ </div>
1056
+
1057
+ // Voice assistant response
1058
+ <div
1059
+ role="region"
1060
+ aria-label="Assistant response"
1061
+ aria-live="assertive"
1062
+ >
1063
+ <div className="response-header">
1064
+ <VoicePlayingIcon className="h-3 w-3 text-blue-400" />
1065
+ <span>Assistant responding:</span>
1066
+ </div>
1067
+ <p className="response-text">{assistantMessage}</p>
1068
+ </div>
1069
+
1070
+ // Recording studio track
1071
+ <div
1072
+ className="audio-track"
1073
+ role="group"
1074
+ aria-label={track.name + " audio track"}
1075
+ >
1076
+ <VoicePlayingIcon
1077
+ className={track.active ? 'text-green-400' : 'text-white/40'}
1078
+ aria-hidden="true"
1079
+ />
1080
+ <div className="track-controls">
1081
+ <button
1082
+ aria-label={track.active ? 'Mute track' : 'Unmute track'}
1083
+ aria-pressed={track.muted}
1084
+ onClick={() => toggleMute(track.id)}
1085
+ >
1086
+ {track.muted ? 'Unmute' : 'Mute'}
1087
+ </button>
1088
+ </div>
1089
+ </div>`}
1090
+ </pre>
1091
+ </div>
1092
+ <div className="!space-y-4">
1093
+ <p className="text-sm !text-white/70">
1094
+ When using VoicePlayingIcon for audio interfaces, always
1095
+ provide clear context about playback state and ensure
1096
+ users can understand what audio is currently active.
1097
+ </p>
1098
+ <div className="rounded-lg border border-emerald-500/20 bg-emerald-500/10 p-4">
1099
+ <div className="flex items-center gap-2 text-sm text-emerald-200">
1100
+ <VoicePlayingIcon className="h-4 w-4" />
1101
+ <span>
1102
+ Use aria-live regions to announce audio state
1103
+ changes for screen readers
1104
+ </span>
1105
+ </div>
1106
+ </div>
1107
+ </div>
1108
+ </div>
1109
+ </div>
1110
+ </div>
1111
+
1112
+ {/* Related Icons */}
1113
+ <div className="!space-y-8">
1114
+ <h2 className="text-center text-3xl font-bold !text-white">
1115
+ Related Icons
1116
+ </h2>
1117
+ <div className="grid grid-cols-2 gap-6 md:grid-cols-4">
1118
+ <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
1119
+ <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-blue-500/20">
1120
+ <span className="!text-2xl !text-white">▶️</span>
1121
+ </div>
1122
+ <div>
1123
+ <div className="font-medium text-white">PlayIcon</div>
1124
+ <div className="text-xs text-white/60">
1125
+ Start playback
1126
+ </div>
1127
+ </div>
1128
+ </div>
1129
+ <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
1130
+ <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-red-500/20">
1131
+ <span className="!text-2xl !text-white">⏸️</span>
1132
+ </div>
1133
+ <div>
1134
+ <div className="font-medium text-white">PauseIcon</div>
1135
+ <div className="text-xs text-white/60">
1136
+ Pause playback
1137
+ </div>
1138
+ </div>
1139
+ </div>
1140
+ <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
1141
+ <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-purple-500/20">
1142
+ <span className="!text-2xl !text-white">🎙️</span>
1143
+ </div>
1144
+ <div>
1145
+ <div className="font-medium text-white">
1146
+ MicrophoneIcon
1147
+ </div>
1148
+ <div className="text-xs text-white/60">Voice input</div>
1149
+ </div>
1150
+ </div>
1151
+ <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
1152
+ <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-green-500/20">
1153
+ <span className="!text-2xl !text-white">🔊</span>
1154
+ </div>
1155
+ <div>
1156
+ <div className="font-medium text-white">VolumeIcon</div>
1157
+ <div className="text-xs text-white/60">Audio levels</div>
1158
+ </div>
1159
+ </div>
1160
+ </div>
1161
+ </div>
1162
+ </div>
1163
+
1164
+ {/* Footer */}
1165
+ <div className="border-t border-white/10 bg-black/20 backdrop-blur-xl">
1166
+ <div className="!mx-auto max-w-7xl px-6 py-8">
1167
+ <div className="!space-y-4 text-center">
1168
+ <p className="!text-white/60">
1169
+ VoicePlayingIcon is part of the Aural UI icon library, built
1170
+ with accessibility and audio interface best practices in
1171
+ mind.
1172
+ </p>
1173
+ <p className="text-sm !text-white/40">
1174
+ All icons use Radix UI's AccessibleIcon for screen reader
1175
+ compatibility and follow WCAG guidelines for audio controls
1176
+ and playback states.
1177
+ </p>
1178
+ </div>
1179
+ </div>
1180
+ </div>
1181
+ </div>
1182
+ </>
1183
+ ),
1184
+ },
1185
+ },
1186
+ tags: ["autodocs"],
1187
+ argTypes: {
1188
+ width: {
1189
+ control: { type: "range", min: 8, max: 96, step: 2 },
1190
+ description: "Width of the icon in pixels",
1191
+ },
1192
+ height: {
1193
+ control: { type: "range", min: 8, max: 96, step: 2 },
1194
+ description: "Height of the icon in pixels",
1195
+ },
1196
+ stroke: {
1197
+ control: "color",
1198
+ description: "Stroke color of the audio bars",
1199
+ },
1200
+ strokeWidth: {
1201
+ control: { type: "range", min: 0.5, max: 4, step: 0.5 },
1202
+ description: "Width of the audio bar strokes",
1203
+ },
1204
+ strokeLinecap: {
1205
+ control: { type: "select" },
1206
+ options: ["round", "square", "butt"],
1207
+ description: "Style of line endings",
1208
+ },
1209
+ className: {
1210
+ control: "text",
1211
+ description: "CSS classes for styling and animations",
1212
+ },
1213
+ onClick: {
1214
+ action: "clicked",
1215
+ description: "Click handler for interactive use",
1216
+ },
1217
+ },
1218
+ }
1219
+
1220
+ export default meta
1221
+ type Story = StoryObj<typeof VoicePlayingIcon>
1222
+
1223
+ // Story parameters for consistent dark theme
1224
+ const storyParameters = {
1225
+ backgrounds: {
1226
+ default: "dark",
1227
+ values: [
1228
+ { name: "dark", value: "#0a0a0a" },
1229
+ { name: "darker", value: "#000000" },
1230
+ ],
1231
+ },
1232
+ }
1233
+
1234
+ export const Default: Story = {
1235
+ args: {
1236
+ className: "h-8 w-8 text-emerald-400",
1237
+ },
1238
+ parameters: storyParameters,
1239
+ render: (args) => (
1240
+ <div className="flex h-32 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
1241
+ <VoicePlayingIcon {...args} />
1242
+ </div>
1243
+ ),
1244
+ }
1245
+
1246
+ export const SizeVariations: Story = {
1247
+ parameters: {
1248
+ ...storyParameters,
1249
+ docs: {
1250
+ description: {
1251
+ story:
1252
+ "VoicePlayingIcon in different sizes, from small inline indicators to large audio visualizations.",
1253
+ },
1254
+ },
1255
+ },
1256
+ render: () => (
1257
+ <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">
1258
+ <div className="text-center">
1259
+ <VoicePlayingIcon className="!mx-auto mb-2 h-3 w-3 text-emerald-400" />
1260
+ <span className="text-xs text-white/60">12px</span>
1261
+ </div>
1262
+ <div className="text-center">
1263
+ <VoicePlayingIcon className="!mx-auto mb-2 h-4 w-4 text-emerald-400" />
1264
+ <span className="text-xs text-white/60">16px</span>
1265
+ </div>
1266
+ <div className="text-center">
1267
+ <VoicePlayingIcon className="!mx-auto mb-2 h-5 w-5 text-emerald-400" />
1268
+ <span className="text-xs text-white/60">20px</span>
1269
+ </div>
1270
+ <div className="text-center">
1271
+ <VoicePlayingIcon className="!mx-auto mb-2 h-6 w-6 text-emerald-400" />
1272
+ <span className="text-xs text-white/60">24px</span>
1273
+ </div>
1274
+ <div className="text-center">
1275
+ <VoicePlayingIcon className="!mx-auto mb-2 h-8 w-8 text-emerald-400" />
1276
+ <span className="text-xs text-white/60">32px</span>
1277
+ </div>
1278
+ <div className="text-center">
1279
+ <VoicePlayingIcon className="!mx-auto mb-2 h-12 w-12 text-emerald-400" />
1280
+ <span className="text-xs text-white/60">48px</span>
1281
+ </div>
1282
+ </div>
1283
+ ),
1284
+ }
1285
+
1286
+ export const ColorVariations: Story = {
1287
+ parameters: {
1288
+ ...storyParameters,
1289
+ docs: {
1290
+ description: {
1291
+ story:
1292
+ "VoicePlayingIcon in different semantic colors for various audio and voice applications.",
1293
+ },
1294
+ },
1295
+ },
1296
+ render: () => (
1297
+ <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">
1298
+ <div className="text-center">
1299
+ <div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-emerald-500/30 bg-emerald-500/20">
1300
+ <VoicePlayingIcon className="h-8 w-8 text-emerald-400" />
1301
+ </div>
1302
+ <div className="text-sm font-medium text-white">Voice Active</div>
1303
+ <div className="text-xs text-emerald-400">text-emerald-400</div>
1304
+ </div>
1305
+ <div className="text-center">
1306
+ <div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-blue-500/30 bg-blue-500/20">
1307
+ <VoicePlayingIcon className="h-8 w-8 text-blue-400" />
1308
+ </div>
1309
+ <div className="text-sm font-medium text-white">Audio Playback</div>
1310
+ <div className="text-xs text-blue-400">text-blue-400</div>
1311
+ </div>
1312
+ <div className="text-center">
1313
+ <div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-purple-500/30 bg-purple-500/20">
1314
+ <VoicePlayingIcon className="h-8 w-8 text-purple-400" />
1315
+ </div>
1316
+ <div className="text-sm font-medium text-white">Live Recording</div>
1317
+ <div className="text-xs text-purple-400">text-purple-400</div>
1318
+ </div>
1319
+ <div className="text-center">
1320
+ <div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-orange-500/30 bg-orange-500/20">
1321
+ <VoicePlayingIcon className="h-8 w-8 text-orange-400" />
1322
+ </div>
1323
+ <div className="text-sm font-medium text-white">Music Playing</div>
1324
+ <div className="text-xs text-orange-400">text-orange-400</div>
1325
+ </div>
1326
+ </div>
1327
+ ),
1328
+ }
1329
+
1330
+ export const UsageExamples: Story = {
1331
+ parameters: {
1332
+ ...storyParameters,
1333
+ docs: {
1334
+ description: {
1335
+ story:
1336
+ "Real-world usage examples showing VoicePlayingIcon in different audio and voice contexts.",
1337
+ },
1338
+ },
1339
+ },
1340
+ render: () => (
1341
+ <div className="min-h-dvh !space-y-8 rounded-lg bg-gradient-to-br from-gray-900 to-gray-800 p-8">
1342
+ {/* Voice Message */}
1343
+ <div className="!space-y-2">
1344
+ <h3 className="text-sm font-medium text-white">Voice Message Player</h3>
1345
+ <div className="rounded-lg border border-white/10 bg-white/5 p-4">
1346
+ <div className="flex items-center gap-3 rounded-lg border border-emerald-500/20 bg-emerald-500/10 p-3">
1347
+ <button className="rounded border border-emerald-500/30 bg-emerald-500/20 p-1.5 transition-colors hover:bg-emerald-500/30">
1348
+ <VoicePlayingIcon className="h-4 w-4 text-emerald-400" />
1349
+ </button>
1350
+ <div className="flex-1">
1351
+ <div className="mb-1 flex items-center justify-between">
1352
+ <span className="text-sm font-medium text-white">
1353
+ Voice Message
1354
+ </span>
1355
+ <span className="text-xs text-white/60">2:34</span>
1356
+ </div>
1357
+ <div className="h-1 overflow-hidden rounded-full bg-white/10">
1358
+ <div
1359
+ className="h-full rounded-full bg-emerald-400"
1360
+ style={{ width: "45%" }}
1361
+ ></div>
1362
+ </div>
1363
+ </div>
1364
+ </div>
1365
+ </div>
1366
+ </div>
1367
+
1368
+ {/* Podcast Player */}
1369
+ <div className="!space-y-2">
1370
+ <h3 className="text-sm font-medium text-white">Podcast Player</h3>
1371
+ <div className="rounded-lg border border-white/10 bg-white/5 p-4">
1372
+ <div className="flex items-center gap-3 rounded border border-white/10 bg-black/30 p-3">
1373
+ <div className="flex h-12 w-12 items-center justify-center rounded-lg bg-purple-500/20">
1374
+ <span className="text-lg">🎙️</span>
1375
+ </div>
1376
+ <div className="flex-1">
1377
+ <div className="text-sm font-medium text-white">
1378
+ Tech Talk Daily
1379
+ </div>
1380
+ <div className="mt-1 flex items-center gap-2">
1381
+ <VoicePlayingIcon className="h-4 w-4 text-emerald-400" />
1382
+ <span className="text-xs text-emerald-400">Now Playing</span>
1383
+ <span className="text-xs text-white/60">15:32 / 45:20</span>
1384
+ </div>
1385
+ </div>
1386
+ </div>
1387
+ </div>
1388
+ </div>
1389
+ </div>
1390
+ ),
1391
+ }
1392
+
1393
+ export const Playground: Story = {
1394
+ parameters: {
1395
+ ...storyParameters,
1396
+ docs: {
1397
+ description: {
1398
+ story:
1399
+ "Interactive playground to experiment with different VoicePlayingIcon configurations.",
1400
+ },
1401
+ },
1402
+ },
1403
+ args: {
1404
+ width: 24,
1405
+ height: 24,
1406
+ className: "text-emerald-400",
1407
+ strokeLinecap: "square",
1408
+ },
1409
+ render: (args) => (
1410
+ <div className="flex h-64 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
1411
+ <div className="rounded-lg border border-white/10 bg-white/5 p-8">
1412
+ <VoicePlayingIcon {...args} />
1413
+ </div>
1414
+ </div>
1415
+ ),
1416
+ }