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