aural-ui 2.1.0 → 2.1.1
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/icons/apple-logo-icon/AppleLogoIcon.stories.tsx +952 -0
- package/dist/icons/apple-logo-icon/index.tsx +26 -0
- package/dist/icons/apple-logo-icon/meta.ts +8 -0
- package/dist/icons/arrow-left-icon/ArrowLeftIcon.stories.tsx +1008 -0
- package/dist/icons/arrow-left-icon/index.tsx +24 -0
- package/dist/icons/arrow-left-icon/meta.ts +8 -0
- package/dist/icons/backward-ten-seconds-icon/BackwardTenSecondsIcon.stories.tsx +1050 -0
- package/dist/icons/backward-ten-seconds-icon/index.tsx +35 -0
- package/dist/icons/backward-ten-seconds-icon/meta.ts +8 -0
- package/dist/icons/camera-icon/CameraIcon.stories.tsx +1271 -0
- package/dist/icons/camera-icon/index.tsx +22 -0
- package/dist/icons/camera-icon/meta.ts +8 -0
- package/dist/icons/coin-icon/CoinIcon.stories.tsx +1382 -0
- package/dist/icons/coin-icon/index.tsx +36 -0
- package/dist/icons/coin-icon/meta.ts +8 -0
- package/dist/icons/email-icon/EmailIcon.stories.tsx +995 -0
- package/dist/icons/email-icon/index.tsx +22 -0
- package/dist/icons/email-icon/meta.ts +8 -0
- package/dist/icons/expand-icon/ExpandIcon.stories.tsx +1167 -0
- package/dist/icons/expand-icon/index.tsx +22 -0
- package/dist/icons/expand-icon/meta.ts +8 -0
- package/dist/icons/forward-ten-seconds-icon/ForwardTenSecondsIcon.stories.tsx +1054 -0
- package/dist/icons/forward-ten-seconds-icon/index.tsx +33 -0
- package/dist/icons/forward-ten-seconds-icon/meta.ts +8 -0
- package/dist/icons/google-logo-icon/GoogleLogoIcon.stories.tsx +1004 -0
- package/dist/icons/google-logo-icon/index.tsx +34 -0
- package/dist/icons/google-logo-icon/meta.ts +8 -0
- package/dist/icons/heart-icon/HeartIcon.stories.tsx +1080 -0
- package/dist/icons/heart-icon/index.tsx +21 -0
- package/dist/icons/heart-icon/meta.ts +8 -0
- package/dist/icons/index.ts +32 -4
- package/dist/icons/indian-flag-icon/IndianFlagIcon.stories.tsx +1020 -0
- package/dist/icons/indian-flag-icon/index.tsx +46 -0
- package/dist/icons/indian-flag-icon/meta.ts +8 -0
- package/dist/icons/instagram-icon/InstagramIcon.stories.tsx +1449 -0
- package/dist/icons/instagram-icon/index.tsx +17 -0
- package/dist/icons/instagram-icon/meta.ts +8 -0
- package/dist/icons/linked-in-icon/LinkedInIcon.stories.tsx +1582 -0
- package/dist/icons/linked-in-icon/index.tsx +17 -0
- package/dist/icons/linked-in-icon/meta.ts +8 -0
- package/dist/icons/minimize-icon/MinimizeIcon.stories.tsx +1214 -0
- package/dist/icons/minimize-icon/index.tsx +22 -0
- package/dist/icons/minimize-icon/meta.ts +8 -0
- package/dist/icons/pause-icon/PauseIcon.stories.tsx +1060 -0
- package/dist/icons/pause-icon/index.tsx +30 -0
- package/dist/icons/pause-icon/meta.ts +8 -0
- package/dist/icons/share-icon/ShareIcon.stories.tsx +1081 -0
- package/dist/icons/share-icon/index.tsx +22 -0
- package/dist/icons/share-icon/meta.ts +8 -0
- package/dist/icons/skip-backward-icon/SkipBackwardIcon.stories.tsx +1047 -0
- package/dist/icons/skip-backward-icon/index.tsx +29 -0
- package/dist/icons/skip-backward-icon/meta.ts +8 -0
- package/dist/icons/skip-forward-icon/SkipForwardIcon.stories.tsx +1049 -0
- package/dist/icons/skip-forward-icon/index.tsx +29 -0
- package/dist/icons/skip-forward-icon/meta.ts +8 -0
- package/dist/icons/store-coin-icon/StoreCoinIcon.stories.tsx +1020 -0
- package/dist/icons/store-coin-icon/index.tsx +35 -0
- package/dist/icons/store-coin-icon/meta.ts +8 -0
- package/dist/icons/threads-icon/ThreadsIcon.stories.tsx +1489 -0
- package/dist/icons/threads-icon/index.tsx +17 -0
- package/dist/icons/threads-icon/meta.ts +8 -0
- package/dist/icons/twitter-x-icon/TwitterXIcon.stories.tsx +1463 -0
- package/dist/icons/twitter-x-icon/index.tsx +17 -0
- package/dist/icons/twitter-x-icon/meta.ts +8 -0
- package/dist/icons/video-play-list-icon/VideoPlaylistIcon.stories.tsx +1105 -0
- package/dist/icons/video-play-list-icon/index.tsx +22 -0
- package/dist/icons/video-play-list-icon/meta.ts +8 -0
- package/dist/icons/voice-playing-icon/VoicePlayingIcon.stories.tsx +1416 -0
- package/dist/icons/voice-playing-icon/index.tsx +24 -0
- package/dist/icons/voice-playing-icon/meta.ts +8 -0
- package/dist/icons/volume-full-icon/VolumeFullIcon.stories.tsx +1230 -0
- package/dist/icons/volume-full-icon/index.tsx +25 -0
- package/dist/icons/volume-full-icon/meta.ts +8 -0
- package/dist/icons/volume-half-icon/VolumeHalfIcon.stories.tsx +1153 -0
- package/dist/icons/volume-half-icon/index.tsx +25 -0
- package/dist/icons/volume-half-icon/meta.ts +8 -0
- package/dist/icons/volume-off-icon/VolumeOffIcon.stories.tsx +1144 -0
- package/dist/icons/volume-off-icon/index.tsx +26 -0
- package/dist/icons/volume-off-icon/meta.ts +8 -0
- package/dist/icons/warning-icon/WarningIcon.stories.tsx +1106 -0
- package/dist/icons/warning-icon/index.tsx +27 -0
- package/dist/icons/warning-icon/meta.ts +8 -0
- package/dist/icons/youtube-icon/YoutubeIcon.stories.tsx +996 -0
- package/dist/icons/youtube-icon/index.tsx +24 -0
- package/dist/icons/youtube-icon/meta.ts +8 -0
- package/dist/index.js +1 -1
- package/dist/styles/aural-theme.css +9 -0
- package/package.json +1 -1
|
@@ -0,0 +1,1106 @@
|
|
|
1
|
+
import React from "react"
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
3
|
+
|
|
4
|
+
import { WarningIcon } from "."
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof WarningIcon> = {
|
|
7
|
+
title: "Icons/WarningIcon",
|
|
8
|
+
component: WarningIcon,
|
|
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-yellow-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-yellow-500/10 via-transparent to-amber-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-yellow-500/30 bg-gradient-to-br from-yellow-500/20 to-amber-500/20">
|
|
90
|
+
<WarningIcon className="h-12 w-12 text-yellow-400" />
|
|
91
|
+
</div>
|
|
92
|
+
<h1 className="text-5xl font-bold !text-white">
|
|
93
|
+
WarningIcon
|
|
94
|
+
</h1>
|
|
95
|
+
<p className="!mx-auto max-w-3xl text-xl leading-relaxed !text-white/70">
|
|
96
|
+
A universal warning alert icon for user interfaces. Features
|
|
97
|
+
the classic triangular warning design with exclamation mark,
|
|
98
|
+
essential for error states, validation messages,
|
|
99
|
+
confirmation dialogs, and any interface where users need to
|
|
100
|
+
be alerted to important information.
|
|
101
|
+
</p>
|
|
102
|
+
|
|
103
|
+
{/* Stats */}
|
|
104
|
+
<div className="flex items-center justify-center gap-8 pt-8">
|
|
105
|
+
<div className="text-center">
|
|
106
|
+
<div className="text-3xl font-bold text-yellow-300">
|
|
107
|
+
Alert Users
|
|
108
|
+
</div>
|
|
109
|
+
<div className="text-sm text-white/60">
|
|
110
|
+
Critical warnings
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
<div className="h-8 w-px bg-white/20" />
|
|
114
|
+
<div className="text-center">
|
|
115
|
+
<div className="text-3xl font-bold text-amber-300">
|
|
116
|
+
Accessible
|
|
117
|
+
</div>
|
|
118
|
+
<div className="text-sm text-white/60">
|
|
119
|
+
Screen reader friendly
|
|
120
|
+
</div>
|
|
121
|
+
</div>
|
|
122
|
+
<div className="h-8 w-px bg-white/20" />
|
|
123
|
+
<div className="text-center">
|
|
124
|
+
<div className="text-3xl font-bold text-orange-300">
|
|
125
|
+
Universal
|
|
126
|
+
</div>
|
|
127
|
+
<div className="text-sm text-white/60">
|
|
128
|
+
Standard alert symbol
|
|
129
|
+
</div>
|
|
130
|
+
</div>
|
|
131
|
+
</div>
|
|
132
|
+
</div>
|
|
133
|
+
</div>
|
|
134
|
+
</div>
|
|
135
|
+
|
|
136
|
+
{/* Content */}
|
|
137
|
+
<div className="!mx-auto max-w-7xl !space-y-16 px-6 py-12">
|
|
138
|
+
{/* Quick Usage */}
|
|
139
|
+
<div className="!space-y-8">
|
|
140
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
141
|
+
Quick Start
|
|
142
|
+
</h2>
|
|
143
|
+
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
144
|
+
<div className="!space-y-4">
|
|
145
|
+
<h3 className="text-xl font-semibold !text-yellow-300">
|
|
146
|
+
Basic Usage
|
|
147
|
+
</h3>
|
|
148
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
149
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
150
|
+
{`import { WarningIcon } from "@icons/warning-icon"
|
|
151
|
+
|
|
152
|
+
function ErrorAlert() {
|
|
153
|
+
return (
|
|
154
|
+
<div className="flex items-center gap-2 p-3 bg-yellow-50 border border-yellow-200 rounded-lg">
|
|
155
|
+
<WarningIcon className="h-5 w-5 text-yellow-600" />
|
|
156
|
+
<span>Please check your input and try again.</span>
|
|
157
|
+
</div>
|
|
158
|
+
)
|
|
159
|
+
}`}
|
|
160
|
+
</pre>
|
|
161
|
+
</div>
|
|
162
|
+
</div>
|
|
163
|
+
|
|
164
|
+
<div className="!space-y-4">
|
|
165
|
+
<h3 className="text-xl font-semibold !text-yellow-300">
|
|
166
|
+
Live Preview
|
|
167
|
+
</h3>
|
|
168
|
+
<div className="flex h-32 items-center justify-center rounded-lg border border-white/10 bg-white/5">
|
|
169
|
+
<div className="flex items-center gap-2 rounded-lg border border-yellow-500/20 bg-yellow-500/10 p-3">
|
|
170
|
+
<WarningIcon className="h-5 w-5 text-yellow-400" />
|
|
171
|
+
<span className="text-yellow-200">Warning message</span>
|
|
172
|
+
</div>
|
|
173
|
+
</div>
|
|
174
|
+
</div>
|
|
175
|
+
</div>
|
|
176
|
+
</div>
|
|
177
|
+
|
|
178
|
+
{/* Props Documentation */}
|
|
179
|
+
<div className="!space-y-8">
|
|
180
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
181
|
+
Props & Configuration
|
|
182
|
+
</h2>
|
|
183
|
+
|
|
184
|
+
<div className="overflow-hidden rounded-lg border border-white/10 bg-white/5">
|
|
185
|
+
<div className="bg-white/5 p-4">
|
|
186
|
+
<h3 className="text-xl font-semibold !text-white">Props</h3>
|
|
187
|
+
</div>
|
|
188
|
+
<table className="!my-0 w-full">
|
|
189
|
+
<thead className="bg-white/5">
|
|
190
|
+
<tr className="border-b border-white/10">
|
|
191
|
+
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
192
|
+
Prop
|
|
193
|
+
</th>
|
|
194
|
+
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
195
|
+
Type
|
|
196
|
+
</th>
|
|
197
|
+
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
198
|
+
Default
|
|
199
|
+
</th>
|
|
200
|
+
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
201
|
+
Description
|
|
202
|
+
</th>
|
|
203
|
+
</tr>
|
|
204
|
+
</thead>
|
|
205
|
+
<tbody>
|
|
206
|
+
<tr className="border-b border-white/5">
|
|
207
|
+
<td className="px-6 py-4 font-mono text-sm !text-yellow-300">
|
|
208
|
+
width
|
|
209
|
+
</td>
|
|
210
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
211
|
+
number | string
|
|
212
|
+
</td>
|
|
213
|
+
<td className="px-6 py-4 text-sm !text-white/50">24</td>
|
|
214
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
215
|
+
Width of the icon in pixels
|
|
216
|
+
</td>
|
|
217
|
+
</tr>
|
|
218
|
+
<tr className="border-b border-white/5 !bg-black/10">
|
|
219
|
+
<td className="px-6 py-4 font-mono text-sm !text-yellow-300">
|
|
220
|
+
height
|
|
221
|
+
</td>
|
|
222
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
223
|
+
number | string
|
|
224
|
+
</td>
|
|
225
|
+
<td className="px-6 py-4 text-sm !text-white/50">24</td>
|
|
226
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
227
|
+
Height of the icon in pixels
|
|
228
|
+
</td>
|
|
229
|
+
</tr>
|
|
230
|
+
<tr className="border-b border-white/5">
|
|
231
|
+
<td className="px-6 py-4 font-mono text-sm !text-yellow-300">
|
|
232
|
+
stroke
|
|
233
|
+
</td>
|
|
234
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
235
|
+
string
|
|
236
|
+
</td>
|
|
237
|
+
<td className="px-6 py-4 text-sm !text-white/50">
|
|
238
|
+
currentColor
|
|
239
|
+
</td>
|
|
240
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
241
|
+
Stroke color of the icon
|
|
242
|
+
</td>
|
|
243
|
+
</tr>
|
|
244
|
+
<tr className="border-b border-white/5 !bg-black/10">
|
|
245
|
+
<td className="px-6 py-4 font-mono text-sm !text-yellow-300">
|
|
246
|
+
strokeWidth
|
|
247
|
+
</td>
|
|
248
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
249
|
+
string | number
|
|
250
|
+
</td>
|
|
251
|
+
<td className="px-6 py-4 text-sm !text-white/50">
|
|
252
|
+
1.5
|
|
253
|
+
</td>
|
|
254
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
255
|
+
Width of the stroke
|
|
256
|
+
</td>
|
|
257
|
+
</tr>
|
|
258
|
+
<tr className="border-b border-white/5">
|
|
259
|
+
<td className="px-6 py-4 font-mono text-sm !text-yellow-300">
|
|
260
|
+
strokeLinecap
|
|
261
|
+
</td>
|
|
262
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
263
|
+
string
|
|
264
|
+
</td>
|
|
265
|
+
<td className="px-6 py-4 text-sm !text-white/50">
|
|
266
|
+
square
|
|
267
|
+
</td>
|
|
268
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
269
|
+
Style of line endings
|
|
270
|
+
</td>
|
|
271
|
+
</tr>
|
|
272
|
+
<tr className="border-b border-white/5 !bg-black/10">
|
|
273
|
+
<td className="px-6 py-4 font-mono text-sm !text-yellow-300">
|
|
274
|
+
className
|
|
275
|
+
</td>
|
|
276
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
277
|
+
string
|
|
278
|
+
</td>
|
|
279
|
+
<td className="px-6 py-4 text-sm !text-white/50">-</td>
|
|
280
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
281
|
+
CSS classes for styling (use for overrides)
|
|
282
|
+
</td>
|
|
283
|
+
</tr>
|
|
284
|
+
<tr className="!bg-black/10">
|
|
285
|
+
<td className="px-6 py-4 font-mono text-sm !text-yellow-300">
|
|
286
|
+
...svgProps
|
|
287
|
+
</td>
|
|
288
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
289
|
+
SVGProps
|
|
290
|
+
</td>
|
|
291
|
+
<td className="px-6 py-4 text-sm !text-white/50">-</td>
|
|
292
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
293
|
+
All standard SVG element props
|
|
294
|
+
</td>
|
|
295
|
+
</tr>
|
|
296
|
+
</tbody>
|
|
297
|
+
</table>
|
|
298
|
+
</div>
|
|
299
|
+
</div>
|
|
300
|
+
|
|
301
|
+
{/* Size Variations */}
|
|
302
|
+
<div className="!space-y-8">
|
|
303
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
304
|
+
Size Variations
|
|
305
|
+
</h2>
|
|
306
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-8">
|
|
307
|
+
<div className="!space-y-6">
|
|
308
|
+
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
|
|
309
|
+
<div className="!space-y-4">
|
|
310
|
+
<h3 className="text-lg font-semibold !text-yellow-300">
|
|
311
|
+
Standard Sizes
|
|
312
|
+
</h3>
|
|
313
|
+
<div className="flex items-end gap-6 rounded-lg bg-black/20 p-6">
|
|
314
|
+
<div className="text-center">
|
|
315
|
+
<WarningIcon className="!mx-auto mb-2 h-3 w-3 text-yellow-400" />
|
|
316
|
+
<span className="text-xs text-white/60">12px</span>
|
|
317
|
+
</div>
|
|
318
|
+
<div className="text-center">
|
|
319
|
+
<WarningIcon className="!mx-auto mb-2 h-4 w-4 text-yellow-400" />
|
|
320
|
+
<span className="text-xs text-white/60">16px</span>
|
|
321
|
+
</div>
|
|
322
|
+
<div className="text-center">
|
|
323
|
+
<WarningIcon className="!mx-auto mb-2 h-5 w-5 text-yellow-400" />
|
|
324
|
+
<span className="text-xs text-white/60">20px</span>
|
|
325
|
+
</div>
|
|
326
|
+
<div className="text-center">
|
|
327
|
+
<WarningIcon className="!mx-auto mb-2 h-6 w-6 text-yellow-400" />
|
|
328
|
+
<span className="text-xs text-white/60">24px</span>
|
|
329
|
+
</div>
|
|
330
|
+
<div className="text-center">
|
|
331
|
+
<WarningIcon className="!mx-auto mb-2 h-8 w-8 text-yellow-400" />
|
|
332
|
+
<span className="text-xs text-white/60">32px</span>
|
|
333
|
+
</div>
|
|
334
|
+
<div className="text-center">
|
|
335
|
+
<WarningIcon className="!mx-auto mb-2 h-12 w-12 text-yellow-400" />
|
|
336
|
+
<span className="text-xs text-white/60">48px</span>
|
|
337
|
+
</div>
|
|
338
|
+
</div>
|
|
339
|
+
</div>
|
|
340
|
+
|
|
341
|
+
<div className="!space-y-4">
|
|
342
|
+
<h3 className="text-lg font-semibold !text-yellow-300">
|
|
343
|
+
Code Example
|
|
344
|
+
</h3>
|
|
345
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
346
|
+
<pre className="overflow-x-auto text-sm !text-cyan-300">
|
|
347
|
+
{`// Small (16px) - inline warnings
|
|
348
|
+
<WarningIcon className="h-4 w-4" />
|
|
349
|
+
|
|
350
|
+
// Medium (24px) - form validation
|
|
351
|
+
<WarningIcon className="h-6 w-6" />
|
|
352
|
+
|
|
353
|
+
// Large (32px) - alert banners
|
|
354
|
+
<WarningIcon className="h-8 w-8" />
|
|
355
|
+
|
|
356
|
+
// Custom size
|
|
357
|
+
<WarningIcon width={40} height={40} />`}
|
|
358
|
+
</pre>
|
|
359
|
+
</div>
|
|
360
|
+
</div>
|
|
361
|
+
</div>
|
|
362
|
+
</div>
|
|
363
|
+
</div>
|
|
364
|
+
</div>
|
|
365
|
+
|
|
366
|
+
{/* Color Variations */}
|
|
367
|
+
<div className="!space-y-8">
|
|
368
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
369
|
+
Color Variations
|
|
370
|
+
</h2>
|
|
371
|
+
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
372
|
+
<div className="!space-y-4">
|
|
373
|
+
<h3 className="text-lg font-semibold !text-yellow-300">
|
|
374
|
+
Semantic Colors
|
|
375
|
+
</h3>
|
|
376
|
+
<div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
377
|
+
<div className="flex items-center gap-4">
|
|
378
|
+
<WarningIcon className="h-6 w-6 text-yellow-400" />
|
|
379
|
+
<div>
|
|
380
|
+
<div className="text-sm font-medium text-white">
|
|
381
|
+
Warning
|
|
382
|
+
</div>
|
|
383
|
+
<div className="text-xs text-white/60">
|
|
384
|
+
text-yellow-400
|
|
385
|
+
</div>
|
|
386
|
+
</div>
|
|
387
|
+
</div>
|
|
388
|
+
<div className="flex items-center gap-4">
|
|
389
|
+
<WarningIcon className="h-6 w-6 text-amber-400" />
|
|
390
|
+
<div>
|
|
391
|
+
<div className="text-sm font-medium text-white">
|
|
392
|
+
Caution
|
|
393
|
+
</div>
|
|
394
|
+
<div className="text-xs text-white/60">
|
|
395
|
+
text-amber-400
|
|
396
|
+
</div>
|
|
397
|
+
</div>
|
|
398
|
+
</div>
|
|
399
|
+
<div className="flex items-center gap-4">
|
|
400
|
+
<WarningIcon className="h-6 w-6 text-orange-400" />
|
|
401
|
+
<div>
|
|
402
|
+
<div className="text-sm font-medium text-white">
|
|
403
|
+
Alert
|
|
404
|
+
</div>
|
|
405
|
+
<div className="text-xs text-white/60">
|
|
406
|
+
text-orange-400
|
|
407
|
+
</div>
|
|
408
|
+
</div>
|
|
409
|
+
</div>
|
|
410
|
+
<div className="flex items-center gap-4">
|
|
411
|
+
<WarningIcon className="h-6 w-6 text-red-400" />
|
|
412
|
+
<div>
|
|
413
|
+
<div className="text-sm font-medium text-white">
|
|
414
|
+
Critical
|
|
415
|
+
</div>
|
|
416
|
+
<div className="text-xs text-white/60">
|
|
417
|
+
text-red-400
|
|
418
|
+
</div>
|
|
419
|
+
</div>
|
|
420
|
+
</div>
|
|
421
|
+
</div>
|
|
422
|
+
</div>
|
|
423
|
+
|
|
424
|
+
<div className="!space-y-4">
|
|
425
|
+
<h3 className="text-lg font-semibold !text-yellow-300">
|
|
426
|
+
Custom Colors
|
|
427
|
+
</h3>
|
|
428
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
429
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
430
|
+
{`// Using Tailwind classes
|
|
431
|
+
<WarningIcon className="h-6 w-6 text-yellow-400" />
|
|
432
|
+
<WarningIcon className="h-6 w-6 text-amber-500" />
|
|
433
|
+
|
|
434
|
+
// Using CSS custom properties
|
|
435
|
+
<WarningIcon
|
|
436
|
+
className="h-6 w-6"
|
|
437
|
+
style={{ color: 'var(--color-warning)' }}
|
|
438
|
+
/>
|
|
439
|
+
|
|
440
|
+
// Direct stroke prop
|
|
441
|
+
<WarningIcon
|
|
442
|
+
width={24}
|
|
443
|
+
height={24}
|
|
444
|
+
stroke="#eab308"
|
|
445
|
+
/>`}
|
|
446
|
+
</pre>
|
|
447
|
+
</div>
|
|
448
|
+
</div>
|
|
449
|
+
</div>
|
|
450
|
+
</div>
|
|
451
|
+
|
|
452
|
+
{/* Usage Examples */}
|
|
453
|
+
<div className="!space-y-8">
|
|
454
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
455
|
+
Usage Examples
|
|
456
|
+
</h2>
|
|
457
|
+
|
|
458
|
+
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
459
|
+
{/* Form Validation */}
|
|
460
|
+
<div className="!space-y-4">
|
|
461
|
+
<h3 className="text-lg font-semibold !text-yellow-300">
|
|
462
|
+
Form Validation
|
|
463
|
+
</h3>
|
|
464
|
+
<div className="!space-y-4">
|
|
465
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-6">
|
|
466
|
+
<div className="!space-y-4">
|
|
467
|
+
<div>
|
|
468
|
+
<label className="mb-2 block text-sm font-medium text-white">
|
|
469
|
+
Email Address
|
|
470
|
+
</label>
|
|
471
|
+
<input
|
|
472
|
+
type="email"
|
|
473
|
+
className="w-full rounded-lg border border-red-400/50 bg-white/10 p-3 text-white placeholder-white/50"
|
|
474
|
+
placeholder="Enter your email"
|
|
475
|
+
/>
|
|
476
|
+
<div className="mt-2 flex items-center gap-2 text-red-400">
|
|
477
|
+
<WarningIcon className="h-4 w-4" />
|
|
478
|
+
<span className="text-sm">
|
|
479
|
+
Please enter a valid email address
|
|
480
|
+
</span>
|
|
481
|
+
</div>
|
|
482
|
+
</div>
|
|
483
|
+
<div>
|
|
484
|
+
<label className="mb-2 block text-sm font-medium text-white">
|
|
485
|
+
Password
|
|
486
|
+
</label>
|
|
487
|
+
<input
|
|
488
|
+
type="password"
|
|
489
|
+
className="w-full rounded-lg border border-yellow-400/50 bg-white/10 p-3 text-white placeholder-white/50"
|
|
490
|
+
placeholder="Enter your password"
|
|
491
|
+
/>
|
|
492
|
+
<div className="mt-2 flex items-center gap-2 text-yellow-400">
|
|
493
|
+
<WarningIcon className="h-4 w-4" />
|
|
494
|
+
<span className="text-sm">
|
|
495
|
+
Password must be at least 8 characters
|
|
496
|
+
</span>
|
|
497
|
+
</div>
|
|
498
|
+
</div>
|
|
499
|
+
</div>
|
|
500
|
+
</div>
|
|
501
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
502
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
503
|
+
{`// Form validation with warning icon
|
|
504
|
+
<div className="field-error">
|
|
505
|
+
<div className="flex items-center gap-2 text-red-400">
|
|
506
|
+
<WarningIcon className="h-4 w-4" />
|
|
507
|
+
<span>Please enter a valid email address</span>
|
|
508
|
+
</div>
|
|
509
|
+
</div>
|
|
510
|
+
|
|
511
|
+
// Inline validation warning
|
|
512
|
+
<div className="field-warning">
|
|
513
|
+
<div className="flex items-center gap-2 text-yellow-400">
|
|
514
|
+
<WarningIcon className="h-4 w-4" />
|
|
515
|
+
<span>Password must be at least 8 characters</span>
|
|
516
|
+
</div>
|
|
517
|
+
</div>`}
|
|
518
|
+
</pre>
|
|
519
|
+
</div>
|
|
520
|
+
</div>
|
|
521
|
+
</div>
|
|
522
|
+
|
|
523
|
+
{/* Alert Banners */}
|
|
524
|
+
<div className="!space-y-4">
|
|
525
|
+
<h3 className="text-lg font-semibold !text-yellow-300">
|
|
526
|
+
Alert Banners
|
|
527
|
+
</h3>
|
|
528
|
+
<div className="!space-y-4">
|
|
529
|
+
<div className="!space-y-3">
|
|
530
|
+
<div className="flex items-center gap-3 rounded-lg border border-yellow-400/30 bg-yellow-400/10 p-4">
|
|
531
|
+
<WarningIcon className="h-6 w-6 flex-shrink-0 text-yellow-400" />
|
|
532
|
+
<div>
|
|
533
|
+
<div className="font-medium text-yellow-200">
|
|
534
|
+
System Maintenance
|
|
535
|
+
</div>
|
|
536
|
+
<div className="text-sm text-yellow-300/70">
|
|
537
|
+
Scheduled maintenance will occur tonight from 2-4
|
|
538
|
+
AM EST.
|
|
539
|
+
</div>
|
|
540
|
+
</div>
|
|
541
|
+
</div>
|
|
542
|
+
<div className="flex items-center gap-3 rounded-lg border border-red-400/30 bg-red-400/10 p-4">
|
|
543
|
+
<WarningIcon className="h-6 w-6 flex-shrink-0 text-red-400" />
|
|
544
|
+
<div>
|
|
545
|
+
<div className="font-medium text-red-200">
|
|
546
|
+
Service Disruption
|
|
547
|
+
</div>
|
|
548
|
+
<div className="text-sm text-red-300/70">
|
|
549
|
+
We're experiencing issues with our payment system.
|
|
550
|
+
Please try again later.
|
|
551
|
+
</div>
|
|
552
|
+
</div>
|
|
553
|
+
</div>
|
|
554
|
+
<div className="flex items-center gap-3 rounded-lg border border-orange-400/30 bg-orange-400/10 p-4">
|
|
555
|
+
<WarningIcon className="h-6 w-6 flex-shrink-0 text-orange-400" />
|
|
556
|
+
<div>
|
|
557
|
+
<div className="font-medium text-orange-200">
|
|
558
|
+
Security Alert
|
|
559
|
+
</div>
|
|
560
|
+
<div className="text-sm text-orange-300/70">
|
|
561
|
+
Unusual login activity detected. Please verify
|
|
562
|
+
your account.
|
|
563
|
+
</div>
|
|
564
|
+
</div>
|
|
565
|
+
</div>
|
|
566
|
+
</div>
|
|
567
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
568
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
569
|
+
{`// Alert banner component
|
|
570
|
+
<div className="alert-banner warning">
|
|
571
|
+
<div className="flex items-center gap-3">
|
|
572
|
+
<WarningIcon className="h-6 w-6 text-yellow-400" />
|
|
573
|
+
<div>
|
|
574
|
+
<div className="font-medium">System Maintenance</div>
|
|
575
|
+
<div className="text-sm opacity-70">
|
|
576
|
+
Scheduled maintenance tonight from 2-4 AM EST.
|
|
577
|
+
</div>
|
|
578
|
+
</div>
|
|
579
|
+
</div>
|
|
580
|
+
</div>`}
|
|
581
|
+
</pre>
|
|
582
|
+
</div>
|
|
583
|
+
</div>
|
|
584
|
+
</div>
|
|
585
|
+
|
|
586
|
+
{/* Confirmation Dialogs */}
|
|
587
|
+
<div className="!space-y-4">
|
|
588
|
+
<h3 className="text-lg font-semibold !text-yellow-300">
|
|
589
|
+
Confirmation Dialogs
|
|
590
|
+
</h3>
|
|
591
|
+
<div className="!space-y-4">
|
|
592
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-6">
|
|
593
|
+
<div className="!space-y-4 text-center">
|
|
594
|
+
<div className="!mx-auto flex h-16 w-16 items-center justify-center rounded-full bg-yellow-400/20">
|
|
595
|
+
<WarningIcon className="h-8 w-8 text-yellow-400" />
|
|
596
|
+
</div>
|
|
597
|
+
<div>
|
|
598
|
+
<h3 className="text-lg font-semibold text-white">
|
|
599
|
+
Delete Account
|
|
600
|
+
</h3>
|
|
601
|
+
<p className="mt-2 text-sm text-white/70">
|
|
602
|
+
Are you sure you want to delete your account? This
|
|
603
|
+
action cannot be undone and all your data will be
|
|
604
|
+
permanently removed.
|
|
605
|
+
</p>
|
|
606
|
+
</div>
|
|
607
|
+
<div className="flex justify-center gap-3 pt-4">
|
|
608
|
+
<button className="rounded-lg border border-white/20 px-4 py-2 text-white hover:bg-white/10">
|
|
609
|
+
Cancel
|
|
610
|
+
</button>
|
|
611
|
+
<button className="rounded-lg bg-red-500 px-4 py-2 text-white hover:bg-red-600">
|
|
612
|
+
Delete Account
|
|
613
|
+
</button>
|
|
614
|
+
</div>
|
|
615
|
+
</div>
|
|
616
|
+
</div>
|
|
617
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
618
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
619
|
+
{`// Confirmation dialog with warning
|
|
620
|
+
<div className="confirmation-dialog">
|
|
621
|
+
<div className="icon-container">
|
|
622
|
+
<WarningIcon className="h-8 w-8 text-yellow-400" />
|
|
623
|
+
</div>
|
|
624
|
+
<h3>Delete Account</h3>
|
|
625
|
+
<p>This action cannot be undone...</p>
|
|
626
|
+
<div className="actions">
|
|
627
|
+
<button onClick={cancel}>Cancel</button>
|
|
628
|
+
<button onClick={confirm}>Delete</button>
|
|
629
|
+
</div>
|
|
630
|
+
</div>`}
|
|
631
|
+
</pre>
|
|
632
|
+
</div>
|
|
633
|
+
</div>
|
|
634
|
+
</div>
|
|
635
|
+
|
|
636
|
+
{/* Toast Notifications */}
|
|
637
|
+
<div className="!space-y-4">
|
|
638
|
+
<h3 className="text-lg font-semibold !text-yellow-300">
|
|
639
|
+
Toast Notifications
|
|
640
|
+
</h3>
|
|
641
|
+
<div className="!space-y-4">
|
|
642
|
+
<div className="!space-y-3">
|
|
643
|
+
<div className="flex items-center gap-3 rounded-lg border border-yellow-400/30 bg-yellow-400/10 p-4 shadow-lg">
|
|
644
|
+
<WarningIcon className="h-5 w-5 flex-shrink-0 text-yellow-400" />
|
|
645
|
+
<div className="flex-1">
|
|
646
|
+
<div className="text-sm font-medium text-yellow-200">
|
|
647
|
+
Connection Issue
|
|
648
|
+
</div>
|
|
649
|
+
<div className="text-xs text-yellow-300/70">
|
|
650
|
+
Check your internet connection and try again.
|
|
651
|
+
</div>
|
|
652
|
+
</div>
|
|
653
|
+
<button className="text-yellow-400/60 hover:text-yellow-400">
|
|
654
|
+
<div className="h-4 w-4">×</div>
|
|
655
|
+
</button>
|
|
656
|
+
</div>
|
|
657
|
+
<div className="flex items-center gap-3 rounded-lg border border-amber-400/30 bg-amber-400/10 p-4 shadow-lg">
|
|
658
|
+
<WarningIcon className="h-5 w-5 flex-shrink-0 text-amber-400" />
|
|
659
|
+
<div className="flex-1">
|
|
660
|
+
<div className="text-sm font-medium text-amber-200">
|
|
661
|
+
Storage Almost Full
|
|
662
|
+
</div>
|
|
663
|
+
<div className="text-xs text-amber-300/70">
|
|
664
|
+
You're using 95% of your storage space.
|
|
665
|
+
</div>
|
|
666
|
+
</div>
|
|
667
|
+
<button className="text-amber-400/60 hover:text-amber-400">
|
|
668
|
+
<div className="h-4 w-4">×</div>
|
|
669
|
+
</button>
|
|
670
|
+
</div>
|
|
671
|
+
</div>
|
|
672
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
673
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
674
|
+
{`// Toast notification with warning
|
|
675
|
+
<div className="toast warning">
|
|
676
|
+
<div className="flex items-center gap-3">
|
|
677
|
+
<WarningIcon className="h-5 w-5 text-yellow-400" />
|
|
678
|
+
<div className="flex-1">
|
|
679
|
+
<div className="font-medium">Connection Issue</div>
|
|
680
|
+
<div className="text-sm opacity-70">
|
|
681
|
+
Check your internet connection and try again.
|
|
682
|
+
</div>
|
|
683
|
+
</div>
|
|
684
|
+
<button onClick={dismiss}>×</button>
|
|
685
|
+
</div>
|
|
686
|
+
</div>`}
|
|
687
|
+
</pre>
|
|
688
|
+
</div>
|
|
689
|
+
</div>
|
|
690
|
+
</div>
|
|
691
|
+
</div>
|
|
692
|
+
</div>
|
|
693
|
+
|
|
694
|
+
{/* Accessibility */}
|
|
695
|
+
<div className="!space-y-8">
|
|
696
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
697
|
+
Accessibility Features
|
|
698
|
+
</h2>
|
|
699
|
+
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
|
|
700
|
+
<div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
701
|
+
<h3 className="text-lg font-semibold !text-green-300">
|
|
702
|
+
✅ Built-in Features
|
|
703
|
+
</h3>
|
|
704
|
+
<ul className="!space-y-2 text-sm !text-white/70">
|
|
705
|
+
<li className="!text-white/70">
|
|
706
|
+
Uses Radix UI AccessibleIcon wrapper
|
|
707
|
+
</li>
|
|
708
|
+
<li className="!text-white/70">
|
|
709
|
+
Provides screen reader label "Warning icon"
|
|
710
|
+
</li>
|
|
711
|
+
<li className="!text-white/70">
|
|
712
|
+
Supports keyboard navigation when interactive
|
|
713
|
+
</li>
|
|
714
|
+
<li className="!text-white/70">
|
|
715
|
+
Maintains proper color contrast ratios
|
|
716
|
+
</li>
|
|
717
|
+
<li className="!text-white/70">
|
|
718
|
+
Scales with user's font size preferences
|
|
719
|
+
</li>
|
|
720
|
+
</ul>
|
|
721
|
+
</div>
|
|
722
|
+
|
|
723
|
+
<div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
724
|
+
<h3 className="text-lg font-semibold !text-yellow-300">
|
|
725
|
+
💡 Best Practices
|
|
726
|
+
</h3>
|
|
727
|
+
<ul className="!space-y-2 text-sm text-white/70">
|
|
728
|
+
<li className="!text-white/70">
|
|
729
|
+
Always provide descriptive warning messages
|
|
730
|
+
</li>
|
|
731
|
+
<li className="!text-white/70">
|
|
732
|
+
Use appropriate color combinations for severity
|
|
733
|
+
</li>
|
|
734
|
+
<li className="!text-white/70">
|
|
735
|
+
Include role="alert" for critical warnings
|
|
736
|
+
</li>
|
|
737
|
+
<li className="!text-white/70">
|
|
738
|
+
Provide alternative text for screen readers
|
|
739
|
+
</li>
|
|
740
|
+
<li className="!text-white/70">
|
|
741
|
+
Consider animation for attention-grabbing alerts
|
|
742
|
+
</li>
|
|
743
|
+
</ul>
|
|
744
|
+
</div>
|
|
745
|
+
</div>
|
|
746
|
+
|
|
747
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-6">
|
|
748
|
+
<h3 className="mb-4 text-lg font-semibold !text-amber-300">
|
|
749
|
+
Proper ARIA Implementation
|
|
750
|
+
</h3>
|
|
751
|
+
<div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
|
|
752
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
753
|
+
<pre className="overflow-x-auto text-sm !text-cyan-300">
|
|
754
|
+
{`// Alert banner with proper ARIA
|
|
755
|
+
<div
|
|
756
|
+
role="alert"
|
|
757
|
+
aria-describedby="warning-message"
|
|
758
|
+
className="alert-banner"
|
|
759
|
+
>
|
|
760
|
+
<WarningIcon className="h-6 w-6 text-yellow-400" />
|
|
761
|
+
<div id="warning-message">
|
|
762
|
+
System maintenance scheduled for tonight.
|
|
763
|
+
</div>
|
|
764
|
+
</div>
|
|
765
|
+
|
|
766
|
+
// Form validation with ARIA
|
|
767
|
+
<div className="field-container">
|
|
768
|
+
<input
|
|
769
|
+
aria-invalid="true"
|
|
770
|
+
aria-describedby="email-error"
|
|
771
|
+
/>
|
|
772
|
+
<div id="email-error" role="alert">
|
|
773
|
+
<WarningIcon className="h-4 w-4" />
|
|
774
|
+
Please enter a valid email address
|
|
775
|
+
</div>
|
|
776
|
+
</div>
|
|
777
|
+
|
|
778
|
+
// Confirmation dialog with ARIA
|
|
779
|
+
<div
|
|
780
|
+
role="dialog"
|
|
781
|
+
aria-labelledby="dialog-title"
|
|
782
|
+
aria-describedby="dialog-description"
|
|
783
|
+
>
|
|
784
|
+
<WarningIcon className="h-8 w-8" />
|
|
785
|
+
<h3 id="dialog-title">Delete Account</h3>
|
|
786
|
+
<p id="dialog-description">
|
|
787
|
+
This action cannot be undone...
|
|
788
|
+
</p>
|
|
789
|
+
</div>`}
|
|
790
|
+
</pre>
|
|
791
|
+
</div>
|
|
792
|
+
<div className="!space-y-4">
|
|
793
|
+
<p className="text-sm !text-white/70">
|
|
794
|
+
When using WarningIcon for alerts and warnings, always
|
|
795
|
+
provide proper ARIA roles and descriptive text to ensure
|
|
796
|
+
screen reader users understand the importance and
|
|
797
|
+
context.
|
|
798
|
+
</p>
|
|
799
|
+
<div className="rounded-lg border border-yellow-500/20 bg-yellow-500/10 p-4">
|
|
800
|
+
<div className="flex items-center gap-2 text-sm text-yellow-200">
|
|
801
|
+
<WarningIcon className="h-4 w-4" />
|
|
802
|
+
<span>
|
|
803
|
+
Critical warnings should use role="alert" for
|
|
804
|
+
immediate announcement
|
|
805
|
+
</span>
|
|
806
|
+
</div>
|
|
807
|
+
</div>
|
|
808
|
+
</div>
|
|
809
|
+
</div>
|
|
810
|
+
</div>
|
|
811
|
+
</div>
|
|
812
|
+
|
|
813
|
+
{/* Related Icons */}
|
|
814
|
+
<div className="!space-y-8">
|
|
815
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
816
|
+
Related Icons
|
|
817
|
+
</h2>
|
|
818
|
+
<div className="grid grid-cols-2 gap-6 md:grid-cols-4">
|
|
819
|
+
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
820
|
+
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-red-500/20">
|
|
821
|
+
<span className="!text-2xl !text-white">❌</span>
|
|
822
|
+
</div>
|
|
823
|
+
<div>
|
|
824
|
+
<div className="font-medium text-white">ErrorIcon</div>
|
|
825
|
+
<div className="text-xs text-white/60">Error states</div>
|
|
826
|
+
</div>
|
|
827
|
+
</div>
|
|
828
|
+
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
829
|
+
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-green-500/20">
|
|
830
|
+
<span className="!text-2xl !text-white">✓</span>
|
|
831
|
+
</div>
|
|
832
|
+
<div>
|
|
833
|
+
<div className="font-medium text-white">SuccessIcon</div>
|
|
834
|
+
<div className="text-xs text-white/60">
|
|
835
|
+
Success states
|
|
836
|
+
</div>
|
|
837
|
+
</div>
|
|
838
|
+
</div>
|
|
839
|
+
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
840
|
+
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-blue-500/20">
|
|
841
|
+
<span className="!text-2xl !text-white">ℹ</span>
|
|
842
|
+
</div>
|
|
843
|
+
<div>
|
|
844
|
+
<div className="font-medium text-white">InfoIcon</div>
|
|
845
|
+
<div className="text-xs text-white/60">Information</div>
|
|
846
|
+
</div>
|
|
847
|
+
</div>
|
|
848
|
+
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
849
|
+
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-purple-500/20">
|
|
850
|
+
<span className="!text-2xl !text-white">?</span>
|
|
851
|
+
</div>
|
|
852
|
+
<div>
|
|
853
|
+
<div className="font-medium text-white">HelpIcon</div>
|
|
854
|
+
<div className="text-xs text-white/60">
|
|
855
|
+
Help & support
|
|
856
|
+
</div>
|
|
857
|
+
</div>
|
|
858
|
+
</div>
|
|
859
|
+
</div>
|
|
860
|
+
</div>
|
|
861
|
+
</div>
|
|
862
|
+
|
|
863
|
+
{/* Footer */}
|
|
864
|
+
<div className="border-t border-white/10 bg-black/20 backdrop-blur-xl">
|
|
865
|
+
<div className="!mx-auto max-w-7xl px-6 py-8">
|
|
866
|
+
<div className="!space-y-4 text-center">
|
|
867
|
+
<p className="!text-white/60">
|
|
868
|
+
WarningIcon is part of the Aural UI icon library, built with
|
|
869
|
+
accessibility and user experience best practices in mind.
|
|
870
|
+
</p>
|
|
871
|
+
<p className="text-sm !text-white/40">
|
|
872
|
+
All icons use Radix UI's AccessibleIcon for screen reader
|
|
873
|
+
compatibility and follow WCAG guidelines for alerts and
|
|
874
|
+
warnings.
|
|
875
|
+
</p>
|
|
876
|
+
</div>
|
|
877
|
+
</div>
|
|
878
|
+
</div>
|
|
879
|
+
</div>
|
|
880
|
+
</>
|
|
881
|
+
),
|
|
882
|
+
},
|
|
883
|
+
},
|
|
884
|
+
tags: ["autodocs"],
|
|
885
|
+
argTypes: {
|
|
886
|
+
width: {
|
|
887
|
+
control: { type: "range", min: 8, max: 96, step: 2 },
|
|
888
|
+
description: "Width of the icon in pixels",
|
|
889
|
+
},
|
|
890
|
+
height: {
|
|
891
|
+
control: { type: "range", min: 8, max: 96, step: 2 },
|
|
892
|
+
description: "Height of the icon in pixels",
|
|
893
|
+
},
|
|
894
|
+
stroke: {
|
|
895
|
+
control: "color",
|
|
896
|
+
description: "Stroke color of the icon",
|
|
897
|
+
},
|
|
898
|
+
strokeWidth: {
|
|
899
|
+
control: { type: "range", min: 0.5, max: 4, step: 0.5 },
|
|
900
|
+
description: "Width of the stroke",
|
|
901
|
+
},
|
|
902
|
+
strokeLinecap: {
|
|
903
|
+
control: { type: "select", options: ["round", "square", "butt"] },
|
|
904
|
+
description: "Style of line endings",
|
|
905
|
+
},
|
|
906
|
+
className: {
|
|
907
|
+
control: "text",
|
|
908
|
+
description: "CSS classes for styling (use for overrides)",
|
|
909
|
+
},
|
|
910
|
+
onClick: {
|
|
911
|
+
action: "clicked",
|
|
912
|
+
description: "Click handler for interactive use",
|
|
913
|
+
},
|
|
914
|
+
},
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
export default meta
|
|
918
|
+
type Story = StoryObj<typeof WarningIcon>
|
|
919
|
+
|
|
920
|
+
// Story parameters for consistent dark theme
|
|
921
|
+
const storyParameters = {
|
|
922
|
+
backgrounds: {
|
|
923
|
+
default: "dark",
|
|
924
|
+
values: [
|
|
925
|
+
{ name: "dark", value: "#0a0a0a" },
|
|
926
|
+
{ name: "darker", value: "#000000" },
|
|
927
|
+
],
|
|
928
|
+
},
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
export const Default: Story = {
|
|
932
|
+
args: {
|
|
933
|
+
className: "h-8 w-8 text-yellow-400",
|
|
934
|
+
},
|
|
935
|
+
parameters: storyParameters,
|
|
936
|
+
render: (args) => (
|
|
937
|
+
<div className="flex h-32 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
|
|
938
|
+
<WarningIcon {...args} />
|
|
939
|
+
</div>
|
|
940
|
+
),
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
export const SizeVariations: Story = {
|
|
944
|
+
parameters: {
|
|
945
|
+
...storyParameters,
|
|
946
|
+
docs: {
|
|
947
|
+
description: {
|
|
948
|
+
story:
|
|
949
|
+
"WarningIcon in different sizes, from small inline warnings to large alert banners.",
|
|
950
|
+
},
|
|
951
|
+
},
|
|
952
|
+
},
|
|
953
|
+
render: () => (
|
|
954
|
+
<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">
|
|
955
|
+
<div className="text-center">
|
|
956
|
+
<WarningIcon className="!mx-auto mb-2 h-3 w-3 text-yellow-400" />
|
|
957
|
+
<span className="text-xs text-white/60">12px</span>
|
|
958
|
+
</div>
|
|
959
|
+
<div className="text-center">
|
|
960
|
+
<WarningIcon className="!mx-auto mb-2 h-4 w-4 text-yellow-400" />
|
|
961
|
+
<span className="text-xs text-white/60">16px</span>
|
|
962
|
+
</div>
|
|
963
|
+
<div className="text-center">
|
|
964
|
+
<WarningIcon className="!mx-auto mb-2 h-5 w-5 text-yellow-400" />
|
|
965
|
+
<span className="text-xs text-white/60">20px</span>
|
|
966
|
+
</div>
|
|
967
|
+
<div className="text-center">
|
|
968
|
+
<WarningIcon className="!mx-auto mb-2 h-6 w-6 text-yellow-400" />
|
|
969
|
+
<span className="text-xs text-white/60">24px</span>
|
|
970
|
+
</div>
|
|
971
|
+
<div className="text-center">
|
|
972
|
+
<WarningIcon className="!mx-auto mb-2 h-8 w-8 text-yellow-400" />
|
|
973
|
+
<span className="text-xs text-white/60">32px</span>
|
|
974
|
+
</div>
|
|
975
|
+
<div className="text-center">
|
|
976
|
+
<WarningIcon className="!mx-auto mb-2 h-12 w-12 text-yellow-400" />
|
|
977
|
+
<span className="text-xs text-white/60">48px</span>
|
|
978
|
+
</div>
|
|
979
|
+
</div>
|
|
980
|
+
),
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
export const ColorVariations: Story = {
|
|
984
|
+
parameters: {
|
|
985
|
+
...storyParameters,
|
|
986
|
+
docs: {
|
|
987
|
+
description: {
|
|
988
|
+
story:
|
|
989
|
+
"WarningIcon in different semantic colors for various warning severities.",
|
|
990
|
+
},
|
|
991
|
+
},
|
|
992
|
+
},
|
|
993
|
+
render: () => (
|
|
994
|
+
<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">
|
|
995
|
+
<div className="text-center">
|
|
996
|
+
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-yellow-500/30 bg-yellow-500/20">
|
|
997
|
+
<WarningIcon className="h-8 w-8 text-yellow-400" />
|
|
998
|
+
</div>
|
|
999
|
+
<div className="text-sm font-medium text-white">Warning</div>
|
|
1000
|
+
<div className="text-xs text-yellow-400">text-yellow-400</div>
|
|
1001
|
+
</div>
|
|
1002
|
+
<div className="text-center">
|
|
1003
|
+
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-amber-500/30 bg-amber-500/20">
|
|
1004
|
+
<WarningIcon className="h-8 w-8 text-amber-400" />
|
|
1005
|
+
</div>
|
|
1006
|
+
<div className="text-sm font-medium text-white">Caution</div>
|
|
1007
|
+
<div className="text-xs text-amber-400">text-amber-400</div>
|
|
1008
|
+
</div>
|
|
1009
|
+
<div className="text-center">
|
|
1010
|
+
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-orange-500/30 bg-orange-500/20">
|
|
1011
|
+
<WarningIcon className="h-8 w-8 text-orange-400" />
|
|
1012
|
+
</div>
|
|
1013
|
+
<div className="text-sm font-medium text-white">Alert</div>
|
|
1014
|
+
<div className="text-xs text-orange-400">text-orange-400</div>
|
|
1015
|
+
</div>
|
|
1016
|
+
<div className="text-center">
|
|
1017
|
+
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-red-500/30 bg-red-500/20">
|
|
1018
|
+
<WarningIcon className="h-8 w-8 text-red-400" />
|
|
1019
|
+
</div>
|
|
1020
|
+
<div className="text-sm font-medium text-white">Critical</div>
|
|
1021
|
+
<div className="text-xs text-red-400">text-red-400</div>
|
|
1022
|
+
</div>
|
|
1023
|
+
</div>
|
|
1024
|
+
),
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
export const UsageExamples: Story = {
|
|
1028
|
+
parameters: {
|
|
1029
|
+
...storyParameters,
|
|
1030
|
+
docs: {
|
|
1031
|
+
description: {
|
|
1032
|
+
story:
|
|
1033
|
+
"Real-world usage examples showing WarningIcon in different UI contexts.",
|
|
1034
|
+
},
|
|
1035
|
+
},
|
|
1036
|
+
},
|
|
1037
|
+
render: () => (
|
|
1038
|
+
<div className="min-h-dvh !space-y-8 rounded-lg bg-gradient-to-br from-gray-900 to-gray-800 p-8">
|
|
1039
|
+
{/* Form Validation */}
|
|
1040
|
+
<div className="!space-y-2">
|
|
1041
|
+
<h3 className="text-sm font-medium text-white">Form Validation</h3>
|
|
1042
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-6">
|
|
1043
|
+
<div className="!space-y-4">
|
|
1044
|
+
<div>
|
|
1045
|
+
<label className="mb-2 block text-sm font-medium text-white">
|
|
1046
|
+
Email Address
|
|
1047
|
+
</label>
|
|
1048
|
+
<input
|
|
1049
|
+
type="email"
|
|
1050
|
+
className="w-full rounded-lg border border-red-400/50 bg-white/10 p-3 text-white placeholder-white/50"
|
|
1051
|
+
placeholder="Enter your email"
|
|
1052
|
+
/>
|
|
1053
|
+
<div className="mt-2 flex items-center gap-2 text-red-400">
|
|
1054
|
+
<WarningIcon className="h-4 w-4" />
|
|
1055
|
+
<span className="text-sm">
|
|
1056
|
+
Please enter a valid email address
|
|
1057
|
+
</span>
|
|
1058
|
+
</div>
|
|
1059
|
+
</div>
|
|
1060
|
+
</div>
|
|
1061
|
+
</div>
|
|
1062
|
+
</div>
|
|
1063
|
+
|
|
1064
|
+
{/* Alert Banner */}
|
|
1065
|
+
<div className="!space-y-2">
|
|
1066
|
+
<h3 className="text-sm font-medium text-white">Alert Banner</h3>
|
|
1067
|
+
<div className="flex items-center gap-3 rounded-lg border border-yellow-400/30 bg-yellow-400/10 p-4">
|
|
1068
|
+
<WarningIcon className="h-6 w-6 flex-shrink-0 text-yellow-400" />
|
|
1069
|
+
<div>
|
|
1070
|
+
<div className="font-medium text-yellow-200">
|
|
1071
|
+
System Maintenance
|
|
1072
|
+
</div>
|
|
1073
|
+
<div className="text-sm text-yellow-300/70">
|
|
1074
|
+
Scheduled maintenance will occur tonight from 2-4 AM EST.
|
|
1075
|
+
</div>
|
|
1076
|
+
</div>
|
|
1077
|
+
</div>
|
|
1078
|
+
</div>
|
|
1079
|
+
</div>
|
|
1080
|
+
),
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
export const Playground: Story = {
|
|
1084
|
+
parameters: {
|
|
1085
|
+
...storyParameters,
|
|
1086
|
+
docs: {
|
|
1087
|
+
description: {
|
|
1088
|
+
story:
|
|
1089
|
+
"Interactive playground to experiment with different WarningIcon configurations.",
|
|
1090
|
+
},
|
|
1091
|
+
},
|
|
1092
|
+
},
|
|
1093
|
+
args: {
|
|
1094
|
+
width: 24,
|
|
1095
|
+
height: 24,
|
|
1096
|
+
className: "text-yellow-400",
|
|
1097
|
+
strokeLinecap: "square",
|
|
1098
|
+
},
|
|
1099
|
+
render: (args) => (
|
|
1100
|
+
<div className="flex h-64 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
|
|
1101
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-8">
|
|
1102
|
+
<WarningIcon {...args} />
|
|
1103
|
+
</div>
|
|
1104
|
+
</div>
|
|
1105
|
+
),
|
|
1106
|
+
}
|