@m3ui-vue/m3ui-vue 1.6.2 → 1.7.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 (163) hide show
  1. package/dist/API.md +649 -28
  2. package/dist/{MButton-OQ4wIERQ.js → MButton-CN3wYwIG.js} +2 -2
  3. package/dist/{MButton-OQ4wIERQ.js.map → MButton-CN3wYwIG.js.map} +1 -1
  4. package/dist/{MColorPickerModal-NtkihoK6.js → MColorPickerModal-BKM1CHxr.js} +4 -4
  5. package/dist/{MColorPickerModal-NtkihoK6.js.map → MColorPickerModal-BKM1CHxr.js.map} +1 -1
  6. package/dist/{MDialog-DYMnaBlt.js → MDialog-1LAk9WAO.js} +2 -2
  7. package/dist/{MDialog-DYMnaBlt.js.map → MDialog-1LAk9WAO.js.map} +1 -1
  8. package/dist/{MListItem-D2cNUyzP.js → MListItem-BU5KDRCB.js} +376 -270
  9. package/dist/MListItem-BU5KDRCB.js.map +1 -0
  10. package/dist/{MLoadingIndicator-DWUj0BAB.js → MLoadingIndicator-RykOo5tf.js} +2 -2
  11. package/dist/{MLoadingIndicator-DWUj0BAB.js.map → MLoadingIndicator-RykOo5tf.js.map} +1 -1
  12. package/dist/{MSeekBar-C4cn9RIF.js → MSeekBar-B_Y3MpVz.js} +2 -2
  13. package/dist/{MSeekBar-C4cn9RIF.js.map → MSeekBar-B_Y3MpVz.js.map} +1 -1
  14. package/dist/MSegmentedButton-CiOOY1-N.js +105 -0
  15. package/dist/MSegmentedButton-CiOOY1-N.js.map +1 -0
  16. package/dist/MSlider-BCeVIxcq.js +739 -0
  17. package/dist/MSlider-BCeVIxcq.js.map +1 -0
  18. package/dist/{MSpinner-DZkXZJpc.js → MSpinner-Cs03qoqE.js} +2 -2
  19. package/dist/{MSpinner-DZkXZJpc.js.map → MSpinner-Cs03qoqE.js.map} +1 -1
  20. package/dist/{MTextField-CNH-byir.js → MTextField-NaFbMkjv.js} +162 -115
  21. package/dist/MTextField-NaFbMkjv.js.map +1 -0
  22. package/dist/_useFieldValidation-Bz34IAQY.js +191 -0
  23. package/dist/_useFieldValidation-Bz34IAQY.js.map +1 -0
  24. package/dist/api.json +1 -1
  25. package/dist/code-editor.js +184 -103
  26. package/dist/code-editor.js.map +1 -1
  27. package/dist/components/MAddressField.vue.d.ts +18 -3
  28. package/dist/components/MAppBarWithSearch.vue.d.ts +1 -1
  29. package/dist/components/MAudioRecorder.vue.d.ts +2 -2
  30. package/dist/components/MAutocomplete.vue.d.ts +22 -3
  31. package/dist/components/MCheckbox.vue.d.ts +23 -1
  32. package/dist/components/MCodeEditor.vue.d.ts +23 -1
  33. package/dist/components/MColorPicker.vue.d.ts +24 -3
  34. package/dist/components/MConfirmDialog.vue.d.ts +2 -2
  35. package/dist/components/MCountrySelect.vue.d.ts +13 -2
  36. package/dist/components/MCreditCardInput.vue.d.ts +33 -0
  37. package/dist/components/MCronField.vue.d.ts +23 -1
  38. package/dist/components/MDataTable.vue.d.ts +1 -1
  39. package/dist/components/MDatePicker.vue.d.ts +24 -3
  40. package/dist/components/MDateRangePicker.vue.d.ts +24 -3
  41. package/dist/components/MFileUpload.vue.d.ts +23 -2
  42. package/dist/components/MForm.vue.d.ts +61 -0
  43. package/dist/components/MJsonEditor.vue.d.ts +23 -1
  44. package/dist/components/MMapRoute.vue.d.ts +168 -0
  45. package/dist/components/MMaskField.vue.d.ts +20 -2
  46. package/dist/components/MMentionField.vue.d.ts +13 -2
  47. package/dist/components/MMultiAutocomplete.vue.d.ts +22 -3
  48. package/dist/components/MMultiSelect.vue.d.ts +22 -3
  49. package/dist/components/MNavigationRail.vue.d.ts +1 -1
  50. package/dist/components/MNotificationCenter.vue.d.ts +2 -2
  51. package/dist/components/MNumberField.vue.d.ts +20 -2
  52. package/dist/components/MPhoneInput.vue.d.ts +19 -4
  53. package/dist/components/MPinInput.vue.d.ts +24 -3
  54. package/dist/components/MPosKeypad.vue.d.ts +2 -2
  55. package/dist/components/MRadioGroup.vue.d.ts +23 -1
  56. package/dist/components/MRating.vue.d.ts +23 -1
  57. package/dist/components/MRichTextEditor.vue.d.ts +23 -1
  58. package/dist/components/MSearchBar.vue.d.ts +1 -1
  59. package/dist/components/MSegmentedButton.vue.d.ts +23 -2
  60. package/dist/components/MSelect.vue.d.ts +22 -3
  61. package/dist/components/MSignaturePad.vue.d.ts +19 -0
  62. package/dist/components/MSlider.vue.d.ts +23 -1
  63. package/dist/components/MSwitch.vue.d.ts +23 -1
  64. package/dist/components/MTable.vue.d.ts +1 -1
  65. package/dist/components/MTagInput.vue.d.ts +20 -2
  66. package/dist/components/MText.vue.d.ts +1 -1
  67. package/dist/components/MTextField.vue.d.ts +26 -3
  68. package/dist/components/MTimePicker.vue.d.ts +24 -3
  69. package/dist/components/MTimezoneSelect.vue.d.ts +13 -2
  70. package/dist/components/MTour.vue.d.ts +2 -2
  71. package/dist/components/MTrackingTimeline.vue.d.ts +75 -0
  72. package/dist/components/MWindow.vue.d.ts +2 -2
  73. package/dist/composables/_routeGeometry.d.ts +26 -0
  74. package/dist/composables/_useFieldValidation.d.ts +91 -0
  75. package/dist/composables/mapRouting.d.ts +35 -0
  76. package/dist/composables/useLocale.d.ts +23 -0
  77. package/dist/composables/validation.d.ts +82 -0
  78. package/dist/draw.js +2 -2
  79. package/dist/flow.js +1 -1
  80. package/dist/gantt.js +2 -2
  81. package/dist/index.d.ts +5 -0
  82. package/dist/locales/index.js +154 -7
  83. package/dist/locales/index.js.map +1 -1
  84. package/dist/m3ui-vue.css +1 -1
  85. package/dist/m3ui.js +6768 -5602
  86. package/dist/m3ui.js.map +1 -1
  87. package/dist/map.d.ts +4 -0
  88. package/dist/map.js +1230 -784
  89. package/dist/map.js.map +1 -1
  90. package/dist/media.js +4 -4
  91. package/dist/pdf.js +4 -4
  92. package/dist/rich-text-editor.js +189 -146
  93. package/dist/rich-text-editor.js.map +1 -1
  94. package/dist/styles.css +1 -1
  95. package/dist/{useLocale-DaVSTdm0.js → useLocale-Dh1xZZ8i.js} +22 -1
  96. package/dist/useLocale-Dh1xZZ8i.js.map +1 -0
  97. package/package.json +1 -1
  98. package/src/__tests__/MForm.test.ts +325 -0
  99. package/src/__tests__/MMapRoute.test.ts +384 -0
  100. package/src/__tests__/MPhoneInput.test.ts +5 -2
  101. package/src/__tests__/MRichTextEditor.test.ts +2 -1
  102. package/src/__tests__/MTrackingTimeline.test.ts +66 -0
  103. package/src/__tests__/_fakeMaplibre.ts +4 -1
  104. package/src/__tests__/_osrmRoutes.ts +10 -0
  105. package/src/__tests__/attrsFallthrough.test.ts +11 -0
  106. package/src/__tests__/fieldsValidation.test.ts +229 -0
  107. package/src/__tests__/ssr.test.ts +1 -0
  108. package/src/__tests__/validation.test.ts +77 -0
  109. package/src/components/MAddressField.vue +45 -8
  110. package/src/components/MAutocomplete.vue +69 -23
  111. package/src/components/MCheckbox.vue +80 -17
  112. package/src/components/MCodeEditor.vue +59 -2
  113. package/src/components/MColorPicker.vue +65 -16
  114. package/src/components/MCountrySelect.vue +17 -3
  115. package/src/components/MCreditCardInput.vue +76 -7
  116. package/src/components/MCronField.vue +60 -10
  117. package/src/components/MDatePicker.vue +65 -16
  118. package/src/components/MDateRangePicker.vue +66 -16
  119. package/src/components/MFileUpload.vue +71 -8
  120. package/src/components/MForm.vue +208 -0
  121. package/src/components/MJsonEditor.vue +57 -3
  122. package/src/components/MMapRoute.vue +470 -0
  123. package/src/components/MMaskField.vue +55 -13
  124. package/src/components/MMentionField.vue +17 -2
  125. package/src/components/MMultiAutocomplete.vue +70 -23
  126. package/src/components/MMultiSelect.vue +70 -23
  127. package/src/components/MNumberField.vue +58 -16
  128. package/src/components/MPhoneInput.vue +60 -18
  129. package/src/components/MPinInput.vue +58 -10
  130. package/src/components/MRadioGroup.vue +65 -4
  131. package/src/components/MRating.vue +62 -6
  132. package/src/components/MRichTextEditor.vue +64 -4
  133. package/src/components/MSegmentedButton.vue +59 -2
  134. package/src/components/MSelect.vue +72 -26
  135. package/src/components/MSignaturePad.vue +71 -6
  136. package/src/components/MSlider.vue +61 -10
  137. package/src/components/MSwitch.vue +63 -8
  138. package/src/components/MTagInput.vue +67 -25
  139. package/src/components/MTextField.vue +68 -14
  140. package/src/components/MTimePicker.vue +65 -16
  141. package/src/components/MTimezoneSelect.vue +17 -3
  142. package/src/components/MTrackingTimeline.vue +257 -0
  143. package/src/composables/_routeGeometry.ts +140 -0
  144. package/src/composables/_useFieldValidation.ts +287 -0
  145. package/src/composables/mapRouting.ts +55 -0
  146. package/src/composables/useLocale.ts +46 -0
  147. package/src/composables/validation.ts +178 -0
  148. package/src/index.ts +5 -0
  149. package/src/locales/de.ts +21 -0
  150. package/src/locales/es.ts +28 -7
  151. package/src/locales/fr.ts +21 -0
  152. package/src/locales/ja.ts +21 -0
  153. package/src/locales/ko.ts +21 -0
  154. package/src/locales/pt.ts +21 -0
  155. package/src/locales/zh.ts +21 -0
  156. package/src/map.ts +4 -0
  157. package/dist/MListItem-D2cNUyzP.js.map +0 -1
  158. package/dist/MSegmentedButton-BEB4gXLA.js +0 -64
  159. package/dist/MSegmentedButton-BEB4gXLA.js.map +0 -1
  160. package/dist/MSlider-BIkA6DiE.js +0 -690
  161. package/dist/MSlider-BIkA6DiE.js.map +0 -1
  162. package/dist/MTextField-CNH-byir.js.map +0 -1
  163. package/dist/useLocale-DaVSTdm0.js.map +0 -1
@@ -1,27 +1,28 @@
1
- import { i as e } from "./useLocale-DaVSTdm0.js";
1
+ import { i as e } from "./useLocale-Dh1xZZ8i.js";
2
2
  import { a as t, i as n, s as r } from "./MIconButton-BBggVwBV.js";
3
3
  import { t as i } from "./MIcon-DpajuUTJ.js";
4
- import { Transition as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, getCurrentInstance as m, h, inject as g, mergeProps as _, nextTick as v, normalizeClass as y, normalizeStyle as b, onBeforeUnmount as x, onMounted as S, onUnmounted as C, onUpdated as w, openBlock as T, provide as E, ref as D, renderSlot as O, resolveDynamicComponent as ee, shallowRef as k, toDisplayString as A, unref as j, useId as te, useSlots as M, watch as N, withCtx as P, withModifiers as F } from "vue";
4
+ import { n as a } from "./_useFieldValidation-Bz34IAQY.js";
5
+ import { 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, getCurrentInstance as h, h as g, inject as _, mergeProps as v, nextTick as y, normalizeClass as b, normalizeStyle as x, onBeforeUnmount as S, onMounted as C, onUnmounted as w, onUpdated as T, openBlock as E, provide as D, ref as O, renderSlot as k, resolveDynamicComponent as ee, shallowRef as A, toDisplayString as j, unref as M, useId as te, useSlots as N, watch as P, withCtx as F, withModifiers as I } from "vue";
5
6
  // src/composables/_useFollowAnchor.ts
6
- var I = /(auto|scroll|hidden|clip)/;
7
- function L(e) {
7
+ var L = /(auto|scroll|hidden|clip)/;
8
+ function R(e) {
8
9
  if (!e.isConnected) return !0;
9
10
  let t = e.getBoundingClientRect(), n = t.top, r = t.left, i = t.bottom, a = t.right;
10
11
  for (let t = e.parentElement; t && t !== document.body && t !== document.documentElement; t = t.parentElement) {
11
12
  let e = getComputedStyle(t);
12
13
  if (e.position === "fixed") break;
13
- if (!I.test(e.overflow + e.overflowX + e.overflowY)) continue;
14
+ if (!L.test(e.overflow + e.overflowX + e.overflowY)) continue;
14
15
  let o = t.getBoundingClientRect();
15
16
  n = Math.max(n, o.top), r = Math.max(r, o.left), i = Math.min(i, o.bottom), a = Math.min(a, o.right);
16
17
  }
17
18
  return n = Math.max(n, 0), r = Math.max(r, 0), i = Math.min(i, window.innerHeight), a = Math.min(a, window.innerWidth), i <= n || a <= r;
18
19
  }
19
- function R(e) {
20
+ function z(e) {
20
21
  let t = 0, n = null, r = !1;
21
22
  function i() {
22
23
  if (t = 0, !e.open()) return;
23
24
  let n = e.anchor.value;
24
- if (!n || L(n)) {
25
+ if (!n || R(n)) {
25
26
  e.close();
26
27
  let t = document.activeElement;
27
28
  n && t instanceof HTMLElement && n.contains(t) && t.blur();
@@ -43,10 +44,10 @@ function R(e) {
43
44
  function c() {
44
45
  r && (r = !1, window.removeEventListener("scroll", o, { capture: !0 }), window.removeEventListener("resize", a), window.visualViewport?.removeEventListener("resize", a), window.visualViewport?.removeEventListener("scroll", a), n?.disconnect(), n = null, t && cancelAnimationFrame(t), t = 0);
45
46
  }
46
- N(e.open, (e) => e ? s() : c(), { immediate: !0 }), x(c);
47
+ P(e.open, (e) => e ? s() : c(), { immediate: !0 }), S(c);
47
48
  }
48
49
  // src/components/MAvatar.vue
49
- var z = /* @__PURE__ */ p({
50
+ var ne = /* @__PURE__ */ m({
50
51
  __name: "MAvatar",
51
52
  props: {
52
53
  name: {},
@@ -54,39 +55,39 @@ var z = /* @__PURE__ */ p({
54
55
  size: { default: 40 }
55
56
  },
56
57
  setup(e) {
57
- let t = e, n = o(() => {
58
+ let t = e, n = s(() => {
58
59
  if (t.name) {
59
60
  let e = t.name.trim().split(/\s+/).filter(Boolean);
60
61
  return ((e[0]?.[0] ?? "") + (e.length > 1 ? e[e.length - 1]?.[0] ?? "" : "")).toUpperCase() || t.fallback || "?";
61
62
  }
62
63
  return t.fallback || "?";
63
64
  });
64
- return (t, r) => (T(), l("div", {
65
+ return (t, r) => (E(), u("div", {
65
66
  class: "inline-flex shrink-0 items-center justify-center rounded-full bg-primary-container font-medium text-on-primary-container",
66
- style: b({
67
+ style: x({
67
68
  width: `${e.size}px`,
68
69
  height: `${e.size}px`,
69
70
  fontSize: `${Math.round(e.size * .4)}px`
70
71
  })
71
- }, A(n.value), 5));
72
+ }, j(n.value), 5));
72
73
  }
73
- }), ne = [
74
+ }), B = [
74
75
  "role",
75
76
  "tabindex",
76
77
  "aria-disabled"
77
- ], B = ["src", "alt"], V = {
78
+ ], V = ["src", "alt"], H = {
78
79
  key: 1,
79
80
  class: "px-4 pt-4 pb-2"
80
- }, H = {
81
+ }, re = {
81
82
  key: 2,
82
83
  class: "px-4 pt-4 pb-2"
83
- }, re = { class: "text-title-large font-medium text-on-surface" }, U = {
84
+ }, ie = { class: "text-title-large font-medium text-on-surface" }, U = {
84
85
  key: 0,
85
86
  class: "mt-1 text-body-medium text-on-surface-variant"
86
87
  }, W = {
87
88
  key: 3,
88
89
  class: "flex justify-end gap-2 px-4 pt-2 pb-4"
89
- }, ie = "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__ */ p({
90
+ }, ae = "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]", oe = /* @__PURE__ */ m({
90
91
  __name: "MCard",
91
92
  props: {
92
93
  variant: { default: "elevated" },
@@ -109,11 +110,11 @@ var z = /* @__PURE__ */ p({
109
110
  subtitle: {}
110
111
  },
111
112
  setup(e) {
112
- let t = e, n = o(() => t.elevated ? "elevated" : t.variant), r = {
113
+ let t = e, n = s(() => t.elevated ? "elevated" : t.variant), r = {
113
114
  elevated: "var(--color-surface-container-low)",
114
115
  filled: "var(--color-surface-container-highest)",
115
116
  outlined: "var(--color-surface)"
116
- }, i = o(() => (t.disabled ? {
117
+ }, i = s(() => (t.disabled ? {
117
118
  elevated: "bg-surface/38 shadow-none",
118
119
  filled: "bg-surface-variant/38",
119
120
  outlined: "bg-surface border border-outline/12"
@@ -125,48 +126,58 @@ var z = /* @__PURE__ */ p({
125
126
  elevated: "hover:shadow-elevation-2 active:shadow-elevation-1 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-secondary",
126
127
  filled: "hover:shadow-elevation-1 active:shadow-none focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-secondary",
127
128
  outlined: "hover:shadow-elevation-1 active:shadow-none focus-visible:outline-none focus-visible:border-on-surface"
128
- }, s = o(() => t.clickable && !t.disabled);
129
- function d(e) {
130
- s.value && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.currentTarget.click());
129
+ }, o = s(() => t.clickable && !t.disabled);
130
+ function c(e) {
131
+ o.value && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.currentTarget.click());
131
132
  }
132
- return (t, o) => (T(), l("div", {
133
- class: y(["overflow-hidden rounded-md transition-shadow duration-150", [
133
+ return (t, s) => (E(), u("div", {
134
+ class: b(["overflow-hidden rounded-md transition-shadow duration-150", [
134
135
  i.value,
135
- s.value ? [
136
+ o.value ? [
136
137
  "cursor-pointer",
137
138
  a[n.value],
138
- ie
139
+ ae
139
140
  ] : "",
140
141
  e.disabled ? "cursor-not-allowed pointer-events-none" : ""
141
142
  ]]),
142
- style: b({ "--field-bg": r[n.value] }),
143
+ style: x({ "--field-bg": r[n.value] }),
143
144
  role: e.clickable ? "button" : void 0,
144
- tabindex: s.value ? 0 : void 0,
145
+ tabindex: o.value ? 0 : void 0,
145
146
  "aria-disabled": e.clickable && e.disabled ? "true" : void 0,
146
- onKeydown: d
147
+ onKeydown: c
147
148
  }, [
148
- e.image || t.$slots.media ? (T(), l("div", {
149
+ e.image || t.$slots.media ? (E(), u("div", {
149
150
  key: 0,
150
- class: y(["w-full overflow-hidden", e.imageHeight ?? "h-48"])
151
- }, [e.image ? (T(), l("img", {
151
+ class: b(["w-full overflow-hidden", e.imageHeight ?? "h-48"])
152
+ }, [e.image ? (E(), u("img", {
152
153
  key: 0,
153
154
  src: e.image,
154
155
  alt: e.imageAlt ?? "",
155
156
  class: "h-full w-full object-cover"
156
- }, null, 8, B)) : O(t.$slots, "media", {}, void 0, void 0, 1)], 2)) : c("", !0),
157
- t.$slots.header ? (T(), l("div", V, [O(t.$slots, "header")])) : e.title ? (T(), l("div", H, [u("h3", re, A(e.title), 1), e.subtitle ? (T(), l("p", U, A(e.subtitle), 1)) : c("", !0)])) : c("", !0),
158
- O(t.$slots, "default"),
159
- t.$slots.actions ? (T(), l("div", W, [O(t.$slots, "actions")])) : c("", !0)
160
- ], 46, ne));
157
+ }, null, 8, V)) : k(t.$slots, "media", {}, void 0, void 0, 1)], 2)) : l("", !0),
158
+ t.$slots.header ? (E(), u("div", H, [k(t.$slots, "header")])) : e.title ? (E(), u("div", re, [d("h3", ie, j(e.title), 1), e.subtitle ? (E(), u("p", U, j(e.subtitle), 1)) : l("", !0)])) : l("", !0),
159
+ k(t.$slots, "default"),
160
+ t.$slots.actions ? (E(), u("div", W, [k(t.$slots, "actions")])) : l("", !0)
161
+ ], 46, B));
161
162
  }
162
- }), oe = { class: "relative -m-[11px] inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-full" }, G = [
163
+ }), G = [
163
164
  "checked",
164
165
  "disabled",
165
- "aria-label"
166
+ "name",
167
+ "required",
168
+ "aria-label",
169
+ "aria-invalid",
170
+ "aria-describedby"
166
171
  ], se = {
167
172
  key: 1,
168
173
  class: "pointer-events-none absolute inset-0 rounded-full ring-0 ring-secondary transition-[box-shadow] duration-150 peer-focus-visible:ring-2"
169
- }, ce = /* @__PURE__ */ p({
174
+ }, ce = {
175
+ key: 0,
176
+ class: "flex flex-col"
177
+ }, K = {
178
+ key: 0,
179
+ class: "text-error"
180
+ }, le = ["id"], ue = "border-error bg-error text-on-error", de = /* @__PURE__ */ m({
170
181
  __name: "MCheckbox",
171
182
  props: {
172
183
  modelValue: { type: Boolean },
@@ -180,46 +191,88 @@ var z = /* @__PURE__ */ p({
180
191
  },
181
192
  label: {},
182
193
  color: { default: "primary" },
183
- ariaLabel: {}
194
+ ariaLabel: {},
195
+ error: { type: [Boolean, String] },
196
+ errorLabel: {},
197
+ required: { type: Boolean },
198
+ rules: {},
199
+ validateOn: {},
200
+ validateDebounce: {},
201
+ name: {}
184
202
  },
185
- emits: ["update:modelValue"],
186
- setup(e, { emit: t }) {
187
- let n = t, r = {
203
+ emits: ["update:modelValue", "blur"],
204
+ setup(e, { expose: t, emit: n }) {
205
+ let r = e, o = n, s = O(null), c = a({
206
+ value: () => r.modelValue,
207
+ rules: () => r.rules,
208
+ required: () => r.required,
209
+ error: () => r.error,
210
+ errorLabel: () => r.errorLabel,
211
+ name: () => r.name,
212
+ validateOn: () => r.validateOn,
213
+ validateDebounce: () => r.validateDebounce,
214
+ disabled: () => r.disabled,
215
+ focus: () => {
216
+ s.value?.focus();
217
+ },
218
+ el: () => s.value,
219
+ setValue: (e) => o("update:modelValue", e)
220
+ }), m = c.disabled, { hasError: h, message: g, messageId: _ } = c, v = {
188
221
  primary: "border-primary bg-primary text-on-primary",
189
222
  secondary: "border-secondary bg-secondary text-on-secondary",
190
223
  tertiary: "border-tertiary bg-tertiary text-on-tertiary",
191
224
  error: "border-error bg-error text-on-error"
192
- }, a = {
225
+ }, y = {
193
226
  primary: "bg-primary",
194
227
  secondary: "bg-secondary",
195
228
  tertiary: "bg-tertiary",
196
229
  error: "bg-error"
197
230
  };
198
- return (t, o) => (T(), l("label", { class: y(["group inline-flex items-center gap-2 select-none", e.disabled ? "cursor-not-allowed" : "cursor-pointer"]) }, [u("span", oe, [
199
- u("input", {
231
+ return t({
232
+ validate: c.validate,
233
+ resetValidation: c.resetValidation
234
+ }), (t, n) => (E(), u("label", { class: b(["group inline-flex gap-2 select-none", [M(m) ? "cursor-not-allowed" : "cursor-pointer", M(g) ? "items-start" : "items-center"]]) }, [d("span", {
235
+ class: "relative -m-[11px] inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-full",
236
+ style: x(M(g) ? { marginTop: "-8px" } : void 0)
237
+ }, [
238
+ d("input", {
200
239
  type: "checkbox",
201
240
  class: "peer sr-only",
202
241
  checked: e.modelValue,
203
- disabled: e.disabled,
242
+ disabled: M(m),
243
+ ref_key: "inputEl",
244
+ ref: s,
245
+ name: e.name,
246
+ required: e.required,
204
247
  "aria-label": e.ariaLabel,
205
- onChange: o[0] ||= (t) => n("update:modelValue", !e.modelValue)
248
+ "aria-invalid": M(h) || void 0,
249
+ "aria-describedby": M(g) ? M(_) : void 0,
250
+ onChange: n[0] ||= (t) => o("update:modelValue", !e.modelValue),
251
+ onBlur: n[1] ||= (e) => {
252
+ M(c).onBlur(), o("blur", e);
253
+ }
206
254
  }, null, 40, G),
207
- e.disabled ? c("", !0) : (T(), l("span", {
255
+ M(m) ? l("", !0) : (E(), u("span", {
208
256
  key: 0,
209
- class: y(["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"])
257
+ class: b(["pointer-events-none absolute inset-0 rounded-full opacity-0 transition-opacity duration-150 group-hover:opacity-[0.08] group-active:opacity-[0.12]", M(h) ? "bg-error" : e.modelValue || e.indeterminate ? y[e.color] : "bg-on-surface"])
210
258
  }, null, 2)),
211
- e.disabled ? c("", !0) : (T(), l("span", se)),
212
- u("span", { class: y(["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"]) }, [f(i, {
259
+ M(m) ? l("", !0) : (E(), u("span", se)),
260
+ d("span", { class: b(["relative inline-flex h-4.5 w-4.5 items-center justify-center rounded-[2px] border-2 transition-colors", M(m) ? e.modelValue || e.indeterminate ? "border-on-surface/38 bg-on-surface/38 text-surface" : "border-on-surface/38 text-transparent" : M(h) ? e.modelValue || e.indeterminate ? ue : "border-error text-transparent" : e.modelValue || e.indeterminate ? v[e.color] : "border-on-surface-variant text-transparent group-hover:border-on-surface group-active:border-on-surface"]) }, [p(i, {
213
261
  name: e.indeterminate ? "remove" : "check",
214
262
  size: 18,
215
- class: y(["transition-[opacity,transform] duration-150", e.modelValue || e.indeterminate ? "scale-100 opacity-100" : "scale-0 opacity-0"])
263
+ class: b(["transition-[opacity,transform] duration-150", e.modelValue || e.indeterminate ? "scale-100 opacity-100" : "scale-0 opacity-0"])
216
264
  }, null, 8, ["name", "class"])], 2)
217
- ]), e.label || t.$slots.default ? (T(), l("span", {
265
+ ], 4), e.label || t.$slots.default || M(g) ? (E(), u("span", ce, [e.label || t.$slots.default ? (E(), u("span", {
218
266
  key: 0,
219
- class: y(["text-body-large", e.disabled ? "text-on-surface/38" : "text-on-surface"])
220
- }, [O(t.$slots, "default", {}, () => [d(A(e.label), 1)])], 2)) : c("", !0)], 2));
267
+ class: b(["text-body-large", M(m) ? "text-on-surface/38" : "text-on-surface"])
268
+ }, [k(t.$slots, "default", {}, () => [f(j(e.label), 1)]), e.required ? (E(), u("span", K, "\xA0*")) : l("", !0)], 2)) : l("", !0), M(g) ? (E(), u("span", {
269
+ key: 1,
270
+ id: M(_),
271
+ role: "alert",
272
+ class: "text-body-small text-error"
273
+ }, j(M(g)), 9, le)) : l("", !0)])) : l("", !0)], 2));
221
274
  }
222
- }), le = ["disabled", "aria-pressed"], K = { class: "whitespace-nowrap" }, ue = ["aria-label", "disabled"], de = ["aria-label", "disabled"], fe = "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", pe = /* @__PURE__ */ p({
275
+ }), fe = ["disabled", "aria-pressed"], pe = { class: "whitespace-nowrap" }, q = ["aria-label", "disabled"], J = ["aria-label", "disabled"], Y = "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", me = /* @__PURE__ */ m({
223
276
  __name: "MChip",
224
277
  props: {
225
278
  tone: { default: "neutral" },
@@ -252,20 +305,20 @@ var z = /* @__PURE__ */ p({
252
305
  "remove",
253
306
  "update:selected"
254
307
  ],
255
- setup(a, { emit: d }) {
256
- let p = [
308
+ setup(a, { emit: o }) {
309
+ let f = [
257
310
  "neutral",
258
311
  "primary",
259
312
  "success",
260
313
  "error",
261
314
  "tertiary",
262
315
  "secondary"
263
- ], m = a, h = d, g = e(), _ = M(), v = o(() => !!m.tone && !p.includes(m.tone)), x = o(() => {
316
+ ], m = a, h = o, g = e(), _ = N(), v = s(() => !!m.tone && !f.includes(m.tone)), y = s(() => {
264
317
  if (v.value) return {
265
318
  "--chip-bg": m.tone + "22",
266
319
  "--chip-color": m.tone
267
320
  };
268
- }), S = o(() => {
321
+ }), S = s(() => {
269
322
  if (m.disabled) return m.tone === "neutral" && !m.selected && !v.value ? "border border-on-surface/10 bg-transparent text-on-surface/38" : "border border-transparent bg-on-surface/12 text-on-surface/38";
270
323
  if (v.value) return "border border-transparent bg-[var(--chip-bg)] text-[var(--chip-color)]";
271
324
  if (m.tone === "neutral" && !m.selected) return "border border-outline-variant bg-transparent text-on-surface-variant";
@@ -278,14 +331,14 @@ var z = /* @__PURE__ */ p({
278
331
  tertiary: "border border-transparent bg-tertiary-container text-on-tertiary-container"
279
332
  };
280
333
  return e[m.tone ?? "neutral"] ?? e.neutral;
281
- }), C = o(() => m.selected ? "rounded-full" : "rounded-md"), w = o(() => m.type === "filter" || m.type === "input"), E = o(() => m.type === "input" && !!_.avatar), k = o(() => !!m.trailingIcon || m.type === "input" && m.removable), A = o(() => {
334
+ }), C = s(() => m.selected ? "rounded-full" : "rounded-md"), w = s(() => m.type === "filter" || m.type === "input"), T = s(() => m.type === "input" && !!_.avatar), D = s(() => !!m.trailingIcon || m.type === "input" && m.removable), A = s(() => {
282
335
  let e = w.value && m.selected;
283
336
  if (m.disabled) return e || m.elevated && m.type !== "input" ? "bg-on-surface/12 text-on-surface/38" : "border border-on-surface/12 text-on-surface/38";
284
337
  if (e) return ["bg-secondary-container text-on-secondary-container", m.elevated ? "shadow-elevation-1 hover:shadow-elevation-2" : ""];
285
338
  let t = m.type === "assist" ? "text-on-surface" : "text-on-surface-variant";
286
339
  return m.elevated && m.type !== "input" ? ["bg-surface-container-low shadow-elevation-1 hover:shadow-elevation-2", t] : ["border border-outline-variant", t];
287
- }), te = o(() => m.disabled ? "" : m.type === "assist" || m.type === "suggestion" ? "text-primary" : m.selected ? "text-on-secondary-container" : "text-on-surface-variant"), N = o(() => m.type === "input" ? [E.value ? "pl-1" : m.icon ? "pl-2" : "pl-3", k.value ? "pr-2" : "pr-3"] : [m.icon || z.value ? "pl-2" : "pl-4", k.value ? "pr-2" : "pr-4"]), I = D(!1), L = D(), R = D(), z = o(() => m.type === "filter" && !m.icon);
288
- r(() => m.type === "filter" || m.type === "input" ? [I.value ? 8 : m.selected ? 16 : 12, z.value ? m.selected ? 26 : 8 : 0] : [], ([e, t]) => {
340
+ }), j = s(() => m.disabled ? "" : m.type === "assist" || m.type === "suggestion" ? "text-primary" : m.selected ? "text-on-secondary-container" : "text-on-surface-variant"), te = s(() => m.type === "input" ? [T.value ? "pl-1" : m.icon ? "pl-2" : "pl-3", D.value ? "pr-2" : "pr-3"] : [m.icon || z.value ? "pl-2" : "pl-4", D.value ? "pr-2" : "pr-4"]), P = O(!1), L = O(), R = O(), z = s(() => m.type === "filter" && !m.icon);
341
+ r(() => m.type === "filter" || m.type === "input" ? [P.value ? 8 : m.selected ? 16 : 12, z.value ? m.selected ? 26 : 8 : 0] : [], ([e, t]) => {
289
342
  L.value && e !== void 0 && (L.value.style.borderRadius = `${e}px`), R.value && t !== void 0 && (R.value.style.width = `${t}px`);
290
343
  }, t), r(() => z.value ? [+!!m.selected] : [], ([e]) => {
291
344
  R.value && e !== void 0 && (R.value.style.opacity = String(e));
@@ -293,36 +346,36 @@ var z = /* @__PURE__ */ p({
293
346
  function ne() {
294
347
  m.disabled || (w.value && h("update:selected", !m.selected), h("click"));
295
348
  }
296
- return (e, t) => a.type ? (T(), l("span", {
349
+ return (e, t) => a.type ? (E(), u("span", {
297
350
  key: 0,
298
351
  ref_key: "typedEl",
299
352
  ref: L,
300
- class: y(["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", [A.value, a.type === "assist" || a.type === "suggestion" ? "rounded-sm" : "rounded-md"]])
301
- }, [u("button", {
353
+ class: b(["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", [A.value, a.type === "assist" || a.type === "suggestion" ? "rounded-sm" : "rounded-md"]])
354
+ }, [d("button", {
302
355
  type: "button",
303
- class: y(["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", [N.value, a.disabled ? "cursor-not-allowed" : "cursor-pointer hover:before:opacity-[0.08] active:before:opacity-[0.12]"]]),
356
+ class: b(["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", [te.value, a.disabled ? "cursor-not-allowed" : "cursor-pointer hover:before:opacity-[0.08] active:before:opacity-[0.12]"]]),
304
357
  disabled: a.disabled,
305
358
  "aria-pressed": w.value ? a.selected : void 0,
306
- onPointerdown: t[0] ||= (e) => I.value = !0,
307
- onPointerup: t[1] ||= (e) => I.value = !1,
308
- onPointerleave: t[2] ||= (e) => I.value = !1,
309
- onPointercancel: t[3] ||= (e) => I.value = !1,
359
+ onPointerdown: t[0] ||= (e) => P.value = !0,
360
+ onPointerup: t[1] ||= (e) => P.value = !1,
361
+ onPointerleave: t[2] ||= (e) => P.value = !1,
362
+ onPointercancel: t[3] ||= (e) => P.value = !1,
310
363
  onClick: ne
311
364
  }, [
312
- E.value ? (T(), l("span", {
365
+ T.value ? (E(), u("span", {
313
366
  key: 0,
314
- class: y(["-my-1 flex h-6 w-6 shrink-0 items-center justify-center overflow-hidden rounded-full", a.disabled ? "opacity-38" : ""])
315
- }, [O(e.$slots, "avatar")], 2)) : a.icon ? (T(), s(i, {
367
+ class: b(["-my-1 flex h-6 w-6 shrink-0 items-center justify-center overflow-hidden rounded-full", a.disabled ? "opacity-38" : ""])
368
+ }, [k(e.$slots, "avatar")], 2)) : a.icon ? (E(), c(i, {
316
369
  key: 1,
317
370
  name: a.icon,
318
371
  size: 18,
319
372
  filled: a.type === "filter" && a.selected,
320
- class: y(["shrink-0", te.value])
373
+ class: b(["shrink-0", j.value])
321
374
  }, null, 8, [
322
375
  "name",
323
376
  "filled",
324
377
  "class"
325
- ])) : z.value ? (T(), l("span", {
378
+ ])) : z.value ? (E(), u("span", {
326
379
  key: 2,
327
380
  ref_key: "checkEl",
328
381
  ref: R,
@@ -332,59 +385,59 @@ var z = /* @__PURE__ */ p({
332
385
  opacity: "0"
333
386
  },
334
387
  "aria-hidden": "true"
335
- }, [f(i, {
388
+ }, [p(i, {
336
389
  name: "check",
337
390
  size: 18,
338
- class: y(["shrink-0", te.value])
339
- }, null, 8, ["class"])], 512)) : c("", !0),
340
- u("span", K, [O(e.$slots, "default")]),
341
- a.trailingIcon ? (T(), s(i, {
391
+ class: b(["shrink-0", j.value])
392
+ }, null, 8, ["class"])], 512)) : l("", !0),
393
+ d("span", pe, [k(e.$slots, "default")]),
394
+ a.trailingIcon ? (E(), c(i, {
342
395
  key: 3,
343
396
  name: a.trailingIcon,
344
397
  size: 18,
345
- class: y(["shrink-0", a.disabled ? "" : a.selected && w.value ? "text-on-secondary-container" : "text-on-surface-variant"])
346
- }, null, 8, ["name", "class"])) : c("", !0)
347
- ], 42, le), a.type === "input" && a.removable ? (T(), l("button", {
398
+ class: b(["shrink-0", a.disabled ? "" : a.selected && w.value ? "text-on-secondary-container" : "text-on-surface-variant"])
399
+ }, null, 8, ["name", "class"])) : l("", !0)
400
+ ], 42, fe), a.type === "input" && a.removable ? (E(), u("button", {
348
401
  key: 0,
349
402
  type: "button",
350
- class: y(["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"]),
351
- "aria-label": j(g).remove,
403
+ class: b(["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"]),
404
+ "aria-label": M(g).remove,
352
405
  disabled: a.disabled,
353
- onClick: t[4] ||= F((e) => h("remove"), ["stop"])
354
- }, [f(i, {
406
+ onClick: t[4] ||= I((e) => h("remove"), ["stop"])
407
+ }, [p(i, {
355
408
  name: "close",
356
409
  size: 18
357
- })], 10, ue)) : c("", !0)], 2)) : (T(), s(ee(a.clickable ? "button" : "span"), {
410
+ })], 10, q)) : l("", !0)], 2)) : (E(), c(ee(a.clickable ? "button" : "span"), {
358
411
  key: 1,
359
412
  type: a.clickable ? "button" : void 0,
360
413
  disabled: a.clickable && a.disabled ? !0 : void 0,
361
- class: y(["inline-flex h-8 items-center gap-1.5 overflow-hidden px-3 text-label-large transition-colors", [
414
+ class: b(["inline-flex h-8 items-center gap-1.5 overflow-hidden px-3 text-label-large transition-colors", [
362
415
  C.value,
363
416
  S.value,
364
- a.clickable && !a.disabled ? fe : "",
417
+ a.clickable && !a.disabled ? Y : "",
365
418
  a.disabled ? "cursor-not-allowed" : ""
366
419
  ]]),
367
- style: b(x.value),
420
+ style: x(y.value),
368
421
  onClick: t[6] ||= (e) => a.clickable && !a.disabled && h("click")
369
422
  }, {
370
- default: P(() => [
371
- a.icon ? (T(), s(i, {
423
+ default: F(() => [
424
+ a.icon ? (E(), c(i, {
372
425
  key: 0,
373
426
  name: a.icon,
374
427
  size: 18
375
- }, null, 8, ["name"])) : c("", !0),
376
- O(e.$slots, "default"),
377
- a.removable ? (T(), l("button", {
428
+ }, null, 8, ["name"])) : l("", !0),
429
+ k(e.$slots, "default"),
430
+ a.removable ? (E(), u("button", {
378
431
  key: 1,
379
432
  type: "button",
380
433
  class: "-mr-1 ml-0.5 inline-flex items-center justify-center rounded-full hover:bg-on-surface/12",
381
- "aria-label": j(g).remove,
434
+ "aria-label": M(g).remove,
382
435
  disabled: a.disabled,
383
- onClick: t[5] ||= F((e) => h("remove"), ["stop"])
384
- }, [f(i, {
436
+ onClick: t[5] ||= I((e) => h("remove"), ["stop"])
437
+ }, [p(i, {
385
438
  name: "close",
386
439
  size: 16
387
- })], 8, de)) : c("", !0)
440
+ })], 8, J)) : l("", !0)
388
441
  ]),
389
442
  _: 3
390
443
  }, 8, [
@@ -396,8 +449,8 @@ var z = /* @__PURE__ */ p({
396
449
  }
397
450
  });
398
451
  // src/composables/_useSegmentRuns.ts
399
- function q(e) {
400
- let t = k(/* @__PURE__ */ new Map());
452
+ function he(e) {
453
+ let t = A(/* @__PURE__ */ new Map());
401
454
  function n() {
402
455
  let n = /* @__PURE__ */ new Map(), r = [], i = () => {
403
456
  r.forEach((e, t) => n.set(e, r.length === 1 ? "single" : t === 0 ? "first" : t === r.length - 1 ? "last" : "middle")), r = [];
@@ -406,12 +459,12 @@ function q(e) {
406
459
  i(), t.value = n;
407
460
  }
408
461
  let r;
409
- return S(() => {
462
+ return C(() => {
410
463
  n(), e.value && (r = new MutationObserver(n), r.observe(e.value, { childList: !0 }));
411
- }), C(() => r?.disconnect()), (e) => e ? t.value.get(e) : void 0;
464
+ }), w(() => r?.disconnect()), (e) => e ? t.value.get(e) : void 0;
412
465
  }
413
466
  // src/components/MList.vue?vue&type=script&setup=true&lang.ts
414
- var J = ["role"], Y = /* @__PURE__ */ p({
467
+ var ge = ["role"], X = /* @__PURE__ */ m({
415
468
  __name: "MList",
416
469
  props: {
417
470
  dense: {
@@ -439,49 +492,59 @@ var J = ["role"], Y = /* @__PURE__ */ p({
439
492
  },
440
493
  emits: ["update:selected"],
441
494
  setup(e, { emit: t }) {
442
- let n = e, r = t, i = D(), a = q(i);
443
- E("m-list", {
495
+ let n = e, r = t, i = O(), a = he(i);
496
+ D("m-list", {
444
497
  segmentPosition: a,
445
- dense: o(() => n.dense),
446
- nav: o(() => n.nav),
447
- segmented: o(() => n.segmented),
448
- selectable: o(() => n.selectable),
449
- selected: o(() => n.selected),
450
- dividers: o(() => n.dividers),
451
- lines: o(() => n.lines),
498
+ dense: s(() => n.dense),
499
+ nav: s(() => n.nav),
500
+ segmented: s(() => n.segmented),
501
+ selectable: s(() => n.selectable),
502
+ selected: s(() => n.selected),
503
+ dividers: s(() => n.dividers),
504
+ lines: s(() => n.lines),
452
505
  select: (e) => r("update:selected", e)
453
506
  });
454
- let s = () => [...i.value?.querySelectorAll("[role=\"option\"]") ?? []].filter((e) => e.getAttribute("aria-disabled") !== "true");
507
+ let o = () => [...i.value?.querySelectorAll("[role=\"option\"]") ?? []].filter((e) => e.getAttribute("aria-disabled") !== "true");
455
508
  function c(e) {
456
509
  if (!n.selectable) return;
457
- let t = s(), r = t.indexOf(document.activeElement);
510
+ let t = o(), r = t.indexOf(document.activeElement);
458
511
  if (r < 0) return;
459
512
  let i = e.key === "ArrowDown" ? t[r + 1] : e.key === "ArrowUp" ? t[r - 1] : e.key === "Home" ? t[0] : e.key === "End" ? t[t.length - 1] : void 0;
460
513
  i && (e.preventDefault(), i.focus());
461
514
  }
462
- function u() {
515
+ function l() {
463
516
  if (!n.selectable) return;
464
- let e = s();
517
+ let e = o();
465
518
  e.length && !e.some((e) => e.tabIndex === 0) && (e[0].tabIndex = 0);
466
519
  }
467
- S(u), w(() => v(u));
468
- let d = o(() => [
520
+ C(l), T(() => y(l));
521
+ let d = s(() => [
469
522
  "flex flex-col",
470
523
  n.segmented ? "gap-0.5 p-2" : "py-2",
471
524
  n.nav && !n.segmented && "gap-0.5 px-3"
472
525
  ]);
473
- return (t, n) => (T(), l("ul", {
526
+ return (t, n) => (E(), u("ul", {
474
527
  ref_key: "listEl",
475
528
  ref: i,
476
529
  role: e.selectable ? "listbox" : "list",
477
- class: y(d.value),
530
+ class: b(d.value),
478
531
  onKeydown: c
479
- }, [O(t.$slots, "default")], 42, J));
532
+ }, [k(t.$slots, "default")], 42, ge));
480
533
  }
481
- }), me = { class: "relative -my-2 inline-flex h-12 shrink-0 items-center" }, he = ["checked", "disabled"], ge = {
534
+ }), Z = { class: "relative -my-2 inline-flex h-12 shrink-0 items-center" }, _e = [
535
+ "checked",
536
+ "disabled",
537
+ "name",
538
+ "required",
539
+ "aria-invalid",
540
+ "aria-describedby"
541
+ ], ve = {
482
542
  key: 0,
483
543
  class: "text-body-large text-on-surface"
484
- }, X = "bg-outline group-hover:bg-on-surface-variant group-active:bg-on-surface-variant peer-focus-visible:bg-on-surface-variant", _e = /* @__PURE__ */ p({
544
+ }, Q = {
545
+ key: 0,
546
+ class: "text-error"
547
+ }, ye = ["id"], be = "bg-outline group-hover:bg-on-surface-variant group-active:bg-on-surface-variant peer-focus-visible:bg-on-surface-variant", xe = /* @__PURE__ */ m({
485
548
  __name: "MSwitch",
486
549
  props: {
487
550
  modelValue: { type: Boolean },
@@ -494,72 +557,107 @@ var J = ["role"], Y = /* @__PURE__ */ p({
494
557
  icon: {
495
558
  type: Boolean,
496
559
  default: !0
497
- }
560
+ },
561
+ error: { type: [Boolean, String] },
562
+ errorLabel: {},
563
+ required: { type: Boolean },
564
+ rules: {},
565
+ validateOn: {},
566
+ validateDebounce: {},
567
+ name: {}
498
568
  },
499
- emits: ["update:modelValue"],
500
- setup(e, { emit: t }) {
501
- let n = e, r = t, d = {
569
+ emits: ["update:modelValue", "blur"],
570
+ setup(e, { expose: t, emit: n }) {
571
+ let r = e, m = n, h = O(null), g = a({
572
+ value: () => r.modelValue,
573
+ rules: () => r.rules,
574
+ required: () => r.required,
575
+ error: () => r.error,
576
+ errorLabel: () => r.errorLabel,
577
+ name: () => r.name,
578
+ validateOn: () => r.validateOn,
579
+ validateDebounce: () => r.validateDebounce,
580
+ disabled: () => r.disabled,
581
+ focus: () => {
582
+ h.value?.focus();
583
+ },
584
+ el: () => h.value,
585
+ setValue: (e) => m("update:modelValue", e)
586
+ }), _ = g.disabled, { hasError: v, message: y, messageId: S } = g, C = {
502
587
  primary: "border-primary bg-primary",
503
588
  secondary: "border-secondary bg-secondary",
504
589
  tertiary: "border-tertiary bg-tertiary",
505
590
  error: "border-error bg-error"
506
- }, p = {
591
+ }, w = {
507
592
  primary: "bg-on-primary group-hover:bg-primary-container group-active:bg-primary-container peer-focus-visible:bg-primary-container",
508
593
  secondary: "bg-on-secondary group-hover:bg-secondary-container group-active:bg-secondary-container peer-focus-visible:bg-secondary-container",
509
594
  tertiary: "bg-on-tertiary group-hover:bg-tertiary-container group-active:bg-tertiary-container peer-focus-visible:bg-tertiary-container",
510
595
  error: "bg-on-error group-hover:bg-error-container group-active:bg-error-container peer-focus-visible:bg-error-container"
511
- }, m = {
596
+ }, T = {
512
597
  primary: "text-on-primary-container",
513
598
  secondary: "text-on-secondary-container",
514
599
  tertiary: "text-on-tertiary-container",
515
600
  error: "text-on-error-container"
516
- }, h = {
601
+ }, D = {
517
602
  primary: "bg-primary",
518
603
  secondary: "bg-secondary",
519
604
  tertiary: "bg-tertiary",
520
605
  error: "bg-error"
521
- }, g = D(!1);
522
- function _() {
523
- n.disabled || (g.value = !0);
606
+ }, k = O(!1);
607
+ function ee() {
608
+ _.value || (k.value = !0);
524
609
  }
525
- function v() {
526
- g.value = !1;
610
+ function A() {
611
+ k.value = !1;
527
612
  }
528
- let x = o(() => g.value ? 28 / 24 : n.modelValue ? 1 : 16 / 24), S = o(() => ({
529
- transform: `translateY(-50%) translateX(${n.modelValue ? 18 : 0}px) scale(${x.value})`,
530
- transition: n.modelValue ? "transform 320ms cubic-bezier(0.34, 1.56, 0.64, 1), background-color 280ms ease" : "transform 240ms cubic-bezier(0.2, 0, 0, 1), background-color 240ms ease"
531
- })), C = o(() => ({
532
- transform: `translateX(${n.modelValue ? 18 : 0}px)`,
533
- transition: n.modelValue ? "transform 320ms cubic-bezier(0.34, 1.56, 0.64, 1)" : "transform 240ms cubic-bezier(0.2, 0, 0, 1)"
613
+ let te = s(() => k.value ? 28 / 24 : r.modelValue ? 1 : 16 / 24), N = s(() => ({
614
+ transform: `translateY(-50%) translateX(${r.modelValue ? 18 : 0}px) scale(${te.value})`,
615
+ transition: r.modelValue ? "transform 320ms cubic-bezier(0.34, 1.56, 0.64, 1), background-color 280ms ease" : "transform 240ms cubic-bezier(0.2, 0, 0, 1), background-color 240ms ease"
616
+ })), P = s(() => ({
617
+ transform: `translateX(${r.modelValue ? 18 : 0}px)`,
618
+ transition: r.modelValue ? "transform 320ms cubic-bezier(0.34, 1.56, 0.64, 1)" : "transform 240ms cubic-bezier(0.2, 0, 0, 1)"
534
619
  }));
535
- return (t, n) => (T(), l("label", {
536
- class: y(["group inline-flex items-center gap-3 select-none", e.disabled ? "cursor-not-allowed opacity-[0.38]" : "cursor-pointer"]),
537
- onPointerdown: _,
538
- onPointerup: v,
539
- onPointerleave: v,
540
- onPointercancel: v
541
- }, [u("span", me, [u("span", { class: y(["relative inline-flex h-8 w-[52px] items-center rounded-full border-2 transition-colors duration-200", e.modelValue ? d[e.color] : "border-outline bg-surface-container-highest"]) }, [
542
- u("input", {
620
+ return t({
621
+ validate: g.validate,
622
+ resetValidation: g.resetValidation
623
+ }), (t, n) => (E(), u("label", {
624
+ class: b(["group inline-flex gap-3 select-none", [M(_) ? "cursor-not-allowed opacity-[0.38]" : "cursor-pointer", M(y) ? "items-start" : "items-center"]]),
625
+ onPointerdown: ee,
626
+ onPointerup: A,
627
+ onPointerleave: A,
628
+ onPointercancel: A
629
+ }, [d("span", Z, [d("span", { class: b(["relative inline-flex h-8 w-[52px] items-center rounded-full border-2 transition-colors duration-200", e.modelValue ? C[e.color] : "border-outline bg-surface-container-highest"]) }, [
630
+ d("input", {
543
631
  type: "checkbox",
544
632
  class: "peer sr-only",
545
633
  checked: e.modelValue,
546
- disabled: e.disabled,
547
- onChange: n[0] ||= (t) => r("update:modelValue", !e.modelValue)
548
- }, null, 40, he),
549
- e.disabled ? c("", !0) : (T(), l("span", {
634
+ disabled: M(_),
635
+ ref_key: "inputEl",
636
+ ref: h,
637
+ role: "switch",
638
+ name: e.name,
639
+ required: e.required,
640
+ "aria-invalid": M(v) || void 0,
641
+ "aria-describedby": M(y) ? M(S) : void 0,
642
+ onChange: n[0] ||= (t) => m("update:modelValue", !e.modelValue),
643
+ onBlur: n[1] ||= (e) => {
644
+ M(g).onBlur(), m("blur", e);
645
+ }
646
+ }, null, 40, _e),
647
+ M(_) ? l("", !0) : (E(), u("span", {
550
648
  key: 0,
551
- class: y(["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"]),
552
- style: b(C.value)
649
+ class: b(["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 ? D[e.color] : "bg-on-surface-variant"]),
650
+ style: x(P.value)
553
651
  }, null, 6)),
554
- e.disabled ? c("", !0) : (T(), l("span", {
652
+ M(_) ? l("", !0) : (E(), u("span", {
555
653
  key: 1,
556
654
  class: "pointer-events-none absolute top-1/2 -left-1 h-10 w-10 -translate-y-1/2 rounded-full ring-0 ring-secondary transition-[box-shadow] duration-150 peer-focus-visible:ring-2",
557
- style: b(C.value)
655
+ style: x(P.value)
558
656
  }, null, 4)),
559
- u("span", {
560
- class: y(["absolute left-1 top-1/2 flex h-6 w-6 items-center justify-center rounded-full will-change-transform", e.modelValue ? [p[e.color], "shadow-sm"] : X]),
561
- style: b(S.value)
562
- }, [f(a, {
657
+ d("span", {
658
+ class: b(["absolute left-1 top-1/2 flex h-6 w-6 items-center justify-center rounded-full will-change-transform", e.modelValue ? [w[e.color], "shadow-sm"] : be]),
659
+ style: x(N.value)
660
+ }, [p(o, {
563
661
  "enter-active-class": "transition-opacity duration-150 delay-[120ms]",
564
662
  "enter-from-class": "opacity-0",
565
663
  "enter-to-class": "opacity-100",
@@ -567,22 +665,30 @@ var J = ["role"], Y = /* @__PURE__ */ p({
567
665
  "leave-from-class": "opacity-100",
568
666
  "leave-to-class": "opacity-0"
569
667
  }, {
570
- default: P(() => [e.modelValue && e.icon ? (T(), s(i, {
668
+ default: F(() => [e.modelValue && e.icon ? (E(), c(i, {
571
669
  key: 0,
572
670
  name: "check",
573
671
  size: 14,
574
- class: y(m[e.color])
575
- }, null, 8, ["class"])) : c("", !0)]),
672
+ class: b(T[e.color])
673
+ }, null, 8, ["class"])) : l("", !0)]),
576
674
  _: 1
577
675
  })], 6)
578
- ], 2)]), e.label ? (T(), l("span", ge, A(e.label), 1)) : c("", !0)], 34));
676
+ ], 2)]), e.label || M(y) ? (E(), u("span", {
677
+ key: 0,
678
+ class: b(["flex flex-col", M(y) && "pt-1"])
679
+ }, [e.label ? (E(), u("span", ve, [f(j(e.label), 1), e.required ? (E(), u("span", Q, "\xA0*")) : l("", !0)])) : l("", !0), M(y) ? (E(), u("span", {
680
+ key: 1,
681
+ id: M(S),
682
+ role: "alert",
683
+ class: "text-body-small text-error"
684
+ }, j(M(y)), 9, ye)) : l("", !0)], 2)) : l("", !0)], 34));
579
685
  }
580
- }), ve = [
686
+ }), Se = [
581
687
  "tabindex",
582
688
  "aria-expanded",
583
689
  "aria-controls",
584
690
  "aria-disabled"
585
- ], ye = { class: "min-w-0 flex-1" }, be = ["id"], xe = ["src"], Se = { class: "min-w-0 flex-1" }, Ce = 4, we = 8, Te = 16, Ee = "button, a, input, select, textarea, label, [role=\"button\"], [role=\"switch\"], [role=\"checkbox\"], [role=\"radio\"], [role=\"link\"], [tabindex]", Z = /* @__PURE__ */ p({
691
+ ], Ce = { class: "min-w-0 flex-1" }, we = ["id"], Te = ["src"], Ee = { class: "min-w-0 flex-1" }, De = 4, Oe = 8, ke = 16, Ae = "button, a, input, select, textarea, label, [role=\"button\"], [role=\"switch\"], [role=\"checkbox\"], [role=\"radio\"], [role=\"link\"], [tabindex]", je = /* @__PURE__ */ m({
586
692
  inheritAttrs: !1,
587
693
  __name: "MListItem",
588
694
  props: {
@@ -625,46 +731,46 @@ var J = ["role"], Y = /* @__PURE__ */ p({
625
731
  "update:expanded"
626
732
  ],
627
733
  setup(e, { emit: t }) {
628
- let n = e, d = t, p = m(), v = () => !!p?.vnode.props?.onClick, x = D(n.expanded ?? !1);
629
- N(() => n.expanded, (e) => {
630
- e !== void 0 && (x.value = e);
734
+ let n = e, a = t, f = h(), m = () => !!f?.vnode.props?.onClick, y = O(n.expanded ?? !1);
735
+ P(() => n.expanded, (e) => {
736
+ e !== void 0 && (y.value = e);
631
737
  });
632
- let S = o(() => x.value), C = g("m-list", null), w = o(() => n.lines ? n.lines : C?.lines.value ? C.lines.value : n.description || n.overline && n.subtitle ? 3 : n.subtitle || n.overline ? 2 : 1), E = o(() => n.clickable || n.href || n.to || v() || C?.selectable.value || n.expandable), k = o(() => !!C?.selectable.value && n.value != null && !n.href && !n.to && !n.expandable), M = o(() => !!(n.href || n.to)), F = o(() => !k.value && !M.value && !n.expandable && (n.clickable || v())), I = o(() => M.value || F.value), L = o(() => k.value ? "option" : F.value ? "button" : M.value ? void 0 : "listitem"), R = o(() => {
633
- if (k.value) return B.value && !n.disabled ? 0 : -1;
634
- if (F.value) return n.disabled ? -1 : 0;
738
+ let S = s(() => y.value), C = _("m-list", null), w = s(() => n.lines ? n.lines : C?.lines.value ? C.lines.value : n.description || n.overline && n.subtitle ? 3 : n.subtitle || n.overline ? 2 : 1), T = s(() => n.clickable || n.href || n.to || m() || C?.selectable.value || n.expandable), D = s(() => !!C?.selectable.value && n.value != null && !n.href && !n.to && !n.expandable), A = s(() => !!(n.href || n.to)), N = s(() => !D.value && !A.value && !n.expandable && (n.clickable || m())), I = s(() => A.value || N.value), L = s(() => D.value ? "option" : N.value ? "button" : A.value ? void 0 : "listitem"), R = s(() => {
739
+ if (D.value) return B.value && !n.disabled ? 0 : -1;
740
+ if (N.value) return n.disabled ? -1 : 0;
635
741
  });
636
- function ne(e) {
637
- (k.value || F.value) && (e.key !== "Enter" && e.key !== " " || e.target !== e.currentTarget || (e.preventDefault(), $(e)));
742
+ function z(e) {
743
+ (D.value || N.value) && (e.key !== "Enter" && e.key !== " " || e.target !== e.currentTarget || (e.preventDefault(), $(e)));
638
744
  }
639
- let B = o(() => n.active ? !0 : C?.selectable.value && n.value != null ? C.selected.value === n.value : !1), V = o(() => n.leading ? n.leading : n.icon ? "icon" : n.avatarName ? "avatar" : n.image ? "image" : null), H = o(() => n.expandable ? "expand" : n.trailing ? n.trailing : n.trailingIcon ? "icon" : n.trailingText ? "text" : null), re = {
745
+ let B = s(() => n.active ? !0 : C?.selectable.value && n.value != null ? C.selected.value === n.value : !1), V = s(() => n.leading ? n.leading : n.icon ? "icon" : n.avatarName ? "avatar" : n.image ? "image" : null), H = s(() => n.expandable ? "expand" : n.trailing ? n.trailing : n.trailingIcon ? "icon" : n.trailingText ? "text" : null), re = {
640
746
  primary: "bg-primary-container text-on-primary-container",
641
747
  secondary: "bg-secondary-container text-on-secondary-container",
642
748
  tertiary: "bg-tertiary-container text-on-tertiary-container",
643
749
  error: "bg-error-container text-on-error-container",
644
750
  success: "bg-success-container text-on-success-container"
645
- }, U = o(() => C?.dense.value ?? !1), W = o(() => C?.nav.value ?? !1), ie = o(() => C?.segmented.value ?? !1), ae = o(() => C?.dividers.value ?? !1), oe = o(() => B.value ? "text-on-secondary-container" : "text-on-surface"), G = o(() => B.value ? "text-on-secondary-container" : "text-on-surface-variant"), se = o(() => U.value ? "" : w.value === 3 ? "min-h-22" : w.value === 2 ? "min-h-18" : "min-h-14"), le = o(() => [
751
+ }, ie = s(() => C?.dense.value ?? !1), U = s(() => C?.nav.value ?? !1), W = s(() => C?.segmented.value ?? !1), ae = s(() => C?.dividers.value ?? !1), oe = s(() => B.value ? "text-on-secondary-container" : "text-on-surface"), G = s(() => B.value ? "text-on-secondary-container" : "text-on-surface-variant"), se = s(() => ie.value ? "" : w.value === 3 ? "min-h-22" : w.value === 2 ? "min-h-18" : "min-h-14"), ce = s(() => [
646
752
  "mli-row relative flex w-full items-center gap-4 text-left",
647
- ie.value ? "bg-surface-container px-4" : W.value ? "rounded-full px-4" : "px-4",
648
- U.value ? "py-1" : w.value === 3 ? "py-3" : "py-2",
753
+ W.value ? "bg-surface-container px-4" : U.value ? "rounded-full px-4" : "px-4",
754
+ ie.value ? "py-1" : w.value === 3 ? "py-3" : "py-2",
649
755
  se.value,
650
- E.value && !n.disabled && "cursor-pointer",
756
+ T.value && !n.disabled && "cursor-pointer",
651
757
  B.value && "bg-secondary-container text-on-secondary-container",
652
758
  n.disabled && "opacity-[0.38] pointer-events-none"
653
- ]), K = D(null), ue = D(null), de = (e, { slots: t }) => I.value ? h("li", {
759
+ ]), K = O(null), le = O(null), ue = (e, { slots: t }) => I.value ? g("li", {
654
760
  role: "listitem",
655
761
  ref: (e) => {
656
- ue.value = e;
762
+ le.value = e;
657
763
  }
658
- }, t.default?.()) : t.default?.(), fe = D(null), pe = (e) => e && "$el" in e ? e.$el : e, q = D(!1), J = D(!1), Y = D(!1), me = o(() => ie.value ? C?.segmentPosition(I.value ? ue.value : pe(K.value)) : void 0), he = o(() => {
659
- if (W.value) return [];
660
- let e = E.value && !n.disabled, t = e && J.value || B.value || e && Y.value ? Te : e && q.value ? we : null;
764
+ }, t.default?.()) : t.default?.(), fe = O(null), pe = (e) => e && "$el" in e ? e.$el : e, q = O(!1), J = O(!1), Y = O(!1), me = s(() => W.value ? C?.segmentPosition(I.value ? le.value : pe(K.value)) : void 0), he = s(() => {
765
+ if (U.value) return [];
766
+ let e = T.value && !n.disabled, t = e && J.value || B.value || e && Y.value ? ke : e && q.value ? Oe : null;
661
767
  if (t !== null) return [
662
768
  t,
663
769
  t,
664
770
  t,
665
771
  t
666
772
  ];
667
- let r = me.value, i = r === "first" || r === "single" ? Te : Ce, a = r === "last" || r === "single" ? Te : Ce;
773
+ let r = me.value, i = r === "first" || r === "single" ? ke : De, a = r === "last" || r === "single" ? ke : De;
668
774
  return [
669
775
  i,
670
776
  i,
@@ -675,109 +781,109 @@ var J = ["role"], Y = /* @__PURE__ */ p({
675
781
  let t = fe.value ?? pe(K.value);
676
782
  t && (t.style.borderRadius = e.length ? e.map((e) => `${e}px`).join(" ") : "");
677
783
  });
678
- N([me, W], () => ge());
784
+ P([me, U], () => ge());
679
785
  function X(e) {
680
- let t = e.currentTarget, n = e.target?.closest?.(Ee);
786
+ let t = e.currentTarget, n = e.target?.closest?.(Ae);
681
787
  return !!n && n !== t && t.contains(n) && !n.closest("[data-mli-part]");
682
788
  }
683
789
  function Z(e) {
684
790
  e.pointerType !== "touch" && (q.value = !X(e));
685
791
  }
686
- function De() {
792
+ function _e() {
687
793
  q.value = !1, J.value = !1;
688
794
  }
689
- function Oe(e) {
795
+ function ve(e) {
690
796
  e.button === 0 && !X(e) && (J.value = !0);
691
797
  }
692
798
  function Q() {
693
799
  J.value = !1;
694
800
  }
695
- let ke = o(() => !E.value || n.disabled ? 0 : J.value ? .12 : q.value ? .08 : 0), Ae = o(() => n.indent === void 0 ? void 0 : { paddingLeft: typeof n.indent == "number" ? `${n.indent}px` : n.indent });
801
+ let ye = s(() => !T.value || n.disabled ? 0 : J.value ? .12 : q.value ? .08 : 0), be = s(() => n.indent === void 0 ? void 0 : { paddingLeft: typeof n.indent == "number" ? `${n.indent}px` : n.indent });
696
802
  function je(e) {
697
803
  Y.value = e.currentTarget.matches(":focus-visible");
698
804
  }
699
805
  function Me() {
700
806
  Y.value = !1;
701
807
  }
702
- let Ne = o(() => n.href ? "a" : n.to ? "router-link" : F.value ? "div" : "li"), Pe = o(() => n.href ? { href: n.href } : n.to ? { to: n.to } : {}), Fe = te();
808
+ let Ne = s(() => n.href ? "a" : n.to ? "router-link" : N.value ? "div" : "li"), Pe = s(() => n.href ? { href: n.href } : n.to ? { to: n.to } : {}), Fe = te();
703
809
  function Ie(e) {
704
810
  (e.key === "Enter" || e.key === " ") && e.target === e.currentTarget && (e.preventDefault(), $(e));
705
811
  }
706
812
  function Le(e) {
707
- n.disabled || (x.value = !x.value, d("update:expanded", x.value), d("click", e));
813
+ n.disabled || (y.value = !y.value, a("update:expanded", y.value), a("click", e));
708
814
  }
709
815
  function $(e) {
710
816
  if (!n.disabled) {
711
817
  if (n.expandable) {
712
818
  if (X(e)) return;
713
819
  Le(e);
714
- } else C?.selectable.value && n.value != null && C.select(n.value), d("click", e);
820
+ } else C?.selectable.value && n.value != null && C.select(n.value), a("click", e);
715
821
  }
716
822
  }
717
823
  function Re() {
718
- d("update:trailingValue", !n.trailingValue);
824
+ a("update:trailingValue", !n.trailingValue);
719
825
  }
720
- return (t, n) => e.expandable ? (T(), l("li", _({
826
+ return (t, n) => e.expandable ? (E(), u("li", v({
721
827
  key: 0,
722
828
  ref_key: "rootEl",
723
829
  ref: K
724
- }, t.$attrs, { role: "listitem" }), [u("div", {
830
+ }, t.$attrs, { role: "listitem" }), [d("div", {
725
831
  ref_key: "shapeEl",
726
832
  ref: fe,
727
833
  role: "button",
728
834
  tabindex: e.disabled ? -1 : 0,
729
835
  "aria-expanded": S.value,
730
- "aria-controls": j(Fe),
836
+ "aria-controls": M(Fe),
731
837
  "aria-disabled": e.disabled || void 0,
732
- class: y(["focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-secondary", le.value]),
838
+ class: b(["focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-secondary", ce.value]),
733
839
  onClick: $,
734
840
  onKeydown: Ie,
735
841
  onFocus: je,
736
842
  onBlur: Me,
737
843
  onPointerenter: Z,
738
844
  onPointermove: Z,
739
- onPointerleave: De,
740
- onPointerdown: Oe,
845
+ onPointerleave: _e,
846
+ onPointerdown: ve,
741
847
  onPointerup: Q,
742
848
  onPointercancel: Q
743
849
  }, [
744
- u("span", {
745
- class: y(["mli-state-layer pointer-events-none absolute inset-0 rounded-[inherit]", B.value ? "bg-on-secondary-container" : "bg-on-surface"]),
746
- style: b({ opacity: ke.value }),
850
+ d("span", {
851
+ class: b(["mli-state-layer pointer-events-none absolute inset-0 rounded-[inherit]", B.value ? "bg-on-secondary-container" : "bg-on-surface"]),
852
+ style: x({ opacity: ye.value }),
747
853
  "aria-hidden": "true"
748
854
  }, null, 6),
749
- O(t.$slots, "leading", {}, () => [V.value === "icon" ? (T(), s(i, {
855
+ k(t.$slots, "leading", {}, () => [V.value === "icon" ? (E(), c(i, {
750
856
  key: 0,
751
857
  name: e.icon,
752
858
  size: 24,
753
- class: y(["shrink-0", G.value])
754
- }, null, 8, ["name", "class"])) : c("", !0)]),
755
- u("div", ye, [O(t.$slots, "overline", {}, () => [e.overline ? (T(), l("p", {
859
+ class: b(["shrink-0", G.value])
860
+ }, null, 8, ["name", "class"])) : l("", !0)]),
861
+ d("div", Ce, [k(t.$slots, "overline", {}, () => [e.overline ? (E(), u("p", {
756
862
  key: 0,
757
- class: y(["truncate text-label-small", G.value])
758
- }, A(e.overline), 3)) : c("", !0)]), O(t.$slots, "default", {}, () => [u("p", { class: y(["truncate text-body-large", oe.value]) }, A(e.title), 3), e.subtitle && w.value >= 2 ? (T(), l("p", {
863
+ class: b(["truncate text-label-small", G.value])
864
+ }, j(e.overline), 3)) : l("", !0)]), k(t.$slots, "default", {}, () => [d("p", { class: b(["truncate text-body-large", oe.value]) }, j(e.title), 3), e.subtitle && w.value >= 2 ? (E(), u("p", {
759
865
  key: 0,
760
- class: y(["text-body-medium", [G.value, w.value === 2 && "truncate"]])
761
- }, A(e.subtitle), 3)) : c("", !0)])]),
762
- O(t.$slots, "trailing"),
763
- f(i, {
866
+ class: b(["text-body-medium", [G.value, w.value === 2 && "truncate"]])
867
+ }, j(e.subtitle), 3)) : l("", !0)])]),
868
+ k(t.$slots, "trailing"),
869
+ p(i, {
764
870
  name: S.value ? "expand_less" : "expand_more",
765
871
  size: 20,
766
- class: y(["shrink-0", G.value])
872
+ class: b(["shrink-0", G.value])
767
873
  }, null, 8, ["name", "class"])
768
- ], 42, ve), f(a, { name: "mli-expand" }, {
769
- default: P(() => [S.value ? (T(), l("div", {
874
+ ], 42, Se), p(o, { name: "mli-expand" }, {
875
+ default: F(() => [S.value ? (E(), u("div", {
770
876
  key: 0,
771
- id: j(Fe),
877
+ id: M(Fe),
772
878
  class: "mli-expand-grid"
773
- }, [u("div", {
879
+ }, [d("div", {
774
880
  class: "mli-expand-body",
775
- style: b(Ae.value)
776
- }, [O(t.$slots, "children")], 4)], 8, be)) : c("", !0)]),
881
+ style: x(be.value)
882
+ }, [k(t.$slots, "children")], 4)], 8, we)) : l("", !0)]),
777
883
  _: 3
778
- })], 16)) : (T(), s(de, { key: 1 }, {
779
- default: P(() => [(T(), s(ee(Ne.value), _({
780
- class: le.value,
884
+ })], 16)) : (E(), c(ue, { key: 1 }, {
885
+ default: F(() => [(E(), c(ee(Ne.value), v({
886
+ class: ce.value,
781
887
  ref_key: "rootEl",
782
888
  ref: K
783
889
  }, {
@@ -786,87 +892,87 @@ var J = ["role"], Y = /* @__PURE__ */ p({
786
892
  }, {
787
893
  role: L.value,
788
894
  tabindex: R.value,
789
- "aria-selected": k.value ? B.value : void 0,
790
- "aria-disabled": (k.value || F.value) && e.disabled ? "true" : void 0,
895
+ "aria-selected": D.value ? B.value : void 0,
896
+ "aria-disabled": (D.value || N.value) && e.disabled ? "true" : void 0,
791
897
  onClick: $,
792
- onKeydown: ne,
898
+ onKeydown: z,
793
899
  onPointerenter: Z,
794
900
  onPointermove: Z,
795
- onPointerleave: De,
796
- onPointerdown: Oe,
901
+ onPointerleave: _e,
902
+ onPointerdown: ve,
797
903
  onPointerup: Q,
798
904
  onPointercancel: Q,
799
905
  onFocus: je,
800
906
  onBlur: Me
801
907
  }), {
802
- default: P(() => [
803
- u("span", {
804
- class: y(["mli-state-layer pointer-events-none absolute inset-0 rounded-[inherit]", B.value ? "bg-on-secondary-container" : "bg-on-surface"]),
805
- style: b({ opacity: ke.value }),
908
+ default: F(() => [
909
+ d("span", {
910
+ class: b(["mli-state-layer pointer-events-none absolute inset-0 rounded-[inherit]", B.value ? "bg-on-secondary-container" : "bg-on-surface"]),
911
+ style: x({ opacity: ye.value }),
806
912
  "aria-hidden": "true"
807
913
  }, null, 6),
808
- ae.value ? (T(), l("div", {
914
+ ae.value ? (E(), u("div", {
809
915
  key: 0,
810
- class: y(["absolute top-0 right-0 h-px bg-outline-variant", ae.value === "inset" ? "left-16" : "left-0"])
811
- }, null, 2)) : c("", !0),
812
- O(t.$slots, "leading", {}, () => [V.value === "icon" ? (T(), s(i, {
916
+ class: b(["absolute top-0 right-0 h-px bg-outline-variant", ae.value === "inset" ? "left-16" : "left-0"])
917
+ }, null, 2)) : l("", !0),
918
+ k(t.$slots, "leading", {}, () => [V.value === "icon" ? (E(), c(i, {
813
919
  key: 0,
814
920
  name: e.icon,
815
921
  size: 24,
816
- class: y(["shrink-0", G.value])
817
- }, null, 8, ["name", "class"])) : V.value === "icon-container" ? (T(), l("div", {
922
+ class: b(["shrink-0", G.value])
923
+ }, null, 8, ["name", "class"])) : V.value === "icon-container" ? (E(), u("div", {
818
924
  key: 1,
819
- class: y(["flex h-10 w-10 shrink-0 items-center justify-center rounded-full", re[e.iconContainerColor || "primary"]])
820
- }, [f(i, {
925
+ class: b(["flex h-10 w-10 shrink-0 items-center justify-center rounded-full", re[e.iconContainerColor || "primary"]])
926
+ }, [p(i, {
821
927
  name: e.icon,
822
928
  size: 24
823
- }, null, 8, ["name"])], 2)) : V.value === "avatar" ? (T(), s(z, {
929
+ }, null, 8, ["name"])], 2)) : V.value === "avatar" ? (E(), c(ne, {
824
930
  key: 2,
825
931
  name: e.avatarName,
826
932
  size: 40,
827
933
  class: "shrink-0"
828
- }, null, 8, ["name"])) : V.value === "image" ? (T(), l("img", {
934
+ }, null, 8, ["name"])) : V.value === "image" ? (E(), u("img", {
829
935
  key: 3,
830
936
  src: e.image,
831
937
  alt: "",
832
938
  class: "h-14 w-14 shrink-0 rounded-md object-cover"
833
- }, null, 8, xe)) : V.value === "checkbox" ? (T(), s(ce, {
939
+ }, null, 8, Te)) : V.value === "checkbox" ? (E(), c(de, {
834
940
  key: 4,
835
941
  "model-value": B.value,
836
942
  class: "shrink-0",
837
943
  "data-mli-part": ""
838
- }, null, 8, ["model-value"])) : c("", !0)]),
839
- u("div", Se, [O(t.$slots, "overline", {}, () => [e.overline ? (T(), l("p", {
944
+ }, null, 8, ["model-value"])) : l("", !0)]),
945
+ d("div", Ee, [k(t.$slots, "overline", {}, () => [e.overline ? (E(), u("p", {
840
946
  key: 0,
841
- class: y(["truncate text-label-small", G.value])
842
- }, A(e.overline), 3)) : c("", !0)]), O(t.$slots, "default", {}, () => [
843
- u("p", { class: y(["truncate text-body-large", oe.value]) }, A(e.title), 3),
844
- e.subtitle && w.value >= 2 ? (T(), l("p", {
947
+ class: b(["truncate text-label-small", G.value])
948
+ }, j(e.overline), 3)) : l("", !0)]), k(t.$slots, "default", {}, () => [
949
+ d("p", { class: b(["truncate text-body-large", oe.value]) }, j(e.title), 3),
950
+ e.subtitle && w.value >= 2 ? (E(), u("p", {
845
951
  key: 0,
846
- class: y(["text-body-medium", [G.value, w.value === 2 && "truncate"]])
847
- }, A(e.subtitle), 3)) : c("", !0),
848
- e.description && w.value >= 3 ? (T(), l("p", {
952
+ class: b(["text-body-medium", [G.value, w.value === 2 && "truncate"]])
953
+ }, j(e.subtitle), 3)) : l("", !0),
954
+ e.description && w.value >= 3 ? (E(), u("p", {
849
955
  key: 1,
850
- class: y(["line-clamp-2 text-body-small", G.value])
851
- }, A(e.description), 3)) : c("", !0)
956
+ class: b(["line-clamp-2 text-body-small", G.value])
957
+ }, j(e.description), 3)) : l("", !0)
852
958
  ])]),
853
- O(t.$slots, "trailing", {}, () => [H.value === "icon" ? (T(), s(i, {
959
+ k(t.$slots, "trailing", {}, () => [H.value === "icon" ? (E(), c(i, {
854
960
  key: 0,
855
961
  name: e.trailingIcon,
856
962
  size: 24,
857
- class: y(["shrink-0", G.value])
858
- }, null, 8, ["name", "class"])) : H.value === "text" ? (T(), l("span", {
963
+ class: b(["shrink-0", G.value])
964
+ }, null, 8, ["name", "class"])) : H.value === "text" ? (E(), u("span", {
859
965
  key: 1,
860
- class: y(["shrink-0 text-label-small", G.value])
861
- }, A(e.trailingText), 3)) : H.value === "switch" ? (T(), s(_e, {
966
+ class: b(["shrink-0 text-label-small", G.value])
967
+ }, j(e.trailingText), 3)) : H.value === "switch" ? (E(), c(xe, {
862
968
  key: 2,
863
969
  "model-value": !!e.trailingValue,
864
970
  "onUpdate:modelValue": Re
865
- }, null, 8, ["model-value"])) : H.value === "checkbox" ? (T(), s(ce, {
971
+ }, null, 8, ["model-value"])) : H.value === "checkbox" ? (E(), c(de, {
866
972
  key: 3,
867
973
  "model-value": !!e.trailingValue,
868
974
  "onUpdate:modelValue": Re
869
- }, null, 8, ["model-value"])) : c("", !0)])
975
+ }, null, 8, ["model-value"])) : l("", !0)])
870
976
  ]),
871
977
  _: 3
872
978
  }, 16, [
@@ -880,6 +986,6 @@ var J = ["role"], Y = /* @__PURE__ */ p({
880
986
  }));
881
987
  }
882
988
  });
883
- export { pe as a, z as c, q as i, R as l, _e as n, ce as o, Y as r, ae as s, Z as t };
989
+ export { me as a, ne as c, he as i, z as l, xe as n, de as o, X as r, oe as s, je as t };
884
990
 
885
- //# sourceMappingURL=MListItem-D2cNUyzP.js.map
991
+ //# sourceMappingURL=MListItem-BU5KDRCB.js.map