@mureka-fe/ui 6.0.0 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/llms.txt +9 -8
- package/dist/src/components/badge/Badge.vue.d.ts.map +1 -1
- package/dist/src/components/badge/__docs__/demos/preset.demo.vue.d.ts.map +1 -1
- package/dist/src/components/badge/badge.types.d.ts +2 -2
- package/dist/src/components/badge/badge.types.d.ts.map +1 -1
- package/dist/src/components/message/__docs__/demos/dedupe.demo.vue.d.ts +3 -0
- package/dist/src/components/message/__docs__/demos/dedupe.demo.vue.d.ts.map +1 -0
- package/dist/src/components/message/__docs__/meta.d.ts.map +1 -1
- package/dist/src/components/message/message.d.ts +6 -0
- package/dist/src/components/message/message.d.ts.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/ui.js +365 -347
- package/dist/ui.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/ui.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { defineComponent as H, useSlots as
|
|
1
|
+
import { defineComponent as H, useSlots as K, computed as n, openBlock as f, createElementBlock as m, normalizeClass as Q, Fragment as X, createElementVNode as v, createCommentVNode as M, unref as O, renderSlot as w, createTextVNode as G, toDisplayString as A, useAttrs as D, normalizeStyle as he, ref as N, inject as ne, watchEffect as Ie, mergeProps as R, nextTick as j, provide as le, renderList as pe, createBlock as E, withCtx as W, reactive as ze, h as be, createVNode as Oe, TransitionGroup as Ae, resolveDynamicComponent as Re, onMounted as oe, onBeforeUnmount as ie, watch as ue, Teleport as De, createApp as Ge } from "vue";
|
|
2
2
|
const Ee = [
|
|
3
3
|
"new",
|
|
4
4
|
"new-mini",
|
|
5
5
|
"premier",
|
|
6
6
|
"pro",
|
|
7
|
+
"ultra",
|
|
7
8
|
"beta",
|
|
8
9
|
"free",
|
|
9
10
|
"studio",
|
|
@@ -12,11 +13,12 @@ const Ee = [
|
|
|
12
13
|
"published",
|
|
13
14
|
"details",
|
|
14
15
|
"bpm"
|
|
15
|
-
], je = ["outline", "solid", "soft"],
|
|
16
|
+
], je = ["outline", "solid", "soft"], Ue = {
|
|
16
17
|
new: { isSvgPreset: !0 },
|
|
17
18
|
"new-mini": { isSvgPreset: !0 },
|
|
18
19
|
premier: { defaultContent: "Premier" },
|
|
19
20
|
pro: { defaultContent: "Pro" },
|
|
21
|
+
ultra: { defaultContent: "Ultra" },
|
|
20
22
|
beta: { defaultContent: "Beta" },
|
|
21
23
|
free: { defaultContent: "1 Free" },
|
|
22
24
|
studio: { defaultContent: "Studio" },
|
|
@@ -29,15 +31,15 @@ const Ee = [
|
|
|
29
31
|
function ge(e, t) {
|
|
30
32
|
return typeof t == "string" && e.includes(t);
|
|
31
33
|
}
|
|
32
|
-
function
|
|
34
|
+
function Ze(e) {
|
|
33
35
|
return ge(je, e);
|
|
34
36
|
}
|
|
35
|
-
function
|
|
37
|
+
function Fe(e) {
|
|
36
38
|
return ge(Ee, e);
|
|
37
39
|
}
|
|
38
40
|
function ke(e = {}) {
|
|
39
|
-
if (
|
|
40
|
-
const t =
|
|
41
|
+
if (Fe(e.preset)) {
|
|
42
|
+
const t = Ue[e.preset];
|
|
41
43
|
return {
|
|
42
44
|
preset: e.preset,
|
|
43
45
|
defaultContent: t.defaultContent,
|
|
@@ -45,16 +47,16 @@ function ke(e = {}) {
|
|
|
45
47
|
};
|
|
46
48
|
}
|
|
47
49
|
return {
|
|
48
|
-
variant:
|
|
50
|
+
variant: Ze(e.variant) ? e.variant : "outline",
|
|
49
51
|
paid: e.paid ?? !1,
|
|
50
52
|
isSvgPreset: !1
|
|
51
53
|
};
|
|
52
54
|
}
|
|
53
|
-
function
|
|
55
|
+
function Ke(e = {}) {
|
|
54
56
|
const t = ke(e), a = ["mu-badge"];
|
|
55
57
|
return t.preset ? (a.push(`mu-badge--preset-${t.preset}`), t.isSvgPreset && a.push("mu-badge--svg"), t.preset === "details" && a.push("mu-badge--with-default-icon"), a) : (a.push(`mu-badge--variant-${t.variant}`, t.paid ? "is-paid" : "is-free"), a);
|
|
56
58
|
}
|
|
57
|
-
const
|
|
59
|
+
const qe = ["role", "aria-label"], Xe = {
|
|
58
60
|
key: 0,
|
|
59
61
|
"data-test": "new-wordmark",
|
|
60
62
|
class: "mu-badge__new-wordmark",
|
|
@@ -90,14 +92,14 @@ const Ke = ["role", "aria-label"], Xe = {
|
|
|
90
92
|
preset: {}
|
|
91
93
|
},
|
|
92
94
|
setup(e) {
|
|
93
|
-
const t = e, a =
|
|
94
|
-
return (
|
|
95
|
-
class:
|
|
95
|
+
const t = e, a = K(), s = n(() => ke(t)), r = n(() => Ke(t)), l = n(() => s.value.isSvgPreset ? "img" : void 0), o = n(() => s.value.isSvgPreset ? "NEW" : void 0), u = n(() => s.value.preset === "details");
|
|
96
|
+
return (c, i) => (f(), m("span", {
|
|
97
|
+
class: Q(r.value),
|
|
96
98
|
role: l.value,
|
|
97
99
|
"aria-label": o.value
|
|
98
100
|
}, [
|
|
99
101
|
s.value.isSvgPreset ? (f(), m(X, { key: 0 }, [
|
|
100
|
-
s.value.preset === "new" ? (f(), m("svg", Xe, [...
|
|
102
|
+
s.value.preset === "new" ? (f(), m("svg", Xe, [...i[0] || (i[0] = [
|
|
101
103
|
v("path", {
|
|
102
104
|
d: "M0 8V0H1.49679L3.84103 6.65205C3.82636 6.44018 3.80802 6.18813 3.78601 5.89589C3.76399 5.60365 3.74565 5.30046 3.73098 4.9863C3.72364 4.67215 3.71997 4.38721 3.71997 4.13151V0H4.82055V8H3.32376L0.990525 1.34794C1.0052 1.5379 1.01987 1.77534 1.03455 2.06027C1.05656 2.34521 1.07123 2.6411 1.07857 2.94795C1.09325 3.25479 1.10058 3.53973 1.10058 3.80274V8H0Z",
|
|
103
105
|
fill: "currentColor"
|
|
@@ -110,7 +112,7 @@ const Ke = ["role", "aria-label"], Xe = {
|
|
|
110
112
|
d: "M14.7282 8L13.8587 0H14.9263L15.4656 5.74247C15.4803 5.88858 15.4913 6.04932 15.4986 6.22466C15.5133 6.4 15.5243 6.57169 15.5316 6.73973C15.5463 6.90776 15.5536 7.05388 15.5536 7.17808C15.5683 7.05388 15.583 6.90776 15.5977 6.73973C15.6123 6.57169 15.627 6.4 15.6417 6.22466C15.6637 6.04932 15.6857 5.88858 15.7077 5.74247L16.4011 0H17.5017L18.151 5.74247C18.1657 5.88858 18.1804 6.04932 18.195 6.22466C18.2171 6.4 18.2391 6.57169 18.2611 6.73973C18.2831 6.90776 18.2978 7.05388 18.3051 7.17808C18.3124 7.05388 18.3198 6.90776 18.3271 6.73973C18.3418 6.57169 18.3565 6.4 18.3711 6.22466C18.3858 6.04932 18.4005 5.88858 18.4152 5.74247L18.9655 0H20L19.0975 8H17.7218L17.0724 2.18082C17.0578 2.0274 17.0431 1.86667 17.0284 1.69863C17.0138 1.52329 16.9991 1.35525 16.9844 1.19452C16.9697 1.02648 16.9551 0.887671 16.9404 0.778082C16.933 0.887671 16.922 1.02648 16.9074 1.19452C16.8927 1.35525 16.878 1.52329 16.8633 1.69863C16.8487 1.86667 16.8303 2.0274 16.8083 2.18082L16.1149 8H14.7282Z",
|
|
111
113
|
fill: "currentColor"
|
|
112
114
|
}, null, -1)
|
|
113
|
-
])])) : s.value.preset === "new-mini" ? (f(), m("svg", We, [...
|
|
115
|
+
])])) : s.value.preset === "new-mini" ? (f(), m("svg", We, [...i[1] || (i[1] = [
|
|
114
116
|
v("path", {
|
|
115
117
|
d: "M0 6V0H1.12259L2.88078 4.98904C2.86977 4.83014 2.85601 4.6411 2.8395 4.42192C2.823 4.20274 2.80924 3.97534 2.79823 3.73973C2.79273 3.50411 2.78998 3.29041 2.78998 3.09863V0H3.61542V6H2.49282L0.742893 1.01096C0.753899 1.15342 0.764905 1.33151 0.775911 1.54521C0.79242 1.7589 0.803426 1.98082 0.808928 2.21096C0.819934 2.4411 0.825437 2.65479 0.825437 2.85205V6H0Z",
|
|
116
118
|
fill: "currentColor"
|
|
@@ -125,7 +127,7 @@ const Ke = ["role", "aria-label"], Xe = {
|
|
|
125
127
|
}, null, -1)
|
|
126
128
|
])])) : M("", !0)
|
|
127
129
|
], 64)) : (f(), m(X, { key: 1 }, [
|
|
128
|
-
|
|
130
|
+
u.value ? (f(), m("span", Je, [...i[2] || (i[2] = [
|
|
129
131
|
v("svg", {
|
|
130
132
|
"data-test": "details-icon",
|
|
131
133
|
viewBox: "0 0 12 12",
|
|
@@ -142,26 +144,26 @@ const Ke = ["role", "aria-label"], Xe = {
|
|
|
142
144
|
})
|
|
143
145
|
], -1)
|
|
144
146
|
])])) : O(a).prefix ? (f(), m("span", Qe, [
|
|
145
|
-
w(
|
|
147
|
+
w(c.$slots, "prefix", {}, void 0, !0)
|
|
146
148
|
])) : M("", !0),
|
|
147
149
|
v("span", Ye, [
|
|
148
|
-
w(
|
|
150
|
+
w(c.$slots, "default", {}, () => [
|
|
149
151
|
G(A(s.value.defaultContent), 1)
|
|
150
152
|
], !0)
|
|
151
153
|
]),
|
|
152
154
|
O(a).suffix ? (f(), m("span", et, [
|
|
153
|
-
w(
|
|
155
|
+
w(c.$slots, "suffix", {}, void 0, !0)
|
|
154
156
|
])) : M("", !0)
|
|
155
157
|
], 64))
|
|
156
|
-
], 10,
|
|
158
|
+
], 10, qe));
|
|
157
159
|
}
|
|
158
|
-
}),
|
|
160
|
+
}), I = (e, t) => {
|
|
159
161
|
const a = e.__vccOpts || e;
|
|
160
|
-
for (const [s,
|
|
161
|
-
a[s] =
|
|
162
|
+
for (const [s, r] of t)
|
|
163
|
+
a[s] = r;
|
|
162
164
|
return a;
|
|
163
|
-
},
|
|
164
|
-
function
|
|
165
|
+
}, es = /* @__PURE__ */ I(tt, [["__scopeId", "data-v-aa97ab3d"]]);
|
|
166
|
+
function re(e = {}) {
|
|
165
167
|
return {
|
|
166
168
|
type: e.type ?? "primary",
|
|
167
169
|
status: e.status,
|
|
@@ -176,7 +178,7 @@ function ie(e = {}) {
|
|
|
176
178
|
};
|
|
177
179
|
}
|
|
178
180
|
function at(e = {}) {
|
|
179
|
-
const t =
|
|
181
|
+
const t = re(e), a = [
|
|
180
182
|
"mu-button",
|
|
181
183
|
`mu-button--${t.type}`,
|
|
182
184
|
`mu-button--appearance-${t.appearance}`,
|
|
@@ -185,16 +187,16 @@ function at(e = {}) {
|
|
|
185
187
|
return t.type === "ghost" && t.ghostTextTone === "primary" && a.push(`mu-button--ghost-text-${t.ghostTextTone}`), t.shape === "pill" && a.push("mu-button--shape-pill"), t.status && a.push(`mu-button--status-${t.status}`), t.iconOnly && a.push("mu-button--icon-only"), t.disabled && a.push("is-disabled"), t.loading && a.push("is-loading"), a;
|
|
186
188
|
}
|
|
187
189
|
function st(e = {}) {
|
|
188
|
-
const t =
|
|
190
|
+
const t = re(e);
|
|
189
191
|
return !t.disabled && !t.loading;
|
|
190
192
|
}
|
|
191
193
|
function nt(e = {}) {
|
|
192
|
-
const t = e.iconOnly ?? !1, a = e.hasPrefix ?? !1, s = e.hasSuffix ?? !1,
|
|
194
|
+
const t = e.iconOnly ?? !1, a = e.hasPrefix ?? !1, s = e.hasSuffix ?? !1, r = e.loading ?? !1, l = e.hasAriaLabel ?? !1;
|
|
193
195
|
return {
|
|
194
|
-
showPrefixSlot: !t && !
|
|
196
|
+
showPrefixSlot: !t && !r && a,
|
|
195
197
|
showSuffixSlot: !t && s,
|
|
196
|
-
showDefaultSlot: !(t &&
|
|
197
|
-
showLoadingIndicator:
|
|
198
|
+
showDefaultSlot: !(t && r),
|
|
199
|
+
showLoadingIndicator: r,
|
|
198
200
|
requiresAriaLabel: t && !l,
|
|
199
201
|
isInvalidIconOnlyCombination: t && (a || s)
|
|
200
202
|
};
|
|
@@ -203,10 +205,10 @@ const lt = ["type", "disabled", "aria-busy"], ot = {
|
|
|
203
205
|
key: 0,
|
|
204
206
|
class: "mu-button__prefix",
|
|
205
207
|
"aria-hidden": "true"
|
|
206
|
-
},
|
|
208
|
+
}, it = {
|
|
207
209
|
key: 1,
|
|
208
210
|
class: "mu-button__content"
|
|
209
|
-
},
|
|
211
|
+
}, ut = {
|
|
210
212
|
key: 2,
|
|
211
213
|
class: "mu-button__suffix",
|
|
212
214
|
"aria-hidden": "true"
|
|
@@ -226,7 +228,7 @@ const lt = ["type", "disabled", "aria-busy"], ot = {
|
|
|
226
228
|
},
|
|
227
229
|
emits: ["click"],
|
|
228
230
|
setup(e, { emit: t }) {
|
|
229
|
-
const a = e, s = t,
|
|
231
|
+
const a = e, s = t, r = K(), l = D(), o = {
|
|
230
232
|
small: {
|
|
231
233
|
width: "var(--mu-button-icon-size-small)",
|
|
232
234
|
height: "var(--mu-button-icon-size-small)"
|
|
@@ -239,35 +241,35 @@ const lt = ["type", "disabled", "aria-busy"], ot = {
|
|
|
239
241
|
width: "var(--mu-button-icon-size-large)",
|
|
240
242
|
height: "var(--mu-button-icon-size-large)"
|
|
241
243
|
}
|
|
242
|
-
},
|
|
244
|
+
}, u = n(() => re(a)), c = n(() => at(u.value)), i = n(() => o[u.value.size]), d = n(
|
|
243
245
|
() => nt({
|
|
244
|
-
iconOnly:
|
|
245
|
-
hasPrefix: !!
|
|
246
|
-
hasSuffix: !!
|
|
247
|
-
loading:
|
|
248
|
-
hasDefaultSlot: !!
|
|
246
|
+
iconOnly: u.value.iconOnly,
|
|
247
|
+
hasPrefix: !!r.prefix,
|
|
248
|
+
hasSuffix: !!r.suffix,
|
|
249
|
+
loading: u.value.loading,
|
|
250
|
+
hasDefaultSlot: !!r.default,
|
|
249
251
|
hasAriaLabel: typeof l["aria-label"] == "string" && l["aria-label"].trim().length > 0
|
|
250
252
|
})
|
|
251
253
|
);
|
|
252
254
|
function y(k) {
|
|
253
|
-
if (!st(
|
|
255
|
+
if (!st(u.value)) {
|
|
254
256
|
k.preventDefault(), k.stopPropagation();
|
|
255
257
|
return;
|
|
256
258
|
}
|
|
257
259
|
s("click", k);
|
|
258
260
|
}
|
|
259
261
|
return (k, _) => (f(), m("button", {
|
|
260
|
-
type:
|
|
261
|
-
class:
|
|
262
|
-
disabled:
|
|
263
|
-
"aria-busy":
|
|
262
|
+
type: u.value.nativeType,
|
|
263
|
+
class: Q(["mu-button", c.value]),
|
|
264
|
+
disabled: u.value.disabled || u.value.loading,
|
|
265
|
+
"aria-busy": u.value.loading ? "true" : void 0,
|
|
264
266
|
onClick: y
|
|
265
267
|
}, [
|
|
266
268
|
d.value.showLoadingIndicator || d.value.showPrefixSlot ? (f(), m("span", ot, [
|
|
267
269
|
d.value.showLoadingIndicator ? (f(), m("svg", {
|
|
268
270
|
key: 0,
|
|
269
271
|
class: "mu-button__loading-icon",
|
|
270
|
-
style: he(
|
|
272
|
+
style: he(i.value),
|
|
271
273
|
viewBox: "0 0 24 24",
|
|
272
274
|
fill: "none",
|
|
273
275
|
xmlns: "http://www.w3.org/2000/svg"
|
|
@@ -278,15 +280,15 @@ const lt = ["type", "disabled", "aria-busy"], ot = {
|
|
|
278
280
|
}, null, -1)
|
|
279
281
|
])], 4)) : w(k.$slots, "prefix", { key: 1 }, void 0, !0)
|
|
280
282
|
])) : M("", !0),
|
|
281
|
-
d.value.showDefaultSlot ? (f(), m("span",
|
|
283
|
+
d.value.showDefaultSlot ? (f(), m("span", it, [
|
|
282
284
|
w(k.$slots, "default", {}, void 0, !0)
|
|
283
285
|
])) : M("", !0),
|
|
284
|
-
d.value.showSuffixSlot ? (f(), m("span",
|
|
286
|
+
d.value.showSuffixSlot ? (f(), m("span", ut, [
|
|
285
287
|
w(k.$slots, "suffix", {}, void 0, !0)
|
|
286
288
|
])) : M("", !0)
|
|
287
289
|
], 10, lt));
|
|
288
290
|
}
|
|
289
|
-
}), me = /* @__PURE__ */
|
|
291
|
+
}), me = /* @__PURE__ */ I(rt, [["__scopeId", "data-v-e59338a3"]]), _e = Symbol("MuCheckboxGroup"), ct = ["horizontal", "vertical"];
|
|
290
292
|
function dt(e, t) {
|
|
291
293
|
return typeof t == "string" && e.includes(t);
|
|
292
294
|
}
|
|
@@ -349,37 +351,37 @@ const kt = ["checked", "disabled", "name", "value"], _t = { class: "mu-checkbox_
|
|
|
349
351
|
},
|
|
350
352
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
351
353
|
setup(e, { emit: t }) {
|
|
352
|
-
const a = e, s = t,
|
|
353
|
-
() =>
|
|
354
|
-
), k = n(() => (o == null ? void 0 : o.name.value) ??
|
|
355
|
-
() =>
|
|
354
|
+
const a = e, s = t, r = D(), l = N(null), o = ne(_e, null), u = n(() => Ce(a)), c = n(() => vt(a)), i = N(u.value.defaultChecked), d = n(() => o ? u.value.value !== void 0 ? o.isChecked(u.value.value) : !1 : c.value ? u.value.modelValue ?? !1 : i.value), y = n(
|
|
355
|
+
() => u.value.disabled || !!(o != null && o.disabled.value)
|
|
356
|
+
), k = n(() => (o == null ? void 0 : o.name.value) ?? u.value.name), _ = n(
|
|
357
|
+
() => u.value.value === void 0 ? void 0 : String(u.value.value)
|
|
356
358
|
), T = n(() => [
|
|
357
359
|
bt(a, {
|
|
358
360
|
checked: d.value,
|
|
359
|
-
indeterminate:
|
|
361
|
+
indeterminate: u.value.indeterminate,
|
|
360
362
|
disabled: y.value
|
|
361
363
|
}),
|
|
362
|
-
|
|
364
|
+
r.class
|
|
363
365
|
]), x = n(() => {
|
|
364
|
-
const { class: p, style: B, ...
|
|
365
|
-
return
|
|
366
|
-
}), b = n(() =>
|
|
367
|
-
|
|
368
|
-
l.value && (l.value.indeterminate =
|
|
366
|
+
const { class: p, style: B, ...z } = r;
|
|
367
|
+
return z;
|
|
368
|
+
}), b = n(() => r.style);
|
|
369
|
+
Ie(() => {
|
|
370
|
+
l.value && (l.value.indeterminate = u.value.indeterminate);
|
|
369
371
|
});
|
|
370
372
|
function g(p) {
|
|
371
|
-
p && (p.checked = d.value, p.indeterminate =
|
|
373
|
+
p && (p.checked = d.value, p.indeterminate = u.value.indeterminate);
|
|
372
374
|
}
|
|
373
375
|
function S(p) {
|
|
374
376
|
if (y.value)
|
|
375
377
|
return;
|
|
376
378
|
const B = p.target instanceof globalThis.HTMLInputElement ? p.target : null;
|
|
377
379
|
if (o) {
|
|
378
|
-
|
|
380
|
+
u.value.value !== void 0 && o.toggle(u.value.value, p), j(() => g(B));
|
|
379
381
|
return;
|
|
380
382
|
}
|
|
381
|
-
const
|
|
382
|
-
|
|
383
|
+
const z = !d.value;
|
|
384
|
+
c.value || (i.value = z), s("update:modelValue", z), s("change", z, p), j(() => g(B));
|
|
383
385
|
}
|
|
384
386
|
function $(p) {
|
|
385
387
|
s("focus", p);
|
|
@@ -426,7 +428,7 @@ const kt = ["checked", "disabled", "name", "value"], _t = { class: "mu-checkbox_
|
|
|
426
428
|
])
|
|
427
429
|
], 16));
|
|
428
430
|
}
|
|
429
|
-
}), yt = /* @__PURE__ */
|
|
431
|
+
}), yt = /* @__PURE__ */ I(Ct, [["__scopeId", "data-v-bf56ea83"]]), wt = /* @__PURE__ */ H({
|
|
430
432
|
inheritAttrs: !1,
|
|
431
433
|
__name: "CheckboxGroup",
|
|
432
434
|
props: {
|
|
@@ -439,26 +441,26 @@ const kt = ["checked", "disabled", "name", "value"], _t = { class: "mu-checkbox_
|
|
|
439
441
|
},
|
|
440
442
|
emits: ["update:modelValue", "change"],
|
|
441
443
|
setup(e, { emit: t }) {
|
|
442
|
-
const a = e, s = t,
|
|
443
|
-
() => o.value ? l.value.modelValue ?? [] :
|
|
444
|
-
),
|
|
444
|
+
const a = e, s = t, r = D(), l = n(() => ye(a)), o = n(() => mt(a)), u = N([...l.value.defaultValue ?? []]), c = n(
|
|
445
|
+
() => o.value ? l.value.modelValue ?? [] : u.value
|
|
446
|
+
), i = n(() => l.value.disabled), d = n(() => l.value.name), y = n(
|
|
445
447
|
() => l.value.options ? l.value.options.map((g) => pt(g)) : null
|
|
446
|
-
), k = n(() => [gt(a),
|
|
447
|
-
const { class: g, style: S, ...$ } =
|
|
448
|
+
), k = n(() => [gt(a), r.class]), _ = n(() => {
|
|
449
|
+
const { class: g, style: S, ...$ } = r;
|
|
448
450
|
return $;
|
|
449
|
-
}), T = n(() =>
|
|
451
|
+
}), T = n(() => r.style);
|
|
450
452
|
function x(g) {
|
|
451
|
-
return we(
|
|
453
|
+
return we(c.value, g);
|
|
452
454
|
}
|
|
453
455
|
function b(g, S) {
|
|
454
456
|
if (l.value.disabled)
|
|
455
457
|
return;
|
|
456
|
-
const $ = ht(
|
|
457
|
-
o.value || (
|
|
458
|
+
const $ = ht(c.value, g);
|
|
459
|
+
o.value || (u.value = $), s("update:modelValue", $), s("change", $, S);
|
|
458
460
|
}
|
|
459
|
-
return
|
|
460
|
-
value:
|
|
461
|
-
disabled:
|
|
461
|
+
return le(_e, {
|
|
462
|
+
value: c,
|
|
463
|
+
disabled: i,
|
|
462
464
|
name: d,
|
|
463
465
|
isChecked: x,
|
|
464
466
|
toggle: b
|
|
@@ -481,10 +483,10 @@ const kt = ["checked", "disabled", "name", "value"], _t = { class: "mu-checkbox_
|
|
|
481
483
|
}, 1032, ["value", "disabled"]))), 128)) : w(g.$slots, "default", { key: 1 }, void 0, !0)
|
|
482
484
|
], 16));
|
|
483
485
|
}
|
|
484
|
-
}),
|
|
486
|
+
}), ts = /* @__PURE__ */ I(wt, [["__scopeId", "data-v-852a5fc4"]]), xt = 3e3, Vt = {
|
|
485
487
|
close: () => {
|
|
486
488
|
}
|
|
487
|
-
},
|
|
489
|
+
}, U = ze({
|
|
488
490
|
items: []
|
|
489
491
|
});
|
|
490
492
|
let $t = 1;
|
|
@@ -496,30 +498,31 @@ function Bt(e) {
|
|
|
496
498
|
duration: e.duration,
|
|
497
499
|
closable: e.closable,
|
|
498
500
|
resetOnHover: e.resetOnHover,
|
|
499
|
-
icon: e.icon
|
|
501
|
+
icon: e.icon,
|
|
502
|
+
key: e.key
|
|
500
503
|
};
|
|
501
504
|
}
|
|
502
|
-
function
|
|
505
|
+
function ce(e) {
|
|
503
506
|
return e.duration > 0;
|
|
504
507
|
}
|
|
505
508
|
function Tt(e) {
|
|
506
|
-
return
|
|
509
|
+
return U.items.findIndex((t) => t.id === e);
|
|
507
510
|
}
|
|
508
511
|
function xe(e) {
|
|
509
|
-
return
|
|
512
|
+
return U.items.find((t) => t.id === e);
|
|
510
513
|
}
|
|
511
|
-
function
|
|
514
|
+
function de(e) {
|
|
512
515
|
const t = Z.get(e);
|
|
513
516
|
t && t.timer !== null && (globalThis.clearTimeout(t.timer), t.timer = null);
|
|
514
517
|
}
|
|
515
|
-
function
|
|
518
|
+
function J(e) {
|
|
516
519
|
const t = Tt(e);
|
|
517
|
-
t < 0 || (
|
|
520
|
+
t < 0 || (de(e), Z.delete(e), U.items.splice(t, 1));
|
|
518
521
|
}
|
|
519
522
|
function Ve(e, t) {
|
|
520
523
|
const a = Z.get(e);
|
|
521
|
-
a && (
|
|
522
|
-
|
|
524
|
+
a && (de(e), a.remainingDuration = t, a.deadline = Date.now() + t, a.isPaused = !1, a.timer = globalThis.setTimeout(() => {
|
|
525
|
+
J(e);
|
|
523
526
|
}, t));
|
|
524
527
|
}
|
|
525
528
|
function Mt(e, t) {
|
|
@@ -531,60 +534,75 @@ function Mt(e, t) {
|
|
|
531
534
|
duration: t.duration ?? xt,
|
|
532
535
|
closable: t.closable ?? !1,
|
|
533
536
|
resetOnHover: t.resetOnHover ?? !1,
|
|
534
|
-
icon: t.icon
|
|
537
|
+
icon: t.icon,
|
|
538
|
+
key: t.key
|
|
535
539
|
};
|
|
536
540
|
}
|
|
537
541
|
function St() {
|
|
538
542
|
return typeof globalThis.window < "u" && typeof globalThis.document < "u";
|
|
539
543
|
}
|
|
540
|
-
function Lt(e
|
|
544
|
+
function Lt(e) {
|
|
545
|
+
return e.key !== void 0 && e.key !== null;
|
|
546
|
+
}
|
|
547
|
+
function Pt(e) {
|
|
548
|
+
return U.items.find((t) => t.key === e);
|
|
549
|
+
}
|
|
550
|
+
function Nt(e, t) {
|
|
541
551
|
if (!St())
|
|
542
552
|
return Vt;
|
|
543
|
-
const a = Bt(t)
|
|
544
|
-
|
|
553
|
+
const a = Bt(t);
|
|
554
|
+
if (Lt(a)) {
|
|
555
|
+
const r = Pt(a.key);
|
|
556
|
+
if (r) {
|
|
557
|
+
const l = r.id;
|
|
558
|
+
return { close: () => J(l) };
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
const s = Mt(e, a);
|
|
562
|
+
return U.items.push(s), Z.set(s.id, {
|
|
545
563
|
timer: null,
|
|
546
564
|
deadline: 0,
|
|
547
565
|
remainingDuration: s.duration,
|
|
548
566
|
isPaused: !1
|
|
549
|
-
}),
|
|
550
|
-
close: () =>
|
|
567
|
+
}), ce(s) && Ve(s.id, s.duration), {
|
|
568
|
+
close: () => J(s.id)
|
|
551
569
|
};
|
|
552
570
|
}
|
|
553
571
|
function F(e) {
|
|
554
|
-
return (t) =>
|
|
572
|
+
return (t) => Nt(e, t);
|
|
555
573
|
}
|
|
556
|
-
const
|
|
574
|
+
const as = {
|
|
557
575
|
success: F("success"),
|
|
558
576
|
warning: F("warning"),
|
|
559
577
|
info: F("info"),
|
|
560
578
|
error: F("error"),
|
|
561
579
|
danger: F("danger")
|
|
562
580
|
};
|
|
563
|
-
function
|
|
564
|
-
|
|
581
|
+
function Ht(e) {
|
|
582
|
+
J(e);
|
|
565
583
|
}
|
|
566
|
-
function
|
|
584
|
+
function It(e) {
|
|
567
585
|
const t = Z.get(e), a = xe(e);
|
|
568
|
-
!t || !a || t.isPaused || !a.resetOnHover || !
|
|
586
|
+
!t || !a || t.isPaused || !a.resetOnHover || !ce(a) || (t.remainingDuration = Math.max(t.deadline - Date.now(), 0), de(e), t.isPaused = !0);
|
|
569
587
|
}
|
|
570
|
-
function
|
|
588
|
+
function zt(e) {
|
|
571
589
|
const t = Z.get(e), a = xe(e);
|
|
572
|
-
!t || !a || !t.isPaused || !a.resetOnHover || !
|
|
590
|
+
!t || !a || !t.isPaused || !a.resetOnHover || !ce(a) || Ve(e, t.remainingDuration || a.duration);
|
|
573
591
|
}
|
|
574
|
-
const
|
|
592
|
+
const Ot = {
|
|
575
593
|
class: "mu-message-list",
|
|
576
594
|
"aria-live": "polite",
|
|
577
595
|
"aria-atomic": "true"
|
|
578
|
-
},
|
|
596
|
+
}, At = ["onMouseenter", "onMouseleave"], Rt = {
|
|
579
597
|
class: "mu-message__icon",
|
|
580
598
|
"aria-hidden": "true"
|
|
581
|
-
},
|
|
599
|
+
}, Dt = { class: "mu-message__content" }, Gt = { class: "mu-message__title" }, Et = {
|
|
582
600
|
key: 0,
|
|
583
601
|
class: "mu-message__description"
|
|
584
|
-
},
|
|
602
|
+
}, jt = ["onClick"], Ut = /* @__PURE__ */ H({
|
|
585
603
|
__name: "MessageList",
|
|
586
604
|
setup(e) {
|
|
587
|
-
const t = n(() =>
|
|
605
|
+
const t = n(() => U.items), a = H({
|
|
588
606
|
name: "MarkupIcon",
|
|
589
607
|
props: {
|
|
590
608
|
markup: {
|
|
@@ -592,33 +610,33 @@ const zt = {
|
|
|
592
610
|
required: !0
|
|
593
611
|
}
|
|
594
612
|
},
|
|
595
|
-
setup(
|
|
596
|
-
return () => be("span", { class: "mu-message__icon-markup", innerHTML:
|
|
613
|
+
setup(c) {
|
|
614
|
+
return () => be("span", { class: "mu-message__icon-markup", innerHTML: c.markup });
|
|
597
615
|
}
|
|
598
616
|
});
|
|
599
|
-
function s(
|
|
600
|
-
return typeof
|
|
617
|
+
function s(c) {
|
|
618
|
+
return typeof c != "string";
|
|
601
619
|
}
|
|
602
|
-
function c
|
|
603
|
-
|
|
620
|
+
function r(c) {
|
|
621
|
+
It(c);
|
|
604
622
|
}
|
|
605
|
-
function l(
|
|
606
|
-
|
|
623
|
+
function l(c) {
|
|
624
|
+
zt(c);
|
|
607
625
|
}
|
|
608
|
-
function o(
|
|
609
|
-
if (!(
|
|
626
|
+
function o(c) {
|
|
627
|
+
if (!(c instanceof globalThis.HTMLElement))
|
|
610
628
|
return;
|
|
611
|
-
const
|
|
612
|
-
|
|
629
|
+
const i = c.getBoundingClientRect();
|
|
630
|
+
c.style.width = `${i.width}px`, c.style.height = `${i.height}px`;
|
|
613
631
|
}
|
|
614
|
-
const
|
|
632
|
+
const u = {
|
|
615
633
|
success: '<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20 6.5L9.5 17L4 11.5" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',
|
|
616
634
|
warning: '<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 4.5L20 18.5H4L12 4.5Z" stroke="currentColor" stroke-width="2" stroke-linejoin="round"/><path d="M12 9.5V13.5" stroke="currentColor" stroke-width="2" stroke-linecap="round"/><circle cx="12" cy="16.5" r="1" fill="currentColor"/></svg>',
|
|
617
635
|
info: '<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="8" stroke="currentColor" stroke-width="2"/><circle cx="12" cy="8.5" r="1" fill="currentColor"/><path d="M12 11.5V16" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg>',
|
|
618
636
|
error: '<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="8" stroke="currentColor" stroke-width="2"/><path d="M12 9V12.5" stroke="currentColor" stroke-width="2" stroke-linecap="round"/><circle cx="12" cy="15.5" r="1" fill="currentColor"/></svg>',
|
|
619
637
|
danger: '<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="8" stroke="currentColor" stroke-width="2"/><path d="M9 9L15 15" stroke="currentColor" stroke-width="2" stroke-linecap="round"/><path d="M15 9L9 15" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg>'
|
|
620
638
|
};
|
|
621
|
-
return (
|
|
639
|
+
return (c, i) => (f(), m("div", Ot, [
|
|
622
640
|
Oe(Ae, {
|
|
623
641
|
name: "mu-message-fade",
|
|
624
642
|
tag: "div",
|
|
@@ -628,28 +646,28 @@ const zt = {
|
|
|
628
646
|
default: W(() => [
|
|
629
647
|
(f(!0), m(X, null, pe(t.value, (d) => (f(), m("div", {
|
|
630
648
|
key: d.id,
|
|
631
|
-
class:
|
|
649
|
+
class: Q(["mu-message", [`mu-message--${d.type}`, { "mu-message--compact": !d.description }]]),
|
|
632
650
|
role: "status",
|
|
633
|
-
onMouseenter: (y) =>
|
|
651
|
+
onMouseenter: (y) => r(d.id),
|
|
634
652
|
onMouseleave: (y) => l(d.id)
|
|
635
653
|
}, [
|
|
636
|
-
v("span",
|
|
654
|
+
v("span", Rt, [
|
|
637
655
|
d.icon && s(d.icon) ? (f(), E(Re(d.icon), { key: 0 })) : (f(), E(O(a), {
|
|
638
656
|
key: 1,
|
|
639
|
-
markup: typeof d.icon == "string" ? d.icon :
|
|
657
|
+
markup: typeof d.icon == "string" ? d.icon : u[d.type]
|
|
640
658
|
}, null, 8, ["markup"]))
|
|
641
659
|
]),
|
|
642
|
-
v("div",
|
|
643
|
-
v("div",
|
|
644
|
-
d.description ? (f(), m("p",
|
|
660
|
+
v("div", Dt, [
|
|
661
|
+
v("div", Gt, A(d.title), 1),
|
|
662
|
+
d.description ? (f(), m("p", Et, A(d.description), 1)) : M("", !0)
|
|
645
663
|
]),
|
|
646
664
|
d.closable ? (f(), m("button", {
|
|
647
665
|
key: 0,
|
|
648
666
|
type: "button",
|
|
649
667
|
class: "mu-message__close",
|
|
650
668
|
"aria-label": "Close message",
|
|
651
|
-
onClick: (y) => O(
|
|
652
|
-
}, [...
|
|
669
|
+
onClick: (y) => O(Ht)(d.id)
|
|
670
|
+
}, [...i[0] || (i[0] = [
|
|
653
671
|
v("svg", {
|
|
654
672
|
viewBox: "0 0 24 24",
|
|
655
673
|
fill: "none",
|
|
@@ -662,14 +680,14 @@ const zt = {
|
|
|
662
680
|
"stroke-linecap": "round"
|
|
663
681
|
})
|
|
664
682
|
], -1)
|
|
665
|
-
])], 8,
|
|
666
|
-
], 42,
|
|
683
|
+
])], 8, jt)) : M("", !0)
|
|
684
|
+
], 42, At))), 128))
|
|
667
685
|
]),
|
|
668
686
|
_: 1
|
|
669
687
|
})
|
|
670
688
|
]));
|
|
671
689
|
}
|
|
672
|
-
}),
|
|
690
|
+
}), ss = /* @__PURE__ */ I(Ut, [["__scopeId", "data-v-fca28789"]]), Zt = {
|
|
673
691
|
medium: {
|
|
674
692
|
width: "548px",
|
|
675
693
|
minHeight: "228px"
|
|
@@ -680,7 +698,7 @@ const zt = {
|
|
|
680
698
|
}
|
|
681
699
|
};
|
|
682
700
|
function fe(e = {}) {
|
|
683
|
-
const t = e.size ?? "medium", a =
|
|
701
|
+
const t = e.size ?? "medium", a = Zt[t], s = e.variant ?? "form";
|
|
684
702
|
return {
|
|
685
703
|
visible: e.visible ?? !1,
|
|
686
704
|
title: e.title ?? "",
|
|
@@ -700,7 +718,7 @@ function fe(e = {}) {
|
|
|
700
718
|
okLoading: e.okLoading ?? !1
|
|
701
719
|
};
|
|
702
720
|
}
|
|
703
|
-
function
|
|
721
|
+
function Ft(e = {}) {
|
|
704
722
|
const t = fe(e), a = [
|
|
705
723
|
"mu-modal",
|
|
706
724
|
`mu-modal--${t.size}`,
|
|
@@ -709,7 +727,7 @@ function Zt(e = {}) {
|
|
|
709
727
|
];
|
|
710
728
|
return t.variant === "feedback" && a.push("mu-modal--feedback"), a;
|
|
711
729
|
}
|
|
712
|
-
function
|
|
730
|
+
function Kt(e = {}) {
|
|
713
731
|
const t = fe(e);
|
|
714
732
|
return t.variant === "feedback" ? {
|
|
715
733
|
type: "secondary",
|
|
@@ -721,13 +739,13 @@ function Ft(e = {}) {
|
|
|
721
739
|
type: "primary"
|
|
722
740
|
};
|
|
723
741
|
}
|
|
724
|
-
const
|
|
742
|
+
const qt = {
|
|
725
743
|
key: 0,
|
|
726
744
|
class: "mu-modal-root"
|
|
727
|
-
},
|
|
745
|
+
}, Xt = { class: "mu-modal__header" }, Wt = ["data-status"], Jt = { class: "mu-modal__body" }, Qt = {
|
|
728
746
|
key: 0,
|
|
729
747
|
class: "mu-modal__footer"
|
|
730
|
-
},
|
|
748
|
+
}, Yt = /* @__PURE__ */ H({
|
|
731
749
|
inheritAttrs: !1,
|
|
732
750
|
__name: "Modal",
|
|
733
751
|
props: {
|
|
@@ -748,17 +766,17 @@ const Ut = {
|
|
|
748
766
|
},
|
|
749
767
|
emits: ["update:visible", "ok", "cancel", "close"],
|
|
750
768
|
setup(e, { emit: t }) {
|
|
751
|
-
const a = e, s = t,
|
|
752
|
-
const { class: h, style: p, ...B } =
|
|
769
|
+
const a = e, s = t, r = D(), l = n(() => fe(a)), o = n(() => [Ft(a), r.class]), u = n(() => {
|
|
770
|
+
const { class: h, style: p, ...B } = r;
|
|
753
771
|
return B;
|
|
754
|
-
}),
|
|
772
|
+
}), c = n(() => Kt(a)), i = n(
|
|
755
773
|
() => l.value.variant === "feedback" && l.value.hideCancel
|
|
756
774
|
), d = n(() => [
|
|
757
775
|
{
|
|
758
776
|
width: l.value.width,
|
|
759
777
|
minHeight: l.value.minHeight
|
|
760
778
|
},
|
|
761
|
-
|
|
779
|
+
r.style
|
|
762
780
|
]), y = `mu-modal-title-${Math.random().toString(36).slice(2, 10)}`, _ = typeof globalThis.document < "u" ? globalThis.document : null;
|
|
763
781
|
function T() {
|
|
764
782
|
s("update:visible", !1);
|
|
@@ -778,9 +796,9 @@ const Ut = {
|
|
|
778
796
|
function $(h) {
|
|
779
797
|
h.key !== "Escape" || !l.value.visible || !l.value.escToClose || (T(), s("close"));
|
|
780
798
|
}
|
|
781
|
-
return
|
|
799
|
+
return oe(() => {
|
|
782
800
|
_ && _.addEventListener("keydown", $);
|
|
783
|
-
}),
|
|
801
|
+
}), ie(() => {
|
|
784
802
|
_ && (_.removeEventListener("keydown", $), _.body.style.overflow = "");
|
|
785
803
|
}), ue(
|
|
786
804
|
() => l.value.visible,
|
|
@@ -789,19 +807,19 @@ const Ut = {
|
|
|
789
807
|
},
|
|
790
808
|
{ immediate: !0 }
|
|
791
809
|
), (h, p) => (f(), E(De, { to: "body" }, [
|
|
792
|
-
l.value.visible ? (f(), m("div",
|
|
810
|
+
l.value.visible ? (f(), m("div", qt, [
|
|
793
811
|
v("div", {
|
|
794
812
|
class: "mu-modal__mask",
|
|
795
813
|
onClick: x
|
|
796
814
|
}),
|
|
797
|
-
v("div", R(
|
|
815
|
+
v("div", R(u.value, {
|
|
798
816
|
class: o.value,
|
|
799
817
|
style: d.value,
|
|
800
818
|
role: "dialog",
|
|
801
819
|
"aria-modal": "true",
|
|
802
820
|
"aria-labelledby": y
|
|
803
821
|
}), [
|
|
804
|
-
v("header",
|
|
822
|
+
v("header", Xt, [
|
|
805
823
|
v("div", {
|
|
806
824
|
id: y,
|
|
807
825
|
class: "mu-modal__title",
|
|
@@ -810,7 +828,7 @@ const Ut = {
|
|
|
810
828
|
w(h.$slots, "title", {}, () => [
|
|
811
829
|
G(A(l.value.title), 1)
|
|
812
830
|
], !0)
|
|
813
|
-
], 8,
|
|
831
|
+
], 8, Wt),
|
|
814
832
|
l.value.closable ? (f(), m("button", {
|
|
815
833
|
key: 0,
|
|
816
834
|
type: "button",
|
|
@@ -843,10 +861,10 @@ const Ut = {
|
|
|
843
861
|
], -1)
|
|
844
862
|
])])) : M("", !0)
|
|
845
863
|
]),
|
|
846
|
-
v("div",
|
|
864
|
+
v("div", Jt, [
|
|
847
865
|
w(h.$slots, "default", {}, void 0, !0)
|
|
848
866
|
]),
|
|
849
|
-
h.$slots.footer || !l.value.hideOk || !l.value.hideCancel ? (f(), m("footer",
|
|
867
|
+
h.$slots.footer || !l.value.hideOk || !l.value.hideCancel ? (f(), m("footer", Qt, [
|
|
850
868
|
w(h.$slots, "footer", {}, () => [
|
|
851
869
|
l.value.hideCancel ? M("", !0) : (f(), E(O(me), {
|
|
852
870
|
key: 0,
|
|
@@ -859,9 +877,9 @@ const Ut = {
|
|
|
859
877
|
]),
|
|
860
878
|
_: 1
|
|
861
879
|
})),
|
|
862
|
-
l.value.hideOk ? M("", !0) : (f(), E(O(me), R({ key: 1 },
|
|
880
|
+
l.value.hideOk ? M("", !0) : (f(), E(O(me), R({ key: 1 }, c.value, {
|
|
863
881
|
loading: l.value.okLoading,
|
|
864
|
-
class: ["mu-modal__ok", { "mu-modal__ok--block":
|
|
882
|
+
class: ["mu-modal__ok", { "mu-modal__ok--block": i.value }],
|
|
865
883
|
onClick: S
|
|
866
884
|
}), {
|
|
867
885
|
default: W(() => [
|
|
@@ -875,60 +893,60 @@ const Ut = {
|
|
|
875
893
|
])) : M("", !0)
|
|
876
894
|
]));
|
|
877
895
|
}
|
|
878
|
-
}),
|
|
879
|
-
function
|
|
896
|
+
}), ea = /* @__PURE__ */ I(Yt, [["__scopeId", "data-v-e94991b0"]]);
|
|
897
|
+
function ta(e) {
|
|
880
898
|
return e === void 0 ? null : typeof e == "function" ? e() : e;
|
|
881
899
|
}
|
|
882
|
-
function
|
|
900
|
+
function q(e = {}) {
|
|
883
901
|
return typeof globalThis.document > "u" ? Promise.resolve(!1) : new Promise((t) => {
|
|
884
902
|
const a = globalThis.document.createElement("div");
|
|
885
903
|
globalThis.document.body.appendChild(a);
|
|
886
904
|
const s = N(!0);
|
|
887
|
-
let
|
|
905
|
+
let r = null, l = !1;
|
|
888
906
|
const o = () => {
|
|
889
|
-
|
|
890
|
-
},
|
|
907
|
+
r && (r.unmount(), r = null), a.parentNode && a.parentNode.removeChild(a);
|
|
908
|
+
}, u = (d) => {
|
|
891
909
|
l || (l = !0, s.value = !1, queueMicrotask(() => {
|
|
892
910
|
o(), t(d);
|
|
893
911
|
}));
|
|
894
|
-
}, { content:
|
|
895
|
-
|
|
912
|
+
}, { content: c, ...i } = e;
|
|
913
|
+
r = Ge({
|
|
896
914
|
render() {
|
|
897
915
|
return be(
|
|
898
|
-
|
|
916
|
+
ea,
|
|
899
917
|
{
|
|
900
|
-
...
|
|
918
|
+
...i,
|
|
901
919
|
visible: s.value,
|
|
902
920
|
"onUpdate:visible": (d) => {
|
|
903
|
-
d ||
|
|
921
|
+
d || u(!1);
|
|
904
922
|
},
|
|
905
|
-
onOk: () =>
|
|
906
|
-
onCancel: () =>
|
|
907
|
-
onClose: () =>
|
|
923
|
+
onOk: () => u(!0),
|
|
924
|
+
onCancel: () => u(!1),
|
|
925
|
+
onClose: () => u(!1)
|
|
908
926
|
},
|
|
909
927
|
{
|
|
910
|
-
default: () =>
|
|
928
|
+
default: () => ta(c)
|
|
911
929
|
}
|
|
912
930
|
);
|
|
913
931
|
}
|
|
914
|
-
}),
|
|
932
|
+
}), r.mount(a);
|
|
915
933
|
});
|
|
916
934
|
}
|
|
917
|
-
const
|
|
935
|
+
const ns = {
|
|
918
936
|
/** 通用版本,透传所有 props,默认 variant='form'。 */
|
|
919
|
-
show:
|
|
937
|
+
show: q,
|
|
920
938
|
/** 通用确认弹窗,等价于 show,使用 form 形态 + 自定义 status。 */
|
|
921
|
-
confirm: (e = {}) =>
|
|
939
|
+
confirm: (e = {}) => q(e),
|
|
922
940
|
/** 反馈形态 + status='success'。 */
|
|
923
|
-
success: (e = {}) =>
|
|
941
|
+
success: (e = {}) => q({ ...e, variant: "feedback", status: "success" }),
|
|
924
942
|
/** 反馈形态 + status='danger'。 */
|
|
925
|
-
danger: (e = {}) =>
|
|
926
|
-
}, $e = Symbol("MuRadioGroup"),
|
|
927
|
-
function
|
|
943
|
+
danger: (e = {}) => q({ ...e, variant: "feedback", status: "danger" })
|
|
944
|
+
}, $e = Symbol("MuRadioGroup"), aa = ["horizontal", "vertical"];
|
|
945
|
+
function sa(e, t) {
|
|
928
946
|
return typeof t == "string" && e.includes(t);
|
|
929
947
|
}
|
|
930
|
-
function
|
|
931
|
-
return
|
|
948
|
+
function na(e) {
|
|
949
|
+
return sa(aa, e);
|
|
932
950
|
}
|
|
933
951
|
function Be(e = {}) {
|
|
934
952
|
return {
|
|
@@ -945,27 +963,27 @@ function Te(e = {}) {
|
|
|
945
963
|
defaultValue: e.defaultValue,
|
|
946
964
|
disabled: e.disabled ?? !1,
|
|
947
965
|
name: e.name,
|
|
948
|
-
direction:
|
|
966
|
+
direction: na(e.direction) ? e.direction : "horizontal"
|
|
949
967
|
};
|
|
950
968
|
}
|
|
951
|
-
function
|
|
969
|
+
function la(e = {}) {
|
|
952
970
|
return e.modelValue !== void 0;
|
|
953
971
|
}
|
|
954
|
-
function
|
|
972
|
+
function oa(e = {}) {
|
|
955
973
|
return e.modelValue !== void 0;
|
|
956
974
|
}
|
|
957
|
-
function
|
|
975
|
+
function ae(e, t) {
|
|
958
976
|
return Object.is(e, t);
|
|
959
977
|
}
|
|
960
|
-
function
|
|
978
|
+
function ia(e = {}, t = {}) {
|
|
961
979
|
const a = Be(e), s = ["mu-radio"];
|
|
962
980
|
return t.checked && s.push("is-checked"), (t.disabled || a.disabled) && s.push("is-disabled"), s;
|
|
963
981
|
}
|
|
964
|
-
function
|
|
982
|
+
function ua(e = {}) {
|
|
965
983
|
const t = Te(e), a = ["mu-radio-group", `mu-radio-group--${t.direction}`];
|
|
966
984
|
return t.disabled && a.push("is-disabled"), a;
|
|
967
985
|
}
|
|
968
|
-
const
|
|
986
|
+
const ra = ["checked", "disabled", "name", "value"], ca = { class: "mu-radio__label" }, da = /* @__PURE__ */ H({
|
|
969
987
|
inheritAttrs: !1,
|
|
970
988
|
__name: "Radio",
|
|
971
989
|
props: {
|
|
@@ -977,20 +995,20 @@ const ua = ["checked", "disabled", "name", "value"], ia = { class: "mu-radio__la
|
|
|
977
995
|
},
|
|
978
996
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
979
997
|
setup(e, { emit: t }) {
|
|
980
|
-
const a = e, s = t,
|
|
998
|
+
const a = e, s = t, r = D(), l = ne($e, null), o = n(() => Be(a)), u = n(() => la(a)), c = N(o.value.defaultChecked), i = n(() => l ? ae(l.value.value, o.value.value) : u.value ? ae(o.value.modelValue, o.value.value) : c.value), d = n(
|
|
981
999
|
() => o.value.disabled || !!(l != null && l.disabled.value)
|
|
982
1000
|
), y = n(() => (l == null ? void 0 : l.name.value) ?? o.value.name), k = n(() => String(o.value.value)), _ = n(() => [
|
|
983
|
-
|
|
984
|
-
checked:
|
|
1001
|
+
ia(a, {
|
|
1002
|
+
checked: i.value,
|
|
985
1003
|
disabled: d.value
|
|
986
1004
|
}),
|
|
987
|
-
|
|
1005
|
+
r.class
|
|
988
1006
|
]), T = n(() => {
|
|
989
|
-
const { class: h, style: p, ...B } =
|
|
1007
|
+
const { class: h, style: p, ...B } = r;
|
|
990
1008
|
return B;
|
|
991
|
-
}), x = n(() =>
|
|
1009
|
+
}), x = n(() => r.style);
|
|
992
1010
|
function b(h, p) {
|
|
993
|
-
|
|
1011
|
+
u.value || (c.value = !0), s("update:modelValue", h), s("change", h, p);
|
|
994
1012
|
}
|
|
995
1013
|
function g(h) {
|
|
996
1014
|
if (d.value)
|
|
@@ -998,12 +1016,12 @@ const ua = ["checked", "disabled", "name", "value"], ia = { class: "mu-radio__la
|
|
|
998
1016
|
const p = o.value.value, B = h.target instanceof globalThis.HTMLInputElement ? h.target : null;
|
|
999
1017
|
if (l) {
|
|
1000
1018
|
l.select(p, h), j(() => {
|
|
1001
|
-
B && (B.checked =
|
|
1019
|
+
B && (B.checked = i.value);
|
|
1002
1020
|
});
|
|
1003
1021
|
return;
|
|
1004
1022
|
}
|
|
1005
1023
|
b(p, h), j(() => {
|
|
1006
|
-
B && (B.checked =
|
|
1024
|
+
B && (B.checked = i.value);
|
|
1007
1025
|
});
|
|
1008
1026
|
}
|
|
1009
1027
|
function S(h) {
|
|
@@ -1019,26 +1037,26 @@ const ua = ["checked", "disabled", "name", "value"], ia = { class: "mu-radio__la
|
|
|
1019
1037
|
v("input", {
|
|
1020
1038
|
class: "mu-radio__input",
|
|
1021
1039
|
type: "radio",
|
|
1022
|
-
checked:
|
|
1040
|
+
checked: i.value,
|
|
1023
1041
|
disabled: d.value,
|
|
1024
1042
|
name: y.value,
|
|
1025
1043
|
value: k.value,
|
|
1026
1044
|
onChange: g,
|
|
1027
1045
|
onFocus: S,
|
|
1028
1046
|
onBlur: $
|
|
1029
|
-
}, null, 40,
|
|
1047
|
+
}, null, 40, ra),
|
|
1030
1048
|
p[0] || (p[0] = v("span", {
|
|
1031
1049
|
class: "mu-radio__control",
|
|
1032
1050
|
"aria-hidden": "true"
|
|
1033
1051
|
}, [
|
|
1034
1052
|
v("span", { class: "mu-radio__dot" })
|
|
1035
1053
|
], -1)),
|
|
1036
|
-
v("span",
|
|
1054
|
+
v("span", ca, [
|
|
1037
1055
|
w(h.$slots, "default", {}, void 0, !0)
|
|
1038
1056
|
])
|
|
1039
1057
|
], 16));
|
|
1040
1058
|
}
|
|
1041
|
-
}),
|
|
1059
|
+
}), ls = /* @__PURE__ */ I(da, [["__scopeId", "data-v-f1283749"]]), fa = /* @__PURE__ */ H({
|
|
1042
1060
|
inheritAttrs: !1,
|
|
1043
1061
|
__name: "RadioGroup",
|
|
1044
1062
|
props: {
|
|
@@ -1050,18 +1068,18 @@ const ua = ["checked", "disabled", "name", "value"], ia = { class: "mu-radio__la
|
|
|
1050
1068
|
},
|
|
1051
1069
|
emits: ["update:modelValue", "change"],
|
|
1052
1070
|
setup(e, { emit: t }) {
|
|
1053
|
-
const a = e, s = t,
|
|
1054
|
-
() => o.value ? l.value.modelValue :
|
|
1055
|
-
),
|
|
1056
|
-
const { class: x, style: b, ...g } =
|
|
1071
|
+
const a = e, s = t, r = D(), l = n(() => Te(a)), o = n(() => oa(a)), u = N(l.value.defaultValue), c = n(
|
|
1072
|
+
() => o.value ? l.value.modelValue : u.value
|
|
1073
|
+
), i = n(() => l.value.disabled), d = n(() => l.value.name), y = n(() => [ua(a), r.class]), k = n(() => {
|
|
1074
|
+
const { class: x, style: b, ...g } = r;
|
|
1057
1075
|
return g;
|
|
1058
|
-
}), _ = n(() =>
|
|
1076
|
+
}), _ = n(() => r.style);
|
|
1059
1077
|
function T(x, b) {
|
|
1060
|
-
l.value.disabled ||
|
|
1078
|
+
l.value.disabled || ae(c.value, x) || (o.value || (u.value = x), s("update:modelValue", x), s("change", x, b));
|
|
1061
1079
|
}
|
|
1062
|
-
return
|
|
1063
|
-
value:
|
|
1064
|
-
disabled:
|
|
1080
|
+
return le($e, {
|
|
1081
|
+
value: c,
|
|
1082
|
+
disabled: i,
|
|
1065
1083
|
name: d,
|
|
1066
1084
|
select: T
|
|
1067
1085
|
}), (x, b) => (f(), m("div", R(k.value, {
|
|
@@ -1072,24 +1090,24 @@ const ua = ["checked", "disabled", "name", "value"], ia = { class: "mu-radio__la
|
|
|
1072
1090
|
w(x.$slots, "default", {}, void 0, !0)
|
|
1073
1091
|
], 16));
|
|
1074
1092
|
}
|
|
1075
|
-
}),
|
|
1093
|
+
}), os = /* @__PURE__ */ I(fa, [["__scopeId", "data-v-3879fec4"]]), va = ["circle", "round", "line"], ma = ["small", "medium"];
|
|
1076
1094
|
function Me(e, t) {
|
|
1077
1095
|
return typeof t == "string" && e.includes(t);
|
|
1078
1096
|
}
|
|
1079
|
-
function
|
|
1080
|
-
return Me(
|
|
1097
|
+
function ha(e) {
|
|
1098
|
+
return Me(va, e);
|
|
1081
1099
|
}
|
|
1082
|
-
function
|
|
1083
|
-
return Me(
|
|
1100
|
+
function pa(e) {
|
|
1101
|
+
return Me(ma, e);
|
|
1084
1102
|
}
|
|
1085
|
-
function
|
|
1103
|
+
function se(e = {}) {
|
|
1086
1104
|
return {
|
|
1087
1105
|
modelValue: e.modelValue,
|
|
1088
1106
|
defaultChecked: e.defaultChecked ?? !1,
|
|
1089
1107
|
disabled: e.disabled ?? !1,
|
|
1090
1108
|
loading: e.loading ?? !1,
|
|
1091
|
-
type:
|
|
1092
|
-
size:
|
|
1109
|
+
type: ha(e.type) ? e.type : "circle",
|
|
1110
|
+
size: pa(e.size) ? e.size : "medium",
|
|
1093
1111
|
checkedValue: e.checkedValue ?? !0,
|
|
1094
1112
|
uncheckedValue: e.uncheckedValue ?? !1,
|
|
1095
1113
|
checkedColor: e.checkedColor,
|
|
@@ -1099,35 +1117,35 @@ function ae(e = {}) {
|
|
|
1099
1117
|
uncheckedText: e.uncheckedText
|
|
1100
1118
|
};
|
|
1101
1119
|
}
|
|
1102
|
-
function
|
|
1120
|
+
function ba(e = {}) {
|
|
1103
1121
|
return e.modelValue !== void 0;
|
|
1104
1122
|
}
|
|
1105
1123
|
function Se(e, t) {
|
|
1106
1124
|
return Object.is(e, t.checkedValue);
|
|
1107
1125
|
}
|
|
1108
|
-
function
|
|
1126
|
+
function ga(e, t) {
|
|
1109
1127
|
return Se(e, t) ? t.uncheckedValue : t.checkedValue;
|
|
1110
1128
|
}
|
|
1111
|
-
function
|
|
1129
|
+
function ka(e) {
|
|
1112
1130
|
return e.type !== "line" && e.size !== "small";
|
|
1113
1131
|
}
|
|
1114
|
-
function
|
|
1115
|
-
const a =
|
|
1132
|
+
function _a(e = {}, t = {}) {
|
|
1133
|
+
const a = se(e), s = ["mu-switch", `mu-switch--${a.type}`, `mu-switch--${a.size}`];
|
|
1116
1134
|
return t.checked && s.push("is-checked"), a.disabled && s.push("is-disabled"), (a.loading || t.loading) && s.push("is-loading"), s;
|
|
1117
1135
|
}
|
|
1118
|
-
const
|
|
1136
|
+
const Ca = ["aria-checked", "disabled"], ya = {
|
|
1119
1137
|
class: "mu-switch__thumb",
|
|
1120
1138
|
"aria-hidden": "true"
|
|
1121
|
-
},
|
|
1139
|
+
}, wa = {
|
|
1122
1140
|
key: 0,
|
|
1123
1141
|
class: "mu-switch__loading-icon",
|
|
1124
1142
|
viewBox: "0 0 16 16",
|
|
1125
1143
|
fill: "none",
|
|
1126
1144
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1127
|
-
},
|
|
1145
|
+
}, xa = {
|
|
1128
1146
|
key: 0,
|
|
1129
1147
|
class: "mu-switch__label"
|
|
1130
|
-
},
|
|
1148
|
+
}, Va = /* @__PURE__ */ H({
|
|
1131
1149
|
inheritAttrs: !1,
|
|
1132
1150
|
__name: "Switch",
|
|
1133
1151
|
props: {
|
|
@@ -1147,30 +1165,30 @@ const ka = ["aria-checked", "disabled"], _a = {
|
|
|
1147
1165
|
},
|
|
1148
1166
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
1149
1167
|
setup(e, { emit: t }) {
|
|
1150
|
-
const a = e, s = t,
|
|
1151
|
-
|
|
1152
|
-
),
|
|
1153
|
-
() => d.value ?
|
|
1154
|
-
), k = n(() => Se(y.value,
|
|
1155
|
-
|
|
1168
|
+
const a = e, s = t, r = D(), l = K(), o = N(!1), u = se(a), c = N(
|
|
1169
|
+
u.defaultChecked ? u.checkedValue : u.uncheckedValue
|
|
1170
|
+
), i = n(() => se(a)), d = n(() => ba(a)), y = n(
|
|
1171
|
+
() => d.value ? i.value.modelValue : c.value
|
|
1172
|
+
), k = n(() => Se(y.value, i.value)), _ = n(() => i.value.loading || o.value), T = n(() => ka(i.value)), x = n(() => T.value ? k.value ? !!(l.checked || i.value.checkedText) : !!(l.unchecked || i.value.uncheckedText) : !1), b = n(() => [
|
|
1173
|
+
_a(a, {
|
|
1156
1174
|
checked: k.value,
|
|
1157
1175
|
loading: o.value
|
|
1158
1176
|
}),
|
|
1159
1177
|
{
|
|
1160
1178
|
"has-label": x.value
|
|
1161
1179
|
},
|
|
1162
|
-
|
|
1180
|
+
r.class
|
|
1163
1181
|
]), g = n(() => {
|
|
1164
|
-
const { class: C, style: L, type: V, ...P } =
|
|
1182
|
+
const { class: C, style: L, type: V, ...P } = r;
|
|
1165
1183
|
return P;
|
|
1166
1184
|
}), S = n(() => {
|
|
1167
1185
|
const C = {};
|
|
1168
|
-
return
|
|
1186
|
+
return i.value.checkedColor && (C["--mu-switch-current-checked-bg"] = i.value.checkedColor, C["--mu-switch-current-checked-border"] = i.value.checkedColor, C["--mu-switch-current-checked-thumb"] = i.value.checkedColor, C["--mu-switch-current-checked-glow"] = `0 0 12px ${i.value.checkedColor}`), i.value.uncheckedColor && (C["--mu-switch-current-unchecked-bg"] = i.value.uncheckedColor), [C, r.style];
|
|
1169
1187
|
});
|
|
1170
1188
|
function $() {
|
|
1171
1189
|
}
|
|
1172
1190
|
function h(C) {
|
|
1173
|
-
const L =
|
|
1191
|
+
const L = i.value.beforeChange;
|
|
1174
1192
|
if (!L)
|
|
1175
1193
|
return !0;
|
|
1176
1194
|
try {
|
|
@@ -1181,12 +1199,12 @@ const ka = ["aria-checked", "disabled"], _a = {
|
|
|
1181
1199
|
}
|
|
1182
1200
|
}
|
|
1183
1201
|
function p(C, L) {
|
|
1184
|
-
d.value || (
|
|
1202
|
+
d.value || (c.value = C), s("update:modelValue", C), s("change", C, L);
|
|
1185
1203
|
}
|
|
1186
1204
|
function B(C) {
|
|
1187
|
-
if (
|
|
1205
|
+
if (i.value.disabled || _.value)
|
|
1188
1206
|
return;
|
|
1189
|
-
const L =
|
|
1207
|
+
const L = ga(y.value, i.value), V = h(L);
|
|
1190
1208
|
if (V instanceof Promise) {
|
|
1191
1209
|
V.then((P) => {
|
|
1192
1210
|
P && p(L, C);
|
|
@@ -1197,10 +1215,10 @@ const ka = ["aria-checked", "disabled"], _a = {
|
|
|
1197
1215
|
}
|
|
1198
1216
|
V && p(L, C);
|
|
1199
1217
|
}
|
|
1200
|
-
function
|
|
1218
|
+
function z(C) {
|
|
1201
1219
|
s("focus", C);
|
|
1202
1220
|
}
|
|
1203
|
-
function
|
|
1221
|
+
function ee(C) {
|
|
1204
1222
|
s("blur", C);
|
|
1205
1223
|
}
|
|
1206
1224
|
return (C, L) => (f(), m("button", R(g.value, {
|
|
@@ -1209,73 +1227,73 @@ const ka = ["aria-checked", "disabled"], _a = {
|
|
|
1209
1227
|
class: b.value,
|
|
1210
1228
|
style: S.value,
|
|
1211
1229
|
"aria-checked": k.value ? "true" : "false",
|
|
1212
|
-
disabled:
|
|
1230
|
+
disabled: i.value.disabled || _.value,
|
|
1213
1231
|
onClick: B,
|
|
1214
|
-
onFocus:
|
|
1215
|
-
onBlur:
|
|
1232
|
+
onFocus: z,
|
|
1233
|
+
onBlur: ee
|
|
1216
1234
|
}), [
|
|
1217
1235
|
L[1] || (L[1] = v("span", {
|
|
1218
1236
|
class: "mu-switch__line-track",
|
|
1219
1237
|
"aria-hidden": "true"
|
|
1220
1238
|
}, null, -1)),
|
|
1221
|
-
v("span",
|
|
1222
|
-
_.value ? (f(), m("svg",
|
|
1239
|
+
v("span", ya, [
|
|
1240
|
+
_.value ? (f(), m("svg", wa, [...L[0] || (L[0] = [
|
|
1223
1241
|
v("path", {
|
|
1224
1242
|
d: "M8 1.5C8.41421 1.5 8.75 1.83579 8.75 2.25C8.75 2.66421 8.41421 3 8 3C5.23858 3 3 5.23858 3 8C3 10.7614 5.23858 13 8 13C10.7614 13 13 10.7614 13 8C13 7.58579 13.3358 7.25 13.75 7.25C14.1642 7.25 14.5 7.58579 14.5 8C14.5 11.5899 11.5899 14.5 8 14.5C4.41015 14.5 1.5 11.5899 1.5 8C1.5 4.41015 4.41015 1.5 8 1.5Z",
|
|
1225
1243
|
fill: "currentColor"
|
|
1226
1244
|
}, null, -1)
|
|
1227
1245
|
])])) : k.value ? w(C.$slots, "checked-icon", { key: 1 }, void 0, !0) : w(C.$slots, "unchecked-icon", { key: 2 }, void 0, !0)
|
|
1228
1246
|
]),
|
|
1229
|
-
x.value ? (f(), m("span",
|
|
1247
|
+
x.value ? (f(), m("span", xa, [
|
|
1230
1248
|
k.value ? w(C.$slots, "checked", { key: 0 }, () => [
|
|
1231
|
-
G(A(
|
|
1249
|
+
G(A(i.value.checkedText), 1)
|
|
1232
1250
|
], !0) : w(C.$slots, "unchecked", { key: 1 }, () => [
|
|
1233
|
-
G(A(
|
|
1251
|
+
G(A(i.value.uncheckedText), 1)
|
|
1234
1252
|
], !0)
|
|
1235
1253
|
])) : M("", !0)
|
|
1236
|
-
], 16,
|
|
1254
|
+
], 16, Ca));
|
|
1237
1255
|
}
|
|
1238
|
-
}),
|
|
1239
|
-
function
|
|
1256
|
+
}), is = /* @__PURE__ */ I(Va, [["__scopeId", "data-v-8cfb8f2a"]]), Le = Symbol("MuTabs"), $a = ["line", "segment"], Ba = ["small", "medium", "large"], Ta = ["white", "ghost"], Ma = ["content", "equal"];
|
|
1257
|
+
function Y(e, t) {
|
|
1240
1258
|
return typeof t == "string" && e.includes(t);
|
|
1241
1259
|
}
|
|
1242
|
-
function Ta(e) {
|
|
1243
|
-
return Q(xa, e);
|
|
1244
|
-
}
|
|
1245
|
-
function Ma(e) {
|
|
1246
|
-
return Q(Va, e);
|
|
1247
|
-
}
|
|
1248
1260
|
function Sa(e) {
|
|
1249
|
-
return
|
|
1261
|
+
return Y($a, e);
|
|
1250
1262
|
}
|
|
1251
1263
|
function La(e) {
|
|
1252
|
-
return
|
|
1264
|
+
return Y(Ba, e);
|
|
1265
|
+
}
|
|
1266
|
+
function Pa(e) {
|
|
1267
|
+
return Y(Ta, e);
|
|
1268
|
+
}
|
|
1269
|
+
function Na(e) {
|
|
1270
|
+
return Y(Ma, e);
|
|
1253
1271
|
}
|
|
1254
1272
|
function Pe(e = {}) {
|
|
1255
|
-
const t = e, a =
|
|
1273
|
+
const t = e, a = Sa(t.variant) ? t.variant : "line";
|
|
1256
1274
|
return {
|
|
1257
1275
|
modelValue: e.modelValue,
|
|
1258
1276
|
defaultValue: e.defaultValue,
|
|
1259
1277
|
variant: a,
|
|
1260
|
-
appearance: a === "segment" &&
|
|
1261
|
-
size:
|
|
1262
|
-
layout:
|
|
1278
|
+
appearance: a === "segment" && Pa(t.appearance) ? t.appearance : a === "segment" ? "white" : void 0,
|
|
1279
|
+
size: La(t.size) ? t.size : "medium",
|
|
1280
|
+
layout: Na(t.layout) ? t.layout : "content",
|
|
1263
1281
|
disabled: e.disabled ?? !1
|
|
1264
1282
|
};
|
|
1265
1283
|
}
|
|
1266
|
-
function
|
|
1284
|
+
function Ha(e) {
|
|
1267
1285
|
return {
|
|
1268
1286
|
value: e.value,
|
|
1269
1287
|
disabled: e.disabled ?? !1
|
|
1270
1288
|
};
|
|
1271
1289
|
}
|
|
1272
|
-
function
|
|
1290
|
+
function Ia(e = {}) {
|
|
1273
1291
|
return e.modelValue !== void 0;
|
|
1274
1292
|
}
|
|
1275
1293
|
function Ne(e, t) {
|
|
1276
1294
|
return Object.is(e, t);
|
|
1277
1295
|
}
|
|
1278
|
-
function
|
|
1296
|
+
function za(e = {}) {
|
|
1279
1297
|
const t = Pe(e), a = [
|
|
1280
1298
|
"mu-tabs",
|
|
1281
1299
|
`mu-tabs--variant-${t.variant}`,
|
|
@@ -1284,19 +1302,19 @@ function Ha(e = {}) {
|
|
|
1284
1302
|
];
|
|
1285
1303
|
return t.variant === "segment" && a.push(`mu-tabs--appearance-${t.appearance}`), t.disabled && a.push("is-disabled"), a;
|
|
1286
1304
|
}
|
|
1287
|
-
function
|
|
1305
|
+
function Oa(e, t = {}) {
|
|
1288
1306
|
const a = ["mu-tab"];
|
|
1289
1307
|
return t.active && a.push("is-active"), (t.disabled || e.disabled) && a.push("is-disabled"), a;
|
|
1290
1308
|
}
|
|
1291
|
-
const
|
|
1309
|
+
const Aa = ["aria-selected", "disabled"], Ra = {
|
|
1292
1310
|
key: 0,
|
|
1293
1311
|
class: "mu-tab__prefix",
|
|
1294
1312
|
"aria-hidden": "true"
|
|
1295
|
-
},
|
|
1313
|
+
}, Da = { class: "mu-tab__content" }, Ga = {
|
|
1296
1314
|
key: 1,
|
|
1297
1315
|
class: "mu-tab__suffix",
|
|
1298
1316
|
"aria-hidden": "true"
|
|
1299
|
-
},
|
|
1317
|
+
}, Ea = /* @__PURE__ */ H({
|
|
1300
1318
|
inheritAttrs: !1,
|
|
1301
1319
|
__name: "Tab",
|
|
1302
1320
|
props: {
|
|
@@ -1305,63 +1323,63 @@ const Ia = ["aria-selected", "disabled"], Oa = {
|
|
|
1305
1323
|
},
|
|
1306
1324
|
emits: ["click"],
|
|
1307
1325
|
setup(e, { emit: t }) {
|
|
1308
|
-
const a = e, s = t,
|
|
1309
|
-
() => o ? Ne(o.value.value,
|
|
1326
|
+
const a = e, s = t, r = D(), l = K(), o = ne(Le, null), u = N(null), c = n(() => Ha(a)), i = n(
|
|
1327
|
+
() => o ? Ne(o.value.value, c.value.value) : !1
|
|
1310
1328
|
), d = n(
|
|
1311
|
-
() =>
|
|
1329
|
+
() => c.value.disabled || !!(o != null && o.disabled.value)
|
|
1312
1330
|
), y = n(() => [
|
|
1313
|
-
|
|
1314
|
-
active:
|
|
1331
|
+
Oa(a, {
|
|
1332
|
+
active: i.value,
|
|
1315
1333
|
disabled: d.value
|
|
1316
1334
|
}),
|
|
1317
|
-
|
|
1335
|
+
r.class
|
|
1318
1336
|
]), k = n(() => {
|
|
1319
|
-
const { class: b, style: g, ...S } =
|
|
1337
|
+
const { class: b, style: g, ...S } = r;
|
|
1320
1338
|
return S;
|
|
1321
|
-
}), _ = n(() =>
|
|
1339
|
+
}), _ = n(() => r.style);
|
|
1322
1340
|
function T() {
|
|
1323
|
-
!o || !
|
|
1341
|
+
!o || !u.value || o.registerItem(c.value.value, u.value);
|
|
1324
1342
|
}
|
|
1325
1343
|
function x(b) {
|
|
1326
1344
|
if (d.value) {
|
|
1327
1345
|
b.preventDefault(), b.stopPropagation();
|
|
1328
1346
|
return;
|
|
1329
1347
|
}
|
|
1330
|
-
o && o.select(
|
|
1348
|
+
o && o.select(c.value.value, b), s("click", b);
|
|
1331
1349
|
}
|
|
1332
|
-
return
|
|
1350
|
+
return oe(() => {
|
|
1333
1351
|
T();
|
|
1334
|
-
}),
|
|
1335
|
-
o == null || o.unregisterItem(
|
|
1352
|
+
}), ie(() => {
|
|
1353
|
+
o == null || o.unregisterItem(c.value.value);
|
|
1336
1354
|
}), ue(
|
|
1337
|
-
() =>
|
|
1355
|
+
() => c.value.value,
|
|
1338
1356
|
(b, g) => {
|
|
1339
|
-
!o || !
|
|
1357
|
+
!o || !u.value || (o.unregisterItem(g), o.registerItem(b, u.value));
|
|
1340
1358
|
}
|
|
1341
1359
|
), (b, g) => (f(), m("button", R({
|
|
1342
1360
|
ref_key: "buttonRef",
|
|
1343
|
-
ref:
|
|
1361
|
+
ref: u
|
|
1344
1362
|
}, k.value, {
|
|
1345
1363
|
type: "button",
|
|
1346
1364
|
role: "tab",
|
|
1347
1365
|
class: y.value,
|
|
1348
1366
|
style: _.value,
|
|
1349
|
-
"aria-selected":
|
|
1367
|
+
"aria-selected": i.value ? "true" : "false",
|
|
1350
1368
|
disabled: d.value,
|
|
1351
1369
|
onClick: x
|
|
1352
1370
|
}), [
|
|
1353
|
-
O(l).prefix ? (f(), m("span",
|
|
1371
|
+
O(l).prefix ? (f(), m("span", Ra, [
|
|
1354
1372
|
w(b.$slots, "prefix", {}, void 0, !0)
|
|
1355
1373
|
])) : M("", !0),
|
|
1356
|
-
v("span",
|
|
1374
|
+
v("span", Da, [
|
|
1357
1375
|
w(b.$slots, "default", {}, void 0, !0)
|
|
1358
1376
|
]),
|
|
1359
|
-
O(l).suffix ? (f(), m("span",
|
|
1377
|
+
O(l).suffix ? (f(), m("span", Ga, [
|
|
1360
1378
|
w(b.$slots, "suffix", {}, void 0, !0)
|
|
1361
1379
|
])) : M("", !0)
|
|
1362
|
-
], 16,
|
|
1380
|
+
], 16, Aa));
|
|
1363
1381
|
}
|
|
1364
|
-
}),
|
|
1382
|
+
}), us = /* @__PURE__ */ I(Ea, [["__scopeId", "data-v-eeb068b0"]]), ja = /* @__PURE__ */ H({
|
|
1365
1383
|
inheritAttrs: !1,
|
|
1366
1384
|
__name: "Tabs",
|
|
1367
1385
|
props: {
|
|
@@ -1375,17 +1393,17 @@ const Ia = ["aria-selected", "disabled"], Oa = {
|
|
|
1375
1393
|
},
|
|
1376
1394
|
emits: ["update:modelValue", "change"],
|
|
1377
1395
|
setup(e, { emit: t }) {
|
|
1378
|
-
const a = e, s = t,
|
|
1379
|
-
() =>
|
|
1396
|
+
const a = e, s = t, r = D(), l = N(null), o = n(() => Pe(a)), u = n(() => Ia(a)), c = N(o.value.defaultValue), i = n(
|
|
1397
|
+
() => u.value ? o.value.modelValue : c.value
|
|
1380
1398
|
), d = n(() => o.value.variant), y = n(() => o.value.appearance), k = n(() => o.value.size), _ = n(() => o.value.layout), T = n(() => o.value.disabled), x = N(!1), b = N(0), g = /* @__PURE__ */ new Map(), S = N({
|
|
1381
1399
|
transform: "translateX(0px)",
|
|
1382
1400
|
width: "0px"
|
|
1383
|
-
}), $ = n(() => [
|
|
1384
|
-
const { class: V, style: P, ...
|
|
1385
|
-
return
|
|
1386
|
-
}), p = n(() =>
|
|
1401
|
+
}), $ = n(() => [za(a), r.class]), h = n(() => {
|
|
1402
|
+
const { class: V, style: P, ...te } = r;
|
|
1403
|
+
return te;
|
|
1404
|
+
}), p = n(() => r.style);
|
|
1387
1405
|
function B() {
|
|
1388
|
-
const V = l.value, P =
|
|
1406
|
+
const V = l.value, P = i.value !== void 0 ? g.get(i.value) : void 0;
|
|
1389
1407
|
if (!V || !P) {
|
|
1390
1408
|
S.value = {
|
|
1391
1409
|
transform: "translateX(0px)",
|
|
@@ -1393,47 +1411,47 @@ const Ia = ["aria-selected", "disabled"], Oa = {
|
|
|
1393
1411
|
};
|
|
1394
1412
|
return;
|
|
1395
1413
|
}
|
|
1396
|
-
const
|
|
1414
|
+
const te = V.getBoundingClientRect(), ve = P.getBoundingClientRect();
|
|
1397
1415
|
S.value = {
|
|
1398
|
-
transform: `translateX(${ve.left -
|
|
1416
|
+
transform: `translateX(${ve.left - te.left}px)`,
|
|
1399
1417
|
width: `${ve.width}px`
|
|
1400
1418
|
};
|
|
1401
1419
|
}
|
|
1402
|
-
function
|
|
1420
|
+
function z() {
|
|
1403
1421
|
j(() => {
|
|
1404
1422
|
B();
|
|
1405
1423
|
});
|
|
1406
1424
|
}
|
|
1407
|
-
function
|
|
1408
|
-
T.value || Ne(
|
|
1425
|
+
function ee(V, P) {
|
|
1426
|
+
T.value || Ne(i.value, V) || (u.value || (c.value = V), s("update:modelValue", V), s("change", V, P));
|
|
1409
1427
|
}
|
|
1410
1428
|
function C(V, P) {
|
|
1411
|
-
g.set(V, P), b.value += 1,
|
|
1429
|
+
g.set(V, P), b.value += 1, z();
|
|
1412
1430
|
}
|
|
1413
1431
|
function L(V) {
|
|
1414
|
-
g.delete(V), b.value += 1,
|
|
1432
|
+
g.delete(V), b.value += 1, z();
|
|
1415
1433
|
}
|
|
1416
|
-
return
|
|
1417
|
-
value:
|
|
1434
|
+
return le(Le, {
|
|
1435
|
+
value: i,
|
|
1418
1436
|
variant: d,
|
|
1419
1437
|
appearance: y,
|
|
1420
1438
|
size: k,
|
|
1421
1439
|
layout: _,
|
|
1422
1440
|
disabled: T,
|
|
1423
|
-
select:
|
|
1441
|
+
select: ee,
|
|
1424
1442
|
registerItem: C,
|
|
1425
1443
|
unregisterItem: L
|
|
1426
1444
|
}), ue(
|
|
1427
|
-
[
|
|
1445
|
+
[i, d, k, _, b],
|
|
1428
1446
|
() => {
|
|
1429
|
-
|
|
1447
|
+
z();
|
|
1430
1448
|
},
|
|
1431
1449
|
{ flush: "post" }
|
|
1432
|
-
),
|
|
1450
|
+
), oe(() => {
|
|
1433
1451
|
globalThis.window.addEventListener("resize", B), j(() => {
|
|
1434
1452
|
B(), x.value = !0;
|
|
1435
1453
|
});
|
|
1436
|
-
}),
|
|
1454
|
+
}), ie(() => {
|
|
1437
1455
|
globalThis.window.removeEventListener("resize", B);
|
|
1438
1456
|
}), (V, P) => (f(), m("div", R({
|
|
1439
1457
|
ref_key: "rootRef",
|
|
@@ -1451,33 +1469,33 @@ const Ia = ["aria-selected", "disabled"], Oa = {
|
|
|
1451
1469
|
}, null, 4)
|
|
1452
1470
|
], 16));
|
|
1453
1471
|
}
|
|
1454
|
-
}),
|
|
1455
|
-
function
|
|
1472
|
+
}), rs = /* @__PURE__ */ I(ja, [["__scopeId", "data-v-28e8c4f7"]]), Ua = ["outline", "solid", "soft"];
|
|
1473
|
+
function Za(e, t) {
|
|
1456
1474
|
return typeof t == "string" && e.includes(t);
|
|
1457
1475
|
}
|
|
1458
|
-
function
|
|
1459
|
-
return
|
|
1476
|
+
function Fa(e) {
|
|
1477
|
+
return Za(Ua, e);
|
|
1460
1478
|
}
|
|
1461
1479
|
function He(e = {}) {
|
|
1462
1480
|
return {
|
|
1463
|
-
variant:
|
|
1481
|
+
variant: Fa(e.variant) ? e.variant : "outline",
|
|
1464
1482
|
selected: e.selected ?? !1,
|
|
1465
1483
|
disabled: e.disabled ?? !1
|
|
1466
1484
|
};
|
|
1467
1485
|
}
|
|
1468
|
-
function
|
|
1486
|
+
function Ka(e = {}) {
|
|
1469
1487
|
const t = He(e), a = ["mu-tag", `mu-tag--variant-${t.variant}`];
|
|
1470
1488
|
return t.selected && a.push("is-selected"), t.disabled && a.push("is-disabled"), a;
|
|
1471
1489
|
}
|
|
1472
|
-
const
|
|
1490
|
+
const qa = ["disabled", "aria-pressed"], Xa = {
|
|
1473
1491
|
key: 0,
|
|
1474
1492
|
class: "mu-tag__prefix",
|
|
1475
1493
|
"aria-hidden": "true"
|
|
1476
|
-
},
|
|
1494
|
+
}, Wa = { class: "mu-tag__content" }, Ja = {
|
|
1477
1495
|
key: 1,
|
|
1478
1496
|
class: "mu-tag__suffix",
|
|
1479
1497
|
"aria-hidden": "true"
|
|
1480
|
-
},
|
|
1498
|
+
}, Qa = /* @__PURE__ */ H({
|
|
1481
1499
|
__name: "Tag",
|
|
1482
1500
|
props: {
|
|
1483
1501
|
variant: {},
|
|
@@ -1486,43 +1504,43 @@ const Ua = ["disabled", "aria-pressed"], qa = {
|
|
|
1486
1504
|
},
|
|
1487
1505
|
emits: ["update:selected", "click"],
|
|
1488
1506
|
setup(e, { emit: t }) {
|
|
1489
|
-
const a = e, s = t,
|
|
1490
|
-
function
|
|
1491
|
-
l.value.disabled || (s("click",
|
|
1507
|
+
const a = e, s = t, r = K(), l = n(() => He(a)), o = n(() => Ka(a));
|
|
1508
|
+
function u(c) {
|
|
1509
|
+
l.value.disabled || (s("click", c), s("update:selected", !l.value.selected));
|
|
1492
1510
|
}
|
|
1493
|
-
return (
|
|
1511
|
+
return (c, i) => (f(), m("button", {
|
|
1494
1512
|
type: "button",
|
|
1495
|
-
class:
|
|
1513
|
+
class: Q(o.value),
|
|
1496
1514
|
disabled: l.value.disabled,
|
|
1497
1515
|
"aria-pressed": l.value.selected,
|
|
1498
|
-
onClick:
|
|
1516
|
+
onClick: u
|
|
1499
1517
|
}, [
|
|
1500
|
-
O(
|
|
1501
|
-
w(
|
|
1518
|
+
O(r).prefix ? (f(), m("span", Xa, [
|
|
1519
|
+
w(c.$slots, "prefix", {}, void 0, !0)
|
|
1502
1520
|
])) : M("", !0),
|
|
1503
|
-
v("span",
|
|
1504
|
-
w(
|
|
1521
|
+
v("span", Wa, [
|
|
1522
|
+
w(c.$slots, "default", {}, void 0, !0)
|
|
1505
1523
|
]),
|
|
1506
|
-
O(
|
|
1507
|
-
w(
|
|
1524
|
+
O(r).suffix ? (f(), m("span", Ja, [
|
|
1525
|
+
w(c.$slots, "suffix", {}, void 0, !0)
|
|
1508
1526
|
])) : M("", !0)
|
|
1509
|
-
], 10,
|
|
1527
|
+
], 10, qa));
|
|
1510
1528
|
}
|
|
1511
|
-
}),
|
|
1529
|
+
}), cs = /* @__PURE__ */ I(Qa, [["__scopeId", "data-v-e3e9ee4d"]]);
|
|
1512
1530
|
export {
|
|
1513
|
-
|
|
1514
|
-
|
|
1531
|
+
ss as MessageList,
|
|
1532
|
+
es as MuBadge,
|
|
1515
1533
|
me as MuButton,
|
|
1516
1534
|
yt as MuCheckbox,
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1535
|
+
ts as MuCheckboxGroup,
|
|
1536
|
+
ea as MuModal,
|
|
1537
|
+
ls as MuRadio,
|
|
1538
|
+
os as MuRadioGroup,
|
|
1539
|
+
is as MuSwitch,
|
|
1540
|
+
us as MuTab,
|
|
1541
|
+
rs as MuTabs,
|
|
1542
|
+
cs as MuTag,
|
|
1543
|
+
as as message,
|
|
1544
|
+
ns as muModal,
|
|
1545
|
+
q as openMuModal
|
|
1528
1546
|
};
|