@sakoa/ui 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +171 -0
- package/dist/App.d.ts +2 -0
- package/dist/cli/index.js +9243 -0
- package/dist/components/DemoSection.d.ts +30 -0
- package/dist/components/SApiKeyboard.d.ts +22 -0
- package/dist/components/SApiSection.d.ts +21 -0
- package/dist/components/SApiTable.d.ts +46 -0
- package/dist/components/STableOfContents.d.ts +2 -0
- package/dist/components/ui/SAlert.d.ts +76 -0
- package/dist/components/ui/SBadge.d.ts +56 -0
- package/dist/components/ui/SButton.d.ts +67 -0
- package/dist/components/ui/SCheckbox.d.ts +64 -0
- package/dist/components/ui/SChip.d.ts +43 -0
- package/dist/components/ui/SDatePicker.d.ts +77 -0
- package/dist/components/ui/SGlassButton.d.ts +70 -0
- package/dist/components/ui/SIcon.d.ts +29 -0
- package/dist/components/ui/SInput.d.ts +129 -0
- package/dist/components/ui/SKbd.d.ts +24 -0
- package/dist/components/ui/SKbdShortcut.d.ts +14 -0
- package/dist/components/ui/SSelect.d.ts +148 -0
- package/dist/components/ui/SSkeleton.d.ts +37 -0
- package/dist/components/ui/SSwitch.d.ts +61 -0
- package/dist/components/ui/STooltip.d.ts +82 -0
- package/dist/components/ui/accordion/SAccordionContent.d.ts +23 -0
- package/dist/components/ui/accordion/SAccordionItem.d.ts +70 -0
- package/dist/components/ui/accordion/SAccordionTrigger.d.ts +37 -0
- package/dist/components/ui/accordion/index.d.ts +4 -0
- package/dist/components/ui/avatar/SAvatar.d.ts +36 -0
- package/dist/components/ui/avatar/SAvatarFallback.d.ts +26 -0
- package/dist/components/ui/avatar/SAvatarGroup.d.ts +30 -0
- package/dist/components/ui/avatar/SAvatarImage.d.ts +23 -0
- package/dist/components/ui/avatar/index.d.ts +4 -0
- package/dist/components/ui/breadcrumb/SBreadcrumb.d.ts +22 -0
- package/dist/components/ui/breadcrumb/SBreadcrumbEllipsis.d.ts +17 -0
- package/dist/components/ui/breadcrumb/SBreadcrumbItem.d.ts +17 -0
- package/dist/components/ui/breadcrumb/SBreadcrumbLink.d.ts +26 -0
- package/dist/components/ui/breadcrumb/SBreadcrumbList.d.ts +17 -0
- package/dist/components/ui/breadcrumb/SBreadcrumbPage.d.ts +17 -0
- package/dist/components/ui/breadcrumb/SBreadcrumbSeparator.d.ts +17 -0
- package/dist/components/ui/breadcrumb/index.d.ts +7 -0
- package/dist/components/ui/card/SCard.d.ts +103 -0
- package/dist/components/ui/card/SCardActions.d.ts +44 -0
- package/dist/components/ui/card/SCardContent.d.ts +35 -0
- package/dist/components/ui/card/SCardFooter.d.ts +38 -0
- package/dist/components/ui/card/SCardHeader.d.ts +53 -0
- package/dist/components/ui/card/SCardMedia.d.ts +83 -0
- package/dist/components/ui/card/SGlassCard.d.ts +103 -0
- package/dist/components/ui/card/SMorphingCardContent.d.ts +18 -0
- package/dist/components/ui/card/index.d.ts +24 -0
- package/dist/components/ui/carousel/SCarousel.d.ts +166 -0
- package/dist/components/ui/carousel/index.d.ts +2 -0
- package/dist/components/ui/color-picker/SColorPickerAlphaSlider.d.ts +4 -0
- package/dist/components/ui/color-picker/SColorPickerCopy.d.ts +19 -0
- package/dist/components/ui/color-picker/SColorPickerEyeDropper.d.ts +17 -0
- package/dist/components/ui/color-picker/SColorPickerHueSlider.d.ts +4 -0
- package/dist/components/ui/color-picker/SColorPickerInputs.d.ts +2 -0
- package/dist/components/ui/color-picker/SColorPickerPresets.d.ts +9 -0
- package/dist/components/ui/color-picker/SColorPickerPreview.d.ts +2 -0
- package/dist/components/ui/color-picker/SColorPickerRecent.d.ts +7 -0
- package/dist/components/ui/color-picker/SColorPickerSpectrum.d.ts +4 -0
- package/dist/components/ui/color-picker/index.d.ts +11 -0
- package/dist/components/ui/drawer/index.d.ts +11 -0
- package/dist/components/ui/dropdown/SDropdownDivider.d.ts +8 -0
- package/dist/components/ui/dropdown/SDropdownGroup.d.ts +25 -0
- package/dist/components/ui/dropdown/SDropdownItem.d.ts +56 -0
- package/dist/components/ui/dropdown/index.d.ts +4 -0
- package/dist/components/ui/form/SForm.d.ts +38 -0
- package/dist/components/ui/form/SFormField.d.ts +31 -0
- package/dist/components/ui/form/index.d.ts +5 -0
- package/dist/components/ui/modal/index.d.ts +19 -0
- package/dist/components/ui/option/SOption.d.ts +32 -0
- package/dist/components/ui/option/SOptionGroup.d.ts +28 -0
- package/dist/components/ui/option/index.d.ts +2 -0
- package/dist/components/ui/otp/SOTP.d.ts +122 -0
- package/dist/components/ui/otp/SOTPGroup.d.ts +23 -0
- package/dist/components/ui/otp/SOTPSeparator.d.ts +17 -0
- package/dist/components/ui/otp/SOTPSlot.d.ts +49 -0
- package/dist/components/ui/otp/index.d.ts +7 -0
- package/dist/components/ui/otp/types.d.ts +26 -0
- package/dist/components/ui/otp/useOTPContext.d.ts +42 -0
- package/dist/components/ui/pagination/SPagination.d.ts +151 -0
- package/dist/components/ui/pagination/index.d.ts +2 -0
- package/dist/components/ui/progress/SProgress.d.ts +62 -0
- package/dist/components/ui/progress/SProgressRange.d.ts +91 -0
- package/dist/components/ui/progress/index.d.ts +4 -0
- package/dist/components/ui/radio/SRadio.d.ts +58 -0
- package/dist/components/ui/radio/SRadioGroup.d.ts +52 -0
- package/dist/components/ui/radio/index.d.ts +2 -0
- package/dist/components/ui/stepper/SStepper.d.ts +83 -0
- package/dist/components/ui/stepper/SStepperContent.d.ts +24 -0
- package/dist/components/ui/stepper/SStepperDescription.d.ts +20 -0
- package/dist/components/ui/stepper/SStepperIndicator.d.ts +37 -0
- package/dist/components/ui/stepper/SStepperItem.d.ts +37 -0
- package/dist/components/ui/stepper/SStepperSeparator.d.ts +5 -0
- package/dist/components/ui/stepper/SStepperTitle.d.ts +20 -0
- package/dist/components/ui/stepper/SStepperTrigger.d.ts +22 -0
- package/dist/components/ui/stepper/index.d.ts +11 -0
- package/dist/components/ui/table/STableBody.d.ts +27 -0
- package/dist/components/ui/table/STableCell.d.ts +55 -0
- package/dist/components/ui/table/STableColumn.d.ts +87 -0
- package/dist/components/ui/table/STableEmpty.d.ts +54 -0
- package/dist/components/ui/table/STableHeader.d.ts +25 -0
- package/dist/components/ui/table/STableRow.d.ts +38 -0
- package/dist/components/ui/table/STableSkeleton.d.ts +29 -0
- package/dist/components/ui/table/index.d.ts +98 -0
- package/dist/components/ui/table/useDataTable.d.ts +80 -0
- package/dist/components/ui/tabs/STabPane.d.ts +31 -0
- package/dist/components/ui/tabs/STabsContent.d.ts +21 -0
- package/dist/components/ui/tabs/STabsIndicator.d.ts +9 -0
- package/dist/components/ui/tabs/STabsTrigger.d.ts +28 -0
- package/dist/components/ui/tabs/index.d.ts +6 -0
- package/dist/components/ui/toast/SToast.d.ts +49 -0
- package/dist/components/ui/toast/SToastContainer.d.ts +21 -0
- package/dist/components/ui/toast/index.d.ts +2 -0
- package/dist/composables/useAsync.d.ts +134 -0
- package/dist/composables/useClickOutside.d.ts +69 -0
- package/dist/composables/useClipboard.d.ts +46 -0
- package/dist/composables/useDebounce.d.ts +150 -0
- package/dist/composables/useDialog.d.ts +118 -0
- package/dist/composables/useForm.d.ts +204 -0
- package/dist/composables/useHotkey.d.ts +128 -0
- package/dist/composables/useIntersectionObserver.d.ts +156 -0
- package/dist/composables/useLocalStorage.d.ts +120 -0
- package/dist/composables/useMediaQuery.d.ts +115 -0
- package/dist/composables/useTheme.d.ts +8 -0
- package/dist/composables/useToast.d.ts +1619 -0
- package/dist/index.d.ts +71 -0
- package/dist/layouts/UILayout.d.ts +2 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/main.d.ts +0 -0
- package/dist/router.d.ts +2 -0
- package/dist/saka-ui.css +1 -0
- package/dist/saka-ui.js +18513 -0
- package/dist/saka-ui.umd.cjs +38 -0
- package/dist/views/docs/CustomizationView.d.ts +2 -0
- package/dist/views/docs/FormValidationView.d.ts +2 -0
- package/dist/views/docs/StylingGuideView.d.ts +2 -0
- package/dist/views/docs/UseAsyncView.d.ts +2 -0
- package/dist/views/docs/UseClickOutsideView.d.ts +124 -0
- package/dist/views/docs/UseClipboardView.d.ts +4 -0
- package/dist/views/docs/UseDebounceView.d.ts +2 -0
- package/dist/views/docs/UseHotkeyView.d.ts +205 -0
- package/dist/views/docs/UseIntersectionObserverView.d.ts +5 -0
- package/dist/views/docs/UseLocalStorageView.d.ts +2 -0
- package/dist/views/docs/UseMediaQueryView.d.ts +2 -0
- package/dist/views/docs/UseThemeView.d.ts +2 -0
- package/dist/views/examples/AuthFormView.d.ts +2 -0
- package/dist/views/examples/CreditCardFormView.d.ts +6 -0
- package/dist/views/examples/FormFieldExampleView.d.ts +2 -0
- package/dist/views/examples/ProjectFormView.d.ts +2 -0
- package/dist/views/ui/AccordionView.d.ts +2 -0
- package/dist/views/ui/AlertView.d.ts +2 -0
- package/dist/views/ui/AvatarView.d.ts +2 -0
- package/dist/views/ui/BadgeView.d.ts +2 -0
- package/dist/views/ui/BreadcrumbView.d.ts +2 -0
- package/dist/views/ui/ButtonView.d.ts +2 -0
- package/dist/views/ui/CardView.d.ts +2 -0
- package/dist/views/ui/CarouselView.d.ts +274 -0
- package/dist/views/ui/CheckboxView.d.ts +2 -0
- package/dist/views/ui/ChipView.d.ts +2 -0
- package/dist/views/ui/ColorPickerView.d.ts +2 -0
- package/dist/views/ui/DatePickerView.d.ts +2 -0
- package/dist/views/ui/DialogView.d.ts +2 -0
- package/dist/views/ui/DrawerView.d.ts +2 -0
- package/dist/views/ui/DropdownView.d.ts +2 -0
- package/dist/views/ui/GlassButtonView.d.ts +2 -0
- package/dist/views/ui/GlassCardView.d.ts +2 -0
- package/dist/views/ui/HomeView.d.ts +2 -0
- package/dist/views/ui/IconsView.d.ts +2 -0
- package/dist/views/ui/InputView.d.ts +2 -0
- package/dist/views/ui/KbdView.d.ts +2 -0
- package/dist/views/ui/ModalView.d.ts +2 -0
- package/dist/views/ui/MorphingCardView.d.ts +2 -0
- package/dist/views/ui/MorphingModalView.d.ts +2 -0
- package/dist/views/ui/OTPView.d.ts +206 -0
- package/dist/views/ui/PaginationView.d.ts +2 -0
- package/dist/views/ui/ProgressView.d.ts +2 -0
- package/dist/views/ui/RadioView.d.ts +2 -0
- package/dist/views/ui/SelectView.d.ts +2 -0
- package/dist/views/ui/SkeletonView.d.ts +2 -0
- package/dist/views/ui/StepperView.d.ts +2 -0
- package/dist/views/ui/SwitchView.d.ts +2 -0
- package/dist/views/ui/TableView.d.ts +2 -0
- package/dist/views/ui/TabsView.d.ts +2 -0
- package/dist/views/ui/ToastView.d.ts +2 -0
- package/dist/views/ui/TooltipView.d.ts +2 -0
- package/dist/vite.svg +1 -0
- package/package.json +64 -0
- package/registry/components/accordion.json +19 -0
- package/registry/components/alert.json +17 -0
- package/registry/components/avatar.json +18 -0
- package/registry/components/badge.json +14 -0
- package/registry/components/breadcrumb.json +24 -0
- package/registry/components/button.json +17 -0
- package/registry/components/card.json +23 -0
- package/registry/components/carousel.json +19 -0
- package/registry/components/checkbox.json +17 -0
- package/registry/components/chip.json +17 -0
- package/registry/components/color-picker.json +24 -0
- package/registry/components/date-picker.json +17 -0
- package/registry/components/drawer.json +26 -0
- package/registry/components/dropdown.json +21 -0
- package/registry/components/form.json +16 -0
- package/registry/components/glass-button.json +17 -0
- package/registry/components/icon.json +17 -0
- package/registry/components/input.json +17 -0
- package/registry/components/kbd.json +16 -0
- package/registry/components/modal.json +32 -0
- package/registry/components/option.json +16 -0
- package/registry/components/otp.json +23 -0
- package/registry/components/pagination.json +18 -0
- package/registry/components/progress.json +16 -0
- package/registry/components/radio.json +19 -0
- package/registry/components/select.json +17 -0
- package/registry/components/skeleton.json +14 -0
- package/registry/components/switch.json +17 -0
- package/registry/components/table.json +26 -0
- package/registry/components/tabs.json +19 -0
- package/registry/components/toast.json +19 -0
- package/registry/components/tooltip.json +14 -0
- package/registry/index.json +4 -0
- package/registry/source/components/ui/SAlert.vue +388 -0
- package/registry/source/components/ui/SBadge.vue +243 -0
- package/registry/source/components/ui/SButton.vue +387 -0
- package/registry/source/components/ui/SCheckbox.vue +310 -0
- package/registry/source/components/ui/SChip.vue +130 -0
- package/registry/source/components/ui/SDatePicker.vue +1290 -0
- package/registry/source/components/ui/SGlassButton.vue +547 -0
- package/registry/source/components/ui/SIcon.vue +78 -0
- package/registry/source/components/ui/SInput.vue +1054 -0
- package/registry/source/components/ui/SKbd.vue +96 -0
- package/registry/source/components/ui/SKbdShortcut.vue +36 -0
- package/registry/source/components/ui/SSelect.vue +1290 -0
- package/registry/source/components/ui/SSkeleton.vue +185 -0
- package/registry/source/components/ui/SSwitch.vue +275 -0
- package/registry/source/components/ui/STooltip.vue +491 -0
- package/registry/source/components/ui/accordion/SAccordion.vue +248 -0
- package/registry/source/components/ui/accordion/SAccordionItem.vue +353 -0
- package/registry/source/components/ui/accordion/index.ts +5 -0
- package/registry/source/components/ui/avatar/SAvatar.vue +169 -0
- package/registry/source/components/ui/avatar/SAvatarFallback.vue +66 -0
- package/registry/source/components/ui/avatar/SAvatarGroup.vue +69 -0
- package/registry/source/components/ui/avatar/SAvatarImage.vue +92 -0
- package/registry/source/components/ui/avatar/index.ts +5 -0
- package/registry/source/components/ui/breadcrumb/SBreadcrumb.vue +23 -0
- package/registry/source/components/ui/breadcrumb/SBreadcrumbEllipsis.vue +17 -0
- package/registry/source/components/ui/breadcrumb/SBreadcrumbItem.vue +14 -0
- package/registry/source/components/ui/breadcrumb/SBreadcrumbLink.vue +46 -0
- package/registry/source/components/ui/breadcrumb/SBreadcrumbList.vue +17 -0
- package/registry/source/components/ui/breadcrumb/SBreadcrumbPage.vue +15 -0
- package/registry/source/components/ui/breadcrumb/SBreadcrumbSeparator.vue +18 -0
- package/registry/source/components/ui/breadcrumb/index.ts +7 -0
- package/registry/source/components/ui/card/SCard.vue +517 -0
- package/registry/source/components/ui/card/SCardActions.vue +129 -0
- package/registry/source/components/ui/card/SCardContent.vue +117 -0
- package/registry/source/components/ui/card/SCardFooter.vue +103 -0
- package/registry/source/components/ui/card/SCardHeader.vue +163 -0
- package/registry/source/components/ui/card/SCardMedia.vue +312 -0
- package/registry/source/components/ui/card/index.ts +34 -0
- package/registry/source/components/ui/carousel/SCarousel.vue +1069 -0
- package/registry/source/components/ui/carousel/SCarouselSlide.vue +107 -0
- package/registry/source/components/ui/carousel/index.ts +3 -0
- package/registry/source/components/ui/color-picker/SColorPicker.vue +772 -0
- package/registry/source/components/ui/color-picker/SColorPickerAlphaSlider.vue +158 -0
- package/registry/source/components/ui/color-picker/SColorPickerCopy.vue +76 -0
- package/registry/source/components/ui/color-picker/SColorPickerEyeDropper.vue +68 -0
- package/registry/source/components/ui/color-picker/SColorPickerHueSlider.vue +138 -0
- package/registry/source/components/ui/color-picker/SColorPickerInputs.vue +227 -0
- package/registry/source/components/ui/color-picker/SColorPickerPresets.vue +87 -0
- package/registry/source/components/ui/color-picker/SColorPickerPreview.vue +46 -0
- package/registry/source/components/ui/color-picker/SColorPickerRecent.vue +74 -0
- package/registry/source/components/ui/color-picker/SColorPickerSpectrum.vue +149 -0
- package/registry/source/components/ui/color-picker/index.ts +11 -0
- package/registry/source/components/ui/drawer/SDrawer.vue +797 -0
- package/registry/source/components/ui/drawer/SDrawerClose.vue +64 -0
- package/registry/source/components/ui/drawer/SDrawerContent.vue +81 -0
- package/registry/source/components/ui/drawer/SDrawerDescription.vue +40 -0
- package/registry/source/components/ui/drawer/SDrawerFooter.vue +97 -0
- package/registry/source/components/ui/drawer/SDrawerHandle.vue +79 -0
- package/registry/source/components/ui/drawer/SDrawerHeader.vue +117 -0
- package/registry/source/components/ui/drawer/SDrawerTitle.vue +40 -0
- package/registry/source/components/ui/drawer/SDrawerTrigger.vue +51 -0
- package/registry/source/components/ui/drawer/index.ts +20 -0
- package/registry/source/components/ui/dropdown/SDropdown.vue +843 -0
- package/registry/source/components/ui/dropdown/SDropdownDivider.vue +23 -0
- package/registry/source/components/ui/dropdown/SDropdownGroup.vue +53 -0
- package/registry/source/components/ui/dropdown/SDropdownItem.vue +179 -0
- package/registry/source/components/ui/dropdown/index.ts +5 -0
- package/registry/source/components/ui/form/SForm.vue +84 -0
- package/registry/source/components/ui/form/SFormField.vue +78 -0
- package/registry/source/components/ui/form/index.ts +8 -0
- package/registry/source/components/ui/modal/SModal.vue +648 -0
- package/registry/source/components/ui/modal/SModalClose.vue +49 -0
- package/registry/source/components/ui/modal/SModalContent.vue +74 -0
- package/registry/source/components/ui/modal/SModalDescription.vue +39 -0
- package/registry/source/components/ui/modal/SModalFooter.vue +84 -0
- package/registry/source/components/ui/modal/SModalHeader.vue +107 -0
- package/registry/source/components/ui/modal/SModalTitle.vue +39 -0
- package/registry/source/components/ui/modal/SModalTrigger.vue +61 -0
- package/registry/source/components/ui/modal/SMorphingModal.vue +429 -0
- package/registry/source/components/ui/modal/SMorphingModalClose.vue +42 -0
- package/registry/source/components/ui/modal/SMorphingModalDescription.vue +49 -0
- package/registry/source/components/ui/modal/SMorphingModalImage.vue +44 -0
- package/registry/source/components/ui/modal/SMorphingModalSubtitle.vue +29 -0
- package/registry/source/components/ui/modal/SMorphingModalTitle.vue +34 -0
- package/registry/source/components/ui/modal/SMorphingModalTrigger.vue +95 -0
- package/registry/source/components/ui/modal/index.ts +32 -0
- package/registry/source/components/ui/option/SOption.vue +180 -0
- package/registry/source/components/ui/option/SOptionGroup.vue +77 -0
- package/registry/source/components/ui/option/index.ts +3 -0
- package/registry/source/components/ui/otp/SOTP.vue +843 -0
- package/registry/source/components/ui/otp/SOTPGroup.vue +29 -0
- package/registry/source/components/ui/otp/SOTPSeparator.vue +15 -0
- package/registry/source/components/ui/otp/SOTPSlot.vue +462 -0
- package/registry/source/components/ui/otp/index.ts +7 -0
- package/registry/source/components/ui/otp/types.ts +27 -0
- package/registry/source/components/ui/otp/useOTPContext.ts +62 -0
- package/registry/source/components/ui/pagination/SPagination.vue +923 -0
- package/registry/source/components/ui/pagination/index.ts +8 -0
- package/registry/source/components/ui/progress/SProgress.vue +635 -0
- package/registry/source/components/ui/progress/SProgressRange.vue +715 -0
- package/registry/source/components/ui/progress/index.ts +4 -0
- package/registry/source/components/ui/radio/SRadio.vue +407 -0
- package/registry/source/components/ui/radio/SRadioGroup.vue +200 -0
- package/registry/source/components/ui/radio/index.ts +3 -0
- package/registry/source/components/ui/table/SDataTable.vue +828 -0
- package/registry/source/components/ui/table/STableBody.vue +70 -0
- package/registry/source/components/ui/table/STableCell.vue +147 -0
- package/registry/source/components/ui/table/STableColumn.vue +120 -0
- package/registry/source/components/ui/table/STableEmpty.vue +159 -0
- package/registry/source/components/ui/table/STableHeader.vue +132 -0
- package/registry/source/components/ui/table/STableRow.vue +106 -0
- package/registry/source/components/ui/table/STableSkeleton.vue +208 -0
- package/registry/source/components/ui/table/index.ts +126 -0
- package/registry/source/components/ui/table/useDataTable.ts +519 -0
- package/registry/source/components/ui/tabs/STabPane.vue +130 -0
- package/registry/source/components/ui/tabs/STabs.vue +467 -0
- package/registry/source/components/ui/tabs/index.ts +7 -0
- package/registry/source/components/ui/toast/SToast.vue +261 -0
- package/registry/source/components/ui/toast/SToastContainer.vue +209 -0
- package/registry/source/components/ui/toast/index.ts +2 -0
- package/registry/source/composables/useForm.ts +960 -0
- package/registry/source/composables/useTheme.ts +86 -0
- package/registry/source/composables/useToast.ts +440 -0
- package/registry/source/lib/utils.ts +6 -0
|
@@ -0,0 +1,635 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
defineOptions({ inheritAttrs: false })
|
|
3
|
+
|
|
4
|
+
import { computed, ref, watch, onMounted } from 'vue'
|
|
5
|
+
import { cn } from '../../../lib/utils'
|
|
6
|
+
|
|
7
|
+
export interface Props {
|
|
8
|
+
// Core
|
|
9
|
+
modelValue?: number
|
|
10
|
+
min?: number
|
|
11
|
+
max?: number
|
|
12
|
+
|
|
13
|
+
// Visual
|
|
14
|
+
variant?: 'default' | 'gradient' | 'striped' | 'buffer' | 'segments' | 'liquid'
|
|
15
|
+
size?: 'xs' | 'small' | 'medium' | 'large' | 'xl'
|
|
16
|
+
orientation?: 'horizontal' | 'vertical'
|
|
17
|
+
rounded?: 'none' | 'sm' | 'md' | 'lg' | 'full'
|
|
18
|
+
color?: string
|
|
19
|
+
trackColor?: string
|
|
20
|
+
gradientColors?: string[]
|
|
21
|
+
|
|
22
|
+
// Buffer variant
|
|
23
|
+
bufferValue?: number
|
|
24
|
+
bufferColor?: string
|
|
25
|
+
|
|
26
|
+
// Segments variant
|
|
27
|
+
segments?: number
|
|
28
|
+
segmentGap?: number
|
|
29
|
+
|
|
30
|
+
// Animation
|
|
31
|
+
animated?: boolean
|
|
32
|
+
animationType?: 'pulse' | 'wave' | 'shimmer' | 'bounce' | 'flow' | 'none'
|
|
33
|
+
animationSpeed?: 'slow' | 'normal' | 'fast'
|
|
34
|
+
indeterminate?: boolean
|
|
35
|
+
|
|
36
|
+
// Display
|
|
37
|
+
showValue?: boolean
|
|
38
|
+
valuePosition?: 'inside' | 'outside' | 'top' | 'tooltip'
|
|
39
|
+
valueFormat?: (value: number, min: number, max: number) => string
|
|
40
|
+
label?: string
|
|
41
|
+
labelPosition?: 'top' | 'bottom' | 'left' | 'right'
|
|
42
|
+
|
|
43
|
+
// States
|
|
44
|
+
disabled?: boolean
|
|
45
|
+
|
|
46
|
+
// Advanced
|
|
47
|
+
height?: string
|
|
48
|
+
width?: string
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
52
|
+
modelValue: 0,
|
|
53
|
+
min: 0,
|
|
54
|
+
max: 100,
|
|
55
|
+
variant: 'default',
|
|
56
|
+
size: 'medium',
|
|
57
|
+
orientation: 'horizontal',
|
|
58
|
+
rounded: 'full',
|
|
59
|
+
color: 'var(--s-primary)',
|
|
60
|
+
trackColor: 'var(--s-accent)',
|
|
61
|
+
gradientColors: () => ['#06b6d4', '#3b82f6', '#8b5cf6'],
|
|
62
|
+
bufferValue: 0,
|
|
63
|
+
bufferColor: 'color-mix(in srgb, var(--s-primary) 15%, transparent)',
|
|
64
|
+
segments: 5,
|
|
65
|
+
segmentGap: 3,
|
|
66
|
+
animated: false,
|
|
67
|
+
animationType: 'none',
|
|
68
|
+
animationSpeed: 'normal',
|
|
69
|
+
indeterminate: false,
|
|
70
|
+
showValue: false,
|
|
71
|
+
valuePosition: 'outside',
|
|
72
|
+
label: undefined,
|
|
73
|
+
labelPosition: 'top',
|
|
74
|
+
disabled: false,
|
|
75
|
+
height: undefined,
|
|
76
|
+
width: undefined
|
|
77
|
+
})
|
|
78
|
+
|
|
79
|
+
const emit = defineEmits<{
|
|
80
|
+
'update:modelValue': [value: number]
|
|
81
|
+
}>()
|
|
82
|
+
|
|
83
|
+
// Refs
|
|
84
|
+
const progressRef = ref<HTMLElement | null>(null)
|
|
85
|
+
const showTooltip = ref(false)
|
|
86
|
+
const animatedValue = ref(0)
|
|
87
|
+
|
|
88
|
+
// Computed
|
|
89
|
+
const percentage = computed(() => {
|
|
90
|
+
const range = props.max - props.min
|
|
91
|
+
if (range <= 0) return 0
|
|
92
|
+
return Math.min(100, Math.max(0, ((props.modelValue - props.min) / range) * 100))
|
|
93
|
+
})
|
|
94
|
+
|
|
95
|
+
const bufferPercentage = computed(() => {
|
|
96
|
+
const range = props.max - props.min
|
|
97
|
+
if (range <= 0) return 0
|
|
98
|
+
return Math.min(100, Math.max(0, ((props.bufferValue - props.min) / range) * 100))
|
|
99
|
+
})
|
|
100
|
+
|
|
101
|
+
const displayValue = computed(() => {
|
|
102
|
+
if (props.valueFormat) {
|
|
103
|
+
return props.valueFormat(props.modelValue, props.min, props.max)
|
|
104
|
+
}
|
|
105
|
+
return `${Math.round(percentage.value)}%`
|
|
106
|
+
})
|
|
107
|
+
|
|
108
|
+
// Size config
|
|
109
|
+
const sizeConfig = computed(() => {
|
|
110
|
+
const sizes = {
|
|
111
|
+
xs: { height: '4px', fontSize: '10px', labelSize: 'text-xs' },
|
|
112
|
+
small: { height: '6px', fontSize: '10px', labelSize: 'text-xs' },
|
|
113
|
+
medium: { height: '10px', fontSize: '11px', labelSize: 'text-sm' },
|
|
114
|
+
large: { height: '16px', fontSize: '12px', labelSize: 'text-sm' },
|
|
115
|
+
xl: { height: '24px', fontSize: '14px', labelSize: 'text-base' }
|
|
116
|
+
}
|
|
117
|
+
return sizes[props.size]
|
|
118
|
+
})
|
|
119
|
+
|
|
120
|
+
// Rounded classes
|
|
121
|
+
const roundedClasses = computed(() => {
|
|
122
|
+
const radii = {
|
|
123
|
+
none: 'rounded-none',
|
|
124
|
+
sm: 'rounded',
|
|
125
|
+
md: 'rounded-lg',
|
|
126
|
+
lg: 'rounded-xl',
|
|
127
|
+
full: 'rounded-full'
|
|
128
|
+
}
|
|
129
|
+
return radii[props.rounded]
|
|
130
|
+
})
|
|
131
|
+
|
|
132
|
+
// Animation speed
|
|
133
|
+
const animationDuration = computed(() => {
|
|
134
|
+
const speeds = { slow: '2s', normal: '1.2s', fast: '0.8s' }
|
|
135
|
+
return speeds[props.animationSpeed]
|
|
136
|
+
})
|
|
137
|
+
|
|
138
|
+
// Dynamic styles
|
|
139
|
+
const trackStyle = computed(() => {
|
|
140
|
+
const style: Record<string, string> = {
|
|
141
|
+
'--progress-track': props.trackColor,
|
|
142
|
+
'--progress-color': props.color,
|
|
143
|
+
'--progress-buffer': props.bufferColor,
|
|
144
|
+
'--animation-duration': animationDuration.value
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
if (props.height) {
|
|
148
|
+
style.height = props.height
|
|
149
|
+
} else {
|
|
150
|
+
style.height = sizeConfig.value.height
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
if (props.width) {
|
|
154
|
+
style.width = props.width
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
if (props.orientation === 'vertical') {
|
|
158
|
+
style.width = props.width || sizeConfig.value.height
|
|
159
|
+
style.height = props.height || '200px'
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
return style
|
|
163
|
+
})
|
|
164
|
+
|
|
165
|
+
const fillStyle = computed(() => {
|
|
166
|
+
const style: Record<string, string> = {}
|
|
167
|
+
|
|
168
|
+
if (props.variant === 'gradient' && props.gradientColors.length >= 2) {
|
|
169
|
+
style.background = `linear-gradient(90deg, ${props.gradientColors.join(', ')})`
|
|
170
|
+
} else {
|
|
171
|
+
style.background = props.color
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
if (props.orientation === 'horizontal') {
|
|
175
|
+
style.width = props.indeterminate ? '30%' : `${percentage.value}%`
|
|
176
|
+
} else {
|
|
177
|
+
style.height = props.indeterminate ? '30%' : `${percentage.value}%`
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
return style
|
|
181
|
+
})
|
|
182
|
+
|
|
183
|
+
const bufferStyle = computed(() => ({
|
|
184
|
+
width: props.orientation === 'horizontal' ? `${bufferPercentage.value}%` : '100%',
|
|
185
|
+
height: props.orientation === 'vertical' ? `${bufferPercentage.value}%` : '100%'
|
|
186
|
+
}))
|
|
187
|
+
|
|
188
|
+
// Segment calculations
|
|
189
|
+
const segmentData = computed(() => {
|
|
190
|
+
if (props.variant !== 'segments') return []
|
|
191
|
+
const filledSegments = Math.floor((percentage.value / 100) * props.segments)
|
|
192
|
+
const partialFill = ((percentage.value / 100) * props.segments) % 1
|
|
193
|
+
|
|
194
|
+
return Array.from({ length: props.segments }, (_, i) => ({
|
|
195
|
+
index: i,
|
|
196
|
+
filled: i < filledSegments,
|
|
197
|
+
partial: i === filledSegments ? partialFill * 100 : 0
|
|
198
|
+
}))
|
|
199
|
+
})
|
|
200
|
+
|
|
201
|
+
// Animation classes
|
|
202
|
+
const animationClasses = computed(() => {
|
|
203
|
+
if (!props.animated && !props.indeterminate) return ''
|
|
204
|
+
|
|
205
|
+
const classes: string[] = []
|
|
206
|
+
|
|
207
|
+
if (props.indeterminate) {
|
|
208
|
+
classes.push('s-progress--indeterminate')
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
if (props.animated && props.animationType !== 'none') {
|
|
212
|
+
classes.push(`s-progress--${props.animationType}`)
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
return classes.join(' ')
|
|
216
|
+
})
|
|
217
|
+
|
|
218
|
+
// Container classes
|
|
219
|
+
const containerClasses = computed(() => {
|
|
220
|
+
const classes: string[] = ['s-progress']
|
|
221
|
+
|
|
222
|
+
if (props.orientation === 'vertical') {
|
|
223
|
+
classes.push('s-progress--vertical')
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
if (props.disabled) {
|
|
227
|
+
classes.push('opacity-50 cursor-not-allowed')
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
return classes.join(' ')
|
|
231
|
+
})
|
|
232
|
+
|
|
233
|
+
// Animate value on mount
|
|
234
|
+
onMounted(() => {
|
|
235
|
+
if (props.animated) {
|
|
236
|
+
requestAnimationFrame(() => {
|
|
237
|
+
animatedValue.value = props.modelValue
|
|
238
|
+
})
|
|
239
|
+
}
|
|
240
|
+
})
|
|
241
|
+
|
|
242
|
+
watch(() => props.modelValue, (newVal) => {
|
|
243
|
+
if (props.animated) {
|
|
244
|
+
animatedValue.value = newVal
|
|
245
|
+
}
|
|
246
|
+
})
|
|
247
|
+
</script>
|
|
248
|
+
|
|
249
|
+
<template>
|
|
250
|
+
<div
|
|
251
|
+
v-bind="$attrs"
|
|
252
|
+
:class="cn(
|
|
253
|
+
containerClasses,
|
|
254
|
+
labelPosition === 'left' || labelPosition === 'right' ? 'flex items-center gap-3' : 'flex flex-col gap-1.5',
|
|
255
|
+
labelPosition === 'right' && 'flex-row-reverse',
|
|
256
|
+
$attrs.class ?? ''
|
|
257
|
+
)"
|
|
258
|
+
>
|
|
259
|
+
<!-- Label (top/left) -->
|
|
260
|
+
<div
|
|
261
|
+
v-if="label && (labelPosition === 'top' || labelPosition === 'left')"
|
|
262
|
+
class="flex items-center justify-between gap-2"
|
|
263
|
+
:class="sizeConfig.labelSize"
|
|
264
|
+
>
|
|
265
|
+
<span class="text-muted-foreground font-medium">{{ label }}</span>
|
|
266
|
+
<span
|
|
267
|
+
v-if="showValue && valuePosition === 'top' && labelPosition === 'top'"
|
|
268
|
+
class="text-foreground font-semibold tabular-nums"
|
|
269
|
+
>
|
|
270
|
+
{{ displayValue }}
|
|
271
|
+
</span>
|
|
272
|
+
</div>
|
|
273
|
+
|
|
274
|
+
<!-- Progress Track -->
|
|
275
|
+
<div
|
|
276
|
+
class="s-progress__wrapper flex-1 relative min-w-0"
|
|
277
|
+
:class="showValue && valuePosition === 'outside' ? 'flex items-center' : ''"
|
|
278
|
+
>
|
|
279
|
+
<!-- Default/Gradient/Striped/Buffer/Liquid variants -->
|
|
280
|
+
<div
|
|
281
|
+
v-if="variant !== 'segments'"
|
|
282
|
+
ref="progressRef"
|
|
283
|
+
class="s-progress__track relative overflow-hidden flex-1"
|
|
284
|
+
:class="roundedClasses"
|
|
285
|
+
:style="trackStyle"
|
|
286
|
+
role="progressbar"
|
|
287
|
+
:aria-valuenow="modelValue"
|
|
288
|
+
:aria-valuemin="min"
|
|
289
|
+
:aria-valuemax="max"
|
|
290
|
+
:aria-label="label"
|
|
291
|
+
@mouseenter="valuePosition === 'tooltip' && (showTooltip = true)"
|
|
292
|
+
@mouseleave="valuePosition === 'tooltip' && (showTooltip = false)"
|
|
293
|
+
>
|
|
294
|
+
<!-- Buffer fill (buffer variant) -->
|
|
295
|
+
<div
|
|
296
|
+
v-if="variant === 'buffer'"
|
|
297
|
+
class="s-progress__buffer absolute inset-0 transition-all duration-300 ease-out"
|
|
298
|
+
:class="roundedClasses"
|
|
299
|
+
:style="bufferStyle"
|
|
300
|
+
/>
|
|
301
|
+
|
|
302
|
+
<!-- Main fill -->
|
|
303
|
+
<div
|
|
304
|
+
class="s-progress__fill relative h-full transition-all duration-500 ease-out"
|
|
305
|
+
:class="[
|
|
306
|
+
roundedClasses,
|
|
307
|
+
animationClasses,
|
|
308
|
+
{ 's-progress--striped': variant === 'striped' },
|
|
309
|
+
{ 's-progress--liquid': variant === 'liquid' }
|
|
310
|
+
]"
|
|
311
|
+
:style="fillStyle"
|
|
312
|
+
>
|
|
313
|
+
<!-- Value inside -->
|
|
314
|
+
<span
|
|
315
|
+
v-if="showValue && valuePosition === 'inside' && size !== 'xs' && size !== 'small'"
|
|
316
|
+
:class="['absolute inset-0 flex items-center justify-center font-semibold drop-shadow-sm tabular-nums', color === 'var(--s-primary)' ? 'text-primary-foreground' : 'text-white']"
|
|
317
|
+
:style="{ fontSize: sizeConfig.fontSize }"
|
|
318
|
+
>
|
|
319
|
+
{{ displayValue }}
|
|
320
|
+
</span>
|
|
321
|
+
|
|
322
|
+
<!-- Shimmer overlay -->
|
|
323
|
+
<div
|
|
324
|
+
v-if="animated && animationType === 'shimmer'"
|
|
325
|
+
class="s-progress__shimmer absolute inset-0"
|
|
326
|
+
/>
|
|
327
|
+
|
|
328
|
+
<!-- Wave effect -->
|
|
329
|
+
<div
|
|
330
|
+
v-if="animated && animationType === 'wave'"
|
|
331
|
+
class="s-progress__wave absolute inset-0"
|
|
332
|
+
/>
|
|
333
|
+
|
|
334
|
+
<!-- Liquid bubbles -->
|
|
335
|
+
<div v-if="variant === 'liquid'" class="s-progress__bubbles absolute inset-0 overflow-hidden">
|
|
336
|
+
<div class="bubble bubble-1" />
|
|
337
|
+
<div class="bubble bubble-2" />
|
|
338
|
+
<div class="bubble bubble-3" />
|
|
339
|
+
</div>
|
|
340
|
+
</div>
|
|
341
|
+
</div>
|
|
342
|
+
<!-- Segments variant -->
|
|
343
|
+
<div
|
|
344
|
+
v-else
|
|
345
|
+
class="s-progress__segments flex flex-1"
|
|
346
|
+
:class="orientation === 'vertical' ? 'flex-col-reverse' : 'flex-row'"
|
|
347
|
+
:style="{ gap: `${segmentGap}px`, ...trackStyle }"
|
|
348
|
+
role="progressbar"
|
|
349
|
+
:aria-valuenow="modelValue"
|
|
350
|
+
:aria-valuemin="min"
|
|
351
|
+
:aria-valuemax="max"
|
|
352
|
+
:aria-label="label"
|
|
353
|
+
>
|
|
354
|
+
<div
|
|
355
|
+
v-for="segment in segmentData"
|
|
356
|
+
:key="segment.index"
|
|
357
|
+
class="s-progress__segment flex-1 overflow-hidden"
|
|
358
|
+
:class="roundedClasses"
|
|
359
|
+
:style="{ background: trackColor }"
|
|
360
|
+
>
|
|
361
|
+
<div
|
|
362
|
+
class="h-full transition-all duration-300 ease-out"
|
|
363
|
+
:class="roundedClasses"
|
|
364
|
+
:style="{
|
|
365
|
+
background: variant === 'gradient' ? `linear-gradient(90deg, ${gradientColors.join(', ')})` : color,
|
|
366
|
+
width: segment.filled ? '100%' : `${segment.partial}%`
|
|
367
|
+
}"
|
|
368
|
+
/>
|
|
369
|
+
</div>
|
|
370
|
+
</div>
|
|
371
|
+
|
|
372
|
+
<!-- Tooltip (outside overflow:hidden container for non-segments) -->
|
|
373
|
+
<Transition
|
|
374
|
+
enter-active-class="transition-all duration-150 ease-out"
|
|
375
|
+
enter-from-class="opacity-0 -translate-y-1 scale-95"
|
|
376
|
+
enter-to-class="opacity-100 translate-y-0 scale-100"
|
|
377
|
+
leave-active-class="transition-all duration-100 ease-in"
|
|
378
|
+
leave-from-class="opacity-100 translate-y-0 scale-100"
|
|
379
|
+
leave-to-class="opacity-0 -translate-y-1 scale-95"
|
|
380
|
+
>
|
|
381
|
+
<div
|
|
382
|
+
v-if="showValue && valuePosition === 'tooltip' && showTooltip && variant !== 'segments'"
|
|
383
|
+
class="absolute z-10 px-2 py-1 rounded-md bg-muted border border-border shadow-lg text-xs font-semibold text-foreground whitespace-nowrap pointer-events-none"
|
|
384
|
+
:style="{
|
|
385
|
+
left: `${percentage}%`,
|
|
386
|
+
transform: 'translateX(-50%)',
|
|
387
|
+
bottom: 'calc(100% + 8px)'
|
|
388
|
+
}"
|
|
389
|
+
>
|
|
390
|
+
{{ displayValue }}
|
|
391
|
+
<div class="absolute top-full left-1/2 -translate-x-1/2 border-4 border-transparent border-t-muted" />
|
|
392
|
+
</div>
|
|
393
|
+
</Transition>
|
|
394
|
+
|
|
395
|
+
</div>
|
|
396
|
+
|
|
397
|
+
<!-- Value outside (right side) - using flex instead of absolute -->
|
|
398
|
+
<span
|
|
399
|
+
v-if="showValue && valuePosition === 'outside'"
|
|
400
|
+
class="font-semibold tabular-nums text-foreground shrink-0 whitespace-nowrap"
|
|
401
|
+
:class="[
|
|
402
|
+
sizeConfig.labelSize,
|
|
403
|
+
orientation === 'horizontal' ? 'ml-3' : 'mb-2'
|
|
404
|
+
]"
|
|
405
|
+
>
|
|
406
|
+
{{ displayValue }}
|
|
407
|
+
</span>
|
|
408
|
+
|
|
409
|
+
<!-- Label (bottom/right) -->
|
|
410
|
+
<div
|
|
411
|
+
v-if="label && (labelPosition === 'bottom' || labelPosition === 'right')"
|
|
412
|
+
class="flex items-center justify-between gap-2"
|
|
413
|
+
:class="sizeConfig.labelSize"
|
|
414
|
+
>
|
|
415
|
+
<span class="text-muted-foreground font-medium">{{ label }}</span>
|
|
416
|
+
<span
|
|
417
|
+
v-if="showValue && valuePosition === 'top' && labelPosition === 'bottom'"
|
|
418
|
+
class="text-foreground font-semibold tabular-nums"
|
|
419
|
+
>
|
|
420
|
+
{{ displayValue }}
|
|
421
|
+
</span>
|
|
422
|
+
</div>
|
|
423
|
+
</div>
|
|
424
|
+
</template>
|
|
425
|
+
|
|
426
|
+
<style scoped>
|
|
427
|
+
.s-progress__track {
|
|
428
|
+
background: var(--progress-track);
|
|
429
|
+
width: 100%;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
.s-progress__buffer {
|
|
433
|
+
background: var(--progress-buffer);
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
.s-progress__fill {
|
|
437
|
+
transform-origin: left center;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
.s-progress--vertical .s-progress__track {
|
|
441
|
+
width: auto;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
.s-progress--vertical .s-progress__fill {
|
|
445
|
+
width: 100% !important;
|
|
446
|
+
transform-origin: bottom center;
|
|
447
|
+
position: absolute;
|
|
448
|
+
bottom: 0;
|
|
449
|
+
left: 0;
|
|
450
|
+
right: 0;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
/* Striped pattern */
|
|
454
|
+
.s-progress--striped {
|
|
455
|
+
background-image: linear-gradient(
|
|
456
|
+
45deg,
|
|
457
|
+
rgba(255, 255, 255, 0.15) 25%,
|
|
458
|
+
transparent 25%,
|
|
459
|
+
transparent 50%,
|
|
460
|
+
rgba(255, 255, 255, 0.15) 50%,
|
|
461
|
+
rgba(255, 255, 255, 0.15) 75%,
|
|
462
|
+
transparent 75%,
|
|
463
|
+
transparent
|
|
464
|
+
);
|
|
465
|
+
background-size: 1rem 1rem;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
.s-progress--striped.s-progress--flow {
|
|
469
|
+
animation: stripe-flow var(--animation-duration) linear infinite;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
/* Indeterminate animation */
|
|
473
|
+
.s-progress--indeterminate {
|
|
474
|
+
animation: indeterminate var(--animation-duration) ease-in-out infinite;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
/* Pulse animation */
|
|
478
|
+
.s-progress--pulse {
|
|
479
|
+
animation: pulse var(--animation-duration) ease-in-out infinite;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
/* Wave animation overlay */
|
|
483
|
+
.s-progress__wave {
|
|
484
|
+
background: linear-gradient(
|
|
485
|
+
90deg,
|
|
486
|
+
transparent 0%,
|
|
487
|
+
rgba(255, 255, 255, 0.4) 50%,
|
|
488
|
+
transparent 100%
|
|
489
|
+
);
|
|
490
|
+
animation: wave var(--animation-duration) linear infinite;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
/* Shimmer animation */
|
|
494
|
+
.s-progress__shimmer {
|
|
495
|
+
background: linear-gradient(
|
|
496
|
+
90deg,
|
|
497
|
+
transparent 0%,
|
|
498
|
+
rgba(255, 255, 255, 0.3) 20%,
|
|
499
|
+
rgba(255, 255, 255, 0.5) 50%,
|
|
500
|
+
rgba(255, 255, 255, 0.3) 80%,
|
|
501
|
+
transparent 100%
|
|
502
|
+
);
|
|
503
|
+
animation: shimmer var(--animation-duration) ease-in-out infinite;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
/* Bounce animation */
|
|
507
|
+
.s-progress--bounce {
|
|
508
|
+
animation: bounce-progress var(--animation-duration) ease-in-out infinite;
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
/* Flow animation (for striped) */
|
|
512
|
+
.s-progress--flow {
|
|
513
|
+
animation: stripe-flow var(--animation-duration) linear infinite;
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
/* Liquid variant */
|
|
517
|
+
.s-progress--liquid {
|
|
518
|
+
position: relative;
|
|
519
|
+
overflow: hidden;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
.s-progress__bubbles .bubble {
|
|
523
|
+
position: absolute;
|
|
524
|
+
background: rgba(255, 255, 255, 0.3);
|
|
525
|
+
border-radius: 50%;
|
|
526
|
+
animation: bubble-rise 2s ease-in-out infinite;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
.bubble-1 {
|
|
530
|
+
width: 6px;
|
|
531
|
+
height: 6px;
|
|
532
|
+
left: 20%;
|
|
533
|
+
animation-delay: 0s;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
.bubble-2 {
|
|
537
|
+
width: 4px;
|
|
538
|
+
height: 4px;
|
|
539
|
+
left: 50%;
|
|
540
|
+
animation-delay: 0.5s;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
.bubble-3 {
|
|
544
|
+
width: 5px;
|
|
545
|
+
height: 5px;
|
|
546
|
+
left: 75%;
|
|
547
|
+
animation-delay: 1s;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
/* Keyframes */
|
|
551
|
+
@keyframes indeterminate {
|
|
552
|
+
0% {
|
|
553
|
+
transform: translateX(-100%);
|
|
554
|
+
}
|
|
555
|
+
100% {
|
|
556
|
+
transform: translateX(400%);
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
@keyframes pulse {
|
|
561
|
+
0%, 100% {
|
|
562
|
+
opacity: 1;
|
|
563
|
+
}
|
|
564
|
+
50% {
|
|
565
|
+
opacity: 0.6;
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
@keyframes wave {
|
|
570
|
+
0% {
|
|
571
|
+
transform: translateX(-100%);
|
|
572
|
+
}
|
|
573
|
+
100% {
|
|
574
|
+
transform: translateX(200%);
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
@keyframes shimmer {
|
|
579
|
+
0% {
|
|
580
|
+
transform: translateX(-150%);
|
|
581
|
+
}
|
|
582
|
+
100% {
|
|
583
|
+
transform: translateX(150%);
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
@keyframes bounce-progress {
|
|
588
|
+
0%, 100% {
|
|
589
|
+
transform: scaleX(1);
|
|
590
|
+
}
|
|
591
|
+
50% {
|
|
592
|
+
transform: scaleX(1.02);
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
@keyframes stripe-flow {
|
|
597
|
+
0% {
|
|
598
|
+
background-position: 1rem 0;
|
|
599
|
+
}
|
|
600
|
+
100% {
|
|
601
|
+
background-position: 0 0;
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
@keyframes bubble-rise {
|
|
606
|
+
0% {
|
|
607
|
+
bottom: -10%;
|
|
608
|
+
opacity: 0;
|
|
609
|
+
}
|
|
610
|
+
20% {
|
|
611
|
+
opacity: 0.8;
|
|
612
|
+
}
|
|
613
|
+
80% {
|
|
614
|
+
opacity: 0.6;
|
|
615
|
+
}
|
|
616
|
+
100% {
|
|
617
|
+
bottom: 110%;
|
|
618
|
+
opacity: 0;
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
/* Vertical orientation adjustments */
|
|
623
|
+
.s-progress--vertical .s-progress--indeterminate {
|
|
624
|
+
animation: indeterminate-vertical var(--animation-duration) ease-in-out infinite;
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
@keyframes indeterminate-vertical {
|
|
628
|
+
0% {
|
|
629
|
+
transform: translateY(100%);
|
|
630
|
+
}
|
|
631
|
+
100% {
|
|
632
|
+
transform: translateY(-400%);
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
</style>
|