aural-ui 2.1.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/icons/apple-logo-icon/AppleLogoIcon.stories.tsx +952 -0
- package/dist/icons/apple-logo-icon/index.tsx +26 -0
- package/dist/icons/apple-logo-icon/meta.ts +8 -0
- package/dist/icons/arrow-left-icon/ArrowLeftIcon.stories.tsx +1008 -0
- package/dist/icons/arrow-left-icon/index.tsx +24 -0
- package/dist/icons/arrow-left-icon/meta.ts +8 -0
- package/dist/icons/backward-ten-seconds-icon/BackwardTenSecondsIcon.stories.tsx +1050 -0
- package/dist/icons/backward-ten-seconds-icon/index.tsx +35 -0
- package/dist/icons/backward-ten-seconds-icon/meta.ts +8 -0
- package/dist/icons/camera-icon/CameraIcon.stories.tsx +1271 -0
- package/dist/icons/camera-icon/index.tsx +22 -0
- package/dist/icons/camera-icon/meta.ts +8 -0
- package/dist/icons/coin-icon/CoinIcon.stories.tsx +1382 -0
- package/dist/icons/coin-icon/index.tsx +36 -0
- package/dist/icons/coin-icon/meta.ts +8 -0
- package/dist/icons/email-icon/EmailIcon.stories.tsx +995 -0
- package/dist/icons/email-icon/index.tsx +22 -0
- package/dist/icons/email-icon/meta.ts +8 -0
- package/dist/icons/expand-icon/ExpandIcon.stories.tsx +1167 -0
- package/dist/icons/expand-icon/index.tsx +22 -0
- package/dist/icons/expand-icon/meta.ts +8 -0
- package/dist/icons/forward-ten-seconds-icon/ForwardTenSecondsIcon.stories.tsx +1054 -0
- package/dist/icons/forward-ten-seconds-icon/index.tsx +33 -0
- package/dist/icons/forward-ten-seconds-icon/meta.ts +8 -0
- package/dist/icons/google-logo-icon/GoogleLogoIcon.stories.tsx +1004 -0
- package/dist/icons/google-logo-icon/index.tsx +34 -0
- package/dist/icons/google-logo-icon/meta.ts +8 -0
- package/dist/icons/heart-icon/HeartIcon.stories.tsx +1080 -0
- package/dist/icons/heart-icon/index.tsx +21 -0
- package/dist/icons/heart-icon/meta.ts +8 -0
- package/dist/icons/index.ts +32 -4
- package/dist/icons/indian-flag-icon/IndianFlagIcon.stories.tsx +1020 -0
- package/dist/icons/indian-flag-icon/index.tsx +46 -0
- package/dist/icons/indian-flag-icon/meta.ts +8 -0
- package/dist/icons/instagram-icon/InstagramIcon.stories.tsx +1449 -0
- package/dist/icons/instagram-icon/index.tsx +17 -0
- package/dist/icons/instagram-icon/meta.ts +8 -0
- package/dist/icons/linked-in-icon/LinkedInIcon.stories.tsx +1582 -0
- package/dist/icons/linked-in-icon/index.tsx +17 -0
- package/dist/icons/linked-in-icon/meta.ts +8 -0
- package/dist/icons/minimize-icon/MinimizeIcon.stories.tsx +1214 -0
- package/dist/icons/minimize-icon/index.tsx +22 -0
- package/dist/icons/minimize-icon/meta.ts +8 -0
- package/dist/icons/pause-icon/PauseIcon.stories.tsx +1060 -0
- package/dist/icons/pause-icon/index.tsx +30 -0
- package/dist/icons/pause-icon/meta.ts +8 -0
- package/dist/icons/share-icon/ShareIcon.stories.tsx +1081 -0
- package/dist/icons/share-icon/index.tsx +22 -0
- package/dist/icons/share-icon/meta.ts +8 -0
- package/dist/icons/skip-backward-icon/SkipBackwardIcon.stories.tsx +1047 -0
- package/dist/icons/skip-backward-icon/index.tsx +29 -0
- package/dist/icons/skip-backward-icon/meta.ts +8 -0
- package/dist/icons/skip-forward-icon/SkipForwardIcon.stories.tsx +1049 -0
- package/dist/icons/skip-forward-icon/index.tsx +29 -0
- package/dist/icons/skip-forward-icon/meta.ts +8 -0
- package/dist/icons/store-coin-icon/StoreCoinIcon.stories.tsx +1020 -0
- package/dist/icons/store-coin-icon/index.tsx +35 -0
- package/dist/icons/store-coin-icon/meta.ts +8 -0
- package/dist/icons/threads-icon/ThreadsIcon.stories.tsx +1489 -0
- package/dist/icons/threads-icon/index.tsx +17 -0
- package/dist/icons/threads-icon/meta.ts +8 -0
- package/dist/icons/twitter-x-icon/TwitterXIcon.stories.tsx +1463 -0
- package/dist/icons/twitter-x-icon/index.tsx +17 -0
- package/dist/icons/twitter-x-icon/meta.ts +8 -0
- package/dist/icons/video-play-list-icon/VideoPlaylistIcon.stories.tsx +1105 -0
- package/dist/icons/video-play-list-icon/index.tsx +22 -0
- package/dist/icons/video-play-list-icon/meta.ts +8 -0
- package/dist/icons/voice-playing-icon/VoicePlayingIcon.stories.tsx +1416 -0
- package/dist/icons/voice-playing-icon/index.tsx +24 -0
- package/dist/icons/voice-playing-icon/meta.ts +8 -0
- package/dist/icons/volume-full-icon/VolumeFullIcon.stories.tsx +1230 -0
- package/dist/icons/volume-full-icon/index.tsx +25 -0
- package/dist/icons/volume-full-icon/meta.ts +8 -0
- package/dist/icons/volume-half-icon/VolumeHalfIcon.stories.tsx +1153 -0
- package/dist/icons/volume-half-icon/index.tsx +25 -0
- package/dist/icons/volume-half-icon/meta.ts +8 -0
- package/dist/icons/volume-off-icon/VolumeOffIcon.stories.tsx +1144 -0
- package/dist/icons/volume-off-icon/index.tsx +26 -0
- package/dist/icons/volume-off-icon/meta.ts +8 -0
- package/dist/icons/warning-icon/WarningIcon.stories.tsx +1106 -0
- package/dist/icons/warning-icon/index.tsx +27 -0
- package/dist/icons/warning-icon/meta.ts +8 -0
- package/dist/icons/youtube-icon/YoutubeIcon.stories.tsx +996 -0
- package/dist/icons/youtube-icon/index.tsx +24 -0
- package/dist/icons/youtube-icon/meta.ts +8 -0
- package/dist/index.js +1 -1
- package/dist/styles/aural-theme.css +9 -0
- package/package.json +1 -1
|
@@ -0,0 +1,1060 @@
|
|
|
1
|
+
import React from "react"
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
3
|
+
|
|
4
|
+
import { PauseIcon } from "."
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof PauseIcon> = {
|
|
7
|
+
title: "Icons/PauseIcon",
|
|
8
|
+
component: PauseIcon,
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: "fullscreen",
|
|
11
|
+
backgrounds: {
|
|
12
|
+
default: "dark",
|
|
13
|
+
values: [
|
|
14
|
+
{ name: "dark", value: "#0a0a0a" },
|
|
15
|
+
{ name: "darker", value: "#000000" },
|
|
16
|
+
{ name: "light", value: "#ffffff" },
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
docs: {
|
|
20
|
+
page: () => (
|
|
21
|
+
<>
|
|
22
|
+
{/* Override default docs styling */}
|
|
23
|
+
<style>
|
|
24
|
+
{`
|
|
25
|
+
.sbdocs-wrapper {
|
|
26
|
+
padding: 0 ;
|
|
27
|
+
max-width: none ;
|
|
28
|
+
background: transparent ;
|
|
29
|
+
}
|
|
30
|
+
.sbdocs-content {
|
|
31
|
+
max-width: none ;
|
|
32
|
+
padding: 0 ;
|
|
33
|
+
margin: 0 ;
|
|
34
|
+
background: transparent ;
|
|
35
|
+
}
|
|
36
|
+
.docs-story {
|
|
37
|
+
background: transparent ;
|
|
38
|
+
}
|
|
39
|
+
.sbdocs {
|
|
40
|
+
background: transparent ;
|
|
41
|
+
}
|
|
42
|
+
body {
|
|
43
|
+
background: #0a0a0a ;
|
|
44
|
+
}
|
|
45
|
+
#storybook-docs {
|
|
46
|
+
background: #0a0a0a ;
|
|
47
|
+
}
|
|
48
|
+
.sbdocs-preview {
|
|
49
|
+
background: transparent ;
|
|
50
|
+
border: none ;
|
|
51
|
+
}
|
|
52
|
+
.sbdocs-h1, .sbdocs-h2, .sbdocs-h3, .sbdocs-h4, .sbdocs-h5, .sbdocs-h6 {
|
|
53
|
+
color: white ;
|
|
54
|
+
}
|
|
55
|
+
.sbdocs-p, .sbdocs-li {
|
|
56
|
+
color: rgba(255, 255, 255, 0.7) ;
|
|
57
|
+
}
|
|
58
|
+
.sbdocs-code {
|
|
59
|
+
background: rgba(255, 255, 255, 0.1) ;
|
|
60
|
+
color: rgba(168, 85, 247, 1) ;
|
|
61
|
+
border: 1px solid rgba(255, 255, 255, 0.1) ;
|
|
62
|
+
}
|
|
63
|
+
.sbdocs-pre {
|
|
64
|
+
background: rgba(0, 0, 0, 0.4) ;
|
|
65
|
+
border: 1px solid rgba(255, 255, 255, 0.1) ;
|
|
66
|
+
}
|
|
67
|
+
.sbdocs-table {
|
|
68
|
+
background: rgba(255, 255, 255, 0.05) ;
|
|
69
|
+
border: 1px solid rgba(255, 255, 255, 0.1) ;
|
|
70
|
+
}
|
|
71
|
+
.sbdocs-table th {
|
|
72
|
+
background: rgba(255, 255, 255, 0.05) ;
|
|
73
|
+
color: white ;
|
|
74
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.1) ;
|
|
75
|
+
}
|
|
76
|
+
.sbdocs-table td {
|
|
77
|
+
color: rgba(255, 255, 255, 0.7) ;
|
|
78
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.05) ;
|
|
79
|
+
}
|
|
80
|
+
`}
|
|
81
|
+
</style>
|
|
82
|
+
|
|
83
|
+
<div className="min-h-screen bg-gradient-to-br from-gray-900 via-red-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-red-500/10 via-transparent to-rose-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-red-500/30 bg-gradient-to-br from-red-500/20 to-rose-500/20">
|
|
90
|
+
<PauseIcon className="h-12 w-12 text-red-400" />
|
|
91
|
+
</div>
|
|
92
|
+
<h1 className="text-5xl font-bold !text-white">PauseIcon</h1>
|
|
93
|
+
<p className="!mx-auto max-w-3xl text-xl leading-relaxed !text-white/70">
|
|
94
|
+
A universal pause control icon for media interfaces.
|
|
95
|
+
Features the classic two-bar pause design, essential for
|
|
96
|
+
music players, video platforms, podcast apps, and any media
|
|
97
|
+
control interface where users need to pause playback.
|
|
98
|
+
</p>
|
|
99
|
+
|
|
100
|
+
{/* Stats */}
|
|
101
|
+
<div className="flex items-center justify-center gap-8 pt-8">
|
|
102
|
+
<div className="text-center">
|
|
103
|
+
<div className="text-3xl font-bold text-red-300">
|
|
104
|
+
Pause Control
|
|
105
|
+
</div>
|
|
106
|
+
<div className="text-sm text-white/60">Stop playback</div>
|
|
107
|
+
</div>
|
|
108
|
+
<div className="h-8 w-px bg-white/20" />
|
|
109
|
+
<div className="text-center">
|
|
110
|
+
<div className="text-3xl font-bold text-rose-300">
|
|
111
|
+
Accessible
|
|
112
|
+
</div>
|
|
113
|
+
<div className="text-sm text-white/60">
|
|
114
|
+
Screen reader friendly
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
117
|
+
<div className="h-8 w-px bg-white/20" />
|
|
118
|
+
<div className="text-center">
|
|
119
|
+
<div className="text-3xl font-bold text-pink-300">
|
|
120
|
+
Universal
|
|
121
|
+
</div>
|
|
122
|
+
<div className="text-sm text-white/60">
|
|
123
|
+
Standard media control
|
|
124
|
+
</div>
|
|
125
|
+
</div>
|
|
126
|
+
</div>
|
|
127
|
+
</div>
|
|
128
|
+
</div>
|
|
129
|
+
</div>
|
|
130
|
+
|
|
131
|
+
{/* Content */}
|
|
132
|
+
<div className="!mx-auto max-w-7xl !space-y-16 px-6 py-12">
|
|
133
|
+
{/* Quick Usage */}
|
|
134
|
+
<div className="!space-y-8">
|
|
135
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
136
|
+
Quick Start
|
|
137
|
+
</h2>
|
|
138
|
+
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
139
|
+
<div className="!space-y-4">
|
|
140
|
+
<h3 className="text-xl font-semibold !text-red-300">
|
|
141
|
+
Basic Usage
|
|
142
|
+
</h3>
|
|
143
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
144
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
145
|
+
{`import { PauseIcon } from "@icons/pause-icon"
|
|
146
|
+
|
|
147
|
+
function MediaPlayer() {
|
|
148
|
+
return (
|
|
149
|
+
<button
|
|
150
|
+
onClick={pausePlayback}
|
|
151
|
+
className="p-2 hover:bg-white/10 rounded-lg"
|
|
152
|
+
>
|
|
153
|
+
<PauseIcon className="h-6 w-6 text-red-400" />
|
|
154
|
+
</button>
|
|
155
|
+
)
|
|
156
|
+
}`}
|
|
157
|
+
</pre>
|
|
158
|
+
</div>
|
|
159
|
+
</div>
|
|
160
|
+
|
|
161
|
+
<div className="!space-y-4">
|
|
162
|
+
<h3 className="text-xl font-semibold !text-red-300">
|
|
163
|
+
Live Preview
|
|
164
|
+
</h3>
|
|
165
|
+
<div className="flex h-32 items-center justify-center rounded-lg border border-white/10 bg-white/5">
|
|
166
|
+
<button className="rounded-lg border border-red-500/20 bg-red-500/10 p-3 transition-colors hover:bg-red-500/20">
|
|
167
|
+
<PauseIcon className="h-6 w-6 text-red-400" />
|
|
168
|
+
</button>
|
|
169
|
+
</div>
|
|
170
|
+
</div>
|
|
171
|
+
</div>
|
|
172
|
+
</div>
|
|
173
|
+
|
|
174
|
+
{/* Props Documentation */}
|
|
175
|
+
<div className="!space-y-8">
|
|
176
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
177
|
+
Props & Configuration
|
|
178
|
+
</h2>
|
|
179
|
+
|
|
180
|
+
<div className="overflow-hidden rounded-lg border border-white/10 bg-white/5">
|
|
181
|
+
<div className="bg-white/5 p-4">
|
|
182
|
+
<h3 className="text-xl font-semibold !text-white">Props</h3>
|
|
183
|
+
</div>
|
|
184
|
+
<table className="!my-0 w-full">
|
|
185
|
+
<thead className="bg-white/5">
|
|
186
|
+
<tr className="border-b border-white/10">
|
|
187
|
+
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
188
|
+
Prop
|
|
189
|
+
</th>
|
|
190
|
+
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
191
|
+
Type
|
|
192
|
+
</th>
|
|
193
|
+
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
194
|
+
Default
|
|
195
|
+
</th>
|
|
196
|
+
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
197
|
+
Description
|
|
198
|
+
</th>
|
|
199
|
+
</tr>
|
|
200
|
+
</thead>
|
|
201
|
+
<tbody>
|
|
202
|
+
<tr className="border-b border-white/5">
|
|
203
|
+
<td className="px-6 py-4 font-mono text-sm !text-red-300">
|
|
204
|
+
width
|
|
205
|
+
</td>
|
|
206
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
207
|
+
number | string
|
|
208
|
+
</td>
|
|
209
|
+
<td className="px-6 py-4 text-sm !text-white/50">24</td>
|
|
210
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
211
|
+
Width of the icon in pixels
|
|
212
|
+
</td>
|
|
213
|
+
</tr>
|
|
214
|
+
<tr className="border-b border-white/5 !bg-black/10">
|
|
215
|
+
<td className="px-6 py-4 font-mono text-sm !text-red-300">
|
|
216
|
+
height
|
|
217
|
+
</td>
|
|
218
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
219
|
+
number | string
|
|
220
|
+
</td>
|
|
221
|
+
<td className="px-6 py-4 text-sm !text-white/50">24</td>
|
|
222
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
223
|
+
Height of the icon in pixels
|
|
224
|
+
</td>
|
|
225
|
+
</tr>
|
|
226
|
+
<tr className="border-b border-white/5">
|
|
227
|
+
<td className="px-6 py-4 font-mono text-sm !text-red-300">
|
|
228
|
+
stroke
|
|
229
|
+
</td>
|
|
230
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
231
|
+
string
|
|
232
|
+
</td>
|
|
233
|
+
<td className="px-6 py-4 text-sm !text-white/50">
|
|
234
|
+
currentColor
|
|
235
|
+
</td>
|
|
236
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
237
|
+
Stroke color of the icon
|
|
238
|
+
</td>
|
|
239
|
+
</tr>
|
|
240
|
+
<tr className="border-b border-white/5 !bg-black/10">
|
|
241
|
+
<td className="px-6 py-4 font-mono text-sm !text-red-300">
|
|
242
|
+
strokeWidth
|
|
243
|
+
</td>
|
|
244
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
245
|
+
string | number
|
|
246
|
+
</td>
|
|
247
|
+
<td className="px-6 py-4 text-sm !text-white/50">
|
|
248
|
+
1.5
|
|
249
|
+
</td>
|
|
250
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
251
|
+
Width of the stroke
|
|
252
|
+
</td>
|
|
253
|
+
</tr>
|
|
254
|
+
<tr className="border-b border-white/5">
|
|
255
|
+
<td className="px-6 py-4 font-mono text-sm !text-red-300">
|
|
256
|
+
className
|
|
257
|
+
</td>
|
|
258
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
259
|
+
string
|
|
260
|
+
</td>
|
|
261
|
+
<td className="px-6 py-4 text-sm !text-white/50">-</td>
|
|
262
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
263
|
+
CSS classes for styling (use for overrides)
|
|
264
|
+
</td>
|
|
265
|
+
</tr>
|
|
266
|
+
<tr className="!bg-black/10">
|
|
267
|
+
<td className="px-6 py-4 font-mono text-sm !text-red-300">
|
|
268
|
+
...svgProps
|
|
269
|
+
</td>
|
|
270
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
271
|
+
SVGProps
|
|
272
|
+
</td>
|
|
273
|
+
<td className="px-6 py-4 text-sm !text-white/50">-</td>
|
|
274
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
275
|
+
All standard SVG element props
|
|
276
|
+
</td>
|
|
277
|
+
</tr>
|
|
278
|
+
</tbody>
|
|
279
|
+
</table>
|
|
280
|
+
</div>
|
|
281
|
+
</div>
|
|
282
|
+
|
|
283
|
+
{/* Size Variations */}
|
|
284
|
+
<div className="!space-y-8">
|
|
285
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
286
|
+
Size Variations
|
|
287
|
+
</h2>
|
|
288
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-8">
|
|
289
|
+
<div className="!space-y-6">
|
|
290
|
+
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
|
|
291
|
+
<div className="!space-y-4">
|
|
292
|
+
<h3 className="text-lg font-semibold !text-red-300">
|
|
293
|
+
Standard Sizes
|
|
294
|
+
</h3>
|
|
295
|
+
<div className="flex items-end gap-6 rounded-lg bg-black/20 p-6">
|
|
296
|
+
<div className="text-center">
|
|
297
|
+
<PauseIcon className="!mx-auto mb-2 h-3 w-3 text-red-400" />
|
|
298
|
+
<span className="text-xs text-white/60">12px</span>
|
|
299
|
+
</div>
|
|
300
|
+
<div className="text-center">
|
|
301
|
+
<PauseIcon className="!mx-auto mb-2 h-4 w-4 text-red-400" />
|
|
302
|
+
<span className="text-xs text-white/60">16px</span>
|
|
303
|
+
</div>
|
|
304
|
+
<div className="text-center">
|
|
305
|
+
<PauseIcon className="!mx-auto mb-2 h-5 w-5 text-red-400" />
|
|
306
|
+
<span className="text-xs text-white/60">20px</span>
|
|
307
|
+
</div>
|
|
308
|
+
<div className="text-center">
|
|
309
|
+
<PauseIcon className="!mx-auto mb-2 h-6 w-6 text-red-400" />
|
|
310
|
+
<span className="text-xs text-white/60">24px</span>
|
|
311
|
+
</div>
|
|
312
|
+
<div className="text-center">
|
|
313
|
+
<PauseIcon className="!mx-auto mb-2 h-8 w-8 text-red-400" />
|
|
314
|
+
<span className="text-xs text-white/60">32px</span>
|
|
315
|
+
</div>
|
|
316
|
+
<div className="text-center">
|
|
317
|
+
<PauseIcon className="!mx-auto mb-2 h-12 w-12 text-red-400" />
|
|
318
|
+
<span className="text-xs text-white/60">48px</span>
|
|
319
|
+
</div>
|
|
320
|
+
</div>
|
|
321
|
+
</div>
|
|
322
|
+
|
|
323
|
+
<div className="!space-y-4">
|
|
324
|
+
<h3 className="text-lg font-semibold !text-red-300">
|
|
325
|
+
Code Example
|
|
326
|
+
</h3>
|
|
327
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
328
|
+
<pre className="overflow-x-auto text-sm !text-cyan-300">
|
|
329
|
+
{`// Small (16px)
|
|
330
|
+
<PauseIcon className="h-4 w-4" />
|
|
331
|
+
|
|
332
|
+
// Medium (24px)
|
|
333
|
+
<PauseIcon className="h-6 w-6" />
|
|
334
|
+
|
|
335
|
+
// Large (32px)
|
|
336
|
+
<PauseIcon className="h-8 w-8" />
|
|
337
|
+
|
|
338
|
+
// Custom size
|
|
339
|
+
<PauseIcon width={40} height={40} />`}
|
|
340
|
+
</pre>
|
|
341
|
+
</div>
|
|
342
|
+
</div>
|
|
343
|
+
</div>
|
|
344
|
+
</div>
|
|
345
|
+
</div>
|
|
346
|
+
</div>
|
|
347
|
+
|
|
348
|
+
{/* Color Variations */}
|
|
349
|
+
<div className="!space-y-8">
|
|
350
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
351
|
+
Color Variations
|
|
352
|
+
</h2>
|
|
353
|
+
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
354
|
+
<div className="!space-y-4">
|
|
355
|
+
<h3 className="text-lg font-semibold !text-red-300">
|
|
356
|
+
Semantic Colors
|
|
357
|
+
</h3>
|
|
358
|
+
<div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
359
|
+
<div className="flex items-center gap-4">
|
|
360
|
+
<PauseIcon className="h-6 w-6 text-red-400" />
|
|
361
|
+
<div>
|
|
362
|
+
<div className="text-sm font-medium text-white">
|
|
363
|
+
Primary
|
|
364
|
+
</div>
|
|
365
|
+
<div className="text-xs text-white/60">
|
|
366
|
+
text-red-400
|
|
367
|
+
</div>
|
|
368
|
+
</div>
|
|
369
|
+
</div>
|
|
370
|
+
<div className="flex items-center gap-4">
|
|
371
|
+
<PauseIcon className="h-6 w-6 text-rose-400" />
|
|
372
|
+
<div>
|
|
373
|
+
<div className="text-sm font-medium text-white">
|
|
374
|
+
Secondary
|
|
375
|
+
</div>
|
|
376
|
+
<div className="text-xs text-white/60">
|
|
377
|
+
text-rose-400
|
|
378
|
+
</div>
|
|
379
|
+
</div>
|
|
380
|
+
</div>
|
|
381
|
+
<div className="flex items-center gap-4">
|
|
382
|
+
<PauseIcon className="h-6 w-6 text-pink-400" />
|
|
383
|
+
<div>
|
|
384
|
+
<div className="text-sm font-medium text-white">
|
|
385
|
+
Accent
|
|
386
|
+
</div>
|
|
387
|
+
<div className="text-xs text-white/60">
|
|
388
|
+
text-pink-400
|
|
389
|
+
</div>
|
|
390
|
+
</div>
|
|
391
|
+
</div>
|
|
392
|
+
<div className="flex items-center gap-4">
|
|
393
|
+
<PauseIcon className="h-6 w-6 text-white/40" />
|
|
394
|
+
<div>
|
|
395
|
+
<div className="text-sm font-medium text-white">
|
|
396
|
+
Disabled
|
|
397
|
+
</div>
|
|
398
|
+
<div className="text-xs text-white/60">
|
|
399
|
+
text-white/40
|
|
400
|
+
</div>
|
|
401
|
+
</div>
|
|
402
|
+
</div>
|
|
403
|
+
</div>
|
|
404
|
+
</div>
|
|
405
|
+
|
|
406
|
+
<div className="!space-y-4">
|
|
407
|
+
<h3 className="text-lg font-semibold !text-red-300">
|
|
408
|
+
Custom Colors
|
|
409
|
+
</h3>
|
|
410
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
411
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
412
|
+
{`// Using Tailwind classes
|
|
413
|
+
<PauseIcon className="h-6 w-6 text-red-400" />
|
|
414
|
+
<PauseIcon className="h-6 w-6 text-rose-500" />
|
|
415
|
+
|
|
416
|
+
// Using CSS custom properties
|
|
417
|
+
<PauseIcon
|
|
418
|
+
className="h-6 w-6"
|
|
419
|
+
style={{ color: 'var(--color-primary)' }}
|
|
420
|
+
/>
|
|
421
|
+
|
|
422
|
+
// Direct stroke prop
|
|
423
|
+
<PauseIcon
|
|
424
|
+
width={24}
|
|
425
|
+
height={24}
|
|
426
|
+
stroke="#ef4444"
|
|
427
|
+
/>`}
|
|
428
|
+
</pre>
|
|
429
|
+
</div>
|
|
430
|
+
</div>
|
|
431
|
+
</div>
|
|
432
|
+
</div>
|
|
433
|
+
|
|
434
|
+
{/* Usage Examples */}
|
|
435
|
+
<div className="!space-y-8">
|
|
436
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
437
|
+
Usage Examples
|
|
438
|
+
</h2>
|
|
439
|
+
|
|
440
|
+
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
441
|
+
{/* Music Player */}
|
|
442
|
+
<div className="!space-y-4">
|
|
443
|
+
<h3 className="text-lg font-semibold !text-red-300">
|
|
444
|
+
Music Player
|
|
445
|
+
</h3>
|
|
446
|
+
<div className="!space-y-4">
|
|
447
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-6">
|
|
448
|
+
<div className="mb-4 flex items-center gap-3">
|
|
449
|
+
<div className="h-12 w-12 rounded-lg bg-gradient-to-br from-red-500/20 to-rose-500/20" />
|
|
450
|
+
<div>
|
|
451
|
+
<div className="text-sm font-medium !text-white">
|
|
452
|
+
Current Song
|
|
453
|
+
</div>
|
|
454
|
+
<div className="text-xs !text-white/60">
|
|
455
|
+
Artist Name
|
|
456
|
+
</div>
|
|
457
|
+
</div>
|
|
458
|
+
</div>
|
|
459
|
+
<div className="flex items-center justify-center gap-4">
|
|
460
|
+
<button className="rounded-lg p-2 transition-colors hover:bg-white/10">
|
|
461
|
+
<div className="h-6 w-6 rounded-full border border-white/60 bg-white/20" />
|
|
462
|
+
</button>
|
|
463
|
+
<button className="rounded-lg p-3 transition-colors hover:bg-white/10">
|
|
464
|
+
<PauseIcon className="h-8 w-8 text-red-400" />
|
|
465
|
+
</button>
|
|
466
|
+
<button className="rounded-lg p-2 transition-colors hover:bg-white/10">
|
|
467
|
+
<div className="h-6 w-6 rounded-full border border-white/60 bg-white/20" />
|
|
468
|
+
</button>
|
|
469
|
+
</div>
|
|
470
|
+
</div>
|
|
471
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
472
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
473
|
+
{`// Music player controls
|
|
474
|
+
<div className="flex items-center justify-center gap-4">
|
|
475
|
+
<button onClick={previousTrack}>
|
|
476
|
+
<SkipBackwardIcon className="h-6 w-6" />
|
|
477
|
+
</button>
|
|
478
|
+
<button onClick={pausePlayback}>
|
|
479
|
+
<PauseIcon className="h-8 w-8 text-red-400" />
|
|
480
|
+
</button>
|
|
481
|
+
<button onClick={nextTrack}>
|
|
482
|
+
<SkipForwardIcon className="h-6 w-6" />
|
|
483
|
+
</button>
|
|
484
|
+
</div>`}
|
|
485
|
+
</pre>
|
|
486
|
+
</div>
|
|
487
|
+
</div>
|
|
488
|
+
</div>
|
|
489
|
+
|
|
490
|
+
{/* Video Player */}
|
|
491
|
+
<div className="!space-y-4">
|
|
492
|
+
<h3 className="text-lg font-semibold !text-red-300">
|
|
493
|
+
Video Player
|
|
494
|
+
</h3>
|
|
495
|
+
<div className="!space-y-4">
|
|
496
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-4">
|
|
497
|
+
<div className="mb-4 h-32 rounded bg-gradient-to-r from-red-500/20 to-rose-500/20" />
|
|
498
|
+
<div className="flex items-center justify-between">
|
|
499
|
+
<div className="flex items-center gap-2">
|
|
500
|
+
<button className="rounded-lg p-2 hover:bg-white/10">
|
|
501
|
+
<PauseIcon className="h-6 w-6 text-red-400" />
|
|
502
|
+
</button>
|
|
503
|
+
<span className="text-sm text-white/60">
|
|
504
|
+
00:42 / 03:28
|
|
505
|
+
</span>
|
|
506
|
+
</div>
|
|
507
|
+
<div className="flex items-center gap-2">
|
|
508
|
+
<button className="rounded p-1.5 hover:bg-white/10">
|
|
509
|
+
<div className="h-4 w-4 rounded-full border border-white/60 bg-white/20" />
|
|
510
|
+
</button>
|
|
511
|
+
<button className="rounded p-1.5 hover:bg-white/10">
|
|
512
|
+
<div className="h-4 w-4 rounded-full border border-white/60 bg-white/20" />
|
|
513
|
+
</button>
|
|
514
|
+
</div>
|
|
515
|
+
</div>
|
|
516
|
+
</div>
|
|
517
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
518
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
519
|
+
{`// Video player controls
|
|
520
|
+
<div className="video-controls">
|
|
521
|
+
<button
|
|
522
|
+
onClick={togglePlayPause}
|
|
523
|
+
aria-label={isPlaying ? "Pause video" : "Play video"}
|
|
524
|
+
>
|
|
525
|
+
{isPlaying ? (
|
|
526
|
+
<PauseIcon className="h-6 w-6 text-red-400" />
|
|
527
|
+
) : (
|
|
528
|
+
<PlayIcon className="h-6 w-6" />
|
|
529
|
+
)}
|
|
530
|
+
</button>
|
|
531
|
+
</div>`}
|
|
532
|
+
</pre>
|
|
533
|
+
</div>
|
|
534
|
+
</div>
|
|
535
|
+
</div>
|
|
536
|
+
|
|
537
|
+
{/* Podcast Player */}
|
|
538
|
+
<div className="!space-y-4">
|
|
539
|
+
<h3 className="text-lg font-semibold !text-red-300">
|
|
540
|
+
Podcast Player
|
|
541
|
+
</h3>
|
|
542
|
+
<div className="!space-y-4">
|
|
543
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-4">
|
|
544
|
+
<div className="mb-4">
|
|
545
|
+
<div className="text-sm font-medium !text-white">
|
|
546
|
+
Episode 42: Tech Trends
|
|
547
|
+
</div>
|
|
548
|
+
<div className="text-xs !text-white/60">
|
|
549
|
+
The Tech Podcast
|
|
550
|
+
</div>
|
|
551
|
+
</div>
|
|
552
|
+
<div className="flex items-center justify-between">
|
|
553
|
+
<div className="flex items-center gap-4">
|
|
554
|
+
<button className="rounded-lg p-2 hover:bg-white/10">
|
|
555
|
+
<PauseIcon className="h-6 w-6 text-red-400" />
|
|
556
|
+
</button>
|
|
557
|
+
<div className="text-sm text-white/60">
|
|
558
|
+
<div>12:34 / 58:42</div>
|
|
559
|
+
<div className="mt-1 h-1 w-32 rounded-full bg-white/20">
|
|
560
|
+
<div className="h-full w-1/4 rounded-full bg-red-400" />
|
|
561
|
+
</div>
|
|
562
|
+
</div>
|
|
563
|
+
</div>
|
|
564
|
+
<div className="flex items-center gap-2">
|
|
565
|
+
<span className="text-sm text-white/60">1.5x</span>
|
|
566
|
+
</div>
|
|
567
|
+
</div>
|
|
568
|
+
</div>
|
|
569
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
570
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
571
|
+
{`// Podcast player with pause
|
|
572
|
+
<div className="podcast-controls">
|
|
573
|
+
<button
|
|
574
|
+
onClick={pausePodcast}
|
|
575
|
+
aria-label="Pause episode"
|
|
576
|
+
>
|
|
577
|
+
<PauseIcon className="h-6 w-6 text-red-400" />
|
|
578
|
+
</button>
|
|
579
|
+
<div className="progress-info">
|
|
580
|
+
<span>{currentTime} / {duration}</span>
|
|
581
|
+
<ProgressBar current={progress} />
|
|
582
|
+
</div>
|
|
583
|
+
</div>`}
|
|
584
|
+
</pre>
|
|
585
|
+
</div>
|
|
586
|
+
</div>
|
|
587
|
+
</div>
|
|
588
|
+
|
|
589
|
+
{/* Audio Recording */}
|
|
590
|
+
<div className="!space-y-4">
|
|
591
|
+
<h3 className="text-lg font-semibold !text-red-300">
|
|
592
|
+
Audio Recording
|
|
593
|
+
</h3>
|
|
594
|
+
<div className="!space-y-4">
|
|
595
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-4">
|
|
596
|
+
<div className="mb-4">
|
|
597
|
+
<div className="text-sm font-medium !text-white">
|
|
598
|
+
Recording Session
|
|
599
|
+
</div>
|
|
600
|
+
<div className="text-xs !text-white/60">
|
|
601
|
+
Voice Memo
|
|
602
|
+
</div>
|
|
603
|
+
</div>
|
|
604
|
+
<div className="flex items-center justify-center gap-6">
|
|
605
|
+
<button className="rounded-lg p-1.5 hover:bg-white/10">
|
|
606
|
+
<div className="h-4 w-4 rounded-full border border-white/60 bg-white/20" />
|
|
607
|
+
</button>
|
|
608
|
+
<button className="rounded-lg p-3 hover:bg-white/10">
|
|
609
|
+
<PauseIcon className="h-8 w-8 text-red-400" />
|
|
610
|
+
</button>
|
|
611
|
+
<button className="rounded-lg p-1.5 hover:bg-white/10">
|
|
612
|
+
<div className="h-4 w-4 rounded-full border border-white/60 bg-white/20" />
|
|
613
|
+
</button>
|
|
614
|
+
</div>
|
|
615
|
+
<div className="mt-4 text-center">
|
|
616
|
+
<div className="font-mono text-lg text-red-400">
|
|
617
|
+
00:02:34
|
|
618
|
+
</div>
|
|
619
|
+
<div className="mt-2 flex justify-center gap-1">
|
|
620
|
+
{[...Array(5)].map((_, i) => (
|
|
621
|
+
<div
|
|
622
|
+
key={i}
|
|
623
|
+
className="h-4 w-1 animate-pulse rounded bg-red-400/60"
|
|
624
|
+
style={{ animationDelay: `${i * 100}ms` }}
|
|
625
|
+
/>
|
|
626
|
+
))}
|
|
627
|
+
</div>
|
|
628
|
+
</div>
|
|
629
|
+
</div>
|
|
630
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
631
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
632
|
+
{`// Audio recording controls
|
|
633
|
+
<div className="recording-controls">
|
|
634
|
+
<button
|
|
635
|
+
onClick={pauseRecording}
|
|
636
|
+
disabled={!isRecording}
|
|
637
|
+
aria-label="Pause recording"
|
|
638
|
+
>
|
|
639
|
+
<PauseIcon className="h-8 w-8 text-red-400" />
|
|
640
|
+
</button>
|
|
641
|
+
<div className="recording-time">
|
|
642
|
+
{formatTime(recordingDuration)}
|
|
643
|
+
</div>
|
|
644
|
+
<AudioVisualizer isActive={isRecording} />
|
|
645
|
+
</div>`}
|
|
646
|
+
</pre>
|
|
647
|
+
</div>
|
|
648
|
+
</div>
|
|
649
|
+
</div>
|
|
650
|
+
</div>
|
|
651
|
+
</div>
|
|
652
|
+
|
|
653
|
+
{/* Accessibility */}
|
|
654
|
+
<div className="!space-y-8">
|
|
655
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
656
|
+
Accessibility Features
|
|
657
|
+
</h2>
|
|
658
|
+
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
|
|
659
|
+
<div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
660
|
+
<h3 className="text-lg font-semibold !text-green-300">
|
|
661
|
+
✅ Built-in Features
|
|
662
|
+
</h3>
|
|
663
|
+
<ul className="!space-y-2 text-sm !text-white/70">
|
|
664
|
+
<li className="!text-white/70">
|
|
665
|
+
Uses Radix UI AccessibleIcon wrapper
|
|
666
|
+
</li>
|
|
667
|
+
<li className="!text-white/70">
|
|
668
|
+
Provides screen reader label "Pause icon"
|
|
669
|
+
</li>
|
|
670
|
+
<li className="!text-white/70">
|
|
671
|
+
Supports keyboard navigation when interactive
|
|
672
|
+
</li>
|
|
673
|
+
<li className="!text-white/70">
|
|
674
|
+
Maintains proper color contrast ratios
|
|
675
|
+
</li>
|
|
676
|
+
<li className="!text-white/70">
|
|
677
|
+
Scales with user's font size preferences
|
|
678
|
+
</li>
|
|
679
|
+
</ul>
|
|
680
|
+
</div>
|
|
681
|
+
|
|
682
|
+
<div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
683
|
+
<h3 className="text-lg font-semibold !text-red-300">
|
|
684
|
+
💡 Best Practices
|
|
685
|
+
</h3>
|
|
686
|
+
<ul className="!space-y-2 text-sm text-white/70">
|
|
687
|
+
<li className="!text-white/70">
|
|
688
|
+
Always provide descriptive aria-labels for buttons
|
|
689
|
+
</li>
|
|
690
|
+
<li className="!text-white/70">
|
|
691
|
+
Use consistent placement in media control groups
|
|
692
|
+
</li>
|
|
693
|
+
<li className="!text-white/70">
|
|
694
|
+
Ensure sufficient touch target size (44px minimum)
|
|
695
|
+
</li>
|
|
696
|
+
<li className="!text-white/70">
|
|
697
|
+
Provide visible focus states for keyboard users
|
|
698
|
+
</li>
|
|
699
|
+
<li className="!text-white/70">
|
|
700
|
+
Consider keyboard shortcuts (e.g., Spacebar)
|
|
701
|
+
</li>
|
|
702
|
+
</ul>
|
|
703
|
+
</div>
|
|
704
|
+
</div>
|
|
705
|
+
|
|
706
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-6">
|
|
707
|
+
<h3 className="mb-4 text-lg font-semibold !text-rose-300">
|
|
708
|
+
Proper ARIA Implementation
|
|
709
|
+
</h3>
|
|
710
|
+
<div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
|
|
711
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
712
|
+
<pre className="overflow-x-auto text-sm !text-cyan-300">
|
|
713
|
+
{`// Pause button with proper ARIA
|
|
714
|
+
<button
|
|
715
|
+
aria-label="Pause playback"
|
|
716
|
+
className="p-2 hover:bg-white/10 rounded-lg"
|
|
717
|
+
onClick={pausePlayback}
|
|
718
|
+
>
|
|
719
|
+
<PauseIcon className="h-6 w-6 text-red-400" />
|
|
720
|
+
</button>
|
|
721
|
+
|
|
722
|
+
// Toggle play/pause with dynamic ARIA
|
|
723
|
+
<button
|
|
724
|
+
aria-label={isPlaying ? "Pause" : "Play"}
|
|
725
|
+
onClick={togglePlayPause}
|
|
726
|
+
aria-pressed={isPlaying}
|
|
727
|
+
>
|
|
728
|
+
{isPlaying ? (
|
|
729
|
+
<PauseIcon className="h-6 w-6" />
|
|
730
|
+
) : (
|
|
731
|
+
<PlayIcon className="h-6 w-6" />
|
|
732
|
+
)}
|
|
733
|
+
</button>
|
|
734
|
+
|
|
735
|
+
// Recording pause with state context
|
|
736
|
+
<button
|
|
737
|
+
aria-label="Pause recording"
|
|
738
|
+
disabled={!isRecording}
|
|
739
|
+
onClick={pauseRecording}
|
|
740
|
+
>
|
|
741
|
+
<PauseIcon className="h-8 w-8" />
|
|
742
|
+
</button>`}
|
|
743
|
+
</pre>
|
|
744
|
+
</div>
|
|
745
|
+
<div className="!space-y-4">
|
|
746
|
+
<p className="text-sm !text-white/70">
|
|
747
|
+
When using PauseIcon for interactive elements, always
|
|
748
|
+
provide clear context about the current playback state
|
|
749
|
+
and what the pause action will do.
|
|
750
|
+
</p>
|
|
751
|
+
<div className="rounded-lg border border-red-500/20 bg-red-500/10 p-4">
|
|
752
|
+
<div className="flex items-center gap-2 text-sm text-red-200">
|
|
753
|
+
<PauseIcon className="h-4 w-4" />
|
|
754
|
+
<span>
|
|
755
|
+
Screen readers need context about pause vs play
|
|
756
|
+
state
|
|
757
|
+
</span>
|
|
758
|
+
</div>
|
|
759
|
+
</div>
|
|
760
|
+
</div>
|
|
761
|
+
</div>
|
|
762
|
+
</div>
|
|
763
|
+
</div>
|
|
764
|
+
|
|
765
|
+
{/* Related Icons */}
|
|
766
|
+
<div className="!space-y-8">
|
|
767
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
768
|
+
Related Icons
|
|
769
|
+
</h2>
|
|
770
|
+
<div className="grid grid-cols-2 gap-6 md:grid-cols-4">
|
|
771
|
+
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
772
|
+
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-green-500/20">
|
|
773
|
+
<span className="!text-2xl !text-white">▶</span>
|
|
774
|
+
</div>
|
|
775
|
+
<div>
|
|
776
|
+
<div className="font-medium text-white">PlayIcon</div>
|
|
777
|
+
<div className="text-xs text-white/60">
|
|
778
|
+
Start playback
|
|
779
|
+
</div>
|
|
780
|
+
</div>
|
|
781
|
+
</div>
|
|
782
|
+
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
783
|
+
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-gray-500/20">
|
|
784
|
+
<span className="!text-2xl !text-white">⏹</span>
|
|
785
|
+
</div>
|
|
786
|
+
<div>
|
|
787
|
+
<div className="font-medium text-white">StopIcon</div>
|
|
788
|
+
<div className="text-xs text-white/60">Stop playback</div>
|
|
789
|
+
</div>
|
|
790
|
+
</div>
|
|
791
|
+
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
792
|
+
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-blue-500/20">
|
|
793
|
+
<span className="!text-2xl !text-white">⏭</span>
|
|
794
|
+
</div>
|
|
795
|
+
<div>
|
|
796
|
+
<div className="font-medium text-white">
|
|
797
|
+
SkipForwardIcon
|
|
798
|
+
</div>
|
|
799
|
+
<div className="text-xs text-white/60">Next track</div>
|
|
800
|
+
</div>
|
|
801
|
+
</div>
|
|
802
|
+
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
803
|
+
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-orange-500/20">
|
|
804
|
+
<span className="!text-2xl !text-white">⏮</span>
|
|
805
|
+
</div>
|
|
806
|
+
<div>
|
|
807
|
+
<div className="font-medium text-white">
|
|
808
|
+
SkipBackwardIcon
|
|
809
|
+
</div>
|
|
810
|
+
<div className="text-xs text-white/60">
|
|
811
|
+
Previous track
|
|
812
|
+
</div>
|
|
813
|
+
</div>
|
|
814
|
+
</div>
|
|
815
|
+
</div>
|
|
816
|
+
</div>
|
|
817
|
+
</div>
|
|
818
|
+
|
|
819
|
+
{/* Footer */}
|
|
820
|
+
<div className="border-t border-white/10 bg-black/20 backdrop-blur-xl">
|
|
821
|
+
<div className="!mx-auto max-w-7xl px-6 py-8">
|
|
822
|
+
<div className="!space-y-4 text-center">
|
|
823
|
+
<p className="!text-white/60">
|
|
824
|
+
PauseIcon is part of the Aural UI icon library, built with
|
|
825
|
+
accessibility and media control best practices in mind.
|
|
826
|
+
</p>
|
|
827
|
+
<p className="text-sm !text-white/40">
|
|
828
|
+
All icons use Radix UI's AccessibleIcon for screen reader
|
|
829
|
+
compatibility and follow WCAG guidelines.
|
|
830
|
+
</p>
|
|
831
|
+
</div>
|
|
832
|
+
</div>
|
|
833
|
+
</div>
|
|
834
|
+
</div>
|
|
835
|
+
</>
|
|
836
|
+
),
|
|
837
|
+
},
|
|
838
|
+
},
|
|
839
|
+
tags: ["autodocs"],
|
|
840
|
+
argTypes: {
|
|
841
|
+
width: {
|
|
842
|
+
control: { type: "range", min: 8, max: 96, step: 2 },
|
|
843
|
+
description: "Width of the icon in pixels",
|
|
844
|
+
},
|
|
845
|
+
height: {
|
|
846
|
+
control: { type: "range", min: 8, max: 96, step: 2 },
|
|
847
|
+
description: "Height of the icon in pixels",
|
|
848
|
+
},
|
|
849
|
+
stroke: {
|
|
850
|
+
control: "color",
|
|
851
|
+
description: "Stroke color of the icon",
|
|
852
|
+
},
|
|
853
|
+
strokeWidth: {
|
|
854
|
+
control: { type: "range", min: 0.5, max: 4, step: 0.5 },
|
|
855
|
+
description: "Width of the stroke",
|
|
856
|
+
},
|
|
857
|
+
className: {
|
|
858
|
+
control: "text",
|
|
859
|
+
description: "CSS classes for styling (use for overrides)",
|
|
860
|
+
},
|
|
861
|
+
onClick: {
|
|
862
|
+
action: "clicked",
|
|
863
|
+
description: "Click handler for interactive use",
|
|
864
|
+
},
|
|
865
|
+
},
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
export default meta
|
|
869
|
+
type Story = StoryObj<typeof PauseIcon>
|
|
870
|
+
|
|
871
|
+
// Story parameters for consistent dark theme
|
|
872
|
+
const storyParameters = {
|
|
873
|
+
backgrounds: {
|
|
874
|
+
default: "dark",
|
|
875
|
+
values: [
|
|
876
|
+
{ name: "dark", value: "#0a0a0a" },
|
|
877
|
+
{ name: "darker", value: "#000000" },
|
|
878
|
+
],
|
|
879
|
+
},
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
export const Default: Story = {
|
|
883
|
+
args: {
|
|
884
|
+
className: "h-8 w-8 text-red-400",
|
|
885
|
+
},
|
|
886
|
+
parameters: storyParameters,
|
|
887
|
+
render: (args) => (
|
|
888
|
+
<div className="flex h-32 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
|
|
889
|
+
<PauseIcon {...args} />
|
|
890
|
+
</div>
|
|
891
|
+
),
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
export const SizeVariations: Story = {
|
|
895
|
+
parameters: {
|
|
896
|
+
...storyParameters,
|
|
897
|
+
docs: {
|
|
898
|
+
description: {
|
|
899
|
+
story:
|
|
900
|
+
"PauseIcon in different sizes, from small UI elements to large displays.",
|
|
901
|
+
},
|
|
902
|
+
},
|
|
903
|
+
},
|
|
904
|
+
render: () => (
|
|
905
|
+
<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">
|
|
906
|
+
<div className="text-center">
|
|
907
|
+
<PauseIcon className="!mx-auto mb-2 h-3 w-3 text-red-400" />
|
|
908
|
+
<span className="text-xs text-white/60">12px</span>
|
|
909
|
+
</div>
|
|
910
|
+
<div className="text-center">
|
|
911
|
+
<PauseIcon className="!mx-auto mb-2 h-4 w-4 text-red-400" />
|
|
912
|
+
<span className="text-xs text-white/60">16px</span>
|
|
913
|
+
</div>
|
|
914
|
+
<div className="text-center">
|
|
915
|
+
<PauseIcon className="!mx-auto mb-2 h-5 w-5 text-red-400" />
|
|
916
|
+
<span className="text-xs text-white/60">20px</span>
|
|
917
|
+
</div>
|
|
918
|
+
<div className="text-center">
|
|
919
|
+
<PauseIcon className="!mx-auto mb-2 h-6 w-6 text-red-400" />
|
|
920
|
+
<span className="text-xs text-white/60">24px</span>
|
|
921
|
+
</div>
|
|
922
|
+
<div className="text-center">
|
|
923
|
+
<PauseIcon className="!mx-auto mb-2 h-8 w-8 text-red-400" />
|
|
924
|
+
<span className="text-xs text-white/60">32px</span>
|
|
925
|
+
</div>
|
|
926
|
+
<div className="text-center">
|
|
927
|
+
<PauseIcon className="!mx-auto mb-2 h-12 w-12 text-red-400" />
|
|
928
|
+
<span className="text-xs text-white/60">48px</span>
|
|
929
|
+
</div>
|
|
930
|
+
</div>
|
|
931
|
+
),
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
export const ColorVariations: Story = {
|
|
935
|
+
parameters: {
|
|
936
|
+
...storyParameters,
|
|
937
|
+
docs: {
|
|
938
|
+
description: {
|
|
939
|
+
story: "PauseIcon in different semantic colors for various use cases.",
|
|
940
|
+
},
|
|
941
|
+
},
|
|
942
|
+
},
|
|
943
|
+
render: () => (
|
|
944
|
+
<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">
|
|
945
|
+
<div className="text-center">
|
|
946
|
+
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-red-500/30 bg-red-500/20">
|
|
947
|
+
<PauseIcon className="h-8 w-8 text-red-400" />
|
|
948
|
+
</div>
|
|
949
|
+
<div className="text-sm font-medium text-white">Primary</div>
|
|
950
|
+
<div className="text-xs text-red-400">text-red-400</div>
|
|
951
|
+
</div>
|
|
952
|
+
<div className="text-center">
|
|
953
|
+
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-rose-500/30 bg-rose-500/20">
|
|
954
|
+
<PauseIcon className="h-8 w-8 text-rose-400" />
|
|
955
|
+
</div>
|
|
956
|
+
<div className="text-sm font-medium text-white">Secondary</div>
|
|
957
|
+
<div className="text-xs text-rose-400">text-rose-400</div>
|
|
958
|
+
</div>
|
|
959
|
+
<div className="text-center">
|
|
960
|
+
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-pink-500/30 bg-pink-500/20">
|
|
961
|
+
<PauseIcon className="h-8 w-8 text-pink-400" />
|
|
962
|
+
</div>
|
|
963
|
+
<div className="text-sm font-medium text-white">Accent</div>
|
|
964
|
+
<div className="text-xs text-pink-400">text-pink-400</div>
|
|
965
|
+
</div>
|
|
966
|
+
<div className="text-center">
|
|
967
|
+
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-white/10 bg-white/5">
|
|
968
|
+
<PauseIcon className="h-8 w-8 text-white/40" />
|
|
969
|
+
</div>
|
|
970
|
+
<div className="text-sm font-medium text-white">Disabled</div>
|
|
971
|
+
<div className="text-xs text-white/40">text-white/40</div>
|
|
972
|
+
</div>
|
|
973
|
+
</div>
|
|
974
|
+
),
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
export const UsageExamples: Story = {
|
|
978
|
+
parameters: {
|
|
979
|
+
...storyParameters,
|
|
980
|
+
docs: {
|
|
981
|
+
description: {
|
|
982
|
+
story:
|
|
983
|
+
"Real-world usage examples showing PauseIcon in different media control contexts.",
|
|
984
|
+
},
|
|
985
|
+
},
|
|
986
|
+
},
|
|
987
|
+
render: () => (
|
|
988
|
+
<div className="min-h-dvh !space-y-8 rounded-lg bg-gradient-to-br from-gray-900 to-gray-800 p-8">
|
|
989
|
+
{/* Music Player */}
|
|
990
|
+
<div className="!space-y-2">
|
|
991
|
+
<h3 className="text-sm font-medium text-white">Music Player</h3>
|
|
992
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-6">
|
|
993
|
+
<div className="mb-4 flex items-center gap-3">
|
|
994
|
+
<div className="h-12 w-12 rounded-lg bg-gradient-to-br from-red-500/20 to-rose-500/20" />
|
|
995
|
+
<div>
|
|
996
|
+
<div className="text-sm font-medium text-white">Current Song</div>
|
|
997
|
+
<div className="text-xs text-white/60">Artist Name</div>
|
|
998
|
+
</div>
|
|
999
|
+
</div>
|
|
1000
|
+
<div className="flex items-center justify-center gap-4">
|
|
1001
|
+
<button className="rounded-lg p-2 transition-colors hover:bg-white/10">
|
|
1002
|
+
<div className="h-6 w-6 rounded-full border border-white/60 bg-white/20" />
|
|
1003
|
+
</button>
|
|
1004
|
+
<button className="rounded-lg p-3 transition-colors hover:bg-white/10">
|
|
1005
|
+
<PauseIcon className="h-8 w-8 text-red-400" />
|
|
1006
|
+
</button>
|
|
1007
|
+
<button className="rounded-lg p-2 transition-colors hover:bg-white/10">
|
|
1008
|
+
<div className="h-6 w-6 rounded-full border border-white/60 bg-white/20" />
|
|
1009
|
+
</button>
|
|
1010
|
+
</div>
|
|
1011
|
+
</div>
|
|
1012
|
+
</div>
|
|
1013
|
+
|
|
1014
|
+
{/* Video Player */}
|
|
1015
|
+
<div className="!space-y-2">
|
|
1016
|
+
<h3 className="text-sm font-medium text-white">Video Player</h3>
|
|
1017
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-4">
|
|
1018
|
+
<div className="mb-4 h-32 rounded bg-gradient-to-r from-red-500/20 to-rose-500/20" />
|
|
1019
|
+
<div className="flex items-center justify-between">
|
|
1020
|
+
<div className="flex items-center gap-2">
|
|
1021
|
+
<button className="rounded-lg p-2 hover:bg-white/10">
|
|
1022
|
+
<PauseIcon className="h-6 w-6 text-red-400" />
|
|
1023
|
+
</button>
|
|
1024
|
+
<span className="text-sm text-white/60">00:42 / 03:28</span>
|
|
1025
|
+
</div>
|
|
1026
|
+
<div className="flex items-center gap-2">
|
|
1027
|
+
<button className="rounded p-1.5 hover:bg-white/10">
|
|
1028
|
+
<div className="h-4 w-4 rounded-full border border-white/60 bg-white/20" />
|
|
1029
|
+
</button>
|
|
1030
|
+
</div>
|
|
1031
|
+
</div>
|
|
1032
|
+
</div>
|
|
1033
|
+
</div>
|
|
1034
|
+
</div>
|
|
1035
|
+
),
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
export const Playground: Story = {
|
|
1039
|
+
parameters: {
|
|
1040
|
+
...storyParameters,
|
|
1041
|
+
docs: {
|
|
1042
|
+
description: {
|
|
1043
|
+
story:
|
|
1044
|
+
"Interactive playground to experiment with different PauseIcon configurations.",
|
|
1045
|
+
},
|
|
1046
|
+
},
|
|
1047
|
+
},
|
|
1048
|
+
args: {
|
|
1049
|
+
width: 24,
|
|
1050
|
+
height: 24,
|
|
1051
|
+
className: "text-red-400",
|
|
1052
|
+
},
|
|
1053
|
+
render: (args) => (
|
|
1054
|
+
<div className="flex h-64 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
|
|
1055
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-8">
|
|
1056
|
+
<PauseIcon {...args} />
|
|
1057
|
+
</div>
|
|
1058
|
+
</div>
|
|
1059
|
+
),
|
|
1060
|
+
}
|