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