aural-ui 3.0.7 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/aspect-ratio/AspectRatio.stories.tsx +290 -1199
- package/dist/components/avatar/Avatar.stories.tsx +235 -237
- package/dist/components/badge/Badge.stories.tsx +379 -116
- package/dist/components/banner/Banner.stories.tsx +445 -391
- package/dist/components/breadcrumb/Breadcrumb.stories.tsx +453 -199
- package/dist/components/button/Button.stories.tsx +585 -230
- package/dist/components/button/index.tsx +7 -7
- package/dist/components/card/Card.stories.tsx +619 -301
- package/dist/components/char-count/CharCount.stories.tsx +350 -248
- package/dist/components/checkbox/Checkbox.stories.tsx +309 -167
- package/dist/components/chip/Chip.stories.tsx +362 -168
- package/dist/components/circular-loader/CircularLoader.stories.tsx +221 -620
- package/dist/components/clamp-lines/ClampLines.stories.tsx +246 -117
- package/dist/components/collapsible/Collapsible.stories.tsx +391 -252
- package/dist/components/command/Command.stories.tsx +533 -856
- package/dist/components/dialog/Dialog.stories.tsx +505 -949
- package/dist/components/divider/Divider.stories.tsx +265 -502
- package/dist/components/dot-loader/DotLoader.stories.tsx +256 -257
- package/dist/components/drawer/Drawer.stories.tsx +659 -993
- package/dist/components/drawer/index.tsx +3 -3
- package/dist/components/dropdown/Dropdown.stories.tsx +643 -1018
- package/dist/components/form/Form.stories.tsx +560 -274
- package/dist/components/helper-text/HelperText.stories.tsx +199 -200
- package/dist/components/hover-card/HoverCard.stories.tsx +318 -1221
- package/dist/components/icon-button/IconButton.stories.tsx +837 -194
- package/dist/components/if-else/if-else.stories.tsx +370 -83
- package/dist/components/input/Input.stories.tsx +436 -368
- package/dist/components/label/Label.stories.tsx +156 -154
- package/dist/components/list/List.stories.tsx +485 -822
- package/dist/components/marquee/Marquee.stories.tsx +356 -694
- package/dist/components/otp-inputs/OtpInputs.stories.tsx +352 -410
- package/dist/components/overlay/Overlay.stories.tsx +452 -818
- package/dist/components/overlay/index.tsx +4 -4
- package/dist/components/pagination/Pagination.stories.tsx +721 -210
- package/dist/components/popover/Popover.stories.tsx +484 -873
- package/dist/components/radio/Radio.stories.tsx +432 -124
- package/dist/components/resizable/Resizable.stories.tsx +496 -752
- package/dist/components/scroll-area/ScrollArea.stories.tsx +384 -1006
- package/dist/components/search/Search.stories.tsx +314 -575
- package/dist/components/select/Select.stories.tsx +684 -787
- package/dist/components/sheet/Sheet.stories.tsx +671 -936
- package/dist/components/skelton/Skelton.stories.tsx +230 -764
- package/dist/components/slider/Slider.stories.tsx +384 -737
- package/dist/components/stepper/Stepper.stories.tsx +371 -514
- package/dist/components/switch/Switch.stories.tsx +461 -208
- package/dist/components/switch-case/SwitchCase.stories.tsx +367 -188
- package/dist/components/table/Table.stories.tsx +770 -914
- package/dist/components/tabs/Tabs.stories.tsx +459 -1400
- package/dist/components/tag/Tag.stories.tsx +714 -542
- package/dist/components/textarea/TextArea.stories.tsx +621 -562
- package/dist/components/thumbnail-tags/ThumbnailTags.stories.tsx +228 -148
- package/dist/components/toast/Toast.stories.tsx +452 -1333
- package/dist/components/toggle/Toggle.stories.tsx +488 -909
- package/dist/components/tooltip/Tooltip.stories.tsx +344 -1372
- package/dist/components/typography/Typography.stories.tsx +406 -89
- package/dist/hooks/use-change-state/UseChangeState.stories.tsx +309 -606
- package/dist/hooks/use-previous/UsePrevious.stories.tsx +367 -917
- package/dist/hooks/use-standalone-pagination/UseStandalonePagination.stories.tsx +639 -867
- package/dist/icons/Icons.stories.tsx +0 -12
- package/dist/icons/ai-avatar-icon/AiAvatarIcon.stories.tsx +226 -1013
- package/dist/icons/alert-icon/AlertIcon.stories.tsx +109 -929
- package/dist/icons/all-icons.tsx +124 -87
- package/dist/icons/angle-down-icon/AngleDownIcon.stories.tsx +140 -971
- package/dist/icons/apple-logo-icon/AppleLogoIcon.stories.tsx +148 -888
- package/dist/icons/arrow-box-left-icon/ArrowBoxLeftIcon.stories.tsx +135 -1019
- package/dist/icons/arrow-corner-up-left-icon/ArrowCornerUpLeftIcon.stories.tsx +137 -953
- package/dist/icons/arrow-corner-up-right-icon/ArrowCornerUpRightIcon.stories.tsx +138 -997
- package/dist/icons/arrow-left-icon/ArrowLeftIcon.stories.tsx +136 -942
- package/dist/icons/arrow-right-icon/ArrowRightIcon.stories.tsx +148 -1092
- package/dist/icons/arrow-right-up-icon/ArrowRightUpIcon.stories.tsx +146 -1211
- package/dist/icons/art-board-icon/ArtBoardIcon.stories.tsx +126 -615
- package/dist/icons/audio-bar-icon/AudioBarIcon.stories.tsx +144 -1164
- package/dist/icons/backward-ten-seconds-icon/BackwardTenSecondsIcon.stories.tsx +167 -985
- package/dist/icons/bubble-check-icon/BubbleCheckIcon.stories.tsx +122 -1179
- package/dist/icons/bubble-crossed-icon/BubbleCrossedIcon.stories.tsx +124 -1168
- package/dist/icons/bubble-sparkle-icon/BubbleSparkleIcon.stories.tsx +119 -850
- package/dist/icons/camera-icon/CameraIcon.stories.tsx +112 -1213
- package/dist/icons/capital-a-letter-icon/CapitalALetterIcon.stories.tsx +117 -934
- package/dist/icons/chevron-double-left-icon/ChevronDoubleLeftIcon.stories.tsx +160 -961
- package/dist/icons/chevron-double-right-icon/ChevronDoubleRightIcon.stories.tsx +163 -961
- package/dist/icons/chevron-down-icon/ChevronDownIcon.stories.tsx +144 -942
- package/dist/icons/chevron-left-icon/ChevronLeftIcon.stories.tsx +129 -966
- package/dist/icons/chevron-right-icon/ChevronRightIcon.stories.tsx +147 -964
- package/dist/icons/chevron-up-icon/ChevronUpIcon.stories.tsx +145 -975
- package/dist/icons/circle-tick-icon/CircleTickIcon.stories.tsx +150 -1142
- package/dist/icons/circular-play-icon/CircularPlayIcon.stories.tsx +114 -461
- package/dist/icons/coin-icon/CoinIcon.stories.tsx +124 -1322
- package/dist/icons/coin-toons-icon/CoinToonsIcon.stories.tsx +117 -1318
- package/dist/icons/column-wide-add-icon/ColumnWideAddIcon.stories.tsx +114 -903
- package/dist/icons/command-icon/CommandIcon.stories.tsx +127 -1042
- package/dist/icons/copy-icon/CopyIcon.stories.tsx +123 -962
- package/dist/icons/cross-circle-icon/CrossCircleIcon.stories.tsx +147 -999
- package/dist/icons/cross-icon/CrossIcon.stories.tsx +139 -960
- package/dist/icons/download-icon/DownloadIcon.stories.tsx +126 -820
- package/dist/icons/edit-big-icon/EditBigIcon.stories.tsx +124 -1031
- package/dist/icons/email-icon/EmailIcon.stories.tsx +115 -936
- package/dist/icons/expand-icon/ExpandIcon.stories.tsx +112 -1111
- package/dist/icons/eye-close-icon/EyeCloseIcon.stories.tsx +144 -1025
- package/dist/icons/eye-open-icon/EyeOpenIcon.stories.tsx +143 -1036
- package/dist/icons/feature-shine-icon/FeatureShineIcon.stories.tsx +127 -1011
- package/dist/icons/file-chart-icon/FileChartIcon.stories.tsx +126 -1056
- package/dist/icons/file-text-icon/FileTextIcon.stories.tsx +125 -614
- package/dist/icons/filter-bar-row-icon/FilterBarRowIcon.stories.tsx +119 -1050
- package/dist/icons/forward-ten-seconds-icon/ForwardTenSecondsIcon.stories.tsx +169 -989
- package/dist/icons/git-branch-icon/GitBranchIcon.stories.tsx +115 -1145
- package/dist/icons/git-fork-icon/GitForkIcon.stories.tsx +115 -1122
- package/dist/icons/globe-icon/GlobeIcon.stories.tsx +130 -313
- package/dist/icons/google-logo-icon/GoogleLogoIcon.stories.tsx +145 -940
- package/dist/icons/grip-vertical-icon/GripVerticalIcon.stories.tsx +119 -1174
- package/dist/icons/head-icon/HeadIcon.stories.tsx +111 -916
- package/dist/icons/heart-icon/HeartIcon.stories.tsx +120 -1019
- package/dist/icons/image-avatar-sparkle-icon/ImageAvatarSparkleIcon.stories.tsx +119 -683
- package/dist/icons/image-icon/ImageIcon.stories.tsx +105 -1121
- package/dist/icons/import-folder-icon/ImportFolderIcon.stories.tsx +111 -1192
- package/dist/icons/import-left-arrow-folder-icon/ImportLeftArrowFolderIcon.stories.tsx +136 -1256
- package/dist/icons/indian-flag-icon/IndianFlagIcon.stories.tsx +159 -962
- package/dist/icons/instagram-icon/InstagramIcon.stories.tsx +161 -1385
- package/dist/icons/layout-column-icon/LayoutColumnIcon.stories.tsx +124 -972
- package/dist/icons/layout-left-icon/LayoutLeftIcon.stories.tsx +119 -948
- package/dist/icons/layout-right-icon/LayoutRightIcon.stories.tsx +119 -942
- package/dist/icons/light-bulb-simple-icon/LightBulbSimpleIcon.stories.tsx +108 -1215
- package/dist/icons/linked-in-icon/LinkedInIcon.stories.tsx +154 -1517
- package/dist/icons/magic-book-icon/MagicBookIcon.stories.tsx +110 -1188
- package/dist/icons/magic-edit-icon/MagicEditIcon.stories.tsx +119 -678
- package/dist/icons/maintenance-icon/MaintenanceIcon.stories.tsx +123 -1184
- package/dist/icons/message-icon/MessageIcon.stories.tsx +114 -538
- package/dist/icons/minimize-icon/MinimizeIcon.stories.tsx +116 -1158
- package/dist/icons/moon-icon/MoonIcon.stories.tsx +120 -536
- package/dist/icons/move-horizontal-icon/MoveHorizontalIcon.stories.tsx +109 -1184
- package/dist/icons/move-vertical-icon/MoveVerticalIcon.stories.tsx +115 -1134
- package/dist/icons/musical-note-icon/MusicalNoteIcon.stories.tsx +119 -971
- package/dist/icons/notepad-icon/NotepadIcon.stories.tsx +111 -1100
- package/dist/icons/notes-icon/NotesIcon.stories.tsx +119 -1101
- package/dist/icons/page-search-icon/PageSearchIcon.stories.tsx +109 -1111
- package/dist/icons/page-text-icon/PageTextIcon.stories.tsx +122 -684
- package/dist/icons/paint-roll-icon/PaintRollIcon.stories.tsx +113 -954
- package/dist/icons/paper-plane-icon/PaperPlaneIcon.stories.tsx +112 -877
- package/dist/icons/pause-icon/PauseIcon.stories.tsx +113 -1000
- package/dist/icons/pencil-icon/PencilIcon.stories.tsx +115 -1070
- package/dist/icons/phone-icon/PhoneIcon.stories.tsx +115 -978
- package/dist/icons/plus-icon/PlusIcon.stories.tsx +106 -1093
- package/dist/icons/pocket-studio-icon/PocketStudioIcon.stories.tsx +107 -829
- package/dist/icons/scroll-down-icon/ScrollDownIcon.stories.tsx +102 -469
- package/dist/icons/search-icon/SearchIcon.stories.tsx +111 -1124
- package/dist/icons/setting-icon/SettingIcon.stories.tsx +107 -970
- package/dist/icons/share-icon/ShareIcon.stories.tsx +120 -1025
- package/dist/icons/shield-icon/ShieldIcon.stories.tsx +117 -931
- package/dist/icons/site-logo-icon/SiteLogoIcon.stories.tsx +137 -1104
- package/dist/icons/skip-backward-icon/SkipBackwardIcon.stories.tsx +172 -982
- package/dist/icons/skip-forward-icon/SkipForwardIcon.stories.tsx +164 -983
- package/dist/icons/sparkles-soft-icon/SparklesSoftIcon.stories.tsx +105 -958
- package/dist/icons/spinner-gradient-icon/SpinnerGradientIcon.stories.tsx +158 -580
- package/dist/icons/spinner-gradient-icon/index.tsx +6 -1
- package/dist/icons/spinner-solid-icon/SpinnerSolidIcon.stories.tsx +158 -587
- package/dist/icons/spinner-solid-icon/index.tsx +6 -1
- package/dist/icons/spinner-solid-neutral-icon/SpinnerSolidINeutralcon.stories.tsx +146 -682
- package/dist/icons/spinner-solid-neutral-icon/index.tsx +1 -1
- package/dist/icons/star-icon/StarIcon.stories.tsx +124 -904
- package/dist/icons/store-coin-icon/StoreCoinIcon.stories.tsx +112 -964
- package/dist/icons/suggestion-icon/SuggestionIcon.stories.tsx +116 -852
- package/dist/icons/sun-icon/SunIcon.stories.tsx +120 -831
- package/dist/icons/text-color-icon/TextColorIcon.stories.tsx +116 -950
- package/dist/icons/text-indicator-icon/TextIndicatorIcon.stories.tsx +123 -980
- package/dist/icons/threads-icon/ThreadsIcon.stories.tsx +156 -1427
- package/dist/icons/tick-circle-icon/TickCircleIcon.stories.tsx +146 -1142
- package/dist/icons/tick-icon/TickIcon.stories.tsx +145 -1276
- package/dist/icons/trash-icon/TrashIcon.stories.tsx +108 -933
- package/dist/icons/twitter-x-icon/TwitterXIcon.stories.tsx +157 -1402
- package/dist/icons/upload-icon/UploadIcon.stories.tsx +115 -889
- package/dist/icons/vertical-menu-icon/VerticalMenuIcon.stories.tsx +118 -984
- package/dist/icons/video-play-list-icon/VideoPlaylistIcon.stories.tsx +125 -1049
- package/dist/icons/voice-playing-icon/VoicePlayingIcon.stories.tsx +123 -1356
- package/dist/icons/volume-full-icon/VolumeFullIcon.stories.tsx +110 -1171
- package/dist/icons/volume-half-icon/VolumeHalfIcon.stories.tsx +112 -1093
- package/dist/icons/volume-off-icon/VolumeOffIcon.stories.tsx +115 -1087
- package/dist/icons/warning-icon/WarningIcon.stories.tsx +122 -1046
- package/dist/icons/youtube-icon/YoutubeIcon.stories.tsx +161 -936
- package/dist/index.cjs +84 -84
- package/dist/index.js +84 -84
- package/dist/styles/aural-all-theme.css +1222 -0
- package/dist/styles/{aural-theme.css → aural-dark-theme.css} +15 -3
- package/dist/styles/aural-light-theme.css +1047 -0
- package/package.json +1 -1
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import type { Meta, StoryObj } from "@storybook/react-vite"
|
|
3
3
|
|
|
4
|
+
import { AudioBarIcon } from "src/ui/icons/audio-bar-icon"
|
|
5
|
+
import { CircularPlayIcon } from "src/ui/icons/circular-play-icon"
|
|
6
|
+
import { SpinnerSolidIcon } from "src/ui/icons/spinner-solid-icon"
|
|
7
|
+
import { SpinnerSolidNeutralIcon } from "src/ui/icons/spinner-solid-neutral-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 { SpinnerGradientIcon } from "."
|
|
5
20
|
|
|
6
21
|
const meta: Meta<typeof SpinnerGradientIcon> = {
|
|
@@ -11,627 +26,190 @@ const meta: Meta<typeof SpinnerGradientIcon> = {
|
|
|
11
26
|
backgrounds: {
|
|
12
27
|
default: "dark",
|
|
13
28
|
values: [
|
|
14
|
-
{ name: "dark", value: "
|
|
15
|
-
{ name: "darker", value: "
|
|
16
|
-
{ name: "light", value: "
|
|
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)" },
|
|
17
32
|
],
|
|
18
33
|
},
|
|
19
34
|
docs: {
|
|
20
35
|
page: () => (
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
{
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
padding: 0 !important;
|
|
33
|
-
margin: 0 !important;
|
|
34
|
-
background: transparent !important;
|
|
35
|
-
}
|
|
36
|
-
.docs-story {
|
|
37
|
-
background: transparent !important;
|
|
38
|
-
}
|
|
39
|
-
.sbdocs {
|
|
40
|
-
background: transparent !important;
|
|
41
|
-
}
|
|
42
|
-
body {
|
|
43
|
-
background: #0a0a0a !important;
|
|
44
|
-
}
|
|
45
|
-
#storybook-docs {
|
|
46
|
-
background: #0a0a0a !important;
|
|
47
|
-
}
|
|
48
|
-
.sbdocs-preview {
|
|
49
|
-
background: transparent !important;
|
|
50
|
-
border: none !important;
|
|
51
|
-
}
|
|
52
|
-
.sbdocs-h1, .sbdocs-h2, .sbdocs-h3, .sbdocs-h4, .sbdocs-h5, .sbdocs-h6 {
|
|
53
|
-
color: white !important;
|
|
54
|
-
}
|
|
55
|
-
.sbdocs-p, .sbdocs-li {
|
|
56
|
-
color: rgba(255, 255, 255, 0.7) !important;
|
|
57
|
-
}
|
|
58
|
-
.sbdocs-code {
|
|
59
|
-
background: rgba(255, 255, 255, 0.1) !important;
|
|
60
|
-
color: rgba(168, 85, 247, 1) !important;
|
|
61
|
-
border: 1px solid rgba(255, 255, 255, 0.1) !important;
|
|
62
|
-
}
|
|
63
|
-
.sbdocs-pre {
|
|
64
|
-
background: rgba(0, 0, 0, 0.4) !important;
|
|
65
|
-
border: 1px solid rgba(255, 255, 255, 0.1) !important;
|
|
66
|
-
}
|
|
67
|
-
.sbdocs-table {
|
|
68
|
-
background: rgba(255, 255, 255, 0.05) !important;
|
|
69
|
-
border: 1px solid rgba(255, 255, 255, 0.1) !important;
|
|
70
|
-
}
|
|
71
|
-
.sbdocs-table th {
|
|
72
|
-
background: rgba(255, 255, 255, 0.05) !important;
|
|
73
|
-
color: white !important;
|
|
74
|
-
border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
|
|
75
|
-
}
|
|
76
|
-
.sbdocs-table td {
|
|
77
|
-
color: rgba(255, 255, 255, 0.7) !important;
|
|
78
|
-
border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
|
|
79
|
-
}
|
|
80
|
-
`}
|
|
81
|
-
</style>
|
|
82
|
-
|
|
83
|
-
<div className="min-h-screen bg-gradient-to-br from-gray-900 via-purple-900/20 to-gray-900">
|
|
84
|
-
{/* Header */}
|
|
85
|
-
<div className="relative overflow-hidden border-b border-white/10 bg-black/20 backdrop-blur-xl">
|
|
86
|
-
<div className="absolute inset-0 bg-gradient-to-r from-purple-500/10 via-transparent to-blue-500/10" />
|
|
87
|
-
<div className="relative !mx-auto max-w-7xl px-6 py-16">
|
|
88
|
-
<div className="!space-y-6 text-center">
|
|
89
|
-
<div className="!mx-auto flex h-24 w-24 items-center justify-center rounded-2xl border border-purple-500/30 bg-gradient-to-br from-purple-500/20 to-blue-500/20">
|
|
90
|
-
<SpinnerGradientIcon className="h-12 w-12 text-purple-400" />
|
|
91
|
-
</div>
|
|
92
|
-
<h1 className="!text-white">SpinnerGradientIcon</h1>
|
|
93
|
-
<p className="!mx-auto max-w-3xl text-xl leading-relaxed !text-white">
|
|
94
|
-
A dynamic gradient spinner icon for loading states,
|
|
95
|
-
asynchronous actions, and content transitions. Features a
|
|
96
|
-
beautiful gradient animation that smoothly transitions
|
|
97
|
-
between colors.
|
|
98
|
-
</p>
|
|
99
|
-
|
|
100
|
-
{/* Stats */}
|
|
101
|
-
<div className="flex items-center justify-center gap-8 pt-8">
|
|
102
|
-
<div className="text-center">
|
|
103
|
-
<div className="text-3xl font-bold text-purple-300">
|
|
104
|
-
Smooth
|
|
105
|
-
</div>
|
|
106
|
-
<div className="text-sm text-white/80">
|
|
107
|
-
Gradient Animation
|
|
108
|
-
</div>
|
|
109
|
-
</div>
|
|
110
|
-
<div className="h-8 w-px bg-white/20" />
|
|
111
|
-
<div className="text-center">
|
|
112
|
-
<div className="text-3xl font-bold text-blue-300">
|
|
113
|
-
Accessible
|
|
114
|
-
</div>
|
|
115
|
-
<div className="text-sm text-white/80">
|
|
116
|
-
Screen Reader Ready
|
|
117
|
-
</div>
|
|
118
|
-
</div>
|
|
119
|
-
<div className="h-8 w-px bg-white/20" />
|
|
120
|
-
<div className="text-center">
|
|
121
|
-
<div className="text-3xl font-bold text-green-300">
|
|
122
|
-
Customizable
|
|
123
|
-
</div>
|
|
124
|
-
<div className="text-sm text-white/80">Size & Colors</div>
|
|
125
|
-
</div>
|
|
126
|
-
</div>
|
|
127
|
-
</div>
|
|
128
|
-
</div>
|
|
129
|
-
</div>
|
|
130
|
-
|
|
131
|
-
{/* Content */}
|
|
132
|
-
<div className="!mx-auto max-w-7xl !space-y-16 px-6 py-12">
|
|
133
|
-
{/* Features */}
|
|
134
|
-
<div className="!space-y-8">
|
|
135
|
-
<h3 className="text-center text-2xl font-bold !text-white">
|
|
136
|
-
Key Features
|
|
137
|
-
</h3>
|
|
138
|
-
<div className="grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3">
|
|
139
|
-
<div className="space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
140
|
-
<div className="text-3xl">🎨</div>
|
|
141
|
-
<h4 className="text-lg font-semibold !text-white">
|
|
142
|
-
Gradient Animation
|
|
143
|
-
</h4>
|
|
144
|
-
<p className="text-sm !text-white/80">
|
|
145
|
-
Smooth color transitions between primary, secondary, and
|
|
146
|
-
neutral colors
|
|
147
|
-
</p>
|
|
148
|
-
</div>
|
|
149
|
-
<div className="space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
150
|
-
<div className="text-3xl">♿</div>
|
|
151
|
-
<h4 className="text-lg font-semibold !text-white">
|
|
152
|
-
Accessibility
|
|
153
|
-
</h4>
|
|
154
|
-
<p className="text-sm !text-white/80">
|
|
155
|
-
Built with Radix UI's AccessibleIcon for screen reader
|
|
156
|
-
support
|
|
157
|
-
</p>
|
|
158
|
-
</div>
|
|
159
|
-
<div className="space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
160
|
-
<div className="text-3xl">⚡</div>
|
|
161
|
-
<h4 className="text-lg font-semibold !text-white">
|
|
162
|
-
Performance
|
|
163
|
-
</h4>
|
|
164
|
-
<p className="text-sm !text-white/80">
|
|
165
|
-
Optimized SVG rendering with minimal DOM impact
|
|
166
|
-
</p>
|
|
167
|
-
</div>
|
|
168
|
-
</div>
|
|
169
|
-
</div>
|
|
170
|
-
|
|
171
|
-
{/* API Reference */}
|
|
172
|
-
<div className="!space-y-8">
|
|
173
|
-
<h3 className="text-center text-2xl font-bold !text-white">
|
|
174
|
-
API Reference
|
|
175
|
-
</h3>
|
|
176
|
-
|
|
177
|
-
{/* Component Signature */}
|
|
178
|
-
<div className="rounded-lg border border-white/10 bg-white/5 p-6">
|
|
179
|
-
<h4 className="mb-4 text-lg font-semibold !text-purple-300">
|
|
180
|
-
Component Signature
|
|
181
|
-
</h4>
|
|
182
|
-
<div className="rounded-lg bg-black/40 p-4">
|
|
183
|
-
<pre className="text-sm !text-blue-300">
|
|
184
|
-
{`import { SpinnerGradientIcon } from "@/ui/icons/spinner-gradient-icon"
|
|
185
|
-
|
|
186
|
-
<SpinnerGradientIcon className="h-6 w-6 animate-spin" />`}
|
|
187
|
-
</pre>
|
|
188
|
-
</div>
|
|
189
|
-
</div>
|
|
190
|
-
|
|
191
|
-
{/* Props Table */}
|
|
192
|
-
<div className="!space-y-8">
|
|
193
|
-
<h2 className="text-center text-3xl font-bold !text-white">
|
|
194
|
-
Props & Configuration
|
|
195
|
-
</h2>
|
|
196
|
-
|
|
197
|
-
<div className="overflow-hidden rounded-lg border border-white/10 bg-white/5">
|
|
198
|
-
<div className="bg-white/5 p-4">
|
|
199
|
-
<h3 className="text-xl font-semibold !text-white">
|
|
200
|
-
Props
|
|
201
|
-
</h3>
|
|
202
|
-
</div>
|
|
203
|
-
<table className="!my-0 w-full">
|
|
204
|
-
<thead className="bg-white/5">
|
|
205
|
-
<tr className="border-b border-white/10">
|
|
206
|
-
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
207
|
-
Prop
|
|
208
|
-
</th>
|
|
209
|
-
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
210
|
-
Type
|
|
211
|
-
</th>
|
|
212
|
-
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
213
|
-
Default
|
|
214
|
-
</th>
|
|
215
|
-
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
216
|
-
Description
|
|
217
|
-
</th>
|
|
218
|
-
</tr>
|
|
219
|
-
</thead>
|
|
220
|
-
<tbody>
|
|
221
|
-
<tr className="border-b border-white/5">
|
|
222
|
-
<td className="px-6 py-4 font-mono text-sm !text-indigo-300">
|
|
223
|
-
width
|
|
224
|
-
</td>
|
|
225
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
226
|
-
number | string
|
|
227
|
-
</td>
|
|
228
|
-
<td className="px-6 py-4 text-sm !text-white/50">
|
|
229
|
-
16
|
|
230
|
-
</td>
|
|
231
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
232
|
-
Width of the icon in pixels
|
|
233
|
-
</td>
|
|
234
|
-
</tr>
|
|
235
|
-
<tr className="border-b border-white/5 !bg-black/10">
|
|
236
|
-
<td className="px-6 py-4 font-mono text-sm !text-indigo-300">
|
|
237
|
-
height
|
|
238
|
-
</td>
|
|
239
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
240
|
-
number | string
|
|
241
|
-
</td>
|
|
242
|
-
<td className="px-6 py-4 text-sm !text-white/50">
|
|
243
|
-
16
|
|
244
|
-
</td>
|
|
245
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
246
|
-
Height of the icon in pixels
|
|
247
|
-
</td>
|
|
248
|
-
</tr>
|
|
249
|
-
<tr className="!bg-black/10">
|
|
250
|
-
<td className="px-6 py-4 font-mono text-sm !text-indigo-300">
|
|
251
|
-
className
|
|
252
|
-
</td>
|
|
253
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
254
|
-
string
|
|
255
|
-
</td>
|
|
256
|
-
<td className="px-6 py-4 text-sm !text-white/50">
|
|
257
|
-
-
|
|
258
|
-
</td>
|
|
259
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
260
|
-
CSS classes for styling
|
|
261
|
-
</td>
|
|
262
|
-
</tr>
|
|
263
|
-
</tbody>
|
|
264
|
-
</table>
|
|
265
|
-
</div>
|
|
266
|
-
</div>
|
|
267
|
-
{/* Accessibility */}
|
|
268
|
-
<div className="!space-y-8">
|
|
269
|
-
<h2 className="text-center text-3xl font-bold !text-white">
|
|
270
|
-
Accessibility Features
|
|
271
|
-
</h2>
|
|
272
|
-
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
|
|
273
|
-
<div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
274
|
-
<h3 className="text-lg font-semibold !text-green-300">
|
|
275
|
-
✅ Built-in Features
|
|
276
|
-
</h3>
|
|
277
|
-
<ul className="!space-y-2 text-sm !text-white/70">
|
|
278
|
-
<li className="!text-white/70">
|
|
279
|
-
Uses Radix UI AccessibleIcon wrapper
|
|
280
|
-
</li>
|
|
281
|
-
<li className="!text-white/70">
|
|
282
|
-
Provides screen reader label "Spinner Gradient icon"
|
|
283
|
-
</li>
|
|
284
|
-
<li className="!text-white/70">
|
|
285
|
-
Supports keyboard navigation when interactive
|
|
286
|
-
</li>
|
|
287
|
-
<li className="!text-white/70">
|
|
288
|
-
Maintains proper color contrast ratios
|
|
289
|
-
</li>
|
|
290
|
-
<li className="!text-white/70">
|
|
291
|
-
Scales with user's font size preferences
|
|
292
|
-
</li>
|
|
293
|
-
</ul>
|
|
294
|
-
</div>
|
|
295
|
-
|
|
296
|
-
<div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
297
|
-
<h3 className="text-lg font-semibold !text-red-300">
|
|
298
|
-
💡 Best Practices
|
|
299
|
-
</h3>
|
|
300
|
-
<ul className="!space-y-2 text-sm text-white/70">
|
|
301
|
-
<li className="!text-white/70">
|
|
302
|
-
Always pair with descriptive text
|
|
303
|
-
</li>
|
|
304
|
-
<li className="!text-white/70">
|
|
305
|
-
Provide a text fallback for screen readers{" "}
|
|
306
|
-
</li>
|
|
307
|
-
<li className="!text-white/70">
|
|
308
|
-
Ensure sufficient color contrast
|
|
309
|
-
</li>
|
|
310
|
-
<li className="!text-white/70">
|
|
311
|
-
Respect reduced motion user preferences{" "}
|
|
312
|
-
</li>
|
|
313
|
-
<li className="!text-white/70">
|
|
314
|
-
Ensure spinner indicates real loading action{" "}
|
|
315
|
-
</li>
|
|
316
|
-
</ul>
|
|
317
|
-
</div>
|
|
318
|
-
</div>
|
|
319
|
-
|
|
320
|
-
<div className="rounded-lg border border-white/10 bg-white/5 p-6">
|
|
321
|
-
<h3 className="mb-4 text-lg font-semibold !text-purple-300">
|
|
322
|
-
Custom Accessibility Label
|
|
323
|
-
</h3>
|
|
324
|
-
<div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
|
|
325
|
-
<div className="rounded-lg bg-black/40 p-4">
|
|
326
|
-
<pre className="overflow-x-auto text-sm !text-blue-300">
|
|
327
|
-
{`// Custom implementation with specific label
|
|
328
|
-
import { AccessibleIcon } from "@radix-ui/react-accessible-icon"
|
|
329
|
-
|
|
330
|
-
function CustomTrashIcon({ label = "Delete", ...props }) {
|
|
36
|
+
<AuralIconDocsPage
|
|
37
|
+
accentToken="info"
|
|
38
|
+
features={[
|
|
39
|
+
{ title: "Gradient Spin", description: "Conic gradient animation" },
|
|
40
|
+
{ title: "Theme-aware", description: "Adapts to surface tokens" },
|
|
41
|
+
{ title: "Accessible", description: "ARIA-ready by default" },
|
|
42
|
+
]}
|
|
43
|
+
quickStart={{
|
|
44
|
+
codeExample: `import { SpinnerGradientIcon } from "src/ui/icons/spinner-gradient-icon"
|
|
45
|
+
|
|
46
|
+
function LoadingButton() {
|
|
331
47
|
return (
|
|
332
|
-
<
|
|
333
|
-
<
|
|
334
|
-
|
|
48
|
+
<button className="flex items-center gap-2">
|
|
49
|
+
<SpinnerGradientIcon className="h-5 w-5 animate-spin" />
|
|
50
|
+
Loading...
|
|
51
|
+
</button>
|
|
335
52
|
)
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
<
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
<span className="animate-spin text-2xl">⭕</span>
|
|
372
|
-
</div>
|
|
373
|
-
<div>
|
|
374
|
-
<div className="font-medium text-white">
|
|
375
|
-
SpinnerSolid
|
|
376
|
-
</div>
|
|
377
|
-
<div className="text-xs text-white/60">
|
|
378
|
-
Solid fill loading spinner{" "}
|
|
379
|
-
</div>
|
|
380
|
-
</div>
|
|
381
|
-
</div>
|
|
382
|
-
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
383
|
-
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-green-500/20">
|
|
384
|
-
<span className="!text-2xl !text-white">+</span>
|
|
385
|
-
</div>
|
|
386
|
-
<div>
|
|
387
|
-
<div className="font-medium text-white">AddIcon</div>
|
|
388
|
-
<div className="text-xs text-white/60">
|
|
389
|
-
Create operations
|
|
390
|
-
</div>
|
|
391
|
-
</div>
|
|
392
|
-
</div>
|
|
393
|
-
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
394
|
-
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-orange-500/20">
|
|
395
|
-
<span className="text-2xl">📁</span>
|
|
396
|
-
</div>
|
|
397
|
-
<div>
|
|
398
|
-
<div className="font-medium text-white">FolderIcon</div>
|
|
399
|
-
<div className="text-xs text-white/60">
|
|
400
|
-
File management
|
|
401
|
-
</div>
|
|
402
|
-
</div>
|
|
403
|
-
</div>
|
|
404
|
-
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
405
|
-
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-purple-500/20">
|
|
406
|
-
<span className="text-2xl">⚙️</span>
|
|
407
|
-
</div>
|
|
408
|
-
<div>
|
|
409
|
-
<div className="font-medium text-white">
|
|
410
|
-
SettingsIcon
|
|
411
|
-
</div>
|
|
412
|
-
<div className="text-xs text-white/60">
|
|
413
|
-
Configuration
|
|
414
|
-
</div>
|
|
415
|
-
</div>
|
|
416
|
-
</div>
|
|
417
|
-
</div>
|
|
418
|
-
</div>
|
|
419
|
-
{/* Footer */}
|
|
420
|
-
<div className="border-t border-white/10 bg-black/20 backdrop-blur-xl">
|
|
421
|
-
<div className="!mx-auto max-w-7xl px-6 py-8">
|
|
422
|
-
<div className="!space-y-4 text-center">
|
|
423
|
-
<p className="!text-white/60">
|
|
424
|
-
Spinner Gradient icons are part of the Aural UI icon
|
|
425
|
-
library, optimized for accessibility and responsiveness.
|
|
426
|
-
</p>
|
|
427
|
-
<p className="text-sm !text-white/40">
|
|
428
|
-
All icons use Radix UI's AccessibleIcon for screen
|
|
429
|
-
reader compatibility and follow WCAG guidelines.
|
|
430
|
-
</p>
|
|
431
|
-
</div>
|
|
432
|
-
</div>
|
|
433
|
-
</div>
|
|
434
|
-
</div>
|
|
435
|
-
</div>
|
|
436
|
-
</div>
|
|
437
|
-
</>
|
|
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
|
+
<SpinnerGradientIcon className="h-5 w-5 animate-spin" />
|
|
57
|
+
Loading...
|
|
58
|
+
</button>
|
|
59
|
+
),
|
|
60
|
+
}}
|
|
61
|
+
relatedIcons={[
|
|
62
|
+
{
|
|
63
|
+
name: "SpinnerSolidIcon",
|
|
64
|
+
description: "Solid spinner variant",
|
|
65
|
+
icon: SpinnerSolidIcon,
|
|
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: "CircularPlayIcon",
|
|
82
|
+
description: "Circular play button",
|
|
83
|
+
icon: CircularPlayIcon,
|
|
84
|
+
accentToken: "negative",
|
|
85
|
+
},
|
|
86
|
+
]}
|
|
87
|
+
/>
|
|
438
88
|
),
|
|
439
89
|
},
|
|
440
90
|
},
|
|
441
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
|
+
},
|
|
442
110
|
}
|
|
443
111
|
|
|
444
112
|
export default meta
|
|
445
113
|
type Story = StoryObj<typeof SpinnerGradientIcon>
|
|
446
114
|
|
|
447
|
-
// Story parameters for consistent dark theme
|
|
448
|
-
const storyParameters = {
|
|
449
|
-
backgrounds: {
|
|
450
|
-
default: "dark",
|
|
451
|
-
values: [
|
|
452
|
-
{ name: "dark", value: "#0a0a0a" },
|
|
453
|
-
{ name: "darker", value: "#000000" },
|
|
454
|
-
],
|
|
455
|
-
},
|
|
456
|
-
}
|
|
457
|
-
|
|
458
115
|
export const Default: Story = {
|
|
459
116
|
args: {
|
|
460
|
-
width:
|
|
461
|
-
height:
|
|
462
|
-
|
|
117
|
+
width: 54,
|
|
118
|
+
height: 54,
|
|
119
|
+
withAccessibility: true,
|
|
463
120
|
},
|
|
464
|
-
parameters: storyParameters,
|
|
465
121
|
render: (args) => (
|
|
466
|
-
<
|
|
467
|
-
<SpinnerGradientIcon {...args}
|
|
468
|
-
</
|
|
122
|
+
<IconDefaultCanvas>
|
|
123
|
+
<SpinnerGradientIcon {...args} />
|
|
124
|
+
</IconDefaultCanvas>
|
|
469
125
|
),
|
|
470
126
|
}
|
|
471
127
|
|
|
472
128
|
export const SizeVariations: Story = {
|
|
473
|
-
|
|
474
|
-
...storyParameters,
|
|
475
|
-
docs: {
|
|
476
|
-
description: {
|
|
477
|
-
story:
|
|
478
|
-
"SpinnerGradientIcon in different sizes, from small UI elements to large loading states.",
|
|
479
|
-
},
|
|
480
|
-
},
|
|
481
|
-
},
|
|
482
|
-
render: () => (
|
|
483
|
-
<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">
|
|
484
|
-
<div className="text-center">
|
|
485
|
-
<SpinnerGradientIcon className="!mx-auto mb-2 h-3 w-3 animate-spin text-purple-400" />
|
|
486
|
-
<span className="text-xs text-white/60">12px</span>
|
|
487
|
-
</div>
|
|
488
|
-
<div className="text-center">
|
|
489
|
-
<SpinnerGradientIcon className="!mx-auto mb-2 h-4 w-4 animate-spin text-purple-400" />
|
|
490
|
-
<span className="text-xs text-white/60">16px</span>
|
|
491
|
-
</div>
|
|
492
|
-
<div className="text-center">
|
|
493
|
-
<SpinnerGradientIcon className="!mx-auto mb-2 h-5 w-5 animate-spin text-purple-400" />
|
|
494
|
-
<span className="text-xs text-white/60">20px</span>
|
|
495
|
-
</div>
|
|
496
|
-
<div className="text-center">
|
|
497
|
-
<SpinnerGradientIcon className="!mx-auto mb-2 h-6 w-6 animate-spin text-purple-400" />
|
|
498
|
-
<span className="text-xs text-white/60">24px</span>
|
|
499
|
-
</div>
|
|
500
|
-
<div className="text-center">
|
|
501
|
-
<SpinnerGradientIcon className="!mx-auto mb-2 h-8 w-8 animate-spin text-purple-400" />
|
|
502
|
-
<span className="text-xs text-white/60">32px</span>
|
|
503
|
-
</div>
|
|
504
|
-
<div className="text-center">
|
|
505
|
-
<SpinnerGradientIcon className="!mx-auto mb-2 h-12 w-12 animate-spin text-purple-400" />
|
|
506
|
-
<span className="text-xs text-white/60">48px</span>
|
|
507
|
-
</div>
|
|
508
|
-
</div>
|
|
509
|
-
),
|
|
129
|
+
render: () => <IconSizeVariations icon={SpinnerGradientIcon} />,
|
|
510
130
|
}
|
|
511
131
|
|
|
512
132
|
export const ColorVariations: Story = {
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
story:
|
|
518
|
-
"SpinnerGradientIcon in different colors for various contexts and states.",
|
|
519
|
-
},
|
|
520
|
-
},
|
|
521
|
-
},
|
|
133
|
+
render: () => <IconColorVariations icon={SpinnerGradientIcon} />,
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export const AnimatedStates: Story = {
|
|
522
137
|
render: () => (
|
|
523
|
-
<
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
<div className="text-sm font-medium text-white">Info</div>
|
|
543
|
-
<div className="text-xs text-cyan-400">text-cyan-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-gray-500/30 bg-gray-500/20">
|
|
547
|
-
<SpinnerGradientIcon className="h-8 w-8 animate-spin text-gray-400" />
|
|
548
|
-
</div>
|
|
549
|
-
<div className="text-sm font-medium text-white">Muted</div>
|
|
550
|
-
<div className="text-xs text-gray-400">text-gray-400</div>
|
|
551
|
-
</div>
|
|
552
|
-
</div>
|
|
138
|
+
<IconAnimatedStates
|
|
139
|
+
icon={SpinnerGradientIcon}
|
|
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
|
+
/>
|
|
553
157
|
),
|
|
554
158
|
}
|
|
555
159
|
|
|
556
160
|
export const UsageExamples: Story = {
|
|
557
|
-
parameters: {
|
|
558
|
-
...storyParameters,
|
|
559
|
-
docs: {
|
|
560
|
-
description: {
|
|
561
|
-
story:
|
|
562
|
-
"Real-world usage examples showing SpinnerGradientIcon in different UI contexts.",
|
|
563
|
-
},
|
|
564
|
-
},
|
|
565
|
-
},
|
|
566
161
|
render: () => (
|
|
567
|
-
<
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
<SpinnerGradientIcon className="!mx-auto mb-4 h-12 w-12 animate-spin text-purple-400" />
|
|
588
|
-
<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
|
+
<SpinnerGradientIcon className="h-5 w-5 animate-spin" />
|
|
166
|
+
Processing...
|
|
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
|
+
<SpinnerGradientIcon className="h-8 w-8 animate-spin" />
|
|
174
|
+
<div>
|
|
175
|
+
<div className="text-fm-primary font-fm-text text-sm font-medium">
|
|
176
|
+
Fetching results
|
|
177
|
+
</div>
|
|
178
|
+
<div className="text-fm-secondary font-fm-text text-xs">
|
|
179
|
+
This may take a moment...
|
|
180
|
+
</div>
|
|
181
|
+
</div>
|
|
589
182
|
</div>
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
<div className="!space-y-2">
|
|
595
|
-
<h3 className="text-sm font-medium text-white">Form Loading</h3>
|
|
596
|
-
<div className="rounded-lg border border-white/10 bg-white/5 p-4">
|
|
597
|
-
<div className="mb-4">
|
|
598
|
-
<label className="mb-2 block text-sm text-white/60">Email</label>
|
|
599
|
-
<input
|
|
600
|
-
type="email"
|
|
601
|
-
className="w-full rounded-lg border border-white/20 bg-white/10 px-4 py-2 text-white placeholder-white/50"
|
|
602
|
-
placeholder="Enter your email"
|
|
603
|
-
/>
|
|
183
|
+
<div className="bg-fm-divider-secondary h-px w-full" />
|
|
184
|
+
<div className="space-y-2">
|
|
185
|
+
<div className="bg-fm-surface-secondary h-3 w-3/4 animate-pulse rounded-full" />
|
|
186
|
+
<div className="bg-fm-surface-secondary h-3 w-1/2 animate-pulse rounded-full" />
|
|
604
187
|
</div>
|
|
605
|
-
<button className="flex w-full items-center justify-center gap-2 rounded-lg bg-purple-500/20 px-4 py-2 text-purple-200">
|
|
606
|
-
<SpinnerGradientIcon className="h-4 w-4 animate-spin" />
|
|
607
|
-
Submitting...
|
|
608
|
-
</button>
|
|
609
188
|
</div>
|
|
610
|
-
</
|
|
611
|
-
|
|
189
|
+
</IconUsageSection>
|
|
190
|
+
|
|
191
|
+
<IconUsageSection title="Inline Loading">
|
|
192
|
+
<div className="border-fm-divider-secondary bg-fm-surface-secondary flex w-full max-w-sm items-center gap-3 rounded-xl border px-4 py-3">
|
|
193
|
+
<SpinnerGradientIcon className="h-5 w-5 shrink-0 animate-spin" />
|
|
194
|
+
<span className="text-fm-secondary font-fm-text text-sm">
|
|
195
|
+
Saving changes...
|
|
196
|
+
</span>
|
|
197
|
+
</div>
|
|
198
|
+
</IconUsageSection>
|
|
199
|
+
</IconUsageCanvas>
|
|
612
200
|
),
|
|
613
201
|
}
|
|
614
202
|
|
|
615
203
|
export const Playground: Story = {
|
|
616
|
-
parameters: {
|
|
617
|
-
...storyParameters,
|
|
618
|
-
docs: {
|
|
619
|
-
description: {
|
|
620
|
-
story:
|
|
621
|
-
"Interactive playground to experiment with different SpinnerGradientIcon configurations.",
|
|
622
|
-
},
|
|
623
|
-
},
|
|
624
|
-
},
|
|
625
204
|
args: {
|
|
626
|
-
width:
|
|
627
|
-
height:
|
|
628
|
-
|
|
205
|
+
width: 54,
|
|
206
|
+
height: 54,
|
|
207
|
+
withAccessibility: true,
|
|
208
|
+
className: "animate-spin",
|
|
629
209
|
},
|
|
630
210
|
render: (args) => (
|
|
631
|
-
<
|
|
632
|
-
<
|
|
633
|
-
|
|
634
|
-
</div>
|
|
635
|
-
</div>
|
|
211
|
+
<IconPlaygroundCanvas>
|
|
212
|
+
<SpinnerGradientIcon {...args} />
|
|
213
|
+
</IconPlaygroundCanvas>
|
|
636
214
|
),
|
|
637
215
|
}
|