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,8 +1,22 @@
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 { SpinnerGradientIcon } from "src/ui/icons/spinner-gradient-icon"
6
+ import { SpinnerSolidNeutralIcon } from "src/ui/icons/spinner-solid-neutral-icon"
7
+ import { VoicePlayingIcon } from "src/ui/icons/voice-playing-icon"
8
+ import {
9
+ IconAnimatedStates,
10
+ IconColorVariations,
11
+ IconDefaultCanvas,
12
+ IconPlaygroundCanvas,
13
+ IconSizeVariations,
14
+ IconUsageCanvas,
15
+ IconUsageSection,
16
+ } from "src/ui/story-spec/icons/icon-story-canvas"
17
+ import { AuralIconDocsPage } from "src/ui/story-spec/icons/icon-story-docs-page"
18
+
4
19
  import { SpinnerSolidIcon } from "."
5
- import { SpinnerGradientIcon } from "../spinner-gradient-icon"
6
20
 
7
21
  const meta: Meta<typeof SpinnerSolidIcon> = {
8
22
  title: "Icons/SpinnerSolidIcon",
@@ -12,633 +26,190 @@ const meta: Meta<typeof SpinnerSolidIcon> = {
12
26
  backgrounds: {
13
27
  default: "dark",
14
28
  values: [
15
- { name: "dark", value: "#0a0a0a" },
16
- { name: "darker", value: "#000000" },
17
- { name: "light", value: "#ffffff" },
29
+ { name: "dark", value: "var(--color-fm-surface-primary)" },
30
+ { name: "darker", value: "var(--color-fm-neutral-0)" },
31
+ { name: "light", value: "var(--color-fm-neutral-1100)" },
18
32
  ],
19
33
  },
20
34
  docs: {
21
35
  page: () => (
22
- <>
23
- {/* Override default docs styling */}
24
- <style>
25
- {`
26
- .sbdocs-wrapper {
27
- padding: 0 !important;
28
- max-width: none !important;
29
- background: transparent !important;
30
- }
31
- .sbdocs-content {
32
- max-width: none !important;
33
- padding: 0 !important;
34
- margin: 0 !important;
35
- background: transparent !important;
36
- }
37
- .docs-story {
38
- background: transparent !important;
39
- }
40
- .sbdocs {
41
- background: transparent !important;
42
- }
43
- body {
44
- background: #0a0a0a !important;
45
- }
46
- #storybook-docs {
47
- background: #0a0a0a !important;
48
- }
49
- .sbdocs-preview {
50
- background: transparent !important;
51
- border: none !important;
52
- }
53
- .sbdocs-h1, .sbdocs-h2, .sbdocs-h3, .sbdocs-h4, .sbdocs-h5, .sbdocs-h6 {
54
- color: white !important;
55
- }
56
- .sbdocs-p, .sbdocs-li {
57
- color: rgba(255, 255, 255, 0.7) !important;
58
- }
59
- .sbdocs-code {
60
- background: rgba(255, 255, 255, 0.1) !important;
61
- color: rgba(168, 85, 247, 1) !important;
62
- border: 1px solid rgba(255, 255, 255, 0.1) !important;
63
- }
64
- .sbdocs-pre {
65
- background: rgba(0, 0, 0, 0.4) !important;
66
- border: 1px solid rgba(255, 255, 255, 0.1) !important;
67
- }
68
- .sbdocs-table {
69
- background: rgba(255, 255, 255, 0.05) !important;
70
- border: 1px solid rgba(255, 255, 255, 0.1) !important;
71
- }
72
- .sbdocs-table th {
73
- background: rgba(255, 255, 255, 0.05) !important;
74
- color: white !important;
75
- border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
76
- }
77
- .sbdocs-table td {
78
- color: rgba(255, 255, 255, 0.7) !important;
79
- border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
80
- }
81
- @keyframes search-pulse {
82
- 0%, 100% { transform: scale(1); opacity: 1; }
83
- 50% { transform: scale(1.05); opacity: 0.8; }
84
- }
85
- .animate-search-pulse {
86
- animation: search-pulse 2s ease-in-out infinite;
87
- }
88
- @keyframes search-bounce {
89
- 0%, 100% { transform: translateY(0); }
90
- 50% { transform: translateY(-4px); }
91
- }
92
- .animate-search-bounce {
93
- animation: search-bounce 1.5s ease-in-out infinite;
94
- }
95
- @keyframes search-glow {
96
- 0%, 100% { filter: drop-shadow(0 0 2px currentColor); }
97
- 50% { filter: drop-shadow(0 0 8px currentColor); }
98
- }
99
- .animate-search-glow {
100
- animation: search-glow 2s ease-in-out infinite;
101
- }
102
- `}
103
- </style>
104
-
105
- <div className="min-h-screen bg-gradient-to-br from-gray-900 via-blue-900/20 to-gray-900">
106
- {/* Header */}
107
- <div className="relative overflow-hidden border-b border-white/10 bg-black/20 backdrop-blur-xl">
108
- <div className="absolute inset-0 bg-gradient-to-r from-blue-500/10 via-transparent to-purple-500/10" />
109
- <div className="relative !mx-auto max-w-7xl px-6 py-16">
110
- <div className="!space-y-6 text-center">
111
- <div className="!mx-auto flex h-24 w-24 items-center justify-center rounded-2xl border border-blue-500/30 bg-gradient-to-br from-blue-500/20 to-purple-500/20">
112
- <SpinnerSolidIcon className="h-12 w-12 text-blue-400" />
113
- </div>
114
- <h1 className="!text-white">SpinnerSolidIcon</h1>
115
- <p className="!mx-auto max-w-3xl text-xl leading-relaxed !text-white">
116
- A clean and minimal spinner icon for loading states,
117
- asynchronous actions, and content transitions. Perfect for
118
- indicating progress in a subtle and elegant way.
119
- </p>
120
-
121
- {/* Stats */}
122
- <div className="flex items-center justify-center gap-8 pt-8">
123
- <div className="text-center">
124
- <div className="text-3xl font-bold text-blue-300">
125
- Minimal
126
- </div>
127
- <div className="text-sm text-white/80">Clean Design</div>
128
- </div>
129
- <div className="h-8 w-px bg-white/20" />
130
- <div className="text-center">
131
- <div className="text-3xl font-bold text-purple-300">
132
- Accessible
133
- </div>
134
- <div className="text-sm text-white/80">
135
- Screen Reader Ready
136
- </div>
137
- </div>
138
- <div className="h-8 w-px bg-white/20" />
139
- <div className="text-center">
140
- <div className="text-3xl font-bold text-green-300">
141
- Versatile
142
- </div>
143
- <div className="text-sm text-white/80">
144
- Multiple Sizes
145
- </div>
146
- </div>
147
- </div>
148
- </div>
149
- </div>
150
- </div>
151
-
152
- {/* Content */}
153
- <div className="!mx-auto max-w-7xl !space-y-16 px-6 py-12">
154
- {/* Features */}
155
- <div className="!space-y-8">
156
- <h3 className="text-center text-2xl font-bold !text-white">
157
- Key Features
158
- </h3>
159
- <div className="grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3">
160
- <div className="space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
161
- <div className="text-3xl">🎨</div>
162
- <h4 className="text-lg font-semibold !text-white">
163
- Clean Design
164
- </h4>
165
- <p className="text-sm !text-white/80">
166
- Minimal and elegant spinner design that fits any interface
167
- </p>
168
- </div>
169
- <div className="space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
170
- <div className="text-3xl">♿</div>
171
- <h4 className="text-lg font-semibold !text-white">
172
- Accessibility
173
- </h4>
174
- <p className="text-sm !text-white/80">
175
- Built with Radix UI's AccessibleIcon for screen reader
176
- support
177
- </p>
178
- </div>
179
- <div className="space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
180
- <div className="text-3xl">⚡</div>
181
- <h4 className="text-lg font-semibold !text-white">
182
- Performance
183
- </h4>
184
- <p className="text-sm !text-white/80">
185
- Optimized SVG rendering with minimal DOM impact
186
- </p>
187
- </div>
188
- </div>
189
- </div>
190
-
191
- {/* API Reference */}
192
- <div className="!space-y-8">
193
- <h3 className="text-center text-2xl font-bold !text-white">
194
- API Reference
195
- </h3>
196
-
197
- {/* Component Signature */}
198
- <div className="rounded-lg border border-white/10 bg-white/5 p-6">
199
- <h4 className="mb-4 text-lg font-semibold !text-blue-300">
200
- Component Signature
201
- </h4>
202
- <div className="rounded-lg bg-black/40 p-4">
203
- <pre className="text-sm !text-green-300">
204
- {`import { SpinnerSolidIcon } from "@/ui/icons/spinner-solid-icon"
205
-
206
- <SpinnerSolidIcon className="h-6 w-6 animate-spin" />`}
207
- </pre>
208
- </div>
209
- </div>
210
-
211
- {/* Props Table */}
212
- <div className="overflow-hidden rounded-lg border border-white/10 bg-white/5">
213
- <div className="bg-white/5 p-4">
214
- <h3 className="text-xl font-semibold !text-white">Props</h3>
215
- </div>
216
- <table className="!my-0 w-full">
217
- <thead className="bg-white/5">
218
- <tr className="border-b border-white/10">
219
- <th className="px-6 py-4 text-left text-sm font-semibold !text-white">
220
- Prop
221
- </th>
222
- <th className="px-6 py-4 text-left text-sm font-semibold !text-white">
223
- Type
224
- </th>
225
- <th className="px-6 py-4 text-left text-sm font-semibold !text-white">
226
- Default
227
- </th>
228
- <th className="px-6 py-4 text-left text-sm font-semibold !text-white">
229
- Description
230
- </th>
231
- </tr>
232
- </thead>
233
- <tbody>
234
- <tr className="border-b border-white/5">
235
- <td className="px-6 py-4 font-mono text-sm !text-indigo-300">
236
- width
237
- </td>
238
- <td className="px-6 py-4 text-sm !text-white/70">
239
- number | string
240
- </td>
241
- <td className="px-6 py-4 text-sm !text-white/50">16</td>
242
- <td className="px-6 py-4 text-sm !text-white/70">
243
- Width of the icon in pixels
244
- </td>
245
- </tr>
246
- <tr className="border-b border-white/5 !bg-black/10">
247
- <td className="px-6 py-4 font-mono text-sm !text-indigo-300">
248
- height
249
- </td>
250
- <td className="px-6 py-4 text-sm !text-white/70">
251
- number | string
252
- </td>
253
- <td className="px-6 py-4 text-sm !text-white/50">16</td>
254
- <td className="px-6 py-4 text-sm !text-white/70">
255
- Height of the icon in pixels
256
- </td>
257
- </tr>
258
- <tr className="!bg-black/10">
259
- <td className="px-6 py-4 font-mono text-sm !text-indigo-300">
260
- className
261
- </td>
262
- <td className="px-6 py-4 text-sm !text-white/70">
263
- string
264
- </td>
265
- <td className="px-6 py-4 text-sm !text-white/50">-</td>
266
- <td className="px-6 py-4 text-sm !text-white/70">
267
- CSS classes for styling
268
- </td>
269
- </tr>
270
- </tbody>
271
- </table>
272
- </div>
273
-
274
- {/* Accessibility */}
275
- <div className="!space-y-8">
276
- <h2 className="text-center text-3xl font-bold !text-white">
277
- Accessibility Features
278
- </h2>
279
- <div className="grid grid-cols-1 gap-8 md:grid-cols-2">
280
- <div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
281
- <h3 className="text-lg font-semibold !text-green-300">
282
- ✅ Built-in Features
283
- </h3>
284
- <ul className="!space-y-2 text-sm !text-white/70">
285
- <li className="!text-white/70">
286
- Uses Radix UI AccessibleIcon wrapper
287
- </li>
288
- <li className="!text-white/70">
289
- Provides screen reader label "Spinner Solid icon"
290
- </li>
291
- <li className="!text-white/70">
292
- Supports keyboard navigation when interactive
293
- </li>
294
- <li className="!text-white/70">
295
- Maintains proper color contrast ratios
296
- </li>
297
- <li className="!text-white/70">
298
- Scales with user's font size preferences
299
- </li>
300
- </ul>
301
- </div>
302
-
303
- <div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
304
- <h3 className="text-lg font-semibold !text-red-300">
305
- 💡 Best Practices
306
- </h3>
307
- <ul className="!space-y-2 text-sm text-white/70">
308
- <li className="!text-white/70">
309
- Always pair with descriptive text
310
- </li>
311
- <li className="!text-white/70">
312
- Provide a text fallback for screen readers{" "}
313
- </li>
314
- <li className="!text-white/70">
315
- Ensure sufficient color contrast
316
- </li>
317
- <li className="!text-white/70">
318
- Respect reduced motion user preferences{" "}
319
- </li>
320
- <li className="!text-white/70">
321
- Ensure spinner indicates real loading action{" "}
322
- </li>
323
- </ul>
324
- </div>
325
- </div>
326
-
327
- <div className="rounded-lg border border-white/10 bg-white/5 p-6">
328
- <h3 className="mb-4 text-lg font-semibold !text-purple-300">
329
- Custom Accessibility Label
330
- </h3>
331
- <div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
332
- <div className="rounded-lg bg-black/40 p-4">
333
- <pre className="overflow-x-auto text-sm !text-blue-300">
334
- {`// Custom implementation with specific label
335
- import { AccessibleIcon } from "@radix-ui/react-accessible-icon"
336
-
337
- function CustomTrashIcon({ label = "Delete", ...props }) {
36
+ <AuralIconDocsPage
37
+ accentToken="info"
38
+ features={[
39
+ { title: "Solid Spinner", description: "Single-color conic sweep" },
40
+ { title: "Theme-aware", description: "Adapts to surface tokens" },
41
+ { title: "Accessible", description: "ARIA-ready by default" },
42
+ ]}
43
+ quickStart={{
44
+ codeExample: `import { SpinnerSolidIcon } from "src/ui/icons/spinner-solid-icon"
45
+
46
+ function LoadingButton() {
338
47
  return (
339
- <AccessibleIcon label={label}>
340
- <TrashIcon {...props} />
341
- </AccessibleIcon>
48
+ <button className="flex items-center gap-2">
49
+ <SpinnerSolidIcon className="h-5 w-5 animate-spin" />
50
+ Loading...
51
+ </button>
342
52
  )
343
- }
344
-
345
- // Usage with specific context
346
- <CustomTrashIcon
347
- label="Delete user account"
348
- className="h-4 w-4 text-red-400"
349
- />`}
350
- </pre>
351
- </div>
352
- <div className="!space-y-4">
353
- <p className="text-sm !text-white/70">
354
- For specific contexts, you can wrap the SpinnerSolid
355
- with a custom AccessibleIcon component that provides
356
- more descriptive labels.
357
- </p>
358
- <div className="rounded-lg border border-red-500/20 bg-red-500/10 p-4">
359
- <div className="flex items-center gap-2 text-sm text-red-200">
360
- <SpinnerSolidIcon className="h-4 w-4" />
361
- <span>
362
- This approach gives screen readers more context
363
- </span>
364
- </div>
365
- </div>
366
- </div>
367
- </div>
368
- </div>
369
- </div>
370
- {/* Related Icons */}
371
- <div className="!space-y-8">
372
- <h2 className="text-center text-3xl font-bold !text-white">
373
- Related Icons
374
- </h2>
375
- <div className="grid grid-cols-2 gap-6 md:grid-cols-4">
376
- <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
377
- <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-neutral-900">
378
- <SpinnerGradientIcon className="size-8 animate-spin" />
379
- </div>
380
- <div>
381
- <div className="font-medium text-white">
382
- Spinner Gradient
383
- </div>
384
- <div className="text-xs text-white/60">
385
- Solid Gradient loading spinner{" "}
386
- </div>
387
- </div>
388
- </div>
389
- <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
390
- <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-green-500/20">
391
- <span className="!text-2xl !text-white">+</span>
392
- </div>
393
- <div>
394
- <div className="font-medium text-white">AddIcon</div>
395
- <div className="text-xs text-white/60">
396
- Create operations
397
- </div>
398
- </div>
399
- </div>
400
- <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
401
- <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-orange-500/20">
402
- <span className="text-2xl">📁</span>
403
- </div>
404
- <div>
405
- <div className="font-medium text-white">FolderIcon</div>
406
- <div className="text-xs text-white/60">
407
- File management
408
- </div>
409
- </div>
410
- </div>
411
- <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
412
- <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-purple-500/20">
413
- <span className="text-2xl">⚙️</span>
414
- </div>
415
- <div>
416
- <div className="font-medium text-white">
417
- SettingsIcon
418
- </div>
419
- <div className="text-xs text-white/60">
420
- Configuration
421
- </div>
422
- </div>
423
- </div>
424
- </div>
425
- </div>
426
- {/* Footer */}
427
- <div className="border-t border-white/10 bg-black/20 backdrop-blur-xl">
428
- <div className="!mx-auto max-w-7xl px-6 py-8">
429
- <div className="!space-y-4 text-center">
430
- <p className="!text-white/60">
431
- Spinner Solid icons are part of the Aural UI icon
432
- library, optimized for accessibility and responsiveness.
433
- </p>
434
- <p className="text-sm !text-white/40">
435
- All icons use Radix UI's AccessibleIcon for screen
436
- reader compatibility and follow WCAG guidelines.
437
- </p>
438
- </div>
439
- </div>
440
- </div>
441
- </div>
442
- </div>
443
- </div>
444
- </>
53
+ }`,
54
+ livePreview: (
55
+ <button className="bg-fm-surface-secondary border-fm-divider-secondary text-fm-primary font-fm-text flex items-center gap-2 rounded-xl border px-4 py-2.5 text-sm">
56
+ <SpinnerSolidIcon className="h-5 w-5 animate-spin" />
57
+ Loading...
58
+ </button>
59
+ ),
60
+ }}
61
+ relatedIcons={[
62
+ {
63
+ name: "SpinnerGradientIcon",
64
+ description: "Gradient spinner",
65
+ icon: SpinnerGradientIcon,
66
+ accentToken: "info",
67
+ },
68
+ {
69
+ name: "SpinnerSolidNeutralIcon",
70
+ description: "Neutral spinner",
71
+ icon: SpinnerSolidNeutralIcon,
72
+ accentToken: "warning",
73
+ },
74
+ {
75
+ name: "AudioBarIcon",
76
+ description: "Audio animation bars",
77
+ icon: AudioBarIcon,
78
+ accentToken: "positive",
79
+ },
80
+ {
81
+ name: "VoicePlayingIcon",
82
+ description: "Voice playing state",
83
+ icon: VoicePlayingIcon,
84
+ accentToken: "negative",
85
+ },
86
+ ]}
87
+ />
445
88
  ),
446
89
  },
447
90
  },
448
91
  tags: ["autodocs"],
92
+ argTypes: {
93
+ width: {
94
+ control: { type: "range", min: 16, max: 120, step: 4 },
95
+ description: "Width of the icon in pixels",
96
+ },
97
+ height: {
98
+ control: { type: "range", min: 16, max: 120, step: 4 },
99
+ description: "Height of the icon in pixels",
100
+ },
101
+ className: {
102
+ control: "text",
103
+ description: "CSS classes for the SVG element",
104
+ },
105
+ withAccessibility: {
106
+ control: "boolean",
107
+ description: "Wrap with accessibility label",
108
+ },
109
+ },
449
110
  }
450
111
 
451
112
  export default meta
452
113
  type Story = StoryObj<typeof SpinnerSolidIcon>
453
114
 
454
- // Story parameters for consistent dark theme
455
- const storyParameters = {
456
- backgrounds: {
457
- default: "dark",
458
- values: [
459
- { name: "dark", value: "#0a0a0a" },
460
- { name: "darker", value: "#000000" },
461
- ],
462
- },
463
- }
464
-
465
115
  export const Default: Story = {
466
116
  args: {
467
- width: 24,
468
- height: 24,
469
- className: "text-blue-400",
117
+ width: 54,
118
+ height: 54,
119
+ withAccessibility: true,
470
120
  },
471
- parameters: storyParameters,
472
121
  render: (args) => (
473
- <div className="flex h-32 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
474
- <SpinnerSolidIcon {...args} className="animate-spin" />
475
- </div>
122
+ <IconDefaultCanvas>
123
+ <SpinnerSolidIcon {...args} />
124
+ </IconDefaultCanvas>
476
125
  ),
477
126
  }
478
127
 
479
128
  export const SizeVariations: Story = {
480
- parameters: {
481
- ...storyParameters,
482
- docs: {
483
- description: {
484
- story:
485
- "SpinnerSolidIcon in different sizes, from small UI elements to large loading states.",
486
- },
487
- },
488
- },
489
- render: () => (
490
- <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">
491
- <div className="text-center">
492
- <SpinnerSolidIcon className="!mx-auto mb-2 h-3 w-3 animate-spin text-blue-400" />
493
- <span className="text-xs text-white/60">12px</span>
494
- </div>
495
- <div className="text-center">
496
- <SpinnerSolidIcon className="!mx-auto mb-2 h-4 w-4 animate-spin text-blue-400" />
497
- <span className="text-xs text-white/60">16px</span>
498
- </div>
499
- <div className="text-center">
500
- <SpinnerSolidIcon className="!mx-auto mb-2 h-5 w-5 animate-spin text-blue-400" />
501
- <span className="text-xs text-white/60">20px</span>
502
- </div>
503
- <div className="text-center">
504
- <SpinnerSolidIcon className="!mx-auto mb-2 h-6 w-6 animate-spin text-blue-400" />
505
- <span className="text-xs text-white/60">24px</span>
506
- </div>
507
- <div className="text-center">
508
- <SpinnerSolidIcon className="!mx-auto mb-2 h-8 w-8 animate-spin text-blue-400" />
509
- <span className="text-xs text-white/60">32px</span>
510
- </div>
511
- <div className="text-center">
512
- <SpinnerSolidIcon className="!mx-auto mb-2 h-12 w-12 animate-spin text-blue-400" />
513
- <span className="text-xs text-white/60">48px</span>
514
- </div>
515
- </div>
516
- ),
129
+ render: () => <IconSizeVariations icon={SpinnerSolidIcon} />,
517
130
  }
518
131
 
519
132
  export const ColorVariations: Story = {
520
- parameters: {
521
- ...storyParameters,
522
- docs: {
523
- description: {
524
- story:
525
- "SpinnerSolidIcon in different colors for various contexts and states.",
526
- },
527
- },
528
- },
133
+ render: () => <IconColorVariations icon={SpinnerSolidIcon} />,
134
+ }
135
+
136
+ export const AnimatedStates: Story = {
529
137
  render: () => (
530
- <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">
531
- <div className="text-center">
532
- <div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-blue-500/30 bg-blue-500/20">
533
- <SpinnerSolidIcon className="h-8 w-8 animate-spin text-blue-400" />
534
- </div>
535
- <div className="text-sm font-medium text-white">Primary</div>
536
- <div className="text-xs text-blue-400">text-blue-400</div>
537
- </div>
538
- <div className="text-center">
539
- <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">
540
- <SpinnerSolidIcon className="h-8 w-8 animate-spin text-purple-400" />
541
- </div>
542
- <div className="text-sm font-medium text-white">Secondary</div>
543
- <div className="text-xs text-purple-400">text-purple-400</div>
544
- </div>
545
- <div className="text-center">
546
- <div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-cyan-500/30 bg-cyan-500/20">
547
- <SpinnerSolidIcon className="h-8 w-8 animate-spin text-cyan-400" />
548
- </div>
549
- <div className="text-sm font-medium text-white">Info</div>
550
- <div className="text-xs text-cyan-400">text-cyan-400</div>
551
- </div>
552
- <div className="text-center">
553
- <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">
554
- <SpinnerSolidIcon className="h-8 w-8 animate-spin text-gray-400" />
555
- </div>
556
- <div className="text-sm font-medium text-white">Muted</div>
557
- <div className="text-xs text-gray-400">text-gray-400</div>
558
- </div>
559
- </div>
138
+ <IconAnimatedStates
139
+ icon={SpinnerSolidIcon}
140
+ variants={[
141
+ {
142
+ label: "Static",
143
+ description: "No animation",
144
+ },
145
+ {
146
+ label: "Spin",
147
+ animationClass: "animate-spin",
148
+ description: "Continuous rotation",
149
+ },
150
+ {
151
+ label: "Pulse",
152
+ animationClass: "animate-pulse",
153
+ description: "Fade in/out",
154
+ },
155
+ ]}
156
+ />
560
157
  ),
561
158
  }
562
159
 
563
160
  export const UsageExamples: Story = {
564
- parameters: {
565
- ...storyParameters,
566
- docs: {
567
- description: {
568
- story:
569
- "Real-world usage examples showing SpinnerSolidIcon in different UI contexts.",
570
- },
571
- },
572
- },
573
161
  render: () => (
574
- <div className="min-h-dvh !space-y-8 rounded-lg bg-gradient-to-br from-gray-900 to-gray-800 p-8">
575
- {/* Loading Button */}
576
- <div className="!space-y-2">
577
- <h3 className="text-sm font-medium text-white">Loading Button</h3>
578
- <div className="flex gap-4">
579
- <button className="flex items-center gap-2 rounded-lg border border-blue-500/30 bg-blue-500/20 px-4 py-2 text-blue-200 transition-colors hover:bg-blue-500/30">
580
- <SpinnerSolidIcon className="h-4 w-4 animate-spin" />
581
- Loading...
582
- </button>
583
- <button className="flex h-10 w-10 items-center justify-center rounded-lg border border-blue-500/30 bg-blue-500/20 text-blue-200 transition-colors hover:bg-blue-500/30">
584
- <SpinnerSolidIcon className="h-5 w-5 animate-spin" />
585
- </button>
586
- </div>
587
- </div>
588
-
589
- {/* Loading State */}
590
- <div className="!space-y-2">
591
- <h3 className="text-sm font-medium text-white">Loading State</h3>
592
- <div className="flex h-32 items-center justify-center rounded-lg border border-white/10 bg-white/5">
593
- <div className="text-center">
594
- <SpinnerSolidIcon className="!mx-auto mb-4 h-12 w-12 animate-spin text-blue-400" />
595
- <div className="text-sm text-white/60">Loading content...</div>
162
+ <IconUsageCanvas>
163
+ <IconUsageSection title="Loading Button">
164
+ <button className="bg-fm-surface-secondary border-fm-divider-secondary text-fm-primary font-fm-text flex items-center gap-2 rounded-xl border px-5 py-2.5 text-sm font-medium">
165
+ <SpinnerSolidIcon className="h-5 w-5 animate-spin" />
166
+ Submitting...
167
+ </button>
168
+ </IconUsageSection>
169
+
170
+ <IconUsageSection title="Loading Card State">
171
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary w-full max-w-sm space-y-3 rounded-xl border p-6">
172
+ <div className="flex items-center gap-3">
173
+ <SpinnerSolidIcon className="h-8 w-8 animate-spin" />
174
+ <div>
175
+ <div className="text-fm-primary font-fm-text text-sm font-medium">
176
+ Loading content
177
+ </div>
178
+ <div className="text-fm-secondary font-fm-text text-xs">
179
+ Please wait...
180
+ </div>
181
+ </div>
596
182
  </div>
597
- </div>
598
- </div>
599
-
600
- {/* Form Loading */}
601
- <div className="!space-y-2">
602
- <h3 className="text-sm font-medium text-white">Form Loading</h3>
603
- <div className="rounded-lg border border-white/10 bg-white/5 p-4">
604
- <div className="mb-4">
605
- <label className="mb-2 block text-sm text-white/60">Email</label>
606
- <input
607
- type="email"
608
- className="w-full rounded-lg border border-white/20 bg-white/10 px-4 py-2 text-white placeholder-white/50"
609
- placeholder="Enter your email"
610
- />
183
+ <div className="bg-fm-divider-secondary h-px w-full" />
184
+ <div className="space-y-2">
185
+ <div className="bg-fm-divider-secondary h-3 w-3/4 animate-pulse rounded-full" />
186
+ <div className="bg-fm-divider-secondary h-3 w-1/2 animate-pulse rounded-full" />
611
187
  </div>
612
- <button className="flex w-full items-center justify-center gap-2 rounded-lg bg-blue-500/20 px-4 py-2 text-blue-200">
613
- <SpinnerSolidIcon className="h-4 w-4 animate-spin" />
614
- Submitting...
615
- </button>
616
188
  </div>
617
- </div>
618
- </div>
189
+ </IconUsageSection>
190
+
191
+ <IconUsageSection title="Status Indicator">
192
+ <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">
193
+ <span className="text-fm-primary font-fm-text text-sm">
194
+ Upload in progress
195
+ </span>
196
+ <SpinnerSolidIcon className="h-5 w-5 animate-spin" />
197
+ </div>
198
+ </IconUsageSection>
199
+ </IconUsageCanvas>
619
200
  ),
620
201
  }
621
202
 
622
203
  export const Playground: Story = {
623
- parameters: {
624
- ...storyParameters,
625
- docs: {
626
- description: {
627
- story:
628
- "Interactive playground to experiment with different SpinnerSolidIcon configurations.",
629
- },
630
- },
631
- },
632
204
  args: {
633
- width: 32,
634
- height: 32,
635
- className: "text-blue-400",
205
+ width: 54,
206
+ height: 54,
207
+ withAccessibility: true,
208
+ className: "animate-spin",
636
209
  },
637
210
  render: (args) => (
638
- <div className="flex h-64 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
639
- <div className="rounded-lg border border-white/10 bg-white/5 p-8">
640
- <SpinnerSolidIcon {...args} className="animate-spin" />
641
- </div>
642
- </div>
211
+ <IconPlaygroundCanvas>
212
+ <SpinnerSolidIcon {...args} />
213
+ </IconPlaygroundCanvas>
643
214
  ),
644
215
  }