@m3ui-vue/m3ui-vue 0.5.1 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{MMenuItem-Dw2ARZic.js → MMenuItem-DyY4zhRA.js} +217 -294
- package/dist/MMenuItem-DyY4zhRA.js.map +1 -0
- package/dist/code-editor.js +88 -74
- package/dist/code-editor.js.map +1 -1
- package/dist/components/MJsonEditor.vue.d.ts +7 -0
- package/dist/components/MJsonViewer.vue.d.ts +5 -0
- package/dist/composables/useLocale.d.ts +6 -0
- package/dist/locales/index.js +49 -7
- package/dist/locales/index.js.map +1 -1
- package/dist/m3ui-vue.css +1 -1
- package/dist/m3ui.js +1590 -1582
- package/dist/m3ui.js.map +1 -1
- package/dist/rich-text-editor.js +24 -23
- package/dist/rich-text-editor.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/useLocale-QCIVDYWx.js +88 -0
- package/dist/useLocale-QCIVDYWx.js.map +1 -0
- package/package.json +1 -1
- package/src/components/MCircleProgressBar.vue +2 -2
- package/src/components/MCodeEditor.vue +1 -0
- package/src/components/MJsonEditor.vue +35 -9
- package/src/components/MJsonViewer.vue +17 -1
- package/src/composables/useLocale.ts +18 -0
- package/src/locales/de.ts +10 -0
- package/src/locales/es.ts +10 -0
- package/src/locales/fr.ts +10 -0
- package/src/locales/ja.ts +10 -0
- package/src/locales/ko.ts +10 -0
- package/src/locales/pt.ts +10 -0
- package/src/locales/zh.ts +10 -0
- package/dist/MMenuItem-Dw2ARZic.js.map +0 -1
|
@@ -1,93 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t } from "./
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
var P = {
|
|
6
|
-
search: "Search...",
|
|
7
|
-
noResults: "No results",
|
|
8
|
-
close: "Close",
|
|
9
|
-
cancel: "Cancel",
|
|
10
|
-
confirm: "Confirm",
|
|
11
|
-
loading: "Loading",
|
|
12
|
-
previous: "Previous",
|
|
13
|
-
next: "Next",
|
|
14
|
-
today: "Today",
|
|
15
|
-
more: "more",
|
|
16
|
-
selectedCount: "selected",
|
|
17
|
-
recordCount: "record",
|
|
18
|
-
expand: "Expand",
|
|
19
|
-
columns: "Columns",
|
|
20
|
-
exportCsv: "Export CSV",
|
|
21
|
-
noGroup: "No group",
|
|
22
|
-
finish: "Finish",
|
|
23
|
-
dropText: "Drop files here or",
|
|
24
|
-
selectText: "browse",
|
|
25
|
-
maxSizePrefix: "Max.",
|
|
26
|
-
remove: "Remove",
|
|
27
|
-
selectDate: "Select date",
|
|
28
|
-
selectTime: "Select time",
|
|
29
|
-
selectRange: "Select range",
|
|
30
|
-
pickStart: "Select start",
|
|
31
|
-
pickEnd: "Select end",
|
|
32
|
-
previousMonth: "Previous month",
|
|
33
|
-
nextMonth: "Next month",
|
|
34
|
-
dayView: "Day",
|
|
35
|
-
weekView: "Week",
|
|
36
|
-
available: "Available",
|
|
37
|
-
selected: "Selected",
|
|
38
|
-
noItems: "No items",
|
|
39
|
-
moveAllRight: "Move all right",
|
|
40
|
-
moveRight: "Move selected right",
|
|
41
|
-
moveLeft: "Move selected left",
|
|
42
|
-
moveAllLeft: "Move all left",
|
|
43
|
-
searchCommand: "Search command...",
|
|
44
|
-
navigateHint: "navigate",
|
|
45
|
-
selectHint: "select",
|
|
46
|
-
openHint: "open",
|
|
47
|
-
closeHint: "close",
|
|
48
|
-
loadingMore: "Loading...",
|
|
49
|
-
noMoreItems: "No more items",
|
|
50
|
-
bold: "Bold",
|
|
51
|
-
italic: "Italic",
|
|
52
|
-
underline: "Underline",
|
|
53
|
-
strikethrough: "Strikethrough",
|
|
54
|
-
highlight: "Highlight",
|
|
55
|
-
bulletList: "Bullet list",
|
|
56
|
-
orderedList: "Ordered list",
|
|
57
|
-
blockquote: "Blockquote",
|
|
58
|
-
code: "Code",
|
|
59
|
-
alignLeft: "Align left",
|
|
60
|
-
alignCenter: "Align center",
|
|
61
|
-
alignRight: "Align right",
|
|
62
|
-
undo: "Undo",
|
|
63
|
-
redo: "Redo",
|
|
64
|
-
link: "Link",
|
|
65
|
-
image: "Image",
|
|
66
|
-
paragraph: "Paragraph",
|
|
67
|
-
heading1: "Heading 1",
|
|
68
|
-
heading2: "Heading 2",
|
|
69
|
-
heading3: "Heading 3",
|
|
70
|
-
insertLink: "Insert link",
|
|
71
|
-
insertImage: "Insert image",
|
|
72
|
-
imageUrlLabel: "Image URL",
|
|
73
|
-
insert: "Insert"
|
|
74
|
-
}, F = Symbol("m3-locale");
|
|
75
|
-
function I() {
|
|
76
|
-
let e = p(F, {}), t = x({ ...P });
|
|
77
|
-
return j(() => {
|
|
78
|
-
Object.assign(t, P, E(e));
|
|
79
|
-
}), t;
|
|
80
|
-
}
|
|
81
|
-
//#endregion
|
|
1
|
+
import { r as e } from "./useLocale-QCIVDYWx.js";
|
|
2
|
+
import { t } from "./MIcon-CaEooCmZ.js";
|
|
3
|
+
import { t as n } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
4
|
+
import { Fragment as r, Teleport as i, Transition as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, inject as m, normalizeClass as h, normalizeStyle as g, onBeforeUnmount as _, onMounted as v, onUnmounted as y, openBlock as b, provide as x, ref as S, renderSlot as C, resolveDynamicComponent as w, toDisplayString as T, unref as E, useId as D, useSlots as O, watch as k, withCtx as A, withModifiers as j } from "vue";
|
|
82
5
|
//#region src/components/MSpinner.vue?vue&type=script&setup=true&lang.ts
|
|
83
|
-
var
|
|
6
|
+
var M = ["aria-label"], N = {
|
|
84
7
|
key: 0,
|
|
85
8
|
class: "block h-full w-full animate-spin rounded-full border-2 border-current border-t-transparent"
|
|
86
|
-
},
|
|
9
|
+
}, P = [
|
|
87
10
|
"width",
|
|
88
11
|
"height",
|
|
89
12
|
"viewBox"
|
|
90
|
-
],
|
|
13
|
+
], F = ["d", "stroke-dasharray"], I = 3, L = 9, R = /* @__PURE__ */ p({
|
|
91
14
|
__name: "MSpinner",
|
|
92
15
|
props: {
|
|
93
16
|
size: { default: 20 },
|
|
@@ -97,12 +20,12 @@ var L = ["aria-label"], R = {
|
|
|
97
20
|
},
|
|
98
21
|
label: {}
|
|
99
22
|
},
|
|
100
|
-
setup(
|
|
101
|
-
let
|
|
102
|
-
let e =
|
|
103
|
-
for (let
|
|
104
|
-
let
|
|
105
|
-
|
|
23
|
+
setup(t) {
|
|
24
|
+
let n = t, r = e(), i = o(() => (n.size / 2 - 1 - I / 2) / 1.25), a = o(() => n.size / 2), s = o(() => {
|
|
25
|
+
let e = a.value, t = i.value, n = t * .08, r = L * 24, o = [], s = 0, c = 0, l = 0;
|
|
26
|
+
for (let i = 0; i <= r; i++) {
|
|
27
|
+
let a = 2 * Math.PI * i / r - Math.PI / 2, u = t + n * Math.sin(L * a), d = e + u * Math.cos(a), f = e + u * Math.sin(a);
|
|
28
|
+
i > 0 && (s += Math.sqrt((d - c) ** 2 + (f - l) ** 2)), o.push(`${i === 0 ? "M" : "L"}${d.toFixed(2)},${f.toFixed(2)}`), c = d, l = f;
|
|
106
29
|
}
|
|
107
30
|
let u = s * .58, d = s - u, f = `${u.toFixed(1)} ${d.toFixed(1)}`;
|
|
108
31
|
return {
|
|
@@ -111,33 +34,33 @@ var L = ["aria-label"], R = {
|
|
|
111
34
|
len: s.toFixed(1)
|
|
112
35
|
};
|
|
113
36
|
});
|
|
114
|
-
return (
|
|
37
|
+
return (e, n) => (b(), l("span", {
|
|
115
38
|
class: "inline-flex shrink-0 items-center justify-center",
|
|
116
|
-
style:
|
|
117
|
-
width: `${
|
|
118
|
-
height: `${
|
|
39
|
+
style: g({
|
|
40
|
+
width: `${t.size}px`,
|
|
41
|
+
height: `${t.size}px`
|
|
119
42
|
}),
|
|
120
43
|
role: "status",
|
|
121
|
-
"aria-label":
|
|
122
|
-
}, [
|
|
44
|
+
"aria-label": t.label ?? E(r).loading
|
|
45
|
+
}, [t.wavy ? (b(), l("svg", {
|
|
123
46
|
key: 1,
|
|
124
|
-
width:
|
|
125
|
-
height:
|
|
126
|
-
viewBox: `0 0 ${
|
|
47
|
+
width: t.size,
|
|
48
|
+
height: t.size,
|
|
49
|
+
viewBox: `0 0 ${t.size} ${t.size}`,
|
|
127
50
|
fill: "none",
|
|
128
51
|
class: "animate-[m3-wavy-spin_2.8s_linear_infinite]",
|
|
129
|
-
style:
|
|
130
|
-
}, [
|
|
131
|
-
d:
|
|
52
|
+
style: g(`transform-origin: ${a.value}px ${a.value}px`)
|
|
53
|
+
}, [u("path", {
|
|
54
|
+
d: s.value.path,
|
|
132
55
|
stroke: "currentColor",
|
|
133
|
-
"stroke-width":
|
|
56
|
+
"stroke-width": I,
|
|
134
57
|
"stroke-linecap": "round",
|
|
135
|
-
"stroke-dasharray":
|
|
58
|
+
"stroke-dasharray": s.value.dash,
|
|
136
59
|
class: "animate-[m3-wavy-travel_2s_linear_infinite]",
|
|
137
|
-
style:
|
|
138
|
-
}, null, 12,
|
|
60
|
+
style: g({ "--m3-wave-len": s.value.len })
|
|
61
|
+
}, null, 12, F)], 12, P)) : (b(), l("span", N))], 12, M));
|
|
139
62
|
}
|
|
140
|
-
}),
|
|
63
|
+
}), z = [
|
|
141
64
|
"bg-surface-container-highest",
|
|
142
65
|
"bg-surface-container-high",
|
|
143
66
|
"bg-surface-container-low",
|
|
@@ -158,11 +81,11 @@ var L = ["aria-label"], R = {
|
|
|
158
81
|
"bg-tertiary",
|
|
159
82
|
"bg-error"
|
|
160
83
|
];
|
|
161
|
-
function
|
|
162
|
-
for (let t of
|
|
84
|
+
function B(e) {
|
|
85
|
+
for (let t of z) if (e.classList.contains(t)) return `var(--color-${t.slice(3)})`;
|
|
163
86
|
return null;
|
|
164
87
|
}
|
|
165
|
-
function
|
|
88
|
+
function ee(e) {
|
|
166
89
|
if (!e || e === "transparent") return !0;
|
|
167
90
|
let t = e.match(/^rgba?\(([^)]+)\)$/);
|
|
168
91
|
if (t) {
|
|
@@ -171,7 +94,7 @@ function G(e) {
|
|
|
171
94
|
}
|
|
172
95
|
return !1;
|
|
173
96
|
}
|
|
174
|
-
function
|
|
97
|
+
function V(e, t) {
|
|
175
98
|
let n = S("var(--color-surface)");
|
|
176
99
|
function r(r) {
|
|
177
100
|
n.value = r, e.value?.style.setProperty("--field-bg", t() ?? r);
|
|
@@ -179,7 +102,7 @@ function K(e, t) {
|
|
|
179
102
|
function i() {
|
|
180
103
|
let t = e.value?.parentElement ?? null;
|
|
181
104
|
for (; t;) {
|
|
182
|
-
let e =
|
|
105
|
+
let e = B(t);
|
|
183
106
|
if (e) {
|
|
184
107
|
r(e);
|
|
185
108
|
return;
|
|
@@ -189,7 +112,7 @@ function K(e, t) {
|
|
|
189
112
|
return;
|
|
190
113
|
}
|
|
191
114
|
let n = getComputedStyle(t).backgroundColor;
|
|
192
|
-
if (!
|
|
115
|
+
if (!ee(n)) {
|
|
193
116
|
r(n);
|
|
194
117
|
return;
|
|
195
118
|
}
|
|
@@ -197,9 +120,9 @@ function K(e, t) {
|
|
|
197
120
|
}
|
|
198
121
|
r("var(--color-surface)");
|
|
199
122
|
}
|
|
200
|
-
let
|
|
201
|
-
return
|
|
202
|
-
i(),
|
|
123
|
+
let a = null;
|
|
124
|
+
return v(() => {
|
|
125
|
+
i(), a = new MutationObserver(() => i()), a.observe(document.documentElement, {
|
|
203
126
|
attributes: !0,
|
|
204
127
|
attributeFilter: [
|
|
205
128
|
"class",
|
|
@@ -207,11 +130,11 @@ function K(e, t) {
|
|
|
207
130
|
"data-theme"
|
|
208
131
|
]
|
|
209
132
|
});
|
|
210
|
-
}),
|
|
133
|
+
}), _(() => a?.disconnect()), { resolvedFieldBg: o(() => t() ?? n.value) };
|
|
211
134
|
}
|
|
212
135
|
//#endregion
|
|
213
136
|
//#region src/composables/useDebounce.ts
|
|
214
|
-
function
|
|
137
|
+
function H(e, t) {
|
|
215
138
|
let n = null;
|
|
216
139
|
function r(...r) {
|
|
217
140
|
n && clearTimeout(n), n = setTimeout(() => {
|
|
@@ -221,14 +144,14 @@ function q(e, t) {
|
|
|
221
144
|
function i() {
|
|
222
145
|
n &&= (clearTimeout(n), null);
|
|
223
146
|
}
|
|
224
|
-
return
|
|
147
|
+
return _(i), {
|
|
225
148
|
debounced: r,
|
|
226
149
|
cancel: i
|
|
227
150
|
};
|
|
228
151
|
}
|
|
229
152
|
//#endregion
|
|
230
153
|
//#region src/components/MIconButton.vue?vue&type=script&setup=true&lang.ts
|
|
231
|
-
var
|
|
154
|
+
var U = "inline-flex shrink-0 items-center justify-center transition-colors duration-150 cursor-pointer disabled:cursor-not-allowed disabled:opacity-[0.38]", W = /* @__PURE__ */ p({
|
|
232
155
|
__name: "MIconButton",
|
|
233
156
|
props: {
|
|
234
157
|
icon: {},
|
|
@@ -242,8 +165,8 @@ var J = "inline-flex shrink-0 items-center justify-center transition-colors dura
|
|
|
242
165
|
},
|
|
243
166
|
to: {}
|
|
244
167
|
},
|
|
245
|
-
setup(
|
|
246
|
-
let n =
|
|
168
|
+
setup(e) {
|
|
169
|
+
let n = e, r = o(() => n.to ? "RouterLink" : "button"), i = {
|
|
247
170
|
xs: {
|
|
248
171
|
px: 32,
|
|
249
172
|
icon: 16
|
|
@@ -264,16 +187,16 @@ var J = "inline-flex shrink-0 items-center justify-center transition-colors dura
|
|
|
264
187
|
px: 64,
|
|
265
188
|
icon: 32
|
|
266
189
|
}
|
|
267
|
-
},
|
|
190
|
+
}, a = o(() => typeof n.size == "number" ? {
|
|
268
191
|
px: n.size,
|
|
269
192
|
icon: Math.round(n.size * .55)
|
|
270
|
-
} : i[n.size] ?? i.sm), c =
|
|
193
|
+
} : i[n.size] ?? i.sm), c = o(() => n.shape === "squared" ? "rounded-md" : "rounded-full");
|
|
271
194
|
function l(e) {
|
|
272
195
|
if (n.disabled) return;
|
|
273
196
|
let t = e.currentTarget, r = t.getBoundingClientRect(), i = Math.max(r.width, r.height) * 2, a = document.createElement("span");
|
|
274
197
|
a.className = "m3-ripple", a.style.cssText = `width:${i}px;height:${i}px;top:${e.clientY - r.top - i / 2}px;left:${e.clientX - r.left - i / 2}px`, t.appendChild(a), a.addEventListener("animationend", () => a.remove(), { once: !0 });
|
|
275
198
|
}
|
|
276
|
-
let u =
|
|
199
|
+
let u = o(() => {
|
|
277
200
|
switch (n.variant) {
|
|
278
201
|
case "filled": return "bg-primary text-on-primary hover:shadow-elevation-1";
|
|
279
202
|
case "tonal": return "bg-secondary-container text-on-secondary-container hover:shadow-elevation-1";
|
|
@@ -281,26 +204,26 @@ var J = "inline-flex shrink-0 items-center justify-center transition-colors dura
|
|
|
281
204
|
default: return "text-on-surface-variant hover:bg-on-surface/8 active:bg-on-surface/12";
|
|
282
205
|
}
|
|
283
206
|
});
|
|
284
|
-
return (n, i) => (
|
|
285
|
-
to:
|
|
286
|
-
type:
|
|
287
|
-
"aria-label":
|
|
288
|
-
disabled:
|
|
289
|
-
class:
|
|
290
|
-
|
|
207
|
+
return (n, i) => (b(), s(w(r.value), {
|
|
208
|
+
to: e.to || void 0,
|
|
209
|
+
type: e.to ? void 0 : "button",
|
|
210
|
+
"aria-label": e.label || void 0,
|
|
211
|
+
disabled: e.disabled,
|
|
212
|
+
class: h([
|
|
213
|
+
U,
|
|
291
214
|
c.value,
|
|
292
215
|
u.value,
|
|
293
216
|
"relative overflow-hidden"
|
|
294
217
|
]),
|
|
295
|
-
style:
|
|
296
|
-
width: `${
|
|
297
|
-
height: `${
|
|
218
|
+
style: g({
|
|
219
|
+
width: `${a.value.px}px`,
|
|
220
|
+
height: `${a.value.px}px`
|
|
298
221
|
}),
|
|
299
222
|
onPointerdown: l
|
|
300
223
|
}, {
|
|
301
|
-
default:
|
|
302
|
-
name:
|
|
303
|
-
size:
|
|
224
|
+
default: A(() => [f(t, {
|
|
225
|
+
name: e.icon,
|
|
226
|
+
size: a.value.icon
|
|
304
227
|
}, null, 8, ["name", "size"])]),
|
|
305
228
|
_: 1
|
|
306
229
|
}, 40, [
|
|
@@ -312,7 +235,7 @@ var J = "inline-flex shrink-0 items-center justify-center transition-colors dura
|
|
|
312
235
|
"style"
|
|
313
236
|
]));
|
|
314
237
|
}
|
|
315
|
-
}),
|
|
238
|
+
}), G = "relative inline-flex items-center justify-center gap-2 font-medium whitespace-nowrap overflow-hidden transition-[box-shadow,background-color,color] duration-150 select-none cursor-pointer disabled:cursor-not-allowed disabled:opacity-[0.38] disabled:shadow-none 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]", K = /* @__PURE__ */ p({
|
|
316
239
|
__name: "MButton",
|
|
317
240
|
props: {
|
|
318
241
|
variant: { default: "filled" },
|
|
@@ -331,15 +254,15 @@ var J = "inline-flex shrink-0 items-center justify-center transition-colors dura
|
|
|
331
254
|
shape: { default: "rounded" },
|
|
332
255
|
to: {}
|
|
333
256
|
},
|
|
334
|
-
setup(
|
|
335
|
-
let n = ["primary", "error"], r =
|
|
336
|
-
if (
|
|
257
|
+
setup(e) {
|
|
258
|
+
let n = ["primary", "error"], r = e, i = o(() => r.to ? "RouterLink" : "button"), a = o(() => !!r.color && !n.includes(r.color)), l = o(() => {
|
|
259
|
+
if (a.value) return {
|
|
337
260
|
"--color-primary": r.color,
|
|
338
261
|
"--color-on-primary": "#ffffff",
|
|
339
262
|
"--color-primary-container": r.color + "33",
|
|
340
263
|
"--color-on-primary-container": r.color
|
|
341
264
|
};
|
|
342
|
-
}), u =
|
|
265
|
+
}), u = o(() => r.color === "error"), d = o(() => r.shape === "squared" ? "rounded-md" : "rounded-full"), f = {
|
|
343
266
|
xs: {
|
|
344
267
|
h: "h-8",
|
|
345
268
|
text: "text-label-medium",
|
|
@@ -385,7 +308,7 @@ var J = "inline-flex shrink-0 items-center justify-center transition-colors dura
|
|
|
385
308
|
pxIcon: "pl-7 pr-8",
|
|
386
309
|
pxText: "px-4"
|
|
387
310
|
}
|
|
388
|
-
}, p =
|
|
311
|
+
}, p = o(() => f[r.size] ?? f.sm), m = o(() => `${p.value.h} ${p.value.text}`), _ = o(() => p.value.icon), v = o(() => p.value.spinner), y = o(() => r.variant === "text" ? p.value.pxText : r.icon || r.loading ? p.value.pxIcon : p.value.px), x = o(() => {
|
|
389
312
|
let e = u.value;
|
|
390
313
|
switch (r.variant) {
|
|
391
314
|
case "filled": return e ? "bg-error text-on-error enabled:hover:shadow-elevation-1 enabled:active:shadow-none" : "bg-primary text-on-primary enabled:hover:shadow-elevation-1 enabled:active:shadow-none";
|
|
@@ -401,28 +324,28 @@ var J = "inline-flex shrink-0 items-center justify-center transition-colors dura
|
|
|
401
324
|
let t = e.currentTarget, n = t.getBoundingClientRect(), i = Math.max(n.width, n.height) * 2, a = document.createElement("span");
|
|
402
325
|
a.className = "m3-ripple", a.style.cssText = `width:${i}px;height:${i}px;top:${e.clientY - n.top - i / 2}px;left:${e.clientX - n.left - i / 2}px`, t.appendChild(a), a.addEventListener("animationend", () => a.remove(), { once: !0 });
|
|
403
326
|
}
|
|
404
|
-
return (n, r) => (
|
|
405
|
-
to:
|
|
406
|
-
type:
|
|
407
|
-
disabled:
|
|
408
|
-
class:
|
|
409
|
-
|
|
327
|
+
return (n, r) => (b(), s(w(i.value), {
|
|
328
|
+
to: e.to || void 0,
|
|
329
|
+
type: e.to ? void 0 : e.type,
|
|
330
|
+
disabled: e.disabled || e.loading,
|
|
331
|
+
class: h([
|
|
332
|
+
G,
|
|
410
333
|
d.value,
|
|
411
|
-
|
|
412
|
-
|
|
334
|
+
m.value,
|
|
335
|
+
y.value,
|
|
413
336
|
x.value
|
|
414
337
|
]),
|
|
415
|
-
style:
|
|
338
|
+
style: g(l.value),
|
|
416
339
|
onPointerdown: S
|
|
417
340
|
}, {
|
|
418
|
-
default:
|
|
341
|
+
default: A(() => [e.loading ? (b(), s(R, {
|
|
419
342
|
key: 0,
|
|
420
343
|
size: v.value
|
|
421
|
-
}, null, 8, ["size"])) :
|
|
344
|
+
}, null, 8, ["size"])) : e.icon ? (b(), s(t, {
|
|
422
345
|
key: 1,
|
|
423
|
-
name:
|
|
346
|
+
name: e.icon,
|
|
424
347
|
size: _.value
|
|
425
|
-
}, null, 8, ["name", "size"])) :
|
|
348
|
+
}, null, 8, ["name", "size"])) : c("", !0), C(n.$slots, "default")]),
|
|
426
349
|
_: 3
|
|
427
350
|
}, 40, [
|
|
428
351
|
"to",
|
|
@@ -432,16 +355,16 @@ var J = "inline-flex shrink-0 items-center justify-center transition-colors dura
|
|
|
432
355
|
"style"
|
|
433
356
|
]));
|
|
434
357
|
}
|
|
435
|
-
}),
|
|
358
|
+
}), q = { class: "flex items-start justify-between gap-4 px-6 pt-6 pb-2" }, J = { class: "text-headline-small text-on-surface" }, Y = { class: "overflow-y-auto px-6 py-2 text-body-medium text-on-surface-variant" }, X = {
|
|
436
359
|
key: 0,
|
|
437
360
|
class: "flex justify-end gap-2 px-6 py-4"
|
|
438
|
-
},
|
|
361
|
+
}, Z = {
|
|
439
362
|
key: 0,
|
|
440
363
|
class: "dialog-fs fixed inset-0 z-50 flex flex-col bg-surface"
|
|
441
|
-
},
|
|
364
|
+
}, Q = { class: "flex h-14 shrink-0 items-center gap-2 px-2" }, te = { class: "flex-1 text-title-large font-medium text-on-surface" }, ne = {
|
|
442
365
|
key: 1,
|
|
443
366
|
class: "flex items-center gap-2"
|
|
444
|
-
},
|
|
367
|
+
}, re = { class: "flex-1 overflow-y-auto px-6 py-4 text-body-medium text-on-surface-variant" }, ie = /*#__PURE__*/ n(/* @__PURE__ */ p({
|
|
445
368
|
__name: "MDialog",
|
|
446
369
|
props: {
|
|
447
370
|
modelValue: { type: Boolean },
|
|
@@ -458,78 +381,78 @@ var J = "inline-flex shrink-0 items-center justify-center transition-colors dura
|
|
|
458
381
|
closeLabel: {}
|
|
459
382
|
},
|
|
460
383
|
emits: ["update:modelValue"],
|
|
461
|
-
setup(
|
|
462
|
-
let
|
|
463
|
-
function
|
|
464
|
-
|
|
384
|
+
setup(t, { emit: n }) {
|
|
385
|
+
let r = t, o = e(), f = n;
|
|
386
|
+
function p() {
|
|
387
|
+
r.persistent || f("update:modelValue", !1);
|
|
465
388
|
}
|
|
466
|
-
function
|
|
467
|
-
e.key === "Escape" &&
|
|
389
|
+
function m(e) {
|
|
390
|
+
e.key === "Escape" && p();
|
|
468
391
|
}
|
|
469
|
-
return
|
|
470
|
-
e ? (document.addEventListener("keydown",
|
|
471
|
-
}), (
|
|
392
|
+
return k(() => r.modelValue, (e) => {
|
|
393
|
+
e ? (document.addEventListener("keydown", m), document.body.style.overflow = "hidden") : (document.removeEventListener("keydown", m), document.body.style.overflow = "");
|
|
394
|
+
}), (e, n) => (b(), s(i, { to: "body" }, [t.fullscreen ? (b(), s(a, {
|
|
472
395
|
key: 1,
|
|
473
396
|
name: "m3-dialog-fs"
|
|
474
397
|
}, {
|
|
475
|
-
default:
|
|
476
|
-
|
|
398
|
+
default: A(() => [t.modelValue ? (b(), l("div", Z, [u("div", Q, [
|
|
399
|
+
t.persistent ? c("", !0) : (b(), s(W, {
|
|
477
400
|
key: 0,
|
|
478
401
|
icon: "close",
|
|
479
|
-
label:
|
|
480
|
-
onClick:
|
|
402
|
+
label: t.closeLabel ?? E(o).close,
|
|
403
|
+
onClick: p
|
|
481
404
|
}, null, 8, ["label"])),
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
]),
|
|
405
|
+
u("h2", te, [C(e.$slots, "title", {}, () => [d(T(t.title), 1)], !0)]),
|
|
406
|
+
e.$slots.actions ? (b(), l("div", ne, [C(e.$slots, "actions", {}, void 0, !0)])) : c("", !0)
|
|
407
|
+
]), u("div", re, [C(e.$slots, "default", {}, void 0, !0)])])) : c("", !0)]),
|
|
485
408
|
_: 3
|
|
486
|
-
})) : (
|
|
409
|
+
})) : (b(), s(a, {
|
|
487
410
|
key: 0,
|
|
488
411
|
name: "m3-dialog"
|
|
489
412
|
}, {
|
|
490
|
-
default:
|
|
413
|
+
default: A(() => [t.modelValue ? (b(), l("div", {
|
|
491
414
|
key: 0,
|
|
492
415
|
class: "fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-4",
|
|
493
|
-
onClick:
|
|
494
|
-
}, [
|
|
495
|
-
|
|
416
|
+
onClick: j(p, ["self"])
|
|
417
|
+
}, [u("div", { class: h(["dialog-box flex max-h-[90vh] w-full flex-col rounded-xl bg-surface-container-high shadow-elevation-3", t.maxWidth]) }, [
|
|
418
|
+
u("div", q, [u("h2", J, [C(e.$slots, "title", {}, () => [d(T(t.title), 1)], !0)]), t.persistent ? c("", !0) : (b(), s(W, {
|
|
496
419
|
key: 0,
|
|
497
420
|
icon: "close",
|
|
498
|
-
label:
|
|
499
|
-
onClick:
|
|
421
|
+
label: t.closeLabel ?? E(o).close,
|
|
422
|
+
onClick: p
|
|
500
423
|
}, null, 8, ["label"]))]),
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
], 2)])) :
|
|
424
|
+
u("div", Y, [C(e.$slots, "default", {}, void 0, !0)]),
|
|
425
|
+
e.$slots.actions ? (b(), l("div", X, [C(e.$slots, "actions", {}, void 0, !0)])) : c("", !0)
|
|
426
|
+
], 2)])) : c("", !0)]),
|
|
504
427
|
_: 3
|
|
505
428
|
}))]));
|
|
506
429
|
}
|
|
507
|
-
}), [["__scopeId", "data-v-2e3c3567"]]),
|
|
430
|
+
}), [["__scopeId", "data-v-2e3c3567"]]), ae = { class: "flex flex-col gap-1" }, oe = [
|
|
508
431
|
"id",
|
|
509
432
|
"value",
|
|
510
433
|
"rows",
|
|
511
434
|
"disabled",
|
|
512
435
|
"required"
|
|
513
|
-
],
|
|
436
|
+
], se = [
|
|
514
437
|
"id",
|
|
515
438
|
"type",
|
|
516
439
|
"value",
|
|
517
440
|
"disabled",
|
|
518
441
|
"required",
|
|
519
442
|
"autocomplete"
|
|
520
|
-
],
|
|
443
|
+
], $ = ["for"], ce = {
|
|
521
444
|
key: 0,
|
|
522
445
|
class: "text-error"
|
|
523
|
-
},
|
|
446
|
+
}, le = {
|
|
524
447
|
key: 3,
|
|
525
448
|
class: "absolute right-2 top-1/2 -translate-y-1/2"
|
|
526
|
-
},
|
|
449
|
+
}, ue = {
|
|
527
450
|
key: 0,
|
|
528
451
|
class: "px-4 text-body-small text-error"
|
|
529
|
-
},
|
|
452
|
+
}, de = {
|
|
530
453
|
key: 1,
|
|
531
454
|
class: "px-4 text-body-small text-on-surface-variant"
|
|
532
|
-
},
|
|
455
|
+
}, fe = /* @__PURE__ */ p({
|
|
533
456
|
__name: "MTextField",
|
|
534
457
|
props: {
|
|
535
458
|
modelValue: {},
|
|
@@ -553,9 +476,9 @@ var J = "inline-flex shrink-0 items-center justify-center transition-colors dura
|
|
|
553
476
|
debounce: { default: 0 }
|
|
554
477
|
},
|
|
555
478
|
emits: ["update:modelValue", "debounced"],
|
|
556
|
-
setup(
|
|
557
|
-
let r =
|
|
558
|
-
let e = !!
|
|
479
|
+
setup(e, { emit: n }) {
|
|
480
|
+
let r = e, i = n, a = D(), s = O(), p = S(null), { resolvedFieldBg: m } = V(p, () => r.fieldBg), { debounced: _, cancel: v } = H((e) => i("debounced", e), r.debounce), y = o(() => r.clearable && String(r.modelValue).length > 0 && !r.disabled), x = o(() => {
|
|
481
|
+
let e = !!s.trailing || r.clearable, t = r.leadingIcon ? "pl-12" : "pl-4", n = e ? "pr-12" : "pr-4", i = [
|
|
559
482
|
"peer block w-full text-body-large text-on-surface outline-none placeholder:text-transparent",
|
|
560
483
|
"transition-[border-color,border-width] duration-150",
|
|
561
484
|
"disabled:cursor-not-allowed disabled:opacity-[0.38]",
|
|
@@ -572,7 +495,7 @@ var J = "inline-flex shrink-0 items-center justify-center transition-colors dura
|
|
|
572
495
|
"rounded-t-sm bg-surface-container-highest border-b pt-6 pb-2",
|
|
573
496
|
r.error ? "border-error focus:border-b-2 focus:border-error" : "border-on-surface-variant hover:border-on-surface focus:border-b-2 focus:border-primary"
|
|
574
497
|
].join(" ");
|
|
575
|
-
}), w =
|
|
498
|
+
}), w = o(() => {
|
|
576
499
|
let e = [
|
|
577
500
|
"pointer-events-none absolute truncate transition-all duration-200",
|
|
578
501
|
r.leadingIcon ? r.variant === "outlined" ? "left-11" : "left-12" : r.variant === "outlined" ? "left-3" : "left-4",
|
|
@@ -592,110 +515,110 @@ var J = "inline-flex shrink-0 items-center justify-center transition-colors dura
|
|
|
592
515
|
r.error ? "text-error peer-focus:text-error" : "text-on-surface-variant peer-focus:text-primary"
|
|
593
516
|
].join(" ");
|
|
594
517
|
});
|
|
595
|
-
function
|
|
518
|
+
function k(e) {
|
|
596
519
|
let t = e.target;
|
|
597
520
|
i("update:modelValue", t.value), r.debounce > 0 && _(t.value);
|
|
598
521
|
}
|
|
599
|
-
return (n, r) => (
|
|
522
|
+
return (n, r) => (b(), l("div", ae, [u("div", {
|
|
600
523
|
ref_key: "fieldBgEl",
|
|
601
524
|
ref: p,
|
|
602
|
-
class:
|
|
603
|
-
style:
|
|
525
|
+
class: h(["relative", e.variant === "outlined" ? "mt-2" : ""]),
|
|
526
|
+
style: g(e.variant === "outlined" ? { "--field-bg": E(m) } : void 0)
|
|
604
527
|
}, [
|
|
605
|
-
|
|
528
|
+
e.leadingIcon ? (b(), l("div", {
|
|
606
529
|
key: 0,
|
|
607
|
-
class:
|
|
608
|
-
}, [
|
|
609
|
-
name:
|
|
530
|
+
class: h(["pointer-events-none absolute left-3.5 text-on-surface-variant", e.multiline ? "top-[55%] -translate-y-1/2" : e.variant === "filled" ? "top-5" : "top-4.5"])
|
|
531
|
+
}, [f(t, {
|
|
532
|
+
name: e.leadingIcon,
|
|
610
533
|
size: 20
|
|
611
|
-
}, null, 8, ["name"])], 2)) :
|
|
612
|
-
|
|
534
|
+
}, null, 8, ["name"])], 2)) : c("", !0),
|
|
535
|
+
e.multiline ? (b(), l("textarea", {
|
|
613
536
|
key: 1,
|
|
614
|
-
id:
|
|
615
|
-
value: String(
|
|
616
|
-
rows:
|
|
617
|
-
disabled:
|
|
618
|
-
required:
|
|
537
|
+
id: E(a),
|
|
538
|
+
value: String(e.modelValue),
|
|
539
|
+
rows: e.rows,
|
|
540
|
+
disabled: e.disabled,
|
|
541
|
+
required: e.required,
|
|
619
542
|
placeholder: " ",
|
|
620
|
-
class:
|
|
621
|
-
onInput:
|
|
622
|
-
}, null, 42,
|
|
543
|
+
class: h(x.value),
|
|
544
|
+
onInput: k
|
|
545
|
+
}, null, 42, oe)) : (b(), l("input", {
|
|
623
546
|
key: 2,
|
|
624
|
-
id:
|
|
625
|
-
type:
|
|
626
|
-
value:
|
|
627
|
-
disabled:
|
|
628
|
-
required:
|
|
629
|
-
autocomplete:
|
|
547
|
+
id: E(a),
|
|
548
|
+
type: e.type,
|
|
549
|
+
value: e.modelValue,
|
|
550
|
+
disabled: e.disabled,
|
|
551
|
+
required: e.required,
|
|
552
|
+
autocomplete: e.autocomplete,
|
|
630
553
|
placeholder: " ",
|
|
631
|
-
class:
|
|
632
|
-
onInput:
|
|
633
|
-
}, null, 42,
|
|
634
|
-
|
|
635
|
-
for:
|
|
636
|
-
class:
|
|
637
|
-
}, [
|
|
638
|
-
n.$slots.trailing ? (
|
|
554
|
+
class: h(x.value),
|
|
555
|
+
onInput: k
|
|
556
|
+
}, null, 42, se)),
|
|
557
|
+
u("label", {
|
|
558
|
+
for: E(a),
|
|
559
|
+
class: h(w.value)
|
|
560
|
+
}, [d(T(e.label), 1), e.required ? (b(), l("span", ce, "\xA0*")) : c("", !0)], 10, $),
|
|
561
|
+
n.$slots.trailing ? (b(), l("div", le, [C(n.$slots, "trailing")])) : y.value ? (b(), l("button", {
|
|
639
562
|
key: 4,
|
|
640
563
|
type: "button",
|
|
641
564
|
class: "absolute right-3 top-1/2 -translate-y-1/2 flex h-6 w-6 cursor-pointer items-center justify-center rounded-full text-on-surface-variant transition-colors hover:bg-on-surface/8 hover:text-on-surface",
|
|
642
565
|
onClick: r[0] ||= (e) => {
|
|
643
|
-
|
|
566
|
+
E(v)(), i("update:modelValue", "");
|
|
644
567
|
}
|
|
645
|
-
}, [
|
|
568
|
+
}, [f(t, {
|
|
646
569
|
name: "close",
|
|
647
570
|
size: 18
|
|
648
|
-
})])) :
|
|
649
|
-
], 6),
|
|
571
|
+
})])) : c("", !0)
|
|
572
|
+
], 6), e.error && e.errorLabel ? (b(), l("p", ue, T(e.errorLabel), 1)) : e.hint ? (b(), l("p", de, T(e.hint), 1)) : c("", !0)]));
|
|
650
573
|
}
|
|
651
|
-
}),
|
|
574
|
+
}), pe = /* @__PURE__ */ p({
|
|
652
575
|
__name: "MMenu",
|
|
653
576
|
props: { align: { default: "right" } },
|
|
654
577
|
setup(e, { expose: t }) {
|
|
655
|
-
let
|
|
656
|
-
function
|
|
578
|
+
let n = e, d = S(!1), p = S(null), m = S(null), h = S({});
|
|
579
|
+
function _() {
|
|
657
580
|
if (!p.value) return;
|
|
658
|
-
let e = p.value.getBoundingClientRect(), t = window.innerHeight - e.bottom - 8,
|
|
659
|
-
|
|
581
|
+
let e = p.value.getBoundingClientRect(), t = window.innerHeight - e.bottom - 8, r = t < 200 && e.top > t, i = { maxHeight: `${Math.min(r ? e.top - 12 : t, 400)}px` };
|
|
582
|
+
r ? i.bottom = `${window.innerHeight - e.top + 4}px` : i.top = `${e.bottom + 4}px`, n.align === "right" ? i.right = `${window.innerWidth - e.right}px` : i.left = `${e.left}px`, h.value = i;
|
|
660
583
|
}
|
|
661
584
|
function w() {
|
|
662
|
-
|
|
585
|
+
d.value || _(), d.value = !d.value;
|
|
663
586
|
}
|
|
664
587
|
function T() {
|
|
665
|
-
|
|
588
|
+
d.value = !1;
|
|
666
589
|
}
|
|
667
|
-
|
|
590
|
+
x("m-menu-close", T), t({
|
|
668
591
|
close: T,
|
|
669
|
-
open:
|
|
592
|
+
open: d
|
|
670
593
|
});
|
|
671
594
|
function E(e) {
|
|
672
595
|
let t = e.target;
|
|
673
596
|
p.value?.contains(t) || m.value?.contains(t) || t.closest?.(".m3-submenu") || T();
|
|
674
597
|
}
|
|
675
598
|
function D(e) {
|
|
676
|
-
if (!
|
|
599
|
+
if (!d.value || m.value?.contains(e.target) || !p.value) return;
|
|
677
600
|
let t = p.value.getBoundingClientRect();
|
|
678
601
|
if (t.bottom < 0 || t.top > window.innerHeight) {
|
|
679
602
|
T();
|
|
680
603
|
return;
|
|
681
604
|
}
|
|
682
|
-
|
|
605
|
+
_();
|
|
683
606
|
}
|
|
684
607
|
function O(e) {
|
|
685
608
|
e.key === "Escape" && T();
|
|
686
609
|
}
|
|
687
|
-
|
|
610
|
+
v(() => {
|
|
688
611
|
document.addEventListener("mousedown", E), document.addEventListener("keydown", O), window.addEventListener("scroll", D, !0);
|
|
689
|
-
}),
|
|
612
|
+
}), y(() => {
|
|
690
613
|
document.removeEventListener("mousedown", E), document.removeEventListener("keydown", O), window.removeEventListener("scroll", D, !0);
|
|
691
614
|
});
|
|
692
|
-
let k =
|
|
693
|
-
return (e, t) => (
|
|
615
|
+
let k = o(() => n.align === "right" ? "top right" : "top left");
|
|
616
|
+
return (e, t) => (b(), l(r, null, [u("div", {
|
|
694
617
|
ref_key: "triggerEl",
|
|
695
618
|
ref: p,
|
|
696
619
|
class: "inline-block",
|
|
697
620
|
onClick: w
|
|
698
|
-
}, [C(e.$slots, "trigger", { open:
|
|
621
|
+
}, [C(e.$slots, "trigger", { open: d.value })], 512), (b(), s(i, { to: "body" }, [f(a, {
|
|
699
622
|
"enter-active-class": "transition-[opacity,transform] duration-100 ease-out",
|
|
700
623
|
"enter-from-class": "opacity-0 scale-95",
|
|
701
624
|
"enter-to-class": "opacity-100 scale-100",
|
|
@@ -703,26 +626,26 @@ var J = "inline-flex shrink-0 items-center justify-center transition-colors dura
|
|
|
703
626
|
"leave-from-class": "opacity-100 scale-100",
|
|
704
627
|
"leave-to-class": "opacity-0 scale-95"
|
|
705
628
|
}, {
|
|
706
|
-
default:
|
|
629
|
+
default: A(() => [d.value ? (b(), l("div", {
|
|
707
630
|
key: 0,
|
|
708
631
|
ref_key: "dropdownEl",
|
|
709
632
|
ref: m,
|
|
710
633
|
class: "fixed z-500 min-w-48 overflow-hidden rounded-lg bg-surface-container shadow-elevation-2",
|
|
711
|
-
style:
|
|
712
|
-
...
|
|
634
|
+
style: g({
|
|
635
|
+
...h.value,
|
|
713
636
|
transformOrigin: k.value
|
|
714
637
|
})
|
|
715
|
-
}, [
|
|
638
|
+
}, [u("div", {
|
|
716
639
|
class: "overflow-y-auto py-1",
|
|
717
|
-
style:
|
|
718
|
-
}, [C(e.$slots, "default", { close: T })], 4)], 4)) :
|
|
640
|
+
style: g({ maxHeight: h.value.maxHeight })
|
|
641
|
+
}, [C(e.$slots, "default", { close: T })], 4)], 4)) : c("", !0)]),
|
|
719
642
|
_: 3
|
|
720
643
|
})]))], 64));
|
|
721
644
|
}
|
|
722
|
-
}),
|
|
645
|
+
}), me = { class: "flex-1" }, he = {
|
|
723
646
|
key: 1,
|
|
724
647
|
class: "ml-4 shrink-0 text-label-small text-on-surface-variant opacity-60"
|
|
725
|
-
},
|
|
648
|
+
}, ge = /* @__PURE__ */ p({
|
|
726
649
|
__name: "MMenuItem",
|
|
727
650
|
props: {
|
|
728
651
|
icon: {},
|
|
@@ -738,60 +661,60 @@ var J = "inline-flex shrink-0 items-center justify-center transition-colors dura
|
|
|
738
661
|
}
|
|
739
662
|
},
|
|
740
663
|
emits: ["click"],
|
|
741
|
-
setup(
|
|
742
|
-
let
|
|
664
|
+
setup(e, { emit: n }) {
|
|
665
|
+
let r = e, d = n, p = O(), _ = o(() => r.to ? "RouterLink" : "button"), v = o(() => !!p.children), y = m("m-menu-close", null);
|
|
743
666
|
function x() {
|
|
744
|
-
|
|
667
|
+
r.disabled || v.value || (d("click"), y?.());
|
|
745
668
|
}
|
|
746
|
-
let E = S(!1), D = S(),
|
|
747
|
-
function
|
|
748
|
-
if (!v.value ||
|
|
669
|
+
let E = S(!1), D = S(), k = S({});
|
|
670
|
+
function j() {
|
|
671
|
+
if (!v.value || r.disabled || (E.value = !0, !D.value)) return;
|
|
749
672
|
let e = D.value.getBoundingClientRect(), t = e.right + 200 > window.innerWidth;
|
|
750
|
-
|
|
673
|
+
k.value = {
|
|
751
674
|
position: "fixed",
|
|
752
675
|
top: `${e.top}px`,
|
|
753
676
|
...t ? { right: `${window.innerWidth - e.left}px` } : { left: `${e.right}px` },
|
|
754
677
|
zIndex: "501"
|
|
755
678
|
};
|
|
756
679
|
}
|
|
757
|
-
function
|
|
680
|
+
function M(e) {
|
|
758
681
|
e.relatedTarget?.closest(".m3-submenu") || (E.value = !1);
|
|
759
682
|
}
|
|
760
683
|
function N(e) {
|
|
761
684
|
let t = e.relatedTarget;
|
|
762
685
|
t?.closest(".m3-submenu") || D.value?.contains(t) || (E.value = !1);
|
|
763
686
|
}
|
|
764
|
-
return (n,
|
|
687
|
+
return (n, r) => (b(), l("div", {
|
|
765
688
|
ref_key: "itemEl",
|
|
766
689
|
ref: D,
|
|
767
|
-
onMouseenter:
|
|
768
|
-
onMouseleave:
|
|
769
|
-
}, [(
|
|
770
|
-
to:
|
|
771
|
-
type:
|
|
772
|
-
class:
|
|
773
|
-
|
|
774
|
-
!
|
|
775
|
-
!
|
|
690
|
+
onMouseenter: j,
|
|
691
|
+
onMouseleave: M
|
|
692
|
+
}, [(b(), s(w(_.value), {
|
|
693
|
+
to: e.to || void 0,
|
|
694
|
+
type: e.to ? void 0 : "button",
|
|
695
|
+
class: h(["flex w-full items-center gap-3 px-4 py-2.5 text-left text-body-large transition-colors", [
|
|
696
|
+
e.disabled ? "cursor-not-allowed opacity-[0.38] text-on-surface" : "cursor-pointer",
|
|
697
|
+
!e.disabled && e.danger ? "text-error hover:bg-error/8" : "",
|
|
698
|
+
!e.disabled && !e.danger ? "text-on-surface hover:bg-on-surface/8" : ""
|
|
776
699
|
]]),
|
|
777
|
-
disabled:
|
|
700
|
+
disabled: e.disabled || void 0,
|
|
778
701
|
onClick: x
|
|
779
702
|
}, {
|
|
780
|
-
default:
|
|
781
|
-
|
|
703
|
+
default: A(() => [
|
|
704
|
+
e.icon ? (b(), s(t, {
|
|
782
705
|
key: 0,
|
|
783
|
-
name:
|
|
706
|
+
name: e.icon,
|
|
784
707
|
size: 20,
|
|
785
|
-
class:
|
|
786
|
-
}, null, 8, ["name", "class"])) :
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
v.value ? (
|
|
708
|
+
class: h(["shrink-0", e.danger ? "text-error" : "text-on-surface-variant"])
|
|
709
|
+
}, null, 8, ["name", "class"])) : c("", !0),
|
|
710
|
+
u("span", me, [C(n.$slots, "default")]),
|
|
711
|
+
e.shortcut && !v.value ? (b(), l("span", he, T(e.shortcut), 1)) : c("", !0),
|
|
712
|
+
v.value ? (b(), s(t, {
|
|
790
713
|
key: 2,
|
|
791
714
|
name: "chevron_right",
|
|
792
715
|
size: 18,
|
|
793
716
|
class: "shrink-0 text-on-surface-variant"
|
|
794
|
-
})) :
|
|
717
|
+
})) : c("", !0)
|
|
795
718
|
]),
|
|
796
719
|
_: 3
|
|
797
720
|
}, 8, [
|
|
@@ -799,26 +722,26 @@ var J = "inline-flex shrink-0 items-center justify-center transition-colors dura
|
|
|
799
722
|
"type",
|
|
800
723
|
"class",
|
|
801
724
|
"disabled"
|
|
802
|
-
])), v.value ? (
|
|
725
|
+
])), v.value ? (b(), s(i, {
|
|
803
726
|
key: 0,
|
|
804
727
|
to: "body"
|
|
805
|
-
}, [
|
|
728
|
+
}, [f(a, {
|
|
806
729
|
"enter-active-class": "transition-opacity duration-100",
|
|
807
730
|
"enter-from-class": "opacity-0",
|
|
808
731
|
"leave-active-class": "transition-opacity duration-75",
|
|
809
732
|
"leave-to-class": "opacity-0"
|
|
810
733
|
}, {
|
|
811
|
-
default:
|
|
734
|
+
default: A(() => [E.value ? (b(), l("div", {
|
|
812
735
|
key: 0,
|
|
813
736
|
class: "m3-submenu min-w-44 overflow-hidden rounded-lg bg-surface-container py-1 shadow-elevation-2",
|
|
814
|
-
style:
|
|
737
|
+
style: g(k.value),
|
|
815
738
|
onMouseleave: N
|
|
816
|
-
}, [C(n.$slots, "children")], 36)) :
|
|
739
|
+
}, [C(n.$slots, "children")], 36)) : c("", !0)]),
|
|
817
740
|
_: 3
|
|
818
|
-
})])) :
|
|
741
|
+
})])) : c("", !0)], 544));
|
|
819
742
|
}
|
|
820
743
|
});
|
|
821
744
|
//#endregion
|
|
822
|
-
export {
|
|
745
|
+
export { K as a, V as c, ie as i, R as l, pe as n, W as o, fe as r, H as s, ge as t };
|
|
823
746
|
|
|
824
|
-
//# sourceMappingURL=MMenuItem-
|
|
747
|
+
//# sourceMappingURL=MMenuItem-DyY4zhRA.js.map
|