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