@m3ui-vue/m3ui-vue 1.2.2 → 1.3.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 (241) hide show
  1. package/dist/API.md +3010 -376
  2. package/dist/MButton-Bl_BSUep.js +172 -0
  3. package/dist/MButton-Bl_BSUep.js.map +1 -0
  4. package/dist/MDialog-D_Yik8ou.js +173 -0
  5. package/dist/MDialog-D_Yik8ou.js.map +1 -0
  6. package/dist/MIconButton-DoNotQ9v.js +282 -0
  7. package/dist/MIconButton-DoNotQ9v.js.map +1 -0
  8. package/dist/MListItem-BxifHJdU.js +824 -0
  9. package/dist/MListItem-BxifHJdU.js.map +1 -0
  10. package/dist/MLoadingIndicator-BxbFhSX6.js +115 -0
  11. package/dist/MLoadingIndicator-BxbFhSX6.js.map +1 -0
  12. package/dist/MMenuItem-Bih0h4-n.js +604 -0
  13. package/dist/MMenuItem-Bih0h4-n.js.map +1 -0
  14. package/dist/MProgressBar-BCoruxA-.js +184 -0
  15. package/dist/MProgressBar-BCoruxA-.js.map +1 -0
  16. package/dist/MSeekBar-BeN9QcB3.js +435 -0
  17. package/dist/MSeekBar-BeN9QcB3.js.map +1 -0
  18. package/dist/MSegmentedButton-DL9JtJFX.js +65 -0
  19. package/dist/MSegmentedButton-DL9JtJFX.js.map +1 -0
  20. package/dist/MSlider-BVSbJlGS.js +691 -0
  21. package/dist/MSlider-BVSbJlGS.js.map +1 -0
  22. package/dist/MSpinner-C2SUnWk4.js +65 -0
  23. package/dist/MSpinner-C2SUnWk4.js.map +1 -0
  24. package/dist/MTextField-CEkWSZ2v.js +296 -0
  25. package/dist/MTextField-CEkWSZ2v.js.map +1 -0
  26. package/dist/MTooltip-CodJGEO-.js +756 -0
  27. package/dist/MTooltip-CodJGEO-.js.map +1 -0
  28. package/dist/_storageKeys-CYXsUBwK.js +18 -0
  29. package/dist/_storageKeys-CYXsUBwK.js.map +1 -0
  30. package/dist/_useEscapeStack-CjndQhqg.js +19 -0
  31. package/dist/_useEscapeStack-CjndQhqg.js.map +1 -0
  32. package/dist/api.json +1 -1
  33. package/dist/chart.js +1 -1
  34. package/dist/code-editor.js +1 -1
  35. package/dist/components/MAudioPlayer.vue.d.ts +115 -0
  36. package/dist/components/MBadge.vue.d.ts +1 -1
  37. package/dist/components/MBottomSheetScaffold.vue.d.ts +1 -1
  38. package/dist/components/MBox.vue.d.ts +1 -1
  39. package/dist/components/MButton.vue.d.ts +1 -1
  40. package/dist/components/MConfirmDialog.vue.d.ts +1 -1
  41. package/dist/components/MCopyButton.vue.d.ts +2 -2
  42. package/dist/components/MDataTable.vue.d.ts +2 -2
  43. package/dist/components/MDialog.vue.d.ts +2 -2
  44. package/dist/components/MDivider.vue.d.ts +1 -1
  45. package/dist/components/MDragHandle.vue.d.ts +1 -1
  46. package/dist/components/MDrawCanvas.vue.d.ts +150 -0
  47. package/dist/components/MDrawLayers.vue.d.ts +3 -0
  48. package/dist/components/MDrawToolbar.vue.d.ts +34 -0
  49. package/dist/components/MExportButton.vue.d.ts +1 -1
  50. package/dist/components/MFab.vue.d.ts +2 -2
  51. package/dist/components/MFabMenu.vue.d.ts +2 -2
  52. package/dist/components/MFixed.vue.d.ts +1 -1
  53. package/dist/components/MFlex.vue.d.ts +2 -2
  54. package/dist/components/MFloorPlan.vue.d.ts +248 -0
  55. package/dist/components/MFloorPlanInspector.vue.d.ts +56 -0
  56. package/dist/components/MFloorPlanToolbar.vue.d.ts +51 -0
  57. package/dist/components/MFlow.vue.d.ts +318 -0
  58. package/dist/components/MFlowControls.vue.d.ts +33 -0
  59. package/dist/components/MFlowHandle.vue.d.ts +16 -0
  60. package/dist/components/MFlowMinimap.vue.d.ts +22 -0
  61. package/dist/components/MFlowNode.vue.d.ts +35 -0
  62. package/dist/components/MGantt.vue.d.ts +141 -0
  63. package/dist/components/MGanttControls.vue.d.ts +32 -0
  64. package/dist/components/MIconButton.vue.d.ts +3 -1
  65. package/dist/components/MImageCropper.vue.d.ts +110 -0
  66. package/dist/components/MInfiniteScroll.vue.d.ts +1 -1
  67. package/dist/components/MLightbox.vue.d.ts +2 -2
  68. package/dist/components/MList.vue.d.ts +1 -1
  69. package/dist/components/MLoadingOverlay.vue.d.ts +1 -1
  70. package/dist/components/MMapControl.vue.d.ts +1 -1
  71. package/dist/components/MMapSearch.vue.d.ts +1 -1
  72. package/dist/components/MMaskField.vue.d.ts +12 -1
  73. package/dist/components/MMenu.vue.d.ts +1 -1
  74. package/dist/components/MNavigationDrawer.vue.d.ts +1 -1
  75. package/dist/components/MNumberField.vue.d.ts +11 -2
  76. package/dist/components/MPdfViewer.vue.d.ts +174 -0
  77. package/dist/components/MPullToRefresh.vue.d.ts +1 -1
  78. package/dist/components/MResourceTimeline.vue.d.ts +149 -0
  79. package/dist/components/MScheduler.vue.d.ts +3 -3
  80. package/dist/components/MScheme.vue.d.ts +1 -1
  81. package/dist/components/MSearchField.vue.d.ts +1 -1
  82. package/dist/components/MSeekBar.vue.d.ts +1 -1
  83. package/dist/components/MSimpleCarousel.vue.d.ts +1 -1
  84. package/dist/components/MSkeleton.vue.d.ts +1 -1
  85. package/dist/components/MSlider.vue.d.ts +2 -2
  86. package/dist/components/MSparkline.vue.d.ts +1 -1
  87. package/dist/components/MSplitter.vue.d.ts +1 -1
  88. package/dist/components/MStack.vue.d.ts +2 -2
  89. package/dist/components/MSwipeToDismiss.vue.d.ts +1 -1
  90. package/dist/components/MSwitch.vue.d.ts +1 -1
  91. package/dist/components/MTable.vue.d.ts +1 -1
  92. package/dist/components/MTagInput.vue.d.ts +12 -1
  93. package/dist/components/MTextField.vue.d.ts +13 -2
  94. package/dist/components/MToolbar.vue.d.ts +1 -1
  95. package/dist/components/MTree.vue.d.ts +2 -2
  96. package/dist/components/MVideoPlayer.vue.d.ts +253 -0
  97. package/dist/components/MVirtualTable.vue.d.ts +1 -1
  98. package/dist/components/MWindow.vue.d.ts +3 -3
  99. package/dist/components/_MFlowEdge.vue.d.ts +9 -0
  100. package/dist/components/_MFlowEdgeLabel.vue.d.ts +9 -0
  101. package/dist/components/_MFlowNodeShell.vue.d.ts +9 -0
  102. package/dist/components/_MPdfPage.vue.d.ts +76 -0
  103. package/dist/components/_MTimeBackground.vue.d.ts +14 -0
  104. package/dist/components/_MTimeHeader.vue.d.ts +20 -0
  105. package/dist/composables/_flowPanel.d.ts +2 -0
  106. package/dist/composables/_flowSlot.d.ts +5 -0
  107. package/dist/composables/_ganttTime.d.ts +41 -0
  108. package/dist/composables/_useTimeAxis.d.ts +90 -0
  109. package/dist/composables/drawGeometry.d.ts +119 -0
  110. package/dist/composables/flowFormats.d.ts +79 -0
  111. package/dist/composables/flowLayout.d.ts +45 -0
  112. package/dist/composables/flowPaths.d.ts +53 -0
  113. package/dist/composables/ganttFormats.d.ts +52 -0
  114. package/dist/composables/ganttSchedule.d.ts +99 -0
  115. package/dist/composables/useDrawing.d.ts +44 -0
  116. package/dist/composables/useFloorPlan.d.ts +58 -0
  117. package/dist/composables/useFlow.d.ts +266 -0
  118. package/dist/composables/useGantt.d.ts +87 -0
  119. package/dist/composables/useLocale.d.ts +204 -0
  120. package/dist/composables/useMediaPlayer.d.ts +101 -0
  121. package/dist/composables/usePdf.d.ts +119 -0
  122. package/dist/composables/useResourceTimeline.d.ts +70 -0
  123. package/dist/draw.d.ts +7 -0
  124. package/dist/draw.js +1702 -0
  125. package/dist/draw.js.map +1 -0
  126. package/dist/flow.d.ts +14 -0
  127. package/dist/flow.js +3547 -0
  128. package/dist/flow.js.map +1 -0
  129. package/dist/flowPaths-CUc6X373.js +161 -0
  130. package/dist/flowPaths-CUc6X373.js.map +1 -0
  131. package/dist/gantt.d.ts +12 -0
  132. package/dist/gantt.js +3575 -0
  133. package/dist/gantt.js.map +1 -0
  134. package/dist/index.d.ts +9 -0
  135. package/dist/locales/index.js +1435 -7
  136. package/dist/locales/index.js.map +1 -1
  137. package/dist/m3ui-vue.css +1 -1
  138. package/dist/m3ui.js +8248 -7637
  139. package/dist/m3ui.js.map +1 -1
  140. package/dist/map.js +113 -108
  141. package/dist/map.js.map +1 -1
  142. package/dist/media.d.ts +5 -0
  143. package/dist/media.js +1311 -0
  144. package/dist/media.js.map +1 -0
  145. package/dist/pdf.d.ts +4 -0
  146. package/dist/pdf.js +1871 -0
  147. package/dist/pdf.js.map +1 -0
  148. package/dist/rich-text-editor.js +28 -26
  149. package/dist/rich-text-editor.js.map +1 -1
  150. package/dist/styles.css +1 -1
  151. package/dist/{useLocale-JYxDDeXC.js → useLocale-CaWwi-b6.js} +206 -2
  152. package/dist/useLocale-CaWwi-b6.js.map +1 -0
  153. package/dist/{useThemeTokens-y0HZpyhL.js → useThemeTokens-DQQcaWbE.js} +40 -54
  154. package/dist/useThemeTokens-DQQcaWbE.js.map +1 -0
  155. package/package.json +29 -5
  156. package/src/__tests__/MAudioPlayer.test.ts +75 -0
  157. package/src/__tests__/MDrawCanvas.test.ts +118 -0
  158. package/src/__tests__/MFloorPlan.test.ts +299 -0
  159. package/src/__tests__/MFlow.test.ts +590 -0
  160. package/src/__tests__/MGantt.test.ts +130 -0
  161. package/src/__tests__/MImageCropper.test.ts +89 -0
  162. package/src/__tests__/MPdfViewer.test.ts +235 -0
  163. package/src/__tests__/MResourceTimeline.test.ts +102 -0
  164. package/src/__tests__/MVideoPlayer.test.ts +201 -0
  165. package/src/__tests__/drawGeometry.test.ts +58 -0
  166. package/src/__tests__/fieldExpose.test.ts +30 -0
  167. package/src/__tests__/flowFormats.test.ts +185 -0
  168. package/src/__tests__/flowLayout.test.ts +113 -0
  169. package/src/__tests__/ganttFormats.test.ts +76 -0
  170. package/src/__tests__/ganttSchedule.test.ts +136 -0
  171. package/src/__tests__/pdfMock.ts +83 -0
  172. package/src/__tests__/useMediaPlayer.test.ts +182 -0
  173. package/src/__tests__/usePdf.test.ts +102 -0
  174. package/src/components/MAudioPlayer.vue +319 -0
  175. package/src/components/MDrawCanvas.vue +819 -0
  176. package/src/components/MDrawLayers.vue +114 -0
  177. package/src/components/MDrawToolbar.vue +171 -0
  178. package/src/components/MFloorPlan.vue +1080 -0
  179. package/src/components/MFloorPlanInspector.vue +169 -0
  180. package/src/components/MFloorPlanToolbar.vue +128 -0
  181. package/src/components/MFlow.vue +2060 -0
  182. package/src/components/MFlowControls.vue +110 -0
  183. package/src/components/MFlowHandle.vue +60 -0
  184. package/src/components/MFlowMinimap.vue +134 -0
  185. package/src/components/MFlowNode.vue +98 -0
  186. package/src/components/MGantt.vue +1609 -0
  187. package/src/components/MGanttControls.vue +77 -0
  188. package/src/components/MIconButton.vue +3 -1
  189. package/src/components/MImageCropper.vue +507 -0
  190. package/src/components/MMaskField.vue +13 -0
  191. package/src/components/MNumberField.vue +13 -0
  192. package/src/components/MPdfViewer.vue +1270 -0
  193. package/src/components/MResourceTimeline.vue +1020 -0
  194. package/src/components/MTagInput.vue +13 -0
  195. package/src/components/MTextField.vue +16 -0
  196. package/src/components/MVideoPlayer.vue +839 -0
  197. package/src/components/_MFlowEdge.vue +100 -0
  198. package/src/components/_MFlowEdgeLabel.vue +56 -0
  199. package/src/components/_MFlowNodeShell.vue +111 -0
  200. package/src/components/_MPdfPage.vue +456 -0
  201. package/src/components/_MTimeBackground.vue +16 -0
  202. package/src/components/_MTimeHeader.vue +31 -0
  203. package/src/composables/_flowPanel.ts +13 -0
  204. package/src/composables/_flowSlot.ts +6 -0
  205. package/src/composables/_ganttTime.ts +200 -0
  206. package/src/composables/_useTimeAxis.ts +224 -0
  207. package/src/composables/drawGeometry.ts +405 -0
  208. package/src/composables/flowFormats.ts +916 -0
  209. package/src/composables/flowLayout.ts +297 -0
  210. package/src/composables/flowPaths.ts +239 -0
  211. package/src/composables/ganttFormats.ts +366 -0
  212. package/src/composables/ganttSchedule.ts +403 -0
  213. package/src/composables/useDrawing.ts +53 -0
  214. package/src/composables/useFloorPlan.ts +73 -0
  215. package/src/composables/useFlow.ts +250 -0
  216. package/src/composables/useGantt.ts +92 -0
  217. package/src/composables/useLocale.ts +410 -0
  218. package/src/composables/useMediaPlayer.ts +406 -0
  219. package/src/composables/usePdf.ts +456 -0
  220. package/src/composables/useResourceTimeline.ts +76 -0
  221. package/src/draw.ts +25 -0
  222. package/src/flow.ts +26 -0
  223. package/src/gantt.ts +12 -0
  224. package/src/index.ts +9 -0
  225. package/src/locales/de.ts +204 -0
  226. package/src/locales/es.ts +204 -0
  227. package/src/locales/fr.ts +204 -0
  228. package/src/locales/ja.ts +204 -0
  229. package/src/locales/ko.ts +204 -0
  230. package/src/locales/pt.ts +204 -0
  231. package/src/locales/zh.ts +204 -0
  232. package/src/media.ts +5 -0
  233. package/src/pdf.ts +15 -0
  234. package/dist/MMenuItem-D4Gx_l3F.js +0 -929
  235. package/dist/MMenuItem-D4Gx_l3F.js.map +0 -1
  236. package/dist/MSlider-Dx_S3vJ9.js +0 -1506
  237. package/dist/MSlider-Dx_S3vJ9.js.map +0 -1
  238. package/dist/MTextField-Bz8JIsnl.js +0 -633
  239. package/dist/MTextField-Bz8JIsnl.js.map +0 -1
  240. package/dist/useLocale-JYxDDeXC.js.map +0 -1
  241. package/dist/useThemeTokens-y0HZpyhL.js.map +0 -1
@@ -0,0 +1,282 @@
1
+ import { i as e, t } from "./motion-DZiXG09o.js";
2
+ import { t as n } from "./MIcon-Bxh9j135.js";
3
+ import { computed as r, createBlock as i, createVNode as a, defineComponent as o, normalizeClass as s, normalizeStyle as c, onMounted as l, onUnmounted as u, openBlock as d, ref as f, resolveDynamicComponent as p, unref as m, watch as h, withCtx as g, withDirectives as _ } from "vue";
4
+ //#region src/directives/vRipple.ts
5
+ function v(e) {
6
+ return e === !1 ? { disabled: !0 } : typeof e == "string" ? { color: e } : e === !0 || e == null ? {} : e;
7
+ }
8
+ function y(e, t, n) {
9
+ let r = e.getBoundingClientRect(), i = Math.max(r.width, r.height) * 2, a = document.createElement("span");
10
+ a.className = "m3-ripple-layer";
11
+ let o = document.createElement("span");
12
+ o.className = "m3-ripple", o.style.cssText = `width:${i}px;height:${i}px;top:${t.clientY - r.top - i / 2}px;left:${t.clientX - r.left - i / 2}px`, n && (o.style.background = n), a.appendChild(o), e.appendChild(a), o.addEventListener("animationend", () => a.remove(), { once: !0 });
13
+ }
14
+ var b = /* @__PURE__ */ new WeakMap(), x = {
15
+ mounted(e, t) {
16
+ let n = {
17
+ options: v(t.value),
18
+ onPointerDown(t) {
19
+ if (n.options.disabled || t.button !== 0) return;
20
+ let { position: r } = getComputedStyle(e);
21
+ (!r || r === "static") && (e.style.position = "relative"), y(e, t, n.options.color);
22
+ }
23
+ };
24
+ b.set(e, n), e.addEventListener("pointerdown", n.onPointerDown);
25
+ },
26
+ updated(e, t) {
27
+ let n = b.get(e);
28
+ n && (n.options = v(t.value));
29
+ },
30
+ beforeUnmount(e) {
31
+ let t = b.get(e);
32
+ t && e.removeEventListener("pointerdown", t.onPointerDown), b.delete(e);
33
+ }
34
+ }, S = 1e3 / 60, C = .004;
35
+ function w(e, t, n, r, i) {
36
+ let a = [e], o = e, s = n, c = 2 * r.dampingRatio * Math.sqrt(r.stiffness);
37
+ for (let e = 0; e < 600; e++) {
38
+ for (let e = S / 1e3; e > 1e-9; e -= C) {
39
+ let n = Math.min(C, e);
40
+ s += (-r.stiffness * (o - t) - c * s) * n, o += s * n;
41
+ }
42
+ if (a.push(o), Math.abs(o - t) < i && Math.abs(s) < i * 10) break;
43
+ }
44
+ return a[a.length - 1] = t, a;
45
+ }
46
+ function T(e, t) {
47
+ let n = Number(t ?? 0) / S, r = Math.floor(n);
48
+ return r >= e.length - 1 ? e[e.length - 1] : r < 0 ? e[0] : e[r] + (e[r + 1] - e[r]) * (n - r);
49
+ }
50
+ var E = (e) => (e.length - 1) * S;
51
+ function D(e, t, n, r = 0) {
52
+ if (!e || typeof e.animate != "function" || t.length < 2) return null;
53
+ let i = e.animate(t.map(n), {
54
+ duration: E(t),
55
+ delay: r,
56
+ easing: "linear"
57
+ });
58
+ return i.finished.catch(() => {}), i;
59
+ }
60
+ var O = () => typeof window < "u" && !!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches, k = e.standard.fastSpatial, A = e.standard.fastEffects, j = e.standard.defaultEffects, M = e.standard.defaultSpatial, N = .004;
61
+ function P(e, t, n = k) {
62
+ let r = [...e()], i = r.map(() => 0), a = 0, o = 0;
63
+ function s(c) {
64
+ let l = Math.min((c - o) / 1e3, 1 / 30);
65
+ o = c;
66
+ let u = e();
67
+ u.length !== r.length && (r = [...u], i = u.map(() => 0));
68
+ let d = n.stiffness, f = 2 * n.dampingRatio * Math.sqrt(d);
69
+ for (; l > 0;) {
70
+ let e = Math.min(l, N);
71
+ l -= e;
72
+ for (let t = 0; t < u.length; t++) i[t] += (-d * (r[t] - u[t]) - f * i[t]) * e, r[t] += i[t] * e;
73
+ }
74
+ let p = u.every((e, t) => Math.abs(e - r[t]) < .05 && Math.abs(i[t]) < .05);
75
+ p && (r = [...u], i = u.map(() => 0)), t(r), a = p ? 0 : requestAnimationFrame(s);
76
+ }
77
+ function c() {
78
+ a ||= (o = performance.now(), requestAnimationFrame(s));
79
+ }
80
+ function d() {
81
+ cancelAnimationFrame(a), a = 0, r = [...e()], i = r.map(() => 0), t(r);
82
+ }
83
+ return h(() => e().join(","), c), l(() => t(r)), u(() => cancelAnimationFrame(a)), { snap: d };
84
+ }
85
+ var F = t(.4, 0, .2, 1), I = "relative inline-flex shrink-0 items-center justify-center overflow-hidden transition-colors duration-150 cursor-pointer disabled:cursor-not-allowed disabled:text-on-surface/38 before:content-[''] before:pointer-events-none before:absolute before:inset-0 before:bg-current before:opacity-0 before:transition-opacity before:duration-150 enabled:hover:before:opacity-[0.08] enabled:active:before:opacity-[0.12]", L = /* @__PURE__ */ o({
86
+ __name: "MIconButton",
87
+ props: {
88
+ icon: {},
89
+ label: {},
90
+ variant: { default: "standard" },
91
+ color: {},
92
+ contentColor: {},
93
+ shape: { default: "rounded" },
94
+ size: { default: "sm" },
95
+ iconSize: {},
96
+ disabled: {
97
+ type: Boolean,
98
+ default: !1
99
+ },
100
+ to: {},
101
+ rippleColor: {},
102
+ checked: {
103
+ type: Boolean,
104
+ default: void 0
105
+ },
106
+ checkedIcon: {},
107
+ iconFilled: { type: Boolean }
108
+ },
109
+ emits: ["update:checked"],
110
+ setup(e, { emit: t }) {
111
+ let o = e, l = t, u = r(() => o.checked !== void 0), h = [
112
+ "primary",
113
+ "secondary",
114
+ "tertiary",
115
+ "error"
116
+ ], v = /^(on-)?(primary|secondary|tertiary|error|surface|surface-variant|inverse-surface|inverse-primary)(-container|-variant)?$/, y = r(() => {
117
+ let e = b(), t = o.contentColor;
118
+ return !t || o.disabled || u.value ? e : {
119
+ ...e,
120
+ color: v.test(t) ? `var(--color-${t})` : t
121
+ };
122
+ });
123
+ function b() {
124
+ let e = o.color;
125
+ if (!e || o.disabled || u.value) return;
126
+ let t = h.includes(e), n = t ? `var(--color-${e})` : e;
127
+ switch (o.variant) {
128
+ case "filled": return {
129
+ backgroundColor: n,
130
+ color: t ? `var(--color-on-${e})` : "#fff"
131
+ };
132
+ case "tonal": return t ? {
133
+ backgroundColor: `var(--color-${e}-container)`,
134
+ color: `var(--color-on-${e}-container)`
135
+ } : {
136
+ backgroundColor: `color-mix(in srgb, ${e} 20%, transparent)`,
137
+ color: e
138
+ };
139
+ default: return { color: n };
140
+ }
141
+ }
142
+ let S = r(() => o.to && !u.value ? "RouterLink" : "button"), C = {
143
+ xs: {
144
+ px: 32,
145
+ icon: 20,
146
+ squareRadius: "rounded-md",
147
+ square: 12,
148
+ pressed: 8,
149
+ checkedRound: 12
150
+ },
151
+ sm: {
152
+ px: 40,
153
+ icon: 24,
154
+ squareRadius: "rounded-md",
155
+ square: 12,
156
+ pressed: 8,
157
+ checkedRound: 12
158
+ },
159
+ md: {
160
+ px: 56,
161
+ icon: 24,
162
+ squareRadius: "rounded-lg",
163
+ square: 16,
164
+ pressed: 12,
165
+ checkedRound: 16
166
+ },
167
+ lg: {
168
+ px: 96,
169
+ icon: 32,
170
+ squareRadius: "rounded-xl",
171
+ square: 28,
172
+ pressed: 16,
173
+ checkedRound: 28
174
+ },
175
+ xl: {
176
+ px: 136,
177
+ icon: 40,
178
+ squareRadius: "rounded-xl",
179
+ square: 28,
180
+ pressed: 16,
181
+ checkedRound: 28
182
+ }
183
+ }, w = r(() => typeof o.size == "number" ? {
184
+ px: o.size,
185
+ icon: Math.round(o.size * .55),
186
+ squareRadius: "rounded-md",
187
+ square: 12,
188
+ pressed: 8,
189
+ checkedRound: 12
190
+ } : C[o.size] ?? C.sm), T = f(null), E = f(!1);
191
+ function D() {
192
+ let e = w.value, t = e.px / 2;
193
+ return E.value ? e.pressed : o.checked ? o.shape === "squared" ? t : e.checkedRound : o.shape === "squared" ? e.square : t;
194
+ }
195
+ P(() => u.value ? [D()] : [], (e) => {
196
+ T.value instanceof HTMLElement && (T.value.style.borderRadius = e.length ? `${e[0]}px` : "");
197
+ }, j);
198
+ function O() {
199
+ u.value && !o.disabled && (E.value = !0);
200
+ }
201
+ function k() {
202
+ E.value = !1;
203
+ }
204
+ function A() {
205
+ u.value && !o.disabled && l("update:checked", !o.checked);
206
+ }
207
+ let M = r(() => {
208
+ if (o.variant === "outlined" && o.checked) return "disabled:bg-on-surface/10";
209
+ switch (o.variant) {
210
+ case "filled":
211
+ case "tonal": return "disabled:bg-on-surface/10";
212
+ default: return "";
213
+ }
214
+ }), N = r(() => o.shape === "squared" ? w.value.squareRadius : "rounded-full"), F = r(() => {
215
+ let e = o.checked;
216
+ switch (o.variant) {
217
+ case "filled": return e ? "bg-primary text-on-primary" : "bg-surface-container text-on-surface-variant";
218
+ case "tonal": return e ? "bg-secondary text-on-secondary" : "bg-secondary-container text-on-secondary-container";
219
+ case "outlined": return e ? "bg-inverse-surface text-inverse-on-surface" : "border border-current text-on-surface-variant";
220
+ default: return e ? "text-primary" : "text-on-surface-variant";
221
+ }
222
+ }), L = r(() => {
223
+ if (u.value) return F.value;
224
+ switch (o.variant) {
225
+ case "filled": return "bg-primary text-on-primary";
226
+ case "tonal": return "bg-secondary-container text-on-secondary-container";
227
+ case "outlined": return "border border-current text-on-surface-variant";
228
+ default: return "text-on-surface-variant";
229
+ }
230
+ });
231
+ return (t, r) => _((d(), i(p(S.value), {
232
+ ref_key: "rootEl",
233
+ ref: T,
234
+ to: S.value === "RouterLink" ? e.to : void 0,
235
+ type: S.value === "RouterLink" ? void 0 : "button",
236
+ "aria-label": e.label || void 0,
237
+ "aria-pressed": u.value ? e.checked : void 0,
238
+ disabled: e.disabled,
239
+ class: s([
240
+ I,
241
+ N.value,
242
+ L.value,
243
+ M.value
244
+ ]),
245
+ style: c([{
246
+ width: `${w.value.px}px`,
247
+ height: `${w.value.px}px`
248
+ }, y.value]),
249
+ onPointerdown: O,
250
+ onPointerup: k,
251
+ onPointerleave: k,
252
+ onPointercancel: k,
253
+ onClick: A
254
+ }, {
255
+ default: g(() => [a(n, {
256
+ name: e.checked && e.checkedIcon ? e.checkedIcon : e.icon,
257
+ size: e.iconSize ?? w.value.icon,
258
+ filled: !!e.checked || e.iconFilled
259
+ }, null, 8, [
260
+ "name",
261
+ "size",
262
+ "filled"
263
+ ])]),
264
+ _: 1
265
+ }, 40, [
266
+ "to",
267
+ "type",
268
+ "aria-label",
269
+ "aria-pressed",
270
+ "disabled",
271
+ "class",
272
+ "style"
273
+ ])), [[m(x), {
274
+ disabled: e.disabled,
275
+ color: e.rippleColor
276
+ }]]);
277
+ }
278
+ });
279
+ //#endregion
280
+ export { k as a, S as c, T as d, w as f, A as i, D as l, j as n, F as o, x as p, M as r, P as s, L as t, O as u };
281
+
282
+ //# sourceMappingURL=MIconButton-DoNotQ9v.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MIconButton-DoNotQ9v.js","names":[],"sources":["../src/directives/vRipple.ts","../src/composables/_springAnimation.ts","../src/composables/_useSpring.ts","../src/components/MIconButton.vue","../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}\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) {\n const rect = host.getBoundingClientRect()\n const d = Math.max(rect.width, 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\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) return\n // Checked on press, not on mount: the element may not be in the document yet when mounted.\n const { position } = getComputedStyle(el)\n if (!position || position === 'static') el.style.position = 'relative'\n spawnRipple(el, e, state.options.color)\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 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\nexport const prefersReducedMotion = () =>\n typeof window !== 'undefined' && !!window.matchMedia?.('(prefers-reduced-motion: reduce)').matches\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 Standard scheme.\nimport { onMounted, onUnmounted, watch } from 'vue'\nimport { cubicBezier, motionSprings, type SpringSpec } from './motion'\n\nexport type { SpringSpec }\n\n/** MotionSchemeKeyTokens.FastSpatial in the Standard scheme (StandardMotionTokens.SpringFastSpatial*) */\nexport const FAST_SPATIAL: SpringSpec = motionSprings.standard.fastSpatial\n/** MotionSchemeKeyTokens.FastEffects in the Standard scheme */\nexport const FAST_EFFECTS: SpringSpec = motionSprings.standard.fastEffects\n/** MotionSchemeKeyTokens.DefaultEffects in the Standard scheme */\nexport const DEFAULT_EFFECTS: SpringSpec = motionSprings.standard.defaultEffects\n/** MotionSchemeKeyTokens.DefaultSpatial in the Standard scheme */\nexport const DEFAULT_SPATIAL: SpringSpec = motionSprings.standard.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 /** 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 (icon buttons are always square by default — real\n// `IconButtonDefaults.<tier>ContainerSize()` also has Narrow/Wide width options not\n// implemented here, matching the existing scope of MButton's size tiers) 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.\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%/12%), the same universal state-layer pattern across every variant.\n */\nconst base =\n 'relative inline-flex shrink-0 items-center justify-center overflow-hidden transition-colors duration-150 cursor-pointer ' +\n 'disabled:cursor-not-allowed disabled:text-on-surface/38 ' +\n \"before:content-[''] before:pointer-events-none before:absolute before:inset-0 \" +\n 'before:bg-current before:opacity-0 before:transition-opacity before:duration-150 ' +\n 'enabled:hover:before:opacity-[0.08] enabled:active:before:opacity-[0.12]'\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: `${resolved.px}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","<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 /** 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 (icon buttons are always square by default — real\n// `IconButtonDefaults.<tier>ContainerSize()` also has Narrow/Wide width options not\n// implemented here, matching the existing scope of MButton's size tiers) 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.\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%/12%), the same universal state-layer pattern across every variant.\n */\nconst base =\n 'relative inline-flex shrink-0 items-center justify-center overflow-hidden transition-colors duration-150 cursor-pointer ' +\n 'disabled:cursor-not-allowed disabled:text-on-surface/38 ' +\n \"before:content-[''] before:pointer-events-none before:absolute before:inset-0 \" +\n 'before:bg-current before:opacity-0 before:transition-opacity before:duration-150 ' +\n 'enabled:hover:before:opacity-[0.08] enabled:active:before:opacity-[0.12]'\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: `${resolved.px}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":";;;;AAaA,SAAS,EAAU,GAAmC;CAIpD,OAHI,MAAU,KAAc,EAAE,UAAU,GAAK,IACzC,OAAO,KAAU,WAAiB,EAAE,OAAO,EAAM,IACjD,MAAU,MAAQ,KAAS,OAAa,CAAC,IACtC;AACT;AAIA,SAAS,EAAY,GAAmB,GAA6C,GAAgB;CACnG,IAAM,IAAO,EAAK,sBAAsB,GAClC,IAAI,KAAK,IAAI,EAAK,OAAO,EAAK,MAAM,IAAI,GACxC,IAAQ,SAAS,cAAc,MAAM;CAC3C,EAAM,YAAY;CAClB,IAAM,IAAK,SAAS,cAAc,MAAM;CAMxC,AALA,EAAG,YAAY,aACf,EAAG,MAAM,UAAU,SAAS,EAAE,YAAY,EAAE,SAAS,EAAM,UAAU,EAAK,MAAM,IAAI,EAAE,UAAU,EAAM,UAAU,EAAK,OAAO,IAAI,EAAE,KAC9H,MAAO,EAAG,MAAM,aAAa,IACjC,EAAM,YAAY,CAAE,GACpB,EAAK,YAAY,CAAK,GACtB,EAAG,iBAAiB,sBAAsB,EAAM,OAAO,GAAG,EAAE,MAAM,GAAK,CAAC;AAC1E;AAOA,IAAM,oBAAS,IAAI,QAAkC,GAOxC,IAA+C;CAC1D,QAAQ,GAAI,GAAS;EACnB,IAAM,IAAqB;GACzB,SAAS,EAAU,EAAQ,KAAK;GAChC,cAAc,GAAG;IACf,IAAI,EAAM,QAAQ,YAAY,EAAE,WAAW,GAAG;IAE9C,IAAM,EAAE,gBAAa,iBAAiB,CAAE;IA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