@m3ui-vue/m3ui-vue 1.10.2 → 1.11.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 (301) hide show
  1. package/README.md +19 -4
  2. package/dist/API.md +204 -59
  3. package/dist/MButton-BHKF1Tfd.js +284 -0
  4. package/dist/MButton-BHKF1Tfd.js.map +1 -0
  5. package/dist/MColorPickerModal-CNesUJUq.js +466 -0
  6. package/dist/MColorPickerModal-CNesUJUq.js.map +1 -0
  7. package/dist/MDialog-jAYkZ4M8.js +226 -0
  8. package/dist/MDialog-jAYkZ4M8.js.map +1 -0
  9. package/dist/{MIcon-BSsJZhK7.js → MIcon-CkUc9kuQ.js} +10 -4
  10. package/dist/MIcon-CkUc9kuQ.js.map +1 -0
  11. package/dist/MIconButton-DTFOfsTy.js +317 -0
  12. package/dist/MIconButton-DTFOfsTy.js.map +1 -0
  13. package/dist/MListItem-CgdM5sco.js +1306 -0
  14. package/dist/MListItem-CgdM5sco.js.map +1 -0
  15. package/dist/MLoadingIndicator-00XbLQSf.js +115 -0
  16. package/dist/MLoadingIndicator-00XbLQSf.js.map +1 -0
  17. package/dist/{MMenuItem-US0Zbglq.js → MMenuItem-CEIKYvaX.js} +216 -214
  18. package/dist/MMenuItem-CEIKYvaX.js.map +1 -0
  19. package/dist/{MPdfViewer-DL9mRsd2.js → MPdfViewer-KjUIJOIs.js} +674 -671
  20. package/dist/MPdfViewer-KjUIJOIs.js.map +1 -0
  21. package/dist/MProgressBar-BzZMxq7M.js.map +1 -1
  22. package/dist/MSeekBar-B4EEWw3B.js +435 -0
  23. package/dist/MSeekBar-B4EEWw3B.js.map +1 -0
  24. package/dist/{MSegmentedButton-DMou-8sG.js → MSegmentedButton-UOAJAd2i.js} +4 -4
  25. package/dist/{MSegmentedButton-DMou-8sG.js.map → MSegmentedButton-UOAJAd2i.js.map} +1 -1
  26. package/dist/{MSignaturePad-WuvE_Cyl.js → MSignaturePad-HZavgiGB.js} +2 -2
  27. package/dist/{MSignaturePad-WuvE_Cyl.js.map → MSignaturePad-HZavgiGB.js.map} +1 -1
  28. package/dist/{MSlider-7TzhFHKS.js → MSlider-BaQeaozI.js} +4 -4
  29. package/dist/{MSlider-7TzhFHKS.js.map → MSlider-BaQeaozI.js.map} +1 -1
  30. package/dist/{MSpinner-CkIVBuGE.js → MSpinner-CbEMPY4X.js} +2 -2
  31. package/dist/{MSpinner-CkIVBuGE.js.map → MSpinner-CbEMPY4X.js.map} +1 -1
  32. package/dist/{MTextField-B6_iOczK.js → MTextField-B9PwKHlP.js} +136 -134
  33. package/dist/MTextField-B9PwKHlP.js.map +1 -0
  34. package/dist/{_useFieldValidation-COBJ1tWr.js → _useFieldValidation-B7AAfa69.js} +2 -2
  35. package/dist/{_useFieldValidation-COBJ1tWr.js.map → _useFieldValidation-B7AAfa69.js.map} +1 -1
  36. package/dist/api.json +1 -1
  37. package/dist/chart.js +1 -1
  38. package/dist/code-editor.js +3 -3
  39. package/dist/code-editor.js.map +1 -1
  40. package/dist/components/MAlert.vue.d.ts +1 -1
  41. package/dist/components/MAudioPlayer.vue.d.ts +3 -3
  42. package/dist/components/MAudioRecorder.vue.d.ts +2 -2
  43. package/dist/components/MAvatar.vue.d.ts +19 -1
  44. package/dist/components/MButton.vue.d.ts +2 -1
  45. package/dist/components/MChatBubble.vue.d.ts +2 -0
  46. package/dist/components/MCheckbox.vue.d.ts +2 -0
  47. package/dist/components/MDataTable.vue.d.ts +33 -5
  48. package/dist/components/MFlow.vue.d.ts +1 -1
  49. package/dist/components/MHotkeys.vue.d.ts +1 -0
  50. package/dist/components/MIcon.vue.d.ts +6 -0
  51. package/dist/components/MIconButton.vue.d.ts +5 -0
  52. package/dist/components/MJsonViewer.vue.d.ts +2 -0
  53. package/dist/components/MKanban.vue.d.ts +1 -1
  54. package/dist/components/MLink.vue.d.ts +59 -0
  55. package/dist/components/MListItem.vue.d.ts +3 -1
  56. package/dist/components/MMapControl.vue.d.ts +1 -1
  57. package/dist/components/MNotificationCenter.vue.d.ts +1 -1
  58. package/dist/components/MNumberField.vue.d.ts +1 -1
  59. package/dist/components/MPagination.vue.d.ts +14 -1
  60. package/dist/components/MPdfSigner.vue.d.ts +3 -3
  61. package/dist/components/MRadio.vue.d.ts +2 -0
  62. package/dist/components/MRadioGroup.vue.d.ts +2 -0
  63. package/dist/components/MStatCard.vue.d.ts +2 -2
  64. package/dist/components/MSwitch.vue.d.ts +2 -0
  65. package/dist/components/MTable.vue.d.ts +1 -1
  66. package/dist/components/MText.vue.d.ts +4 -2
  67. package/dist/components/MTextField.vue.d.ts +2 -0
  68. package/dist/components/MTicket.vue.d.ts +1 -1
  69. package/dist/components/_MDrawerItemList.vue.d.ts +6 -0
  70. package/dist/composables/_countLabel.d.ts +6 -0
  71. package/dist/composables/_menuGroups.d.ts +10 -1
  72. package/dist/composables/_splitAttrs.d.ts +6 -0
  73. package/dist/composables/_springAnimation.d.ts +2 -2
  74. package/dist/composables/_useFocusTrap.d.ts +15 -0
  75. package/dist/composables/_usePaneResize.d.ts +1 -1
  76. package/dist/composables/_useSpring.d.ts +4 -4
  77. package/dist/composables/dynamicColor.d.ts +9 -1
  78. package/dist/composables/motion.d.ts +63 -0
  79. package/dist/composables/useConfirm.d.ts +28 -0
  80. package/dist/composables/useDevice.d.ts +8 -1
  81. package/dist/composables/useLocale.d.ts +18 -0
  82. package/dist/composables/useScrollReveal.d.ts +1 -1
  83. package/dist/composables/useTheme.d.ts +1 -0
  84. package/dist/composables/useToast.d.ts +7 -0
  85. package/dist/draw.js +556 -556
  86. package/dist/draw.js.map +1 -1
  87. package/dist/flow.js +854 -851
  88. package/dist/flow.js.map +1 -1
  89. package/dist/gantt.js +1118 -1096
  90. package/dist/gantt.js.map +1 -1
  91. package/dist/index.d.ts +8 -5
  92. package/dist/locales/index.d.ts +1 -0
  93. package/dist/locales/index.js +865 -33
  94. package/dist/locales/index.js.map +1 -1
  95. package/dist/locales/pl.d.ts +2 -0
  96. package/dist/m3ui-vue.css +1 -1
  97. package/dist/m3ui.js +10335 -9798
  98. package/dist/m3ui.js.map +1 -1
  99. package/dist/map.js +860 -860
  100. package/dist/map.js.map +1 -1
  101. package/dist/{material-color-utilities-CEFytLsr.js → material-color-utilities-BZsBNIhi.js} +276 -217
  102. package/dist/material-color-utilities-BZsBNIhi.js.map +1 -0
  103. package/dist/media.js +7 -7
  104. package/dist/{motion-BcejVTeX.js → motion-BqYcqcim.js} +15 -5
  105. package/dist/motion-BqYcqcim.js.map +1 -0
  106. package/dist/pdf-sign.js +140 -137
  107. package/dist/pdf-sign.js.map +1 -1
  108. package/dist/pdf.js +1 -1
  109. package/dist/plugin.d.ts +11 -0
  110. package/dist/rich-text-editor.js +7 -7
  111. package/dist/styles/theme.css +40 -0
  112. package/dist/styles.css +1 -1
  113. package/dist/terminal.js +1 -1
  114. package/dist/{useLocale-YRaOT12S.js → useLocale-BAPJ34Pq.js} +64 -8
  115. package/dist/useLocale-BAPJ34Pq.js.map +1 -0
  116. package/dist/{useThemeTokens-DyAdPQB0.js → useThemeTokens-D5nr5KHf.js} +28 -27
  117. package/dist/useThemeTokens-D5nr5KHf.js.map +1 -0
  118. package/package.json +17 -2
  119. package/src/__tests__/MAvatarImage.test.ts +37 -0
  120. package/src/__tests__/MDataTableControlled.test.ts +68 -0
  121. package/src/__tests__/MHotkeysSequence.test.ts +53 -0
  122. package/src/__tests__/MIconAxes.test.ts +16 -0
  123. package/src/__tests__/MIconButtonWidth.test.ts +22 -0
  124. package/src/__tests__/MLink.test.ts +46 -0
  125. package/src/__tests__/MPaginationPages.test.ts +43 -0
  126. package/src/__tests__/MTextEmphasized.test.ts +14 -0
  127. package/src/__tests__/controlDescription.test.ts +34 -0
  128. package/src/__tests__/countLabels.test.ts +66 -0
  129. package/src/__tests__/customColor.test.ts +27 -0
  130. package/src/__tests__/dynamicColor.test.ts +3 -2
  131. package/src/__tests__/focusTrap.test.ts +124 -0
  132. package/src/__tests__/formatMessage.test.ts +20 -0
  133. package/src/__tests__/inputAttrs.test.ts +103 -0
  134. package/src/__tests__/localePresets.test.ts +2 -0
  135. package/src/__tests__/menuGroupsRemount.test.ts +40 -0
  136. package/src/__tests__/menuHydration.test.ts +41 -0
  137. package/src/__tests__/motionPrefs.test.ts +28 -0
  138. package/src/__tests__/ssr.test.ts +11 -0
  139. package/src/__tests__/ssrToast.test.ts +20 -0
  140. package/src/__tests__/toastDetails.test.ts +39 -0
  141. package/src/__tests__/useConfirm.test.ts +47 -0
  142. package/src/__tests__/useTheme.test.ts +14 -0
  143. package/src/__tests__/warningRole.test.ts +22 -0
  144. package/src/components/MAlert.vue +2 -2
  145. package/src/components/MAnimatedNumber.vue +9 -3
  146. package/src/components/MAutocomplete.vue +16 -4
  147. package/src/components/MAvailabilityCalendar.vue +3 -3
  148. package/src/components/MAvatar.vue +32 -5
  149. package/src/components/MAvatarGroup.vue +7 -2
  150. package/src/components/MBottomSheet.vue +18 -2
  151. package/src/components/MButton.vue +18 -5
  152. package/src/components/MCarousel.vue +3 -3
  153. package/src/components/MChatBubble.vue +14 -1
  154. package/src/components/MCheckbox.vue +21 -4
  155. package/src/components/MChip.vue +4 -2
  156. package/src/components/MCollapse.vue +7 -1
  157. package/src/components/MCommandPalette.vue +6 -2
  158. package/src/components/MContextMenu.vue +4 -4
  159. package/src/components/MCreditCardInput.vue +5 -0
  160. package/src/components/MDashboardGrid.vue +2 -1
  161. package/src/components/MDataTable.vue +68 -20
  162. package/src/components/MDialog.vue +21 -3
  163. package/src/components/MDiffViewer.vue +3 -3
  164. package/src/components/MDrawLayers.vue +3 -3
  165. package/src/components/MFabMenu.vue +7 -0
  166. package/src/components/MFloorPlan.vue +3 -3
  167. package/src/components/MFloorPlanInspector.vue +3 -3
  168. package/src/components/MFlow.vue +9 -5
  169. package/src/components/MFlowControls.vue +6 -0
  170. package/src/components/MFormBuilder.vue +1 -1
  171. package/src/components/MGantt.vue +10 -10
  172. package/src/components/MHotkeys.vue +61 -16
  173. package/src/components/MIcon.vue +17 -1
  174. package/src/components/MIconButton.vue +29 -6
  175. package/src/components/MImageCropper.vue +1 -1
  176. package/src/components/MJsonViewer.vue +4 -1
  177. package/src/components/MKanban.vue +2 -1
  178. package/src/components/MLightbox.vue +5 -4
  179. package/src/components/MLink.vue +136 -0
  180. package/src/components/MListDetail.vue +7 -0
  181. package/src/components/MListItem.vue +7 -4
  182. package/src/components/MLoadingIndicator.vue +2 -1
  183. package/src/components/MMap.vue +3 -0
  184. package/src/components/MMapCluster.vue +2 -2
  185. package/src/components/MMapControl.vue +2 -2
  186. package/src/components/MMapMeasure.vue +1 -1
  187. package/src/components/MMaskField.vue +16 -3
  188. package/src/components/MMenu.vue +4 -4
  189. package/src/components/MMenuItem.vue +2 -2
  190. package/src/components/MMeterGroup.vue +3 -2
  191. package/src/components/MMortgageCalculator.vue +3 -3
  192. package/src/components/MMultiAutocomplete.vue +19 -7
  193. package/src/components/MMultiSelect.vue +19 -7
  194. package/src/components/MNavigationDrawer.vue +10 -3
  195. package/src/components/MNavigationRail.vue +5 -1
  196. package/src/components/MNotificationCenter.vue +2 -1
  197. package/src/components/MNotificationHost.vue +3 -3
  198. package/src/components/MNumberField.vue +23 -6
  199. package/src/components/MOdontogram.vue +4 -4
  200. package/src/components/MOrderBook.vue +4 -0
  201. package/src/components/MPagination.vue +91 -12
  202. package/src/components/MPdfSigner.vue +3 -3
  203. package/src/components/MPdfViewer.vue +7 -7
  204. package/src/components/MPhoneInput.vue +17 -4
  205. package/src/components/MProductConfigurator.vue +4 -4
  206. package/src/components/MProgressBar.vue +5 -0
  207. package/src/components/MQuiz.vue +8 -5
  208. package/src/components/MRadio.vue +24 -5
  209. package/src/components/MRadioGroup.vue +3 -0
  210. package/src/components/MReactions.vue +2 -2
  211. package/src/components/MResourceTimeline.vue +3 -3
  212. package/src/components/MResult.vue +1 -1
  213. package/src/components/MScrollField.vue +1 -1
  214. package/src/components/MSearchField.vue +6 -5
  215. package/src/components/MSeatMap.vue +5 -0
  216. package/src/components/MSeekBar.vue +3 -2
  217. package/src/components/MSelect.vue +16 -4
  218. package/src/components/MSideSheet.vue +25 -3
  219. package/src/components/MSimpleCarousel.vue +2 -2
  220. package/src/components/MSnackbar.vue +16 -13
  221. package/src/components/MSparkline.vue +2 -1
  222. package/src/components/MSpinner.vue +8 -0
  223. package/src/components/MSplitter.vue +1 -1
  224. package/src/components/MSpotlightSearch.vue +6 -2
  225. package/src/components/MSpreadsheet.vue +1 -1
  226. package/src/components/MStatCard.vue +2 -1
  227. package/src/components/MSwitch.vue +21 -4
  228. package/src/components/MTable.vue +3 -2
  229. package/src/components/MTabs.vue +2 -1
  230. package/src/components/MTagInput.vue +19 -6
  231. package/src/components/MText.vue +23 -4
  232. package/src/components/MTextField.vue +25 -6
  233. package/src/components/MTimeline.vue +5 -5
  234. package/src/components/MToolbar.vue +2 -2
  235. package/src/components/MTour.vue +3 -0
  236. package/src/components/MTrackingTimeline.vue +6 -0
  237. package/src/components/MTypewriter.vue +7 -1
  238. package/src/components/MWindow.vue +10 -1
  239. package/src/components/_MColorPanel.vue +4 -4
  240. package/src/components/_MComment.vue +3 -2
  241. package/src/components/_MFlowNodeShell.vue +1 -1
  242. package/src/components/_MPdfPage.vue +1 -1
  243. package/src/components/_MTransferPane.vue +10 -0
  244. package/src/composables/_countLabel.ts +10 -0
  245. package/src/composables/_effectCanvas.ts +2 -1
  246. package/src/composables/_menuGroups.ts +10 -1
  247. package/src/composables/_splitAttrs.ts +29 -0
  248. package/src/composables/_springAnimation.ts +3 -3
  249. package/src/composables/_themeTransition.ts +3 -2
  250. package/src/composables/_useFocusTrap.ts +142 -0
  251. package/src/composables/_useMenuNav.ts +3 -3
  252. package/src/composables/_usePaneResize.ts +2 -1
  253. package/src/composables/_useSheetMotion.ts +3 -4
  254. package/src/composables/_useSpring.ts +16 -10
  255. package/src/composables/cron.ts +7 -6
  256. package/src/composables/dynamicColor.ts +21 -2
  257. package/src/composables/motion.ts +27 -0
  258. package/src/composables/useConfirm.ts +116 -0
  259. package/src/composables/useDevice.ts +23 -3
  260. package/src/composables/useFieldBg.ts +4 -0
  261. package/src/composables/useLocale.ts +82 -4
  262. package/src/composables/useNotification.ts +3 -0
  263. package/src/composables/useScrollReveal.ts +3 -3
  264. package/src/composables/useTheme.ts +8 -2
  265. package/src/composables/useToast.ts +27 -4
  266. package/src/directives/vSparkle.ts +2 -1
  267. package/src/index.ts +8 -5
  268. package/src/locales/ar.ts +11 -4
  269. package/src/locales/de.ts +11 -4
  270. package/src/locales/es.ts +11 -4
  271. package/src/locales/fr.ts +11 -4
  272. package/src/locales/index.ts +1 -0
  273. package/src/locales/ja.ts +11 -4
  274. package/src/locales/ko.ts +11 -4
  275. package/src/locales/pl.ts +807 -0
  276. package/src/locales/pt.ts +11 -4
  277. package/src/locales/zh.ts +11 -4
  278. package/src/plugin.ts +16 -0
  279. package/src/styles/theme.css +40 -0
  280. package/dist/MButton-B9RCM06i.js +0 -171
  281. package/dist/MButton-B9RCM06i.js.map +0 -1
  282. package/dist/MColorPickerModal-ChRtcZOo.js +0 -577
  283. package/dist/MColorPickerModal-ChRtcZOo.js.map +0 -1
  284. package/dist/MDialog-dk07tify.js +0 -167
  285. package/dist/MDialog-dk07tify.js.map +0 -1
  286. package/dist/MIcon-BSsJZhK7.js.map +0 -1
  287. package/dist/MIconButton-CrBPZidd.js +0 -288
  288. package/dist/MIconButton-CrBPZidd.js.map +0 -1
  289. package/dist/MListItem-h9H223vx.js +0 -1239
  290. package/dist/MListItem-h9H223vx.js.map +0 -1
  291. package/dist/MLoadingIndicator-YTV1Ov5w.js +0 -114
  292. package/dist/MLoadingIndicator-YTV1Ov5w.js.map +0 -1
  293. package/dist/MMenuItem-US0Zbglq.js.map +0 -1
  294. package/dist/MPdfViewer-DL9mRsd2.js.map +0 -1
  295. package/dist/MSeekBar-JFZcoJ8y.js +0 -434
  296. package/dist/MSeekBar-JFZcoJ8y.js.map +0 -1
  297. package/dist/MTextField-B6_iOczK.js.map +0 -1
  298. package/dist/material-color-utilities-CEFytLsr.js.map +0 -1
  299. package/dist/motion-BcejVTeX.js.map +0 -1
  300. package/dist/useLocale-YRaOT12S.js.map +0 -1
  301. package/dist/useThemeTokens-DyAdPQB0.js.map +0 -1
@@ -1,8 +1,8 @@
1
- import { r as e, t } from "./MIcon-BSsJZhK7.js";
2
- import { a as n, f as r, i, l as a, p as o, s, u as c } from "./MIconButton-CrBPZidd.js";
3
- import { i as l } from "./motion-BcejVTeX.js";
1
+ import { t as e } from "./motion-BqYcqcim.js";
2
+ import { r as t, t as n } from "./MIcon-CkUc9kuQ.js";
3
+ import { a as r, f as i, i as a, l as o, p as s, s as c, u as l } from "./MIconButton-DTFOfsTy.js";
4
4
  import { n as u, r as d, t as f } from "./_popupPosition-C_lxj9qU.js";
5
- import { Fragment as p, Teleport as ee, Transition as m, computed as h, createBlock as g, createCommentVNode as _, createElementBlock as v, createElementVNode as y, createVNode as b, defineComponent as x, inject as S, mergeProps as C, nextTick as w, normalizeClass as T, normalizeStyle as te, onMounted as ne, onUnmounted as re, openBlock as E, provide as D, ref as O, renderList as ie, renderSlot as k, resolveDynamicComponent as A, toDisplayString as ae, unref as j, useSlots as oe, watch as se, withCtx as ce, withDirectives as le } from "vue";
5
+ import { Fragment as p, Teleport as ee, Transition as m, computed as h, createBlock as g, createCommentVNode as _, createElementBlock as v, createElementVNode as y, createVNode as b, defineComponent as x, inject as S, mergeProps as C, nextTick as w, normalizeClass as T, normalizeStyle as E, onMounted as te, onUnmounted as ne, openBlock as D, provide as O, ref as k, renderList as re, renderSlot as A, resolveDynamicComponent as ie, toDisplayString as ae, unref as j, useSlots as oe, watch as se, withCtx as ce, withDirectives as le } from "vue";
6
6
  // src/components/MMenuDivider.vue?vue&type=script&setup=true&lang.ts
7
7
  var M = { class: "my-1 border-outline-variant" }, N = /* @__PURE__ */ x({
8
8
  __name: "MMenuDivider",
@@ -11,7 +11,7 @@ var M = { class: "my-1 border-outline-variant" }, N = /* @__PURE__ */ x({
11
11
  default: !1
12
12
  } },
13
13
  setup(e) {
14
- return (e, t) => (E(), v("hr", M));
14
+ return (e, t) => (D(), v("hr", M));
15
15
  }
16
16
  });
17
17
  // src/composables/_menuGroups.ts
@@ -30,13 +30,15 @@ function de(e) {
30
30
  for (let n of P(e)) ue(n) ? t.push([]) : t[t.length - 1].push(n);
31
31
  return t.filter((e) => e.length > 0);
32
32
  }
33
+ var F = (e) => e.nodes?.() ?? null;
34
+ F.props = ["nodes"];
33
35
  // src/composables/_useMenuNav.ts
34
- var F = 30, I = 380, L = 8, R = 1 / 3, fe = .5;
35
- function pe(t) {
36
- let n = O([]), i = h(() => n.value[n.value.length - 1]), o = O("forward"), s = O(), u = 0, d = 1, f = () => e(s.value) ? -1 : 1;
36
+ var I = 30, L = 380, fe = 8, R = 1 / 3, pe = .5;
37
+ function me(n) {
38
+ let r = k([]), a = h(() => r.value[r.value.length - 1]), s = k("forward"), c = k(), u = 0, d = 1, f = () => t(c.value) ? -1 : 1;
37
39
  function p(e, t) {
38
- let n = (o.value === "forward" ? 1 : -1) * f(), r = e.animate([{
39
- transform: `translateX(${n * F}px)`,
40
+ let n = (s.value === "forward" ? 1 : -1) * f(), r = e.animate([{
41
+ transform: `translateX(${n * I}px)`,
40
42
  opacity: 0
41
43
  }, {
42
44
  transform: "translateX(0)",
@@ -50,65 +52,65 @@ function pe(t) {
50
52
  r.onfinish = t;
51
53
  }
52
54
  function ee(e, t) {
53
- let n = (o.value === "forward" ? -1 : 1) * f(), r = e;
55
+ let n = (s.value === "forward" ? -1 : 1) * f(), r = e;
54
56
  r.style.position = "absolute", r.style.insetInline = "0", r.style.top = "0";
55
57
  let i = u, a = d;
56
58
  u = 0, d = 1;
57
- let s = r.animate([{
59
+ let o = r.animate([{
58
60
  transform: `translateX(${i}px)`,
59
61
  opacity: a
60
62
  }, {
61
- transform: `translateX(${i + n * F}px)`,
63
+ transform: `translateX(${i + n * I}px)`,
62
64
  opacity: 0
63
65
  }], {
64
66
  duration: 90,
65
67
  easing: "cubic-bezier(0.3,0,0.8,0.15)",
66
68
  fill: "forwards"
67
69
  });
68
- s.onfinish = t;
70
+ o.onfinish = t;
69
71
  }
70
- function m(e) {
71
- let t = s.value, n = t?.offsetHeight ?? 0, i = t?.style.overflowY ?? "";
72
- t && (t.style.overflowY = "hidden");
73
- let o = () => {
74
- t && (t.style.overflowY = i);
72
+ function m(t) {
73
+ let n = c.value, r = n?.offsetHeight ?? 0, a = n?.style.overflowY ?? "";
74
+ n && (n.style.overflowY = "hidden");
75
+ let s = () => {
76
+ n && (n.style.overflowY = a);
75
77
  };
76
- if (e(), !t || c()) return o();
78
+ if (t(), !n || l()) return s();
77
79
  w(() => {
78
- let e = t.offsetHeight, i = Math.abs(e - n) < 1 ? null : a(t, r(n, e, 0, l.standard.defaultSpatial, .5), (e) => ({ height: `${e}px` })), s = new Promise((e) => setTimeout(e, I));
79
- Promise.all([s, i?.finished.catch(() => {})]).then(o);
80
+ let t = n.offsetHeight, a = Math.abs(t - r) < 1 ? null : o(n, i(r, t, 0, e().defaultSpatial, .5), (e) => ({ height: `${e}px` })), c = new Promise((e) => setTimeout(e, L));
81
+ Promise.all([c, a?.finished.catch(() => {})]).then(s);
80
82
  });
81
83
  }
82
84
  function g(e) {
83
- o.value = "forward", m(() => n.value.push(e)), w(t);
85
+ s.value = "forward", m(() => r.value.push(e)), w(n);
84
86
  }
85
87
  function _() {
86
- o.value = "backward", m(() => n.value.pop()), w(t);
88
+ s.value = "backward", m(() => r.value.pop()), w(n);
87
89
  }
88
90
  function v() {
89
- n.value = [];
91
+ r.value = [];
90
92
  }
91
93
  let y = null;
92
94
  function b() {
93
- return s.value?.querySelector(`:scope > [data-menu-level="${n.value.length}"]`) ?? null;
95
+ return c.value?.querySelector(`:scope > [data-menu-level="${r.value.length}"]`) ?? null;
94
96
  }
95
97
  function x(e) {
96
- if (e.pointerType !== "touch" || !n.value.length || y) return;
98
+ if (e.pointerType !== "touch" || !r.value.length || y) return;
97
99
  let t = b();
98
100
  if (!t) return;
99
- let r = f();
101
+ let n = f();
100
102
  y = {
101
103
  id: e.pointerId,
102
- x: e.clientX * r,
104
+ x: e.clientX * n,
103
105
  y: e.clientY,
104
106
  level: t,
105
- width: s.value.clientWidth,
107
+ width: c.value.clientWidth,
106
108
  active: !1,
107
- lastX: e.clientX * r,
109
+ lastX: e.clientX * n,
108
110
  lastT: e.timeStamp,
109
111
  vel: 0,
110
- sign: r
111
- }, window.addEventListener("pointermove", C), window.addEventListener("pointerup", T), window.addEventListener("pointercancel", te);
112
+ sign: n
113
+ }, window.addEventListener("pointermove", C), window.addEventListener("pointerup", T), window.addEventListener("pointercancel", E);
112
114
  }
113
115
  function S(e) {
114
116
  y && (y.level.style.transform = `translateX(${e * y.sign}px)`, y.level.style.opacity = String(1 - .5 * Math.min(1, e / y.width)));
@@ -117,8 +119,8 @@ function pe(t) {
117
119
  if (!y || e.pointerId !== y.id) return;
118
120
  let t = e.clientX * y.sign, n = t - y.x, r = e.clientY - y.y;
119
121
  if (!y.active) {
120
- if (Math.hypot(n, r) < L) return;
121
- if (Math.abs(r) > Math.abs(n) || n < 0) return k();
122
+ if (Math.hypot(n, r) < fe) return;
123
+ if (Math.abs(r) > Math.abs(n) || n < 0) return A();
122
124
  y.active = !0, y.x = t, y.level.getAnimations().forEach((e) => e.finish());
123
125
  }
124
126
  let i = e.timeStamp - y.lastT;
@@ -127,43 +129,43 @@ function pe(t) {
127
129
  function T(e) {
128
130
  if (!y || e.pointerId !== y.id) return;
129
131
  let t = y;
130
- if (k(), !t.active) return;
131
- window.addEventListener("click", ie, {
132
+ if (A(), !t.active) return;
133
+ window.addEventListener("click", re, {
132
134
  capture: !0,
133
135
  once: !0
134
- }), clearTimeout(E), E = setTimeout(D, 400);
136
+ }), clearTimeout(D), D = setTimeout(O, 400);
135
137
  let n = Math.max(0, e.clientX * t.sign - t.x);
136
- n > t.width * R || t.vel > fe ? (u = n * t.sign, d = Number(t.level.style.opacity || 1), _()) : ne(t.level, n, t.sign);
138
+ n > t.width * R || t.vel > pe ? (u = n * t.sign, d = Number(t.level.style.opacity || 1), _()) : te(t.level, n, t.sign);
137
139
  }
138
- function te(e) {
140
+ function E(e) {
139
141
  if (!y || e.pointerId !== y.id) return;
140
142
  let t = y;
141
- k(), t.active && ne(t.level, Math.max(0, t.lastX - t.x), t.sign);
143
+ A(), t.active && te(t.level, Math.max(0, t.lastX - t.x), t.sign);
142
144
  }
143
- function ne(e, t, n) {
144
- if (e.style.transform = "", e.style.opacity = "", c() || t < 1) return;
145
- let i = s.value?.clientWidth || 1;
146
- a(e, r(t, 0, 0, l.standard.defaultSpatial, .5), (e) => ({
147
- transform: `translateX(${e * n}px)`,
148
- opacity: String(1 - .5 * Math.min(1, e / i))
145
+ function te(t, n, r) {
146
+ if (t.style.transform = "", t.style.opacity = "", l() || n < 1) return;
147
+ let a = c.value?.clientWidth || 1;
148
+ o(t, i(n, 0, 0, e().defaultSpatial, .5), (e) => ({
149
+ transform: `translateX(${e * r}px)`,
150
+ opacity: String(1 - .5 * Math.min(1, e / a))
149
151
  }));
150
152
  }
151
- let E;
152
- function D() {
153
- clearTimeout(E), window.removeEventListener("click", ie, { capture: !0 });
153
+ let D;
154
+ function O() {
155
+ clearTimeout(D), window.removeEventListener("click", re, { capture: !0 });
154
156
  }
155
- function ie(e) {
157
+ function re(e) {
156
158
  e.stopPropagation(), e.preventDefault();
157
159
  }
158
- function k() {
159
- y = null, window.removeEventListener("pointermove", C), window.removeEventListener("pointerup", T), window.removeEventListener("pointercancel", te);
160
+ function A() {
161
+ y = null, window.removeEventListener("pointermove", C), window.removeEventListener("pointerup", T), window.removeEventListener("pointercancel", E);
160
162
  }
161
- return re(() => {
162
- k(), D();
163
+ return ne(() => {
164
+ A(), O();
163
165
  }), {
164
- navStack: n,
165
- currentNav: i,
166
- navBox: s,
166
+ navStack: r,
167
+ currentNav: a,
168
+ navBox: c,
167
169
  navSlideEnter: p,
168
170
  navSlideLeave: ee,
169
171
  pushNav: g,
@@ -173,10 +175,10 @@ function pe(t) {
173
175
  };
174
176
  }
175
177
  // src/components/MMenu.vue?vue&type=script&setup=true&lang.ts
176
- var z = ["data-menu-level"], me = { class: "flex-1 truncate" }, B = { key: "root" }, he = {
178
+ var z = ["data-menu-level"], he = { class: "flex-1 truncate" }, B = { key: "root" }, ge = {
177
179
  key: 0,
178
180
  class: "flex flex-col gap-1 px-1.5"
179
- }, V = 1 / 240, H = 4, ge = /* @__PURE__ */ x({
181
+ }, V = 1 / 240, H = 4, U = /* @__PURE__ */ x({
180
182
  inheritAttrs: !1,
181
183
  __name: "MMenu",
182
184
  props: {
@@ -186,10 +188,10 @@ var z = ["data-menu-level"], me = { class: "flex-1 truncate" }, B = { key: "root
186
188
  color: { default: "standard" },
187
189
  maxHeight: { default: 400 }
188
190
  },
189
- setup(n, { expose: r }) {
190
- let i = n, a = oe(), o = h(() => i.variant === "expressive" ? de(a.default?.({ close: $ }) ?? []) : null), s = h(() => !!o.value && o.value.length > 1), { navStack: c, currentNav: l, navBox: u, navSlideEnter: x, navSlideLeave: ae, pushNav: le, popNav: M, onNavPointerDown: N } = pe(() => be()), P = null;
191
- function ue() {
192
- if (P) return P;
191
+ setup(e, { expose: r }) {
192
+ let i = e, a = oe(), o = h(() => i.variant === "expressive" ? de(a.default?.({ close: $ }) ?? []) : null), s = h(() => !!o.value && o.value.length > 1), { navStack: c, currentNav: l, navBox: u, navSlideEnter: x, navSlideLeave: ie, pushNav: ae, popNav: le, onNavPointerDown: M } = me(() => be()), N = null;
193
+ function P() {
194
+ if (N) return N;
193
195
  let e = [], t = .8, n = 0, r = 0, i = 0;
194
196
  for (let a = 0; a < 1 && (e.push({
195
197
  scale: t,
@@ -198,12 +200,12 @@ var z = ["data-menu-level"], me = { class: "flex-1 truncate" }, B = { key: "root
198
200
  return e.push({
199
201
  scale: 1,
200
202
  alpha: 1
201
- }), P = e, e;
203
+ }), N = e, e;
202
204
  }
203
- let F = 0, I = null, L = null;
204
- function R(e, t, n) {
205
+ let ue = 0, I = null, L = null;
206
+ function fe(e, t, n) {
205
207
  I?.();
206
- let r = e, i = ue(), a = i.length - 1, o = Math.round(Math.max(0, Math.min(a, F))), s = n ? a : 0, c = n ? 1 : -1, l = [];
208
+ let r = e, i = P(), a = i.length - 1, o = Math.round(Math.max(0, Math.min(a, ue))), s = n ? a : 0, c = n ? 1 : -1, l = [];
207
209
  for (let e = o; n ? e <= s : e >= s; e += c) l.push(i[e]);
208
210
  let u = (e) => ({
209
211
  transform: `scale(${e.scale})`,
@@ -212,7 +214,7 @@ var z = ["data-menu-level"], me = { class: "flex-1 truncate" }, B = { key: "root
212
214
  Object.assign(r.style, u(i[s]));
213
215
  let d = !1;
214
216
  function f() {
215
- d || (d = !0, F = s, I = null, L = null, t());
217
+ d || (d = !0, ue = s, I = null, L = null, t());
216
218
  }
217
219
  if (l.length < 2 || typeof r.animate != "function") return f();
218
220
  let p = r.animate(l.map(u), {
@@ -221,30 +223,30 @@ var z = ["data-menu-level"], me = { class: "flex-1 truncate" }, B = { key: "root
221
223
  });
222
224
  p.finished.catch(() => {}), p.onfinish = f, I = () => {
223
225
  let e = Number(p.currentTime ?? 0) / (V * 1e3);
224
- F = Math.max(0, Math.min(a, o + c * e)), d = !0, p.cancel();
226
+ ue = Math.max(0, Math.min(a, o + c * e)), d = !0, p.cancel();
225
227
  }, L = n ? null : () => {
226
228
  I?.(), I = null, L = null, t();
227
229
  };
228
230
  }
229
- function fe(e, t) {
230
- Z(e), ve(e), R(e, t, !0);
231
+ function R(e, t) {
232
+ Z(e), ve(e), fe(e, t, !0);
231
233
  }
232
- function ge(e, t) {
233
- R(e, t, !1);
234
+ function pe(e, t) {
235
+ fe(e, t, !1);
234
236
  }
235
- let U = O(!1), _e = O(null), W = O(null), G = O({}), K = S("m-menu-panel-registry", /* @__PURE__ */ new Set());
236
- D("m-menu-panel-registry", K), se(W, (e, t) => {
237
- t && K.delete(t), e && K.add(e);
238
- }), re(() => {
239
- W.value && K.delete(W.value);
237
+ let U = k(!1), W = k(null), G = k(null), K = k({}), q = S("m-menu-panel-registry", /* @__PURE__ */ new Set());
238
+ O("m-menu-panel-registry", q), se(G, (e, t) => {
239
+ t && q.delete(t), e && q.add(e);
240
+ }), ne(() => {
241
+ G.value && q.delete(G.value);
240
242
  });
241
- let q = S("m-menu-sibling-group", null);
242
- D("m-menu-sibling-group", { current: null });
243
- let J = null, Y = O(!1);
244
- function X() {
245
- if (!_e.value) return;
246
- let e = _e.value.getBoundingClientRect();
247
- J = e, Y.value = !1, G.value = {
243
+ let J = S("m-menu-sibling-group", null);
244
+ O("m-menu-sibling-group", { current: null });
245
+ let Y = null, X = k(!1);
246
+ function _e() {
247
+ if (!W.value) return;
248
+ let e = W.value.getBoundingClientRect();
249
+ Y = e, X.value = !1, K.value = {
248
250
  maxHeight: `${i.maxHeight}px`,
249
251
  maxWidth: `${window.innerWidth - 16}px`,
250
252
  left: "0px",
@@ -252,26 +254,26 @@ var z = ["data-menu-level"], me = { class: "flex-1 truncate" }, B = { key: "root
252
254
  };
253
255
  }
254
256
  function Z(e) {
255
- if (!J || !u.value) return;
256
- let t = Math.min(u.value.scrollHeight, i.maxHeight), n = window.innerHeight - J.bottom - H - 8, r = J.top - H - 8;
257
- Y.value = t > n && (t <= r || r > n);
257
+ if (!Y || !u.value) return;
258
+ let t = Math.min(u.value.scrollHeight, i.maxHeight), n = window.innerHeight - Y.bottom - H - 8, r = Y.top - H - 8;
259
+ X.value = t > n && (t <= r || r > n);
258
260
  let a = {
259
- ...G.value,
260
- maxHeight: `${Math.min(Y.value ? r : n, i.maxHeight)}px`
261
+ ...K.value,
262
+ maxHeight: `${Math.min(X.value ? r : n, i.maxHeight)}px`
261
263
  };
262
- delete a.top, delete a.bottom, Y.value ? a.bottom = `${window.innerHeight - J.top + H}px` : a.top = `${J.bottom + H}px`, G.value = a, e.style.top = a.top ?? "", e.style.bottom = a.bottom ?? "", u.value.style.maxHeight = a.maxHeight;
264
+ delete a.top, delete a.bottom, X.value ? a.bottom = `${window.innerHeight - Y.top + H}px` : a.top = `${Y.bottom + H}px`, K.value = a, e.style.top = a.top ?? "", e.style.bottom = a.bottom ?? "", u.value.style.maxHeight = a.maxHeight;
263
265
  }
264
- let Q = O(i.align === "right" || i.align === "end" && !e() || i.align === "start" && e() ? "right" : "left");
265
- function ve(t) {
266
- if (!J) return;
267
- let n = t.offsetWidth, r = e(), a = i.align === "left" ? r ? "end" : "start" : i.align === "right" ? r ? "start" : "end" : i.align, o = f(J, n, window.innerWidth, a, void 0, r), s = Math.min(n, Math.max(0, (J.left + J.right) / 2 - o)), c = Math.abs(o - J.left) < 1 ? "left" : Math.abs(o + n - J.right) < 1 ? "right" : `${s}px`;
268
- Q.value = c, G.value = {
269
- ...G.value,
266
+ let Q = k(i.align === "right" || i.align === "end" && !t() || i.align === "start" && t() ? "right" : "left");
267
+ function ve(e) {
268
+ if (!Y) return;
269
+ let n = e.offsetWidth, r = t(), a = i.align === "left" ? r ? "end" : "start" : i.align === "right" ? r ? "start" : "end" : i.align, o = f(Y, n, window.innerWidth, a, void 0, r), s = Math.min(n, Math.max(0, (Y.left + Y.right) / 2 - o)), c = Math.abs(o - Y.left) < 1 ? "left" : Math.abs(o + n - Y.right) < 1 ? "right" : `${s}px`;
270
+ Q.value = c, K.value = {
271
+ ...K.value,
270
272
  left: `${o}px`
271
- }, t.style.left = `${o}px`, t.style.transformOrigin = `${c} ${Y.value ? "bottom" : "top"}`;
273
+ }, e.style.left = `${o}px`, e.style.transformOrigin = `${c} ${X.value ? "bottom" : "top"}`;
272
274
  }
273
275
  function ye() {
274
- return W.value ? Array.from(W.value.querySelectorAll("button:not(:disabled), a[href]")) : [];
276
+ return G.value ? Array.from(G.value.querySelectorAll("button:not(:disabled), a[href]")) : [];
275
277
  }
276
278
  function be() {
277
279
  w(() => ye()[0]?.focus());
@@ -283,105 +285,105 @@ var z = ["data-menu-level"], me = { class: "flex-1 truncate" }, B = { key: "root
283
285
  (n === -1 ? e === 1 ? t[0] : t[t.length - 1] : t[(n + e + t.length) % t.length])?.focus();
284
286
  }
285
287
  function Se() {
286
- U.value ? q?.current === $ && (q.current = null) : (q && q.current && q.current !== $ && q.current(), q && (q.current = $), X(), c.value = []), U.value = !U.value, U.value && be();
288
+ U.value ? J?.current === $ && (J.current = null) : (J && J.current && J.current !== $ && J.current(), J && (J.current = $), _e(), c.value = []), U.value = !U.value, U.value && be();
287
289
  }
288
290
  function $() {
289
- q?.current === $ && (q.current = null), U.value = !1;
291
+ J?.current === $ && (J.current = null), U.value = !1;
290
292
  }
291
- D("m-menu-close", $), D("m-menu-color", h(() => i.color)), D("m-menu-variant", h(() => i.variant));
293
+ O("m-menu-close", $), O("m-menu-color", h(() => i.color)), O("m-menu-variant", h(() => i.variant));
292
294
  let Ce = h(() => i.color === "vibrant" ? "bg-tertiary-container" : i.variant === "expressive" ? "bg-surface-container-low" : "bg-surface-container");
293
- D("m-menu-nav", {
295
+ O("m-menu-nav", {
294
296
  mode: i.submenuMode,
295
- push: le
297
+ push: ae
296
298
  }), r({
297
299
  close: $,
298
300
  open: U
299
301
  });
300
302
  function we(e) {
301
303
  let t = e.target;
302
- if (!_e.value?.contains(t)) {
303
- for (let e of K) if (e.contains(t)) return;
304
+ if (!W.value?.contains(t)) {
305
+ for (let e of q) if (e.contains(t)) return;
304
306
  t.closest?.(".m3-submenu") || $();
305
307
  }
306
308
  }
307
309
  function Te(e) {
308
310
  if (!U.value) return;
309
311
  let t = e.target;
310
- for (let e of K) if (e.contains(t)) return;
312
+ for (let e of q) if (e.contains(t)) return;
311
313
  t.closest?.(".m3-submenu") || $();
312
314
  }
313
- d(() => U.value, () => c.value.length ? M() : $());
315
+ d(() => U.value, () => c.value.length ? le() : $());
314
316
  function Ee(e) {
315
317
  U.value && (e.key === "ArrowDown" ? (e.preventDefault(), xe(1)) : e.key === "ArrowUp" && (e.preventDefault(), xe(-1)));
316
318
  }
317
- ne(() => {
319
+ te(() => {
318
320
  document.addEventListener("mousedown", we), document.addEventListener("keydown", Ee), window.addEventListener("scroll", Te, !0);
319
- }), re(() => {
321
+ }), ne(() => {
320
322
  document.removeEventListener("mousedown", we), document.removeEventListener("keydown", Ee), window.removeEventListener("scroll", Te, !0), L ? L() : I?.();
321
323
  });
322
- let De = h(() => `${Q.value} ${Y.value ? "bottom" : "top"}`);
323
- return (e, r) => (E(), v(p, null, [y("div", C({
324
+ let De = h(() => `${Q.value} ${X.value ? "bottom" : "top"}`);
325
+ return (t, r) => (D(), v(p, null, [y("div", C({
324
326
  ref_key: "triggerEl",
325
- ref: _e
326
- }, e.$attrs, {
327
+ ref: W
328
+ }, t.$attrs, {
327
329
  class: "inline-block",
328
330
  onClick: Se
329
- }), [k(e.$slots, "trigger", { open: U.value })], 16), (E(), g(ee, { to: "body" }, [b(m, {
331
+ }), [A(t.$slots, "trigger", { open: U.value })], 16), (D(), g(ee, { to: "body" }, [b(m, {
330
332
  css: !1,
331
- onEnter: fe,
332
- onLeave: ge
333
+ onEnter: R,
334
+ onLeave: pe
333
335
  }, {
334
- default: ce(() => [U.value ? (E(), v("div", {
336
+ default: ce(() => [U.value ? (D(), v("div", {
335
337
  key: 0,
336
338
  ref_key: "dropdownEl",
337
- ref: W,
338
- class: T(["fixed z-500 min-w-48", [n.variant === "expressive" ? "rounded-lg" : "rounded-xs", s.value ? "" : "shadow-elevation-2"]]),
339
- style: te({
340
- ...G.value,
339
+ ref: G,
340
+ class: T(["fixed z-500 min-w-48", [e.variant === "expressive" ? "rounded-lg" : "rounded-xs", s.value ? "" : "shadow-elevation-2"]]),
341
+ style: E({
342
+ ...K.value,
341
343
  transformOrigin: De.value
342
344
  })
343
- }, [y("div", { class: T(["overflow-hidden", [n.variant === "expressive" ? "rounded-lg" : "rounded-xs", s.value ? "" : Ce.value]]) }, [y("div", {
345
+ }, [y("div", { class: T(["overflow-hidden", [e.variant === "expressive" ? "rounded-lg" : "rounded-xs", s.value ? "" : Ce.value]]) }, [y("div", {
344
346
  ref_key: "navBox",
345
347
  ref: u,
346
348
  class: "relative overflow-x-hidden overflow-y-auto overscroll-contain py-1",
347
- style: te({
348
- maxHeight: G.value.maxHeight,
349
+ style: E({
350
+ maxHeight: K.value.maxHeight,
349
351
  touchAction: j(l) ? "pan-y" : void 0
350
352
  }),
351
- onPointerdown: r[1] ||= (...e) => j(N) && j(N)(...e)
353
+ onPointerdown: r[1] ||= (...e) => j(M) && j(M)(...e)
352
354
  }, [b(m, {
353
355
  css: !1,
354
356
  onEnter: j(x),
355
- onLeave: j(ae)
357
+ onLeave: j(ie)
356
358
  }, {
357
- default: ce(() => [j(l) ? (E(), v("div", {
359
+ default: ce(() => [j(l) ? (D(), v("div", {
358
360
  key: j(c).length,
359
361
  "data-menu-level": j(c).length
360
362
  }, [
361
363
  y("button", {
362
364
  type: "button",
363
- class: T(["flex w-full items-center gap-3 px-4 py-2.5 text-start text-label-large outline-none transition-colors focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-secondary", n.color === "vibrant" ? "text-on-tertiary-container hover:bg-on-tertiary-container/8" : "text-on-surface-variant hover:bg-on-surface/8"]),
364
- onClick: r[0] ||= (...e) => j(M) && j(M)(...e)
365
- }, [b(t, {
365
+ class: T(["flex w-full items-center gap-3 px-4 py-2.5 text-start text-label-large outline-none transition-colors focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-secondary", e.color === "vibrant" ? "text-on-tertiary-container hover:bg-on-tertiary-container/8" : "text-on-surface-variant hover:bg-on-surface/8"]),
366
+ onClick: r[0] ||= (...e) => j(le) && j(le)(...e)
367
+ }, [b(n, {
366
368
  name: "arrow_back",
367
369
  size: 20,
368
370
  class: "shrink-0"
369
- }), y("span", me, [(E(), g(A(() => j(l)?.header?.())))])], 2),
371
+ }), y("span", he, [b(j(F), { nodes: () => j(l)?.header?.() }, null, 8, ["nodes"])])], 2),
370
372
  r[2] ||= y("hr", { class: "my-1 border-outline-variant" }, null, -1),
371
- (E(), g(A(() => j(l)?.content?.())))
372
- ], 8, z)) : (E(), v("div", B, [s.value ? (E(), v("div", he, [(E(!0), v(p, null, ie(o.value, (e, t) => (E(), v("div", {
373
+ b(j(F), { nodes: () => j(l)?.content?.() }, null, 8, ["nodes"])
374
+ ], 8, z)) : (D(), v("div", B, [s.value ? (D(), v("div", ge, [(D(!0), v(p, null, re(o.value, (e, t) => (D(), v("div", {
373
375
  key: t,
374
376
  class: "rounded-lg shadow-elevation-2"
375
- }, [y("div", { class: T(["overflow-hidden rounded-lg", Ce.value]) }, [(E(), g(A(() => e)))], 2)]))), 128))])) : k(e.$slots, "default", { close: $ }, void 0, void 0, 1)]))]),
377
+ }, [y("div", { class: T(["overflow-hidden rounded-lg", Ce.value]) }, [b(j(F), { nodes: () => e }, null, 8, ["nodes"])], 2)]))), 128))])) : A(t.$slots, "default", { close: $ }, void 0, void 0, 1)]))]),
376
378
  _: 3
377
379
  }, 8, ["onEnter", "onLeave"])], 36)], 2)], 6)) : _("", !0)]),
378
380
  _: 3
379
381
  })]))], 64));
380
382
  }
381
- }), U = ["data-m3-menu-choice"], _e = { class: "flex-1" }, W = {
383
+ }), W = ["data-m3-menu-choice"], G = { class: "flex-1" }, K = {
382
384
  key: 0,
383
385
  class: "flex flex-col gap-1 px-1.5"
384
- }, G = 32, K = /* @__PURE__ */ x({
386
+ }, q = 32, J = /* @__PURE__ */ x({
385
387
  __name: "MMenuItem",
386
388
  props: {
387
389
  icon: {},
@@ -410,10 +412,10 @@ var z = ["data-menu-level"], me = { class: "flex-1 truncate" }, B = { key: "root
410
412
  selectedIcon: {}
411
413
  },
412
414
  emits: ["click", "update:checked"],
413
- setup(r, { emit: a }) {
414
- let c = r, l = a, d = oe(), f = h(() => c.checked !== void 0), x = h(() => f.value || c.selected !== void 0), C = h(() => !!(c.checked ?? c.selected)), D = h(() => x.value && !c.icon && !d.icon), M = h(() => c.selectedIcon ?? (c.icon ? void 0 : "check")), N = O("single");
415
+ setup(e, { emit: i }) {
416
+ let o = e, l = i, d = oe(), f = h(() => o.checked !== void 0), x = h(() => f.value || o.selected !== void 0), C = h(() => !!(o.checked ?? o.selected)), O = h(() => x.value && !o.icon && !d.icon), M = h(() => o.selectedIcon ?? (o.icon ? void 0 : "check")), N = k("single");
415
417
  function P() {
416
- let e = J.value;
418
+ let e = X.value;
417
419
  if (!e || !x.value) return;
418
420
  let t = (e) => !!e?.hasAttribute("data-m3-menu-choice"), n = t(e.previousElementSibling), r = t(e.nextElementSibling);
419
421
  N.value = n && r ? "middle" : n ? "last" : r ? "first" : "single";
@@ -433,24 +435,24 @@ var z = ["data-menu-level"], me = { class: "flex-1 truncate" }, B = { key: "root
433
435
  t
434
436
  ];
435
437
  }
436
- let { snap: F } = s(() => x.value ? [...ue(), D.value && C.value ? G : 0] : [], ([e, t, n, r, i]) => {
437
- let a = Y.value instanceof HTMLElement ? Y.value : Y.value?.$el;
438
- a && r !== void 0 && (a.style.borderRadius = `${e}px ${t}px ${n}px ${r}px`), X.value && i !== void 0 && (X.value.style.width = `${i}px`);
439
- }, n);
440
- se(N, () => F());
441
- let I = null;
442
- ne(() => {
438
+ let { snap: I } = c(() => x.value ? [...ue(), O.value && C.value ? q : 0] : [], ([e, t, n, r, i]) => {
439
+ let a = _e.value instanceof HTMLElement ? _e.value : _e.value?.$el;
440
+ 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
+ }, r);
442
+ se(N, () => I());
443
+ let L = null;
444
+ te(() => {
443
445
  P();
444
- let e = J.value?.parentElement;
445
- e && (I = new MutationObserver(P), I.observe(e, { childList: !0 }));
446
- }), re(() => I?.disconnect()), se(x, () => w(P)), s(() => D.value ? [+!!C.value] : [], ([e]) => {
447
- X.value && e !== void 0 && (X.value.style.opacity = String(e));
448
- }, i);
449
- let L = h(() => c.to ? "RouterLink" : "button"), R = h(() => !!d.children), fe = S("m-menu-close", null), pe = S("m-menu-color", null), z = h(() => pe?.value === "vibrant"), me = S("m-menu-variant", null), B = h(() => me?.value === "expressive"), he = h(() => z.value ? "bg-tertiary-container" : B.value ? "bg-surface-container-low" : "bg-surface-container"), V = h(() => B.value ? de(d.children?.() ?? []) : null), H = h(() => !!V.value && V.value.length > 1), ge = h(() => x.value && C.value ? "" : !x.value && c.danger ? "text-error" : z.value ? c.disabled ? "text-on-tertiary-container" : "text-on-tertiary-container group-hover:text-tertiary group-active:text-tertiary" : "text-on-surface-variant"), K = h(() => z.value ? "text-on-tertiary-container" : "text-on-surface-variant"), q = S("m-menu-nav", null), J = O(), Y = O(), X = O(), Z = O(!1), Q = O({});
450
- function ve() {
451
- if (!J.value) return;
452
- let e = J.value.getBoundingClientRect();
453
- Q.value = {
446
+ let e = X.value?.parentElement;
447
+ e && (L = new MutationObserver(P), L.observe(e, { childList: !0 }));
448
+ }), ne(() => L?.disconnect()), se(x, () => w(P)), c(() => O.value ? [+!!C.value] : [], ([e]) => {
449
+ Z.value && e !== void 0 && (Z.value.style.opacity = String(e));
450
+ }, a);
451
+ let fe = h(() => o.to ? "RouterLink" : "button"), R = h(() => !!d.children), pe = S("m-menu-close", null), me = S("m-menu-color", null), z = h(() => me?.value === "vibrant"), he = S("m-menu-variant", null), B = h(() => he?.value === "expressive"), ge = h(() => z.value ? "bg-tertiary-container" : B.value ? "bg-surface-container-low" : "bg-surface-container"), V = h(() => B.value ? de(d.children?.() ?? []) : null), H = h(() => !!V.value && V.value.length > 1), U = h(() => x.value && C.value ? "" : !x.value && o.danger ? "text-error" : z.value ? o.disabled ? "text-on-tertiary-container" : "text-on-tertiary-container group-hover:text-tertiary group-active:text-tertiary" : "text-on-surface-variant"), J = h(() => z.value ? "text-on-tertiary-container" : "text-on-surface-variant"), Y = S("m-menu-nav", null), X = k(), _e = k(), Z = k(), Q = k(!1), ve = k({});
452
+ function ye() {
453
+ if (!X.value) return;
454
+ let e = X.value.getBoundingClientRect();
455
+ ve.value = {
454
456
  position: "fixed",
455
457
  top: `${e.top}px`,
456
458
  left: `${e.right}px`,
@@ -458,104 +460,104 @@ var z = ["data-menu-level"], me = { class: "flex-1 truncate" }, B = { key: "root
458
460
  zIndex: "501"
459
461
  };
460
462
  }
461
- function ye(t) {
462
- if (!J.value) return;
463
- let n = t, r = J.value.getBoundingClientRect();
463
+ function be(e) {
464
+ if (!X.value) return;
465
+ let n = e, r = X.value.getBoundingClientRect();
464
466
  n.style.left = "0px";
465
- let i = n.offsetWidth, a = n.offsetHeight, o = u(e(J.value) ? [r.left - i, r.right] : [r.right, r.left - i], i, window.innerWidth), s = u([r.top, r.bottom - a], a, window.innerHeight);
466
- Q.value = {
467
- ...Q.value,
467
+ let i = n.offsetWidth, a = n.offsetHeight, o = u(t(X.value) ? [r.left - i, r.right] : [r.right, r.left - i], i, window.innerWidth), s = u([r.top, r.bottom - a], a, window.innerHeight);
468
+ ve.value = {
469
+ ...ve.value,
468
470
  left: `${o}px`,
469
471
  top: `${s}px`
470
472
  }, n.style.left = `${o}px`, n.style.top = `${s}px`;
471
473
  }
472
- function be() {
473
- Z.value ? Z.value = !1 : (ve(), Z.value = !0);
474
- }
475
474
  function xe() {
476
- c.disabled || (R.value ? q?.mode === "push" ? q.push({
477
- icon: c.icon,
475
+ Q.value ? Q.value = !1 : (ye(), Q.value = !0);
476
+ }
477
+ function Se() {
478
+ o.disabled || (R.value ? Y?.mode === "push" ? Y.push({
479
+ icon: o.icon,
478
480
  header: d.default,
479
481
  content: d.children
480
- }) : be() : (f.value && l("update:checked", !c.checked), l("click"), (c.keepOpen ?? f.value) || fe?.()));
481
- }
482
- function Se(e) {
483
- e.pointerType === "mouse" && R.value && !c.disabled && (ve(), Z.value = !0);
482
+ }) : xe() : (f.value && l("update:checked", !o.checked), l("click"), (o.keepOpen ?? f.value) || pe?.()));
484
483
  }
485
484
  function $(e) {
486
- e.pointerType === "mouse" && (e.relatedTarget?.closest(".m3-submenu") || (Z.value = !1));
485
+ e.pointerType === "mouse" && R.value && !o.disabled && (ye(), Q.value = !0);
487
486
  }
488
487
  function Ce(e) {
488
+ e.pointerType === "mouse" && (e.relatedTarget?.closest(".m3-submenu") || (Q.value = !1));
489
+ }
490
+ function we(e) {
489
491
  if (e.pointerType !== "mouse") return;
490
492
  let t = e.relatedTarget;
491
- t?.closest(".m3-submenu") || J.value?.contains(t) || (Z.value = !1);
493
+ t?.closest(".m3-submenu") || X.value?.contains(t) || (Q.value = !1);
492
494
  }
493
- return (e, n) => (E(), v("div", {
495
+ return (t, r) => (D(), v("div", {
494
496
  ref_key: "itemEl",
495
- ref: J,
497
+ ref: X,
496
498
  "data-m3-menu-choice": x.value || void 0,
497
- onPointerenter: Se,
498
- onPointerleave: $
499
- }, [le((E(), g(A(L.value), {
499
+ onPointerenter: $,
500
+ onPointerleave: Ce
501
+ }, [le((D(), g(ie(fe.value), {
500
502
  ref_key: "controlEl",
501
- ref: Y,
502
- to: r.to || void 0,
503
- type: r.to ? void 0 : "button",
503
+ ref: _e,
504
+ to: e.to || void 0,
505
+ type: e.to ? void 0 : "button",
504
506
  role: x.value ? f.value ? "menuitemcheckbox" : "menuitemradio" : void 0,
505
507
  "aria-checked": x.value ? C.value : void 0,
506
508
  class: T(["group flex items-center gap-3 py-2.5 text-start text-body-large transition-colors outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-secondary", x.value ? [
507
509
  "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",
508
510
  C.value ? z.value ? "bg-tertiary text-on-tertiary" : "bg-tertiary-container text-on-tertiary-container" : z.value ? "text-on-tertiary-container" : "text-on-surface",
509
- r.disabled ? "cursor-not-allowed opacity-[0.38]" : "cursor-pointer hover:before:opacity-[0.08] focus-visible:before:opacity-[0.1] active:before:opacity-[0.1]"
511
+ e.disabled ? "cursor-not-allowed opacity-[0.38]" : "cursor-pointer hover:before:opacity-[0.08] focus-visible:before:opacity-[0.1] active:before:opacity-[0.1]"
510
512
  ] : [
511
513
  "w-full px-4",
512
- r.disabled ? ["cursor-not-allowed opacity-[0.38]", z.value ? "text-on-tertiary-container" : "text-on-surface"] : "cursor-pointer",
513
- !r.disabled && r.danger ? "text-error hover:bg-error/8 focus-visible:bg-error/10 active:bg-error/10" : "",
514
- !r.disabled && !r.danger ? z.value ? "text-on-tertiary-container hover:bg-on-tertiary-container/8 focus-visible:bg-on-tertiary-container/10 active:bg-on-tertiary-container/10" : "text-on-surface hover:bg-on-surface/8 focus-visible:bg-on-surface/10 active:bg-on-surface/10" : ""
514
+ e.disabled ? ["cursor-not-allowed opacity-[0.38]", z.value ? "text-on-tertiary-container" : "text-on-surface"] : "cursor-pointer",
515
+ !e.disabled && e.danger ? "text-error hover:bg-error/8 focus-visible:bg-error/10 active:bg-error/10" : "",
516
+ !e.disabled && !e.danger ? z.value ? "text-on-tertiary-container hover:bg-on-tertiary-container/8 focus-visible:bg-on-tertiary-container/10 active:bg-on-tertiary-container/10" : "text-on-surface hover:bg-on-surface/8 focus-visible:bg-on-surface/10 active:bg-on-surface/10" : ""
515
517
  ]]),
516
- disabled: r.disabled || void 0,
518
+ disabled: e.disabled || void 0,
517
519
  "aria-haspopup": R.value ? "menu" : void 0,
518
- "aria-expanded": R.value ? Z.value : void 0,
519
- onClick: xe
520
+ "aria-expanded": R.value ? Q.value : void 0,
521
+ onClick: Se
520
522
  }, {
521
523
  default: ce(() => [
522
- D.value ? (E(), v("span", {
524
+ O.value ? (D(), v("span", {
523
525
  key: 0,
524
526
  ref_key: "iconSlotEl",
525
- ref: X,
527
+ ref: Z,
526
528
  class: "-me-3 flex shrink-0 overflow-hidden",
527
529
  style: {
528
530
  width: "0",
529
531
  opacity: "0"
530
532
  }
531
- }, [b(t, {
533
+ }, [b(n, {
532
534
  name: M.value,
533
535
  size: 20,
534
536
  class: "shrink-0"
535
- }, null, 8, ["name"])], 512)) : e.$slots.icon ? (E(), v("span", {
537
+ }, null, 8, ["name"])], 512)) : t.$slots.icon ? (D(), v("span", {
536
538
  key: 1,
537
- class: T(["flex size-5 shrink-0 items-center justify-center", ge.value])
538
- }, [k(e.$slots, "icon", { on: C.value })], 2)) : r.icon ? (E(), g(t, {
539
+ class: T(["flex size-5 shrink-0 items-center justify-center", U.value])
540
+ }, [A(t.$slots, "icon", { on: C.value })], 2)) : e.icon ? (D(), g(n, {
539
541
  key: 2,
540
- name: C.value && M.value ? M.value : r.icon,
542
+ name: C.value && M.value ? M.value : e.icon,
541
543
  filled: C.value && !M.value,
542
544
  size: 20,
543
- class: T(["shrink-0", ge.value])
545
+ class: T(["shrink-0", U.value])
544
546
  }, null, 8, [
545
547
  "name",
546
548
  "filled",
547
549
  "class"
548
550
  ])) : _("", !0),
549
- y("span", _e, [k(e.$slots, "default")]),
550
- r.shortcut && !R.value ? (E(), v("span", {
551
+ y("span", G, [A(t.$slots, "default")]),
552
+ e.shortcut && !R.value ? (D(), v("span", {
551
553
  key: 3,
552
- class: T(["ms-4 shrink-0 text-label-small opacity-60", K.value])
553
- }, ae(r.shortcut), 3)) : _("", !0),
554
- R.value ? (E(), g(t, {
554
+ class: T(["ms-4 shrink-0 text-label-small opacity-60", J.value])
555
+ }, ae(e.shortcut), 3)) : _("", !0),
556
+ R.value ? (D(), g(n, {
555
557
  key: 4,
556
558
  name: "chevron_right",
557
559
  size: 18,
558
- class: T(["shrink-0", K.value])
560
+ class: T(["shrink-0", J.value])
559
561
  }, null, 8, ["class"])) : _("", !0)
560
562
  ]),
561
563
  _: 3
@@ -568,7 +570,7 @@ var z = ["data-menu-level"], me = { class: "flex-1 truncate" }, B = { key: "root
568
570
  "disabled",
569
571
  "aria-haspopup",
570
572
  "aria-expanded"
571
- ])), [[j(o), { disabled: r.disabled }]]), R.value && j(q)?.mode !== "push" ? (E(), g(ee, {
573
+ ])), [[j(s), { disabled: e.disabled }]]), R.value && j(Y)?.mode !== "push" ? (D(), g(ee, {
572
574
  key: 0,
573
575
  to: "body"
574
576
  }, [b(m, {
@@ -576,21 +578,21 @@ var z = ["data-menu-level"], me = { class: "flex-1 truncate" }, B = { key: "root
576
578
  "enter-from-class": "opacity-0",
577
579
  "leave-active-class": "transition-opacity duration-75",
578
580
  "leave-to-class": "opacity-0",
579
- onEnter: ye
581
+ onEnter: be
580
582
  }, {
581
- default: ce(() => [Z.value ? (E(), v("div", {
583
+ default: ce(() => [Q.value ? (D(), v("div", {
582
584
  key: 0,
583
585
  class: T(["m3-submenu min-w-44", [B.value ? "rounded-lg" : "rounded-xs", H.value ? "" : "shadow-elevation-2"]]),
584
- style: te(Q.value),
585
- onPointerleave: Ce
586
- }, [y("div", { class: T(["overflow-hidden py-1", [B.value ? "rounded-lg" : "rounded-xs", H.value ? "" : he.value]]) }, [H.value ? (E(), v("div", W, [(E(!0), v(p, null, ie(V.value, (e, t) => (E(), v("div", {
586
+ style: E(ve.value),
587
+ onPointerleave: we
588
+ }, [y("div", { class: T(["overflow-hidden py-1", [B.value ? "rounded-lg" : "rounded-xs", H.value ? "" : ge.value]]) }, [H.value ? (D(), v("div", K, [(D(!0), v(p, null, re(V.value, (e, t) => (D(), v("div", {
587
589
  key: t,
588
590
  class: "rounded-lg shadow-elevation-2"
589
- }, [y("div", { class: T(["overflow-hidden rounded-lg", he.value]) }, [(E(), g(A(() => e)))], 2)]))), 128))])) : k(e.$slots, "children", {}, void 0, void 0, 1)], 2)], 38)) : _("", !0)]),
591
+ }, [y("div", { class: T(["overflow-hidden rounded-lg", ge.value]) }, [b(j(F), { nodes: () => e }, null, 8, ["nodes"])], 2)]))), 128))])) : A(t.$slots, "children", {}, void 0, void 0, 1)], 2)], 38)) : _("", !0)]),
590
592
  _: 3
591
- })])) : _("", !0)], 40, U));
593
+ })])) : _("", !0)], 40, W));
592
594
  }
593
595
  });
594
- export { N as a, de as i, ge as n, pe as r, K as t };
596
+ export { de as a, F as i, U as n, N as o, me as r, J as t };
595
597
 
596
- //# sourceMappingURL=MMenuItem-US0Zbglq.js.map
598
+ //# sourceMappingURL=MMenuItem-CEIKYvaX.js.map