aural-ui 2.0.1 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/button/Button.stories.tsx +43 -0
- package/dist/components/button/index.tsx +10 -4
- package/dist/components/chip/index.tsx +3 -3
- package/dist/components/dropdown/index.tsx +2 -7
- package/dist/components/icon-button/IconButton.stories.tsx +48 -0
- package/dist/components/icon-button/index.tsx +6 -2
- package/dist/components/input/index.tsx +4 -0
- package/dist/components/overlay/index.tsx +22 -5
- package/dist/components/sheet/index.tsx +5 -2
- package/dist/components/tag/index.tsx +2 -2
- package/dist/components/textarea/index.tsx +2 -0
- package/dist/components/tooltip/index.tsx +45 -0
- package/dist/hooks/index.ts +1 -0
- package/dist/hooks/use-change-state/UseChangeState.stories.tsx +744 -0
- package/dist/hooks/use-change-state/index.tsx +17 -0
- package/dist/hooks/use-change-state/meta.ts +6 -0
- package/dist/icons/all-icons.tsx +155 -79
- 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/circle-tick-icon/CircleTickIcon.stories.tsx +1204 -0
- package/dist/icons/circle-tick-icon/index.tsx +22 -0
- package/dist/icons/circle-tick-icon/meta.ts +8 -0
- package/dist/icons/copy-icon/CopyIcon.stories.tsx +1021 -0
- package/dist/icons/copy-icon/index.tsx +21 -0
- package/dist/icons/copy-icon/meta.ts +8 -0
- package/dist/icons/download-icon/DownloadIcon.stories.tsx +877 -0
- package/dist/icons/download-icon/index.tsx +22 -0
- package/dist/icons/download-icon/meta.ts +8 -0
- package/dist/icons/filter-bar-row-icon/FilterBarRowIcon.stories.tsx +1109 -0
- package/dist/icons/filter-bar-row-icon/index.tsx +24 -0
- package/dist/icons/filter-bar-row-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 +48 -25
- 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/notepad-icon/NotepadIcon.stories.tsx +1159 -0
- package/dist/icons/notepad-icon/index.tsx +21 -0
- package/dist/icons/notepad-icon/meta.ts +8 -0
- package/dist/icons/notes-icon/NotesIcon.stories.tsx +1159 -0
- package/dist/icons/notes-icon/index.tsx +24 -0
- package/dist/icons/notes-icon/meta.ts +8 -0
- package/dist/icons/paper-plane-icon/PaperPlaneIcon.stories.tsx +936 -0
- package/dist/icons/paper-plane-icon/index.tsx +33 -0
- package/dist/icons/paper-plane-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/suggestion-icon/SuggestionIcon.stories.tsx +907 -0
- package/dist/icons/suggestion-icon/index.tsx +33 -0
- package/dist/icons/suggestion-icon/meta.ts +8 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,1021 @@
|
|
|
1
|
+
import React from "react"
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
3
|
+
|
|
4
|
+
import { CopyIcon } from "."
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof CopyIcon> = {
|
|
7
|
+
title: "Icons/CopyIcon",
|
|
8
|
+
component: CopyIcon,
|
|
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-purple-500/10 via-transparent to-green-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-purple-500/30 bg-gradient-to-br from-purple-500/20 to-green-500/20">
|
|
90
|
+
<CopyIcon className="h-12 w-12 text-purple-400" />
|
|
91
|
+
</div>
|
|
92
|
+
<h1 className="!text-fm-primary text-5xl font-bold">
|
|
93
|
+
CopyIcon
|
|
94
|
+
</h1>
|
|
95
|
+
<p className="!mx-auto max-w-3xl text-xl leading-relaxed !text-white/70">
|
|
96
|
+
A copy icon used for duplicating text, links, or code. Great
|
|
97
|
+
for buttons that copy content to the clipboard. Built with
|
|
98
|
+
accessibility in mind using Radix UI's AccessibleIcon
|
|
99
|
+
wrapper.
|
|
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-purple-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-green-300">
|
|
115
|
+
Scalable
|
|
116
|
+
</div>
|
|
117
|
+
<div className="text-sm text-white/60">
|
|
118
|
+
Any size needed
|
|
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-blue-300">
|
|
124
|
+
Navigation
|
|
125
|
+
</div>
|
|
126
|
+
<div className="text-sm text-white/60">
|
|
127
|
+
Upward movement
|
|
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-purple-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 { Copy } from "lucide-react"
|
|
150
|
+
|
|
151
|
+
function CopyButton({ text }) {
|
|
152
|
+
return (
|
|
153
|
+
<button className="flex items-center gap-2">
|
|
154
|
+
<CopyIcon className="h-4 w-4 text-purple-400" />
|
|
155
|
+
<span>Copy to Clipboard</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-purple-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
|
+
<button className="flex items-center gap-3 rounded-lg border border-purple-500/20 bg-purple-500/10 px-4 py-2 transition-colors hover:bg-purple-500/20">
|
|
169
|
+
<CopyIcon className="h-4 w-4 text-purple-400" />
|
|
170
|
+
<span className="text-white">Copy to Clipboard</span>
|
|
171
|
+
</button>
|
|
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-purple-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">24</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-purple-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">24</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-purple-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-purple-300">
|
|
245
|
+
className
|
|
246
|
+
</td>
|
|
247
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
248
|
+
string
|
|
249
|
+
</td>
|
|
250
|
+
<td className="px-6 py-4 text-sm !text-white/50">-</td>
|
|
251
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
252
|
+
CSS classes for styling (use for overrides)
|
|
253
|
+
</td>
|
|
254
|
+
</tr>
|
|
255
|
+
<tr className="border-b border-white/5">
|
|
256
|
+
<td className="px-6 py-4 font-mono text-sm !text-purple-300">
|
|
257
|
+
strokeWidth
|
|
258
|
+
</td>
|
|
259
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
260
|
+
number | string
|
|
261
|
+
</td>
|
|
262
|
+
<td className="px-6 py-4 text-sm !text-white/50">
|
|
263
|
+
1.5
|
|
264
|
+
</td>
|
|
265
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
266
|
+
Stroke width of the chevron line
|
|
267
|
+
</td>
|
|
268
|
+
</tr>
|
|
269
|
+
<tr className="!bg-black/10">
|
|
270
|
+
<td className="px-6 py-4 font-mono text-sm !text-purple-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-purple-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
|
+
<CopyIcon className="!mx-auto mb-2 h-3 w-3 text-purple-400" />
|
|
301
|
+
<span className="text-xs text-white/60">12px</span>
|
|
302
|
+
</div>
|
|
303
|
+
<div className="text-center">
|
|
304
|
+
<CopyIcon className="!mx-auto mb-2 h-4 w-4 text-purple-400" />
|
|
305
|
+
<span className="text-xs text-white/60">16px</span>
|
|
306
|
+
</div>
|
|
307
|
+
<div className="text-center">
|
|
308
|
+
<CopyIcon className="!mx-auto mb-2 h-5 w-5 text-purple-400" />
|
|
309
|
+
<span className="text-xs text-white/60">20px</span>
|
|
310
|
+
</div>
|
|
311
|
+
<div className="text-center">
|
|
312
|
+
<CopyIcon className="!mx-auto mb-2 h-6 w-6 text-purple-400" />
|
|
313
|
+
<span className="text-xs text-white/60">24px</span>
|
|
314
|
+
</div>
|
|
315
|
+
<div className="text-center">
|
|
316
|
+
<CopyIcon className="!mx-auto mb-2 h-8 w-8 text-purple-400" />
|
|
317
|
+
<span className="text-xs text-white/60">32px</span>
|
|
318
|
+
</div>
|
|
319
|
+
<div className="text-center">
|
|
320
|
+
<CopyIcon className="!mx-auto mb-2 h-12 w-12 text-purple-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-purple-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
|
+
<CopyIcon className="h-4 w-4 " />
|
|
334
|
+
|
|
335
|
+
// Medium (24px)
|
|
336
|
+
<CopyIcon className="h-6 w-6 " />
|
|
337
|
+
|
|
338
|
+
// Large (32px)
|
|
339
|
+
<CopyIcon className="h-8 w-8 " />
|
|
340
|
+
|
|
341
|
+
// Custom size
|
|
342
|
+
<CopyIcon 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-purple-300">
|
|
359
|
+
Semantic 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
|
+
<CopyIcon className="h-6 w-6 text-purple-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-purple-400
|
|
370
|
+
</div>
|
|
371
|
+
</div>
|
|
372
|
+
</div>
|
|
373
|
+
<div className="flex items-center gap-4">
|
|
374
|
+
<CopyIcon className="h-6 w-6 text-gray-400" />
|
|
375
|
+
<div>
|
|
376
|
+
<div className="text-sm font-medium text-white">
|
|
377
|
+
Secondary
|
|
378
|
+
</div>
|
|
379
|
+
<div className="text-xs text-white/60">
|
|
380
|
+
text-gray-400
|
|
381
|
+
</div>
|
|
382
|
+
</div>
|
|
383
|
+
</div>
|
|
384
|
+
<div className="flex items-center gap-4">
|
|
385
|
+
<CopyIcon className="h-6 w-6 text-green-400" />
|
|
386
|
+
<div>
|
|
387
|
+
<div className="text-sm font-medium text-white">
|
|
388
|
+
Accent
|
|
389
|
+
</div>
|
|
390
|
+
<div className="text-xs text-white/60">
|
|
391
|
+
text-green-400
|
|
392
|
+
</div>
|
|
393
|
+
</div>
|
|
394
|
+
</div>
|
|
395
|
+
<div className="flex items-center gap-4">
|
|
396
|
+
<CopyIcon className="h-6 w-6 text-white/40" />
|
|
397
|
+
<div>
|
|
398
|
+
<div className="text-sm font-medium text-white">
|
|
399
|
+
Disabled
|
|
400
|
+
</div>
|
|
401
|
+
<div className="text-xs text-white/60">
|
|
402
|
+
text-white/40
|
|
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-purple-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 with
|
|
416
|
+
<CopyIcon className="h-6 w-6 text-purple-400 " />
|
|
417
|
+
<CopyIcon className="h-6 w-6 text-green-500 " />
|
|
418
|
+
|
|
419
|
+
// Using CSS custom properties
|
|
420
|
+
<CopyIcon
|
|
421
|
+
className="h-6 w-6 "
|
|
422
|
+
style={{ color: 'var(--color-primary)' }}
|
|
423
|
+
/>
|
|
424
|
+
|
|
425
|
+
// Direct stroke prop
|
|
426
|
+
<CopyIcon
|
|
427
|
+
width={24}
|
|
428
|
+
height={24}
|
|
429
|
+
stroke="#9333ea"
|
|
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
|
+
{/* Copy to Clipboard */}
|
|
445
|
+
<div className="!space-y-4">
|
|
446
|
+
<h3 className="text-lg font-semibold !text-purple-300">
|
|
447
|
+
Copy to Clipboard Button
|
|
448
|
+
</h3>
|
|
449
|
+
<div className="!space-y-4">
|
|
450
|
+
<div className="flex items-center gap-4">
|
|
451
|
+
<button className="flex items-center gap-2 rounded-lg border border-purple-500/30 bg-purple-500/10 px-4 py-2 text-purple-200 transition-colors hover:bg-purple-500/20">
|
|
452
|
+
<CopyIcon className="h-4 w-4" />
|
|
453
|
+
Copy Text
|
|
454
|
+
</button>
|
|
455
|
+
<button className="flex items-center justify-center rounded-full border border-white/20 bg-white/5 p-3 text-white transition-colors hover:bg-white/10">
|
|
456
|
+
<CopyIcon className="h-5 w-5" />
|
|
457
|
+
</button>
|
|
458
|
+
</div>
|
|
459
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
460
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
461
|
+
{`// Text button
|
|
462
|
+
<button className="flex items-center gap-2 bg-purple-500/10 border border-purple-500/30 px-4 py-2 rounded-lg">
|
|
463
|
+
<CopyIcon className="h-4 w-4" />
|
|
464
|
+
Copy Text
|
|
465
|
+
</button>
|
|
466
|
+
|
|
467
|
+
// Icon-only button
|
|
468
|
+
<button className="flex items-center justify-center bg-white/5 border border-white/20 p-3 rounded-full">
|
|
469
|
+
<CopyIcon className="h-5 w-5" />
|
|
470
|
+
</button>`}
|
|
471
|
+
</pre>
|
|
472
|
+
</div>
|
|
473
|
+
</div>
|
|
474
|
+
</div>
|
|
475
|
+
|
|
476
|
+
{/* Copy Code Block */}
|
|
477
|
+
<div className="!space-y-4">
|
|
478
|
+
<h3 className="text-lg font-semibold !text-purple-300">
|
|
479
|
+
Copy Code Block
|
|
480
|
+
</h3>
|
|
481
|
+
<div className="!space-y-4">
|
|
482
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-4">
|
|
483
|
+
<div className="flex items-center justify-between">
|
|
484
|
+
<span className="font-medium text-white">
|
|
485
|
+
API Configuration
|
|
486
|
+
</span>
|
|
487
|
+
<CopyIcon className="h-4 w-4 text-white/60 transition-transform" />
|
|
488
|
+
</div>
|
|
489
|
+
<div className="mt-3 space-y-2 text-sm text-white/70">
|
|
490
|
+
<div>const API_KEY = "your_api_key_here"</div>
|
|
491
|
+
<div>const BASE_URL = "https://api.example.com"</div>
|
|
492
|
+
<div>const TIMEOUT = 5000</div>
|
|
493
|
+
</div>
|
|
494
|
+
</div>
|
|
495
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
496
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
497
|
+
{`// Copy code block header
|
|
498
|
+
<div className="flex items-center justify-between">
|
|
499
|
+
<span className="font-medium text-white">API Configuration</span>
|
|
500
|
+
<CopyIcon
|
|
501
|
+
className="h-4 w-4 text-white/60 cursor-pointer hover:text-white"
|
|
502
|
+
onClick={() => copyToClipboard(codeContent)}
|
|
503
|
+
/>
|
|
504
|
+
</div>
|
|
505
|
+
|
|
506
|
+
// Code content
|
|
507
|
+
<div className="mt-3 space-y-2 text-sm text-white/70">
|
|
508
|
+
<div>const API_KEY = "your_api_key_here"</div>
|
|
509
|
+
<div>const BASE_URL = "https://api.example.com"</div>
|
|
510
|
+
</div>`}
|
|
511
|
+
</pre>
|
|
512
|
+
</div>
|
|
513
|
+
</div>
|
|
514
|
+
</div>
|
|
515
|
+
|
|
516
|
+
{/* Copy URL/Link */}
|
|
517
|
+
<div className="!space-y-4">
|
|
518
|
+
<h3 className="text-lg font-semibold !text-purple-300">
|
|
519
|
+
Copy URL/Link
|
|
520
|
+
</h3>
|
|
521
|
+
<div className="!space-y-4">
|
|
522
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-4">
|
|
523
|
+
<div className="space-y-2">
|
|
524
|
+
<button className="flex w-full items-center justify-between rounded px-3 py-2 text-left text-white hover:bg-white/10">
|
|
525
|
+
<span>Share Link</span>
|
|
526
|
+
<CopyIcon className="h-4 w-4 text-purple-400" />
|
|
527
|
+
</button>
|
|
528
|
+
<button className="flex w-full items-center justify-between rounded px-3 py-2 text-left text-white hover:bg-white/10">
|
|
529
|
+
<span>API Endpoint</span>
|
|
530
|
+
<CopyIcon className="h-4 w-4 text-white/40" />
|
|
531
|
+
</button>
|
|
532
|
+
<button className="flex w-full items-center justify-between rounded px-3 py-2 text-left text-white hover:bg-white/10">
|
|
533
|
+
<span>Download URL</span>
|
|
534
|
+
<CopyIcon className="h-4 w-4 text-white/40" />
|
|
535
|
+
</button>
|
|
536
|
+
</div>
|
|
537
|
+
</div>
|
|
538
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
539
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
540
|
+
{`// Copy link button with active state
|
|
541
|
+
<button className="flex w-full items-center justify-between rounded px-3 py-2 text-left hover:bg-white/10">
|
|
542
|
+
<span>Share Link</span>
|
|
543
|
+
<CopyIcon
|
|
544
|
+
className="h-4 w-4 text-purple-400 cursor-pointer"
|
|
545
|
+
onClick={() => copyUrl(shareUrl)}
|
|
546
|
+
/>
|
|
547
|
+
</button>
|
|
548
|
+
|
|
549
|
+
// Copy success indicator
|
|
550
|
+
<CopyIcon
|
|
551
|
+
className={cn(
|
|
552
|
+
"h-4 w-4 transition-colors",
|
|
553
|
+
copied ? 'text-green-400' : 'text-white/40'
|
|
554
|
+
)}
|
|
555
|
+
/>`}
|
|
556
|
+
</pre>
|
|
557
|
+
</div>
|
|
558
|
+
</div>
|
|
559
|
+
</div>
|
|
560
|
+
|
|
561
|
+
{/* Copy Card Content */}
|
|
562
|
+
<div className="!space-y-4">
|
|
563
|
+
<h3 className="text-lg font-semibold !text-purple-300">
|
|
564
|
+
Copy Card Content
|
|
565
|
+
</h3>
|
|
566
|
+
<div className="!space-y-4">
|
|
567
|
+
<div className="w-full space-y-2">
|
|
568
|
+
<div className="rounded-lg border border-white/10 bg-white/5">
|
|
569
|
+
<div className="flex items-center justify-between p-4">
|
|
570
|
+
<span className="font-medium text-white">
|
|
571
|
+
User Profile Data
|
|
572
|
+
</span>
|
|
573
|
+
<CopyIcon className="h-4 w-4 text-white/60" />
|
|
574
|
+
</div>
|
|
575
|
+
<div className="border-t border-white/10 p-4 text-sm text-white/70">
|
|
576
|
+
Copy user information including name, email, and
|
|
577
|
+
preferences to clipboard.
|
|
578
|
+
</div>
|
|
579
|
+
</div>
|
|
580
|
+
<div className="rounded-lg border border-white/10 bg-white/5">
|
|
581
|
+
<div className="flex items-center justify-between p-4">
|
|
582
|
+
<span className="font-medium text-white">
|
|
583
|
+
Export Settings
|
|
584
|
+
</span>
|
|
585
|
+
<CopyIcon className="h-4 w-4 text-white/60" />
|
|
586
|
+
</div>
|
|
587
|
+
</div>
|
|
588
|
+
</div>
|
|
589
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
590
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
591
|
+
{`// Copy card header
|
|
592
|
+
<div className="rounded-lg border border-white/10 bg-white/5">
|
|
593
|
+
<div
|
|
594
|
+
className="flex items-center justify-between p-4 cursor-pointer"
|
|
595
|
+
onClick={() => copyCardContent(cardData)}
|
|
596
|
+
>
|
|
597
|
+
<span className="font-medium text-white">
|
|
598
|
+
User Profile Data
|
|
599
|
+
</span>
|
|
600
|
+
<CopyIcon className="h-4 w-4 text-white/60 hover:text-white" />
|
|
601
|
+
</div>
|
|
602
|
+
<div className="border-t border-white/10 p-4 text-sm text-white/70">
|
|
603
|
+
Copy user information including name, email, and preferences.
|
|
604
|
+
</div>
|
|
605
|
+
</div>`}
|
|
606
|
+
</pre>
|
|
607
|
+
</div>
|
|
608
|
+
</div>
|
|
609
|
+
</div>
|
|
610
|
+
</div>
|
|
611
|
+
</div>
|
|
612
|
+
|
|
613
|
+
{/* Accessibility */}
|
|
614
|
+
<div className="!space-y-8">
|
|
615
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
616
|
+
Accessibility Features
|
|
617
|
+
</h2>
|
|
618
|
+
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
|
|
619
|
+
<div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
620
|
+
<h3 className="text-lg font-semibold !text-green-300">
|
|
621
|
+
✅ Built-in Features
|
|
622
|
+
</h3>
|
|
623
|
+
<ul className="!space-y-2 text-sm !text-white/70">
|
|
624
|
+
<li className="!text-white/70">
|
|
625
|
+
Uses Radix UI AccessibleIcon wrapper
|
|
626
|
+
</li>
|
|
627
|
+
<li className="!text-white/70">
|
|
628
|
+
Provides screen reader label "Chevron Up icon"
|
|
629
|
+
</li>
|
|
630
|
+
<li className="!text-white/70">
|
|
631
|
+
Supports keyboard navigation when interactive
|
|
632
|
+
</li>
|
|
633
|
+
<li className="!text-white/70">
|
|
634
|
+
Maintains proper color contrast ratios
|
|
635
|
+
</li>
|
|
636
|
+
<li className="!text-white/70">
|
|
637
|
+
Scales with user's font size preferences
|
|
638
|
+
</li>
|
|
639
|
+
</ul>
|
|
640
|
+
</div>
|
|
641
|
+
|
|
642
|
+
<div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
643
|
+
<h3 className="text-lg font-semibold !text-purple-300">
|
|
644
|
+
💡 Best Practices
|
|
645
|
+
</h3>
|
|
646
|
+
<ul className="!space-y-2 text-sm text-white/70">
|
|
647
|
+
<li className="!text-white/70">
|
|
648
|
+
Use descriptive aria-labels for navigation buttons
|
|
649
|
+
</li>
|
|
650
|
+
<li className="!text-white/70">
|
|
651
|
+
Provide keyboard shortcuts for common actions
|
|
652
|
+
</li>
|
|
653
|
+
<li className="!text-white/70">
|
|
654
|
+
Ensure sufficient touch target size (44px minimum)
|
|
655
|
+
</li>
|
|
656
|
+
<li className="!text-white/70">
|
|
657
|
+
Add focus states for interactive elements
|
|
658
|
+
</li>
|
|
659
|
+
<li className="!text-white/70">
|
|
660
|
+
Consider aria-expanded for collapsible content
|
|
661
|
+
</li>
|
|
662
|
+
</ul>
|
|
663
|
+
</div>
|
|
664
|
+
</div>
|
|
665
|
+
|
|
666
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-6">
|
|
667
|
+
<h3 className="mb-4 text-lg font-semibold !text-purple-300">
|
|
668
|
+
Proper ARIA Implementation
|
|
669
|
+
</h3>
|
|
670
|
+
<div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
|
|
671
|
+
{/* Code Block */}
|
|
672
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
673
|
+
<pre className="overflow-x-auto text-sm !text-blue-300">
|
|
674
|
+
{`// Copy text button with ARIA
|
|
675
|
+
<button
|
|
676
|
+
aria-label="Copy text to clipboard"
|
|
677
|
+
className="flex items-center gap-2"
|
|
678
|
+
>
|
|
679
|
+
<CopyIcon className="h-4 w-4" />
|
|
680
|
+
Copy
|
|
681
|
+
</button>
|
|
682
|
+
|
|
683
|
+
// Icon-only copy button
|
|
684
|
+
<button
|
|
685
|
+
aria-label="Copy link"
|
|
686
|
+
className="p-2"
|
|
687
|
+
>
|
|
688
|
+
<CopyIcon className="h-4 w-4" />
|
|
689
|
+
</button>
|
|
690
|
+
|
|
691
|
+
// Copy code block
|
|
692
|
+
<div className="flex justify-between">
|
|
693
|
+
<span>API Key</span>
|
|
694
|
+
<button aria-label="Copy API key">
|
|
695
|
+
<CopyIcon className="h-4 w-4" />
|
|
696
|
+
</button>
|
|
697
|
+
</div>`}
|
|
698
|
+
</pre>
|
|
699
|
+
</div>
|
|
700
|
+
|
|
701
|
+
{/* Explanation Block */}
|
|
702
|
+
<div className="!space-y-4">
|
|
703
|
+
<p className="text-sm !text-white/70">
|
|
704
|
+
Use ARIA labels like <code>aria-label="Copy text"</code>{" "}
|
|
705
|
+
to make copy actions clear to screen readers. Avoid
|
|
706
|
+
relying on just the icon.
|
|
707
|
+
</p>
|
|
708
|
+
<div className="rounded-lg border border-purple-500/20 bg-purple-500/10 p-4">
|
|
709
|
+
<div className="flex items-center gap-2 text-sm text-purple-200">
|
|
710
|
+
<CopyIcon className="h-4 w-4" />
|
|
711
|
+
<span>
|
|
712
|
+
Clear labels improve accessibility for clipboard
|
|
713
|
+
actions.
|
|
714
|
+
</span>
|
|
715
|
+
</div>
|
|
716
|
+
</div>
|
|
717
|
+
</div>
|
|
718
|
+
</div>
|
|
719
|
+
</div>
|
|
720
|
+
</div>
|
|
721
|
+
|
|
722
|
+
{/* Related Icons */}
|
|
723
|
+
<div className="!space-y-8">
|
|
724
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
725
|
+
Related Icons
|
|
726
|
+
</h2>
|
|
727
|
+
<div className="grid grid-cols-2 gap-6 md:grid-cols-4">
|
|
728
|
+
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
729
|
+
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-blue-500/20">
|
|
730
|
+
<span className="!text-2xl !text-white">↓</span>
|
|
731
|
+
</div>
|
|
732
|
+
<div>
|
|
733
|
+
<div className="font-medium text-white">
|
|
734
|
+
ChevronDownIcon
|
|
735
|
+
</div>
|
|
736
|
+
<div className="text-xs text-white/60">
|
|
737
|
+
Downward direction
|
|
738
|
+
</div>
|
|
739
|
+
</div>
|
|
740
|
+
</div>
|
|
741
|
+
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
742
|
+
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-indigo-500/20">
|
|
743
|
+
<span className="!text-2xl !text-white">→</span>
|
|
744
|
+
</div>
|
|
745
|
+
<div>
|
|
746
|
+
<div className="font-medium text-white">
|
|
747
|
+
ChevronRightIcon
|
|
748
|
+
</div>
|
|
749
|
+
<div className="text-xs text-white/60">
|
|
750
|
+
Right direction
|
|
751
|
+
</div>
|
|
752
|
+
</div>
|
|
753
|
+
</div>
|
|
754
|
+
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
755
|
+
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-pink-500/20">
|
|
756
|
+
<span className="!text-2xl !text-white">←</span>
|
|
757
|
+
</div>
|
|
758
|
+
<div>
|
|
759
|
+
<div className="font-medium text-white">
|
|
760
|
+
ChevronLeftIcon
|
|
761
|
+
</div>
|
|
762
|
+
<div className="text-xs text-white/60">
|
|
763
|
+
Left direction
|
|
764
|
+
</div>
|
|
765
|
+
</div>
|
|
766
|
+
</div>
|
|
767
|
+
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
768
|
+
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-green-500/20">
|
|
769
|
+
<span className="!text-2xl !text-white">↑</span>
|
|
770
|
+
</div>
|
|
771
|
+
<div>
|
|
772
|
+
<div className="font-medium text-white">ArrowUpIcon</div>
|
|
773
|
+
<div className="text-xs text-white/60">Arrow variant</div>
|
|
774
|
+
</div>
|
|
775
|
+
</div>
|
|
776
|
+
</div>
|
|
777
|
+
</div>
|
|
778
|
+
</div>
|
|
779
|
+
|
|
780
|
+
{/* Footer */}
|
|
781
|
+
<div className="border-t border-white/10 bg-black/20 backdrop-blur-xl">
|
|
782
|
+
<div className="!mx-auto max-w-7xl px-6 py-8">
|
|
783
|
+
<div className="!space-y-4 text-center">
|
|
784
|
+
<p className="!text-white/60">
|
|
785
|
+
CopyIcon is part of the Aural UI icon library, built with
|
|
786
|
+
accessibility and intuitive upward navigation in mind.
|
|
787
|
+
</p>
|
|
788
|
+
<p className="text-sm !text-white/40">
|
|
789
|
+
All icons use Radix UI's AccessibleIcon for screen reader
|
|
790
|
+
compatibility and follow WCAG guidelines.
|
|
791
|
+
</p>
|
|
792
|
+
</div>
|
|
793
|
+
</div>
|
|
794
|
+
</div>
|
|
795
|
+
</div>
|
|
796
|
+
</>
|
|
797
|
+
),
|
|
798
|
+
},
|
|
799
|
+
},
|
|
800
|
+
tags: ["autodocs"],
|
|
801
|
+
argTypes: {
|
|
802
|
+
width: {
|
|
803
|
+
control: { type: "range", min: 8, max: 96, step: 2 },
|
|
804
|
+
description: "Width of the icon in pixels",
|
|
805
|
+
},
|
|
806
|
+
height: {
|
|
807
|
+
control: { type: "range", min: 8, max: 96, step: 2 },
|
|
808
|
+
description: "Height of the icon in pixels",
|
|
809
|
+
},
|
|
810
|
+
stroke: {
|
|
811
|
+
control: "color",
|
|
812
|
+
description: "Stroke color of the icon",
|
|
813
|
+
},
|
|
814
|
+
strokeWidth: {
|
|
815
|
+
control: { type: "range", min: 0.5, max: 3, step: 0.1 },
|
|
816
|
+
description: "Stroke width of the chevron line",
|
|
817
|
+
},
|
|
818
|
+
className: {
|
|
819
|
+
control: "text",
|
|
820
|
+
description: "CSS classes for styling (use for overrides)",
|
|
821
|
+
},
|
|
822
|
+
},
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
export default meta
|
|
826
|
+
type Story = StoryObj<typeof CopyIcon>
|
|
827
|
+
|
|
828
|
+
// Story parameters for consistent dark theme
|
|
829
|
+
const storyParameters = {
|
|
830
|
+
backgrounds: {
|
|
831
|
+
default: "dark",
|
|
832
|
+
values: [
|
|
833
|
+
{ name: "dark", value: "#0a0a0a" },
|
|
834
|
+
{ name: "darker", value: "#000000" },
|
|
835
|
+
],
|
|
836
|
+
},
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
export const Default: Story = {
|
|
840
|
+
args: {
|
|
841
|
+
width: 24,
|
|
842
|
+
height: 24,
|
|
843
|
+
className: "text-purple-400 ",
|
|
844
|
+
},
|
|
845
|
+
parameters: storyParameters,
|
|
846
|
+
render: (args) => (
|
|
847
|
+
<div className="flex h-32 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
|
|
848
|
+
<CopyIcon {...args} />
|
|
849
|
+
</div>
|
|
850
|
+
),
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
export const SizeVariations: Story = {
|
|
854
|
+
parameters: {
|
|
855
|
+
...storyParameters,
|
|
856
|
+
docs: {
|
|
857
|
+
description: {
|
|
858
|
+
story:
|
|
859
|
+
"CopyIcon in different sizes, from small UI elements to large displays.",
|
|
860
|
+
},
|
|
861
|
+
},
|
|
862
|
+
},
|
|
863
|
+
render: () => (
|
|
864
|
+
<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">
|
|
865
|
+
<div className="text-center">
|
|
866
|
+
<CopyIcon className="!mx-auto mb-2 h-3 w-3 text-purple-400" />
|
|
867
|
+
<span className="text-xs text-white/60">12px</span>
|
|
868
|
+
</div>
|
|
869
|
+
<div className="text-center">
|
|
870
|
+
<CopyIcon className="!mx-auto mb-2 h-4 w-4 text-purple-400" />
|
|
871
|
+
<span className="text-xs text-white/60">16px</span>
|
|
872
|
+
</div>
|
|
873
|
+
<div className="text-center">
|
|
874
|
+
<CopyIcon className="!mx-auto mb-2 h-5 w-5 text-purple-400" />
|
|
875
|
+
<span className="text-xs text-white/60">20px</span>
|
|
876
|
+
</div>
|
|
877
|
+
<div className="text-center">
|
|
878
|
+
<CopyIcon className="!mx-auto mb-2 h-6 w-6 text-purple-400" />
|
|
879
|
+
<span className="text-xs text-white/60">24px</span>
|
|
880
|
+
</div>
|
|
881
|
+
<div className="text-center">
|
|
882
|
+
<CopyIcon className="!mx-auto mb-2 h-8 w-8 text-purple-400" />
|
|
883
|
+
<span className="text-xs text-white/60">32px</span>
|
|
884
|
+
</div>
|
|
885
|
+
<div className="text-center">
|
|
886
|
+
<CopyIcon className="!mx-auto mb-2 h-12 w-12 text-purple-400" />
|
|
887
|
+
<span className="text-xs text-white/60">48px</span>
|
|
888
|
+
</div>
|
|
889
|
+
</div>
|
|
890
|
+
),
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
export const ColorVariations: Story = {
|
|
894
|
+
parameters: {
|
|
895
|
+
...storyParameters,
|
|
896
|
+
docs: {
|
|
897
|
+
description: {
|
|
898
|
+
story:
|
|
899
|
+
"CopyIcon in different semantic colors for various upward navigation contexts.",
|
|
900
|
+
},
|
|
901
|
+
},
|
|
902
|
+
},
|
|
903
|
+
render: () => (
|
|
904
|
+
<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">
|
|
905
|
+
<div className="text-center">
|
|
906
|
+
<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">
|
|
907
|
+
<CopyIcon className="h-8 w-8 text-purple-400" />
|
|
908
|
+
</div>
|
|
909
|
+
<div className="text-sm font-medium text-white">Primary</div>
|
|
910
|
+
<div className="text-xs text-purple-400">text-purple-400</div>
|
|
911
|
+
</div>
|
|
912
|
+
<div className="text-center">
|
|
913
|
+
<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">
|
|
914
|
+
<CopyIcon className="h-8 w-8 text-gray-400" />
|
|
915
|
+
</div>
|
|
916
|
+
<div className="text-sm font-medium text-white">Secondary</div>
|
|
917
|
+
<div className="text-xs text-gray-400">text-gray-400</div>
|
|
918
|
+
</div>
|
|
919
|
+
<div className="text-center">
|
|
920
|
+
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-green-500/30 bg-green-500/20">
|
|
921
|
+
<CopyIcon className="h-8 w-8 text-green-400" />
|
|
922
|
+
</div>
|
|
923
|
+
<div className="text-sm font-medium text-white">Accent</div>
|
|
924
|
+
<div className="text-xs text-green-400">text-green-400</div>
|
|
925
|
+
</div>
|
|
926
|
+
<div className="text-center">
|
|
927
|
+
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-white/10 bg-white/5">
|
|
928
|
+
<CopyIcon className="h-8 w-8 text-white/40" />
|
|
929
|
+
</div>
|
|
930
|
+
<div className="text-sm font-medium text-white">Disabled</div>
|
|
931
|
+
<div className="text-xs text-white/40">text-white/40</div>
|
|
932
|
+
</div>
|
|
933
|
+
</div>
|
|
934
|
+
),
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
export const UsageExamples: Story = {
|
|
938
|
+
parameters: {
|
|
939
|
+
...storyParameters,
|
|
940
|
+
docs: {
|
|
941
|
+
description: {
|
|
942
|
+
story:
|
|
943
|
+
"Real-world usage examples showing CopyIcon in different upward navigation contexts.",
|
|
944
|
+
},
|
|
945
|
+
},
|
|
946
|
+
},
|
|
947
|
+
render: () => (
|
|
948
|
+
<div className="min-h-dvh !space-y-8 rounded-lg bg-gradient-to-br from-gray-900 to-gray-800 p-8">
|
|
949
|
+
{/* Copy Content */}
|
|
950
|
+
<div className="!space-y-2">
|
|
951
|
+
<h3 className="text-sm font-medium text-white">Scroll to Top</h3>
|
|
952
|
+
<div className="flex items-center gap-4">
|
|
953
|
+
<button className="flex items-center gap-2 rounded-lg border border-purple-500/30 bg-purple-500/10 px-4 py-2 text-purple-200 transition-colors hover:bg-purple-500/20">
|
|
954
|
+
<CopyIcon className="h-4 w-4" />
|
|
955
|
+
Back to Top
|
|
956
|
+
</button>
|
|
957
|
+
<button className="flex items-center justify-center rounded-full border border-white/20 bg-white/5 p-3 text-white transition-colors hover:bg-white/10">
|
|
958
|
+
<CopyIcon className="h-5 w-5" />
|
|
959
|
+
</button>
|
|
960
|
+
</div>
|
|
961
|
+
</div>
|
|
962
|
+
|
|
963
|
+
{/* Collapsible */}
|
|
964
|
+
<div className="!space-y-2">
|
|
965
|
+
<h3 className="text-sm font-medium text-white">Collapsible Content</h3>
|
|
966
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-4">
|
|
967
|
+
<button className="flex w-full items-center justify-between text-left">
|
|
968
|
+
<span className="font-medium text-white">Advanced Settings</span>
|
|
969
|
+
<CopyIcon className="h-4 w-4 text-white/60 transition-transform" />
|
|
970
|
+
</button>
|
|
971
|
+
<div className="mt-3 space-y-2 text-sm text-white/70">
|
|
972
|
+
<div>Option 1: Enable advanced features</div>
|
|
973
|
+
<div>Option 2: Custom configuration</div>
|
|
974
|
+
</div>
|
|
975
|
+
</div>
|
|
976
|
+
</div>
|
|
977
|
+
|
|
978
|
+
{/* Sort Controls */}
|
|
979
|
+
<div className="!space-y-2">
|
|
980
|
+
<h3 className="text-sm font-medium text-white">Sort Controls</h3>
|
|
981
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-4">
|
|
982
|
+
<div className="space-y-2">
|
|
983
|
+
<button className="flex w-full items-center justify-between rounded px-3 py-2 text-left text-white hover:bg-white/10">
|
|
984
|
+
<span>Name</span>
|
|
985
|
+
<CopyIcon className="h-4 w-4 text-purple-400" />
|
|
986
|
+
</button>
|
|
987
|
+
<button className="flex w-full items-center justify-between rounded px-3 py-2 text-left text-white hover:bg-white/10">
|
|
988
|
+
<span>Date</span>
|
|
989
|
+
<CopyIcon className="h-4 w-4 text-white/40" />
|
|
990
|
+
</button>
|
|
991
|
+
</div>
|
|
992
|
+
</div>
|
|
993
|
+
</div>
|
|
994
|
+
</div>
|
|
995
|
+
),
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
export const Playground: Story = {
|
|
999
|
+
parameters: {
|
|
1000
|
+
...storyParameters,
|
|
1001
|
+
docs: {
|
|
1002
|
+
description: {
|
|
1003
|
+
story:
|
|
1004
|
+
"Interactive playground to experiment with different CopyIcon configurations.",
|
|
1005
|
+
},
|
|
1006
|
+
},
|
|
1007
|
+
},
|
|
1008
|
+
args: {
|
|
1009
|
+
width: 32,
|
|
1010
|
+
height: 32,
|
|
1011
|
+
className: "text-purple-400 ",
|
|
1012
|
+
strokeWidth: 1.5,
|
|
1013
|
+
},
|
|
1014
|
+
render: (args) => (
|
|
1015
|
+
<div className="flex h-64 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
|
|
1016
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-8">
|
|
1017
|
+
<CopyIcon {...args} />
|
|
1018
|
+
</div>
|
|
1019
|
+
</div>
|
|
1020
|
+
),
|
|
1021
|
+
}
|