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,1020 @@
|
|
|
1
|
+
import React from "react"
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
3
|
+
|
|
4
|
+
import { IndianFlagIcon } from "."
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof IndianFlagIcon> = {
|
|
7
|
+
title: "Icons/IndianFlagIcon",
|
|
8
|
+
component: IndianFlagIcon,
|
|
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 !important;
|
|
27
|
+
max-width: none !important;
|
|
28
|
+
background: transparent !important;
|
|
29
|
+
}
|
|
30
|
+
.sbdocs-content {
|
|
31
|
+
max-width: none !important;
|
|
32
|
+
padding: 0 !important;
|
|
33
|
+
margin: 0 !important;
|
|
34
|
+
background: transparent !important;
|
|
35
|
+
}
|
|
36
|
+
.docs-story {
|
|
37
|
+
background: transparent !important;
|
|
38
|
+
}
|
|
39
|
+
.sbdocs {
|
|
40
|
+
background: transparent !important;
|
|
41
|
+
}
|
|
42
|
+
body {
|
|
43
|
+
background: #0a0a0a !important;
|
|
44
|
+
}
|
|
45
|
+
#storybook-docs {
|
|
46
|
+
background: #0a0a0a !important;
|
|
47
|
+
}
|
|
48
|
+
.sbdocs-preview {
|
|
49
|
+
background: transparent !important;
|
|
50
|
+
border: none !important;
|
|
51
|
+
}
|
|
52
|
+
.sbdocs-h1, .sbdocs-h2, .sbdocs-h3, .sbdocs-h4, .sbdocs-h5, .sbdocs-h6 {
|
|
53
|
+
color: white !important;
|
|
54
|
+
}
|
|
55
|
+
.sbdocs-p, .sbdocs-li {
|
|
56
|
+
color: rgba(255, 255, 255, 0.7) !important;
|
|
57
|
+
}
|
|
58
|
+
.sbdocs-code {
|
|
59
|
+
background: rgba(255, 255, 255, 0.1) !important;
|
|
60
|
+
color: rgba(168, 85, 247, 1) !important;
|
|
61
|
+
border: 1px solid rgba(255, 255, 255, 0.1) !important;
|
|
62
|
+
}
|
|
63
|
+
.sbdocs-pre {
|
|
64
|
+
background: rgba(0, 0, 0, 0.4) !important;
|
|
65
|
+
border: 1px solid rgba(255, 255, 255, 0.1) !important;
|
|
66
|
+
}
|
|
67
|
+
.sbdocs-table {
|
|
68
|
+
background: rgba(255, 255, 255, 0.05) !important;
|
|
69
|
+
border: 1px solid rgba(255, 255, 255, 0.1) !important;
|
|
70
|
+
}
|
|
71
|
+
.sbdocs-table th {
|
|
72
|
+
background: rgba(255, 255, 255, 0.05) !important;
|
|
73
|
+
color: white !important;
|
|
74
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
|
|
75
|
+
}
|
|
76
|
+
.sbdocs-table td {
|
|
77
|
+
color: rgba(255, 255, 255, 0.7) !important;
|
|
78
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
|
|
79
|
+
}
|
|
80
|
+
`}
|
|
81
|
+
</style>
|
|
82
|
+
|
|
83
|
+
<div className="min-h-screen bg-gradient-to-br from-gray-900 via-orange-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-orange-500/10 via-white/5 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-orange-500/30 bg-gradient-to-br from-orange-500/20 via-white/10 to-green-500/20">
|
|
90
|
+
<IndianFlagIcon className="h-12 w-12" />
|
|
91
|
+
</div>
|
|
92
|
+
<h1 className="!text-fm-primary text-5xl font-bold">
|
|
93
|
+
IndianFlagIcon
|
|
94
|
+
</h1>
|
|
95
|
+
<p className="!mx-auto max-w-3xl text-xl leading-relaxed !text-white/70">
|
|
96
|
+
The Indian national flag icon representing India's
|
|
97
|
+
sovereignty, cultural identity, and national pride. Built
|
|
98
|
+
with accessibility in mind using Radix UI's AccessibleIcon
|
|
99
|
+
wrapper for seamless screen reader support.
|
|
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-orange-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-white">
|
|
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-green-300">
|
|
124
|
+
Flexible
|
|
125
|
+
</div>
|
|
126
|
+
<div className="text-sm text-white/60">
|
|
127
|
+
Customizable styling
|
|
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-orange-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 { IndianFlagIcon } from "@icons/indian-flag-icon"
|
|
150
|
+
|
|
151
|
+
function CountrySelector() {
|
|
152
|
+
return (
|
|
153
|
+
<div className="flex items-center gap-2">
|
|
154
|
+
<IndianFlagIcon className="h-6 w-6" />
|
|
155
|
+
<span>India</span>
|
|
156
|
+
</div>
|
|
157
|
+
)
|
|
158
|
+
}`}
|
|
159
|
+
</pre>
|
|
160
|
+
</div>
|
|
161
|
+
</div>
|
|
162
|
+
|
|
163
|
+
<div className="!space-y-4">
|
|
164
|
+
<h3 className="text-xl font-semibold !text-orange-300">
|
|
165
|
+
Live Preview
|
|
166
|
+
</h3>
|
|
167
|
+
<div className="flex h-32 items-center justify-center rounded-lg border border-white/10 bg-white/5">
|
|
168
|
+
<div className="flex items-center gap-3 rounded-lg border border-orange-500/20 bg-orange-500/10 px-4 py-2">
|
|
169
|
+
<IndianFlagIcon className="h-6 w-6" />
|
|
170
|
+
<span className="text-white">India</span>
|
|
171
|
+
</div>
|
|
172
|
+
</div>
|
|
173
|
+
</div>
|
|
174
|
+
</div>
|
|
175
|
+
</div>
|
|
176
|
+
|
|
177
|
+
{/* Props Documentation */}
|
|
178
|
+
<div className="!space-y-8">
|
|
179
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
180
|
+
Props & Configuration
|
|
181
|
+
</h2>
|
|
182
|
+
|
|
183
|
+
<div className="overflow-hidden rounded-lg border border-white/10 bg-white/5">
|
|
184
|
+
<div className="bg-white/5 p-4">
|
|
185
|
+
<h3 className="text-xl font-semibold !text-white">Props</h3>
|
|
186
|
+
</div>
|
|
187
|
+
<table className="!my-0 w-full">
|
|
188
|
+
<thead className="bg-white/5">
|
|
189
|
+
<tr className="border-b border-white/10">
|
|
190
|
+
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
191
|
+
Prop
|
|
192
|
+
</th>
|
|
193
|
+
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
194
|
+
Type
|
|
195
|
+
</th>
|
|
196
|
+
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
197
|
+
Default
|
|
198
|
+
</th>
|
|
199
|
+
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
200
|
+
Description
|
|
201
|
+
</th>
|
|
202
|
+
</tr>
|
|
203
|
+
</thead>
|
|
204
|
+
<tbody>
|
|
205
|
+
<tr className="border-b border-white/5">
|
|
206
|
+
<td className="px-6 py-4 font-mono text-sm !text-orange-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">22</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-orange-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">15</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-orange-300">
|
|
231
|
+
fill
|
|
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
|
+
Flag pattern
|
|
238
|
+
</td>
|
|
239
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
240
|
+
Uses embedded flag pattern
|
|
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-orange-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
|
|
253
|
+
</td>
|
|
254
|
+
</tr>
|
|
255
|
+
<tr className="!bg-black/10">
|
|
256
|
+
<td className="px-6 py-4 font-mono text-sm !text-orange-300">
|
|
257
|
+
...svgProps
|
|
258
|
+
</td>
|
|
259
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
260
|
+
SVGProps
|
|
261
|
+
</td>
|
|
262
|
+
<td className="px-6 py-4 text-sm !text-white/50">-</td>
|
|
263
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
264
|
+
All standard SVG element props
|
|
265
|
+
</td>
|
|
266
|
+
</tr>
|
|
267
|
+
</tbody>
|
|
268
|
+
</table>
|
|
269
|
+
</div>
|
|
270
|
+
</div>
|
|
271
|
+
|
|
272
|
+
{/* Size Variations */}
|
|
273
|
+
<div className="!space-y-8">
|
|
274
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
275
|
+
Size Variations
|
|
276
|
+
</h2>
|
|
277
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-8">
|
|
278
|
+
<div className="!space-y-6">
|
|
279
|
+
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
|
|
280
|
+
<div className="!space-y-4">
|
|
281
|
+
<h3 className="text-lg font-semibold !text-orange-300">
|
|
282
|
+
Standard Sizes
|
|
283
|
+
</h3>
|
|
284
|
+
<div className="flex items-end gap-6 rounded-lg bg-black/20 p-6">
|
|
285
|
+
<div className="text-center">
|
|
286
|
+
<IndianFlagIcon className="!mx-auto mb-2 h-3 w-3" />
|
|
287
|
+
<span className="text-xs text-white/60">12px</span>
|
|
288
|
+
</div>
|
|
289
|
+
<div className="text-center">
|
|
290
|
+
<IndianFlagIcon className="!mx-auto mb-2 h-4 w-4" />
|
|
291
|
+
<span className="text-xs text-white/60">16px</span>
|
|
292
|
+
</div>
|
|
293
|
+
<div className="text-center">
|
|
294
|
+
<IndianFlagIcon className="!mx-auto mb-2 h-5 w-5" />
|
|
295
|
+
<span className="text-xs text-white/60">20px</span>
|
|
296
|
+
</div>
|
|
297
|
+
<div className="text-center">
|
|
298
|
+
<IndianFlagIcon className="!mx-auto mb-2 h-6 w-6" />
|
|
299
|
+
<span className="text-xs text-white/60">24px</span>
|
|
300
|
+
</div>
|
|
301
|
+
<div className="text-center">
|
|
302
|
+
<IndianFlagIcon className="!mx-auto mb-2 h-8 w-8" />
|
|
303
|
+
<span className="text-xs text-white/60">32px</span>
|
|
304
|
+
</div>
|
|
305
|
+
<div className="text-center">
|
|
306
|
+
<IndianFlagIcon className="!mx-auto mb-2 h-12 w-12" />
|
|
307
|
+
<span className="text-xs text-white/60">48px</span>
|
|
308
|
+
</div>
|
|
309
|
+
</div>
|
|
310
|
+
</div>
|
|
311
|
+
|
|
312
|
+
<div className="!space-y-4">
|
|
313
|
+
<h3 className="text-lg font-semibold !text-orange-300">
|
|
314
|
+
Code Example
|
|
315
|
+
</h3>
|
|
316
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
317
|
+
<pre className="overflow-x-auto text-sm !text-blue-300">
|
|
318
|
+
{`// Small (16px)
|
|
319
|
+
<IndianFlagIcon className="h-4 w-4" />
|
|
320
|
+
|
|
321
|
+
// Medium (24px)
|
|
322
|
+
<IndianFlagIcon className="h-6 w-6" />
|
|
323
|
+
|
|
324
|
+
// Large (32px)
|
|
325
|
+
<IndianFlagIcon className="h-8 w-8" />
|
|
326
|
+
|
|
327
|
+
// Custom size
|
|
328
|
+
<IndianFlagIcon width={40} height={30} />`}
|
|
329
|
+
</pre>
|
|
330
|
+
</div>
|
|
331
|
+
</div>
|
|
332
|
+
</div>
|
|
333
|
+
</div>
|
|
334
|
+
</div>
|
|
335
|
+
</div>
|
|
336
|
+
|
|
337
|
+
{/* Color Variations */}
|
|
338
|
+
<div className="!space-y-8">
|
|
339
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
340
|
+
Color Variations
|
|
341
|
+
</h2>
|
|
342
|
+
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
343
|
+
<div className="!space-y-4">
|
|
344
|
+
<h3 className="text-lg font-semibold !text-orange-300">
|
|
345
|
+
Display Contexts
|
|
346
|
+
</h3>
|
|
347
|
+
<div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
348
|
+
<div className="flex items-center gap-4">
|
|
349
|
+
<IndianFlagIcon className="h-6 w-6" />
|
|
350
|
+
<div>
|
|
351
|
+
<div className="text-sm font-medium text-white">
|
|
352
|
+
Original Colors
|
|
353
|
+
</div>
|
|
354
|
+
<div className="text-xs text-white/60">
|
|
355
|
+
Default flag pattern
|
|
356
|
+
</div>
|
|
357
|
+
</div>
|
|
358
|
+
</div>
|
|
359
|
+
<div className="flex items-center gap-4">
|
|
360
|
+
<div className="rounded bg-white p-1">
|
|
361
|
+
<IndianFlagIcon className="h-5 w-5" />
|
|
362
|
+
</div>
|
|
363
|
+
<div>
|
|
364
|
+
<div className="text-sm font-medium text-white">
|
|
365
|
+
On White Background
|
|
366
|
+
</div>
|
|
367
|
+
<div className="text-xs text-white/60">
|
|
368
|
+
Optimal contrast
|
|
369
|
+
</div>
|
|
370
|
+
</div>
|
|
371
|
+
</div>
|
|
372
|
+
<div className="flex items-center gap-4">
|
|
373
|
+
<div className="rounded bg-gray-100 p-1">
|
|
374
|
+
<IndianFlagIcon className="h-5 w-5" />
|
|
375
|
+
</div>
|
|
376
|
+
<div>
|
|
377
|
+
<div className="text-sm font-medium text-white">
|
|
378
|
+
On Light Background
|
|
379
|
+
</div>
|
|
380
|
+
<div className="text-xs text-white/60">
|
|
381
|
+
Light gray surface
|
|
382
|
+
</div>
|
|
383
|
+
</div>
|
|
384
|
+
</div>
|
|
385
|
+
<div className="flex items-center gap-4">
|
|
386
|
+
<div className="rounded bg-gray-800 p-1">
|
|
387
|
+
<IndianFlagIcon className="h-5 w-5" />
|
|
388
|
+
</div>
|
|
389
|
+
<div>
|
|
390
|
+
<div className="text-sm font-medium text-white">
|
|
391
|
+
On Dark Background
|
|
392
|
+
</div>
|
|
393
|
+
<div className="text-xs text-white/60">
|
|
394
|
+
Dark surface
|
|
395
|
+
</div>
|
|
396
|
+
</div>
|
|
397
|
+
</div>
|
|
398
|
+
</div>
|
|
399
|
+
</div>
|
|
400
|
+
|
|
401
|
+
<div className="!space-y-4">
|
|
402
|
+
<h3 className="text-lg font-semibold !text-orange-300">
|
|
403
|
+
Implementation Notes
|
|
404
|
+
</h3>
|
|
405
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
406
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
407
|
+
{`// Indian flag uses embedded pattern
|
|
408
|
+
// Orange (saffron), White, Green with Ashoka Chakra
|
|
409
|
+
|
|
410
|
+
// Basic usage (maintains original colors)
|
|
411
|
+
<IndianFlagIcon className="h-6 w-6" />
|
|
412
|
+
|
|
413
|
+
// On light backgrounds (recommended)
|
|
414
|
+
<div className="bg-white p-2 rounded">
|
|
415
|
+
<IndianFlagIcon className="h-6 w-6" />
|
|
416
|
+
</div>
|
|
417
|
+
|
|
418
|
+
// Custom sizing with aspect ratio
|
|
419
|
+
<IndianFlagIcon
|
|
420
|
+
width={44}
|
|
421
|
+
height={30}
|
|
422
|
+
className="flex-shrink-0"
|
|
423
|
+
/>`}
|
|
424
|
+
</pre>
|
|
425
|
+
</div>
|
|
426
|
+
</div>
|
|
427
|
+
</div>
|
|
428
|
+
</div>
|
|
429
|
+
|
|
430
|
+
{/* Usage Examples */}
|
|
431
|
+
<div className="!space-y-8">
|
|
432
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
433
|
+
Usage Examples
|
|
434
|
+
</h2>
|
|
435
|
+
|
|
436
|
+
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
437
|
+
{/* Country Selector */}
|
|
438
|
+
<div className="!space-y-4">
|
|
439
|
+
<h3 className="text-lg font-semibold !text-orange-300">
|
|
440
|
+
Country Selector
|
|
441
|
+
</h3>
|
|
442
|
+
<div className="!space-y-4">
|
|
443
|
+
<div className="flex gap-4">
|
|
444
|
+
<button className="flex items-center gap-3 rounded-lg border border-orange-500/20 bg-orange-500/10 px-4 py-2 text-white transition-colors hover:bg-orange-500/20">
|
|
445
|
+
<IndianFlagIcon className="h-5 w-5" />
|
|
446
|
+
India
|
|
447
|
+
</button>
|
|
448
|
+
<div className="flex items-center gap-2 rounded-lg border border-white/20 bg-white/5 px-3 py-2">
|
|
449
|
+
<IndianFlagIcon className="h-4 w-4" />
|
|
450
|
+
<span className="text-sm text-white">IN</span>
|
|
451
|
+
</div>
|
|
452
|
+
</div>
|
|
453
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
454
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
455
|
+
{`// Country selection button
|
|
456
|
+
<button className="flex items-center gap-3 border border-orange-500/20 bg-orange-500/10 px-4 py-2 rounded-lg">
|
|
457
|
+
<IndianFlagIcon className="h-5 w-5" />
|
|
458
|
+
India
|
|
459
|
+
</button>
|
|
460
|
+
|
|
461
|
+
// Country code display
|
|
462
|
+
<div className="flex items-center gap-2 bg-white/5 border border-white/20 px-3 py-2 rounded-lg">
|
|
463
|
+
<IndianFlagIcon className="h-4 w-4" />
|
|
464
|
+
<span className="text-sm">IN</span>
|
|
465
|
+
</div>`}
|
|
466
|
+
</pre>
|
|
467
|
+
</div>
|
|
468
|
+
</div>
|
|
469
|
+
</div>
|
|
470
|
+
|
|
471
|
+
{/* Location Display */}
|
|
472
|
+
<div className="!space-y-4">
|
|
473
|
+
<h3 className="text-lg font-semibold !text-orange-300">
|
|
474
|
+
Location Display
|
|
475
|
+
</h3>
|
|
476
|
+
<div className="!space-y-4">
|
|
477
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-6">
|
|
478
|
+
<div className="flex items-center justify-between">
|
|
479
|
+
<div className="flex items-center gap-4">
|
|
480
|
+
<div className="flex h-10 w-10 items-center justify-center rounded-lg bg-orange-500/20">
|
|
481
|
+
<IndianFlagIcon className="h-6 w-6" />
|
|
482
|
+
</div>
|
|
483
|
+
<div>
|
|
484
|
+
<div className="font-medium text-white">
|
|
485
|
+
Mumbai, India
|
|
486
|
+
</div>
|
|
487
|
+
<div className="text-sm text-white/60">
|
|
488
|
+
Maharashtra, IN
|
|
489
|
+
</div>
|
|
490
|
+
</div>
|
|
491
|
+
</div>
|
|
492
|
+
<div className="text-right">
|
|
493
|
+
<div className="text-sm font-medium text-white">
|
|
494
|
+
UTC +5:30
|
|
495
|
+
</div>
|
|
496
|
+
<div className="text-xs text-white/60">IST</div>
|
|
497
|
+
</div>
|
|
498
|
+
</div>
|
|
499
|
+
</div>
|
|
500
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
501
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
502
|
+
{`<div className="flex items-center justify-between">
|
|
503
|
+
<div className="flex items-center gap-4">
|
|
504
|
+
<div className="flex h-10 w-10 items-center justify-center rounded-lg bg-orange-500/20">
|
|
505
|
+
<IndianFlagIcon className="h-6 w-6" />
|
|
506
|
+
</div>
|
|
507
|
+
<div>
|
|
508
|
+
<div className="font-medium text-white">Mumbai, India</div>
|
|
509
|
+
<div className="text-sm text-white/60">Maharashtra, IN</div>
|
|
510
|
+
</div>
|
|
511
|
+
</div>
|
|
512
|
+
<div className="text-right">
|
|
513
|
+
<div className="text-sm font-medium text-white">UTC +5:30</div>
|
|
514
|
+
<div className="text-xs text-white/60">IST</div>
|
|
515
|
+
</div>
|
|
516
|
+
</div>`}
|
|
517
|
+
</pre>
|
|
518
|
+
</div>
|
|
519
|
+
</div>
|
|
520
|
+
</div>
|
|
521
|
+
|
|
522
|
+
{/* Language Selector */}
|
|
523
|
+
<div className="!space-y-4">
|
|
524
|
+
<h3 className="text-lg font-semibold !text-orange-300">
|
|
525
|
+
Language Selector
|
|
526
|
+
</h3>
|
|
527
|
+
<div className="!space-y-4">
|
|
528
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-6">
|
|
529
|
+
<div className="space-y-3">
|
|
530
|
+
<div className="flex items-center gap-3 rounded-lg bg-white/5 p-3">
|
|
531
|
+
<IndianFlagIcon className="h-5 w-5" />
|
|
532
|
+
<div className="flex-1">
|
|
533
|
+
<div className="text-sm font-medium text-white">
|
|
534
|
+
हिन्दी (Hindi)
|
|
535
|
+
</div>
|
|
536
|
+
<div className="text-xs text-white/60">India</div>
|
|
537
|
+
</div>
|
|
538
|
+
<div className="h-2 w-2 rounded-full bg-orange-400"></div>
|
|
539
|
+
</div>
|
|
540
|
+
<div className="flex items-center gap-3 rounded-lg p-3 hover:bg-white/5">
|
|
541
|
+
<IndianFlagIcon className="h-5 w-5" />
|
|
542
|
+
<div className="flex-1">
|
|
543
|
+
<div className="text-sm font-medium text-white">
|
|
544
|
+
English (India)
|
|
545
|
+
</div>
|
|
546
|
+
<div className="text-xs text-white/60">India</div>
|
|
547
|
+
</div>
|
|
548
|
+
</div>
|
|
549
|
+
</div>
|
|
550
|
+
</div>
|
|
551
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
552
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
553
|
+
{`<div className="flex items-center gap-3 rounded-lg bg-white/5 p-3">
|
|
554
|
+
<IndianFlagIcon className="h-5 w-5" />
|
|
555
|
+
<div className="flex-1">
|
|
556
|
+
<div className="text-sm font-medium text-white">हिन्दी (Hindi)</div>
|
|
557
|
+
<div className="text-xs text-white/60">India</div>
|
|
558
|
+
</div>
|
|
559
|
+
<div className="h-2 w-2 rounded-full bg-orange-400"></div>
|
|
560
|
+
</div>`}
|
|
561
|
+
</pre>
|
|
562
|
+
</div>
|
|
563
|
+
</div>
|
|
564
|
+
</div>
|
|
565
|
+
|
|
566
|
+
{/* User Profile */}
|
|
567
|
+
<div className="!space-y-4">
|
|
568
|
+
<h3 className="text-lg font-semibold !text-orange-300">
|
|
569
|
+
User Profile
|
|
570
|
+
</h3>
|
|
571
|
+
<div className="!space-y-4">
|
|
572
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-6">
|
|
573
|
+
<div className="text-center">
|
|
574
|
+
<div className="!mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-gradient-to-br from-orange-500/20 to-green-500/20">
|
|
575
|
+
<span className="text-2xl">👤</span>
|
|
576
|
+
</div>
|
|
577
|
+
<h4 className="mb-2 font-medium !text-white">
|
|
578
|
+
Arjun Patel
|
|
579
|
+
</h4>
|
|
580
|
+
<div className="flex items-center justify-center gap-2 text-sm !text-white/70">
|
|
581
|
+
<IndianFlagIcon className="h-4 w-4" />
|
|
582
|
+
<span>Delhi, India</span>
|
|
583
|
+
</div>
|
|
584
|
+
<button className="mt-4 rounded-lg bg-orange-500 px-4 py-2 text-sm text-white transition-colors hover:bg-orange-600">
|
|
585
|
+
View Profile
|
|
586
|
+
</button>
|
|
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
|
+
{`<div className="text-center">
|
|
592
|
+
<div className="mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-gradient-to-br from-orange-500/20 to-green-500/20">
|
|
593
|
+
<span className="text-2xl">👤</span>
|
|
594
|
+
</div>
|
|
595
|
+
<h4 className="mb-2 font-medium text-white">Arjun Patel</h4>
|
|
596
|
+
<div className="flex items-center justify-center gap-2 text-sm text-white/70">
|
|
597
|
+
<IndianFlagIcon className="h-4 w-4" />
|
|
598
|
+
<span>Delhi, India</span>
|
|
599
|
+
</div>
|
|
600
|
+
<button className="mt-4 bg-orange-500 hover:bg-orange-600 px-4 py-2 rounded-lg text-sm text-white">
|
|
601
|
+
View Profile
|
|
602
|
+
</button>
|
|
603
|
+
</div>`}
|
|
604
|
+
</pre>
|
|
605
|
+
</div>
|
|
606
|
+
</div>
|
|
607
|
+
</div>
|
|
608
|
+
</div>
|
|
609
|
+
</div>
|
|
610
|
+
|
|
611
|
+
{/* Accessibility */}
|
|
612
|
+
<div className="!space-y-8">
|
|
613
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
614
|
+
Accessibility Features
|
|
615
|
+
</h2>
|
|
616
|
+
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
|
|
617
|
+
<div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
618
|
+
<h3 className="text-lg font-semibold !text-green-300">
|
|
619
|
+
✅ Built-in Features
|
|
620
|
+
</h3>
|
|
621
|
+
<ul className="!space-y-2 text-sm !text-white/70">
|
|
622
|
+
<li className="!text-white/70">
|
|
623
|
+
Uses Radix UI AccessibleIcon wrapper
|
|
624
|
+
</li>
|
|
625
|
+
<li className="!text-white/70">
|
|
626
|
+
Provides screen reader label "Indian Flag icon"
|
|
627
|
+
</li>
|
|
628
|
+
<li className="!text-white/70">
|
|
629
|
+
Supports keyboard navigation when interactive
|
|
630
|
+
</li>
|
|
631
|
+
<li className="!text-white/70">
|
|
632
|
+
Maintains proper color contrast ratios
|
|
633
|
+
</li>
|
|
634
|
+
<li className="!text-white/70">
|
|
635
|
+
Scales with user's font size preferences
|
|
636
|
+
</li>
|
|
637
|
+
</ul>
|
|
638
|
+
</div>
|
|
639
|
+
|
|
640
|
+
<div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
641
|
+
<h3 className="text-lg font-semibold !text-orange-300">
|
|
642
|
+
💡 Best Practices
|
|
643
|
+
</h3>
|
|
644
|
+
<ul className="!space-y-2 text-sm text-white/70">
|
|
645
|
+
<li className="!text-white/70">
|
|
646
|
+
Always pair with descriptive text for context
|
|
647
|
+
</li>
|
|
648
|
+
<li className="!text-white/70">
|
|
649
|
+
Use light backgrounds for optimal visibility
|
|
650
|
+
</li>
|
|
651
|
+
<li className="!text-white/70">
|
|
652
|
+
Ensure sufficient spacing around the flag
|
|
653
|
+
</li>
|
|
654
|
+
<li className="!text-white/70">
|
|
655
|
+
Add focus states for interactive elements
|
|
656
|
+
</li>
|
|
657
|
+
<li className="!text-white/70">
|
|
658
|
+
Respect flag usage guidelines and cultural sensitivity
|
|
659
|
+
</li>
|
|
660
|
+
</ul>
|
|
661
|
+
</div>
|
|
662
|
+
</div>
|
|
663
|
+
|
|
664
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-6">
|
|
665
|
+
<h3 className="mb-4 text-lg font-semibold !text-purple-300">
|
|
666
|
+
Custom Accessibility Label
|
|
667
|
+
</h3>
|
|
668
|
+
<div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
|
|
669
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
670
|
+
<pre className="overflow-x-auto text-sm !text-blue-300">
|
|
671
|
+
{`// Custom implementation with specific label
|
|
672
|
+
import { AccessibleIcon } from "@radix-ui/react-accessible-icon"
|
|
673
|
+
|
|
674
|
+
function CustomIndianFlagIcon({ label = "India", ...props }) {
|
|
675
|
+
return (
|
|
676
|
+
<AccessibleIcon label={label}>
|
|
677
|
+
<IndianFlagIcon {...props} />
|
|
678
|
+
</AccessibleIcon>
|
|
679
|
+
)
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
// Usage with specific context
|
|
683
|
+
<CustomIndianFlagIcon
|
|
684
|
+
label="Select India as country"
|
|
685
|
+
className="h-5 w-5"
|
|
686
|
+
/>`}
|
|
687
|
+
</pre>
|
|
688
|
+
</div>
|
|
689
|
+
<div className="!space-y-4">
|
|
690
|
+
<p className="text-sm !text-white/70">
|
|
691
|
+
For specific contexts, you can wrap the IndianFlagIcon
|
|
692
|
+
with a custom AccessibleIcon component that provides
|
|
693
|
+
more descriptive labels for country selection or
|
|
694
|
+
geographic identification.
|
|
695
|
+
</p>
|
|
696
|
+
<div className="rounded-lg border border-orange-500/20 bg-orange-500/10 p-4">
|
|
697
|
+
<div className="flex items-center gap-2 text-sm text-orange-200">
|
|
698
|
+
<IndianFlagIcon className="h-4 w-4" />
|
|
699
|
+
<span>
|
|
700
|
+
This approach gives screen readers more context
|
|
701
|
+
</span>
|
|
702
|
+
</div>
|
|
703
|
+
</div>
|
|
704
|
+
</div>
|
|
705
|
+
</div>
|
|
706
|
+
</div>
|
|
707
|
+
</div>
|
|
708
|
+
|
|
709
|
+
{/* Related Icons */}
|
|
710
|
+
<div className="!space-y-8">
|
|
711
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
712
|
+
Related Icons
|
|
713
|
+
</h2>
|
|
714
|
+
<div className="grid grid-cols-2 gap-6 md:grid-cols-4">
|
|
715
|
+
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
716
|
+
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-blue-500/20">
|
|
717
|
+
<span className="text-2xl">🌍</span>
|
|
718
|
+
</div>
|
|
719
|
+
<div>
|
|
720
|
+
<div className="font-medium text-white">GlobeIcon</div>
|
|
721
|
+
<div className="text-xs text-white/60">
|
|
722
|
+
Global locations
|
|
723
|
+
</div>
|
|
724
|
+
</div>
|
|
725
|
+
</div>
|
|
726
|
+
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
727
|
+
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-green-500/20">
|
|
728
|
+
<span className="text-2xl">📍</span>
|
|
729
|
+
</div>
|
|
730
|
+
<div>
|
|
731
|
+
<div className="font-medium text-white">LocationIcon</div>
|
|
732
|
+
<div className="text-xs text-white/60">
|
|
733
|
+
Geographic pins
|
|
734
|
+
</div>
|
|
735
|
+
</div>
|
|
736
|
+
</div>
|
|
737
|
+
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
738
|
+
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-purple-500/20">
|
|
739
|
+
<span className="text-2xl">🗺️</span>
|
|
740
|
+
</div>
|
|
741
|
+
<div>
|
|
742
|
+
<div className="font-medium text-white">MapIcon</div>
|
|
743
|
+
<div className="text-xs text-white/60">
|
|
744
|
+
Maps and navigation
|
|
745
|
+
</div>
|
|
746
|
+
</div>
|
|
747
|
+
</div>
|
|
748
|
+
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
749
|
+
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-orange-500/20">
|
|
750
|
+
<span className="text-2xl">🌐</span>
|
|
751
|
+
</div>
|
|
752
|
+
<div>
|
|
753
|
+
<div className="font-medium text-white">LanguageIcon</div>
|
|
754
|
+
<div className="text-xs text-white/60">
|
|
755
|
+
Language selection
|
|
756
|
+
</div>
|
|
757
|
+
</div>
|
|
758
|
+
</div>
|
|
759
|
+
</div>
|
|
760
|
+
</div>
|
|
761
|
+
</div>
|
|
762
|
+
|
|
763
|
+
{/* Footer */}
|
|
764
|
+
<div className="border-t border-white/10 bg-black/20 backdrop-blur-xl">
|
|
765
|
+
<div className="!mx-auto max-w-7xl px-6 py-8">
|
|
766
|
+
<div className="!space-y-4 text-center">
|
|
767
|
+
<p className="!text-white/60">
|
|
768
|
+
IndianFlagIcon is part of the Aural UI icon library, built
|
|
769
|
+
with accessibility and cultural respect in mind.
|
|
770
|
+
</p>
|
|
771
|
+
<p className="text-sm !text-white/40">
|
|
772
|
+
All icons use Radix UI's AccessibleIcon for screen reader
|
|
773
|
+
compatibility and follow WCAG guidelines.
|
|
774
|
+
</p>
|
|
775
|
+
</div>
|
|
776
|
+
</div>
|
|
777
|
+
</div>
|
|
778
|
+
</div>
|
|
779
|
+
</>
|
|
780
|
+
),
|
|
781
|
+
},
|
|
782
|
+
},
|
|
783
|
+
tags: ["autodocs"],
|
|
784
|
+
argTypes: {
|
|
785
|
+
width: {
|
|
786
|
+
control: { type: "range", min: 8, max: 96, step: 2 },
|
|
787
|
+
description: "Width of the icon in pixels",
|
|
788
|
+
},
|
|
789
|
+
height: {
|
|
790
|
+
control: { type: "range", min: 8, max: 96, step: 2 },
|
|
791
|
+
description: "Height of the icon in pixels",
|
|
792
|
+
},
|
|
793
|
+
className: {
|
|
794
|
+
control: "text",
|
|
795
|
+
description: "CSS classes for styling",
|
|
796
|
+
},
|
|
797
|
+
},
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
export default meta
|
|
801
|
+
type Story = StoryObj<typeof IndianFlagIcon>
|
|
802
|
+
|
|
803
|
+
// Story parameters for consistent dark theme
|
|
804
|
+
const storyParameters = {
|
|
805
|
+
backgrounds: {
|
|
806
|
+
default: "dark",
|
|
807
|
+
values: [
|
|
808
|
+
{ name: "dark", value: "#0a0a0a" },
|
|
809
|
+
{ name: "darker", value: "#000000" },
|
|
810
|
+
],
|
|
811
|
+
},
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
export const Default: Story = {
|
|
815
|
+
args: {
|
|
816
|
+
width: 22,
|
|
817
|
+
height: 15,
|
|
818
|
+
className: "",
|
|
819
|
+
},
|
|
820
|
+
parameters: storyParameters,
|
|
821
|
+
render: (args) => (
|
|
822
|
+
<div className="flex h-32 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
|
|
823
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-4">
|
|
824
|
+
<IndianFlagIcon {...args} />
|
|
825
|
+
</div>
|
|
826
|
+
</div>
|
|
827
|
+
),
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
export const SizeVariations: Story = {
|
|
831
|
+
parameters: {
|
|
832
|
+
...storyParameters,
|
|
833
|
+
docs: {
|
|
834
|
+
description: {
|
|
835
|
+
story:
|
|
836
|
+
"IndianFlagIcon in different sizes, from small UI elements to large country displays.",
|
|
837
|
+
},
|
|
838
|
+
},
|
|
839
|
+
},
|
|
840
|
+
render: () => (
|
|
841
|
+
<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">
|
|
842
|
+
<div className="text-center">
|
|
843
|
+
<div className="!mx-auto mb-2 rounded bg-white p-2">
|
|
844
|
+
<IndianFlagIcon className="h-3 w-3" />
|
|
845
|
+
</div>
|
|
846
|
+
<span className="text-xs text-white/60">12px</span>
|
|
847
|
+
</div>
|
|
848
|
+
<div className="text-center">
|
|
849
|
+
<div className="!mx-auto mb-2 rounded bg-white p-2">
|
|
850
|
+
<IndianFlagIcon className="h-4 w-4" />
|
|
851
|
+
</div>
|
|
852
|
+
<span className="text-xs text-white/60">16px</span>
|
|
853
|
+
</div>
|
|
854
|
+
<div className="text-center">
|
|
855
|
+
<div className="!mx-auto mb-2 rounded bg-white p-2">
|
|
856
|
+
<IndianFlagIcon className="h-5 w-5" />
|
|
857
|
+
</div>
|
|
858
|
+
<span className="text-xs text-white/60">20px</span>
|
|
859
|
+
</div>
|
|
860
|
+
<div className="text-center">
|
|
861
|
+
<div className="!mx-auto mb-2 rounded bg-white p-2">
|
|
862
|
+
<IndianFlagIcon className="h-6 w-6" />
|
|
863
|
+
</div>
|
|
864
|
+
<span className="text-xs text-white/60">24px</span>
|
|
865
|
+
</div>
|
|
866
|
+
<div className="text-center">
|
|
867
|
+
<div className="!mx-auto mb-2 rounded bg-white p-2">
|
|
868
|
+
<IndianFlagIcon className="h-8 w-8" />
|
|
869
|
+
</div>
|
|
870
|
+
<span className="text-xs text-white/60">32px</span>
|
|
871
|
+
</div>
|
|
872
|
+
<div className="text-center">
|
|
873
|
+
<div className="!mx-auto mb-2 rounded bg-white p-3">
|
|
874
|
+
<IndianFlagIcon className="h-12 w-12" />
|
|
875
|
+
</div>
|
|
876
|
+
<span className="text-xs text-white/60">48px</span>
|
|
877
|
+
</div>
|
|
878
|
+
</div>
|
|
879
|
+
),
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
export const ColorVariations: Story = {
|
|
883
|
+
parameters: {
|
|
884
|
+
...storyParameters,
|
|
885
|
+
docs: {
|
|
886
|
+
description: {
|
|
887
|
+
story:
|
|
888
|
+
"IndianFlagIcon shown on different backgrounds to demonstrate optimal usage contexts.",
|
|
889
|
+
},
|
|
890
|
+
},
|
|
891
|
+
},
|
|
892
|
+
render: () => (
|
|
893
|
+
<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">
|
|
894
|
+
<div className="text-center">
|
|
895
|
+
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg bg-white">
|
|
896
|
+
<IndianFlagIcon className="h-10 w-10" />
|
|
897
|
+
</div>
|
|
898
|
+
<div className="text-sm font-medium text-white">White Background</div>
|
|
899
|
+
<div className="text-xs text-white/60">Recommended</div>
|
|
900
|
+
</div>
|
|
901
|
+
<div className="text-center">
|
|
902
|
+
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg bg-gray-100">
|
|
903
|
+
<IndianFlagIcon className="h-10 w-10" />
|
|
904
|
+
</div>
|
|
905
|
+
<div className="text-sm font-medium text-white">Light Background</div>
|
|
906
|
+
<div className="text-xs text-gray-400">Good contrast</div>
|
|
907
|
+
</div>
|
|
908
|
+
<div className="text-center">
|
|
909
|
+
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg bg-gray-800">
|
|
910
|
+
<IndianFlagIcon className="h-10 w-10" />
|
|
911
|
+
</div>
|
|
912
|
+
<div className="text-sm font-medium text-white">Dark Background</div>
|
|
913
|
+
<div className="text-xs text-gray-400">Acceptable</div>
|
|
914
|
+
</div>
|
|
915
|
+
<div className="text-center">
|
|
916
|
+
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-white/20 bg-transparent">
|
|
917
|
+
<IndianFlagIcon className="h-10 w-10" />
|
|
918
|
+
</div>
|
|
919
|
+
<div className="text-sm font-medium text-white">Transparent</div>
|
|
920
|
+
<div className="text-xs text-white/60">Original colors</div>
|
|
921
|
+
</div>
|
|
922
|
+
</div>
|
|
923
|
+
),
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
export const UsageExamples: Story = {
|
|
927
|
+
parameters: {
|
|
928
|
+
...storyParameters,
|
|
929
|
+
docs: {
|
|
930
|
+
description: {
|
|
931
|
+
story:
|
|
932
|
+
"Real-world usage examples showing IndianFlagIcon in different country and location contexts.",
|
|
933
|
+
},
|
|
934
|
+
},
|
|
935
|
+
},
|
|
936
|
+
render: () => (
|
|
937
|
+
<div className="min-h-dvh !space-y-8 rounded-lg bg-gradient-to-br from-gray-900 to-gray-800 p-8">
|
|
938
|
+
{/* Country Selector */}
|
|
939
|
+
<div className="!space-y-2">
|
|
940
|
+
<h3 className="text-sm font-medium text-white">Country Selector</h3>
|
|
941
|
+
<div className="flex gap-4">
|
|
942
|
+
<button className="flex items-center gap-3 rounded-lg border border-orange-500/20 bg-orange-500/10 px-4 py-2 text-white transition-colors hover:bg-orange-500/20">
|
|
943
|
+
<IndianFlagIcon className="h-5 w-5" />
|
|
944
|
+
India
|
|
945
|
+
</button>
|
|
946
|
+
<div className="flex items-center gap-2 rounded-lg border border-white/20 bg-white/5 px-3 py-2">
|
|
947
|
+
<IndianFlagIcon className="h-4 w-4" />
|
|
948
|
+
<span className="text-sm text-white">IN</span>
|
|
949
|
+
</div>
|
|
950
|
+
</div>
|
|
951
|
+
</div>
|
|
952
|
+
|
|
953
|
+
{/* Location Display */}
|
|
954
|
+
<div className="!space-y-2">
|
|
955
|
+
<h3 className="text-sm font-medium text-white">Location Display</h3>
|
|
956
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-6">
|
|
957
|
+
<div className="flex items-center justify-between">
|
|
958
|
+
<div className="flex items-center gap-4">
|
|
959
|
+
<div className="flex h-10 w-10 items-center justify-center rounded-lg bg-orange-500/20">
|
|
960
|
+
<IndianFlagIcon className="h-6 w-6" />
|
|
961
|
+
</div>
|
|
962
|
+
<div>
|
|
963
|
+
<div className="font-medium text-white">Mumbai, India</div>
|
|
964
|
+
<div className="text-sm text-white/60">Maharashtra, IN</div>
|
|
965
|
+
</div>
|
|
966
|
+
</div>
|
|
967
|
+
<div className="text-right">
|
|
968
|
+
<div className="text-sm font-medium text-white">UTC +5:30</div>
|
|
969
|
+
<div className="text-xs text-white/60">IST</div>
|
|
970
|
+
</div>
|
|
971
|
+
</div>
|
|
972
|
+
</div>
|
|
973
|
+
</div>
|
|
974
|
+
|
|
975
|
+
{/* User Profile */}
|
|
976
|
+
<div className="!space-y-2">
|
|
977
|
+
<h3 className="text-sm font-medium text-white">User Profile</h3>
|
|
978
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-6">
|
|
979
|
+
<div className="text-center">
|
|
980
|
+
<div className="!mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-gradient-to-br from-orange-500/20 to-green-500/20">
|
|
981
|
+
<span className="text-2xl">👤</span>
|
|
982
|
+
</div>
|
|
983
|
+
<h4 className="mb-2 font-medium text-white">Arjun Patel</h4>
|
|
984
|
+
<div className="flex items-center justify-center gap-2 text-sm text-white/70">
|
|
985
|
+
<IndianFlagIcon className="h-4 w-4" />
|
|
986
|
+
<span>Delhi, India</span>
|
|
987
|
+
</div>
|
|
988
|
+
<button className="mt-4 rounded-lg bg-orange-500 px-4 py-2 text-sm text-white transition-colors hover:bg-orange-600">
|
|
989
|
+
View Profile
|
|
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 IndianFlagIcon configurations.",
|
|
1005
|
+
},
|
|
1006
|
+
},
|
|
1007
|
+
},
|
|
1008
|
+
args: {
|
|
1009
|
+
width: 32,
|
|
1010
|
+
height: 24,
|
|
1011
|
+
className: "",
|
|
1012
|
+
},
|
|
1013
|
+
render: (args) => (
|
|
1014
|
+
<div className="flex h-64 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
|
|
1015
|
+
<div className="rounded-lg border border-white/10 bg-white p-8">
|
|
1016
|
+
<IndianFlagIcon {...args} />
|
|
1017
|
+
</div>
|
|
1018
|
+
</div>
|
|
1019
|
+
),
|
|
1020
|
+
}
|