aural-ui 3.0.7 → 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 -1199
- package/dist/components/avatar/Avatar.stories.tsx +235 -237
- 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/button/index.tsx +7 -7
- 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 -620
- 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 +533 -856
- package/dist/components/dialog/Dialog.stories.tsx +505 -949
- package/dist/components/divider/Divider.stories.tsx +265 -502
- package/dist/components/dot-loader/DotLoader.stories.tsx +256 -257
- package/dist/components/drawer/Drawer.stories.tsx +659 -993
- package/dist/components/drawer/index.tsx +3 -3
- package/dist/components/dropdown/Dropdown.stories.tsx +643 -1018
- 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 -1221
- 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 +485 -822
- package/dist/components/marquee/Marquee.stories.tsx +356 -694
- package/dist/components/otp-inputs/OtpInputs.stories.tsx +352 -410
- package/dist/components/overlay/Overlay.stories.tsx +452 -818
- package/dist/components/overlay/index.tsx +4 -4
- package/dist/components/pagination/Pagination.stories.tsx +721 -210
- package/dist/components/popover/Popover.stories.tsx +484 -873
- package/dist/components/radio/Radio.stories.tsx +432 -124
- package/dist/components/resizable/Resizable.stories.tsx +496 -752
- package/dist/components/scroll-area/ScrollArea.stories.tsx +384 -1006
- package/dist/components/search/Search.stories.tsx +314 -575
- package/dist/components/select/Select.stories.tsx +684 -787
- package/dist/components/sheet/Sheet.stories.tsx +671 -936
- package/dist/components/skelton/Skelton.stories.tsx +230 -764
- package/dist/components/slider/Slider.stories.tsx +384 -737
- 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 -914
- package/dist/components/tabs/Tabs.stories.tsx +459 -1400
- 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 -148
- package/dist/components/toast/Toast.stories.tsx +452 -1333
- package/dist/components/toggle/Toggle.stories.tsx +488 -909
- package/dist/components/tooltip/Tooltip.stories.tsx +344 -1372
- 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 +226 -1013
- package/dist/icons/alert-icon/AlertIcon.stories.tsx +109 -929
- package/dist/icons/all-icons.tsx +124 -87
- package/dist/icons/angle-down-icon/AngleDownIcon.stories.tsx +140 -971
- package/dist/icons/apple-logo-icon/AppleLogoIcon.stories.tsx +148 -888
- package/dist/icons/arrow-box-left-icon/ArrowBoxLeftIcon.stories.tsx +135 -1019
- package/dist/icons/arrow-corner-up-left-icon/ArrowCornerUpLeftIcon.stories.tsx +137 -953
- package/dist/icons/arrow-corner-up-right-icon/ArrowCornerUpRightIcon.stories.tsx +138 -997
- package/dist/icons/arrow-left-icon/ArrowLeftIcon.stories.tsx +136 -942
- package/dist/icons/arrow-right-icon/ArrowRightIcon.stories.tsx +148 -1092
- package/dist/icons/arrow-right-up-icon/ArrowRightUpIcon.stories.tsx +146 -1211
- package/dist/icons/art-board-icon/ArtBoardIcon.stories.tsx +126 -615
- package/dist/icons/audio-bar-icon/AudioBarIcon.stories.tsx +144 -1164
- package/dist/icons/backward-ten-seconds-icon/BackwardTenSecondsIcon.stories.tsx +167 -985
- package/dist/icons/bubble-check-icon/BubbleCheckIcon.stories.tsx +122 -1179
- package/dist/icons/bubble-crossed-icon/BubbleCrossedIcon.stories.tsx +124 -1168
- package/dist/icons/bubble-sparkle-icon/BubbleSparkleIcon.stories.tsx +119 -850
- package/dist/icons/camera-icon/CameraIcon.stories.tsx +112 -1213
- package/dist/icons/capital-a-letter-icon/CapitalALetterIcon.stories.tsx +117 -934
- package/dist/icons/chevron-double-left-icon/ChevronDoubleLeftIcon.stories.tsx +160 -961
- package/dist/icons/chevron-double-right-icon/ChevronDoubleRightIcon.stories.tsx +163 -961
- package/dist/icons/chevron-down-icon/ChevronDownIcon.stories.tsx +144 -942
- package/dist/icons/chevron-left-icon/ChevronLeftIcon.stories.tsx +129 -966
- package/dist/icons/chevron-right-icon/ChevronRightIcon.stories.tsx +147 -964
- package/dist/icons/chevron-up-icon/ChevronUpIcon.stories.tsx +145 -975
- package/dist/icons/circle-tick-icon/CircleTickIcon.stories.tsx +150 -1142
- package/dist/icons/circular-play-icon/CircularPlayIcon.stories.tsx +114 -461
- package/dist/icons/coin-icon/CoinIcon.stories.tsx +124 -1322
- package/dist/icons/coin-toons-icon/CoinToonsIcon.stories.tsx +117 -1318
- package/dist/icons/column-wide-add-icon/ColumnWideAddIcon.stories.tsx +114 -903
- package/dist/icons/command-icon/CommandIcon.stories.tsx +127 -1042
- package/dist/icons/copy-icon/CopyIcon.stories.tsx +123 -962
- package/dist/icons/cross-circle-icon/CrossCircleIcon.stories.tsx +147 -999
- package/dist/icons/cross-icon/CrossIcon.stories.tsx +139 -960
- package/dist/icons/download-icon/DownloadIcon.stories.tsx +126 -820
- package/dist/icons/edit-big-icon/EditBigIcon.stories.tsx +124 -1031
- package/dist/icons/email-icon/EmailIcon.stories.tsx +115 -936
- package/dist/icons/expand-icon/ExpandIcon.stories.tsx +112 -1111
- package/dist/icons/eye-close-icon/EyeCloseIcon.stories.tsx +144 -1025
- package/dist/icons/eye-open-icon/EyeOpenIcon.stories.tsx +143 -1036
- package/dist/icons/feature-shine-icon/FeatureShineIcon.stories.tsx +127 -1011
- package/dist/icons/file-chart-icon/FileChartIcon.stories.tsx +126 -1056
- package/dist/icons/file-text-icon/FileTextIcon.stories.tsx +125 -614
- package/dist/icons/filter-bar-row-icon/FilterBarRowIcon.stories.tsx +119 -1050
- package/dist/icons/forward-ten-seconds-icon/ForwardTenSecondsIcon.stories.tsx +169 -989
- package/dist/icons/git-branch-icon/GitBranchIcon.stories.tsx +115 -1145
- package/dist/icons/git-fork-icon/GitForkIcon.stories.tsx +115 -1122
- package/dist/icons/globe-icon/GlobeIcon.stories.tsx +130 -313
- package/dist/icons/google-logo-icon/GoogleLogoIcon.stories.tsx +145 -940
- package/dist/icons/grip-vertical-icon/GripVerticalIcon.stories.tsx +119 -1174
- package/dist/icons/head-icon/HeadIcon.stories.tsx +111 -916
- package/dist/icons/heart-icon/HeartIcon.stories.tsx +120 -1019
- package/dist/icons/image-avatar-sparkle-icon/ImageAvatarSparkleIcon.stories.tsx +119 -683
- package/dist/icons/image-icon/ImageIcon.stories.tsx +105 -1121
- package/dist/icons/import-folder-icon/ImportFolderIcon.stories.tsx +111 -1192
- package/dist/icons/import-left-arrow-folder-icon/ImportLeftArrowFolderIcon.stories.tsx +136 -1256
- package/dist/icons/indian-flag-icon/IndianFlagIcon.stories.tsx +159 -962
- package/dist/icons/instagram-icon/InstagramIcon.stories.tsx +161 -1385
- package/dist/icons/layout-column-icon/LayoutColumnIcon.stories.tsx +124 -972
- package/dist/icons/layout-left-icon/LayoutLeftIcon.stories.tsx +119 -948
- package/dist/icons/layout-right-icon/LayoutRightIcon.stories.tsx +119 -942
- package/dist/icons/light-bulb-simple-icon/LightBulbSimpleIcon.stories.tsx +108 -1215
- package/dist/icons/linked-in-icon/LinkedInIcon.stories.tsx +154 -1517
- package/dist/icons/magic-book-icon/MagicBookIcon.stories.tsx +110 -1188
- package/dist/icons/magic-edit-icon/MagicEditIcon.stories.tsx +119 -678
- package/dist/icons/maintenance-icon/MaintenanceIcon.stories.tsx +123 -1184
- package/dist/icons/message-icon/MessageIcon.stories.tsx +114 -538
- package/dist/icons/minimize-icon/MinimizeIcon.stories.tsx +116 -1158
- package/dist/icons/moon-icon/MoonIcon.stories.tsx +120 -536
- package/dist/icons/move-horizontal-icon/MoveHorizontalIcon.stories.tsx +109 -1184
- package/dist/icons/move-vertical-icon/MoveVerticalIcon.stories.tsx +115 -1134
- package/dist/icons/musical-note-icon/MusicalNoteIcon.stories.tsx +119 -971
- package/dist/icons/notepad-icon/NotepadIcon.stories.tsx +111 -1100
- package/dist/icons/notes-icon/NotesIcon.stories.tsx +119 -1101
- package/dist/icons/page-search-icon/PageSearchIcon.stories.tsx +109 -1111
- package/dist/icons/page-text-icon/PageTextIcon.stories.tsx +122 -684
- package/dist/icons/paint-roll-icon/PaintRollIcon.stories.tsx +113 -954
- package/dist/icons/paper-plane-icon/PaperPlaneIcon.stories.tsx +112 -877
- package/dist/icons/pause-icon/PauseIcon.stories.tsx +113 -1000
- package/dist/icons/pencil-icon/PencilIcon.stories.tsx +115 -1070
- package/dist/icons/phone-icon/PhoneIcon.stories.tsx +115 -978
- package/dist/icons/plus-icon/PlusIcon.stories.tsx +106 -1093
- package/dist/icons/pocket-studio-icon/PocketStudioIcon.stories.tsx +107 -829
- package/dist/icons/scroll-down-icon/ScrollDownIcon.stories.tsx +102 -469
- package/dist/icons/search-icon/SearchIcon.stories.tsx +111 -1124
- package/dist/icons/setting-icon/SettingIcon.stories.tsx +107 -970
- package/dist/icons/share-icon/ShareIcon.stories.tsx +120 -1025
- package/dist/icons/shield-icon/ShieldIcon.stories.tsx +117 -931
- package/dist/icons/site-logo-icon/SiteLogoIcon.stories.tsx +137 -1104
- package/dist/icons/skip-backward-icon/SkipBackwardIcon.stories.tsx +172 -982
- package/dist/icons/skip-forward-icon/SkipForwardIcon.stories.tsx +164 -983
- package/dist/icons/sparkles-soft-icon/SparklesSoftIcon.stories.tsx +105 -958
- package/dist/icons/spinner-gradient-icon/SpinnerGradientIcon.stories.tsx +158 -580
- package/dist/icons/spinner-gradient-icon/index.tsx +6 -1
- package/dist/icons/spinner-solid-icon/SpinnerSolidIcon.stories.tsx +158 -587
- package/dist/icons/spinner-solid-icon/index.tsx +6 -1
- package/dist/icons/spinner-solid-neutral-icon/SpinnerSolidINeutralcon.stories.tsx +146 -682
- package/dist/icons/spinner-solid-neutral-icon/index.tsx +1 -1
- package/dist/icons/star-icon/StarIcon.stories.tsx +124 -904
- package/dist/icons/store-coin-icon/StoreCoinIcon.stories.tsx +112 -964
- package/dist/icons/suggestion-icon/SuggestionIcon.stories.tsx +116 -852
- package/dist/icons/sun-icon/SunIcon.stories.tsx +120 -831
- package/dist/icons/text-color-icon/TextColorIcon.stories.tsx +116 -950
- package/dist/icons/text-indicator-icon/TextIndicatorIcon.stories.tsx +123 -980
- package/dist/icons/threads-icon/ThreadsIcon.stories.tsx +156 -1427
- package/dist/icons/tick-circle-icon/TickCircleIcon.stories.tsx +146 -1142
- package/dist/icons/tick-icon/TickIcon.stories.tsx +145 -1276
- package/dist/icons/trash-icon/TrashIcon.stories.tsx +108 -933
- package/dist/icons/twitter-x-icon/TwitterXIcon.stories.tsx +157 -1402
- package/dist/icons/upload-icon/UploadIcon.stories.tsx +115 -889
- package/dist/icons/vertical-menu-icon/VerticalMenuIcon.stories.tsx +118 -984
- package/dist/icons/video-play-list-icon/VideoPlaylistIcon.stories.tsx +125 -1049
- package/dist/icons/voice-playing-icon/VoicePlayingIcon.stories.tsx +123 -1356
- package/dist/icons/volume-full-icon/VolumeFullIcon.stories.tsx +110 -1171
- package/dist/icons/volume-half-icon/VolumeHalfIcon.stories.tsx +112 -1093
- package/dist/icons/volume-off-icon/VolumeOffIcon.stories.tsx +115 -1087
- package/dist/icons/warning-icon/WarningIcon.stories.tsx +122 -1046
- package/dist/icons/youtube-icon/YoutubeIcon.stories.tsx +161 -936
- package/dist/index.cjs +84 -84
- package/dist/index.js +84 -84
- package/dist/styles/aural-all-theme.css +1222 -0
- package/dist/styles/{aural-theme.css → aural-dark-theme.css} +15 -3
- package/dist/styles/aural-light-theme.css +1047 -0
- 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> = {
|
|
@@ -11,921 +25,75 @@ const meta: Meta<typeof PencilIcon> = {
|
|
|
11
25
|
backgrounds: {
|
|
12
26
|
default: "dark",
|
|
13
27
|
values: [
|
|
14
|
-
{ name: "dark", value: "
|
|
15
|
-
{ name: "darker", value: "
|
|
16
|
-
{ name: "light", value: "
|
|
28
|
+
{ name: "dark", value: "var(--color-fm-surface-primary)" },
|
|
29
|
+
{ name: "darker", value: "var(--color-fm-neutral-0)" },
|
|
30
|
+
{ name: "light", value: "var(--color-fm-neutral-1100)" },
|
|
17
31
|
],
|
|
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: #0a0a0a !important;
|
|
44
|
-
}
|
|
45
|
-
#storybook-docs {
|
|
46
|
-
background: #0a0a0a !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: white !important;
|
|
54
|
-
}
|
|
55
|
-
.sbdocs-p, .sbdocs-li {
|
|
56
|
-
color: rgba(255, 255, 255, 0.7) !important;
|
|
57
|
-
}
|
|
58
|
-
.sbdocs-code {
|
|
59
|
-
background: rgba(255, 255, 255, 0.1) !important;
|
|
60
|
-
color: rgba(168, 85, 247, 1) !important;
|
|
61
|
-
border: 1px solid rgba(255, 255, 255, 0.1) !important;
|
|
62
|
-
}
|
|
63
|
-
.sbdocs-pre {
|
|
64
|
-
background: rgba(0, 0, 0, 0.4) !important;
|
|
65
|
-
border: 1px solid rgba(255, 255, 255, 0.1) !important;
|
|
66
|
-
}
|
|
67
|
-
.sbdocs-table {
|
|
68
|
-
background: rgba(255, 255, 255, 0.05) !important;
|
|
69
|
-
border: 1px solid rgba(255, 255, 255, 0.1) !important;
|
|
70
|
-
}
|
|
71
|
-
.sbdocs-table th {
|
|
72
|
-
background: rgba(255, 255, 255, 0.05) !important;
|
|
73
|
-
color: white !important;
|
|
74
|
-
border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
|
|
75
|
-
}
|
|
76
|
-
.sbdocs-table td {
|
|
77
|
-
color: rgba(255, 255, 255, 0.7) !important;
|
|
78
|
-
border-bottom: 1px solid rgba(255, 255, 255, 0.05) !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="min-h-screen bg-gradient-to-br from-gray-900 via-indigo-900/20 to-gray-900">
|
|
101
|
-
{/* Header */}
|
|
102
|
-
<div className="relative overflow-hidden border-b border-white/10 bg-black/20 backdrop-blur-xl">
|
|
103
|
-
<div className="absolute inset-0 bg-gradient-to-r from-indigo-500/10 via-transparent to-purple-500/10" />
|
|
104
|
-
<div className="relative !mx-auto max-w-7xl px-6 py-16">
|
|
105
|
-
<div className="!space-y-6 text-center">
|
|
106
|
-
<div className="!mx-auto flex h-24 w-24 items-center justify-center rounded-2xl border border-indigo-500/30 bg-gradient-to-br from-indigo-500/20 to-purple-500/20">
|
|
107
|
-
<PencilIcon className="h-12 w-12 text-indigo-400" />
|
|
108
|
-
</div>
|
|
109
|
-
<h1 className="!text-fm-primary text-5xl font-bold">
|
|
110
|
-
PencilIcon
|
|
111
|
-
</h1>
|
|
112
|
-
<p className="!mx-auto max-w-3xl text-xl leading-relaxed !text-white/70">
|
|
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-3xl font-bold text-indigo-300">
|
|
124
|
-
Edit
|
|
125
|
-
</div>
|
|
126
|
-
<div className="text-sm text-white/60">
|
|
127
|
-
Content modification
|
|
128
|
-
</div>
|
|
129
|
-
</div>
|
|
130
|
-
<div className="h-8 w-px bg-white/20" />
|
|
131
|
-
<div className="text-center">
|
|
132
|
-
<div className="text-3xl font-bold text-purple-300">
|
|
133
|
-
Write
|
|
134
|
-
</div>
|
|
135
|
-
<div className="text-sm text-white/60">
|
|
136
|
-
Content creation
|
|
137
|
-
</div>
|
|
138
|
-
</div>
|
|
139
|
-
<div className="h-8 w-px bg-white/20" />
|
|
140
|
-
<div className="text-center">
|
|
141
|
-
<div className="text-3xl font-bold text-blue-300">
|
|
142
|
-
Update
|
|
143
|
-
</div>
|
|
144
|
-
<div className="text-sm text-white/60">
|
|
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-center text-3xl font-bold !text-white">
|
|
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-xl font-semibold !text-indigo-300">
|
|
163
|
-
Basic Usage
|
|
164
|
-
</h3>
|
|
165
|
-
<div className="rounded-lg bg-black/40 p-4">
|
|
166
|
-
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
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
|
-
</th>
|
|
211
|
-
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
212
|
-
Type
|
|
213
|
-
</th>
|
|
214
|
-
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
215
|
-
Default
|
|
216
|
-
</th>
|
|
217
|
-
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
218
|
-
Description
|
|
219
|
-
</th>
|
|
220
|
-
</tr>
|
|
221
|
-
</thead>
|
|
222
|
-
<tbody>
|
|
223
|
-
{" "}
|
|
224
|
-
<tr className="!bg-black/10">
|
|
225
|
-
<td className="px-6 py-4 font-mono text-sm !text-blue-300">
|
|
226
|
-
withAccessibility
|
|
227
|
-
</td>
|
|
228
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
229
|
-
boolean
|
|
230
|
-
</td>
|
|
231
|
-
<td className="px-6 py-4 text-sm !text-white/50">
|
|
232
|
-
true
|
|
233
|
-
</td>
|
|
234
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
235
|
-
Whether to wrap the icon with accessibility feature
|
|
236
|
-
</td>
|
|
237
|
-
</tr>
|
|
238
|
-
<tr className="border-b border-white/5 !bg-black/10">
|
|
239
|
-
<td className="px-6 py-4 font-mono text-sm !text-indigo-300">
|
|
240
|
-
height
|
|
241
|
-
</td>
|
|
242
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
243
|
-
number | string
|
|
244
|
-
</td>
|
|
245
|
-
<td className="px-6 py-4 text-sm !text-white/50">16</td>
|
|
246
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
247
|
-
Height of the icon in pixels
|
|
248
|
-
</td>
|
|
249
|
-
</tr>
|
|
250
|
-
<tr className="border-b border-white/5">
|
|
251
|
-
<td className="px-6 py-4 font-mono text-sm !text-indigo-300">
|
|
252
|
-
stroke
|
|
253
|
-
</td>
|
|
254
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
255
|
-
string
|
|
256
|
-
</td>
|
|
257
|
-
<td className="px-6 py-4 text-sm !text-white/50">
|
|
258
|
-
currentColor
|
|
259
|
-
</td>
|
|
260
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
261
|
-
Stroke color of the pencil outline
|
|
262
|
-
</td>
|
|
263
|
-
</tr>
|
|
264
|
-
<tr className="border-b border-white/5 !bg-black/10">
|
|
265
|
-
<td className="px-6 py-4 font-mono text-sm !text-indigo-300">
|
|
266
|
-
strokeWidth
|
|
267
|
-
</td>
|
|
268
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
269
|
-
number | string
|
|
270
|
-
</td>
|
|
271
|
-
<td className="px-6 py-4 text-sm !text-white/50">1</td>
|
|
272
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
273
|
-
Thickness of the stroke lines
|
|
274
|
-
</td>
|
|
275
|
-
</tr>
|
|
276
|
-
<tr className="border-b border-white/5">
|
|
277
|
-
<td className="px-6 py-4 font-mono text-sm !text-indigo-300">
|
|
278
|
-
strokeLinecap
|
|
279
|
-
</td>
|
|
280
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
281
|
-
string
|
|
282
|
-
</td>
|
|
283
|
-
<td className="px-6 py-4 text-sm !text-white/50">
|
|
284
|
-
round
|
|
285
|
-
</td>
|
|
286
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
287
|
-
Style of line endings
|
|
288
|
-
</td>
|
|
289
|
-
</tr>
|
|
290
|
-
<tr className="border-b border-white/5 !bg-black/10">
|
|
291
|
-
<td className="px-6 py-4 font-mono text-sm !text-indigo-300">
|
|
292
|
-
className
|
|
293
|
-
</td>
|
|
294
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
295
|
-
string
|
|
296
|
-
</td>
|
|
297
|
-
<td className="px-6 py-4 text-sm !text-white/50">-</td>
|
|
298
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
299
|
-
CSS classes for styling
|
|
300
|
-
</td>
|
|
301
|
-
</tr>
|
|
302
|
-
<tr className="!bg-black/10">
|
|
303
|
-
<td className="px-6 py-4 font-mono text-sm !text-indigo-300">
|
|
304
|
-
...svgProps
|
|
305
|
-
</td>
|
|
306
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
307
|
-
SVGProps
|
|
308
|
-
</td>
|
|
309
|
-
<td className="px-6 py-4 text-sm !text-white/50">-</td>
|
|
310
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
311
|
-
All standard SVG element props
|
|
312
|
-
</td>
|
|
313
|
-
</tr>
|
|
314
|
-
</tbody>
|
|
315
|
-
</table>
|
|
316
|
-
</div>
|
|
317
|
-
</div>
|
|
318
|
-
|
|
319
|
-
{/* Size Variations */}
|
|
320
|
-
<div className="!space-y-8">
|
|
321
|
-
<h2 className="text-center text-3xl font-bold !text-white">
|
|
322
|
-
Size Variations
|
|
323
|
-
</h2>
|
|
324
|
-
<div className="rounded-lg border border-white/10 bg-white/5 p-8">
|
|
325
|
-
<div className="!space-y-6">
|
|
326
|
-
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
|
|
327
|
-
<div className="!space-y-4">
|
|
328
|
-
<h3 className="text-lg font-semibold !text-indigo-300">
|
|
329
|
-
Standard Sizes
|
|
330
|
-
</h3>
|
|
331
|
-
<div className="flex items-end gap-6 rounded-lg bg-black/20 p-6">
|
|
332
|
-
<div className="text-center">
|
|
333
|
-
<PencilIcon className="!mx-auto mb-2 h-3 w-3 text-indigo-400" />
|
|
334
|
-
<span className="text-xs text-white/60">12px</span>
|
|
335
|
-
</div>
|
|
336
|
-
<div className="text-center">
|
|
337
|
-
<PencilIcon className="!mx-auto mb-2 h-4 w-4 text-indigo-400" />
|
|
338
|
-
<span className="text-xs text-white/60">16px</span>
|
|
339
|
-
</div>
|
|
340
|
-
<div className="text-center">
|
|
341
|
-
<PencilIcon className="!mx-auto mb-2 h-5 w-5 text-indigo-400" />
|
|
342
|
-
<span className="text-xs text-white/60">20px</span>
|
|
343
|
-
</div>
|
|
344
|
-
<div className="text-center">
|
|
345
|
-
<PencilIcon className="!mx-auto mb-2 h-6 w-6 text-indigo-400" />
|
|
346
|
-
<span className="text-xs text-white/60">24px</span>
|
|
347
|
-
</div>
|
|
348
|
-
<div className="text-center">
|
|
349
|
-
<PencilIcon className="!mx-auto mb-2 h-8 w-8 text-indigo-400" />
|
|
350
|
-
<span className="text-xs text-white/60">32px</span>
|
|
351
|
-
</div>
|
|
352
|
-
<div className="text-center">
|
|
353
|
-
<PencilIcon className="!mx-auto mb-2 h-12 w-12 text-indigo-400" />
|
|
354
|
-
<span className="text-xs text-white/60">48px</span>
|
|
355
|
-
</div>
|
|
356
|
-
</div>
|
|
357
|
-
</div>
|
|
358
|
-
|
|
359
|
-
<div className="!space-y-4">
|
|
360
|
-
<h3 className="text-lg font-semibold !text-indigo-300">
|
|
361
|
-
Code Example
|
|
362
|
-
</h3>
|
|
363
|
-
<div className="rounded-lg bg-black/40 p-4">
|
|
364
|
-
<pre className="overflow-x-auto text-sm !text-cyan-300">
|
|
365
|
-
{`// Small (16px)
|
|
366
|
-
<PencilIcon className="h-4 w-4" />
|
|
367
|
-
|
|
368
|
-
// Medium (24px)
|
|
369
|
-
<PencilIcon className="h-6 w-6" />
|
|
370
|
-
|
|
371
|
-
// Large (32px)
|
|
372
|
-
<PencilIcon className="h-8 w-8" />
|
|
373
|
-
|
|
374
|
-
// Custom size with props
|
|
375
|
-
<PencilIcon width={40} height={40} />`}
|
|
376
|
-
</pre>
|
|
377
|
-
</div>
|
|
378
|
-
</div>
|
|
379
|
-
</div>
|
|
380
|
-
</div>
|
|
381
|
-
</div>
|
|
382
|
-
</div>
|
|
383
|
-
|
|
384
|
-
{/* Color Variations */}
|
|
385
|
-
<div className="!space-y-8">
|
|
386
|
-
<h2 className="text-center text-3xl font-bold !text-white">
|
|
387
|
-
Color Variations
|
|
388
|
-
</h2>
|
|
389
|
-
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
390
|
-
<div className="!space-y-4">
|
|
391
|
-
<h3 className="text-lg font-semibold !text-indigo-300">
|
|
392
|
-
Semantic Colors
|
|
393
|
-
</h3>
|
|
394
|
-
<div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
395
|
-
<div className="flex items-center gap-4">
|
|
396
|
-
<PencilIcon className="h-6 w-6 text-indigo-400" />
|
|
397
|
-
<div>
|
|
398
|
-
<div className="text-sm font-medium text-white">
|
|
399
|
-
Primary Edit
|
|
400
|
-
</div>
|
|
401
|
-
<div className="text-xs text-white/60">
|
|
402
|
-
text-indigo-400
|
|
403
|
-
</div>
|
|
404
|
-
</div>
|
|
405
|
-
</div>
|
|
406
|
-
<div className="flex items-center gap-4">
|
|
407
|
-
<PencilIcon className="h-6 w-6 text-purple-400" />
|
|
408
|
-
<div>
|
|
409
|
-
<div className="text-sm font-medium text-white">
|
|
410
|
-
Creative
|
|
411
|
-
</div>
|
|
412
|
-
<div className="text-xs text-white/60">
|
|
413
|
-
text-purple-400
|
|
414
|
-
</div>
|
|
415
|
-
</div>
|
|
416
|
-
</div>
|
|
417
|
-
<div className="flex items-center gap-4">
|
|
418
|
-
<PencilIcon className="h-6 w-6 text-blue-400" />
|
|
419
|
-
<div>
|
|
420
|
-
<div className="text-sm font-medium text-white">
|
|
421
|
-
Information
|
|
422
|
-
</div>
|
|
423
|
-
<div className="text-xs text-white/60">
|
|
424
|
-
text-blue-400
|
|
425
|
-
</div>
|
|
426
|
-
</div>
|
|
427
|
-
</div>
|
|
428
|
-
<div className="flex items-center gap-4">
|
|
429
|
-
<PencilIcon className="h-6 w-6 text-gray-400" />
|
|
430
|
-
<div>
|
|
431
|
-
<div className="text-sm font-medium text-white">
|
|
432
|
-
Disabled
|
|
433
|
-
</div>
|
|
434
|
-
<div className="text-xs text-white/60">
|
|
435
|
-
text-gray-400
|
|
436
|
-
</div>
|
|
437
|
-
</div>
|
|
438
|
-
</div>
|
|
439
|
-
</div>
|
|
440
|
-
</div>
|
|
441
|
-
|
|
442
|
-
<div className="!space-y-4">
|
|
443
|
-
<h3 className="text-lg font-semibold !text-indigo-300">
|
|
444
|
-
Custom Colors
|
|
445
|
-
</h3>
|
|
446
|
-
<div className="rounded-lg bg-black/40 p-4">
|
|
447
|
-
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
448
|
-
{`// Using Tailwind classes
|
|
449
|
-
<PencilIcon className="h-6 w-6 text-indigo-400" />
|
|
450
|
-
<PencilIcon className="h-6 w-6 text-purple-500" />
|
|
451
|
-
|
|
452
|
-
// Using CSS custom properties
|
|
453
|
-
<PencilIcon
|
|
454
|
-
className="h-6 w-6"
|
|
455
|
-
style={{ color: 'var(--color-primary)' }}
|
|
456
|
-
/>
|
|
457
|
-
|
|
458
|
-
// Direct stroke prop
|
|
459
|
-
<PencilIcon
|
|
460
|
-
width={24}
|
|
461
|
-
height={24}
|
|
462
|
-
stroke="#6366f1"
|
|
463
|
-
/>`}
|
|
464
|
-
</pre>
|
|
465
|
-
</div>
|
|
466
|
-
</div>
|
|
467
|
-
</div>
|
|
468
|
-
</div>
|
|
469
|
-
|
|
470
|
-
{/* Usage Examples */}
|
|
471
|
-
<div className="!space-y-8">
|
|
472
|
-
<h2 className="text-center text-3xl font-bold !text-white">
|
|
473
|
-
Usage Examples
|
|
474
|
-
</h2>
|
|
475
|
-
|
|
476
|
-
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
477
|
-
{/* Edit Button */}
|
|
478
|
-
<div className="!space-y-4">
|
|
479
|
-
<h3 className="text-lg font-semibold !text-indigo-300">
|
|
480
|
-
Edit Button
|
|
481
|
-
</h3>
|
|
482
|
-
<div className="!space-y-4">
|
|
483
|
-
<div className="flex gap-4">
|
|
484
|
-
<button className="flex items-center gap-2 rounded-lg border border-indigo-500/30 bg-indigo-500/20 px-4 py-2 text-indigo-200 transition-colors hover:bg-indigo-500/30">
|
|
485
|
-
<PencilIcon className="h-4 w-4" />
|
|
486
|
-
Edit Profile
|
|
487
|
-
</button>
|
|
488
|
-
<button className="flex items-center gap-2 rounded-lg border border-purple-500/30 bg-purple-500/20 px-4 py-2 text-purple-200 transition-colors hover:bg-purple-500/30">
|
|
489
|
-
<PencilIcon className="h-4 w-4" />
|
|
490
|
-
Edit Post
|
|
491
|
-
</button>
|
|
492
|
-
</div>
|
|
493
|
-
<div className="rounded-lg bg-black/40 p-4">
|
|
494
|
-
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
495
|
-
{`<button className="flex items-center gap-2 bg-indigo-500/20 border border-indigo-500/30 px-4 py-2 rounded-lg">
|
|
496
|
-
<PencilIcon className="h-4 w-4" />
|
|
497
|
-
Edit Profile
|
|
498
|
-
</button>
|
|
499
|
-
|
|
500
|
-
<button className="flex items-center gap-2 bg-purple-500/20 border border-purple-500/30 px-4 py-2 rounded-lg">
|
|
501
|
-
<PencilIcon className="h-4 w-4" />
|
|
502
|
-
Edit Post
|
|
503
|
-
</button>`}
|
|
504
|
-
</pre>
|
|
505
|
-
</div>
|
|
506
|
-
</div>
|
|
507
|
-
</div>
|
|
508
|
-
|
|
509
|
-
{/* Inline Edit */}
|
|
510
|
-
<div className="!space-y-4">
|
|
511
|
-
<h3 className="text-lg font-semibold !text-indigo-300">
|
|
512
|
-
Inline Edit
|
|
513
|
-
</h3>
|
|
514
|
-
<div className="!space-y-4">
|
|
515
|
-
<div className="!space-y-3">
|
|
516
|
-
<div className="group flex items-center gap-3 rounded-lg border border-white/10 bg-white/5 p-3">
|
|
517
|
-
<span className="flex-1 text-white">
|
|
518
|
-
Profile Name
|
|
519
|
-
</span>
|
|
520
|
-
<button className="rounded p-1 text-white/60 opacity-0 transition-all group-hover:opacity-100 hover:bg-white/10 hover:text-indigo-400">
|
|
521
|
-
<PencilIcon className="h-4 w-4" />
|
|
522
|
-
</button>
|
|
523
|
-
</div>
|
|
524
|
-
<div className="group flex items-center gap-3 rounded-lg border border-white/10 bg-white/5 p-3">
|
|
525
|
-
<span className="flex-1 text-white">
|
|
526
|
-
Email Address
|
|
527
|
-
</span>
|
|
528
|
-
<button className="rounded p-1 text-white/60 opacity-0 transition-all group-hover:opacity-100 hover:bg-white/10 hover:text-indigo-400">
|
|
529
|
-
<PencilIcon className="h-4 w-4" />
|
|
530
|
-
</button>
|
|
531
|
-
</div>
|
|
532
|
-
</div>
|
|
533
|
-
<div className="rounded-lg bg-black/40 p-4">
|
|
534
|
-
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
535
|
-
{`<div className="group flex items-center gap-3 rounded-lg border border-white/10 bg-white/5 p-3">
|
|
536
|
-
<span className="flex-1 text-white">Profile Name</span>
|
|
537
|
-
<button className="rounded p-1 text-white/60 opacity-0 transition-all group-hover:opacity-100 hover:bg-white/10 hover:text-indigo-400">
|
|
538
|
-
<PencilIcon className="h-4 w-4" />
|
|
539
|
-
</button>
|
|
540
|
-
</div>`}
|
|
541
|
-
</pre>
|
|
542
|
-
</div>
|
|
543
|
-
</div>
|
|
544
|
-
</div>
|
|
545
|
-
|
|
546
|
-
{/* Content Editor */}
|
|
547
|
-
<div className="!space-y-4">
|
|
548
|
-
<h3 className="text-lg font-semibold !text-indigo-300">
|
|
549
|
-
Content Editor Toolbar
|
|
550
|
-
</h3>
|
|
551
|
-
<div className="!space-y-4">
|
|
552
|
-
<div className="flex items-center gap-2 rounded-lg border border-white/10 bg-white/5 p-2">
|
|
553
|
-
<button className="rounded p-2 text-white/60 hover:bg-white/10 hover:text-indigo-400">
|
|
554
|
-
<PencilIcon className="h-4 w-4" />
|
|
555
|
-
</button>
|
|
556
|
-
<div className="h-6 w-px bg-white/20" />
|
|
557
|
-
<button className="rounded p-2 text-white/60 hover:bg-white/10 hover:text-white">
|
|
558
|
-
<span className="text-sm font-bold">B</span>
|
|
559
|
-
</button>
|
|
560
|
-
<button className="rounded p-2 text-white/60 hover:bg-white/10 hover:text-white">
|
|
561
|
-
<span className="text-sm italic">I</span>
|
|
562
|
-
</button>
|
|
563
|
-
<button className="rounded p-2 text-white/60 hover:bg-white/10 hover:text-white">
|
|
564
|
-
<span className="text-sm underline">U</span>
|
|
565
|
-
</button>
|
|
566
|
-
</div>
|
|
567
|
-
<div className="rounded-lg bg-black/40 p-4">
|
|
568
|
-
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
569
|
-
{`<div className="flex items-center gap-2 rounded-lg border border-white/10 bg-white/5 p-2">
|
|
570
|
-
<button className="rounded p-2 text-white/60 hover:bg-white/10 hover:text-indigo-400">
|
|
571
|
-
<PencilIcon className="h-4 w-4" />
|
|
572
|
-
</button>
|
|
573
|
-
<div className="h-6 w-px bg-white/20" />
|
|
574
|
-
{/* Other toolbar buttons */}
|
|
575
|
-
</div>`}
|
|
576
|
-
</pre>
|
|
577
|
-
</div>
|
|
578
|
-
</div>
|
|
579
|
-
</div>
|
|
580
|
-
|
|
581
|
-
{/* Note Taking */}
|
|
582
|
-
<div className="!space-y-4">
|
|
583
|
-
<h3 className="text-lg font-semibold !text-indigo-300">
|
|
584
|
-
Note Taking Interface
|
|
585
|
-
</h3>
|
|
586
|
-
<div className="!space-y-4">
|
|
587
|
-
<div className="rounded-lg border border-white/10 bg-white/5 p-4">
|
|
588
|
-
<div className="!mb-3 flex items-center justify-between">
|
|
589
|
-
<h4 className="font-medium !text-white">
|
|
590
|
-
Quick Notes
|
|
591
|
-
</h4>
|
|
592
|
-
<button className="flex items-center gap-2 rounded border border-indigo-500/30 bg-indigo-500/20 px-3 py-1 text-sm text-indigo-200 transition-colors hover:bg-indigo-500/30">
|
|
593
|
-
<PencilIcon className="h-3 w-3" />
|
|
594
|
-
New Note
|
|
595
|
-
</button>
|
|
596
|
-
</div>
|
|
597
|
-
<div className="!space-y-2">
|
|
598
|
-
<div className="flex items-center gap-3 rounded border border-white/10 bg-white/5 p-3">
|
|
599
|
-
<PencilIcon className="h-4 w-4 text-purple-400" />
|
|
600
|
-
<span className="flex-1 text-white/80">
|
|
601
|
-
Meeting notes for Q4 planning
|
|
602
|
-
</span>
|
|
603
|
-
</div>
|
|
604
|
-
<div className="flex items-center gap-3 rounded border border-white/10 bg-white/5 p-3">
|
|
605
|
-
<PencilIcon className="h-4 w-4 text-blue-400" />
|
|
606
|
-
<span className="flex-1 text-white/80">
|
|
607
|
-
Project ideas and sketches
|
|
608
|
-
</span>
|
|
609
|
-
</div>
|
|
610
|
-
</div>
|
|
611
|
-
</div>
|
|
612
|
-
<div className="rounded-lg bg-black/40 p-4">
|
|
613
|
-
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
614
|
-
{`<button className="flex items-center gap-2 rounded border border-indigo-500/30 bg-indigo-500/20 px-3 py-1 text-sm">
|
|
615
|
-
<PencilIcon className="h-3 w-3" />
|
|
616
|
-
New Note
|
|
617
|
-
</button>
|
|
618
|
-
|
|
619
|
-
<div className="flex items-center gap-3 rounded border border-white/10 bg-white/5 p-3">
|
|
620
|
-
<PencilIcon className="h-4 w-4 text-purple-400" />
|
|
621
|
-
<span className="flex-1">Meeting notes for Q4 planning</span>
|
|
622
|
-
</div>`}
|
|
623
|
-
</pre>
|
|
624
|
-
</div>
|
|
625
|
-
</div>
|
|
626
|
-
</div>
|
|
627
|
-
</div>
|
|
628
|
-
</div>
|
|
629
|
-
|
|
630
|
-
{/* Interactive States */}
|
|
631
|
-
<div className="!space-y-8">
|
|
632
|
-
<h2 className="text-center text-3xl font-bold !text-white">
|
|
633
|
-
Interactive States & Animations
|
|
634
|
-
</h2>
|
|
635
|
-
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
636
|
-
<div className="!space-y-4">
|
|
637
|
-
<h3 className="text-lg font-semibold !text-indigo-300">
|
|
638
|
-
Hover & Animation Effects
|
|
639
|
-
</h3>
|
|
640
|
-
<div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
641
|
-
<div className="flex items-center gap-4">
|
|
642
|
-
<PencilIcon className="h-6 w-6 text-white/60 transition-colors hover:text-indigo-400" />
|
|
643
|
-
<div>
|
|
644
|
-
<div className="text-sm font-medium text-white">
|
|
645
|
-
Color Change
|
|
646
|
-
</div>
|
|
647
|
-
<div className="text-xs text-white/60">
|
|
648
|
-
Hover to see effect
|
|
649
|
-
</div>
|
|
650
|
-
</div>
|
|
651
|
-
</div>
|
|
652
|
-
<div className="flex items-center gap-4">
|
|
653
|
-
<PencilIcon className="h-6 w-6 text-white transition-transform hover:scale-125" />
|
|
654
|
-
<div>
|
|
655
|
-
<div className="text-sm font-medium text-white">
|
|
656
|
-
Scale Up
|
|
657
|
-
</div>
|
|
658
|
-
<div className="text-xs text-white/60">
|
|
659
|
-
Scale on hover
|
|
660
|
-
</div>
|
|
661
|
-
</div>
|
|
662
|
-
</div>
|
|
663
|
-
<div className="flex items-center gap-4">
|
|
664
|
-
<PencilIcon className="animate-edit-pulse h-6 w-6 text-indigo-400" />
|
|
665
|
-
<div>
|
|
666
|
-
<div className="text-sm font-medium text-white">
|
|
667
|
-
Edit Pulse
|
|
668
|
-
</div>
|
|
669
|
-
<div className="text-xs text-white/60">
|
|
670
|
-
Continuous animation
|
|
671
|
-
</div>
|
|
672
|
-
</div>
|
|
673
|
-
</div>
|
|
674
|
-
<div className="flex items-center gap-4">
|
|
675
|
-
<PencilIcon className="animate-pencil-draw h-6 w-6 text-purple-400" />
|
|
676
|
-
<div>
|
|
677
|
-
<div className="text-sm font-medium text-white">
|
|
678
|
-
Drawing Motion
|
|
679
|
-
</div>
|
|
680
|
-
<div className="text-xs text-white/60">
|
|
681
|
-
Writing animation
|
|
682
|
-
</div>
|
|
683
|
-
</div>
|
|
684
|
-
</div>
|
|
685
|
-
</div>
|
|
686
|
-
</div>
|
|
687
|
-
|
|
688
|
-
<div className="!space-y-4">
|
|
689
|
-
<h3 className="text-lg font-semibold !text-indigo-300">
|
|
690
|
-
State Examples
|
|
691
|
-
</h3>
|
|
692
|
-
<div className="rounded-lg bg-black/40 p-4">
|
|
693
|
-
<pre className="overflow-x-auto text-sm !text-cyan-300">
|
|
694
|
-
{`// Color change on hover
|
|
695
|
-
<PencilIcon className="h-6 w-6 text-white/60 transition-colors hover:text-indigo-400" />
|
|
696
|
-
|
|
697
|
-
// Scale up on hover
|
|
698
|
-
<PencilIcon className="h-6 w-6 text-white transition-transform hover:scale-125" />
|
|
699
|
-
|
|
700
|
-
// Active editing state
|
|
701
|
-
<PencilIcon className="h-6 w-6 text-indigo-400 animate-pulse" />
|
|
702
|
-
|
|
703
|
-
// Writing animation
|
|
704
|
-
<PencilIcon className="h-6 w-6 text-purple-400 animate-pencil-draw" />
|
|
705
|
-
|
|
706
|
-
// Disabled state
|
|
707
|
-
<PencilIcon className="h-6 w-6 text-gray-400 opacity-50" />`}
|
|
708
|
-
</pre>
|
|
709
|
-
</div>
|
|
710
|
-
</div>
|
|
711
|
-
</div>
|
|
712
|
-
</div>
|
|
713
|
-
|
|
714
|
-
{/* Accessibility */}
|
|
715
|
-
<div className="!space-y-8">
|
|
716
|
-
<h2 className="text-center text-3xl font-bold !text-white">
|
|
717
|
-
Accessibility Features
|
|
718
|
-
</h2>
|
|
719
|
-
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
|
|
720
|
-
<div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
721
|
-
<h3 className="text-lg font-semibold !text-green-300">
|
|
722
|
-
✅ Built-in Features
|
|
723
|
-
</h3>
|
|
724
|
-
<ul className="!space-y-2 text-sm !text-white/70">
|
|
725
|
-
<li className="!text-white/70">
|
|
726
|
-
Uses Radix UI AccessibleIcon wrapper
|
|
727
|
-
</li>
|
|
728
|
-
<li className="!text-white/70">
|
|
729
|
-
Provides screen reader label "Pencil icon"
|
|
730
|
-
</li>
|
|
731
|
-
<li className="!text-white/70">
|
|
732
|
-
Supports keyboard navigation when interactive
|
|
733
|
-
</li>
|
|
734
|
-
<li className="!text-white/70">
|
|
735
|
-
Maintains proper color contrast ratios
|
|
736
|
-
</li>
|
|
737
|
-
<li className="!text-white/70">
|
|
738
|
-
Scales with user's font size preferences
|
|
739
|
-
</li>
|
|
740
|
-
</ul>
|
|
741
|
-
</div>
|
|
742
|
-
|
|
743
|
-
<div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
744
|
-
<h3 className="text-lg font-semibold !text-indigo-300">
|
|
745
|
-
💡 Best Practices
|
|
746
|
-
</h3>
|
|
747
|
-
<ul className="!space-y-2 text-sm !text-white/70">
|
|
748
|
-
<li className="!text-white/70">
|
|
749
|
-
Always provide descriptive button labels
|
|
750
|
-
</li>
|
|
751
|
-
<li className="!text-white/70">
|
|
752
|
-
Use consistent placement for edit actions
|
|
753
|
-
</li>
|
|
754
|
-
<li className="!text-white/70">
|
|
755
|
-
Ensure sufficient click/touch target sizes
|
|
756
|
-
</li>
|
|
757
|
-
<li className="!text-white/70">
|
|
758
|
-
Add focus states for keyboard navigation
|
|
759
|
-
</li>
|
|
760
|
-
<li className="!text-white/70">
|
|
761
|
-
Consider motion sensitivity for animations
|
|
762
|
-
</li>
|
|
763
|
-
</ul>
|
|
764
|
-
</div>
|
|
765
|
-
</div>
|
|
766
|
-
|
|
767
|
-
<div className="rounded-lg border border-white/10 bg-white/5 p-6">
|
|
768
|
-
<h3 className="mb-4 text-lg font-semibold !text-purple-300">
|
|
769
|
-
Custom Accessibility Implementation
|
|
770
|
-
</h3>
|
|
771
|
-
<div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
|
|
772
|
-
<div className="rounded-lg bg-black/40 p-4">
|
|
773
|
-
<pre className="overflow-x-auto text-sm !text-cyan-300">
|
|
774
|
-
{`// Edit button with proper ARIA
|
|
775
|
-
<button
|
|
776
|
-
aria-label="Edit profile information"
|
|
777
|
-
className="flex items-center gap-2 p-2"
|
|
778
|
-
>
|
|
779
|
-
<PencilIcon className="h-4 w-4" />
|
|
780
|
-
<span className="sr-only">Edit</span>
|
|
781
|
-
</button>
|
|
782
|
-
|
|
783
|
-
// Inline edit with context
|
|
784
|
-
<button
|
|
785
|
-
aria-label="Edit email address"
|
|
786
|
-
onClick={startEditing}
|
|
787
|
-
className="rounded p-1"
|
|
788
|
-
>
|
|
789
|
-
<PencilIcon
|
|
790
|
-
className="h-4 w-4"
|
|
791
|
-
aria-hidden="true"
|
|
792
|
-
/>
|
|
793
|
-
</button>
|
|
794
|
-
|
|
795
|
-
// Content editor toolbar
|
|
796
|
-
<button
|
|
797
|
-
aria-label="Edit text content"
|
|
798
|
-
aria-describedby="editor-help"
|
|
799
|
-
className="rounded p-2"
|
|
800
|
-
>
|
|
801
|
-
<PencilIcon className="h-4 w-4" />
|
|
802
|
-
</button>
|
|
803
|
-
<div id="editor-help" className="sr-only">
|
|
804
|
-
Opens rich text editor for content modification
|
|
805
|
-
</div>`}
|
|
806
|
-
</pre>
|
|
807
|
-
</div>
|
|
808
|
-
<div className="!space-y-4">
|
|
809
|
-
<p className="text-sm !text-white/70">
|
|
810
|
-
When using PencilIcon for editing functionality, provide
|
|
811
|
-
clear context about what will be edited and any related
|
|
812
|
-
actions.
|
|
813
|
-
</p>
|
|
814
|
-
<div className="rounded-lg border border-indigo-500/20 bg-indigo-500/10 p-4">
|
|
815
|
-
<div className="flex items-center gap-2 text-sm text-indigo-200">
|
|
816
|
-
<PencilIcon className="h-4 w-4" />
|
|
817
|
-
<span>
|
|
818
|
-
This approach gives screen readers clear context
|
|
819
|
-
about the edit functionality
|
|
820
|
-
</span>
|
|
821
|
-
</div>
|
|
822
|
-
</div>
|
|
823
|
-
</div>
|
|
824
|
-
</div>
|
|
825
|
-
</div>
|
|
826
|
-
</div>
|
|
827
|
-
|
|
828
|
-
{/* Related Icons */}
|
|
829
|
-
<div className="!space-y-8">
|
|
830
|
-
<h2 className="text-center text-3xl font-bold !text-white">
|
|
831
|
-
Related Icons
|
|
832
|
-
</h2>
|
|
833
|
-
<div className="grid grid-cols-2 gap-6 md:grid-cols-4">
|
|
834
|
-
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
835
|
-
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-green-500/20">
|
|
836
|
-
<span className="text-2xl">💾</span>
|
|
837
|
-
</div>
|
|
838
|
-
<div>
|
|
839
|
-
<div className="font-medium text-white">SaveIcon</div>
|
|
840
|
-
<div className="text-xs text-white/60">Save changes</div>
|
|
841
|
-
</div>
|
|
842
|
-
</div>
|
|
843
|
-
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
844
|
-
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-red-500/20">
|
|
845
|
-
<span className="text-2xl">🗑️</span>
|
|
846
|
-
</div>
|
|
847
|
-
<div>
|
|
848
|
-
<div className="font-medium text-white">DeleteIcon</div>
|
|
849
|
-
<div className="text-xs text-white/60">
|
|
850
|
-
Remove content
|
|
851
|
-
</div>
|
|
852
|
-
</div>
|
|
853
|
-
</div>
|
|
854
|
-
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
855
|
-
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-blue-500/20">
|
|
856
|
-
<span className="text-2xl">📋</span>
|
|
857
|
-
</div>
|
|
858
|
-
<div>
|
|
859
|
-
<div className="font-medium text-white">CopyIcon</div>
|
|
860
|
-
<div className="text-xs text-white/60">
|
|
861
|
-
Duplicate content
|
|
862
|
-
</div>
|
|
863
|
-
</div>
|
|
864
|
-
</div>
|
|
865
|
-
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
866
|
-
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-orange-500/20">
|
|
867
|
-
<span className="text-2xl">📝</span>
|
|
868
|
-
</div>
|
|
869
|
-
<div>
|
|
870
|
-
<div className="font-medium text-white">NoteIcon</div>
|
|
871
|
-
<div className="text-xs text-white/60">Create notes</div>
|
|
872
|
-
</div>
|
|
873
|
-
</div>
|
|
874
|
-
</div>
|
|
875
|
-
</div>
|
|
876
|
-
</div>
|
|
877
|
-
|
|
878
|
-
{/* Footer */}
|
|
879
|
-
<div className="border-t border-white/10 bg-black/20 backdrop-blur-xl">
|
|
880
|
-
<div className="!mx-auto max-w-7xl px-6 py-8">
|
|
881
|
-
<div className="!space-y-4 text-center">
|
|
882
|
-
<p className="!text-white/60">
|
|
883
|
-
PencilIcon is part of the Aural UI icon library, built for
|
|
884
|
-
editing, writing, and content modification interfaces.
|
|
885
|
-
</p>
|
|
886
|
-
<p className="text-sm !text-white/40">
|
|
887
|
-
All icons use Radix UI's AccessibleIcon for screen reader
|
|
888
|
-
compatibility and follow WCAG guidelines for interactive
|
|
889
|
-
elements.
|
|
890
|
-
</p>
|
|
891
|
-
</div>
|
|
892
|
-
</div>
|
|
893
|
-
</div>
|
|
894
|
-
</div>
|
|
895
|
-
</>
|
|
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
|
+
/>
|
|
896
85
|
),
|
|
897
86
|
},
|
|
898
87
|
},
|
|
899
88
|
tags: ["autodocs"],
|
|
900
89
|
argTypes: {
|
|
901
|
-
|
|
902
|
-
control:
|
|
903
|
-
description: "
|
|
90
|
+
className: {
|
|
91
|
+
control: "text",
|
|
92
|
+
description: "CSS classes including color token",
|
|
904
93
|
},
|
|
905
94
|
withAccessibility: {
|
|
906
95
|
control: "boolean",
|
|
907
|
-
description: "
|
|
908
|
-
},
|
|
909
|
-
height: {
|
|
910
|
-
control: { type: "range", min: 8, max: 96, step: 2 },
|
|
911
|
-
description: "Height of the icon in pixels",
|
|
912
|
-
},
|
|
913
|
-
stroke: {
|
|
914
|
-
control: "color",
|
|
915
|
-
description: "Stroke color of the pencil outline",
|
|
916
|
-
},
|
|
917
|
-
strokeWidth: {
|
|
918
|
-
control: { type: "range", min: 0.5, max: 4, step: 0.5 },
|
|
919
|
-
description: "Thickness of the stroke lines",
|
|
920
|
-
},
|
|
921
|
-
strokeLinecap: {
|
|
922
|
-
control: "select",
|
|
923
|
-
options: ["butt", "round", "square"],
|
|
924
|
-
description: "Style of line endings",
|
|
925
|
-
},
|
|
926
|
-
className: {
|
|
927
|
-
control: "text",
|
|
928
|
-
description: "CSS classes for styling",
|
|
96
|
+
description: "Wrap with accessibility label",
|
|
929
97
|
},
|
|
930
98
|
},
|
|
931
99
|
}
|
|
@@ -933,207 +101,84 @@ function EditButton() {
|
|
|
933
101
|
export default meta
|
|
934
102
|
type Story = StoryObj<typeof PencilIcon>
|
|
935
103
|
|
|
936
|
-
// Story parameters for consistent dark theme
|
|
937
|
-
const storyParameters = {
|
|
938
|
-
backgrounds: {
|
|
939
|
-
default: "dark",
|
|
940
|
-
values: [
|
|
941
|
-
{ name: "dark", value: "#0a0a0a" },
|
|
942
|
-
{ name: "darker", value: "#000000" },
|
|
943
|
-
],
|
|
944
|
-
},
|
|
945
|
-
}
|
|
946
|
-
|
|
947
104
|
export const Default: Story = {
|
|
948
105
|
args: {
|
|
949
|
-
|
|
950
|
-
height: 24,
|
|
951
|
-
className: "text-indigo-400",
|
|
106
|
+
className: "h-6 w-6 text-fm-icon-active",
|
|
952
107
|
withAccessibility: true,
|
|
953
108
|
},
|
|
954
|
-
parameters: storyParameters,
|
|
955
109
|
render: (args) => (
|
|
956
|
-
<
|
|
110
|
+
<IconDefaultCanvas>
|
|
957
111
|
<PencilIcon {...args} />
|
|
958
|
-
</
|
|
112
|
+
</IconDefaultCanvas>
|
|
959
113
|
),
|
|
960
114
|
}
|
|
961
115
|
|
|
962
116
|
export const SizeVariations: Story = {
|
|
963
|
-
|
|
964
|
-
...storyParameters,
|
|
965
|
-
docs: {
|
|
966
|
-
description: {
|
|
967
|
-
story:
|
|
968
|
-
"PencilIcon in different sizes, from small UI elements to large editing interfaces.",
|
|
969
|
-
},
|
|
970
|
-
},
|
|
971
|
-
},
|
|
972
|
-
render: () => (
|
|
973
|
-
<div className="flex h-64 min-h-dvh items-center justify-center gap-8 rounded-lg bg-gradient-to-br from-gray-900 to-gray-800 p-8">
|
|
974
|
-
<div className="text-center">
|
|
975
|
-
<PencilIcon className="!mx-auto mb-2 h-3 w-3 text-indigo-400" />
|
|
976
|
-
<span className="text-xs text-white/60">12px</span>
|
|
977
|
-
</div>
|
|
978
|
-
<div className="text-center">
|
|
979
|
-
<PencilIcon className="!mx-auto mb-2 h-4 w-4 text-indigo-400" />
|
|
980
|
-
<span className="text-xs text-white/60">16px</span>
|
|
981
|
-
</div>
|
|
982
|
-
<div className="text-center">
|
|
983
|
-
<PencilIcon className="!mx-auto mb-2 h-5 w-5 text-indigo-400" />
|
|
984
|
-
<span className="text-xs text-white/60">20px</span>
|
|
985
|
-
</div>
|
|
986
|
-
<div className="text-center">
|
|
987
|
-
<PencilIcon className="!mx-auto mb-2 h-6 w-6 text-indigo-400" />
|
|
988
|
-
<span className="text-xs text-white/60">24px</span>
|
|
989
|
-
</div>
|
|
990
|
-
<div className="text-center">
|
|
991
|
-
<PencilIcon className="!mx-auto mb-2 h-8 w-8 text-indigo-400" />
|
|
992
|
-
<span className="text-xs text-white/60">32px</span>
|
|
993
|
-
</div>
|
|
994
|
-
<div className="text-center">
|
|
995
|
-
<PencilIcon className="!mx-auto mb-2 h-12 w-12 text-indigo-400" />
|
|
996
|
-
<span className="text-xs text-white/60">48px</span>
|
|
997
|
-
</div>
|
|
998
|
-
</div>
|
|
999
|
-
),
|
|
117
|
+
render: () => <IconSizeVariations icon={PencilIcon} />,
|
|
1000
118
|
}
|
|
1001
119
|
|
|
1002
120
|
export const ColorVariations: Story = {
|
|
1003
|
-
|
|
1004
|
-
...storyParameters,
|
|
1005
|
-
docs: {
|
|
1006
|
-
description: {
|
|
1007
|
-
story:
|
|
1008
|
-
"PencilIcon in different colors for various editing and writing contexts.",
|
|
1009
|
-
},
|
|
1010
|
-
},
|
|
1011
|
-
},
|
|
1012
|
-
render: () => (
|
|
1013
|
-
<div className="grid min-h-dvh grid-cols-2 items-center justify-center gap-6 rounded-lg bg-gradient-to-br from-gray-900 to-gray-800 p-8 md:grid-cols-4">
|
|
1014
|
-
<div className="text-center">
|
|
1015
|
-
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-indigo-500/30 bg-indigo-500/20">
|
|
1016
|
-
<PencilIcon className="h-8 w-8 text-indigo-400" />
|
|
1017
|
-
</div>
|
|
1018
|
-
<div className="text-sm font-medium text-white">Primary</div>
|
|
1019
|
-
<div className="text-xs text-indigo-400">text-indigo-400</div>
|
|
1020
|
-
</div>
|
|
1021
|
-
<div className="text-center">
|
|
1022
|
-
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-purple-500/30 bg-purple-500/20">
|
|
1023
|
-
<PencilIcon className="h-8 w-8 text-purple-400" />
|
|
1024
|
-
</div>
|
|
1025
|
-
<div className="text-sm font-medium text-white">Creative</div>
|
|
1026
|
-
<div className="text-xs text-purple-400">text-purple-400</div>
|
|
1027
|
-
</div>
|
|
1028
|
-
<div className="text-center">
|
|
1029
|
-
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-blue-500/30 bg-blue-500/20">
|
|
1030
|
-
<PencilIcon className="h-8 w-8 text-blue-400" />
|
|
1031
|
-
</div>
|
|
1032
|
-
<div className="text-sm font-medium text-white">Information</div>
|
|
1033
|
-
<div className="text-xs text-blue-400">text-blue-400</div>
|
|
1034
|
-
</div>
|
|
1035
|
-
<div className="text-center">
|
|
1036
|
-
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-gray-500/30 bg-gray-500/20">
|
|
1037
|
-
<PencilIcon className="h-8 w-8 text-gray-400" />
|
|
1038
|
-
</div>
|
|
1039
|
-
<div className="text-sm font-medium text-white">Disabled</div>
|
|
1040
|
-
<div className="text-xs text-gray-400">text-gray-400</div>
|
|
1041
|
-
</div>
|
|
1042
|
-
</div>
|
|
1043
|
-
),
|
|
121
|
+
render: () => <IconColorVariations icon={PencilIcon} />,
|
|
1044
122
|
}
|
|
1045
123
|
|
|
1046
124
|
export const UsageExamples: Story = {
|
|
1047
|
-
parameters: {
|
|
1048
|
-
...storyParameters,
|
|
1049
|
-
docs: {
|
|
1050
|
-
description: {
|
|
1051
|
-
story:
|
|
1052
|
-
"Real-world usage examples showing PencilIcon in different UI contexts.",
|
|
1053
|
-
},
|
|
1054
|
-
},
|
|
1055
|
-
},
|
|
1056
125
|
render: () => (
|
|
1057
|
-
<
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
</button>
|
|
1066
|
-
<button className="flex items-center gap-2 rounded-lg border border-purple-500/30 bg-purple-500/20 px-4 py-2 text-purple-200 transition-colors hover:bg-purple-500/30">
|
|
1067
|
-
<PencilIcon className="h-4 w-4" />
|
|
1068
|
-
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" />
|
|
1069
134
|
</button>
|
|
1070
135
|
</div>
|
|
1071
|
-
</
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
<
|
|
1080
|
-
<PencilIcon className="h-4 w-4" />
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
<span className="flex-1 text-white">Email Address</span>
|
|
1085
|
-
<button className="rounded p-1 text-white/60 opacity-0 transition-all group-hover:opacity-100 hover:bg-white/10 hover:text-indigo-400">
|
|
1086
|
-
<PencilIcon className="h-4 w-4" />
|
|
1087
|
-
</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>
|
|
1088
149
|
</div>
|
|
150
|
+
<p className="text-fm-secondary font-fm-text text-xs">
|
|
151
|
+
The adventure begins...
|
|
152
|
+
</p>
|
|
1089
153
|
</div>
|
|
1090
|
-
</
|
|
154
|
+
</IconUsageSection>
|
|
1091
155
|
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
<
|
|
1099
|
-
<
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
</button>
|
|
1105
|
-
<button className="rounded p-2 text-white/60 hover:bg-white/10 hover:text-white">
|
|
1106
|
-
<span className="text-sm italic">I</span>
|
|
1107
|
-
</button>
|
|
1108
|
-
<button className="rounded p-2 text-white/60 hover:bg-white/10 hover:text-white">
|
|
1109
|
-
<span className="text-sm underline">U</span>
|
|
1110
|
-
</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>
|
|
1111
168
|
</div>
|
|
1112
|
-
</
|
|
1113
|
-
</
|
|
169
|
+
</IconUsageSection>
|
|
170
|
+
</IconUsageCanvas>
|
|
1114
171
|
),
|
|
1115
172
|
}
|
|
1116
173
|
|
|
1117
174
|
export const Playground: Story = {
|
|
1118
|
-
parameters: {
|
|
1119
|
-
...storyParameters,
|
|
1120
|
-
docs: {
|
|
1121
|
-
description: {
|
|
1122
|
-
story:
|
|
1123
|
-
"Interactive playground to experiment with different PencilIcon configurations.",
|
|
1124
|
-
},
|
|
1125
|
-
},
|
|
1126
|
-
},
|
|
1127
175
|
args: {
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
className: "text-indigo-400",
|
|
176
|
+
className: "h-8 w-8 text-fm-icon-active",
|
|
177
|
+
withAccessibility: true,
|
|
1131
178
|
},
|
|
1132
179
|
render: (args) => (
|
|
1133
|
-
<
|
|
1134
|
-
<
|
|
1135
|
-
|
|
1136
|
-
</div>
|
|
1137
|
-
</div>
|
|
180
|
+
<IconPlaygroundCanvas>
|
|
181
|
+
<PencilIcon {...args} />
|
|
182
|
+
</IconPlaygroundCanvas>
|
|
1138
183
|
),
|
|
1139
184
|
}
|