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