@mureka-fe/ui 2.0.0 → 4.0.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 +85 -1
- package/dist/src/components/badge/Badge.vue.d.ts +13 -0
- package/dist/src/components/badge/Badge.vue.d.ts.map +1 -0
- package/dist/src/components/badge/__docs__/demos/content.demo.vue.d.ts +3 -0
- package/dist/src/components/badge/__docs__/demos/content.demo.vue.d.ts.map +1 -0
- package/dist/src/components/badge/__docs__/demos/preset.demo.vue.d.ts +3 -0
- package/dist/src/components/badge/__docs__/demos/preset.demo.vue.d.ts.map +1 -0
- package/dist/src/components/badge/__docs__/demos/variant.demo.vue.d.ts +3 -0
- package/dist/src/components/badge/__docs__/demos/variant.demo.vue.d.ts.map +1 -0
- package/dist/src/components/badge/__docs__/meta.d.ts +4 -0
- package/dist/src/components/badge/__docs__/meta.d.ts.map +1 -0
- package/dist/src/components/badge/badge.spec.d.ts +2 -0
- package/dist/src/components/badge/badge.spec.d.ts.map +1 -0
- package/dist/src/components/badge/badge.types.d.ts +24 -0
- package/dist/src/components/badge/badge.types.d.ts.map +1 -0
- package/dist/src/components/badge/index.d.ts +3 -0
- package/dist/src/components/badge/index.d.ts.map +1 -0
- package/dist/src/components/button/Button.vue.d.ts.map +1 -1
- package/dist/src/components/button/button.types.d.ts +1 -0
- package/dist/src/components/button/button.types.d.ts.map +1 -1
- package/dist/src/components/checkbox/Checkbox.vue.d.ts +31 -0
- package/dist/src/components/checkbox/Checkbox.vue.d.ts.map +1 -0
- package/dist/src/components/checkbox/CheckboxGroup.vue.d.ts +31 -0
- package/dist/src/components/checkbox/CheckboxGroup.vue.d.ts.map +1 -0
- package/dist/src/components/checkbox/__docs__/demos/basic.demo.vue.d.ts +3 -0
- package/dist/src/components/checkbox/__docs__/demos/basic.demo.vue.d.ts.map +1 -0
- package/dist/src/components/checkbox/__docs__/demos/direction.demo.vue.d.ts +3 -0
- package/dist/src/components/checkbox/__docs__/demos/direction.demo.vue.d.ts.map +1 -0
- package/dist/src/components/checkbox/__docs__/demos/disabled.demo.vue.d.ts +3 -0
- package/dist/src/components/checkbox/__docs__/demos/disabled.demo.vue.d.ts.map +1 -0
- package/dist/src/components/checkbox/__docs__/demos/group.demo.vue.d.ts +3 -0
- package/dist/src/components/checkbox/__docs__/demos/group.demo.vue.d.ts.map +1 -0
- package/dist/src/components/checkbox/__docs__/demos/indeterminate.demo.vue.d.ts +3 -0
- package/dist/src/components/checkbox/__docs__/demos/indeterminate.demo.vue.d.ts.map +1 -0
- package/dist/src/components/checkbox/__docs__/demos/options.demo.vue.d.ts +3 -0
- package/dist/src/components/checkbox/__docs__/demos/options.demo.vue.d.ts.map +1 -0
- package/dist/src/components/checkbox/__docs__/meta.d.ts +4 -0
- package/dist/src/components/checkbox/__docs__/meta.d.ts.map +1 -0
- package/dist/src/components/checkbox/checkbox.context.d.ts +11 -0
- package/dist/src/components/checkbox/checkbox.context.d.ts.map +1 -0
- package/dist/src/components/checkbox/checkbox.spec.d.ts +2 -0
- package/dist/src/components/checkbox/checkbox.spec.d.ts.map +1 -0
- package/dist/src/components/checkbox/checkbox.types.d.ts +54 -0
- package/dist/src/components/checkbox/checkbox.types.d.ts.map +1 -0
- package/dist/src/components/checkbox/index.d.ts +4 -0
- package/dist/src/components/checkbox/index.d.ts.map +1 -0
- package/dist/src/components/modal/Modal.vue.d.ts +2 -2
- package/dist/src/components/radio/Radio.vue.d.ts +6 -6
- package/dist/src/components/radio/RadioGroup.vue.d.ts +3 -3
- package/dist/src/components/switch/Switch.vue.d.ts +4 -4
- package/dist/src/components/tabs/Tabs.vue.d.ts +2 -2
- package/dist/src/index.d.ts +4 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/ui.js +881 -535
- package/dist/ui.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/ui.js
CHANGED
|
@@ -1,5 +1,154 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
|
|
1
|
+
import { defineComponent as H, computed as s, openBlock as v, createElementBlock as h, normalizeClass as W, Fragment as K, createElementVNode as f, createCommentVNode as S, renderSlot as x, createTextVNode as G, toDisplayString as O, useSlots as J, useAttrs as R, normalizeStyle as he, ref as N, inject as se, watchEffect as ze, mergeProps as A, nextTick as j, provide as le, renderList as pe, createBlock as E, withCtx as X, reactive as Ie, h as be, createVNode as Oe, TransitionGroup as Ae, resolveDynamicComponent as Re, unref as D, onMounted as ne, onBeforeUnmount as oe, watch as ue, Teleport as De, createApp as Ge } from "vue";
|
|
2
|
+
const Ee = [
|
|
3
|
+
"new",
|
|
4
|
+
"new-mini",
|
|
5
|
+
"premier",
|
|
6
|
+
"pro",
|
|
7
|
+
"beta",
|
|
8
|
+
"free",
|
|
9
|
+
"studio",
|
|
10
|
+
"upload",
|
|
11
|
+
"publish",
|
|
12
|
+
"published",
|
|
13
|
+
"details",
|
|
14
|
+
"bpm"
|
|
15
|
+
], je = ["outline", "solid", "soft"], Ze = {
|
|
16
|
+
new: { isSvgPreset: !0 },
|
|
17
|
+
"new-mini": { isSvgPreset: !0 },
|
|
18
|
+
premier: { defaultContent: "Premier" },
|
|
19
|
+
pro: { defaultContent: "Pro" },
|
|
20
|
+
beta: { defaultContent: "Beta" },
|
|
21
|
+
free: { defaultContent: "1 Free" },
|
|
22
|
+
studio: { defaultContent: "Studio" },
|
|
23
|
+
upload: { defaultContent: "Upload" },
|
|
24
|
+
publish: { defaultContent: "Publish" },
|
|
25
|
+
published: { defaultContent: "Published" },
|
|
26
|
+
details: { defaultContent: "Details" },
|
|
27
|
+
bpm: { defaultContent: "62 BPM" }
|
|
28
|
+
};
|
|
29
|
+
function ge(e, t) {
|
|
30
|
+
return typeof t == "string" && e.includes(t);
|
|
31
|
+
}
|
|
32
|
+
function Fe(e) {
|
|
33
|
+
return ge(je, e);
|
|
34
|
+
}
|
|
35
|
+
function Ue(e) {
|
|
36
|
+
return ge(Ee, e);
|
|
37
|
+
}
|
|
38
|
+
function ke(e = {}) {
|
|
39
|
+
if (Ue(e.preset)) {
|
|
40
|
+
const t = Ze[e.preset];
|
|
41
|
+
return {
|
|
42
|
+
preset: e.preset,
|
|
43
|
+
defaultContent: t.defaultContent,
|
|
44
|
+
isSvgPreset: t.isSvgPreset ?? !1
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
variant: Fe(e.variant) ? e.variant : "outline",
|
|
49
|
+
paid: e.paid ?? !1,
|
|
50
|
+
isSvgPreset: !1
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
function qe(e = {}) {
|
|
54
|
+
const t = ke(e), a = ["mu-badge"];
|
|
55
|
+
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
|
+
}
|
|
57
|
+
const Ke = ["role", "aria-label"], Xe = {
|
|
58
|
+
key: 0,
|
|
59
|
+
"data-test": "new-wordmark",
|
|
60
|
+
class: "mu-badge__new-wordmark",
|
|
61
|
+
viewBox: "0 0 20 8",
|
|
62
|
+
fill: "none",
|
|
63
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
64
|
+
"aria-hidden": "true"
|
|
65
|
+
}, We = {
|
|
66
|
+
key: 1,
|
|
67
|
+
"data-test": "new-mini-wordmark",
|
|
68
|
+
class: "mu-badge__new-wordmark",
|
|
69
|
+
viewBox: "0 0 15 6",
|
|
70
|
+
fill: "none",
|
|
71
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
72
|
+
"aria-hidden": "true"
|
|
73
|
+
}, Je = {
|
|
74
|
+
key: 0,
|
|
75
|
+
class: "mu-badge__prefix",
|
|
76
|
+
"aria-hidden": "true"
|
|
77
|
+
}, Qe = { class: "mu-badge__content" }, Ye = /* @__PURE__ */ H({
|
|
78
|
+
__name: "Badge",
|
|
79
|
+
props: {
|
|
80
|
+
variant: {},
|
|
81
|
+
paid: { type: Boolean },
|
|
82
|
+
preset: {}
|
|
83
|
+
},
|
|
84
|
+
setup(e) {
|
|
85
|
+
const t = e, a = s(() => ke(t)), l = s(() => qe(t)), r = s(() => a.value.isSvgPreset ? "img" : void 0), n = s(() => a.value.isSvgPreset ? "NEW" : void 0), o = s(() => a.value.preset === "details");
|
|
86
|
+
return (u, i) => (v(), h("span", {
|
|
87
|
+
class: W(l.value),
|
|
88
|
+
role: r.value,
|
|
89
|
+
"aria-label": n.value
|
|
90
|
+
}, [
|
|
91
|
+
a.value.isSvgPreset ? (v(), h(K, { key: 0 }, [
|
|
92
|
+
a.value.preset === "new" ? (v(), h("svg", Xe, [...i[0] || (i[0] = [
|
|
93
|
+
f("path", {
|
|
94
|
+
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",
|
|
95
|
+
fill: "currentColor"
|
|
96
|
+
}, null, -1),
|
|
97
|
+
f("path", {
|
|
98
|
+
d: "M7.40262 8V0H12.1241V1.05205H8.56924V3.32055H11.7389V4.36164H8.56924V6.94795H12.1241V8H7.40262Z",
|
|
99
|
+
fill: "currentColor"
|
|
100
|
+
}, null, -1),
|
|
101
|
+
f("path", {
|
|
102
|
+
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",
|
|
103
|
+
fill: "currentColor"
|
|
104
|
+
}, null, -1)
|
|
105
|
+
])])) : a.value.preset === "new-mini" ? (v(), h("svg", We, [...i[1] || (i[1] = [
|
|
106
|
+
f("path", {
|
|
107
|
+
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",
|
|
108
|
+
fill: "currentColor"
|
|
109
|
+
}, null, -1),
|
|
110
|
+
f("path", {
|
|
111
|
+
d: "M5.55197 6V0H9.09309V0.789041H6.42693V2.49041H8.80419V3.27123H6.42693V5.21096H9.09309V6H5.55197Z",
|
|
112
|
+
fill: "currentColor"
|
|
113
|
+
}, null, -1),
|
|
114
|
+
f("path", {
|
|
115
|
+
d: "M11.0462 6L10.3941 0H11.1947L11.5992 4.30685C11.6102 4.41644 11.6185 4.53699 11.624 4.66849C11.635 4.8 11.6432 4.92877 11.6487 5.05479C11.6597 5.18082 11.6652 5.29041 11.6652 5.38356C11.6762 5.29041 11.6872 5.18082 11.6982 5.05479C11.7093 4.92877 11.7203 4.8 11.7313 4.66849C11.7478 4.53699 11.7643 4.41644 11.7808 4.30685L12.3008 0H13.1263L13.6133 4.30685C13.6243 4.41644 13.6353 4.53699 13.6463 4.66849C13.6628 4.8 13.6793 4.92877 13.6958 5.05479C13.7123 5.18082 13.7233 5.29041 13.7288 5.38356C13.7343 5.29041 13.7398 5.18082 13.7453 5.05479C13.7563 4.92877 13.7673 4.8 13.7784 4.66849C13.7894 4.53699 13.8004 4.41644 13.8114 4.30685L14.2241 0H15L14.3231 6H13.2913L12.8043 1.63562C12.7933 1.52055 12.7823 1.4 12.7713 1.27397C12.7603 1.14247 12.7493 1.01644 12.7383 0.89589C12.7273 0.769863 12.7163 0.665753 12.7053 0.583561C12.6998 0.665753 12.6915 0.769863 12.6805 0.89589C12.6695 1.01644 12.6585 1.14247 12.6475 1.27397C12.6365 1.4 12.6227 1.52055 12.6062 1.63562L12.0862 6H11.0462Z",
|
|
116
|
+
fill: "currentColor"
|
|
117
|
+
}, null, -1)
|
|
118
|
+
])])) : S("", !0)
|
|
119
|
+
], 64)) : (v(), h(K, { key: 1 }, [
|
|
120
|
+
o.value ? (v(), h("span", Je, [...i[2] || (i[2] = [
|
|
121
|
+
f("svg", {
|
|
122
|
+
"data-test": "details-icon",
|
|
123
|
+
viewBox: "0 0 12 12",
|
|
124
|
+
fill: "none",
|
|
125
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
126
|
+
"aria-hidden": "true"
|
|
127
|
+
}, [
|
|
128
|
+
f("path", {
|
|
129
|
+
d: "M1.5 3.5V2.5C1.5 2.23478 1.60536 1.98043 1.79289 1.79289C1.98043 1.60536 2.23478 1.5 2.5 1.5H3.5M8.5 1.5H9.5C9.76522 1.5 10.0196 1.60536 10.2071 1.79289C10.3946 1.98043 10.5 2.23478 10.5 2.5V3.5M10.5 8.5V9.5C10.5 9.76522 10.3946 10.0196 10.2071 10.2071C10.0196 10.3946 9.76522 10.5 9.5 10.5H8.5M3.5 10.5H2.5C2.23478 10.5 1.98043 10.3946 1.79289 10.2071C1.60536 10.0196 1.5 9.76522 1.5 9.5V8.5M3.5 4H7.5M3.5 6H8.5M3.5 8H6.5",
|
|
130
|
+
stroke: "currentColor",
|
|
131
|
+
"stroke-opacity": "0.9",
|
|
132
|
+
"stroke-linecap": "round",
|
|
133
|
+
"stroke-linejoin": "round"
|
|
134
|
+
})
|
|
135
|
+
], -1)
|
|
136
|
+
])])) : S("", !0),
|
|
137
|
+
f("span", Qe, [
|
|
138
|
+
x(u.$slots, "default", {}, () => [
|
|
139
|
+
G(O(a.value.defaultContent), 1)
|
|
140
|
+
], !0)
|
|
141
|
+
])
|
|
142
|
+
], 64))
|
|
143
|
+
], 10, Ke));
|
|
144
|
+
}
|
|
145
|
+
}), z = (e, t) => {
|
|
146
|
+
const a = e.__vccOpts || e;
|
|
147
|
+
for (const [l, r] of t)
|
|
148
|
+
a[l] = r;
|
|
149
|
+
return a;
|
|
150
|
+
}, Wa = /* @__PURE__ */ z(Ye, [["__scopeId", "data-v-aa9886ca"]]);
|
|
151
|
+
function ie(e = {}) {
|
|
3
152
|
return {
|
|
4
153
|
type: e.type ?? "primary",
|
|
5
154
|
status: e.status,
|
|
@@ -13,8 +162,8 @@ function oe(e = {}) {
|
|
|
13
162
|
nativeType: e.nativeType ?? "button"
|
|
14
163
|
};
|
|
15
164
|
}
|
|
16
|
-
function
|
|
17
|
-
const t =
|
|
165
|
+
function et(e = {}) {
|
|
166
|
+
const t = ie(e), a = [
|
|
18
167
|
"mu-button",
|
|
19
168
|
`mu-button--${t.type}`,
|
|
20
169
|
`mu-button--appearance-${t.appearance}`,
|
|
@@ -22,29 +171,33 @@ function Le(e = {}) {
|
|
|
22
171
|
];
|
|
23
172
|
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;
|
|
24
173
|
}
|
|
25
|
-
function
|
|
26
|
-
const t =
|
|
174
|
+
function tt(e = {}) {
|
|
175
|
+
const t = ie(e);
|
|
27
176
|
return !t.disabled && !t.loading;
|
|
28
177
|
}
|
|
29
|
-
function
|
|
30
|
-
const t = e.iconOnly ?? !1, a = e.hasPrefix ?? !1,
|
|
178
|
+
function at(e = {}) {
|
|
179
|
+
const t = e.iconOnly ?? !1, a = e.hasPrefix ?? !1, l = e.hasSuffix ?? !1, r = e.loading ?? !1, n = e.hasAriaLabel ?? !1;
|
|
31
180
|
return {
|
|
32
181
|
showPrefixSlot: !t && !r && a,
|
|
33
|
-
showSuffixSlot: !t &&
|
|
182
|
+
showSuffixSlot: !t && l,
|
|
183
|
+
showDefaultSlot: !(t && r),
|
|
34
184
|
showLoadingIndicator: r,
|
|
35
|
-
requiresAriaLabel: t && !
|
|
36
|
-
isInvalidIconOnlyCombination: t && (a ||
|
|
185
|
+
requiresAriaLabel: t && !n,
|
|
186
|
+
isInvalidIconOnlyCombination: t && (a || l)
|
|
37
187
|
};
|
|
38
188
|
}
|
|
39
|
-
const
|
|
189
|
+
const st = ["type", "disabled", "aria-busy"], lt = {
|
|
40
190
|
key: 0,
|
|
41
191
|
class: "mu-button__prefix",
|
|
42
192
|
"aria-hidden": "true"
|
|
43
|
-
},
|
|
193
|
+
}, nt = {
|
|
44
194
|
key: 1,
|
|
195
|
+
class: "mu-button__content"
|
|
196
|
+
}, ot = {
|
|
197
|
+
key: 2,
|
|
45
198
|
class: "mu-button__suffix",
|
|
46
199
|
"aria-hidden": "true"
|
|
47
|
-
},
|
|
200
|
+
}, ut = /* @__PURE__ */ H({
|
|
48
201
|
__name: "Button",
|
|
49
202
|
props: {
|
|
50
203
|
type: { default: "primary" },
|
|
@@ -60,7 +213,7 @@ const Re = ["type", "disabled", "aria-busy"], De = {
|
|
|
60
213
|
},
|
|
61
214
|
emits: ["click"],
|
|
62
215
|
setup(e, { emit: t }) {
|
|
63
|
-
const a = e,
|
|
216
|
+
const a = e, l = t, r = J(), n = R(), o = {
|
|
64
217
|
small: {
|
|
65
218
|
width: "var(--mu-button-icon-size-small)",
|
|
66
219
|
height: "var(--mu-button-icon-size-small)"
|
|
@@ -73,67 +226,257 @@ const Re = ["type", "disabled", "aria-busy"], De = {
|
|
|
73
226
|
width: "var(--mu-button-icon-size-large)",
|
|
74
227
|
height: "var(--mu-button-icon-size-large)"
|
|
75
228
|
}
|
|
76
|
-
},
|
|
77
|
-
() =>
|
|
78
|
-
iconOnly:
|
|
229
|
+
}, u = s(() => ie(a)), i = s(() => et(u.value)), c = s(() => o[u.value.size]), d = s(
|
|
230
|
+
() => at({
|
|
231
|
+
iconOnly: u.value.iconOnly,
|
|
79
232
|
hasPrefix: !!r.prefix,
|
|
80
233
|
hasSuffix: !!r.suffix,
|
|
81
|
-
loading:
|
|
234
|
+
loading: u.value.loading,
|
|
82
235
|
hasDefaultSlot: !!r.default,
|
|
83
|
-
hasAriaLabel: typeof
|
|
236
|
+
hasAriaLabel: typeof n["aria-label"] == "string" && n["aria-label"].trim().length > 0
|
|
84
237
|
})
|
|
85
238
|
);
|
|
86
|
-
function
|
|
87
|
-
if (!
|
|
88
|
-
|
|
239
|
+
function y(k) {
|
|
240
|
+
if (!tt(u.value)) {
|
|
241
|
+
k.preventDefault(), k.stopPropagation();
|
|
89
242
|
return;
|
|
90
243
|
}
|
|
91
|
-
|
|
244
|
+
l("click", k);
|
|
92
245
|
}
|
|
93
|
-
return (
|
|
94
|
-
type:
|
|
95
|
-
class:
|
|
96
|
-
disabled:
|
|
97
|
-
"aria-busy":
|
|
98
|
-
onClick:
|
|
246
|
+
return (k, C) => (v(), h("button", {
|
|
247
|
+
type: u.value.nativeType,
|
|
248
|
+
class: W(["mu-button", i.value]),
|
|
249
|
+
disabled: u.value.disabled || u.value.loading,
|
|
250
|
+
"aria-busy": u.value.loading ? "true" : void 0,
|
|
251
|
+
onClick: y
|
|
99
252
|
}, [
|
|
100
|
-
|
|
101
|
-
|
|
253
|
+
d.value.showLoadingIndicator || d.value.showPrefixSlot ? (v(), h("span", lt, [
|
|
254
|
+
d.value.showLoadingIndicator ? (v(), h("svg", {
|
|
102
255
|
key: 0,
|
|
103
256
|
class: "mu-button__loading-icon",
|
|
104
|
-
style:
|
|
257
|
+
style: he(c.value),
|
|
105
258
|
viewBox: "0 0 24 24",
|
|
106
259
|
fill: "none",
|
|
107
260
|
xmlns: "http://www.w3.org/2000/svg"
|
|
108
|
-
}, [...
|
|
109
|
-
|
|
261
|
+
}, [...C[0] || (C[0] = [
|
|
262
|
+
f("path", {
|
|
110
263
|
d: "M2.00293 12C2.00293 6.47853 6.47853 2.00293 12 2.00293C12.5509 2.00293 12.9971 2.4491 12.9971 3C12.9971 3.5509 12.5509 3.99707 12 3.99707C7.58034 3.99707 3.99707 7.58034 3.99707 12C3.99707 16.4197 7.58034 20.0029 12 20.0029C16.4197 20.0029 20.0029 16.4197 20.0029 12C20.0029 11.4491 20.4491 11.0029 21 11.0029C21.5509 11.0029 21.9971 11.4491 21.9971 12C21.9971 17.5215 17.5215 21.9971 12 21.9971C6.47853 21.9971 2.00293 17.5215 2.00293 12Z",
|
|
111
264
|
fill: "currentColor"
|
|
112
265
|
}, null, -1)
|
|
113
|
-
])], 4)) :
|
|
266
|
+
])], 4)) : x(k.$slots, "prefix", { key: 1 }, void 0, !0)
|
|
114
267
|
])) : S("", !0),
|
|
115
|
-
h("span",
|
|
116
|
-
|
|
117
|
-
]),
|
|
118
|
-
|
|
119
|
-
|
|
268
|
+
d.value.showDefaultSlot ? (v(), h("span", nt, [
|
|
269
|
+
x(k.$slots, "default", {}, void 0, !0)
|
|
270
|
+
])) : S("", !0),
|
|
271
|
+
d.value.showSuffixSlot ? (v(), h("span", ot, [
|
|
272
|
+
x(k.$slots, "suffix", {}, void 0, !0)
|
|
120
273
|
])) : S("", !0)
|
|
121
|
-
], 10,
|
|
274
|
+
], 10, st));
|
|
122
275
|
}
|
|
123
|
-
}),
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
276
|
+
}), me = /* @__PURE__ */ z(ut, [["__scopeId", "data-v-e6ca9a8f"]]), Ce = Symbol("MuCheckboxGroup"), it = ["horizontal", "vertical"];
|
|
277
|
+
function rt(e, t) {
|
|
278
|
+
return typeof t == "string" && e.includes(t);
|
|
279
|
+
}
|
|
280
|
+
function ct(e) {
|
|
281
|
+
return rt(it, e);
|
|
282
|
+
}
|
|
283
|
+
function _e(e = {}) {
|
|
284
|
+
return {
|
|
285
|
+
modelValue: e.modelValue,
|
|
286
|
+
value: e.value,
|
|
287
|
+
defaultChecked: e.defaultChecked ?? !1,
|
|
288
|
+
indeterminate: e.indeterminate ?? !1,
|
|
289
|
+
disabled: e.disabled ?? !1,
|
|
290
|
+
name: e.name
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
function ye(e = {}) {
|
|
294
|
+
return {
|
|
295
|
+
modelValue: e.modelValue,
|
|
296
|
+
defaultValue: e.defaultValue,
|
|
297
|
+
options: e.options,
|
|
298
|
+
disabled: e.disabled ?? !1,
|
|
299
|
+
name: e.name,
|
|
300
|
+
direction: ct(e.direction) ? e.direction : "horizontal"
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
function dt(e = {}) {
|
|
304
|
+
return e.modelValue !== void 0;
|
|
305
|
+
}
|
|
306
|
+
function ft(e = {}) {
|
|
307
|
+
return e.modelValue !== void 0;
|
|
308
|
+
}
|
|
309
|
+
function we(e, t) {
|
|
310
|
+
return !e || t === void 0 ? !1 : e.some((a) => Object.is(a, t));
|
|
311
|
+
}
|
|
312
|
+
function vt(e, t) {
|
|
313
|
+
return we(e, t) ? e.filter((a) => !Object.is(a, t)) : [...e, t];
|
|
314
|
+
}
|
|
315
|
+
function mt(e) {
|
|
316
|
+
return typeof e == "object" ? { ...e, label: e.label ?? String(e.value) } : { label: String(e), value: e };
|
|
317
|
+
}
|
|
318
|
+
function ht(e = {}, t = {}) {
|
|
319
|
+
const a = _e(e), l = ["mu-checkbox"];
|
|
320
|
+
return t.checked && l.push("is-checked"), (t.indeterminate || a.indeterminate) && l.push("is-indeterminate"), (t.disabled || a.disabled) && l.push("is-disabled"), l;
|
|
321
|
+
}
|
|
322
|
+
function pt(e = {}) {
|
|
323
|
+
const t = ye(e), a = ["mu-checkbox-group", `mu-checkbox-group--${t.direction}`];
|
|
324
|
+
return t.disabled && a.push("is-disabled"), a;
|
|
325
|
+
}
|
|
326
|
+
const bt = ["checked", "disabled", "name", "value"], gt = { class: "mu-checkbox__label" }, kt = /* @__PURE__ */ H({
|
|
327
|
+
inheritAttrs: !1,
|
|
328
|
+
__name: "Checkbox",
|
|
329
|
+
props: {
|
|
330
|
+
modelValue: { type: Boolean, default: void 0 },
|
|
331
|
+
value: { type: [String, Number, Boolean], default: void 0 },
|
|
332
|
+
defaultChecked: { type: Boolean, default: !1 },
|
|
333
|
+
indeterminate: { type: Boolean, default: !1 },
|
|
334
|
+
disabled: { type: Boolean, default: !1 },
|
|
335
|
+
name: { default: void 0 }
|
|
336
|
+
},
|
|
337
|
+
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
338
|
+
setup(e, { emit: t }) {
|
|
339
|
+
const a = e, l = t, r = R(), n = N(null), o = se(Ce, null), u = s(() => _e(a)), i = s(() => dt(a)), c = N(u.value.defaultChecked), d = s(() => o ? u.value.value !== void 0 ? o.isChecked(u.value.value) : !1 : i.value ? u.value.modelValue ?? !1 : c.value), y = s(
|
|
340
|
+
() => u.value.disabled || !!(o != null && o.disabled.value)
|
|
341
|
+
), k = s(() => (o == null ? void 0 : o.name.value) ?? u.value.name), C = s(
|
|
342
|
+
() => u.value.value === void 0 ? void 0 : String(u.value.value)
|
|
343
|
+
), T = s(() => [
|
|
344
|
+
ht(a, {
|
|
345
|
+
checked: d.value,
|
|
346
|
+
indeterminate: u.value.indeterminate,
|
|
347
|
+
disabled: y.value
|
|
348
|
+
}),
|
|
349
|
+
r.class
|
|
350
|
+
]), w = s(() => {
|
|
351
|
+
const { class: p, style: B, ...I } = r;
|
|
352
|
+
return I;
|
|
353
|
+
}), b = s(() => r.style);
|
|
354
|
+
ze(() => {
|
|
355
|
+
n.value && (n.value.indeterminate = u.value.indeterminate);
|
|
356
|
+
});
|
|
357
|
+
function g(p) {
|
|
358
|
+
p && (p.checked = d.value, p.indeterminate = u.value.indeterminate);
|
|
359
|
+
}
|
|
360
|
+
function M(p) {
|
|
361
|
+
if (y.value)
|
|
362
|
+
return;
|
|
363
|
+
const B = p.target instanceof globalThis.HTMLInputElement ? p.target : null;
|
|
364
|
+
if (o) {
|
|
365
|
+
u.value.value !== void 0 && o.toggle(u.value.value, p), j(() => g(B));
|
|
366
|
+
return;
|
|
367
|
+
}
|
|
368
|
+
const I = !d.value;
|
|
369
|
+
i.value || (c.value = I), l("update:modelValue", I), l("change", I, p), j(() => g(B));
|
|
370
|
+
}
|
|
371
|
+
function $(p) {
|
|
372
|
+
l("focus", p);
|
|
373
|
+
}
|
|
374
|
+
function m(p) {
|
|
375
|
+
l("blur", p);
|
|
376
|
+
}
|
|
377
|
+
return (p, B) => (v(), h("label", A(w.value, {
|
|
378
|
+
class: T.value,
|
|
379
|
+
style: b.value
|
|
380
|
+
}), [
|
|
381
|
+
f("input", {
|
|
382
|
+
ref_key: "inputRef",
|
|
383
|
+
ref: n,
|
|
384
|
+
class: "mu-checkbox__input",
|
|
385
|
+
type: "checkbox",
|
|
386
|
+
checked: d.value,
|
|
387
|
+
disabled: y.value,
|
|
388
|
+
name: k.value,
|
|
389
|
+
value: C.value,
|
|
390
|
+
onChange: M,
|
|
391
|
+
onFocus: $,
|
|
392
|
+
onBlur: m
|
|
393
|
+
}, null, 40, bt),
|
|
394
|
+
B[0] || (B[0] = f("span", {
|
|
395
|
+
class: "mu-checkbox__control",
|
|
396
|
+
"aria-hidden": "true"
|
|
397
|
+
}, [
|
|
398
|
+
f("svg", {
|
|
399
|
+
class: "mu-checkbox__check",
|
|
400
|
+
viewBox: "3 3 18 18",
|
|
401
|
+
fill: "none",
|
|
402
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
403
|
+
}, [
|
|
404
|
+
f("path", {
|
|
405
|
+
d: "M14.77 9.28173C15.2173 8.83447 15.9418 8.83448 16.3892 9.28173C16.8364 9.72905 16.8364 10.4536 16.3892 10.9009L11.6167 15.6743C11.1694 16.1214 10.4439 16.1215 9.99658 15.6743L7.61084 13.2876C7.16359 12.8403 7.16356 12.1148 7.61084 11.6675C8.05807 11.2206 8.78273 11.2206 9.22998 11.6675L10.8062 13.2436L14.77 9.28173Z",
|
|
406
|
+
fill: "currentColor"
|
|
407
|
+
})
|
|
408
|
+
]),
|
|
409
|
+
f("span", { class: "mu-checkbox__dash" })
|
|
410
|
+
], -1)),
|
|
411
|
+
f("span", gt, [
|
|
412
|
+
x(p.$slots, "default", {}, void 0, !0)
|
|
413
|
+
])
|
|
414
|
+
], 16));
|
|
415
|
+
}
|
|
416
|
+
}), Ct = /* @__PURE__ */ z(kt, [["__scopeId", "data-v-bf56ea83"]]), _t = /* @__PURE__ */ H({
|
|
417
|
+
inheritAttrs: !1,
|
|
418
|
+
__name: "CheckboxGroup",
|
|
419
|
+
props: {
|
|
420
|
+
modelValue: { default: void 0 },
|
|
421
|
+
defaultValue: { default: void 0 },
|
|
422
|
+
options: { default: void 0 },
|
|
423
|
+
disabled: { type: Boolean, default: !1 },
|
|
424
|
+
name: { default: void 0 },
|
|
425
|
+
direction: { default: "horizontal" }
|
|
426
|
+
},
|
|
427
|
+
emits: ["update:modelValue", "change"],
|
|
428
|
+
setup(e, { emit: t }) {
|
|
429
|
+
const a = e, l = t, r = R(), n = s(() => ye(a)), o = s(() => ft(a)), u = N([...n.value.defaultValue ?? []]), i = s(
|
|
430
|
+
() => o.value ? n.value.modelValue ?? [] : u.value
|
|
431
|
+
), c = s(() => n.value.disabled), d = s(() => n.value.name), y = s(
|
|
432
|
+
() => n.value.options ? n.value.options.map((g) => mt(g)) : null
|
|
433
|
+
), k = s(() => [pt(a), r.class]), C = s(() => {
|
|
434
|
+
const { class: g, style: M, ...$ } = r;
|
|
435
|
+
return $;
|
|
436
|
+
}), T = s(() => r.style);
|
|
437
|
+
function w(g) {
|
|
438
|
+
return we(i.value, g);
|
|
439
|
+
}
|
|
440
|
+
function b(g, M) {
|
|
441
|
+
if (n.value.disabled)
|
|
442
|
+
return;
|
|
443
|
+
const $ = vt(i.value, g);
|
|
444
|
+
o.value || (u.value = $), l("update:modelValue", $), l("change", $, M);
|
|
445
|
+
}
|
|
446
|
+
return le(Ce, {
|
|
447
|
+
value: i,
|
|
448
|
+
disabled: c,
|
|
449
|
+
name: d,
|
|
450
|
+
isChecked: w,
|
|
451
|
+
toggle: b
|
|
452
|
+
}), (g, M) => (v(), h("div", A(C.value, {
|
|
453
|
+
role: "group",
|
|
454
|
+
class: k.value,
|
|
455
|
+
style: T.value
|
|
456
|
+
}), [
|
|
457
|
+
y.value ? (v(!0), h(K, { key: 0 }, pe(y.value, ($) => (v(), E(Ct, {
|
|
458
|
+
key: `${typeof $.value}:${$.value}`,
|
|
459
|
+
value: $.value,
|
|
460
|
+
disabled: $.disabled
|
|
461
|
+
}, {
|
|
462
|
+
default: X(() => [
|
|
463
|
+
x(g.$slots, "label", { option: $ }, () => [
|
|
464
|
+
G(O($.label), 1)
|
|
465
|
+
], !0)
|
|
466
|
+
]),
|
|
467
|
+
_: 2
|
|
468
|
+
}, 1032, ["value", "disabled"]))), 128)) : x(g.$slots, "default", { key: 1 }, void 0, !0)
|
|
469
|
+
], 16));
|
|
470
|
+
}
|
|
471
|
+
}), Ja = /* @__PURE__ */ z(_t, [["__scopeId", "data-v-852a5fc4"]]), yt = 3e3, wt = {
|
|
129
472
|
close: () => {
|
|
130
473
|
}
|
|
131
|
-
},
|
|
474
|
+
}, U = Ie({
|
|
132
475
|
items: []
|
|
133
476
|
});
|
|
134
|
-
let
|
|
135
|
-
const
|
|
136
|
-
function
|
|
477
|
+
let Vt = 1;
|
|
478
|
+
const Z = /* @__PURE__ */ new Map();
|
|
479
|
+
function xt(e) {
|
|
137
480
|
return typeof e == "string" ? { title: e } : {
|
|
138
481
|
title: e.title,
|
|
139
482
|
description: e.description,
|
|
@@ -143,92 +486,92 @@ function qe(e) {
|
|
|
143
486
|
icon: e.icon
|
|
144
487
|
};
|
|
145
488
|
}
|
|
146
|
-
function
|
|
489
|
+
function re(e) {
|
|
147
490
|
return e.duration > 0;
|
|
148
491
|
}
|
|
149
|
-
function
|
|
150
|
-
return
|
|
492
|
+
function $t(e) {
|
|
493
|
+
return U.items.findIndex((t) => t.id === e);
|
|
151
494
|
}
|
|
152
|
-
function
|
|
153
|
-
return
|
|
495
|
+
function Ve(e) {
|
|
496
|
+
return U.items.find((t) => t.id === e);
|
|
154
497
|
}
|
|
155
|
-
function
|
|
156
|
-
const t =
|
|
498
|
+
function ce(e) {
|
|
499
|
+
const t = Z.get(e);
|
|
157
500
|
t && t.timer !== null && (globalThis.clearTimeout(t.timer), t.timer = null);
|
|
158
501
|
}
|
|
159
|
-
function
|
|
160
|
-
const t =
|
|
161
|
-
t < 0 || (
|
|
502
|
+
function de(e) {
|
|
503
|
+
const t = $t(e);
|
|
504
|
+
t < 0 || (ce(e), Z.delete(e), U.items.splice(t, 1));
|
|
162
505
|
}
|
|
163
|
-
function
|
|
164
|
-
const a =
|
|
165
|
-
a && (
|
|
166
|
-
|
|
506
|
+
function xe(e, t) {
|
|
507
|
+
const a = Z.get(e);
|
|
508
|
+
a && (ce(e), a.remainingDuration = t, a.deadline = Date.now() + t, a.isPaused = !1, a.timer = globalThis.setTimeout(() => {
|
|
509
|
+
de(e);
|
|
167
510
|
}, t));
|
|
168
511
|
}
|
|
169
|
-
function
|
|
512
|
+
function Bt(e, t) {
|
|
170
513
|
return {
|
|
171
|
-
id:
|
|
514
|
+
id: Vt++,
|
|
172
515
|
type: e,
|
|
173
516
|
title: t.title,
|
|
174
517
|
description: t.description,
|
|
175
|
-
duration: t.duration ??
|
|
518
|
+
duration: t.duration ?? yt,
|
|
176
519
|
closable: t.closable ?? !1,
|
|
177
520
|
resetOnHover: t.resetOnHover ?? !1,
|
|
178
521
|
icon: t.icon
|
|
179
522
|
};
|
|
180
523
|
}
|
|
181
|
-
function
|
|
524
|
+
function Tt() {
|
|
182
525
|
return typeof globalThis.window < "u" && typeof globalThis.document < "u";
|
|
183
526
|
}
|
|
184
|
-
function
|
|
185
|
-
if (!
|
|
186
|
-
return
|
|
187
|
-
const a =
|
|
188
|
-
return
|
|
527
|
+
function Mt(e, t) {
|
|
528
|
+
if (!Tt())
|
|
529
|
+
return wt;
|
|
530
|
+
const a = xt(t), l = Bt(e, a);
|
|
531
|
+
return U.items.push(l), Z.set(l.id, {
|
|
189
532
|
timer: null,
|
|
190
533
|
deadline: 0,
|
|
191
|
-
remainingDuration:
|
|
534
|
+
remainingDuration: l.duration,
|
|
192
535
|
isPaused: !1
|
|
193
|
-
}),
|
|
194
|
-
close: () =>
|
|
536
|
+
}), re(l) && xe(l.id, l.duration), {
|
|
537
|
+
close: () => de(l.id)
|
|
195
538
|
};
|
|
196
539
|
}
|
|
197
|
-
function
|
|
198
|
-
return (t) =>
|
|
540
|
+
function F(e) {
|
|
541
|
+
return (t) => Mt(e, t);
|
|
199
542
|
}
|
|
200
|
-
const
|
|
201
|
-
success:
|
|
202
|
-
warning:
|
|
203
|
-
loading:
|
|
204
|
-
error:
|
|
205
|
-
danger:
|
|
543
|
+
const Qa = {
|
|
544
|
+
success: F("success"),
|
|
545
|
+
warning: F("warning"),
|
|
546
|
+
loading: F("loading"),
|
|
547
|
+
error: F("error"),
|
|
548
|
+
danger: F("danger")
|
|
206
549
|
};
|
|
207
|
-
function
|
|
208
|
-
|
|
550
|
+
function St(e) {
|
|
551
|
+
de(e);
|
|
209
552
|
}
|
|
210
|
-
function
|
|
211
|
-
const t =
|
|
212
|
-
!t || !a || t.isPaused || !a.resetOnHover || !
|
|
553
|
+
function Lt(e) {
|
|
554
|
+
const t = Z.get(e), a = Ve(e);
|
|
555
|
+
!t || !a || t.isPaused || !a.resetOnHover || !re(a) || (t.remainingDuration = Math.max(t.deadline - Date.now(), 0), ce(e), t.isPaused = !0);
|
|
213
556
|
}
|
|
214
|
-
function
|
|
215
|
-
const t =
|
|
216
|
-
!t || !a || !t.isPaused || !a.resetOnHover || !
|
|
557
|
+
function Pt(e) {
|
|
558
|
+
const t = Z.get(e), a = Ve(e);
|
|
559
|
+
!t || !a || !t.isPaused || !a.resetOnHover || !re(a) || xe(e, t.remainingDuration || a.duration);
|
|
217
560
|
}
|
|
218
|
-
const
|
|
561
|
+
const Nt = {
|
|
219
562
|
class: "mu-message-list",
|
|
220
563
|
"aria-live": "polite",
|
|
221
564
|
"aria-atomic": "true"
|
|
222
|
-
},
|
|
565
|
+
}, Ht = ["onMouseenter", "onMouseleave"], zt = {
|
|
223
566
|
class: "mu-message__icon",
|
|
224
567
|
"aria-hidden": "true"
|
|
225
|
-
},
|
|
568
|
+
}, It = { class: "mu-message__content" }, Ot = { class: "mu-message__title" }, At = {
|
|
226
569
|
key: 0,
|
|
227
570
|
class: "mu-message__description"
|
|
228
|
-
},
|
|
571
|
+
}, Rt = ["onClick"], Dt = /* @__PURE__ */ H({
|
|
229
572
|
__name: "MessageList",
|
|
230
573
|
setup(e) {
|
|
231
|
-
const t =
|
|
574
|
+
const t = s(() => U.items), a = H({
|
|
232
575
|
name: "MarkupIcon",
|
|
233
576
|
props: {
|
|
234
577
|
markup: {
|
|
@@ -236,84 +579,84 @@ const et = {
|
|
|
236
579
|
required: !0
|
|
237
580
|
}
|
|
238
581
|
},
|
|
239
|
-
setup(
|
|
240
|
-
return () =>
|
|
582
|
+
setup(i) {
|
|
583
|
+
return () => be("span", { class: "mu-message__icon-markup", innerHTML: i.markup });
|
|
241
584
|
}
|
|
242
585
|
});
|
|
243
|
-
function
|
|
244
|
-
return typeof
|
|
586
|
+
function l(i) {
|
|
587
|
+
return typeof i != "string";
|
|
245
588
|
}
|
|
246
|
-
function r(
|
|
247
|
-
|
|
589
|
+
function r(i) {
|
|
590
|
+
Lt(i);
|
|
248
591
|
}
|
|
249
|
-
function
|
|
250
|
-
|
|
592
|
+
function n(i) {
|
|
593
|
+
Pt(i);
|
|
251
594
|
}
|
|
252
|
-
function
|
|
253
|
-
if (!(
|
|
595
|
+
function o(i) {
|
|
596
|
+
if (!(i instanceof globalThis.HTMLElement))
|
|
254
597
|
return;
|
|
255
|
-
const
|
|
256
|
-
|
|
598
|
+
const c = i.getBoundingClientRect();
|
|
599
|
+
i.style.width = `${c.width}px`, i.style.height = `${c.height}px`;
|
|
257
600
|
}
|
|
258
|
-
const
|
|
601
|
+
const u = {
|
|
259
602
|
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>',
|
|
260
603
|
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>',
|
|
261
604
|
loading: '<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 8V12" stroke="currentColor" stroke-width="2" stroke-linecap="round"/><path d="M12 12H15" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg>',
|
|
262
605
|
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>',
|
|
263
606
|
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>'
|
|
264
607
|
};
|
|
265
|
-
return (
|
|
266
|
-
|
|
608
|
+
return (i, c) => (v(), h("div", Nt, [
|
|
609
|
+
Oe(Ae, {
|
|
267
610
|
name: "mu-message-fade",
|
|
268
611
|
tag: "div",
|
|
269
612
|
class: "mu-message-list__stack",
|
|
270
|
-
onBeforeLeave:
|
|
613
|
+
onBeforeLeave: o
|
|
271
614
|
}, {
|
|
272
|
-
default:
|
|
273
|
-
(v(!0),
|
|
274
|
-
key:
|
|
275
|
-
class:
|
|
615
|
+
default: X(() => [
|
|
616
|
+
(v(!0), h(K, null, pe(t.value, (d) => (v(), h("div", {
|
|
617
|
+
key: d.id,
|
|
618
|
+
class: W(["mu-message", [`mu-message--${d.type}`, { "mu-message--compact": !d.description }]]),
|
|
276
619
|
role: "status",
|
|
277
|
-
onMouseenter: (
|
|
278
|
-
onMouseleave: (
|
|
620
|
+
onMouseenter: (y) => r(d.id),
|
|
621
|
+
onMouseleave: (y) => n(d.id)
|
|
279
622
|
}, [
|
|
280
|
-
|
|
281
|
-
|
|
623
|
+
f("span", zt, [
|
|
624
|
+
d.icon && l(d.icon) ? (v(), E(Re(d.icon), { key: 0 })) : (v(), E(D(a), {
|
|
282
625
|
key: 1,
|
|
283
|
-
markup: typeof
|
|
626
|
+
markup: typeof d.icon == "string" ? d.icon : u[d.type]
|
|
284
627
|
}, null, 8, ["markup"]))
|
|
285
628
|
]),
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
629
|
+
f("div", It, [
|
|
630
|
+
f("div", Ot, O(d.title), 1),
|
|
631
|
+
d.description ? (v(), h("p", At, O(d.description), 1)) : S("", !0)
|
|
289
632
|
]),
|
|
290
|
-
|
|
633
|
+
d.closable ? (v(), h("button", {
|
|
291
634
|
key: 0,
|
|
292
635
|
type: "button",
|
|
293
636
|
class: "mu-message__close",
|
|
294
637
|
"aria-label": "Close message",
|
|
295
|
-
onClick: (
|
|
296
|
-
}, [...
|
|
297
|
-
|
|
638
|
+
onClick: (y) => D(St)(d.id)
|
|
639
|
+
}, [...c[0] || (c[0] = [
|
|
640
|
+
f("svg", {
|
|
298
641
|
viewBox: "0 0 24 24",
|
|
299
642
|
fill: "none",
|
|
300
643
|
xmlns: "http://www.w3.org/2000/svg"
|
|
301
644
|
}, [
|
|
302
|
-
|
|
645
|
+
f("path", {
|
|
303
646
|
d: "M5 5L19 19M19 5L5 19",
|
|
304
647
|
stroke: "white",
|
|
305
648
|
"stroke-width": "1.8",
|
|
306
649
|
"stroke-linecap": "round"
|
|
307
650
|
})
|
|
308
651
|
], -1)
|
|
309
|
-
])], 8,
|
|
310
|
-
], 42,
|
|
652
|
+
])], 8, Rt)) : S("", !0)
|
|
653
|
+
], 42, Ht))), 128))
|
|
311
654
|
]),
|
|
312
655
|
_: 1
|
|
313
656
|
})
|
|
314
657
|
]));
|
|
315
658
|
}
|
|
316
|
-
}),
|
|
659
|
+
}), Ya = /* @__PURE__ */ z(Dt, [["__scopeId", "data-v-debf98d8"]]), Gt = {
|
|
317
660
|
medium: {
|
|
318
661
|
width: "548px",
|
|
319
662
|
minHeight: "228px"
|
|
@@ -323,13 +666,13 @@ const et = {
|
|
|
323
666
|
minHeight: "500px"
|
|
324
667
|
}
|
|
325
668
|
};
|
|
326
|
-
function
|
|
327
|
-
const t = e.size ?? "medium", a =
|
|
669
|
+
function fe(e = {}) {
|
|
670
|
+
const t = e.size ?? "medium", a = Gt[t], l = e.variant ?? "form";
|
|
328
671
|
return {
|
|
329
672
|
visible: e.visible ?? !1,
|
|
330
673
|
title: e.title ?? "",
|
|
331
674
|
status: e.status ?? "default",
|
|
332
|
-
variant:
|
|
675
|
+
variant: l,
|
|
333
676
|
size: t,
|
|
334
677
|
width: e.width ?? a.width,
|
|
335
678
|
minHeight: a.minHeight,
|
|
@@ -339,13 +682,13 @@ function re(e = {}) {
|
|
|
339
682
|
okText: e.okText ?? "Confirm",
|
|
340
683
|
cancelText: e.cancelText ?? "Cancel",
|
|
341
684
|
// feedback 形态默认隐藏 cancel;显式传值仍优先
|
|
342
|
-
hideCancel: e.hideCancel ??
|
|
685
|
+
hideCancel: e.hideCancel ?? l === "feedback",
|
|
343
686
|
hideOk: e.hideOk ?? !1,
|
|
344
687
|
okLoading: e.okLoading ?? !1
|
|
345
688
|
};
|
|
346
689
|
}
|
|
347
|
-
function
|
|
348
|
-
const t =
|
|
690
|
+
function Et(e = {}) {
|
|
691
|
+
const t = fe(e), a = [
|
|
349
692
|
"mu-modal",
|
|
350
693
|
`mu-modal--${t.size}`,
|
|
351
694
|
`mu-modal--${t.status}`,
|
|
@@ -353,8 +696,8 @@ function rt(e = {}) {
|
|
|
353
696
|
];
|
|
354
697
|
return t.variant === "feedback" && a.push("mu-modal--feedback"), a;
|
|
355
698
|
}
|
|
356
|
-
function
|
|
357
|
-
const t =
|
|
699
|
+
function jt(e = {}) {
|
|
700
|
+
const t = fe(e);
|
|
358
701
|
return t.variant === "feedback" ? {
|
|
359
702
|
type: "secondary",
|
|
360
703
|
status: t.status === "default" ? void 0 : t.status
|
|
@@ -365,13 +708,13 @@ function ct(e = {}) {
|
|
|
365
708
|
type: "primary"
|
|
366
709
|
};
|
|
367
710
|
}
|
|
368
|
-
const
|
|
711
|
+
const Zt = {
|
|
369
712
|
key: 0,
|
|
370
713
|
class: "mu-modal-root"
|
|
371
|
-
},
|
|
714
|
+
}, Ft = { class: "mu-modal__header" }, Ut = ["data-status"], qt = { class: "mu-modal__body" }, Kt = {
|
|
372
715
|
key: 0,
|
|
373
716
|
class: "mu-modal__footer"
|
|
374
|
-
},
|
|
717
|
+
}, Xt = /* @__PURE__ */ H({
|
|
375
718
|
inheritAttrs: !1,
|
|
376
719
|
__name: "Modal",
|
|
377
720
|
props: {
|
|
@@ -392,92 +735,92 @@ const dt = {
|
|
|
392
735
|
},
|
|
393
736
|
emits: ["update:visible", "ok", "cancel", "close"],
|
|
394
737
|
setup(e, { emit: t }) {
|
|
395
|
-
const a = e,
|
|
396
|
-
const { class:
|
|
397
|
-
return
|
|
398
|
-
}),
|
|
399
|
-
() =>
|
|
400
|
-
),
|
|
738
|
+
const a = e, l = t, r = R(), n = s(() => fe(a)), o = s(() => [Et(a), r.class]), u = s(() => {
|
|
739
|
+
const { class: m, style: p, ...B } = r;
|
|
740
|
+
return B;
|
|
741
|
+
}), i = s(() => jt(a)), c = s(
|
|
742
|
+
() => n.value.variant === "feedback" && n.value.hideCancel
|
|
743
|
+
), d = s(() => [
|
|
401
744
|
{
|
|
402
|
-
width:
|
|
403
|
-
minHeight:
|
|
745
|
+
width: n.value.width,
|
|
746
|
+
minHeight: n.value.minHeight
|
|
404
747
|
},
|
|
405
748
|
r.style
|
|
406
|
-
]),
|
|
407
|
-
function
|
|
408
|
-
|
|
749
|
+
]), y = `mu-modal-title-${Math.random().toString(36).slice(2, 10)}`, C = typeof globalThis.document < "u" ? globalThis.document : null;
|
|
750
|
+
function T() {
|
|
751
|
+
l("update:visible", !1);
|
|
409
752
|
}
|
|
410
|
-
function
|
|
411
|
-
|
|
753
|
+
function w() {
|
|
754
|
+
n.value.maskClosable && (T(), l("cancel", new globalThis.MouseEvent("click")));
|
|
412
755
|
}
|
|
413
|
-
function
|
|
414
|
-
|
|
756
|
+
function b() {
|
|
757
|
+
T(), l("close");
|
|
415
758
|
}
|
|
416
|
-
function
|
|
417
|
-
|
|
759
|
+
function g(m) {
|
|
760
|
+
l("cancel", m), T();
|
|
418
761
|
}
|
|
419
|
-
function
|
|
420
|
-
|
|
762
|
+
function M(m) {
|
|
763
|
+
l("ok", m);
|
|
421
764
|
}
|
|
422
|
-
function
|
|
423
|
-
|
|
765
|
+
function $(m) {
|
|
766
|
+
m.key !== "Escape" || !n.value.visible || !n.value.escToClose || (T(), l("close"));
|
|
424
767
|
}
|
|
425
|
-
return
|
|
426
|
-
|
|
427
|
-
}),
|
|
428
|
-
|
|
429
|
-
}),
|
|
430
|
-
() =>
|
|
431
|
-
(
|
|
432
|
-
|
|
768
|
+
return ne(() => {
|
|
769
|
+
C && C.addEventListener("keydown", $);
|
|
770
|
+
}), oe(() => {
|
|
771
|
+
C && (C.removeEventListener("keydown", $), C.body.style.overflow = "");
|
|
772
|
+
}), ue(
|
|
773
|
+
() => n.value.visible,
|
|
774
|
+
(m) => {
|
|
775
|
+
C && (C.body.style.overflow = m ? "hidden" : "");
|
|
433
776
|
},
|
|
434
777
|
{ immediate: !0 }
|
|
435
|
-
), (
|
|
436
|
-
|
|
437
|
-
|
|
778
|
+
), (m, p) => (v(), E(De, { to: "body" }, [
|
|
779
|
+
n.value.visible ? (v(), h("div", Zt, [
|
|
780
|
+
f("div", {
|
|
438
781
|
class: "mu-modal__mask",
|
|
439
|
-
onClick:
|
|
782
|
+
onClick: w
|
|
440
783
|
}),
|
|
441
|
-
|
|
442
|
-
class:
|
|
443
|
-
style:
|
|
784
|
+
f("div", A(u.value, {
|
|
785
|
+
class: o.value,
|
|
786
|
+
style: d.value,
|
|
444
787
|
role: "dialog",
|
|
445
788
|
"aria-modal": "true",
|
|
446
|
-
"aria-labelledby":
|
|
789
|
+
"aria-labelledby": y
|
|
447
790
|
}), [
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
id:
|
|
791
|
+
f("header", Ft, [
|
|
792
|
+
f("div", {
|
|
793
|
+
id: y,
|
|
451
794
|
class: "mu-modal__title",
|
|
452
|
-
"data-status":
|
|
795
|
+
"data-status": n.value.status
|
|
453
796
|
}, [
|
|
454
|
-
|
|
455
|
-
|
|
797
|
+
x(m.$slots, "title", {}, () => [
|
|
798
|
+
G(O(n.value.title), 1)
|
|
456
799
|
], !0)
|
|
457
|
-
], 8,
|
|
458
|
-
|
|
800
|
+
], 8, Ut),
|
|
801
|
+
n.value.closable ? (v(), h("button", {
|
|
459
802
|
key: 0,
|
|
460
803
|
type: "button",
|
|
461
804
|
class: "mu-modal__close",
|
|
462
805
|
"aria-label": "Close dialog",
|
|
463
|
-
onClick:
|
|
464
|
-
}, [...
|
|
465
|
-
|
|
806
|
+
onClick: b
|
|
807
|
+
}, [...p[0] || (p[0] = [
|
|
808
|
+
f("span", {
|
|
466
809
|
class: "mu-modal__close-icon",
|
|
467
810
|
"aria-hidden": "true"
|
|
468
811
|
}, [
|
|
469
|
-
|
|
812
|
+
f("svg", {
|
|
470
813
|
viewBox: "0 0 20 20",
|
|
471
814
|
fill: "none",
|
|
472
815
|
xmlns: "http://www.w3.org/2000/svg"
|
|
473
816
|
}, [
|
|
474
|
-
|
|
817
|
+
f("path", {
|
|
475
818
|
d: "M5 5L15 15",
|
|
476
819
|
stroke: "currentColor",
|
|
477
820
|
"stroke-width": "1.8",
|
|
478
821
|
"stroke-linecap": "round"
|
|
479
822
|
}),
|
|
480
|
-
|
|
823
|
+
f("path", {
|
|
481
824
|
d: "M15 5L5 15",
|
|
482
825
|
stroke: "currentColor",
|
|
483
826
|
"stroke-width": "1.8",
|
|
@@ -487,29 +830,29 @@ const dt = {
|
|
|
487
830
|
], -1)
|
|
488
831
|
])])) : S("", !0)
|
|
489
832
|
]),
|
|
490
|
-
|
|
491
|
-
|
|
833
|
+
f("div", qt, [
|
|
834
|
+
x(m.$slots, "default", {}, void 0, !0)
|
|
492
835
|
]),
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
836
|
+
m.$slots.footer || !n.value.hideOk || !n.value.hideCancel ? (v(), h("footer", Kt, [
|
|
837
|
+
x(m.$slots, "footer", {}, () => [
|
|
838
|
+
n.value.hideCancel ? S("", !0) : (v(), E(D(me), {
|
|
496
839
|
key: 0,
|
|
497
840
|
type: "ghost",
|
|
498
841
|
class: "mu-modal__cancel",
|
|
499
|
-
onClick:
|
|
842
|
+
onClick: g
|
|
500
843
|
}, {
|
|
501
|
-
default:
|
|
502
|
-
|
|
844
|
+
default: X(() => [
|
|
845
|
+
G(O(n.value.cancelText), 1)
|
|
503
846
|
]),
|
|
504
847
|
_: 1
|
|
505
848
|
})),
|
|
506
|
-
|
|
507
|
-
loading:
|
|
508
|
-
class: ["mu-modal__ok", { "mu-modal__ok--block":
|
|
509
|
-
onClick:
|
|
849
|
+
n.value.hideOk ? S("", !0) : (v(), E(D(me), A({ key: 1 }, i.value, {
|
|
850
|
+
loading: n.value.okLoading,
|
|
851
|
+
class: ["mu-modal__ok", { "mu-modal__ok--block": c.value }],
|
|
852
|
+
onClick: M
|
|
510
853
|
}), {
|
|
511
|
-
default:
|
|
512
|
-
|
|
854
|
+
default: X(() => [
|
|
855
|
+
G(O(n.value.okText), 1)
|
|
513
856
|
]),
|
|
514
857
|
_: 1
|
|
515
858
|
}, 16, ["loading", "class"]))
|
|
@@ -519,46 +862,46 @@ const dt = {
|
|
|
519
862
|
])) : S("", !0)
|
|
520
863
|
]));
|
|
521
864
|
}
|
|
522
|
-
}),
|
|
523
|
-
function
|
|
865
|
+
}), Wt = /* @__PURE__ */ z(Xt, [["__scopeId", "data-v-e94991b0"]]);
|
|
866
|
+
function Jt(e) {
|
|
524
867
|
return e === void 0 ? null : typeof e == "function" ? e() : e;
|
|
525
868
|
}
|
|
526
869
|
function q(e = {}) {
|
|
527
870
|
return typeof globalThis.document > "u" ? Promise.resolve(!1) : new Promise((t) => {
|
|
528
871
|
const a = globalThis.document.createElement("div");
|
|
529
872
|
globalThis.document.body.appendChild(a);
|
|
530
|
-
const
|
|
531
|
-
let r = null,
|
|
532
|
-
const
|
|
873
|
+
const l = N(!0);
|
|
874
|
+
let r = null, n = !1;
|
|
875
|
+
const o = () => {
|
|
533
876
|
r && (r.unmount(), r = null), a.parentNode && a.parentNode.removeChild(a);
|
|
534
|
-
},
|
|
535
|
-
|
|
536
|
-
|
|
877
|
+
}, u = (d) => {
|
|
878
|
+
n || (n = !0, l.value = !1, queueMicrotask(() => {
|
|
879
|
+
o(), t(d);
|
|
537
880
|
}));
|
|
538
|
-
}, { content:
|
|
539
|
-
r =
|
|
881
|
+
}, { content: i, ...c } = e;
|
|
882
|
+
r = Ge({
|
|
540
883
|
render() {
|
|
541
|
-
return
|
|
542
|
-
|
|
884
|
+
return be(
|
|
885
|
+
Wt,
|
|
543
886
|
{
|
|
544
|
-
...
|
|
545
|
-
visible:
|
|
546
|
-
"onUpdate:visible": (
|
|
547
|
-
|
|
887
|
+
...c,
|
|
888
|
+
visible: l.value,
|
|
889
|
+
"onUpdate:visible": (d) => {
|
|
890
|
+
d || u(!1);
|
|
548
891
|
},
|
|
549
|
-
onOk: () =>
|
|
550
|
-
onCancel: () =>
|
|
551
|
-
onClose: () =>
|
|
892
|
+
onOk: () => u(!0),
|
|
893
|
+
onCancel: () => u(!1),
|
|
894
|
+
onClose: () => u(!1)
|
|
552
895
|
},
|
|
553
896
|
{
|
|
554
|
-
default: () =>
|
|
897
|
+
default: () => Jt(i)
|
|
555
898
|
}
|
|
556
899
|
);
|
|
557
900
|
}
|
|
558
901
|
}), r.mount(a);
|
|
559
902
|
});
|
|
560
903
|
}
|
|
561
|
-
const
|
|
904
|
+
const es = {
|
|
562
905
|
/** 通用版本,透传所有 props,默认 variant='form'。 */
|
|
563
906
|
show: q,
|
|
564
907
|
/** 通用确认弹窗,等价于 show,使用 form 形态 + 自定义 status。 */
|
|
@@ -567,14 +910,14 @@ const ka = {
|
|
|
567
910
|
success: (e = {}) => q({ ...e, variant: "feedback", status: "success" }),
|
|
568
911
|
/** 反馈形态 + status='danger'。 */
|
|
569
912
|
danger: (e = {}) => q({ ...e, variant: "feedback", status: "danger" })
|
|
570
|
-
},
|
|
571
|
-
function
|
|
913
|
+
}, $e = Symbol("MuRadioGroup"), Qt = ["horizontal", "vertical"];
|
|
914
|
+
function Yt(e, t) {
|
|
572
915
|
return typeof t == "string" && e.includes(t);
|
|
573
916
|
}
|
|
574
|
-
function
|
|
575
|
-
return
|
|
917
|
+
function ea(e) {
|
|
918
|
+
return Yt(Qt, e);
|
|
576
919
|
}
|
|
577
|
-
function
|
|
920
|
+
function Be(e = {}) {
|
|
578
921
|
return {
|
|
579
922
|
modelValue: e.modelValue,
|
|
580
923
|
value: e.value ?? !0,
|
|
@@ -583,33 +926,33 @@ function ke(e = {}) {
|
|
|
583
926
|
name: e.name
|
|
584
927
|
};
|
|
585
928
|
}
|
|
586
|
-
function
|
|
929
|
+
function Te(e = {}) {
|
|
587
930
|
return {
|
|
588
931
|
modelValue: e.modelValue,
|
|
589
932
|
defaultValue: e.defaultValue,
|
|
590
933
|
disabled: e.disabled ?? !1,
|
|
591
934
|
name: e.name,
|
|
592
|
-
direction:
|
|
935
|
+
direction: ea(e.direction) ? e.direction : "horizontal"
|
|
593
936
|
};
|
|
594
937
|
}
|
|
595
|
-
function
|
|
938
|
+
function ta(e = {}) {
|
|
596
939
|
return e.modelValue !== void 0;
|
|
597
940
|
}
|
|
598
|
-
function
|
|
941
|
+
function aa(e = {}) {
|
|
599
942
|
return e.modelValue !== void 0;
|
|
600
943
|
}
|
|
601
|
-
function
|
|
944
|
+
function te(e, t) {
|
|
602
945
|
return Object.is(e, t);
|
|
603
946
|
}
|
|
604
|
-
function
|
|
605
|
-
const a =
|
|
606
|
-
return t.checked &&
|
|
947
|
+
function sa(e = {}, t = {}) {
|
|
948
|
+
const a = Be(e), l = ["mu-radio"];
|
|
949
|
+
return t.checked && l.push("is-checked"), (t.disabled || a.disabled) && l.push("is-disabled"), l;
|
|
607
950
|
}
|
|
608
|
-
function
|
|
609
|
-
const t =
|
|
951
|
+
function la(e = {}) {
|
|
952
|
+
const t = Te(e), a = ["mu-radio-group", `mu-radio-group--${t.direction}`];
|
|
610
953
|
return t.disabled && a.push("is-disabled"), a;
|
|
611
954
|
}
|
|
612
|
-
const
|
|
955
|
+
const na = ["checked", "disabled", "name", "value"], oa = { class: "mu-radio__label" }, ua = /* @__PURE__ */ H({
|
|
613
956
|
inheritAttrs: !1,
|
|
614
957
|
__name: "Radio",
|
|
615
958
|
props: {
|
|
@@ -621,68 +964,68 @@ const $t = ["checked", "disabled", "name", "value"], Vt = { class: "mu-radio__la
|
|
|
621
964
|
},
|
|
622
965
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
623
966
|
setup(e, { emit: t }) {
|
|
624
|
-
const a = e,
|
|
625
|
-
() =>
|
|
626
|
-
),
|
|
627
|
-
|
|
628
|
-
checked:
|
|
629
|
-
disabled:
|
|
967
|
+
const a = e, l = t, r = R(), n = se($e, null), o = s(() => Be(a)), u = s(() => ta(a)), i = N(o.value.defaultChecked), c = s(() => n ? te(n.value.value, o.value.value) : u.value ? te(o.value.modelValue, o.value.value) : i.value), d = s(
|
|
968
|
+
() => o.value.disabled || !!(n != null && n.disabled.value)
|
|
969
|
+
), y = s(() => (n == null ? void 0 : n.name.value) ?? o.value.name), k = s(() => String(o.value.value)), C = s(() => [
|
|
970
|
+
sa(a, {
|
|
971
|
+
checked: c.value,
|
|
972
|
+
disabled: d.value
|
|
630
973
|
}),
|
|
631
974
|
r.class
|
|
632
|
-
]),
|
|
633
|
-
const { class:
|
|
634
|
-
return
|
|
635
|
-
}),
|
|
636
|
-
function
|
|
637
|
-
|
|
975
|
+
]), T = s(() => {
|
|
976
|
+
const { class: m, style: p, ...B } = r;
|
|
977
|
+
return B;
|
|
978
|
+
}), w = s(() => r.style);
|
|
979
|
+
function b(m, p) {
|
|
980
|
+
u.value || (i.value = !0), l("update:modelValue", m), l("change", m, p);
|
|
638
981
|
}
|
|
639
|
-
function
|
|
640
|
-
if (
|
|
982
|
+
function g(m) {
|
|
983
|
+
if (d.value)
|
|
641
984
|
return;
|
|
642
|
-
const
|
|
643
|
-
if (
|
|
644
|
-
|
|
645
|
-
|
|
985
|
+
const p = o.value.value, B = m.target instanceof globalThis.HTMLInputElement ? m.target : null;
|
|
986
|
+
if (n) {
|
|
987
|
+
n.select(p, m), j(() => {
|
|
988
|
+
B && (B.checked = c.value);
|
|
646
989
|
});
|
|
647
990
|
return;
|
|
648
991
|
}
|
|
649
|
-
|
|
650
|
-
|
|
992
|
+
b(p, m), j(() => {
|
|
993
|
+
B && (B.checked = c.value);
|
|
651
994
|
});
|
|
652
995
|
}
|
|
653
|
-
function
|
|
654
|
-
|
|
996
|
+
function M(m) {
|
|
997
|
+
l("focus", m);
|
|
655
998
|
}
|
|
656
|
-
function
|
|
657
|
-
|
|
999
|
+
function $(m) {
|
|
1000
|
+
l("blur", m);
|
|
658
1001
|
}
|
|
659
|
-
return (
|
|
660
|
-
class:
|
|
661
|
-
style:
|
|
1002
|
+
return (m, p) => (v(), h("label", A(T.value, {
|
|
1003
|
+
class: C.value,
|
|
1004
|
+
style: w.value
|
|
662
1005
|
}), [
|
|
663
|
-
|
|
1006
|
+
f("input", {
|
|
664
1007
|
class: "mu-radio__input",
|
|
665
1008
|
type: "radio",
|
|
666
|
-
checked:
|
|
667
|
-
disabled:
|
|
668
|
-
name:
|
|
669
|
-
value:
|
|
670
|
-
onChange:
|
|
671
|
-
onFocus:
|
|
672
|
-
onBlur:
|
|
673
|
-
}, null, 40,
|
|
674
|
-
|
|
1009
|
+
checked: c.value,
|
|
1010
|
+
disabled: d.value,
|
|
1011
|
+
name: y.value,
|
|
1012
|
+
value: k.value,
|
|
1013
|
+
onChange: g,
|
|
1014
|
+
onFocus: M,
|
|
1015
|
+
onBlur: $
|
|
1016
|
+
}, null, 40, na),
|
|
1017
|
+
p[0] || (p[0] = f("span", {
|
|
675
1018
|
class: "mu-radio__control",
|
|
676
1019
|
"aria-hidden": "true"
|
|
677
1020
|
}, [
|
|
678
|
-
|
|
1021
|
+
f("span", { class: "mu-radio__dot" })
|
|
679
1022
|
], -1)),
|
|
680
|
-
|
|
681
|
-
|
|
1023
|
+
f("span", oa, [
|
|
1024
|
+
x(m.$slots, "default", {}, void 0, !0)
|
|
682
1025
|
])
|
|
683
1026
|
], 16));
|
|
684
1027
|
}
|
|
685
|
-
}),
|
|
1028
|
+
}), ts = /* @__PURE__ */ z(ua, [["__scopeId", "data-v-f1283749"]]), ia = /* @__PURE__ */ H({
|
|
686
1029
|
inheritAttrs: !1,
|
|
687
1030
|
__name: "RadioGroup",
|
|
688
1031
|
props: {
|
|
@@ -694,46 +1037,46 @@ const $t = ["checked", "disabled", "name", "value"], Vt = { class: "mu-radio__la
|
|
|
694
1037
|
},
|
|
695
1038
|
emits: ["update:modelValue", "change"],
|
|
696
1039
|
setup(e, { emit: t }) {
|
|
697
|
-
const a = e,
|
|
698
|
-
() =>
|
|
699
|
-
),
|
|
700
|
-
const { class:
|
|
701
|
-
return
|
|
702
|
-
}),
|
|
703
|
-
function
|
|
704
|
-
|
|
1040
|
+
const a = e, l = t, r = R(), n = s(() => Te(a)), o = s(() => aa(a)), u = N(n.value.defaultValue), i = s(
|
|
1041
|
+
() => o.value ? n.value.modelValue : u.value
|
|
1042
|
+
), c = s(() => n.value.disabled), d = s(() => n.value.name), y = s(() => [la(a), r.class]), k = s(() => {
|
|
1043
|
+
const { class: w, style: b, ...g } = r;
|
|
1044
|
+
return g;
|
|
1045
|
+
}), C = s(() => r.style);
|
|
1046
|
+
function T(w, b) {
|
|
1047
|
+
n.value.disabled || te(i.value, w) || (o.value || (u.value = w), l("update:modelValue", w), l("change", w, b));
|
|
705
1048
|
}
|
|
706
|
-
return
|
|
707
|
-
value:
|
|
708
|
-
disabled:
|
|
709
|
-
name:
|
|
710
|
-
select:
|
|
711
|
-
}), (
|
|
1049
|
+
return le($e, {
|
|
1050
|
+
value: i,
|
|
1051
|
+
disabled: c,
|
|
1052
|
+
name: d,
|
|
1053
|
+
select: T
|
|
1054
|
+
}), (w, b) => (v(), h("div", A(k.value, {
|
|
712
1055
|
role: "radiogroup",
|
|
713
|
-
class:
|
|
714
|
-
style:
|
|
1056
|
+
class: y.value,
|
|
1057
|
+
style: C.value
|
|
715
1058
|
}), [
|
|
716
|
-
w
|
|
1059
|
+
x(w.$slots, "default", {}, void 0, !0)
|
|
717
1060
|
], 16));
|
|
718
1061
|
}
|
|
719
|
-
}),
|
|
720
|
-
function
|
|
1062
|
+
}), as = /* @__PURE__ */ z(ia, [["__scopeId", "data-v-3879fec4"]]), ra = ["circle", "round", "line"], ca = ["small", "medium"];
|
|
1063
|
+
function Me(e, t) {
|
|
721
1064
|
return typeof t == "string" && e.includes(t);
|
|
722
1065
|
}
|
|
723
|
-
function
|
|
724
|
-
return
|
|
1066
|
+
function da(e) {
|
|
1067
|
+
return Me(ra, e);
|
|
725
1068
|
}
|
|
726
|
-
function
|
|
727
|
-
return
|
|
1069
|
+
function fa(e) {
|
|
1070
|
+
return Me(ca, e);
|
|
728
1071
|
}
|
|
729
|
-
function
|
|
1072
|
+
function ae(e = {}) {
|
|
730
1073
|
return {
|
|
731
1074
|
modelValue: e.modelValue,
|
|
732
1075
|
defaultChecked: e.defaultChecked ?? !1,
|
|
733
1076
|
disabled: e.disabled ?? !1,
|
|
734
1077
|
loading: e.loading ?? !1,
|
|
735
|
-
type:
|
|
736
|
-
size:
|
|
1078
|
+
type: da(e.type) ? e.type : "circle",
|
|
1079
|
+
size: fa(e.size) ? e.size : "medium",
|
|
737
1080
|
checkedValue: e.checkedValue ?? !0,
|
|
738
1081
|
uncheckedValue: e.uncheckedValue ?? !1,
|
|
739
1082
|
checkedColor: e.checkedColor,
|
|
@@ -743,35 +1086,35 @@ function ee(e = {}) {
|
|
|
743
1086
|
uncheckedText: e.uncheckedText
|
|
744
1087
|
};
|
|
745
1088
|
}
|
|
746
|
-
function
|
|
1089
|
+
function va(e = {}) {
|
|
747
1090
|
return e.modelValue !== void 0;
|
|
748
1091
|
}
|
|
749
|
-
function
|
|
1092
|
+
function Se(e, t) {
|
|
750
1093
|
return Object.is(e, t.checkedValue);
|
|
751
1094
|
}
|
|
752
|
-
function
|
|
753
|
-
return
|
|
1095
|
+
function ma(e, t) {
|
|
1096
|
+
return Se(e, t) ? t.uncheckedValue : t.checkedValue;
|
|
754
1097
|
}
|
|
755
|
-
function
|
|
1098
|
+
function ha(e) {
|
|
756
1099
|
return e.type !== "line" && e.size !== "small";
|
|
757
1100
|
}
|
|
758
|
-
function
|
|
759
|
-
const a =
|
|
760
|
-
return t.checked &&
|
|
1101
|
+
function pa(e = {}, t = {}) {
|
|
1102
|
+
const a = ae(e), l = ["mu-switch", `mu-switch--${a.type}`, `mu-switch--${a.size}`];
|
|
1103
|
+
return t.checked && l.push("is-checked"), a.disabled && l.push("is-disabled"), (a.loading || t.loading) && l.push("is-loading"), l;
|
|
761
1104
|
}
|
|
762
|
-
const
|
|
1105
|
+
const ba = ["aria-checked", "disabled"], ga = {
|
|
763
1106
|
class: "mu-switch__thumb",
|
|
764
1107
|
"aria-hidden": "true"
|
|
765
|
-
},
|
|
1108
|
+
}, ka = {
|
|
766
1109
|
key: 0,
|
|
767
1110
|
class: "mu-switch__loading-icon",
|
|
768
1111
|
viewBox: "0 0 16 16",
|
|
769
1112
|
fill: "none",
|
|
770
1113
|
xmlns: "http://www.w3.org/2000/svg"
|
|
771
|
-
},
|
|
1114
|
+
}, Ca = {
|
|
772
1115
|
key: 0,
|
|
773
1116
|
class: "mu-switch__label"
|
|
774
|
-
},
|
|
1117
|
+
}, _a = /* @__PURE__ */ H({
|
|
775
1118
|
inheritAttrs: !1,
|
|
776
1119
|
__name: "Switch",
|
|
777
1120
|
props: {
|
|
@@ -791,136 +1134,136 @@ const Rt = ["aria-checked", "disabled"], Dt = {
|
|
|
791
1134
|
},
|
|
792
1135
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
793
1136
|
setup(e, { emit: t }) {
|
|
794
|
-
const a = e,
|
|
795
|
-
|
|
796
|
-
),
|
|
797
|
-
() =>
|
|
798
|
-
),
|
|
799
|
-
|
|
800
|
-
checked:
|
|
801
|
-
loading:
|
|
1137
|
+
const a = e, l = t, r = R(), n = J(), o = N(!1), u = ae(a), i = N(
|
|
1138
|
+
u.defaultChecked ? u.checkedValue : u.uncheckedValue
|
|
1139
|
+
), c = s(() => ae(a)), d = s(() => va(a)), y = s(
|
|
1140
|
+
() => d.value ? c.value.modelValue : i.value
|
|
1141
|
+
), k = s(() => Se(y.value, c.value)), C = s(() => c.value.loading || o.value), T = s(() => ha(c.value)), w = s(() => T.value ? k.value ? !!(n.checked || c.value.checkedText) : !!(n.unchecked || c.value.uncheckedText) : !1), b = s(() => [
|
|
1142
|
+
pa(a, {
|
|
1143
|
+
checked: k.value,
|
|
1144
|
+
loading: o.value
|
|
802
1145
|
}),
|
|
803
1146
|
{
|
|
804
|
-
"has-label":
|
|
1147
|
+
"has-label": w.value
|
|
805
1148
|
},
|
|
806
1149
|
r.class
|
|
807
|
-
]),
|
|
808
|
-
const { class:
|
|
809
|
-
return
|
|
810
|
-
}),
|
|
811
|
-
const
|
|
812
|
-
return
|
|
1150
|
+
]), g = s(() => {
|
|
1151
|
+
const { class: _, style: L, type: V, ...P } = r;
|
|
1152
|
+
return P;
|
|
1153
|
+
}), M = s(() => {
|
|
1154
|
+
const _ = {};
|
|
1155
|
+
return c.value.checkedColor && (_["--mu-switch-current-checked-bg"] = c.value.checkedColor, _["--mu-switch-current-checked-border"] = c.value.checkedColor, _["--mu-switch-current-checked-thumb"] = c.value.checkedColor, _["--mu-switch-current-checked-glow"] = `0 0 12px ${c.value.checkedColor}`), c.value.uncheckedColor && (_["--mu-switch-current-unchecked-bg"] = c.value.uncheckedColor), [_, r.style];
|
|
813
1156
|
});
|
|
814
|
-
function
|
|
1157
|
+
function $() {
|
|
815
1158
|
}
|
|
816
|
-
function
|
|
817
|
-
const
|
|
818
|
-
if (!
|
|
1159
|
+
function m(_) {
|
|
1160
|
+
const L = c.value.beforeChange;
|
|
1161
|
+
if (!L)
|
|
819
1162
|
return !0;
|
|
820
1163
|
try {
|
|
821
|
-
const
|
|
822
|
-
return
|
|
1164
|
+
const V = L(_);
|
|
1165
|
+
return V instanceof Promise ? (o.value = !0, V.then((P) => P !== !1).catch(() => !1)) : V !== !1;
|
|
823
1166
|
} catch {
|
|
824
1167
|
return !1;
|
|
825
1168
|
}
|
|
826
1169
|
}
|
|
827
|
-
function
|
|
828
|
-
|
|
1170
|
+
function p(_, L) {
|
|
1171
|
+
d.value || (i.value = _), l("update:modelValue", _), l("change", _, L);
|
|
829
1172
|
}
|
|
830
|
-
function
|
|
831
|
-
if (
|
|
1173
|
+
function B(_) {
|
|
1174
|
+
if (c.value.disabled || C.value)
|
|
832
1175
|
return;
|
|
833
|
-
const
|
|
834
|
-
if (
|
|
835
|
-
|
|
836
|
-
|
|
1176
|
+
const L = ma(y.value, c.value), V = m(L);
|
|
1177
|
+
if (V instanceof Promise) {
|
|
1178
|
+
V.then((P) => {
|
|
1179
|
+
P && p(L, _);
|
|
837
1180
|
}).finally(() => {
|
|
838
|
-
|
|
1181
|
+
o.value = !1;
|
|
839
1182
|
});
|
|
840
1183
|
return;
|
|
841
1184
|
}
|
|
842
|
-
|
|
1185
|
+
V && p(L, _);
|
|
843
1186
|
}
|
|
844
|
-
function
|
|
845
|
-
|
|
1187
|
+
function I(_) {
|
|
1188
|
+
l("focus", _);
|
|
846
1189
|
}
|
|
847
|
-
function
|
|
848
|
-
|
|
1190
|
+
function Y(_) {
|
|
1191
|
+
l("blur", _);
|
|
849
1192
|
}
|
|
850
|
-
return (
|
|
1193
|
+
return (_, L) => (v(), h("button", A(g.value, {
|
|
851
1194
|
type: "button",
|
|
852
1195
|
role: "switch",
|
|
853
|
-
class:
|
|
854
|
-
style:
|
|
855
|
-
"aria-checked":
|
|
856
|
-
disabled:
|
|
857
|
-
onClick:
|
|
858
|
-
onFocus:
|
|
859
|
-
onBlur:
|
|
1196
|
+
class: b.value,
|
|
1197
|
+
style: M.value,
|
|
1198
|
+
"aria-checked": k.value ? "true" : "false",
|
|
1199
|
+
disabled: c.value.disabled || C.value,
|
|
1200
|
+
onClick: B,
|
|
1201
|
+
onFocus: I,
|
|
1202
|
+
onBlur: Y
|
|
860
1203
|
}), [
|
|
861
|
-
|
|
1204
|
+
L[1] || (L[1] = f("span", {
|
|
862
1205
|
class: "mu-switch__line-track",
|
|
863
1206
|
"aria-hidden": "true"
|
|
864
1207
|
}, null, -1)),
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
1208
|
+
f("span", ga, [
|
|
1209
|
+
C.value ? (v(), h("svg", ka, [...L[0] || (L[0] = [
|
|
1210
|
+
f("path", {
|
|
868
1211
|
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",
|
|
869
1212
|
fill: "currentColor"
|
|
870
1213
|
}, null, -1)
|
|
871
|
-
])])) :
|
|
1214
|
+
])])) : k.value ? x(_.$slots, "checked-icon", { key: 1 }, void 0, !0) : x(_.$slots, "unchecked-icon", { key: 2 }, void 0, !0)
|
|
872
1215
|
]),
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
], !0) :
|
|
877
|
-
|
|
1216
|
+
w.value ? (v(), h("span", Ca, [
|
|
1217
|
+
k.value ? x(_.$slots, "checked", { key: 0 }, () => [
|
|
1218
|
+
G(O(c.value.checkedText), 1)
|
|
1219
|
+
], !0) : x(_.$slots, "unchecked", { key: 1 }, () => [
|
|
1220
|
+
G(O(c.value.uncheckedText), 1)
|
|
878
1221
|
], !0)
|
|
879
1222
|
])) : S("", !0)
|
|
880
|
-
], 16,
|
|
1223
|
+
], 16, ba));
|
|
881
1224
|
}
|
|
882
|
-
}),
|
|
883
|
-
function
|
|
1225
|
+
}), ss = /* @__PURE__ */ z(_a, [["__scopeId", "data-v-8cfb8f2a"]]), Le = Symbol("MuTabs"), ya = ["line", "segment"], wa = ["small", "medium", "large"], Va = ["white", "ghost"], xa = ["content", "equal"];
|
|
1226
|
+
function Q(e, t) {
|
|
884
1227
|
return typeof t == "string" && e.includes(t);
|
|
885
1228
|
}
|
|
886
|
-
function
|
|
887
|
-
return
|
|
1229
|
+
function $a(e) {
|
|
1230
|
+
return Q(ya, e);
|
|
888
1231
|
}
|
|
889
|
-
function
|
|
890
|
-
return
|
|
1232
|
+
function Ba(e) {
|
|
1233
|
+
return Q(wa, e);
|
|
891
1234
|
}
|
|
892
|
-
function
|
|
893
|
-
return
|
|
1235
|
+
function Ta(e) {
|
|
1236
|
+
return Q(Va, e);
|
|
894
1237
|
}
|
|
895
|
-
function
|
|
896
|
-
return
|
|
1238
|
+
function Ma(e) {
|
|
1239
|
+
return Q(xa, e);
|
|
897
1240
|
}
|
|
898
|
-
function
|
|
899
|
-
const t = e, a =
|
|
1241
|
+
function Pe(e = {}) {
|
|
1242
|
+
const t = e, a = $a(t.variant) ? t.variant : "line";
|
|
900
1243
|
return {
|
|
901
1244
|
modelValue: e.modelValue,
|
|
902
1245
|
defaultValue: e.defaultValue,
|
|
903
1246
|
variant: a,
|
|
904
|
-
appearance: a === "segment" &&
|
|
905
|
-
size:
|
|
906
|
-
layout:
|
|
1247
|
+
appearance: a === "segment" && Ta(t.appearance) ? t.appearance : a === "segment" ? "white" : void 0,
|
|
1248
|
+
size: Ba(t.size) ? t.size : "medium",
|
|
1249
|
+
layout: Ma(t.layout) ? t.layout : "content",
|
|
907
1250
|
disabled: e.disabled ?? !1
|
|
908
1251
|
};
|
|
909
1252
|
}
|
|
910
|
-
function
|
|
1253
|
+
function Sa(e) {
|
|
911
1254
|
return {
|
|
912
1255
|
value: e.value,
|
|
913
1256
|
disabled: e.disabled ?? !1
|
|
914
1257
|
};
|
|
915
1258
|
}
|
|
916
|
-
function
|
|
1259
|
+
function La(e = {}) {
|
|
917
1260
|
return e.modelValue !== void 0;
|
|
918
1261
|
}
|
|
919
|
-
function
|
|
1262
|
+
function Ne(e, t) {
|
|
920
1263
|
return Object.is(e, t);
|
|
921
1264
|
}
|
|
922
|
-
function
|
|
923
|
-
const t =
|
|
1265
|
+
function Pa(e = {}) {
|
|
1266
|
+
const t = Pe(e), a = [
|
|
924
1267
|
"mu-tabs",
|
|
925
1268
|
`mu-tabs--variant-${t.variant}`,
|
|
926
1269
|
`mu-tabs--size-${t.size}`,
|
|
@@ -928,19 +1271,19 @@ function Yt(e = {}) {
|
|
|
928
1271
|
];
|
|
929
1272
|
return t.variant === "segment" && a.push(`mu-tabs--appearance-${t.appearance}`), t.disabled && a.push("is-disabled"), a;
|
|
930
1273
|
}
|
|
931
|
-
function
|
|
1274
|
+
function Na(e, t = {}) {
|
|
932
1275
|
const a = ["mu-tab"];
|
|
933
1276
|
return t.active && a.push("is-active"), (t.disabled || e.disabled) && a.push("is-disabled"), a;
|
|
934
1277
|
}
|
|
935
|
-
const
|
|
1278
|
+
const Ha = ["aria-selected", "disabled"], za = {
|
|
936
1279
|
key: 0,
|
|
937
1280
|
class: "mu-tab__prefix",
|
|
938
1281
|
"aria-hidden": "true"
|
|
939
|
-
},
|
|
1282
|
+
}, Ia = { class: "mu-tab__content" }, Oa = {
|
|
940
1283
|
key: 1,
|
|
941
1284
|
class: "mu-tab__suffix",
|
|
942
1285
|
"aria-hidden": "true"
|
|
943
|
-
},
|
|
1286
|
+
}, Aa = /* @__PURE__ */ H({
|
|
944
1287
|
inheritAttrs: !1,
|
|
945
1288
|
__name: "Tab",
|
|
946
1289
|
props: {
|
|
@@ -949,63 +1292,63 @@ const ta = ["aria-selected", "disabled"], aa = {
|
|
|
949
1292
|
},
|
|
950
1293
|
emits: ["click"],
|
|
951
1294
|
setup(e, { emit: t }) {
|
|
952
|
-
const a = e,
|
|
953
|
-
() =>
|
|
954
|
-
),
|
|
955
|
-
() =>
|
|
956
|
-
),
|
|
957
|
-
|
|
958
|
-
active:
|
|
959
|
-
disabled:
|
|
1295
|
+
const a = e, l = t, r = R(), n = J(), o = se(Le, null), u = N(null), i = s(() => Sa(a)), c = s(
|
|
1296
|
+
() => o ? Ne(o.value.value, i.value.value) : !1
|
|
1297
|
+
), d = s(
|
|
1298
|
+
() => i.value.disabled || !!(o != null && o.disabled.value)
|
|
1299
|
+
), y = s(() => [
|
|
1300
|
+
Na(a, {
|
|
1301
|
+
active: c.value,
|
|
1302
|
+
disabled: d.value
|
|
960
1303
|
}),
|
|
961
1304
|
r.class
|
|
962
|
-
]),
|
|
963
|
-
const { class:
|
|
964
|
-
return
|
|
965
|
-
}),
|
|
966
|
-
function
|
|
967
|
-
!
|
|
1305
|
+
]), k = s(() => {
|
|
1306
|
+
const { class: b, style: g, ...M } = r;
|
|
1307
|
+
return M;
|
|
1308
|
+
}), C = s(() => r.style);
|
|
1309
|
+
function T() {
|
|
1310
|
+
!o || !u.value || o.registerItem(i.value.value, u.value);
|
|
968
1311
|
}
|
|
969
|
-
function
|
|
970
|
-
if (
|
|
971
|
-
|
|
1312
|
+
function w(b) {
|
|
1313
|
+
if (d.value) {
|
|
1314
|
+
b.preventDefault(), b.stopPropagation();
|
|
972
1315
|
return;
|
|
973
1316
|
}
|
|
974
|
-
|
|
1317
|
+
o && o.select(i.value.value, b), l("click", b);
|
|
975
1318
|
}
|
|
976
|
-
return
|
|
977
|
-
|
|
978
|
-
}),
|
|
979
|
-
|
|
980
|
-
}),
|
|
981
|
-
() =>
|
|
982
|
-
(
|
|
983
|
-
!
|
|
1319
|
+
return ne(() => {
|
|
1320
|
+
T();
|
|
1321
|
+
}), oe(() => {
|
|
1322
|
+
o == null || o.unregisterItem(i.value.value);
|
|
1323
|
+
}), ue(
|
|
1324
|
+
() => i.value.value,
|
|
1325
|
+
(b, g) => {
|
|
1326
|
+
!o || !u.value || (o.unregisterItem(g), o.registerItem(b, u.value));
|
|
984
1327
|
}
|
|
985
|
-
), (
|
|
1328
|
+
), (b, g) => (v(), h("button", A({
|
|
986
1329
|
ref_key: "buttonRef",
|
|
987
|
-
ref:
|
|
988
|
-
},
|
|
1330
|
+
ref: u
|
|
1331
|
+
}, k.value, {
|
|
989
1332
|
type: "button",
|
|
990
1333
|
role: "tab",
|
|
991
|
-
class:
|
|
992
|
-
style:
|
|
993
|
-
"aria-selected":
|
|
994
|
-
disabled:
|
|
995
|
-
onClick:
|
|
1334
|
+
class: y.value,
|
|
1335
|
+
style: C.value,
|
|
1336
|
+
"aria-selected": c.value ? "true" : "false",
|
|
1337
|
+
disabled: d.value,
|
|
1338
|
+
onClick: w
|
|
996
1339
|
}), [
|
|
997
|
-
|
|
998
|
-
|
|
1340
|
+
D(n).prefix ? (v(), h("span", za, [
|
|
1341
|
+
x(b.$slots, "prefix", {}, void 0, !0)
|
|
999
1342
|
])) : S("", !0),
|
|
1000
|
-
|
|
1001
|
-
|
|
1343
|
+
f("span", Ia, [
|
|
1344
|
+
x(b.$slots, "default", {}, void 0, !0)
|
|
1002
1345
|
]),
|
|
1003
|
-
|
|
1004
|
-
|
|
1346
|
+
D(n).suffix ? (v(), h("span", Oa, [
|
|
1347
|
+
x(b.$slots, "suffix", {}, void 0, !0)
|
|
1005
1348
|
])) : S("", !0)
|
|
1006
|
-
], 16,
|
|
1349
|
+
], 16, Ha));
|
|
1007
1350
|
}
|
|
1008
|
-
}),
|
|
1351
|
+
}), ls = /* @__PURE__ */ z(Aa, [["__scopeId", "data-v-97f04990"]]), Ra = /* @__PURE__ */ H({
|
|
1009
1352
|
inheritAttrs: !1,
|
|
1010
1353
|
__name: "Tabs",
|
|
1011
1354
|
props: {
|
|
@@ -1019,109 +1362,109 @@ const ta = ["aria-selected", "disabled"], aa = {
|
|
|
1019
1362
|
},
|
|
1020
1363
|
emits: ["update:modelValue", "change"],
|
|
1021
1364
|
setup(e, { emit: t }) {
|
|
1022
|
-
const a = e,
|
|
1023
|
-
() =>
|
|
1024
|
-
),
|
|
1365
|
+
const a = e, l = t, r = R(), n = N(null), o = s(() => Pe(a)), u = s(() => La(a)), i = N(o.value.defaultValue), c = s(
|
|
1366
|
+
() => u.value ? o.value.modelValue : i.value
|
|
1367
|
+
), d = s(() => o.value.variant), y = s(() => o.value.appearance), k = s(() => o.value.size), C = s(() => o.value.layout), T = s(() => o.value.disabled), w = N(!1), b = N(0), g = /* @__PURE__ */ new Map(), M = N({
|
|
1025
1368
|
transform: "translateX(0px)",
|
|
1026
1369
|
width: "0px"
|
|
1027
|
-
}),
|
|
1028
|
-
const { class:
|
|
1029
|
-
return
|
|
1030
|
-
}),
|
|
1031
|
-
function
|
|
1032
|
-
const
|
|
1033
|
-
if (!
|
|
1034
|
-
|
|
1370
|
+
}), $ = s(() => [Pa(a), r.class]), m = s(() => {
|
|
1371
|
+
const { class: V, style: P, ...ee } = r;
|
|
1372
|
+
return ee;
|
|
1373
|
+
}), p = s(() => r.style);
|
|
1374
|
+
function B() {
|
|
1375
|
+
const V = n.value, P = c.value !== void 0 ? g.get(c.value) : void 0;
|
|
1376
|
+
if (!V || !P) {
|
|
1377
|
+
M.value = {
|
|
1035
1378
|
transform: "translateX(0px)",
|
|
1036
1379
|
width: "0px"
|
|
1037
1380
|
};
|
|
1038
1381
|
return;
|
|
1039
1382
|
}
|
|
1040
|
-
const
|
|
1041
|
-
|
|
1042
|
-
transform: `translateX(${
|
|
1043
|
-
width: `${
|
|
1383
|
+
const ee = V.getBoundingClientRect(), ve = P.getBoundingClientRect();
|
|
1384
|
+
M.value = {
|
|
1385
|
+
transform: `translateX(${ve.left - ee.left}px)`,
|
|
1386
|
+
width: `${ve.width}px`
|
|
1044
1387
|
};
|
|
1045
1388
|
}
|
|
1046
|
-
function
|
|
1047
|
-
|
|
1048
|
-
|
|
1389
|
+
function I() {
|
|
1390
|
+
j(() => {
|
|
1391
|
+
B();
|
|
1049
1392
|
});
|
|
1050
1393
|
}
|
|
1051
|
-
function
|
|
1052
|
-
|
|
1394
|
+
function Y(V, P) {
|
|
1395
|
+
T.value || Ne(c.value, V) || (u.value || (i.value = V), l("update:modelValue", V), l("change", V, P));
|
|
1053
1396
|
}
|
|
1054
|
-
function
|
|
1055
|
-
|
|
1397
|
+
function _(V, P) {
|
|
1398
|
+
g.set(V, P), b.value += 1, I();
|
|
1056
1399
|
}
|
|
1057
|
-
function
|
|
1058
|
-
|
|
1400
|
+
function L(V) {
|
|
1401
|
+
g.delete(V), b.value += 1, I();
|
|
1059
1402
|
}
|
|
1060
|
-
return
|
|
1061
|
-
value:
|
|
1062
|
-
variant:
|
|
1063
|
-
appearance:
|
|
1064
|
-
size:
|
|
1065
|
-
layout:
|
|
1066
|
-
disabled:
|
|
1067
|
-
select:
|
|
1068
|
-
registerItem:
|
|
1069
|
-
unregisterItem:
|
|
1070
|
-
}),
|
|
1071
|
-
[
|
|
1403
|
+
return le(Le, {
|
|
1404
|
+
value: c,
|
|
1405
|
+
variant: d,
|
|
1406
|
+
appearance: y,
|
|
1407
|
+
size: k,
|
|
1408
|
+
layout: C,
|
|
1409
|
+
disabled: T,
|
|
1410
|
+
select: Y,
|
|
1411
|
+
registerItem: _,
|
|
1412
|
+
unregisterItem: L
|
|
1413
|
+
}), ue(
|
|
1414
|
+
[c, d, k, C, b],
|
|
1072
1415
|
() => {
|
|
1073
|
-
|
|
1416
|
+
I();
|
|
1074
1417
|
},
|
|
1075
1418
|
{ flush: "post" }
|
|
1076
|
-
),
|
|
1077
|
-
globalThis.window.addEventListener("resize",
|
|
1078
|
-
|
|
1419
|
+
), ne(() => {
|
|
1420
|
+
globalThis.window.addEventListener("resize", B), j(() => {
|
|
1421
|
+
B(), w.value = !0;
|
|
1079
1422
|
});
|
|
1080
|
-
}),
|
|
1081
|
-
globalThis.window.removeEventListener("resize",
|
|
1082
|
-
}), (
|
|
1423
|
+
}), oe(() => {
|
|
1424
|
+
globalThis.window.removeEventListener("resize", B);
|
|
1425
|
+
}), (V, P) => (v(), h("div", A({
|
|
1083
1426
|
ref_key: "rootRef",
|
|
1084
|
-
ref:
|
|
1085
|
-
},
|
|
1427
|
+
ref: n
|
|
1428
|
+
}, m.value, {
|
|
1086
1429
|
role: "tablist",
|
|
1087
|
-
class: [
|
|
1088
|
-
style:
|
|
1430
|
+
class: [$.value, { "is-ready": w.value }],
|
|
1431
|
+
style: p.value
|
|
1089
1432
|
}), [
|
|
1090
|
-
|
|
1091
|
-
|
|
1433
|
+
x(V.$slots, "default", {}, void 0, !0),
|
|
1434
|
+
f("span", {
|
|
1092
1435
|
class: "mu-tabs__indicator",
|
|
1093
|
-
style:
|
|
1436
|
+
style: he(M.value),
|
|
1094
1437
|
"aria-hidden": "true"
|
|
1095
1438
|
}, null, 4)
|
|
1096
1439
|
], 16));
|
|
1097
1440
|
}
|
|
1098
|
-
}),
|
|
1099
|
-
function
|
|
1441
|
+
}), ns = /* @__PURE__ */ z(Ra, [["__scopeId", "data-v-28e8c4f7"]]), Da = ["outline", "solid", "soft"];
|
|
1442
|
+
function Ga(e, t) {
|
|
1100
1443
|
return typeof t == "string" && e.includes(t);
|
|
1101
1444
|
}
|
|
1102
|
-
function
|
|
1103
|
-
return
|
|
1445
|
+
function Ea(e) {
|
|
1446
|
+
return Ga(Da, e);
|
|
1104
1447
|
}
|
|
1105
|
-
function
|
|
1448
|
+
function He(e = {}) {
|
|
1106
1449
|
return {
|
|
1107
|
-
variant:
|
|
1450
|
+
variant: Ea(e.variant) ? e.variant : "outline",
|
|
1108
1451
|
selected: e.selected ?? !1,
|
|
1109
1452
|
disabled: e.disabled ?? !1
|
|
1110
1453
|
};
|
|
1111
1454
|
}
|
|
1112
|
-
function
|
|
1113
|
-
const t =
|
|
1455
|
+
function ja(e = {}) {
|
|
1456
|
+
const t = He(e), a = ["mu-tag", `mu-tag--variant-${t.variant}`];
|
|
1114
1457
|
return t.selected && a.push("is-selected"), t.disabled && a.push("is-disabled"), a;
|
|
1115
1458
|
}
|
|
1116
|
-
const
|
|
1459
|
+
const Za = ["disabled", "aria-pressed"], Fa = {
|
|
1117
1460
|
key: 0,
|
|
1118
1461
|
class: "mu-tag__prefix",
|
|
1119
1462
|
"aria-hidden": "true"
|
|
1120
|
-
},
|
|
1463
|
+
}, Ua = { class: "mu-tag__content" }, qa = {
|
|
1121
1464
|
key: 1,
|
|
1122
1465
|
class: "mu-tag__suffix",
|
|
1123
1466
|
"aria-hidden": "true"
|
|
1124
|
-
},
|
|
1467
|
+
}, Ka = /* @__PURE__ */ H({
|
|
1125
1468
|
__name: "Tag",
|
|
1126
1469
|
props: {
|
|
1127
1470
|
variant: {},
|
|
@@ -1130,40 +1473,43 @@ const da = ["disabled", "aria-pressed"], fa = {
|
|
|
1130
1473
|
},
|
|
1131
1474
|
emits: ["update:selected", "click"],
|
|
1132
1475
|
setup(e, { emit: t }) {
|
|
1133
|
-
const a = e,
|
|
1134
|
-
function
|
|
1135
|
-
|
|
1476
|
+
const a = e, l = t, r = J(), n = s(() => He(a)), o = s(() => ja(a));
|
|
1477
|
+
function u(i) {
|
|
1478
|
+
n.value.disabled || (l("click", i), l("update:selected", !n.value.selected));
|
|
1136
1479
|
}
|
|
1137
|
-
return (
|
|
1480
|
+
return (i, c) => (v(), h("button", {
|
|
1138
1481
|
type: "button",
|
|
1139
|
-
class:
|
|
1140
|
-
disabled:
|
|
1141
|
-
"aria-pressed":
|
|
1142
|
-
onClick:
|
|
1482
|
+
class: W(o.value),
|
|
1483
|
+
disabled: n.value.disabled,
|
|
1484
|
+
"aria-pressed": n.value.selected,
|
|
1485
|
+
onClick: u
|
|
1143
1486
|
}, [
|
|
1144
|
-
|
|
1145
|
-
|
|
1487
|
+
D(r).prefix ? (v(), h("span", Fa, [
|
|
1488
|
+
x(i.$slots, "prefix", {}, void 0, !0)
|
|
1146
1489
|
])) : S("", !0),
|
|
1147
|
-
|
|
1148
|
-
|
|
1490
|
+
f("span", Ua, [
|
|
1491
|
+
x(i.$slots, "default", {}, void 0, !0)
|
|
1149
1492
|
]),
|
|
1150
|
-
|
|
1151
|
-
|
|
1493
|
+
D(r).suffix ? (v(), h("span", qa, [
|
|
1494
|
+
x(i.$slots, "suffix", {}, void 0, !0)
|
|
1152
1495
|
])) : S("", !0)
|
|
1153
|
-
], 10,
|
|
1496
|
+
], 10, Za));
|
|
1154
1497
|
}
|
|
1155
|
-
}),
|
|
1498
|
+
}), os = /* @__PURE__ */ z(Ka, [["__scopeId", "data-v-e3e9ee4d"]]);
|
|
1156
1499
|
export {
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1500
|
+
Ya as MessageList,
|
|
1501
|
+
Wa as MuBadge,
|
|
1502
|
+
me as MuButton,
|
|
1503
|
+
Ct as MuCheckbox,
|
|
1504
|
+
Ja as MuCheckboxGroup,
|
|
1505
|
+
Wt as MuModal,
|
|
1506
|
+
ts as MuRadio,
|
|
1507
|
+
as as MuRadioGroup,
|
|
1508
|
+
ss as MuSwitch,
|
|
1509
|
+
ls as MuTab,
|
|
1510
|
+
ns as MuTabs,
|
|
1511
|
+
os as MuTag,
|
|
1512
|
+
Qa as message,
|
|
1513
|
+
es as muModal,
|
|
1168
1514
|
q as openMuModal
|
|
1169
1515
|
};
|