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 { 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> = {
@@ -11,864 +25,76 @@ const meta: Meta<typeof ShareIcon> = {
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-blue-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-blue-500/10 via-transparent to-cyan-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-blue-500/30 bg-gradient-to-br from-blue-500/20 to-cyan-500/20">
90
- <ShareIcon className="h-12 w-12 text-blue-400" />
91
- </div>
92
- <h1 className="!text-fm-primary text-5xl font-bold">
93
- ShareIcon
94
- </h1>
95
- <p className="!mx-auto max-w-3xl text-xl leading-relaxed !text-white/70">
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-3xl font-bold text-blue-300">
106
- Accessible
107
- </div>
108
- <div className="text-sm text-white/60">
109
- Screen reader friendly
110
- </div>
111
- </div>
112
- <div className="h-8 w-px bg-white/20" />
113
- <div className="text-center">
114
- <div className="text-3xl font-bold text-cyan-300">
115
- Scalable
116
- </div>
117
- <div className="text-sm text-white/60">
118
- Any size needed
119
- </div>
120
- </div>
121
- <div className="h-8 w-px bg-white/20" />
122
- <div className="text-center">
123
- <div className="text-3xl font-bold text-purple-300">
124
- Flexible
125
- </div>
126
- <div className="text-sm text-white/60">
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-center text-3xl font-bold !text-white">
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-xl font-semibold !text-blue-300">
145
- Basic Usage
146
- </h3>
147
- <div className="rounded-lg bg-black/40 p-4">
148
- <pre className="overflow-x-auto text-sm !text-green-300">
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-xl font-semibold !text-blue-300">
162
- Live Preview
163
- </h3>
164
- <div className="flex h-32 items-center justify-center rounded-lg border border-white/10 bg-white/5">
165
- <ShareIcon className="h-12 w-12 text-blue-400" />
166
- </div>
167
- </div>
168
- </div>
169
- </div>
170
-
171
- {/* Props Documentation */}
172
- <div className="!space-y-8">
173
- <h2 className="text-center text-3xl font-bold !text-white">
174
- Props & Configuration
175
- </h2>
176
-
177
- <div className="overflow-hidden rounded-lg border border-white/10 bg-white/5">
178
- <div className="bg-white/5 p-4">
179
- <h3 className="text-xl font-semibold !text-white">Props</h3>
180
- </div>
181
- <table className="!my-0 w-full">
182
- <thead className="bg-white/5">
183
- <tr className="border-b border-white/10">
184
- <th className="px-6 py-4 text-left text-sm font-semibold !text-white">
185
- Prop
186
- </th>
187
- <th className="px-6 py-4 text-left text-sm font-semibold !text-white">
188
- Type
189
- </th>
190
- <th className="px-6 py-4 text-left text-sm font-semibold !text-white">
191
- Default
192
- </th>
193
- <th className="px-6 py-4 text-left text-sm font-semibold !text-white">
194
- Description
195
- </th>
196
- </tr>
197
- </thead>
198
- <tbody>
199
- {" "}
200
- <tr className="!bg-black/10">
201
- <td className="px-6 py-4 font-mono text-sm !text-blue-300">
202
- withAccessibility
203
- </td>
204
- <td className="px-6 py-4 text-sm !text-white/70">
205
- boolean
206
- </td>
207
- <td className="px-6 py-4 text-sm !text-white/50">
208
- true
209
- </td>
210
- <td className="px-6 py-4 text-sm !text-white/70">
211
- Whether to wrap the icon with accessibility feature
212
- </td>
213
- </tr>
214
- <tr className="border-b border-white/5 !bg-black/10">
215
- <td className="px-6 py-4 font-mono text-sm !text-blue-300">
216
- height
217
- </td>
218
- <td className="px-6 py-4 text-sm !text-white/70">
219
- number | string
220
- </td>
221
- <td className="px-6 py-4 text-sm !text-white/50">24</td>
222
- <td className="px-6 py-4 text-sm !text-white/70">
223
- Height of the icon in pixels
224
- </td>
225
- </tr>
226
- <tr className="border-b border-white/5">
227
- <td className="px-6 py-4 font-mono text-sm !text-blue-300">
228
- stroke
229
- </td>
230
- <td className="px-6 py-4 text-sm !text-white/70">
231
- string
232
- </td>
233
- <td className="px-6 py-4 text-sm !text-white/50">
234
- currentColor
235
- </td>
236
- <td className="px-6 py-4 text-sm !text-white/70">
237
- Stroke color of the share icon
238
- </td>
239
- </tr>
240
- <tr className="border-b border-white/5 !bg-black/10">
241
- <td className="px-6 py-4 font-mono text-sm !text-blue-300">
242
- strokeWidth
243
- </td>
244
- <td className="px-6 py-4 text-sm !text-white/70">
245
- number | string
246
- </td>
247
- <td className="px-6 py-4 text-sm !text-white/50">
248
- 1.5
249
- </td>
250
- <td className="px-6 py-4 text-sm !text-white/70">
251
- Width of the stroke line
252
- </td>
253
- </tr>
254
- <tr className="border-b border-white/5">
255
- <td className="px-6 py-4 font-mono text-sm !text-blue-300">
256
- strokeLinecap
257
- </td>
258
- <td className="px-6 py-4 text-sm !text-white/70">
259
- string
260
- </td>
261
- <td className="px-6 py-4 text-sm !text-white/50">
262
- square
263
- </td>
264
- <td className="px-6 py-4 text-sm !text-white/70">
265
- Style of line endings
266
- </td>
267
- </tr>
268
- <tr className="border-b border-white/5 !bg-black/10">
269
- <td className="px-6 py-4 font-mono text-sm !text-blue-300">
270
- className
271
- </td>
272
- <td className="px-6 py-4 text-sm !text-white/70">
273
- string
274
- </td>
275
- <td className="px-6 py-4 text-sm !text-white/50">-</td>
276
- <td className="px-6 py-4 text-sm !text-white/70">
277
- CSS classes for styling
278
- </td>
279
- </tr>
280
- <tr className="!bg-black/10">
281
- <td className="px-6 py-4 font-mono text-sm !text-blue-300">
282
- onClick
283
- </td>
284
- <td className="px-6 py-4 text-sm !text-white/70">
285
- function
286
- </td>
287
- <td className="px-6 py-4 text-sm !text-white/50">-</td>
288
- <td className="px-6 py-4 text-sm !text-white/70">
289
- Click handler for interactions
290
- </td>
291
- </tr>
292
- </tbody>
293
- </table>
294
- </div>
295
-
296
- {/* Styling Options */}
297
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
298
- <div className="!space-y-4">
299
- <h3 className="text-lg font-semibold !text-blue-300">
300
- Share Button Styles
301
- </h3>
302
- <div className="!space-y-4">
303
- <div className="flex gap-4">
304
- <button className="flex items-center gap-2 rounded-lg border border-blue-500/30 bg-blue-500/20 px-4 py-2 text-blue-200">
305
- <ShareIcon className="h-4 w-4" />
306
- Share
307
- </button>
308
- <button className="rounded-lg p-2 text-blue-400 transition-colors hover:bg-blue-500/20">
309
- <ShareIcon className="h-4 w-4" />
310
- </button>
311
- </div>
312
- <div className="rounded-lg bg-black/40 p-4">
313
- <pre className="overflow-x-auto text-sm !text-green-300">
314
- {`// Button with text
315
- <button className="flex items-center gap-2 bg-blue-500/20 border border-blue-500/30 px-4 py-2 rounded-lg">
316
- <ShareIcon className="h-4 w-4" />
317
- Share
318
- </button>
319
-
320
- // Icon only button
321
- <button className="p-2 rounded-lg text-blue-400 hover:bg-blue-500/20 transition-colors">
322
- <ShareIcon className="h-4 w-4" />
323
- </button>`}
324
- </pre>
325
- </div>
326
- </div>
327
- </div>
328
-
329
- <div className="!space-y-4">
330
- <h3 className="text-lg font-semibold !text-blue-300">
331
- Color Customization
332
- </h3>
333
- <div className="!space-y-4">
334
- <div className="flex gap-4">
335
- <ShareIcon className="h-6 w-6 text-blue-400" />
336
- <ShareIcon className="h-6 w-6 text-cyan-400" />
337
- <ShareIcon className="h-6 w-6 text-purple-400" />
338
- </div>
339
- <div className="rounded-lg bg-black/40 p-4">
340
- <pre className="overflow-x-auto text-sm !text-green-300">
341
- {`// Using Tailwind classes
342
- <ShareIcon className="h-6 w-6 text-blue-400" />
343
- <ShareIcon className="h-6 w-6 text-cyan-400" />
344
-
345
- // Using CSS custom properties
346
- <ShareIcon
347
- className="h-6 w-6"
348
- style={{ color: 'var(--color-share)' }}
349
- />
350
-
351
- // Direct stroke prop
352
- <ShareIcon
353
- width={24}
354
- height={24}
355
- stroke="#3b82f6"
356
- />`}
357
- </pre>
358
- </div>
359
- </div>
360
- </div>
361
- </div>
362
- </div>
363
-
364
- {/* Size Variations */}
365
- <div className="!space-y-8">
366
- <h2 className="text-center text-3xl font-bold !text-white">
367
- Size Variations
368
- </h2>
369
- <div className="rounded-lg border border-white/10 bg-white/5 p-8">
370
- <div className="!space-y-6">
371
- <div className="grid grid-cols-1 gap-8 md:grid-cols-2">
372
- <div className="!space-y-4">
373
- <h3 className="text-lg font-semibold !text-blue-300">
374
- Standard Sizes
375
- </h3>
376
- <div className="flex items-end gap-6 rounded-lg bg-black/20 p-6">
377
- <div className="text-center">
378
- <ShareIcon className="!mx-auto mb-2 h-3 w-3 text-blue-400" />
379
- <span className="text-xs text-white/60">12px</span>
380
- </div>
381
- <div className="text-center">
382
- <ShareIcon className="!mx-auto mb-2 h-4 w-4 text-blue-400" />
383
- <span className="text-xs text-white/60">16px</span>
384
- </div>
385
- <div className="text-center">
386
- <ShareIcon className="!mx-auto mb-2 h-5 w-5 text-blue-400" />
387
- <span className="text-xs text-white/60">20px</span>
388
- </div>
389
- <div className="text-center">
390
- <ShareIcon className="!mx-auto mb-2 h-6 w-6 text-blue-400" />
391
- <span className="text-xs text-white/60">24px</span>
392
- </div>
393
- <div className="text-center">
394
- <ShareIcon className="!mx-auto mb-2 h-8 w-8 text-blue-400" />
395
- <span className="text-xs text-white/60">32px</span>
396
- </div>
397
- <div className="text-center">
398
- <ShareIcon className="!mx-auto mb-2 h-12 w-12 text-blue-400" />
399
- <span className="text-xs text-white/60">48px</span>
400
- </div>
401
- </div>
402
- </div>
403
-
404
- <div className="!space-y-4">
405
- <h3 className="text-lg font-semibold !text-blue-300">
406
- Code Example
407
- </h3>
408
- <div className="rounded-lg bg-black/40 p-4">
409
- <pre className="overflow-x-auto text-sm !text-blue-300">
410
- {`// Small (16px)
411
- <ShareIcon className="h-4 w-4" />
412
-
413
- // Medium (24px)
414
- <ShareIcon className="h-6 w-6" />
415
-
416
- // Large (32px)
417
- <ShareIcon className="h-8 w-8" />
418
-
419
- // Custom size
420
- <ShareIcon width={40} height={40} />`}
421
- </pre>
422
- </div>
423
- </div>
424
- </div>
425
- </div>
426
- </div>
427
- </div>
428
-
429
- {/* Color Variations */}
430
- <div className="!space-y-8">
431
- <h2 className="text-center text-3xl font-bold !text-white">
432
- Color Variations
433
- </h2>
434
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
435
- <div className="!space-y-4">
436
- <h3 className="text-lg font-semibold !text-blue-300">
437
- Semantic Colors
438
- </h3>
439
- <div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
440
- <div className="flex items-center gap-4">
441
- <ShareIcon className="h-6 w-6 text-blue-400" />
442
- <div>
443
- <div className="text-sm font-medium text-white">
444
- Primary
445
- </div>
446
- <div className="text-xs text-white/60">
447
- text-blue-400
448
- </div>
449
- </div>
450
- </div>
451
- <div className="flex items-center gap-4">
452
- <ShareIcon className="h-6 w-6 text-cyan-400" />
453
- <div>
454
- <div className="text-sm font-medium text-white">
455
- Social
456
- </div>
457
- <div className="text-xs text-white/60">
458
- text-cyan-400
459
- </div>
460
- </div>
461
- </div>
462
- <div className="flex items-center gap-4">
463
- <ShareIcon className="h-6 w-6 text-purple-400" />
464
- <div>
465
- <div className="text-sm font-medium text-white">
466
- Creative
467
- </div>
468
- <div className="text-xs text-white/60">
469
- text-purple-400
470
- </div>
471
- </div>
472
- </div>
473
- <div className="flex items-center gap-4">
474
- <ShareIcon className="h-6 w-6 text-white/40" />
475
- <div>
476
- <div className="text-sm font-medium text-white">
477
- Disabled
478
- </div>
479
- <div className="text-xs text-white/60">
480
- text-white/40
481
- </div>
482
- </div>
483
- </div>
484
- </div>
485
- </div>
486
-
487
- <div className="!space-y-4">
488
- <h3 className="text-lg font-semibold !text-blue-300">
489
- Custom Colors
490
- </h3>
491
- <div className="rounded-lg bg-black/40 p-4">
492
- <pre className="overflow-x-auto text-sm !text-green-300">
493
- {`// Using Tailwind classes
494
- <ShareIcon className="h-6 w-6 text-blue-400" />
495
- <ShareIcon className="h-6 w-6 text-cyan-500" />
496
-
497
- // Using CSS custom properties
498
- <ShareIcon
499
- className="h-6 w-6"
500
- style={{ color: 'var(--color-share)' }}
501
- />
502
-
503
- // Direct stroke prop
504
- <ShareIcon
505
- width={24}
506
- height={24}
507
- stroke="#3b82f6"
508
- />`}
509
- </pre>
510
- </div>
511
- </div>
512
- </div>
513
- </div>
514
-
515
- {/* Usage Examples */}
516
- <div className="!space-y-8">
517
- <h2 className="text-center text-3xl font-bold !text-white">
518
- Usage Examples
519
- </h2>
520
-
521
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
522
- {/* Share Button */}
523
- <div className="!space-y-4">
524
- <h3 className="text-lg font-semibold !text-blue-300">
525
- Share Buttons
526
- </h3>
527
- <div className="!space-y-4">
528
- <div className="flex gap-4">
529
- <button className="flex items-center gap-2 rounded-lg border border-blue-500/30 bg-blue-500/20 px-4 py-2 text-blue-200 transition-colors hover:bg-blue-500/30">
530
- <ShareIcon className="h-4 w-4" />
531
- Share Post
532
- </button>
533
- <button className="flex items-center gap-2 rounded-lg border border-cyan-500/30 bg-cyan-500/20 px-3 py-2 text-cyan-200 transition-colors hover:bg-cyan-500/30">
534
- <ShareIcon className="h-4 w-4" />
535
- Share Link
536
- </button>
537
- </div>
538
- <div className="rounded-lg bg-black/40 p-4">
539
- <pre className="overflow-x-auto text-sm !text-green-300">
540
- {`// Primary share button
541
- <button className="flex items-center gap-2 bg-blue-500/20 border border-blue-500/30 px-4 py-2 rounded-lg">
542
- <ShareIcon className="h-4 w-4" />
543
- Share Post
544
- </button>
545
-
546
- // Secondary share button
547
- <button className="flex items-center gap-2 bg-cyan-500/20 border border-cyan-500/30 px-3 py-2 rounded-lg">
548
- <ShareIcon className="h-4 w-4" />
549
- Share Link
550
- </button>`}
551
- </pre>
552
- </div>
553
- </div>
554
- </div>
555
-
556
- {/* Social Share Menu */}
557
- <div className="!space-y-4">
558
- <h3 className="text-lg font-semibold !text-blue-300">
559
- Social Share Menu
560
- </h3>
561
- <div className="!space-y-4">
562
- <div className="rounded-lg border border-white/10 bg-white/5 p-4">
563
- <div className="mb-3 text-sm font-medium text-white">
564
- Share this article
565
- </div>
566
- <div className="flex gap-3">
567
- <button className="flex items-center gap-2 rounded-lg bg-blue-600 px-3 py-2 text-sm text-white transition-colors hover:bg-blue-700">
568
- <span>📘</span>
569
- Facebook
570
- </button>
571
- <button className="flex items-center gap-2 rounded-lg bg-black px-3 py-2 text-sm text-white transition-colors hover:bg-gray-800">
572
- <span>𝕏</span>
573
- Twitter
574
- </button>
575
- <button className="rounded-lg p-2 text-blue-400 transition-colors hover:bg-blue-500/20">
576
- <ShareIcon className="h-4 w-4" />
577
- </button>
578
- </div>
579
- </div>
580
- <div className="rounded-lg bg-black/40 p-4">
581
- <pre className="overflow-x-auto text-sm !text-green-300">
582
- {`<div className="flex gap-3">
583
- <button className="bg-blue-600 px-3 py-2 rounded-lg text-white">
584
- Facebook
585
- </button>
586
- <button className="bg-black px-3 py-2 rounded-lg text-white">
587
- Twitter
588
- </button>
589
- <button className="p-2 rounded-lg text-blue-400 hover:bg-blue-500/20 transition-colors">
590
- <ShareIcon className="h-4 w-4" />
591
- </button>
592
- </div>`}
593
- </pre>
594
- </div>
595
- </div>
596
- </div>
597
-
598
- {/* Content Card */}
599
- <div className="!space-y-4">
600
- <h3 className="text-lg font-semibold !text-blue-300">
601
- Content Card Actions
602
- </h3>
603
- <div className="!space-y-4">
604
- <div className="rounded-lg border border-white/10 bg-white/5 p-4">
605
- <div className="mb-3">
606
- <h4 className="mb-1 text-sm font-medium !text-white">
607
- Building Better User Interfaces
608
- </h4>
609
- <p className="text-xs !text-white/60">
610
- A comprehensive guide to modern design patterns
611
- </p>
612
- </div>
613
- <div className="flex items-center justify-between">
614
- <div className="flex items-center gap-4">
615
- <span className="text-xs text-white/60">
616
- 2 min read
617
- </span>
618
- <span className="text-xs text-white/60">•</span>
619
- <span className="text-xs text-white/60">
620
- Design
621
- </span>
622
- </div>
623
- <button className="rounded-lg p-2 text-blue-400 transition-colors hover:bg-blue-500/20">
624
- <ShareIcon className="h-4 w-4" />
625
- </button>
626
- </div>
627
- </div>
628
- <div className="rounded-lg bg-black/40 p-4">
629
- <pre className="overflow-x-auto text-sm !text-green-300">
630
- {`<div className="flex items-center justify-between">
631
- <div className="flex items-center gap-4">
632
- {/* Article metadata */}
633
- </div>
634
- <button className="p-2 rounded-lg text-blue-400 hover:bg-blue-500/20 transition-colors">
635
- <ShareIcon className="h-4 w-4" />
636
- </button>
637
- </div>`}
638
- </pre>
639
- </div>
640
- </div>
641
- </div>
642
-
643
- {/* Toolbar Action */}
644
- <div className="!space-y-4">
645
- <h3 className="text-lg font-semibold !text-blue-300">
646
- Toolbar Actions
647
- </h3>
648
- <div className="!space-y-4">
649
- <div className="rounded-lg border border-white/10 bg-white/5 p-4">
650
- <div className="flex items-center justify-between rounded border border-white/10 bg-black/30 p-3">
651
- <div className="flex items-center gap-3">
652
- <span className="text-sm font-medium text-white">
653
- Document.pdf
654
- </span>
655
- <span className="text-xs text-white/60">•</span>
656
- <span className="text-xs text-white/60">
657
- 2.4 MB
658
- </span>
659
- </div>
660
- <div className="flex items-center gap-2">
661
- <button className="rounded-lg p-2 text-gray-400 transition-colors hover:bg-blue-500/20 hover:text-blue-400">
662
- <span className="text-sm">👁️</span>
663
- </button>
664
- <button className="rounded-lg p-2 text-gray-400 transition-colors hover:bg-blue-500/20 hover:text-blue-400">
665
- <ShareIcon className="h-4 w-4" />
666
- </button>
667
- <button className="rounded-lg p-2 text-gray-400 transition-colors hover:bg-green-500/20 hover:text-green-400">
668
- <span className="text-sm">⬇️</span>
669
- </button>
670
- </div>
671
- </div>
672
- </div>
673
- <div className="rounded-lg bg-black/40 p-4">
674
- <pre className="overflow-x-auto text-sm !text-green-300">
675
- {`// File toolbar with share action
676
- <div className="flex items-center gap-2">
677
- <button className="p-2 rounded-lg text-gray-400 hover:bg-blue-500/20 hover:text-blue-400 transition-colors">
678
- <ShareIcon className="h-4 w-4" />
679
- </button>
680
- </div>`}
681
- </pre>
682
- </div>
683
- </div>
684
- </div>
685
- </div>
686
- </div>
687
-
688
- {/* Accessibility */}
689
- <div className="!space-y-8">
690
- <h2 className="text-center text-3xl font-bold !text-white">
691
- Accessibility Features
692
- </h2>
693
- <div className="grid grid-cols-1 gap-8 md:grid-cols-2">
694
- <div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
695
- <h3 className="text-lg font-semibold !text-green-300">
696
- ✅ Built-in Features
697
- </h3>
698
- <ul className="!space-y-2 text-sm !text-white/70">
699
- <li className="!text-white/70">
700
- Uses Radix UI AccessibleIcon wrapper
701
- </li>
702
- <li className="!text-white/70">
703
- Provides screen reader label "Share icon"
704
- </li>
705
- <li className="!text-white/70">
706
- Supports keyboard navigation when interactive
707
- </li>
708
- <li className="!text-white/70">
709
- Maintains proper color contrast ratios
710
- </li>
711
- <li className="!text-white/70">
712
- Scales with user's font size preferences
713
- </li>
714
- </ul>
715
- </div>
716
-
717
- <div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
718
- <h3 className="text-lg font-semibold !text-blue-300">
719
- 💡 Best Practices
720
- </h3>
721
- <ul className="!space-y-2 text-sm text-white/70">
722
- <li className="!text-white/70">
723
- Always pair with descriptive labels
724
- </li>
725
- <li className="!text-white/70">
726
- Provide clear feedback on share actions
727
- </li>
728
- <li className="!text-white/70">
729
- Ensure sufficient color contrast
730
- </li>
731
- <li className="!text-white/70">
732
- Add focus states for interactive elements
733
- </li>
734
- <li className="!text-white/70">
735
- Consider providing share confirmation
736
- </li>
737
- </ul>
738
- </div>
739
- </div>
740
-
741
- <div className="rounded-lg border border-white/10 bg-white/5 p-6">
742
- <h3 className="mb-4 text-lg font-semibold !text-purple-300">
743
- Custom Accessibility Label
744
- </h3>
745
- <div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
746
- <div className="rounded-lg bg-black/40 p-4">
747
- <pre className="overflow-x-auto text-sm !text-blue-300">
748
- {`// Custom implementation with specific label
749
- import { AccessibleIcon } from "@radix-ui/react-accessible-icon"
750
-
751
- function CustomShareIcon({ label = "Share", ...props }) {
752
- return (
753
- <AccessibleIcon label={label}>
754
- <ShareIcon {...props} />
755
- </AccessibleIcon>
756
- )
757
- }
758
-
759
- // Usage with specific context
760
- <CustomShareIcon
761
- label="Share this article"
762
- className="h-4 w-4 text-blue-400"
763
- />`}
764
- </pre>
765
- </div>
766
- <div className="!space-y-4">
767
- <p className="text-sm !text-white/70">
768
- For specific contexts, you can wrap the ShareIcon with a
769
- custom AccessibleIcon component that provides more
770
- descriptive labels.
771
- </p>
772
- <div className="rounded-lg border border-blue-500/20 bg-blue-500/10 p-4">
773
- <div className="flex items-center gap-2 text-sm text-blue-200">
774
- <ShareIcon className="h-4 w-4" />
775
- <span>
776
- This approach gives screen readers more context
777
- </span>
778
- </div>
779
- </div>
780
- </div>
781
- </div>
782
- </div>
783
- </div>
784
-
785
- {/* Related Icons */}
786
- <div className="!space-y-8">
787
- <h2 className="text-center text-3xl font-bold !text-white">
788
- Related Icons
789
- </h2>
790
- <div className="grid grid-cols-2 gap-6 md:grid-cols-4">
791
- <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
792
- <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-green-500/20">
793
- <span className="text-2xl">📤</span>
794
- </div>
795
- <div>
796
- <div className="font-medium text-white">SendIcon</div>
797
- <div className="text-xs text-white/60">Send messages</div>
798
- </div>
799
- </div>
800
- <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
801
- <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-purple-500/20">
802
- <span className="!text-2xl !text-white">🔗</span>
803
- </div>
804
- <div>
805
- <div className="font-medium text-white">LinkIcon</div>
806
- <div className="text-xs text-white/60">Copy links</div>
807
- </div>
808
- </div>
809
- <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
810
- <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-orange-500/20">
811
- <span className="text-2xl">📋</span>
812
- </div>
813
- <div>
814
- <div className="font-medium text-white">CopyIcon</div>
815
- <div className="text-xs text-white/60">Copy content</div>
816
- </div>
817
- </div>
818
- <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
819
- <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-blue-500/20">
820
- <span className="text-2xl">📧</span>
821
- </div>
822
- <div>
823
- <div className="font-medium text-white">EmailIcon</div>
824
- <div className="text-xs text-white/60">Email sharing</div>
825
- </div>
826
- </div>
827
- </div>
828
- </div>
829
- </div>
830
-
831
- {/* Footer */}
832
- <div className="border-t border-white/10 bg-black/20 backdrop-blur-xl">
833
- <div className="!mx-auto max-w-7xl px-6 py-8">
834
- <div className="!space-y-4 text-center">
835
- <p className="!text-white/60">
836
- ShareIcon is part of the Aural UI icon library, built with
837
- accessibility and consistency in mind.
838
- </p>
839
- <p className="text-sm !text-white/40">
840
- All icons use Radix UI's AccessibleIcon for screen reader
841
- compatibility and follow WCAG guidelines.
842
- </p>
843
- </div>
844
- </div>
845
- </div>
846
- </div>
847
- </>
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
+ />
848
86
  ),
849
87
  },
850
88
  },
851
89
  tags: ["autodocs"],
852
90
  argTypes: {
853
- width: {
854
- control: { type: "range", min: 8, max: 96, step: 2 },
855
- description: "Width of the icon in pixels",
91
+ className: {
92
+ control: "text",
93
+ description: "CSS classes including color token",
856
94
  },
857
95
  withAccessibility: {
858
96
  control: "boolean",
859
- description: "Whether to wrap the icon with accessibility features",
860
- },
861
- height: {
862
- control: { type: "range", min: 8, max: 96, step: 2 },
863
- description: "Height of the icon in pixels",
864
- },
865
- stroke: {
866
- control: "color",
867
- description: "Stroke color of the icon",
868
- },
869
- className: {
870
- control: "text",
871
- description: "CSS classes for styling",
97
+ description: "Wrap with accessibility label",
872
98
  },
873
99
  },
874
100
  }
@@ -876,214 +102,83 @@ function CustomShareIcon({ label = "Share", ...props }) {
876
102
  export default meta
877
103
  type Story = StoryObj<typeof ShareIcon>
878
104
 
879
- // Story parameters for consistent dark theme
880
- const storyParameters = {
881
- backgrounds: {
882
- default: "dark",
883
- values: [
884
- { name: "dark", value: "#0a0a0a" },
885
- { name: "darker", value: "#000000" },
886
- ],
887
- },
888
- }
889
-
890
105
  export const Default: Story = {
891
106
  args: {
892
- width: 24,
893
- height: 24,
894
- className: "text-blue-400",
107
+ className: "h-6 w-6 text-fm-icon-active",
895
108
  withAccessibility: true,
896
109
  },
897
- parameters: storyParameters,
898
110
  render: (args) => (
899
- <div className="flex h-32 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
111
+ <IconDefaultCanvas>
900
112
  <ShareIcon {...args} />
901
- </div>
113
+ </IconDefaultCanvas>
902
114
  ),
903
115
  }
904
116
 
905
117
  export const SizeVariations: Story = {
906
- parameters: {
907
- ...storyParameters,
908
- docs: {
909
- description: {
910
- story:
911
- "ShareIcon in different sizes, from small UI elements to large displays.",
912
- },
913
- },
914
- },
915
- render: () => (
916
- <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">
917
- <div className="text-center">
918
- <ShareIcon className="!mx-auto mb-2 h-3 w-3 text-blue-400" />
919
- <span className="text-xs text-white/60">12px</span>
920
- </div>
921
- <div className="text-center">
922
- <ShareIcon className="!mx-auto mb-2 h-4 w-4 text-blue-400" />
923
- <span className="text-xs text-white/60">16px</span>
924
- </div>
925
- <div className="text-center">
926
- <ShareIcon className="!mx-auto mb-2 h-5 w-5 text-blue-400" />
927
- <span className="text-xs text-white/60">20px</span>
928
- </div>
929
- <div className="text-center">
930
- <ShareIcon className="!mx-auto mb-2 h-6 w-6 text-blue-400" />
931
- <span className="text-xs text-white/60">24px</span>
932
- </div>
933
- <div className="text-center">
934
- <ShareIcon className="!mx-auto mb-2 h-8 w-8 text-blue-400" />
935
- <span className="text-xs text-white/60">32px</span>
936
- </div>
937
- <div className="text-center">
938
- <ShareIcon className="!mx-auto mb-2 h-12 w-12 text-blue-400" />
939
- <span className="text-xs text-white/60">48px</span>
940
- </div>
941
- </div>
942
- ),
118
+ render: () => <IconSizeVariations icon={ShareIcon} />,
943
119
  }
944
120
 
945
121
  export const ColorVariations: Story = {
946
- parameters: {
947
- ...storyParameters,
948
- docs: {
949
- description: {
950
- story:
951
- "ShareIcon in different semantic colors for various sharing contexts.",
952
- },
953
- },
954
- },
955
- render: () => (
956
- <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">
957
- <div className="text-center">
958
- <div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-blue-500/30 bg-blue-500/20">
959
- <ShareIcon className="h-8 w-8 text-blue-400" />
960
- </div>
961
- <div className="text-sm font-medium text-white">Primary</div>
962
- <div className="text-xs text-blue-400">text-blue-400</div>
963
- </div>
964
- <div className="text-center">
965
- <div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-cyan-500/30 bg-cyan-500/20">
966
- <ShareIcon className="h-8 w-8 text-cyan-400" />
967
- </div>
968
- <div className="text-sm font-medium text-white">Social</div>
969
- <div className="text-xs text-cyan-400">text-cyan-400</div>
970
- </div>
971
- <div className="text-center">
972
- <div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-purple-500/30 bg-purple-500/20">
973
- <ShareIcon className="h-8 w-8 text-purple-400" />
974
- </div>
975
- <div className="text-sm font-medium text-white">Creative</div>
976
- <div className="text-xs text-purple-400">text-purple-400</div>
977
- </div>
978
- <div className="text-center">
979
- <div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-white/20 bg-white/5">
980
- <ShareIcon className="h-8 w-8 text-white/40" />
981
- </div>
982
- <div className="text-sm font-medium text-white">Disabled</div>
983
- <div className="text-xs text-white/40">text-white/40</div>
984
- </div>
985
- </div>
986
- ),
122
+ render: () => <IconColorVariations icon={ShareIcon} />,
987
123
  }
988
124
 
989
125
  export const UsageExamples: Story = {
990
- parameters: {
991
- ...storyParameters,
992
- docs: {
993
- description: {
994
- story:
995
- "Real-world usage examples showing ShareIcon in different UI contexts.",
996
- },
997
- },
998
- },
999
126
  render: () => (
1000
- <div className="min-h-dvh !space-y-8 rounded-lg bg-gradient-to-br from-gray-900 to-gray-800 p-8">
1001
- {/* Share Buttons */}
1002
- <div className="!space-y-2">
1003
- <h3 className="text-sm font-medium text-white">Share Buttons</h3>
1004
- <div className="flex gap-4">
1005
- <button className="flex items-center gap-2 rounded-lg border border-blue-500/30 bg-blue-500/20 px-4 py-2 text-blue-200 transition-colors hover:bg-blue-500/30">
1006
- <ShareIcon className="h-4 w-4" />
1007
- Share Post
1008
- </button>
1009
- <button className="flex items-center gap-2 rounded-lg border border-cyan-500/30 bg-cyan-500/20 px-3 py-2 text-cyan-200 transition-colors hover:bg-cyan-500/30">
1010
- <ShareIcon className="h-4 w-4" />
1011
- Share Link
1012
- </button>
1013
- </div>
1014
- </div>
1015
-
1016
- {/* Social Share Menu */}
1017
- <div className="!space-y-2">
1018
- <h3 className="text-sm font-medium text-white">Social Share Menu</h3>
1019
- <div className="rounded-lg border border-white/10 bg-white/5 p-4">
1020
- <div className="mb-3 text-sm font-medium text-white">
1021
- Share this article
1022
- </div>
1023
- <div className="flex gap-3">
1024
- <button className="flex items-center gap-2 rounded-lg bg-blue-600 px-3 py-2 text-sm text-white transition-colors hover:bg-blue-700">
1025
- <span>📘</span>
1026
- Facebook
1027
- </button>
1028
- <button className="flex items-center gap-2 rounded-lg bg-black px-3 py-2 text-sm text-white transition-colors hover:bg-gray-800">
1029
- <span>𝕏</span>
1030
- Twitter
1031
- </button>
1032
- <button className="rounded-lg p-2 text-blue-400 transition-colors hover:bg-blue-500/20">
1033
- <ShareIcon className="h-4 w-4" />
1034
- </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>
1035
151
  </div>
1036
152
  </div>
1037
- </div>
1038
-
1039
- {/* Content Card */}
1040
- <div className="!space-y-2">
1041
- <h3 className="text-sm font-medium text-white">Content Card Actions</h3>
1042
- <div className="rounded-lg border border-white/10 bg-white/5 p-4">
1043
- <div className="mb-3">
1044
- <h4 className="mb-1 text-sm font-medium !text-white">
1045
- Building Better User Interfaces
1046
- </h4>
1047
- <p className="text-xs !text-white/60">
1048
- A comprehensive guide to modern design patterns
1049
- </p>
1050
- </div>
1051
- <div className="flex items-center justify-between">
1052
- <div className="flex items-center gap-4">
1053
- <span className="text-xs text-white/60">2 min read</span>
1054
- <span className="text-xs text-white/60">•</span>
1055
- <span className="text-xs text-white/60">Design</span>
1056
- </div>
1057
- <button className="rounded-lg p-2 text-blue-400 transition-colors hover:bg-blue-500/20">
1058
- <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>
1059
166
  </button>
1060
- </div>
167
+ ))}
1061
168
  </div>
1062
- </div>
1063
- </div>
169
+ </IconUsageSection>
170
+ </IconUsageCanvas>
1064
171
  ),
1065
172
  }
1066
173
 
1067
174
  export const Playground: Story = {
1068
- parameters: {
1069
- ...storyParameters,
1070
- docs: {
1071
- description: {
1072
- story:
1073
- "Interactive playground to experiment with different ShareIcon configurations.",
1074
- },
1075
- },
1076
- },
1077
175
  args: {
1078
- width: 32,
1079
- height: 32,
1080
- className: "text-blue-400",
176
+ className: "h-8 w-8 text-fm-icon-active",
177
+ withAccessibility: true,
1081
178
  },
1082
179
  render: (args) => (
1083
- <div className="flex h-64 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
1084
- <div className="rounded-lg border border-white/10 bg-white/5 p-8">
1085
- <ShareIcon {...args} />
1086
- </div>
1087
- </div>
180
+ <IconPlaygroundCanvas>
181
+ <ShareIcon {...args} />
182
+ </IconPlaygroundCanvas>
1088
183
  ),
1089
184
  }