@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,24 +1,24 @@
1
1
  import { a as e, f as t, i as n, l as r, s as i, u as a } from "./MIconButton-BBggVwBV.js";
2
2
  import { i as o } from "./motion-BcejVTeX.js";
3
3
  import { t as s } from "./MIcon-DpajuUTJ.js";
4
- import { t as c } from "./_useEscapeStack-C5-BYr8y.js";
5
- import { Fragment as l, Teleport as u, Transition as d, computed as f, createBlock as p, createCommentVNode as m, createElementBlock as h, createElementVNode as g, createVNode as _, defineComponent as v, inject as ee, mergeProps as y, nextTick as b, normalizeClass as x, normalizeStyle as S, onMounted as te, onUnmounted as ne, openBlock as C, provide as w, ref as T, renderList as E, renderSlot as D, resolveDynamicComponent as O, toDisplayString as k, unref as A, useSlots as re, watch as ie, withCtx as ae } from "vue";
4
+ import { n as c, r as l, t as u } from "./_popupPosition-nL8SVKPK.js";
5
+ import { Fragment as d, Teleport as f, Transition as p, computed as m, createBlock as h, createCommentVNode as g, createElementBlock as _, createElementVNode as v, createVNode as y, defineComponent as b, inject as x, mergeProps as S, nextTick as C, normalizeClass as w, normalizeStyle as T, onMounted as ee, onUnmounted as te, openBlock as E, provide as D, ref as O, renderList as k, renderSlot as A, resolveDynamicComponent as ne, toDisplayString as j, unref as M, useSlots as re, watch as ie, withCtx as ae } from "vue";
6
6
  // src/components/MMenuDivider.vue?vue&type=script&setup=true&lang.ts
7
- var j = { class: "my-1 border-outline-variant" }, M = /* @__PURE__ */ v({
7
+ var N = { class: "my-1 border-outline-variant" }, oe = /* @__PURE__ */ b({
8
8
  __name: "MMenuDivider",
9
9
  props: { gap: {
10
10
  type: Boolean,
11
11
  default: !1
12
12
  } },
13
13
  setup(e) {
14
- return (e, t) => (C(), h("hr", j));
14
+ return (e, t) => (E(), _("hr", N));
15
15
  }
16
- }), oe = 30, se = 380, N = 8, ce = 1 / 3, P = .5;
17
- function le(e) {
18
- let n = T([]), i = f(() => n.value[n.value.length - 1]), s = T("forward"), c = T(), l = 0, u = 1;
16
+ }), se = 30, P = 380, ce = 8, F = 1 / 3, le = .5;
17
+ function I(e) {
18
+ let n = O([]), i = m(() => n.value[n.value.length - 1]), s = O("forward"), c = O(), l = 0, u = 1;
19
19
  function d(e, t) {
20
20
  let n = s.value === "forward" ? 1 : -1, r = e.animate([{
21
- transform: `translateX(${n * oe}px)`,
21
+ transform: `translateX(${n * se}px)`,
22
22
  opacity: 0
23
23
  }, {
24
24
  transform: "translateX(0)",
@@ -31,7 +31,7 @@ function le(e) {
31
31
  });
32
32
  r.onfinish = t;
33
33
  }
34
- function p(e, t) {
34
+ function f(e, t) {
35
35
  let n = s.value === "forward" ? -1 : 1, r = e;
36
36
  r.style.position = "absolute", r.style.insetInline = "0", r.style.top = "0";
37
37
  let i = l, a = u;
@@ -40,7 +40,7 @@ function le(e) {
40
40
  transform: `translateX(${i}px)`,
41
41
  opacity: a
42
42
  }, {
43
- transform: `translateX(${i + n * oe}px)`,
43
+ transform: `translateX(${i + n * se}px)`,
44
44
  opacity: 0
45
45
  }], {
46
46
  duration: 90,
@@ -49,34 +49,34 @@ function le(e) {
49
49
  });
50
50
  o.onfinish = t;
51
51
  }
52
- function m(e) {
52
+ function p(e) {
53
53
  let n = c.value, i = n?.offsetHeight ?? 0, s = n?.style.overflowY ?? "";
54
54
  n && (n.style.overflowY = "hidden");
55
55
  let l = () => {
56
56
  n && (n.style.overflowY = s);
57
57
  };
58
58
  if (e(), !n || a()) return l();
59
- b(() => {
60
- let e = n.offsetHeight, a = Math.abs(e - i) < 1 ? null : r(n, t(i, e, 0, o.standard.defaultSpatial, .5), (e) => ({ height: `${e}px` })), s = new Promise((e) => setTimeout(e, se));
59
+ C(() => {
60
+ let e = n.offsetHeight, a = Math.abs(e - i) < 1 ? null : r(n, t(i, e, 0, o.standard.defaultSpatial, .5), (e) => ({ height: `${e}px` })), s = new Promise((e) => setTimeout(e, P));
61
61
  Promise.all([s, a?.finished.catch(() => {})]).then(l);
62
62
  });
63
63
  }
64
64
  function h(t) {
65
- s.value = "forward", m(() => n.value.push(t)), b(e);
65
+ s.value = "forward", p(() => n.value.push(t)), C(e);
66
66
  }
67
67
  function g() {
68
- s.value = "backward", m(() => n.value.pop()), b(e);
68
+ s.value = "backward", p(() => n.value.pop()), C(e);
69
69
  }
70
70
  function _() {
71
71
  n.value = [];
72
72
  }
73
73
  let v = null;
74
- function ee() {
74
+ function y() {
75
75
  return c.value?.querySelector(`:scope > [data-menu-level="${n.value.length}"]`) ?? null;
76
76
  }
77
- function y(e) {
77
+ function b(e) {
78
78
  if (e.pointerType !== "touch" || !n.value.length || v) return;
79
- let t = ee();
79
+ let t = y();
80
80
  t && (v = {
81
81
  id: e.pointerId,
82
82
  x: e.clientX,
@@ -87,7 +87,7 @@ function le(e) {
87
87
  lastX: e.clientX,
88
88
  lastT: e.timeStamp,
89
89
  vel: 0
90
- }, window.addEventListener("pointermove", S), window.addEventListener("pointerup", te), window.addEventListener("pointercancel", C));
90
+ }, window.addEventListener("pointermove", S), window.addEventListener("pointerup", w), window.addEventListener("pointercancel", T));
91
91
  }
92
92
  function x(e) {
93
93
  v && (v.level.style.transform = `translateX(${e}px)`, v.level.style.opacity = String(1 - .5 * Math.min(1, e / v.width)));
@@ -96,30 +96,30 @@ function le(e) {
96
96
  if (!v || e.pointerId !== v.id) return;
97
97
  let t = e.clientX - v.x, n = e.clientY - v.y;
98
98
  if (!v.active) {
99
- if (Math.hypot(t, n) < N) return;
100
- if (Math.abs(n) > Math.abs(t) || t < 0) return k();
99
+ if (Math.hypot(t, n) < ce) return;
100
+ if (Math.abs(n) > Math.abs(t) || t < 0) return A();
101
101
  v.active = !0, v.x = e.clientX, v.level.getAnimations().forEach((e) => e.finish());
102
102
  }
103
103
  let r = e.timeStamp - v.lastT;
104
104
  r > 0 && (v.vel = .8 * ((e.clientX - v.lastX) / r) + .2 * v.vel), v.lastX = e.clientX, v.lastT = e.timeStamp, x(Math.max(0, e.clientX - v.x));
105
105
  }
106
- function te(e) {
106
+ function w(e) {
107
107
  if (!v || e.pointerId !== v.id) return;
108
108
  let t = v;
109
- if (k(), !t.active) return;
110
- window.addEventListener("click", O, {
109
+ if (A(), !t.active) return;
110
+ window.addEventListener("click", k, {
111
111
  capture: !0,
112
112
  once: !0
113
113
  }), clearTimeout(E), E = setTimeout(D, 400);
114
114
  let n = Math.max(0, e.clientX - t.x);
115
- n > t.width * ce || t.vel > P ? (l = n, u = Number(t.level.style.opacity || 1), g()) : w(t.level, n);
115
+ n > t.width * F || t.vel > le ? (l = n, u = Number(t.level.style.opacity || 1), g()) : ee(t.level, n);
116
116
  }
117
- function C(e) {
117
+ function T(e) {
118
118
  if (!v || e.pointerId !== v.id) return;
119
119
  let t = v;
120
- k(), t.active && w(t.level, Math.max(0, t.lastX - t.x));
120
+ A(), t.active && ee(t.level, Math.max(0, t.lastX - t.x));
121
121
  }
122
- function w(e, n) {
122
+ function ee(e, n) {
123
123
  if (e.style.transform = "", e.style.opacity = "", a() || n < 1) return;
124
124
  let i = c.value?.clientWidth || 1;
125
125
  r(e, t(n, 0, 0, o.standard.defaultSpatial, .5), (e) => ({
@@ -129,51 +129,33 @@ function le(e) {
129
129
  }
130
130
  let E;
131
131
  function D() {
132
- clearTimeout(E), window.removeEventListener("click", O, { capture: !0 });
132
+ clearTimeout(E), window.removeEventListener("click", k, { capture: !0 });
133
133
  }
134
- function O(e) {
134
+ function k(e) {
135
135
  e.stopPropagation(), e.preventDefault();
136
136
  }
137
- function k() {
138
- v = null, window.removeEventListener("pointermove", S), window.removeEventListener("pointerup", te), window.removeEventListener("pointercancel", C);
137
+ function A() {
138
+ v = null, window.removeEventListener("pointermove", S), window.removeEventListener("pointerup", w), window.removeEventListener("pointercancel", T);
139
139
  }
140
- return ne(() => {
141
- k(), D();
140
+ return te(() => {
141
+ A(), D();
142
142
  }), {
143
143
  navStack: n,
144
144
  currentNav: i,
145
145
  navBox: c,
146
146
  navSlideEnter: d,
147
- navSlideLeave: p,
147
+ navSlideLeave: f,
148
148
  pushNav: h,
149
149
  popNav: g,
150
150
  resetNav: _,
151
- onNavPointerDown: y
151
+ onNavPointerDown: b
152
152
  };
153
153
  }
154
- function F(e, t, n, r = 8) {
155
- for (let i of e) if (i >= r && i + t <= n - r) return i;
156
- if (t >= n - 2 * r) return (n - t) / 2;
157
- let i = e[e.length - 1] ?? r;
158
- return Math.min(n - r - t, Math.max(r, i));
159
- }
160
- function I(e, t, n, r, i = 8) {
161
- let a = e.left, o = e.right - t, s = (e.left + e.right) / 2 < n / 2 ? i : n - i - t;
162
- return F(r === "start" ? [
163
- a,
164
- o,
165
- s
166
- ] : [
167
- o,
168
- a,
169
- s
170
- ], t, n, i);
171
- }
172
154
  // src/components/MMenu.vue?vue&type=script&setup=true&lang.ts
173
155
  var L = ["data-menu-level"], R = { class: "flex-1 truncate" }, z = { key: "root" }, B = {
174
156
  key: 0,
175
157
  class: "flex flex-col gap-1 px-1.5"
176
- }, V = { class: "overflow-hidden rounded-lg bg-surface-container" }, H = 1 / 240, U = /* @__PURE__ */ v({
158
+ }, V = { class: "overflow-hidden rounded-lg bg-surface-container" }, H = 1 / 240, U = /* @__PURE__ */ b({
177
159
  inheritAttrs: !1,
178
160
  __name: "MMenu",
179
161
  props: {
@@ -185,20 +167,20 @@ var L = ["data-menu-level"], R = { class: "flex-1 truncate" }, z = { key: "root"
185
167
  let n = e, r = re();
186
168
  function i(e) {
187
169
  let t = [];
188
- for (let n of e) n.type === l && Array.isArray(n.children) ? t.push(...i(n.children)) : t.push(n);
170
+ for (let n of e) n.type === d && Array.isArray(n.children) ? t.push(...i(n.children)) : t.push(n);
189
171
  return t;
190
172
  }
191
173
  function a(e) {
192
- if (e.type !== M) return !1;
174
+ if (e.type !== oe) return !1;
193
175
  let t = e.props?.gap;
194
176
  return t === "" || t === !0 || t === "true";
195
177
  }
196
- let o = f(() => {
178
+ let o = m(() => {
197
179
  if (n.variant !== "expressive") return null;
198
180
  let e = i(r.default?.({ close: $ }) ?? []), t = [[]];
199
181
  for (let n of e) a(n) ? t.push([]) : t[t.length - 1].push(n);
200
182
  return t.filter((e) => e.length > 0);
201
- }), v = f(() => !!o.value && o.value.length > 1), { navStack: k, currentNav: j, navBox: oe, navSlideEnter: se, navSlideLeave: N, pushNav: ce, popNav: P, onNavPointerDown: F } = le(() => be()), U = null;
183
+ }), c = m(() => !!o.value && o.value.length > 1), { navStack: b, currentNav: j, navBox: N, navSlideEnter: se, navSlideLeave: P, pushNav: ce, popNav: F, onNavPointerDown: le } = I(() => be()), U = null;
202
184
  function ue() {
203
185
  if (U) return U;
204
186
  let e = [], t = .8, n = 0, r = 0, i = 0;
@@ -243,15 +225,15 @@ var L = ["data-menu-level"], R = { class: "flex-1 truncate" }, z = { key: "root"
243
225
  function me(e, t) {
244
226
  fe(e, t, !1);
245
227
  }
246
- let K = T(!1), q = T(null), J = T(null), Y = T({}), X = ee("m-menu-panel-registry", /* @__PURE__ */ new Set());
247
- w("m-menu-panel-registry", X), ie(J, (e, t) => {
228
+ let K = O(!1), q = O(null), J = O(null), Y = O({}), X = x("m-menu-panel-registry", /* @__PURE__ */ new Set());
229
+ D("m-menu-panel-registry", X), ie(J, (e, t) => {
248
230
  t && X.delete(t), e && X.add(e);
249
- }), ne(() => {
231
+ }), te(() => {
250
232
  J.value && X.delete(J.value);
251
233
  });
252
- let Z = ee("m-menu-sibling-group", null);
253
- w("m-menu-sibling-group", { current: null });
254
- let Q = null, he = T(!1);
234
+ let Z = x("m-menu-sibling-group", null);
235
+ D("m-menu-sibling-group", { current: null });
236
+ let Q = null, he = O(!1);
255
237
  function ge() {
256
238
  if (!q.value) return;
257
239
  let e = q.value.getBoundingClientRect();
@@ -265,10 +247,10 @@ var L = ["data-menu-level"], R = { class: "flex-1 truncate" }, z = { key: "root"
265
247
  };
266
248
  he.value ? n.bottom = `${window.innerHeight - e.top + 4}px` : n.top = `${e.bottom + 4}px`, Y.value = n;
267
249
  }
268
- let _e = T(n.align === "right" ? "right" : "left");
250
+ let _e = O(n.align === "right" ? "right" : "left");
269
251
  function ve(e) {
270
252
  if (!Q) return;
271
- let t = e.offsetWidth, r = I(Q, t, window.innerWidth, n.align === "right" ? "end" : "start"), i = Math.min(t, Math.max(0, (Q.left + Q.right) / 2 - r)), a = Math.abs(r - Q.left) < 1 ? "left" : Math.abs(r + t - Q.right) < 1 ? "right" : `${i}px`;
253
+ let t = e.offsetWidth, r = u(Q, t, window.innerWidth, n.align === "right" ? "end" : "start"), i = Math.min(t, Math.max(0, (Q.left + Q.right) / 2 - r)), a = Math.abs(r - Q.left) < 1 ? "left" : Math.abs(r + t - Q.right) < 1 ? "right" : `${i}px`;
272
254
  _e.value = a, Y.value = {
273
255
  ...Y.value,
274
256
  left: `${r}px`
@@ -278,7 +260,7 @@ var L = ["data-menu-level"], R = { class: "flex-1 truncate" }, z = { key: "root"
278
260
  return J.value ? Array.from(J.value.querySelectorAll("button:not(:disabled), a[href]")) : [];
279
261
  }
280
262
  function be() {
281
- b(() => ye()[0]?.focus());
263
+ C(() => ye()[0]?.focus());
282
264
  }
283
265
  function xe(e) {
284
266
  let t = ye();
@@ -287,12 +269,12 @@ var L = ["data-menu-level"], R = { class: "flex-1 truncate" }, z = { key: "root"
287
269
  (n === -1 ? e === 1 ? t[0] : t[t.length - 1] : t[(n + e + t.length) % t.length])?.focus();
288
270
  }
289
271
  function Se() {
290
- K.value ? Z?.current === $ && (Z.current = null) : (Z && Z.current && Z.current !== $ && Z.current(), Z && (Z.current = $), ge(), k.value = []), K.value = !K.value, K.value && be();
272
+ K.value ? Z?.current === $ && (Z.current = null) : (Z && Z.current && Z.current !== $ && Z.current(), Z && (Z.current = $), ge(), b.value = []), K.value = !K.value, K.value && be();
291
273
  }
292
274
  function $() {
293
275
  Z?.current === $ && (Z.current = null), K.value = !1;
294
276
  }
295
- w("m-menu-close", $), w("m-menu-nav", {
277
+ D("m-menu-close", $), D("m-menu-nav", {
296
278
  mode: n.submenuMode,
297
279
  push: ce
298
280
  }), t({
@@ -312,78 +294,78 @@ var L = ["data-menu-level"], R = { class: "flex-1 truncate" }, z = { key: "root"
312
294
  for (let e of X) if (e.contains(t)) return;
313
295
  t.closest?.(".m3-submenu") || $();
314
296
  }
315
- c(() => K.value, () => k.value.length ? P() : $());
297
+ l(() => K.value, () => b.value.length ? F() : $());
316
298
  function Te(e) {
317
299
  K.value && (e.key === "ArrowDown" ? (e.preventDefault(), xe(1)) : e.key === "ArrowUp" && (e.preventDefault(), xe(-1)));
318
300
  }
319
- te(() => {
301
+ ee(() => {
320
302
  document.addEventListener("mousedown", Ce), document.addEventListener("keydown", Te), window.addEventListener("scroll", we, !0);
321
- }), ne(() => {
303
+ }), te(() => {
322
304
  document.removeEventListener("mousedown", Ce), document.removeEventListener("keydown", Te), window.removeEventListener("scroll", we, !0), G ? G() : W?.();
323
305
  });
324
- let Ee = f(() => `${_e.value} ${he.value ? "bottom" : "top"}`);
325
- return (t, n) => (C(), h(l, null, [g("div", y({
306
+ let Ee = m(() => `${_e.value} ${he.value ? "bottom" : "top"}`);
307
+ return (t, n) => (E(), _(d, null, [v("div", S({
326
308
  ref_key: "triggerEl",
327
309
  ref: q
328
310
  }, t.$attrs, {
329
311
  class: "inline-block",
330
312
  onClick: Se
331
- }), [D(t.$slots, "trigger", { open: K.value })], 16), (C(), p(u, { to: "body" }, [_(d, {
313
+ }), [A(t.$slots, "trigger", { open: K.value })], 16), (E(), h(f, { to: "body" }, [y(p, {
332
314
  css: !1,
333
315
  onEnter: pe,
334
316
  onLeave: me
335
317
  }, {
336
- default: ae(() => [K.value ? (C(), h("div", {
318
+ default: ae(() => [K.value ? (E(), _("div", {
337
319
  key: 0,
338
320
  ref_key: "dropdownEl",
339
321
  ref: J,
340
- class: x(["fixed z-500 min-w-48", [e.variant === "expressive" ? "rounded-lg" : "rounded-xs", v.value ? "" : "shadow-elevation-2"]]),
341
- style: S({
322
+ class: w(["fixed z-500 min-w-48", [e.variant === "expressive" ? "rounded-lg" : "rounded-xs", c.value ? "" : "shadow-elevation-2"]]),
323
+ style: T({
342
324
  ...Y.value,
343
325
  transformOrigin: Ee.value
344
326
  })
345
- }, [g("div", { class: x(["overflow-hidden", [e.variant === "expressive" ? "rounded-lg" : "rounded-xs", v.value ? "" : "bg-surface-container"]]) }, [g("div", {
327
+ }, [v("div", { class: w(["overflow-hidden", [e.variant === "expressive" ? "rounded-lg" : "rounded-xs", c.value ? "" : "bg-surface-container"]]) }, [v("div", {
346
328
  ref_key: "navBox",
347
- ref: oe,
329
+ ref: N,
348
330
  class: "relative overflow-x-hidden overflow-y-auto overscroll-contain py-1",
349
- style: S({
331
+ style: T({
350
332
  maxHeight: Y.value.maxHeight,
351
- touchAction: A(j) ? "pan-y" : void 0
333
+ touchAction: M(j) ? "pan-y" : void 0
352
334
  }),
353
- onPointerdown: n[1] ||= (...e) => A(F) && A(F)(...e)
354
- }, [_(d, {
335
+ onPointerdown: n[1] ||= (...e) => M(le) && M(le)(...e)
336
+ }, [y(p, {
355
337
  css: !1,
356
- onEnter: A(se),
357
- onLeave: A(N)
338
+ onEnter: M(se),
339
+ onLeave: M(P)
358
340
  }, {
359
- default: ae(() => [A(j) ? (C(), h("div", {
360
- key: A(k).length,
361
- "data-menu-level": A(k).length
341
+ default: ae(() => [M(j) ? (E(), _("div", {
342
+ key: M(b).length,
343
+ "data-menu-level": M(b).length
362
344
  }, [
363
- g("button", {
345
+ v("button", {
364
346
  type: "button",
365
347
  class: "flex w-full items-center gap-3 px-4 py-2.5 text-left text-label-large text-on-surface-variant outline-none transition-colors hover:bg-on-surface/8 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-secondary",
366
- onClick: n[0] ||= (...e) => A(P) && A(P)(...e)
367
- }, [_(s, {
348
+ onClick: n[0] ||= (...e) => M(F) && M(F)(...e)
349
+ }, [y(s, {
368
350
  name: "arrow_back",
369
351
  size: 20,
370
352
  class: "shrink-0"
371
- }), g("span", R, [(C(), p(O(() => A(j)?.header?.())))])]),
372
- n[2] ||= g("hr", { class: "my-1 border-outline-variant" }, null, -1),
373
- (C(), p(O(() => A(j)?.content?.())))
374
- ], 8, L)) : (C(), h("div", z, [v.value ? (C(), h("div", B, [(C(!0), h(l, null, E(o.value, (e, t) => (C(), h("div", {
353
+ }), v("span", R, [(E(), h(ne(() => M(j)?.header?.())))])]),
354
+ n[2] ||= v("hr", { class: "my-1 border-outline-variant" }, null, -1),
355
+ (E(), h(ne(() => M(j)?.content?.())))
356
+ ], 8, L)) : (E(), _("div", z, [c.value ? (E(), _("div", B, [(E(!0), _(d, null, k(o.value, (e, t) => (E(), _("div", {
375
357
  key: t,
376
358
  class: "rounded-lg shadow-elevation-2"
377
- }, [g("div", V, [(C(), p(O(() => e)))])]))), 128))])) : D(t.$slots, "default", { close: $ }, void 0, void 0, 1)]))]),
359
+ }, [v("div", V, [(E(), h(ne(() => e)))])]))), 128))])) : A(t.$slots, "default", { close: $ }, void 0, void 0, 1)]))]),
378
360
  _: 3
379
- }, 8, ["onEnter", "onLeave"])], 36)], 2)], 6)) : m("", !0)]),
361
+ }, 8, ["onEnter", "onLeave"])], 36)], 2)], 6)) : g("", !0)]),
380
362
  _: 3
381
363
  })]))], 64));
382
364
  }
383
365
  }), ue = ["data-m3-menu-choice"], de = { class: "flex-1" }, W = {
384
366
  key: 3,
385
367
  class: "ml-4 shrink-0 text-label-small text-on-surface-variant opacity-60"
386
- }, G = { class: "overflow-hidden rounded-xs bg-surface-container py-1" }, fe = 32, pe = /* @__PURE__ */ v({
368
+ }, G = { class: "overflow-hidden rounded-xs bg-surface-container py-1" }, fe = 32, pe = /* @__PURE__ */ b({
387
369
  __name: "MMenuItem",
388
370
  props: {
389
371
  icon: {},
@@ -413,21 +395,21 @@ var L = ["data-menu-level"], R = { class: "flex-1 truncate" }, z = { key: "root"
413
395
  },
414
396
  emits: ["click", "update:checked"],
415
397
  setup(t, { emit: r }) {
416
- let a = t, o = r, c = re(), l = f(() => a.checked !== void 0), v = f(() => l.value || a.selected !== void 0), y = f(() => !!(a.checked ?? a.selected)), w = f(() => v.value && !a.icon && !c.icon), E = f(() => a.selectedIcon ?? (a.icon ? void 0 : "check")), j = T("single");
417
- function M() {
398
+ let a = t, o = r, l = re(), u = m(() => a.checked !== void 0), d = m(() => u.value || a.selected !== void 0), b = m(() => !!(a.checked ?? a.selected)), S = m(() => d.value && !a.icon && !l.icon), D = m(() => a.selectedIcon ?? (a.icon ? void 0 : "check")), k = O("single");
399
+ function N() {
418
400
  let e = L.value;
419
- if (!e || !v.value) return;
401
+ if (!e || !d.value) return;
420
402
  let t = (e) => !!e?.hasAttribute("data-m3-menu-choice"), n = t(e.previousElementSibling), r = t(e.nextElementSibling);
421
- j.value = n && r ? "middle" : n ? "last" : r ? "first" : "single";
403
+ k.value = n && r ? "middle" : n ? "last" : r ? "first" : "single";
422
404
  }
423
405
  function oe() {
424
- if (y.value) return [
406
+ if (b.value) return [
425
407
  12,
426
408
  12,
427
409
  12,
428
410
  12
429
411
  ];
430
- let e = j.value === "first" ? 12 : 4, t = j.value === "last" ? 12 : 4;
412
+ let e = k.value === "first" ? 12 : 4, t = k.value === "last" ? 12 : 4;
431
413
  return [
432
414
  e,
433
415
  e,
@@ -435,20 +417,20 @@ var L = ["data-menu-level"], R = { class: "flex-1 truncate" }, z = { key: "root"
435
417
  t
436
418
  ];
437
419
  }
438
- let { snap: se } = i(() => v.value ? [...oe(), w.value && y.value ? fe : 0] : [], ([e, t, n, r, i]) => {
420
+ let { snap: se } = i(() => d.value ? [...oe(), S.value && b.value ? fe : 0] : [], ([e, t, n, r, i]) => {
439
421
  let a = R.value instanceof HTMLElement ? R.value : R.value?.$el;
440
422
  a && r !== void 0 && (a.style.borderRadius = `${e}px ${t}px ${n}px ${r}px`), z.value && i !== void 0 && (z.value.style.width = `${i}px`);
441
423
  }, e);
442
- ie(j, () => se());
443
- let N = null;
444
- te(() => {
445
- M();
424
+ ie(k, () => se());
425
+ let P = null;
426
+ ee(() => {
427
+ N();
446
428
  let e = L.value?.parentElement;
447
- e && (N = new MutationObserver(M), N.observe(e, { childList: !0 }));
448
- }), ne(() => N?.disconnect()), ie(v, () => b(M)), i(() => w.value ? [+!!y.value] : [], ([e]) => {
429
+ e && (P = new MutationObserver(N), P.observe(e, { childList: !0 }));
430
+ }), te(() => P?.disconnect()), ie(d, () => C(N)), i(() => S.value ? [+!!b.value] : [], ([e]) => {
449
431
  z.value && e !== void 0 && (z.value.style.opacity = String(e));
450
432
  }, n);
451
- let ce = f(() => a.to ? "RouterLink" : "button"), P = f(() => !!c.children), le = ee("m-menu-close", null), I = ee("m-menu-nav", null), L = T(), R = T(), z = T(), B = T(!1), V = T({});
433
+ let ce = m(() => a.to ? "RouterLink" : "button"), F = m(() => !!l.children), le = x("m-menu-close", null), I = x("m-menu-nav", null), L = O(), R = O(), z = O(), B = O(!1), V = O({});
452
434
  function H() {
453
435
  if (!L.value) return;
454
436
  let e = L.value.getBoundingClientRect();
@@ -464,7 +446,7 @@ var L = ["data-menu-level"], R = { class: "flex-1 truncate" }, z = { key: "root"
464
446
  if (!L.value) return;
465
447
  let t = e, n = L.value.getBoundingClientRect();
466
448
  t.style.left = "0px";
467
- let r = t.offsetWidth, i = t.offsetHeight, a = F([n.right, n.left - r], r, window.innerWidth), o = F([n.top, n.bottom - i], i, window.innerHeight);
449
+ let r = t.offsetWidth, i = t.offsetHeight, a = c([n.right, n.left - r], r, window.innerWidth), o = c([n.top, n.bottom - i], i, window.innerHeight);
468
450
  V.value = {
469
451
  ...V.value,
470
452
  left: `${a}px`,
@@ -475,14 +457,14 @@ var L = ["data-menu-level"], R = { class: "flex-1 truncate" }, z = { key: "root"
475
457
  B.value ? B.value = !1 : (H(), B.value = !0);
476
458
  }
477
459
  function me() {
478
- a.disabled || (P.value ? I?.mode === "push" ? I.push({
460
+ a.disabled || (F.value ? I?.mode === "push" ? I.push({
479
461
  icon: a.icon,
480
- header: c.default,
481
- content: c.children
482
- }) : pe() : (l.value && o("update:checked", !a.checked), o("click"), (a.keepOpen ?? l.value) || le?.()));
462
+ header: l.default,
463
+ content: l.children
464
+ }) : pe() : (u.value && o("update:checked", !a.checked), o("click"), (a.keepOpen ?? u.value) || le?.()));
483
465
  }
484
466
  function K(e) {
485
- e.pointerType === "mouse" && P.value && !a.disabled && (H(), B.value = !0);
467
+ e.pointerType === "mouse" && F.value && !a.disabled && (H(), B.value = !0);
486
468
  }
487
469
  function q(e) {
488
470
  e.pointerType === "mouse" && (e.relatedTarget?.closest(".m3-submenu") || (B.value = !1));
@@ -492,22 +474,22 @@ var L = ["data-menu-level"], R = { class: "flex-1 truncate" }, z = { key: "root"
492
474
  let t = e.relatedTarget;
493
475
  t?.closest(".m3-submenu") || L.value?.contains(t) || (B.value = !1);
494
476
  }
495
- return (e, n) => (C(), h("div", {
477
+ return (e, n) => (E(), _("div", {
496
478
  ref_key: "itemEl",
497
479
  ref: L,
498
- "data-m3-menu-choice": v.value || void 0,
480
+ "data-m3-menu-choice": d.value || void 0,
499
481
  onPointerenter: K,
500
482
  onPointerleave: q
501
- }, [(C(), p(O(ce.value), {
483
+ }, [(E(), h(ne(ce.value), {
502
484
  ref_key: "controlEl",
503
485
  ref: R,
504
486
  to: t.to || void 0,
505
487
  type: t.to ? void 0 : "button",
506
- role: v.value ? l.value ? "menuitemcheckbox" : "menuitemradio" : void 0,
507
- "aria-checked": v.value ? y.value : void 0,
508
- class: x(["flex items-center gap-3 py-2.5 text-left text-body-large transition-colors outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-secondary", v.value ? [
488
+ role: d.value ? u.value ? "menuitemcheckbox" : "menuitemradio" : void 0,
489
+ "aria-checked": d.value ? b.value : void 0,
490
+ class: w(["flex items-center gap-3 py-2.5 text-left text-body-large transition-colors outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-secondary", d.value ? [
509
491
  "relative mx-1 w-[calc(100%-0.5rem)] px-3 duration-150 before:pointer-events-none before:absolute before:inset-0 before:rounded-[inherit] before:bg-current before:opacity-0 before:transition-opacity",
510
- y.value ? "bg-tertiary-container text-on-tertiary-container" : "text-on-surface",
492
+ b.value ? "bg-tertiary-container text-on-tertiary-container" : "text-on-surface",
511
493
  t.disabled ? "cursor-not-allowed opacity-[0.38]" : "cursor-pointer hover:before:opacity-[0.08] active:before:opacity-[0.12]"
512
494
  ] : [
513
495
  "w-full px-4",
@@ -516,12 +498,12 @@ var L = ["data-menu-level"], R = { class: "flex-1 truncate" }, z = { key: "root"
516
498
  !t.disabled && !t.danger ? "text-on-surface hover:bg-on-surface/8" : ""
517
499
  ]]),
518
500
  disabled: t.disabled || void 0,
519
- "aria-haspopup": P.value ? "menu" : void 0,
520
- "aria-expanded": P.value ? B.value : void 0,
501
+ "aria-haspopup": F.value ? "menu" : void 0,
502
+ "aria-expanded": F.value ? B.value : void 0,
521
503
  onClick: me
522
504
  }, {
523
505
  default: ae(() => [
524
- w.value ? (C(), h("span", {
506
+ S.value ? (E(), _("span", {
525
507
  key: 0,
526
508
  ref_key: "iconSlotEl",
527
509
  ref: z,
@@ -530,32 +512,32 @@ var L = ["data-menu-level"], R = { class: "flex-1 truncate" }, z = { key: "root"
530
512
  width: "0",
531
513
  opacity: "0"
532
514
  }
533
- }, [_(s, {
534
- name: E.value,
515
+ }, [y(s, {
516
+ name: D.value,
535
517
  size: 20,
536
518
  class: "shrink-0"
537
- }, null, 8, ["name"])], 512)) : e.$slots.icon ? (C(), h("span", {
519
+ }, null, 8, ["name"])], 512)) : e.$slots.icon ? (E(), _("span", {
538
520
  key: 1,
539
- class: x(["flex size-5 shrink-0 items-center justify-center", v.value ? y.value ? "" : "text-on-surface-variant" : t.danger ? "text-error" : "text-on-surface-variant"])
540
- }, [D(e.$slots, "icon", { on: y.value })], 2)) : t.icon ? (C(), p(s, {
521
+ class: w(["flex size-5 shrink-0 items-center justify-center", d.value ? b.value ? "" : "text-on-surface-variant" : t.danger ? "text-error" : "text-on-surface-variant"])
522
+ }, [A(e.$slots, "icon", { on: b.value })], 2)) : t.icon ? (E(), h(s, {
541
523
  key: 2,
542
- name: y.value && E.value ? E.value : t.icon,
543
- filled: y.value && !E.value,
524
+ name: b.value && D.value ? D.value : t.icon,
525
+ filled: b.value && !D.value,
544
526
  size: 20,
545
- class: x(["shrink-0", v.value ? y.value ? "" : "text-on-surface-variant" : t.danger ? "text-error" : "text-on-surface-variant"])
527
+ class: w(["shrink-0", d.value ? b.value ? "" : "text-on-surface-variant" : t.danger ? "text-error" : "text-on-surface-variant"])
546
528
  }, null, 8, [
547
529
  "name",
548
530
  "filled",
549
531
  "class"
550
- ])) : m("", !0),
551
- g("span", de, [D(e.$slots, "default")]),
552
- t.shortcut && !P.value ? (C(), h("span", W, k(t.shortcut), 1)) : m("", !0),
553
- P.value ? (C(), p(s, {
532
+ ])) : g("", !0),
533
+ v("span", de, [A(e.$slots, "default")]),
534
+ t.shortcut && !F.value ? (E(), _("span", W, j(t.shortcut), 1)) : g("", !0),
535
+ F.value ? (E(), h(s, {
554
536
  key: 4,
555
537
  name: "chevron_right",
556
538
  size: 18,
557
539
  class: "shrink-0 text-on-surface-variant"
558
- })) : m("", !0)
540
+ })) : g("", !0)
559
541
  ]),
560
542
  _: 3
561
543
  }, 8, [
@@ -567,26 +549,26 @@ var L = ["data-menu-level"], R = { class: "flex-1 truncate" }, z = { key: "root"
567
549
  "disabled",
568
550
  "aria-haspopup",
569
551
  "aria-expanded"
570
- ])), P.value && A(I)?.mode !== "push" ? (C(), p(u, {
552
+ ])), F.value && M(I)?.mode !== "push" ? (E(), h(f, {
571
553
  key: 0,
572
554
  to: "body"
573
- }, [_(d, {
555
+ }, [y(p, {
574
556
  "enter-active-class": "transition-opacity duration-100",
575
557
  "enter-from-class": "opacity-0",
576
558
  "leave-active-class": "transition-opacity duration-75",
577
559
  "leave-to-class": "opacity-0",
578
560
  onEnter: U
579
561
  }, {
580
- default: ae(() => [B.value ? (C(), h("div", {
562
+ default: ae(() => [B.value ? (E(), _("div", {
581
563
  key: 0,
582
564
  class: "m3-submenu min-w-44 rounded-xs shadow-elevation-2",
583
- style: S(V.value),
565
+ style: T(V.value),
584
566
  onPointerleave: J
585
- }, [g("div", G, [D(e.$slots, "children")])], 36)) : m("", !0)]),
567
+ }, [v("div", G, [A(e.$slots, "children")])], 36)) : g("", !0)]),
586
568
  _: 3
587
- })])) : m("", !0)], 40, ue));
569
+ })])) : g("", !0)], 40, ue));
588
570
  }
589
571
  });
590
- export { le as a, F as i, U as n, M as o, I as r, pe as t };
572
+ export { oe as i, U as n, I as r, pe as t };
591
573
 
592
- //# sourceMappingURL=MMenuItem-CRNZkVVr.js.map
574
+ //# sourceMappingURL=MMenuItem-BuxYoASE.js.map