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