aural-ui 4.0.1 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/aspect-ratio/AspectRatio.stories.tsx +290 -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 +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -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 { MagicEditIcon } from "src/ui/icons/magic-edit-icon"
|
|
7
|
+
import { TrashIcon } from "src/ui/icons/trash-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 { PencilIcon } from "."
|
|
5
19
|
|
|
6
20
|
const meta: Meta<typeof PencilIcon> = {
|
|
@@ -18,950 +32,68 @@ const meta: Meta<typeof PencilIcon> = {
|
|
|
18
32
|
},
|
|
19
33
|
docs: {
|
|
20
34
|
page: () => (
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
{
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
.sbdocs-content {
|
|
31
|
-
max-width: none !important;
|
|
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
|
-
@keyframes edit-pulse {
|
|
81
|
-
0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
|
|
82
|
-
50% { transform: scale(1.05) rotate(2deg); opacity: 0.8; }
|
|
83
|
-
}
|
|
84
|
-
.animate-edit-pulse {
|
|
85
|
-
animation: edit-pulse 2s ease-in-out infinite;
|
|
86
|
-
}
|
|
87
|
-
@keyframes pencil-draw {
|
|
88
|
-
0% { transform: translate(0, 0) rotate(0deg); }
|
|
89
|
-
25% { transform: translate(2px, -2px) rotate(5deg); }
|
|
90
|
-
50% { transform: translate(4px, -4px) rotate(10deg); }
|
|
91
|
-
75% { transform: translate(2px, -2px) rotate(5deg); }
|
|
92
|
-
100% { transform: translate(0, 0) rotate(0deg); }
|
|
93
|
-
}
|
|
94
|
-
.animate-pencil-draw {
|
|
95
|
-
animation: pencil-draw 3s ease-in-out infinite;
|
|
96
|
-
}
|
|
97
|
-
`}
|
|
98
|
-
</style>
|
|
99
|
-
|
|
100
|
-
<div className="from-fm-surface-primary via-fm-icon-info/5 to-fm-surface-primary min-h-screen bg-linear-to-br">
|
|
101
|
-
{/* Header */}
|
|
102
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary relative overflow-hidden border-b backdrop-blur-xl">
|
|
103
|
-
<div className="from-fm-icon-info/10 to-fm-secondary-500/10 absolute inset-0 bg-linear-to-r via-transparent" />
|
|
104
|
-
<div className="relative !mx-auto max-w-7xl px-6 py-16">
|
|
105
|
-
<div className="!space-y-6 text-center">
|
|
106
|
-
<div className="border-fm-icon-info/30 from-fm-icon-info/20 to-fm-secondary-500/20 !mx-auto flex h-24 w-24 items-center justify-center rounded-2xl border bg-linear-to-br">
|
|
107
|
-
<PencilIcon className="text-fm-icon-info h-12 w-12" />
|
|
108
|
-
</div>
|
|
109
|
-
<h1 className="!text-fm-primary text-5xl font-bold">
|
|
110
|
-
PencilIcon
|
|
111
|
-
</h1>
|
|
112
|
-
<p className="text-fm-secondary! !mx-auto max-w-3xl text-xl leading-relaxed">
|
|
113
|
-
A versatile pencil icon for editing content, writing tasks,
|
|
114
|
-
and modification actions. Perfect for edit buttons,
|
|
115
|
-
note-taking interfaces, and content creation flows. Built
|
|
116
|
-
with accessibility in mind using Radix UI's AccessibleIcon
|
|
117
|
-
wrapper.
|
|
118
|
-
</p>
|
|
119
|
-
|
|
120
|
-
{/* Stats */}
|
|
121
|
-
<div className="flex items-center justify-center gap-8 pt-8">
|
|
122
|
-
<div className="text-center">
|
|
123
|
-
<div className="text-fm-icon-info text-3xl font-bold">
|
|
124
|
-
Edit
|
|
125
|
-
</div>
|
|
126
|
-
<div className="text-fm-tertiary text-sm">
|
|
127
|
-
Content modification
|
|
128
|
-
</div>
|
|
129
|
-
</div>
|
|
130
|
-
<div className="bg-fm-divider-primary h-8 w-px" />
|
|
131
|
-
<div className="text-center">
|
|
132
|
-
<div className="text-fm-secondary-600 text-3xl font-bold">
|
|
133
|
-
Write
|
|
134
|
-
</div>
|
|
135
|
-
<div className="text-fm-tertiary text-sm">
|
|
136
|
-
Content creation
|
|
137
|
-
</div>
|
|
138
|
-
</div>
|
|
139
|
-
<div className="bg-fm-divider-primary h-8 w-px" />
|
|
140
|
-
<div className="text-center">
|
|
141
|
-
<div className="text-fm-icon-info text-3xl font-bold">
|
|
142
|
-
Update
|
|
143
|
-
</div>
|
|
144
|
-
<div className="text-fm-tertiary text-sm">
|
|
145
|
-
Data modification
|
|
146
|
-
</div>
|
|
147
|
-
</div>
|
|
148
|
-
</div>
|
|
149
|
-
</div>
|
|
150
|
-
</div>
|
|
151
|
-
</div>
|
|
152
|
-
|
|
153
|
-
{/* Content */}
|
|
154
|
-
<div className="!mx-auto max-w-7xl !space-y-16 px-6 py-12">
|
|
155
|
-
{/* Quick Usage */}
|
|
156
|
-
<div className="!space-y-8">
|
|
157
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
158
|
-
Quick Start
|
|
159
|
-
</h2>
|
|
160
|
-
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
161
|
-
<div className="!space-y-4">
|
|
162
|
-
<h3 className="text-fm-icon-info! text-xl font-semibold">
|
|
163
|
-
Basic Usage
|
|
164
|
-
</h3>
|
|
165
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
166
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
167
|
-
{`import { PencilIcon } from "@icons/pencil-icon"
|
|
35
|
+
<AuralIconDocsPage
|
|
36
|
+
accentToken="info"
|
|
37
|
+
features={[
|
|
38
|
+
{ title: "Edit", description: "Inline edit trigger" },
|
|
39
|
+
{ title: "Write", description: "Write or annotate content" },
|
|
40
|
+
{ title: "Accessible", description: "ARIA-ready by default" },
|
|
41
|
+
]}
|
|
42
|
+
quickStart={{
|
|
43
|
+
codeExample: `import { PencilIcon } from "src/ui/icons/pencil-icon"
|
|
168
44
|
|
|
169
45
|
function EditButton() {
|
|
170
46
|
return (
|
|
171
|
-
<button
|
|
172
|
-
<PencilIcon className="h-
|
|
173
|
-
<span>Edit Content</span>
|
|
47
|
+
<button>
|
|
48
|
+
<PencilIcon className="h-5 w-5 text-fm-icon-active" />
|
|
174
49
|
</button>
|
|
175
50
|
)
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
<thead className="bg-fm-surface-secondary">
|
|
211
|
-
<tr className="border-fm-divider-secondary border-b">
|
|
212
|
-
<th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
|
|
213
|
-
Prop
|
|
214
|
-
</th>
|
|
215
|
-
<th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
|
|
216
|
-
Type
|
|
217
|
-
</th>
|
|
218
|
-
<th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
|
|
219
|
-
Default
|
|
220
|
-
</th>
|
|
221
|
-
<th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
|
|
222
|
-
Description
|
|
223
|
-
</th>
|
|
224
|
-
</tr>
|
|
225
|
-
</thead>
|
|
226
|
-
<tbody>
|
|
227
|
-
{" "}
|
|
228
|
-
<tr className="bg-fm-surface-secondary!">
|
|
229
|
-
<td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
|
|
230
|
-
withAccessibility
|
|
231
|
-
</td>
|
|
232
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
233
|
-
boolean
|
|
234
|
-
</td>
|
|
235
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
236
|
-
true
|
|
237
|
-
</td>
|
|
238
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
239
|
-
Whether to wrap the icon with accessibility feature
|
|
240
|
-
</td>
|
|
241
|
-
</tr>
|
|
242
|
-
<tr className="border-fm-divider-tertiary bg-fm-surface-secondary! border-b">
|
|
243
|
-
<td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
|
|
244
|
-
height
|
|
245
|
-
</td>
|
|
246
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
247
|
-
number | string
|
|
248
|
-
</td>
|
|
249
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
250
|
-
16
|
|
251
|
-
</td>
|
|
252
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
253
|
-
Height of the icon in pixels
|
|
254
|
-
</td>
|
|
255
|
-
</tr>
|
|
256
|
-
<tr className="border-fm-divider-tertiary border-b">
|
|
257
|
-
<td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
|
|
258
|
-
stroke
|
|
259
|
-
</td>
|
|
260
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
261
|
-
string
|
|
262
|
-
</td>
|
|
263
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
264
|
-
currentColor
|
|
265
|
-
</td>
|
|
266
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
267
|
-
Stroke color of the pencil outline
|
|
268
|
-
</td>
|
|
269
|
-
</tr>
|
|
270
|
-
<tr className="border-fm-divider-tertiary bg-fm-surface-secondary! border-b">
|
|
271
|
-
<td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
|
|
272
|
-
strokeWidth
|
|
273
|
-
</td>
|
|
274
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
275
|
-
number | string
|
|
276
|
-
</td>
|
|
277
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
278
|
-
1
|
|
279
|
-
</td>
|
|
280
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
281
|
-
Thickness of the stroke lines
|
|
282
|
-
</td>
|
|
283
|
-
</tr>
|
|
284
|
-
<tr className="border-fm-divider-tertiary border-b">
|
|
285
|
-
<td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
|
|
286
|
-
strokeLinecap
|
|
287
|
-
</td>
|
|
288
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
289
|
-
string
|
|
290
|
-
</td>
|
|
291
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
292
|
-
round
|
|
293
|
-
</td>
|
|
294
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
295
|
-
Style of line endings
|
|
296
|
-
</td>
|
|
297
|
-
</tr>
|
|
298
|
-
<tr className="border-fm-divider-tertiary bg-fm-surface-secondary! border-b">
|
|
299
|
-
<td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
|
|
300
|
-
className
|
|
301
|
-
</td>
|
|
302
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
303
|
-
string
|
|
304
|
-
</td>
|
|
305
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
306
|
-
-
|
|
307
|
-
</td>
|
|
308
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
309
|
-
CSS classes for styling
|
|
310
|
-
</td>
|
|
311
|
-
</tr>
|
|
312
|
-
<tr className="bg-fm-surface-secondary!">
|
|
313
|
-
<td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
|
|
314
|
-
...svgProps
|
|
315
|
-
</td>
|
|
316
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
317
|
-
SVGProps
|
|
318
|
-
</td>
|
|
319
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
320
|
-
-
|
|
321
|
-
</td>
|
|
322
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
323
|
-
All standard SVG element props
|
|
324
|
-
</td>
|
|
325
|
-
</tr>
|
|
326
|
-
</tbody>
|
|
327
|
-
</table>
|
|
328
|
-
</div>
|
|
329
|
-
</div>
|
|
330
|
-
|
|
331
|
-
{/* Size Variations */}
|
|
332
|
-
<div className="!space-y-8">
|
|
333
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
334
|
-
Size Variations
|
|
335
|
-
</h2>
|
|
336
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-8">
|
|
337
|
-
<div className="!space-y-6">
|
|
338
|
-
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
|
|
339
|
-
<div className="!space-y-4">
|
|
340
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
341
|
-
Standard Sizes
|
|
342
|
-
</h3>
|
|
343
|
-
<div className="bg-fm-surface-secondary flex items-end gap-6 rounded-lg p-6">
|
|
344
|
-
<div className="text-center">
|
|
345
|
-
<PencilIcon className="text-fm-icon-info !mx-auto mb-2 h-3 w-3" />
|
|
346
|
-
<span className="text-fm-tertiary text-xs">
|
|
347
|
-
12px
|
|
348
|
-
</span>
|
|
349
|
-
</div>
|
|
350
|
-
<div className="text-center">
|
|
351
|
-
<PencilIcon className="text-fm-icon-info !mx-auto mb-2 h-4 w-4" />
|
|
352
|
-
<span className="text-fm-tertiary text-xs">
|
|
353
|
-
16px
|
|
354
|
-
</span>
|
|
355
|
-
</div>
|
|
356
|
-
<div className="text-center">
|
|
357
|
-
<PencilIcon className="text-fm-icon-info !mx-auto mb-2 h-5 w-5" />
|
|
358
|
-
<span className="text-fm-tertiary text-xs">
|
|
359
|
-
20px
|
|
360
|
-
</span>
|
|
361
|
-
</div>
|
|
362
|
-
<div className="text-center">
|
|
363
|
-
<PencilIcon className="text-fm-icon-info !mx-auto mb-2 h-6 w-6" />
|
|
364
|
-
<span className="text-fm-tertiary text-xs">
|
|
365
|
-
24px
|
|
366
|
-
</span>
|
|
367
|
-
</div>
|
|
368
|
-
<div className="text-center">
|
|
369
|
-
<PencilIcon className="text-fm-icon-info !mx-auto mb-2 h-8 w-8" />
|
|
370
|
-
<span className="text-fm-tertiary text-xs">
|
|
371
|
-
32px
|
|
372
|
-
</span>
|
|
373
|
-
</div>
|
|
374
|
-
<div className="text-center">
|
|
375
|
-
<PencilIcon className="text-fm-icon-info !mx-auto mb-2 h-12 w-12" />
|
|
376
|
-
<span className="text-fm-tertiary text-xs">
|
|
377
|
-
48px
|
|
378
|
-
</span>
|
|
379
|
-
</div>
|
|
380
|
-
</div>
|
|
381
|
-
</div>
|
|
382
|
-
|
|
383
|
-
<div className="!space-y-4">
|
|
384
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
385
|
-
Code Example
|
|
386
|
-
</h3>
|
|
387
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
388
|
-
<pre className="text-fm-icon-info! overflow-x-auto text-sm">
|
|
389
|
-
{`// Small (16px)
|
|
390
|
-
<PencilIcon className="h-4 w-4" />
|
|
391
|
-
|
|
392
|
-
// Medium (24px)
|
|
393
|
-
<PencilIcon className="h-6 w-6" />
|
|
394
|
-
|
|
395
|
-
// Large (32px)
|
|
396
|
-
<PencilIcon className="h-8 w-8" />
|
|
397
|
-
|
|
398
|
-
// Custom size with props
|
|
399
|
-
<PencilIcon width={40} height={40} />`}
|
|
400
|
-
</pre>
|
|
401
|
-
</div>
|
|
402
|
-
</div>
|
|
403
|
-
</div>
|
|
404
|
-
</div>
|
|
405
|
-
</div>
|
|
406
|
-
</div>
|
|
407
|
-
|
|
408
|
-
{/* Color Variations */}
|
|
409
|
-
<div className="!space-y-8">
|
|
410
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
411
|
-
Color Variations
|
|
412
|
-
</h2>
|
|
413
|
-
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
414
|
-
<div className="!space-y-4">
|
|
415
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
416
|
-
Semantic Colors
|
|
417
|
-
</h3>
|
|
418
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
|
|
419
|
-
<div className="flex items-center gap-4">
|
|
420
|
-
<PencilIcon className="text-fm-icon-info h-6 w-6" />
|
|
421
|
-
<div>
|
|
422
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
423
|
-
Primary Edit
|
|
424
|
-
</div>
|
|
425
|
-
<div className="text-fm-tertiary text-xs">
|
|
426
|
-
text-fm-icon-info
|
|
427
|
-
</div>
|
|
428
|
-
</div>
|
|
429
|
-
</div>
|
|
430
|
-
<div className="flex items-center gap-4">
|
|
431
|
-
<PencilIcon className="text-fm-secondary-600 h-6 w-6" />
|
|
432
|
-
<div>
|
|
433
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
434
|
-
Creative
|
|
435
|
-
</div>
|
|
436
|
-
<div className="text-fm-tertiary text-xs">
|
|
437
|
-
text-fm-secondary-600
|
|
438
|
-
</div>
|
|
439
|
-
</div>
|
|
440
|
-
</div>
|
|
441
|
-
<div className="flex items-center gap-4">
|
|
442
|
-
<PencilIcon className="text-fm-icon-info h-6 w-6" />
|
|
443
|
-
<div>
|
|
444
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
445
|
-
Information
|
|
446
|
-
</div>
|
|
447
|
-
<div className="text-fm-tertiary text-xs">
|
|
448
|
-
text-fm-icon-info
|
|
449
|
-
</div>
|
|
450
|
-
</div>
|
|
451
|
-
</div>
|
|
452
|
-
<div className="flex items-center gap-4">
|
|
453
|
-
<PencilIcon className="text-fm-placeholder h-6 w-6" />
|
|
454
|
-
<div>
|
|
455
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
456
|
-
Disabled
|
|
457
|
-
</div>
|
|
458
|
-
<div className="text-fm-tertiary text-xs">
|
|
459
|
-
text-fm-placeholder
|
|
460
|
-
</div>
|
|
461
|
-
</div>
|
|
462
|
-
</div>
|
|
463
|
-
</div>
|
|
464
|
-
</div>
|
|
465
|
-
|
|
466
|
-
<div className="!space-y-4">
|
|
467
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
468
|
-
Custom Colors
|
|
469
|
-
</h3>
|
|
470
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
471
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
472
|
-
{`// Using Tailwind classes
|
|
473
|
-
<PencilIcon className="h-6 w-6 text-indigo-400" />
|
|
474
|
-
<PencilIcon className="h-6 w-6 text-purple-500" />
|
|
475
|
-
|
|
476
|
-
// Using CSS custom properties
|
|
477
|
-
<PencilIcon
|
|
478
|
-
className="h-6 w-6"
|
|
479
|
-
style={{ color: 'var(--color-primary)' }}
|
|
480
|
-
/>
|
|
481
|
-
|
|
482
|
-
// Direct stroke prop
|
|
483
|
-
<PencilIcon
|
|
484
|
-
width={24}
|
|
485
|
-
height={24}
|
|
486
|
-
stroke="#6366f1"
|
|
487
|
-
/>`}
|
|
488
|
-
</pre>
|
|
489
|
-
</div>
|
|
490
|
-
</div>
|
|
491
|
-
</div>
|
|
492
|
-
</div>
|
|
493
|
-
|
|
494
|
-
{/* Usage Examples */}
|
|
495
|
-
<div className="!space-y-8">
|
|
496
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
497
|
-
Usage Examples
|
|
498
|
-
</h2>
|
|
499
|
-
|
|
500
|
-
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
501
|
-
{/* Edit Button */}
|
|
502
|
-
<div className="!space-y-4">
|
|
503
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
504
|
-
Edit Button
|
|
505
|
-
</h3>
|
|
506
|
-
<div className="!space-y-4">
|
|
507
|
-
<div className="flex gap-4">
|
|
508
|
-
<button className="border-fm-icon-info/30 bg-fm-icon-info/20 text-fm-icon-info hover:bg-fm-icon-info/30 flex items-center gap-2 rounded-lg border px-4 py-2 transition-colors">
|
|
509
|
-
<PencilIcon className="h-4 w-4" />
|
|
510
|
-
Edit Profile
|
|
511
|
-
</button>
|
|
512
|
-
<button className="border-fm-secondary-500/30 bg-fm-secondary-500/20 text-fm-secondary-600 hover:bg-fm-secondary-500/30 flex items-center gap-2 rounded-lg border px-4 py-2 transition-colors">
|
|
513
|
-
<PencilIcon className="h-4 w-4" />
|
|
514
|
-
Edit Post
|
|
515
|
-
</button>
|
|
516
|
-
</div>
|
|
517
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
518
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
519
|
-
{`<button className="flex items-center gap-2 bg-indigo-500/20 border border-indigo-500/30 px-4 py-2 rounded-lg">
|
|
520
|
-
<PencilIcon className="h-4 w-4" />
|
|
521
|
-
Edit Profile
|
|
522
|
-
</button>
|
|
523
|
-
|
|
524
|
-
<button className="flex items-center gap-2 bg-purple-500/20 border border-purple-500/30 px-4 py-2 rounded-lg">
|
|
525
|
-
<PencilIcon className="h-4 w-4" />
|
|
526
|
-
Edit Post
|
|
527
|
-
</button>`}
|
|
528
|
-
</pre>
|
|
529
|
-
</div>
|
|
530
|
-
</div>
|
|
531
|
-
</div>
|
|
532
|
-
|
|
533
|
-
{/* Inline Edit */}
|
|
534
|
-
<div className="!space-y-4">
|
|
535
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
536
|
-
Inline Edit
|
|
537
|
-
</h3>
|
|
538
|
-
<div className="!space-y-4">
|
|
539
|
-
<div className="!space-y-3">
|
|
540
|
-
<div className="group border-fm-divider-secondary bg-fm-surface-secondary flex items-center gap-3 rounded-lg border p-3">
|
|
541
|
-
<span className="text-fm-icon-active flex-1">
|
|
542
|
-
Profile Name
|
|
543
|
-
</span>
|
|
544
|
-
<button className="text-fm-tertiary hover:bg-fm-surface-secondary hover:text-fm-icon-info rounded p-1 opacity-0 transition-all group-hover:opacity-100">
|
|
545
|
-
<PencilIcon className="h-4 w-4" />
|
|
546
|
-
</button>
|
|
547
|
-
</div>
|
|
548
|
-
<div className="group border-fm-divider-secondary bg-fm-surface-secondary flex items-center gap-3 rounded-lg border p-3">
|
|
549
|
-
<span className="text-fm-icon-active flex-1">
|
|
550
|
-
Email Address
|
|
551
|
-
</span>
|
|
552
|
-
<button className="text-fm-tertiary hover:bg-fm-surface-secondary hover:text-fm-icon-info rounded p-1 opacity-0 transition-all group-hover:opacity-100">
|
|
553
|
-
<PencilIcon className="h-4 w-4" />
|
|
554
|
-
</button>
|
|
555
|
-
</div>
|
|
556
|
-
</div>
|
|
557
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
558
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
559
|
-
{`<div className="group flex items-center gap-3 rounded-lg border border-white/10 bg-white/5 p-3">
|
|
560
|
-
<span className="flex-1 text-white">Profile Name</span>
|
|
561
|
-
<button className="rounded p-1 text-white/60 opacity-0 transition-all group-hover:opacity-100 hover:bg-white/10 hover:text-indigo-400">
|
|
562
|
-
<PencilIcon className="h-4 w-4" />
|
|
563
|
-
</button>
|
|
564
|
-
</div>`}
|
|
565
|
-
</pre>
|
|
566
|
-
</div>
|
|
567
|
-
</div>
|
|
568
|
-
</div>
|
|
569
|
-
|
|
570
|
-
{/* Content Editor */}
|
|
571
|
-
<div className="!space-y-4">
|
|
572
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
573
|
-
Content Editor Toolbar
|
|
574
|
-
</h3>
|
|
575
|
-
<div className="!space-y-4">
|
|
576
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary flex items-center gap-2 rounded-lg border p-2">
|
|
577
|
-
<button className="text-fm-tertiary hover:bg-fm-surface-secondary hover:text-fm-icon-info rounded p-2">
|
|
578
|
-
<PencilIcon className="h-4 w-4" />
|
|
579
|
-
</button>
|
|
580
|
-
<div className="bg-fm-divider-primary h-6 w-px" />
|
|
581
|
-
<button className="text-fm-tertiary hover:bg-fm-surface-secondary hover:text-fm-icon-active rounded p-2">
|
|
582
|
-
<span className="text-sm font-bold">B</span>
|
|
583
|
-
</button>
|
|
584
|
-
<button className="text-fm-tertiary hover:bg-fm-surface-secondary hover:text-fm-icon-active rounded p-2">
|
|
585
|
-
<span className="text-sm italic">I</span>
|
|
586
|
-
</button>
|
|
587
|
-
<button className="text-fm-tertiary hover:bg-fm-surface-secondary hover:text-fm-icon-active rounded p-2">
|
|
588
|
-
<span className="text-sm underline">U</span>
|
|
589
|
-
</button>
|
|
590
|
-
</div>
|
|
591
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
592
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
593
|
-
{`<div className="flex items-center gap-2 rounded-lg border border-white/10 bg-white/5 p-2">
|
|
594
|
-
<button className="rounded p-2 text-white/60 hover:bg-white/10 hover:text-indigo-400">
|
|
595
|
-
<PencilIcon className="h-4 w-4" />
|
|
596
|
-
</button>
|
|
597
|
-
<div className="h-6 w-px bg-white/20" />
|
|
598
|
-
{/* Other toolbar buttons */}
|
|
599
|
-
</div>`}
|
|
600
|
-
</pre>
|
|
601
|
-
</div>
|
|
602
|
-
</div>
|
|
603
|
-
</div>
|
|
604
|
-
|
|
605
|
-
{/* Note Taking */}
|
|
606
|
-
<div className="!space-y-4">
|
|
607
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
608
|
-
Note Taking Interface
|
|
609
|
-
</h3>
|
|
610
|
-
<div className="!space-y-4">
|
|
611
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-4">
|
|
612
|
-
<div className="!mb-3 flex items-center justify-between">
|
|
613
|
-
<h4 className="text-fm-icon-active! font-medium">
|
|
614
|
-
Quick Notes
|
|
615
|
-
</h4>
|
|
616
|
-
<button className="border-fm-icon-info/30 bg-fm-icon-info/20 text-fm-icon-info hover:bg-fm-icon-info/30 flex items-center gap-2 rounded border px-3 py-1 text-sm transition-colors">
|
|
617
|
-
<PencilIcon className="h-3 w-3" />
|
|
618
|
-
New Note
|
|
619
|
-
</button>
|
|
620
|
-
</div>
|
|
621
|
-
<div className="!space-y-2">
|
|
622
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary flex items-center gap-3 rounded border p-3">
|
|
623
|
-
<PencilIcon className="text-fm-secondary-600 h-4 w-4" />
|
|
624
|
-
<span className="text-fm-icon-active/80 flex-1">
|
|
625
|
-
Meeting notes for Q4 planning
|
|
626
|
-
</span>
|
|
627
|
-
</div>
|
|
628
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary flex items-center gap-3 rounded border p-3">
|
|
629
|
-
<PencilIcon className="text-fm-icon-info h-4 w-4" />
|
|
630
|
-
<span className="text-fm-icon-active/80 flex-1">
|
|
631
|
-
Project ideas and sketches
|
|
632
|
-
</span>
|
|
633
|
-
</div>
|
|
634
|
-
</div>
|
|
635
|
-
</div>
|
|
636
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
637
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
638
|
-
{`<button className="flex items-center gap-2 rounded border border-indigo-500/30 bg-indigo-500/20 px-3 py-1 text-sm">
|
|
639
|
-
<PencilIcon className="h-3 w-3" />
|
|
640
|
-
New Note
|
|
641
|
-
</button>
|
|
642
|
-
|
|
643
|
-
<div className="flex items-center gap-3 rounded border border-white/10 bg-white/5 p-3">
|
|
644
|
-
<PencilIcon className="h-4 w-4 text-purple-400" />
|
|
645
|
-
<span className="flex-1">Meeting notes for Q4 planning</span>
|
|
646
|
-
</div>`}
|
|
647
|
-
</pre>
|
|
648
|
-
</div>
|
|
649
|
-
</div>
|
|
650
|
-
</div>
|
|
651
|
-
</div>
|
|
652
|
-
</div>
|
|
653
|
-
|
|
654
|
-
{/* Interactive States */}
|
|
655
|
-
<div className="!space-y-8">
|
|
656
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
657
|
-
Interactive States & Animations
|
|
658
|
-
</h2>
|
|
659
|
-
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
660
|
-
<div className="!space-y-4">
|
|
661
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
662
|
-
Hover & Animation Effects
|
|
663
|
-
</h3>
|
|
664
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
|
|
665
|
-
<div className="flex items-center gap-4">
|
|
666
|
-
<PencilIcon className="text-fm-tertiary hover:text-fm-icon-info h-6 w-6 transition-colors" />
|
|
667
|
-
<div>
|
|
668
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
669
|
-
Color Change
|
|
670
|
-
</div>
|
|
671
|
-
<div className="text-fm-tertiary text-xs">
|
|
672
|
-
Hover to see effect
|
|
673
|
-
</div>
|
|
674
|
-
</div>
|
|
675
|
-
</div>
|
|
676
|
-
<div className="flex items-center gap-4">
|
|
677
|
-
<PencilIcon className="text-fm-icon-active h-6 w-6 transition-transform hover:scale-125" />
|
|
678
|
-
<div>
|
|
679
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
680
|
-
Scale Up
|
|
681
|
-
</div>
|
|
682
|
-
<div className="text-fm-tertiary text-xs">
|
|
683
|
-
Scale on hover
|
|
684
|
-
</div>
|
|
685
|
-
</div>
|
|
686
|
-
</div>
|
|
687
|
-
<div className="flex items-center gap-4">
|
|
688
|
-
<PencilIcon className="animate-edit-pulse text-fm-icon-info h-6 w-6" />
|
|
689
|
-
<div>
|
|
690
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
691
|
-
Edit Pulse
|
|
692
|
-
</div>
|
|
693
|
-
<div className="text-fm-tertiary text-xs">
|
|
694
|
-
Continuous animation
|
|
695
|
-
</div>
|
|
696
|
-
</div>
|
|
697
|
-
</div>
|
|
698
|
-
<div className="flex items-center gap-4">
|
|
699
|
-
<PencilIcon className="animate-pencil-draw text-fm-secondary-600 h-6 w-6" />
|
|
700
|
-
<div>
|
|
701
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
702
|
-
Drawing Motion
|
|
703
|
-
</div>
|
|
704
|
-
<div className="text-fm-tertiary text-xs">
|
|
705
|
-
Writing animation
|
|
706
|
-
</div>
|
|
707
|
-
</div>
|
|
708
|
-
</div>
|
|
709
|
-
</div>
|
|
710
|
-
</div>
|
|
711
|
-
|
|
712
|
-
<div className="!space-y-4">
|
|
713
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
714
|
-
State Examples
|
|
715
|
-
</h3>
|
|
716
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
717
|
-
<pre className="text-fm-icon-info! overflow-x-auto text-sm">
|
|
718
|
-
{`// Color change on hover
|
|
719
|
-
<PencilIcon className="h-6 w-6 text-white/60 transition-colors hover:text-indigo-400" />
|
|
720
|
-
|
|
721
|
-
// Scale up on hover
|
|
722
|
-
<PencilIcon className="h-6 w-6 text-white transition-transform hover:scale-125" />
|
|
723
|
-
|
|
724
|
-
// Active editing state
|
|
725
|
-
<PencilIcon className="h-6 w-6 text-indigo-400 animate-pulse" />
|
|
726
|
-
|
|
727
|
-
// Writing animation
|
|
728
|
-
<PencilIcon className="h-6 w-6 text-purple-400 animate-pencil-draw" />
|
|
729
|
-
|
|
730
|
-
// Disabled state
|
|
731
|
-
<PencilIcon className="h-6 w-6 text-gray-400 opacity-50" />`}
|
|
732
|
-
</pre>
|
|
733
|
-
</div>
|
|
734
|
-
</div>
|
|
735
|
-
</div>
|
|
736
|
-
</div>
|
|
737
|
-
|
|
738
|
-
{/* Accessibility */}
|
|
739
|
-
<div className="!space-y-8">
|
|
740
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
741
|
-
Accessibility Features
|
|
742
|
-
</h2>
|
|
743
|
-
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
|
|
744
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
|
|
745
|
-
<h3 className="text-fm-icon-positive! text-lg font-semibold">
|
|
746
|
-
✅ Built-in Features
|
|
747
|
-
</h3>
|
|
748
|
-
<ul className="text-fm-secondary! !space-y-2 text-sm">
|
|
749
|
-
<li className="text-fm-secondary!">
|
|
750
|
-
Uses Radix UI AccessibleIcon wrapper
|
|
751
|
-
</li>
|
|
752
|
-
<li className="text-fm-secondary!">
|
|
753
|
-
Provides screen reader label "Pencil icon"
|
|
754
|
-
</li>
|
|
755
|
-
<li className="text-fm-secondary!">
|
|
756
|
-
Supports keyboard navigation when interactive
|
|
757
|
-
</li>
|
|
758
|
-
<li className="text-fm-secondary!">
|
|
759
|
-
Maintains proper color contrast ratios
|
|
760
|
-
</li>
|
|
761
|
-
<li className="text-fm-secondary!">
|
|
762
|
-
Scales with user's font size preferences
|
|
763
|
-
</li>
|
|
764
|
-
</ul>
|
|
765
|
-
</div>
|
|
766
|
-
|
|
767
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
|
|
768
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
769
|
-
💡 Best Practices
|
|
770
|
-
</h3>
|
|
771
|
-
<ul className="text-fm-secondary! !space-y-2 text-sm">
|
|
772
|
-
<li className="text-fm-secondary!">
|
|
773
|
-
Always provide descriptive button labels
|
|
774
|
-
</li>
|
|
775
|
-
<li className="text-fm-secondary!">
|
|
776
|
-
Use consistent placement for edit actions
|
|
777
|
-
</li>
|
|
778
|
-
<li className="text-fm-secondary!">
|
|
779
|
-
Ensure sufficient click/touch target sizes
|
|
780
|
-
</li>
|
|
781
|
-
<li className="text-fm-secondary!">
|
|
782
|
-
Add focus states for keyboard navigation
|
|
783
|
-
</li>
|
|
784
|
-
<li className="text-fm-secondary!">
|
|
785
|
-
Consider motion sensitivity for animations
|
|
786
|
-
</li>
|
|
787
|
-
</ul>
|
|
788
|
-
</div>
|
|
789
|
-
</div>
|
|
790
|
-
|
|
791
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-6">
|
|
792
|
-
<h3 className="text-fm-secondary-600! mb-4 text-lg font-semibold">
|
|
793
|
-
Custom Accessibility Implementation
|
|
794
|
-
</h3>
|
|
795
|
-
<div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
|
|
796
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
797
|
-
<pre className="text-fm-icon-info! overflow-x-auto text-sm">
|
|
798
|
-
{`// Edit button with proper ARIA
|
|
799
|
-
<button
|
|
800
|
-
aria-label="Edit profile information"
|
|
801
|
-
className="flex items-center gap-2 p-2"
|
|
802
|
-
>
|
|
803
|
-
<PencilIcon className="h-4 w-4" />
|
|
804
|
-
<span className="sr-only">Edit</span>
|
|
805
|
-
</button>
|
|
806
|
-
|
|
807
|
-
// Inline edit with context
|
|
808
|
-
<button
|
|
809
|
-
aria-label="Edit email address"
|
|
810
|
-
onClick={startEditing}
|
|
811
|
-
className="rounded p-1"
|
|
812
|
-
>
|
|
813
|
-
<PencilIcon
|
|
814
|
-
className="h-4 w-4"
|
|
815
|
-
aria-hidden="true"
|
|
816
|
-
/>
|
|
817
|
-
</button>
|
|
818
|
-
|
|
819
|
-
// Content editor toolbar
|
|
820
|
-
<button
|
|
821
|
-
aria-label="Edit text content"
|
|
822
|
-
aria-describedby="editor-help"
|
|
823
|
-
className="rounded p-2"
|
|
824
|
-
>
|
|
825
|
-
<PencilIcon className="h-4 w-4" />
|
|
826
|
-
</button>
|
|
827
|
-
<div id="editor-help" className="sr-only">
|
|
828
|
-
Opens rich text editor for content modification
|
|
829
|
-
</div>`}
|
|
830
|
-
</pre>
|
|
831
|
-
</div>
|
|
832
|
-
<div className="!space-y-4">
|
|
833
|
-
<p className="text-fm-secondary! text-sm">
|
|
834
|
-
When using PencilIcon for editing functionality, provide
|
|
835
|
-
clear context about what will be edited and any related
|
|
836
|
-
actions.
|
|
837
|
-
</p>
|
|
838
|
-
<div className="border-fm-icon-info/20 bg-fm-icon-info/10 rounded-lg border p-4">
|
|
839
|
-
<div className="text-fm-icon-info flex items-center gap-2 text-sm">
|
|
840
|
-
<PencilIcon className="h-4 w-4" />
|
|
841
|
-
<span>
|
|
842
|
-
This approach gives screen readers clear context
|
|
843
|
-
about the edit functionality
|
|
844
|
-
</span>
|
|
845
|
-
</div>
|
|
846
|
-
</div>
|
|
847
|
-
</div>
|
|
848
|
-
</div>
|
|
849
|
-
</div>
|
|
850
|
-
</div>
|
|
851
|
-
|
|
852
|
-
{/* Related Icons */}
|
|
853
|
-
<div className="!space-y-8">
|
|
854
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
855
|
-
Related Icons
|
|
856
|
-
</h2>
|
|
857
|
-
<div className="grid grid-cols-2 gap-6 md:grid-cols-4">
|
|
858
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
|
|
859
|
-
<div className="bg-fm-icon-positive/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
|
|
860
|
-
<span className="text-2xl">💾</span>
|
|
861
|
-
</div>
|
|
862
|
-
<div>
|
|
863
|
-
<div className="text-fm-icon-active font-medium">
|
|
864
|
-
SaveIcon
|
|
865
|
-
</div>
|
|
866
|
-
<div className="text-fm-tertiary text-xs">
|
|
867
|
-
Save changes
|
|
868
|
-
</div>
|
|
869
|
-
</div>
|
|
870
|
-
</div>
|
|
871
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
|
|
872
|
-
<div className="bg-fm-icon-negative/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
|
|
873
|
-
<span className="text-2xl">🗑️</span>
|
|
874
|
-
</div>
|
|
875
|
-
<div>
|
|
876
|
-
<div className="text-fm-icon-active font-medium">
|
|
877
|
-
DeleteIcon
|
|
878
|
-
</div>
|
|
879
|
-
<div className="text-fm-tertiary text-xs">
|
|
880
|
-
Remove content
|
|
881
|
-
</div>
|
|
882
|
-
</div>
|
|
883
|
-
</div>
|
|
884
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
|
|
885
|
-
<div className="bg-fm-icon-info/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
|
|
886
|
-
<span className="text-2xl">📋</span>
|
|
887
|
-
</div>
|
|
888
|
-
<div>
|
|
889
|
-
<div className="text-fm-icon-active font-medium">
|
|
890
|
-
CopyIcon
|
|
891
|
-
</div>
|
|
892
|
-
<div className="text-fm-tertiary text-xs">
|
|
893
|
-
Duplicate content
|
|
894
|
-
</div>
|
|
895
|
-
</div>
|
|
896
|
-
</div>
|
|
897
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
|
|
898
|
-
<div className="bg-fm-icon-warning/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
|
|
899
|
-
<span className="text-2xl">📝</span>
|
|
900
|
-
</div>
|
|
901
|
-
<div>
|
|
902
|
-
<div className="text-fm-icon-active font-medium">
|
|
903
|
-
NoteIcon
|
|
904
|
-
</div>
|
|
905
|
-
<div className="text-fm-tertiary text-xs">
|
|
906
|
-
Create notes
|
|
907
|
-
</div>
|
|
908
|
-
</div>
|
|
909
|
-
</div>
|
|
910
|
-
</div>
|
|
911
|
-
</div>
|
|
912
|
-
</div>
|
|
913
|
-
|
|
914
|
-
{/* Footer */}
|
|
915
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary border-t backdrop-blur-xl">
|
|
916
|
-
<div className="!mx-auto max-w-7xl px-6 py-8">
|
|
917
|
-
<div className="!space-y-4 text-center">
|
|
918
|
-
<p className="text-fm-tertiary!">
|
|
919
|
-
PencilIcon is part of the Aural UI icon library, built for
|
|
920
|
-
editing, writing, and content modification interfaces.
|
|
921
|
-
</p>
|
|
922
|
-
<p className="text-fm-placeholder! text-sm">
|
|
923
|
-
All icons use Radix UI's AccessibleIcon for screen reader
|
|
924
|
-
compatibility and follow WCAG guidelines for interactive
|
|
925
|
-
elements.
|
|
926
|
-
</p>
|
|
927
|
-
</div>
|
|
928
|
-
</div>
|
|
929
|
-
</div>
|
|
930
|
-
</div>
|
|
931
|
-
</>
|
|
51
|
+
}`,
|
|
52
|
+
livePreview: (
|
|
53
|
+
<button>
|
|
54
|
+
<PencilIcon className="text-fm-icon-active h-6 w-6" />
|
|
55
|
+
</button>
|
|
56
|
+
),
|
|
57
|
+
}}
|
|
58
|
+
relatedIcons={[
|
|
59
|
+
{
|
|
60
|
+
name: "EditBigIcon",
|
|
61
|
+
description: "Edit / modify content icon",
|
|
62
|
+
icon: EditBigIcon,
|
|
63
|
+
accentToken: "info",
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: "MagicEditIcon",
|
|
67
|
+
description: "AI-enhanced edit icon",
|
|
68
|
+
icon: MagicEditIcon,
|
|
69
|
+
accentToken: "positive",
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: "CopyIcon",
|
|
73
|
+
description: "Copy / duplicate content icon",
|
|
74
|
+
icon: CopyIcon,
|
|
75
|
+
accentToken: "warning",
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: "TrashIcon",
|
|
79
|
+
description: "Delete / remove icon",
|
|
80
|
+
icon: TrashIcon,
|
|
81
|
+
accentToken: "negative",
|
|
82
|
+
},
|
|
83
|
+
]}
|
|
84
|
+
/>
|
|
932
85
|
),
|
|
933
86
|
},
|
|
934
87
|
},
|
|
935
88
|
tags: ["autodocs"],
|
|
936
89
|
argTypes: {
|
|
937
|
-
|
|
938
|
-
control:
|
|
939
|
-
description: "
|
|
90
|
+
className: {
|
|
91
|
+
control: "text",
|
|
92
|
+
description: "CSS classes including color token",
|
|
940
93
|
},
|
|
941
94
|
withAccessibility: {
|
|
942
95
|
control: "boolean",
|
|
943
|
-
description: "
|
|
944
|
-
},
|
|
945
|
-
height: {
|
|
946
|
-
control: { type: "range", min: 8, max: 96, step: 2 },
|
|
947
|
-
description: "Height of the icon in pixels",
|
|
948
|
-
},
|
|
949
|
-
stroke: {
|
|
950
|
-
control: "color",
|
|
951
|
-
description: "Stroke color of the pencil outline",
|
|
952
|
-
},
|
|
953
|
-
strokeWidth: {
|
|
954
|
-
control: { type: "range", min: 0.5, max: 4, step: 0.5 },
|
|
955
|
-
description: "Thickness of the stroke lines",
|
|
956
|
-
},
|
|
957
|
-
strokeLinecap: {
|
|
958
|
-
control: "select",
|
|
959
|
-
options: ["butt", "round", "square"],
|
|
960
|
-
description: "Style of line endings",
|
|
961
|
-
},
|
|
962
|
-
className: {
|
|
963
|
-
control: "text",
|
|
964
|
-
description: "CSS classes for styling",
|
|
96
|
+
description: "Wrap with accessibility label",
|
|
965
97
|
},
|
|
966
98
|
},
|
|
967
99
|
}
|
|
@@ -969,213 +101,84 @@ function EditButton() {
|
|
|
969
101
|
export default meta
|
|
970
102
|
type Story = StoryObj<typeof PencilIcon>
|
|
971
103
|
|
|
972
|
-
// Story parameters for consistent dark theme
|
|
973
|
-
const storyParameters = {
|
|
974
|
-
backgrounds: {
|
|
975
|
-
default: "dark",
|
|
976
|
-
values: [
|
|
977
|
-
{ name: "dark", value: "var(--color-fm-surface-primary)" },
|
|
978
|
-
{ name: "darker", value: "var(--color-fm-neutral-0)" },
|
|
979
|
-
],
|
|
980
|
-
},
|
|
981
|
-
}
|
|
982
|
-
|
|
983
104
|
export const Default: Story = {
|
|
984
105
|
args: {
|
|
985
|
-
|
|
986
|
-
height: 24,
|
|
987
|
-
className: "text-fm-icon-info",
|
|
106
|
+
className: "h-6 w-6 text-fm-icon-active",
|
|
988
107
|
withAccessibility: true,
|
|
989
108
|
},
|
|
990
|
-
parameters: storyParameters,
|
|
991
109
|
render: (args) => (
|
|
992
|
-
<
|
|
110
|
+
<IconDefaultCanvas>
|
|
993
111
|
<PencilIcon {...args} />
|
|
994
|
-
</
|
|
112
|
+
</IconDefaultCanvas>
|
|
995
113
|
),
|
|
996
114
|
}
|
|
997
115
|
|
|
998
116
|
export const SizeVariations: Story = {
|
|
999
|
-
|
|
1000
|
-
...storyParameters,
|
|
1001
|
-
docs: {
|
|
1002
|
-
description: {
|
|
1003
|
-
story:
|
|
1004
|
-
"PencilIcon in different sizes, from small UI elements to large editing interfaces.",
|
|
1005
|
-
},
|
|
1006
|
-
},
|
|
1007
|
-
},
|
|
1008
|
-
render: () => (
|
|
1009
|
-
<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">
|
|
1010
|
-
<div className="text-center">
|
|
1011
|
-
<PencilIcon className="text-fm-icon-info !mx-auto mb-2 h-3 w-3" />
|
|
1012
|
-
<span className="text-fm-tertiary text-xs">12px</span>
|
|
1013
|
-
</div>
|
|
1014
|
-
<div className="text-center">
|
|
1015
|
-
<PencilIcon className="text-fm-icon-info !mx-auto mb-2 h-4 w-4" />
|
|
1016
|
-
<span className="text-fm-tertiary text-xs">16px</span>
|
|
1017
|
-
</div>
|
|
1018
|
-
<div className="text-center">
|
|
1019
|
-
<PencilIcon className="text-fm-icon-info !mx-auto mb-2 h-5 w-5" />
|
|
1020
|
-
<span className="text-fm-tertiary text-xs">20px</span>
|
|
1021
|
-
</div>
|
|
1022
|
-
<div className="text-center">
|
|
1023
|
-
<PencilIcon className="text-fm-icon-info !mx-auto mb-2 h-6 w-6" />
|
|
1024
|
-
<span className="text-fm-tertiary text-xs">24px</span>
|
|
1025
|
-
</div>
|
|
1026
|
-
<div className="text-center">
|
|
1027
|
-
<PencilIcon className="text-fm-icon-info !mx-auto mb-2 h-8 w-8" />
|
|
1028
|
-
<span className="text-fm-tertiary text-xs">32px</span>
|
|
1029
|
-
</div>
|
|
1030
|
-
<div className="text-center">
|
|
1031
|
-
<PencilIcon className="text-fm-icon-info !mx-auto mb-2 h-12 w-12" />
|
|
1032
|
-
<span className="text-fm-tertiary text-xs">48px</span>
|
|
1033
|
-
</div>
|
|
1034
|
-
</div>
|
|
1035
|
-
),
|
|
117
|
+
render: () => <IconSizeVariations icon={PencilIcon} />,
|
|
1036
118
|
}
|
|
1037
119
|
|
|
1038
120
|
export const ColorVariations: Story = {
|
|
1039
|
-
|
|
1040
|
-
...storyParameters,
|
|
1041
|
-
docs: {
|
|
1042
|
-
description: {
|
|
1043
|
-
story:
|
|
1044
|
-
"PencilIcon in different colors for various editing and writing contexts.",
|
|
1045
|
-
},
|
|
1046
|
-
},
|
|
1047
|
-
},
|
|
1048
|
-
render: () => (
|
|
1049
|
-
<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">
|
|
1050
|
-
<div className="text-center">
|
|
1051
|
-
<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">
|
|
1052
|
-
<PencilIcon className="text-fm-icon-info h-8 w-8" />
|
|
1053
|
-
</div>
|
|
1054
|
-
<div className="text-fm-icon-active text-sm font-medium">Primary</div>
|
|
1055
|
-
<div className="text-fm-icon-info text-xs">text-fm-icon-info</div>
|
|
1056
|
-
</div>
|
|
1057
|
-
<div className="text-center">
|
|
1058
|
-
<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">
|
|
1059
|
-
<PencilIcon className="text-fm-secondary-600 h-8 w-8" />
|
|
1060
|
-
</div>
|
|
1061
|
-
<div className="text-fm-icon-active text-sm font-medium">Creative</div>
|
|
1062
|
-
<div className="text-fm-secondary-600 text-xs">
|
|
1063
|
-
text-fm-secondary-600
|
|
1064
|
-
</div>
|
|
1065
|
-
</div>
|
|
1066
|
-
<div className="text-center">
|
|
1067
|
-
<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">
|
|
1068
|
-
<PencilIcon className="text-fm-icon-info h-8 w-8" />
|
|
1069
|
-
</div>
|
|
1070
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
1071
|
-
Information
|
|
1072
|
-
</div>
|
|
1073
|
-
<div className="text-fm-icon-info text-xs">text-fm-icon-info</div>
|
|
1074
|
-
</div>
|
|
1075
|
-
<div className="text-center">
|
|
1076
|
-
<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">
|
|
1077
|
-
<PencilIcon className="text-fm-placeholder h-8 w-8" />
|
|
1078
|
-
</div>
|
|
1079
|
-
<div className="text-fm-icon-active text-sm font-medium">Disabled</div>
|
|
1080
|
-
<div className="text-fm-placeholder text-xs">text-fm-placeholder</div>
|
|
1081
|
-
</div>
|
|
1082
|
-
</div>
|
|
1083
|
-
),
|
|
121
|
+
render: () => <IconColorVariations icon={PencilIcon} />,
|
|
1084
122
|
}
|
|
1085
123
|
|
|
1086
124
|
export const UsageExamples: Story = {
|
|
1087
|
-
parameters: {
|
|
1088
|
-
...storyParameters,
|
|
1089
|
-
docs: {
|
|
1090
|
-
description: {
|
|
1091
|
-
story:
|
|
1092
|
-
"Real-world usage examples showing PencilIcon in different UI contexts.",
|
|
1093
|
-
},
|
|
1094
|
-
},
|
|
1095
|
-
},
|
|
1096
125
|
render: () => (
|
|
1097
|
-
<
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
<PencilIcon className="h-4 w-4" />
|
|
1106
|
-
Edit Profile
|
|
1107
|
-
</button>
|
|
1108
|
-
<button className="border-fm-secondary-500/30 bg-fm-secondary-500/20 text-fm-secondary-600 hover:bg-fm-secondary-500/30 flex items-center gap-2 rounded-lg border px-4 py-2 transition-colors">
|
|
1109
|
-
<PencilIcon className="h-4 w-4" />
|
|
1110
|
-
Edit Post
|
|
126
|
+
<IconUsageCanvas>
|
|
127
|
+
<IconUsageSection title="Inline Edit Button">
|
|
128
|
+
<div className="border-fm-divider-secondary bg-fm-surface-secondary flex w-full max-w-sm items-center justify-between rounded-xl border px-4 py-3">
|
|
129
|
+
<span className="text-fm-primary font-fm-text text-sm">
|
|
130
|
+
Episode Title
|
|
131
|
+
</span>
|
|
132
|
+
<button>
|
|
133
|
+
<PencilIcon className="text-fm-icon-active h-4 w-4" />
|
|
1111
134
|
</button>
|
|
1112
135
|
</div>
|
|
1113
|
-
</
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
<
|
|
1122
|
-
<PencilIcon className="h-4 w-4" />
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
<span className="text-fm-icon-active flex-1">Email Address</span>
|
|
1127
|
-
<button className="text-fm-tertiary hover:bg-fm-surface-secondary hover:text-fm-icon-info rounded p-1 opacity-0 transition-all group-hover:opacity-100">
|
|
1128
|
-
<PencilIcon className="h-4 w-4" />
|
|
1129
|
-
</button>
|
|
136
|
+
</IconUsageSection>
|
|
137
|
+
|
|
138
|
+
<IconUsageSection title="Card Actions">
|
|
139
|
+
<div className="border-fm-divider-secondary bg-fm-surface-secondary w-full max-w-sm rounded-xl border p-4">
|
|
140
|
+
<div className="mb-3 flex items-center justify-between">
|
|
141
|
+
<span className="text-fm-primary font-fm-text text-sm font-medium">
|
|
142
|
+
Chapter 1
|
|
143
|
+
</span>
|
|
144
|
+
<div className="flex gap-2">
|
|
145
|
+
<PencilIcon className="text-fm-icon-active h-4 w-4" />
|
|
146
|
+
<CopyIcon className="text-fm-icon-inactive h-4 w-4" />
|
|
147
|
+
<TrashIcon className="text-fm-icon-negative h-4 w-4" />
|
|
148
|
+
</div>
|
|
1130
149
|
</div>
|
|
150
|
+
<p className="text-fm-secondary font-fm-text text-xs">
|
|
151
|
+
The adventure begins...
|
|
152
|
+
</p>
|
|
1131
153
|
</div>
|
|
1132
|
-
</
|
|
154
|
+
</IconUsageSection>
|
|
1133
155
|
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
<
|
|
1141
|
-
<
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
</button>
|
|
1147
|
-
<button className="text-fm-tertiary hover:bg-fm-surface-secondary hover:text-fm-icon-active rounded p-2">
|
|
1148
|
-
<span className="text-sm italic">I</span>
|
|
1149
|
-
</button>
|
|
1150
|
-
<button className="text-fm-tertiary hover:bg-fm-surface-secondary hover:text-fm-icon-active rounded p-2">
|
|
1151
|
-
<span className="text-sm underline">U</span>
|
|
1152
|
-
</button>
|
|
156
|
+
<IconUsageSection title="Edit vs AI Edit">
|
|
157
|
+
<div className="flex gap-4">
|
|
158
|
+
<div className="flex flex-col items-center gap-1">
|
|
159
|
+
<PencilIcon className="text-fm-icon-active h-6 w-6" />
|
|
160
|
+
<span className="text-fm-secondary font-fm-text text-xs">Edit</span>
|
|
161
|
+
</div>
|
|
162
|
+
<div className="flex flex-col items-center gap-1">
|
|
163
|
+
<MagicEditIcon className="text-fm-icon-positive h-6 w-6" />
|
|
164
|
+
<span className="text-fm-secondary font-fm-text text-xs">
|
|
165
|
+
AI Edit
|
|
166
|
+
</span>
|
|
167
|
+
</div>
|
|
1153
168
|
</div>
|
|
1154
|
-
</
|
|
1155
|
-
</
|
|
169
|
+
</IconUsageSection>
|
|
170
|
+
</IconUsageCanvas>
|
|
1156
171
|
),
|
|
1157
172
|
}
|
|
1158
173
|
|
|
1159
174
|
export const Playground: Story = {
|
|
1160
|
-
parameters: {
|
|
1161
|
-
...storyParameters,
|
|
1162
|
-
docs: {
|
|
1163
|
-
description: {
|
|
1164
|
-
story:
|
|
1165
|
-
"Interactive playground to experiment with different PencilIcon configurations.",
|
|
1166
|
-
},
|
|
1167
|
-
},
|
|
1168
|
-
},
|
|
1169
175
|
args: {
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
className: "text-fm-icon-info",
|
|
176
|
+
className: "h-8 w-8 text-fm-icon-active",
|
|
177
|
+
withAccessibility: true,
|
|
1173
178
|
},
|
|
1174
179
|
render: (args) => (
|
|
1175
|
-
<
|
|
1176
|
-
<
|
|
1177
|
-
|
|
1178
|
-
</div>
|
|
1179
|
-
</div>
|
|
180
|
+
<IconPlaygroundCanvas>
|
|
181
|
+
<PencilIcon {...args} />
|
|
182
|
+
</IconPlaygroundCanvas>
|
|
1180
183
|
),
|
|
1181
184
|
}
|