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 { MaintenanceIcon } from "src/ui/icons/maintenance-icon"
6
+ import { ShieldIcon } from "src/ui/icons/shield-icon"
7
+ import { TrashIcon } from "src/ui/icons/trash-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 { WarningIcon } from "."
5
19
 
6
20
  const meta: Meta<typeof WarningIcon> = {
@@ -18,939 +32,69 @@ const meta: Meta<typeof WarningIcon> = {
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="from-fm-surface-primary via-fm-icon-warning/5 to-fm-surface-primary min-h-screen bg-linear-to-br">
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-icon-warning/10 to-fm-icon-warning/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-warning/20 !mx-auto flex h-24 w-24 items-center justify-center rounded-2xl border bg-linear-to-br">
90
- <WarningIcon className="text-fm-icon-warning h-12 w-12" />
91
- </div>
92
- <h1 className="text-fm-icon-active! text-5xl font-bold">
93
- WarningIcon
94
- </h1>
95
- <p className="text-fm-secondary! !mx-auto max-w-3xl text-xl leading-relaxed">
96
- A universal warning alert icon for user interfaces. Features
97
- the classic triangular warning design with exclamation mark,
98
- essential for error states, validation messages,
99
- confirmation dialogs, and any interface where users need to
100
- be alerted to important information.
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-icon-warning text-3xl font-bold">
107
- Alert Users
108
- </div>
109
- <div className="text-fm-tertiary text-sm">
110
- Critical warnings
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-icon-warning text-3xl font-bold">
116
- Accessible
117
- </div>
118
- <div className="text-fm-tertiary text-sm">
119
- Screen reader friendly
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-icon-warning text-3xl font-bold">
125
- Universal
126
- </div>
127
- <div className="text-fm-tertiary text-sm">
128
- Standard alert symbol
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-icon-warning! 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 { WarningIcon } from "@icons/warning-icon"
151
-
152
- function ErrorAlert() {
35
+ <AuralIconDocsPage
36
+ accentToken="warning"
37
+ features={[
38
+ { title: "Warning", description: "Caution or risk alert" },
39
+ { title: "Attention", description: "User attention required" },
40
+ { title: "Accessible", description: "ARIA-ready by default" },
41
+ ]}
42
+ quickStart={{
43
+ codeExample: `import { WarningIcon } from "src/ui/icons/warning-icon"
44
+
45
+ function WarningBanner() {
153
46
  return (
154
- <div className="flex items-center gap-2 p-3 bg-yellow-50 border border-yellow-200 rounded-lg">
155
- <WarningIcon className="h-5 w-5 text-yellow-600" />
156
- <span>Please check your input and try again.</span>
47
+ <div className="flex items-center gap-2">
48
+ <WarningIcon className="h-5 w-5 text-fm-icon-warning" />
49
+ <span>Action required</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-icon-warning! 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-icon-warning/20 bg-fm-icon-warning/10 flex items-center gap-2 rounded-lg border p-3">
170
- <WarningIcon className="text-fm-icon-warning h-5 w-5" />
171
- <span className="text-fm-icon-warning">
172
- Warning message
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-icon-warning! 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
- 24
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-icon-warning! px-6 py-4 font-mono text-sm">
241
- stroke
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
- currentColor
248
- </td>
249
- <td className="text-fm-secondary! px-6 py-4 text-sm">
250
- Stroke 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-icon-warning! px-6 py-4 font-mono text-sm">
255
- strokeWidth
256
- </td>
257
- <td className="text-fm-secondary! px-6 py-4 text-sm">
258
- string | number
259
- </td>
260
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
261
- 1.5
262
- </td>
263
- <td className="text-fm-secondary! px-6 py-4 text-sm">
264
- Width of the stroke
265
- </td>
266
- </tr>
267
- <tr className="border-fm-divider-tertiary border-b">
268
- <td className="text-fm-icon-warning! px-6 py-4 font-mono text-sm">
269
- strokeLinecap
270
- </td>
271
- <td className="text-fm-secondary! px-6 py-4 text-sm">
272
- string
273
- </td>
274
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
275
- square
276
- </td>
277
- <td className="text-fm-secondary! px-6 py-4 text-sm">
278
- Style of line endings
279
- </td>
280
- </tr>
281
- <tr className="border-fm-divider-tertiary bg-fm-surface-secondary! border-b">
282
- <td className="text-fm-icon-warning! px-6 py-4 font-mono text-sm">
283
- className
284
- </td>
285
- <td className="text-fm-secondary! px-6 py-4 text-sm">
286
- string
287
- </td>
288
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
289
- -
290
- </td>
291
- <td className="text-fm-secondary! px-6 py-4 text-sm">
292
- CSS classes for styling (use for overrides)
293
- </td>
294
- </tr>
295
- <tr className="bg-fm-surface-secondary!">
296
- <td className="text-fm-icon-warning! px-6 py-4 font-mono text-sm">
297
- ...svgProps
298
- </td>
299
- <td className="text-fm-secondary! px-6 py-4 text-sm">
300
- SVGProps
301
- </td>
302
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
303
- -
304
- </td>
305
- <td className="text-fm-secondary! px-6 py-4 text-sm">
306
- All standard SVG element props
307
- </td>
308
- </tr>
309
- </tbody>
310
- </table>
311
- </div>
312
- </div>
313
-
314
- {/* Size Variations */}
315
- <div className="!space-y-8">
316
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
317
- Size Variations
318
- </h2>
319
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-8">
320
- <div className="!space-y-6">
321
- <div className="grid grid-cols-1 gap-8 md:grid-cols-2">
322
- <div className="!space-y-4">
323
- <h3 className="text-fm-icon-warning! text-lg font-semibold">
324
- Standard Sizes
325
- </h3>
326
- <div className="bg-fm-surface-secondary flex items-end gap-6 rounded-lg p-6">
327
- <div className="text-center">
328
- <WarningIcon className="text-fm-icon-warning !mx-auto mb-2 h-3 w-3" />
329
- <span className="text-fm-tertiary text-xs">
330
- 12px
331
- </span>
332
- </div>
333
- <div className="text-center">
334
- <WarningIcon className="text-fm-icon-warning !mx-auto mb-2 h-4 w-4" />
335
- <span className="text-fm-tertiary text-xs">
336
- 16px
337
- </span>
338
- </div>
339
- <div className="text-center">
340
- <WarningIcon className="text-fm-icon-warning !mx-auto mb-2 h-5 w-5" />
341
- <span className="text-fm-tertiary text-xs">
342
- 20px
343
- </span>
344
- </div>
345
- <div className="text-center">
346
- <WarningIcon className="text-fm-icon-warning !mx-auto mb-2 h-6 w-6" />
347
- <span className="text-fm-tertiary text-xs">
348
- 24px
349
- </span>
350
- </div>
351
- <div className="text-center">
352
- <WarningIcon className="text-fm-icon-warning !mx-auto mb-2 h-8 w-8" />
353
- <span className="text-fm-tertiary text-xs">
354
- 32px
355
- </span>
356
- </div>
357
- <div className="text-center">
358
- <WarningIcon className="text-fm-icon-warning !mx-auto mb-2 h-12 w-12" />
359
- <span className="text-fm-tertiary text-xs">
360
- 48px
361
- </span>
362
- </div>
363
- </div>
364
- </div>
365
-
366
- <div className="!space-y-4">
367
- <h3 className="text-fm-icon-warning! text-lg font-semibold">
368
- Code Example
369
- </h3>
370
- <div className="bg-fm-surface-secondary rounded-lg p-4">
371
- <pre className="text-fm-icon-info! overflow-x-auto text-sm">
372
- {`// Small (16px) - inline warnings
373
- <WarningIcon className="h-4 w-4" />
374
-
375
- // Medium (24px) - form validation
376
- <WarningIcon className="h-6 w-6" />
377
-
378
- // Large (32px) - alert banners
379
- <WarningIcon className="h-8 w-8" />
380
-
381
- // Custom size
382
- <WarningIcon width={40} height={40} />`}
383
- </pre>
384
- </div>
385
- </div>
386
- </div>
387
- </div>
388
- </div>
52
+ }`,
53
+ livePreview: (
54
+ <div className="flex items-center gap-2">
55
+ <WarningIcon className="text-fm-icon-warning h-6 w-6" />
389
56
  </div>
390
-
391
- {/* Color Variations */}
392
- <div className="!space-y-8">
393
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
394
- Color Variations
395
- </h2>
396
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
397
- <div className="!space-y-4">
398
- <h3 className="text-fm-icon-warning! text-lg font-semibold">
399
- Semantic Colors
400
- </h3>
401
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
402
- <div className="flex items-center gap-4">
403
- <WarningIcon className="text-fm-icon-warning h-6 w-6" />
404
- <div>
405
- <div className="text-fm-icon-active text-sm font-medium">
406
- Warning
407
- </div>
408
- <div className="text-fm-tertiary text-xs">
409
- text-fm-icon-warning
410
- </div>
411
- </div>
412
- </div>
413
- <div className="flex items-center gap-4">
414
- <WarningIcon className="text-fm-icon-warning h-6 w-6" />
415
- <div>
416
- <div className="text-fm-icon-active text-sm font-medium">
417
- Caution
418
- </div>
419
- <div className="text-fm-tertiary text-xs">
420
- text-fm-icon-warning
421
- </div>
422
- </div>
423
- </div>
424
- <div className="flex items-center gap-4">
425
- <WarningIcon className="text-fm-icon-warning h-6 w-6" />
426
- <div>
427
- <div className="text-fm-icon-active text-sm font-medium">
428
- Alert
429
- </div>
430
- <div className="text-fm-tertiary text-xs">
431
- text-fm-icon-warning
432
- </div>
433
- </div>
434
- </div>
435
- <div className="flex items-center gap-4">
436
- <WarningIcon className="text-fm-icon-negative h-6 w-6" />
437
- <div>
438
- <div className="text-fm-icon-active text-sm font-medium">
439
- Critical
440
- </div>
441
- <div className="text-fm-tertiary text-xs">
442
- text-fm-icon-negative
443
- </div>
444
- </div>
445
- </div>
446
- </div>
447
- </div>
448
-
449
- <div className="!space-y-4">
450
- <h3 className="text-fm-icon-warning! text-lg font-semibold">
451
- Custom Colors
452
- </h3>
453
- <div className="bg-fm-surface-secondary rounded-lg p-4">
454
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
455
- {`// Using Tailwind classes
456
- <WarningIcon className="h-6 w-6 text-yellow-400" />
457
- <WarningIcon className="h-6 w-6 text-amber-500" />
458
-
459
- // Using CSS custom properties
460
- <WarningIcon
461
- className="h-6 w-6"
462
- style={{ color: 'var(--color-warning)' }}
463
- />
464
-
465
- // Direct stroke prop
466
- <WarningIcon
467
- width={24}
468
- height={24}
469
- stroke="#eab308"
470
- />`}
471
- </pre>
472
- </div>
473
- </div>
474
- </div>
475
- </div>
476
-
477
- {/* Usage Examples */}
478
- <div className="!space-y-8">
479
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
480
- Usage Examples
481
- </h2>
482
-
483
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
484
- {/* Form Validation */}
485
- <div className="!space-y-4">
486
- <h3 className="text-fm-icon-warning! text-lg font-semibold">
487
- Form Validation
488
- </h3>
489
- <div className="!space-y-4">
490
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-6">
491
- <div className="!space-y-4">
492
- <div>
493
- <label className="text-fm-icon-active mb-2 block text-sm font-medium">
494
- Email Address
495
- </label>
496
- <input
497
- type="email"
498
- className="border-fm-icon-negative/50 bg-fm-surface-secondary text-fm-icon-active w-full rounded-lg border p-3 placeholder-white/50"
499
- placeholder="Enter your email"
500
- />
501
- <div className="text-fm-icon-negative mt-2 flex items-center gap-2">
502
- <WarningIcon className="h-4 w-4" />
503
- <span className="text-sm">
504
- Please enter a valid email address
505
- </span>
506
- </div>
507
- </div>
508
- <div>
509
- <label className="text-fm-icon-active mb-2 block text-sm font-medium">
510
- Password
511
- </label>
512
- <input
513
- type="password"
514
- className="border-fm-icon-warning/50 bg-fm-surface-secondary text-fm-icon-active w-full rounded-lg border p-3 placeholder-white/50"
515
- placeholder="Enter your password"
516
- />
517
- <div className="text-fm-icon-warning mt-2 flex items-center gap-2">
518
- <WarningIcon className="h-4 w-4" />
519
- <span className="text-sm">
520
- Password must be at least 8 characters
521
- </span>
522
- </div>
523
- </div>
524
- </div>
525
- </div>
526
- <div className="bg-fm-surface-secondary rounded-lg p-4">
527
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
528
- {`// Form validation with warning icon
529
- <div className="field-error">
530
- <div className="flex items-center gap-2 text-red-400">
531
- <WarningIcon className="h-4 w-4" />
532
- <span>Please enter a valid email address</span>
533
- </div>
534
- </div>
535
-
536
- // Inline validation warning
537
- <div className="field-warning">
538
- <div className="flex items-center gap-2 text-yellow-400">
539
- <WarningIcon className="h-4 w-4" />
540
- <span>Password must be at least 8 characters</span>
541
- </div>
542
- </div>`}
543
- </pre>
544
- </div>
545
- </div>
546
- </div>
547
-
548
- {/* Alert Banners */}
549
- <div className="!space-y-4">
550
- <h3 className="text-fm-icon-warning! text-lg font-semibold">
551
- Alert Banners
552
- </h3>
553
- <div className="!space-y-4">
554
- <div className="!space-y-3">
555
- <div className="border-fm-icon-warning/30 bg-fm-icon-warning/10 flex items-center gap-3 rounded-lg border p-4">
556
- <WarningIcon className="text-fm-icon-warning h-6 w-6 flex-shrink-0" />
557
- <div>
558
- <div className="text-fm-icon-warning font-medium">
559
- System Maintenance
560
- </div>
561
- <div className="text-fm-icon-warning/70 text-sm">
562
- Scheduled maintenance will occur tonight from 2-4
563
- AM EST.
564
- </div>
565
- </div>
566
- </div>
567
- <div className="border-fm-icon-negative/30 bg-fm-icon-negative/10 flex items-center gap-3 rounded-lg border p-4">
568
- <WarningIcon className="text-fm-icon-negative h-6 w-6 flex-shrink-0" />
569
- <div>
570
- <div className="text-fm-icon-negative font-medium">
571
- Service Disruption
572
- </div>
573
- <div className="text-fm-icon-negative/70 text-sm">
574
- We're experiencing issues with our payment system.
575
- Please try again later.
576
- </div>
577
- </div>
578
- </div>
579
- <div className="border-fm-icon-warning/30 bg-fm-icon-warning/10 flex items-center gap-3 rounded-lg border p-4">
580
- <WarningIcon className="text-fm-icon-warning h-6 w-6 flex-shrink-0" />
581
- <div>
582
- <div className="text-fm-icon-warning font-medium">
583
- Security Alert
584
- </div>
585
- <div className="text-fm-icon-warning/70 text-sm">
586
- Unusual login activity detected. Please verify
587
- your account.
588
- </div>
589
- </div>
590
- </div>
591
- </div>
592
- <div className="bg-fm-surface-secondary rounded-lg p-4">
593
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
594
- {`// Alert banner component
595
- <div className="alert-banner warning">
596
- <div className="flex items-center gap-3">
597
- <WarningIcon className="h-6 w-6 text-yellow-400" />
598
- <div>
599
- <div className="font-medium">System Maintenance</div>
600
- <div className="text-sm opacity-70">
601
- Scheduled maintenance tonight from 2-4 AM EST.
602
- </div>
603
- </div>
604
- </div>
605
- </div>`}
606
- </pre>
607
- </div>
608
- </div>
609
- </div>
610
-
611
- {/* Confirmation Dialogs */}
612
- <div className="!space-y-4">
613
- <h3 className="text-fm-icon-warning! text-lg font-semibold">
614
- Confirmation Dialogs
615
- </h3>
616
- <div className="!space-y-4">
617
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-6">
618
- <div className="!space-y-4 text-center">
619
- <div className="bg-fm-icon-warning/20 !mx-auto flex h-16 w-16 items-center justify-center rounded-full">
620
- <WarningIcon className="text-fm-icon-warning h-8 w-8" />
621
- </div>
622
- <div>
623
- <h3 className="text-fm-icon-active text-lg font-semibold">
624
- Delete Account
625
- </h3>
626
- <p className="text-fm-secondary mt-2 text-sm">
627
- Are you sure you want to delete your account? This
628
- action cannot be undone and all your data will be
629
- permanently removed.
630
- </p>
631
- </div>
632
- <div className="flex justify-center gap-3 pt-4">
633
- <button className="border-fm-divider-primary text-fm-icon-active hover:bg-fm-surface-secondary rounded-lg border px-4 py-2">
634
- Cancel
635
- </button>
636
- <button className="bg-fm-icon-negative text-fm-icon-active hover:bg-fm-icon-negative rounded-lg px-4 py-2">
637
- Delete Account
638
- </button>
639
- </div>
640
- </div>
641
- </div>
642
- <div className="bg-fm-surface-secondary rounded-lg p-4">
643
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
644
- {`// Confirmation dialog with warning
645
- <div className="confirmation-dialog">
646
- <div className="icon-container">
647
- <WarningIcon className="h-8 w-8 text-yellow-400" />
648
- </div>
649
- <h3>Delete Account</h3>
650
- <p>This action cannot be undone...</p>
651
- <div className="actions">
652
- <button onClick={cancel}>Cancel</button>
653
- <button onClick={confirm}>Delete</button>
654
- </div>
655
- </div>`}
656
- </pre>
657
- </div>
658
- </div>
659
- </div>
660
-
661
- {/* Toast Notifications */}
662
- <div className="!space-y-4">
663
- <h3 className="text-fm-icon-warning! text-lg font-semibold">
664
- Toast Notifications
665
- </h3>
666
- <div className="!space-y-4">
667
- <div className="!space-y-3">
668
- <div className="border-fm-icon-warning/30 bg-fm-icon-warning/10 flex items-center gap-3 rounded-lg border p-4 shadow-lg">
669
- <WarningIcon className="text-fm-icon-warning h-5 w-5 flex-shrink-0" />
670
- <div className="flex-1">
671
- <div className="text-fm-icon-warning text-sm font-medium">
672
- Connection Issue
673
- </div>
674
- <div className="text-fm-icon-warning/70 text-xs">
675
- Check your internet connection and try again.
676
- </div>
677
- </div>
678
- <button className="text-fm-icon-warning/60 hover:text-fm-icon-warning">
679
- <div className="h-4 w-4">×</div>
680
- </button>
681
- </div>
682
- <div className="border-fm-icon-warning/30 bg-fm-icon-warning/10 flex items-center gap-3 rounded-lg border p-4 shadow-lg">
683
- <WarningIcon className="text-fm-icon-warning h-5 w-5 flex-shrink-0" />
684
- <div className="flex-1">
685
- <div className="text-fm-icon-warning text-sm font-medium">
686
- Storage Almost Full
687
- </div>
688
- <div className="text-fm-icon-warning/70 text-xs">
689
- You're using 95% of your storage space.
690
- </div>
691
- </div>
692
- <button className="text-fm-icon-warning/60 hover:text-fm-icon-warning">
693
- <div className="h-4 w-4">×</div>
694
- </button>
695
- </div>
696
- </div>
697
- <div className="bg-fm-surface-secondary rounded-lg p-4">
698
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
699
- {`// Toast notification with warning
700
- <div className="toast warning">
701
- <div className="flex items-center gap-3">
702
- <WarningIcon className="h-5 w-5 text-yellow-400" />
703
- <div className="flex-1">
704
- <div className="font-medium">Connection Issue</div>
705
- <div className="text-sm opacity-70">
706
- Check your internet connection and try again.
707
- </div>
708
- </div>
709
- <button onClick={dismiss}>×</button>
710
- </div>
711
- </div>`}
712
- </pre>
713
- </div>
714
- </div>
715
- </div>
716
- </div>
717
- </div>
718
-
719
- {/* Accessibility */}
720
- <div className="!space-y-8">
721
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
722
- Accessibility Features
723
- </h2>
724
- <div className="grid grid-cols-1 gap-8 md:grid-cols-2">
725
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
726
- <h3 className="text-fm-icon-positive! text-lg font-semibold">
727
- ✅ Built-in Features
728
- </h3>
729
- <ul className="text-fm-secondary! !space-y-2 text-sm">
730
- <li className="text-fm-secondary!">
731
- Uses Radix UI AccessibleIcon wrapper
732
- </li>
733
- <li className="text-fm-secondary!">
734
- Provides screen reader label "Warning icon"
735
- </li>
736
- <li className="text-fm-secondary!">
737
- Supports keyboard navigation when interactive
738
- </li>
739
- <li className="text-fm-secondary!">
740
- Maintains proper color contrast ratios
741
- </li>
742
- <li className="text-fm-secondary!">
743
- Scales with user's font size preferences
744
- </li>
745
- </ul>
746
- </div>
747
-
748
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
749
- <h3 className="text-fm-icon-warning! text-lg font-semibold">
750
- 💡 Best Practices
751
- </h3>
752
- <ul className="text-fm-secondary !space-y-2 text-sm">
753
- <li className="text-fm-secondary!">
754
- Always provide descriptive warning messages
755
- </li>
756
- <li className="text-fm-secondary!">
757
- Use appropriate color combinations for severity
758
- </li>
759
- <li className="text-fm-secondary!">
760
- Include role="alert" for critical warnings
761
- </li>
762
- <li className="text-fm-secondary!">
763
- Provide alternative text for screen readers
764
- </li>
765
- <li className="text-fm-secondary!">
766
- Consider animation for attention-grabbing alerts
767
- </li>
768
- </ul>
769
- </div>
770
- </div>
771
-
772
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-6">
773
- <h3 className="text-fm-icon-warning! mb-4 text-lg font-semibold">
774
- Proper ARIA Implementation
775
- </h3>
776
- <div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
777
- <div className="bg-fm-surface-secondary rounded-lg p-4">
778
- <pre className="text-fm-icon-info! overflow-x-auto text-sm">
779
- {`// Alert banner with proper ARIA
780
- <div
781
- role="alert"
782
- aria-describedby="warning-message"
783
- className="alert-banner"
784
- >
785
- <WarningIcon className="h-6 w-6 text-yellow-400" />
786
- <div id="warning-message">
787
- System maintenance scheduled for tonight.
788
- </div>
789
- </div>
790
-
791
- // Form validation with ARIA
792
- <div className="field-container">
793
- <input
794
- aria-invalid="true"
795
- aria-describedby="email-error"
796
- />
797
- <div id="email-error" role="alert">
798
- <WarningIcon className="h-4 w-4" />
799
- Please enter a valid email address
800
- </div>
801
- </div>
802
-
803
- // Confirmation dialog with ARIA
804
- <div
805
- role="dialog"
806
- aria-labelledby="dialog-title"
807
- aria-describedby="dialog-description"
808
- >
809
- <WarningIcon className="h-8 w-8" />
810
- <h3 id="dialog-title">Delete Account</h3>
811
- <p id="dialog-description">
812
- This action cannot be undone...
813
- </p>
814
- </div>`}
815
- </pre>
816
- </div>
817
- <div className="!space-y-4">
818
- <p className="text-fm-secondary! text-sm">
819
- When using WarningIcon for alerts and warnings, always
820
- provide proper ARIA roles and descriptive text to ensure
821
- screen reader users understand the importance and
822
- context.
823
- </p>
824
- <div className="border-fm-icon-warning/20 bg-fm-icon-warning/10 rounded-lg border p-4">
825
- <div className="text-fm-icon-warning flex items-center gap-2 text-sm">
826
- <WarningIcon className="h-4 w-4" />
827
- <span>
828
- Critical warnings should use role="alert" for
829
- immediate announcement
830
- </span>
831
- </div>
832
- </div>
833
- </div>
834
- </div>
835
- </div>
836
- </div>
837
-
838
- {/* Related Icons */}
839
- <div className="!space-y-8">
840
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
841
- Related Icons
842
- </h2>
843
- <div className="grid grid-cols-2 gap-6 md:grid-cols-4">
844
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
845
- <div className="bg-fm-icon-negative/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
846
- <span className="text-fm-icon-active! !text-2xl">❌</span>
847
- </div>
848
- <div>
849
- <div className="text-fm-icon-active font-medium">
850
- ErrorIcon
851
- </div>
852
- <div className="text-fm-tertiary text-xs">
853
- Error states
854
- </div>
855
- </div>
856
- </div>
857
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
858
- <div className="bg-fm-icon-positive/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
859
- <span className="text-fm-icon-active! !text-2xl">✓</span>
860
- </div>
861
- <div>
862
- <div className="text-fm-icon-active font-medium">
863
- SuccessIcon
864
- </div>
865
- <div className="text-fm-tertiary text-xs">
866
- Success states
867
- </div>
868
- </div>
869
- </div>
870
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
871
- <div className="bg-fm-icon-info/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
872
- <span className="text-fm-icon-active! !text-2xl">ℹ</span>
873
- </div>
874
- <div>
875
- <div className="text-fm-icon-active font-medium">
876
- InfoIcon
877
- </div>
878
- <div className="text-fm-tertiary text-xs">
879
- Information
880
- </div>
881
- </div>
882
- </div>
883
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
884
- <div className="bg-fm-secondary-500/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
885
- <span className="text-fm-icon-active! !text-2xl">?</span>
886
- </div>
887
- <div>
888
- <div className="text-fm-icon-active font-medium">
889
- HelpIcon
890
- </div>
891
- <div className="text-fm-tertiary text-xs">
892
- Help & support
893
- </div>
894
- </div>
895
- </div>
896
- </div>
897
- </div>
898
- </div>
899
-
900
- {/* Footer */}
901
- <div className="border-fm-divider-secondary bg-fm-surface-secondary border-t backdrop-blur-xl">
902
- <div className="!mx-auto max-w-7xl px-6 py-8">
903
- <div className="!space-y-4 text-center">
904
- <p className="text-fm-tertiary!">
905
- WarningIcon is part of the Aural UI icon library, built with
906
- accessibility and user experience best practices in mind.
907
- </p>
908
- <p className="text-fm-placeholder! text-sm">
909
- All icons use Radix UI's AccessibleIcon for screen reader
910
- compatibility and follow WCAG guidelines for alerts and
911
- warnings.
912
- </p>
913
- </div>
914
- </div>
915
- </div>
916
- </div>
917
- </>
57
+ ),
58
+ }}
59
+ relatedIcons={[
60
+ {
61
+ name: "AlertIcon",
62
+ description: "Alert / info notification icon",
63
+ icon: AlertIcon,
64
+ accentToken: "info",
65
+ },
66
+ {
67
+ name: "ShieldIcon",
68
+ description: "Shield / security icon",
69
+ icon: ShieldIcon,
70
+ accentToken: "positive",
71
+ },
72
+ {
73
+ name: "MaintenanceIcon",
74
+ description: "System maintenance icon",
75
+ icon: MaintenanceIcon,
76
+ accentToken: "warning",
77
+ },
78
+ {
79
+ name: "TrashIcon",
80
+ description: "Delete / remove icon",
81
+ icon: TrashIcon,
82
+ accentToken: "negative",
83
+ },
84
+ ]}
85
+ />
918
86
  ),
919
87
  },
920
88
  },
921
89
  tags: ["autodocs"],
922
90
  argTypes: {
923
- width: {
924
- control: { type: "range", min: 8, max: 96, step: 2 },
925
- description: "Width of the icon in pixels",
926
- },
927
- withAccessibility: {
928
- control: "boolean",
929
- description: "Whether to wrap the icon with accessibility features",
930
- },
931
- height: {
932
- control: { type: "range", min: 8, max: 96, step: 2 },
933
- description: "Height of the icon in pixels",
934
- },
935
- stroke: {
936
- control: "color",
937
- description: "Stroke color of the icon",
938
- },
939
- strokeWidth: {
940
- control: { type: "range", min: 0.5, max: 4, step: 0.5 },
941
- description: "Width of the stroke",
942
- },
943
- strokeLinecap: {
944
- control: { type: "select", options: ["round", "square", "butt"] },
945
- description: "Style of line endings",
946
- },
947
91
  className: {
948
92
  control: "text",
949
- description: "CSS classes for styling (use for overrides)",
93
+ description: "CSS classes including color token",
950
94
  },
951
- onClick: {
952
- action: "clicked",
953
- description: "Click handler for interactive use",
95
+ withAccessibility: {
96
+ control: "boolean",
97
+ description: "Wrap with accessibility label",
954
98
  },
955
99
  },
956
100
  }
@@ -958,197 +102,89 @@ function ErrorAlert() {
958
102
  export default meta
959
103
  type Story = StoryObj<typeof WarningIcon>
960
104
 
961
- // Story parameters for consistent dark theme
962
- const storyParameters = {
963
- backgrounds: {
964
- default: "dark",
965
- values: [
966
- { name: "dark", value: "var(--color-fm-surface-primary)" },
967
- { name: "darker", value: "var(--color-fm-neutral-0)" },
968
- ],
969
- },
970
- }
971
-
972
105
  export const Default: Story = {
973
106
  args: {
974
- className: "h-8 w-8 text-fm-icon-warning",
107
+ className: "h-6 w-6 text-fm-icon-warning",
975
108
  withAccessibility: true,
976
109
  },
977
- parameters: storyParameters,
978
110
  render: (args) => (
979
- <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>
980
112
  <WarningIcon {...args} />
981
- </div>
113
+ </IconDefaultCanvas>
982
114
  ),
983
115
  }
984
116
 
985
117
  export const SizeVariations: Story = {
986
- parameters: {
987
- ...storyParameters,
988
- docs: {
989
- description: {
990
- story:
991
- "WarningIcon in different sizes, from small inline warnings to large alert banners.",
992
- },
993
- },
994
- },
995
- render: () => (
996
- <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">
997
- <div className="text-center">
998
- <WarningIcon className="text-fm-icon-warning !mx-auto mb-2 h-3 w-3" />
999
- <span className="text-fm-tertiary text-xs">12px</span>
1000
- </div>
1001
- <div className="text-center">
1002
- <WarningIcon className="text-fm-icon-warning !mx-auto mb-2 h-4 w-4" />
1003
- <span className="text-fm-tertiary text-xs">16px</span>
1004
- </div>
1005
- <div className="text-center">
1006
- <WarningIcon className="text-fm-icon-warning !mx-auto mb-2 h-5 w-5" />
1007
- <span className="text-fm-tertiary text-xs">20px</span>
1008
- </div>
1009
- <div className="text-center">
1010
- <WarningIcon className="text-fm-icon-warning !mx-auto mb-2 h-6 w-6" />
1011
- <span className="text-fm-tertiary text-xs">24px</span>
1012
- </div>
1013
- <div className="text-center">
1014
- <WarningIcon className="text-fm-icon-warning !mx-auto mb-2 h-8 w-8" />
1015
- <span className="text-fm-tertiary text-xs">32px</span>
1016
- </div>
1017
- <div className="text-center">
1018
- <WarningIcon className="text-fm-icon-warning !mx-auto mb-2 h-12 w-12" />
1019
- <span className="text-fm-tertiary text-xs">48px</span>
1020
- </div>
1021
- </div>
1022
- ),
118
+ render: () => <IconSizeVariations icon={WarningIcon} />,
1023
119
  }
1024
120
 
1025
121
  export const ColorVariations: Story = {
1026
- parameters: {
1027
- ...storyParameters,
1028
- docs: {
1029
- description: {
1030
- story:
1031
- "WarningIcon in different semantic colors for various warning severities.",
1032
- },
1033
- },
1034
- },
1035
- render: () => (
1036
- <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">
1037
- <div className="text-center">
1038
- <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">
1039
- <WarningIcon className="text-fm-icon-warning h-8 w-8" />
1040
- </div>
1041
- <div className="text-fm-icon-active text-sm font-medium">Warning</div>
1042
- <div className="text-fm-icon-warning text-xs">text-fm-icon-warning</div>
1043
- </div>
1044
- <div className="text-center">
1045
- <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">
1046
- <WarningIcon className="text-fm-icon-warning h-8 w-8" />
1047
- </div>
1048
- <div className="text-fm-icon-active text-sm font-medium">Caution</div>
1049
- <div className="text-fm-icon-warning text-xs">text-fm-icon-warning</div>
1050
- </div>
1051
- <div className="text-center">
1052
- <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">
1053
- <WarningIcon className="text-fm-icon-warning h-8 w-8" />
1054
- </div>
1055
- <div className="text-fm-icon-active text-sm font-medium">Alert</div>
1056
- <div className="text-fm-icon-warning text-xs">text-fm-icon-warning</div>
1057
- </div>
1058
- <div className="text-center">
1059
- <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">
1060
- <WarningIcon className="text-fm-icon-negative h-8 w-8" />
1061
- </div>
1062
- <div className="text-fm-icon-active text-sm font-medium">Critical</div>
1063
- <div className="text-fm-icon-negative text-xs">
1064
- text-fm-icon-negative
1065
- </div>
1066
- </div>
1067
- </div>
1068
- ),
122
+ render: () => <IconColorVariations icon={WarningIcon} />,
1069
123
  }
1070
124
 
1071
125
  export const UsageExamples: Story = {
1072
- parameters: {
1073
- ...storyParameters,
1074
- docs: {
1075
- description: {
1076
- story:
1077
- "Real-world usage examples showing WarningIcon in different UI contexts.",
1078
- },
1079
- },
1080
- },
1081
126
  render: () => (
1082
- <div className="from-fm-surface-primary to-fm-surface-secondary min-h-dvh !space-y-8 rounded-lg bg-linear-to-br p-8">
1083
- {/* Form Validation */}
1084
- <div className="!space-y-2">
1085
- <h3 className="text-fm-icon-active text-sm font-medium">
1086
- Form Validation
1087
- </h3>
1088
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-6">
1089
- <div className="!space-y-4">
1090
- <div>
1091
- <label className="text-fm-icon-active mb-2 block text-sm font-medium">
1092
- Email Address
1093
- </label>
1094
- <input
1095
- type="email"
1096
- className="border-fm-icon-negative/50 bg-fm-surface-secondary text-fm-icon-active w-full rounded-lg border p-3 placeholder-white/50"
1097
- placeholder="Enter your email"
1098
- />
1099
- <div className="text-fm-icon-negative mt-2 flex items-center gap-2">
1100
- <WarningIcon className="h-4 w-4" />
1101
- <span className="text-sm">
1102
- Please enter a valid email address
1103
- </span>
1104
- </div>
127
+ <IconUsageCanvas>
128
+ <IconUsageSection title="Warning Banner">
129
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary flex w-full max-w-sm items-start gap-3 rounded-xl border px-4 py-3">
130
+ <WarningIcon className="text-fm-icon-warning mt-0.5 h-4 w-4 shrink-0" />
131
+ <div>
132
+ <div className="text-fm-primary font-fm-text text-sm font-medium">
133
+ Action required
1105
134
  </div>
135
+ <div className="text-fm-secondary font-fm-text text-xs">
136
+ Complete your profile to continue.
137
+ </div>
138
+ </div>
139
+ </div>
140
+ </IconUsageSection>
141
+
142
+ <IconUsageSection title="Inline Validation">
143
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary w-full max-w-sm rounded-xl border p-4">
144
+ <div className="border-fm-divider-secondary flex items-center gap-2 rounded-lg border px-3 py-2">
145
+ <span className="text-fm-primary font-fm-text flex-1 text-sm">
146
+ Episode title
147
+ </span>
148
+ </div>
149
+ <div className="mt-1.5 flex items-center gap-1.5">
150
+ <WarningIcon className="text-fm-icon-warning h-3.5 w-3.5" />
151
+ <span className="text-fm-secondary font-fm-text text-xs">
152
+ Title must be at least 5 characters
153
+ </span>
1106
154
  </div>
1107
155
  </div>
1108
- </div>
156
+ </IconUsageSection>
1109
157
 
1110
- {/* Alert Banner */}
1111
- <div className="!space-y-2">
1112
- <h3 className="text-fm-icon-active text-sm font-medium">
1113
- Alert Banner
1114
- </h3>
1115
- <div className="border-fm-icon-warning/30 bg-fm-icon-warning/10 flex items-center gap-3 rounded-lg border p-4">
1116
- <WarningIcon className="text-fm-icon-warning h-6 w-6 flex-shrink-0" />
1117
- <div>
1118
- <div className="text-fm-icon-warning font-medium">
1119
- System Maintenance
1120
- </div>
1121
- <div className="text-fm-icon-warning/70 text-sm">
1122
- Scheduled maintenance will occur tonight from 2-4 AM EST.
1123
- </div>
158
+ <IconUsageSection title="Alert Types">
159
+ <div className="flex gap-4">
160
+ <div className="flex flex-col items-center gap-1">
161
+ <AlertIcon className="text-fm-icon-info h-6 w-6" />
162
+ <span className="text-fm-secondary font-fm-text text-xs">Info</span>
163
+ </div>
164
+ <div className="flex flex-col items-center gap-1">
165
+ <WarningIcon className="text-fm-icon-warning h-6 w-6" />
166
+ <span className="text-fm-secondary font-fm-text text-xs">
167
+ Warning
168
+ </span>
169
+ </div>
170
+ <div className="flex flex-col items-center gap-1">
171
+ <ShieldIcon className="text-fm-icon-positive h-6 w-6" />
172
+ <span className="text-fm-secondary font-fm-text text-xs">Safe</span>
1124
173
  </div>
1125
174
  </div>
1126
- </div>
1127
- </div>
175
+ </IconUsageSection>
176
+ </IconUsageCanvas>
1128
177
  ),
1129
178
  }
1130
179
 
1131
180
  export const Playground: Story = {
1132
- parameters: {
1133
- ...storyParameters,
1134
- docs: {
1135
- description: {
1136
- story:
1137
- "Interactive playground to experiment with different WarningIcon configurations.",
1138
- },
1139
- },
1140
- },
1141
181
  args: {
1142
- width: 24,
1143
- height: 24,
1144
- className: "text-fm-icon-warning",
1145
- strokeLinecap: "square",
182
+ className: "h-8 w-8 text-fm-icon-warning",
183
+ withAccessibility: true,
1146
184
  },
1147
185
  render: (args) => (
1148
- <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">
1149
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-8">
1150
- <WarningIcon {...args} />
1151
- </div>
1152
- </div>
186
+ <IconPlaygroundCanvas>
187
+ <WarningIcon {...args} />
188
+ </IconPlaygroundCanvas>
1153
189
  ),
1154
190
  }