aural-ui 4.0.1 → 4.2.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 (175) hide show
  1. package/README.md +8 -1
  2. package/dist/components/aspect-ratio/AspectRatio.stories.tsx +290 -1228
  3. package/dist/components/avatar/Avatar.stories.tsx +219 -235
  4. package/dist/components/badge/Badge.stories.tsx +379 -116
  5. package/dist/components/banner/Banner.stories.tsx +445 -391
  6. package/dist/components/breadcrumb/Breadcrumb.stories.tsx +453 -199
  7. package/dist/components/button/Button.stories.tsx +585 -230
  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 -636
  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 +530 -867
  16. package/dist/components/dialog/Dialog.stories.tsx +501 -950
  17. package/dist/components/divider/Divider.stories.tsx +264 -527
  18. package/dist/components/dot-loader/DotLoader.stories.tsx +256 -257
  19. package/dist/components/drawer/Drawer.stories.tsx +659 -1023
  20. package/dist/components/dropdown/Dropdown.stories.tsx +643 -1028
  21. package/dist/components/form/Form.stories.tsx +560 -274
  22. package/dist/components/helper-text/HelperText.stories.tsx +199 -200
  23. package/dist/components/hover-card/HoverCard.stories.tsx +318 -1254
  24. package/dist/components/icon-button/IconButton.stories.tsx +837 -194
  25. package/dist/components/if-else/if-else.stories.tsx +370 -83
  26. package/dist/components/input/Input.stories.tsx +436 -368
  27. package/dist/components/label/Label.stories.tsx +156 -154
  28. package/dist/components/list/List.stories.tsx +484 -835
  29. package/dist/components/marquee/Marquee.stories.tsx +356 -712
  30. package/dist/components/otp-inputs/OtpInputs.stories.tsx +352 -422
  31. package/dist/components/overlay/Overlay.stories.tsx +452 -824
  32. package/dist/components/pagination/Pagination.stories.tsx +721 -210
  33. package/dist/components/popover/Popover.stories.tsx +481 -896
  34. package/dist/components/radio/Radio.stories.tsx +432 -124
  35. package/dist/components/resizable/Resizable.stories.tsx +495 -799
  36. package/dist/components/scroll-area/ScrollArea.stories.tsx +383 -1059
  37. package/dist/components/search/Search.stories.tsx +312 -595
  38. package/dist/components/select/Select.stories.tsx +684 -789
  39. package/dist/components/sheet/Sheet.stories.tsx +671 -950
  40. package/dist/components/skelton/Skelton.stories.tsx +230 -764
  41. package/dist/components/slider/Slider.stories.tsx +383 -760
  42. package/dist/components/stepper/Stepper.stories.tsx +371 -514
  43. package/dist/components/switch/Switch.stories.tsx +461 -208
  44. package/dist/components/switch-case/SwitchCase.stories.tsx +367 -188
  45. package/dist/components/table/Table.stories.tsx +770 -916
  46. package/dist/components/tabs/Tabs.stories.tsx +458 -1455
  47. package/dist/components/tag/Tag.stories.tsx +714 -542
  48. package/dist/components/textarea/TextArea.stories.tsx +621 -562
  49. package/dist/components/thumbnail-tags/ThumbnailTags.stories.tsx +228 -154
  50. package/dist/components/toast/Toast.stories.tsx +452 -1339
  51. package/dist/components/toggle/Toggle.stories.tsx +488 -931
  52. package/dist/components/tooltip/Tooltip.stories.tsx +344 -1388
  53. package/dist/components/typography/Typography.stories.tsx +406 -89
  54. package/dist/hooks/use-change-state/UseChangeState.stories.tsx +309 -606
  55. package/dist/hooks/use-previous/UsePrevious.stories.tsx +367 -917
  56. package/dist/hooks/use-standalone-pagination/UseStandalonePagination.stories.tsx +639 -867
  57. package/dist/icons/Icons.stories.tsx +0 -12
  58. package/dist/icons/ai-avatar-icon/AiAvatarIcon.stories.tsx +223 -1060
  59. package/dist/icons/alert-icon/AlertIcon.stories.tsx +106 -968
  60. package/dist/icons/all-icons.tsx +37 -16
  61. package/dist/icons/angle-down-icon/AngleDownIcon.stories.tsx +137 -1010
  62. package/dist/icons/apple-logo-icon/AppleLogoIcon.stories.tsx +145 -935
  63. package/dist/icons/arrow-box-left-icon/ArrowBoxLeftIcon.stories.tsx +132 -1046
  64. package/dist/icons/arrow-corner-up-left-icon/ArrowCornerUpLeftIcon.stories.tsx +134 -986
  65. package/dist/icons/arrow-corner-up-right-icon/ArrowCornerUpRightIcon.stories.tsx +135 -1028
  66. package/dist/icons/arrow-left-icon/ArrowLeftIcon.stories.tsx +133 -971
  67. package/dist/icons/arrow-right-icon/ArrowRightIcon.stories.tsx +145 -1123
  68. package/dist/icons/arrow-right-up-icon/ArrowRightUpIcon.stories.tsx +143 -1252
  69. package/dist/icons/art-board-icon/ArtBoardIcon.stories.tsx +123 -632
  70. package/dist/icons/audio-bar-icon/AudioBarIcon.stories.tsx +141 -1223
  71. package/dist/icons/backward-ten-seconds-icon/BackwardTenSecondsIcon.stories.tsx +164 -1018
  72. package/dist/icons/bubble-check-icon/BubbleCheckIcon.stories.tsx +121 -1236
  73. package/dist/icons/bubble-crossed-icon/BubbleCrossedIcon.stories.tsx +121 -1213
  74. package/dist/icons/bubble-sparkle-icon/BubbleSparkleIcon.stories.tsx +116 -893
  75. package/dist/icons/camera-icon/CameraIcon.stories.tsx +109 -1254
  76. package/dist/icons/capital-a-letter-icon/CapitalALetterIcon.stories.tsx +114 -975
  77. package/dist/icons/chevron-double-left-icon/ChevronDoubleLeftIcon.stories.tsx +157 -994
  78. package/dist/icons/chevron-double-right-icon/ChevronDoubleRightIcon.stories.tsx +160 -992
  79. package/dist/icons/chevron-down-icon/ChevronDownIcon.stories.tsx +140 -970
  80. package/dist/icons/chevron-left-icon/ChevronLeftIcon.stories.tsx +126 -993
  81. package/dist/icons/chevron-right-icon/ChevronRightIcon.stories.tsx +144 -987
  82. package/dist/icons/chevron-up-icon/ChevronUpIcon.stories.tsx +141 -1007
  83. package/dist/icons/circle-tick-icon/CircleTickIcon.stories.tsx +147 -1187
  84. package/dist/icons/circular-play-icon/CircularPlayIcon.stories.tsx +110 -476
  85. package/dist/icons/coin-icon/CoinIcon.stories.tsx +120 -1364
  86. package/dist/icons/coin-toons-icon/CoinToonsIcon.stories.tsx +113 -1360
  87. package/dist/icons/column-wide-add-icon/ColumnWideAddIcon.stories.tsx +111 -942
  88. package/dist/icons/command-icon/CommandIcon.stories.tsx +124 -1087
  89. package/dist/icons/copy-icon/CopyIcon.stories.tsx +119 -996
  90. package/dist/icons/cross-circle-icon/CrossCircleIcon.stories.tsx +144 -1046
  91. package/dist/icons/cross-icon/CrossIcon.stories.tsx +136 -999
  92. package/dist/icons/download-icon/DownloadIcon.stories.tsx +123 -857
  93. package/dist/icons/edit-big-icon/EditBigIcon.stories.tsx +121 -1080
  94. package/dist/icons/email-icon/EmailIcon.stories.tsx +112 -979
  95. package/dist/icons/expand-icon/ExpandIcon.stories.tsx +109 -1146
  96. package/dist/icons/eye-close-icon/EyeCloseIcon.stories.tsx +141 -1068
  97. package/dist/icons/eye-open-icon/EyeOpenIcon.stories.tsx +140 -1081
  98. package/dist/icons/feature-shine-icon/FeatureShineIcon.stories.tsx +124 -1050
  99. package/dist/icons/file-chart-icon/FileChartIcon.stories.tsx +123 -1091
  100. package/dist/icons/file-text-icon/FileTextIcon.stories.tsx +122 -633
  101. package/dist/icons/filter-bar-row-icon/FilterBarRowIcon.stories.tsx +116 -1087
  102. package/dist/icons/forward-ten-seconds-icon/ForwardTenSecondsIcon.stories.tsx +166 -1020
  103. package/dist/icons/git-branch-icon/GitBranchIcon.stories.tsx +112 -1182
  104. package/dist/icons/git-fork-icon/GitForkIcon.stories.tsx +112 -1155
  105. package/dist/icons/globe-icon/GlobeIcon.stories.tsx +127 -325
  106. package/dist/icons/google-logo-icon/GoogleLogoIcon.stories.tsx +142 -985
  107. package/dist/icons/grip-vertical-icon/GripVerticalIcon.stories.tsx +116 -1217
  108. package/dist/icons/head-icon/HeadIcon.stories.tsx +108 -953
  109. package/dist/icons/heart-icon/HeartIcon.stories.tsx +117 -1060
  110. package/dist/icons/image-avatar-sparkle-icon/ImageAvatarSparkleIcon.stories.tsx +116 -716
  111. package/dist/icons/image-icon/ImageIcon.stories.tsx +102 -1164
  112. package/dist/icons/import-folder-icon/ImportFolderIcon.stories.tsx +108 -1233
  113. package/dist/icons/import-left-arrow-folder-icon/ImportLeftArrowFolderIcon.stories.tsx +133 -1289
  114. package/dist/icons/indian-flag-icon/IndianFlagIcon.stories.tsx +155 -1012
  115. package/dist/icons/instagram-icon/InstagramIcon.stories.tsx +158 -1438
  116. package/dist/icons/layout-column-icon/LayoutColumnIcon.stories.tsx +121 -1011
  117. package/dist/icons/layout-left-icon/LayoutLeftIcon.stories.tsx +116 -981
  118. package/dist/icons/layout-right-icon/LayoutRightIcon.stories.tsx +116 -979
  119. package/dist/icons/light-bulb-simple-icon/LightBulbSimpleIcon.stories.tsx +105 -1252
  120. package/dist/icons/linked-in-icon/LinkedInIcon.stories.tsx +151 -1554
  121. package/dist/icons/magic-book-icon/MagicBookIcon.stories.tsx +107 -1227
  122. package/dist/icons/magic-edit-icon/MagicEditIcon.stories.tsx +116 -707
  123. package/dist/icons/maintenance-icon/MaintenanceIcon.stories.tsx +119 -1226
  124. package/dist/icons/message-icon/MessageIcon.stories.tsx +111 -557
  125. package/dist/icons/minimize-icon/MinimizeIcon.stories.tsx +112 -1198
  126. package/dist/icons/moon-icon/MoonIcon.stories.tsx +117 -557
  127. package/dist/icons/move-horizontal-icon/MoveHorizontalIcon.stories.tsx +106 -1235
  128. package/dist/icons/move-vertical-icon/MoveVerticalIcon.stories.tsx +112 -1185
  129. package/dist/icons/musical-note-icon/MusicalNoteIcon.stories.tsx +116 -1012
  130. package/dist/icons/notepad-icon/NotepadIcon.stories.tsx +108 -1137
  131. package/dist/icons/notes-icon/NotesIcon.stories.tsx +116 -1138
  132. package/dist/icons/page-search-icon/PageSearchIcon.stories.tsx +106 -1146
  133. package/dist/icons/page-text-icon/PageTextIcon.stories.tsx +119 -719
  134. package/dist/icons/paint-roll-icon/PaintRollIcon.stories.tsx +110 -999
  135. package/dist/icons/paper-plane-icon/PaperPlaneIcon.stories.tsx +109 -912
  136. package/dist/icons/pause-icon/PauseIcon.stories.tsx +110 -1041
  137. package/dist/icons/pencil-icon/PencilIcon.stories.tsx +112 -1109
  138. package/dist/icons/phone-icon/PhoneIcon.stories.tsx +112 -1023
  139. package/dist/icons/plus-icon/PlusIcon.stories.tsx +103 -1132
  140. package/dist/icons/pocket-studio-icon/PocketStudioIcon.stories.tsx +104 -870
  141. package/dist/icons/scroll-down-icon/ScrollDownIcon.stories.tsx +99 -476
  142. package/dist/icons/search-icon/SearchIcon.stories.tsx +108 -1161
  143. package/dist/icons/setting-icon/SettingIcon.stories.tsx +104 -1009
  144. package/dist/icons/share-icon/ShareIcon.stories.tsx +117 -1064
  145. package/dist/icons/shield-icon/ShieldIcon.stories.tsx +114 -974
  146. package/dist/icons/site-logo-icon/SiteLogoIcon.stories.tsx +134 -1160
  147. package/dist/icons/skip-backward-icon/SkipBackwardIcon.stories.tsx +169 -1017
  148. package/dist/icons/skip-forward-icon/SkipForwardIcon.stories.tsx +161 -1016
  149. package/dist/icons/sparkles-soft-icon/SparklesSoftIcon.stories.tsx +102 -1001
  150. package/dist/icons/spinner-gradient-icon/SpinnerGradientIcon.stories.tsx +155 -593
  151. package/dist/icons/spinner-solid-icon/SpinnerSolidIcon.stories.tsx +155 -608
  152. package/dist/icons/spinner-solid-neutral-icon/SpinnerSolidINeutralcon.stories.tsx +142 -712
  153. package/dist/icons/star-icon/StarIcon.stories.tsx +120 -946
  154. package/dist/icons/store-coin-icon/StoreCoinIcon.stories.tsx +109 -1013
  155. package/dist/icons/suggestion-icon/SuggestionIcon.stories.tsx +113 -891
  156. package/dist/icons/sun-icon/SunIcon.stories.tsx +117 -864
  157. package/dist/icons/text-color-icon/TextColorIcon.stories.tsx +113 -989
  158. package/dist/icons/text-indicator-icon/TextIndicatorIcon.stories.tsx +120 -1027
  159. package/dist/icons/threads-icon/ThreadsIcon.stories.tsx +153 -1476
  160. package/dist/icons/tick-circle-icon/TickCircleIcon.stories.tsx +143 -1187
  161. package/dist/icons/tick-icon/TickIcon.stories.tsx +142 -1322
  162. package/dist/icons/trash-icon/TrashIcon.stories.tsx +105 -970
  163. package/dist/icons/twitter-x-icon/TwitterXIcon.stories.tsx +154 -1457
  164. package/dist/icons/upload-icon/UploadIcon.stories.tsx +112 -930
  165. package/dist/icons/vertical-menu-icon/VerticalMenuIcon.stories.tsx +115 -1019
  166. package/dist/icons/video-play-list-icon/VideoPlaylistIcon.stories.tsx +122 -1092
  167. package/dist/icons/voice-playing-icon/VoicePlayingIcon.stories.tsx +120 -1401
  168. package/dist/icons/volume-full-icon/VolumeFullIcon.stories.tsx +107 -1212
  169. package/dist/icons/volume-half-icon/VolumeHalfIcon.stories.tsx +109 -1122
  170. package/dist/icons/volume-off-icon/VolumeOffIcon.stories.tsx +112 -1124
  171. package/dist/icons/warning-icon/WarningIcon.stories.tsx +119 -1083
  172. package/dist/icons/youtube-icon/YoutubeIcon.stories.tsx +158 -983
  173. package/dist/index.cjs +90 -90
  174. package/dist/index.js +90 -90
  175. package/package.json +8 -3
@@ -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> = {
@@ -18,825 +32,69 @@ const meta: Meta<typeof ShieldIcon> = {
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: var(--color-fm-surface-primary) ;
44
- }
45
- #storybook-docs {
46
- background: var(--color-fm-surface-primary) ;
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: var(--color-fm-icon-active) ;
54
- }
55
- .sbdocs-p, .sbdocs-li {
56
- color: var(--color-fm-secondary) ;
57
- }
58
- .sbdocs-code {
59
- background: var(--color-fm-surface-secondary) ;
60
- color: var(--color-fm-secondary-500) ;
61
- border: 1px solid var(--color-fm-divider-secondary) ;
62
- }
63
- .sbdocs-pre {
64
- background: var(--color-fm-surface-secondary) ;
65
- border: 1px solid var(--color-fm-divider-secondary) ;
66
- }
67
- .sbdocs-table {
68
- background: var(--color-fm-surface-secondary) ;
69
- border: 1px solid var(--color-fm-divider-secondary) ;
70
- }
71
- .sbdocs-table th {
72
- background: var(--color-fm-surface-secondary) ;
73
- color: var(--color-fm-icon-active) ;
74
- border-bottom: 1px solid var(--color-fm-divider-secondary) ;
75
- }
76
- .sbdocs-table td {
77
- color: var(--color-fm-secondary) ;
78
- border-bottom: 1px solid var(--color-fm-divider-tertiary) ;
79
- }
80
- `}
81
- </style>
82
-
83
- <div className="bg-fm-surface-primary min-h-screen">
84
- {/* Header */}
85
- <div className="border-fm-divider-secondary bg-fm-surface-secondary relative overflow-hidden border-b backdrop-blur-xl">
86
- <div className="from-fm-secondary-500/10 to-fm-secondary-500/10 absolute inset-0 bg-linear-to-r via-transparent" />
87
- <div className="relative !mx-auto max-w-7xl px-6 py-16">
88
- <div className="!space-y-6 text-center">
89
- <div className="border-fm-secondary-500/30 from-fm-secondary-500/20 to-fm-secondary-500/20 !mx-auto flex h-24 w-24 items-center justify-center rounded-2xl border bg-linear-to-br">
90
- <ShieldIcon className="h-12 w-12" />
91
- </div>
92
- <h1 className="text-fm-icon-active! text-5xl font-bold">
93
- ShieldIcon
94
- </h1>
95
- <p className="text-fm-secondary! !mx-auto max-w-3xl text-xl leading-relaxed">
96
- A universal shield icon with checkmark for security and
97
- protection interfaces. Features a classic shield design with
98
- verification mark, essential for security badges, verified
99
- accounts, protected content, and any interface where users
100
- need to identify secure or verified elements.
101
- </p>
102
-
103
- {/* Stats */}
104
- <div className="flex items-center justify-center gap-8 pt-8">
105
- <div className="text-center">
106
- <div className="text-fm-secondary-600 text-3xl font-bold">
107
- Security
108
- </div>
109
- <div className="text-fm-tertiary text-sm">
110
- Protection indicator
111
- </div>
112
- </div>
113
- <div className="bg-fm-divider-primary h-8 w-px" />
114
- <div className="text-center">
115
- <div className="text-fm-secondary-600 text-3xl font-bold">
116
- Verified
117
- </div>
118
- <div className="text-fm-tertiary text-sm">
119
- Trust badge
120
- </div>
121
- </div>
122
- <div className="bg-fm-divider-primary h-8 w-px" />
123
- <div className="text-center">
124
- <div className="text-fm-secondary-600 text-3xl font-bold">
125
- Accessible
126
- </div>
127
- <div className="text-fm-tertiary text-sm">
128
- Screen reader friendly
129
- </div>
130
- </div>
131
- </div>
132
- </div>
133
- </div>
134
- </div>
135
-
136
- {/* Content */}
137
- <div className="!mx-auto max-w-7xl !space-y-16 px-6 py-12">
138
- {/* Quick Usage */}
139
- <div className="!space-y-8">
140
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
141
- Quick Start
142
- </h2>
143
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
144
- <div className="!space-y-4">
145
- <h3 className="text-fm-secondary-600! text-xl font-semibold">
146
- Basic Usage
147
- </h3>
148
- <div className="bg-fm-surface-secondary rounded-lg p-4">
149
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
150
- {`import { ShieldIcon } from "@icons/shield-icon"
151
-
152
- 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() {
153
46
  return (
154
47
  <div className="flex items-center gap-2">
155
- <ShieldIcon className="h-6 w-6" />
156
- <span>Verified Account</span>
48
+ <ShieldIcon className="h-5 w-5 text-fm-icon-positive" />
49
+ <span>Verified content</span>
157
50
  </div>
158
51
  )
159
- }`}
160
- </pre>
161
- </div>
162
- </div>
163
-
164
- <div className="!space-y-4">
165
- <h3 className="text-fm-secondary-600! text-xl font-semibold">
166
- Live Preview
167
- </h3>
168
- <div className="border-fm-divider-secondary bg-fm-surface-secondary flex h-32 items-center justify-center rounded-lg border">
169
- <div className="border-fm-secondary-500/20 bg-fm-secondary-500/10 flex items-center gap-2 rounded-lg border px-4 py-2">
170
- <ShieldIcon className="h-6 w-6" />
171
- <span className="text-fm-icon-active text-sm">
172
- Verified
173
- </span>
174
- </div>
175
- </div>
176
- </div>
177
- </div>
178
- </div>
179
-
180
- {/* Props Documentation */}
181
- <div className="!space-y-8">
182
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
183
- Props & Configuration
184
- </h2>
185
-
186
- <div className="border-fm-divider-secondary bg-fm-surface-secondary overflow-hidden rounded-lg border">
187
- <div className="bg-fm-surface-secondary p-4">
188
- <h3 className="text-fm-icon-active! text-xl font-semibold">
189
- Props
190
- </h3>
191
- </div>
192
- <table className="!my-0 w-full">
193
- <thead className="bg-fm-surface-secondary">
194
- <tr className="border-fm-divider-secondary border-b">
195
- <th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
196
- Prop
197
- </th>
198
- <th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
199
- Type
200
- </th>
201
- <th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
202
- Default
203
- </th>
204
- <th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
205
- Description
206
- </th>
207
- </tr>
208
- </thead>
209
- <tbody>
210
- {" "}
211
- <tr className="bg-fm-surface-secondary!">
212
- <td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
213
- withAccessibility
214
- </td>
215
- <td className="text-fm-secondary! px-6 py-4 text-sm">
216
- boolean
217
- </td>
218
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
219
- true
220
- </td>
221
- <td className="text-fm-secondary! px-6 py-4 text-sm">
222
- Whether to wrap the icon with accessibility feature
223
- </td>
224
- </tr>
225
- <tr className="border-fm-divider-tertiary bg-fm-surface-secondary! border-b">
226
- <td className="text-fm-secondary-600! px-6 py-4 font-mono text-sm">
227
- height
228
- </td>
229
- <td className="text-fm-secondary! px-6 py-4 text-sm">
230
- number | string
231
- </td>
232
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
233
- 16
234
- </td>
235
- <td className="text-fm-secondary! px-6 py-4 text-sm">
236
- Height of the icon in pixels
237
- </td>
238
- </tr>
239
- <tr className="border-fm-divider-tertiary border-b">
240
- <td className="text-fm-secondary-600! px-6 py-4 font-mono text-sm">
241
- fill
242
- </td>
243
- <td className="text-fm-secondary! px-6 py-4 text-sm">
244
- string
245
- </td>
246
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
247
- #101115
248
- </td>
249
- <td className="text-fm-secondary! px-6 py-4 text-sm">
250
- Fill color of the icon
251
- </td>
252
- </tr>
253
- <tr className="border-fm-divider-tertiary bg-fm-surface-secondary! border-b">
254
- <td className="text-fm-secondary-600! px-6 py-4 font-mono text-sm">
255
- className
256
- </td>
257
- <td className="text-fm-secondary! px-6 py-4 text-sm">
258
- string
259
- </td>
260
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
261
- -
262
- </td>
263
- <td className="text-fm-secondary! px-6 py-4 text-sm">
264
- CSS classes for styling (use for overrides)
265
- </td>
266
- </tr>
267
- <tr className="bg-fm-surface-secondary!">
268
- <td className="text-fm-secondary-600! px-6 py-4 font-mono text-sm">
269
- ...svgProps
270
- </td>
271
- <td className="text-fm-secondary! px-6 py-4 text-sm">
272
- SVGProps
273
- </td>
274
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
275
- -
276
- </td>
277
- <td className="text-fm-secondary! px-6 py-4 text-sm">
278
- All standard SVG element props
279
- </td>
280
- </tr>
281
- </tbody>
282
- </table>
283
- </div>
284
- </div>
285
-
286
- {/* Size Variations */}
287
- <div className="!space-y-8">
288
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
289
- Size Variations
290
- </h2>
291
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-8">
292
- <div className="!space-y-6">
293
- <div className="grid grid-cols-1 gap-8 md:grid-cols-2">
294
- <div className="!space-y-4">
295
- <h3 className="text-fm-secondary-600! text-lg font-semibold">
296
- Standard Sizes
297
- </h3>
298
- <div className="bg-fm-surface-secondary flex items-end gap-6 rounded-lg p-6">
299
- <div className="text-center">
300
- <ShieldIcon className="!mx-auto mb-2 size-3" />
301
- <span className="text-fm-tertiary text-xs">
302
- 12px
303
- </span>
304
- </div>
305
- <div className="text-center">
306
- <ShieldIcon className="!mx-auto mb-2 size-4" />
307
- <span className="text-fm-tertiary text-xs">
308
- 16px
309
- </span>
310
- </div>
311
- <div className="text-center">
312
- <ShieldIcon className="!mx-auto mb-2 size-5" />
313
- <span className="text-fm-tertiary text-xs">
314
- 20px
315
- </span>
316
- </div>
317
- <div className="text-center">
318
- <ShieldIcon className="!mx-auto mb-2 size-6" />
319
- <span className="text-fm-tertiary text-xs">
320
- 24px
321
- </span>
322
- </div>
323
- <div className="text-center">
324
- <ShieldIcon className="!mx-auto mb-2 size-8" />
325
- <span className="text-fm-tertiary text-xs">
326
- 32px
327
- </span>
328
- </div>
329
- <div className="text-center">
330
- <ShieldIcon className="!mx-auto mb-2 h-12 w-12" />
331
- <span className="text-fm-tertiary text-xs">
332
- 48px
333
- </span>
334
- </div>
335
- </div>
336
- </div>
337
-
338
- <div className="!space-y-4">
339
- <h3 className="text-fm-secondary-600! text-lg font-semibold">
340
- Code Example
341
- </h3>
342
- <div className="bg-fm-surface-secondary rounded-lg p-4">
343
- <pre className="text-fm-icon-info! overflow-x-auto text-sm">
344
- {`// Small (16px)
345
- <ShieldIcon className="size-4" />
346
-
347
- // Medium (24px)
348
- <ShieldIcon className="size-6" />
349
-
350
- // Large (32px)
351
- <ShieldIcon className="size-8" />
352
-
353
- // Custom size
354
- <ShieldIcon width={40} height={40} />`}
355
- </pre>
356
- </div>
357
- </div>
358
- </div>
359
- </div>
360
- </div>
361
- </div>
362
-
363
- {/* Color Variations */}
364
- <div className="!space-y-8">
365
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
366
- Color Variations
367
- </h2>
368
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
369
- <div className="!space-y-4">
370
- <h3 className="text-fm-secondary-600! text-lg font-semibold">
371
- Semantic Colors
372
- </h3>
373
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
374
- <div className="flex items-center gap-4">
375
- <ShieldIcon className="h-6 w-6" />
376
- <div>
377
- <div className="text-fm-icon-active text-sm font-medium">
378
- Primary
379
- </div>
380
- <div className="text-fm-tertiary text-xs"></div>
381
- </div>
382
- </div>
383
- <div className="flex items-center gap-4">
384
- <ShieldIcon className="text-fm-secondary-600 h-6 w-6" />
385
- <div>
386
- <div className="text-fm-icon-active text-sm font-medium">
387
- Secondary
388
- </div>
389
- <div className="text-fm-tertiary text-xs">
390
- text-fm-secondary-600
391
- </div>
392
- </div>
393
- </div>
394
- <div className="flex items-center gap-4">
395
- <ShieldIcon className="text-fm-icon-positive h-6 w-6" />
396
- <div>
397
- <div className="text-fm-icon-active text-sm font-medium">
398
- Success
399
- </div>
400
- <div className="text-fm-tertiary text-xs">
401
- text-fm-icon-positive
402
- </div>
403
- </div>
404
- </div>
405
- <div className="flex items-center gap-4">
406
- <ShieldIcon className="text-fm-placeholder h-6 w-6" />
407
- <div>
408
- <div className="text-fm-icon-active text-sm font-medium">
409
- Disabled
410
- </div>
411
- <div className="text-fm-tertiary text-xs">
412
- text-fm-placeholder
413
- </div>
414
- </div>
415
- </div>
416
- </div>
417
- </div>
418
-
419
- <div className="!space-y-4">
420
- <h3 className="text-fm-secondary-600! text-lg font-semibold">
421
- Custom Colors
422
- </h3>
423
- <div className="bg-fm-surface-secondary rounded-lg p-4">
424
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
425
- {`// Using Tailwind classes
426
- <ShieldIcon className="h-6 w-6" />
427
- <ShieldIcon className="h-6 w-6 text-violet-500" />
428
- <ShieldIcon className="h-6 w-6 text-green-500" />
429
-
430
- // Using CSS custom properties
431
- <ShieldIcon
432
- className="h-6 w-6"
433
- style={{ fill: 'var(--color-primary)' }}
434
- />
435
-
436
- // Direct fill prop
437
- <ShieldIcon
438
- width={24}
439
- height={24}
440
- fill="#a855f7"
441
- />`}
442
- </pre>
443
- </div>
444
- </div>
445
- </div>
446
- </div>
447
-
448
- {/* Usage Examples */}
449
- <div className="!space-y-8">
450
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
451
- Usage Examples
452
- </h2>
453
-
454
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
455
- {/* Verified Badge */}
456
- <div className="!space-y-4">
457
- <h3 className="text-fm-secondary-600! text-lg font-semibold">
458
- Verified Badge
459
- </h3>
460
- <div className="!space-y-4">
461
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-6">
462
- <div className="mb-4 flex items-center gap-3">
463
- <div className="from-fm-secondary-500/20 to-fm-secondary-500/20 h-12 w-12 rounded-full bg-linear-to-br" />
464
- <div>
465
- <div className="flex items-center gap-2">
466
- <div className="text-fm-icon-active! text-sm font-medium">
467
- John Doe
468
- </div>
469
- <ShieldIcon className="text-fm-icon-positive h-4 w-4" />
470
- </div>
471
- <div className="text-fm-tertiary! text-xs">
472
- Verified Account
473
- </div>
474
- </div>
475
- </div>
476
- </div>
477
- <div className="bg-fm-surface-secondary rounded-lg p-4">
478
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
479
- {`// Verified user badge
480
- <div className="user-profile">
481
- <Avatar />
482
- <div>
483
- <div className="flex items-center gap-2">
484
- <h3>{name}</h3>
485
- <ShieldIcon
486
- className="h-4 w-4 text-green-400"
487
- aria-label="Verified account"
488
- />
489
- </div>
490
- <p>Verified Account</p>
491
- </div>
492
- </div>`}
493
- </pre>
494
- </div>
495
- </div>
496
- </div>
497
-
498
- {/* Security Status */}
499
- <div className="!space-y-4">
500
- <h3 className="text-fm-secondary-600! text-lg font-semibold">
501
- Security Status
502
- </h3>
503
- <div className="!space-y-4">
504
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-4">
505
- <div className="!space-y-3">
506
- <div className="flex items-center justify-between">
507
- <div>
508
- <div className="text-fm-icon-active! text-sm font-medium">
509
- Account Security
510
- </div>
511
- <div className="text-fm-tertiary! text-xs">
512
- Protected
513
- </div>
514
- </div>
515
- <ShieldIcon className="text-fm-icon-positive h-5 w-5" />
516
- </div>
517
- <div className="flex items-center justify-between">
518
- <div>
519
- <div className="text-fm-icon-active! text-sm font-medium">
520
- Data Encryption
521
- </div>
522
- <div className="text-fm-tertiary! text-xs">
523
- Active
524
- </div>
525
- </div>
526
- <ShieldIcon className="text-fm-icon-positive h-5 w-5" />
527
- </div>
528
- </div>
529
- </div>
530
- <div className="bg-fm-surface-secondary rounded-lg p-4">
531
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
532
- {`// Security status list
533
- <div className="security-status">
534
- {features.map((feature) => (
535
- <div key={feature.id} className="feature-item">
536
- <div>
537
- <h4>{feature.name}</h4>
538
- <p>{feature.status}</p>
539
- </div>
540
- <ShieldIcon
541
- className="h-5 w-5 text-green-400"
542
- aria-label={\`\${feature.name} is active\`}
543
- />
544
- </div>
545
- ))}
546
- </div>`}
547
- </pre>
548
- </div>
549
- </div>
550
- </div>
551
-
552
- {/* Protected Content */}
553
- <div className="!space-y-4">
554
- <h3 className="text-fm-secondary-600! text-lg font-semibold">
555
- Protected Content
556
- </h3>
557
- <div className="!space-y-4">
558
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-4">
559
- <div className="mb-4 text-center">
560
- <div className="text-fm-icon-active! text-sm font-medium">
561
- Premium Content
562
- </div>
563
- <div className="text-fm-tertiary! text-xs">
564
- Protected by subscription
565
- </div>
566
- </div>
567
- <div className="flex items-center justify-center">
568
- <div className="border-fm-secondary-500/30 bg-fm-secondary-500/10 flex items-center gap-2 rounded-lg border px-4 py-3">
569
- <ShieldIcon className="h-6 w-6" />
570
- <span className="text-fm-icon-active text-sm">
571
- Protected
572
- </span>
573
- </div>
574
- </div>
575
- </div>
576
- <div className="bg-fm-surface-secondary rounded-lg p-4">
577
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
578
- {`// Protected content badge
579
- <div className="content-badge">
580
- <ShieldIcon className="h-6 w-6" />
581
- <span>Protected</span>
582
- </div>`}
583
- </pre>
584
- </div>
585
- </div>
586
- </div>
587
-
588
- {/* Trust Indicator */}
589
- <div className="!space-y-4">
590
- <h3 className="text-fm-secondary-600! text-lg font-semibold">
591
- Trust Indicator
592
- </h3>
593
- <div className="!space-y-4">
594
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-4">
595
- <div className="mb-4">
596
- <label className="text-fm-tertiary mb-2 block text-xs">
597
- Website Security
598
- </label>
599
- <div className="border-fm-divider-secondary bg-fm-surface-secondary flex items-center gap-2 rounded-lg border px-3 py-2">
600
- <ShieldIcon className="text-fm-icon-positive h-4 w-4" />
601
- <span className="text-fm-icon-active flex-1 text-sm">
602
- Secure Connection
603
- </span>
604
- </div>
605
- </div>
606
- </div>
607
- <div className="bg-fm-surface-secondary rounded-lg p-4">
608
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
609
- {`// Trust indicator
610
- <div className="security-indicator">
611
- <label>Website Security</label>
612
- <div className="indicator-wrapper">
613
- <ShieldIcon
614
- className="h-4 w-4 text-green-400"
615
- aria-label="Secure connection"
616
- />
617
- <span>Secure Connection</span>
618
- </div>
619
- </div>`}
620
- </pre>
621
- </div>
622
- </div>
623
- </div>
624
- </div>
625
- </div>
626
-
627
- {/* Accessibility */}
628
- <div className="!space-y-8">
629
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
630
- Accessibility Features
631
- </h2>
632
- <div className="grid grid-cols-1 gap-8 md:grid-cols-2">
633
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
634
- <h3 className="text-fm-icon-positive! text-lg font-semibold">
635
- ✅ Built-in Features
636
- </h3>
637
- <ul className="text-fm-secondary! !space-y-2 text-sm">
638
- <li className="text-fm-secondary!">
639
- Uses Radix UI AccessibleIcon wrapper
640
- </li>
641
- <li className="text-fm-secondary!">
642
- Provides screen reader label "Shield icon"
643
- </li>
644
- <li className="text-fm-secondary!">
645
- Supports keyboard navigation when interactive
646
- </li>
647
- <li className="text-fm-secondary!">
648
- Maintains proper color contrast ratios
649
- </li>
650
- <li className="text-fm-secondary!">
651
- Scales with user's font size preferences
652
- </li>
653
- </ul>
654
- </div>
655
-
656
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
657
- <h3 className="text-fm-secondary-600! text-lg font-semibold">
658
- 💡 Best Practices
659
- </h3>
660
- <ul className="text-fm-secondary !space-y-2 text-sm">
661
- <li className="text-fm-secondary!">
662
- Always provide descriptive aria-labels for security
663
- badges
664
- </li>
665
- <li className="text-fm-secondary!">
666
- Include security status in accessible text when possible
667
- </li>
668
- <li className="text-fm-secondary!">
669
- Use appropriate colors to convey security status
670
- </li>
671
- <li className="text-fm-secondary!">
672
- Provide visible focus states for keyboard users
673
- </li>
674
- <li className="text-fm-secondary!">
675
- Consider context when indicating verification status
676
- </li>
677
- </ul>
678
- </div>
679
- </div>
680
-
681
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-6">
682
- <h3 className="text-fm-secondary-600! mb-4 text-lg font-semibold">
683
- Proper ARIA Implementation
684
- </h3>
685
- <div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
686
- <div className="bg-fm-surface-secondary rounded-lg p-4">
687
- <pre className="text-fm-icon-info! overflow-x-auto text-sm">
688
- {`// Verified badge with proper ARIA
689
- <div className="user-badge">
690
- <span>{userName}</span>
691
- <ShieldIcon
692
- className="h-4 w-4 text-green-400"
693
- aria-label="Verified account"
694
- />
695
- </div>
696
-
697
- // Security status with context
698
- <div className="security-status">
699
- <ShieldIcon
700
- className="h-5 w-5 text-green-400"
701
- aria-label="Account security is active"
702
- />
703
- <span className="sr-only">Account security is active</span>
704
- </div>
705
-
706
- // Protected content indicator
707
- <div className="protected-content">
708
- <ShieldIcon
709
- className="h-6 w-6"
710
- aria-label="This content is protected"
711
- />
712
- <span>Protected Content</span>
713
- </div>`}
714
- </pre>
715
- </div>
716
- <div className="!space-y-4">
717
- <p className="text-fm-secondary! text-sm">
718
- When using ShieldIcon for security indicators, always
719
- provide clear context about what is being protected or
720
- verified, and ensure the security status is accessible
721
- to screen readers.
722
- </p>
723
- <div className="border-fm-secondary-500/20 bg-fm-secondary-500/10 rounded-lg border p-4">
724
- <div className="text-fm-secondary-600 flex items-center gap-2 text-sm">
725
- <ShieldIcon className="h-4 w-4" />
726
- <span>
727
- Screen readers need context about security status
728
- and verification
729
- </span>
730
- </div>
731
- </div>
732
- </div>
733
- </div>
734
- </div>
735
- </div>
736
-
737
- {/* Related Icons */}
738
- <div className="!space-y-8">
739
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
740
- Related Icons
741
- </h2>
742
- <div className="grid grid-cols-2 gap-6 md:grid-cols-4">
743
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
744
- <div className="bg-fm-icon-positive/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
745
- <span className="text-fm-icon-active! !text-2xl">✓</span>
746
- </div>
747
- <div>
748
- <div className="text-fm-icon-active font-medium">
749
- TickIcon
750
- </div>
751
- <div className="text-fm-tertiary text-xs">
752
- Verification
753
- </div>
754
- </div>
755
- </div>
756
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
757
- <div className="bg-fm-icon-info/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
758
- <span className="text-fm-icon-active! !text-2xl">🔒</span>
759
- </div>
760
- <div>
761
- <div className="text-fm-icon-active font-medium">
762
- LockIcon
763
- </div>
764
- <div className="text-fm-tertiary text-xs">Security</div>
765
- </div>
766
- </div>
767
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
768
- <div className="bg-fm-secondary-500/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
769
- <span className="text-fm-icon-active! !text-2xl">⭐</span>
770
- </div>
771
- <div>
772
- <div className="text-fm-icon-active font-medium">
773
- StarIcon
774
- </div>
775
- <div className="text-fm-tertiary text-xs">Premium</div>
776
- </div>
777
- </div>
778
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
779
- <div className="bg-fm-icon-warning/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
780
- <span className="text-fm-icon-active! !text-2xl">⚠️</span>
781
- </div>
782
- <div>
783
- <div className="text-fm-icon-active font-medium">
784
- WarningIcon
785
- </div>
786
- <div className="text-fm-tertiary text-xs">
787
- Security alert
788
- </div>
789
- </div>
790
- </div>
791
- </div>
792
- </div>
793
- </div>
794
-
795
- {/* Footer */}
796
- <div className="border-fm-divider-secondary bg-fm-surface-secondary border-t backdrop-blur-xl">
797
- <div className="!mx-auto max-w-7xl px-6 py-8">
798
- <div className="!space-y-4 text-center">
799
- <p className="text-fm-tertiary!">
800
- ShieldIcon is part of the Aural UI icon library, built with
801
- accessibility and security best practices in mind.
802
- </p>
803
- <p className="text-fm-placeholder! text-sm">
804
- All icons use Radix UI's AccessibleIcon for screen reader
805
- compatibility and follow WCAG guidelines.
806
- </p>
807
- </div>
52
+ }`,
53
+ livePreview: (
54
+ <div className="flex items-center gap-2">
55
+ <ShieldIcon className="text-fm-icon-positive h-6 w-6" />
808
56
  </div>
809
- </div>
810
- </div>
811
- </>
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
+ />
812
86
  ),
813
87
  },
814
88
  },
815
89
  tags: ["autodocs"],
816
90
  argTypes: {
817
- width: {
818
- control: { type: "range", min: 8, max: 96, step: 2 },
819
- description: "Width of the icon in pixels",
820
- },
821
- withAccessibility: {
822
- control: "boolean",
823
- description: "Whether to wrap the icon with accessibility features",
824
- },
825
- height: {
826
- control: { type: "range", min: 8, max: 96, step: 2 },
827
- description: "Height of the icon in pixels",
828
- },
829
- fill: {
830
- control: "color",
831
- description: "Fill color of the icon",
832
- },
833
91
  className: {
834
92
  control: "text",
835
- description: "CSS classes for styling (use for overrides)",
93
+ description: "CSS classes including color token",
836
94
  },
837
- onClick: {
838
- action: "clicked",
839
- description: "Click handler for interactive use",
95
+ withAccessibility: {
96
+ control: "boolean",
97
+ description: "Wrap with accessibility label",
840
98
  },
841
99
  },
842
100
  }
@@ -844,202 +102,84 @@ function SecurityBadge() {
844
102
  export default meta
845
103
  type Story = StoryObj<typeof ShieldIcon>
846
104
 
847
- // Story parameters for consistent dark theme
848
- const storyParameters = {
849
- backgrounds: {
850
- default: "dark",
851
- values: [
852
- { name: "dark", value: "var(--color-fm-surface-primary)" },
853
- { name: "darker", value: "var(--color-fm-neutral-0)" },
854
- ],
855
- },
856
- }
857
-
858
105
  export const Default: Story = {
859
106
  args: {
860
- className: "h-8 w-8",
107
+ className: "h-6 w-6 text-fm-icon-positive",
861
108
  withAccessibility: true,
862
109
  },
863
- parameters: storyParameters,
864
110
  render: (args) => (
865
- <div className="from-fm-surface-primary to-fm-surface-secondary flex h-32 min-h-dvh items-center justify-center rounded-lg bg-linear-to-br">
111
+ <IconDefaultCanvas>
866
112
  <ShieldIcon {...args} />
867
- </div>
113
+ </IconDefaultCanvas>
868
114
  ),
869
115
  }
870
116
 
871
117
  export const SizeVariations: Story = {
872
- parameters: {
873
- ...storyParameters,
874
- docs: {
875
- description: {
876
- story:
877
- "ShieldIcon in different sizes, from small UI elements to large displays.",
878
- },
879
- },
880
- },
881
- render: () => (
882
- <div className="from-fm-surface-primary to-fm-surface-secondary flex h-64 min-h-dvh items-center justify-center gap-8 rounded-lg bg-linear-to-br p-8">
883
- <div className="text-center">
884
- <ShieldIcon className="!mx-auto mb-2 h-3 w-3" />
885
- <span className="text-fm-tertiary text-xs">12px</span>
886
- </div>
887
- <div className="text-center">
888
- <ShieldIcon className="!mx-auto mb-2 h-4 w-4" />
889
- <span className="text-fm-tertiary text-xs">16px</span>
890
- </div>
891
- <div className="text-center">
892
- <ShieldIcon className="!mx-auto mb-2 h-5 w-5" />
893
- <span className="text-fm-tertiary text-xs">20px</span>
894
- </div>
895
- <div className="text-center">
896
- <ShieldIcon className="!mx-auto mb-2 h-6 w-6" />
897
- <span className="text-fm-tertiary text-xs">24px</span>
898
- </div>
899
- <div className="text-center">
900
- <ShieldIcon className="!mx-auto mb-2 h-8 w-8" />
901
- <span className="text-fm-tertiary text-xs">32px</span>
902
- </div>
903
- <div className="text-center">
904
- <ShieldIcon className="!mx-auto mb-2 h-12 w-12" />
905
- <span className="text-fm-tertiary text-xs">48px</span>
906
- </div>
907
- </div>
908
- ),
118
+ render: () => <IconSizeVariations icon={ShieldIcon} />,
909
119
  }
910
120
 
911
121
  export const ColorVariations: Story = {
912
- parameters: {
913
- ...storyParameters,
914
- docs: {
915
- description: {
916
- story: "ShieldIcon in different semantic colors for various use cases.",
917
- },
918
- },
919
- },
920
- render: () => (
921
- <div className="from-fm-surface-primary to-fm-surface-secondary grid min-h-dvh grid-cols-2 items-center justify-center gap-6 rounded-lg bg-linear-to-br p-8 md:grid-cols-4">
922
- <div className="text-center">
923
- <div className="border-fm-secondary-500/30 bg-fm-secondary-500/20 !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
924
- <ShieldIcon className="h-8 w-8" />
925
- </div>
926
- <div className="text-fm-icon-active text-sm font-medium">Primary</div>
927
- <div className="text-xs">Default</div>
928
- </div>
929
- <div className="text-center">
930
- <div className="border-fm-secondary-500/30 bg-fm-secondary-500/20 !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
931
- <ShieldIcon className="text-fm-secondary-600 h-8 w-8" />
932
- </div>
933
- <div className="text-fm-icon-active text-sm font-medium">Secondary</div>
934
- <div className="text-fm-secondary-600 text-xs">
935
- text-fm-secondary-600
936
- </div>
937
- </div>
938
- <div className="text-center">
939
- <div className="border-fm-icon-positive/30 bg-fm-icon-positive/20 !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
940
- <ShieldIcon className="text-fm-icon-positive h-8 w-8" />
941
- </div>
942
- <div className="text-fm-icon-active text-sm font-medium">Success</div>
943
- <div className="text-fm-icon-positive text-xs">
944
- text-fm-icon-positive
945
- </div>
946
- </div>
947
- <div className="text-center">
948
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
949
- <ShieldIcon className="text-fm-placeholder h-8 w-8" />
950
- </div>
951
- <div className="text-fm-icon-active text-sm font-medium">Disabled</div>
952
- <div className="text-fm-placeholder text-xs">text-fm-placeholder</div>
953
- </div>
954
- </div>
955
- ),
122
+ render: () => <IconColorVariations icon={ShieldIcon} />,
956
123
  }
957
124
 
958
125
  export const UsageExamples: Story = {
959
- parameters: {
960
- ...storyParameters,
961
- docs: {
962
- description: {
963
- story:
964
- "Real-world usage examples showing ShieldIcon in different security and verification contexts.",
965
- },
966
- },
967
- },
968
126
  render: () => (
969
- <div className="from-fm-surface-primary to-fm-surface-secondary min-h-dvh !space-y-8 rounded-lg bg-linear-to-br p-8">
970
- {/* Verified Badge */}
971
- <div className="!space-y-2">
972
- <h3 className="text-fm-icon-active text-sm font-medium">
973
- Verified Badge
974
- </h3>
975
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-6">
976
- <div className="mb-4 flex items-center gap-3">
977
- <div className="from-fm-secondary-500/20 to-fm-secondary-500/20 h-12 w-12 rounded-full bg-linear-to-br" />
978
- <div>
979
- <div className="flex items-center gap-2">
980
- <div className="text-fm-icon-active text-sm font-medium">
981
- John Doe
982
- </div>
983
- <ShieldIcon className="text-fm-icon-positive h-4 w-4" />
984
- </div>
985
- <div className="text-fm-tertiary text-xs">Verified Account</div>
986
- </div>
987
- </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>
988
134
  </div>
989
- </div>
990
-
991
- {/* Security Status */}
992
- <div className="!space-y-2">
993
- <h3 className="text-fm-icon-active text-sm font-medium">
994
- Security Status
995
- </h3>
996
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-4">
997
- <div className="!space-y-3">
998
- <div className="flex items-center justify-between">
999
- <div>
1000
- <div className="text-fm-icon-active text-sm font-medium">
1001
- Account Security
1002
- </div>
1003
- <div className="text-fm-tertiary text-xs">Protected</div>
1004
- </div>
1005
- <ShieldIcon className="text-fm-icon-positive h-5 w-5" />
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
1006
164
  </div>
1007
- <div className="flex items-center justify-between">
1008
- <div>
1009
- <div className="text-fm-icon-active text-sm font-medium">
1010
- Data Encryption
1011
- </div>
1012
- <div className="text-fm-tertiary text-xs">Active</div>
1013
- </div>
1014
- <ShieldIcon className="text-fm-icon-positive h-5 w-5" />
165
+ <div className="text-fm-secondary font-fm-text text-xs">
166
+ Content reviewed and verified
1015
167
  </div>
1016
168
  </div>
1017
169
  </div>
1018
- </div>
1019
- </div>
170
+ </IconUsageSection>
171
+ </IconUsageCanvas>
1020
172
  ),
1021
173
  }
1022
174
 
1023
175
  export const Playground: Story = {
1024
- parameters: {
1025
- ...storyParameters,
1026
- docs: {
1027
- description: {
1028
- story:
1029
- "Interactive playground to experiment with different ShieldIcon configurations.",
1030
- },
1031
- },
1032
- },
1033
176
  args: {
1034
- width: 24,
1035
- height: 24,
1036
- className: "text-fm-secondary-600",
177
+ className: "h-8 w-8 text-fm-icon-positive",
178
+ withAccessibility: true,
1037
179
  },
1038
180
  render: (args) => (
1039
- <div className="from-fm-surface-primary to-fm-surface-secondary flex h-64 min-h-dvh items-center justify-center rounded-lg bg-linear-to-br">
1040
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-8">
1041
- <ShieldIcon {...args} />
1042
- </div>
1043
- </div>
181
+ <IconPlaygroundCanvas>
182
+ <ShieldIcon {...args} />
183
+ </IconPlaygroundCanvas>
1044
184
  ),
1045
185
  }