@gradient-ui/core 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +272 -0
- package/dist/GLoading.vue_vue_type_style_index_0_lang-CqbeZChH.cjs +1 -0
- package/dist/GLoading.vue_vue_type_style_index_0_lang-DDqJEYGf.js +691 -0
- package/dist/GSwitch.vue_vue_type_script_setup_true_lang-Bufs8uqY.js +5633 -0
- package/dist/GSwitch.vue_vue_type_script_setup_true_lang-CH9jX5W1.cjs +4 -0
- package/dist/camelToKebabCase-BAESShJ1.cjs +1 -0
- package/dist/camelToKebabCase-KgkZ7-1F.js +28 -0
- package/dist/components.cjs +1 -0
- package/dist/components.mjs +68 -0
- package/dist/default-585QCoXx.js +3990 -0
- package/dist/default-BcPApP1Q.cjs +318 -0
- package/dist/defaults-BlTdRhHs.cjs +1 -0
- package/dist/defaults-DMi34V8q.js +51 -0
- package/dist/directives.cjs +1 -0
- package/dist/directives.mjs +9 -0
- package/dist/icon-0-mbYGMr.cjs +1 -0
- package/dist/icon-BrFRYYf3.js +66 -0
- package/dist/index-B3_n44N_.cjs +1 -0
- package/dist/index-BtCLucTD.js +66 -0
- package/dist/index-Cs3XQ3JB.js +97 -0
- package/dist/index-DN5ngVtp.cjs +1 -0
- package/dist/index.cjs +1 -0
- package/dist/index.mjs +134 -0
- package/dist/mask-BgaDaVWU.js +816 -0
- package/dist/mask-pzGv8apS.cjs +1 -0
- package/dist/services.cjs +1 -0
- package/dist/services.mjs +5 -0
- package/dist/style.css +1 -0
- package/dist/theme.cjs +1 -0
- package/dist/theme.mjs +11 -0
- package/dist/types/components/GGroup/GGroup.vue.d.ts +22 -0
- package/dist/types/components/GGroup/index.d.ts +1 -0
- package/dist/types/components/GGroup/types.d.ts +0 -0
- package/dist/types/components/index.d.ts +39 -0
- package/dist/types/components/transitions/GExpandTransition.vue.d.ts +240 -0
- package/dist/types/components/transitions/GTransition.vue.d.ts +240 -0
- package/dist/types/components/transitions/GTransitionGroup.vue.d.ts +224 -0
- package/dist/types/components/transitions/TransitionExpansion.vue.d.ts +24 -0
- package/dist/types/components/transitions/TransitionOverlay.vue.d.ts +21 -0
- package/dist/types/components/transitions/TransitionRotate.vue.d.ts +17 -0
- package/dist/types/components/transitions/TransitionScale.vue.d.ts +21 -0
- package/dist/types/components/transitions/TransitionStaggerTranslate.vue.d.ts +17 -0
- package/dist/types/components/transitions/index.d.ts +3 -0
- package/dist/types/components/ui/BaseFloating/BaseFloating.vue.d.ts +245 -0
- package/dist/types/components/ui/BaseFloating/index.d.ts +1 -0
- package/dist/types/components/ui/BaseFloating/types.d.ts +0 -0
- package/dist/types/components/ui/BaseOverlay/BaseOverlay.vue.d.ts +237 -0
- package/dist/types/components/ui/BaseOverlay/index.d.ts +1 -0
- package/dist/types/components/ui/BaseOverlay/types.d.ts +108 -0
- package/dist/types/components/ui/GAction/GAction.vue.d.ts +2 -0
- package/dist/types/components/ui/GAction/index.d.ts +1 -0
- package/dist/types/components/ui/GAction/types.d.ts +33 -0
- package/dist/types/components/ui/GAlert/GAlert.vue.d.ts +96 -0
- package/dist/types/components/ui/GAlert/index.d.ts +1 -0
- package/dist/types/components/ui/GAlert/types.d.ts +52 -0
- package/dist/types/components/ui/GAside/GAside.vue.d.ts +46 -0
- package/dist/types/components/ui/GAside/GAsideGroup.vue.d.ts +28 -0
- package/dist/types/components/ui/GAside/GAsideItem.vue.d.ts +35 -0
- package/dist/types/components/ui/GAside/context.d.ts +15 -0
- package/dist/types/components/ui/GAside/groupContext.d.ts +7 -0
- package/dist/types/components/ui/GAside/index.d.ts +4 -0
- package/dist/types/components/ui/GAside/types.d.ts +262 -0
- package/dist/types/components/ui/GBadge/GBadge.vue.d.ts +126 -0
- package/dist/types/components/ui/GBadge/index.d.ts +2 -0
- package/dist/types/components/ui/GBadge/types.d.ts +75 -0
- package/dist/types/components/ui/GButton/GButton.vue.d.ts +496 -0
- package/dist/types/components/ui/GButton/index.d.ts +2 -0
- package/dist/types/components/ui/GButton/types.d.ts +276 -0
- package/dist/types/components/ui/GCheckControl/GCheckControl.vue.d.ts +248 -0
- package/dist/types/components/ui/GCheckControl/GCheckGroup.vue.d.ts +190 -0
- package/dist/types/components/ui/GCheckControl/GCheckIndicator.vue.d.ts +21 -0
- package/dist/types/components/ui/GCheckControl/index.d.ts +3 -0
- package/dist/types/components/ui/GCheckbox/GCheckbox.vue.d.ts +228 -0
- package/dist/types/components/ui/GCheckbox/index.d.ts +2 -0
- package/dist/types/components/ui/GCheckbox/types.d.ts +1 -0
- package/dist/types/components/ui/GCheckboxGroup/GCheckboxGroup.vue.d.ts +24 -0
- package/dist/types/components/ui/GCheckboxGroup/index.d.ts +2 -0
- package/dist/types/components/ui/GCheckboxGroup/types.d.ts +12 -0
- package/dist/types/components/ui/GChip/GChip.vue.d.ts +463 -0
- package/dist/types/components/ui/GChip/index.d.ts +2 -0
- package/dist/types/components/ui/GChip/types.d.ts +257 -0
- package/dist/types/components/ui/GDrawer/GDrawer.vue.d.ts +435 -0
- package/dist/types/components/ui/GDrawer/index.d.ts +2 -0
- package/dist/types/components/ui/GDrawer/types.d.ts +205 -0
- package/dist/types/components/ui/GDropdown/GDropdown.vue.d.ts +426 -0
- package/dist/types/components/ui/GDropdown/index.d.ts +1 -0
- package/dist/types/components/ui/GDropdown/types.d.ts +208 -0
- package/dist/types/components/ui/GDropdownGroup/GDropdownGroup.vue.d.ts +29 -0
- package/dist/types/components/ui/GDropdownGroup/index.d.ts +2 -0
- package/dist/types/components/ui/GDropdownGroup/types.d.ts +10 -0
- package/dist/types/components/ui/GDropdownSelect/GDropdownSelect.vue.d.ts +17 -0
- package/dist/types/components/ui/GDropdownSelect/index.d.ts +0 -0
- package/dist/types/components/ui/GDropdownSelect/types.d.ts +14 -0
- package/dist/types/components/ui/GExpansion/GExpansion.vue.d.ts +74 -0
- package/dist/types/components/ui/GExpansion/index.d.ts +1 -0
- package/dist/types/components/ui/GExpansion/types.d.ts +217 -0
- package/dist/types/components/ui/GExpansionGroup/GExpansionGroup.vue.d.ts +32 -0
- package/dist/types/components/ui/GExpansionGroup/index.d.ts +1 -0
- package/dist/types/components/ui/GExpansionGroup/types.d.ts +58 -0
- package/dist/types/components/ui/GFAB/GFAB.vue.d.ts +208 -0
- package/dist/types/components/ui/GFAB/index.d.ts +1 -0
- package/dist/types/components/ui/GFAB/types.d.ts +128 -0
- package/dist/types/components/ui/GFieldBase/GFieldBase.vue.d.ts +243 -0
- package/dist/types/components/ui/GFieldBase/props.d.ts +187 -0
- package/dist/types/components/ui/GGradient/GGradient.vue.d.ts +269 -0
- package/dist/types/components/ui/GGradient/index.d.ts +1 -0
- package/dist/types/components/ui/GGradient/types.d.ts +14 -0
- package/dist/types/components/ui/GIcon/GIcon.vue.d.ts +31 -0
- package/dist/types/components/ui/GIcon/index.d.ts +2 -0
- package/dist/types/components/ui/GIcon/sets/MdiIconSet.vue.d.ts +3 -0
- package/dist/types/components/ui/GIcon/types.d.ts +24 -0
- package/dist/types/components/ui/GIcon.vue.d.ts +6 -0
- package/dist/types/components/ui/GInput/GInput.vue.d.ts +267 -0
- package/dist/types/components/ui/GInput/SwitchPassword.vue.d.ts +9 -0
- package/dist/types/components/ui/GInput/index.d.ts +2 -0
- package/dist/types/components/ui/GInput/types.d.ts +8 -0
- package/dist/types/components/ui/GLoading/GLoading.vue.d.ts +134 -0
- package/dist/types/components/ui/GLoading/types.d.ts +62 -0
- package/dist/types/components/ui/GMenu/GMenu.vue.d.ts +93 -0
- package/dist/types/components/ui/GMenu/GSubmenu.vue.d.ts +269 -0
- package/dist/types/components/ui/GMenu/index.d.ts +1 -0
- package/dist/types/components/ui/GMenu/types.d.ts +0 -0
- package/dist/types/components/ui/GMenuItem/GMenuItem.vue.d.ts +181 -0
- package/dist/types/components/ui/GMenuItem/index.d.ts +0 -0
- package/dist/types/components/ui/GMenuItem/types.d.ts +93 -0
- package/dist/types/components/ui/GModal/GModal.vue.d.ts +426 -0
- package/dist/types/components/ui/GModal/index.d.ts +2 -0
- package/dist/types/components/ui/GModal/types.d.ts +198 -0
- package/dist/types/components/ui/GNavList/GNavGroup.vue.d.ts +28 -0
- package/dist/types/components/ui/GNavList/GNavItem.vue.d.ts +35 -0
- package/dist/types/components/ui/GNavList/GNavList.vue.d.ts +38 -0
- package/dist/types/components/ui/GNavList/context.d.ts +15 -0
- package/dist/types/components/ui/GNavList/groupContext.d.ts +7 -0
- package/dist/types/components/ui/GNavList/index.d.ts +4 -0
- package/dist/types/components/ui/GNavList/types.d.ts +238 -0
- package/dist/types/components/ui/GNavbar/GNavbar.vue.d.ts +34 -0
- package/dist/types/components/ui/GNavbar/GNavbarItem.vue.d.ts +39 -0
- package/dist/types/components/ui/GNavbar/GNavbarMenu.vue.d.ts +41 -0
- package/dist/types/components/ui/GNavbar/GNavbarSubItem.vue.d.ts +40 -0
- package/dist/types/components/ui/GNavbar/context.d.ts +17 -0
- package/dist/types/components/ui/GNavbar/index.d.ts +5 -0
- package/dist/types/components/ui/GNavbar/menuContext.d.ts +9 -0
- package/dist/types/components/ui/GNavbar/types.d.ts +330 -0
- package/dist/types/components/ui/GProgress/GProgress.vue.d.ts +181 -0
- package/dist/types/components/ui/GProgress/index.d.ts +1 -0
- package/dist/types/components/ui/GProgress/types.d.ts +108 -0
- package/dist/types/components/ui/GQuickActions/GQuickActions.vue.d.ts +46 -0
- package/dist/types/components/ui/GQuickActions/index.d.ts +2 -0
- package/dist/types/components/ui/GQuickActions/types.d.ts +19 -0
- package/dist/types/components/ui/GRadio/GRadio.vue.d.ts +24 -0
- package/dist/types/components/ui/GRadio/GRadioItem.vue.d.ts +32 -0
- package/dist/types/components/ui/GRadio/index.d.ts +3 -0
- package/dist/types/components/ui/GRadio/types.d.ts +12 -0
- package/dist/types/components/ui/GSelect/GSelect.vue.d.ts +29 -0
- package/dist/types/components/ui/GSelect/index.d.ts +2 -0
- package/dist/types/components/ui/GSelect/types.d.ts +32 -0
- package/dist/types/components/ui/GSelectItem.vue.d.ts +47 -0
- package/dist/types/components/ui/GSnackbar/GSnackbar.vue.d.ts +326 -0
- package/dist/types/components/ui/GSnackbar/index.d.ts +2 -0
- package/dist/types/components/ui/GSnackbar/types.d.ts +168 -0
- package/dist/types/components/ui/GSquircle/GSquircle.vue.d.ts +25 -0
- package/dist/types/components/ui/GSquircle/index.d.ts +1 -0
- package/dist/types/components/ui/GSquircle/types.d.ts +14 -0
- package/dist/types/components/ui/GSwitch/GSwitch.vue.d.ts +228 -0
- package/dist/types/components/ui/GSwitch/index.d.ts +2 -0
- package/dist/types/components/ui/GSwitch/types.d.ts +1 -0
- package/dist/types/components/ui/GTabs/GTab.vue.d.ts +27 -0
- package/dist/types/components/ui/GTabs/GTabList.vue.d.ts +38 -0
- package/dist/types/components/ui/GTabs/GTabPanel.vue.d.ts +20 -0
- package/dist/types/components/ui/GTabs/GTabPanels.vue.d.ts +36 -0
- package/dist/types/components/ui/GTabs/GTabs.vue.d.ts +40 -0
- package/dist/types/components/ui/GTabs/context.d.ts +28 -0
- package/dist/types/components/ui/GTabs/index.d.ts +6 -0
- package/dist/types/components/ui/GTabs/types.d.ts +214 -0
- package/dist/types/components/ui/GText/GText.vue.d.ts +17 -0
- package/dist/types/components/ui/GText/index.d.ts +1 -0
- package/dist/types/components/ui/GText/types.d.ts +8 -0
- package/dist/types/components/ui/GTextarea/GTextarea.vue.d.ts +234 -0
- package/dist/types/components/ui/GTextarea/index.d.ts +2 -0
- package/dist/types/components/ui/GTextarea/types.d.ts +6 -0
- package/dist/types/components/ui/GToggleButton/GToggleButton.vue.d.ts +303 -0
- package/dist/types/components/ui/GToggleButton/index.d.ts +2 -0
- package/dist/types/components/ui/GToggleButton/types.d.ts +173 -0
- package/dist/types/components/ui/GTooltip/GTooltip.vue.d.ts +359 -0
- package/dist/types/components/ui/GTooltip/index.d.ts +1 -0
- package/dist/types/components/ui/GTooltip/types.d.ts +179 -0
- package/dist/types/directives/gradientIcon.d.ts +4 -0
- package/dist/types/directives/gradientText.d.ts +17 -0
- package/dist/types/directives/index.d.ts +11 -0
- package/dist/types/directives/loading.d.ts +19 -0
- package/dist/types/directives/mask.d.ts +13 -0
- package/dist/types/directives/ripple.d.ts +30 -0
- package/dist/types/directives/tooltip.d.ts +10 -0
- package/dist/types/index.d.ts +21 -0
- package/dist/types/services/index.d.ts +2 -0
- package/dist/types/services/useLoading.d.ts +8 -0
- package/dist/types/services/useSnackbar.d.ts +22 -0
- package/dist/types/theme/changeTone.d.ts +1 -0
- package/dist/types/theme/colorPallete.d.ts +2 -0
- package/dist/types/theme/colorSeeds.d.ts +21 -0
- package/dist/types/theme/default.d.ts +97 -0
- package/dist/types/theme/generateColors.d.ts +1 -0
- package/dist/types/theme/generateGradient.d.ts +9 -0
- package/dist/types/theme/getComplementaryColor.d.ts +1 -0
- package/dist/types/theme/index.d.ts +1 -0
- package/dist/types/types/Colors.d.ts +2 -0
- package/dist/types/types/CommonTypes.d.ts +26 -0
- package/dist/types/types/UtilityTypes.d.ts +2 -0
- package/dist/types/use/PLA.d.ts +101 -0
- package/dist/types/use/actionProps.d.ts +38 -0
- package/dist/types/use/actionSurface.d.ts +123 -0
- package/dist/types/use/appendTarget.d.ts +4 -0
- package/dist/types/use/bodyScrollLock.d.ts +2 -0
- package/dist/types/use/booleanProp.d.ts +2 -0
- package/dist/types/use/breakpoints/index.d.ts +27 -0
- package/dist/types/use/check/booleanControl.d.ts +61 -0
- package/dist/types/use/check/groupFocus.d.ts +17 -0
- package/dist/types/use/check/index.d.ts +6 -0
- package/dist/types/use/check/optionGroup.d.ts +34 -0
- package/dist/types/use/check/selection.d.ts +2 -0
- package/dist/types/use/check/types.d.ts +496 -0
- package/dist/types/use/color.d.ts +20 -0
- package/dist/types/use/colorResolver.d.ts +6 -0
- package/dist/types/use/controllableOpen.d.ts +10 -0
- package/dist/types/use/defaults.d.ts +12 -0
- package/dist/types/use/disabled.d.ts +12 -0
- package/dist/types/use/dropdownContext.d.ts +9 -0
- package/dist/types/use/expansion/controller.d.ts +12 -0
- package/dist/types/use/expansion/di.d.ts +5 -0
- package/dist/types/use/expansion/index.d.ts +3 -0
- package/dist/types/use/expansion/types.d.ts +11 -0
- package/dist/types/use/floating.d.ts +120 -0
- package/dist/types/use/floatingDismiss.d.ts +10 -0
- package/dist/types/use/floatingLayer.d.ts +12 -0
- package/dist/types/use/floatingTrigger.d.ts +27 -0
- package/dist/types/use/focused.d.ts +12 -0
- package/dist/types/use/form/control.d.ts +17 -0
- package/dist/types/use/form/props.d.ts +69 -0
- package/dist/types/use/form/textFieldComponent.d.ts +14 -0
- package/dist/types/use/form/textFieldControl.d.ts +63 -0
- package/dist/types/use/gradient.d.ts +224 -0
- package/dist/types/use/gradientGlow.d.ts +48 -0
- package/dist/types/use/gradientSurface.d.ts +23 -0
- package/dist/types/use/group/di.d.ts +5 -0
- package/dist/types/use/group/groupController.d.ts +10 -0
- package/dist/types/use/group/types.d.ts +9 -0
- package/dist/types/use/highlighted.d.ts +12 -0
- package/dist/types/use/icon.d.ts +22 -0
- package/dist/types/use/index.d.ts +4 -0
- package/dist/types/use/input/control.d.ts +10 -0
- package/dist/types/use/input/emits.d.ts +8 -0
- package/dist/types/use/input/index.d.ts +4 -0
- package/dist/types/use/input/props.d.ts +124 -0
- package/dist/types/use/items.d.ts +20 -0
- package/dist/types/use/layerStack.d.ts +15 -0
- package/dist/types/use/mask/index.d.ts +24 -0
- package/dist/types/use/menu.d.ts +49 -0
- package/dist/types/use/menuContext.d.ts +6 -0
- package/dist/types/use/open.d.ts +2 -0
- package/dist/types/use/overlay.d.ts +111 -0
- package/dist/types/use/placement.d.ts +16 -0
- package/dist/types/use/px.d.ts +4 -0
- package/dist/types/use/rounded.d.ts +12 -0
- package/dist/types/use/routerLink.d.ts +10 -0
- package/dist/types/use/select/controller.d.ts +18 -0
- package/dist/types/use/select/items.d.ts +14 -0
- package/dist/types/use/select/menuItems.d.ts +11 -0
- package/dist/types/use/select/menuSlot.d.ts +5 -0
- package/dist/types/use/select/selection.d.ts +12 -0
- package/dist/types/use/select/selectionController.d.ts +19 -0
- package/dist/types/use/select/selectionSummary.d.ts +7 -0
- package/dist/types/use/select/types.d.ts +24 -0
- package/dist/types/use/selected.d.ts +17 -0
- package/dist/types/use/selectionModel.d.ts +19 -0
- package/dist/types/use/size.d.ts +16 -0
- package/dist/types/use/slots.d.ts +15 -0
- package/dist/types/use/state.d.ts +13 -0
- package/dist/types/use/surface.d.ts +80 -0
- package/dist/types/use/surfaceColor.d.ts +18 -0
- package/dist/types/use/textarea/index.d.ts +2 -0
- package/dist/types/use/textarea/props.d.ts +105 -0
- package/dist/types/use/transition.d.ts +156 -0
- package/dist/types/use/variant.d.ts +16 -0
- package/dist/types/use/visibleProps.d.ts +1 -0
- package/dist/types/use/zIndex.d.ts +10 -0
- package/dist/types/utils/camelToKebabCase.d.ts +1 -0
- package/dist/types/utils/color.d.ts +3 -0
- package/dist/types/utils/colors/normaliseColor.d.ts +5 -0
- package/dist/types/utils/createComponentId.d.ts +1 -0
- package/dist/types/utils/createId.d.ts +1 -0
- package/dist/types/utils/propsFactory.d.ts +29 -0
- package/dist/use.cjs +1 -0
- package/dist/use.mjs +22 -0
- package/dist/useSnackbar-CFrWSpt4.cjs +1 -0
- package/dist/useSnackbar-lGrTDbl-.js +763 -0
- package/package.json +170 -0
|
@@ -0,0 +1,816 @@
|
|
|
1
|
+
import { r as z, b as $, _ as fe, p as Q, m as pe, a as G, c as ee } from "./GLoading.vue_vue_type_style_index_0_lang-DDqJEYGf.js";
|
|
2
|
+
import { createApp as te, ref as v, computed as p, onMounted as me, onBeforeUnmount as S, watch as ne, defineComponent as oe, toRef as ge, openBlock as L, createElementBlock as ye, Fragment as ve, createElementVNode as _, normalizeClass as _e, renderSlot as C, unref as y, createBlock as A, Teleport as be, createVNode as ke, withCtx as D, withDirectives as K, normalizeStyle as W, vShow as j, mergeProps as P, createSlots as he, toDisplayString as xe, h as we } from "vue";
|
|
3
|
+
import { offset as Te, flip as Ee, shift as Le, size as Ce, useFloating as De, autoUpdate as Be } from "@floating-ui/vue";
|
|
4
|
+
import { d as Me, a as Fe } from "./index-Cs3XQ3JB.js";
|
|
5
|
+
const U = "var(--g-gradient-current, var(--g-gradient-main))", Ie = "135deg";
|
|
6
|
+
function Ve() {
|
|
7
|
+
return /* @__PURE__ */ new WeakMap();
|
|
8
|
+
}
|
|
9
|
+
function re(e) {
|
|
10
|
+
const t = Ve();
|
|
11
|
+
function n(r) {
|
|
12
|
+
const i = t.get(r);
|
|
13
|
+
if (i) {
|
|
14
|
+
for (const [l, s] of i.targets)
|
|
15
|
+
Se(l, s);
|
|
16
|
+
t.delete(r);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
function o(r, i) {
|
|
20
|
+
const l = Pe(i, e);
|
|
21
|
+
if (n(r), l.disabled) return;
|
|
22
|
+
const s = Ne(r, l.selector), a = {
|
|
23
|
+
targets: /* @__PURE__ */ new Map()
|
|
24
|
+
};
|
|
25
|
+
for (const u of s)
|
|
26
|
+
a.targets.set(u, Oe(u)), Re(u, l.gradient);
|
|
27
|
+
t.set(r, a);
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
mounted(r, i) {
|
|
31
|
+
o(r, i.value);
|
|
32
|
+
},
|
|
33
|
+
updated(r, i) {
|
|
34
|
+
o(r, i.value);
|
|
35
|
+
},
|
|
36
|
+
unmounted(r) {
|
|
37
|
+
n(r);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function Pe(e, t) {
|
|
42
|
+
if (typeof e == "string")
|
|
43
|
+
return {
|
|
44
|
+
gradient: z(e),
|
|
45
|
+
disabled: !1,
|
|
46
|
+
selector: t
|
|
47
|
+
};
|
|
48
|
+
if (!e)
|
|
49
|
+
return {
|
|
50
|
+
gradient: U,
|
|
51
|
+
disabled: !1,
|
|
52
|
+
selector: t
|
|
53
|
+
};
|
|
54
|
+
const n = $e(e);
|
|
55
|
+
return {
|
|
56
|
+
gradient: e.gradient ?? (n.length ? Ae(n, e.direction) : void 0) ?? z(e.state ?? e.color) ?? U,
|
|
57
|
+
disabled: e.disabled ?? !1,
|
|
58
|
+
selector: e.selector ?? t
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
function $e(e) {
|
|
62
|
+
var t;
|
|
63
|
+
return (t = e.colors) != null && t.length ? e.colors : [e.from, e.to].filter(
|
|
64
|
+
(n) => !!n
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
function Ae(e, t = Ie) {
|
|
68
|
+
const n = e.length === 1 ? [e[0], e[0]] : e;
|
|
69
|
+
return `linear-gradient(${t}, ${n.map((o) => $(o)).join(", ")})`;
|
|
70
|
+
}
|
|
71
|
+
function Ne(e, t) {
|
|
72
|
+
if (!t)
|
|
73
|
+
return [e];
|
|
74
|
+
const n = [];
|
|
75
|
+
return e.matches(t) && n.push(e), n.push(...Array.from(e.querySelectorAll(t))), n;
|
|
76
|
+
}
|
|
77
|
+
function Oe(e) {
|
|
78
|
+
return {
|
|
79
|
+
backgroundClip: e.style.backgroundClip,
|
|
80
|
+
backgroundImage: e.style.backgroundImage,
|
|
81
|
+
color: e.style.color,
|
|
82
|
+
webkitBackgroundClip: e.style.getPropertyValue(
|
|
83
|
+
"-webkit-background-clip"
|
|
84
|
+
),
|
|
85
|
+
webkitTextFillColor: e.style.getPropertyValue(
|
|
86
|
+
"-webkit-text-fill-color"
|
|
87
|
+
)
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
function Se(e, t) {
|
|
91
|
+
e.style.backgroundClip = t.backgroundClip, e.style.backgroundImage = t.backgroundImage, e.style.color = t.color, e.style.setProperty(
|
|
92
|
+
"-webkit-background-clip",
|
|
93
|
+
t.webkitBackgroundClip
|
|
94
|
+
), e.style.setProperty(
|
|
95
|
+
"-webkit-text-fill-color",
|
|
96
|
+
t.webkitTextFillColor
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
function Re(e, t) {
|
|
100
|
+
e.style.backgroundImage = t, e.style.backgroundClip = "text", e.style.color = "transparent", e.style.setProperty("-webkit-background-clip", "text"), e.style.setProperty("-webkit-text-fill-color", "transparent");
|
|
101
|
+
}
|
|
102
|
+
const wt = re(), Tt = re(".mdi");
|
|
103
|
+
function ze(e) {
|
|
104
|
+
const t = e == null ? void 0 : e.isVisible;
|
|
105
|
+
return typeof t == "object" && t !== null && "value" in t ? !!t.value : !!t;
|
|
106
|
+
}
|
|
107
|
+
const Ge = {
|
|
108
|
+
active: !1,
|
|
109
|
+
text: "Loading...",
|
|
110
|
+
noText: !1,
|
|
111
|
+
color: "primary",
|
|
112
|
+
dark: !1,
|
|
113
|
+
opacity: void 0,
|
|
114
|
+
blur: void 0,
|
|
115
|
+
progressView: "glow"
|
|
116
|
+
};
|
|
117
|
+
function Ke(e, t = {}) {
|
|
118
|
+
const n = typeof e == "object" && e !== null ? e : {}, o = typeof e == "boolean" ? e : n.active ?? n.value ?? !1;
|
|
119
|
+
return {
|
|
120
|
+
...Ge,
|
|
121
|
+
...n,
|
|
122
|
+
active: o,
|
|
123
|
+
dark: n.dark ?? !!t.dark,
|
|
124
|
+
noText: n.noText ?? !!t.noText
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
function ie(e) {
|
|
128
|
+
return JSON.stringify({
|
|
129
|
+
text: e.text,
|
|
130
|
+
noText: e.noText,
|
|
131
|
+
color: e.color,
|
|
132
|
+
dark: e.dark,
|
|
133
|
+
opacity: e.opacity,
|
|
134
|
+
blur: e.blur,
|
|
135
|
+
progressView: e.progressView
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
function We(e) {
|
|
139
|
+
return ["relative", "absolute", "fixed", "sticky"].includes(
|
|
140
|
+
getComputedStyle(e).position
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
function je(e) {
|
|
144
|
+
We(e) || (e.style.position = "relative");
|
|
145
|
+
}
|
|
146
|
+
function B(e) {
|
|
147
|
+
var n, o;
|
|
148
|
+
const t = e.__gLoading__;
|
|
149
|
+
t && ((n = t.app) == null || n.unmount(), (o = t.container) == null || o.remove(), t.app = void 0, t.container = void 0, t.component = void 0, t.optionsKey = void 0, e.style.position = t.originalPosition);
|
|
150
|
+
}
|
|
151
|
+
function Ue(e) {
|
|
152
|
+
const t = e.__gLoading__;
|
|
153
|
+
if (t) {
|
|
154
|
+
if (!t.component) {
|
|
155
|
+
B(e);
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
t.component.hide();
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
function He(e, t) {
|
|
162
|
+
const n = e.__gLoading__;
|
|
163
|
+
if (!n) return;
|
|
164
|
+
je(e);
|
|
165
|
+
const o = document.createElement("div");
|
|
166
|
+
o.className = "g-loading__container";
|
|
167
|
+
const r = te(fe, {
|
|
168
|
+
text: t.text,
|
|
169
|
+
noText: t.noText,
|
|
170
|
+
color: t.color,
|
|
171
|
+
dark: t.dark,
|
|
172
|
+
opacity: t.opacity,
|
|
173
|
+
blur: t.blur,
|
|
174
|
+
progressView: t.progressView,
|
|
175
|
+
onClose: () => {
|
|
176
|
+
ze(n.component) || B(e);
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
n.app = r, n.container = o, n.optionsKey = ie(t), e.appendChild(o), n.component = r.mount(o), n.component.show();
|
|
180
|
+
}
|
|
181
|
+
function H(e, t, n) {
|
|
182
|
+
var l;
|
|
183
|
+
const o = e.__gLoading__;
|
|
184
|
+
if (!o) return;
|
|
185
|
+
const r = Ke(t, n), i = ie(r);
|
|
186
|
+
if (!r.active) {
|
|
187
|
+
Ue(e);
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
if (o.app && o.optionsKey === i) {
|
|
191
|
+
(l = o.component) == null || l.show();
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
B(e), He(e, r);
|
|
195
|
+
}
|
|
196
|
+
const Et = {
|
|
197
|
+
mounted(e, t) {
|
|
198
|
+
e.__gLoading__ = {
|
|
199
|
+
originalPosition: e.style.position
|
|
200
|
+
}, H(e, t.value, t.modifiers);
|
|
201
|
+
},
|
|
202
|
+
updated(e, t) {
|
|
203
|
+
t.value === t.oldValue && (typeof t.value != "object" || t.value === null) || H(e, t.value, t.modifiers);
|
|
204
|
+
},
|
|
205
|
+
unmounted(e) {
|
|
206
|
+
B(e), delete e.__gLoading__;
|
|
207
|
+
}
|
|
208
|
+
}, h = {
|
|
209
|
+
center: !1,
|
|
210
|
+
color: "currentcolor",
|
|
211
|
+
disabled: !1,
|
|
212
|
+
duration: 520,
|
|
213
|
+
easing: "var(--g-token-easing-standard)",
|
|
214
|
+
opacity: 0.16
|
|
215
|
+
};
|
|
216
|
+
function se(e) {
|
|
217
|
+
if (typeof e == "boolean")
|
|
218
|
+
return {
|
|
219
|
+
...h,
|
|
220
|
+
disabled: !e
|
|
221
|
+
};
|
|
222
|
+
if (typeof e == "string")
|
|
223
|
+
return {
|
|
224
|
+
...h,
|
|
225
|
+
color: $(e)
|
|
226
|
+
};
|
|
227
|
+
const t = e != null && e.color ? $(e.color) : h.color;
|
|
228
|
+
return {
|
|
229
|
+
...h,
|
|
230
|
+
...e,
|
|
231
|
+
color: t
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
function qe(e) {
|
|
235
|
+
getComputedStyle(e).position === "static" && (e.style.position = "relative");
|
|
236
|
+
}
|
|
237
|
+
function Je(e) {
|
|
238
|
+
return typeof e == "number" ? `${e}ms` : e;
|
|
239
|
+
}
|
|
240
|
+
function Xe(e) {
|
|
241
|
+
if (typeof e == "number") return e;
|
|
242
|
+
const t = e.trim();
|
|
243
|
+
if (t.endsWith("ms"))
|
|
244
|
+
return Number.parseFloat(t);
|
|
245
|
+
if (t.endsWith("s"))
|
|
246
|
+
return Number.parseFloat(t) * 1e3;
|
|
247
|
+
const n = Number.parseFloat(t);
|
|
248
|
+
return Number.isNaN(n) ? Number(h.duration) : n;
|
|
249
|
+
}
|
|
250
|
+
function Ye(e, t, n) {
|
|
251
|
+
const o = e.getBoundingClientRect(), r = Math.hypot(o.width, o.height) * 2, i = t.x - o.left - r / 2, l = t.y - o.top - r / 2, s = document.createElement("span"), a = document.createElement("span");
|
|
252
|
+
return s.className = "g-ripple__container", s.style.setProperty("--g-ripple-color", n.color), s.style.setProperty(
|
|
253
|
+
"--g-ripple-duration",
|
|
254
|
+
Je(n.duration)
|
|
255
|
+
), s.style.setProperty("--g-ripple-easing", n.easing), s.style.setProperty(
|
|
256
|
+
"--g-ripple-opacity",
|
|
257
|
+
String(n.opacity)
|
|
258
|
+
), a.className = "g-ripple__animation", a.style.width = `${r}px`, a.style.height = `${r}px`, a.style.left = `${i}px`, a.style.top = `${l}px`, s.appendChild(a), e.appendChild(s), s;
|
|
259
|
+
}
|
|
260
|
+
function Ze(e, t) {
|
|
261
|
+
var n;
|
|
262
|
+
t.remove(), (n = e.__gRipple__) == null || n.ripples.delete(t);
|
|
263
|
+
}
|
|
264
|
+
function ae(e) {
|
|
265
|
+
const t = e.__gRipple__;
|
|
266
|
+
if (t) {
|
|
267
|
+
for (const n of t.ripples)
|
|
268
|
+
n.remove();
|
|
269
|
+
t.ripples.clear();
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
function q(e) {
|
|
273
|
+
const t = e.getBoundingClientRect();
|
|
274
|
+
return {
|
|
275
|
+
x: t.left + t.width / 2,
|
|
276
|
+
y: t.top + t.height / 2
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
function Qe(e) {
|
|
280
|
+
return e.hasAttribute("disabled") || e.getAttribute("aria-disabled") === "true" || e.classList.contains("g-button_disabled");
|
|
281
|
+
}
|
|
282
|
+
function J(e, t, n) {
|
|
283
|
+
var r;
|
|
284
|
+
if (n.disabled || Qe(e)) return;
|
|
285
|
+
qe(e);
|
|
286
|
+
const o = Ye(e, t, n);
|
|
287
|
+
(r = e.__gRipple__) == null || r.ripples.add(o), window.setTimeout(
|
|
288
|
+
() => Ze(e, o),
|
|
289
|
+
Xe(n.duration)
|
|
290
|
+
);
|
|
291
|
+
}
|
|
292
|
+
function et(e, t) {
|
|
293
|
+
if (e.__gRipple__) {
|
|
294
|
+
le(e, t);
|
|
295
|
+
return;
|
|
296
|
+
}
|
|
297
|
+
const n = se(t), o = {
|
|
298
|
+
originalPosition: e.style.position,
|
|
299
|
+
options: n,
|
|
300
|
+
onKeyDown: (r) => {
|
|
301
|
+
r.key !== "Enter" && r.key !== " " || J(e, q(e), o.options);
|
|
302
|
+
},
|
|
303
|
+
onPointerDown: (r) => {
|
|
304
|
+
r.button !== 0 || e.hasAttribute("disabled") || J(
|
|
305
|
+
e,
|
|
306
|
+
o.options.center ? q(e) : { x: r.clientX, y: r.clientY },
|
|
307
|
+
o.options
|
|
308
|
+
);
|
|
309
|
+
},
|
|
310
|
+
ripples: /* @__PURE__ */ new Set()
|
|
311
|
+
};
|
|
312
|
+
e.addEventListener("pointerdown", o.onPointerDown), e.addEventListener("keydown", o.onKeyDown), e.__gRipple__ = o;
|
|
313
|
+
}
|
|
314
|
+
function le(e, t) {
|
|
315
|
+
const n = e.__gRipple__;
|
|
316
|
+
n && (n.options = se(t), n.options.disabled && ae(e));
|
|
317
|
+
}
|
|
318
|
+
function tt(e) {
|
|
319
|
+
const t = e.__gRipple__;
|
|
320
|
+
t && (e.removeEventListener("pointerdown", t.onPointerDown), e.removeEventListener("keydown", t.onKeyDown), ae(e), e.style.position = t.originalPosition, delete e.__gRipple__);
|
|
321
|
+
}
|
|
322
|
+
const Lt = {
|
|
323
|
+
mounted(e, t) {
|
|
324
|
+
et(e, t.value);
|
|
325
|
+
},
|
|
326
|
+
updated(e, t) {
|
|
327
|
+
le(e, t.value);
|
|
328
|
+
},
|
|
329
|
+
unmounted(e) {
|
|
330
|
+
tt(e);
|
|
331
|
+
}
|
|
332
|
+
}, ue = Q({
|
|
333
|
+
...pe(),
|
|
334
|
+
modelValue: {
|
|
335
|
+
type: Boolean,
|
|
336
|
+
default: void 0
|
|
337
|
+
},
|
|
338
|
+
defaultOpen: {
|
|
339
|
+
type: Boolean,
|
|
340
|
+
default: !1
|
|
341
|
+
},
|
|
342
|
+
placement: {
|
|
343
|
+
type: String,
|
|
344
|
+
default: "bottom"
|
|
345
|
+
},
|
|
346
|
+
strategy: {
|
|
347
|
+
type: String,
|
|
348
|
+
default: "absolute"
|
|
349
|
+
},
|
|
350
|
+
offset: {
|
|
351
|
+
type: Number,
|
|
352
|
+
default: 8
|
|
353
|
+
},
|
|
354
|
+
shift: {
|
|
355
|
+
type: Boolean,
|
|
356
|
+
default: !0
|
|
357
|
+
},
|
|
358
|
+
flip: {
|
|
359
|
+
type: Boolean,
|
|
360
|
+
default: !0
|
|
361
|
+
},
|
|
362
|
+
sameWidth: {
|
|
363
|
+
type: Boolean,
|
|
364
|
+
default: !1
|
|
365
|
+
},
|
|
366
|
+
referenceFullWidth: {
|
|
367
|
+
type: Boolean,
|
|
368
|
+
default: !1
|
|
369
|
+
},
|
|
370
|
+
appendTo: {
|
|
371
|
+
type: String,
|
|
372
|
+
default: ""
|
|
373
|
+
},
|
|
374
|
+
zIndexBase: {
|
|
375
|
+
type: Number,
|
|
376
|
+
default: 1e3
|
|
377
|
+
},
|
|
378
|
+
disabled: Boolean,
|
|
379
|
+
content: String,
|
|
380
|
+
reference: Object
|
|
381
|
+
}), nt = (e) => {
|
|
382
|
+
const t = v(null), n = v(null), o = p(() => {
|
|
383
|
+
const u = [];
|
|
384
|
+
return e.offset && u.push(Te(e.offset)), e.flip && u.push(Ee()), e.shift && u.push(
|
|
385
|
+
Le({
|
|
386
|
+
padding: 4,
|
|
387
|
+
crossAxis: !0
|
|
388
|
+
})
|
|
389
|
+
), e.sameWidth && u.push(
|
|
390
|
+
Ce({
|
|
391
|
+
apply({ rects: c, elements: d }) {
|
|
392
|
+
Object.assign(d.floating.style, {
|
|
393
|
+
width: `${c.reference.width}px`
|
|
394
|
+
});
|
|
395
|
+
}
|
|
396
|
+
})
|
|
397
|
+
), u;
|
|
398
|
+
}), { x: r, y: i, strategy: l, placement: s, update: a } = De(
|
|
399
|
+
t,
|
|
400
|
+
n,
|
|
401
|
+
{
|
|
402
|
+
...e,
|
|
403
|
+
middleware: o,
|
|
404
|
+
whileElementsMounted: Be
|
|
405
|
+
}
|
|
406
|
+
);
|
|
407
|
+
return {
|
|
408
|
+
reference: t,
|
|
409
|
+
floating: n,
|
|
410
|
+
x: r,
|
|
411
|
+
y: i,
|
|
412
|
+
strategy: l,
|
|
413
|
+
placement: s,
|
|
414
|
+
update: a
|
|
415
|
+
};
|
|
416
|
+
};
|
|
417
|
+
function ot(e) {
|
|
418
|
+
const t = p(() => !!e), n = p(() => e || "body");
|
|
419
|
+
return {
|
|
420
|
+
hasAppendTarget: t,
|
|
421
|
+
appendTarget: n
|
|
422
|
+
};
|
|
423
|
+
}
|
|
424
|
+
function rt(e, t) {
|
|
425
|
+
const n = p(() => e.modelValue !== void 0), o = v(e.defaultOpen ?? !1);
|
|
426
|
+
return {
|
|
427
|
+
open: p({
|
|
428
|
+
get() {
|
|
429
|
+
return n.value ? e.modelValue ?? !1 : o.value;
|
|
430
|
+
},
|
|
431
|
+
set(i) {
|
|
432
|
+
n.value || (o.value = i), t("update:modelValue", i);
|
|
433
|
+
}
|
|
434
|
+
}),
|
|
435
|
+
isControlled: n
|
|
436
|
+
};
|
|
437
|
+
}
|
|
438
|
+
function it(e) {
|
|
439
|
+
return e instanceof HTMLElement;
|
|
440
|
+
}
|
|
441
|
+
function st(e) {
|
|
442
|
+
return !!e && typeof e == "object" && "$el" in e;
|
|
443
|
+
}
|
|
444
|
+
function X(e) {
|
|
445
|
+
return e ? it(e) ? e : st(e) ? e.$el : null : null;
|
|
446
|
+
}
|
|
447
|
+
function at({
|
|
448
|
+
open: e,
|
|
449
|
+
reference: t,
|
|
450
|
+
floating: n,
|
|
451
|
+
escapeKey: o = !0,
|
|
452
|
+
outsideClick: r = !0
|
|
453
|
+
}) {
|
|
454
|
+
if (!e || !t || !n)
|
|
455
|
+
throw new Error(
|
|
456
|
+
"useDismiss: open, reference, and floating are required"
|
|
457
|
+
);
|
|
458
|
+
const i = (s) => {
|
|
459
|
+
if (!r) return;
|
|
460
|
+
const a = X(t.value), u = X(n.value), c = s.target;
|
|
461
|
+
a && u && !a.contains(c) && !u.contains(c) && (e.value = !1);
|
|
462
|
+
}, l = (s) => {
|
|
463
|
+
o && s.key === "Escape" && (e.value = !1);
|
|
464
|
+
};
|
|
465
|
+
me(() => {
|
|
466
|
+
document.addEventListener("click", i), document.addEventListener("keydown", l);
|
|
467
|
+
}), S(() => {
|
|
468
|
+
document.removeEventListener("click", i), document.removeEventListener("keydown", l);
|
|
469
|
+
});
|
|
470
|
+
}
|
|
471
|
+
let lt = 0;
|
|
472
|
+
const g = [], ce = v(null);
|
|
473
|
+
function Y(e) {
|
|
474
|
+
const t = g.find((r) => r.id === e);
|
|
475
|
+
if (!t) return;
|
|
476
|
+
const o = g.filter((r) => r.kind === t.kind).findIndex((r) => r.id === e);
|
|
477
|
+
return t.base + o + 1;
|
|
478
|
+
}
|
|
479
|
+
function N() {
|
|
480
|
+
const e = [...g].reverse().find((t) => t.kind === "overlay" && t.open.value);
|
|
481
|
+
ce.value = (e == null ? void 0 : e.id) ?? null;
|
|
482
|
+
}
|
|
483
|
+
function Z(e) {
|
|
484
|
+
const t = g.findIndex((o) => o.id === e);
|
|
485
|
+
if (t === -1) return;
|
|
486
|
+
const [n] = g.splice(t, 1);
|
|
487
|
+
g.push(n), N();
|
|
488
|
+
}
|
|
489
|
+
function ut(e) {
|
|
490
|
+
const { open: t, base: n = 1e3, kind: o = "floating" } = e, r = ++lt, i = v();
|
|
491
|
+
function l() {
|
|
492
|
+
g.findIndex((m) => m.id === r) === -1 ? g.push({ id: r, kind: o, base: n, open: t }) : Z(r), i.value = Y(r), N();
|
|
493
|
+
}
|
|
494
|
+
function s() {
|
|
495
|
+
const d = g.findIndex((m) => m.id === r);
|
|
496
|
+
d !== -1 && g.splice(d, 1), i.value = void 0, N();
|
|
497
|
+
}
|
|
498
|
+
function a() {
|
|
499
|
+
t.value && (Z(r), i.value = Y(r));
|
|
500
|
+
}
|
|
501
|
+
const u = p(() => {
|
|
502
|
+
var m;
|
|
503
|
+
return ((m = g.filter((b) => b.kind === o).at(-1)) == null ? void 0 : m.id) === r;
|
|
504
|
+
}), c = p(
|
|
505
|
+
() => o === "overlay" && ce.value === r
|
|
506
|
+
);
|
|
507
|
+
return ne(
|
|
508
|
+
t,
|
|
509
|
+
(d) => {
|
|
510
|
+
d ? l() : s();
|
|
511
|
+
},
|
|
512
|
+
{ immediate: !0 }
|
|
513
|
+
), S(() => {
|
|
514
|
+
s();
|
|
515
|
+
}), {
|
|
516
|
+
id: r,
|
|
517
|
+
zIndex: i,
|
|
518
|
+
isTop: u,
|
|
519
|
+
isTopOverlay: c,
|
|
520
|
+
bringToFront: a
|
|
521
|
+
};
|
|
522
|
+
}
|
|
523
|
+
const ct = /* @__PURE__ */ oe({
|
|
524
|
+
__name: "BaseFloating",
|
|
525
|
+
props: ue(),
|
|
526
|
+
emits: ["update:modelValue"],
|
|
527
|
+
setup(e, { emit: t }) {
|
|
528
|
+
const n = e, o = ge(n, "reference"), r = t, { open: i } = rt(n, r), { hasAppendTarget: l, appendTarget: s } = ot(n.appendTo), a = v(!1), u = p(() => i.value || a.value), { reference: c, floating: d, x: m, y: b, strategy: M, update: F } = nt(n);
|
|
529
|
+
at({ open: i, reference: c, floating: d });
|
|
530
|
+
const { zIndex: x } = ut({
|
|
531
|
+
open: u,
|
|
532
|
+
base: n.zIndexBase,
|
|
533
|
+
kind: "floating"
|
|
534
|
+
}), k = p(() => ({
|
|
535
|
+
position: M.value,
|
|
536
|
+
top: b.value != null ? `${b.value}px` : "",
|
|
537
|
+
left: m.value != null ? `${m.value}px` : "",
|
|
538
|
+
minWidth: n.sameWidth && c.value instanceof HTMLElement ? `${c.value.offsetWidth}px` : void 0,
|
|
539
|
+
zIndex: x.value
|
|
540
|
+
}));
|
|
541
|
+
function I(f) {
|
|
542
|
+
f && ("$el" in f || f instanceof HTMLElement) ? c.value = f : (c.value = n.reference, F());
|
|
543
|
+
}
|
|
544
|
+
function w() {
|
|
545
|
+
a.value = !0;
|
|
546
|
+
}
|
|
547
|
+
function T() {
|
|
548
|
+
a.value = !1;
|
|
549
|
+
}
|
|
550
|
+
function E() {
|
|
551
|
+
a.value = !1;
|
|
552
|
+
}
|
|
553
|
+
return ne(
|
|
554
|
+
o,
|
|
555
|
+
(f) => {
|
|
556
|
+
f && (c.value = f);
|
|
557
|
+
},
|
|
558
|
+
{ deep: !0, immediate: !0 }
|
|
559
|
+
), (f, V) => (L(), ye(ve, null, [
|
|
560
|
+
_("div", {
|
|
561
|
+
class: _e(["base-floating__reference", {
|
|
562
|
+
"base-floating__reference_full": n.referenceFullWidth
|
|
563
|
+
}])
|
|
564
|
+
}, [
|
|
565
|
+
C(f.$slots, "reference", { ref: I }, void 0, !0)
|
|
566
|
+
], 2),
|
|
567
|
+
y(l) ? (L(), A(be, {
|
|
568
|
+
key: 0,
|
|
569
|
+
to: y(s)
|
|
570
|
+
}, [
|
|
571
|
+
ke(y(G), {
|
|
572
|
+
transition: n.transition,
|
|
573
|
+
name: "scale",
|
|
574
|
+
onBeforeLeave: w,
|
|
575
|
+
onAfterLeave: T,
|
|
576
|
+
onLeaveCancelled: E
|
|
577
|
+
}, {
|
|
578
|
+
default: D(() => [
|
|
579
|
+
K(_("div", {
|
|
580
|
+
ref_key: "floating",
|
|
581
|
+
ref: d,
|
|
582
|
+
style: W(k.value)
|
|
583
|
+
}, [
|
|
584
|
+
C(f.$slots, "default", {}, void 0, !0)
|
|
585
|
+
], 4), [
|
|
586
|
+
[j, y(i)]
|
|
587
|
+
])
|
|
588
|
+
]),
|
|
589
|
+
_: 3
|
|
590
|
+
}, 8, ["transition"])
|
|
591
|
+
], 8, ["to"])) : (L(), A(y(G), {
|
|
592
|
+
key: 1,
|
|
593
|
+
transition: n.transition,
|
|
594
|
+
name: "scale",
|
|
595
|
+
onBeforeLeave: w,
|
|
596
|
+
onAfterLeave: T,
|
|
597
|
+
onLeaveCancelled: E
|
|
598
|
+
}, {
|
|
599
|
+
default: D(() => [
|
|
600
|
+
K(_("div", {
|
|
601
|
+
ref_key: "floating",
|
|
602
|
+
ref: d,
|
|
603
|
+
style: W(k.value)
|
|
604
|
+
}, [
|
|
605
|
+
C(f.$slots, "default", {}, void 0, !0)
|
|
606
|
+
], 4), [
|
|
607
|
+
[j, y(i)]
|
|
608
|
+
])
|
|
609
|
+
]),
|
|
610
|
+
_: 3
|
|
611
|
+
}, 8, ["transition"]))
|
|
612
|
+
], 64));
|
|
613
|
+
}
|
|
614
|
+
}), dt = /* @__PURE__ */ ee(ct, [["__scopeId", "data-v-d9f4cacd"]]), ft = Q({
|
|
615
|
+
...ue(),
|
|
616
|
+
openDelay: {
|
|
617
|
+
type: Number,
|
|
618
|
+
default: 0
|
|
619
|
+
},
|
|
620
|
+
closeDelay: {
|
|
621
|
+
type: Number,
|
|
622
|
+
default: 0
|
|
623
|
+
}
|
|
624
|
+
});
|
|
625
|
+
function pt(e, t) {
|
|
626
|
+
const { click: n, hover: o, focus: r, contextmenu: i, disabled: l = !1 } = t;
|
|
627
|
+
let s = null, a = null;
|
|
628
|
+
function u() {
|
|
629
|
+
s && clearTimeout(s), a && clearTimeout(a), s = null, a = null;
|
|
630
|
+
}
|
|
631
|
+
function c(f, V = 0) {
|
|
632
|
+
if (u(), V === 0) {
|
|
633
|
+
e.value = f;
|
|
634
|
+
return;
|
|
635
|
+
}
|
|
636
|
+
const R = window.setTimeout(() => {
|
|
637
|
+
e.value = f;
|
|
638
|
+
}, V);
|
|
639
|
+
f ? s = R : a = R;
|
|
640
|
+
}
|
|
641
|
+
const d = typeof o == "object" ? o : {}, m = d.openDelay ?? 0, b = d.closeDelay ?? 0;
|
|
642
|
+
function M() {
|
|
643
|
+
l || !n || (e.value = !e.value);
|
|
644
|
+
}
|
|
645
|
+
function F(f) {
|
|
646
|
+
l || !i || (f.preventDefault(), e.value = !0);
|
|
647
|
+
}
|
|
648
|
+
function x() {
|
|
649
|
+
l || !o || c(!0, m);
|
|
650
|
+
}
|
|
651
|
+
function k() {
|
|
652
|
+
o && c(!1, b);
|
|
653
|
+
}
|
|
654
|
+
function I() {
|
|
655
|
+
l || !r || (e.value = !0);
|
|
656
|
+
}
|
|
657
|
+
function w() {
|
|
658
|
+
r && (e.value = !1);
|
|
659
|
+
}
|
|
660
|
+
S(u);
|
|
661
|
+
const T = p(() => ({
|
|
662
|
+
...n ? { onClick: M } : {},
|
|
663
|
+
...i ? { onContextmenu: F } : {},
|
|
664
|
+
...o ? { onMouseenter: x, onMouseleave: k } : {},
|
|
665
|
+
...r ? { onFocus: I, onBlur: w } : {}
|
|
666
|
+
})), E = p(() => ({
|
|
667
|
+
...o ? { onMouseenter: x, onMouseleave: k } : {}
|
|
668
|
+
}));
|
|
669
|
+
return {
|
|
670
|
+
triggerAttrs: T,
|
|
671
|
+
floatingAttrs: E
|
|
672
|
+
};
|
|
673
|
+
}
|
|
674
|
+
const mt = { class: "g-tooltip__content" }, gt = /* @__PURE__ */ oe({
|
|
675
|
+
__name: "GTooltip",
|
|
676
|
+
props: ft(),
|
|
677
|
+
setup(e, { expose: t }) {
|
|
678
|
+
const n = e, o = v(!1), r = p(
|
|
679
|
+
() => n.transition ?? { name: "scale-only", scale: 0.96 }
|
|
680
|
+
), { triggerAttrs: i, floatingAttrs: l } = pt(o, {
|
|
681
|
+
hover: {
|
|
682
|
+
openDelay: n.openDelay,
|
|
683
|
+
closeDelay: n.closeDelay
|
|
684
|
+
},
|
|
685
|
+
focus: !0
|
|
686
|
+
});
|
|
687
|
+
function s() {
|
|
688
|
+
o.value = !1;
|
|
689
|
+
}
|
|
690
|
+
function a() {
|
|
691
|
+
o.value = !0;
|
|
692
|
+
}
|
|
693
|
+
return t({ hide: s, show: a, open: o }), (u, c) => (L(), A(y(dt), P(n, {
|
|
694
|
+
"model-value": o.value,
|
|
695
|
+
"onUpdate:modelValue": c[0] || (c[0] = (d) => o.value = d),
|
|
696
|
+
transition: r.value
|
|
697
|
+
}), he({
|
|
698
|
+
default: D(() => [
|
|
699
|
+
_("div", P({ class: "g-tooltip" }, y(l), { role: "tooltip" }), [
|
|
700
|
+
c[1] || (c[1] = _("div", { class: "g-tooltip__underlay" }, null, -1)),
|
|
701
|
+
_("span", mt, xe(n.content), 1)
|
|
702
|
+
], 16)
|
|
703
|
+
]),
|
|
704
|
+
_: 2
|
|
705
|
+
}, [
|
|
706
|
+
u.$slots.default ? {
|
|
707
|
+
name: "reference",
|
|
708
|
+
fn: D(({ ref: d }) => [
|
|
709
|
+
_("div", P({
|
|
710
|
+
ref: d,
|
|
711
|
+
class: "g-tooltip__trigger",
|
|
712
|
+
tabindex: "0"
|
|
713
|
+
}, y(i)), [
|
|
714
|
+
C(u.$slots, "default", {}, void 0, !0)
|
|
715
|
+
], 16)
|
|
716
|
+
]),
|
|
717
|
+
key: "0"
|
|
718
|
+
} : void 0
|
|
719
|
+
]), 1040, ["model-value", "transition"]));
|
|
720
|
+
}
|
|
721
|
+
}), yt = /* @__PURE__ */ ee(gt, [["__scopeId", "data-v-578012d6"]]), Ct = {
|
|
722
|
+
mounted(e, t) {
|
|
723
|
+
if (!t.value) return;
|
|
724
|
+
const n = typeof t.value == "string" ? { content: t.value } : t.value, o = v(!1), r = document.createElement("div");
|
|
725
|
+
document.body.appendChild(r);
|
|
726
|
+
const i = v(null), l = te({
|
|
727
|
+
setup() {
|
|
728
|
+
return () => we(
|
|
729
|
+
yt,
|
|
730
|
+
{
|
|
731
|
+
...n,
|
|
732
|
+
reference: e,
|
|
733
|
+
ref: (u) => {
|
|
734
|
+
u && (i.value = u);
|
|
735
|
+
}
|
|
736
|
+
},
|
|
737
|
+
{
|
|
738
|
+
reference: ({
|
|
739
|
+
ref: u
|
|
740
|
+
}) => (u(e), e)
|
|
741
|
+
}
|
|
742
|
+
);
|
|
743
|
+
}
|
|
744
|
+
});
|
|
745
|
+
l.mount(r);
|
|
746
|
+
const s = () => {
|
|
747
|
+
i.value && i.value.show();
|
|
748
|
+
}, a = () => {
|
|
749
|
+
i.value && i.value.hide();
|
|
750
|
+
};
|
|
751
|
+
e.addEventListener("mouseenter", s), e.addEventListener("mouseleave", a), e.addEventListener("focus", s), e.addEventListener("blur", a), e.__tooltip__ = {
|
|
752
|
+
app: l,
|
|
753
|
+
container: r,
|
|
754
|
+
open: o,
|
|
755
|
+
cleanup() {
|
|
756
|
+
e.removeEventListener("mouseenter", s), e.removeEventListener("mouseleave", a), e.removeEventListener("focus", s), e.removeEventListener("blur", a), l.unmount(), r.remove();
|
|
757
|
+
}
|
|
758
|
+
};
|
|
759
|
+
},
|
|
760
|
+
unmounted(e) {
|
|
761
|
+
var t;
|
|
762
|
+
(t = e.__tooltip__) == null || t.cleanup();
|
|
763
|
+
}
|
|
764
|
+
};
|
|
765
|
+
function vt(e) {
|
|
766
|
+
return typeof e == "string" || Array.isArray(e) || e === void 0 ? {
|
|
767
|
+
mask: e
|
|
768
|
+
} : e;
|
|
769
|
+
}
|
|
770
|
+
function de(e) {
|
|
771
|
+
return e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement ? e : e.querySelector("input, textarea");
|
|
772
|
+
}
|
|
773
|
+
function O(e, t) {
|
|
774
|
+
const n = de(e);
|
|
775
|
+
if (!n) return;
|
|
776
|
+
const o = vt(t.value), r = {
|
|
777
|
+
...Me,
|
|
778
|
+
...o.tokens ?? {}
|
|
779
|
+
}, i = Fe(n.value, o.mask, r);
|
|
780
|
+
n.value !== i && (n.value = i);
|
|
781
|
+
}
|
|
782
|
+
function _t(e, t) {
|
|
783
|
+
const n = de(e);
|
|
784
|
+
if (!n) return;
|
|
785
|
+
const o = () => {
|
|
786
|
+
e._gMaskFormatting || (e._gMaskFormatting = !0, O(e, t), n.dispatchEvent(new Event("input", { bubbles: !0 })), e._gMaskFormatting = !1);
|
|
787
|
+
};
|
|
788
|
+
n.addEventListener("input", o), e._gMaskCleanup = () => {
|
|
789
|
+
n.removeEventListener("input", o);
|
|
790
|
+
}, O(e, t);
|
|
791
|
+
}
|
|
792
|
+
const Dt = {
|
|
793
|
+
mounted: _t,
|
|
794
|
+
updated(e, t) {
|
|
795
|
+
O(e, t);
|
|
796
|
+
},
|
|
797
|
+
beforeUnmount(e) {
|
|
798
|
+
var t;
|
|
799
|
+
(t = e._gMaskCleanup) == null || t.call(e), delete e._gMaskCleanup, delete e._gMaskFormatting;
|
|
800
|
+
}
|
|
801
|
+
};
|
|
802
|
+
export {
|
|
803
|
+
dt as B,
|
|
804
|
+
yt as G,
|
|
805
|
+
Dt as a,
|
|
806
|
+
Ct as b,
|
|
807
|
+
ot as c,
|
|
808
|
+
ut as d,
|
|
809
|
+
pt as e,
|
|
810
|
+
Tt as g,
|
|
811
|
+
Et as l,
|
|
812
|
+
ue as m,
|
|
813
|
+
Lt as r,
|
|
814
|
+
rt as u,
|
|
815
|
+
wt as v
|
|
816
|
+
};
|