aural-ui 2.1.18 → 2.1.20
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 +124 -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,742 @@
|
|
|
1
|
+
import React from "react"
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react-vite"
|
|
3
|
+
|
|
4
|
+
import { MagicEditIcon } from "."
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof MagicEditIcon> = {
|
|
7
|
+
title: "Icons/MagicEditIcon",
|
|
8
|
+
component: MagicEditIcon,
|
|
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
|
+
"A magic edit icon with sparkle elements representing AI-powered editing, content enhancement, and magical transformations.",
|
|
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-purple-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-purple-500/10 via-transparent to-pink-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-purple-500/30 bg-gradient-to-br from-purple-500/20 to-pink-500/20">
|
|
97
|
+
<MagicEditIcon className="h-12 w-12 text-purple-400" />
|
|
98
|
+
</div>
|
|
99
|
+
<h1 className="text-5xl font-bold !text-white">
|
|
100
|
+
MagicEditIcon
|
|
101
|
+
</h1>
|
|
102
|
+
<p className="!mx-auto max-w-3xl text-xl leading-relaxed !text-white/70">
|
|
103
|
+
A magic edit icon with sparkle elements representing
|
|
104
|
+
AI-powered editing, content enhancement, and magical
|
|
105
|
+
transformations. Perfect for AI tools, content editors, and
|
|
106
|
+
enhancement features.
|
|
107
|
+
</p>
|
|
108
|
+
|
|
109
|
+
{/* Stats */}
|
|
110
|
+
<div className="mx-auto flex items-center justify-center gap-8">
|
|
111
|
+
<div className="text-center">
|
|
112
|
+
<div className="text-3xl font-bold text-purple-300">
|
|
113
|
+
Magic
|
|
114
|
+
</div>
|
|
115
|
+
<div className="text-sm text-white/80">AI-powered</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
|
+
Edit
|
|
121
|
+
</div>
|
|
122
|
+
<div className="text-sm text-white/80">
|
|
123
|
+
Content editing
|
|
124
|
+
</div>
|
|
125
|
+
</div>
|
|
126
|
+
<div className="h-8 w-px bg-white/20" />
|
|
127
|
+
<div className="text-center">
|
|
128
|
+
<div className="text-3xl font-bold text-blue-300">
|
|
129
|
+
Accessible
|
|
130
|
+
</div>
|
|
131
|
+
<div className="text-sm text-white/80">
|
|
132
|
+
Screen reader support
|
|
133
|
+
</div>
|
|
134
|
+
</div>
|
|
135
|
+
</div>
|
|
136
|
+
</div>
|
|
137
|
+
</div>
|
|
138
|
+
</div>
|
|
139
|
+
|
|
140
|
+
{/* Content */}
|
|
141
|
+
<div className="!mx-auto flex max-w-7xl flex-col gap-6 space-y-16 px-6 py-16">
|
|
142
|
+
{/* Features */}
|
|
143
|
+
<div className="!space-y-8">
|
|
144
|
+
<h3 className="text-center text-2xl font-bold !text-white">
|
|
145
|
+
Key Features
|
|
146
|
+
</h3>
|
|
147
|
+
<div className="grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3">
|
|
148
|
+
<div className="space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
149
|
+
<div className="text-3xl">✨</div>
|
|
150
|
+
<h4 className="text-lg font-semibold !text-white">
|
|
151
|
+
Magic Edit
|
|
152
|
+
</h4>
|
|
153
|
+
<p className="text-sm !text-white/80">
|
|
154
|
+
AI-powered editing with sparkle elements
|
|
155
|
+
</p>
|
|
156
|
+
</div>
|
|
157
|
+
<div className="space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
158
|
+
<div className="text-3xl">✏️</div>
|
|
159
|
+
<h4 className="text-lg font-semibold !text-white">
|
|
160
|
+
Content Enhancement
|
|
161
|
+
</h4>
|
|
162
|
+
<p className="text-sm !text-white/80">
|
|
163
|
+
Transform and enhance content
|
|
164
|
+
</p>
|
|
165
|
+
</div>
|
|
166
|
+
<div className="space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
167
|
+
<div className="text-3xl">♿</div>
|
|
168
|
+
<h4 className="text-lg font-semibold !text-white">
|
|
169
|
+
Accessibility
|
|
170
|
+
</h4>
|
|
171
|
+
<p className="text-sm !text-white/80">
|
|
172
|
+
Built with screen reader support
|
|
173
|
+
</p>
|
|
174
|
+
</div>
|
|
175
|
+
</div>
|
|
176
|
+
</div>
|
|
177
|
+
|
|
178
|
+
{/* API Reference */}
|
|
179
|
+
<div className="!space-y-8">
|
|
180
|
+
<h3 className="text-center text-2xl font-bold !text-white">
|
|
181
|
+
API Reference
|
|
182
|
+
</h3>
|
|
183
|
+
<div className="overflow-hidden rounded-lg border border-white/10 bg-white/5">
|
|
184
|
+
<div className="bg-white/5 p-4">
|
|
185
|
+
<h4 className="text-lg font-semibold !text-white">Props</h4>
|
|
186
|
+
</div>
|
|
187
|
+
<table className="!my-0 w-full">
|
|
188
|
+
<thead className="bg-white/5">
|
|
189
|
+
<tr className="border-b border-white/10">
|
|
190
|
+
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
191
|
+
Prop
|
|
192
|
+
</th>
|
|
193
|
+
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
194
|
+
Type
|
|
195
|
+
</th>
|
|
196
|
+
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
197
|
+
Default
|
|
198
|
+
</th>
|
|
199
|
+
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
200
|
+
Description
|
|
201
|
+
</th>
|
|
202
|
+
</tr>
|
|
203
|
+
</thead>
|
|
204
|
+
<tbody>
|
|
205
|
+
{" "}
|
|
206
|
+
<tr className="!bg-black/10">
|
|
207
|
+
<td className="px-6 py-4 font-mono text-sm !text-purple-300">
|
|
208
|
+
withAccessibility
|
|
209
|
+
</td>
|
|
210
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
211
|
+
boolean
|
|
212
|
+
</td>
|
|
213
|
+
<td className="px-6 py-4 text-sm !text-white/50">
|
|
214
|
+
true
|
|
215
|
+
</td>
|
|
216
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
217
|
+
Whether to wrap the icon with accessibility feature
|
|
218
|
+
</td>
|
|
219
|
+
</tr>
|
|
220
|
+
</tbody>
|
|
221
|
+
</table>
|
|
222
|
+
</div>
|
|
223
|
+
</div>
|
|
224
|
+
|
|
225
|
+
{/* Usage Examples */}
|
|
226
|
+
<div className="!space-y-8">
|
|
227
|
+
<h3 className="text-center text-2xl font-bold !text-white">
|
|
228
|
+
Usage Examples
|
|
229
|
+
</h3>
|
|
230
|
+
|
|
231
|
+
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
232
|
+
<div className="space-y-4">
|
|
233
|
+
<h4 className="text-lg font-semibold !text-purple-300">
|
|
234
|
+
Basic Usage
|
|
235
|
+
</h4>
|
|
236
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
237
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
238
|
+
{`import { MagicEditIcon } from "@/components/ui/icons/magic-edit-icon"
|
|
239
|
+
|
|
240
|
+
function MagicEditButton() {
|
|
241
|
+
return (
|
|
242
|
+
<button className="flex items-center gap-2">
|
|
243
|
+
<MagicEditIcon className="h-4 w-4 text-purple-400" />
|
|
244
|
+
<span>Magic Edit</span>
|
|
245
|
+
</button>
|
|
246
|
+
)
|
|
247
|
+
}`}
|
|
248
|
+
</pre>
|
|
249
|
+
</div>
|
|
250
|
+
</div>
|
|
251
|
+
|
|
252
|
+
<div className="space-y-4">
|
|
253
|
+
<h4 className="text-lg font-semibold !text-purple-300">
|
|
254
|
+
Live Preview
|
|
255
|
+
</h4>
|
|
256
|
+
<div className="flex h-32 items-center justify-center rounded-lg border border-white/10 bg-white/5">
|
|
257
|
+
<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">
|
|
258
|
+
<MagicEditIcon className="h-4 w-4 text-purple-400" />
|
|
259
|
+
<span>Magic Edit</span>
|
|
260
|
+
</button>
|
|
261
|
+
</div>
|
|
262
|
+
</div>
|
|
263
|
+
</div>
|
|
264
|
+
</div>
|
|
265
|
+
|
|
266
|
+
{/* Size Examples */}
|
|
267
|
+
<div className="!space-y-8">
|
|
268
|
+
<h3 className="text-center text-2xl font-bold !text-white">
|
|
269
|
+
Size Examples
|
|
270
|
+
</h3>
|
|
271
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-8">
|
|
272
|
+
<div className="!space-y-6">
|
|
273
|
+
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
|
|
274
|
+
<div className="!space-y-4">
|
|
275
|
+
<h3 className="text-lg font-semibold !text-purple-300">
|
|
276
|
+
Standard Sizes
|
|
277
|
+
</h3>
|
|
278
|
+
<div className="flex items-end gap-6 rounded-lg bg-black/20 p-6">
|
|
279
|
+
<div className="text-center">
|
|
280
|
+
<MagicEditIcon className="!mx-auto mb-2 h-3 w-3 text-purple-400" />
|
|
281
|
+
<span className="text-xs text-white/60">12px</span>
|
|
282
|
+
</div>
|
|
283
|
+
<div className="text-center">
|
|
284
|
+
<MagicEditIcon className="!mx-auto mb-2 h-4 w-4 text-purple-400" />
|
|
285
|
+
<span className="text-xs text-white/60">16px</span>
|
|
286
|
+
</div>
|
|
287
|
+
<div className="text-center">
|
|
288
|
+
<MagicEditIcon className="!mx-auto mb-2 h-5 w-5 text-purple-400" />
|
|
289
|
+
<span className="text-xs text-white/60">20px</span>
|
|
290
|
+
</div>
|
|
291
|
+
<div className="text-center">
|
|
292
|
+
<MagicEditIcon className="!mx-auto mb-2 h-6 w-6 text-purple-400" />
|
|
293
|
+
<span className="text-xs text-white/60">24px</span>
|
|
294
|
+
</div>
|
|
295
|
+
<div className="text-center">
|
|
296
|
+
<MagicEditIcon className="!mx-auto mb-2 h-8 w-8 text-purple-400" />
|
|
297
|
+
<span className="text-xs text-white/60">32px</span>
|
|
298
|
+
</div>
|
|
299
|
+
<div className="text-center">
|
|
300
|
+
<MagicEditIcon className="!mx-auto mb-2 h-12 w-12 text-purple-400" />
|
|
301
|
+
<span className="text-xs text-white/60">48px</span>
|
|
302
|
+
</div>
|
|
303
|
+
</div>
|
|
304
|
+
</div>
|
|
305
|
+
|
|
306
|
+
<div className="!space-y-4">
|
|
307
|
+
<h3 className="text-lg font-semibold !text-purple-300">
|
|
308
|
+
Code Example
|
|
309
|
+
</h3>
|
|
310
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
311
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
312
|
+
{`// Small (16px)
|
|
313
|
+
<MagicEditIcon className="h-4 w-4 text-purple-400" />
|
|
314
|
+
|
|
315
|
+
// Medium (24px)
|
|
316
|
+
<MagicEditIcon className="h-6 w-6 text-purple-400" />
|
|
317
|
+
|
|
318
|
+
// Large (32px)
|
|
319
|
+
<MagicEditIcon className="h-8 w-8 text-purple-400" />
|
|
320
|
+
|
|
321
|
+
// Custom size with color
|
|
322
|
+
<MagicEditIcon
|
|
323
|
+
width={40}
|
|
324
|
+
height={40}
|
|
325
|
+
className="text-purple-400"
|
|
326
|
+
/>`}
|
|
327
|
+
</pre>
|
|
328
|
+
</div>
|
|
329
|
+
</div>
|
|
330
|
+
</div>
|
|
331
|
+
</div>
|
|
332
|
+
</div>
|
|
333
|
+
</div>
|
|
334
|
+
|
|
335
|
+
{/* Common Use Cases */}
|
|
336
|
+
<div className="!space-y-8">
|
|
337
|
+
<h3 className="text-center text-2xl font-bold !text-white">
|
|
338
|
+
Common Use Cases
|
|
339
|
+
</h3>
|
|
340
|
+
<div className="grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3">
|
|
341
|
+
<div className="space-y-3 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
342
|
+
<div className="text-2xl">✨</div>
|
|
343
|
+
<h4 className="text-lg font-semibold !text-white">
|
|
344
|
+
AI Editing
|
|
345
|
+
</h4>
|
|
346
|
+
<p className="text-sm !text-white/80">
|
|
347
|
+
AI-powered content editing tools
|
|
348
|
+
</p>
|
|
349
|
+
</div>
|
|
350
|
+
<div className="space-y-3 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
351
|
+
<div className="text-2xl">🎨</div>
|
|
352
|
+
<h4 className="text-lg font-semibold !text-white">
|
|
353
|
+
Content Enhancement
|
|
354
|
+
</h4>
|
|
355
|
+
<p className="text-sm !text-white/80">
|
|
356
|
+
Transform and enhance content
|
|
357
|
+
</p>
|
|
358
|
+
</div>
|
|
359
|
+
<div className="space-y-3 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
360
|
+
<div className="text-2xl">🔮</div>
|
|
361
|
+
<h4 className="text-lg font-semibold !text-white">
|
|
362
|
+
Magic Tools
|
|
363
|
+
</h4>
|
|
364
|
+
<p className="text-sm !text-white/80">
|
|
365
|
+
Special editing features
|
|
366
|
+
</p>
|
|
367
|
+
</div>
|
|
368
|
+
</div>
|
|
369
|
+
</div>
|
|
370
|
+
|
|
371
|
+
{/* Best Practices */}
|
|
372
|
+
<div className="!space-y-8">
|
|
373
|
+
<h3 className="text-center text-2xl font-bold !text-white">
|
|
374
|
+
Best Practices
|
|
375
|
+
</h3>
|
|
376
|
+
<div className="grid grid-cols-1 gap-6 md:grid-cols-2">
|
|
377
|
+
<div className="space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
378
|
+
<h4 className="text-lg font-semibold !text-emerald-300">
|
|
379
|
+
✅ Do
|
|
380
|
+
</h4>
|
|
381
|
+
<ul className="space-y-2 text-sm !text-white/80">
|
|
382
|
+
<li className="!text-white/80">
|
|
383
|
+
Use appropriate sizes for different contexts
|
|
384
|
+
</li>
|
|
385
|
+
<li className="!text-white/80">
|
|
386
|
+
Choose colors that match your UI theme
|
|
387
|
+
</li>
|
|
388
|
+
<li className="!text-white/80">
|
|
389
|
+
Provide clear labels for icon buttons
|
|
390
|
+
</li>
|
|
391
|
+
<li className="!text-white/80">
|
|
392
|
+
Use consistent styling across your app
|
|
393
|
+
</li>
|
|
394
|
+
<li className="!text-white/80">
|
|
395
|
+
Consider accessibility in all implementations
|
|
396
|
+
</li>
|
|
397
|
+
</ul>
|
|
398
|
+
</div>
|
|
399
|
+
<div className="space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
400
|
+
<h4 className="text-lg font-semibold !text-red-300">
|
|
401
|
+
❌ Don't
|
|
402
|
+
</h4>
|
|
403
|
+
<ul className="space-y-2 text-sm !text-white/80">
|
|
404
|
+
<li className="!text-white/80">
|
|
405
|
+
Use multiple icon styles in the same view
|
|
406
|
+
</li>
|
|
407
|
+
<li className="!text-white/80">
|
|
408
|
+
Overuse the icon in navigation
|
|
409
|
+
</li>
|
|
410
|
+
<li className="!text-white/80">
|
|
411
|
+
Use inappropriate sizes for the context
|
|
412
|
+
</li>
|
|
413
|
+
<li className="!text-white/80">
|
|
414
|
+
Forget to add hover states
|
|
415
|
+
</li>
|
|
416
|
+
<li className="!text-white/80">
|
|
417
|
+
Ignore accessibility requirements
|
|
418
|
+
</li>
|
|
419
|
+
</ul>
|
|
420
|
+
</div>
|
|
421
|
+
</div>
|
|
422
|
+
</div>
|
|
423
|
+
</div>
|
|
424
|
+
|
|
425
|
+
{/* Footer */}
|
|
426
|
+
<div className="border-t border-white/10 bg-black/20 backdrop-blur-xl">
|
|
427
|
+
<div className="!mx-auto max-w-7xl px-6 py-8">
|
|
428
|
+
<div className="!space-y-4 text-center">
|
|
429
|
+
<p className="!text-white/60">
|
|
430
|
+
MagicEditIcon is part of the Aural UI icon library, designed
|
|
431
|
+
for AI-powered editing and content enhancement interfaces.
|
|
432
|
+
</p>
|
|
433
|
+
<p className="text-sm !text-white/40">
|
|
434
|
+
Perfect for AI tools, content editors, enhancement features,
|
|
435
|
+
and any interface requiring magical editing 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 MagicEditIcon>
|
|
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-purple-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
|
+
<MagicEditIcon {...args} />
|
|
491
|
+
</div>
|
|
492
|
+
),
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
export const SizeVariations: Story = {
|
|
496
|
+
parameters: {
|
|
497
|
+
...storyParameters,
|
|
498
|
+
docs: {
|
|
499
|
+
description: {
|
|
500
|
+
story:
|
|
501
|
+
"MagicEditIcon 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
|
+
<MagicEditIcon className="!mx-auto mb-2 h-3 w-3 text-purple-400" />
|
|
509
|
+
<span className="text-xs text-white/60">12px</span>
|
|
510
|
+
</div>
|
|
511
|
+
<div className="text-center">
|
|
512
|
+
<MagicEditIcon className="!mx-auto mb-2 h-4 w-4 text-purple-400" />
|
|
513
|
+
<span className="text-xs text-white/60">16px</span>
|
|
514
|
+
</div>
|
|
515
|
+
<div className="text-center">
|
|
516
|
+
<MagicEditIcon className="!mx-auto mb-2 h-5 w-5 text-purple-400" />
|
|
517
|
+
<span className="text-xs text-white/60">20px</span>
|
|
518
|
+
</div>
|
|
519
|
+
<div className="text-center">
|
|
520
|
+
<MagicEditIcon className="!mx-auto mb-2 h-6 w-6 text-purple-400" />
|
|
521
|
+
<span className="text-xs text-white/60">24px</span>
|
|
522
|
+
</div>
|
|
523
|
+
<div className="text-center">
|
|
524
|
+
<MagicEditIcon className="!mx-auto mb-2 h-8 w-8 text-purple-400" />
|
|
525
|
+
<span className="text-xs text-white/60">32px</span>
|
|
526
|
+
</div>
|
|
527
|
+
<div className="text-center">
|
|
528
|
+
<MagicEditIcon className="!mx-auto mb-2 h-12 w-12 text-purple-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
|
+
"MagicEditIcon with different color variations using Tailwind classes. Colors are applied via the fill and stroke properties 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-purple-500/30 bg-purple-500/20">
|
|
554
|
+
<MagicEditIcon className="h-8 w-8 text-purple-400" />
|
|
555
|
+
</div>
|
|
556
|
+
<div className="text-sm font-medium text-white">Purple</div>
|
|
557
|
+
<div className="text-xs text-purple-400">text-purple-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-indigo-500/30 bg-indigo-500/20">
|
|
561
|
+
<MagicEditIcon className="h-8 w-8 text-indigo-400" />
|
|
562
|
+
</div>
|
|
563
|
+
<div className="text-sm font-medium text-white">Indigo</div>
|
|
564
|
+
<div className="text-xs text-indigo-400">text-indigo-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-pink-500/30 bg-pink-500/20">
|
|
568
|
+
<MagicEditIcon className="h-8 w-8 text-pink-400" />
|
|
569
|
+
</div>
|
|
570
|
+
<div className="text-sm font-medium text-white">Pink</div>
|
|
571
|
+
<div className="text-xs text-pink-400">text-pink-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-cyan-500/30 bg-cyan-500/20">
|
|
575
|
+
<MagicEditIcon className="h-8 w-8 text-cyan-400" />
|
|
576
|
+
</div>
|
|
577
|
+
<div className="text-sm font-medium text-white">Cyan</div>
|
|
578
|
+
<div className="text-xs text-cyan-400">text-cyan-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-green-500/30 bg-green-500/20">
|
|
582
|
+
<MagicEditIcon className="h-8 w-8 text-green-400" />
|
|
583
|
+
</div>
|
|
584
|
+
<div className="text-sm font-medium text-white">Green</div>
|
|
585
|
+
<div className="text-xs text-green-400">text-green-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
|
+
<MagicEditIcon 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-white/30 bg-white/10">
|
|
596
|
+
<MagicEditIcon className="h-8 w-8 text-white" />
|
|
597
|
+
</div>
|
|
598
|
+
<div className="text-sm font-medium text-white">White</div>
|
|
599
|
+
<div className="text-xs text-white/60">text-white</div>
|
|
600
|
+
</div>
|
|
601
|
+
</div>
|
|
602
|
+
</div>
|
|
603
|
+
<div className="!space-y-4">
|
|
604
|
+
<h3 className="text-center text-lg font-semibold !text-white">
|
|
605
|
+
Design System Colors
|
|
606
|
+
</h3>
|
|
607
|
+
<div className="flex flex-wrap items-center justify-center gap-8">
|
|
608
|
+
<div className="text-center">
|
|
609
|
+
<div className="mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-white/20 bg-white/5">
|
|
610
|
+
<MagicEditIcon className="text-fm-primary h-8 w-8" />
|
|
611
|
+
</div>
|
|
612
|
+
<div className="text-sm font-medium text-white">Primary</div>
|
|
613
|
+
<div className="text-fm-primary text-xs">text-fm-primary</div>
|
|
614
|
+
</div>
|
|
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
|
+
<MagicEditIcon className="text-fm-secondary-500 h-8 w-8" />
|
|
618
|
+
</div>
|
|
619
|
+
<div className="text-sm font-medium text-white">Secondary</div>
|
|
620
|
+
<div className="text-fm-secondary-500 text-xs">
|
|
621
|
+
text-fm-secondary-500
|
|
622
|
+
</div>
|
|
623
|
+
</div>
|
|
624
|
+
<div className="text-center">
|
|
625
|
+
<div className="mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-white/20 bg-white/5">
|
|
626
|
+
<MagicEditIcon className="text-fm-neutral-800 h-8 w-8" />
|
|
627
|
+
</div>
|
|
628
|
+
<div className="text-sm font-medium text-white">Neutral</div>
|
|
629
|
+
<div className="text-fm-neutral-800 text-xs">
|
|
630
|
+
text-fm-neutral-800
|
|
631
|
+
</div>
|
|
632
|
+
</div>
|
|
633
|
+
</div>
|
|
634
|
+
</div>
|
|
635
|
+
</div>
|
|
636
|
+
),
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
export const UsageExamples: Story = {
|
|
640
|
+
parameters: {
|
|
641
|
+
...storyParameters,
|
|
642
|
+
docs: {
|
|
643
|
+
description: {
|
|
644
|
+
story:
|
|
645
|
+
"Common usage examples of MagicEditIcon in different contexts with various colors applied.",
|
|
646
|
+
},
|
|
647
|
+
},
|
|
648
|
+
},
|
|
649
|
+
render: () => (
|
|
650
|
+
<div className="min-h-dvh !space-y-8 rounded-lg bg-gradient-to-br from-gray-900 to-gray-800 p-8">
|
|
651
|
+
<div className="!space-y-4">
|
|
652
|
+
<h3 className="text-center text-lg font-semibold !text-white">
|
|
653
|
+
Action Buttons
|
|
654
|
+
</h3>
|
|
655
|
+
<div className="flex flex-wrap items-center justify-center gap-4">
|
|
656
|
+
<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">
|
|
657
|
+
<MagicEditIcon className="h-4 w-4 text-purple-400" />
|
|
658
|
+
<span>Magic Edit</span>
|
|
659
|
+
</button>
|
|
660
|
+
<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">
|
|
661
|
+
<MagicEditIcon className="h-4 w-4 text-indigo-400" />
|
|
662
|
+
<span>AI Enhance</span>
|
|
663
|
+
</button>
|
|
664
|
+
<button className="flex items-center gap-2 rounded-lg border border-pink-500/20 bg-pink-500/10 px-4 py-2 text-white transition-colors hover:bg-pink-500/20">
|
|
665
|
+
<MagicEditIcon className="h-4 w-4 text-pink-400" />
|
|
666
|
+
<span>Transform</span>
|
|
667
|
+
</button>
|
|
668
|
+
<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">
|
|
669
|
+
<MagicEditIcon className="h-4 w-4 text-cyan-400" />
|
|
670
|
+
<span>Enhance</span>
|
|
671
|
+
</button>
|
|
672
|
+
</div>
|
|
673
|
+
</div>
|
|
674
|
+
<div className="!space-y-4">
|
|
675
|
+
<h3 className="text-center text-lg font-semibold !text-white">
|
|
676
|
+
Tool List Items
|
|
677
|
+
</h3>
|
|
678
|
+
<div className="flex flex-wrap items-center justify-center gap-4">
|
|
679
|
+
<div className="flex items-center gap-2 rounded-lg border border-white/10 bg-white/5 px-4 py-2">
|
|
680
|
+
<MagicEditIcon className="h-5 w-5 text-purple-400" />
|
|
681
|
+
<span className="text-white/80">AI Editor</span>
|
|
682
|
+
</div>
|
|
683
|
+
<div className="flex items-center gap-2 rounded-lg border border-white/10 bg-white/5 px-4 py-2">
|
|
684
|
+
<MagicEditIcon className="h-5 w-5 text-indigo-400" />
|
|
685
|
+
<span className="text-white/80">Content Enhancer</span>
|
|
686
|
+
</div>
|
|
687
|
+
<div className="flex items-center gap-2 rounded-lg border border-white/10 bg-white/5 px-4 py-2">
|
|
688
|
+
<MagicEditIcon className="h-5 w-5 text-pink-400" />
|
|
689
|
+
<span className="text-white/80">Magic Tool</span>
|
|
690
|
+
</div>
|
|
691
|
+
<div className="flex items-center gap-2 rounded-lg border border-white/10 bg-white/5 px-4 py-2">
|
|
692
|
+
<MagicEditIcon className="h-5 w-5 text-cyan-400" />
|
|
693
|
+
<span className="text-white/80">Smart Edit</span>
|
|
694
|
+
</div>
|
|
695
|
+
</div>
|
|
696
|
+
</div>
|
|
697
|
+
<div className="!space-y-4">
|
|
698
|
+
<h3 className="text-center text-lg font-semibold !text-white">
|
|
699
|
+
Status Indicators
|
|
700
|
+
</h3>
|
|
701
|
+
<div className="flex flex-wrap items-center justify-center gap-4">
|
|
702
|
+
<div className="flex items-center gap-2 rounded-lg border border-green-500/20 bg-green-500/10 px-4 py-2">
|
|
703
|
+
<MagicEditIcon className="h-5 w-5 text-green-400" />
|
|
704
|
+
<span className="text-white">Active</span>
|
|
705
|
+
</div>
|
|
706
|
+
<div className="flex items-center gap-2 rounded-lg border border-yellow-500/20 bg-yellow-500/10 px-4 py-2">
|
|
707
|
+
<MagicEditIcon className="h-5 w-5 text-yellow-400" />
|
|
708
|
+
<span className="text-white">Processing</span>
|
|
709
|
+
</div>
|
|
710
|
+
<div className="flex items-center gap-2 rounded-lg border border-blue-500/20 bg-blue-500/10 px-4 py-2">
|
|
711
|
+
<MagicEditIcon className="h-5 w-5 text-blue-400" />
|
|
712
|
+
<span className="text-white">Ready</span>
|
|
713
|
+
</div>
|
|
714
|
+
</div>
|
|
715
|
+
</div>
|
|
716
|
+
</div>
|
|
717
|
+
),
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
export const Playground: Story = {
|
|
721
|
+
parameters: {
|
|
722
|
+
...storyParameters,
|
|
723
|
+
docs: {
|
|
724
|
+
description: {
|
|
725
|
+
story:
|
|
726
|
+
"Interactive playground to experiment with different MagicEditIcon configurations.",
|
|
727
|
+
},
|
|
728
|
+
},
|
|
729
|
+
},
|
|
730
|
+
args: {
|
|
731
|
+
width: 32,
|
|
732
|
+
height: 32,
|
|
733
|
+
className: "text-purple-400",
|
|
734
|
+
},
|
|
735
|
+
render: (args) => (
|
|
736
|
+
<div className="flex h-64 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
|
|
737
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-8">
|
|
738
|
+
<MagicEditIcon {...args} />
|
|
739
|
+
</div>
|
|
740
|
+
</div>
|
|
741
|
+
),
|
|
742
|
+
}
|