@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,763 @@
|
|
|
1
|
+
import { defineComponent as P, computed as p, unref as d, openBlock as v, createBlock as G, resolveDynamicComponent as X, mergeProps as H, createCommentVNode as _, toRef as A, useCssVars as Y, toRefs as be, createElementBlock as y, normalizeStyle as T, normalizeClass as b, createElementVNode as S, renderSlot as h, toValue as x, useSlots as Z, resolveDirective as J, withDirectives as K, withCtx as ee, createVNode as W, Fragment as Se, createTextVNode as L, toDisplayString as U, shallowRef as te, ref as N, onUnmounted as ne, createApp as ae, watch as ke, onBeforeUnmount as he, reactive as Ce, h as E } from "vue";
|
|
2
|
+
import { c as D, p as k, d as $e, e as oe, u as se, f as Be, g as C, h as we, i as Ge, j as Pe, k as Ie, l as ze, n as Oe, o as Re, q as re, s as Ve, t as ie, _ as xe, a as Ne } from "./GLoading.vue_vue_type_style_index_0_lang-DDqJEYGf.js";
|
|
3
|
+
import "@mdi/js";
|
|
4
|
+
import { u as ce } from "./icon-BrFRYYf3.js";
|
|
5
|
+
const Ae = () => ({
|
|
6
|
+
icon: {
|
|
7
|
+
type: String,
|
|
8
|
+
required: !0
|
|
9
|
+
},
|
|
10
|
+
size: {
|
|
11
|
+
type: [Number, String],
|
|
12
|
+
default: void 0
|
|
13
|
+
},
|
|
14
|
+
tag: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: "span"
|
|
17
|
+
}
|
|
18
|
+
}), Te = /* @__PURE__ */ P({
|
|
19
|
+
__name: "GIcon",
|
|
20
|
+
props: Ae(),
|
|
21
|
+
setup(e) {
|
|
22
|
+
const t = e, o = ce(() => t.icon), n = p(
|
|
23
|
+
() => t.size == null ? "var(--g-token-icon-size-m)" : Number.isFinite(Number(t.size)) ? `${t.size}px` : String(t.size)
|
|
24
|
+
);
|
|
25
|
+
return (c, r) => d(o).icon ? (v(), G(X(d(o).component), H({
|
|
26
|
+
key: 0,
|
|
27
|
+
icon: d(o).icon,
|
|
28
|
+
tag: t.tag,
|
|
29
|
+
class: "g-icon",
|
|
30
|
+
style: { fontSize: n.value }
|
|
31
|
+
}, c.$attrs), null, 16, ["icon", "tag", "style"])) : _("", !0);
|
|
32
|
+
}
|
|
33
|
+
}), Q = /* @__PURE__ */ D(Te, [["__scopeId", "data-v-f1c09700"]]), We = k({
|
|
34
|
+
placement: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: "bottom"
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
function De(e, t) {
|
|
40
|
+
return p(() => `${t}_${e.placement}`);
|
|
41
|
+
}
|
|
42
|
+
const qe = k({
|
|
43
|
+
active: Boolean,
|
|
44
|
+
...oe(),
|
|
45
|
+
glow: [Boolean, Number, String],
|
|
46
|
+
animateGlow: Boolean,
|
|
47
|
+
shadow: Boolean,
|
|
48
|
+
...$e()
|
|
49
|
+
});
|
|
50
|
+
function Ee(e, t = "g-gradient") {
|
|
51
|
+
const o = se(e, t), n = Be(e, t);
|
|
52
|
+
return {
|
|
53
|
+
glowClasses: p(() => ({
|
|
54
|
+
[o.value]: !0,
|
|
55
|
+
[n.value]: !0,
|
|
56
|
+
[`${t}_active`]: e.active,
|
|
57
|
+
[`${t}_glow`]: e.glow,
|
|
58
|
+
[`${t}_animate-glow`]: e.animateGlow,
|
|
59
|
+
[`${t}_shadow`]: e.shadow
|
|
60
|
+
}))
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
const Fe = k({
|
|
64
|
+
borderRadius: {
|
|
65
|
+
type: [Number, String],
|
|
66
|
+
default: 4
|
|
67
|
+
},
|
|
68
|
+
inheritWidth: Boolean
|
|
69
|
+
});
|
|
70
|
+
function Le(e) {
|
|
71
|
+
return {
|
|
72
|
+
surfaceBorderRadius: C(A(e, "borderRadius"))
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
const Ue = k({
|
|
76
|
+
...oe(),
|
|
77
|
+
...Ge(),
|
|
78
|
+
...we(),
|
|
79
|
+
...We({
|
|
80
|
+
placement: "center"
|
|
81
|
+
}),
|
|
82
|
+
borderRadius: {
|
|
83
|
+
type: [Number, String],
|
|
84
|
+
default: 4
|
|
85
|
+
},
|
|
86
|
+
borderWidth: {
|
|
87
|
+
type: [Number, String],
|
|
88
|
+
default: 1
|
|
89
|
+
},
|
|
90
|
+
color: String,
|
|
91
|
+
state: String
|
|
92
|
+
}), le = k({
|
|
93
|
+
...Ue(),
|
|
94
|
+
...qe(),
|
|
95
|
+
...Fe()
|
|
96
|
+
});
|
|
97
|
+
function He(e) {
|
|
98
|
+
const t = C(A(e, "borderWidth")), o = C(A(e, "borderRadius")), n = p(() => t.value ? `calc(${o.value} + ${t.value})` : o.value), c = se(e, "g-gradient"), r = De(e, "g-gradient"), i = Pe(e, "g-gradient"), a = Ie(
|
|
99
|
+
() => e.color ?? e.state
|
|
100
|
+
), s = p(() => ({
|
|
101
|
+
[c.value]: !0,
|
|
102
|
+
[r.value]: !0,
|
|
103
|
+
[i.value]: !0,
|
|
104
|
+
"g-gradient_inherit-width": e.inheritWidth,
|
|
105
|
+
[`g-gradient_${e.placement}`]: e.placement,
|
|
106
|
+
[`g-gradient_${e.state}`]: e.state,
|
|
107
|
+
[`g-gradient_border_${e.borderWidth}`]: !0
|
|
108
|
+
})), u = p(() => ({
|
|
109
|
+
"--g-border-radius": o.value,
|
|
110
|
+
"--g-border-width": t.value,
|
|
111
|
+
"--g-gradient-current": a.value
|
|
112
|
+
}));
|
|
113
|
+
return {
|
|
114
|
+
borderWidthPx: t,
|
|
115
|
+
borderRadiusPx: o,
|
|
116
|
+
containerBorderRadius: n,
|
|
117
|
+
resolvedGradient: a,
|
|
118
|
+
gradientClasses: s,
|
|
119
|
+
gradientStyles: u
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
const je = { class: "g-gradient__slot" }, Me = /* @__PURE__ */ P({
|
|
123
|
+
__name: "GGradient",
|
|
124
|
+
props: le(),
|
|
125
|
+
setup(e) {
|
|
126
|
+
Y((u) => ({
|
|
127
|
+
v3beb5b00: d(c),
|
|
128
|
+
ea600628: d(s),
|
|
129
|
+
v61d97152: d(n)
|
|
130
|
+
}));
|
|
131
|
+
const t = e, { borderWidth: o } = be(t), n = C(o), { containerBorderRadius: c, gradientClasses: r, gradientStyles: i } = He(t), { glowClasses: a } = Ee(t), { surfaceBorderRadius: s } = Le(t);
|
|
132
|
+
return (u, f) => (v(), y("div", {
|
|
133
|
+
class: b(["g-gradient", [d(r), d(a)]]),
|
|
134
|
+
style: T(d(i))
|
|
135
|
+
}, [
|
|
136
|
+
S("div", je, [
|
|
137
|
+
h(u.$slots, "default", {}, void 0, !0)
|
|
138
|
+
])
|
|
139
|
+
], 6));
|
|
140
|
+
}
|
|
141
|
+
}), Je = /* @__PURE__ */ D(Me, [["__scopeId", "data-v-f23c788d"]]), Ke = /* @__PURE__ */ P({
|
|
142
|
+
__name: "GIcon",
|
|
143
|
+
props: {
|
|
144
|
+
icon: {},
|
|
145
|
+
size: { default: 20 },
|
|
146
|
+
tag: { default: "span" }
|
|
147
|
+
},
|
|
148
|
+
setup(e) {
|
|
149
|
+
const t = e, o = C(A(t, "size")), n = ce(() => t.icon);
|
|
150
|
+
return (c, r) => (v(), G(X(d(n).component), H({
|
|
151
|
+
icon: d(n).icon,
|
|
152
|
+
tag: t.tag,
|
|
153
|
+
class: "g-icon",
|
|
154
|
+
style: { fontSize: d(o) }
|
|
155
|
+
}, c.$attrs), null, 16, ["icon", "tag", "style"]));
|
|
156
|
+
}
|
|
157
|
+
}), F = /* @__PURE__ */ D(Ke, [["__scopeId", "data-v-1e1fd36a"]]), Qe = k({
|
|
158
|
+
...Oe(),
|
|
159
|
+
...ze(),
|
|
160
|
+
active: Boolean,
|
|
161
|
+
activeColor: String,
|
|
162
|
+
activeState: String,
|
|
163
|
+
activeVariant: String
|
|
164
|
+
});
|
|
165
|
+
function Xe(e, t, o = {}) {
|
|
166
|
+
const { disabledClass: n, roundedClass: c, stateClass: r } = Re(
|
|
167
|
+
e,
|
|
168
|
+
t
|
|
169
|
+
), {
|
|
170
|
+
surfaceOverlayClasses: i,
|
|
171
|
+
surfaceUnderlayClasses: a,
|
|
172
|
+
surfaceContentClasses: s
|
|
173
|
+
} = re(t), u = Ve(e, t), f = p(
|
|
174
|
+
() => !!(x(o.active) ?? e.active)
|
|
175
|
+
), g = p(() => !!x(o.selected)), { resolvedColor: l, resolvedState: $, colorStyles: I } = ie({
|
|
176
|
+
color: () => x(e.color),
|
|
177
|
+
state: () => e.state,
|
|
178
|
+
active: () => f.value || g.value,
|
|
179
|
+
activeColor: () => x(e.activeColor),
|
|
180
|
+
activeState: () => e.activeState
|
|
181
|
+
}), w = p(
|
|
182
|
+
() => (g.value || f.value) && e.activeVariant ? e.activeVariant : e.variant
|
|
183
|
+
);
|
|
184
|
+
return {
|
|
185
|
+
actionSurfaceClasses: p(() => {
|
|
186
|
+
const z = !!x(o.focused);
|
|
187
|
+
return [
|
|
188
|
+
`${t}_${w.value}`,
|
|
189
|
+
n.value,
|
|
190
|
+
c.value,
|
|
191
|
+
r.value,
|
|
192
|
+
u.value,
|
|
193
|
+
z ? `${t}_focused` : "",
|
|
194
|
+
g.value ? `${t}_selected` : "",
|
|
195
|
+
f.value ? `${t}_active` : ""
|
|
196
|
+
].filter(Boolean);
|
|
197
|
+
}),
|
|
198
|
+
resolvedColor: l,
|
|
199
|
+
resolvedState: $,
|
|
200
|
+
resolvedVariant: w,
|
|
201
|
+
surfaceStyles: I,
|
|
202
|
+
surfaceOverlayClasses: i,
|
|
203
|
+
surfaceUnderlayClasses: a,
|
|
204
|
+
surfaceContentClasses: s
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
const Ye = k({
|
|
208
|
+
prepend: String,
|
|
209
|
+
append: String,
|
|
210
|
+
label: String
|
|
211
|
+
}), Ze = k({
|
|
212
|
+
...Qe(),
|
|
213
|
+
...Ye(),
|
|
214
|
+
...le(),
|
|
215
|
+
isIconButton: Boolean,
|
|
216
|
+
iconButton: String,
|
|
217
|
+
ripple: {
|
|
218
|
+
type: [Boolean, String, Object],
|
|
219
|
+
default: !0
|
|
220
|
+
}
|
|
221
|
+
}), et = {
|
|
222
|
+
key: 0,
|
|
223
|
+
class: "g-button__prepend"
|
|
224
|
+
}, tt = { class: "g-button__label" }, nt = {
|
|
225
|
+
key: 1,
|
|
226
|
+
class: "g-button__append"
|
|
227
|
+
}, at = /* @__PURE__ */ P({
|
|
228
|
+
__name: "GButton",
|
|
229
|
+
props: Ze({
|
|
230
|
+
borderWidth: 0,
|
|
231
|
+
borderRadius: 4,
|
|
232
|
+
placement: "center"
|
|
233
|
+
}),
|
|
234
|
+
setup(e) {
|
|
235
|
+
Y((l) => ({
|
|
236
|
+
ff755c22: d(n)
|
|
237
|
+
}));
|
|
238
|
+
const t = Z(), o = e, n = C(o.borderRadius), c = p(() => o.disabled || o.ripple === !1 ? !1 : typeof o.ripple == "object" ? {
|
|
239
|
+
...o.ripple,
|
|
240
|
+
disabled: o.ripple.disabled || o.disabled
|
|
241
|
+
} : o.ripple), {
|
|
242
|
+
actionSurfaceClasses: r,
|
|
243
|
+
resolvedColor: i,
|
|
244
|
+
resolvedState: a,
|
|
245
|
+
surfaceStyles: s,
|
|
246
|
+
surfaceOverlayClasses: u,
|
|
247
|
+
surfaceUnderlayClasses: f,
|
|
248
|
+
surfaceContentClasses: g
|
|
249
|
+
} = Xe(o, "g-button");
|
|
250
|
+
return (l, $) => {
|
|
251
|
+
const I = J("ripple"), w = J("gradient-icon");
|
|
252
|
+
return K((v(), G(Je, H({ class: "g-gradient" }, {
|
|
253
|
+
...o,
|
|
254
|
+
color: d(i),
|
|
255
|
+
state: d(a)
|
|
256
|
+
}), {
|
|
257
|
+
default: ee(() => [
|
|
258
|
+
K((v(), y("div", {
|
|
259
|
+
class: b(["g-button", [
|
|
260
|
+
d(r),
|
|
261
|
+
{
|
|
262
|
+
"g-button_icon": l.iconButton || l.isIconButton
|
|
263
|
+
}
|
|
264
|
+
]]),
|
|
265
|
+
style: T(d(s))
|
|
266
|
+
}, [
|
|
267
|
+
S("span", {
|
|
268
|
+
class: b(d(f))
|
|
269
|
+
}, null, 2),
|
|
270
|
+
S("span", {
|
|
271
|
+
class: b(d(u))
|
|
272
|
+
}, null, 2),
|
|
273
|
+
S("span", {
|
|
274
|
+
class: b(["g-button__content", d(g)])
|
|
275
|
+
}, [
|
|
276
|
+
(t.prepend || l.prepend) && !l.iconButton ? (v(), y("span", et, [
|
|
277
|
+
h(l.$slots, "prepend", {}, () => [
|
|
278
|
+
W(F, { icon: l.prepend }, null, 8, ["icon"])
|
|
279
|
+
])
|
|
280
|
+
])) : _("", !0),
|
|
281
|
+
S("span", tt, [
|
|
282
|
+
h(l.$slots, "default", {}, () => [
|
|
283
|
+
l.iconButton ? l.iconButton ? (v(), G(F, {
|
|
284
|
+
key: 1,
|
|
285
|
+
icon: l.iconButton
|
|
286
|
+
}, null, 8, ["icon"])) : _("", !0) : (v(), y(Se, { key: 0 }, [
|
|
287
|
+
L(U(l.label), 1)
|
|
288
|
+
], 64))
|
|
289
|
+
])
|
|
290
|
+
]),
|
|
291
|
+
(t.append || l.append) && !l.iconButton ? (v(), y("span", nt, [
|
|
292
|
+
h(l.$slots, "append", {}, () => [
|
|
293
|
+
W(F, { icon: l.append }, null, 8, ["icon"])
|
|
294
|
+
])
|
|
295
|
+
])) : _("", !0)
|
|
296
|
+
], 2)
|
|
297
|
+
], 6)), [
|
|
298
|
+
[I, c.value]
|
|
299
|
+
])
|
|
300
|
+
]),
|
|
301
|
+
_: 3
|
|
302
|
+
}, 16)), [
|
|
303
|
+
[w]
|
|
304
|
+
]);
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
});
|
|
308
|
+
function $t() {
|
|
309
|
+
const e = te(null), t = N(!1), o = (a) => {
|
|
310
|
+
c();
|
|
311
|
+
const s = n(a.target), u = s.style.position;
|
|
312
|
+
r(s) || (s.style.position = "relative");
|
|
313
|
+
const f = document.createElement("div");
|
|
314
|
+
f.className = "g-loading__container", s.appendChild(f);
|
|
315
|
+
const g = {}, l = ae(xe, {
|
|
316
|
+
text: a.text,
|
|
317
|
+
noText: a.noText,
|
|
318
|
+
color: a.color,
|
|
319
|
+
dark: a.dark,
|
|
320
|
+
opacity: a.opacity,
|
|
321
|
+
blur: a.blur,
|
|
322
|
+
progressView: a.progressView,
|
|
323
|
+
onClose: () => {
|
|
324
|
+
i(g);
|
|
325
|
+
}
|
|
326
|
+
}), $ = l.mount(f);
|
|
327
|
+
Object.assign(g, {
|
|
328
|
+
app: l,
|
|
329
|
+
container: f,
|
|
330
|
+
target: s,
|
|
331
|
+
originalPosition: u,
|
|
332
|
+
componentInstance: $
|
|
333
|
+
}), e.value = g, $.show(), t.value = !0;
|
|
334
|
+
}, n = (a) => {
|
|
335
|
+
if (!a) return document.body;
|
|
336
|
+
if (typeof a == "string") {
|
|
337
|
+
const s = document.querySelector(a);
|
|
338
|
+
if (!s) throw new Error(`Target element ${a} not found`);
|
|
339
|
+
return s;
|
|
340
|
+
}
|
|
341
|
+
return a;
|
|
342
|
+
}, c = async () => {
|
|
343
|
+
if (!e.value) return;
|
|
344
|
+
const { componentInstance: a } = e.value;
|
|
345
|
+
a && a.hide();
|
|
346
|
+
}, r = (a) => {
|
|
347
|
+
const s = window.getComputedStyle(a).position;
|
|
348
|
+
return ["relative", "absolute", "fixed", "sticky"].includes(s);
|
|
349
|
+
}, i = (a = e.value) => {
|
|
350
|
+
if (!a) return;
|
|
351
|
+
const s = e.value === a, { app: u, container: f, target: g, originalPosition: l } = a;
|
|
352
|
+
u.unmount(), f.parentElement === g && g.removeChild(f), s && (g.style.position = l, e.value = null, t.value = !1);
|
|
353
|
+
};
|
|
354
|
+
return ne(() => {
|
|
355
|
+
c();
|
|
356
|
+
}), {
|
|
357
|
+
show: o,
|
|
358
|
+
hide: c,
|
|
359
|
+
visible: t
|
|
360
|
+
};
|
|
361
|
+
}
|
|
362
|
+
const ot = k({
|
|
363
|
+
modelValue: {
|
|
364
|
+
type: Boolean,
|
|
365
|
+
default: void 0
|
|
366
|
+
},
|
|
367
|
+
defaultOpen: {
|
|
368
|
+
type: Boolean,
|
|
369
|
+
default: !1
|
|
370
|
+
},
|
|
371
|
+
title: String,
|
|
372
|
+
text: String,
|
|
373
|
+
icon: String,
|
|
374
|
+
color: {
|
|
375
|
+
type: String,
|
|
376
|
+
default: "primary"
|
|
377
|
+
},
|
|
378
|
+
state: String,
|
|
379
|
+
variant: {
|
|
380
|
+
type: String,
|
|
381
|
+
default: "tonal"
|
|
382
|
+
},
|
|
383
|
+
location: {
|
|
384
|
+
type: String,
|
|
385
|
+
default: "bottom-center"
|
|
386
|
+
},
|
|
387
|
+
position: {
|
|
388
|
+
type: String,
|
|
389
|
+
default: "fixed"
|
|
390
|
+
},
|
|
391
|
+
transition: {
|
|
392
|
+
type: [Boolean, String, Object],
|
|
393
|
+
default: void 0
|
|
394
|
+
},
|
|
395
|
+
timeout: {
|
|
396
|
+
type: Number,
|
|
397
|
+
default: 5e3
|
|
398
|
+
},
|
|
399
|
+
persistent: {
|
|
400
|
+
type: Boolean,
|
|
401
|
+
default: !1
|
|
402
|
+
},
|
|
403
|
+
closeable: {
|
|
404
|
+
type: Boolean,
|
|
405
|
+
default: !0
|
|
406
|
+
},
|
|
407
|
+
action: Object,
|
|
408
|
+
actionText: String,
|
|
409
|
+
closeOnAction: {
|
|
410
|
+
type: Boolean,
|
|
411
|
+
default: !0
|
|
412
|
+
},
|
|
413
|
+
multiline: {
|
|
414
|
+
type: Boolean,
|
|
415
|
+
default: !1
|
|
416
|
+
},
|
|
417
|
+
offset: {
|
|
418
|
+
type: [Number, String],
|
|
419
|
+
default: 24
|
|
420
|
+
},
|
|
421
|
+
maxWidth: {
|
|
422
|
+
type: [Number, String],
|
|
423
|
+
default: 520
|
|
424
|
+
},
|
|
425
|
+
pauseOnHover: {
|
|
426
|
+
type: Boolean,
|
|
427
|
+
default: !0
|
|
428
|
+
}
|
|
429
|
+
}), st = {
|
|
430
|
+
key: 0,
|
|
431
|
+
class: "g-snackbar__prepend"
|
|
432
|
+
}, rt = { class: "g-snackbar__main" }, it = {
|
|
433
|
+
key: 0,
|
|
434
|
+
class: "g-snackbar__title"
|
|
435
|
+
}, ct = {
|
|
436
|
+
key: 1,
|
|
437
|
+
class: "g-snackbar__text"
|
|
438
|
+
}, lt = {
|
|
439
|
+
key: 1,
|
|
440
|
+
class: "g-snackbar__actions"
|
|
441
|
+
}, ut = /* @__PURE__ */ P({
|
|
442
|
+
__name: "GSnackbar",
|
|
443
|
+
props: ot(),
|
|
444
|
+
emits: ["update:modelValue", "action", "close", "after-close"],
|
|
445
|
+
setup(e, { expose: t, emit: o }) {
|
|
446
|
+
const n = e, c = o, r = Z(), i = N(), a = N(n.defaultOpen), s = N("manual"), u = p(() => n.modelValue !== void 0), f = p(
|
|
447
|
+
() => u.value ? n.modelValue === !0 : a.value
|
|
448
|
+
), g = C(n.offset), l = C(n.maxWidth), { colorStyles: $ } = ie(n), {
|
|
449
|
+
surfaceOverlayClasses: I,
|
|
450
|
+
surfaceUnderlayClasses: w,
|
|
451
|
+
surfaceContentClasses: j
|
|
452
|
+
} = re("g-snackbar"), z = p(
|
|
453
|
+
() => {
|
|
454
|
+
var m;
|
|
455
|
+
return ((m = n.action) == null ? void 0 : m.label) ?? n.actionText;
|
|
456
|
+
}
|
|
457
|
+
), ue = p(() => ({
|
|
458
|
+
...$.value,
|
|
459
|
+
"--g-snackbar-max-width": l.value
|
|
460
|
+
})), de = p(() => ({
|
|
461
|
+
"--g-snackbar-offset": g.value
|
|
462
|
+
})), fe = p(() => [
|
|
463
|
+
`g-snackbar_${n.variant}`,
|
|
464
|
+
{
|
|
465
|
+
"g-snackbar_multiline": n.multiline
|
|
466
|
+
}
|
|
467
|
+
]), pe = p(() => [
|
|
468
|
+
`g-snackbar-layer_position-${n.position}`,
|
|
469
|
+
`g-snackbar-layer_location-${n.location}`
|
|
470
|
+
]), me = p(
|
|
471
|
+
() => n.transition ?? {
|
|
472
|
+
name: n.location.startsWith("top") ? "slide-y" : "slide-y-reverse",
|
|
473
|
+
appear: !0,
|
|
474
|
+
duration: 240,
|
|
475
|
+
leaveDuration: 180,
|
|
476
|
+
distance: "16px"
|
|
477
|
+
}
|
|
478
|
+
);
|
|
479
|
+
function M(m) {
|
|
480
|
+
u.value || (a.value = m), c("update:modelValue", m);
|
|
481
|
+
}
|
|
482
|
+
function O() {
|
|
483
|
+
i.value !== void 0 && (window.clearTimeout(i.value), i.value = void 0);
|
|
484
|
+
}
|
|
485
|
+
function q() {
|
|
486
|
+
O(), !(!f.value || n.persistent || n.timeout <= 0) && (i.value = window.setTimeout(() => {
|
|
487
|
+
R("timeout");
|
|
488
|
+
}, n.timeout));
|
|
489
|
+
}
|
|
490
|
+
function R(m = "manual") {
|
|
491
|
+
s.value = m, O(), M(!1), c("close", m);
|
|
492
|
+
}
|
|
493
|
+
function ve() {
|
|
494
|
+
var m, V;
|
|
495
|
+
c("action", (m = n.action) == null ? void 0 : m.value), (((V = n.action) == null ? void 0 : V.closeOnClick) ?? n.closeOnAction) && R("action");
|
|
496
|
+
}
|
|
497
|
+
function ge() {
|
|
498
|
+
n.pauseOnHover && O();
|
|
499
|
+
}
|
|
500
|
+
function _e() {
|
|
501
|
+
n.pauseOnHover && q();
|
|
502
|
+
}
|
|
503
|
+
ke(f, (m) => {
|
|
504
|
+
if (!m) {
|
|
505
|
+
O();
|
|
506
|
+
return;
|
|
507
|
+
}
|
|
508
|
+
q();
|
|
509
|
+
}), q(), he(() => {
|
|
510
|
+
O();
|
|
511
|
+
});
|
|
512
|
+
function ye() {
|
|
513
|
+
c("after-close", s.value);
|
|
514
|
+
}
|
|
515
|
+
return t({
|
|
516
|
+
open: () => M(!0),
|
|
517
|
+
close: R
|
|
518
|
+
}), (m, V) => (v(), y("div", {
|
|
519
|
+
class: b(["g-snackbar-layer", pe.value]),
|
|
520
|
+
style: T(de.value)
|
|
521
|
+
}, [
|
|
522
|
+
W(d(Ne), {
|
|
523
|
+
transition: me.value,
|
|
524
|
+
onAfterLeave: ye
|
|
525
|
+
}, {
|
|
526
|
+
default: ee(() => [
|
|
527
|
+
f.value ? (v(), y("section", {
|
|
528
|
+
key: 0,
|
|
529
|
+
class: b(["g-snackbar", fe.value]),
|
|
530
|
+
style: T(ue.value),
|
|
531
|
+
role: "status",
|
|
532
|
+
"aria-live": "polite",
|
|
533
|
+
onMouseenter: ge,
|
|
534
|
+
onMouseleave: _e
|
|
535
|
+
}, [
|
|
536
|
+
S("span", {
|
|
537
|
+
class: b(d(w))
|
|
538
|
+
}, null, 2),
|
|
539
|
+
S("span", {
|
|
540
|
+
class: b(d(I))
|
|
541
|
+
}, null, 2),
|
|
542
|
+
S("div", {
|
|
543
|
+
class: b(["g-snackbar__content", d(j)])
|
|
544
|
+
}, [
|
|
545
|
+
r.prepend || n.icon ? (v(), y("div", st, [
|
|
546
|
+
h(m.$slots, "prepend", {}, () => [
|
|
547
|
+
n.icon ? (v(), G(Q, {
|
|
548
|
+
key: 0,
|
|
549
|
+
icon: n.icon,
|
|
550
|
+
size: "22"
|
|
551
|
+
}, null, 8, ["icon"])) : _("", !0)
|
|
552
|
+
], !0)
|
|
553
|
+
])) : _("", !0),
|
|
554
|
+
S("div", rt, [
|
|
555
|
+
r.title || n.title ? (v(), y("div", it, [
|
|
556
|
+
h(m.$slots, "title", {}, () => [
|
|
557
|
+
L(U(n.title), 1)
|
|
558
|
+
], !0)
|
|
559
|
+
])) : _("", !0),
|
|
560
|
+
r.default || n.text ? (v(), y("div", ct, [
|
|
561
|
+
h(m.$slots, "default", {}, () => [
|
|
562
|
+
L(U(n.text), 1)
|
|
563
|
+
], !0)
|
|
564
|
+
])) : _("", !0)
|
|
565
|
+
]),
|
|
566
|
+
r.action || z.value || n.closeable ? (v(), y("div", lt, [
|
|
567
|
+
h(m.$slots, "action", {
|
|
568
|
+
close: () => R("action")
|
|
569
|
+
}, () => [
|
|
570
|
+
z.value ? (v(), G(at, {
|
|
571
|
+
key: 0,
|
|
572
|
+
variant: "text",
|
|
573
|
+
size: "s",
|
|
574
|
+
label: z.value,
|
|
575
|
+
onClick: ve
|
|
576
|
+
}, null, 8, ["label"])) : _("", !0)
|
|
577
|
+
], !0),
|
|
578
|
+
n.closeable ? (v(), y("button", {
|
|
579
|
+
key: 0,
|
|
580
|
+
type: "button",
|
|
581
|
+
class: "g-snackbar__close",
|
|
582
|
+
"aria-label": "Close snackbar",
|
|
583
|
+
onClick: V[0] || (V[0] = (bt) => R("dismiss"))
|
|
584
|
+
}, [
|
|
585
|
+
W(Q, {
|
|
586
|
+
icon: "close",
|
|
587
|
+
size: "18"
|
|
588
|
+
})
|
|
589
|
+
])) : _("", !0)
|
|
590
|
+
])) : _("", !0)
|
|
591
|
+
], 2)
|
|
592
|
+
], 38)) : _("", !0)
|
|
593
|
+
]),
|
|
594
|
+
_: 3
|
|
595
|
+
}, 8, ["transition"])
|
|
596
|
+
], 6));
|
|
597
|
+
}
|
|
598
|
+
}), dt = /* @__PURE__ */ D(ut, [["__scopeId", "data-v-6d1d4bf9"]]), ft = "bottom-center", pt = "slide-y", B = /* @__PURE__ */ new Map();
|
|
599
|
+
let mt = 0;
|
|
600
|
+
function vt(e) {
|
|
601
|
+
return typeof e == "string" ? {
|
|
602
|
+
label: e
|
|
603
|
+
} : e;
|
|
604
|
+
}
|
|
605
|
+
function gt(e, t) {
|
|
606
|
+
return e === "fade" ? "fade" : e === "scale" ? "scale" : e === "slide-x" ? t.endsWith("right") ? "slide-x-reverse" : "slide-x" : t.startsWith("top") ? "slide-y" : "slide-y-reverse";
|
|
607
|
+
}
|
|
608
|
+
function _t() {
|
|
609
|
+
return P({
|
|
610
|
+
name: "GSnackbarHost",
|
|
611
|
+
props: {
|
|
612
|
+
items: {
|
|
613
|
+
type: Array,
|
|
614
|
+
required: !0
|
|
615
|
+
},
|
|
616
|
+
location: {
|
|
617
|
+
type: String,
|
|
618
|
+
required: !0
|
|
619
|
+
},
|
|
620
|
+
transition: {
|
|
621
|
+
type: String,
|
|
622
|
+
required: !0
|
|
623
|
+
},
|
|
624
|
+
close: {
|
|
625
|
+
type: Function,
|
|
626
|
+
required: !0
|
|
627
|
+
},
|
|
628
|
+
remove: {
|
|
629
|
+
type: Function,
|
|
630
|
+
required: !0
|
|
631
|
+
}
|
|
632
|
+
},
|
|
633
|
+
setup(e) {
|
|
634
|
+
return () => E(
|
|
635
|
+
"div",
|
|
636
|
+
{
|
|
637
|
+
class: [
|
|
638
|
+
"g-snackbar-stack",
|
|
639
|
+
`g-snackbar-stack_location-${e.location}`
|
|
640
|
+
]
|
|
641
|
+
},
|
|
642
|
+
[
|
|
643
|
+
E(
|
|
644
|
+
"div",
|
|
645
|
+
{
|
|
646
|
+
class: "g-snackbar-stack__items"
|
|
647
|
+
},
|
|
648
|
+
e.items.map(
|
|
649
|
+
(t) => E(dt, {
|
|
650
|
+
key: t.id,
|
|
651
|
+
...t,
|
|
652
|
+
modelValue: t.open,
|
|
653
|
+
position: "static",
|
|
654
|
+
transition: {
|
|
655
|
+
name: gt(
|
|
656
|
+
t.transition ?? e.transition,
|
|
657
|
+
t.location
|
|
658
|
+
),
|
|
659
|
+
appear: !0,
|
|
660
|
+
duration: 240,
|
|
661
|
+
leaveDuration: 180,
|
|
662
|
+
distance: "18px",
|
|
663
|
+
scale: 0.96
|
|
664
|
+
},
|
|
665
|
+
"onUpdate:modelValue": (o) => {
|
|
666
|
+
t.open = o;
|
|
667
|
+
},
|
|
668
|
+
onClose: (o) => e.close(t.id, o),
|
|
669
|
+
onAfterClose: () => e.remove(t.id)
|
|
670
|
+
})
|
|
671
|
+
)
|
|
672
|
+
)
|
|
673
|
+
]
|
|
674
|
+
);
|
|
675
|
+
}
|
|
676
|
+
});
|
|
677
|
+
}
|
|
678
|
+
function yt(e, t, o, n) {
|
|
679
|
+
const c = B.get(e);
|
|
680
|
+
if (c) return c;
|
|
681
|
+
const r = document.createElement("div");
|
|
682
|
+
r.className = "g-snackbar-stack__container", document.body.appendChild(r);
|
|
683
|
+
const i = Ce([]), a = ae(_t(), {
|
|
684
|
+
items: i,
|
|
685
|
+
location: e,
|
|
686
|
+
transition: t,
|
|
687
|
+
close: o,
|
|
688
|
+
remove: n
|
|
689
|
+
});
|
|
690
|
+
a.mount(r);
|
|
691
|
+
const s = {
|
|
692
|
+
app: a,
|
|
693
|
+
container: r,
|
|
694
|
+
items: i
|
|
695
|
+
};
|
|
696
|
+
return B.set(e, s), s;
|
|
697
|
+
}
|
|
698
|
+
function Bt() {
|
|
699
|
+
const e = te([]);
|
|
700
|
+
function t(r) {
|
|
701
|
+
for (const [i, a] of B.entries()) {
|
|
702
|
+
const s = a.items.findIndex((u) => u.id === r);
|
|
703
|
+
if (s !== -1) {
|
|
704
|
+
a.items.splice(s, 1), e.value = e.value.filter(
|
|
705
|
+
(u) => u.id !== r
|
|
706
|
+
), a.items.length || window.setTimeout(() => {
|
|
707
|
+
a.items.length || (a.app.unmount(), a.container.remove(), B.delete(i));
|
|
708
|
+
}, 220);
|
|
709
|
+
return;
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
function o(r, i = "manual") {
|
|
714
|
+
for (const a of B.values()) {
|
|
715
|
+
const s = a.items.find((u) => u.id === r);
|
|
716
|
+
if (s) {
|
|
717
|
+
s.open = !1;
|
|
718
|
+
return;
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
function n(r) {
|
|
723
|
+
const i = typeof r == "string" ? { text: r } : r, a = i.location ?? ft, s = i.transition ?? pt, u = ++mt, f = {
|
|
724
|
+
...i,
|
|
725
|
+
id: u,
|
|
726
|
+
open: !0,
|
|
727
|
+
location: a,
|
|
728
|
+
transition: s,
|
|
729
|
+
action: vt(i.action)
|
|
730
|
+
};
|
|
731
|
+
return yt(a, s, o, t).items.push(f), e.value = [...e.value, f], {
|
|
732
|
+
id: u,
|
|
733
|
+
close: (l = "manual") => {
|
|
734
|
+
o(u, l);
|
|
735
|
+
}
|
|
736
|
+
};
|
|
737
|
+
}
|
|
738
|
+
function c() {
|
|
739
|
+
for (const [r, i] of B.entries())
|
|
740
|
+
i.app.unmount(), i.container.remove(), B.delete(r);
|
|
741
|
+
e.value = [];
|
|
742
|
+
}
|
|
743
|
+
return ne(() => {
|
|
744
|
+
c();
|
|
745
|
+
}), {
|
|
746
|
+
show: n,
|
|
747
|
+
closeAll: c,
|
|
748
|
+
items: e
|
|
749
|
+
};
|
|
750
|
+
}
|
|
751
|
+
export {
|
|
752
|
+
Je as G,
|
|
753
|
+
at as _,
|
|
754
|
+
Q as a,
|
|
755
|
+
dt as b,
|
|
756
|
+
Bt as c,
|
|
757
|
+
Qe as d,
|
|
758
|
+
Xe as e,
|
|
759
|
+
F as f,
|
|
760
|
+
Ye as g,
|
|
761
|
+
le as m,
|
|
762
|
+
$t as u
|
|
763
|
+
};
|