@gradient-ui/core 0.5.0-rc.0 → 0.8.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 (151) hide show
  1. package/README.md +4 -4
  2. package/dist/{GLoading.vue_vue_type_style_index_0_lang-CBB_GocW.js → GLoading.vue_vue_type_style_index_0_lang-BbVYszn2.js} +90 -88
  3. package/dist/GLoading.vue_vue_type_style_index_0_lang-DW5X0giH.cjs +1 -0
  4. package/dist/GSwitch.vue_vue_type_script_setup_true_lang-BPwF9Kug.js +8734 -0
  5. package/dist/GSwitch.vue_vue_type_script_setup_true_lang-C45EmRhx.cjs +1 -0
  6. package/dist/{camelToKebabCase-6qY6WHvl.js → camelToKebabCase-BWbQb81D.js} +4 -4
  7. package/dist/components.cjs +1 -1
  8. package/dist/components.mjs +73 -65
  9. package/dist/default--73FwpwZ.cjs +4 -0
  10. package/dist/default-DlsS6GI_.js +58 -0
  11. package/dist/directives.cjs +1 -1
  12. package/dist/directives.mjs +1 -1
  13. package/dist/index-DVHKm06w.cjs +1 -0
  14. package/dist/index-DeFv4BdJ.js +418 -0
  15. package/dist/index.cjs +1 -1
  16. package/dist/index.mjs +197 -173
  17. package/dist/{mask-CZX-I_iy.js → mask-669nMf98.js} +2 -2
  18. package/dist/{mask-BbofdFd4.cjs → mask-Bh_UkcCe.cjs} +1 -1
  19. package/dist/materialSurface-BbFTyJuA.js +634 -0
  20. package/dist/materialSurface-DOfA2E9c.cjs +1 -0
  21. package/dist/scheme-CZ0a0X5e.cjs +299 -0
  22. package/dist/scheme-Dqwdqg6N.js +1405 -0
  23. package/dist/services.cjs +1 -1
  24. package/dist/services.mjs +1 -1
  25. package/dist/style.css +1 -1
  26. package/dist/{surface-BKu4KfkY.js → surface-C3w1Rz6V.js} +50 -47
  27. package/dist/surface-DB9flb-h.cjs +1 -0
  28. package/dist/theme.cjs +1 -1
  29. package/dist/theme.mjs +52 -48
  30. package/dist/types/components/index.d.ts +10 -0
  31. package/dist/types/components/ui/GAlert/GAlert.vue.d.ts +3 -3
  32. package/dist/types/components/ui/GAvatar/GAvatar.vue.d.ts +873 -0
  33. package/dist/types/components/ui/GAvatar/GAvatarGroup.vue.d.ts +194 -0
  34. package/dist/types/components/ui/GAvatar/index.d.ts +3 -0
  35. package/dist/types/components/ui/GAvatar/types.d.ts +585 -0
  36. package/dist/types/components/ui/GBadge/GBadge.vue.d.ts +5 -5
  37. package/dist/types/components/ui/GButton/GButton.vue.d.ts +3 -3
  38. package/dist/types/components/ui/GCard/GCard.vue.d.ts +949 -0
  39. package/dist/types/components/ui/GCard/index.d.ts +2 -0
  40. package/dist/types/components/ui/GCard/types.d.ts +519 -0
  41. package/dist/types/components/ui/GCheckControl/GCheckGroup.vue.d.ts +1 -1
  42. package/dist/types/components/ui/GChip/GChip.vue.d.ts +8 -4
  43. package/dist/types/components/ui/GChip/types.d.ts +1 -0
  44. package/dist/types/components/ui/GCombobox/GCombobox.vue.d.ts +37 -0
  45. package/dist/types/components/ui/GCombobox/index.d.ts +2 -0
  46. package/dist/types/components/ui/GCombobox/types.d.ts +59 -0
  47. package/dist/types/components/ui/GDivider/GDivider.vue.d.ts +965 -0
  48. package/dist/types/components/ui/GDivider/index.d.ts +2 -0
  49. package/dist/types/components/ui/GDivider/types.d.ts +518 -0
  50. package/dist/types/components/ui/GExpansion/GExpansion.vue.d.ts +9 -9
  51. package/dist/types/components/ui/GExpansionGroup/types.d.ts +4 -1
  52. package/dist/types/components/ui/GFAB/GFAB.vue.d.ts +4 -4
  53. package/dist/types/components/ui/GFieldBase/GFieldBase.vue.d.ts +75 -0
  54. package/dist/types/components/ui/GFieldBase/props.d.ts +73 -4
  55. package/dist/types/components/ui/GGradientMaterial/GGradientMaterial.vue.d.ts +3 -3
  56. package/dist/types/components/ui/GInput/GInput.vue.d.ts +75 -0
  57. package/dist/types/components/ui/GMenu/GMenu.vue.d.ts +1 -1
  58. package/dist/types/components/ui/GMenu/GSubmenu.vue.d.ts +6 -6
  59. package/dist/types/components/ui/GMenuItem/GMenuItem.vue.d.ts +1 -1
  60. package/dist/types/components/ui/GNavbar/GNavbar.vue.d.ts +3 -3
  61. package/dist/types/components/ui/GQuickActions/GQuickActions.vue.d.ts +1 -1
  62. package/dist/types/components/ui/GSelect/types.d.ts +6 -0
  63. package/dist/types/components/ui/GSelectItem.vue.d.ts +1 -1
  64. package/dist/types/components/ui/GSnackbar/GSnackbar.vue.d.ts +4 -4
  65. package/dist/types/components/ui/GStepper/GStepItem.vue.d.ts +16 -0
  66. package/dist/types/components/ui/GStepper/GStepPanel.vue.d.ts +76 -0
  67. package/dist/types/components/ui/GStepper/GStepper.vue.d.ts +63 -0
  68. package/dist/types/components/ui/GStepper/GStepperActions.vue.d.ts +22 -0
  69. package/dist/types/components/ui/GStepper/context.d.ts +42 -0
  70. package/dist/types/components/ui/GStepper/index.d.ts +4 -0
  71. package/dist/types/components/ui/GStepper/types.d.ts +708 -0
  72. package/dist/types/components/ui/GTable/GTable.vue.d.ts +13 -13
  73. package/dist/types/components/ui/GTable/types.d.ts +59 -55
  74. package/dist/types/components/ui/GTextarea/GTextarea.vue.d.ts +75 -0
  75. package/dist/types/components/ui/GToggleButton/GToggleButton.vue.d.ts +4 -4
  76. package/dist/types/theme/default.d.ts +2 -1
  77. package/dist/types/theme/gradient.d.ts +1 -1
  78. package/dist/types/theme/index.d.ts +6 -6
  79. package/dist/types/use/actionSurface.d.ts +5 -1650
  80. package/dist/types/use/density.d.ts +16 -0
  81. package/dist/types/use/form/fieldKeyboard.d.ts +19 -0
  82. package/dist/types/use/form/props.d.ts +54 -2
  83. package/dist/types/use/form/textFieldControl.d.ts +9 -1
  84. package/dist/types/use/gradient.d.ts +4 -1653
  85. package/dist/types/use/gradientMaterial.d.ts +1 -1
  86. package/dist/types/use/index.d.ts +9 -0
  87. package/dist/types/use/input/props.d.ts +43 -4
  88. package/dist/types/use/material.d.ts +3 -2
  89. package/dist/types/use/materialSurface.d.ts +10 -4
  90. package/dist/types/use/navigation/controller.d.ts +14 -0
  91. package/dist/types/use/navigation/index.d.ts +4 -0
  92. package/dist/types/use/navigation/item.d.ts +9 -0
  93. package/dist/types/use/navigation/keyboard.d.ts +4 -0
  94. package/dist/types/use/navigation/types.d.ts +42 -0
  95. package/dist/types/use/select/comboboxController.d.ts +36 -0
  96. package/dist/types/use/select/commit.d.ts +23 -0
  97. package/dist/types/use/select/controller.d.ts +5 -0
  98. package/dist/types/use/select/creatable.d.ts +18 -0
  99. package/dist/types/use/select/fieldControl.d.ts +59 -0
  100. package/dist/types/use/select/filter.d.ts +14 -0
  101. package/dist/types/use/select/listboxKeyboard.d.ts +9 -0
  102. package/dist/types/use/select/modelFallbackItems.d.ts +12 -0
  103. package/dist/types/use/select/search.d.ts +14 -0
  104. package/dist/types/use/select/searchFieldControl.d.ts +24 -0
  105. package/dist/types/use/select/selectionSummary.d.ts +1 -0
  106. package/dist/types/use/select/tokenInputKeyboard.d.ts +11 -0
  107. package/dist/types/use/stateIcon.d.ts +9 -0
  108. package/dist/types/use/stepper/controller.d.ts +20 -0
  109. package/dist/types/use/stepper/index.d.ts +1 -0
  110. package/dist/types/use/surfaceColor.d.ts +2 -1
  111. package/dist/types/use/surfaceMaterial.d.ts +45 -0
  112. package/dist/types/use/textarea/props.d.ts +43 -4
  113. package/dist/use.cjs +1 -1
  114. package/dist/use.mjs +54 -42
  115. package/dist/useSnackbar-6OiYxhJA.cjs +1 -0
  116. package/dist/useSnackbar-BYPu4tJ4.js +922 -0
  117. package/package.json +4 -2
  118. package/dist/GLoading.vue_vue_type_style_index_0_lang-Bv3dWEq8.cjs +0 -1
  119. package/dist/GSwitch.vue_vue_type_script_setup_true_lang-BS6bb1XY.cjs +0 -1
  120. package/dist/GSwitch.vue_vue_type_script_setup_true_lang-UTBNFP5X.js +0 -7015
  121. package/dist/default-BhuY-A3o.cjs +0 -4
  122. package/dist/default-OTmCd0Aq.js +0 -131
  123. package/dist/index-B3_n44N_.cjs +0 -1
  124. package/dist/index-BtCLucTD.js +0 -66
  125. package/dist/material-Ca7ZZAiO.cjs +0 -194
  126. package/dist/material-okvXHenb.js +0 -1162
  127. package/dist/materialSurface-BBrP9ltj.js +0 -591
  128. package/dist/materialSurface-CK8LN_dU.cjs +0 -1
  129. package/dist/surface-8z3gR7vF.cjs +0 -1
  130. package/dist/types/theme/gradient/animation/css.d.ts +0 -12
  131. package/dist/types/theme/gradient/animation/index.d.ts +0 -1
  132. package/dist/types/theme/gradient/colorMath.d.ts +0 -3
  133. package/dist/types/theme/gradient/constants.d.ts +0 -3
  134. package/dist/types/theme/gradient/core.d.ts +0 -1
  135. package/dist/types/theme/gradient/effects/index.d.ts +0 -1
  136. package/dist/types/theme/gradient/effects/morph.d.ts +0 -5
  137. package/dist/types/theme/gradient/effects/shadow.d.ts +0 -3
  138. package/dist/types/theme/gradient/formatters/canvas.d.ts +0 -2
  139. package/dist/types/theme/gradient/formatters/css.d.ts +0 -3
  140. package/dist/types/theme/gradient/formatters/index.d.ts +0 -1
  141. package/dist/types/theme/gradient/formatters/svg.d.ts +0 -5
  142. package/dist/types/theme/gradient/index.d.ts +0 -1
  143. package/dist/types/theme/gradient/material.d.ts +0 -1
  144. package/dist/types/theme/gradient/model.d.ts +0 -5
  145. package/dist/types/theme/gradient/presets.d.ts +0 -158
  146. package/dist/types/theme/gradient/recipes.d.ts +0 -14
  147. package/dist/types/theme/gradient/tokens.d.ts +0 -72
  148. package/dist/types/theme/gradient/types.d.ts +0 -117
  149. package/dist/types/theme/gradient/utils.d.ts +0 -10
  150. package/dist/useSnackbar-BHQshEZ8.cjs +0 -1
  151. package/dist/useSnackbar-DeNHZH8v.js +0 -908
package/README.md CHANGED
@@ -11,9 +11,9 @@ The npm package is published as `@gradient-ui/core`.
11
11
 
12
12
  Documentation: https://gradient-ui-docs.netlify.app/docs/get-started
13
13
 
14
- ## 0.5 RC
14
+ ## 0.5.0
15
15
 
16
- Gradient UI `0.5` is the release-candidate line for the new color and gradient
16
+ Gradient UI `0.5.0` is the stable release for the new color and gradient
17
17
  architecture.
18
18
 
19
19
  - The standalone `@gradient-ui/gradient-engine` package powers gradient
@@ -25,10 +25,10 @@ architecture.
25
25
  still resolve semantic colors such as `primary`, `error`, `warning` and
26
26
  `success`.
27
27
 
28
- Install the RC when validating the next version:
28
+ Install the stable package:
29
29
 
30
30
  ```bash
31
- npm install @gradient-ui/core@rc
31
+ npm install @gradient-ui/core
32
32
  ```
33
33
 
34
34
  The gradient engine can also be installed independently:
@@ -1,10 +1,10 @@
1
- import { computed as s, ref as N, onMounted as R, onBeforeUnmount as G, defineComponent as z, useAttrs as Z, TransitionGroup as q, Transition as ee, openBlock as f, createBlock as F, resolveDynamicComponent as te, mergeProps as ne, unref as h, withCtx as H, renderSlot as A, createElementBlock as S, normalizeStyle as P, normalizeClass as b, createTextVNode as W, toDisplayString as I, createCommentVNode as B, createElementVNode as d, Fragment as oe, renderList as ae, createVNode as se } from "vue";
2
- import { p as w, f as re, g as ie, h as le, m as ue, i as de, j as ce, k as ge } from "./surface-BKu4KfkY.js";
1
+ import { computed as a, ref as N, onMounted as G, onBeforeUnmount as F, defineComponent as V, useAttrs as Z, TransitionGroup as q, Transition as ee, openBlock as f, createBlock as H, resolveDynamicComponent as te, mergeProps as ne, unref as h, withCtx as W, renderSlot as A, createElementBlock as S, normalizeStyle as z, normalizeClass as b, createTextVNode as I, toDisplayString as j, createCommentVNode as B, createElementVNode as d, Fragment as oe, renderList as se, createVNode as ae } from "vue";
2
+ import { p as w, f as re, g as ie, h as le, m as ue, i as de, j as ce, k as ge } from "./surface-C3w1Rz6V.js";
3
3
  import "@mdi/js";
4
4
  const pe = (t, n) => {
5
5
  const o = t.__vccOpts || t;
6
- for (const [a, c] of n)
7
- o[a] = c;
6
+ for (const [s, c] of n)
7
+ o[s] = c;
8
8
  return o;
9
9
  }, ve = w({
10
10
  size: {
@@ -13,7 +13,7 @@ const pe = (t, n) => {
13
13
  }
14
14
  });
15
15
  function ze(t, n) {
16
- return s(() => `${n}_${t.size}`);
16
+ return a(() => `${n}_${t.size}`);
17
17
  }
18
18
  const fe = {
19
19
  fade: "g-fade-transition",
@@ -26,7 +26,7 @@ const fe = {
26
26
  dialog: "g-dialog-transition",
27
27
  overlay: "g-overlay-transition",
28
28
  expand: "g-expand-transition"
29
- }, j = w(
29
+ }, U = w(
30
30
  {
31
31
  transition: {
32
32
  type: [Boolean, String, Object],
@@ -36,7 +36,7 @@ const fe = {
36
36
  "transition"
37
37
  ), me = w(
38
38
  {
39
- ...j(),
39
+ ...U(),
40
40
  name: String,
41
41
  appear: Boolean,
42
42
  disabled: Boolean,
@@ -72,11 +72,11 @@ function _e(t) {
72
72
  if (!(t === void 0 || t === ""))
73
73
  return typeof t == "number" ? `${t}px` : t;
74
74
  }
75
- function V(t) {
75
+ function O(t) {
76
76
  if (!(t === void 0 || t === ""))
77
77
  return typeof t == "number" ? `${t}ms` : t;
78
78
  }
79
- function O(t, n) {
79
+ function R(t, n) {
80
80
  if (t === void 0 || t === "") return n;
81
81
  if (typeof t == "number") return t;
82
82
  const o = t.trim();
@@ -84,8 +84,8 @@ function O(t, n) {
84
84
  return Number.parseFloat(o);
85
85
  if (o.endsWith("s"))
86
86
  return Number.parseFloat(o) * 1e3;
87
- const a = Number.parseFloat(o);
88
- return Number.isNaN(a) ? n : a;
87
+ const s = Number.parseFloat(o);
88
+ return Number.isNaN(s) ? n : s;
89
89
  }
90
90
  function be(t, n) {
91
91
  return t === !1 ? {
@@ -105,13 +105,13 @@ function he() {
105
105
  const o = () => {
106
106
  t.value = (n == null ? void 0 : n.matches) ?? !1;
107
107
  };
108
- return R(() => {
108
+ return G(() => {
109
109
  typeof window > "u" || !window.matchMedia || (n = window.matchMedia("(prefers-reduced-motion: reduce)"), o(), n.addEventListener("change", o));
110
- }), G(() => {
110
+ }), F(() => {
111
111
  n == null || n.removeEventListener("change", o);
112
112
  }), t;
113
113
  }
114
- const Se = 80, xe = /* @__PURE__ */ z({
114
+ const Se = 80, xe = /* @__PURE__ */ V({
115
115
  inheritAttrs: !1,
116
116
  __name: "GTransition",
117
117
  props: me({
@@ -120,34 +120,34 @@ const Se = 80, xe = /* @__PURE__ */ z({
120
120
  }),
121
121
  emits: ["before-enter", "after-enter", "before-leave", "leave", "after-leave", "enter-cancelled", "leave-cancelled"],
122
122
  setup(t, { emit: n }) {
123
- const o = t, a = n, c = Z(), u = he(), g = s(
123
+ const o = t, s = n, c = Z(), u = he(), g = a(
124
124
  () => o.group ? q : ee
125
- ), r = s(
125
+ ), r = a(
126
126
  () => be(o.transition, D.value)
127
- ), m = s(
127
+ ), m = a(
128
128
  () => y.value ? "" : ye(r.value.name)
129
- ), y = s(
129
+ ), y = a(
130
130
  () => o.disabled || u.value || r.value.disabled
131
- ), x = s(
131
+ ), x = a(
132
132
  () => o.group || r.value.mode === "default" ? void 0 : r.value.mode
133
- ), _ = s(
133
+ ), _ = a(
134
134
  () => !y.value && r.value.css !== !1
135
- ), i = s(() => {
135
+ ), i = a(() => {
136
136
  if (!L.value || y.value) return;
137
137
  const e = r.value;
138
138
  return {
139
- enter: O(
139
+ enter: R(
140
140
  e.enterDuration ?? e.duration,
141
141
  220
142
142
  ),
143
- leave: O(
143
+ leave: R(
144
144
  e.leaveDuration ?? e.duration,
145
145
  180
146
146
  ) + Se
147
147
  };
148
- }), L = s(
148
+ }), L = a(
149
149
  () => r.value.name === "overlay" || m.value === "g-overlay-transition"
150
- ), D = s(() => ({
150
+ ), D = a(() => ({
151
151
  name: o.name,
152
152
  appear: o.appear,
153
153
  mode: o.mode,
@@ -164,13 +164,13 @@ const Se = 80, xe = /* @__PURE__ */ z({
164
164
  leaveAbsolute: o.leaveAbsolute,
165
165
  hideOnLeave: o.hideOnLeave,
166
166
  css: o.css
167
- })), E = s(() => {
167
+ })), E = a(() => {
168
168
  const e = r.value;
169
169
  return {
170
- "--g-transition-enter-duration": V(
170
+ "--g-transition-enter-duration": O(
171
171
  e.enterDuration ?? e.duration
172
172
  ),
173
- "--g-transition-leave-duration": V(
173
+ "--g-transition-leave-duration": O(
174
174
  e.leaveDuration ?? e.duration
175
175
  ),
176
176
  "--g-transition-enter-easing": e.enterEasing ?? e.easing,
@@ -201,47 +201,47 @@ const Se = 80, xe = /* @__PURE__ */ z({
201
201
  const l = e._gTransitionInitialStyles;
202
202
  l && (e.style.position = l.position, e.style.top = l.top, e.style.left = l.left, e.style.width = l.width, e.style.height = l.height, e.style.display = l.display, delete e._gTransitionInitialStyles);
203
203
  }
204
+ function P(e) {
205
+ T(e), s("before-enter", e);
206
+ }
204
207
  function p(e) {
205
- T(e), a("before-enter", e);
208
+ s("after-enter", e);
206
209
  }
207
210
  function v(e) {
208
- a("after-enter", e);
211
+ T(e), s("before-leave", e);
209
212
  }
210
213
  function C(e) {
211
- T(e), a("before-leave", e);
212
- }
213
- function U(e) {
214
214
  if (!(e instanceof HTMLElement)) {
215
- a("leave", e);
215
+ s("leave", e);
216
216
  return;
217
217
  }
218
- r.value.leaveAbsolute && M(e), r.value.hideOnLeave && e.style.setProperty("display", "none", "important"), a("leave", e);
218
+ r.value.leaveAbsolute && M(e), r.value.hideOnLeave && e.style.setProperty("display", "none", "important"), s("leave", e);
219
219
  }
220
220
  function J(e) {
221
- e instanceof HTMLElement && k(e), a("after-leave", e);
221
+ e instanceof HTMLElement && k(e), s("after-leave", e);
222
222
  }
223
223
  function K(e) {
224
- a("enter-cancelled", e);
224
+ s("enter-cancelled", e);
225
225
  }
226
226
  function Q(e) {
227
- e instanceof HTMLElement && k(e), a("leave-cancelled", e);
227
+ e instanceof HTMLElement && k(e), s("leave-cancelled", e);
228
228
  }
229
- return (e, l) => (f(), F(te(g.value), ne(h(c), {
229
+ return (e, l) => (f(), H(te(g.value), ne(h(c), {
230
230
  name: m.value,
231
231
  css: _.value,
232
232
  appear: r.value.appear,
233
233
  duration: i.value,
234
234
  mode: x.value,
235
235
  tag: o.group ? o.tag : void 0,
236
- onBeforeEnter: p,
237
- onAfterEnter: v,
238
- onBeforeLeave: C,
239
- onLeave: U,
236
+ onBeforeEnter: P,
237
+ onAfterEnter: p,
238
+ onBeforeLeave: v,
239
+ onLeave: C,
240
240
  onAfterLeave: J,
241
241
  onEnterCancelled: K,
242
242
  onLeaveCancelled: Q
243
243
  }), {
244
- default: H(() => [
244
+ default: W(() => [
245
245
  A(e.$slots, "default")
246
246
  ]),
247
247
  _: 3
@@ -275,42 +275,44 @@ const Se = 80, xe = /* @__PURE__ */ z({
275
275
  }), Le = {
276
276
  key: 0,
277
277
  class: "g-progress__label"
278
- }, Te = ["aria-valuenow", "aria-valuetext"], ke = /* @__PURE__ */ z({
278
+ }, Te = ["aria-valuenow", "aria-valuetext"], ke = /* @__PURE__ */ V({
279
279
  __name: "GProgress",
280
280
  props: we({ color: "primary" }),
281
281
  setup(t) {
282
- const n = t, { gradientStyles: o } = de(n), a = N(0), c = N(null);
282
+ const n = t, { gradientStyles: o } = de(n), s = N(0), c = N(null);
283
283
  let u;
284
- const g = s(
284
+ const g = a(
285
285
  () => Math.min(100, Math.max(0, n.modelValue))
286
- ), r = ce(a), m = s(
286
+ ), r = ce(s), m = a(
287
287
  () => Math.max(2, Math.round(n.segments))
288
- ), y = s(
288
+ ), y = a(
289
289
  () => Array.from({ length: m.value - 1 }, (p, v) => v)
290
- ), x = s(() => `${g.value}%`), _ = s(
290
+ ), x = a(() => `${g.value}%`), _ = a(
291
291
  () => n.label ?? `${Math.round(g.value)}%`
292
292
  ), i = (p) => ({
293
293
  "--g-progress-segment-position": `${(p + 1) / m.value * 100}%`
294
- }), L = s(() => ({
295
- ...o.value,
294
+ }), L = a(() => ({
296
295
  "--g-progress-value": x.value,
297
296
  "--g-progress-track-width": r.value
298
- })), D = () => {
297
+ })), D = a(() => [
298
+ o.value,
299
+ L.value
300
+ ]), E = () => {
299
301
  u = new ResizeObserver((p) => {
300
302
  for (const v of p)
301
- a.value = v.contentRect.width;
303
+ s.value = v.contentRect.width;
302
304
  }), c.value && u.observe(c.value);
303
305
  };
304
- R(() => {
305
- D();
306
- }), G(() => {
306
+ G(() => {
307
+ E();
308
+ }), F(() => {
307
309
  u == null || u.disconnect();
308
310
  });
309
311
  const {
310
- surfaceOverlayClasses: E,
311
- surfaceUnderlayClasses: T,
312
- surfaceTextureClasses: M,
313
- surfaceContentClasses: k
312
+ surfaceOverlayClasses: T,
313
+ surfaceUnderlayClasses: M,
314
+ surfaceTextureClasses: k,
315
+ surfaceContentClasses: P
314
316
  } = ge("g-progress");
315
317
  return (p, v) => (f(), S("div", {
316
318
  class: b(["g-progress", {
@@ -322,11 +324,11 @@ const Se = 80, xe = /* @__PURE__ */ z({
322
324
  [`g-progress_view-${n.view}`]: !0,
323
325
  [`g-progress_texture-${n.texture}`]: n.texture !== "none"
324
326
  }]),
325
- style: P(L.value)
327
+ style: z(D.value)
326
328
  }, [
327
329
  n.noLabel ? B("", !0) : (f(), S("div", Le, [
328
330
  A(p.$slots, "default", {}, () => [
329
- W(I(_.value), 1)
331
+ I(j(_.value), 1)
330
332
  ], !0)
331
333
  ])),
332
334
  d("div", {
@@ -340,16 +342,16 @@ const Se = 80, xe = /* @__PURE__ */ z({
340
342
  "aria-valuetext": n.indeterminate ? void 0 : _.value
341
343
  }, [
342
344
  d("span", {
343
- class: b(h(T))
345
+ class: b(h(M))
344
346
  }, null, 2),
345
347
  d("span", {
346
- class: b(h(E))
348
+ class: b(h(T))
347
349
  }, null, 2),
348
350
  d("span", {
349
- class: b(h(M))
351
+ class: b(h(k))
350
352
  }, null, 2),
351
353
  d("div", {
352
- class: b(["g-progress__surface-content", h(k)])
354
+ class: b(["g-progress__surface-content", h(P)])
353
355
  }, [...v[0] || (v[0] = [
354
356
  d("div", { class: "g-progress__bar" }, [
355
357
  d("div", { class: "g-progress__active" }, [
@@ -357,16 +359,16 @@ const Se = 80, xe = /* @__PURE__ */ z({
357
359
  ])
358
360
  ], -1)
359
361
  ])], 2),
360
- n.view === "segmented" ? (f(!0), S(oe, { key: 0 }, ae(y.value, (C) => (f(), S("span", {
362
+ n.view === "segmented" ? (f(!0), S(oe, { key: 0 }, se(y.value, (C) => (f(), S("span", {
361
363
  key: C,
362
364
  class: "g-progress__segment-divider",
363
- style: P(i(C))
365
+ style: z(i(C))
364
366
  }, null, 4))), 128)) : B("", !0)
365
367
  ], 8, Te)
366
368
  ], 6));
367
369
  }
368
- }), Ce = /* @__PURE__ */ pe(ke, [["__scopeId", "data-v-4cff0429"]]), $e = w({
369
- ...j(),
370
+ }), Ce = /* @__PURE__ */ pe(ke, [["__scopeId", "data-v-471d888d"]]), $e = w({
371
+ ...U(),
370
372
  text: String,
371
373
  noText: Boolean,
372
374
  show: Boolean,
@@ -379,7 +381,7 @@ const Se = 80, xe = /* @__PURE__ */ z({
379
381
  }), Ne = { class: "g-loading__body" }, Be = {
380
382
  key: 0,
381
383
  class: "g-loading__text"
382
- }, De = { class: "g-loading__progress" }, Ae = /* @__PURE__ */ z({
384
+ }, De = { class: "g-loading__progress" }, Ve = /* @__PURE__ */ V({
383
385
  __name: "GLoading",
384
386
  props: $e({
385
387
  text: "Loading...",
@@ -395,9 +397,9 @@ const Se = 80, xe = /* @__PURE__ */ z({
395
397
  }),
396
398
  emits: ["close"],
397
399
  setup(t, { expose: n, emit: o }) {
398
- const a = t, c = o, u = N(!1), g = s(() => a.show || u.value), r = s(() => ({
399
- "--g-loading-overlay-opacity": a.opacity !== void 0 ? String(a.opacity) : void 0,
400
- "--g-loading-overlay-blur": a.blur !== void 0 ? m(a.blur) : void 0
400
+ const s = t, c = o, u = N(!1), g = a(() => s.show || u.value), r = a(() => ({
401
+ "--g-loading-overlay-opacity": s.opacity !== void 0 ? String(s.opacity) : void 0,
402
+ "--g-loading-overlay-blur": s.blur !== void 0 ? m(s.blur) : void 0
401
403
  }));
402
404
  function m(i) {
403
405
  return typeof i == "number" ? `${i}px` : i;
@@ -410,38 +412,38 @@ const Se = 80, xe = /* @__PURE__ */ z({
410
412
  }
411
413
  function _() {
412
414
  var i;
413
- (i = a.onClose) == null || i.call(a), c("close");
415
+ (i = s.onClose) == null || i.call(s), c("close");
414
416
  }
415
417
  return n({
416
418
  hide: x,
417
419
  show: y,
418
420
  isVisible: g
419
- }), (i, L) => (f(), F(h(xe), {
420
- transition: a.transition,
421
+ }), (i, L) => (f(), H(h(xe), {
422
+ transition: s.transition,
421
423
  name: "scale",
422
424
  onAfterLeave: _
423
425
  }, {
424
- default: H(() => [
426
+ default: W(() => [
425
427
  g.value ? (f(), S("div", {
426
428
  key: 0,
427
- class: b(["g-loading", { "g-loading_dark": a.dark }]),
428
- style: P(r.value),
429
+ class: b(["g-loading", { "g-loading_dark": s.dark }]),
430
+ style: z(r.value),
429
431
  "aria-live": "polite",
430
432
  "aria-busy": "true"
431
433
  }, [
432
434
  d("div", Ne, [
433
- a.noText ? B("", !0) : (f(), S("div", Be, [
435
+ s.noText ? B("", !0) : (f(), S("div", Be, [
434
436
  A(i.$slots, "default", {}, () => [
435
- W(I(a.text), 1)
437
+ I(j(s.text), 1)
436
438
  ])
437
439
  ])),
438
440
  d("div", De, [
439
- se(Ce, {
441
+ ae(Ce, {
440
442
  "no-label": "",
441
443
  indeterminate: "",
442
444
  "model-value": 100,
443
- color: a.color,
444
- view: a.progressView,
445
+ color: s.color,
446
+ view: s.progressView,
445
447
  size: "s"
446
448
  }, null, 8, ["color", "view"])
447
449
  ])
@@ -454,13 +456,13 @@ const Se = 80, xe = /* @__PURE__ */ z({
454
456
  });
455
457
  export {
456
458
  Ce as G,
457
- Ae as _,
459
+ Ve as _,
458
460
  xe as a,
459
461
  pe as b,
460
462
  ve as c,
461
463
  he as d,
462
464
  me as e,
463
- j as m,
465
+ U as m,
464
466
  be as r,
465
467
  ze as u
466
468
  };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),c=require("./surface-DB9flb-h.cjs");require("@mdi/js");const V=(n,o)=>{const r=n.__vccOpts||n;for(const[a,d]of o)r[a]=d;return r},$=c.propsFactory({size:{type:String,default:"m"}});function W(n,o){return e.computed(()=>`${o}_${n.size}`)}const I={fade:"g-fade-transition",scale:"g-scale-transition","scale-only":"g-scale-only-transition","slide-x":"g-slide-x-transition","slide-x-reverse":"g-slide-x-reverse-transition","slide-y":"g-slide-y-transition","slide-y-reverse":"g-slide-y-reverse-transition",dialog:"g-dialog-transition",overlay:"g-overlay-transition",expand:"g-expand-transition"},E=c.propsFactory({transition:{type:[Boolean,String,Object],default:void 0}},"transition"),z=c.propsFactory({...E(),name:String,appear:Boolean,disabled:Boolean,group:Boolean,tag:String,mode:String,origin:String,duration:[Number,String],enterDuration:[Number,String],leaveDuration:[Number,String],easing:String,enterEasing:String,leaveEasing:String,distance:[Number,String],scale:[Number,String],opacity:{type:Boolean,default:void 0},leaveAbsolute:Boolean,hideOnLeave:Boolean,css:{type:Boolean,default:!0}},"transition");function U(n){return n?I[n]??n:""}function j(n){if(!(n===void 0||n===""))return typeof n=="number"?`${n}px`:n}function T(n){if(!(n===void 0||n===""))return typeof n=="number"?`${n}ms`:n}function L(n,o){if(n===void 0||n==="")return o;if(typeof n=="number")return n;const r=n.trim();if(r.endsWith("ms"))return Number.parseFloat(r);if(r.endsWith("s"))return Number.parseFloat(r)*1e3;const a=Number.parseFloat(r);return Number.isNaN(a)?o:a}function P(n,o){return n===!1?{...o,disabled:!0}:n===!0||n===void 0?o:typeof n=="string"?{...o,name:n}:{...o,...n}}function D(){const n=e.ref(!1);let o=null;const r=()=>{n.value=(o==null?void 0:o.matches)??!1};return e.onMounted(()=>{typeof window>"u"||!window.matchMedia||(o=window.matchMedia("(prefers-reduced-motion: reduce)"),r(),o.addEventListener("change",r))}),e.onBeforeUnmount(()=>{o==null||o.removeEventListener("change",r)}),n}const q=80,M=e.defineComponent({inheritAttrs:!1,__name:"GTransition",props:z({name:"fade",css:!0}),emits:["before-enter","after-enter","before-leave","leave","after-leave","enter-cancelled","leave-cancelled"],setup(n,{emit:o}){const r=n,a=o,d=e.useAttrs(),u=D(),p=e.computed(()=>r.group?e.TransitionGroup:e.Transition),s=e.computed(()=>P(r.transition,N.value)),v=e.computed(()=>f.value?"":U(s.value.name)),f=e.computed(()=>r.disabled||u.value||s.value.disabled),_=e.computed(()=>r.group||s.value.mode==="default"?void 0:s.value.mode),y=e.computed(()=>!f.value&&s.value.css!==!1),i=e.computed(()=>{if(!b.value||f.value)return;const t=s.value;return{enter:L(t.enterDuration??t.duration,220),leave:L(t.leaveDuration??t.duration,180)+q}}),b=e.computed(()=>s.value.name==="overlay"||v.value==="g-overlay-transition"),N=e.computed(()=>({name:r.name,appear:r.appear,mode:r.mode,origin:r.origin,duration:r.duration,enterDuration:r.enterDuration,leaveDuration:r.leaveDuration,easing:r.easing,enterEasing:r.enterEasing,leaveEasing:r.leaveEasing,distance:r.distance,scale:r.scale,opacity:r.opacity,leaveAbsolute:r.leaveAbsolute,hideOnLeave:r.hideOnLeave,css:r.css})),C=e.computed(()=>{const t=s.value;return{"--g-transition-enter-duration":T(t.enterDuration??t.duration),"--g-transition-leave-duration":T(t.leaveDuration??t.duration),"--g-transition-enter-easing":t.enterEasing??t.easing,"--g-transition-leave-easing":t.leaveEasing??t.easing,"--g-transition-origin":t.origin,"--g-transition-distance":j(t.distance),"--g-transition-scale":t.scale===void 0?void 0:String(t.scale),"--g-transition-opacity-from":t.opacity===!1?"1":void 0}});function h(t){if(t instanceof HTMLElement)for(const[l,x]of Object.entries(C.value))x!==void 0&&t.style.setProperty(l,x)}function w(t){const{offsetTop:l,offsetLeft:x,offsetWidth:G,offsetHeight:H}=t;t._gTransitionInitialStyles={position:t.style.position,top:t.style.top,left:t.style.left,width:t.style.width,height:t.style.height,display:t.style.display},t.style.position="absolute",t.style.top=`${l}px`,t.style.left=`${x}px`,t.style.width=`${G}px`,t.style.height=`${H}px`}function S(t){const l=t._gTransitionInitialStyles;l&&(t.style.position=l.position,t.style.top=l.top,t.style.left=l.left,t.style.width=l.width,t.style.height=l.height,t.style.display=l.display,delete t._gTransitionInitialStyles)}function B(t){h(t),a("before-enter",t)}function g(t){a("after-enter",t)}function m(t){h(t),a("before-leave",t)}function k(t){if(!(t instanceof HTMLElement)){a("leave",t);return}s.value.leaveAbsolute&&w(t),s.value.hideOnLeave&&t.style.setProperty("display","none","important"),a("leave",t)}function O(t){t instanceof HTMLElement&&S(t),a("after-leave",t)}function F(t){a("enter-cancelled",t)}function R(t){t instanceof HTMLElement&&S(t),a("leave-cancelled",t)}return(t,l)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p.value),e.mergeProps(e.unref(d),{name:v.value,css:y.value,appear:s.value.appear,duration:i.value,mode:_.value,tag:r.group?r.tag:void 0,onBeforeEnter:B,onAfterEnter:g,onBeforeLeave:m,onLeave:k,onAfterLeave:O,onEnterCancelled:F,onLeaveCancelled:R}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16,["name","css","appear","duration","mode","tag"]))}}),J=c.propsFactory({...c.makeColorProps(),...c.makeRoundedProps(),...$(),...c.makeStateProps(),...c.makeSurfaceTextureProps(),modelValue:{type:Number,default:0},indeterminate:Boolean,noLabel:Boolean,label:String,labelAlign:{type:String,default:"center"},view:{type:String,default:"default"},segments:{type:Number,default:12}}),K={key:0,class:"g-progress__label"},Q=["aria-valuenow","aria-valuetext"],X=e.defineComponent({__name:"GProgress",props:J({color:"primary"}),setup(n){const o=n,{gradientStyles:r}=c.useSurfaceColor(o),a=e.ref(0),d=e.ref(null);let u;const p=e.computed(()=>Math.min(100,Math.max(0,o.modelValue))),s=c.usePx(a),v=e.computed(()=>Math.max(2,Math.round(o.segments))),f=e.computed(()=>Array.from({length:v.value-1},(g,m)=>m)),_=e.computed(()=>`${p.value}%`),y=e.computed(()=>o.label??`${Math.round(p.value)}%`),i=g=>({"--g-progress-segment-position":`${(g+1)/v.value*100}%`}),b=e.computed(()=>({"--g-progress-value":_.value,"--g-progress-track-width":s.value})),N=e.computed(()=>[r.value,b.value]),C=()=>{u=new ResizeObserver(g=>{for(const m of g)a.value=m.contentRect.width}),d.value&&u.observe(d.value)};e.onMounted(()=>{C()}),e.onBeforeUnmount(()=>{u==null||u.disconnect()});const{surfaceOverlayClasses:h,surfaceUnderlayClasses:w,surfaceTextureClasses:S,surfaceContentClasses:B}=c.useSurfaceLayers("g-progress");return(g,m)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["g-progress",{"g-progress_rounded":o.rounded,"g-progress_indeterminate":o.indeterminate,"g-progress_no-label":o.noLabel,[`g-progress_${o.size}`]:!0,[`g-progress_label-${o.labelAlign}`]:!0,[`g-progress_view-${o.view}`]:!0,[`g-progress_texture-${o.texture}`]:o.texture!=="none"}]),style:e.normalizeStyle(N.value)},[o.noLabel?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",K,[e.renderSlot(g.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(y.value),1)],!0)])),e.createElementVNode("div",{ref_key:"parentRef",ref:d,class:"g-progress__track",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":o.indeterminate?void 0:p.value,"aria-valuetext":o.indeterminate?void 0:y.value},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(w))},null,2),e.createElementVNode("span",{class:e.normalizeClass(e.unref(h))},null,2),e.createElementVNode("span",{class:e.normalizeClass(e.unref(S))},null,2),e.createElementVNode("div",{class:e.normalizeClass(["g-progress__surface-content",e.unref(B)])},[...m[0]||(m[0]=[e.createElementVNode("div",{class:"g-progress__bar"},[e.createElementVNode("div",{class:"g-progress__active"},[e.createElementVNode("div",{class:"g-progress__overlay"})])],-1)])],2),o.view==="segmented"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(f.value,k=>(e.openBlock(),e.createElementBlock("span",{key:k,class:"g-progress__segment-divider",style:e.normalizeStyle(i(k))},null,4))),128)):e.createCommentVNode("",!0)],8,Q)],6))}}),A=V(X,[["__scopeId","data-v-471d888d"]]),Y=c.propsFactory({...E(),text:String,noText:Boolean,show:Boolean,color:String,dark:Boolean,opacity:[Number,String],blur:[Number,String],progressView:String,onClose:Function}),Z={class:"g-loading__body"},ee={key:0,class:"g-loading__text"},te={class:"g-loading__progress"},ne=e.defineComponent({__name:"GLoading",props:Y({text:"Loading...",noText:!1,show:!1,color:"primary",dark:!1,opacity:void 0,blur:void 0,progressView:"glow",transition:()=>({name:"fade",duration:220}),onClose:void 0}),emits:["close"],setup(n,{expose:o,emit:r}){const a=n,d=r,u=e.ref(!1),p=e.computed(()=>a.show||u.value),s=e.computed(()=>({"--g-loading-overlay-opacity":a.opacity!==void 0?String(a.opacity):void 0,"--g-loading-overlay-blur":a.blur!==void 0?v(a.blur):void 0}));function v(i){return typeof i=="number"?`${i}px`:i}function f(){u.value=!0}function _(){u.value=!1}function y(){var i;(i=a.onClose)==null||i.call(a),d("close")}return o({hide:_,show:f,isVisible:p}),(i,b)=>(e.openBlock(),e.createBlock(e.unref(M),{transition:a.transition,name:"scale",onAfterLeave:y},{default:e.withCtx(()=>[p.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["g-loading",{"g-loading_dark":a.dark}]),style:e.normalizeStyle(s.value),"aria-live":"polite","aria-busy":"true"},[e.createElementVNode("div",Z,[a.noText?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ee,[e.renderSlot(i.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(a.text),1)])])),e.createElementVNode("div",te,[e.createVNode(A,{"no-label":"",indeterminate:"","model-value":100,color:a.color,view:a.progressView,size:"s"},null,8,["color","view"])])])],6)):e.createCommentVNode("",!0)]),_:3},8,["transition"]))}});exports.GProgress=A;exports._export_sfc=V;exports._sfc_main=ne;exports._sfc_main$1=M;exports.makeGTransitionProps=z;exports.makeSizeProps=$;exports.makeTransitionProps=E;exports.resolveTransitionOptions=P;exports.useReducedMotion=D;exports.useSize=W;