aural-ui 3.0.7 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/aspect-ratio/AspectRatio.stories.tsx +290 -1199
- package/dist/components/avatar/Avatar.stories.tsx +235 -237
- package/dist/components/badge/Badge.stories.tsx +379 -116
- package/dist/components/banner/Banner.stories.tsx +445 -391
- package/dist/components/breadcrumb/Breadcrumb.stories.tsx +453 -199
- package/dist/components/button/Button.stories.tsx +585 -230
- package/dist/components/button/index.tsx +7 -7
- package/dist/components/card/Card.stories.tsx +619 -301
- package/dist/components/char-count/CharCount.stories.tsx +350 -248
- package/dist/components/checkbox/Checkbox.stories.tsx +309 -167
- package/dist/components/chip/Chip.stories.tsx +362 -168
- package/dist/components/circular-loader/CircularLoader.stories.tsx +221 -620
- package/dist/components/clamp-lines/ClampLines.stories.tsx +246 -117
- package/dist/components/collapsible/Collapsible.stories.tsx +391 -252
- package/dist/components/command/Command.stories.tsx +533 -856
- package/dist/components/dialog/Dialog.stories.tsx +505 -949
- package/dist/components/divider/Divider.stories.tsx +265 -502
- package/dist/components/dot-loader/DotLoader.stories.tsx +256 -257
- package/dist/components/drawer/Drawer.stories.tsx +659 -993
- package/dist/components/drawer/index.tsx +3 -3
- package/dist/components/dropdown/Dropdown.stories.tsx +643 -1018
- package/dist/components/form/Form.stories.tsx +560 -274
- package/dist/components/helper-text/HelperText.stories.tsx +199 -200
- package/dist/components/hover-card/HoverCard.stories.tsx +318 -1221
- package/dist/components/icon-button/IconButton.stories.tsx +837 -194
- package/dist/components/if-else/if-else.stories.tsx +370 -83
- package/dist/components/input/Input.stories.tsx +436 -368
- package/dist/components/label/Label.stories.tsx +156 -154
- package/dist/components/list/List.stories.tsx +485 -822
- package/dist/components/marquee/Marquee.stories.tsx +356 -694
- package/dist/components/otp-inputs/OtpInputs.stories.tsx +352 -410
- package/dist/components/overlay/Overlay.stories.tsx +452 -818
- package/dist/components/overlay/index.tsx +4 -4
- package/dist/components/pagination/Pagination.stories.tsx +721 -210
- package/dist/components/popover/Popover.stories.tsx +484 -873
- package/dist/components/radio/Radio.stories.tsx +432 -124
- package/dist/components/resizable/Resizable.stories.tsx +496 -752
- package/dist/components/scroll-area/ScrollArea.stories.tsx +384 -1006
- package/dist/components/search/Search.stories.tsx +314 -575
- package/dist/components/select/Select.stories.tsx +684 -787
- package/dist/components/sheet/Sheet.stories.tsx +671 -936
- package/dist/components/skelton/Skelton.stories.tsx +230 -764
- package/dist/components/slider/Slider.stories.tsx +384 -737
- package/dist/components/stepper/Stepper.stories.tsx +371 -514
- package/dist/components/switch/Switch.stories.tsx +461 -208
- package/dist/components/switch-case/SwitchCase.stories.tsx +367 -188
- package/dist/components/table/Table.stories.tsx +770 -914
- package/dist/components/tabs/Tabs.stories.tsx +459 -1400
- package/dist/components/tag/Tag.stories.tsx +714 -542
- package/dist/components/textarea/TextArea.stories.tsx +621 -562
- package/dist/components/thumbnail-tags/ThumbnailTags.stories.tsx +228 -148
- package/dist/components/toast/Toast.stories.tsx +452 -1333
- package/dist/components/toggle/Toggle.stories.tsx +488 -909
- package/dist/components/tooltip/Tooltip.stories.tsx +344 -1372
- package/dist/components/typography/Typography.stories.tsx +406 -89
- package/dist/hooks/use-change-state/UseChangeState.stories.tsx +309 -606
- package/dist/hooks/use-previous/UsePrevious.stories.tsx +367 -917
- package/dist/hooks/use-standalone-pagination/UseStandalonePagination.stories.tsx +639 -867
- package/dist/icons/Icons.stories.tsx +0 -12
- package/dist/icons/ai-avatar-icon/AiAvatarIcon.stories.tsx +226 -1013
- package/dist/icons/alert-icon/AlertIcon.stories.tsx +109 -929
- package/dist/icons/all-icons.tsx +124 -87
- package/dist/icons/angle-down-icon/AngleDownIcon.stories.tsx +140 -971
- package/dist/icons/apple-logo-icon/AppleLogoIcon.stories.tsx +148 -888
- package/dist/icons/arrow-box-left-icon/ArrowBoxLeftIcon.stories.tsx +135 -1019
- package/dist/icons/arrow-corner-up-left-icon/ArrowCornerUpLeftIcon.stories.tsx +137 -953
- package/dist/icons/arrow-corner-up-right-icon/ArrowCornerUpRightIcon.stories.tsx +138 -997
- package/dist/icons/arrow-left-icon/ArrowLeftIcon.stories.tsx +136 -942
- package/dist/icons/arrow-right-icon/ArrowRightIcon.stories.tsx +148 -1092
- package/dist/icons/arrow-right-up-icon/ArrowRightUpIcon.stories.tsx +146 -1211
- package/dist/icons/art-board-icon/ArtBoardIcon.stories.tsx +126 -615
- package/dist/icons/audio-bar-icon/AudioBarIcon.stories.tsx +144 -1164
- package/dist/icons/backward-ten-seconds-icon/BackwardTenSecondsIcon.stories.tsx +167 -985
- package/dist/icons/bubble-check-icon/BubbleCheckIcon.stories.tsx +122 -1179
- package/dist/icons/bubble-crossed-icon/BubbleCrossedIcon.stories.tsx +124 -1168
- package/dist/icons/bubble-sparkle-icon/BubbleSparkleIcon.stories.tsx +119 -850
- package/dist/icons/camera-icon/CameraIcon.stories.tsx +112 -1213
- package/dist/icons/capital-a-letter-icon/CapitalALetterIcon.stories.tsx +117 -934
- package/dist/icons/chevron-double-left-icon/ChevronDoubleLeftIcon.stories.tsx +160 -961
- package/dist/icons/chevron-double-right-icon/ChevronDoubleRightIcon.stories.tsx +163 -961
- package/dist/icons/chevron-down-icon/ChevronDownIcon.stories.tsx +144 -942
- package/dist/icons/chevron-left-icon/ChevronLeftIcon.stories.tsx +129 -966
- package/dist/icons/chevron-right-icon/ChevronRightIcon.stories.tsx +147 -964
- package/dist/icons/chevron-up-icon/ChevronUpIcon.stories.tsx +145 -975
- package/dist/icons/circle-tick-icon/CircleTickIcon.stories.tsx +150 -1142
- package/dist/icons/circular-play-icon/CircularPlayIcon.stories.tsx +114 -461
- package/dist/icons/coin-icon/CoinIcon.stories.tsx +124 -1322
- package/dist/icons/coin-toons-icon/CoinToonsIcon.stories.tsx +117 -1318
- package/dist/icons/column-wide-add-icon/ColumnWideAddIcon.stories.tsx +114 -903
- package/dist/icons/command-icon/CommandIcon.stories.tsx +127 -1042
- package/dist/icons/copy-icon/CopyIcon.stories.tsx +123 -962
- package/dist/icons/cross-circle-icon/CrossCircleIcon.stories.tsx +147 -999
- package/dist/icons/cross-icon/CrossIcon.stories.tsx +139 -960
- package/dist/icons/download-icon/DownloadIcon.stories.tsx +126 -820
- package/dist/icons/edit-big-icon/EditBigIcon.stories.tsx +124 -1031
- package/dist/icons/email-icon/EmailIcon.stories.tsx +115 -936
- package/dist/icons/expand-icon/ExpandIcon.stories.tsx +112 -1111
- package/dist/icons/eye-close-icon/EyeCloseIcon.stories.tsx +144 -1025
- package/dist/icons/eye-open-icon/EyeOpenIcon.stories.tsx +143 -1036
- package/dist/icons/feature-shine-icon/FeatureShineIcon.stories.tsx +127 -1011
- package/dist/icons/file-chart-icon/FileChartIcon.stories.tsx +126 -1056
- package/dist/icons/file-text-icon/FileTextIcon.stories.tsx +125 -614
- package/dist/icons/filter-bar-row-icon/FilterBarRowIcon.stories.tsx +119 -1050
- package/dist/icons/forward-ten-seconds-icon/ForwardTenSecondsIcon.stories.tsx +169 -989
- package/dist/icons/git-branch-icon/GitBranchIcon.stories.tsx +115 -1145
- package/dist/icons/git-fork-icon/GitForkIcon.stories.tsx +115 -1122
- package/dist/icons/globe-icon/GlobeIcon.stories.tsx +130 -313
- package/dist/icons/google-logo-icon/GoogleLogoIcon.stories.tsx +145 -940
- package/dist/icons/grip-vertical-icon/GripVerticalIcon.stories.tsx +119 -1174
- package/dist/icons/head-icon/HeadIcon.stories.tsx +111 -916
- package/dist/icons/heart-icon/HeartIcon.stories.tsx +120 -1019
- package/dist/icons/image-avatar-sparkle-icon/ImageAvatarSparkleIcon.stories.tsx +119 -683
- package/dist/icons/image-icon/ImageIcon.stories.tsx +105 -1121
- package/dist/icons/import-folder-icon/ImportFolderIcon.stories.tsx +111 -1192
- package/dist/icons/import-left-arrow-folder-icon/ImportLeftArrowFolderIcon.stories.tsx +136 -1256
- package/dist/icons/indian-flag-icon/IndianFlagIcon.stories.tsx +159 -962
- package/dist/icons/instagram-icon/InstagramIcon.stories.tsx +161 -1385
- package/dist/icons/layout-column-icon/LayoutColumnIcon.stories.tsx +124 -972
- package/dist/icons/layout-left-icon/LayoutLeftIcon.stories.tsx +119 -948
- package/dist/icons/layout-right-icon/LayoutRightIcon.stories.tsx +119 -942
- package/dist/icons/light-bulb-simple-icon/LightBulbSimpleIcon.stories.tsx +108 -1215
- package/dist/icons/linked-in-icon/LinkedInIcon.stories.tsx +154 -1517
- package/dist/icons/magic-book-icon/MagicBookIcon.stories.tsx +110 -1188
- package/dist/icons/magic-edit-icon/MagicEditIcon.stories.tsx +119 -678
- package/dist/icons/maintenance-icon/MaintenanceIcon.stories.tsx +123 -1184
- package/dist/icons/message-icon/MessageIcon.stories.tsx +114 -538
- package/dist/icons/minimize-icon/MinimizeIcon.stories.tsx +116 -1158
- package/dist/icons/moon-icon/MoonIcon.stories.tsx +120 -536
- package/dist/icons/move-horizontal-icon/MoveHorizontalIcon.stories.tsx +109 -1184
- package/dist/icons/move-vertical-icon/MoveVerticalIcon.stories.tsx +115 -1134
- package/dist/icons/musical-note-icon/MusicalNoteIcon.stories.tsx +119 -971
- package/dist/icons/notepad-icon/NotepadIcon.stories.tsx +111 -1100
- package/dist/icons/notes-icon/NotesIcon.stories.tsx +119 -1101
- package/dist/icons/page-search-icon/PageSearchIcon.stories.tsx +109 -1111
- package/dist/icons/page-text-icon/PageTextIcon.stories.tsx +122 -684
- package/dist/icons/paint-roll-icon/PaintRollIcon.stories.tsx +113 -954
- package/dist/icons/paper-plane-icon/PaperPlaneIcon.stories.tsx +112 -877
- package/dist/icons/pause-icon/PauseIcon.stories.tsx +113 -1000
- package/dist/icons/pencil-icon/PencilIcon.stories.tsx +115 -1070
- package/dist/icons/phone-icon/PhoneIcon.stories.tsx +115 -978
- package/dist/icons/plus-icon/PlusIcon.stories.tsx +106 -1093
- package/dist/icons/pocket-studio-icon/PocketStudioIcon.stories.tsx +107 -829
- package/dist/icons/scroll-down-icon/ScrollDownIcon.stories.tsx +102 -469
- package/dist/icons/search-icon/SearchIcon.stories.tsx +111 -1124
- package/dist/icons/setting-icon/SettingIcon.stories.tsx +107 -970
- package/dist/icons/share-icon/ShareIcon.stories.tsx +120 -1025
- package/dist/icons/shield-icon/ShieldIcon.stories.tsx +117 -931
- package/dist/icons/site-logo-icon/SiteLogoIcon.stories.tsx +137 -1104
- package/dist/icons/skip-backward-icon/SkipBackwardIcon.stories.tsx +172 -982
- package/dist/icons/skip-forward-icon/SkipForwardIcon.stories.tsx +164 -983
- package/dist/icons/sparkles-soft-icon/SparklesSoftIcon.stories.tsx +105 -958
- package/dist/icons/spinner-gradient-icon/SpinnerGradientIcon.stories.tsx +158 -580
- package/dist/icons/spinner-gradient-icon/index.tsx +6 -1
- package/dist/icons/spinner-solid-icon/SpinnerSolidIcon.stories.tsx +158 -587
- package/dist/icons/spinner-solid-icon/index.tsx +6 -1
- package/dist/icons/spinner-solid-neutral-icon/SpinnerSolidINeutralcon.stories.tsx +146 -682
- package/dist/icons/spinner-solid-neutral-icon/index.tsx +1 -1
- package/dist/icons/star-icon/StarIcon.stories.tsx +124 -904
- package/dist/icons/store-coin-icon/StoreCoinIcon.stories.tsx +112 -964
- package/dist/icons/suggestion-icon/SuggestionIcon.stories.tsx +116 -852
- package/dist/icons/sun-icon/SunIcon.stories.tsx +120 -831
- package/dist/icons/text-color-icon/TextColorIcon.stories.tsx +116 -950
- package/dist/icons/text-indicator-icon/TextIndicatorIcon.stories.tsx +123 -980
- package/dist/icons/threads-icon/ThreadsIcon.stories.tsx +156 -1427
- package/dist/icons/tick-circle-icon/TickCircleIcon.stories.tsx +146 -1142
- package/dist/icons/tick-icon/TickIcon.stories.tsx +145 -1276
- package/dist/icons/trash-icon/TrashIcon.stories.tsx +108 -933
- package/dist/icons/twitter-x-icon/TwitterXIcon.stories.tsx +157 -1402
- package/dist/icons/upload-icon/UploadIcon.stories.tsx +115 -889
- package/dist/icons/vertical-menu-icon/VerticalMenuIcon.stories.tsx +118 -984
- package/dist/icons/video-play-list-icon/VideoPlaylistIcon.stories.tsx +125 -1049
- package/dist/icons/voice-playing-icon/VoicePlayingIcon.stories.tsx +123 -1356
- package/dist/icons/volume-full-icon/VolumeFullIcon.stories.tsx +110 -1171
- package/dist/icons/volume-half-icon/VolumeHalfIcon.stories.tsx +112 -1093
- package/dist/icons/volume-off-icon/VolumeOffIcon.stories.tsx +115 -1087
- package/dist/icons/warning-icon/WarningIcon.stories.tsx +122 -1046
- package/dist/icons/youtube-icon/YoutubeIcon.stories.tsx +161 -936
- package/dist/index.cjs +84 -84
- package/dist/index.js +84 -84
- package/dist/styles/aural-all-theme.css +1222 -0
- package/dist/styles/{aural-theme.css → aural-dark-theme.css} +15 -3
- package/dist/styles/aural-light-theme.css +1047 -0
- package/package.json +1 -1
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import type { Meta, StoryObj } from "@storybook/react-vite"
|
|
3
3
|
|
|
4
|
+
import { AlertIcon } from "src/ui/icons/alert-icon"
|
|
5
|
+
import { 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> = {
|
|
@@ -11,912 +25,76 @@ const meta: Meta<typeof WarningIcon> = {
|
|
|
11
25
|
backgrounds: {
|
|
12
26
|
default: "dark",
|
|
13
27
|
values: [
|
|
14
|
-
{ name: "dark", value: "
|
|
15
|
-
{ name: "darker", value: "
|
|
16
|
-
{ name: "light", value: "
|
|
28
|
+
{ name: "dark", value: "var(--color-fm-surface-primary)" },
|
|
29
|
+
{ name: "darker", value: "var(--color-fm-neutral-0)" },
|
|
30
|
+
{ name: "light", value: "var(--color-fm-neutral-1100)" },
|
|
17
31
|
],
|
|
18
32
|
},
|
|
19
33
|
docs: {
|
|
20
34
|
page: () => (
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
{
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
padding: 0 ;
|
|
33
|
-
margin: 0 ;
|
|
34
|
-
background: transparent ;
|
|
35
|
-
}
|
|
36
|
-
.docs-story {
|
|
37
|
-
background: transparent ;
|
|
38
|
-
}
|
|
39
|
-
.sbdocs {
|
|
40
|
-
background: transparent ;
|
|
41
|
-
}
|
|
42
|
-
body {
|
|
43
|
-
background: #0a0a0a ;
|
|
44
|
-
}
|
|
45
|
-
#storybook-docs {
|
|
46
|
-
background: #0a0a0a ;
|
|
47
|
-
}
|
|
48
|
-
.sbdocs-preview {
|
|
49
|
-
background: transparent ;
|
|
50
|
-
border: none ;
|
|
51
|
-
}
|
|
52
|
-
.sbdocs-h1, .sbdocs-h2, .sbdocs-h3, .sbdocs-h4, .sbdocs-h5, .sbdocs-h6 {
|
|
53
|
-
color: white ;
|
|
54
|
-
}
|
|
55
|
-
.sbdocs-p, .sbdocs-li {
|
|
56
|
-
color: rgba(255, 255, 255, 0.7) ;
|
|
57
|
-
}
|
|
58
|
-
.sbdocs-code {
|
|
59
|
-
background: rgba(255, 255, 255, 0.1) ;
|
|
60
|
-
color: rgba(168, 85, 247, 1) ;
|
|
61
|
-
border: 1px solid rgba(255, 255, 255, 0.1) ;
|
|
62
|
-
}
|
|
63
|
-
.sbdocs-pre {
|
|
64
|
-
background: rgba(0, 0, 0, 0.4) ;
|
|
65
|
-
border: 1px solid rgba(255, 255, 255, 0.1) ;
|
|
66
|
-
}
|
|
67
|
-
.sbdocs-table {
|
|
68
|
-
background: rgba(255, 255, 255, 0.05) ;
|
|
69
|
-
border: 1px solid rgba(255, 255, 255, 0.1) ;
|
|
70
|
-
}
|
|
71
|
-
.sbdocs-table th {
|
|
72
|
-
background: rgba(255, 255, 255, 0.05) ;
|
|
73
|
-
color: white ;
|
|
74
|
-
border-bottom: 1px solid rgba(255, 255, 255, 0.1) ;
|
|
75
|
-
}
|
|
76
|
-
.sbdocs-table td {
|
|
77
|
-
color: rgba(255, 255, 255, 0.7) ;
|
|
78
|
-
border-bottom: 1px solid rgba(255, 255, 255, 0.05) ;
|
|
79
|
-
}
|
|
80
|
-
`}
|
|
81
|
-
</style>
|
|
82
|
-
|
|
83
|
-
<div className="min-h-screen bg-gradient-to-br from-gray-900 via-yellow-900/20 to-gray-900">
|
|
84
|
-
{/* Header */}
|
|
85
|
-
<div className="relative overflow-hidden border-b border-white/10 bg-black/20 backdrop-blur-xl">
|
|
86
|
-
<div className="absolute inset-0 bg-gradient-to-r from-yellow-500/10 via-transparent to-amber-500/10" />
|
|
87
|
-
<div className="relative !mx-auto max-w-7xl px-6 py-16">
|
|
88
|
-
<div className="!space-y-6 text-center">
|
|
89
|
-
<div className="!mx-auto flex h-24 w-24 items-center justify-center rounded-2xl border border-yellow-500/30 bg-gradient-to-br from-yellow-500/20 to-amber-500/20">
|
|
90
|
-
<WarningIcon className="h-12 w-12 text-yellow-400" />
|
|
91
|
-
</div>
|
|
92
|
-
<h1 className="text-5xl font-bold !text-white">
|
|
93
|
-
WarningIcon
|
|
94
|
-
</h1>
|
|
95
|
-
<p className="!mx-auto max-w-3xl text-xl leading-relaxed !text-white/70">
|
|
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-3xl font-bold text-yellow-300">
|
|
107
|
-
Alert Users
|
|
108
|
-
</div>
|
|
109
|
-
<div className="text-sm text-white/60">
|
|
110
|
-
Critical warnings
|
|
111
|
-
</div>
|
|
112
|
-
</div>
|
|
113
|
-
<div className="h-8 w-px bg-white/20" />
|
|
114
|
-
<div className="text-center">
|
|
115
|
-
<div className="text-3xl font-bold text-amber-300">
|
|
116
|
-
Accessible
|
|
117
|
-
</div>
|
|
118
|
-
<div className="text-sm text-white/60">
|
|
119
|
-
Screen reader friendly
|
|
120
|
-
</div>
|
|
121
|
-
</div>
|
|
122
|
-
<div className="h-8 w-px bg-white/20" />
|
|
123
|
-
<div className="text-center">
|
|
124
|
-
<div className="text-3xl font-bold text-orange-300">
|
|
125
|
-
Universal
|
|
126
|
-
</div>
|
|
127
|
-
<div className="text-sm text-white/60">
|
|
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-center text-3xl font-bold !text-white">
|
|
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-xl font-semibold !text-yellow-300">
|
|
146
|
-
Basic Usage
|
|
147
|
-
</h3>
|
|
148
|
-
<div className="rounded-lg bg-black/40 p-4">
|
|
149
|
-
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
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
|
|
155
|
-
<WarningIcon className="h-5 w-5 text-
|
|
156
|
-
<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
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
<div className="!space-y-4">
|
|
165
|
-
<h3 className="text-xl font-semibold !text-yellow-300">
|
|
166
|
-
Live Preview
|
|
167
|
-
</h3>
|
|
168
|
-
<div className="flex h-32 items-center justify-center rounded-lg border border-white/10 bg-white/5">
|
|
169
|
-
<div className="flex items-center gap-2 rounded-lg border border-yellow-500/20 bg-yellow-500/10 p-3">
|
|
170
|
-
<WarningIcon className="h-5 w-5 text-yellow-400" />
|
|
171
|
-
<span className="text-yellow-200">Warning message</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-center text-3xl font-bold !text-white">
|
|
181
|
-
Props & Configuration
|
|
182
|
-
</h2>
|
|
183
|
-
|
|
184
|
-
<div className="overflow-hidden rounded-lg border border-white/10 bg-white/5">
|
|
185
|
-
<div className="bg-white/5 p-4">
|
|
186
|
-
<h3 className="text-xl font-semibold !text-white">Props</h3>
|
|
187
|
-
</div>
|
|
188
|
-
<table className="!my-0 w-full">
|
|
189
|
-
<thead className="bg-white/5">
|
|
190
|
-
<tr className="border-b border-white/10">
|
|
191
|
-
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
192
|
-
Prop
|
|
193
|
-
</th>
|
|
194
|
-
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
195
|
-
Type
|
|
196
|
-
</th>
|
|
197
|
-
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
198
|
-
Default
|
|
199
|
-
</th>
|
|
200
|
-
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
201
|
-
Description
|
|
202
|
-
</th>
|
|
203
|
-
</tr>
|
|
204
|
-
</thead>
|
|
205
|
-
<tbody>
|
|
206
|
-
{" "}
|
|
207
|
-
<tr className="!bg-black/10">
|
|
208
|
-
<td className="px-6 py-4 font-mono text-sm !text-blue-300">
|
|
209
|
-
withAccessibility
|
|
210
|
-
</td>
|
|
211
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
212
|
-
boolean
|
|
213
|
-
</td>
|
|
214
|
-
<td className="px-6 py-4 text-sm !text-white/50">
|
|
215
|
-
true
|
|
216
|
-
</td>
|
|
217
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
218
|
-
Whether to wrap the icon with accessibility feature
|
|
219
|
-
</td>
|
|
220
|
-
</tr>
|
|
221
|
-
<tr className="border-b border-white/5 !bg-black/10">
|
|
222
|
-
<td className="px-6 py-4 font-mono text-sm !text-yellow-300">
|
|
223
|
-
height
|
|
224
|
-
</td>
|
|
225
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
226
|
-
number | string
|
|
227
|
-
</td>
|
|
228
|
-
<td className="px-6 py-4 text-sm !text-white/50">24</td>
|
|
229
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
230
|
-
Height of the icon in pixels
|
|
231
|
-
</td>
|
|
232
|
-
</tr>
|
|
233
|
-
<tr className="border-b border-white/5">
|
|
234
|
-
<td className="px-6 py-4 font-mono text-sm !text-yellow-300">
|
|
235
|
-
stroke
|
|
236
|
-
</td>
|
|
237
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
238
|
-
string
|
|
239
|
-
</td>
|
|
240
|
-
<td className="px-6 py-4 text-sm !text-white/50">
|
|
241
|
-
currentColor
|
|
242
|
-
</td>
|
|
243
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
244
|
-
Stroke color of the icon
|
|
245
|
-
</td>
|
|
246
|
-
</tr>
|
|
247
|
-
<tr className="border-b border-white/5 !bg-black/10">
|
|
248
|
-
<td className="px-6 py-4 font-mono text-sm !text-yellow-300">
|
|
249
|
-
strokeWidth
|
|
250
|
-
</td>
|
|
251
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
252
|
-
string | number
|
|
253
|
-
</td>
|
|
254
|
-
<td className="px-6 py-4 text-sm !text-white/50">
|
|
255
|
-
1.5
|
|
256
|
-
</td>
|
|
257
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
258
|
-
Width of the stroke
|
|
259
|
-
</td>
|
|
260
|
-
</tr>
|
|
261
|
-
<tr className="border-b border-white/5">
|
|
262
|
-
<td className="px-6 py-4 font-mono text-sm !text-yellow-300">
|
|
263
|
-
strokeLinecap
|
|
264
|
-
</td>
|
|
265
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
266
|
-
string
|
|
267
|
-
</td>
|
|
268
|
-
<td className="px-6 py-4 text-sm !text-white/50">
|
|
269
|
-
square
|
|
270
|
-
</td>
|
|
271
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
272
|
-
Style of line endings
|
|
273
|
-
</td>
|
|
274
|
-
</tr>
|
|
275
|
-
<tr className="border-b border-white/5 !bg-black/10">
|
|
276
|
-
<td className="px-6 py-4 font-mono text-sm !text-yellow-300">
|
|
277
|
-
className
|
|
278
|
-
</td>
|
|
279
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
280
|
-
string
|
|
281
|
-
</td>
|
|
282
|
-
<td className="px-6 py-4 text-sm !text-white/50">-</td>
|
|
283
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
284
|
-
CSS classes for styling (use for overrides)
|
|
285
|
-
</td>
|
|
286
|
-
</tr>
|
|
287
|
-
<tr className="!bg-black/10">
|
|
288
|
-
<td className="px-6 py-4 font-mono text-sm !text-yellow-300">
|
|
289
|
-
...svgProps
|
|
290
|
-
</td>
|
|
291
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
292
|
-
SVGProps
|
|
293
|
-
</td>
|
|
294
|
-
<td className="px-6 py-4 text-sm !text-white/50">-</td>
|
|
295
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
296
|
-
All standard SVG element props
|
|
297
|
-
</td>
|
|
298
|
-
</tr>
|
|
299
|
-
</tbody>
|
|
300
|
-
</table>
|
|
301
|
-
</div>
|
|
302
|
-
</div>
|
|
303
|
-
|
|
304
|
-
{/* Size Variations */}
|
|
305
|
-
<div className="!space-y-8">
|
|
306
|
-
<h2 className="text-center text-3xl font-bold !text-white">
|
|
307
|
-
Size Variations
|
|
308
|
-
</h2>
|
|
309
|
-
<div className="rounded-lg border border-white/10 bg-white/5 p-8">
|
|
310
|
-
<div className="!space-y-6">
|
|
311
|
-
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
|
|
312
|
-
<div className="!space-y-4">
|
|
313
|
-
<h3 className="text-lg font-semibold !text-yellow-300">
|
|
314
|
-
Standard Sizes
|
|
315
|
-
</h3>
|
|
316
|
-
<div className="flex items-end gap-6 rounded-lg bg-black/20 p-6">
|
|
317
|
-
<div className="text-center">
|
|
318
|
-
<WarningIcon className="!mx-auto mb-2 h-3 w-3 text-yellow-400" />
|
|
319
|
-
<span className="text-xs text-white/60">12px</span>
|
|
320
|
-
</div>
|
|
321
|
-
<div className="text-center">
|
|
322
|
-
<WarningIcon className="!mx-auto mb-2 h-4 w-4 text-yellow-400" />
|
|
323
|
-
<span className="text-xs text-white/60">16px</span>
|
|
324
|
-
</div>
|
|
325
|
-
<div className="text-center">
|
|
326
|
-
<WarningIcon className="!mx-auto mb-2 h-5 w-5 text-yellow-400" />
|
|
327
|
-
<span className="text-xs text-white/60">20px</span>
|
|
328
|
-
</div>
|
|
329
|
-
<div className="text-center">
|
|
330
|
-
<WarningIcon className="!mx-auto mb-2 h-6 w-6 text-yellow-400" />
|
|
331
|
-
<span className="text-xs text-white/60">24px</span>
|
|
332
|
-
</div>
|
|
333
|
-
<div className="text-center">
|
|
334
|
-
<WarningIcon className="!mx-auto mb-2 h-8 w-8 text-yellow-400" />
|
|
335
|
-
<span className="text-xs text-white/60">32px</span>
|
|
336
|
-
</div>
|
|
337
|
-
<div className="text-center">
|
|
338
|
-
<WarningIcon className="!mx-auto mb-2 h-12 w-12 text-yellow-400" />
|
|
339
|
-
<span className="text-xs text-white/60">48px</span>
|
|
340
|
-
</div>
|
|
341
|
-
</div>
|
|
342
|
-
</div>
|
|
343
|
-
|
|
344
|
-
<div className="!space-y-4">
|
|
345
|
-
<h3 className="text-lg font-semibold !text-yellow-300">
|
|
346
|
-
Code Example
|
|
347
|
-
</h3>
|
|
348
|
-
<div className="rounded-lg bg-black/40 p-4">
|
|
349
|
-
<pre className="overflow-x-auto text-sm !text-cyan-300">
|
|
350
|
-
{`// Small (16px) - inline warnings
|
|
351
|
-
<WarningIcon className="h-4 w-4" />
|
|
352
|
-
|
|
353
|
-
// Medium (24px) - form validation
|
|
354
|
-
<WarningIcon className="h-6 w-6" />
|
|
355
|
-
|
|
356
|
-
// Large (32px) - alert banners
|
|
357
|
-
<WarningIcon className="h-8 w-8" />
|
|
358
|
-
|
|
359
|
-
// Custom size
|
|
360
|
-
<WarningIcon width={40} height={40} />`}
|
|
361
|
-
</pre>
|
|
362
|
-
</div>
|
|
363
|
-
</div>
|
|
364
|
-
</div>
|
|
365
|
-
</div>
|
|
366
|
-
</div>
|
|
367
|
-
</div>
|
|
368
|
-
|
|
369
|
-
{/* Color Variations */}
|
|
370
|
-
<div className="!space-y-8">
|
|
371
|
-
<h2 className="text-center text-3xl font-bold !text-white">
|
|
372
|
-
Color Variations
|
|
373
|
-
</h2>
|
|
374
|
-
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
375
|
-
<div className="!space-y-4">
|
|
376
|
-
<h3 className="text-lg font-semibold !text-yellow-300">
|
|
377
|
-
Semantic Colors
|
|
378
|
-
</h3>
|
|
379
|
-
<div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
380
|
-
<div className="flex items-center gap-4">
|
|
381
|
-
<WarningIcon className="h-6 w-6 text-yellow-400" />
|
|
382
|
-
<div>
|
|
383
|
-
<div className="text-sm font-medium text-white">
|
|
384
|
-
Warning
|
|
385
|
-
</div>
|
|
386
|
-
<div className="text-xs text-white/60">
|
|
387
|
-
text-yellow-400
|
|
388
|
-
</div>
|
|
389
|
-
</div>
|
|
390
|
-
</div>
|
|
391
|
-
<div className="flex items-center gap-4">
|
|
392
|
-
<WarningIcon className="h-6 w-6 text-amber-400" />
|
|
393
|
-
<div>
|
|
394
|
-
<div className="text-sm font-medium text-white">
|
|
395
|
-
Caution
|
|
396
|
-
</div>
|
|
397
|
-
<div className="text-xs text-white/60">
|
|
398
|
-
text-amber-400
|
|
399
|
-
</div>
|
|
400
|
-
</div>
|
|
401
|
-
</div>
|
|
402
|
-
<div className="flex items-center gap-4">
|
|
403
|
-
<WarningIcon className="h-6 w-6 text-orange-400" />
|
|
404
|
-
<div>
|
|
405
|
-
<div className="text-sm font-medium text-white">
|
|
406
|
-
Alert
|
|
407
|
-
</div>
|
|
408
|
-
<div className="text-xs text-white/60">
|
|
409
|
-
text-orange-400
|
|
410
|
-
</div>
|
|
411
|
-
</div>
|
|
412
|
-
</div>
|
|
413
|
-
<div className="flex items-center gap-4">
|
|
414
|
-
<WarningIcon className="h-6 w-6 text-red-400" />
|
|
415
|
-
<div>
|
|
416
|
-
<div className="text-sm font-medium text-white">
|
|
417
|
-
Critical
|
|
418
|
-
</div>
|
|
419
|
-
<div className="text-xs text-white/60">
|
|
420
|
-
text-red-400
|
|
421
|
-
</div>
|
|
422
|
-
</div>
|
|
423
|
-
</div>
|
|
424
|
-
</div>
|
|
425
|
-
</div>
|
|
426
|
-
|
|
427
|
-
<div className="!space-y-4">
|
|
428
|
-
<h3 className="text-lg font-semibold !text-yellow-300">
|
|
429
|
-
Custom Colors
|
|
430
|
-
</h3>
|
|
431
|
-
<div className="rounded-lg bg-black/40 p-4">
|
|
432
|
-
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
433
|
-
{`// Using Tailwind classes
|
|
434
|
-
<WarningIcon className="h-6 w-6 text-yellow-400" />
|
|
435
|
-
<WarningIcon className="h-6 w-6 text-amber-500" />
|
|
436
|
-
|
|
437
|
-
// Using CSS custom properties
|
|
438
|
-
<WarningIcon
|
|
439
|
-
className="h-6 w-6"
|
|
440
|
-
style={{ color: 'var(--color-warning)' }}
|
|
441
|
-
/>
|
|
442
|
-
|
|
443
|
-
// Direct stroke prop
|
|
444
|
-
<WarningIcon
|
|
445
|
-
width={24}
|
|
446
|
-
height={24}
|
|
447
|
-
stroke="#eab308"
|
|
448
|
-
/>`}
|
|
449
|
-
</pre>
|
|
450
|
-
</div>
|
|
451
|
-
</div>
|
|
452
|
-
</div>
|
|
453
|
-
</div>
|
|
454
|
-
|
|
455
|
-
{/* Usage Examples */}
|
|
456
|
-
<div className="!space-y-8">
|
|
457
|
-
<h2 className="text-center text-3xl font-bold !text-white">
|
|
458
|
-
Usage Examples
|
|
459
|
-
</h2>
|
|
460
|
-
|
|
461
|
-
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
462
|
-
{/* Form Validation */}
|
|
463
|
-
<div className="!space-y-4">
|
|
464
|
-
<h3 className="text-lg font-semibold !text-yellow-300">
|
|
465
|
-
Form Validation
|
|
466
|
-
</h3>
|
|
467
|
-
<div className="!space-y-4">
|
|
468
|
-
<div className="rounded-lg border border-white/10 bg-white/5 p-6">
|
|
469
|
-
<div className="!space-y-4">
|
|
470
|
-
<div>
|
|
471
|
-
<label className="mb-2 block text-sm font-medium text-white">
|
|
472
|
-
Email Address
|
|
473
|
-
</label>
|
|
474
|
-
<input
|
|
475
|
-
type="email"
|
|
476
|
-
className="w-full rounded-lg border border-red-400/50 bg-white/10 p-3 text-white placeholder-white/50"
|
|
477
|
-
placeholder="Enter your email"
|
|
478
|
-
/>
|
|
479
|
-
<div className="mt-2 flex items-center gap-2 text-red-400">
|
|
480
|
-
<WarningIcon className="h-4 w-4" />
|
|
481
|
-
<span className="text-sm">
|
|
482
|
-
Please enter a valid email address
|
|
483
|
-
</span>
|
|
484
|
-
</div>
|
|
485
|
-
</div>
|
|
486
|
-
<div>
|
|
487
|
-
<label className="mb-2 block text-sm font-medium text-white">
|
|
488
|
-
Password
|
|
489
|
-
</label>
|
|
490
|
-
<input
|
|
491
|
-
type="password"
|
|
492
|
-
className="w-full rounded-lg border border-yellow-400/50 bg-white/10 p-3 text-white placeholder-white/50"
|
|
493
|
-
placeholder="Enter your password"
|
|
494
|
-
/>
|
|
495
|
-
<div className="mt-2 flex items-center gap-2 text-yellow-400">
|
|
496
|
-
<WarningIcon className="h-4 w-4" />
|
|
497
|
-
<span className="text-sm">
|
|
498
|
-
Password must be at least 8 characters
|
|
499
|
-
</span>
|
|
500
|
-
</div>
|
|
501
|
-
</div>
|
|
502
|
-
</div>
|
|
503
|
-
</div>
|
|
504
|
-
<div className="rounded-lg bg-black/40 p-4">
|
|
505
|
-
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
506
|
-
{`// Form validation with warning icon
|
|
507
|
-
<div className="field-error">
|
|
508
|
-
<div className="flex items-center gap-2 text-red-400">
|
|
509
|
-
<WarningIcon className="h-4 w-4" />
|
|
510
|
-
<span>Please enter a valid email address</span>
|
|
511
|
-
</div>
|
|
512
|
-
</div>
|
|
513
|
-
|
|
514
|
-
// Inline validation warning
|
|
515
|
-
<div className="field-warning">
|
|
516
|
-
<div className="flex items-center gap-2 text-yellow-400">
|
|
517
|
-
<WarningIcon className="h-4 w-4" />
|
|
518
|
-
<span>Password must be at least 8 characters</span>
|
|
519
|
-
</div>
|
|
520
|
-
</div>`}
|
|
521
|
-
</pre>
|
|
522
|
-
</div>
|
|
523
|
-
</div>
|
|
524
|
-
</div>
|
|
525
|
-
|
|
526
|
-
{/* Alert Banners */}
|
|
527
|
-
<div className="!space-y-4">
|
|
528
|
-
<h3 className="text-lg font-semibold !text-yellow-300">
|
|
529
|
-
Alert Banners
|
|
530
|
-
</h3>
|
|
531
|
-
<div className="!space-y-4">
|
|
532
|
-
<div className="!space-y-3">
|
|
533
|
-
<div className="flex items-center gap-3 rounded-lg border border-yellow-400/30 bg-yellow-400/10 p-4">
|
|
534
|
-
<WarningIcon className="h-6 w-6 flex-shrink-0 text-yellow-400" />
|
|
535
|
-
<div>
|
|
536
|
-
<div className="font-medium text-yellow-200">
|
|
537
|
-
System Maintenance
|
|
538
|
-
</div>
|
|
539
|
-
<div className="text-sm text-yellow-300/70">
|
|
540
|
-
Scheduled maintenance will occur tonight from 2-4
|
|
541
|
-
AM EST.
|
|
542
|
-
</div>
|
|
543
|
-
</div>
|
|
544
|
-
</div>
|
|
545
|
-
<div className="flex items-center gap-3 rounded-lg border border-red-400/30 bg-red-400/10 p-4">
|
|
546
|
-
<WarningIcon className="h-6 w-6 flex-shrink-0 text-red-400" />
|
|
547
|
-
<div>
|
|
548
|
-
<div className="font-medium text-red-200">
|
|
549
|
-
Service Disruption
|
|
550
|
-
</div>
|
|
551
|
-
<div className="text-sm text-red-300/70">
|
|
552
|
-
We're experiencing issues with our payment system.
|
|
553
|
-
Please try again later.
|
|
554
|
-
</div>
|
|
555
|
-
</div>
|
|
556
|
-
</div>
|
|
557
|
-
<div className="flex items-center gap-3 rounded-lg border border-orange-400/30 bg-orange-400/10 p-4">
|
|
558
|
-
<WarningIcon className="h-6 w-6 flex-shrink-0 text-orange-400" />
|
|
559
|
-
<div>
|
|
560
|
-
<div className="font-medium text-orange-200">
|
|
561
|
-
Security Alert
|
|
562
|
-
</div>
|
|
563
|
-
<div className="text-sm text-orange-300/70">
|
|
564
|
-
Unusual login activity detected. Please verify
|
|
565
|
-
your account.
|
|
566
|
-
</div>
|
|
567
|
-
</div>
|
|
568
|
-
</div>
|
|
569
|
-
</div>
|
|
570
|
-
<div className="rounded-lg bg-black/40 p-4">
|
|
571
|
-
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
572
|
-
{`// Alert banner component
|
|
573
|
-
<div className="alert-banner warning">
|
|
574
|
-
<div className="flex items-center gap-3">
|
|
575
|
-
<WarningIcon className="h-6 w-6 text-yellow-400" />
|
|
576
|
-
<div>
|
|
577
|
-
<div className="font-medium">System Maintenance</div>
|
|
578
|
-
<div className="text-sm opacity-70">
|
|
579
|
-
Scheduled maintenance tonight from 2-4 AM EST.
|
|
580
|
-
</div>
|
|
581
|
-
</div>
|
|
582
|
-
</div>
|
|
583
|
-
</div>`}
|
|
584
|
-
</pre>
|
|
585
|
-
</div>
|
|
586
|
-
</div>
|
|
587
|
-
</div>
|
|
588
|
-
|
|
589
|
-
{/* Confirmation Dialogs */}
|
|
590
|
-
<div className="!space-y-4">
|
|
591
|
-
<h3 className="text-lg font-semibold !text-yellow-300">
|
|
592
|
-
Confirmation Dialogs
|
|
593
|
-
</h3>
|
|
594
|
-
<div className="!space-y-4">
|
|
595
|
-
<div className="rounded-lg border border-white/10 bg-white/5 p-6">
|
|
596
|
-
<div className="!space-y-4 text-center">
|
|
597
|
-
<div className="!mx-auto flex h-16 w-16 items-center justify-center rounded-full bg-yellow-400/20">
|
|
598
|
-
<WarningIcon className="h-8 w-8 text-yellow-400" />
|
|
599
|
-
</div>
|
|
600
|
-
<div>
|
|
601
|
-
<h3 className="text-lg font-semibold text-white">
|
|
602
|
-
Delete Account
|
|
603
|
-
</h3>
|
|
604
|
-
<p className="mt-2 text-sm text-white/70">
|
|
605
|
-
Are you sure you want to delete your account? This
|
|
606
|
-
action cannot be undone and all your data will be
|
|
607
|
-
permanently removed.
|
|
608
|
-
</p>
|
|
609
|
-
</div>
|
|
610
|
-
<div className="flex justify-center gap-3 pt-4">
|
|
611
|
-
<button className="rounded-lg border border-white/20 px-4 py-2 text-white hover:bg-white/10">
|
|
612
|
-
Cancel
|
|
613
|
-
</button>
|
|
614
|
-
<button className="rounded-lg bg-red-500 px-4 py-2 text-white hover:bg-red-600">
|
|
615
|
-
Delete Account
|
|
616
|
-
</button>
|
|
617
|
-
</div>
|
|
618
|
-
</div>
|
|
619
|
-
</div>
|
|
620
|
-
<div className="rounded-lg bg-black/40 p-4">
|
|
621
|
-
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
622
|
-
{`// Confirmation dialog with warning
|
|
623
|
-
<div className="confirmation-dialog">
|
|
624
|
-
<div className="icon-container">
|
|
625
|
-
<WarningIcon className="h-8 w-8 text-yellow-400" />
|
|
626
|
-
</div>
|
|
627
|
-
<h3>Delete Account</h3>
|
|
628
|
-
<p>This action cannot be undone...</p>
|
|
629
|
-
<div className="actions">
|
|
630
|
-
<button onClick={cancel}>Cancel</button>
|
|
631
|
-
<button onClick={confirm}>Delete</button>
|
|
632
|
-
</div>
|
|
633
|
-
</div>`}
|
|
634
|
-
</pre>
|
|
635
|
-
</div>
|
|
636
|
-
</div>
|
|
637
|
-
</div>
|
|
638
|
-
|
|
639
|
-
{/* Toast Notifications */}
|
|
640
|
-
<div className="!space-y-4">
|
|
641
|
-
<h3 className="text-lg font-semibold !text-yellow-300">
|
|
642
|
-
Toast Notifications
|
|
643
|
-
</h3>
|
|
644
|
-
<div className="!space-y-4">
|
|
645
|
-
<div className="!space-y-3">
|
|
646
|
-
<div className="flex items-center gap-3 rounded-lg border border-yellow-400/30 bg-yellow-400/10 p-4 shadow-lg">
|
|
647
|
-
<WarningIcon className="h-5 w-5 flex-shrink-0 text-yellow-400" />
|
|
648
|
-
<div className="flex-1">
|
|
649
|
-
<div className="text-sm font-medium text-yellow-200">
|
|
650
|
-
Connection Issue
|
|
651
|
-
</div>
|
|
652
|
-
<div className="text-xs text-yellow-300/70">
|
|
653
|
-
Check your internet connection and try again.
|
|
654
|
-
</div>
|
|
655
|
-
</div>
|
|
656
|
-
<button className="text-yellow-400/60 hover:text-yellow-400">
|
|
657
|
-
<div className="h-4 w-4">×</div>
|
|
658
|
-
</button>
|
|
659
|
-
</div>
|
|
660
|
-
<div className="flex items-center gap-3 rounded-lg border border-amber-400/30 bg-amber-400/10 p-4 shadow-lg">
|
|
661
|
-
<WarningIcon className="h-5 w-5 flex-shrink-0 text-amber-400" />
|
|
662
|
-
<div className="flex-1">
|
|
663
|
-
<div className="text-sm font-medium text-amber-200">
|
|
664
|
-
Storage Almost Full
|
|
665
|
-
</div>
|
|
666
|
-
<div className="text-xs text-amber-300/70">
|
|
667
|
-
You're using 95% of your storage space.
|
|
668
|
-
</div>
|
|
669
|
-
</div>
|
|
670
|
-
<button className="text-amber-400/60 hover:text-amber-400">
|
|
671
|
-
<div className="h-4 w-4">×</div>
|
|
672
|
-
</button>
|
|
673
|
-
</div>
|
|
674
|
-
</div>
|
|
675
|
-
<div className="rounded-lg bg-black/40 p-4">
|
|
676
|
-
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
677
|
-
{`// Toast notification with warning
|
|
678
|
-
<div className="toast warning">
|
|
679
|
-
<div className="flex items-center gap-3">
|
|
680
|
-
<WarningIcon className="h-5 w-5 text-yellow-400" />
|
|
681
|
-
<div className="flex-1">
|
|
682
|
-
<div className="font-medium">Connection Issue</div>
|
|
683
|
-
<div className="text-sm opacity-70">
|
|
684
|
-
Check your internet connection and try again.
|
|
685
|
-
</div>
|
|
686
|
-
</div>
|
|
687
|
-
<button onClick={dismiss}>×</button>
|
|
688
|
-
</div>
|
|
689
|
-
</div>`}
|
|
690
|
-
</pre>
|
|
691
|
-
</div>
|
|
692
|
-
</div>
|
|
693
|
-
</div>
|
|
694
|
-
</div>
|
|
52
|
+
}`,
|
|
53
|
+
livePreview: (
|
|
54
|
+
<div className="flex items-center gap-2">
|
|
55
|
+
<WarningIcon className="text-fm-icon-warning h-6 w-6" />
|
|
695
56
|
</div>
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
<div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
727
|
-
<h3 className="text-lg font-semibold !text-yellow-300">
|
|
728
|
-
💡 Best Practices
|
|
729
|
-
</h3>
|
|
730
|
-
<ul className="!space-y-2 text-sm text-white/70">
|
|
731
|
-
<li className="!text-white/70">
|
|
732
|
-
Always provide descriptive warning messages
|
|
733
|
-
</li>
|
|
734
|
-
<li className="!text-white/70">
|
|
735
|
-
Use appropriate color combinations for severity
|
|
736
|
-
</li>
|
|
737
|
-
<li className="!text-white/70">
|
|
738
|
-
Include role="alert" for critical warnings
|
|
739
|
-
</li>
|
|
740
|
-
<li className="!text-white/70">
|
|
741
|
-
Provide alternative text for screen readers
|
|
742
|
-
</li>
|
|
743
|
-
<li className="!text-white/70">
|
|
744
|
-
Consider animation for attention-grabbing alerts
|
|
745
|
-
</li>
|
|
746
|
-
</ul>
|
|
747
|
-
</div>
|
|
748
|
-
</div>
|
|
749
|
-
|
|
750
|
-
<div className="rounded-lg border border-white/10 bg-white/5 p-6">
|
|
751
|
-
<h3 className="mb-4 text-lg font-semibold !text-amber-300">
|
|
752
|
-
Proper ARIA Implementation
|
|
753
|
-
</h3>
|
|
754
|
-
<div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
|
|
755
|
-
<div className="rounded-lg bg-black/40 p-4">
|
|
756
|
-
<pre className="overflow-x-auto text-sm !text-cyan-300">
|
|
757
|
-
{`// Alert banner with proper ARIA
|
|
758
|
-
<div
|
|
759
|
-
role="alert"
|
|
760
|
-
aria-describedby="warning-message"
|
|
761
|
-
className="alert-banner"
|
|
762
|
-
>
|
|
763
|
-
<WarningIcon className="h-6 w-6 text-yellow-400" />
|
|
764
|
-
<div id="warning-message">
|
|
765
|
-
System maintenance scheduled for tonight.
|
|
766
|
-
</div>
|
|
767
|
-
</div>
|
|
768
|
-
|
|
769
|
-
// Form validation with ARIA
|
|
770
|
-
<div className="field-container">
|
|
771
|
-
<input
|
|
772
|
-
aria-invalid="true"
|
|
773
|
-
aria-describedby="email-error"
|
|
774
|
-
/>
|
|
775
|
-
<div id="email-error" role="alert">
|
|
776
|
-
<WarningIcon className="h-4 w-4" />
|
|
777
|
-
Please enter a valid email address
|
|
778
|
-
</div>
|
|
779
|
-
</div>
|
|
780
|
-
|
|
781
|
-
// Confirmation dialog with ARIA
|
|
782
|
-
<div
|
|
783
|
-
role="dialog"
|
|
784
|
-
aria-labelledby="dialog-title"
|
|
785
|
-
aria-describedby="dialog-description"
|
|
786
|
-
>
|
|
787
|
-
<WarningIcon className="h-8 w-8" />
|
|
788
|
-
<h3 id="dialog-title">Delete Account</h3>
|
|
789
|
-
<p id="dialog-description">
|
|
790
|
-
This action cannot be undone...
|
|
791
|
-
</p>
|
|
792
|
-
</div>`}
|
|
793
|
-
</pre>
|
|
794
|
-
</div>
|
|
795
|
-
<div className="!space-y-4">
|
|
796
|
-
<p className="text-sm !text-white/70">
|
|
797
|
-
When using WarningIcon for alerts and warnings, always
|
|
798
|
-
provide proper ARIA roles and descriptive text to ensure
|
|
799
|
-
screen reader users understand the importance and
|
|
800
|
-
context.
|
|
801
|
-
</p>
|
|
802
|
-
<div className="rounded-lg border border-yellow-500/20 bg-yellow-500/10 p-4">
|
|
803
|
-
<div className="flex items-center gap-2 text-sm text-yellow-200">
|
|
804
|
-
<WarningIcon className="h-4 w-4" />
|
|
805
|
-
<span>
|
|
806
|
-
Critical warnings should use role="alert" for
|
|
807
|
-
immediate announcement
|
|
808
|
-
</span>
|
|
809
|
-
</div>
|
|
810
|
-
</div>
|
|
811
|
-
</div>
|
|
812
|
-
</div>
|
|
813
|
-
</div>
|
|
814
|
-
</div>
|
|
815
|
-
|
|
816
|
-
{/* Related Icons */}
|
|
817
|
-
<div className="!space-y-8">
|
|
818
|
-
<h2 className="text-center text-3xl font-bold !text-white">
|
|
819
|
-
Related Icons
|
|
820
|
-
</h2>
|
|
821
|
-
<div className="grid grid-cols-2 gap-6 md:grid-cols-4">
|
|
822
|
-
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
823
|
-
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-red-500/20">
|
|
824
|
-
<span className="!text-2xl !text-white">❌</span>
|
|
825
|
-
</div>
|
|
826
|
-
<div>
|
|
827
|
-
<div className="font-medium text-white">ErrorIcon</div>
|
|
828
|
-
<div className="text-xs text-white/60">Error states</div>
|
|
829
|
-
</div>
|
|
830
|
-
</div>
|
|
831
|
-
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
832
|
-
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-green-500/20">
|
|
833
|
-
<span className="!text-2xl !text-white">✓</span>
|
|
834
|
-
</div>
|
|
835
|
-
<div>
|
|
836
|
-
<div className="font-medium text-white">SuccessIcon</div>
|
|
837
|
-
<div className="text-xs text-white/60">
|
|
838
|
-
Success states
|
|
839
|
-
</div>
|
|
840
|
-
</div>
|
|
841
|
-
</div>
|
|
842
|
-
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
843
|
-
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-blue-500/20">
|
|
844
|
-
<span className="!text-2xl !text-white">ℹ</span>
|
|
845
|
-
</div>
|
|
846
|
-
<div>
|
|
847
|
-
<div className="font-medium text-white">InfoIcon</div>
|
|
848
|
-
<div className="text-xs text-white/60">Information</div>
|
|
849
|
-
</div>
|
|
850
|
-
</div>
|
|
851
|
-
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
852
|
-
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-purple-500/20">
|
|
853
|
-
<span className="!text-2xl !text-white">?</span>
|
|
854
|
-
</div>
|
|
855
|
-
<div>
|
|
856
|
-
<div className="font-medium text-white">HelpIcon</div>
|
|
857
|
-
<div className="text-xs text-white/60">
|
|
858
|
-
Help & support
|
|
859
|
-
</div>
|
|
860
|
-
</div>
|
|
861
|
-
</div>
|
|
862
|
-
</div>
|
|
863
|
-
</div>
|
|
864
|
-
</div>
|
|
865
|
-
|
|
866
|
-
{/* Footer */}
|
|
867
|
-
<div className="border-t border-white/10 bg-black/20 backdrop-blur-xl">
|
|
868
|
-
<div className="!mx-auto max-w-7xl px-6 py-8">
|
|
869
|
-
<div className="!space-y-4 text-center">
|
|
870
|
-
<p className="!text-white/60">
|
|
871
|
-
WarningIcon is part of the Aural UI icon library, built with
|
|
872
|
-
accessibility and user experience best practices in mind.
|
|
873
|
-
</p>
|
|
874
|
-
<p className="text-sm !text-white/40">
|
|
875
|
-
All icons use Radix UI's AccessibleIcon for screen reader
|
|
876
|
-
compatibility and follow WCAG guidelines for alerts and
|
|
877
|
-
warnings.
|
|
878
|
-
</p>
|
|
879
|
-
</div>
|
|
880
|
-
</div>
|
|
881
|
-
</div>
|
|
882
|
-
</div>
|
|
883
|
-
</>
|
|
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
|
+
/>
|
|
884
86
|
),
|
|
885
87
|
},
|
|
886
88
|
},
|
|
887
89
|
tags: ["autodocs"],
|
|
888
90
|
argTypes: {
|
|
889
|
-
width: {
|
|
890
|
-
control: { type: "range", min: 8, max: 96, step: 2 },
|
|
891
|
-
description: "Width of the icon in pixels",
|
|
892
|
-
},
|
|
893
|
-
withAccessibility: {
|
|
894
|
-
control: "boolean",
|
|
895
|
-
description: "Whether to wrap the icon with accessibility features",
|
|
896
|
-
},
|
|
897
|
-
height: {
|
|
898
|
-
control: { type: "range", min: 8, max: 96, step: 2 },
|
|
899
|
-
description: "Height of the icon in pixels",
|
|
900
|
-
},
|
|
901
|
-
stroke: {
|
|
902
|
-
control: "color",
|
|
903
|
-
description: "Stroke color of the icon",
|
|
904
|
-
},
|
|
905
|
-
strokeWidth: {
|
|
906
|
-
control: { type: "range", min: 0.5, max: 4, step: 0.5 },
|
|
907
|
-
description: "Width of the stroke",
|
|
908
|
-
},
|
|
909
|
-
strokeLinecap: {
|
|
910
|
-
control: { type: "select", options: ["round", "square", "butt"] },
|
|
911
|
-
description: "Style of line endings",
|
|
912
|
-
},
|
|
913
91
|
className: {
|
|
914
92
|
control: "text",
|
|
915
|
-
description: "CSS classes
|
|
93
|
+
description: "CSS classes including color token",
|
|
916
94
|
},
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
description: "
|
|
95
|
+
withAccessibility: {
|
|
96
|
+
control: "boolean",
|
|
97
|
+
description: "Wrap with accessibility label",
|
|
920
98
|
},
|
|
921
99
|
},
|
|
922
100
|
}
|
|
@@ -924,191 +102,89 @@ function ErrorAlert() {
|
|
|
924
102
|
export default meta
|
|
925
103
|
type Story = StoryObj<typeof WarningIcon>
|
|
926
104
|
|
|
927
|
-
// Story parameters for consistent dark theme
|
|
928
|
-
const storyParameters = {
|
|
929
|
-
backgrounds: {
|
|
930
|
-
default: "dark",
|
|
931
|
-
values: [
|
|
932
|
-
{ name: "dark", value: "#0a0a0a" },
|
|
933
|
-
{ name: "darker", value: "#000000" },
|
|
934
|
-
],
|
|
935
|
-
},
|
|
936
|
-
}
|
|
937
|
-
|
|
938
105
|
export const Default: Story = {
|
|
939
106
|
args: {
|
|
940
|
-
className: "h-
|
|
107
|
+
className: "h-6 w-6 text-fm-icon-warning",
|
|
941
108
|
withAccessibility: true,
|
|
942
109
|
},
|
|
943
|
-
parameters: storyParameters,
|
|
944
110
|
render: (args) => (
|
|
945
|
-
<
|
|
111
|
+
<IconDefaultCanvas>
|
|
946
112
|
<WarningIcon {...args} />
|
|
947
|
-
</
|
|
113
|
+
</IconDefaultCanvas>
|
|
948
114
|
),
|
|
949
115
|
}
|
|
950
116
|
|
|
951
117
|
export const SizeVariations: Story = {
|
|
952
|
-
|
|
953
|
-
...storyParameters,
|
|
954
|
-
docs: {
|
|
955
|
-
description: {
|
|
956
|
-
story:
|
|
957
|
-
"WarningIcon in different sizes, from small inline warnings to large alert banners.",
|
|
958
|
-
},
|
|
959
|
-
},
|
|
960
|
-
},
|
|
961
|
-
render: () => (
|
|
962
|
-
<div className="flex h-64 min-h-dvh items-center justify-center gap-8 rounded-lg bg-gradient-to-br from-gray-900 to-gray-800 p-8">
|
|
963
|
-
<div className="text-center">
|
|
964
|
-
<WarningIcon className="!mx-auto mb-2 h-3 w-3 text-yellow-400" />
|
|
965
|
-
<span className="text-xs text-white/60">12px</span>
|
|
966
|
-
</div>
|
|
967
|
-
<div className="text-center">
|
|
968
|
-
<WarningIcon className="!mx-auto mb-2 h-4 w-4 text-yellow-400" />
|
|
969
|
-
<span className="text-xs text-white/60">16px</span>
|
|
970
|
-
</div>
|
|
971
|
-
<div className="text-center">
|
|
972
|
-
<WarningIcon className="!mx-auto mb-2 h-5 w-5 text-yellow-400" />
|
|
973
|
-
<span className="text-xs text-white/60">20px</span>
|
|
974
|
-
</div>
|
|
975
|
-
<div className="text-center">
|
|
976
|
-
<WarningIcon className="!mx-auto mb-2 h-6 w-6 text-yellow-400" />
|
|
977
|
-
<span className="text-xs text-white/60">24px</span>
|
|
978
|
-
</div>
|
|
979
|
-
<div className="text-center">
|
|
980
|
-
<WarningIcon className="!mx-auto mb-2 h-8 w-8 text-yellow-400" />
|
|
981
|
-
<span className="text-xs text-white/60">32px</span>
|
|
982
|
-
</div>
|
|
983
|
-
<div className="text-center">
|
|
984
|
-
<WarningIcon className="!mx-auto mb-2 h-12 w-12 text-yellow-400" />
|
|
985
|
-
<span className="text-xs text-white/60">48px</span>
|
|
986
|
-
</div>
|
|
987
|
-
</div>
|
|
988
|
-
),
|
|
118
|
+
render: () => <IconSizeVariations icon={WarningIcon} />,
|
|
989
119
|
}
|
|
990
120
|
|
|
991
121
|
export const ColorVariations: Story = {
|
|
992
|
-
|
|
993
|
-
...storyParameters,
|
|
994
|
-
docs: {
|
|
995
|
-
description: {
|
|
996
|
-
story:
|
|
997
|
-
"WarningIcon in different semantic colors for various warning severities.",
|
|
998
|
-
},
|
|
999
|
-
},
|
|
1000
|
-
},
|
|
1001
|
-
render: () => (
|
|
1002
|
-
<div className="grid min-h-dvh grid-cols-2 items-center justify-center gap-6 rounded-lg bg-gradient-to-br from-gray-900 to-gray-800 p-8 md:grid-cols-4">
|
|
1003
|
-
<div className="text-center">
|
|
1004
|
-
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-yellow-500/30 bg-yellow-500/20">
|
|
1005
|
-
<WarningIcon className="h-8 w-8 text-yellow-400" />
|
|
1006
|
-
</div>
|
|
1007
|
-
<div className="text-sm font-medium text-white">Warning</div>
|
|
1008
|
-
<div className="text-xs text-yellow-400">text-yellow-400</div>
|
|
1009
|
-
</div>
|
|
1010
|
-
<div className="text-center">
|
|
1011
|
-
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-amber-500/30 bg-amber-500/20">
|
|
1012
|
-
<WarningIcon className="h-8 w-8 text-amber-400" />
|
|
1013
|
-
</div>
|
|
1014
|
-
<div className="text-sm font-medium text-white">Caution</div>
|
|
1015
|
-
<div className="text-xs text-amber-400">text-amber-400</div>
|
|
1016
|
-
</div>
|
|
1017
|
-
<div className="text-center">
|
|
1018
|
-
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-orange-500/30 bg-orange-500/20">
|
|
1019
|
-
<WarningIcon className="h-8 w-8 text-orange-400" />
|
|
1020
|
-
</div>
|
|
1021
|
-
<div className="text-sm font-medium text-white">Alert</div>
|
|
1022
|
-
<div className="text-xs text-orange-400">text-orange-400</div>
|
|
1023
|
-
</div>
|
|
1024
|
-
<div className="text-center">
|
|
1025
|
-
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-red-500/30 bg-red-500/20">
|
|
1026
|
-
<WarningIcon className="h-8 w-8 text-red-400" />
|
|
1027
|
-
</div>
|
|
1028
|
-
<div className="text-sm font-medium text-white">Critical</div>
|
|
1029
|
-
<div className="text-xs text-red-400">text-red-400</div>
|
|
1030
|
-
</div>
|
|
1031
|
-
</div>
|
|
1032
|
-
),
|
|
122
|
+
render: () => <IconColorVariations icon={WarningIcon} />,
|
|
1033
123
|
}
|
|
1034
124
|
|
|
1035
125
|
export const UsageExamples: Story = {
|
|
1036
|
-
parameters: {
|
|
1037
|
-
...storyParameters,
|
|
1038
|
-
docs: {
|
|
1039
|
-
description: {
|
|
1040
|
-
story:
|
|
1041
|
-
"Real-world usage examples showing WarningIcon in different UI contexts.",
|
|
1042
|
-
},
|
|
1043
|
-
},
|
|
1044
|
-
},
|
|
1045
126
|
render: () => (
|
|
1046
|
-
<
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
<input
|
|
1057
|
-
type="email"
|
|
1058
|
-
className="w-full rounded-lg border border-red-400/50 bg-white/10 p-3 text-white placeholder-white/50"
|
|
1059
|
-
placeholder="Enter your email"
|
|
1060
|
-
/>
|
|
1061
|
-
<div className="mt-2 flex items-center gap-2 text-red-400">
|
|
1062
|
-
<WarningIcon className="h-4 w-4" />
|
|
1063
|
-
<span className="text-sm">
|
|
1064
|
-
Please enter a valid email address
|
|
1065
|
-
</span>
|
|
1066
|
-
</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
|
|
134
|
+
</div>
|
|
135
|
+
<div className="text-fm-secondary font-fm-text text-xs">
|
|
136
|
+
Complete your profile to continue.
|
|
1067
137
|
</div>
|
|
1068
138
|
</div>
|
|
1069
139
|
</div>
|
|
1070
|
-
</
|
|
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>
|
|
154
|
+
</div>
|
|
155
|
+
</div>
|
|
156
|
+
</IconUsageSection>
|
|
1071
157
|
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
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>
|
|
1084
173
|
</div>
|
|
1085
174
|
</div>
|
|
1086
|
-
</
|
|
1087
|
-
</
|
|
175
|
+
</IconUsageSection>
|
|
176
|
+
</IconUsageCanvas>
|
|
1088
177
|
),
|
|
1089
178
|
}
|
|
1090
179
|
|
|
1091
180
|
export const Playground: Story = {
|
|
1092
|
-
parameters: {
|
|
1093
|
-
...storyParameters,
|
|
1094
|
-
docs: {
|
|
1095
|
-
description: {
|
|
1096
|
-
story:
|
|
1097
|
-
"Interactive playground to experiment with different WarningIcon configurations.",
|
|
1098
|
-
},
|
|
1099
|
-
},
|
|
1100
|
-
},
|
|
1101
181
|
args: {
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
className: "text-yellow-400",
|
|
1105
|
-
strokeLinecap: "square",
|
|
182
|
+
className: "h-8 w-8 text-fm-icon-warning",
|
|
183
|
+
withAccessibility: true,
|
|
1106
184
|
},
|
|
1107
185
|
render: (args) => (
|
|
1108
|
-
<
|
|
1109
|
-
<
|
|
1110
|
-
|
|
1111
|
-
</div>
|
|
1112
|
-
</div>
|
|
186
|
+
<IconPlaygroundCanvas>
|
|
187
|
+
<WarningIcon {...args} />
|
|
188
|
+
</IconPlaygroundCanvas>
|
|
1113
189
|
),
|
|
1114
190
|
}
|