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,1024 @@
|
|
|
1
|
+
import React from "react"
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
3
|
+
|
|
4
|
+
import { SettingIcon } from "."
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof SettingIcon> = {
|
|
7
|
+
title: "Icons/SettingIcon",
|
|
8
|
+
component: SettingIcon,
|
|
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-blue-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-purple-500/20">
|
|
90
|
+
<SettingIcon className="h-12 w-12 text-blue-400" />
|
|
91
|
+
</div>
|
|
92
|
+
<h1 className="!text-fm-primary text-5xl font-bold">
|
|
93
|
+
SettingIcon
|
|
94
|
+
</h1>
|
|
95
|
+
<p className="!mx-auto max-w-3xl text-xl leading-relaxed !text-white/70">
|
|
96
|
+
A versatile settings icon for configuration panels, user
|
|
97
|
+
preferences, and system controls. Built with accessibility
|
|
98
|
+
in mind using Radix UI's AccessibleIcon wrapper.
|
|
99
|
+
</p>
|
|
100
|
+
|
|
101
|
+
{/* Stats */}
|
|
102
|
+
<div className="flex items-center justify-center gap-8 pt-8">
|
|
103
|
+
<div className="text-center">
|
|
104
|
+
<div className="text-3xl font-bold text-blue-300">
|
|
105
|
+
Accessible
|
|
106
|
+
</div>
|
|
107
|
+
<div className="text-sm text-white/60">
|
|
108
|
+
Screen reader friendly
|
|
109
|
+
</div>
|
|
110
|
+
</div>
|
|
111
|
+
<div className="h-8 w-px bg-white/20" />
|
|
112
|
+
<div className="text-center">
|
|
113
|
+
<div className="text-3xl font-bold text-purple-300">
|
|
114
|
+
Scalable
|
|
115
|
+
</div>
|
|
116
|
+
<div className="text-sm text-white/60">
|
|
117
|
+
Any size needed
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
<div className="h-8 w-px bg-white/20" />
|
|
121
|
+
<div className="text-center">
|
|
122
|
+
<div className="text-3xl font-bold text-indigo-300">
|
|
123
|
+
Flexible
|
|
124
|
+
</div>
|
|
125
|
+
<div className="text-sm text-white/60">
|
|
126
|
+
Customizable styling
|
|
127
|
+
</div>
|
|
128
|
+
</div>
|
|
129
|
+
</div>
|
|
130
|
+
</div>
|
|
131
|
+
</div>
|
|
132
|
+
</div>
|
|
133
|
+
|
|
134
|
+
{/* Content */}
|
|
135
|
+
<div className="!mx-auto max-w-7xl !space-y-16 px-6 py-12">
|
|
136
|
+
{/* Quick Usage */}
|
|
137
|
+
<div className="!space-y-8">
|
|
138
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
139
|
+
Quick Start
|
|
140
|
+
</h2>
|
|
141
|
+
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
142
|
+
<div className="!space-y-4">
|
|
143
|
+
<h3 className="text-xl font-semibold !text-blue-300">
|
|
144
|
+
Basic Usage
|
|
145
|
+
</h3>
|
|
146
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
147
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
148
|
+
{`import { SettingIcon } from "@icons/setting-icon"
|
|
149
|
+
|
|
150
|
+
function MyComponent() {
|
|
151
|
+
return (
|
|
152
|
+
<div className="flex items-center gap-2">
|
|
153
|
+
<SettingIcon className="h-5 w-5 text-blue-500" />
|
|
154
|
+
<span>Settings</span>
|
|
155
|
+
</div>
|
|
156
|
+
)
|
|
157
|
+
}`}
|
|
158
|
+
</pre>
|
|
159
|
+
</div>
|
|
160
|
+
</div>
|
|
161
|
+
|
|
162
|
+
<div className="!space-y-4">
|
|
163
|
+
<h3 className="text-xl font-semibold !text-blue-300">
|
|
164
|
+
Live Preview
|
|
165
|
+
</h3>
|
|
166
|
+
<div className="flex h-32 items-center justify-center rounded-lg border border-white/10 bg-white/5">
|
|
167
|
+
<div className="flex items-center gap-3 rounded-lg border border-blue-500/20 bg-blue-500/10 px-4 py-2">
|
|
168
|
+
<SettingIcon className="h-5 w-5 text-blue-400" />
|
|
169
|
+
<span className="text-white">Settings</span>
|
|
170
|
+
</div>
|
|
171
|
+
</div>
|
|
172
|
+
</div>
|
|
173
|
+
</div>
|
|
174
|
+
</div>
|
|
175
|
+
|
|
176
|
+
{/* Props Documentation */}
|
|
177
|
+
<div className="!space-y-8">
|
|
178
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
179
|
+
Props & Configuration
|
|
180
|
+
</h2>
|
|
181
|
+
|
|
182
|
+
<div className="overflow-hidden rounded-lg border border-white/10 bg-white/5">
|
|
183
|
+
<div className="bg-white/5 p-4">
|
|
184
|
+
<h3 className="text-xl font-semibold !text-white">Props</h3>
|
|
185
|
+
</div>
|
|
186
|
+
<table className="!my-0 w-full">
|
|
187
|
+
<thead className="bg-white/5">
|
|
188
|
+
<tr className="border-b border-white/10">
|
|
189
|
+
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
190
|
+
Prop
|
|
191
|
+
</th>
|
|
192
|
+
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
193
|
+
Type
|
|
194
|
+
</th>
|
|
195
|
+
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
196
|
+
Default
|
|
197
|
+
</th>
|
|
198
|
+
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
199
|
+
Description
|
|
200
|
+
</th>
|
|
201
|
+
</tr>
|
|
202
|
+
</thead>
|
|
203
|
+
<tbody>
|
|
204
|
+
<tr className="border-b border-white/5">
|
|
205
|
+
<td className="px-6 py-4 font-mono text-sm !text-blue-300">
|
|
206
|
+
width
|
|
207
|
+
</td>
|
|
208
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
209
|
+
number | string
|
|
210
|
+
</td>
|
|
211
|
+
<td className="px-6 py-4 text-sm !text-white/50">12</td>
|
|
212
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
213
|
+
Width of the icon in pixels
|
|
214
|
+
</td>
|
|
215
|
+
</tr>
|
|
216
|
+
<tr className="border-b border-white/5 !bg-black/10">
|
|
217
|
+
<td className="px-6 py-4 font-mono text-sm !text-blue-300">
|
|
218
|
+
height
|
|
219
|
+
</td>
|
|
220
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
221
|
+
number | string
|
|
222
|
+
</td>
|
|
223
|
+
<td className="px-6 py-4 text-sm !text-white/50">12</td>
|
|
224
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
225
|
+
Height of the icon in pixels
|
|
226
|
+
</td>
|
|
227
|
+
</tr>
|
|
228
|
+
<tr className="border-b border-white/5">
|
|
229
|
+
<td className="px-6 py-4 font-mono text-sm !text-blue-300">
|
|
230
|
+
stroke
|
|
231
|
+
</td>
|
|
232
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
233
|
+
string
|
|
234
|
+
</td>
|
|
235
|
+
<td className="px-6 py-4 text-sm !text-white/50">
|
|
236
|
+
currentColor
|
|
237
|
+
</td>
|
|
238
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
239
|
+
Stroke color of the icon
|
|
240
|
+
</td>
|
|
241
|
+
</tr>
|
|
242
|
+
<tr className="border-b border-white/5 !bg-black/10">
|
|
243
|
+
<td className="px-6 py-4 font-mono text-sm !text-blue-300">
|
|
244
|
+
strokeWidth
|
|
245
|
+
</td>
|
|
246
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
247
|
+
number | string
|
|
248
|
+
</td>
|
|
249
|
+
<td className="px-6 py-4 text-sm !text-white/50">
|
|
250
|
+
0.75
|
|
251
|
+
</td>
|
|
252
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
253
|
+
Width of the stroke lines
|
|
254
|
+
</td>
|
|
255
|
+
</tr>
|
|
256
|
+
<tr className="border-b border-white/5">
|
|
257
|
+
<td className="px-6 py-4 font-mono text-sm !text-blue-300">
|
|
258
|
+
className
|
|
259
|
+
</td>
|
|
260
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
261
|
+
string
|
|
262
|
+
</td>
|
|
263
|
+
<td className="px-6 py-4 text-sm !text-white/50">-</td>
|
|
264
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
265
|
+
CSS classes for styling
|
|
266
|
+
</td>
|
|
267
|
+
</tr>
|
|
268
|
+
<tr className="!bg-black/10">
|
|
269
|
+
<td className="px-6 py-4 font-mono text-sm !text-blue-300">
|
|
270
|
+
...svgProps
|
|
271
|
+
</td>
|
|
272
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
273
|
+
SVGProps
|
|
274
|
+
</td>
|
|
275
|
+
<td className="px-6 py-4 text-sm !text-white/50">-</td>
|
|
276
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
277
|
+
All standard SVG element props
|
|
278
|
+
</td>
|
|
279
|
+
</tr>
|
|
280
|
+
</tbody>
|
|
281
|
+
</table>
|
|
282
|
+
</div>
|
|
283
|
+
</div>
|
|
284
|
+
|
|
285
|
+
{/* Size Variations */}
|
|
286
|
+
<div className="!space-y-8">
|
|
287
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
288
|
+
Size Variations
|
|
289
|
+
</h2>
|
|
290
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-8">
|
|
291
|
+
<div className="!space-y-6">
|
|
292
|
+
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
|
|
293
|
+
<div className="!space-y-4">
|
|
294
|
+
<h3 className="text-lg font-semibold !text-blue-300">
|
|
295
|
+
Standard Sizes
|
|
296
|
+
</h3>
|
|
297
|
+
<div className="flex items-end gap-6 rounded-lg bg-black/20 p-6">
|
|
298
|
+
<div className="text-center">
|
|
299
|
+
<SettingIcon className="!mx-auto mb-2 h-3 w-3 text-blue-400" />
|
|
300
|
+
<span className="text-xs text-white/60">12px</span>
|
|
301
|
+
</div>
|
|
302
|
+
<div className="text-center">
|
|
303
|
+
<SettingIcon className="!mx-auto mb-2 h-4 w-4 text-blue-400" />
|
|
304
|
+
<span className="text-xs text-white/60">16px</span>
|
|
305
|
+
</div>
|
|
306
|
+
<div className="text-center">
|
|
307
|
+
<SettingIcon className="!mx-auto mb-2 h-5 w-5 text-blue-400" />
|
|
308
|
+
<span className="text-xs text-white/60">20px</span>
|
|
309
|
+
</div>
|
|
310
|
+
<div className="text-center">
|
|
311
|
+
<SettingIcon className="!mx-auto mb-2 h-6 w-6 text-blue-400" />
|
|
312
|
+
<span className="text-xs text-white/60">24px</span>
|
|
313
|
+
</div>
|
|
314
|
+
<div className="text-center">
|
|
315
|
+
<SettingIcon className="!mx-auto mb-2 h-8 w-8 text-blue-400" />
|
|
316
|
+
<span className="text-xs text-white/60">32px</span>
|
|
317
|
+
</div>
|
|
318
|
+
<div className="text-center">
|
|
319
|
+
<SettingIcon className="!mx-auto mb-2 h-12 w-12 text-blue-400" />
|
|
320
|
+
<span className="text-xs text-white/60">48px</span>
|
|
321
|
+
</div>
|
|
322
|
+
</div>
|
|
323
|
+
</div>
|
|
324
|
+
|
|
325
|
+
<div className="!space-y-4">
|
|
326
|
+
<h3 className="text-lg font-semibold !text-blue-300">
|
|
327
|
+
Code Example
|
|
328
|
+
</h3>
|
|
329
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
330
|
+
<pre className="overflow-x-auto text-sm !text-blue-300">
|
|
331
|
+
{`// Small (16px)
|
|
332
|
+
<SettingIcon className="h-4 w-4" />
|
|
333
|
+
|
|
334
|
+
// Medium (24px)
|
|
335
|
+
<SettingIcon className="h-6 w-6" />
|
|
336
|
+
|
|
337
|
+
// Large (32px)
|
|
338
|
+
<SettingIcon className="h-8 w-8" />
|
|
339
|
+
|
|
340
|
+
// Custom size
|
|
341
|
+
<SettingIcon width={40} height={40} />`}
|
|
342
|
+
</pre>
|
|
343
|
+
</div>
|
|
344
|
+
</div>
|
|
345
|
+
</div>
|
|
346
|
+
</div>
|
|
347
|
+
</div>
|
|
348
|
+
</div>
|
|
349
|
+
|
|
350
|
+
{/* Color Variations */}
|
|
351
|
+
<div className="!space-y-8">
|
|
352
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
353
|
+
Color Variations
|
|
354
|
+
</h2>
|
|
355
|
+
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
356
|
+
<div className="!space-y-4">
|
|
357
|
+
<h3 className="text-lg font-semibold !text-blue-300">
|
|
358
|
+
Theme Colors
|
|
359
|
+
</h3>
|
|
360
|
+
<div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
361
|
+
<div className="flex items-center gap-4">
|
|
362
|
+
<SettingIcon className="h-6 w-6 text-blue-400" />
|
|
363
|
+
<div>
|
|
364
|
+
<div className="text-sm font-medium text-white">
|
|
365
|
+
Primary
|
|
366
|
+
</div>
|
|
367
|
+
<div className="text-xs text-white/60">
|
|
368
|
+
text-blue-400
|
|
369
|
+
</div>
|
|
370
|
+
</div>
|
|
371
|
+
</div>
|
|
372
|
+
<div className="flex items-center gap-4">
|
|
373
|
+
<SettingIcon className="h-6 w-6 text-purple-400" />
|
|
374
|
+
<div>
|
|
375
|
+
<div className="text-sm font-medium text-white">
|
|
376
|
+
Secondary
|
|
377
|
+
</div>
|
|
378
|
+
<div className="text-xs text-white/60">
|
|
379
|
+
text-purple-400
|
|
380
|
+
</div>
|
|
381
|
+
</div>
|
|
382
|
+
</div>
|
|
383
|
+
<div className="flex items-center gap-4">
|
|
384
|
+
<SettingIcon className="h-6 w-6 text-gray-400" />
|
|
385
|
+
<div>
|
|
386
|
+
<div className="text-sm font-medium text-white">
|
|
387
|
+
Neutral
|
|
388
|
+
</div>
|
|
389
|
+
<div className="text-xs text-white/60">
|
|
390
|
+
text-gray-400
|
|
391
|
+
</div>
|
|
392
|
+
</div>
|
|
393
|
+
</div>
|
|
394
|
+
<div className="flex items-center gap-4">
|
|
395
|
+
<SettingIcon className="h-6 w-6 text-white" />
|
|
396
|
+
<div>
|
|
397
|
+
<div className="text-sm font-medium text-white">
|
|
398
|
+
Light
|
|
399
|
+
</div>
|
|
400
|
+
<div className="text-xs text-white/60">
|
|
401
|
+
text-white
|
|
402
|
+
</div>
|
|
403
|
+
</div>
|
|
404
|
+
</div>
|
|
405
|
+
</div>
|
|
406
|
+
</div>
|
|
407
|
+
|
|
408
|
+
<div className="!space-y-4">
|
|
409
|
+
<h3 className="text-lg font-semibold !text-blue-300">
|
|
410
|
+
Custom Colors
|
|
411
|
+
</h3>
|
|
412
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
413
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
414
|
+
{`// Using Tailwind classes
|
|
415
|
+
<SettingIcon className="h-6 w-6 text-blue-400" />
|
|
416
|
+
<SettingIcon className="h-6 w-6 text-purple-500" />
|
|
417
|
+
|
|
418
|
+
// Using CSS custom properties
|
|
419
|
+
<SettingIcon
|
|
420
|
+
className="h-6 w-6"
|
|
421
|
+
style={{ color: 'var(--color-primary)' }}
|
|
422
|
+
/>
|
|
423
|
+
|
|
424
|
+
// Direct stroke prop
|
|
425
|
+
<SettingIcon
|
|
426
|
+
width={24}
|
|
427
|
+
height={24}
|
|
428
|
+
stroke="#3b82f6"
|
|
429
|
+
/>`}
|
|
430
|
+
</pre>
|
|
431
|
+
</div>
|
|
432
|
+
</div>
|
|
433
|
+
</div>
|
|
434
|
+
</div>
|
|
435
|
+
|
|
436
|
+
{/* Usage Examples */}
|
|
437
|
+
<div className="!space-y-8">
|
|
438
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
439
|
+
Usage Examples
|
|
440
|
+
</h2>
|
|
441
|
+
|
|
442
|
+
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
443
|
+
{/* Settings Menu */}
|
|
444
|
+
<div className="!space-y-4">
|
|
445
|
+
<h3 className="text-lg font-semibold !text-blue-300">
|
|
446
|
+
Settings Menu
|
|
447
|
+
</h3>
|
|
448
|
+
<div className="!space-y-4">
|
|
449
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-4">
|
|
450
|
+
<div className="!space-y-3">
|
|
451
|
+
<div className="flex items-center gap-3 rounded-lg p-2 hover:bg-white/5">
|
|
452
|
+
<SettingIcon className="h-5 w-5 text-blue-400" />
|
|
453
|
+
<span className="text-white">General Settings</span>
|
|
454
|
+
</div>
|
|
455
|
+
<div className="flex items-center gap-3 rounded-lg p-2 hover:bg-white/5">
|
|
456
|
+
<SettingIcon className="h-5 w-5 text-purple-400" />
|
|
457
|
+
<span className="text-white">
|
|
458
|
+
Privacy & Security
|
|
459
|
+
</span>
|
|
460
|
+
</div>
|
|
461
|
+
<div className="flex items-center gap-3 rounded-lg p-2 hover:bg-white/5">
|
|
462
|
+
<SettingIcon className="h-5 w-5 text-gray-400" />
|
|
463
|
+
<span className="text-white">Notifications</span>
|
|
464
|
+
</div>
|
|
465
|
+
</div>
|
|
466
|
+
</div>
|
|
467
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
468
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
469
|
+
{`<div className="space-y-3">
|
|
470
|
+
{settingsItems.map((item) => (
|
|
471
|
+
<div key={item.id} className="flex items-center gap-3 p-2 rounded-lg hover:bg-white/5">
|
|
472
|
+
<SettingIcon className="h-5 w-5 text-blue-400" />
|
|
473
|
+
<span className="text-white">{item.title}</span>
|
|
474
|
+
</div>
|
|
475
|
+
))}
|
|
476
|
+
</div>`}
|
|
477
|
+
</pre>
|
|
478
|
+
</div>
|
|
479
|
+
</div>
|
|
480
|
+
</div>
|
|
481
|
+
|
|
482
|
+
{/* Settings Button */}
|
|
483
|
+
<div className="!space-y-4">
|
|
484
|
+
<h3 className="text-lg font-semibold !text-blue-300">
|
|
485
|
+
Settings Button
|
|
486
|
+
</h3>
|
|
487
|
+
<div className="!space-y-4">
|
|
488
|
+
<div className="flex gap-4">
|
|
489
|
+
<button className="flex items-center gap-2 rounded-lg border border-blue-500/30 bg-blue-500/20 px-4 py-2 text-blue-200 transition-colors hover:bg-blue-500/30">
|
|
490
|
+
<SettingIcon className="h-4 w-4" />
|
|
491
|
+
Settings
|
|
492
|
+
</button>
|
|
493
|
+
<button className="flex h-10 w-10 items-center justify-center rounded-lg border border-gray-500/30 bg-gray-500/20 text-gray-200 transition-colors hover:bg-gray-500/30">
|
|
494
|
+
<SettingIcon className="h-5 w-5" />
|
|
495
|
+
</button>
|
|
496
|
+
</div>
|
|
497
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
498
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
499
|
+
{`// Settings button with text
|
|
500
|
+
<button className="flex items-center gap-2 bg-blue-500/20 border border-blue-500/30 px-4 py-2 rounded-lg">
|
|
501
|
+
<SettingIcon className="h-4 w-4" />
|
|
502
|
+
Settings
|
|
503
|
+
</button>
|
|
504
|
+
|
|
505
|
+
// Icon-only button
|
|
506
|
+
<button className="w-10 h-10 flex items-center justify-center bg-gray-500/20 border border-gray-500/30 rounded-lg">
|
|
507
|
+
<SettingIcon className="h-5 w-5" />
|
|
508
|
+
</button>`}
|
|
509
|
+
</pre>
|
|
510
|
+
</div>
|
|
511
|
+
</div>
|
|
512
|
+
</div>
|
|
513
|
+
|
|
514
|
+
{/* Toolbar Integration */}
|
|
515
|
+
<div className="!space-y-4">
|
|
516
|
+
<h3 className="text-lg font-semibold !text-blue-300">
|
|
517
|
+
Toolbar Integration
|
|
518
|
+
</h3>
|
|
519
|
+
<div className="!space-y-4">
|
|
520
|
+
<div className="flex items-center gap-2 rounded-lg border border-white/10 bg-white/5 p-3">
|
|
521
|
+
<button className="rounded p-1.5 hover:bg-white/10">
|
|
522
|
+
<span className="sr-only">Home</span>
|
|
523
|
+
<span className="text-lg">🏠</span>
|
|
524
|
+
</button>
|
|
525
|
+
<button className="rounded p-1.5 hover:bg-white/10">
|
|
526
|
+
<span className="sr-only">Search</span>
|
|
527
|
+
<span className="text-lg">🔍</span>
|
|
528
|
+
</button>
|
|
529
|
+
<div className="h-4 w-px bg-white/20"></div>
|
|
530
|
+
<button className="rounded p-1.5 hover:bg-white/10">
|
|
531
|
+
<SettingIcon className="h-4 w-4 text-white" />
|
|
532
|
+
</button>
|
|
533
|
+
</div>
|
|
534
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
535
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
536
|
+
{`<div className="flex items-center gap-2 bg-white/5 border border-white/10 p-3 rounded-lg">
|
|
537
|
+
<button className="p-1.5 rounded hover:bg-white/10">
|
|
538
|
+
<HomeIcon className="h-4 w-4 text-white" />
|
|
539
|
+
</button>
|
|
540
|
+
<button className="p-1.5 rounded hover:bg-white/10">
|
|
541
|
+
<SearchIcon className="h-4 w-4 text-white" />
|
|
542
|
+
</button>
|
|
543
|
+
<div className="w-px h-4 bg-white/20"></div>
|
|
544
|
+
<button className="p-1.5 rounded hover:bg-white/10">
|
|
545
|
+
<SettingIcon className="h-4 w-4 text-white" />
|
|
546
|
+
</button>
|
|
547
|
+
</div>`}
|
|
548
|
+
</pre>
|
|
549
|
+
</div>
|
|
550
|
+
</div>
|
|
551
|
+
</div>
|
|
552
|
+
|
|
553
|
+
{/* Dropdown Menu */}
|
|
554
|
+
<div className="!space-y-4">
|
|
555
|
+
<h3 className="text-lg font-semibold !text-blue-300">
|
|
556
|
+
Dropdown Menu
|
|
557
|
+
</h3>
|
|
558
|
+
<div className="!space-y-4">
|
|
559
|
+
<div className="inline-block">
|
|
560
|
+
<div className="relative">
|
|
561
|
+
<button className="flex items-center gap-2 rounded-lg border border-white/20 bg-white/5 px-3 py-2 text-white">
|
|
562
|
+
Account
|
|
563
|
+
<svg
|
|
564
|
+
className="h-4 w-4"
|
|
565
|
+
fill="none"
|
|
566
|
+
stroke="currentColor"
|
|
567
|
+
viewBox="0 0 24 24"
|
|
568
|
+
>
|
|
569
|
+
<path
|
|
570
|
+
strokeLinecap="round"
|
|
571
|
+
strokeLinejoin="round"
|
|
572
|
+
strokeWidth={2}
|
|
573
|
+
d="M19 9l-7 7-7-7"
|
|
574
|
+
/>
|
|
575
|
+
</svg>
|
|
576
|
+
</button>
|
|
577
|
+
<div className="absolute top-full right-0 mt-1 w-48 rounded-lg border border-white/10 bg-black/90 py-1 shadow-lg">
|
|
578
|
+
<a
|
|
579
|
+
href="#"
|
|
580
|
+
className="flex items-center gap-3 px-4 py-2 text-sm text-white hover:bg-white/5"
|
|
581
|
+
>
|
|
582
|
+
<span className="text-lg">👤</span>
|
|
583
|
+
Profile
|
|
584
|
+
</a>
|
|
585
|
+
<a
|
|
586
|
+
href="#"
|
|
587
|
+
className="flex items-center gap-3 px-4 py-2 text-sm text-white hover:bg-white/5"
|
|
588
|
+
>
|
|
589
|
+
<SettingIcon className="h-4 w-4 text-blue-400" />
|
|
590
|
+
Settings
|
|
591
|
+
</a>
|
|
592
|
+
<hr className="my-1 border-white/10" />
|
|
593
|
+
<a
|
|
594
|
+
href="#"
|
|
595
|
+
className="flex items-center gap-3 px-4 py-2 text-sm text-white hover:bg-white/5"
|
|
596
|
+
>
|
|
597
|
+
<span className="text-lg">🚪</span>
|
|
598
|
+
Sign out
|
|
599
|
+
</a>
|
|
600
|
+
</div>
|
|
601
|
+
</div>
|
|
602
|
+
</div>
|
|
603
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
604
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
605
|
+
{`<div className="dropdown-menu">
|
|
606
|
+
<a href="#" className="flex items-center gap-3 px-4 py-2 hover:bg-white/5">
|
|
607
|
+
<ProfileIcon className="h-4 w-4" />
|
|
608
|
+
Profile
|
|
609
|
+
</a>
|
|
610
|
+
<a href="#" className="flex items-center gap-3 px-4 py-2 hover:bg-white/5">
|
|
611
|
+
<SettingIcon className="h-4 w-4 text-blue-400" />
|
|
612
|
+
Settings
|
|
613
|
+
</a>
|
|
614
|
+
<a href="#" className="flex items-center gap-3 px-4 py-2 hover:bg-white/5">
|
|
615
|
+
<LogoutIcon className="h-4 w-4" />
|
|
616
|
+
Sign out
|
|
617
|
+
</a>
|
|
618
|
+
</div>`}
|
|
619
|
+
</pre>
|
|
620
|
+
</div>
|
|
621
|
+
</div>
|
|
622
|
+
</div>
|
|
623
|
+
</div>
|
|
624
|
+
</div>
|
|
625
|
+
|
|
626
|
+
{/* Accessibility */}
|
|
627
|
+
<div className="!space-y-8">
|
|
628
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
629
|
+
Accessibility Features
|
|
630
|
+
</h2>
|
|
631
|
+
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
|
|
632
|
+
<div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
633
|
+
<h3 className="text-lg font-semibold !text-green-300">
|
|
634
|
+
✅ Built-in Features
|
|
635
|
+
</h3>
|
|
636
|
+
<ul className="!space-y-2 text-sm !text-white/70">
|
|
637
|
+
<li className="!text-white/70">
|
|
638
|
+
Uses Radix UI AccessibleIcon wrapper
|
|
639
|
+
</li>
|
|
640
|
+
<li className="!text-white/70">
|
|
641
|
+
Provides screen reader label "Setting Icon"
|
|
642
|
+
</li>
|
|
643
|
+
<li className="!text-white/70">
|
|
644
|
+
Supports keyboard navigation when interactive
|
|
645
|
+
</li>
|
|
646
|
+
<li className="!text-white/70">
|
|
647
|
+
Maintains proper color contrast ratios
|
|
648
|
+
</li>
|
|
649
|
+
<li className="!text-white/70">
|
|
650
|
+
Scales with user's font size preferences
|
|
651
|
+
</li>
|
|
652
|
+
</ul>
|
|
653
|
+
</div>
|
|
654
|
+
|
|
655
|
+
<div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
656
|
+
<h3 className="text-lg font-semibold !text-blue-300">
|
|
657
|
+
💡 Best Practices
|
|
658
|
+
</h3>
|
|
659
|
+
<ul className="!space-y-2 text-sm text-white/70">
|
|
660
|
+
<li className="!text-white/70">
|
|
661
|
+
Use descriptive button labels or tooltips
|
|
662
|
+
</li>
|
|
663
|
+
<li className="!text-white/70">
|
|
664
|
+
Ensure sufficient touch target size (44px minimum)
|
|
665
|
+
</li>
|
|
666
|
+
<li className="!text-white/70">
|
|
667
|
+
Provide clear focus indicators
|
|
668
|
+
</li>
|
|
669
|
+
<li className="!text-white/70">
|
|
670
|
+
Use consistent placement in UI layouts
|
|
671
|
+
</li>
|
|
672
|
+
<li className="!text-white/70">
|
|
673
|
+
Consider reduced motion preferences
|
|
674
|
+
</li>
|
|
675
|
+
</ul>
|
|
676
|
+
</div>
|
|
677
|
+
</div>
|
|
678
|
+
|
|
679
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-6">
|
|
680
|
+
<h3 className="mb-4 text-lg font-semibold !text-purple-300">
|
|
681
|
+
Custom Accessibility Label
|
|
682
|
+
</h3>
|
|
683
|
+
<div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
|
|
684
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
685
|
+
<pre className="overflow-x-auto text-sm !text-blue-300">
|
|
686
|
+
{`// Custom implementation with specific label
|
|
687
|
+
import { AccessibleIcon } from "@radix-ui/react-accessible-icon"
|
|
688
|
+
|
|
689
|
+
function CustomSettingIcon({ label = "Settings", ...props }) {
|
|
690
|
+
return (
|
|
691
|
+
<AccessibleIcon label={label}>
|
|
692
|
+
<SettingIcon {...props} />
|
|
693
|
+
</AccessibleIcon>
|
|
694
|
+
)
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
// Usage with specific context
|
|
698
|
+
<CustomSettingIcon
|
|
699
|
+
label="User account settings"
|
|
700
|
+
className="h-4 w-4 text-blue-400"
|
|
701
|
+
/>`}
|
|
702
|
+
</pre>
|
|
703
|
+
</div>
|
|
704
|
+
<div className="!space-y-4">
|
|
705
|
+
<p className="text-sm !text-white/70">
|
|
706
|
+
For specific contexts, you can wrap the SettingIcon with
|
|
707
|
+
a custom AccessibleIcon component that provides more
|
|
708
|
+
descriptive labels.
|
|
709
|
+
</p>
|
|
710
|
+
<div className="rounded-lg border border-blue-500/20 bg-blue-500/10 p-4">
|
|
711
|
+
<div className="flex items-center gap-2 text-sm text-blue-200">
|
|
712
|
+
<SettingIcon className="h-4 w-4" />
|
|
713
|
+
<span>
|
|
714
|
+
This approach gives screen readers more context
|
|
715
|
+
</span>
|
|
716
|
+
</div>
|
|
717
|
+
</div>
|
|
718
|
+
</div>
|
|
719
|
+
</div>
|
|
720
|
+
</div>
|
|
721
|
+
</div>
|
|
722
|
+
|
|
723
|
+
{/* Related Icons */}
|
|
724
|
+
<div className="!space-y-8">
|
|
725
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
726
|
+
Related Icons
|
|
727
|
+
</h2>
|
|
728
|
+
<div className="grid grid-cols-2 gap-6 md:grid-cols-4">
|
|
729
|
+
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
730
|
+
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-blue-500/20">
|
|
731
|
+
<span className="text-2xl">👤</span>
|
|
732
|
+
</div>
|
|
733
|
+
<div>
|
|
734
|
+
<div className="font-medium text-white">UserIcon</div>
|
|
735
|
+
<div className="text-xs text-white/60">User profiles</div>
|
|
736
|
+
</div>
|
|
737
|
+
</div>
|
|
738
|
+
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
739
|
+
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-purple-500/20">
|
|
740
|
+
<span className="text-2xl">🔧</span>
|
|
741
|
+
</div>
|
|
742
|
+
<div>
|
|
743
|
+
<div className="font-medium text-white">ToolIcon</div>
|
|
744
|
+
<div className="text-xs text-white/60">
|
|
745
|
+
Tools & utilities
|
|
746
|
+
</div>
|
|
747
|
+
</div>
|
|
748
|
+
</div>
|
|
749
|
+
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
750
|
+
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-green-500/20">
|
|
751
|
+
<span className="text-2xl">⚙️</span>
|
|
752
|
+
</div>
|
|
753
|
+
<div>
|
|
754
|
+
<div className="font-medium text-white">GearIcon</div>
|
|
755
|
+
<div className="text-xs text-white/60">
|
|
756
|
+
System settings
|
|
757
|
+
</div>
|
|
758
|
+
</div>
|
|
759
|
+
</div>
|
|
760
|
+
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
761
|
+
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-orange-500/20">
|
|
762
|
+
<span className="text-2xl">🎛️</span>
|
|
763
|
+
</div>
|
|
764
|
+
<div>
|
|
765
|
+
<div className="font-medium text-white">ControlIcon</div>
|
|
766
|
+
<div className="text-xs text-white/60">
|
|
767
|
+
Control panels
|
|
768
|
+
</div>
|
|
769
|
+
</div>
|
|
770
|
+
</div>
|
|
771
|
+
</div>
|
|
772
|
+
</div>
|
|
773
|
+
</div>
|
|
774
|
+
|
|
775
|
+
{/* Footer */}
|
|
776
|
+
<div className="border-t border-white/10 bg-black/20 backdrop-blur-xl">
|
|
777
|
+
<div className="!mx-auto max-w-7xl px-6 py-8">
|
|
778
|
+
<div className="!space-y-4 text-center">
|
|
779
|
+
<p className="!text-white/60">
|
|
780
|
+
SettingIcon is part of the Aural UI icon library, built with
|
|
781
|
+
accessibility and consistency in mind.
|
|
782
|
+
</p>
|
|
783
|
+
<p className="text-sm !text-white/40">
|
|
784
|
+
All icons use Radix UI's AccessibleIcon for screen reader
|
|
785
|
+
compatibility and follow WCAG guidelines.
|
|
786
|
+
</p>
|
|
787
|
+
</div>
|
|
788
|
+
</div>
|
|
789
|
+
</div>
|
|
790
|
+
</div>
|
|
791
|
+
</>
|
|
792
|
+
),
|
|
793
|
+
},
|
|
794
|
+
},
|
|
795
|
+
tags: ["autodocs"],
|
|
796
|
+
argTypes: {
|
|
797
|
+
width: {
|
|
798
|
+
control: { type: "range", min: 8, max: 96, step: 2 },
|
|
799
|
+
description: "Width of the icon in pixels",
|
|
800
|
+
},
|
|
801
|
+
height: {
|
|
802
|
+
control: { type: "range", min: 8, max: 96, step: 2 },
|
|
803
|
+
description: "Height of the icon in pixels",
|
|
804
|
+
},
|
|
805
|
+
stroke: {
|
|
806
|
+
control: "color",
|
|
807
|
+
description: "Stroke color of the icon",
|
|
808
|
+
},
|
|
809
|
+
strokeWidth: {
|
|
810
|
+
control: { type: "range", min: 0.1, max: 3, step: 0.1 },
|
|
811
|
+
description: "Width of the stroke lines",
|
|
812
|
+
},
|
|
813
|
+
className: {
|
|
814
|
+
control: "text",
|
|
815
|
+
description: "CSS classes for styling",
|
|
816
|
+
},
|
|
817
|
+
},
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
export default meta
|
|
821
|
+
type Story = StoryObj<typeof SettingIcon>
|
|
822
|
+
|
|
823
|
+
// Story parameters for consistent dark theme
|
|
824
|
+
const storyParameters = {
|
|
825
|
+
backgrounds: {
|
|
826
|
+
default: "dark",
|
|
827
|
+
values: [
|
|
828
|
+
{ name: "dark", value: "#0a0a0a" },
|
|
829
|
+
{ name: "darker", value: "#000000" },
|
|
830
|
+
],
|
|
831
|
+
},
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
export const Default: Story = {
|
|
835
|
+
args: {
|
|
836
|
+
width: 24,
|
|
837
|
+
height: 24,
|
|
838
|
+
className: "text-blue-400",
|
|
839
|
+
},
|
|
840
|
+
parameters: storyParameters,
|
|
841
|
+
render: (args) => (
|
|
842
|
+
<div className="flex h-32 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
|
|
843
|
+
<SettingIcon {...args} />
|
|
844
|
+
</div>
|
|
845
|
+
),
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
export const SizeVariations: Story = {
|
|
849
|
+
parameters: {
|
|
850
|
+
...storyParameters,
|
|
851
|
+
docs: {
|
|
852
|
+
description: {
|
|
853
|
+
story:
|
|
854
|
+
"SettingIcon in different sizes, from small toolbar buttons to large settings panels.",
|
|
855
|
+
},
|
|
856
|
+
},
|
|
857
|
+
},
|
|
858
|
+
render: () => (
|
|
859
|
+
<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">
|
|
860
|
+
<div className="text-center">
|
|
861
|
+
<SettingIcon className="!mx-auto mb-2 h-3 w-3 text-blue-400" />
|
|
862
|
+
<span className="text-xs text-white/60">12px</span>
|
|
863
|
+
</div>
|
|
864
|
+
<div className="text-center">
|
|
865
|
+
<SettingIcon className="!mx-auto mb-2 h-4 w-4 text-blue-400" />
|
|
866
|
+
<span className="text-xs text-white/60">16px</span>
|
|
867
|
+
</div>
|
|
868
|
+
<div className="text-center">
|
|
869
|
+
<SettingIcon className="!mx-auto mb-2 h-5 w-5 text-blue-400" />
|
|
870
|
+
<span className="text-xs text-white/60">20px</span>
|
|
871
|
+
</div>
|
|
872
|
+
<div className="text-center">
|
|
873
|
+
<SettingIcon className="!mx-auto mb-2 h-6 w-6 text-blue-400" />
|
|
874
|
+
<span className="text-xs text-white/60">24px</span>
|
|
875
|
+
</div>
|
|
876
|
+
<div className="text-center">
|
|
877
|
+
<SettingIcon className="!mx-auto mb-2 h-8 w-8 text-blue-400" />
|
|
878
|
+
<span className="text-xs text-white/60">32px</span>
|
|
879
|
+
</div>
|
|
880
|
+
<div className="text-center">
|
|
881
|
+
<SettingIcon className="!mx-auto mb-2 h-12 w-12 text-blue-400" />
|
|
882
|
+
<span className="text-xs text-white/60">48px</span>
|
|
883
|
+
</div>
|
|
884
|
+
</div>
|
|
885
|
+
),
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
export const ColorVariations: Story = {
|
|
889
|
+
parameters: {
|
|
890
|
+
...storyParameters,
|
|
891
|
+
docs: {
|
|
892
|
+
description: {
|
|
893
|
+
story:
|
|
894
|
+
"SettingIcon in different colors for various themes and contexts.",
|
|
895
|
+
},
|
|
896
|
+
},
|
|
897
|
+
},
|
|
898
|
+
render: () => (
|
|
899
|
+
<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">
|
|
900
|
+
<div className="text-center">
|
|
901
|
+
<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">
|
|
902
|
+
<SettingIcon className="h-8 w-8 text-blue-400" />
|
|
903
|
+
</div>
|
|
904
|
+
<div className="text-sm font-medium text-white">Primary</div>
|
|
905
|
+
<div className="text-xs text-blue-400">text-blue-400</div>
|
|
906
|
+
</div>
|
|
907
|
+
<div className="text-center">
|
|
908
|
+
<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">
|
|
909
|
+
<SettingIcon className="h-8 w-8 text-purple-400" />
|
|
910
|
+
</div>
|
|
911
|
+
<div className="text-sm font-medium text-white">Secondary</div>
|
|
912
|
+
<div className="text-xs text-purple-400">text-purple-400</div>
|
|
913
|
+
</div>
|
|
914
|
+
<div className="text-center">
|
|
915
|
+
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-gray-500/30 bg-gray-500/20">
|
|
916
|
+
<SettingIcon className="h-8 w-8 text-gray-400" />
|
|
917
|
+
</div>
|
|
918
|
+
<div className="text-sm font-medium text-white">Neutral</div>
|
|
919
|
+
<div className="text-xs text-gray-400">text-gray-400</div>
|
|
920
|
+
</div>
|
|
921
|
+
<div className="text-center">
|
|
922
|
+
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-white/30 bg-white/10">
|
|
923
|
+
<SettingIcon className="h-8 w-8 text-white" />
|
|
924
|
+
</div>
|
|
925
|
+
<div className="text-sm font-medium text-white">Light</div>
|
|
926
|
+
<div className="text-xs text-white/60">text-white</div>
|
|
927
|
+
</div>
|
|
928
|
+
</div>
|
|
929
|
+
),
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
export const UsageExamples: Story = {
|
|
933
|
+
parameters: {
|
|
934
|
+
...storyParameters,
|
|
935
|
+
docs: {
|
|
936
|
+
description: {
|
|
937
|
+
story:
|
|
938
|
+
"Real-world usage examples showing SettingIcon in different UI contexts.",
|
|
939
|
+
},
|
|
940
|
+
},
|
|
941
|
+
},
|
|
942
|
+
render: () => (
|
|
943
|
+
<div className="min-h-dvh !space-y-8 rounded-lg bg-gradient-to-br from-gray-900 to-gray-800 p-8">
|
|
944
|
+
{/* Settings Menu */}
|
|
945
|
+
<div className="!space-y-2">
|
|
946
|
+
<h3 className="text-sm font-medium text-white">Settings Menu</h3>
|
|
947
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-4">
|
|
948
|
+
<div className="!space-y-3">
|
|
949
|
+
<div className="flex items-center gap-3 rounded-lg p-2 hover:bg-white/5">
|
|
950
|
+
<SettingIcon className="h-5 w-5 text-blue-400" />
|
|
951
|
+
<span className="text-white">General Settings</span>
|
|
952
|
+
</div>
|
|
953
|
+
<div className="flex items-center gap-3 rounded-lg p-2 hover:bg-white/5">
|
|
954
|
+
<SettingIcon className="h-5 w-5 text-purple-400" />
|
|
955
|
+
<span className="text-white">Privacy & Security</span>
|
|
956
|
+
</div>
|
|
957
|
+
<div className="flex items-center gap-3 rounded-lg p-2 hover:bg-white/5">
|
|
958
|
+
<SettingIcon className="h-5 w-5 text-gray-400" />
|
|
959
|
+
<span className="text-white">Notifications</span>
|
|
960
|
+
</div>
|
|
961
|
+
</div>
|
|
962
|
+
</div>
|
|
963
|
+
</div>
|
|
964
|
+
|
|
965
|
+
{/* Settings Button */}
|
|
966
|
+
<div className="!space-y-2">
|
|
967
|
+
<h3 className="text-sm font-medium text-white">Settings Button</h3>
|
|
968
|
+
<div className="flex gap-4">
|
|
969
|
+
<button className="flex items-center gap-2 rounded-lg border border-blue-500/30 bg-blue-500/20 px-4 py-2 text-blue-200 transition-colors hover:bg-blue-500/30">
|
|
970
|
+
<SettingIcon className="h-4 w-4" />
|
|
971
|
+
Settings
|
|
972
|
+
</button>
|
|
973
|
+
<button className="flex h-10 w-10 items-center justify-center rounded-lg border border-gray-500/30 bg-gray-500/20 text-gray-200 transition-colors hover:bg-gray-500/30">
|
|
974
|
+
<SettingIcon className="h-5 w-5" />
|
|
975
|
+
</button>
|
|
976
|
+
</div>
|
|
977
|
+
</div>
|
|
978
|
+
|
|
979
|
+
{/* Toolbar Integration */}
|
|
980
|
+
<div className="!space-y-2">
|
|
981
|
+
<h3 className="text-sm font-medium text-white">Toolbar Integration</h3>
|
|
982
|
+
<div className="flex items-center gap-2 rounded-lg border border-white/10 bg-white/5 p-3">
|
|
983
|
+
<button className="rounded p-1.5 hover:bg-white/10">
|
|
984
|
+
<span className="sr-only">Home</span>
|
|
985
|
+
<span className="text-lg">🏠</span>
|
|
986
|
+
</button>
|
|
987
|
+
<button className="rounded p-1.5 hover:bg-white/10">
|
|
988
|
+
<span className="sr-only">Search</span>
|
|
989
|
+
<span className="text-lg">🔍</span>
|
|
990
|
+
</button>
|
|
991
|
+
<div className="h-4 w-px bg-white/20"></div>
|
|
992
|
+
<button className="rounded p-1.5 hover:bg-white/10">
|
|
993
|
+
<SettingIcon className="h-4 w-4 text-white" />
|
|
994
|
+
</button>
|
|
995
|
+
</div>
|
|
996
|
+
</div>
|
|
997
|
+
</div>
|
|
998
|
+
),
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
export const Playground: Story = {
|
|
1002
|
+
parameters: {
|
|
1003
|
+
...storyParameters,
|
|
1004
|
+
docs: {
|
|
1005
|
+
description: {
|
|
1006
|
+
story:
|
|
1007
|
+
"Interactive playground to experiment with different SettingIcon configurations.",
|
|
1008
|
+
},
|
|
1009
|
+
},
|
|
1010
|
+
},
|
|
1011
|
+
args: {
|
|
1012
|
+
width: 32,
|
|
1013
|
+
height: 32,
|
|
1014
|
+
className: "text-blue-400",
|
|
1015
|
+
strokeWidth: 0.75,
|
|
1016
|
+
},
|
|
1017
|
+
render: (args) => (
|
|
1018
|
+
<div className="flex h-64 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
|
|
1019
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-8">
|
|
1020
|
+
<SettingIcon {...args} />
|
|
1021
|
+
</div>
|
|
1022
|
+
</div>
|
|
1023
|
+
),
|
|
1024
|
+
}
|