@m3ui-vue/m3ui-vue 1.1.4 → 1.2.1

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 (200) hide show
  1. package/dist/API.md +511 -34
  2. package/dist/MMenuItem-DI351kIf.js +929 -0
  3. package/dist/MMenuItem-DI351kIf.js.map +1 -0
  4. package/dist/{MSlider-JflHJ70q.js → MSlider-BnEy5ieZ.js} +295 -320
  5. package/dist/MSlider-BnEy5ieZ.js.map +1 -0
  6. package/dist/MTextField-BBmkaIbO.js +633 -0
  7. package/dist/MTextField-BBmkaIbO.js.map +1 -0
  8. package/dist/api.json +1 -1
  9. package/dist/chart.js +83 -49
  10. package/dist/chart.js.map +1 -1
  11. package/dist/code-editor.js +1 -1
  12. package/dist/components/MButton.vue.d.ts +7 -1
  13. package/dist/components/MButtonGroup.vue.d.ts +40 -31
  14. package/dist/components/MCarousel.vue.d.ts +2 -0
  15. package/dist/components/MChart.vue.d.ts +6 -0
  16. package/dist/components/MCircleProgressBar.vue.d.ts +5 -3
  17. package/dist/components/MContextMenu.vue.d.ts +2 -2
  18. package/dist/components/MCopyButton.vue.d.ts +1 -1
  19. package/dist/components/MExportButton.vue.d.ts +1 -1
  20. package/dist/components/MFab.vue.d.ts +2 -2
  21. package/dist/components/MFabMenu.vue.d.ts +1 -1
  22. package/dist/components/MIconButton.vue.d.ts +13 -1
  23. package/dist/components/MInfiniteScroll.vue.d.ts +1 -1
  24. package/dist/components/MMap.vue.d.ts +20 -2
  25. package/dist/components/MMapBaseLayers.vue.d.ts +3 -0
  26. package/dist/components/MMapFilter.vue.d.ts +3 -0
  27. package/dist/components/MMapLayers.vue.d.ts +3 -0
  28. package/dist/components/MMenu.vue.d.ts +2 -2
  29. package/dist/components/MMenuItem.vue.d.ts +7 -3
  30. package/dist/components/MNavigationDrawer.vue.d.ts +13 -2
  31. package/dist/components/MOverlay.vue.d.ts +12 -1
  32. package/dist/components/MProgressBar.vue.d.ts +5 -3
  33. package/dist/components/MPullToRefresh.vue.d.ts +7 -2
  34. package/dist/components/MRichTextEditor.vue.d.ts +7 -1
  35. package/dist/components/MSearchField.vue.d.ts +58 -0
  36. package/dist/components/MSegmentedButton.vue.d.ts +31 -23
  37. package/dist/components/MSimpleCarousel.vue.d.ts +2 -0
  38. package/dist/components/MSkeleton.vue.d.ts +6 -3
  39. package/dist/components/MSwipeToDismiss.vue.d.ts +1 -1
  40. package/dist/components/MSwitch.vue.d.ts +1 -1
  41. package/dist/components/MTextField.vue.d.ts +5 -1
  42. package/dist/components/MTimeline.vue.d.ts +85 -22
  43. package/dist/components/MTooltip.vue.d.ts +1 -1
  44. package/dist/components/_MDrawerItemList.vue.d.ts +2 -0
  45. package/dist/composables/_mapStyle.d.ts +13 -0
  46. package/dist/composables/_themeTransition.d.ts +2 -0
  47. package/dist/composables/_tooltipTrigger.d.ts +22 -0
  48. package/dist/composables/_useMenuNav.d.ts +28 -0
  49. package/dist/composables/useAutoGrow.d.ts +21 -0
  50. package/dist/composables/useColorPalette.d.ts +1 -1
  51. package/dist/composables/useLocale.d.ts +3 -0
  52. package/dist/composables/useMap.d.ts +19 -3
  53. package/dist/composables/useMapFilter.d.ts +4 -1
  54. package/dist/composables/useMapLayers.d.ts +5 -2
  55. package/dist/composables/useScrollReveal.d.ts +44 -0
  56. package/dist/composables/useThemeTokens.d.ts +21 -0
  57. package/dist/composables/viewportHints.d.ts +27 -0
  58. package/dist/directives/vClickOutside.d.ts +25 -0
  59. package/dist/directives/vFocusRing.d.ts +22 -0
  60. package/dist/directives/vLongPress.d.ts +27 -0
  61. package/dist/directives/vReveal.d.ts +10 -0
  62. package/dist/directives/vScrollElevation.d.ts +31 -0
  63. package/dist/directives/vSkeleton.d.ts +19 -0
  64. package/dist/directives/vStateLayer.d.ts +20 -0
  65. package/dist/directives/vSwipe.d.ts +45 -0
  66. package/dist/directives/vTooltip.d.ts +23 -0
  67. package/dist/index.d.ts +28 -1
  68. package/dist/locales/index.js +21 -7
  69. package/dist/locales/index.js.map +1 -1
  70. package/dist/m3ui-vue.css +1 -1
  71. package/dist/m3ui.js +7132 -6217
  72. package/dist/m3ui.js.map +1 -1
  73. package/dist/map.d.ts +1 -1
  74. package/dist/map.js +821 -791
  75. package/dist/map.js.map +1 -1
  76. package/dist/motion-DZiXG09o.js +150 -0
  77. package/dist/motion-DZiXG09o.js.map +1 -0
  78. package/dist/plugin.d.ts +24 -0
  79. package/dist/rich-text-editor.js +13 -9
  80. package/dist/rich-text-editor.js.map +1 -1
  81. package/dist/styles/theme.css +63 -0
  82. package/dist/styles.css +1 -1
  83. package/dist/{useLocale-CXibICQA.js → useLocale-JYxDDeXC.js} +4 -2
  84. package/dist/useLocale-JYxDDeXC.js.map +1 -0
  85. package/dist/useThemeTokens-Bv-Uv8eX.js +135 -0
  86. package/dist/useThemeTokens-Bv-Uv8eX.js.map +1 -0
  87. package/package.json +1 -1
  88. package/src/__tests__/MButton.test.ts +22 -0
  89. package/src/__tests__/MCarousel.test.ts +9 -0
  90. package/src/__tests__/MChart.test.ts +77 -5
  91. package/src/__tests__/MIconButton.test.ts +33 -0
  92. package/src/__tests__/MMap.test.ts +53 -1
  93. package/src/__tests__/MMapLayers.test.ts +46 -2
  94. package/src/__tests__/MMenu.test.ts +104 -1
  95. package/src/__tests__/MMenuItem.test.ts +18 -0
  96. package/src/__tests__/MNavigationDrawer.test.ts +80 -0
  97. package/src/__tests__/MOverlay.test.ts +49 -0
  98. package/src/__tests__/MProgressBar.test.ts +41 -0
  99. package/src/__tests__/MPullToRefresh.test.ts +33 -0
  100. package/src/__tests__/MRichTextEditor.test.ts +22 -0
  101. package/src/__tests__/MSearchField.test.ts +71 -0
  102. package/src/__tests__/MSegmentedButton.test.ts +10 -0
  103. package/src/__tests__/MSkeleton.test.ts +38 -0
  104. package/src/__tests__/MTimeline.test.ts +238 -0
  105. package/src/__tests__/_fakeMaplibre.ts +3 -1
  106. package/src/__tests__/attrsFallthrough.test.ts +3 -0
  107. package/src/__tests__/escapeStack.test.ts +93 -0
  108. package/src/__tests__/ssr.test.ts +21 -2
  109. package/src/__tests__/useAutoGrow.test.ts +103 -0
  110. package/src/__tests__/useScrollReveal.test.ts +102 -0
  111. package/src/__tests__/useThemeTokens.test.ts +114 -0
  112. package/src/__tests__/vClickOutside.test.ts +82 -0
  113. package/src/__tests__/vFocusRing.test.ts +36 -0
  114. package/src/__tests__/vLongPress.test.ts +81 -0
  115. package/src/__tests__/vScrollElevation.test.ts +89 -0
  116. package/src/__tests__/vSkeleton.test.ts +48 -0
  117. package/src/__tests__/vStateLayer.test.ts +53 -0
  118. package/src/__tests__/vSwipe.test.ts +93 -0
  119. package/src/__tests__/vTooltip.test.ts +95 -0
  120. package/src/__tests__/viewportHints.test.ts +41 -0
  121. package/src/components/MAutocomplete.vue +5 -0
  122. package/src/components/MBottomSheet.vue +4 -1
  123. package/src/components/MButton.vue +15 -1
  124. package/src/components/MButtonGroup.vue +22 -17
  125. package/src/components/MCarousel.vue +7 -1
  126. package/src/components/MChart.vue +74 -34
  127. package/src/components/MCircleProgressBar.vue +14 -9
  128. package/src/components/MCommandPalette.vue +3 -2
  129. package/src/components/MContextMenu.vue +19 -60
  130. package/src/components/MDragDropList.vue +2 -0
  131. package/src/components/MIconButton.vue +40 -1
  132. package/src/components/MKanban.vue +2 -0
  133. package/src/components/MLightbox.vue +7 -2
  134. package/src/components/MMap.vue +38 -5
  135. package/src/components/MMapBaseLayers.vue +7 -3
  136. package/src/components/MMapFilter.vue +7 -4
  137. package/src/components/MMapGeoJson.vue +1 -1
  138. package/src/components/MMapLayers.vue +6 -2
  139. package/src/components/MMapMeasure.vue +5 -2
  140. package/src/components/MMenu.vue +18 -59
  141. package/src/components/MMenuItem.vue +11 -2
  142. package/src/components/MMultiAutocomplete.vue +5 -0
  143. package/src/components/MNavigationDrawer.vue +96 -11
  144. package/src/components/MNavigationRail.vue +4 -15
  145. package/src/components/MOverlay.vue +32 -13
  146. package/src/components/MProgressBar.vue +25 -27
  147. package/src/components/MPullToRefresh.vue +20 -1
  148. package/src/components/MRichTextEditor.vue +19 -5
  149. package/src/components/MSearchBar.vue +5 -0
  150. package/src/components/MSearchField.vue +142 -0
  151. package/src/components/MSegmentedButton.vue +20 -18
  152. package/src/components/MSelect.vue +10 -1
  153. package/src/components/MSideSheet.vue +5 -2
  154. package/src/components/MSimpleCarousel.vue +10 -1
  155. package/src/components/MSkeleton.vue +30 -8
  156. package/src/components/MSpotlightSearch.vue +3 -2
  157. package/src/components/MTextField.vue +15 -2
  158. package/src/components/MTimeline.vue +370 -81
  159. package/src/components/MTooltip.vue +20 -152
  160. package/src/components/_MDrawerItemList.vue +25 -6
  161. package/src/composables/_mapStyle.ts +45 -0
  162. package/src/composables/_themeTransition.ts +2 -0
  163. package/src/composables/_tooltipTrigger.ts +184 -0
  164. package/src/composables/_useMenuNav.ts +209 -0
  165. package/src/composables/useAutoGrow.ts +78 -0
  166. package/src/composables/useLocale.ts +5 -0
  167. package/src/composables/useMap.ts +43 -5
  168. package/src/composables/useMapFilter.ts +6 -5
  169. package/src/composables/useMapLayers.ts +7 -6
  170. package/src/composables/useScrollReveal.ts +151 -0
  171. package/src/composables/useThemeTokens.ts +116 -0
  172. package/src/composables/viewportHints.ts +80 -0
  173. package/src/directives/vClickOutside.ts +90 -0
  174. package/src/directives/vFocusRing.ts +60 -0
  175. package/src/directives/vLongPress.ts +134 -0
  176. package/src/directives/vReveal.ts +57 -0
  177. package/src/directives/vScrollElevation.ts +116 -0
  178. package/src/directives/vSkeleton.ts +87 -0
  179. package/src/directives/vStateLayer.ts +83 -0
  180. package/src/directives/vSwipe.ts +197 -0
  181. package/src/directives/vTooltip.ts +128 -0
  182. package/src/index.ts +28 -1
  183. package/src/locales/de.ts +2 -0
  184. package/src/locales/es.ts +2 -0
  185. package/src/locales/fr.ts +2 -0
  186. package/src/locales/ja.ts +2 -0
  187. package/src/locales/ko.ts +2 -0
  188. package/src/locales/pt.ts +2 -0
  189. package/src/locales/zh.ts +2 -0
  190. package/src/map.ts +1 -1
  191. package/src/plugin.ts +34 -0
  192. package/src/styles/theme.css +63 -0
  193. package/dist/MMenuItem-BfjqwcYP.js +0 -830
  194. package/dist/MMenuItem-BfjqwcYP.js.map +0 -1
  195. package/dist/MSlider-JflHJ70q.js.map +0 -1
  196. package/dist/MTextField-NaIB6RbM.js +0 -673
  197. package/dist/MTextField-NaIB6RbM.js.map +0 -1
  198. package/dist/composables/_useThemeTokens.d.ts +0 -7
  199. package/dist/useLocale-CXibICQA.js.map +0 -1
  200. package/src/composables/_useThemeTokens.ts +0 -42
@@ -1,830 +0,0 @@
1
- import { i as e } from "./useLocale-CXibICQA.js";
2
- import { a as t, c as n, g as r, h as i, n as a, o } from "./MTextField-NaIB6RbM.js";
3
- import { t as s } from "./MIcon-Bxh9j135.js";
4
- import { t as c } from "./_plugin-vue_export-helper-B3ysoDQm.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, createTextVNode as _, createVNode as v, defineComponent as y, getCurrentInstance as b, inject as x, mergeProps as S, nextTick as C, normalizeClass as w, normalizeStyle as T, onBeforeUnmount as E, onMounted as D, onUnmounted as ee, openBlock as O, provide as k, ref as A, renderList as j, renderSlot as M, resolveDynamicComponent as te, toDisplayString as ne, unref as N, useId as re, useSlots as ie, watch as P, withCtx as F, withDirectives as I, withModifiers as L } from "vue";
6
- //#region src/composables/_useScrollLock.ts
7
- var R = 0, ae = "";
8
- function z() {
9
- R++ === 0 && (ae = document.body.style.overflow, document.body.style.overflow = "hidden");
10
- }
11
- function B() {
12
- R > 0 && --R === 0 && (document.body.style.overflow = ae);
13
- }
14
- function V(e) {
15
- let t = !1;
16
- function n(e) {
17
- typeof document > "u" || e === t || (t = e, e ? z() : B());
18
- }
19
- return e && P(e, (e) => n(!!e), { immediate: !0 }), b() && E(() => n(!1)), { set: n };
20
- }
21
- //#endregion
22
- //#region src/components/MButton.vue?vue&type=script&setup=true&lang.ts
23
- var H = "relative inline-flex items-center justify-center font-medium whitespace-nowrap overflow-hidden transition-[box-shadow,background-color,color] duration-150 select-none cursor-pointer disabled:cursor-not-allowed disabled:shadow-none disabled:text-on-surface/38 before:content-[''] before:pointer-events-none before:absolute before:inset-0 before:bg-current before:opacity-0 before:transition-opacity before:duration-150 enabled:hover:before:opacity-[0.08] enabled:active:before:opacity-[0.12]", U = /* @__PURE__ */ y({
24
- __name: "MButton",
25
- props: {
26
- variant: { default: "filled" },
27
- color: { default: "primary" },
28
- type: { default: "button" },
29
- disabled: {
30
- type: Boolean,
31
- default: !1
32
- },
33
- loading: {
34
- type: Boolean,
35
- default: !1
36
- },
37
- icon: {},
38
- iconFilled: { type: Boolean },
39
- iconPos: { default: "leading" },
40
- size: { default: "sm" },
41
- shape: { default: "rounded" },
42
- to: {},
43
- rippleColor: {}
44
- },
45
- setup(e) {
46
- let t = ["primary", "error"], n = e, a = f(() => n.to ? "RouterLink" : "button"), o = f(() => !!n.color && !t.includes(n.color)), c = f(() => {
47
- if (o.value) return {
48
- "--color-primary": n.color,
49
- "--color-on-primary": "#ffffff",
50
- "--color-primary-container": n.color + "33",
51
- "--color-on-primary-container": n.color
52
- };
53
- }), u = f(() => n.color === "error"), d = f(() => {
54
- switch (n.variant) {
55
- case "filled":
56
- case "tonal":
57
- case "elevated": return "disabled:bg-on-surface/10";
58
- case "outlined": return u.value ? "disabled:border-error/10" : "disabled:border-outline-variant/10";
59
- default: return "";
60
- }
61
- }), g = {
62
- xs: {
63
- h: "h-8",
64
- text: "text-label-large",
65
- icon: 20,
66
- spinner: 16,
67
- gap: "gap-1",
68
- px: "px-3",
69
- pxText: "px-2",
70
- squareRadius: "rounded-md"
71
- },
72
- sm: {
73
- h: "h-10",
74
- text: "text-label-large",
75
- icon: 20,
76
- spinner: 16,
77
- gap: "gap-2",
78
- px: "px-4",
79
- pxText: "px-3",
80
- squareRadius: "rounded-md"
81
- },
82
- md: {
83
- h: "h-14",
84
- text: "text-title-medium",
85
- icon: 24,
86
- spinner: 18,
87
- gap: "gap-2",
88
- px: "px-6",
89
- pxText: "px-3",
90
- squareRadius: "rounded-lg"
91
- },
92
- lg: {
93
- h: "h-24",
94
- text: "text-headline-small",
95
- icon: 32,
96
- spinner: 26,
97
- gap: "gap-3",
98
- px: "px-12",
99
- pxText: "px-4",
100
- squareRadius: "rounded-xl"
101
- },
102
- xl: {
103
- h: "h-[136px]",
104
- text: "text-headline-large",
105
- icon: 40,
106
- spinner: 34,
107
- gap: "gap-4",
108
- px: "px-16",
109
- pxText: "px-4",
110
- squareRadius: "rounded-xl"
111
- }
112
- }, _ = f(() => g[n.size] ?? g.sm), v = f(() => `${_.value.h} ${_.value.text} ${_.value.gap}`), y = f(() => _.value.icon), b = f(() => _.value.spinner), x = f(() => n.variant === "text" ? _.value.pxText : _.value.px), S = f(() => n.shape === "squared" ? _.value.squareRadius : "rounded-full"), C = f(() => {
113
- let e = u.value;
114
- switch (n.variant) {
115
- case "filled": return e ? "bg-error text-on-error enabled:hover:shadow-elevation-1 enabled:active:shadow-none" : "bg-primary text-on-primary enabled:hover:shadow-elevation-1 enabled:active:shadow-none";
116
- case "tonal": return e ? "bg-error-container text-on-error-container enabled:hover:shadow-elevation-1 enabled:active:shadow-none" : "bg-secondary-container text-on-secondary-container enabled:hover:shadow-elevation-1 enabled:active:shadow-none";
117
- case "elevated": return e ? "bg-surface-container-low text-error shadow-elevation-1 enabled:hover:shadow-elevation-2" : "bg-surface-container-low text-primary shadow-elevation-1 enabled:hover:shadow-elevation-2";
118
- case "outlined": return e ? "border border-error text-error" : "border border-outline-variant text-primary";
119
- case "text": return e ? "text-error" : "text-primary";
120
- default: return "";
121
- }
122
- });
123
- return (t, n) => I((O(), p(te(a.value), {
124
- to: e.to || void 0,
125
- type: e.to ? void 0 : e.type,
126
- disabled: e.disabled || e.loading,
127
- class: w([
128
- H,
129
- S.value,
130
- v.value,
131
- x.value,
132
- C.value,
133
- d.value
134
- ]),
135
- style: T(c.value)
136
- }, {
137
- default: F(() => [
138
- e.iconPos === "leading" ? (O(), h(l, { key: 0 }, [e.loading ? (O(), p(i, {
139
- key: 0,
140
- size: b.value
141
- }, null, 8, ["size"])) : e.icon ? (O(), p(s, {
142
- key: 1,
143
- name: e.icon,
144
- size: y.value,
145
- filled: e.iconFilled
146
- }, null, 8, [
147
- "name",
148
- "size",
149
- "filled"
150
- ])) : m("", !0)], 64)) : m("", !0),
151
- M(t.$slots, "default"),
152
- e.iconPos === "trailing" ? (O(), h(l, { key: 1 }, [e.loading ? (O(), p(i, {
153
- key: 0,
154
- size: b.value
155
- }, null, 8, ["size"])) : e.icon ? (O(), p(s, {
156
- key: 1,
157
- name: e.icon,
158
- size: y.value,
159
- filled: e.iconFilled
160
- }, null, 8, [
161
- "name",
162
- "size",
163
- "filled"
164
- ])) : m("", !0)], 64)) : m("", !0)
165
- ]),
166
- _: 3
167
- }, 8, [
168
- "to",
169
- "type",
170
- "disabled",
171
- "class",
172
- "style"
173
- ])), [[N(r), {
174
- disabled: e.disabled || e.loading,
175
- color: e.rippleColor
176
- }]]);
177
- }
178
- }), W = [];
179
- function G(e) {
180
- e.key === "Escape" && W.length && (e.preventDefault(), W[W.length - 1]());
181
- }
182
- function K(e, t) {
183
- let n = () => t();
184
- function r(e) {
185
- if (typeof document > "u") return;
186
- let t = W.indexOf(n);
187
- e && t < 0 ? (W.push(n), W.length === 1 && document.addEventListener("keydown", G)) : !e && t >= 0 && (W.splice(t, 1), W.length || document.removeEventListener("keydown", G));
188
- }
189
- P(e, (e) => r(!!e), { immediate: !0 }), b() && E(() => r(!1));
190
- }
191
- //#endregion
192
- //#region src/components/MDialog.vue?vue&type=script&setup=true&lang.ts
193
- var q = ["aria-labelledby", "aria-label"], J = {
194
- key: 0,
195
- class: "min-h-0 overflow-y-auto rounded-[inherit]"
196
- }, Y = { class: "relative px-6 pt-6 pb-2" }, X = {
197
- key: 0,
198
- class: "absolute right-4 top-4"
199
- }, oe = {
200
- key: 1,
201
- class: "mb-4 flex justify-center text-secondary"
202
- }, se = {
203
- key: 0,
204
- class: "shrink-0 border-t border-outline-variant"
205
- }, ce = {
206
- key: 1,
207
- class: "flex flex-wrap justify-end gap-2 px-6 pt-4 pb-6"
208
- }, le = ["aria-labelledby", "aria-label"], ue = {
209
- key: 0,
210
- class: "min-h-0 flex-1 overflow-y-auto"
211
- }, de = {
212
- key: 1,
213
- class: "flex h-14 shrink-0 items-center gap-2 px-2"
214
- }, fe = {
215
- key: 1,
216
- class: "flex items-center gap-2"
217
- }, Z = {
218
- key: 2,
219
- class: "flex-1 overflow-y-auto px-6 py-4 text-body-medium text-on-surface-variant"
220
- }, pe = /*#__PURE__*/ c(/* @__PURE__ */ y({
221
- inheritAttrs: !1,
222
- __name: "MDialog",
223
- props: {
224
- modelValue: { type: Boolean },
225
- title: {},
226
- maxWidth: { default: "max-w-[560px]" },
227
- maxHeight: { default: "max-h-[90vh]" },
228
- persistent: {
229
- type: Boolean,
230
- default: !1
231
- },
232
- fullscreen: {
233
- type: Boolean,
234
- default: !1
235
- },
236
- closeLabel: {},
237
- closable: {
238
- type: Boolean,
239
- default: !0
240
- },
241
- bare: {
242
- type: Boolean,
243
- default: !1
244
- }
245
- },
246
- emits: ["update:modelValue"],
247
- setup(t, { emit: n }) {
248
- let r = t, i = e(), o = (e) => /^-?[\d.]+[a-z%]*$|^(calc|min|max|clamp|var)\(/i.test(e.trim()), s = f(() => [r.maxWidth, r.maxHeight].filter((e) => !o(e))), c = f(() => ({
249
- ...o(r.maxWidth) ? { maxWidth: r.maxWidth } : {},
250
- ...o(r.maxHeight) ? { maxHeight: r.maxHeight } : {}
251
- })), y = n;
252
- function b() {
253
- r.persistent || y("update:modelValue", !1);
254
- }
255
- let x = A(), T = A(), E = A(!1), D;
256
- function k() {
257
- let e = x.value;
258
- if (!e) {
259
- E.value = !1;
260
- return;
261
- }
262
- E.value = e.scrollHeight - e.scrollTop - e.clientHeight > 1;
263
- }
264
- V(() => r.modelValue), K(() => r.modelValue, b);
265
- let j = `m3-dialog-${re()}`;
266
- return P(() => r.modelValue, async (e) => {
267
- typeof window > "u" || (e ? (await C(), k(), D = new ResizeObserver(k), x.value && D.observe(x.value), T.value && D.observe(T.value)) : (D?.disconnect(), D = void 0));
268
- }, { immediate: !0 }), ee(() => {
269
- D?.disconnect();
270
- }), (e, n) => (O(), p(u, { to: "body" }, [t.fullscreen ? (O(), p(d, {
271
- key: 1,
272
- name: "m3-dialog-fs",
273
- appear: ""
274
- }, {
275
- default: F(() => [t.modelValue ? (O(), h("div", S({ key: 0 }, e.$attrs, {
276
- class: "dialog-fs m3-dialog-fs-surface fixed inset-0 z-50 flex flex-col",
277
- role: "dialog",
278
- "aria-modal": "true",
279
- "aria-labelledby": !t.bare && (e.$slots.title || t.title) ? j : void 0,
280
- "aria-label": t.bare ? t.title : void 0
281
- }), [t.bare ? (O(), h("div", ue, [M(e.$slots, "default", {}, void 0, !0)])) : (O(), h("div", de, [
282
- t.persistent ? m("", !0) : (O(), p(a, {
283
- key: 0,
284
- icon: "close",
285
- label: t.closeLabel ?? N(i).close,
286
- onClick: b
287
- }, null, 8, ["label"])),
288
- g("h2", {
289
- id: j,
290
- class: "flex-1 text-title-large font-medium text-on-surface"
291
- }, [M(e.$slots, "title", {}, () => [_(ne(t.title), 1)], !0)]),
292
- e.$slots.actions ? (O(), h("div", fe, [M(e.$slots, "actions", {}, void 0, !0)])) : m("", !0)
293
- ])), t.bare ? m("", !0) : (O(), h("div", Z, [M(e.$slots, "default", {}, void 0, !0)]))], 16, le)) : m("", !0)]),
294
- _: 3
295
- })) : (O(), p(d, {
296
- key: 0,
297
- name: "m3-dialog",
298
- appear: ""
299
- }, {
300
- default: F(() => [t.modelValue ? (O(), h("div", {
301
- key: 0,
302
- class: "fixed inset-0 z-50 flex items-center justify-center bg-scrim/32 p-4",
303
- onClick: L(b, ["self"])
304
- }, [g("div", S(e.$attrs, {
305
- class: ["dialog-box m3-dialog-surface flex min-w-[280px] w-full flex-col", s.value],
306
- style: c.value,
307
- role: "dialog",
308
- "aria-modal": "true",
309
- "aria-labelledby": !t.bare && (e.$slots.title || t.title) ? j : void 0,
310
- "aria-label": t.bare ? t.title : void 0
311
- }), [t.bare ? (O(), h("div", J, [M(e.$slots, "default", {}, void 0, !0)])) : (O(), h(l, { key: 1 }, [
312
- g("div", Y, [
313
- t.closable && !t.persistent ? (O(), h("div", X, [v(a, {
314
- icon: "close",
315
- label: t.closeLabel ?? N(i).close,
316
- onClick: b
317
- }, null, 8, ["label"])])) : m("", !0),
318
- e.$slots.icon ? (O(), h("div", oe, [M(e.$slots, "icon", {}, void 0, !0)])) : m("", !0),
319
- g("h2", {
320
- id: j,
321
- class: w(["text-headline-small text-on-surface", [e.$slots.icon ? "text-center" : "text-left", t.closable && !t.persistent ? e.$slots.icon ? "px-10" : "pr-10" : ""]])
322
- }, [M(e.$slots, "title", {}, () => [_(ne(t.title), 1)], !0)], 2)
323
- ]),
324
- g("div", {
325
- ref_key: "contentEl",
326
- ref: x,
327
- class: w(["overflow-y-auto px-6 pt-2 text-body-medium text-on-surface-variant", e.$slots.actions ? "pb-2" : "pb-6"]),
328
- onScroll: k
329
- }, [g("div", {
330
- ref_key: "contentInnerEl",
331
- ref: T
332
- }, [M(e.$slots, "default", {}, void 0, !0)], 512)], 34),
333
- E.value && e.$slots.actions ? (O(), h("div", se)) : m("", !0),
334
- e.$slots.actions ? (O(), h("div", ce, [M(e.$slots, "actions", {}, void 0, !0)])) : m("", !0)
335
- ], 64))], 16, q)])) : m("", !0)]),
336
- _: 3
337
- }))]));
338
- }
339
- }), [["__scopeId", "data-v-8f788bae"]]), me = { class: "my-1 border-outline-variant" }, he = /* @__PURE__ */ y({
340
- __name: "MMenuDivider",
341
- props: { gap: {
342
- type: Boolean,
343
- default: !1
344
- } },
345
- setup(e) {
346
- return (e, t) => (O(), h("hr", me));
347
- }
348
- });
349
- function Q(e, t, n, r = 8) {
350
- for (let i of e) if (i >= r && i + t <= n - r) return i;
351
- if (t >= n - 2 * r) return (n - t) / 2;
352
- let i = e[e.length - 1] ?? r;
353
- return Math.min(n - r - t, Math.max(r, i));
354
- }
355
- function ge(e, t, n, r, i = 8) {
356
- let a = e.left, o = e.right - t, s = (e.left + e.right) / 2 < n / 2 ? i : n - i - t;
357
- return Q(r === "start" ? [
358
- a,
359
- o,
360
- s
361
- ] : [
362
- o,
363
- a,
364
- s
365
- ], t, n, i);
366
- }
367
- //#endregion
368
- //#region src/components/MMenu.vue?vue&type=script&setup=true&lang.ts
369
- var _e = { class: "flex-1 truncate" }, ve = { key: "root" }, ye = {
370
- key: 0,
371
- class: "flex flex-col gap-1 px-1.5"
372
- }, be = { class: "overflow-hidden rounded-lg bg-surface-container" }, xe = 220, $ = 1 / 240, Se = /* @__PURE__ */ y({
373
- inheritAttrs: !1,
374
- __name: "MMenu",
375
- props: {
376
- align: { default: "right" },
377
- submenuMode: { default: "flyout" },
378
- variant: { default: "standard" }
379
- },
380
- setup(e, { expose: t }) {
381
- let n = e, r = ie();
382
- function i(e) {
383
- let t = [];
384
- for (let n of e) n.type === l && Array.isArray(n.children) ? t.push(...i(n.children)) : t.push(n);
385
- return t;
386
- }
387
- function a(e) {
388
- if (e.type !== he) return !1;
389
- let t = e.props?.gap;
390
- return t === "" || t === !0 || t === "true";
391
- }
392
- let o = f(() => {
393
- if (n.variant !== "expressive") return null;
394
- let e = i(r.default?.({ close: Z }) ?? []), t = [[]];
395
- for (let n of e) a(n) ? t.push([]) : t[t.length - 1].push(n);
396
- return t.filter((e) => e.length > 0);
397
- }), c = f(() => !!o.value && o.value.length > 1), _ = A([]), y = f(() => _.value[_.value.length - 1]), b = A("forward");
398
- function E(e, t) {
399
- let n = b.value === "forward" ? 1 : -1, r = e.animate([{
400
- transform: `translateX(${n * 100}%)`,
401
- opacity: .4
402
- }, {
403
- transform: "translateX(0%)",
404
- opacity: 1
405
- }], {
406
- duration: xe,
407
- easing: "cubic-bezier(0.05,0.7,0.1,1)"
408
- });
409
- r.onfinish = t;
410
- }
411
- function ne(e, t) {
412
- let n = b.value === "forward" ? -1 : 1, r = e;
413
- r.style.position = "absolute", r.style.insetInline = "0", r.style.top = "0";
414
- let i = r.animate([{
415
- transform: "translateX(0%)",
416
- opacity: 1
417
- }, {
418
- transform: `translateX(${n * 100}%)`,
419
- opacity: .4
420
- }], {
421
- duration: xe,
422
- easing: "cubic-bezier(0.3,0,0.8,0.15)"
423
- });
424
- i.onfinish = t;
425
- }
426
- let N = null;
427
- function re() {
428
- if (N) return N;
429
- let e = [], t = .8, n = 0, r = 0, i = 0;
430
- for (let a = 0; a < 1 && (e.push({
431
- scale: t,
432
- alpha: r
433
- }), n += (-1400 * (t - 1) - 1.8 * Math.sqrt(1400) * n) * $, t += n * $, i += (-3800 * (r - 1) - 2 * Math.sqrt(3800) * i) * $, r += i * $, !(Math.abs(t - 1) < .003 && Math.abs(r - 1) < .003)); a += $);
434
- return e.push({
435
- scale: 1,
436
- alpha: 1
437
- }), N = e, e;
438
- }
439
- let I = 0, L = null, R = null;
440
- function ae(e, t, n) {
441
- L?.();
442
- let r = e, i = re(), a = i.length - 1, o = Math.round(Math.max(0, Math.min(a, I))), s = n ? a : 0, c = n ? 1 : -1, l = [];
443
- for (let e = o; n ? e <= s : e >= s; e += c) l.push(i[e]);
444
- let u = (e) => ({
445
- transform: `scale(${e.scale})`,
446
- opacity: String(Math.min(1, Math.max(0, e.alpha)))
447
- });
448
- Object.assign(r.style, u(i[s]));
449
- let d = !1;
450
- function f() {
451
- d || (d = !0, I = s, L = null, R = null, t());
452
- }
453
- if (l.length < 2 || typeof r.animate != "function") return f();
454
- let p = r.animate(l.map(u), {
455
- duration: (l.length - 1) * $ * 1e3,
456
- easing: "linear"
457
- });
458
- p.finished.catch(() => {}), p.onfinish = f, L = () => {
459
- let e = Number(p.currentTime ?? 0) / ($ * 1e3);
460
- I = Math.max(0, Math.min(a, o + c * e)), d = !0, p.cancel();
461
- }, R = n ? null : () => {
462
- L?.(), L = null, R = null, t();
463
- };
464
- }
465
- function z(e, t) {
466
- ce(e), ae(e, t, !0);
467
- }
468
- function B(e, t) {
469
- ae(e, t, !1);
470
- }
471
- function V(e) {
472
- b.value = "forward", _.value.push(e), C(() => ue());
473
- }
474
- function H() {
475
- b.value = "backward", _.value.pop(), C(() => ue());
476
- }
477
- let U = A(!1), W = A(null), G = A(null), K = A({}), q = x("m-menu-panel-registry", /* @__PURE__ */ new Set());
478
- k("m-menu-panel-registry", q), P(G, (e, t) => {
479
- t && q.delete(t), e && q.add(e);
480
- }), ee(() => {
481
- G.value && q.delete(G.value);
482
- });
483
- let J = x("m-menu-sibling-group", null);
484
- k("m-menu-sibling-group", { current: null });
485
- let Y = null, X = A(!1);
486
- function oe() {
487
- if (!W.value) return;
488
- let e = W.value.getBoundingClientRect();
489
- Y = e;
490
- let t = window.innerHeight - e.bottom - 8;
491
- X.value = t < 200 && e.top > t;
492
- let n = {
493
- maxHeight: `${Math.min(X.value ? e.top - 12 : t, 400)}px`,
494
- maxWidth: `${window.innerWidth - 16}px`,
495
- left: "0px"
496
- };
497
- X.value ? n.bottom = `${window.innerHeight - e.top + 4}px` : n.top = `${e.bottom + 4}px`, K.value = n;
498
- }
499
- let se = A(n.align === "right" ? "right" : "left");
500
- function ce(e) {
501
- if (!Y) return;
502
- let t = e.offsetWidth, r = ge(Y, t, window.innerWidth, n.align === "right" ? "end" : "start"), i = Math.min(t, Math.max(0, (Y.left + Y.right) / 2 - r)), a = Math.abs(r - Y.left) < 1 ? "left" : Math.abs(r + t - Y.right) < 1 ? "right" : `${i}px`;
503
- se.value = a, K.value = {
504
- ...K.value,
505
- left: `${r}px`
506
- }, e.style.left = `${r}px`, e.style.transformOrigin = `${a} ${X.value ? "bottom" : "top"}`;
507
- }
508
- function le() {
509
- return G.value ? Array.from(G.value.querySelectorAll("button:not(:disabled), a[href]")) : [];
510
- }
511
- function ue() {
512
- C(() => le()[0]?.focus());
513
- }
514
- function de(e) {
515
- let t = le();
516
- if (!t.length) return;
517
- let n = t.indexOf(document.activeElement);
518
- (n === -1 ? e === 1 ? t[0] : t[t.length - 1] : t[(n + e + t.length) % t.length])?.focus();
519
- }
520
- function fe() {
521
- U.value ? J?.current === Z && (J.current = null) : (J && J.current && J.current !== Z && J.current(), J && (J.current = Z), oe(), _.value = []), U.value = !U.value, U.value && ue();
522
- }
523
- function Z() {
524
- J?.current === Z && (J.current = null), U.value = !1;
525
- }
526
- k("m-menu-close", Z), k("m-menu-nav", {
527
- mode: n.submenuMode,
528
- push: V
529
- }), t({
530
- close: Z,
531
- open: U
532
- });
533
- function pe(e) {
534
- let t = e.target;
535
- if (!W.value?.contains(t)) {
536
- for (let e of q) if (e.contains(t)) return;
537
- t.closest?.(".m3-submenu") || Z();
538
- }
539
- }
540
- function me(e) {
541
- if (!U.value) return;
542
- let t = e.target;
543
- for (let e of q) if (e.contains(t)) return;
544
- t.closest?.(".m3-submenu") || Z();
545
- }
546
- function Q(e) {
547
- if (e.key === "Escape") {
548
- _.value.length ? H() : Z();
549
- return;
550
- }
551
- U.value && (e.key === "ArrowDown" ? (e.preventDefault(), de(1)) : e.key === "ArrowUp" && (e.preventDefault(), de(-1)));
552
- }
553
- D(() => {
554
- document.addEventListener("mousedown", pe), document.addEventListener("keydown", Q), window.addEventListener("scroll", me, !0);
555
- }), ee(() => {
556
- document.removeEventListener("mousedown", pe), document.removeEventListener("keydown", Q), window.removeEventListener("scroll", me, !0), R ? R() : L?.();
557
- });
558
- let Se = f(() => `${se.value} ${X.value ? "bottom" : "top"}`);
559
- return (t, n) => (O(), h(l, null, [g("div", S({
560
- ref_key: "triggerEl",
561
- ref: W
562
- }, t.$attrs, {
563
- class: "inline-block",
564
- onClick: fe
565
- }), [M(t.$slots, "trigger", { open: U.value })], 16), (O(), p(u, { to: "body" }, [v(d, {
566
- css: !1,
567
- onEnter: z,
568
- onLeave: B
569
- }, {
570
- default: F(() => [U.value ? (O(), h("div", {
571
- key: 0,
572
- ref_key: "dropdownEl",
573
- ref: G,
574
- class: w(["fixed z-500 min-w-48", [e.variant === "expressive" ? "rounded-lg" : "rounded-xs", c.value ? "" : "shadow-elevation-2"]]),
575
- style: T({
576
- ...K.value,
577
- transformOrigin: Se.value
578
- })
579
- }, [g("div", { class: w(["overflow-hidden", [e.variant === "expressive" ? "rounded-lg" : "rounded-xs", c.value ? "" : "bg-surface-container"]]) }, [g("div", {
580
- class: "relative overflow-y-auto overscroll-contain py-1",
581
- style: T({ maxHeight: K.value.maxHeight })
582
- }, [v(d, {
583
- css: !1,
584
- onEnter: E,
585
- onLeave: ne
586
- }, {
587
- default: F(() => [y.value ? (O(), h("div", { key: _.value.length }, [g("button", {
588
- type: "button",
589
- class: "flex w-full items-center gap-3 border-b border-outline-variant px-4 py-2.5 text-left text-body-large text-on-surface outline-none transition-colors hover:bg-on-surface/8 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-secondary",
590
- onClick: H
591
- }, [
592
- v(s, {
593
- name: "chevron_left",
594
- size: 20,
595
- class: "shrink-0 text-on-surface-variant"
596
- }),
597
- y.value.icon ? (O(), p(s, {
598
- key: 0,
599
- name: y.value.icon,
600
- size: 20,
601
- class: "shrink-0 text-on-surface-variant"
602
- }, null, 8, ["name"])) : m("", !0),
603
- g("span", _e, [(O(), p(te(() => y.value?.header?.())))])
604
- ]), (O(), p(te(() => y.value?.content?.())))])) : (O(), h("div", ve, [c.value ? (O(), h("div", ye, [(O(!0), h(l, null, j(o.value, (e, t) => (O(), h("div", {
605
- key: t,
606
- class: "rounded-lg shadow-elevation-2"
607
- }, [g("div", be, [(O(), p(te(() => e)))])]))), 128))])) : M(t.$slots, "default", { close: Z }, void 0, void 0, 1)]))]),
608
- _: 3
609
- })], 4)], 2)], 6)) : m("", !0)]),
610
- _: 3
611
- })]))], 64));
612
- }
613
- }), Ce = ["data-m3-menu-choice"], we = { class: "flex-1" }, Te = {
614
- key: 2,
615
- class: "ml-4 shrink-0 text-label-small text-on-surface-variant opacity-60"
616
- }, Ee = { class: "overflow-hidden rounded-xs bg-surface-container py-1" }, De = 32, Oe = /* @__PURE__ */ y({
617
- __name: "MMenuItem",
618
- props: {
619
- icon: {},
620
- shortcut: {},
621
- to: {},
622
- disabled: {
623
- type: Boolean,
624
- default: !1
625
- },
626
- danger: {
627
- type: Boolean,
628
- default: !1
629
- },
630
- keepOpen: {
631
- type: Boolean,
632
- default: void 0
633
- },
634
- selected: {
635
- type: Boolean,
636
- default: void 0
637
- },
638
- checked: {
639
- type: Boolean,
640
- default: void 0
641
- },
642
- selectedIcon: {}
643
- },
644
- emits: ["click", "update:checked"],
645
- setup(e, { emit: r }) {
646
- let i = e, a = r, c = f(() => i.checked !== void 0), l = f(() => c.value || i.selected !== void 0), _ = f(() => !!(i.checked ?? i.selected)), y = f(() => l.value && !i.icon), b = f(() => i.selectedIcon ?? (i.icon ? void 0 : "check")), S = A("single");
647
- function E() {
648
- let e = B.value;
649
- if (!e || !l.value) return;
650
- let t = (e) => !!e?.hasAttribute("data-m3-menu-choice"), n = t(e.previousElementSibling), r = t(e.nextElementSibling);
651
- S.value = n && r ? "middle" : n ? "last" : r ? "first" : "single";
652
- }
653
- function k() {
654
- if (_.value) return [
655
- 12,
656
- 12,
657
- 12,
658
- 12
659
- ];
660
- let e = S.value === "first" ? 12 : 4, t = S.value === "last" ? 12 : 4;
661
- return [
662
- e,
663
- e,
664
- t,
665
- t
666
- ];
667
- }
668
- let { snap: j } = n(() => l.value ? [...k(), y.value && _.value ? De : 0] : [], ([e, t, n, r, i]) => {
669
- let a = V.value instanceof HTMLElement ? V.value : V.value?.$el;
670
- a && r !== void 0 && (a.style.borderRadius = `${e}px ${t}px ${n}px ${r}px`), H.value && i !== void 0 && (H.value.style.width = `${i}px`);
671
- }, o);
672
- P(S, () => j());
673
- let re = null;
674
- D(() => {
675
- E();
676
- let e = B.value?.parentElement;
677
- e && (re = new MutationObserver(E), re.observe(e, { childList: !0 }));
678
- }), ee(() => re?.disconnect()), P(l, () => C(E)), n(() => y.value ? [+!!_.value] : [], ([e]) => {
679
- H.value && e !== void 0 && (H.value.style.opacity = String(e));
680
- }, t);
681
- let I = ie(), L = f(() => i.to ? "RouterLink" : "button"), R = f(() => !!I.children), ae = x("m-menu-close", null), z = x("m-menu-nav", null), B = A(), V = A(), H = A(), U = A(!1), W = A({});
682
- function G() {
683
- if (!B.value) return;
684
- let e = B.value.getBoundingClientRect();
685
- W.value = {
686
- position: "fixed",
687
- top: `${e.top}px`,
688
- left: `${e.right}px`,
689
- maxWidth: `${window.innerWidth - 16}px`,
690
- zIndex: "501"
691
- };
692
- }
693
- function K(e) {
694
- if (!B.value) return;
695
- let t = e, n = B.value.getBoundingClientRect();
696
- t.style.left = "0px";
697
- let r = t.offsetWidth, i = t.offsetHeight, a = Q([n.right, n.left - r], r, window.innerWidth), o = Q([n.top, n.bottom - i], i, window.innerHeight);
698
- W.value = {
699
- ...W.value,
700
- left: `${a}px`,
701
- top: `${o}px`
702
- }, t.style.left = `${a}px`, t.style.top = `${o}px`;
703
- }
704
- function q() {
705
- if (U.value) {
706
- U.value = !1;
707
- return;
708
- }
709
- G(), U.value = !0;
710
- }
711
- function J() {
712
- if (!i.disabled) {
713
- if (R.value) {
714
- z?.mode === "push" ? z.push({
715
- icon: i.icon,
716
- header: I.default,
717
- content: I.children
718
- }) : q();
719
- return;
720
- }
721
- c.value && a("update:checked", !i.checked), a("click"), (i.keepOpen ?? c.value) || ae?.();
722
- }
723
- }
724
- function Y(e) {
725
- e.pointerType === "mouse" && R.value && !i.disabled && (G(), U.value = !0);
726
- }
727
- function X(e) {
728
- e.pointerType === "mouse" && (e.relatedTarget?.closest(".m3-submenu") || (U.value = !1));
729
- }
730
- function oe(e) {
731
- if (e.pointerType !== "mouse") return;
732
- let t = e.relatedTarget;
733
- t?.closest(".m3-submenu") || B.value?.contains(t) || (U.value = !1);
734
- }
735
- return (t, n) => (O(), h("div", {
736
- ref_key: "itemEl",
737
- ref: B,
738
- "data-m3-menu-choice": l.value || void 0,
739
- onPointerenter: Y,
740
- onPointerleave: X
741
- }, [(O(), p(te(L.value), {
742
- ref_key: "controlEl",
743
- ref: V,
744
- to: e.to || void 0,
745
- type: e.to ? void 0 : "button",
746
- role: l.value ? c.value ? "menuitemcheckbox" : "menuitemradio" : void 0,
747
- "aria-checked": l.value ? _.value : void 0,
748
- 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", l.value ? [
749
- "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",
750
- _.value ? "bg-tertiary-container text-on-tertiary-container" : "text-on-surface",
751
- e.disabled ? "cursor-not-allowed opacity-[0.38]" : "cursor-pointer hover:before:opacity-[0.08] active:before:opacity-[0.12]"
752
- ] : [
753
- "w-full px-4",
754
- e.disabled ? "cursor-not-allowed opacity-[0.38] text-on-surface" : "cursor-pointer",
755
- !e.disabled && e.danger ? "text-error hover:bg-error/8" : "",
756
- !e.disabled && !e.danger ? "text-on-surface hover:bg-on-surface/8" : ""
757
- ]]),
758
- disabled: e.disabled || void 0,
759
- "aria-haspopup": R.value ? "menu" : void 0,
760
- "aria-expanded": R.value ? U.value : void 0,
761
- onClick: J
762
- }, {
763
- default: F(() => [
764
- y.value ? (O(), h("span", {
765
- key: 0,
766
- ref_key: "iconSlotEl",
767
- ref: H,
768
- class: "-mr-3 flex shrink-0 overflow-hidden",
769
- style: {
770
- width: "0",
771
- opacity: "0"
772
- }
773
- }, [v(s, {
774
- name: b.value,
775
- size: 20,
776
- class: "shrink-0"
777
- }, null, 8, ["name"])], 512)) : e.icon ? (O(), p(s, {
778
- key: 1,
779
- name: _.value && b.value ? b.value : e.icon,
780
- filled: _.value && !b.value,
781
- size: 20,
782
- class: w(["shrink-0", l.value ? _.value ? "" : "text-on-surface-variant" : e.danger ? "text-error" : "text-on-surface-variant"])
783
- }, null, 8, [
784
- "name",
785
- "filled",
786
- "class"
787
- ])) : m("", !0),
788
- g("span", we, [M(t.$slots, "default")]),
789
- e.shortcut && !R.value ? (O(), h("span", Te, ne(e.shortcut), 1)) : m("", !0),
790
- R.value ? (O(), p(s, {
791
- key: 3,
792
- name: "chevron_right",
793
- size: 18,
794
- class: "shrink-0 text-on-surface-variant"
795
- })) : m("", !0)
796
- ]),
797
- _: 3
798
- }, 8, [
799
- "to",
800
- "type",
801
- "role",
802
- "aria-checked",
803
- "class",
804
- "disabled",
805
- "aria-haspopup",
806
- "aria-expanded"
807
- ])), R.value && N(z)?.mode !== "push" ? (O(), p(u, {
808
- key: 0,
809
- to: "body"
810
- }, [v(d, {
811
- "enter-active-class": "transition-opacity duration-100",
812
- "enter-from-class": "opacity-0",
813
- "leave-active-class": "transition-opacity duration-75",
814
- "leave-to-class": "opacity-0",
815
- onEnter: K
816
- }, {
817
- default: F(() => [U.value ? (O(), h("div", {
818
- key: 0,
819
- class: "m3-submenu min-w-44 rounded-xs shadow-elevation-2",
820
- style: T(W.value),
821
- onPointerleave: oe
822
- }, [g("div", Ee, [M(t.$slots, "children")])], 36)) : m("", !0)]),
823
- _: 3
824
- })])) : m("", !0)], 40, Ce));
825
- }
826
- });
827
- //#endregion
828
- export { he as a, U as c, Q as i, V as l, Se as n, pe as o, ge as r, K as s, Oe as t };
829
-
830
- //# sourceMappingURL=MMenuItem-BfjqwcYP.js.map