hys-ui 0.6.0 → 0.8.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 +15 -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/HysDatePicker/HysDatePicker.vue.js +102 -48
- package/dist/components/HysDatePicker/HysDatePickerControl.vue.js +2 -2
- package/dist/components/HysDatePicker/HysDatePickerControl2.vue.js +874 -532
- package/dist/components/HysDatePicker/HysDatePickerPanel.vue.js +2 -2
- package/dist/components/HysDatePicker/HysDatePickerPanel2.vue.js +209 -168
- package/dist/components/HysDateRangePicker/HysDateRangePicker.vue.js +102 -48
- package/dist/components/HysDescriptions/HysDescriptions.vue.js +7 -0
- package/dist/components/HysDescriptions/HysDescriptions2.vue.js +146 -0
- 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/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/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/composables/datePicker.js +153 -94
- package/dist/composables/datePickerModel.js +156 -0
- package/dist/composables/datePickerPanels.js +78 -0
- package/dist/composables/datePickerRules.js +166 -0
- package/dist/composables/floatingPosition.js +32 -13
- package/dist/composables/formLayout.js +20 -42
- package/dist/composables/popupSurfaceStyle.js +30 -0
- package/dist/composables/useContainerWidth.js +24 -0
- package/dist/composables/useDatePicker.js +274 -381
- package/dist/composables/useFloating.js +42 -41
- package/dist/composables/usePageVisibility.js +19 -0
- package/dist/composables/usePopupSurface.js +153 -162
- package/dist/composables/usePopupSurfaceInteractions.js +91 -90
- 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 +229 -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/HysDatePicker/HysDatePicker.vue.d.ts +6 -9
- package/dist/types/components/HysDatePicker/HysDatePickerControl.vue.d.ts +12 -0
- package/dist/types/components/HysDatePicker/HysDatePickerPanel.vue.d.ts +6 -0
- package/dist/types/components/HysDateRangePicker/HysDateRangePicker.vue.d.ts +6 -9
- 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/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/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/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/toastPresentation.d.ts +1 -1
- package/dist/types/components/HysVirtualTable/HysVirtualTable.vue.d.ts +2 -2
- package/dist/types/composables/dataGrid.d.ts +34 -0
- package/dist/types/composables/datePicker.d.ts +14 -214
- package/dist/types/composables/datePickerModel.d.ts +63 -0
- package/dist/types/composables/datePickerPanels.d.ts +23 -0
- package/dist/types/composables/datePickerRules.d.ts +31 -0
- package/dist/types/composables/datePickerTypes.d.ts +277 -0
- package/dist/types/composables/floatingPosition.d.ts +1 -1
- package/dist/types/composables/formLayout.d.ts +1 -2
- package/dist/types/composables/popupSurfaceStyle.d.ts +7 -0
- package/dist/types/composables/table.d.ts +10 -1
- package/dist/types/composables/toastQueue.d.ts +4 -4
- package/dist/types/composables/toastQueueModel.d.ts +2 -2
- package/dist/types/composables/useColorPicker.d.ts +2 -4
- package/dist/types/composables/useContainerWidth.d.ts +2 -0
- package/dist/types/composables/useContextMenu.d.ts +2 -4
- package/dist/types/composables/useDatePicker.d.ts +20 -11
- package/dist/types/composables/useFloating.d.ts +4 -5
- package/dist/types/composables/usePageVisibility.d.ts +1 -0
- package/dist/types/composables/usePopupSurface.d.ts +9 -3
- package/dist/types/composables/usePopupSurfaceInteractions.d.ts +4 -2
- 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 +31 -3
- 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:
|
|
7
|
+
const { disabled: M } = 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,58 +17,59 @@ 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 =
|
|
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), N = 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 = N) : 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,
|
|
35
|
-
e.autoAdjustOverflow !== !1
|
|
35
|
+
e.autoAdjustOverflow !== !1,
|
|
36
|
+
e.fallbackPlacements
|
|
36
37
|
);
|
|
37
|
-
let { x: O, y:
|
|
38
|
+
let { x: O, y: k } = z;
|
|
38
39
|
if (C.value = z.placement, (H = e.onPosition) == null || H.call(e, { anchor: t, ...z }), e.strategy === "absolute") {
|
|
39
40
|
n.value.style.position = "absolute";
|
|
40
41
|
const f = n.value.offsetParent;
|
|
41
42
|
if (f && f !== document.body && f !== document.documentElement) {
|
|
42
43
|
const j = f.getBoundingClientRect();
|
|
43
|
-
O += f.scrollLeft - j.left - f.clientLeft,
|
|
44
|
+
O += f.scrollLeft - j.left - f.clientLeft, k += f.scrollTop - j.top - f.clientTop;
|
|
44
45
|
} else
|
|
45
|
-
O += window.scrollX,
|
|
46
|
+
O += window.scrollX, k += window.scrollY;
|
|
46
47
|
}
|
|
47
48
|
L.value = {
|
|
48
|
-
...x !== void 0 ? { width: x, minWidth: "0" } : g === !0 ? { width: `${
|
|
49
|
+
...x !== void 0 ? { width: x, minWidth: "0" } : g === !0 ? { width: `${c}px`, minWidth: "0" } : g === "min" ? { width: "max-content", minWidth: `${c}px` } : {},
|
|
49
50
|
position: e.strategy ?? "fixed",
|
|
50
51
|
left: `${Math.round(O)}px`,
|
|
51
|
-
top: `${Math.round(
|
|
52
|
+
top: `${Math.round(k)}px`,
|
|
52
53
|
visibility: "visible",
|
|
53
54
|
zIndex: "1200",
|
|
54
|
-
maxWidth:
|
|
55
|
+
maxWidth: N,
|
|
55
56
|
maxHeight: `calc(100vh - ${i * 2}px)`,
|
|
56
57
|
overflowY: "auto",
|
|
57
58
|
overscrollBehavior: "contain"
|
|
58
59
|
};
|
|
59
60
|
}
|
|
60
|
-
function
|
|
61
|
+
function o() {
|
|
61
62
|
cancelAnimationFrame($), $ = requestAnimationFrame(F);
|
|
62
63
|
}
|
|
63
64
|
function I(t) {
|
|
64
65
|
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();
|
|
66
|
+
!(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
67
|
}
|
|
67
|
-
function
|
|
68
|
+
function P(t) {
|
|
68
69
|
var a, i;
|
|
69
|
-
if (!(!
|
|
70
|
+
if (!(!s.value || !(r != null && r()))) {
|
|
70
71
|
if (t.key === "Escape" && e.closeOnEscape !== !1)
|
|
71
|
-
t.preventDefault(), t.stopImmediatePropagation(), u(!0);
|
|
72
|
+
t.preventDefault(), t.stopImmediatePropagation(), u(!0, !1, "escape");
|
|
72
73
|
else if (t.key === "Tab" && e.closeOnTab !== !1) {
|
|
73
74
|
const l = document.activeElement;
|
|
74
75
|
if ((a = v.value) != null && a.contains(l)) {
|
|
@@ -76,25 +77,25 @@ function re(v, n, e = {}) {
|
|
|
76
77
|
return;
|
|
77
78
|
}
|
|
78
79
|
if ((i = n.value) != null && i.contains(l)) {
|
|
79
|
-
const
|
|
80
|
+
const d = Array.from(
|
|
80
81
|
n.value.querySelectorAll(
|
|
81
82
|
'a[href],button:not(:disabled),input:not(:disabled),textarea:not(:disabled),select:not(:disabled),[tabindex]:not([tabindex="-1"])'
|
|
82
83
|
)
|
|
83
84
|
).filter(
|
|
84
|
-
(
|
|
85
|
+
(c) => c.getClientRects().length && !c.closest("[inert]")
|
|
85
86
|
);
|
|
86
|
-
(!
|
|
87
|
+
(!d.length || l === (t.shiftKey ? d[0] : d.at(-1))) && u(!0);
|
|
87
88
|
}
|
|
88
89
|
}
|
|
89
90
|
}
|
|
90
91
|
}
|
|
91
|
-
function
|
|
92
|
+
function q() {
|
|
92
93
|
var t, a;
|
|
93
|
-
document.removeEventListener("pointerdown", I, !0), document.removeEventListener("keydown",
|
|
94
|
+
document.removeEventListener("pointerdown", I, !0), document.removeEventListener("keydown", P, !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
95
|
}
|
|
95
|
-
function u(t = !1, a = !1) {
|
|
96
|
-
var
|
|
97
|
-
if (!(!a &&
|
|
96
|
+
function u(t = !1, a = !1, i) {
|
|
97
|
+
var l, d;
|
|
98
|
+
if (!(!a && s.value && ((l = e.requestOpen) == null ? void 0 : l.call(e, !1, t, i)) === !1) && (y++, !!s.value && (s.value = !1, q(), t && ((d = v.value) != null && d.isConnected)))) {
|
|
98
99
|
p.value = !0;
|
|
99
100
|
try {
|
|
100
101
|
v.value.focus();
|
|
@@ -103,33 +104,33 @@ function re(v, n, e = {}) {
|
|
|
103
104
|
}
|
|
104
105
|
}
|
|
105
106
|
}
|
|
106
|
-
async function
|
|
107
|
-
var l,
|
|
108
|
-
if (
|
|
109
|
-
if (
|
|
110
|
-
|
|
107
|
+
async function B(t = !1) {
|
|
108
|
+
var l, d, c;
|
|
109
|
+
if (M.value || (m == null ? void 0 : m.value) === !1) return;
|
|
110
|
+
if (s.value) {
|
|
111
|
+
o();
|
|
111
112
|
return;
|
|
112
113
|
}
|
|
113
114
|
if (!t && ((l = e.requestOpen) == null ? void 0 : l.call(e, !0)) === !1) return;
|
|
114
115
|
const a = ++y;
|
|
115
|
-
if (
|
|
116
|
+
if (s.value = !0, L.value = {
|
|
116
117
|
position: "fixed",
|
|
117
118
|
top: "0px",
|
|
118
119
|
left: "0px",
|
|
119
120
|
visibility: "hidden"
|
|
120
|
-
}, await G(), a !== y || !
|
|
121
|
+
}, await G(), a !== y || !s.value) return;
|
|
121
122
|
const i = ee(
|
|
122
123
|
"floating",
|
|
123
|
-
() => u(!0),
|
|
124
|
+
() => u(!0, !1, "escape"),
|
|
124
125
|
e.zIndex
|
|
125
126
|
);
|
|
126
|
-
W.value = i, w = i.unregister, r = i.isTop, F(), document.addEventListener("pointerdown", I, !0), document.addEventListener("keydown",
|
|
127
|
+
W.value = i, w = i.unregister, r = i.isTop, F(), document.addEventListener("pointerdown", I, !0), document.addEventListener("keydown", P, !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
128
|
}
|
|
128
129
|
function K() {
|
|
129
|
-
return
|
|
130
|
+
return s.value ? u() : B();
|
|
130
131
|
}
|
|
131
132
|
return D(
|
|
132
|
-
|
|
133
|
+
M,
|
|
133
134
|
(t) => {
|
|
134
135
|
t && u(!1, !0);
|
|
135
136
|
},
|
|
@@ -141,9 +142,9 @@ function re(v, n, e = {}) {
|
|
|
141
142
|
},
|
|
142
143
|
{ flush: "sync" }
|
|
143
144
|
), V(() => {
|
|
144
|
-
y++,
|
|
145
|
+
y++, q();
|
|
145
146
|
}), {
|
|
146
|
-
open:
|
|
147
|
+
open: s,
|
|
147
148
|
style: X(() => {
|
|
148
149
|
var t;
|
|
149
150
|
return {
|
|
@@ -153,11 +154,11 @@ function re(v, n, e = {}) {
|
|
|
153
154
|
}),
|
|
154
155
|
placement: C,
|
|
155
156
|
update: F,
|
|
156
|
-
show:
|
|
157
|
+
show: B,
|
|
157
158
|
close: u,
|
|
158
159
|
toggle: K,
|
|
159
160
|
restoringFocus: p,
|
|
160
|
-
schedule:
|
|
161
|
+
schedule: o,
|
|
161
162
|
isTop: () => (r == null ? void 0 : r()) ?? !1
|
|
162
163
|
};
|
|
163
164
|
}
|
|
@@ -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
|
+
};
|
|
@@ -1,59 +1,61 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { useHysControlState as
|
|
3
|
-
import { useChoiceModel as
|
|
4
|
-
import { overlayOwnerKey as
|
|
5
|
-
import { useFloating as
|
|
6
|
-
import { popupFocusControls as
|
|
7
|
-
import { createPopupReferenceBinding as
|
|
8
|
-
|
|
9
|
-
function
|
|
10
|
-
const g =
|
|
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(
|
|
11
11
|
{
|
|
12
12
|
get modelValue() {
|
|
13
13
|
return t.open ?? t.modelValue;
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
() => t.defaultOpen ?? !1
|
|
17
|
-
),
|
|
18
|
-
() =>
|
|
19
|
-
),
|
|
17
|
+
), A = i(
|
|
18
|
+
() => c.value && !q.value && (s == null ? void 0 : s.value) !== !1
|
|
19
|
+
), m = i(
|
|
20
20
|
() => typeof t.reference == "function" ? t.reference() : t.reference
|
|
21
|
-
),
|
|
22
|
-
const e =
|
|
23
|
-
return e instanceof HTMLElement ? e : (e == null ? void 0 : e.contextElement) ??
|
|
24
|
-
}), S =
|
|
25
|
-
() => !!
|
|
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))
|
|
26
26
|
);
|
|
27
|
-
function
|
|
27
|
+
function V() {
|
|
28
28
|
var a;
|
|
29
|
-
const e =
|
|
30
|
-
(a = e != null && e.matches(
|
|
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 });
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function K() {
|
|
33
33
|
n.restoringFocus.value = !0;
|
|
34
34
|
try {
|
|
35
|
-
|
|
35
|
+
V();
|
|
36
36
|
} finally {
|
|
37
37
|
n.restoringFocus.value = !1;
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
const
|
|
41
|
-
const e =
|
|
40
|
+
const C = i(() => {
|
|
41
|
+
const e = m.value ?? b.value ?? g.value;
|
|
42
42
|
if (e)
|
|
43
43
|
return {
|
|
44
44
|
getBoundingClientRect: () => e.getBoundingClientRect(),
|
|
45
45
|
contains: (a) => {
|
|
46
|
-
var
|
|
47
|
-
return !!((
|
|
46
|
+
var o, w;
|
|
47
|
+
return !!((o = r.value) != null && o.contains(a)) || !!((w = g.value) != null && w.contains(a));
|
|
48
48
|
},
|
|
49
|
-
focus:
|
|
49
|
+
focus: V,
|
|
50
50
|
get isConnected() {
|
|
51
51
|
var a;
|
|
52
|
-
return ((a =
|
|
52
|
+
return ((a = r.value) == null ? void 0 : a.isConnected) ?? !!m.value;
|
|
53
53
|
}
|
|
54
54
|
};
|
|
55
|
-
}),
|
|
55
|
+
}), N = i(() => {
|
|
56
56
|
const e = t.appendTo;
|
|
57
|
+
if (typeof document > "u")
|
|
58
|
+
return typeof e == "string" ? e : "body";
|
|
57
59
|
if (e instanceof HTMLElement) return e;
|
|
58
60
|
if (typeof e == "string")
|
|
59
61
|
try {
|
|
@@ -62,19 +64,19 @@ function Se(t, i, y) {
|
|
|
62
64
|
return document.body;
|
|
63
65
|
}
|
|
64
66
|
return document.body;
|
|
65
|
-
}),
|
|
66
|
-
function
|
|
67
|
-
const a = e.placement.startsWith("left") || e.placement.startsWith("right"),
|
|
68
|
-
|
|
69
|
-
[a ? "top" : "left"]: Math.max(Math.min(
|
|
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"
|
|
70
72
|
};
|
|
71
73
|
}
|
|
72
|
-
const n =
|
|
74
|
+
const n = xe(C, x, {
|
|
73
75
|
get placement() {
|
|
74
76
|
return t.placement;
|
|
75
77
|
},
|
|
76
78
|
get gap() {
|
|
77
|
-
return t.offset ?? (
|
|
79
|
+
return t.offset ?? (v === "tooltip" ? 7 : 8);
|
|
78
80
|
},
|
|
79
81
|
get autoAdjustOverflow() {
|
|
80
82
|
return t.autoAdjustOverflow;
|
|
@@ -85,101 +87,103 @@ function Se(t, i, y) {
|
|
|
85
87
|
get closeOnOutside() {
|
|
86
88
|
return t.closeOnOutside;
|
|
87
89
|
},
|
|
88
|
-
closeOnTab:
|
|
90
|
+
closeOnTab: v === "tooltip",
|
|
89
91
|
get strategy() {
|
|
90
|
-
return t.appendTo === !1 ||
|
|
92
|
+
return t.appendTo === !1 || N.value !== document.body ? "absolute" : "fixed";
|
|
91
93
|
},
|
|
92
94
|
width: () => t.width,
|
|
93
|
-
maxWidth: () =>
|
|
95
|
+
maxWidth: () => Re(t, v),
|
|
94
96
|
zIndex: () => t.zIndex,
|
|
95
|
-
onPosition:
|
|
96
|
-
requestOpen(e, a) {
|
|
97
|
-
return
|
|
97
|
+
onPosition: te,
|
|
98
|
+
requestOpen(e, a, o) {
|
|
99
|
+
return f(e, a, o), !1;
|
|
98
100
|
}
|
|
99
|
-
}),
|
|
100
|
-
available:
|
|
101
|
-
anchor:
|
|
102
|
-
actualReference:
|
|
103
|
-
panel:
|
|
101
|
+
}), l = Oe(t, v, {
|
|
102
|
+
available: A,
|
|
103
|
+
anchor: C,
|
|
104
|
+
actualReference: r,
|
|
105
|
+
panel: x,
|
|
104
106
|
floating: n,
|
|
105
|
-
restoreReferenceFocus:
|
|
106
|
-
request:
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
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
|
|
115
118
|
});
|
|
116
|
-
function
|
|
119
|
+
function F() {
|
|
117
120
|
var a;
|
|
118
|
-
const e =
|
|
119
|
-
|
|
121
|
+
const e = c.value && m.value ? r.value : void 0;
|
|
122
|
+
W.attach(
|
|
120
123
|
e && !((a = g.value) != null && a.contains(e)) ? e : void 0,
|
|
121
124
|
n.open.value
|
|
122
125
|
);
|
|
123
126
|
}
|
|
124
|
-
let
|
|
125
|
-
function
|
|
127
|
+
let h, T = 0, G = -1, J = -1;
|
|
128
|
+
function L() {
|
|
126
129
|
var e;
|
|
127
|
-
|
|
130
|
+
A.value && !O.value && M.current.value && ((e = C.value) != null && e.isConnected) ? (B.value = !0, n.show(!0)) : n.close(!1, !0);
|
|
128
131
|
}
|
|
129
|
-
async function
|
|
130
|
-
var
|
|
131
|
-
|
|
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))))
|
|
132
136
|
return !1;
|
|
133
|
-
e ||
|
|
134
|
-
let
|
|
135
|
-
return
|
|
137
|
+
e || l.resetReasons(), O.value = !1;
|
|
138
|
+
let I = Object.is(M.current.value, e);
|
|
139
|
+
return I || (I = await M.commit(
|
|
136
140
|
e,
|
|
137
|
-
(
|
|
138
|
-
y("update:open",
|
|
141
|
+
($) => {
|
|
142
|
+
y("update:open", $), y("update:modelValue", $);
|
|
139
143
|
},
|
|
140
144
|
() => {
|
|
141
145
|
}
|
|
142
|
-
)),
|
|
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;
|
|
143
147
|
}
|
|
144
|
-
function
|
|
145
|
-
|
|
148
|
+
function D() {
|
|
149
|
+
h == null || h.disconnect(), h = void 0;
|
|
146
150
|
}
|
|
147
|
-
function
|
|
148
|
-
|
|
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));
|
|
149
153
|
}
|
|
150
|
-
function
|
|
151
|
-
|
|
154
|
+
function P() {
|
|
155
|
+
l.reset(), l.clearAuto(), W.detach(), D(), document.removeEventListener("keydown", H, !0), n.close(!1, !0);
|
|
152
156
|
}
|
|
153
|
-
|
|
157
|
+
d(
|
|
154
158
|
M.current,
|
|
155
159
|
() => {
|
|
156
|
-
|
|
160
|
+
O.value = !1, L();
|
|
157
161
|
},
|
|
158
162
|
{ flush: "post" }
|
|
159
|
-
),
|
|
160
|
-
[
|
|
163
|
+
), d(
|
|
164
|
+
[A, g, m],
|
|
161
165
|
() => {
|
|
162
|
-
|
|
166
|
+
A.value || (l.reset(), l.clearAuto()), L(), F();
|
|
163
167
|
},
|
|
164
168
|
{ flush: "post", immediate: !0 }
|
|
165
|
-
),
|
|
169
|
+
), d(
|
|
166
170
|
() => s == null ? void 0 : s.value,
|
|
167
171
|
(e) => {
|
|
168
|
-
e === !1 && (
|
|
172
|
+
e === !1 && (O.value = !0, P());
|
|
169
173
|
},
|
|
170
174
|
{ flush: "sync" }
|
|
171
|
-
),
|
|
172
|
-
[
|
|
175
|
+
), d(() => t.autoClose, l.startAuto), d(
|
|
176
|
+
[r, m],
|
|
173
177
|
() => {
|
|
174
|
-
|
|
178
|
+
l.reset(), n.schedule(), F();
|
|
175
179
|
},
|
|
176
180
|
{ flush: "post" }
|
|
177
|
-
),
|
|
181
|
+
), d(
|
|
178
182
|
() => t.trigger,
|
|
179
183
|
() => {
|
|
180
|
-
|
|
184
|
+
l.reset();
|
|
181
185
|
}
|
|
182
|
-
),
|
|
186
|
+
), d(
|
|
183
187
|
() => [
|
|
184
188
|
t.placement,
|
|
185
189
|
t.offset,
|
|
@@ -192,101 +196,88 @@ function Se(t, i, y) {
|
|
|
192
196
|
],
|
|
193
197
|
n.schedule,
|
|
194
198
|
{ flush: "post" }
|
|
195
|
-
),
|
|
199
|
+
), d([n.open, x, r], ne, { flush: "post" }), d(
|
|
196
200
|
n.open,
|
|
197
201
|
(e) => {
|
|
198
|
-
|
|
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());
|
|
199
203
|
},
|
|
200
204
|
{ flush: "sync" }
|
|
201
205
|
);
|
|
202
|
-
async function
|
|
203
|
-
const e =
|
|
204
|
-
await
|
|
206
|
+
async function ae() {
|
|
207
|
+
const e = T;
|
|
208
|
+
await k(), c.value && n.open.value && e === T && G !== e && (G = e, y("opened"));
|
|
205
209
|
}
|
|
206
|
-
async function
|
|
207
|
-
const e =
|
|
208
|
-
await
|
|
210
|
+
async function ue() {
|
|
211
|
+
const e = T;
|
|
212
|
+
await k(), c.value && !n.open.value && e === T && J !== e && (J = e, y("closed"));
|
|
209
213
|
}
|
|
210
|
-
function
|
|
211
|
-
|
|
214
|
+
function le() {
|
|
215
|
+
O.value = !0, P();
|
|
212
216
|
}
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
}),
|
|
216
|
-
|
|
217
|
-
}),
|
|
218
|
-
|
|
219
|
-
}),
|
|
220
|
-
|
|
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();
|
|
221
225
|
});
|
|
222
|
-
const
|
|
223
|
-
() => n.open.value || t.forceRender || t.destroyOnHide === !1 &&
|
|
224
|
-
),
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
"--hys-ui-popup-border": t.color || (e ? "#172744" : "var(--hys-ui-border,var(--hys-ui-theme-border))")
|
|
230
|
-
};
|
|
231
|
-
}), ne = u(() => ({
|
|
232
|
-
...t.overlayStyle,
|
|
233
|
-
...n.style.value,
|
|
234
|
-
...te.value,
|
|
235
|
-
overflow: "visible",
|
|
236
|
-
maxWidth: `min(${q(t.maxWidth) ?? (i === "tooltip" ? "320px" : "360px")},calc(100vw - 20px))`,
|
|
237
|
-
minWidth: t.width !== void 0 ? "0" : void 0
|
|
238
|
-
})), ae = u(() => ({
|
|
239
|
-
...t.contentStyle,
|
|
240
|
-
maxHeight: t.maxHeight !== void 0 ? `min(${q(t.maxHeight)},calc(100vh - 20px))` : "calc(100vh - 20px)"
|
|
241
|
-
})), oe = u(() => ({
|
|
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(() => ({
|
|
242
233
|
open: n.open.value,
|
|
243
|
-
show: () =>
|
|
244
|
-
close: () =>
|
|
245
|
-
toggle: () =>
|
|
234
|
+
show: () => f(!0),
|
|
235
|
+
close: () => f(!1),
|
|
236
|
+
toggle: () => f(!n.open.value),
|
|
246
237
|
updatePosition: n.schedule
|
|
247
|
-
})),
|
|
248
|
-
tabindex:
|
|
249
|
-
role:
|
|
250
|
-
"aria-disabled": !S.value &&
|
|
251
|
-
...S.value ? {} :
|
|
252
|
-
"aria-controls": n.open.value ?
|
|
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 } : {
|
|
243
|
+
"aria-controls": n.open.value ? R : void 0,
|
|
253
244
|
"aria-expanded": n.open.value,
|
|
254
245
|
"aria-haspopup": "dialog"
|
|
255
246
|
}
|
|
256
247
|
}));
|
|
257
248
|
return {
|
|
258
249
|
wrapper: g,
|
|
259
|
-
referenceElement:
|
|
260
|
-
panel:
|
|
261
|
-
actualReference:
|
|
250
|
+
referenceElement: b,
|
|
251
|
+
panel: x,
|
|
252
|
+
actualReference: r,
|
|
262
253
|
nativeReference: S,
|
|
263
|
-
id:
|
|
264
|
-
titleId:
|
|
254
|
+
id: R,
|
|
255
|
+
titleId: ee,
|
|
265
256
|
open: n.open,
|
|
266
257
|
placement: n.placement,
|
|
267
|
-
active:
|
|
268
|
-
mounted:
|
|
269
|
-
teleportTo:
|
|
270
|
-
arrowStyle:
|
|
271
|
-
style:
|
|
272
|
-
contentStyle:
|
|
273
|
-
scope:
|
|
274
|
-
wrapperAttrs:
|
|
275
|
-
...
|
|
276
|
-
afterEnter:
|
|
277
|
-
afterLeave:
|
|
278
|
-
inactive:
|
|
279
|
-
request:
|
|
280
|
-
show: () =>
|
|
281
|
-
hide: () =>
|
|
282
|
-
toggle: () =>
|
|
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),
|
|
283
274
|
updatePosition: n.schedule,
|
|
284
275
|
focus: () => {
|
|
285
276
|
var e;
|
|
286
|
-
return (e =
|
|
277
|
+
return (e = C.value) == null ? void 0 : e.focus();
|
|
287
278
|
}
|
|
288
279
|
};
|
|
289
280
|
}
|
|
290
281
|
export {
|
|
291
|
-
|
|
282
|
+
Ie as usePopupSurface
|
|
292
283
|
};
|