@m3ui-vue/m3ui-vue 1.0.3 → 1.1.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 (99) hide show
  1. package/dist/API.md +75 -11
  2. package/dist/MMenuItem-BOkcVtEe.js +809 -0
  3. package/dist/MMenuItem-BOkcVtEe.js.map +1 -0
  4. package/dist/{MSlider-CdNIH7jc.js → MSlider-BXsBv0ox.js} +208 -182
  5. package/dist/MSlider-BXsBv0ox.js.map +1 -0
  6. package/dist/{MTextField-B4X92vH_.js → MTextField-rML9jnXs.js} +2 -2
  7. package/dist/{MTextField-B4X92vH_.js.map → MTextField-rML9jnXs.js.map} +1 -1
  8. package/dist/api.json +1 -1
  9. package/dist/code-editor.js +1 -1
  10. package/dist/components/MBottomSheet.vue.d.ts +20 -1
  11. package/dist/components/MDialog.vue.d.ts +17 -8
  12. package/dist/components/MDragDropList.vue.d.ts +1 -1
  13. package/dist/components/MMap.vue.d.ts +4 -4
  14. package/dist/components/MMapControl.vue.d.ts +20 -3
  15. package/dist/components/MMapMarker.vue.d.ts +5 -2
  16. package/dist/components/MMapPopup.vue.d.ts +5 -3
  17. package/dist/components/MMenuItem.vue.d.ts +2 -2
  18. package/dist/components/MSeekBar.vue.d.ts +122 -0
  19. package/dist/components/MSplitButton.vue.d.ts +2 -2
  20. package/dist/components/_MMapAttribution.vue.d.ts +7 -0
  21. package/dist/composables/_mapPin.d.ts +5 -0
  22. package/dist/composables/_popupPosition.d.ts +12 -0
  23. package/dist/composables/_useCalendarMonth.d.ts +24 -0
  24. package/dist/composables/_useEscapeStack.d.ts +3 -0
  25. package/dist/composables/_useScrollLock.d.ts +8 -0
  26. package/dist/composables/_useSheetMotion.d.ts +16 -1
  27. package/dist/composables/useLocale.d.ts +8 -0
  28. package/dist/index.d.ts +2 -0
  29. package/dist/locales/index.js +56 -0
  30. package/dist/locales/index.js.map +1 -1
  31. package/dist/m3ui-vue.css +1 -1
  32. package/dist/m3ui.js +5269 -4714
  33. package/dist/m3ui.js.map +1 -1
  34. package/dist/map.js +777 -641
  35. package/dist/map.js.map +1 -1
  36. package/dist/rich-text-editor.js +8 -8
  37. package/dist/styles.css +1 -1
  38. package/dist/{useLocale-b5-hzsL3.js → useLocale-CqQrhWFl.js} +9 -1
  39. package/dist/useLocale-CqQrhWFl.js.map +1 -0
  40. package/package.json +1 -1
  41. package/src/__tests__/MDialog.test.ts +30 -0
  42. package/src/__tests__/MMap.test.ts +132 -2
  43. package/src/__tests__/MSeekBar.test.ts +170 -0
  44. package/src/__tests__/MTooltip.test.ts +110 -0
  45. package/src/__tests__/_fakeMaplibre.ts +3 -0
  46. package/src/__tests__/calendarMonth.test.ts +59 -0
  47. package/src/__tests__/pickerModals.test.ts +128 -0
  48. package/src/__tests__/popupPosition.test.ts +224 -0
  49. package/src/__tests__/scrollLock.test.ts +110 -0
  50. package/src/__tests__/sheets.test.ts +158 -0
  51. package/src/components/MAutocomplete.vue +2 -4
  52. package/src/components/MBottomSheet.vue +211 -13
  53. package/src/components/MCommandPalette.vue +4 -6
  54. package/src/components/MContextMenu.vue +19 -5
  55. package/src/components/MDatePicker.vue +29 -70
  56. package/src/components/MDatePickerModal.vue +116 -172
  57. package/src/components/MDateRangePicker.vue +29 -51
  58. package/src/components/MDateRangePickerModal.vue +84 -162
  59. package/src/components/MDialog.vue +87 -63
  60. package/src/components/MLightbox.vue +6 -3
  61. package/src/components/MMap.vue +74 -28
  62. package/src/components/MMapControl.vue +121 -7
  63. package/src/components/MMapIdentify.vue +2 -1
  64. package/src/components/MMapMarker.vue +14 -7
  65. package/src/components/MMapPopup.vue +8 -4
  66. package/src/components/MMenu.vue +31 -12
  67. package/src/components/MMenuItem.vue +21 -4
  68. package/src/components/MMultiAutocomplete.vue +2 -4
  69. package/src/components/MMultiSelect.vue +2 -4
  70. package/src/components/MNavigationDrawer.vue +2 -8
  71. package/src/components/MNavigationRail.vue +2 -3
  72. package/src/components/MSearchBar.vue +2 -5
  73. package/src/components/MSeekBar.vue +593 -0
  74. package/src/components/MSelect.vue +2 -8
  75. package/src/components/MSplitButton.vue +23 -7
  76. package/src/components/MSpotlightSearch.vue +4 -6
  77. package/src/components/MTimePicker.vue +23 -6
  78. package/src/components/MTimePickerModal.vue +213 -226
  79. package/src/components/MTooltip.vue +99 -3
  80. package/src/components/_MMapAttribution.vue +81 -0
  81. package/src/composables/_mapPin.ts +25 -0
  82. package/src/composables/_popupPosition.ts +39 -0
  83. package/src/composables/_useCalendarMonth.ts +74 -0
  84. package/src/composables/_useEscapeStack.ts +33 -0
  85. package/src/composables/_useScrollLock.ts +41 -0
  86. package/src/composables/_useSheetMotion.ts +82 -20
  87. package/src/composables/useLocale.ts +16 -0
  88. package/src/index.ts +2 -0
  89. package/src/locales/de.ts +8 -0
  90. package/src/locales/es.ts +8 -0
  91. package/src/locales/fr.ts +8 -0
  92. package/src/locales/ja.ts +8 -0
  93. package/src/locales/ko.ts +8 -0
  94. package/src/locales/pt.ts +8 -0
  95. package/src/locales/zh.ts +8 -0
  96. package/dist/MMenuItem-DFyXflk9.js +0 -707
  97. package/dist/MMenuItem-DFyXflk9.js.map +0 -1
  98. package/dist/MSlider-CdNIH7jc.js.map +0 -1
  99. package/dist/useLocale-b5-hzsL3.js.map +0 -1
@@ -1,9 +1,9 @@
1
- import { i as e } from "./useLocale-b5-hzsL3.js";
2
- import { a as t, c as n, o as r } from "./MTextField-B4X92vH_.js";
1
+ import { i as e } from "./useLocale-CqQrhWFl.js";
2
+ import { a as t, c as n, o as r } from "./MTextField-rML9jnXs.js";
3
3
  import { t as i } from "./MIcon-DLOkQduI.js";
4
4
  import { Fragment as a, Transition as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createTextVNode as f, createVNode as p, defineComponent as m, inject as h, mergeProps as g, normalizeClass as _, normalizeStyle as v, onBeforeUnmount as y, onMounted as b, onUnmounted as x, openBlock as S, provide as C, ref as w, renderList as T, renderSlot as E, resolveDynamicComponent as D, shallowRef as O, toDisplayString as k, unref as ee, useAttrs as te, useSlots as A, watch as j, withCtx as ne, withModifiers as M } from "vue";
5
5
  //#region src/composables/_storageKeys.ts
6
- var N = "m3-theme", re = "m3-dynamic-palette", P = "m3-viewport", F = /* @__PURE__ */ m({
6
+ var N = "m3-theme", P = "m3-dynamic-palette", F = "m3-viewport", I = /* @__PURE__ */ m({
7
7
  __name: "MAvatar",
8
8
  props: {
9
9
  name: {},
@@ -27,23 +27,49 @@ var N = "m3-theme", re = "m3-dynamic-palette", P = "m3-viewport", F = /* @__PURE
27
27
  })
28
28
  }, k(n.value), 5));
29
29
  }
30
- }), I = [
30
+ }), L = 1e3 / 60, R = .004;
31
+ function z(e, t, n, r, i) {
32
+ let a = [e], o = e, s = n, c = 2 * r.dampingRatio * Math.sqrt(r.stiffness);
33
+ for (let e = 0; e < 600; e++) {
34
+ for (let e = L / 1e3; e > 1e-9; e -= R) {
35
+ let n = Math.min(R, e);
36
+ s += (-r.stiffness * (o - t) - c * s) * n, o += s * n;
37
+ }
38
+ if (a.push(o), Math.abs(o - t) < i && Math.abs(s) < i * 10) break;
39
+ }
40
+ return a[a.length - 1] = t, a;
41
+ }
42
+ function B(e, t) {
43
+ let n = Number(t ?? 0) / L, r = Math.floor(n);
44
+ return r >= e.length - 1 ? e[e.length - 1] : r < 0 ? e[0] : e[r] + (e[r + 1] - e[r]) * (n - r);
45
+ }
46
+ var re = (e) => (e.length - 1) * L;
47
+ function V(e, t, n, r = 0) {
48
+ if (!e || typeof e.animate != "function" || t.length < 2) return null;
49
+ let i = e.animate(t.map(n), {
50
+ duration: re(t),
51
+ delay: r,
52
+ easing: "linear"
53
+ });
54
+ return i.finished.catch(() => {}), i;
55
+ }
56
+ var H = () => typeof window < "u" && !!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches, U = [
31
57
  "role",
32
58
  "tabindex",
33
59
  "aria-disabled"
34
- ], L = ["src", "alt"], R = {
60
+ ], W = ["src", "alt"], G = {
35
61
  key: 1,
36
62
  class: "px-4 pt-4 pb-2"
37
- }, z = {
63
+ }, ie = {
38
64
  key: 2,
39
65
  class: "px-4 pt-4 pb-2"
40
- }, ie = { class: "text-title-large font-medium text-on-surface" }, B = {
66
+ }, ae = { class: "text-title-large font-medium text-on-surface" }, K = {
41
67
  key: 0,
42
68
  class: "mt-1 text-body-medium text-on-surface-variant"
43
- }, V = {
69
+ }, oe = {
44
70
  key: 3,
45
71
  class: "flex justify-end gap-2 px-4 pt-2 pb-4"
46
- }, H = "relative before:content-[''] before:pointer-events-none before:absolute before:inset-0 before:bg-on-surface before:opacity-0 before:transition-opacity before:duration-150 hover:before:opacity-[0.08] active:before:opacity-[0.12]", ae = /* @__PURE__ */ m({
72
+ }, se = "relative before:content-[''] before:pointer-events-none before:absolute before:inset-0 before:bg-on-surface before:opacity-0 before:transition-opacity before:duration-150 hover:before:opacity-[0.08] active:before:opacity-[0.12]", q = /* @__PURE__ */ m({
47
73
  __name: "MCard",
48
74
  props: {
49
75
  variant: { default: "elevated" },
@@ -92,7 +118,7 @@ var N = "m3-theme", re = "m3-dynamic-palette", P = "m3-viewport", F = /* @__PURE
92
118
  o.value ? [
93
119
  "cursor-pointer",
94
120
  a[n.value],
95
- H
121
+ se
96
122
  ] : "",
97
123
  e.disabled ? "cursor-not-allowed pointer-events-none" : ""
98
124
  ]]),
@@ -110,20 +136,20 @@ var N = "m3-theme", re = "m3-dynamic-palette", P = "m3-viewport", F = /* @__PURE
110
136
  src: e.image,
111
137
  alt: e.imageAlt ?? "",
112
138
  class: "h-full w-full object-cover"
113
- }, null, 8, L)) : E(t.$slots, "media", {}, void 0, void 0, 1)], 2)) : l("", !0),
114
- t.$slots.header ? (S(), u("div", R, [E(t.$slots, "header")])) : e.title ? (S(), u("div", z, [d("h3", ie, k(e.title), 1), e.subtitle ? (S(), u("p", B, k(e.subtitle), 1)) : l("", !0)])) : l("", !0),
139
+ }, null, 8, W)) : E(t.$slots, "media", {}, void 0, void 0, 1)], 2)) : l("", !0),
140
+ t.$slots.header ? (S(), u("div", G, [E(t.$slots, "header")])) : e.title ? (S(), u("div", ie, [d("h3", ae, k(e.title), 1), e.subtitle ? (S(), u("p", K, k(e.subtitle), 1)) : l("", !0)])) : l("", !0),
115
141
  E(t.$slots, "default"),
116
- t.$slots.actions ? (S(), u("div", V, [E(t.$slots, "actions")])) : l("", !0)
117
- ], 46, I));
142
+ t.$slots.actions ? (S(), u("div", oe, [E(t.$slots, "actions")])) : l("", !0)
143
+ ], 46, U));
118
144
  }
119
- }), oe = { class: "relative -m-[11px] inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-full" }, se = [
145
+ }), ce = { class: "relative -m-[11px] inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-full" }, le = [
120
146
  "checked",
121
147
  "disabled",
122
148
  "aria-label"
123
- ], ce = {
149
+ ], ue = {
124
150
  key: 1,
125
151
  class: "pointer-events-none absolute inset-0 rounded-full ring-0 ring-secondary transition-[box-shadow] duration-150 peer-focus-visible:ring-2"
126
- }, U = /* @__PURE__ */ m({
152
+ }, de = /* @__PURE__ */ m({
127
153
  __name: "MCheckbox",
128
154
  props: {
129
155
  modelValue: { type: Boolean },
@@ -152,7 +178,7 @@ var N = "m3-theme", re = "m3-dynamic-palette", P = "m3-viewport", F = /* @__PURE
152
178
  tertiary: "bg-tertiary",
153
179
  error: "bg-error"
154
180
  };
155
- return (t, o) => (S(), u("label", { class: _(["group inline-flex items-center gap-2 select-none", e.disabled ? "cursor-not-allowed" : "cursor-pointer"]) }, [d("span", oe, [
181
+ return (t, o) => (S(), u("label", { class: _(["group inline-flex items-center gap-2 select-none", e.disabled ? "cursor-not-allowed" : "cursor-pointer"]) }, [d("span", ce, [
156
182
  d("input", {
157
183
  type: "checkbox",
158
184
  class: "peer sr-only",
@@ -160,12 +186,12 @@ var N = "m3-theme", re = "m3-dynamic-palette", P = "m3-viewport", F = /* @__PURE
160
186
  disabled: e.disabled,
161
187
  "aria-label": e.ariaLabel,
162
188
  onChange: o[0] ||= (t) => n("update:modelValue", !e.modelValue)
163
- }, null, 40, se),
189
+ }, null, 40, le),
164
190
  e.disabled ? l("", !0) : (S(), u("span", {
165
191
  key: 0,
166
192
  class: _(["pointer-events-none absolute inset-0 rounded-full opacity-0 transition-opacity duration-150 group-hover:opacity-[0.08] group-active:opacity-[0.12]", e.modelValue || e.indeterminate ? a[e.color] : "bg-on-surface"])
167
193
  }, null, 2)),
168
- e.disabled ? l("", !0) : (S(), u("span", ce)),
194
+ e.disabled ? l("", !0) : (S(), u("span", ue)),
169
195
  d("span", { class: _(["relative inline-flex h-4.5 w-4.5 items-center justify-center rounded-[2px] border-2 transition-colors", e.disabled ? e.modelValue || e.indeterminate ? "border-on-surface/38 bg-on-surface/38 text-surface" : "border-on-surface/38 text-transparent" : e.modelValue || e.indeterminate ? r[e.color] : "border-on-surface-variant text-transparent group-hover:border-on-surface group-active:border-on-surface"]) }, [p(i, {
170
196
  name: e.indeterminate ? "remove" : "check",
171
197
  size: 18,
@@ -176,7 +202,7 @@ var N = "m3-theme", re = "m3-dynamic-palette", P = "m3-viewport", F = /* @__PURE
176
202
  class: _(["text-body-large", e.disabled ? "text-on-surface/38" : "text-on-surface"])
177
203
  }, [E(t.$slots, "default", {}, () => [f(k(e.label), 1)])], 2)) : l("", !0)], 2));
178
204
  }
179
- }), W = ["disabled", "aria-pressed"], G = { class: "whitespace-nowrap" }, K = ["aria-label", "disabled"], q = ["aria-label", "disabled"], le = "relative cursor-pointer before:content-[''] before:pointer-events-none before:absolute before:inset-0 before:bg-current before:opacity-0 before:transition-opacity before:duration-150 hover:before:opacity-[0.08] active:before:opacity-[0.12] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-secondary", ue = /* @__PURE__ */ m({
205
+ }), J = ["disabled", "aria-pressed"], Y = { class: "whitespace-nowrap" }, fe = ["aria-label", "disabled"], X = ["aria-label", "disabled"], pe = "relative cursor-pointer before:content-[''] before:pointer-events-none before:absolute before:inset-0 before:bg-current before:opacity-0 before:transition-opacity before:duration-150 hover:before:opacity-[0.08] active:before:opacity-[0.12] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-secondary", Z = /* @__PURE__ */ m({
180
206
  __name: "MChip",
181
207
  props: {
182
208
  tone: { default: "neutral" },
@@ -241,30 +267,30 @@ var N = "m3-theme", re = "m3-dynamic-palette", P = "m3-viewport", F = /* @__PURE
241
267
  if (e) return ["bg-secondary-container text-on-secondary-container", m.elevated ? "shadow-elevation-1 hover:shadow-elevation-2" : ""];
242
268
  let t = m.type === "assist" ? "text-on-surface" : "text-on-surface-variant";
243
269
  return m.elevated && m.type !== "input" ? ["bg-surface-container-low shadow-elevation-1 hover:shadow-elevation-2", t] : ["border border-outline-variant", t];
244
- }), N = s(() => m.disabled ? "" : m.type === "assist" || m.type === "suggestion" ? "text-primary" : m.selected ? "text-on-secondary-container" : "text-on-surface-variant"), re = s(() => m.type === "input" ? [k.value ? "pl-1" : m.icon ? "pl-2" : "pl-3", te.value ? "pr-2" : "pr-3"] : [m.icon || L.value ? "pl-2" : "pl-4", te.value ? "pr-2" : "pr-4"]), P = w(!1), F = w(), I = w(), L = s(() => m.type === "filter" && !m.icon);
245
- n(() => m.type === "filter" || m.type === "input" ? [P.value ? 8 : m.selected ? 16 : 12, L.value ? m.selected ? 26 : 8 : 0] : [], ([e, t]) => {
246
- F.value && e !== void 0 && (F.value.style.borderRadius = `${e}px`), I.value && t !== void 0 && (I.value.style.width = `${t}px`);
247
- }, r), n(() => L.value ? [+!!m.selected] : [], ([e]) => {
248
- I.value && e !== void 0 && (I.value.style.opacity = String(e));
270
+ }), N = s(() => m.disabled ? "" : m.type === "assist" || m.type === "suggestion" ? "text-primary" : m.selected ? "text-on-secondary-container" : "text-on-surface-variant"), P = s(() => m.type === "input" ? [k.value ? "pl-1" : m.icon ? "pl-2" : "pl-3", te.value ? "pr-2" : "pr-3"] : [m.icon || R.value ? "pl-2" : "pl-4", te.value ? "pr-2" : "pr-4"]), F = w(!1), I = w(), L = w(), R = s(() => m.type === "filter" && !m.icon);
271
+ n(() => m.type === "filter" || m.type === "input" ? [F.value ? 8 : m.selected ? 16 : 12, R.value ? m.selected ? 26 : 8 : 0] : [], ([e, t]) => {
272
+ I.value && e !== void 0 && (I.value.style.borderRadius = `${e}px`), L.value && t !== void 0 && (L.value.style.width = `${t}px`);
273
+ }, r), n(() => R.value ? [+!!m.selected] : [], ([e]) => {
274
+ L.value && e !== void 0 && (L.value.style.opacity = String(e));
249
275
  }, t);
250
- function R() {
276
+ function z() {
251
277
  m.disabled || (O.value && h("update:selected", !m.selected), h("click"));
252
278
  }
253
279
  return (e, t) => a.type ? (S(), u("span", {
254
280
  key: 0,
255
281
  ref_key: "typedEl",
256
- ref: F,
282
+ ref: I,
257
283
  class: _(["relative inline-flex h-8 items-center overflow-hidden align-middle text-label-large transition-[background-color,box-shadow,color] has-[button:focus-visible]:ring-2 has-[button:focus-visible]:ring-inset has-[button:focus-visible]:ring-secondary", [j.value, a.type === "assist" || a.type === "suggestion" ? "rounded-sm" : "rounded-md"]])
258
284
  }, [d("button", {
259
285
  type: "button",
260
- class: _(["flex h-full items-center gap-2 outline-none before:pointer-events-none before:absolute before:inset-0 before:bg-current before:opacity-0 before:transition-opacity", [re.value, a.disabled ? "cursor-not-allowed" : "cursor-pointer hover:before:opacity-[0.08] active:before:opacity-[0.12]"]]),
286
+ class: _(["flex h-full items-center gap-2 outline-none before:pointer-events-none before:absolute before:inset-0 before:bg-current before:opacity-0 before:transition-opacity", [P.value, a.disabled ? "cursor-not-allowed" : "cursor-pointer hover:before:opacity-[0.08] active:before:opacity-[0.12]"]]),
261
287
  disabled: a.disabled,
262
288
  "aria-pressed": O.value ? a.selected : void 0,
263
- onPointerdown: t[0] ||= (e) => P.value = !0,
264
- onPointerup: t[1] ||= (e) => P.value = !1,
265
- onPointerleave: t[2] ||= (e) => P.value = !1,
266
- onPointercancel: t[3] ||= (e) => P.value = !1,
267
- onClick: R
289
+ onPointerdown: t[0] ||= (e) => F.value = !0,
290
+ onPointerup: t[1] ||= (e) => F.value = !1,
291
+ onPointerleave: t[2] ||= (e) => F.value = !1,
292
+ onPointercancel: t[3] ||= (e) => F.value = !1,
293
+ onClick: z
268
294
  }, [
269
295
  k.value ? (S(), u("span", {
270
296
  key: 0,
@@ -279,10 +305,10 @@ var N = "m3-theme", re = "m3-dynamic-palette", P = "m3-viewport", F = /* @__PURE
279
305
  "name",
280
306
  "filled",
281
307
  "class"
282
- ])) : L.value ? (S(), u("span", {
308
+ ])) : R.value ? (S(), u("span", {
283
309
  key: 2,
284
310
  ref_key: "checkEl",
285
- ref: I,
311
+ ref: L,
286
312
  class: "-mr-2 flex shrink-0 overflow-hidden",
287
313
  style: {
288
314
  width: "8px",
@@ -294,14 +320,14 @@ var N = "m3-theme", re = "m3-dynamic-palette", P = "m3-viewport", F = /* @__PURE
294
320
  size: 18,
295
321
  class: _(["shrink-0", N.value])
296
322
  }, null, 8, ["class"])], 512)) : l("", !0),
297
- d("span", G, [E(e.$slots, "default")]),
323
+ d("span", Y, [E(e.$slots, "default")]),
298
324
  a.trailingIcon ? (S(), c(i, {
299
325
  key: 3,
300
326
  name: a.trailingIcon,
301
327
  size: 18,
302
328
  class: _(["shrink-0", a.disabled ? "" : a.selected && O.value ? "text-on-secondary-container" : "text-on-surface-variant"])
303
329
  }, null, 8, ["name", "class"])) : l("", !0)
304
- ], 42, W), a.type === "input" && a.removable ? (S(), u("button", {
330
+ ], 42, J), a.type === "input" && a.removable ? (S(), u("button", {
305
331
  key: 0,
306
332
  type: "button",
307
333
  class: _(["relative -ml-1 mr-2 flex h-6 w-6 shrink-0 items-center justify-center rounded-full outline-none hover:bg-on-surface/8 focus-visible:ring-2 focus-visible:ring-secondary", a.disabled ? "cursor-not-allowed" : "cursor-pointer"]),
@@ -311,14 +337,14 @@ var N = "m3-theme", re = "m3-dynamic-palette", P = "m3-viewport", F = /* @__PURE
311
337
  }, [p(i, {
312
338
  name: "close",
313
339
  size: 18
314
- })], 10, K)) : l("", !0)], 2)) : (S(), c(D(a.clickable ? "button" : "span"), {
340
+ })], 10, fe)) : l("", !0)], 2)) : (S(), c(D(a.clickable ? "button" : "span"), {
315
341
  key: 1,
316
342
  type: a.clickable ? "button" : void 0,
317
343
  disabled: a.clickable && a.disabled ? !0 : void 0,
318
344
  class: _(["inline-flex h-8 items-center gap-1.5 overflow-hidden px-3 text-label-large transition-colors", [
319
345
  T.value,
320
346
  C.value,
321
- a.clickable && !a.disabled ? le : "",
347
+ a.clickable && !a.disabled ? pe : "",
322
348
  a.disabled ? "cursor-not-allowed" : ""
323
349
  ]]),
324
350
  style: v(x.value),
@@ -341,7 +367,7 @@ var N = "m3-theme", re = "m3-dynamic-palette", P = "m3-viewport", F = /* @__PURE
341
367
  }, [p(i, {
342
368
  name: "close",
343
369
  size: 16
344
- })], 8, q)) : l("", !0)
370
+ })], 8, X)) : l("", !0)
345
371
  ]),
346
372
  _: 3
347
373
  }, 8, [
@@ -351,7 +377,7 @@ var N = "m3-theme", re = "m3-dynamic-palette", P = "m3-viewport", F = /* @__PURE
351
377
  "style"
352
378
  ]));
353
379
  }
354
- }), de = /* @__PURE__ */ m({
380
+ }), Q = /* @__PURE__ */ m({
355
381
  __name: "MList",
356
382
  props: {
357
383
  dense: {
@@ -413,10 +439,10 @@ var N = "m3-theme", re = "m3-dynamic-palette", P = "m3-viewport", F = /* @__PURE
413
439
  class: _(l.value)
414
440
  }, [E(e.$slots, "default")], 2));
415
441
  }
416
- }), J = { class: "relative -my-2 inline-flex h-12 shrink-0 items-center" }, Y = ["checked", "disabled"], fe = {
442
+ }), $ = { class: "relative -my-2 inline-flex h-12 shrink-0 items-center" }, me = ["checked", "disabled"], he = {
417
443
  key: 0,
418
444
  class: "text-body-large text-on-surface"
419
- }, X = "bg-outline group-hover:bg-on-surface-variant group-active:bg-on-surface-variant peer-focus-visible:bg-on-surface-variant", pe = /* @__PURE__ */ m({
445
+ }, ge = "bg-outline group-hover:bg-on-surface-variant group-active:bg-on-surface-variant peer-focus-visible:bg-on-surface-variant", _e = /* @__PURE__ */ m({
420
446
  __name: "MSwitch",
421
447
  props: {
422
448
  modelValue: { type: Boolean },
@@ -473,14 +499,14 @@ var N = "m3-theme", re = "m3-dynamic-palette", P = "m3-viewport", F = /* @__PURE
473
499
  onPointerup: b,
474
500
  onPointerleave: b,
475
501
  onPointercancel: b
476
- }, [d("span", J, [d("span", { class: _(["relative inline-flex h-8 w-[52px] items-center rounded-full border-2 transition-colors duration-200", e.modelValue ? a[e.color] : "border-outline bg-surface-container-highest"]) }, [
502
+ }, [d("span", $, [d("span", { class: _(["relative inline-flex h-8 w-[52px] items-center rounded-full border-2 transition-colors duration-200", e.modelValue ? a[e.color] : "border-outline bg-surface-container-highest"]) }, [
477
503
  d("input", {
478
504
  type: "checkbox",
479
505
  class: "peer sr-only",
480
506
  checked: e.modelValue,
481
507
  disabled: e.disabled,
482
508
  onChange: n[0] ||= (t) => r("update:modelValue", !e.modelValue)
483
- }, null, 40, Y),
509
+ }, null, 40, me),
484
510
  e.disabled ? l("", !0) : (S(), u("span", {
485
511
  key: 0,
486
512
  class: _(["pointer-events-none absolute top-1/2 -left-1 h-10 w-10 -translate-y-1/2 rounded-full opacity-0 transition-opacity duration-150 group-hover:opacity-[0.08] group-active:opacity-[0.12] peer-focus-visible:opacity-[0.08]", e.modelValue ? h[e.color] : "bg-on-surface-variant"]),
@@ -492,7 +518,7 @@ var N = "m3-theme", re = "m3-dynamic-palette", P = "m3-viewport", F = /* @__PURE
492
518
  style: v(T.value)
493
519
  }, null, 4)),
494
520
  d("span", {
495
- class: _(["absolute left-1 top-1/2 flex h-6 w-6 items-center justify-center rounded-full will-change-transform", e.modelValue ? [f[e.color], "shadow-sm"] : X]),
521
+ class: _(["absolute left-1 top-1/2 flex h-6 w-6 items-center justify-center rounded-full will-change-transform", e.modelValue ? [f[e.color], "shadow-sm"] : ge]),
496
522
  style: v(C.value)
497
523
  }, [p(o, {
498
524
  "enter-active-class": "transition-opacity duration-150 delay-[120ms]",
@@ -510,12 +536,12 @@ var N = "m3-theme", re = "m3-dynamic-palette", P = "m3-viewport", F = /* @__PURE
510
536
  }, null, 8, ["class"])) : l("", !0)]),
511
537
  _: 1
512
538
  })], 6)
513
- ], 2)]), e.label ? (S(), u("span", fe, k(e.label), 1)) : l("", !0)], 34));
539
+ ], 2)]), e.label ? (S(), u("span", he, k(e.label), 1)) : l("", !0)], 34));
514
540
  }
515
- }), Z = { class: "min-w-0 flex-1" }, Q = {
541
+ }), ve = { class: "min-w-0 flex-1" }, ye = {
516
542
  key: 0,
517
543
  class: "mli-expand-grid"
518
- }, $ = { class: "mli-expand-body" }, me = ["src"], he = { class: "min-w-0 flex-1" }, ge = 4, _e = 8, ve = 16, ye = /* @__PURE__ */ m({
544
+ }, be = { class: "mli-expand-body" }, xe = ["src"], Se = { class: "min-w-0 flex-1" }, Ce = 4, we = 8, Te = 16, Ee = /* @__PURE__ */ m({
519
545
  __name: "MListItem",
520
546
  props: {
521
547
  title: {},
@@ -566,54 +592,54 @@ var N = "m3-theme", re = "m3-dynamic-palette", P = "m3-viewport", F = /* @__PURE
566
592
  tertiary: "bg-tertiary-container text-on-tertiary-container",
567
593
  error: "bg-error-container text-on-error-container",
568
594
  success: "bg-success-container text-on-success-container"
569
- }, A = s(() => y?.dense.value ?? !1), M = s(() => y?.nav.value ?? !1), N = s(() => y?.segmented.value ?? !1), re = s(() => y?.dividers.value ?? !1), P = s(() => C.value ? "text-on-secondary-container" : "text-on-surface"), I = s(() => C.value ? "text-on-secondary-container" : "text-on-surface-variant"), L = s(() => A.value ? "" : b.value === 3 ? "min-h-22" : b.value === 2 ? "min-h-18" : "min-h-14"), R = s(() => [
595
+ }, A = s(() => y?.dense.value ?? !1), M = s(() => y?.nav.value ?? !1), N = s(() => y?.segmented.value ?? !1), P = s(() => y?.dividers.value ?? !1), F = s(() => C.value ? "text-on-secondary-container" : "text-on-surface"), L = s(() => C.value ? "text-on-secondary-container" : "text-on-surface-variant"), R = s(() => A.value ? "" : b.value === 3 ? "min-h-22" : b.value === 2 ? "min-h-18" : "min-h-14"), z = s(() => [
570
596
  "mli-row relative flex w-full items-center gap-4 text-left",
571
597
  N.value ? "bg-surface-container px-4" : M.value ? "rounded-full px-4" : "px-4",
572
598
  A.value ? "py-1" : b.value === 3 ? "py-3" : "py-2",
573
- L.value,
599
+ R.value,
574
600
  x.value && !r.disabled && "cursor-pointer transition-colors duration-150 hover:bg-on-surface/8 active:bg-on-surface/12",
575
601
  C.value && "bg-secondary-container text-on-secondary-container",
576
602
  r.disabled && "opacity-[0.38] pointer-events-none"
577
- ]), z = w(null), ie = w(null), B = (e) => e && "$el" in e ? e.$el : e, V = w(!1), H = w(!1), ae = w(!1), oe = s(() => N.value ? y?.segmentPosition(B(z.value)) : void 0), se = s(() => {
603
+ ]), B = w(null), re = w(null), V = (e) => e && "$el" in e ? e.$el : e, H = w(!1), U = w(!1), W = w(!1), G = s(() => N.value ? y?.segmentPosition(V(B.value)) : void 0), ie = s(() => {
578
604
  if (M.value) return [];
579
- let e = x.value && !r.disabled, t = e && H.value || C.value || e && ae.value ? ve : e && V.value ? _e : null;
605
+ let e = x.value && !r.disabled, t = e && U.value || C.value || e && W.value ? Te : e && H.value ? we : null;
580
606
  if (t !== null) return [
581
607
  t,
582
608
  t,
583
609
  t,
584
610
  t
585
611
  ];
586
- let n = oe.value, i = n === "first" || n === "single" ? ve : ge, a = n === "last" || n === "single" ? ve : ge;
612
+ let n = G.value, i = n === "first" || n === "single" ? Te : Ce, a = n === "last" || n === "single" ? Te : Ce;
587
613
  return [
588
614
  i,
589
615
  i,
590
616
  a,
591
617
  a
592
618
  ];
593
- }), { snap: ce } = n(() => se.value, (e) => {
594
- let t = ie.value ?? B(z.value);
619
+ }), { snap: ae } = n(() => ie.value, (e) => {
620
+ let t = re.value ?? V(B.value);
595
621
  t && (t.style.borderRadius = e.length ? e.map((e) => `${e}px`).join(" ") : "");
596
622
  });
597
- j([oe, M], () => ce());
598
- function W(e) {
599
- e.pointerType !== "touch" && (V.value = !0);
623
+ j([G, M], () => ae());
624
+ function K(e) {
625
+ e.pointerType !== "touch" && (H.value = !0);
600
626
  }
601
- function G() {
602
- V.value = !1, H.value = !1;
627
+ function oe() {
628
+ H.value = !1, U.value = !1;
603
629
  }
604
- function K(e) {
605
- e.button === 0 && (H.value = !0);
630
+ function se(e) {
631
+ e.button === 0 && (U.value = !0);
606
632
  }
607
633
  function q() {
608
- H.value = !1;
634
+ U.value = !1;
609
635
  }
610
- function le(e) {
611
- ae.value = e.currentTarget.matches(":focus-visible");
636
+ function ce(e) {
637
+ W.value = e.currentTarget.matches(":focus-visible");
612
638
  }
613
- function ue() {
614
- ae.value = !1;
639
+ function le() {
640
+ W.value = !1;
615
641
  }
616
- let de = s(() => r.href ? "a" : r.to ? "router-link" : r.expandable ? "div" : "li"), J = s(() => r.href ? { href: r.href } : r.to ? { to: r.to } : {});
642
+ let ue = s(() => r.href ? "a" : r.to ? "router-link" : r.expandable ? "div" : "li"), J = s(() => r.href ? { href: r.href } : r.to ? { to: r.to } : {});
617
643
  function Y(e) {
618
644
  r.disabled || (m.value = !m.value, a("update:expanded", m.value), a("click", e));
619
645
  }
@@ -632,16 +658,16 @@ var N = "m3-theme", re = "m3-dynamic-palette", P = "m3-viewport", F = /* @__PURE
632
658
  return (t, n) => e.expandable ? (S(), u("li", {
633
659
  key: 0,
634
660
  ref_key: "rootEl",
635
- ref: z,
661
+ ref: B,
636
662
  role: "listitem"
637
663
  }, [d("div", {
638
664
  ref_key: "shapeEl",
639
- ref: ie,
640
- class: _(R.value),
665
+ ref: re,
666
+ class: _(z.value),
641
667
  onClick: fe,
642
- onPointerenter: W,
643
- onPointerleave: G,
644
- onPointerdown: K,
668
+ onPointerenter: K,
669
+ onPointerleave: oe,
670
+ onPointerdown: se,
645
671
  onPointerup: q,
646
672
  onPointercancel: q
647
673
  }, [
@@ -649,56 +675,56 @@ var N = "m3-theme", re = "m3-dynamic-palette", P = "m3-viewport", F = /* @__PURE
649
675
  key: 0,
650
676
  name: e.icon,
651
677
  size: 24,
652
- class: _(["shrink-0", I.value])
678
+ class: _(["shrink-0", L.value])
653
679
  }, null, 8, ["name", "class"])) : l("", !0)]),
654
- d("div", Z, [E(t.$slots, "overline", {}, () => [e.overline ? (S(), u("p", {
680
+ d("div", ve, [E(t.$slots, "overline", {}, () => [e.overline ? (S(), u("p", {
655
681
  key: 0,
656
- class: _(["truncate text-label-small", I.value])
657
- }, k(e.overline), 3)) : l("", !0)]), E(t.$slots, "default", {}, () => [d("p", { class: _(["truncate text-body-large", P.value]) }, k(e.title), 3), e.subtitle && b.value >= 2 ? (S(), u("p", {
682
+ class: _(["truncate text-label-small", L.value])
683
+ }, k(e.overline), 3)) : l("", !0)]), E(t.$slots, "default", {}, () => [d("p", { class: _(["truncate text-body-large", F.value]) }, k(e.title), 3), e.subtitle && b.value >= 2 ? (S(), u("p", {
658
684
  key: 0,
659
- class: _(["text-body-medium", [I.value, b.value === 2 && "truncate"]])
685
+ class: _(["text-body-medium", [L.value, b.value === 2 && "truncate"]])
660
686
  }, k(e.subtitle), 3)) : l("", !0)])]),
661
687
  p(i, {
662
688
  name: v.value ? "expand_less" : "expand_more",
663
689
  size: 20,
664
- class: _(["shrink-0", I.value])
690
+ class: _(["shrink-0", L.value])
665
691
  }, null, 8, ["name", "class"])
666
692
  ], 34), p(o, { name: "mli-expand" }, {
667
- default: ne(() => [v.value ? (S(), u("div", Q, [d("div", $, [E(t.$slots, "children")])])) : l("", !0)]),
693
+ default: ne(() => [v.value ? (S(), u("div", ye, [d("div", be, [E(t.$slots, "children")])])) : l("", !0)]),
668
694
  _: 3
669
- })], 512)) : (S(), c(D(de.value), g({
695
+ })], 512)) : (S(), c(D(ue.value), g({
670
696
  key: 1,
671
- class: R.value,
697
+ class: z.value,
672
698
  ref_key: "rootEl",
673
- ref: z
699
+ ref: B
674
700
  }, J.value, {
675
701
  role: "listitem",
676
702
  onClick: fe,
677
- onPointerenter: W,
678
- onPointerleave: G,
679
- onPointerdown: K,
703
+ onPointerenter: K,
704
+ onPointerleave: oe,
705
+ onPointerdown: se,
680
706
  onPointerup: q,
681
707
  onPointercancel: q,
682
- onFocus: le,
683
- onBlur: ue
708
+ onFocus: ce,
709
+ onBlur: le
684
710
  }), {
685
711
  default: ne(() => [
686
- re.value ? (S(), u("div", {
712
+ P.value ? (S(), u("div", {
687
713
  key: 0,
688
- class: _(["absolute top-0 right-0 h-px bg-outline-variant", re.value === "inset" ? "left-16" : "left-0"])
714
+ class: _(["absolute top-0 right-0 h-px bg-outline-variant", P.value === "inset" ? "left-16" : "left-0"])
689
715
  }, null, 2)) : l("", !0),
690
716
  E(t.$slots, "leading", {}, () => [T.value === "icon" ? (S(), c(i, {
691
717
  key: 0,
692
718
  name: e.icon,
693
719
  size: 24,
694
- class: _(["shrink-0", I.value])
720
+ class: _(["shrink-0", L.value])
695
721
  }, null, 8, ["name", "class"])) : T.value === "icon-container" ? (S(), u("div", {
696
722
  key: 1,
697
723
  class: _(["flex h-10 w-10 shrink-0 items-center justify-center rounded-full", ee[e.iconContainerColor || "primary"]])
698
724
  }, [p(i, {
699
725
  name: e.icon,
700
726
  size: 24
701
- }, null, 8, ["name"])], 2)) : T.value === "avatar" ? (S(), c(F, {
727
+ }, null, 8, ["name"])], 2)) : T.value === "avatar" ? (S(), c(I, {
702
728
  key: 2,
703
729
  name: e.avatarName,
704
730
  size: 40,
@@ -708,38 +734,38 @@ var N = "m3-theme", re = "m3-dynamic-palette", P = "m3-viewport", F = /* @__PURE
708
734
  src: e.image,
709
735
  alt: "",
710
736
  class: "h-14 w-14 shrink-0 rounded-md object-cover"
711
- }, null, 8, me)) : T.value === "checkbox" ? (S(), c(U, {
737
+ }, null, 8, xe)) : T.value === "checkbox" ? (S(), c(de, {
712
738
  key: 4,
713
739
  "model-value": C.value,
714
740
  class: "shrink-0"
715
741
  }, null, 8, ["model-value"])) : l("", !0)]),
716
- d("div", he, [E(t.$slots, "overline", {}, () => [e.overline ? (S(), u("p", {
742
+ d("div", Se, [E(t.$slots, "overline", {}, () => [e.overline ? (S(), u("p", {
717
743
  key: 0,
718
- class: _(["truncate text-label-small", I.value])
744
+ class: _(["truncate text-label-small", L.value])
719
745
  }, k(e.overline), 3)) : l("", !0)]), E(t.$slots, "default", {}, () => [
720
- d("p", { class: _(["truncate text-body-large", P.value]) }, k(e.title), 3),
746
+ d("p", { class: _(["truncate text-body-large", F.value]) }, k(e.title), 3),
721
747
  e.subtitle && b.value >= 2 ? (S(), u("p", {
722
748
  key: 0,
723
- class: _(["text-body-medium", [I.value, b.value === 2 && "truncate"]])
749
+ class: _(["text-body-medium", [L.value, b.value === 2 && "truncate"]])
724
750
  }, k(e.subtitle), 3)) : l("", !0),
725
751
  e.description && b.value >= 3 ? (S(), u("p", {
726
752
  key: 1,
727
- class: _(["line-clamp-2 text-body-small", I.value])
753
+ class: _(["line-clamp-2 text-body-small", L.value])
728
754
  }, k(e.description), 3)) : l("", !0)
729
755
  ])]),
730
756
  E(t.$slots, "trailing", {}, () => [O.value === "icon" ? (S(), c(i, {
731
757
  key: 0,
732
758
  name: e.trailingIcon,
733
759
  size: 24,
734
- class: _(["shrink-0", I.value])
760
+ class: _(["shrink-0", L.value])
735
761
  }, null, 8, ["name", "class"])) : O.value === "text" ? (S(), u("span", {
736
762
  key: 1,
737
- class: _(["shrink-0 text-label-small", I.value])
738
- }, k(e.trailingText), 3)) : O.value === "switch" ? (S(), c(pe, {
763
+ class: _(["shrink-0 text-label-small", L.value])
764
+ }, k(e.trailingText), 3)) : O.value === "switch" ? (S(), c(_e, {
739
765
  key: 2,
740
766
  "model-value": !!e.trailingValue,
741
767
  "onUpdate:modelValue": X
742
- }, null, 8, ["model-value"])) : O.value === "checkbox" ? (S(), c(U, {
768
+ }, null, 8, ["model-value"])) : O.value === "checkbox" ? (S(), c(de, {
743
769
  key: 3,
744
770
  "model-value": !!e.trailingValue,
745
771
  "onUpdate:modelValue": X
@@ -748,22 +774,22 @@ var N = "m3-theme", re = "m3-dynamic-palette", P = "m3-viewport", F = /* @__PURE
748
774
  _: 3
749
775
  }, 16, ["class"]));
750
776
  }
751
- }), be = {
777
+ }), De = {
752
778
  key: 0,
753
779
  class: "flex items-center justify-between"
754
- }, xe = {
780
+ }, Oe = {
755
781
  key: 0,
756
782
  class: "text-label-large text-on-surface"
757
- }, Se = {
783
+ }, ke = {
758
784
  key: 1,
759
785
  class: "tabular-nums text-label-large text-on-surface-variant"
760
- }, Ce = [
786
+ }, Ae = [
761
787
  "aria-valuenow",
762
788
  "aria-valuemin",
763
789
  "aria-valuemax",
764
790
  "aria-disabled",
765
791
  "aria-orientation"
766
- ], we = "color-mix(in srgb, var(--color-on-surface) 38%, transparent)", Te = "color-mix(in srgb, var(--color-on-surface) 12%, transparent)", Ee = /* @__PURE__ */ m({
792
+ ], je = "color-mix(in srgb, var(--color-on-surface) 38%, transparent)", Me = "color-mix(in srgb, var(--color-on-surface) 12%, transparent)", Ne = /* @__PURE__ */ m({
767
793
  __name: "MSlider",
768
794
  props: {
769
795
  modelValue: {},
@@ -883,65 +909,65 @@ var N = "m3-theme", re = "m3-dynamic-palette", P = "m3-viewport", F = /* @__PURE
883
909
  iconSize: 28,
884
910
  thumbIconSize: 66
885
911
  }
886
- }, j = s(() => A[n.size] ?? A.xs), M = s(() => j.value.thumbInset + j.value.thumbW / 2 + j.value.iconSize / 2 + 3), N = s(() => n.thumbIcon ? Math.max(j.value.gap, j.value.thumbIconSize / 2 + 4) : j.value.gap), re = {
912
+ }, j = s(() => A[n.size] ?? A.xs), M = s(() => j.value.thumbInset + j.value.thumbW / 2 + j.value.iconSize / 2 + 3), N = s(() => n.thumbIcon ? Math.max(j.value.gap, j.value.thumbIconSize / 2 + 4) : j.value.gap), P = {
887
913
  primary: "var(--color-primary)",
888
914
  secondary: "var(--color-secondary)",
889
915
  tertiary: "var(--color-tertiary)",
890
916
  error: "var(--color-error)"
891
917
  };
892
- function P(e, t) {
918
+ function F(e, t) {
893
919
  let n = e ?? t;
894
- return re[n] ?? n;
920
+ return P[n] ?? n;
895
921
  }
896
- let F = s(() => n.disabled ? {
897
- active: we,
898
- inactive: Te
922
+ let I = s(() => n.disabled ? {
923
+ active: je,
924
+ inactive: Me
899
925
  } : {
900
- active: P(n.fillColor, n.color),
926
+ active: F(n.fillColor, n.color),
901
927
  inactive: "var(--color-secondary-container)"
902
- }), I = s(() => n.disabled ? {
903
- active: we,
904
- inactive: Te
928
+ }), L = s(() => n.disabled ? {
929
+ active: je,
930
+ inactive: Me
905
931
  } : {
906
- active: P(n.thumbColor, n.color),
932
+ active: F(n.thumbColor, n.color),
907
933
  inactive: "var(--color-secondary-container)"
908
934
  });
909
- function L(e) {
935
+ function R(e) {
910
936
  let t = Math.round((e - n.min) / n.step) * n.step + n.min;
911
937
  return Math.max(n.min, Math.min(n.max, +t.toFixed(10)));
912
938
  }
913
- function R(e) {
939
+ function z(e) {
914
940
  if (!f.value) return 0;
915
941
  let t = f.value.getBoundingClientRect();
916
942
  return g.value ? 1 - Math.max(0, Math.min(1, (e.clientY - t.top) / t.height)) : Math.max(0, Math.min(1, (e.clientX - t.left) / t.width));
917
943
  }
918
- function z(e) {
919
- return L(n.min + R(e) * (n.max - n.min));
944
+ function B(e) {
945
+ return R(n.min + z(e) * (n.max - n.min));
920
946
  }
921
- function ie(e) {
947
+ function re(e) {
922
948
  if (n.disabled) return;
923
949
  e.preventDefault();
924
- let t = z(e);
950
+ let t = B(e);
925
951
  if (b.value) {
926
952
  let e = n.modelValue, i = Math.abs(t - e[0]) <= Math.abs(t - e[1]) ? 0 : 1;
927
953
  m.value = i;
928
954
  let a = [e[0], e[1]];
929
955
  a[i] = t, r("update:modelValue", a);
930
956
  } else m.value = "single", r("update:modelValue", t);
931
- window.addEventListener("pointermove", B), window.addEventListener("pointerup", V), window.addEventListener("pointercancel", V);
957
+ window.addEventListener("pointermove", V), window.addEventListener("pointerup", H), window.addEventListener("pointercancel", H);
932
958
  }
933
- function B(e) {
959
+ function V(e) {
934
960
  if (m.value === !1) return;
935
- let t = z(e);
961
+ let t = B(e);
936
962
  if (b.value) {
937
963
  let e = n.modelValue, i = [e[0], e[1]];
938
964
  i[m.value] = t, r("update:modelValue", i);
939
965
  } else r("update:modelValue", t);
940
966
  }
941
- function V() {
942
- m.value = !1, window.removeEventListener("pointermove", B), window.removeEventListener("pointerup", V), window.removeEventListener("pointercancel", V);
967
+ function H() {
968
+ m.value = !1, window.removeEventListener("pointermove", V), window.removeEventListener("pointerup", H), window.removeEventListener("pointercancel", H);
943
969
  }
944
- function H(e) {
970
+ function U(e) {
945
971
  if (n.disabled) return;
946
972
  let t = {
947
973
  ArrowRight: 1,
@@ -952,15 +978,15 @@ var N = "m3-theme", re = "m3-dynamic-palette", P = "m3-viewport", F = /* @__PURE
952
978
  if (t !== void 0) {
953
979
  if (e.preventDefault(), b.value) {
954
980
  let e = n.modelValue;
955
- r("update:modelValue", [L(e[0] + t * n.step), e[1]]);
956
- } else r("update:modelValue", L(n.modelValue + t * n.step));
981
+ r("update:modelValue", [R(e[0] + t * n.step), e[1]]);
982
+ } else r("update:modelValue", R(n.modelValue + t * n.step));
957
983
  }
958
984
  e.key === "Home" && (e.preventDefault(), r("update:modelValue", b.value ? [n.min, n.modelValue[1]] : n.min)), e.key === "End" && (e.preventDefault(), r("update:modelValue", b.value ? [n.modelValue[0], n.max] : n.max));
959
985
  }
960
986
  y(() => {
961
- window.removeEventListener("pointermove", B), window.removeEventListener("pointerup", V), window.removeEventListener("pointercancel", V);
987
+ window.removeEventListener("pointermove", V), window.removeEventListener("pointerup", H), window.removeEventListener("pointercancel", H);
962
988
  });
963
- let ae = s(() => {
989
+ let W = s(() => {
964
990
  if (!n.stops) return [];
965
991
  let e = [], t = n.max - n.min, r = n.icon ? (j.value.iconSize + j.value.radius) / 2 : 0;
966
992
  for (let i = n.min + n.step; i < n.max; i += n.step) {
@@ -969,28 +995,28 @@ var N = "m3-theme", re = "m3-dynamic-palette", P = "m3-viewport", F = /* @__PURE
969
995
  }
970
996
  return e.length <= 28 ? e : [];
971
997
  });
972
- function oe(e) {
998
+ function G(e) {
973
999
  return `calc(${$(e)} - ${N.value}px)`;
974
1000
  }
975
- function se(e) {
1001
+ function ie(e) {
976
1002
  return `calc(100% - ${$(e)} - ${N.value}px)`;
977
1003
  }
978
- function ce() {
1004
+ function ae() {
979
1005
  return `calc(${$(E.value)} - ${N.value}px)`;
980
1006
  }
981
- function U() {
1007
+ function K() {
982
1008
  return `calc(${$(E.value)} + ${N.value}px)`;
983
1009
  }
984
- function W() {
1010
+ function oe() {
985
1011
  return `calc(${$(D.value)} - ${$(E.value)} - ${N.value * 2}px)`;
986
1012
  }
987
- function G() {
1013
+ function se() {
988
1014
  return `calc(100% - ${$(D.value)} - ${N.value}px)`;
989
1015
  }
990
- function K() {
1016
+ function q() {
991
1017
  return E.value >= O.value ? `${O.value}%` : `calc(${$(E.value)} + ${N.value}px)`;
992
1018
  }
993
- function q() {
1019
+ function ce() {
994
1020
  return E.value >= O.value ? `calc(${$(E.value)} - ${O.value}% - ${N.value}px)` : `calc(${O.value}% - ${$(E.value)} - ${N.value}px)`;
995
1021
  }
996
1022
  function le() {
@@ -1020,7 +1046,7 @@ var N = "m3-theme", re = "m3-dynamic-palette", P = "m3-viewport", F = /* @__PURE
1020
1046
  width: `${t}px`,
1021
1047
  height: `${n}px`,
1022
1048
  borderRadius: `${r}px`,
1023
- backgroundColor: I.value.active,
1049
+ backgroundColor: L.value.active,
1024
1050
  zIndex: "2",
1025
1051
  transition: Z.value ? "left 75ms ease, bottom 75ms ease, transform 80ms ease" : "transform 80ms ease"
1026
1052
  }, o = i || h.value, s = i ? 1.08 : 1, c = o ? .5 : 1;
@@ -1029,7 +1055,7 @@ var N = "m3-theme", re = "m3-dynamic-palette", P = "m3-viewport", F = /* @__PURE
1029
1055
  function he(e) {
1030
1056
  let t = m.value === !1 ? 1 : 1.15, n = {
1031
1057
  position: "absolute",
1032
- color: I.value.active,
1058
+ color: L.value.active,
1033
1059
  zIndex: "2",
1034
1060
  transition: Z.value ? "left 75ms ease, bottom 75ms ease, transform 80ms ease" : "transform 80ms ease"
1035
1061
  };
@@ -1050,7 +1076,7 @@ var N = "m3-theme", re = "m3-dynamic-palette", P = "m3-viewport", F = /* @__PURE
1050
1076
  };
1051
1077
  }
1052
1078
  let _e = s(() => b.value ? `${x.value.lo} – ${x.value.hi}` : String(n.modelValue)), ve = s(() => b.value && typeof m.value == "number" ? n.modelValue[m.value] : n.modelValue), ye = s(() => b.value && typeof m.value == "number" ? C(n.modelValue[m.value]) : E.value);
1053
- return (t, n) => (S(), u("div", { class: _(["flex select-none", g.value ? "h-full flex-col items-center" : "flex-col gap-1"]) }, [e.label || e.showValue ? (S(), u("div", be, [e.label ? (S(), u("span", xe, k(e.label), 1)) : l("", !0), e.showValue ? (S(), u("span", Se, k(_e.value), 1)) : l("", !0)])) : l("", !0), d("div", { class: _(["flex items-center", g.value ? "flex-1 flex-col" : ""]) }, [d("div", {
1079
+ return (t, n) => (S(), u("div", { class: _(["flex select-none", g.value ? "h-full flex-col items-center" : "flex-col gap-1"]) }, [e.label || e.showValue ? (S(), u("div", De, [e.label ? (S(), u("span", Oe, k(e.label), 1)) : l("", !0), e.showValue ? (S(), u("span", ke, k(_e.value), 1)) : l("", !0)])) : l("", !0), d("div", { class: _(["flex items-center", g.value ? "flex-1 flex-col" : ""]) }, [d("div", {
1054
1080
  ref_key: "trackEl",
1055
1081
  ref: f,
1056
1082
  role: "slider",
@@ -1069,8 +1095,8 @@ var N = "m3-theme", re = "m3-dynamic-palette", P = "m3-viewport", F = /* @__PURE
1069
1095
  height: `${j.value.hitArea}px`,
1070
1096
  width: "100%"
1071
1097
  }),
1072
- onPointerdown: ie,
1073
- onKeydown: H,
1098
+ onPointerdown: re,
1099
+ onKeydown: U,
1074
1100
  onFocus: n[0] ||= (e) => h.value = !0,
1075
1101
  onBlur: n[1] ||= (e) => h.value = !1
1076
1102
  }, [
@@ -1099,15 +1125,15 @@ var N = "m3-theme", re = "m3-dynamic-palette", P = "m3-viewport", F = /* @__PURE
1099
1125
  left: 0,
1100
1126
  right: 0,
1101
1127
  bottom: 0,
1102
- height: oe(E.value)
1128
+ height: G(E.value)
1103
1129
  } : {
1104
1130
  top: 0,
1105
1131
  bottom: 0,
1106
1132
  left: 0,
1107
- width: oe(E.value)
1133
+ width: G(E.value)
1108
1134
  },
1109
1135
  borderRadius: X(),
1110
- backgroundColor: F.value.active,
1136
+ backgroundColor: I.value.active,
1111
1137
  transition: `all ${Q.value}`
1112
1138
  })
1113
1139
  }, null, 4), d("div", {
@@ -1117,15 +1143,15 @@ var N = "m3-theme", re = "m3-dynamic-palette", P = "m3-viewport", F = /* @__PURE
1117
1143
  left: 0,
1118
1144
  right: 0,
1119
1145
  top: 0,
1120
- height: se(E.value)
1146
+ height: ie(E.value)
1121
1147
  } : {
1122
1148
  top: 0,
1123
1149
  bottom: 0,
1124
1150
  right: 0,
1125
- width: se(E.value)
1151
+ width: ie(E.value)
1126
1152
  },
1127
1153
  borderRadius: pe(),
1128
- backgroundColor: F.value.inactive,
1154
+ backgroundColor: I.value.inactive,
1129
1155
  transition: `all ${Q.value}`
1130
1156
  })
1131
1157
  }, null, 4)], 64)) : e.variant === "centered" ? (S(), u(a, { key: 1 }, [
@@ -1135,16 +1161,16 @@ var N = "m3-theme", re = "m3-dynamic-palette", P = "m3-viewport", F = /* @__PURE
1135
1161
  ...g.value ? {
1136
1162
  left: 0,
1137
1163
  right: 0,
1138
- bottom: K(),
1139
- height: q()
1164
+ bottom: q(),
1165
+ height: ce()
1140
1166
  } : {
1141
1167
  top: 0,
1142
1168
  bottom: 0,
1143
- left: K(),
1144
- width: q()
1169
+ left: q(),
1170
+ width: ce()
1145
1171
  },
1146
1172
  borderRadius: fe(),
1147
- backgroundColor: F.value.active,
1173
+ backgroundColor: I.value.active,
1148
1174
  transition: `all ${Q.value}`
1149
1175
  })
1150
1176
  }, null, 4),
@@ -1163,7 +1189,7 @@ var N = "m3-theme", re = "m3-dynamic-palette", P = "m3-viewport", F = /* @__PURE
1163
1189
  width: le()
1164
1190
  },
1165
1191
  borderRadius: pe(),
1166
- backgroundColor: F.value.inactive,
1192
+ backgroundColor: I.value.inactive,
1167
1193
  transition: `all ${Q.value}`
1168
1194
  })
1169
1195
  }, null, 4),
@@ -1182,7 +1208,7 @@ var N = "m3-theme", re = "m3-dynamic-palette", P = "m3-viewport", F = /* @__PURE
1182
1208
  width: ue()
1183
1209
  },
1184
1210
  borderRadius: X(),
1185
- backgroundColor: F.value.inactive,
1211
+ backgroundColor: I.value.inactive,
1186
1212
  transition: `all ${Q.value}`
1187
1213
  })
1188
1214
  }, null, 4)
@@ -1194,15 +1220,15 @@ var N = "m3-theme", re = "m3-dynamic-palette", P = "m3-viewport", F = /* @__PURE
1194
1220
  left: 0,
1195
1221
  right: 0,
1196
1222
  bottom: 0,
1197
- height: ce()
1223
+ height: ae()
1198
1224
  } : {
1199
1225
  top: 0,
1200
1226
  bottom: 0,
1201
1227
  left: 0,
1202
- width: ce()
1228
+ width: ae()
1203
1229
  },
1204
1230
  borderRadius: X(),
1205
- backgroundColor: F.value.inactive,
1231
+ backgroundColor: I.value.inactive,
1206
1232
  transition: `all ${Q.value}`
1207
1233
  })
1208
1234
  }, null, 4),
@@ -1212,16 +1238,16 @@ var N = "m3-theme", re = "m3-dynamic-palette", P = "m3-viewport", F = /* @__PURE
1212
1238
  ...g.value ? {
1213
1239
  left: 0,
1214
1240
  right: 0,
1215
- bottom: U(),
1216
- height: W()
1241
+ bottom: K(),
1242
+ height: oe()
1217
1243
  } : {
1218
1244
  top: 0,
1219
1245
  bottom: 0,
1220
- left: U(),
1221
- width: W()
1246
+ left: K(),
1247
+ width: oe()
1222
1248
  },
1223
1249
  borderRadius: fe(),
1224
- backgroundColor: F.value.active,
1250
+ backgroundColor: I.value.active,
1225
1251
  transition: `all ${Q.value}`
1226
1252
  })
1227
1253
  }, null, 4),
@@ -1232,15 +1258,15 @@ var N = "m3-theme", re = "m3-dynamic-palette", P = "m3-viewport", F = /* @__PURE
1232
1258
  left: 0,
1233
1259
  right: 0,
1234
1260
  top: 0,
1235
- height: G()
1261
+ height: se()
1236
1262
  } : {
1237
1263
  top: 0,
1238
1264
  bottom: 0,
1239
1265
  right: 0,
1240
- width: G()
1266
+ width: se()
1241
1267
  },
1242
1268
  borderRadius: pe(),
1243
- backgroundColor: F.value.inactive,
1269
+ backgroundColor: I.value.inactive,
1244
1270
  transition: `all ${Q.value}`
1245
1271
  })
1246
1272
  }, null, 4)
@@ -1251,7 +1277,7 @@ var N = "m3-theme", re = "m3-dynamic-palette", P = "m3-viewport", F = /* @__PURE
1251
1277
  size: j.value.iconSize,
1252
1278
  class: "absolute z-[1]",
1253
1279
  style: v({
1254
- color: e.variant === "standard" && E.value > 0 || e.variant === "range" && E.value > 0 ? F.value.inactive : F.value.active,
1280
+ color: e.variant === "standard" && E.value > 0 || e.variant === "range" && E.value > 0 ? I.value.inactive : I.value.active,
1255
1281
  ...g.value ? {
1256
1282
  left: "50%",
1257
1283
  bottom: `${M.value}px`,
@@ -1273,7 +1299,7 @@ var N = "m3-theme", re = "m3-dynamic-palette", P = "m3-viewport", F = /* @__PURE
1273
1299
  style: v({
1274
1300
  width: `${j.value.dot}px`,
1275
1301
  height: `${j.value.dot}px`,
1276
- backgroundColor: F.value.active,
1302
+ backgroundColor: I.value.active,
1277
1303
  opacity: +!ee.value,
1278
1304
  ...g.value ? {
1279
1305
  left: "50%",
@@ -1293,7 +1319,7 @@ var N = "m3-theme", re = "m3-dynamic-palette", P = "m3-viewport", F = /* @__PURE
1293
1319
  style: v({
1294
1320
  width: `${j.value.dot}px`,
1295
1321
  height: `${j.value.dot}px`,
1296
- backgroundColor: F.value.active,
1322
+ backgroundColor: I.value.active,
1297
1323
  opacity: +!te.value,
1298
1324
  ...g.value ? {
1299
1325
  left: "50%",
@@ -1307,13 +1333,13 @@ var N = "m3-theme", re = "m3-dynamic-palette", P = "m3-viewport", F = /* @__PURE
1307
1333
  transition: "opacity 150ms ease"
1308
1334
  })
1309
1335
  }, null, 4)),
1310
- e.stops ? (S(!0), u(a, { key: 6 }, T(ae.value, (e, t) => (S(), u("div", {
1336
+ e.stops ? (S(!0), u(a, { key: 6 }, T(W.value, (e, t) => (S(), u("div", {
1311
1337
  key: t,
1312
1338
  class: "absolute rounded-full",
1313
1339
  style: v({
1314
1340
  width: `${j.value.dot}px`,
1315
1341
  height: `${j.value.dot}px`,
1316
- backgroundColor: e <= E.value ? F.value.inactive : F.value.active,
1342
+ backgroundColor: e <= E.value ? I.value.inactive : I.value.active,
1317
1343
  opacity: Math.abs(e - E.value) < .01 || b.value && Math.abs(e - D.value) < .01 ? 0 : 1,
1318
1344
  ...g.value ? {
1319
1345
  left: "50%",
@@ -1367,10 +1393,10 @@ var N = "m3-theme", re = "m3-dynamic-palette", P = "m3-viewport", F = /* @__PURE
1367
1393
  }, k(ve.value), 5)) : l("", !0)]),
1368
1394
  _: 1
1369
1395
  })
1370
- ], 46, Ce)], 2)], 2));
1396
+ ], 46, Ae)], 2)], 2));
1371
1397
  }
1372
1398
  });
1373
1399
  //#endregion
1374
- export { ue as a, F as c, P as d, de as i, re as l, ye as n, U as o, pe as r, ae as s, Ee as t, N as u };
1400
+ export { Z as a, V as c, z as d, I as f, F as h, Q as i, H as l, N as m, Ee as n, de as o, P as p, _e as r, q as s, Ne as t, B as u };
1375
1401
 
1376
- //# sourceMappingURL=MSlider-CdNIH7jc.js.map
1402
+ //# sourceMappingURL=MSlider-BXsBv0ox.js.map