hys-ui 0.5.0 → 0.7.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/CHANGELOG.md +16 -0
- package/LICENSE +19 -0
- package/dist/components/HysDataGrid/HysDataGrid.vue.js +1 -1
- package/dist/components/HysDataGrid/HysDataGrid2.vue.js +1055 -753
- package/dist/components/HysDataGrid/gridColumnLayout.js +46 -0
- package/dist/components/HysDataGrid/gridPresentation.js +17 -0
- package/dist/components/HysDataGrid/useGridContextMenu.js +33 -0
- package/dist/components/HysDescriptions/HysDescriptions.vue.js +7 -0
- package/dist/components/HysDescriptions/HysDescriptions2.vue.js +146 -0
- package/dist/components/HysDrawer/HysDrawer.vue.js +1 -1
- package/dist/components/HysDrawer/HysDrawer2.vue.js +2 -2
- package/dist/components/HysForm/HysForm2.vue.js +9 -8
- package/dist/components/HysIcon/HysIcon.vue.js +373 -0
- package/dist/components/HysIcon/HysIcon2.vue.js +5 -0
- package/dist/components/HysIcon/IconGraphic/IconGraphic.vue.js +147 -0
- package/dist/components/HysIcon/IconGraphic/IconGraphic2.vue.js +4 -0
- package/dist/components/HysIcon/IconPickerPanel/IconPickerPanel.vue.js +7 -0
- package/dist/components/HysIcon/IconPickerPanel/IconPickerPanel2.vue.js +440 -0
- package/dist/components/HysIcon/IconReferenceGraphic/IconReferenceGraphic.vue.js +29 -0
- package/dist/components/HysIcon/IconReferenceGraphic/IconReferenceGraphic2.vue.js +4 -0
- package/dist/components/HysIcon/IconTooltip/IconTooltip.vue.js +19 -0
- package/dist/components/HysIcon/IconTooltip/IconTooltip2.vue.js +4 -0
- package/dist/components/HysIcon/builtins/access.js +180 -0
- package/dist/components/HysIcon/builtins/actions.js +327 -0
- package/dist/components/HysIcon/builtins/business.js +364 -0
- package/dist/components/HysIcon/builtins/catalog/access-1.json.js +51 -0
- package/dist/components/HysIcon/builtins/catalog/access-2.json.js +35 -0
- package/dist/components/HysIcon/builtins/catalog/accessibility.json.js +26 -0
- package/dist/components/HysIcon/builtins/catalog/arrows-1.json.js +45 -0
- package/dist/components/HysIcon/builtins/catalog/arrows-2.json.js +46 -0
- package/dist/components/HysIcon/builtins/catalog/arrows-3.json.js +42 -0
- package/dist/components/HysIcon/builtins/catalog/charts-1.json.js +50 -0
- package/dist/components/HysIcon/builtins/catalog/charts-2.json.js +13 -0
- package/dist/components/HysIcon/builtins/catalog/commerce.json.js +43 -0
- package/dist/components/HysIcon/builtins/catalog/communication-1.json.js +49 -0
- package/dist/components/HysIcon/builtins/catalog/communication-2.json.js +37 -0
- package/dist/components/HysIcon/builtins/catalog/design-1.json.js +61 -0
- package/dist/components/HysIcon/builtins/catalog/design-2.json.js +27 -0
- package/dist/components/HysIcon/builtins/catalog/development-1.json.js +58 -0
- package/dist/components/HysIcon/builtins/catalog/development-2.json.js +60 -0
- package/dist/components/HysIcon/builtins/catalog/development-3.json.js +25 -0
- package/dist/components/HysIcon/builtins/catalog/devices-1.json.js +52 -0
- package/dist/components/HysIcon/builtins/catalog/devices-2.json.js +55 -0
- package/dist/components/HysIcon/builtins/catalog/devices-3.json.js +23 -0
- package/dist/components/HysIcon/builtins/catalog/education.json.js +34 -0
- package/dist/components/HysIcon/builtins/catalog/emoji.json.js +24 -0
- package/dist/components/HysIcon/builtins/catalog/files-1.json.js +45 -0
- package/dist/components/HysIcon/builtins/catalog/files-2.json.js +47 -0
- package/dist/components/HysIcon/builtins/catalog/files-3.json.js +8 -0
- package/dist/components/HysIcon/builtins/catalog/food-1.json.js +67 -0
- package/dist/components/HysIcon/builtins/catalog/food-2.json.js +40 -0
- package/dist/components/HysIcon/builtins/catalog/home.json.js +36 -0
- package/dist/components/HysIcon/builtins/catalog/layout-1.json.js +46 -0
- package/dist/components/HysIcon/builtins/catalog/layout-2.json.js +45 -0
- package/dist/components/HysIcon/builtins/catalog/manifest.json.js +4 -0
- package/dist/components/HysIcon/builtins/catalog/maps-1.json.js +61 -0
- package/dist/components/HysIcon/builtins/catalog/maps-2.json.js +24 -0
- package/dist/components/HysIcon/builtins/catalog/media-1.json.js +57 -0
- package/dist/components/HysIcon/builtins/catalog/media-2.json.js +13 -0
- package/dist/components/HysIcon/builtins/catalog/medical.json.js +30 -0
- package/dist/components/HysIcon/builtins/catalog/nature.json.js +54 -0
- package/dist/components/HysIcon/builtins/catalog/recreation.json.js +51 -0
- package/dist/components/HysIcon/builtins/catalog/shapes.json.js +54 -0
- package/dist/components/HysIcon/builtins/catalog/text-1.json.js +52 -0
- package/dist/components/HysIcon/builtins/catalog/text-2.json.js +54 -0
- package/dist/components/HysIcon/builtins/catalog/text-3.json.js +58 -0
- package/dist/components/HysIcon/builtins/catalog/text-4.json.js +41 -0
- package/dist/components/HysIcon/builtins/catalog/time.json.js +39 -0
- package/dist/components/HysIcon/builtins/catalog/transport-1.json.js +57 -0
- package/dist/components/HysIcon/builtins/catalog/transport-2.json.js +7 -0
- package/dist/components/HysIcon/builtins/catalog/weather.json.js +46 -0
- package/dist/components/HysIcon/builtins/communication.js +314 -0
- package/dist/components/HysIcon/builtins/documents.js +315 -0
- package/dist/components/HysIcon/builtins/extendedCatalog.js +75 -0
- package/dist/components/HysIcon/builtins/iconInCategory.js +11 -0
- package/dist/components/HysIcon/builtins/media.js +255 -0
- package/dist/components/HysIcon/builtins/navigation.js +276 -0
- package/dist/components/HysIcon/builtins/technology.js +189 -0
- package/dist/components/HysIcon/iconBuiltins.js +228 -0
- package/dist/components/HysIcon/iconConfig.js +30 -0
- package/dist/components/HysIcon/iconRegistry.js +183 -0
- package/dist/components/HysIcon/iconSafety.js +191 -0
- package/dist/components/HysIcon/iconStyle.js +70 -0
- package/dist/components/HysIcon/useIconResource.js +75 -0
- package/dist/components/HysModal/HysModal.vue.js +2 -2
- package/dist/components/HysModal/HysModal2.vue.js +38 -38
- package/dist/components/HysPopconfirm/HysPopconfirm.vue.js +7 -0
- package/dist/components/HysPopconfirm/HysPopconfirm2.vue.js +346 -0
- package/dist/components/HysPopconfirm/usePopconfirmAction.js +32 -0
- package/dist/components/HysResult/HysResult.vue.js +7 -0
- package/dist/components/HysResult/HysResult2.vue.js +124 -0
- package/dist/components/HysSearch/HysSearch.vue.js +2 -2
- package/dist/components/HysSortableList/HysSortableList.vue.js +2 -2
- package/dist/components/HysSortableList/HysSortableList2.vue.js +498 -129
- package/dist/components/HysSortableList/SortableGhost/SortableGhost.vue.js +7 -0
- package/dist/components/HysSortableList/SortableGhost/SortableGhost2.vue.js +43 -0
- package/dist/components/HysSortableList/SortableGhost/useSortGhost.js +54 -0
- package/dist/components/HysSortableList/geometry.js +230 -0
- package/dist/components/HysSortableList/model.js +254 -0
- package/dist/components/HysSortableList/transactions.js +281 -0
- package/dist/components/HysSortableList/useSortDrag.js +270 -0
- package/dist/components/HysSortableList/useSortKeyboard.js +72 -0
- package/dist/components/HysSortableList/useSortWindow.js +144 -0
- package/dist/components/HysSpace/HysSpace.vue.js +7 -0
- package/dist/components/HysSpace/HysSpace2.vue.js +79 -0
- package/dist/components/HysSpace/spaceItems.js +17 -0
- package/dist/components/HysSpin/HysSpin.vue.js +7 -0
- package/dist/components/HysSpin/HysSpin2.vue.js +427 -0
- package/dist/components/HysSpin/SpinGlyph/SpinGlyph.vue.js +334 -0
- package/dist/components/HysSpin/SpinGlyph/SpinGlyph2.vue.js +5 -0
- package/dist/components/HysSpin/SpinPortal/SpinPortal.vue.js +7 -0
- package/dist/components/HysSpin/SpinPortal/SpinPortal2.vue.js +66 -0
- package/dist/components/HysSpin/SpinPortal/spinTarget.js +57 -0
- package/dist/components/HysSpin/spinCatalog.js +35 -0
- package/dist/components/HysSpin/spinConfig.js +32 -0
- package/dist/components/HysSpin/spinService.js +160 -0
- package/dist/components/HysSpin/spinStyle.js +39 -0
- package/dist/components/HysSpin/useHysSpinTask.js +92 -0
- package/dist/components/HysSpin/useSpinFullscreen.js +60 -0
- package/dist/components/HysSpin/useSpinVisibility.js +59 -0
- package/dist/components/HysSplitPane/HysSplitPane.vue.js +285 -204
- package/dist/components/HysSplitPane/splitPaneResize.js +75 -0
- package/dist/components/HysTabPane/HysTabPane.vue.js +49 -0
- package/dist/components/HysTabPane/HysTabPane2.vue.js +4 -0
- package/dist/components/HysTable/HysTable.vue.js +3 -3
- package/dist/components/HysTable/HysTable2.vue.js +412 -383
- package/dist/components/HysTable/tableSearch.js +24 -0
- package/dist/components/HysTabs/HysTabs.vue.js +172 -5
- package/dist/components/HysTabs/HysTabs2.vue.js +2 -275
- package/dist/components/HysTabs/TabsMore/TabsMore.vue.js +7 -0
- package/dist/components/HysTabs/TabsMore/TabsMore2.vue.js +133 -0
- package/dist/components/HysTabs/TabsPanels/TabsPanels.vue.js +161 -0
- package/dist/components/HysTabs/TabsPanels/TabsPanels2.vue.js +4 -0
- package/dist/components/HysTabs/TabsPrompts/TabsPrompts.vue.js +4 -0
- package/dist/components/HysTabs/TabsPrompts/TabsPrompts2.vue.js +88 -0
- package/dist/components/HysTabs/TabsSlot/TabsSlot.js +13 -0
- package/dist/components/HysTabs/TabsWorkbench/TabsWorkbench.vue.js +7 -0
- package/dist/components/HysTabs/TabsWorkbench/TabsWorkbench2.vue.js +687 -0
- package/dist/components/HysTabs/tabsConfig.js +35 -0
- package/dist/components/HysTabs/tabsItems.js +79 -0
- package/dist/components/HysTabs/tabsPersistence.js +118 -0
- package/dist/components/HysTabs/useHysRouteTabs.js +77 -0
- package/dist/components/HysTabs/useTabsDragGhost.js +47 -0
- package/dist/components/HysTabs/useTabsNav.js +127 -0
- package/dist/components/HysTabs/useTabsOverlays.js +52 -0
- package/dist/components/HysTabs/useTabsPanels.js +101 -0
- package/dist/components/HysTabs/useTabsPointer.js +131 -0
- package/dist/components/HysTabs/useTabsState.js +263 -0
- package/dist/components/HysToast/HysToast.vue.js +3 -3
- package/dist/components/HysToast/HysToast2.vue.js +379 -107
- package/dist/components/HysToast/ToastViewport/ToastViewport.vue.js +7 -0
- package/dist/components/HysToast/ToastViewport/ToastViewport2.vue.js +211 -0
- package/dist/components/HysToast/ToastViewport/useToastStackDisclosure.js +71 -0
- package/dist/components/HysToast/toastPresentation.js +98 -0
- package/dist/components/HysToast/useToastActions.js +62 -0
- package/dist/components/HysToast/useToastSwipe.js +48 -0
- package/dist/components/HysToast/useToastTimer.js +90 -0
- package/dist/composables/formLayout.js +20 -42
- package/dist/composables/popupReferenceBinding.js +41 -0
- package/dist/composables/popupSurfaceStyle.js +30 -0
- package/dist/composables/toastEscape.js +18 -10
- package/dist/composables/toastQueue.js +276 -0
- package/dist/composables/toastQueueModel.js +86 -0
- package/dist/composables/toastTasks.js +58 -0
- package/dist/composables/useContainerWidth.js +24 -0
- package/dist/composables/useFloating.js +28 -28
- package/dist/composables/useHysToast.js +117 -135
- package/dist/composables/usePageVisibility.js +19 -0
- package/dist/composables/usePopupSurface.js +181 -356
- package/dist/composables/usePopupSurfaceInteractions.js +173 -0
- package/dist/composables/useSplitPaneDrag.js +29 -26
- package/dist/composables/useSvgInstanceId.js +15 -0
- package/dist/composables/useTable.js +321 -306
- package/dist/composables/useTabularRowNavigation.js +46 -0
- package/dist/index.js +231 -185
- package/dist/internal/MultiSplitPane.vue.js +246 -205
- package/dist/internal/PopupSurfacePanel.vue.js +2 -2
- package/dist/internal/PopupSurfacePanel2.vue.js +35 -30
- package/dist/style.css +1 -1
- package/dist/types/components/HysDataGrid/HysDataGrid.vue.d.ts +40 -2
- package/dist/types/components/HysDataGrid/gridColumnLayout.d.ts +22 -0
- package/dist/types/components/HysDataGrid/gridPresentation.d.ts +47 -0
- package/dist/types/components/HysDataGrid/useGridContextMenu.d.ts +14 -0
- package/dist/types/components/HysDescriptions/HysDescriptions.vue.d.ts +20 -0
- package/dist/types/components/HysDescriptions/descriptionsTypes.d.ts +54 -0
- package/dist/types/components/HysForm/HysForm.vue.d.ts +1 -1
- package/dist/types/components/HysFormItem/HysFormItem.vue.d.ts +1 -1
- package/dist/types/components/HysGantt/HysGantt.vue.d.ts +1 -1
- package/dist/types/components/HysIcon/HysIcon.vue.d.ts +76 -0
- package/dist/types/components/HysIcon/IconGraphic/IconGraphic.vue.d.ts +43 -0
- package/dist/types/components/HysIcon/IconPickerPanel/IconPickerPanel.vue.d.ts +17 -0
- package/dist/types/components/HysIcon/IconReferenceGraphic/IconReferenceGraphic.vue.d.ts +10 -0
- package/dist/types/components/HysIcon/IconTooltip/IconTooltip.vue.d.ts +11 -0
- package/dist/types/components/HysIcon/builtins/access.d.ts +15 -0
- package/dist/types/components/HysIcon/builtins/actions.d.ts +30 -0
- package/dist/types/components/HysIcon/builtins/business.d.ts +31 -0
- package/dist/types/components/HysIcon/builtins/communication.d.ts +27 -0
- package/dist/types/components/HysIcon/builtins/documents.d.ts +29 -0
- package/dist/types/components/HysIcon/builtins/extendedCatalog.d.ts +2 -0
- package/dist/types/components/HysIcon/builtins/iconInCategory.d.ts +2 -0
- package/dist/types/components/HysIcon/builtins/media.d.ts +24 -0
- package/dist/types/components/HysIcon/builtins/navigation.d.ts +30 -0
- package/dist/types/components/HysIcon/builtins/technology.d.ts +18 -0
- package/dist/types/components/HysIcon/iconBuiltins.d.ts +2 -0
- package/dist/types/components/HysIcon/iconConfig.d.ts +10 -0
- package/dist/types/components/HysIcon/iconRegistry.d.ts +5 -0
- package/dist/types/components/HysIcon/iconSafety.d.ts +8 -0
- package/dist/types/components/HysIcon/iconStyle.d.ts +6 -0
- package/dist/types/components/HysIcon/iconTypes.d.ts +192 -0
- package/dist/types/components/HysIcon/useIconResource.d.ts +14 -0
- package/dist/types/components/HysModal/HysModal.vue.d.ts +1 -1
- package/dist/types/components/HysPopconfirm/HysPopconfirm.vue.d.ts +85 -0
- package/dist/types/components/HysPopconfirm/popconfirmTypes.d.ts +72 -0
- package/dist/types/components/HysPopconfirm/usePopconfirmAction.d.ts +6 -0
- package/dist/types/components/HysProgress/HysProgress.vue.d.ts +1 -1
- package/dist/types/components/HysResult/HysResult.vue.d.ts +22 -0
- package/dist/types/components/HysResult/resultTypes.d.ts +32 -0
- package/dist/types/components/HysSortableList/HysSortableList.vue.d.ts +48 -25
- package/dist/types/components/HysSortableList/SortableGhost/SortableGhost.vue.d.ts +31 -0
- package/dist/types/components/HysSortableList/SortableGhost/useSortGhost.d.ts +23 -0
- package/dist/types/components/HysSortableList/geometry.d.ts +35 -0
- package/dist/types/components/HysSortableList/model.d.ts +61 -0
- package/dist/types/components/HysSortableList/sortableList.d.ts +151 -0
- package/dist/types/components/HysSortableList/transactions.d.ts +10 -0
- package/dist/types/components/HysSortableList/useSortDrag.d.ts +25 -0
- package/dist/types/components/HysSortableList/useSortKeyboard.d.ts +17 -0
- package/dist/types/components/HysSortableList/useSortWindow.d.ts +16 -0
- package/dist/types/components/HysSpace/HysSpace.vue.d.ts +15 -0
- package/dist/types/components/HysSpace/spaceItems.d.ts +9 -0
- package/dist/types/components/HysSpace/spaceTypes.d.ts +20 -0
- package/dist/types/components/HysSpin/HysSpin.vue.d.ts +84 -0
- package/dist/types/components/HysSpin/SpinGlyph/SpinGlyph.vue.d.ts +16 -0
- package/dist/types/components/HysSpin/SpinPortal/SpinPortal.vue.d.ts +21 -0
- package/dist/types/components/HysSpin/SpinPortal/spinTarget.d.ts +3 -0
- package/dist/types/components/HysSpin/spinCatalog.d.ts +122 -0
- package/dist/types/components/HysSpin/spinConfig.d.ts +10 -0
- package/dist/types/components/HysSpin/spinService.d.ts +7 -0
- package/dist/types/components/HysSpin/spinStyle.d.ts +5 -0
- package/dist/types/components/HysSpin/spinTypes.d.ts +133 -0
- package/dist/types/components/HysSpin/useHysSpinTask.d.ts +4 -0
- package/dist/types/components/HysSpin/useSpinFullscreen.d.ts +17 -0
- package/dist/types/components/HysSpin/useSpinVisibility.d.ts +10 -0
- package/dist/types/components/HysSplitPane/HysSplitPane.vue.d.ts +25 -2
- package/dist/types/components/HysSplitPane/splitPaneResize.d.ts +17 -0
- package/dist/types/components/HysTabPane/HysTabPane.vue.d.ts +11 -0
- package/dist/types/components/HysTable/HysTable.vue.d.ts +16 -10
- package/dist/types/components/HysTable/tableSearch.d.ts +2 -0
- package/dist/types/components/HysTabs/HysTabs.vue.d.ts +83 -74
- package/dist/types/components/HysTabs/TabsMore/TabsMore.vue.d.ts +14 -0
- package/dist/types/components/HysTabs/TabsPanels/TabsPanels.vue.d.ts +17 -0
- package/dist/types/components/HysTabs/TabsPrompts/TabsPrompts.vue.d.ts +7 -0
- package/dist/types/components/HysTabs/TabsSlot/TabsSlot.d.ts +9 -0
- package/dist/types/components/HysTabs/TabsWorkbench/TabsWorkbench.vue.d.ts +32 -0
- package/dist/types/components/HysTabs/tabsConfig.d.ts +4 -0
- package/dist/types/components/HysTabs/tabsItems.d.ts +14 -0
- package/dist/types/components/HysTabs/tabsPersistence.d.ts +6 -0
- package/dist/types/components/HysTabs/tabsTypes.d.ts +236 -0
- package/dist/types/components/HysTabs/useHysRouteTabs.d.ts +22 -0
- package/dist/types/components/HysTabs/useTabsDragGhost.d.ts +22 -0
- package/dist/types/components/HysTabs/useTabsNav.d.ts +20 -0
- package/dist/types/components/HysTabs/useTabsOverlays.d.ts +54 -0
- package/dist/types/components/HysTabs/useTabsPanels.d.ts +14 -0
- package/dist/types/components/HysTabs/useTabsPointer.d.ts +30 -0
- package/dist/types/components/HysTabs/useTabsState.d.ts +32 -0
- package/dist/types/components/HysTagInput/HysTagInput.vue.d.ts +2 -2
- package/dist/types/components/HysToast/HysToast.vue.d.ts +44 -46
- package/dist/types/components/HysToast/ToastViewport/ToastViewport.vue.d.ts +25 -0
- package/dist/types/components/HysToast/ToastViewport/useToastStackDisclosure.d.ts +16 -0
- package/dist/types/components/HysToast/toastPresentation.d.ts +8 -0
- package/dist/types/components/HysToast/toastTypes.d.ts +212 -0
- package/dist/types/components/HysToast/useToastActions.d.ts +18 -0
- package/dist/types/components/HysToast/useToastSwipe.d.ts +11 -0
- package/dist/types/components/HysToast/useToastTimer.d.ts +22 -0
- package/dist/types/components/HysVirtualTable/HysVirtualTable.vue.d.ts +2 -2
- package/dist/types/composables/dataGrid.d.ts +34 -0
- package/dist/types/composables/formLayout.d.ts +1 -2
- package/dist/types/composables/popupReferenceBinding.d.ts +9 -0
- package/dist/types/composables/popupSurfaceStyle.d.ts +7 -0
- package/dist/types/composables/table.d.ts +10 -1
- package/dist/types/composables/toastEscape.d.ts +1 -1
- package/dist/types/composables/toastQueue.d.ts +121 -0
- package/dist/types/composables/toastQueueModel.d.ts +116 -0
- package/dist/types/composables/toastTasks.d.ts +2 -0
- package/dist/types/composables/useColorPicker.d.ts +1 -1
- package/dist/types/composables/useContainerWidth.d.ts +2 -0
- package/dist/types/composables/useContextMenu.d.ts +1 -1
- package/dist/types/composables/useFloating.d.ts +2 -2
- package/dist/types/composables/useHysToast.d.ts +4 -48
- package/dist/types/composables/usePageVisibility.d.ts +1 -0
- package/dist/types/composables/usePopupSurface.d.ts +28 -22
- package/dist/types/composables/usePopupSurfaceInteractions.d.ts +35 -0
- package/dist/types/composables/useSplitPaneDrag.d.ts +2 -2
- package/dist/types/composables/useSvgInstanceId.d.ts +1 -0
- package/dist/types/composables/useTable.d.ts +2 -0
- package/dist/types/composables/useTabularRowNavigation.d.ts +18 -0
- package/dist/types/index.d.ts +33 -6
- package/dist/types/internal/MultiSplitPane.vue.d.ts +10 -1
- package/dist/types/internal/PopupSurfacePanel.vue.d.ts +3 -0
- package/package.json +1 -1
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
import { defineComponent as I, computed as k, openBlock as e, createElementBlock as i, createElementVNode as n, unref as b, Fragment as a, renderList as l, createCommentVNode as g, normalizeStyle as d, normalizeClass as L } from "vue";
|
|
2
|
+
import { useSvgInstanceId as B } from "../../../composables/useSvgInstanceId.js";
|
|
3
|
+
const S = ["data-animation", "data-status"], V = { key: 0 }, Z = ["id"], j = ["offset", "stop-color", "stop-opacity"], q = ["stroke-width"], z = {
|
|
4
|
+
key: 0,
|
|
5
|
+
d: "m14 24 7 7 13-15"
|
|
6
|
+
}, E = {
|
|
7
|
+
key: 1,
|
|
8
|
+
d: "M24 13v12l7 4"
|
|
9
|
+
}, G = {
|
|
10
|
+
key: 2,
|
|
11
|
+
d: "m17 17 14 14m0-14L17 31"
|
|
12
|
+
}, N = {
|
|
13
|
+
key: 3,
|
|
14
|
+
d: "M24 14v12m0 7h.01"
|
|
15
|
+
}, P = { key: 2 }, F = ["stroke-width"], A = ["stroke-width", "stroke-dasharray"], D = {
|
|
16
|
+
key: 3,
|
|
17
|
+
"stroke-linecap": "round"
|
|
18
|
+
}, H = ["stroke-width"], J = ["r", "stroke-width", "stroke", "stroke-dasharray"], K = {
|
|
19
|
+
key: 4,
|
|
20
|
+
class: "hys-spin-rotate"
|
|
21
|
+
}, O = ["cx", "cy", "r", "fill", "opacity"], Q = { key: 5 }, R = ["cx", "cy", "r", "fill"], T = ["x", "y", "width", "height", "fill"], U = { key: 6 }, W = ["x", "fill"], X = ["cx", "r", "fill"], Y = { key: 7 }, $ = ["stroke-width"], p = ["cx", "cy", "r", "fill"], _ = {
|
|
22
|
+
key: 8,
|
|
23
|
+
class: "hys-spin-rotate"
|
|
24
|
+
}, tt = ["fill", "stroke-width"], st = { key: 10 }, et = ["stroke-width"], it = ["r"], nt = {
|
|
25
|
+
key: 12,
|
|
26
|
+
class: "hys-spin-beat",
|
|
27
|
+
fill: "currentColor",
|
|
28
|
+
d: "M24 40 8 24a9 9 0 0 1 16-9 9 9 0 0 1 16 9Z"
|
|
29
|
+
}, rt = {
|
|
30
|
+
key: 13,
|
|
31
|
+
class: "hys-spin-rhythm",
|
|
32
|
+
cx: "24",
|
|
33
|
+
cy: "24",
|
|
34
|
+
r: "14",
|
|
35
|
+
fill: "currentColor"
|
|
36
|
+
}, at = { key: 14 }, ot = ["r", "stroke-width"], lt = ["d", "stroke-width"], dt = /* @__PURE__ */ I({
|
|
37
|
+
__name: "SpinGlyph",
|
|
38
|
+
props: {
|
|
39
|
+
animation: {},
|
|
40
|
+
status: {},
|
|
41
|
+
progress: {},
|
|
42
|
+
stroke: {},
|
|
43
|
+
dot: {},
|
|
44
|
+
spacing: {},
|
|
45
|
+
colors: {},
|
|
46
|
+
gradient: {},
|
|
47
|
+
path: {}
|
|
48
|
+
},
|
|
49
|
+
setup(t) {
|
|
50
|
+
const o = t, m = B("spin-gradient"), y = k(
|
|
51
|
+
() => {
|
|
52
|
+
var u;
|
|
53
|
+
return (u = o.gradient) != null && u.length ? o.gradient : ["currentColor", "currentColor"];
|
|
54
|
+
}
|
|
55
|
+
), c = (u) => {
|
|
56
|
+
var r;
|
|
57
|
+
return (r = o.colors) != null && r.length ? o.colors[u % o.colors.length] : "currentColor";
|
|
58
|
+
}, f = k(() => {
|
|
59
|
+
switch (o.animation) {
|
|
60
|
+
case "dual-ring":
|
|
61
|
+
return [
|
|
62
|
+
{ r: 19, dash: "62 119" },
|
|
63
|
+
{ r: 12, dash: "41 75" }
|
|
64
|
+
];
|
|
65
|
+
case "triple-ring":
|
|
66
|
+
return [
|
|
67
|
+
{ r: 19, dash: "52 119" },
|
|
68
|
+
{ r: 12, dash: "33 75" },
|
|
69
|
+
{ r: 6, dash: "17 38" }
|
|
70
|
+
];
|
|
71
|
+
case "segment":
|
|
72
|
+
return [{ r: 19, dash: "16 13.8" }];
|
|
73
|
+
case "arc":
|
|
74
|
+
return [{ r: 19, dash: "78 119" }];
|
|
75
|
+
default:
|
|
76
|
+
return [{ r: 19, dash: "30 119" }];
|
|
77
|
+
}
|
|
78
|
+
}), v = [
|
|
79
|
+
"circle",
|
|
80
|
+
"dual-ring",
|
|
81
|
+
"triple-ring",
|
|
82
|
+
"segment",
|
|
83
|
+
"arc",
|
|
84
|
+
"gradient",
|
|
85
|
+
"progress-ring",
|
|
86
|
+
"custom"
|
|
87
|
+
], M = ["bouncing-dots", "flashing-dots", "scaling-dots", "wave", "bars"], w = {
|
|
88
|
+
infinity: "M24 24c-5-7-8-11-13-11a9 9 0 0 0 0 18c5 0 8-4 13-11 5-7 8-11 13-11a9 9 0 0 1 0 18c-5 0-8-4-13-11Z",
|
|
89
|
+
spiral: "M24 24a2 2 0 1 1 2 2 5 5 0 1 1-5-5 8 8 0 1 1 8 8 11 11 0 1 1-11-11 15 15 0 1 1 15 15 19 19 0 1 1-19-19",
|
|
90
|
+
draw: "M6 27h8l4-12 7 21 6-15 4 6h7"
|
|
91
|
+
}, x = k(
|
|
92
|
+
() => ["success", "error", "cancelled", "timeout"].includes(o.status)
|
|
93
|
+
);
|
|
94
|
+
return (u, r) => (e(), i("svg", {
|
|
95
|
+
class: "hys-spin-glyph",
|
|
96
|
+
"data-animation": t.animation,
|
|
97
|
+
"data-status": t.status,
|
|
98
|
+
viewBox: "0 0 48 48",
|
|
99
|
+
fill: "none",
|
|
100
|
+
"aria-hidden": "true",
|
|
101
|
+
focusable: "false"
|
|
102
|
+
}, [
|
|
103
|
+
t.animation === "gradient" ? (e(), i("defs", V, [
|
|
104
|
+
n("linearGradient", {
|
|
105
|
+
id: b(m),
|
|
106
|
+
x1: "0",
|
|
107
|
+
y1: "1",
|
|
108
|
+
x2: "1",
|
|
109
|
+
y2: "0"
|
|
110
|
+
}, [
|
|
111
|
+
(e(!0), i(a, null, l(y.value, (s, h) => {
|
|
112
|
+
var C;
|
|
113
|
+
return e(), i("stop", {
|
|
114
|
+
key: h,
|
|
115
|
+
offset: y.value.length === 1 ? 0 : h / (y.value.length - 1),
|
|
116
|
+
"stop-color": s,
|
|
117
|
+
"stop-opacity": !((C = o.gradient) != null && C.length) && h === 0 ? 0.14 : 1
|
|
118
|
+
}, null, 8, j);
|
|
119
|
+
}), 128))
|
|
120
|
+
], 8, Z)
|
|
121
|
+
])) : g("", !0),
|
|
122
|
+
x.value ? (e(), i("g", {
|
|
123
|
+
key: 1,
|
|
124
|
+
class: "hys-spin-result",
|
|
125
|
+
stroke: "currentColor",
|
|
126
|
+
"stroke-width": t.stroke,
|
|
127
|
+
"stroke-linecap": "round",
|
|
128
|
+
"stroke-linejoin": "round"
|
|
129
|
+
}, [
|
|
130
|
+
r[0] || (r[0] = n("circle", {
|
|
131
|
+
cx: "24",
|
|
132
|
+
cy: "24",
|
|
133
|
+
r: "19",
|
|
134
|
+
opacity: ".25"
|
|
135
|
+
}, null, -1)),
|
|
136
|
+
t.status === "success" ? (e(), i("path", z)) : t.status === "timeout" ? (e(), i("path", E)) : t.status === "cancelled" ? (e(), i("path", G)) : (e(), i("path", N))
|
|
137
|
+
], 8, q)) : t.progress !== void 0 ? (e(), i("g", P, [
|
|
138
|
+
n("circle", {
|
|
139
|
+
cx: "24",
|
|
140
|
+
cy: "24",
|
|
141
|
+
r: "19",
|
|
142
|
+
"stroke-width": t.stroke,
|
|
143
|
+
class: "hys-spin-track"
|
|
144
|
+
}, null, 8, F),
|
|
145
|
+
n("circle", {
|
|
146
|
+
cx: "24",
|
|
147
|
+
cy: "24",
|
|
148
|
+
r: "19",
|
|
149
|
+
"stroke-width": t.stroke,
|
|
150
|
+
stroke: "currentColor",
|
|
151
|
+
"stroke-linecap": "round",
|
|
152
|
+
pathLength: "100",
|
|
153
|
+
"stroke-dasharray": t.progress + " 100",
|
|
154
|
+
transform: "rotate(-90 24 24)",
|
|
155
|
+
class: "hys-spin-meter"
|
|
156
|
+
}, null, 8, A)
|
|
157
|
+
])) : v.includes(t.animation) ? (e(), i("g", D, [
|
|
158
|
+
f.value.length === 1 ? (e(), i("circle", {
|
|
159
|
+
key: 0,
|
|
160
|
+
cx: "24",
|
|
161
|
+
cy: "24",
|
|
162
|
+
r: "19",
|
|
163
|
+
"stroke-width": t.stroke,
|
|
164
|
+
class: "hys-spin-track"
|
|
165
|
+
}, null, 8, H)) : g("", !0),
|
|
166
|
+
(e(!0), i(a, null, l(f.value, (s, h) => (e(), i("circle", {
|
|
167
|
+
key: s.r,
|
|
168
|
+
cx: "24",
|
|
169
|
+
cy: "24",
|
|
170
|
+
r: s.r,
|
|
171
|
+
"stroke-width": t.stroke,
|
|
172
|
+
stroke: t.animation === "gradient" ? "url(#" + b(m) + ")" : c(h),
|
|
173
|
+
"stroke-dasharray": s.dash,
|
|
174
|
+
class: L(["hys-spin-rotate", { "hys-spin-reverse": h % 2 }]),
|
|
175
|
+
style: d({ "--hys-spin-i": h })
|
|
176
|
+
}, null, 14, J))), 128))
|
|
177
|
+
])) : t.animation === "dot-spin" ? (e(), i("g", K, [
|
|
178
|
+
(e(), i(a, null, l(8, (s) => n("circle", {
|
|
179
|
+
key: s,
|
|
180
|
+
cx: 24 + Math.cos(s * Math.PI / 4) * 17,
|
|
181
|
+
cy: 24 + Math.sin(s * Math.PI / 4) * 17,
|
|
182
|
+
r: t.dot * 0.78,
|
|
183
|
+
fill: c(s - 1),
|
|
184
|
+
opacity: 0.2 + s * 0.1
|
|
185
|
+
}, null, 8, O)), 64))
|
|
186
|
+
])) : t.animation === "dot-grid" || t.animation === "grid" ? (e(), i("g", Q, [
|
|
187
|
+
(e(), i(a, null, l(9, (s) => (e(), i(a, { key: s }, [
|
|
188
|
+
t.animation === "dot-grid" ? (e(), i("circle", {
|
|
189
|
+
key: 0,
|
|
190
|
+
class: "hys-spin-grid-cell",
|
|
191
|
+
cx: 24 + ((s - 1) % 3 - 1) * t.spacing,
|
|
192
|
+
cy: 24 + (Math.floor((s - 1) / 3) - 1) * t.spacing,
|
|
193
|
+
r: t.dot,
|
|
194
|
+
fill: c(s - 1),
|
|
195
|
+
style: d({ "--hys-spin-i": s - 1 })
|
|
196
|
+
}, null, 12, R)) : (e(), i("rect", {
|
|
197
|
+
key: 1,
|
|
198
|
+
class: "hys-spin-grid-cell",
|
|
199
|
+
x: 24 + ((s - 1) % 3 - 1) * t.spacing - t.dot,
|
|
200
|
+
y: 24 + (Math.floor((s - 1) / 3) - 1) * t.spacing - t.dot,
|
|
201
|
+
width: t.dot * 2,
|
|
202
|
+
height: t.dot * 2,
|
|
203
|
+
rx: "1.25",
|
|
204
|
+
fill: c(s - 1),
|
|
205
|
+
style: d({ "--hys-spin-i": s - 1 })
|
|
206
|
+
}, null, 12, T))
|
|
207
|
+
], 64))), 64))
|
|
208
|
+
])) : M.includes(t.animation) ? (e(), i("g", U, [
|
|
209
|
+
(e(!0), i(a, null, l(t.animation === "wave" || t.animation === "bars" ? 5 : 3, (s) => (e(), i(a, { key: s }, [
|
|
210
|
+
t.animation === "wave" || t.animation === "bars" ? (e(), i("rect", {
|
|
211
|
+
key: 0,
|
|
212
|
+
class: "hys-spin-row-item",
|
|
213
|
+
x: 24 + (s - 3) * Math.min(t.spacing, 9) - 2,
|
|
214
|
+
y: "9",
|
|
215
|
+
width: "4",
|
|
216
|
+
height: "30",
|
|
217
|
+
rx: "2",
|
|
218
|
+
fill: c(s - 1),
|
|
219
|
+
style: d({ "--hys-spin-i": s - 1 })
|
|
220
|
+
}, null, 12, W)) : (e(), i("circle", {
|
|
221
|
+
key: 1,
|
|
222
|
+
class: "hys-spin-row-item",
|
|
223
|
+
cx: 24 + (s - 2) * t.spacing,
|
|
224
|
+
cy: "24",
|
|
225
|
+
r: t.dot,
|
|
226
|
+
fill: c(s - 1),
|
|
227
|
+
style: d({ "--hys-spin-i": s - 1 })
|
|
228
|
+
}, null, 12, X))
|
|
229
|
+
], 64))), 128))
|
|
230
|
+
])) : t.animation === "orbit" || t.animation === "chase" ? (e(), i("g", Y, [
|
|
231
|
+
t.animation === "orbit" ? (e(), i("circle", {
|
|
232
|
+
key: 0,
|
|
233
|
+
cx: "24",
|
|
234
|
+
cy: "24",
|
|
235
|
+
r: "16",
|
|
236
|
+
"stroke-width": t.stroke * 0.65,
|
|
237
|
+
class: "hys-spin-track"
|
|
238
|
+
}, null, 8, $)) : g("", !0),
|
|
239
|
+
(e(!0), i(a, null, l(t.animation === "orbit" ? 2 : 3, (s) => (e(), i("g", {
|
|
240
|
+
key: s,
|
|
241
|
+
class: "hys-spin-rotate hys-spin-orbit",
|
|
242
|
+
style: d({ "--hys-spin-i": s - 1 })
|
|
243
|
+
}, [
|
|
244
|
+
n("circle", {
|
|
245
|
+
cx: t.animation === "orbit" && s === 2 ? 32 : 24,
|
|
246
|
+
cy: 8 + (t.animation === "orbit" ? (s - 1) * 8 : 0),
|
|
247
|
+
r: t.dot * (1 - (s - 1) * 0.1),
|
|
248
|
+
fill: c(s - 1)
|
|
249
|
+
}, null, 8, p)
|
|
250
|
+
], 4))), 128))
|
|
251
|
+
])) : t.animation === "bar-spin" ? (e(), i("g", _, [...r[1] || (r[1] = [
|
|
252
|
+
n("rect", {
|
|
253
|
+
x: "20",
|
|
254
|
+
y: "6",
|
|
255
|
+
width: "8",
|
|
256
|
+
height: "36",
|
|
257
|
+
rx: "4",
|
|
258
|
+
fill: "currentColor"
|
|
259
|
+
}, null, -1),
|
|
260
|
+
n("rect", {
|
|
261
|
+
x: "6",
|
|
262
|
+
y: "20",
|
|
263
|
+
width: "36",
|
|
264
|
+
height: "8",
|
|
265
|
+
rx: "4",
|
|
266
|
+
fill: "currentColor",
|
|
267
|
+
opacity: ".36"
|
|
268
|
+
}, null, -1)
|
|
269
|
+
])])) : t.animation === "square" || t.animation === "cube-flip" ? (e(), i("rect", {
|
|
270
|
+
key: 9,
|
|
271
|
+
class: "hys-spin-shape",
|
|
272
|
+
x: "10",
|
|
273
|
+
y: "10",
|
|
274
|
+
width: "28",
|
|
275
|
+
height: "28",
|
|
276
|
+
rx: "4",
|
|
277
|
+
fill: t.animation === "square" ? "none" : "currentColor",
|
|
278
|
+
stroke: "currentColor",
|
|
279
|
+
"stroke-width": t.stroke
|
|
280
|
+
}, null, 8, tt)) : t.animation === "ripple" ? (e(), i("g", st, [
|
|
281
|
+
(e(), i(a, null, l(2, (s) => n("circle", {
|
|
282
|
+
key: s,
|
|
283
|
+
class: "hys-spin-ripple",
|
|
284
|
+
cx: "24",
|
|
285
|
+
cy: "24",
|
|
286
|
+
r: "18",
|
|
287
|
+
stroke: "currentColor",
|
|
288
|
+
"stroke-width": t.stroke,
|
|
289
|
+
style: d({ "--hys-spin-i": s - 1 })
|
|
290
|
+
}, null, 12, et)), 64))
|
|
291
|
+
])) : t.animation === "ball" ? (e(), i("circle", {
|
|
292
|
+
key: 11,
|
|
293
|
+
class: "hys-spin-ball",
|
|
294
|
+
cx: "24",
|
|
295
|
+
cy: "26",
|
|
296
|
+
r: t.dot * 1.4,
|
|
297
|
+
fill: "currentColor"
|
|
298
|
+
}, null, 8, it)) : t.animation === "heartbeat" ? (e(), i("path", nt)) : t.animation === "pulse" || t.animation === "breathing" ? (e(), i("circle", rt)) : t.animation === "radar" ? (e(), i("g", at, [
|
|
299
|
+
(e(), i(a, null, l([7, 13, 19], (s) => n("circle", {
|
|
300
|
+
key: s,
|
|
301
|
+
cx: "24",
|
|
302
|
+
cy: "24",
|
|
303
|
+
r: s,
|
|
304
|
+
class: "hys-spin-track",
|
|
305
|
+
"stroke-width": t.stroke / 2
|
|
306
|
+
}, null, 8, ot)), 64)),
|
|
307
|
+
r[2] || (r[2] = n("path", {
|
|
308
|
+
class: "hys-spin-rotate",
|
|
309
|
+
fill: "currentColor",
|
|
310
|
+
d: "M24 24V5a19 19 0 0 1 17 11Z",
|
|
311
|
+
opacity: ".55"
|
|
312
|
+
}, null, -1)),
|
|
313
|
+
r[3] || (r[3] = n("circle", {
|
|
314
|
+
cx: "24",
|
|
315
|
+
cy: "24",
|
|
316
|
+
r: "2",
|
|
317
|
+
fill: "currentColor"
|
|
318
|
+
}, null, -1))
|
|
319
|
+
])) : (e(), i("path", {
|
|
320
|
+
key: 15,
|
|
321
|
+
class: "hys-spin-path",
|
|
322
|
+
d: t.path || w[t.animation] || w.draw,
|
|
323
|
+
pathLength: "100",
|
|
324
|
+
stroke: "currentColor",
|
|
325
|
+
"stroke-width": t.stroke,
|
|
326
|
+
"stroke-linecap": "round",
|
|
327
|
+
"stroke-linejoin": "round"
|
|
328
|
+
}, null, 8, lt))
|
|
329
|
+
], 8, S));
|
|
330
|
+
}
|
|
331
|
+
});
|
|
332
|
+
export {
|
|
333
|
+
dt as default
|
|
334
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { defineComponent as d, shallowRef as m, watch as c, onBeforeUnmount as u, openBlock as l, createBlock as v, Teleport as f, createElementVNode as s, normalizeClass as y, renderSlot as g } from "vue";
|
|
2
|
+
import { positionSpinTarget as h, blockSpinTarget as b, lockSpinTargetScroll as k } from "./spinTarget.js";
|
|
3
|
+
const B = /* @__PURE__ */ d({
|
|
4
|
+
__name: "SpinPortal",
|
|
5
|
+
props: {
|
|
6
|
+
target: {},
|
|
7
|
+
cover: { type: Boolean },
|
|
8
|
+
block: { type: Boolean },
|
|
9
|
+
lock: { type: Boolean }
|
|
10
|
+
},
|
|
11
|
+
setup(p) {
|
|
12
|
+
const i = p, e = m();
|
|
13
|
+
let n, r, a;
|
|
14
|
+
return c(
|
|
15
|
+
() => i.target,
|
|
16
|
+
(t) => {
|
|
17
|
+
if (!(typeof document > "u")) {
|
|
18
|
+
if (typeof t != "string") {
|
|
19
|
+
e.value = t;
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
try {
|
|
23
|
+
const o = document.querySelector(t);
|
|
24
|
+
e.value = o instanceof HTMLElement ? o : void 0;
|
|
25
|
+
} catch {
|
|
26
|
+
e.value = void 0;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
{ immediate: !0 }
|
|
31
|
+
), c(
|
|
32
|
+
[e, () => i.cover],
|
|
33
|
+
([t, o]) => {
|
|
34
|
+
n == null || n(), n = t && o ? h(t) : void 0;
|
|
35
|
+
},
|
|
36
|
+
{ immediate: !0 }
|
|
37
|
+
), c(
|
|
38
|
+
[e, () => i.cover && i.block],
|
|
39
|
+
([t, o]) => {
|
|
40
|
+
r == null || r(), r = t && o ? b(t) : void 0;
|
|
41
|
+
},
|
|
42
|
+
{ immediate: !0, flush: "post" }
|
|
43
|
+
), c(
|
|
44
|
+
[e, () => i.cover && i.lock],
|
|
45
|
+
([t, o]) => {
|
|
46
|
+
a == null || a(), a = t && o ? k(t) : void 0;
|
|
47
|
+
},
|
|
48
|
+
{ immediate: !0 }
|
|
49
|
+
), u(() => {
|
|
50
|
+
r == null || r(), a == null || a(), n == null || n();
|
|
51
|
+
}), (t, o) => (l(), v(f, {
|
|
52
|
+
to: e.value ?? "body",
|
|
53
|
+
disabled: !e.value
|
|
54
|
+
}, [
|
|
55
|
+
s("div", {
|
|
56
|
+
"data-hys-spin-portal": "",
|
|
57
|
+
class: y({ "hys-spin-portal-cover": e.value && p.cover })
|
|
58
|
+
}, [
|
|
59
|
+
g(t.$slots, "default")
|
|
60
|
+
], 2)
|
|
61
|
+
], 8, ["to", "disabled"]));
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
export {
|
|
65
|
+
B as default
|
|
66
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
const l = /* @__PURE__ */ new WeakMap(), c = /* @__PURE__ */ new WeakMap(), u = /* @__PURE__ */ new WeakMap();
|
|
2
|
+
function s(o, t, r) {
|
|
3
|
+
let e = o.get(t);
|
|
4
|
+
return e || (e = { count: 0, restore: r() }, o.set(t, e)), e.count++, () => {
|
|
5
|
+
--e.count || (e.restore(), o.delete(t));
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
function p(o) {
|
|
9
|
+
const t = o instanceof HTMLElement ? o : o.host;
|
|
10
|
+
return t instanceof HTMLElement ? s(l, t, () => {
|
|
11
|
+
const r = getComputedStyle(t).position;
|
|
12
|
+
if (r && r !== "static") return () => {
|
|
13
|
+
};
|
|
14
|
+
const e = t.style.getPropertyValue("position"), n = t.style.getPropertyPriority("position");
|
|
15
|
+
return t.style.setProperty("position", "relative"), () => {
|
|
16
|
+
t.style.position === "relative" && t.style.setProperty("position", e, n);
|
|
17
|
+
};
|
|
18
|
+
}) : () => {
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
function f(o) {
|
|
22
|
+
const t = o instanceof HTMLElement ? o : o.host;
|
|
23
|
+
return t instanceof HTMLElement ? s(u, t, () => {
|
|
24
|
+
const r = t.style.getPropertyValue("overflow"), e = t.style.getPropertyPriority("overflow");
|
|
25
|
+
return t.style.setProperty("overflow", "hidden"), () => {
|
|
26
|
+
t.style.overflow === "hidden" && t.style.setProperty("overflow", r, e);
|
|
27
|
+
};
|
|
28
|
+
}) : () => {
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
function a(o) {
|
|
32
|
+
const t = /* @__PURE__ */ new Map(), r = () => {
|
|
33
|
+
for (const [n, i] of t)
|
|
34
|
+
n.parentNode !== o && (i(), t.delete(n));
|
|
35
|
+
for (const n of o.children)
|
|
36
|
+
n.hasAttribute("data-hys-spin-portal") || t.has(n) || t.set(
|
|
37
|
+
n,
|
|
38
|
+
s(c, n, () => {
|
|
39
|
+
const i = n.getAttribute("inert");
|
|
40
|
+
return n.setAttribute("inert", ""), () => {
|
|
41
|
+
i === null ? n.removeAttribute("inert") : n.setAttribute("inert", i);
|
|
42
|
+
};
|
|
43
|
+
})
|
|
44
|
+
);
|
|
45
|
+
};
|
|
46
|
+
r();
|
|
47
|
+
const e = typeof MutationObserver > "u" ? void 0 : new MutationObserver(r);
|
|
48
|
+
return e == null || e.observe(o, { childList: !0 }), () => {
|
|
49
|
+
e == null || e.disconnect();
|
|
50
|
+
for (const n of t.values()) n();
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
export {
|
|
54
|
+
a as blockSpinTarget,
|
|
55
|
+
f as lockSpinTargetScroll,
|
|
56
|
+
p as positionSpinTarget
|
|
57
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
const a = [
|
|
2
|
+
{ name: "circle", label: "经典圆环", group: "rings" },
|
|
3
|
+
{ name: "dual-ring", label: "双层圆环", group: "rings" },
|
|
4
|
+
{ name: "triple-ring", label: "三层圆环", group: "rings" },
|
|
5
|
+
{ name: "segment", label: "分段圆环", group: "rings" },
|
|
6
|
+
{ name: "arc", label: "旋转圆弧", group: "rings" },
|
|
7
|
+
{ name: "gradient", label: "渐变圆环", group: "rings" },
|
|
8
|
+
{ name: "dot-spin", label: "点状旋转", group: "dots" },
|
|
9
|
+
{ name: "bouncing-dots", label: "三点跳动", group: "dots" },
|
|
10
|
+
{ name: "flashing-dots", label: "三点闪烁", group: "dots" },
|
|
11
|
+
{ name: "dot-grid", label: "点阵", group: "dots" },
|
|
12
|
+
{ name: "orbit", label: "圆点轨道", group: "dots" },
|
|
13
|
+
{ name: "wave", label: "波浪", group: "bars" },
|
|
14
|
+
{ name: "bars", label: "音频柱", group: "bars" },
|
|
15
|
+
{ name: "bar-spin", label: "旋转条", group: "bars" },
|
|
16
|
+
{ name: "square", label: "旋转方块", group: "shapes" },
|
|
17
|
+
{ name: "cube-flip", label: "方块翻转", group: "shapes" },
|
|
18
|
+
{ name: "grid", label: "方块网格", group: "shapes" },
|
|
19
|
+
{ name: "pulse", label: "脉冲", group: "rhythm" },
|
|
20
|
+
{ name: "heartbeat", label: "心跳", group: "rhythm" },
|
|
21
|
+
{ name: "ripple", label: "涟漪", group: "rhythm" },
|
|
22
|
+
{ name: "breathing", label: "呼吸", group: "rhythm" },
|
|
23
|
+
{ name: "ball", label: "弹跳小球", group: "dots" },
|
|
24
|
+
{ name: "chase", label: "小球追逐", group: "dots" },
|
|
25
|
+
{ name: "scaling-dots", label: "圆点缩放", group: "dots" },
|
|
26
|
+
{ name: "infinity", label: "无限符号", group: "paths" },
|
|
27
|
+
{ name: "spiral", label: "螺旋", group: "paths" },
|
|
28
|
+
{ name: "radar", label: "雷达扫描", group: "paths" },
|
|
29
|
+
{ name: "progress-ring", label: "进度环", group: "rings" },
|
|
30
|
+
{ name: "draw", label: "路径描绘", group: "paths" },
|
|
31
|
+
{ name: "custom", label: "自定义", group: "paths" }
|
|
32
|
+
];
|
|
33
|
+
export {
|
|
34
|
+
a as hysSpinAnimations
|
|
35
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { getCurrentInstance as a, inject as p, computed as t, toValue as s, provide as i, shallowRef as f } from "vue";
|
|
2
|
+
const c = Symbol("HysSpinConfig"), l = /* @__PURE__ */ new WeakMap(), n = f({});
|
|
3
|
+
function y(e) {
|
|
4
|
+
n.value = e;
|
|
5
|
+
}
|
|
6
|
+
function d() {
|
|
7
|
+
const e = a();
|
|
8
|
+
return (e && l.get(e)) ?? p(c, void 0) ?? {
|
|
9
|
+
defaults: t(() => s(n.value.defaults) ?? {}),
|
|
10
|
+
presets: t(() => s(n.value.presets) ?? {})
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
function S(e) {
|
|
14
|
+
const o = d(), u = {
|
|
15
|
+
defaults: t(() => ({
|
|
16
|
+
...o.defaults.value,
|
|
17
|
+
...s(e.defaults)
|
|
18
|
+
})),
|
|
19
|
+
presets: t(() => ({
|
|
20
|
+
...o.presets.value,
|
|
21
|
+
...s(e.presets)
|
|
22
|
+
}))
|
|
23
|
+
};
|
|
24
|
+
i(c, u);
|
|
25
|
+
const r = a();
|
|
26
|
+
r && l.set(r, u);
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
y as configureHysSpin,
|
|
30
|
+
S as provideHysSpin,
|
|
31
|
+
d as useSpinConfig
|
|
32
|
+
};
|