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