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 { EditBigIcon } from "src/ui/icons/edit-big-icon"
5
+ import { PencilIcon } from "src/ui/icons/pencil-icon"
6
+ import { ShareIcon } from "src/ui/icons/share-icon"
7
+ import { TrashIcon } from "src/ui/icons/trash-icon"
8
+ import {
9
+ IconColorVariations,
10
+ IconDefaultCanvas,
11
+ IconPlaygroundCanvas,
12
+ IconSizeVariations,
13
+ IconUsageCanvas,
14
+ IconUsageSection,
15
+ } from "src/ui/story-spec/icons/icon-story-canvas"
16
+ import { AuralIconDocsPage } from "src/ui/story-spec/icons/icon-story-docs-page"
17
+
4
18
  import { CopyIcon } from "."
5
19
 
6
20
  const meta: Meta<typeof CopyIcon> = {
@@ -11,820 +25,78 @@ const meta: Meta<typeof CopyIcon> = {
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 ;
27
- max-width: none ;
28
- background: transparent ;
29
- }
30
- .sbdocs-content {
31
- max-width: none ;
32
- padding: 0 ;
33
- margin: 0 ;
34
- background: transparent ;
35
- }
36
- .docs-story {
37
- background: transparent ;
38
- }
39
- .sbdocs {
40
- background: transparent ;
41
- }
42
- body {
43
- background: #0a0a0a ;
44
- }
45
- #storybook-docs {
46
- background: #0a0a0a ;
47
- }
48
- .sbdocs-preview {
49
- background: transparent ;
50
- border: none ;
51
- }
52
- .sbdocs-h1, .sbdocs-h2, .sbdocs-h3, .sbdocs-h4, .sbdocs-h5, .sbdocs-h6 {
53
- color: white ;
54
- }
55
- .sbdocs-p, .sbdocs-li {
56
- color: rgba(255, 255, 255, 0.7) ;
57
- }
58
- .sbdocs-code {
59
- background: rgba(255, 255, 255, 0.1) ;
60
- color: rgba(168, 85, 247, 1) ;
61
- border: 1px solid rgba(255, 255, 255, 0.1) ;
62
- }
63
- .sbdocs-pre {
64
- background: rgba(0, 0, 0, 0.4) ;
65
- border: 1px solid rgba(255, 255, 255, 0.1) ;
66
- }
67
- .sbdocs-table {
68
- background: rgba(255, 255, 255, 0.05) ;
69
- border: 1px solid rgba(255, 255, 255, 0.1) ;
70
- }
71
- .sbdocs-table th {
72
- background: rgba(255, 255, 255, 0.05) ;
73
- color: white ;
74
- border-bottom: 1px solid rgba(255, 255, 255, 0.1) ;
75
- }
76
- .sbdocs-table td {
77
- color: rgba(255, 255, 255, 0.7) ;
78
- border-bottom: 1px solid rgba(255, 255, 255, 0.05) ;
79
- }
80
- `}
81
- </style>
82
-
83
- <div className="min-h-screen bg-gradient-to-br from-gray-900 via-purple-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-purple-500/10 via-transparent to-green-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-purple-500/30 bg-gradient-to-br from-purple-500/20 to-green-500/20">
90
- <CopyIcon className="h-12 w-12 text-purple-400" />
91
- </div>
92
- <h1 className="!text-fm-primary text-5xl font-bold">
93
- CopyIcon
94
- </h1>
95
- <p className="!mx-auto max-w-3xl text-xl leading-relaxed !text-white/70">
96
- A copy icon used for duplicating text, links, or code. Great
97
- for buttons that copy content to the clipboard. 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-purple-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-green-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-blue-300">
124
- Navigation
125
- </div>
126
- <div className="text-sm text-white/60">
127
- Upward movement
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-purple-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 { Copy } from "lucide-react"
150
-
151
- function CopyButton({ text }) {
35
+ <AuralIconDocsPage
36
+ accentToken="info"
37
+ features={[
38
+ {
39
+ title: "Copy Action",
40
+ description: "Duplicate content to clipboard",
41
+ },
42
+ { title: "Quick Action", description: "One-tap copy trigger" },
43
+ { title: "Accessible", description: "ARIA-ready by default" },
44
+ ]}
45
+ quickStart={{
46
+ codeExample: `import { CopyIcon } from "src/ui/icons/copy-icon"
47
+
48
+ function CopyButton({ text }: { text: string }) {
152
49
  return (
153
- <button className="flex items-center gap-2">
154
- <CopyIcon className="h-4 w-4 text-purple-400" />
155
- <span>Copy to Clipboard</span>
50
+ <button onClick={() => navigator.clipboard.writeText(text)}>
51
+ <CopyIcon className="h-4 w-4 text-fm-icon-active" />
156
52
  </button>
157
53
  )
158
- }`}
159
- </pre>
160
- </div>
161
- </div>
162
-
163
- <div className="!space-y-4">
164
- <h3 className="text-xl font-semibold !text-purple-300">
165
- Live Preview
166
- </h3>
167
- <div className="flex h-32 items-center justify-center rounded-lg border border-white/10 bg-white/5">
168
- <button className="flex items-center gap-3 rounded-lg border border-purple-500/20 bg-purple-500/10 px-4 py-2 transition-colors hover:bg-purple-500/20">
169
- <CopyIcon className="h-4 w-4 text-purple-400" />
170
- <span className="text-white">Copy to Clipboard</span>
171
- </button>
172
- </div>
173
- </div>
174
- </div>
175
- </div>
176
-
177
- {/* Props Documentation */}
178
- <div className="!space-y-8">
179
- <h2 className="text-center text-3xl font-bold !text-white">
180
- Props & Configuration
181
- </h2>
182
-
183
- <div className="overflow-hidden rounded-lg border border-white/10 bg-white/5">
184
- <div className="bg-white/5 p-4">
185
- <h3 className="text-xl font-semibold !text-white">Props</h3>
186
- </div>
187
- <table className="!my-0 w-full">
188
- <thead className="bg-white/5">
189
- <tr className="border-b border-white/10">
190
- <th className="px-6 py-4 text-left text-sm font-semibold !text-white">
191
- Prop
192
- </th>
193
- <th className="px-6 py-4 text-left text-sm font-semibold !text-white">
194
- Type
195
- </th>
196
- <th className="px-6 py-4 text-left text-sm font-semibold !text-white">
197
- Default
198
- </th>
199
- <th className="px-6 py-4 text-left text-sm font-semibold !text-white">
200
- Description
201
- </th>
202
- </tr>
203
- </thead>
204
- <tbody>
205
- {" "}
206
- <tr className="!bg-black/10">
207
- <td className="px-6 py-4 font-mono text-sm !text-blue-300">
208
- withAccessibility
209
- </td>
210
- <td className="px-6 py-4 text-sm !text-white/70">
211
- boolean
212
- </td>
213
- <td className="px-6 py-4 text-sm !text-white/50">
214
- true
215
- </td>
216
- <td className="px-6 py-4 text-sm !text-white/70">
217
- Whether to wrap the icon with accessibility feature
218
- </td>
219
- </tr>
220
- <tr className="border-b border-white/5 !bg-black/10">
221
- <td className="px-6 py-4 font-mono text-sm !text-purple-300">
222
- height
223
- </td>
224
- <td className="px-6 py-4 text-sm !text-white/70">
225
- number | string
226
- </td>
227
- <td className="px-6 py-4 text-sm !text-white/50">24</td>
228
- <td className="px-6 py-4 text-sm !text-white/70">
229
- Height of the icon in pixels
230
- </td>
231
- </tr>
232
- <tr className="border-b border-white/5">
233
- <td className="px-6 py-4 font-mono text-sm !text-purple-300">
234
- stroke
235
- </td>
236
- <td className="px-6 py-4 text-sm !text-white/70">
237
- string
238
- </td>
239
- <td className="px-6 py-4 text-sm !text-white/50">
240
- currentColor
241
- </td>
242
- <td className="px-6 py-4 text-sm !text-white/70">
243
- Stroke color of the icon
244
- </td>
245
- </tr>
246
- <tr className="border-b border-white/5 !bg-black/10">
247
- <td className="px-6 py-4 font-mono text-sm !text-purple-300">
248
- className
249
- </td>
250
- <td className="px-6 py-4 text-sm !text-white/70">
251
- string
252
- </td>
253
- <td className="px-6 py-4 text-sm !text-white/50">-</td>
254
- <td className="px-6 py-4 text-sm !text-white/70">
255
- CSS classes for styling (use for overrides)
256
- </td>
257
- </tr>
258
- <tr className="border-b border-white/5">
259
- <td className="px-6 py-4 font-mono text-sm !text-purple-300">
260
- strokeWidth
261
- </td>
262
- <td className="px-6 py-4 text-sm !text-white/70">
263
- number | string
264
- </td>
265
- <td className="px-6 py-4 text-sm !text-white/50">
266
- 1.5
267
- </td>
268
- <td className="px-6 py-4 text-sm !text-white/70">
269
- Stroke width of the chevron line
270
- </td>
271
- </tr>
272
- <tr className="!bg-black/10">
273
- <td className="px-6 py-4 font-mono text-sm !text-purple-300">
274
- ...svgProps
275
- </td>
276
- <td className="px-6 py-4 text-sm !text-white/70">
277
- SVGProps
278
- </td>
279
- <td className="px-6 py-4 text-sm !text-white/50">-</td>
280
- <td className="px-6 py-4 text-sm !text-white/70">
281
- All standard SVG element props
282
- </td>
283
- </tr>
284
- </tbody>
285
- </table>
286
- </div>
287
- </div>
288
-
289
- {/* Size Variations */}
290
- <div className="!space-y-8">
291
- <h2 className="text-center text-3xl font-bold !text-white">
292
- Size Variations
293
- </h2>
294
- <div className="rounded-lg border border-white/10 bg-white/5 p-8">
295
- <div className="!space-y-6">
296
- <div className="grid grid-cols-1 gap-8 md:grid-cols-2">
297
- <div className="!space-y-4">
298
- <h3 className="text-lg font-semibold !text-purple-300">
299
- Standard Sizes
300
- </h3>
301
- <div className="flex items-end gap-6 rounded-lg bg-black/20 p-6">
302
- <div className="text-center">
303
- <CopyIcon className="!mx-auto mb-2 h-3 w-3 text-purple-400" />
304
- <span className="text-xs text-white/60">12px</span>
305
- </div>
306
- <div className="text-center">
307
- <CopyIcon className="!mx-auto mb-2 h-4 w-4 text-purple-400" />
308
- <span className="text-xs text-white/60">16px</span>
309
- </div>
310
- <div className="text-center">
311
- <CopyIcon className="!mx-auto mb-2 h-5 w-5 text-purple-400" />
312
- <span className="text-xs text-white/60">20px</span>
313
- </div>
314
- <div className="text-center">
315
- <CopyIcon className="!mx-auto mb-2 h-6 w-6 text-purple-400" />
316
- <span className="text-xs text-white/60">24px</span>
317
- </div>
318
- <div className="text-center">
319
- <CopyIcon className="!mx-auto mb-2 h-8 w-8 text-purple-400" />
320
- <span className="text-xs text-white/60">32px</span>
321
- </div>
322
- <div className="text-center">
323
- <CopyIcon className="!mx-auto mb-2 h-12 w-12 text-purple-400" />
324
- <span className="text-xs text-white/60">48px</span>
325
- </div>
326
- </div>
327
- </div>
328
-
329
- <div className="!space-y-4">
330
- <h3 className="text-lg font-semibold !text-purple-300">
331
- Code Example
332
- </h3>
333
- <div className="rounded-lg bg-black/40 p-4">
334
- <pre className="overflow-x-auto text-sm !text-blue-300">
335
- {`// Small (16px)
336
- <CopyIcon className="h-4 w-4 " />
337
-
338
- // Medium (24px)
339
- <CopyIcon className="h-6 w-6 " />
340
-
341
- // Large (32px)
342
- <CopyIcon className="h-8 w-8 " />
343
-
344
- // Custom size
345
- <CopyIcon width={40} height={40} />`}
346
- </pre>
347
- </div>
348
- </div>
349
- </div>
350
- </div>
351
- </div>
352
- </div>
353
-
354
- {/* Color Variations */}
355
- <div className="!space-y-8">
356
- <h2 className="text-center text-3xl font-bold !text-white">
357
- Color Variations
358
- </h2>
359
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
360
- <div className="!space-y-4">
361
- <h3 className="text-lg font-semibold !text-purple-300">
362
- Semantic Colors
363
- </h3>
364
- <div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
365
- <div className="flex items-center gap-4">
366
- <CopyIcon className="h-6 w-6 text-purple-400" />
367
- <div>
368
- <div className="text-sm font-medium text-white">
369
- Primary
370
- </div>
371
- <div className="text-xs text-white/60">
372
- text-purple-400
373
- </div>
374
- </div>
375
- </div>
376
- <div className="flex items-center gap-4">
377
- <CopyIcon className="h-6 w-6 text-gray-400" />
378
- <div>
379
- <div className="text-sm font-medium text-white">
380
- Secondary
381
- </div>
382
- <div className="text-xs text-white/60">
383
- text-gray-400
384
- </div>
385
- </div>
386
- </div>
387
- <div className="flex items-center gap-4">
388
- <CopyIcon className="h-6 w-6 text-green-400" />
389
- <div>
390
- <div className="text-sm font-medium text-white">
391
- Accent
392
- </div>
393
- <div className="text-xs text-white/60">
394
- text-green-400
395
- </div>
396
- </div>
397
- </div>
398
- <div className="flex items-center gap-4">
399
- <CopyIcon className="h-6 w-6 text-white/40" />
400
- <div>
401
- <div className="text-sm font-medium text-white">
402
- Disabled
403
- </div>
404
- <div className="text-xs text-white/60">
405
- text-white/40
406
- </div>
407
- </div>
408
- </div>
409
- </div>
410
- </div>
411
-
412
- <div className="!space-y-4">
413
- <h3 className="text-lg font-semibold !text-purple-300">
414
- Custom Colors
415
- </h3>
416
- <div className="rounded-lg bg-black/40 p-4">
417
- <pre className="overflow-x-auto text-sm !text-green-300">
418
- {`// Using Tailwind classes with
419
- <CopyIcon className="h-6 w-6 text-purple-400 " />
420
- <CopyIcon className="h-6 w-6 text-green-500 " />
421
-
422
- // Using CSS custom properties
423
- <CopyIcon
424
- className="h-6 w-6 "
425
- style={{ color: 'var(--color-primary)' }}
426
- />
427
-
428
- // Direct stroke prop
429
- <CopyIcon
430
- width={24}
431
- height={24}
432
- stroke="#9333ea"
433
- />`}
434
- </pre>
435
- </div>
436
- </div>
437
- </div>
438
- </div>
439
-
440
- {/* Usage Examples */}
441
- <div className="!space-y-8">
442
- <h2 className="text-center text-3xl font-bold !text-white">
443
- Usage Examples
444
- </h2>
445
-
446
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
447
- {/* Copy to Clipboard */}
448
- <div className="!space-y-4">
449
- <h3 className="text-lg font-semibold !text-purple-300">
450
- Copy to Clipboard Button
451
- </h3>
452
- <div className="!space-y-4">
453
- <div className="flex items-center gap-4">
454
- <button className="flex items-center gap-2 rounded-lg border border-purple-500/30 bg-purple-500/10 px-4 py-2 text-purple-200 transition-colors hover:bg-purple-500/20">
455
- <CopyIcon className="h-4 w-4" />
456
- Copy Text
457
- </button>
458
- <button className="flex items-center justify-center rounded-full border border-white/20 bg-white/5 p-3 text-white transition-colors hover:bg-white/10">
459
- <CopyIcon className="h-5 w-5" />
460
- </button>
461
- </div>
462
- <div className="rounded-lg bg-black/40 p-4">
463
- <pre className="overflow-x-auto text-sm !text-green-300">
464
- {`// Text button
465
- <button className="flex items-center gap-2 bg-purple-500/10 border border-purple-500/30 px-4 py-2 rounded-lg">
466
- <CopyIcon className="h-4 w-4" />
467
- Copy Text
468
- </button>
469
-
470
- // Icon-only button
471
- <button className="flex items-center justify-center bg-white/5 border border-white/20 p-3 rounded-full">
472
- <CopyIcon className="h-5 w-5" />
473
- </button>`}
474
- </pre>
475
- </div>
476
- </div>
477
- </div>
478
-
479
- {/* Copy Code Block */}
480
- <div className="!space-y-4">
481
- <h3 className="text-lg font-semibold !text-purple-300">
482
- Copy Code Block
483
- </h3>
484
- <div className="!space-y-4">
485
- <div className="rounded-lg border border-white/10 bg-white/5 p-4">
486
- <div className="flex items-center justify-between">
487
- <span className="font-medium text-white">
488
- API Configuration
489
- </span>
490
- <CopyIcon className="h-4 w-4 text-white/60 transition-transform" />
491
- </div>
492
- <div className="mt-3 space-y-2 text-sm text-white/70">
493
- <div>const API_KEY = "your_api_key_here"</div>
494
- <div>const BASE_URL = "https://api.example.com"</div>
495
- <div>const TIMEOUT = 5000</div>
496
- </div>
497
- </div>
498
- <div className="rounded-lg bg-black/40 p-4">
499
- <pre className="overflow-x-auto text-sm !text-green-300">
500
- {`// Copy code block header
501
- <div className="flex items-center justify-between">
502
- <span className="font-medium text-white">API Configuration</span>
503
- <CopyIcon
504
- className="h-4 w-4 text-white/60 cursor-pointer hover:text-white"
505
- onClick={() => copyToClipboard(codeContent)}
506
- />
507
- </div>
508
-
509
- // Code content
510
- <div className="mt-3 space-y-2 text-sm text-white/70">
511
- <div>const API_KEY = "your_api_key_here"</div>
512
- <div>const BASE_URL = "https://api.example.com"</div>
513
- </div>`}
514
- </pre>
515
- </div>
516
- </div>
517
- </div>
518
-
519
- {/* Copy URL/Link */}
520
- <div className="!space-y-4">
521
- <h3 className="text-lg font-semibold !text-purple-300">
522
- Copy URL/Link
523
- </h3>
524
- <div className="!space-y-4">
525
- <div className="rounded-lg border border-white/10 bg-white/5 p-4">
526
- <div className="space-y-2">
527
- <button className="flex w-full items-center justify-between rounded px-3 py-2 text-left text-white hover:bg-white/10">
528
- <span>Share Link</span>
529
- <CopyIcon className="h-4 w-4 text-purple-400" />
530
- </button>
531
- <button className="flex w-full items-center justify-between rounded px-3 py-2 text-left text-white hover:bg-white/10">
532
- <span>API Endpoint</span>
533
- <CopyIcon className="h-4 w-4 text-white/40" />
534
- </button>
535
- <button className="flex w-full items-center justify-between rounded px-3 py-2 text-left text-white hover:bg-white/10">
536
- <span>Download URL</span>
537
- <CopyIcon className="h-4 w-4 text-white/40" />
538
- </button>
539
- </div>
540
- </div>
541
- <div className="rounded-lg bg-black/40 p-4">
542
- <pre className="overflow-x-auto text-sm !text-green-300">
543
- {`// Copy link button with active state
544
- <button className="flex w-full items-center justify-between rounded px-3 py-2 text-left hover:bg-white/10">
545
- <span>Share Link</span>
546
- <CopyIcon
547
- className="h-4 w-4 text-purple-400 cursor-pointer"
548
- onClick={() => copyUrl(shareUrl)}
549
- />
550
- </button>
551
-
552
- // Copy success indicator
553
- <CopyIcon
554
- className={cn(
555
- "h-4 w-4 transition-colors",
556
- copied ? 'text-green-400' : 'text-white/40'
557
- )}
558
- />`}
559
- </pre>
560
- </div>
561
- </div>
562
- </div>
563
-
564
- {/* Copy Card Content */}
565
- <div className="!space-y-4">
566
- <h3 className="text-lg font-semibold !text-purple-300">
567
- Copy Card Content
568
- </h3>
569
- <div className="!space-y-4">
570
- <div className="w-full space-y-2">
571
- <div className="rounded-lg border border-white/10 bg-white/5">
572
- <div className="flex items-center justify-between p-4">
573
- <span className="font-medium text-white">
574
- User Profile Data
575
- </span>
576
- <CopyIcon className="h-4 w-4 text-white/60" />
577
- </div>
578
- <div className="border-t border-white/10 p-4 text-sm text-white/70">
579
- Copy user information including name, email, and
580
- preferences to clipboard.
581
- </div>
582
- </div>
583
- <div className="rounded-lg border border-white/10 bg-white/5">
584
- <div className="flex items-center justify-between p-4">
585
- <span className="font-medium text-white">
586
- Export Settings
587
- </span>
588
- <CopyIcon className="h-4 w-4 text-white/60" />
589
- </div>
590
- </div>
591
- </div>
592
- <div className="rounded-lg bg-black/40 p-4">
593
- <pre className="overflow-x-auto text-sm !text-green-300">
594
- {`// Copy card header
595
- <div className="rounded-lg border border-white/10 bg-white/5">
596
- <div
597
- className="flex items-center justify-between p-4 cursor-pointer"
598
- onClick={() => copyCardContent(cardData)}
599
- >
600
- <span className="font-medium text-white">
601
- User Profile Data
602
- </span>
603
- <CopyIcon className="h-4 w-4 text-white/60 hover:text-white" />
604
- </div>
605
- <div className="border-t border-white/10 p-4 text-sm text-white/70">
606
- Copy user information including name, email, and preferences.
607
- </div>
608
- </div>`}
609
- </pre>
610
- </div>
611
- </div>
612
- </div>
613
- </div>
614
- </div>
615
-
616
- {/* Accessibility */}
617
- <div className="!space-y-8">
618
- <h2 className="text-center text-3xl font-bold !text-white">
619
- Accessibility Features
620
- </h2>
621
- <div className="grid grid-cols-1 gap-8 md:grid-cols-2">
622
- <div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
623
- <h3 className="text-lg font-semibold !text-green-300">
624
- ✅ Built-in Features
625
- </h3>
626
- <ul className="!space-y-2 text-sm !text-white/70">
627
- <li className="!text-white/70">
628
- Uses Radix UI AccessibleIcon wrapper
629
- </li>
630
- <li className="!text-white/70">
631
- Provides screen reader label "Chevron Up icon"
632
- </li>
633
- <li className="!text-white/70">
634
- Supports keyboard navigation when interactive
635
- </li>
636
- <li className="!text-white/70">
637
- Maintains proper color contrast ratios
638
- </li>
639
- <li className="!text-white/70">
640
- Scales with user's font size preferences
641
- </li>
642
- </ul>
643
- </div>
644
-
645
- <div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
646
- <h3 className="text-lg font-semibold !text-purple-300">
647
- 💡 Best Practices
648
- </h3>
649
- <ul className="!space-y-2 text-sm text-white/70">
650
- <li className="!text-white/70">
651
- Use descriptive aria-labels for navigation buttons
652
- </li>
653
- <li className="!text-white/70">
654
- Provide keyboard shortcuts for common actions
655
- </li>
656
- <li className="!text-white/70">
657
- Ensure sufficient touch target size (44px minimum)
658
- </li>
659
- <li className="!text-white/70">
660
- Add focus states for interactive elements
661
- </li>
662
- <li className="!text-white/70">
663
- Consider aria-expanded for collapsible content
664
- </li>
665
- </ul>
666
- </div>
667
- </div>
668
-
669
- <div className="rounded-lg border border-white/10 bg-white/5 p-6">
670
- <h3 className="mb-4 text-lg font-semibold !text-purple-300">
671
- Proper ARIA Implementation
672
- </h3>
673
- <div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
674
- {/* Code Block */}
675
- <div className="rounded-lg bg-black/40 p-4">
676
- <pre className="overflow-x-auto text-sm !text-blue-300">
677
- {`// Copy text button with ARIA
678
- <button
679
- aria-label="Copy text to clipboard"
680
- className="flex items-center gap-2"
681
- >
682
- <CopyIcon className="h-4 w-4" />
683
- Copy
684
- </button>
685
-
686
- // Icon-only copy button
687
- <button
688
- aria-label="Copy link"
689
- className="p-2"
690
- >
691
- <CopyIcon className="h-4 w-4" />
692
- </button>
693
-
694
- // Copy code block
695
- <div className="flex justify-between">
696
- <span>API Key</span>
697
- <button aria-label="Copy API key">
698
- <CopyIcon className="h-4 w-4" />
699
- </button>
700
- </div>`}
701
- </pre>
702
- </div>
703
-
704
- {/* Explanation Block */}
705
- <div className="!space-y-4">
706
- <p className="text-sm !text-white/70">
707
- Use ARIA labels like <code>aria-label="Copy text"</code>{" "}
708
- to make copy actions clear to screen readers. Avoid
709
- relying on just the icon.
710
- </p>
711
- <div className="rounded-lg border border-purple-500/20 bg-purple-500/10 p-4">
712
- <div className="flex items-center gap-2 text-sm text-purple-200">
713
- <CopyIcon className="h-4 w-4" />
714
- <span>
715
- Clear labels improve accessibility for clipboard
716
- actions.
717
- </span>
718
- </div>
719
- </div>
720
- </div>
721
- </div>
722
- </div>
723
- </div>
724
-
725
- {/* Related Icons */}
726
- <div className="!space-y-8">
727
- <h2 className="text-center text-3xl font-bold !text-white">
728
- Related Icons
729
- </h2>
730
- <div className="grid grid-cols-2 gap-6 md:grid-cols-4">
731
- <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
732
- <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-blue-500/20">
733
- <span className="!text-2xl !text-white">↓</span>
734
- </div>
735
- <div>
736
- <div className="font-medium text-white">
737
- ChevronDownIcon
738
- </div>
739
- <div className="text-xs text-white/60">
740
- Downward direction
741
- </div>
742
- </div>
743
- </div>
744
- <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
745
- <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-indigo-500/20">
746
- <span className="!text-2xl !text-white">→</span>
747
- </div>
748
- <div>
749
- <div className="font-medium text-white">
750
- ChevronRightIcon
751
- </div>
752
- <div className="text-xs text-white/60">
753
- Right direction
754
- </div>
755
- </div>
756
- </div>
757
- <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
758
- <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-pink-500/20">
759
- <span className="!text-2xl !text-white">←</span>
760
- </div>
761
- <div>
762
- <div className="font-medium text-white">
763
- ChevronLeftIcon
764
- </div>
765
- <div className="text-xs text-white/60">
766
- Left direction
767
- </div>
768
- </div>
769
- </div>
770
- <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
771
- <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-green-500/20">
772
- <span className="!text-2xl !text-white">↑</span>
773
- </div>
774
- <div>
775
- <div className="font-medium text-white">ArrowUpIcon</div>
776
- <div className="text-xs text-white/60">Arrow variant</div>
777
- </div>
778
- </div>
779
- </div>
780
- </div>
781
- </div>
782
-
783
- {/* Footer */}
784
- <div className="border-t border-white/10 bg-black/20 backdrop-blur-xl">
785
- <div className="!mx-auto max-w-7xl px-6 py-8">
786
- <div className="!space-y-4 text-center">
787
- <p className="!text-white/60">
788
- CopyIcon is part of the Aural UI icon library, built with
789
- accessibility and intuitive upward navigation in mind.
790
- </p>
791
- <p className="text-sm !text-white/40">
792
- All icons use Radix UI's AccessibleIcon for screen reader
793
- compatibility and follow WCAG guidelines.
794
- </p>
795
- </div>
796
- </div>
797
- </div>
798
- </div>
799
- </>
54
+ }`,
55
+ livePreview: (
56
+ <button>
57
+ <CopyIcon className="text-fm-icon-active h-6 w-6" />
58
+ </button>
59
+ ),
60
+ }}
61
+ relatedIcons={[
62
+ {
63
+ name: "EditBigIcon",
64
+ description: "Edit / modify action icon",
65
+ icon: EditBigIcon,
66
+ accentToken: "info",
67
+ },
68
+ {
69
+ name: "PencilIcon",
70
+ description: "Pencil / write icon",
71
+ icon: PencilIcon,
72
+ accentToken: "positive",
73
+ },
74
+ {
75
+ name: "ShareIcon",
76
+ description: "Share content icon",
77
+ icon: ShareIcon,
78
+ accentToken: "warning",
79
+ },
80
+ {
81
+ name: "TrashIcon",
82
+ description: "Delete / trash icon",
83
+ icon: TrashIcon,
84
+ accentToken: "negative",
85
+ },
86
+ ]}
87
+ />
800
88
  ),
801
89
  },
802
90
  },
803
91
  tags: ["autodocs"],
804
92
  argTypes: {
805
- width: {
806
- control: { type: "range", min: 8, max: 96, step: 2 },
807
- description: "Width of the icon in pixels",
93
+ className: {
94
+ control: "text",
95
+ description: "CSS classes including color token",
808
96
  },
809
97
  withAccessibility: {
810
98
  control: "boolean",
811
- description: "Whether to wrap the icon with accessibility features",
812
- },
813
- height: {
814
- control: { type: "range", min: 8, max: 96, step: 2 },
815
- description: "Height of the icon in pixels",
816
- },
817
- stroke: {
818
- control: "color",
819
- description: "Stroke color of the icon",
820
- },
821
- strokeWidth: {
822
- control: { type: "range", min: 0.5, max: 3, step: 0.1 },
823
- description: "Stroke width of the chevron line",
824
- },
825
- className: {
826
- control: "text",
827
- description: "CSS classes for styling (use for overrides)",
99
+ description: "Wrap with accessibility label",
828
100
  },
829
101
  },
830
102
  }
@@ -832,198 +104,87 @@ function CopyButton({ text }) {
832
104
  export default meta
833
105
  type Story = StoryObj<typeof CopyIcon>
834
106
 
835
- // Story parameters for consistent dark theme
836
- const storyParameters = {
837
- backgrounds: {
838
- default: "dark",
839
- values: [
840
- { name: "dark", value: "#0a0a0a" },
841
- { name: "darker", value: "#000000" },
842
- ],
843
- },
844
- }
845
-
846
107
  export const Default: Story = {
847
108
  args: {
848
- width: 24,
849
- height: 24,
850
- className: "text-purple-400 ",
109
+ className: "h-6 w-6 text-fm-icon-active",
851
110
  withAccessibility: true,
852
111
  },
853
- parameters: storyParameters,
854
112
  render: (args) => (
855
- <div className="flex h-32 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
113
+ <IconDefaultCanvas>
856
114
  <CopyIcon {...args} />
857
- </div>
115
+ </IconDefaultCanvas>
858
116
  ),
859
117
  }
860
118
 
861
119
  export const SizeVariations: Story = {
862
- parameters: {
863
- ...storyParameters,
864
- docs: {
865
- description: {
866
- story:
867
- "CopyIcon in different sizes, from small UI elements to large displays.",
868
- },
869
- },
870
- },
871
- render: () => (
872
- <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">
873
- <div className="text-center">
874
- <CopyIcon className="!mx-auto mb-2 h-3 w-3 text-purple-400" />
875
- <span className="text-xs text-white/60">12px</span>
876
- </div>
877
- <div className="text-center">
878
- <CopyIcon className="!mx-auto mb-2 h-4 w-4 text-purple-400" />
879
- <span className="text-xs text-white/60">16px</span>
880
- </div>
881
- <div className="text-center">
882
- <CopyIcon className="!mx-auto mb-2 h-5 w-5 text-purple-400" />
883
- <span className="text-xs text-white/60">20px</span>
884
- </div>
885
- <div className="text-center">
886
- <CopyIcon className="!mx-auto mb-2 h-6 w-6 text-purple-400" />
887
- <span className="text-xs text-white/60">24px</span>
888
- </div>
889
- <div className="text-center">
890
- <CopyIcon className="!mx-auto mb-2 h-8 w-8 text-purple-400" />
891
- <span className="text-xs text-white/60">32px</span>
892
- </div>
893
- <div className="text-center">
894
- <CopyIcon className="!mx-auto mb-2 h-12 w-12 text-purple-400" />
895
- <span className="text-xs text-white/60">48px</span>
896
- </div>
897
- </div>
898
- ),
120
+ render: () => <IconSizeVariations icon={CopyIcon} />,
899
121
  }
900
122
 
901
123
  export const ColorVariations: Story = {
902
- parameters: {
903
- ...storyParameters,
904
- docs: {
905
- description: {
906
- story:
907
- "CopyIcon in different semantic colors for various upward navigation contexts.",
908
- },
909
- },
910
- },
911
- render: () => (
912
- <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">
913
- <div className="text-center">
914
- <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">
915
- <CopyIcon className="h-8 w-8 text-purple-400" />
916
- </div>
917
- <div className="text-sm font-medium text-white">Primary</div>
918
- <div className="text-xs text-purple-400">text-purple-400</div>
919
- </div>
920
- <div className="text-center">
921
- <div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-gray-500/30 bg-gray-500/20">
922
- <CopyIcon className="h-8 w-8 text-gray-400" />
923
- </div>
924
- <div className="text-sm font-medium text-white">Secondary</div>
925
- <div className="text-xs text-gray-400">text-gray-400</div>
926
- </div>
927
- <div className="text-center">
928
- <div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-green-500/30 bg-green-500/20">
929
- <CopyIcon className="h-8 w-8 text-green-400" />
930
- </div>
931
- <div className="text-sm font-medium text-white">Accent</div>
932
- <div className="text-xs text-green-400">text-green-400</div>
933
- </div>
934
- <div className="text-center">
935
- <div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-white/10 bg-white/5">
936
- <CopyIcon className="h-8 w-8 text-white/40" />
937
- </div>
938
- <div className="text-sm font-medium text-white">Disabled</div>
939
- <div className="text-xs text-white/40">text-white/40</div>
940
- </div>
941
- </div>
942
- ),
124
+ render: () => <IconColorVariations icon={CopyIcon} />,
943
125
  }
944
126
 
945
127
  export const UsageExamples: Story = {
946
- parameters: {
947
- ...storyParameters,
948
- docs: {
949
- description: {
950
- story:
951
- "Real-world usage examples showing CopyIcon in different upward navigation contexts.",
952
- },
953
- },
954
- },
955
128
  render: () => (
956
- <div className="min-h-dvh !space-y-8 rounded-lg bg-gradient-to-br from-gray-900 to-gray-800 p-8">
957
- {/* Copy Content */}
958
- <div className="!space-y-2">
959
- <h3 className="text-sm font-medium text-white">Scroll to Top</h3>
960
- <div className="flex items-center gap-4">
961
- <button className="flex items-center gap-2 rounded-lg border border-purple-500/30 bg-purple-500/10 px-4 py-2 text-purple-200 transition-colors hover:bg-purple-500/20">
962
- <CopyIcon className="h-4 w-4" />
963
- Back to Top
129
+ <IconUsageCanvas>
130
+ <IconUsageSection title="Copy Invite Link">
131
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary flex w-full max-w-sm items-center gap-2 rounded-xl border px-3 py-2">
132
+ <span className="text-fm-secondary font-fm-text flex-1 truncate text-sm">
133
+ https://pocketfm.com/invite/abc123
134
+ </span>
135
+ <button>
136
+ <CopyIcon className="text-fm-icon-active h-4 w-4" />
964
137
  </button>
965
- <button className="flex items-center justify-center rounded-full border border-white/20 bg-white/5 p-3 text-white transition-colors hover:bg-white/10">
966
- <CopyIcon className="h-5 w-5" />
967
- </button>
968
- </div>
969
- </div>
970
-
971
- {/* Collapsible */}
972
- <div className="!space-y-2">
973
- <h3 className="text-sm font-medium text-white">Collapsible Content</h3>
974
- <div className="rounded-lg border border-white/10 bg-white/5 p-4">
975
- <button className="flex w-full items-center justify-between text-left">
976
- <span className="font-medium text-white">Advanced Settings</span>
977
- <CopyIcon className="h-4 w-4 text-white/60 transition-transform" />
978
- </button>
979
- <div className="mt-3 space-y-2 text-sm text-white/70">
980
- <div>Option 1: Enable advanced features</div>
981
- <div>Option 2: Custom configuration</div>
982
- </div>
983
138
  </div>
984
- </div>
985
-
986
- {/* Sort Controls */}
987
- <div className="!space-y-2">
988
- <h3 className="text-sm font-medium text-white">Sort Controls</h3>
989
- <div className="rounded-lg border border-white/10 bg-white/5 p-4">
990
- <div className="space-y-2">
991
- <button className="flex w-full items-center justify-between rounded px-3 py-2 text-left text-white hover:bg-white/10">
992
- <span>Name</span>
993
- <CopyIcon className="h-4 w-4 text-purple-400" />
139
+ </IconUsageSection>
140
+
141
+ <IconUsageSection title="Content Actions Row">
142
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary flex w-full max-w-sm items-center justify-around rounded-xl border px-4 py-3">
143
+ {[
144
+ { Icon: CopyIcon, label: "Copy" },
145
+ { Icon: ShareIcon, label: "Share" },
146
+ { Icon: EditBigIcon, label: "Edit" },
147
+ { Icon: TrashIcon, label: "Delete" },
148
+ ].map(({ Icon, label }) => (
149
+ <button key={label} className="flex flex-col items-center gap-1">
150
+ <Icon className="text-fm-icon-active h-5 w-5" />
151
+ <span className="text-fm-secondary font-fm-text text-xs">
152
+ {label}
153
+ </span>
994
154
  </button>
995
- <button className="flex w-full items-center justify-between rounded px-3 py-2 text-left text-white hover:bg-white/10">
996
- <span>Date</span>
997
- <CopyIcon className="h-4 w-4 text-white/40" />
155
+ ))}
156
+ </div>
157
+ </IconUsageSection>
158
+
159
+ <IconUsageSection title="Code Block Copy">
160
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary w-full max-w-sm rounded-xl border">
161
+ <div className="border-fm-divider-secondary flex items-center justify-between border-b px-3 py-2">
162
+ <span className="text-fm-tertiary font-fm-text text-xs">
163
+ TypeScript
164
+ </span>
165
+ <button>
166
+ <CopyIcon className="text-fm-icon-inactive h-3.5 w-3.5" />
998
167
  </button>
999
168
  </div>
169
+ <div className="px-4 py-3">
170
+ <span className="text-fm-secondary font-fm-text text-xs">
171
+ const story = &quot;Pocket FM&quot;
172
+ </span>
173
+ </div>
1000
174
  </div>
1001
- </div>
1002
- </div>
175
+ </IconUsageSection>
176
+ </IconUsageCanvas>
1003
177
  ),
1004
178
  }
1005
179
 
1006
180
  export const Playground: Story = {
1007
- parameters: {
1008
- ...storyParameters,
1009
- docs: {
1010
- description: {
1011
- story:
1012
- "Interactive playground to experiment with different CopyIcon configurations.",
1013
- },
1014
- },
1015
- },
1016
181
  args: {
1017
- width: 32,
1018
- height: 32,
1019
- className: "text-purple-400 ",
1020
- strokeWidth: 1.5,
182
+ className: "h-8 w-8 text-fm-icon-active",
183
+ withAccessibility: true,
1021
184
  },
1022
185
  render: (args) => (
1023
- <div className="flex h-64 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
1024
- <div className="rounded-lg border border-white/10 bg-white/5 p-8">
1025
- <CopyIcon {...args} />
1026
- </div>
1027
- </div>
186
+ <IconPlaygroundCanvas>
187
+ <CopyIcon {...args} />
188
+ </IconPlaygroundCanvas>
1028
189
  ),
1029
190
  }