aural-ui 4.0.1 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -1
- package/dist/components/aspect-ratio/AspectRatio.stories.tsx +290 -1228
- package/dist/components/avatar/Avatar.stories.tsx +219 -235
- package/dist/components/badge/Badge.stories.tsx +379 -116
- package/dist/components/banner/Banner.stories.tsx +445 -391
- package/dist/components/breadcrumb/Breadcrumb.stories.tsx +453 -199
- package/dist/components/button/Button.stories.tsx +585 -230
- package/dist/components/card/Card.stories.tsx +619 -301
- package/dist/components/char-count/CharCount.stories.tsx +350 -248
- package/dist/components/checkbox/Checkbox.stories.tsx +309 -167
- package/dist/components/chip/Chip.stories.tsx +362 -168
- package/dist/components/circular-loader/CircularLoader.stories.tsx +221 -636
- package/dist/components/clamp-lines/ClampLines.stories.tsx +246 -117
- package/dist/components/collapsible/Collapsible.stories.tsx +391 -252
- package/dist/components/command/Command.stories.tsx +530 -867
- package/dist/components/dialog/Dialog.stories.tsx +501 -950
- package/dist/components/divider/Divider.stories.tsx +264 -527
- package/dist/components/dot-loader/DotLoader.stories.tsx +256 -257
- package/dist/components/drawer/Drawer.stories.tsx +659 -1023
- package/dist/components/dropdown/Dropdown.stories.tsx +643 -1028
- package/dist/components/form/Form.stories.tsx +560 -274
- package/dist/components/helper-text/HelperText.stories.tsx +199 -200
- package/dist/components/hover-card/HoverCard.stories.tsx +318 -1254
- package/dist/components/icon-button/IconButton.stories.tsx +837 -194
- package/dist/components/if-else/if-else.stories.tsx +370 -83
- package/dist/components/input/Input.stories.tsx +436 -368
- package/dist/components/label/Label.stories.tsx +156 -154
- package/dist/components/list/List.stories.tsx +484 -835
- package/dist/components/marquee/Marquee.stories.tsx +356 -712
- package/dist/components/otp-inputs/OtpInputs.stories.tsx +352 -422
- package/dist/components/overlay/Overlay.stories.tsx +452 -824
- package/dist/components/pagination/Pagination.stories.tsx +721 -210
- package/dist/components/popover/Popover.stories.tsx +481 -896
- package/dist/components/radio/Radio.stories.tsx +432 -124
- package/dist/components/resizable/Resizable.stories.tsx +495 -799
- package/dist/components/scroll-area/ScrollArea.stories.tsx +383 -1059
- package/dist/components/search/Search.stories.tsx +312 -595
- package/dist/components/select/Select.stories.tsx +684 -789
- package/dist/components/sheet/Sheet.stories.tsx +671 -950
- package/dist/components/skelton/Skelton.stories.tsx +230 -764
- package/dist/components/slider/Slider.stories.tsx +383 -760
- package/dist/components/stepper/Stepper.stories.tsx +371 -514
- package/dist/components/switch/Switch.stories.tsx +461 -208
- package/dist/components/switch-case/SwitchCase.stories.tsx +367 -188
- package/dist/components/table/Table.stories.tsx +770 -916
- package/dist/components/tabs/Tabs.stories.tsx +458 -1455
- package/dist/components/tag/Tag.stories.tsx +714 -542
- package/dist/components/textarea/TextArea.stories.tsx +621 -562
- package/dist/components/thumbnail-tags/ThumbnailTags.stories.tsx +228 -154
- package/dist/components/toast/Toast.stories.tsx +452 -1339
- package/dist/components/toggle/Toggle.stories.tsx +488 -931
- package/dist/components/tooltip/Tooltip.stories.tsx +344 -1388
- package/dist/components/typography/Typography.stories.tsx +406 -89
- package/dist/hooks/use-change-state/UseChangeState.stories.tsx +309 -606
- package/dist/hooks/use-previous/UsePrevious.stories.tsx +367 -917
- package/dist/hooks/use-standalone-pagination/UseStandalonePagination.stories.tsx +639 -867
- package/dist/icons/Icons.stories.tsx +0 -12
- package/dist/icons/ai-avatar-icon/AiAvatarIcon.stories.tsx +223 -1060
- package/dist/icons/alert-icon/AlertIcon.stories.tsx +106 -968
- package/dist/icons/all-icons.tsx +37 -16
- package/dist/icons/angle-down-icon/AngleDownIcon.stories.tsx +137 -1010
- package/dist/icons/apple-logo-icon/AppleLogoIcon.stories.tsx +145 -935
- package/dist/icons/arrow-box-left-icon/ArrowBoxLeftIcon.stories.tsx +132 -1046
- package/dist/icons/arrow-corner-up-left-icon/ArrowCornerUpLeftIcon.stories.tsx +134 -986
- package/dist/icons/arrow-corner-up-right-icon/ArrowCornerUpRightIcon.stories.tsx +135 -1028
- package/dist/icons/arrow-left-icon/ArrowLeftIcon.stories.tsx +133 -971
- package/dist/icons/arrow-right-icon/ArrowRightIcon.stories.tsx +145 -1123
- package/dist/icons/arrow-right-up-icon/ArrowRightUpIcon.stories.tsx +143 -1252
- package/dist/icons/art-board-icon/ArtBoardIcon.stories.tsx +123 -632
- package/dist/icons/audio-bar-icon/AudioBarIcon.stories.tsx +141 -1223
- package/dist/icons/backward-ten-seconds-icon/BackwardTenSecondsIcon.stories.tsx +164 -1018
- package/dist/icons/bubble-check-icon/BubbleCheckIcon.stories.tsx +121 -1236
- package/dist/icons/bubble-crossed-icon/BubbleCrossedIcon.stories.tsx +121 -1213
- package/dist/icons/bubble-sparkle-icon/BubbleSparkleIcon.stories.tsx +116 -893
- package/dist/icons/camera-icon/CameraIcon.stories.tsx +109 -1254
- package/dist/icons/capital-a-letter-icon/CapitalALetterIcon.stories.tsx +114 -975
- package/dist/icons/chevron-double-left-icon/ChevronDoubleLeftIcon.stories.tsx +157 -994
- package/dist/icons/chevron-double-right-icon/ChevronDoubleRightIcon.stories.tsx +160 -992
- package/dist/icons/chevron-down-icon/ChevronDownIcon.stories.tsx +140 -970
- package/dist/icons/chevron-left-icon/ChevronLeftIcon.stories.tsx +126 -993
- package/dist/icons/chevron-right-icon/ChevronRightIcon.stories.tsx +144 -987
- package/dist/icons/chevron-up-icon/ChevronUpIcon.stories.tsx +141 -1007
- package/dist/icons/circle-tick-icon/CircleTickIcon.stories.tsx +147 -1187
- package/dist/icons/circular-play-icon/CircularPlayIcon.stories.tsx +110 -476
- package/dist/icons/coin-icon/CoinIcon.stories.tsx +120 -1364
- package/dist/icons/coin-toons-icon/CoinToonsIcon.stories.tsx +113 -1360
- package/dist/icons/column-wide-add-icon/ColumnWideAddIcon.stories.tsx +111 -942
- package/dist/icons/command-icon/CommandIcon.stories.tsx +124 -1087
- package/dist/icons/copy-icon/CopyIcon.stories.tsx +119 -996
- package/dist/icons/cross-circle-icon/CrossCircleIcon.stories.tsx +144 -1046
- package/dist/icons/cross-icon/CrossIcon.stories.tsx +136 -999
- package/dist/icons/download-icon/DownloadIcon.stories.tsx +123 -857
- package/dist/icons/edit-big-icon/EditBigIcon.stories.tsx +121 -1080
- package/dist/icons/email-icon/EmailIcon.stories.tsx +112 -979
- package/dist/icons/expand-icon/ExpandIcon.stories.tsx +109 -1146
- package/dist/icons/eye-close-icon/EyeCloseIcon.stories.tsx +141 -1068
- package/dist/icons/eye-open-icon/EyeOpenIcon.stories.tsx +140 -1081
- package/dist/icons/feature-shine-icon/FeatureShineIcon.stories.tsx +124 -1050
- package/dist/icons/file-chart-icon/FileChartIcon.stories.tsx +123 -1091
- package/dist/icons/file-text-icon/FileTextIcon.stories.tsx +122 -633
- package/dist/icons/filter-bar-row-icon/FilterBarRowIcon.stories.tsx +116 -1087
- package/dist/icons/forward-ten-seconds-icon/ForwardTenSecondsIcon.stories.tsx +166 -1020
- package/dist/icons/git-branch-icon/GitBranchIcon.stories.tsx +112 -1182
- package/dist/icons/git-fork-icon/GitForkIcon.stories.tsx +112 -1155
- package/dist/icons/globe-icon/GlobeIcon.stories.tsx +127 -325
- package/dist/icons/google-logo-icon/GoogleLogoIcon.stories.tsx +142 -985
- package/dist/icons/grip-vertical-icon/GripVerticalIcon.stories.tsx +116 -1217
- package/dist/icons/head-icon/HeadIcon.stories.tsx +108 -953
- package/dist/icons/heart-icon/HeartIcon.stories.tsx +117 -1060
- package/dist/icons/image-avatar-sparkle-icon/ImageAvatarSparkleIcon.stories.tsx +116 -716
- package/dist/icons/image-icon/ImageIcon.stories.tsx +102 -1164
- package/dist/icons/import-folder-icon/ImportFolderIcon.stories.tsx +108 -1233
- package/dist/icons/import-left-arrow-folder-icon/ImportLeftArrowFolderIcon.stories.tsx +133 -1289
- package/dist/icons/indian-flag-icon/IndianFlagIcon.stories.tsx +155 -1012
- package/dist/icons/instagram-icon/InstagramIcon.stories.tsx +158 -1438
- package/dist/icons/layout-column-icon/LayoutColumnIcon.stories.tsx +121 -1011
- package/dist/icons/layout-left-icon/LayoutLeftIcon.stories.tsx +116 -981
- package/dist/icons/layout-right-icon/LayoutRightIcon.stories.tsx +116 -979
- package/dist/icons/light-bulb-simple-icon/LightBulbSimpleIcon.stories.tsx +105 -1252
- package/dist/icons/linked-in-icon/LinkedInIcon.stories.tsx +151 -1554
- package/dist/icons/magic-book-icon/MagicBookIcon.stories.tsx +107 -1227
- package/dist/icons/magic-edit-icon/MagicEditIcon.stories.tsx +116 -707
- package/dist/icons/maintenance-icon/MaintenanceIcon.stories.tsx +119 -1226
- package/dist/icons/message-icon/MessageIcon.stories.tsx +111 -557
- package/dist/icons/minimize-icon/MinimizeIcon.stories.tsx +112 -1198
- package/dist/icons/moon-icon/MoonIcon.stories.tsx +117 -557
- package/dist/icons/move-horizontal-icon/MoveHorizontalIcon.stories.tsx +106 -1235
- package/dist/icons/move-vertical-icon/MoveVerticalIcon.stories.tsx +112 -1185
- package/dist/icons/musical-note-icon/MusicalNoteIcon.stories.tsx +116 -1012
- package/dist/icons/notepad-icon/NotepadIcon.stories.tsx +108 -1137
- package/dist/icons/notes-icon/NotesIcon.stories.tsx +116 -1138
- package/dist/icons/page-search-icon/PageSearchIcon.stories.tsx +106 -1146
- package/dist/icons/page-text-icon/PageTextIcon.stories.tsx +119 -719
- package/dist/icons/paint-roll-icon/PaintRollIcon.stories.tsx +110 -999
- package/dist/icons/paper-plane-icon/PaperPlaneIcon.stories.tsx +109 -912
- package/dist/icons/pause-icon/PauseIcon.stories.tsx +110 -1041
- package/dist/icons/pencil-icon/PencilIcon.stories.tsx +112 -1109
- package/dist/icons/phone-icon/PhoneIcon.stories.tsx +112 -1023
- package/dist/icons/plus-icon/PlusIcon.stories.tsx +103 -1132
- package/dist/icons/pocket-studio-icon/PocketStudioIcon.stories.tsx +104 -870
- package/dist/icons/scroll-down-icon/ScrollDownIcon.stories.tsx +99 -476
- package/dist/icons/search-icon/SearchIcon.stories.tsx +108 -1161
- package/dist/icons/setting-icon/SettingIcon.stories.tsx +104 -1009
- package/dist/icons/share-icon/ShareIcon.stories.tsx +117 -1064
- package/dist/icons/shield-icon/ShieldIcon.stories.tsx +114 -974
- package/dist/icons/site-logo-icon/SiteLogoIcon.stories.tsx +134 -1160
- package/dist/icons/skip-backward-icon/SkipBackwardIcon.stories.tsx +169 -1017
- package/dist/icons/skip-forward-icon/SkipForwardIcon.stories.tsx +161 -1016
- package/dist/icons/sparkles-soft-icon/SparklesSoftIcon.stories.tsx +102 -1001
- package/dist/icons/spinner-gradient-icon/SpinnerGradientIcon.stories.tsx +155 -593
- package/dist/icons/spinner-solid-icon/SpinnerSolidIcon.stories.tsx +155 -608
- package/dist/icons/spinner-solid-neutral-icon/SpinnerSolidINeutralcon.stories.tsx +142 -712
- package/dist/icons/star-icon/StarIcon.stories.tsx +120 -946
- package/dist/icons/store-coin-icon/StoreCoinIcon.stories.tsx +109 -1013
- package/dist/icons/suggestion-icon/SuggestionIcon.stories.tsx +113 -891
- package/dist/icons/sun-icon/SunIcon.stories.tsx +117 -864
- package/dist/icons/text-color-icon/TextColorIcon.stories.tsx +113 -989
- package/dist/icons/text-indicator-icon/TextIndicatorIcon.stories.tsx +120 -1027
- package/dist/icons/threads-icon/ThreadsIcon.stories.tsx +153 -1476
- package/dist/icons/tick-circle-icon/TickCircleIcon.stories.tsx +143 -1187
- package/dist/icons/tick-icon/TickIcon.stories.tsx +142 -1322
- package/dist/icons/trash-icon/TrashIcon.stories.tsx +105 -970
- package/dist/icons/twitter-x-icon/TwitterXIcon.stories.tsx +154 -1457
- package/dist/icons/upload-icon/UploadIcon.stories.tsx +112 -930
- package/dist/icons/vertical-menu-icon/VerticalMenuIcon.stories.tsx +115 -1019
- package/dist/icons/video-play-list-icon/VideoPlaylistIcon.stories.tsx +122 -1092
- package/dist/icons/voice-playing-icon/VoicePlayingIcon.stories.tsx +120 -1401
- package/dist/icons/volume-full-icon/VolumeFullIcon.stories.tsx +107 -1212
- package/dist/icons/volume-half-icon/VolumeHalfIcon.stories.tsx +109 -1122
- package/dist/icons/volume-off-icon/VolumeOffIcon.stories.tsx +112 -1124
- package/dist/icons/warning-icon/WarningIcon.stories.tsx +119 -1083
- package/dist/icons/youtube-icon/YoutubeIcon.stories.tsx +158 -983
- package/dist/index.cjs +90 -90
- package/dist/index.js +90 -90
- package/package.json +8 -3
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import type { Meta, StoryObj } from "@storybook/react-vite"
|
|
3
3
|
|
|
4
|
+
import { CoinIcon } from "src/ui/icons/coin-icon"
|
|
5
|
+
import { ShareIcon } from "src/ui/icons/share-icon"
|
|
6
|
+
import { StarIcon } from "src/ui/icons/star-icon"
|
|
7
|
+
import { StoreCoinIcon } from "src/ui/icons/store-coin-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 { HeartIcon } from "."
|
|
5
19
|
|
|
6
20
|
const meta: Meta<typeof HeartIcon> = {
|
|
@@ -18,896 +32,68 @@ const meta: Meta<typeof HeartIcon> = {
|
|
|
18
32
|
},
|
|
19
33
|
docs: {
|
|
20
34
|
page: () => (
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
{
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
padding: 0 !important;
|
|
33
|
-
margin: 0 !important;
|
|
34
|
-
background: transparent !important;
|
|
35
|
-
}
|
|
36
|
-
.docs-story {
|
|
37
|
-
background: transparent !important;
|
|
38
|
-
}
|
|
39
|
-
.sbdocs {
|
|
40
|
-
background: transparent !important;
|
|
41
|
-
}
|
|
42
|
-
body {
|
|
43
|
-
background: var(--color-fm-surface-primary) !important;
|
|
44
|
-
}
|
|
45
|
-
#storybook-docs {
|
|
46
|
-
background: var(--color-fm-surface-primary) !important;
|
|
47
|
-
}
|
|
48
|
-
.sbdocs-preview {
|
|
49
|
-
background: transparent !important;
|
|
50
|
-
border: none !important;
|
|
51
|
-
}
|
|
52
|
-
.sbdocs-h1, .sbdocs-h2, .sbdocs-h3, .sbdocs-h4, .sbdocs-h5, .sbdocs-h6 {
|
|
53
|
-
color: var(--color-fm-icon-active) !important;
|
|
54
|
-
}
|
|
55
|
-
.sbdocs-p, .sbdocs-li {
|
|
56
|
-
color: var(--color-fm-secondary) !important;
|
|
57
|
-
}
|
|
58
|
-
.sbdocs-code {
|
|
59
|
-
background: var(--color-fm-surface-secondary) !important;
|
|
60
|
-
color: var(--color-fm-secondary-500) !important;
|
|
61
|
-
border: 1px solid var(--color-fm-divider-secondary) !important;
|
|
62
|
-
}
|
|
63
|
-
.sbdocs-pre {
|
|
64
|
-
background: var(--color-fm-surface-secondary) !important;
|
|
65
|
-
border: 1px solid var(--color-fm-divider-secondary) !important;
|
|
66
|
-
}
|
|
67
|
-
.sbdocs-table {
|
|
68
|
-
background: var(--color-fm-surface-secondary) !important;
|
|
69
|
-
border: 1px solid var(--color-fm-divider-secondary) !important;
|
|
70
|
-
}
|
|
71
|
-
.sbdocs-table th {
|
|
72
|
-
background: var(--color-fm-surface-secondary) !important;
|
|
73
|
-
color: var(--color-fm-icon-active) !important;
|
|
74
|
-
border-bottom: 1px solid var(--color-fm-divider-secondary) !important;
|
|
75
|
-
}
|
|
76
|
-
.sbdocs-table td {
|
|
77
|
-
color: var(--color-fm-secondary) !important;
|
|
78
|
-
border-bottom: 1px solid var(--color-fm-divider-tertiary) !important;
|
|
79
|
-
}
|
|
80
|
-
`}
|
|
81
|
-
</style>
|
|
82
|
-
|
|
83
|
-
<div className="from-fm-surface-primary via-fm-icon-negative/5 to-fm-surface-primary min-h-screen bg-linear-to-br">
|
|
84
|
-
{/* Header */}
|
|
85
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary relative overflow-hidden border-b backdrop-blur-xl">
|
|
86
|
-
<div className="from-fm-icon-negative/10 to-fm-secondary-500/10 absolute inset-0 bg-linear-to-r via-transparent" />
|
|
87
|
-
<div className="relative !mx-auto max-w-7xl px-6 py-16">
|
|
88
|
-
<div className="!space-y-6 text-center">
|
|
89
|
-
<div className="border-fm-icon-negative/30 from-fm-icon-negative/20 to-fm-secondary-500/20 !mx-auto flex h-24 w-24 items-center justify-center rounded-2xl border bg-linear-to-br">
|
|
90
|
-
<HeartIcon className="text-fm-icon-negative h-12 w-12" />
|
|
91
|
-
</div>
|
|
92
|
-
<h1 className="!text-fm-primary text-5xl font-bold">
|
|
93
|
-
HeartIcon
|
|
94
|
-
</h1>
|
|
95
|
-
<p className="text-fm-secondary! !mx-auto max-w-3xl text-xl leading-relaxed">
|
|
96
|
-
A versatile heart icon for like buttons, favorites, and
|
|
97
|
-
expressing positive emotions. Built with accessibility in
|
|
98
|
-
mind using Radix UI's AccessibleIcon wrapper.
|
|
99
|
-
</p>
|
|
100
|
-
|
|
101
|
-
{/* Stats */}
|
|
102
|
-
<div className="flex items-center justify-center gap-8 pt-8">
|
|
103
|
-
<div className="text-center">
|
|
104
|
-
<div className="text-fm-icon-negative text-3xl font-bold">
|
|
105
|
-
Accessible
|
|
106
|
-
</div>
|
|
107
|
-
<div className="text-fm-tertiary text-sm">
|
|
108
|
-
Screen reader friendly
|
|
109
|
-
</div>
|
|
110
|
-
</div>
|
|
111
|
-
<div className="bg-fm-divider-primary h-8 w-px" />
|
|
112
|
-
<div className="text-center">
|
|
113
|
-
<div className="text-fm-secondary-600 text-3xl font-bold">
|
|
114
|
-
Scalable
|
|
115
|
-
</div>
|
|
116
|
-
<div className="text-fm-tertiary text-sm">
|
|
117
|
-
Any size needed
|
|
118
|
-
</div>
|
|
119
|
-
</div>
|
|
120
|
-
<div className="bg-fm-divider-primary h-8 w-px" />
|
|
121
|
-
<div className="text-center">
|
|
122
|
-
<div className="text-fm-icon-negative text-3xl font-bold">
|
|
123
|
-
Flexible
|
|
124
|
-
</div>
|
|
125
|
-
<div className="text-fm-tertiary text-sm">
|
|
126
|
-
Customizable styling
|
|
127
|
-
</div>
|
|
128
|
-
</div>
|
|
129
|
-
</div>
|
|
130
|
-
</div>
|
|
131
|
-
</div>
|
|
132
|
-
</div>
|
|
133
|
-
|
|
134
|
-
{/* Content */}
|
|
135
|
-
<div className="!mx-auto max-w-7xl !space-y-16 px-6 py-12">
|
|
136
|
-
{/* Quick Usage */}
|
|
137
|
-
<div className="!space-y-8">
|
|
138
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
139
|
-
Quick Start
|
|
140
|
-
</h2>
|
|
141
|
-
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
142
|
-
<div className="!space-y-4">
|
|
143
|
-
<h3 className="text-fm-icon-negative! text-xl font-semibold">
|
|
144
|
-
Basic Usage
|
|
145
|
-
</h3>
|
|
146
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
147
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
148
|
-
{`import { HeartIcon } from "@icons/heart-icon"
|
|
149
|
-
|
|
150
|
-
function MyComponent() {
|
|
151
|
-
return (
|
|
152
|
-
<HeartIcon className="h-6 w-6 text-red-500" />
|
|
153
|
-
)
|
|
154
|
-
}`}
|
|
155
|
-
</pre>
|
|
156
|
-
</div>
|
|
157
|
-
</div>
|
|
158
|
-
|
|
159
|
-
<div className="!space-y-4">
|
|
160
|
-
<h3 className="text-fm-icon-negative! text-xl font-semibold">
|
|
161
|
-
Live Preview
|
|
162
|
-
</h3>
|
|
163
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary flex h-32 items-center justify-center rounded-lg border">
|
|
164
|
-
<HeartIcon className="text-fm-icon-negative h-12 w-12" />
|
|
165
|
-
</div>
|
|
166
|
-
</div>
|
|
167
|
-
</div>
|
|
168
|
-
</div>
|
|
169
|
-
|
|
170
|
-
{/* Props Documentation */}
|
|
171
|
-
<div className="!space-y-8">
|
|
172
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
173
|
-
Props & Configuration
|
|
174
|
-
</h2>
|
|
175
|
-
|
|
176
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary overflow-hidden rounded-lg border">
|
|
177
|
-
<div className="bg-fm-surface-secondary p-4">
|
|
178
|
-
<h3 className="text-fm-icon-active! text-xl font-semibold">
|
|
179
|
-
Props
|
|
180
|
-
</h3>
|
|
181
|
-
</div>
|
|
182
|
-
<table className="!my-0 w-full">
|
|
183
|
-
<thead className="bg-fm-surface-secondary">
|
|
184
|
-
<tr className="border-fm-divider-secondary border-b">
|
|
185
|
-
<th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
|
|
186
|
-
Prop
|
|
187
|
-
</th>
|
|
188
|
-
<th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
|
|
189
|
-
Type
|
|
190
|
-
</th>
|
|
191
|
-
<th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
|
|
192
|
-
Default
|
|
193
|
-
</th>
|
|
194
|
-
<th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
|
|
195
|
-
Description
|
|
196
|
-
</th>
|
|
197
|
-
</tr>
|
|
198
|
-
</thead>
|
|
199
|
-
<tbody>
|
|
200
|
-
{" "}
|
|
201
|
-
<tr className="bg-fm-surface-secondary!">
|
|
202
|
-
<td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
|
|
203
|
-
withAccessibility
|
|
204
|
-
</td>
|
|
205
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
206
|
-
boolean
|
|
207
|
-
</td>
|
|
208
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
209
|
-
true
|
|
210
|
-
</td>
|
|
211
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
212
|
-
Whether to wrap the icon with accessibility feature
|
|
213
|
-
</td>
|
|
214
|
-
</tr>
|
|
215
|
-
<tr className="border-fm-divider-tertiary bg-fm-surface-secondary! border-b">
|
|
216
|
-
<td className="text-fm-icon-negative! px-6 py-4 font-mono text-sm">
|
|
217
|
-
height
|
|
218
|
-
</td>
|
|
219
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
220
|
-
number | string
|
|
221
|
-
</td>
|
|
222
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
223
|
-
20
|
|
224
|
-
</td>
|
|
225
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
226
|
-
Height of the icon in pixels
|
|
227
|
-
</td>
|
|
228
|
-
</tr>
|
|
229
|
-
<tr className="border-fm-divider-tertiary border-b">
|
|
230
|
-
<td className="text-fm-icon-negative! px-6 py-4 font-mono text-sm">
|
|
231
|
-
stroke
|
|
232
|
-
</td>
|
|
233
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
234
|
-
string
|
|
235
|
-
</td>
|
|
236
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
237
|
-
currentColor
|
|
238
|
-
</td>
|
|
239
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
240
|
-
Stroke color of the heart outline
|
|
241
|
-
</td>
|
|
242
|
-
</tr>
|
|
243
|
-
<tr className="border-fm-divider-tertiary bg-fm-surface-secondary! border-b">
|
|
244
|
-
<td className="text-fm-icon-negative! px-6 py-4 font-mono text-sm">
|
|
245
|
-
strokeWidth
|
|
246
|
-
</td>
|
|
247
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
248
|
-
number | string
|
|
249
|
-
</td>
|
|
250
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
251
|
-
1.25
|
|
252
|
-
</td>
|
|
253
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
254
|
-
Width of the stroke line
|
|
255
|
-
</td>
|
|
256
|
-
</tr>
|
|
257
|
-
<tr className="border-fm-divider-tertiary border-b">
|
|
258
|
-
<td className="text-fm-icon-negative! px-6 py-4 font-mono text-sm">
|
|
259
|
-
fill
|
|
260
|
-
</td>
|
|
261
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
262
|
-
string
|
|
263
|
-
</td>
|
|
264
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
265
|
-
none
|
|
266
|
-
</td>
|
|
267
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
268
|
-
Fill color for solid hearts
|
|
269
|
-
</td>
|
|
270
|
-
</tr>
|
|
271
|
-
<tr className="border-fm-divider-tertiary bg-fm-surface-secondary! border-b">
|
|
272
|
-
<td className="text-fm-icon-negative! px-6 py-4 font-mono text-sm">
|
|
273
|
-
className
|
|
274
|
-
</td>
|
|
275
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
276
|
-
string
|
|
277
|
-
</td>
|
|
278
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
279
|
-
-
|
|
280
|
-
</td>
|
|
281
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
282
|
-
CSS classes for styling
|
|
283
|
-
</td>
|
|
284
|
-
</tr>
|
|
285
|
-
<tr className="bg-fm-surface-secondary!">
|
|
286
|
-
<td className="text-fm-icon-negative! px-6 py-4 font-mono text-sm">
|
|
287
|
-
onClick
|
|
288
|
-
</td>
|
|
289
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
290
|
-
function
|
|
291
|
-
</td>
|
|
292
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
293
|
-
-
|
|
294
|
-
</td>
|
|
295
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
296
|
-
Click handler for interactions
|
|
297
|
-
</td>
|
|
298
|
-
</tr>
|
|
299
|
-
</tbody>
|
|
300
|
-
</table>
|
|
301
|
-
</div>
|
|
302
|
-
|
|
303
|
-
{/* Styling Options */}
|
|
304
|
-
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
305
|
-
<div className="!space-y-4">
|
|
306
|
-
<h3 className="text-fm-icon-negative! text-lg font-semibold">
|
|
307
|
-
Fill vs Stroke States
|
|
308
|
-
</h3>
|
|
309
|
-
<div className="!space-y-4">
|
|
310
|
-
<div className="flex gap-4">
|
|
311
|
-
<div className="flex items-center gap-2">
|
|
312
|
-
<HeartIcon className="text-fm-icon-negative h-6 w-6" />
|
|
313
|
-
<span className="text-fm-icon-active text-sm">
|
|
314
|
-
Outline
|
|
315
|
-
</span>
|
|
316
|
-
</div>
|
|
317
|
-
<div className="flex items-center gap-2">
|
|
318
|
-
<HeartIcon
|
|
319
|
-
className="text-fm-icon-negative h-6 w-6"
|
|
320
|
-
fill="currentColor"
|
|
321
|
-
/>
|
|
322
|
-
<span className="text-fm-icon-active text-sm">
|
|
323
|
-
Filled
|
|
324
|
-
</span>
|
|
325
|
-
</div>
|
|
326
|
-
</div>
|
|
327
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
328
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
329
|
-
{`// Outline heart (default)
|
|
330
|
-
<HeartIcon className="h-6 w-6 text-red-400" />
|
|
331
|
-
|
|
332
|
-
// Filled heart
|
|
333
|
-
<HeartIcon
|
|
334
|
-
className="h-6 w-6 text-red-400"
|
|
335
|
-
fill="currentColor"
|
|
336
|
-
/>`}
|
|
337
|
-
</pre>
|
|
338
|
-
</div>
|
|
339
|
-
</div>
|
|
340
|
-
</div>
|
|
341
|
-
|
|
342
|
-
<div className="!space-y-4">
|
|
343
|
-
<h3 className="text-fm-icon-negative! text-lg font-semibold">
|
|
344
|
-
Color Customization
|
|
345
|
-
</h3>
|
|
346
|
-
<div className="!space-y-4">
|
|
347
|
-
<div className="flex gap-4">
|
|
348
|
-
<HeartIcon className="text-fm-icon-negative h-6 w-6" />
|
|
349
|
-
<HeartIcon className="text-fm-secondary-600 h-6 w-6" />
|
|
350
|
-
<HeartIcon className="text-fm-icon-negative h-6 w-6" />
|
|
351
|
-
</div>
|
|
352
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
353
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
354
|
-
{`// Using Tailwind classes
|
|
355
|
-
<HeartIcon className="h-6 w-6 text-red-400" />
|
|
356
|
-
<HeartIcon className="h-6 w-6 text-pink-400" />
|
|
357
|
-
|
|
358
|
-
// Using CSS custom properties
|
|
359
|
-
<HeartIcon
|
|
360
|
-
className="h-6 w-6"
|
|
361
|
-
style={{ color: 'var(--color-love)' }}
|
|
362
|
-
/>
|
|
363
|
-
|
|
364
|
-
// Direct stroke prop
|
|
365
|
-
<HeartIcon
|
|
366
|
-
width={24}
|
|
367
|
-
height={24}
|
|
368
|
-
stroke="#ec4899"
|
|
369
|
-
/>`}
|
|
370
|
-
</pre>
|
|
371
|
-
</div>
|
|
372
|
-
</div>
|
|
373
|
-
</div>
|
|
374
|
-
</div>
|
|
375
|
-
</div>
|
|
376
|
-
|
|
377
|
-
{/* Size Variations */}
|
|
378
|
-
<div className="!space-y-8">
|
|
379
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
380
|
-
Size Variations
|
|
381
|
-
</h2>
|
|
382
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-8">
|
|
383
|
-
<div className="!space-y-6">
|
|
384
|
-
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
|
|
385
|
-
<div className="!space-y-4">
|
|
386
|
-
<h3 className="text-fm-icon-negative! text-lg font-semibold">
|
|
387
|
-
Standard Sizes
|
|
388
|
-
</h3>
|
|
389
|
-
<div className="bg-fm-surface-secondary flex items-end gap-6 rounded-lg p-6">
|
|
390
|
-
<div className="text-center">
|
|
391
|
-
<HeartIcon className="text-fm-icon-negative !mx-auto mb-2 h-3 w-3" />
|
|
392
|
-
<span className="text-fm-tertiary text-xs">
|
|
393
|
-
12px
|
|
394
|
-
</span>
|
|
395
|
-
</div>
|
|
396
|
-
<div className="text-center">
|
|
397
|
-
<HeartIcon className="text-fm-icon-negative !mx-auto mb-2 h-4 w-4" />
|
|
398
|
-
<span className="text-fm-tertiary text-xs">
|
|
399
|
-
16px
|
|
400
|
-
</span>
|
|
401
|
-
</div>
|
|
402
|
-
<div className="text-center">
|
|
403
|
-
<HeartIcon className="text-fm-icon-negative !mx-auto mb-2 h-5 w-5" />
|
|
404
|
-
<span className="text-fm-tertiary text-xs">
|
|
405
|
-
20px
|
|
406
|
-
</span>
|
|
407
|
-
</div>
|
|
408
|
-
<div className="text-center">
|
|
409
|
-
<HeartIcon className="text-fm-icon-negative !mx-auto mb-2 h-6 w-6" />
|
|
410
|
-
<span className="text-fm-tertiary text-xs">
|
|
411
|
-
24px
|
|
412
|
-
</span>
|
|
413
|
-
</div>
|
|
414
|
-
<div className="text-center">
|
|
415
|
-
<HeartIcon className="text-fm-icon-negative !mx-auto mb-2 h-8 w-8" />
|
|
416
|
-
<span className="text-fm-tertiary text-xs">
|
|
417
|
-
32px
|
|
418
|
-
</span>
|
|
419
|
-
</div>
|
|
420
|
-
<div className="text-center">
|
|
421
|
-
<HeartIcon className="text-fm-icon-negative !mx-auto mb-2 h-12 w-12" />
|
|
422
|
-
<span className="text-fm-tertiary text-xs">
|
|
423
|
-
48px
|
|
424
|
-
</span>
|
|
425
|
-
</div>
|
|
426
|
-
</div>
|
|
427
|
-
</div>
|
|
428
|
-
|
|
429
|
-
<div className="!space-y-4">
|
|
430
|
-
<h3 className="text-fm-icon-negative! text-lg font-semibold">
|
|
431
|
-
Code Example
|
|
432
|
-
</h3>
|
|
433
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
434
|
-
<pre className="text-fm-icon-info! overflow-x-auto text-sm">
|
|
435
|
-
{`// Small (16px)
|
|
436
|
-
<HeartIcon className="h-4 w-4" />
|
|
437
|
-
|
|
438
|
-
// Medium (24px)
|
|
439
|
-
<HeartIcon className="h-6 w-6" />
|
|
440
|
-
|
|
441
|
-
// Large (32px)
|
|
442
|
-
<HeartIcon className="h-8 w-8" />
|
|
443
|
-
|
|
444
|
-
// Custom size
|
|
445
|
-
<HeartIcon width={40} height={40} />`}
|
|
446
|
-
</pre>
|
|
447
|
-
</div>
|
|
448
|
-
</div>
|
|
449
|
-
</div>
|
|
450
|
-
</div>
|
|
451
|
-
</div>
|
|
452
|
-
</div>
|
|
453
|
-
|
|
454
|
-
{/* Color Variations */}
|
|
455
|
-
<div className="!space-y-8">
|
|
456
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
457
|
-
Color Variations
|
|
458
|
-
</h2>
|
|
459
|
-
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
460
|
-
<div className="!space-y-4">
|
|
461
|
-
<h3 className="text-fm-icon-negative! text-lg font-semibold">
|
|
462
|
-
Semantic Colors
|
|
463
|
-
</h3>
|
|
464
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
|
|
465
|
-
<div className="flex items-center gap-4">
|
|
466
|
-
<HeartIcon className="text-fm-icon-negative h-6 w-6" />
|
|
467
|
-
<div>
|
|
468
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
469
|
-
Love
|
|
470
|
-
</div>
|
|
471
|
-
<div className="text-fm-tertiary text-xs">
|
|
472
|
-
text-fm-icon-negative
|
|
473
|
-
</div>
|
|
474
|
-
</div>
|
|
475
|
-
</div>
|
|
476
|
-
<div className="flex items-center gap-4">
|
|
477
|
-
<HeartIcon className="text-fm-secondary-600 h-6 w-6" />
|
|
478
|
-
<div>
|
|
479
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
480
|
-
Affection
|
|
481
|
-
</div>
|
|
482
|
-
<div className="text-fm-tertiary text-xs">
|
|
483
|
-
text-fm-secondary-600
|
|
484
|
-
</div>
|
|
485
|
-
</div>
|
|
486
|
-
</div>
|
|
487
|
-
<div className="flex items-center gap-4">
|
|
488
|
-
<HeartIcon className="text-fm-icon-negative h-6 w-6" />
|
|
489
|
-
<div>
|
|
490
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
491
|
-
Romance
|
|
492
|
-
</div>
|
|
493
|
-
<div className="text-fm-tertiary text-xs">
|
|
494
|
-
text-fm-icon-negative
|
|
495
|
-
</div>
|
|
496
|
-
</div>
|
|
497
|
-
</div>
|
|
498
|
-
<div className="flex items-center gap-4">
|
|
499
|
-
<HeartIcon className="text-fm-placeholder h-6 w-6" />
|
|
500
|
-
<div>
|
|
501
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
502
|
-
Inactive
|
|
503
|
-
</div>
|
|
504
|
-
<div className="text-fm-tertiary text-xs">
|
|
505
|
-
text-fm-placeholder
|
|
506
|
-
</div>
|
|
507
|
-
</div>
|
|
508
|
-
</div>
|
|
509
|
-
</div>
|
|
510
|
-
</div>
|
|
511
|
-
|
|
512
|
-
<div className="!space-y-4">
|
|
513
|
-
<h3 className="text-fm-icon-negative! text-lg font-semibold">
|
|
514
|
-
Custom Colors
|
|
515
|
-
</h3>
|
|
516
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
517
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
518
|
-
{`// Using Tailwind classes
|
|
519
|
-
<HeartIcon className="h-6 w-6 text-red-400" />
|
|
520
|
-
<HeartIcon className="h-6 w-6 text-pink-500" />
|
|
521
|
-
|
|
522
|
-
// Using CSS custom properties
|
|
523
|
-
<HeartIcon
|
|
524
|
-
className="h-6 w-6"
|
|
525
|
-
style={{ color: 'var(--color-love)' }}
|
|
526
|
-
/>
|
|
527
|
-
|
|
528
|
-
// Direct stroke prop
|
|
529
|
-
<HeartIcon
|
|
530
|
-
width={20}
|
|
531
|
-
height={20}
|
|
532
|
-
stroke="#ec4899"
|
|
533
|
-
/>`}
|
|
534
|
-
</pre>
|
|
535
|
-
</div>
|
|
536
|
-
</div>
|
|
537
|
-
</div>
|
|
538
|
-
</div>
|
|
539
|
-
|
|
540
|
-
{/* Usage Examples */}
|
|
541
|
-
<div className="!space-y-8">
|
|
542
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
543
|
-
Usage Examples
|
|
544
|
-
</h2>
|
|
545
|
-
|
|
546
|
-
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
547
|
-
{/* Like Button */}
|
|
548
|
-
<div className="!space-y-4">
|
|
549
|
-
<h3 className="text-fm-icon-negative! text-lg font-semibold">
|
|
550
|
-
Like Button
|
|
551
|
-
</h3>
|
|
552
|
-
<div className="!space-y-4">
|
|
553
|
-
<div className="flex gap-4">
|
|
554
|
-
<button className="border-fm-icon-negative/30 bg-fm-icon-negative/20 text-fm-icon-negative hover:bg-fm-icon-negative/30 flex items-center gap-2 rounded-lg border px-4 py-2 transition-colors">
|
|
555
|
-
<HeartIcon className="h-4 w-4" fill="currentColor" />
|
|
556
|
-
Liked
|
|
557
|
-
</button>
|
|
558
|
-
<button className="border-fm-divider-primary bg-fm-surface-tertiary/20 text-fm-secondary hover:bg-fm-surface-tertiary/30 flex items-center gap-2 rounded-lg border px-3 py-2 transition-colors">
|
|
559
|
-
<HeartIcon className="h-4 w-4" />
|
|
560
|
-
Like
|
|
561
|
-
</button>
|
|
562
|
-
</div>
|
|
563
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
564
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
565
|
-
{`// Liked state
|
|
566
|
-
<button className="flex items-center gap-2 bg-red-500/20 border border-red-500/30 px-4 py-2 rounded-lg">
|
|
567
|
-
<HeartIcon className="h-4 w-4" fill="currentColor" />
|
|
568
|
-
Liked
|
|
569
|
-
</button>
|
|
570
|
-
|
|
571
|
-
// Default state
|
|
572
|
-
<button className="flex items-center gap-2 bg-gray-500/20 border border-gray-500/30 px-3 py-2 rounded-lg">
|
|
573
|
-
<HeartIcon className="h-4 w-4" />
|
|
574
|
-
Like
|
|
575
|
-
</button>`}
|
|
576
|
-
</pre>
|
|
577
|
-
</div>
|
|
578
|
-
</div>
|
|
579
|
-
</div>
|
|
580
|
-
|
|
581
|
-
{/* Wishlist Item */}
|
|
582
|
-
<div className="!space-y-4">
|
|
583
|
-
<h3 className="text-fm-icon-negative! text-lg font-semibold">
|
|
584
|
-
Wishlist Actions
|
|
585
|
-
</h3>
|
|
586
|
-
<div className="!space-y-4">
|
|
587
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-4">
|
|
588
|
-
<div className="flex items-center justify-between">
|
|
589
|
-
<div className="flex items-center gap-3">
|
|
590
|
-
<div className="bg-fm-icon-info/20 h-10 w-10 rounded-lg"></div>
|
|
591
|
-
<div>
|
|
592
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
593
|
-
Premium Headphones
|
|
594
|
-
</div>
|
|
595
|
-
<div className="text-fm-tertiary text-xs">
|
|
596
|
-
$299 • In Stock
|
|
597
|
-
</div>
|
|
598
|
-
</div>
|
|
599
|
-
</div>
|
|
600
|
-
<button className="bg-fm-icon-negative/20 text-fm-icon-negative hover:bg-fm-icon-negative/30 rounded-lg p-2 transition-colors">
|
|
601
|
-
<HeartIcon
|
|
602
|
-
className="h-4 w-4"
|
|
603
|
-
fill="currentColor"
|
|
604
|
-
/>
|
|
605
|
-
</button>
|
|
606
|
-
</div>
|
|
607
|
-
</div>
|
|
608
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
609
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
610
|
-
{`<div className="flex items-center justify-between">
|
|
611
|
-
<div className="flex items-center gap-3">
|
|
612
|
-
{/* Product info */}
|
|
613
|
-
</div>
|
|
614
|
-
<button className="p-2 rounded-lg text-red-400 bg-red-500/20 hover:bg-red-500/30 transition-colors">
|
|
615
|
-
<HeartIcon className="h-4 w-4" fill="currentColor" />
|
|
616
|
-
</button>
|
|
617
|
-
</div>`}
|
|
618
|
-
</pre>
|
|
619
|
-
</div>
|
|
620
|
-
</div>
|
|
621
|
-
</div>
|
|
622
|
-
|
|
623
|
-
{/* Social Media */}
|
|
624
|
-
<div className="!space-y-4">
|
|
625
|
-
<h3 className="text-fm-icon-negative! text-lg font-semibold">
|
|
626
|
-
Social Media Post
|
|
627
|
-
</h3>
|
|
628
|
-
<div className="!space-y-4">
|
|
629
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-4">
|
|
630
|
-
<div className="text-fm-icon-active mb-3 text-sm">
|
|
631
|
-
Just launched our new design system! 🎨✨
|
|
632
|
-
</div>
|
|
633
|
-
<div className="flex items-center gap-6">
|
|
634
|
-
<button className="text-fm-icon-negative hover:text-fm-icon-negative flex items-center gap-2 transition-colors">
|
|
635
|
-
<HeartIcon
|
|
636
|
-
className="h-4 w-4"
|
|
637
|
-
fill="currentColor"
|
|
638
|
-
/>
|
|
639
|
-
<span className="text-sm">247</span>
|
|
640
|
-
</button>
|
|
641
|
-
<button className="text-fm-placeholder hover:text-fm-icon-info flex items-center gap-2 transition-colors">
|
|
642
|
-
<span className="text-sm">💬</span>
|
|
643
|
-
<span className="text-sm">32</span>
|
|
644
|
-
</button>
|
|
645
|
-
</div>
|
|
646
|
-
</div>
|
|
647
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
648
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
649
|
-
{`// Social media interactions
|
|
650
|
-
<button className="flex items-center gap-2 text-red-400 hover:text-red-300 transition-colors">
|
|
651
|
-
<HeartIcon className="h-4 w-4" fill="currentColor" />
|
|
652
|
-
<span className="text-sm">247</span>
|
|
653
|
-
</button>`}
|
|
654
|
-
</pre>
|
|
655
|
-
</div>
|
|
656
|
-
</div>
|
|
657
|
-
</div>
|
|
658
|
-
|
|
659
|
-
{/* Rating System */}
|
|
660
|
-
<div className="!space-y-4">
|
|
661
|
-
<h3 className="text-fm-icon-negative! text-lg font-semibold">
|
|
662
|
-
Heart Rating
|
|
663
|
-
</h3>
|
|
664
|
-
<div className="!space-y-4">
|
|
665
|
-
<div className="border-fm-secondary-500/20 bg-fm-secondary-500/5 rounded-lg border p-6">
|
|
666
|
-
<div className="text-center">
|
|
667
|
-
<div className="text-fm-icon-active mb-4 text-sm">
|
|
668
|
-
Rate this experience
|
|
669
|
-
</div>
|
|
670
|
-
<div className="mb-3 flex justify-center gap-1">
|
|
671
|
-
<HeartIcon
|
|
672
|
-
className="text-fm-icon-negative h-6 w-6 cursor-pointer"
|
|
673
|
-
fill="currentColor"
|
|
674
|
-
/>
|
|
675
|
-
<HeartIcon
|
|
676
|
-
className="text-fm-icon-negative h-6 w-6 cursor-pointer"
|
|
677
|
-
fill="currentColor"
|
|
678
|
-
/>
|
|
679
|
-
<HeartIcon
|
|
680
|
-
className="text-fm-icon-negative h-6 w-6 cursor-pointer"
|
|
681
|
-
fill="currentColor"
|
|
682
|
-
/>
|
|
683
|
-
<HeartIcon
|
|
684
|
-
className="text-fm-icon-negative h-6 w-6 cursor-pointer"
|
|
685
|
-
fill="currentColor"
|
|
686
|
-
/>
|
|
687
|
-
<HeartIcon className="text-fm-placeholder h-6 w-6 cursor-pointer" />
|
|
688
|
-
</div>
|
|
689
|
-
<div className="text-fm-tertiary text-xs">
|
|
690
|
-
4 out of 5 hearts
|
|
691
|
-
</div>
|
|
692
|
-
</div>
|
|
693
|
-
</div>
|
|
694
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
695
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
696
|
-
{`// Heart rating system
|
|
697
|
-
<div className="flex justify-center gap-1">
|
|
698
|
-
<HeartIcon className="h-6 w-6 text-red-400 cursor-pointer" fill="currentColor" />
|
|
699
|
-
<HeartIcon className="h-6 w-6 text-red-400 cursor-pointer" fill="currentColor" />
|
|
700
|
-
<HeartIcon className="h-6 w-6 text-red-400 cursor-pointer" fill="currentColor" />
|
|
701
|
-
<HeartIcon className="h-6 w-6 text-red-400 cursor-pointer" fill="currentColor" />
|
|
702
|
-
<HeartIcon className="h-6 w-6 text-gray-400 cursor-pointer" />
|
|
703
|
-
</div>`}
|
|
704
|
-
</pre>
|
|
705
|
-
</div>
|
|
706
|
-
</div>
|
|
707
|
-
</div>
|
|
708
|
-
</div>
|
|
709
|
-
</div>
|
|
710
|
-
|
|
711
|
-
{/* Accessibility */}
|
|
712
|
-
<div className="!space-y-8">
|
|
713
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
714
|
-
Accessibility Features
|
|
715
|
-
</h2>
|
|
716
|
-
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
|
|
717
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
|
|
718
|
-
<h3 className="text-fm-icon-positive! text-lg font-semibold">
|
|
719
|
-
✅ Built-in Features
|
|
720
|
-
</h3>
|
|
721
|
-
<ul className="text-fm-secondary! !space-y-2 text-sm">
|
|
722
|
-
<li className="text-fm-secondary!">
|
|
723
|
-
Uses Radix UI AccessibleIcon wrapper
|
|
724
|
-
</li>
|
|
725
|
-
<li className="text-fm-secondary!">
|
|
726
|
-
Provides screen reader label "Heart icon"
|
|
727
|
-
</li>
|
|
728
|
-
<li className="text-fm-secondary!">
|
|
729
|
-
Supports keyboard navigation when interactive
|
|
730
|
-
</li>
|
|
731
|
-
<li className="text-fm-secondary!">
|
|
732
|
-
Maintains proper color contrast ratios
|
|
733
|
-
</li>
|
|
734
|
-
<li className="text-fm-secondary!">
|
|
735
|
-
Scales with user's font size preferences
|
|
736
|
-
</li>
|
|
737
|
-
</ul>
|
|
738
|
-
</div>
|
|
739
|
-
|
|
740
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
|
|
741
|
-
<h3 className="text-fm-icon-negative! text-lg font-semibold">
|
|
742
|
-
💡 Best Practices
|
|
743
|
-
</h3>
|
|
744
|
-
<ul className="text-fm-secondary !space-y-2 text-sm">
|
|
745
|
-
<li className="text-fm-secondary!">
|
|
746
|
-
Always pair with descriptive labels
|
|
747
|
-
</li>
|
|
748
|
-
<li className="text-fm-secondary!">
|
|
749
|
-
Use appropriate color states (filled/outline)
|
|
750
|
-
</li>
|
|
751
|
-
<li className="text-fm-secondary!">
|
|
752
|
-
Ensure sufficient color contrast
|
|
753
|
-
</li>
|
|
754
|
-
<li className="text-fm-secondary!">
|
|
755
|
-
Add focus states for interactive elements
|
|
756
|
-
</li>
|
|
757
|
-
<li className="text-fm-secondary!">
|
|
758
|
-
Consider animation feedback for state changes
|
|
759
|
-
</li>
|
|
760
|
-
</ul>
|
|
761
|
-
</div>
|
|
762
|
-
</div>
|
|
763
|
-
|
|
764
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-6">
|
|
765
|
-
<h3 className="text-fm-secondary-600! mb-4 text-lg font-semibold">
|
|
766
|
-
Custom Accessibility Label
|
|
767
|
-
</h3>
|
|
768
|
-
<div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
|
|
769
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
770
|
-
<pre className="text-fm-icon-info! overflow-x-auto text-sm">
|
|
771
|
-
{`// Custom implementation with specific label
|
|
772
|
-
import { AccessibleIcon } from "@radix-ui/react-accessible-icon"
|
|
773
|
-
|
|
774
|
-
function CustomHeartIcon({ label = "Like", ...props }) {
|
|
35
|
+
<AuralIconDocsPage
|
|
36
|
+
accentToken="negative"
|
|
37
|
+
features={[
|
|
38
|
+
{ title: "Favourite", description: "Like or save content" },
|
|
39
|
+
{ title: "Engagement", description: "User love / reaction icon" },
|
|
40
|
+
{ title: "Accessible", description: "ARIA-ready by default" },
|
|
41
|
+
]}
|
|
42
|
+
quickStart={{
|
|
43
|
+
codeExample: `import { HeartIcon } from "src/ui/icons/heart-icon"
|
|
44
|
+
|
|
45
|
+
function LikeButton() {
|
|
775
46
|
return (
|
|
776
|
-
<
|
|
777
|
-
<HeartIcon
|
|
778
|
-
</
|
|
47
|
+
<button>
|
|
48
|
+
<HeartIcon className="h-5 w-5 text-fm-icon-negative" />
|
|
49
|
+
</button>
|
|
779
50
|
)
|
|
780
|
-
}
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
<
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
|
|
815
|
-
<div className="bg-fm-icon-warning/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
|
|
816
|
-
<span className="text-2xl">⭐</span>
|
|
817
|
-
</div>
|
|
818
|
-
<div>
|
|
819
|
-
<div className="text-fm-icon-active font-medium">
|
|
820
|
-
StarIcon
|
|
821
|
-
</div>
|
|
822
|
-
<div className="text-fm-tertiary text-xs">
|
|
823
|
-
Rating & favorites
|
|
824
|
-
</div>
|
|
825
|
-
</div>
|
|
826
|
-
</div>
|
|
827
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
|
|
828
|
-
<div className="bg-fm-icon-info/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
|
|
829
|
-
<span className="text-fm-icon-active! !text-2xl">👍</span>
|
|
830
|
-
</div>
|
|
831
|
-
<div>
|
|
832
|
-
<div className="text-fm-icon-active font-medium">
|
|
833
|
-
ThumbsUpIcon
|
|
834
|
-
</div>
|
|
835
|
-
<div className="text-fm-tertiary text-xs">
|
|
836
|
-
Positive reactions
|
|
837
|
-
</div>
|
|
838
|
-
</div>
|
|
839
|
-
</div>
|
|
840
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
|
|
841
|
-
<div className="bg-fm-secondary-500/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
|
|
842
|
-
<span className="text-2xl">🔖</span>
|
|
843
|
-
</div>
|
|
844
|
-
<div>
|
|
845
|
-
<div className="text-fm-icon-active font-medium">
|
|
846
|
-
BookmarkIcon
|
|
847
|
-
</div>
|
|
848
|
-
<div className="text-fm-tertiary text-xs">
|
|
849
|
-
Save for later
|
|
850
|
-
</div>
|
|
851
|
-
</div>
|
|
852
|
-
</div>
|
|
853
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
|
|
854
|
-
<div className="bg-fm-icon-warning/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
|
|
855
|
-
<span className="text-2xl">📤</span>
|
|
856
|
-
</div>
|
|
857
|
-
<div>
|
|
858
|
-
<div className="text-fm-icon-active font-medium">
|
|
859
|
-
ShareIcon
|
|
860
|
-
</div>
|
|
861
|
-
<div className="text-fm-tertiary text-xs">
|
|
862
|
-
Social sharing
|
|
863
|
-
</div>
|
|
864
|
-
</div>
|
|
865
|
-
</div>
|
|
866
|
-
</div>
|
|
867
|
-
</div>
|
|
868
|
-
</div>
|
|
869
|
-
|
|
870
|
-
{/* Footer */}
|
|
871
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary border-t backdrop-blur-xl">
|
|
872
|
-
<div className="!mx-auto max-w-7xl px-6 py-8">
|
|
873
|
-
<div className="!space-y-4 text-center">
|
|
874
|
-
<p className="text-fm-tertiary!">
|
|
875
|
-
HeartIcon is part of the Aural UI icon library, built with
|
|
876
|
-
accessibility and consistency in mind.
|
|
877
|
-
</p>
|
|
878
|
-
<p className="text-fm-placeholder! text-sm">
|
|
879
|
-
All icons use Radix UI's AccessibleIcon for screen reader
|
|
880
|
-
compatibility and follow WCAG guidelines.
|
|
881
|
-
</p>
|
|
882
|
-
</div>
|
|
883
|
-
</div>
|
|
884
|
-
</div>
|
|
885
|
-
</div>
|
|
886
|
-
</>
|
|
51
|
+
}`,
|
|
52
|
+
livePreview: (
|
|
53
|
+
<button>
|
|
54
|
+
<HeartIcon className="text-fm-icon-negative h-6 w-6" />
|
|
55
|
+
</button>
|
|
56
|
+
),
|
|
57
|
+
}}
|
|
58
|
+
relatedIcons={[
|
|
59
|
+
{
|
|
60
|
+
name: "StarIcon",
|
|
61
|
+
description: "Star / rating icon",
|
|
62
|
+
icon: StarIcon,
|
|
63
|
+
accentToken: "info",
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: "ShareIcon",
|
|
67
|
+
description: "Share content icon",
|
|
68
|
+
icon: ShareIcon,
|
|
69
|
+
accentToken: "positive",
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: "CoinIcon",
|
|
73
|
+
description: "In-app coin / token icon",
|
|
74
|
+
icon: CoinIcon,
|
|
75
|
+
accentToken: "warning",
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: "StoreCoinIcon",
|
|
79
|
+
description: "Store / shop coin icon",
|
|
80
|
+
icon: StoreCoinIcon,
|
|
81
|
+
accentToken: "negative",
|
|
82
|
+
},
|
|
83
|
+
]}
|
|
84
|
+
/>
|
|
887
85
|
),
|
|
888
86
|
},
|
|
889
87
|
},
|
|
890
88
|
tags: ["autodocs"],
|
|
891
89
|
argTypes: {
|
|
892
|
-
|
|
893
|
-
control:
|
|
894
|
-
description: "
|
|
90
|
+
className: {
|
|
91
|
+
control: "text",
|
|
92
|
+
description: "CSS classes including color token",
|
|
895
93
|
},
|
|
896
94
|
withAccessibility: {
|
|
897
95
|
control: "boolean",
|
|
898
|
-
description: "
|
|
899
|
-
},
|
|
900
|
-
height: {
|
|
901
|
-
control: { type: "range", min: 8, max: 96, step: 2 },
|
|
902
|
-
description: "Height of the icon in pixels",
|
|
903
|
-
},
|
|
904
|
-
stroke: {
|
|
905
|
-
control: "color",
|
|
906
|
-
description: "Stroke color of the icon",
|
|
907
|
-
},
|
|
908
|
-
className: {
|
|
909
|
-
control: "text",
|
|
910
|
-
description: "CSS classes for styling",
|
|
96
|
+
description: "Wrap with accessibility label",
|
|
911
97
|
},
|
|
912
98
|
},
|
|
913
99
|
}
|
|
@@ -915,218 +101,89 @@ function CustomHeartIcon({ label = "Like", ...props }) {
|
|
|
915
101
|
export default meta
|
|
916
102
|
type Story = StoryObj<typeof HeartIcon>
|
|
917
103
|
|
|
918
|
-
// Story parameters for consistent dark theme
|
|
919
|
-
const storyParameters = {
|
|
920
|
-
backgrounds: {
|
|
921
|
-
default: "dark",
|
|
922
|
-
values: [
|
|
923
|
-
{ name: "dark", value: "var(--color-fm-surface-primary)" },
|
|
924
|
-
{ name: "darker", value: "var(--color-fm-neutral-0)" },
|
|
925
|
-
],
|
|
926
|
-
},
|
|
927
|
-
}
|
|
928
|
-
|
|
929
104
|
export const Default: Story = {
|
|
930
105
|
args: {
|
|
931
|
-
|
|
932
|
-
height: 24,
|
|
933
|
-
className: "text-fm-icon-negative",
|
|
106
|
+
className: "h-6 w-6 text-fm-icon-negative",
|
|
934
107
|
withAccessibility: true,
|
|
935
108
|
},
|
|
936
|
-
parameters: storyParameters,
|
|
937
109
|
render: (args) => (
|
|
938
|
-
<
|
|
110
|
+
<IconDefaultCanvas>
|
|
939
111
|
<HeartIcon {...args} />
|
|
940
|
-
</
|
|
112
|
+
</IconDefaultCanvas>
|
|
941
113
|
),
|
|
942
114
|
}
|
|
943
115
|
|
|
944
116
|
export const SizeVariations: Story = {
|
|
945
|
-
|
|
946
|
-
...storyParameters,
|
|
947
|
-
docs: {
|
|
948
|
-
description: {
|
|
949
|
-
story:
|
|
950
|
-
"HeartIcon in different sizes, from small UI elements to large displays.",
|
|
951
|
-
},
|
|
952
|
-
},
|
|
953
|
-
},
|
|
954
|
-
render: () => (
|
|
955
|
-
<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">
|
|
956
|
-
<div className="text-center">
|
|
957
|
-
<HeartIcon className="text-fm-icon-negative !mx-auto mb-2 h-3 w-3" />
|
|
958
|
-
<span className="text-fm-tertiary text-xs">12px</span>
|
|
959
|
-
</div>
|
|
960
|
-
<div className="text-center">
|
|
961
|
-
<HeartIcon className="text-fm-icon-negative !mx-auto mb-2 h-4 w-4" />
|
|
962
|
-
<span className="text-fm-tertiary text-xs">16px</span>
|
|
963
|
-
</div>
|
|
964
|
-
<div className="text-center">
|
|
965
|
-
<HeartIcon className="text-fm-icon-negative !mx-auto mb-2 h-5 w-5" />
|
|
966
|
-
<span className="text-fm-tertiary text-xs">20px</span>
|
|
967
|
-
</div>
|
|
968
|
-
<div className="text-center">
|
|
969
|
-
<HeartIcon className="text-fm-icon-negative !mx-auto mb-2 h-6 w-6" />
|
|
970
|
-
<span className="text-fm-tertiary text-xs">24px</span>
|
|
971
|
-
</div>
|
|
972
|
-
<div className="text-center">
|
|
973
|
-
<HeartIcon className="text-fm-icon-negative !mx-auto mb-2 h-8 w-8" />
|
|
974
|
-
<span className="text-fm-tertiary text-xs">32px</span>
|
|
975
|
-
</div>
|
|
976
|
-
<div className="text-center">
|
|
977
|
-
<HeartIcon className="text-fm-icon-negative !mx-auto mb-2 h-12 w-12" />
|
|
978
|
-
<span className="text-fm-tertiary text-xs">48px</span>
|
|
979
|
-
</div>
|
|
980
|
-
</div>
|
|
981
|
-
),
|
|
117
|
+
render: () => <IconSizeVariations icon={HeartIcon} />,
|
|
982
118
|
}
|
|
983
119
|
|
|
984
120
|
export const ColorVariations: Story = {
|
|
985
|
-
|
|
986
|
-
...storyParameters,
|
|
987
|
-
docs: {
|
|
988
|
-
description: {
|
|
989
|
-
story: "HeartIcon in different emotional colors for various contexts.",
|
|
990
|
-
},
|
|
991
|
-
},
|
|
992
|
-
},
|
|
993
|
-
render: () => (
|
|
994
|
-
<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">
|
|
995
|
-
<div className="text-center">
|
|
996
|
-
<div className="border-fm-icon-negative/30 bg-fm-icon-negative/20 !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
|
|
997
|
-
<HeartIcon className="text-fm-icon-negative h-8 w-8" />
|
|
998
|
-
</div>
|
|
999
|
-
<div className="text-fm-icon-active text-sm font-medium">Love</div>
|
|
1000
|
-
<div className="text-fm-icon-negative text-xs">
|
|
1001
|
-
text-fm-icon-negative
|
|
1002
|
-
</div>
|
|
1003
|
-
</div>
|
|
1004
|
-
<div className="text-center">
|
|
1005
|
-
<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">
|
|
1006
|
-
<HeartIcon className="text-fm-secondary-600 h-8 w-8" />
|
|
1007
|
-
</div>
|
|
1008
|
-
<div className="text-fm-icon-active text-sm font-medium">Affection</div>
|
|
1009
|
-
<div className="text-fm-secondary-600 text-xs">
|
|
1010
|
-
text-fm-secondary-600
|
|
1011
|
-
</div>
|
|
1012
|
-
</div>
|
|
1013
|
-
<div className="text-center">
|
|
1014
|
-
<div className="border-fm-icon-negative/30 bg-fm-icon-negative/20 !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
|
|
1015
|
-
<HeartIcon className="text-fm-icon-negative h-8 w-8" />
|
|
1016
|
-
</div>
|
|
1017
|
-
<div className="text-fm-icon-active text-sm font-medium">Romance</div>
|
|
1018
|
-
<div className="text-fm-icon-negative text-xs">
|
|
1019
|
-
text-fm-icon-negative
|
|
1020
|
-
</div>
|
|
1021
|
-
</div>
|
|
1022
|
-
<div className="text-center">
|
|
1023
|
-
<div className="border-fm-divider-primary bg-fm-surface-secondary !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
|
|
1024
|
-
<HeartIcon className="text-fm-placeholder h-8 w-8" />
|
|
1025
|
-
</div>
|
|
1026
|
-
<div className="text-fm-icon-active text-sm font-medium">Inactive</div>
|
|
1027
|
-
<div className="text-fm-placeholder text-xs">text-fm-placeholder</div>
|
|
1028
|
-
</div>
|
|
1029
|
-
</div>
|
|
1030
|
-
),
|
|
121
|
+
render: () => <IconColorVariations icon={HeartIcon} />,
|
|
1031
122
|
}
|
|
1032
123
|
|
|
1033
124
|
export const UsageExamples: Story = {
|
|
1034
|
-
parameters: {
|
|
1035
|
-
...storyParameters,
|
|
1036
|
-
docs: {
|
|
1037
|
-
description: {
|
|
1038
|
-
story:
|
|
1039
|
-
"Real-world usage examples showing HeartIcon in different UI contexts.",
|
|
1040
|
-
},
|
|
1041
|
-
},
|
|
1042
|
-
},
|
|
1043
125
|
render: () => (
|
|
1044
|
-
<
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
<
|
|
1053
|
-
|
|
1054
|
-
</button>
|
|
1055
|
-
<button className="border-fm-divider-primary bg-fm-surface-tertiary/20 text-fm-secondary hover:bg-fm-surface-tertiary/30 flex items-center gap-2 rounded-lg border px-3 py-2 transition-colors">
|
|
1056
|
-
<HeartIcon className="h-4 w-4" />
|
|
1057
|
-
Like
|
|
1058
|
-
</button>
|
|
126
|
+
<IconUsageCanvas>
|
|
127
|
+
<IconUsageSection title="Like 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 font-medium">
|
|
130
|
+
The Lost Kingdom
|
|
131
|
+
</span>
|
|
132
|
+
<div className="flex items-center gap-2">
|
|
133
|
+
<HeartIcon className="text-fm-icon-negative h-5 w-5" />
|
|
134
|
+
<span className="text-fm-secondary font-fm-text text-sm">2.4k</span>
|
|
135
|
+
</div>
|
|
1059
136
|
</div>
|
|
1060
|
-
</
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
<div className="flex items-center gap-3">
|
|
1070
|
-
<div className="bg-fm-icon-info/20 h-10 w-10 rounded-lg"></div>
|
|
1071
|
-
<div>
|
|
1072
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
1073
|
-
Premium Headphones
|
|
1074
|
-
</div>
|
|
1075
|
-
<div className="text-fm-tertiary text-xs">$299 • In Stock</div>
|
|
137
|
+
</IconUsageSection>
|
|
138
|
+
|
|
139
|
+
<IconUsageSection title="Story Card Actions">
|
|
140
|
+
<div className="border-fm-divider-secondary bg-fm-surface-secondary w-full max-w-sm rounded-xl border p-4">
|
|
141
|
+
<div className="flex items-center gap-3">
|
|
142
|
+
<div className="bg-fm-divider-secondary h-14 w-14 shrink-0 rounded-xl" />
|
|
143
|
+
<div className="flex-1">
|
|
144
|
+
<div className="text-fm-primary font-fm-text text-sm font-medium">
|
|
145
|
+
Midnight Echoes
|
|
1076
146
|
</div>
|
|
147
|
+
<div className="text-fm-secondary font-fm-text text-xs">
|
|
148
|
+
8 episodes
|
|
149
|
+
</div>
|
|
150
|
+
</div>
|
|
151
|
+
<div className="flex gap-3">
|
|
152
|
+
<HeartIcon className="text-fm-icon-negative h-5 w-5" />
|
|
153
|
+
<ShareIcon className="text-fm-icon-inactive h-5 w-5" />
|
|
1077
154
|
</div>
|
|
1078
|
-
<button className="bg-fm-icon-negative/20 text-fm-icon-negative hover:bg-fm-icon-negative/30 rounded-lg p-2 transition-colors">
|
|
1079
|
-
<HeartIcon className="h-4 w-4" fill="currentColor" />
|
|
1080
|
-
</button>
|
|
1081
155
|
</div>
|
|
1082
156
|
</div>
|
|
1083
|
-
</
|
|
157
|
+
</IconUsageSection>
|
|
1084
158
|
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
Just launched our new design system! 🎨✨
|
|
159
|
+
<IconUsageSection title="Inactive State">
|
|
160
|
+
<div className="flex gap-4">
|
|
161
|
+
<div className="flex flex-col items-center gap-1">
|
|
162
|
+
<HeartIcon className="text-fm-icon-negative h-6 w-6" />
|
|
163
|
+
<span className="text-fm-secondary font-fm-text text-xs">
|
|
164
|
+
Liked
|
|
165
|
+
</span>
|
|
1093
166
|
</div>
|
|
1094
|
-
<div className="flex items-center gap-
|
|
1095
|
-
<
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
</
|
|
1099
|
-
<button className="text-fm-placeholder hover:text-fm-icon-info flex items-center gap-2 transition-colors">
|
|
1100
|
-
<span className="text-sm">💬</span>
|
|
1101
|
-
<span className="text-sm">32</span>
|
|
1102
|
-
</button>
|
|
167
|
+
<div className="flex flex-col items-center gap-1">
|
|
168
|
+
<HeartIcon className="text-fm-icon-inactive h-6 w-6" />
|
|
169
|
+
<span className="text-fm-secondary font-fm-text text-xs">
|
|
170
|
+
Not liked
|
|
171
|
+
</span>
|
|
1103
172
|
</div>
|
|
1104
173
|
</div>
|
|
1105
|
-
</
|
|
1106
|
-
</
|
|
174
|
+
</IconUsageSection>
|
|
175
|
+
</IconUsageCanvas>
|
|
1107
176
|
),
|
|
1108
177
|
}
|
|
1109
178
|
|
|
1110
179
|
export const Playground: Story = {
|
|
1111
|
-
parameters: {
|
|
1112
|
-
...storyParameters,
|
|
1113
|
-
docs: {
|
|
1114
|
-
description: {
|
|
1115
|
-
story:
|
|
1116
|
-
"Interactive playground to experiment with different HeartIcon configurations.",
|
|
1117
|
-
},
|
|
1118
|
-
},
|
|
1119
|
-
},
|
|
1120
180
|
args: {
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
className: "text-fm-icon-negative",
|
|
181
|
+
className: "h-8 w-8 text-fm-icon-negative",
|
|
182
|
+
withAccessibility: true,
|
|
1124
183
|
},
|
|
1125
184
|
render: (args) => (
|
|
1126
|
-
<
|
|
1127
|
-
<
|
|
1128
|
-
|
|
1129
|
-
</div>
|
|
1130
|
-
</div>
|
|
185
|
+
<IconPlaygroundCanvas>
|
|
186
|
+
<HeartIcon {...args} />
|
|
187
|
+
</IconPlaygroundCanvas>
|
|
1131
188
|
),
|
|
1132
189
|
}
|