@gradient-ui/core 0.2.1 → 0.4.1
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 +58 -2
- package/dist/GLoading.vue_vue_type_style_index_0_lang-Bv3dWEq8.cjs +1 -0
- package/dist/GLoading.vue_vue_type_style_index_0_lang-CBB_GocW.js +466 -0
- package/dist/GSwitch.vue_vue_type_script_setup_true_lang-BS6bb1XY.cjs +1 -0
- package/dist/GSwitch.vue_vue_type_script_setup_true_lang-UTBNFP5X.js +7015 -0
- package/dist/{default-585QCoXx.js → camelToKebabCase-6qY6WHvl.js} +987 -1194
- package/dist/camelToKebabCase-BQDotaQm.cjs +316 -0
- package/dist/components.cjs +1 -1
- package/dist/components.mjs +55 -51
- package/dist/default-BhuY-A3o.cjs +4 -0
- package/dist/default-OTmCd0Aq.js +131 -0
- package/dist/directives.cjs +1 -1
- package/dist/directives.mjs +6 -5
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +184 -110
- package/dist/mask-BbofdFd4.cjs +1 -0
- package/dist/mask-CZX-I_iy.js +936 -0
- package/dist/material-Ca7ZZAiO.cjs +194 -0
- package/dist/material-okvXHenb.js +1162 -0
- package/dist/materialSurface-BBrP9ltj.js +591 -0
- package/dist/materialSurface-CK8LN_dU.cjs +1 -0
- package/dist/services.cjs +1 -1
- package/dist/services.mjs +1 -1
- package/dist/style.css +1 -1
- package/dist/surface-8z3gR7vF.cjs +1 -0
- package/dist/surface-BKu4KfkY.js +288 -0
- package/dist/theme.cjs +1 -1
- package/dist/theme.mjs +55 -9
- package/dist/types/components/index.d.ts +5 -1
- package/dist/types/components/ui/BaseOverlay/BaseOverlay.vue.d.ts +1 -1
- package/dist/types/components/ui/GAlert/GAlert.vue.d.ts +675 -9
- package/dist/types/components/ui/GAlert/types.d.ts +352 -4
- package/dist/types/components/ui/GAside/GAside.vue.d.ts +7 -5
- package/dist/types/components/ui/GAside/types.d.ts +17 -6
- package/dist/types/components/ui/GBadge/GBadge.vue.d.ts +679 -13
- package/dist/types/components/ui/GBadge/types.d.ts +350 -3
- package/dist/types/components/ui/GButton/GButton.vue.d.ts +357 -27
- package/dist/types/components/ui/GButton/types.d.ts +230 -49
- package/dist/types/components/ui/GCheckControl/GCheckControl.vue.d.ts +24 -24
- package/dist/types/components/ui/GCheckControl/GCheckGroup.vue.d.ts +24 -24
- package/dist/types/components/ui/GCheckbox/GCheckbox.vue.d.ts +24 -24
- package/dist/types/components/ui/GChip/GChip.vue.d.ts +295 -25
- package/dist/types/components/ui/GChip/types.d.ts +188 -43
- package/dist/types/components/ui/GDrawer/GDrawer.vue.d.ts +1 -1
- package/dist/types/components/ui/GExpansion/GExpansion.vue.d.ts +47 -13
- package/dist/types/components/ui/GExpansion/types.d.ts +284 -22
- package/dist/types/components/ui/GFAB/GFAB.vue.d.ts +220 -7
- package/dist/types/components/ui/GFAB/types.d.ts +122 -3
- package/dist/types/components/ui/GFieldBase/GFieldBase.vue.d.ts +15 -15
- package/dist/types/components/ui/GFieldBase/props.d.ts +10 -10
- package/dist/types/components/ui/GForm/GForm.vue.d.ts +156 -0
- package/dist/types/components/ui/GForm/index.d.ts +2 -0
- package/dist/types/components/ui/GForm/types.d.ts +107 -0
- package/dist/types/components/ui/GGradient/GGradient.vue.d.ts +165 -66
- package/dist/types/components/ui/GGradient/GGradientBorderLayer.vue.d.ts +11 -0
- package/dist/types/components/ui/GGradient/index.d.ts +1 -0
- package/dist/types/components/ui/GGradient/types.d.ts +10 -1
- package/dist/types/components/ui/GGradientMaterial/GGradientMaterial.vue.d.ts +257 -0
- package/dist/types/components/ui/GGradientMaterial/index.d.ts +2 -0
- package/dist/types/components/ui/GGradientMaterial/types.d.ts +140 -0
- package/dist/types/components/ui/GInput/GInput.vue.d.ts +15 -15
- package/dist/types/components/ui/GLoading/GLoading.vue.d.ts +5 -5
- package/dist/types/components/ui/GLoading/types.d.ts +3 -2
- package/dist/types/components/ui/GMenu/GSubmenu.vue.d.ts +14 -14
- package/dist/types/components/ui/GMenuItem/GMenuItem.vue.d.ts +11 -11
- package/dist/types/components/ui/GMenuItem/types.d.ts +4 -4
- package/dist/types/components/ui/GModal/GModal.vue.d.ts +1 -1
- package/dist/types/components/ui/GNavList/GNavList.vue.d.ts +7 -5
- package/dist/types/components/ui/GNavList/types.d.ts +17 -6
- package/dist/types/components/ui/GNavbar/GNavbar.vue.d.ts +4 -4
- package/dist/types/components/ui/GNavbar/GNavbarItem.vue.d.ts +3 -3
- package/dist/types/components/ui/GNavbar/GNavbarMenu.vue.d.ts +3 -3
- package/dist/types/components/ui/GNavbar/types.d.ts +6 -6
- package/dist/types/components/ui/GProgress/GProgress.vue.d.ts +41 -20
- package/dist/types/components/ui/GProgress/types.d.ts +23 -10
- package/dist/types/components/ui/GQuickActions/GQuickActions.vue.d.ts +1 -1
- package/dist/types/components/ui/GSelectItem.vue.d.ts +5 -3
- package/dist/types/components/ui/GSnackbar/GSnackbar.vue.d.ts +681 -15
- package/dist/types/components/ui/GSnackbar/types.d.ts +350 -3
- package/dist/types/components/ui/GSquircle/GSquircle.vue.d.ts +2 -2
- package/dist/types/components/ui/GSquircle/types.d.ts +8 -2
- package/dist/types/components/ui/GSwitch/GSwitch.vue.d.ts +24 -24
- package/dist/types/components/ui/GTable/GTable.vue.d.ts +191 -0
- package/dist/types/components/ui/GTable/GTableBody.vue.d.ts +69 -0
- package/dist/types/components/ui/GTable/GTableCell.vue.d.ts +35 -0
- package/dist/types/components/ui/GTable/GTableExpandedRow.vue.d.ts +25 -0
- package/dist/types/components/ui/GTable/GTableHead.vue.d.ts +30 -0
- package/dist/types/components/ui/GTable/GTableRow.vue.d.ts +40 -0
- package/dist/types/components/ui/GTable/context.d.ts +25 -0
- package/dist/types/components/ui/GTable/index.d.ts +3 -0
- package/dist/types/components/ui/GTable/types.d.ts +666 -0
- package/dist/types/components/ui/GTable/useTable.d.ts +22 -0
- package/dist/types/components/ui/GTable/useTableExpansion.d.ts +17 -0
- package/dist/types/components/ui/GTable/useTableSpans.d.ts +12 -0
- package/dist/types/components/ui/GTabs/GTabs.vue.d.ts +4 -4
- package/dist/types/components/ui/GTabs/types.d.ts +6 -6
- package/dist/types/components/ui/GTextarea/GTextarea.vue.d.ts +15 -15
- package/dist/types/components/ui/GToggleButton/GToggleButton.vue.d.ts +490 -16
- package/dist/types/components/ui/GToggleButton/types.d.ts +284 -32
- package/dist/types/directives/index.d.ts +2 -0
- package/dist/types/directives/ripple.d.ts +1 -1
- package/dist/types/directives/specular.d.ts +34 -0
- package/dist/types/theme/color.d.ts +11 -0
- package/dist/types/theme/colorSeeds.d.ts +21 -20
- package/dist/types/theme/colorSystem.d.ts +12 -0
- package/dist/types/theme/cssTokens.d.ts +7 -0
- package/dist/types/theme/default.d.ts +26 -80
- package/dist/types/theme/gradient/animation/css.d.ts +12 -0
- package/dist/types/theme/gradient/animation/index.d.ts +1 -0
- package/dist/types/theme/gradient/colorMath.d.ts +3 -0
- package/dist/types/theme/gradient/constants.d.ts +3 -0
- package/dist/types/theme/gradient/core.d.ts +1 -0
- package/dist/types/theme/gradient/effects/index.d.ts +1 -0
- package/dist/types/theme/gradient/effects/morph.d.ts +5 -0
- package/dist/types/theme/gradient/effects/shadow.d.ts +3 -0
- package/dist/types/theme/gradient/formatters/canvas.d.ts +2 -0
- package/dist/types/theme/gradient/formatters/css.d.ts +3 -0
- package/dist/types/theme/gradient/formatters/index.d.ts +1 -0
- package/dist/types/theme/gradient/formatters/svg.d.ts +5 -0
- package/dist/types/theme/gradient/index.d.ts +1 -0
- package/dist/types/theme/gradient/material.d.ts +1 -0
- package/dist/types/theme/gradient/model.d.ts +5 -0
- package/dist/types/theme/gradient/presets.d.ts +158 -0
- package/dist/types/theme/gradient/recipes.d.ts +14 -0
- package/dist/types/theme/gradient/tokens.d.ts +72 -0
- package/dist/types/theme/gradient/types.d.ts +117 -0
- package/dist/types/theme/gradient/utils.d.ts +10 -0
- package/dist/types/theme/gradient.d.ts +1 -0
- package/dist/types/theme/index.d.ts +12 -1
- package/dist/types/theme/palette.d.ts +13 -0
- package/dist/types/theme/scheme.d.ts +2 -0
- package/dist/types/theme/types.d.ts +11 -0
- package/dist/types/use/actionSurface.d.ts +1742 -20
- package/dist/types/use/check/booleanControl.d.ts +9 -9
- package/dist/types/use/check/optionGroup.d.ts +9 -7
- package/dist/types/use/check/types.d.ts +26 -26
- package/dist/types/use/color.d.ts +2 -2
- package/dist/types/use/colorResolver.d.ts +15 -5
- package/dist/types/use/form/context.d.ts +8 -0
- package/dist/types/use/form/control.d.ts +4 -0
- package/dist/types/use/form/props.d.ts +4 -4
- package/dist/types/use/form/textFieldControl.d.ts +1 -1
- package/dist/types/use/glass.d.ts +24 -0
- package/dist/types/use/gradient.d.ts +1759 -43
- package/dist/types/use/gradientGlow.d.ts +4 -4
- package/dist/types/use/gradientMaterial.d.ts +21 -0
- package/dist/types/use/gradientRuntime.d.ts +11 -0
- package/dist/types/use/gradientRuntimeRegistry.d.ts +8 -0
- package/dist/types/use/gradientSurface.d.ts +31 -4
- package/dist/types/use/index.d.ts +9 -0
- package/dist/types/use/input/props.d.ts +11 -11
- package/dist/types/use/material.d.ts +112 -0
- package/dist/types/use/materialSurface.d.ts +376 -0
- package/dist/types/use/surface.d.ts +67 -19
- package/dist/types/use/surfaceColor.d.ts +1 -1
- package/dist/types/use/tagName.d.ts +47 -0
- package/dist/types/use/textarea/props.d.ts +11 -11
- package/dist/types/use/variant.d.ts +1 -1
- package/dist/use.cjs +1 -1
- package/dist/use.mjs +42 -19
- package/dist/useSnackbar-BHQshEZ8.cjs +1 -0
- package/dist/useSnackbar-DeNHZH8v.js +908 -0
- package/package.json +11 -4
- package/dist/GLoading.vue_vue_type_style_index_0_lang-CqbeZChH.cjs +0 -1
- package/dist/GLoading.vue_vue_type_style_index_0_lang-DDqJEYGf.js +0 -691
- package/dist/GSwitch.vue_vue_type_script_setup_true_lang-DVKJZfcV.cjs +0 -4
- package/dist/GSwitch.vue_vue_type_script_setup_true_lang-hL_S3ZHD.js +0 -5633
- package/dist/camelToKebabCase-BAESShJ1.cjs +0 -1
- package/dist/camelToKebabCase-KgkZ7-1F.js +0 -28
- package/dist/default-BcPApP1Q.cjs +0 -318
- package/dist/icon-0-mbYGMr.cjs +0 -1
- package/dist/icon-BrFRYYf3.js +0 -66
- package/dist/mask-BgaDaVWU.js +0 -816
- package/dist/mask-pzGv8apS.cjs +0 -1
- package/dist/types/theme/changeTone.d.ts +0 -1
- package/dist/types/theme/colorPallete.d.ts +0 -2
- package/dist/types/theme/generateColors.d.ts +0 -1
- package/dist/types/theme/generateGradient.d.ts +0 -9
- package/dist/types/theme/getComplementaryColor.d.ts +0 -1
- package/dist/types/utils/color.d.ts +0 -3
- package/dist/types/utils/colors/normaliseColor.d.ts +0 -5
- package/dist/useSnackbar-CFrWSpt4.cjs +0 -1
- package/dist/useSnackbar-lGrTDbl-.js +0 -763
|
@@ -1,691 +0,0 @@
|
|
|
1
|
-
import { computed as a, toValue as p, ref as B, onMounted as j, onBeforeUnmount as F, defineComponent as V, useAttrs as ae, TransitionGroup as se, Transition as ie, openBlock as y, createBlock as H, resolveDynamicComponent as le, mergeProps as ce, unref as w, withCtx as I, renderSlot as A, createElementBlock as h, normalizeStyle as O, normalizeClass as k, createTextVNode as U, toDisplayString as W, createCommentVNode as E, createElementVNode as f, Fragment as ue, renderList as de, createVNode as ge } from "vue";
|
|
2
|
-
import "@mdi/js";
|
|
3
|
-
import { M as ve, c as fe } from "./camelToKebabCase-KgkZ7-1F.js";
|
|
4
|
-
const pe = (e, t) => {
|
|
5
|
-
const r = e.__vccOpts || e;
|
|
6
|
-
for (const [o, s] of t)
|
|
7
|
-
r[o] = s;
|
|
8
|
-
return r;
|
|
9
|
-
};
|
|
10
|
-
function g(e, t) {
|
|
11
|
-
return (r) => {
|
|
12
|
-
const o = {};
|
|
13
|
-
for (const s in e) {
|
|
14
|
-
const i = typeof e[s] == "object" && e[s] !== null && !Array.isArray(e[s]) ? { ...e[s] } : { type: e[s] };
|
|
15
|
-
r && s in r && (i.default = r[s]), t && !i.source && (i.source = t), o[s] = i;
|
|
16
|
-
}
|
|
17
|
-
return o;
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
const me = g({
|
|
21
|
-
disabled: Boolean
|
|
22
|
-
});
|
|
23
|
-
function ye(e, t) {
|
|
24
|
-
return a(() => e.disabled ? `${t}_disabled` : "");
|
|
25
|
-
}
|
|
26
|
-
const K = g({
|
|
27
|
-
rounded: Boolean
|
|
28
|
-
});
|
|
29
|
-
function _e(e, t) {
|
|
30
|
-
return a(() => e.rounded ? `${t}_rounded` : "");
|
|
31
|
-
}
|
|
32
|
-
const be = g({
|
|
33
|
-
size: {
|
|
34
|
-
type: String,
|
|
35
|
-
default: "m"
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
function et(e, t) {
|
|
39
|
-
return a(() => `${t}_${e.size}`);
|
|
40
|
-
}
|
|
41
|
-
const S = ke();
|
|
42
|
-
function Se(e) {
|
|
43
|
-
var t;
|
|
44
|
-
return e ? ((t = S[e]) == null ? void 0 : t.color) ?? e : S.primary.color;
|
|
45
|
-
}
|
|
46
|
-
function Ce(e) {
|
|
47
|
-
var t;
|
|
48
|
-
return e ? ((t = S[e]) == null ? void 0 : t.onColor) ?? S.primary.onColor : S.primary.onColor;
|
|
49
|
-
}
|
|
50
|
-
function he(e) {
|
|
51
|
-
var t;
|
|
52
|
-
return e ? ((t = S[e]) == null ? void 0 : t.gradient) ?? `var(--g-gradient-${e})` : S.primary.gradient;
|
|
53
|
-
}
|
|
54
|
-
function $e(e) {
|
|
55
|
-
return a(() => he(p(e)));
|
|
56
|
-
}
|
|
57
|
-
function ke() {
|
|
58
|
-
const e = {
|
|
59
|
-
primary: {
|
|
60
|
-
color: "var(--g-token-color-primary)",
|
|
61
|
-
onColor: "var(--g-token-color-on-primary)",
|
|
62
|
-
gradient: "var(--g-gradient-main)"
|
|
63
|
-
},
|
|
64
|
-
main: {
|
|
65
|
-
color: "var(--g-token-color-primary)",
|
|
66
|
-
onColor: "var(--g-token-color-on-primary)",
|
|
67
|
-
gradient: "var(--g-gradient-main)"
|
|
68
|
-
},
|
|
69
|
-
error: {
|
|
70
|
-
color: "var(--g-token-color-error)",
|
|
71
|
-
onColor: "var(--g-token-color-on-error)",
|
|
72
|
-
gradient: "var(--g-gradient-error)"
|
|
73
|
-
},
|
|
74
|
-
warning: {
|
|
75
|
-
color: "var(--g-token-color-warning)",
|
|
76
|
-
onColor: "var(--g-token-color-on-warning)",
|
|
77
|
-
gradient: "var(--g-gradient-warning)"
|
|
78
|
-
},
|
|
79
|
-
success: {
|
|
80
|
-
color: "var(--g-token-color-success)",
|
|
81
|
-
onColor: "var(--g-token-color-on-success)",
|
|
82
|
-
gradient: "var(--g-gradient-success)"
|
|
83
|
-
},
|
|
84
|
-
surface: {
|
|
85
|
-
color: "var(--g-token-color-surface)",
|
|
86
|
-
onColor: "var(--g-token-color-on-surface)",
|
|
87
|
-
gradient: "var(--g-gradient-source-40)"
|
|
88
|
-
},
|
|
89
|
-
"on-surface": {
|
|
90
|
-
color: "var(--g-token-color-on-surface)",
|
|
91
|
-
onColor: "var(--g-token-color-surface)",
|
|
92
|
-
gradient: "var(--g-gradient-source-40)"
|
|
93
|
-
},
|
|
94
|
-
source: {
|
|
95
|
-
color: "rgb(var(--g-color-source-40))",
|
|
96
|
-
onColor: "rgb(var(--g-color-on-source-40))",
|
|
97
|
-
gradient: "var(--g-gradient-source-40)"
|
|
98
|
-
}
|
|
99
|
-
};
|
|
100
|
-
return z(e, "source"), Object.keys(ve).forEach((t) => {
|
|
101
|
-
z(e, t);
|
|
102
|
-
}), e;
|
|
103
|
-
}
|
|
104
|
-
function z(e, t) {
|
|
105
|
-
const r = fe(t);
|
|
106
|
-
for (let o = 10; o <= 100; o += 10) {
|
|
107
|
-
const s = {
|
|
108
|
-
color: `rgb(var(--g-color-${r}-${o}))`,
|
|
109
|
-
onColor: `rgb(var(--g-color-on-${r}-${o}))`,
|
|
110
|
-
gradient: `var(--g-gradient-${r}-${o})`
|
|
111
|
-
};
|
|
112
|
-
e[`${t}${o}`] = s, e[`${r}${o}`] = s, e[`${r}-${o}`] = s;
|
|
113
|
-
}
|
|
114
|
-
e[t] = e[`${t}40`], e[r] = e[`${r}40`];
|
|
115
|
-
}
|
|
116
|
-
const J = g({
|
|
117
|
-
color: {
|
|
118
|
-
type: String,
|
|
119
|
-
default: "primary"
|
|
120
|
-
}
|
|
121
|
-
});
|
|
122
|
-
function we(e) {
|
|
123
|
-
return {
|
|
124
|
-
colorStyles: a(() => {
|
|
125
|
-
const r = p(e.color);
|
|
126
|
-
return {
|
|
127
|
-
"--g-color": Se(r),
|
|
128
|
-
"--g-on-color": Ce(r),
|
|
129
|
-
"--g-surface-color": "var(--g-token-color-surface)",
|
|
130
|
-
"--g-on-surface-color": "var(--g-token-color-on-surface)"
|
|
131
|
-
};
|
|
132
|
-
})
|
|
133
|
-
};
|
|
134
|
-
}
|
|
135
|
-
function Q(e) {
|
|
136
|
-
const t = a(() => {
|
|
137
|
-
const i = p(e.activeState);
|
|
138
|
-
return p(e.active) && i !== void 0 ? i : p(e.state);
|
|
139
|
-
}), r = a(() => {
|
|
140
|
-
const i = t.value;
|
|
141
|
-
if (i)
|
|
142
|
-
return i;
|
|
143
|
-
const l = p(e.activeColor);
|
|
144
|
-
return p(e.active) && l !== void 0 ? l : p(e.color);
|
|
145
|
-
}), { colorStyles: o } = we({ color: r }), s = $e(r), c = a(
|
|
146
|
-
() => ({
|
|
147
|
-
...o.value,
|
|
148
|
-
"--g-gradient-current": s.value
|
|
149
|
-
})
|
|
150
|
-
);
|
|
151
|
-
return {
|
|
152
|
-
resolvedColor: r,
|
|
153
|
-
resolvedState: t,
|
|
154
|
-
resolvedGradient: s,
|
|
155
|
-
colorStyles: o,
|
|
156
|
-
surfaceColorStyles: o,
|
|
157
|
-
gradientStyles: c
|
|
158
|
-
};
|
|
159
|
-
}
|
|
160
|
-
const xe = {
|
|
161
|
-
fade: "g-fade-transition",
|
|
162
|
-
scale: "g-scale-transition",
|
|
163
|
-
"scale-only": "g-scale-only-transition",
|
|
164
|
-
"slide-x": "g-slide-x-transition",
|
|
165
|
-
"slide-x-reverse": "g-slide-x-reverse-transition",
|
|
166
|
-
"slide-y": "g-slide-y-transition",
|
|
167
|
-
"slide-y-reverse": "g-slide-y-reverse-transition",
|
|
168
|
-
dialog: "g-dialog-transition",
|
|
169
|
-
overlay: "g-overlay-transition",
|
|
170
|
-
expand: "g-expand-transition"
|
|
171
|
-
}, X = g(
|
|
172
|
-
{
|
|
173
|
-
transition: {
|
|
174
|
-
type: [Boolean, String, Object],
|
|
175
|
-
default: void 0
|
|
176
|
-
}
|
|
177
|
-
},
|
|
178
|
-
"transition"
|
|
179
|
-
), Le = g(
|
|
180
|
-
{
|
|
181
|
-
...X(),
|
|
182
|
-
name: String,
|
|
183
|
-
appear: Boolean,
|
|
184
|
-
disabled: Boolean,
|
|
185
|
-
group: Boolean,
|
|
186
|
-
tag: String,
|
|
187
|
-
mode: String,
|
|
188
|
-
origin: String,
|
|
189
|
-
duration: [Number, String],
|
|
190
|
-
enterDuration: [Number, String],
|
|
191
|
-
leaveDuration: [Number, String],
|
|
192
|
-
easing: String,
|
|
193
|
-
enterEasing: String,
|
|
194
|
-
leaveEasing: String,
|
|
195
|
-
distance: [Number, String],
|
|
196
|
-
scale: [Number, String],
|
|
197
|
-
opacity: {
|
|
198
|
-
type: Boolean,
|
|
199
|
-
default: void 0
|
|
200
|
-
},
|
|
201
|
-
leaveAbsolute: Boolean,
|
|
202
|
-
hideOnLeave: Boolean,
|
|
203
|
-
css: {
|
|
204
|
-
type: Boolean,
|
|
205
|
-
default: !0
|
|
206
|
-
}
|
|
207
|
-
},
|
|
208
|
-
"transition"
|
|
209
|
-
);
|
|
210
|
-
function Te(e) {
|
|
211
|
-
return e ? xe[e] ?? e : "";
|
|
212
|
-
}
|
|
213
|
-
function De(e) {
|
|
214
|
-
if (!(e === void 0 || e === ""))
|
|
215
|
-
return typeof e == "number" ? `${e}px` : e;
|
|
216
|
-
}
|
|
217
|
-
function R(e) {
|
|
218
|
-
if (!(e === void 0 || e === ""))
|
|
219
|
-
return typeof e == "number" ? `${e}ms` : e;
|
|
220
|
-
}
|
|
221
|
-
function G(e, t) {
|
|
222
|
-
if (e === void 0 || e === "") return t;
|
|
223
|
-
if (typeof e == "number") return e;
|
|
224
|
-
const r = e.trim();
|
|
225
|
-
if (r.endsWith("ms"))
|
|
226
|
-
return Number.parseFloat(r);
|
|
227
|
-
if (r.endsWith("s"))
|
|
228
|
-
return Number.parseFloat(r) * 1e3;
|
|
229
|
-
const o = Number.parseFloat(r);
|
|
230
|
-
return Number.isNaN(o) ? t : o;
|
|
231
|
-
}
|
|
232
|
-
function Be(e, t) {
|
|
233
|
-
return e === !1 ? {
|
|
234
|
-
...t,
|
|
235
|
-
disabled: !0
|
|
236
|
-
} : e === !0 || e === void 0 ? t : typeof e == "string" ? {
|
|
237
|
-
...t,
|
|
238
|
-
name: e
|
|
239
|
-
} : {
|
|
240
|
-
...t,
|
|
241
|
-
...e
|
|
242
|
-
};
|
|
243
|
-
}
|
|
244
|
-
function Ee() {
|
|
245
|
-
const e = B(!1);
|
|
246
|
-
let t = null;
|
|
247
|
-
const r = () => {
|
|
248
|
-
e.value = (t == null ? void 0 : t.matches) ?? !1;
|
|
249
|
-
};
|
|
250
|
-
return j(() => {
|
|
251
|
-
typeof window > "u" || !window.matchMedia || (t = window.matchMedia("(prefers-reduced-motion: reduce)"), r(), t.addEventListener("change", r));
|
|
252
|
-
}), F(() => {
|
|
253
|
-
t == null || t.removeEventListener("change", r);
|
|
254
|
-
}), e;
|
|
255
|
-
}
|
|
256
|
-
const Me = 80, Pe = /* @__PURE__ */ V({
|
|
257
|
-
inheritAttrs: !1,
|
|
258
|
-
__name: "GTransition",
|
|
259
|
-
props: Le({
|
|
260
|
-
name: "fade",
|
|
261
|
-
css: !0
|
|
262
|
-
}),
|
|
263
|
-
emits: ["before-enter", "after-enter", "before-leave", "leave", "after-leave", "enter-cancelled", "leave-cancelled"],
|
|
264
|
-
setup(e, { emit: t }) {
|
|
265
|
-
const r = e, o = t, s = ae(), c = Ee(), i = a(
|
|
266
|
-
() => r.group ? se : ie
|
|
267
|
-
), l = a(
|
|
268
|
-
() => Be(r.transition, M.value)
|
|
269
|
-
), _ = a(
|
|
270
|
-
() => b.value ? "" : Te(l.value.name)
|
|
271
|
-
), b = a(
|
|
272
|
-
() => r.disabled || c.value || l.value.disabled
|
|
273
|
-
), $ = a(
|
|
274
|
-
() => r.group || l.value.mode === "default" ? void 0 : l.value.mode
|
|
275
|
-
), C = a(
|
|
276
|
-
() => !b.value && l.value.css !== !1
|
|
277
|
-
), u = a(() => {
|
|
278
|
-
if (!x.value || b.value) return;
|
|
279
|
-
const n = l.value;
|
|
280
|
-
return {
|
|
281
|
-
enter: G(
|
|
282
|
-
n.enterDuration ?? n.duration,
|
|
283
|
-
220
|
|
284
|
-
),
|
|
285
|
-
leave: G(
|
|
286
|
-
n.leaveDuration ?? n.duration,
|
|
287
|
-
180
|
|
288
|
-
) + Me
|
|
289
|
-
};
|
|
290
|
-
}), x = a(
|
|
291
|
-
() => l.value.name === "overlay" || _.value === "g-overlay-transition"
|
|
292
|
-
), M = a(() => ({
|
|
293
|
-
name: r.name,
|
|
294
|
-
appear: r.appear,
|
|
295
|
-
mode: r.mode,
|
|
296
|
-
origin: r.origin,
|
|
297
|
-
duration: r.duration,
|
|
298
|
-
enterDuration: r.enterDuration,
|
|
299
|
-
leaveDuration: r.leaveDuration,
|
|
300
|
-
easing: r.easing,
|
|
301
|
-
enterEasing: r.enterEasing,
|
|
302
|
-
leaveEasing: r.leaveEasing,
|
|
303
|
-
distance: r.distance,
|
|
304
|
-
scale: r.scale,
|
|
305
|
-
opacity: r.opacity,
|
|
306
|
-
leaveAbsolute: r.leaveAbsolute,
|
|
307
|
-
hideOnLeave: r.hideOnLeave,
|
|
308
|
-
css: r.css
|
|
309
|
-
})), P = a(() => {
|
|
310
|
-
const n = l.value;
|
|
311
|
-
return {
|
|
312
|
-
"--g-transition-enter-duration": R(
|
|
313
|
-
n.enterDuration ?? n.duration
|
|
314
|
-
),
|
|
315
|
-
"--g-transition-leave-duration": R(
|
|
316
|
-
n.leaveDuration ?? n.duration
|
|
317
|
-
),
|
|
318
|
-
"--g-transition-enter-easing": n.enterEasing ?? n.easing,
|
|
319
|
-
"--g-transition-leave-easing": n.leaveEasing ?? n.easing,
|
|
320
|
-
"--g-transition-origin": n.origin,
|
|
321
|
-
"--g-transition-distance": De(n.distance),
|
|
322
|
-
"--g-transition-scale": n.scale === void 0 ? void 0 : String(n.scale),
|
|
323
|
-
"--g-transition-opacity-from": n.opacity === !1 ? "1" : void 0
|
|
324
|
-
};
|
|
325
|
-
});
|
|
326
|
-
function L(n) {
|
|
327
|
-
if (n instanceof HTMLElement)
|
|
328
|
-
for (const [d, D] of Object.entries(P.value))
|
|
329
|
-
D !== void 0 && n.style.setProperty(d, D);
|
|
330
|
-
}
|
|
331
|
-
function N(n) {
|
|
332
|
-
const { offsetTop: d, offsetLeft: D, offsetWidth: re, offsetHeight: oe } = n;
|
|
333
|
-
n._gTransitionInitialStyles = {
|
|
334
|
-
position: n.style.position,
|
|
335
|
-
top: n.style.top,
|
|
336
|
-
left: n.style.left,
|
|
337
|
-
width: n.style.width,
|
|
338
|
-
height: n.style.height,
|
|
339
|
-
display: n.style.display
|
|
340
|
-
}, n.style.position = "absolute", n.style.top = `${d}px`, n.style.left = `${D}px`, n.style.width = `${re}px`, n.style.height = `${oe}px`;
|
|
341
|
-
}
|
|
342
|
-
function v(n) {
|
|
343
|
-
const d = n._gTransitionInitialStyles;
|
|
344
|
-
d && (n.style.position = d.position, n.style.top = d.top, n.style.left = d.left, n.style.width = d.width, n.style.height = d.height, n.style.display = d.display, delete n._gTransitionInitialStyles);
|
|
345
|
-
}
|
|
346
|
-
function m(n) {
|
|
347
|
-
L(n), o("before-enter", n);
|
|
348
|
-
}
|
|
349
|
-
function T(n) {
|
|
350
|
-
o("after-enter", n);
|
|
351
|
-
}
|
|
352
|
-
function Z(n) {
|
|
353
|
-
L(n), o("before-leave", n);
|
|
354
|
-
}
|
|
355
|
-
function q(n) {
|
|
356
|
-
if (!(n instanceof HTMLElement)) {
|
|
357
|
-
o("leave", n);
|
|
358
|
-
return;
|
|
359
|
-
}
|
|
360
|
-
l.value.leaveAbsolute && N(n), l.value.hideOnLeave && n.style.setProperty("display", "none", "important"), o("leave", n);
|
|
361
|
-
}
|
|
362
|
-
function ee(n) {
|
|
363
|
-
n instanceof HTMLElement && v(n), o("after-leave", n);
|
|
364
|
-
}
|
|
365
|
-
function te(n) {
|
|
366
|
-
o("enter-cancelled", n);
|
|
367
|
-
}
|
|
368
|
-
function ne(n) {
|
|
369
|
-
n instanceof HTMLElement && v(n), o("leave-cancelled", n);
|
|
370
|
-
}
|
|
371
|
-
return (n, d) => (y(), H(le(i.value), ce(w(s), {
|
|
372
|
-
name: _.value,
|
|
373
|
-
css: C.value,
|
|
374
|
-
appear: l.value.appear,
|
|
375
|
-
duration: u.value,
|
|
376
|
-
mode: $.value,
|
|
377
|
-
tag: r.group ? r.tag : void 0,
|
|
378
|
-
onBeforeEnter: m,
|
|
379
|
-
onAfterEnter: T,
|
|
380
|
-
onBeforeLeave: Z,
|
|
381
|
-
onLeave: q,
|
|
382
|
-
onAfterLeave: ee,
|
|
383
|
-
onEnterCancelled: te,
|
|
384
|
-
onLeaveCancelled: ne
|
|
385
|
-
}), {
|
|
386
|
-
default: I(() => [
|
|
387
|
-
A(n.$slots, "default")
|
|
388
|
-
]),
|
|
389
|
-
_: 3
|
|
390
|
-
}, 16, ["name", "css", "appear", "duration", "mode", "tag"]));
|
|
391
|
-
}
|
|
392
|
-
}), Ne = (e) => a(() => {
|
|
393
|
-
const t = p(e);
|
|
394
|
-
return t === "" || t === null || t === void 0 ? "" : typeof t == "number" ? `${t}px` : /^\d+(\.\d+)?$/.test(t) ? `${t}px` : t;
|
|
395
|
-
}), Oe = g({
|
|
396
|
-
variant: {
|
|
397
|
-
type: String,
|
|
398
|
-
default: "filled"
|
|
399
|
-
}
|
|
400
|
-
});
|
|
401
|
-
function Ve(e, t) {
|
|
402
|
-
return a(() => `${t}_${e.variant}`);
|
|
403
|
-
}
|
|
404
|
-
const Y = g({
|
|
405
|
-
state: String
|
|
406
|
-
});
|
|
407
|
-
function Ae(e, t) {
|
|
408
|
-
return a(() => e.state ? `${t}_${e.state}` : "");
|
|
409
|
-
}
|
|
410
|
-
const tt = g({
|
|
411
|
-
...Oe(),
|
|
412
|
-
...J(),
|
|
413
|
-
...me(),
|
|
414
|
-
...K(),
|
|
415
|
-
...Y()
|
|
416
|
-
});
|
|
417
|
-
function nt(e, t) {
|
|
418
|
-
const r = Ve(e, t), o = ye(e, t), s = _e(e, t), c = Ae(e, t), { colorStyles: i } = Q(e), l = a(
|
|
419
|
-
() => [
|
|
420
|
-
r.value,
|
|
421
|
-
o.value,
|
|
422
|
-
s.value,
|
|
423
|
-
c.value
|
|
424
|
-
].filter(Boolean)
|
|
425
|
-
);
|
|
426
|
-
return {
|
|
427
|
-
variantClass: r,
|
|
428
|
-
disabledClass: o,
|
|
429
|
-
roundedClass: s,
|
|
430
|
-
stateClass: c,
|
|
431
|
-
surfaceStyles: i,
|
|
432
|
-
surfaceClasses: l
|
|
433
|
-
};
|
|
434
|
-
}
|
|
435
|
-
function ze(e) {
|
|
436
|
-
return {
|
|
437
|
-
surfaceUnderlayClasses: a(() => [
|
|
438
|
-
`${e}__surface-underlay`
|
|
439
|
-
])
|
|
440
|
-
};
|
|
441
|
-
}
|
|
442
|
-
function Re(e) {
|
|
443
|
-
return {
|
|
444
|
-
surfaceOverlayClasses: a(() => [
|
|
445
|
-
`${e}__surface-overlay`
|
|
446
|
-
])
|
|
447
|
-
};
|
|
448
|
-
}
|
|
449
|
-
function Ge(e) {
|
|
450
|
-
return {
|
|
451
|
-
surfaceContentClasses: a(() => [
|
|
452
|
-
`${e}__surface-content`
|
|
453
|
-
])
|
|
454
|
-
};
|
|
455
|
-
}
|
|
456
|
-
function je(e) {
|
|
457
|
-
return {
|
|
458
|
-
...ze(e),
|
|
459
|
-
...Re(e),
|
|
460
|
-
...Ge(e)
|
|
461
|
-
};
|
|
462
|
-
}
|
|
463
|
-
const Fe = g({
|
|
464
|
-
...J(),
|
|
465
|
-
...K(),
|
|
466
|
-
...be(),
|
|
467
|
-
...Y(),
|
|
468
|
-
modelValue: {
|
|
469
|
-
type: Number,
|
|
470
|
-
default: 0
|
|
471
|
-
},
|
|
472
|
-
indeterminate: Boolean,
|
|
473
|
-
noLabel: Boolean,
|
|
474
|
-
label: String,
|
|
475
|
-
labelAlign: {
|
|
476
|
-
type: String,
|
|
477
|
-
default: "center"
|
|
478
|
-
},
|
|
479
|
-
view: {
|
|
480
|
-
type: String,
|
|
481
|
-
default: "default"
|
|
482
|
-
},
|
|
483
|
-
segments: {
|
|
484
|
-
type: Number,
|
|
485
|
-
default: 12
|
|
486
|
-
}
|
|
487
|
-
}), He = {
|
|
488
|
-
key: 0,
|
|
489
|
-
class: "g-progress__label"
|
|
490
|
-
}, Ie = ["aria-valuenow", "aria-valuetext"], Ue = /* @__PURE__ */ V({
|
|
491
|
-
__name: "GProgress",
|
|
492
|
-
props: Fe({ color: "primary" }),
|
|
493
|
-
setup(e) {
|
|
494
|
-
const t = e, { gradientStyles: r } = Q(t), o = B(0), s = B(null);
|
|
495
|
-
let c;
|
|
496
|
-
const i = a(
|
|
497
|
-
() => Math.min(100, Math.max(0, t.modelValue))
|
|
498
|
-
), l = Ne(o), _ = a(
|
|
499
|
-
() => Math.max(2, Math.round(t.segments))
|
|
500
|
-
), b = a(
|
|
501
|
-
() => Array.from({ length: _.value - 1 }, (v, m) => m)
|
|
502
|
-
), $ = a(() => `${i.value}%`), C = a(
|
|
503
|
-
() => t.label ?? `${Math.round(i.value)}%`
|
|
504
|
-
), u = (v) => ({
|
|
505
|
-
"--g-progress-segment-position": `${(v + 1) / _.value * 100}%`
|
|
506
|
-
}), x = a(() => ({
|
|
507
|
-
...r.value,
|
|
508
|
-
"--g-progress-value": $.value,
|
|
509
|
-
"--g-progress-track-width": l.value
|
|
510
|
-
})), M = () => {
|
|
511
|
-
c = new ResizeObserver((v) => {
|
|
512
|
-
for (const m of v)
|
|
513
|
-
o.value = m.contentRect.width;
|
|
514
|
-
}), s.value && c.observe(s.value);
|
|
515
|
-
};
|
|
516
|
-
j(() => {
|
|
517
|
-
M();
|
|
518
|
-
}), F(() => {
|
|
519
|
-
c == null || c.disconnect();
|
|
520
|
-
});
|
|
521
|
-
const {
|
|
522
|
-
surfaceOverlayClasses: P,
|
|
523
|
-
surfaceUnderlayClasses: L,
|
|
524
|
-
surfaceContentClasses: N
|
|
525
|
-
} = je("g-progress");
|
|
526
|
-
return (v, m) => (y(), h("div", {
|
|
527
|
-
class: k(["g-progress", {
|
|
528
|
-
"g-progress_rounded": t.rounded,
|
|
529
|
-
"g-progress_indeterminate": t.indeterminate,
|
|
530
|
-
"g-progress_no-label": t.noLabel,
|
|
531
|
-
[`g-progress_${t.size}`]: !0,
|
|
532
|
-
[`g-progress_label-${t.labelAlign}`]: !0,
|
|
533
|
-
[`g-progress_view-${t.view}`]: !0
|
|
534
|
-
}]),
|
|
535
|
-
style: O(x.value)
|
|
536
|
-
}, [
|
|
537
|
-
t.noLabel ? E("", !0) : (y(), h("div", He, [
|
|
538
|
-
A(v.$slots, "default", {}, () => [
|
|
539
|
-
U(W(C.value), 1)
|
|
540
|
-
], !0)
|
|
541
|
-
])),
|
|
542
|
-
f("div", {
|
|
543
|
-
ref_key: "parentRef",
|
|
544
|
-
ref: s,
|
|
545
|
-
class: "g-progress__track",
|
|
546
|
-
role: "progressbar",
|
|
547
|
-
"aria-valuemin": 0,
|
|
548
|
-
"aria-valuemax": 100,
|
|
549
|
-
"aria-valuenow": t.indeterminate ? void 0 : i.value,
|
|
550
|
-
"aria-valuetext": t.indeterminate ? void 0 : C.value
|
|
551
|
-
}, [
|
|
552
|
-
f("span", {
|
|
553
|
-
class: k(w(L))
|
|
554
|
-
}, null, 2),
|
|
555
|
-
f("span", {
|
|
556
|
-
class: k(w(P))
|
|
557
|
-
}, null, 2),
|
|
558
|
-
f("div", {
|
|
559
|
-
class: k(["g-progress__surface-content", w(N)])
|
|
560
|
-
}, [...m[0] || (m[0] = [
|
|
561
|
-
f("div", { class: "g-progress__bar" }, [
|
|
562
|
-
f("div", { class: "g-progress__active" }, [
|
|
563
|
-
f("div", { class: "g-progress__overlay" })
|
|
564
|
-
])
|
|
565
|
-
], -1)
|
|
566
|
-
])], 2),
|
|
567
|
-
t.view === "segmented" ? (y(!0), h(ue, { key: 0 }, de(b.value, (T) => (y(), h("span", {
|
|
568
|
-
key: T,
|
|
569
|
-
class: "g-progress__segment-divider",
|
|
570
|
-
style: O(u(T))
|
|
571
|
-
}, null, 4))), 128)) : E("", !0)
|
|
572
|
-
], 8, Ie)
|
|
573
|
-
], 6));
|
|
574
|
-
}
|
|
575
|
-
}), We = /* @__PURE__ */ pe(Ue, [["__scopeId", "data-v-0140ebe7"]]), Ke = g({
|
|
576
|
-
...X(),
|
|
577
|
-
text: String,
|
|
578
|
-
noText: Boolean,
|
|
579
|
-
show: Boolean,
|
|
580
|
-
color: String,
|
|
581
|
-
dark: Boolean,
|
|
582
|
-
opacity: [Number, String],
|
|
583
|
-
blur: [Number, String],
|
|
584
|
-
progressView: String,
|
|
585
|
-
onClose: Function
|
|
586
|
-
}), Je = { class: "g-loading__body" }, Qe = {
|
|
587
|
-
key: 0,
|
|
588
|
-
class: "g-loading__text"
|
|
589
|
-
}, Xe = { class: "g-loading__progress" }, rt = /* @__PURE__ */ V({
|
|
590
|
-
__name: "GLoading",
|
|
591
|
-
props: Ke({
|
|
592
|
-
text: "Loading...",
|
|
593
|
-
noText: !1,
|
|
594
|
-
show: !1,
|
|
595
|
-
color: "primary",
|
|
596
|
-
dark: !1,
|
|
597
|
-
opacity: void 0,
|
|
598
|
-
blur: void 0,
|
|
599
|
-
progressView: "glow",
|
|
600
|
-
transition: () => ({ name: "fade", duration: 220 }),
|
|
601
|
-
onClose: void 0
|
|
602
|
-
}),
|
|
603
|
-
emits: ["close"],
|
|
604
|
-
setup(e, { expose: t, emit: r }) {
|
|
605
|
-
const o = e, s = r, c = B(!1), i = a(() => o.show || c.value), l = a(() => ({
|
|
606
|
-
"--g-loading-overlay-opacity": o.opacity !== void 0 ? String(o.opacity) : void 0,
|
|
607
|
-
"--g-loading-overlay-blur": o.blur !== void 0 ? _(o.blur) : void 0
|
|
608
|
-
}));
|
|
609
|
-
function _(u) {
|
|
610
|
-
return typeof u == "number" ? `${u}px` : u;
|
|
611
|
-
}
|
|
612
|
-
function b() {
|
|
613
|
-
c.value = !0;
|
|
614
|
-
}
|
|
615
|
-
function $() {
|
|
616
|
-
c.value = !1;
|
|
617
|
-
}
|
|
618
|
-
function C() {
|
|
619
|
-
var u;
|
|
620
|
-
(u = o.onClose) == null || u.call(o), s("close");
|
|
621
|
-
}
|
|
622
|
-
return t({
|
|
623
|
-
hide: $,
|
|
624
|
-
show: b,
|
|
625
|
-
isVisible: i
|
|
626
|
-
}), (u, x) => (y(), H(w(Pe), {
|
|
627
|
-
transition: o.transition,
|
|
628
|
-
name: "scale",
|
|
629
|
-
onAfterLeave: C
|
|
630
|
-
}, {
|
|
631
|
-
default: I(() => [
|
|
632
|
-
i.value ? (y(), h("div", {
|
|
633
|
-
key: 0,
|
|
634
|
-
class: k(["g-loading", { "g-loading_dark": o.dark }]),
|
|
635
|
-
style: O(l.value),
|
|
636
|
-
"aria-live": "polite",
|
|
637
|
-
"aria-busy": "true"
|
|
638
|
-
}, [
|
|
639
|
-
f("div", Je, [
|
|
640
|
-
o.noText ? E("", !0) : (y(), h("div", Qe, [
|
|
641
|
-
A(u.$slots, "default", {}, () => [
|
|
642
|
-
U(W(o.text), 1)
|
|
643
|
-
])
|
|
644
|
-
])),
|
|
645
|
-
f("div", Xe, [
|
|
646
|
-
ge(We, {
|
|
647
|
-
"no-label": "",
|
|
648
|
-
indeterminate: "",
|
|
649
|
-
"model-value": 100,
|
|
650
|
-
color: o.color,
|
|
651
|
-
view: o.progressView,
|
|
652
|
-
size: "s"
|
|
653
|
-
}, null, 8, ["color", "view"])
|
|
654
|
-
])
|
|
655
|
-
])
|
|
656
|
-
], 6)) : E("", !0)
|
|
657
|
-
]),
|
|
658
|
-
_: 3
|
|
659
|
-
}, 8, ["transition"]));
|
|
660
|
-
}
|
|
661
|
-
});
|
|
662
|
-
export {
|
|
663
|
-
We as G,
|
|
664
|
-
rt as _,
|
|
665
|
-
Pe as a,
|
|
666
|
-
Se as b,
|
|
667
|
-
pe as c,
|
|
668
|
-
Y as d,
|
|
669
|
-
me as e,
|
|
670
|
-
Ae as f,
|
|
671
|
-
Ne as g,
|
|
672
|
-
K as h,
|
|
673
|
-
Oe as i,
|
|
674
|
-
_e as j,
|
|
675
|
-
$e as k,
|
|
676
|
-
be as l,
|
|
677
|
-
X as m,
|
|
678
|
-
tt as n,
|
|
679
|
-
nt as o,
|
|
680
|
-
g as p,
|
|
681
|
-
je as q,
|
|
682
|
-
he as r,
|
|
683
|
-
et as s,
|
|
684
|
-
Q as t,
|
|
685
|
-
ye as u,
|
|
686
|
-
J as v,
|
|
687
|
-
Ee as w,
|
|
688
|
-
Be as x,
|
|
689
|
-
Le as y,
|
|
690
|
-
Ve as z
|
|
691
|
-
};
|