@mureka-fe/ui 3.0.0 → 5.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 +56 -1
- package/dist/src/components/badge/Badge.vue.d.ts.map +1 -1
- 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/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 +2 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/ui.js +754 -553
- package/dist/ui.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/ui.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as H, computed as
|
|
2
|
-
const
|
|
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
3
|
"new",
|
|
4
4
|
"new-mini",
|
|
5
5
|
"premier",
|
|
@@ -12,7 +12,7 @@ const Oe = [
|
|
|
12
12
|
"published",
|
|
13
13
|
"details",
|
|
14
14
|
"bpm"
|
|
15
|
-
],
|
|
15
|
+
], je = ["outline", "solid", "soft"], Ze = {
|
|
16
16
|
new: { isSvgPreset: !0 },
|
|
17
17
|
"new-mini": { isSvgPreset: !0 },
|
|
18
18
|
premier: { defaultContent: "Premier" },
|
|
@@ -29,15 +29,15 @@ const Oe = [
|
|
|
29
29
|
function ge(e, t) {
|
|
30
30
|
return typeof t == "string" && e.includes(t);
|
|
31
31
|
}
|
|
32
|
-
function
|
|
33
|
-
return ge(
|
|
32
|
+
function Fe(e) {
|
|
33
|
+
return ge(je, e);
|
|
34
34
|
}
|
|
35
|
-
function
|
|
36
|
-
return ge(
|
|
35
|
+
function Ue(e) {
|
|
36
|
+
return ge(Ee, e);
|
|
37
37
|
}
|
|
38
|
-
function
|
|
39
|
-
if (
|
|
40
|
-
const t =
|
|
38
|
+
function ke(e = {}) {
|
|
39
|
+
if (Ue(e.preset)) {
|
|
40
|
+
const t = Ze[e.preset];
|
|
41
41
|
return {
|
|
42
42
|
preset: e.preset,
|
|
43
43
|
defaultContent: t.defaultContent,
|
|
@@ -45,16 +45,16 @@ function be(e = {}) {
|
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
47
|
return {
|
|
48
|
-
variant:
|
|
48
|
+
variant: Fe(e.variant) ? e.variant : "outline",
|
|
49
49
|
paid: e.paid ?? !1,
|
|
50
50
|
isSvgPreset: !1
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
|
-
function
|
|
54
|
-
const t =
|
|
53
|
+
function qe(e = {}) {
|
|
54
|
+
const t = ke(e), a = ["mu-badge"];
|
|
55
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
56
|
}
|
|
57
|
-
const
|
|
57
|
+
const Ke = ["role", "aria-label"], Xe = {
|
|
58
58
|
key: 0,
|
|
59
59
|
"data-test": "new-wordmark",
|
|
60
60
|
class: "mu-badge__new-wordmark",
|
|
@@ -62,7 +62,7 @@ const Ue = ["role", "aria-label"], Ze = {
|
|
|
62
62
|
fill: "none",
|
|
63
63
|
xmlns: "http://www.w3.org/2000/svg",
|
|
64
64
|
"aria-hidden": "true"
|
|
65
|
-
},
|
|
65
|
+
}, We = {
|
|
66
66
|
key: 1,
|
|
67
67
|
"data-test": "new-mini-wordmark",
|
|
68
68
|
class: "mu-badge__new-wordmark",
|
|
@@ -70,11 +70,11 @@ const Ue = ["role", "aria-label"], Ze = {
|
|
|
70
70
|
fill: "none",
|
|
71
71
|
xmlns: "http://www.w3.org/2000/svg",
|
|
72
72
|
"aria-hidden": "true"
|
|
73
|
-
},
|
|
73
|
+
}, Je = {
|
|
74
74
|
key: 0,
|
|
75
75
|
class: "mu-badge__prefix",
|
|
76
76
|
"aria-hidden": "true"
|
|
77
|
-
},
|
|
77
|
+
}, Qe = { class: "mu-badge__content" }, Ye = /* @__PURE__ */ H({
|
|
78
78
|
__name: "Badge",
|
|
79
79
|
props: {
|
|
80
80
|
variant: {},
|
|
@@ -82,14 +82,14 @@ const Ue = ["role", "aria-label"], Ze = {
|
|
|
82
82
|
preset: {}
|
|
83
83
|
},
|
|
84
84
|
setup(e) {
|
|
85
|
-
const t = e, a =
|
|
86
|
-
return (
|
|
87
|
-
class:
|
|
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
88
|
role: r.value,
|
|
89
|
-
"aria-label":
|
|
89
|
+
"aria-label": n.value
|
|
90
90
|
}, [
|
|
91
|
-
a.value.isSvgPreset ? (v(), h(
|
|
92
|
-
a.value.preset === "new" ? (v(), h("svg",
|
|
91
|
+
a.value.isSvgPreset ? (v(), h(K, { key: 0 }, [
|
|
92
|
+
a.value.preset === "new" ? (v(), h("svg", Xe, [...i[0] || (i[0] = [
|
|
93
93
|
f("path", {
|
|
94
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
95
|
fill: "currentColor"
|
|
@@ -102,7 +102,7 @@ const Ue = ["role", "aria-label"], Ze = {
|
|
|
102
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
103
|
fill: "currentColor"
|
|
104
104
|
}, null, -1)
|
|
105
|
-
])])) : a.value.preset === "new-mini" ? (v(), h("svg",
|
|
105
|
+
])])) : a.value.preset === "new-mini" ? (v(), h("svg", We, [...i[1] || (i[1] = [
|
|
106
106
|
f("path", {
|
|
107
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
108
|
fill: "currentColor"
|
|
@@ -115,9 +115,9 @@ const Ue = ["role", "aria-label"], Ze = {
|
|
|
115
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
116
|
fill: "currentColor"
|
|
117
117
|
}, null, -1)
|
|
118
|
-
])])) :
|
|
119
|
-
], 64)) : (v(), h(
|
|
120
|
-
|
|
118
|
+
])])) : S("", !0)
|
|
119
|
+
], 64)) : (v(), h(K, { key: 1 }, [
|
|
120
|
+
o.value ? (v(), h("span", Je, [...i[2] || (i[2] = [
|
|
121
121
|
f("svg", {
|
|
122
122
|
"data-test": "details-icon",
|
|
123
123
|
viewBox: "0 0 12 12",
|
|
@@ -133,22 +133,22 @@ const Ue = ["role", "aria-label"], Ze = {
|
|
|
133
133
|
"stroke-linejoin": "round"
|
|
134
134
|
})
|
|
135
135
|
], -1)
|
|
136
|
-
])])) :
|
|
137
|
-
f("span",
|
|
138
|
-
|
|
139
|
-
|
|
136
|
+
])])) : S("", !0),
|
|
137
|
+
f("span", Qe, [
|
|
138
|
+
x(u.$slots, "default", {}, () => [
|
|
139
|
+
G(O(a.value.defaultContent), 1)
|
|
140
140
|
], !0)
|
|
141
141
|
])
|
|
142
142
|
], 64))
|
|
143
|
-
], 10,
|
|
143
|
+
], 10, Ke));
|
|
144
144
|
}
|
|
145
|
-
}),
|
|
145
|
+
}), z = (e, t) => {
|
|
146
146
|
const a = e.__vccOpts || e;
|
|
147
|
-
for (const [
|
|
148
|
-
a[
|
|
147
|
+
for (const [l, r] of t)
|
|
148
|
+
a[l] = r;
|
|
149
149
|
return a;
|
|
150
|
-
},
|
|
151
|
-
function
|
|
150
|
+
}, Wa = /* @__PURE__ */ z(Ye, [["__scopeId", "data-v-b4731d1a"]]);
|
|
151
|
+
function ie(e = {}) {
|
|
152
152
|
return {
|
|
153
153
|
type: e.type ?? "primary",
|
|
154
154
|
status: e.status,
|
|
@@ -162,8 +162,8 @@ function le(e = {}) {
|
|
|
162
162
|
nativeType: e.nativeType ?? "button"
|
|
163
163
|
};
|
|
164
164
|
}
|
|
165
|
-
function
|
|
166
|
-
const t =
|
|
165
|
+
function et(e = {}) {
|
|
166
|
+
const t = ie(e), a = [
|
|
167
167
|
"mu-button",
|
|
168
168
|
`mu-button--${t.type}`,
|
|
169
169
|
`mu-button--appearance-${t.appearance}`,
|
|
@@ -171,29 +171,33 @@ function Xe(e = {}) {
|
|
|
171
171
|
];
|
|
172
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;
|
|
173
173
|
}
|
|
174
|
-
function
|
|
175
|
-
const t =
|
|
174
|
+
function tt(e = {}) {
|
|
175
|
+
const t = ie(e);
|
|
176
176
|
return !t.disabled && !t.loading;
|
|
177
177
|
}
|
|
178
|
-
function
|
|
179
|
-
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;
|
|
180
180
|
return {
|
|
181
181
|
showPrefixSlot: !t && !r && a,
|
|
182
|
-
showSuffixSlot: !t &&
|
|
182
|
+
showSuffixSlot: !t && l,
|
|
183
|
+
showDefaultSlot: !(t && r),
|
|
183
184
|
showLoadingIndicator: r,
|
|
184
|
-
requiresAriaLabel: t && !
|
|
185
|
-
isInvalidIconOnlyCombination: t && (a ||
|
|
185
|
+
requiresAriaLabel: t && !n,
|
|
186
|
+
isInvalidIconOnlyCombination: t && (a || l)
|
|
186
187
|
};
|
|
187
188
|
}
|
|
188
|
-
const
|
|
189
|
+
const st = ["type", "disabled", "aria-busy"], lt = {
|
|
189
190
|
key: 0,
|
|
190
191
|
class: "mu-button__prefix",
|
|
191
192
|
"aria-hidden": "true"
|
|
192
|
-
},
|
|
193
|
+
}, nt = {
|
|
193
194
|
key: 1,
|
|
195
|
+
class: "mu-button__content"
|
|
196
|
+
}, ot = {
|
|
197
|
+
key: 2,
|
|
194
198
|
class: "mu-button__suffix",
|
|
195
199
|
"aria-hidden": "true"
|
|
196
|
-
},
|
|
200
|
+
}, ut = /* @__PURE__ */ H({
|
|
197
201
|
__name: "Button",
|
|
198
202
|
props: {
|
|
199
203
|
type: { default: "primary" },
|
|
@@ -209,7 +213,7 @@ const Qe = ["type", "disabled", "aria-busy"], Ye = {
|
|
|
209
213
|
},
|
|
210
214
|
emits: ["click"],
|
|
211
215
|
setup(e, { emit: t }) {
|
|
212
|
-
const a = e,
|
|
216
|
+
const a = e, l = t, r = J(), n = R(), o = {
|
|
213
217
|
small: {
|
|
214
218
|
width: "var(--mu-button-icon-size-small)",
|
|
215
219
|
height: "var(--mu-button-icon-size-small)"
|
|
@@ -222,62 +226,257 @@ const Qe = ["type", "disabled", "aria-busy"], Ye = {
|
|
|
222
226
|
width: "var(--mu-button-icon-size-large)",
|
|
223
227
|
height: "var(--mu-button-icon-size-large)"
|
|
224
228
|
}
|
|
225
|
-
},
|
|
226
|
-
() =>
|
|
227
|
-
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,
|
|
228
232
|
hasPrefix: !!r.prefix,
|
|
229
233
|
hasSuffix: !!r.suffix,
|
|
230
|
-
loading:
|
|
234
|
+
loading: u.value.loading,
|
|
231
235
|
hasDefaultSlot: !!r.default,
|
|
232
|
-
hasAriaLabel: typeof
|
|
236
|
+
hasAriaLabel: typeof n["aria-label"] == "string" && n["aria-label"].trim().length > 0
|
|
233
237
|
})
|
|
234
238
|
);
|
|
235
|
-
function
|
|
236
|
-
if (!
|
|
237
|
-
|
|
239
|
+
function y(k) {
|
|
240
|
+
if (!tt(u.value)) {
|
|
241
|
+
k.preventDefault(), k.stopPropagation();
|
|
238
242
|
return;
|
|
239
243
|
}
|
|
240
|
-
|
|
244
|
+
l("click", k);
|
|
241
245
|
}
|
|
242
|
-
return (
|
|
243
|
-
type:
|
|
244
|
-
class:
|
|
245
|
-
disabled:
|
|
246
|
-
"aria-busy":
|
|
247
|
-
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
|
|
248
252
|
}, [
|
|
249
|
-
|
|
250
|
-
|
|
253
|
+
d.value.showLoadingIndicator || d.value.showPrefixSlot ? (v(), h("span", lt, [
|
|
254
|
+
d.value.showLoadingIndicator ? (v(), h("svg", {
|
|
251
255
|
key: 0,
|
|
252
256
|
class: "mu-button__loading-icon",
|
|
253
|
-
style:
|
|
257
|
+
style: he(c.value),
|
|
254
258
|
viewBox: "0 0 24 24",
|
|
255
259
|
fill: "none",
|
|
256
260
|
xmlns: "http://www.w3.org/2000/svg"
|
|
257
|
-
}, [...
|
|
261
|
+
}, [...C[0] || (C[0] = [
|
|
258
262
|
f("path", {
|
|
259
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",
|
|
260
264
|
fill: "currentColor"
|
|
261
265
|
}, null, -1)
|
|
262
|
-
])], 4)) :
|
|
263
|
-
])) :
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
]),
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
])) :
|
|
270
|
-
], 10,
|
|
266
|
+
])], 4)) : x(k.$slots, "prefix", { key: 1 }, void 0, !0)
|
|
267
|
+
])) : S("", !0),
|
|
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)
|
|
273
|
+
])) : S("", !0)
|
|
274
|
+
], 10, st));
|
|
271
275
|
}
|
|
272
|
-
}),
|
|
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 = {
|
|
273
472
|
close: () => {
|
|
274
473
|
}
|
|
275
|
-
},
|
|
474
|
+
}, U = Ie({
|
|
276
475
|
items: []
|
|
277
476
|
});
|
|
278
|
-
let
|
|
279
|
-
const
|
|
280
|
-
function
|
|
477
|
+
let Vt = 1;
|
|
478
|
+
const Z = /* @__PURE__ */ new Map();
|
|
479
|
+
function xt(e) {
|
|
281
480
|
return typeof e == "string" ? { title: e } : {
|
|
282
481
|
title: e.title,
|
|
283
482
|
description: e.description,
|
|
@@ -287,92 +486,92 @@ function lt(e) {
|
|
|
287
486
|
icon: e.icon
|
|
288
487
|
};
|
|
289
488
|
}
|
|
290
|
-
function
|
|
489
|
+
function re(e) {
|
|
291
490
|
return e.duration > 0;
|
|
292
491
|
}
|
|
293
|
-
function
|
|
294
|
-
return
|
|
492
|
+
function $t(e) {
|
|
493
|
+
return U.items.findIndex((t) => t.id === e);
|
|
295
494
|
}
|
|
296
|
-
function
|
|
297
|
-
return
|
|
495
|
+
function Ve(e) {
|
|
496
|
+
return U.items.find((t) => t.id === e);
|
|
298
497
|
}
|
|
299
|
-
function
|
|
300
|
-
const t =
|
|
498
|
+
function ce(e) {
|
|
499
|
+
const t = Z.get(e);
|
|
301
500
|
t && t.timer !== null && (globalThis.clearTimeout(t.timer), t.timer = null);
|
|
302
501
|
}
|
|
303
|
-
function
|
|
304
|
-
const t =
|
|
305
|
-
t < 0 || (
|
|
502
|
+
function de(e) {
|
|
503
|
+
const t = $t(e);
|
|
504
|
+
t < 0 || (ce(e), Z.delete(e), U.items.splice(t, 1));
|
|
306
505
|
}
|
|
307
|
-
function
|
|
308
|
-
const a =
|
|
309
|
-
a && (
|
|
310
|
-
|
|
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);
|
|
311
510
|
}, t));
|
|
312
511
|
}
|
|
313
|
-
function
|
|
512
|
+
function Bt(e, t) {
|
|
314
513
|
return {
|
|
315
|
-
id:
|
|
514
|
+
id: Vt++,
|
|
316
515
|
type: e,
|
|
317
516
|
title: t.title,
|
|
318
517
|
description: t.description,
|
|
319
|
-
duration: t.duration ??
|
|
518
|
+
duration: t.duration ?? yt,
|
|
320
519
|
closable: t.closable ?? !1,
|
|
321
520
|
resetOnHover: t.resetOnHover ?? !1,
|
|
322
521
|
icon: t.icon
|
|
323
522
|
};
|
|
324
523
|
}
|
|
325
|
-
function
|
|
524
|
+
function Tt() {
|
|
326
525
|
return typeof globalThis.window < "u" && typeof globalThis.document < "u";
|
|
327
526
|
}
|
|
328
|
-
function
|
|
329
|
-
if (!
|
|
330
|
-
return
|
|
331
|
-
const a =
|
|
332
|
-
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, {
|
|
333
532
|
timer: null,
|
|
334
533
|
deadline: 0,
|
|
335
|
-
remainingDuration:
|
|
534
|
+
remainingDuration: l.duration,
|
|
336
535
|
isPaused: !1
|
|
337
|
-
}),
|
|
338
|
-
close: () =>
|
|
536
|
+
}), re(l) && xe(l.id, l.duration), {
|
|
537
|
+
close: () => de(l.id)
|
|
339
538
|
};
|
|
340
539
|
}
|
|
341
|
-
function
|
|
342
|
-
return (t) =>
|
|
540
|
+
function F(e) {
|
|
541
|
+
return (t) => Mt(e, t);
|
|
343
542
|
}
|
|
344
|
-
const
|
|
345
|
-
success:
|
|
346
|
-
warning:
|
|
347
|
-
loading:
|
|
348
|
-
error:
|
|
349
|
-
danger:
|
|
543
|
+
const Qa = {
|
|
544
|
+
success: F("success"),
|
|
545
|
+
warning: F("warning"),
|
|
546
|
+
loading: F("loading"),
|
|
547
|
+
error: F("error"),
|
|
548
|
+
danger: F("danger")
|
|
350
549
|
};
|
|
351
|
-
function
|
|
352
|
-
|
|
550
|
+
function St(e) {
|
|
551
|
+
de(e);
|
|
353
552
|
}
|
|
354
|
-
function
|
|
355
|
-
const t =
|
|
356
|
-
!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);
|
|
357
556
|
}
|
|
358
|
-
function
|
|
359
|
-
const t =
|
|
360
|
-
!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);
|
|
361
560
|
}
|
|
362
|
-
const
|
|
561
|
+
const Nt = {
|
|
363
562
|
class: "mu-message-list",
|
|
364
563
|
"aria-live": "polite",
|
|
365
564
|
"aria-atomic": "true"
|
|
366
|
-
},
|
|
565
|
+
}, Ht = ["onMouseenter", "onMouseleave"], zt = {
|
|
367
566
|
class: "mu-message__icon",
|
|
368
567
|
"aria-hidden": "true"
|
|
369
|
-
},
|
|
568
|
+
}, It = { class: "mu-message__content" }, Ot = { class: "mu-message__title" }, At = {
|
|
370
569
|
key: 0,
|
|
371
570
|
class: "mu-message__description"
|
|
372
|
-
},
|
|
571
|
+
}, Rt = ["onClick"], Dt = /* @__PURE__ */ H({
|
|
373
572
|
__name: "MessageList",
|
|
374
573
|
setup(e) {
|
|
375
|
-
const t =
|
|
574
|
+
const t = s(() => U.items), a = H({
|
|
376
575
|
name: "MarkupIcon",
|
|
377
576
|
props: {
|
|
378
577
|
markup: {
|
|
@@ -381,63 +580,63 @@ const mt = {
|
|
|
381
580
|
}
|
|
382
581
|
},
|
|
383
582
|
setup(i) {
|
|
384
|
-
return () =>
|
|
583
|
+
return () => be("span", { class: "mu-message__icon-markup", innerHTML: i.markup });
|
|
385
584
|
}
|
|
386
585
|
});
|
|
387
|
-
function
|
|
586
|
+
function l(i) {
|
|
388
587
|
return typeof i != "string";
|
|
389
588
|
}
|
|
390
589
|
function r(i) {
|
|
391
|
-
|
|
590
|
+
Lt(i);
|
|
392
591
|
}
|
|
393
|
-
function
|
|
394
|
-
|
|
592
|
+
function n(i) {
|
|
593
|
+
Pt(i);
|
|
395
594
|
}
|
|
396
|
-
function
|
|
595
|
+
function o(i) {
|
|
397
596
|
if (!(i instanceof globalThis.HTMLElement))
|
|
398
597
|
return;
|
|
399
|
-
const
|
|
400
|
-
i.style.width = `${
|
|
598
|
+
const c = i.getBoundingClientRect();
|
|
599
|
+
i.style.width = `${c.width}px`, i.style.height = `${c.height}px`;
|
|
401
600
|
}
|
|
402
|
-
const
|
|
601
|
+
const u = {
|
|
403
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>',
|
|
404
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>',
|
|
405
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>',
|
|
406
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>',
|
|
407
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>'
|
|
408
607
|
};
|
|
409
|
-
return (i,
|
|
410
|
-
|
|
608
|
+
return (i, c) => (v(), h("div", Nt, [
|
|
609
|
+
Oe(Ae, {
|
|
411
610
|
name: "mu-message-fade",
|
|
412
611
|
tag: "div",
|
|
413
612
|
class: "mu-message-list__stack",
|
|
414
|
-
onBeforeLeave:
|
|
613
|
+
onBeforeLeave: o
|
|
415
614
|
}, {
|
|
416
|
-
default:
|
|
417
|
-
(v(!0), h(
|
|
418
|
-
key:
|
|
419
|
-
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 }]]),
|
|
420
619
|
role: "status",
|
|
421
|
-
onMouseenter: (
|
|
422
|
-
onMouseleave: (
|
|
620
|
+
onMouseenter: (y) => r(d.id),
|
|
621
|
+
onMouseleave: (y) => n(d.id)
|
|
423
622
|
}, [
|
|
424
|
-
f("span",
|
|
425
|
-
|
|
623
|
+
f("span", zt, [
|
|
624
|
+
d.icon && l(d.icon) ? (v(), E(Re(d.icon), { key: 0 })) : (v(), E(D(a), {
|
|
426
625
|
key: 1,
|
|
427
|
-
markup: typeof
|
|
626
|
+
markup: typeof d.icon == "string" ? d.icon : u[d.type]
|
|
428
627
|
}, null, 8, ["markup"]))
|
|
429
628
|
]),
|
|
430
|
-
f("div",
|
|
431
|
-
f("div",
|
|
432
|
-
|
|
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)
|
|
433
632
|
]),
|
|
434
|
-
|
|
633
|
+
d.closable ? (v(), h("button", {
|
|
435
634
|
key: 0,
|
|
436
635
|
type: "button",
|
|
437
636
|
class: "mu-message__close",
|
|
438
637
|
"aria-label": "Close message",
|
|
439
|
-
onClick: (
|
|
440
|
-
}, [...
|
|
638
|
+
onClick: (y) => D(St)(d.id)
|
|
639
|
+
}, [...c[0] || (c[0] = [
|
|
441
640
|
f("svg", {
|
|
442
641
|
viewBox: "0 0 24 24",
|
|
443
642
|
fill: "none",
|
|
@@ -450,14 +649,14 @@ const mt = {
|
|
|
450
649
|
"stroke-linecap": "round"
|
|
451
650
|
})
|
|
452
651
|
], -1)
|
|
453
|
-
])], 8,
|
|
454
|
-
], 42,
|
|
652
|
+
])], 8, Rt)) : S("", !0)
|
|
653
|
+
], 42, Ht))), 128))
|
|
455
654
|
]),
|
|
456
655
|
_: 1
|
|
457
656
|
})
|
|
458
657
|
]));
|
|
459
658
|
}
|
|
460
|
-
}),
|
|
659
|
+
}), Ya = /* @__PURE__ */ z(Dt, [["__scopeId", "data-v-debf98d8"]]), Gt = {
|
|
461
660
|
medium: {
|
|
462
661
|
width: "548px",
|
|
463
662
|
minHeight: "228px"
|
|
@@ -467,13 +666,13 @@ const mt = {
|
|
|
467
666
|
minHeight: "500px"
|
|
468
667
|
}
|
|
469
668
|
};
|
|
470
|
-
function
|
|
471
|
-
const t = e.size ?? "medium", a =
|
|
669
|
+
function fe(e = {}) {
|
|
670
|
+
const t = e.size ?? "medium", a = Gt[t], l = e.variant ?? "form";
|
|
472
671
|
return {
|
|
473
672
|
visible: e.visible ?? !1,
|
|
474
673
|
title: e.title ?? "",
|
|
475
674
|
status: e.status ?? "default",
|
|
476
|
-
variant:
|
|
675
|
+
variant: l,
|
|
477
676
|
size: t,
|
|
478
677
|
width: e.width ?? a.width,
|
|
479
678
|
minHeight: a.minHeight,
|
|
@@ -483,13 +682,13 @@ function ce(e = {}) {
|
|
|
483
682
|
okText: e.okText ?? "Confirm",
|
|
484
683
|
cancelText: e.cancelText ?? "Cancel",
|
|
485
684
|
// feedback 形态默认隐藏 cancel;显式传值仍优先
|
|
486
|
-
hideCancel: e.hideCancel ??
|
|
685
|
+
hideCancel: e.hideCancel ?? l === "feedback",
|
|
487
686
|
hideOk: e.hideOk ?? !1,
|
|
488
687
|
okLoading: e.okLoading ?? !1
|
|
489
688
|
};
|
|
490
689
|
}
|
|
491
|
-
function
|
|
492
|
-
const t =
|
|
690
|
+
function Et(e = {}) {
|
|
691
|
+
const t = fe(e), a = [
|
|
493
692
|
"mu-modal",
|
|
494
693
|
`mu-modal--${t.size}`,
|
|
495
694
|
`mu-modal--${t.status}`,
|
|
@@ -497,8 +696,8 @@ function wt(e = {}) {
|
|
|
497
696
|
];
|
|
498
697
|
return t.variant === "feedback" && a.push("mu-modal--feedback"), a;
|
|
499
698
|
}
|
|
500
|
-
function
|
|
501
|
-
const t =
|
|
699
|
+
function jt(e = {}) {
|
|
700
|
+
const t = fe(e);
|
|
502
701
|
return t.variant === "feedback" ? {
|
|
503
702
|
type: "secondary",
|
|
504
703
|
status: t.status === "default" ? void 0 : t.status
|
|
@@ -509,13 +708,13 @@ function Vt(e = {}) {
|
|
|
509
708
|
type: "primary"
|
|
510
709
|
};
|
|
511
710
|
}
|
|
512
|
-
const
|
|
711
|
+
const Zt = {
|
|
513
712
|
key: 0,
|
|
514
713
|
class: "mu-modal-root"
|
|
515
|
-
},
|
|
714
|
+
}, Ft = { class: "mu-modal__header" }, Ut = ["data-status"], qt = { class: "mu-modal__body" }, Kt = {
|
|
516
715
|
key: 0,
|
|
517
716
|
class: "mu-modal__footer"
|
|
518
|
-
},
|
|
717
|
+
}, Xt = /* @__PURE__ */ H({
|
|
519
718
|
inheritAttrs: !1,
|
|
520
719
|
__name: "Modal",
|
|
521
720
|
props: {
|
|
@@ -536,76 +735,76 @@ const xt = {
|
|
|
536
735
|
},
|
|
537
736
|
emits: ["update:visible", "ok", "cancel", "close"],
|
|
538
737
|
setup(e, { emit: t }) {
|
|
539
|
-
const a = e,
|
|
540
|
-
const { class: m, style:
|
|
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;
|
|
541
740
|
return B;
|
|
542
|
-
}), i =
|
|
543
|
-
() =>
|
|
544
|
-
),
|
|
741
|
+
}), i = s(() => jt(a)), c = s(
|
|
742
|
+
() => n.value.variant === "feedback" && n.value.hideCancel
|
|
743
|
+
), d = s(() => [
|
|
545
744
|
{
|
|
546
|
-
width:
|
|
547
|
-
minHeight:
|
|
745
|
+
width: n.value.width,
|
|
746
|
+
minHeight: n.value.minHeight
|
|
548
747
|
},
|
|
549
748
|
r.style
|
|
550
|
-
]),
|
|
551
|
-
function
|
|
552
|
-
|
|
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);
|
|
553
752
|
}
|
|
554
|
-
function
|
|
555
|
-
|
|
753
|
+
function w() {
|
|
754
|
+
n.value.maskClosable && (T(), l("cancel", new globalThis.MouseEvent("click")));
|
|
556
755
|
}
|
|
557
|
-
function
|
|
558
|
-
|
|
756
|
+
function b() {
|
|
757
|
+
T(), l("close");
|
|
559
758
|
}
|
|
560
|
-
function
|
|
561
|
-
|
|
759
|
+
function g(m) {
|
|
760
|
+
l("cancel", m), T();
|
|
562
761
|
}
|
|
563
|
-
function
|
|
564
|
-
|
|
762
|
+
function M(m) {
|
|
763
|
+
l("ok", m);
|
|
565
764
|
}
|
|
566
|
-
function
|
|
567
|
-
m.key !== "Escape" || !
|
|
765
|
+
function $(m) {
|
|
766
|
+
m.key !== "Escape" || !n.value.visible || !n.value.escToClose || (T(), l("close"));
|
|
568
767
|
}
|
|
569
|
-
return
|
|
570
|
-
|
|
571
|
-
}),
|
|
572
|
-
|
|
573
|
-
}),
|
|
574
|
-
() =>
|
|
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,
|
|
575
774
|
(m) => {
|
|
576
|
-
|
|
775
|
+
C && (C.body.style.overflow = m ? "hidden" : "");
|
|
577
776
|
},
|
|
578
777
|
{ immediate: !0 }
|
|
579
|
-
), (m,
|
|
580
|
-
|
|
778
|
+
), (m, p) => (v(), E(De, { to: "body" }, [
|
|
779
|
+
n.value.visible ? (v(), h("div", Zt, [
|
|
581
780
|
f("div", {
|
|
582
781
|
class: "mu-modal__mask",
|
|
583
|
-
onClick:
|
|
782
|
+
onClick: w
|
|
584
783
|
}),
|
|
585
|
-
f("div", A(
|
|
586
|
-
class:
|
|
587
|
-
style:
|
|
784
|
+
f("div", A(u.value, {
|
|
785
|
+
class: o.value,
|
|
786
|
+
style: d.value,
|
|
588
787
|
role: "dialog",
|
|
589
788
|
"aria-modal": "true",
|
|
590
|
-
"aria-labelledby":
|
|
789
|
+
"aria-labelledby": y
|
|
591
790
|
}), [
|
|
592
|
-
f("header",
|
|
791
|
+
f("header", Ft, [
|
|
593
792
|
f("div", {
|
|
594
|
-
id:
|
|
793
|
+
id: y,
|
|
595
794
|
class: "mu-modal__title",
|
|
596
|
-
"data-status":
|
|
795
|
+
"data-status": n.value.status
|
|
597
796
|
}, [
|
|
598
|
-
|
|
599
|
-
|
|
797
|
+
x(m.$slots, "title", {}, () => [
|
|
798
|
+
G(O(n.value.title), 1)
|
|
600
799
|
], !0)
|
|
601
|
-
], 8,
|
|
602
|
-
|
|
800
|
+
], 8, Ut),
|
|
801
|
+
n.value.closable ? (v(), h("button", {
|
|
603
802
|
key: 0,
|
|
604
803
|
type: "button",
|
|
605
804
|
class: "mu-modal__close",
|
|
606
805
|
"aria-label": "Close dialog",
|
|
607
|
-
onClick:
|
|
608
|
-
}, [...
|
|
806
|
+
onClick: b
|
|
807
|
+
}, [...p[0] || (p[0] = [
|
|
609
808
|
f("span", {
|
|
610
809
|
class: "mu-modal__close-icon",
|
|
611
810
|
"aria-hidden": "true"
|
|
@@ -629,96 +828,96 @@ const xt = {
|
|
|
629
828
|
})
|
|
630
829
|
])
|
|
631
830
|
], -1)
|
|
632
|
-
])])) :
|
|
831
|
+
])])) : S("", !0)
|
|
633
832
|
]),
|
|
634
|
-
f("div",
|
|
635
|
-
|
|
833
|
+
f("div", qt, [
|
|
834
|
+
x(m.$slots, "default", {}, void 0, !0)
|
|
636
835
|
]),
|
|
637
|
-
m.$slots.footer || !
|
|
638
|
-
|
|
639
|
-
|
|
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), {
|
|
640
839
|
key: 0,
|
|
641
840
|
type: "ghost",
|
|
642
841
|
class: "mu-modal__cancel",
|
|
643
|
-
onClick:
|
|
842
|
+
onClick: g
|
|
644
843
|
}, {
|
|
645
|
-
default:
|
|
646
|
-
|
|
844
|
+
default: X(() => [
|
|
845
|
+
G(O(n.value.cancelText), 1)
|
|
647
846
|
]),
|
|
648
847
|
_: 1
|
|
649
848
|
})),
|
|
650
|
-
|
|
651
|
-
loading:
|
|
652
|
-
class: ["mu-modal__ok", { "mu-modal__ok--block":
|
|
653
|
-
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
|
|
654
853
|
}), {
|
|
655
|
-
default:
|
|
656
|
-
|
|
854
|
+
default: X(() => [
|
|
855
|
+
G(O(n.value.okText), 1)
|
|
657
856
|
]),
|
|
658
857
|
_: 1
|
|
659
858
|
}, 16, ["loading", "class"]))
|
|
660
859
|
], !0)
|
|
661
|
-
])) :
|
|
860
|
+
])) : S("", !0)
|
|
662
861
|
], 16)
|
|
663
|
-
])) :
|
|
862
|
+
])) : S("", !0)
|
|
664
863
|
]));
|
|
665
864
|
}
|
|
666
|
-
}),
|
|
667
|
-
function
|
|
865
|
+
}), Wt = /* @__PURE__ */ z(Xt, [["__scopeId", "data-v-e94991b0"]]);
|
|
866
|
+
function Jt(e) {
|
|
668
867
|
return e === void 0 ? null : typeof e == "function" ? e() : e;
|
|
669
868
|
}
|
|
670
|
-
function
|
|
869
|
+
function q(e = {}) {
|
|
671
870
|
return typeof globalThis.document > "u" ? Promise.resolve(!1) : new Promise((t) => {
|
|
672
871
|
const a = globalThis.document.createElement("div");
|
|
673
872
|
globalThis.document.body.appendChild(a);
|
|
674
|
-
const
|
|
675
|
-
let r = null,
|
|
676
|
-
const
|
|
873
|
+
const l = N(!0);
|
|
874
|
+
let r = null, n = !1;
|
|
875
|
+
const o = () => {
|
|
677
876
|
r && (r.unmount(), r = null), a.parentNode && a.parentNode.removeChild(a);
|
|
678
|
-
},
|
|
679
|
-
|
|
680
|
-
|
|
877
|
+
}, u = (d) => {
|
|
878
|
+
n || (n = !0, l.value = !1, queueMicrotask(() => {
|
|
879
|
+
o(), t(d);
|
|
681
880
|
}));
|
|
682
|
-
}, { content: i, ...
|
|
683
|
-
r =
|
|
881
|
+
}, { content: i, ...c } = e;
|
|
882
|
+
r = Ge({
|
|
684
883
|
render() {
|
|
685
|
-
return
|
|
686
|
-
|
|
884
|
+
return be(
|
|
885
|
+
Wt,
|
|
687
886
|
{
|
|
688
|
-
...
|
|
689
|
-
visible:
|
|
690
|
-
"onUpdate:visible": (
|
|
691
|
-
|
|
887
|
+
...c,
|
|
888
|
+
visible: l.value,
|
|
889
|
+
"onUpdate:visible": (d) => {
|
|
890
|
+
d || u(!1);
|
|
692
891
|
},
|
|
693
|
-
onOk: () =>
|
|
694
|
-
onCancel: () =>
|
|
695
|
-
onClose: () =>
|
|
892
|
+
onOk: () => u(!0),
|
|
893
|
+
onCancel: () => u(!1),
|
|
894
|
+
onClose: () => u(!1)
|
|
696
895
|
},
|
|
697
896
|
{
|
|
698
|
-
default: () =>
|
|
897
|
+
default: () => Jt(i)
|
|
699
898
|
}
|
|
700
899
|
);
|
|
701
900
|
}
|
|
702
901
|
}), r.mount(a);
|
|
703
902
|
});
|
|
704
903
|
}
|
|
705
|
-
const
|
|
904
|
+
const es = {
|
|
706
905
|
/** 通用版本,透传所有 props,默认 variant='form'。 */
|
|
707
|
-
show:
|
|
906
|
+
show: q,
|
|
708
907
|
/** 通用确认弹窗,等价于 show,使用 form 形态 + 自定义 status。 */
|
|
709
|
-
confirm: (e = {}) =>
|
|
908
|
+
confirm: (e = {}) => q(e),
|
|
710
909
|
/** 反馈形态 + status='success'。 */
|
|
711
|
-
success: (e = {}) =>
|
|
910
|
+
success: (e = {}) => q({ ...e, variant: "feedback", status: "success" }),
|
|
712
911
|
/** 反馈形态 + status='danger'。 */
|
|
713
|
-
danger: (e = {}) =>
|
|
714
|
-
},
|
|
715
|
-
function
|
|
912
|
+
danger: (e = {}) => q({ ...e, variant: "feedback", status: "danger" })
|
|
913
|
+
}, $e = Symbol("MuRadioGroup"), Qt = ["horizontal", "vertical"];
|
|
914
|
+
function Yt(e, t) {
|
|
716
915
|
return typeof t == "string" && e.includes(t);
|
|
717
916
|
}
|
|
718
|
-
function
|
|
719
|
-
return
|
|
917
|
+
function ea(e) {
|
|
918
|
+
return Yt(Qt, e);
|
|
720
919
|
}
|
|
721
|
-
function
|
|
920
|
+
function Be(e = {}) {
|
|
722
921
|
return {
|
|
723
922
|
modelValue: e.modelValue,
|
|
724
923
|
value: e.value ?? !0,
|
|
@@ -727,33 +926,33 @@ function ye(e = {}) {
|
|
|
727
926
|
name: e.name
|
|
728
927
|
};
|
|
729
928
|
}
|
|
730
|
-
function
|
|
929
|
+
function Te(e = {}) {
|
|
731
930
|
return {
|
|
732
931
|
modelValue: e.modelValue,
|
|
733
932
|
defaultValue: e.defaultValue,
|
|
734
933
|
disabled: e.disabled ?? !1,
|
|
735
934
|
name: e.name,
|
|
736
|
-
direction:
|
|
935
|
+
direction: ea(e.direction) ? e.direction : "horizontal"
|
|
737
936
|
};
|
|
738
937
|
}
|
|
739
|
-
function
|
|
938
|
+
function ta(e = {}) {
|
|
740
939
|
return e.modelValue !== void 0;
|
|
741
940
|
}
|
|
742
|
-
function
|
|
941
|
+
function aa(e = {}) {
|
|
743
942
|
return e.modelValue !== void 0;
|
|
744
943
|
}
|
|
745
944
|
function te(e, t) {
|
|
746
945
|
return Object.is(e, t);
|
|
747
946
|
}
|
|
748
|
-
function
|
|
749
|
-
const a =
|
|
750
|
-
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;
|
|
751
950
|
}
|
|
752
|
-
function
|
|
753
|
-
const t =
|
|
951
|
+
function la(e = {}) {
|
|
952
|
+
const t = Te(e), a = ["mu-radio-group", `mu-radio-group--${t.direction}`];
|
|
754
953
|
return t.disabled && a.push("is-disabled"), a;
|
|
755
954
|
}
|
|
756
|
-
const
|
|
955
|
+
const na = ["checked", "disabled", "name", "value"], oa = { class: "mu-radio__label" }, ua = /* @__PURE__ */ H({
|
|
757
956
|
inheritAttrs: !1,
|
|
758
957
|
__name: "Radio",
|
|
759
958
|
props: {
|
|
@@ -765,68 +964,68 @@ const Dt = ["checked", "disabled", "name", "value"], Et = { class: "mu-radio__la
|
|
|
765
964
|
},
|
|
766
965
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
767
966
|
setup(e, { emit: t }) {
|
|
768
|
-
const a = e,
|
|
769
|
-
() =>
|
|
770
|
-
),
|
|
771
|
-
|
|
772
|
-
checked:
|
|
773
|
-
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
|
|
774
973
|
}),
|
|
775
974
|
r.class
|
|
776
|
-
]),
|
|
777
|
-
const { class: m, style:
|
|
975
|
+
]), T = s(() => {
|
|
976
|
+
const { class: m, style: p, ...B } = r;
|
|
778
977
|
return B;
|
|
779
|
-
}),
|
|
780
|
-
function
|
|
781
|
-
|
|
978
|
+
}), w = s(() => r.style);
|
|
979
|
+
function b(m, p) {
|
|
980
|
+
u.value || (i.value = !0), l("update:modelValue", m), l("change", m, p);
|
|
782
981
|
}
|
|
783
|
-
function
|
|
784
|
-
if (
|
|
982
|
+
function g(m) {
|
|
983
|
+
if (d.value)
|
|
785
984
|
return;
|
|
786
|
-
const
|
|
787
|
-
if (
|
|
788
|
-
|
|
789
|
-
B && (B.checked =
|
|
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);
|
|
790
989
|
});
|
|
791
990
|
return;
|
|
792
991
|
}
|
|
793
|
-
|
|
794
|
-
B && (B.checked =
|
|
992
|
+
b(p, m), j(() => {
|
|
993
|
+
B && (B.checked = c.value);
|
|
795
994
|
});
|
|
796
995
|
}
|
|
797
|
-
function
|
|
798
|
-
|
|
996
|
+
function M(m) {
|
|
997
|
+
l("focus", m);
|
|
799
998
|
}
|
|
800
|
-
function
|
|
801
|
-
|
|
999
|
+
function $(m) {
|
|
1000
|
+
l("blur", m);
|
|
802
1001
|
}
|
|
803
|
-
return (m,
|
|
804
|
-
class:
|
|
805
|
-
style:
|
|
1002
|
+
return (m, p) => (v(), h("label", A(T.value, {
|
|
1003
|
+
class: C.value,
|
|
1004
|
+
style: w.value
|
|
806
1005
|
}), [
|
|
807
1006
|
f("input", {
|
|
808
1007
|
class: "mu-radio__input",
|
|
809
1008
|
type: "radio",
|
|
810
|
-
checked:
|
|
811
|
-
disabled:
|
|
812
|
-
name:
|
|
813
|
-
value:
|
|
814
|
-
onChange:
|
|
815
|
-
onFocus:
|
|
816
|
-
onBlur:
|
|
817
|
-
}, null, 40,
|
|
818
|
-
|
|
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", {
|
|
819
1018
|
class: "mu-radio__control",
|
|
820
1019
|
"aria-hidden": "true"
|
|
821
1020
|
}, [
|
|
822
1021
|
f("span", { class: "mu-radio__dot" })
|
|
823
1022
|
], -1)),
|
|
824
|
-
f("span",
|
|
825
|
-
|
|
1023
|
+
f("span", oa, [
|
|
1024
|
+
x(m.$slots, "default", {}, void 0, !0)
|
|
826
1025
|
])
|
|
827
1026
|
], 16));
|
|
828
1027
|
}
|
|
829
|
-
}),
|
|
1028
|
+
}), ts = /* @__PURE__ */ z(ua, [["__scopeId", "data-v-f1283749"]]), ia = /* @__PURE__ */ H({
|
|
830
1029
|
inheritAttrs: !1,
|
|
831
1030
|
__name: "RadioGroup",
|
|
832
1031
|
props: {
|
|
@@ -838,37 +1037,37 @@ const Dt = ["checked", "disabled", "name", "value"], Et = { class: "mu-radio__la
|
|
|
838
1037
|
},
|
|
839
1038
|
emits: ["update:modelValue", "change"],
|
|
840
1039
|
setup(e, { emit: t }) {
|
|
841
|
-
const a = e,
|
|
842
|
-
() =>
|
|
843
|
-
),
|
|
844
|
-
const { class:
|
|
845
|
-
return
|
|
846
|
-
}),
|
|
847
|
-
function
|
|
848
|
-
|
|
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));
|
|
849
1048
|
}
|
|
850
|
-
return
|
|
1049
|
+
return le($e, {
|
|
851
1050
|
value: i,
|
|
852
|
-
disabled:
|
|
853
|
-
name:
|
|
854
|
-
select:
|
|
855
|
-
}), (
|
|
1051
|
+
disabled: c,
|
|
1052
|
+
name: d,
|
|
1053
|
+
select: T
|
|
1054
|
+
}), (w, b) => (v(), h("div", A(k.value, {
|
|
856
1055
|
role: "radiogroup",
|
|
857
|
-
class:
|
|
858
|
-
style:
|
|
1056
|
+
class: y.value,
|
|
1057
|
+
style: C.value
|
|
859
1058
|
}), [
|
|
860
|
-
|
|
1059
|
+
x(w.$slots, "default", {}, void 0, !0)
|
|
861
1060
|
], 16));
|
|
862
1061
|
}
|
|
863
|
-
}),
|
|
864
|
-
function
|
|
1062
|
+
}), as = /* @__PURE__ */ z(ia, [["__scopeId", "data-v-3879fec4"]]), ra = ["circle", "round", "line"], ca = ["small", "medium"];
|
|
1063
|
+
function Me(e, t) {
|
|
865
1064
|
return typeof t == "string" && e.includes(t);
|
|
866
1065
|
}
|
|
867
|
-
function
|
|
868
|
-
return
|
|
1066
|
+
function da(e) {
|
|
1067
|
+
return Me(ra, e);
|
|
869
1068
|
}
|
|
870
|
-
function
|
|
871
|
-
return
|
|
1069
|
+
function fa(e) {
|
|
1070
|
+
return Me(ca, e);
|
|
872
1071
|
}
|
|
873
1072
|
function ae(e = {}) {
|
|
874
1073
|
return {
|
|
@@ -876,8 +1075,8 @@ function ae(e = {}) {
|
|
|
876
1075
|
defaultChecked: e.defaultChecked ?? !1,
|
|
877
1076
|
disabled: e.disabled ?? !1,
|
|
878
1077
|
loading: e.loading ?? !1,
|
|
879
|
-
type:
|
|
880
|
-
size:
|
|
1078
|
+
type: da(e.type) ? e.type : "circle",
|
|
1079
|
+
size: fa(e.size) ? e.size : "medium",
|
|
881
1080
|
checkedValue: e.checkedValue ?? !0,
|
|
882
1081
|
uncheckedValue: e.uncheckedValue ?? !1,
|
|
883
1082
|
checkedColor: e.checkedColor,
|
|
@@ -887,35 +1086,35 @@ function ae(e = {}) {
|
|
|
887
1086
|
uncheckedText: e.uncheckedText
|
|
888
1087
|
};
|
|
889
1088
|
}
|
|
890
|
-
function
|
|
1089
|
+
function va(e = {}) {
|
|
891
1090
|
return e.modelValue !== void 0;
|
|
892
1091
|
}
|
|
893
|
-
function
|
|
1092
|
+
function Se(e, t) {
|
|
894
1093
|
return Object.is(e, t.checkedValue);
|
|
895
1094
|
}
|
|
896
|
-
function
|
|
897
|
-
return
|
|
1095
|
+
function ma(e, t) {
|
|
1096
|
+
return Se(e, t) ? t.uncheckedValue : t.checkedValue;
|
|
898
1097
|
}
|
|
899
|
-
function
|
|
1098
|
+
function ha(e) {
|
|
900
1099
|
return e.type !== "line" && e.size !== "small";
|
|
901
1100
|
}
|
|
902
|
-
function
|
|
903
|
-
const a = ae(e),
|
|
904
|
-
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;
|
|
905
1104
|
}
|
|
906
|
-
const
|
|
1105
|
+
const ba = ["aria-checked", "disabled"], ga = {
|
|
907
1106
|
class: "mu-switch__thumb",
|
|
908
1107
|
"aria-hidden": "true"
|
|
909
|
-
},
|
|
1108
|
+
}, ka = {
|
|
910
1109
|
key: 0,
|
|
911
1110
|
class: "mu-switch__loading-icon",
|
|
912
1111
|
viewBox: "0 0 16 16",
|
|
913
1112
|
fill: "none",
|
|
914
1113
|
xmlns: "http://www.w3.org/2000/svg"
|
|
915
|
-
},
|
|
1114
|
+
}, Ca = {
|
|
916
1115
|
key: 0,
|
|
917
1116
|
class: "mu-switch__label"
|
|
918
|
-
},
|
|
1117
|
+
}, _a = /* @__PURE__ */ H({
|
|
919
1118
|
inheritAttrs: !1,
|
|
920
1119
|
__name: "Switch",
|
|
921
1120
|
props: {
|
|
@@ -935,136 +1134,136 @@ const Qt = ["aria-checked", "disabled"], Yt = {
|
|
|
935
1134
|
},
|
|
936
1135
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
937
1136
|
setup(e, { emit: t }) {
|
|
938
|
-
const a = e,
|
|
939
|
-
|
|
940
|
-
),
|
|
941
|
-
() =>
|
|
942
|
-
),
|
|
943
|
-
|
|
944
|
-
checked:
|
|
945
|
-
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
|
|
946
1145
|
}),
|
|
947
1146
|
{
|
|
948
|
-
"has-label":
|
|
1147
|
+
"has-label": w.value
|
|
949
1148
|
},
|
|
950
1149
|
r.class
|
|
951
|
-
]),
|
|
952
|
-
const { class:
|
|
953
|
-
return
|
|
954
|
-
}),
|
|
955
|
-
const
|
|
956
|
-
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];
|
|
957
1156
|
});
|
|
958
|
-
function
|
|
1157
|
+
function $() {
|
|
959
1158
|
}
|
|
960
|
-
function m(
|
|
961
|
-
const
|
|
962
|
-
if (!
|
|
1159
|
+
function m(_) {
|
|
1160
|
+
const L = c.value.beforeChange;
|
|
1161
|
+
if (!L)
|
|
963
1162
|
return !0;
|
|
964
1163
|
try {
|
|
965
|
-
const
|
|
966
|
-
return
|
|
1164
|
+
const V = L(_);
|
|
1165
|
+
return V instanceof Promise ? (o.value = !0, V.then((P) => P !== !1).catch(() => !1)) : V !== !1;
|
|
967
1166
|
} catch {
|
|
968
1167
|
return !1;
|
|
969
1168
|
}
|
|
970
1169
|
}
|
|
971
|
-
function
|
|
972
|
-
|
|
1170
|
+
function p(_, L) {
|
|
1171
|
+
d.value || (i.value = _), l("update:modelValue", _), l("change", _, L);
|
|
973
1172
|
}
|
|
974
|
-
function B(
|
|
975
|
-
if (
|
|
1173
|
+
function B(_) {
|
|
1174
|
+
if (c.value.disabled || C.value)
|
|
976
1175
|
return;
|
|
977
|
-
const
|
|
978
|
-
if (
|
|
979
|
-
|
|
980
|
-
|
|
1176
|
+
const L = ma(y.value, c.value), V = m(L);
|
|
1177
|
+
if (V instanceof Promise) {
|
|
1178
|
+
V.then((P) => {
|
|
1179
|
+
P && p(L, _);
|
|
981
1180
|
}).finally(() => {
|
|
982
|
-
|
|
1181
|
+
o.value = !1;
|
|
983
1182
|
});
|
|
984
1183
|
return;
|
|
985
1184
|
}
|
|
986
|
-
|
|
1185
|
+
V && p(L, _);
|
|
987
1186
|
}
|
|
988
|
-
function
|
|
989
|
-
|
|
1187
|
+
function I(_) {
|
|
1188
|
+
l("focus", _);
|
|
990
1189
|
}
|
|
991
|
-
function
|
|
992
|
-
|
|
1190
|
+
function Y(_) {
|
|
1191
|
+
l("blur", _);
|
|
993
1192
|
}
|
|
994
|
-
return (
|
|
1193
|
+
return (_, L) => (v(), h("button", A(g.value, {
|
|
995
1194
|
type: "button",
|
|
996
1195
|
role: "switch",
|
|
997
|
-
class:
|
|
998
|
-
style:
|
|
999
|
-
"aria-checked":
|
|
1000
|
-
disabled:
|
|
1196
|
+
class: b.value,
|
|
1197
|
+
style: M.value,
|
|
1198
|
+
"aria-checked": k.value ? "true" : "false",
|
|
1199
|
+
disabled: c.value.disabled || C.value,
|
|
1001
1200
|
onClick: B,
|
|
1002
|
-
onFocus:
|
|
1003
|
-
onBlur:
|
|
1201
|
+
onFocus: I,
|
|
1202
|
+
onBlur: Y
|
|
1004
1203
|
}), [
|
|
1005
|
-
|
|
1204
|
+
L[1] || (L[1] = f("span", {
|
|
1006
1205
|
class: "mu-switch__line-track",
|
|
1007
1206
|
"aria-hidden": "true"
|
|
1008
1207
|
}, null, -1)),
|
|
1009
|
-
f("span",
|
|
1010
|
-
|
|
1208
|
+
f("span", ga, [
|
|
1209
|
+
C.value ? (v(), h("svg", ka, [...L[0] || (L[0] = [
|
|
1011
1210
|
f("path", {
|
|
1012
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",
|
|
1013
1212
|
fill: "currentColor"
|
|
1014
1213
|
}, null, -1)
|
|
1015
|
-
])])) :
|
|
1214
|
+
])])) : k.value ? x(_.$slots, "checked-icon", { key: 1 }, void 0, !0) : x(_.$slots, "unchecked-icon", { key: 2 }, void 0, !0)
|
|
1016
1215
|
]),
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
], !0) :
|
|
1021
|
-
|
|
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)
|
|
1022
1221
|
], !0)
|
|
1023
|
-
])) :
|
|
1024
|
-
], 16,
|
|
1222
|
+
])) : S("", !0)
|
|
1223
|
+
], 16, ba));
|
|
1025
1224
|
}
|
|
1026
|
-
}),
|
|
1027
|
-
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) {
|
|
1028
1227
|
return typeof t == "string" && e.includes(t);
|
|
1029
1228
|
}
|
|
1030
|
-
function
|
|
1031
|
-
return
|
|
1229
|
+
function $a(e) {
|
|
1230
|
+
return Q(ya, e);
|
|
1032
1231
|
}
|
|
1033
|
-
function
|
|
1034
|
-
return
|
|
1232
|
+
function Ba(e) {
|
|
1233
|
+
return Q(wa, e);
|
|
1035
1234
|
}
|
|
1036
|
-
function
|
|
1037
|
-
return
|
|
1235
|
+
function Ta(e) {
|
|
1236
|
+
return Q(Va, e);
|
|
1038
1237
|
}
|
|
1039
|
-
function
|
|
1040
|
-
return
|
|
1238
|
+
function Ma(e) {
|
|
1239
|
+
return Q(xa, e);
|
|
1041
1240
|
}
|
|
1042
|
-
function
|
|
1043
|
-
const t = e, a =
|
|
1241
|
+
function Pe(e = {}) {
|
|
1242
|
+
const t = e, a = $a(t.variant) ? t.variant : "line";
|
|
1044
1243
|
return {
|
|
1045
1244
|
modelValue: e.modelValue,
|
|
1046
1245
|
defaultValue: e.defaultValue,
|
|
1047
1246
|
variant: a,
|
|
1048
|
-
appearance: a === "segment" &&
|
|
1049
|
-
size:
|
|
1050
|
-
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",
|
|
1051
1250
|
disabled: e.disabled ?? !1
|
|
1052
1251
|
};
|
|
1053
1252
|
}
|
|
1054
|
-
function
|
|
1253
|
+
function Sa(e) {
|
|
1055
1254
|
return {
|
|
1056
1255
|
value: e.value,
|
|
1057
1256
|
disabled: e.disabled ?? !1
|
|
1058
1257
|
};
|
|
1059
1258
|
}
|
|
1060
|
-
function
|
|
1259
|
+
function La(e = {}) {
|
|
1061
1260
|
return e.modelValue !== void 0;
|
|
1062
1261
|
}
|
|
1063
|
-
function
|
|
1262
|
+
function Ne(e, t) {
|
|
1064
1263
|
return Object.is(e, t);
|
|
1065
1264
|
}
|
|
1066
|
-
function
|
|
1067
|
-
const t =
|
|
1265
|
+
function Pa(e = {}) {
|
|
1266
|
+
const t = Pe(e), a = [
|
|
1068
1267
|
"mu-tabs",
|
|
1069
1268
|
`mu-tabs--variant-${t.variant}`,
|
|
1070
1269
|
`mu-tabs--size-${t.size}`,
|
|
@@ -1072,19 +1271,19 @@ function va(e = {}) {
|
|
|
1072
1271
|
];
|
|
1073
1272
|
return t.variant === "segment" && a.push(`mu-tabs--appearance-${t.appearance}`), t.disabled && a.push("is-disabled"), a;
|
|
1074
1273
|
}
|
|
1075
|
-
function
|
|
1274
|
+
function Na(e, t = {}) {
|
|
1076
1275
|
const a = ["mu-tab"];
|
|
1077
1276
|
return t.active && a.push("is-active"), (t.disabled || e.disabled) && a.push("is-disabled"), a;
|
|
1078
1277
|
}
|
|
1079
|
-
const
|
|
1278
|
+
const Ha = ["aria-selected", "disabled"], za = {
|
|
1080
1279
|
key: 0,
|
|
1081
1280
|
class: "mu-tab__prefix",
|
|
1082
1281
|
"aria-hidden": "true"
|
|
1083
|
-
},
|
|
1282
|
+
}, Ia = { class: "mu-tab__content" }, Oa = {
|
|
1084
1283
|
key: 1,
|
|
1085
1284
|
class: "mu-tab__suffix",
|
|
1086
1285
|
"aria-hidden": "true"
|
|
1087
|
-
},
|
|
1286
|
+
}, Aa = /* @__PURE__ */ H({
|
|
1088
1287
|
inheritAttrs: !1,
|
|
1089
1288
|
__name: "Tab",
|
|
1090
1289
|
props: {
|
|
@@ -1093,63 +1292,63 @@ const ha = ["aria-selected", "disabled"], pa = {
|
|
|
1093
1292
|
},
|
|
1094
1293
|
emits: ["click"],
|
|
1095
1294
|
setup(e, { emit: t }) {
|
|
1096
|
-
const a = e,
|
|
1097
|
-
() =>
|
|
1098
|
-
),
|
|
1099
|
-
() => i.value.disabled || !!(
|
|
1100
|
-
),
|
|
1101
|
-
|
|
1102
|
-
active:
|
|
1103
|
-
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
|
|
1104
1303
|
}),
|
|
1105
1304
|
r.class
|
|
1106
|
-
]),
|
|
1107
|
-
const { class:
|
|
1108
|
-
return
|
|
1109
|
-
}),
|
|
1110
|
-
function
|
|
1111
|
-
!
|
|
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);
|
|
1112
1311
|
}
|
|
1113
|
-
function
|
|
1114
|
-
if (
|
|
1115
|
-
|
|
1312
|
+
function w(b) {
|
|
1313
|
+
if (d.value) {
|
|
1314
|
+
b.preventDefault(), b.stopPropagation();
|
|
1116
1315
|
return;
|
|
1117
1316
|
}
|
|
1118
|
-
|
|
1317
|
+
o && o.select(i.value.value, b), l("click", b);
|
|
1119
1318
|
}
|
|
1120
|
-
return
|
|
1121
|
-
|
|
1122
|
-
}),
|
|
1123
|
-
|
|
1124
|
-
}),
|
|
1319
|
+
return ne(() => {
|
|
1320
|
+
T();
|
|
1321
|
+
}), oe(() => {
|
|
1322
|
+
o == null || o.unregisterItem(i.value.value);
|
|
1323
|
+
}), ue(
|
|
1125
1324
|
() => i.value.value,
|
|
1126
|
-
(
|
|
1127
|
-
!
|
|
1325
|
+
(b, g) => {
|
|
1326
|
+
!o || !u.value || (o.unregisterItem(g), o.registerItem(b, u.value));
|
|
1128
1327
|
}
|
|
1129
|
-
), (
|
|
1328
|
+
), (b, g) => (v(), h("button", A({
|
|
1130
1329
|
ref_key: "buttonRef",
|
|
1131
|
-
ref:
|
|
1132
|
-
},
|
|
1330
|
+
ref: u
|
|
1331
|
+
}, k.value, {
|
|
1133
1332
|
type: "button",
|
|
1134
1333
|
role: "tab",
|
|
1135
|
-
class:
|
|
1136
|
-
style:
|
|
1137
|
-
"aria-selected":
|
|
1138
|
-
disabled:
|
|
1139
|
-
onClick:
|
|
1334
|
+
class: y.value,
|
|
1335
|
+
style: C.value,
|
|
1336
|
+
"aria-selected": c.value ? "true" : "false",
|
|
1337
|
+
disabled: d.value,
|
|
1338
|
+
onClick: w
|
|
1140
1339
|
}), [
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
])) :
|
|
1144
|
-
f("span",
|
|
1145
|
-
|
|
1340
|
+
D(n).prefix ? (v(), h("span", za, [
|
|
1341
|
+
x(b.$slots, "prefix", {}, void 0, !0)
|
|
1342
|
+
])) : S("", !0),
|
|
1343
|
+
f("span", Ia, [
|
|
1344
|
+
x(b.$slots, "default", {}, void 0, !0)
|
|
1146
1345
|
]),
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
])) :
|
|
1150
|
-
], 16,
|
|
1346
|
+
D(n).suffix ? (v(), h("span", Oa, [
|
|
1347
|
+
x(b.$slots, "suffix", {}, void 0, !0)
|
|
1348
|
+
])) : S("", !0)
|
|
1349
|
+
], 16, Ha));
|
|
1151
1350
|
}
|
|
1152
|
-
}),
|
|
1351
|
+
}), ls = /* @__PURE__ */ z(Aa, [["__scopeId", "data-v-97f04990"]]), Ra = /* @__PURE__ */ H({
|
|
1153
1352
|
inheritAttrs: !1,
|
|
1154
1353
|
__name: "Tabs",
|
|
1155
1354
|
props: {
|
|
@@ -1163,109 +1362,109 @@ const ha = ["aria-selected", "disabled"], pa = {
|
|
|
1163
1362
|
},
|
|
1164
1363
|
emits: ["update:modelValue", "change"],
|
|
1165
1364
|
setup(e, { emit: t }) {
|
|
1166
|
-
const a = e,
|
|
1167
|
-
() =>
|
|
1168
|
-
),
|
|
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({
|
|
1169
1368
|
transform: "translateX(0px)",
|
|
1170
1369
|
width: "0px"
|
|
1171
|
-
}),
|
|
1172
|
-
const { class:
|
|
1173
|
-
return
|
|
1174
|
-
}),
|
|
1370
|
+
}), $ = s(() => [Pa(a), r.class]), m = s(() => {
|
|
1371
|
+
const { class: V, style: P, ...ee } = r;
|
|
1372
|
+
return ee;
|
|
1373
|
+
}), p = s(() => r.style);
|
|
1175
1374
|
function B() {
|
|
1176
|
-
const
|
|
1177
|
-
if (!
|
|
1178
|
-
|
|
1375
|
+
const V = n.value, P = c.value !== void 0 ? g.get(c.value) : void 0;
|
|
1376
|
+
if (!V || !P) {
|
|
1377
|
+
M.value = {
|
|
1179
1378
|
transform: "translateX(0px)",
|
|
1180
1379
|
width: "0px"
|
|
1181
1380
|
};
|
|
1182
1381
|
return;
|
|
1183
1382
|
}
|
|
1184
|
-
const
|
|
1185
|
-
|
|
1186
|
-
transform: `translateX(${
|
|
1187
|
-
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`
|
|
1188
1387
|
};
|
|
1189
1388
|
}
|
|
1190
|
-
function
|
|
1191
|
-
|
|
1389
|
+
function I() {
|
|
1390
|
+
j(() => {
|
|
1192
1391
|
B();
|
|
1193
1392
|
});
|
|
1194
1393
|
}
|
|
1195
|
-
function
|
|
1196
|
-
|
|
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));
|
|
1197
1396
|
}
|
|
1198
|
-
function
|
|
1199
|
-
|
|
1397
|
+
function _(V, P) {
|
|
1398
|
+
g.set(V, P), b.value += 1, I();
|
|
1200
1399
|
}
|
|
1201
|
-
function
|
|
1202
|
-
|
|
1400
|
+
function L(V) {
|
|
1401
|
+
g.delete(V), b.value += 1, I();
|
|
1203
1402
|
}
|
|
1204
|
-
return
|
|
1205
|
-
value:
|
|
1206
|
-
variant:
|
|
1207
|
-
appearance:
|
|
1208
|
-
size:
|
|
1209
|
-
layout:
|
|
1210
|
-
disabled:
|
|
1211
|
-
select:
|
|
1212
|
-
registerItem:
|
|
1213
|
-
unregisterItem:
|
|
1214
|
-
}),
|
|
1215
|
-
[
|
|
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],
|
|
1216
1415
|
() => {
|
|
1217
|
-
|
|
1416
|
+
I();
|
|
1218
1417
|
},
|
|
1219
1418
|
{ flush: "post" }
|
|
1220
|
-
),
|
|
1221
|
-
globalThis.window.addEventListener("resize", B),
|
|
1222
|
-
B(),
|
|
1419
|
+
), ne(() => {
|
|
1420
|
+
globalThis.window.addEventListener("resize", B), j(() => {
|
|
1421
|
+
B(), w.value = !0;
|
|
1223
1422
|
});
|
|
1224
|
-
}),
|
|
1423
|
+
}), oe(() => {
|
|
1225
1424
|
globalThis.window.removeEventListener("resize", B);
|
|
1226
|
-
}), (
|
|
1425
|
+
}), (V, P) => (v(), h("div", A({
|
|
1227
1426
|
ref_key: "rootRef",
|
|
1228
|
-
ref:
|
|
1427
|
+
ref: n
|
|
1229
1428
|
}, m.value, {
|
|
1230
1429
|
role: "tablist",
|
|
1231
|
-
class: [
|
|
1232
|
-
style:
|
|
1430
|
+
class: [$.value, { "is-ready": w.value }],
|
|
1431
|
+
style: p.value
|
|
1233
1432
|
}), [
|
|
1234
|
-
|
|
1433
|
+
x(V.$slots, "default", {}, void 0, !0),
|
|
1235
1434
|
f("span", {
|
|
1236
1435
|
class: "mu-tabs__indicator",
|
|
1237
|
-
style:
|
|
1436
|
+
style: he(M.value),
|
|
1238
1437
|
"aria-hidden": "true"
|
|
1239
1438
|
}, null, 4)
|
|
1240
1439
|
], 16));
|
|
1241
1440
|
}
|
|
1242
|
-
}),
|
|
1243
|
-
function
|
|
1441
|
+
}), ns = /* @__PURE__ */ z(Ra, [["__scopeId", "data-v-28e8c4f7"]]), Da = ["outline", "solid", "soft"];
|
|
1442
|
+
function Ga(e, t) {
|
|
1244
1443
|
return typeof t == "string" && e.includes(t);
|
|
1245
1444
|
}
|
|
1246
|
-
function
|
|
1247
|
-
return
|
|
1445
|
+
function Ea(e) {
|
|
1446
|
+
return Ga(Da, e);
|
|
1248
1447
|
}
|
|
1249
|
-
function
|
|
1448
|
+
function He(e = {}) {
|
|
1250
1449
|
return {
|
|
1251
|
-
variant:
|
|
1450
|
+
variant: Ea(e.variant) ? e.variant : "outline",
|
|
1252
1451
|
selected: e.selected ?? !1,
|
|
1253
1452
|
disabled: e.disabled ?? !1
|
|
1254
1453
|
};
|
|
1255
1454
|
}
|
|
1256
|
-
function
|
|
1257
|
-
const t =
|
|
1455
|
+
function ja(e = {}) {
|
|
1456
|
+
const t = He(e), a = ["mu-tag", `mu-tag--variant-${t.variant}`];
|
|
1258
1457
|
return t.selected && a.push("is-selected"), t.disabled && a.push("is-disabled"), a;
|
|
1259
1458
|
}
|
|
1260
|
-
const
|
|
1459
|
+
const Za = ["disabled", "aria-pressed"], Fa = {
|
|
1261
1460
|
key: 0,
|
|
1262
1461
|
class: "mu-tag__prefix",
|
|
1263
1462
|
"aria-hidden": "true"
|
|
1264
|
-
},
|
|
1463
|
+
}, Ua = { class: "mu-tag__content" }, qa = {
|
|
1265
1464
|
key: 1,
|
|
1266
1465
|
class: "mu-tag__suffix",
|
|
1267
1466
|
"aria-hidden": "true"
|
|
1268
|
-
},
|
|
1467
|
+
}, Ka = /* @__PURE__ */ H({
|
|
1269
1468
|
__name: "Tag",
|
|
1270
1469
|
props: {
|
|
1271
1470
|
variant: {},
|
|
@@ -1274,41 +1473,43 @@ const xa = ["disabled", "aria-pressed"], Ta = {
|
|
|
1274
1473
|
},
|
|
1275
1474
|
emits: ["update:selected", "click"],
|
|
1276
1475
|
setup(e, { emit: t }) {
|
|
1277
|
-
const a = e,
|
|
1278
|
-
function
|
|
1279
|
-
|
|
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));
|
|
1280
1479
|
}
|
|
1281
|
-
return (i,
|
|
1480
|
+
return (i, c) => (v(), h("button", {
|
|
1282
1481
|
type: "button",
|
|
1283
|
-
class:
|
|
1284
|
-
disabled:
|
|
1285
|
-
"aria-pressed":
|
|
1286
|
-
onClick:
|
|
1482
|
+
class: W(o.value),
|
|
1483
|
+
disabled: n.value.disabled,
|
|
1484
|
+
"aria-pressed": n.value.selected,
|
|
1485
|
+
onClick: u
|
|
1287
1486
|
}, [
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
])) :
|
|
1291
|
-
f("span",
|
|
1292
|
-
|
|
1487
|
+
D(r).prefix ? (v(), h("span", Fa, [
|
|
1488
|
+
x(i.$slots, "prefix", {}, void 0, !0)
|
|
1489
|
+
])) : S("", !0),
|
|
1490
|
+
f("span", Ua, [
|
|
1491
|
+
x(i.$slots, "default", {}, void 0, !0)
|
|
1293
1492
|
]),
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
])) :
|
|
1297
|
-
], 10,
|
|
1493
|
+
D(r).suffix ? (v(), h("span", qa, [
|
|
1494
|
+
x(i.$slots, "suffix", {}, void 0, !0)
|
|
1495
|
+
])) : S("", !0)
|
|
1496
|
+
], 10, Za));
|
|
1298
1497
|
}
|
|
1299
|
-
}),
|
|
1498
|
+
}), os = /* @__PURE__ */ z(Ka, [["__scopeId", "data-v-e3e9ee4d"]]);
|
|
1300
1499
|
export {
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
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,
|
|
1514
|
+
q as openMuModal
|
|
1314
1515
|
};
|