@mureka-fe/ui 1.1.6 → 2.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 +22 -17
- package/dist/src/components/button/Button.vue.d.ts.map +1 -1
- package/dist/src/components/tag/Tag.vue.d.ts +8 -19
- package/dist/src/components/tag/Tag.vue.d.ts.map +1 -1
- package/dist/src/components/tag/__docs__/demos/basic.demo.vue.d.ts.map +1 -1
- package/dist/src/components/tag/__docs__/demos/{preset.demo.vue.d.ts → disabled.demo.vue.d.ts} +1 -1
- package/dist/src/components/tag/__docs__/demos/disabled.demo.vue.d.ts.map +1 -0
- package/dist/src/components/tag/__docs__/demos/icon.demo.vue.d.ts.map +1 -1
- package/dist/src/components/tag/__docs__/demos/variant.demo.vue.d.ts.map +1 -1
- package/dist/src/components/tag/__docs__/meta.d.ts.map +1 -1
- package/dist/src/components/tag/index.d.ts +1 -1
- package/dist/src/components/tag/index.d.ts.map +1 -1
- package/dist/src/components/tag/tag.types.d.ts +8 -34
- package/dist/src/components/tag/tag.types.d.ts.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/ui.js +470 -589
- package/dist/ui.umd.cjs +1 -1
- package/package.json +1 -1
- package/dist/src/components/tag/__docs__/demos/preset.demo.vue.d.ts.map +0 -1
- package/dist/src/components/tag/__docs__/demos/size.demo.vue.d.ts +0 -3
- package/dist/src/components/tag/__docs__/demos/size.demo.vue.d.ts.map +0 -1
package/dist/ui.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
function
|
|
1
|
+
import { defineComponent as I, useSlots as X, useAttrs as D, computed as o, openBlock as v, createElementBlock as p, normalizeClass as te, normalizeStyle as fe, createElementVNode as h, renderSlot as w, createCommentVNode as S, reactive as Ve, h as ve, createVNode as Me, TransitionGroup as Be, withCtx as W, Fragment as Se, renderList as Ne, createBlock as U, resolveDynamicComponent as ze, unref as L, toDisplayString as A, onMounted as ae, onBeforeUnmount as se, watch as ne, Teleport as Ie, mergeProps as R, createTextVNode as j, ref as z, createApp as Pe, inject as me, nextTick as K, provide as he } from "vue";
|
|
2
|
+
function oe(e = {}) {
|
|
3
3
|
return {
|
|
4
4
|
type: e.type ?? "primary",
|
|
5
5
|
status: e.status,
|
|
@@ -13,8 +13,8 @@ function ie(e = {}) {
|
|
|
13
13
|
nativeType: e.nativeType ?? "button"
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
|
-
function
|
|
17
|
-
const t =
|
|
16
|
+
function Le(e = {}) {
|
|
17
|
+
const t = oe(e), a = [
|
|
18
18
|
"mu-button",
|
|
19
19
|
`mu-button--${t.type}`,
|
|
20
20
|
`mu-button--appearance-${t.appearance}`,
|
|
@@ -23,28 +23,28 @@ function Ie(e = {}) {
|
|
|
23
23
|
return t.type === "ghost" && t.ghostTextTone === "primary" && a.push(`mu-button--ghost-text-${t.ghostTextTone}`), t.shape === "pill" && a.push("mu-button--shape-pill"), t.status && a.push(`mu-button--status-${t.status}`), t.iconOnly && a.push("mu-button--icon-only"), t.disabled && a.push("is-disabled"), t.loading && a.push("is-loading"), a;
|
|
24
24
|
}
|
|
25
25
|
function Oe(e = {}) {
|
|
26
|
-
const t =
|
|
26
|
+
const t = oe(e);
|
|
27
27
|
return !t.disabled && !t.loading;
|
|
28
28
|
}
|
|
29
29
|
function Ae(e = {}) {
|
|
30
|
-
const t = e.iconOnly ?? !1, a = e.hasPrefix ?? !1,
|
|
30
|
+
const t = e.iconOnly ?? !1, a = e.hasPrefix ?? !1, n = e.hasSuffix ?? !1, r = e.loading ?? !1, s = e.hasAriaLabel ?? !1;
|
|
31
31
|
return {
|
|
32
|
-
showPrefixSlot: !t && !
|
|
33
|
-
showSuffixSlot: !t &&
|
|
34
|
-
showLoadingIndicator:
|
|
35
|
-
requiresAriaLabel: t && !
|
|
36
|
-
isInvalidIconOnlyCombination: t && (a ||
|
|
32
|
+
showPrefixSlot: !t && !r && a,
|
|
33
|
+
showSuffixSlot: !t && n,
|
|
34
|
+
showLoadingIndicator: r,
|
|
35
|
+
requiresAriaLabel: t && !s,
|
|
36
|
+
isInvalidIconOnlyCombination: t && (a || n)
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
39
|
const Re = ["type", "disabled", "aria-busy"], De = {
|
|
40
40
|
key: 0,
|
|
41
41
|
class: "mu-button__prefix",
|
|
42
42
|
"aria-hidden": "true"
|
|
43
|
-
}, Ee = { class: "mu-button__content" },
|
|
43
|
+
}, Ee = { class: "mu-button__content" }, He = {
|
|
44
44
|
key: 1,
|
|
45
45
|
class: "mu-button__suffix",
|
|
46
46
|
"aria-hidden": "true"
|
|
47
|
-
}, Ge = /* @__PURE__ */
|
|
47
|
+
}, Ge = /* @__PURE__ */ I({
|
|
48
48
|
__name: "Button",
|
|
49
49
|
props: {
|
|
50
50
|
type: { default: "primary" },
|
|
@@ -60,7 +60,7 @@ const Re = ["type", "disabled", "aria-busy"], De = {
|
|
|
60
60
|
},
|
|
61
61
|
emits: ["click"],
|
|
62
62
|
setup(e, { emit: t }) {
|
|
63
|
-
const a = e,
|
|
63
|
+
const a = e, n = t, r = X(), s = D(), l = {
|
|
64
64
|
small: {
|
|
65
65
|
width: "var(--mu-button-icon-size-small)",
|
|
66
66
|
height: "var(--mu-button-icon-size-small)"
|
|
@@ -73,62 +73,62 @@ const Re = ["type", "disabled", "aria-busy"], De = {
|
|
|
73
73
|
width: "var(--mu-button-icon-size-large)",
|
|
74
74
|
height: "var(--mu-button-icon-size-large)"
|
|
75
75
|
}
|
|
76
|
-
}, d = o(() =>
|
|
76
|
+
}, d = o(() => oe(a)), u = o(() => Le(d.value)), i = o(() => l[d.value.size]), c = o(
|
|
77
77
|
() => Ae({
|
|
78
78
|
iconOnly: d.value.iconOnly,
|
|
79
|
-
hasPrefix: !!
|
|
80
|
-
hasSuffix: !!
|
|
79
|
+
hasPrefix: !!r.prefix,
|
|
80
|
+
hasSuffix: !!r.suffix,
|
|
81
81
|
loading: d.value.loading,
|
|
82
|
-
hasDefaultSlot: !!
|
|
83
|
-
hasAriaLabel: typeof
|
|
82
|
+
hasDefaultSlot: !!r.default,
|
|
83
|
+
hasAriaLabel: typeof s["aria-label"] == "string" && s["aria-label"].trim().length > 0
|
|
84
84
|
})
|
|
85
85
|
);
|
|
86
|
-
function
|
|
86
|
+
function C(b) {
|
|
87
87
|
if (!Oe(d.value)) {
|
|
88
|
-
|
|
88
|
+
b.preventDefault(), b.stopPropagation();
|
|
89
89
|
return;
|
|
90
90
|
}
|
|
91
|
-
|
|
91
|
+
n("click", b);
|
|
92
92
|
}
|
|
93
|
-
return (
|
|
93
|
+
return (b, k) => (v(), p("button", {
|
|
94
94
|
type: d.value.nativeType,
|
|
95
|
-
class:
|
|
95
|
+
class: te(["mu-button", u.value]),
|
|
96
96
|
disabled: d.value.disabled || d.value.loading,
|
|
97
97
|
"aria-busy": d.value.loading ? "true" : void 0,
|
|
98
|
-
onClick:
|
|
98
|
+
onClick: C
|
|
99
99
|
}, [
|
|
100
|
-
|
|
101
|
-
|
|
100
|
+
c.value.showLoadingIndicator || c.value.showPrefixSlot ? (v(), p("span", De, [
|
|
101
|
+
c.value.showLoadingIndicator ? (v(), p("svg", {
|
|
102
102
|
key: 0,
|
|
103
103
|
class: "mu-button__loading-icon",
|
|
104
|
-
style:
|
|
104
|
+
style: fe(i.value),
|
|
105
105
|
viewBox: "0 0 24 24",
|
|
106
106
|
fill: "none",
|
|
107
107
|
xmlns: "http://www.w3.org/2000/svg"
|
|
108
|
-
}, [...
|
|
108
|
+
}, [...k[0] || (k[0] = [
|
|
109
109
|
h("path", {
|
|
110
110
|
d: "M2.00293 12C2.00293 6.47853 6.47853 2.00293 12 2.00293C12.5509 2.00293 12.9971 2.4491 12.9971 3C12.9971 3.5509 12.5509 3.99707 12 3.99707C7.58034 3.99707 3.99707 7.58034 3.99707 12C3.99707 16.4197 7.58034 20.0029 12 20.0029C16.4197 20.0029 20.0029 16.4197 20.0029 12C20.0029 11.4491 20.4491 11.0029 21 11.0029C21.5509 11.0029 21.9971 11.4491 21.9971 12C21.9971 17.5215 17.5215 21.9971 12 21.9971C6.47853 21.9971 2.00293 17.5215 2.00293 12Z",
|
|
111
111
|
fill: "currentColor"
|
|
112
112
|
}, null, -1)
|
|
113
|
-
])], 4)) :
|
|
113
|
+
])], 4)) : w(b.$slots, "prefix", { key: 1 }, void 0, !0)
|
|
114
114
|
])) : S("", !0),
|
|
115
115
|
h("span", Ee, [
|
|
116
|
-
|
|
116
|
+
w(b.$slots, "default", {}, void 0, !0)
|
|
117
117
|
]),
|
|
118
|
-
|
|
119
|
-
|
|
118
|
+
c.value.showSuffixSlot ? (v(), p("span", He, [
|
|
119
|
+
w(b.$slots, "suffix", {}, void 0, !0)
|
|
120
120
|
])) : S("", !0)
|
|
121
121
|
], 10, Re));
|
|
122
122
|
}
|
|
123
123
|
}), P = (e, t) => {
|
|
124
124
|
const a = e.__vccOpts || e;
|
|
125
|
-
for (const [
|
|
126
|
-
a[
|
|
125
|
+
for (const [n, r] of t)
|
|
126
|
+
a[n] = r;
|
|
127
127
|
return a;
|
|
128
|
-
},
|
|
128
|
+
}, de = /* @__PURE__ */ P(Ge, [["__scopeId", "data-v-42de128c"]]), Ue = 3e3, je = {
|
|
129
129
|
close: () => {
|
|
130
130
|
}
|
|
131
|
-
}, F =
|
|
131
|
+
}, F = Ve({
|
|
132
132
|
items: []
|
|
133
133
|
});
|
|
134
134
|
let Fe = 1;
|
|
@@ -143,27 +143,27 @@ function qe(e) {
|
|
|
143
143
|
icon: e.icon
|
|
144
144
|
};
|
|
145
145
|
}
|
|
146
|
-
function
|
|
146
|
+
function le(e) {
|
|
147
147
|
return e.duration > 0;
|
|
148
148
|
}
|
|
149
149
|
function Ke(e) {
|
|
150
150
|
return F.items.findIndex((t) => t.id === e);
|
|
151
151
|
}
|
|
152
|
-
function
|
|
152
|
+
function ge(e) {
|
|
153
153
|
return F.items.find((t) => t.id === e);
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function ie(e) {
|
|
156
156
|
const t = E.get(e);
|
|
157
157
|
t && t.timer !== null && (globalThis.clearTimeout(t.timer), t.timer = null);
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function ue(e) {
|
|
160
160
|
const t = Ke(e);
|
|
161
|
-
t < 0 || (
|
|
161
|
+
t < 0 || (ie(e), E.delete(e), F.items.splice(t, 1));
|
|
162
162
|
}
|
|
163
|
-
function
|
|
163
|
+
function pe(e, t) {
|
|
164
164
|
const a = E.get(e);
|
|
165
|
-
a && (
|
|
166
|
-
|
|
165
|
+
a && (ie(e), a.remainingDuration = t, a.deadline = Date.now() + t, a.isPaused = !1, a.timer = globalThis.setTimeout(() => {
|
|
166
|
+
ue(e);
|
|
167
167
|
}, t));
|
|
168
168
|
}
|
|
169
169
|
function Xe(e, t) {
|
|
@@ -172,63 +172,63 @@ function Xe(e, t) {
|
|
|
172
172
|
type: e,
|
|
173
173
|
title: t.title,
|
|
174
174
|
description: t.description,
|
|
175
|
-
duration: t.duration ??
|
|
175
|
+
duration: t.duration ?? Ue,
|
|
176
176
|
closable: t.closable ?? !1,
|
|
177
177
|
resetOnHover: t.resetOnHover ?? !1,
|
|
178
178
|
icon: t.icon
|
|
179
179
|
};
|
|
180
180
|
}
|
|
181
|
-
function
|
|
181
|
+
function Ze() {
|
|
182
182
|
return typeof globalThis.window < "u" && typeof globalThis.document < "u";
|
|
183
183
|
}
|
|
184
|
-
function
|
|
185
|
-
if (!
|
|
186
|
-
return
|
|
187
|
-
const a = qe(t),
|
|
188
|
-
return F.items.push(
|
|
184
|
+
function Je(e, t) {
|
|
185
|
+
if (!Ze())
|
|
186
|
+
return je;
|
|
187
|
+
const a = qe(t), n = Xe(e, a);
|
|
188
|
+
return F.items.push(n), E.set(n.id, {
|
|
189
189
|
timer: null,
|
|
190
190
|
deadline: 0,
|
|
191
|
-
remainingDuration:
|
|
191
|
+
remainingDuration: n.duration,
|
|
192
192
|
isPaused: !1
|
|
193
|
-
}),
|
|
194
|
-
close: () =>
|
|
193
|
+
}), le(n) && pe(n.id, n.duration), {
|
|
194
|
+
close: () => ue(n.id)
|
|
195
195
|
};
|
|
196
196
|
}
|
|
197
197
|
function G(e) {
|
|
198
|
-
return (t) =>
|
|
198
|
+
return (t) => Je(e, t);
|
|
199
199
|
}
|
|
200
|
-
const
|
|
200
|
+
const pa = {
|
|
201
201
|
success: G("success"),
|
|
202
202
|
warning: G("warning"),
|
|
203
203
|
loading: G("loading"),
|
|
204
204
|
error: G("error"),
|
|
205
205
|
danger: G("danger")
|
|
206
206
|
};
|
|
207
|
+
function Qe(e) {
|
|
208
|
+
ue(e);
|
|
209
|
+
}
|
|
207
210
|
function We(e) {
|
|
208
|
-
|
|
211
|
+
const t = E.get(e), a = ge(e);
|
|
212
|
+
!t || !a || t.isPaused || !a.resetOnHover || !le(a) || (t.remainingDuration = Math.max(t.deadline - Date.now(), 0), ie(e), t.isPaused = !0);
|
|
209
213
|
}
|
|
210
214
|
function Ye(e) {
|
|
211
|
-
const t = E.get(e), a =
|
|
212
|
-
!t || !a || t.isPaused || !a.resetOnHover || !
|
|
213
|
-
}
|
|
214
|
-
function et(e) {
|
|
215
|
-
const t = E.get(e), a = Ce(e);
|
|
216
|
-
!t || !a || !t.isPaused || !a.resetOnHover || !ue(a) || be(e, t.remainingDuration || a.duration);
|
|
215
|
+
const t = E.get(e), a = ge(e);
|
|
216
|
+
!t || !a || !t.isPaused || !a.resetOnHover || !le(a) || pe(e, t.remainingDuration || a.duration);
|
|
217
217
|
}
|
|
218
|
-
const
|
|
218
|
+
const et = {
|
|
219
219
|
class: "mu-message-list",
|
|
220
220
|
"aria-live": "polite",
|
|
221
221
|
"aria-atomic": "true"
|
|
222
|
-
},
|
|
222
|
+
}, tt = ["onMouseenter", "onMouseleave"], at = {
|
|
223
223
|
class: "mu-message__icon",
|
|
224
224
|
"aria-hidden": "true"
|
|
225
|
-
},
|
|
225
|
+
}, st = { class: "mu-message__content" }, nt = { class: "mu-message__title" }, ot = {
|
|
226
226
|
key: 0,
|
|
227
227
|
class: "mu-message__description"
|
|
228
|
-
},
|
|
228
|
+
}, lt = ["onClick"], it = /* @__PURE__ */ I({
|
|
229
229
|
__name: "MessageList",
|
|
230
230
|
setup(e) {
|
|
231
|
-
const t = o(() => F.items), a =
|
|
231
|
+
const t = o(() => F.items), a = I({
|
|
232
232
|
name: "MarkupIcon",
|
|
233
233
|
props: {
|
|
234
234
|
markup: {
|
|
@@ -236,24 +236,24 @@ const tt = {
|
|
|
236
236
|
required: !0
|
|
237
237
|
}
|
|
238
238
|
},
|
|
239
|
-
setup(
|
|
240
|
-
return () =>
|
|
239
|
+
setup(u) {
|
|
240
|
+
return () => ve("span", { class: "mu-message__icon-markup", innerHTML: u.markup });
|
|
241
241
|
}
|
|
242
242
|
});
|
|
243
|
-
function
|
|
244
|
-
return typeof
|
|
243
|
+
function n(u) {
|
|
244
|
+
return typeof u != "string";
|
|
245
245
|
}
|
|
246
|
-
function u
|
|
247
|
-
|
|
246
|
+
function r(u) {
|
|
247
|
+
We(u);
|
|
248
248
|
}
|
|
249
|
-
function
|
|
250
|
-
|
|
249
|
+
function s(u) {
|
|
250
|
+
Ye(u);
|
|
251
251
|
}
|
|
252
|
-
function l(
|
|
253
|
-
if (!(
|
|
252
|
+
function l(u) {
|
|
253
|
+
if (!(u instanceof globalThis.HTMLElement))
|
|
254
254
|
return;
|
|
255
|
-
const i =
|
|
256
|
-
|
|
255
|
+
const i = u.getBoundingClientRect();
|
|
256
|
+
u.style.width = `${i.width}px`, u.style.height = `${i.height}px`;
|
|
257
257
|
}
|
|
258
258
|
const d = {
|
|
259
259
|
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>',
|
|
@@ -262,37 +262,37 @@ const tt = {
|
|
|
262
262
|
error: '<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="8" stroke="currentColor" stroke-width="2"/><path d="M12 9V12.5" stroke="currentColor" stroke-width="2" stroke-linecap="round"/><circle cx="12" cy="15.5" r="1" fill="currentColor"/></svg>',
|
|
263
263
|
danger: '<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="8" stroke="currentColor" stroke-width="2"/><path d="M9 9L15 15" stroke="currentColor" stroke-width="2" stroke-linecap="round"/><path d="M15 9L9 15" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg>'
|
|
264
264
|
};
|
|
265
|
-
return (
|
|
266
|
-
|
|
265
|
+
return (u, i) => (v(), p("div", et, [
|
|
266
|
+
Me(Be, {
|
|
267
267
|
name: "mu-message-fade",
|
|
268
268
|
tag: "div",
|
|
269
269
|
class: "mu-message-list__stack",
|
|
270
270
|
onBeforeLeave: l
|
|
271
271
|
}, {
|
|
272
|
-
default:
|
|
273
|
-
(
|
|
274
|
-
key:
|
|
275
|
-
class:
|
|
272
|
+
default: W(() => [
|
|
273
|
+
(v(!0), p(Se, null, Ne(t.value, (c) => (v(), p("div", {
|
|
274
|
+
key: c.id,
|
|
275
|
+
class: te(["mu-message", [`mu-message--${c.type}`, { "mu-message--compact": !c.description }]]),
|
|
276
276
|
role: "status",
|
|
277
|
-
onMouseenter: (
|
|
278
|
-
onMouseleave: (
|
|
277
|
+
onMouseenter: (C) => r(c.id),
|
|
278
|
+
onMouseleave: (C) => s(c.id)
|
|
279
279
|
}, [
|
|
280
|
-
h("span",
|
|
281
|
-
|
|
280
|
+
h("span", at, [
|
|
281
|
+
c.icon && n(c.icon) ? (v(), U(ze(c.icon), { key: 0 })) : (v(), U(L(a), {
|
|
282
282
|
key: 1,
|
|
283
|
-
markup: typeof
|
|
283
|
+
markup: typeof c.icon == "string" ? c.icon : d[c.type]
|
|
284
284
|
}, null, 8, ["markup"]))
|
|
285
285
|
]),
|
|
286
|
-
h("div",
|
|
287
|
-
h("div",
|
|
288
|
-
|
|
286
|
+
h("div", st, [
|
|
287
|
+
h("div", nt, A(c.title), 1),
|
|
288
|
+
c.description ? (v(), p("p", ot, A(c.description), 1)) : S("", !0)
|
|
289
289
|
]),
|
|
290
|
-
|
|
290
|
+
c.closable ? (v(), p("button", {
|
|
291
291
|
key: 0,
|
|
292
292
|
type: "button",
|
|
293
293
|
class: "mu-message__close",
|
|
294
294
|
"aria-label": "Close message",
|
|
295
|
-
onClick: (
|
|
295
|
+
onClick: (C) => L(Qe)(c.id)
|
|
296
296
|
}, [...i[0] || (i[0] = [
|
|
297
297
|
h("svg", {
|
|
298
298
|
viewBox: "0 0 24 24",
|
|
@@ -306,14 +306,14 @@ const tt = {
|
|
|
306
306
|
"stroke-linecap": "round"
|
|
307
307
|
})
|
|
308
308
|
], -1)
|
|
309
|
-
])], 8,
|
|
310
|
-
], 42,
|
|
309
|
+
])], 8, lt)) : S("", !0)
|
|
310
|
+
], 42, tt))), 128))
|
|
311
311
|
]),
|
|
312
312
|
_: 1
|
|
313
313
|
})
|
|
314
314
|
]));
|
|
315
315
|
}
|
|
316
|
-
}),
|
|
316
|
+
}), ba = /* @__PURE__ */ P(it, [["__scopeId", "data-v-debf98d8"]]), ut = {
|
|
317
317
|
medium: {
|
|
318
318
|
width: "548px",
|
|
319
319
|
minHeight: "228px"
|
|
@@ -323,13 +323,13 @@ const tt = {
|
|
|
323
323
|
minHeight: "500px"
|
|
324
324
|
}
|
|
325
325
|
};
|
|
326
|
-
function
|
|
327
|
-
const t = e.size ?? "medium", a =
|
|
326
|
+
function re(e = {}) {
|
|
327
|
+
const t = e.size ?? "medium", a = ut[t], n = e.variant ?? "form";
|
|
328
328
|
return {
|
|
329
329
|
visible: e.visible ?? !1,
|
|
330
330
|
title: e.title ?? "",
|
|
331
331
|
status: e.status ?? "default",
|
|
332
|
-
variant:
|
|
332
|
+
variant: n,
|
|
333
333
|
size: t,
|
|
334
334
|
width: e.width ?? a.width,
|
|
335
335
|
minHeight: a.minHeight,
|
|
@@ -339,13 +339,13 @@ function de(e = {}) {
|
|
|
339
339
|
okText: e.okText ?? "Confirm",
|
|
340
340
|
cancelText: e.cancelText ?? "Cancel",
|
|
341
341
|
// feedback 形态默认隐藏 cancel;显式传值仍优先
|
|
342
|
-
hideCancel: e.hideCancel ??
|
|
342
|
+
hideCancel: e.hideCancel ?? n === "feedback",
|
|
343
343
|
hideOk: e.hideOk ?? !1,
|
|
344
344
|
okLoading: e.okLoading ?? !1
|
|
345
345
|
};
|
|
346
346
|
}
|
|
347
|
-
function
|
|
348
|
-
const t =
|
|
347
|
+
function rt(e = {}) {
|
|
348
|
+
const t = re(e), a = [
|
|
349
349
|
"mu-modal",
|
|
350
350
|
`mu-modal--${t.size}`,
|
|
351
351
|
`mu-modal--${t.status}`,
|
|
@@ -353,8 +353,8 @@ function ct(e = {}) {
|
|
|
353
353
|
];
|
|
354
354
|
return t.variant === "feedback" && a.push("mu-modal--feedback"), a;
|
|
355
355
|
}
|
|
356
|
-
function
|
|
357
|
-
const t =
|
|
356
|
+
function ct(e = {}) {
|
|
357
|
+
const t = re(e);
|
|
358
358
|
return t.variant === "feedback" ? {
|
|
359
359
|
type: "secondary",
|
|
360
360
|
status: t.status === "default" ? void 0 : t.status
|
|
@@ -365,13 +365,13 @@ function dt(e = {}) {
|
|
|
365
365
|
type: "primary"
|
|
366
366
|
};
|
|
367
367
|
}
|
|
368
|
-
const
|
|
368
|
+
const dt = {
|
|
369
369
|
key: 0,
|
|
370
370
|
class: "mu-modal-root"
|
|
371
|
-
},
|
|
371
|
+
}, ft = { class: "mu-modal__header" }, vt = ["data-status"], mt = { class: "mu-modal__body" }, ht = {
|
|
372
372
|
key: 0,
|
|
373
373
|
class: "mu-modal__footer"
|
|
374
|
-
}, gt = /* @__PURE__ */
|
|
374
|
+
}, gt = /* @__PURE__ */ I({
|
|
375
375
|
inheritAttrs: !1,
|
|
376
376
|
__name: "Modal",
|
|
377
377
|
props: {
|
|
@@ -392,76 +392,76 @@ const ft = {
|
|
|
392
392
|
},
|
|
393
393
|
emits: ["update:visible", "ok", "cancel", "close"],
|
|
394
394
|
setup(e, { emit: t }) {
|
|
395
|
-
const a = e,
|
|
396
|
-
const { class:
|
|
397
|
-
return
|
|
398
|
-
}),
|
|
399
|
-
() =>
|
|
400
|
-
),
|
|
395
|
+
const a = e, n = t, r = D(), s = o(() => re(a)), l = o(() => [rt(a), r.class]), d = o(() => {
|
|
396
|
+
const { class: f, style: T, ...M } = r;
|
|
397
|
+
return M;
|
|
398
|
+
}), u = o(() => ct(a)), i = o(
|
|
399
|
+
() => s.value.variant === "feedback" && s.value.hideCancel
|
|
400
|
+
), c = o(() => [
|
|
401
401
|
{
|
|
402
|
-
width:
|
|
403
|
-
minHeight:
|
|
402
|
+
width: s.value.width,
|
|
403
|
+
minHeight: s.value.minHeight
|
|
404
404
|
},
|
|
405
|
-
|
|
406
|
-
]),
|
|
407
|
-
function
|
|
408
|
-
|
|
405
|
+
r.style
|
|
406
|
+
]), C = `mu-modal-title-${Math.random().toString(36).slice(2, 10)}`, k = typeof globalThis.document < "u" ? globalThis.document : null;
|
|
407
|
+
function $() {
|
|
408
|
+
n("update:visible", !1);
|
|
409
409
|
}
|
|
410
|
-
function
|
|
411
|
-
|
|
410
|
+
function _() {
|
|
411
|
+
s.value.maskClosable && ($(), n("cancel", new globalThis.MouseEvent("click")));
|
|
412
412
|
}
|
|
413
413
|
function g() {
|
|
414
|
-
|
|
414
|
+
$(), n("close");
|
|
415
415
|
}
|
|
416
|
-
function
|
|
417
|
-
|
|
416
|
+
function V(f) {
|
|
417
|
+
n("cancel", f), $();
|
|
418
418
|
}
|
|
419
|
-
function
|
|
420
|
-
|
|
419
|
+
function N(f) {
|
|
420
|
+
n("ok", f);
|
|
421
421
|
}
|
|
422
|
-
function
|
|
423
|
-
|
|
422
|
+
function O(f) {
|
|
423
|
+
f.key !== "Escape" || !s.value.visible || !s.value.escToClose || ($(), n("close"));
|
|
424
424
|
}
|
|
425
|
-
return
|
|
426
|
-
|
|
427
|
-
}),
|
|
428
|
-
|
|
429
|
-
}),
|
|
430
|
-
() =>
|
|
431
|
-
(
|
|
432
|
-
|
|
425
|
+
return ae(() => {
|
|
426
|
+
k && k.addEventListener("keydown", O);
|
|
427
|
+
}), se(() => {
|
|
428
|
+
k && (k.removeEventListener("keydown", O), k.body.style.overflow = "");
|
|
429
|
+
}), ne(
|
|
430
|
+
() => s.value.visible,
|
|
431
|
+
(f) => {
|
|
432
|
+
k && (k.body.style.overflow = f ? "hidden" : "");
|
|
433
433
|
},
|
|
434
434
|
{ immediate: !0 }
|
|
435
|
-
), (
|
|
436
|
-
|
|
435
|
+
), (f, T) => (v(), U(Ie, { to: "body" }, [
|
|
436
|
+
s.value.visible ? (v(), p("div", dt, [
|
|
437
437
|
h("div", {
|
|
438
438
|
class: "mu-modal__mask",
|
|
439
|
-
onClick:
|
|
439
|
+
onClick: _
|
|
440
440
|
}),
|
|
441
441
|
h("div", R(d.value, {
|
|
442
442
|
class: l.value,
|
|
443
|
-
style:
|
|
443
|
+
style: c.value,
|
|
444
444
|
role: "dialog",
|
|
445
445
|
"aria-modal": "true",
|
|
446
|
-
"aria-labelledby":
|
|
446
|
+
"aria-labelledby": C
|
|
447
447
|
}), [
|
|
448
|
-
h("header",
|
|
448
|
+
h("header", ft, [
|
|
449
449
|
h("div", {
|
|
450
|
-
id:
|
|
450
|
+
id: C,
|
|
451
451
|
class: "mu-modal__title",
|
|
452
|
-
"data-status":
|
|
452
|
+
"data-status": s.value.status
|
|
453
453
|
}, [
|
|
454
|
-
|
|
455
|
-
A(
|
|
454
|
+
w(f.$slots, "title", {}, () => [
|
|
455
|
+
j(A(s.value.title), 1)
|
|
456
456
|
], !0)
|
|
457
457
|
], 8, vt),
|
|
458
|
-
|
|
458
|
+
s.value.closable ? (v(), p("button", {
|
|
459
459
|
key: 0,
|
|
460
460
|
type: "button",
|
|
461
461
|
class: "mu-modal__close",
|
|
462
462
|
"aria-label": "Close dialog",
|
|
463
463
|
onClick: g
|
|
464
|
-
}, [...
|
|
464
|
+
}, [...T[0] || (T[0] = [
|
|
465
465
|
h("span", {
|
|
466
466
|
class: "mu-modal__close-icon",
|
|
467
467
|
"aria-hidden": "true"
|
|
@@ -487,29 +487,29 @@ const ft = {
|
|
|
487
487
|
], -1)
|
|
488
488
|
])])) : S("", !0)
|
|
489
489
|
]),
|
|
490
|
-
h("div",
|
|
491
|
-
|
|
490
|
+
h("div", mt, [
|
|
491
|
+
w(f.$slots, "default", {}, void 0, !0)
|
|
492
492
|
]),
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
493
|
+
f.$slots.footer || !s.value.hideOk || !s.value.hideCancel ? (v(), p("footer", ht, [
|
|
494
|
+
w(f.$slots, "footer", {}, () => [
|
|
495
|
+
s.value.hideCancel ? S("", !0) : (v(), U(L(de), {
|
|
496
496
|
key: 0,
|
|
497
497
|
type: "ghost",
|
|
498
498
|
class: "mu-modal__cancel",
|
|
499
|
-
onClick:
|
|
499
|
+
onClick: V
|
|
500
500
|
}, {
|
|
501
|
-
default:
|
|
502
|
-
A(
|
|
501
|
+
default: W(() => [
|
|
502
|
+
j(A(s.value.cancelText), 1)
|
|
503
503
|
]),
|
|
504
504
|
_: 1
|
|
505
505
|
})),
|
|
506
|
-
|
|
507
|
-
loading:
|
|
506
|
+
s.value.hideOk ? S("", !0) : (v(), U(L(de), R({ key: 1 }, u.value, {
|
|
507
|
+
loading: s.value.okLoading,
|
|
508
508
|
class: ["mu-modal__ok", { "mu-modal__ok--block": i.value }],
|
|
509
|
-
onClick:
|
|
509
|
+
onClick: N
|
|
510
510
|
}), {
|
|
511
|
-
default:
|
|
512
|
-
A(
|
|
511
|
+
default: W(() => [
|
|
512
|
+
j(A(s.value.okText), 1)
|
|
513
513
|
]),
|
|
514
514
|
_: 1
|
|
515
515
|
}, 16, ["loading", "class"]))
|
|
@@ -519,62 +519,62 @@ const ft = {
|
|
|
519
519
|
])) : S("", !0)
|
|
520
520
|
]));
|
|
521
521
|
}
|
|
522
|
-
}),
|
|
522
|
+
}), pt = /* @__PURE__ */ P(gt, [["__scopeId", "data-v-e94991b0"]]);
|
|
523
523
|
function bt(e) {
|
|
524
524
|
return e === void 0 ? null : typeof e == "function" ? e() : e;
|
|
525
525
|
}
|
|
526
|
-
function
|
|
526
|
+
function q(e = {}) {
|
|
527
527
|
return typeof globalThis.document > "u" ? Promise.resolve(!1) : new Promise((t) => {
|
|
528
528
|
const a = globalThis.document.createElement("div");
|
|
529
529
|
globalThis.document.body.appendChild(a);
|
|
530
|
-
const
|
|
531
|
-
let
|
|
530
|
+
const n = z(!0);
|
|
531
|
+
let r = null, s = !1;
|
|
532
532
|
const l = () => {
|
|
533
|
-
|
|
534
|
-
}, d = (
|
|
535
|
-
|
|
536
|
-
l(), t(
|
|
533
|
+
r && (r.unmount(), r = null), a.parentNode && a.parentNode.removeChild(a);
|
|
534
|
+
}, d = (c) => {
|
|
535
|
+
s || (s = !0, n.value = !1, queueMicrotask(() => {
|
|
536
|
+
l(), t(c);
|
|
537
537
|
}));
|
|
538
|
-
}, { content:
|
|
539
|
-
|
|
538
|
+
}, { content: u, ...i } = e;
|
|
539
|
+
r = Pe({
|
|
540
540
|
render() {
|
|
541
|
-
return
|
|
542
|
-
|
|
541
|
+
return ve(
|
|
542
|
+
pt,
|
|
543
543
|
{
|
|
544
544
|
...i,
|
|
545
|
-
visible:
|
|
546
|
-
"onUpdate:visible": (
|
|
547
|
-
|
|
545
|
+
visible: n.value,
|
|
546
|
+
"onUpdate:visible": (c) => {
|
|
547
|
+
c || d(!1);
|
|
548
548
|
},
|
|
549
549
|
onOk: () => d(!0),
|
|
550
550
|
onCancel: () => d(!1),
|
|
551
551
|
onClose: () => d(!1)
|
|
552
552
|
},
|
|
553
553
|
{
|
|
554
|
-
default: () => bt(
|
|
554
|
+
default: () => bt(u)
|
|
555
555
|
}
|
|
556
556
|
);
|
|
557
557
|
}
|
|
558
|
-
}),
|
|
558
|
+
}), r.mount(a);
|
|
559
559
|
});
|
|
560
560
|
}
|
|
561
|
-
const
|
|
561
|
+
const ka = {
|
|
562
562
|
/** 通用版本,透传所有 props,默认 variant='form'。 */
|
|
563
|
-
show:
|
|
563
|
+
show: q,
|
|
564
564
|
/** 通用确认弹窗,等价于 show,使用 form 形态 + 自定义 status。 */
|
|
565
|
-
confirm: (e = {}) =>
|
|
565
|
+
confirm: (e = {}) => q(e),
|
|
566
566
|
/** 反馈形态 + status='success'。 */
|
|
567
|
-
success: (e = {}) =>
|
|
567
|
+
success: (e = {}) => q({ ...e, variant: "feedback", status: "success" }),
|
|
568
568
|
/** 反馈形态 + status='danger'。 */
|
|
569
|
-
danger: (e = {}) =>
|
|
570
|
-
},
|
|
569
|
+
danger: (e = {}) => q({ ...e, variant: "feedback", status: "danger" })
|
|
570
|
+
}, be = Symbol("MuRadioGroup"), kt = ["horizontal", "vertical"];
|
|
571
571
|
function yt(e, t) {
|
|
572
572
|
return typeof t == "string" && e.includes(t);
|
|
573
573
|
}
|
|
574
574
|
function _t(e) {
|
|
575
575
|
return yt(kt, e);
|
|
576
576
|
}
|
|
577
|
-
function
|
|
577
|
+
function ke(e = {}) {
|
|
578
578
|
return {
|
|
579
579
|
modelValue: e.modelValue,
|
|
580
580
|
value: e.value ?? !0,
|
|
@@ -583,7 +583,7 @@ function ye(e = {}) {
|
|
|
583
583
|
name: e.name
|
|
584
584
|
};
|
|
585
585
|
}
|
|
586
|
-
function
|
|
586
|
+
function ye(e = {}) {
|
|
587
587
|
return {
|
|
588
588
|
modelValue: e.modelValue,
|
|
589
589
|
defaultValue: e.defaultValue,
|
|
@@ -595,21 +595,21 @@ function _e(e = {}) {
|
|
|
595
595
|
function wt(e = {}) {
|
|
596
596
|
return e.modelValue !== void 0;
|
|
597
597
|
}
|
|
598
|
-
function
|
|
598
|
+
function Ct(e = {}) {
|
|
599
599
|
return e.modelValue !== void 0;
|
|
600
600
|
}
|
|
601
|
-
function
|
|
601
|
+
function Y(e, t) {
|
|
602
602
|
return Object.is(e, t);
|
|
603
603
|
}
|
|
604
604
|
function Tt(e = {}, t = {}) {
|
|
605
|
-
const a =
|
|
606
|
-
return t.checked &&
|
|
605
|
+
const a = ke(e), n = ["mu-radio"];
|
|
606
|
+
return t.checked && n.push("is-checked"), (t.disabled || a.disabled) && n.push("is-disabled"), n;
|
|
607
607
|
}
|
|
608
608
|
function xt(e = {}) {
|
|
609
|
-
const t =
|
|
609
|
+
const t = ye(e), a = ["mu-radio-group", `mu-radio-group--${t.direction}`];
|
|
610
610
|
return t.disabled && a.push("is-disabled"), a;
|
|
611
611
|
}
|
|
612
|
-
const
|
|
612
|
+
const $t = ["checked", "disabled", "name", "value"], Vt = { class: "mu-radio__label" }, Mt = /* @__PURE__ */ I({
|
|
613
613
|
inheritAttrs: !1,
|
|
614
614
|
__name: "Radio",
|
|
615
615
|
props: {
|
|
@@ -621,68 +621,68 @@ const Mt = ["checked", "disabled", "name", "value"], $t = { class: "mu-radio__la
|
|
|
621
621
|
},
|
|
622
622
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
623
623
|
setup(e, { emit: t }) {
|
|
624
|
-
const a = e,
|
|
625
|
-
() => l.value.disabled || !!(
|
|
626
|
-
),
|
|
624
|
+
const a = e, n = t, r = D(), s = me(be, null), l = o(() => ke(a)), d = o(() => wt(a)), u = z(l.value.defaultChecked), i = o(() => s ? Y(s.value.value, l.value.value) : d.value ? Y(l.value.modelValue, l.value.value) : u.value), c = o(
|
|
625
|
+
() => l.value.disabled || !!(s != null && s.disabled.value)
|
|
626
|
+
), C = o(() => (s == null ? void 0 : s.name.value) ?? l.value.name), b = o(() => String(l.value.value)), k = o(() => [
|
|
627
627
|
Tt(a, {
|
|
628
628
|
checked: i.value,
|
|
629
|
-
disabled:
|
|
629
|
+
disabled: c.value
|
|
630
630
|
}),
|
|
631
|
-
|
|
632
|
-
]),
|
|
633
|
-
const { class:
|
|
634
|
-
return
|
|
635
|
-
}),
|
|
636
|
-
function g(
|
|
637
|
-
d.value || (
|
|
631
|
+
r.class
|
|
632
|
+
]), $ = o(() => {
|
|
633
|
+
const { class: f, style: T, ...M } = r;
|
|
634
|
+
return M;
|
|
635
|
+
}), _ = o(() => r.style);
|
|
636
|
+
function g(f, T) {
|
|
637
|
+
d.value || (u.value = !0), n("update:modelValue", f), n("change", f, T);
|
|
638
638
|
}
|
|
639
|
-
function
|
|
640
|
-
if (
|
|
639
|
+
function V(f) {
|
|
640
|
+
if (c.value)
|
|
641
641
|
return;
|
|
642
|
-
const
|
|
643
|
-
if (
|
|
644
|
-
|
|
645
|
-
|
|
642
|
+
const T = l.value.value, M = f.target instanceof globalThis.HTMLInputElement ? f.target : null;
|
|
643
|
+
if (s) {
|
|
644
|
+
s.select(T, f), K(() => {
|
|
645
|
+
M && (M.checked = i.value);
|
|
646
646
|
});
|
|
647
647
|
return;
|
|
648
648
|
}
|
|
649
|
-
g(
|
|
650
|
-
|
|
649
|
+
g(T, f), K(() => {
|
|
650
|
+
M && (M.checked = i.value);
|
|
651
651
|
});
|
|
652
652
|
}
|
|
653
|
-
function
|
|
654
|
-
|
|
653
|
+
function N(f) {
|
|
654
|
+
n("focus", f);
|
|
655
655
|
}
|
|
656
|
-
function
|
|
657
|
-
|
|
656
|
+
function O(f) {
|
|
657
|
+
n("blur", f);
|
|
658
658
|
}
|
|
659
|
-
return (
|
|
660
|
-
class:
|
|
661
|
-
style:
|
|
659
|
+
return (f, T) => (v(), p("label", R($.value, {
|
|
660
|
+
class: k.value,
|
|
661
|
+
style: _.value
|
|
662
662
|
}), [
|
|
663
663
|
h("input", {
|
|
664
664
|
class: "mu-radio__input",
|
|
665
665
|
type: "radio",
|
|
666
666
|
checked: i.value,
|
|
667
|
-
disabled:
|
|
668
|
-
name:
|
|
669
|
-
value:
|
|
670
|
-
onChange:
|
|
671
|
-
onFocus:
|
|
672
|
-
onBlur:
|
|
673
|
-
}, null, 40,
|
|
674
|
-
|
|
667
|
+
disabled: c.value,
|
|
668
|
+
name: C.value,
|
|
669
|
+
value: b.value,
|
|
670
|
+
onChange: V,
|
|
671
|
+
onFocus: N,
|
|
672
|
+
onBlur: O
|
|
673
|
+
}, null, 40, $t),
|
|
674
|
+
T[0] || (T[0] = h("span", {
|
|
675
675
|
class: "mu-radio__control",
|
|
676
676
|
"aria-hidden": "true"
|
|
677
677
|
}, [
|
|
678
678
|
h("span", { class: "mu-radio__dot" })
|
|
679
679
|
], -1)),
|
|
680
|
-
h("span",
|
|
681
|
-
|
|
680
|
+
h("span", Vt, [
|
|
681
|
+
w(f.$slots, "default", {}, void 0, !0)
|
|
682
682
|
])
|
|
683
683
|
], 16));
|
|
684
684
|
}
|
|
685
|
-
}),
|
|
685
|
+
}), ya = /* @__PURE__ */ P(Mt, [["__scopeId", "data-v-f1283749"]]), Bt = /* @__PURE__ */ I({
|
|
686
686
|
inheritAttrs: !1,
|
|
687
687
|
__name: "RadioGroup",
|
|
688
688
|
props: {
|
|
@@ -694,46 +694,46 @@ const Mt = ["checked", "disabled", "name", "value"], $t = { class: "mu-radio__la
|
|
|
694
694
|
},
|
|
695
695
|
emits: ["update:modelValue", "change"],
|
|
696
696
|
setup(e, { emit: t }) {
|
|
697
|
-
const a = e,
|
|
698
|
-
() => l.value ?
|
|
699
|
-
), i = o(() =>
|
|
700
|
-
const { class:
|
|
701
|
-
return
|
|
702
|
-
}),
|
|
703
|
-
function
|
|
704
|
-
|
|
697
|
+
const a = e, n = t, r = D(), s = o(() => ye(a)), l = o(() => Ct(a)), d = z(s.value.defaultValue), u = o(
|
|
698
|
+
() => l.value ? s.value.modelValue : d.value
|
|
699
|
+
), i = o(() => s.value.disabled), c = o(() => s.value.name), C = o(() => [xt(a), r.class]), b = o(() => {
|
|
700
|
+
const { class: _, style: g, ...V } = r;
|
|
701
|
+
return V;
|
|
702
|
+
}), k = o(() => r.style);
|
|
703
|
+
function $(_, g) {
|
|
704
|
+
s.value.disabled || Y(u.value, _) || (l.value || (d.value = _), n("update:modelValue", _), n("change", _, g));
|
|
705
705
|
}
|
|
706
|
-
return
|
|
707
|
-
value:
|
|
706
|
+
return he(be, {
|
|
707
|
+
value: u,
|
|
708
708
|
disabled: i,
|
|
709
|
-
name:
|
|
710
|
-
select:
|
|
711
|
-
}), (
|
|
709
|
+
name: c,
|
|
710
|
+
select: $
|
|
711
|
+
}), (_, g) => (v(), p("div", R(b.value, {
|
|
712
712
|
role: "radiogroup",
|
|
713
|
-
class:
|
|
714
|
-
style:
|
|
713
|
+
class: C.value,
|
|
714
|
+
style: k.value
|
|
715
715
|
}), [
|
|
716
|
-
_
|
|
716
|
+
w(_.$slots, "default", {}, void 0, !0)
|
|
717
717
|
], 16));
|
|
718
718
|
}
|
|
719
|
-
}),
|
|
720
|
-
function
|
|
719
|
+
}), _a = /* @__PURE__ */ P(Bt, [["__scopeId", "data-v-3879fec4"]]), St = ["circle", "round", "line"], Nt = ["small", "medium"];
|
|
720
|
+
function _e(e, t) {
|
|
721
721
|
return typeof t == "string" && e.includes(t);
|
|
722
722
|
}
|
|
723
723
|
function zt(e) {
|
|
724
|
-
return
|
|
724
|
+
return _e(St, e);
|
|
725
725
|
}
|
|
726
|
-
function
|
|
727
|
-
return
|
|
726
|
+
function It(e) {
|
|
727
|
+
return _e(Nt, e);
|
|
728
728
|
}
|
|
729
|
-
function
|
|
729
|
+
function ee(e = {}) {
|
|
730
730
|
return {
|
|
731
731
|
modelValue: e.modelValue,
|
|
732
732
|
defaultChecked: e.defaultChecked ?? !1,
|
|
733
733
|
disabled: e.disabled ?? !1,
|
|
734
734
|
loading: e.loading ?? !1,
|
|
735
735
|
type: zt(e.type) ? e.type : "circle",
|
|
736
|
-
size:
|
|
736
|
+
size: It(e.size) ? e.size : "medium",
|
|
737
737
|
checkedValue: e.checkedValue ?? !0,
|
|
738
738
|
uncheckedValue: e.uncheckedValue ?? !1,
|
|
739
739
|
checkedColor: e.checkedColor,
|
|
@@ -743,21 +743,21 @@ function se(e = {}) {
|
|
|
743
743
|
uncheckedText: e.uncheckedText
|
|
744
744
|
};
|
|
745
745
|
}
|
|
746
|
-
function
|
|
746
|
+
function Pt(e = {}) {
|
|
747
747
|
return e.modelValue !== void 0;
|
|
748
748
|
}
|
|
749
|
-
function
|
|
749
|
+
function we(e, t) {
|
|
750
750
|
return Object.is(e, t.checkedValue);
|
|
751
751
|
}
|
|
752
|
-
function
|
|
753
|
-
return
|
|
752
|
+
function Lt(e, t) {
|
|
753
|
+
return we(e, t) ? t.uncheckedValue : t.checkedValue;
|
|
754
754
|
}
|
|
755
755
|
function Ot(e) {
|
|
756
756
|
return e.type !== "line" && e.size !== "small";
|
|
757
757
|
}
|
|
758
758
|
function At(e = {}, t = {}) {
|
|
759
|
-
const a =
|
|
760
|
-
return t.checked &&
|
|
759
|
+
const a = ee(e), n = ["mu-switch", `mu-switch--${a.type}`, `mu-switch--${a.size}`];
|
|
760
|
+
return t.checked && n.push("is-checked"), a.disabled && n.push("is-disabled"), (a.loading || t.loading) && n.push("is-loading"), n;
|
|
761
761
|
}
|
|
762
762
|
const Rt = ["aria-checked", "disabled"], Dt = {
|
|
763
763
|
class: "mu-switch__thumb",
|
|
@@ -768,10 +768,10 @@ const Rt = ["aria-checked", "disabled"], Dt = {
|
|
|
768
768
|
viewBox: "0 0 16 16",
|
|
769
769
|
fill: "none",
|
|
770
770
|
xmlns: "http://www.w3.org/2000/svg"
|
|
771
|
-
},
|
|
771
|
+
}, Ht = {
|
|
772
772
|
key: 0,
|
|
773
773
|
class: "mu-switch__label"
|
|
774
|
-
}, Gt = /* @__PURE__ */
|
|
774
|
+
}, Gt = /* @__PURE__ */ I({
|
|
775
775
|
inheritAttrs: !1,
|
|
776
776
|
__name: "Switch",
|
|
777
777
|
props: {
|
|
@@ -791,136 +791,136 @@ const Rt = ["aria-checked", "disabled"], Dt = {
|
|
|
791
791
|
},
|
|
792
792
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
793
793
|
setup(e, { emit: t }) {
|
|
794
|
-
const a = e,
|
|
794
|
+
const a = e, n = t, r = D(), s = X(), l = z(!1), d = ee(a), u = z(
|
|
795
795
|
d.defaultChecked ? d.checkedValue : d.uncheckedValue
|
|
796
|
-
), i = o(() =>
|
|
797
|
-
() =>
|
|
798
|
-
),
|
|
796
|
+
), i = o(() => ee(a)), c = o(() => Pt(a)), C = o(
|
|
797
|
+
() => c.value ? i.value.modelValue : u.value
|
|
798
|
+
), b = o(() => we(C.value, i.value)), k = o(() => i.value.loading || l.value), $ = o(() => Ot(i.value)), _ = o(() => $.value ? b.value ? !!(s.checked || i.value.checkedText) : !!(s.unchecked || i.value.uncheckedText) : !1), g = o(() => [
|
|
799
799
|
At(a, {
|
|
800
|
-
checked:
|
|
800
|
+
checked: b.value,
|
|
801
801
|
loading: l.value
|
|
802
802
|
}),
|
|
803
803
|
{
|
|
804
|
-
"has-label":
|
|
804
|
+
"has-label": _.value
|
|
805
805
|
},
|
|
806
|
-
|
|
807
|
-
]),
|
|
808
|
-
const { class:
|
|
806
|
+
r.class
|
|
807
|
+
]), V = o(() => {
|
|
808
|
+
const { class: m, style: x, type: y, ...B } = r;
|
|
809
809
|
return B;
|
|
810
|
-
}),
|
|
811
|
-
const
|
|
812
|
-
return i.value.checkedColor && (
|
|
810
|
+
}), N = o(() => {
|
|
811
|
+
const m = {};
|
|
812
|
+
return i.value.checkedColor && (m["--mu-switch-current-checked-bg"] = i.value.checkedColor, m["--mu-switch-current-checked-border"] = i.value.checkedColor, m["--mu-switch-current-checked-thumb"] = i.value.checkedColor, m["--mu-switch-current-checked-glow"] = `0 0 12px ${i.value.checkedColor}`), i.value.uncheckedColor && (m["--mu-switch-current-unchecked-bg"] = i.value.uncheckedColor), [m, r.style];
|
|
813
813
|
});
|
|
814
|
-
function
|
|
814
|
+
function O() {
|
|
815
815
|
}
|
|
816
|
-
function m
|
|
817
|
-
const
|
|
818
|
-
if (!
|
|
816
|
+
function f(m) {
|
|
817
|
+
const x = i.value.beforeChange;
|
|
818
|
+
if (!x)
|
|
819
819
|
return !0;
|
|
820
820
|
try {
|
|
821
|
-
const
|
|
822
|
-
return
|
|
821
|
+
const y = x(m);
|
|
822
|
+
return y instanceof Promise ? (l.value = !0, y.then((B) => B !== !1).catch(() => !1)) : y !== !1;
|
|
823
823
|
} catch {
|
|
824
824
|
return !1;
|
|
825
825
|
}
|
|
826
826
|
}
|
|
827
|
-
function
|
|
828
|
-
|
|
827
|
+
function T(m, x) {
|
|
828
|
+
c.value || (u.value = m), n("update:modelValue", m), n("change", m, x);
|
|
829
829
|
}
|
|
830
|
-
function
|
|
831
|
-
if (i.value.disabled ||
|
|
830
|
+
function M(m) {
|
|
831
|
+
if (i.value.disabled || k.value)
|
|
832
832
|
return;
|
|
833
|
-
const
|
|
834
|
-
if (
|
|
835
|
-
|
|
836
|
-
B &&
|
|
833
|
+
const x = Lt(C.value, i.value), y = f(x);
|
|
834
|
+
if (y instanceof Promise) {
|
|
835
|
+
y.then((B) => {
|
|
836
|
+
B && T(x, m);
|
|
837
837
|
}).finally(() => {
|
|
838
838
|
l.value = !1;
|
|
839
839
|
});
|
|
840
840
|
return;
|
|
841
841
|
}
|
|
842
|
-
|
|
842
|
+
y && T(x, m);
|
|
843
843
|
}
|
|
844
|
-
function
|
|
845
|
-
|
|
844
|
+
function H(m) {
|
|
845
|
+
n("focus", m);
|
|
846
846
|
}
|
|
847
|
-
function
|
|
848
|
-
|
|
847
|
+
function J(m) {
|
|
848
|
+
n("blur", m);
|
|
849
849
|
}
|
|
850
|
-
return (
|
|
850
|
+
return (m, x) => (v(), p("button", R(V.value, {
|
|
851
851
|
type: "button",
|
|
852
852
|
role: "switch",
|
|
853
853
|
class: g.value,
|
|
854
|
-
style:
|
|
855
|
-
"aria-checked":
|
|
856
|
-
disabled: i.value.disabled ||
|
|
857
|
-
onClick:
|
|
858
|
-
onFocus:
|
|
859
|
-
onBlur:
|
|
854
|
+
style: N.value,
|
|
855
|
+
"aria-checked": b.value ? "true" : "false",
|
|
856
|
+
disabled: i.value.disabled || k.value,
|
|
857
|
+
onClick: M,
|
|
858
|
+
onFocus: H,
|
|
859
|
+
onBlur: J
|
|
860
860
|
}), [
|
|
861
|
-
|
|
861
|
+
x[1] || (x[1] = h("span", {
|
|
862
862
|
class: "mu-switch__line-track",
|
|
863
863
|
"aria-hidden": "true"
|
|
864
864
|
}, null, -1)),
|
|
865
865
|
h("span", Dt, [
|
|
866
|
-
|
|
866
|
+
k.value ? (v(), p("svg", Et, [...x[0] || (x[0] = [
|
|
867
867
|
h("path", {
|
|
868
868
|
d: "M8 1.5C8.41421 1.5 8.75 1.83579 8.75 2.25C8.75 2.66421 8.41421 3 8 3C5.23858 3 3 5.23858 3 8C3 10.7614 5.23858 13 8 13C10.7614 13 13 10.7614 13 8C13 7.58579 13.3358 7.25 13.75 7.25C14.1642 7.25 14.5 7.58579 14.5 8C14.5 11.5899 11.5899 14.5 8 14.5C4.41015 14.5 1.5 11.5899 1.5 8C1.5 4.41015 4.41015 1.5 8 1.5Z",
|
|
869
869
|
fill: "currentColor"
|
|
870
870
|
}, null, -1)
|
|
871
|
-
])])) :
|
|
871
|
+
])])) : b.value ? w(m.$slots, "checked-icon", { key: 1 }, void 0, !0) : w(m.$slots, "unchecked-icon", { key: 2 }, void 0, !0)
|
|
872
872
|
]),
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
A(
|
|
876
|
-
], !0) :
|
|
877
|
-
A(
|
|
873
|
+
_.value ? (v(), p("span", Ht, [
|
|
874
|
+
b.value ? w(m.$slots, "checked", { key: 0 }, () => [
|
|
875
|
+
j(A(i.value.checkedText), 1)
|
|
876
|
+
], !0) : w(m.$slots, "unchecked", { key: 1 }, () => [
|
|
877
|
+
j(A(i.value.uncheckedText), 1)
|
|
878
878
|
], !0)
|
|
879
879
|
])) : S("", !0)
|
|
880
880
|
], 16, Rt));
|
|
881
881
|
}
|
|
882
|
-
}),
|
|
883
|
-
function
|
|
882
|
+
}), wa = /* @__PURE__ */ P(Gt, [["__scopeId", "data-v-8cfb8f2a"]]), Ce = Symbol("MuTabs"), Ut = ["line", "segment"], jt = ["small", "medium", "large"], Ft = ["white", "ghost"], qt = ["content", "equal"];
|
|
883
|
+
function Z(e, t) {
|
|
884
884
|
return typeof t == "string" && e.includes(t);
|
|
885
885
|
}
|
|
886
886
|
function Kt(e) {
|
|
887
|
-
return
|
|
887
|
+
return Z(Ut, e);
|
|
888
888
|
}
|
|
889
889
|
function Xt(e) {
|
|
890
|
-
return
|
|
890
|
+
return Z(jt, e);
|
|
891
891
|
}
|
|
892
|
-
function
|
|
893
|
-
return
|
|
892
|
+
function Zt(e) {
|
|
893
|
+
return Z(Ft, e);
|
|
894
894
|
}
|
|
895
|
-
function
|
|
896
|
-
return
|
|
895
|
+
function Jt(e) {
|
|
896
|
+
return Z(qt, e);
|
|
897
897
|
}
|
|
898
|
-
function
|
|
898
|
+
function Te(e = {}) {
|
|
899
899
|
const t = e, a = Kt(t.variant) ? t.variant : "line";
|
|
900
900
|
return {
|
|
901
901
|
modelValue: e.modelValue,
|
|
902
902
|
defaultValue: e.defaultValue,
|
|
903
903
|
variant: a,
|
|
904
|
-
appearance: a === "segment" &&
|
|
904
|
+
appearance: a === "segment" && Zt(t.appearance) ? t.appearance : a === "segment" ? "white" : void 0,
|
|
905
905
|
size: Xt(t.size) ? t.size : "medium",
|
|
906
|
-
layout:
|
|
906
|
+
layout: Jt(t.layout) ? t.layout : "content",
|
|
907
907
|
disabled: e.disabled ?? !1
|
|
908
908
|
};
|
|
909
909
|
}
|
|
910
|
-
function
|
|
910
|
+
function Qt(e) {
|
|
911
911
|
return {
|
|
912
912
|
value: e.value,
|
|
913
913
|
disabled: e.disabled ?? !1
|
|
914
914
|
};
|
|
915
915
|
}
|
|
916
|
-
function
|
|
916
|
+
function Wt(e = {}) {
|
|
917
917
|
return e.modelValue !== void 0;
|
|
918
918
|
}
|
|
919
|
-
function
|
|
919
|
+
function xe(e, t) {
|
|
920
920
|
return Object.is(e, t);
|
|
921
921
|
}
|
|
922
|
-
function
|
|
923
|
-
const t =
|
|
922
|
+
function Yt(e = {}) {
|
|
923
|
+
const t = Te(e), a = [
|
|
924
924
|
"mu-tabs",
|
|
925
925
|
`mu-tabs--variant-${t.variant}`,
|
|
926
926
|
`mu-tabs--size-${t.size}`,
|
|
@@ -928,19 +928,19 @@ function ea(e = {}) {
|
|
|
928
928
|
];
|
|
929
929
|
return t.variant === "segment" && a.push(`mu-tabs--appearance-${t.appearance}`), t.disabled && a.push("is-disabled"), a;
|
|
930
930
|
}
|
|
931
|
-
function
|
|
931
|
+
function ea(e, t = {}) {
|
|
932
932
|
const a = ["mu-tab"];
|
|
933
933
|
return t.active && a.push("is-active"), (t.disabled || e.disabled) && a.push("is-disabled"), a;
|
|
934
934
|
}
|
|
935
|
-
const
|
|
935
|
+
const ta = ["aria-selected", "disabled"], aa = {
|
|
936
936
|
key: 0,
|
|
937
937
|
class: "mu-tab__prefix",
|
|
938
938
|
"aria-hidden": "true"
|
|
939
|
-
},
|
|
939
|
+
}, sa = { class: "mu-tab__content" }, na = {
|
|
940
940
|
key: 1,
|
|
941
941
|
class: "mu-tab__suffix",
|
|
942
942
|
"aria-hidden": "true"
|
|
943
|
-
},
|
|
943
|
+
}, oa = /* @__PURE__ */ I({
|
|
944
944
|
inheritAttrs: !1,
|
|
945
945
|
__name: "Tab",
|
|
946
946
|
props: {
|
|
@@ -949,63 +949,63 @@ const aa = ["aria-selected", "disabled"], sa = {
|
|
|
949
949
|
},
|
|
950
950
|
emits: ["click"],
|
|
951
951
|
setup(e, { emit: t }) {
|
|
952
|
-
const a = e,
|
|
953
|
-
() => l ?
|
|
954
|
-
),
|
|
955
|
-
() =>
|
|
956
|
-
),
|
|
957
|
-
|
|
952
|
+
const a = e, n = t, r = D(), s = X(), l = me(Ce, null), d = z(null), u = o(() => Qt(a)), i = o(
|
|
953
|
+
() => l ? xe(l.value.value, u.value.value) : !1
|
|
954
|
+
), c = o(
|
|
955
|
+
() => u.value.disabled || !!(l != null && l.disabled.value)
|
|
956
|
+
), C = o(() => [
|
|
957
|
+
ea(a, {
|
|
958
958
|
active: i.value,
|
|
959
|
-
disabled:
|
|
959
|
+
disabled: c.value
|
|
960
960
|
}),
|
|
961
|
-
|
|
962
|
-
]),
|
|
963
|
-
const { class: g, style:
|
|
964
|
-
return
|
|
965
|
-
}),
|
|
966
|
-
function
|
|
967
|
-
!l || !d.value || l.registerItem(
|
|
961
|
+
r.class
|
|
962
|
+
]), b = o(() => {
|
|
963
|
+
const { class: g, style: V, ...N } = r;
|
|
964
|
+
return N;
|
|
965
|
+
}), k = o(() => r.style);
|
|
966
|
+
function $() {
|
|
967
|
+
!l || !d.value || l.registerItem(u.value.value, d.value);
|
|
968
968
|
}
|
|
969
|
-
function
|
|
970
|
-
if (
|
|
969
|
+
function _(g) {
|
|
970
|
+
if (c.value) {
|
|
971
971
|
g.preventDefault(), g.stopPropagation();
|
|
972
972
|
return;
|
|
973
973
|
}
|
|
974
|
-
l && l.select(
|
|
974
|
+
l && l.select(u.value.value, g), n("click", g);
|
|
975
975
|
}
|
|
976
|
-
return
|
|
977
|
-
|
|
978
|
-
}),
|
|
979
|
-
l == null || l.unregisterItem(
|
|
980
|
-
}),
|
|
981
|
-
() =>
|
|
982
|
-
(g,
|
|
983
|
-
!l || !d.value || (l.unregisterItem(
|
|
976
|
+
return ae(() => {
|
|
977
|
+
$();
|
|
978
|
+
}), se(() => {
|
|
979
|
+
l == null || l.unregisterItem(u.value.value);
|
|
980
|
+
}), ne(
|
|
981
|
+
() => u.value.value,
|
|
982
|
+
(g, V) => {
|
|
983
|
+
!l || !d.value || (l.unregisterItem(V), l.registerItem(g, d.value));
|
|
984
984
|
}
|
|
985
|
-
), (g,
|
|
985
|
+
), (g, V) => (v(), p("button", R({
|
|
986
986
|
ref_key: "buttonRef",
|
|
987
987
|
ref: d
|
|
988
|
-
},
|
|
988
|
+
}, b.value, {
|
|
989
989
|
type: "button",
|
|
990
990
|
role: "tab",
|
|
991
|
-
class:
|
|
992
|
-
style:
|
|
991
|
+
class: C.value,
|
|
992
|
+
style: k.value,
|
|
993
993
|
"aria-selected": i.value ? "true" : "false",
|
|
994
|
-
disabled:
|
|
995
|
-
onClick:
|
|
994
|
+
disabled: c.value,
|
|
995
|
+
onClick: _
|
|
996
996
|
}), [
|
|
997
|
-
|
|
998
|
-
|
|
997
|
+
L(s).prefix ? (v(), p("span", aa, [
|
|
998
|
+
w(g.$slots, "prefix", {}, void 0, !0)
|
|
999
999
|
])) : S("", !0),
|
|
1000
|
-
h("span",
|
|
1001
|
-
|
|
1000
|
+
h("span", sa, [
|
|
1001
|
+
w(g.$slots, "default", {}, void 0, !0)
|
|
1002
1002
|
]),
|
|
1003
|
-
|
|
1004
|
-
|
|
1003
|
+
L(s).suffix ? (v(), p("span", na, [
|
|
1004
|
+
w(g.$slots, "suffix", {}, void 0, !0)
|
|
1005
1005
|
])) : S("", !0)
|
|
1006
|
-
], 16,
|
|
1006
|
+
], 16, ta));
|
|
1007
1007
|
}
|
|
1008
|
-
}),
|
|
1008
|
+
}), Ca = /* @__PURE__ */ P(oa, [["__scopeId", "data-v-97f04990"]]), la = /* @__PURE__ */ I({
|
|
1009
1009
|
inheritAttrs: !1,
|
|
1010
1010
|
__name: "Tabs",
|
|
1011
1011
|
props: {
|
|
@@ -1019,270 +1019,151 @@ const aa = ["aria-selected", "disabled"], sa = {
|
|
|
1019
1019
|
},
|
|
1020
1020
|
emits: ["update:modelValue", "change"],
|
|
1021
1021
|
setup(e, { emit: t }) {
|
|
1022
|
-
const a = e,
|
|
1023
|
-
() => d.value ? l.value.modelValue :
|
|
1024
|
-
),
|
|
1022
|
+
const a = e, n = t, r = D(), s = z(null), l = o(() => Te(a)), d = o(() => Wt(a)), u = z(l.value.defaultValue), i = o(
|
|
1023
|
+
() => d.value ? l.value.modelValue : u.value
|
|
1024
|
+
), c = o(() => l.value.variant), C = o(() => l.value.appearance), b = o(() => l.value.size), k = o(() => l.value.layout), $ = o(() => l.value.disabled), _ = z(!1), g = z(0), V = /* @__PURE__ */ new Map(), N = z({
|
|
1025
1025
|
transform: "translateX(0px)",
|
|
1026
1026
|
width: "0px"
|
|
1027
|
-
}),
|
|
1028
|
-
const { class:
|
|
1029
|
-
return
|
|
1030
|
-
}),
|
|
1031
|
-
function
|
|
1032
|
-
const
|
|
1033
|
-
if (!
|
|
1034
|
-
|
|
1027
|
+
}), O = o(() => [Yt(a), r.class]), f = o(() => {
|
|
1028
|
+
const { class: y, style: B, ...Q } = r;
|
|
1029
|
+
return Q;
|
|
1030
|
+
}), T = o(() => r.style);
|
|
1031
|
+
function M() {
|
|
1032
|
+
const y = s.value, B = i.value !== void 0 ? V.get(i.value) : void 0;
|
|
1033
|
+
if (!y || !B) {
|
|
1034
|
+
N.value = {
|
|
1035
1035
|
transform: "translateX(0px)",
|
|
1036
1036
|
width: "0px"
|
|
1037
1037
|
};
|
|
1038
1038
|
return;
|
|
1039
1039
|
}
|
|
1040
|
-
const
|
|
1041
|
-
|
|
1042
|
-
transform: `translateX(${
|
|
1043
|
-
width: `${
|
|
1040
|
+
const Q = y.getBoundingClientRect(), ce = B.getBoundingClientRect();
|
|
1041
|
+
N.value = {
|
|
1042
|
+
transform: `translateX(${ce.left - Q.left}px)`,
|
|
1043
|
+
width: `${ce.width}px`
|
|
1044
1044
|
};
|
|
1045
1045
|
}
|
|
1046
|
-
function
|
|
1047
|
-
|
|
1048
|
-
|
|
1046
|
+
function H() {
|
|
1047
|
+
K(() => {
|
|
1048
|
+
M();
|
|
1049
1049
|
});
|
|
1050
1050
|
}
|
|
1051
|
-
function
|
|
1052
|
-
|
|
1051
|
+
function J(y, B) {
|
|
1052
|
+
$.value || xe(i.value, y) || (d.value || (u.value = y), n("update:modelValue", y), n("change", y, B));
|
|
1053
1053
|
}
|
|
1054
|
-
function
|
|
1055
|
-
|
|
1054
|
+
function m(y, B) {
|
|
1055
|
+
V.set(y, B), g.value += 1, H();
|
|
1056
1056
|
}
|
|
1057
|
-
function
|
|
1058
|
-
|
|
1057
|
+
function x(y) {
|
|
1058
|
+
V.delete(y), g.value += 1, H();
|
|
1059
1059
|
}
|
|
1060
|
-
return
|
|
1060
|
+
return he(Ce, {
|
|
1061
1061
|
value: i,
|
|
1062
|
-
variant:
|
|
1063
|
-
appearance:
|
|
1064
|
-
size:
|
|
1065
|
-
layout:
|
|
1066
|
-
disabled:
|
|
1067
|
-
select:
|
|
1068
|
-
registerItem:
|
|
1069
|
-
unregisterItem:
|
|
1070
|
-
}),
|
|
1071
|
-
[i,
|
|
1062
|
+
variant: c,
|
|
1063
|
+
appearance: C,
|
|
1064
|
+
size: b,
|
|
1065
|
+
layout: k,
|
|
1066
|
+
disabled: $,
|
|
1067
|
+
select: J,
|
|
1068
|
+
registerItem: m,
|
|
1069
|
+
unregisterItem: x
|
|
1070
|
+
}), ne(
|
|
1071
|
+
[i, c, b, k, g],
|
|
1072
1072
|
() => {
|
|
1073
|
-
|
|
1073
|
+
H();
|
|
1074
1074
|
},
|
|
1075
1075
|
{ flush: "post" }
|
|
1076
|
-
),
|
|
1077
|
-
globalThis.window.addEventListener("resize",
|
|
1078
|
-
|
|
1076
|
+
), ae(() => {
|
|
1077
|
+
globalThis.window.addEventListener("resize", M), K(() => {
|
|
1078
|
+
M(), _.value = !0;
|
|
1079
1079
|
});
|
|
1080
|
-
}),
|
|
1081
|
-
globalThis.window.removeEventListener("resize",
|
|
1082
|
-
}), (
|
|
1080
|
+
}), se(() => {
|
|
1081
|
+
globalThis.window.removeEventListener("resize", M);
|
|
1082
|
+
}), (y, B) => (v(), p("div", R({
|
|
1083
1083
|
ref_key: "rootRef",
|
|
1084
|
-
ref:
|
|
1085
|
-
},
|
|
1084
|
+
ref: s
|
|
1085
|
+
}, f.value, {
|
|
1086
1086
|
role: "tablist",
|
|
1087
|
-
class: [
|
|
1088
|
-
style:
|
|
1087
|
+
class: [O.value, { "is-ready": _.value }],
|
|
1088
|
+
style: T.value
|
|
1089
1089
|
}), [
|
|
1090
|
-
|
|
1090
|
+
w(y.$slots, "default", {}, void 0, !0),
|
|
1091
1091
|
h("span", {
|
|
1092
1092
|
class: "mu-tabs__indicator",
|
|
1093
|
-
style:
|
|
1093
|
+
style: fe(N.value),
|
|
1094
1094
|
"aria-hidden": "true"
|
|
1095
1095
|
}, null, 4)
|
|
1096
1096
|
], 16));
|
|
1097
1097
|
}
|
|
1098
|
-
}),
|
|
1099
|
-
|
|
1100
|
-
cyan: "tonal",
|
|
1101
|
-
yellow: "outline"
|
|
1102
|
-
}, va = {
|
|
1103
|
-
neutral: ["soft", "outline", "tonal"],
|
|
1104
|
-
cyan: ["solid", "outline", "tonal"],
|
|
1105
|
-
yellow: ["outline"]
|
|
1106
|
-
}, ha = {
|
|
1107
|
-
new: {
|
|
1108
|
-
tone: "cyan",
|
|
1109
|
-
variant: "soft",
|
|
1110
|
-
size: "small",
|
|
1111
|
-
shape: "rounded"
|
|
1112
|
-
},
|
|
1113
|
-
"new-mini": {
|
|
1114
|
-
tone: "cyan",
|
|
1115
|
-
variant: "soft",
|
|
1116
|
-
size: "mini",
|
|
1117
|
-
shape: "rounded"
|
|
1118
|
-
},
|
|
1119
|
-
soon: {
|
|
1120
|
-
tone: "pink",
|
|
1121
|
-
variant: "soft",
|
|
1122
|
-
size: "small",
|
|
1123
|
-
shape: "rounded"
|
|
1124
|
-
},
|
|
1125
|
-
beta: {
|
|
1126
|
-
tone: "pink",
|
|
1127
|
-
variant: "solid",
|
|
1128
|
-
size: "small",
|
|
1129
|
-
shape: "rounded"
|
|
1130
|
-
},
|
|
1131
|
-
free: {
|
|
1132
|
-
tone: "blue",
|
|
1133
|
-
variant: "solid",
|
|
1134
|
-
size: "small",
|
|
1135
|
-
shape: "rounded"
|
|
1136
|
-
},
|
|
1137
|
-
details: {
|
|
1138
|
-
tone: "neutral",
|
|
1139
|
-
variant: "tonal",
|
|
1140
|
-
size: "small",
|
|
1141
|
-
shape: "rounded"
|
|
1142
|
-
}
|
|
1143
|
-
};
|
|
1144
|
-
function q(e, t) {
|
|
1098
|
+
}), Ta = /* @__PURE__ */ P(la, [["__scopeId", "data-v-28e8c4f7"]]), ia = ["outline", "solid", "soft"];
|
|
1099
|
+
function ua(e, t) {
|
|
1145
1100
|
return typeof t == "string" && e.includes(t);
|
|
1146
1101
|
}
|
|
1147
|
-
function
|
|
1148
|
-
return
|
|
1149
|
-
}
|
|
1150
|
-
function ga(e) {
|
|
1151
|
-
return q(ra, e);
|
|
1152
|
-
}
|
|
1153
|
-
function Ca(e) {
|
|
1154
|
-
return q(ca, e);
|
|
1155
|
-
}
|
|
1156
|
-
function ba(e) {
|
|
1157
|
-
return q(da, e);
|
|
1158
|
-
}
|
|
1159
|
-
function ka(e) {
|
|
1160
|
-
return q(fa, e);
|
|
1102
|
+
function ra(e) {
|
|
1103
|
+
return ua(ia, e);
|
|
1161
1104
|
}
|
|
1162
1105
|
function $e(e = {}) {
|
|
1163
|
-
const t = e;
|
|
1164
|
-
if (pa(t.preset))
|
|
1165
|
-
return {
|
|
1166
|
-
mode: "preset",
|
|
1167
|
-
preset: t.preset,
|
|
1168
|
-
...ha[t.preset]
|
|
1169
|
-
};
|
|
1170
|
-
const a = ga(t.tone) ? t.tone : "neutral", s = ma[a], u = Ca(t.variant) ? t.variant : void 0, n = u && va[a].includes(u) ? u : s;
|
|
1171
1106
|
return {
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
variant: n,
|
|
1176
|
-
size: ba(t.size) ? t.size : "small",
|
|
1177
|
-
shape: ka(t.shape) ? t.shape : "rounded"
|
|
1107
|
+
variant: ra(e.variant) ? e.variant : "outline",
|
|
1108
|
+
selected: e.selected ?? !1,
|
|
1109
|
+
disabled: e.disabled ?? !1
|
|
1178
1110
|
};
|
|
1179
1111
|
}
|
|
1180
|
-
function
|
|
1181
|
-
const t = $e(e), a = [
|
|
1182
|
-
|
|
1183
|
-
`mu-tag--${t.mode}`,
|
|
1184
|
-
`mu-tag--tone-${t.tone}`,
|
|
1185
|
-
`mu-tag--variant-${t.variant}`,
|
|
1186
|
-
`mu-tag--${t.size}`,
|
|
1187
|
-
`mu-tag--shape-${t.shape}`
|
|
1188
|
-
];
|
|
1189
|
-
return t.preset && a.push(`mu-tag--preset-${t.preset}`), t.mode === "base" && t.tone === "yellow" && t.variant === "outline" && a.push("mu-tag--uppercase"), a;
|
|
1112
|
+
function ca(e = {}) {
|
|
1113
|
+
const t = $e(e), a = ["mu-tag", `mu-tag--variant-${t.variant}`];
|
|
1114
|
+
return t.selected && a.push("is-selected"), t.disabled && a.push("is-disabled"), a;
|
|
1190
1115
|
}
|
|
1191
|
-
const
|
|
1116
|
+
const da = ["disabled", "aria-pressed"], fa = {
|
|
1192
1117
|
key: 0,
|
|
1193
|
-
|
|
1194
|
-
fill: "currentColor"
|
|
1195
|
-
}, Va = {
|
|
1196
|
-
key: 1,
|
|
1197
|
-
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.80274V8H0ZM7.40262 8V0H12.1241V1.05205H8.56924V3.32055H11.7389V4.36164H8.56924V6.94795H12.1241V8H7.40262ZM14.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",
|
|
1198
|
-
fill: "currentColor"
|
|
1199
|
-
}, Ta = {
|
|
1200
|
-
key: 1,
|
|
1201
|
-
class: "mu-tag__wordmark mu-tag__wordmark--soon",
|
|
1202
|
-
viewBox: "0 0 20 7",
|
|
1203
|
-
fill: "none",
|
|
1204
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1118
|
+
class: "mu-tag__prefix",
|
|
1205
1119
|
"aria-hidden": "true"
|
|
1206
|
-
},
|
|
1207
|
-
key: 0,
|
|
1208
|
-
class: "mu-tag__prefix"
|
|
1209
|
-
}, Ma = { class: "mu-tag__content" }, $a = {
|
|
1120
|
+
}, va = { class: "mu-tag__content" }, ma = {
|
|
1210
1121
|
key: 1,
|
|
1211
|
-
class: "mu-tag__suffix"
|
|
1212
|
-
|
|
1122
|
+
class: "mu-tag__suffix",
|
|
1123
|
+
"aria-hidden": "true"
|
|
1124
|
+
}, ha = /* @__PURE__ */ I({
|
|
1213
1125
|
__name: "Tag",
|
|
1214
1126
|
props: {
|
|
1215
|
-
preset: {},
|
|
1216
|
-
tone: {},
|
|
1217
1127
|
variant: {},
|
|
1218
|
-
|
|
1219
|
-
|
|
1128
|
+
selected: { type: Boolean },
|
|
1129
|
+
disabled: { type: Boolean }
|
|
1220
1130
|
},
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1131
|
+
emits: ["update:selected", "click"],
|
|
1132
|
+
setup(e, { emit: t }) {
|
|
1133
|
+
const a = e, n = t, r = X(), s = o(() => $e(a)), l = o(() => ca(a));
|
|
1134
|
+
function d(u) {
|
|
1135
|
+
s.value.disabled || (n("click", u), n("update:selected", !s.value.selected));
|
|
1136
|
+
}
|
|
1137
|
+
return (u, i) => (v(), p("button", {
|
|
1138
|
+
type: "button",
|
|
1139
|
+
class: te(l.value),
|
|
1140
|
+
disabled: s.value.disabled,
|
|
1141
|
+
"aria-pressed": s.value.selected,
|
|
1142
|
+
onClick: d
|
|
1225
1143
|
}, [
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
h("path", {
|
|
1237
|
-
d: "M2.07437 7C1.64519 7 1.27562 6.92543 0.965653 6.7763C0.661651 6.62716 0.426199 6.41278 0.259296 6.13316C0.0923927 5.85353 0.00596083 5.52108 0 5.13582H0.804711C0.804711 5.47759 0.914986 5.74789 1.13554 5.94674C1.36205 6.14558 1.67499 6.24501 2.07437 6.24501C2.4499 6.24501 2.74198 6.14869 2.95061 5.95606C3.1652 5.76343 3.27249 5.49623 3.27249 5.15446C3.27249 4.88105 3.20096 4.64181 3.0579 4.43675C2.9208 4.23169 2.72111 4.08877 2.45884 4.00799L1.57366 3.71904C1.1266 3.57612 0.780868 3.33688 0.536474 3.00133C0.298041 2.66578 0.178825 2.27119 0.178825 1.81758C0.178825 1.45095 0.256315 1.13404 0.411297 0.866845C0.572239 0.593431 0.79577 0.382157 1.08189 0.233023C1.36801 0.0776743 1.70479 0 2.09225 0C2.66449 0 3.12347 0.167776 3.4692 0.503329C3.81493 0.832668 3.99077 1.27386 3.99673 1.8269H3.19202C3.19202 1.49135 3.09367 1.23036 2.89696 1.04394C2.70621 0.85131 2.435 0.754994 2.08331 0.754994C1.73758 0.754994 1.46636 0.841989 1.26966 1.01598C1.07891 1.18997 0.983536 1.43231 0.983536 1.74301C0.983536 2.02264 1.05507 2.26498 1.19813 2.47004C1.34118 2.6751 1.54683 2.82113 1.81507 2.90812L2.70919 3.20639C3.14433 3.34931 3.48112 3.59166 3.71955 3.93342C3.95799 4.27519 4.0772 4.67599 4.0772 5.13582C4.0772 5.50866 3.99375 5.83489 3.82685 6.11451C3.65994 6.39414 3.42449 6.61163 3.12049 6.76698C2.82245 6.92233 2.47374 7 2.07437 7ZM7.39985 7C7.00643 7 6.66667 6.92233 6.38055 6.76698C6.10039 6.61163 5.88282 6.38793 5.72784 6.09587C5.57882 5.7976 5.50431 5.44652 5.50431 5.04261V1.96671C5.50431 1.55659 5.57882 1.2055 5.72784 0.913449C5.88282 0.621394 6.10039 0.397692 6.38055 0.242344C6.66667 0.0869955 7.00643 0.00932134 7.39985 0.00932134C7.79326 0.00932134 8.13005 0.0869955 8.41021 0.242344C8.69633 0.397692 8.9139 0.621394 9.06292 0.913449C9.2179 1.2055 9.29539 1.55348 9.29539 1.95739V5.04261C9.29539 5.44652 9.2179 5.7976 9.06292 6.09587C8.9139 6.38793 8.69633 6.61163 8.41021 6.76698C8.13005 6.92233 7.79326 7 7.39985 7ZM7.39985 6.24501C7.75154 6.24501 8.01977 6.14248 8.20456 5.93742C8.3953 5.72614 8.49068 5.42787 8.49068 5.04261V1.96671C8.49068 1.58145 8.3953 1.28629 8.20456 1.08123C8.01977 0.869951 7.75154 0.764314 7.39985 0.764314C7.05412 0.764314 6.78588 0.869951 6.59514 1.08123C6.40439 1.28629 6.30902 1.58145 6.30902 1.96671V5.04261C6.30902 5.42787 6.40439 5.72614 6.59514 5.93742C6.78588 6.14248 7.05412 6.24501 7.39985 6.24501ZM12.7611 7C12.3677 7 12.0279 6.92233 11.7418 6.76698C11.4616 6.61163 11.2441 6.38793 11.0891 6.09587C10.9401 5.7976 10.8656 5.44652 10.8656 5.04261V1.96671C10.8656 1.55659 10.9401 1.2055 11.0891 0.913449C11.2441 0.621394 11.4616 0.397692 11.7418 0.242344C12.0279 0.0869955 12.3677 0.00932134 12.7611 0.00932134C13.1545 0.00932134 13.4913 0.0869955 13.7715 0.242344C14.0576 0.397692 14.2751 0.621394 14.4242 0.913449C14.5791 1.2055 14.6566 1.55348 14.6566 1.95739V5.04261C14.6566 5.44652 14.5791 5.7976 14.4242 6.09587C14.2751 6.38793 14.0576 6.61163 13.7715 6.76698C13.4913 6.92233 13.1545 7 12.7611 7ZM12.7611 6.24501C13.1128 6.24501 13.381 6.14248 13.5658 5.93742C13.7566 5.72614 13.8519 5.42787 13.8519 5.04261V1.96671C13.8519 1.58145 13.7566 1.28629 13.5658 1.08123C13.381 0.869951 13.1128 0.764314 12.7611 0.764314C12.4154 0.764314 12.1471 0.869951 11.9564 1.08123C11.7656 1.28629 11.6703 1.58145 11.6703 1.96671V5.04261C11.6703 5.42787 11.7656 5.72614 11.9564 5.93742C12.1471 6.14248 12.4154 6.24501 12.7611 6.24501ZM16.2447 6.90679V0.10253H17.3176L19.3115 5.9281C19.2996 5.77275 19.2847 5.58322 19.2668 5.35952C19.2549 5.1296 19.243 4.89037 19.2311 4.64181C19.2251 4.38704 19.2221 4.1478 19.2221 3.9241V0.10253H20V6.90679H18.9271L16.9421 1.08123C16.954 1.23036 16.9659 1.41988 16.9779 1.6498C16.9898 1.8735 16.9987 2.11274 17.0047 2.36751C17.0166 2.61607 17.0226 2.8553 17.0226 3.08522V6.90679H16.2447Z",
|
|
1238
|
-
fill: "currentColor"
|
|
1239
|
-
}, null, -1)
|
|
1240
|
-
])])) : s.value.preset === "beta" ? (f(), v(j, { key: 2 }, [
|
|
1241
|
-
A("Beta")
|
|
1242
|
-
], 64)) : s.value.preset === "free" ? (f(), v(j, { key: 3 }, [
|
|
1243
|
-
A("1 Free")
|
|
1244
|
-
], 64)) : s.value.preset === "details" ? (f(), v(j, { key: 4 }, [
|
|
1245
|
-
l[1] || (l[1] = h("svg", {
|
|
1246
|
-
class: "mu-tag__icon mu-tag__icon--scan-text",
|
|
1247
|
-
viewBox: "0 0 12 12",
|
|
1248
|
-
fill: "none",
|
|
1249
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1250
|
-
"aria-hidden": "true"
|
|
1251
|
-
}, [
|
|
1252
|
-
h("path", {
|
|
1253
|
-
d: "M1.5 3.5V2.5C1.5 2.23478 1.60536 1.98043 1.79289 1.79289C1.98043 1.60536 2.23478 1.5 2.5 1.5H3.5M8.5 1.5H9.5C9.76522 1.5 10.0196 1.60536 10.2071 1.79289C10.3946 1.98043 10.5 2.23478 10.5 2.5V3.5M10.5 8.5V9.5C10.5 9.76522 10.3946 10.0196 10.2071 10.2071C10.0196 10.3946 9.76522 10.5 9.5 10.5H8.5M3.5 10.5H2.5C2.23478 10.5 1.98043 10.3946 1.79289 10.2071C1.60536 10.0196 1.5 9.76522 1.5 9.5V8.5M3.5 4H7.5M3.5 6H8.5M3.5 8H6.5",
|
|
1254
|
-
stroke: "currentColor",
|
|
1255
|
-
"stroke-opacity": "0.9",
|
|
1256
|
-
"stroke-linecap": "round",
|
|
1257
|
-
"stroke-linejoin": "round"
|
|
1258
|
-
})
|
|
1259
|
-
], -1)),
|
|
1260
|
-
l[2] || (l[2] = h("span", { class: "mu-tag__label" }, "Details", -1))
|
|
1261
|
-
], 64)) : (f(), v(j, { key: 5 }, [
|
|
1262
|
-
N(a).prefix ? (f(), v("span", xa, [
|
|
1263
|
-
_(n.$slots, "prefix", {}, void 0, !0)
|
|
1264
|
-
])) : S("", !0),
|
|
1265
|
-
h("span", Ma, [
|
|
1266
|
-
_(n.$slots, "default", {}, void 0, !0)
|
|
1267
|
-
]),
|
|
1268
|
-
N(a).suffix ? (f(), v("span", $a, [
|
|
1269
|
-
_(n.$slots, "suffix", {}, void 0, !0)
|
|
1270
|
-
])) : S("", !0)
|
|
1271
|
-
], 64))
|
|
1272
|
-
], 2));
|
|
1144
|
+
L(r).prefix ? (v(), p("span", fa, [
|
|
1145
|
+
w(u.$slots, "prefix", {}, void 0, !0)
|
|
1146
|
+
])) : S("", !0),
|
|
1147
|
+
h("span", va, [
|
|
1148
|
+
w(u.$slots, "default", {}, void 0, !0)
|
|
1149
|
+
]),
|
|
1150
|
+
L(r).suffix ? (v(), p("span", ma, [
|
|
1151
|
+
w(u.$slots, "suffix", {}, void 0, !0)
|
|
1152
|
+
])) : S("", !0)
|
|
1153
|
+
], 10, da));
|
|
1273
1154
|
}
|
|
1274
|
-
}),
|
|
1155
|
+
}), xa = /* @__PURE__ */ P(ha, [["__scopeId", "data-v-e3e9ee4d"]]);
|
|
1275
1156
|
export {
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1157
|
+
ba as MessageList,
|
|
1158
|
+
de as MuButton,
|
|
1159
|
+
pt as MuModal,
|
|
1160
|
+
ya as MuRadio,
|
|
1161
|
+
_a as MuRadioGroup,
|
|
1162
|
+
wa as MuSwitch,
|
|
1163
|
+
Ca as MuTab,
|
|
1164
|
+
Ta as MuTabs,
|
|
1165
|
+
xa as MuTag,
|
|
1166
|
+
pa as message,
|
|
1167
|
+
ka as muModal,
|
|
1168
|
+
q as openMuModal
|
|
1288
1169
|
};
|