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,21 @@
|
|
|
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 { CrossIcon } from "src/ui/icons/cross-icon"
|
|
6
|
+
import { TickCircleIcon } from "src/ui/icons/tick-circle-icon"
|
|
7
|
+
import { WarningIcon } from "src/ui/icons/warning-icon"
|
|
8
|
+
import {
|
|
9
|
+
IconColorVariations,
|
|
10
|
+
IconDefaultCanvas,
|
|
11
|
+
IconInteractiveStates,
|
|
12
|
+
IconPlaygroundCanvas,
|
|
13
|
+
IconSizeVariations,
|
|
14
|
+
IconUsageCanvas,
|
|
15
|
+
IconUsageSection,
|
|
16
|
+
} from "src/ui/story-spec/icons/icon-story-canvas"
|
|
17
|
+
import { AuralIconDocsPage } from "src/ui/story-spec/icons/icon-story-docs-page"
|
|
18
|
+
|
|
4
19
|
import { CrossCircleIcon } from "."
|
|
5
20
|
|
|
6
21
|
const meta: Meta<typeof CrossCircleIcon> = {
|
|
@@ -11,853 +26,80 @@ const meta: Meta<typeof CrossCircleIcon> = {
|
|
|
11
26
|
backgrounds: {
|
|
12
27
|
default: "dark",
|
|
13
28
|
values: [
|
|
14
|
-
{ name: "dark", value: "
|
|
15
|
-
{ name: "darker", value: "
|
|
16
|
-
{ name: "light", value: "
|
|
29
|
+
{ name: "dark", value: "var(--color-fm-surface-primary)" },
|
|
30
|
+
{ name: "darker", value: "var(--color-fm-neutral-0)" },
|
|
31
|
+
{ name: "light", value: "var(--color-fm-neutral-1100)" },
|
|
17
32
|
],
|
|
18
33
|
},
|
|
19
34
|
docs: {
|
|
20
35
|
page: () => (
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
{
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
.docs-story {
|
|
37
|
-
background: transparent ;
|
|
38
|
-
}
|
|
39
|
-
.sbdocs {
|
|
40
|
-
background: transparent ;
|
|
41
|
-
}
|
|
42
|
-
body {
|
|
43
|
-
background: #0a0a0a ;
|
|
44
|
-
}
|
|
45
|
-
#storybook-docs {
|
|
46
|
-
background: #0a0a0a ;
|
|
47
|
-
}
|
|
48
|
-
.sbdocs-preview {
|
|
49
|
-
background: transparent ;
|
|
50
|
-
border: none ;
|
|
51
|
-
}
|
|
52
|
-
.sbdocs-h1, .sbdocs-h2, .sbdocs-h3, .sbdocs-h4, .sbdocs-h5, .sbdocs-h6 {
|
|
53
|
-
color: white ;
|
|
54
|
-
}
|
|
55
|
-
.sbdocs-p, .sbdocs-li {
|
|
56
|
-
color: rgba(255, 255, 255, 0.7) ;
|
|
57
|
-
}
|
|
58
|
-
.sbdocs-code {
|
|
59
|
-
background: rgba(255, 255, 255, 0.1) ;
|
|
60
|
-
color: rgba(168, 85, 247, 1) ;
|
|
61
|
-
border: 1px solid rgba(255, 255, 255, 0.1) ;
|
|
62
|
-
}
|
|
63
|
-
.sbdocs-pre {
|
|
64
|
-
background: rgba(0, 0, 0, 0.4) ;
|
|
65
|
-
border: 1px solid rgba(255, 255, 255, 0.1) ;
|
|
66
|
-
}
|
|
67
|
-
.sbdocs-table {
|
|
68
|
-
background: rgba(255, 255, 255, 0.05) ;
|
|
69
|
-
border: 1px solid rgba(255, 255, 255, 0.1) ;
|
|
70
|
-
}
|
|
71
|
-
.sbdocs-table th {
|
|
72
|
-
background: rgba(255, 255, 255, 0.05) ;
|
|
73
|
-
color: white ;
|
|
74
|
-
border-bottom: 1px solid rgba(255, 255, 255, 0.1) ;
|
|
75
|
-
}
|
|
76
|
-
.sbdocs-table td {
|
|
77
|
-
color: rgba(255, 255, 255, 0.7) ;
|
|
78
|
-
border-bottom: 1px solid rgba(255, 255, 255, 0.05) ;
|
|
79
|
-
}
|
|
80
|
-
`}
|
|
81
|
-
</style>
|
|
82
|
-
|
|
83
|
-
<div className="min-h-screen bg-gradient-to-br from-gray-900 via-purple-900/20 to-gray-900">
|
|
84
|
-
{/* Header */}
|
|
85
|
-
<div className="relative overflow-hidden border-b border-white/10 bg-black/20 backdrop-blur-xl">
|
|
86
|
-
<div className="absolute inset-0 bg-gradient-to-r from-red-500/10 via-transparent to-pink-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-red-500/30 bg-gradient-to-br from-red-500/20 to-pink-500/20">
|
|
90
|
-
<CrossCircleIcon className="h-12 w-12 fill-red-400" />
|
|
91
|
-
</div>
|
|
92
|
-
<h1 className="!text-fm-primary text-5xl font-bold">
|
|
93
|
-
CrossCircleIcon
|
|
94
|
-
</h1>
|
|
95
|
-
<p className="!mx-auto max-w-3xl text-xl leading-relaxed !text-white/70">
|
|
96
|
-
A clear and recognizable close/cancel icon featuring a cross
|
|
97
|
-
within a circle. Perfect for dismissible components, error
|
|
98
|
-
states, and removal actions. Built with accessibility in
|
|
99
|
-
mind using Radix UI's AccessibleIcon wrapper.
|
|
100
|
-
</p>
|
|
101
|
-
|
|
102
|
-
{/* Stats */}
|
|
103
|
-
<div className="flex items-center justify-center gap-8 pt-8">
|
|
104
|
-
<div className="text-center">
|
|
105
|
-
<div className="text-3xl font-bold text-red-300">
|
|
106
|
-
Accessible
|
|
107
|
-
</div>
|
|
108
|
-
<div className="text-sm text-white/60">
|
|
109
|
-
Screen reader friendly
|
|
110
|
-
</div>
|
|
111
|
-
</div>
|
|
112
|
-
<div className="h-8 w-px bg-white/20" />
|
|
113
|
-
<div className="text-center">
|
|
114
|
-
<div className="text-3xl font-bold text-pink-300">
|
|
115
|
-
Scalable
|
|
116
|
-
</div>
|
|
117
|
-
<div className="text-sm text-white/60">
|
|
118
|
-
Any size needed
|
|
119
|
-
</div>
|
|
120
|
-
</div>
|
|
121
|
-
<div className="h-8 w-px bg-white/20" />
|
|
122
|
-
<div className="text-center">
|
|
123
|
-
<div className="text-3xl font-bold text-rose-300">
|
|
124
|
-
Versatile
|
|
125
|
-
</div>
|
|
126
|
-
<div className="text-sm text-white/60">
|
|
127
|
-
Multiple use cases
|
|
128
|
-
</div>
|
|
129
|
-
</div>
|
|
130
|
-
</div>
|
|
131
|
-
</div>
|
|
132
|
-
</div>
|
|
133
|
-
</div>
|
|
134
|
-
|
|
135
|
-
{/* Content */}
|
|
136
|
-
<div className="!mx-auto max-w-7xl !space-y-16 px-6 py-12">
|
|
137
|
-
{/* Quick Usage */}
|
|
138
|
-
<div className="!space-y-8">
|
|
139
|
-
<h2 className="text-center text-3xl font-bold !text-white">
|
|
140
|
-
Quick Start
|
|
141
|
-
</h2>
|
|
142
|
-
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
143
|
-
<div className="!space-y-4">
|
|
144
|
-
<h3 className="text-xl font-semibold !text-red-300">
|
|
145
|
-
Basic Usage
|
|
146
|
-
</h3>
|
|
147
|
-
<div className="rounded-lg bg-black/40 p-4">
|
|
148
|
-
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
149
|
-
{`import { CrossCircleIcon } from "@icons/cross-circle-icon"
|
|
150
|
-
|
|
151
|
-
function DismissibleAlert() {
|
|
36
|
+
<AuralIconDocsPage
|
|
37
|
+
accentToken="negative"
|
|
38
|
+
features={[
|
|
39
|
+
{ title: "Error Badge", description: "Solid failure indicator" },
|
|
40
|
+
{
|
|
41
|
+
title: "Filled Shape",
|
|
42
|
+
description: "High-visibility error mark",
|
|
43
|
+
},
|
|
44
|
+
{ title: "Accessible", description: "ARIA-ready by default" },
|
|
45
|
+
]}
|
|
46
|
+
quickStart={{
|
|
47
|
+
codeExample: `import { CrossCircleIcon } from "src/ui/icons/cross-circle-icon"
|
|
48
|
+
|
|
49
|
+
function ErrorBadge() {
|
|
152
50
|
return (
|
|
153
|
-
<div className="flex items-center
|
|
154
|
-
<
|
|
155
|
-
<
|
|
156
|
-
<CrossCircleIcon className="h-5 w-5 fill-red-400 " />
|
|
157
|
-
</button>
|
|
51
|
+
<div className="flex items-center gap-1">
|
|
52
|
+
<CrossCircleIcon className="h-4 w-4 text-fm-icon-negative" />
|
|
53
|
+
<span>Failed</span>
|
|
158
54
|
</div>
|
|
159
55
|
)
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
<div className="!space-y-4">
|
|
166
|
-
<h3 className="text-xl font-semibold !text-red-300">
|
|
167
|
-
Live Preview
|
|
168
|
-
</h3>
|
|
169
|
-
<div className="flex h-32 items-center justify-center rounded-lg border border-white/10 bg-white/5">
|
|
170
|
-
<div className="flex items-center justify-between rounded-lg border border-red-500/20 bg-red-500/10 px-4 py-2">
|
|
171
|
-
<span className="text-white">Error message</span>
|
|
172
|
-
<button className="ml-4">
|
|
173
|
-
<CrossCircleIcon className="h-5 w-5 fill-red-400" />
|
|
174
|
-
</button>
|
|
175
|
-
</div>
|
|
176
|
-
</div>
|
|
177
|
-
</div>
|
|
178
|
-
</div>
|
|
179
|
-
</div>
|
|
180
|
-
|
|
181
|
-
{/* Props Documentation */}
|
|
182
|
-
<div className="!space-y-8">
|
|
183
|
-
<h2 className="text-center text-3xl font-bold !text-white">
|
|
184
|
-
Props & Configuration
|
|
185
|
-
</h2>
|
|
186
|
-
|
|
187
|
-
<div className="overflow-hidden rounded-lg border border-white/10 bg-white/5">
|
|
188
|
-
<div className="bg-white/5 p-4">
|
|
189
|
-
<h3 className="text-xl font-semibold !text-white">Props</h3>
|
|
190
|
-
</div>
|
|
191
|
-
<table className="!my-0 w-full">
|
|
192
|
-
<thead className="bg-white/5">
|
|
193
|
-
<tr className="border-b border-white/10">
|
|
194
|
-
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
195
|
-
Prop
|
|
196
|
-
</th>
|
|
197
|
-
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
198
|
-
Type
|
|
199
|
-
</th>
|
|
200
|
-
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
201
|
-
Default
|
|
202
|
-
</th>
|
|
203
|
-
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
204
|
-
Description
|
|
205
|
-
</th>
|
|
206
|
-
</tr>
|
|
207
|
-
</thead>
|
|
208
|
-
<tbody>
|
|
209
|
-
{" "}
|
|
210
|
-
<tr className="!bg-black/10">
|
|
211
|
-
<td className="px-6 py-4 font-mono text-sm !text-blue-300">
|
|
212
|
-
withAccessibility
|
|
213
|
-
</td>
|
|
214
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
215
|
-
boolean
|
|
216
|
-
</td>
|
|
217
|
-
<td className="px-6 py-4 text-sm !text-white/50">
|
|
218
|
-
true
|
|
219
|
-
</td>
|
|
220
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
221
|
-
Whether to wrap the icon with accessibility feature
|
|
222
|
-
</td>
|
|
223
|
-
</tr>
|
|
224
|
-
<tr className="border-b border-white/5 !bg-black/10">
|
|
225
|
-
<td className="px-6 py-4 font-mono text-sm !text-red-300">
|
|
226
|
-
height
|
|
227
|
-
</td>
|
|
228
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
229
|
-
number | string
|
|
230
|
-
</td>
|
|
231
|
-
<td className="px-6 py-4 text-sm !text-white/50">16</td>
|
|
232
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
233
|
-
Height of the icon in pixels
|
|
234
|
-
</td>
|
|
235
|
-
</tr>
|
|
236
|
-
<tr className="border-b border-white/5">
|
|
237
|
-
<td className="px-6 py-4 font-mono text-sm !text-red-300">
|
|
238
|
-
fill
|
|
239
|
-
</td>
|
|
240
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
241
|
-
string
|
|
242
|
-
</td>
|
|
243
|
-
<td className="px-6 py-4 text-sm !text-white/50">
|
|
244
|
-
white
|
|
245
|
-
</td>
|
|
246
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
247
|
-
Fill color of the icon
|
|
248
|
-
</td>
|
|
249
|
-
</tr>
|
|
250
|
-
<tr className="border-b border-white/5 !bg-black/10">
|
|
251
|
-
<td className="px-6 py-4 font-mono text-sm !text-red-300">
|
|
252
|
-
className
|
|
253
|
-
</td>
|
|
254
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
255
|
-
string
|
|
256
|
-
</td>
|
|
257
|
-
<td className="px-6 py-4 text-sm !text-white/50">-</td>
|
|
258
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
259
|
-
CSS classes for styling (use for overrides)
|
|
260
|
-
</td>
|
|
261
|
-
</tr>
|
|
262
|
-
<tr className="border-b border-white/5">
|
|
263
|
-
<td className="px-6 py-4 font-mono text-sm !text-red-300">
|
|
264
|
-
onClick
|
|
265
|
-
</td>
|
|
266
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
267
|
-
function
|
|
268
|
-
</td>
|
|
269
|
-
<td className="px-6 py-4 text-sm !text-white/50">-</td>
|
|
270
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
271
|
-
Click handler for interactive use
|
|
272
|
-
</td>
|
|
273
|
-
</tr>
|
|
274
|
-
<tr className="!bg-black/10">
|
|
275
|
-
<td className="px-6 py-4 font-mono text-sm !text-red-300">
|
|
276
|
-
...svgProps
|
|
277
|
-
</td>
|
|
278
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
279
|
-
SVGProps
|
|
280
|
-
</td>
|
|
281
|
-
<td className="px-6 py-4 text-sm !text-white/50">-</td>
|
|
282
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
283
|
-
All standard SVG element props
|
|
284
|
-
</td>
|
|
285
|
-
</tr>
|
|
286
|
-
</tbody>
|
|
287
|
-
</table>
|
|
288
|
-
</div>
|
|
289
|
-
</div>
|
|
290
|
-
|
|
291
|
-
{/* Size Variations */}
|
|
292
|
-
<div className="!space-y-8">
|
|
293
|
-
<h2 className="text-center text-3xl font-bold !text-white">
|
|
294
|
-
Size Variations
|
|
295
|
-
</h2>
|
|
296
|
-
<div className="rounded-lg border border-white/10 bg-white/5 p-8">
|
|
297
|
-
<div className="!space-y-6">
|
|
298
|
-
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
|
|
299
|
-
<div className="!space-y-4">
|
|
300
|
-
<h3 className="text-lg font-semibold !text-red-300">
|
|
301
|
-
Standard Sizes
|
|
302
|
-
</h3>
|
|
303
|
-
<div className="flex items-end gap-6 rounded-lg bg-black/20 p-6">
|
|
304
|
-
<div className="text-center">
|
|
305
|
-
<CrossCircleIcon className="!mx-auto mb-2 h-3 w-3 fill-red-400" />
|
|
306
|
-
<span className="text-xs text-white/60">12px</span>
|
|
307
|
-
</div>
|
|
308
|
-
<div className="text-center">
|
|
309
|
-
<CrossCircleIcon className="!mx-auto mb-2 h-4 w-4 fill-red-400" />
|
|
310
|
-
<span className="text-xs text-white/60">16px</span>
|
|
311
|
-
</div>
|
|
312
|
-
<div className="text-center">
|
|
313
|
-
<CrossCircleIcon className="!mx-auto mb-2 h-5 w-5 fill-red-400" />
|
|
314
|
-
<span className="text-xs text-white/60">20px</span>
|
|
315
|
-
</div>
|
|
316
|
-
<div className="text-center">
|
|
317
|
-
<CrossCircleIcon className="!mx-auto mb-2 h-6 w-6 fill-red-400" />
|
|
318
|
-
<span className="text-xs text-white/60">24px</span>
|
|
319
|
-
</div>
|
|
320
|
-
<div className="text-center">
|
|
321
|
-
<CrossCircleIcon className="!mx-auto mb-2 h-8 w-8 fill-red-400" />
|
|
322
|
-
<span className="text-xs text-white/60">32px</span>
|
|
323
|
-
</div>
|
|
324
|
-
<div className="text-center">
|
|
325
|
-
<CrossCircleIcon className="!mx-auto mb-2 h-12 w-12 fill-red-400" />
|
|
326
|
-
<span className="text-xs text-white/60">48px</span>
|
|
327
|
-
</div>
|
|
328
|
-
</div>
|
|
329
|
-
</div>
|
|
330
|
-
|
|
331
|
-
<div className="!space-y-4">
|
|
332
|
-
<h3 className="text-lg font-semibold !text-red-300">
|
|
333
|
-
Code Example
|
|
334
|
-
</h3>
|
|
335
|
-
<div className="rounded-lg bg-black/40 p-4">
|
|
336
|
-
<pre className="overflow-x-auto text-sm !text-cyan-300">
|
|
337
|
-
{`// Small (16px)
|
|
338
|
-
<CrossCircleIcon className="h-4 w-4 " />
|
|
339
|
-
|
|
340
|
-
// Medium (24px)
|
|
341
|
-
<CrossCircleIcon className="h-6 w-6 " />
|
|
342
|
-
|
|
343
|
-
// Large (32px)
|
|
344
|
-
<CrossCircleIcon className="h-8 w-8 " />
|
|
345
|
-
|
|
346
|
-
// Custom size
|
|
347
|
-
<CrossCircleIcon width={40} height={40} />`}
|
|
348
|
-
</pre>
|
|
349
|
-
</div>
|
|
350
|
-
</div>
|
|
351
|
-
</div>
|
|
352
|
-
</div>
|
|
353
|
-
</div>
|
|
354
|
-
</div>
|
|
355
|
-
|
|
356
|
-
{/* Color Variations */}
|
|
357
|
-
<div className="!space-y-8">
|
|
358
|
-
<h2 className="text-center text-3xl font-bold !text-white">
|
|
359
|
-
Color Variations
|
|
360
|
-
</h2>
|
|
361
|
-
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
362
|
-
<div className="!space-y-4">
|
|
363
|
-
<h3 className="text-lg font-semibold !text-red-300">
|
|
364
|
-
Semantic Colors
|
|
365
|
-
</h3>
|
|
366
|
-
<div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
367
|
-
<div className="flex items-center gap-4">
|
|
368
|
-
<CrossCircleIcon className="h-6 w-6 fill-red-400" />
|
|
369
|
-
<div>
|
|
370
|
-
<div className="text-sm font-medium text-white">
|
|
371
|
-
Error / Danger
|
|
372
|
-
</div>
|
|
373
|
-
<div className="text-xs text-white/60">
|
|
374
|
-
fill-red-400
|
|
375
|
-
</div>
|
|
376
|
-
</div>
|
|
377
|
-
</div>
|
|
378
|
-
<div className="flex items-center gap-4">
|
|
379
|
-
<CrossCircleIcon className="h-6 w-6 fill-gray-400" />
|
|
380
|
-
<div>
|
|
381
|
-
<div className="text-sm font-medium text-white">
|
|
382
|
-
Neutral / Secondary
|
|
383
|
-
</div>
|
|
384
|
-
<div className="text-xs text-white/60">
|
|
385
|
-
fill-gray-400
|
|
386
|
-
</div>
|
|
387
|
-
</div>
|
|
388
|
-
</div>
|
|
389
|
-
<div className="flex items-center gap-4">
|
|
390
|
-
<CrossCircleIcon className="h-6 w-6 fill-white/60" />
|
|
391
|
-
<div>
|
|
392
|
-
<div className="text-sm font-medium text-white">
|
|
393
|
-
Muted
|
|
394
|
-
</div>
|
|
395
|
-
<div className="text-xs text-white/60">
|
|
396
|
-
fill-white/60
|
|
397
|
-
</div>
|
|
398
|
-
</div>
|
|
399
|
-
</div>
|
|
400
|
-
<div className="flex items-center gap-4">
|
|
401
|
-
<CrossCircleIcon className="h-6 w-6 fill-pink-400" />
|
|
402
|
-
<div>
|
|
403
|
-
<div className="text-sm font-medium text-white">
|
|
404
|
-
Accent
|
|
405
|
-
</div>
|
|
406
|
-
<div className="text-xs text-white/60">
|
|
407
|
-
fill-pink-400
|
|
408
|
-
</div>
|
|
409
|
-
</div>
|
|
410
|
-
</div>
|
|
411
|
-
</div>
|
|
412
|
-
</div>
|
|
413
|
-
|
|
414
|
-
<div className="!space-y-4">
|
|
415
|
-
<h3 className="text-lg font-semibold !text-red-300">
|
|
416
|
-
Custom Colors
|
|
417
|
-
</h3>
|
|
418
|
-
<div className="rounded-lg bg-black/40 p-4">
|
|
419
|
-
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
420
|
-
{`// Using Tailwind classes with
|
|
421
|
-
<CrossCircleIcon className="h-6 w-6 fill-red-400 " />
|
|
422
|
-
<CrossCircleIcon className="h-6 w-6 fill-pink-500 " />
|
|
423
|
-
|
|
424
|
-
// Using CSS custom properties
|
|
425
|
-
<CrossCircleIcon
|
|
426
|
-
className="h-6 w-6 "
|
|
427
|
-
style={{ fill: 'var(--color-error)' }}
|
|
428
|
-
/>
|
|
429
|
-
|
|
430
|
-
// Direct fill prop
|
|
431
|
-
<CrossCircleIcon
|
|
432
|
-
width={24}
|
|
433
|
-
height={24}
|
|
434
|
-
fill="#ef4444"
|
|
435
|
-
/>`}
|
|
436
|
-
</pre>
|
|
437
|
-
</div>
|
|
438
|
-
</div>
|
|
439
|
-
</div>
|
|
440
|
-
</div>
|
|
441
|
-
|
|
442
|
-
{/* Usage Examples */}
|
|
443
|
-
<div className="!space-y-8">
|
|
444
|
-
<h2 className="text-center text-3xl font-bold !text-white">
|
|
445
|
-
Usage Examples
|
|
446
|
-
</h2>
|
|
447
|
-
|
|
448
|
-
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
449
|
-
{/* Dismissible Alert */}
|
|
450
|
-
<div className="!space-y-4">
|
|
451
|
-
<h3 className="text-lg font-semibold !text-red-300">
|
|
452
|
-
Dismissible Alert
|
|
453
|
-
</h3>
|
|
454
|
-
<div className="!space-y-4">
|
|
455
|
-
<div className="rounded-lg border border-red-500/20 bg-red-500/10 p-4">
|
|
456
|
-
<div className="flex items-start justify-between">
|
|
457
|
-
<div className="flex items-start gap-3">
|
|
458
|
-
<div className="mt-0.5 flex h-5 w-5 flex-shrink-0 items-center justify-center">
|
|
459
|
-
<span className="text-red-400">⚠</span>
|
|
460
|
-
</div>
|
|
461
|
-
<div>
|
|
462
|
-
<h4 className="font-medium !text-red-200">
|
|
463
|
-
Payment Failed
|
|
464
|
-
</h4>
|
|
465
|
-
<p className="text-sm !text-red-300/80">
|
|
466
|
-
Unable to process your payment. Please try
|
|
467
|
-
again.
|
|
468
|
-
</p>
|
|
469
|
-
</div>
|
|
470
|
-
</div>
|
|
471
|
-
<button className="flex-shrink-0 rounded p-1 hover:bg-red-500/20">
|
|
472
|
-
<CrossCircleIcon className="h-4 w-4 fill-red-400" />
|
|
473
|
-
</button>
|
|
474
|
-
</div>
|
|
475
|
-
</div>
|
|
476
|
-
<div className="rounded-lg bg-black/40 p-4">
|
|
477
|
-
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
478
|
-
{`// Dismissible alert component
|
|
479
|
-
<div className="flex items-start justify-between border border-red-500/20 bg-red-500/10 p-4 rounded-lg">
|
|
480
|
-
<div className="flex items-start gap-3">
|
|
481
|
-
<span className="text-red-400">⚠</span>
|
|
482
|
-
<div>
|
|
483
|
-
<h4 className="font-medium text-red-200">Payment Failed</h4>
|
|
484
|
-
<p className="text-sm text-red-300/80">
|
|
485
|
-
Unable to process your payment. Please try again.
|
|
486
|
-
</p>
|
|
487
|
-
</div>
|
|
488
|
-
</div>
|
|
489
|
-
<button className="flex-shrink-0 p-1 hover:bg-red-500/20 rounded">
|
|
490
|
-
<CrossCircleIcon className="h-4 w-4 fill-red-400 " />
|
|
491
|
-
</button>
|
|
492
|
-
</div>`}
|
|
493
|
-
</pre>
|
|
494
|
-
</div>
|
|
495
|
-
</div>
|
|
496
|
-
</div>
|
|
497
|
-
|
|
498
|
-
{/* Modal Close Button */}
|
|
499
|
-
<div className="!space-y-4">
|
|
500
|
-
<h3 className="text-lg font-semibold !text-red-300">
|
|
501
|
-
Modal Close Button
|
|
502
|
-
</h3>
|
|
503
|
-
<div className="!space-y-4">
|
|
504
|
-
<div className="rounded-lg border border-white/10 bg-white/5 p-6">
|
|
505
|
-
<div className="mb-4 flex items-center justify-between">
|
|
506
|
-
<h3 className="text-lg font-semibold !text-white">
|
|
507
|
-
Confirm Action
|
|
508
|
-
</h3>
|
|
509
|
-
<button className="rounded p-1 hover:bg-white/10">
|
|
510
|
-
<CrossCircleIcon className="h-5 w-5 fill-gray-400" />
|
|
511
|
-
</button>
|
|
512
|
-
</div>
|
|
513
|
-
<p className="mb-4 !text-white/70">
|
|
514
|
-
Are you sure you want to delete this item?
|
|
515
|
-
</p>
|
|
516
|
-
<div className="flex gap-3">
|
|
517
|
-
<button className="rounded-lg border border-red-500/30 bg-red-500/20 px-4 py-2 text-red-200">
|
|
518
|
-
Delete
|
|
519
|
-
</button>
|
|
520
|
-
<button className="rounded-lg border border-white/20 bg-white/10 px-4 py-2 text-white">
|
|
521
|
-
Cancel
|
|
522
|
-
</button>
|
|
523
|
-
</div>
|
|
524
|
-
</div>
|
|
525
|
-
<div className="rounded-lg bg-black/40 p-4">
|
|
526
|
-
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
527
|
-
{`// Modal with close button
|
|
528
|
-
<div className="border border-white/10 bg-white/5 p-6 rounded-lg">
|
|
529
|
-
<div className="flex items-center justify-between mb-4">
|
|
530
|
-
<h3 className="text-lg font-semibold text-white">Confirm Action</h3>
|
|
531
|
-
<button className="p-1 hover:bg-white/10 rounded">
|
|
532
|
-
<CrossCircleIcon className="h-5 w-5 fill-gray-400 " />
|
|
533
|
-
</button>
|
|
534
|
-
</div>
|
|
535
|
-
<p className="text-white/70 mb-4">
|
|
536
|
-
Are you sure you want to delete this item?
|
|
537
|
-
</p>
|
|
538
|
-
<div className="flex gap-3">
|
|
539
|
-
<button className="px-4 py-2 bg-red-500/20 text-red-200 rounded-lg">
|
|
540
|
-
Delete
|
|
541
|
-
</button>
|
|
542
|
-
<button className="px-4 py-2 bg-white/10 text-white rounded-lg">
|
|
543
|
-
Cancel
|
|
544
|
-
</button>
|
|
545
|
-
</div>
|
|
546
|
-
</div>`}
|
|
547
|
-
</pre>
|
|
548
|
-
</div>
|
|
549
|
-
</div>
|
|
550
|
-
</div>
|
|
551
|
-
|
|
552
|
-
{/* Tag/Chip Removal */}
|
|
553
|
-
<div className="!space-y-4">
|
|
554
|
-
<h3 className="text-lg font-semibold !text-red-300">
|
|
555
|
-
Tag/Chip Removal
|
|
556
|
-
</h3>
|
|
557
|
-
<div className="!space-y-4">
|
|
558
|
-
<div className="flex flex-wrap gap-2">
|
|
559
|
-
<div className="flex items-center gap-2 rounded-full border border-blue-500/30 bg-blue-500/20 px-3 py-1">
|
|
560
|
-
<span className="text-sm text-blue-200">React</span>
|
|
561
|
-
<button className="rounded-full p-0.5 hover:bg-blue-500/30">
|
|
562
|
-
<CrossCircleIcon className="h-3 w-3 fill-blue-300" />
|
|
563
|
-
</button>
|
|
564
|
-
</div>
|
|
565
|
-
<div className="flex items-center gap-2 rounded-full border border-green-500/30 bg-green-500/20 px-3 py-1">
|
|
566
|
-
<span className="text-sm text-green-200">
|
|
567
|
-
TypeScript
|
|
568
|
-
</span>
|
|
569
|
-
<button className="rounded-full p-0.5 hover:bg-green-500/30">
|
|
570
|
-
<CrossCircleIcon className="h-3 w-3 fill-green-300" />
|
|
571
|
-
</button>
|
|
572
|
-
</div>
|
|
573
|
-
<div className="flex items-center gap-2 rounded-full border border-purple-500/30 bg-purple-500/20 px-3 py-1">
|
|
574
|
-
<span className="text-sm text-purple-200">
|
|
575
|
-
Tailwind
|
|
576
|
-
</span>
|
|
577
|
-
<button className="rounded-full p-0.5 hover:bg-purple-500/30">
|
|
578
|
-
<CrossCircleIcon className="h-3 w-3 fill-purple-300" />
|
|
579
|
-
</button>
|
|
580
|
-
</div>
|
|
581
|
-
</div>
|
|
582
|
-
<div className="rounded-lg bg-black/40 p-4">
|
|
583
|
-
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
584
|
-
{`// Removable tags/chips
|
|
585
|
-
<div className="flex items-center gap-2 bg-blue-500/20 border border-blue-500/30 px-3 py-1 rounded-full">
|
|
586
|
-
<span className="text-blue-200 text-sm">React</span>
|
|
587
|
-
<button className="p-0.5 hover:bg-blue-500/30 rounded-full">
|
|
588
|
-
<CrossCircleIcon className="h-3 w-3 fill-blue-300 " />
|
|
589
|
-
</button>
|
|
590
|
-
</div>
|
|
591
|
-
|
|
592
|
-
// Multiple tags
|
|
593
|
-
{tags.map((tag) => (
|
|
594
|
-
<div key={tag.id} className="flex items-center gap-2 bg-blue-500/20 px-3 py-1 rounded-full">
|
|
595
|
-
<span className="text-blue-200 text-sm">{tag.name}</span>
|
|
596
|
-
<button onClick={() => removeTag(tag.id)}>
|
|
597
|
-
<CrossCircleIcon className="h-3 w-3 fill-blue-300 " />
|
|
598
|
-
</button>
|
|
599
|
-
</div>
|
|
600
|
-
))}`}
|
|
601
|
-
</pre>
|
|
602
|
-
</div>
|
|
603
|
-
</div>
|
|
604
|
-
</div>
|
|
605
|
-
|
|
606
|
-
{/* Form Input Clear */}
|
|
607
|
-
<div className="!space-y-4">
|
|
608
|
-
<h3 className="text-lg font-semibold !text-red-300">
|
|
609
|
-
Form Input Clear
|
|
610
|
-
</h3>
|
|
611
|
-
<div className="!space-y-4">
|
|
612
|
-
<div className="!space-y-2">
|
|
613
|
-
<label className="text-sm font-medium !text-white">
|
|
614
|
-
Search
|
|
615
|
-
</label>
|
|
616
|
-
<div className="relative">
|
|
617
|
-
<input
|
|
618
|
-
type="text"
|
|
619
|
-
className="w-full rounded-lg border border-white/20 bg-white/5 px-3 py-2 pr-10 !text-white placeholder-white/50 focus:border-blue-500 focus:ring-2 focus:ring-blue-500/20"
|
|
620
|
-
placeholder="Type to search..."
|
|
621
|
-
defaultValue="Sample search query"
|
|
622
|
-
/>
|
|
623
|
-
<button className="absolute top-1/2 right-3 -translate-y-1/2 rounded p-0.5 hover:bg-white/10">
|
|
624
|
-
<CrossCircleIcon className="h-4 w-4 fill-gray-400" />
|
|
625
|
-
</button>
|
|
626
|
-
</div>
|
|
627
|
-
</div>
|
|
628
|
-
<div className="rounded-lg bg-black/40 p-4">
|
|
629
|
-
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
630
|
-
{`// Search input with clear button
|
|
631
|
-
<div className="relative">
|
|
632
|
-
<input
|
|
633
|
-
type="text"
|
|
634
|
-
className="w-full pr-10 border border-white/20 bg-white/5 px-3 py-2 rounded-lg"
|
|
635
|
-
placeholder="Type to search..."
|
|
636
|
-
value={searchValue}
|
|
637
|
-
onChange={(e) => setSearchValue(e.target.value)}
|
|
638
|
-
/>
|
|
639
|
-
<button
|
|
640
|
-
className="absolute right-3 top-1/2 -translate-y-1/2 p-0.5 hover:bg-white/10 rounded"
|
|
641
|
-
onClick={() => setSearchValue('')}
|
|
642
|
-
>
|
|
643
|
-
<CrossCircleIcon className="h-4 w-4 fill-gray-400 " />
|
|
644
|
-
</button>
|
|
645
|
-
</div>`}
|
|
646
|
-
</pre>
|
|
647
|
-
</div>
|
|
648
|
-
</div>
|
|
649
|
-
</div>
|
|
650
|
-
</div>
|
|
56
|
+
}`,
|
|
57
|
+
livePreview: (
|
|
58
|
+
<div className="text-fm-primary font-fm-text flex items-center gap-1.5 text-sm">
|
|
59
|
+
<CrossCircleIcon className="text-fm-icon-negative h-4 w-4" />
|
|
60
|
+
Failed
|
|
651
61
|
</div>
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
<div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
683
|
-
<h3 className="text-lg font-semibold !text-red-300">
|
|
684
|
-
💡 Best Practices
|
|
685
|
-
</h3>
|
|
686
|
-
<ul className="!space-y-2 text-sm text-white/70">
|
|
687
|
-
<li className="!text-white/70">
|
|
688
|
-
Always provide proper button labels for close actions
|
|
689
|
-
</li>
|
|
690
|
-
<li className="!text-white/70">
|
|
691
|
-
Use consistent close button placement
|
|
692
|
-
</li>
|
|
693
|
-
<li className="!text-white/70">
|
|
694
|
-
Ensure sufficient touch target size (44px minimum)
|
|
695
|
-
</li>
|
|
696
|
-
<li className="!text-white/70">
|
|
697
|
-
Provide visible focus states for keyboard users
|
|
698
|
-
</li>
|
|
699
|
-
<li className="!text-white/70">
|
|
700
|
-
Consider escape key functionality for modals
|
|
701
|
-
</li>
|
|
702
|
-
</ul>
|
|
703
|
-
</div>
|
|
704
|
-
</div>
|
|
705
|
-
|
|
706
|
-
<div className="rounded-lg border border-white/10 bg-white/5 p-6">
|
|
707
|
-
<h3 className="mb-4 text-lg font-semibold !text-purple-300">
|
|
708
|
-
Proper ARIA Implementation
|
|
709
|
-
</h3>
|
|
710
|
-
<div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
|
|
711
|
-
<div className="rounded-lg bg-black/40 p-4">
|
|
712
|
-
<pre className="overflow-x-auto text-sm !text-cyan-300">
|
|
713
|
-
{`// Close button with proper ARIA
|
|
714
|
-
<button
|
|
715
|
-
aria-label="Close dialog"
|
|
716
|
-
className="p-2 hover:bg-white/10 rounded"
|
|
717
|
-
onClick={onClose}
|
|
718
|
-
>
|
|
719
|
-
<CrossCircleIcon className="h-5 w-5 fill-gray-400 " />
|
|
720
|
-
</button>
|
|
721
|
-
|
|
722
|
-
// Dismissible alert with ARIA
|
|
723
|
-
<div
|
|
724
|
-
role="alert"
|
|
725
|
-
className="flex items-center justify-between p-4"
|
|
726
|
-
>
|
|
727
|
-
<span>Error message</span>
|
|
728
|
-
<button
|
|
729
|
-
aria-label="Dismiss error message"
|
|
730
|
-
onClick={onDismiss}
|
|
731
|
-
>
|
|
732
|
-
<CrossCircleIcon className="h-4 w-4 fill-red-400 " />
|
|
733
|
-
</button>
|
|
734
|
-
</div>
|
|
735
|
-
|
|
736
|
-
// Removable tag with ARIA
|
|
737
|
-
<div className="flex items-center gap-2 px-3 py-1 rounded-full">
|
|
738
|
-
<span>React</span>
|
|
739
|
-
<button
|
|
740
|
-
aria-label="Remove React tag"
|
|
741
|
-
onClick={() => removeTag('react')}
|
|
742
|
-
>
|
|
743
|
-
<CrossCircleIcon className="h-3 w-3 fill-blue-300 " />
|
|
744
|
-
</button>
|
|
745
|
-
</div>`}
|
|
746
|
-
</pre>
|
|
747
|
-
</div>
|
|
748
|
-
<div className="!space-y-4">
|
|
749
|
-
<p className="text-sm !text-white/70">
|
|
750
|
-
When using CrossCircleIcon for interactive elements,
|
|
751
|
-
always provide descriptive aria-label attributes that
|
|
752
|
-
explain the action being performed.
|
|
753
|
-
</p>
|
|
754
|
-
<div className="rounded-lg border border-red-500/20 bg-red-500/10 p-4">
|
|
755
|
-
<div className="flex items-center gap-2 text-sm text-red-200">
|
|
756
|
-
<CrossCircleIcon className="h-4 w-4 fill-red-400" />
|
|
757
|
-
<span>
|
|
758
|
-
Screen readers need context about what will be
|
|
759
|
-
closed or removed
|
|
760
|
-
</span>
|
|
761
|
-
</div>
|
|
762
|
-
</div>
|
|
763
|
-
</div>
|
|
764
|
-
</div>
|
|
765
|
-
</div>
|
|
766
|
-
</div>
|
|
767
|
-
|
|
768
|
-
{/* Related Icons */}
|
|
769
|
-
<div className="!space-y-8">
|
|
770
|
-
<h2 className="text-center text-3xl font-bold !text-white">
|
|
771
|
-
Related Icons
|
|
772
|
-
</h2>
|
|
773
|
-
<div className="grid grid-cols-2 gap-6 md:grid-cols-4">
|
|
774
|
-
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
775
|
-
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-blue-500/20">
|
|
776
|
-
<span className="!text-2xl !text-white">✓</span>
|
|
777
|
-
</div>
|
|
778
|
-
<div>
|
|
779
|
-
<div className="font-medium text-white">CheckIcon</div>
|
|
780
|
-
<div className="text-xs text-white/60">Confirmation</div>
|
|
781
|
-
</div>
|
|
782
|
-
</div>
|
|
783
|
-
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
784
|
-
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-gray-500/20">
|
|
785
|
-
<span className="!text-2xl !text-white">×</span>
|
|
786
|
-
</div>
|
|
787
|
-
<div>
|
|
788
|
-
<div className="font-medium text-white">CloseIcon</div>
|
|
789
|
-
<div className="text-xs text-white/60">Simple close</div>
|
|
790
|
-
</div>
|
|
791
|
-
</div>
|
|
792
|
-
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
793
|
-
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-red-500/20">
|
|
794
|
-
<span className="!text-2xl !text-white">🗑</span>
|
|
795
|
-
</div>
|
|
796
|
-
<div>
|
|
797
|
-
<div className="font-medium text-white">DeleteIcon</div>
|
|
798
|
-
<div className="text-xs text-white/60">Remove items</div>
|
|
799
|
-
</div>
|
|
800
|
-
</div>
|
|
801
|
-
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
802
|
-
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-orange-500/20">
|
|
803
|
-
<span className="!text-2xl !text-white">⚠</span>
|
|
804
|
-
</div>
|
|
805
|
-
<div>
|
|
806
|
-
<div className="font-medium text-white">AlertIcon</div>
|
|
807
|
-
<div className="text-xs text-white/60">
|
|
808
|
-
Warning states
|
|
809
|
-
</div>
|
|
810
|
-
</div>
|
|
811
|
-
</div>
|
|
812
|
-
</div>
|
|
813
|
-
</div>
|
|
814
|
-
</div>
|
|
815
|
-
|
|
816
|
-
{/* Footer */}
|
|
817
|
-
<div className="border-t border-white/10 bg-black/20 backdrop-blur-xl">
|
|
818
|
-
<div className="!mx-auto max-w-7xl px-6 py-8">
|
|
819
|
-
<div className="!space-y-4 text-center">
|
|
820
|
-
<p className="!text-white/60">
|
|
821
|
-
CrossCircleIcon is part of the Aural UI icon library, built
|
|
822
|
-
with accessibility and user interaction in mind.
|
|
823
|
-
</p>
|
|
824
|
-
<p className="text-sm !text-white/40">
|
|
825
|
-
All icons use Radix UI's AccessibleIcon for screen reader
|
|
826
|
-
compatibility and follow WCAG guidelines.
|
|
827
|
-
</p>
|
|
828
|
-
</div>
|
|
829
|
-
</div>
|
|
830
|
-
</div>
|
|
831
|
-
</div>
|
|
832
|
-
</>
|
|
62
|
+
),
|
|
63
|
+
}}
|
|
64
|
+
relatedIcons={[
|
|
65
|
+
{
|
|
66
|
+
name: "CrossIcon",
|
|
67
|
+
description: "Simple cross mark",
|
|
68
|
+
icon: CrossIcon,
|
|
69
|
+
accentToken: "negative",
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: "TickCircleIcon",
|
|
73
|
+
description: "Filled tick circle",
|
|
74
|
+
icon: TickCircleIcon,
|
|
75
|
+
accentToken: "positive",
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: "AlertIcon",
|
|
79
|
+
description: "Warning indicator",
|
|
80
|
+
icon: AlertIcon,
|
|
81
|
+
accentToken: "warning",
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: "WarningIcon",
|
|
85
|
+
description: "Caution signal",
|
|
86
|
+
icon: WarningIcon,
|
|
87
|
+
accentToken: "info",
|
|
88
|
+
},
|
|
89
|
+
]}
|
|
90
|
+
/>
|
|
833
91
|
),
|
|
834
92
|
},
|
|
835
93
|
},
|
|
836
94
|
tags: ["autodocs"],
|
|
837
95
|
argTypes: {
|
|
838
|
-
width: {
|
|
839
|
-
control: { type: "range", min: 8, max: 96, step: 2 },
|
|
840
|
-
description: "Width of the icon in pixels",
|
|
841
|
-
},
|
|
842
|
-
withAccessibility: {
|
|
843
|
-
control: "boolean",
|
|
844
|
-
description: "Whether to wrap the icon with accessibility features",
|
|
845
|
-
},
|
|
846
|
-
height: {
|
|
847
|
-
control: { type: "range", min: 8, max: 96, step: 2 },
|
|
848
|
-
description: "Height of the icon in pixels",
|
|
849
|
-
},
|
|
850
|
-
fill: {
|
|
851
|
-
control: "color",
|
|
852
|
-
description: "Fill color of the icon",
|
|
853
|
-
},
|
|
854
96
|
className: {
|
|
855
97
|
control: "text",
|
|
856
|
-
description: "CSS classes for
|
|
98
|
+
description: "CSS classes for the SVG element",
|
|
857
99
|
},
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
description: "
|
|
100
|
+
withAccessibility: {
|
|
101
|
+
control: "boolean",
|
|
102
|
+
description: "Wrap with accessibility label",
|
|
861
103
|
},
|
|
862
104
|
},
|
|
863
105
|
}
|
|
@@ -865,205 +107,111 @@ function DismissibleAlert() {
|
|
|
865
107
|
export default meta
|
|
866
108
|
type Story = StoryObj<typeof CrossCircleIcon>
|
|
867
109
|
|
|
868
|
-
// Story parameters for consistent dark theme
|
|
869
|
-
const storyParameters = {
|
|
870
|
-
backgrounds: {
|
|
871
|
-
default: "dark",
|
|
872
|
-
values: [
|
|
873
|
-
{ name: "dark", value: "#0a0a0a" },
|
|
874
|
-
{ name: "darker", value: "#000000" },
|
|
875
|
-
],
|
|
876
|
-
},
|
|
877
|
-
}
|
|
878
|
-
|
|
879
110
|
export const Default: Story = {
|
|
880
111
|
args: {
|
|
881
|
-
className: "h-6 w-6
|
|
112
|
+
className: "h-6 w-6 text-fm-icon-negative",
|
|
882
113
|
withAccessibility: true,
|
|
883
114
|
},
|
|
884
|
-
parameters: storyParameters,
|
|
885
115
|
render: (args) => (
|
|
886
|
-
<
|
|
116
|
+
<IconDefaultCanvas>
|
|
887
117
|
<CrossCircleIcon {...args} />
|
|
888
|
-
</
|
|
118
|
+
</IconDefaultCanvas>
|
|
889
119
|
),
|
|
890
120
|
}
|
|
891
121
|
|
|
892
122
|
export const SizeVariations: Story = {
|
|
893
|
-
|
|
894
|
-
...storyParameters,
|
|
895
|
-
docs: {
|
|
896
|
-
description: {
|
|
897
|
-
story:
|
|
898
|
-
"CrossCircleIcon in different sizes, from small UI elements to large displays.",
|
|
899
|
-
},
|
|
900
|
-
},
|
|
901
|
-
},
|
|
902
|
-
render: () => (
|
|
903
|
-
<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">
|
|
904
|
-
<div className="text-center">
|
|
905
|
-
<CrossCircleIcon className="!mx-auto mb-2 h-3 w-3 fill-red-400" />
|
|
906
|
-
<span className="text-xs text-white/60">12px</span>
|
|
907
|
-
</div>
|
|
908
|
-
<div className="text-center">
|
|
909
|
-
<CrossCircleIcon className="!mx-auto mb-2 h-4 w-4 fill-red-400" />
|
|
910
|
-
<span className="text-xs text-white/60">16px</span>
|
|
911
|
-
</div>
|
|
912
|
-
<div className="text-center">
|
|
913
|
-
<CrossCircleIcon className="!mx-auto mb-2 h-5 w-5 fill-red-400" />
|
|
914
|
-
<span className="text-xs text-white/60">20px</span>
|
|
915
|
-
</div>
|
|
916
|
-
<div className="text-center">
|
|
917
|
-
<CrossCircleIcon className="!mx-auto mb-2 h-6 w-6 fill-red-400" />
|
|
918
|
-
<span className="text-xs text-white/60">24px</span>
|
|
919
|
-
</div>
|
|
920
|
-
<div className="text-center">
|
|
921
|
-
<CrossCircleIcon className="!mx-auto mb-2 h-8 w-8 fill-red-400" />
|
|
922
|
-
<span className="text-xs text-white/60">32px</span>
|
|
923
|
-
</div>
|
|
924
|
-
<div className="text-center">
|
|
925
|
-
<CrossCircleIcon className="!mx-auto mb-2 h-12 w-12 fill-red-400" />
|
|
926
|
-
<span className="text-xs text-white/60">48px</span>
|
|
927
|
-
</div>
|
|
928
|
-
</div>
|
|
929
|
-
),
|
|
123
|
+
render: () => <IconSizeVariations icon={CrossCircleIcon} />,
|
|
930
124
|
}
|
|
931
125
|
|
|
932
126
|
export const ColorVariations: Story = {
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
story:
|
|
938
|
-
"CrossCircleIcon in different semantic colors for various use cases.",
|
|
939
|
-
},
|
|
940
|
-
},
|
|
941
|
-
},
|
|
127
|
+
render: () => <IconColorVariations icon={CrossCircleIcon} />,
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export const InteractiveStates: Story = {
|
|
942
131
|
render: () => (
|
|
943
|
-
<
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
<div className="text-xs text-white/60">fill-white/60</div>
|
|
964
|
-
</div>
|
|
965
|
-
<div className="text-center">
|
|
966
|
-
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-pink-500/30 bg-pink-500/20">
|
|
967
|
-
<CrossCircleIcon className="h-8 w-8 fill-pink-400" />
|
|
968
|
-
</div>
|
|
969
|
-
<div className="text-sm font-medium text-white">Accent</div>
|
|
970
|
-
<div className="text-xs text-pink-400">fill-pink-400</div>
|
|
971
|
-
</div>
|
|
972
|
-
</div>
|
|
132
|
+
<IconInteractiveStates
|
|
133
|
+
icon={CrossCircleIcon}
|
|
134
|
+
states={[
|
|
135
|
+
{
|
|
136
|
+
label: "Negative",
|
|
137
|
+
className: "h-8 w-8 text-fm-icon-negative",
|
|
138
|
+
description: "Error state",
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
label: "Warning",
|
|
142
|
+
className: "h-8 w-8 text-fm-icon-warning",
|
|
143
|
+
description: "Caution state",
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
label: "Inactive",
|
|
147
|
+
className: "h-8 w-8 text-fm-icon-inactive",
|
|
148
|
+
description: "Disabled state",
|
|
149
|
+
},
|
|
150
|
+
]}
|
|
151
|
+
/>
|
|
973
152
|
),
|
|
974
153
|
}
|
|
975
154
|
|
|
976
155
|
export const UsageExamples: Story = {
|
|
977
|
-
parameters: {
|
|
978
|
-
...storyParameters,
|
|
979
|
-
docs: {
|
|
980
|
-
description: {
|
|
981
|
-
story:
|
|
982
|
-
"Real-world usage examples showing CrossCircleIcon in different UI contexts.",
|
|
983
|
-
},
|
|
984
|
-
},
|
|
985
|
-
},
|
|
986
156
|
render: () => (
|
|
987
|
-
<
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
<p className="text-sm text-red-300/80">
|
|
998
|
-
Unable to process your payment. Please try again.
|
|
999
|
-
</p>
|
|
1000
|
-
</div>
|
|
157
|
+
<IconUsageCanvas>
|
|
158
|
+
<IconUsageSection title="Error Notification">
|
|
159
|
+
<div className="border-fm-icon-negative/30 bg-fm-icon-negative/10 flex w-full max-w-sm items-start gap-3 rounded-xl border p-4">
|
|
160
|
+
<CrossCircleIcon className="text-fm-icon-negative h-5 w-5 shrink-0" />
|
|
161
|
+
<div>
|
|
162
|
+
<div className="text-fm-primary font-fm-text text-sm font-medium">
|
|
163
|
+
Upload failed
|
|
164
|
+
</div>
|
|
165
|
+
<div className="text-fm-secondary font-fm-text text-xs">
|
|
166
|
+
File size exceeds the 50 MB limit.
|
|
1001
167
|
</div>
|
|
1002
|
-
<button className="flex-shrink-0 rounded p-1 hover:bg-red-500/20">
|
|
1003
|
-
<CrossCircleIcon className="h-4 w-4 fill-red-400" />
|
|
1004
|
-
</button>
|
|
1005
168
|
</div>
|
|
1006
169
|
</div>
|
|
1007
|
-
</
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
<CrossCircleIcon className="h-3 w-3 fill-blue-300" />
|
|
1017
|
-
</button>
|
|
1018
|
-
</div>
|
|
1019
|
-
<div className="flex items-center gap-2 rounded-full border border-green-500/30 bg-green-500/20 px-3 py-1">
|
|
1020
|
-
<span className="text-sm text-green-200">TypeScript</span>
|
|
1021
|
-
<button className="rounded-full p-0.5 hover:bg-green-500/30">
|
|
1022
|
-
<CrossCircleIcon className="h-3 w-3 fill-green-300" />
|
|
1023
|
-
</button>
|
|
170
|
+
</IconUsageSection>
|
|
171
|
+
|
|
172
|
+
<IconUsageSection title="Form Validation Error">
|
|
173
|
+
<div className="border-fm-divider-secondary bg-fm-surface-secondary w-full max-w-sm space-y-2 rounded-xl border p-4">
|
|
174
|
+
<div className="border-fm-icon-negative/30 flex items-center gap-2 rounded-lg border px-3 py-2">
|
|
175
|
+
<CrossCircleIcon className="text-fm-icon-negative h-4 w-4 shrink-0" />
|
|
176
|
+
<span className="text-fm-secondary font-fm-text text-sm">
|
|
177
|
+
Invalid email address
|
|
178
|
+
</span>
|
|
1024
179
|
</div>
|
|
1025
180
|
</div>
|
|
1026
|
-
</
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
181
|
+
</IconUsageSection>
|
|
182
|
+
|
|
183
|
+
<IconUsageSection title="Status List">
|
|
184
|
+
<div className="border-fm-divider-secondary bg-fm-surface-secondary w-full max-w-sm space-y-2 rounded-xl border p-4">
|
|
185
|
+
{[
|
|
186
|
+
{ label: "Sync complete", ok: true },
|
|
187
|
+
{ label: "Connection failed", ok: false },
|
|
188
|
+
{ label: "Auth timeout", ok: false },
|
|
189
|
+
].map(({ label, ok }) => (
|
|
190
|
+
<div key={label} className="flex items-center gap-2">
|
|
191
|
+
{ok ? (
|
|
192
|
+
<TickCircleIcon className="text-fm-icon-positive h-4 w-4 shrink-0" />
|
|
193
|
+
) : (
|
|
194
|
+
<CrossCircleIcon className="text-fm-icon-negative h-4 w-4 shrink-0" />
|
|
195
|
+
)}
|
|
196
|
+
<span className="text-fm-primary font-fm-text text-sm">
|
|
197
|
+
{label}
|
|
198
|
+
</span>
|
|
199
|
+
</div>
|
|
200
|
+
))}
|
|
1041
201
|
</div>
|
|
1042
|
-
</
|
|
1043
|
-
</
|
|
202
|
+
</IconUsageSection>
|
|
203
|
+
</IconUsageCanvas>
|
|
1044
204
|
),
|
|
1045
205
|
}
|
|
1046
206
|
|
|
1047
207
|
export const Playground: Story = {
|
|
1048
|
-
parameters: {
|
|
1049
|
-
...storyParameters,
|
|
1050
|
-
docs: {
|
|
1051
|
-
description: {
|
|
1052
|
-
story:
|
|
1053
|
-
"Interactive playground to experiment with different CrossCircleIcon configurations.",
|
|
1054
|
-
},
|
|
1055
|
-
},
|
|
1056
|
-
},
|
|
1057
208
|
args: {
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
className: "fill-red-400 ",
|
|
209
|
+
className: "h-8 w-8 text-fm-icon-negative",
|
|
210
|
+
withAccessibility: true,
|
|
1061
211
|
},
|
|
1062
212
|
render: (args) => (
|
|
1063
|
-
<
|
|
1064
|
-
<
|
|
1065
|
-
|
|
1066
|
-
</div>
|
|
1067
|
-
</div>
|
|
213
|
+
<IconPlaygroundCanvas>
|
|
214
|
+
<CrossCircleIcon {...args} />
|
|
215
|
+
</IconPlaygroundCanvas>
|
|
1068
216
|
),
|
|
1069
217
|
}
|