aural-ui 2.0.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/LICENSE +21 -0
- package/README.md +456 -0
- package/dist/components/aspect-ratio/AspectRatio.stories.tsx +1327 -0
- package/dist/components/aspect-ratio/index.tsx +10 -0
- package/dist/components/aspect-ratio/meta.ts +8 -0
- package/dist/components/avatar/Avatar.stories.tsx +645 -0
- package/dist/components/avatar/index.tsx +50 -0
- package/dist/components/avatar/meta.ts +8 -0
- package/dist/components/badge/Badge.stories.tsx +169 -0
- package/dist/components/badge/index.tsx +28 -0
- package/dist/components/badge/meta.ts +6 -0
- package/dist/components/banner/Banner.stories.tsx +475 -0
- package/dist/components/banner/index.tsx +256 -0
- package/dist/components/banner/meta.ts +36 -0
- package/dist/components/button/Button.stories.tsx +74 -0
- package/dist/components/button/index.tsx +158 -0
- package/dist/components/button/meta.ts +33 -0
- package/dist/components/card/Card.stories.tsx +377 -0
- package/dist/components/card/index.tsx +85 -0
- package/dist/components/card/meta.ts +14 -0
- package/dist/components/char-count/CharCount.stories.tsx +334 -0
- package/dist/components/char-count/index.tsx +51 -0
- package/dist/components/char-count/meta.ts +13 -0
- package/dist/components/checkbox/Checkbox.stories.tsx +209 -0
- package/dist/components/checkbox/index.tsx +34 -0
- package/dist/components/checkbox/meta.ts +19 -0
- package/dist/components/chip/Chip.stories.tsx +207 -0
- package/dist/components/chip/index.tsx +92 -0
- package/dist/components/chip/meta.ts +17 -0
- package/dist/components/circular-loader/CircularLoader.stories.tsx +741 -0
- package/dist/components/circular-loader/index.tsx +138 -0
- package/dist/components/circular-loader/meta.ts +11 -0
- package/dist/components/collapsible/Collapsible.stories.tsx +319 -0
- package/dist/components/collapsible/index.tsx +158 -0
- package/dist/components/collapsible/meta.ts +22 -0
- package/dist/components/command/Command.stories.tsx +996 -0
- package/dist/components/command/index.tsx +324 -0
- package/dist/components/command/meta.ts +18 -0
- package/dist/components/dialog/Dialog.stories.tsx +963 -0
- package/dist/components/dialog/index.tsx +250 -0
- package/dist/components/dialog/meta.ts +28 -0
- package/dist/components/divider/Divider.stories.tsx +633 -0
- package/dist/components/divider/index.tsx +181 -0
- package/dist/components/divider/meta.ts +12 -0
- package/dist/components/dot-loader/DotLoader.stories.tsx +352 -0
- package/dist/components/dot-loader/index.tsx +78 -0
- package/dist/components/dot-loader/meta.ts +14 -0
- package/dist/components/dropdown/Dropdown.stories.tsx +1210 -0
- package/dist/components/dropdown/index.tsx +479 -0
- package/dist/components/dropdown/meta.ts +21 -0
- package/dist/components/form/Form.stories.tsx +320 -0
- package/dist/components/form/index.tsx +183 -0
- package/dist/components/form/meta.ts +11 -0
- package/dist/components/helper-text/HelperText.stories.tsx +254 -0
- package/dist/components/helper-text/index.tsx +102 -0
- package/dist/components/helper-text/meta.ts +18 -0
- package/dist/components/hover-card/HoverCard.stories.tsx +1328 -0
- package/dist/components/hover-card/index.tsx +42 -0
- package/dist/components/hover-card/meta.ts +12 -0
- package/dist/components/icon-button/IconButton.stories.tsx +252 -0
- package/dist/components/icon-button/index.tsx +130 -0
- package/dist/components/icon-button/meta.ts +20 -0
- package/dist/components/if-else/if-else.stories.tsx +100 -0
- package/dist/components/if-else/index.tsx +56 -0
- package/dist/components/if-else/meta.ts +6 -0
- package/dist/components/index.ts +70 -0
- package/dist/components/input/Input.stories.tsx +431 -0
- package/dist/components/input/index.tsx +487 -0
- package/dist/components/input/meta.ts +28 -0
- package/dist/components/label/Label.stories.tsx +200 -0
- package/dist/components/label/index.tsx +43 -0
- package/dist/components/label/meta.ts +14 -0
- package/dist/components/list/List.stories.tsx +963 -0
- package/dist/components/list/index.tsx +567 -0
- package/dist/components/list/meta.ts +24 -0
- package/dist/components/marquee/Marquee.stories.tsx +819 -0
- package/dist/components/marquee/index.tsx +107 -0
- package/dist/components/marquee/meta.ts +6 -0
- package/dist/components/overlay/Overlay.stories.tsx +954 -0
- package/dist/components/overlay/index.tsx +58 -0
- package/dist/components/overlay/meta.ts +10 -0
- package/dist/components/pagination/Pagination.stories.tsx +354 -0
- package/dist/components/pagination/index.tsx +455 -0
- package/dist/components/pagination/meta.ts +29 -0
- package/dist/components/popover/Popover.stories.tsx +1037 -0
- package/dist/components/popover/index.tsx +67 -0
- package/dist/components/popover/meta.ts +12 -0
- package/dist/components/radio/Radio.stories.tsx +146 -0
- package/dist/components/radio/index.tsx +41 -0
- package/dist/components/radio/meta.ts +19 -0
- package/dist/components/resizable/Resizable.stories.tsx +866 -0
- package/dist/components/resizable/index.tsx +55 -0
- package/dist/components/resizable/meta.ts +12 -0
- package/dist/components/scroll-area/ScrollArea.stories.tsx +1104 -0
- package/dist/components/scroll-area/index.tsx +55 -0
- package/dist/components/scroll-area/meta.ts +8 -0
- package/dist/components/search/Search.stories.tsx +678 -0
- package/dist/components/search/index.tsx +141 -0
- package/dist/components/search/meta.ts +6 -0
- package/dist/components/select/Select.stories.tsx +962 -0
- package/dist/components/select/index.tsx +512 -0
- package/dist/components/select/meta.ts +40 -0
- package/dist/components/sheet/Sheet.stories.tsx +1060 -0
- package/dist/components/sheet/index.tsx +440 -0
- package/dist/components/sheet/meta.ts +38 -0
- package/dist/components/skelton/Skelton.stories.tsx +859 -0
- package/dist/components/skelton/index.tsx +17 -0
- package/dist/components/skelton/meta.ts +6 -0
- package/dist/components/slider/Slider.stories.tsx +876 -0
- package/dist/components/slider/index.tsx +156 -0
- package/dist/components/slider/meta.ts +29 -0
- package/dist/components/stepper/Stepper.stories.tsx +639 -0
- package/dist/components/stepper/index.tsx +650 -0
- package/dist/components/stepper/meta.ts +19 -0
- package/dist/components/switch/Switch.stories.tsx +85 -0
- package/dist/components/switch/index.tsx +37 -0
- package/dist/components/switch/meta.ts +24 -0
- package/dist/components/switch-case/SwitchCase.stories.tsx +209 -0
- package/dist/components/switch-case/index.tsx +89 -0
- package/dist/components/switch-case/meta.ts +6 -0
- package/dist/components/table/Table.stories.tsx +1095 -0
- package/dist/components/table/index.tsx +113 -0
- package/dist/components/table/meta.ts +20 -0
- package/dist/components/tabs/Tabs.stories.tsx +1379 -0
- package/dist/components/tabs/index.tsx +186 -0
- package/dist/components/tabs/meta.ts +25 -0
- package/dist/components/tag/Tag.stories.tsx +625 -0
- package/dist/components/tag/index.tsx +320 -0
- package/dist/components/tag/meta.ts +52 -0
- package/dist/components/textarea/TextArea.stories.tsx +723 -0
- package/dist/components/textarea/index.tsx +480 -0
- package/dist/components/textarea/meta.ts +23 -0
- package/dist/components/toast/Toast.stories.tsx +1427 -0
- package/dist/components/toast/index.tsx +26 -0
- package/dist/components/toast/meta.ts +19 -0
- package/dist/components/toggle/Toggle.stories.tsx +1093 -0
- package/dist/components/toggle/index.tsx +44 -0
- package/dist/components/toggle/meta.ts +19 -0
- package/dist/components/tooltip/Tooltip.stories.tsx +1548 -0
- package/dist/components/tooltip/index.tsx +304 -0
- package/dist/components/tooltip/meta.ts +21 -0
- package/dist/components/typography/Typography.stories.tsx +197 -0
- package/dist/components/typography/index.tsx +184 -0
- package/dist/components/typography/meta.ts +38 -0
- package/dist/fonts/LabGrotesque-Regular.ttf +0 -0
- package/dist/fonts/LabGrotesqueTRIAL-Bold.otf +0 -0
- package/dist/fonts/LabGrotesqueTRIAL-Light.otf +0 -0
- package/dist/fonts/LabGrotesqueTRIAL-Medium.otf +0 -0
- package/dist/fonts/LabGrotesqueTRIAL-Regular.otf +0 -0
- package/dist/fonts/PPSupplySans-Regular (1).otf +0 -0
- package/dist/fonts/PPSupplySans-Regular.otf +0 -0
- package/dist/fonts/PPSupplySans-Ultralight.otf +0 -0
- package/dist/hooks/index.ts +3 -0
- package/dist/hooks/use-previous/UsePrevious.stories.tsx +997 -0
- package/dist/hooks/use-previous/index.ts +15 -0
- package/dist/hooks/use-previous/meta.ts +6 -0
- package/dist/hooks/use-standalone-pagination/UseStandalonePagination.stories.tsx +983 -0
- package/dist/hooks/use-standalone-pagination/index.ts +146 -0
- package/dist/hooks/use-standalone-pagination/meta.ts +6 -0
- package/dist/icons/Icons.stories.tsx +29 -0
- package/dist/icons/alert-icon/AlertIcon.stories.tsx +991 -0
- package/dist/icons/alert-icon/index.tsx +48 -0
- package/dist/icons/alert-icon/meta.ts +8 -0
- package/dist/icons/all-icons.tsx +738 -0
- package/dist/icons/angle-down-icon/AngleDownIcon.stories.tsx +1031 -0
- package/dist/icons/angle-down-icon/index.tsx +25 -0
- package/dist/icons/angle-down-icon/meta.ts +8 -0
- package/dist/icons/arrow-box-left-icon/ArrowBoxLeftIcon.stories.tsx +1080 -0
- package/dist/icons/arrow-box-left-icon/index.tsx +24 -0
- package/dist/icons/arrow-box-left-icon/meta.ts +8 -0
- package/dist/icons/arrow-right-icon/ArrowRightIcon.stories.tsx +1151 -0
- package/dist/icons/arrow-right-icon/index.tsx +26 -0
- package/dist/icons/arrow-right-icon/meta.ts +8 -0
- package/dist/icons/arrow-right-up-icon/ArrowRightUpIcon.stories.tsx +1273 -0
- package/dist/icons/arrow-right-up-icon/index.tsx +24 -0
- package/dist/icons/arrow-right-up-icon/meta.ts +8 -0
- package/dist/icons/art-board-icon/ArtBoardIcon.stories.tsx +670 -0
- package/dist/icons/art-board-icon/index.tsx +24 -0
- package/dist/icons/art-board-icon/meta.ts +7 -0
- package/dist/icons/audio-bar-icon/AudioBarIcon.stories.tsx +1244 -0
- package/dist/icons/audio-bar-icon/index.tsx +19 -0
- package/dist/icons/audio-bar-icon/meta.ts +8 -0
- package/dist/icons/bubble-check-icon/BubbleCheckIcon.stories.tsx +1239 -0
- package/dist/icons/bubble-check-icon/index.tsx +24 -0
- package/dist/icons/bubble-check-icon/meta.ts +8 -0
- package/dist/icons/bubble-crossed-icon/BubbleCrossedIcon.stories.tsx +1228 -0
- package/dist/icons/bubble-crossed-icon/index.tsx +24 -0
- package/dist/icons/bubble-crossed-icon/meta.ts +8 -0
- package/dist/icons/bubble-sparkle-icon/BubbleSparkleIcon.stories.tsx +912 -0
- package/dist/icons/bubble-sparkle-icon/index.tsx +26 -0
- package/dist/icons/bubble-sparkle-icon/meta.ts +8 -0
- package/dist/icons/chevron-double-left-icon/ChevronDoubleLeftIcon.stories.tsx +1021 -0
- package/dist/icons/chevron-double-left-icon/index.tsx +34 -0
- package/dist/icons/chevron-double-left-icon/meta.ts +8 -0
- package/dist/icons/chevron-double-right-icon/ChevronDoubleRightIcon.stories.tsx +1021 -0
- package/dist/icons/chevron-double-right-icon/index.tsx +34 -0
- package/dist/icons/chevron-double-right-icon/meta.ts +8 -0
- package/dist/icons/chevron-down-icon/ChevronDownIcon.stories.tsx +1001 -0
- package/dist/icons/chevron-down-icon/index.tsx +27 -0
- package/dist/icons/chevron-down-icon/meta.ts +8 -0
- package/dist/icons/chevron-left-icon/ChevronLeftIcon.stories.tsx +1029 -0
- package/dist/icons/chevron-left-icon/index.tsx +27 -0
- package/dist/icons/chevron-left-icon/meta.ts +8 -0
- package/dist/icons/chevron-right-icon/ChevronRightIcon.stories.tsx +1021 -0
- package/dist/icons/chevron-right-icon/index.tsx +27 -0
- package/dist/icons/chevron-right-icon/meta.ts +8 -0
- package/dist/icons/chevron-up-icon/ChevronUpIcon.stories.tsx +1036 -0
- package/dist/icons/chevron-up-icon/index.tsx +27 -0
- package/dist/icons/chevron-up-icon/meta.ts +8 -0
- package/dist/icons/command-icon/CommandIcon.stories.tsx +1098 -0
- package/dist/icons/command-icon/index.tsx +24 -0
- package/dist/icons/command-icon/meta.ts +8 -0
- package/dist/icons/cross-circle-icon/CrossCircleIcon.stories.tsx +1061 -0
- package/dist/icons/cross-circle-icon/index.tsx +23 -0
- package/dist/icons/cross-circle-icon/meta.ts +8 -0
- package/dist/icons/cross-icon/CrossIcon.stories.tsx +1027 -0
- package/dist/icons/cross-icon/index.tsx +24 -0
- package/dist/icons/cross-icon/meta.ts +8 -0
- package/dist/icons/edit-big-icon/EditBigIcon.stories.tsx +1092 -0
- package/dist/icons/edit-big-icon/index.tsx +22 -0
- package/dist/icons/edit-big-icon/meta.ts +8 -0
- package/dist/icons/eye-close-icon/EyeCloseIcon.stories.tsx +1090 -0
- package/dist/icons/eye-close-icon/index.tsx +26 -0
- package/dist/icons/eye-close-icon/meta.ts +8 -0
- package/dist/icons/eye-open-icon/EyeOpenIcon.stories.tsx +1098 -0
- package/dist/icons/eye-open-icon/index.tsx +24 -0
- package/dist/icons/eye-open-icon/meta.ts +8 -0
- package/dist/icons/feature-shine-icon/FeatureShineIcon.stories.tsx +1071 -0
- package/dist/icons/feature-shine-icon/index.tsx +29 -0
- package/dist/icons/feature-shine-icon/meta.ts +8 -0
- package/dist/icons/file-chart-icon/FileChartIcon.stories.tsx +1115 -0
- package/dist/icons/file-chart-icon/index.tsx +24 -0
- package/dist/icons/file-chart-icon/meta.ts +8 -0
- package/dist/icons/file-text-icon/FileTextIcon.stories.tsx +668 -0
- package/dist/icons/file-text-icon/index.tsx +24 -0
- package/dist/icons/file-text-icon/meta.ts +8 -0
- package/dist/icons/grip-vertical-icon/GripVerticalIcon.stories.tsx +1239 -0
- package/dist/icons/grip-vertical-icon/index.tsx +28 -0
- package/dist/icons/grip-vertical-icon/meta.ts +8 -0
- package/dist/icons/image-icon/ImageIcon.stories.tsx +1181 -0
- package/dist/icons/image-icon/index.tsx +24 -0
- package/dist/icons/image-icon/meta.ts +8 -0
- package/dist/icons/import-folder-icon/ImportFolderIcon.stories.tsx +1248 -0
- package/dist/icons/import-folder-icon/index.tsx +22 -0
- package/dist/icons/import-folder-icon/meta.ts +8 -0
- package/dist/icons/index.ts +46 -0
- package/dist/icons/light-bulb-simple-icon/LightBulbSimpleIcon.stories.tsx +1272 -0
- package/dist/icons/light-bulb-simple-icon/index.tsx +24 -0
- package/dist/icons/light-bulb-simple-icon/meta.ts +8 -0
- package/dist/icons/magic-book-icon/MagicBookIcon.stories.tsx +1245 -0
- package/dist/icons/magic-book-icon/index.tsx +32 -0
- package/dist/icons/magic-book-icon/meta.ts +8 -0
- package/dist/icons/maintenance-icon/MaintenanceIcon.stories.tsx +1251 -0
- package/dist/icons/maintenance-icon/index.tsx +23 -0
- package/dist/icons/maintenance-icon/meta.ts +8 -0
- package/dist/icons/message-icon/MessageIcon.stories.tsx +595 -0
- package/dist/icons/message-icon/index.tsx +30 -0
- package/dist/icons/message-icon/meta.ts +8 -0
- package/dist/icons/move-horizontal-icon/MoveHorizontalIcon.stories.tsx +1245 -0
- package/dist/icons/move-horizontal-icon/index.tsx +23 -0
- package/dist/icons/move-horizontal-icon/meta.ts +8 -0
- package/dist/icons/move-vertical-icon/MoveVerticalIcon.stories.tsx +1196 -0
- package/dist/icons/move-vertical-icon/index.tsx +23 -0
- package/dist/icons/move-vertical-icon/meta.ts +8 -0
- package/dist/icons/page-search-icon/PageSearchIcon.stories.tsx +1167 -0
- package/dist/icons/page-search-icon/index.tsx +21 -0
- package/dist/icons/page-search-icon/meta.ts +8 -0
- package/dist/icons/pencil-icon/PencilIcon.stories.tsx +1131 -0
- package/dist/icons/pencil-icon/index.tsx +21 -0
- package/dist/icons/pencil-icon/meta.ts +8 -0
- package/dist/icons/plus-icon/PlusIcon.stories.tsx +1151 -0
- package/dist/icons/plus-icon/index.tsx +24 -0
- package/dist/icons/plus-icon/meta.ts +8 -0
- package/dist/icons/search-icon/SearchIcon.stories.tsx +1181 -0
- package/dist/icons/search-icon/index.tsx +24 -0
- package/dist/icons/search-icon/meta.ts +8 -0
- package/dist/icons/site-logo-icon/SiteLogoIcon.stories.tsx +1167 -0
- package/dist/icons/site-logo-icon/index.tsx +79 -0
- package/dist/icons/site-logo-icon/meta.ts +8 -0
- package/dist/icons/spinner-gradient-icon/SpinnerGradientIcon.stories.tsx +637 -0
- package/dist/icons/spinner-gradient-icon/index.tsx +53 -0
- package/dist/icons/spinner-gradient-icon/meta.ts +8 -0
- package/dist/icons/spinner-solid-icon/SpinnerSolidIcon.stories.tsx +644 -0
- package/dist/icons/spinner-solid-icon/index.tsx +59 -0
- package/dist/icons/spinner-solid-icon/meta.ts +8 -0
- package/dist/icons/spinner-solid-neutral-icon/SpinnerSolidINeutralcon.stories.tsx +736 -0
- package/dist/icons/spinner-solid-neutral-icon/index.tsx +53 -0
- package/dist/icons/spinner-solid-neutral-icon/meta.ts +8 -0
- package/dist/icons/tick-circle-icon/TickCircleIcon.stories.tsx +1204 -0
- package/dist/icons/tick-circle-icon/index.tsx +23 -0
- package/dist/icons/tick-circle-icon/meta.ts +8 -0
- package/dist/icons/tick-icon/TickIcon.stories.tsx +1340 -0
- package/dist/icons/tick-icon/index.tsx +24 -0
- package/dist/icons/tick-icon/meta.ts +8 -0
- package/dist/icons/trash-icon/TrashIcon.stories.tsx +996 -0
- package/dist/icons/trash-icon/index.tsx +24 -0
- package/dist/icons/trash-icon/meta.ts +8 -0
- package/dist/icons/upload-icon/UploadIcon.stories.tsx +947 -0
- package/dist/icons/upload-icon/index.tsx +24 -0
- package/dist/icons/upload-icon/meta.ts +8 -0
- package/dist/icons/vertical-menu-icon/VerticalMenuIcon.stories.tsx +1045 -0
- package/dist/icons/vertical-menu-icon/index.tsx +27 -0
- package/dist/icons/vertical-menu-icon/meta.ts +8 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +206 -0
- package/dist/lib/utils.ts +6 -0
- package/dist/styles/aural-theme.css +1008 -0
- package/package.json +142 -0
|
@@ -0,0 +1,637 @@
|
|
|
1
|
+
import React from "react"
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
3
|
+
|
|
4
|
+
import { SpinnerGradientIcon } from "."
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof SpinnerGradientIcon> = {
|
|
7
|
+
title: "Icons/SpinnerGradientIcon",
|
|
8
|
+
component: SpinnerGradientIcon,
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: "fullscreen",
|
|
11
|
+
backgrounds: {
|
|
12
|
+
default: "dark",
|
|
13
|
+
values: [
|
|
14
|
+
{ name: "dark", value: "#0a0a0a" },
|
|
15
|
+
{ name: "darker", value: "#000000" },
|
|
16
|
+
{ name: "light", value: "#ffffff" },
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
docs: {
|
|
20
|
+
page: () => (
|
|
21
|
+
<>
|
|
22
|
+
{/* Override default docs styling */}
|
|
23
|
+
<style>
|
|
24
|
+
{`
|
|
25
|
+
.sbdocs-wrapper {
|
|
26
|
+
padding: 0 !important;
|
|
27
|
+
max-width: none !important;
|
|
28
|
+
background: transparent !important;
|
|
29
|
+
}
|
|
30
|
+
.sbdocs-content {
|
|
31
|
+
max-width: none !important;
|
|
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 }) {
|
|
331
|
+
return (
|
|
332
|
+
<AccessibleIcon label={label}>
|
|
333
|
+
<TrashIcon {...props} />
|
|
334
|
+
</AccessibleIcon>
|
|
335
|
+
)
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
// Usage with specific context
|
|
339
|
+
<CustomTrashIcon
|
|
340
|
+
label="Delete user account"
|
|
341
|
+
className="h-4 w-4 text-red-400"
|
|
342
|
+
/>`}
|
|
343
|
+
</pre>
|
|
344
|
+
</div>
|
|
345
|
+
<div className="!space-y-4">
|
|
346
|
+
<p className="text-sm !text-white/70">
|
|
347
|
+
For specific contexts, you can wrap the
|
|
348
|
+
SpinnerGradient with a custom AccessibleIcon component
|
|
349
|
+
that provides more descriptive labels.
|
|
350
|
+
</p>
|
|
351
|
+
<div className="rounded-lg border border-red-500/20 bg-red-500/10 p-4">
|
|
352
|
+
<div className="flex items-center gap-2 text-sm text-red-200">
|
|
353
|
+
<SpinnerGradientIcon className="h-4 w-4" />
|
|
354
|
+
<span>
|
|
355
|
+
This approach gives screen readers more context
|
|
356
|
+
</span>
|
|
357
|
+
</div>
|
|
358
|
+
</div>
|
|
359
|
+
</div>
|
|
360
|
+
</div>
|
|
361
|
+
</div>
|
|
362
|
+
</div>
|
|
363
|
+
{/* Related Icons */}
|
|
364
|
+
<div className="!space-y-8">
|
|
365
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
366
|
+
Related Icons
|
|
367
|
+
</h2>
|
|
368
|
+
<div className="grid grid-cols-2 gap-6 md:grid-cols-4">
|
|
369
|
+
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
370
|
+
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-blue-500/20">
|
|
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
|
+
</>
|
|
438
|
+
),
|
|
439
|
+
},
|
|
440
|
+
},
|
|
441
|
+
tags: ["autodocs"],
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
export default meta
|
|
445
|
+
type Story = StoryObj<typeof SpinnerGradientIcon>
|
|
446
|
+
|
|
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
|
+
export const Default: Story = {
|
|
459
|
+
args: {
|
|
460
|
+
width: 24,
|
|
461
|
+
height: 24,
|
|
462
|
+
className: "text-purple-400",
|
|
463
|
+
},
|
|
464
|
+
parameters: storyParameters,
|
|
465
|
+
render: (args) => (
|
|
466
|
+
<div className="flex h-32 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
|
|
467
|
+
<SpinnerGradientIcon {...args} className="animate-spin" />
|
|
468
|
+
</div>
|
|
469
|
+
),
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
export const SizeVariations: Story = {
|
|
473
|
+
parameters: {
|
|
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
|
+
),
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
export const ColorVariations: Story = {
|
|
513
|
+
parameters: {
|
|
514
|
+
...storyParameters,
|
|
515
|
+
docs: {
|
|
516
|
+
description: {
|
|
517
|
+
story:
|
|
518
|
+
"SpinnerGradientIcon in different colors for various contexts and states.",
|
|
519
|
+
},
|
|
520
|
+
},
|
|
521
|
+
},
|
|
522
|
+
render: () => (
|
|
523
|
+
<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">
|
|
524
|
+
<div className="text-center">
|
|
525
|
+
<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">
|
|
526
|
+
<SpinnerGradientIcon className="h-8 w-8 animate-spin text-purple-400" />
|
|
527
|
+
</div>
|
|
528
|
+
<div className="text-sm font-medium text-white">Primary</div>
|
|
529
|
+
<div className="text-xs text-purple-400">text-purple-400</div>
|
|
530
|
+
</div>
|
|
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
|
+
<SpinnerGradientIcon className="h-8 w-8 animate-spin text-blue-400" />
|
|
534
|
+
</div>
|
|
535
|
+
<div className="text-sm font-medium text-white">Secondary</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-cyan-500/30 bg-cyan-500/20">
|
|
540
|
+
<SpinnerGradientIcon className="h-8 w-8 animate-spin text-cyan-400" />
|
|
541
|
+
</div>
|
|
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>
|
|
553
|
+
),
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
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
|
+
render: () => (
|
|
567
|
+
<div className="min-h-dvh !space-y-8 rounded-lg bg-gradient-to-br from-gray-900 to-gray-800 p-8">
|
|
568
|
+
{/* Loading Button */}
|
|
569
|
+
<div className="!space-y-2">
|
|
570
|
+
<h3 className="text-sm font-medium text-white">Loading Button</h3>
|
|
571
|
+
<div className="flex gap-4">
|
|
572
|
+
<button className="flex items-center gap-2 rounded-lg border border-purple-500/30 bg-purple-500/20 px-4 py-2 text-purple-200 transition-colors hover:bg-purple-500/30">
|
|
573
|
+
<SpinnerGradientIcon className="h-4 w-4 animate-spin" />
|
|
574
|
+
Loading...
|
|
575
|
+
</button>
|
|
576
|
+
<button className="flex h-10 w-10 items-center justify-center rounded-lg border border-purple-500/30 bg-purple-500/20 text-purple-200 transition-colors hover:bg-purple-500/30">
|
|
577
|
+
<SpinnerGradientIcon className="h-5 w-5 animate-spin" />
|
|
578
|
+
</button>
|
|
579
|
+
</div>
|
|
580
|
+
</div>
|
|
581
|
+
|
|
582
|
+
{/* Loading State */}
|
|
583
|
+
<div className="!space-y-2">
|
|
584
|
+
<h3 className="text-sm font-medium text-white">Loading State</h3>
|
|
585
|
+
<div className="flex h-32 items-center justify-center rounded-lg border border-white/10 bg-white/5">
|
|
586
|
+
<div className="text-center">
|
|
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>
|
|
589
|
+
</div>
|
|
590
|
+
</div>
|
|
591
|
+
</div>
|
|
592
|
+
|
|
593
|
+
{/* Form Loading */}
|
|
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
|
+
/>
|
|
604
|
+
</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
|
+
</div>
|
|
610
|
+
</div>
|
|
611
|
+
</div>
|
|
612
|
+
),
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
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
|
+
args: {
|
|
626
|
+
width: 32,
|
|
627
|
+
height: 32,
|
|
628
|
+
className: "text-purple-400",
|
|
629
|
+
},
|
|
630
|
+
render: (args) => (
|
|
631
|
+
<div className="flex h-64 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
|
|
632
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-8">
|
|
633
|
+
<SpinnerGradientIcon {...args} className="animate-spin" />
|
|
634
|
+
</div>
|
|
635
|
+
</div>
|
|
636
|
+
),
|
|
637
|
+
}
|