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