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,20 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import type { Meta, StoryObj } from "@storybook/react-vite"
|
|
3
3
|
|
|
4
|
+
import { CopyIcon } from "src/ui/icons/copy-icon"
|
|
5
|
+
import { EditBigIcon } from "src/ui/icons/edit-big-icon"
|
|
6
|
+
import { PencilIcon } from "src/ui/icons/pencil-icon"
|
|
7
|
+
import { WarningIcon } from "src/ui/icons/warning-icon"
|
|
8
|
+
import {
|
|
9
|
+
IconColorVariations,
|
|
10
|
+
IconDefaultCanvas,
|
|
11
|
+
IconPlaygroundCanvas,
|
|
12
|
+
IconSizeVariations,
|
|
13
|
+
IconUsageCanvas,
|
|
14
|
+
IconUsageSection,
|
|
15
|
+
} from "src/ui/story-spec/icons/icon-story-canvas"
|
|
16
|
+
import { AuralIconDocsPage } from "src/ui/story-spec/icons/icon-story-docs-page"
|
|
17
|
+
|
|
4
18
|
import { TrashIcon } from "."
|
|
5
19
|
|
|
6
20
|
const meta: Meta<typeof TrashIcon> = {
|
|
@@ -18,800 +32,68 @@ const meta: Meta<typeof TrashIcon> = {
|
|
|
18
32
|
},
|
|
19
33
|
docs: {
|
|
20
34
|
page: () => (
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
{
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
padding: 0 !important;
|
|
33
|
-
margin: 0 !important;
|
|
34
|
-
background: transparent !important;
|
|
35
|
-
}
|
|
36
|
-
.docs-story {
|
|
37
|
-
background: transparent !important;
|
|
38
|
-
}
|
|
39
|
-
.sbdocs {
|
|
40
|
-
background: transparent !important;
|
|
41
|
-
}
|
|
42
|
-
body {
|
|
43
|
-
background: var(--color-fm-surface-primary) !important;
|
|
44
|
-
}
|
|
45
|
-
#storybook-docs {
|
|
46
|
-
background: var(--color-fm-surface-primary) !important;
|
|
47
|
-
}
|
|
48
|
-
.sbdocs-preview {
|
|
49
|
-
background: transparent !important;
|
|
50
|
-
border: none !important;
|
|
51
|
-
}
|
|
52
|
-
.sbdocs-h1, .sbdocs-h2, .sbdocs-h3, .sbdocs-h4, .sbdocs-h5, .sbdocs-h6 {
|
|
53
|
-
color: var(--color-fm-icon-active) !important;
|
|
54
|
-
}
|
|
55
|
-
.sbdocs-p, .sbdocs-li {
|
|
56
|
-
color: var(--color-fm-secondary) !important;
|
|
57
|
-
}
|
|
58
|
-
.sbdocs-code {
|
|
59
|
-
background: var(--color-fm-surface-secondary) !important;
|
|
60
|
-
color: var(--color-fm-secondary-500) !important;
|
|
61
|
-
border: 1px solid var(--color-fm-divider-secondary) !important;
|
|
62
|
-
}
|
|
63
|
-
.sbdocs-pre {
|
|
64
|
-
background: var(--color-fm-surface-secondary) !important;
|
|
65
|
-
border: 1px solid var(--color-fm-divider-secondary) !important;
|
|
66
|
-
}
|
|
67
|
-
.sbdocs-table {
|
|
68
|
-
background: var(--color-fm-surface-secondary) !important;
|
|
69
|
-
border: 1px solid var(--color-fm-divider-secondary) !important;
|
|
70
|
-
}
|
|
71
|
-
.sbdocs-table th {
|
|
72
|
-
background: var(--color-fm-surface-secondary) !important;
|
|
73
|
-
color: var(--color-fm-icon-active) !important;
|
|
74
|
-
border-bottom: 1px solid var(--color-fm-divider-secondary) !important;
|
|
75
|
-
}
|
|
76
|
-
.sbdocs-table td {
|
|
77
|
-
color: var(--color-fm-secondary) !important;
|
|
78
|
-
border-bottom: 1px solid var(--color-fm-divider-tertiary) !important;
|
|
79
|
-
}
|
|
80
|
-
`}
|
|
81
|
-
</style>
|
|
82
|
-
|
|
83
|
-
<div className="from-fm-surface-primary via-fm-icon-negative/5 to-fm-surface-primary min-h-screen bg-linear-to-br">
|
|
84
|
-
{/* Header */}
|
|
85
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary relative overflow-hidden border-b backdrop-blur-xl">
|
|
86
|
-
<div className="from-fm-icon-negative/10 to-fm-icon-warning/10 absolute inset-0 bg-linear-to-r via-transparent" />
|
|
87
|
-
<div className="relative !mx-auto max-w-7xl px-6 py-16">
|
|
88
|
-
<div className="!space-y-6 text-center">
|
|
89
|
-
<div className="border-fm-icon-negative/30 from-fm-icon-negative/20 to-fm-icon-warning/20 !mx-auto flex h-24 w-24 items-center justify-center rounded-2xl border bg-linear-to-br">
|
|
90
|
-
<TrashIcon className="text-fm-icon-negative h-12 w-12" />
|
|
91
|
-
</div>
|
|
92
|
-
<h1 className="!text-fm-primary text-5xl font-bold">
|
|
93
|
-
TrashIcon
|
|
94
|
-
</h1>
|
|
95
|
-
<p className="text-fm-secondary! !mx-auto max-w-3xl text-xl leading-relaxed">
|
|
96
|
-
A versatile trash icon for delete operations, removal
|
|
97
|
-
actions, and cleanup functionality. Built with accessibility
|
|
98
|
-
in mind using Radix UI's AccessibleIcon wrapper.
|
|
99
|
-
</p>
|
|
100
|
-
|
|
101
|
-
{/* Stats */}
|
|
102
|
-
<div className="flex items-center justify-center gap-8 pt-8">
|
|
103
|
-
<div className="text-center">
|
|
104
|
-
<div className="text-fm-icon-negative text-3xl font-bold">
|
|
105
|
-
Accessible
|
|
106
|
-
</div>
|
|
107
|
-
<div className="text-fm-tertiary text-sm">
|
|
108
|
-
Screen reader friendly
|
|
109
|
-
</div>
|
|
110
|
-
</div>
|
|
111
|
-
<div className="bg-fm-divider-primary h-8 w-px" />
|
|
112
|
-
<div className="text-center">
|
|
113
|
-
<div className="text-fm-icon-warning text-3xl font-bold">
|
|
114
|
-
Scalable
|
|
115
|
-
</div>
|
|
116
|
-
<div className="text-fm-tertiary text-sm">
|
|
117
|
-
Any size needed
|
|
118
|
-
</div>
|
|
119
|
-
</div>
|
|
120
|
-
<div className="bg-fm-divider-primary h-8 w-px" />
|
|
121
|
-
<div className="text-center">
|
|
122
|
-
<div className="text-fm-secondary-600 text-3xl font-bold">
|
|
123
|
-
Flexible
|
|
124
|
-
</div>
|
|
125
|
-
<div className="text-fm-tertiary text-sm">
|
|
126
|
-
Customizable styling
|
|
127
|
-
</div>
|
|
128
|
-
</div>
|
|
129
|
-
</div>
|
|
130
|
-
</div>
|
|
131
|
-
</div>
|
|
132
|
-
</div>
|
|
133
|
-
|
|
134
|
-
{/* Content */}
|
|
135
|
-
<div className="!mx-auto max-w-7xl !space-y-16 px-6 py-12">
|
|
136
|
-
{/* Quick Usage */}
|
|
137
|
-
<div className="!space-y-8">
|
|
138
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
139
|
-
Quick Start
|
|
140
|
-
</h2>
|
|
141
|
-
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
142
|
-
<div className="!space-y-4">
|
|
143
|
-
<h3 className="text-fm-icon-negative! text-xl font-semibold">
|
|
144
|
-
Basic Usage
|
|
145
|
-
</h3>
|
|
146
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
147
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
148
|
-
{`import { TrashIcon } from "@icons/trash-icon"
|
|
149
|
-
|
|
150
|
-
function MyComponent() {
|
|
35
|
+
<AuralIconDocsPage
|
|
36
|
+
accentToken="negative"
|
|
37
|
+
features={[
|
|
38
|
+
{ title: "Delete", description: "Remove or delete content" },
|
|
39
|
+
{ title: "Destructive", description: "Irreversible action cue" },
|
|
40
|
+
{ title: "Accessible", description: "ARIA-ready by default" },
|
|
41
|
+
]}
|
|
42
|
+
quickStart={{
|
|
43
|
+
codeExample: `import { TrashIcon } from "src/ui/icons/trash-icon"
|
|
44
|
+
|
|
45
|
+
function DeleteButton() {
|
|
151
46
|
return (
|
|
152
|
-
<button
|
|
153
|
-
<TrashIcon className="h-5 w-5 text-
|
|
154
|
-
<span>Delete item</span>
|
|
47
|
+
<button>
|
|
48
|
+
<TrashIcon className="h-5 w-5 text-fm-icon-negative" />
|
|
155
49
|
</button>
|
|
156
50
|
)
|
|
157
|
-
}
|
|
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
|
-
<th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
|
|
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-icon-negative! 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
|
-
24
|
|
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-icon-negative! 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-icon-negative! px-6 py-4 font-mono text-sm">
|
|
251
|
-
className
|
|
252
|
-
</td>
|
|
253
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
254
|
-
string
|
|
255
|
-
</td>
|
|
256
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
257
|
-
-
|
|
258
|
-
</td>
|
|
259
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
260
|
-
CSS classes for styling
|
|
261
|
-
</td>
|
|
262
|
-
</tr>
|
|
263
|
-
<tr className="bg-fm-surface-secondary!">
|
|
264
|
-
<td className="text-fm-icon-negative! px-6 py-4 font-mono text-sm">
|
|
265
|
-
...svgProps
|
|
266
|
-
</td>
|
|
267
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
268
|
-
SVGProps
|
|
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
|
-
All standard SVG element props
|
|
275
|
-
</td>
|
|
276
|
-
</tr>
|
|
277
|
-
</tbody>
|
|
278
|
-
</table>
|
|
279
|
-
</div>
|
|
280
|
-
</div>
|
|
281
|
-
|
|
282
|
-
{/* Size Variations */}
|
|
283
|
-
<div className="!space-y-8">
|
|
284
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
285
|
-
Size Variations
|
|
286
|
-
</h2>
|
|
287
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-8">
|
|
288
|
-
<div className="!space-y-6">
|
|
289
|
-
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
|
|
290
|
-
<div className="!space-y-4">
|
|
291
|
-
<h3 className="text-fm-icon-negative! text-lg font-semibold">
|
|
292
|
-
Standard Sizes
|
|
293
|
-
</h3>
|
|
294
|
-
<div className="bg-fm-surface-secondary flex items-end gap-6 rounded-lg p-6">
|
|
295
|
-
<div className="text-center">
|
|
296
|
-
<TrashIcon className="text-fm-icon-negative !mx-auto mb-2 h-3 w-3" />
|
|
297
|
-
<span className="text-fm-tertiary text-xs">
|
|
298
|
-
12px
|
|
299
|
-
</span>
|
|
300
|
-
</div>
|
|
301
|
-
<div className="text-center">
|
|
302
|
-
<TrashIcon className="text-fm-icon-negative !mx-auto mb-2 h-4 w-4" />
|
|
303
|
-
<span className="text-fm-tertiary text-xs">
|
|
304
|
-
16px
|
|
305
|
-
</span>
|
|
306
|
-
</div>
|
|
307
|
-
<div className="text-center">
|
|
308
|
-
<TrashIcon className="text-fm-icon-negative !mx-auto mb-2 h-5 w-5" />
|
|
309
|
-
<span className="text-fm-tertiary text-xs">
|
|
310
|
-
20px
|
|
311
|
-
</span>
|
|
312
|
-
</div>
|
|
313
|
-
<div className="text-center">
|
|
314
|
-
<TrashIcon className="text-fm-icon-negative !mx-auto mb-2 h-6 w-6" />
|
|
315
|
-
<span className="text-fm-tertiary text-xs">
|
|
316
|
-
24px
|
|
317
|
-
</span>
|
|
318
|
-
</div>
|
|
319
|
-
<div className="text-center">
|
|
320
|
-
<TrashIcon className="text-fm-icon-negative !mx-auto mb-2 h-8 w-8" />
|
|
321
|
-
<span className="text-fm-tertiary text-xs">
|
|
322
|
-
32px
|
|
323
|
-
</span>
|
|
324
|
-
</div>
|
|
325
|
-
<div className="text-center">
|
|
326
|
-
<TrashIcon className="text-fm-icon-negative !mx-auto mb-2 h-12 w-12" />
|
|
327
|
-
<span className="text-fm-tertiary text-xs">
|
|
328
|
-
48px
|
|
329
|
-
</span>
|
|
330
|
-
</div>
|
|
331
|
-
</div>
|
|
332
|
-
</div>
|
|
333
|
-
|
|
334
|
-
<div className="!space-y-4">
|
|
335
|
-
<h3 className="text-fm-icon-negative! text-lg font-semibold">
|
|
336
|
-
Code Example
|
|
337
|
-
</h3>
|
|
338
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
339
|
-
<pre className="text-fm-icon-info! overflow-x-auto text-sm">
|
|
340
|
-
{`// Small (16px)
|
|
341
|
-
<TrashIcon className="h-4 w-4" />
|
|
342
|
-
|
|
343
|
-
// Medium (24px)
|
|
344
|
-
<TrashIcon className="h-6 w-6" />
|
|
345
|
-
|
|
346
|
-
// Large (32px)
|
|
347
|
-
<TrashIcon className="h-8 w-8" />
|
|
348
|
-
|
|
349
|
-
// Custom size
|
|
350
|
-
<TrashIcon width={40} height={40} />`}
|
|
351
|
-
</pre>
|
|
352
|
-
</div>
|
|
353
|
-
</div>
|
|
354
|
-
</div>
|
|
355
|
-
</div>
|
|
356
|
-
</div>
|
|
357
|
-
</div>
|
|
358
|
-
|
|
359
|
-
{/* Color Variations */}
|
|
360
|
-
<div className="!space-y-8">
|
|
361
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
362
|
-
Color Variations
|
|
363
|
-
</h2>
|
|
364
|
-
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
365
|
-
<div className="!space-y-4">
|
|
366
|
-
<h3 className="text-fm-icon-negative! text-lg font-semibold">
|
|
367
|
-
Semantic Colors
|
|
368
|
-
</h3>
|
|
369
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
|
|
370
|
-
<div className="flex items-center gap-4">
|
|
371
|
-
<TrashIcon className="text-fm-icon-negative h-6 w-6" />
|
|
372
|
-
<div>
|
|
373
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
374
|
-
Danger
|
|
375
|
-
</div>
|
|
376
|
-
<div className="text-fm-tertiary text-xs">
|
|
377
|
-
text-fm-icon-negative
|
|
378
|
-
</div>
|
|
379
|
-
</div>
|
|
380
|
-
</div>
|
|
381
|
-
<div className="flex items-center gap-4">
|
|
382
|
-
<TrashIcon className="text-fm-icon-warning h-6 w-6" />
|
|
383
|
-
<div>
|
|
384
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
385
|
-
Warning
|
|
386
|
-
</div>
|
|
387
|
-
<div className="text-fm-tertiary text-xs">
|
|
388
|
-
text-fm-icon-warning
|
|
389
|
-
</div>
|
|
390
|
-
</div>
|
|
391
|
-
</div>
|
|
392
|
-
<div className="flex items-center gap-4">
|
|
393
|
-
<TrashIcon className="text-fm-placeholder h-6 w-6" />
|
|
394
|
-
<div>
|
|
395
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
396
|
-
Neutral
|
|
397
|
-
</div>
|
|
398
|
-
<div className="text-fm-tertiary text-xs">
|
|
399
|
-
text-fm-placeholder
|
|
400
|
-
</div>
|
|
401
|
-
</div>
|
|
402
|
-
</div>
|
|
403
|
-
<div className="flex items-center gap-4">
|
|
404
|
-
<TrashIcon className="text-fm-placeholder h-6 w-6" />
|
|
405
|
-
<div>
|
|
406
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
407
|
-
Disabled
|
|
408
|
-
</div>
|
|
409
|
-
<div className="text-fm-tertiary text-xs">
|
|
410
|
-
text-fm-placeholder
|
|
411
|
-
</div>
|
|
412
|
-
</div>
|
|
413
|
-
</div>
|
|
414
|
-
</div>
|
|
415
|
-
</div>
|
|
416
|
-
|
|
417
|
-
<div className="!space-y-4">
|
|
418
|
-
<h3 className="text-fm-icon-negative! text-lg font-semibold">
|
|
419
|
-
Custom Colors
|
|
420
|
-
</h3>
|
|
421
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
422
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
423
|
-
{`// Using Tailwind classes
|
|
424
|
-
<TrashIcon className="h-6 w-6 text-red-400" />
|
|
425
|
-
<TrashIcon className="h-6 w-6 text-orange-500" />
|
|
426
|
-
|
|
427
|
-
// Using CSS custom properties
|
|
428
|
-
<TrashIcon
|
|
429
|
-
className="h-6 w-6"
|
|
430
|
-
style={{ color: 'var(--color-danger)' }}
|
|
431
|
-
/>
|
|
432
|
-
|
|
433
|
-
// Direct stroke prop
|
|
434
|
-
<TrashIcon
|
|
435
|
-
width={24}
|
|
436
|
-
height={24}
|
|
437
|
-
stroke="#ef4444"
|
|
438
|
-
/>`}
|
|
439
|
-
</pre>
|
|
440
|
-
</div>
|
|
441
|
-
</div>
|
|
442
|
-
</div>
|
|
443
|
-
</div>
|
|
444
|
-
|
|
445
|
-
{/* Usage Examples */}
|
|
446
|
-
<div className="!space-y-8">
|
|
447
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
448
|
-
Usage Examples
|
|
449
|
-
</h2>
|
|
450
|
-
|
|
451
|
-
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
452
|
-
{/* Delete Button */}
|
|
453
|
-
<div className="!space-y-4">
|
|
454
|
-
<h3 className="text-fm-icon-negative! text-lg font-semibold">
|
|
455
|
-
Delete Button
|
|
456
|
-
</h3>
|
|
457
|
-
<div className="!space-y-4">
|
|
458
|
-
<div className="flex gap-4">
|
|
459
|
-
<button className="border-fm-icon-negative/30 bg-fm-icon-negative/20 text-fm-icon-negative hover:bg-fm-icon-negative/30 flex items-center gap-2 rounded-lg border px-4 py-2 transition-colors">
|
|
460
|
-
<TrashIcon className="h-4 w-4" />
|
|
461
|
-
Delete
|
|
462
|
-
</button>
|
|
463
|
-
<button className="border-fm-icon-warning/30 bg-fm-icon-warning/20 text-fm-icon-warning hover:bg-fm-icon-warning/30 flex items-center gap-2 rounded-lg border px-3 py-2 transition-colors">
|
|
464
|
-
<TrashIcon className="h-4 w-4" />
|
|
465
|
-
Remove
|
|
466
|
-
</button>
|
|
467
|
-
</div>
|
|
468
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
469
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
470
|
-
{`// Primary delete button
|
|
471
|
-
<button className="flex items-center gap-2 bg-red-500/20 border border-red-500/30 px-4 py-2 rounded-lg">
|
|
472
|
-
<TrashIcon className="h-4 w-4" />
|
|
473
|
-
Delete
|
|
474
|
-
</button>
|
|
475
|
-
|
|
476
|
-
// Secondary remove button
|
|
477
|
-
<button className="flex items-center gap-2 bg-orange-500/20 border border-orange-500/30 px-3 py-2 rounded-lg">
|
|
478
|
-
<TrashIcon className="h-4 w-4" />
|
|
479
|
-
Remove
|
|
480
|
-
</button>`}
|
|
481
|
-
</pre>
|
|
482
|
-
</div>
|
|
483
|
-
</div>
|
|
484
|
-
</div>
|
|
485
|
-
|
|
486
|
-
{/* List Item */}
|
|
487
|
-
<div className="!space-y-4">
|
|
488
|
-
<h3 className="text-fm-icon-negative! text-lg font-semibold">
|
|
489
|
-
List Item Actions
|
|
490
|
-
</h3>
|
|
491
|
-
<div className="!space-y-4">
|
|
492
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-4">
|
|
493
|
-
<div className="flex items-center justify-between">
|
|
494
|
-
<div className="flex items-center gap-3">
|
|
495
|
-
<div className="bg-fm-icon-info/20 h-10 w-10 rounded-lg"></div>
|
|
496
|
-
<div>
|
|
497
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
498
|
-
Project Document.pdf
|
|
499
|
-
</div>
|
|
500
|
-
<div className="text-fm-tertiary text-xs">
|
|
501
|
-
2.4 MB • Modified 2 hours ago
|
|
502
|
-
</div>
|
|
503
|
-
</div>
|
|
504
|
-
</div>
|
|
505
|
-
<button className="text-fm-placeholder hover:bg-fm-icon-negative/20 hover:text-fm-icon-negative rounded-lg p-2 transition-colors">
|
|
506
|
-
<TrashIcon className="h-4 w-4" />
|
|
507
|
-
</button>
|
|
508
|
-
</div>
|
|
509
|
-
</div>
|
|
510
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
511
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
512
|
-
{`<div className="flex items-center justify-between">
|
|
513
|
-
<div className="flex items-center gap-3">
|
|
514
|
-
{/* File info */}
|
|
515
|
-
</div>
|
|
516
|
-
<button className="p-2 rounded-lg text-gray-400 hover:bg-red-500/20 hover:text-red-400 transition-colors">
|
|
517
|
-
<TrashIcon className="h-4 w-4" />
|
|
518
|
-
</button>
|
|
519
|
-
</div>`}
|
|
520
|
-
</pre>
|
|
521
|
-
</div>
|
|
522
|
-
</div>
|
|
523
|
-
</div>
|
|
524
|
-
|
|
525
|
-
{/* Confirmation Dialog */}
|
|
526
|
-
<div className="!space-y-4">
|
|
527
|
-
<h3 className="text-fm-icon-negative! text-lg font-semibold">
|
|
528
|
-
Confirmation Dialog
|
|
529
|
-
</h3>
|
|
530
|
-
<div className="!space-y-4">
|
|
531
|
-
<div className="border-fm-icon-negative/20 bg-fm-icon-negative/5 rounded-lg border p-6">
|
|
532
|
-
<div className="flex items-start gap-4">
|
|
533
|
-
<div className="bg-fm-icon-negative/20 flex h-12 w-12 items-center justify-center rounded-lg">
|
|
534
|
-
<TrashIcon className="text-fm-icon-negative h-6 w-6" />
|
|
535
|
-
</div>
|
|
536
|
-
<div className="flex-1">
|
|
537
|
-
<h4 className="text-fm-icon-active! mb-2 font-medium">
|
|
538
|
-
Confirm Deletion
|
|
539
|
-
</h4>
|
|
540
|
-
<p className="text-fm-secondary! mb-4 text-sm">
|
|
541
|
-
Are you sure you want to delete this item? This
|
|
542
|
-
action cannot be undone.
|
|
543
|
-
</p>
|
|
544
|
-
<div className="flex gap-3">
|
|
545
|
-
<button className="border-fm-icon-negative/30 bg-fm-icon-negative/20 text-fm-icon-negative rounded-lg border px-4 py-2 text-sm">
|
|
546
|
-
Delete
|
|
547
|
-
</button>
|
|
548
|
-
<button className="border-fm-divider-primary bg-fm-surface-secondary text-fm-icon-active rounded-lg border px-4 py-2 text-sm">
|
|
549
|
-
Cancel
|
|
550
|
-
</button>
|
|
551
|
-
</div>
|
|
552
|
-
</div>
|
|
553
|
-
</div>
|
|
554
|
-
</div>
|
|
555
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
556
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
557
|
-
{`<div className="border border-red-500/20 bg-red-500/5 p-6 rounded-lg">
|
|
558
|
-
<div className="flex items-start gap-4">
|
|
559
|
-
<div className="flex h-12 w-12 items-center justify-center rounded-lg bg-red-500/20">
|
|
560
|
-
<TrashIcon className="h-6 w-6 text-red-400" />
|
|
561
|
-
</div>
|
|
562
|
-
<div className="flex-1">
|
|
563
|
-
<h4 className="font-medium text-white mb-2">Confirm Deletion</h4>
|
|
564
|
-
<p className="text-sm text-white/70 mb-4">
|
|
565
|
-
Are you sure you want to delete this item?
|
|
566
|
-
</p>
|
|
567
|
-
{/* Action buttons */}
|
|
568
|
-
</div>
|
|
569
|
-
</div>
|
|
570
|
-
</div>`}
|
|
571
|
-
</pre>
|
|
572
|
-
</div>
|
|
573
|
-
</div>
|
|
574
|
-
</div>
|
|
575
|
-
|
|
576
|
-
{/* Menu Item */}
|
|
577
|
-
<div className="!space-y-4">
|
|
578
|
-
<h3 className="text-fm-icon-negative! text-lg font-semibold">
|
|
579
|
-
Context Menu
|
|
580
|
-
</h3>
|
|
581
|
-
<div className="!space-y-4">
|
|
582
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-2">
|
|
583
|
-
<div className="text-fm-icon-active hover:bg-fm-surface-secondary flex items-center gap-3 rounded px-3 py-2 text-sm">
|
|
584
|
-
<span className="text-fm-icon-info">📄</span>
|
|
585
|
-
<span>Open</span>
|
|
586
|
-
</div>
|
|
587
|
-
<div className="text-fm-icon-active hover:bg-fm-surface-secondary flex items-center gap-3 rounded px-3 py-2 text-sm">
|
|
588
|
-
<span className="text-fm-icon-positive">✏️</span>
|
|
589
|
-
<span>Edit</span>
|
|
590
|
-
</div>
|
|
591
|
-
<div className="bg-fm-surface-secondary mx-2 my-1 h-px"></div>
|
|
592
|
-
<div className="text-fm-icon-negative hover:bg-fm-icon-negative/10 flex items-center gap-3 rounded px-3 py-2 text-sm">
|
|
593
|
-
<TrashIcon className="h-4 w-4" />
|
|
594
|
-
<span>Delete</span>
|
|
595
|
-
<span className="text-fm-tertiary ml-auto text-xs">
|
|
596
|
-
⌘⌫
|
|
597
|
-
</span>
|
|
598
|
-
</div>
|
|
599
|
-
</div>
|
|
600
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
601
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
602
|
-
{`// Context menu with delete option
|
|
603
|
-
<div className="flex items-center gap-3 px-3 py-2 text-red-400 hover:bg-red-500/10 rounded">
|
|
604
|
-
<TrashIcon className="h-4 w-4" />
|
|
605
|
-
<span>Delete</span>
|
|
606
|
-
<span className="ml-auto text-xs text-white/60">⌘⌫</span>
|
|
607
|
-
</div>`}
|
|
608
|
-
</pre>
|
|
609
|
-
</div>
|
|
610
|
-
</div>
|
|
611
|
-
</div>
|
|
612
|
-
</div>
|
|
613
|
-
</div>
|
|
614
|
-
|
|
615
|
-
{/* Accessibility */}
|
|
616
|
-
<div className="!space-y-8">
|
|
617
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
618
|
-
Accessibility Features
|
|
619
|
-
</h2>
|
|
620
|
-
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
|
|
621
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
|
|
622
|
-
<h3 className="text-fm-icon-positive! text-lg font-semibold">
|
|
623
|
-
✅ Built-in Features
|
|
624
|
-
</h3>
|
|
625
|
-
<ul className="text-fm-secondary! !space-y-2 text-sm">
|
|
626
|
-
<li className="text-fm-secondary!">
|
|
627
|
-
Uses Radix UI AccessibleIcon wrapper
|
|
628
|
-
</li>
|
|
629
|
-
<li className="text-fm-secondary!">
|
|
630
|
-
Provides screen reader label "Trash icon"
|
|
631
|
-
</li>
|
|
632
|
-
<li className="text-fm-secondary!">
|
|
633
|
-
Supports keyboard navigation when interactive
|
|
634
|
-
</li>
|
|
635
|
-
<li className="text-fm-secondary!">
|
|
636
|
-
Maintains proper color contrast ratios
|
|
637
|
-
</li>
|
|
638
|
-
<li className="text-fm-secondary!">
|
|
639
|
-
Scales with user's font size preferences
|
|
640
|
-
</li>
|
|
641
|
-
</ul>
|
|
642
|
-
</div>
|
|
643
|
-
|
|
644
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
|
|
645
|
-
<h3 className="text-fm-icon-negative! text-lg font-semibold">
|
|
646
|
-
💡 Best Practices
|
|
647
|
-
</h3>
|
|
648
|
-
<ul className="text-fm-secondary !space-y-2 text-sm">
|
|
649
|
-
<li className="text-fm-secondary!">
|
|
650
|
-
Always pair with descriptive text
|
|
651
|
-
</li>
|
|
652
|
-
<li className="text-fm-secondary!">
|
|
653
|
-
Use confirmation dialogs for destructive actions
|
|
654
|
-
</li>
|
|
655
|
-
<li className="text-fm-secondary!">
|
|
656
|
-
Ensure sufficient color contrast
|
|
657
|
-
</li>
|
|
658
|
-
<li className="text-fm-secondary!">
|
|
659
|
-
Add focus states for interactive elements
|
|
660
|
-
</li>
|
|
661
|
-
<li className="text-fm-secondary!">
|
|
662
|
-
Consider providing undo functionality
|
|
663
|
-
</li>
|
|
664
|
-
</ul>
|
|
665
|
-
</div>
|
|
666
|
-
</div>
|
|
667
|
-
|
|
668
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-6">
|
|
669
|
-
<h3 className="text-fm-secondary-600! mb-4 text-lg font-semibold">
|
|
670
|
-
Custom Accessibility Label
|
|
671
|
-
</h3>
|
|
672
|
-
<div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
|
|
673
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
674
|
-
<pre className="text-fm-icon-info! overflow-x-auto text-sm">
|
|
675
|
-
{`// Custom implementation with specific label
|
|
676
|
-
import { AccessibleIcon } from "@radix-ui/react-accessible-icon"
|
|
677
|
-
|
|
678
|
-
function CustomTrashIcon({ label = "Delete", ...props }) {
|
|
679
|
-
return (
|
|
680
|
-
<AccessibleIcon label={label}>
|
|
681
|
-
<TrashIcon {...props} />
|
|
682
|
-
</AccessibleIcon>
|
|
683
|
-
)
|
|
684
|
-
}
|
|
685
|
-
|
|
686
|
-
// Usage with specific context
|
|
687
|
-
<CustomTrashIcon
|
|
688
|
-
label="Delete user account"
|
|
689
|
-
className="h-4 w-4 text-red-400"
|
|
690
|
-
/>`}
|
|
691
|
-
</pre>
|
|
692
|
-
</div>
|
|
693
|
-
<div className="!space-y-4">
|
|
694
|
-
<p className="text-fm-secondary! text-sm">
|
|
695
|
-
For specific contexts, you can wrap the TrashIcon with a
|
|
696
|
-
custom AccessibleIcon component that provides more
|
|
697
|
-
descriptive labels.
|
|
698
|
-
</p>
|
|
699
|
-
<div className="border-fm-icon-negative/20 bg-fm-icon-negative/10 rounded-lg border p-4">
|
|
700
|
-
<div className="text-fm-icon-negative flex items-center gap-2 text-sm">
|
|
701
|
-
<TrashIcon className="h-4 w-4" />
|
|
702
|
-
<span>
|
|
703
|
-
This approach gives screen readers more context
|
|
704
|
-
</span>
|
|
705
|
-
</div>
|
|
706
|
-
</div>
|
|
707
|
-
</div>
|
|
708
|
-
</div>
|
|
709
|
-
</div>
|
|
710
|
-
</div>
|
|
711
|
-
|
|
712
|
-
{/* Related Icons */}
|
|
713
|
-
<div className="!space-y-8">
|
|
714
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
715
|
-
Related Icons
|
|
716
|
-
</h2>
|
|
717
|
-
<div className="grid grid-cols-2 gap-6 md:grid-cols-4">
|
|
718
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
|
|
719
|
-
<div className="bg-fm-icon-info/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
|
|
720
|
-
<span className="text-2xl">✏️</span>
|
|
721
|
-
</div>
|
|
722
|
-
<div>
|
|
723
|
-
<div className="text-fm-icon-active font-medium">
|
|
724
|
-
EditIcon
|
|
725
|
-
</div>
|
|
726
|
-
<div className="text-fm-tertiary text-xs">
|
|
727
|
-
Edit operations
|
|
728
|
-
</div>
|
|
729
|
-
</div>
|
|
730
|
-
</div>
|
|
731
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
|
|
732
|
-
<div className="bg-fm-icon-positive/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
|
|
733
|
-
<span className="text-fm-icon-active! !text-2xl">+</span>
|
|
734
|
-
</div>
|
|
735
|
-
<div>
|
|
736
|
-
<div className="text-fm-icon-active font-medium">
|
|
737
|
-
AddIcon
|
|
738
|
-
</div>
|
|
739
|
-
<div className="text-fm-tertiary text-xs">
|
|
740
|
-
Create operations
|
|
741
|
-
</div>
|
|
742
|
-
</div>
|
|
743
|
-
</div>
|
|
744
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
|
|
745
|
-
<div className="bg-fm-icon-warning/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
|
|
746
|
-
<span className="text-2xl">📁</span>
|
|
747
|
-
</div>
|
|
748
|
-
<div>
|
|
749
|
-
<div className="text-fm-icon-active font-medium">
|
|
750
|
-
FolderIcon
|
|
751
|
-
</div>
|
|
752
|
-
<div className="text-fm-tertiary text-xs">
|
|
753
|
-
File management
|
|
754
|
-
</div>
|
|
755
|
-
</div>
|
|
756
|
-
</div>
|
|
757
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
|
|
758
|
-
<div className="bg-fm-secondary-500/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
|
|
759
|
-
<span className="text-2xl">⚙️</span>
|
|
760
|
-
</div>
|
|
761
|
-
<div>
|
|
762
|
-
<div className="text-fm-icon-active font-medium">
|
|
763
|
-
SettingsIcon
|
|
764
|
-
</div>
|
|
765
|
-
<div className="text-fm-tertiary text-xs">
|
|
766
|
-
Configuration
|
|
767
|
-
</div>
|
|
768
|
-
</div>
|
|
769
|
-
</div>
|
|
770
|
-
</div>
|
|
771
|
-
</div>
|
|
772
|
-
</div>
|
|
773
|
-
|
|
774
|
-
{/* Footer */}
|
|
775
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary border-t backdrop-blur-xl">
|
|
776
|
-
<div className="!mx-auto max-w-7xl px-6 py-8">
|
|
777
|
-
<div className="!space-y-4 text-center">
|
|
778
|
-
<p className="text-fm-tertiary!">
|
|
779
|
-
TrashIcon is part of the Aural UI icon library, built with
|
|
780
|
-
accessibility and consistency in mind.
|
|
781
|
-
</p>
|
|
782
|
-
<p className="text-fm-placeholder! text-sm">
|
|
783
|
-
All icons use Radix UI's AccessibleIcon for screen reader
|
|
784
|
-
compatibility and follow WCAG guidelines.
|
|
785
|
-
</p>
|
|
786
|
-
</div>
|
|
787
|
-
</div>
|
|
788
|
-
</div>
|
|
789
|
-
</div>
|
|
790
|
-
</>
|
|
51
|
+
}`,
|
|
52
|
+
livePreview: (
|
|
53
|
+
<button>
|
|
54
|
+
<TrashIcon className="text-fm-icon-negative h-6 w-6" />
|
|
55
|
+
</button>
|
|
56
|
+
),
|
|
57
|
+
}}
|
|
58
|
+
relatedIcons={[
|
|
59
|
+
{
|
|
60
|
+
name: "PencilIcon",
|
|
61
|
+
description: "Pencil / write icon",
|
|
62
|
+
icon: PencilIcon,
|
|
63
|
+
accentToken: "info",
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: "EditBigIcon",
|
|
67
|
+
description: "Edit / modify content icon",
|
|
68
|
+
icon: EditBigIcon,
|
|
69
|
+
accentToken: "positive",
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: "CopyIcon",
|
|
73
|
+
description: "Copy / duplicate content icon",
|
|
74
|
+
icon: CopyIcon,
|
|
75
|
+
accentToken: "warning",
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: "WarningIcon",
|
|
79
|
+
description: "Warning / caution icon",
|
|
80
|
+
icon: WarningIcon,
|
|
81
|
+
accentToken: "negative",
|
|
82
|
+
},
|
|
83
|
+
]}
|
|
84
|
+
/>
|
|
791
85
|
),
|
|
792
86
|
},
|
|
793
87
|
},
|
|
794
88
|
tags: ["autodocs"],
|
|
795
89
|
argTypes: {
|
|
796
|
-
|
|
797
|
-
control:
|
|
798
|
-
description: "
|
|
90
|
+
className: {
|
|
91
|
+
control: "text",
|
|
92
|
+
description: "CSS classes including color token",
|
|
799
93
|
},
|
|
800
94
|
withAccessibility: {
|
|
801
95
|
control: "boolean",
|
|
802
|
-
description: "
|
|
803
|
-
},
|
|
804
|
-
height: {
|
|
805
|
-
control: { type: "range", min: 8, max: 96, step: 2 },
|
|
806
|
-
description: "Height of the icon in pixels",
|
|
807
|
-
},
|
|
808
|
-
stroke: {
|
|
809
|
-
control: "color",
|
|
810
|
-
description: "Stroke color of the icon",
|
|
811
|
-
},
|
|
812
|
-
className: {
|
|
813
|
-
control: "text",
|
|
814
|
-
description: "CSS classes for styling",
|
|
96
|
+
description: "Wrap with accessibility label",
|
|
815
97
|
},
|
|
816
98
|
},
|
|
817
99
|
}
|
|
@@ -819,226 +101,79 @@ function CustomTrashIcon({ label = "Delete", ...props }) {
|
|
|
819
101
|
export default meta
|
|
820
102
|
type Story = StoryObj<typeof TrashIcon>
|
|
821
103
|
|
|
822
|
-
// Story parameters for consistent dark theme
|
|
823
|
-
const storyParameters = {
|
|
824
|
-
backgrounds: {
|
|
825
|
-
default: "dark",
|
|
826
|
-
values: [
|
|
827
|
-
{ name: "dark", value: "var(--color-fm-surface-primary)" },
|
|
828
|
-
{ name: "darker", value: "var(--color-fm-neutral-0)" },
|
|
829
|
-
],
|
|
830
|
-
},
|
|
831
|
-
}
|
|
832
|
-
|
|
833
104
|
export const Default: Story = {
|
|
834
105
|
args: {
|
|
835
|
-
|
|
836
|
-
height: 24,
|
|
837
|
-
className: "text-fm-icon-negative",
|
|
106
|
+
className: "h-6 w-6 text-fm-icon-negative",
|
|
838
107
|
withAccessibility: true,
|
|
839
108
|
},
|
|
840
|
-
parameters: storyParameters,
|
|
841
109
|
render: (args) => (
|
|
842
|
-
<
|
|
110
|
+
<IconDefaultCanvas>
|
|
843
111
|
<TrashIcon {...args} />
|
|
844
|
-
</
|
|
112
|
+
</IconDefaultCanvas>
|
|
845
113
|
),
|
|
846
114
|
}
|
|
847
115
|
|
|
848
116
|
export const SizeVariations: Story = {
|
|
849
|
-
|
|
850
|
-
...storyParameters,
|
|
851
|
-
docs: {
|
|
852
|
-
description: {
|
|
853
|
-
story:
|
|
854
|
-
"TrashIcon in different sizes, from small UI elements to large displays.",
|
|
855
|
-
},
|
|
856
|
-
},
|
|
857
|
-
},
|
|
858
|
-
render: () => (
|
|
859
|
-
<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">
|
|
860
|
-
<div className="text-center">
|
|
861
|
-
<TrashIcon className="text-fm-icon-negative !mx-auto mb-2 h-3 w-3" />
|
|
862
|
-
<span className="text-fm-tertiary text-xs">12px</span>
|
|
863
|
-
</div>
|
|
864
|
-
<div className="text-center">
|
|
865
|
-
<TrashIcon className="text-fm-icon-negative !mx-auto mb-2 h-4 w-4" />
|
|
866
|
-
<span className="text-fm-tertiary text-xs">16px</span>
|
|
867
|
-
</div>
|
|
868
|
-
<div className="text-center">
|
|
869
|
-
<TrashIcon className="text-fm-icon-negative !mx-auto mb-2 h-5 w-5" />
|
|
870
|
-
<span className="text-fm-tertiary text-xs">20px</span>
|
|
871
|
-
</div>
|
|
872
|
-
<div className="text-center">
|
|
873
|
-
<TrashIcon className="text-fm-icon-negative !mx-auto mb-2 h-6 w-6" />
|
|
874
|
-
<span className="text-fm-tertiary text-xs">24px</span>
|
|
875
|
-
</div>
|
|
876
|
-
<div className="text-center">
|
|
877
|
-
<TrashIcon className="text-fm-icon-negative !mx-auto mb-2 h-8 w-8" />
|
|
878
|
-
<span className="text-fm-tertiary text-xs">32px</span>
|
|
879
|
-
</div>
|
|
880
|
-
<div className="text-center">
|
|
881
|
-
<TrashIcon className="text-fm-icon-negative !mx-auto mb-2 h-12 w-12" />
|
|
882
|
-
<span className="text-fm-tertiary text-xs">48px</span>
|
|
883
|
-
</div>
|
|
884
|
-
</div>
|
|
885
|
-
),
|
|
117
|
+
render: () => <IconSizeVariations icon={TrashIcon} />,
|
|
886
118
|
}
|
|
887
119
|
|
|
888
120
|
export const ColorVariations: Story = {
|
|
889
|
-
|
|
890
|
-
...storyParameters,
|
|
891
|
-
docs: {
|
|
892
|
-
description: {
|
|
893
|
-
story:
|
|
894
|
-
"TrashIcon in different semantic colors for various delete contexts.",
|
|
895
|
-
},
|
|
896
|
-
},
|
|
897
|
-
},
|
|
898
|
-
render: () => (
|
|
899
|
-
<div className="from-fm-surface-primary to-fm-surface-secondary grid min-h-dvh grid-cols-2 items-center justify-center gap-6 rounded-lg bg-linear-to-br p-8 md:grid-cols-4">
|
|
900
|
-
<div className="text-center">
|
|
901
|
-
<div className="border-fm-icon-negative/30 bg-fm-icon-negative/20 !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
|
|
902
|
-
<TrashIcon className="text-fm-icon-negative h-8 w-8" />
|
|
903
|
-
</div>
|
|
904
|
-
<div className="text-fm-icon-active text-sm font-medium">Danger</div>
|
|
905
|
-
<div className="text-fm-icon-negative text-xs">
|
|
906
|
-
text-fm-icon-negative
|
|
907
|
-
</div>
|
|
908
|
-
</div>
|
|
909
|
-
<div className="text-center">
|
|
910
|
-
<div className="border-fm-icon-warning/30 bg-fm-icon-warning/20 !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
|
|
911
|
-
<TrashIcon className="text-fm-icon-warning h-8 w-8" />
|
|
912
|
-
</div>
|
|
913
|
-
<div className="text-fm-icon-active text-sm font-medium">Warning</div>
|
|
914
|
-
<div className="text-fm-icon-warning text-xs">text-fm-icon-warning</div>
|
|
915
|
-
</div>
|
|
916
|
-
<div className="text-center">
|
|
917
|
-
<div className="border-fm-divider-primary bg-fm-surface-tertiary/20 !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
|
|
918
|
-
<TrashIcon className="text-fm-placeholder h-8 w-8" />
|
|
919
|
-
</div>
|
|
920
|
-
<div className="text-fm-icon-active text-sm font-medium">Neutral</div>
|
|
921
|
-
<div className="text-fm-placeholder text-xs">text-fm-placeholder</div>
|
|
922
|
-
</div>
|
|
923
|
-
<div className="text-center">
|
|
924
|
-
<div className="border-fm-divider-primary bg-fm-surface-secondary !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
|
|
925
|
-
<TrashIcon className="text-fm-placeholder h-8 w-8" />
|
|
926
|
-
</div>
|
|
927
|
-
<div className="text-fm-icon-active text-sm font-medium">Disabled</div>
|
|
928
|
-
<div className="text-fm-placeholder text-xs">text-fm-placeholder</div>
|
|
929
|
-
</div>
|
|
930
|
-
</div>
|
|
931
|
-
),
|
|
121
|
+
render: () => <IconColorVariations icon={TrashIcon} />,
|
|
932
122
|
}
|
|
933
123
|
|
|
934
124
|
export const UsageExamples: Story = {
|
|
935
|
-
parameters: {
|
|
936
|
-
...storyParameters,
|
|
937
|
-
docs: {
|
|
938
|
-
description: {
|
|
939
|
-
story:
|
|
940
|
-
"Real-world usage examples showing TrashIcon in different UI contexts.",
|
|
941
|
-
},
|
|
942
|
-
},
|
|
943
|
-
},
|
|
944
125
|
render: () => (
|
|
945
|
-
<
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
</h3>
|
|
951
|
-
<div className="flex gap-4">
|
|
952
|
-
<button className="border-fm-icon-negative/30 bg-fm-icon-negative/20 text-fm-icon-negative hover:bg-fm-icon-negative/30 flex items-center gap-2 rounded-lg border px-4 py-2 transition-colors">
|
|
953
|
-
<TrashIcon className="h-4 w-4" />
|
|
126
|
+
<IconUsageCanvas>
|
|
127
|
+
<IconUsageSection title="Delete Button">
|
|
128
|
+
<button className="border-fm-divider-secondary flex items-center gap-2 rounded-xl border px-4 py-2">
|
|
129
|
+
<TrashIcon className="text-fm-icon-negative h-4 w-4" />
|
|
130
|
+
<span className="text-fm-icon-negative font-fm-text text-sm">
|
|
954
131
|
Delete
|
|
955
|
-
</
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
Remove
|
|
959
|
-
</button>
|
|
960
|
-
</div>
|
|
961
|
-
</div>
|
|
132
|
+
</span>
|
|
133
|
+
</button>
|
|
134
|
+
</IconUsageSection>
|
|
962
135
|
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
<h3 className="text-fm-icon-active text-sm font-medium">
|
|
966
|
-
List Item Actions
|
|
967
|
-
</h3>
|
|
968
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-4">
|
|
136
|
+
<IconUsageSection title="Content Card Actions">
|
|
137
|
+
<div className="border-fm-divider-secondary bg-fm-surface-secondary w-full max-w-sm rounded-xl border p-4">
|
|
969
138
|
<div className="flex items-center justify-between">
|
|
970
|
-
<
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
2.4 MB • Modified 2 hours ago
|
|
978
|
-
</div>
|
|
979
|
-
</div>
|
|
139
|
+
<span className="text-fm-primary font-fm-text text-sm font-medium">
|
|
140
|
+
Episode 2
|
|
141
|
+
</span>
|
|
142
|
+
<div className="flex gap-2">
|
|
143
|
+
<PencilIcon className="text-fm-icon-active h-4 w-4" />
|
|
144
|
+
<CopyIcon className="text-fm-icon-inactive h-4 w-4" />
|
|
145
|
+
<TrashIcon className="text-fm-icon-negative h-4 w-4" />
|
|
980
146
|
</div>
|
|
981
|
-
<button className="text-fm-placeholder hover:bg-fm-icon-negative/20 hover:text-fm-icon-negative rounded-lg p-2 transition-colors">
|
|
982
|
-
<TrashIcon className="h-4 w-4" />
|
|
983
|
-
</button>
|
|
984
147
|
</div>
|
|
985
148
|
</div>
|
|
986
|
-
</
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
<div className="flex items-start gap-4">
|
|
995
|
-
<div className="bg-fm-icon-negative/20 flex h-12 w-12 items-center justify-center rounded-lg">
|
|
996
|
-
<TrashIcon className="text-fm-icon-negative h-6 w-6" />
|
|
149
|
+
</IconUsageSection>
|
|
150
|
+
|
|
151
|
+
<IconUsageSection title="Danger Zone">
|
|
152
|
+
<div className="border-fm-icon-negative flex w-full max-w-sm items-center gap-3 rounded-xl border px-4 py-3">
|
|
153
|
+
<WarningIcon className="text-fm-icon-negative h-5 w-5 shrink-0" />
|
|
154
|
+
<div className="flex-1">
|
|
155
|
+
<div className="text-fm-primary font-fm-text text-sm font-medium">
|
|
156
|
+
Delete story
|
|
997
157
|
</div>
|
|
998
|
-
<div className="
|
|
999
|
-
|
|
1000
|
-
Confirm Deletion
|
|
1001
|
-
</h4>
|
|
1002
|
-
<p className="text-fm-secondary mb-4 text-sm">
|
|
1003
|
-
Are you sure you want to delete this item? This action cannot be
|
|
1004
|
-
undone.
|
|
1005
|
-
</p>
|
|
1006
|
-
<div className="flex gap-3">
|
|
1007
|
-
<button className="border-fm-icon-negative/30 bg-fm-icon-negative/20 text-fm-icon-negative rounded-lg border px-4 py-2 text-sm">
|
|
1008
|
-
Delete
|
|
1009
|
-
</button>
|
|
1010
|
-
<button className="border-fm-divider-primary bg-fm-surface-secondary text-fm-icon-active rounded-lg border px-4 py-2 text-sm">
|
|
1011
|
-
Cancel
|
|
1012
|
-
</button>
|
|
1013
|
-
</div>
|
|
158
|
+
<div className="text-fm-secondary font-fm-text text-xs">
|
|
159
|
+
This action is irreversible
|
|
1014
160
|
</div>
|
|
1015
161
|
</div>
|
|
162
|
+
<TrashIcon className="text-fm-icon-negative h-5 w-5" />
|
|
1016
163
|
</div>
|
|
1017
|
-
</
|
|
1018
|
-
</
|
|
164
|
+
</IconUsageSection>
|
|
165
|
+
</IconUsageCanvas>
|
|
1019
166
|
),
|
|
1020
167
|
}
|
|
1021
168
|
|
|
1022
169
|
export const Playground: Story = {
|
|
1023
|
-
parameters: {
|
|
1024
|
-
...storyParameters,
|
|
1025
|
-
docs: {
|
|
1026
|
-
description: {
|
|
1027
|
-
story:
|
|
1028
|
-
"Interactive playground to experiment with different TrashIcon configurations.",
|
|
1029
|
-
},
|
|
1030
|
-
},
|
|
1031
|
-
},
|
|
1032
170
|
args: {
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
className: "text-fm-icon-negative",
|
|
171
|
+
className: "h-8 w-8 text-fm-icon-negative",
|
|
172
|
+
withAccessibility: true,
|
|
1036
173
|
},
|
|
1037
174
|
render: (args) => (
|
|
1038
|
-
<
|
|
1039
|
-
<
|
|
1040
|
-
|
|
1041
|
-
</div>
|
|
1042
|
-
</div>
|
|
175
|
+
<IconPlaygroundCanvas>
|
|
176
|
+
<TrashIcon {...args} />
|
|
177
|
+
</IconPlaygroundCanvas>
|
|
1043
178
|
),
|
|
1044
179
|
}
|