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