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,1167 @@
|
|
|
1
|
+
import React from "react"
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
3
|
+
|
|
4
|
+
import { ExpandIcon } from "."
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof ExpandIcon> = {
|
|
7
|
+
title: "Icons/ExpandIcon",
|
|
8
|
+
component: ExpandIcon,
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: "fullscreen",
|
|
11
|
+
backgrounds: {
|
|
12
|
+
default: "dark",
|
|
13
|
+
values: [
|
|
14
|
+
{ name: "dark", value: "#0a0a0a" },
|
|
15
|
+
{ name: "darker", value: "#000000" },
|
|
16
|
+
{ name: "light", value: "#ffffff" },
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
docs: {
|
|
20
|
+
page: () => (
|
|
21
|
+
<>
|
|
22
|
+
{/* Override default docs styling */}
|
|
23
|
+
<style>
|
|
24
|
+
{`
|
|
25
|
+
.sbdocs-wrapper {
|
|
26
|
+
padding: 0 ;
|
|
27
|
+
max-width: none ;
|
|
28
|
+
background: transparent ;
|
|
29
|
+
}
|
|
30
|
+
.sbdocs-content {
|
|
31
|
+
max-width: none ;
|
|
32
|
+
padding: 0 ;
|
|
33
|
+
margin: 0 ;
|
|
34
|
+
background: transparent ;
|
|
35
|
+
}
|
|
36
|
+
.docs-story {
|
|
37
|
+
background: transparent ;
|
|
38
|
+
}
|
|
39
|
+
.sbdocs {
|
|
40
|
+
background: transparent ;
|
|
41
|
+
}
|
|
42
|
+
body {
|
|
43
|
+
background: #0a0a0a ;
|
|
44
|
+
}
|
|
45
|
+
#storybook-docs {
|
|
46
|
+
background: #0a0a0a ;
|
|
47
|
+
}
|
|
48
|
+
.sbdocs-preview {
|
|
49
|
+
background: transparent ;
|
|
50
|
+
border: none ;
|
|
51
|
+
}
|
|
52
|
+
.sbdocs-h1, .sbdocs-h2, .sbdocs-h3, .sbdocs-h4, .sbdocs-h5, .sbdocs-h6 {
|
|
53
|
+
color: white ;
|
|
54
|
+
}
|
|
55
|
+
.sbdocs-p, .sbdocs-li {
|
|
56
|
+
color: rgba(255, 255, 255, 0.7) ;
|
|
57
|
+
}
|
|
58
|
+
.sbdocs-code {
|
|
59
|
+
background: rgba(255, 255, 255, 0.1) ;
|
|
60
|
+
color: rgba(168, 85, 247, 1) ;
|
|
61
|
+
border: 1px solid rgba(255, 255, 255, 0.1) ;
|
|
62
|
+
}
|
|
63
|
+
.sbdocs-pre {
|
|
64
|
+
background: rgba(0, 0, 0, 0.4) ;
|
|
65
|
+
border: 1px solid rgba(255, 255, 255, 0.1) ;
|
|
66
|
+
}
|
|
67
|
+
.sbdocs-table {
|
|
68
|
+
background: rgba(255, 255, 255, 0.05) ;
|
|
69
|
+
border: 1px solid rgba(255, 255, 255, 0.1) ;
|
|
70
|
+
}
|
|
71
|
+
.sbdocs-table th {
|
|
72
|
+
background: rgba(255, 255, 255, 0.05) ;
|
|
73
|
+
color: white ;
|
|
74
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.1) ;
|
|
75
|
+
}
|
|
76
|
+
.sbdocs-table td {
|
|
77
|
+
color: rgba(255, 255, 255, 0.7) ;
|
|
78
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.05) ;
|
|
79
|
+
}
|
|
80
|
+
`}
|
|
81
|
+
</style>
|
|
82
|
+
|
|
83
|
+
<div className="min-h-screen bg-gradient-to-br from-gray-900 via-emerald-900/20 to-gray-900">
|
|
84
|
+
{/* Header */}
|
|
85
|
+
<div className="relative overflow-hidden border-b border-white/10 bg-black/20 backdrop-blur-xl">
|
|
86
|
+
<div className="absolute inset-0 bg-gradient-to-r from-emerald-500/10 via-transparent to-teal-500/10" />
|
|
87
|
+
<div className="relative !mx-auto max-w-7xl px-6 py-16">
|
|
88
|
+
<div className="!space-y-6 text-center">
|
|
89
|
+
<div className="!mx-auto flex h-24 w-24 items-center justify-center rounded-2xl border border-emerald-500/30 bg-gradient-to-br from-emerald-500/20 to-teal-500/20">
|
|
90
|
+
<ExpandIcon className="h-12 w-12 text-emerald-400" />
|
|
91
|
+
</div>
|
|
92
|
+
<h1 className="text-5xl font-bold !text-white">ExpandIcon</h1>
|
|
93
|
+
<p className="!mx-auto max-w-3xl text-xl leading-relaxed !text-white/70">
|
|
94
|
+
A fullscreen and expand control icon for maximizing
|
|
95
|
+
interface elements. Features diagonal arrows pointing
|
|
96
|
+
outward, essential for media players, modal dialogs, image
|
|
97
|
+
viewers, and any interface where users need to expand
|
|
98
|
+
content to fullscreen mode.
|
|
99
|
+
</p>
|
|
100
|
+
|
|
101
|
+
{/* Stats */}
|
|
102
|
+
<div className="flex items-center justify-center gap-8 pt-8">
|
|
103
|
+
<div className="text-center">
|
|
104
|
+
<div className="text-3xl font-bold text-emerald-300">
|
|
105
|
+
Fullscreen
|
|
106
|
+
</div>
|
|
107
|
+
<div className="text-sm text-white/60">
|
|
108
|
+
Maximize content
|
|
109
|
+
</div>
|
|
110
|
+
</div>
|
|
111
|
+
<div className="h-8 w-px bg-white/20" />
|
|
112
|
+
<div className="text-center">
|
|
113
|
+
<div className="text-3xl font-bold text-teal-300">
|
|
114
|
+
Accessible
|
|
115
|
+
</div>
|
|
116
|
+
<div className="text-sm text-white/60">
|
|
117
|
+
Screen reader friendly
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
<div className="h-8 w-px bg-white/20" />
|
|
121
|
+
<div className="text-center">
|
|
122
|
+
<div className="text-3xl font-bold text-green-300">
|
|
123
|
+
Universal
|
|
124
|
+
</div>
|
|
125
|
+
<div className="text-sm text-white/60">
|
|
126
|
+
Standard expand symbol
|
|
127
|
+
</div>
|
|
128
|
+
</div>
|
|
129
|
+
</div>
|
|
130
|
+
</div>
|
|
131
|
+
</div>
|
|
132
|
+
</div>
|
|
133
|
+
|
|
134
|
+
{/* Content */}
|
|
135
|
+
<div className="!mx-auto max-w-7xl !space-y-16 px-6 py-12">
|
|
136
|
+
{/* Quick Usage */}
|
|
137
|
+
<div className="!space-y-8">
|
|
138
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
139
|
+
Quick Start
|
|
140
|
+
</h2>
|
|
141
|
+
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
142
|
+
<div className="!space-y-4">
|
|
143
|
+
<h3 className="text-xl font-semibold !text-emerald-300">
|
|
144
|
+
Basic Usage
|
|
145
|
+
</h3>
|
|
146
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
147
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
148
|
+
{`import { ExpandIcon } from "@icons/expand-icon"
|
|
149
|
+
|
|
150
|
+
function VideoPlayer() {
|
|
151
|
+
return (
|
|
152
|
+
<button
|
|
153
|
+
onClick={enterFullscreen}
|
|
154
|
+
className="p-2 hover:bg-white/10 rounded-lg"
|
|
155
|
+
aria-label="Enter fullscreen mode"
|
|
156
|
+
>
|
|
157
|
+
<ExpandIcon className="h-6 w-6 text-emerald-400" />
|
|
158
|
+
</button>
|
|
159
|
+
)
|
|
160
|
+
}`}
|
|
161
|
+
</pre>
|
|
162
|
+
</div>
|
|
163
|
+
</div>
|
|
164
|
+
|
|
165
|
+
<div className="!space-y-4">
|
|
166
|
+
<h3 className="text-xl font-semibold !text-emerald-300">
|
|
167
|
+
Live Preview
|
|
168
|
+
</h3>
|
|
169
|
+
<div className="flex h-32 items-center justify-center rounded-lg border border-white/10 bg-white/5">
|
|
170
|
+
<button className="rounded-lg border border-emerald-500/20 bg-emerald-500/10 p-3 transition-colors hover:bg-emerald-500/20">
|
|
171
|
+
<ExpandIcon className="h-6 w-6 text-emerald-400" />
|
|
172
|
+
</button>
|
|
173
|
+
</div>
|
|
174
|
+
</div>
|
|
175
|
+
</div>
|
|
176
|
+
</div>
|
|
177
|
+
|
|
178
|
+
{/* Props Documentation */}
|
|
179
|
+
<div className="!space-y-8">
|
|
180
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
181
|
+
Props & Configuration
|
|
182
|
+
</h2>
|
|
183
|
+
|
|
184
|
+
<div className="overflow-hidden rounded-lg border border-white/10 bg-white/5">
|
|
185
|
+
<div className="bg-white/5 p-4">
|
|
186
|
+
<h3 className="text-xl font-semibold !text-white">Props</h3>
|
|
187
|
+
</div>
|
|
188
|
+
<table className="!my-0 w-full">
|
|
189
|
+
<thead className="bg-white/5">
|
|
190
|
+
<tr className="border-b border-white/10">
|
|
191
|
+
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
192
|
+
Prop
|
|
193
|
+
</th>
|
|
194
|
+
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
195
|
+
Type
|
|
196
|
+
</th>
|
|
197
|
+
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
198
|
+
Default
|
|
199
|
+
</th>
|
|
200
|
+
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
201
|
+
Description
|
|
202
|
+
</th>
|
|
203
|
+
</tr>
|
|
204
|
+
</thead>
|
|
205
|
+
<tbody>
|
|
206
|
+
<tr className="border-b border-white/5">
|
|
207
|
+
<td className="px-6 py-4 font-mono text-sm !text-emerald-300">
|
|
208
|
+
width
|
|
209
|
+
</td>
|
|
210
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
211
|
+
number | string
|
|
212
|
+
</td>
|
|
213
|
+
<td className="px-6 py-4 text-sm !text-white/50">24</td>
|
|
214
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
215
|
+
Width of the icon in pixels
|
|
216
|
+
</td>
|
|
217
|
+
</tr>
|
|
218
|
+
<tr className="border-b border-white/5 !bg-black/10">
|
|
219
|
+
<td className="px-6 py-4 font-mono text-sm !text-emerald-300">
|
|
220
|
+
height
|
|
221
|
+
</td>
|
|
222
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
223
|
+
number | string
|
|
224
|
+
</td>
|
|
225
|
+
<td className="px-6 py-4 text-sm !text-white/50">24</td>
|
|
226
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
227
|
+
Height of the icon in pixels
|
|
228
|
+
</td>
|
|
229
|
+
</tr>
|
|
230
|
+
<tr className="border-b border-white/5">
|
|
231
|
+
<td className="px-6 py-4 font-mono text-sm !text-emerald-300">
|
|
232
|
+
stroke
|
|
233
|
+
</td>
|
|
234
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
235
|
+
string
|
|
236
|
+
</td>
|
|
237
|
+
<td className="px-6 py-4 text-sm !text-white/50">
|
|
238
|
+
currentColor
|
|
239
|
+
</td>
|
|
240
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
241
|
+
Stroke color of the icon
|
|
242
|
+
</td>
|
|
243
|
+
</tr>
|
|
244
|
+
<tr className="border-b border-white/5 !bg-black/10">
|
|
245
|
+
<td className="px-6 py-4 font-mono text-sm !text-emerald-300">
|
|
246
|
+
strokeWidth
|
|
247
|
+
</td>
|
|
248
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
249
|
+
string | number
|
|
250
|
+
</td>
|
|
251
|
+
<td className="px-6 py-4 text-sm !text-white/50">
|
|
252
|
+
1.5
|
|
253
|
+
</td>
|
|
254
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
255
|
+
Width of the stroke
|
|
256
|
+
</td>
|
|
257
|
+
</tr>
|
|
258
|
+
<tr className="border-b border-white/5">
|
|
259
|
+
<td className="px-6 py-4 font-mono text-sm !text-emerald-300">
|
|
260
|
+
strokeLinecap
|
|
261
|
+
</td>
|
|
262
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
263
|
+
string
|
|
264
|
+
</td>
|
|
265
|
+
<td className="px-6 py-4 text-sm !text-white/50">
|
|
266
|
+
square
|
|
267
|
+
</td>
|
|
268
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
269
|
+
Style of line endings (square for crisp corners)
|
|
270
|
+
</td>
|
|
271
|
+
</tr>
|
|
272
|
+
<tr className="border-b border-white/5 !bg-black/10">
|
|
273
|
+
<td className="px-6 py-4 font-mono text-sm !text-emerald-300">
|
|
274
|
+
className
|
|
275
|
+
</td>
|
|
276
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
277
|
+
string
|
|
278
|
+
</td>
|
|
279
|
+
<td className="px-6 py-4 text-sm !text-white/50">-</td>
|
|
280
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
281
|
+
CSS classes for styling (use for overrides)
|
|
282
|
+
</td>
|
|
283
|
+
</tr>
|
|
284
|
+
<tr className="!bg-black/10">
|
|
285
|
+
<td className="px-6 py-4 font-mono text-sm !text-emerald-300">
|
|
286
|
+
...svgProps
|
|
287
|
+
</td>
|
|
288
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
289
|
+
SVGProps
|
|
290
|
+
</td>
|
|
291
|
+
<td className="px-6 py-4 text-sm !text-white/50">-</td>
|
|
292
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
293
|
+
All standard SVG element props
|
|
294
|
+
</td>
|
|
295
|
+
</tr>
|
|
296
|
+
</tbody>
|
|
297
|
+
</table>
|
|
298
|
+
</div>
|
|
299
|
+
</div>
|
|
300
|
+
|
|
301
|
+
{/* Size Variations */}
|
|
302
|
+
<div className="!space-y-8">
|
|
303
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
304
|
+
Size Variations
|
|
305
|
+
</h2>
|
|
306
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-8">
|
|
307
|
+
<div className="!space-y-6">
|
|
308
|
+
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
|
|
309
|
+
<div className="!space-y-4">
|
|
310
|
+
<h3 className="text-lg font-semibold !text-emerald-300">
|
|
311
|
+
Standard Sizes
|
|
312
|
+
</h3>
|
|
313
|
+
<div className="flex items-end gap-6 rounded-lg bg-black/20 p-6">
|
|
314
|
+
<div className="text-center">
|
|
315
|
+
<ExpandIcon className="!mx-auto mb-2 h-3 w-3 text-emerald-400" />
|
|
316
|
+
<span className="text-xs text-white/60">12px</span>
|
|
317
|
+
</div>
|
|
318
|
+
<div className="text-center">
|
|
319
|
+
<ExpandIcon className="!mx-auto mb-2 h-4 w-4 text-emerald-400" />
|
|
320
|
+
<span className="text-xs text-white/60">16px</span>
|
|
321
|
+
</div>
|
|
322
|
+
<div className="text-center">
|
|
323
|
+
<ExpandIcon className="!mx-auto mb-2 h-5 w-5 text-emerald-400" />
|
|
324
|
+
<span className="text-xs text-white/60">20px</span>
|
|
325
|
+
</div>
|
|
326
|
+
<div className="text-center">
|
|
327
|
+
<ExpandIcon className="!mx-auto mb-2 h-6 w-6 text-emerald-400" />
|
|
328
|
+
<span className="text-xs text-white/60">24px</span>
|
|
329
|
+
</div>
|
|
330
|
+
<div className="text-center">
|
|
331
|
+
<ExpandIcon className="!mx-auto mb-2 h-8 w-8 text-emerald-400" />
|
|
332
|
+
<span className="text-xs text-white/60">32px</span>
|
|
333
|
+
</div>
|
|
334
|
+
<div className="text-center">
|
|
335
|
+
<ExpandIcon className="!mx-auto mb-2 h-12 w-12 text-emerald-400" />
|
|
336
|
+
<span className="text-xs text-white/60">48px</span>
|
|
337
|
+
</div>
|
|
338
|
+
</div>
|
|
339
|
+
</div>
|
|
340
|
+
|
|
341
|
+
<div className="!space-y-4">
|
|
342
|
+
<h3 className="text-lg font-semibold !text-emerald-300">
|
|
343
|
+
Code Example
|
|
344
|
+
</h3>
|
|
345
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
346
|
+
<pre className="overflow-x-auto text-sm !text-cyan-300">
|
|
347
|
+
{`// Small (16px) - compact controls
|
|
348
|
+
<ExpandIcon className="h-4 w-4" />
|
|
349
|
+
|
|
350
|
+
// Medium (24px) - standard interface
|
|
351
|
+
<ExpandIcon className="h-6 w-6" />
|
|
352
|
+
|
|
353
|
+
// Large (32px) - prominent displays
|
|
354
|
+
<ExpandIcon className="h-8 w-8" />
|
|
355
|
+
|
|
356
|
+
// Custom size
|
|
357
|
+
<ExpandIcon width={40} height={40} />`}
|
|
358
|
+
</pre>
|
|
359
|
+
</div>
|
|
360
|
+
</div>
|
|
361
|
+
</div>
|
|
362
|
+
</div>
|
|
363
|
+
</div>
|
|
364
|
+
</div>
|
|
365
|
+
|
|
366
|
+
{/* Color Variations */}
|
|
367
|
+
<div className="!space-y-8">
|
|
368
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
369
|
+
Color Variations
|
|
370
|
+
</h2>
|
|
371
|
+
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
372
|
+
<div className="!space-y-4">
|
|
373
|
+
<h3 className="text-lg font-semibold !text-emerald-300">
|
|
374
|
+
Semantic Colors
|
|
375
|
+
</h3>
|
|
376
|
+
<div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
377
|
+
<div className="flex items-center gap-4">
|
|
378
|
+
<ExpandIcon className="h-6 w-6 text-emerald-400" />
|
|
379
|
+
<div>
|
|
380
|
+
<div className="text-sm font-medium text-white">
|
|
381
|
+
Expand/Fullscreen
|
|
382
|
+
</div>
|
|
383
|
+
<div className="text-xs text-white/60">
|
|
384
|
+
text-emerald-400
|
|
385
|
+
</div>
|
|
386
|
+
</div>
|
|
387
|
+
</div>
|
|
388
|
+
<div className="flex items-center gap-4">
|
|
389
|
+
<ExpandIcon className="h-6 w-6 text-teal-400" />
|
|
390
|
+
<div>
|
|
391
|
+
<div className="text-sm font-medium text-white">
|
|
392
|
+
Maximize View
|
|
393
|
+
</div>
|
|
394
|
+
<div className="text-xs text-white/60">
|
|
395
|
+
text-teal-400
|
|
396
|
+
</div>
|
|
397
|
+
</div>
|
|
398
|
+
</div>
|
|
399
|
+
<div className="flex items-center gap-4">
|
|
400
|
+
<ExpandIcon className="h-6 w-6 text-green-400" />
|
|
401
|
+
<div>
|
|
402
|
+
<div className="text-sm font-medium text-white">
|
|
403
|
+
Active/Available
|
|
404
|
+
</div>
|
|
405
|
+
<div className="text-xs text-white/60">
|
|
406
|
+
text-green-400
|
|
407
|
+
</div>
|
|
408
|
+
</div>
|
|
409
|
+
</div>
|
|
410
|
+
<div className="flex items-center gap-4">
|
|
411
|
+
<ExpandIcon className="h-6 w-6 text-cyan-400" />
|
|
412
|
+
<div>
|
|
413
|
+
<div className="text-sm font-medium text-white">
|
|
414
|
+
Focus Mode
|
|
415
|
+
</div>
|
|
416
|
+
<div className="text-xs text-white/60">
|
|
417
|
+
text-cyan-400
|
|
418
|
+
</div>
|
|
419
|
+
</div>
|
|
420
|
+
</div>
|
|
421
|
+
</div>
|
|
422
|
+
</div>
|
|
423
|
+
|
|
424
|
+
<div className="!space-y-4">
|
|
425
|
+
<h3 className="text-lg font-semibold !text-emerald-300">
|
|
426
|
+
Custom Colors
|
|
427
|
+
</h3>
|
|
428
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
429
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
430
|
+
{`// Using Tailwind classes
|
|
431
|
+
<ExpandIcon className="h-6 w-6 text-emerald-400" />
|
|
432
|
+
<ExpandIcon className="h-6 w-6 text-teal-500" />
|
|
433
|
+
|
|
434
|
+
// Using CSS custom properties
|
|
435
|
+
<ExpandIcon
|
|
436
|
+
className="h-6 w-6"
|
|
437
|
+
style={{ color: 'var(--color-expand)' }}
|
|
438
|
+
/>
|
|
439
|
+
|
|
440
|
+
// Direct stroke prop
|
|
441
|
+
<ExpandIcon
|
|
442
|
+
width={24}
|
|
443
|
+
height={24}
|
|
444
|
+
stroke="#10b981"
|
|
445
|
+
/>`}
|
|
446
|
+
</pre>
|
|
447
|
+
</div>
|
|
448
|
+
</div>
|
|
449
|
+
</div>
|
|
450
|
+
</div>
|
|
451
|
+
|
|
452
|
+
{/* Usage Examples */}
|
|
453
|
+
<div className="!space-y-8">
|
|
454
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
455
|
+
Usage Examples
|
|
456
|
+
</h2>
|
|
457
|
+
|
|
458
|
+
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
459
|
+
{/* Video Player */}
|
|
460
|
+
<div className="!space-y-4">
|
|
461
|
+
<h3 className="text-lg font-semibold !text-emerald-300">
|
|
462
|
+
Video Player
|
|
463
|
+
</h3>
|
|
464
|
+
<div className="!space-y-4">
|
|
465
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-6">
|
|
466
|
+
<div className="relative mb-4 aspect-video overflow-hidden rounded-lg bg-black/50">
|
|
467
|
+
<div className="absolute inset-0 flex items-center justify-center bg-gradient-to-br from-gray-800 to-gray-900">
|
|
468
|
+
<div className="flex h-16 w-16 items-center justify-center rounded-full bg-white/20">
|
|
469
|
+
<div className="ml-1 h-0 w-0 border-y-[8px] border-l-[12px] border-y-transparent border-l-white" />
|
|
470
|
+
</div>
|
|
471
|
+
</div>
|
|
472
|
+
<div className="absolute right-0 bottom-0 left-0 bg-gradient-to-t from-black/80 to-transparent p-4">
|
|
473
|
+
<div className="flex items-center justify-between">
|
|
474
|
+
<div className="flex items-center gap-3">
|
|
475
|
+
<button className="rounded p-2 transition-colors hover:bg-white/20">
|
|
476
|
+
<div className="h-0 w-0 border-y-[6px] border-l-[8px] border-y-transparent border-l-white" />
|
|
477
|
+
</button>
|
|
478
|
+
<span className="text-sm text-white">
|
|
479
|
+
0:42 / 2:18
|
|
480
|
+
</span>
|
|
481
|
+
</div>
|
|
482
|
+
<div className="flex items-center gap-2">
|
|
483
|
+
<button className="rounded p-2 transition-colors hover:bg-white/20">
|
|
484
|
+
<span className="text-xs text-white">HD</span>
|
|
485
|
+
</button>
|
|
486
|
+
<button className="rounded border border-emerald-500/30 bg-emerald-500/10 p-2 transition-colors hover:bg-emerald-500/20">
|
|
487
|
+
<ExpandIcon className="h-4 w-4 text-emerald-400" />
|
|
488
|
+
</button>
|
|
489
|
+
</div>
|
|
490
|
+
</div>
|
|
491
|
+
</div>
|
|
492
|
+
</div>
|
|
493
|
+
<div className="text-center">
|
|
494
|
+
<div className="text-sm font-medium text-white">
|
|
495
|
+
"Exploring the Universe"
|
|
496
|
+
</div>
|
|
497
|
+
<div className="text-xs text-white/60">
|
|
498
|
+
Click expand to enter fullscreen mode
|
|
499
|
+
</div>
|
|
500
|
+
</div>
|
|
501
|
+
</div>
|
|
502
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
503
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
504
|
+
{`// Video player with fullscreen control
|
|
505
|
+
<div className="video-player">
|
|
506
|
+
<video ref={videoRef} className="video-element" />
|
|
507
|
+
<div className="video-controls">
|
|
508
|
+
<div className="control-group-left">
|
|
509
|
+
<PlayButton />
|
|
510
|
+
<TimeDisplay />
|
|
511
|
+
</div>
|
|
512
|
+
<div className="control-group-right">
|
|
513
|
+
<QualitySelector />
|
|
514
|
+
<button
|
|
515
|
+
onClick={enterFullscreen}
|
|
516
|
+
className="fullscreen-btn"
|
|
517
|
+
aria-label="Enter fullscreen"
|
|
518
|
+
>
|
|
519
|
+
<ExpandIcon className="h-4 w-4 text-emerald-400" />
|
|
520
|
+
</button>
|
|
521
|
+
</div>
|
|
522
|
+
</div>
|
|
523
|
+
</div>`}
|
|
524
|
+
</pre>
|
|
525
|
+
</div>
|
|
526
|
+
</div>
|
|
527
|
+
</div>
|
|
528
|
+
|
|
529
|
+
{/* Image Gallery */}
|
|
530
|
+
<div className="!space-y-4">
|
|
531
|
+
<h3 className="text-lg font-semibold !text-emerald-300">
|
|
532
|
+
Image Gallery
|
|
533
|
+
</h3>
|
|
534
|
+
<div className="!space-y-4">
|
|
535
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-6">
|
|
536
|
+
<div className="mb-4 grid grid-cols-2 gap-3">
|
|
537
|
+
{[1, 2, 3, 4].map((img) => (
|
|
538
|
+
<div
|
|
539
|
+
key={img}
|
|
540
|
+
className="group relative aspect-square overflow-hidden rounded-lg bg-gradient-to-br from-gray-700 to-gray-800"
|
|
541
|
+
>
|
|
542
|
+
<div className="absolute inset-0 flex items-center justify-center bg-black/20 opacity-0 transition-opacity group-hover:opacity-100">
|
|
543
|
+
<button className="rounded-lg border border-emerald-500/30 bg-emerald-500/20 p-3 transition-colors hover:bg-emerald-500/30">
|
|
544
|
+
<ExpandIcon className="h-5 w-5 text-emerald-400" />
|
|
545
|
+
</button>
|
|
546
|
+
</div>
|
|
547
|
+
<div className="absolute right-2 bottom-2 opacity-0 transition-opacity group-hover:opacity-100">
|
|
548
|
+
<button className="rounded border border-white/20 bg-black/60 p-1.5 transition-colors hover:border-emerald-500/30 hover:bg-emerald-500/20">
|
|
549
|
+
<ExpandIcon className="h-3 w-3 text-white" />
|
|
550
|
+
</button>
|
|
551
|
+
</div>
|
|
552
|
+
</div>
|
|
553
|
+
))}
|
|
554
|
+
</div>
|
|
555
|
+
<div className="text-center">
|
|
556
|
+
<div className="text-sm font-medium text-white">
|
|
557
|
+
Photography Portfolio
|
|
558
|
+
</div>
|
|
559
|
+
<div className="text-xs text-white/60">
|
|
560
|
+
Hover over images to see expand options
|
|
561
|
+
</div>
|
|
562
|
+
</div>
|
|
563
|
+
</div>
|
|
564
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
565
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
566
|
+
{`// Image gallery with lightbox expand
|
|
567
|
+
<div className="image-gallery">
|
|
568
|
+
{images.map((image, index) => (
|
|
569
|
+
<div key={image.id} className="gallery-item">
|
|
570
|
+
<img src={image.thumbnail} alt={image.alt} />
|
|
571
|
+
<div className="overlay">
|
|
572
|
+
<button
|
|
573
|
+
onClick={() => openLightbox(index)}
|
|
574
|
+
className="expand-btn"
|
|
575
|
+
aria-label="View full size image"
|
|
576
|
+
>
|
|
577
|
+
<ExpandIcon className="h-5 w-5 text-emerald-400" />
|
|
578
|
+
</button>
|
|
579
|
+
</div>
|
|
580
|
+
</div>
|
|
581
|
+
))}
|
|
582
|
+
</div>
|
|
583
|
+
|
|
584
|
+
<Lightbox
|
|
585
|
+
isOpen={lightboxOpen}
|
|
586
|
+
images={images}
|
|
587
|
+
currentIndex={currentIndex}
|
|
588
|
+
onClose={closeLightbox}
|
|
589
|
+
/>`}
|
|
590
|
+
</pre>
|
|
591
|
+
</div>
|
|
592
|
+
</div>
|
|
593
|
+
</div>
|
|
594
|
+
|
|
595
|
+
{/* Modal Dialog */}
|
|
596
|
+
<div className="!space-y-4">
|
|
597
|
+
<h3 className="text-lg font-semibold !text-emerald-300">
|
|
598
|
+
Modal Dialog
|
|
599
|
+
</h3>
|
|
600
|
+
<div className="!space-y-4">
|
|
601
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-6">
|
|
602
|
+
<div className="rounded-lg border border-white/20 bg-black/50 p-6">
|
|
603
|
+
<div className="mb-4 flex items-start justify-between">
|
|
604
|
+
<div>
|
|
605
|
+
<h4 className="text-lg font-semibold text-white">
|
|
606
|
+
Document Preview
|
|
607
|
+
</h4>
|
|
608
|
+
<p className="text-sm text-white/60">
|
|
609
|
+
quarterly-report-2024.pdf
|
|
610
|
+
</p>
|
|
611
|
+
</div>
|
|
612
|
+
<div className="flex items-center gap-2">
|
|
613
|
+
<button className="rounded border border-emerald-500/30 bg-emerald-500/10 p-2 transition-colors hover:bg-emerald-500/20">
|
|
614
|
+
<ExpandIcon className="h-4 w-4 text-emerald-400" />
|
|
615
|
+
</button>
|
|
616
|
+
<button className="rounded p-2 transition-colors hover:bg-white/20">
|
|
617
|
+
<div className="relative h-4 w-4">
|
|
618
|
+
<div className="absolute inset-0 rotate-45 border border-white"></div>
|
|
619
|
+
<div className="absolute inset-0 -rotate-45 border border-white"></div>
|
|
620
|
+
</div>
|
|
621
|
+
</button>
|
|
622
|
+
</div>
|
|
623
|
+
</div>
|
|
624
|
+
<div className="mb-4 flex aspect-[4/5] items-center justify-center rounded border border-white/20 bg-white/10">
|
|
625
|
+
<div className="text-center">
|
|
626
|
+
<div className="mx-auto mb-2 h-20 w-16 rounded bg-white/20"></div>
|
|
627
|
+
<div className="text-xs text-white/60">
|
|
628
|
+
PDF Preview
|
|
629
|
+
</div>
|
|
630
|
+
</div>
|
|
631
|
+
</div>
|
|
632
|
+
<div className="flex items-center justify-between">
|
|
633
|
+
<span className="text-xs text-white/60">
|
|
634
|
+
Page 1 of 24
|
|
635
|
+
</span>
|
|
636
|
+
<div className="flex gap-2">
|
|
637
|
+
<button className="rounded bg-white/10 px-3 py-1 text-xs text-white transition-colors hover:bg-white/20">
|
|
638
|
+
Download
|
|
639
|
+
</button>
|
|
640
|
+
<button className="rounded bg-emerald-500/20 px-3 py-1 text-xs text-emerald-200 transition-colors hover:bg-emerald-500/30">
|
|
641
|
+
Full View
|
|
642
|
+
</button>
|
|
643
|
+
</div>
|
|
644
|
+
</div>
|
|
645
|
+
</div>
|
|
646
|
+
</div>
|
|
647
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
648
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
649
|
+
{`// Modal with expand to fullscreen
|
|
650
|
+
<Modal isOpen={isModalOpen} onClose={closeModal}>
|
|
651
|
+
<div className="modal-header">
|
|
652
|
+
<div className="modal-title">
|
|
653
|
+
<h3>Document Preview</h3>
|
|
654
|
+
<p>{document.name}</p>
|
|
655
|
+
</div>
|
|
656
|
+
<div className="modal-actions">
|
|
657
|
+
<button
|
|
658
|
+
onClick={expandToFullscreen}
|
|
659
|
+
className="expand-btn"
|
|
660
|
+
aria-label="Expand to fullscreen"
|
|
661
|
+
>
|
|
662
|
+
<ExpandIcon className="h-4 w-4 text-emerald-400" />
|
|
663
|
+
</button>
|
|
664
|
+
<CloseButton onClick={closeModal} />
|
|
665
|
+
</div>
|
|
666
|
+
</div>
|
|
667
|
+
<div className="modal-content">
|
|
668
|
+
<DocumentViewer document={document} />
|
|
669
|
+
</div>
|
|
670
|
+
</Modal>`}
|
|
671
|
+
</pre>
|
|
672
|
+
</div>
|
|
673
|
+
</div>
|
|
674
|
+
</div>
|
|
675
|
+
|
|
676
|
+
{/* Dashboard Widget */}
|
|
677
|
+
<div className="!space-y-4">
|
|
678
|
+
<h3 className="text-lg font-semibold !text-emerald-300">
|
|
679
|
+
Dashboard Widget
|
|
680
|
+
</h3>
|
|
681
|
+
<div className="!space-y-4">
|
|
682
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-6">
|
|
683
|
+
<div className="rounded-lg border border-white/10 bg-black/30 p-4">
|
|
684
|
+
<div className="mb-4 flex items-center justify-between">
|
|
685
|
+
<div>
|
|
686
|
+
<h4 className="text-sm font-semibold text-white">
|
|
687
|
+
Analytics Overview
|
|
688
|
+
</h4>
|
|
689
|
+
<p className="text-xs text-white/60">
|
|
690
|
+
Last 30 days
|
|
691
|
+
</p>
|
|
692
|
+
</div>
|
|
693
|
+
<button className="rounded border border-emerald-500/30 bg-emerald-500/10 p-1.5 transition-colors hover:bg-emerald-500/20">
|
|
694
|
+
<ExpandIcon className="h-3 w-3 text-emerald-400" />
|
|
695
|
+
</button>
|
|
696
|
+
</div>
|
|
697
|
+
<div className="mb-4 grid grid-cols-2 gap-4">
|
|
698
|
+
<div className="text-center">
|
|
699
|
+
<div className="text-2xl font-bold text-emerald-400">
|
|
700
|
+
12.5K
|
|
701
|
+
</div>
|
|
702
|
+
<div className="text-xs text-white/60">
|
|
703
|
+
Visitors
|
|
704
|
+
</div>
|
|
705
|
+
</div>
|
|
706
|
+
<div className="text-center">
|
|
707
|
+
<div className="text-2xl font-bold text-teal-400">
|
|
708
|
+
84%
|
|
709
|
+
</div>
|
|
710
|
+
<div className="text-xs text-white/60">
|
|
711
|
+
Conversion
|
|
712
|
+
</div>
|
|
713
|
+
</div>
|
|
714
|
+
</div>
|
|
715
|
+
<div className="flex h-16 items-end gap-1 rounded bg-white/5 p-2">
|
|
716
|
+
{[0.3, 0.7, 0.5, 0.8, 0.6, 0.9, 0.4, 0.7].map(
|
|
717
|
+
(height, i) => (
|
|
718
|
+
<div
|
|
719
|
+
key={i}
|
|
720
|
+
className="flex-1 rounded-sm bg-emerald-400/60"
|
|
721
|
+
style={{ height: `${height * 100}%` }}
|
|
722
|
+
/>
|
|
723
|
+
)
|
|
724
|
+
)}
|
|
725
|
+
</div>
|
|
726
|
+
</div>
|
|
727
|
+
</div>
|
|
728
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
729
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
730
|
+
{`// Dashboard widget with expand option
|
|
731
|
+
<div className="dashboard-widget">
|
|
732
|
+
<div className="widget-header">
|
|
733
|
+
<div className="widget-info">
|
|
734
|
+
<h3>{widget.title}</h3>
|
|
735
|
+
<p>{widget.subtitle}</p>
|
|
736
|
+
</div>
|
|
737
|
+
<button
|
|
738
|
+
onClick={() => expandWidget(widget.id)}
|
|
739
|
+
className="expand-widget-btn"
|
|
740
|
+
aria-label="Expand widget to full view"
|
|
741
|
+
>
|
|
742
|
+
<ExpandIcon className="h-3 w-3 text-emerald-400" />
|
|
743
|
+
</button>
|
|
744
|
+
</div>
|
|
745
|
+
<div className="widget-content">
|
|
746
|
+
<MetricsDisplay data={widget.data} />
|
|
747
|
+
<Chart data={widget.chartData} compact />
|
|
748
|
+
</div>
|
|
749
|
+
</div>`}
|
|
750
|
+
</pre>
|
|
751
|
+
</div>
|
|
752
|
+
</div>
|
|
753
|
+
</div>
|
|
754
|
+
</div>
|
|
755
|
+
</div>
|
|
756
|
+
|
|
757
|
+
{/* Accessibility */}
|
|
758
|
+
<div className="!space-y-8">
|
|
759
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
760
|
+
Accessibility Features
|
|
761
|
+
</h2>
|
|
762
|
+
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
|
|
763
|
+
<div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
764
|
+
<h3 className="text-lg font-semibold !text-green-300">
|
|
765
|
+
✅ Built-in Features
|
|
766
|
+
</h3>
|
|
767
|
+
<ul className="!space-y-2 text-sm !text-white/70">
|
|
768
|
+
<li className="!text-white/70">
|
|
769
|
+
Uses Radix UI AccessibleIcon wrapper
|
|
770
|
+
</li>
|
|
771
|
+
<li className="!text-white/70">
|
|
772
|
+
Provides screen reader label "Expand icon"
|
|
773
|
+
</li>
|
|
774
|
+
<li className="!text-white/70">
|
|
775
|
+
Supports keyboard navigation when interactive
|
|
776
|
+
</li>
|
|
777
|
+
<li className="!text-white/70">
|
|
778
|
+
Maintains proper color contrast ratios
|
|
779
|
+
</li>
|
|
780
|
+
<li className="!text-white/70">
|
|
781
|
+
Uses square strokeLinecap for crisp visual clarity
|
|
782
|
+
</li>
|
|
783
|
+
</ul>
|
|
784
|
+
</div>
|
|
785
|
+
|
|
786
|
+
<div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
787
|
+
<h3 className="text-lg font-semibold !text-emerald-300">
|
|
788
|
+
💡 Best Practices
|
|
789
|
+
</h3>
|
|
790
|
+
<ul className="!space-y-2 text-sm text-white/70">
|
|
791
|
+
<li className="!text-white/70">
|
|
792
|
+
Always provide descriptive aria-labels for expand
|
|
793
|
+
actions
|
|
794
|
+
</li>
|
|
795
|
+
<li className="!text-white/70">
|
|
796
|
+
Use consistent placement in media control groups
|
|
797
|
+
</li>
|
|
798
|
+
<li className="!text-white/70">
|
|
799
|
+
Ensure sufficient touch target size (44px minimum)
|
|
800
|
+
</li>
|
|
801
|
+
<li className="!text-white/70">
|
|
802
|
+
Provide visible focus states for keyboard users
|
|
803
|
+
</li>
|
|
804
|
+
<li className="!text-white/70">
|
|
805
|
+
Consider Escape key handling for fullscreen mode
|
|
806
|
+
</li>
|
|
807
|
+
</ul>
|
|
808
|
+
</div>
|
|
809
|
+
</div>
|
|
810
|
+
|
|
811
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-6">
|
|
812
|
+
<h3 className="mb-4 text-lg font-semibold !text-blue-300">
|
|
813
|
+
Proper ARIA Implementation
|
|
814
|
+
</h3>
|
|
815
|
+
<div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
|
|
816
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
817
|
+
<pre className="overflow-x-auto text-sm !text-cyan-300">
|
|
818
|
+
{`// Video player fullscreen control
|
|
819
|
+
<div className="video-controls">
|
|
820
|
+
<button
|
|
821
|
+
aria-label="Enter fullscreen mode"
|
|
822
|
+
onClick={enterFullscreen}
|
|
823
|
+
onKeyDown={handleKeyDown}
|
|
824
|
+
>
|
|
825
|
+
<ExpandIcon className="h-6 w-6 text-emerald-400" />
|
|
826
|
+
</button>
|
|
827
|
+
</div>
|
|
828
|
+
|
|
829
|
+
// Modal expand button
|
|
830
|
+
<button
|
|
831
|
+
aria-label="Expand to fullscreen view"
|
|
832
|
+
aria-expanded={isFullscreen}
|
|
833
|
+
onClick={toggleFullscreen}
|
|
834
|
+
>
|
|
835
|
+
<ExpandIcon className="h-4 w-4" />
|
|
836
|
+
</button>
|
|
837
|
+
|
|
838
|
+
// Image gallery expand
|
|
839
|
+
<button
|
|
840
|
+
aria-label="View full size image"
|
|
841
|
+
onClick={() => openLightbox(imageIndex)}
|
|
842
|
+
aria-describedby="expand-hint"
|
|
843
|
+
>
|
|
844
|
+
<ExpandIcon className="h-5 w-5 text-emerald-400" />
|
|
845
|
+
</button>
|
|
846
|
+
<div id="expand-hint" className="sr-only">
|
|
847
|
+
Opens image in fullscreen lightbox
|
|
848
|
+
</div>
|
|
849
|
+
|
|
850
|
+
// Dashboard widget expand
|
|
851
|
+
<button
|
|
852
|
+
aria-label="Expand analytics widget"
|
|
853
|
+
aria-controls="analytics-widget"
|
|
854
|
+
onClick={() => expandWidget('analytics')}
|
|
855
|
+
>
|
|
856
|
+
<ExpandIcon className="h-3 w-3" />
|
|
857
|
+
</button>`}
|
|
858
|
+
</pre>
|
|
859
|
+
</div>
|
|
860
|
+
<div className="!space-y-4">
|
|
861
|
+
<p className="text-sm !text-white/70">
|
|
862
|
+
When using ExpandIcon for fullscreen controls, always
|
|
863
|
+
provide clear context about what will be expanded and
|
|
864
|
+
how users can exit fullscreen mode.
|
|
865
|
+
</p>
|
|
866
|
+
<div className="rounded-lg border border-emerald-500/20 bg-emerald-500/10 p-4">
|
|
867
|
+
<div className="flex items-center gap-2 text-sm text-emerald-200">
|
|
868
|
+
<ExpandIcon className="h-4 w-4" />
|
|
869
|
+
<span>
|
|
870
|
+
Include keyboard shortcuts (F11, Escape) in tooltips
|
|
871
|
+
</span>
|
|
872
|
+
</div>
|
|
873
|
+
</div>
|
|
874
|
+
</div>
|
|
875
|
+
</div>
|
|
876
|
+
</div>
|
|
877
|
+
</div>
|
|
878
|
+
|
|
879
|
+
{/* Related Icons */}
|
|
880
|
+
<div className="!space-y-8">
|
|
881
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
882
|
+
Related Icons
|
|
883
|
+
</h2>
|
|
884
|
+
<div className="grid grid-cols-2 gap-6 md:grid-cols-4">
|
|
885
|
+
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
886
|
+
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-red-500/20">
|
|
887
|
+
<span className="!text-2xl !text-white">⤡</span>
|
|
888
|
+
</div>
|
|
889
|
+
<div>
|
|
890
|
+
<div className="font-medium text-white">CollapseIcon</div>
|
|
891
|
+
<div className="text-xs text-white/60">
|
|
892
|
+
Exit fullscreen
|
|
893
|
+
</div>
|
|
894
|
+
</div>
|
|
895
|
+
</div>
|
|
896
|
+
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
897
|
+
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-blue-500/20">
|
|
898
|
+
<span className="!text-2xl !text-white">⛶</span>
|
|
899
|
+
</div>
|
|
900
|
+
<div>
|
|
901
|
+
<div className="font-medium text-white">MaximizeIcon</div>
|
|
902
|
+
<div className="text-xs text-white/60">
|
|
903
|
+
Window maximize
|
|
904
|
+
</div>
|
|
905
|
+
</div>
|
|
906
|
+
</div>
|
|
907
|
+
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
908
|
+
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-purple-500/20">
|
|
909
|
+
<span className="!text-2xl !text-white">🔍</span>
|
|
910
|
+
</div>
|
|
911
|
+
<div>
|
|
912
|
+
<div className="font-medium text-white">ZoomInIcon</div>
|
|
913
|
+
<div className="text-xs text-white/60">Zoom in</div>
|
|
914
|
+
</div>
|
|
915
|
+
</div>
|
|
916
|
+
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
917
|
+
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-yellow-500/20">
|
|
918
|
+
<span className="!text-2xl !text-white">⊞</span>
|
|
919
|
+
</div>
|
|
920
|
+
<div>
|
|
921
|
+
<div className="font-medium text-white">WindowIcon</div>
|
|
922
|
+
<div className="text-xs text-white/60">
|
|
923
|
+
Window controls
|
|
924
|
+
</div>
|
|
925
|
+
</div>
|
|
926
|
+
</div>
|
|
927
|
+
</div>
|
|
928
|
+
</div>
|
|
929
|
+
</div>
|
|
930
|
+
|
|
931
|
+
{/* Footer */}
|
|
932
|
+
<div className="border-t border-white/10 bg-black/20 backdrop-blur-xl">
|
|
933
|
+
<div className="!mx-auto max-w-7xl px-6 py-8">
|
|
934
|
+
<div className="!space-y-4 text-center">
|
|
935
|
+
<p className="!text-white/60">
|
|
936
|
+
ExpandIcon is part of the Aural UI icon library, built with
|
|
937
|
+
accessibility and fullscreen interaction best practices in
|
|
938
|
+
mind.
|
|
939
|
+
</p>
|
|
940
|
+
<p className="text-sm !text-white/40">
|
|
941
|
+
All icons use Radix UI's AccessibleIcon for screen reader
|
|
942
|
+
compatibility and follow WCAG guidelines for interactive
|
|
943
|
+
elements and keyboard navigation.
|
|
944
|
+
</p>
|
|
945
|
+
</div>
|
|
946
|
+
</div>
|
|
947
|
+
</div>
|
|
948
|
+
</div>
|
|
949
|
+
</>
|
|
950
|
+
),
|
|
951
|
+
},
|
|
952
|
+
},
|
|
953
|
+
tags: ["autodocs"],
|
|
954
|
+
argTypes: {
|
|
955
|
+
width: {
|
|
956
|
+
control: { type: "range", min: 8, max: 96, step: 2 },
|
|
957
|
+
description: "Width of the icon in pixels",
|
|
958
|
+
},
|
|
959
|
+
height: {
|
|
960
|
+
control: { type: "range", min: 8, max: 96, step: 2 },
|
|
961
|
+
description: "Height of the icon in pixels",
|
|
962
|
+
},
|
|
963
|
+
stroke: {
|
|
964
|
+
control: "color",
|
|
965
|
+
description: "Stroke color of the icon",
|
|
966
|
+
},
|
|
967
|
+
strokeWidth: {
|
|
968
|
+
control: { type: "range", min: 0.5, max: 4, step: 0.5 },
|
|
969
|
+
description: "Width of the stroke",
|
|
970
|
+
},
|
|
971
|
+
strokeLinecap: {
|
|
972
|
+
control: { type: "select" },
|
|
973
|
+
options: ["round", "square", "butt"],
|
|
974
|
+
description: "Style of line endings",
|
|
975
|
+
},
|
|
976
|
+
className: {
|
|
977
|
+
control: "text",
|
|
978
|
+
description: "CSS classes for styling (use for overrides)",
|
|
979
|
+
},
|
|
980
|
+
onClick: {
|
|
981
|
+
action: "clicked",
|
|
982
|
+
description: "Click handler for interactive use",
|
|
983
|
+
},
|
|
984
|
+
},
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
export default meta
|
|
988
|
+
type Story = StoryObj<typeof ExpandIcon>
|
|
989
|
+
|
|
990
|
+
// Story parameters for consistent dark theme
|
|
991
|
+
const storyParameters = {
|
|
992
|
+
backgrounds: {
|
|
993
|
+
default: "dark",
|
|
994
|
+
values: [
|
|
995
|
+
{ name: "dark", value: "#0a0a0a" },
|
|
996
|
+
{ name: "darker", value: "#000000" },
|
|
997
|
+
],
|
|
998
|
+
},
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
export const Default: Story = {
|
|
1002
|
+
args: {
|
|
1003
|
+
className: "h-8 w-8 text-emerald-400",
|
|
1004
|
+
},
|
|
1005
|
+
parameters: storyParameters,
|
|
1006
|
+
render: (args) => (
|
|
1007
|
+
<div className="flex h-32 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
|
|
1008
|
+
<ExpandIcon {...args} />
|
|
1009
|
+
</div>
|
|
1010
|
+
),
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
export const SizeVariations: Story = {
|
|
1014
|
+
parameters: {
|
|
1015
|
+
...storyParameters,
|
|
1016
|
+
docs: {
|
|
1017
|
+
description: {
|
|
1018
|
+
story:
|
|
1019
|
+
"ExpandIcon in different sizes, from small UI controls to large fullscreen buttons.",
|
|
1020
|
+
},
|
|
1021
|
+
},
|
|
1022
|
+
},
|
|
1023
|
+
render: () => (
|
|
1024
|
+
<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">
|
|
1025
|
+
<div className="text-center">
|
|
1026
|
+
<ExpandIcon className="!mx-auto mb-2 h-3 w-3 text-emerald-400" />
|
|
1027
|
+
<span className="text-xs text-white/60">12px</span>
|
|
1028
|
+
</div>
|
|
1029
|
+
<div className="text-center">
|
|
1030
|
+
<ExpandIcon className="!mx-auto mb-2 h-4 w-4 text-emerald-400" />
|
|
1031
|
+
<span className="text-xs text-white/60">16px</span>
|
|
1032
|
+
</div>
|
|
1033
|
+
<div className="text-center">
|
|
1034
|
+
<ExpandIcon className="!mx-auto mb-2 h-5 w-5 text-emerald-400" />
|
|
1035
|
+
<span className="text-xs text-white/60">20px</span>
|
|
1036
|
+
</div>
|
|
1037
|
+
<div className="text-center">
|
|
1038
|
+
<ExpandIcon className="!mx-auto mb-2 h-6 w-6 text-emerald-400" />
|
|
1039
|
+
<span className="text-xs text-white/60">24px</span>
|
|
1040
|
+
</div>
|
|
1041
|
+
<div className="text-center">
|
|
1042
|
+
<ExpandIcon className="!mx-auto mb-2 h-8 w-8 text-emerald-400" />
|
|
1043
|
+
<span className="text-xs text-white/60">32px</span>
|
|
1044
|
+
</div>
|
|
1045
|
+
<div className="text-center">
|
|
1046
|
+
<ExpandIcon className="!mx-auto mb-2 h-12 w-12 text-emerald-400" />
|
|
1047
|
+
<span className="text-xs text-white/60">48px</span>
|
|
1048
|
+
</div>
|
|
1049
|
+
</div>
|
|
1050
|
+
),
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
export const ColorVariations: Story = {
|
|
1054
|
+
parameters: {
|
|
1055
|
+
...storyParameters,
|
|
1056
|
+
docs: {
|
|
1057
|
+
description: {
|
|
1058
|
+
story:
|
|
1059
|
+
"ExpandIcon in different semantic colors for various expand and fullscreen applications.",
|
|
1060
|
+
},
|
|
1061
|
+
},
|
|
1062
|
+
},
|
|
1063
|
+
render: () => (
|
|
1064
|
+
<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">
|
|
1065
|
+
<div className="text-center">
|
|
1066
|
+
<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">
|
|
1067
|
+
<ExpandIcon className="h-8 w-8 text-emerald-400" />
|
|
1068
|
+
</div>
|
|
1069
|
+
<div className="text-sm font-medium text-white">Expand</div>
|
|
1070
|
+
<div className="text-xs text-emerald-400">text-emerald-400</div>
|
|
1071
|
+
</div>
|
|
1072
|
+
<div className="text-center">
|
|
1073
|
+
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-teal-500/30 bg-teal-500/20">
|
|
1074
|
+
<ExpandIcon className="h-8 w-8 text-teal-400" />
|
|
1075
|
+
</div>
|
|
1076
|
+
<div className="text-sm font-medium text-white">Maximize</div>
|
|
1077
|
+
<div className="text-xs text-teal-400">text-teal-400</div>
|
|
1078
|
+
</div>
|
|
1079
|
+
<div className="text-center">
|
|
1080
|
+
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-green-500/30 bg-green-500/20">
|
|
1081
|
+
<ExpandIcon className="h-8 w-8 text-green-400" />
|
|
1082
|
+
</div>
|
|
1083
|
+
<div className="text-sm font-medium text-white">Active</div>
|
|
1084
|
+
<div className="text-xs text-green-400">text-green-400</div>
|
|
1085
|
+
</div>
|
|
1086
|
+
<div className="text-center">
|
|
1087
|
+
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-cyan-500/30 bg-cyan-500/20">
|
|
1088
|
+
<ExpandIcon className="h-8 w-8 text-cyan-400" />
|
|
1089
|
+
</div>
|
|
1090
|
+
<div className="text-sm font-medium text-white">Focus</div>
|
|
1091
|
+
<div className="text-xs text-cyan-400">text-cyan-400</div>
|
|
1092
|
+
</div>
|
|
1093
|
+
</div>
|
|
1094
|
+
),
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
export const UsageExamples: Story = {
|
|
1098
|
+
parameters: {
|
|
1099
|
+
...storyParameters,
|
|
1100
|
+
docs: {
|
|
1101
|
+
description: {
|
|
1102
|
+
story:
|
|
1103
|
+
"Real-world usage examples showing ExpandIcon in different fullscreen and maximize contexts.",
|
|
1104
|
+
},
|
|
1105
|
+
},
|
|
1106
|
+
},
|
|
1107
|
+
render: () => (
|
|
1108
|
+
<div className="min-h-dvh !space-y-8 rounded-lg bg-gradient-to-br from-gray-900 to-gray-800 p-8">
|
|
1109
|
+
{/* Video Player */}
|
|
1110
|
+
<div className="!space-y-2">
|
|
1111
|
+
<h3 className="text-sm font-medium text-white">
|
|
1112
|
+
Video Player Controls
|
|
1113
|
+
</h3>
|
|
1114
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-4">
|
|
1115
|
+
<div className="flex items-center justify-between">
|
|
1116
|
+
<div className="flex items-center gap-3">
|
|
1117
|
+
<div className="h-0 w-0 border-y-[6px] border-l-[8px] border-y-transparent border-l-white" />
|
|
1118
|
+
<span className="text-sm text-white">0:42 / 2:18</span>
|
|
1119
|
+
</div>
|
|
1120
|
+
<button className="rounded border border-emerald-500/30 bg-emerald-500/10 p-2 transition-colors hover:bg-emerald-500/20">
|
|
1121
|
+
<ExpandIcon className="h-4 w-4 text-emerald-400" />
|
|
1122
|
+
</button>
|
|
1123
|
+
</div>
|
|
1124
|
+
</div>
|
|
1125
|
+
</div>
|
|
1126
|
+
|
|
1127
|
+
{/* Image Gallery */}
|
|
1128
|
+
<div className="!space-y-2">
|
|
1129
|
+
<h3 className="text-sm font-medium text-white">Image Gallery</h3>
|
|
1130
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-4">
|
|
1131
|
+
<div className="group relative aspect-square rounded-lg bg-gradient-to-br from-gray-700 to-gray-800">
|
|
1132
|
+
<div className="absolute top-2 right-2">
|
|
1133
|
+
<button className="rounded border border-white/20 bg-black/60 p-1.5 transition-colors hover:border-emerald-500/30 hover:bg-emerald-500/20">
|
|
1134
|
+
<ExpandIcon className="h-3 w-3 text-white" />
|
|
1135
|
+
</button>
|
|
1136
|
+
</div>
|
|
1137
|
+
</div>
|
|
1138
|
+
</div>
|
|
1139
|
+
</div>
|
|
1140
|
+
</div>
|
|
1141
|
+
),
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1144
|
+
export const Playground: Story = {
|
|
1145
|
+
parameters: {
|
|
1146
|
+
...storyParameters,
|
|
1147
|
+
docs: {
|
|
1148
|
+
description: {
|
|
1149
|
+
story:
|
|
1150
|
+
"Interactive playground to experiment with different ExpandIcon configurations.",
|
|
1151
|
+
},
|
|
1152
|
+
},
|
|
1153
|
+
},
|
|
1154
|
+
args: {
|
|
1155
|
+
width: 24,
|
|
1156
|
+
height: 24,
|
|
1157
|
+
className: "text-emerald-400",
|
|
1158
|
+
strokeLinecap: "square",
|
|
1159
|
+
},
|
|
1160
|
+
render: (args) => (
|
|
1161
|
+
<div className="flex h-64 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
|
|
1162
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-8">
|
|
1163
|
+
<ExpandIcon {...args} />
|
|
1164
|
+
</div>
|
|
1165
|
+
</div>
|
|
1166
|
+
),
|
|
1167
|
+
}
|