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