aural-ui 2.0.7 → 2.0.9
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/switch/Switch.stories.tsx +18 -0
- package/dist/components/switch/index.tsx +32 -12
- package/dist/components/tabs/Tabs.stories.tsx +179 -2
- package/dist/components/tabs/index.tsx +70 -22
- package/dist/icons/index.ts +2 -0
- package/dist/icons/moon-icon/MoonIcon.stories.tsx +591 -0
- package/dist/icons/moon-icon/index.tsx +21 -0
- package/dist/icons/moon-icon/meta.ts +8 -0
- package/dist/icons/sun-icon/SunIcon.stories.tsx +886 -0
- package/dist/icons/sun-icon/index.tsx +34 -0
- package/dist/icons/sun-icon/meta.ts +8 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,591 @@
|
|
|
1
|
+
import React from "react"
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
3
|
+
|
|
4
|
+
import { MoonIcon } from "."
|
|
5
|
+
import { ArrowRightUpIcon } from "../arrow-right-up-icon"
|
|
6
|
+
|
|
7
|
+
const meta: Meta<typeof MoonIcon> = {
|
|
8
|
+
title: "Icons/MoonIcon",
|
|
9
|
+
component: MoonIcon,
|
|
10
|
+
parameters: {
|
|
11
|
+
layout: "centered",
|
|
12
|
+
backgrounds: {
|
|
13
|
+
default: "dark",
|
|
14
|
+
values: [
|
|
15
|
+
{ name: "dark", value: "#0a0a0a" },
|
|
16
|
+
{ name: "darker", value: "#000000" },
|
|
17
|
+
{ name: "light", value: "#ffffff" },
|
|
18
|
+
],
|
|
19
|
+
},
|
|
20
|
+
docs: {
|
|
21
|
+
description: {
|
|
22
|
+
component:
|
|
23
|
+
"A message or chat bubble icon, ideal for messaging, comments, and communication interfaces.",
|
|
24
|
+
},
|
|
25
|
+
canvas: {
|
|
26
|
+
sourceState: "shown",
|
|
27
|
+
},
|
|
28
|
+
page: () => (
|
|
29
|
+
<>
|
|
30
|
+
<style>{`
|
|
31
|
+
.sbdocs-wrapper { padding: 0 !important; max-width: none !important; background: transparent !important; }
|
|
32
|
+
.sbdocs-content { max-width: none !important; padding: 0 !important; margin: 0 !important; background: transparent !important; }
|
|
33
|
+
.docs-story { background: transparent !important; }
|
|
34
|
+
.sbdocs { background: transparent !important; }
|
|
35
|
+
body { background: #0a0a0a !important; }
|
|
36
|
+
#storybook-docs { background: #0a0a0a !important; }
|
|
37
|
+
.sbdocs-preview { background: transparent !important; border: none !important; }
|
|
38
|
+
.sbdocs-h1, .sbdocs-h2, .sbdocs-h3, .sbdocs-h4, .sbdocs-h5, .sbdocs-h6 { color: white !important; }
|
|
39
|
+
.sbdocs-p, .sbdocs-li { color: rgba(255, 255, 255, 0.7) !important; }
|
|
40
|
+
.sbdocs-code { background: rgba(255, 255, 255, 0.1) !important; color: rgba(168, 85, 247, 1) !important; border: 1px solid rgba(255, 255, 255, 0.1) !important; }
|
|
41
|
+
.sbdocs-pre { background: rgba(0, 0, 0, 0.4) !important; border: 1px solid rgba(255, 255, 255, 0.1) !important; }
|
|
42
|
+
.sbdocs-table { background: rgba(255, 255, 255, 0.05) !important; border: 1px solid rgba(255, 255, 255, 0.1) !important; }
|
|
43
|
+
.sbdocs-table th { background: rgba(255, 255, 255, 0.05) !important; color: white !important; border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important; }
|
|
44
|
+
.sbdocs-table td { color: rgba(255, 255, 255, 0.7) !important; border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important; }
|
|
45
|
+
`}</style>
|
|
46
|
+
<div className="min-h-screen bg-gradient-to-br from-gray-900 via-purple-900/20 to-gray-900">
|
|
47
|
+
<div className="relative overflow-hidden border-b border-white/10 bg-black/20 backdrop-blur-xl">
|
|
48
|
+
<div className="absolute inset-0 bg-gradient-to-r from-purple-500/10 via-transparent to-blue-500/10" />
|
|
49
|
+
<div className="relative !mx-auto max-w-7xl px-6 py-16">
|
|
50
|
+
<div className="!space-y-6 text-center">
|
|
51
|
+
<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-500/20">
|
|
52
|
+
<MoonIcon className="h-12 w-12 text-blue-400" />
|
|
53
|
+
</div>
|
|
54
|
+
<h1 className="text-5xl font-bold !text-white">MoonIcon</h1>
|
|
55
|
+
<p className="!mx-auto max-w-3xl text-xl leading-relaxed !text-white/70">
|
|
56
|
+
A message or chat bubble icon, ideal for messaging,
|
|
57
|
+
comments, and communication interfaces.
|
|
58
|
+
</p>
|
|
59
|
+
<div className="mx-auto flex items-center justify-center gap-8">
|
|
60
|
+
<div className="text-center">
|
|
61
|
+
<div className="text-3xl font-bold text-blue-300">
|
|
62
|
+
Chat
|
|
63
|
+
</div>
|
|
64
|
+
<div className="text-sm text-white/80">Conversations</div>
|
|
65
|
+
</div>
|
|
66
|
+
<div className="h-8 w-px bg-white/20" />
|
|
67
|
+
<div className="text-center">
|
|
68
|
+
<div className="text-3xl font-bold text-indigo-300">
|
|
69
|
+
Comments
|
|
70
|
+
</div>
|
|
71
|
+
<div className="text-sm text-white/80">Feedback</div>
|
|
72
|
+
</div>
|
|
73
|
+
<div className="h-8 w-px bg-white/20" />
|
|
74
|
+
<div className="text-center">
|
|
75
|
+
<div className="text-3xl font-bold text-cyan-300">
|
|
76
|
+
Accessible
|
|
77
|
+
</div>
|
|
78
|
+
<div className="text-sm text-white/80">
|
|
79
|
+
Screen reader support
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
<div className="!mx-auto flex max-w-7xl flex-col gap-6 space-y-16 px-6 py-16">
|
|
87
|
+
<div className="!space-y-8">
|
|
88
|
+
<h3 className="text-center text-2xl font-bold !text-white">
|
|
89
|
+
Key Features
|
|
90
|
+
</h3>
|
|
91
|
+
<div className="grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3">
|
|
92
|
+
<div className="space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
93
|
+
<div className="text-3xl">💬</div>
|
|
94
|
+
<h4 className="text-lg font-semibold !text-white">
|
|
95
|
+
Message Bubble
|
|
96
|
+
</h4>
|
|
97
|
+
<p className="text-sm !text-white/80">
|
|
98
|
+
Represents chat, comments, and communication
|
|
99
|
+
</p>
|
|
100
|
+
</div>
|
|
101
|
+
<div className="space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
102
|
+
<div className="text-3xl">♿</div>
|
|
103
|
+
<h4 className="text-lg font-semibold !text-white">
|
|
104
|
+
Accessibility
|
|
105
|
+
</h4>
|
|
106
|
+
<p className="text-sm !text-white/80">
|
|
107
|
+
Built with screen reader support
|
|
108
|
+
</p>
|
|
109
|
+
</div>
|
|
110
|
+
<div className="space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
111
|
+
<div className="text-3xl">🎨</div>
|
|
112
|
+
<h4 className="text-lg font-semibold !text-white">
|
|
113
|
+
Customizable
|
|
114
|
+
</h4>
|
|
115
|
+
<p className="text-sm !text-white/80">
|
|
116
|
+
Flexible styling options
|
|
117
|
+
</p>
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
</div>
|
|
121
|
+
<div className="!space-y-8">
|
|
122
|
+
<h3 className="text-center text-2xl font-bold !text-white">
|
|
123
|
+
API Reference
|
|
124
|
+
</h3>
|
|
125
|
+
<div className="overflow-hidden rounded-lg border border-white/10 bg-white/5">
|
|
126
|
+
<div className="bg-white/5 p-4">
|
|
127
|
+
<h4 className="text-lg font-semibold !text-white">Props</h4>
|
|
128
|
+
</div>
|
|
129
|
+
<table className="!my-0 w-full">
|
|
130
|
+
<thead className="bg-white/5">
|
|
131
|
+
<tr className="border-b border-white/10">
|
|
132
|
+
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
133
|
+
Prop
|
|
134
|
+
</th>
|
|
135
|
+
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
136
|
+
Type
|
|
137
|
+
</th>
|
|
138
|
+
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
139
|
+
Default
|
|
140
|
+
</th>
|
|
141
|
+
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
142
|
+
Description
|
|
143
|
+
</th>
|
|
144
|
+
</tr>
|
|
145
|
+
</thead>
|
|
146
|
+
<tbody>
|
|
147
|
+
<tr className="border-b border-white/5">
|
|
148
|
+
<td className="px-6 py-4 font-mono text-sm !text-blue-300">
|
|
149
|
+
className
|
|
150
|
+
</td>
|
|
151
|
+
<td className="px-6 py-4 text-sm !text-white/80">
|
|
152
|
+
string
|
|
153
|
+
</td>
|
|
154
|
+
<td className="px-6 py-4 text-sm !text-white/60">-</td>
|
|
155
|
+
<td className="px-6 py-4 text-sm !text-white/80">
|
|
156
|
+
Additional CSS classes
|
|
157
|
+
</td>
|
|
158
|
+
</tr>
|
|
159
|
+
</tbody>
|
|
160
|
+
</table>
|
|
161
|
+
</div>
|
|
162
|
+
</div>
|
|
163
|
+
<div className="!space-y-8">
|
|
164
|
+
<h3 className="text-center text-2xl font-bold !text-white">
|
|
165
|
+
Usage Examples
|
|
166
|
+
</h3>
|
|
167
|
+
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
168
|
+
<div className="space-y-4">
|
|
169
|
+
<h4 className="text-lg font-semibold !text-blue-300">
|
|
170
|
+
Basic Usage
|
|
171
|
+
</h4>
|
|
172
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
173
|
+
<pre className="overflow-x-auto text-sm !text-green-300">{`import { MoonIcon } from "@/components/ui/icons/message-icon"
|
|
174
|
+
|
|
175
|
+
function ChatButton() {
|
|
176
|
+
return (
|
|
177
|
+
<button className="flex items-center gap-2">
|
|
178
|
+
<MoonIcon className="h-4 w-4 text-blue-400" />
|
|
179
|
+
<span>Send Message</span>
|
|
180
|
+
</button>
|
|
181
|
+
)
|
|
182
|
+
}`}</pre>
|
|
183
|
+
</div>
|
|
184
|
+
</div>
|
|
185
|
+
<div className="space-y-4">
|
|
186
|
+
<h4 className="text-lg font-semibold !text-blue-300">
|
|
187
|
+
Live Preview
|
|
188
|
+
</h4>
|
|
189
|
+
<div className="flex h-32 items-center justify-center rounded-lg border border-white/10 bg-white/5">
|
|
190
|
+
<button className="flex items-center gap-2 rounded-lg border border-blue-500/20 bg-blue-500/10 px-4 py-2 text-white transition-colors hover:bg-blue-500/20">
|
|
191
|
+
<MoonIcon className="h-4 w-4 text-blue-400" />
|
|
192
|
+
<span>Send Message</span>
|
|
193
|
+
</button>
|
|
194
|
+
</div>
|
|
195
|
+
</div>
|
|
196
|
+
</div>
|
|
197
|
+
</div>
|
|
198
|
+
<div className="!space-y-8">
|
|
199
|
+
<h3 className="text-center text-2xl font-bold !text-white">
|
|
200
|
+
Size Examples
|
|
201
|
+
</h3>
|
|
202
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-8">
|
|
203
|
+
<div className="!space-y-6">
|
|
204
|
+
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
|
|
205
|
+
<div className="!space-y-4">
|
|
206
|
+
<h3 className="text-lg font-semibold !text-blue-300">
|
|
207
|
+
Standard Sizes
|
|
208
|
+
</h3>
|
|
209
|
+
<div className="flex items-end gap-6 rounded-lg bg-black/20 p-6">
|
|
210
|
+
<div className="text-center">
|
|
211
|
+
<MoonIcon className="!mx-auto mb-2 h-3 w-3 text-blue-400" />
|
|
212
|
+
<span className="text-xs text-white/60">12px</span>
|
|
213
|
+
</div>
|
|
214
|
+
<div className="text-center">
|
|
215
|
+
<MoonIcon className="!mx-auto mb-2 h-4 w-4 text-blue-400" />
|
|
216
|
+
<span className="text-xs text-white/60">16px</span>
|
|
217
|
+
</div>
|
|
218
|
+
<div className="text-center">
|
|
219
|
+
<MoonIcon className="!mx-auto mb-2 h-5 w-5 text-blue-400" />
|
|
220
|
+
<span className="text-xs text-white/60">20px</span>
|
|
221
|
+
</div>
|
|
222
|
+
<div className="text-center">
|
|
223
|
+
<MoonIcon className="!mx-auto mb-2 h-6 w-6 text-blue-400" />
|
|
224
|
+
<span className="text-xs text-white/60">24px</span>
|
|
225
|
+
</div>
|
|
226
|
+
<div className="text-center">
|
|
227
|
+
<MoonIcon className="!mx-auto mb-2 h-8 w-8 text-blue-400" />
|
|
228
|
+
<span className="text-xs text-white/60">32px</span>
|
|
229
|
+
</div>
|
|
230
|
+
<div className="text-center">
|
|
231
|
+
<MoonIcon className="!mx-auto mb-2 h-12 w-12 text-blue-400" />
|
|
232
|
+
<span className="text-xs text-white/60">48px</span>
|
|
233
|
+
</div>
|
|
234
|
+
</div>
|
|
235
|
+
</div>
|
|
236
|
+
<div className="!space-y-4">
|
|
237
|
+
<h3 className="text-lg font-semibold !text-blue-300">
|
|
238
|
+
Code Example
|
|
239
|
+
</h3>
|
|
240
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
241
|
+
<pre className="overflow-x-auto text-sm !text-green-300">{`// Small (16px)
|
|
242
|
+
<MoonIcon className="h-4 w-4" />
|
|
243
|
+
|
|
244
|
+
// Medium (24px)
|
|
245
|
+
<MoonIcon className="h-6 w-6" />
|
|
246
|
+
|
|
247
|
+
// Large (32px)
|
|
248
|
+
<MoonIcon className="h-8 w-8" />
|
|
249
|
+
|
|
250
|
+
// Custom size
|
|
251
|
+
<MoonIcon width={40} height={40} />`}</pre>
|
|
252
|
+
</div>
|
|
253
|
+
</div>
|
|
254
|
+
</div>
|
|
255
|
+
</div>
|
|
256
|
+
</div>
|
|
257
|
+
</div>
|
|
258
|
+
<div className="!space-y-8">
|
|
259
|
+
<h3 className="text-center text-2xl font-bold !text-white">
|
|
260
|
+
Common Use Cases
|
|
261
|
+
</h3>
|
|
262
|
+
<div className="grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3">
|
|
263
|
+
<div className="space-y-3 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
264
|
+
<div className="text-2xl">💬</div>
|
|
265
|
+
<h4 className="text-lg font-semibold !text-white">
|
|
266
|
+
Messaging
|
|
267
|
+
</h4>
|
|
268
|
+
<p className="text-sm !text-white/80">
|
|
269
|
+
Chat and messaging UIs
|
|
270
|
+
</p>
|
|
271
|
+
</div>
|
|
272
|
+
<div className="space-y-3 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
273
|
+
<div className="text-2xl">🗨️</div>
|
|
274
|
+
<h4 className="text-lg font-semibold !text-white">
|
|
275
|
+
Comments
|
|
276
|
+
</h4>
|
|
277
|
+
<p className="text-sm !text-white/80">
|
|
278
|
+
Comment sections and feedback
|
|
279
|
+
</p>
|
|
280
|
+
</div>
|
|
281
|
+
<div className="space-y-3 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
282
|
+
<div className="text-2xl">📱</div>
|
|
283
|
+
<h4 className="text-lg font-semibold !text-white">
|
|
284
|
+
Mobile Apps
|
|
285
|
+
</h4>
|
|
286
|
+
<p className="text-sm !text-white/80">
|
|
287
|
+
Communication features in apps
|
|
288
|
+
</p>
|
|
289
|
+
</div>
|
|
290
|
+
</div>
|
|
291
|
+
</div>
|
|
292
|
+
<div className="!space-y-8">
|
|
293
|
+
<h3 className="text-center text-2xl font-bold !text-white">
|
|
294
|
+
Best Practices
|
|
295
|
+
</h3>
|
|
296
|
+
<div className="grid grid-cols-1 gap-6 md:grid-cols-2">
|
|
297
|
+
<div className="space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
298
|
+
<h4 className="text-lg font-semibold !text-emerald-300">
|
|
299
|
+
✅ Do
|
|
300
|
+
</h4>
|
|
301
|
+
<ul className="space-y-2 text-sm !text-white/80">
|
|
302
|
+
<li className="!text-white/80">
|
|
303
|
+
Use appropriate sizes for different contexts
|
|
304
|
+
</li>
|
|
305
|
+
<li className="!text-white/80">
|
|
306
|
+
Choose colors that match your UI theme
|
|
307
|
+
</li>
|
|
308
|
+
<li className="!text-white/80">
|
|
309
|
+
Provide clear labels for icon buttons
|
|
310
|
+
</li>
|
|
311
|
+
<li className="!text-white/80">
|
|
312
|
+
Use consistent styling across your app
|
|
313
|
+
</li>
|
|
314
|
+
<li className="!text-white/80">
|
|
315
|
+
Consider accessibility in all implementations
|
|
316
|
+
</li>
|
|
317
|
+
</ul>
|
|
318
|
+
</div>
|
|
319
|
+
<div className="space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
320
|
+
<h4 className="text-lg font-semibold !text-red-300">
|
|
321
|
+
❌ Don't
|
|
322
|
+
</h4>
|
|
323
|
+
<ul className="space-y-2 text-sm !text-white/80">
|
|
324
|
+
<li className="!text-white/80">
|
|
325
|
+
Use multiple icon styles in the same view
|
|
326
|
+
</li>
|
|
327
|
+
<li className="!text-white/80">
|
|
328
|
+
Overuse the icon in navigation
|
|
329
|
+
</li>
|
|
330
|
+
<li className="!text-white/80">
|
|
331
|
+
Use inappropriate sizes for the context
|
|
332
|
+
</li>
|
|
333
|
+
<li className="!text-white/80">
|
|
334
|
+
Forget to add hover states
|
|
335
|
+
</li>
|
|
336
|
+
<li className="!text-white/80">
|
|
337
|
+
Ignore accessibility requirements
|
|
338
|
+
</li>
|
|
339
|
+
</ul>
|
|
340
|
+
</div>
|
|
341
|
+
</div>
|
|
342
|
+
</div>
|
|
343
|
+
</div>
|
|
344
|
+
<div className="!space-y-8 p-7">
|
|
345
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
346
|
+
Related Icons
|
|
347
|
+
</h2>
|
|
348
|
+
<div className="grid grid-cols-2 gap-6 md:grid-cols-4">
|
|
349
|
+
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
350
|
+
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-blue-500/20">
|
|
351
|
+
<ArrowRightUpIcon className="h-6 w-6 rotate-90 text-blue-400" />
|
|
352
|
+
</div>
|
|
353
|
+
<div>
|
|
354
|
+
<div className="font-medium text-white">
|
|
355
|
+
ArrowRightDownIcon
|
|
356
|
+
</div>
|
|
357
|
+
<div className="text-xs text-white/60">
|
|
358
|
+
Download/decrease
|
|
359
|
+
</div>
|
|
360
|
+
</div>
|
|
361
|
+
</div>
|
|
362
|
+
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
363
|
+
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-cyan-500/20">
|
|
364
|
+
<ArrowRightUpIcon className="h-6 w-6 -rotate-90 text-cyan-400" />
|
|
365
|
+
</div>
|
|
366
|
+
<div>
|
|
367
|
+
<div className="font-medium text-white">
|
|
368
|
+
ArrowLeftUpIcon
|
|
369
|
+
</div>
|
|
370
|
+
<div className="text-xs text-white/60">Back and up</div>
|
|
371
|
+
</div>
|
|
372
|
+
</div>
|
|
373
|
+
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
374
|
+
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-green-500/20">
|
|
375
|
+
<span className="text-2xl">↗️</span>
|
|
376
|
+
</div>
|
|
377
|
+
<div>
|
|
378
|
+
<div className="font-medium text-white">
|
|
379
|
+
ExternalLinkIcon
|
|
380
|
+
</div>
|
|
381
|
+
<div className="text-xs text-white/60">
|
|
382
|
+
Alternative style
|
|
383
|
+
</div>
|
|
384
|
+
</div>
|
|
385
|
+
</div>
|
|
386
|
+
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
387
|
+
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-purple-500/20">
|
|
388
|
+
<span className="text-2xl">📈</span>
|
|
389
|
+
</div>
|
|
390
|
+
<div>
|
|
391
|
+
<div className="font-medium text-white">TrendingUpIcon</div>
|
|
392
|
+
<div className="text-xs text-white/60">Growth metrics</div>
|
|
393
|
+
</div>
|
|
394
|
+
</div>
|
|
395
|
+
</div>
|
|
396
|
+
</div>
|
|
397
|
+
<div className="border-t border-white/10 bg-black/20 backdrop-blur-xl">
|
|
398
|
+
<div className="!mx-auto max-w-7xl px-6 py-8">
|
|
399
|
+
<div className="!space-y-4 text-center">
|
|
400
|
+
<p className="!text-white/60">
|
|
401
|
+
MoonIcon is part of the Aural UI icon library, designed for
|
|
402
|
+
chat, comments, and communication interfaces.
|
|
403
|
+
</p>
|
|
404
|
+
<p className="text-sm !text-white/40">
|
|
405
|
+
Perfect for messaging apps, comment sections, and any
|
|
406
|
+
interface requiring a message or chat bubble representation.
|
|
407
|
+
</p>
|
|
408
|
+
</div>
|
|
409
|
+
</div>
|
|
410
|
+
</div>
|
|
411
|
+
</div>
|
|
412
|
+
</>
|
|
413
|
+
),
|
|
414
|
+
},
|
|
415
|
+
},
|
|
416
|
+
tags: ["autodocs"],
|
|
417
|
+
argTypes: {
|
|
418
|
+
width: {
|
|
419
|
+
control: { type: "range", min: 8, max: 96, step: 2 },
|
|
420
|
+
description: "Width of the icon in pixels",
|
|
421
|
+
},
|
|
422
|
+
height: {
|
|
423
|
+
control: { type: "range", min: 8, max: 96, step: 2 },
|
|
424
|
+
description: "Height of the icon in pixels",
|
|
425
|
+
},
|
|
426
|
+
className: {
|
|
427
|
+
control: "text",
|
|
428
|
+
description: "CSS classes for styling",
|
|
429
|
+
},
|
|
430
|
+
},
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
export default meta
|
|
434
|
+
type Story = StoryObj<typeof MoonIcon>
|
|
435
|
+
|
|
436
|
+
const storyParameters = {
|
|
437
|
+
backgrounds: {
|
|
438
|
+
default: "dark",
|
|
439
|
+
values: [
|
|
440
|
+
{ name: "dark", value: "#0a0a0a" },
|
|
441
|
+
{ name: "darker", value: "#000000" },
|
|
442
|
+
],
|
|
443
|
+
},
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
export const Default: Story = {
|
|
447
|
+
args: {
|
|
448
|
+
width: 24,
|
|
449
|
+
height: 24,
|
|
450
|
+
className: "text-blue-400",
|
|
451
|
+
},
|
|
452
|
+
parameters: storyParameters,
|
|
453
|
+
render: (args) => (
|
|
454
|
+
<div className="flex h-32 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
|
|
455
|
+
<MoonIcon {...args} />
|
|
456
|
+
</div>
|
|
457
|
+
),
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
export const SizeVariations: Story = {
|
|
461
|
+
parameters: {
|
|
462
|
+
...storyParameters,
|
|
463
|
+
docs: {
|
|
464
|
+
description: {
|
|
465
|
+
story:
|
|
466
|
+
"MoonIcon in different sizes, from small inline buttons to large call-to-action elements.",
|
|
467
|
+
},
|
|
468
|
+
},
|
|
469
|
+
},
|
|
470
|
+
render: () => (
|
|
471
|
+
<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">
|
|
472
|
+
<div className="text-center">
|
|
473
|
+
<MoonIcon className="!mx-auto mb-2 h-3 w-3 text-blue-400" />
|
|
474
|
+
<span className="text-xs text-white/60">12px</span>
|
|
475
|
+
</div>
|
|
476
|
+
<div className="text-center">
|
|
477
|
+
<MoonIcon className="!mx-auto mb-2 h-4 w-4 text-blue-400" />
|
|
478
|
+
<span className="text-xs text-white/60">16px</span>
|
|
479
|
+
</div>
|
|
480
|
+
<div className="text-center">
|
|
481
|
+
<MoonIcon className="!mx-auto mb-2 h-5 w-5 text-blue-400" />
|
|
482
|
+
<span className="text-xs text-white/60">20px</span>
|
|
483
|
+
</div>
|
|
484
|
+
<div className="text-center">
|
|
485
|
+
<MoonIcon className="!mx-auto mb-2 h-6 w-6 text-blue-400" />
|
|
486
|
+
<span className="text-xs text-white/60">24px</span>
|
|
487
|
+
</div>
|
|
488
|
+
<div className="text-center">
|
|
489
|
+
<MoonIcon className="!mx-auto mb-2 h-8 w-8 text-blue-400" />
|
|
490
|
+
<span className="text-xs text-white/60">32px</span>
|
|
491
|
+
</div>
|
|
492
|
+
<div className="text-center">
|
|
493
|
+
<MoonIcon className="!mx-auto mb-2 h-12 w-12 text-blue-400" />
|
|
494
|
+
<span className="text-xs text-white/60">48px</span>
|
|
495
|
+
</div>
|
|
496
|
+
</div>
|
|
497
|
+
),
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
export const ColorVariations: Story = {
|
|
501
|
+
parameters: {
|
|
502
|
+
...storyParameters,
|
|
503
|
+
docs: {
|
|
504
|
+
description: {
|
|
505
|
+
story:
|
|
506
|
+
"MoonIcon with different color variations using Tailwind classes.",
|
|
507
|
+
},
|
|
508
|
+
},
|
|
509
|
+
},
|
|
510
|
+
render: () => (
|
|
511
|
+
<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">
|
|
512
|
+
<div className="text-center">
|
|
513
|
+
<MoonIcon className="!mx-auto mb-2 h-6 w-6 text-blue-400" />
|
|
514
|
+
<span className="text-xs text-white/60">Blue</span>
|
|
515
|
+
</div>
|
|
516
|
+
<div className="text-center">
|
|
517
|
+
<MoonIcon className="!mx-auto mb-2 h-6 w-6 text-purple-400" />
|
|
518
|
+
<span className="text-xs text-white/60">Purple</span>
|
|
519
|
+
</div>
|
|
520
|
+
<div className="text-center">
|
|
521
|
+
<MoonIcon className="!mx-auto mb-2 h-6 w-6 text-green-400" />
|
|
522
|
+
<span className="text-xs text-white/60">Green</span>
|
|
523
|
+
</div>
|
|
524
|
+
<div className="text-center">
|
|
525
|
+
<MoonIcon className="!mx-auto mb-2 h-6 w-6 text-red-400" />
|
|
526
|
+
<span className="text-xs text-white/60">Red</span>
|
|
527
|
+
</div>
|
|
528
|
+
<div className="text-center">
|
|
529
|
+
<MoonIcon className="!mx-auto mb-2 h-6 w-6 text-yellow-400" />
|
|
530
|
+
<span className="text-xs text-white/60">Yellow</span>
|
|
531
|
+
</div>
|
|
532
|
+
</div>
|
|
533
|
+
),
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
export const UsageExamples: Story = {
|
|
537
|
+
parameters: {
|
|
538
|
+
...storyParameters,
|
|
539
|
+
docs: {
|
|
540
|
+
description: {
|
|
541
|
+
story:
|
|
542
|
+
"Common usage examples of MoonIcon, such as dark mode toggles, night mode indicators, and quiet hours.",
|
|
543
|
+
},
|
|
544
|
+
},
|
|
545
|
+
},
|
|
546
|
+
render: () => (
|
|
547
|
+
<div className="flex h-64 min-h-dvh flex-col items-center justify-center gap-8 rounded-lg bg-gradient-to-br from-gray-900 to-gray-800 p-8">
|
|
548
|
+
{/* Dark Mode Toggle */}
|
|
549
|
+
<button className="flex items-center gap-2 rounded-lg border border-yellow-500/20 bg-yellow-500/10 px-4 py-2 text-white transition-colors hover:bg-yellow-500/20">
|
|
550
|
+
<MoonIcon className="h-4 w-4 text-yellow-400" />
|
|
551
|
+
<span>Enable Dark Mode</span>
|
|
552
|
+
</button>
|
|
553
|
+
|
|
554
|
+
{/* Quiet Hours Setting */}
|
|
555
|
+
<div className="flex items-center gap-2 rounded-lg border border-blue-500/20 bg-blue-500/10 px-4 py-2">
|
|
556
|
+
<MoonIcon className="h-4 w-4 text-blue-400" />
|
|
557
|
+
<span className="text-white/80">Quiet Hours: On</span>
|
|
558
|
+
</div>
|
|
559
|
+
|
|
560
|
+
{/* Sleep Mode */}
|
|
561
|
+
<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">
|
|
562
|
+
<MoonIcon className="h-4 w-4 text-purple-400" />
|
|
563
|
+
<span>Activate Sleep Mode</span>
|
|
564
|
+
</button>
|
|
565
|
+
</div>
|
|
566
|
+
),
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
export const Playground: Story = {
|
|
570
|
+
parameters: {
|
|
571
|
+
...storyParameters,
|
|
572
|
+
docs: {
|
|
573
|
+
description: {
|
|
574
|
+
story:
|
|
575
|
+
"Interactive playground to experiment with different MoonIcon configurations.",
|
|
576
|
+
},
|
|
577
|
+
},
|
|
578
|
+
},
|
|
579
|
+
args: {
|
|
580
|
+
width: 32,
|
|
581
|
+
height: 32,
|
|
582
|
+
className: "text-blue-400",
|
|
583
|
+
},
|
|
584
|
+
render: (args) => (
|
|
585
|
+
<div className="flex h-64 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
|
|
586
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-8">
|
|
587
|
+
<MoonIcon {...args} />
|
|
588
|
+
</div>
|
|
589
|
+
</div>
|
|
590
|
+
),
|
|
591
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react"
|
|
2
|
+
import { AccessibleIcon } from "@radix-ui/react-accessible-icon"
|
|
3
|
+
|
|
4
|
+
export const MoonIcon = (
|
|
5
|
+
props: React.JSX.IntrinsicAttributes & React.SVGProps<SVGSVGElement>
|
|
6
|
+
) => {
|
|
7
|
+
return (
|
|
8
|
+
<AccessibleIcon label="Moon icon">
|
|
9
|
+
<svg
|
|
10
|
+
width="16"
|
|
11
|
+
height="16"
|
|
12
|
+
viewBox="0 0 24 24"
|
|
13
|
+
fill="currentColor"
|
|
14
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
15
|
+
{...props}
|
|
16
|
+
>
|
|
17
|
+
<path d="M21 12.79A9 9 0 1 1 11.21 3a7 7 0 1 0 9.79 9.79Z" />
|
|
18
|
+
</svg>
|
|
19
|
+
</AccessibleIcon>
|
|
20
|
+
)
|
|
21
|
+
}
|