aural-ui 3.0.7 → 4.1.0

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.
Files changed (183) hide show
  1. package/dist/components/aspect-ratio/AspectRatio.stories.tsx +290 -1199
  2. package/dist/components/avatar/Avatar.stories.tsx +235 -237
  3. package/dist/components/badge/Badge.stories.tsx +379 -116
  4. package/dist/components/banner/Banner.stories.tsx +445 -391
  5. package/dist/components/breadcrumb/Breadcrumb.stories.tsx +453 -199
  6. package/dist/components/button/Button.stories.tsx +585 -230
  7. package/dist/components/button/index.tsx +7 -7
  8. package/dist/components/card/Card.stories.tsx +619 -301
  9. package/dist/components/char-count/CharCount.stories.tsx +350 -248
  10. package/dist/components/checkbox/Checkbox.stories.tsx +309 -167
  11. package/dist/components/chip/Chip.stories.tsx +362 -168
  12. package/dist/components/circular-loader/CircularLoader.stories.tsx +221 -620
  13. package/dist/components/clamp-lines/ClampLines.stories.tsx +246 -117
  14. package/dist/components/collapsible/Collapsible.stories.tsx +391 -252
  15. package/dist/components/command/Command.stories.tsx +533 -856
  16. package/dist/components/dialog/Dialog.stories.tsx +505 -949
  17. package/dist/components/divider/Divider.stories.tsx +265 -502
  18. package/dist/components/dot-loader/DotLoader.stories.tsx +256 -257
  19. package/dist/components/drawer/Drawer.stories.tsx +659 -993
  20. package/dist/components/drawer/index.tsx +3 -3
  21. package/dist/components/dropdown/Dropdown.stories.tsx +643 -1018
  22. package/dist/components/form/Form.stories.tsx +560 -274
  23. package/dist/components/helper-text/HelperText.stories.tsx +199 -200
  24. package/dist/components/hover-card/HoverCard.stories.tsx +318 -1221
  25. package/dist/components/icon-button/IconButton.stories.tsx +837 -194
  26. package/dist/components/if-else/if-else.stories.tsx +370 -83
  27. package/dist/components/input/Input.stories.tsx +436 -368
  28. package/dist/components/label/Label.stories.tsx +156 -154
  29. package/dist/components/list/List.stories.tsx +485 -822
  30. package/dist/components/marquee/Marquee.stories.tsx +356 -694
  31. package/dist/components/otp-inputs/OtpInputs.stories.tsx +352 -410
  32. package/dist/components/overlay/Overlay.stories.tsx +452 -818
  33. package/dist/components/overlay/index.tsx +4 -4
  34. package/dist/components/pagination/Pagination.stories.tsx +721 -210
  35. package/dist/components/popover/Popover.stories.tsx +484 -873
  36. package/dist/components/radio/Radio.stories.tsx +432 -124
  37. package/dist/components/resizable/Resizable.stories.tsx +496 -752
  38. package/dist/components/scroll-area/ScrollArea.stories.tsx +384 -1006
  39. package/dist/components/search/Search.stories.tsx +314 -575
  40. package/dist/components/select/Select.stories.tsx +684 -787
  41. package/dist/components/sheet/Sheet.stories.tsx +671 -936
  42. package/dist/components/skelton/Skelton.stories.tsx +230 -764
  43. package/dist/components/slider/Slider.stories.tsx +384 -737
  44. package/dist/components/stepper/Stepper.stories.tsx +371 -514
  45. package/dist/components/switch/Switch.stories.tsx +461 -208
  46. package/dist/components/switch-case/SwitchCase.stories.tsx +367 -188
  47. package/dist/components/table/Table.stories.tsx +770 -914
  48. package/dist/components/tabs/Tabs.stories.tsx +459 -1400
  49. package/dist/components/tag/Tag.stories.tsx +714 -542
  50. package/dist/components/textarea/TextArea.stories.tsx +621 -562
  51. package/dist/components/thumbnail-tags/ThumbnailTags.stories.tsx +228 -148
  52. package/dist/components/toast/Toast.stories.tsx +452 -1333
  53. package/dist/components/toggle/Toggle.stories.tsx +488 -909
  54. package/dist/components/tooltip/Tooltip.stories.tsx +344 -1372
  55. package/dist/components/typography/Typography.stories.tsx +406 -89
  56. package/dist/hooks/use-change-state/UseChangeState.stories.tsx +309 -606
  57. package/dist/hooks/use-previous/UsePrevious.stories.tsx +367 -917
  58. package/dist/hooks/use-standalone-pagination/UseStandalonePagination.stories.tsx +639 -867
  59. package/dist/icons/Icons.stories.tsx +0 -12
  60. package/dist/icons/ai-avatar-icon/AiAvatarIcon.stories.tsx +226 -1013
  61. package/dist/icons/alert-icon/AlertIcon.stories.tsx +109 -929
  62. package/dist/icons/all-icons.tsx +124 -87
  63. package/dist/icons/angle-down-icon/AngleDownIcon.stories.tsx +140 -971
  64. package/dist/icons/apple-logo-icon/AppleLogoIcon.stories.tsx +148 -888
  65. package/dist/icons/arrow-box-left-icon/ArrowBoxLeftIcon.stories.tsx +135 -1019
  66. package/dist/icons/arrow-corner-up-left-icon/ArrowCornerUpLeftIcon.stories.tsx +137 -953
  67. package/dist/icons/arrow-corner-up-right-icon/ArrowCornerUpRightIcon.stories.tsx +138 -997
  68. package/dist/icons/arrow-left-icon/ArrowLeftIcon.stories.tsx +136 -942
  69. package/dist/icons/arrow-right-icon/ArrowRightIcon.stories.tsx +148 -1092
  70. package/dist/icons/arrow-right-up-icon/ArrowRightUpIcon.stories.tsx +146 -1211
  71. package/dist/icons/art-board-icon/ArtBoardIcon.stories.tsx +126 -615
  72. package/dist/icons/audio-bar-icon/AudioBarIcon.stories.tsx +144 -1164
  73. package/dist/icons/backward-ten-seconds-icon/BackwardTenSecondsIcon.stories.tsx +167 -985
  74. package/dist/icons/bubble-check-icon/BubbleCheckIcon.stories.tsx +122 -1179
  75. package/dist/icons/bubble-crossed-icon/BubbleCrossedIcon.stories.tsx +124 -1168
  76. package/dist/icons/bubble-sparkle-icon/BubbleSparkleIcon.stories.tsx +119 -850
  77. package/dist/icons/camera-icon/CameraIcon.stories.tsx +112 -1213
  78. package/dist/icons/capital-a-letter-icon/CapitalALetterIcon.stories.tsx +117 -934
  79. package/dist/icons/chevron-double-left-icon/ChevronDoubleLeftIcon.stories.tsx +160 -961
  80. package/dist/icons/chevron-double-right-icon/ChevronDoubleRightIcon.stories.tsx +163 -961
  81. package/dist/icons/chevron-down-icon/ChevronDownIcon.stories.tsx +144 -942
  82. package/dist/icons/chevron-left-icon/ChevronLeftIcon.stories.tsx +129 -966
  83. package/dist/icons/chevron-right-icon/ChevronRightIcon.stories.tsx +147 -964
  84. package/dist/icons/chevron-up-icon/ChevronUpIcon.stories.tsx +145 -975
  85. package/dist/icons/circle-tick-icon/CircleTickIcon.stories.tsx +150 -1142
  86. package/dist/icons/circular-play-icon/CircularPlayIcon.stories.tsx +114 -461
  87. package/dist/icons/coin-icon/CoinIcon.stories.tsx +124 -1322
  88. package/dist/icons/coin-toons-icon/CoinToonsIcon.stories.tsx +117 -1318
  89. package/dist/icons/column-wide-add-icon/ColumnWideAddIcon.stories.tsx +114 -903
  90. package/dist/icons/command-icon/CommandIcon.stories.tsx +127 -1042
  91. package/dist/icons/copy-icon/CopyIcon.stories.tsx +123 -962
  92. package/dist/icons/cross-circle-icon/CrossCircleIcon.stories.tsx +147 -999
  93. package/dist/icons/cross-icon/CrossIcon.stories.tsx +139 -960
  94. package/dist/icons/download-icon/DownloadIcon.stories.tsx +126 -820
  95. package/dist/icons/edit-big-icon/EditBigIcon.stories.tsx +124 -1031
  96. package/dist/icons/email-icon/EmailIcon.stories.tsx +115 -936
  97. package/dist/icons/expand-icon/ExpandIcon.stories.tsx +112 -1111
  98. package/dist/icons/eye-close-icon/EyeCloseIcon.stories.tsx +144 -1025
  99. package/dist/icons/eye-open-icon/EyeOpenIcon.stories.tsx +143 -1036
  100. package/dist/icons/feature-shine-icon/FeatureShineIcon.stories.tsx +127 -1011
  101. package/dist/icons/file-chart-icon/FileChartIcon.stories.tsx +126 -1056
  102. package/dist/icons/file-text-icon/FileTextIcon.stories.tsx +125 -614
  103. package/dist/icons/filter-bar-row-icon/FilterBarRowIcon.stories.tsx +119 -1050
  104. package/dist/icons/forward-ten-seconds-icon/ForwardTenSecondsIcon.stories.tsx +169 -989
  105. package/dist/icons/git-branch-icon/GitBranchIcon.stories.tsx +115 -1145
  106. package/dist/icons/git-fork-icon/GitForkIcon.stories.tsx +115 -1122
  107. package/dist/icons/globe-icon/GlobeIcon.stories.tsx +130 -313
  108. package/dist/icons/google-logo-icon/GoogleLogoIcon.stories.tsx +145 -940
  109. package/dist/icons/grip-vertical-icon/GripVerticalIcon.stories.tsx +119 -1174
  110. package/dist/icons/head-icon/HeadIcon.stories.tsx +111 -916
  111. package/dist/icons/heart-icon/HeartIcon.stories.tsx +120 -1019
  112. package/dist/icons/image-avatar-sparkle-icon/ImageAvatarSparkleIcon.stories.tsx +119 -683
  113. package/dist/icons/image-icon/ImageIcon.stories.tsx +105 -1121
  114. package/dist/icons/import-folder-icon/ImportFolderIcon.stories.tsx +111 -1192
  115. package/dist/icons/import-left-arrow-folder-icon/ImportLeftArrowFolderIcon.stories.tsx +136 -1256
  116. package/dist/icons/indian-flag-icon/IndianFlagIcon.stories.tsx +159 -962
  117. package/dist/icons/instagram-icon/InstagramIcon.stories.tsx +161 -1385
  118. package/dist/icons/layout-column-icon/LayoutColumnIcon.stories.tsx +124 -972
  119. package/dist/icons/layout-left-icon/LayoutLeftIcon.stories.tsx +119 -948
  120. package/dist/icons/layout-right-icon/LayoutRightIcon.stories.tsx +119 -942
  121. package/dist/icons/light-bulb-simple-icon/LightBulbSimpleIcon.stories.tsx +108 -1215
  122. package/dist/icons/linked-in-icon/LinkedInIcon.stories.tsx +154 -1517
  123. package/dist/icons/magic-book-icon/MagicBookIcon.stories.tsx +110 -1188
  124. package/dist/icons/magic-edit-icon/MagicEditIcon.stories.tsx +119 -678
  125. package/dist/icons/maintenance-icon/MaintenanceIcon.stories.tsx +123 -1184
  126. package/dist/icons/message-icon/MessageIcon.stories.tsx +114 -538
  127. package/dist/icons/minimize-icon/MinimizeIcon.stories.tsx +116 -1158
  128. package/dist/icons/moon-icon/MoonIcon.stories.tsx +120 -536
  129. package/dist/icons/move-horizontal-icon/MoveHorizontalIcon.stories.tsx +109 -1184
  130. package/dist/icons/move-vertical-icon/MoveVerticalIcon.stories.tsx +115 -1134
  131. package/dist/icons/musical-note-icon/MusicalNoteIcon.stories.tsx +119 -971
  132. package/dist/icons/notepad-icon/NotepadIcon.stories.tsx +111 -1100
  133. package/dist/icons/notes-icon/NotesIcon.stories.tsx +119 -1101
  134. package/dist/icons/page-search-icon/PageSearchIcon.stories.tsx +109 -1111
  135. package/dist/icons/page-text-icon/PageTextIcon.stories.tsx +122 -684
  136. package/dist/icons/paint-roll-icon/PaintRollIcon.stories.tsx +113 -954
  137. package/dist/icons/paper-plane-icon/PaperPlaneIcon.stories.tsx +112 -877
  138. package/dist/icons/pause-icon/PauseIcon.stories.tsx +113 -1000
  139. package/dist/icons/pencil-icon/PencilIcon.stories.tsx +115 -1070
  140. package/dist/icons/phone-icon/PhoneIcon.stories.tsx +115 -978
  141. package/dist/icons/plus-icon/PlusIcon.stories.tsx +106 -1093
  142. package/dist/icons/pocket-studio-icon/PocketStudioIcon.stories.tsx +107 -829
  143. package/dist/icons/scroll-down-icon/ScrollDownIcon.stories.tsx +102 -469
  144. package/dist/icons/search-icon/SearchIcon.stories.tsx +111 -1124
  145. package/dist/icons/setting-icon/SettingIcon.stories.tsx +107 -970
  146. package/dist/icons/share-icon/ShareIcon.stories.tsx +120 -1025
  147. package/dist/icons/shield-icon/ShieldIcon.stories.tsx +117 -931
  148. package/dist/icons/site-logo-icon/SiteLogoIcon.stories.tsx +137 -1104
  149. package/dist/icons/skip-backward-icon/SkipBackwardIcon.stories.tsx +172 -982
  150. package/dist/icons/skip-forward-icon/SkipForwardIcon.stories.tsx +164 -983
  151. package/dist/icons/sparkles-soft-icon/SparklesSoftIcon.stories.tsx +105 -958
  152. package/dist/icons/spinner-gradient-icon/SpinnerGradientIcon.stories.tsx +158 -580
  153. package/dist/icons/spinner-gradient-icon/index.tsx +6 -1
  154. package/dist/icons/spinner-solid-icon/SpinnerSolidIcon.stories.tsx +158 -587
  155. package/dist/icons/spinner-solid-icon/index.tsx +6 -1
  156. package/dist/icons/spinner-solid-neutral-icon/SpinnerSolidINeutralcon.stories.tsx +146 -682
  157. package/dist/icons/spinner-solid-neutral-icon/index.tsx +1 -1
  158. package/dist/icons/star-icon/StarIcon.stories.tsx +124 -904
  159. package/dist/icons/store-coin-icon/StoreCoinIcon.stories.tsx +112 -964
  160. package/dist/icons/suggestion-icon/SuggestionIcon.stories.tsx +116 -852
  161. package/dist/icons/sun-icon/SunIcon.stories.tsx +120 -831
  162. package/dist/icons/text-color-icon/TextColorIcon.stories.tsx +116 -950
  163. package/dist/icons/text-indicator-icon/TextIndicatorIcon.stories.tsx +123 -980
  164. package/dist/icons/threads-icon/ThreadsIcon.stories.tsx +156 -1427
  165. package/dist/icons/tick-circle-icon/TickCircleIcon.stories.tsx +146 -1142
  166. package/dist/icons/tick-icon/TickIcon.stories.tsx +145 -1276
  167. package/dist/icons/trash-icon/TrashIcon.stories.tsx +108 -933
  168. package/dist/icons/twitter-x-icon/TwitterXIcon.stories.tsx +157 -1402
  169. package/dist/icons/upload-icon/UploadIcon.stories.tsx +115 -889
  170. package/dist/icons/vertical-menu-icon/VerticalMenuIcon.stories.tsx +118 -984
  171. package/dist/icons/video-play-list-icon/VideoPlaylistIcon.stories.tsx +125 -1049
  172. package/dist/icons/voice-playing-icon/VoicePlayingIcon.stories.tsx +123 -1356
  173. package/dist/icons/volume-full-icon/VolumeFullIcon.stories.tsx +110 -1171
  174. package/dist/icons/volume-half-icon/VolumeHalfIcon.stories.tsx +112 -1093
  175. package/dist/icons/volume-off-icon/VolumeOffIcon.stories.tsx +115 -1087
  176. package/dist/icons/warning-icon/WarningIcon.stories.tsx +122 -1046
  177. package/dist/icons/youtube-icon/YoutubeIcon.stories.tsx +161 -936
  178. package/dist/index.cjs +84 -84
  179. package/dist/index.js +84 -84
  180. package/dist/styles/aural-all-theme.css +1222 -0
  181. package/dist/styles/{aural-theme.css → aural-dark-theme.css} +15 -3
  182. package/dist/styles/aural-light-theme.css +1047 -0
  183. package/package.json +1 -1
@@ -1,6 +1,20 @@
1
1
  import React from "react"
2
2
  import type { Meta, StoryObj } from "@storybook/react-vite"
3
3
 
4
+ import { AppleLogoIcon } from "src/ui/icons/apple-logo-icon"
5
+ import { GlobeIcon } from "src/ui/icons/globe-icon"
6
+ import { GoogleLogoIcon } from "src/ui/icons/google-logo-icon"
7
+ import { SiteLogoIcon } from "src/ui/icons/site-logo-icon"
8
+ import {
9
+ IconBrandColors,
10
+ IconDefaultCanvas,
11
+ IconPlaygroundCanvas,
12
+ IconSizeVariations,
13
+ IconUsageCanvas,
14
+ IconUsageSection,
15
+ } from "src/ui/story-spec/icons/icon-story-canvas"
16
+ import { AuralIconDocsPage } from "src/ui/story-spec/icons/icon-story-docs-page"
17
+
4
18
  import { IndianFlagIcon } from "."
5
19
 
6
20
  const meta: Meta<typeof IndianFlagIcon> = {
@@ -11,795 +25,82 @@ const meta: Meta<typeof IndianFlagIcon> = {
11
25
  backgrounds: {
12
26
  default: "dark",
13
27
  values: [
14
- { name: "dark", value: "#0a0a0a" },
15
- { name: "darker", value: "#000000" },
16
- { name: "light", value: "#ffffff" },
28
+ { name: "dark", value: "var(--color-fm-surface-primary)" },
29
+ { name: "darker", value: "var(--color-fm-neutral-0)" },
30
+ { name: "light", value: "var(--color-fm-neutral-1100)" },
17
31
  ],
18
32
  },
19
33
  docs: {
20
34
  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
- {" "}
206
- <tr className="!bg-black/10">
207
- <td className="px-6 py-4 font-mono text-sm !text-blue-300">
208
- withAccessibility
209
- </td>
210
- <td className="px-6 py-4 text-sm !text-white/70">
211
- boolean
212
- </td>
213
- <td className="px-6 py-4 text-sm !text-white/50">
214
- true
215
- </td>
216
- <td className="px-6 py-4 text-sm !text-white/70">
217
- Whether to wrap the icon with accessibility feature
218
- </td>
219
- </tr>
220
- <tr className="border-b border-white/5 !bg-black/10">
221
- <td className="px-6 py-4 font-mono text-sm !text-orange-300">
222
- height
223
- </td>
224
- <td className="px-6 py-4 text-sm !text-white/70">
225
- number | string
226
- </td>
227
- <td className="px-6 py-4 text-sm !text-white/50">15</td>
228
- <td className="px-6 py-4 text-sm !text-white/70">
229
- Height of the icon in pixels
230
- </td>
231
- </tr>
232
- <tr className="border-b border-white/5">
233
- <td className="px-6 py-4 font-mono text-sm !text-orange-300">
234
- fill
235
- </td>
236
- <td className="px-6 py-4 text-sm !text-white/70">
237
- string
238
- </td>
239
- <td className="px-6 py-4 text-sm !text-white/50">
240
- Flag pattern
241
- </td>
242
- <td className="px-6 py-4 text-sm !text-white/70">
243
- Uses embedded flag pattern
244
- </td>
245
- </tr>
246
- <tr className="border-b border-white/5 !bg-black/10">
247
- <td className="px-6 py-4 font-mono text-sm !text-orange-300">
248
- className
249
- </td>
250
- <td className="px-6 py-4 text-sm !text-white/70">
251
- string
252
- </td>
253
- <td className="px-6 py-4 text-sm !text-white/50">-</td>
254
- <td className="px-6 py-4 text-sm !text-white/70">
255
- CSS classes for styling
256
- </td>
257
- </tr>
258
- <tr className="!bg-black/10">
259
- <td className="px-6 py-4 font-mono text-sm !text-orange-300">
260
- ...svgProps
261
- </td>
262
- <td className="px-6 py-4 text-sm !text-white/70">
263
- SVGProps
264
- </td>
265
- <td className="px-6 py-4 text-sm !text-white/50">-</td>
266
- <td className="px-6 py-4 text-sm !text-white/70">
267
- All standard SVG element props
268
- </td>
269
- </tr>
270
- </tbody>
271
- </table>
272
- </div>
273
- </div>
274
-
275
- {/* Size Variations */}
276
- <div className="!space-y-8">
277
- <h2 className="text-center text-3xl font-bold !text-white">
278
- Size Variations
279
- </h2>
280
- <div className="rounded-lg border border-white/10 bg-white/5 p-8">
281
- <div className="!space-y-6">
282
- <div className="grid grid-cols-1 gap-8 md:grid-cols-2">
283
- <div className="!space-y-4">
284
- <h3 className="text-lg font-semibold !text-orange-300">
285
- Standard Sizes
286
- </h3>
287
- <div className="flex items-end gap-6 rounded-lg bg-black/20 p-6">
288
- <div className="text-center">
289
- <IndianFlagIcon className="!mx-auto mb-2 h-3 w-3" />
290
- <span className="text-xs text-white/60">12px</span>
291
- </div>
292
- <div className="text-center">
293
- <IndianFlagIcon className="!mx-auto mb-2 h-4 w-4" />
294
- <span className="text-xs text-white/60">16px</span>
295
- </div>
296
- <div className="text-center">
297
- <IndianFlagIcon className="!mx-auto mb-2 h-5 w-5" />
298
- <span className="text-xs text-white/60">20px</span>
299
- </div>
300
- <div className="text-center">
301
- <IndianFlagIcon className="!mx-auto mb-2 h-6 w-6" />
302
- <span className="text-xs text-white/60">24px</span>
303
- </div>
304
- <div className="text-center">
305
- <IndianFlagIcon className="!mx-auto mb-2 h-8 w-8" />
306
- <span className="text-xs text-white/60">32px</span>
307
- </div>
308
- <div className="text-center">
309
- <IndianFlagIcon className="!mx-auto mb-2 h-12 w-12" />
310
- <span className="text-xs text-white/60">48px</span>
311
- </div>
312
- </div>
313
- </div>
314
-
315
- <div className="!space-y-4">
316
- <h3 className="text-lg font-semibold !text-orange-300">
317
- Code Example
318
- </h3>
319
- <div className="rounded-lg bg-black/40 p-4">
320
- <pre className="overflow-x-auto text-sm !text-blue-300">
321
- {`// Small (16px)
322
- <IndianFlagIcon className="h-4 w-4" />
323
-
324
- // Medium (24px)
325
- <IndianFlagIcon className="h-6 w-6" />
326
-
327
- // Large (32px)
328
- <IndianFlagIcon className="h-8 w-8" />
329
-
330
- // Custom size
331
- <IndianFlagIcon width={40} height={30} />`}
332
- </pre>
333
- </div>
334
- </div>
335
- </div>
336
- </div>
337
- </div>
338
- </div>
339
-
340
- {/* Color Variations */}
341
- <div className="!space-y-8">
342
- <h2 className="text-center text-3xl font-bold !text-white">
343
- Color Variations
344
- </h2>
345
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
346
- <div className="!space-y-4">
347
- <h3 className="text-lg font-semibold !text-orange-300">
348
- Display Contexts
349
- </h3>
350
- <div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
351
- <div className="flex items-center gap-4">
352
- <IndianFlagIcon className="h-6 w-6" />
353
- <div>
354
- <div className="text-sm font-medium text-white">
355
- Original Colors
356
- </div>
357
- <div className="text-xs text-white/60">
358
- Default flag pattern
359
- </div>
360
- </div>
361
- </div>
362
- <div className="flex items-center gap-4">
363
- <div className="rounded bg-white p-1">
364
- <IndianFlagIcon className="h-5 w-5" />
365
- </div>
366
- <div>
367
- <div className="text-sm font-medium text-white">
368
- On White Background
369
- </div>
370
- <div className="text-xs text-white/60">
371
- Optimal contrast
372
- </div>
373
- </div>
374
- </div>
375
- <div className="flex items-center gap-4">
376
- <div className="rounded bg-gray-100 p-1">
377
- <IndianFlagIcon className="h-5 w-5" />
378
- </div>
379
- <div>
380
- <div className="text-sm font-medium text-white">
381
- On Light Background
382
- </div>
383
- <div className="text-xs text-white/60">
384
- Light gray surface
385
- </div>
386
- </div>
387
- </div>
388
- <div className="flex items-center gap-4">
389
- <div className="rounded bg-gray-800 p-1">
390
- <IndianFlagIcon className="h-5 w-5" />
391
- </div>
392
- <div>
393
- <div className="text-sm font-medium text-white">
394
- On Dark Background
395
- </div>
396
- <div className="text-xs text-white/60">
397
- Dark surface
398
- </div>
399
- </div>
400
- </div>
401
- </div>
402
- </div>
403
-
404
- <div className="!space-y-4">
405
- <h3 className="text-lg font-semibold !text-orange-300">
406
- Implementation Notes
407
- </h3>
408
- <div className="rounded-lg bg-black/40 p-4">
409
- <pre className="overflow-x-auto text-sm !text-green-300">
410
- {`// Indian flag uses embedded pattern
411
- // Orange (saffron), White, Green with Ashoka Chakra
412
-
413
- // Basic usage (maintains original colors)
414
- <IndianFlagIcon className="h-6 w-6" />
415
-
416
- // On light backgrounds (recommended)
417
- <div className="bg-white p-2 rounded">
418
- <IndianFlagIcon className="h-6 w-6" />
419
- </div>
420
-
421
- // Custom sizing with aspect ratio
422
- <IndianFlagIcon
423
- width={44}
424
- height={30}
425
- className="flex-shrink-0"
426
- />`}
427
- </pre>
428
- </div>
429
- </div>
430
- </div>
431
- </div>
432
-
433
- {/* Usage Examples */}
434
- <div className="!space-y-8">
435
- <h2 className="text-center text-3xl font-bold !text-white">
436
- Usage Examples
437
- </h2>
438
-
439
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
440
- {/* Country Selector */}
441
- <div className="!space-y-4">
442
- <h3 className="text-lg font-semibold !text-orange-300">
443
- Country Selector
444
- </h3>
445
- <div className="!space-y-4">
446
- <div className="flex gap-4">
447
- <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">
448
- <IndianFlagIcon className="h-5 w-5" />
449
- India
450
- </button>
451
- <div className="flex items-center gap-2 rounded-lg border border-white/20 bg-white/5 px-3 py-2">
452
- <IndianFlagIcon className="h-4 w-4" />
453
- <span className="text-sm text-white">IN</span>
454
- </div>
455
- </div>
456
- <div className="rounded-lg bg-black/40 p-4">
457
- <pre className="overflow-x-auto text-sm !text-green-300">
458
- {`// Country selection button
459
- <button className="flex items-center gap-3 border border-orange-500/20 bg-orange-500/10 px-4 py-2 rounded-lg">
460
- <IndianFlagIcon className="h-5 w-5" />
461
- India
462
- </button>
463
-
464
- // Country code display
465
- <div className="flex items-center gap-2 bg-white/5 border border-white/20 px-3 py-2 rounded-lg">
466
- <IndianFlagIcon className="h-4 w-4" />
467
- <span className="text-sm">IN</span>
468
- </div>`}
469
- </pre>
470
- </div>
471
- </div>
472
- </div>
473
-
474
- {/* Location Display */}
475
- <div className="!space-y-4">
476
- <h3 className="text-lg font-semibold !text-orange-300">
477
- Location Display
478
- </h3>
479
- <div className="!space-y-4">
480
- <div className="rounded-lg border border-white/10 bg-white/5 p-6">
481
- <div className="flex items-center justify-between">
482
- <div className="flex items-center gap-4">
483
- <div className="flex h-10 w-10 items-center justify-center rounded-lg bg-orange-500/20">
484
- <IndianFlagIcon className="h-6 w-6" />
485
- </div>
486
- <div>
487
- <div className="font-medium text-white">
488
- Mumbai, India
489
- </div>
490
- <div className="text-sm text-white/60">
491
- Maharashtra, IN
492
- </div>
493
- </div>
494
- </div>
495
- <div className="text-right">
496
- <div className="text-sm font-medium text-white">
497
- UTC +5:30
498
- </div>
499
- <div className="text-xs text-white/60">IST</div>
500
- </div>
501
- </div>
502
- </div>
503
- <div className="rounded-lg bg-black/40 p-4">
504
- <pre className="overflow-x-auto text-sm !text-green-300">
505
- {`<div className="flex items-center justify-between">
506
- <div className="flex items-center gap-4">
507
- <div className="flex h-10 w-10 items-center justify-center rounded-lg bg-orange-500/20">
508
- <IndianFlagIcon className="h-6 w-6" />
509
- </div>
510
- <div>
511
- <div className="font-medium text-white">Mumbai, India</div>
512
- <div className="text-sm text-white/60">Maharashtra, IN</div>
513
- </div>
514
- </div>
515
- <div className="text-right">
516
- <div className="text-sm font-medium text-white">UTC +5:30</div>
517
- <div className="text-xs text-white/60">IST</div>
518
- </div>
519
- </div>`}
520
- </pre>
521
- </div>
522
- </div>
523
- </div>
524
-
525
- {/* Language Selector */}
526
- <div className="!space-y-4">
527
- <h3 className="text-lg font-semibold !text-orange-300">
528
- Language Selector
529
- </h3>
530
- <div className="!space-y-4">
531
- <div className="rounded-lg border border-white/10 bg-white/5 p-6">
532
- <div className="space-y-3">
533
- <div className="flex items-center gap-3 rounded-lg bg-white/5 p-3">
534
- <IndianFlagIcon className="h-5 w-5" />
535
- <div className="flex-1">
536
- <div className="text-sm font-medium text-white">
537
- हिन्दी (Hindi)
538
- </div>
539
- <div className="text-xs text-white/60">India</div>
540
- </div>
541
- <div className="h-2 w-2 rounded-full bg-orange-400"></div>
542
- </div>
543
- <div className="flex items-center gap-3 rounded-lg p-3 hover:bg-white/5">
544
- <IndianFlagIcon className="h-5 w-5" />
545
- <div className="flex-1">
546
- <div className="text-sm font-medium text-white">
547
- English (India)
548
- </div>
549
- <div className="text-xs text-white/60">India</div>
550
- </div>
551
- </div>
552
- </div>
553
- </div>
554
- <div className="rounded-lg bg-black/40 p-4">
555
- <pre className="overflow-x-auto text-sm !text-green-300">
556
- {`<div className="flex items-center gap-3 rounded-lg bg-white/5 p-3">
557
- <IndianFlagIcon className="h-5 w-5" />
558
- <div className="flex-1">
559
- <div className="text-sm font-medium text-white">हिन्दी (Hindi)</div>
560
- <div className="text-xs text-white/60">India</div>
561
- </div>
562
- <div className="h-2 w-2 rounded-full bg-orange-400"></div>
563
- </div>`}
564
- </pre>
565
- </div>
566
- </div>
567
- </div>
568
-
569
- {/* User Profile */}
570
- <div className="!space-y-4">
571
- <h3 className="text-lg font-semibold !text-orange-300">
572
- User Profile
573
- </h3>
574
- <div className="!space-y-4">
575
- <div className="rounded-lg border border-white/10 bg-white/5 p-6">
576
- <div className="text-center">
577
- <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">
578
- <span className="text-2xl">👤</span>
579
- </div>
580
- <h4 className="mb-2 font-medium !text-white">
581
- Arjun Patel
582
- </h4>
583
- <div className="flex items-center justify-center gap-2 text-sm !text-white/70">
584
- <IndianFlagIcon className="h-4 w-4" />
585
- <span>Delhi, India</span>
586
- </div>
587
- <button className="mt-4 rounded-lg bg-orange-500 px-4 py-2 text-sm text-white transition-colors hover:bg-orange-600">
588
- View Profile
589
- </button>
590
- </div>
591
- </div>
592
- <div className="rounded-lg bg-black/40 p-4">
593
- <pre className="overflow-x-auto text-sm !text-green-300">
594
- {`<div className="text-center">
595
- <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">
596
- <span className="text-2xl">👤</span>
597
- </div>
598
- <h4 className="mb-2 font-medium text-white">Arjun Patel</h4>
599
- <div className="flex items-center justify-center gap-2 text-sm text-white/70">
600
- <IndianFlagIcon className="h-4 w-4" />
601
- <span>Delhi, India</span>
602
- </div>
603
- <button className="mt-4 bg-orange-500 hover:bg-orange-600 px-4 py-2 rounded-lg text-sm text-white">
604
- View Profile
605
- </button>
606
- </div>`}
607
- </pre>
608
- </div>
609
- </div>
610
- </div>
611
- </div>
612
- </div>
613
-
614
- {/* Accessibility */}
615
- <div className="!space-y-8">
616
- <h2 className="text-center text-3xl font-bold !text-white">
617
- Accessibility Features
618
- </h2>
619
- <div className="grid grid-cols-1 gap-8 md:grid-cols-2">
620
- <div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
621
- <h3 className="text-lg font-semibold !text-green-300">
622
- ✅ Built-in Features
623
- </h3>
624
- <ul className="!space-y-2 text-sm !text-white/70">
625
- <li className="!text-white/70">
626
- Uses Radix UI AccessibleIcon wrapper
627
- </li>
628
- <li className="!text-white/70">
629
- Provides screen reader label "Indian Flag icon"
630
- </li>
631
- <li className="!text-white/70">
632
- Supports keyboard navigation when interactive
633
- </li>
634
- <li className="!text-white/70">
635
- Maintains proper color contrast ratios
636
- </li>
637
- <li className="!text-white/70">
638
- Scales with user's font size preferences
639
- </li>
640
- </ul>
641
- </div>
642
-
643
- <div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
644
- <h3 className="text-lg font-semibold !text-orange-300">
645
- 💡 Best Practices
646
- </h3>
647
- <ul className="!space-y-2 text-sm text-white/70">
648
- <li className="!text-white/70">
649
- Always pair with descriptive text for context
650
- </li>
651
- <li className="!text-white/70">
652
- Use light backgrounds for optimal visibility
653
- </li>
654
- <li className="!text-white/70">
655
- Ensure sufficient spacing around the flag
656
- </li>
657
- <li className="!text-white/70">
658
- Add focus states for interactive elements
659
- </li>
660
- <li className="!text-white/70">
661
- Respect flag usage guidelines and cultural sensitivity
662
- </li>
663
- </ul>
664
- </div>
665
- </div>
666
-
667
- <div className="rounded-lg border border-white/10 bg-white/5 p-6">
668
- <h3 className="mb-4 text-lg font-semibold !text-purple-300">
669
- Custom Accessibility Label
670
- </h3>
671
- <div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
672
- <div className="rounded-lg bg-black/40 p-4">
673
- <pre className="overflow-x-auto text-sm !text-blue-300">
674
- {`// Custom implementation with specific label
675
- import { AccessibleIcon } from "@radix-ui/react-accessible-icon"
676
-
677
- function CustomIndianFlagIcon({ label = "India", ...props }) {
35
+ <AuralIconDocsPage
36
+ accentToken="positive"
37
+ features={[
38
+ {
39
+ title: "National Flag",
40
+ description: "Indian flag identity icon",
41
+ },
42
+ {
43
+ title: "Localization",
44
+ description: "Region and language markers",
45
+ },
46
+ { title: "Accessible", description: "ARIA-ready by default" },
47
+ ]}
48
+ quickStart={{
49
+ codeExample: `import { IndianFlagIcon } from "src/ui/icons/indian-flag-icon"
50
+
51
+ function LanguageSelector() {
678
52
  return (
679
- <AccessibleIcon label={label}>
680
- <IndianFlagIcon {...props} />
681
- </AccessibleIcon>
53
+ <button className="flex items-center gap-2">
54
+ <IndianFlagIcon className="h-5 w-5" />
55
+ <span>Hindi</span>
56
+ </button>
682
57
  )
683
- }
684
-
685
- // Usage with specific context
686
- <CustomIndianFlagIcon
687
- label="Select India as country"
688
- className="h-5 w-5"
689
- />`}
690
- </pre>
691
- </div>
692
- <div className="!space-y-4">
693
- <p className="text-sm !text-white/70">
694
- For specific contexts, you can wrap the IndianFlagIcon
695
- with a custom AccessibleIcon component that provides
696
- more descriptive labels for country selection or
697
- geographic identification.
698
- </p>
699
- <div className="rounded-lg border border-orange-500/20 bg-orange-500/10 p-4">
700
- <div className="flex items-center gap-2 text-sm text-orange-200">
701
- <IndianFlagIcon className="h-4 w-4" />
702
- <span>
703
- This approach gives screen readers more context
704
- </span>
705
- </div>
706
- </div>
707
- </div>
708
- </div>
709
- </div>
710
- </div>
711
-
712
- {/* Related Icons */}
713
- <div className="!space-y-8">
714
- <h2 className="text-center text-3xl font-bold !text-white">
715
- Related Icons
716
- </h2>
717
- <div className="grid grid-cols-2 gap-6 md:grid-cols-4">
718
- <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
719
- <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-blue-500/20">
720
- <span className="text-2xl">🌍</span>
721
- </div>
722
- <div>
723
- <div className="font-medium text-white">GlobeIcon</div>
724
- <div className="text-xs text-white/60">
725
- Global locations
726
- </div>
727
- </div>
728
- </div>
729
- <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
730
- <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-green-500/20">
731
- <span className="text-2xl">📍</span>
732
- </div>
733
- <div>
734
- <div className="font-medium text-white">LocationIcon</div>
735
- <div className="text-xs text-white/60">
736
- Geographic pins
737
- </div>
738
- </div>
739
- </div>
740
- <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
741
- <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-purple-500/20">
742
- <span className="text-2xl">🗺️</span>
743
- </div>
744
- <div>
745
- <div className="font-medium text-white">MapIcon</div>
746
- <div className="text-xs text-white/60">
747
- Maps and navigation
748
- </div>
749
- </div>
750
- </div>
751
- <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
752
- <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-orange-500/20">
753
- <span className="text-2xl">🌐</span>
754
- </div>
755
- <div>
756
- <div className="font-medium text-white">LanguageIcon</div>
757
- <div className="text-xs text-white/60">
758
- Language selection
759
- </div>
760
- </div>
761
- </div>
762
- </div>
763
- </div>
764
- </div>
765
-
766
- {/* Footer */}
767
- <div className="border-t border-white/10 bg-black/20 backdrop-blur-xl">
768
- <div className="!mx-auto max-w-7xl px-6 py-8">
769
- <div className="!space-y-4 text-center">
770
- <p className="!text-white/60">
771
- IndianFlagIcon is part of the Aural UI icon library, built
772
- with accessibility and cultural respect in mind.
773
- </p>
774
- <p className="text-sm !text-white/40">
775
- All icons use Radix UI's AccessibleIcon for screen reader
776
- compatibility and follow WCAG guidelines.
777
- </p>
778
- </div>
779
- </div>
780
- </div>
781
- </div>
782
- </>
58
+ }`,
59
+ livePreview: (
60
+ <button className="flex items-center gap-2">
61
+ <IndianFlagIcon className="h-6 w-6" />
62
+ </button>
63
+ ),
64
+ }}
65
+ relatedIcons={[
66
+ {
67
+ name: "GlobeIcon",
68
+ description: "Globe / world icon",
69
+ icon: GlobeIcon,
70
+ accentToken: "info",
71
+ },
72
+ {
73
+ name: "GoogleLogoIcon",
74
+ description: "Google brand mark",
75
+ icon: GoogleLogoIcon,
76
+ accentToken: "positive",
77
+ },
78
+ {
79
+ name: "AppleLogoIcon",
80
+ description: "Apple brand mark",
81
+ icon: AppleLogoIcon,
82
+ accentToken: "warning",
83
+ },
84
+ {
85
+ name: "SiteLogoIcon",
86
+ description: "Pocket FM site logo",
87
+ icon: SiteLogoIcon,
88
+ accentToken: "negative",
89
+ },
90
+ ]}
91
+ />
783
92
  ),
784
93
  },
785
94
  },
786
95
  tags: ["autodocs"],
787
96
  argTypes: {
788
- width: {
789
- control: { type: "range", min: 8, max: 96, step: 2 },
790
- description: "Width of the icon in pixels",
97
+ className: {
98
+ control: "text",
99
+ description: "CSS classes for sizing",
791
100
  },
792
101
  withAccessibility: {
793
102
  control: "boolean",
794
- description: "Whether to wrap the icon with accessibility features",
795
- },
796
- height: {
797
- control: { type: "range", min: 8, max: 96, step: 2 },
798
- description: "Height of the icon in pixels",
799
- },
800
- className: {
801
- control: "text",
802
- description: "CSS classes for styling",
103
+ description: "Wrap with accessibility label",
803
104
  },
804
105
  },
805
106
  }
@@ -807,222 +108,118 @@ function CustomIndianFlagIcon({ label = "India", ...props }) {
807
108
  export default meta
808
109
  type Story = StoryObj<typeof IndianFlagIcon>
809
110
 
810
- // Story parameters for consistent dark theme
811
- const storyParameters = {
812
- backgrounds: {
813
- default: "dark",
814
- values: [
815
- { name: "dark", value: "#0a0a0a" },
816
- { name: "darker", value: "#000000" },
817
- ],
818
- },
819
- }
820
-
821
111
  export const Default: Story = {
822
112
  args: {
823
- width: 22,
824
- height: 15,
825
- className: "",
113
+ className: "h-6 w-6",
826
114
  withAccessibility: true,
827
115
  },
828
- parameters: storyParameters,
829
116
  render: (args) => (
830
- <div className="flex h-32 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
831
- <div className="rounded-lg border border-white/10 bg-white/5 p-4">
832
- <IndianFlagIcon {...args} />
833
- </div>
834
- </div>
117
+ <IconDefaultCanvas>
118
+ <IndianFlagIcon {...args} />
119
+ </IconDefaultCanvas>
835
120
  ),
836
121
  }
837
122
 
838
123
  export const SizeVariations: Story = {
839
- parameters: {
840
- ...storyParameters,
841
- docs: {
842
- description: {
843
- story:
844
- "IndianFlagIcon in different sizes, from small UI elements to large country displays.",
845
- },
846
- },
847
- },
848
- render: () => (
849
- <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">
850
- <div className="text-center">
851
- <div className="!mx-auto mb-2 rounded bg-white p-2">
852
- <IndianFlagIcon className="h-3 w-3" />
853
- </div>
854
- <span className="text-xs text-white/60">12px</span>
855
- </div>
856
- <div className="text-center">
857
- <div className="!mx-auto mb-2 rounded bg-white p-2">
858
- <IndianFlagIcon className="h-4 w-4" />
859
- </div>
860
- <span className="text-xs text-white/60">16px</span>
861
- </div>
862
- <div className="text-center">
863
- <div className="!mx-auto mb-2 rounded bg-white p-2">
864
- <IndianFlagIcon className="h-5 w-5" />
865
- </div>
866
- <span className="text-xs text-white/60">20px</span>
867
- </div>
868
- <div className="text-center">
869
- <div className="!mx-auto mb-2 rounded bg-white p-2">
870
- <IndianFlagIcon className="h-6 w-6" />
871
- </div>
872
- <span className="text-xs text-white/60">24px</span>
873
- </div>
874
- <div className="text-center">
875
- <div className="!mx-auto mb-2 rounded bg-white p-2">
876
- <IndianFlagIcon className="h-8 w-8" />
877
- </div>
878
- <span className="text-xs text-white/60">32px</span>
879
- </div>
880
- <div className="text-center">
881
- <div className="!mx-auto mb-2 rounded bg-white p-3">
882
- <IndianFlagIcon className="h-12 w-12" />
883
- </div>
884
- <span className="text-xs text-white/60">48px</span>
885
- </div>
886
- </div>
887
- ),
124
+ render: () => <IconSizeVariations icon={IndianFlagIcon} />,
888
125
  }
889
126
 
890
- export const ColorVariations: Story = {
891
- parameters: {
892
- ...storyParameters,
893
- docs: {
894
- description: {
895
- story:
896
- "IndianFlagIcon shown on different backgrounds to demonstrate optimal usage contexts.",
897
- },
898
- },
899
- },
127
+ export const BrandColors: Story = {
900
128
  render: () => (
901
- <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">
902
- <div className="text-center">
903
- <div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg bg-white">
904
- <IndianFlagIcon className="h-10 w-10" />
905
- </div>
906
- <div className="text-sm font-medium text-white">White Background</div>
907
- <div className="text-xs text-white/60">Recommended</div>
908
- </div>
909
- <div className="text-center">
910
- <div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg bg-gray-100">
911
- <IndianFlagIcon className="h-10 w-10" />
912
- </div>
913
- <div className="text-sm font-medium text-white">Light Background</div>
914
- <div className="text-xs text-gray-400">Good contrast</div>
915
- </div>
916
- <div className="text-center">
917
- <div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg bg-gray-800">
918
- <IndianFlagIcon className="h-10 w-10" />
919
- </div>
920
- <div className="text-sm font-medium text-white">Dark Background</div>
921
- <div className="text-xs text-gray-400">Acceptable</div>
922
- </div>
923
- <div className="text-center">
924
- <div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-white/20 bg-transparent">
925
- <IndianFlagIcon className="h-10 w-10" />
926
- </div>
927
- <div className="text-sm font-medium text-white">Transparent</div>
928
- <div className="text-xs text-white/60">Original colors</div>
929
- </div>
930
- </div>
129
+ <IconBrandColors
130
+ icon={IndianFlagIcon}
131
+ variants={[
132
+ {
133
+ label: "Contrast Background",
134
+ description: "Theme contrast",
135
+ cardClassName:
136
+ "border-fm-divider-secondary bg-fm-neutral-1100 h-24 w-24 border",
137
+ iconClassName: "h-10 w-10",
138
+ },
139
+ {
140
+ label: "Surface Background",
141
+ description: "Theme surface",
142
+ cardClassName:
143
+ "border-fm-divider-secondary bg-fm-surface-secondary h-24 w-24 border",
144
+ iconClassName: "h-10 w-10",
145
+ },
146
+ {
147
+ label: "Primary Surface",
148
+ description: "Theme surface",
149
+ cardClassName: "bg-fm-surface-primary h-24 w-24",
150
+ iconClassName: "h-10 w-10",
151
+ },
152
+ {
153
+ label: "Transparent",
154
+ description: "Original colors",
155
+ cardClassName:
156
+ "border-fm-divider-contrast h-24 w-24 border bg-transparent",
157
+ iconClassName: "h-10 w-10",
158
+ },
159
+ ]}
160
+ />
931
161
  ),
932
162
  }
933
163
 
934
164
  export const UsageExamples: Story = {
935
- parameters: {
936
- ...storyParameters,
937
- docs: {
938
- description: {
939
- story:
940
- "Real-world usage examples showing IndianFlagIcon in different country and location contexts.",
941
- },
942
- },
943
- },
944
165
  render: () => (
945
- <div className="min-h-dvh !space-y-8 rounded-lg bg-gradient-to-br from-gray-900 to-gray-800 p-8">
946
- {/* Country Selector */}
947
- <div className="!space-y-2">
948
- <h3 className="text-sm font-medium text-white">Country Selector</h3>
949
- <div className="flex gap-4">
950
- <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">
951
- <IndianFlagIcon className="h-5 w-5" />
952
- India
953
- </button>
954
- <div className="flex items-center gap-2 rounded-lg border border-white/20 bg-white/5 px-3 py-2">
955
- <IndianFlagIcon className="h-4 w-4" />
956
- <span className="text-sm text-white">IN</span>
957
- </div>
166
+ <IconUsageCanvas>
167
+ <IconUsageSection title="Language Selector">
168
+ <button className="border-fm-divider-secondary bg-fm-surface-secondary flex items-center gap-2 rounded-xl border px-4 py-2">
169
+ <IndianFlagIcon className="h-5 w-5" />
170
+ <span className="text-fm-primary font-fm-text text-sm">Hindi</span>
171
+ </button>
172
+ </IconUsageSection>
173
+
174
+ <IconUsageSection title="Region Picker">
175
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary w-full max-w-sm space-y-px overflow-hidden rounded-xl border">
176
+ {[
177
+ { label: "India", flag: IndianFlagIcon, active: true },
178
+ { label: "United States", flag: GlobeIcon, active: false },
179
+ ].map(({ label, flag: Flag, active }) => (
180
+ <button
181
+ key={label}
182
+ className="border-fm-divider-secondary flex w-full items-center gap-3 border-b px-4 py-3 last:border-b-0"
183
+ >
184
+ <Flag
185
+ className={`h-5 w-5 ${active ? "text-fm-icon-active" : "text-fm-icon-inactive"}`}
186
+ />
187
+ <span className="text-fm-primary font-fm-text text-sm">
188
+ {label}
189
+ </span>
190
+ </button>
191
+ ))}
958
192
  </div>
959
- </div>
960
-
961
- {/* Location Display */}
962
- <div className="!space-y-2">
963
- <h3 className="text-sm font-medium text-white">Location Display</h3>
964
- <div className="rounded-lg border border-white/10 bg-white/5 p-6">
965
- <div className="flex items-center justify-between">
966
- <div className="flex items-center gap-4">
967
- <div className="flex h-10 w-10 items-center justify-center rounded-lg bg-orange-500/20">
968
- <IndianFlagIcon className="h-6 w-6" />
193
+ </IconUsageSection>
194
+
195
+ <IconUsageSection title="Profile Locale Badge">
196
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary w-full max-w-sm rounded-xl border p-4">
197
+ <div className="flex items-center gap-3">
198
+ <div className="bg-fm-divider-secondary h-12 w-12 rounded-full" />
199
+ <div className="flex-1">
200
+ <div className="text-fm-primary font-fm-text text-sm font-medium">
201
+ Pocket FM
969
202
  </div>
970
- <div>
971
- <div className="font-medium text-white">Mumbai, India</div>
972
- <div className="text-sm text-white/60">Maharashtra, IN</div>
203
+ <div className="text-fm-secondary font-fm-text flex items-center gap-1 text-xs">
204
+ <IndianFlagIcon className="h-3.5 w-3.5" />
205
+ India
973
206
  </div>
974
207
  </div>
975
- <div className="text-right">
976
- <div className="text-sm font-medium text-white">UTC +5:30</div>
977
- <div className="text-xs text-white/60">IST</div>
978
- </div>
979
- </div>
980
- </div>
981
- </div>
982
-
983
- {/* User Profile */}
984
- <div className="!space-y-2">
985
- <h3 className="text-sm font-medium text-white">User Profile</h3>
986
- <div className="rounded-lg border border-white/10 bg-white/5 p-6">
987
- <div className="text-center">
988
- <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">
989
- <span className="text-2xl">👤</span>
990
- </div>
991
- <h4 className="mb-2 font-medium text-white">Arjun Patel</h4>
992
- <div className="flex items-center justify-center gap-2 text-sm text-white/70">
993
- <IndianFlagIcon className="h-4 w-4" />
994
- <span>Delhi, India</span>
995
- </div>
996
- <button className="mt-4 rounded-lg bg-orange-500 px-4 py-2 text-sm text-white transition-colors hover:bg-orange-600">
997
- View Profile
998
- </button>
999
208
  </div>
1000
209
  </div>
1001
- </div>
1002
- </div>
210
+ </IconUsageSection>
211
+ </IconUsageCanvas>
1003
212
  ),
1004
213
  }
1005
214
 
1006
215
  export const Playground: Story = {
1007
- parameters: {
1008
- ...storyParameters,
1009
- docs: {
1010
- description: {
1011
- story:
1012
- "Interactive playground to experiment with different IndianFlagIcon configurations.",
1013
- },
1014
- },
1015
- },
1016
216
  args: {
1017
- width: 32,
1018
- height: 24,
1019
- className: "",
217
+ className: "h-8 w-8",
218
+ withAccessibility: true,
1020
219
  },
1021
220
  render: (args) => (
1022
- <div className="flex h-64 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
1023
- <div className="rounded-lg border border-white/10 bg-white p-8">
1024
- <IndianFlagIcon {...args} />
1025
- </div>
1026
- </div>
221
+ <IconPlaygroundCanvas>
222
+ <IndianFlagIcon {...args} />
223
+ </IconPlaygroundCanvas>
1027
224
  ),
1028
225
  }