@m3ui-vue/m3ui-vue 1.10.2 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (292) hide show
  1. package/README.md +19 -4
  2. package/dist/API.md +195 -56
  3. package/dist/MButton-gWoOzFWf.js +284 -0
  4. package/dist/MButton-gWoOzFWf.js.map +1 -0
  5. package/dist/MColorPickerModal-CJYMvlgK.js +466 -0
  6. package/dist/MColorPickerModal-CJYMvlgK.js.map +1 -0
  7. package/dist/MDialog-CU8EYgCC.js +226 -0
  8. package/dist/MDialog-CU8EYgCC.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-Cdw2FqCT.js +1306 -0
  14. package/dist/MListItem-Cdw2FqCT.js.map +1 -0
  15. package/dist/MLoadingIndicator-BxAy2x7P.js +115 -0
  16. package/dist/MLoadingIndicator-BxAy2x7P.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-CEfyXGq2.js} +674 -671
  20. package/dist/MPdfViewer-CEfyXGq2.js.map +1 -0
  21. package/dist/MProgressBar-BzZMxq7M.js.map +1 -1
  22. package/dist/MSeekBar-B3_D-PwH.js +435 -0
  23. package/dist/MSeekBar-B3_D-PwH.js.map +1 -0
  24. package/dist/{MSegmentedButton-DMou-8sG.js → MSegmentedButton-Dg07j-4r.js} +4 -4
  25. package/dist/{MSegmentedButton-DMou-8sG.js.map → MSegmentedButton-Dg07j-4r.js.map} +1 -1
  26. package/dist/{MSignaturePad-WuvE_Cyl.js → MSignaturePad-3nddtLKI.js} +2 -2
  27. package/dist/{MSignaturePad-WuvE_Cyl.js.map → MSignaturePad-3nddtLKI.js.map} +1 -1
  28. package/dist/{MSlider-7TzhFHKS.js → MSlider-BrpLbqwt.js} +4 -4
  29. package/dist/{MSlider-7TzhFHKS.js.map → MSlider-BrpLbqwt.js.map} +1 -1
  30. package/dist/{MSpinner-CkIVBuGE.js → MSpinner-CLwzDH33.js} +2 -2
  31. package/dist/{MSpinner-CkIVBuGE.js.map → MSpinner-CLwzDH33.js.map} +1 -1
  32. package/dist/{MTextField-B6_iOczK.js → MTextField-CZRizAwA.js} +136 -134
  33. package/dist/MTextField-CZRizAwA.js.map +1 -0
  34. package/dist/{_useFieldValidation-COBJ1tWr.js → _useFieldValidation-DVcqyy9g.js} +2 -2
  35. package/dist/{_useFieldValidation-COBJ1tWr.js.map → _useFieldValidation-DVcqyy9g.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/MAvatar.vue.d.ts +19 -1
  43. package/dist/components/MButton.vue.d.ts +2 -1
  44. package/dist/components/MChatBubble.vue.d.ts +2 -0
  45. package/dist/components/MCheckbox.vue.d.ts +2 -0
  46. package/dist/components/MDataTable.vue.d.ts +31 -3
  47. package/dist/components/MFlow.vue.d.ts +1 -1
  48. package/dist/components/MHotkeys.vue.d.ts +1 -0
  49. package/dist/components/MIcon.vue.d.ts +6 -0
  50. package/dist/components/MIconButton.vue.d.ts +5 -0
  51. package/dist/components/MKanban.vue.d.ts +1 -1
  52. package/dist/components/MLink.vue.d.ts +59 -0
  53. package/dist/components/MListItem.vue.d.ts +3 -1
  54. package/dist/components/MMapControl.vue.d.ts +1 -1
  55. package/dist/components/MNotificationCenter.vue.d.ts +1 -1
  56. package/dist/components/MNumberField.vue.d.ts +1 -1
  57. package/dist/components/MPagination.vue.d.ts +14 -1
  58. package/dist/components/MPdfSigner.vue.d.ts +2 -2
  59. package/dist/components/MRadio.vue.d.ts +2 -0
  60. package/dist/components/MRadioGroup.vue.d.ts +2 -0
  61. package/dist/components/MStatCard.vue.d.ts +2 -2
  62. package/dist/components/MSwitch.vue.d.ts +2 -0
  63. package/dist/components/MText.vue.d.ts +4 -2
  64. package/dist/components/MTextField.vue.d.ts +2 -0
  65. package/dist/components/_MDrawerItemList.vue.d.ts +6 -0
  66. package/dist/composables/_menuGroups.d.ts +10 -1
  67. package/dist/composables/_splitAttrs.d.ts +6 -0
  68. package/dist/composables/_springAnimation.d.ts +2 -2
  69. package/dist/composables/_useFocusTrap.d.ts +15 -0
  70. package/dist/composables/_usePaneResize.d.ts +1 -1
  71. package/dist/composables/_useSpring.d.ts +4 -4
  72. package/dist/composables/dynamicColor.d.ts +9 -1
  73. package/dist/composables/motion.d.ts +63 -0
  74. package/dist/composables/useConfirm.d.ts +28 -0
  75. package/dist/composables/useDevice.d.ts +8 -1
  76. package/dist/composables/useLocale.d.ts +14 -0
  77. package/dist/composables/useScrollReveal.d.ts +1 -1
  78. package/dist/composables/useTheme.d.ts +1 -0
  79. package/dist/composables/useToast.d.ts +7 -0
  80. package/dist/draw.js +556 -556
  81. package/dist/draw.js.map +1 -1
  82. package/dist/flow.js +854 -851
  83. package/dist/flow.js.map +1 -1
  84. package/dist/gantt.js +1118 -1096
  85. package/dist/gantt.js.map +1 -1
  86. package/dist/index.d.ts +8 -5
  87. package/dist/locales/index.d.ts +1 -0
  88. package/dist/locales/index.js +833 -1
  89. package/dist/locales/index.js.map +1 -1
  90. package/dist/locales/pl.d.ts +2 -0
  91. package/dist/m3ui-vue.css +1 -1
  92. package/dist/m3ui.js +10327 -9796
  93. package/dist/m3ui.js.map +1 -1
  94. package/dist/map.js +860 -860
  95. package/dist/map.js.map +1 -1
  96. package/dist/{material-color-utilities-CEFytLsr.js → material-color-utilities-BZsBNIhi.js} +276 -217
  97. package/dist/material-color-utilities-BZsBNIhi.js.map +1 -0
  98. package/dist/media.js +7 -7
  99. package/dist/{motion-BcejVTeX.js → motion-BqYcqcim.js} +15 -5
  100. package/dist/motion-BqYcqcim.js.map +1 -0
  101. package/dist/pdf-sign.js +140 -137
  102. package/dist/pdf-sign.js.map +1 -1
  103. package/dist/pdf.js +1 -1
  104. package/dist/plugin.d.ts +11 -0
  105. package/dist/rich-text-editor.js +7 -7
  106. package/dist/styles/theme.css +40 -0
  107. package/dist/styles.css +1 -1
  108. package/dist/terminal.js +1 -1
  109. package/dist/{useLocale-YRaOT12S.js → useLocale-BjcYauXr.js} +60 -4
  110. package/dist/useLocale-BjcYauXr.js.map +1 -0
  111. package/dist/{useThemeTokens-DyAdPQB0.js → useThemeTokens-D5nr5KHf.js} +28 -27
  112. package/dist/useThemeTokens-D5nr5KHf.js.map +1 -0
  113. package/package.json +17 -2
  114. package/src/__tests__/MAvatarImage.test.ts +37 -0
  115. package/src/__tests__/MDataTableControlled.test.ts +68 -0
  116. package/src/__tests__/MHotkeysSequence.test.ts +53 -0
  117. package/src/__tests__/MIconAxes.test.ts +16 -0
  118. package/src/__tests__/MIconButtonWidth.test.ts +22 -0
  119. package/src/__tests__/MLink.test.ts +46 -0
  120. package/src/__tests__/MPaginationPages.test.ts +43 -0
  121. package/src/__tests__/MTextEmphasized.test.ts +14 -0
  122. package/src/__tests__/controlDescription.test.ts +34 -0
  123. package/src/__tests__/customColor.test.ts +27 -0
  124. package/src/__tests__/dynamicColor.test.ts +3 -2
  125. package/src/__tests__/focusTrap.test.ts +124 -0
  126. package/src/__tests__/formatMessage.test.ts +20 -0
  127. package/src/__tests__/inputAttrs.test.ts +103 -0
  128. package/src/__tests__/localePresets.test.ts +2 -0
  129. package/src/__tests__/menuGroupsRemount.test.ts +40 -0
  130. package/src/__tests__/menuHydration.test.ts +41 -0
  131. package/src/__tests__/motionPrefs.test.ts +28 -0
  132. package/src/__tests__/ssr.test.ts +11 -0
  133. package/src/__tests__/ssrToast.test.ts +20 -0
  134. package/src/__tests__/toastDetails.test.ts +39 -0
  135. package/src/__tests__/useConfirm.test.ts +47 -0
  136. package/src/__tests__/useTheme.test.ts +14 -0
  137. package/src/__tests__/warningRole.test.ts +22 -0
  138. package/src/components/MAlert.vue +2 -2
  139. package/src/components/MAnimatedNumber.vue +9 -3
  140. package/src/components/MAutocomplete.vue +16 -4
  141. package/src/components/MAvailabilityCalendar.vue +3 -3
  142. package/src/components/MAvatar.vue +32 -5
  143. package/src/components/MAvatarGroup.vue +7 -2
  144. package/src/components/MBottomSheet.vue +18 -2
  145. package/src/components/MButton.vue +18 -5
  146. package/src/components/MCarousel.vue +3 -3
  147. package/src/components/MChatBubble.vue +14 -1
  148. package/src/components/MCheckbox.vue +21 -4
  149. package/src/components/MChip.vue +4 -2
  150. package/src/components/MCollapse.vue +7 -1
  151. package/src/components/MCommandPalette.vue +6 -2
  152. package/src/components/MContextMenu.vue +4 -4
  153. package/src/components/MCreditCardInput.vue +5 -0
  154. package/src/components/MDashboardGrid.vue +2 -1
  155. package/src/components/MDataTable.vue +63 -16
  156. package/src/components/MDialog.vue +21 -3
  157. package/src/components/MDiffViewer.vue +3 -3
  158. package/src/components/MDrawLayers.vue +3 -3
  159. package/src/components/MFabMenu.vue +7 -0
  160. package/src/components/MFloorPlan.vue +3 -3
  161. package/src/components/MFloorPlanInspector.vue +3 -3
  162. package/src/components/MFlow.vue +9 -5
  163. package/src/components/MFlowControls.vue +6 -0
  164. package/src/components/MFormBuilder.vue +1 -1
  165. package/src/components/MGantt.vue +10 -10
  166. package/src/components/MHotkeys.vue +61 -16
  167. package/src/components/MIcon.vue +17 -1
  168. package/src/components/MIconButton.vue +29 -6
  169. package/src/components/MImageCropper.vue +1 -1
  170. package/src/components/MKanban.vue +2 -1
  171. package/src/components/MLightbox.vue +5 -4
  172. package/src/components/MLink.vue +136 -0
  173. package/src/components/MListDetail.vue +7 -0
  174. package/src/components/MListItem.vue +7 -4
  175. package/src/components/MLoadingIndicator.vue +2 -1
  176. package/src/components/MMap.vue +3 -0
  177. package/src/components/MMapCluster.vue +2 -2
  178. package/src/components/MMapControl.vue +2 -2
  179. package/src/components/MMapMeasure.vue +1 -1
  180. package/src/components/MMaskField.vue +16 -3
  181. package/src/components/MMenu.vue +4 -4
  182. package/src/components/MMenuItem.vue +2 -2
  183. package/src/components/MMeterGroup.vue +3 -2
  184. package/src/components/MMortgageCalculator.vue +3 -3
  185. package/src/components/MMultiAutocomplete.vue +19 -7
  186. package/src/components/MMultiSelect.vue +19 -7
  187. package/src/components/MNavigationDrawer.vue +10 -3
  188. package/src/components/MNavigationRail.vue +5 -1
  189. package/src/components/MNotificationCenter.vue +2 -1
  190. package/src/components/MNotificationHost.vue +3 -3
  191. package/src/components/MNumberField.vue +23 -6
  192. package/src/components/MOdontogram.vue +4 -4
  193. package/src/components/MOrderBook.vue +4 -0
  194. package/src/components/MPagination.vue +91 -12
  195. package/src/components/MPdfSigner.vue +3 -3
  196. package/src/components/MPdfViewer.vue +7 -7
  197. package/src/components/MPhoneInput.vue +17 -4
  198. package/src/components/MProductConfigurator.vue +4 -4
  199. package/src/components/MProgressBar.vue +5 -0
  200. package/src/components/MQuiz.vue +8 -5
  201. package/src/components/MRadio.vue +24 -5
  202. package/src/components/MRadioGroup.vue +3 -0
  203. package/src/components/MReactions.vue +2 -2
  204. package/src/components/MResourceTimeline.vue +3 -3
  205. package/src/components/MResult.vue +1 -1
  206. package/src/components/MScrollField.vue +1 -1
  207. package/src/components/MSearchField.vue +6 -5
  208. package/src/components/MSeatMap.vue +5 -0
  209. package/src/components/MSeekBar.vue +3 -2
  210. package/src/components/MSelect.vue +16 -4
  211. package/src/components/MSideSheet.vue +25 -3
  212. package/src/components/MSimpleCarousel.vue +2 -2
  213. package/src/components/MSnackbar.vue +16 -13
  214. package/src/components/MSparkline.vue +2 -1
  215. package/src/components/MSpinner.vue +8 -0
  216. package/src/components/MSplitter.vue +1 -1
  217. package/src/components/MSpotlightSearch.vue +6 -2
  218. package/src/components/MSpreadsheet.vue +1 -1
  219. package/src/components/MStatCard.vue +2 -1
  220. package/src/components/MSwitch.vue +21 -4
  221. package/src/components/MTabs.vue +2 -1
  222. package/src/components/MTagInput.vue +19 -6
  223. package/src/components/MText.vue +23 -4
  224. package/src/components/MTextField.vue +25 -6
  225. package/src/components/MTimeline.vue +5 -5
  226. package/src/components/MToolbar.vue +2 -2
  227. package/src/components/MTour.vue +3 -0
  228. package/src/components/MTrackingTimeline.vue +6 -0
  229. package/src/components/MTypewriter.vue +7 -1
  230. package/src/components/MWindow.vue +10 -1
  231. package/src/components/_MColorPanel.vue +4 -4
  232. package/src/components/_MComment.vue +3 -2
  233. package/src/components/_MFlowNodeShell.vue +1 -1
  234. package/src/components/_MPdfPage.vue +1 -1
  235. package/src/components/_MTransferPane.vue +10 -0
  236. package/src/composables/_effectCanvas.ts +2 -1
  237. package/src/composables/_menuGroups.ts +10 -1
  238. package/src/composables/_splitAttrs.ts +29 -0
  239. package/src/composables/_springAnimation.ts +3 -3
  240. package/src/composables/_themeTransition.ts +3 -2
  241. package/src/composables/_useFocusTrap.ts +142 -0
  242. package/src/composables/_useMenuNav.ts +3 -3
  243. package/src/composables/_usePaneResize.ts +2 -1
  244. package/src/composables/_useSheetMotion.ts +3 -4
  245. package/src/composables/_useSpring.ts +16 -10
  246. package/src/composables/cron.ts +7 -6
  247. package/src/composables/dynamicColor.ts +21 -2
  248. package/src/composables/motion.ts +27 -0
  249. package/src/composables/useConfirm.ts +116 -0
  250. package/src/composables/useDevice.ts +23 -3
  251. package/src/composables/useFieldBg.ts +4 -0
  252. package/src/composables/useLocale.ts +74 -0
  253. package/src/composables/useNotification.ts +3 -0
  254. package/src/composables/useScrollReveal.ts +3 -3
  255. package/src/composables/useTheme.ts +8 -2
  256. package/src/composables/useToast.ts +27 -4
  257. package/src/directives/vSparkle.ts +2 -1
  258. package/src/index.ts +8 -5
  259. package/src/locales/ar.ts +7 -0
  260. package/src/locales/de.ts +7 -0
  261. package/src/locales/es.ts +7 -0
  262. package/src/locales/fr.ts +7 -0
  263. package/src/locales/index.ts +1 -0
  264. package/src/locales/ja.ts +7 -0
  265. package/src/locales/ko.ts +7 -0
  266. package/src/locales/pl.ts +807 -0
  267. package/src/locales/pt.ts +7 -0
  268. package/src/locales/zh.ts +7 -0
  269. package/src/plugin.ts +16 -0
  270. package/src/styles/theme.css +40 -0
  271. package/dist/MButton-B9RCM06i.js +0 -171
  272. package/dist/MButton-B9RCM06i.js.map +0 -1
  273. package/dist/MColorPickerModal-ChRtcZOo.js +0 -577
  274. package/dist/MColorPickerModal-ChRtcZOo.js.map +0 -1
  275. package/dist/MDialog-dk07tify.js +0 -167
  276. package/dist/MDialog-dk07tify.js.map +0 -1
  277. package/dist/MIcon-BSsJZhK7.js.map +0 -1
  278. package/dist/MIconButton-CrBPZidd.js +0 -288
  279. package/dist/MIconButton-CrBPZidd.js.map +0 -1
  280. package/dist/MListItem-h9H223vx.js +0 -1239
  281. package/dist/MListItem-h9H223vx.js.map +0 -1
  282. package/dist/MLoadingIndicator-YTV1Ov5w.js +0 -114
  283. package/dist/MLoadingIndicator-YTV1Ov5w.js.map +0 -1
  284. package/dist/MMenuItem-US0Zbglq.js.map +0 -1
  285. package/dist/MPdfViewer-DL9mRsd2.js.map +0 -1
  286. package/dist/MSeekBar-JFZcoJ8y.js +0 -434
  287. package/dist/MSeekBar-JFZcoJ8y.js.map +0 -1
  288. package/dist/MTextField-B6_iOczK.js.map +0 -1
  289. package/dist/material-color-utilities-CEFytLsr.js.map +0 -1
  290. package/dist/motion-BcejVTeX.js.map +0 -1
  291. package/dist/useLocale-YRaOT12S.js.map +0 -1
  292. package/dist/useThemeTokens-DyAdPQB0.js.map +0 -1
@@ -0,0 +1,317 @@
1
+ import { n as e, s as t, t as n } from "./motion-BqYcqcim.js";
2
+ import { t as r } from "./MIcon-CkUc9kuQ.js";
3
+ import { computed as i, createBlock as a, createVNode as o, defineComponent as s, normalizeClass as c, normalizeStyle as l, onMounted as u, onUnmounted as d, openBlock as f, ref as p, resolveDynamicComponent as m, unref as h, watch as g, withCtx as _, withDirectives as v } from "vue";
4
+ // src/directives/vRipple.ts
5
+ function y(e) {
6
+ return e === !1 ? { disabled: !0 } : typeof e == "string" ? { color: e } : e === !0 || e == null ? {} : e;
7
+ }
8
+ function b(e, t, n, r = !1) {
9
+ let i = e.getBoundingClientRect(), a = Math.max(i.width, i.height) * 2;
10
+ r && (t = {
11
+ clientX: i.left + i.width / 2,
12
+ clientY: i.top + i.height / 2
13
+ });
14
+ let o = document.createElement("span");
15
+ o.className = "m3-ripple-layer";
16
+ let s = document.createElement("span");
17
+ s.className = "m3-ripple", s.style.cssText = `width:${a}px;height:${a}px;top:${t.clientY - i.top - a / 2}px;left:${t.clientX - i.left - a / 2}px`, n && (s.style.background = n), o.appendChild(s), e.appendChild(o), s.addEventListener("animationend", () => o.remove(), { once: !0 });
18
+ }
19
+ var x = /* @__PURE__ */ new WeakMap(), S = "button, a[href], input, select, textarea, [role=\"button\"], [role=\"checkbox\"], [role=\"switch\"], [contenteditable], [data-no-ripple]", C = () => document.documentElement.dataset.m3Ripple === "off", w = {
20
+ mounted(e, t) {
21
+ let n = {
22
+ options: y(t.value),
23
+ onPointerDown(t) {
24
+ if (n.options.disabled || t.button !== 0 || C()) return;
25
+ let r = t.target?.closest?.(S);
26
+ if (r && r !== e && e.contains(r)) return;
27
+ let i = n.options.layer?.() ?? e, { position: a } = getComputedStyle(i);
28
+ a && a !== "static" || (i.style.position = "relative"), b(i, t, n.options.color, n.options.centered);
29
+ }
30
+ };
31
+ x.set(e, n), e.addEventListener("pointerdown", n.onPointerDown);
32
+ },
33
+ updated(e, t) {
34
+ let n = x.get(e);
35
+ n && (n.options = y(t.value));
36
+ },
37
+ beforeUnmount(e) {
38
+ let t = x.get(e);
39
+ t && e.removeEventListener("pointerdown", t.onPointerDown), x.delete(e);
40
+ }
41
+ }, T = 1e3 / 60, E = .004;
42
+ function D(e, t, n, r, i) {
43
+ let a = [e], o = e, s = n, c = 2 * r.dampingRatio * Math.sqrt(r.stiffness);
44
+ for (let e = 0; e < 600; e++) {
45
+ for (let e = T / 1e3; e > 1e-9; e -= E) {
46
+ let n = Math.min(E, e);
47
+ s += (-r.stiffness * (o - t) - c * s) * n, o += s * n;
48
+ }
49
+ if (a.push(o), Math.abs(o - t) < i && Math.abs(s) < i * 10) break;
50
+ }
51
+ return a[a.length - 1] = t, a;
52
+ }
53
+ function O(e, t) {
54
+ let n = Number(t ?? 0) / T, r = Math.floor(n);
55
+ return r >= e.length - 1 ? e[e.length - 1] : r < 0 ? e[0] : e[r] + (e[r + 1] - e[r]) * (n - r);
56
+ }
57
+ var k = (e) => (e.length - 1) * T;
58
+ function A(e, t, n, r = 0) {
59
+ if (!e || typeof e.animate != "function" || t.length < 2) return null;
60
+ let i = e.animate(t.map(n), {
61
+ duration: k(t),
62
+ delay: r,
63
+ easing: "linear"
64
+ });
65
+ return i.finished.catch(() => {}), i;
66
+ }
67
+ var j = t, M = (e) => ({
68
+ get dampingRatio() {
69
+ return n()[e].dampingRatio;
70
+ },
71
+ get stiffness() {
72
+ return n()[e].stiffness;
73
+ }
74
+ }), N = M("fastSpatial"), P = M("fastEffects"), F = M("defaultEffects"), I = M("defaultSpatial"), L = .004;
75
+ function R(e, t, n = N) {
76
+ let r = [...e()], i = r.map(() => 0), a = 0, o = 0;
77
+ function s(c) {
78
+ let l = Math.min((c - o) / 1e3, 1 / 30);
79
+ o = c;
80
+ let u = e();
81
+ u.length !== r.length && (r = [...u], i = u.map(() => 0));
82
+ let d = n.stiffness, f = 2 * n.dampingRatio * Math.sqrt(d);
83
+ for (; l > 0;) {
84
+ let e = Math.min(l, L);
85
+ l -= e;
86
+ for (let t = 0; t < u.length; t++) i[t] += (-d * (r[t] - u[t]) - f * i[t]) * e, r[t] += i[t] * e;
87
+ }
88
+ let p = u.every((e, t) => Math.abs(e - r[t]) < .05 && Math.abs(i[t]) < .05);
89
+ p && (r = [...u], i = u.map(() => 0)), t(r), a = p ? 0 : requestAnimationFrame(s);
90
+ }
91
+ function c() {
92
+ a ||= (o = performance.now(), requestAnimationFrame(s));
93
+ }
94
+ function l() {
95
+ cancelAnimationFrame(a), a = 0, r = [...e()], i = r.map(() => 0), t(r);
96
+ }
97
+ return g(() => e().join(","), c), u(() => t(r)), d(() => cancelAnimationFrame(a)), { snap: l };
98
+ }
99
+ var z = e(.4, 0, .2, 1), B = "relative inline-flex shrink-0 items-center justify-center transition-colors duration-150 cursor-pointer pointer-coarse:after:content-[''] pointer-coarse:after:absolute pointer-coarse:after:left-1/2 pointer-coarse:after:top-1/2 pointer-coarse:after:-translate-x-1/2 pointer-coarse:after:-translate-y-1/2 pointer-coarse:after:size-full pointer-coarse:after:min-h-12 pointer-coarse:after:min-w-12 disabled:cursor-not-allowed disabled:text-on-surface/38 before:content-[''] before:pointer-events-none before:absolute before:inset-0 before:rounded-[inherit] before:bg-current before:opacity-0 before:transition-opacity before:duration-150 enabled:hover:before:opacity-[0.08] enabled:focus-visible:before:opacity-[0.1] enabled:active:before:opacity-[0.1]", V = /* @__PURE__ */ s({
100
+ __name: "MIconButton",
101
+ props: {
102
+ icon: {},
103
+ label: {},
104
+ variant: { default: "standard" },
105
+ color: {},
106
+ contentColor: {},
107
+ shape: { default: "rounded" },
108
+ size: { default: "sm" },
109
+ width: {},
110
+ iconSize: {},
111
+ disabled: {
112
+ type: Boolean,
113
+ default: !1
114
+ },
115
+ to: {},
116
+ rippleColor: {},
117
+ checked: {
118
+ type: Boolean,
119
+ default: void 0
120
+ },
121
+ checkedIcon: {},
122
+ iconFilled: { type: Boolean }
123
+ },
124
+ emits: ["update:checked"],
125
+ setup(e, { emit: t }) {
126
+ let n = e, s = t, u = i(() => n.checked !== void 0), d = [
127
+ "primary",
128
+ "secondary",
129
+ "tertiary",
130
+ "error"
131
+ ], g = /^(on-)?(primary|secondary|tertiary|error|surface|surface-variant|inverse-surface|inverse-primary)(-container|-variant)?$/, y = i(() => {
132
+ let e = b(), t = n.contentColor;
133
+ return !t || n.disabled || u.value ? e : {
134
+ ...e,
135
+ color: g.test(t) ? `var(--color-${t})` : t
136
+ };
137
+ });
138
+ function b() {
139
+ let e = n.color;
140
+ if (!e || n.disabled || u.value) return;
141
+ let t = d.includes(e), r = t ? `var(--color-${e})` : e;
142
+ switch (n.variant) {
143
+ case "filled": return {
144
+ backgroundColor: r,
145
+ color: t ? `var(--color-on-${e})` : "#fff"
146
+ };
147
+ case "tonal": return t ? {
148
+ backgroundColor: `var(--color-${e}-container)`,
149
+ color: `var(--color-on-${e}-container)`
150
+ } : {
151
+ backgroundColor: `color-mix(in srgb, ${e} 20%, transparent)`,
152
+ color: e
153
+ };
154
+ default: return { color: r };
155
+ }
156
+ }
157
+ let x = i(() => n.to && !u.value ? "RouterLink" : "button"), S = {
158
+ xs: {
159
+ narrow: 28,
160
+ wide: 40
161
+ },
162
+ sm: {
163
+ narrow: 32,
164
+ wide: 52
165
+ },
166
+ md: {
167
+ narrow: 48,
168
+ wide: 72
169
+ },
170
+ lg: {
171
+ narrow: 64,
172
+ wide: 128
173
+ },
174
+ xl: {
175
+ narrow: 104,
176
+ wide: 184
177
+ }
178
+ }, C = i(() => typeof n.size == "number" || !n.width || n.width === "default" ? E.value.px : (S[n.size] ?? S.sm)[n.width]), T = {
179
+ xs: {
180
+ px: 32,
181
+ icon: 20,
182
+ squareRadius: "rounded-md",
183
+ square: 12,
184
+ pressed: 8,
185
+ checkedRound: 12
186
+ },
187
+ sm: {
188
+ px: 40,
189
+ icon: 24,
190
+ squareRadius: "rounded-md",
191
+ square: 12,
192
+ pressed: 8,
193
+ checkedRound: 12
194
+ },
195
+ md: {
196
+ px: 56,
197
+ icon: 24,
198
+ squareRadius: "rounded-lg",
199
+ square: 16,
200
+ pressed: 12,
201
+ checkedRound: 16
202
+ },
203
+ lg: {
204
+ px: 96,
205
+ icon: 32,
206
+ squareRadius: "rounded-xl",
207
+ square: 28,
208
+ pressed: 16,
209
+ checkedRound: 28
210
+ },
211
+ xl: {
212
+ px: 136,
213
+ icon: 40,
214
+ squareRadius: "rounded-xl",
215
+ square: 28,
216
+ pressed: 16,
217
+ checkedRound: 28
218
+ }
219
+ }, E = i(() => typeof n.size == "number" ? {
220
+ px: n.size,
221
+ icon: Math.round(n.size * .55),
222
+ squareRadius: "rounded-md",
223
+ square: 12,
224
+ pressed: 8,
225
+ checkedRound: 12
226
+ } : T[n.size] ?? T.sm), D = p(null), O = p(!1);
227
+ function k() {
228
+ let e = E.value, t = e.px / 2;
229
+ return O.value ? e.pressed : n.checked ? n.shape === "squared" ? t : e.checkedRound : n.shape === "squared" ? e.square : t;
230
+ }
231
+ R(() => u.value ? [k()] : [], (e) => {
232
+ D.value instanceof HTMLElement && (D.value.style.borderRadius = e.length ? `${e[0]}px` : "");
233
+ }, F);
234
+ function A() {
235
+ u.value && !n.disabled && (O.value = !0);
236
+ }
237
+ function j() {
238
+ O.value = !1;
239
+ }
240
+ function M() {
241
+ u.value && !n.disabled && s("update:checked", !n.checked);
242
+ }
243
+ let N = i(() => {
244
+ if (n.variant === "outlined" && n.checked) return "disabled:bg-on-surface/10";
245
+ switch (n.variant) {
246
+ case "filled":
247
+ case "tonal": return "disabled:bg-on-surface/10";
248
+ default: return "";
249
+ }
250
+ }), P = i(() => n.shape === "squared" ? E.value.squareRadius : "rounded-full"), I = i(() => {
251
+ let e = n.checked;
252
+ switch (n.variant) {
253
+ case "filled": return e ? "bg-primary text-on-primary" : "bg-surface-container text-on-surface-variant";
254
+ case "tonal": return e ? "bg-secondary text-on-secondary" : "bg-secondary-container text-on-secondary-container";
255
+ case "outlined": return e ? "bg-inverse-surface text-inverse-on-surface" : "border border-current text-on-surface-variant";
256
+ default: return e ? "text-primary" : "text-on-surface-variant";
257
+ }
258
+ }), L = i(() => {
259
+ if (u.value) return I.value;
260
+ switch (n.variant) {
261
+ case "filled": return "bg-primary text-on-primary";
262
+ case "tonal": return "bg-secondary-container text-on-secondary-container";
263
+ case "outlined": return "border border-current text-on-surface-variant";
264
+ default: return "text-on-surface-variant";
265
+ }
266
+ });
267
+ return (t, n) => v((f(), a(m(x.value), {
268
+ ref_key: "rootEl",
269
+ ref: D,
270
+ to: x.value === "RouterLink" ? e.to : void 0,
271
+ type: x.value === "RouterLink" ? void 0 : "button",
272
+ "aria-label": e.label || void 0,
273
+ "aria-pressed": u.value ? e.checked : void 0,
274
+ disabled: e.disabled,
275
+ class: c([
276
+ B,
277
+ P.value,
278
+ L.value,
279
+ N.value
280
+ ]),
281
+ style: l([{
282
+ width: `${C.value}px`,
283
+ height: `${E.value.px}px`
284
+ }, y.value]),
285
+ onPointerdown: A,
286
+ onPointerup: j,
287
+ onPointerleave: j,
288
+ onPointercancel: j,
289
+ onClick: M
290
+ }, {
291
+ default: _(() => [o(r, {
292
+ name: e.checked && e.checkedIcon ? e.checkedIcon : e.icon,
293
+ size: e.iconSize ?? E.value.icon,
294
+ filled: !!e.checked || e.iconFilled
295
+ }, null, 8, [
296
+ "name",
297
+ "size",
298
+ "filled"
299
+ ])]),
300
+ _: 1
301
+ }, 40, [
302
+ "to",
303
+ "type",
304
+ "aria-label",
305
+ "aria-pressed",
306
+ "disabled",
307
+ "class",
308
+ "style"
309
+ ])), [[h(w), {
310
+ disabled: e.disabled,
311
+ color: e.rippleColor
312
+ }]]);
313
+ }
314
+ });
315
+ export { N as a, T as c, O as d, D as f, P as i, A as l, F as n, z as o, w as p, I as r, R as s, V as t, j as u };
316
+
317
+ //# sourceMappingURL=MIconButton-DTFOfsTy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MIconButton-DTFOfsTy.js","names":["SUBSTEP","_withDirectives","_openBlock","_createBlock","_resolveDynamicComponent","_normalizeClass","_normalizeStyle","_withCtx","_createVNode","MIcon","_unref","cubicBezier","shouldReduceMotion","appSprings","MIcon_default","normalize","value","spawnRipple","rect","host","d","centered","layer","el","event","color","states","NESTED_CONTROLS","rippleOff","vRipple","state","binding","e","control","position","SAMPLE_MS","SUBSTEP$1","sampleSpring","out","from","pos","vel","velocity","damping","spring","i","left","h","to","epsilon","sampleAt","t","time","samples","samplesDuration","playSamples","anim","keyframe","prefersReducedMotion","live","name","FAST_SPATIAL","FAST_EFFECTS","DEFAULT_EFFECTS","DEFAULT_SPATIAL","SUBSTEP","useSpring","current","target","raf","last","frame","dt","now","k","spec","c","settled","v","apply","start","snap","watch","onMounted","onUnmounted","fastOutSlowIn","base","MIconButton_default","defineComponent","__emit","props","__props","emit","isToggle","computed","ROLES","ROLE","colorStyle","paintStyle","cc","role","main","tag","widthMap","containerWidth","resolved","sizeMap","rootEl","ref","pressed","targetRadius","r","full","onPointerDown","onPointerUp","onClick","disabledContainerClasses","shapeClass","toggleClasses","on","variantClasses","withDirectives","openBlock","createBlock","resolveDynamicComponent","normalizeClass","normalizeStyle","withCtx","createVNode","unref"],"sources":["../src/directives/vRipple.ts","../src/composables/_springAnimation.ts","../src/composables/_useSpring.ts","../src/components/MIconButton.vue"],"sourcesContent":["import type { Directive } from 'vue'\n\n/** Options for `v-ripple`. */\nexport interface RippleOptions {\n /** No ripple while true (e.g. bound to the element's disabled state). */\n disabled?: boolean\n /** Any CSS color for the ripple; defaults to the element's text color (`currentColor`). */\n color?: string\n /** Draw it in this element instead (e.g. the round state layer of a checkbox), clipped to its shape */\n layer?: () => HTMLElement | null | undefined\n /** Grow from the center instead of from the pointer (with `layer`, a selection control's unbounded ripple) */\n centered?: boolean\n}\n\n/** `v-ripple` value: nothing or `true` (on), `false` (off), a CSS color, or an options object. */\nexport type RippleValue = boolean | string | RippleOptions | null | undefined\n\nfunction normalize(value: RippleValue): RippleOptions {\n if (value === false) return { disabled: true }\n if (typeof value === 'string') return { color: value }\n if (value === true || value == null) return {}\n return value\n}\n\n// The ripple sits in its own clipping layer (`border-radius: inherit`), so the host only needs to be\n// positioned, not `overflow: hidden`.\nfunction spawnRipple(host: HTMLElement, event: { clientX: number; clientY: number }, color?: string, centered = false) {\n const rect = host.getBoundingClientRect()\n const d = Math.max(rect.width, rect.height) * 2\n if (centered) event = { clientX: rect.left + rect.width / 2, clientY: rect.top + rect.height / 2 }\n const layer = document.createElement('span')\n layer.className = 'm3-ripple-layer'\n const el = document.createElement('span')\n el.className = 'm3-ripple'\n el.style.cssText = `width:${d}px;height:${d}px;top:${event.clientY - rect.top - d / 2}px;left:${event.clientX - rect.left - d / 2}px`\n if (color) el.style.background = color\n layer.appendChild(el)\n host.appendChild(layer)\n el.addEventListener('animationend', () => layer.remove(), { once: true })\n}\n\ninterface RippleState {\n options: RippleOptions\n onPointerDown: (e: PointerEvent) => void\n}\n\nconst states = new WeakMap<HTMLElement, RippleState>()\n\nconst NESTED_CONTROLS = 'button, a[href], input, select, textarea, [role=\"button\"], [role=\"checkbox\"], [role=\"switch\"], [contenteditable], [data-no-ripple]'\n// App-wide off switch: `createM3UI({ ripple: false })`, or data-m3-ripple=\"off\" on <html>\nconst rippleOff = () => document.documentElement.dataset.m3Ripple === 'off'\n\n/**\n * The M3 press ripple for any element: `<div v-ripple>`, `v-ripple=\"false\"`, `v-ripple=\"'#e91e63'\"`\n * or `v-ripple=\"{ disabled, color }\"`. A statically positioned element is made `position: relative`.\n * Registered globally as `v-ripple` by `createM3UI()`; import `vRipple` to use it without the plugin.\n */\nexport const vRipple: Directive<HTMLElement, RippleValue> = {\n mounted(el, binding) {\n const state: RippleState = {\n options: normalize(binding.value),\n onPointerDown(e) {\n if (state.options.disabled || e.button !== 0 || rippleOff()) return\n // A control inside it (a button in a card, a list row's trailing switch) gets its own press, not this one\n const control = (e.target as Element | null)?.closest?.(NESTED_CONTROLS)\n if (control && control !== el && el.contains(control)) return\n const host = state.options.layer?.() ?? el\n // Checked on press, not on mount: the element may not be in the document yet when mounted.\n const { position } = getComputedStyle(host)\n if (!position || position === 'static') host.style.position = 'relative'\n spawnRipple(host, e, state.options.color, state.options.centered)\n },\n }\n states.set(el, state)\n el.addEventListener('pointerdown', state.onPointerDown)\n },\n updated(el, binding) {\n const state = states.get(el)\n if (state) state.options = normalize(binding.value)\n },\n beforeUnmount(el) {\n const state = states.get(el)\n if (state) el.removeEventListener('pointerdown', state.onPointerDown)\n states.delete(el)\n },\n}\n","import { shouldReduceMotion, type SpringSpec } from './motion'\n\n/*\n * Internal (not exported from index.ts): springs played as Web Animations.\n *\n * The library's springs normally step in a rAF loop (see CLAUDE.md). That loop runs on the main thread, and an\n * enter/exit animation starts exactly when the main thread is busiest: mounting the panel's content, re-laying\n * out the page for a scroll lock. On phones that janked visibly (MNavigationDrawer's open, where the old CSS\n * transition hadn't, since the compositor runs those). So enter/exit/settle springs are simulated up front, one\n * sample per 60Hz frame, and played as a linear Web Animation of transform/opacity, which the compositor runs\n * too. Same curve, bounce and release velocity as the loop; only a finger-driven drag writes styles directly.\n *\n * Pattern: write the end state inline, then play the samples over it (an animation beats inline styles), so\n * nothing jumps when it ends; to interrupt, read `sampleAt(samples, anim.currentTime)`, write that inline and\n * cancel.\n */\n\nexport const SAMPLE_MS = 1000 / 60\n// Stiff springs (FastEffects, 3800) diverge at a 16ms Euler step: integrate in 4ms substeps\nconst SUBSTEP = 0.004\n\n/**\n * The spring from `from` to `to`, starting at `velocity` (units/s), one sample per 60Hz frame until it's within\n * `epsilon` of `to` (and slower than `epsilon * 10` per second). The last sample is exactly `to`.\n */\nexport function sampleSpring(from: number, to: number, velocity: number, spring: SpringSpec, epsilon: number): number[] {\n const out = [from]\n let pos = from\n let vel = velocity\n const damping = 2 * spring.dampingRatio * Math.sqrt(spring.stiffness)\n for (let i = 0; i < 600; i++) {\n for (let left = SAMPLE_MS / 1000; left > 1e-9; left -= SUBSTEP) {\n const h = Math.min(SUBSTEP, left)\n vel += (-spring.stiffness * (pos - to) - damping * vel) * h\n pos += vel * h\n }\n out.push(pos)\n if (Math.abs(pos - to) < epsilon && Math.abs(vel) < epsilon * 10) break\n }\n out[out.length - 1] = to\n return out\n}\n\n/** The value `samples` has `time` ms into playback (an Animation's currentTime), linear between frames */\nexport function sampleAt(samples: number[], time: CSSNumberish | null | undefined): number {\n const t = Number(time ?? 0) / SAMPLE_MS\n const i = Math.floor(t)\n if (i >= samples.length - 1) return samples[samples.length - 1]!\n if (i < 0) return samples[0]!\n return samples[i]! + (samples[i + 1]! - samples[i]!) * (t - i)\n}\n\n/** How long `samples` play, in ms */\nexport const samplesDuration = (samples: number[]) => (samples.length - 1) * SAMPLE_MS\n\n/**\n * Plays `samples` on `el` as a linear Web Animation, each mapped to a keyframe. Null when there's nothing to\n * play or no Web Animations API (the inline end state then simply stands).\n */\nexport function playSamples(\n el: Element | null | undefined,\n samples: number[],\n keyframe: (value: number) => Keyframe,\n delay = 0,\n): Animation | null {\n if (!el || typeof (el as HTMLElement).animate !== 'function' || samples.length < 2) return null\n const anim = (el as HTMLElement).animate(samples.map(keyframe), { duration: samplesDuration(samples), delay, easing: 'linear' })\n // cancel() rejects `finished`; nothing has to wait on it\n anim.finished.catch(() => {})\n return anim\n}\n\n// The user's setting or createM3UI({ reducedMotion: 'always' })\nexport const prefersReducedMotion = shouldReduceMotion\n","// A set of numbers (corner radii, sizes...) that springs toward a target, written to the DOM once per\n// frame through `apply`. Same integration as the rest of the library (semi-implicit Euler), in fixed 4ms\n// substeps so a stiff spring stays stable on a dropped frame. `useSpring` is public (index.ts, with the\n// motion tokens); the constants below are the library's internal shorthands for the app's scheme.\nimport { onMounted, onUnmounted, watch } from 'vue'\nimport { appSprings, cubicBezier, type SpringSpec } from './motion'\n\nexport type { SpringSpec }\n\n// Read through getters, so a spring picks up the app's motion scheme (createM3UI({ motionScheme })) when it runs\n// rather than when this module loads\nconst live = (name: keyof ReturnType<typeof appSprings>): SpringSpec => ({\n get dampingRatio() { return appSprings()[name].dampingRatio },\n get stiffness() { return appSprings()[name].stiffness },\n})\n/** MotionSchemeKeyTokens.FastSpatial in the app's scheme (Standard unless createM3UI picks Expressive) */\nexport const FAST_SPATIAL: SpringSpec = live('fastSpatial')\n/** MotionSchemeKeyTokens.FastEffects (the same in both schemes) */\nexport const FAST_EFFECTS: SpringSpec = live('fastEffects')\n/** MotionSchemeKeyTokens.DefaultEffects (the same in both schemes) */\nexport const DEFAULT_EFFECTS: SpringSpec = live('defaultEffects')\n/** MotionSchemeKeyTokens.DefaultSpatial in the app's scheme */\nexport const DEFAULT_SPATIAL: SpringSpec = live('defaultSpatial')\n\nconst SUBSTEP = 0.004\n\nexport function useSpring(\n target: () => number[],\n apply: (values: readonly number[]) => void,\n spec: SpringSpec = FAST_SPATIAL,\n) {\n let current = [...target()]\n let velocity = current.map(() => 0)\n let raf = 0\n let last = 0\n\n function frame(now: number) {\n let dt = Math.min((now - last) / 1000, 1 / 30)\n last = now\n const t = target()\n if (t.length !== current.length) {\n current = [...t]\n velocity = t.map(() => 0)\n }\n const k = spec.stiffness\n const c = 2 * spec.dampingRatio * Math.sqrt(k)\n while (dt > 0) {\n const h = Math.min(dt, SUBSTEP)\n dt -= h\n for (let i = 0; i < t.length; i++) {\n velocity[i]! += (-k * (current[i]! - t[i]!) - c * velocity[i]!) * h\n current[i]! += velocity[i]! * h\n }\n }\n const settled = t.every((v, i) => Math.abs(v - current[i]!) < 0.05 && Math.abs(velocity[i]!) < 0.05)\n if (settled) {\n current = [...t]\n velocity = t.map(() => 0)\n }\n apply(current)\n raf = settled ? 0 : requestAnimationFrame(frame)\n }\n\n function start() {\n if (raf) return\n last = performance.now()\n raf = requestAnimationFrame(frame)\n }\n\n /** Jumps to the target without animating (e.g. when the layout context changes). */\n function snap() {\n cancelAnimationFrame(raf)\n raf = 0\n current = [...target()]\n velocity = current.map(() => 0)\n apply(current)\n }\n\n watch(() => target().join(','), start)\n onMounted(() => apply(current))\n onUnmounted(() => cancelAnimationFrame(raf))\n\n return { snap }\n}\n\n/** Compose's FastOutSlowInEasing, cubic-bezier(0.4, 0, 0.2, 1) — the easing of a default tween() */\nexport const fastOutSlowIn = cubicBezier(0.4, 0, 0.2, 1)\n","<script setup lang=\"ts\">\n/**\n * A button that shows only an icon — four visual styles, the same 5-tier expressive sizing as MButton. Give it\n * `checked` (v-model:checked) and it becomes M3's icon toggle button.\n *\n * @event update:checked Emitted on click when `checked` is set — powers v-model:checked\n */\nimport { computed, ref } from 'vue'\nimport MIcon from './MIcon.vue'\nimport { vRipple } from '../directives/vRipple'\nimport { DEFAULT_EFFECTS, useSpring } from '../composables/_useSpring'\n\nconst props = withDefaults(\n defineProps<{\n /** Material Symbol icon name */\n icon: string\n /** Accessible label (its aria-label; no visible tooltip: wrap it in MTooltip for one) */\n label?: string\n /** Visual style */\n variant?: 'standard' | 'filled' | 'tonal' | 'outlined'\n /**\n * An M3 role or any CSS color (`#fff` over a photo, `rgb(0 0 0 / 0.3)` for a scrim-like filled button,\n * `currentColor` to follow the surrounding text). Standard and outlined use it for the icon; filled for the\n * container with white (or the role's on-color) on it; tonal for a 20% container with the color on it.\n * Disabled buttons and toggles keep their own colors\n */\n color?: 'primary' | 'secondary' | 'tertiary' | 'error' | (string & {})\n /**\n * Icon color over what the variant and `color` give: an M3 role (`on-surface`…) or any CSS color (`#000` on a\n * white filled button). Disabled buttons and toggles keep their own\n */\n contentColor?: string\n /**\n * Button shape — rounded (pill, always) or squared (corner radius scales with size: 12px xs/sm, 16px md,\n * 28px lg/xl)\n */\n shape?: 'rounded' | 'squared'\n /** M3's 5-tier icon button sizing (xs:32, sm:40, md:56, lg:96, xl:136), or a custom pixel value */\n size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | number\n /**\n * M3 Expressive width option (IconButtonDefaults' IconButtonWidthOption): `narrow` and `wide` keep the height and\n * change only the width (sm: 32 / 40 / 52px). Ignored with a numeric size\n */\n width?: 'narrow' | 'default' | 'wide'\n /** Icon size in px. Default the size tier's (or 55% of a custom pixel `size`) */\n iconSize?: number\n /** Disables interaction */\n disabled?: boolean\n /** Vue Router destination — renders as RouterLink instead of button */\n to?: string | Record<string, any>\n /** Any CSS color for the press ripple; defaults to the button's content color */\n rippleColor?: string\n /**\n * Makes it a toggle button (v-model:checked): selected colors, a filled icon, and a shape that morphs when\n * pressed and when checked. Leave it unset for a plain icon button\n */\n checked?: boolean\n /** Icon shown while checked, when it differs from `icon` (e.g. 'pause' for 'play_arrow') */\n checkedIcon?: string\n /** Draw the icon filled (Material Symbols' FILL axis) without making it a toggle, e.g. media controls */\n iconFilled?: boolean\n }>(),\n {\n variant: 'standard',\n shape: 'rounded',\n size: 'sm',\n disabled: false,\n checked: undefined,\n },\n)\n\nconst emit = defineEmits<{ 'update:checked': [boolean] }>()\n\nconst isToggle = computed(() => props.checked !== undefined)\n\nconst ROLES = ['primary', 'secondary', 'tertiary', 'error']\n// Color-role names (`on-surface`…) read the theme's token; anything else is a CSS color\nconst ROLE = /^(on-)?(primary|secondary|tertiary|error|surface|surface-variant|inverse-surface|inverse-primary)(-container|-variant)?$/\nconst colorStyle = computed(() => {\n const base = paintStyle()\n const cc = props.contentColor\n if (!cc || props.disabled || isToggle.value) return base\n return { ...base, color: ROLE.test(cc) ? `var(--color-${cc})` : cc }\n})\n// `color` as inline styles over the variant's classes, so the default look stays class-only\nfunction paintStyle() {\n const c = props.color\n if (!c || props.disabled || isToggle.value) return undefined\n const role = ROLES.includes(c)\n const main = role ? `var(--color-${c})` : c\n switch (props.variant) {\n case 'filled':\n return { backgroundColor: main, color: role ? `var(--color-on-${c})` : '#fff' }\n case 'tonal':\n return role\n ? { backgroundColor: `var(--color-${c}-container)`, color: `var(--color-on-${c}-container)` }\n : { backgroundColor: `color-mix(in srgb, ${c} 20%, transparent)`, color: c }\n default:\n return { color: main }\n }\n}\nconst tag = computed(() => props.to && !isToggle.value ? 'RouterLink' : 'button')\n\n// Container height/width (square by default; the `width` prop's narrow/wide options are\n// `widthMap` above, from `IconButtonDefaults.<tier>ContainerSize(widthOption)`) and icon size\n// per M3's 5-tier `{XSmall,Small,Medium,Large,XLarge}IconButtonTokens.kt`. `squareRadius`\n// matches each tier's own `ContainerShapeSquare` (12px xs/sm, 16px md, 28px lg/xl) — same\n// pattern as MButton's size tiers.\n// Toggle radii (px) from the same token files: `square` is ContainerShapeSquare, `pressed`\n// PressedContainerShape, `checkedRound` SelectedContainerShapeRound (a round button squares off when\n// checked); SelectedContainerShapeSquare is CornerFull (a square one turns round), i.e. px / 2.\n// Widths of the narrow and wide options: icon size + twice each tier's Narrow/WideLeadingSpace\n// (IconButton{XSmall…XLarge}Tokens: xs 4/10dp, sm 4/14, md 12/24, lg 16/48, xl 32/72)\nconst widthMap = {\n xs: { narrow: 28, wide: 40 },\n sm: { narrow: 32, wide: 52 },\n md: { narrow: 48, wide: 72 },\n lg: { narrow: 64, wide: 128 },\n xl: { narrow: 104, wide: 184 },\n}\nconst containerWidth = computed(() => {\n if (typeof props.size === 'number' || !props.width || props.width === 'default') return resolved.value.px\n return (widthMap[props.size] ?? widthMap.sm)[props.width]\n})\n\nconst sizeMap = {\n xs: { px: 32, icon: 20, squareRadius: 'rounded-md', square: 12, pressed: 8, checkedRound: 12 },\n sm: { px: 40, icon: 24, squareRadius: 'rounded-md', square: 12, pressed: 8, checkedRound: 12 },\n md: { px: 56, icon: 24, squareRadius: 'rounded-lg', square: 16, pressed: 12, checkedRound: 16 },\n lg: { px: 96, icon: 32, squareRadius: 'rounded-xl', square: 28, pressed: 16, checkedRound: 28 },\n xl: { px: 136, icon: 40, squareRadius: 'rounded-xl', square: 28, pressed: 16, checkedRound: 28 },\n}\n\nconst resolved = computed(() => {\n if (typeof props.size === 'number') {\n return { px: props.size, icon: Math.round(props.size * 0.55), squareRadius: 'rounded-md', square: 12, pressed: 8, checkedRound: 12 }\n }\n return sizeMap[props.size] ?? sizeMap.sm\n})\n\n// Icon toggle shape morph (IconButton.kt's shapeByInteraction: pressed, else checked, else the resting\n// shape), on the DefaultEffects spring the source picks so it doesn't bounce. Plain icon buttons keep\n// a static shape, like Compose's non-`shapes` overloads.\nconst rootEl = ref<unknown>(null)\nconst pressed = ref(false)\n\nfunction targetRadius() {\n const r = resolved.value\n const full = r.px / 2\n if (pressed.value) return r.pressed\n if (props.checked) return props.shape === 'squared' ? full : r.checkedRound\n return props.shape === 'squared' ? r.square : full\n}\n\nuseSpring(\n () => (isToggle.value ? [targetRadius()] : []),\n (v) => {\n // A RouterLink root (plain button with `to`) is a component instance, not an element\n if (rootEl.value instanceof HTMLElement) rootEl.value.style.borderRadius = v.length ? `${v[0]}px` : ''\n },\n DEFAULT_EFFECTS,\n)\n\nfunction onPointerDown() {\n if (isToggle.value && !props.disabled) pressed.value = true\n}\nfunction onPointerUp() {\n pressed.value = false\n}\n\nfunction onClick() {\n if (isToggle.value && !props.disabled) emit('update:checked', !props.checked)\n}\n\n/*\n * State layer via a `before:` overlay (same technique MButton uses) rather than a direct\n * `hover:bg-*`/`active:bg-*` utility: a solid `bg-primary`/`bg-secondary-container`\n * container can't also swap to a translucent hover background without just replacing the\n * color outright, so hover/press need a separate semi-transparent layer painted on top,\n * tinted with the button's own content color (`before:bg-current`) — matches real M3's\n * per-variant Hovered/PressedColor tokens, which are all just the content color at a fixed\n * opacity (8% hover, 10% focus and press), the same universal state-layer pattern across every variant.\n */\n// M3's minimum touch target (minimumInteractiveComponentSize, 48dp): on a touch screen (pointer: coarse) an invisible\n// box centered on the button, so the 32px and 40px sizes still take a 48px tap. Not with a mouse: there it would only\n// widen the hover and overlap neighbors in dense toolbars. Needs the button not to clip (no overflow-hidden): the state layer\n// rounds itself instead, and the ripple clips in its own layer.\nconst base =\n 'relative inline-flex shrink-0 items-center justify-center transition-colors duration-150 cursor-pointer ' +\n \"pointer-coarse:after:content-[''] pointer-coarse:after:absolute pointer-coarse:after:left-1/2 pointer-coarse:after:top-1/2 pointer-coarse:after:-translate-x-1/2 pointer-coarse:after:-translate-y-1/2 pointer-coarse:after:size-full pointer-coarse:after:min-h-12 pointer-coarse:after:min-w-12 \" +\n 'disabled:cursor-not-allowed disabled:text-on-surface/38 ' +\n \"before:content-[''] before:pointer-events-none before:absolute before:inset-0 before:rounded-[inherit] \" +\n 'before:bg-current before:opacity-0 before:transition-opacity before:duration-150 ' +\n 'enabled:hover:before:opacity-[0.08] enabled:focus-visible:before:opacity-[0.1] enabled:active:before:opacity-[0.1]'\n\n// M3 disabled container opacity is 10% on-surface (DisabledContainerOpacity, Filled/Tonal\n// only — Outlined has no container). Outlined's border needs no separate disabled class:\n// it's `border-current` (see `variantClasses`), so it dims automatically along with the\n// `disabled:text-on-surface/38` in `base` above, exactly like the real `outlinedIconButtonBorder`\n// (which literally reuses `LocalContentColor` at the same disabled opacity as the icon).\nconst disabledContainerClasses = computed(() => {\n if (props.variant === 'outlined' && props.checked) return 'disabled:bg-on-surface/10'\n switch (props.variant) {\n case 'filled':\n case 'tonal':\n return 'disabled:bg-on-surface/10'\n default:\n return ''\n }\n})\n\nconst shapeClass = computed(() => props.shape === 'squared' ? resolved.value.squareRadius : 'rounded-full')\n\n\n// Toggle colors: the Selected*/Unselected* tokens of each variant's *IconButtonTokens. Unchecked\n// filled/tonal differ from the plain button's colors, so the checked state stands out.\nconst toggleClasses = computed(() => {\n const on = props.checked\n switch (props.variant) {\n case 'filled':\n return on ? 'bg-primary text-on-primary' : 'bg-surface-container text-on-surface-variant'\n case 'tonal':\n return on ? 'bg-secondary text-on-secondary' : 'bg-secondary-container text-on-secondary-container'\n case 'outlined':\n // outlinedIconToggleButtonBorder: no border once checked\n return on ? 'bg-inverse-surface text-inverse-on-surface' : 'border border-current text-on-surface-variant'\n default:\n return on ? 'text-primary' : 'text-on-surface-variant'\n }\n})\n\nconst variantClasses = computed(() => {\n if (isToggle.value) return toggleClasses.value\n switch (props.variant) {\n case 'filled':\n // Real IconButton.kt has no elevation tokens at all for any variant — flat, unlike Button\n return 'bg-primary text-on-primary'\n case 'tonal':\n return 'bg-secondary-container text-on-secondary-container'\n case 'outlined':\n // OutlinedIconButtonTokens' default (non-\"vibrant\") border tracks LocalContentColor,\n // i.e. the same on-surface-variant used for the icon itself — not a fixed outline token\n return 'border border-current text-on-surface-variant'\n default:\n return 'text-on-surface-variant'\n }\n})\n</script>\n\n<template>\n <component\n :is=\"tag\"\n ref=\"rootEl\"\n :to=\"tag === 'RouterLink' ? to : undefined\"\n :type=\"tag === 'RouterLink' ? undefined : 'button'\"\n :aria-label=\"label || undefined\"\n :aria-pressed=\"isToggle ? checked : undefined\"\n :disabled=\"disabled\"\n :class=\"[base, shapeClass, variantClasses, disabledContainerClasses]\"\n :style=\"[{ width: `${containerWidth}px`, height: `${resolved.px}px` }, colorStyle]\"\n v-ripple=\"{ disabled, color: rippleColor }\"\n @pointerdown=\"onPointerDown\"\n @pointerup=\"onPointerUp\"\n @pointerleave=\"onPointerUp\"\n @pointercancel=\"onPointerUp\"\n @click=\"onClick\"\n >\n <MIcon :name=\"checked && checkedIcon ? checkedIcon : icon\" :size=\"iconSize ?? resolved.icon\" :filled=\"!!checked || iconFilled\" />\n </component>\n</template>\n"],"mappings":";;;;AAiBA,SAASe,EAAU,GAAmC;CAIpD,OAHIC,MAAU,KAAc,EAAE,UAAU,GAAK,IACzC,OAAOA,KAAU,WAAiB,EAAE,OAAOA,EAAM,IACjDA,MAAU,MAAQA,KAAS,OAAa,CAAC,IACtCA;AACT;AAIA,SAASC,EAAY,GAAmB,GAA6C,GAAgB,IAAW,IAAO;CACrH,IAAMC,IAAOC,EAAK,sBAAsB,GAClCC,IAAI,KAAK,IAAIF,EAAK,OAAOA,EAAK,MAAM,IAAI;CAC9C,AAAIG,MAAU,IAAQ;EAAE,SAASH,EAAK,OAAOA,EAAK,QAAQ;EAAG,SAASA,EAAK,MAAMA,EAAK,SAAS;CAAE;CACjG,IAAMI,IAAQ,SAAS,cAAc,MAAM;CAC3C,EAAM,YAAY;CAClB,IAAMC,IAAK,SAAS,cAAc,MAAM;CAMxC,AALA,EAAG,YAAY,aACf,EAAG,MAAM,UAAU,SAASH,EAAE,YAAYA,EAAE,SAASI,EAAM,UAAUN,EAAK,MAAME,IAAI,EAAE,UAAUI,EAAM,UAAUN,EAAK,OAAOE,IAAI,EAAE,KAC9HK,MAAO,EAAG,MAAM,aAAaA,IACjCH,EAAM,YAAYC,CAAE,GACpBJ,EAAK,YAAYG,C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