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