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 { PauseIcon } from "src/ui/icons/pause-icon"
|
|
6
|
+
import { SkipBackwardIcon } from "src/ui/icons/skip-backward-icon"
|
|
7
|
+
import { SkipForwardIcon } from "src/ui/icons/skip-forward-icon"
|
|
8
|
+
import {
|
|
9
|
+
IconColorVariations,
|
|
10
|
+
IconDefaultCanvas,
|
|
11
|
+
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 { CircularPlayIcon } from "."
|
|
5
19
|
|
|
6
20
|
const meta: Meta<typeof CircularPlayIcon> = {
|
|
@@ -11,352 +25,75 @@ const meta: Meta<typeof CircularPlayIcon> = {
|
|
|
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
|
-
.sbdocs-pre { background: rgba(0, 0, 0, 0.4) !important; border: 1px solid rgba(255, 255, 255, 0.1) !important; }
|
|
33
|
-
.sbdocs-table { background: rgba(255, 255, 255, 0.05) !important; border: 1px solid rgba(255, 255, 255, 0.1) !important; }
|
|
34
|
-
.sbdocs-table th { background: rgba(255, 255, 255, 0.05) !important; color: white !important; border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important; }
|
|
35
|
-
.sbdocs-table td { color: rgba(255, 255, 255, 0.7) !important; border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important; }
|
|
36
|
-
`}
|
|
37
|
-
</style>
|
|
38
|
-
|
|
39
|
-
<div className="min-h-screen bg-gradient-to-br from-gray-900 via-purple-900/20 to-gray-900">
|
|
40
|
-
<div className="relative overflow-hidden border-b border-white/10 bg-black/20 backdrop-blur-xl">
|
|
41
|
-
<div className="absolute inset-0 bg-gradient-to-r from-purple-500/10 via-transparent to-pink-500/10" />
|
|
42
|
-
<div className="relative !mx-auto max-w-7xl px-6 py-16">
|
|
43
|
-
<div className="!space-y-6 text-center">
|
|
44
|
-
<div className="!mx-auto flex h-24 w-24 items-center justify-center rounded-2xl border border-purple-500/30 bg-gradient-to-br from-purple-500/20 to-pink-500/20">
|
|
45
|
-
<CircularPlayIcon className="h-12 w-12 text-white" />
|
|
46
|
-
</div>
|
|
47
|
-
<h1 className="!text-fm-primary text-5xl font-bold">
|
|
48
|
-
CircularPlayIcon
|
|
49
|
-
</h1>
|
|
50
|
-
<p className="!mx-auto max-w-3xl text-xl leading-relaxed !text-white/70">
|
|
51
|
-
A circular play icon with a filled play triangle inside a
|
|
52
|
-
ring. Ideal for media players, audio controls, and video
|
|
53
|
-
play overlays. Built with accessibility in mind using Radix
|
|
54
|
-
UI's AccessibleIcon wrapper.
|
|
55
|
-
</p>
|
|
56
|
-
<div className="flex items-center justify-center gap-8 pt-8">
|
|
57
|
-
<div className="text-center">
|
|
58
|
-
<div className="text-3xl font-bold text-purple-300">
|
|
59
|
-
Play
|
|
60
|
-
</div>
|
|
61
|
-
<div className="text-sm text-white/60">Media & audio</div>
|
|
62
|
-
</div>
|
|
63
|
-
<div className="h-8 w-px bg-white/20" />
|
|
64
|
-
<div className="text-center">
|
|
65
|
-
<div className="text-3xl font-bold text-pink-300">
|
|
66
|
-
Accessible
|
|
67
|
-
</div>
|
|
68
|
-
<div className="text-sm text-white/60">
|
|
69
|
-
Screen reader friendly
|
|
70
|
-
</div>
|
|
71
|
-
</div>
|
|
72
|
-
<div className="h-8 w-px bg-white/20" />
|
|
73
|
-
<div className="text-center">
|
|
74
|
-
<div className="text-3xl font-bold text-indigo-300">
|
|
75
|
-
Flexible
|
|
76
|
-
</div>
|
|
77
|
-
<div className="text-sm text-white/60">
|
|
78
|
-
Customizable sizing
|
|
79
|
-
</div>
|
|
80
|
-
</div>
|
|
81
|
-
</div>
|
|
82
|
-
</div>
|
|
83
|
-
</div>
|
|
84
|
-
</div>
|
|
85
|
-
|
|
86
|
-
<div className="!mx-auto max-w-7xl !space-y-16 px-6 py-12">
|
|
87
|
-
<div className="!space-y-8">
|
|
88
|
-
<h2 className="text-center text-3xl font-bold !text-white">
|
|
89
|
-
Quick Start
|
|
90
|
-
</h2>
|
|
91
|
-
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
92
|
-
<div className="!space-y-4">
|
|
93
|
-
<h3 className="text-xl font-semibold !text-purple-300">
|
|
94
|
-
Basic Usage
|
|
95
|
-
</h3>
|
|
96
|
-
<div className="rounded-lg bg-black/40 p-4">
|
|
97
|
-
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
98
|
-
{`import { CircularPlayIcon } from "@icons/circular-play-icon"
|
|
99
|
-
|
|
100
|
-
function MediaPlayer() {
|
|
35
|
+
<AuralIconDocsPage
|
|
36
|
+
accentToken="positive"
|
|
37
|
+
features={[
|
|
38
|
+
{ title: "Play Button", description: "Circular play for audio" },
|
|
39
|
+
{ title: "Media Control", description: "Primary playback trigger" },
|
|
40
|
+
{ title: "Accessible", description: "ARIA-ready by default" },
|
|
41
|
+
]}
|
|
42
|
+
quickStart={{
|
|
43
|
+
codeExample: `import { CircularPlayIcon } from "src/ui/icons/circular-play-icon"
|
|
44
|
+
|
|
45
|
+
function PlayButton() {
|
|
101
46
|
return (
|
|
102
|
-
<button
|
|
103
|
-
<CircularPlayIcon className="h-
|
|
47
|
+
<button>
|
|
48
|
+
<CircularPlayIcon className="h-12 w-12 text-fm-icon-active" />
|
|
104
49
|
</button>
|
|
105
50
|
)
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
141
|
-
Default
|
|
142
|
-
</th>
|
|
143
|
-
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
144
|
-
Description
|
|
145
|
-
</th>
|
|
146
|
-
</tr>
|
|
147
|
-
</thead>
|
|
148
|
-
<tbody>
|
|
149
|
-
<tr className="!bg-black/10">
|
|
150
|
-
<td className="px-6 py-4 font-mono text-sm !text-blue-300">
|
|
151
|
-
withAccessibility
|
|
152
|
-
</td>
|
|
153
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
154
|
-
boolean
|
|
155
|
-
</td>
|
|
156
|
-
<td className="px-6 py-4 text-sm !text-white/50">
|
|
157
|
-
true
|
|
158
|
-
</td>
|
|
159
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
160
|
-
Whether to wrap the icon with accessibility feature
|
|
161
|
-
</td>
|
|
162
|
-
</tr>
|
|
163
|
-
<tr className="border-b border-white/5 !bg-black/10">
|
|
164
|
-
<td className="px-6 py-4 font-mono text-sm !text-purple-300">
|
|
165
|
-
width
|
|
166
|
-
</td>
|
|
167
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
168
|
-
number | string
|
|
169
|
-
</td>
|
|
170
|
-
<td className="px-6 py-4 text-sm !text-white/50">48</td>
|
|
171
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
172
|
-
Width of the icon
|
|
173
|
-
</td>
|
|
174
|
-
</tr>
|
|
175
|
-
<tr className="border-b border-white/5 !bg-black/10">
|
|
176
|
-
<td className="px-6 py-4 font-mono text-sm !text-purple-300">
|
|
177
|
-
height
|
|
178
|
-
</td>
|
|
179
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
180
|
-
number | string
|
|
181
|
-
</td>
|
|
182
|
-
<td className="px-6 py-4 text-sm !text-white/50">48</td>
|
|
183
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
184
|
-
Height of the icon
|
|
185
|
-
</td>
|
|
186
|
-
</tr>
|
|
187
|
-
<tr className="border-b border-white/5">
|
|
188
|
-
<td className="px-6 py-4 font-mono text-sm !text-purple-300">
|
|
189
|
-
fill
|
|
190
|
-
</td>
|
|
191
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
192
|
-
string
|
|
193
|
-
</td>
|
|
194
|
-
<td className="px-6 py-4 text-sm !text-white/50">
|
|
195
|
-
white (in SVG)
|
|
196
|
-
</td>
|
|
197
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
198
|
-
Fill color; override with className (e.g. text-white)
|
|
199
|
-
</td>
|
|
200
|
-
</tr>
|
|
201
|
-
<tr className="border-b border-white/5 !bg-black/10">
|
|
202
|
-
<td className="px-6 py-4 font-mono text-sm !text-purple-300">
|
|
203
|
-
className
|
|
204
|
-
</td>
|
|
205
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
206
|
-
string
|
|
207
|
-
</td>
|
|
208
|
-
<td className="px-6 py-4 text-sm !text-white/50">-</td>
|
|
209
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
210
|
-
CSS classes for styling
|
|
211
|
-
</td>
|
|
212
|
-
</tr>
|
|
213
|
-
<tr className="!bg-black/10">
|
|
214
|
-
<td className="px-6 py-4 font-mono text-sm !text-purple-300">
|
|
215
|
-
...svgProps
|
|
216
|
-
</td>
|
|
217
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
218
|
-
SVGProps
|
|
219
|
-
</td>
|
|
220
|
-
<td className="px-6 py-4 text-sm !text-white/50">-</td>
|
|
221
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
222
|
-
All standard SVG element props
|
|
223
|
-
</td>
|
|
224
|
-
</tr>
|
|
225
|
-
</tbody>
|
|
226
|
-
</table>
|
|
227
|
-
</div>
|
|
228
|
-
</div>
|
|
229
|
-
|
|
230
|
-
<div className="!space-y-8">
|
|
231
|
-
<h2 className="text-center text-3xl font-bold !text-white">
|
|
232
|
-
Size Variations
|
|
233
|
-
</h2>
|
|
234
|
-
<div className="rounded-lg border border-white/10 bg-white/5 p-8">
|
|
235
|
-
<div className="flex items-end justify-center gap-6 rounded-lg bg-black/20 p-6">
|
|
236
|
-
<div className="text-center">
|
|
237
|
-
<CircularPlayIcon className="!mx-auto mb-2 h-6 w-6 text-white" />
|
|
238
|
-
<span className="text-xs text-white/60">24px</span>
|
|
239
|
-
</div>
|
|
240
|
-
<div className="text-center">
|
|
241
|
-
<CircularPlayIcon className="!mx-auto mb-2 h-8 w-8 text-white" />
|
|
242
|
-
<span className="text-xs text-white/60">32px</span>
|
|
243
|
-
</div>
|
|
244
|
-
<div className="text-center">
|
|
245
|
-
<CircularPlayIcon className="!mx-auto mb-2 h-10 w-10 text-white" />
|
|
246
|
-
<span className="text-xs text-white/60">40px</span>
|
|
247
|
-
</div>
|
|
248
|
-
<div className="text-center">
|
|
249
|
-
<CircularPlayIcon className="!mx-auto mb-2 h-12 w-12 text-white" />
|
|
250
|
-
<span className="text-xs text-white/60">48px</span>
|
|
251
|
-
</div>
|
|
252
|
-
<div className="text-center">
|
|
253
|
-
<CircularPlayIcon className="!mx-auto mb-2 h-16 w-16 text-white" />
|
|
254
|
-
<span className="text-xs text-white/60">64px</span>
|
|
255
|
-
</div>
|
|
256
|
-
</div>
|
|
257
|
-
</div>
|
|
258
|
-
</div>
|
|
259
|
-
|
|
260
|
-
<div className="!space-y-8">
|
|
261
|
-
<h2 className="text-center text-3xl font-bold !text-white">
|
|
262
|
-
Usage Examples
|
|
263
|
-
</h2>
|
|
264
|
-
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
265
|
-
<div className="!space-y-4">
|
|
266
|
-
<h3 className="text-lg font-semibold !text-purple-300">
|
|
267
|
-
Media player play button
|
|
268
|
-
</h3>
|
|
269
|
-
<div className="flex items-center gap-4 rounded-lg border border-white/10 bg-white/5 p-4">
|
|
270
|
-
<button className="flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-full bg-purple-500/20 transition-colors hover:bg-purple-500/30">
|
|
271
|
-
<CircularPlayIcon className="h-7 w-7 text-white" />
|
|
272
|
-
</button>
|
|
273
|
-
<div className="min-w-0 flex-1">
|
|
274
|
-
<div className="text-sm font-medium text-white">
|
|
275
|
-
Episode title
|
|
276
|
-
</div>
|
|
277
|
-
<div className="text-xs text-white/60">
|
|
278
|
-
0:00 / 24:30
|
|
279
|
-
</div>
|
|
280
|
-
</div>
|
|
281
|
-
</div>
|
|
282
|
-
</div>
|
|
283
|
-
<div className="!space-y-4">
|
|
284
|
-
<h3 className="text-lg font-semibold !text-purple-300">
|
|
285
|
-
Video play overlay
|
|
286
|
-
</h3>
|
|
287
|
-
<div className="relative flex h-32 items-center justify-center overflow-hidden rounded-lg border border-white/10 bg-black/40">
|
|
288
|
-
<div className="absolute inset-0 bg-gradient-to-t from-black/60 to-transparent" />
|
|
289
|
-
<button className="relative flex h-16 w-16 items-center justify-center rounded-full border border-white/30 bg-white/10 backdrop-blur-sm transition-colors hover:bg-white/20">
|
|
290
|
-
<CircularPlayIcon className="h-10 w-10 text-white" />
|
|
291
|
-
</button>
|
|
292
|
-
</div>
|
|
293
|
-
</div>
|
|
294
|
-
</div>
|
|
295
|
-
</div>
|
|
296
|
-
|
|
297
|
-
<div className="!space-y-8">
|
|
298
|
-
<h2 className="text-center text-3xl font-bold !text-white">
|
|
299
|
-
Accessibility
|
|
300
|
-
</h2>
|
|
301
|
-
<div className="rounded-lg border border-white/10 bg-white/5 p-6">
|
|
302
|
-
<ul className="!space-y-2 text-sm !text-white/70">
|
|
303
|
-
<li>
|
|
304
|
-
Uses Radix UI AccessibleIcon with label "Circular
|
|
305
|
-
play icon"
|
|
306
|
-
</li>
|
|
307
|
-
<li>
|
|
308
|
-
When used in a button, add aria-label e.g.
|
|
309
|
-
"Play" or "Play episode"
|
|
310
|
-
</li>
|
|
311
|
-
<li>
|
|
312
|
-
Ensure sufficient touch target size (e.g. min 44px) for
|
|
313
|
-
the control
|
|
314
|
-
</li>
|
|
315
|
-
</ul>
|
|
316
|
-
</div>
|
|
317
|
-
</div>
|
|
318
|
-
</div>
|
|
319
|
-
|
|
320
|
-
<div className="border-t border-white/10 bg-black/20 backdrop-blur-xl">
|
|
321
|
-
<div className="!mx-auto max-w-7xl px-6 py-8">
|
|
322
|
-
<div className="!space-y-4 text-center">
|
|
323
|
-
<p className="!text-white/60">
|
|
324
|
-
CircularPlayIcon is part of the Aural UI icon library for
|
|
325
|
-
media and playback UIs.
|
|
326
|
-
</p>
|
|
327
|
-
<p className="text-sm !text-white/40">
|
|
328
|
-
Uses Radix UI AccessibleIcon for screen reader
|
|
329
|
-
compatibility.
|
|
330
|
-
</p>
|
|
331
|
-
</div>
|
|
332
|
-
</div>
|
|
333
|
-
</div>
|
|
334
|
-
</div>
|
|
335
|
-
</>
|
|
51
|
+
}`,
|
|
52
|
+
livePreview: (
|
|
53
|
+
<button>
|
|
54
|
+
<CircularPlayIcon className="text-fm-icon-active h-12 w-12" />
|
|
55
|
+
</button>
|
|
56
|
+
),
|
|
57
|
+
}}
|
|
58
|
+
relatedIcons={[
|
|
59
|
+
{
|
|
60
|
+
name: "PauseIcon",
|
|
61
|
+
description: "Pause media playback",
|
|
62
|
+
icon: PauseIcon,
|
|
63
|
+
accentToken: "info",
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: "SkipForwardIcon",
|
|
67
|
+
description: "Skip to next track",
|
|
68
|
+
icon: SkipForwardIcon,
|
|
69
|
+
accentToken: "positive",
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: "SkipBackwardIcon",
|
|
73
|
+
description: "Skip to previous track",
|
|
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
|
+
/>
|
|
336
85
|
),
|
|
337
86
|
},
|
|
338
87
|
},
|
|
339
88
|
tags: ["autodocs"],
|
|
340
89
|
argTypes: {
|
|
341
|
-
|
|
342
|
-
control:
|
|
343
|
-
description: "
|
|
344
|
-
},
|
|
345
|
-
height: {
|
|
346
|
-
control: { type: "range", min: 8, max: 96, step: 2 },
|
|
347
|
-
description: "Height of the icon in pixels",
|
|
90
|
+
className: {
|
|
91
|
+
control: "text",
|
|
92
|
+
description: "CSS classes including color token",
|
|
348
93
|
},
|
|
349
94
|
withAccessibility: {
|
|
350
95
|
control: "boolean",
|
|
351
|
-
description: "
|
|
352
|
-
},
|
|
353
|
-
fill: {
|
|
354
|
-
control: "color",
|
|
355
|
-
description: "Fill color of the icon",
|
|
356
|
-
},
|
|
357
|
-
className: {
|
|
358
|
-
control: "text",
|
|
359
|
-
description: "CSS classes for styling",
|
|
96
|
+
description: "Wrap with accessibility label",
|
|
360
97
|
},
|
|
361
98
|
},
|
|
362
99
|
}
|
|
@@ -364,162 +101,78 @@ function MediaPlayer() {
|
|
|
364
101
|
export default meta
|
|
365
102
|
type Story = StoryObj<typeof CircularPlayIcon>
|
|
366
103
|
|
|
367
|
-
const storyParameters = {
|
|
368
|
-
backgrounds: {
|
|
369
|
-
default: "dark",
|
|
370
|
-
values: [
|
|
371
|
-
{ name: "dark", value: "#0a0a0a" },
|
|
372
|
-
{ name: "darker", value: "#000000" },
|
|
373
|
-
],
|
|
374
|
-
},
|
|
375
|
-
}
|
|
376
|
-
|
|
377
104
|
export const Default: Story = {
|
|
378
105
|
args: {
|
|
379
|
-
|
|
380
|
-
height: 48,
|
|
381
|
-
className: "text-white",
|
|
106
|
+
className: "h-12 w-12 text-fm-icon-active",
|
|
382
107
|
withAccessibility: true,
|
|
383
108
|
},
|
|
384
|
-
parameters: storyParameters,
|
|
385
109
|
render: (args) => (
|
|
386
|
-
<
|
|
110
|
+
<IconDefaultCanvas>
|
|
387
111
|
<CircularPlayIcon {...args} />
|
|
388
|
-
</
|
|
112
|
+
</IconDefaultCanvas>
|
|
389
113
|
),
|
|
390
114
|
}
|
|
391
115
|
|
|
392
116
|
export const SizeVariations: Story = {
|
|
393
|
-
|
|
394
|
-
...storyParameters,
|
|
395
|
-
docs: {
|
|
396
|
-
description: {
|
|
397
|
-
story:
|
|
398
|
-
"CircularPlayIcon in different sizes for media controls and overlays.",
|
|
399
|
-
},
|
|
400
|
-
},
|
|
401
|
-
},
|
|
402
|
-
render: () => (
|
|
403
|
-
<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">
|
|
404
|
-
<div className="text-center">
|
|
405
|
-
<CircularPlayIcon className="!mx-auto mb-2 h-6 w-6 text-white" />
|
|
406
|
-
<span className="text-xs text-white/60">24px</span>
|
|
407
|
-
</div>
|
|
408
|
-
<div className="text-center">
|
|
409
|
-
<CircularPlayIcon className="!mx-auto mb-2 h-8 w-8 text-white" />
|
|
410
|
-
<span className="text-xs text-white/60">32px</span>
|
|
411
|
-
</div>
|
|
412
|
-
<div className="text-center">
|
|
413
|
-
<CircularPlayIcon className="!mx-auto mb-2 h-10 w-10 text-white" />
|
|
414
|
-
<span className="text-xs text-white/60">40px</span>
|
|
415
|
-
</div>
|
|
416
|
-
<div className="text-center">
|
|
417
|
-
<CircularPlayIcon className="!mx-auto mb-2 h-12 w-12 text-white" />
|
|
418
|
-
<span className="text-xs text-white/60">48px</span>
|
|
419
|
-
</div>
|
|
420
|
-
<div className="text-center">
|
|
421
|
-
<CircularPlayIcon className="!mx-auto mb-2 h-16 w-16 text-white" />
|
|
422
|
-
<span className="text-xs text-white/60">64px</span>
|
|
423
|
-
</div>
|
|
424
|
-
</div>
|
|
425
|
-
),
|
|
117
|
+
render: () => <IconSizeVariations icon={CircularPlayIcon} />,
|
|
426
118
|
}
|
|
427
119
|
|
|
428
120
|
export const ColorVariations: Story = {
|
|
429
|
-
|
|
430
|
-
...storyParameters,
|
|
431
|
-
docs: {
|
|
432
|
-
description: {
|
|
433
|
-
story:
|
|
434
|
-
"CircularPlayIcon with different colors for branding and states.",
|
|
435
|
-
},
|
|
436
|
-
},
|
|
437
|
-
},
|
|
438
|
-
render: () => (
|
|
439
|
-
<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">
|
|
440
|
-
<div className="text-center">
|
|
441
|
-
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-purple-500/30 bg-purple-500/20">
|
|
442
|
-
<CircularPlayIcon className="h-8 w-8 text-white" />
|
|
443
|
-
</div>
|
|
444
|
-
<div className="text-sm font-medium text-white">Primary</div>
|
|
445
|
-
</div>
|
|
446
|
-
<div className="text-center">
|
|
447
|
-
<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">
|
|
448
|
-
<CircularPlayIcon className="h-8 w-8 text-white" />
|
|
449
|
-
</div>
|
|
450
|
-
<div className="text-sm font-medium text-white">Accent</div>
|
|
451
|
-
</div>
|
|
452
|
-
<div className="text-center">
|
|
453
|
-
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-gray-500/30 bg-gray-500/20">
|
|
454
|
-
<CircularPlayIcon className="h-8 w-8 text-gray-200" />
|
|
455
|
-
</div>
|
|
456
|
-
<div className="text-sm font-medium text-white">Neutral</div>
|
|
457
|
-
</div>
|
|
458
|
-
<div className="text-center">
|
|
459
|
-
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-white/20 bg-white/10">
|
|
460
|
-
<CircularPlayIcon className="h-8 w-8 text-white/90" />
|
|
461
|
-
</div>
|
|
462
|
-
<div className="text-sm font-medium text-white">Overlay</div>
|
|
463
|
-
</div>
|
|
464
|
-
</div>
|
|
465
|
-
),
|
|
121
|
+
render: () => <IconColorVariations icon={CircularPlayIcon} />,
|
|
466
122
|
}
|
|
467
123
|
|
|
468
124
|
export const UsageExamples: Story = {
|
|
469
|
-
parameters: {
|
|
470
|
-
...storyParameters,
|
|
471
|
-
docs: {
|
|
472
|
-
description: {
|
|
473
|
-
story: "Real-world usage: media player and video play overlay.",
|
|
474
|
-
},
|
|
475
|
-
},
|
|
476
|
-
},
|
|
477
125
|
render: () => (
|
|
478
|
-
<
|
|
479
|
-
<
|
|
480
|
-
<
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
<
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
126
|
+
<IconUsageCanvas>
|
|
127
|
+
<IconUsageSection title="Story Card Play">
|
|
128
|
+
<div className="border-fm-divider-secondary bg-fm-surface-secondary w-full max-w-sm rounded-xl border p-4">
|
|
129
|
+
<div className="flex items-center gap-3">
|
|
130
|
+
<div className="bg-fm-divider-secondary h-14 w-14 shrink-0 rounded-xl" />
|
|
131
|
+
<div className="flex-1">
|
|
132
|
+
<div className="text-fm-primary font-fm-text text-sm font-medium">
|
|
133
|
+
The Lost Kingdom
|
|
134
|
+
</div>
|
|
135
|
+
<div className="text-fm-secondary font-fm-text text-xs">
|
|
136
|
+
Pocket FM Originals
|
|
137
|
+
</div>
|
|
138
|
+
</div>
|
|
139
|
+
<button>
|
|
140
|
+
<CircularPlayIcon className="text-fm-icon-active h-10 w-10" />
|
|
141
|
+
</button>
|
|
488
142
|
</div>
|
|
489
143
|
</div>
|
|
490
|
-
</
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
<div className="
|
|
494
|
-
<
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
144
|
+
</IconUsageSection>
|
|
145
|
+
|
|
146
|
+
<IconUsageSection title="Mini Player">
|
|
147
|
+
<div className="border-fm-divider-secondary bg-fm-surface-secondary flex w-full max-w-sm items-center justify-between rounded-xl border px-4 py-3">
|
|
148
|
+
<span className="text-fm-primary font-fm-text text-sm">
|
|
149
|
+
Episode 12
|
|
150
|
+
</span>
|
|
151
|
+
<div className="flex items-center gap-3">
|
|
152
|
+
<SkipBackwardIcon className="text-fm-icon-inactive h-5 w-5" />
|
|
153
|
+
<CircularPlayIcon className="text-fm-icon-active h-8 w-8" />
|
|
154
|
+
<SkipForwardIcon className="text-fm-icon-inactive h-5 w-5" />
|
|
155
|
+
</div>
|
|
498
156
|
</div>
|
|
499
|
-
</
|
|
500
|
-
|
|
157
|
+
</IconUsageSection>
|
|
158
|
+
|
|
159
|
+
<IconUsageSection title="Disabled State">
|
|
160
|
+
<button disabled>
|
|
161
|
+
<CircularPlayIcon className="text-fm-icon-inactive h-10 w-10" />
|
|
162
|
+
</button>
|
|
163
|
+
</IconUsageSection>
|
|
164
|
+
</IconUsageCanvas>
|
|
501
165
|
),
|
|
502
166
|
}
|
|
503
167
|
|
|
504
168
|
export const Playground: Story = {
|
|
505
|
-
parameters: {
|
|
506
|
-
...storyParameters,
|
|
507
|
-
docs: {
|
|
508
|
-
description: {
|
|
509
|
-
story: "Interactive playground for CircularPlayIcon.",
|
|
510
|
-
},
|
|
511
|
-
},
|
|
512
|
-
},
|
|
513
169
|
args: {
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
className: "text-white",
|
|
170
|
+
className: "h-12 w-12 text-fm-icon-active",
|
|
171
|
+
withAccessibility: true,
|
|
517
172
|
},
|
|
518
173
|
render: (args) => (
|
|
519
|
-
<
|
|
520
|
-
<
|
|
521
|
-
|
|
522
|
-
</div>
|
|
523
|
-
</div>
|
|
174
|
+
<IconPlaygroundCanvas>
|
|
175
|
+
<CircularPlayIcon {...args} />
|
|
176
|
+
</IconPlaygroundCanvas>
|
|
524
177
|
),
|
|
525
178
|
}
|