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