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 { ForwardTenSecondsIcon } from "src/ui/icons/forward-ten-seconds-icon"
5
+ import { PauseIcon } from "src/ui/icons/pause-icon"
6
+ import { SkipBackwardIcon } from "src/ui/icons/skip-backward-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 { BackwardTenSecondsIcon } from "."
5
20
 
6
21
  const meta: Meta<typeof BackwardTenSecondsIcon> = {
@@ -11,854 +26,78 @@ const meta: Meta<typeof BackwardTenSecondsIcon> = {
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-purple-900/20 to-gray-900">
84
- {/* Header */}
85
- <div className="relative overflow-hidden border-b border-white/10 bg-black/20 backdrop-blur-xl">
86
- <div className="absolute inset-0 bg-gradient-to-r from-purple-500/10 via-transparent to-blue-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-violet-500/30 bg-gradient-to-br from-violet-500/20 to-purple-500/20">
90
- <BackwardTenSecondsIcon className="h-12 w-12 text-violet-400" />
91
- </div>
92
- <h1 className="text-5xl font-bold !text-white">
93
- BackwardTenSecondsIcon
94
- </h1>
95
- <p className="!mx-auto max-w-3xl text-xl leading-relaxed !text-white/70">
96
- A media control icon for skipping backward 10 seconds in
97
- audio and video players. Features a circular arrow with "10"
98
- seconds indicator, perfect for podcast apps, video players,
99
- and music 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-violet-300">
106
- Media Control
107
- </div>
108
- <div className="text-sm text-white/60">
109
- 10-second rewind
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-purple-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-blue-300">
124
- Universal
125
- </div>
126
- <div className="text-sm text-white/60">
127
- Cross-platform standard
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-violet-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 { BackwardTenSecondsIcon } from "@icons/backward-ten-seconds-icon"
150
-
151
- function MediaPlayer() {
36
+ <AuralIconDocsPage
37
+ accentToken="info"
38
+ features={[
39
+ {
40
+ title: "Rewind 10s",
41
+ description: "Standard media control",
42
+ },
43
+ { title: "currentColor", description: "Responds to text tokens" },
44
+ { title: "Accessible", description: "ARIA-ready by default" },
45
+ ]}
46
+ quickStart={{
47
+ codeExample: `import { BackwardTenSecondsIcon } from "src/ui/icons/backward-ten-seconds-icon"
48
+
49
+ function RewindButton() {
152
50
  return (
153
- <button
154
- onClick={skipBackward}
155
- className="p-2 hover:bg-white/10 rounded-lg"
156
- >
157
- <BackwardTenSecondsIcon className="h-6 w-6 text-violet-400" />
51
+ <button aria-label="Rewind 10 seconds">
52
+ <BackwardTenSecondsIcon 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-violet-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-violet-500/20 bg-violet-500/10 p-3 transition-colors hover:bg-violet-500/20">
171
- <BackwardTenSecondsIcon className="h-6 w-6 text-violet-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-violet-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">44</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-violet-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-violet-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 !bg-black/10">
262
- <td className="px-6 py-4 font-mono text-sm !text-violet-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-violet-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-violet-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
- <BackwardTenSecondsIcon className="!mx-auto mb-2 h-3 w-3 text-violet-400" />
305
- <span className="text-xs text-white/60">12px</span>
306
- </div>
307
- <div className="text-center">
308
- <BackwardTenSecondsIcon className="!mx-auto mb-2 h-4 w-4 text-violet-400" />
309
- <span className="text-xs text-white/60">16px</span>
310
- </div>
311
- <div className="text-center">
312
- <BackwardTenSecondsIcon className="!mx-auto mb-2 h-5 w-5 text-violet-400" />
313
- <span className="text-xs text-white/60">20px</span>
314
- </div>
315
- <div className="text-center">
316
- <BackwardTenSecondsIcon className="!mx-auto mb-2 h-6 w-6 text-violet-400" />
317
- <span className="text-xs text-white/60">24px</span>
318
- </div>
319
- <div className="text-center">
320
- <BackwardTenSecondsIcon className="!mx-auto mb-2 h-8 w-8 text-violet-400" />
321
- <span className="text-xs text-white/60">32px</span>
322
- </div>
323
- <div className="text-center">
324
- <BackwardTenSecondsIcon className="!mx-auto mb-2 h-12 w-12 text-violet-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-violet-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
- <BackwardTenSecondsIcon className="h-4 w-4" />
338
-
339
- // Medium (24px)
340
- <BackwardTenSecondsIcon className="h-6 w-6" />
341
-
342
- // Large (32px)
343
- <BackwardTenSecondsIcon className="h-8 w-8" />
344
-
345
- // Custom size
346
- <BackwardTenSecondsIcon 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-violet-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
- <BackwardTenSecondsIcon className="h-6 w-6 text-violet-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-violet-400
374
- </div>
375
- </div>
376
- </div>
377
- <div className="flex items-center gap-4">
378
- <BackwardTenSecondsIcon className="h-6 w-6 text-purple-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-purple-400
385
- </div>
386
- </div>
387
- </div>
388
- <div className="flex items-center gap-4">
389
- <BackwardTenSecondsIcon className="h-6 w-6 text-blue-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-blue-400
396
- </div>
397
- </div>
398
- </div>
399
- <div className="flex items-center gap-4">
400
- <BackwardTenSecondsIcon 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-violet-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
- <BackwardTenSecondsIcon className="h-6 w-6 text-violet-400" />
421
- <BackwardTenSecondsIcon className="h-6 w-6 text-purple-500" />
422
-
423
- // Using CSS custom properties
424
- <BackwardTenSecondsIcon
425
- className="h-6 w-6"
426
- style={{ color: 'var(--color-primary)' }}
427
- />
428
-
429
- // Direct stroke prop
430
- <BackwardTenSecondsIcon
431
- width={24}
432
- height={24}
433
- stroke="#8b5cf6"
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
- {/* Podcast Player */}
449
- <div className="!space-y-4">
450
- <h3 className="text-lg font-semibold !text-violet-300">
451
- Podcast 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 justify-between">
456
- <h3 className="text-lg font-semibold !text-white">
457
- Now Playing
458
- </h3>
459
- </div>
460
- <div className="mb-4 flex items-center justify-center gap-4">
461
- <button className="rounded-lg p-2 transition-colors hover:bg-white/10">
462
- <BackwardTenSecondsIcon className="h-6 w-6 text-violet-400" />
463
- </button>
464
- <button className="rounded-lg p-3 transition-colors hover:bg-white/10">
465
- <div className="h-8 w-8 rounded-full border-2 border-white/60 bg-white/20" />
466
- </button>
467
- <button className="rounded-lg p-2 transition-colors hover:bg-white/10">
468
- <div className="h-6 w-6 rounded-full border border-white/60 bg-white/20" />
469
- </button>
470
- </div>
471
- <p className="text-sm !text-white/70">
472
- Skip back 10 seconds to replay important content
473
- </p>
474
- </div>
475
- <div className="rounded-lg bg-black/40 p-4">
476
- <pre className="overflow-x-auto text-sm !text-green-300">
477
- {`// Podcast control bar
478
- <div className="flex items-center justify-center gap-4">
479
- <button onClick={() => skipSeconds(-10)}>
480
- <BackwardTenSecondsIcon className="h-6 w-6 text-violet-400" />
481
- </button>
482
- <button onClick={togglePlay}>
483
- <PlayIcon className="h-8 w-8" />
484
- </button>
485
- <button onClick={() => skipSeconds(10)}>
486
- <ForwardTenSecondsIcon className="h-6 w-6" />
487
- </button>
488
- </div>`}
489
- </pre>
490
- </div>
491
- </div>
492
- </div>
493
-
494
- {/* Video Player */}
495
- <div className="!space-y-4">
496
- <h3 className="text-lg font-semibold !text-violet-300">
497
- Video Player Controls
498
- </h3>
499
- <div className="!space-y-4">
500
- <div className="rounded-lg border border-white/10 bg-white/5 p-4">
501
- <div className="mb-4 h-32 rounded bg-gradient-to-r from-violet-500/20 to-purple-500/20" />
502
- <div className="flex items-center justify-between">
503
- <div className="flex items-center gap-2">
504
- <button className="rounded p-1.5 hover:bg-white/10">
505
- <BackwardTenSecondsIcon className="h-5 w-5 text-violet-400" />
506
- </button>
507
- <span className="text-sm text-white/60">
508
- 2:35 / 15:42
509
- </span>
510
- </div>
511
- <div className="flex items-center gap-2">
512
- <button className="rounded p-1.5 hover:bg-white/10">
513
- <div className="h-5 w-5 rounded-full border border-white/60 bg-white/20" />
514
- </button>
515
- </div>
516
- </div>
517
- </div>
518
- <div className="rounded-lg bg-black/40 p-4">
519
- <pre className="overflow-x-auto text-sm !text-green-300">
520
- {`// Video player with rewind
521
- <div className="video-controls">
522
- <div className="flex items-center gap-2">
523
- <button
524
- onClick={rewindTenSeconds}
525
- aria-label="Rewind 10 seconds"
526
- >
527
- <BackwardTenSecondsIcon className="h-5 w-5 text-violet-400" />
528
- </button>
529
- <span>{formatTime(currentTime)} / {formatTime(duration)}</span>
530
- </div>
531
- </div>`}
532
- </pre>
533
- </div>
534
- </div>
535
- </div>
536
-
537
- {/* Music Player */}
538
- <div className="!space-y-4">
539
- <h3 className="text-lg font-semibold !text-violet-300">
540
- Music Player Interface
541
- </h3>
542
- <div className="!space-y-4">
543
- <div className="rounded-lg border border-white/10 bg-white/5 p-4">
544
- <div className="mb-4 flex items-center gap-3">
545
- <div className="h-12 w-12 rounded-lg bg-gradient-to-br from-violet-500/20 to-purple-500/20" />
546
- <div>
547
- <div className="text-sm font-medium !text-white">
548
- Song Title
549
- </div>
550
- <div className="text-xs !text-white/60">
551
- Artist Name
552
- </div>
553
- </div>
554
- </div>
555
- <div className="flex items-center justify-center gap-6">
556
- <button className="rounded-lg p-1.5 hover:bg-white/10">
557
- <BackwardTenSecondsIcon className="h-4 w-4 text-violet-400" />
558
- </button>
559
- <button className="rounded-lg p-2 hover:bg-white/10">
560
- <div className="h-6 w-6 rounded-full border border-white/60 bg-white/20" />
561
- </button>
562
- <button className="rounded-lg p-2 hover:bg-white/10">
563
- <div className="h-8 w-8 rounded-full border-2 border-white/60 bg-white/20" />
564
- </button>
565
- <button className="rounded-lg p-2 hover:bg-white/10">
566
- <div className="h-6 w-6 rounded-full border border-white/60 bg-white/20" />
567
- </button>
568
- <button className="rounded-lg p-1.5 hover:bg-white/10">
569
- <div className="h-4 w-4 rounded-full border border-white/60 bg-white/20" />
570
- </button>
571
- </div>
572
- </div>
573
- <div className="rounded-lg bg-black/40 p-4">
574
- <pre className="overflow-x-auto text-sm !text-green-300">
575
- {`// Music player with skip controls
576
- <div className="music-controls">
577
- <div className="flex items-center justify-center gap-6">
578
- <button onClick={skipBackward}>
579
- <BackwardTenSecondsIcon className="h-4 w-4 text-violet-400" />
580
- </button>
581
- <button onClick={previousTrack}>
582
- <PreviousIcon className="h-6 w-6" />
583
- </button>
584
- <button onClick={togglePlay}>
585
- <PlayIcon className="h-8 w-8" />
586
- </button>
587
- <button onClick={nextTrack}>
588
- <NextIcon className="h-6 w-6" />
589
- </button>
590
- <button onClick={skipForward}>
591
- <ForwardTenSecondsIcon className="h-4 w-4" />
592
- </button>
593
- </div>
594
- </div>`}
595
- </pre>
596
- </div>
597
- </div>
598
- </div>
599
-
600
- {/* Live Stream */}
601
- <div className="!space-y-4">
602
- <h3 className="text-lg font-semibold !text-violet-300">
603
- Live Stream Player
604
- </h3>
605
- <div className="!space-y-4">
606
- <div className="rounded-lg border border-white/10 bg-white/5 p-4">
607
- <div className="mb-4">
608
- <div className="mb-2 flex items-center gap-2">
609
- <div className="h-2 w-2 rounded-full bg-red-500" />
610
- <span className="text-sm font-medium !text-white">
611
- LIVE
612
- </span>
613
- </div>
614
- <h4 className="text-sm !text-white/70">
615
- Conference Stream
616
- </h4>
617
- </div>
618
- <div className="flex items-center justify-between">
619
- <div className="flex items-center gap-2">
620
- <button className="rounded p-1.5 hover:bg-white/10">
621
- <BackwardTenSecondsIcon className="h-5 w-5 text-violet-400" />
622
- </button>
623
- <span className="text-xs !text-white/60">
624
- Rewind available
625
- </span>
626
- </div>
627
- <button className="rounded-lg border border-red-500/30 bg-red-500/10 px-3 py-1 text-xs text-red-200">
628
- Go Live
629
- </button>
630
- </div>
631
- </div>
632
- <div className="rounded-lg bg-black/40 p-4">
633
- <pre className="overflow-x-auto text-sm !text-green-300">
634
- {`// Live stream with rewind capability
635
- <div className="live-controls">
636
- {canRewind && (
637
- <button
638
- onClick={rewindTenSeconds}
639
- disabled={isLive}
640
- >
641
- <BackwardTenSecondsIcon className="h-5 w-5 text-violet-400" />
642
- </button>
643
- )}
644
- <button onClick={goLive} disabled={isLive}>
645
- Go Live
646
- </button>
647
- </div>`}
648
- </pre>
649
- </div>
650
- </div>
651
- </div>
652
- </div>
653
- </div>
654
-
655
- {/* Accessibility */}
656
- <div className="!space-y-8">
657
- <h2 className="text-center text-3xl font-bold !text-white">
658
- Accessibility Features
659
- </h2>
660
- <div className="grid grid-cols-1 gap-8 md:grid-cols-2">
661
- <div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
662
- <h3 className="text-lg font-semibold !text-green-300">
663
- ✅ Built-in Features
664
- </h3>
665
- <ul className="!space-y-2 text-sm !text-white/70">
666
- <li className="!text-white/70">
667
- Uses Radix UI AccessibleIcon wrapper
668
- </li>
669
- <li className="!text-white/70">
670
- Provides screen reader label "Backward ten seconds icon"
671
- </li>
672
- <li className="!text-white/70">
673
- Supports keyboard navigation when interactive
674
- </li>
675
- <li className="!text-white/70">
676
- Maintains proper color contrast ratios
677
- </li>
678
- <li className="!text-white/70">
679
- Scales with user's font size preferences
680
- </li>
681
- </ul>
682
- </div>
683
-
684
- <div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
685
- <h3 className="text-lg font-semibold !text-violet-300">
686
- 💡 Best Practices
687
- </h3>
688
- <ul className="!space-y-2 text-sm text-white/70">
689
- <li className="!text-white/70">
690
- Always provide descriptive aria-labels for buttons
691
- </li>
692
- <li className="!text-white/70">
693
- Use consistent placement in media control groups
694
- </li>
695
- <li className="!text-white/70">
696
- Ensure sufficient touch target size (44px minimum)
697
- </li>
698
- <li className="!text-white/70">
699
- Provide visible focus states for keyboard users
700
- </li>
701
- <li className="!text-white/70">
702
- Consider keyboard shortcuts (e.g., Left Arrow key)
703
- </li>
704
- </ul>
705
- </div>
706
- </div>
707
-
708
- <div className="rounded-lg border border-white/10 bg-white/5 p-6">
709
- <h3 className="mb-4 text-lg font-semibold !text-purple-300">
710
- Proper ARIA Implementation
711
- </h3>
712
- <div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
713
- <div className="rounded-lg bg-black/40 p-4">
714
- <pre className="overflow-x-auto text-sm !text-cyan-300">
715
- {`// Media control with proper ARIA
716
- <button
717
- aria-label="Rewind 10 seconds"
718
- className="p-2 hover:bg-white/10 rounded-lg"
719
- onClick={rewindTenSeconds}
720
- >
721
- <BackwardTenSecondsIcon className="h-6 w-6 text-violet-400" />
722
- </button>
723
-
724
- // Podcast player with context
725
- <button
726
- aria-label="Go back 10 seconds in podcast"
727
- onClick={skipBackward}
728
- >
729
- <BackwardTenSecondsIcon className="h-5 w-5" />
730
- </button>
731
-
732
- // Video player with state
733
- <button
734
- aria-label={\`Rewind 10 seconds (current: \${formatTime(currentTime)})\`}
735
- disabled={currentTime < 10}
736
- >
737
- <BackwardTenSecondsIcon className="h-5 w-5" />
738
- </button>`}
739
- </pre>
740
- </div>
741
- <div className="!space-y-4">
742
- <p className="text-sm !text-white/70">
743
- When using BackwardTenSecondsIcon for interactive
744
- elements, always provide clear context about what action
745
- will be performed and the current playback state when
746
- relevant.
747
- </p>
748
- <div className="rounded-lg border border-violet-500/20 bg-violet-500/10 p-4">
749
- <div className="flex items-center gap-2 text-sm text-violet-200">
750
- <BackwardTenSecondsIcon className="h-4 w-4" />
751
- <span>
752
- Screen readers need specific context about the
753
- rewind action
754
- </span>
755
- </div>
756
- </div>
757
- </div>
758
- </div>
759
- </div>
760
- </div>
761
-
762
- {/* Related Icons */}
763
- <div className="!space-y-8">
764
- <h2 className="text-center text-3xl font-bold !text-white">
765
- Related Icons
766
- </h2>
767
- <div className="grid grid-cols-2 gap-6 md:grid-cols-4">
768
- <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
769
- <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-violet-500/20">
770
- <span className="!text-2xl !text-white">⏮</span>
771
- </div>
772
- <div>
773
- <div className="font-medium text-white">
774
- ForwardTenSecondsIcon
775
- </div>
776
- <div className="text-xs text-white/60">
777
- Skip forward 10s
778
- </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-purple-500/20">
783
- <span className="!text-2xl !text-white">⏸</span>
784
- </div>
785
- <div>
786
- <div className="font-medium text-white">PlayIcon</div>
787
- <div className="text-xs text-white/60">Play/pause</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-blue-500/20">
792
- <span className="!text-2xl !text-white">⏪</span>
793
- </div>
794
- <div>
795
- <div className="font-medium text-white">RewindIcon</div>
796
- <div className="text-xs text-white/60">Fast rewind</div>
797
- </div>
798
- </div>
799
- <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
800
- <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-indigo-500/20">
801
- <span className="!text-2xl !text-white">⏭</span>
802
- </div>
803
- <div>
804
- <div className="font-medium text-white">NextIcon</div>
805
- <div className="text-xs text-white/60">Next track</div>
806
- </div>
807
- </div>
808
- </div>
809
- </div>
810
- </div>
811
-
812
- {/* Footer */}
813
- <div className="border-t border-white/10 bg-black/20 backdrop-blur-xl">
814
- <div className="!mx-auto max-w-7xl px-6 py-8">
815
- <div className="!space-y-4 text-center">
816
- <p className="!text-white/60">
817
- BackwardTenSecondsIcon is part of the Aural UI icon library,
818
- built with accessibility and media control best practices in
819
- mind.
820
- </p>
821
- <p className="text-sm !text-white/40">
822
- All icons use Radix UI's AccessibleIcon for screen reader
823
- compatibility and follow WCAG guidelines.
824
- </p>
825
- </div>
826
- </div>
827
- </div>
828
- </div>
829
- </>
55
+ }`,
56
+ livePreview: (
57
+ <button aria-label="Rewind 10 seconds">
58
+ <BackwardTenSecondsIcon className="text-fm-icon-active h-6 w-6" />
59
+ </button>
60
+ ),
61
+ }}
62
+ relatedIcons={[
63
+ {
64
+ name: "ForwardTenSecondsIcon",
65
+ description: "Skip forward 10s",
66
+ icon: ForwardTenSecondsIcon,
67
+ accentToken: "info",
68
+ },
69
+ {
70
+ name: "SkipBackwardIcon",
71
+ description: "Skip to previous",
72
+ icon: SkipBackwardIcon,
73
+ accentToken: "positive",
74
+ },
75
+ {
76
+ name: "SkipForwardIcon",
77
+ description: "Skip to next",
78
+ icon: SkipForwardIcon,
79
+ accentToken: "warning",
80
+ },
81
+ {
82
+ name: "PauseIcon",
83
+ description: "Pause playback",
84
+ icon: PauseIcon,
85
+ accentToken: "negative",
86
+ },
87
+ ]}
88
+ />
830
89
  ),
831
90
  },
832
91
  },
833
92
  tags: ["autodocs"],
834
93
  argTypes: {
835
- width: {
836
- control: { type: "range", min: 8, max: 96, step: 2 },
837
- description: "Width of the icon in pixels",
838
- },
839
- withAccessibility: {
840
- control: "boolean",
841
- description: "Whether to wrap the icon with accessibility features",
842
- },
843
- height: {
844
- control: { type: "range", min: 8, max: 96, step: 2 },
845
- description: "Height of the icon in pixels",
846
- },
847
- stroke: {
848
- control: "color",
849
- description: "Stroke color of the icon",
850
- },
851
- strokeWidth: {
852
- control: { type: "range", min: 0.5, max: 4, step: 0.5 },
853
- description: "Width of the stroke",
854
- },
855
94
  className: {
856
95
  control: "text",
857
- description: "CSS classes for styling (use for overrides)",
96
+ description: "CSS classes including size and color token",
858
97
  },
859
- onClick: {
860
- action: "clicked",
861
- description: "Click handler for interactive use",
98
+ withAccessibility: {
99
+ control: "boolean",
100
+ description: "Wrap with accessibility label",
862
101
  },
863
102
  },
864
103
  }
@@ -866,193 +105,136 @@ function MediaPlayer() {
866
105
  export default meta
867
106
  type Story = StoryObj<typeof BackwardTenSecondsIcon>
868
107
 
869
- // Story parameters for consistent dark theme
870
- const storyParameters = {
871
- backgrounds: {
872
- default: "dark",
873
- values: [
874
- { name: "dark", value: "#0a0a0a" },
875
- { name: "darker", value: "#000000" },
876
- ],
877
- },
878
- }
879
-
880
108
  export const Default: Story = {
881
109
  args: {
882
- className: "h-8 w-8 text-violet-400",
110
+ className: "h-6 w-6 text-fm-icon-active",
883
111
  withAccessibility: true,
884
112
  },
885
- parameters: storyParameters,
886
113
  render: (args) => (
887
- <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>
888
115
  <BackwardTenSecondsIcon {...args} />
889
- </div>
116
+ </IconDefaultCanvas>
890
117
  ),
891
118
  }
892
119
 
893
120
  export const SizeVariations: Story = {
894
- parameters: {
895
- ...storyParameters,
896
- docs: {
897
- description: {
898
- story:
899
- "BackwardTenSecondsIcon in different sizes, from small UI elements to large displays.",
900
- },
901
- },
902
- },
903
- render: () => (
904
- <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">
905
- <div className="text-center">
906
- <BackwardTenSecondsIcon className="!mx-auto mb-2 h-3 w-3 text-violet-400" />
907
- <span className="text-xs text-white/60">12px</span>
908
- </div>
909
- <div className="text-center">
910
- <BackwardTenSecondsIcon className="!mx-auto mb-2 h-4 w-4 text-violet-400" />
911
- <span className="text-xs text-white/60">16px</span>
912
- </div>
913
- <div className="text-center">
914
- <BackwardTenSecondsIcon className="!mx-auto mb-2 h-5 w-5 text-violet-400" />
915
- <span className="text-xs text-white/60">20px</span>
916
- </div>
917
- <div className="text-center">
918
- <BackwardTenSecondsIcon className="!mx-auto mb-2 h-6 w-6 text-violet-400" />
919
- <span className="text-xs text-white/60">24px</span>
920
- </div>
921
- <div className="text-center">
922
- <BackwardTenSecondsIcon className="!mx-auto mb-2 h-8 w-8 text-violet-400" />
923
- <span className="text-xs text-white/60">32px</span>
924
- </div>
925
- <div className="text-center">
926
- <BackwardTenSecondsIcon className="!mx-auto mb-2 h-12 w-12 text-violet-400" />
927
- <span className="text-xs text-white/60">48px</span>
928
- </div>
929
- </div>
930
- ),
121
+ render: () => <IconSizeVariations icon={BackwardTenSecondsIcon} />,
931
122
  }
932
123
 
933
124
  export const ColorVariations: Story = {
934
- parameters: {
935
- ...storyParameters,
936
- docs: {
937
- description: {
938
- story:
939
- "BackwardTenSecondsIcon in different semantic colors for various use cases.",
940
- },
941
- },
942
- },
125
+ render: () => <IconColorVariations icon={BackwardTenSecondsIcon} />,
126
+ }
127
+
128
+ export const DirectionalVariations: Story = {
943
129
  render: () => (
944
- <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">
945
- <div className="text-center">
946
- <div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-violet-500/30 bg-violet-500/20">
947
- <BackwardTenSecondsIcon className="h-8 w-8 text-violet-400" />
948
- </div>
949
- <div className="text-sm font-medium text-white">Primary</div>
950
- <div className="text-xs text-violet-400">text-violet-400</div>
951
- </div>
952
- <div className="text-center">
953
- <div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-purple-500/30 bg-purple-500/20">
954
- <BackwardTenSecondsIcon className="h-8 w-8 text-purple-400" />
955
- </div>
956
- <div className="text-sm font-medium text-white">Secondary</div>
957
- <div className="text-xs text-purple-400">text-purple-400</div>
958
- </div>
959
- <div className="text-center">
960
- <div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-blue-500/30 bg-blue-500/20">
961
- <BackwardTenSecondsIcon className="h-8 w-8 text-blue-400" />
962
- </div>
963
- <div className="text-sm font-medium text-white">Accent</div>
964
- <div className="text-xs text-blue-400">text-blue-400</div>
965
- </div>
966
- <div className="text-center">
967
- <div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-white/10 bg-white/5">
968
- <BackwardTenSecondsIcon className="h-8 w-8 text-white/40" />
969
- </div>
970
- <div className="text-sm font-medium text-white">Disabled</div>
971
- <div className="text-xs text-white/40">text-white/40</div>
972
- </div>
973
- </div>
130
+ <IconDirectionalVariations
131
+ icon={BackwardTenSecondsIcon}
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
+ />
974
140
  ),
975
141
  }
976
142
 
977
143
  export const UsageExamples: Story = {
978
- parameters: {
979
- ...storyParameters,
980
- docs: {
981
- description: {
982
- story:
983
- "Real-world usage examples showing BackwardTenSecondsIcon in different media control contexts.",
984
- },
985
- },
986
- },
987
144
  render: () => (
988
- <div className="min-h-dvh !space-y-8 rounded-lg bg-gradient-to-br from-gray-900 to-gray-800 p-8">
989
- {/* Podcast Player */}
990
- <div className="!space-y-2">
991
- <h3 className="text-sm font-medium text-white">Podcast Player</h3>
992
- <div className="rounded-lg border border-white/10 bg-white/5 p-6">
993
- <div className="mb-4 flex items-center justify-between">
994
- <h3 className="text-lg font-semibold text-white">Now Playing</h3>
995
- </div>
145
+ <IconUsageCanvas>
146
+ <IconUsageSection title="Audio Player Controls">
147
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary w-full max-w-sm rounded-xl border p-4">
996
148
  <div className="flex items-center justify-center gap-4">
997
- <button className="rounded-lg p-2 transition-colors hover:bg-white/10">
998
- <BackwardTenSecondsIcon className="h-6 w-6 text-violet-400" />
149
+ <button
150
+ className="flex h-10 w-10 items-center justify-center"
151
+ aria-label="Skip backward"
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" />
999
166
  </button>
1000
- <button className="rounded-lg p-3 transition-colors hover:bg-white/10">
1001
- <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" />
1002
172
  </button>
1003
- <button className="rounded-lg p-2 transition-colors hover:bg-white/10">
1004
- <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="Skip forward"
176
+ >
177
+ <SkipForwardIcon className="text-fm-icon-active h-5 w-5" />
1005
178
  </button>
1006
179
  </div>
1007
180
  </div>
1008
- </div>
1009
-
1010
- {/* Video Player */}
1011
- <div className="!space-y-2">
1012
- <h3 className="text-sm font-medium text-white">
1013
- Video Player Controls
1014
- </h3>
1015
- <div className="rounded-lg border border-white/10 bg-white/5 p-4">
1016
- <div className="mb-4 h-32 rounded bg-gradient-to-r from-violet-500/20 to-purple-500/20" />
1017
- <div className="flex items-center justify-between">
1018
- <div className="flex items-center gap-2">
1019
- <button className="rounded p-1.5 hover:bg-white/10">
1020
- <BackwardTenSecondsIcon className="h-5 w-5 text-violet-400" />
1021
- </button>
1022
- <span className="text-sm text-white/60">2:35 / 15:42</span>
181
+ </IconUsageSection>
182
+
183
+ <IconUsageSection title="Mini Player">
184
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary flex w-full max-w-sm items-center gap-3 rounded-xl border p-3">
185
+ <div className="bg-fm-divider-secondary h-10 w-10 shrink-0 rounded-lg" />
186
+ <div className="min-w-0 flex-1">
187
+ <div className="text-fm-primary font-fm-text truncate text-sm font-medium">
188
+ Episode Title
1023
189
  </div>
1024
- <div className="flex items-center gap-2">
1025
- <button className="rounded p-1.5 hover:bg-white/10">
1026
- <div className="h-5 w-5 rounded-full border border-white/60 bg-white/20" />
1027
- </button>
190
+ <div className="text-fm-secondary font-fm-text text-xs">
191
+ Podcast Name
1028
192
  </div>
1029
193
  </div>
194
+ <div className="flex items-center gap-1">
195
+ <button aria-label="Rewind 10 seconds">
196
+ <BackwardTenSecondsIcon className="text-fm-icon-active h-5 w-5" />
197
+ </button>
198
+ <button aria-label="Forward 10 seconds">
199
+ <ForwardTenSecondsIcon className="text-fm-icon-active h-5 w-5" />
200
+ </button>
201
+ </div>
1030
202
  </div>
1031
- </div>
1032
- </div>
203
+ </IconUsageSection>
204
+
205
+ <IconUsageSection title="Seek Controls">
206
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary w-full max-w-sm rounded-xl border p-4">
207
+ <div className="mb-3 flex items-center justify-between">
208
+ <span className="text-fm-secondary font-fm-text text-xs">
209
+ 12:34
210
+ </span>
211
+ <span className="text-fm-secondary font-fm-text text-xs">
212
+ 45:00
213
+ </span>
214
+ </div>
215
+ <div className="bg-fm-divider-secondary mb-3 h-1 rounded-full" />
216
+ <div className="flex items-center justify-center gap-6">
217
+ <button aria-label="Rewind 10 seconds">
218
+ <BackwardTenSecondsIcon className="text-fm-icon-active h-5 w-5" />
219
+ </button>
220
+ <button aria-label="Forward 10 seconds">
221
+ <ForwardTenSecondsIcon className="text-fm-icon-active h-5 w-5" />
222
+ </button>
223
+ </div>
224
+ </div>
225
+ </IconUsageSection>
226
+ </IconUsageCanvas>
1033
227
  ),
1034
228
  }
1035
229
 
1036
230
  export const Playground: Story = {
1037
- parameters: {
1038
- ...storyParameters,
1039
- docs: {
1040
- description: {
1041
- story:
1042
- "Interactive playground to experiment with different BackwardTenSecondsIcon configurations.",
1043
- },
1044
- },
1045
- },
1046
231
  args: {
1047
- width: 44,
1048
- height: 44,
1049
- className: "text-violet-400",
232
+ className: "h-8 w-8 text-fm-icon-active",
233
+ withAccessibility: true,
1050
234
  },
1051
235
  render: (args) => (
1052
- <div className="flex h-64 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
1053
- <div className="rounded-lg border border-white/10 bg-white/5 p-8">
1054
- <BackwardTenSecondsIcon {...args} />
1055
- </div>
1056
- </div>
236
+ <IconPlaygroundCanvas>
237
+ <BackwardTenSecondsIcon {...args} />
238
+ </IconPlaygroundCanvas>
1057
239
  ),
1058
240
  }