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 { AlertIcon } from "src/ui/icons/alert-icon"
5
+ import { SettingIcon } from "src/ui/icons/setting-icon"
6
+ import { TickCircleIcon } from "src/ui/icons/tick-circle-icon"
7
+ import { WarningIcon } from "src/ui/icons/warning-icon"
8
+ import {
9
+ IconColorVariations,
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 { ShieldIcon } from "."
5
19
 
6
20
  const meta: Meta<typeof ShieldIcon> = {
@@ -11,796 +25,76 @@ const meta: Meta<typeof ShieldIcon> = {
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 ;
27
- max-width: none ;
28
- background: transparent ;
29
- }
30
- .sbdocs-content {
31
- max-width: none ;
32
- padding: 0 ;
33
- margin: 0 ;
34
- background: transparent ;
35
- }
36
- .docs-story {
37
- background: transparent ;
38
- }
39
- .sbdocs {
40
- background: transparent ;
41
- }
42
- body {
43
- background: #0a0a0a ;
44
- }
45
- #storybook-docs {
46
- background: #0a0a0a ;
47
- }
48
- .sbdocs-preview {
49
- background: transparent ;
50
- border: none ;
51
- }
52
- .sbdocs-h1, .sbdocs-h2, .sbdocs-h3, .sbdocs-h4, .sbdocs-h5, .sbdocs-h6 {
53
- color: white ;
54
- }
55
- .sbdocs-p, .sbdocs-li {
56
- color: rgba(255, 255, 255, 0.7) ;
57
- }
58
- .sbdocs-code {
59
- background: rgba(255, 255, 255, 0.1) ;
60
- color: rgba(168, 85, 247, 1) ;
61
- border: 1px solid rgba(255, 255, 255, 0.1) ;
62
- }
63
- .sbdocs-pre {
64
- background: rgba(0, 0, 0, 0.4) ;
65
- border: 1px solid rgba(255, 255, 255, 0.1) ;
66
- }
67
- .sbdocs-table {
68
- background: rgba(255, 255, 255, 0.05) ;
69
- border: 1px solid rgba(255, 255, 255, 0.1) ;
70
- }
71
- .sbdocs-table th {
72
- background: rgba(255, 255, 255, 0.05) ;
73
- color: white ;
74
- border-bottom: 1px solid rgba(255, 255, 255, 0.1) ;
75
- }
76
- .sbdocs-table td {
77
- color: rgba(255, 255, 255, 0.7) ;
78
- border-bottom: 1px solid rgba(255, 255, 255, 0.05) ;
79
- }
80
- `}
81
- </style>
82
-
83
- <div className="min-h-screen bg-gradient-to-br from-gray-900 via-purple-900/20 to-gray-900">
84
- {/* Header */}
85
- <div className="relative overflow-hidden border-b border-white/10 bg-black/20 backdrop-blur-xl">
86
- <div className="absolute inset-0 bg-gradient-to-r from-purple-500/10 via-transparent to-violet-500/10" />
87
- <div className="relative !mx-auto max-w-7xl px-6 py-16">
88
- <div className="!space-y-6 text-center">
89
- <div className="!mx-auto flex h-24 w-24 items-center justify-center rounded-2xl border border-purple-500/30 bg-gradient-to-br from-purple-500/20 to-violet-500/20">
90
- <ShieldIcon className="h-12 w-12" />
91
- </div>
92
- <h1 className="text-5xl font-bold !text-white">ShieldIcon</h1>
93
- <p className="!mx-auto max-w-3xl text-xl leading-relaxed !text-white/70">
94
- A universal shield icon with checkmark for security and
95
- protection interfaces. Features a classic shield design with
96
- verification mark, essential for security badges, verified
97
- accounts, protected content, and any interface where users
98
- need to identify secure or verified elements.
99
- </p>
100
-
101
- {/* Stats */}
102
- <div className="flex items-center justify-center gap-8 pt-8">
103
- <div className="text-center">
104
- <div className="text-3xl font-bold text-purple-300">
105
- Security
106
- </div>
107
- <div className="text-sm text-white/60">
108
- Protection indicator
109
- </div>
110
- </div>
111
- <div className="h-8 w-px bg-white/20" />
112
- <div className="text-center">
113
- <div className="text-3xl font-bold text-violet-300">
114
- Verified
115
- </div>
116
- <div className="text-sm text-white/60">Trust badge</div>
117
- </div>
118
- <div className="h-8 w-px bg-white/20" />
119
- <div className="text-center">
120
- <div className="text-3xl font-bold text-fuchsia-300">
121
- Accessible
122
- </div>
123
- <div className="text-sm text-white/60">
124
- Screen reader friendly
125
- </div>
126
- </div>
127
- </div>
128
- </div>
129
- </div>
130
- </div>
131
-
132
- {/* Content */}
133
- <div className="!mx-auto max-w-7xl !space-y-16 px-6 py-12">
134
- {/* Quick Usage */}
135
- <div className="!space-y-8">
136
- <h2 className="text-center text-3xl font-bold !text-white">
137
- Quick Start
138
- </h2>
139
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
140
- <div className="!space-y-4">
141
- <h3 className="text-xl font-semibold !text-purple-300">
142
- Basic Usage
143
- </h3>
144
- <div className="rounded-lg bg-black/40 p-4">
145
- <pre className="overflow-x-auto text-sm !text-green-300">
146
- {`import { ShieldIcon } from "@icons/shield-icon"
147
-
148
- function SecurityBadge() {
35
+ <AuralIconDocsPage
36
+ accentToken="positive"
37
+ features={[
38
+ { title: "Security", description: "Trust / security badge" },
39
+ { title: "Protection", description: "Safe content indicator" },
40
+ { title: "Accessible", description: "ARIA-ready by default" },
41
+ ]}
42
+ quickStart={{
43
+ codeExample: `import { ShieldIcon } from "src/ui/icons/shield-icon"
44
+
45
+ function TrustBadge() {
149
46
  return (
150
47
  <div className="flex items-center gap-2">
151
- <ShieldIcon className="h-6 w-6" />
152
- <span>Verified Account</span>
48
+ <ShieldIcon className="h-5 w-5 text-fm-icon-positive" />
49
+ <span>Verified content</span>
153
50
  </div>
154
51
  )
155
- }`}
156
- </pre>
157
- </div>
158
- </div>
159
-
160
- <div className="!space-y-4">
161
- <h3 className="text-xl font-semibold !text-purple-300">
162
- Live Preview
163
- </h3>
164
- <div className="flex h-32 items-center justify-center rounded-lg border border-white/10 bg-white/5">
165
- <div className="flex items-center gap-2 rounded-lg border border-purple-500/20 bg-purple-500/10 px-4 py-2">
166
- <ShieldIcon className="h-6 w-6" />
167
- <span className="text-sm text-white">Verified</span>
168
- </div>
169
- </div>
170
- </div>
171
- </div>
172
- </div>
173
-
174
- {/* Props Documentation */}
175
- <div className="!space-y-8">
176
- <h2 className="text-center text-3xl font-bold !text-white">
177
- Props & Configuration
178
- </h2>
179
-
180
- <div className="overflow-hidden rounded-lg border border-white/10 bg-white/5">
181
- <div className="bg-white/5 p-4">
182
- <h3 className="text-xl font-semibold !text-white">Props</h3>
183
- </div>
184
- <table className="!my-0 w-full">
185
- <thead className="bg-white/5">
186
- <tr className="border-b border-white/10">
187
- <th className="px-6 py-4 text-left text-sm font-semibold !text-white">
188
- Prop
189
- </th>
190
- <th className="px-6 py-4 text-left text-sm font-semibold !text-white">
191
- Type
192
- </th>
193
- <th className="px-6 py-4 text-left text-sm font-semibold !text-white">
194
- Default
195
- </th>
196
- <th className="px-6 py-4 text-left text-sm font-semibold !text-white">
197
- Description
198
- </th>
199
- </tr>
200
- </thead>
201
- <tbody>
202
- {" "}
203
- <tr className="!bg-black/10">
204
- <td className="px-6 py-4 font-mono text-sm !text-blue-300">
205
- withAccessibility
206
- </td>
207
- <td className="px-6 py-4 text-sm !text-white/70">
208
- boolean
209
- </td>
210
- <td className="px-6 py-4 text-sm !text-white/50">
211
- true
212
- </td>
213
- <td className="px-6 py-4 text-sm !text-white/70">
214
- Whether to wrap the icon with accessibility feature
215
- </td>
216
- </tr>
217
- <tr className="border-b border-white/5 !bg-black/10">
218
- <td className="px-6 py-4 font-mono text-sm !text-purple-300">
219
- height
220
- </td>
221
- <td className="px-6 py-4 text-sm !text-white/70">
222
- number | string
223
- </td>
224
- <td className="px-6 py-4 text-sm !text-white/50">16</td>
225
- <td className="px-6 py-4 text-sm !text-white/70">
226
- Height of the icon in pixels
227
- </td>
228
- </tr>
229
- <tr className="border-b border-white/5">
230
- <td className="px-6 py-4 font-mono text-sm !text-purple-300">
231
- 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
- #101115
238
- </td>
239
- <td className="px-6 py-4 text-sm !text-white/70">
240
- Fill color of the icon
241
- </td>
242
- </tr>
243
- <tr className="border-b border-white/5 !bg-black/10">
244
- <td className="px-6 py-4 font-mono text-sm !text-purple-300">
245
- className
246
- </td>
247
- <td className="px-6 py-4 text-sm !text-white/70">
248
- string
249
- </td>
250
- <td className="px-6 py-4 text-sm !text-white/50">-</td>
251
- <td className="px-6 py-4 text-sm !text-white/70">
252
- CSS classes for styling (use for overrides)
253
- </td>
254
- </tr>
255
- <tr className="!bg-black/10">
256
- <td className="px-6 py-4 font-mono text-sm !text-purple-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-purple-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
- <ShieldIcon className="!mx-auto mb-2 size-3" />
287
- <span className="text-xs text-white/60">12px</span>
288
- </div>
289
- <div className="text-center">
290
- <ShieldIcon className="!mx-auto mb-2 size-4" />
291
- <span className="text-xs text-white/60">16px</span>
292
- </div>
293
- <div className="text-center">
294
- <ShieldIcon className="!mx-auto mb-2 size-5" />
295
- <span className="text-xs text-white/60">20px</span>
296
- </div>
297
- <div className="text-center">
298
- <ShieldIcon className="!mx-auto mb-2 size-6" />
299
- <span className="text-xs text-white/60">24px</span>
300
- </div>
301
- <div className="text-center">
302
- <ShieldIcon className="!mx-auto mb-2 size-8" />
303
- <span className="text-xs text-white/60">32px</span>
304
- </div>
305
- <div className="text-center">
306
- <ShieldIcon 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-purple-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-cyan-300">
318
- {`// Small (16px)
319
- <ShieldIcon className="size-4" />
320
-
321
- // Medium (24px)
322
- <ShieldIcon className="size-6" />
323
-
324
- // Large (32px)
325
- <ShieldIcon className="size-8" />
326
-
327
- // Custom size
328
- <ShieldIcon width={40} height={40} />`}
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-purple-300">
345
- Semantic Colors
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
- <ShieldIcon className="h-6 w-6" />
350
- <div>
351
- <div className="text-sm font-medium text-white">
352
- Primary
353
- </div>
354
- <div className="text-xs text-white/60"></div>
355
- </div>
356
- </div>
357
- <div className="flex items-center gap-4">
358
- <ShieldIcon className="h-6 w-6 text-violet-400" />
359
- <div>
360
- <div className="text-sm font-medium text-white">
361
- Secondary
362
- </div>
363
- <div className="text-xs text-white/60">
364
- text-violet-400
365
- </div>
366
- </div>
367
- </div>
368
- <div className="flex items-center gap-4">
369
- <ShieldIcon className="h-6 w-6 text-green-400" />
370
- <div>
371
- <div className="text-sm font-medium text-white">
372
- Success
373
- </div>
374
- <div className="text-xs text-white/60">
375
- text-green-400
376
- </div>
377
- </div>
378
- </div>
379
- <div className="flex items-center gap-4">
380
- <ShieldIcon className="h-6 w-6 text-white/40" />
381
- <div>
382
- <div className="text-sm font-medium text-white">
383
- Disabled
384
- </div>
385
- <div className="text-xs text-white/60">
386
- text-white/40
387
- </div>
388
- </div>
389
- </div>
390
- </div>
391
- </div>
392
-
393
- <div className="!space-y-4">
394
- <h3 className="text-lg font-semibold !text-purple-300">
395
- Custom Colors
396
- </h3>
397
- <div className="rounded-lg bg-black/40 p-4">
398
- <pre className="overflow-x-auto text-sm !text-green-300">
399
- {`// Using Tailwind classes
400
- <ShieldIcon className="h-6 w-6" />
401
- <ShieldIcon className="h-6 w-6 text-violet-500" />
402
- <ShieldIcon className="h-6 w-6 text-green-500" />
403
-
404
- // Using CSS custom properties
405
- <ShieldIcon
406
- className="h-6 w-6"
407
- style={{ fill: 'var(--color-primary)' }}
408
- />
409
-
410
- // Direct fill prop
411
- <ShieldIcon
412
- width={24}
413
- height={24}
414
- fill="#a855f7"
415
- />`}
416
- </pre>
417
- </div>
418
- </div>
419
- </div>
420
- </div>
421
-
422
- {/* Usage Examples */}
423
- <div className="!space-y-8">
424
- <h2 className="text-center text-3xl font-bold !text-white">
425
- Usage Examples
426
- </h2>
427
-
428
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
429
- {/* Verified Badge */}
430
- <div className="!space-y-4">
431
- <h3 className="text-lg font-semibold !text-purple-300">
432
- Verified Badge
433
- </h3>
434
- <div className="!space-y-4">
435
- <div className="rounded-lg border border-white/10 bg-white/5 p-6">
436
- <div className="mb-4 flex items-center gap-3">
437
- <div className="h-12 w-12 rounded-full bg-gradient-to-br from-purple-500/20 to-violet-500/20" />
438
- <div>
439
- <div className="flex items-center gap-2">
440
- <div className="text-sm font-medium !text-white">
441
- John Doe
442
- </div>
443
- <ShieldIcon className="h-4 w-4 text-green-400" />
444
- </div>
445
- <div className="text-xs !text-white/60">
446
- Verified Account
447
- </div>
448
- </div>
449
- </div>
450
- </div>
451
- <div className="rounded-lg bg-black/40 p-4">
452
- <pre className="overflow-x-auto text-sm !text-green-300">
453
- {`// Verified user badge
454
- <div className="user-profile">
455
- <Avatar />
456
- <div>
457
- <div className="flex items-center gap-2">
458
- <h3>{name}</h3>
459
- <ShieldIcon
460
- className="h-4 w-4 text-green-400"
461
- aria-label="Verified account"
462
- />
463
- </div>
464
- <p>Verified Account</p>
465
- </div>
466
- </div>`}
467
- </pre>
468
- </div>
469
- </div>
470
- </div>
471
-
472
- {/* Security Status */}
473
- <div className="!space-y-4">
474
- <h3 className="text-lg font-semibold !text-purple-300">
475
- Security Status
476
- </h3>
477
- <div className="!space-y-4">
478
- <div className="rounded-lg border border-white/10 bg-white/5 p-4">
479
- <div className="!space-y-3">
480
- <div className="flex items-center justify-between">
481
- <div>
482
- <div className="text-sm font-medium !text-white">
483
- Account Security
484
- </div>
485
- <div className="text-xs !text-white/60">
486
- Protected
487
- </div>
488
- </div>
489
- <ShieldIcon className="h-5 w-5 text-green-400" />
490
- </div>
491
- <div className="flex items-center justify-between">
492
- <div>
493
- <div className="text-sm font-medium !text-white">
494
- Data Encryption
495
- </div>
496
- <div className="text-xs !text-white/60">
497
- Active
498
- </div>
499
- </div>
500
- <ShieldIcon className="h-5 w-5 text-green-400" />
501
- </div>
502
- </div>
503
- </div>
504
- <div className="rounded-lg bg-black/40 p-4">
505
- <pre className="overflow-x-auto text-sm !text-green-300">
506
- {`// Security status list
507
- <div className="security-status">
508
- {features.map((feature) => (
509
- <div key={feature.id} className="feature-item">
510
- <div>
511
- <h4>{feature.name}</h4>
512
- <p>{feature.status}</p>
513
- </div>
514
- <ShieldIcon
515
- className="h-5 w-5 text-green-400"
516
- aria-label={\`\${feature.name} is active\`}
517
- />
518
- </div>
519
- ))}
520
- </div>`}
521
- </pre>
522
- </div>
523
- </div>
524
- </div>
525
-
526
- {/* Protected Content */}
527
- <div className="!space-y-4">
528
- <h3 className="text-lg font-semibold !text-purple-300">
529
- Protected Content
530
- </h3>
531
- <div className="!space-y-4">
532
- <div className="rounded-lg border border-white/10 bg-white/5 p-4">
533
- <div className="mb-4 text-center">
534
- <div className="text-sm font-medium !text-white">
535
- Premium Content
536
- </div>
537
- <div className="text-xs !text-white/60">
538
- Protected by subscription
539
- </div>
540
- </div>
541
- <div className="flex items-center justify-center">
542
- <div className="flex items-center gap-2 rounded-lg border border-purple-500/30 bg-purple-500/10 px-4 py-3">
543
- <ShieldIcon className="h-6 w-6" />
544
- <span className="text-sm text-white">
545
- Protected
546
- </span>
547
- </div>
548
- </div>
549
- </div>
550
- <div className="rounded-lg bg-black/40 p-4">
551
- <pre className="overflow-x-auto text-sm !text-green-300">
552
- {`// Protected content badge
553
- <div className="content-badge">
554
- <ShieldIcon className="h-6 w-6" />
555
- <span>Protected</span>
556
- </div>`}
557
- </pre>
558
- </div>
559
- </div>
560
- </div>
561
-
562
- {/* Trust Indicator */}
563
- <div className="!space-y-4">
564
- <h3 className="text-lg font-semibold !text-purple-300">
565
- Trust Indicator
566
- </h3>
567
- <div className="!space-y-4">
568
- <div className="rounded-lg border border-white/10 bg-white/5 p-4">
569
- <div className="mb-4">
570
- <label className="mb-2 block text-xs text-white/60">
571
- Website Security
572
- </label>
573
- <div className="flex items-center gap-2 rounded-lg border border-white/10 bg-black/20 px-3 py-2">
574
- <ShieldIcon className="h-4 w-4 text-green-400" />
575
- <span className="flex-1 text-sm text-white">
576
- Secure Connection
577
- </span>
578
- </div>
579
- </div>
580
- </div>
581
- <div className="rounded-lg bg-black/40 p-4">
582
- <pre className="overflow-x-auto text-sm !text-green-300">
583
- {`// Trust indicator
584
- <div className="security-indicator">
585
- <label>Website Security</label>
586
- <div className="indicator-wrapper">
587
- <ShieldIcon
588
- className="h-4 w-4 text-green-400"
589
- aria-label="Secure connection"
590
- />
591
- <span>Secure Connection</span>
592
- </div>
593
- </div>`}
594
- </pre>
595
- </div>
596
- </div>
597
- </div>
598
- </div>
599
- </div>
600
-
601
- {/* Accessibility */}
602
- <div className="!space-y-8">
603
- <h2 className="text-center text-3xl font-bold !text-white">
604
- Accessibility Features
605
- </h2>
606
- <div className="grid grid-cols-1 gap-8 md:grid-cols-2">
607
- <div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
608
- <h3 className="text-lg font-semibold !text-green-300">
609
- ✅ Built-in Features
610
- </h3>
611
- <ul className="!space-y-2 text-sm !text-white/70">
612
- <li className="!text-white/70">
613
- Uses Radix UI AccessibleIcon wrapper
614
- </li>
615
- <li className="!text-white/70">
616
- Provides screen reader label "Shield icon"
617
- </li>
618
- <li className="!text-white/70">
619
- Supports keyboard navigation when interactive
620
- </li>
621
- <li className="!text-white/70">
622
- Maintains proper color contrast ratios
623
- </li>
624
- <li className="!text-white/70">
625
- Scales with user's font size preferences
626
- </li>
627
- </ul>
628
- </div>
629
-
630
- <div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
631
- <h3 className="text-lg font-semibold !text-purple-300">
632
- 💡 Best Practices
633
- </h3>
634
- <ul className="!space-y-2 text-sm text-white/70">
635
- <li className="!text-white/70">
636
- Always provide descriptive aria-labels for security
637
- badges
638
- </li>
639
- <li className="!text-white/70">
640
- Include security status in accessible text when possible
641
- </li>
642
- <li className="!text-white/70">
643
- Use appropriate colors to convey security status
644
- </li>
645
- <li className="!text-white/70">
646
- Provide visible focus states for keyboard users
647
- </li>
648
- <li className="!text-white/70">
649
- Consider context when indicating verification status
650
- </li>
651
- </ul>
652
- </div>
653
- </div>
654
-
655
- <div className="rounded-lg border border-white/10 bg-white/5 p-6">
656
- <h3 className="mb-4 text-lg font-semibold !text-violet-300">
657
- Proper ARIA Implementation
658
- </h3>
659
- <div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
660
- <div className="rounded-lg bg-black/40 p-4">
661
- <pre className="overflow-x-auto text-sm !text-cyan-300">
662
- {`// Verified badge with proper ARIA
663
- <div className="user-badge">
664
- <span>{userName}</span>
665
- <ShieldIcon
666
- className="h-4 w-4 text-green-400"
667
- aria-label="Verified account"
668
- />
669
- </div>
670
-
671
- // Security status with context
672
- <div className="security-status">
673
- <ShieldIcon
674
- className="h-5 w-5 text-green-400"
675
- aria-label="Account security is active"
676
- />
677
- <span className="sr-only">Account security is active</span>
678
- </div>
679
-
680
- // Protected content indicator
681
- <div className="protected-content">
682
- <ShieldIcon
683
- className="h-6 w-6"
684
- aria-label="This content is protected"
685
- />
686
- <span>Protected Content</span>
687
- </div>`}
688
- </pre>
689
- </div>
690
- <div className="!space-y-4">
691
- <p className="text-sm !text-white/70">
692
- When using ShieldIcon for security indicators, always
693
- provide clear context about what is being protected or
694
- verified, and ensure the security status is accessible
695
- to screen readers.
696
- </p>
697
- <div className="rounded-lg border border-purple-500/20 bg-purple-500/10 p-4">
698
- <div className="flex items-center gap-2 text-sm text-purple-200">
699
- <ShieldIcon className="h-4 w-4" />
700
- <span>
701
- Screen readers need context about security status
702
- and verification
703
- </span>
704
- </div>
705
- </div>
706
- </div>
707
- </div>
708
- </div>
709
- </div>
710
-
711
- {/* Related Icons */}
712
- <div className="!space-y-8">
713
- <h2 className="text-center text-3xl font-bold !text-white">
714
- Related Icons
715
- </h2>
716
- <div className="grid grid-cols-2 gap-6 md:grid-cols-4">
717
- <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
718
- <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-green-500/20">
719
- <span className="!text-2xl !text-white">✓</span>
720
- </div>
721
- <div>
722
- <div className="font-medium text-white">TickIcon</div>
723
- <div className="text-xs text-white/60">Verification</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-blue-500/20">
728
- <span className="!text-2xl !text-white">🔒</span>
729
- </div>
730
- <div>
731
- <div className="font-medium text-white">LockIcon</div>
732
- <div className="text-xs text-white/60">Security</div>
733
- </div>
734
- </div>
735
- <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
736
- <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-purple-500/20">
737
- <span className="!text-2xl !text-white">⭐</span>
738
- </div>
739
- <div>
740
- <div className="font-medium text-white">StarIcon</div>
741
- <div className="text-xs text-white/60">Premium</div>
742
- </div>
743
- </div>
744
- <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
745
- <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-orange-500/20">
746
- <span className="!text-2xl !text-white">⚠️</span>
747
- </div>
748
- <div>
749
- <div className="font-medium text-white">WarningIcon</div>
750
- <div className="text-xs text-white/60">
751
- Security alert
752
- </div>
753
- </div>
754
- </div>
755
- </div>
756
- </div>
757
- </div>
758
-
759
- {/* Footer */}
760
- <div className="border-t border-white/10 bg-black/20 backdrop-blur-xl">
761
- <div className="!mx-auto max-w-7xl px-6 py-8">
762
- <div className="!space-y-4 text-center">
763
- <p className="!text-white/60">
764
- ShieldIcon is part of the Aural UI icon library, built with
765
- accessibility and security best practices in mind.
766
- </p>
767
- <p className="text-sm !text-white/40">
768
- All icons use Radix UI's AccessibleIcon for screen reader
769
- compatibility and follow WCAG guidelines.
770
- </p>
771
- </div>
52
+ }`,
53
+ livePreview: (
54
+ <div className="flex items-center gap-2">
55
+ <ShieldIcon className="text-fm-icon-positive h-6 w-6" />
772
56
  </div>
773
- </div>
774
- </div>
775
- </>
57
+ ),
58
+ }}
59
+ relatedIcons={[
60
+ {
61
+ name: "TickCircleIcon",
62
+ description: "Success / check circle icon",
63
+ icon: TickCircleIcon,
64
+ accentToken: "info",
65
+ },
66
+ {
67
+ name: "AlertIcon",
68
+ description: "Alert / info notification icon",
69
+ icon: AlertIcon,
70
+ accentToken: "positive",
71
+ },
72
+ {
73
+ name: "WarningIcon",
74
+ description: "Warning / caution icon",
75
+ icon: WarningIcon,
76
+ accentToken: "warning",
77
+ },
78
+ {
79
+ name: "SettingIcon",
80
+ description: "Settings / preferences icon",
81
+ icon: SettingIcon,
82
+ accentToken: "negative",
83
+ },
84
+ ]}
85
+ />
776
86
  ),
777
87
  },
778
88
  },
779
89
  tags: ["autodocs"],
780
90
  argTypes: {
781
- width: {
782
- control: { type: "range", min: 8, max: 96, step: 2 },
783
- description: "Width of the icon in pixels",
784
- },
785
- withAccessibility: {
786
- control: "boolean",
787
- description: "Whether to wrap the icon with accessibility features",
788
- },
789
- height: {
790
- control: { type: "range", min: 8, max: 96, step: 2 },
791
- description: "Height of the icon in pixels",
792
- },
793
- fill: {
794
- control: "color",
795
- description: "Fill color of the icon",
796
- },
797
91
  className: {
798
92
  control: "text",
799
- description: "CSS classes for styling (use for overrides)",
93
+ description: "CSS classes including color token",
800
94
  },
801
- onClick: {
802
- action: "clicked",
803
- description: "Click handler for interactive use",
95
+ withAccessibility: {
96
+ control: "boolean",
97
+ description: "Wrap with accessibility label",
804
98
  },
805
99
  },
806
100
  }
@@ -808,192 +102,84 @@ function SecurityBadge() {
808
102
  export default meta
809
103
  type Story = StoryObj<typeof ShieldIcon>
810
104
 
811
- // Story parameters for consistent dark theme
812
- const storyParameters = {
813
- backgrounds: {
814
- default: "dark",
815
- values: [
816
- { name: "dark", value: "#0a0a0a" },
817
- { name: "darker", value: "#000000" },
818
- ],
819
- },
820
- }
821
-
822
105
  export const Default: Story = {
823
106
  args: {
824
- className: "h-8 w-8",
107
+ className: "h-6 w-6 text-fm-icon-positive",
825
108
  withAccessibility: true,
826
109
  },
827
- parameters: storyParameters,
828
110
  render: (args) => (
829
- <div className="flex h-32 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
111
+ <IconDefaultCanvas>
830
112
  <ShieldIcon {...args} />
831
- </div>
113
+ </IconDefaultCanvas>
832
114
  ),
833
115
  }
834
116
 
835
117
  export const SizeVariations: Story = {
836
- parameters: {
837
- ...storyParameters,
838
- docs: {
839
- description: {
840
- story:
841
- "ShieldIcon in different sizes, from small UI elements to large displays.",
842
- },
843
- },
844
- },
845
- render: () => (
846
- <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">
847
- <div className="text-center">
848
- <ShieldIcon className="!mx-auto mb-2 h-3 w-3" />
849
- <span className="text-xs text-white/60">12px</span>
850
- </div>
851
- <div className="text-center">
852
- <ShieldIcon className="!mx-auto mb-2 h-4 w-4" />
853
- <span className="text-xs text-white/60">16px</span>
854
- </div>
855
- <div className="text-center">
856
- <ShieldIcon className="!mx-auto mb-2 h-5 w-5" />
857
- <span className="text-xs text-white/60">20px</span>
858
- </div>
859
- <div className="text-center">
860
- <ShieldIcon className="!mx-auto mb-2 h-6 w-6" />
861
- <span className="text-xs text-white/60">24px</span>
862
- </div>
863
- <div className="text-center">
864
- <ShieldIcon className="!mx-auto mb-2 h-8 w-8" />
865
- <span className="text-xs text-white/60">32px</span>
866
- </div>
867
- <div className="text-center">
868
- <ShieldIcon className="!mx-auto mb-2 h-12 w-12" />
869
- <span className="text-xs text-white/60">48px</span>
870
- </div>
871
- </div>
872
- ),
118
+ render: () => <IconSizeVariations icon={ShieldIcon} />,
873
119
  }
874
120
 
875
121
  export const ColorVariations: Story = {
876
- parameters: {
877
- ...storyParameters,
878
- docs: {
879
- description: {
880
- story: "ShieldIcon in different semantic colors for various use cases.",
881
- },
882
- },
883
- },
884
- render: () => (
885
- <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">
886
- <div className="text-center">
887
- <div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-purple-500/30 bg-purple-500/20">
888
- <ShieldIcon className="h-8 w-8" />
889
- </div>
890
- <div className="text-sm font-medium text-white">Primary</div>
891
- <div className="text-xs">Default</div>
892
- </div>
893
- <div className="text-center">
894
- <div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-violet-500/30 bg-violet-500/20">
895
- <ShieldIcon className="h-8 w-8 text-violet-400" />
896
- </div>
897
- <div className="text-sm font-medium text-white">Secondary</div>
898
- <div className="text-xs text-violet-400">text-violet-400</div>
899
- </div>
900
- <div className="text-center">
901
- <div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-green-500/30 bg-green-500/20">
902
- <ShieldIcon className="h-8 w-8 text-green-400" />
903
- </div>
904
- <div className="text-sm font-medium text-white">Success</div>
905
- <div className="text-xs text-green-400">text-green-400</div>
906
- </div>
907
- <div className="text-center">
908
- <div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-white/10 bg-white/5">
909
- <ShieldIcon className="h-8 w-8 text-white/40" />
910
- </div>
911
- <div className="text-sm font-medium text-white">Disabled</div>
912
- <div className="text-xs text-white/40">text-white/40</div>
913
- </div>
914
- </div>
915
- ),
122
+ render: () => <IconColorVariations icon={ShieldIcon} />,
916
123
  }
917
124
 
918
125
  export const UsageExamples: Story = {
919
- parameters: {
920
- ...storyParameters,
921
- docs: {
922
- description: {
923
- story:
924
- "Real-world usage examples showing ShieldIcon in different security and verification contexts.",
925
- },
926
- },
927
- },
928
126
  render: () => (
929
- <div className="min-h-dvh !space-y-8 rounded-lg bg-gradient-to-br from-gray-900 to-gray-800 p-8">
930
- {/* Verified Badge */}
931
- <div className="!space-y-2">
932
- <h3 className="text-sm font-medium text-white">Verified Badge</h3>
933
- <div className="rounded-lg border border-white/10 bg-white/5 p-6">
934
- <div className="mb-4 flex items-center gap-3">
935
- <div className="h-12 w-12 rounded-full bg-gradient-to-br from-purple-500/20 to-violet-500/20" />
936
- <div>
937
- <div className="flex items-center gap-2">
938
- <div className="text-sm font-medium text-white">John Doe</div>
939
- <ShieldIcon className="h-4 w-4 text-green-400" />
940
- </div>
941
- <div className="text-xs text-white/60">Verified Account</div>
942
- </div>
943
- </div>
127
+ <IconUsageCanvas>
128
+ <IconUsageSection title="Trust Badge">
129
+ <div className="flex items-center gap-2">
130
+ <ShieldIcon className="text-fm-icon-positive h-5 w-5" />
131
+ <span className="text-fm-secondary font-fm-text text-sm">
132
+ Verified creator
133
+ </span>
944
134
  </div>
945
- </div>
946
-
947
- {/* Security Status */}
948
- <div className="!space-y-2">
949
- <h3 className="text-sm font-medium text-white">Security Status</h3>
950
- <div className="rounded-lg border border-white/10 bg-white/5 p-4">
951
- <div className="!space-y-3">
952
- <div className="flex items-center justify-between">
953
- <div>
954
- <div className="text-sm font-medium text-white">
955
- Account Security
956
- </div>
957
- <div className="text-xs text-white/60">Protected</div>
958
- </div>
959
- <ShieldIcon className="h-5 w-5 text-green-400" />
135
+ </IconUsageSection>
136
+
137
+ <IconUsageSection title="Security Settings">
138
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary w-full max-w-sm overflow-hidden rounded-xl border">
139
+ {[
140
+ { label: "Privacy", icon: ShieldIcon, active: true },
141
+ { label: "Alerts", icon: AlertIcon, active: false },
142
+ ].map(({ label, icon: Icon, active }) => (
143
+ <button
144
+ key={label}
145
+ className="border-fm-divider-secondary flex w-full items-center gap-3 border-b px-4 py-3 last:border-b-0"
146
+ >
147
+ <Icon
148
+ className={`h-4 w-4 ${active ? "text-fm-icon-positive" : "text-fm-icon-inactive"}`}
149
+ />
150
+ <span className="text-fm-primary font-fm-text text-sm">
151
+ {label}
152
+ </span>
153
+ </button>
154
+ ))}
155
+ </div>
156
+ </IconUsageSection>
157
+
158
+ <IconUsageSection title="Content Rating Banner">
159
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary flex w-full max-w-sm items-center gap-3 rounded-xl border px-4 py-3">
160
+ <ShieldIcon className="text-fm-icon-positive h-6 w-6" />
161
+ <div>
162
+ <div className="text-fm-primary font-fm-text text-sm font-medium">
163
+ Safe for all ages
960
164
  </div>
961
- <div className="flex items-center justify-between">
962
- <div>
963
- <div className="text-sm font-medium text-white">
964
- Data Encryption
965
- </div>
966
- <div className="text-xs text-white/60">Active</div>
967
- </div>
968
- <ShieldIcon className="h-5 w-5 text-green-400" />
165
+ <div className="text-fm-secondary font-fm-text text-xs">
166
+ Content reviewed and verified
969
167
  </div>
970
168
  </div>
971
169
  </div>
972
- </div>
973
- </div>
170
+ </IconUsageSection>
171
+ </IconUsageCanvas>
974
172
  ),
975
173
  }
976
174
 
977
175
  export const Playground: Story = {
978
- parameters: {
979
- ...storyParameters,
980
- docs: {
981
- description: {
982
- story:
983
- "Interactive playground to experiment with different ShieldIcon configurations.",
984
- },
985
- },
986
- },
987
176
  args: {
988
- width: 24,
989
- height: 24,
990
- className: "text-purple-400",
177
+ className: "h-8 w-8 text-fm-icon-positive",
178
+ withAccessibility: true,
991
179
  },
992
180
  render: (args) => (
993
- <div className="flex h-64 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
994
- <div className="rounded-lg border border-white/10 bg-white/5 p-8">
995
- <ShieldIcon {...args} />
996
- </div>
997
- </div>
181
+ <IconPlaygroundCanvas>
182
+ <ShieldIcon {...args} />
183
+ </IconPlaygroundCanvas>
998
184
  ),
999
185
  }