aural-ui 3.0.7 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (183) hide show
  1. package/dist/components/aspect-ratio/AspectRatio.stories.tsx +290 -1199
  2. package/dist/components/avatar/Avatar.stories.tsx +235 -237
  3. package/dist/components/badge/Badge.stories.tsx +379 -116
  4. package/dist/components/banner/Banner.stories.tsx +445 -391
  5. package/dist/components/breadcrumb/Breadcrumb.stories.tsx +453 -199
  6. package/dist/components/button/Button.stories.tsx +585 -230
  7. package/dist/components/button/index.tsx +7 -7
  8. package/dist/components/card/Card.stories.tsx +619 -301
  9. package/dist/components/char-count/CharCount.stories.tsx +350 -248
  10. package/dist/components/checkbox/Checkbox.stories.tsx +309 -167
  11. package/dist/components/chip/Chip.stories.tsx +362 -168
  12. package/dist/components/circular-loader/CircularLoader.stories.tsx +221 -620
  13. package/dist/components/clamp-lines/ClampLines.stories.tsx +246 -117
  14. package/dist/components/collapsible/Collapsible.stories.tsx +391 -252
  15. package/dist/components/command/Command.stories.tsx +533 -856
  16. package/dist/components/dialog/Dialog.stories.tsx +505 -949
  17. package/dist/components/divider/Divider.stories.tsx +265 -502
  18. package/dist/components/dot-loader/DotLoader.stories.tsx +256 -257
  19. package/dist/components/drawer/Drawer.stories.tsx +659 -993
  20. package/dist/components/drawer/index.tsx +3 -3
  21. package/dist/components/dropdown/Dropdown.stories.tsx +643 -1018
  22. package/dist/components/form/Form.stories.tsx +560 -274
  23. package/dist/components/helper-text/HelperText.stories.tsx +199 -200
  24. package/dist/components/hover-card/HoverCard.stories.tsx +318 -1221
  25. package/dist/components/icon-button/IconButton.stories.tsx +837 -194
  26. package/dist/components/if-else/if-else.stories.tsx +370 -83
  27. package/dist/components/input/Input.stories.tsx +436 -368
  28. package/dist/components/label/Label.stories.tsx +156 -154
  29. package/dist/components/list/List.stories.tsx +485 -822
  30. package/dist/components/marquee/Marquee.stories.tsx +356 -694
  31. package/dist/components/otp-inputs/OtpInputs.stories.tsx +352 -410
  32. package/dist/components/overlay/Overlay.stories.tsx +452 -818
  33. package/dist/components/overlay/index.tsx +4 -4
  34. package/dist/components/pagination/Pagination.stories.tsx +721 -210
  35. package/dist/components/popover/Popover.stories.tsx +484 -873
  36. package/dist/components/radio/Radio.stories.tsx +432 -124
  37. package/dist/components/resizable/Resizable.stories.tsx +496 -752
  38. package/dist/components/scroll-area/ScrollArea.stories.tsx +384 -1006
  39. package/dist/components/search/Search.stories.tsx +314 -575
  40. package/dist/components/select/Select.stories.tsx +684 -787
  41. package/dist/components/sheet/Sheet.stories.tsx +671 -936
  42. package/dist/components/skelton/Skelton.stories.tsx +230 -764
  43. package/dist/components/slider/Slider.stories.tsx +384 -737
  44. package/dist/components/stepper/Stepper.stories.tsx +371 -514
  45. package/dist/components/switch/Switch.stories.tsx +461 -208
  46. package/dist/components/switch-case/SwitchCase.stories.tsx +367 -188
  47. package/dist/components/table/Table.stories.tsx +770 -914
  48. package/dist/components/tabs/Tabs.stories.tsx +459 -1400
  49. package/dist/components/tag/Tag.stories.tsx +714 -542
  50. package/dist/components/textarea/TextArea.stories.tsx +621 -562
  51. package/dist/components/thumbnail-tags/ThumbnailTags.stories.tsx +228 -148
  52. package/dist/components/toast/Toast.stories.tsx +452 -1333
  53. package/dist/components/toggle/Toggle.stories.tsx +488 -909
  54. package/dist/components/tooltip/Tooltip.stories.tsx +344 -1372
  55. package/dist/components/typography/Typography.stories.tsx +406 -89
  56. package/dist/hooks/use-change-state/UseChangeState.stories.tsx +309 -606
  57. package/dist/hooks/use-previous/UsePrevious.stories.tsx +367 -917
  58. package/dist/hooks/use-standalone-pagination/UseStandalonePagination.stories.tsx +639 -867
  59. package/dist/icons/Icons.stories.tsx +0 -12
  60. package/dist/icons/ai-avatar-icon/AiAvatarIcon.stories.tsx +226 -1013
  61. package/dist/icons/alert-icon/AlertIcon.stories.tsx +109 -929
  62. package/dist/icons/all-icons.tsx +124 -87
  63. package/dist/icons/angle-down-icon/AngleDownIcon.stories.tsx +140 -971
  64. package/dist/icons/apple-logo-icon/AppleLogoIcon.stories.tsx +148 -888
  65. package/dist/icons/arrow-box-left-icon/ArrowBoxLeftIcon.stories.tsx +135 -1019
  66. package/dist/icons/arrow-corner-up-left-icon/ArrowCornerUpLeftIcon.stories.tsx +137 -953
  67. package/dist/icons/arrow-corner-up-right-icon/ArrowCornerUpRightIcon.stories.tsx +138 -997
  68. package/dist/icons/arrow-left-icon/ArrowLeftIcon.stories.tsx +136 -942
  69. package/dist/icons/arrow-right-icon/ArrowRightIcon.stories.tsx +148 -1092
  70. package/dist/icons/arrow-right-up-icon/ArrowRightUpIcon.stories.tsx +146 -1211
  71. package/dist/icons/art-board-icon/ArtBoardIcon.stories.tsx +126 -615
  72. package/dist/icons/audio-bar-icon/AudioBarIcon.stories.tsx +144 -1164
  73. package/dist/icons/backward-ten-seconds-icon/BackwardTenSecondsIcon.stories.tsx +167 -985
  74. package/dist/icons/bubble-check-icon/BubbleCheckIcon.stories.tsx +122 -1179
  75. package/dist/icons/bubble-crossed-icon/BubbleCrossedIcon.stories.tsx +124 -1168
  76. package/dist/icons/bubble-sparkle-icon/BubbleSparkleIcon.stories.tsx +119 -850
  77. package/dist/icons/camera-icon/CameraIcon.stories.tsx +112 -1213
  78. package/dist/icons/capital-a-letter-icon/CapitalALetterIcon.stories.tsx +117 -934
  79. package/dist/icons/chevron-double-left-icon/ChevronDoubleLeftIcon.stories.tsx +160 -961
  80. package/dist/icons/chevron-double-right-icon/ChevronDoubleRightIcon.stories.tsx +163 -961
  81. package/dist/icons/chevron-down-icon/ChevronDownIcon.stories.tsx +144 -942
  82. package/dist/icons/chevron-left-icon/ChevronLeftIcon.stories.tsx +129 -966
  83. package/dist/icons/chevron-right-icon/ChevronRightIcon.stories.tsx +147 -964
  84. package/dist/icons/chevron-up-icon/ChevronUpIcon.stories.tsx +145 -975
  85. package/dist/icons/circle-tick-icon/CircleTickIcon.stories.tsx +150 -1142
  86. package/dist/icons/circular-play-icon/CircularPlayIcon.stories.tsx +114 -461
  87. package/dist/icons/coin-icon/CoinIcon.stories.tsx +124 -1322
  88. package/dist/icons/coin-toons-icon/CoinToonsIcon.stories.tsx +117 -1318
  89. package/dist/icons/column-wide-add-icon/ColumnWideAddIcon.stories.tsx +114 -903
  90. package/dist/icons/command-icon/CommandIcon.stories.tsx +127 -1042
  91. package/dist/icons/copy-icon/CopyIcon.stories.tsx +123 -962
  92. package/dist/icons/cross-circle-icon/CrossCircleIcon.stories.tsx +147 -999
  93. package/dist/icons/cross-icon/CrossIcon.stories.tsx +139 -960
  94. package/dist/icons/download-icon/DownloadIcon.stories.tsx +126 -820
  95. package/dist/icons/edit-big-icon/EditBigIcon.stories.tsx +124 -1031
  96. package/dist/icons/email-icon/EmailIcon.stories.tsx +115 -936
  97. package/dist/icons/expand-icon/ExpandIcon.stories.tsx +112 -1111
  98. package/dist/icons/eye-close-icon/EyeCloseIcon.stories.tsx +144 -1025
  99. package/dist/icons/eye-open-icon/EyeOpenIcon.stories.tsx +143 -1036
  100. package/dist/icons/feature-shine-icon/FeatureShineIcon.stories.tsx +127 -1011
  101. package/dist/icons/file-chart-icon/FileChartIcon.stories.tsx +126 -1056
  102. package/dist/icons/file-text-icon/FileTextIcon.stories.tsx +125 -614
  103. package/dist/icons/filter-bar-row-icon/FilterBarRowIcon.stories.tsx +119 -1050
  104. package/dist/icons/forward-ten-seconds-icon/ForwardTenSecondsIcon.stories.tsx +169 -989
  105. package/dist/icons/git-branch-icon/GitBranchIcon.stories.tsx +115 -1145
  106. package/dist/icons/git-fork-icon/GitForkIcon.stories.tsx +115 -1122
  107. package/dist/icons/globe-icon/GlobeIcon.stories.tsx +130 -313
  108. package/dist/icons/google-logo-icon/GoogleLogoIcon.stories.tsx +145 -940
  109. package/dist/icons/grip-vertical-icon/GripVerticalIcon.stories.tsx +119 -1174
  110. package/dist/icons/head-icon/HeadIcon.stories.tsx +111 -916
  111. package/dist/icons/heart-icon/HeartIcon.stories.tsx +120 -1019
  112. package/dist/icons/image-avatar-sparkle-icon/ImageAvatarSparkleIcon.stories.tsx +119 -683
  113. package/dist/icons/image-icon/ImageIcon.stories.tsx +105 -1121
  114. package/dist/icons/import-folder-icon/ImportFolderIcon.stories.tsx +111 -1192
  115. package/dist/icons/import-left-arrow-folder-icon/ImportLeftArrowFolderIcon.stories.tsx +136 -1256
  116. package/dist/icons/indian-flag-icon/IndianFlagIcon.stories.tsx +159 -962
  117. package/dist/icons/instagram-icon/InstagramIcon.stories.tsx +161 -1385
  118. package/dist/icons/layout-column-icon/LayoutColumnIcon.stories.tsx +124 -972
  119. package/dist/icons/layout-left-icon/LayoutLeftIcon.stories.tsx +119 -948
  120. package/dist/icons/layout-right-icon/LayoutRightIcon.stories.tsx +119 -942
  121. package/dist/icons/light-bulb-simple-icon/LightBulbSimpleIcon.stories.tsx +108 -1215
  122. package/dist/icons/linked-in-icon/LinkedInIcon.stories.tsx +154 -1517
  123. package/dist/icons/magic-book-icon/MagicBookIcon.stories.tsx +110 -1188
  124. package/dist/icons/magic-edit-icon/MagicEditIcon.stories.tsx +119 -678
  125. package/dist/icons/maintenance-icon/MaintenanceIcon.stories.tsx +123 -1184
  126. package/dist/icons/message-icon/MessageIcon.stories.tsx +114 -538
  127. package/dist/icons/minimize-icon/MinimizeIcon.stories.tsx +116 -1158
  128. package/dist/icons/moon-icon/MoonIcon.stories.tsx +120 -536
  129. package/dist/icons/move-horizontal-icon/MoveHorizontalIcon.stories.tsx +109 -1184
  130. package/dist/icons/move-vertical-icon/MoveVerticalIcon.stories.tsx +115 -1134
  131. package/dist/icons/musical-note-icon/MusicalNoteIcon.stories.tsx +119 -971
  132. package/dist/icons/notepad-icon/NotepadIcon.stories.tsx +111 -1100
  133. package/dist/icons/notes-icon/NotesIcon.stories.tsx +119 -1101
  134. package/dist/icons/page-search-icon/PageSearchIcon.stories.tsx +109 -1111
  135. package/dist/icons/page-text-icon/PageTextIcon.stories.tsx +122 -684
  136. package/dist/icons/paint-roll-icon/PaintRollIcon.stories.tsx +113 -954
  137. package/dist/icons/paper-plane-icon/PaperPlaneIcon.stories.tsx +112 -877
  138. package/dist/icons/pause-icon/PauseIcon.stories.tsx +113 -1000
  139. package/dist/icons/pencil-icon/PencilIcon.stories.tsx +115 -1070
  140. package/dist/icons/phone-icon/PhoneIcon.stories.tsx +115 -978
  141. package/dist/icons/plus-icon/PlusIcon.stories.tsx +106 -1093
  142. package/dist/icons/pocket-studio-icon/PocketStudioIcon.stories.tsx +107 -829
  143. package/dist/icons/scroll-down-icon/ScrollDownIcon.stories.tsx +102 -469
  144. package/dist/icons/search-icon/SearchIcon.stories.tsx +111 -1124
  145. package/dist/icons/setting-icon/SettingIcon.stories.tsx +107 -970
  146. package/dist/icons/share-icon/ShareIcon.stories.tsx +120 -1025
  147. package/dist/icons/shield-icon/ShieldIcon.stories.tsx +117 -931
  148. package/dist/icons/site-logo-icon/SiteLogoIcon.stories.tsx +137 -1104
  149. package/dist/icons/skip-backward-icon/SkipBackwardIcon.stories.tsx +172 -982
  150. package/dist/icons/skip-forward-icon/SkipForwardIcon.stories.tsx +164 -983
  151. package/dist/icons/sparkles-soft-icon/SparklesSoftIcon.stories.tsx +105 -958
  152. package/dist/icons/spinner-gradient-icon/SpinnerGradientIcon.stories.tsx +158 -580
  153. package/dist/icons/spinner-gradient-icon/index.tsx +6 -1
  154. package/dist/icons/spinner-solid-icon/SpinnerSolidIcon.stories.tsx +158 -587
  155. package/dist/icons/spinner-solid-icon/index.tsx +6 -1
  156. package/dist/icons/spinner-solid-neutral-icon/SpinnerSolidINeutralcon.stories.tsx +146 -682
  157. package/dist/icons/spinner-solid-neutral-icon/index.tsx +1 -1
  158. package/dist/icons/star-icon/StarIcon.stories.tsx +124 -904
  159. package/dist/icons/store-coin-icon/StoreCoinIcon.stories.tsx +112 -964
  160. package/dist/icons/suggestion-icon/SuggestionIcon.stories.tsx +116 -852
  161. package/dist/icons/sun-icon/SunIcon.stories.tsx +120 -831
  162. package/dist/icons/text-color-icon/TextColorIcon.stories.tsx +116 -950
  163. package/dist/icons/text-indicator-icon/TextIndicatorIcon.stories.tsx +123 -980
  164. package/dist/icons/threads-icon/ThreadsIcon.stories.tsx +156 -1427
  165. package/dist/icons/tick-circle-icon/TickCircleIcon.stories.tsx +146 -1142
  166. package/dist/icons/tick-icon/TickIcon.stories.tsx +145 -1276
  167. package/dist/icons/trash-icon/TrashIcon.stories.tsx +108 -933
  168. package/dist/icons/twitter-x-icon/TwitterXIcon.stories.tsx +157 -1402
  169. package/dist/icons/upload-icon/UploadIcon.stories.tsx +115 -889
  170. package/dist/icons/vertical-menu-icon/VerticalMenuIcon.stories.tsx +118 -984
  171. package/dist/icons/video-play-list-icon/VideoPlaylistIcon.stories.tsx +125 -1049
  172. package/dist/icons/voice-playing-icon/VoicePlayingIcon.stories.tsx +123 -1356
  173. package/dist/icons/volume-full-icon/VolumeFullIcon.stories.tsx +110 -1171
  174. package/dist/icons/volume-half-icon/VolumeHalfIcon.stories.tsx +112 -1093
  175. package/dist/icons/volume-off-icon/VolumeOffIcon.stories.tsx +115 -1087
  176. package/dist/icons/warning-icon/WarningIcon.stories.tsx +122 -1046
  177. package/dist/icons/youtube-icon/YoutubeIcon.stories.tsx +161 -936
  178. package/dist/index.cjs +84 -84
  179. package/dist/index.js +84 -84
  180. package/dist/styles/aural-all-theme.css +1222 -0
  181. package/dist/styles/{aural-theme.css → aural-dark-theme.css} +15 -3
  182. package/dist/styles/aural-light-theme.css +1047 -0
  183. package/package.json +1 -1
@@ -1,6 +1,20 @@
1
1
  import React from "react"
2
2
  import type { Meta, StoryObj } from "@storybook/react-vite"
3
3
 
4
+ import { 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: "#0a0a0a" },
15
- { name: "darker", value: "#000000" },
16
- { name: "light", value: "#ffffff" },
28
+ { name: "dark", value: "var(--color-fm-surface-primary)" },
29
+ { name: "darker", value: "var(--color-fm-neutral-0)" },
30
+ { name: "light", value: "var(--color-fm-neutral-1100)" },
17
31
  ],
18
32
  },
19
33
  docs: {
20
34
  page: () => (
21
- <>
22
- <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: #0a0a0a !important; }
28
- .sbdocs-preview { background: transparent !important; border: none !important; }
29
- .sbdocs-h1, .sbdocs-h2, .sbdocs-h3, .sbdocs-h4, .sbdocs-h5, .sbdocs-h6 { color: white !important; }
30
- .sbdocs-p, .sbdocs-li { color: rgba(255, 255, 255, 0.7) !important; }
31
- .sbdocs-code { background: rgba(255, 255, 255, 0.1) !important; color: rgba(168, 85, 247, 1) !important; border: 1px solid rgba(255, 255, 255, 0.1) !important; }
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 className="flex items-center justify-center rounded-full bg-purple-500/20 p-4">
103
- <CircularPlayIcon className="h-10 w-10 text-white" />
47
+ <button>
48
+ <CircularPlayIcon className="h-12 w-12 text-fm-icon-active" />
104
49
  </button>
105
50
  )
106
- }`}
107
- </pre>
108
- </div>
109
- </div>
110
- <div className="!space-y-4">
111
- <h3 className="text-xl font-semibold !text-purple-300">
112
- Live Preview
113
- </h3>
114
- <div className="flex h-32 items-center justify-center rounded-lg border border-white/10 bg-white/5">
115
- <button className="flex h-14 w-14 items-center justify-center rounded-full border border-purple-500/30 bg-purple-500/20 transition-colors hover:bg-purple-500/30">
116
- <CircularPlayIcon className="h-8 w-8 text-white" />
117
- </button>
118
- </div>
119
- </div>
120
- </div>
121
- </div>
122
-
123
- <div className="!space-y-8">
124
- <h2 className="text-center text-3xl font-bold !text-white">
125
- Props & Configuration
126
- </h2>
127
- <div className="overflow-hidden rounded-lg border border-white/10 bg-white/5">
128
- <div className="bg-white/5 p-4">
129
- <h3 className="text-xl font-semibold !text-white">Props</h3>
130
- </div>
131
- <table className="!my-0 w-full">
132
- <thead className="bg-white/5">
133
- <tr className="border-b border-white/10">
134
- <th className="px-6 py-4 text-left text-sm font-semibold !text-white">
135
- Prop
136
- </th>
137
- <th className="px-6 py-4 text-left text-sm font-semibold !text-white">
138
- Type
139
- </th>
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 &quot;Circular
305
- play icon&quot;
306
- </li>
307
- <li>
308
- When used in a button, add aria-label e.g.
309
- &quot;Play&quot; or &quot;Play episode&quot;
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
- width: {
342
- control: { type: "range", min: 8, max: 96, step: 2 },
343
- description: "Width of the icon in pixels",
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: "Whether to wrap the icon with accessibility features",
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
- width: 48,
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
- <div className="flex h-32 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
110
+ <IconDefaultCanvas>
387
111
  <CircularPlayIcon {...args} />
388
- </div>
112
+ </IconDefaultCanvas>
389
113
  ),
390
114
  }
391
115
 
392
116
  export const SizeVariations: Story = {
393
- parameters: {
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
- parameters: {
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
- <div className="min-h-dvh !space-y-8 rounded-lg bg-gradient-to-br from-gray-900 to-gray-800 p-8">
479
- <div className="!space-y-2">
480
- <h3 className="text-sm font-medium text-white">Media player</h3>
481
- <div className="flex items-center gap-4 rounded-lg border border-white/10 bg-white/5 p-4">
482
- <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">
483
- <CircularPlayIcon className="h-7 w-7 text-white" />
484
- </button>
485
- <div className="min-w-0 flex-1">
486
- <div className="text-sm font-medium text-white">Episode title</div>
487
- <div className="text-xs text-white/60">0:00 / 24:30</div>
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
- </div>
491
- <div className="!space-y-2">
492
- <h3 className="text-sm font-medium text-white">Video play overlay</h3>
493
- <div className="relative flex h-32 items-center justify-center overflow-hidden rounded-lg border border-white/10 bg-black/40">
494
- <div className="absolute inset-0 bg-gradient-to-t from-black/60 to-transparent" />
495
- <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">
496
- <CircularPlayIcon className="h-10 w-10 text-white" />
497
- </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>
498
156
  </div>
499
- </div>
500
- </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>
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
- width: 48,
515
- height: 48,
516
- className: "text-white",
170
+ className: "h-12 w-12 text-fm-icon-active",
171
+ withAccessibility: true,
517
172
  },
518
173
  render: (args) => (
519
- <div className="flex h-64 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
520
- <div className="rounded-lg border border-white/10 bg-white/5 p-8">
521
- <CircularPlayIcon {...args} />
522
- </div>
523
- </div>
174
+ <IconPlaygroundCanvas>
175
+ <CircularPlayIcon {...args} />
176
+ </IconPlaygroundCanvas>
524
177
  ),
525
178
  }