@m3ui-vue/m3ui-vue 1.6.0 → 1.6.2

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 (158) hide show
  1. package/dist/API.md +940 -33
  2. package/dist/{MButton-CPghlKb0.js → MButton-OQ4wIERQ.js} +2 -2
  3. package/dist/{MButton-CPghlKb0.js.map → MButton-OQ4wIERQ.js.map} +1 -1
  4. package/dist/MColorPickerModal-NtkihoK6.js +577 -0
  5. package/dist/MColorPickerModal-NtkihoK6.js.map +1 -0
  6. package/dist/{MDialog-X50At1Gk.js → MDialog-DYMnaBlt.js} +3 -3
  7. package/dist/{MDialog-X50At1Gk.js.map → MDialog-DYMnaBlt.js.map} +1 -1
  8. package/dist/{MListItem-DVi1j1QI.js → MListItem-D2cNUyzP.js} +211 -168
  9. package/dist/MListItem-D2cNUyzP.js.map +1 -0
  10. package/dist/{MLoadingIndicator-vooA3110.js → MLoadingIndicator-DWUj0BAB.js} +2 -2
  11. package/dist/{MLoadingIndicator-vooA3110.js.map → MLoadingIndicator-DWUj0BAB.js.map} +1 -1
  12. package/dist/{MMenuItem-CRNZkVVr.js → MMenuItem-BuxYoASE.js} +133 -151
  13. package/dist/MMenuItem-BuxYoASE.js.map +1 -0
  14. package/dist/{MSeekBar-BL2W5_rD.js → MSeekBar-C4cn9RIF.js} +2 -2
  15. package/dist/{MSeekBar-BL2W5_rD.js.map → MSeekBar-C4cn9RIF.js.map} +1 -1
  16. package/dist/{MSlider-B9NcKTmZ.js → MSlider-BIkA6DiE.js} +2 -2
  17. package/dist/{MSlider-B9NcKTmZ.js.map → MSlider-BIkA6DiE.js.map} +1 -1
  18. package/dist/{MSpinner-_XpTRkAg.js → MSpinner-DZkXZJpc.js} +2 -2
  19. package/dist/{MSpinner-_XpTRkAg.js.map → MSpinner-DZkXZJpc.js.map} +1 -1
  20. package/dist/{MTextField-DpcPmR5B.js → MTextField-CNH-byir.js} +2 -2
  21. package/dist/{MTextField-DpcPmR5B.js.map → MTextField-CNH-byir.js.map} +1 -1
  22. package/dist/MTooltip-CK39Zon4.js +183 -0
  23. package/dist/MTooltip-CK39Zon4.js.map +1 -0
  24. package/dist/{_useEscapeStack-C5-BYr8y.js → _popupPosition-nL8SVKPK.js} +20 -2
  25. package/dist/_popupPosition-nL8SVKPK.js.map +1 -0
  26. package/dist/api.json +1 -1
  27. package/dist/code-editor.js +1 -1
  28. package/dist/components/MAddressField.vue.d.ts +54 -0
  29. package/dist/components/MAudioPlayer.vue.d.ts +1 -1
  30. package/dist/components/MAudioRecorder.vue.d.ts +51 -0
  31. package/dist/components/MAvailabilityCalendar.vue.d.ts +1 -1
  32. package/dist/components/MCameraCapture.vue.d.ts +51 -0
  33. package/dist/components/MCollapse.vue.d.ts +32 -0
  34. package/dist/components/MCountrySelect.vue.d.ts +41 -0
  35. package/dist/components/MCronField.vue.d.ts +26 -0
  36. package/dist/components/MDashboardGrid.vue.d.ts +65 -0
  37. package/dist/components/MDiffViewer.vue.d.ts +56 -0
  38. package/dist/components/MExpansionPanel.vue.d.ts +26 -3
  39. package/dist/components/MFilterBuilder.vue.d.ts +22 -0
  40. package/dist/components/MFlex.vue.d.ts +1 -1
  41. package/dist/components/MMapCluster.vue.d.ts +80 -0
  42. package/dist/components/MMapDraw.vue.d.ts +79 -0
  43. package/dist/components/MMentionField.vue.d.ts +102 -0
  44. package/dist/components/MNotificationCenter.vue.d.ts +57 -0
  45. package/dist/components/MQRScanner.vue.d.ts +52 -0
  46. package/dist/components/MQuiz.vue.d.ts +1 -1
  47. package/dist/components/MSimpleCarousel.vue.d.ts +1 -1
  48. package/dist/components/MStack.vue.d.ts +1 -1
  49. package/dist/components/MTimezoneSelect.vue.d.ts +39 -0
  50. package/dist/components/MToolbar.vue.d.ts +1 -1
  51. package/dist/components/MVideoPlayer.vue.d.ts +1 -1
  52. package/dist/components/_MFilterGroup.vue.d.ts +17 -0
  53. package/dist/composables/_caretPosition.d.ts +6 -0
  54. package/dist/composables/_useCamera.d.ts +16 -0
  55. package/dist/composables/_useFollowAnchor.d.ts +15 -0
  56. package/dist/composables/cron.d.ts +29 -0
  57. package/dist/composables/dashboardLayout.d.ts +28 -0
  58. package/dist/composables/filterBuilder.d.ts +55 -0
  59. package/dist/composables/mapAdapters.d.ts +6 -1
  60. package/dist/composables/mapSearch.d.ts +1 -0
  61. package/dist/composables/textDiff.d.ts +24 -0
  62. package/dist/composables/useLocale.d.ts +108 -0
  63. package/dist/draw.js +28 -27
  64. package/dist/draw.js.map +1 -1
  65. package/dist/flow.js +1 -1
  66. package/dist/gantt.js +1 -1
  67. package/dist/index.d.ts +25 -0
  68. package/dist/locales/index.js +749 -0
  69. package/dist/locales/index.js.map +1 -1
  70. package/dist/m3ui-vue.css +1 -1
  71. package/dist/m3ui.js +10444 -7495
  72. package/dist/m3ui.js.map +1 -1
  73. package/dist/map.d.ts +5 -0
  74. package/dist/map.js +1509 -617
  75. package/dist/map.js.map +1 -1
  76. package/dist/media.js +5 -5
  77. package/dist/pdf.js +5 -5
  78. package/dist/rich-text-editor.js +5 -5
  79. package/dist/styles.css +1 -1
  80. package/dist/{useLocale-COav9m8C.js → useLocale-DaVSTdm0.js} +108 -1
  81. package/dist/useLocale-DaVSTdm0.js.map +1 -0
  82. package/package.json +1 -1
  83. package/src/__tests__/MAddressField.test.ts +149 -0
  84. package/src/__tests__/MAudioRecorder.test.ts +125 -0
  85. package/src/__tests__/MCameraCapture.test.ts +154 -0
  86. package/src/__tests__/MCountrySelect.test.ts +67 -0
  87. package/src/__tests__/MCronField.test.ts +100 -0
  88. package/src/__tests__/MDashboardGrid.test.ts +122 -0
  89. package/src/__tests__/MDiffViewer.test.ts +68 -0
  90. package/src/__tests__/MExpansionPanel.test.ts +107 -0
  91. package/src/__tests__/MFilterBuilder.test.ts +130 -0
  92. package/src/__tests__/MMapCluster.test.ts +127 -0
  93. package/src/__tests__/MMapDraw.test.ts +188 -0
  94. package/src/__tests__/MMapLayers.test.ts +56 -0
  95. package/src/__tests__/MMentionField.test.ts +163 -0
  96. package/src/__tests__/MNotificationCenter.test.ts +94 -0
  97. package/src/__tests__/_fakeMaplibre.ts +14 -3
  98. package/src/__tests__/attrsFallthrough.test.ts +4 -0
  99. package/src/__tests__/cron.test.ts +68 -0
  100. package/src/__tests__/dashboardLayout.test.ts +45 -0
  101. package/src/__tests__/filterBuilder.test.ts +91 -0
  102. package/src/__tests__/followAnchor.test.ts +162 -0
  103. package/src/__tests__/ssr.test.ts +3 -0
  104. package/src/__tests__/textDiff.test.ts +37 -0
  105. package/src/components/MAddressField.vue +301 -0
  106. package/src/components/MAudioRecorder.vue +334 -0
  107. package/src/components/MAutocomplete.vue +3 -7
  108. package/src/components/MCameraCapture.vue +156 -0
  109. package/src/components/MCollapse.vue +91 -0
  110. package/src/components/MColorPicker.vue +4 -8
  111. package/src/components/MCountrySelect.vue +89 -0
  112. package/src/components/MCronField.vue +251 -0
  113. package/src/components/MDashboardGrid.vue +382 -0
  114. package/src/components/MDatePicker.vue +10 -7
  115. package/src/components/MDateRangePicker.vue +10 -7
  116. package/src/components/MDiffViewer.vue +234 -0
  117. package/src/components/MExpansionPanel.vue +56 -48
  118. package/src/components/MFilterBuilder.vue +47 -0
  119. package/src/components/MMapBaseLayers.vue +29 -28
  120. package/src/components/MMapCluster.vue +295 -0
  121. package/src/components/MMapDraw.vue +601 -0
  122. package/src/components/MMapMeasure.vue +1 -1
  123. package/src/components/MMapSearch.vue +1 -9
  124. package/src/components/MMentionField.vue +373 -0
  125. package/src/components/MMultiAutocomplete.vue +3 -7
  126. package/src/components/MMultiSelect.vue +3 -7
  127. package/src/components/MNotificationCenter.vue +252 -0
  128. package/src/components/MPhoneInput.vue +3 -10
  129. package/src/components/MQRScanner.vue +177 -0
  130. package/src/components/MSelect.vue +3 -7
  131. package/src/components/MTimePicker.vue +10 -7
  132. package/src/components/MTimezoneSelect.vue +116 -0
  133. package/src/components/_MFilterGroup.vue +210 -0
  134. package/src/composables/_caretPosition.ts +44 -0
  135. package/src/composables/_useCamera.ts +66 -0
  136. package/src/composables/_useFollowAnchor.ts +109 -0
  137. package/src/composables/cron.ts +179 -0
  138. package/src/composables/dashboardLayout.ts +94 -0
  139. package/src/composables/filterBuilder.ts +195 -0
  140. package/src/composables/mapAdapters.ts +29 -15
  141. package/src/composables/mapSearch.ts +10 -0
  142. package/src/composables/textDiff.ts +106 -0
  143. package/src/composables/useLocale.ts +215 -0
  144. package/src/index.ts +25 -0
  145. package/src/locales/de.ts +107 -0
  146. package/src/locales/es.ts +107 -0
  147. package/src/locales/fr.ts +107 -0
  148. package/src/locales/ja.ts +107 -0
  149. package/src/locales/ko.ts +107 -0
  150. package/src/locales/pt.ts +107 -0
  151. package/src/locales/zh.ts +107 -0
  152. package/src/map.ts +5 -0
  153. package/dist/MListItem-DVi1j1QI.js.map +0 -1
  154. package/dist/MMenuItem-CRNZkVVr.js.map +0 -1
  155. package/dist/MTooltip-BL3jPYPT.js +0 -754
  156. package/dist/MTooltip-BL3jPYPT.js.map +0 -1
  157. package/dist/_useEscapeStack-C5-BYr8y.js.map +0 -1
  158. package/dist/useLocale-COav9m8C.js.map +0 -1
@@ -1,9 +1,52 @@
1
- import { i as e } from "./useLocale-COav9m8C.js";
1
+ import { i as e } from "./useLocale-DaVSTdm0.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, onMounted as x, onUnmounted as S, onUpdated as C, openBlock as w, provide as T, ref as E, renderSlot as D, resolveDynamicComponent as ee, shallowRef as O, toDisplayString as k, unref as A, useId as te, useSlots as j, watch as M, withCtx as N, withModifiers as P } from "vue";
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";
5
+ // src/composables/_useFollowAnchor.ts
6
+ var I = /(auto|scroll|hidden|clip)/;
7
+ function L(e) {
8
+ if (!e.isConnected) return !0;
9
+ let t = e.getBoundingClientRect(), n = t.top, r = t.left, i = t.bottom, a = t.right;
10
+ for (let t = e.parentElement; t && t !== document.body && t !== document.documentElement; t = t.parentElement) {
11
+ let e = getComputedStyle(t);
12
+ if (e.position === "fixed") break;
13
+ if (!I.test(e.overflow + e.overflowX + e.overflowY)) continue;
14
+ let o = t.getBoundingClientRect();
15
+ 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
+ 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
+ function R(e) {
20
+ let t = 0, n = null, r = !1;
21
+ function i() {
22
+ if (t = 0, !e.open()) return;
23
+ let n = e.anchor.value;
24
+ if (!n || L(n)) {
25
+ e.close();
26
+ let t = document.activeElement;
27
+ n && t instanceof HTMLElement && n.contains(t) && t.blur();
28
+ } else e.place();
29
+ }
30
+ function a() {
31
+ t ||= requestAnimationFrame(i);
32
+ }
33
+ function o(t) {
34
+ let n = t.target;
35
+ n instanceof Node && e.popup.value?.contains(n) || a();
36
+ }
37
+ function s() {
38
+ r || typeof window > "u" || (r = !0, window.addEventListener("scroll", o, {
39
+ capture: !0,
40
+ passive: !0
41
+ }), window.addEventListener("resize", a), window.visualViewport?.addEventListener("resize", a), window.visualViewport?.addEventListener("scroll", a), typeof ResizeObserver < "u" && e.anchor.value && (n = new ResizeObserver(a), n.observe(e.anchor.value)));
42
+ }
43
+ function c() {
44
+ 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
+ N(e.open, (e) => e ? s() : c(), { immediate: !0 }), x(c);
47
+ }
5
48
  // src/components/MAvatar.vue
6
- var ne = /* @__PURE__ */ p({
49
+ var z = /* @__PURE__ */ p({
7
50
  __name: "MAvatar",
8
51
  props: {
9
52
  name: {},
@@ -18,32 +61,32 @@ var ne = /* @__PURE__ */ p({
18
61
  }
19
62
  return t.fallback || "?";
20
63
  });
21
- return (t, r) => (w(), l("div", {
64
+ return (t, r) => (T(), l("div", {
22
65
  class: "inline-flex shrink-0 items-center justify-center rounded-full bg-primary-container font-medium text-on-primary-container",
23
66
  style: b({
24
67
  width: `${e.size}px`,
25
68
  height: `${e.size}px`,
26
69
  fontSize: `${Math.round(e.size * .4)}px`
27
70
  })
28
- }, k(n.value), 5));
71
+ }, A(n.value), 5));
29
72
  }
30
- }), F = [
73
+ }), ne = [
31
74
  "role",
32
75
  "tabindex",
33
76
  "aria-disabled"
34
- ], I = ["src", "alt"], L = {
77
+ ], B = ["src", "alt"], V = {
35
78
  key: 1,
36
79
  class: "px-4 pt-4 pb-2"
37
- }, R = {
80
+ }, H = {
38
81
  key: 2,
39
82
  class: "px-4 pt-4 pb-2"
40
- }, re = { class: "text-title-large font-medium text-on-surface" }, z = {
83
+ }, re = { class: "text-title-large font-medium text-on-surface" }, U = {
41
84
  key: 0,
42
85
  class: "mt-1 text-body-medium text-on-surface-variant"
43
- }, B = {
86
+ }, W = {
44
87
  key: 3,
45
88
  class: "flex justify-end gap-2 px-4 pt-2 pb-4"
46
- }, V = "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]", ie = /* @__PURE__ */ p({
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({
47
90
  __name: "MCard",
48
91
  props: {
49
92
  variant: { default: "elevated" },
@@ -86,13 +129,13 @@ var ne = /* @__PURE__ */ p({
86
129
  function d(e) {
87
130
  s.value && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.currentTarget.click());
88
131
  }
89
- return (t, o) => (w(), l("div", {
132
+ return (t, o) => (T(), l("div", {
90
133
  class: y(["overflow-hidden rounded-md transition-shadow duration-150", [
91
134
  i.value,
92
135
  s.value ? [
93
136
  "cursor-pointer",
94
137
  a[n.value],
95
- V
138
+ ie
96
139
  ] : "",
97
140
  e.disabled ? "cursor-not-allowed pointer-events-none" : ""
98
141
  ]]),
@@ -102,28 +145,28 @@ var ne = /* @__PURE__ */ p({
102
145
  "aria-disabled": e.clickable && e.disabled ? "true" : void 0,
103
146
  onKeydown: d
104
147
  }, [
105
- e.image || t.$slots.media ? (w(), l("div", {
148
+ e.image || t.$slots.media ? (T(), l("div", {
106
149
  key: 0,
107
150
  class: y(["w-full overflow-hidden", e.imageHeight ?? "h-48"])
108
- }, [e.image ? (w(), l("img", {
151
+ }, [e.image ? (T(), l("img", {
109
152
  key: 0,
110
153
  src: e.image,
111
154
  alt: e.imageAlt ?? "",
112
155
  class: "h-full w-full object-cover"
113
- }, null, 8, I)) : D(t.$slots, "media", {}, void 0, void 0, 1)], 2)) : c("", !0),
114
- t.$slots.header ? (w(), l("div", L, [D(t.$slots, "header")])) : e.title ? (w(), l("div", R, [u("h3", re, k(e.title), 1), e.subtitle ? (w(), l("p", z, k(e.subtitle), 1)) : c("", !0)])) : c("", !0),
115
- D(t.$slots, "default"),
116
- t.$slots.actions ? (w(), l("div", B, [D(t.$slots, "actions")])) : c("", !0)
117
- ], 46, F));
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));
118
161
  }
119
- }), H = { class: "relative -m-[11px] inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-full" }, U = [
162
+ }), oe = { class: "relative -m-[11px] inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-full" }, G = [
120
163
  "checked",
121
164
  "disabled",
122
165
  "aria-label"
123
- ], W = {
166
+ ], se = {
124
167
  key: 1,
125
168
  class: "pointer-events-none absolute inset-0 rounded-full ring-0 ring-secondary transition-[box-shadow] duration-150 peer-focus-visible:ring-2"
126
- }, ae = /* @__PURE__ */ p({
169
+ }, ce = /* @__PURE__ */ p({
127
170
  __name: "MCheckbox",
128
171
  props: {
129
172
  modelValue: { type: Boolean },
@@ -152,7 +195,7 @@ var ne = /* @__PURE__ */ p({
152
195
  tertiary: "bg-tertiary",
153
196
  error: "bg-error"
154
197
  };
155
- return (t, o) => (w(), l("label", { class: y(["group inline-flex items-center gap-2 select-none", e.disabled ? "cursor-not-allowed" : "cursor-pointer"]) }, [u("span", H, [
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, [
156
199
  u("input", {
157
200
  type: "checkbox",
158
201
  class: "peer sr-only",
@@ -160,23 +203,23 @@ var ne = /* @__PURE__ */ p({
160
203
  disabled: e.disabled,
161
204
  "aria-label": e.ariaLabel,
162
205
  onChange: o[0] ||= (t) => n("update:modelValue", !e.modelValue)
163
- }, null, 40, U),
164
- e.disabled ? c("", !0) : (w(), l("span", {
206
+ }, null, 40, G),
207
+ e.disabled ? c("", !0) : (T(), l("span", {
165
208
  key: 0,
166
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"])
167
210
  }, null, 2)),
168
- e.disabled ? c("", !0) : (w(), l("span", W)),
211
+ e.disabled ? c("", !0) : (T(), l("span", se)),
169
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, {
170
213
  name: e.indeterminate ? "remove" : "check",
171
214
  size: 18,
172
215
  class: y(["transition-[opacity,transform] duration-150", e.modelValue || e.indeterminate ? "scale-100 opacity-100" : "scale-0 opacity-0"])
173
216
  }, null, 8, ["name", "class"])], 2)
174
- ]), e.label || t.$slots.default ? (w(), l("span", {
217
+ ]), e.label || t.$slots.default ? (T(), l("span", {
175
218
  key: 0,
176
219
  class: y(["text-body-large", e.disabled ? "text-on-surface/38" : "text-on-surface"])
177
- }, [D(t.$slots, "default", {}, () => [d(k(e.label), 1)])], 2)) : c("", !0)], 2));
220
+ }, [O(t.$slots, "default", {}, () => [d(A(e.label), 1)])], 2)) : c("", !0)], 2));
178
221
  }
179
- }), oe = ["disabled", "aria-pressed"], se = { class: "whitespace-nowrap" }, G = ["aria-label", "disabled"], ce = ["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", K = /* @__PURE__ */ p({
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({
180
223
  __name: "MChip",
181
224
  props: {
182
225
  tone: { default: "neutral" },
@@ -217,7 +260,7 @@ var ne = /* @__PURE__ */ p({
217
260
  "error",
218
261
  "tertiary",
219
262
  "secondary"
220
- ], m = a, h = d, g = e(), _ = j(), v = o(() => !!m.tone && !p.includes(m.tone)), x = o(() => {
263
+ ], m = a, h = d, g = e(), _ = M(), v = o(() => !!m.tone && !p.includes(m.tone)), x = o(() => {
221
264
  if (v.value) return {
222
265
  "--chip-bg": m.tone + "22",
223
266
  "--chip-color": m.tone
@@ -235,54 +278,54 @@ var ne = /* @__PURE__ */ p({
235
278
  tertiary: "border border-transparent bg-tertiary-container text-on-tertiary-container"
236
279
  };
237
280
  return e[m.tone ?? "neutral"] ?? e.neutral;
238
- }), C = o(() => m.selected ? "rounded-full" : "rounded-md"), T = o(() => m.type === "filter" || m.type === "input"), O = o(() => m.type === "input" && !!_.avatar), k = o(() => !!m.trailingIcon || m.type === "input" && m.removable), te = o(() => {
239
- let e = T.value && m.selected;
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(() => {
282
+ let e = w.value && m.selected;
240
283
  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";
241
284
  if (e) return ["bg-secondary-container text-on-secondary-container", m.elevated ? "shadow-elevation-1 hover:shadow-elevation-2" : ""];
242
285
  let t = m.type === "assist" ? "text-on-surface" : "text-on-surface-variant";
243
286
  return m.elevated && m.type !== "input" ? ["bg-surface-container-low shadow-elevation-1 hover:shadow-elevation-2", t] : ["border border-outline-variant", t];
244
- }), M = o(() => m.disabled ? "" : m.type === "assist" || m.type === "suggestion" ? "text-primary" : m.selected ? "text-on-secondary-container" : "text-on-surface-variant"), ne = o(() => m.type === "input" ? [O.value ? "pl-1" : m.icon ? "pl-2" : "pl-3", k.value ? "pr-2" : "pr-3"] : [m.icon || R.value ? "pl-2" : "pl-4", k.value ? "pr-2" : "pr-4"]), F = E(!1), I = E(), L = E(), R = o(() => m.type === "filter" && !m.icon);
245
- r(() => m.type === "filter" || m.type === "input" ? [F.value ? 8 : m.selected ? 16 : 12, R.value ? m.selected ? 26 : 8 : 0] : [], ([e, t]) => {
246
- I.value && e !== void 0 && (I.value.style.borderRadius = `${e}px`), L.value && t !== void 0 && (L.value.style.width = `${t}px`);
247
- }, t), r(() => R.value ? [+!!m.selected] : [], ([e]) => {
248
- L.value && e !== void 0 && (L.value.style.opacity = String(e));
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]) => {
289
+ L.value && e !== void 0 && (L.value.style.borderRadius = `${e}px`), R.value && t !== void 0 && (R.value.style.width = `${t}px`);
290
+ }, t), r(() => z.value ? [+!!m.selected] : [], ([e]) => {
291
+ R.value && e !== void 0 && (R.value.style.opacity = String(e));
249
292
  }, n);
250
- function re() {
251
- m.disabled || (T.value && h("update:selected", !m.selected), h("click"));
293
+ function ne() {
294
+ m.disabled || (w.value && h("update:selected", !m.selected), h("click"));
252
295
  }
253
- return (e, t) => a.type ? (w(), l("span", {
296
+ return (e, t) => a.type ? (T(), l("span", {
254
297
  key: 0,
255
298
  ref_key: "typedEl",
256
- ref: I,
257
- 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", [te.value, a.type === "assist" || a.type === "suggestion" ? "rounded-sm" : "rounded-md"]])
299
+ 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"]])
258
301
  }, [u("button", {
259
302
  type: "button",
260
- 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", [ne.value, a.disabled ? "cursor-not-allowed" : "cursor-pointer hover:before:opacity-[0.08] active:before:opacity-[0.12]"]]),
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]"]]),
261
304
  disabled: a.disabled,
262
- "aria-pressed": T.value ? a.selected : void 0,
263
- onPointerdown: t[0] ||= (e) => F.value = !0,
264
- onPointerup: t[1] ||= (e) => F.value = !1,
265
- onPointerleave: t[2] ||= (e) => F.value = !1,
266
- onPointercancel: t[3] ||= (e) => F.value = !1,
267
- onClick: re
305
+ "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,
310
+ onClick: ne
268
311
  }, [
269
- O.value ? (w(), l("span", {
312
+ E.value ? (T(), l("span", {
270
313
  key: 0,
271
314
  class: y(["-my-1 flex h-6 w-6 shrink-0 items-center justify-center overflow-hidden rounded-full", a.disabled ? "opacity-38" : ""])
272
- }, [D(e.$slots, "avatar")], 2)) : a.icon ? (w(), s(i, {
315
+ }, [O(e.$slots, "avatar")], 2)) : a.icon ? (T(), s(i, {
273
316
  key: 1,
274
317
  name: a.icon,
275
318
  size: 18,
276
319
  filled: a.type === "filter" && a.selected,
277
- class: y(["shrink-0", M.value])
320
+ class: y(["shrink-0", te.value])
278
321
  }, null, 8, [
279
322
  "name",
280
323
  "filled",
281
324
  "class"
282
- ])) : R.value ? (w(), l("span", {
325
+ ])) : z.value ? (T(), l("span", {
283
326
  key: 2,
284
327
  ref_key: "checkEl",
285
- ref: L,
328
+ ref: R,
286
329
  class: "-mr-2 flex shrink-0 overflow-hidden",
287
330
  style: {
288
331
  width: "8px",
@@ -292,56 +335,56 @@ var ne = /* @__PURE__ */ p({
292
335
  }, [f(i, {
293
336
  name: "check",
294
337
  size: 18,
295
- class: y(["shrink-0", M.value])
338
+ class: y(["shrink-0", te.value])
296
339
  }, null, 8, ["class"])], 512)) : c("", !0),
297
- u("span", se, [D(e.$slots, "default")]),
298
- a.trailingIcon ? (w(), s(i, {
340
+ u("span", K, [O(e.$slots, "default")]),
341
+ a.trailingIcon ? (T(), s(i, {
299
342
  key: 3,
300
343
  name: a.trailingIcon,
301
344
  size: 18,
302
- class: y(["shrink-0", a.disabled ? "" : a.selected && T.value ? "text-on-secondary-container" : "text-on-surface-variant"])
345
+ class: y(["shrink-0", a.disabled ? "" : a.selected && w.value ? "text-on-secondary-container" : "text-on-surface-variant"])
303
346
  }, null, 8, ["name", "class"])) : c("", !0)
304
- ], 42, oe), a.type === "input" && a.removable ? (w(), l("button", {
347
+ ], 42, le), a.type === "input" && a.removable ? (T(), l("button", {
305
348
  key: 0,
306
349
  type: "button",
307
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"]),
308
- "aria-label": A(g).remove,
351
+ "aria-label": j(g).remove,
309
352
  disabled: a.disabled,
310
- onClick: t[4] ||= P((e) => h("remove"), ["stop"])
353
+ onClick: t[4] ||= F((e) => h("remove"), ["stop"])
311
354
  }, [f(i, {
312
355
  name: "close",
313
356
  size: 18
314
- })], 10, G)) : c("", !0)], 2)) : (w(), s(ee(a.clickable ? "button" : "span"), {
357
+ })], 10, ue)) : c("", !0)], 2)) : (T(), s(ee(a.clickable ? "button" : "span"), {
315
358
  key: 1,
316
359
  type: a.clickable ? "button" : void 0,
317
360
  disabled: a.clickable && a.disabled ? !0 : void 0,
318
361
  class: y(["inline-flex h-8 items-center gap-1.5 overflow-hidden px-3 text-label-large transition-colors", [
319
362
  C.value,
320
363
  S.value,
321
- a.clickable && !a.disabled ? le : "",
364
+ a.clickable && !a.disabled ? fe : "",
322
365
  a.disabled ? "cursor-not-allowed" : ""
323
366
  ]]),
324
367
  style: b(x.value),
325
368
  onClick: t[6] ||= (e) => a.clickable && !a.disabled && h("click")
326
369
  }, {
327
- default: N(() => [
328
- a.icon ? (w(), s(i, {
370
+ default: P(() => [
371
+ a.icon ? (T(), s(i, {
329
372
  key: 0,
330
373
  name: a.icon,
331
374
  size: 18
332
375
  }, null, 8, ["name"])) : c("", !0),
333
- D(e.$slots, "default"),
334
- a.removable ? (w(), l("button", {
376
+ O(e.$slots, "default"),
377
+ a.removable ? (T(), l("button", {
335
378
  key: 1,
336
379
  type: "button",
337
380
  class: "-mr-1 ml-0.5 inline-flex items-center justify-center rounded-full hover:bg-on-surface/12",
338
- "aria-label": A(g).remove,
381
+ "aria-label": j(g).remove,
339
382
  disabled: a.disabled,
340
- onClick: t[5] ||= P((e) => h("remove"), ["stop"])
383
+ onClick: t[5] ||= F((e) => h("remove"), ["stop"])
341
384
  }, [f(i, {
342
385
  name: "close",
343
386
  size: 16
344
- })], 8, ce)) : c("", !0)
387
+ })], 8, de)) : c("", !0)
345
388
  ]),
346
389
  _: 3
347
390
  }, 8, [
@@ -354,7 +397,7 @@ var ne = /* @__PURE__ */ p({
354
397
  });
355
398
  // src/composables/_useSegmentRuns.ts
356
399
  function q(e) {
357
- let t = O(/* @__PURE__ */ new Map());
400
+ let t = k(/* @__PURE__ */ new Map());
358
401
  function n() {
359
402
  let n = /* @__PURE__ */ new Map(), r = [], i = () => {
360
403
  r.forEach((e, t) => n.set(e, r.length === 1 ? "single" : t === 0 ? "first" : t === r.length - 1 ? "last" : "middle")), r = [];
@@ -363,12 +406,12 @@ function q(e) {
363
406
  i(), t.value = n;
364
407
  }
365
408
  let r;
366
- return x(() => {
409
+ return S(() => {
367
410
  n(), e.value && (r = new MutationObserver(n), r.observe(e.value, { childList: !0 }));
368
- }), S(() => r?.disconnect()), (e) => e ? t.value.get(e) : void 0;
411
+ }), C(() => r?.disconnect()), (e) => e ? t.value.get(e) : void 0;
369
412
  }
370
413
  // src/components/MList.vue?vue&type=script&setup=true&lang.ts
371
- var ue = ["role"], de = /* @__PURE__ */ p({
414
+ var J = ["role"], Y = /* @__PURE__ */ p({
372
415
  __name: "MList",
373
416
  props: {
374
417
  dense: {
@@ -396,8 +439,8 @@ var ue = ["role"], de = /* @__PURE__ */ p({
396
439
  },
397
440
  emits: ["update:selected"],
398
441
  setup(e, { emit: t }) {
399
- let n = e, r = t, i = E(), a = q(i);
400
- T("m-list", {
442
+ let n = e, r = t, i = D(), a = q(i);
443
+ E("m-list", {
401
444
  segmentPosition: a,
402
445
  dense: o(() => n.dense),
403
446
  nav: o(() => n.nav),
@@ -421,24 +464,24 @@ var ue = ["role"], de = /* @__PURE__ */ p({
421
464
  let e = s();
422
465
  e.length && !e.some((e) => e.tabIndex === 0) && (e[0].tabIndex = 0);
423
466
  }
424
- x(u), C(() => v(u));
467
+ S(u), w(() => v(u));
425
468
  let d = o(() => [
426
469
  "flex flex-col",
427
470
  n.segmented ? "gap-0.5 p-2" : "py-2",
428
471
  n.nav && !n.segmented && "gap-0.5 px-3"
429
472
  ]);
430
- return (t, n) => (w(), l("ul", {
473
+ return (t, n) => (T(), l("ul", {
431
474
  ref_key: "listEl",
432
475
  ref: i,
433
476
  role: e.selectable ? "listbox" : "list",
434
477
  class: y(d.value),
435
478
  onKeydown: c
436
- }, [D(t.$slots, "default")], 42, ue));
479
+ }, [O(t.$slots, "default")], 42, J));
437
480
  }
438
- }), fe = { class: "relative -my-2 inline-flex h-12 shrink-0 items-center" }, J = ["checked", "disabled"], Y = {
481
+ }), me = { class: "relative -my-2 inline-flex h-12 shrink-0 items-center" }, he = ["checked", "disabled"], ge = {
439
482
  key: 0,
440
483
  class: "text-body-large text-on-surface"
441
- }, X = "bg-outline group-hover:bg-on-surface-variant group-active:bg-on-surface-variant peer-focus-visible:bg-on-surface-variant", pe = /* @__PURE__ */ p({
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({
442
485
  __name: "MSwitch",
443
486
  props: {
444
487
  modelValue: { type: Boolean },
@@ -475,7 +518,7 @@ var ue = ["role"], de = /* @__PURE__ */ p({
475
518
  secondary: "bg-secondary",
476
519
  tertiary: "bg-tertiary",
477
520
  error: "bg-error"
478
- }, g = E(!1);
521
+ }, g = D(!1);
479
522
  function _() {
480
523
  n.disabled || (g.value = !0);
481
524
  }
@@ -489,26 +532,26 @@ var ue = ["role"], de = /* @__PURE__ */ p({
489
532
  transform: `translateX(${n.modelValue ? 18 : 0}px)`,
490
533
  transition: n.modelValue ? "transform 320ms cubic-bezier(0.34, 1.56, 0.64, 1)" : "transform 240ms cubic-bezier(0.2, 0, 0, 1)"
491
534
  }));
492
- return (t, n) => (w(), l("label", {
535
+ return (t, n) => (T(), l("label", {
493
536
  class: y(["group inline-flex items-center gap-3 select-none", e.disabled ? "cursor-not-allowed opacity-[0.38]" : "cursor-pointer"]),
494
537
  onPointerdown: _,
495
538
  onPointerup: v,
496
539
  onPointerleave: v,
497
540
  onPointercancel: v
498
- }, [u("span", fe, [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"]) }, [
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"]) }, [
499
542
  u("input", {
500
543
  type: "checkbox",
501
544
  class: "peer sr-only",
502
545
  checked: e.modelValue,
503
546
  disabled: e.disabled,
504
547
  onChange: n[0] ||= (t) => r("update:modelValue", !e.modelValue)
505
- }, null, 40, J),
506
- e.disabled ? c("", !0) : (w(), l("span", {
548
+ }, null, 40, he),
549
+ e.disabled ? c("", !0) : (T(), l("span", {
507
550
  key: 0,
508
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"]),
509
552
  style: b(C.value)
510
553
  }, null, 6)),
511
- e.disabled ? c("", !0) : (w(), l("span", {
554
+ e.disabled ? c("", !0) : (T(), l("span", {
512
555
  key: 1,
513
556
  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",
514
557
  style: b(C.value)
@@ -524,7 +567,7 @@ var ue = ["role"], de = /* @__PURE__ */ p({
524
567
  "leave-from-class": "opacity-100",
525
568
  "leave-to-class": "opacity-0"
526
569
  }, {
527
- default: N(() => [e.modelValue && e.icon ? (w(), s(i, {
570
+ default: P(() => [e.modelValue && e.icon ? (T(), s(i, {
528
571
  key: 0,
529
572
  name: "check",
530
573
  size: 14,
@@ -532,14 +575,14 @@ var ue = ["role"], de = /* @__PURE__ */ p({
532
575
  }, null, 8, ["class"])) : c("", !0)]),
533
576
  _: 1
534
577
  })], 6)
535
- ], 2)]), e.label ? (w(), l("span", Y, k(e.label), 1)) : c("", !0)], 34));
578
+ ], 2)]), e.label ? (T(), l("span", ge, A(e.label), 1)) : c("", !0)], 34));
536
579
  }
537
- }), me = [
580
+ }), ve = [
538
581
  "tabindex",
539
582
  "aria-expanded",
540
583
  "aria-controls",
541
584
  "aria-disabled"
542
- ], he = { class: "min-w-0 flex-1" }, ge = ["id"], _e = ["src"], ve = { class: "min-w-0 flex-1" }, ye = 4, be = 8, xe = 16, Se = "button, a, input, select, textarea, label, [role=\"button\"], [role=\"switch\"], [role=\"checkbox\"], [role=\"radio\"], [role=\"link\"], [tabindex]", Ce = /* @__PURE__ */ p({
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({
543
586
  inheritAttrs: !1,
544
587
  __name: "MListItem",
545
588
  props: {
@@ -582,79 +625,79 @@ var ue = ["role"], de = /* @__PURE__ */ p({
582
625
  "update:expanded"
583
626
  ],
584
627
  setup(e, { emit: t }) {
585
- let n = e, d = t, p = m(), v = () => !!p?.vnode.props?.onClick, x = E(n.expanded ?? !1);
586
- M(() => n.expanded, (e) => {
628
+ let n = e, d = t, p = m(), v = () => !!p?.vnode.props?.onClick, x = D(n.expanded ?? !1);
629
+ N(() => n.expanded, (e) => {
587
630
  e !== void 0 && (x.value = e);
588
631
  });
589
- let S = o(() => x.value), C = g("m-list", null), T = o(() => n.lines ? n.lines : C?.lines.value ? C.lines.value : n.description || n.overline && n.subtitle ? 3 : n.subtitle || n.overline ? 2 : 1), O = o(() => n.clickable || n.href || n.to || v() || C?.selectable.value || n.expandable), j = o(() => !!C?.selectable.value && n.value != null && !n.href && !n.to && !n.expandable), P = o(() => !!(n.href || n.to)), F = o(() => !j.value && !P.value && !n.expandable && (n.clickable || v())), I = o(() => P.value || F.value), L = o(() => j.value ? "option" : F.value ? "button" : P.value ? void 0 : "listitem"), R = o(() => {
590
- if (j.value) return z.value && !n.disabled ? 0 : -1;
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;
591
634
  if (F.value) return n.disabled ? -1 : 0;
592
635
  });
593
- function re(e) {
594
- (j.value || F.value) && (e.key !== "Enter" && e.key !== " " || e.target !== e.currentTarget || (e.preventDefault(), $(e)));
636
+ function ne(e) {
637
+ (k.value || F.value) && (e.key !== "Enter" && e.key !== " " || e.target !== e.currentTarget || (e.preventDefault(), $(e)));
595
638
  }
596
- let z = o(() => n.active ? !0 : C?.selectable.value && n.value != null ? C.selected.value === n.value : !1), B = o(() => n.leading ? n.leading : n.icon ? "icon" : n.avatarName ? "avatar" : n.image ? "image" : null), V = o(() => n.expandable ? "expand" : n.trailing ? n.trailing : n.trailingIcon ? "icon" : n.trailingText ? "text" : null), ie = {
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 = {
597
640
  primary: "bg-primary-container text-on-primary-container",
598
641
  secondary: "bg-secondary-container text-on-secondary-container",
599
642
  tertiary: "bg-tertiary-container text-on-tertiary-container",
600
643
  error: "bg-error-container text-on-error-container",
601
644
  success: "bg-success-container text-on-success-container"
602
- }, H = o(() => C?.dense.value ?? !1), U = o(() => C?.nav.value ?? !1), W = o(() => C?.segmented.value ?? !1), oe = o(() => C?.dividers.value ?? !1), se = o(() => z.value ? "text-on-secondary-container" : "text-on-surface"), G = o(() => z.value ? "text-on-secondary-container" : "text-on-surface-variant"), ce = o(() => H.value ? "" : T.value === 3 ? "min-h-22" : T.value === 2 ? "min-h-18" : "min-h-14"), le = o(() => [
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(() => [
603
646
  "mli-row relative flex w-full items-center gap-4 text-left",
604
- W.value ? "bg-surface-container px-4" : U.value ? "rounded-full px-4" : "px-4",
605
- H.value ? "py-1" : T.value === 3 ? "py-3" : "py-2",
606
- ce.value,
607
- O.value && !n.disabled && "cursor-pointer",
608
- z.value && "bg-secondary-container text-on-secondary-container",
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",
649
+ se.value,
650
+ E.value && !n.disabled && "cursor-pointer",
651
+ B.value && "bg-secondary-container text-on-secondary-container",
609
652
  n.disabled && "opacity-[0.38] pointer-events-none"
610
- ]), K = E(null), q = E(null), ue = (e, { slots: t }) => I.value ? h("li", {
653
+ ]), K = D(null), ue = D(null), de = (e, { slots: t }) => I.value ? h("li", {
611
654
  role: "listitem",
612
655
  ref: (e) => {
613
- q.value = e;
656
+ ue.value = e;
614
657
  }
615
- }, t.default?.()) : t.default?.(), de = E(null), fe = (e) => e && "$el" in e ? e.$el : e, J = E(!1), Y = E(!1), X = E(!1), Ce = o(() => W.value ? C?.segmentPosition(I.value ? q.value : fe(K.value)) : void 0), we = o(() => {
616
- if (U.value) return [];
617
- let e = O.value && !n.disabled, t = e && Y.value || z.value || e && X.value ? xe : e && J.value ? be : null;
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;
618
661
  if (t !== null) return [
619
662
  t,
620
663
  t,
621
664
  t,
622
665
  t
623
666
  ];
624
- let r = Ce.value, i = r === "first" || r === "single" ? xe : ye, a = r === "last" || r === "single" ? xe : ye;
667
+ let r = me.value, i = r === "first" || r === "single" ? Te : Ce, a = r === "last" || r === "single" ? Te : Ce;
625
668
  return [
626
669
  i,
627
670
  i,
628
671
  a,
629
672
  a
630
673
  ];
631
- }), { snap: Te } = r(() => we.value, (e) => {
632
- let t = de.value ?? fe(K.value);
674
+ }), { snap: ge } = r(() => he.value, (e) => {
675
+ let t = fe.value ?? pe(K.value);
633
676
  t && (t.style.borderRadius = e.length ? e.map((e) => `${e}px`).join(" ") : "");
634
677
  });
635
- M([Ce, U], () => Te());
636
- function Ee(e) {
637
- let t = e.currentTarget, n = e.target?.closest?.(Se);
678
+ N([me, W], () => ge());
679
+ function X(e) {
680
+ let t = e.currentTarget, n = e.target?.closest?.(Ee);
638
681
  return !!n && n !== t && t.contains(n) && !n.closest("[data-mli-part]");
639
682
  }
640
683
  function Z(e) {
641
- e.pointerType !== "touch" && (J.value = !Ee(e));
684
+ e.pointerType !== "touch" && (q.value = !X(e));
642
685
  }
643
686
  function De() {
644
- J.value = !1, Y.value = !1;
687
+ q.value = !1, J.value = !1;
645
688
  }
646
689
  function Oe(e) {
647
- e.button === 0 && !Ee(e) && (Y.value = !0);
690
+ e.button === 0 && !X(e) && (J.value = !0);
648
691
  }
649
692
  function Q() {
650
- Y.value = !1;
693
+ J.value = !1;
651
694
  }
652
- let ke = o(() => !O.value || n.disabled ? 0 : Y.value ? .12 : J.value ? .08 : 0), Ae = o(() => n.indent === void 0 ? void 0 : { paddingLeft: typeof n.indent == "number" ? `${n.indent}px` : n.indent });
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 });
653
696
  function je(e) {
654
- X.value = e.currentTarget.matches(":focus-visible");
697
+ Y.value = e.currentTarget.matches(":focus-visible");
655
698
  }
656
699
  function Me() {
657
- X.value = !1;
700
+ Y.value = !1;
658
701
  }
659
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();
660
703
  function Ie(e) {
@@ -666,7 +709,7 @@ var ue = ["role"], de = /* @__PURE__ */ p({
666
709
  function $(e) {
667
710
  if (!n.disabled) {
668
711
  if (n.expandable) {
669
- if (Ee(e)) return;
712
+ if (X(e)) return;
670
713
  Le(e);
671
714
  } else C?.selectable.value && n.value != null && C.select(n.value), d("click", e);
672
715
  }
@@ -674,17 +717,17 @@ var ue = ["role"], de = /* @__PURE__ */ p({
674
717
  function Re() {
675
718
  d("update:trailingValue", !n.trailingValue);
676
719
  }
677
- return (t, n) => e.expandable ? (w(), l("li", _({
720
+ return (t, n) => e.expandable ? (T(), l("li", _({
678
721
  key: 0,
679
722
  ref_key: "rootEl",
680
723
  ref: K
681
724
  }, t.$attrs, { role: "listitem" }), [u("div", {
682
725
  ref_key: "shapeEl",
683
- ref: de,
726
+ ref: fe,
684
727
  role: "button",
685
728
  tabindex: e.disabled ? -1 : 0,
686
729
  "aria-expanded": S.value,
687
- "aria-controls": A(Fe),
730
+ "aria-controls": j(Fe),
688
731
  "aria-disabled": e.disabled || void 0,
689
732
  class: y(["focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-secondary", le.value]),
690
733
  onClick: $,
@@ -699,41 +742,41 @@ var ue = ["role"], de = /* @__PURE__ */ p({
699
742
  onPointercancel: Q
700
743
  }, [
701
744
  u("span", {
702
- class: y(["mli-state-layer pointer-events-none absolute inset-0 rounded-[inherit]", z.value ? "bg-on-secondary-container" : "bg-on-surface"]),
745
+ class: y(["mli-state-layer pointer-events-none absolute inset-0 rounded-[inherit]", B.value ? "bg-on-secondary-container" : "bg-on-surface"]),
703
746
  style: b({ opacity: ke.value }),
704
747
  "aria-hidden": "true"
705
748
  }, null, 6),
706
- D(t.$slots, "leading", {}, () => [B.value === "icon" ? (w(), s(i, {
749
+ O(t.$slots, "leading", {}, () => [V.value === "icon" ? (T(), s(i, {
707
750
  key: 0,
708
751
  name: e.icon,
709
752
  size: 24,
710
753
  class: y(["shrink-0", G.value])
711
754
  }, null, 8, ["name", "class"])) : c("", !0)]),
712
- u("div", he, [D(t.$slots, "overline", {}, () => [e.overline ? (w(), l("p", {
755
+ u("div", ye, [O(t.$slots, "overline", {}, () => [e.overline ? (T(), l("p", {
713
756
  key: 0,
714
757
  class: y(["truncate text-label-small", G.value])
715
- }, k(e.overline), 3)) : c("", !0)]), D(t.$slots, "default", {}, () => [u("p", { class: y(["truncate text-body-large", se.value]) }, k(e.title), 3), e.subtitle && T.value >= 2 ? (w(), l("p", {
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", {
716
759
  key: 0,
717
- class: y(["text-body-medium", [G.value, T.value === 2 && "truncate"]])
718
- }, k(e.subtitle), 3)) : c("", !0)])]),
719
- D(t.$slots, "trailing"),
760
+ class: y(["text-body-medium", [G.value, w.value === 2 && "truncate"]])
761
+ }, A(e.subtitle), 3)) : c("", !0)])]),
762
+ O(t.$slots, "trailing"),
720
763
  f(i, {
721
764
  name: S.value ? "expand_less" : "expand_more",
722
765
  size: 20,
723
766
  class: y(["shrink-0", G.value])
724
767
  }, null, 8, ["name", "class"])
725
- ], 42, me), f(a, { name: "mli-expand" }, {
726
- default: N(() => [S.value ? (w(), l("div", {
768
+ ], 42, ve), f(a, { name: "mli-expand" }, {
769
+ default: P(() => [S.value ? (T(), l("div", {
727
770
  key: 0,
728
- id: A(Fe),
771
+ id: j(Fe),
729
772
  class: "mli-expand-grid"
730
773
  }, [u("div", {
731
774
  class: "mli-expand-body",
732
775
  style: b(Ae.value)
733
- }, [D(t.$slots, "children")], 4)], 8, ge)) : c("", !0)]),
776
+ }, [O(t.$slots, "children")], 4)], 8, be)) : c("", !0)]),
734
777
  _: 3
735
- })], 16)) : (w(), s(ue, { key: 1 }, {
736
- default: N(() => [(w(), s(ee(Ne.value), _({
778
+ })], 16)) : (T(), s(de, { key: 1 }, {
779
+ default: P(() => [(T(), s(ee(Ne.value), _({
737
780
  class: le.value,
738
781
  ref_key: "rootEl",
739
782
  ref: K
@@ -743,10 +786,10 @@ var ue = ["role"], de = /* @__PURE__ */ p({
743
786
  }, {
744
787
  role: L.value,
745
788
  tabindex: R.value,
746
- "aria-selected": j.value ? z.value : void 0,
747
- "aria-disabled": (j.value || F.value) && e.disabled ? "true" : void 0,
789
+ "aria-selected": k.value ? B.value : void 0,
790
+ "aria-disabled": (k.value || F.value) && e.disabled ? "true" : void 0,
748
791
  onClick: $,
749
- onKeydown: re,
792
+ onKeydown: ne,
750
793
  onPointerenter: Z,
751
794
  onPointermove: Z,
752
795
  onPointerleave: De,
@@ -756,70 +799,70 @@ var ue = ["role"], de = /* @__PURE__ */ p({
756
799
  onFocus: je,
757
800
  onBlur: Me
758
801
  }), {
759
- default: N(() => [
802
+ default: P(() => [
760
803
  u("span", {
761
- class: y(["mli-state-layer pointer-events-none absolute inset-0 rounded-[inherit]", z.value ? "bg-on-secondary-container" : "bg-on-surface"]),
804
+ class: y(["mli-state-layer pointer-events-none absolute inset-0 rounded-[inherit]", B.value ? "bg-on-secondary-container" : "bg-on-surface"]),
762
805
  style: b({ opacity: ke.value }),
763
806
  "aria-hidden": "true"
764
807
  }, null, 6),
765
- oe.value ? (w(), l("div", {
808
+ ae.value ? (T(), l("div", {
766
809
  key: 0,
767
- class: y(["absolute top-0 right-0 h-px bg-outline-variant", oe.value === "inset" ? "left-16" : "left-0"])
810
+ class: y(["absolute top-0 right-0 h-px bg-outline-variant", ae.value === "inset" ? "left-16" : "left-0"])
768
811
  }, null, 2)) : c("", !0),
769
- D(t.$slots, "leading", {}, () => [B.value === "icon" ? (w(), s(i, {
812
+ O(t.$slots, "leading", {}, () => [V.value === "icon" ? (T(), s(i, {
770
813
  key: 0,
771
814
  name: e.icon,
772
815
  size: 24,
773
816
  class: y(["shrink-0", G.value])
774
- }, null, 8, ["name", "class"])) : B.value === "icon-container" ? (w(), l("div", {
817
+ }, null, 8, ["name", "class"])) : V.value === "icon-container" ? (T(), l("div", {
775
818
  key: 1,
776
- class: y(["flex h-10 w-10 shrink-0 items-center justify-center rounded-full", ie[e.iconContainerColor || "primary"]])
819
+ class: y(["flex h-10 w-10 shrink-0 items-center justify-center rounded-full", re[e.iconContainerColor || "primary"]])
777
820
  }, [f(i, {
778
821
  name: e.icon,
779
822
  size: 24
780
- }, null, 8, ["name"])], 2)) : B.value === "avatar" ? (w(), s(ne, {
823
+ }, null, 8, ["name"])], 2)) : V.value === "avatar" ? (T(), s(z, {
781
824
  key: 2,
782
825
  name: e.avatarName,
783
826
  size: 40,
784
827
  class: "shrink-0"
785
- }, null, 8, ["name"])) : B.value === "image" ? (w(), l("img", {
828
+ }, null, 8, ["name"])) : V.value === "image" ? (T(), l("img", {
786
829
  key: 3,
787
830
  src: e.image,
788
831
  alt: "",
789
832
  class: "h-14 w-14 shrink-0 rounded-md object-cover"
790
- }, null, 8, _e)) : B.value === "checkbox" ? (w(), s(ae, {
833
+ }, null, 8, xe)) : V.value === "checkbox" ? (T(), s(ce, {
791
834
  key: 4,
792
- "model-value": z.value,
835
+ "model-value": B.value,
793
836
  class: "shrink-0",
794
837
  "data-mli-part": ""
795
838
  }, null, 8, ["model-value"])) : c("", !0)]),
796
- u("div", ve, [D(t.$slots, "overline", {}, () => [e.overline ? (w(), l("p", {
839
+ u("div", Se, [O(t.$slots, "overline", {}, () => [e.overline ? (T(), l("p", {
797
840
  key: 0,
798
841
  class: y(["truncate text-label-small", G.value])
799
- }, k(e.overline), 3)) : c("", !0)]), D(t.$slots, "default", {}, () => [
800
- u("p", { class: y(["truncate text-body-large", se.value]) }, k(e.title), 3),
801
- e.subtitle && T.value >= 2 ? (w(), l("p", {
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", {
802
845
  key: 0,
803
- class: y(["text-body-medium", [G.value, T.value === 2 && "truncate"]])
804
- }, k(e.subtitle), 3)) : c("", !0),
805
- e.description && T.value >= 3 ? (w(), l("p", {
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", {
806
849
  key: 1,
807
850
  class: y(["line-clamp-2 text-body-small", G.value])
808
- }, k(e.description), 3)) : c("", !0)
851
+ }, A(e.description), 3)) : c("", !0)
809
852
  ])]),
810
- D(t.$slots, "trailing", {}, () => [V.value === "icon" ? (w(), s(i, {
853
+ O(t.$slots, "trailing", {}, () => [H.value === "icon" ? (T(), s(i, {
811
854
  key: 0,
812
855
  name: e.trailingIcon,
813
856
  size: 24,
814
857
  class: y(["shrink-0", G.value])
815
- }, null, 8, ["name", "class"])) : V.value === "text" ? (w(), l("span", {
858
+ }, null, 8, ["name", "class"])) : H.value === "text" ? (T(), l("span", {
816
859
  key: 1,
817
860
  class: y(["shrink-0 text-label-small", G.value])
818
- }, k(e.trailingText), 3)) : V.value === "switch" ? (w(), s(pe, {
861
+ }, A(e.trailingText), 3)) : H.value === "switch" ? (T(), s(_e, {
819
862
  key: 2,
820
863
  "model-value": !!e.trailingValue,
821
864
  "onUpdate:modelValue": Re
822
- }, null, 8, ["model-value"])) : V.value === "checkbox" ? (w(), s(ae, {
865
+ }, null, 8, ["model-value"])) : H.value === "checkbox" ? (T(), s(ce, {
823
866
  key: 3,
824
867
  "model-value": !!e.trailingValue,
825
868
  "onUpdate:modelValue": Re
@@ -837,6 +880,6 @@ var ue = ["role"], de = /* @__PURE__ */ p({
837
880
  }));
838
881
  }
839
882
  });
840
- export { K as a, ne as c, q as i, pe as n, ae as o, de as r, ie as s, Ce as t };
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 };
841
884
 
842
- //# sourceMappingURL=MListItem-DVi1j1QI.js.map
885
+ //# sourceMappingURL=MListItem-D2cNUyzP.js.map