@pathscale/ui 1.2.6 → 1.2.8
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 +22 -22
- package/README.md +59 -59
- package/dist/components/_shared/index.js +1 -3
- package/dist/components/_shared/overlayPosition.js +6 -6
- package/dist/components/accordion/Accordion.css +158 -158
- package/dist/components/accordion/Accordion.js +46 -45
- package/dist/components/accordion/index.js +3 -9
- package/dist/components/alert/Alert.css +116 -116
- package/dist/components/alert/Alert.js +34 -33
- package/dist/components/alert/index.js +1 -8
- package/dist/components/auth-card/AuthCard.js +21 -21
- package/dist/components/auth-card/index.js +1 -3
- package/dist/components/auth-error-message/AuthErrorMessage.js +10 -10
- package/dist/components/auth-error-message/index.js +1 -3
- package/dist/components/auth-field-group/AuthFieldGroup.js +9 -9
- package/dist/components/auth-field-group/index.js +1 -3
- package/dist/components/auth-footer-links/AuthFooterLinks.js +21 -21
- package/dist/components/auth-footer-links/index.js +1 -3
- package/dist/components/auth-form/AuthForm.js +11 -11
- package/dist/components/auth-form/index.js +1 -3
- package/dist/components/auth-powered-by/AuthPoweredBy.js +15 -15
- package/dist/components/auth-powered-by/index.js +1 -3
- package/dist/components/auth-submit-button/AuthSubmitButton.js +10 -10
- package/dist/components/auth-submit-button/index.js +1 -3
- package/dist/components/auth-success-message/AuthSuccessMessage.js +12 -12
- package/dist/components/auth-success-message/index.js +1 -3
- package/dist/components/avatar/Avatar.css +124 -124
- package/dist/components/avatar/Avatar.js +28 -27
- package/dist/components/avatar/AvatarGroup.js +11 -11
- package/dist/components/avatar/index.js +1 -6
- package/dist/components/badge/Badge.css +164 -164
- package/dist/components/badge/Badge.js +19 -19
- package/dist/components/badge/index.js +7 -9
- package/dist/components/breadcrumbs/Breadcrumbs.css +63 -63
- package/dist/components/breadcrumbs/Breadcrumbs.js +27 -26
- package/dist/components/breadcrumbs/index.js +1 -5
- package/dist/components/button/Button.css +194 -194
- package/dist/components/button/Button.js +23 -23
- package/dist/components/button/index.js +1 -3
- package/dist/components/button-group/ButtonGroup.css +117 -117
- package/dist/components/button-group/ButtonGroup.js +16 -15
- package/dist/components/button-group/context.js +2 -2
- package/dist/components/button-group/index.js +3 -6
- package/dist/components/calendar/Calendar.css +258 -258
- package/dist/components/calendar/Calendar.js +88 -88
- package/dist/components/calendar/index.js +1 -3
- package/dist/components/card/Card.css +110 -110
- package/dist/components/card/Card.js +23 -22
- package/dist/components/card/index.js +3 -8
- package/dist/components/chatbubble/ChatBubble.css +164 -164
- package/dist/components/chatbubble/ChatBubble.js +20 -20
- package/dist/components/chatbubble/ChatBubbleAvatar.js +9 -9
- package/dist/components/chatbubble/ChatBubbleFooter.js +9 -9
- package/dist/components/chatbubble/ChatBubbleHeader.js +11 -11
- package/dist/components/chatbubble/ChatBubbleMessage.js +12 -12
- package/dist/components/chatbubble/ChatBubbleTime.js +9 -9
- package/dist/components/chatbubble/index.js +1 -3
- package/dist/components/checkbox/Checkbox.css +183 -183
- package/dist/components/checkbox/Checkbox.js +32 -32
- package/dist/components/checkbox/index.js +1 -3
- package/dist/components/checkbox-group/CheckboxGroup.css +10 -10
- package/dist/components/checkbox-group/CheckboxGroup.js +14 -14
- package/dist/components/checkbox-group/context.js +2 -2
- package/dist/components/checkbox-group/index.js +4 -4
- package/dist/components/chip/Chip.css +197 -197
- package/dist/components/chip/Chip.js +32 -32
- package/dist/components/chip/index.js +6 -7
- package/dist/components/close-button/CloseButton.css +81 -81
- package/dist/components/close-button/CloseButton.js +22 -22
- package/dist/components/close-button/index.js +1 -3
- package/dist/components/color-area/ColorArea.css +54 -54
- package/dist/components/color-area/ColorArea.js +16 -16
- package/dist/components/color-area/index.js +3 -3
- package/dist/components/color-field/ColorField.css +88 -88
- package/dist/components/color-field/ColorField.js +21 -21
- package/dist/components/color-field/index.js +3 -3
- package/dist/components/color-picker/ColorPicker.css +28 -28
- package/dist/components/color-picker/ColorPicker.js +46 -45
- package/dist/components/color-picker/index.js +3 -8
- package/dist/components/color-slider/ColorSlider.css +57 -57
- package/dist/components/color-slider/ColorSlider.js +19 -19
- package/dist/components/color-slider/index.js +3 -3
- package/dist/components/color-swatch/ColorSwatch.css +84 -84
- package/dist/components/color-swatch/ColorSwatch.js +12 -12
- package/dist/components/color-swatch/index.js +3 -3
- package/dist/components/color-swatch-picker/ColorSwatchPicker.css +12 -12
- package/dist/components/color-swatch-picker/ColorSwatchPicker.js +16 -15
- package/dist/components/color-swatch-picker/index.js +1 -5
- package/dist/components/color-wheel-flower/ColorWheelFlower.css +147 -147
- package/dist/components/color-wheel-flower/ColorWheelFlower.js +84 -84
- package/dist/components/color-wheel-flower/colorWheelFlowerContext.js +3 -3
- package/dist/components/color-wheel-flower/index.js +2 -6
- package/dist/components/combo-box/ComboBox.css +344 -344
- package/dist/components/combo-box/ComboBox.js +92 -91
- package/dist/components/combo-box/index.js +3 -10
- package/dist/components/date-field/DateField.css +215 -215
- package/dist/components/date-field/DateField.js +45 -44
- package/dist/components/date-field/index.js +3 -11
- package/dist/components/date-picker/DatePicker.css +143 -143
- package/dist/components/date-picker/DatePicker.js +38 -38
- package/dist/components/date-picker/index.js +1 -3
- package/dist/components/date-range-picker/DateRangePicker.css +149 -149
- package/dist/components/date-range-picker/DateRangePicker.js +53 -53
- package/dist/components/date-range-picker/index.js +1 -3
- package/dist/components/description/Description.css +10 -10
- package/dist/components/description/Description.js +11 -10
- package/dist/components/description/index.js +3 -5
- package/dist/components/disclosure/Disclosure.css +84 -84
- package/dist/components/disclosure/Disclosure.js +44 -43
- package/dist/components/disclosure/index.js +4 -9
- package/dist/components/disclosure-group/DisclosureGroup.css +9 -9
- package/dist/components/disclosure-group/DisclosureGroup.js +15 -14
- package/dist/components/disclosure-group/index.js +5 -6
- package/dist/components/disclosure-group/useDisclosureGroupNavigation.js +4 -4
- package/dist/components/drawer/Drawer.context.js +3 -3
- package/dist/components/drawer/Drawer.css +463 -463
- package/dist/components/drawer/Drawer.js +109 -108
- package/dist/components/drawer/index.js +1 -15
- package/dist/components/dropdown/Dropdown.css +211 -211
- package/dist/components/dropdown/Dropdown.js +68 -67
- package/dist/components/dropdown/index.js +3 -4
- package/dist/components/empty-state/EmptyState.css +39 -39
- package/dist/components/empty-state/EmptyState.js +27 -26
- package/dist/components/empty-state/index.js +1 -8
- package/dist/components/error-message/ErrorMessage.css +20 -20
- package/dist/components/error-message/ErrorMessage.js +13 -12
- package/dist/components/error-message/index.js +1 -5
- package/dist/components/field-error/FieldError.css +27 -27
- package/dist/components/field-error/FieldError.js +18 -17
- package/dist/components/field-error/index.js +1 -5
- package/dist/components/fieldset/Fieldset.css +30 -30
- package/dist/components/fieldset/Fieldset.js +23 -22
- package/dist/components/fieldset/index.js +3 -8
- package/dist/components/flex/Flex.css +5 -5
- package/dist/components/flex/Flex.js +14 -14
- package/dist/components/flex/index.js +1 -3
- package/dist/components/floating-dock/FloatingDock.css +208 -208
- package/dist/components/floating-dock/FloatingDock.js +78 -78
- package/dist/components/floating-dock/index.js +1 -3
- package/dist/components/footer/Footer.js +12 -12
- package/dist/components/footer/FooterTitle.js +9 -9
- package/dist/components/footer/footer.css +51 -51
- package/dist/components/footer/index.js +1 -3
- package/dist/components/form/FieldErrorMessage.js +10 -9
- package/dist/components/form/Form.css +5 -5
- package/dist/components/form/Form.js +18 -17
- package/dist/components/form/FormField.js +21 -20
- package/dist/components/form/FormSubmitButton.js +12 -11
- package/dist/components/form/index.js +6 -12
- package/dist/components/glass-panel/GlassPanel.classes.d.ts +3 -0
- package/dist/components/glass-panel/GlassPanel.classes.js +3 -0
- package/dist/components/glass-panel/GlassPanel.css +359 -282
- package/dist/components/glass-panel/GlassPanel.d.ts +3 -0
- package/dist/components/glass-panel/GlassPanel.js +30 -27
- package/dist/components/glass-panel/index.js +1 -3
- package/dist/components/glow-card/GlowCard.css +100 -100
- package/dist/components/glow-card/GlowCard.js +11 -11
- package/dist/components/glow-card/index.js +1 -3
- package/dist/components/grid/Grid.css +5 -5
- package/dist/components/grid/Grid.js +15 -15
- package/dist/components/grid/index.js +1 -3
- package/dist/components/header/Header.css +13 -13
- package/dist/components/header/Header.js +11 -10
- package/dist/components/header/index.js +3 -5
- package/dist/components/icon/Icon.css +10 -10
- package/dist/components/icon/Icon.js +9 -9
- package/dist/components/icon/index.js +1 -3
- package/dist/components/immersive-landing/ImmersiveLanding.css +565 -565
- package/dist/components/immersive-landing/ImmersiveLanding.js +45 -45
- package/dist/components/immersive-landing/ImmersiveLandingArrows.js +18 -18
- package/dist/components/immersive-landing/ImmersiveLandingContext.js +3 -3
- package/dist/components/immersive-landing/ImmersiveLandingNavigation.js +34 -34
- package/dist/components/immersive-landing/ImmersiveLandingPage.js +16 -16
- package/dist/components/immersive-landing/components/CookieConsent.js +71 -71
- package/dist/components/immersive-landing/components/FirefoxPWABanner.js +42 -42
- package/dist/components/immersive-landing/components/PWAInstallPrompt.js +40 -40
- package/dist/components/immersive-landing/index.js +6 -14
- package/dist/components/immersive-landing/useImmersiveLanding.js +8 -8
- package/dist/components/input/Input.css +155 -155
- package/dist/components/input/Input.js +46 -46
- package/dist/components/input/index.js +3 -3
- package/dist/components/input-group/InputGroup.css +172 -172
- package/dist/components/input-group/InputGroup.js +32 -31
- package/dist/components/input-group/index.js +3 -9
- package/dist/components/input-otp/InputOTP.css +170 -170
- package/dist/components/input-otp/InputOTP.js +52 -51
- package/dist/components/input-otp/index.js +1 -11
- package/dist/components/join/Join.js +15 -15
- package/dist/components/join/index.js +1 -3
- package/dist/components/kbd/Kbd.css +60 -60
- package/dist/components/kbd/Kbd.js +39 -38
- package/dist/components/kbd/index.js +1 -8
- package/dist/components/label/Label.css +30 -30
- package/dist/components/label/Label.js +11 -10
- package/dist/components/label/index.js +3 -5
- package/dist/components/language-switcher/LanguageSwitcher.css +56 -56
- package/dist/components/language-switcher/LanguageSwitcher.js +24 -24
- package/dist/components/language-switcher/createI18n.js +10 -10
- package/dist/components/language-switcher/index.js +2 -8
- package/dist/components/link/Link.css +131 -131
- package/dist/components/link/Link.js +21 -20
- package/dist/components/link/index.js +1 -5
- package/dist/components/list-box/ListBox.css +148 -148
- package/dist/components/list-box/ListBox.js +19 -18
- package/dist/components/list-box/ListBoxItem.js +31 -30
- package/dist/components/list-box/ListBoxSection.js +15 -14
- package/dist/components/list-box/context.js +2 -2
- package/dist/components/list-box/index.js +11 -16
- package/dist/components/live-chat/LiveChat.css +324 -324
- package/dist/components/live-chat/LiveChatBubble.js +28 -28
- package/dist/components/live-chat/LiveChatPanel.js +67 -67
- package/dist/components/live-chat/index.js +2 -5
- package/dist/components/menu/Menu.css +199 -199
- package/dist/components/menu/Menu.js +24 -28
- package/dist/components/menu/MenuItem.js +37 -36
- package/dist/components/menu/MenuSection.js +15 -14
- package/dist/components/menu/context.js +2 -2
- package/dist/components/menu/index.js +4 -12
- package/dist/components/meter/Meter.css +89 -89
- package/dist/components/meter/Meter.js +35 -34
- package/dist/components/meter/index.js +1 -8
- package/dist/components/modal/Modal.css +320 -320
- package/dist/components/modal/Modal.js +79 -78
- package/dist/components/modal/index.js +1 -13
- package/dist/components/navbar/Navbar.classes.d.ts +9 -0
- package/dist/components/navbar/Navbar.classes.js +9 -0
- package/dist/components/navbar/Navbar.css +110 -110
- package/dist/components/navbar/Navbar.js +16 -16
- package/dist/components/navbar/NavbarRow.js +11 -11
- package/dist/components/navbar/NavbarSection.js +10 -10
- package/dist/components/navbar/NavbarStack.js +11 -11
- package/dist/components/navbar/index.js +1 -3
- package/dist/components/noise-background/NoiseBackground.css +66 -66
- package/dist/components/noise-background/NoiseBackground.js +33 -33
- package/dist/components/noise-background/index.js +1 -3
- package/dist/components/number-field/NumberField.css +198 -198
- package/dist/components/number-field/NumberField.js +43 -42
- package/dist/components/number-field/index.js +1 -9
- package/dist/components/pagination/Pagination.css +121 -121
- package/dist/components/pagination/Pagination.js +32 -32
- package/dist/components/pagination/index.js +1 -3
- package/dist/components/password-field/PasswordField.js +18 -17
- package/dist/components/password-field/index.js +1 -3
- package/dist/components/password-requirements/PasswordRequirements.js +22 -22
- package/dist/components/password-requirements/index.js +1 -3
- package/dist/components/password-rules/index.js +1 -4
- package/dist/components/popover/Popover.css +117 -117
- package/dist/components/popover/Popover.js +52 -51
- package/dist/components/popover/index.js +4 -9
- package/dist/components/progress-bar/ProgressBar.css +104 -104
- package/dist/components/progress-bar/ProgressBar.js +28 -28
- package/dist/components/progress-bar/index.js +1 -3
- package/dist/components/progress-circle/ProgressCircle.css +82 -82
- package/dist/components/progress-circle/ProgressCircle.js +30 -30
- package/dist/components/progress-circle/index.js +1 -3
- package/dist/components/radio/Radio.css +129 -129
- package/dist/components/radio/Radio.js +28 -28
- package/dist/components/radio/index.js +1 -3
- package/dist/components/radio-group/RadioGroup.css +58 -58
- package/dist/components/radio-group/RadioGroup.js +31 -31
- package/dist/components/radio-group/context.js +2 -2
- package/dist/components/radio-group/index.js +4 -4
- package/dist/components/range-calendar/RangeCalendar.css +51 -51
- package/dist/components/range-calendar/RangeCalendar.js +18 -18
- package/dist/components/range-calendar/index.js +1 -3
- package/dist/components/scroll-shadow/ScrollShadow.css +93 -93
- package/dist/components/scroll-shadow/ScrollShadow.js +17 -17
- package/dist/components/scroll-shadow/index.js +1 -3
- package/dist/components/scroll-shadow/useScrollShadow.js +4 -4
- package/dist/components/search-field/SearchField.css +183 -183
- package/dist/components/search-field/SearchField.js +42 -41
- package/dist/components/search-field/index.js +1 -9
- package/dist/components/select/Select.css +284 -284
- package/dist/components/select/Select.js +130 -130
- package/dist/components/select/index.js +1 -3
- package/dist/components/separator/Separator.css +35 -35
- package/dist/components/separator/Separator.js +12 -11
- package/dist/components/separator/index.js +1 -4
- package/dist/components/size-picker/SizePicker.js +17 -17
- package/dist/components/size-picker/index.js +2 -6
- package/dist/components/size-picker/sizeStore.js +5 -5
- package/dist/components/skeleton/Skeleton.css +95 -95
- package/dist/components/skeleton/Skeleton.js +9 -9
- package/dist/components/skeleton/index.js +1 -3
- package/dist/components/slider/Slider.css +122 -122
- package/dist/components/slider/Slider.js +27 -27
- package/dist/components/slider/index.js +1 -3
- package/dist/components/spinner/Spinner.css +131 -131
- package/dist/components/spinner/Spinner.js +17 -17
- package/dist/components/spinner/index.js +1 -5
- package/dist/components/surface/Surface.css +37 -37
- package/dist/components/surface/Surface.js +11 -10
- package/dist/components/surface/index.js +1 -4
- package/dist/components/table/ExpandToggle.js +14 -14
- package/dist/components/table/InlineConfirm.js +12 -12
- package/dist/components/table/MobileListView.js +24 -24
- package/dist/components/table/SortIcon.js +11 -11
- package/dist/components/table/Table.css +426 -426
- package/dist/components/table/Table.js +82 -81
- package/dist/components/table/VirtualSpacerRow.js +9 -9
- package/dist/components/table/index.js +7 -38
- package/dist/components/tabs/Tabs.css +203 -203
- package/dist/components/tabs/Tabs.js +62 -61
- package/dist/components/tabs/index.js +1 -4
- package/dist/components/tag/Tag.css +121 -121
- package/dist/components/tag/Tag.js +41 -40
- package/dist/components/tag/index.js +3 -6
- package/dist/components/tag-group/TagGroup.css +22 -22
- package/dist/components/tag-group/TagGroup.js +24 -23
- package/dist/components/tag-group/context.js +2 -2
- package/dist/components/tag-group/index.js +1 -6
- package/dist/components/text/Text.css +66 -66
- package/dist/components/text/Text.js +11 -10
- package/dist/components/text/index.js +1 -5
- package/dist/components/text-area/TextArea.css +95 -95
- package/dist/components/text-area/TextArea.js +14 -13
- package/dist/components/text-area/index.js +1 -5
- package/dist/components/text-field/TextField.css +33 -33
- package/dist/components/text-field/TextField.js +14 -13
- package/dist/components/text-field/index.js +3 -7
- package/dist/components/textarea/Textarea.js +10 -11
- package/dist/components/textarea/index.js +1 -6
- package/dist/components/theme-color-picker/ThemeColorPicker.js +52 -52
- package/dist/components/theme-color-picker/hueShift.js +8 -8
- package/dist/components/theme-color-picker/index.js +2 -7
- package/dist/components/time-field/TimeField.css +215 -215
- package/dist/components/time-field/TimeField.js +43 -42
- package/dist/components/time-field/index.js +3 -11
- package/dist/components/toast/Toast.css +344 -344
- package/dist/components/toast/Toast.js +101 -100
- package/dist/components/toast/index.js +1 -19
- package/dist/components/toggle/Toggle.css +237 -237
- package/dist/components/toggle/Toggle.js +31 -31
- package/dist/components/toggle/index.js +1 -3
- package/dist/components/toolbar/Toolbar.css +55 -55
- package/dist/components/toolbar/Toolbar.js +12 -11
- package/dist/components/toolbar/index.js +1 -5
- package/dist/components/tooltip/Tooltip.css +153 -153
- package/dist/components/tooltip/Tooltip.js +40 -39
- package/dist/components/tooltip/index.js +1 -7
- package/dist/components/utils.js +6 -7
- package/dist/components/video-preview/VideoPreview.js +14 -13
- package/dist/components/video-preview/index.js +1 -3
- package/dist/hooks/date/useCalendarNavigation.js +18 -18
- package/dist/hooks/date/useCalendarState.js +19 -19
- package/dist/hooks/date/useDateSelection.js +7 -7
- package/dist/hooks/date/usePickerOpenState.js +8 -8
- package/dist/hooks/date/useRangeSelection.js +16 -16
- package/dist/hooks/form/FormContext.js +3 -3
- package/dist/hooks/form/createForm.js +4 -4
- package/dist/hooks/form/index.js +4 -10
- package/dist/hooks/form/useFieldNew.js +10 -10
- package/dist/hooks/layout/index.js +1 -3
- package/dist/hooks/layout/useDesktop.js +4 -4
- package/dist/hooks/table/index.js +8 -18
- package/dist/hooks/table/useAnchoredOverlayPosition.js +5 -5
- package/dist/hooks/table/useTableExpansion.js +4 -4
- package/dist/hooks/table/useTableFiltering.js +8 -8
- package/dist/hooks/table/useTableModel.js +10 -10
- package/dist/hooks/table/useTablePagination.js +4 -4
- package/dist/hooks/table/useTableSelection.js +4 -4
- package/dist/hooks/table/useTableSorting.js +6 -6
- package/dist/index.css +74 -74
- package/dist/index.js +108 -398
- package/dist/lib/refs/index.js +1 -3
- package/dist/lib/refs/mergeRefs.js +2 -2
- package/dist/lib/style/index.js +1 -4
- package/dist/lib/tag/createIsButton.js +4 -4
- package/dist/lib/tag/createTagName.js +2 -2
- package/dist/lib/tag/index.js +2 -7
- package/dist/motion/engine.js +4 -4
- package/dist/motion/index.js +10 -39
- package/dist/motion/popmotion.js +2 -2
- package/dist/motion/presets.js +4 -4
- package/dist/motion/route.js +7 -7
- package/dist/motion/solid/AnimatedCollapse.js +27 -26
- package/dist/motion/solid/MotionDiv.js +17 -16
- package/dist/motion/solid/Presence.js +13 -12
- package/dist/motion/solid/index.js +3 -10
- package/dist/motion/system.js +9 -9
- package/dist/primitives/streaming/index.js +2 -5
- package/dist/primitives/streaming/useStreamingBuffer.js +2 -2
- package/dist/primitives/streaming/useStreamingSubscription.js +7 -7
- package/dist/primitives/virtualizer/index.js +1 -3
- package/dist/primitives/virtualizer/useVirtualRows.js +7 -7
- package/dist/purge-manifest.json +15350 -15141
- package/dist/styles/base/index.css +43 -43
- package/dist/styles/icons/generated-icons.css +1 -173
- package/dist/styles/themes/dark.css +141 -141
- package/dist/styles/themes/light.css +143 -143
- package/package.json +31 -31
|
@@ -1,122 +1,122 @@
|
|
|
1
|
-
@layer components {
|
|
2
|
-
.slider {
|
|
3
|
-
display: grid;
|
|
4
|
-
width: 100%;
|
|
5
|
-
gap: 0.25rem;
|
|
6
|
-
grid-template-areas:
|
|
7
|
-
"label output"
|
|
8
|
-
"track track";
|
|
9
|
-
grid-template-columns: 1fr auto;
|
|
10
|
-
|
|
11
|
-
--slider-thumb-w: 1.5rem;
|
|
12
|
-
--slider-thumb-h: 1rem;
|
|
13
|
-
--slider-h: 1.25rem;
|
|
14
|
-
/* Inset padding = (track height - thumb height) / 2 */
|
|
15
|
-
--slider-pad: calc((var(--slider-h) - var(--slider-thumb-h)) / 2);
|
|
16
|
-
--slider-track-bg: var(--color-default);
|
|
17
|
-
--slider-fill-bg: var(--color-accent);
|
|
18
|
-
--slider-thumb-bg: var(--color-accent-foreground, white);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.slider__label {
|
|
22
|
-
grid-area: label;
|
|
23
|
-
width: fit-content;
|
|
24
|
-
font-size: 0.875rem;
|
|
25
|
-
font-weight: 500;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.slider__output {
|
|
29
|
-
grid-area: output;
|
|
30
|
-
font-size: 0.875rem;
|
|
31
|
-
font-weight: 500;
|
|
32
|
-
font-variant-numeric: tabular-nums;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.slider__track {
|
|
36
|
-
grid-area: track;
|
|
37
|
-
position: relative;
|
|
38
|
-
height: var(--slider-h);
|
|
39
|
-
border-radius: 9999px;
|
|
40
|
-
background-color: var(--slider-track-bg);
|
|
41
|
-
cursor: pointer;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.slider__fill {
|
|
45
|
-
position: absolute;
|
|
46
|
-
left: 0;
|
|
47
|
-
top: 0;
|
|
48
|
-
height: 100%;
|
|
49
|
-
border-radius: 9999px;
|
|
50
|
-
pointer-events: none;
|
|
51
|
-
background-color: var(--slider-fill-bg);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.slider__thumb {
|
|
55
|
-
position: absolute;
|
|
56
|
-
top: 50%;
|
|
57
|
-
z-index: 1;
|
|
58
|
-
border-radius: 9999px;
|
|
59
|
-
background-color: var(--slider-thumb-bg);
|
|
60
|
-
cursor: grab;
|
|
61
|
-
width: var(--slider-thumb-w);
|
|
62
|
-
height: var(--slider-thumb-h);
|
|
63
|
-
transform: translate(-50%, -50%);
|
|
64
|
-
box-shadow:
|
|
65
|
-
0 0 5px 0 oklch(0% 0 0 / 0.02),
|
|
66
|
-
0 2px 10px 0 oklch(0% 0 0 / 0.06),
|
|
67
|
-
0 0 1px 0 oklch(0% 0 0 / 0.3);
|
|
68
|
-
transition:
|
|
69
|
-
transform 250ms ease,
|
|
70
|
-
box-shadow 150ms ease;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.slider__thumb[data-dragging="true"] {
|
|
74
|
-
cursor: grabbing;
|
|
75
|
-
transform: translate(-50%, -50%) scale(0.9);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.slider__thumb[data-focus-visible="true"] {
|
|
79
|
-
box-shadow:
|
|
80
|
-
0 0 0 3px color-mix(in oklab, var(--color-accent) 22%, transparent),
|
|
81
|
-
0 0 5px 0 oklch(0% 0 0 / 0.02),
|
|
82
|
-
0 2px 10px 0 oklch(0% 0 0 / 0.06);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.slider__thumb[data-disabled="true"] {
|
|
86
|
-
cursor: default;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.slider[data-disabled="true"] {
|
|
90
|
-
cursor: not-allowed;
|
|
91
|
-
opacity: 0.55;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.slider[data-disabled="true"] .slider__label {
|
|
95
|
-
opacity: 1;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.slider[data-disabled="true"] .slider__track {
|
|
99
|
-
cursor: not-allowed;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.slider--sm {
|
|
103
|
-
--slider-thumb-w: 1.125rem;
|
|
104
|
-
--slider-thumb-h: 0.625rem;
|
|
105
|
-
--slider-h: 1rem;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.slider--sm .slider__label,
|
|
109
|
-
.slider--sm .slider__output {
|
|
110
|
-
font-size: 0.75rem;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.slider--md {
|
|
114
|
-
/* Default size */
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.slider--lg {
|
|
118
|
-
--slider-thumb-w: 1.75rem;
|
|
119
|
-
--slider-thumb-h: 1.25rem;
|
|
120
|
-
--slider-h: 1.5rem;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
1
|
+
@layer components {
|
|
2
|
+
.slider {
|
|
3
|
+
display: grid;
|
|
4
|
+
width: 100%;
|
|
5
|
+
gap: 0.25rem;
|
|
6
|
+
grid-template-areas:
|
|
7
|
+
"label output"
|
|
8
|
+
"track track";
|
|
9
|
+
grid-template-columns: 1fr auto;
|
|
10
|
+
|
|
11
|
+
--slider-thumb-w: 1.5rem;
|
|
12
|
+
--slider-thumb-h: 1rem;
|
|
13
|
+
--slider-h: 1.25rem;
|
|
14
|
+
/* Inset padding = (track height - thumb height) / 2 */
|
|
15
|
+
--slider-pad: calc((var(--slider-h) - var(--slider-thumb-h)) / 2);
|
|
16
|
+
--slider-track-bg: var(--color-default);
|
|
17
|
+
--slider-fill-bg: var(--color-accent);
|
|
18
|
+
--slider-thumb-bg: var(--color-accent-foreground, white);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.slider__label {
|
|
22
|
+
grid-area: label;
|
|
23
|
+
width: fit-content;
|
|
24
|
+
font-size: 0.875rem;
|
|
25
|
+
font-weight: 500;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.slider__output {
|
|
29
|
+
grid-area: output;
|
|
30
|
+
font-size: 0.875rem;
|
|
31
|
+
font-weight: 500;
|
|
32
|
+
font-variant-numeric: tabular-nums;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.slider__track {
|
|
36
|
+
grid-area: track;
|
|
37
|
+
position: relative;
|
|
38
|
+
height: var(--slider-h);
|
|
39
|
+
border-radius: 9999px;
|
|
40
|
+
background-color: var(--slider-track-bg);
|
|
41
|
+
cursor: pointer;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.slider__fill {
|
|
45
|
+
position: absolute;
|
|
46
|
+
left: 0;
|
|
47
|
+
top: 0;
|
|
48
|
+
height: 100%;
|
|
49
|
+
border-radius: 9999px;
|
|
50
|
+
pointer-events: none;
|
|
51
|
+
background-color: var(--slider-fill-bg);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.slider__thumb {
|
|
55
|
+
position: absolute;
|
|
56
|
+
top: 50%;
|
|
57
|
+
z-index: 1;
|
|
58
|
+
border-radius: 9999px;
|
|
59
|
+
background-color: var(--slider-thumb-bg);
|
|
60
|
+
cursor: grab;
|
|
61
|
+
width: var(--slider-thumb-w);
|
|
62
|
+
height: var(--slider-thumb-h);
|
|
63
|
+
transform: translate(-50%, -50%);
|
|
64
|
+
box-shadow:
|
|
65
|
+
0 0 5px 0 oklch(0% 0 0 / 0.02),
|
|
66
|
+
0 2px 10px 0 oklch(0% 0 0 / 0.06),
|
|
67
|
+
0 0 1px 0 oklch(0% 0 0 / 0.3);
|
|
68
|
+
transition:
|
|
69
|
+
transform 250ms ease,
|
|
70
|
+
box-shadow 150ms ease;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.slider__thumb[data-dragging="true"] {
|
|
74
|
+
cursor: grabbing;
|
|
75
|
+
transform: translate(-50%, -50%) scale(0.9);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.slider__thumb[data-focus-visible="true"] {
|
|
79
|
+
box-shadow:
|
|
80
|
+
0 0 0 3px color-mix(in oklab, var(--color-accent) 22%, transparent),
|
|
81
|
+
0 0 5px 0 oklch(0% 0 0 / 0.02),
|
|
82
|
+
0 2px 10px 0 oklch(0% 0 0 / 0.06);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.slider__thumb[data-disabled="true"] {
|
|
86
|
+
cursor: default;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.slider[data-disabled="true"] {
|
|
90
|
+
cursor: not-allowed;
|
|
91
|
+
opacity: 0.55;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.slider[data-disabled="true"] .slider__label {
|
|
95
|
+
opacity: 1;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.slider[data-disabled="true"] .slider__track {
|
|
99
|
+
cursor: not-allowed;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.slider--sm {
|
|
103
|
+
--slider-thumb-w: 1.125rem;
|
|
104
|
+
--slider-thumb-h: 0.625rem;
|
|
105
|
+
--slider-h: 1rem;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.slider--sm .slider__label,
|
|
109
|
+
.slider--sm .slider__output {
|
|
110
|
+
font-size: 0.75rem;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.slider--md {
|
|
114
|
+
/* Default size */
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.slider--lg {
|
|
118
|
+
--slider-thumb-w: 1.75rem;
|
|
119
|
+
--slider-thumb-h: 1.25rem;
|
|
120
|
+
--slider-h: 1.5rem;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { createComponent, insert, mergeProps, setAttribute, spread, template, use } from "solid-js/web";
|
|
2
2
|
import "./Slider.css";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
var _tmpl$ = /*#__PURE__*/
|
|
3
|
+
import { Show, createSignal, createUniqueId, splitProps } from "solid-js";
|
|
4
|
+
import { twMerge } from "tailwind-merge";
|
|
5
|
+
import { CLASSES } from "./Slider.classes.js";
|
|
6
|
+
var _tmpl$ = /*#__PURE__*/ template("<span>"), _tmpl$2 = /*#__PURE__*/ template("<div><div><div></div><div>");
|
|
7
7
|
function clamp(val, min, max) {
|
|
8
8
|
return Math.min(Math.max(val, min), max);
|
|
9
9
|
}
|
|
@@ -13,7 +13,7 @@ function snapToStep(val, min, max, step) {
|
|
|
13
13
|
}
|
|
14
14
|
const Slider = (props)=>{
|
|
15
15
|
let trackRef;
|
|
16
|
-
const [local] =
|
|
16
|
+
const [local] = splitProps(props, [
|
|
17
17
|
"label",
|
|
18
18
|
"value",
|
|
19
19
|
"onChange",
|
|
@@ -33,9 +33,9 @@ const Slider = (props)=>{
|
|
|
33
33
|
const step = ()=>local.step ?? 1;
|
|
34
34
|
const size = ()=>local.size ?? "md";
|
|
35
35
|
const isDisabled = ()=>Boolean(local.disabled);
|
|
36
|
-
const labelId =
|
|
37
|
-
const [dragging, setDragging] =
|
|
38
|
-
const [focusVisible, setFocusVisible] =
|
|
36
|
+
const labelId = createUniqueId();
|
|
37
|
+
const [dragging, setDragging] = createSignal(false);
|
|
38
|
+
const [focusVisible, setFocusVisible] = createSignal(false);
|
|
39
39
|
const fraction = ()=>{
|
|
40
40
|
const range = max() - min();
|
|
41
41
|
if (range <= 0) return 0;
|
|
@@ -109,8 +109,8 @@ const Slider = (props)=>{
|
|
|
109
109
|
const handleBlur = ()=>setFocusVisible(false);
|
|
110
110
|
return (()=>{
|
|
111
111
|
var _el$ = _tmpl$2(), _el$4 = _el$.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling;
|
|
112
|
-
|
|
113
|
-
class:
|
|
112
|
+
spread(_el$, mergeProps(()=>({
|
|
113
|
+
class: twMerge(CLASSES.base, CLASSES.size[size()], local.class, local.className)
|
|
114
114
|
}), {
|
|
115
115
|
get ["data-theme"] () {
|
|
116
116
|
return local.dataTheme;
|
|
@@ -123,7 +123,7 @@ const Slider = (props)=>{
|
|
|
123
123
|
return local.style;
|
|
124
124
|
}
|
|
125
125
|
}), false, true);
|
|
126
|
-
|
|
126
|
+
insert(_el$, createComponent(Show, {
|
|
127
127
|
get when () {
|
|
128
128
|
return local.label;
|
|
129
129
|
},
|
|
@@ -131,41 +131,41 @@ const Slider = (props)=>{
|
|
|
131
131
|
return [
|
|
132
132
|
(()=>{
|
|
133
133
|
var _el$2 = _tmpl$();
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
class:
|
|
134
|
+
setAttribute(_el$2, "id", labelId);
|
|
135
|
+
spread(_el$2, mergeProps(()=>({
|
|
136
|
+
class: CLASSES.label
|
|
137
137
|
}), {
|
|
138
138
|
"data-slot": "label"
|
|
139
139
|
}), false, true);
|
|
140
|
-
|
|
140
|
+
insert(_el$2, ()=>local.label);
|
|
141
141
|
return _el$2;
|
|
142
142
|
})(),
|
|
143
143
|
(()=>{
|
|
144
144
|
var _el$3 = _tmpl$();
|
|
145
|
-
|
|
146
|
-
class:
|
|
145
|
+
spread(_el$3, mergeProps(()=>({
|
|
146
|
+
class: CLASSES.output
|
|
147
147
|
}), {
|
|
148
148
|
"data-slot": "slider-output",
|
|
149
149
|
"aria-live": "polite"
|
|
150
150
|
}), false, true);
|
|
151
|
-
|
|
151
|
+
insert(_el$3, formattedValue);
|
|
152
152
|
return _el$3;
|
|
153
153
|
})()
|
|
154
154
|
];
|
|
155
155
|
}
|
|
156
156
|
}), _el$4);
|
|
157
157
|
var _ref$ = trackRef;
|
|
158
|
-
"function" == typeof _ref$ ?
|
|
159
|
-
|
|
160
|
-
class:
|
|
158
|
+
"function" == typeof _ref$ ? use(_ref$, _el$4) : trackRef = _el$4;
|
|
159
|
+
spread(_el$4, mergeProps(()=>({
|
|
160
|
+
class: CLASSES.track
|
|
161
161
|
}), {
|
|
162
162
|
"data-slot": "slider-track",
|
|
163
163
|
onPointerDown: handlePointerDown,
|
|
164
164
|
onPointerMove: handlePointerMove,
|
|
165
165
|
onPointerUp: handlePointerUp
|
|
166
166
|
}), false, true);
|
|
167
|
-
|
|
168
|
-
class:
|
|
167
|
+
spread(_el$5, mergeProps(()=>({
|
|
168
|
+
class: CLASSES.fill
|
|
169
169
|
}), {
|
|
170
170
|
"data-slot": "slider-fill",
|
|
171
171
|
get style () {
|
|
@@ -174,8 +174,8 @@ const Slider = (props)=>{
|
|
|
174
174
|
};
|
|
175
175
|
}
|
|
176
176
|
}), false, false);
|
|
177
|
-
|
|
178
|
-
class:
|
|
177
|
+
spread(_el$6, mergeProps(()=>({
|
|
178
|
+
class: CLASSES.thumb
|
|
179
179
|
}), {
|
|
180
180
|
"data-slot": "slider-thumb",
|
|
181
181
|
get ["data-dragging"] () {
|
|
@@ -222,4 +222,4 @@ const Slider = (props)=>{
|
|
|
222
222
|
})();
|
|
223
223
|
};
|
|
224
224
|
const slider_Slider = Slider;
|
|
225
|
-
export
|
|
225
|
+
export default slider_Slider;
|
|
@@ -1,131 +1,131 @@
|
|
|
1
|
-
@layer components {
|
|
2
|
-
/* -------------------------------------------------------------------------------------------------
|
|
3
|
-
* Base
|
|
4
|
-
* -----------------------------------------------------------------------------------------------*/
|
|
5
|
-
.spinner {
|
|
6
|
-
pointer-events: none;
|
|
7
|
-
position: relative;
|
|
8
|
-
display: inline-flex;
|
|
9
|
-
align-items: center;
|
|
10
|
-
justify-content: center;
|
|
11
|
-
width: 1.5rem;
|
|
12
|
-
height: 1.5rem;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.spinner [data-slot="spinner-icon"] {
|
|
16
|
-
width: 100%;
|
|
17
|
-
height: 100%;
|
|
18
|
-
animation: spinner-rotate 0.8s linear infinite;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
@keyframes spinner-rotate {
|
|
22
|
-
100% {
|
|
23
|
-
transform: rotate(360deg);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/* -------------------------------------------------------------------------------------------------
|
|
28
|
-
* Size variants
|
|
29
|
-
* -----------------------------------------------------------------------------------------------*/
|
|
30
|
-
.spinner--xs {
|
|
31
|
-
width: 1rem;
|
|
32
|
-
height: 1rem;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.spinner--sm {
|
|
36
|
-
width: 1.25rem;
|
|
37
|
-
height: 1.25rem;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/* md is default */
|
|
41
|
-
|
|
42
|
-
.spinner--lg {
|
|
43
|
-
width: 2rem;
|
|
44
|
-
height: 2rem;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.spinner--xl {
|
|
48
|
-
width: 2.5rem;
|
|
49
|
-
height: 2.5rem;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/* -------------------------------------------------------------------------------------------------
|
|
53
|
-
* Color variants
|
|
54
|
-
* -----------------------------------------------------------------------------------------------*/
|
|
55
|
-
.spinner--current {
|
|
56
|
-
color: currentColor;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.spinner--accent {
|
|
60
|
-
color: var(--color-accent);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.spinner--success {
|
|
64
|
-
color: var(--color-success);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.spinner--warning {
|
|
68
|
-
color: var(--color-warning);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.spinner--danger {
|
|
72
|
-
color: var(--color-error);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
/* -------------------------------------------------------------------------------------------------
|
|
76
|
-
* CSS mask-image variants (legacy, non-spinner)
|
|
77
|
-
* These use background-color + mask-image for animated SVG patterns
|
|
78
|
-
* -----------------------------------------------------------------------------------------------*/
|
|
79
|
-
.spinner--dots,
|
|
80
|
-
.spinner--ring,
|
|
81
|
-
.spinner--ball,
|
|
82
|
-
.spinner--bars,
|
|
83
|
-
.spinner--infinity {
|
|
84
|
-
background-color: currentColor;
|
|
85
|
-
mask-size: 100%;
|
|
86
|
-
mask-repeat: no-repeat;
|
|
87
|
-
mask-position: center;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.spinner--dots [data-slot="spinner-icon"],
|
|
91
|
-
.spinner--ring [data-slot="spinner-icon"],
|
|
92
|
-
.spinner--ball [data-slot="spinner-icon"],
|
|
93
|
-
.spinner--bars [data-slot="spinner-icon"],
|
|
94
|
-
.spinner--infinity [data-slot="spinner-icon"] {
|
|
95
|
-
display: none;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.spinner--dots {
|
|
99
|
-
mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='4' cy='12' r='3'%3E%3Canimate attributeName='cy' values='12;6;12;12' keyTimes='0;0.286;0.571;1' dur='1.05s' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle cx='12' cy='12' r='3'%3E%3Canimate attributeName='cy' values='12;6;12;12' keyTimes='0;0.286;0.571;1' dur='1.05s' repeatCount='indefinite' begin='0.1s'/%3E%3C/circle%3E%3Ccircle cx='20' cy='12' r='3'%3E%3Canimate attributeName='cy' values='12;6;12;12' keyTimes='0;0.286;0.571;1' dur='1.05s' repeatCount='indefinite' begin='0.2s'/%3E%3C/circle%3E%3C/svg%3E");
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.spinner--ring {
|
|
103
|
-
mask-image: url("data:image/svg+xml,%3Csvg width='44' height='44' viewBox='0 0 44 44' xmlns='http://www.w3.org/2000/svg' stroke='white'%3E%3Cg fill='none' fill-rule='evenodd' stroke-width='2'%3E%3Ccircle cx='22' cy='22' r='1'%3E%3Canimate attributeName='r' begin='0s' dur='1.8s' values='1;20' calcMode='spline' keyTimes='0;1' keySplines='0.165,0.84,0.44,1' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-opacity' begin='0s' dur='1.8s' values='1;0' calcMode='spline' keyTimes='0;1' keySplines='0.3,0.61,0.355,1' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle cx='22' cy='22' r='1'%3E%3Canimate attributeName='r' begin='-0.9s' dur='1.8s' values='1;20' calcMode='spline' keyTimes='0;1' keySplines='0.165,0.84,0.44,1' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-opacity' begin='-0.9s' dur='1.8s' values='1;0' calcMode='spline' keyTimes='0;1' keySplines='0.3,0.61,0.355,1' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.spinner--ball {
|
|
107
|
-
mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cellipse cx='12' cy='5' rx='4' ry='4'%3E%3Canimate attributeName='cy' values='5;20;20.5;20;5' keyTimes='0;0.469;0.5;0.531;1' dur='.8s' repeatCount='indefinite'/%3E%3Canimate attributeName='rx' values='4;4;4.8;4;4' keyTimes='0;0.469;0.5;0.531;1' dur='.8s' repeatCount='indefinite'/%3E%3Canimate attributeName='ry' values='4;4;3;4;4' keyTimes='0;0.469;0.5;0.531;1' dur='.8s' repeatCount='indefinite'/%3E%3C/ellipse%3E%3C/svg%3E");
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.spinner--bars {
|
|
111
|
-
mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='1' y='1' width='6' height='22'%3E%3Canimate attributeName='y' values='1;5;1' keyTimes='0;0.938;1' dur='.8s' repeatCount='indefinite'/%3E%3Canimate attributeName='height' values='22;14;22' keyTimes='0;0.938;1' dur='.8s' repeatCount='indefinite'/%3E%3Canimate attributeName='opacity' values='1;0.2;1' keyTimes='0;0.938;1' dur='.8s' repeatCount='indefinite'/%3E%3C/rect%3E%3Crect x='9' y='1' width='6' height='22'%3E%3Canimate attributeName='y' values='1;5;1' keyTimes='0;0.938;1' dur='.8s' repeatCount='indefinite' begin='-0.65s'/%3E%3Canimate attributeName='height' values='22;14;22' keyTimes='0;0.938;1' dur='.8s' repeatCount='indefinite' begin='-0.65s'/%3E%3Canimate attributeName='opacity' values='1;0.2;1' keyTimes='0;0.938;1' dur='.8s' repeatCount='indefinite' begin='-0.65s'/%3E%3C/rect%3E%3Crect x='17' y='1' width='6' height='22'%3E%3Canimate attributeName='y' values='1;5;1' keyTimes='0;0.938;1' dur='.8s' repeatCount='indefinite' begin='-0.5s'/%3E%3Canimate attributeName='height' values='22;14;22' keyTimes='0;0.938;1' dur='.8s' repeatCount='indefinite' begin='-0.5s'/%3E%3Canimate attributeName='opacity' values='1;0.2;1' keyTimes='0;0.938;1' dur='.8s' repeatCount='indefinite' begin='-0.5s'/%3E%3C/rect%3E%3C/svg%3E");
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.spinner--infinity {
|
|
115
|
-
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200px' height='200px' viewBox='0 0 100 100' preserveAspectRatio='xMidYMid'%3E%3Cpath fill='none' stroke='black' stroke-width='10' stroke-dasharray='205.271 51.318' d='M24.3 30C11.4 30 5 43.3 5 50s6.4 20 19.3 20c19.3 0 32.1-40 51.4-40C88.6 30 95 43.3 95 50s-6.4 20-19.3 20C56.4 70 43.6 30 24.3 30z' stroke-linecap='round' style='transform:scale(0.8);transform-origin:50px 50px'%3E%3Canimate attributeName='stroke-dashoffset' repeatCount='indefinite' dur='2s' keyTimes='0;1' values='0;256.589'/%3E%3C/path%3E%3C/svg%3E");
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
/* -------------------------------------------------------------------------------------------------
|
|
119
|
-
* Reduced motion
|
|
120
|
-
* -----------------------------------------------------------------------------------------------*/
|
|
121
|
-
@media (prefers-reduced-motion: reduce) {
|
|
122
|
-
.spinner [data-slot="spinner-icon"],
|
|
123
|
-
.spinner--dots,
|
|
124
|
-
.spinner--ring,
|
|
125
|
-
.spinner--ball,
|
|
126
|
-
.spinner--bars,
|
|
127
|
-
.spinner--infinity {
|
|
128
|
-
animation: none;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
}
|
|
1
|
+
@layer components {
|
|
2
|
+
/* -------------------------------------------------------------------------------------------------
|
|
3
|
+
* Base
|
|
4
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
5
|
+
.spinner {
|
|
6
|
+
pointer-events: none;
|
|
7
|
+
position: relative;
|
|
8
|
+
display: inline-flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
width: 1.5rem;
|
|
12
|
+
height: 1.5rem;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.spinner [data-slot="spinner-icon"] {
|
|
16
|
+
width: 100%;
|
|
17
|
+
height: 100%;
|
|
18
|
+
animation: spinner-rotate 0.8s linear infinite;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@keyframes spinner-rotate {
|
|
22
|
+
100% {
|
|
23
|
+
transform: rotate(360deg);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* -------------------------------------------------------------------------------------------------
|
|
28
|
+
* Size variants
|
|
29
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
30
|
+
.spinner--xs {
|
|
31
|
+
width: 1rem;
|
|
32
|
+
height: 1rem;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.spinner--sm {
|
|
36
|
+
width: 1.25rem;
|
|
37
|
+
height: 1.25rem;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* md is default */
|
|
41
|
+
|
|
42
|
+
.spinner--lg {
|
|
43
|
+
width: 2rem;
|
|
44
|
+
height: 2rem;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.spinner--xl {
|
|
48
|
+
width: 2.5rem;
|
|
49
|
+
height: 2.5rem;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* -------------------------------------------------------------------------------------------------
|
|
53
|
+
* Color variants
|
|
54
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
55
|
+
.spinner--current {
|
|
56
|
+
color: currentColor;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.spinner--accent {
|
|
60
|
+
color: var(--color-accent);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.spinner--success {
|
|
64
|
+
color: var(--color-success);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.spinner--warning {
|
|
68
|
+
color: var(--color-warning);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.spinner--danger {
|
|
72
|
+
color: var(--color-error);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* -------------------------------------------------------------------------------------------------
|
|
76
|
+
* CSS mask-image variants (legacy, non-spinner)
|
|
77
|
+
* These use background-color + mask-image for animated SVG patterns
|
|
78
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
79
|
+
.spinner--dots,
|
|
80
|
+
.spinner--ring,
|
|
81
|
+
.spinner--ball,
|
|
82
|
+
.spinner--bars,
|
|
83
|
+
.spinner--infinity {
|
|
84
|
+
background-color: currentColor;
|
|
85
|
+
mask-size: 100%;
|
|
86
|
+
mask-repeat: no-repeat;
|
|
87
|
+
mask-position: center;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.spinner--dots [data-slot="spinner-icon"],
|
|
91
|
+
.spinner--ring [data-slot="spinner-icon"],
|
|
92
|
+
.spinner--ball [data-slot="spinner-icon"],
|
|
93
|
+
.spinner--bars [data-slot="spinner-icon"],
|
|
94
|
+
.spinner--infinity [data-slot="spinner-icon"] {
|
|
95
|
+
display: none;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.spinner--dots {
|
|
99
|
+
mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='4' cy='12' r='3'%3E%3Canimate attributeName='cy' values='12;6;12;12' keyTimes='0;0.286;0.571;1' dur='1.05s' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle cx='12' cy='12' r='3'%3E%3Canimate attributeName='cy' values='12;6;12;12' keyTimes='0;0.286;0.571;1' dur='1.05s' repeatCount='indefinite' begin='0.1s'/%3E%3C/circle%3E%3Ccircle cx='20' cy='12' r='3'%3E%3Canimate attributeName='cy' values='12;6;12;12' keyTimes='0;0.286;0.571;1' dur='1.05s' repeatCount='indefinite' begin='0.2s'/%3E%3C/circle%3E%3C/svg%3E");
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.spinner--ring {
|
|
103
|
+
mask-image: url("data:image/svg+xml,%3Csvg width='44' height='44' viewBox='0 0 44 44' xmlns='http://www.w3.org/2000/svg' stroke='white'%3E%3Cg fill='none' fill-rule='evenodd' stroke-width='2'%3E%3Ccircle cx='22' cy='22' r='1'%3E%3Canimate attributeName='r' begin='0s' dur='1.8s' values='1;20' calcMode='spline' keyTimes='0;1' keySplines='0.165,0.84,0.44,1' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-opacity' begin='0s' dur='1.8s' values='1;0' calcMode='spline' keyTimes='0;1' keySplines='0.3,0.61,0.355,1' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle cx='22' cy='22' r='1'%3E%3Canimate attributeName='r' begin='-0.9s' dur='1.8s' values='1;20' calcMode='spline' keyTimes='0;1' keySplines='0.165,0.84,0.44,1' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-opacity' begin='-0.9s' dur='1.8s' values='1;0' calcMode='spline' keyTimes='0;1' keySplines='0.3,0.61,0.355,1' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.spinner--ball {
|
|
107
|
+
mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cellipse cx='12' cy='5' rx='4' ry='4'%3E%3Canimate attributeName='cy' values='5;20;20.5;20;5' keyTimes='0;0.469;0.5;0.531;1' dur='.8s' repeatCount='indefinite'/%3E%3Canimate attributeName='rx' values='4;4;4.8;4;4' keyTimes='0;0.469;0.5;0.531;1' dur='.8s' repeatCount='indefinite'/%3E%3Canimate attributeName='ry' values='4;4;3;4;4' keyTimes='0;0.469;0.5;0.531;1' dur='.8s' repeatCount='indefinite'/%3E%3C/ellipse%3E%3C/svg%3E");
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.spinner--bars {
|
|
111
|
+
mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='1' y='1' width='6' height='22'%3E%3Canimate attributeName='y' values='1;5;1' keyTimes='0;0.938;1' dur='.8s' repeatCount='indefinite'/%3E%3Canimate attributeName='height' values='22;14;22' keyTimes='0;0.938;1' dur='.8s' repeatCount='indefinite'/%3E%3Canimate attributeName='opacity' values='1;0.2;1' keyTimes='0;0.938;1' dur='.8s' repeatCount='indefinite'/%3E%3C/rect%3E%3Crect x='9' y='1' width='6' height='22'%3E%3Canimate attributeName='y' values='1;5;1' keyTimes='0;0.938;1' dur='.8s' repeatCount='indefinite' begin='-0.65s'/%3E%3Canimate attributeName='height' values='22;14;22' keyTimes='0;0.938;1' dur='.8s' repeatCount='indefinite' begin='-0.65s'/%3E%3Canimate attributeName='opacity' values='1;0.2;1' keyTimes='0;0.938;1' dur='.8s' repeatCount='indefinite' begin='-0.65s'/%3E%3C/rect%3E%3Crect x='17' y='1' width='6' height='22'%3E%3Canimate attributeName='y' values='1;5;1' keyTimes='0;0.938;1' dur='.8s' repeatCount='indefinite' begin='-0.5s'/%3E%3Canimate attributeName='height' values='22;14;22' keyTimes='0;0.938;1' dur='.8s' repeatCount='indefinite' begin='-0.5s'/%3E%3Canimate attributeName='opacity' values='1;0.2;1' keyTimes='0;0.938;1' dur='.8s' repeatCount='indefinite' begin='-0.5s'/%3E%3C/rect%3E%3C/svg%3E");
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.spinner--infinity {
|
|
115
|
+
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200px' height='200px' viewBox='0 0 100 100' preserveAspectRatio='xMidYMid'%3E%3Cpath fill='none' stroke='black' stroke-width='10' stroke-dasharray='205.271 51.318' d='M24.3 30C11.4 30 5 43.3 5 50s6.4 20 19.3 20c19.3 0 32.1-40 51.4-40C88.6 30 95 43.3 95 50s-6.4 20-19.3 20C56.4 70 43.6 30 24.3 30z' stroke-linecap='round' style='transform:scale(0.8);transform-origin:50px 50px'%3E%3Canimate attributeName='stroke-dashoffset' repeatCount='indefinite' dur='2s' keyTimes='0;1' values='0;256.589'/%3E%3C/path%3E%3C/svg%3E");
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* -------------------------------------------------------------------------------------------------
|
|
119
|
+
* Reduced motion
|
|
120
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
121
|
+
@media (prefers-reduced-motion: reduce) {
|
|
122
|
+
.spinner [data-slot="spinner-icon"],
|
|
123
|
+
.spinner--dots,
|
|
124
|
+
.spinner--ring,
|
|
125
|
+
.spinner--ball,
|
|
126
|
+
.spinner--bars,
|
|
127
|
+
.spinner--infinity {
|
|
128
|
+
animation: none;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|