aural-ui 2.1.18 → 2.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/button/Button.stories.tsx +122 -1
- package/dist/components/button/index.tsx +39 -1
- package/dist/components/chip/index.tsx +1 -1
- package/dist/icons/image-avatar-sparkle-icon/ImageAvatarSparkleIcon.stories.tsx +749 -0
- package/dist/icons/image-avatar-sparkle-icon/index.tsx +41 -0
- package/dist/icons/image-avatar-sparkle-icon/meta.ts +8 -0
- package/dist/icons/index.ts +3 -0
- package/dist/icons/magic-edit-icon/MagicEditIcon.stories.tsx +742 -0
- package/dist/icons/magic-edit-icon/index.tsx +46 -0
- package/dist/icons/magic-edit-icon/meta.ts +8 -0
- package/dist/icons/page-text-icon/PageTextIcon.stories.tsx +747 -0
- package/dist/icons/page-text-icon/index.tsx +32 -0
- package/dist/icons/page-text-icon/meta.ts +8 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/styles/aural-theme.css +6 -0
- package/package.json +1 -1
|
@@ -0,0 +1,749 @@
|
|
|
1
|
+
import React from "react"
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react-vite"
|
|
3
|
+
|
|
4
|
+
import { ImageAvatarSparkleIcon } from "."
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof ImageAvatarSparkleIcon> = {
|
|
7
|
+
title: "Icons/ImageAvatarSparkleIcon",
|
|
8
|
+
component: ImageAvatarSparkleIcon,
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: "centered",
|
|
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
|
+
description: {
|
|
21
|
+
component:
|
|
22
|
+
"An image avatar icon with sparkle elements representing user profiles with enhanced visual appeal.",
|
|
23
|
+
},
|
|
24
|
+
canvas: {
|
|
25
|
+
sourceState: "shown",
|
|
26
|
+
},
|
|
27
|
+
page: () => (
|
|
28
|
+
<>
|
|
29
|
+
{/* Override default docs styling */}
|
|
30
|
+
<style>
|
|
31
|
+
{`
|
|
32
|
+
.sbdocs-wrapper {
|
|
33
|
+
padding: 0 !important;
|
|
34
|
+
max-width: none !important;
|
|
35
|
+
background: transparent !important;
|
|
36
|
+
}
|
|
37
|
+
.sbdocs-content {
|
|
38
|
+
max-width: none !important;
|
|
39
|
+
padding: 0 !important;
|
|
40
|
+
margin: 0 !important;
|
|
41
|
+
background: transparent !important;
|
|
42
|
+
}
|
|
43
|
+
.docs-story {
|
|
44
|
+
background: transparent !important;
|
|
45
|
+
}
|
|
46
|
+
.sbdocs {
|
|
47
|
+
background: transparent !important;
|
|
48
|
+
}
|
|
49
|
+
body {
|
|
50
|
+
background: #0a0a0a !important;
|
|
51
|
+
}
|
|
52
|
+
#storybook-docs {
|
|
53
|
+
background: #0a0a0a !important;
|
|
54
|
+
}
|
|
55
|
+
.sbdocs-preview {
|
|
56
|
+
background: transparent !important;
|
|
57
|
+
border: none !important;
|
|
58
|
+
}
|
|
59
|
+
.sbdocs-h1, .sbdocs-h2, .sbdocs-h3, .sbdocs-h4, .sbdocs-h5, .sbdocs-h6 {
|
|
60
|
+
color: white !important;
|
|
61
|
+
}
|
|
62
|
+
.sbdocs-p, .sbdocs-li {
|
|
63
|
+
color: rgba(255, 255, 255, 0.7) !important;
|
|
64
|
+
}
|
|
65
|
+
.sbdocs-code {
|
|
66
|
+
background: rgba(255, 255, 255, 0.1) !important;
|
|
67
|
+
color: rgba(168, 85, 247, 1) !important;
|
|
68
|
+
border: 1px solid rgba(255, 255, 255, 0.1) !important;
|
|
69
|
+
}
|
|
70
|
+
.sbdocs-pre {
|
|
71
|
+
background: rgba(0, 0, 0, 0.4) !important;
|
|
72
|
+
border: 1px solid rgba(255, 255, 255, 0.1) !important;
|
|
73
|
+
}
|
|
74
|
+
.sbdocs-table {
|
|
75
|
+
background: rgba(255, 255, 255, 0.05) !important;
|
|
76
|
+
border: 1px solid rgba(255, 255, 255, 0.1) !important;
|
|
77
|
+
}
|
|
78
|
+
.sbdocs-table th {
|
|
79
|
+
background: rgba(255, 255, 255, 0.05) !important;
|
|
80
|
+
color: white !important;
|
|
81
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
|
|
82
|
+
}
|
|
83
|
+
.sbdocs-table td {
|
|
84
|
+
color: rgba(255, 255, 255, 0.7) !important;
|
|
85
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
|
|
86
|
+
}
|
|
87
|
+
`}
|
|
88
|
+
</style>
|
|
89
|
+
|
|
90
|
+
<div className="min-h-screen bg-gradient-to-br from-gray-900 via-indigo-900/20 to-gray-900">
|
|
91
|
+
{/* Header */}
|
|
92
|
+
<div className="relative overflow-hidden border-b border-white/10 bg-black/20 backdrop-blur-xl">
|
|
93
|
+
<div className="absolute inset-0 bg-gradient-to-r from-indigo-500/10 via-transparent to-cyan-500/10" />
|
|
94
|
+
<div className="relative !mx-auto max-w-7xl px-6 py-16">
|
|
95
|
+
<div className="!space-y-6 text-center">
|
|
96
|
+
<div className="!mx-auto flex h-24 w-24 items-center justify-center rounded-2xl border border-indigo-500/30 bg-gradient-to-br from-indigo-500/20 to-cyan-500/20">
|
|
97
|
+
<ImageAvatarSparkleIcon className="h-12 w-12 text-indigo-400" />
|
|
98
|
+
</div>
|
|
99
|
+
<h1 className="text-5xl font-bold !text-white">
|
|
100
|
+
ImageAvatarSparkleIcon
|
|
101
|
+
</h1>
|
|
102
|
+
<p className="!mx-auto max-w-3xl text-xl leading-relaxed !text-white/70">
|
|
103
|
+
An image avatar icon with sparkle elements representing user
|
|
104
|
+
profiles with enhanced visual appeal. Perfect for user
|
|
105
|
+
interfaces, profile displays, and avatar representations.
|
|
106
|
+
</p>
|
|
107
|
+
|
|
108
|
+
{/* Stats */}
|
|
109
|
+
<div className="mx-auto flex items-center justify-center gap-8">
|
|
110
|
+
<div className="text-center">
|
|
111
|
+
<div className="text-3xl font-bold text-indigo-300">
|
|
112
|
+
Avatar
|
|
113
|
+
</div>
|
|
114
|
+
<div className="text-sm text-white/80">User profile</div>
|
|
115
|
+
</div>
|
|
116
|
+
<div className="h-8 w-px bg-white/20" />
|
|
117
|
+
<div className="text-center">
|
|
118
|
+
<div className="text-3xl font-bold text-cyan-300">
|
|
119
|
+
Sparkle
|
|
120
|
+
</div>
|
|
121
|
+
<div className="text-sm text-white/80">
|
|
122
|
+
Enhanced visual
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
<div className="h-8 w-px bg-white/20" />
|
|
126
|
+
<div className="text-center">
|
|
127
|
+
<div className="text-3xl font-bold text-blue-300">
|
|
128
|
+
Accessible
|
|
129
|
+
</div>
|
|
130
|
+
<div className="text-sm text-white/80">
|
|
131
|
+
Screen reader support
|
|
132
|
+
</div>
|
|
133
|
+
</div>
|
|
134
|
+
</div>
|
|
135
|
+
</div>
|
|
136
|
+
</div>
|
|
137
|
+
</div>
|
|
138
|
+
|
|
139
|
+
{/* Content */}
|
|
140
|
+
<div className="!mx-auto flex max-w-7xl flex-col gap-6 space-y-16 px-6 py-16">
|
|
141
|
+
{/* Features */}
|
|
142
|
+
<div className="!space-y-8">
|
|
143
|
+
<h3 className="text-center text-2xl font-bold !text-white">
|
|
144
|
+
Key Features
|
|
145
|
+
</h3>
|
|
146
|
+
<div className="grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3">
|
|
147
|
+
<div className="space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
148
|
+
<div className="text-3xl">👤</div>
|
|
149
|
+
<h4 className="text-lg font-semibold !text-white">
|
|
150
|
+
Avatar Icon
|
|
151
|
+
</h4>
|
|
152
|
+
<p className="text-sm !text-white/80">
|
|
153
|
+
Clear representation of user profiles
|
|
154
|
+
</p>
|
|
155
|
+
</div>
|
|
156
|
+
<div className="space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
157
|
+
<div className="text-3xl">✨</div>
|
|
158
|
+
<h4 className="text-lg font-semibold !text-white">
|
|
159
|
+
Sparkle Effect
|
|
160
|
+
</h4>
|
|
161
|
+
<p className="text-sm !text-white/80">
|
|
162
|
+
Enhanced visual appeal with sparkles
|
|
163
|
+
</p>
|
|
164
|
+
</div>
|
|
165
|
+
<div className="space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
166
|
+
<div className="text-3xl">♿</div>
|
|
167
|
+
<h4 className="text-lg font-semibold !text-white">
|
|
168
|
+
Accessibility
|
|
169
|
+
</h4>
|
|
170
|
+
<p className="text-sm !text-white/80">
|
|
171
|
+
Built with screen reader support
|
|
172
|
+
</p>
|
|
173
|
+
</div>
|
|
174
|
+
</div>
|
|
175
|
+
</div>
|
|
176
|
+
|
|
177
|
+
{/* API Reference */}
|
|
178
|
+
<div className="!space-y-8">
|
|
179
|
+
<h3 className="text-center text-2xl font-bold !text-white">
|
|
180
|
+
API Reference
|
|
181
|
+
</h3>
|
|
182
|
+
<div className="overflow-hidden rounded-lg border border-white/10 bg-white/5">
|
|
183
|
+
<div className="bg-white/5 p-4">
|
|
184
|
+
<h4 className="text-lg font-semibold !text-white">Props</h4>
|
|
185
|
+
</div>
|
|
186
|
+
<table className="!my-0 w-full">
|
|
187
|
+
<thead className="bg-white/5">
|
|
188
|
+
<tr className="border-b border-white/10">
|
|
189
|
+
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
190
|
+
Prop
|
|
191
|
+
</th>
|
|
192
|
+
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
193
|
+
Type
|
|
194
|
+
</th>
|
|
195
|
+
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
196
|
+
Default
|
|
197
|
+
</th>
|
|
198
|
+
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
199
|
+
Description
|
|
200
|
+
</th>
|
|
201
|
+
</tr>
|
|
202
|
+
</thead>
|
|
203
|
+
<tbody>
|
|
204
|
+
{" "}
|
|
205
|
+
<tr className="!bg-black/10">
|
|
206
|
+
<td className="px-6 py-4 font-mono text-sm !text-indigo-300">
|
|
207
|
+
withAccessibility
|
|
208
|
+
</td>
|
|
209
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
210
|
+
boolean
|
|
211
|
+
</td>
|
|
212
|
+
<td className="px-6 py-4 text-sm !text-white/50">
|
|
213
|
+
true
|
|
214
|
+
</td>
|
|
215
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
216
|
+
Whether to wrap the icon with accessibility feature
|
|
217
|
+
</td>
|
|
218
|
+
</tr>
|
|
219
|
+
</tbody>
|
|
220
|
+
</table>
|
|
221
|
+
</div>
|
|
222
|
+
</div>
|
|
223
|
+
|
|
224
|
+
{/* Usage Examples */}
|
|
225
|
+
<div className="!space-y-8">
|
|
226
|
+
<h3 className="text-center text-2xl font-bold !text-white">
|
|
227
|
+
Usage Examples
|
|
228
|
+
</h3>
|
|
229
|
+
|
|
230
|
+
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
231
|
+
<div className="space-y-4">
|
|
232
|
+
<h4 className="text-lg font-semibold !text-indigo-300">
|
|
233
|
+
Basic Usage
|
|
234
|
+
</h4>
|
|
235
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
236
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
237
|
+
{`import { ImageAvatarSparkleIcon } from "@/components/ui/icons/image-avatar-sparkle-icon"
|
|
238
|
+
|
|
239
|
+
function UserProfile() {
|
|
240
|
+
return (
|
|
241
|
+
<div className="flex items-center gap-2">
|
|
242
|
+
<ImageAvatarSparkleIcon className="h-6 w-6 text-indigo-400" />
|
|
243
|
+
<span>User Profile</span>
|
|
244
|
+
</div>
|
|
245
|
+
)
|
|
246
|
+
}`}
|
|
247
|
+
</pre>
|
|
248
|
+
</div>
|
|
249
|
+
</div>
|
|
250
|
+
|
|
251
|
+
<div className="space-y-4">
|
|
252
|
+
<h4 className="text-lg font-semibold !text-indigo-300">
|
|
253
|
+
Live Preview
|
|
254
|
+
</h4>
|
|
255
|
+
<div className="flex h-32 items-center justify-center rounded-lg border border-white/10 bg-white/5">
|
|
256
|
+
<div className="flex items-center gap-2 rounded-lg border border-indigo-500/20 bg-indigo-500/10 px-4 py-2 text-white">
|
|
257
|
+
<ImageAvatarSparkleIcon className="h-6 w-6 text-indigo-400" />
|
|
258
|
+
<span>User Profile</span>
|
|
259
|
+
</div>
|
|
260
|
+
</div>
|
|
261
|
+
</div>
|
|
262
|
+
</div>
|
|
263
|
+
</div>
|
|
264
|
+
|
|
265
|
+
{/* Size Examples */}
|
|
266
|
+
<div className="!space-y-8">
|
|
267
|
+
<h3 className="text-center text-2xl font-bold !text-white">
|
|
268
|
+
Size Examples
|
|
269
|
+
</h3>
|
|
270
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-8">
|
|
271
|
+
<div className="!space-y-6">
|
|
272
|
+
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
|
|
273
|
+
<div className="!space-y-4">
|
|
274
|
+
<h3 className="text-lg font-semibold !text-indigo-300">
|
|
275
|
+
Standard Sizes
|
|
276
|
+
</h3>
|
|
277
|
+
<div className="flex items-end gap-6 rounded-lg bg-black/20 p-6">
|
|
278
|
+
<div className="text-center">
|
|
279
|
+
<ImageAvatarSparkleIcon className="!mx-auto mb-2 h-3 w-3 text-indigo-400" />
|
|
280
|
+
<span className="text-xs text-white/60">12px</span>
|
|
281
|
+
</div>
|
|
282
|
+
<div className="text-center">
|
|
283
|
+
<ImageAvatarSparkleIcon className="!mx-auto mb-2 h-4 w-4 text-indigo-400" />
|
|
284
|
+
<span className="text-xs text-white/60">16px</span>
|
|
285
|
+
</div>
|
|
286
|
+
<div className="text-center">
|
|
287
|
+
<ImageAvatarSparkleIcon className="!mx-auto mb-2 h-5 w-5 text-indigo-400" />
|
|
288
|
+
<span className="text-xs text-white/60">20px</span>
|
|
289
|
+
</div>
|
|
290
|
+
<div className="text-center">
|
|
291
|
+
<ImageAvatarSparkleIcon className="!mx-auto mb-2 h-6 w-6 text-indigo-400" />
|
|
292
|
+
<span className="text-xs text-white/60">24px</span>
|
|
293
|
+
</div>
|
|
294
|
+
<div className="text-center">
|
|
295
|
+
<ImageAvatarSparkleIcon className="!mx-auto mb-2 h-8 w-8 text-indigo-400" />
|
|
296
|
+
<span className="text-xs text-white/60">32px</span>
|
|
297
|
+
</div>
|
|
298
|
+
<div className="text-center">
|
|
299
|
+
<ImageAvatarSparkleIcon className="!mx-auto mb-2 h-12 w-12 text-indigo-400" />
|
|
300
|
+
<span className="text-xs text-white/60">48px</span>
|
|
301
|
+
</div>
|
|
302
|
+
</div>
|
|
303
|
+
</div>
|
|
304
|
+
|
|
305
|
+
<div className="!space-y-4">
|
|
306
|
+
<h3 className="text-lg font-semibold !text-indigo-300">
|
|
307
|
+
Code Example
|
|
308
|
+
</h3>
|
|
309
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
310
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
311
|
+
{`// Small (16px)
|
|
312
|
+
<ImageAvatarSparkleIcon className="h-4 w-4 text-indigo-400" />
|
|
313
|
+
|
|
314
|
+
// Medium (24px)
|
|
315
|
+
<ImageAvatarSparkleIcon className="h-6 w-6 text-indigo-400" />
|
|
316
|
+
|
|
317
|
+
// Large (32px)
|
|
318
|
+
<ImageAvatarSparkleIcon className="h-8 w-8 text-indigo-400" />
|
|
319
|
+
|
|
320
|
+
// Custom size with color
|
|
321
|
+
<ImageAvatarSparkleIcon
|
|
322
|
+
width={40}
|
|
323
|
+
height={40}
|
|
324
|
+
className="text-indigo-400"
|
|
325
|
+
/>`}
|
|
326
|
+
</pre>
|
|
327
|
+
</div>
|
|
328
|
+
</div>
|
|
329
|
+
</div>
|
|
330
|
+
</div>
|
|
331
|
+
</div>
|
|
332
|
+
</div>
|
|
333
|
+
|
|
334
|
+
{/* Common Use Cases */}
|
|
335
|
+
<div className="!space-y-8">
|
|
336
|
+
<h3 className="text-center text-2xl font-bold !text-white">
|
|
337
|
+
Common Use Cases
|
|
338
|
+
</h3>
|
|
339
|
+
<div className="grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3">
|
|
340
|
+
<div className="space-y-3 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
341
|
+
<div className="text-2xl">👤</div>
|
|
342
|
+
<h4 className="text-lg font-semibold !text-white">
|
|
343
|
+
User Profiles
|
|
344
|
+
</h4>
|
|
345
|
+
<p className="text-sm !text-white/80">
|
|
346
|
+
Profile displays and user interfaces
|
|
347
|
+
</p>
|
|
348
|
+
</div>
|
|
349
|
+
<div className="space-y-3 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
350
|
+
<div className="text-2xl">✨</div>
|
|
351
|
+
<h4 className="text-lg font-semibold !text-white">
|
|
352
|
+
Premium Users
|
|
353
|
+
</h4>
|
|
354
|
+
<p className="text-sm !text-white/80">
|
|
355
|
+
Highlighting premium or special users
|
|
356
|
+
</p>
|
|
357
|
+
</div>
|
|
358
|
+
<div className="space-y-3 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
359
|
+
<div className="text-2xl">🎨</div>
|
|
360
|
+
<h4 className="text-lg font-semibold !text-white">
|
|
361
|
+
Avatar Selection
|
|
362
|
+
</h4>
|
|
363
|
+
<p className="text-sm !text-white/80">
|
|
364
|
+
Avatar picker interfaces
|
|
365
|
+
</p>
|
|
366
|
+
</div>
|
|
367
|
+
</div>
|
|
368
|
+
</div>
|
|
369
|
+
|
|
370
|
+
{/* Best Practices */}
|
|
371
|
+
<div className="!space-y-8">
|
|
372
|
+
<h3 className="text-center text-2xl font-bold !text-white">
|
|
373
|
+
Best Practices
|
|
374
|
+
</h3>
|
|
375
|
+
<div className="grid grid-cols-1 gap-6 md:grid-cols-2">
|
|
376
|
+
<div className="space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
377
|
+
<h4 className="text-lg font-semibold !text-emerald-300">
|
|
378
|
+
✅ Do
|
|
379
|
+
</h4>
|
|
380
|
+
<ul className="space-y-2 text-sm !text-white/80">
|
|
381
|
+
<li className="!text-white/80">
|
|
382
|
+
Use appropriate sizes for different contexts
|
|
383
|
+
</li>
|
|
384
|
+
<li className="!text-white/80">
|
|
385
|
+
Choose colors that match your UI theme
|
|
386
|
+
</li>
|
|
387
|
+
<li className="!text-white/80">
|
|
388
|
+
Provide clear labels for icon buttons
|
|
389
|
+
</li>
|
|
390
|
+
<li className="!text-white/80">
|
|
391
|
+
Use consistent styling across your app
|
|
392
|
+
</li>
|
|
393
|
+
<li className="!text-white/80">
|
|
394
|
+
Consider accessibility in all implementations
|
|
395
|
+
</li>
|
|
396
|
+
</ul>
|
|
397
|
+
</div>
|
|
398
|
+
<div className="space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
399
|
+
<h4 className="text-lg font-semibold !text-red-300">
|
|
400
|
+
❌ Don't
|
|
401
|
+
</h4>
|
|
402
|
+
<ul className="space-y-2 text-sm !text-white/80">
|
|
403
|
+
<li className="!text-white/80">
|
|
404
|
+
Use multiple icon styles in the same view
|
|
405
|
+
</li>
|
|
406
|
+
<li className="!text-white/80">
|
|
407
|
+
Overuse the icon in navigation
|
|
408
|
+
</li>
|
|
409
|
+
<li className="!text-white/80">
|
|
410
|
+
Use inappropriate sizes for the context
|
|
411
|
+
</li>
|
|
412
|
+
<li className="!text-white/80">
|
|
413
|
+
Forget to add hover states
|
|
414
|
+
</li>
|
|
415
|
+
<li className="!text-white/80">
|
|
416
|
+
Ignore accessibility requirements
|
|
417
|
+
</li>
|
|
418
|
+
</ul>
|
|
419
|
+
</div>
|
|
420
|
+
</div>
|
|
421
|
+
</div>
|
|
422
|
+
</div>
|
|
423
|
+
|
|
424
|
+
{/* Footer */}
|
|
425
|
+
<div className="border-t border-white/10 bg-black/20 backdrop-blur-xl">
|
|
426
|
+
<div className="!mx-auto max-w-7xl px-6 py-8">
|
|
427
|
+
<div className="!space-y-4 text-center">
|
|
428
|
+
<p className="!text-white/60">
|
|
429
|
+
ImageAvatarSparkleIcon is part of the Aural UI icon library,
|
|
430
|
+
designed for user profiles and avatar interfaces.
|
|
431
|
+
</p>
|
|
432
|
+
<p className="text-sm !text-white/40">
|
|
433
|
+
Perfect for user management, profile displays, avatar
|
|
434
|
+
selection, and any interface requiring enhanced avatar
|
|
435
|
+
representation.
|
|
436
|
+
</p>
|
|
437
|
+
</div>
|
|
438
|
+
</div>
|
|
439
|
+
</div>
|
|
440
|
+
</div>
|
|
441
|
+
</>
|
|
442
|
+
),
|
|
443
|
+
},
|
|
444
|
+
},
|
|
445
|
+
tags: ["autodocs"],
|
|
446
|
+
argTypes: {
|
|
447
|
+
width: {
|
|
448
|
+
control: { type: "range", min: 8, max: 96, step: 2 },
|
|
449
|
+
description: "Width of the icon in pixels",
|
|
450
|
+
},
|
|
451
|
+
withAccessibility: {
|
|
452
|
+
control: "boolean",
|
|
453
|
+
description: "Whether to wrap the icon with accessibility features",
|
|
454
|
+
},
|
|
455
|
+
height: {
|
|
456
|
+
control: { type: "range", min: 8, max: 96, step: 2 },
|
|
457
|
+
description: "Height of the icon in pixels",
|
|
458
|
+
},
|
|
459
|
+
className: {
|
|
460
|
+
control: "text",
|
|
461
|
+
description: "CSS classes for styling",
|
|
462
|
+
},
|
|
463
|
+
},
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
export default meta
|
|
467
|
+
type Story = StoryObj<typeof ImageAvatarSparkleIcon>
|
|
468
|
+
|
|
469
|
+
// Story parameters for consistent dark theme
|
|
470
|
+
const storyParameters = {
|
|
471
|
+
backgrounds: {
|
|
472
|
+
default: "dark",
|
|
473
|
+
values: [
|
|
474
|
+
{ name: "dark", value: "#0a0a0a" },
|
|
475
|
+
{ name: "darker", value: "#000000" },
|
|
476
|
+
],
|
|
477
|
+
},
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
export const Default: Story = {
|
|
481
|
+
args: {
|
|
482
|
+
width: 24,
|
|
483
|
+
height: 24,
|
|
484
|
+
className: "text-indigo-400",
|
|
485
|
+
withAccessibility: true,
|
|
486
|
+
},
|
|
487
|
+
parameters: storyParameters,
|
|
488
|
+
render: (args) => (
|
|
489
|
+
<div className="flex h-32 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
|
|
490
|
+
<ImageAvatarSparkleIcon {...args} />
|
|
491
|
+
</div>
|
|
492
|
+
),
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
export const SizeVariations: Story = {
|
|
496
|
+
parameters: {
|
|
497
|
+
...storyParameters,
|
|
498
|
+
docs: {
|
|
499
|
+
description: {
|
|
500
|
+
story:
|
|
501
|
+
"ImageAvatarSparkleIcon in different sizes, from small inline buttons to large call-to-action elements.",
|
|
502
|
+
},
|
|
503
|
+
},
|
|
504
|
+
},
|
|
505
|
+
render: () => (
|
|
506
|
+
<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">
|
|
507
|
+
<div className="text-center">
|
|
508
|
+
<ImageAvatarSparkleIcon className="!mx-auto mb-2 h-3 w-3 text-indigo-400" />
|
|
509
|
+
<span className="text-xs text-white/60">12px</span>
|
|
510
|
+
</div>
|
|
511
|
+
<div className="text-center">
|
|
512
|
+
<ImageAvatarSparkleIcon className="!mx-auto mb-2 h-4 w-4 text-indigo-400" />
|
|
513
|
+
<span className="text-xs text-white/60">16px</span>
|
|
514
|
+
</div>
|
|
515
|
+
<div className="text-center">
|
|
516
|
+
<ImageAvatarSparkleIcon className="!mx-auto mb-2 h-5 w-5 text-indigo-400" />
|
|
517
|
+
<span className="text-xs text-white/60">20px</span>
|
|
518
|
+
</div>
|
|
519
|
+
<div className="text-center">
|
|
520
|
+
<ImageAvatarSparkleIcon className="!mx-auto mb-2 h-6 w-6 text-indigo-400" />
|
|
521
|
+
<span className="text-xs text-white/60">24px</span>
|
|
522
|
+
</div>
|
|
523
|
+
<div className="text-center">
|
|
524
|
+
<ImageAvatarSparkleIcon className="!mx-auto mb-2 h-8 w-8 text-indigo-400" />
|
|
525
|
+
<span className="text-xs text-white/60">32px</span>
|
|
526
|
+
</div>
|
|
527
|
+
<div className="text-center">
|
|
528
|
+
<ImageAvatarSparkleIcon className="!mx-auto mb-2 h-12 w-12 text-indigo-400" />
|
|
529
|
+
<span className="text-xs text-white/60">48px</span>
|
|
530
|
+
</div>
|
|
531
|
+
</div>
|
|
532
|
+
),
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
export const ColorVariations: Story = {
|
|
536
|
+
parameters: {
|
|
537
|
+
...storyParameters,
|
|
538
|
+
docs: {
|
|
539
|
+
description: {
|
|
540
|
+
story:
|
|
541
|
+
"ImageAvatarSparkleIcon with different color variations using Tailwind classes. Colors are applied via the fill property using currentColor.",
|
|
542
|
+
},
|
|
543
|
+
},
|
|
544
|
+
},
|
|
545
|
+
render: () => (
|
|
546
|
+
<div className="min-h-dvh !space-y-8 rounded-lg bg-gradient-to-br from-gray-900 to-gray-800 p-8">
|
|
547
|
+
<div className="!space-y-4">
|
|
548
|
+
<h3 className="text-center text-lg font-semibold !text-white">
|
|
549
|
+
Standard Colors
|
|
550
|
+
</h3>
|
|
551
|
+
<div className="flex flex-wrap items-center justify-center gap-8">
|
|
552
|
+
<div className="text-center">
|
|
553
|
+
<div className="mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-indigo-500/30 bg-indigo-500/20">
|
|
554
|
+
<ImageAvatarSparkleIcon className="h-8 w-8 text-indigo-400" />
|
|
555
|
+
</div>
|
|
556
|
+
<div className="text-sm font-medium text-white">Indigo</div>
|
|
557
|
+
<div className="text-xs text-indigo-400">text-indigo-400</div>
|
|
558
|
+
</div>
|
|
559
|
+
<div className="text-center">
|
|
560
|
+
<div className="mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-purple-500/30 bg-purple-500/20">
|
|
561
|
+
<ImageAvatarSparkleIcon className="h-8 w-8 text-purple-400" />
|
|
562
|
+
</div>
|
|
563
|
+
<div className="text-sm font-medium text-white">Purple</div>
|
|
564
|
+
<div className="text-xs text-purple-400">text-purple-400</div>
|
|
565
|
+
</div>
|
|
566
|
+
<div className="text-center">
|
|
567
|
+
<div className="mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-green-500/30 bg-green-500/20">
|
|
568
|
+
<ImageAvatarSparkleIcon className="h-8 w-8 text-green-400" />
|
|
569
|
+
</div>
|
|
570
|
+
<div className="text-sm font-medium text-white">Green</div>
|
|
571
|
+
<div className="text-xs text-green-400">text-green-400</div>
|
|
572
|
+
</div>
|
|
573
|
+
<div className="text-center">
|
|
574
|
+
<div className="mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-red-500/30 bg-red-500/20">
|
|
575
|
+
<ImageAvatarSparkleIcon className="h-8 w-8 text-red-400" />
|
|
576
|
+
</div>
|
|
577
|
+
<div className="text-sm font-medium text-white">Red</div>
|
|
578
|
+
<div className="text-xs text-red-400">text-red-400</div>
|
|
579
|
+
</div>
|
|
580
|
+
<div className="text-center">
|
|
581
|
+
<div className="mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-yellow-500/30 bg-yellow-500/20">
|
|
582
|
+
<ImageAvatarSparkleIcon className="h-8 w-8 text-yellow-400" />
|
|
583
|
+
</div>
|
|
584
|
+
<div className="text-sm font-medium text-white">Yellow</div>
|
|
585
|
+
<div className="text-xs text-yellow-400">text-yellow-400</div>
|
|
586
|
+
</div>
|
|
587
|
+
<div className="text-center">
|
|
588
|
+
<div className="mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-blue-500/30 bg-blue-500/20">
|
|
589
|
+
<ImageAvatarSparkleIcon className="h-8 w-8 text-blue-400" />
|
|
590
|
+
</div>
|
|
591
|
+
<div className="text-sm font-medium text-white">Blue</div>
|
|
592
|
+
<div className="text-xs text-blue-400">text-blue-400</div>
|
|
593
|
+
</div>
|
|
594
|
+
<div className="text-center">
|
|
595
|
+
<div className="mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-cyan-500/30 bg-cyan-500/20">
|
|
596
|
+
<ImageAvatarSparkleIcon className="h-8 w-8 text-cyan-400" />
|
|
597
|
+
</div>
|
|
598
|
+
<div className="text-sm font-medium text-white">Cyan</div>
|
|
599
|
+
<div className="text-xs text-cyan-400">text-cyan-400</div>
|
|
600
|
+
</div>
|
|
601
|
+
<div className="text-center">
|
|
602
|
+
<div className="mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-white/30 bg-white/10">
|
|
603
|
+
<ImageAvatarSparkleIcon className="h-8 w-8 text-white" />
|
|
604
|
+
</div>
|
|
605
|
+
<div className="text-sm font-medium text-white">White</div>
|
|
606
|
+
<div className="text-xs text-white/60">text-white</div>
|
|
607
|
+
</div>
|
|
608
|
+
</div>
|
|
609
|
+
</div>
|
|
610
|
+
<div className="!space-y-4">
|
|
611
|
+
<h3 className="text-center text-lg font-semibold !text-white">
|
|
612
|
+
Design System Colors
|
|
613
|
+
</h3>
|
|
614
|
+
<div className="flex flex-wrap items-center justify-center gap-8">
|
|
615
|
+
<div className="text-center">
|
|
616
|
+
<div className="mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-white/20 bg-white/5">
|
|
617
|
+
<ImageAvatarSparkleIcon className="text-fm-primary h-8 w-8" />
|
|
618
|
+
</div>
|
|
619
|
+
<div className="text-sm font-medium text-white">Primary</div>
|
|
620
|
+
<div className="text-fm-primary text-xs">text-fm-primary</div>
|
|
621
|
+
</div>
|
|
622
|
+
<div className="text-center">
|
|
623
|
+
<div className="mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-white/20 bg-white/5">
|
|
624
|
+
<ImageAvatarSparkleIcon className="text-fm-secondary-500 h-8 w-8" />
|
|
625
|
+
</div>
|
|
626
|
+
<div className="text-sm font-medium text-white">Secondary</div>
|
|
627
|
+
<div className="text-fm-secondary-500 text-xs">
|
|
628
|
+
text-fm-secondary-500
|
|
629
|
+
</div>
|
|
630
|
+
</div>
|
|
631
|
+
<div className="text-center">
|
|
632
|
+
<div className="mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-white/20 bg-white/5">
|
|
633
|
+
<ImageAvatarSparkleIcon className="text-fm-neutral-800 h-8 w-8" />
|
|
634
|
+
</div>
|
|
635
|
+
<div className="text-sm font-medium text-white">Neutral</div>
|
|
636
|
+
<div className="text-fm-neutral-800 text-xs">
|
|
637
|
+
text-fm-neutral-800
|
|
638
|
+
</div>
|
|
639
|
+
</div>
|
|
640
|
+
</div>
|
|
641
|
+
</div>
|
|
642
|
+
</div>
|
|
643
|
+
),
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
export const UsageExamples: Story = {
|
|
647
|
+
parameters: {
|
|
648
|
+
...storyParameters,
|
|
649
|
+
docs: {
|
|
650
|
+
description: {
|
|
651
|
+
story:
|
|
652
|
+
"Common usage examples of ImageAvatarSparkleIcon in different contexts with various colors applied.",
|
|
653
|
+
},
|
|
654
|
+
},
|
|
655
|
+
},
|
|
656
|
+
render: () => (
|
|
657
|
+
<div className="min-h-dvh !space-y-8 rounded-lg bg-gradient-to-br from-gray-900 to-gray-800 p-8">
|
|
658
|
+
<div className="!space-y-4">
|
|
659
|
+
<h3 className="text-center text-lg font-semibold !text-white">
|
|
660
|
+
Profile Buttons
|
|
661
|
+
</h3>
|
|
662
|
+
<div className="flex flex-wrap items-center justify-center gap-4">
|
|
663
|
+
<button className="flex items-center gap-2 rounded-lg border border-indigo-500/20 bg-indigo-500/10 px-4 py-2 text-white transition-colors hover:bg-indigo-500/20">
|
|
664
|
+
<ImageAvatarSparkleIcon className="h-4 w-4 text-indigo-400" />
|
|
665
|
+
<span>View Profile</span>
|
|
666
|
+
</button>
|
|
667
|
+
<button className="flex items-center gap-2 rounded-lg border border-purple-500/20 bg-purple-500/10 px-4 py-2 text-white transition-colors hover:bg-purple-500/20">
|
|
668
|
+
<ImageAvatarSparkleIcon className="h-4 w-4 text-purple-400" />
|
|
669
|
+
<span>Edit Profile</span>
|
|
670
|
+
</button>
|
|
671
|
+
<button className="flex items-center gap-2 rounded-lg border border-green-500/20 bg-green-500/10 px-4 py-2 text-white transition-colors hover:bg-green-500/20">
|
|
672
|
+
<ImageAvatarSparkleIcon className="h-4 w-4 text-green-400" />
|
|
673
|
+
<span>Settings</span>
|
|
674
|
+
</button>
|
|
675
|
+
<button className="flex items-center gap-2 rounded-lg border border-cyan-500/20 bg-cyan-500/10 px-4 py-2 text-white transition-colors hover:bg-cyan-500/20">
|
|
676
|
+
<ImageAvatarSparkleIcon className="h-4 w-4 text-cyan-400" />
|
|
677
|
+
<span>New Profile</span>
|
|
678
|
+
</button>
|
|
679
|
+
</div>
|
|
680
|
+
</div>
|
|
681
|
+
<div className="!space-y-4">
|
|
682
|
+
<h3 className="text-center text-lg font-semibold !text-white">
|
|
683
|
+
User List Items
|
|
684
|
+
</h3>
|
|
685
|
+
<div className="flex flex-wrap items-center justify-center gap-4">
|
|
686
|
+
<div className="flex items-center gap-2 rounded-lg border border-white/10 bg-white/5 px-4 py-2">
|
|
687
|
+
<ImageAvatarSparkleIcon className="h-5 w-5 text-green-400" />
|
|
688
|
+
<span className="text-white/80">Premium User</span>
|
|
689
|
+
</div>
|
|
690
|
+
<div className="flex items-center gap-2 rounded-lg border border-white/10 bg-white/5 px-4 py-2">
|
|
691
|
+
<ImageAvatarSparkleIcon className="h-5 w-5 text-blue-400" />
|
|
692
|
+
<span className="text-white/80">Standard User</span>
|
|
693
|
+
</div>
|
|
694
|
+
<div className="flex items-center gap-2 rounded-lg border border-white/10 bg-white/5 px-4 py-2">
|
|
695
|
+
<ImageAvatarSparkleIcon className="h-5 w-5 text-purple-400" />
|
|
696
|
+
<span className="text-white/80">VIP User</span>
|
|
697
|
+
</div>
|
|
698
|
+
<div className="flex items-center gap-2 rounded-lg border border-white/10 bg-white/5 px-4 py-2">
|
|
699
|
+
<ImageAvatarSparkleIcon className="h-5 w-5 text-yellow-400" />
|
|
700
|
+
<span className="text-white/80">Guest User</span>
|
|
701
|
+
</div>
|
|
702
|
+
</div>
|
|
703
|
+
</div>
|
|
704
|
+
<div className="!space-y-4">
|
|
705
|
+
<h3 className="text-center text-lg font-semibold !text-white">
|
|
706
|
+
Status Indicators
|
|
707
|
+
</h3>
|
|
708
|
+
<div className="flex flex-wrap items-center justify-center gap-4">
|
|
709
|
+
<div className="flex items-center gap-2 rounded-lg border border-green-500/20 bg-green-500/10 px-4 py-2">
|
|
710
|
+
<ImageAvatarSparkleIcon className="h-5 w-5 text-green-400" />
|
|
711
|
+
<span className="text-white">Active</span>
|
|
712
|
+
</div>
|
|
713
|
+
<div className="flex items-center gap-2 rounded-lg border border-yellow-500/20 bg-yellow-500/10 px-4 py-2">
|
|
714
|
+
<ImageAvatarSparkleIcon className="h-5 w-5 text-yellow-400" />
|
|
715
|
+
<span className="text-white">Pending</span>
|
|
716
|
+
</div>
|
|
717
|
+
<div className="flex items-center gap-2 rounded-lg border border-red-500/20 bg-red-500/10 px-4 py-2">
|
|
718
|
+
<ImageAvatarSparkleIcon className="h-5 w-5 text-red-400" />
|
|
719
|
+
<span className="text-white">Inactive</span>
|
|
720
|
+
</div>
|
|
721
|
+
</div>
|
|
722
|
+
</div>
|
|
723
|
+
</div>
|
|
724
|
+
),
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
export const Playground: Story = {
|
|
728
|
+
parameters: {
|
|
729
|
+
...storyParameters,
|
|
730
|
+
docs: {
|
|
731
|
+
description: {
|
|
732
|
+
story:
|
|
733
|
+
"Interactive playground to experiment with different ImageAvatarSparkleIcon configurations.",
|
|
734
|
+
},
|
|
735
|
+
},
|
|
736
|
+
},
|
|
737
|
+
args: {
|
|
738
|
+
width: 32,
|
|
739
|
+
height: 32,
|
|
740
|
+
className: "text-indigo-400",
|
|
741
|
+
},
|
|
742
|
+
render: (args) => (
|
|
743
|
+
<div className="flex h-64 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
|
|
744
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-8">
|
|
745
|
+
<ImageAvatarSparkleIcon {...args} />
|
|
746
|
+
</div>
|
|
747
|
+
</div>
|
|
748
|
+
),
|
|
749
|
+
}
|