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