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