@mureka-fe/ui 6.0.0 → 6.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/llms.txt +3 -3
- 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/styles.css +1 -1
- package/dist/ui.js +127 -125
- 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 F, computed as l, openBlock as f, createElementBlock as m, normalizeClass as J, 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 se, watchEffect as ze, mergeProps as R, nextTick as j, provide as le, renderList as pe, createBlock as E, withCtx as W, reactive as Ie, h as be, createVNode as Oe, TransitionGroup as Ae, resolveDynamicComponent as Re, onMounted as ne, onBeforeUnmount as oe, 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,7 +47,7 @@ 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
|
};
|
|
@@ -90,10 +92,10 @@ const Ke = ["role", "aria-label"], Xe = {
|
|
|
90
92
|
preset: {}
|
|
91
93
|
},
|
|
92
94
|
setup(e) {
|
|
93
|
-
const t = e, a =
|
|
95
|
+
const t = e, a = F(), s = l(() => ke(t)), c = l(() => qe(t)), n = l(() => s.value.isSvgPreset ? "img" : void 0), o = l(() => s.value.isSvgPreset ? "NEW" : void 0), i = l(() => s.value.preset === "details");
|
|
94
96
|
return (r, u) => (f(), m("span", {
|
|
95
97
|
class: J(c.value),
|
|
96
|
-
role:
|
|
98
|
+
role: n.value,
|
|
97
99
|
"aria-label": o.value
|
|
98
100
|
}, [
|
|
99
101
|
s.value.isSvgPreset ? (f(), m(X, { key: 0 }, [
|
|
@@ -160,7 +162,7 @@ const Ke = ["role", "aria-label"], Xe = {
|
|
|
160
162
|
for (const [s, c] of t)
|
|
161
163
|
a[s] = c;
|
|
162
164
|
return a;
|
|
163
|
-
}, Qa = /* @__PURE__ */ z(tt, [["__scopeId", "data-v-
|
|
165
|
+
}, Qa = /* @__PURE__ */ z(tt, [["__scopeId", "data-v-aa97ab3d"]]);
|
|
164
166
|
function ie(e = {}) {
|
|
165
167
|
return {
|
|
166
168
|
type: e.type ?? "primary",
|
|
@@ -188,18 +190,18 @@ function st(e = {}) {
|
|
|
188
190
|
const t = ie(e);
|
|
189
191
|
return !t.disabled && !t.loading;
|
|
190
192
|
}
|
|
191
|
-
function
|
|
192
|
-
const t = e.iconOnly ?? !1, a = e.hasPrefix ?? !1, s = e.hasSuffix ?? !1, c = e.loading ?? !1,
|
|
193
|
+
function lt(e = {}) {
|
|
194
|
+
const t = e.iconOnly ?? !1, a = e.hasPrefix ?? !1, s = e.hasSuffix ?? !1, c = e.loading ?? !1, n = e.hasAriaLabel ?? !1;
|
|
193
195
|
return {
|
|
194
196
|
showPrefixSlot: !t && !c && a,
|
|
195
197
|
showSuffixSlot: !t && s,
|
|
196
198
|
showDefaultSlot: !(t && c),
|
|
197
199
|
showLoadingIndicator: c,
|
|
198
|
-
requiresAriaLabel: t && !
|
|
200
|
+
requiresAriaLabel: t && !n,
|
|
199
201
|
isInvalidIconOnlyCombination: t && (a || s)
|
|
200
202
|
};
|
|
201
203
|
}
|
|
202
|
-
const
|
|
204
|
+
const nt = ["type", "disabled", "aria-busy"], ot = {
|
|
203
205
|
key: 0,
|
|
204
206
|
class: "mu-button__prefix",
|
|
205
207
|
"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, c =
|
|
231
|
+
const a = e, s = t, c = F(), n = D(), o = {
|
|
230
232
|
small: {
|
|
231
233
|
width: "var(--mu-button-icon-size-small)",
|
|
232
234
|
height: "var(--mu-button-icon-size-small)"
|
|
@@ -239,14 +241,14 @@ 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
|
-
}, i =
|
|
243
|
-
() =>
|
|
244
|
+
}, i = l(() => ie(a)), r = l(() => at(i.value)), u = l(() => o[i.value.size]), d = l(
|
|
245
|
+
() => lt({
|
|
244
246
|
iconOnly: i.value.iconOnly,
|
|
245
247
|
hasPrefix: !!c.prefix,
|
|
246
248
|
hasSuffix: !!c.suffix,
|
|
247
249
|
loading: i.value.loading,
|
|
248
250
|
hasDefaultSlot: !!c.default,
|
|
249
|
-
hasAriaLabel: typeof
|
|
251
|
+
hasAriaLabel: typeof n["aria-label"] == "string" && n["aria-label"].trim().length > 0
|
|
250
252
|
})
|
|
251
253
|
);
|
|
252
254
|
function y(k) {
|
|
@@ -284,7 +286,7 @@ const lt = ["type", "disabled", "aria-busy"], ot = {
|
|
|
284
286
|
d.value.showSuffixSlot ? (f(), m("span", it, [
|
|
285
287
|
w(k.$slots, "suffix", {}, void 0, !0)
|
|
286
288
|
])) : M("", !0)
|
|
287
|
-
], 10,
|
|
289
|
+
], 10, nt));
|
|
288
290
|
}
|
|
289
291
|
}), me = /* @__PURE__ */ z(rt, [["__scopeId", "data-v-e59338a3"]]), _e = Symbol("MuCheckboxGroup"), ct = ["horizontal", "vertical"];
|
|
290
292
|
function dt(e, t) {
|
|
@@ -349,23 +351,23 @@ 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, c = D(),
|
|
354
|
+
const a = e, s = t, c = D(), n = N(null), o = se(_e, null), i = l(() => Ce(a)), r = l(() => vt(a)), u = N(i.value.defaultChecked), d = l(() => o ? i.value.value !== void 0 ? o.isChecked(i.value.value) : !1 : r.value ? i.value.modelValue ?? !1 : u.value), y = l(
|
|
353
355
|
() => i.value.disabled || !!(o != null && o.disabled.value)
|
|
354
|
-
), k =
|
|
356
|
+
), k = l(() => (o == null ? void 0 : o.name.value) ?? i.value.name), _ = l(
|
|
355
357
|
() => i.value.value === void 0 ? void 0 : String(i.value.value)
|
|
356
|
-
), T =
|
|
358
|
+
), T = l(() => [
|
|
357
359
|
bt(a, {
|
|
358
360
|
checked: d.value,
|
|
359
361
|
indeterminate: i.value.indeterminate,
|
|
360
362
|
disabled: y.value
|
|
361
363
|
}),
|
|
362
364
|
c.class
|
|
363
|
-
]), x =
|
|
365
|
+
]), x = l(() => {
|
|
364
366
|
const { class: p, style: B, ...I } = c;
|
|
365
367
|
return I;
|
|
366
|
-
}), b =
|
|
368
|
+
}), b = l(() => c.style);
|
|
367
369
|
ze(() => {
|
|
368
|
-
|
|
370
|
+
n.value && (n.value.indeterminate = i.value.indeterminate);
|
|
369
371
|
});
|
|
370
372
|
function g(p) {
|
|
371
373
|
p && (p.checked = d.value, p.indeterminate = i.value.indeterminate);
|
|
@@ -393,7 +395,7 @@ const kt = ["checked", "disabled", "name", "value"], _t = { class: "mu-checkbox_
|
|
|
393
395
|
}), [
|
|
394
396
|
v("input", {
|
|
395
397
|
ref_key: "inputRef",
|
|
396
|
-
ref:
|
|
398
|
+
ref: n,
|
|
397
399
|
class: "mu-checkbox__input",
|
|
398
400
|
type: "checkbox",
|
|
399
401
|
checked: d.value,
|
|
@@ -439,24 +441,24 @@ 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, c = D(),
|
|
443
|
-
() => o.value ?
|
|
444
|
-
), u =
|
|
445
|
-
() =>
|
|
446
|
-
), k =
|
|
444
|
+
const a = e, s = t, c = D(), n = l(() => ye(a)), o = l(() => mt(a)), i = N([...n.value.defaultValue ?? []]), r = l(
|
|
445
|
+
() => o.value ? n.value.modelValue ?? [] : i.value
|
|
446
|
+
), u = l(() => n.value.disabled), d = l(() => n.value.name), y = l(
|
|
447
|
+
() => n.value.options ? n.value.options.map((g) => pt(g)) : null
|
|
448
|
+
), k = l(() => [gt(a), c.class]), _ = l(() => {
|
|
447
449
|
const { class: g, style: S, ...$ } = c;
|
|
448
450
|
return $;
|
|
449
|
-
}), T =
|
|
451
|
+
}), T = l(() => c.style);
|
|
450
452
|
function x(g) {
|
|
451
453
|
return we(r.value, g);
|
|
452
454
|
}
|
|
453
455
|
function b(g, S) {
|
|
454
|
-
if (
|
|
456
|
+
if (n.value.disabled)
|
|
455
457
|
return;
|
|
456
458
|
const $ = ht(r.value, g);
|
|
457
459
|
o.value || (i.value = $), s("update:modelValue", $), s("change", $, S);
|
|
458
460
|
}
|
|
459
|
-
return
|
|
461
|
+
return le(_e, {
|
|
460
462
|
value: r,
|
|
461
463
|
disabled: u,
|
|
462
464
|
name: d,
|
|
@@ -488,7 +490,7 @@ const kt = ["checked", "disabled", "name", "value"], _t = { class: "mu-checkbox_
|
|
|
488
490
|
items: []
|
|
489
491
|
});
|
|
490
492
|
let $t = 1;
|
|
491
|
-
const
|
|
493
|
+
const U = /* @__PURE__ */ new Map();
|
|
492
494
|
function Bt(e) {
|
|
493
495
|
return typeof e == "string" ? { title: e } : {
|
|
494
496
|
title: e.title,
|
|
@@ -509,15 +511,15 @@ function xe(e) {
|
|
|
509
511
|
return q.items.find((t) => t.id === e);
|
|
510
512
|
}
|
|
511
513
|
function ce(e) {
|
|
512
|
-
const t =
|
|
514
|
+
const t = U.get(e);
|
|
513
515
|
t && t.timer !== null && (globalThis.clearTimeout(t.timer), t.timer = null);
|
|
514
516
|
}
|
|
515
517
|
function de(e) {
|
|
516
518
|
const t = Tt(e);
|
|
517
|
-
t < 0 || (ce(e),
|
|
519
|
+
t < 0 || (ce(e), U.delete(e), q.items.splice(t, 1));
|
|
518
520
|
}
|
|
519
521
|
function Ve(e, t) {
|
|
520
|
-
const a =
|
|
522
|
+
const a = U.get(e);
|
|
521
523
|
a && (ce(e), a.remainingDuration = t, a.deadline = Date.now() + t, a.isPaused = !1, a.timer = globalThis.setTimeout(() => {
|
|
522
524
|
de(e);
|
|
523
525
|
}, t));
|
|
@@ -541,7 +543,7 @@ function Lt(e, t) {
|
|
|
541
543
|
if (!St())
|
|
542
544
|
return Vt;
|
|
543
545
|
const a = Bt(t), s = Mt(e, a);
|
|
544
|
-
return q.items.push(s),
|
|
546
|
+
return q.items.push(s), U.set(s.id, {
|
|
545
547
|
timer: null,
|
|
546
548
|
deadline: 0,
|
|
547
549
|
remainingDuration: s.duration,
|
|
@@ -550,25 +552,25 @@ function Lt(e, t) {
|
|
|
550
552
|
close: () => de(s.id)
|
|
551
553
|
};
|
|
552
554
|
}
|
|
553
|
-
function
|
|
555
|
+
function Z(e) {
|
|
554
556
|
return (t) => Lt(e, t);
|
|
555
557
|
}
|
|
556
558
|
const es = {
|
|
557
|
-
success:
|
|
558
|
-
warning:
|
|
559
|
-
info:
|
|
560
|
-
error:
|
|
561
|
-
danger:
|
|
559
|
+
success: Z("success"),
|
|
560
|
+
warning: Z("warning"),
|
|
561
|
+
info: Z("info"),
|
|
562
|
+
error: Z("error"),
|
|
563
|
+
danger: Z("danger")
|
|
562
564
|
};
|
|
563
565
|
function Pt(e) {
|
|
564
566
|
de(e);
|
|
565
567
|
}
|
|
566
568
|
function Nt(e) {
|
|
567
|
-
const t =
|
|
569
|
+
const t = U.get(e), a = xe(e);
|
|
568
570
|
!t || !a || t.isPaused || !a.resetOnHover || !re(a) || (t.remainingDuration = Math.max(t.deadline - Date.now(), 0), ce(e), t.isPaused = !0);
|
|
569
571
|
}
|
|
570
572
|
function Ht(e) {
|
|
571
|
-
const t =
|
|
573
|
+
const t = U.get(e), a = xe(e);
|
|
572
574
|
!t || !a || !t.isPaused || !a.resetOnHover || !re(a) || Ve(e, t.remainingDuration || a.duration);
|
|
573
575
|
}
|
|
574
576
|
const zt = {
|
|
@@ -584,7 +586,7 @@ const zt = {
|
|
|
584
586
|
}, Gt = ["onClick"], Et = /* @__PURE__ */ H({
|
|
585
587
|
__name: "MessageList",
|
|
586
588
|
setup(e) {
|
|
587
|
-
const t =
|
|
589
|
+
const t = l(() => q.items), a = H({
|
|
588
590
|
name: "MarkupIcon",
|
|
589
591
|
props: {
|
|
590
592
|
markup: {
|
|
@@ -602,7 +604,7 @@ const zt = {
|
|
|
602
604
|
function c(r) {
|
|
603
605
|
Nt(r);
|
|
604
606
|
}
|
|
605
|
-
function
|
|
607
|
+
function n(r) {
|
|
606
608
|
Ht(r);
|
|
607
609
|
}
|
|
608
610
|
function o(r) {
|
|
@@ -631,7 +633,7 @@ const zt = {
|
|
|
631
633
|
class: J(["mu-message", [`mu-message--${d.type}`, { "mu-message--compact": !d.description }]]),
|
|
632
634
|
role: "status",
|
|
633
635
|
onMouseenter: (y) => c(d.id),
|
|
634
|
-
onMouseleave: (y) =>
|
|
636
|
+
onMouseleave: (y) => n(d.id)
|
|
635
637
|
}, [
|
|
636
638
|
v("span", Ot, [
|
|
637
639
|
d.icon && s(d.icon) ? (f(), E(Re(d.icon), { key: 0 })) : (f(), E(O(a), {
|
|
@@ -700,7 +702,7 @@ function fe(e = {}) {
|
|
|
700
702
|
okLoading: e.okLoading ?? !1
|
|
701
703
|
};
|
|
702
704
|
}
|
|
703
|
-
function
|
|
705
|
+
function Ut(e = {}) {
|
|
704
706
|
const t = fe(e), a = [
|
|
705
707
|
"mu-modal",
|
|
706
708
|
`mu-modal--${t.size}`,
|
|
@@ -709,7 +711,7 @@ function Zt(e = {}) {
|
|
|
709
711
|
];
|
|
710
712
|
return t.variant === "feedback" && a.push("mu-modal--feedback"), a;
|
|
711
713
|
}
|
|
712
|
-
function
|
|
714
|
+
function Zt(e = {}) {
|
|
713
715
|
const t = fe(e);
|
|
714
716
|
return t.variant === "feedback" ? {
|
|
715
717
|
type: "secondary",
|
|
@@ -721,7 +723,7 @@ function Ft(e = {}) {
|
|
|
721
723
|
type: "primary"
|
|
722
724
|
};
|
|
723
725
|
}
|
|
724
|
-
const
|
|
726
|
+
const Ft = {
|
|
725
727
|
key: 0,
|
|
726
728
|
class: "mu-modal-root"
|
|
727
729
|
}, qt = { class: "mu-modal__header" }, Kt = ["data-status"], Xt = { class: "mu-modal__body" }, Wt = {
|
|
@@ -748,15 +750,15 @@ const Ut = {
|
|
|
748
750
|
},
|
|
749
751
|
emits: ["update:visible", "ok", "cancel", "close"],
|
|
750
752
|
setup(e, { emit: t }) {
|
|
751
|
-
const a = e, s = t, c = D(),
|
|
753
|
+
const a = e, s = t, c = D(), n = l(() => fe(a)), o = l(() => [Ut(a), c.class]), i = l(() => {
|
|
752
754
|
const { class: h, style: p, ...B } = c;
|
|
753
755
|
return B;
|
|
754
|
-
}), r =
|
|
755
|
-
() =>
|
|
756
|
-
), d =
|
|
756
|
+
}), r = l(() => Zt(a)), u = l(
|
|
757
|
+
() => n.value.variant === "feedback" && n.value.hideCancel
|
|
758
|
+
), d = l(() => [
|
|
757
759
|
{
|
|
758
|
-
width:
|
|
759
|
-
minHeight:
|
|
760
|
+
width: n.value.width,
|
|
761
|
+
minHeight: n.value.minHeight
|
|
760
762
|
},
|
|
761
763
|
c.style
|
|
762
764
|
]), y = `mu-modal-title-${Math.random().toString(36).slice(2, 10)}`, _ = typeof globalThis.document < "u" ? globalThis.document : null;
|
|
@@ -764,7 +766,7 @@ const Ut = {
|
|
|
764
766
|
s("update:visible", !1);
|
|
765
767
|
}
|
|
766
768
|
function x() {
|
|
767
|
-
|
|
769
|
+
n.value.maskClosable && (T(), s("cancel", new globalThis.MouseEvent("click")));
|
|
768
770
|
}
|
|
769
771
|
function b() {
|
|
770
772
|
T(), s("close");
|
|
@@ -776,20 +778,20 @@ const Ut = {
|
|
|
776
778
|
s("ok", h);
|
|
777
779
|
}
|
|
778
780
|
function $(h) {
|
|
779
|
-
h.key !== "Escape" || !
|
|
781
|
+
h.key !== "Escape" || !n.value.visible || !n.value.escToClose || (T(), s("close"));
|
|
780
782
|
}
|
|
781
|
-
return
|
|
783
|
+
return ne(() => {
|
|
782
784
|
_ && _.addEventListener("keydown", $);
|
|
783
785
|
}), oe(() => {
|
|
784
786
|
_ && (_.removeEventListener("keydown", $), _.body.style.overflow = "");
|
|
785
787
|
}), ue(
|
|
786
|
-
() =>
|
|
788
|
+
() => n.value.visible,
|
|
787
789
|
(h) => {
|
|
788
790
|
_ && (_.body.style.overflow = h ? "hidden" : "");
|
|
789
791
|
},
|
|
790
792
|
{ immediate: !0 }
|
|
791
793
|
), (h, p) => (f(), E(De, { to: "body" }, [
|
|
792
|
-
|
|
794
|
+
n.value.visible ? (f(), m("div", Ft, [
|
|
793
795
|
v("div", {
|
|
794
796
|
class: "mu-modal__mask",
|
|
795
797
|
onClick: x
|
|
@@ -805,13 +807,13 @@ const Ut = {
|
|
|
805
807
|
v("div", {
|
|
806
808
|
id: y,
|
|
807
809
|
class: "mu-modal__title",
|
|
808
|
-
"data-status":
|
|
810
|
+
"data-status": n.value.status
|
|
809
811
|
}, [
|
|
810
812
|
w(h.$slots, "title", {}, () => [
|
|
811
|
-
G(A(
|
|
813
|
+
G(A(n.value.title), 1)
|
|
812
814
|
], !0)
|
|
813
815
|
], 8, Kt),
|
|
814
|
-
|
|
816
|
+
n.value.closable ? (f(), m("button", {
|
|
815
817
|
key: 0,
|
|
816
818
|
type: "button",
|
|
817
819
|
class: "mu-modal__close",
|
|
@@ -846,26 +848,26 @@ const Ut = {
|
|
|
846
848
|
v("div", Xt, [
|
|
847
849
|
w(h.$slots, "default", {}, void 0, !0)
|
|
848
850
|
]),
|
|
849
|
-
h.$slots.footer || !
|
|
851
|
+
h.$slots.footer || !n.value.hideOk || !n.value.hideCancel ? (f(), m("footer", Wt, [
|
|
850
852
|
w(h.$slots, "footer", {}, () => [
|
|
851
|
-
|
|
853
|
+
n.value.hideCancel ? M("", !0) : (f(), E(O(me), {
|
|
852
854
|
key: 0,
|
|
853
855
|
type: "ghost",
|
|
854
856
|
class: "mu-modal__cancel",
|
|
855
857
|
onClick: g
|
|
856
858
|
}, {
|
|
857
859
|
default: W(() => [
|
|
858
|
-
G(A(
|
|
860
|
+
G(A(n.value.cancelText), 1)
|
|
859
861
|
]),
|
|
860
862
|
_: 1
|
|
861
863
|
})),
|
|
862
|
-
|
|
863
|
-
loading:
|
|
864
|
+
n.value.hideOk ? M("", !0) : (f(), E(O(me), R({ key: 1 }, r.value, {
|
|
865
|
+
loading: n.value.okLoading,
|
|
864
866
|
class: ["mu-modal__ok", { "mu-modal__ok--block": u.value }],
|
|
865
867
|
onClick: S
|
|
866
868
|
}), {
|
|
867
869
|
default: W(() => [
|
|
868
|
-
G(A(
|
|
870
|
+
G(A(n.value.okText), 1)
|
|
869
871
|
]),
|
|
870
872
|
_: 1
|
|
871
873
|
}, 16, ["loading", "class"]))
|
|
@@ -884,11 +886,11 @@ function K(e = {}) {
|
|
|
884
886
|
const a = globalThis.document.createElement("div");
|
|
885
887
|
globalThis.document.body.appendChild(a);
|
|
886
888
|
const s = N(!0);
|
|
887
|
-
let c = null,
|
|
889
|
+
let c = null, n = !1;
|
|
888
890
|
const o = () => {
|
|
889
891
|
c && (c.unmount(), c = null), a.parentNode && a.parentNode.removeChild(a);
|
|
890
892
|
}, i = (d) => {
|
|
891
|
-
|
|
893
|
+
n || (n = !0, s.value = !1, queueMicrotask(() => {
|
|
892
894
|
o(), t(d);
|
|
893
895
|
}));
|
|
894
896
|
}, { content: r, ...u } = e;
|
|
@@ -951,13 +953,13 @@ function Te(e = {}) {
|
|
|
951
953
|
function sa(e = {}) {
|
|
952
954
|
return e.modelValue !== void 0;
|
|
953
955
|
}
|
|
954
|
-
function
|
|
956
|
+
function la(e = {}) {
|
|
955
957
|
return e.modelValue !== void 0;
|
|
956
958
|
}
|
|
957
959
|
function te(e, t) {
|
|
958
960
|
return Object.is(e, t);
|
|
959
961
|
}
|
|
960
|
-
function
|
|
962
|
+
function na(e = {}, t = {}) {
|
|
961
963
|
const a = Be(e), s = ["mu-radio"];
|
|
962
964
|
return t.checked && s.push("is-checked"), (t.disabled || a.disabled) && s.push("is-disabled"), s;
|
|
963
965
|
}
|
|
@@ -977,18 +979,18 @@ const ua = ["checked", "disabled", "name", "value"], ia = { class: "mu-radio__la
|
|
|
977
979
|
},
|
|
978
980
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
979
981
|
setup(e, { emit: t }) {
|
|
980
|
-
const a = e, s = t, c = D(),
|
|
981
|
-
() => o.value.disabled || !!(
|
|
982
|
-
), y =
|
|
983
|
-
|
|
982
|
+
const a = e, s = t, c = D(), n = se($e, null), o = l(() => Be(a)), i = l(() => sa(a)), r = N(o.value.defaultChecked), u = l(() => n ? te(n.value.value, o.value.value) : i.value ? te(o.value.modelValue, o.value.value) : r.value), d = l(
|
|
983
|
+
() => o.value.disabled || !!(n != null && n.disabled.value)
|
|
984
|
+
), y = l(() => (n == null ? void 0 : n.name.value) ?? o.value.name), k = l(() => String(o.value.value)), _ = l(() => [
|
|
985
|
+
na(a, {
|
|
984
986
|
checked: u.value,
|
|
985
987
|
disabled: d.value
|
|
986
988
|
}),
|
|
987
989
|
c.class
|
|
988
|
-
]), T =
|
|
990
|
+
]), T = l(() => {
|
|
989
991
|
const { class: h, style: p, ...B } = c;
|
|
990
992
|
return B;
|
|
991
|
-
}), x =
|
|
993
|
+
}), x = l(() => c.style);
|
|
992
994
|
function b(h, p) {
|
|
993
995
|
i.value || (r.value = !0), s("update:modelValue", h), s("change", h, p);
|
|
994
996
|
}
|
|
@@ -996,8 +998,8 @@ const ua = ["checked", "disabled", "name", "value"], ia = { class: "mu-radio__la
|
|
|
996
998
|
if (d.value)
|
|
997
999
|
return;
|
|
998
1000
|
const p = o.value.value, B = h.target instanceof globalThis.HTMLInputElement ? h.target : null;
|
|
999
|
-
if (
|
|
1000
|
-
|
|
1001
|
+
if (n) {
|
|
1002
|
+
n.select(p, h), j(() => {
|
|
1001
1003
|
B && (B.checked = u.value);
|
|
1002
1004
|
});
|
|
1003
1005
|
return;
|
|
@@ -1050,16 +1052,16 @@ const ua = ["checked", "disabled", "name", "value"], ia = { class: "mu-radio__la
|
|
|
1050
1052
|
},
|
|
1051
1053
|
emits: ["update:modelValue", "change"],
|
|
1052
1054
|
setup(e, { emit: t }) {
|
|
1053
|
-
const a = e, s = t, c = D(),
|
|
1054
|
-
() => o.value ?
|
|
1055
|
-
), u =
|
|
1055
|
+
const a = e, s = t, c = D(), n = l(() => Te(a)), o = l(() => la(a)), i = N(n.value.defaultValue), r = l(
|
|
1056
|
+
() => o.value ? n.value.modelValue : i.value
|
|
1057
|
+
), u = l(() => n.value.disabled), d = l(() => n.value.name), y = l(() => [oa(a), c.class]), k = l(() => {
|
|
1056
1058
|
const { class: x, style: b, ...g } = c;
|
|
1057
1059
|
return g;
|
|
1058
|
-
}), _ =
|
|
1060
|
+
}), _ = l(() => c.style);
|
|
1059
1061
|
function T(x, b) {
|
|
1060
|
-
|
|
1062
|
+
n.value.disabled || te(r.value, x) || (o.value || (i.value = x), s("update:modelValue", x), s("change", x, b));
|
|
1061
1063
|
}
|
|
1062
|
-
return
|
|
1064
|
+
return le($e, {
|
|
1063
1065
|
value: r,
|
|
1064
1066
|
disabled: u,
|
|
1065
1067
|
name: d,
|
|
@@ -1072,7 +1074,7 @@ const ua = ["checked", "disabled", "name", "value"], ia = { class: "mu-radio__la
|
|
|
1072
1074
|
w(x.$slots, "default", {}, void 0, !0)
|
|
1073
1075
|
], 16));
|
|
1074
1076
|
}
|
|
1075
|
-
}),
|
|
1077
|
+
}), ls = /* @__PURE__ */ z(ca, [["__scopeId", "data-v-3879fec4"]]), da = ["circle", "round", "line"], fa = ["small", "medium"];
|
|
1076
1078
|
function Me(e, t) {
|
|
1077
1079
|
return typeof t == "string" && e.includes(t);
|
|
1078
1080
|
}
|
|
@@ -1147,11 +1149,11 @@ const ka = ["aria-checked", "disabled"], _a = {
|
|
|
1147
1149
|
},
|
|
1148
1150
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
1149
1151
|
setup(e, { emit: t }) {
|
|
1150
|
-
const a = e, s = t, c = D(),
|
|
1152
|
+
const a = e, s = t, c = D(), n = F(), o = N(!1), i = ae(a), r = N(
|
|
1151
1153
|
i.defaultChecked ? i.checkedValue : i.uncheckedValue
|
|
1152
|
-
), u =
|
|
1154
|
+
), u = l(() => ae(a)), d = l(() => ha(a)), y = l(
|
|
1153
1155
|
() => d.value ? u.value.modelValue : r.value
|
|
1154
|
-
), k =
|
|
1156
|
+
), k = l(() => Se(y.value, u.value)), _ = l(() => u.value.loading || o.value), T = l(() => ba(u.value)), x = l(() => T.value ? k.value ? !!(n.checked || u.value.checkedText) : !!(n.unchecked || u.value.uncheckedText) : !1), b = l(() => [
|
|
1155
1157
|
ga(a, {
|
|
1156
1158
|
checked: k.value,
|
|
1157
1159
|
loading: o.value
|
|
@@ -1160,10 +1162,10 @@ const ka = ["aria-checked", "disabled"], _a = {
|
|
|
1160
1162
|
"has-label": x.value
|
|
1161
1163
|
},
|
|
1162
1164
|
c.class
|
|
1163
|
-
]), g =
|
|
1165
|
+
]), g = l(() => {
|
|
1164
1166
|
const { class: C, style: L, type: V, ...P } = c;
|
|
1165
1167
|
return P;
|
|
1166
|
-
}), S =
|
|
1168
|
+
}), S = l(() => {
|
|
1167
1169
|
const C = {};
|
|
1168
1170
|
return u.value.checkedColor && (C["--mu-switch-current-checked-bg"] = u.value.checkedColor, C["--mu-switch-current-checked-border"] = u.value.checkedColor, C["--mu-switch-current-checked-thumb"] = u.value.checkedColor, C["--mu-switch-current-checked-glow"] = `0 0 12px ${u.value.checkedColor}`), u.value.uncheckedColor && (C["--mu-switch-current-unchecked-bg"] = u.value.uncheckedColor), [C, c.style];
|
|
1169
1171
|
});
|
|
@@ -1235,7 +1237,7 @@ const ka = ["aria-checked", "disabled"], _a = {
|
|
|
1235
1237
|
])) : M("", !0)
|
|
1236
1238
|
], 16, ka));
|
|
1237
1239
|
}
|
|
1238
|
-
}),
|
|
1240
|
+
}), ns = /* @__PURE__ */ z(wa, [["__scopeId", "data-v-8cfb8f2a"]]), Le = Symbol("MuTabs"), xa = ["line", "segment"], Va = ["small", "medium", "large"], $a = ["white", "ghost"], Ba = ["content", "equal"];
|
|
1239
1241
|
function Q(e, t) {
|
|
1240
1242
|
return typeof t == "string" && e.includes(t);
|
|
1241
1243
|
}
|
|
@@ -1305,20 +1307,20 @@ const Ia = ["aria-selected", "disabled"], Oa = {
|
|
|
1305
1307
|
},
|
|
1306
1308
|
emits: ["click"],
|
|
1307
1309
|
setup(e, { emit: t }) {
|
|
1308
|
-
const a = e, s = t, c = D(),
|
|
1310
|
+
const a = e, s = t, c = D(), n = F(), o = se(Le, null), i = N(null), r = l(() => Pa(a)), u = l(
|
|
1309
1311
|
() => o ? Ne(o.value.value, r.value.value) : !1
|
|
1310
|
-
), d =
|
|
1312
|
+
), d = l(
|
|
1311
1313
|
() => r.value.disabled || !!(o != null && o.disabled.value)
|
|
1312
|
-
), y =
|
|
1314
|
+
), y = l(() => [
|
|
1313
1315
|
za(a, {
|
|
1314
1316
|
active: u.value,
|
|
1315
1317
|
disabled: d.value
|
|
1316
1318
|
}),
|
|
1317
1319
|
c.class
|
|
1318
|
-
]), k =
|
|
1320
|
+
]), k = l(() => {
|
|
1319
1321
|
const { class: b, style: g, ...S } = c;
|
|
1320
1322
|
return S;
|
|
1321
|
-
}), _ =
|
|
1323
|
+
}), _ = l(() => c.style);
|
|
1322
1324
|
function T() {
|
|
1323
1325
|
!o || !i.value || o.registerItem(r.value.value, i.value);
|
|
1324
1326
|
}
|
|
@@ -1329,7 +1331,7 @@ const Ia = ["aria-selected", "disabled"], Oa = {
|
|
|
1329
1331
|
}
|
|
1330
1332
|
o && o.select(r.value.value, b), s("click", b);
|
|
1331
1333
|
}
|
|
1332
|
-
return
|
|
1334
|
+
return ne(() => {
|
|
1333
1335
|
T();
|
|
1334
1336
|
}), oe(() => {
|
|
1335
1337
|
o == null || o.unregisterItem(r.value.value);
|
|
@@ -1350,13 +1352,13 @@ const Ia = ["aria-selected", "disabled"], Oa = {
|
|
|
1350
1352
|
disabled: d.value,
|
|
1351
1353
|
onClick: x
|
|
1352
1354
|
}), [
|
|
1353
|
-
O(
|
|
1355
|
+
O(n).prefix ? (f(), m("span", Oa, [
|
|
1354
1356
|
w(b.$slots, "prefix", {}, void 0, !0)
|
|
1355
1357
|
])) : M("", !0),
|
|
1356
1358
|
v("span", Aa, [
|
|
1357
1359
|
w(b.$slots, "default", {}, void 0, !0)
|
|
1358
1360
|
]),
|
|
1359
|
-
O(
|
|
1361
|
+
O(n).suffix ? (f(), m("span", Ra, [
|
|
1360
1362
|
w(b.$slots, "suffix", {}, void 0, !0)
|
|
1361
1363
|
])) : M("", !0)
|
|
1362
1364
|
], 16, Ia));
|
|
@@ -1375,17 +1377,17 @@ const Ia = ["aria-selected", "disabled"], Oa = {
|
|
|
1375
1377
|
},
|
|
1376
1378
|
emits: ["update:modelValue", "change"],
|
|
1377
1379
|
setup(e, { emit: t }) {
|
|
1378
|
-
const a = e, s = t, c = D(),
|
|
1380
|
+
const a = e, s = t, c = D(), n = N(null), o = l(() => Pe(a)), i = l(() => Na(a)), r = N(o.value.defaultValue), u = l(
|
|
1379
1381
|
() => i.value ? o.value.modelValue : r.value
|
|
1380
|
-
), d =
|
|
1382
|
+
), d = l(() => o.value.variant), y = l(() => o.value.appearance), k = l(() => o.value.size), _ = l(() => o.value.layout), T = l(() => o.value.disabled), x = N(!1), b = N(0), g = /* @__PURE__ */ new Map(), S = N({
|
|
1381
1383
|
transform: "translateX(0px)",
|
|
1382
1384
|
width: "0px"
|
|
1383
|
-
}), $ =
|
|
1385
|
+
}), $ = l(() => [Ha(a), c.class]), h = l(() => {
|
|
1384
1386
|
const { class: V, style: P, ...ee } = c;
|
|
1385
1387
|
return ee;
|
|
1386
|
-
}), p =
|
|
1388
|
+
}), p = l(() => c.style);
|
|
1387
1389
|
function B() {
|
|
1388
|
-
const V =
|
|
1390
|
+
const V = n.value, P = u.value !== void 0 ? g.get(u.value) : void 0;
|
|
1389
1391
|
if (!V || !P) {
|
|
1390
1392
|
S.value = {
|
|
1391
1393
|
transform: "translateX(0px)",
|
|
@@ -1413,7 +1415,7 @@ const Ia = ["aria-selected", "disabled"], Oa = {
|
|
|
1413
1415
|
function L(V) {
|
|
1414
1416
|
g.delete(V), b.value += 1, I();
|
|
1415
1417
|
}
|
|
1416
|
-
return
|
|
1418
|
+
return le(Le, {
|
|
1417
1419
|
value: u,
|
|
1418
1420
|
variant: d,
|
|
1419
1421
|
appearance: y,
|
|
@@ -1429,7 +1431,7 @@ const Ia = ["aria-selected", "disabled"], Oa = {
|
|
|
1429
1431
|
I();
|
|
1430
1432
|
},
|
|
1431
1433
|
{ flush: "post" }
|
|
1432
|
-
),
|
|
1434
|
+
), ne(() => {
|
|
1433
1435
|
globalThis.window.addEventListener("resize", B), j(() => {
|
|
1434
1436
|
B(), x.value = !0;
|
|
1435
1437
|
});
|
|
@@ -1437,7 +1439,7 @@ const Ia = ["aria-selected", "disabled"], Oa = {
|
|
|
1437
1439
|
globalThis.window.removeEventListener("resize", B);
|
|
1438
1440
|
}), (V, P) => (f(), m("div", R({
|
|
1439
1441
|
ref_key: "rootRef",
|
|
1440
|
-
ref:
|
|
1442
|
+
ref: n
|
|
1441
1443
|
}, h.value, {
|
|
1442
1444
|
role: "tablist",
|
|
1443
1445
|
class: [$.value, { "is-ready": x.value }],
|
|
@@ -1455,21 +1457,21 @@ const Ia = ["aria-selected", "disabled"], Oa = {
|
|
|
1455
1457
|
function ja(e, t) {
|
|
1456
1458
|
return typeof t == "string" && e.includes(t);
|
|
1457
1459
|
}
|
|
1458
|
-
function
|
|
1460
|
+
function Ua(e) {
|
|
1459
1461
|
return ja(Ea, e);
|
|
1460
1462
|
}
|
|
1461
1463
|
function He(e = {}) {
|
|
1462
1464
|
return {
|
|
1463
|
-
variant:
|
|
1465
|
+
variant: Ua(e.variant) ? e.variant : "outline",
|
|
1464
1466
|
selected: e.selected ?? !1,
|
|
1465
1467
|
disabled: e.disabled ?? !1
|
|
1466
1468
|
};
|
|
1467
1469
|
}
|
|
1468
|
-
function
|
|
1470
|
+
function Za(e = {}) {
|
|
1469
1471
|
const t = He(e), a = ["mu-tag", `mu-tag--variant-${t.variant}`];
|
|
1470
1472
|
return t.selected && a.push("is-selected"), t.disabled && a.push("is-disabled"), a;
|
|
1471
1473
|
}
|
|
1472
|
-
const
|
|
1474
|
+
const Fa = ["disabled", "aria-pressed"], qa = {
|
|
1473
1475
|
key: 0,
|
|
1474
1476
|
class: "mu-tag__prefix",
|
|
1475
1477
|
"aria-hidden": "true"
|
|
@@ -1486,15 +1488,15 @@ const Ua = ["disabled", "aria-pressed"], qa = {
|
|
|
1486
1488
|
},
|
|
1487
1489
|
emits: ["update:selected", "click"],
|
|
1488
1490
|
setup(e, { emit: t }) {
|
|
1489
|
-
const a = e, s = t, c =
|
|
1491
|
+
const a = e, s = t, c = F(), n = l(() => He(a)), o = l(() => Za(a));
|
|
1490
1492
|
function i(r) {
|
|
1491
|
-
|
|
1493
|
+
n.value.disabled || (s("click", r), s("update:selected", !n.value.selected));
|
|
1492
1494
|
}
|
|
1493
1495
|
return (r, u) => (f(), m("button", {
|
|
1494
1496
|
type: "button",
|
|
1495
1497
|
class: J(o.value),
|
|
1496
|
-
disabled:
|
|
1497
|
-
"aria-pressed":
|
|
1498
|
+
disabled: n.value.disabled,
|
|
1499
|
+
"aria-pressed": n.value.selected,
|
|
1498
1500
|
onClick: i
|
|
1499
1501
|
}, [
|
|
1500
1502
|
O(c).prefix ? (f(), m("span", qa, [
|
|
@@ -1506,7 +1508,7 @@ const Ua = ["disabled", "aria-pressed"], qa = {
|
|
|
1506
1508
|
O(c).suffix ? (f(), m("span", Xa, [
|
|
1507
1509
|
w(r.$slots, "suffix", {}, void 0, !0)
|
|
1508
1510
|
])) : M("", !0)
|
|
1509
|
-
], 10,
|
|
1511
|
+
], 10, Fa));
|
|
1510
1512
|
}
|
|
1511
1513
|
}), is = /* @__PURE__ */ z(Wa, [["__scopeId", "data-v-e3e9ee4d"]]);
|
|
1512
1514
|
export {
|
|
@@ -1517,8 +1519,8 @@ export {
|
|
|
1517
1519
|
Ya as MuCheckboxGroup,
|
|
1518
1520
|
Qt as MuModal,
|
|
1519
1521
|
ss as MuRadio,
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
+
ls as MuRadioGroup,
|
|
1523
|
+
ns as MuSwitch,
|
|
1522
1524
|
os as MuTab,
|
|
1523
1525
|
us as MuTabs,
|
|
1524
1526
|
is as MuTag,
|