aural-ui 4.0.1 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (174) hide show
  1. package/dist/components/aspect-ratio/AspectRatio.stories.tsx +290 -1228
  2. package/dist/components/avatar/Avatar.stories.tsx +219 -235
  3. package/dist/components/badge/Badge.stories.tsx +379 -116
  4. package/dist/components/banner/Banner.stories.tsx +445 -391
  5. package/dist/components/breadcrumb/Breadcrumb.stories.tsx +453 -199
  6. package/dist/components/button/Button.stories.tsx +585 -230
  7. package/dist/components/card/Card.stories.tsx +619 -301
  8. package/dist/components/char-count/CharCount.stories.tsx +350 -248
  9. package/dist/components/checkbox/Checkbox.stories.tsx +309 -167
  10. package/dist/components/chip/Chip.stories.tsx +362 -168
  11. package/dist/components/circular-loader/CircularLoader.stories.tsx +221 -636
  12. package/dist/components/clamp-lines/ClampLines.stories.tsx +246 -117
  13. package/dist/components/collapsible/Collapsible.stories.tsx +391 -252
  14. package/dist/components/command/Command.stories.tsx +530 -867
  15. package/dist/components/dialog/Dialog.stories.tsx +501 -950
  16. package/dist/components/divider/Divider.stories.tsx +264 -527
  17. package/dist/components/dot-loader/DotLoader.stories.tsx +256 -257
  18. package/dist/components/drawer/Drawer.stories.tsx +659 -1023
  19. package/dist/components/dropdown/Dropdown.stories.tsx +643 -1028
  20. package/dist/components/form/Form.stories.tsx +560 -274
  21. package/dist/components/helper-text/HelperText.stories.tsx +199 -200
  22. package/dist/components/hover-card/HoverCard.stories.tsx +318 -1254
  23. package/dist/components/icon-button/IconButton.stories.tsx +837 -194
  24. package/dist/components/if-else/if-else.stories.tsx +370 -83
  25. package/dist/components/input/Input.stories.tsx +436 -368
  26. package/dist/components/label/Label.stories.tsx +156 -154
  27. package/dist/components/list/List.stories.tsx +484 -835
  28. package/dist/components/marquee/Marquee.stories.tsx +356 -712
  29. package/dist/components/otp-inputs/OtpInputs.stories.tsx +352 -422
  30. package/dist/components/overlay/Overlay.stories.tsx +452 -824
  31. package/dist/components/pagination/Pagination.stories.tsx +721 -210
  32. package/dist/components/popover/Popover.stories.tsx +481 -896
  33. package/dist/components/radio/Radio.stories.tsx +432 -124
  34. package/dist/components/resizable/Resizable.stories.tsx +495 -799
  35. package/dist/components/scroll-area/ScrollArea.stories.tsx +383 -1059
  36. package/dist/components/search/Search.stories.tsx +312 -595
  37. package/dist/components/select/Select.stories.tsx +684 -789
  38. package/dist/components/sheet/Sheet.stories.tsx +671 -950
  39. package/dist/components/skelton/Skelton.stories.tsx +230 -764
  40. package/dist/components/slider/Slider.stories.tsx +383 -760
  41. package/dist/components/stepper/Stepper.stories.tsx +371 -514
  42. package/dist/components/switch/Switch.stories.tsx +461 -208
  43. package/dist/components/switch-case/SwitchCase.stories.tsx +367 -188
  44. package/dist/components/table/Table.stories.tsx +770 -916
  45. package/dist/components/tabs/Tabs.stories.tsx +458 -1455
  46. package/dist/components/tag/Tag.stories.tsx +714 -542
  47. package/dist/components/textarea/TextArea.stories.tsx +621 -562
  48. package/dist/components/thumbnail-tags/ThumbnailTags.stories.tsx +228 -154
  49. package/dist/components/toast/Toast.stories.tsx +452 -1339
  50. package/dist/components/toggle/Toggle.stories.tsx +488 -931
  51. package/dist/components/tooltip/Tooltip.stories.tsx +344 -1388
  52. package/dist/components/typography/Typography.stories.tsx +406 -89
  53. package/dist/hooks/use-change-state/UseChangeState.stories.tsx +309 -606
  54. package/dist/hooks/use-previous/UsePrevious.stories.tsx +367 -917
  55. package/dist/hooks/use-standalone-pagination/UseStandalonePagination.stories.tsx +639 -867
  56. package/dist/icons/Icons.stories.tsx +0 -12
  57. package/dist/icons/ai-avatar-icon/AiAvatarIcon.stories.tsx +223 -1060
  58. package/dist/icons/alert-icon/AlertIcon.stories.tsx +106 -968
  59. package/dist/icons/all-icons.tsx +37 -16
  60. package/dist/icons/angle-down-icon/AngleDownIcon.stories.tsx +137 -1010
  61. package/dist/icons/apple-logo-icon/AppleLogoIcon.stories.tsx +145 -935
  62. package/dist/icons/arrow-box-left-icon/ArrowBoxLeftIcon.stories.tsx +132 -1046
  63. package/dist/icons/arrow-corner-up-left-icon/ArrowCornerUpLeftIcon.stories.tsx +134 -986
  64. package/dist/icons/arrow-corner-up-right-icon/ArrowCornerUpRightIcon.stories.tsx +135 -1028
  65. package/dist/icons/arrow-left-icon/ArrowLeftIcon.stories.tsx +133 -971
  66. package/dist/icons/arrow-right-icon/ArrowRightIcon.stories.tsx +145 -1123
  67. package/dist/icons/arrow-right-up-icon/ArrowRightUpIcon.stories.tsx +143 -1252
  68. package/dist/icons/art-board-icon/ArtBoardIcon.stories.tsx +123 -632
  69. package/dist/icons/audio-bar-icon/AudioBarIcon.stories.tsx +141 -1223
  70. package/dist/icons/backward-ten-seconds-icon/BackwardTenSecondsIcon.stories.tsx +164 -1018
  71. package/dist/icons/bubble-check-icon/BubbleCheckIcon.stories.tsx +121 -1236
  72. package/dist/icons/bubble-crossed-icon/BubbleCrossedIcon.stories.tsx +121 -1213
  73. package/dist/icons/bubble-sparkle-icon/BubbleSparkleIcon.stories.tsx +116 -893
  74. package/dist/icons/camera-icon/CameraIcon.stories.tsx +109 -1254
  75. package/dist/icons/capital-a-letter-icon/CapitalALetterIcon.stories.tsx +114 -975
  76. package/dist/icons/chevron-double-left-icon/ChevronDoubleLeftIcon.stories.tsx +157 -994
  77. package/dist/icons/chevron-double-right-icon/ChevronDoubleRightIcon.stories.tsx +160 -992
  78. package/dist/icons/chevron-down-icon/ChevronDownIcon.stories.tsx +140 -970
  79. package/dist/icons/chevron-left-icon/ChevronLeftIcon.stories.tsx +126 -993
  80. package/dist/icons/chevron-right-icon/ChevronRightIcon.stories.tsx +144 -987
  81. package/dist/icons/chevron-up-icon/ChevronUpIcon.stories.tsx +141 -1007
  82. package/dist/icons/circle-tick-icon/CircleTickIcon.stories.tsx +147 -1187
  83. package/dist/icons/circular-play-icon/CircularPlayIcon.stories.tsx +110 -476
  84. package/dist/icons/coin-icon/CoinIcon.stories.tsx +120 -1364
  85. package/dist/icons/coin-toons-icon/CoinToonsIcon.stories.tsx +113 -1360
  86. package/dist/icons/column-wide-add-icon/ColumnWideAddIcon.stories.tsx +111 -942
  87. package/dist/icons/command-icon/CommandIcon.stories.tsx +124 -1087
  88. package/dist/icons/copy-icon/CopyIcon.stories.tsx +119 -996
  89. package/dist/icons/cross-circle-icon/CrossCircleIcon.stories.tsx +144 -1046
  90. package/dist/icons/cross-icon/CrossIcon.stories.tsx +136 -999
  91. package/dist/icons/download-icon/DownloadIcon.stories.tsx +123 -857
  92. package/dist/icons/edit-big-icon/EditBigIcon.stories.tsx +121 -1080
  93. package/dist/icons/email-icon/EmailIcon.stories.tsx +112 -979
  94. package/dist/icons/expand-icon/ExpandIcon.stories.tsx +109 -1146
  95. package/dist/icons/eye-close-icon/EyeCloseIcon.stories.tsx +141 -1068
  96. package/dist/icons/eye-open-icon/EyeOpenIcon.stories.tsx +140 -1081
  97. package/dist/icons/feature-shine-icon/FeatureShineIcon.stories.tsx +124 -1050
  98. package/dist/icons/file-chart-icon/FileChartIcon.stories.tsx +123 -1091
  99. package/dist/icons/file-text-icon/FileTextIcon.stories.tsx +122 -633
  100. package/dist/icons/filter-bar-row-icon/FilterBarRowIcon.stories.tsx +116 -1087
  101. package/dist/icons/forward-ten-seconds-icon/ForwardTenSecondsIcon.stories.tsx +166 -1020
  102. package/dist/icons/git-branch-icon/GitBranchIcon.stories.tsx +112 -1182
  103. package/dist/icons/git-fork-icon/GitForkIcon.stories.tsx +112 -1155
  104. package/dist/icons/globe-icon/GlobeIcon.stories.tsx +127 -325
  105. package/dist/icons/google-logo-icon/GoogleLogoIcon.stories.tsx +142 -985
  106. package/dist/icons/grip-vertical-icon/GripVerticalIcon.stories.tsx +116 -1217
  107. package/dist/icons/head-icon/HeadIcon.stories.tsx +108 -953
  108. package/dist/icons/heart-icon/HeartIcon.stories.tsx +117 -1060
  109. package/dist/icons/image-avatar-sparkle-icon/ImageAvatarSparkleIcon.stories.tsx +116 -716
  110. package/dist/icons/image-icon/ImageIcon.stories.tsx +102 -1164
  111. package/dist/icons/import-folder-icon/ImportFolderIcon.stories.tsx +108 -1233
  112. package/dist/icons/import-left-arrow-folder-icon/ImportLeftArrowFolderIcon.stories.tsx +133 -1289
  113. package/dist/icons/indian-flag-icon/IndianFlagIcon.stories.tsx +155 -1012
  114. package/dist/icons/instagram-icon/InstagramIcon.stories.tsx +158 -1438
  115. package/dist/icons/layout-column-icon/LayoutColumnIcon.stories.tsx +121 -1011
  116. package/dist/icons/layout-left-icon/LayoutLeftIcon.stories.tsx +116 -981
  117. package/dist/icons/layout-right-icon/LayoutRightIcon.stories.tsx +116 -979
  118. package/dist/icons/light-bulb-simple-icon/LightBulbSimpleIcon.stories.tsx +105 -1252
  119. package/dist/icons/linked-in-icon/LinkedInIcon.stories.tsx +151 -1554
  120. package/dist/icons/magic-book-icon/MagicBookIcon.stories.tsx +107 -1227
  121. package/dist/icons/magic-edit-icon/MagicEditIcon.stories.tsx +116 -707
  122. package/dist/icons/maintenance-icon/MaintenanceIcon.stories.tsx +119 -1226
  123. package/dist/icons/message-icon/MessageIcon.stories.tsx +111 -557
  124. package/dist/icons/minimize-icon/MinimizeIcon.stories.tsx +112 -1198
  125. package/dist/icons/moon-icon/MoonIcon.stories.tsx +117 -557
  126. package/dist/icons/move-horizontal-icon/MoveHorizontalIcon.stories.tsx +106 -1235
  127. package/dist/icons/move-vertical-icon/MoveVerticalIcon.stories.tsx +112 -1185
  128. package/dist/icons/musical-note-icon/MusicalNoteIcon.stories.tsx +116 -1012
  129. package/dist/icons/notepad-icon/NotepadIcon.stories.tsx +108 -1137
  130. package/dist/icons/notes-icon/NotesIcon.stories.tsx +116 -1138
  131. package/dist/icons/page-search-icon/PageSearchIcon.stories.tsx +106 -1146
  132. package/dist/icons/page-text-icon/PageTextIcon.stories.tsx +119 -719
  133. package/dist/icons/paint-roll-icon/PaintRollIcon.stories.tsx +110 -999
  134. package/dist/icons/paper-plane-icon/PaperPlaneIcon.stories.tsx +109 -912
  135. package/dist/icons/pause-icon/PauseIcon.stories.tsx +110 -1041
  136. package/dist/icons/pencil-icon/PencilIcon.stories.tsx +112 -1109
  137. package/dist/icons/phone-icon/PhoneIcon.stories.tsx +112 -1023
  138. package/dist/icons/plus-icon/PlusIcon.stories.tsx +103 -1132
  139. package/dist/icons/pocket-studio-icon/PocketStudioIcon.stories.tsx +104 -870
  140. package/dist/icons/scroll-down-icon/ScrollDownIcon.stories.tsx +99 -476
  141. package/dist/icons/search-icon/SearchIcon.stories.tsx +108 -1161
  142. package/dist/icons/setting-icon/SettingIcon.stories.tsx +104 -1009
  143. package/dist/icons/share-icon/ShareIcon.stories.tsx +117 -1064
  144. package/dist/icons/shield-icon/ShieldIcon.stories.tsx +114 -974
  145. package/dist/icons/site-logo-icon/SiteLogoIcon.stories.tsx +134 -1160
  146. package/dist/icons/skip-backward-icon/SkipBackwardIcon.stories.tsx +169 -1017
  147. package/dist/icons/skip-forward-icon/SkipForwardIcon.stories.tsx +161 -1016
  148. package/dist/icons/sparkles-soft-icon/SparklesSoftIcon.stories.tsx +102 -1001
  149. package/dist/icons/spinner-gradient-icon/SpinnerGradientIcon.stories.tsx +155 -593
  150. package/dist/icons/spinner-solid-icon/SpinnerSolidIcon.stories.tsx +155 -608
  151. package/dist/icons/spinner-solid-neutral-icon/SpinnerSolidINeutralcon.stories.tsx +142 -712
  152. package/dist/icons/star-icon/StarIcon.stories.tsx +120 -946
  153. package/dist/icons/store-coin-icon/StoreCoinIcon.stories.tsx +109 -1013
  154. package/dist/icons/suggestion-icon/SuggestionIcon.stories.tsx +113 -891
  155. package/dist/icons/sun-icon/SunIcon.stories.tsx +117 -864
  156. package/dist/icons/text-color-icon/TextColorIcon.stories.tsx +113 -989
  157. package/dist/icons/text-indicator-icon/TextIndicatorIcon.stories.tsx +120 -1027
  158. package/dist/icons/threads-icon/ThreadsIcon.stories.tsx +153 -1476
  159. package/dist/icons/tick-circle-icon/TickCircleIcon.stories.tsx +143 -1187
  160. package/dist/icons/tick-icon/TickIcon.stories.tsx +142 -1322
  161. package/dist/icons/trash-icon/TrashIcon.stories.tsx +105 -970
  162. package/dist/icons/twitter-x-icon/TwitterXIcon.stories.tsx +154 -1457
  163. package/dist/icons/upload-icon/UploadIcon.stories.tsx +112 -930
  164. package/dist/icons/vertical-menu-icon/VerticalMenuIcon.stories.tsx +115 -1019
  165. package/dist/icons/video-play-list-icon/VideoPlaylistIcon.stories.tsx +122 -1092
  166. package/dist/icons/voice-playing-icon/VoicePlayingIcon.stories.tsx +120 -1401
  167. package/dist/icons/volume-full-icon/VolumeFullIcon.stories.tsx +107 -1212
  168. package/dist/icons/volume-half-icon/VolumeHalfIcon.stories.tsx +109 -1122
  169. package/dist/icons/volume-off-icon/VolumeOffIcon.stories.tsx +112 -1124
  170. package/dist/icons/warning-icon/WarningIcon.stories.tsx +119 -1083
  171. package/dist/icons/youtube-icon/YoutubeIcon.stories.tsx +158 -983
  172. package/dist/index.cjs +1 -1
  173. package/dist/index.js +1 -1
  174. 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> = {
@@ -18,358 +32,68 @@ const meta: Meta<typeof CircularPlayIcon> = {
18
32
  },
19
33
  docs: {
20
34
  page: () => (
21
- <>
22
- <style>
23
- {`
24
- .sbdocs-wrapper { padding: 0 !important; max-width: none !important; background: transparent !important; }
25
- .sbdocs-content { max-width: none !important; padding: 0 !important; margin: 0 !important; background: transparent !important; }
26
- .docs-story, .sbdocs { background: transparent !important; }
27
- body, #storybook-docs { background: var(--color-fm-surface-primary) !important; }
28
- .sbdocs-preview { background: transparent !important; border: none !important; }
29
- .sbdocs-h1, .sbdocs-h2, .sbdocs-h3, .sbdocs-h4, .sbdocs-h5, .sbdocs-h6 { color: var(--color-fm-icon-active) !important; }
30
- .sbdocs-p, .sbdocs-li { color: var(--color-fm-secondary) !important; }
31
- .sbdocs-code { background: var(--color-fm-surface-secondary) !important; color: var(--color-fm-secondary-500) !important; border: 1px solid var(--color-fm-divider-secondary) !important; }
32
- .sbdocs-pre { background: var(--color-fm-surface-secondary) !important; border: 1px solid var(--color-fm-divider-secondary) !important; }
33
- .sbdocs-table { background: var(--color-fm-surface-secondary) !important; border: 1px solid var(--color-fm-divider-secondary) !important; }
34
- .sbdocs-table th { background: var(--color-fm-surface-secondary) !important; color: var(--color-fm-icon-active) !important; border-bottom: 1px solid var(--color-fm-divider-secondary) !important; }
35
- .sbdocs-table td { color: var(--color-fm-secondary) !important; border-bottom: 1px solid var(--color-fm-divider-tertiary) !important; }
36
- `}
37
- </style>
38
-
39
- <div className="bg-fm-surface-primary min-h-screen">
40
- <div className="border-fm-divider-secondary bg-fm-surface-secondary relative overflow-hidden border-b backdrop-blur-xl">
41
- <div className="from-fm-secondary-500/10 to-fm-secondary-500/10 absolute inset-0 bg-linear-to-r via-transparent" />
42
- <div className="relative !mx-auto max-w-7xl px-6 py-16">
43
- <div className="!space-y-6 text-center">
44
- <div className="border-fm-secondary-500/30 from-fm-secondary-500/20 to-fm-secondary-500/20 !mx-auto flex h-24 w-24 items-center justify-center rounded-2xl border bg-linear-to-br">
45
- <CircularPlayIcon className="text-fm-icon-active h-12 w-12" />
46
- </div>
47
- <h1 className="!text-fm-primary text-5xl font-bold">
48
- CircularPlayIcon
49
- </h1>
50
- <p className="text-fm-secondary! !mx-auto max-w-3xl text-xl leading-relaxed">
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-fm-secondary-600 text-3xl font-bold">
59
- Play
60
- </div>
61
- <div className="text-fm-tertiary text-sm">
62
- Media & audio
63
- </div>
64
- </div>
65
- <div className="bg-fm-divider-primary h-8 w-px" />
66
- <div className="text-center">
67
- <div className="text-fm-secondary-600 text-3xl font-bold">
68
- Accessible
69
- </div>
70
- <div className="text-fm-tertiary text-sm">
71
- Screen reader friendly
72
- </div>
73
- </div>
74
- <div className="bg-fm-divider-primary h-8 w-px" />
75
- <div className="text-center">
76
- <div className="text-fm-icon-info text-3xl font-bold">
77
- Flexible
78
- </div>
79
- <div className="text-fm-tertiary text-sm">
80
- Customizable sizing
81
- </div>
82
- </div>
83
- </div>
84
- </div>
85
- </div>
86
- </div>
87
-
88
- <div className="!mx-auto max-w-7xl !space-y-16 px-6 py-12">
89
- <div className="!space-y-8">
90
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
91
- Quick Start
92
- </h2>
93
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
94
- <div className="!space-y-4">
95
- <h3 className="text-fm-secondary-600! text-xl font-semibold">
96
- Basic Usage
97
- </h3>
98
- <div className="bg-fm-surface-secondary rounded-lg p-4">
99
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
100
- {`import { CircularPlayIcon } from "@icons/circular-play-icon"
101
-
102
- 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() {
103
46
  return (
104
- <button className="flex items-center justify-center rounded-full bg-purple-500/20 p-4">
105
- <CircularPlayIcon className="h-10 w-10 text-white" />
47
+ <button>
48
+ <CircularPlayIcon className="h-12 w-12 text-fm-icon-active" />
106
49
  </button>
107
50
  )
108
- }`}
109
- </pre>
110
- </div>
111
- </div>
112
- <div className="!space-y-4">
113
- <h3 className="text-fm-secondary-600! text-xl font-semibold">
114
- Live Preview
115
- </h3>
116
- <div className="border-fm-divider-secondary bg-fm-surface-secondary flex h-32 items-center justify-center rounded-lg border">
117
- <button className="border-fm-secondary-500/30 bg-fm-secondary-500/20 hover:bg-fm-secondary-500/30 flex h-14 w-14 items-center justify-center rounded-full border transition-colors">
118
- <CircularPlayIcon className="text-fm-icon-active h-8 w-8" />
119
- </button>
120
- </div>
121
- </div>
122
- </div>
123
- </div>
124
-
125
- <div className="!space-y-8">
126
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
127
- Props & Configuration
128
- </h2>
129
- <div className="border-fm-divider-secondary bg-fm-surface-secondary overflow-hidden rounded-lg border">
130
- <div className="bg-fm-surface-secondary p-4">
131
- <h3 className="text-fm-icon-active! text-xl font-semibold">
132
- Props
133
- </h3>
134
- </div>
135
- <table className="!my-0 w-full">
136
- <thead className="bg-fm-surface-secondary">
137
- <tr className="border-fm-divider-secondary border-b">
138
- <th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
139
- Prop
140
- </th>
141
- <th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
142
- Type
143
- </th>
144
- <th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
145
- Default
146
- </th>
147
- <th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
148
- Description
149
- </th>
150
- </tr>
151
- </thead>
152
- <tbody>
153
- <tr className="bg-fm-surface-secondary!">
154
- <td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
155
- withAccessibility
156
- </td>
157
- <td className="text-fm-secondary! px-6 py-4 text-sm">
158
- boolean
159
- </td>
160
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
161
- true
162
- </td>
163
- <td className="text-fm-secondary! px-6 py-4 text-sm">
164
- Whether to wrap the icon with accessibility feature
165
- </td>
166
- </tr>
167
- <tr className="border-fm-divider-tertiary bg-fm-surface-secondary! border-b">
168
- <td className="text-fm-secondary-600! px-6 py-4 font-mono text-sm">
169
- width
170
- </td>
171
- <td className="text-fm-secondary! px-6 py-4 text-sm">
172
- number | string
173
- </td>
174
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
175
- 48
176
- </td>
177
- <td className="text-fm-secondary! px-6 py-4 text-sm">
178
- Width of the icon
179
- </td>
180
- </tr>
181
- <tr className="border-fm-divider-tertiary bg-fm-surface-secondary! border-b">
182
- <td className="text-fm-secondary-600! px-6 py-4 font-mono text-sm">
183
- height
184
- </td>
185
- <td className="text-fm-secondary! px-6 py-4 text-sm">
186
- number | string
187
- </td>
188
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
189
- 48
190
- </td>
191
- <td className="text-fm-secondary! px-6 py-4 text-sm">
192
- Height of the icon
193
- </td>
194
- </tr>
195
- <tr className="border-fm-divider-tertiary border-b">
196
- <td className="text-fm-secondary-600! px-6 py-4 font-mono text-sm">
197
- fill
198
- </td>
199
- <td className="text-fm-secondary! px-6 py-4 text-sm">
200
- string
201
- </td>
202
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
203
- white (in SVG)
204
- </td>
205
- <td className="text-fm-secondary! px-6 py-4 text-sm">
206
- Fill color; override with className (e.g.
207
- text-fm-icon-active)
208
- </td>
209
- </tr>
210
- <tr className="border-fm-divider-tertiary bg-fm-surface-secondary! border-b">
211
- <td className="text-fm-secondary-600! px-6 py-4 font-mono text-sm">
212
- className
213
- </td>
214
- <td className="text-fm-secondary! px-6 py-4 text-sm">
215
- string
216
- </td>
217
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
218
- -
219
- </td>
220
- <td className="text-fm-secondary! px-6 py-4 text-sm">
221
- CSS classes for styling
222
- </td>
223
- </tr>
224
- <tr className="bg-fm-surface-secondary!">
225
- <td className="text-fm-secondary-600! px-6 py-4 font-mono text-sm">
226
- ...svgProps
227
- </td>
228
- <td className="text-fm-secondary! px-6 py-4 text-sm">
229
- SVGProps
230
- </td>
231
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
232
- -
233
- </td>
234
- <td className="text-fm-secondary! px-6 py-4 text-sm">
235
- All standard SVG element props
236
- </td>
237
- </tr>
238
- </tbody>
239
- </table>
240
- </div>
241
- </div>
242
-
243
- <div className="!space-y-8">
244
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
245
- Size Variations
246
- </h2>
247
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-8">
248
- <div className="bg-fm-surface-secondary flex items-end justify-center gap-6 rounded-lg p-6">
249
- <div className="text-center">
250
- <CircularPlayIcon className="text-fm-icon-active !mx-auto mb-2 h-6 w-6" />
251
- <span className="text-fm-tertiary text-xs">24px</span>
252
- </div>
253
- <div className="text-center">
254
- <CircularPlayIcon className="text-fm-icon-active !mx-auto mb-2 h-8 w-8" />
255
- <span className="text-fm-tertiary text-xs">32px</span>
256
- </div>
257
- <div className="text-center">
258
- <CircularPlayIcon className="text-fm-icon-active !mx-auto mb-2 h-10 w-10" />
259
- <span className="text-fm-tertiary text-xs">40px</span>
260
- </div>
261
- <div className="text-center">
262
- <CircularPlayIcon className="text-fm-icon-active !mx-auto mb-2 h-12 w-12" />
263
- <span className="text-fm-tertiary text-xs">48px</span>
264
- </div>
265
- <div className="text-center">
266
- <CircularPlayIcon className="text-fm-icon-active !mx-auto mb-2 h-16 w-16" />
267
- <span className="text-fm-tertiary text-xs">64px</span>
268
- </div>
269
- </div>
270
- </div>
271
- </div>
272
-
273
- <div className="!space-y-8">
274
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
275
- Usage Examples
276
- </h2>
277
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
278
- <div className="!space-y-4">
279
- <h3 className="text-fm-secondary-600! text-lg font-semibold">
280
- Media player play button
281
- </h3>
282
- <div className="border-fm-divider-secondary bg-fm-surface-secondary flex items-center gap-4 rounded-lg border p-4">
283
- <button className="bg-fm-secondary-500/20 hover:bg-fm-secondary-500/30 flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-full transition-colors">
284
- <CircularPlayIcon className="text-fm-icon-active h-7 w-7" />
285
- </button>
286
- <div className="min-w-0 flex-1">
287
- <div className="text-fm-icon-active text-sm font-medium">
288
- Episode title
289
- </div>
290
- <div className="text-fm-tertiary text-xs">
291
- 0:00 / 24:30
292
- </div>
293
- </div>
294
- </div>
295
- </div>
296
- <div className="!space-y-4">
297
- <h3 className="text-fm-secondary-600! text-lg font-semibold">
298
- Video play overlay
299
- </h3>
300
- <div className="border-fm-divider-secondary bg-fm-surface-secondary relative flex h-32 items-center justify-center overflow-hidden rounded-lg border">
301
- <div className="from-fm-surface-primary/60 absolute inset-0 bg-linear-to-t to-transparent" />
302
- <button className="border-fm-divider-primary bg-fm-surface-secondary hover:bg-fm-divider-primary relative flex h-16 w-16 items-center justify-center rounded-full border backdrop-blur-sm transition-colors">
303
- <CircularPlayIcon className="text-fm-icon-active h-10 w-10" />
304
- </button>
305
- </div>
306
- </div>
307
- </div>
308
- </div>
309
-
310
- <div className="!space-y-8">
311
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
312
- Accessibility
313
- </h2>
314
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-6">
315
- <ul className="text-fm-secondary! !space-y-2 text-sm">
316
- <li>
317
- Uses Radix UI AccessibleIcon with label &quot;Circular
318
- play icon&quot;
319
- </li>
320
- <li>
321
- When used in a button, add aria-label e.g.
322
- &quot;Play&quot; or &quot;Play episode&quot;
323
- </li>
324
- <li>
325
- Ensure sufficient touch target size (e.g. min 44px) for
326
- the control
327
- </li>
328
- </ul>
329
- </div>
330
- </div>
331
- </div>
332
-
333
- <div className="border-fm-divider-secondary bg-fm-surface-secondary border-t backdrop-blur-xl">
334
- <div className="!mx-auto max-w-7xl px-6 py-8">
335
- <div className="!space-y-4 text-center">
336
- <p className="text-fm-tertiary!">
337
- CircularPlayIcon is part of the Aural UI icon library for
338
- media and playback UIs.
339
- </p>
340
- <p className="text-fm-placeholder! text-sm">
341
- Uses Radix UI AccessibleIcon for screen reader
342
- compatibility.
343
- </p>
344
- </div>
345
- </div>
346
- </div>
347
- </div>
348
- </>
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
+ />
349
85
  ),
350
86
  },
351
87
  },
352
88
  tags: ["autodocs"],
353
89
  argTypes: {
354
- width: {
355
- control: { type: "range", min: 8, max: 96, step: 2 },
356
- description: "Width of the icon in pixels",
357
- },
358
- height: {
359
- control: { type: "range", min: 8, max: 96, step: 2 },
360
- description: "Height of the icon in pixels",
90
+ className: {
91
+ control: "text",
92
+ description: "CSS classes including color token",
361
93
  },
362
94
  withAccessibility: {
363
95
  control: "boolean",
364
- description: "Whether to wrap the icon with accessibility features",
365
- },
366
- fill: {
367
- control: "color",
368
- description: "Fill color of the icon",
369
- },
370
- className: {
371
- control: "text",
372
- description: "CSS classes for styling",
96
+ description: "Wrap with accessibility label",
373
97
  },
374
98
  },
375
99
  }
@@ -377,168 +101,78 @@ function MediaPlayer() {
377
101
  export default meta
378
102
  type Story = StoryObj<typeof CircularPlayIcon>
379
103
 
380
- const storyParameters = {
381
- backgrounds: {
382
- default: "dark",
383
- values: [
384
- { name: "dark", value: "var(--color-fm-surface-primary)" },
385
- { name: "darker", value: "var(--color-fm-neutral-0)" },
386
- ],
387
- },
388
- }
389
-
390
104
  export const Default: Story = {
391
105
  args: {
392
- width: 48,
393
- height: 48,
394
- className: "text-fm-icon-active",
106
+ className: "h-12 w-12 text-fm-icon-active",
395
107
  withAccessibility: true,
396
108
  },
397
- parameters: storyParameters,
398
109
  render: (args) => (
399
- <div className="from-fm-surface-primary to-fm-surface-secondary flex h-32 min-h-dvh items-center justify-center rounded-lg bg-linear-to-br">
110
+ <IconDefaultCanvas>
400
111
  <CircularPlayIcon {...args} />
401
- </div>
112
+ </IconDefaultCanvas>
402
113
  ),
403
114
  }
404
115
 
405
116
  export const SizeVariations: Story = {
406
- parameters: {
407
- ...storyParameters,
408
- docs: {
409
- description: {
410
- story:
411
- "CircularPlayIcon in different sizes for media controls and overlays.",
412
- },
413
- },
414
- },
415
- render: () => (
416
- <div className="from-fm-surface-primary to-fm-surface-secondary flex h-64 min-h-dvh items-center justify-center gap-8 rounded-lg bg-linear-to-br p-8">
417
- <div className="text-center">
418
- <CircularPlayIcon className="text-fm-icon-active !mx-auto mb-2 h-6 w-6" />
419
- <span className="text-fm-tertiary text-xs">24px</span>
420
- </div>
421
- <div className="text-center">
422
- <CircularPlayIcon className="text-fm-icon-active !mx-auto mb-2 h-8 w-8" />
423
- <span className="text-fm-tertiary text-xs">32px</span>
424
- </div>
425
- <div className="text-center">
426
- <CircularPlayIcon className="text-fm-icon-active !mx-auto mb-2 h-10 w-10" />
427
- <span className="text-fm-tertiary text-xs">40px</span>
428
- </div>
429
- <div className="text-center">
430
- <CircularPlayIcon className="text-fm-icon-active !mx-auto mb-2 h-12 w-12" />
431
- <span className="text-fm-tertiary text-xs">48px</span>
432
- </div>
433
- <div className="text-center">
434
- <CircularPlayIcon className="text-fm-icon-active !mx-auto mb-2 h-16 w-16" />
435
- <span className="text-fm-tertiary text-xs">64px</span>
436
- </div>
437
- </div>
438
- ),
117
+ render: () => <IconSizeVariations icon={CircularPlayIcon} />,
439
118
  }
440
119
 
441
120
  export const ColorVariations: Story = {
442
- parameters: {
443
- ...storyParameters,
444
- docs: {
445
- description: {
446
- story:
447
- "CircularPlayIcon with different colors for branding and states.",
448
- },
449
- },
450
- },
451
- render: () => (
452
- <div className="from-fm-surface-primary to-fm-surface-secondary grid min-h-dvh grid-cols-2 items-center justify-center gap-6 rounded-lg bg-linear-to-br p-8 md:grid-cols-4">
453
- <div className="text-center">
454
- <div className="border-fm-secondary-500/30 bg-fm-secondary-500/20 !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
455
- <CircularPlayIcon className="text-fm-icon-active h-8 w-8" />
456
- </div>
457
- <div className="text-fm-icon-active text-sm font-medium">Primary</div>
458
- </div>
459
- <div className="text-center">
460
- <div className="border-fm-secondary-500/30 bg-fm-secondary-500/20 !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
461
- <CircularPlayIcon className="text-fm-icon-active h-8 w-8" />
462
- </div>
463
- <div className="text-fm-icon-active text-sm font-medium">Accent</div>
464
- </div>
465
- <div className="text-center">
466
- <div className="border-fm-divider-primary bg-fm-surface-tertiary/20 !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
467
- <CircularPlayIcon className="text-fm-secondary h-8 w-8" />
468
- </div>
469
- <div className="text-fm-icon-active text-sm font-medium">Neutral</div>
470
- </div>
471
- <div className="text-center">
472
- <div className="border-fm-divider-primary bg-fm-surface-secondary !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
473
- <CircularPlayIcon className="text-fm-icon-active/90 h-8 w-8" />
474
- </div>
475
- <div className="text-fm-icon-active text-sm font-medium">Overlay</div>
476
- </div>
477
- </div>
478
- ),
121
+ render: () => <IconColorVariations icon={CircularPlayIcon} />,
479
122
  }
480
123
 
481
124
  export const UsageExamples: Story = {
482
- parameters: {
483
- ...storyParameters,
484
- docs: {
485
- description: {
486
- story: "Real-world usage: media player and video play overlay.",
487
- },
488
- },
489
- },
490
125
  render: () => (
491
- <div className="from-fm-surface-primary to-fm-surface-secondary min-h-dvh !space-y-8 rounded-lg bg-linear-to-br p-8">
492
- <div className="!space-y-2">
493
- <h3 className="text-fm-icon-active text-sm font-medium">
494
- Media player
495
- </h3>
496
- <div className="border-fm-divider-secondary bg-fm-surface-secondary flex items-center gap-4 rounded-lg border p-4">
497
- <button className="bg-fm-secondary-500/20 hover:bg-fm-secondary-500/30 flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-full transition-colors">
498
- <CircularPlayIcon className="text-fm-icon-active h-7 w-7" />
499
- </button>
500
- <div className="min-w-0 flex-1">
501
- <div className="text-fm-icon-active text-sm font-medium">
502
- Episode title
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>
503
138
  </div>
504
- <div className="text-fm-tertiary text-xs">0:00 / 24:30</div>
139
+ <button>
140
+ <CircularPlayIcon className="text-fm-icon-active h-10 w-10" />
141
+ </button>
505
142
  </div>
506
143
  </div>
507
- </div>
508
- <div className="!space-y-2">
509
- <h3 className="text-fm-icon-active text-sm font-medium">
510
- Video play overlay
511
- </h3>
512
- <div className="border-fm-divider-secondary bg-fm-surface-secondary relative flex h-32 items-center justify-center overflow-hidden rounded-lg border">
513
- <div className="from-fm-surface-primary/60 absolute inset-0 bg-linear-to-t to-transparent" />
514
- <button className="border-fm-divider-primary bg-fm-surface-secondary hover:bg-fm-divider-primary relative flex h-16 w-16 items-center justify-center rounded-full border backdrop-blur-sm transition-colors">
515
- <CircularPlayIcon className="text-fm-icon-active h-10 w-10" />
516
- </button>
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>
517
156
  </div>
518
- </div>
519
- </div>
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>
520
165
  ),
521
166
  }
522
167
 
523
168
  export const Playground: Story = {
524
- parameters: {
525
- ...storyParameters,
526
- docs: {
527
- description: {
528
- story: "Interactive playground for CircularPlayIcon.",
529
- },
530
- },
531
- },
532
169
  args: {
533
- width: 48,
534
- height: 48,
535
- className: "text-fm-icon-active",
170
+ className: "h-12 w-12 text-fm-icon-active",
171
+ withAccessibility: true,
536
172
  },
537
173
  render: (args) => (
538
- <div className="from-fm-surface-primary to-fm-surface-secondary flex h-64 min-h-dvh items-center justify-center rounded-lg bg-linear-to-br">
539
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-8">
540
- <CircularPlayIcon {...args} />
541
- </div>
542
- </div>
174
+ <IconPlaygroundCanvas>
175
+ <CircularPlayIcon {...args} />
176
+ </IconPlaygroundCanvas>
543
177
  ),
544
178
  }