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
|
@@ -1,57 +1,61 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { useHysControlState as
|
|
3
|
-
import { useChoiceModel as
|
|
4
|
-
import { overlayOwnerKey as
|
|
5
|
-
import { useFloating as
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { ref as E, shallowRef as fe, useId as de, inject as ve, computed as i, watch as d, onMounted as me, onActivated as pe, onDeactivated as ye, onBeforeUnmount as ge, nextTick as k } from "vue";
|
|
2
|
+
import { useHysControlState as he } from "./formContext.js";
|
|
3
|
+
import { useChoiceModel as we } from "./choiceModel.js";
|
|
4
|
+
import { overlayOwnerKey as be } from "./overlayManager.js";
|
|
5
|
+
import { useFloating as xe } from "./useFloating.js";
|
|
6
|
+
import { popupFocusControls as j, usePopupSurfaceInteractions as Oe } from "./usePopupSurfaceInteractions.js";
|
|
7
|
+
import { createPopupReferenceBinding as Ce } from "./popupReferenceBinding.js";
|
|
8
|
+
import { usePopupSurfaceStyle as Ee, popupMaximumWidth as Re } from "./popupSurfaceStyle.js";
|
|
9
|
+
function Ie(t, v, y, u) {
|
|
10
|
+
const g = E(), b = fe(), x = E(), R = de() + "-popup", ee = R + "-title", { disabled: q } = he(t), s = ve(be, void 0), c = E(!0), O = E(!1), B = E(!1), M = we(
|
|
9
11
|
{
|
|
10
12
|
get modelValue() {
|
|
11
|
-
return
|
|
13
|
+
return t.open ?? t.modelValue;
|
|
12
14
|
}
|
|
13
15
|
},
|
|
14
|
-
() =>
|
|
15
|
-
),
|
|
16
|
-
() =>
|
|
17
|
-
),
|
|
18
|
-
() => typeof
|
|
19
|
-
),
|
|
20
|
-
const e =
|
|
21
|
-
return e instanceof HTMLElement ? e : (e == null ? void 0 : e.contextElement) ??
|
|
22
|
-
}),
|
|
23
|
-
() => !!
|
|
16
|
+
() => t.defaultOpen ?? !1
|
|
17
|
+
), A = i(
|
|
18
|
+
() => c.value && !q.value && (s == null ? void 0 : s.value) !== !1
|
|
19
|
+
), m = i(
|
|
20
|
+
() => typeof t.reference == "function" ? t.reference() : t.reference
|
|
21
|
+
), r = i(() => {
|
|
22
|
+
const e = m.value;
|
|
23
|
+
return e instanceof HTMLElement ? e : (e == null ? void 0 : e.contextElement) ?? b.value ?? g.value;
|
|
24
|
+
}), S = i(
|
|
25
|
+
() => !!b.value && (b.value.matches(j) || !!b.value.querySelector(j))
|
|
24
26
|
);
|
|
25
|
-
function
|
|
26
|
-
var
|
|
27
|
-
const e =
|
|
28
|
-
(
|
|
27
|
+
function V() {
|
|
28
|
+
var a;
|
|
29
|
+
const e = r.value;
|
|
30
|
+
(a = e != null && e.matches(j) ? e : (e == null ? void 0 : e.querySelector(j)) ?? g.value) == null || a.focus({ preventScroll: !0 });
|
|
29
31
|
}
|
|
30
|
-
function
|
|
32
|
+
function K() {
|
|
31
33
|
n.restoringFocus.value = !0;
|
|
32
34
|
try {
|
|
33
|
-
|
|
35
|
+
V();
|
|
34
36
|
} finally {
|
|
35
37
|
n.restoringFocus.value = !1;
|
|
36
38
|
}
|
|
37
39
|
}
|
|
38
|
-
const
|
|
39
|
-
const e =
|
|
40
|
+
const C = i(() => {
|
|
41
|
+
const e = m.value ?? b.value ?? g.value;
|
|
40
42
|
if (e)
|
|
41
43
|
return {
|
|
42
44
|
getBoundingClientRect: () => e.getBoundingClientRect(),
|
|
43
|
-
contains: (
|
|
44
|
-
var
|
|
45
|
-
return !!((
|
|
45
|
+
contains: (a) => {
|
|
46
|
+
var o, w;
|
|
47
|
+
return !!((o = r.value) != null && o.contains(a)) || !!((w = g.value) != null && w.contains(a));
|
|
46
48
|
},
|
|
47
|
-
focus:
|
|
49
|
+
focus: V,
|
|
48
50
|
get isConnected() {
|
|
49
|
-
var
|
|
50
|
-
return ((
|
|
51
|
+
var a;
|
|
52
|
+
return ((a = r.value) == null ? void 0 : a.isConnected) ?? !!m.value;
|
|
51
53
|
}
|
|
52
54
|
};
|
|
53
|
-
}),
|
|
54
|
-
const e =
|
|
55
|
+
}), N = i(() => {
|
|
56
|
+
const e = t.appendTo;
|
|
57
|
+
if (typeof document > "u")
|
|
58
|
+
return typeof e == "string" ? e : "body";
|
|
55
59
|
if (e instanceof HTMLElement) return e;
|
|
56
60
|
if (typeof e == "string")
|
|
57
61
|
try {
|
|
@@ -60,399 +64,220 @@ function at(a, v, A) {
|
|
|
60
64
|
return document.body;
|
|
61
65
|
}
|
|
62
66
|
return document.body;
|
|
63
|
-
}),
|
|
64
|
-
function
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
[
|
|
67
|
+
}), U = E({});
|
|
68
|
+
function te(e) {
|
|
69
|
+
const a = e.placement.startsWith("left") || e.placement.startsWith("right"), o = a ? e.height : e.width, w = Number.isFinite(t.arrowOffset) ? Math.max(6, t.arrowOffset) : 10, z = a ? e.anchor.top + e.anchor.height / 2 - e.y : e.anchor.left + e.anchor.width / 2 - e.x;
|
|
70
|
+
U.value = {
|
|
71
|
+
[a ? "top" : "left"]: Math.max(Math.min(w, o / 2), Math.min(z, o - w)) + "px"
|
|
68
72
|
};
|
|
69
73
|
}
|
|
70
|
-
const n =
|
|
74
|
+
const n = xe(C, x, {
|
|
71
75
|
get placement() {
|
|
72
|
-
return
|
|
76
|
+
return t.placement;
|
|
73
77
|
},
|
|
74
78
|
get gap() {
|
|
75
|
-
return
|
|
79
|
+
return t.offset ?? (v === "tooltip" ? 7 : 8);
|
|
76
80
|
},
|
|
77
81
|
get autoAdjustOverflow() {
|
|
78
|
-
return
|
|
82
|
+
return t.autoAdjustOverflow;
|
|
79
83
|
},
|
|
80
84
|
get closeOnEscape() {
|
|
81
|
-
return
|
|
85
|
+
return t.closeOnEscape;
|
|
82
86
|
},
|
|
83
87
|
get closeOnOutside() {
|
|
84
|
-
return
|
|
88
|
+
return t.closeOnOutside;
|
|
85
89
|
},
|
|
86
90
|
closeOnTab: v === "tooltip",
|
|
87
91
|
get strategy() {
|
|
88
|
-
return
|
|
92
|
+
return t.appendTo === !1 || N.value !== document.body ? "absolute" : "fixed";
|
|
89
93
|
},
|
|
90
|
-
width: () =>
|
|
91
|
-
maxWidth: () =>
|
|
92
|
-
zIndex: () =>
|
|
93
|
-
onPosition:
|
|
94
|
-
requestOpen(e,
|
|
95
|
-
return
|
|
94
|
+
width: () => t.width,
|
|
95
|
+
maxWidth: () => Re(t, v),
|
|
96
|
+
zIndex: () => t.zIndex,
|
|
97
|
+
onPosition: te,
|
|
98
|
+
requestOpen(e, a, o) {
|
|
99
|
+
return f(e, a, o), !1;
|
|
96
100
|
}
|
|
101
|
+
}), l = Oe(t, v, {
|
|
102
|
+
available: A,
|
|
103
|
+
anchor: C,
|
|
104
|
+
actualReference: r,
|
|
105
|
+
panel: x,
|
|
106
|
+
floating: n,
|
|
107
|
+
restoreReferenceFocus: K,
|
|
108
|
+
request: f,
|
|
109
|
+
allowTabExit: u == null ? void 0 : u.allowTabExit
|
|
110
|
+
}), { handlers: p, tab: H } = l, W = Ce(v, R, {
|
|
111
|
+
pointerenter: p.pointerEnter,
|
|
112
|
+
pointerleave: p.pointerLeave,
|
|
113
|
+
focusin: p.focusIn,
|
|
114
|
+
focusout: p.focusOut,
|
|
115
|
+
click: p.click,
|
|
116
|
+
contextmenu: p.contextmenu,
|
|
117
|
+
keydown: p.key
|
|
97
118
|
});
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
const e =
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}
|
|
106
|
-
function N() {
|
|
107
|
-
clearTimeout(B), B = void 0;
|
|
119
|
+
function F() {
|
|
120
|
+
var a;
|
|
121
|
+
const e = c.value && m.value ? r.value : void 0;
|
|
122
|
+
W.attach(
|
|
123
|
+
e && !((a = g.value) != null && a.contains(e)) ? e : void 0,
|
|
124
|
+
n.open.value
|
|
125
|
+
);
|
|
108
126
|
}
|
|
127
|
+
let h, T = 0, G = -1, J = -1;
|
|
109
128
|
function L() {
|
|
110
|
-
W = V = M = z = g = !1;
|
|
111
|
-
}
|
|
112
|
-
function $() {
|
|
113
129
|
var e;
|
|
114
|
-
|
|
130
|
+
A.value && !O.value && M.current.value && ((e = C.value) != null && e.isConnected) ? (B.value = !0, n.show(!0)) : n.close(!1, !0);
|
|
115
131
|
}
|
|
116
|
-
async function
|
|
117
|
-
var
|
|
118
|
-
|
|
132
|
+
async function f(e, a = !1, o = "programmatic", w = !0) {
|
|
133
|
+
var Q, X, Y, Z, _;
|
|
134
|
+
const z = n.open.value;
|
|
135
|
+
if (!e && z && ((Q = u == null ? void 0 : u.allowClose) == null ? void 0 : Q.call(u, o)) === !1 || (l.clearDelays(), !c.value || e && (!A.value || n.restoringFocus.value || !((X = C.value) != null && X.isConnected))))
|
|
119
136
|
return !1;
|
|
120
|
-
e ||
|
|
121
|
-
let
|
|
122
|
-
return
|
|
137
|
+
e || l.resetReasons(), O.value = !1;
|
|
138
|
+
let I = Object.is(M.current.value, e);
|
|
139
|
+
return I || (I = await M.commit(
|
|
123
140
|
e,
|
|
124
|
-
(
|
|
125
|
-
|
|
141
|
+
($) => {
|
|
142
|
+
y("update:open", $), y("update:modelValue", $);
|
|
126
143
|
},
|
|
127
144
|
() => {
|
|
128
145
|
}
|
|
129
|
-
)),
|
|
130
|
-
}
|
|
131
|
-
function re() {
|
|
132
|
-
if (clearTimeout(m), m = void 0, !p.value || n.restoringFocus.value || n.open.value || S)
|
|
133
|
-
return;
|
|
134
|
-
const e = te(a.showDelay);
|
|
135
|
-
e ? S = setTimeout(() => {
|
|
136
|
-
S = void 0, l(!0);
|
|
137
|
-
}, e) : l(!0);
|
|
138
|
-
}
|
|
139
|
-
function le() {
|
|
140
|
-
return g || W || a.enterable !== !1 && V || c.value.has("focus") && M || a.enterable !== !1 && z;
|
|
141
|
-
}
|
|
142
|
-
function U() {
|
|
143
|
-
if (clearTimeout(S), S = void 0, clearTimeout(m), m = void 0, le() || !n.open.value) return;
|
|
144
|
-
const e = () => {
|
|
145
|
-
m = void 0, !le() && n.isTop() && l(!1);
|
|
146
|
-
}, t = te(a.hideDelay);
|
|
147
|
-
t ? m = setTimeout(e, t) : e();
|
|
148
|
-
}
|
|
149
|
-
function se() {
|
|
150
|
-
c.value.has("hover") && (W = !0, re());
|
|
151
|
-
}
|
|
152
|
-
function ce() {
|
|
153
|
-
c.value.has("hover") && (W = !1, U());
|
|
154
|
-
}
|
|
155
|
-
function Ee() {
|
|
156
|
-
a.enterable !== !1 && (V = !0, clearTimeout(m), m = void 0);
|
|
157
|
-
}
|
|
158
|
-
function Se() {
|
|
159
|
-
V = !1, c.value.has("hover") && U();
|
|
160
|
-
}
|
|
161
|
-
function fe(e) {
|
|
162
|
-
var t;
|
|
163
|
-
(t = s.value) != null && t.contains(e.target) || n.restoringFocus.value || (M = !0, c.value.has("focus") && re());
|
|
164
|
-
}
|
|
165
|
-
function ve(e) {
|
|
166
|
-
var u, o, r;
|
|
167
|
-
if ((u = s.value) != null && u.contains(e.target)) return;
|
|
168
|
-
const t = e.relatedTarget;
|
|
169
|
-
if (!((o = T.value) != null && o.contains(t))) {
|
|
170
|
-
if (M = !1, (r = s.value) != null && r.contains(t) && a.enterable !== !1) {
|
|
171
|
-
z = !0;
|
|
172
|
-
return;
|
|
173
|
-
}
|
|
174
|
-
(c.value.has("focus") || c.value.has("hover")) && U();
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
function Ce() {
|
|
178
|
-
a.enterable !== !1 && (z = !0);
|
|
179
|
-
}
|
|
180
|
-
function Fe(e) {
|
|
181
|
-
var u, o;
|
|
182
|
-
const t = e.relatedTarget;
|
|
183
|
-
if (!((u = s.value) != null && u.contains(t))) {
|
|
184
|
-
if (z = !1, (o = T.value) != null && o.contains(t)) {
|
|
185
|
-
M = !0;
|
|
186
|
-
return;
|
|
187
|
-
}
|
|
188
|
-
(c.value.has("focus") || c.value.has("hover")) && U();
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
function de(e) {
|
|
192
|
-
var t;
|
|
193
|
-
(t = s.value) != null && t.contains(e.target) || !c.value.has("click") || !p.value || (g = n.open.value ? !g && (W && c.value.has("hover") || M && c.value.has("focus")) : !0, l(g));
|
|
194
|
-
}
|
|
195
|
-
function he(e) {
|
|
196
|
-
var t;
|
|
197
|
-
(t = s.value) != null && t.contains(e.target) || !c.value.has("contextmenu") || !p.value || (e.preventDefault(), g = !0, l(!0));
|
|
198
|
-
}
|
|
199
|
-
function me(e) {
|
|
200
|
-
var u;
|
|
201
|
-
if ((u = s.value) != null && u.contains(e.target) || !c.value.size || !p.value || e.defaultPrevented)
|
|
202
|
-
return;
|
|
203
|
-
const t = e.target;
|
|
204
|
-
if (!t.closest('input,textarea,select,[contenteditable="true"]')) {
|
|
205
|
-
if (e.key === "F10" && e.shiftKey && c.value.has("contextmenu")) {
|
|
206
|
-
e.preventDefault(), g = !0, l(!0);
|
|
207
|
-
return;
|
|
208
|
-
}
|
|
209
|
-
(a.triggerKeys ?? ["Enter", " "]).some(
|
|
210
|
-
(o) => o === e.key || o === "Space" && e.key === " "
|
|
211
|
-
) && (c.value.has("click") && t.closest("button,a[href],input") || (e.preventDefault(), g = !n.open.value, l(g)));
|
|
212
|
-
}
|
|
146
|
+
)), c.value ? (I && (e ? L() : (n.close(!1, !0), a && ((Y = u == null ? void 0 : u.shouldRestoreFocus) == null ? void 0 : Y.call(u)) !== !1 && ((Z = C.value) != null && Z.isConnected) && K(), z && w && ((_ = u == null ? void 0 : u.onDismiss) == null || _.call(u, o)))), I) : !1;
|
|
213
147
|
}
|
|
214
|
-
function
|
|
215
|
-
|
|
216
|
-
(t) => t.tabIndex >= 0 && !t.matches(":disabled") && !t.closest('[inert],[aria-hidden="true"]') && !!t.getClientRects().length && getComputedStyle(t).visibility !== "hidden"
|
|
217
|
-
);
|
|
148
|
+
function D() {
|
|
149
|
+
h == null || h.disconnect(), h = void 0;
|
|
218
150
|
}
|
|
219
|
-
function
|
|
220
|
-
|
|
221
|
-
var K;
|
|
222
|
-
return !((K = s.value) != null && K.contains(O));
|
|
223
|
-
}), o = u.findIndex((O) => O === t || (t == null ? void 0 : t.contains(O))), r = o < 0 ? void 0 : u[o + (e ? -1 : 1)];
|
|
224
|
-
return r == null || r.focus(), !!r;
|
|
151
|
+
function ne() {
|
|
152
|
+
D(), !(!n.open.value || !x.value || typeof ResizeObserver > "u") && (h = new ResizeObserver(n.schedule), h.observe(x.value), r.value && h.observe(r.value));
|
|
225
153
|
}
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
if (e.key !== "Tab" || v !== "popover" || !n.open.value || !n.isTop())
|
|
229
|
-
return;
|
|
230
|
-
const t = e.target, u = (K = s.value) == null ? void 0 : K.contains(t), o = (we = T.value) == null ? void 0 : we.contains(t);
|
|
231
|
-
if (!u && !o) return;
|
|
232
|
-
const r = s.value ? ye(s.value) : [];
|
|
233
|
-
if (o && !e.shiftKey && a.enterable !== !1 && r.length) {
|
|
234
|
-
e.preventDefault(), r[0].focus();
|
|
235
|
-
return;
|
|
236
|
-
}
|
|
237
|
-
if (u && t !== (e.shiftKey ? r[0] : r.at(-1)) && r.length)
|
|
238
|
-
return;
|
|
239
|
-
e.preventDefault(), await l(!1) && (u && e.shiftKey ? Y() : Re(e.shiftKey) || Y());
|
|
154
|
+
function P() {
|
|
155
|
+
l.reset(), l.clearAuto(), W.detach(), D(), document.removeEventListener("keydown", H, !0), n.close(!1, !0);
|
|
240
156
|
}
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
const e = te(a.autoClose);
|
|
244
|
-
n.open.value && e && (B = setTimeout(() => {
|
|
245
|
-
B = void 0, l(!1);
|
|
246
|
-
}, e));
|
|
247
|
-
}
|
|
248
|
-
function _() {
|
|
249
|
-
C == null || C.disconnect(), C = void 0;
|
|
250
|
-
}
|
|
251
|
-
function je() {
|
|
252
|
-
_(), !(!n.open.value || !s.value || typeof ResizeObserver > "u") && (C = new ResizeObserver(n.schedule), C.observe(s.value), h.value && C.observe(h.value));
|
|
253
|
-
}
|
|
254
|
-
const be = {
|
|
255
|
-
pointerenter: se,
|
|
256
|
-
pointerleave: ce,
|
|
257
|
-
focusin: fe,
|
|
258
|
-
focusout: ve,
|
|
259
|
-
click: de,
|
|
260
|
-
contextmenu: he,
|
|
261
|
-
keydown: me
|
|
262
|
-
};
|
|
263
|
-
let b;
|
|
264
|
-
function xe() {
|
|
265
|
-
if (!(!i || !b))
|
|
266
|
-
if (v === "tooltip") {
|
|
267
|
-
const e = n.open.value ? [b["aria-describedby"], R].filter(Boolean).join(" ") : b["aria-describedby"];
|
|
268
|
-
e ? i.setAttribute("aria-describedby", e) : i.removeAttribute("aria-describedby");
|
|
269
|
-
} else {
|
|
270
|
-
i.setAttribute(
|
|
271
|
-
"aria-haspopup",
|
|
272
|
-
b["aria-haspopup"] ?? "dialog"
|
|
273
|
-
), i.setAttribute("aria-expanded", String(n.open.value));
|
|
274
|
-
const e = n.open.value ? R : b["aria-controls"];
|
|
275
|
-
e ? i.setAttribute("aria-controls", e) : i.removeAttribute("aria-controls");
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
function pe() {
|
|
279
|
-
if (i)
|
|
280
|
-
for (const [e, t] of Object.entries(be))
|
|
281
|
-
i.removeEventListener(e, t);
|
|
282
|
-
if (i && b)
|
|
283
|
-
for (const [e, t] of Object.entries(b))
|
|
284
|
-
t === null ? i.removeAttribute(e) : i.setAttribute(e, t);
|
|
285
|
-
b = void 0, i = void 0;
|
|
286
|
-
}
|
|
287
|
-
function G() {
|
|
288
|
-
var e;
|
|
289
|
-
if (pe(), !(!d.value || !w.value)) {
|
|
290
|
-
if (i = h.value, i && ((e = E.value) != null && e.contains(i))) {
|
|
291
|
-
i = void 0;
|
|
292
|
-
return;
|
|
293
|
-
}
|
|
294
|
-
i && (b = Object.fromEntries(
|
|
295
|
-
[
|
|
296
|
-
"aria-describedby",
|
|
297
|
-
"aria-controls",
|
|
298
|
-
"aria-expanded",
|
|
299
|
-
"aria-haspopup"
|
|
300
|
-
].map((t) => [t, i.getAttribute(t)])
|
|
301
|
-
), xe());
|
|
302
|
-
for (const [t, u] of Object.entries(be))
|
|
303
|
-
i == null || i.addEventListener(t, u);
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
function J() {
|
|
307
|
-
k(), N(), L(), pe(), _(), document.removeEventListener("keydown", Z, !0), n.close(!1, !0);
|
|
308
|
-
}
|
|
309
|
-
x(
|
|
310
|
-
q.current,
|
|
157
|
+
d(
|
|
158
|
+
M.current,
|
|
311
159
|
() => {
|
|
312
|
-
|
|
160
|
+
O.value = !1, L();
|
|
313
161
|
},
|
|
314
162
|
{ flush: "post" }
|
|
315
|
-
),
|
|
316
|
-
[
|
|
163
|
+
), d(
|
|
164
|
+
[A, g, m],
|
|
317
165
|
() => {
|
|
318
|
-
|
|
166
|
+
A.value || (l.reset(), l.clearAuto()), L(), F();
|
|
319
167
|
},
|
|
320
168
|
{ flush: "post", immediate: !0 }
|
|
321
|
-
),
|
|
322
|
-
() =>
|
|
169
|
+
), d(
|
|
170
|
+
() => s == null ? void 0 : s.value,
|
|
323
171
|
(e) => {
|
|
324
|
-
e === !1 && (
|
|
172
|
+
e === !1 && (O.value = !0, P());
|
|
325
173
|
},
|
|
326
174
|
{ flush: "sync" }
|
|
327
|
-
),
|
|
328
|
-
[
|
|
175
|
+
), d(() => t.autoClose, l.startAuto), d(
|
|
176
|
+
[r, m],
|
|
329
177
|
() => {
|
|
330
|
-
|
|
178
|
+
l.reset(), n.schedule(), F();
|
|
331
179
|
},
|
|
332
180
|
{ flush: "post" }
|
|
333
|
-
),
|
|
334
|
-
() =>
|
|
181
|
+
), d(
|
|
182
|
+
() => t.trigger,
|
|
335
183
|
() => {
|
|
336
|
-
|
|
184
|
+
l.reset();
|
|
337
185
|
}
|
|
338
|
-
),
|
|
186
|
+
), d(
|
|
339
187
|
() => [
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
188
|
+
t.placement,
|
|
189
|
+
t.offset,
|
|
190
|
+
t.autoAdjustOverflow,
|
|
191
|
+
t.width,
|
|
192
|
+
t.maxWidth,
|
|
193
|
+
t.maxHeight,
|
|
194
|
+
t.appendTo,
|
|
195
|
+
t.arrowOffset
|
|
348
196
|
],
|
|
349
197
|
n.schedule,
|
|
350
198
|
{ flush: "post" }
|
|
351
|
-
),
|
|
199
|
+
), d([n.open, x, r], ne, { flush: "post" }), d(
|
|
352
200
|
n.open,
|
|
353
201
|
(e) => {
|
|
354
|
-
|
|
202
|
+
T++, W.syncAria(e), y("visibleChange", e), y("openChange", e), y(e ? "show" : "hide"), document.removeEventListener("keydown", H, !0), e ? (B.value = !0, document.addEventListener("keydown", H, !0), l.startAuto()) : (l.reset(), l.clearAuto(), D());
|
|
355
203
|
},
|
|
356
204
|
{ flush: "sync" }
|
|
357
205
|
);
|
|
358
|
-
async function
|
|
359
|
-
const e =
|
|
360
|
-
await
|
|
361
|
-
}
|
|
362
|
-
async function ke() {
|
|
363
|
-
const e = I;
|
|
364
|
-
await Te(), d.value && !n.open.value && e === I && ie !== e && (ie = e, A("closed"));
|
|
206
|
+
async function ae() {
|
|
207
|
+
const e = T;
|
|
208
|
+
await k(), c.value && n.open.value && e === T && G !== e && (G = e, y("opened"));
|
|
365
209
|
}
|
|
366
|
-
function
|
|
367
|
-
|
|
210
|
+
async function ue() {
|
|
211
|
+
const e = T;
|
|
212
|
+
await k(), c.value && !n.open.value && e === T && J !== e && (J = e, y("closed"));
|
|
368
213
|
}
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
214
|
+
function le() {
|
|
215
|
+
O.value = !0, P();
|
|
216
|
+
}
|
|
217
|
+
me(() => {
|
|
218
|
+
L(), F();
|
|
219
|
+
}), pe(() => {
|
|
220
|
+
c.value = !0, F();
|
|
221
|
+
}), ye(() => {
|
|
222
|
+
c.value = !1, O.value = !0, P();
|
|
223
|
+
}), ge(() => {
|
|
224
|
+
c.value = !1, P();
|
|
377
225
|
});
|
|
378
|
-
const
|
|
379
|
-
() => n.open.value ||
|
|
380
|
-
),
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
"--hys-ui-popup-border": a.color || (e ? "#172744" : "var(--hys-ui-border,var(--hys-ui-theme-border))")
|
|
386
|
-
};
|
|
387
|
-
}), Ie = f(() => ({
|
|
388
|
-
...a.overlayStyle,
|
|
389
|
-
...n.style.value,
|
|
390
|
-
...He.value,
|
|
391
|
-
overflow: "visible",
|
|
392
|
-
maxWidth: `min(${ee(a.maxWidth) ?? (v === "tooltip" ? "320px" : "360px")},calc(100vw - 20px))`,
|
|
393
|
-
minWidth: a.width !== void 0 ? "0" : void 0
|
|
394
|
-
})), We = f(() => ({
|
|
395
|
-
...a.contentStyle,
|
|
396
|
-
maxHeight: a.maxHeight !== void 0 ? `min(${ee(a.maxHeight)},calc(100vh - 20px))` : "calc(100vh - 20px)"
|
|
397
|
-
})), ze = f(() => ({
|
|
226
|
+
const ce = i(
|
|
227
|
+
() => n.open.value || t.forceRender || t.destroyOnHide === !1 && B.value
|
|
228
|
+
), { style: re, contentStyle: oe } = Ee(
|
|
229
|
+
t,
|
|
230
|
+
v,
|
|
231
|
+
n.style
|
|
232
|
+
), ie = i(() => ({
|
|
398
233
|
open: n.open.value,
|
|
399
|
-
show: () =>
|
|
400
|
-
close: () =>
|
|
401
|
-
toggle: () =>
|
|
234
|
+
show: () => f(!0),
|
|
235
|
+
close: () => f(!1),
|
|
236
|
+
toggle: () => f(!n.open.value),
|
|
402
237
|
updatePosition: n.schedule
|
|
403
|
-
})),
|
|
404
|
-
tabindex:
|
|
405
|
-
role: v === "popover" && !
|
|
406
|
-
"aria-disabled": !
|
|
407
|
-
...
|
|
238
|
+
})), se = i(() => ({
|
|
239
|
+
tabindex: m.value ? -1 : S.value ? void 0 : q.value ? -1 : t.triggerTabindex ?? 0,
|
|
240
|
+
role: v === "popover" && !S.value && !m.value ? "button" : void 0,
|
|
241
|
+
"aria-disabled": !S.value && q.value || void 0,
|
|
242
|
+
...S.value ? {} : v === "tooltip" ? { "aria-describedby": n.open.value ? R : void 0 } : {
|
|
408
243
|
"aria-controls": n.open.value ? R : void 0,
|
|
409
244
|
"aria-expanded": n.open.value,
|
|
410
245
|
"aria-haspopup": "dialog"
|
|
411
246
|
}
|
|
412
247
|
}));
|
|
413
248
|
return {
|
|
414
|
-
wrapper:
|
|
415
|
-
referenceElement:
|
|
416
|
-
panel:
|
|
417
|
-
actualReference:
|
|
418
|
-
nativeReference:
|
|
249
|
+
wrapper: g,
|
|
250
|
+
referenceElement: b,
|
|
251
|
+
panel: x,
|
|
252
|
+
actualReference: r,
|
|
253
|
+
nativeReference: S,
|
|
419
254
|
id: R,
|
|
420
|
-
titleId:
|
|
255
|
+
titleId: ee,
|
|
421
256
|
open: n.open,
|
|
422
257
|
placement: n.placement,
|
|
423
|
-
active:
|
|
424
|
-
mounted:
|
|
425
|
-
teleportTo:
|
|
426
|
-
arrowStyle:
|
|
427
|
-
style:
|
|
428
|
-
contentStyle:
|
|
429
|
-
scope:
|
|
430
|
-
wrapperAttrs:
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
click: de,
|
|
440
|
-
contextmenu: he,
|
|
441
|
-
key: me,
|
|
442
|
-
afterEnter: Me,
|
|
443
|
-
afterLeave: ke,
|
|
444
|
-
inactive: Le,
|
|
445
|
-
request: l,
|
|
446
|
-
show: () => l(!0),
|
|
447
|
-
hide: () => l(!1),
|
|
448
|
-
toggle: () => l(!n.open.value),
|
|
258
|
+
active: i(() => c.value && (s == null ? void 0 : s.value) !== !1),
|
|
259
|
+
mounted: ce,
|
|
260
|
+
teleportTo: N,
|
|
261
|
+
arrowStyle: U,
|
|
262
|
+
style: re,
|
|
263
|
+
contentStyle: oe,
|
|
264
|
+
scope: ie,
|
|
265
|
+
wrapperAttrs: se,
|
|
266
|
+
...p,
|
|
267
|
+
afterEnter: ae,
|
|
268
|
+
afterLeave: ue,
|
|
269
|
+
inactive: le,
|
|
270
|
+
request: f,
|
|
271
|
+
show: () => f(!0),
|
|
272
|
+
hide: () => f(!1),
|
|
273
|
+
toggle: () => f(!n.open.value),
|
|
449
274
|
updatePosition: n.schedule,
|
|
450
275
|
focus: () => {
|
|
451
276
|
var e;
|
|
452
|
-
return (e =
|
|
277
|
+
return (e = C.value) == null ? void 0 : e.focus();
|
|
453
278
|
}
|
|
454
279
|
};
|
|
455
280
|
}
|
|
456
281
|
export {
|
|
457
|
-
|
|
282
|
+
Ie as usePopupSurface
|
|
458
283
|
};
|