@gradient-ui/core 0.2.0 → 0.4.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 +2 -0
- package/dist/{GLoading.vue_vue_type_style_index_0_lang-DDqJEYGf.js → GLoading.vue_vue_type_style_index_0_lang-CPzo3WD3.js} +195 -206
- package/dist/GLoading.vue_vue_type_style_index_0_lang-cokm-HBh.cjs +1 -0
- package/dist/GSwitch.vue_vue_type_script_setup_true_lang-BmbKqNgm.js +6421 -0
- package/dist/GSwitch.vue_vue_type_script_setup_true_lang-By_7hZOW.cjs +4 -0
- package/dist/components.cjs +1 -1
- package/dist/components.mjs +39 -38
- package/dist/directives.cjs +1 -1
- package/dist/directives.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +92 -88
- package/dist/{mask-BgaDaVWU.js → mask-Bu8cjwwH.js} +22 -21
- package/dist/mask-D1vJj5Hl.cjs +1 -0
- package/dist/propsFactory-DyyboUaC.cjs +1 -0
- package/dist/propsFactory-UhcvubZJ.js +13 -0
- package/dist/services.cjs +1 -1
- package/dist/services.mjs +1 -1
- package/dist/style.css +1 -1
- package/dist/tagName-CYG1CUfd.js +103 -0
- package/dist/tagName-CbsvFHGg.cjs +1 -0
- package/dist/types/components/index.d.ts +2 -0
- package/dist/types/components/ui/GButton/GButton.vue.d.ts +62 -2
- package/dist/types/components/ui/GButton/types.d.ts +76 -40
- 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/GTable/GTable.vue.d.ts +143 -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 +318 -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/use/index.d.ts +1 -0
- package/dist/types/use/tagName.d.ts +47 -0
- package/dist/use.cjs +1 -1
- package/dist/use.mjs +15 -12
- package/dist/useSnackbar-2iJU4bdd.js +769 -0
- package/dist/useSnackbar-3QuH25xm.cjs +1 -0
- package/package.json +2 -2
- package/dist/GLoading.vue_vue_type_style_index_0_lang-CqbeZChH.cjs +0 -1
- package/dist/GSwitch.vue_vue_type_script_setup_true_lang-Bufs8uqY.js +0 -5633
- package/dist/GSwitch.vue_vue_type_script_setup_true_lang-CH9jX5W1.cjs +0 -4
- package/dist/icon-0-mbYGMr.cjs +0 -1
- package/dist/icon-BrFRYYf3.js +0 -66
- package/dist/mask-pzGv8apS.cjs +0 -1
- package/dist/useSnackbar-CFrWSpt4.cjs +0 -1
- package/dist/useSnackbar-lGrTDbl-.js +0 -763
|
@@ -1,23 +1,13 @@
|
|
|
1
|
-
import { computed as a, toValue as p, ref as
|
|
1
|
+
import { computed as a, toValue as p, ref as D, onMounted as F, onBeforeUnmount as H, defineComponent as O, useAttrs as ae, TransitionGroup as se, Transition as ie, openBlock as y, createBlock as I, resolveDynamicComponent as le, mergeProps as ce, unref as w, withCtx as U, renderSlot as A, createElementBlock as h, normalizeStyle as V, normalizeClass as k, createTextVNode as W, toDisplayString as j, createCommentVNode as E, createElementVNode as f, Fragment as ue, renderList as de, createVNode as ge } from "vue";
|
|
2
|
+
import { p as g } from "./propsFactory-UhcvubZJ.js";
|
|
2
3
|
import "@mdi/js";
|
|
3
4
|
import { M as ve, c as fe } from "./camelToKebabCase-KgkZ7-1F.js";
|
|
4
5
|
const pe = (e, t) => {
|
|
5
|
-
const
|
|
6
|
-
for (const [o,
|
|
7
|
-
|
|
8
|
-
return
|
|
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({
|
|
6
|
+
const n = e.__vccOpts || e;
|
|
7
|
+
for (const [o, i] of t)
|
|
8
|
+
n[o] = i;
|
|
9
|
+
return n;
|
|
10
|
+
}, me = g({
|
|
21
11
|
disabled: Boolean
|
|
22
12
|
});
|
|
23
13
|
function ye(e, t) {
|
|
@@ -35,7 +25,7 @@ const be = g({
|
|
|
35
25
|
default: "m"
|
|
36
26
|
}
|
|
37
27
|
});
|
|
38
|
-
function
|
|
28
|
+
function tt(e, t) {
|
|
39
29
|
return a(() => `${t}_${e.size}`);
|
|
40
30
|
}
|
|
41
31
|
const S = ke();
|
|
@@ -102,16 +92,16 @@ function ke() {
|
|
|
102
92
|
}), e;
|
|
103
93
|
}
|
|
104
94
|
function z(e, t) {
|
|
105
|
-
const
|
|
95
|
+
const n = fe(t);
|
|
106
96
|
for (let o = 10; o <= 100; o += 10) {
|
|
107
|
-
const
|
|
108
|
-
color: `rgb(var(--g-color-${
|
|
109
|
-
onColor: `rgb(var(--g-color-on-${
|
|
110
|
-
gradient: `var(--g-gradient-${
|
|
97
|
+
const i = {
|
|
98
|
+
color: `rgb(var(--g-color-${n}-${o}))`,
|
|
99
|
+
onColor: `rgb(var(--g-color-on-${n}-${o}))`,
|
|
100
|
+
gradient: `var(--g-gradient-${n}-${o})`
|
|
111
101
|
};
|
|
112
|
-
e[`${t}${o}`] =
|
|
102
|
+
e[`${t}${o}`] = i, e[`${n}${o}`] = i, e[`${n}-${o}`] = i;
|
|
113
103
|
}
|
|
114
|
-
e[t] = e[`${t}40`], e[
|
|
104
|
+
e[t] = e[`${t}40`], e[n] = e[`${n}40`];
|
|
115
105
|
}
|
|
116
106
|
const J = g({
|
|
117
107
|
color: {
|
|
@@ -122,10 +112,10 @@ const J = g({
|
|
|
122
112
|
function we(e) {
|
|
123
113
|
return {
|
|
124
114
|
colorStyles: a(() => {
|
|
125
|
-
const
|
|
115
|
+
const n = p(e.color);
|
|
126
116
|
return {
|
|
127
|
-
"--g-color": Se(
|
|
128
|
-
"--g-on-color": Ce(
|
|
117
|
+
"--g-color": Se(n),
|
|
118
|
+
"--g-on-color": Ce(n),
|
|
129
119
|
"--g-surface-color": "var(--g-token-color-surface)",
|
|
130
120
|
"--g-on-surface-color": "var(--g-token-color-on-surface)"
|
|
131
121
|
};
|
|
@@ -134,27 +124,27 @@ function we(e) {
|
|
|
134
124
|
}
|
|
135
125
|
function Q(e) {
|
|
136
126
|
const t = a(() => {
|
|
137
|
-
const
|
|
138
|
-
return p(e.active) &&
|
|
139
|
-
}),
|
|
140
|
-
const
|
|
141
|
-
if (
|
|
142
|
-
return
|
|
143
|
-
const
|
|
144
|
-
return p(e.active) &&
|
|
145
|
-
}), { colorStyles: o } = we({ color:
|
|
127
|
+
const c = p(e.activeState);
|
|
128
|
+
return p(e.active) && c !== void 0 ? c : p(e.state);
|
|
129
|
+
}), n = a(() => {
|
|
130
|
+
const c = t.value;
|
|
131
|
+
if (c)
|
|
132
|
+
return c;
|
|
133
|
+
const s = p(e.activeColor);
|
|
134
|
+
return p(e.active) && s !== void 0 ? s : p(e.color);
|
|
135
|
+
}), { colorStyles: o } = we({ color: n }), i = $e(n), l = a(
|
|
146
136
|
() => ({
|
|
147
137
|
...o.value,
|
|
148
|
-
"--g-gradient-current":
|
|
138
|
+
"--g-gradient-current": i.value
|
|
149
139
|
})
|
|
150
140
|
);
|
|
151
141
|
return {
|
|
152
|
-
resolvedColor:
|
|
142
|
+
resolvedColor: n,
|
|
153
143
|
resolvedState: t,
|
|
154
|
-
resolvedGradient:
|
|
144
|
+
resolvedGradient: i,
|
|
155
145
|
colorStyles: o,
|
|
156
146
|
surfaceColorStyles: o,
|
|
157
|
-
gradientStyles:
|
|
147
|
+
gradientStyles: l
|
|
158
148
|
};
|
|
159
149
|
}
|
|
160
150
|
const xe = {
|
|
@@ -210,7 +200,7 @@ const xe = {
|
|
|
210
200
|
function Te(e) {
|
|
211
201
|
return e ? xe[e] ?? e : "";
|
|
212
202
|
}
|
|
213
|
-
function
|
|
203
|
+
function Be(e) {
|
|
214
204
|
if (!(e === void 0 || e === ""))
|
|
215
205
|
return typeof e == "number" ? `${e}px` : e;
|
|
216
206
|
}
|
|
@@ -221,15 +211,15 @@ function R(e) {
|
|
|
221
211
|
function G(e, t) {
|
|
222
212
|
if (e === void 0 || e === "") return t;
|
|
223
213
|
if (typeof e == "number") return e;
|
|
224
|
-
const
|
|
225
|
-
if (
|
|
226
|
-
return Number.parseFloat(
|
|
227
|
-
if (
|
|
228
|
-
return Number.parseFloat(
|
|
229
|
-
const o = Number.parseFloat(
|
|
214
|
+
const n = e.trim();
|
|
215
|
+
if (n.endsWith("ms"))
|
|
216
|
+
return Number.parseFloat(n);
|
|
217
|
+
if (n.endsWith("s"))
|
|
218
|
+
return Number.parseFloat(n) * 1e3;
|
|
219
|
+
const o = Number.parseFloat(n);
|
|
230
220
|
return Number.isNaN(o) ? t : o;
|
|
231
221
|
}
|
|
232
|
-
function
|
|
222
|
+
function De(e, t) {
|
|
233
223
|
return e === !1 ? {
|
|
234
224
|
...t,
|
|
235
225
|
disabled: !0
|
|
@@ -242,18 +232,18 @@ function Be(e, t) {
|
|
|
242
232
|
};
|
|
243
233
|
}
|
|
244
234
|
function Ee() {
|
|
245
|
-
const e =
|
|
235
|
+
const e = D(!1);
|
|
246
236
|
let t = null;
|
|
247
|
-
const
|
|
237
|
+
const n = () => {
|
|
248
238
|
e.value = (t == null ? void 0 : t.matches) ?? !1;
|
|
249
239
|
};
|
|
250
|
-
return
|
|
251
|
-
typeof window > "u" || !window.matchMedia || (t = window.matchMedia("(prefers-reduced-motion: reduce)"),
|
|
252
|
-
}),
|
|
253
|
-
t == null || t.removeEventListener("change",
|
|
240
|
+
return F(() => {
|
|
241
|
+
typeof window > "u" || !window.matchMedia || (t = window.matchMedia("(prefers-reduced-motion: reduce)"), n(), t.addEventListener("change", n));
|
|
242
|
+
}), H(() => {
|
|
243
|
+
t == null || t.removeEventListener("change", n);
|
|
254
244
|
}), e;
|
|
255
245
|
}
|
|
256
|
-
const Me = 80,
|
|
246
|
+
const Me = 80, Ne = /* @__PURE__ */ O({
|
|
257
247
|
inheritAttrs: !1,
|
|
258
248
|
__name: "GTransition",
|
|
259
249
|
props: Le({
|
|
@@ -262,143 +252,143 @@ const Me = 80, Pe = /* @__PURE__ */ V({
|
|
|
262
252
|
}),
|
|
263
253
|
emits: ["before-enter", "after-enter", "before-leave", "leave", "after-leave", "enter-cancelled", "leave-cancelled"],
|
|
264
254
|
setup(e, { emit: t }) {
|
|
265
|
-
const
|
|
266
|
-
() =>
|
|
267
|
-
),
|
|
268
|
-
() =>
|
|
255
|
+
const n = e, o = t, i = ae(), l = Ee(), c = a(
|
|
256
|
+
() => n.group ? se : ie
|
|
257
|
+
), s = a(
|
|
258
|
+
() => De(n.transition, M.value)
|
|
269
259
|
), _ = a(
|
|
270
|
-
() => b.value ? "" : Te(
|
|
260
|
+
() => b.value ? "" : Te(s.value.name)
|
|
271
261
|
), b = a(
|
|
272
|
-
() =>
|
|
262
|
+
() => n.disabled || l.value || s.value.disabled
|
|
273
263
|
), $ = a(
|
|
274
|
-
() =>
|
|
264
|
+
() => n.group || s.value.mode === "default" ? void 0 : s.value.mode
|
|
275
265
|
), C = a(
|
|
276
|
-
() => !b.value &&
|
|
266
|
+
() => !b.value && s.value.css !== !1
|
|
277
267
|
), u = a(() => {
|
|
278
268
|
if (!x.value || b.value) return;
|
|
279
|
-
const
|
|
269
|
+
const r = s.value;
|
|
280
270
|
return {
|
|
281
271
|
enter: G(
|
|
282
|
-
|
|
272
|
+
r.enterDuration ?? r.duration,
|
|
283
273
|
220
|
|
284
274
|
),
|
|
285
275
|
leave: G(
|
|
286
|
-
|
|
276
|
+
r.leaveDuration ?? r.duration,
|
|
287
277
|
180
|
|
288
278
|
) + Me
|
|
289
279
|
};
|
|
290
280
|
}), x = a(
|
|
291
|
-
() =>
|
|
281
|
+
() => s.value.name === "overlay" || _.value === "g-overlay-transition"
|
|
292
282
|
), M = a(() => ({
|
|
293
|
-
name:
|
|
294
|
-
appear:
|
|
295
|
-
mode:
|
|
296
|
-
origin:
|
|
297
|
-
duration:
|
|
298
|
-
enterDuration:
|
|
299
|
-
leaveDuration:
|
|
300
|
-
easing:
|
|
301
|
-
enterEasing:
|
|
302
|
-
leaveEasing:
|
|
303
|
-
distance:
|
|
304
|
-
scale:
|
|
305
|
-
opacity:
|
|
306
|
-
leaveAbsolute:
|
|
307
|
-
hideOnLeave:
|
|
308
|
-
css:
|
|
309
|
-
})),
|
|
310
|
-
const
|
|
283
|
+
name: n.name,
|
|
284
|
+
appear: n.appear,
|
|
285
|
+
mode: n.mode,
|
|
286
|
+
origin: n.origin,
|
|
287
|
+
duration: n.duration,
|
|
288
|
+
enterDuration: n.enterDuration,
|
|
289
|
+
leaveDuration: n.leaveDuration,
|
|
290
|
+
easing: n.easing,
|
|
291
|
+
enterEasing: n.enterEasing,
|
|
292
|
+
leaveEasing: n.leaveEasing,
|
|
293
|
+
distance: n.distance,
|
|
294
|
+
scale: n.scale,
|
|
295
|
+
opacity: n.opacity,
|
|
296
|
+
leaveAbsolute: n.leaveAbsolute,
|
|
297
|
+
hideOnLeave: n.hideOnLeave,
|
|
298
|
+
css: n.css
|
|
299
|
+
})), N = a(() => {
|
|
300
|
+
const r = s.value;
|
|
311
301
|
return {
|
|
312
302
|
"--g-transition-enter-duration": R(
|
|
313
|
-
|
|
303
|
+
r.enterDuration ?? r.duration
|
|
314
304
|
),
|
|
315
305
|
"--g-transition-leave-duration": R(
|
|
316
|
-
|
|
306
|
+
r.leaveDuration ?? r.duration
|
|
317
307
|
),
|
|
318
|
-
"--g-transition-enter-easing":
|
|
319
|
-
"--g-transition-leave-easing":
|
|
320
|
-
"--g-transition-origin":
|
|
321
|
-
"--g-transition-distance":
|
|
322
|
-
"--g-transition-scale":
|
|
323
|
-
"--g-transition-opacity-from":
|
|
308
|
+
"--g-transition-enter-easing": r.enterEasing ?? r.easing,
|
|
309
|
+
"--g-transition-leave-easing": r.leaveEasing ?? r.easing,
|
|
310
|
+
"--g-transition-origin": r.origin,
|
|
311
|
+
"--g-transition-distance": Be(r.distance),
|
|
312
|
+
"--g-transition-scale": r.scale === void 0 ? void 0 : String(r.scale),
|
|
313
|
+
"--g-transition-opacity-from": r.opacity === !1 ? "1" : void 0
|
|
324
314
|
};
|
|
325
315
|
});
|
|
326
|
-
function L(
|
|
327
|
-
if (
|
|
328
|
-
for (const [d,
|
|
329
|
-
|
|
316
|
+
function L(r) {
|
|
317
|
+
if (r instanceof HTMLElement)
|
|
318
|
+
for (const [d, B] of Object.entries(N.value))
|
|
319
|
+
B !== void 0 && r.style.setProperty(d, B);
|
|
330
320
|
}
|
|
331
|
-
function
|
|
332
|
-
const { offsetTop: d, offsetLeft:
|
|
333
|
-
|
|
334
|
-
position:
|
|
335
|
-
top:
|
|
336
|
-
left:
|
|
337
|
-
width:
|
|
338
|
-
height:
|
|
339
|
-
display:
|
|
340
|
-
},
|
|
321
|
+
function P(r) {
|
|
322
|
+
const { offsetTop: d, offsetLeft: B, offsetWidth: ne, offsetHeight: oe } = r;
|
|
323
|
+
r._gTransitionInitialStyles = {
|
|
324
|
+
position: r.style.position,
|
|
325
|
+
top: r.style.top,
|
|
326
|
+
left: r.style.left,
|
|
327
|
+
width: r.style.width,
|
|
328
|
+
height: r.style.height,
|
|
329
|
+
display: r.style.display
|
|
330
|
+
}, r.style.position = "absolute", r.style.top = `${d}px`, r.style.left = `${B}px`, r.style.width = `${ne}px`, r.style.height = `${oe}px`;
|
|
341
331
|
}
|
|
342
|
-
function v(
|
|
343
|
-
const d =
|
|
344
|
-
d && (
|
|
332
|
+
function v(r) {
|
|
333
|
+
const d = r._gTransitionInitialStyles;
|
|
334
|
+
d && (r.style.position = d.position, r.style.top = d.top, r.style.left = d.left, r.style.width = d.width, r.style.height = d.height, r.style.display = d.display, delete r._gTransitionInitialStyles);
|
|
345
335
|
}
|
|
346
|
-
function m(
|
|
347
|
-
L(
|
|
336
|
+
function m(r) {
|
|
337
|
+
L(r), o("before-enter", r);
|
|
348
338
|
}
|
|
349
|
-
function T(
|
|
350
|
-
o("after-enter",
|
|
339
|
+
function T(r) {
|
|
340
|
+
o("after-enter", r);
|
|
351
341
|
}
|
|
352
|
-
function Z(
|
|
353
|
-
L(
|
|
342
|
+
function Z(r) {
|
|
343
|
+
L(r), o("before-leave", r);
|
|
354
344
|
}
|
|
355
|
-
function q(
|
|
356
|
-
if (!(
|
|
357
|
-
o("leave",
|
|
345
|
+
function q(r) {
|
|
346
|
+
if (!(r instanceof HTMLElement)) {
|
|
347
|
+
o("leave", r);
|
|
358
348
|
return;
|
|
359
349
|
}
|
|
360
|
-
|
|
350
|
+
s.value.leaveAbsolute && P(r), s.value.hideOnLeave && r.style.setProperty("display", "none", "important"), o("leave", r);
|
|
361
351
|
}
|
|
362
|
-
function ee(
|
|
363
|
-
|
|
352
|
+
function ee(r) {
|
|
353
|
+
r instanceof HTMLElement && v(r), o("after-leave", r);
|
|
364
354
|
}
|
|
365
|
-
function te(
|
|
366
|
-
o("enter-cancelled",
|
|
355
|
+
function te(r) {
|
|
356
|
+
o("enter-cancelled", r);
|
|
367
357
|
}
|
|
368
|
-
function
|
|
369
|
-
|
|
358
|
+
function re(r) {
|
|
359
|
+
r instanceof HTMLElement && v(r), o("leave-cancelled", r);
|
|
370
360
|
}
|
|
371
|
-
return (
|
|
361
|
+
return (r, d) => (y(), I(le(c.value), ce(w(i), {
|
|
372
362
|
name: _.value,
|
|
373
363
|
css: C.value,
|
|
374
|
-
appear:
|
|
364
|
+
appear: s.value.appear,
|
|
375
365
|
duration: u.value,
|
|
376
366
|
mode: $.value,
|
|
377
|
-
tag:
|
|
367
|
+
tag: n.group ? n.tag : void 0,
|
|
378
368
|
onBeforeEnter: m,
|
|
379
369
|
onAfterEnter: T,
|
|
380
370
|
onBeforeLeave: Z,
|
|
381
371
|
onLeave: q,
|
|
382
372
|
onAfterLeave: ee,
|
|
383
373
|
onEnterCancelled: te,
|
|
384
|
-
onLeaveCancelled:
|
|
374
|
+
onLeaveCancelled: re
|
|
385
375
|
}), {
|
|
386
|
-
default:
|
|
387
|
-
A(
|
|
376
|
+
default: U(() => [
|
|
377
|
+
A(r.$slots, "default")
|
|
388
378
|
]),
|
|
389
379
|
_: 3
|
|
390
380
|
}, 16, ["name", "css", "appear", "duration", "mode", "tag"]));
|
|
391
381
|
}
|
|
392
|
-
}),
|
|
382
|
+
}), Pe = (e) => a(() => {
|
|
393
383
|
const t = p(e);
|
|
394
384
|
return t === "" || t === null || t === void 0 ? "" : typeof t == "number" ? `${t}px` : /^\d+(\.\d+)?$/.test(t) ? `${t}px` : t;
|
|
395
|
-
}),
|
|
385
|
+
}), Ve = g({
|
|
396
386
|
variant: {
|
|
397
387
|
type: String,
|
|
398
388
|
default: "filled"
|
|
399
389
|
}
|
|
400
390
|
});
|
|
401
|
-
function
|
|
391
|
+
function Oe(e, t) {
|
|
402
392
|
return a(() => `${t}_${e.variant}`);
|
|
403
393
|
}
|
|
404
394
|
const Y = g({
|
|
@@ -407,29 +397,29 @@ const Y = g({
|
|
|
407
397
|
function Ae(e, t) {
|
|
408
398
|
return a(() => e.state ? `${t}_${e.state}` : "");
|
|
409
399
|
}
|
|
410
|
-
const
|
|
411
|
-
...
|
|
400
|
+
const rt = g({
|
|
401
|
+
...Ve(),
|
|
412
402
|
...J(),
|
|
413
403
|
...me(),
|
|
414
404
|
...K(),
|
|
415
405
|
...Y()
|
|
416
406
|
});
|
|
417
407
|
function nt(e, t) {
|
|
418
|
-
const
|
|
408
|
+
const n = Oe(e, t), o = ye(e, t), i = _e(e, t), l = Ae(e, t), { colorStyles: c } = Q(e), s = a(
|
|
419
409
|
() => [
|
|
420
|
-
|
|
410
|
+
n.value,
|
|
421
411
|
o.value,
|
|
422
|
-
|
|
423
|
-
|
|
412
|
+
i.value,
|
|
413
|
+
l.value
|
|
424
414
|
].filter(Boolean)
|
|
425
415
|
);
|
|
426
416
|
return {
|
|
427
|
-
variantClass:
|
|
417
|
+
variantClass: n,
|
|
428
418
|
disabledClass: o,
|
|
429
|
-
roundedClass:
|
|
430
|
-
stateClass:
|
|
431
|
-
surfaceStyles:
|
|
432
|
-
surfaceClasses:
|
|
419
|
+
roundedClass: i,
|
|
420
|
+
stateClass: l,
|
|
421
|
+
surfaceStyles: c,
|
|
422
|
+
surfaceClasses: s
|
|
433
423
|
};
|
|
434
424
|
}
|
|
435
425
|
function ze(e) {
|
|
@@ -453,14 +443,14 @@ function Ge(e) {
|
|
|
453
443
|
])
|
|
454
444
|
};
|
|
455
445
|
}
|
|
456
|
-
function
|
|
446
|
+
function Fe(e) {
|
|
457
447
|
return {
|
|
458
448
|
...ze(e),
|
|
459
449
|
...Re(e),
|
|
460
450
|
...Ge(e)
|
|
461
451
|
};
|
|
462
452
|
}
|
|
463
|
-
const
|
|
453
|
+
const He = g({
|
|
464
454
|
...J(),
|
|
465
455
|
...K(),
|
|
466
456
|
...be(),
|
|
@@ -484,45 +474,45 @@ const Fe = g({
|
|
|
484
474
|
type: Number,
|
|
485
475
|
default: 12
|
|
486
476
|
}
|
|
487
|
-
}),
|
|
477
|
+
}), Ie = {
|
|
488
478
|
key: 0,
|
|
489
479
|
class: "g-progress__label"
|
|
490
|
-
},
|
|
480
|
+
}, Ue = ["aria-valuenow", "aria-valuetext"], We = /* @__PURE__ */ O({
|
|
491
481
|
__name: "GProgress",
|
|
492
|
-
props:
|
|
482
|
+
props: He({ color: "primary" }),
|
|
493
483
|
setup(e) {
|
|
494
|
-
const t = e, { gradientStyles:
|
|
495
|
-
let
|
|
496
|
-
const
|
|
484
|
+
const t = e, { gradientStyles: n } = Q(t), o = D(0), i = D(null);
|
|
485
|
+
let l;
|
|
486
|
+
const c = a(
|
|
497
487
|
() => Math.min(100, Math.max(0, t.modelValue))
|
|
498
|
-
),
|
|
488
|
+
), s = Pe(o), _ = a(
|
|
499
489
|
() => Math.max(2, Math.round(t.segments))
|
|
500
490
|
), b = a(
|
|
501
491
|
() => Array.from({ length: _.value - 1 }, (v, m) => m)
|
|
502
|
-
), $ = a(() => `${
|
|
503
|
-
() => t.label ?? `${Math.round(
|
|
492
|
+
), $ = a(() => `${c.value}%`), C = a(
|
|
493
|
+
() => t.label ?? `${Math.round(c.value)}%`
|
|
504
494
|
), u = (v) => ({
|
|
505
495
|
"--g-progress-segment-position": `${(v + 1) / _.value * 100}%`
|
|
506
496
|
}), x = a(() => ({
|
|
507
|
-
...
|
|
497
|
+
...n.value,
|
|
508
498
|
"--g-progress-value": $.value,
|
|
509
|
-
"--g-progress-track-width":
|
|
499
|
+
"--g-progress-track-width": s.value
|
|
510
500
|
})), M = () => {
|
|
511
|
-
|
|
501
|
+
l = new ResizeObserver((v) => {
|
|
512
502
|
for (const m of v)
|
|
513
503
|
o.value = m.contentRect.width;
|
|
514
|
-
}),
|
|
504
|
+
}), i.value && l.observe(i.value);
|
|
515
505
|
};
|
|
516
|
-
|
|
506
|
+
F(() => {
|
|
517
507
|
M();
|
|
518
|
-
}),
|
|
519
|
-
|
|
508
|
+
}), H(() => {
|
|
509
|
+
l == null || l.disconnect();
|
|
520
510
|
});
|
|
521
511
|
const {
|
|
522
|
-
surfaceOverlayClasses:
|
|
512
|
+
surfaceOverlayClasses: N,
|
|
523
513
|
surfaceUnderlayClasses: L,
|
|
524
|
-
surfaceContentClasses:
|
|
525
|
-
} =
|
|
514
|
+
surfaceContentClasses: P
|
|
515
|
+
} = Fe("g-progress");
|
|
526
516
|
return (v, m) => (y(), h("div", {
|
|
527
517
|
class: k(["g-progress", {
|
|
528
518
|
"g-progress_rounded": t.rounded,
|
|
@@ -532,31 +522,31 @@ const Fe = g({
|
|
|
532
522
|
[`g-progress_label-${t.labelAlign}`]: !0,
|
|
533
523
|
[`g-progress_view-${t.view}`]: !0
|
|
534
524
|
}]),
|
|
535
|
-
style:
|
|
525
|
+
style: V(x.value)
|
|
536
526
|
}, [
|
|
537
|
-
t.noLabel ? E("", !0) : (y(), h("div",
|
|
527
|
+
t.noLabel ? E("", !0) : (y(), h("div", Ie, [
|
|
538
528
|
A(v.$slots, "default", {}, () => [
|
|
539
|
-
|
|
529
|
+
W(j(C.value), 1)
|
|
540
530
|
], !0)
|
|
541
531
|
])),
|
|
542
532
|
f("div", {
|
|
543
533
|
ref_key: "parentRef",
|
|
544
|
-
ref:
|
|
534
|
+
ref: i,
|
|
545
535
|
class: "g-progress__track",
|
|
546
536
|
role: "progressbar",
|
|
547
537
|
"aria-valuemin": 0,
|
|
548
538
|
"aria-valuemax": 100,
|
|
549
|
-
"aria-valuenow": t.indeterminate ? void 0 :
|
|
539
|
+
"aria-valuenow": t.indeterminate ? void 0 : c.value,
|
|
550
540
|
"aria-valuetext": t.indeterminate ? void 0 : C.value
|
|
551
541
|
}, [
|
|
552
542
|
f("span", {
|
|
553
543
|
class: k(w(L))
|
|
554
544
|
}, null, 2),
|
|
555
545
|
f("span", {
|
|
556
|
-
class: k(w(
|
|
546
|
+
class: k(w(N))
|
|
557
547
|
}, null, 2),
|
|
558
548
|
f("div", {
|
|
559
|
-
class: k(["g-progress__surface-content", w(
|
|
549
|
+
class: k(["g-progress__surface-content", w(P)])
|
|
560
550
|
}, [...m[0] || (m[0] = [
|
|
561
551
|
f("div", { class: "g-progress__bar" }, [
|
|
562
552
|
f("div", { class: "g-progress__active" }, [
|
|
@@ -567,12 +557,12 @@ const Fe = g({
|
|
|
567
557
|
t.view === "segmented" ? (y(!0), h(ue, { key: 0 }, de(b.value, (T) => (y(), h("span", {
|
|
568
558
|
key: T,
|
|
569
559
|
class: "g-progress__segment-divider",
|
|
570
|
-
style:
|
|
560
|
+
style: V(u(T))
|
|
571
561
|
}, null, 4))), 128)) : E("", !0)
|
|
572
|
-
], 8,
|
|
562
|
+
], 8, Ue)
|
|
573
563
|
], 6));
|
|
574
564
|
}
|
|
575
|
-
}),
|
|
565
|
+
}), je = /* @__PURE__ */ pe(We, [["__scopeId", "data-v-0140ebe7"]]), Ke = g({
|
|
576
566
|
...X(),
|
|
577
567
|
text: String,
|
|
578
568
|
noText: Boolean,
|
|
@@ -586,7 +576,7 @@ const Fe = g({
|
|
|
586
576
|
}), Je = { class: "g-loading__body" }, Qe = {
|
|
587
577
|
key: 0,
|
|
588
578
|
class: "g-loading__text"
|
|
589
|
-
}, Xe = { class: "g-loading__progress" },
|
|
579
|
+
}, Xe = { class: "g-loading__progress" }, ot = /* @__PURE__ */ O({
|
|
590
580
|
__name: "GLoading",
|
|
591
581
|
props: Ke({
|
|
592
582
|
text: "Loading...",
|
|
@@ -601,8 +591,8 @@ const Fe = g({
|
|
|
601
591
|
onClose: void 0
|
|
602
592
|
}),
|
|
603
593
|
emits: ["close"],
|
|
604
|
-
setup(e, { expose: t, emit:
|
|
605
|
-
const o = e,
|
|
594
|
+
setup(e, { expose: t, emit: n }) {
|
|
595
|
+
const o = e, i = n, l = D(!1), c = a(() => o.show || l.value), s = a(() => ({
|
|
606
596
|
"--g-loading-overlay-opacity": o.opacity !== void 0 ? String(o.opacity) : void 0,
|
|
607
597
|
"--g-loading-overlay-blur": o.blur !== void 0 ? _(o.blur) : void 0
|
|
608
598
|
}));
|
|
@@ -610,40 +600,40 @@ const Fe = g({
|
|
|
610
600
|
return typeof u == "number" ? `${u}px` : u;
|
|
611
601
|
}
|
|
612
602
|
function b() {
|
|
613
|
-
|
|
603
|
+
l.value = !0;
|
|
614
604
|
}
|
|
615
605
|
function $() {
|
|
616
|
-
|
|
606
|
+
l.value = !1;
|
|
617
607
|
}
|
|
618
608
|
function C() {
|
|
619
609
|
var u;
|
|
620
|
-
(u = o.onClose) == null || u.call(o),
|
|
610
|
+
(u = o.onClose) == null || u.call(o), i("close");
|
|
621
611
|
}
|
|
622
612
|
return t({
|
|
623
613
|
hide: $,
|
|
624
614
|
show: b,
|
|
625
|
-
isVisible:
|
|
626
|
-
}), (u, x) => (y(),
|
|
615
|
+
isVisible: c
|
|
616
|
+
}), (u, x) => (y(), I(w(Ne), {
|
|
627
617
|
transition: o.transition,
|
|
628
618
|
name: "scale",
|
|
629
619
|
onAfterLeave: C
|
|
630
620
|
}, {
|
|
631
|
-
default:
|
|
632
|
-
|
|
621
|
+
default: U(() => [
|
|
622
|
+
c.value ? (y(), h("div", {
|
|
633
623
|
key: 0,
|
|
634
624
|
class: k(["g-loading", { "g-loading_dark": o.dark }]),
|
|
635
|
-
style:
|
|
625
|
+
style: V(s.value),
|
|
636
626
|
"aria-live": "polite",
|
|
637
627
|
"aria-busy": "true"
|
|
638
628
|
}, [
|
|
639
629
|
f("div", Je, [
|
|
640
630
|
o.noText ? E("", !0) : (y(), h("div", Qe, [
|
|
641
631
|
A(u.$slots, "default", {}, () => [
|
|
642
|
-
|
|
632
|
+
W(j(o.text), 1)
|
|
643
633
|
])
|
|
644
634
|
])),
|
|
645
635
|
f("div", Xe, [
|
|
646
|
-
ge(
|
|
636
|
+
ge(je, {
|
|
647
637
|
"no-label": "",
|
|
648
638
|
indeterminate: "",
|
|
649
639
|
"model-value": 100,
|
|
@@ -660,32 +650,31 @@ const Fe = g({
|
|
|
660
650
|
}
|
|
661
651
|
});
|
|
662
652
|
export {
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
653
|
+
je as G,
|
|
654
|
+
ot as _,
|
|
655
|
+
Ne as a,
|
|
666
656
|
Se as b,
|
|
667
657
|
pe as c,
|
|
668
658
|
Y as d,
|
|
669
659
|
me as e,
|
|
670
660
|
Ae as f,
|
|
671
|
-
|
|
661
|
+
Pe as g,
|
|
672
662
|
K as h,
|
|
673
|
-
|
|
663
|
+
Ve as i,
|
|
674
664
|
_e as j,
|
|
675
665
|
$e as k,
|
|
676
666
|
be as l,
|
|
677
667
|
X as m,
|
|
678
|
-
|
|
668
|
+
rt as n,
|
|
679
669
|
nt as o,
|
|
680
|
-
|
|
681
|
-
|
|
670
|
+
Fe as p,
|
|
671
|
+
tt as q,
|
|
682
672
|
he as r,
|
|
683
|
-
|
|
684
|
-
|
|
673
|
+
Q as s,
|
|
674
|
+
J as t,
|
|
685
675
|
ye as u,
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
Ve as z
|
|
676
|
+
Ee as v,
|
|
677
|
+
De as w,
|
|
678
|
+
Le as x,
|
|
679
|
+
Oe as y
|
|
691
680
|
};
|