@gradient-ui/core 0.2.1 → 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.
Files changed (51) hide show
  1. package/dist/{GLoading.vue_vue_type_style_index_0_lang-DDqJEYGf.js → GLoading.vue_vue_type_style_index_0_lang-CPzo3WD3.js} +195 -206
  2. package/dist/GLoading.vue_vue_type_style_index_0_lang-cokm-HBh.cjs +1 -0
  3. package/dist/GSwitch.vue_vue_type_script_setup_true_lang-BmbKqNgm.js +6421 -0
  4. package/dist/GSwitch.vue_vue_type_script_setup_true_lang-By_7hZOW.cjs +4 -0
  5. package/dist/components.cjs +1 -1
  6. package/dist/components.mjs +39 -38
  7. package/dist/directives.cjs +1 -1
  8. package/dist/directives.mjs +1 -1
  9. package/dist/index.cjs +1 -1
  10. package/dist/index.mjs +92 -88
  11. package/dist/{mask-BgaDaVWU.js → mask-Bu8cjwwH.js} +22 -21
  12. package/dist/mask-D1vJj5Hl.cjs +1 -0
  13. package/dist/propsFactory-DyyboUaC.cjs +1 -0
  14. package/dist/propsFactory-UhcvubZJ.js +13 -0
  15. package/dist/services.cjs +1 -1
  16. package/dist/services.mjs +1 -1
  17. package/dist/style.css +1 -1
  18. package/dist/tagName-CYG1CUfd.js +103 -0
  19. package/dist/tagName-CbsvFHGg.cjs +1 -0
  20. package/dist/types/components/index.d.ts +2 -0
  21. package/dist/types/components/ui/GButton/GButton.vue.d.ts +62 -2
  22. package/dist/types/components/ui/GButton/types.d.ts +76 -40
  23. package/dist/types/components/ui/GNavbar/GNavbarItem.vue.d.ts +3 -3
  24. package/dist/types/components/ui/GNavbar/GNavbarMenu.vue.d.ts +3 -3
  25. package/dist/types/components/ui/GTable/GTable.vue.d.ts +143 -0
  26. package/dist/types/components/ui/GTable/GTableBody.vue.d.ts +69 -0
  27. package/dist/types/components/ui/GTable/GTableCell.vue.d.ts +35 -0
  28. package/dist/types/components/ui/GTable/GTableExpandedRow.vue.d.ts +25 -0
  29. package/dist/types/components/ui/GTable/GTableHead.vue.d.ts +30 -0
  30. package/dist/types/components/ui/GTable/GTableRow.vue.d.ts +40 -0
  31. package/dist/types/components/ui/GTable/context.d.ts +25 -0
  32. package/dist/types/components/ui/GTable/index.d.ts +3 -0
  33. package/dist/types/components/ui/GTable/types.d.ts +318 -0
  34. package/dist/types/components/ui/GTable/useTable.d.ts +22 -0
  35. package/dist/types/components/ui/GTable/useTableExpansion.d.ts +17 -0
  36. package/dist/types/components/ui/GTable/useTableSpans.d.ts +12 -0
  37. package/dist/types/use/index.d.ts +1 -0
  38. package/dist/types/use/tagName.d.ts +47 -0
  39. package/dist/use.cjs +1 -1
  40. package/dist/use.mjs +15 -12
  41. package/dist/useSnackbar-2iJU4bdd.js +769 -0
  42. package/dist/useSnackbar-3QuH25xm.cjs +1 -0
  43. package/package.json +1 -1
  44. package/dist/GLoading.vue_vue_type_style_index_0_lang-CqbeZChH.cjs +0 -1
  45. package/dist/GSwitch.vue_vue_type_script_setup_true_lang-DVKJZfcV.cjs +0 -4
  46. package/dist/GSwitch.vue_vue_type_script_setup_true_lang-hL_S3ZHD.js +0 -5633
  47. package/dist/icon-0-mbYGMr.cjs +0 -1
  48. package/dist/icon-BrFRYYf3.js +0 -66
  49. package/dist/mask-pzGv8apS.cjs +0 -1
  50. package/dist/useSnackbar-CFrWSpt4.cjs +0 -1
  51. package/dist/useSnackbar-lGrTDbl-.js +0 -763
@@ -1,23 +1,13 @@
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";
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 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({
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 et(e, t) {
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 r = fe(t);
95
+ const n = fe(t);
106
96
  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})`
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}`] = s, e[`${r}${o}`] = s, e[`${r}-${o}`] = s;
102
+ e[`${t}${o}`] = i, e[`${n}${o}`] = i, e[`${n}-${o}`] = i;
113
103
  }
114
- e[t] = e[`${t}40`], e[r] = e[`${r}40`];
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 r = p(e.color);
115
+ const n = p(e.color);
126
116
  return {
127
- "--g-color": Se(r),
128
- "--g-on-color": Ce(r),
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 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(
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": s.value
138
+ "--g-gradient-current": i.value
149
139
  })
150
140
  );
151
141
  return {
152
- resolvedColor: r,
142
+ resolvedColor: n,
153
143
  resolvedState: t,
154
- resolvedGradient: s,
144
+ resolvedGradient: i,
155
145
  colorStyles: o,
156
146
  surfaceColorStyles: o,
157
- gradientStyles: c
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 De(e) {
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 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);
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 Be(e, t) {
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 = B(!1);
235
+ const e = D(!1);
246
236
  let t = null;
247
- const r = () => {
237
+ const n = () => {
248
238
  e.value = (t == null ? void 0 : t.matches) ?? !1;
249
239
  };
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);
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, Pe = /* @__PURE__ */ V({
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 r = e, o = t, s = ae(), c = Ee(), i = a(
266
- () => r.group ? se : ie
267
- ), l = a(
268
- () => Be(r.transition, M.value)
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(l.value.name)
260
+ () => b.value ? "" : Te(s.value.name)
271
261
  ), b = a(
272
- () => r.disabled || c.value || l.value.disabled
262
+ () => n.disabled || l.value || s.value.disabled
273
263
  ), $ = a(
274
- () => r.group || l.value.mode === "default" ? void 0 : l.value.mode
264
+ () => n.group || s.value.mode === "default" ? void 0 : s.value.mode
275
265
  ), C = a(
276
- () => !b.value && l.value.css !== !1
266
+ () => !b.value && s.value.css !== !1
277
267
  ), u = a(() => {
278
268
  if (!x.value || b.value) return;
279
- const n = l.value;
269
+ const r = s.value;
280
270
  return {
281
271
  enter: G(
282
- n.enterDuration ?? n.duration,
272
+ r.enterDuration ?? r.duration,
283
273
  220
284
274
  ),
285
275
  leave: G(
286
- n.leaveDuration ?? n.duration,
276
+ r.leaveDuration ?? r.duration,
287
277
  180
288
278
  ) + Me
289
279
  };
290
280
  }), x = a(
291
- () => l.value.name === "overlay" || _.value === "g-overlay-transition"
281
+ () => s.value.name === "overlay" || _.value === "g-overlay-transition"
292
282
  ), 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;
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
- n.enterDuration ?? n.duration
303
+ r.enterDuration ?? r.duration
314
304
  ),
315
305
  "--g-transition-leave-duration": R(
316
- n.leaveDuration ?? n.duration
306
+ r.leaveDuration ?? r.duration
317
307
  ),
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
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(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);
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 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`;
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(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);
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(n) {
347
- L(n), o("before-enter", n);
336
+ function m(r) {
337
+ L(r), o("before-enter", r);
348
338
  }
349
- function T(n) {
350
- o("after-enter", n);
339
+ function T(r) {
340
+ o("after-enter", r);
351
341
  }
352
- function Z(n) {
353
- L(n), o("before-leave", n);
342
+ function Z(r) {
343
+ L(r), o("before-leave", r);
354
344
  }
355
- function q(n) {
356
- if (!(n instanceof HTMLElement)) {
357
- o("leave", n);
345
+ function q(r) {
346
+ if (!(r instanceof HTMLElement)) {
347
+ o("leave", r);
358
348
  return;
359
349
  }
360
- l.value.leaveAbsolute && N(n), l.value.hideOnLeave && n.style.setProperty("display", "none", "important"), o("leave", n);
350
+ s.value.leaveAbsolute && P(r), s.value.hideOnLeave && r.style.setProperty("display", "none", "important"), o("leave", r);
361
351
  }
362
- function ee(n) {
363
- n instanceof HTMLElement && v(n), o("after-leave", n);
352
+ function ee(r) {
353
+ r instanceof HTMLElement && v(r), o("after-leave", r);
364
354
  }
365
- function te(n) {
366
- o("enter-cancelled", n);
355
+ function te(r) {
356
+ o("enter-cancelled", r);
367
357
  }
368
- function ne(n) {
369
- n instanceof HTMLElement && v(n), o("leave-cancelled", n);
358
+ function re(r) {
359
+ r instanceof HTMLElement && v(r), o("leave-cancelled", r);
370
360
  }
371
- return (n, d) => (y(), H(le(i.value), ce(w(s), {
361
+ return (r, d) => (y(), I(le(c.value), ce(w(i), {
372
362
  name: _.value,
373
363
  css: C.value,
374
- appear: l.value.appear,
364
+ appear: s.value.appear,
375
365
  duration: u.value,
376
366
  mode: $.value,
377
- tag: r.group ? r.tag : void 0,
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: ne
374
+ onLeaveCancelled: re
385
375
  }), {
386
- default: I(() => [
387
- A(n.$slots, "default")
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
- }), Ne = (e) => a(() => {
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
- }), Oe = g({
385
+ }), Ve = g({
396
386
  variant: {
397
387
  type: String,
398
388
  default: "filled"
399
389
  }
400
390
  });
401
- function Ve(e, t) {
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 tt = g({
411
- ...Oe(),
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 r = Ve(e, t), o = ye(e, t), s = _e(e, t), c = Ae(e, t), { colorStyles: i } = Q(e), l = a(
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
- r.value,
410
+ n.value,
421
411
  o.value,
422
- s.value,
423
- c.value
412
+ i.value,
413
+ l.value
424
414
  ].filter(Boolean)
425
415
  );
426
416
  return {
427
- variantClass: r,
417
+ variantClass: n,
428
418
  disabledClass: o,
429
- roundedClass: s,
430
- stateClass: c,
431
- surfaceStyles: i,
432
- surfaceClasses: l
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 je(e) {
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 Fe = g({
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
- }), He = {
477
+ }), Ie = {
488
478
  key: 0,
489
479
  class: "g-progress__label"
490
- }, Ie = ["aria-valuenow", "aria-valuetext"], Ue = /* @__PURE__ */ V({
480
+ }, Ue = ["aria-valuenow", "aria-valuetext"], We = /* @__PURE__ */ O({
491
481
  __name: "GProgress",
492
- props: Fe({ color: "primary" }),
482
+ props: He({ color: "primary" }),
493
483
  setup(e) {
494
- const t = e, { gradientStyles: r } = Q(t), o = B(0), s = B(null);
495
- let c;
496
- const i = a(
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
- ), l = Ne(o), _ = a(
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(() => `${i.value}%`), C = a(
503
- () => t.label ?? `${Math.round(i.value)}%`
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
- ...r.value,
497
+ ...n.value,
508
498
  "--g-progress-value": $.value,
509
- "--g-progress-track-width": l.value
499
+ "--g-progress-track-width": s.value
510
500
  })), M = () => {
511
- c = new ResizeObserver((v) => {
501
+ l = new ResizeObserver((v) => {
512
502
  for (const m of v)
513
503
  o.value = m.contentRect.width;
514
- }), s.value && c.observe(s.value);
504
+ }), i.value && l.observe(i.value);
515
505
  };
516
- j(() => {
506
+ F(() => {
517
507
  M();
518
- }), F(() => {
519
- c == null || c.disconnect();
508
+ }), H(() => {
509
+ l == null || l.disconnect();
520
510
  });
521
511
  const {
522
- surfaceOverlayClasses: P,
512
+ surfaceOverlayClasses: N,
523
513
  surfaceUnderlayClasses: L,
524
- surfaceContentClasses: N
525
- } = je("g-progress");
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: O(x.value)
525
+ style: V(x.value)
536
526
  }, [
537
- t.noLabel ? E("", !0) : (y(), h("div", He, [
527
+ t.noLabel ? E("", !0) : (y(), h("div", Ie, [
538
528
  A(v.$slots, "default", {}, () => [
539
- U(W(C.value), 1)
529
+ W(j(C.value), 1)
540
530
  ], !0)
541
531
  ])),
542
532
  f("div", {
543
533
  ref_key: "parentRef",
544
- ref: s,
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 : i.value,
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(P))
546
+ class: k(w(N))
557
547
  }, null, 2),
558
548
  f("div", {
559
- class: k(["g-progress__surface-content", w(N)])
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: O(u(T))
560
+ style: V(u(T))
571
561
  }, null, 4))), 128)) : E("", !0)
572
- ], 8, Ie)
562
+ ], 8, Ue)
573
563
  ], 6));
574
564
  }
575
- }), We = /* @__PURE__ */ pe(Ue, [["__scopeId", "data-v-0140ebe7"]]), Ke = g({
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" }, rt = /* @__PURE__ */ V({
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: r }) {
605
- const o = e, s = r, c = B(!1), i = a(() => o.show || c.value), l = a(() => ({
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
- c.value = !0;
603
+ l.value = !0;
614
604
  }
615
605
  function $() {
616
- c.value = !1;
606
+ l.value = !1;
617
607
  }
618
608
  function C() {
619
609
  var u;
620
- (u = o.onClose) == null || u.call(o), s("close");
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: i
626
- }), (u, x) => (y(), H(w(Pe), {
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: I(() => [
632
- i.value ? (y(), h("div", {
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: O(l.value),
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
- U(W(o.text), 1)
632
+ W(j(o.text), 1)
643
633
  ])
644
634
  ])),
645
635
  f("div", Xe, [
646
- ge(We, {
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
- We as G,
664
- rt as _,
665
- Pe as a,
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
- Ne as g,
661
+ Pe as g,
672
662
  K as h,
673
- Oe as i,
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
- tt as n,
668
+ rt as n,
679
669
  nt as o,
680
- g as p,
681
- je as q,
670
+ Fe as p,
671
+ tt as q,
682
672
  he as r,
683
- et as s,
684
- Q as t,
673
+ Q as s,
674
+ J as t,
685
675
  ye as u,
686
- J as v,
687
- Ee as w,
688
- Be as x,
689
- Le as y,
690
- Ve as z
676
+ Ee as v,
677
+ De as w,
678
+ Le as x,
679
+ Oe as y
691
680
  };