aural-ui 2.0.0 → 2.0.2
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/badge/Badge.stories.tsx +7 -0
- package/dist/components/banner/Banner.stories.tsx +7 -0
- package/dist/components/button/Button.stories.tsx +7 -0
- package/dist/components/char-count/CharCount.stories.tsx +7 -0
- package/dist/components/checkbox/Checkbox.stories.tsx +7 -0
- package/dist/components/chip/Chip.stories.tsx +10 -0
- package/dist/components/collapsible/Collapsible.stories.tsx +7 -0
- package/dist/components/dropdown/index.tsx +18 -7
- package/dist/components/form/Form.stories.tsx +7 -0
- package/dist/components/helper-text/HelperText.stories.tsx +7 -0
- package/dist/components/icon-button/IconButton.stories.tsx +4 -0
- package/dist/components/if-else/if-else.stories.tsx +7 -0
- package/dist/components/input/Input.stories.tsx +7 -0
- package/dist/components/label/Label.stories.tsx +7 -0
- package/dist/components/overlay/index.tsx +1 -1
- package/dist/components/pagination/Pagination.stories.tsx +7 -0
- package/dist/components/radio/Radio.stories.tsx +7 -0
- package/dist/components/scroll-area/index.tsx +18 -5
- package/dist/components/select/Select.stories.tsx +7 -0
- package/dist/components/sheet/index.tsx +5 -2
- package/dist/components/stepper/Stepper.stories.tsx +7 -0
- package/dist/components/switch/Switch.stories.tsx +7 -0
- package/dist/components/switch-case/SwitchCase.stories.tsx +7 -0
- package/dist/components/tag/Tag.stories.tsx +7 -0
- package/dist/components/textarea/TextArea.stories.tsx +7 -0
- package/dist/components/textarea/index.tsx +2 -0
- package/dist/components/toast/Toast.stories.tsx +7 -0
- package/dist/components/typography/Typography.stories.tsx +7 -0
- package/dist/icons/ai-avatar-icon/AiAvatarIcon.stories.tsx +1101 -0
- package/dist/icons/ai-avatar-icon/index.tsx +36 -0
- package/dist/icons/ai-avatar-icon/meta.ts +8 -0
- package/dist/icons/all-icons.tsx +155 -79
- package/dist/icons/arrow-corner-up-left-icon/ArrowCornerUpLeftIcon.stories.tsx +1013 -0
- package/dist/icons/arrow-corner-up-left-icon/index.tsx +24 -0
- package/dist/icons/arrow-corner-up-left-icon/meta.ts +8 -0
- package/dist/icons/arrow-corner-up-right-icon/ArrowCornerUpRightIcon.stories.tsx +1056 -0
- package/dist/icons/arrow-corner-up-right-icon/index.tsx +24 -0
- package/dist/icons/arrow-corner-up-right-icon/meta.ts +8 -0
- package/dist/icons/capital-a-letter-icon/CapitalALetterIcon.stories.tsx +992 -0
- package/dist/icons/capital-a-letter-icon/index.tsx +32 -0
- package/dist/icons/capital-a-letter-icon/meta.ts +8 -0
- package/dist/icons/head-icon/HeadIcon.stories.tsx +981 -0
- package/dist/icons/head-icon/index.tsx +26 -0
- package/dist/icons/head-icon/meta.ts +8 -0
- package/dist/icons/index.ts +40 -25
- package/dist/icons/layout-column-icon/LayoutColumnIcon.stories.tsx +1027 -0
- package/dist/icons/layout-column-icon/index.tsx +23 -0
- package/dist/icons/layout-column-icon/meta.ts +8 -0
- package/dist/icons/layout-left-icon/LayoutLeftIcon.stories.tsx +1007 -0
- package/dist/icons/layout-left-icon/index.tsx +26 -0
- package/dist/icons/layout-left-icon/meta.ts +8 -0
- package/dist/icons/layout-right-icon/LayoutRightIcon.stories.tsx +1001 -0
- package/dist/icons/layout-right-icon/index.tsx +26 -0
- package/dist/icons/layout-right-icon/meta.ts +8 -0
- package/dist/icons/musical-note-icon/MusicalNoteIcon.stories.tsx +1032 -0
- package/dist/icons/musical-note-icon/index.tsx +25 -0
- package/dist/icons/musical-note-icon/meta.ts +8 -0
- package/dist/icons/paint-roll-icon/PaintRollIcon.stories.tsx +1010 -0
- package/dist/icons/paint-roll-icon/index.tsx +24 -0
- package/dist/icons/paint-roll-icon/meta.ts +8 -0
- package/dist/icons/setting-icon/SettingIcon.stories.tsx +1024 -0
- package/dist/icons/setting-icon/index.tsx +30 -0
- package/dist/icons/setting-icon/meta.ts +8 -0
- package/dist/icons/sparkles-soft-icon/SparklesSoftIcon.stories.tsx +1018 -0
- package/dist/icons/sparkles-soft-icon/index.tsx +29 -0
- package/dist/icons/sparkles-soft-icon/meta.ts +8 -0
- package/dist/icons/text-color-icon/TextColorIcon.stories.tsx +1006 -0
- package/dist/icons/text-color-icon/index.tsx +35 -0
- package/dist/icons/text-color-icon/meta.ts +8 -0
- package/dist/icons/text-indicator-icon/TextIndicatorIcon.stories.tsx +1039 -0
- package/dist/icons/text-indicator-icon/index.tsx +24 -0
- package/dist/icons/text-indicator-icon/meta.ts +8 -0
- package/dist/index.js +124 -99
- package/package.json +1 -1
|
@@ -0,0 +1,1006 @@
|
|
|
1
|
+
import React from "react"
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
3
|
+
|
|
4
|
+
import { TextColorIcon } from "."
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof TextColorIcon> = {
|
|
7
|
+
title: "Icons/TextColorIcon",
|
|
8
|
+
component: TextColorIcon,
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: "fullscreen",
|
|
11
|
+
backgrounds: {
|
|
12
|
+
default: "dark",
|
|
13
|
+
values: [
|
|
14
|
+
{ name: "dark", value: "#0a0a0a" },
|
|
15
|
+
{ name: "darker", value: "#000000" },
|
|
16
|
+
{ name: "light", value: "#ffffff" },
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
docs: {
|
|
20
|
+
page: () => (
|
|
21
|
+
<>
|
|
22
|
+
{/* Override default docs styling */}
|
|
23
|
+
<style>
|
|
24
|
+
{`
|
|
25
|
+
.sbdocs-wrapper {
|
|
26
|
+
padding: 0 ;
|
|
27
|
+
max-width: none ;
|
|
28
|
+
background: transparent ;
|
|
29
|
+
}
|
|
30
|
+
.sbdocs-content {
|
|
31
|
+
max-width: none ;
|
|
32
|
+
padding: 0 ;
|
|
33
|
+
margin: 0 ;
|
|
34
|
+
background: transparent ;
|
|
35
|
+
}
|
|
36
|
+
.docs-story {
|
|
37
|
+
background: transparent ;
|
|
38
|
+
}
|
|
39
|
+
.sbdocs {
|
|
40
|
+
background: transparent ;
|
|
41
|
+
}
|
|
42
|
+
body {
|
|
43
|
+
background: #0a0a0a ;
|
|
44
|
+
}
|
|
45
|
+
#storybook-docs {
|
|
46
|
+
background: #0a0a0a ;
|
|
47
|
+
}
|
|
48
|
+
.sbdocs-preview {
|
|
49
|
+
background: transparent ;
|
|
50
|
+
border: none ;
|
|
51
|
+
}
|
|
52
|
+
.sbdocs-h1, .sbdocs-h2, .sbdocs-h3, .sbdocs-h4, .sbdocs-h5, .sbdocs-h6 {
|
|
53
|
+
color: white ;
|
|
54
|
+
}
|
|
55
|
+
.sbdocs-p, .sbdocs-li {
|
|
56
|
+
color: rgba(255, 255, 255, 0.7) ;
|
|
57
|
+
}
|
|
58
|
+
.sbdocs-code {
|
|
59
|
+
background: rgba(255, 255, 255, 0.1) ;
|
|
60
|
+
color: rgba(168, 85, 247, 1) ;
|
|
61
|
+
border: 1px solid rgba(255, 255, 255, 0.1) ;
|
|
62
|
+
}
|
|
63
|
+
.sbdocs-pre {
|
|
64
|
+
background: rgba(0, 0, 0, 0.4) ;
|
|
65
|
+
border: 1px solid rgba(255, 255, 255, 0.1) ;
|
|
66
|
+
}
|
|
67
|
+
.sbdocs-table {
|
|
68
|
+
background: rgba(255, 255, 255, 0.05) ;
|
|
69
|
+
border: 1px solid rgba(255, 255, 255, 0.1) ;
|
|
70
|
+
}
|
|
71
|
+
.sbdocs-table th {
|
|
72
|
+
background: rgba(255, 255, 255, 0.05) ;
|
|
73
|
+
color: white ;
|
|
74
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.1) ;
|
|
75
|
+
}
|
|
76
|
+
.sbdocs-table td {
|
|
77
|
+
color: rgba(255, 255, 255, 0.7) ;
|
|
78
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.05) ;
|
|
79
|
+
}
|
|
80
|
+
`}
|
|
81
|
+
</style>
|
|
82
|
+
|
|
83
|
+
<div className="min-h-screen bg-gradient-to-br from-gray-900 via-purple-900/20 to-gray-900">
|
|
84
|
+
{/* Header */}
|
|
85
|
+
<div className="relative overflow-hidden border-b border-white/10 bg-black/20 backdrop-blur-xl">
|
|
86
|
+
<div className="absolute inset-0 bg-gradient-to-r from-blue-500/10 via-transparent to-purple-500/10" />
|
|
87
|
+
<div className="relative !mx-auto max-w-7xl px-6 py-16">
|
|
88
|
+
<div className="!space-y-6 text-center">
|
|
89
|
+
<div className="!mx-auto flex h-24 w-24 items-center justify-center rounded-2xl border border-blue-500/30 bg-gradient-to-br from-blue-500/20 to-indigo-600/20">
|
|
90
|
+
<TextColorIcon className="h-12 w-12 text-blue-400" />
|
|
91
|
+
</div>
|
|
92
|
+
<h1 className="!text-fm-primary text-5xl font-bold">
|
|
93
|
+
TextColorIcon
|
|
94
|
+
</h1>
|
|
95
|
+
<p className="!mx-auto max-w-3xl text-xl leading-relaxed !text-white/70">
|
|
96
|
+
A versatile text color icon for rich text editors, design
|
|
97
|
+
tools, and formatting controls. Features both a text
|
|
98
|
+
character and color palette element for clear visual
|
|
99
|
+
communication.
|
|
100
|
+
</p>
|
|
101
|
+
|
|
102
|
+
{/* Stats */}
|
|
103
|
+
<div className="flex items-center justify-center gap-8 pt-8">
|
|
104
|
+
<div className="text-center">
|
|
105
|
+
<div className="text-3xl font-bold text-blue-300">
|
|
106
|
+
Accessible
|
|
107
|
+
</div>
|
|
108
|
+
<div className="text-sm text-white/60">
|
|
109
|
+
Screen reader friendly
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
<div className="h-8 w-px bg-white/20" />
|
|
113
|
+
<div className="text-center">
|
|
114
|
+
<div className="text-3xl font-bold text-purple-300">
|
|
115
|
+
Editor Ready
|
|
116
|
+
</div>
|
|
117
|
+
<div className="text-sm text-white/60">
|
|
118
|
+
Perfect for rich text
|
|
119
|
+
</div>
|
|
120
|
+
</div>
|
|
121
|
+
<div className="h-8 w-px bg-white/20" />
|
|
122
|
+
<div className="text-center">
|
|
123
|
+
<div className="text-3xl font-bold text-indigo-300">
|
|
124
|
+
Intuitive
|
|
125
|
+
</div>
|
|
126
|
+
<div className="text-sm text-white/60">
|
|
127
|
+
Clear visual metaphor
|
|
128
|
+
</div>
|
|
129
|
+
</div>
|
|
130
|
+
</div>
|
|
131
|
+
</div>
|
|
132
|
+
</div>
|
|
133
|
+
</div>
|
|
134
|
+
|
|
135
|
+
{/* Content */}
|
|
136
|
+
<div className="!mx-auto max-w-7xl !space-y-16 px-6 py-12">
|
|
137
|
+
{/* Quick Usage */}
|
|
138
|
+
<div className="!space-y-8">
|
|
139
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
140
|
+
Quick Start
|
|
141
|
+
</h2>
|
|
142
|
+
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
143
|
+
<div className="!space-y-4">
|
|
144
|
+
<h3 className="text-xl font-semibold !text-blue-300">
|
|
145
|
+
Basic Usage
|
|
146
|
+
</h3>
|
|
147
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
148
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
149
|
+
{`import { TextColorIcon } from "@icons/text-color-icon"
|
|
150
|
+
|
|
151
|
+
function MyEditor() {
|
|
152
|
+
return (
|
|
153
|
+
<button className="flex items-center gap-2 px-3 py-2">
|
|
154
|
+
<TextColorIcon className="h-4 w-4 text-blue-500" />
|
|
155
|
+
<span>Text Color</span>
|
|
156
|
+
</button>
|
|
157
|
+
)
|
|
158
|
+
}`}
|
|
159
|
+
</pre>
|
|
160
|
+
</div>
|
|
161
|
+
</div>
|
|
162
|
+
|
|
163
|
+
<div className="!space-y-4">
|
|
164
|
+
<h3 className="text-xl font-semibold !text-blue-300">
|
|
165
|
+
Live Preview
|
|
166
|
+
</h3>
|
|
167
|
+
<div className="flex h-32 items-center justify-center rounded-lg border border-white/10 bg-white/5">
|
|
168
|
+
<div className="flex items-center gap-3 rounded-lg border border-blue-500/20 bg-blue-500/10 px-4 py-2">
|
|
169
|
+
<TextColorIcon className="h-5 w-5 text-blue-400" />
|
|
170
|
+
<span className="text-white">Text Color</span>
|
|
171
|
+
</div>
|
|
172
|
+
</div>
|
|
173
|
+
</div>
|
|
174
|
+
</div>
|
|
175
|
+
</div>
|
|
176
|
+
|
|
177
|
+
{/* Props Documentation */}
|
|
178
|
+
<div className="!space-y-8">
|
|
179
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
180
|
+
Props & Configuration
|
|
181
|
+
</h2>
|
|
182
|
+
|
|
183
|
+
<div className="overflow-hidden rounded-lg border border-white/10 bg-white/5">
|
|
184
|
+
<div className="bg-white/5 p-4">
|
|
185
|
+
<h3 className="text-xl font-semibold !text-white">Props</h3>
|
|
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
|
+
<tr className="border-b border-white/5">
|
|
206
|
+
<td className="px-6 py-4 font-mono text-sm !text-blue-300">
|
|
207
|
+
width
|
|
208
|
+
</td>
|
|
209
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
210
|
+
number | string
|
|
211
|
+
</td>
|
|
212
|
+
<td className="px-6 py-4 text-sm !text-white/50">18</td>
|
|
213
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
214
|
+
Width of the icon in pixels
|
|
215
|
+
</td>
|
|
216
|
+
</tr>
|
|
217
|
+
<tr className="border-b border-white/5 !bg-black/10">
|
|
218
|
+
<td className="px-6 py-4 font-mono text-sm !text-blue-300">
|
|
219
|
+
height
|
|
220
|
+
</td>
|
|
221
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
222
|
+
number | string
|
|
223
|
+
</td>
|
|
224
|
+
<td className="px-6 py-4 text-sm !text-white/50">18</td>
|
|
225
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
226
|
+
Height of the icon in pixels
|
|
227
|
+
</td>
|
|
228
|
+
</tr>
|
|
229
|
+
<tr className="border-b border-white/5">
|
|
230
|
+
<td className="px-6 py-4 font-mono text-sm !text-blue-300">
|
|
231
|
+
stroke
|
|
232
|
+
</td>
|
|
233
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
234
|
+
string
|
|
235
|
+
</td>
|
|
236
|
+
<td className="px-6 py-4 text-sm !text-white/50">
|
|
237
|
+
currentColor
|
|
238
|
+
</td>
|
|
239
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
240
|
+
Stroke color of the icon
|
|
241
|
+
</td>
|
|
242
|
+
</tr>
|
|
243
|
+
<tr className="border-b border-white/5 !bg-black/10">
|
|
244
|
+
<td className="px-6 py-4 font-mono text-sm !text-blue-300">
|
|
245
|
+
strokeWidth
|
|
246
|
+
</td>
|
|
247
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
248
|
+
number | string
|
|
249
|
+
</td>
|
|
250
|
+
<td className="px-6 py-4 text-sm !text-white/50">
|
|
251
|
+
1.5
|
|
252
|
+
</td>
|
|
253
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
254
|
+
Stroke width of the icon
|
|
255
|
+
</td>
|
|
256
|
+
</tr>
|
|
257
|
+
<tr className="border-b border-white/5">
|
|
258
|
+
<td className="px-6 py-4 font-mono text-sm !text-blue-300">
|
|
259
|
+
className
|
|
260
|
+
</td>
|
|
261
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
262
|
+
string
|
|
263
|
+
</td>
|
|
264
|
+
<td className="px-6 py-4 text-sm !text-white/50">-</td>
|
|
265
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
266
|
+
CSS classes for styling
|
|
267
|
+
</td>
|
|
268
|
+
</tr>
|
|
269
|
+
<tr className="!bg-black/10">
|
|
270
|
+
<td className="px-6 py-4 font-mono text-sm !text-blue-300">
|
|
271
|
+
...svgProps
|
|
272
|
+
</td>
|
|
273
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
274
|
+
SVGProps
|
|
275
|
+
</td>
|
|
276
|
+
<td className="px-6 py-4 text-sm !text-white/50">-</td>
|
|
277
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
278
|
+
All standard SVG element props
|
|
279
|
+
</td>
|
|
280
|
+
</tr>
|
|
281
|
+
</tbody>
|
|
282
|
+
</table>
|
|
283
|
+
</div>
|
|
284
|
+
</div>
|
|
285
|
+
|
|
286
|
+
{/* Size Variations */}
|
|
287
|
+
<div className="!space-y-8">
|
|
288
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
289
|
+
Size Variations
|
|
290
|
+
</h2>
|
|
291
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-8">
|
|
292
|
+
<div className="!space-y-6">
|
|
293
|
+
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
|
|
294
|
+
<div className="!space-y-4">
|
|
295
|
+
<h3 className="text-lg font-semibold !text-blue-300">
|
|
296
|
+
Standard Sizes
|
|
297
|
+
</h3>
|
|
298
|
+
<div className="flex items-end gap-6 rounded-lg bg-black/20 p-6">
|
|
299
|
+
<div className="text-center">
|
|
300
|
+
<TextColorIcon className="!mx-auto mb-2 h-3 w-3 text-blue-400" />
|
|
301
|
+
<span className="text-xs text-white/60">12px</span>
|
|
302
|
+
</div>
|
|
303
|
+
<div className="text-center">
|
|
304
|
+
<TextColorIcon className="!mx-auto mb-2 h-4 w-4 text-blue-400" />
|
|
305
|
+
<span className="text-xs text-white/60">16px</span>
|
|
306
|
+
</div>
|
|
307
|
+
<div className="text-center">
|
|
308
|
+
<TextColorIcon className="!mx-auto mb-2 h-5 w-5 text-blue-400" />
|
|
309
|
+
<span className="text-xs text-white/60">20px</span>
|
|
310
|
+
</div>
|
|
311
|
+
<div className="text-center">
|
|
312
|
+
<TextColorIcon className="!mx-auto mb-2 h-6 w-6 text-blue-400" />
|
|
313
|
+
<span className="text-xs text-white/60">24px</span>
|
|
314
|
+
</div>
|
|
315
|
+
<div className="text-center">
|
|
316
|
+
<TextColorIcon className="!mx-auto mb-2 h-8 w-8 text-blue-400" />
|
|
317
|
+
<span className="text-xs text-white/60">32px</span>
|
|
318
|
+
</div>
|
|
319
|
+
<div className="text-center">
|
|
320
|
+
<TextColorIcon className="!mx-auto mb-2 h-12 w-12 text-blue-400" />
|
|
321
|
+
<span className="text-xs text-white/60">48px</span>
|
|
322
|
+
</div>
|
|
323
|
+
</div>
|
|
324
|
+
</div>
|
|
325
|
+
|
|
326
|
+
<div className="!space-y-4">
|
|
327
|
+
<h3 className="text-lg font-semibold !text-blue-300">
|
|
328
|
+
Code Example
|
|
329
|
+
</h3>
|
|
330
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
331
|
+
<pre className="overflow-x-auto text-sm !text-blue-300">
|
|
332
|
+
{`// Small (16px)
|
|
333
|
+
<TextColorIcon className="h-4 w-4" />
|
|
334
|
+
|
|
335
|
+
// Medium (24px)
|
|
336
|
+
<TextColorIcon className="h-6 w-6" />
|
|
337
|
+
|
|
338
|
+
// Large (32px)
|
|
339
|
+
<TextColorIcon className="h-8 w-8" />
|
|
340
|
+
|
|
341
|
+
// Custom size
|
|
342
|
+
<TextColorIcon width={40} height={40} />`}
|
|
343
|
+
</pre>
|
|
344
|
+
</div>
|
|
345
|
+
</div>
|
|
346
|
+
</div>
|
|
347
|
+
</div>
|
|
348
|
+
</div>
|
|
349
|
+
</div>
|
|
350
|
+
|
|
351
|
+
{/* Color Variations */}
|
|
352
|
+
<div className="!space-y-8">
|
|
353
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
354
|
+
Color Variations
|
|
355
|
+
</h2>
|
|
356
|
+
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
357
|
+
<div className="!space-y-4">
|
|
358
|
+
<h3 className="text-lg font-semibold !text-blue-300">
|
|
359
|
+
Editor Theme Colors
|
|
360
|
+
</h3>
|
|
361
|
+
<div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
362
|
+
<div className="flex items-center gap-4">
|
|
363
|
+
<TextColorIcon className="h-6 w-6 text-blue-400" />
|
|
364
|
+
<div>
|
|
365
|
+
<div className="text-sm font-medium text-white">
|
|
366
|
+
Primary
|
|
367
|
+
</div>
|
|
368
|
+
<div className="text-xs text-white/60">
|
|
369
|
+
text-blue-400
|
|
370
|
+
</div>
|
|
371
|
+
</div>
|
|
372
|
+
</div>
|
|
373
|
+
<div className="flex items-center gap-4">
|
|
374
|
+
<TextColorIcon className="h-6 w-6 text-purple-400" />
|
|
375
|
+
<div>
|
|
376
|
+
<div className="text-sm font-medium text-white">
|
|
377
|
+
Creative
|
|
378
|
+
</div>
|
|
379
|
+
<div className="text-xs text-white/60">
|
|
380
|
+
text-purple-400
|
|
381
|
+
</div>
|
|
382
|
+
</div>
|
|
383
|
+
</div>
|
|
384
|
+
<div className="flex items-center gap-4">
|
|
385
|
+
<TextColorIcon className="h-6 w-6 text-indigo-400" />
|
|
386
|
+
<div>
|
|
387
|
+
<div className="text-sm font-medium text-white">
|
|
388
|
+
Professional
|
|
389
|
+
</div>
|
|
390
|
+
<div className="text-xs text-white/60">
|
|
391
|
+
text-indigo-400
|
|
392
|
+
</div>
|
|
393
|
+
</div>
|
|
394
|
+
</div>
|
|
395
|
+
<div className="flex items-center gap-4">
|
|
396
|
+
<TextColorIcon className="h-6 w-6 text-slate-400" />
|
|
397
|
+
<div>
|
|
398
|
+
<div className="text-sm font-medium text-white">
|
|
399
|
+
Neutral
|
|
400
|
+
</div>
|
|
401
|
+
<div className="text-xs text-white/60">
|
|
402
|
+
text-slate-400
|
|
403
|
+
</div>
|
|
404
|
+
</div>
|
|
405
|
+
</div>
|
|
406
|
+
</div>
|
|
407
|
+
</div>
|
|
408
|
+
|
|
409
|
+
<div className="!space-y-4">
|
|
410
|
+
<h3 className="text-lg font-semibold !text-blue-300">
|
|
411
|
+
Custom Colors
|
|
412
|
+
</h3>
|
|
413
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
414
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
415
|
+
{`// Using Tailwind classes
|
|
416
|
+
<TextColorIcon className="h-6 w-6 text-blue-400" />
|
|
417
|
+
<TextColorIcon className="h-6 w-6 text-purple-500" />
|
|
418
|
+
|
|
419
|
+
// Using CSS custom properties
|
|
420
|
+
<TextColorIcon
|
|
421
|
+
className="h-6 w-6"
|
|
422
|
+
style={{ color: 'var(--color-primary)' }}
|
|
423
|
+
/>
|
|
424
|
+
|
|
425
|
+
// Direct stroke prop
|
|
426
|
+
<TextColorIcon
|
|
427
|
+
width={24}
|
|
428
|
+
height={24}
|
|
429
|
+
stroke="#3b82f6"
|
|
430
|
+
/>`}
|
|
431
|
+
</pre>
|
|
432
|
+
</div>
|
|
433
|
+
</div>
|
|
434
|
+
</div>
|
|
435
|
+
</div>
|
|
436
|
+
|
|
437
|
+
{/* Usage Examples */}
|
|
438
|
+
<div className="!space-y-8">
|
|
439
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
440
|
+
Usage Examples
|
|
441
|
+
</h2>
|
|
442
|
+
|
|
443
|
+
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
444
|
+
{/* Rich Text Toolbar */}
|
|
445
|
+
<div className="!space-y-4">
|
|
446
|
+
<h3 className="text-lg font-semibold !text-blue-300">
|
|
447
|
+
Rich Text Toolbar
|
|
448
|
+
</h3>
|
|
449
|
+
<div className="!space-y-4">
|
|
450
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-4">
|
|
451
|
+
<div className="flex items-center gap-2">
|
|
452
|
+
<button className="flex h-8 w-8 items-center justify-center rounded border border-white/10 bg-white/5 hover:bg-white/10">
|
|
453
|
+
<span className="text-sm font-bold text-white">
|
|
454
|
+
B
|
|
455
|
+
</span>
|
|
456
|
+
</button>
|
|
457
|
+
<button className="flex h-8 w-8 items-center justify-center rounded border border-white/10 bg-white/5 hover:bg-white/10">
|
|
458
|
+
<span className="text-sm text-white italic">I</span>
|
|
459
|
+
</button>
|
|
460
|
+
<button className="flex h-8 w-8 items-center justify-center rounded border border-blue-500/30 bg-blue-500/20 hover:bg-blue-500/30">
|
|
461
|
+
<TextColorIcon className="h-4 w-4 text-blue-400" />
|
|
462
|
+
</button>
|
|
463
|
+
<button className="flex h-8 w-8 items-center justify-center rounded border border-white/10 bg-white/5 hover:bg-white/10">
|
|
464
|
+
<span className="text-sm text-white">🎨</span>
|
|
465
|
+
</button>
|
|
466
|
+
</div>
|
|
467
|
+
</div>
|
|
468
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
469
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
470
|
+
{`<div className="flex items-center gap-2">
|
|
471
|
+
<button className="h-8 w-8 bg-white/5 border border-white/10 rounded">
|
|
472
|
+
<span className="font-bold">B</span>
|
|
473
|
+
</button>
|
|
474
|
+
<button className="h-8 w-8 bg-white/5 border border-white/10 rounded">
|
|
475
|
+
<span className="italic">I</span>
|
|
476
|
+
</button>
|
|
477
|
+
<button className="h-8 w-8 bg-blue-500/20 border border-blue-500/30 rounded">
|
|
478
|
+
<TextColorIcon className="h-4 w-4 text-blue-400" />
|
|
479
|
+
</button>
|
|
480
|
+
</div>`}
|
|
481
|
+
</pre>
|
|
482
|
+
</div>
|
|
483
|
+
</div>
|
|
484
|
+
</div>
|
|
485
|
+
|
|
486
|
+
{/* Color Picker Button */}
|
|
487
|
+
<div className="!space-y-4">
|
|
488
|
+
<h3 className="text-lg font-semibold !text-blue-300">
|
|
489
|
+
Color Picker Button
|
|
490
|
+
</h3>
|
|
491
|
+
<div className="!space-y-4">
|
|
492
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-4">
|
|
493
|
+
<button className="flex items-center gap-3 rounded-lg border border-blue-500/20 bg-blue-500/10 px-4 py-2 hover:bg-blue-500/20">
|
|
494
|
+
<TextColorIcon className="h-5 w-5 text-blue-400" />
|
|
495
|
+
<span className="text-white">Text Color</span>
|
|
496
|
+
<div className="ml-auto h-4 w-6 rounded border border-white/20 bg-gradient-to-r from-red-500 via-blue-500 to-purple-500"></div>
|
|
497
|
+
</button>
|
|
498
|
+
</div>
|
|
499
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
500
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
501
|
+
{`<button className="flex items-center gap-3 bg-blue-500/10 border border-blue-500/20 px-4 py-2 rounded-lg">
|
|
502
|
+
<TextColorIcon className="h-5 w-5 text-blue-400" />
|
|
503
|
+
<span>Text Color</span>
|
|
504
|
+
<div className="ml-auto h-4 w-6 rounded border bg-gradient-to-r from-red-500 via-blue-500 to-purple-500" />
|
|
505
|
+
</button>`}
|
|
506
|
+
</pre>
|
|
507
|
+
</div>
|
|
508
|
+
</div>
|
|
509
|
+
</div>
|
|
510
|
+
|
|
511
|
+
{/* Dropdown Menu */}
|
|
512
|
+
<div className="!space-y-4">
|
|
513
|
+
<h3 className="text-lg font-semibold !text-blue-300">
|
|
514
|
+
Dropdown Menu
|
|
515
|
+
</h3>
|
|
516
|
+
<div className="!space-y-4">
|
|
517
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-4">
|
|
518
|
+
<div className="!space-y-2">
|
|
519
|
+
<div className="flex items-center gap-3 rounded px-2 py-1 hover:bg-white/10">
|
|
520
|
+
<TextColorIcon className="h-4 w-4 text-red-400" />
|
|
521
|
+
<span className="text-white">Red</span>
|
|
522
|
+
</div>
|
|
523
|
+
<div className="flex items-center gap-3 rounded px-2 py-1 hover:bg-white/10">
|
|
524
|
+
<TextColorIcon className="h-4 w-4 text-blue-400" />
|
|
525
|
+
<span className="text-white">Blue</span>
|
|
526
|
+
</div>
|
|
527
|
+
<div className="flex items-center gap-3 rounded px-2 py-1 hover:bg-white/10">
|
|
528
|
+
<TextColorIcon className="h-4 w-4 text-green-400" />
|
|
529
|
+
<span className="text-white">Green</span>
|
|
530
|
+
</div>
|
|
531
|
+
<div className="flex items-center gap-3 rounded px-2 py-1 hover:bg-white/10">
|
|
532
|
+
<TextColorIcon className="h-4 w-4 text-purple-400" />
|
|
533
|
+
<span className="text-white">Purple</span>
|
|
534
|
+
</div>
|
|
535
|
+
</div>
|
|
536
|
+
</div>
|
|
537
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
538
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
539
|
+
{`<div className="space-y-2">
|
|
540
|
+
<div className="flex items-center gap-3 px-2 py-1 rounded hover:bg-white/10">
|
|
541
|
+
<TextColorIcon className="h-4 w-4 text-red-400" />
|
|
542
|
+
<span>Red</span>
|
|
543
|
+
</div>
|
|
544
|
+
<div className="flex items-center gap-3 px-2 py-1 rounded hover:bg-white/10">
|
|
545
|
+
<TextColorIcon className="h-4 w-4 text-blue-400" />
|
|
546
|
+
<span>Blue</span>
|
|
547
|
+
</div>
|
|
548
|
+
</div>`}
|
|
549
|
+
</pre>
|
|
550
|
+
</div>
|
|
551
|
+
</div>
|
|
552
|
+
</div>
|
|
553
|
+
|
|
554
|
+
{/* Design Tool Panel */}
|
|
555
|
+
<div className="!space-y-4">
|
|
556
|
+
<h3 className="text-lg font-semibold !text-blue-300">
|
|
557
|
+
Design Tool Panel
|
|
558
|
+
</h3>
|
|
559
|
+
<div className="!space-y-4">
|
|
560
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-4">
|
|
561
|
+
<div className="!space-y-3">
|
|
562
|
+
<div className="flex items-center justify-between">
|
|
563
|
+
<div className="flex items-center gap-2">
|
|
564
|
+
<TextColorIcon className="h-4 w-4 text-white" />
|
|
565
|
+
<span className="text-sm font-medium text-white">
|
|
566
|
+
Text Color
|
|
567
|
+
</span>
|
|
568
|
+
</div>
|
|
569
|
+
<div className="h-6 w-8 rounded border border-white/20 bg-blue-500"></div>
|
|
570
|
+
</div>
|
|
571
|
+
<div className="flex items-center justify-between">
|
|
572
|
+
<div className="flex items-center gap-2">
|
|
573
|
+
<span className="h-4 w-4 rounded border border-white/20 bg-red-500"></span>
|
|
574
|
+
<span className="text-sm font-medium text-white">
|
|
575
|
+
Background
|
|
576
|
+
</span>
|
|
577
|
+
</div>
|
|
578
|
+
<div className="h-6 w-8 rounded border border-white/20 bg-red-500"></div>
|
|
579
|
+
</div>
|
|
580
|
+
</div>
|
|
581
|
+
</div>
|
|
582
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
583
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
584
|
+
{`<div className="space-y-3">
|
|
585
|
+
<div className="flex items-center justify-between">
|
|
586
|
+
<div className="flex items-center gap-2">
|
|
587
|
+
<TextColorIcon className="h-4 w-4" />
|
|
588
|
+
<span className="text-sm font-medium">Text Color</span>
|
|
589
|
+
</div>
|
|
590
|
+
<div className="h-6 w-8 rounded border bg-blue-500" />
|
|
591
|
+
</div>
|
|
592
|
+
</div>`}
|
|
593
|
+
</pre>
|
|
594
|
+
</div>
|
|
595
|
+
</div>
|
|
596
|
+
</div>
|
|
597
|
+
</div>
|
|
598
|
+
</div>
|
|
599
|
+
|
|
600
|
+
{/* Accessibility */}
|
|
601
|
+
<div className="!space-y-8">
|
|
602
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
603
|
+
Accessibility Features
|
|
604
|
+
</h2>
|
|
605
|
+
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
|
|
606
|
+
<div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
607
|
+
<h3 className="text-lg font-semibold !text-green-300">
|
|
608
|
+
✅ Built-in Features
|
|
609
|
+
</h3>
|
|
610
|
+
<ul className="!space-y-2 text-sm !text-white/70">
|
|
611
|
+
<li className="!text-white/70">
|
|
612
|
+
Uses Radix UI AccessibleIcon wrapper
|
|
613
|
+
</li>
|
|
614
|
+
<li className="!text-white/70">
|
|
615
|
+
Provides screen reader label "Text Color icon"
|
|
616
|
+
</li>
|
|
617
|
+
<li className="!text-white/70">
|
|
618
|
+
Supports keyboard navigation when interactive
|
|
619
|
+
</li>
|
|
620
|
+
<li className="!text-white/70">
|
|
621
|
+
Maintains proper color contrast ratios
|
|
622
|
+
</li>
|
|
623
|
+
<li className="!text-white/70">
|
|
624
|
+
Scales with user's font size preferences
|
|
625
|
+
</li>
|
|
626
|
+
</ul>
|
|
627
|
+
</div>
|
|
628
|
+
|
|
629
|
+
<div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
630
|
+
<h3 className="text-lg font-semibold !text-blue-300">
|
|
631
|
+
💡 Best Practices
|
|
632
|
+
</h3>
|
|
633
|
+
<ul className="!space-y-2 text-sm text-white/70">
|
|
634
|
+
<li className="!text-white/70">
|
|
635
|
+
Always pair with descriptive text or tooltips
|
|
636
|
+
</li>
|
|
637
|
+
<li className="!text-white/70">
|
|
638
|
+
Use consistent placement in editor toolbars
|
|
639
|
+
</li>
|
|
640
|
+
<li className="!text-white/70">
|
|
641
|
+
Ensure sufficient color contrast
|
|
642
|
+
</li>
|
|
643
|
+
<li className="!text-white/70">
|
|
644
|
+
Add focus states for interactive elements
|
|
645
|
+
</li>
|
|
646
|
+
<li className="!text-white/70">
|
|
647
|
+
Consider colorblind-friendly alternatives
|
|
648
|
+
</li>
|
|
649
|
+
</ul>
|
|
650
|
+
</div>
|
|
651
|
+
</div>
|
|
652
|
+
|
|
653
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-6">
|
|
654
|
+
<h3 className="mb-4 text-lg font-semibold !text-purple-300">
|
|
655
|
+
Custom Accessibility Label
|
|
656
|
+
</h3>
|
|
657
|
+
<div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
|
|
658
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
659
|
+
<pre className="overflow-x-auto text-sm !text-blue-300">
|
|
660
|
+
{`// Custom implementation with specific label
|
|
661
|
+
import { AccessibleIcon } from "@radix-ui/react-accessible-icon"
|
|
662
|
+
|
|
663
|
+
function CustomTextColorIcon({ label = "Text Color", ...props }) {
|
|
664
|
+
return (
|
|
665
|
+
<AccessibleIcon label={label}>
|
|
666
|
+
<TextColorIcon {...props} />
|
|
667
|
+
</AccessibleIcon>
|
|
668
|
+
)
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
// Usage with specific context
|
|
672
|
+
<CustomTextColorIcon
|
|
673
|
+
label="Change text color"
|
|
674
|
+
className="h-4 w-4 text-blue-400"
|
|
675
|
+
/>`}
|
|
676
|
+
</pre>
|
|
677
|
+
</div>
|
|
678
|
+
<div className="!space-y-4">
|
|
679
|
+
<p className="text-sm !text-white/70">
|
|
680
|
+
For specific contexts like editor toolbars, you can wrap
|
|
681
|
+
the TextColorIcon with a custom AccessibleIcon component
|
|
682
|
+
that provides more descriptive labels for better screen
|
|
683
|
+
reader support.
|
|
684
|
+
</p>
|
|
685
|
+
<div className="rounded-lg border border-blue-500/20 bg-blue-500/10 p-4">
|
|
686
|
+
<div className="flex items-center gap-2 text-sm text-blue-200">
|
|
687
|
+
<TextColorIcon className="h-4 w-4" />
|
|
688
|
+
<span>
|
|
689
|
+
This approach gives clear context for formatting
|
|
690
|
+
tools
|
|
691
|
+
</span>
|
|
692
|
+
</div>
|
|
693
|
+
</div>
|
|
694
|
+
</div>
|
|
695
|
+
</div>
|
|
696
|
+
</div>
|
|
697
|
+
</div>
|
|
698
|
+
|
|
699
|
+
{/* Related Icons */}
|
|
700
|
+
<div className="!space-y-8">
|
|
701
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
702
|
+
Related Icons
|
|
703
|
+
</h2>
|
|
704
|
+
<div className="grid grid-cols-2 gap-6 md:grid-cols-4">
|
|
705
|
+
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
706
|
+
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-purple-500/20">
|
|
707
|
+
<span className="text-2xl">🎨</span>
|
|
708
|
+
</div>
|
|
709
|
+
<div>
|
|
710
|
+
<div className="font-medium text-white">PaletteIcon</div>
|
|
711
|
+
<div className="text-xs text-white/60">
|
|
712
|
+
Color selection
|
|
713
|
+
</div>
|
|
714
|
+
</div>
|
|
715
|
+
</div>
|
|
716
|
+
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
717
|
+
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-blue-500/20">
|
|
718
|
+
<span className="text-2xl">📝</span>
|
|
719
|
+
</div>
|
|
720
|
+
<div>
|
|
721
|
+
<div className="font-medium text-white">EditIcon</div>
|
|
722
|
+
<div className="text-xs text-white/60">Text editing</div>
|
|
723
|
+
</div>
|
|
724
|
+
</div>
|
|
725
|
+
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
726
|
+
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-green-500/20">
|
|
727
|
+
<span className="text-2xl">🔧</span>
|
|
728
|
+
</div>
|
|
729
|
+
<div>
|
|
730
|
+
<div className="font-medium text-white">FormatIcon</div>
|
|
731
|
+
<div className="text-xs text-white/60">
|
|
732
|
+
Text formatting
|
|
733
|
+
</div>
|
|
734
|
+
</div>
|
|
735
|
+
</div>
|
|
736
|
+
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
737
|
+
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-indigo-500/20">
|
|
738
|
+
<span className="text-2xl">🎯</span>
|
|
739
|
+
</div>
|
|
740
|
+
<div>
|
|
741
|
+
<div className="font-medium text-white">
|
|
742
|
+
HighlightIcon
|
|
743
|
+
</div>
|
|
744
|
+
<div className="text-xs text-white/60">
|
|
745
|
+
Text highlight
|
|
746
|
+
</div>
|
|
747
|
+
</div>
|
|
748
|
+
</div>
|
|
749
|
+
</div>
|
|
750
|
+
</div>
|
|
751
|
+
</div>
|
|
752
|
+
|
|
753
|
+
{/* Footer */}
|
|
754
|
+
<div className="border-t border-white/10 bg-black/20 backdrop-blur-xl">
|
|
755
|
+
<div className="!mx-auto max-w-7xl px-6 py-8">
|
|
756
|
+
<div className="!space-y-4 text-center">
|
|
757
|
+
<p className="!text-white/60">
|
|
758
|
+
TextColorIcon is part of the Aural UI icon library, designed
|
|
759
|
+
specifically for rich text editors, design tools, and
|
|
760
|
+
formatting interfaces with accessibility in mind.
|
|
761
|
+
</p>
|
|
762
|
+
<p className="text-sm !text-white/40">
|
|
763
|
+
Perfect for WYSIWYG editors, design applications, and any
|
|
764
|
+
interface that needs clear text formatting controls. Follows
|
|
765
|
+
WCAG guidelines and provides intuitive visual metaphors.
|
|
766
|
+
</p>
|
|
767
|
+
</div>
|
|
768
|
+
</div>
|
|
769
|
+
</div>
|
|
770
|
+
</div>
|
|
771
|
+
</>
|
|
772
|
+
),
|
|
773
|
+
},
|
|
774
|
+
},
|
|
775
|
+
tags: ["autodocs"],
|
|
776
|
+
argTypes: {
|
|
777
|
+
width: {
|
|
778
|
+
control: { type: "range", min: 8, max: 96, step: 2 },
|
|
779
|
+
description: "Width of the icon in pixels",
|
|
780
|
+
},
|
|
781
|
+
height: {
|
|
782
|
+
control: { type: "range", min: 8, max: 96, step: 2 },
|
|
783
|
+
description: "Height of the icon in pixels",
|
|
784
|
+
},
|
|
785
|
+
stroke: {
|
|
786
|
+
control: "color",
|
|
787
|
+
description: "Stroke color of the icon",
|
|
788
|
+
},
|
|
789
|
+
strokeWidth: {
|
|
790
|
+
control: { type: "range", min: 0.5, max: 4, step: 0.5 },
|
|
791
|
+
description: "Stroke width of the icon",
|
|
792
|
+
},
|
|
793
|
+
className: {
|
|
794
|
+
control: "text",
|
|
795
|
+
description: "CSS classes for styling",
|
|
796
|
+
},
|
|
797
|
+
},
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
export default meta
|
|
801
|
+
type Story = StoryObj<typeof TextColorIcon>
|
|
802
|
+
|
|
803
|
+
// Story parameters for consistent dark theme
|
|
804
|
+
const storyParameters = {
|
|
805
|
+
backgrounds: {
|
|
806
|
+
default: "dark",
|
|
807
|
+
values: [
|
|
808
|
+
{ name: "dark", value: "#0a0a0a" },
|
|
809
|
+
{ name: "darker", value: "#000000" },
|
|
810
|
+
],
|
|
811
|
+
},
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
export const Default: Story = {
|
|
815
|
+
args: {
|
|
816
|
+
width: 24,
|
|
817
|
+
height: 24,
|
|
818
|
+
className: "text-blue-400",
|
|
819
|
+
},
|
|
820
|
+
parameters: storyParameters,
|
|
821
|
+
render: (args) => (
|
|
822
|
+
<div className="flex h-32 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
|
|
823
|
+
<TextColorIcon {...args} />
|
|
824
|
+
</div>
|
|
825
|
+
),
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
export const SizeVariations: Story = {
|
|
829
|
+
parameters: {
|
|
830
|
+
...storyParameters,
|
|
831
|
+
docs: {
|
|
832
|
+
description: {
|
|
833
|
+
story:
|
|
834
|
+
"TextColorIcon in different sizes, from small toolbar buttons to large design tool interfaces.",
|
|
835
|
+
},
|
|
836
|
+
},
|
|
837
|
+
},
|
|
838
|
+
render: () => (
|
|
839
|
+
<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">
|
|
840
|
+
<div className="text-center">
|
|
841
|
+
<TextColorIcon className="!mx-auto mb-2 h-3 w-3 text-blue-400" />
|
|
842
|
+
<span className="text-xs text-white/60">12px</span>
|
|
843
|
+
</div>
|
|
844
|
+
<div className="text-center">
|
|
845
|
+
<TextColorIcon className="!mx-auto mb-2 h-4 w-4 text-blue-400" />
|
|
846
|
+
<span className="text-xs text-white/60">16px</span>
|
|
847
|
+
</div>
|
|
848
|
+
<div className="text-center">
|
|
849
|
+
<TextColorIcon className="!mx-auto mb-2 h-5 w-5 text-blue-400" />
|
|
850
|
+
<span className="text-xs text-white/60">20px</span>
|
|
851
|
+
</div>
|
|
852
|
+
<div className="text-center">
|
|
853
|
+
<TextColorIcon className="!mx-auto mb-2 h-6 w-6 text-blue-400" />
|
|
854
|
+
<span className="text-xs text-white/60">24px</span>
|
|
855
|
+
</div>
|
|
856
|
+
<div className="text-center">
|
|
857
|
+
<TextColorIcon className="!mx-auto mb-2 h-8 w-8 text-blue-400" />
|
|
858
|
+
<span className="text-xs text-white/60">32px</span>
|
|
859
|
+
</div>
|
|
860
|
+
<div className="text-center">
|
|
861
|
+
<TextColorIcon className="!mx-auto mb-2 h-12 w-12 text-blue-400" />
|
|
862
|
+
<span className="text-xs text-white/60">48px</span>
|
|
863
|
+
</div>
|
|
864
|
+
</div>
|
|
865
|
+
),
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
export const ColorVariations: Story = {
|
|
869
|
+
parameters: {
|
|
870
|
+
...storyParameters,
|
|
871
|
+
docs: {
|
|
872
|
+
description: {
|
|
873
|
+
story:
|
|
874
|
+
"TextColorIcon in different colors suitable for various editor themes and design contexts.",
|
|
875
|
+
},
|
|
876
|
+
},
|
|
877
|
+
},
|
|
878
|
+
render: () => (
|
|
879
|
+
<div className="grid min-h-dvh grid-cols-2 items-center justify-center gap-6 rounded-lg bg-gradient-to-br from-gray-900 to-gray-800 p-8 md:grid-cols-4">
|
|
880
|
+
<div className="text-center">
|
|
881
|
+
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-blue-500/30 bg-blue-500/20">
|
|
882
|
+
<TextColorIcon className="h-8 w-8 text-blue-400" />
|
|
883
|
+
</div>
|
|
884
|
+
<div className="text-sm font-medium text-white">Primary</div>
|
|
885
|
+
<div className="text-xs text-blue-400">text-blue-400</div>
|
|
886
|
+
</div>
|
|
887
|
+
<div className="text-center">
|
|
888
|
+
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-purple-500/30 bg-purple-500/20">
|
|
889
|
+
<TextColorIcon className="h-8 w-8 text-purple-400" />
|
|
890
|
+
</div>
|
|
891
|
+
<div className="text-sm font-medium text-white">Creative</div>
|
|
892
|
+
<div className="text-xs text-purple-400">text-purple-400</div>
|
|
893
|
+
</div>
|
|
894
|
+
<div className="text-center">
|
|
895
|
+
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-indigo-500/30 bg-indigo-500/20">
|
|
896
|
+
<TextColorIcon className="h-8 w-8 text-indigo-400" />
|
|
897
|
+
</div>
|
|
898
|
+
<div className="text-sm font-medium text-white">Professional</div>
|
|
899
|
+
<div className="text-xs text-indigo-400">text-indigo-400</div>
|
|
900
|
+
</div>
|
|
901
|
+
<div className="text-center">
|
|
902
|
+
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-slate-500/30 bg-slate-500/20">
|
|
903
|
+
<TextColorIcon className="h-8 w-8 text-slate-400" />
|
|
904
|
+
</div>
|
|
905
|
+
<div className="text-sm font-medium text-white">Neutral</div>
|
|
906
|
+
<div className="text-xs text-slate-400">text-slate-400</div>
|
|
907
|
+
</div>
|
|
908
|
+
</div>
|
|
909
|
+
),
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
export const UsageExamples: Story = {
|
|
913
|
+
parameters: {
|
|
914
|
+
...storyParameters,
|
|
915
|
+
docs: {
|
|
916
|
+
description: {
|
|
917
|
+
story:
|
|
918
|
+
"Real-world usage examples showing TextColorIcon in different editor and design tool contexts.",
|
|
919
|
+
},
|
|
920
|
+
},
|
|
921
|
+
},
|
|
922
|
+
render: () => (
|
|
923
|
+
<div className="min-h-dvh !space-y-8 rounded-lg bg-gradient-to-br from-gray-900 to-gray-800 p-8">
|
|
924
|
+
{/* Rich Text Toolbar */}
|
|
925
|
+
<div className="!space-y-2">
|
|
926
|
+
<h3 className="text-sm font-medium text-white">Rich Text Toolbar</h3>
|
|
927
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-4">
|
|
928
|
+
<div className="flex items-center gap-2">
|
|
929
|
+
<button className="flex h-8 w-8 items-center justify-center rounded border border-white/10 bg-white/5 hover:bg-white/10">
|
|
930
|
+
<span className="text-sm font-bold text-white">B</span>
|
|
931
|
+
</button>
|
|
932
|
+
<button className="flex h-8 w-8 items-center justify-center rounded border border-white/10 bg-white/5 hover:bg-white/10">
|
|
933
|
+
<span className="text-sm text-white italic">I</span>
|
|
934
|
+
</button>
|
|
935
|
+
<button className="flex h-8 w-8 items-center justify-center rounded border border-blue-500/30 bg-blue-500/20 hover:bg-blue-500/30">
|
|
936
|
+
<TextColorIcon className="h-4 w-4 text-blue-400" />
|
|
937
|
+
</button>
|
|
938
|
+
<button className="flex h-8 w-8 items-center justify-center rounded border border-white/10 bg-white/5 hover:bg-white/10">
|
|
939
|
+
<span className="text-sm text-white">🎨</span>
|
|
940
|
+
</button>
|
|
941
|
+
</div>
|
|
942
|
+
</div>
|
|
943
|
+
</div>
|
|
944
|
+
|
|
945
|
+
{/* Color Picker Button */}
|
|
946
|
+
<div className="!space-y-2">
|
|
947
|
+
<h3 className="text-sm font-medium text-white">Color Picker Button</h3>
|
|
948
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-4">
|
|
949
|
+
<button className="flex items-center gap-3 rounded-lg border border-blue-500/20 bg-blue-500/10 px-4 py-2 hover:bg-blue-500/20">
|
|
950
|
+
<TextColorIcon className="h-5 w-5 text-blue-400" />
|
|
951
|
+
<span className="text-white">Text Color</span>
|
|
952
|
+
<div className="ml-auto h-4 w-6 rounded border border-white/20 bg-gradient-to-r from-red-500 via-blue-500 to-purple-500"></div>
|
|
953
|
+
</button>
|
|
954
|
+
</div>
|
|
955
|
+
</div>
|
|
956
|
+
|
|
957
|
+
{/* Color Options Dropdown */}
|
|
958
|
+
<div className="!space-y-2">
|
|
959
|
+
<h3 className="text-sm font-medium text-white">
|
|
960
|
+
Color Options Dropdown
|
|
961
|
+
</h3>
|
|
962
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-4">
|
|
963
|
+
<div className="!space-y-2">
|
|
964
|
+
<div className="flex items-center gap-3 rounded px-2 py-1 hover:bg-white/10">
|
|
965
|
+
<TextColorIcon className="h-4 w-4 text-red-400" />
|
|
966
|
+
<span className="text-white">Red</span>
|
|
967
|
+
</div>
|
|
968
|
+
<div className="flex items-center gap-3 rounded px-2 py-1 hover:bg-white/10">
|
|
969
|
+
<TextColorIcon className="h-4 w-4 text-blue-400" />
|
|
970
|
+
<span className="text-white">Blue</span>
|
|
971
|
+
</div>
|
|
972
|
+
<div className="flex items-center gap-3 rounded px-2 py-1 hover:bg-white/10">
|
|
973
|
+
<TextColorIcon className="h-4 w-4 text-green-400" />
|
|
974
|
+
<span className="text-white">Green</span>
|
|
975
|
+
</div>
|
|
976
|
+
</div>
|
|
977
|
+
</div>
|
|
978
|
+
</div>
|
|
979
|
+
</div>
|
|
980
|
+
),
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
export const Playground: Story = {
|
|
984
|
+
parameters: {
|
|
985
|
+
...storyParameters,
|
|
986
|
+
docs: {
|
|
987
|
+
description: {
|
|
988
|
+
story:
|
|
989
|
+
"Interactive playground to experiment with different TextColorIcon configurations.",
|
|
990
|
+
},
|
|
991
|
+
},
|
|
992
|
+
},
|
|
993
|
+
args: {
|
|
994
|
+
width: 32,
|
|
995
|
+
height: 32,
|
|
996
|
+
className: "text-blue-400",
|
|
997
|
+
strokeWidth: 1.5,
|
|
998
|
+
},
|
|
999
|
+
render: (args) => (
|
|
1000
|
+
<div className="flex h-64 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
|
|
1001
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-8">
|
|
1002
|
+
<TextColorIcon {...args} />
|
|
1003
|
+
</div>
|
|
1004
|
+
</div>
|
|
1005
|
+
),
|
|
1006
|
+
}
|