aural-ui 4.0.1 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/aspect-ratio/AspectRatio.stories.tsx +290 -1228
- package/dist/components/avatar/Avatar.stories.tsx +219 -235
- 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/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 -636
- 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 +530 -867
- package/dist/components/dialog/Dialog.stories.tsx +501 -950
- package/dist/components/divider/Divider.stories.tsx +264 -527
- package/dist/components/dot-loader/DotLoader.stories.tsx +256 -257
- package/dist/components/drawer/Drawer.stories.tsx +659 -1023
- package/dist/components/dropdown/Dropdown.stories.tsx +643 -1028
- 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 -1254
- 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 +484 -835
- package/dist/components/marquee/Marquee.stories.tsx +356 -712
- package/dist/components/otp-inputs/OtpInputs.stories.tsx +352 -422
- package/dist/components/overlay/Overlay.stories.tsx +452 -824
- package/dist/components/pagination/Pagination.stories.tsx +721 -210
- package/dist/components/popover/Popover.stories.tsx +481 -896
- package/dist/components/radio/Radio.stories.tsx +432 -124
- package/dist/components/resizable/Resizable.stories.tsx +495 -799
- package/dist/components/scroll-area/ScrollArea.stories.tsx +383 -1059
- package/dist/components/search/Search.stories.tsx +312 -595
- package/dist/components/select/Select.stories.tsx +684 -789
- package/dist/components/sheet/Sheet.stories.tsx +671 -950
- package/dist/components/skelton/Skelton.stories.tsx +230 -764
- package/dist/components/slider/Slider.stories.tsx +383 -760
- 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 -916
- package/dist/components/tabs/Tabs.stories.tsx +458 -1455
- 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 -154
- package/dist/components/toast/Toast.stories.tsx +452 -1339
- package/dist/components/toggle/Toggle.stories.tsx +488 -931
- package/dist/components/tooltip/Tooltip.stories.tsx +344 -1388
- 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 +223 -1060
- package/dist/icons/alert-icon/AlertIcon.stories.tsx +106 -968
- package/dist/icons/all-icons.tsx +37 -16
- package/dist/icons/angle-down-icon/AngleDownIcon.stories.tsx +137 -1010
- package/dist/icons/apple-logo-icon/AppleLogoIcon.stories.tsx +145 -935
- package/dist/icons/arrow-box-left-icon/ArrowBoxLeftIcon.stories.tsx +132 -1046
- package/dist/icons/arrow-corner-up-left-icon/ArrowCornerUpLeftIcon.stories.tsx +134 -986
- package/dist/icons/arrow-corner-up-right-icon/ArrowCornerUpRightIcon.stories.tsx +135 -1028
- package/dist/icons/arrow-left-icon/ArrowLeftIcon.stories.tsx +133 -971
- package/dist/icons/arrow-right-icon/ArrowRightIcon.stories.tsx +145 -1123
- package/dist/icons/arrow-right-up-icon/ArrowRightUpIcon.stories.tsx +143 -1252
- package/dist/icons/art-board-icon/ArtBoardIcon.stories.tsx +123 -632
- package/dist/icons/audio-bar-icon/AudioBarIcon.stories.tsx +141 -1223
- package/dist/icons/backward-ten-seconds-icon/BackwardTenSecondsIcon.stories.tsx +164 -1018
- package/dist/icons/bubble-check-icon/BubbleCheckIcon.stories.tsx +121 -1236
- package/dist/icons/bubble-crossed-icon/BubbleCrossedIcon.stories.tsx +121 -1213
- package/dist/icons/bubble-sparkle-icon/BubbleSparkleIcon.stories.tsx +116 -893
- package/dist/icons/camera-icon/CameraIcon.stories.tsx +109 -1254
- package/dist/icons/capital-a-letter-icon/CapitalALetterIcon.stories.tsx +114 -975
- package/dist/icons/chevron-double-left-icon/ChevronDoubleLeftIcon.stories.tsx +157 -994
- package/dist/icons/chevron-double-right-icon/ChevronDoubleRightIcon.stories.tsx +160 -992
- package/dist/icons/chevron-down-icon/ChevronDownIcon.stories.tsx +140 -970
- package/dist/icons/chevron-left-icon/ChevronLeftIcon.stories.tsx +126 -993
- package/dist/icons/chevron-right-icon/ChevronRightIcon.stories.tsx +144 -987
- package/dist/icons/chevron-up-icon/ChevronUpIcon.stories.tsx +141 -1007
- package/dist/icons/circle-tick-icon/CircleTickIcon.stories.tsx +147 -1187
- package/dist/icons/circular-play-icon/CircularPlayIcon.stories.tsx +110 -476
- package/dist/icons/coin-icon/CoinIcon.stories.tsx +120 -1364
- package/dist/icons/coin-toons-icon/CoinToonsIcon.stories.tsx +113 -1360
- package/dist/icons/column-wide-add-icon/ColumnWideAddIcon.stories.tsx +111 -942
- package/dist/icons/command-icon/CommandIcon.stories.tsx +124 -1087
- package/dist/icons/copy-icon/CopyIcon.stories.tsx +119 -996
- package/dist/icons/cross-circle-icon/CrossCircleIcon.stories.tsx +144 -1046
- package/dist/icons/cross-icon/CrossIcon.stories.tsx +136 -999
- package/dist/icons/download-icon/DownloadIcon.stories.tsx +123 -857
- package/dist/icons/edit-big-icon/EditBigIcon.stories.tsx +121 -1080
- package/dist/icons/email-icon/EmailIcon.stories.tsx +112 -979
- package/dist/icons/expand-icon/ExpandIcon.stories.tsx +109 -1146
- package/dist/icons/eye-close-icon/EyeCloseIcon.stories.tsx +141 -1068
- package/dist/icons/eye-open-icon/EyeOpenIcon.stories.tsx +140 -1081
- package/dist/icons/feature-shine-icon/FeatureShineIcon.stories.tsx +124 -1050
- package/dist/icons/file-chart-icon/FileChartIcon.stories.tsx +123 -1091
- package/dist/icons/file-text-icon/FileTextIcon.stories.tsx +122 -633
- package/dist/icons/filter-bar-row-icon/FilterBarRowIcon.stories.tsx +116 -1087
- package/dist/icons/forward-ten-seconds-icon/ForwardTenSecondsIcon.stories.tsx +166 -1020
- package/dist/icons/git-branch-icon/GitBranchIcon.stories.tsx +112 -1182
- package/dist/icons/git-fork-icon/GitForkIcon.stories.tsx +112 -1155
- package/dist/icons/globe-icon/GlobeIcon.stories.tsx +127 -325
- package/dist/icons/google-logo-icon/GoogleLogoIcon.stories.tsx +142 -985
- package/dist/icons/grip-vertical-icon/GripVerticalIcon.stories.tsx +116 -1217
- package/dist/icons/head-icon/HeadIcon.stories.tsx +108 -953
- package/dist/icons/heart-icon/HeartIcon.stories.tsx +117 -1060
- package/dist/icons/image-avatar-sparkle-icon/ImageAvatarSparkleIcon.stories.tsx +116 -716
- package/dist/icons/image-icon/ImageIcon.stories.tsx +102 -1164
- package/dist/icons/import-folder-icon/ImportFolderIcon.stories.tsx +108 -1233
- package/dist/icons/import-left-arrow-folder-icon/ImportLeftArrowFolderIcon.stories.tsx +133 -1289
- package/dist/icons/indian-flag-icon/IndianFlagIcon.stories.tsx +155 -1012
- package/dist/icons/instagram-icon/InstagramIcon.stories.tsx +158 -1438
- package/dist/icons/layout-column-icon/LayoutColumnIcon.stories.tsx +121 -1011
- package/dist/icons/layout-left-icon/LayoutLeftIcon.stories.tsx +116 -981
- package/dist/icons/layout-right-icon/LayoutRightIcon.stories.tsx +116 -979
- package/dist/icons/light-bulb-simple-icon/LightBulbSimpleIcon.stories.tsx +105 -1252
- package/dist/icons/linked-in-icon/LinkedInIcon.stories.tsx +151 -1554
- package/dist/icons/magic-book-icon/MagicBookIcon.stories.tsx +107 -1227
- package/dist/icons/magic-edit-icon/MagicEditIcon.stories.tsx +116 -707
- package/dist/icons/maintenance-icon/MaintenanceIcon.stories.tsx +119 -1226
- package/dist/icons/message-icon/MessageIcon.stories.tsx +111 -557
- package/dist/icons/minimize-icon/MinimizeIcon.stories.tsx +112 -1198
- package/dist/icons/moon-icon/MoonIcon.stories.tsx +117 -557
- package/dist/icons/move-horizontal-icon/MoveHorizontalIcon.stories.tsx +106 -1235
- package/dist/icons/move-vertical-icon/MoveVerticalIcon.stories.tsx +112 -1185
- package/dist/icons/musical-note-icon/MusicalNoteIcon.stories.tsx +116 -1012
- package/dist/icons/notepad-icon/NotepadIcon.stories.tsx +108 -1137
- package/dist/icons/notes-icon/NotesIcon.stories.tsx +116 -1138
- package/dist/icons/page-search-icon/PageSearchIcon.stories.tsx +106 -1146
- package/dist/icons/page-text-icon/PageTextIcon.stories.tsx +119 -719
- package/dist/icons/paint-roll-icon/PaintRollIcon.stories.tsx +110 -999
- package/dist/icons/paper-plane-icon/PaperPlaneIcon.stories.tsx +109 -912
- package/dist/icons/pause-icon/PauseIcon.stories.tsx +110 -1041
- package/dist/icons/pencil-icon/PencilIcon.stories.tsx +112 -1109
- package/dist/icons/phone-icon/PhoneIcon.stories.tsx +112 -1023
- package/dist/icons/plus-icon/PlusIcon.stories.tsx +103 -1132
- package/dist/icons/pocket-studio-icon/PocketStudioIcon.stories.tsx +104 -870
- package/dist/icons/scroll-down-icon/ScrollDownIcon.stories.tsx +99 -476
- package/dist/icons/search-icon/SearchIcon.stories.tsx +108 -1161
- package/dist/icons/setting-icon/SettingIcon.stories.tsx +104 -1009
- package/dist/icons/share-icon/ShareIcon.stories.tsx +117 -1064
- package/dist/icons/shield-icon/ShieldIcon.stories.tsx +114 -974
- package/dist/icons/site-logo-icon/SiteLogoIcon.stories.tsx +134 -1160
- package/dist/icons/skip-backward-icon/SkipBackwardIcon.stories.tsx +169 -1017
- package/dist/icons/skip-forward-icon/SkipForwardIcon.stories.tsx +161 -1016
- package/dist/icons/sparkles-soft-icon/SparklesSoftIcon.stories.tsx +102 -1001
- package/dist/icons/spinner-gradient-icon/SpinnerGradientIcon.stories.tsx +155 -593
- package/dist/icons/spinner-solid-icon/SpinnerSolidIcon.stories.tsx +155 -608
- package/dist/icons/spinner-solid-neutral-icon/SpinnerSolidINeutralcon.stories.tsx +142 -712
- package/dist/icons/star-icon/StarIcon.stories.tsx +120 -946
- package/dist/icons/store-coin-icon/StoreCoinIcon.stories.tsx +109 -1013
- package/dist/icons/suggestion-icon/SuggestionIcon.stories.tsx +113 -891
- package/dist/icons/sun-icon/SunIcon.stories.tsx +117 -864
- package/dist/icons/text-color-icon/TextColorIcon.stories.tsx +113 -989
- package/dist/icons/text-indicator-icon/TextIndicatorIcon.stories.tsx +120 -1027
- package/dist/icons/threads-icon/ThreadsIcon.stories.tsx +153 -1476
- package/dist/icons/tick-circle-icon/TickCircleIcon.stories.tsx +143 -1187
- package/dist/icons/tick-icon/TickIcon.stories.tsx +142 -1322
- package/dist/icons/trash-icon/TrashIcon.stories.tsx +105 -970
- package/dist/icons/twitter-x-icon/TwitterXIcon.stories.tsx +154 -1457
- package/dist/icons/upload-icon/UploadIcon.stories.tsx +112 -930
- package/dist/icons/vertical-menu-icon/VerticalMenuIcon.stories.tsx +115 -1019
- package/dist/icons/video-play-list-icon/VideoPlaylistIcon.stories.tsx +122 -1092
- package/dist/icons/voice-playing-icon/VoicePlayingIcon.stories.tsx +120 -1401
- package/dist/icons/volume-full-icon/VolumeFullIcon.stories.tsx +107 -1212
- package/dist/icons/volume-half-icon/VolumeHalfIcon.stories.tsx +109 -1122
- package/dist/icons/volume-off-icon/VolumeOffIcon.stories.tsx +112 -1124
- package/dist/icons/warning-icon/WarningIcon.stories.tsx +119 -1083
- package/dist/icons/youtube-icon/YoutubeIcon.stories.tsx +158 -983
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- 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> = {
|
|
@@ -18,636 +33,183 @@ const meta: Meta<typeof SpinnerGradientIcon> = {
|
|
|
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: var(--color-fm-surface-primary) !important;
|
|
44
|
-
}
|
|
45
|
-
#storybook-docs {
|
|
46
|
-
background: var(--color-fm-surface-primary) !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: var(--color-fm-icon-active) !important;
|
|
54
|
-
}
|
|
55
|
-
.sbdocs-p, .sbdocs-li {
|
|
56
|
-
color: var(--color-fm-secondary) !important;
|
|
57
|
-
}
|
|
58
|
-
.sbdocs-code {
|
|
59
|
-
background: var(--color-fm-surface-secondary) !important;
|
|
60
|
-
color: var(--color-fm-secondary-500) !important;
|
|
61
|
-
border: 1px solid var(--color-fm-divider-secondary) !important;
|
|
62
|
-
}
|
|
63
|
-
.sbdocs-pre {
|
|
64
|
-
background: var(--color-fm-surface-secondary) !important;
|
|
65
|
-
border: 1px solid var(--color-fm-divider-secondary) !important;
|
|
66
|
-
}
|
|
67
|
-
.sbdocs-table {
|
|
68
|
-
background: var(--color-fm-surface-secondary) !important;
|
|
69
|
-
border: 1px solid var(--color-fm-divider-secondary) !important;
|
|
70
|
-
}
|
|
71
|
-
.sbdocs-table th {
|
|
72
|
-
background: var(--color-fm-surface-secondary) !important;
|
|
73
|
-
color: var(--color-fm-icon-active) !important;
|
|
74
|
-
border-bottom: 1px solid var(--color-fm-divider-secondary) !important;
|
|
75
|
-
}
|
|
76
|
-
.sbdocs-table td {
|
|
77
|
-
color: var(--color-fm-secondary) !important;
|
|
78
|
-
border-bottom: 1px solid var(--color-fm-divider-tertiary) !important;
|
|
79
|
-
}
|
|
80
|
-
`}
|
|
81
|
-
</style>
|
|
82
|
-
|
|
83
|
-
<div className="bg-fm-surface-primary min-h-screen">
|
|
84
|
-
{/* Header */}
|
|
85
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary relative overflow-hidden border-b backdrop-blur-xl">
|
|
86
|
-
<div className="from-fm-secondary-500/10 to-fm-icon-info/10 absolute inset-0 bg-linear-to-r via-transparent" />
|
|
87
|
-
<div className="relative !mx-auto max-w-7xl px-6 py-16">
|
|
88
|
-
<div className="!space-y-6 text-center">
|
|
89
|
-
<div className="border-fm-secondary-500/30 from-fm-secondary-500/20 to-fm-icon-info/20 !mx-auto flex h-24 w-24 items-center justify-center rounded-2xl border bg-linear-to-br">
|
|
90
|
-
<SpinnerGradientIcon className="text-fm-secondary-600 h-12 w-12" />
|
|
91
|
-
</div>
|
|
92
|
-
<h1 className="text-fm-icon-active!">SpinnerGradientIcon</h1>
|
|
93
|
-
<p className="text-fm-icon-active! !mx-auto max-w-3xl text-xl leading-relaxed">
|
|
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-fm-secondary-600 text-3xl font-bold">
|
|
104
|
-
Smooth
|
|
105
|
-
</div>
|
|
106
|
-
<div className="text-fm-icon-active/80 text-sm">
|
|
107
|
-
Gradient Animation
|
|
108
|
-
</div>
|
|
109
|
-
</div>
|
|
110
|
-
<div className="bg-fm-divider-primary h-8 w-px" />
|
|
111
|
-
<div className="text-center">
|
|
112
|
-
<div className="text-fm-icon-info text-3xl font-bold">
|
|
113
|
-
Accessible
|
|
114
|
-
</div>
|
|
115
|
-
<div className="text-fm-icon-active/80 text-sm">
|
|
116
|
-
Screen Reader Ready
|
|
117
|
-
</div>
|
|
118
|
-
</div>
|
|
119
|
-
<div className="bg-fm-divider-primary h-8 w-px" />
|
|
120
|
-
<div className="text-center">
|
|
121
|
-
<div className="text-fm-icon-positive text-3xl font-bold">
|
|
122
|
-
Customizable
|
|
123
|
-
</div>
|
|
124
|
-
<div className="text-fm-icon-active/80 text-sm">
|
|
125
|
-
Size & Colors
|
|
126
|
-
</div>
|
|
127
|
-
</div>
|
|
128
|
-
</div>
|
|
129
|
-
</div>
|
|
130
|
-
</div>
|
|
131
|
-
</div>
|
|
132
|
-
|
|
133
|
-
{/* Content */}
|
|
134
|
-
<div className="!mx-auto max-w-7xl !space-y-16 px-6 py-12">
|
|
135
|
-
{/* Features */}
|
|
136
|
-
<div className="!space-y-8">
|
|
137
|
-
<h3 className="text-fm-icon-active! text-center text-2xl font-bold">
|
|
138
|
-
Key Features
|
|
139
|
-
</h3>
|
|
140
|
-
<div className="grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3">
|
|
141
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary space-y-4 rounded-lg border p-6">
|
|
142
|
-
<div className="text-3xl">🎨</div>
|
|
143
|
-
<h4 className="text-fm-icon-active! text-lg font-semibold">
|
|
144
|
-
Gradient Animation
|
|
145
|
-
</h4>
|
|
146
|
-
<p className="text-fm-icon-active!/80 text-sm">
|
|
147
|
-
Smooth color transitions between primary, secondary, and
|
|
148
|
-
neutral colors
|
|
149
|
-
</p>
|
|
150
|
-
</div>
|
|
151
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary space-y-4 rounded-lg border p-6">
|
|
152
|
-
<div className="text-3xl">♿</div>
|
|
153
|
-
<h4 className="text-fm-icon-active! text-lg font-semibold">
|
|
154
|
-
Accessibility
|
|
155
|
-
</h4>
|
|
156
|
-
<p className="text-fm-icon-active!/80 text-sm">
|
|
157
|
-
Built with Radix UI's AccessibleIcon for screen reader
|
|
158
|
-
support
|
|
159
|
-
</p>
|
|
160
|
-
</div>
|
|
161
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary space-y-4 rounded-lg border p-6">
|
|
162
|
-
<div className="text-3xl">⚡</div>
|
|
163
|
-
<h4 className="text-fm-icon-active! text-lg font-semibold">
|
|
164
|
-
Performance
|
|
165
|
-
</h4>
|
|
166
|
-
<p className="text-fm-icon-active!/80 text-sm">
|
|
167
|
-
Optimized SVG rendering with minimal DOM impact
|
|
168
|
-
</p>
|
|
169
|
-
</div>
|
|
170
|
-
</div>
|
|
171
|
-
</div>
|
|
172
|
-
|
|
173
|
-
{/* API Reference */}
|
|
174
|
-
<div className="!space-y-8">
|
|
175
|
-
<h3 className="text-fm-icon-active! text-center text-2xl font-bold">
|
|
176
|
-
API Reference
|
|
177
|
-
</h3>
|
|
178
|
-
|
|
179
|
-
{/* Component Signature */}
|
|
180
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-6">
|
|
181
|
-
<h4 className="text-fm-secondary-600! mb-4 text-lg font-semibold">
|
|
182
|
-
Component Signature
|
|
183
|
-
</h4>
|
|
184
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
185
|
-
<pre className="text-fm-icon-info! text-sm">
|
|
186
|
-
{`import { SpinnerGradientIcon } from "@/ui/icons/spinner-gradient-icon"
|
|
187
|
-
|
|
188
|
-
<SpinnerGradientIcon className="h-6 w-6 animate-spin" />`}
|
|
189
|
-
</pre>
|
|
190
|
-
</div>
|
|
191
|
-
</div>
|
|
192
|
-
|
|
193
|
-
{/* Props Table */}
|
|
194
|
-
<div className="!space-y-8">
|
|
195
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
196
|
-
Props & Configuration
|
|
197
|
-
</h2>
|
|
198
|
-
|
|
199
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary overflow-hidden rounded-lg border">
|
|
200
|
-
<div className="bg-fm-surface-secondary p-4">
|
|
201
|
-
<h3 className="text-fm-icon-active! text-xl font-semibold">
|
|
202
|
-
Props
|
|
203
|
-
</h3>
|
|
204
|
-
</div>
|
|
205
|
-
<table className="!my-0 w-full">
|
|
206
|
-
<thead className="bg-fm-surface-secondary">
|
|
207
|
-
<tr className="border-fm-divider-secondary border-b">
|
|
208
|
-
<th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
|
|
209
|
-
Prop
|
|
210
|
-
</th>
|
|
211
|
-
<th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
|
|
212
|
-
Type
|
|
213
|
-
</th>
|
|
214
|
-
<th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
|
|
215
|
-
Default
|
|
216
|
-
</th>
|
|
217
|
-
<th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
|
|
218
|
-
Description
|
|
219
|
-
</th>
|
|
220
|
-
</tr>
|
|
221
|
-
</thead>
|
|
222
|
-
<tbody>
|
|
223
|
-
<tr className="border-fm-divider-tertiary border-b">
|
|
224
|
-
<td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
|
|
225
|
-
width
|
|
226
|
-
</td>
|
|
227
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
228
|
-
number | string
|
|
229
|
-
</td>
|
|
230
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
231
|
-
16
|
|
232
|
-
</td>
|
|
233
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
234
|
-
Width of the icon in pixels
|
|
235
|
-
</td>
|
|
236
|
-
</tr>
|
|
237
|
-
<tr className="border-fm-divider-tertiary bg-fm-surface-secondary! border-b">
|
|
238
|
-
<td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
|
|
239
|
-
height
|
|
240
|
-
</td>
|
|
241
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
242
|
-
number | string
|
|
243
|
-
</td>
|
|
244
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
245
|
-
16
|
|
246
|
-
</td>
|
|
247
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
248
|
-
Height of the icon in pixels
|
|
249
|
-
</td>
|
|
250
|
-
</tr>
|
|
251
|
-
<tr className="bg-fm-surface-secondary!">
|
|
252
|
-
<td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
|
|
253
|
-
className
|
|
254
|
-
</td>
|
|
255
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
256
|
-
string
|
|
257
|
-
</td>
|
|
258
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
259
|
-
-
|
|
260
|
-
</td>
|
|
261
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
262
|
-
CSS classes for styling
|
|
263
|
-
</td>
|
|
264
|
-
</tr>
|
|
265
|
-
</tbody>
|
|
266
|
-
</table>
|
|
267
|
-
</div>
|
|
268
|
-
</div>
|
|
269
|
-
{/* Accessibility */}
|
|
270
|
-
<div className="!space-y-8">
|
|
271
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
272
|
-
Accessibility Features
|
|
273
|
-
</h2>
|
|
274
|
-
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
|
|
275
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
|
|
276
|
-
<h3 className="text-fm-icon-positive! text-lg font-semibold">
|
|
277
|
-
✅ Built-in Features
|
|
278
|
-
</h3>
|
|
279
|
-
<ul className="text-fm-secondary! !space-y-2 text-sm">
|
|
280
|
-
<li className="text-fm-secondary!">
|
|
281
|
-
Uses Radix UI AccessibleIcon wrapper
|
|
282
|
-
</li>
|
|
283
|
-
<li className="text-fm-secondary!">
|
|
284
|
-
Provides screen reader label "Spinner Gradient icon"
|
|
285
|
-
</li>
|
|
286
|
-
<li className="text-fm-secondary!">
|
|
287
|
-
Supports keyboard navigation when interactive
|
|
288
|
-
</li>
|
|
289
|
-
<li className="text-fm-secondary!">
|
|
290
|
-
Maintains proper color contrast ratios
|
|
291
|
-
</li>
|
|
292
|
-
<li className="text-fm-secondary!">
|
|
293
|
-
Scales with user's font size preferences
|
|
294
|
-
</li>
|
|
295
|
-
</ul>
|
|
296
|
-
</div>
|
|
297
|
-
|
|
298
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
|
|
299
|
-
<h3 className="text-fm-icon-negative! text-lg font-semibold">
|
|
300
|
-
💡 Best Practices
|
|
301
|
-
</h3>
|
|
302
|
-
<ul className="text-fm-secondary !space-y-2 text-sm">
|
|
303
|
-
<li className="text-fm-secondary!">
|
|
304
|
-
Always pair with descriptive text
|
|
305
|
-
</li>
|
|
306
|
-
<li className="text-fm-secondary!">
|
|
307
|
-
Provide a text fallback for screen readers{" "}
|
|
308
|
-
</li>
|
|
309
|
-
<li className="text-fm-secondary!">
|
|
310
|
-
Ensure sufficient color contrast
|
|
311
|
-
</li>
|
|
312
|
-
<li className="text-fm-secondary!">
|
|
313
|
-
Respect reduced motion user preferences{" "}
|
|
314
|
-
</li>
|
|
315
|
-
<li className="text-fm-secondary!">
|
|
316
|
-
Ensure spinner indicates real loading action{" "}
|
|
317
|
-
</li>
|
|
318
|
-
</ul>
|
|
319
|
-
</div>
|
|
320
|
-
</div>
|
|
321
|
-
|
|
322
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-6">
|
|
323
|
-
<h3 className="text-fm-secondary-600! mb-4 text-lg font-semibold">
|
|
324
|
-
Custom Accessibility Label
|
|
325
|
-
</h3>
|
|
326
|
-
<div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
|
|
327
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
328
|
-
<pre className="text-fm-icon-info! overflow-x-auto text-sm">
|
|
329
|
-
{`// Custom implementation with specific label
|
|
330
|
-
import { AccessibleIcon } from "@radix-ui/react-accessible-icon"
|
|
331
|
-
|
|
332
|
-
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() {
|
|
333
47
|
return (
|
|
334
|
-
<
|
|
335
|
-
<
|
|
336
|
-
|
|
48
|
+
<button className="flex items-center gap-2">
|
|
49
|
+
<SpinnerGradientIcon className="h-5 w-5 animate-spin" />
|
|
50
|
+
Loading...
|
|
51
|
+
</button>
|
|
337
52
|
)
|
|
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
|
-
|
|
372
|
-
|
|
373
|
-
<span className="animate-spin text-2xl">⭕</span>
|
|
374
|
-
</div>
|
|
375
|
-
<div>
|
|
376
|
-
<div className="text-fm-icon-active font-medium">
|
|
377
|
-
SpinnerSolid
|
|
378
|
-
</div>
|
|
379
|
-
<div className="text-fm-tertiary text-xs">
|
|
380
|
-
Solid fill loading spinner{" "}
|
|
381
|
-
</div>
|
|
382
|
-
</div>
|
|
383
|
-
</div>
|
|
384
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
|
|
385
|
-
<div className="bg-fm-icon-positive/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
|
|
386
|
-
<span className="text-fm-icon-active! !text-2xl">
|
|
387
|
-
+
|
|
388
|
-
</span>
|
|
389
|
-
</div>
|
|
390
|
-
<div>
|
|
391
|
-
<div className="text-fm-icon-active font-medium">
|
|
392
|
-
AddIcon
|
|
393
|
-
</div>
|
|
394
|
-
<div className="text-fm-tertiary text-xs">
|
|
395
|
-
Create operations
|
|
396
|
-
</div>
|
|
397
|
-
</div>
|
|
398
|
-
</div>
|
|
399
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
|
|
400
|
-
<div className="bg-fm-icon-warning/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
|
|
401
|
-
<span className="text-2xl">📁</span>
|
|
402
|
-
</div>
|
|
403
|
-
<div>
|
|
404
|
-
<div className="text-fm-icon-active font-medium">
|
|
405
|
-
FolderIcon
|
|
406
|
-
</div>
|
|
407
|
-
<div className="text-fm-tertiary text-xs">
|
|
408
|
-
File management
|
|
409
|
-
</div>
|
|
410
|
-
</div>
|
|
411
|
-
</div>
|
|
412
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
|
|
413
|
-
<div className="bg-fm-secondary-500/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
|
|
414
|
-
<span className="text-2xl">⚙️</span>
|
|
415
|
-
</div>
|
|
416
|
-
<div>
|
|
417
|
-
<div className="text-fm-icon-active font-medium">
|
|
418
|
-
SettingsIcon
|
|
419
|
-
</div>
|
|
420
|
-
<div className="text-fm-tertiary text-xs">
|
|
421
|
-
Configuration
|
|
422
|
-
</div>
|
|
423
|
-
</div>
|
|
424
|
-
</div>
|
|
425
|
-
</div>
|
|
426
|
-
</div>
|
|
427
|
-
{/* Footer */}
|
|
428
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary border-t backdrop-blur-xl">
|
|
429
|
-
<div className="!mx-auto max-w-7xl px-6 py-8">
|
|
430
|
-
<div className="!space-y-4 text-center">
|
|
431
|
-
<p className="text-fm-tertiary!">
|
|
432
|
-
Spinner Gradient icons are part of the Aural UI icon
|
|
433
|
-
library, optimized for accessibility and responsiveness.
|
|
434
|
-
</p>
|
|
435
|
-
<p className="text-fm-placeholder! text-sm">
|
|
436
|
-
All icons use Radix UI's AccessibleIcon for screen
|
|
437
|
-
reader compatibility and follow WCAG guidelines.
|
|
438
|
-
</p>
|
|
439
|
-
</div>
|
|
440
|
-
</div>
|
|
441
|
-
</div>
|
|
442
|
-
</div>
|
|
443
|
-
</div>
|
|
444
|
-
</div>
|
|
445
|
-
</>
|
|
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
|
+
/>
|
|
446
88
|
),
|
|
447
89
|
},
|
|
448
90
|
},
|
|
449
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
|
+
},
|
|
450
110
|
}
|
|
451
111
|
|
|
452
112
|
export default meta
|
|
453
113
|
type Story = StoryObj<typeof SpinnerGradientIcon>
|
|
454
114
|
|
|
455
|
-
// Story parameters for consistent dark theme
|
|
456
|
-
const storyParameters = {
|
|
457
|
-
backgrounds: {
|
|
458
|
-
default: "dark",
|
|
459
|
-
values: [
|
|
460
|
-
{ name: "dark", value: "var(--color-fm-surface-primary)" },
|
|
461
|
-
{ name: "darker", value: "var(--color-fm-neutral-0)" },
|
|
462
|
-
],
|
|
463
|
-
},
|
|
464
|
-
}
|
|
465
|
-
|
|
466
115
|
export const Default: Story = {
|
|
467
116
|
args: {
|
|
468
|
-
width:
|
|
469
|
-
height:
|
|
470
|
-
|
|
117
|
+
width: 54,
|
|
118
|
+
height: 54,
|
|
119
|
+
withAccessibility: true,
|
|
471
120
|
},
|
|
472
|
-
parameters: storyParameters,
|
|
473
121
|
render: (args) => (
|
|
474
|
-
<
|
|
475
|
-
<SpinnerGradientIcon {...args}
|
|
476
|
-
</
|
|
122
|
+
<IconDefaultCanvas>
|
|
123
|
+
<SpinnerGradientIcon {...args} />
|
|
124
|
+
</IconDefaultCanvas>
|
|
477
125
|
),
|
|
478
126
|
}
|
|
479
127
|
|
|
480
128
|
export const SizeVariations: Story = {
|
|
481
|
-
|
|
482
|
-
...storyParameters,
|
|
483
|
-
docs: {
|
|
484
|
-
description: {
|
|
485
|
-
story:
|
|
486
|
-
"SpinnerGradientIcon in different sizes, from small UI elements to large loading states.",
|
|
487
|
-
},
|
|
488
|
-
},
|
|
489
|
-
},
|
|
490
|
-
render: () => (
|
|
491
|
-
<div className="from-fm-surface-primary to-fm-surface-secondary flex h-64 min-h-dvh items-center justify-center gap-8 rounded-lg bg-linear-to-br p-8">
|
|
492
|
-
<div className="text-center">
|
|
493
|
-
<SpinnerGradientIcon className="text-fm-secondary-600 !mx-auto mb-2 h-3 w-3 animate-spin" />
|
|
494
|
-
<span className="text-fm-tertiary text-xs">12px</span>
|
|
495
|
-
</div>
|
|
496
|
-
<div className="text-center">
|
|
497
|
-
<SpinnerGradientIcon className="text-fm-secondary-600 !mx-auto mb-2 h-4 w-4 animate-spin" />
|
|
498
|
-
<span className="text-fm-tertiary text-xs">16px</span>
|
|
499
|
-
</div>
|
|
500
|
-
<div className="text-center">
|
|
501
|
-
<SpinnerGradientIcon className="text-fm-secondary-600 !mx-auto mb-2 h-5 w-5 animate-spin" />
|
|
502
|
-
<span className="text-fm-tertiary text-xs">20px</span>
|
|
503
|
-
</div>
|
|
504
|
-
<div className="text-center">
|
|
505
|
-
<SpinnerGradientIcon className="text-fm-secondary-600 !mx-auto mb-2 h-6 w-6 animate-spin" />
|
|
506
|
-
<span className="text-fm-tertiary text-xs">24px</span>
|
|
507
|
-
</div>
|
|
508
|
-
<div className="text-center">
|
|
509
|
-
<SpinnerGradientIcon className="text-fm-secondary-600 !mx-auto mb-2 h-8 w-8 animate-spin" />
|
|
510
|
-
<span className="text-fm-tertiary text-xs">32px</span>
|
|
511
|
-
</div>
|
|
512
|
-
<div className="text-center">
|
|
513
|
-
<SpinnerGradientIcon className="text-fm-secondary-600 !mx-auto mb-2 h-12 w-12 animate-spin" />
|
|
514
|
-
<span className="text-fm-tertiary text-xs">48px</span>
|
|
515
|
-
</div>
|
|
516
|
-
</div>
|
|
517
|
-
),
|
|
129
|
+
render: () => <IconSizeVariations icon={SpinnerGradientIcon} />,
|
|
518
130
|
}
|
|
519
131
|
|
|
520
132
|
export const ColorVariations: Story = {
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
story:
|
|
526
|
-
"SpinnerGradientIcon in different colors for various contexts and states.",
|
|
527
|
-
},
|
|
528
|
-
},
|
|
529
|
-
},
|
|
133
|
+
render: () => <IconColorVariations icon={SpinnerGradientIcon} />,
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export const AnimatedStates: Story = {
|
|
530
137
|
render: () => (
|
|
531
|
-
<
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
<SpinnerGradientIcon className="text-fm-icon-info h-8 w-8 animate-spin" />
|
|
551
|
-
</div>
|
|
552
|
-
<div className="text-fm-icon-active text-sm font-medium">Info</div>
|
|
553
|
-
<div className="text-fm-icon-info text-xs">text-fm-icon-info</div>
|
|
554
|
-
</div>
|
|
555
|
-
<div className="text-center">
|
|
556
|
-
<div className="border-fm-divider-primary bg-fm-surface-tertiary/20 !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
|
|
557
|
-
<SpinnerGradientIcon className="text-fm-placeholder h-8 w-8 animate-spin" />
|
|
558
|
-
</div>
|
|
559
|
-
<div className="text-fm-icon-active text-sm font-medium">Muted</div>
|
|
560
|
-
<div className="text-fm-placeholder text-xs">text-fm-placeholder</div>
|
|
561
|
-
</div>
|
|
562
|
-
</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
|
+
/>
|
|
563
157
|
),
|
|
564
158
|
}
|
|
565
159
|
|
|
566
160
|
export const UsageExamples: Story = {
|
|
567
|
-
parameters: {
|
|
568
|
-
...storyParameters,
|
|
569
|
-
docs: {
|
|
570
|
-
description: {
|
|
571
|
-
story:
|
|
572
|
-
"Real-world usage examples showing SpinnerGradientIcon in different UI contexts.",
|
|
573
|
-
},
|
|
574
|
-
},
|
|
575
|
-
},
|
|
576
161
|
render: () => (
|
|
577
|
-
<
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
</
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
<
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
Loading State
|
|
598
|
-
</h3>
|
|
599
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary flex h-32 items-center justify-center rounded-lg border">
|
|
600
|
-
<div className="text-center">
|
|
601
|
-
<SpinnerGradientIcon className="text-fm-secondary-600 !mx-auto mb-4 h-12 w-12 animate-spin" />
|
|
602
|
-
<div className="text-fm-tertiary text-sm">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>
|
|
603
182
|
</div>
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
<div className="!space-y-2">
|
|
609
|
-
<h3 className="text-fm-icon-active text-sm font-medium">
|
|
610
|
-
Form Loading
|
|
611
|
-
</h3>
|
|
612
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-4">
|
|
613
|
-
<div className="mb-4">
|
|
614
|
-
<label className="text-fm-tertiary mb-2 block text-sm">Email</label>
|
|
615
|
-
<input
|
|
616
|
-
type="email"
|
|
617
|
-
className="border-fm-divider-primary bg-fm-surface-secondary text-fm-icon-active w-full rounded-lg border px-4 py-2 placeholder-white/50"
|
|
618
|
-
placeholder="Enter your email"
|
|
619
|
-
/>
|
|
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" />
|
|
620
187
|
</div>
|
|
621
|
-
<button className="bg-fm-secondary-500/20 text-fm-secondary-600 flex w-full items-center justify-center gap-2 rounded-lg px-4 py-2">
|
|
622
|
-
<SpinnerGradientIcon className="h-4 w-4 animate-spin" />
|
|
623
|
-
Submitting...
|
|
624
|
-
</button>
|
|
625
188
|
</div>
|
|
626
|
-
</
|
|
627
|
-
|
|
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>
|
|
628
200
|
),
|
|
629
201
|
}
|
|
630
202
|
|
|
631
203
|
export const Playground: Story = {
|
|
632
|
-
parameters: {
|
|
633
|
-
...storyParameters,
|
|
634
|
-
docs: {
|
|
635
|
-
description: {
|
|
636
|
-
story:
|
|
637
|
-
"Interactive playground to experiment with different SpinnerGradientIcon configurations.",
|
|
638
|
-
},
|
|
639
|
-
},
|
|
640
|
-
},
|
|
641
204
|
args: {
|
|
642
|
-
width:
|
|
643
|
-
height:
|
|
644
|
-
|
|
205
|
+
width: 54,
|
|
206
|
+
height: 54,
|
|
207
|
+
withAccessibility: true,
|
|
208
|
+
className: "animate-spin",
|
|
645
209
|
},
|
|
646
210
|
render: (args) => (
|
|
647
|
-
<
|
|
648
|
-
<
|
|
649
|
-
|
|
650
|
-
</div>
|
|
651
|
-
</div>
|
|
211
|
+
<IconPlaygroundCanvas>
|
|
212
|
+
<SpinnerGradientIcon {...args} />
|
|
213
|
+
</IconPlaygroundCanvas>
|
|
652
214
|
),
|
|
653
215
|
}
|