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
|
@@ -4,7 +4,7 @@ import { popupSize as Q } from "../motion/popup.js";
|
|
|
4
4
|
import { positionFloating as Z } from "./floatingPosition.js";
|
|
5
5
|
import { overlayOwnerKey as _, registerOverlay as ee } from "./overlayManager.js";
|
|
6
6
|
function re(v, n, e = {}) {
|
|
7
|
-
const { disabled: k } = J({}), m = T(_, void 0),
|
|
7
|
+
const { disabled: k } = J({}), m = T(_, void 0), s = E(!1), W = Y(), p = E(!1), L = E({
|
|
8
8
|
position: "fixed",
|
|
9
9
|
top: "0px",
|
|
10
10
|
left: "0px",
|
|
@@ -17,18 +17,18 @@ function re(v, n, e = {}) {
|
|
|
17
17
|
let $ = 0, w, r, y = 0;
|
|
18
18
|
function F() {
|
|
19
19
|
var R, S, H;
|
|
20
|
-
if (!
|
|
20
|
+
if (!s.value || !v.value || !n.value) return;
|
|
21
21
|
const t = v.value.getBoundingClientRect();
|
|
22
22
|
if (!t.width && !t.height) {
|
|
23
|
-
u();
|
|
23
|
+
u(!1, !1, "anchor");
|
|
24
24
|
return;
|
|
25
25
|
}
|
|
26
|
-
const a = Number.isFinite(e.gap) ? e.gap : 8, i = Number.isFinite(e.padding) ? Math.max(0, e.padding) : 10, l = document.documentElement.clientWidth,
|
|
27
|
-
x !== void 0 ? (n.value.style.width = x, n.value.style.minWidth = "0", n.value.style.maxWidth = P) : g === !0 && (n.value.style.width = `${
|
|
26
|
+
const a = Number.isFinite(e.gap) ? e.gap : 8, i = Number.isFinite(e.padding) ? Math.max(0, e.padding) : 10, l = document.documentElement.clientWidth, d = document.documentElement.clientHeight, c = Math.min(t.width, Math.max(0, l - 2 * i)), g = typeof e.matchWidth == "function" ? e.matchWidth() : e.matchWidth, h = (R = e.maxWidth) == null ? void 0 : R.call(e), P = h !== void 0 && (typeof h != "number" || Number.isFinite(h)) ? `min(${typeof h == "number" ? Math.max(0, h) + "px" : h},calc(100vw - ${i * 2}px))` : `calc(100vw - ${i * 2}px)`, b = (S = e.width) == null ? void 0 : S.call(e), x = typeof b == "number" ? Number.isFinite(b) ? Math.max(0, b) + "px" : void 0 : b;
|
|
27
|
+
x !== void 0 ? (n.value.style.width = x, n.value.style.minWidth = "0", n.value.style.maxWidth = P) : g === !0 && (n.value.style.width = `${c}px`, n.value.style.minWidth = "0", n.value.style.maxWidth = `${c}px`), x === void 0 && g === "min" && (n.value.style.width = "max-content", n.value.style.minWidth = `${c}px`, n.value.style.maxWidth = `calc(100vw - ${i * 2}px)`);
|
|
28
28
|
const z = Z(
|
|
29
29
|
t,
|
|
30
30
|
Q(n.value),
|
|
31
|
-
{ width: l, height:
|
|
31
|
+
{ width: l, height: d },
|
|
32
32
|
A(),
|
|
33
33
|
a,
|
|
34
34
|
i,
|
|
@@ -45,7 +45,7 @@ function re(v, n, e = {}) {
|
|
|
45
45
|
O += window.scrollX, M += window.scrollY;
|
|
46
46
|
}
|
|
47
47
|
L.value = {
|
|
48
|
-
...x !== void 0 ? { width: x, minWidth: "0" } : g === !0 ? { width: `${
|
|
48
|
+
...x !== void 0 ? { width: x, minWidth: "0" } : g === !0 ? { width: `${c}px`, minWidth: "0" } : g === "min" ? { width: "max-content", minWidth: `${c}px` } : {},
|
|
49
49
|
position: e.strategy ?? "fixed",
|
|
50
50
|
left: `${Math.round(O)}px`,
|
|
51
51
|
top: `${Math.round(M)}px`,
|
|
@@ -57,18 +57,18 @@ function re(v, n, e = {}) {
|
|
|
57
57
|
overscrollBehavior: "contain"
|
|
58
58
|
};
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function o() {
|
|
61
61
|
cancelAnimationFrame($), $ = requestAnimationFrame(F);
|
|
62
62
|
}
|
|
63
63
|
function I(t) {
|
|
64
64
|
var a, i;
|
|
65
|
-
!(r != null && r()) || e.closeOnOutside === !1 || !((a = v.value) != null && a.contains(t.target)) && !((i = n.value) != null && i.contains(t.target)) && u();
|
|
65
|
+
!(r != null && r()) || e.closeOnOutside === !1 || !((a = v.value) != null && a.contains(t.target)) && !((i = n.value) != null && i.contains(t.target)) && u(!1, !1, "outside");
|
|
66
66
|
}
|
|
67
67
|
function q(t) {
|
|
68
68
|
var a, i;
|
|
69
|
-
if (!(!
|
|
69
|
+
if (!(!s.value || !(r != null && r()))) {
|
|
70
70
|
if (t.key === "Escape" && e.closeOnEscape !== !1)
|
|
71
|
-
t.preventDefault(), t.stopImmediatePropagation(), u(!0);
|
|
71
|
+
t.preventDefault(), t.stopImmediatePropagation(), u(!0, !1, "escape");
|
|
72
72
|
else if (t.key === "Tab" && e.closeOnTab !== !1) {
|
|
73
73
|
const l = document.activeElement;
|
|
74
74
|
if ((a = v.value) != null && a.contains(l)) {
|
|
@@ -76,25 +76,25 @@ function re(v, n, e = {}) {
|
|
|
76
76
|
return;
|
|
77
77
|
}
|
|
78
78
|
if ((i = n.value) != null && i.contains(l)) {
|
|
79
|
-
const
|
|
79
|
+
const d = Array.from(
|
|
80
80
|
n.value.querySelectorAll(
|
|
81
81
|
'a[href],button:not(:disabled),input:not(:disabled),textarea:not(:disabled),select:not(:disabled),[tabindex]:not([tabindex="-1"])'
|
|
82
82
|
)
|
|
83
83
|
).filter(
|
|
84
|
-
(
|
|
84
|
+
(c) => c.getClientRects().length && !c.closest("[inert]")
|
|
85
85
|
);
|
|
86
|
-
(!
|
|
86
|
+
(!d.length || l === (t.shiftKey ? d[0] : d.at(-1))) && u(!0);
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
function B() {
|
|
92
92
|
var t, a;
|
|
93
|
-
document.removeEventListener("pointerdown", I, !0), document.removeEventListener("keydown", q, !0), window.removeEventListener("resize",
|
|
93
|
+
document.removeEventListener("pointerdown", I, !0), document.removeEventListener("keydown", q, !0), window.removeEventListener("resize", o), window.removeEventListener("scroll", o, !0), (t = window.visualViewport) == null || t.removeEventListener("resize", o), (a = window.visualViewport) == null || a.removeEventListener("scroll", o), cancelAnimationFrame($), w == null || w(), w = void 0, W.value = void 0, r = void 0;
|
|
94
94
|
}
|
|
95
|
-
function u(t = !1, a = !1) {
|
|
96
|
-
var
|
|
97
|
-
if (!(!a &&
|
|
95
|
+
function u(t = !1, a = !1, i) {
|
|
96
|
+
var l, d;
|
|
97
|
+
if (!(!a && s.value && ((l = e.requestOpen) == null ? void 0 : l.call(e, !1, t, i)) === !1) && (y++, !!s.value && (s.value = !1, B(), t && ((d = v.value) != null && d.isConnected)))) {
|
|
98
98
|
p.value = !0;
|
|
99
99
|
try {
|
|
100
100
|
v.value.focus();
|
|
@@ -104,29 +104,29 @@ function re(v, n, e = {}) {
|
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
async function N(t = !1) {
|
|
107
|
-
var l,
|
|
107
|
+
var l, d, c;
|
|
108
108
|
if (k.value || (m == null ? void 0 : m.value) === !1) return;
|
|
109
|
-
if (
|
|
110
|
-
|
|
109
|
+
if (s.value) {
|
|
110
|
+
o();
|
|
111
111
|
return;
|
|
112
112
|
}
|
|
113
113
|
if (!t && ((l = e.requestOpen) == null ? void 0 : l.call(e, !0)) === !1) return;
|
|
114
114
|
const a = ++y;
|
|
115
|
-
if (
|
|
115
|
+
if (s.value = !0, L.value = {
|
|
116
116
|
position: "fixed",
|
|
117
117
|
top: "0px",
|
|
118
118
|
left: "0px",
|
|
119
119
|
visibility: "hidden"
|
|
120
|
-
}, await G(), a !== y || !
|
|
120
|
+
}, await G(), a !== y || !s.value) return;
|
|
121
121
|
const i = ee(
|
|
122
122
|
"floating",
|
|
123
|
-
() => u(!0),
|
|
123
|
+
() => u(!0, !1, "escape"),
|
|
124
124
|
e.zIndex
|
|
125
125
|
);
|
|
126
|
-
W.value = i, w = i.unregister, r = i.isTop, F(), document.addEventListener("pointerdown", I, !0), document.addEventListener("keydown", q, !0), window.addEventListener("resize",
|
|
126
|
+
W.value = i, w = i.unregister, r = i.isTop, F(), document.addEventListener("pointerdown", I, !0), document.addEventListener("keydown", q, !0), window.addEventListener("resize", o), window.addEventListener("scroll", o, !0), (d = window.visualViewport) == null || d.addEventListener("resize", o), (c = window.visualViewport) == null || c.addEventListener("scroll", o);
|
|
127
127
|
}
|
|
128
128
|
function K() {
|
|
129
|
-
return
|
|
129
|
+
return s.value ? u() : N();
|
|
130
130
|
}
|
|
131
131
|
return D(
|
|
132
132
|
k,
|
|
@@ -143,7 +143,7 @@ function re(v, n, e = {}) {
|
|
|
143
143
|
), V(() => {
|
|
144
144
|
y++, B();
|
|
145
145
|
}), {
|
|
146
|
-
open:
|
|
146
|
+
open: s,
|
|
147
147
|
style: X(() => {
|
|
148
148
|
var t;
|
|
149
149
|
return {
|
|
@@ -157,7 +157,7 @@ function re(v, n, e = {}) {
|
|
|
157
157
|
close: u,
|
|
158
158
|
toggle: K,
|
|
159
159
|
restoringFocus: p,
|
|
160
|
-
schedule:
|
|
160
|
+
schedule: o,
|
|
161
161
|
isTop: () => (r == null ? void 0 : r()) ?? !1
|
|
162
162
|
};
|
|
163
163
|
}
|
|
@@ -1,148 +1,130 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
let
|
|
11
|
-
const
|
|
12
|
-
function C(e) {
|
|
1
|
+
import { defineComponent as T, createApp as C, h as H, getCurrentInstance as x, onDeactivated as E, onActivated as I, onScopeDispose as k, shallowRef as g, toValue as l, nextTick as q, render as h } from "vue";
|
|
2
|
+
import { provideHysConfig as Q, useHysRootAttrs as D } from "../config.js";
|
|
3
|
+
import R from "../components/HysToast/ToastViewport/ToastViewport.vue.js";
|
|
4
|
+
import { createToastQueue as A } from "./toastQueue.js";
|
|
5
|
+
function V(t = {}) {
|
|
6
|
+
const s = x();
|
|
7
|
+
if (!s)
|
|
8
|
+
throw new Error("useHysToast must be called during component setup");
|
|
9
|
+
const m = D();
|
|
10
|
+
let o;
|
|
11
|
+
const p = (n) => {
|
|
13
12
|
try {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
s.appContext.config.errorHandler ? s.appContext.config.errorHandler(
|
|
14
|
+
n,
|
|
15
|
+
s.proxy,
|
|
16
|
+
"HysToast callback"
|
|
17
|
+
) : console.error(n);
|
|
18
|
+
} catch (i) {
|
|
19
|
+
console.error(i);
|
|
21
20
|
}
|
|
21
|
+
};
|
|
22
|
+
function a() {
|
|
23
|
+
o && (h(null, o), o.remove(), o = void 0);
|
|
22
24
|
}
|
|
23
|
-
function
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
W(() => {
|
|
30
|
-
s && s === r && !a.length && (b(null, s), s.remove(), r = void 0);
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
function h(e) {
|
|
34
|
-
if (!(e.closing || e.finished)) {
|
|
35
|
-
e.closing = !0;
|
|
36
|
-
try {
|
|
37
|
-
C(e.onClose);
|
|
38
|
-
} finally {
|
|
39
|
-
const o = d.get(e.token);
|
|
40
|
-
o ? o.close() : H(e);
|
|
41
|
-
}
|
|
25
|
+
function c() {
|
|
26
|
+
const n = r.settings.value.appendTo, i = typeof n == "string" ? document.querySelector(n) : n ?? document.body;
|
|
27
|
+
if (!i) throw new Error("Toast appendTo target was not found");
|
|
28
|
+
if (o) {
|
|
29
|
+
o.parentNode !== i && i.appendChild(o);
|
|
30
|
+
return;
|
|
42
31
|
}
|
|
32
|
+
o = document.createElement("div"), o.dataset.hysToastHost = "", i.appendChild(o);
|
|
33
|
+
const y = H(R, { queue: r, skin: () => m.value });
|
|
34
|
+
y.appContext = s.appContext, h(y, o);
|
|
43
35
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
36
|
+
const r = A(
|
|
37
|
+
t,
|
|
38
|
+
{
|
|
39
|
+
mount: c,
|
|
40
|
+
empty: () => {
|
|
41
|
+
q(() => {
|
|
42
|
+
r.records.size || a();
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
p
|
|
47
|
+
);
|
|
48
|
+
function f(n = !1) {
|
|
49
|
+
r.suspend(n), a();
|
|
51
50
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
return E(() => f()), I(r.resume), k(() => f(!0)), {
|
|
52
|
+
...r.api,
|
|
53
|
+
configure(n) {
|
|
54
|
+
r.api.configure(n), o && "appendTo" in n && c();
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
function w(t = {}) {
|
|
59
|
+
const { theme: s, motion: m, buttonAutoInsertSpace: o, ...p } = t;
|
|
60
|
+
if (typeof document > "u") {
|
|
61
|
+
const n = A(
|
|
62
|
+
p,
|
|
63
|
+
{ mount() {
|
|
64
|
+
}, empty() {
|
|
65
|
+
} },
|
|
66
|
+
() => {
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
return { ...n.api, dispose: () => n.suspend(!0) };
|
|
55
70
|
}
|
|
56
|
-
|
|
57
|
-
|
|
71
|
+
let a, c = !1;
|
|
72
|
+
const r = T({
|
|
58
73
|
setup() {
|
|
59
|
-
return
|
|
60
|
-
const e = /* @__PURE__ */ new Map();
|
|
61
|
-
for (const o of a) {
|
|
62
|
-
const s = `${g(o.position)}:${o.offset ?? 24}:${o.zIndex ?? 2e3}`, t = e.get(s) || [];
|
|
63
|
-
t.push(o), e.set(s, t);
|
|
64
|
-
}
|
|
65
|
-
return m(R, [...e].map(([o, s]) => m("div", { key: o, ...p.value, class: "hys-ui-toast-stack", style: j(s[0]) }, s.map((t) => m(X, {
|
|
66
|
-
key: t.token,
|
|
67
|
-
ref: (f) => {
|
|
68
|
-
f ? d.set(t.token, f) : d.delete(t.token);
|
|
69
|
-
},
|
|
70
|
-
"data-toast-id": t.id,
|
|
71
|
-
message: t.message,
|
|
72
|
-
type: t.type,
|
|
73
|
-
duration: t.duration,
|
|
74
|
-
closable: t.closable ?? !0,
|
|
75
|
-
showIcon: t.showIcon ?? !0,
|
|
76
|
-
pauseOnHover: t.pauseOnHover ?? !0,
|
|
77
|
-
closeOnEscape: t.closeOnEscape,
|
|
78
|
-
position: t.position,
|
|
79
|
-
offset: t.offset,
|
|
80
|
-
zIndex: t.zIndex,
|
|
81
|
-
plain: t.plain,
|
|
82
|
-
repeat: t.repeat,
|
|
83
|
-
teleport: !1,
|
|
84
|
-
onClose: () => h(t),
|
|
85
|
-
onAfterClose: () => H(t)
|
|
86
|
-
}, {
|
|
87
|
-
...t.content !== void 0 ? { default: () => typeof t.content == "function" ? t.content() : t.content } : {},
|
|
88
|
-
...t.icon !== void 0 ? { icon: () => typeof t.icon == "function" ? t.icon() : t.icon } : {}
|
|
89
|
-
})))));
|
|
90
|
-
};
|
|
74
|
+
return a = V(p), () => null;
|
|
91
75
|
}
|
|
92
|
-
})
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
if (t)
|
|
106
|
-
return o.id || t.repeat++, I(t, o), t.handle;
|
|
107
|
-
const f = "hys-toast-" + ++J, $ = o.id ?? f;
|
|
108
|
-
let T;
|
|
109
|
-
const S = new Promise((i) => {
|
|
110
|
-
T = i;
|
|
111
|
-
}), c = A({ ...s, token: f, id: $, repeat: 1, closing: !1, finished: !1, resolve: T });
|
|
112
|
-
if (c.handle = { id: $, closed: S, close: () => h(c), update: (i) => I(c, i) }, v || !x || !c.message && (c.content == null || c.content === !1 || c.content === ""))
|
|
113
|
-
return c.finished = !0, T(), c.handle;
|
|
114
|
-
for (; a.filter((i) => !i.closing).length >= M; ) h(a.find((i) => !i.closing));
|
|
115
|
-
return D(), a.push(c), c.handle;
|
|
116
|
-
}
|
|
117
|
-
function E() {
|
|
118
|
-
for (const e of [...a])
|
|
119
|
-
e.closing || (e.closing = !0, C(e.onClose)), H(e);
|
|
120
|
-
r && (b(null, r), r.remove(), r = void 0);
|
|
121
|
-
}
|
|
122
|
-
B(() => {
|
|
123
|
-
x = !1, E();
|
|
124
|
-
}), N(() => {
|
|
125
|
-
x = !0;
|
|
126
|
-
}), P(() => {
|
|
127
|
-
v = !0, E();
|
|
128
|
-
});
|
|
129
|
-
const u = (e) => (o) => O({ ...w(o), type: e });
|
|
130
|
-
return { show: O, success: u("success"), info: u("info"), warning: u("warning"), error: u("error"), loading: u("loading"), closeAll: () => {
|
|
131
|
-
for (const e of [...a]) h(e);
|
|
132
|
-
} };
|
|
76
|
+
}), f = C(
|
|
77
|
+
T({
|
|
78
|
+
setup() {
|
|
79
|
+
return Q({ theme: s, motion: m, buttonAutoInsertSpace: o }), () => H(r);
|
|
80
|
+
}
|
|
81
|
+
})
|
|
82
|
+
);
|
|
83
|
+
return f.mount(document.createElement("div")), {
|
|
84
|
+
...a,
|
|
85
|
+
dispose() {
|
|
86
|
+
c || (c = !0, f.unmount());
|
|
87
|
+
}
|
|
88
|
+
};
|
|
133
89
|
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
} };
|
|
90
|
+
let e;
|
|
91
|
+
const d = g({});
|
|
92
|
+
function u() {
|
|
93
|
+
return typeof document > "u" ? w() : e ?? (e = w({
|
|
94
|
+
...d.value,
|
|
95
|
+
theme: () => l(d.value.theme) ?? "blue",
|
|
96
|
+
motion: () => l(d.value.motion) ?? "subtle",
|
|
97
|
+
buttonAutoInsertSpace: () => l(d.value.buttonAutoInsertSpace) ?? !0
|
|
98
|
+
}));
|
|
144
99
|
}
|
|
100
|
+
function v(t) {
|
|
101
|
+
if (typeof document > "u") return;
|
|
102
|
+
const { theme: s, motion: m, buttonAutoInsertSpace: o, ...p } = t;
|
|
103
|
+
d.value = { ...d.value, ...t }, e == null || e.configure(p);
|
|
104
|
+
}
|
|
105
|
+
const B = {
|
|
106
|
+
show: (t) => u().show(t),
|
|
107
|
+
success: (t) => u().success(t),
|
|
108
|
+
info: (t) => u().info(t),
|
|
109
|
+
warning: (t) => u().warning(t),
|
|
110
|
+
error: (t) => u().error(t),
|
|
111
|
+
loading: (t) => u().loading(t),
|
|
112
|
+
promise: (t, s) => u().promise(t, s),
|
|
113
|
+
close: (t) => e == null ? void 0 : e.close(t),
|
|
114
|
+
update: (t, s) => e == null ? void 0 : e.update(t, s),
|
|
115
|
+
find: (t) => e == null ? void 0 : e.find(t),
|
|
116
|
+
list: (t) => (e == null ? void 0 : e.list(t)) ?? [],
|
|
117
|
+
closeAll: (t) => e == null ? void 0 : e.closeAll(t),
|
|
118
|
+
closeType: (t) => e == null ? void 0 : e.closeType(t),
|
|
119
|
+
clearQueue: () => e == null ? void 0 : e.clearQueue(),
|
|
120
|
+
configure: v,
|
|
121
|
+
dispose() {
|
|
122
|
+
e == null || e.dispose(), e = void 0;
|
|
123
|
+
}
|
|
124
|
+
};
|
|
145
125
|
export {
|
|
146
|
-
|
|
147
|
-
|
|
126
|
+
v as configureHysToast,
|
|
127
|
+
w as createHysToast,
|
|
128
|
+
B as hysToast,
|
|
129
|
+
V as useHysToast
|
|
148
130
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { onMounted as s, onActivated as u, onDeactivated as c, onBeforeUnmount as d, readonly as f, ref as a } from "vue";
|
|
2
|
+
const r = a(!1);
|
|
3
|
+
let o = 0;
|
|
4
|
+
function i() {
|
|
5
|
+
r.value = document.hidden;
|
|
6
|
+
}
|
|
7
|
+
function b() {
|
|
8
|
+
let e = !1;
|
|
9
|
+
function n() {
|
|
10
|
+
e || (e = !0, ++o === 1 && (i(), document.addEventListener("visibilitychange", i)));
|
|
11
|
+
}
|
|
12
|
+
function t() {
|
|
13
|
+
e && (e = !1, --o === 0 && document.removeEventListener("visibilitychange", i));
|
|
14
|
+
}
|
|
15
|
+
return s(n), u(n), c(t), d(t), f(r);
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
b as usePageVisibility
|
|
19
|
+
};
|