aural-ui 4.0.1 → 4.1.0

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