aural-ui 3.0.7 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (183) hide show
  1. package/dist/components/aspect-ratio/AspectRatio.stories.tsx +290 -1199
  2. package/dist/components/avatar/Avatar.stories.tsx +235 -237
  3. package/dist/components/badge/Badge.stories.tsx +379 -116
  4. package/dist/components/banner/Banner.stories.tsx +445 -391
  5. package/dist/components/breadcrumb/Breadcrumb.stories.tsx +453 -199
  6. package/dist/components/button/Button.stories.tsx +585 -230
  7. package/dist/components/button/index.tsx +7 -7
  8. package/dist/components/card/Card.stories.tsx +619 -301
  9. package/dist/components/char-count/CharCount.stories.tsx +350 -248
  10. package/dist/components/checkbox/Checkbox.stories.tsx +309 -167
  11. package/dist/components/chip/Chip.stories.tsx +362 -168
  12. package/dist/components/circular-loader/CircularLoader.stories.tsx +221 -620
  13. package/dist/components/clamp-lines/ClampLines.stories.tsx +246 -117
  14. package/dist/components/collapsible/Collapsible.stories.tsx +391 -252
  15. package/dist/components/command/Command.stories.tsx +533 -856
  16. package/dist/components/dialog/Dialog.stories.tsx +505 -949
  17. package/dist/components/divider/Divider.stories.tsx +265 -502
  18. package/dist/components/dot-loader/DotLoader.stories.tsx +256 -257
  19. package/dist/components/drawer/Drawer.stories.tsx +659 -993
  20. package/dist/components/drawer/index.tsx +3 -3
  21. package/dist/components/dropdown/Dropdown.stories.tsx +643 -1018
  22. package/dist/components/form/Form.stories.tsx +560 -274
  23. package/dist/components/helper-text/HelperText.stories.tsx +199 -200
  24. package/dist/components/hover-card/HoverCard.stories.tsx +318 -1221
  25. package/dist/components/icon-button/IconButton.stories.tsx +837 -194
  26. package/dist/components/if-else/if-else.stories.tsx +370 -83
  27. package/dist/components/input/Input.stories.tsx +436 -368
  28. package/dist/components/label/Label.stories.tsx +156 -154
  29. package/dist/components/list/List.stories.tsx +485 -822
  30. package/dist/components/marquee/Marquee.stories.tsx +356 -694
  31. package/dist/components/otp-inputs/OtpInputs.stories.tsx +352 -410
  32. package/dist/components/overlay/Overlay.stories.tsx +452 -818
  33. package/dist/components/overlay/index.tsx +4 -4
  34. package/dist/components/pagination/Pagination.stories.tsx +721 -210
  35. package/dist/components/popover/Popover.stories.tsx +484 -873
  36. package/dist/components/radio/Radio.stories.tsx +432 -124
  37. package/dist/components/resizable/Resizable.stories.tsx +496 -752
  38. package/dist/components/scroll-area/ScrollArea.stories.tsx +384 -1006
  39. package/dist/components/search/Search.stories.tsx +314 -575
  40. package/dist/components/select/Select.stories.tsx +684 -787
  41. package/dist/components/sheet/Sheet.stories.tsx +671 -936
  42. package/dist/components/skelton/Skelton.stories.tsx +230 -764
  43. package/dist/components/slider/Slider.stories.tsx +384 -737
  44. package/dist/components/stepper/Stepper.stories.tsx +371 -514
  45. package/dist/components/switch/Switch.stories.tsx +461 -208
  46. package/dist/components/switch-case/SwitchCase.stories.tsx +367 -188
  47. package/dist/components/table/Table.stories.tsx +770 -914
  48. package/dist/components/tabs/Tabs.stories.tsx +459 -1400
  49. package/dist/components/tag/Tag.stories.tsx +714 -542
  50. package/dist/components/textarea/TextArea.stories.tsx +621 -562
  51. package/dist/components/thumbnail-tags/ThumbnailTags.stories.tsx +228 -148
  52. package/dist/components/toast/Toast.stories.tsx +452 -1333
  53. package/dist/components/toggle/Toggle.stories.tsx +488 -909
  54. package/dist/components/tooltip/Tooltip.stories.tsx +344 -1372
  55. package/dist/components/typography/Typography.stories.tsx +406 -89
  56. package/dist/hooks/use-change-state/UseChangeState.stories.tsx +309 -606
  57. package/dist/hooks/use-previous/UsePrevious.stories.tsx +367 -917
  58. package/dist/hooks/use-standalone-pagination/UseStandalonePagination.stories.tsx +639 -867
  59. package/dist/icons/Icons.stories.tsx +0 -12
  60. package/dist/icons/ai-avatar-icon/AiAvatarIcon.stories.tsx +226 -1013
  61. package/dist/icons/alert-icon/AlertIcon.stories.tsx +109 -929
  62. package/dist/icons/all-icons.tsx +124 -87
  63. package/dist/icons/angle-down-icon/AngleDownIcon.stories.tsx +140 -971
  64. package/dist/icons/apple-logo-icon/AppleLogoIcon.stories.tsx +148 -888
  65. package/dist/icons/arrow-box-left-icon/ArrowBoxLeftIcon.stories.tsx +135 -1019
  66. package/dist/icons/arrow-corner-up-left-icon/ArrowCornerUpLeftIcon.stories.tsx +137 -953
  67. package/dist/icons/arrow-corner-up-right-icon/ArrowCornerUpRightIcon.stories.tsx +138 -997
  68. package/dist/icons/arrow-left-icon/ArrowLeftIcon.stories.tsx +136 -942
  69. package/dist/icons/arrow-right-icon/ArrowRightIcon.stories.tsx +148 -1092
  70. package/dist/icons/arrow-right-up-icon/ArrowRightUpIcon.stories.tsx +146 -1211
  71. package/dist/icons/art-board-icon/ArtBoardIcon.stories.tsx +126 -615
  72. package/dist/icons/audio-bar-icon/AudioBarIcon.stories.tsx +144 -1164
  73. package/dist/icons/backward-ten-seconds-icon/BackwardTenSecondsIcon.stories.tsx +167 -985
  74. package/dist/icons/bubble-check-icon/BubbleCheckIcon.stories.tsx +122 -1179
  75. package/dist/icons/bubble-crossed-icon/BubbleCrossedIcon.stories.tsx +124 -1168
  76. package/dist/icons/bubble-sparkle-icon/BubbleSparkleIcon.stories.tsx +119 -850
  77. package/dist/icons/camera-icon/CameraIcon.stories.tsx +112 -1213
  78. package/dist/icons/capital-a-letter-icon/CapitalALetterIcon.stories.tsx +117 -934
  79. package/dist/icons/chevron-double-left-icon/ChevronDoubleLeftIcon.stories.tsx +160 -961
  80. package/dist/icons/chevron-double-right-icon/ChevronDoubleRightIcon.stories.tsx +163 -961
  81. package/dist/icons/chevron-down-icon/ChevronDownIcon.stories.tsx +144 -942
  82. package/dist/icons/chevron-left-icon/ChevronLeftIcon.stories.tsx +129 -966
  83. package/dist/icons/chevron-right-icon/ChevronRightIcon.stories.tsx +147 -964
  84. package/dist/icons/chevron-up-icon/ChevronUpIcon.stories.tsx +145 -975
  85. package/dist/icons/circle-tick-icon/CircleTickIcon.stories.tsx +150 -1142
  86. package/dist/icons/circular-play-icon/CircularPlayIcon.stories.tsx +114 -461
  87. package/dist/icons/coin-icon/CoinIcon.stories.tsx +124 -1322
  88. package/dist/icons/coin-toons-icon/CoinToonsIcon.stories.tsx +117 -1318
  89. package/dist/icons/column-wide-add-icon/ColumnWideAddIcon.stories.tsx +114 -903
  90. package/dist/icons/command-icon/CommandIcon.stories.tsx +127 -1042
  91. package/dist/icons/copy-icon/CopyIcon.stories.tsx +123 -962
  92. package/dist/icons/cross-circle-icon/CrossCircleIcon.stories.tsx +147 -999
  93. package/dist/icons/cross-icon/CrossIcon.stories.tsx +139 -960
  94. package/dist/icons/download-icon/DownloadIcon.stories.tsx +126 -820
  95. package/dist/icons/edit-big-icon/EditBigIcon.stories.tsx +124 -1031
  96. package/dist/icons/email-icon/EmailIcon.stories.tsx +115 -936
  97. package/dist/icons/expand-icon/ExpandIcon.stories.tsx +112 -1111
  98. package/dist/icons/eye-close-icon/EyeCloseIcon.stories.tsx +144 -1025
  99. package/dist/icons/eye-open-icon/EyeOpenIcon.stories.tsx +143 -1036
  100. package/dist/icons/feature-shine-icon/FeatureShineIcon.stories.tsx +127 -1011
  101. package/dist/icons/file-chart-icon/FileChartIcon.stories.tsx +126 -1056
  102. package/dist/icons/file-text-icon/FileTextIcon.stories.tsx +125 -614
  103. package/dist/icons/filter-bar-row-icon/FilterBarRowIcon.stories.tsx +119 -1050
  104. package/dist/icons/forward-ten-seconds-icon/ForwardTenSecondsIcon.stories.tsx +169 -989
  105. package/dist/icons/git-branch-icon/GitBranchIcon.stories.tsx +115 -1145
  106. package/dist/icons/git-fork-icon/GitForkIcon.stories.tsx +115 -1122
  107. package/dist/icons/globe-icon/GlobeIcon.stories.tsx +130 -313
  108. package/dist/icons/google-logo-icon/GoogleLogoIcon.stories.tsx +145 -940
  109. package/dist/icons/grip-vertical-icon/GripVerticalIcon.stories.tsx +119 -1174
  110. package/dist/icons/head-icon/HeadIcon.stories.tsx +111 -916
  111. package/dist/icons/heart-icon/HeartIcon.stories.tsx +120 -1019
  112. package/dist/icons/image-avatar-sparkle-icon/ImageAvatarSparkleIcon.stories.tsx +119 -683
  113. package/dist/icons/image-icon/ImageIcon.stories.tsx +105 -1121
  114. package/dist/icons/import-folder-icon/ImportFolderIcon.stories.tsx +111 -1192
  115. package/dist/icons/import-left-arrow-folder-icon/ImportLeftArrowFolderIcon.stories.tsx +136 -1256
  116. package/dist/icons/indian-flag-icon/IndianFlagIcon.stories.tsx +159 -962
  117. package/dist/icons/instagram-icon/InstagramIcon.stories.tsx +161 -1385
  118. package/dist/icons/layout-column-icon/LayoutColumnIcon.stories.tsx +124 -972
  119. package/dist/icons/layout-left-icon/LayoutLeftIcon.stories.tsx +119 -948
  120. package/dist/icons/layout-right-icon/LayoutRightIcon.stories.tsx +119 -942
  121. package/dist/icons/light-bulb-simple-icon/LightBulbSimpleIcon.stories.tsx +108 -1215
  122. package/dist/icons/linked-in-icon/LinkedInIcon.stories.tsx +154 -1517
  123. package/dist/icons/magic-book-icon/MagicBookIcon.stories.tsx +110 -1188
  124. package/dist/icons/magic-edit-icon/MagicEditIcon.stories.tsx +119 -678
  125. package/dist/icons/maintenance-icon/MaintenanceIcon.stories.tsx +123 -1184
  126. package/dist/icons/message-icon/MessageIcon.stories.tsx +114 -538
  127. package/dist/icons/minimize-icon/MinimizeIcon.stories.tsx +116 -1158
  128. package/dist/icons/moon-icon/MoonIcon.stories.tsx +120 -536
  129. package/dist/icons/move-horizontal-icon/MoveHorizontalIcon.stories.tsx +109 -1184
  130. package/dist/icons/move-vertical-icon/MoveVerticalIcon.stories.tsx +115 -1134
  131. package/dist/icons/musical-note-icon/MusicalNoteIcon.stories.tsx +119 -971
  132. package/dist/icons/notepad-icon/NotepadIcon.stories.tsx +111 -1100
  133. package/dist/icons/notes-icon/NotesIcon.stories.tsx +119 -1101
  134. package/dist/icons/page-search-icon/PageSearchIcon.stories.tsx +109 -1111
  135. package/dist/icons/page-text-icon/PageTextIcon.stories.tsx +122 -684
  136. package/dist/icons/paint-roll-icon/PaintRollIcon.stories.tsx +113 -954
  137. package/dist/icons/paper-plane-icon/PaperPlaneIcon.stories.tsx +112 -877
  138. package/dist/icons/pause-icon/PauseIcon.stories.tsx +113 -1000
  139. package/dist/icons/pencil-icon/PencilIcon.stories.tsx +115 -1070
  140. package/dist/icons/phone-icon/PhoneIcon.stories.tsx +115 -978
  141. package/dist/icons/plus-icon/PlusIcon.stories.tsx +106 -1093
  142. package/dist/icons/pocket-studio-icon/PocketStudioIcon.stories.tsx +107 -829
  143. package/dist/icons/scroll-down-icon/ScrollDownIcon.stories.tsx +102 -469
  144. package/dist/icons/search-icon/SearchIcon.stories.tsx +111 -1124
  145. package/dist/icons/setting-icon/SettingIcon.stories.tsx +107 -970
  146. package/dist/icons/share-icon/ShareIcon.stories.tsx +120 -1025
  147. package/dist/icons/shield-icon/ShieldIcon.stories.tsx +117 -931
  148. package/dist/icons/site-logo-icon/SiteLogoIcon.stories.tsx +137 -1104
  149. package/dist/icons/skip-backward-icon/SkipBackwardIcon.stories.tsx +172 -982
  150. package/dist/icons/skip-forward-icon/SkipForwardIcon.stories.tsx +164 -983
  151. package/dist/icons/sparkles-soft-icon/SparklesSoftIcon.stories.tsx +105 -958
  152. package/dist/icons/spinner-gradient-icon/SpinnerGradientIcon.stories.tsx +158 -580
  153. package/dist/icons/spinner-gradient-icon/index.tsx +6 -1
  154. package/dist/icons/spinner-solid-icon/SpinnerSolidIcon.stories.tsx +158 -587
  155. package/dist/icons/spinner-solid-icon/index.tsx +6 -1
  156. package/dist/icons/spinner-solid-neutral-icon/SpinnerSolidINeutralcon.stories.tsx +146 -682
  157. package/dist/icons/spinner-solid-neutral-icon/index.tsx +1 -1
  158. package/dist/icons/star-icon/StarIcon.stories.tsx +124 -904
  159. package/dist/icons/store-coin-icon/StoreCoinIcon.stories.tsx +112 -964
  160. package/dist/icons/suggestion-icon/SuggestionIcon.stories.tsx +116 -852
  161. package/dist/icons/sun-icon/SunIcon.stories.tsx +120 -831
  162. package/dist/icons/text-color-icon/TextColorIcon.stories.tsx +116 -950
  163. package/dist/icons/text-indicator-icon/TextIndicatorIcon.stories.tsx +123 -980
  164. package/dist/icons/threads-icon/ThreadsIcon.stories.tsx +156 -1427
  165. package/dist/icons/tick-circle-icon/TickCircleIcon.stories.tsx +146 -1142
  166. package/dist/icons/tick-icon/TickIcon.stories.tsx +145 -1276
  167. package/dist/icons/trash-icon/TrashIcon.stories.tsx +108 -933
  168. package/dist/icons/twitter-x-icon/TwitterXIcon.stories.tsx +157 -1402
  169. package/dist/icons/upload-icon/UploadIcon.stories.tsx +115 -889
  170. package/dist/icons/vertical-menu-icon/VerticalMenuIcon.stories.tsx +118 -984
  171. package/dist/icons/video-play-list-icon/VideoPlaylistIcon.stories.tsx +125 -1049
  172. package/dist/icons/voice-playing-icon/VoicePlayingIcon.stories.tsx +123 -1356
  173. package/dist/icons/volume-full-icon/VolumeFullIcon.stories.tsx +110 -1171
  174. package/dist/icons/volume-half-icon/VolumeHalfIcon.stories.tsx +112 -1093
  175. package/dist/icons/volume-off-icon/VolumeOffIcon.stories.tsx +115 -1087
  176. package/dist/icons/warning-icon/WarningIcon.stories.tsx +122 -1046
  177. package/dist/icons/youtube-icon/YoutubeIcon.stories.tsx +161 -936
  178. package/dist/index.cjs +84 -84
  179. package/dist/index.js +84 -84
  180. package/dist/styles/aural-all-theme.css +1222 -0
  181. package/dist/styles/{aural-theme.css → aural-dark-theme.css} +15 -3
  182. package/dist/styles/aural-light-theme.css +1047 -0
  183. package/package.json +1 -1
@@ -1,6 +1,20 @@
1
1
  import React from "react"
2
2
  import type { Meta, StoryObj } from "@storybook/react-vite"
3
3
 
4
+ import { MusicalNoteIcon } from "src/ui/icons/musical-note-icon"
5
+ import { VoicePlayingIcon } from "src/ui/icons/voice-playing-icon"
6
+ import { VolumeFullIcon } from "src/ui/icons/volume-full-icon"
7
+ import { VolumeOffIcon } from "src/ui/icons/volume-off-icon"
8
+ import {
9
+ IconColorVariations,
10
+ IconDefaultCanvas,
11
+ IconPlaygroundCanvas,
12
+ IconSizeVariations,
13
+ IconUsageCanvas,
14
+ IconUsageSection,
15
+ } from "src/ui/story-spec/icons/icon-story-canvas"
16
+ import { AuralIconDocsPage } from "src/ui/story-spec/icons/icon-story-docs-page"
17
+
4
18
  import { VolumeHalfIcon } from "."
5
19
 
6
20
  const meta: Meta<typeof VolumeHalfIcon> = {
@@ -11,965 +25,75 @@ const meta: Meta<typeof VolumeHalfIcon> = {
11
25
  backgrounds: {
12
26
  default: "dark",
13
27
  values: [
14
- { name: "dark", value: "#0a0a0a" },
15
- { name: "darker", value: "#000000" },
16
- { name: "light", value: "#ffffff" },
28
+ { name: "dark", value: "var(--color-fm-surface-primary)" },
29
+ { name: "darker", value: "var(--color-fm-neutral-0)" },
30
+ { name: "light", value: "var(--color-fm-neutral-1100)" },
17
31
  ],
18
32
  },
19
33
  docs: {
20
34
  page: () => (
21
- <>
22
- {/* Override default docs styling */}
23
- <style>
24
- {`
25
- .sbdocs-wrapper {
26
- padding: 0 ;
27
- max-width: none ;
28
- background: transparent ;
29
- }
30
- .sbdocs-content {
31
- max-width: none ;
32
- padding: 0 ;
33
- margin: 0 ;
34
- background: transparent ;
35
- }
36
- .docs-story {
37
- background: transparent ;
38
- }
39
- .sbdocs {
40
- background: transparent ;
41
- }
42
- body {
43
- background: #0a0a0a ;
44
- }
45
- #storybook-docs {
46
- background: #0a0a0a ;
47
- }
48
- .sbdocs-preview {
49
- background: transparent ;
50
- border: none ;
51
- }
52
- .sbdocs-h1, .sbdocs-h2, .sbdocs-h3, .sbdocs-h4, .sbdocs-h5, .sbdocs-h6 {
53
- color: white ;
54
- }
55
- .sbdocs-p, .sbdocs-li {
56
- color: rgba(255, 255, 255, 0.7) ;
57
- }
58
- .sbdocs-code {
59
- background: rgba(255, 255, 255, 0.1) ;
60
- color: rgba(168, 85, 247, 1) ;
61
- border: 1px solid rgba(255, 255, 255, 0.1) ;
62
- }
63
- .sbdocs-pre {
64
- background: rgba(0, 0, 0, 0.4) ;
65
- border: 1px solid rgba(255, 255, 255, 0.1) ;
66
- }
67
- .sbdocs-table {
68
- background: rgba(255, 255, 255, 0.05) ;
69
- border: 1px solid rgba(255, 255, 255, 0.1) ;
70
- }
71
- .sbdocs-table th {
72
- background: rgba(255, 255, 255, 0.05) ;
73
- color: white ;
74
- border-bottom: 1px solid rgba(255, 255, 255, 0.1) ;
75
- }
76
- .sbdocs-table td {
77
- color: rgba(255, 255, 255, 0.7) ;
78
- border-bottom: 1px solid rgba(255, 255, 255, 0.05) ;
79
- }
80
- `}
81
- </style>
82
-
83
- <div className="min-h-screen bg-gradient-to-br from-gray-900 via-emerald-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-emerald-500/10 via-transparent to-teal-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-emerald-500/30 bg-gradient-to-br from-emerald-500/20 to-teal-500/20">
90
- <VolumeHalfIcon className="h-12 w-12 text-emerald-400" />
91
- </div>
92
- <h1 className="text-5xl font-bold !text-white">
93
- VolumeHalfIcon
94
- </h1>
95
- <p className="!mx-auto max-w-3xl text-xl leading-relaxed !text-white/70">
96
- A medium volume audio control icon for media interfaces.
97
- Features the classic speaker with moderate sound waves
98
- design, essential for music players, video platforms, audio
99
- apps, and any media interface where users need to control
100
- moderate volume levels.
101
- </p>
102
-
103
- {/* Stats */}
104
- <div className="flex items-center justify-center gap-8 pt-8">
105
- <div className="text-center">
106
- <div className="text-3xl font-bold text-emerald-300">
107
- Medium Volume
108
- </div>
109
- <div className="text-sm text-white/60">
110
- Balanced audio
111
- </div>
112
- </div>
113
- <div className="h-8 w-px bg-white/20" />
114
- <div className="text-center">
115
- <div className="text-3xl font-bold text-teal-300">
116
- Accessible
117
- </div>
118
- <div className="text-sm text-white/60">
119
- Screen reader friendly
120
- </div>
121
- </div>
122
- <div className="h-8 w-px bg-white/20" />
123
- <div className="text-center">
124
- <div className="text-3xl font-bold text-green-300">
125
- Universal
126
- </div>
127
- <div className="text-sm text-white/60">
128
- Standard volume symbol
129
- </div>
130
- </div>
131
- </div>
132
- </div>
133
- </div>
134
- </div>
135
-
136
- {/* Content */}
137
- <div className="!mx-auto max-w-7xl !space-y-16 px-6 py-12">
138
- {/* Quick Usage */}
139
- <div className="!space-y-8">
140
- <h2 className="text-center text-3xl font-bold !text-white">
141
- Quick Start
142
- </h2>
143
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
144
- <div className="!space-y-4">
145
- <h3 className="text-xl font-semibold !text-emerald-300">
146
- Basic Usage
147
- </h3>
148
- <div className="rounded-lg bg-black/40 p-4">
149
- <pre className="overflow-x-auto text-sm !text-green-300">
150
- {`import { VolumeHalfIcon } from "@icons/volume-half-icon"
151
-
152
- function VolumeControl() {
35
+ <AuralIconDocsPage
36
+ accentToken="info"
37
+ features={[
38
+ { title: "Volume", description: "Half / mid volume icon" },
39
+ { title: "Audio", description: "Reduced audio output" },
40
+ { title: "Accessible", description: "ARIA-ready by default" },
41
+ ]}
42
+ quickStart={{
43
+ codeExample: `import { VolumeHalfIcon } from "src/ui/icons/volume-half-icon"
44
+
45
+ function VolumeButton() {
153
46
  return (
154
- <button
155
- onClick={setMediumVolume}
156
- className="p-2 hover:bg-white/10 rounded-lg"
157
- aria-label="Set medium volume"
158
- >
159
- <VolumeHalfIcon className="h-6 w-6 text-emerald-400" />
47
+ <button>
48
+ <VolumeHalfIcon className="h-5 w-5 text-fm-icon-active" />
160
49
  </button>
161
50
  )
162
- }`}
163
- </pre>
164
- </div>
165
- </div>
166
-
167
- <div className="!space-y-4">
168
- <h3 className="text-xl font-semibold !text-emerald-300">
169
- Live Preview
170
- </h3>
171
- <div className="flex h-32 items-center justify-center rounded-lg border border-white/10 bg-white/5">
172
- <button className="rounded-lg border border-emerald-500/20 bg-emerald-500/10 p-3 transition-colors hover:bg-emerald-500/20">
173
- <VolumeHalfIcon className="h-6 w-6 text-emerald-400" />
174
- </button>
175
- </div>
176
- </div>
177
- </div>
178
- </div>
179
-
180
- {/* Props Documentation */}
181
- <div className="!space-y-8">
182
- <h2 className="text-center text-3xl font-bold !text-white">
183
- Props & Configuration
184
- </h2>
185
-
186
- <div className="overflow-hidden rounded-lg border border-white/10 bg-white/5">
187
- <div className="bg-white/5 p-4">
188
- <h3 className="text-xl font-semibold !text-white">Props</h3>
189
- </div>
190
- <table className="!my-0 w-full">
191
- <thead className="bg-white/5">
192
- <tr className="border-b border-white/10">
193
- <th className="px-6 py-4 text-left text-sm font-semibold !text-white">
194
- Prop
195
- </th>
196
- <th className="px-6 py-4 text-left text-sm font-semibold !text-white">
197
- Type
198
- </th>
199
- <th className="px-6 py-4 text-left text-sm font-semibold !text-white">
200
- Default
201
- </th>
202
- <th className="px-6 py-4 text-left text-sm font-semibold !text-white">
203
- Description
204
- </th>
205
- </tr>
206
- </thead>
207
- <tbody>
208
- {" "}
209
- <tr className="!bg-black/10">
210
- <td className="px-6 py-4 font-mono text-sm !text-blue-300">
211
- withAccessibility
212
- </td>
213
- <td className="px-6 py-4 text-sm !text-white/70">
214
- boolean
215
- </td>
216
- <td className="px-6 py-4 text-sm !text-white/50">
217
- true
218
- </td>
219
- <td className="px-6 py-4 text-sm !text-white/70">
220
- Whether to wrap the icon with accessibility feature
221
- </td>
222
- </tr>
223
- <tr className="border-b border-white/5 !bg-black/10">
224
- <td className="px-6 py-4 font-mono text-sm !text-emerald-300">
225
- height
226
- </td>
227
- <td className="px-6 py-4 text-sm !text-white/70">
228
- number | string
229
- </td>
230
- <td className="px-6 py-4 text-sm !text-white/50">24</td>
231
- <td className="px-6 py-4 text-sm !text-white/70">
232
- Height of the icon in pixels
233
- </td>
234
- </tr>
235
- <tr className="border-b border-white/5">
236
- <td className="px-6 py-4 font-mono text-sm !text-emerald-300">
237
- stroke
238
- </td>
239
- <td className="px-6 py-4 text-sm !text-white/70">
240
- string
241
- </td>
242
- <td className="px-6 py-4 text-sm !text-white/50">
243
- currentColor
244
- </td>
245
- <td className="px-6 py-4 text-sm !text-white/70">
246
- Stroke color of the icon
247
- </td>
248
- </tr>
249
- <tr className="border-b border-white/5 !bg-black/10">
250
- <td className="px-6 py-4 font-mono text-sm !text-emerald-300">
251
- strokeWidth
252
- </td>
253
- <td className="px-6 py-4 text-sm !text-white/70">
254
- string | number
255
- </td>
256
- <td className="px-6 py-4 text-sm !text-white/50">
257
- 1.5
258
- </td>
259
- <td className="px-6 py-4 text-sm !text-white/70">
260
- Width of the stroke
261
- </td>
262
- </tr>
263
- <tr className="border-b border-white/5">
264
- <td className="px-6 py-4 font-mono text-sm !text-emerald-300">
265
- className
266
- </td>
267
- <td className="px-6 py-4 text-sm !text-white/70">
268
- string
269
- </td>
270
- <td className="px-6 py-4 text-sm !text-white/50">-</td>
271
- <td className="px-6 py-4 text-sm !text-white/70">
272
- CSS classes for styling (use for overrides)
273
- </td>
274
- </tr>
275
- <tr className="!bg-black/10">
276
- <td className="px-6 py-4 font-mono text-sm !text-emerald-300">
277
- ...svgProps
278
- </td>
279
- <td className="px-6 py-4 text-sm !text-white/70">
280
- SVGProps
281
- </td>
282
- <td className="px-6 py-4 text-sm !text-white/50">-</td>
283
- <td className="px-6 py-4 text-sm !text-white/70">
284
- All standard SVG element props
285
- </td>
286
- </tr>
287
- </tbody>
288
- </table>
289
- </div>
290
- </div>
291
-
292
- {/* Size Variations */}
293
- <div className="!space-y-8">
294
- <h2 className="text-center text-3xl font-bold !text-white">
295
- Size Variations
296
- </h2>
297
- <div className="rounded-lg border border-white/10 bg-white/5 p-8">
298
- <div className="!space-y-6">
299
- <div className="grid grid-cols-1 gap-8 md:grid-cols-2">
300
- <div className="!space-y-4">
301
- <h3 className="text-lg font-semibold !text-emerald-300">
302
- Standard Sizes
303
- </h3>
304
- <div className="flex items-end gap-6 rounded-lg bg-black/20 p-6">
305
- <div className="text-center">
306
- <VolumeHalfIcon className="!mx-auto mb-2 h-3 w-3 text-emerald-400" />
307
- <span className="text-xs text-white/60">12px</span>
308
- </div>
309
- <div className="text-center">
310
- <VolumeHalfIcon className="!mx-auto mb-2 h-4 w-4 text-emerald-400" />
311
- <span className="text-xs text-white/60">16px</span>
312
- </div>
313
- <div className="text-center">
314
- <VolumeHalfIcon className="!mx-auto mb-2 h-5 w-5 text-emerald-400" />
315
- <span className="text-xs text-white/60">20px</span>
316
- </div>
317
- <div className="text-center">
318
- <VolumeHalfIcon className="!mx-auto mb-2 h-6 w-6 text-emerald-400" />
319
- <span className="text-xs text-white/60">24px</span>
320
- </div>
321
- <div className="text-center">
322
- <VolumeHalfIcon className="!mx-auto mb-2 h-8 w-8 text-emerald-400" />
323
- <span className="text-xs text-white/60">32px</span>
324
- </div>
325
- <div className="text-center">
326
- <VolumeHalfIcon className="!mx-auto mb-2 h-12 w-12 text-emerald-400" />
327
- <span className="text-xs text-white/60">48px</span>
328
- </div>
329
- </div>
330
- </div>
331
-
332
- <div className="!space-y-4">
333
- <h3 className="text-lg font-semibold !text-emerald-300">
334
- Code Example
335
- </h3>
336
- <div className="rounded-lg bg-black/40 p-4">
337
- <pre className="overflow-x-auto text-sm !text-cyan-300">
338
- {`// Small (16px) - compact controls
339
- <VolumeHalfIcon className="h-4 w-4" />
340
-
341
- // Medium (24px) - standard interface
342
- <VolumeHalfIcon className="h-6 w-6" />
343
-
344
- // Large (32px) - prominent displays
345
- <VolumeHalfIcon className="h-8 w-8" />
346
-
347
- // Custom size
348
- <VolumeHalfIcon width={40} height={40} />`}
349
- </pre>
350
- </div>
351
- </div>
352
- </div>
353
- </div>
354
- </div>
355
- </div>
356
-
357
- {/* Color Variations */}
358
- <div className="!space-y-8">
359
- <h2 className="text-center text-3xl font-bold !text-white">
360
- Color Variations
361
- </h2>
362
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
363
- <div className="!space-y-4">
364
- <h3 className="text-lg font-semibold !text-emerald-300">
365
- Semantic Colors
366
- </h3>
367
- <div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
368
- <div className="flex items-center gap-4">
369
- <VolumeHalfIcon className="h-6 w-6 text-emerald-400" />
370
- <div>
371
- <div className="text-sm font-medium text-white">
372
- Medium Volume
373
- </div>
374
- <div className="text-xs text-white/60">
375
- text-emerald-400
376
- </div>
377
- </div>
378
- </div>
379
- <div className="flex items-center gap-4">
380
- <VolumeHalfIcon className="h-6 w-6 text-teal-400" />
381
- <div>
382
- <div className="text-sm font-medium text-white">
383
- Balanced
384
- </div>
385
- <div className="text-xs text-white/60">
386
- text-teal-400
387
- </div>
388
- </div>
389
- </div>
390
- <div className="flex items-center gap-4">
391
- <VolumeHalfIcon className="h-6 w-6 text-green-400" />
392
- <div>
393
- <div className="text-sm font-medium text-white">
394
- Active
395
- </div>
396
- <div className="text-xs text-white/60">
397
- text-green-400
398
- </div>
399
- </div>
400
- </div>
401
- <div className="flex items-center gap-4">
402
- <VolumeHalfIcon className="h-6 w-6 text-blue-400" />
403
- <div>
404
- <div className="text-sm font-medium text-white">
405
- Accent
406
- </div>
407
- <div className="text-xs text-white/60">
408
- text-blue-400
409
- </div>
410
- </div>
411
- </div>
412
- </div>
413
- </div>
414
-
415
- <div className="!space-y-4">
416
- <h3 className="text-lg font-semibold !text-emerald-300">
417
- Custom Colors
418
- </h3>
419
- <div className="rounded-lg bg-black/40 p-4">
420
- <pre className="overflow-x-auto text-sm !text-green-300">
421
- {`// Using Tailwind classes
422
- <VolumeHalfIcon className="h-6 w-6 text-emerald-400" />
423
- <VolumeHalfIcon className="h-6 w-6 text-teal-500" />
424
-
425
- // Using CSS custom properties
426
- <VolumeHalfIcon
427
- className="h-6 w-6"
428
- style={{ color: 'var(--color-volume)' }}
429
- />
430
-
431
- // Direct stroke prop
432
- <VolumeHalfIcon
433
- width={24}
434
- height={24}
435
- stroke="#10b981"
436
- />`}
437
- </pre>
438
- </div>
439
- </div>
440
- </div>
441
- </div>
442
-
443
- {/* Usage Examples */}
444
- <div className="!space-y-8">
445
- <h2 className="text-center text-3xl font-bold !text-white">
446
- Usage Examples
447
- </h2>
448
-
449
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
450
- {/* Music Player */}
451
- <div className="!space-y-4">
452
- <h3 className="text-lg font-semibold !text-emerald-300">
453
- Music Player
454
- </h3>
455
- <div className="!space-y-4">
456
- <div className="rounded-lg border border-white/10 bg-white/5 p-6">
457
- <div className="mb-4 flex items-center gap-3">
458
- <div className="h-12 w-12 rounded-lg bg-gradient-to-br from-emerald-500/20 to-teal-500/20" />
459
- <div>
460
- <div className="text-sm font-medium !text-white">
461
- Ambient Sounds
462
- </div>
463
- <div className="text-xs !text-white/60">
464
- Nature Collection
465
- </div>
466
- </div>
467
- </div>
468
- <div className="mb-4 flex items-center justify-center gap-4">
469
- <button className="rounded-lg p-2 transition-colors hover:bg-white/10">
470
- <div className="h-6 w-6 rounded-full border border-white/60 bg-white/20" />
471
- </button>
472
- <button className="rounded-lg p-3 transition-colors hover:bg-white/10">
473
- <div className="h-8 w-8 rounded-full border-2 border-white/60 bg-white/20" />
474
- </button>
475
- <button className="rounded-lg p-2 transition-colors hover:bg-white/10">
476
- <div className="h-6 w-6 rounded-full border border-white/60 bg-white/20" />
477
- </button>
478
- </div>
479
- <div className="flex items-center justify-between">
480
- <div className="text-xs text-white/60">1:23</div>
481
- <div className="flex items-center gap-2">
482
- <VolumeHalfIcon className="h-4 w-4 text-emerald-400" />
483
- <div className="h-1 w-20 rounded-full bg-white/20">
484
- <div className="h-full w-1/2 rounded-full bg-emerald-400" />
485
- </div>
486
- </div>
487
- <div className="text-xs text-white/60">3:45</div>
488
- </div>
489
- </div>
490
- <div className="rounded-lg bg-black/40 p-4">
491
- <pre className="overflow-x-auto text-sm !text-green-300">
492
- {`// Music player with medium volume
493
- <div className="player-controls">
494
- <div className="volume-section">
495
- <button onClick={setMediumVolume}>
496
- <VolumeHalfIcon className="h-4 w-4 text-emerald-400" />
497
- </button>
498
- <VolumeSlider
499
- value={50}
500
- onChange={setVolume}
501
- className="volume-slider"
502
- />
503
- </div>
504
- <div className="playback-info">
505
- Volume: 50%
506
- </div>
507
- </div>`}
508
- </pre>
509
- </div>
510
- </div>
511
- </div>
512
-
513
- {/* Video Conference */}
514
- <div className="!space-y-4">
515
- <h3 className="text-lg font-semibold !text-emerald-300">
516
- Video Conference
517
- </h3>
518
- <div className="!space-y-4">
519
- <div className="rounded-lg border border-white/10 bg-white/5 p-6">
520
- <div className="mb-4">
521
- <div className="text-sm font-medium !text-white">
522
- Weekly Standup
523
- </div>
524
- <div className="text-xs !text-white/60">
525
- 3 participants
526
- </div>
527
- </div>
528
- <div className="mb-4 grid grid-cols-3 gap-2">
529
- {[...Array(3)].map((_, i) => (
530
- <div
531
- key={i}
532
- className="rounded bg-white/5 p-3 text-center"
533
- >
534
- <div className="mx-auto mb-2 h-10 w-10 rounded-full bg-gradient-to-br from-emerald-400/20 to-teal-400/20" />
535
- <div className="text-xs font-medium text-white">
536
- User {i + 1}
537
- </div>
538
- <div className="mt-1 flex justify-center">
539
- {i === 1 ? (
540
- <VolumeHalfIcon className="h-3 w-3 text-emerald-400" />
541
- ) : (
542
- <div className="h-3 w-3 rounded-full bg-gray-400/20" />
543
- )}
544
- </div>
545
- </div>
546
- ))}
547
- </div>
548
- <div className="flex justify-center gap-3">
549
- <button className="rounded-lg border border-emerald-500/30 bg-emerald-500/20 p-2 hover:bg-emerald-500/30">
550
- <VolumeHalfIcon className="h-5 w-5 text-emerald-400" />
551
- </button>
552
- <button className="rounded-lg border border-white/20 bg-white/10 p-2 hover:bg-white/20">
553
- <div className="h-5 w-5 rounded-full border border-white/60 bg-white/20" />
554
- </button>
555
- </div>
556
- </div>
557
- <div className="rounded-lg bg-black/40 p-4">
558
- <pre className="overflow-x-auto text-sm !text-green-300">
559
- {`// Conference call audio indicator
560
- <div className="participant-card">
561
- <div className="participant-info">
562
- <Avatar src={user.avatar} />
563
- <span>{user.name}</span>
564
- </div>
565
- <div className="audio-indicator">
566
- {user.speakerVolume > 75 ? (
567
- <VolumeHighIcon />
568
- ) : user.speakerVolume > 25 ? (
569
- <VolumeHalfIcon className="text-emerald-400" />
570
- ) : user.speakerVolume > 0 ? (
571
- <VolumeLowIcon />
572
- ) : (
573
- <VolumeOffIcon />
574
- )}
575
- </div>
576
- </div>`}
577
- </pre>
578
- </div>
579
- </div>
580
- </div>
581
-
582
- {/* Audio Dashboard */}
583
- <div className="!space-y-4">
584
- <h3 className="text-lg font-semibold !text-emerald-300">
585
- Audio Dashboard
586
- </h3>
587
- <div className="!space-y-4">
588
- <div className="rounded-lg border border-white/10 bg-white/5 p-6">
589
- <div className="!space-y-4">
590
- <div>
591
- <h4 className="mb-3 text-sm font-medium text-white">
592
- Audio Levels
593
- </h4>
594
- <div className="space-y-3">
595
- <div className="flex items-center justify-between">
596
- <div className="flex items-center gap-3">
597
- <VolumeHalfIcon className="h-5 w-5 text-emerald-400" />
598
- <div>
599
- <div className="text-sm text-white">
600
- Master Volume
601
- </div>
602
- <div className="text-xs text-white/60">
603
- 50%
604
- </div>
605
- </div>
606
- </div>
607
- <div className="h-2 w-24 rounded-full bg-white/20">
608
- <div className="h-full w-1/2 rounded-full bg-emerald-400" />
609
- </div>
610
- </div>
611
- <div className="flex items-center justify-between">
612
- <div className="flex items-center gap-3">
613
- <VolumeHalfIcon className="h-5 w-5 text-teal-400" />
614
- <div>
615
- <div className="text-sm text-white">
616
- Effects
617
- </div>
618
- <div className="text-xs text-white/60">
619
- 40%
620
- </div>
621
- </div>
622
- </div>
623
- <div className="h-2 w-24 rounded-full bg-white/20">
624
- <div className="h-full w-2/5 rounded-full bg-teal-400" />
625
- </div>
626
- </div>
627
- <div className="flex items-center justify-between">
628
- <div className="flex items-center gap-3">
629
- <VolumeHalfIcon className="h-5 w-5 text-green-400" />
630
- <div>
631
- <div className="text-sm text-white">
632
- Background
633
- </div>
634
- <div className="text-xs text-white/60">
635
- 60%
636
- </div>
637
- </div>
638
- </div>
639
- <div className="h-2 w-24 rounded-full bg-white/20">
640
- <div className="h-full w-3/5 rounded-full bg-green-400" />
641
- </div>
642
- </div>
643
- </div>
644
- </div>
645
- </div>
646
- </div>
647
- <div className="rounded-lg bg-black/40 p-4">
648
- <pre className="overflow-x-auto text-sm !text-green-300">
649
- {`// Audio level dashboard
650
- <div className="audio-dashboard">
651
- {audioChannels.map(channel => (
652
- <div key={channel.id} className="channel-control">
653
- <div className="channel-info">
654
- <VolumeIcon
655
- level={channel.volume}
656
- className="text-emerald-400"
51
+ }`,
52
+ livePreview: (
53
+ <button>
54
+ <VolumeHalfIcon className="text-fm-icon-active h-6 w-6" />
55
+ </button>
56
+ ),
57
+ }}
58
+ relatedIcons={[
59
+ {
60
+ name: "VolumeFullIcon",
61
+ description: "Full volume icon",
62
+ icon: VolumeFullIcon,
63
+ accentToken: "info",
64
+ },
65
+ {
66
+ name: "VolumeOffIcon",
67
+ description: "Volume off / muted icon",
68
+ icon: VolumeOffIcon,
69
+ accentToken: "positive",
70
+ },
71
+ {
72
+ name: "VoicePlayingIcon",
73
+ description: "Voice / audio playing icon",
74
+ icon: VoicePlayingIcon,
75
+ accentToken: "warning",
76
+ },
77
+ {
78
+ name: "MusicalNoteIcon",
79
+ description: "Music / audio content icon",
80
+ icon: MusicalNoteIcon,
81
+ accentToken: "negative",
82
+ },
83
+ ]}
657
84
  />
658
- <div>
659
- <div>{channel.name}</div>
660
- <div className="volume-percent">
661
- {channel.volume}%
662
- </div>
663
- </div>
664
- </div>
665
- <VolumeSlider
666
- value={channel.volume}
667
- onChange={(val) => setChannelVolume(channel.id, val)}
668
- />
669
- </div>
670
- ))}
671
- </div>`}
672
- </pre>
673
- </div>
674
- </div>
675
- </div>
676
-
677
- {/* Podcast Player */}
678
- <div className="!space-y-4">
679
- <h3 className="text-lg font-semibold !text-emerald-300">
680
- Podcast Player
681
- </h3>
682
- <div className="!space-y-4">
683
- <div className="rounded-lg border border-white/10 bg-white/5 p-6">
684
- <div className="mb-4">
685
- <div className="text-sm font-medium !text-white">
686
- Design Talk
687
- </div>
688
- <div className="text-xs !text-white/60">
689
- Episode 12: Color Theory
690
- </div>
691
- </div>
692
- <div className="mb-4 flex items-center justify-between">
693
- <div className="flex items-center gap-4">
694
- <button className="rounded-lg p-2 transition-colors hover:bg-white/10">
695
- <div className="h-6 w-6 rounded-full border border-white/60 bg-white/20" />
696
- </button>
697
- <button className="rounded-lg p-3 transition-colors hover:bg-white/10">
698
- <div className="h-8 w-8 rounded-full border-2 border-white/60 bg-white/20" />
699
- </button>
700
- <button className="rounded-lg p-2 transition-colors hover:bg-white/10">
701
- <div className="h-6 w-6 rounded-full border border-white/60 bg-white/20" />
702
- </button>
703
- </div>
704
- <div className="flex items-center gap-2">
705
- <span className="text-xs text-white/60">1.5x</span>
706
- </div>
707
- </div>
708
- <div className="flex items-center justify-between">
709
- <div className="text-xs text-white/60">15:42</div>
710
- <div className="flex items-center gap-2">
711
- <VolumeHalfIcon className="h-4 w-4 text-emerald-400" />
712
- <div className="h-1 w-16 rounded-full bg-white/20">
713
- <div className="h-full w-1/2 rounded-full bg-emerald-400" />
714
- </div>
715
- </div>
716
- <div className="text-xs text-white/60">42:18</div>
717
- </div>
718
- </div>
719
- <div className="rounded-lg bg-black/40 p-4">
720
- <pre className="overflow-x-auto text-sm !text-green-300">
721
- {`// Podcast player with balanced audio
722
- <div className="podcast-player">
723
- <div className="episode-info">
724
- <h3>{episode.title}</h3>
725
- <p>{episode.description}</p>
726
- </div>
727
- <div className="player-controls">
728
- <PlaybackControls />
729
- <div className="audio-controls">
730
- <VolumeHalfIcon className="h-4 w-4 text-emerald-400" />
731
- <VolumeSlider
732
- value={volume}
733
- max={100}
734
- className="volume-control"
735
- />
736
- <PlaybackSpeed speed={playbackSpeed} />
737
- </div>
738
- </div>
739
- </div>`}
740
- </pre>
741
- </div>
742
- </div>
743
- </div>
744
- </div>
745
- </div>
746
-
747
- {/* Accessibility */}
748
- <div className="!space-y-8">
749
- <h2 className="text-center text-3xl font-bold !text-white">
750
- Accessibility Features
751
- </h2>
752
- <div className="grid grid-cols-1 gap-8 md:grid-cols-2">
753
- <div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
754
- <h3 className="text-lg font-semibold !text-green-300">
755
- ✅ Built-in Features
756
- </h3>
757
- <ul className="!space-y-2 text-sm !text-white/70">
758
- <li className="!text-white/70">
759
- Uses Radix UI AccessibleIcon wrapper
760
- </li>
761
- <li className="!text-white/70">
762
- Provides screen reader label "Volume half icon"
763
- </li>
764
- <li className="!text-white/70">
765
- Supports keyboard navigation when interactive
766
- </li>
767
- <li className="!text-white/70">
768
- Maintains proper color contrast ratios
769
- </li>
770
- <li className="!text-white/70">
771
- Scales with user's font size preferences
772
- </li>
773
- </ul>
774
- </div>
775
-
776
- <div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
777
- <h3 className="text-lg font-semibold !text-emerald-300">
778
- 💡 Best Practices
779
- </h3>
780
- <ul className="!space-y-2 text-sm text-white/70">
781
- <li className="!text-white/70">
782
- Always provide descriptive aria-labels for volume
783
- controls
784
- </li>
785
- <li className="!text-white/70">
786
- Use consistent placement in audio control groups
787
- </li>
788
- <li className="!text-white/70">
789
- Ensure sufficient touch target size (44px minimum)
790
- </li>
791
- <li className="!text-white/70">
792
- Provide visible focus states for keyboard users
793
- </li>
794
- <li className="!text-white/70">
795
- Consider keyboard shortcuts for volume adjustment
796
- </li>
797
- </ul>
798
- </div>
799
- </div>
800
-
801
- <div className="rounded-lg border border-white/10 bg-white/5 p-6">
802
- <h3 className="mb-4 text-lg font-semibold !text-teal-300">
803
- Proper ARIA Implementation
804
- </h3>
805
- <div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
806
- <div className="rounded-lg bg-black/40 p-4">
807
- <pre className="overflow-x-auto text-sm !text-cyan-300">
808
- {`// Volume control with proper ARIA
809
- <div className="volume-control">
810
- <button
811
- aria-label="Set medium volume"
812
- onClick={setMediumVolume}
813
- >
814
- <VolumeHalfIcon className="h-6 w-6 text-emerald-400" />
815
- </button>
816
- <div
817
- role="slider"
818
- aria-label="Volume"
819
- aria-valuemin="0"
820
- aria-valuemax="100"
821
- aria-valuenow={50}
822
- aria-valuetext="50 percent"
823
- />
824
- </div>
825
-
826
- // Audio level indicator with description
827
- <div className="audio-level">
828
- <VolumeHalfIcon
829
- className="h-5 w-5"
830
- aria-describedby="volume-status"
831
- />
832
- <div id="volume-status" className="sr-only">
833
- Volume at medium level, 50 percent
834
- </div>
835
- </div>
836
-
837
- // Volume preset button
838
- <button
839
- aria-label="Set volume to 50%"
840
- aria-pressed={volume === 50}
841
- onClick={() => setVolume(50)}
842
- >
843
- <VolumeHalfIcon className="h-4 w-4" />
844
- <span>Medium</span>
845
- </button>`}
846
- </pre>
847
- </div>
848
- <div className="!space-y-4">
849
- <p className="text-sm !text-white/70">
850
- When using VolumeHalfIcon for volume controls, always
851
- provide clear context about the current volume level and
852
- what the control will do.
853
- </p>
854
- <div className="rounded-lg border border-emerald-500/20 bg-emerald-500/10 p-4">
855
- <div className="flex items-center gap-2 text-sm text-emerald-200">
856
- <VolumeHalfIcon className="h-4 w-4" />
857
- <span>
858
- Screen readers need context about volume levels and
859
- changes
860
- </span>
861
- </div>
862
- </div>
863
- </div>
864
- </div>
865
- </div>
866
- </div>
867
-
868
- {/* Related Icons */}
869
- <div className="!space-y-8">
870
- <h2 className="text-center text-3xl font-bold !text-white">
871
- Related Icons
872
- </h2>
873
- <div className="grid grid-cols-2 gap-6 md:grid-cols-4">
874
- <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
875
- <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-blue-500/20">
876
- <span className="!text-2xl !text-white">🔊</span>
877
- </div>
878
- <div>
879
- <div className="font-medium text-white">
880
- VolumeHighIcon
881
- </div>
882
- <div className="text-xs text-white/60">High volume</div>
883
- </div>
884
- </div>
885
- <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
886
- <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-yellow-500/20">
887
- <span className="!text-2xl !text-white">🔉</span>
888
- </div>
889
- <div>
890
- <div className="font-medium text-white">
891
- VolumeLowIcon
892
- </div>
893
- <div className="text-xs text-white/60">Low volume</div>
894
- </div>
895
- </div>
896
- <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
897
- <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-gray-500/20">
898
- <span className="!text-2xl !text-white">🔇</span>
899
- </div>
900
- <div>
901
- <div className="font-medium text-white">
902
- VolumeOffIcon
903
- </div>
904
- <div className="text-xs text-white/60">Muted</div>
905
- </div>
906
- </div>
907
- <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
908
- <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-purple-500/20">
909
- <span className="!text-2xl !text-white">🎚️</span>
910
- </div>
911
- <div>
912
- <div className="font-medium text-white">
913
- EqualizerIcon
914
- </div>
915
- <div className="text-xs text-white/60">
916
- Audio settings
917
- </div>
918
- </div>
919
- </div>
920
- </div>
921
- </div>
922
- </div>
923
-
924
- {/* Footer */}
925
- <div className="border-t border-white/10 bg-black/20 backdrop-blur-xl">
926
- <div className="!mx-auto max-w-7xl px-6 py-8">
927
- <div className="!space-y-4 text-center">
928
- <p className="!text-white/60">
929
- VolumeHalfIcon is part of the Aural UI icon library, built
930
- with accessibility and audio control best practices in mind.
931
- </p>
932
- <p className="text-sm !text-white/40">
933
- All icons use Radix UI's AccessibleIcon for screen reader
934
- compatibility and follow WCAG guidelines for media controls.
935
- </p>
936
- </div>
937
- </div>
938
- </div>
939
- </div>
940
- </>
941
85
  ),
942
86
  },
943
87
  },
944
88
  tags: ["autodocs"],
945
89
  argTypes: {
946
- width: {
947
- control: { type: "range", min: 8, max: 96, step: 2 },
948
- description: "Width of the icon in pixels",
949
- },
950
- withAccessibility: {
951
- control: "boolean",
952
- description: "Whether to wrap the icon with accessibility features",
953
- },
954
- height: {
955
- control: { type: "range", min: 8, max: 96, step: 2 },
956
- description: "Height of the icon in pixels",
957
- },
958
- stroke: {
959
- control: "color",
960
- description: "Stroke color of the icon",
961
- },
962
- strokeWidth: {
963
- control: { type: "range", min: 0.5, max: 4, step: 0.5 },
964
- description: "Width of the stroke",
965
- },
966
90
  className: {
967
91
  control: "text",
968
- description: "CSS classes for styling (use for overrides)",
92
+ description: "CSS classes including color token",
969
93
  },
970
- onClick: {
971
- action: "clicked",
972
- description: "Click handler for interactive use",
94
+ withAccessibility: {
95
+ control: "boolean",
96
+ description: "Wrap with accessibility label",
973
97
  },
974
98
  },
975
99
  }
@@ -977,185 +101,80 @@ function VolumeControl() {
977
101
  export default meta
978
102
  type Story = StoryObj<typeof VolumeHalfIcon>
979
103
 
980
- // Story parameters for consistent dark theme
981
- const storyParameters = {
982
- backgrounds: {
983
- default: "dark",
984
- values: [
985
- { name: "dark", value: "#0a0a0a" },
986
- { name: "darker", value: "#000000" },
987
- ],
988
- },
989
- }
990
-
991
104
  export const Default: Story = {
992
105
  args: {
993
- className: "h-8 w-8 text-emerald-400",
106
+ className: "h-6 w-6 text-fm-icon-active",
994
107
  withAccessibility: true,
995
108
  },
996
- parameters: storyParameters,
997
109
  render: (args) => (
998
- <div className="flex h-32 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
110
+ <IconDefaultCanvas>
999
111
  <VolumeHalfIcon {...args} />
1000
- </div>
112
+ </IconDefaultCanvas>
1001
113
  ),
1002
114
  }
1003
115
 
1004
116
  export const SizeVariations: Story = {
1005
- parameters: {
1006
- ...storyParameters,
1007
- docs: {
1008
- description: {
1009
- story:
1010
- "VolumeHalfIcon in different sizes, from small interface elements to large audio displays.",
1011
- },
1012
- },
1013
- },
1014
- render: () => (
1015
- <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">
1016
- <div className="text-center">
1017
- <VolumeHalfIcon className="!mx-auto mb-2 h-3 w-3 text-emerald-400" />
1018
- <span className="text-xs text-white/60">12px</span>
1019
- </div>
1020
- <div className="text-center">
1021
- <VolumeHalfIcon className="!mx-auto mb-2 h-4 w-4 text-emerald-400" />
1022
- <span className="text-xs text-white/60">16px</span>
1023
- </div>
1024
- <div className="text-center">
1025
- <VolumeHalfIcon className="!mx-auto mb-2 h-5 w-5 text-emerald-400" />
1026
- <span className="text-xs text-white/60">20px</span>
1027
- </div>
1028
- <div className="text-center">
1029
- <VolumeHalfIcon className="!mx-auto mb-2 h-6 w-6 text-emerald-400" />
1030
- <span className="text-xs text-white/60">24px</span>
1031
- </div>
1032
- <div className="text-center">
1033
- <VolumeHalfIcon className="!mx-auto mb-2 h-8 w-8 text-emerald-400" />
1034
- <span className="text-xs text-white/60">32px</span>
1035
- </div>
1036
- <div className="text-center">
1037
- <VolumeHalfIcon className="!mx-auto mb-2 h-12 w-12 text-emerald-400" />
1038
- <span className="text-xs text-white/60">48px</span>
1039
- </div>
1040
- </div>
1041
- ),
117
+ render: () => <IconSizeVariations icon={VolumeHalfIcon} />,
1042
118
  }
1043
119
 
1044
120
  export const ColorVariations: Story = {
1045
- parameters: {
1046
- ...storyParameters,
1047
- docs: {
1048
- description: {
1049
- story:
1050
- "VolumeHalfIcon in different semantic colors for various volume levels.",
1051
- },
1052
- },
1053
- },
1054
- render: () => (
1055
- <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">
1056
- <div className="text-center">
1057
- <div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-emerald-500/30 bg-emerald-500/20">
1058
- <VolumeHalfIcon className="h-8 w-8 text-emerald-400" />
1059
- </div>
1060
- <div className="text-sm font-medium text-white">Medium</div>
1061
- <div className="text-xs text-emerald-400">text-emerald-400</div>
1062
- </div>
1063
- <div className="text-center">
1064
- <div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-teal-500/30 bg-teal-500/20">
1065
- <VolumeHalfIcon className="h-8 w-8 text-teal-400" />
1066
- </div>
1067
- <div className="text-sm font-medium text-white">Balanced</div>
1068
- <div className="text-xs text-teal-400">text-teal-400</div>
1069
- </div>
1070
- <div className="text-center">
1071
- <div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-green-500/30 bg-green-500/20">
1072
- <VolumeHalfIcon className="h-8 w-8 text-green-400" />
1073
- </div>
1074
- <div className="text-sm font-medium text-white">Active</div>
1075
- <div className="text-xs text-green-400">text-green-400</div>
1076
- </div>
1077
- <div className="text-center">
1078
- <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">
1079
- <VolumeHalfIcon className="h-8 w-8 text-blue-400" />
1080
- </div>
1081
- <div className="text-sm font-medium text-white">Accent</div>
1082
- <div className="text-xs text-blue-400">text-blue-400</div>
1083
- </div>
1084
- </div>
1085
- ),
121
+ render: () => <IconColorVariations icon={VolumeHalfIcon} />,
1086
122
  }
1087
123
 
1088
124
  export const UsageExamples: Story = {
1089
- parameters: {
1090
- ...storyParameters,
1091
- docs: {
1092
- description: {
1093
- story:
1094
- "Real-world usage examples showing VolumeHalfIcon in different audio control contexts.",
1095
- },
1096
- },
1097
- },
1098
125
  render: () => (
1099
- <div className="min-h-dvh !space-y-8 rounded-lg bg-gradient-to-br from-gray-900 to-gray-800 p-8">
1100
- {/* Music Player */}
1101
- <div className="!space-y-2">
1102
- <h3 className="text-sm font-medium text-white">Music Player</h3>
1103
- <div className="rounded-lg border border-white/10 bg-white/5 p-6">
1104
- <div className="flex items-center justify-between">
1105
- <div className="text-xs text-white/60">1:23</div>
1106
- <div className="flex items-center gap-2">
1107
- <VolumeHalfIcon className="h-4 w-4 text-emerald-400" />
1108
- <div className="h-1 w-20 rounded-full bg-white/20">
1109
- <div className="h-full w-1/2 rounded-full bg-emerald-400" />
1110
- </div>
126
+ <IconUsageCanvas>
127
+ <IconUsageSection title="Volume States">
128
+ <div className="flex gap-4">
129
+ {[
130
+ { icon: VolumeFullIcon, label: "Full" },
131
+ { icon: VolumeHalfIcon, label: "Half" },
132
+ { icon: VolumeOffIcon, label: "Muted" },
133
+ ].map(({ icon: Icon, label }) => (
134
+ <div key={label} className="flex flex-col items-center gap-1">
135
+ <button>
136
+ <Icon
137
+ className={`h-6 w-6 ${label === "Half" ? "text-fm-icon-active" : "text-fm-icon-inactive"}`}
138
+ />
139
+ </button>
140
+ <span className="text-fm-secondary font-fm-text text-xs">
141
+ {label}
142
+ </span>
1111
143
  </div>
1112
- <div className="text-xs text-white/60">3:45</div>
144
+ ))}
145
+ </div>
146
+ </IconUsageSection>
147
+
148
+ <IconUsageSection title="Low Volume Indicator">
149
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary flex w-full max-w-sm items-center gap-3 rounded-xl border px-4 py-3">
150
+ <VolumeHalfIcon className="text-fm-icon-active h-5 w-5" />
151
+ <div className="bg-fm-divider-secondary h-1 flex-1 rounded-full">
152
+ <div className="bg-fm-icon-active h-1 w-1/2 rounded-full" />
1113
153
  </div>
1114
154
  </div>
1115
- </div>
155
+ </IconUsageSection>
1116
156
 
1117
- {/* Audio Dashboard */}
1118
- <div className="!space-y-2">
1119
- <h3 className="text-sm font-medium text-white">Audio Dashboard</h3>
1120
- <div className="rounded-lg border border-white/10 bg-white/5 p-4">
1121
- <div className="flex items-center justify-between">
1122
- <div className="flex items-center gap-3">
1123
- <VolumeHalfIcon className="h-5 w-5 text-emerald-400" />
1124
- <div>
1125
- <div className="text-sm text-white">Master Volume</div>
1126
- <div className="text-xs text-white/60">50%</div>
1127
- </div>
1128
- </div>
1129
- <div className="h-2 w-24 rounded-full bg-white/20">
1130
- <div className="h-full w-1/2 rounded-full bg-emerald-400" />
1131
- </div>
157
+ <IconUsageSection title="Volume Slider">
158
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary flex items-center gap-2 rounded-xl border px-3 py-2">
159
+ <VolumeOffIcon className="text-fm-icon-inactive h-4 w-4" />
160
+ <div className="bg-fm-divider-secondary h-1 flex-1 rounded-full">
161
+ <div className="bg-fm-icon-active h-1 w-1/2 rounded-full" />
1132
162
  </div>
163
+ <VolumeFullIcon className="text-fm-icon-inactive h-4 w-4" />
1133
164
  </div>
1134
- </div>
1135
- </div>
165
+ </IconUsageSection>
166
+ </IconUsageCanvas>
1136
167
  ),
1137
168
  }
1138
169
 
1139
170
  export const Playground: Story = {
1140
- parameters: {
1141
- ...storyParameters,
1142
- docs: {
1143
- description: {
1144
- story:
1145
- "Interactive playground to experiment with different VolumeHalfIcon configurations.",
1146
- },
1147
- },
1148
- },
1149
171
  args: {
1150
- width: 24,
1151
- height: 24,
1152
- className: "text-emerald-400",
172
+ className: "h-8 w-8 text-fm-icon-active",
173
+ withAccessibility: true,
1153
174
  },
1154
175
  render: (args) => (
1155
- <div className="flex h-64 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
1156
- <div className="rounded-lg border border-white/10 bg-white/5 p-8">
1157
- <VolumeHalfIcon {...args} />
1158
- </div>
1159
- </div>
176
+ <IconPlaygroundCanvas>
177
+ <VolumeHalfIcon {...args} />
178
+ </IconPlaygroundCanvas>
1160
179
  ),
1161
180
  }