@xto/navigation 1.2.7 → 1.2.8
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/es/index.mjs +290 -285
- package/lib/index.cjs +1 -1
- package/package.json +1 -1
package/es/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as V, useSlots as G, ref as _, watch as
|
|
1
|
+
import { defineComponent as V, useSlots as G, ref as _, watch as O, provide as A, computed as v, openBlock as r, createElementBlock as u, normalizeClass as n, createElementVNode as M, unref as c, Fragment as I, renderList as q, toDisplayString as H, renderSlot as k, inject as B, withDirectives as D, createCommentVNode as C, vShow as N, normalizeStyle as X, createTextVNode as w, createVNode as T, Transition as W, withCtx as j, onMounted as J } from "vue";
|
|
2
2
|
import { useNamespace as $ } from "@xto/core";
|
|
3
3
|
const Q = ["onClick"], n0 = /* @__PURE__ */ V({
|
|
4
4
|
name: "XTabs",
|
|
@@ -12,59 +12,59 @@ const Q = ["onClick"], n0 = /* @__PURE__ */ V({
|
|
|
12
12
|
closable: { type: Boolean, default: !1 }
|
|
13
13
|
},
|
|
14
14
|
emits: ["update:modelValue", "update:activeKey", "tabClick", "edit"],
|
|
15
|
-
setup(s, { emit:
|
|
16
|
-
const e = s, a =
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
|
|
15
|
+
setup(s, { emit: t }) {
|
|
16
|
+
const e = s, a = t, l = $("tabs"), o = G(), m = _(e.modelValue ?? e.activeKey ?? "");
|
|
17
|
+
O([() => e.modelValue, () => e.activeKey], ([i, f]) => {
|
|
18
|
+
const p = i ?? f;
|
|
19
|
+
p !== void 0 && (m.value = p);
|
|
20
20
|
});
|
|
21
|
-
const
|
|
22
|
-
|
|
21
|
+
const h = (i, f) => {
|
|
22
|
+
m.value = i, a("update:modelValue", i), a("update:activeKey", i);
|
|
23
23
|
};
|
|
24
|
-
|
|
24
|
+
A("tabs", {
|
|
25
25
|
props: e,
|
|
26
|
-
activeName:
|
|
27
|
-
handleTabClick:
|
|
26
|
+
activeName: m,
|
|
27
|
+
handleTabClick: h
|
|
28
28
|
});
|
|
29
|
-
const
|
|
29
|
+
const b = v(() => [
|
|
30
30
|
l.b(),
|
|
31
31
|
l.m(e.type),
|
|
32
32
|
l.is(`position-${e.tabPosition}`)
|
|
33
|
-
]), y =
|
|
33
|
+
]), y = v(() => {
|
|
34
34
|
var f;
|
|
35
|
-
return (((f =
|
|
36
|
-
var
|
|
35
|
+
return (((f = o.default) == null ? void 0 : f.call(o)) || []).filter((p) => p.type && p.type.name === "XTabPane").map((p) => {
|
|
36
|
+
var d, z, g, L, P, E, K;
|
|
37
37
|
return {
|
|
38
|
-
name: ((
|
|
39
|
-
label: ((P =
|
|
40
|
-
disabled: ((K =
|
|
38
|
+
name: ((d = p.props) == null ? void 0 : d.name) || ((z = p.props) == null ? void 0 : z.key) || ((g = p.props) == null ? void 0 : g.label) || ((L = p.props) == null ? void 0 : L.tab),
|
|
39
|
+
label: ((P = p.props) == null ? void 0 : P.label) || ((E = p.props) == null ? void 0 : E.tab),
|
|
40
|
+
disabled: ((K = p.props) == null ? void 0 : K.disabled) === !0
|
|
41
41
|
};
|
|
42
42
|
});
|
|
43
43
|
});
|
|
44
44
|
return (i, f) => (r(), u("div", {
|
|
45
|
-
class:
|
|
45
|
+
class: n(b.value)
|
|
46
46
|
}, [
|
|
47
|
-
|
|
48
|
-
class:
|
|
47
|
+
M("div", {
|
|
48
|
+
class: n(c(l).e("header"))
|
|
49
49
|
}, [
|
|
50
|
-
|
|
51
|
-
class:
|
|
50
|
+
M("div", {
|
|
51
|
+
class: n(c(l).e("nav"))
|
|
52
52
|
}, [
|
|
53
|
-
(r(!0), u(I, null, q(y.value, (
|
|
54
|
-
key:
|
|
55
|
-
class:
|
|
53
|
+
(r(!0), u(I, null, q(y.value, (p) => (r(), u("div", {
|
|
54
|
+
key: p.name,
|
|
55
|
+
class: n([
|
|
56
56
|
c(l).e("item"),
|
|
57
|
-
c(l).em("item",
|
|
58
|
-
c(l).is("disabled",
|
|
57
|
+
c(l).em("item", m.value === p.name ? "active" : ""),
|
|
58
|
+
c(l).is("disabled", p.disabled)
|
|
59
59
|
]),
|
|
60
|
-
onClick: (
|
|
61
|
-
}, H(
|
|
60
|
+
onClick: (d) => p.disabled ? null : h(p.name)
|
|
61
|
+
}, H(p.label), 11, Q))), 128))
|
|
62
62
|
], 2)
|
|
63
63
|
], 2),
|
|
64
|
-
|
|
65
|
-
class:
|
|
64
|
+
M("div", {
|
|
65
|
+
class: n(c(l).e("content"))
|
|
66
66
|
}, [
|
|
67
|
-
|
|
67
|
+
k(i.$slots, "default")
|
|
68
68
|
], 2)
|
|
69
69
|
], 2));
|
|
70
70
|
}
|
|
@@ -84,13 +84,13 @@ const Q = ["onClick"], n0 = /* @__PURE__ */ V({
|
|
|
84
84
|
lazy: { type: Boolean, default: !1 }
|
|
85
85
|
},
|
|
86
86
|
setup(s) {
|
|
87
|
-
const
|
|
88
|
-
return
|
|
89
|
-
|
|
90
|
-
}, { immediate: !0 }),
|
|
91
|
-
a.value || !s.lazy ?
|
|
87
|
+
const t = s, e = B("tabs"), a = _(!1), l = v(() => t.name || t.key || t.label || t.tab), o = v(() => (e == null ? void 0 : e.activeName.value) === l.value);
|
|
88
|
+
return O(() => e == null ? void 0 : e.activeName.value, () => {
|
|
89
|
+
o.value && t.lazy && !a.value && (a.value = !0);
|
|
90
|
+
}, { immediate: !0 }), o.value && t.lazy && (a.value = !0), (m, h) => D((r(), u("div", U, [
|
|
91
|
+
a.value || !s.lazy ? k(m.$slots, "default", { key: 0 }) : C("", !0)
|
|
92
92
|
], 512)), [
|
|
93
|
-
[
|
|
93
|
+
[N, o.value]
|
|
94
94
|
]);
|
|
95
95
|
}
|
|
96
96
|
}), i0 = /* @__PURE__ */ V({
|
|
@@ -108,47 +108,47 @@ const Q = ["onClick"], n0 = /* @__PURE__ */ V({
|
|
|
108
108
|
router: { type: Boolean }
|
|
109
109
|
},
|
|
110
110
|
emits: ["update:modelValue", "update:openeds", "select", "open", "close"],
|
|
111
|
-
setup(s, { emit:
|
|
112
|
-
const e = s, a =
|
|
113
|
-
get: () => e.openeds ??
|
|
114
|
-
set: (
|
|
115
|
-
|
|
111
|
+
setup(s, { emit: t }) {
|
|
112
|
+
const e = s, a = t, l = $("menu"), o = _(e.modelValue), m = _([...e.defaultOpeneds]), h = v({
|
|
113
|
+
get: () => e.openeds ?? m.value,
|
|
114
|
+
set: (d) => {
|
|
115
|
+
m.value = d, a("update:openeds", d);
|
|
116
116
|
}
|
|
117
117
|
});
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
}),
|
|
118
|
+
O(() => e.modelValue, (d) => {
|
|
119
|
+
o.value = d;
|
|
120
|
+
}), A("menu", {
|
|
121
121
|
props: e,
|
|
122
|
-
activeIndex:
|
|
123
|
-
openedMenus:
|
|
124
|
-
handleSelect: (
|
|
125
|
-
|
|
122
|
+
activeIndex: o,
|
|
123
|
+
openedMenus: h,
|
|
124
|
+
handleSelect: (d, z = []) => {
|
|
125
|
+
o.value = d, a("update:modelValue", d), a("select", d, z);
|
|
126
126
|
},
|
|
127
|
-
handleOpen: (
|
|
128
|
-
|
|
127
|
+
handleOpen: (d, z = []) => {
|
|
128
|
+
h.value.includes(d) || (h.value = [...h.value, d]), a("open", d, z);
|
|
129
129
|
},
|
|
130
|
-
handleClose: (
|
|
131
|
-
const g =
|
|
130
|
+
handleClose: (d, z = []) => {
|
|
131
|
+
const g = h.value.indexOf(d);
|
|
132
132
|
if (g > -1) {
|
|
133
|
-
const
|
|
134
|
-
|
|
133
|
+
const L = [...h.value];
|
|
134
|
+
L.splice(g, 1), h.value = L;
|
|
135
135
|
}
|
|
136
|
-
a("close",
|
|
136
|
+
a("close", d, z);
|
|
137
137
|
}
|
|
138
138
|
});
|
|
139
|
-
const f =
|
|
139
|
+
const f = v(() => [
|
|
140
140
|
l.b(),
|
|
141
141
|
l.is("collapse", e.collapse),
|
|
142
142
|
l.is(`mode-${e.mode}`)
|
|
143
|
-
]),
|
|
143
|
+
]), p = v(() => ({
|
|
144
144
|
backgroundColor: e.backgroundColor,
|
|
145
145
|
color: e.textColor
|
|
146
146
|
}));
|
|
147
|
-
return (
|
|
148
|
-
class:
|
|
149
|
-
style: X(
|
|
147
|
+
return (d, z) => (r(), u("ul", {
|
|
148
|
+
class: n(f.value),
|
|
149
|
+
style: X(p.value)
|
|
150
150
|
}, [
|
|
151
|
-
|
|
151
|
+
k(d.$slots, "default")
|
|
152
152
|
], 6));
|
|
153
153
|
}
|
|
154
154
|
}), F = {
|
|
@@ -290,21 +290,21 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
|
|
|
290
290
|
strokeWidth: { default: 2 }
|
|
291
291
|
},
|
|
292
292
|
setup(s) {
|
|
293
|
-
const
|
|
293
|
+
const t = s, e = $("icon"), a = v(() => typeof t.size == "number" ? `${t.size}px` : t.size), l = v(() => ({
|
|
294
294
|
width: a.value,
|
|
295
295
|
height: a.value,
|
|
296
|
-
color:
|
|
297
|
-
})),
|
|
298
|
-
strokeWidth:
|
|
299
|
-
})),
|
|
296
|
+
color: t.color
|
|
297
|
+
})), o = v(() => ({
|
|
298
|
+
strokeWidth: t.strokeWidth
|
|
299
|
+
})), m = v(() => [
|
|
300
300
|
e.b(),
|
|
301
|
-
e.is("spin",
|
|
302
|
-
]),
|
|
303
|
-
return (
|
|
304
|
-
class:
|
|
301
|
+
e.is("spin", t.spin)
|
|
302
|
+
]), h = v(() => t.name && Y(t.name) ? F[t.name] : "");
|
|
303
|
+
return (b, y) => (r(), u("span", {
|
|
304
|
+
class: n(m.value),
|
|
305
305
|
style: X(l.value)
|
|
306
306
|
}, [
|
|
307
|
-
|
|
307
|
+
h.value ? (r(), u("svg", {
|
|
308
308
|
key: 0,
|
|
309
309
|
viewBox: "0 0 24 24",
|
|
310
310
|
fill: "none",
|
|
@@ -312,10 +312,10 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
|
|
|
312
312
|
"stroke-width": s.strokeWidth,
|
|
313
313
|
"stroke-linecap": "round",
|
|
314
314
|
"stroke-linejoin": "round",
|
|
315
|
-
style: X(
|
|
315
|
+
style: X(o.value)
|
|
316
316
|
}, [
|
|
317
|
-
|
|
318
|
-
], 12, Z)) : b
|
|
317
|
+
M("path", { d: h.value }, null, 8, e0)
|
|
318
|
+
], 12, Z)) : k(b.$slots, "default", { key: 1 }, () => [
|
|
319
319
|
w(H(s.name), 1)
|
|
320
320
|
])
|
|
321
321
|
], 6));
|
|
@@ -329,30 +329,30 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
|
|
|
329
329
|
icon: {}
|
|
330
330
|
},
|
|
331
331
|
setup(s) {
|
|
332
|
-
const
|
|
332
|
+
const t = s, e = B("menu");
|
|
333
333
|
G();
|
|
334
|
-
const a =
|
|
334
|
+
const a = v(() => (e == null ? void 0 : e.activeIndex.value) === t.index), l = v(() => e == null ? void 0 : e.props.collapse), o = v(() => (e == null ? void 0 : e.props.mode) === "horizontal"), m = v(() => [
|
|
335
335
|
S,
|
|
336
336
|
{
|
|
337
337
|
"is-active": a.value,
|
|
338
|
-
"is-disabled":
|
|
339
|
-
"is-horizontal":
|
|
338
|
+
"is-disabled": t.disabled,
|
|
339
|
+
"is-horizontal": o.value,
|
|
340
340
|
"is-collapse": l.value
|
|
341
341
|
}
|
|
342
|
-
]),
|
|
343
|
-
|
|
342
|
+
]), h = v(() => a.value && (e != null && e.props.activeTextColor) ? { color: e.props.activeTextColor } : {}), b = () => {
|
|
343
|
+
t.disabled || t.index && (e == null || e.handleSelect(t.index, [t.index]));
|
|
344
344
|
};
|
|
345
345
|
return (y, i) => (r(), u("li", {
|
|
346
|
-
class:
|
|
347
|
-
style: X(
|
|
348
|
-
onClick:
|
|
346
|
+
class: n(m.value),
|
|
347
|
+
style: X(h.value),
|
|
348
|
+
onClick: b
|
|
349
349
|
}, [
|
|
350
|
-
|
|
351
|
-
class:
|
|
350
|
+
M("div", {
|
|
351
|
+
class: n(S + "__content")
|
|
352
352
|
}, [
|
|
353
353
|
s.icon ? (r(), u("span", {
|
|
354
354
|
key: 0,
|
|
355
|
-
class:
|
|
355
|
+
class: n(S + "__icon")
|
|
356
356
|
}, [
|
|
357
357
|
T(c(R), {
|
|
358
358
|
name: s.icon,
|
|
@@ -360,14 +360,14 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
|
|
|
360
360
|
}, null, 8, ["name"])
|
|
361
361
|
], 2)) : y.$slots.icon ? (r(), u("span", {
|
|
362
362
|
key: 1,
|
|
363
|
-
class:
|
|
363
|
+
class: n(S + "__icon")
|
|
364
364
|
}, [
|
|
365
|
-
|
|
365
|
+
k(y.$slots, "icon")
|
|
366
366
|
], 2)) : C("", !0),
|
|
367
|
-
|
|
368
|
-
class:
|
|
367
|
+
M("span", {
|
|
368
|
+
class: n(S + "__text")
|
|
369
369
|
}, [
|
|
370
|
-
|
|
370
|
+
k(y.$slots, "default")
|
|
371
371
|
], 2)
|
|
372
372
|
], 2)
|
|
373
373
|
], 6));
|
|
@@ -379,14 +379,14 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
|
|
|
379
379
|
title: {}
|
|
380
380
|
},
|
|
381
381
|
setup(s) {
|
|
382
|
-
return (
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
382
|
+
return (t, e) => (r(), u("li", a0, [
|
|
383
|
+
M("div", l0, H(s.title), 1),
|
|
384
|
+
M("ul", null, [
|
|
385
|
+
k(t.$slots, "default")
|
|
386
386
|
])
|
|
387
387
|
]));
|
|
388
388
|
}
|
|
389
|
-
}),
|
|
389
|
+
}), x = "x-sub-menu", d0 = /* @__PURE__ */ V({
|
|
390
390
|
name: "XSubMenu",
|
|
391
391
|
__name: "SubMenu",
|
|
392
392
|
props: {
|
|
@@ -396,70 +396,75 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
|
|
|
396
396
|
icon: {}
|
|
397
397
|
},
|
|
398
398
|
setup(s) {
|
|
399
|
-
const
|
|
400
|
-
|
|
401
|
-
|
|
399
|
+
const t = s, e = B("menu"), a = B("subMenu", null), l = _(!1), o = v(() => !!a), m = v(() => e == null ? void 0 : e.props.collapse), h = v(() => {
|
|
400
|
+
var d, z;
|
|
401
|
+
return m.value ? l.value : ((z = (d = e == null ? void 0 : e.openedMenus) == null ? void 0 : d.value) == null ? void 0 : z.includes(t.index)) ?? !1;
|
|
402
|
+
}), b = v(() => (e == null ? void 0 : e.activeIndex.value) === t.index), y = v(() => [
|
|
403
|
+
x,
|
|
404
|
+
x + ((e == null ? void 0 : e.props.mode) === "horizontal" ? "--horizontal" : "--vertical"),
|
|
402
405
|
{
|
|
403
|
-
"is-active":
|
|
404
|
-
"is-opened":
|
|
405
|
-
"is-disabled":
|
|
406
|
-
"is-nested":
|
|
407
|
-
"is-collapse":
|
|
406
|
+
"is-active": b.value,
|
|
407
|
+
"is-opened": h.value,
|
|
408
|
+
"is-disabled": t.disabled,
|
|
409
|
+
"is-nested": o.value,
|
|
410
|
+
"is-collapse": m.value
|
|
408
411
|
}
|
|
409
|
-
]),
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
n.disabled || ((e == null ? void 0 : e.props.mode) === "horizontal" || v.value) && (l.value = !0);
|
|
412
|
+
]), i = () => {
|
|
413
|
+
var d, z;
|
|
414
|
+
t.disabled || m.value || (h.value ? (d = e == null ? void 0 : e.handleClose) == null || d.call(e, t.index) : (z = e == null ? void 0 : e.handleOpen) == null || z.call(e, t.index));
|
|
413
415
|
}, f = () => {
|
|
414
|
-
((e == null ? void 0 : e.props.mode) === "horizontal" ||
|
|
416
|
+
t.disabled || ((e == null ? void 0 : e.props.mode) === "horizontal" || m.value) && (l.value = !0);
|
|
417
|
+
}, p = () => {
|
|
418
|
+
((e == null ? void 0 : e.props.mode) === "horizontal" || m.value) && (l.value = !1);
|
|
415
419
|
};
|
|
416
|
-
return
|
|
417
|
-
isOpen:
|
|
418
|
-
isNested:
|
|
419
|
-
|
|
420
|
-
|
|
420
|
+
return A("subMenu", {
|
|
421
|
+
isOpen: h,
|
|
422
|
+
isNested: o,
|
|
423
|
+
index: t.index
|
|
424
|
+
}), (d, z) => {
|
|
425
|
+
var g;
|
|
421
426
|
return r(), u("li", {
|
|
422
|
-
class:
|
|
423
|
-
onMouseenter:
|
|
424
|
-
onMouseleave:
|
|
427
|
+
class: n(y.value),
|
|
428
|
+
onMouseenter: f,
|
|
429
|
+
onMouseleave: p
|
|
425
430
|
}, [
|
|
426
|
-
|
|
427
|
-
class:
|
|
428
|
-
onClick:
|
|
431
|
+
M("div", {
|
|
432
|
+
class: n(x + "__title"),
|
|
433
|
+
onClick: i
|
|
429
434
|
}, [
|
|
430
|
-
|
|
431
|
-
class:
|
|
435
|
+
M("div", {
|
|
436
|
+
class: n(x + "__content")
|
|
432
437
|
}, [
|
|
433
438
|
s.icon ? (r(), u("span", {
|
|
434
439
|
key: 0,
|
|
435
|
-
class:
|
|
440
|
+
class: n(x + "__icon")
|
|
436
441
|
}, [
|
|
437
442
|
T(c(R), {
|
|
438
443
|
name: s.icon,
|
|
439
444
|
size: 18
|
|
440
445
|
}, null, 8, ["name"])
|
|
441
|
-
], 2)) :
|
|
446
|
+
], 2)) : d.$slots.icon ? (r(), u("span", {
|
|
442
447
|
key: 1,
|
|
443
|
-
class:
|
|
448
|
+
class: n(x + "__icon")
|
|
444
449
|
}, [
|
|
445
|
-
|
|
450
|
+
k(d.$slots, "icon")
|
|
446
451
|
], 2)) : C("", !0),
|
|
447
|
-
|
|
448
|
-
class:
|
|
452
|
+
M("span", {
|
|
453
|
+
class: n(x + "__text")
|
|
449
454
|
}, [
|
|
450
|
-
|
|
455
|
+
k(d.$slots, "title", {}, () => [
|
|
451
456
|
w(H(s.title), 1)
|
|
452
457
|
])
|
|
453
458
|
], 2),
|
|
454
|
-
|
|
455
|
-
class:
|
|
456
|
-
}, [...
|
|
457
|
-
|
|
459
|
+
M("span", {
|
|
460
|
+
class: n([x + "__arrow", { "is-open": h.value }])
|
|
461
|
+
}, [...z[0] || (z[0] = [
|
|
462
|
+
M("svg", {
|
|
458
463
|
viewBox: "0 0 1024 1024",
|
|
459
464
|
width: "12",
|
|
460
465
|
height: "12"
|
|
461
466
|
}, [
|
|
462
|
-
|
|
467
|
+
M("path", {
|
|
463
468
|
fill: "currentColor",
|
|
464
469
|
d: "M512 714.667c-17.067 0-32-6.4-44.8-19.2L147.2 375.467c-25.6-25.6-25.6-64 0-89.6s64-25.6 89.6 0L512 561.067l275.2-275.2c25.6-25.6 64-25.6 89.6 0s25.6 64 0 89.6L556.8 695.467c-12.8 12.8-27.733 19.2-44.8 19.2z"
|
|
465
470
|
})
|
|
@@ -468,17 +473,17 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
|
|
|
468
473
|
], 2)
|
|
469
474
|
], 2),
|
|
470
475
|
T(W, {
|
|
471
|
-
name: ((
|
|
476
|
+
name: ((g = c(e)) == null ? void 0 : g.props.mode) === "horizontal" ? "zoom-in-top" : "zoom-in-left"
|
|
472
477
|
}, {
|
|
473
478
|
default: j(() => {
|
|
474
|
-
var
|
|
479
|
+
var L;
|
|
475
480
|
return [
|
|
476
|
-
|
|
477
|
-
class:
|
|
481
|
+
D(M("ul", {
|
|
482
|
+
class: n([x + "__menu", { "is-horizontal": ((L = c(e)) == null ? void 0 : L.props.mode) === "horizontal", "is-collapse": m.value }])
|
|
478
483
|
}, [
|
|
479
|
-
|
|
484
|
+
k(d.$slots, "default")
|
|
480
485
|
], 2), [
|
|
481
|
-
[
|
|
486
|
+
[N, h.value]
|
|
482
487
|
])
|
|
483
488
|
];
|
|
484
489
|
}),
|
|
@@ -495,20 +500,20 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
|
|
|
495
500
|
separatorIcon: {}
|
|
496
501
|
},
|
|
497
502
|
setup(s) {
|
|
498
|
-
const
|
|
499
|
-
|
|
500
|
-
separator:
|
|
501
|
-
separatorIcon:
|
|
503
|
+
const t = s, e = $("breadcrumb");
|
|
504
|
+
A("breadcrumb", {
|
|
505
|
+
separator: v(() => t.separator),
|
|
506
|
+
separatorIcon: v(() => t.separatorIcon)
|
|
502
507
|
});
|
|
503
|
-
const a =
|
|
504
|
-
return (l,
|
|
505
|
-
class:
|
|
508
|
+
const a = v(() => [e.b()]);
|
|
509
|
+
return (l, o) => (r(), u("nav", {
|
|
510
|
+
class: n(a.value),
|
|
506
511
|
"aria-label": "Breadcrumb"
|
|
507
512
|
}, [
|
|
508
|
-
|
|
509
|
-
class:
|
|
513
|
+
M("ol", {
|
|
514
|
+
class: n(c(e).e("list"))
|
|
510
515
|
}, [
|
|
511
|
-
|
|
516
|
+
k(l.$slots, "default")
|
|
512
517
|
], 2)
|
|
513
518
|
], 2));
|
|
514
519
|
}
|
|
@@ -521,45 +526,45 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
|
|
|
521
526
|
disabled: { type: Boolean }
|
|
522
527
|
},
|
|
523
528
|
emits: ["click"],
|
|
524
|
-
setup(s, { emit:
|
|
525
|
-
const e = s, a =
|
|
529
|
+
setup(s, { emit: t }) {
|
|
530
|
+
const e = s, a = t, l = $("breadcrumb"), o = B("breadcrumb"), m = v(() => [
|
|
526
531
|
l.e("item"),
|
|
527
532
|
l.is("link", !!e.to && !e.disabled),
|
|
528
533
|
l.is("disabled", e.disabled)
|
|
529
|
-
]),
|
|
534
|
+
]), h = v(() => {
|
|
530
535
|
var i;
|
|
531
|
-
return ((i =
|
|
532
|
-
}),
|
|
536
|
+
return ((i = o == null ? void 0 : o.separator) == null ? void 0 : i.value) || "/";
|
|
537
|
+
}), b = v(() => {
|
|
533
538
|
var i;
|
|
534
|
-
return (i =
|
|
539
|
+
return (i = o == null ? void 0 : o.separatorIcon) == null ? void 0 : i.value;
|
|
535
540
|
}), y = (i) => {
|
|
536
541
|
e.disabled || (a("click", i), e.to && typeof e.to == "string" && (e.replace ? window.location.replace(e.to) : window.location.href = e.to));
|
|
537
542
|
};
|
|
538
543
|
return (i, f) => (r(), u("li", {
|
|
539
|
-
class:
|
|
544
|
+
class: n(m.value)
|
|
540
545
|
}, [
|
|
541
546
|
s.to && !s.disabled ? (r(), u("span", {
|
|
542
547
|
key: 0,
|
|
543
|
-
class:
|
|
548
|
+
class: n(c(l).e("link")),
|
|
544
549
|
onClick: y
|
|
545
550
|
}, [
|
|
546
|
-
|
|
551
|
+
k(i.$slots, "default")
|
|
547
552
|
], 2)) : (r(), u("span", {
|
|
548
553
|
key: 1,
|
|
549
|
-
class:
|
|
554
|
+
class: n(c(l).e("text")),
|
|
550
555
|
"aria-current": s.disabled ? "page" : void 0
|
|
551
556
|
}, [
|
|
552
|
-
|
|
557
|
+
k(i.$slots, "default")
|
|
553
558
|
], 10, s0)),
|
|
554
|
-
|
|
555
|
-
class:
|
|
559
|
+
M("span", {
|
|
560
|
+
class: n(c(l).e("separator")),
|
|
556
561
|
"aria-hidden": "true"
|
|
557
562
|
}, [
|
|
558
|
-
|
|
563
|
+
b.value ? (r(), u("span", {
|
|
559
564
|
key: 0,
|
|
560
|
-
class:
|
|
561
|
-
}, H(
|
|
562
|
-
w(H(
|
|
565
|
+
class: n(c(l).e("separator-icon"))
|
|
566
|
+
}, H(b.value), 3)) : (r(), u(I, { key: 1 }, [
|
|
567
|
+
w(H(h.value), 1)
|
|
563
568
|
], 64))
|
|
564
569
|
], 2)
|
|
565
570
|
], 2));
|
|
@@ -577,34 +582,34 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
|
|
|
577
582
|
space: {}
|
|
578
583
|
},
|
|
579
584
|
emits: ["change", "update:active"],
|
|
580
|
-
setup(s, { emit:
|
|
581
|
-
const e = s, a =
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
}),
|
|
585
|
+
setup(s, { emit: t }) {
|
|
586
|
+
const e = s, a = t, l = $("steps"), o = _(e.active), m = _(0);
|
|
587
|
+
O(() => e.active, (f) => {
|
|
588
|
+
o.value = f;
|
|
589
|
+
}), A("steps", {
|
|
585
590
|
props: e,
|
|
586
|
-
currentActive:
|
|
587
|
-
stepCount:
|
|
591
|
+
currentActive: o,
|
|
592
|
+
stepCount: m,
|
|
588
593
|
setCurrentActive: (f) => {
|
|
589
|
-
|
|
594
|
+
o.value = f, a("change", f), a("update:active", f);
|
|
590
595
|
},
|
|
591
596
|
setStepCount: (f) => {
|
|
592
|
-
|
|
597
|
+
m.value = f;
|
|
593
598
|
}
|
|
594
599
|
});
|
|
595
|
-
const y =
|
|
600
|
+
const y = v(() => [
|
|
596
601
|
l.b(),
|
|
597
602
|
l.m(e.direction),
|
|
598
603
|
l.is("simple", e.simple),
|
|
599
604
|
l.is("center", e.alignCenter)
|
|
600
|
-
]), i =
|
|
605
|
+
]), i = v(() => e.space ? {
|
|
601
606
|
"--steps-space": typeof e.space == "number" ? `${e.space}px` : e.space
|
|
602
607
|
} : {});
|
|
603
|
-
return (f,
|
|
604
|
-
class:
|
|
608
|
+
return (f, p) => (r(), u("div", {
|
|
609
|
+
class: n(y.value),
|
|
605
610
|
style: X(i.value)
|
|
606
611
|
}, [
|
|
607
|
-
|
|
612
|
+
k(f.$slots, "default")
|
|
608
613
|
], 6));
|
|
609
614
|
}
|
|
610
615
|
}), p0 = /* @__PURE__ */ V({
|
|
@@ -617,32 +622,32 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
|
|
|
617
622
|
status: {}
|
|
618
623
|
},
|
|
619
624
|
setup(s) {
|
|
620
|
-
const
|
|
625
|
+
const t = s, e = $("step"), a = B("steps"), l = _(-1);
|
|
621
626
|
J(() => {
|
|
622
627
|
a && (l.value = a.stepCount.value, a.setStepCount(a.stepCount.value + 1));
|
|
623
628
|
});
|
|
624
|
-
const
|
|
625
|
-
var f,
|
|
626
|
-
if (
|
|
629
|
+
const o = v(() => {
|
|
630
|
+
var f, p, d;
|
|
631
|
+
if (t.status) return t.status;
|
|
627
632
|
const i = ((f = a == null ? void 0 : a.currentActive) == null ? void 0 : f.value) ?? 0;
|
|
628
|
-
return l.value < i ? ((
|
|
629
|
-
}),
|
|
633
|
+
return l.value < i ? ((p = a == null ? void 0 : a.props) == null ? void 0 : p.finishStatus) || "finish" : l.value === i ? ((d = a == null ? void 0 : a.props) == null ? void 0 : d.processStatus) || "process" : "wait";
|
|
634
|
+
}), m = v(() => {
|
|
630
635
|
var i;
|
|
631
636
|
return l.value === (((i = a == null ? void 0 : a.stepCount) == null ? void 0 : i.value) || 0) - 1;
|
|
632
|
-
}),
|
|
633
|
-
|
|
637
|
+
}), h = v(() => l.value === 0);
|
|
638
|
+
v(() => ({
|
|
634
639
|
wait: "#c0c4cc",
|
|
635
640
|
process: "#409eff",
|
|
636
641
|
finish: "#67c23a",
|
|
637
642
|
error: "#f56c6c",
|
|
638
643
|
success: "#67c23a"
|
|
639
|
-
})[
|
|
640
|
-
const
|
|
644
|
+
})[o.value] || "#c0c4cc");
|
|
645
|
+
const b = v(() => {
|
|
641
646
|
var i;
|
|
642
647
|
return [
|
|
643
648
|
e.b(),
|
|
644
|
-
e.is(
|
|
645
|
-
e.is("last",
|
|
649
|
+
e.is(o.value),
|
|
650
|
+
e.is("last", m.value),
|
|
646
651
|
e.m(((i = a == null ? void 0 : a.props) == null ? void 0 : i.direction) || "horizontal")
|
|
647
652
|
];
|
|
648
653
|
}), y = () => {
|
|
@@ -650,55 +655,55 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
|
|
|
650
655
|
l.value > -1 && ((i = a == null ? void 0 : a.setCurrentActive) == null || i.call(a, l.value));
|
|
651
656
|
};
|
|
652
657
|
return (i, f) => (r(), u("div", {
|
|
653
|
-
class:
|
|
658
|
+
class: n(b.value),
|
|
654
659
|
onClick: y
|
|
655
660
|
}, [
|
|
656
|
-
|
|
657
|
-
class:
|
|
661
|
+
M("div", {
|
|
662
|
+
class: n(c(e).e("head"))
|
|
658
663
|
}, [
|
|
659
|
-
|
|
664
|
+
h.value ? C("", !0) : (r(), u("div", {
|
|
660
665
|
key: 0,
|
|
661
|
-
class:
|
|
666
|
+
class: n([c(e).e("line"), c(e).em("line", "prev")])
|
|
662
667
|
}, null, 2)),
|
|
663
|
-
|
|
664
|
-
class:
|
|
668
|
+
M("div", {
|
|
669
|
+
class: n(c(e).e("icon"))
|
|
665
670
|
}, [
|
|
666
671
|
s.icon ? (r(), u("span", {
|
|
667
672
|
key: 0,
|
|
668
|
-
class:
|
|
673
|
+
class: n(c(e).e("icon-inner"))
|
|
669
674
|
}, H(s.icon), 3)) : (r(), u("span", {
|
|
670
675
|
key: 1,
|
|
671
|
-
class:
|
|
676
|
+
class: n(c(e).e("icon-inner"))
|
|
672
677
|
}, [
|
|
673
|
-
|
|
678
|
+
o.value === "finish" || o.value === "success" ? (r(), u(I, { key: 0 }, [
|
|
674
679
|
w("✓")
|
|
675
|
-
], 64)) :
|
|
680
|
+
], 64)) : o.value === "error" ? (r(), u(I, { key: 1 }, [
|
|
676
681
|
w("✕")
|
|
677
682
|
], 64)) : (r(), u(I, { key: 2 }, [
|
|
678
683
|
w(H(l.value + 1), 1)
|
|
679
684
|
], 64))
|
|
680
685
|
], 2))
|
|
681
686
|
], 2),
|
|
682
|
-
|
|
687
|
+
m.value ? C("", !0) : (r(), u("div", {
|
|
683
688
|
key: 1,
|
|
684
|
-
class:
|
|
689
|
+
class: n(c(e).e("line"))
|
|
685
690
|
}, null, 2))
|
|
686
691
|
], 2),
|
|
687
|
-
|
|
688
|
-
class:
|
|
692
|
+
M("div", {
|
|
693
|
+
class: n(c(e).e("content"))
|
|
689
694
|
}, [
|
|
690
|
-
|
|
691
|
-
class:
|
|
695
|
+
M("div", {
|
|
696
|
+
class: n(c(e).e("title"))
|
|
692
697
|
}, [
|
|
693
|
-
|
|
698
|
+
k(i.$slots, "title", {}, () => [
|
|
694
699
|
w(H(s.title), 1)
|
|
695
700
|
])
|
|
696
701
|
], 2),
|
|
697
702
|
s.description || i.$slots.description ? (r(), u("div", {
|
|
698
703
|
key: 0,
|
|
699
|
-
class:
|
|
704
|
+
class: n(c(e).e("description"))
|
|
700
705
|
}, [
|
|
701
|
-
|
|
706
|
+
k(i.$slots, "description", {}, () => [
|
|
702
707
|
w(H(s.description), 1)
|
|
703
708
|
])
|
|
704
709
|
], 2)) : C("", !0)
|
|
@@ -715,65 +720,65 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
|
|
|
715
720
|
showBack: { type: Boolean, default: !1 }
|
|
716
721
|
},
|
|
717
722
|
emits: ["back"],
|
|
718
|
-
setup(s, { emit:
|
|
719
|
-
const e =
|
|
723
|
+
setup(s, { emit: t }) {
|
|
724
|
+
const e = t, a = $("page-header"), l = () => {
|
|
720
725
|
e("back");
|
|
721
726
|
};
|
|
722
|
-
return (
|
|
723
|
-
class:
|
|
727
|
+
return (o, m) => (r(), u("div", {
|
|
728
|
+
class: n(c(a).b())
|
|
724
729
|
}, [
|
|
725
|
-
|
|
726
|
-
class:
|
|
730
|
+
M("div", {
|
|
731
|
+
class: n(c(a).e("main"))
|
|
727
732
|
}, [
|
|
728
|
-
|
|
729
|
-
class:
|
|
733
|
+
M("div", {
|
|
734
|
+
class: n(c(a).e("left"))
|
|
730
735
|
}, [
|
|
731
736
|
s.showBack ? (r(), u("span", {
|
|
732
737
|
key: 0,
|
|
733
|
-
class:
|
|
738
|
+
class: n(c(a).e("back")),
|
|
734
739
|
onClick: l
|
|
735
740
|
}, [
|
|
736
|
-
|
|
737
|
-
class:
|
|
741
|
+
M("span", {
|
|
742
|
+
class: n(c(a).e("back-icon"))
|
|
738
743
|
}, "←", 2),
|
|
739
744
|
s.backText ? (r(), u("span", {
|
|
740
745
|
key: 0,
|
|
741
|
-
class:
|
|
746
|
+
class: n(c(a).e("back-text"))
|
|
742
747
|
}, H(s.backText), 3)) : C("", !0)
|
|
743
748
|
], 2)) : C("", !0),
|
|
744
|
-
|
|
745
|
-
class:
|
|
749
|
+
M("span", {
|
|
750
|
+
class: n(c(a).e("title"))
|
|
746
751
|
}, [
|
|
747
|
-
|
|
752
|
+
k(o.$slots, "title", {}, () => [
|
|
748
753
|
w(H(s.title), 1)
|
|
749
754
|
])
|
|
750
755
|
], 2),
|
|
751
|
-
s.subtitle ||
|
|
756
|
+
s.subtitle || o.$slots.subtitle ? (r(), u("span", {
|
|
752
757
|
key: 1,
|
|
753
|
-
class:
|
|
758
|
+
class: n(c(a).e("subtitle"))
|
|
754
759
|
}, [
|
|
755
|
-
|
|
760
|
+
k(o.$slots, "subtitle", {}, () => [
|
|
756
761
|
w(H(s.subtitle), 1)
|
|
757
762
|
])
|
|
758
763
|
], 2)) : C("", !0)
|
|
759
764
|
], 2),
|
|
760
|
-
|
|
761
|
-
class:
|
|
765
|
+
M("div", {
|
|
766
|
+
class: n(c(a).e("extra"))
|
|
762
767
|
}, [
|
|
763
|
-
|
|
768
|
+
k(o.$slots, "extra")
|
|
764
769
|
], 2)
|
|
765
770
|
], 2),
|
|
766
|
-
|
|
771
|
+
o.$slots.default ? (r(), u("div", {
|
|
767
772
|
key: 0,
|
|
768
|
-
class:
|
|
773
|
+
class: n(c(a).e("content"))
|
|
769
774
|
}, [
|
|
770
|
-
|
|
775
|
+
k(o.$slots, "default")
|
|
771
776
|
], 2)) : C("", !0),
|
|
772
|
-
|
|
777
|
+
o.$slots.footer ? (r(), u("div", {
|
|
773
778
|
key: 1,
|
|
774
|
-
class:
|
|
779
|
+
class: n(c(a).e("footer"))
|
|
775
780
|
}, [
|
|
776
|
-
|
|
781
|
+
k(o.$slots, "footer")
|
|
777
782
|
], 2)) : C("", !0)
|
|
778
783
|
], 2));
|
|
779
784
|
}
|
|
@@ -788,49 +793,49 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
|
|
|
788
793
|
hideOnClick: { type: Boolean, default: !0 }
|
|
789
794
|
},
|
|
790
795
|
emits: ["visible-change", "click", "command"],
|
|
791
|
-
setup(s, { emit:
|
|
792
|
-
const e = s, a =
|
|
793
|
-
e.disabled || (
|
|
794
|
-
},
|
|
795
|
-
|
|
796
|
+
setup(s, { emit: t }) {
|
|
797
|
+
const e = s, a = t, l = $("dropdown"), o = _(e.visible || !1), m = _(), h = () => {
|
|
798
|
+
e.disabled || (o.value = !0, a("visible-change", !0));
|
|
799
|
+
}, b = () => {
|
|
800
|
+
o.value = !1, a("visible-change", !1);
|
|
796
801
|
}, y = () => {
|
|
797
|
-
|
|
802
|
+
o.value ? b() : h();
|
|
798
803
|
};
|
|
799
|
-
|
|
800
|
-
visible:
|
|
801
|
-
handleClick: (
|
|
802
|
-
a("click",
|
|
804
|
+
A("x-dropdown", {
|
|
805
|
+
visible: o,
|
|
806
|
+
handleClick: (z) => {
|
|
807
|
+
a("click", z), a("command", z), e.hideOnClick && b();
|
|
803
808
|
},
|
|
804
|
-
hide:
|
|
809
|
+
hide: b
|
|
805
810
|
});
|
|
806
811
|
const f = () => {
|
|
807
|
-
e.trigger === "hover" &&
|
|
808
|
-
},
|
|
809
|
-
e.trigger === "hover" &&
|
|
810
|
-
},
|
|
811
|
-
|
|
812
|
+
e.trigger === "hover" && h();
|
|
813
|
+
}, p = () => {
|
|
814
|
+
e.trigger === "hover" && b();
|
|
815
|
+
}, d = (z) => {
|
|
816
|
+
m.value && !m.value.contains(z.target) && b();
|
|
812
817
|
};
|
|
813
|
-
return typeof window < "u" && document.addEventListener("click",
|
|
818
|
+
return typeof window < "u" && document.addEventListener("click", d), (z, g) => (r(), u("div", {
|
|
814
819
|
ref_key: "dropdownRef",
|
|
815
|
-
ref:
|
|
816
|
-
class:
|
|
820
|
+
ref: m,
|
|
821
|
+
class: n([c(l).b(), c(l).is("disabled", s.disabled)]),
|
|
817
822
|
onMouseenter: f,
|
|
818
|
-
onMouseleave:
|
|
823
|
+
onMouseleave: p
|
|
819
824
|
}, [
|
|
820
|
-
|
|
821
|
-
class:
|
|
822
|
-
onClick: g[0] || (g[0] = (
|
|
825
|
+
M("div", {
|
|
826
|
+
class: n(c(l).e("trigger")),
|
|
827
|
+
onClick: g[0] || (g[0] = (L) => s.trigger === "click" && y())
|
|
823
828
|
}, [
|
|
824
|
-
|
|
829
|
+
k(z.$slots, "default")
|
|
825
830
|
], 2),
|
|
826
831
|
T(W, { name: "x-dropdown-zoom" }, {
|
|
827
832
|
default: j(() => [
|
|
828
|
-
|
|
829
|
-
class:
|
|
833
|
+
D(M("div", {
|
|
834
|
+
class: n([c(l).e("menu"), c(l).m(s.placement)])
|
|
830
835
|
}, [
|
|
831
|
-
|
|
836
|
+
k(z.$slots, "dropdown")
|
|
832
837
|
], 2), [
|
|
833
|
-
[
|
|
838
|
+
[N, o.value]
|
|
834
839
|
])
|
|
835
840
|
]),
|
|
836
841
|
_: 3
|
|
@@ -841,11 +846,11 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
|
|
|
841
846
|
name: "XDropdownMenu",
|
|
842
847
|
__name: "DropdownMenu",
|
|
843
848
|
setup(s) {
|
|
844
|
-
const
|
|
849
|
+
const t = $("dropdown-menu");
|
|
845
850
|
return (e, a) => (r(), u("ul", {
|
|
846
|
-
class:
|
|
851
|
+
class: n(c(t).b())
|
|
847
852
|
}, [
|
|
848
|
-
|
|
853
|
+
k(e.$slots, "default")
|
|
849
854
|
], 2));
|
|
850
855
|
}
|
|
851
856
|
}), b0 = /* @__PURE__ */ V({
|
|
@@ -858,26 +863,26 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
|
|
|
858
863
|
icon: {}
|
|
859
864
|
},
|
|
860
865
|
emits: ["click"],
|
|
861
|
-
setup(s, { emit:
|
|
862
|
-
const e = s, a =
|
|
863
|
-
e.disabled || (a("click",
|
|
864
|
-
},
|
|
866
|
+
setup(s, { emit: t }) {
|
|
867
|
+
const e = s, a = t, l = $("dropdown-item"), o = B("x-dropdown"), m = (b) => {
|
|
868
|
+
e.disabled || (a("click", b), o != null && o.handleClick && o.handleClick(e.command ?? b));
|
|
869
|
+
}, h = v(() => [
|
|
865
870
|
l.b(),
|
|
866
871
|
l.is("disabled", e.disabled),
|
|
867
872
|
l.is("divided", e.divided)
|
|
868
873
|
]);
|
|
869
|
-
return (
|
|
870
|
-
class:
|
|
871
|
-
onClick:
|
|
874
|
+
return (b, y) => (r(), u("li", {
|
|
875
|
+
class: n(h.value),
|
|
876
|
+
onClick: m
|
|
872
877
|
}, [
|
|
873
878
|
s.icon ? (r(), u("span", {
|
|
874
879
|
key: 0,
|
|
875
|
-
class:
|
|
880
|
+
class: n(c(l).e("icon"))
|
|
876
881
|
}, H(s.icon), 3)) : C("", !0),
|
|
877
|
-
|
|
878
|
-
class:
|
|
882
|
+
M("span", {
|
|
883
|
+
class: n(c(l).e("content"))
|
|
879
884
|
}, [
|
|
880
|
-
b
|
|
885
|
+
k(b.$slots, "default")
|
|
881
886
|
], 2)
|
|
882
887
|
], 2));
|
|
883
888
|
}
|
package/lib/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),M=require("@xto/core"),E=["onClick"],N=e.defineComponent({name:"XTabs",__name:"index",props:{modelValue:{default:void 0},activeKey:{default:void 0},type:{default:"line"},tabPosition:{default:"top"},addable:{type:Boolean,default:!1},closable:{type:Boolean,default:!1}},emits:["update:modelValue","update:activeKey","tabClick","edit"],setup(o,{emit:s}){const a=o,l=s,t=M.useNamespace("tabs"),n=e.useSlots(),r=e.ref(a.modelValue??a.activeKey??"");e.watch([()=>a.modelValue,()=>a.activeKey],([c,p])=>{const i=c??p;i!==void 0&&(r.value=i)});const m=(c,p)=>{r.value=c,l("update:modelValue",c),l("update:activeKey",c)};e.provide("tabs",{props:a,activeName:r,handleTabClick:m});const u=e.computed(()=>[t.b(),t.m(a.type),t.is(`position-${a.tabPosition}`)]),h=e.computed(()=>{var p;return(((p=n.default)==null?void 0:p.call(n))||[]).filter(i=>i.type&&i.type.name==="XTabPane").map(i=>{var d,v,f,k,V,b,B;return{name:((d=i.props)==null?void 0:d.name)||((v=i.props)==null?void 0:v.key)||((f=i.props)==null?void 0:f.label)||((k=i.props)==null?void 0:k.tab),label:((V=i.props)==null?void 0:V.label)||((b=i.props)==null?void 0:b.tab),disabled:((B=i.props)==null?void 0:B.disabled)===!0}})});return(c,p)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(u.value)},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(t).e("header"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(t).e("nav"))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,i=>(e.openBlock(),e.createElementBlock("div",{key:i.name,class:e.normalizeClass([e.unref(t).e("item"),e.unref(t).em("item",r.value===i.name?"active":""),e.unref(t).is("disabled",i.disabled)]),onClick:d=>i.disabled?null:m(i.name)},e.toDisplayString(i.label),11,E))),128))],2)],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(t).e("content"))},[e.renderSlot(c.$slots,"default")],2)],2))}}),S={class:"x-tab-pane",role:"tabpanel"},H=e.defineComponent({name:"XTabPane",__name:"TabPane",props:{label:{},tab:{},name:{},key:{},disabled:{type:Boolean,default:!1},closable:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1}},setup(o){const s=o,a=e.inject("tabs"),l=e.ref(!1),t=e.computed(()=>s.name||s.key||s.label||s.tab),n=e.computed(()=>(a==null?void 0:a.activeName.value)===t.value);return e.watch(()=>a==null?void 0:a.activeName.value,()=>{n.value&&s.lazy&&!l.value&&(l.value=!0)},{immediate:!0}),n.value&&s.lazy&&(l.value=!0),(r,m)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",S,[l.value||!o.lazy?e.renderSlot(r.$slots,"default",{key:0}):e.createCommentVNode("",!0)],512)),[[e.vShow,n.value]])}}),w=e.defineComponent({name:"XMenu",__name:"index",props:{modelValue:{default:""},mode:{default:"vertical"},collapse:{type:Boolean,default:!1},backgroundColor:{default:"#fff"},textColor:{default:"#303133"},activeTextColor:{default:"#409eff"},defaultOpeneds:{default:()=>[]},openeds:{default:void 0},router:{type:Boolean}},emits:["update:modelValue","update:openeds","select","open","close"],setup(o,{emit:s}){const a=o,l=s,t=M.useNamespace("menu"),n=e.ref(a.modelValue),r=e.ref([...a.defaultOpeneds]),m=e.computed({get:()=>a.openeds??r.value,set:d=>{r.value=d,l("update:openeds",d)}});e.watch(()=>a.modelValue,d=>{n.value=d});const u=(d,v=[])=>{n.value=d,l("update:modelValue",d),l("select",d,v)},h=(d,v=[])=>{m.value.includes(d)||(m.value=[...m.value,d]),l("open",d,v)},c=(d,v=[])=>{const f=m.value.indexOf(d);if(f>-1){const k=[...m.value];k.splice(f,1),m.value=k}l("close",d,v)};e.provide("menu",{props:a,activeIndex:n,openedMenus:m,handleSelect:u,handleOpen:h,handleClose:c});const p=e.computed(()=>[t.b(),t.is("collapse",a.collapse),t.is(`mode-${a.mode}`)]),i=e.computed(()=>({backgroundColor:a.backgroundColor,color:a.textColor}));return(d,v)=>(e.openBlock(),e.createElementBlock("ul",{class:e.normalizeClass(p.value),style:e.normalizeStyle(i.value)},[e.renderSlot(d.$slots,"default")],6))}}),y={"arrow-up":"M12 19V5m0 0l-7 7m7-7l7 7","arrow-down":"M12 5v14m0 0l7-7m-7 7l-7-7","arrow-left":"M19 12H5m0 0l7 7m-7-7l7-7","arrow-right":"M5 12h14m0 0l-7-7m7 7l-7 7","arrow-up-bold":"M12 5l-7 7h4v7h6v-7h4l-7-7z","arrow-down-bold":"M12 19l7-7h-4V5H9v7H5l7 7z","arrow-left-bold":"M5 12l7-7v4h7v6h-7v4l-7-7z","arrow-right-bold":"M19 12l-7 7v-4H5v-6h7V5l7 7z","caret-down":"M6 9l6 6 6-6","caret-right":"M9 18l6-6-6-6",plus:"M12 5v14m-7-7h14",minus:"M5 12h14",close:"M6 18L18 6M6 6l12 12",check:"M5 13l4 4L19 7","check-bold":"M4 12l5 5L20 6",edit:"M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7M18.5 2.5a2.121 2.121 0 013 3L12 15l-4 1 1-4 9.5-9.5z",delete:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16",copy:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z",download:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4",upload:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12",refresh:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15",search:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z",filter:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z",more:"M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z","more-h":"M5 12h.01M12 12h.01M19 12h.01M6 12a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0z",setting:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M15 12a3 3 0 11-6 0 3 3 0 016 0z",share:"M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.368 2.684 3 3 0 00-5.368-2.684z",loading:"M12 2v4m0 12v4M4.93 4.93l2.83 2.83m8.48 8.48l2.83 2.83M2 12h4m12 0h4M4.93 19.07l2.83-2.83m8.48-8.48l2.83-2.83",info:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",success:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",warning:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z",error:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z",question:"M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",user:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z","user-add":"M18 9v3m0 0v3m0-3h3m-3 0h-3m-2-5a4 4 0 11-8 0 4 4 0 018 0zM3 20a6 6 0 0112 0v1H3v-1z","user-group":"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z",logout:"M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1",login:"M11 16l-4-4m0 0l4-4m-4 4h14m-5 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h7a3 3 0 013 3v1",file:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z",folder:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z","folder-open":"M5 19a2 2 0 01-2-2V7a2 2 0 012-2h4l2 2h4a2 2 0 012 2v1M5 19h14a2 2 0 002-2v-5a2 2 0 00-2-2H9a2 2 0 00-2 2v5a2 2 0 01-2 2z",document:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z",image:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z",video:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z",music:"M9 19V6l12-3v13M9 19c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zm12-3c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zM9 10l12-3",camera:"M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z M15 13a3 3 0 11-6 0 3 3 0 016 0z",mail:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z",phone:"M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z",chat:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z",bell:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9",message:"M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z",eye:"M15 12a3 3 0 11-6 0 3 3 0 016 0z M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z","eye-off":"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21",calendar:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z",clock:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z",history:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z",timer:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z",location:"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z M15 11a3 3 0 11-6 0 3 3 0 016 0z",map:"M9 20l-5.447-2.724A1 1 0 013 16.382V5.618a1 1 0 011.447-.894L9 7m0 13l6-3m-6 3V7m6 10l4.553 2.276A1 1 0 0021 18.382V7.618a1 1 0 00-.553-.894L15 4m0 13V4m0 0L9 7",globe:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9",star:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z",heart:"M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z","thumb-up":"M14 10h4.764a2 2 0 011.789 2.894l-3.5 7A2 2 0 0115.263 21h-4.017c-.163 0-.326-.02-.485-.06L7 20m7-10V5a2 2 0 00-2-2h-.095c-.5 0-.905.405-.905.905 0 .714-.211 1.412-.608 2.006L7 11v9m7-10h-2M7 20H5a2 2 0 01-2-2v-6a2 2 0 012-2h2.5",link:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1","external-link":"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14",lock:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z",unlock:"M8 11V7a4 4 0 118 0m-4 8v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2z",key:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z",home:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6",menu:"M4 6h16M4 12h16M4 18h16","menu-fold":"M4 6h16M4 12h10M4 18h16","menu-unfold":"M4 6h16M10 12h10M4 18h16","menu-collapse":"M4 6h16M4 12h10M4 18h16","menu-expand":"M4 6h16M10 12h10M4 18h16","sidebar-fold":"M11 19l-7-7 7-7m8 14l-7-7 7-7","sidebar-expand":"M13 5l7 7-7 7M5 5l7 7-7 7","sidebar-left":"M11 19l-7-7 7-7m8 14l-7-7 7-7",dashboard:"M4 5a1 1 0 011-1h4a1 1 0 011 1v5a1 1 0 01-1 1H5a1 1 0 01-1-1V5zM14 5a1 1 0 011-1h4a1 1 0 011 1v2a1 1 0 01-1 1h-4a1 1 0 01-1-1V5zM4 15a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1H5a1 1 0 01-1-1v-4zM14 12a1 1 0 011-1h4a1 1 0 011 1v7a1 1 0 01-1 1h-4a1 1 0 01-1-1v-7z",chart:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z","chart-pie":"M11 3.055A9.001 9.001 0 1020.945 13H11V3.055z M20.488 9H15V3.512A9.025 9.025 0 0120.488 9z","chart-line":"M7 12l3-3 3 3 4-4M8 21l4-4 4 4M3 4h18M4 4v16",report:"M9 17v-2m3 2v-4m3 4v-6m2 10H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z",analytics:"M16 8v8m-4-5v5m-4-2v2m-2 4h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z",system:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M12 15a3 3 0 100-6 3 3 0 000 6z",permission:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z",role:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z","user-manage":"M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z",log:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z",notification:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9",app:"M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z",list:"M4 6h16M4 10h16M4 14h16M4 18h16",grid:"M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z",fullscreen:"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4","fullscreen-exit":"M9 4V9H4m11-5v5h5M4 15h5v5m11-5h-5v5","zoom-in":"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM10 7v6m3-3H7","zoom-out":"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM13 10H7",print:"M17 17h2a2 2 0 002-2v-4a2 2 0 00-2-2H5a2 2 0 00-2 2v4a2 2 0 002 2h2m2 4h6a2 2 0 002-2v-4a2 2 0 00-2-2H9a2 2 0 00-2 2v4a2 2 0 002 2zm8-12V5a2 2 0 00-2-2H9a2 2 0 00-2 2v4h10z",bookmark:"M5 5a2 2 0 012-2h10a2 2 0 012 2v16l-7-3.5L5 21V5z",tag:"M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z",code:"M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4",terminal:"M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z",database:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4",server:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01",cloud:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z",gift:"M12 8v13m0-13V6a2 2 0 112 2h-2zm0 0V5.5A2.5 2.5 0 109.5 8H12zm-7 4h14M5 12a2 2 0 110-4h14a2 2 0 110 4M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7",moon:"M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z",sun:"M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z",theme:"M7 21a4 4 0 01-4-4V5a2 2 0 012-2h4a2 2 0 012 2v12a4 4 0 01-4 4zm0 0h12a2 2 0 002-2v-4a2 2 0 00-2-2h-2.343M11 7.343l1.657-1.657a2 2 0 012.828 0l2.829 2.829a2 2 0 010 2.828l-8.486 8.485M7 17h.01",skin:"M7 4h2v1c0 1.66 1.34 3 3 3s3-1.34 3-3V4h2l3 3v6h-4l1 3v5H7v-5l1-3H4V7l3-3z"};function $(o){return o in y}const _=["stroke-width"],x=["d"],g=e.defineComponent({name:"XIcon",__name:"index",props:{name:{},size:{default:24},color:{},spin:{type:Boolean,default:!1},strokeWidth:{default:2}},setup(o){const s=o,a=M.useNamespace("icon"),l=e.computed(()=>typeof s.size=="number"?`${s.size}px`:s.size),t=e.computed(()=>({width:l.value,height:l.value,color:s.color})),n=e.computed(()=>({strokeWidth:s.strokeWidth})),r=e.computed(()=>[a.b(),a.is("spin",s.spin)]),m=e.computed(()=>s.name&&$(s.name)?y[s.name]:"");return(u,h)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(r.value),style:e.normalizeStyle(t.value)},[m.value?(e.openBlock(),e.createElementBlock("svg",{key:0,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":o.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",style:e.normalizeStyle(n.value)},[e.createElementVNode("path",{d:m.value},null,8,x)],12,_)):e.renderSlot(u.$slots,"default",{key:1},()=>[e.createTextVNode(e.toDisplayString(o.name),1)])],6))}}),C="x-menu-item",L=e.defineComponent({name:"XMenuItem",__name:"MenuItem",props:{index:{default:""},disabled:{type:Boolean,default:!1},icon:{}},setup(o){const s=o,a=e.inject("menu");e.useSlots();const l=e.computed(()=>(a==null?void 0:a.activeIndex.value)===s.index),t=e.computed(()=>a==null?void 0:a.props.collapse),n=e.computed(()=>(a==null?void 0:a.props.mode)==="horizontal"),r=e.computed(()=>[C,{"is-active":l.value,"is-disabled":s.disabled,"is-horizontal":n.value,"is-collapse":t.value}]),m=e.computed(()=>l.value&&(a!=null&&a.props.activeTextColor)?{color:a.props.activeTextColor}:{}),u=()=>{s.disabled||s.index&&(a==null||a.handleSelect(s.index,[s.index]))};return(h,c)=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(r.value),style:e.normalizeStyle(m.value),onClick:u},[e.createElementVNode("div",{class:e.normalizeClass(C+"__content")},[o.icon?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(C+"__icon")},[e.createVNode(e.unref(g),{name:o.icon,size:18},null,8,["name"])],2)):h.$slots.icon?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(C+"__icon")},[e.renderSlot(h.$slots,"icon")],2)):e.createCommentVNode("",!0),e.createElementVNode("span",{class:e.normalizeClass(C+"__text")},[e.renderSlot(h.$slots,"default")],2)],2)],6))}}),A={class:"x-menu-item-group"},T={class:"x-menu-item-group__title"},D=e.defineComponent({name:"XMenuItemGroup",__name:"MenuItemGroup",props:{title:{}},setup(o){return(s,a)=>(e.openBlock(),e.createElementBlock("li",A,[e.createElementVNode("div",T,e.toDisplayString(o.title),1),e.createElementVNode("ul",null,[e.renderSlot(s.$slots,"default")])]))}}),z="x-sub-menu",I=e.defineComponent({name:"XSubMenu",__name:"SubMenu",props:{index:{default:""},title:{default:""},disabled:{type:Boolean,default:!1},icon:{}},setup(o){const s=o,a=e.inject("menu"),l=e.inject("subMenu",null),t=e.ref(!1),n=e.computed(()=>!!l),r=e.computed(()=>a==null?void 0:a.props.collapse),m=e.computed(()=>(a==null?void 0:a.activeIndex.value)===s.index),u=e.computed(()=>[z,z+((a==null?void 0:a.props.mode)==="horizontal"?"--horizontal":"--vertical"),{"is-active":m.value,"is-opened":t.value,"is-disabled":s.disabled,"is-nested":n.value,"is-collapse":r.value}]),h=()=>{s.disabled||r.value||(t.value=!t.value)},c=()=>{s.disabled||((a==null?void 0:a.props.mode)==="horizontal"||r.value)&&(t.value=!0)},p=()=>{((a==null?void 0:a.props.mode)==="horizontal"||r.value)&&(t.value=!1)};return e.provide("subMenu",{isOpen:t,isNested:n}),(i,d)=>{var v;return e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(u.value),onMouseenter:c,onMouseleave:p},[e.createElementVNode("div",{class:e.normalizeClass(z+"__title"),onClick:h},[e.createElementVNode("div",{class:e.normalizeClass(z+"__content")},[o.icon?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(z+"__icon")},[e.createVNode(e.unref(g),{name:o.icon,size:18},null,8,["name"])],2)):i.$slots.icon?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(z+"__icon")},[e.renderSlot(i.$slots,"icon")],2)):e.createCommentVNode("",!0),e.createElementVNode("span",{class:e.normalizeClass(z+"__text")},[e.renderSlot(i.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(o.title),1)])],2),e.createElementVNode("span",{class:e.normalizeClass([z+"__arrow",{"is-open":t.value}])},[...d[0]||(d[0]=[e.createElementVNode("svg",{viewBox:"0 0 1024 1024",width:"12",height:"12"},[e.createElementVNode("path",{fill:"currentColor",d:"M512 714.667c-17.067 0-32-6.4-44.8-19.2L147.2 375.467c-25.6-25.6-25.6-64 0-89.6s64-25.6 89.6 0L512 561.067l275.2-275.2c25.6-25.6 64-25.6 89.6 0s25.6 64 0 89.6L556.8 695.467c-12.8 12.8-27.733 19.2-44.8 19.2z"})],-1)])],2)],2)],2),e.createVNode(e.Transition,{name:((v=e.unref(a))==null?void 0:v.props.mode)==="horizontal"?"zoom-in-top":"zoom-in-left"},{default:e.withCtx(()=>{var f;return[e.withDirectives(e.createElementVNode("ul",{class:e.normalizeClass([z+"__menu",{"is-horizontal":((f=e.unref(a))==null?void 0:f.props.mode)==="horizontal","is-collapse":r.value}])},[e.renderSlot(i.$slots,"default")],2),[[e.vShow,t.value]])]}),_:3},8,["name"])],34)}}}),X=e.defineComponent({name:"XBreadcrumb",__name:"index",props:{separator:{default:"/"},separatorIcon:{}},setup(o){const s=o,a=M.useNamespace("breadcrumb");e.provide("breadcrumb",{separator:e.computed(()=>s.separator),separatorIcon:e.computed(()=>s.separatorIcon)});const l=e.computed(()=>[a.b()]);return(t,n)=>(e.openBlock(),e.createElementBlock("nav",{class:e.normalizeClass(l.value),"aria-label":"Breadcrumb"},[e.createElementVNode("ol",{class:e.normalizeClass(e.unref(a).e("list"))},[e.renderSlot(t.$slots,"default")],2)],2))}}),O=["aria-current"],j=e.defineComponent({name:"XBreadcrumbItem",__name:"BreadcrumbItem",props:{to:{},replace:{type:Boolean},disabled:{type:Boolean}},emits:["click"],setup(o,{emit:s}){const a=o,l=s,t=M.useNamespace("breadcrumb"),n=e.inject("breadcrumb"),r=e.computed(()=>[t.e("item"),t.is("link",!!a.to&&!a.disabled),t.is("disabled",a.disabled)]),m=e.computed(()=>{var c;return((c=n==null?void 0:n.separator)==null?void 0:c.value)||"/"}),u=e.computed(()=>{var c;return(c=n==null?void 0:n.separatorIcon)==null?void 0:c.value}),h=c=>{a.disabled||(l("click",c),a.to&&typeof a.to=="string"&&(a.replace?window.location.replace(a.to):window.location.href=a.to))};return(c,p)=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(r.value)},[o.to&&!o.disabled?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(t).e("link")),onClick:h},[e.renderSlot(c.$slots,"default")],2)):(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(t).e("text")),"aria-current":o.disabled?"page":void 0},[e.renderSlot(c.$slots,"default")],10,O)),e.createElementVNode("span",{class:e.normalizeClass(e.unref(t).e("separator")),"aria-hidden":"true"},[u.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(t).e("separator-icon"))},e.toDisplayString(u.value),3)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(m.value),1)],64))],2)],2))}}),P=e.defineComponent({name:"XSteps",__name:"index",props:{active:{default:0},direction:{default:"horizontal"},simple:{type:Boolean,default:!1},finishStatus:{default:"finish"},processStatus:{default:"process"},alignCenter:{type:Boolean,default:!1},space:{}},emits:["change","update:active"],setup(o,{emit:s}){const a=o,l=s,t=M.useNamespace("steps"),n=e.ref(a.active),r=e.ref(0);e.watch(()=>a.active,p=>{n.value=p});const m=p=>{n.value=p,l("change",p),l("update:active",p)},u=p=>{r.value=p};e.provide("steps",{props:a,currentActive:n,stepCount:r,setCurrentActive:m,setStepCount:u});const h=e.computed(()=>[t.b(),t.m(a.direction),t.is("simple",a.simple),t.is("center",a.alignCenter)]),c=e.computed(()=>a.space?{"--steps-space":typeof a.space=="number"?`${a.space}px`:a.space}:{});return(p,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(h.value),style:e.normalizeStyle(c.value)},[e.renderSlot(p.$slots,"default")],6))}}),F=e.defineComponent({name:"XStep",__name:"Step",props:{title:{default:""},description:{default:""},icon:{},status:{}},setup(o){const s=o,a=M.useNamespace("step"),l=e.inject("steps"),t=e.ref(-1);e.onMounted(()=>{l&&(t.value=l.stepCount.value,l.setStepCount(l.stepCount.value+1))});const n=e.computed(()=>{var p,i,d;if(s.status)return s.status;const c=((p=l==null?void 0:l.currentActive)==null?void 0:p.value)??0;return t.value<c?((i=l==null?void 0:l.props)==null?void 0:i.finishStatus)||"finish":t.value===c?((d=l==null?void 0:l.props)==null?void 0:d.processStatus)||"process":"wait"}),r=e.computed(()=>{var c;return t.value===(((c=l==null?void 0:l.stepCount)==null?void 0:c.value)||0)-1}),m=e.computed(()=>t.value===0);e.computed(()=>({wait:"#c0c4cc",process:"#409eff",finish:"#67c23a",error:"#f56c6c",success:"#67c23a"})[n.value]||"#c0c4cc");const u=e.computed(()=>{var c;return[a.b(),a.is(n.value),a.is("last",r.value),a.m(((c=l==null?void 0:l.props)==null?void 0:c.direction)||"horizontal")]}),h=()=>{var c;t.value>-1&&((c=l==null?void 0:l.setCurrentActive)==null||c.call(l,t.value))};return(c,p)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(u.value),onClick:h},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).e("head"))},[m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([e.unref(a).e("line"),e.unref(a).em("line","prev")])},null,2)),e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).e("icon"))},[o.icon?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(a).e("icon-inner"))},e.toDisplayString(o.icon),3)):(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(a).e("icon-inner"))},[n.value==="finish"||n.value==="success"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode("✓")],64)):n.value==="error"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode("✕")],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(e.toDisplayString(t.value+1),1)],64))],2))],2),r.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(a).e("line"))},null,2))],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).e("content"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).e("title"))},[e.renderSlot(c.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(o.title),1)])],2),o.description||c.$slots.description?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(a).e("description"))},[e.renderSlot(c.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(o.description),1)])],2)):e.createCommentVNode("",!0)],2)],2))}}),K=e.defineComponent({name:"XPageHeader",__name:"index",props:{title:{default:""},subtitle:{default:""},backText:{default:"返回"},showBack:{type:Boolean,default:!1}},emits:["back"],setup(o,{emit:s}){const a=s,l=M.useNamespace("page-header"),t=()=>{a("back")};return(n,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(l).b())},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("main"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("left"))},[o.showBack?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(l).e("back")),onClick:t},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(l).e("back-icon"))},"←",2),o.backText?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(l).e("back-text"))},e.toDisplayString(o.backText),3)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),e.createElementVNode("span",{class:e.normalizeClass(e.unref(l).e("title"))},[e.renderSlot(n.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(o.title),1)])],2),o.subtitle||n.$slots.subtitle?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(l).e("subtitle"))},[e.renderSlot(n.$slots,"subtitle",{},()=>[e.createTextVNode(e.toDisplayString(o.subtitle),1)])],2)):e.createCommentVNode("",!0)],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("extra"))},[e.renderSlot(n.$slots,"extra")],2)],2),n.$slots.default?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(l).e("content"))},[e.renderSlot(n.$slots,"default")],2)):e.createCommentVNode("",!0),n.$slots.footer?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(l).e("footer"))},[e.renderSlot(n.$slots,"footer")],2)):e.createCommentVNode("",!0)],2))}}),G=e.defineComponent({name:"XDropdown",__name:"index",props:{trigger:{default:"hover"},placement:{default:"bottom"},disabled:{type:Boolean,default:!1},visible:{type:Boolean},hideOnClick:{type:Boolean,default:!0}},emits:["visible-change","click","command"],setup(o,{emit:s}){const a=o,l=s,t=M.useNamespace("dropdown"),n=e.ref(a.visible||!1),r=e.ref(),m=()=>{a.disabled||(n.value=!0,l("visible-change",!0))},u=()=>{n.value=!1,l("visible-change",!1)},h=()=>{n.value?u():m()},c=v=>{l("click",v),l("command",v),a.hideOnClick&&u()};e.provide("x-dropdown",{visible:n,handleClick:c,hide:u});const p=()=>{a.trigger==="hover"&&m()},i=()=>{a.trigger==="hover"&&u()},d=v=>{r.value&&!r.value.contains(v.target)&&u()};return typeof window<"u"&&document.addEventListener("click",d),(v,f)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dropdownRef",ref:r,class:e.normalizeClass([e.unref(t).b(),e.unref(t).is("disabled",o.disabled)]),onMouseenter:p,onMouseleave:i},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(t).e("trigger")),onClick:f[0]||(f[0]=k=>o.trigger==="click"&&h())},[e.renderSlot(v.$slots,"default")],2),e.createVNode(e.Transition,{name:"x-dropdown-zoom"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass([e.unref(t).e("menu"),e.unref(t).m(o.placement)])},[e.renderSlot(v.$slots,"dropdown")],2),[[e.vShow,n.value]])]),_:3})],34))}}),W=e.defineComponent({name:"XDropdownMenu",__name:"DropdownMenu",setup(o){const s=M.useNamespace("dropdown-menu");return(a,l)=>(e.openBlock(),e.createElementBlock("ul",{class:e.normalizeClass(e.unref(s).b())},[e.renderSlot(a.$slots,"default")],2))}}),q=e.defineComponent({name:"XDropdownItem",__name:"DropdownItem",props:{command:{},disabled:{type:Boolean},divided:{type:Boolean},icon:{}},emits:["click"],setup(o,{emit:s}){const a=o,l=s,t=M.useNamespace("dropdown-item"),n=e.inject("x-dropdown"),r=u=>{a.disabled||(l("click",u),n!=null&&n.handleClick&&n.handleClick(a.command??u))},m=e.computed(()=>[t.b(),t.is("disabled",a.disabled),t.is("divided",a.divided)]);return(u,h)=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(m.value),onClick:r},[o.icon?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(t).e("icon"))},e.toDisplayString(o.icon),3)):e.createCommentVNode("",!0),e.createElementVNode("span",{class:e.normalizeClass(e.unref(t).e("content"))},[e.renderSlot(u.$slots,"default")],2)],2))}});exports.Breadcrumb=X;exports.BreadcrumbItem=j;exports.Dropdown=G;exports.DropdownItem=q;exports.DropdownMenu=W;exports.Menu=w;exports.MenuItem=L;exports.MenuItemGroup=D;exports.PageHeader=K;exports.Step=F;exports.Steps=P;exports.SubMenu=I;exports.TabPane=H;exports.Tabs=N;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),M=require("@xto/core"),E=["onClick"],N=e.defineComponent({name:"XTabs",__name:"index",props:{modelValue:{default:void 0},activeKey:{default:void 0},type:{default:"line"},tabPosition:{default:"top"},addable:{type:Boolean,default:!1},closable:{type:Boolean,default:!1}},emits:["update:modelValue","update:activeKey","tabClick","edit"],setup(o,{emit:n}){const a=o,l=n,t=M.useNamespace("tabs"),s=e.useSlots(),i=e.ref(a.modelValue??a.activeKey??"");e.watch([()=>a.modelValue,()=>a.activeKey],([c,p])=>{const d=c??p;d!==void 0&&(i.value=d)});const m=(c,p)=>{i.value=c,l("update:modelValue",c),l("update:activeKey",c)};e.provide("tabs",{props:a,activeName:i,handleTabClick:m});const u=e.computed(()=>[t.b(),t.m(a.type),t.is(`position-${a.tabPosition}`)]),h=e.computed(()=>{var p;return(((p=s.default)==null?void 0:p.call(s))||[]).filter(d=>d.type&&d.type.name==="XTabPane").map(d=>{var r,v,f,z,V,b,B;return{name:((r=d.props)==null?void 0:r.name)||((v=d.props)==null?void 0:v.key)||((f=d.props)==null?void 0:f.label)||((z=d.props)==null?void 0:z.tab),label:((V=d.props)==null?void 0:V.label)||((b=d.props)==null?void 0:b.tab),disabled:((B=d.props)==null?void 0:B.disabled)===!0}})});return(c,p)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(u.value)},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(t).e("header"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(t).e("nav"))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,d=>(e.openBlock(),e.createElementBlock("div",{key:d.name,class:e.normalizeClass([e.unref(t).e("item"),e.unref(t).em("item",i.value===d.name?"active":""),e.unref(t).is("disabled",d.disabled)]),onClick:r=>d.disabled?null:m(d.name)},e.toDisplayString(d.label),11,E))),128))],2)],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(t).e("content"))},[e.renderSlot(c.$slots,"default")],2)],2))}}),S={class:"x-tab-pane",role:"tabpanel"},H=e.defineComponent({name:"XTabPane",__name:"TabPane",props:{label:{},tab:{},name:{},key:{},disabled:{type:Boolean,default:!1},closable:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1}},setup(o){const n=o,a=e.inject("tabs"),l=e.ref(!1),t=e.computed(()=>n.name||n.key||n.label||n.tab),s=e.computed(()=>(a==null?void 0:a.activeName.value)===t.value);return e.watch(()=>a==null?void 0:a.activeName.value,()=>{s.value&&n.lazy&&!l.value&&(l.value=!0)},{immediate:!0}),s.value&&n.lazy&&(l.value=!0),(i,m)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",S,[l.value||!o.lazy?e.renderSlot(i.$slots,"default",{key:0}):e.createCommentVNode("",!0)],512)),[[e.vShow,s.value]])}}),w=e.defineComponent({name:"XMenu",__name:"index",props:{modelValue:{default:""},mode:{default:"vertical"},collapse:{type:Boolean,default:!1},backgroundColor:{default:"#fff"},textColor:{default:"#303133"},activeTextColor:{default:"#409eff"},defaultOpeneds:{default:()=>[]},openeds:{default:void 0},router:{type:Boolean}},emits:["update:modelValue","update:openeds","select","open","close"],setup(o,{emit:n}){const a=o,l=n,t=M.useNamespace("menu"),s=e.ref(a.modelValue),i=e.ref([...a.defaultOpeneds]),m=e.computed({get:()=>a.openeds??i.value,set:r=>{i.value=r,l("update:openeds",r)}});e.watch(()=>a.modelValue,r=>{s.value=r});const u=(r,v=[])=>{s.value=r,l("update:modelValue",r),l("select",r,v)},h=(r,v=[])=>{m.value.includes(r)||(m.value=[...m.value,r]),l("open",r,v)},c=(r,v=[])=>{const f=m.value.indexOf(r);if(f>-1){const z=[...m.value];z.splice(f,1),m.value=z}l("close",r,v)};e.provide("menu",{props:a,activeIndex:s,openedMenus:m,handleSelect:u,handleOpen:h,handleClose:c});const p=e.computed(()=>[t.b(),t.is("collapse",a.collapse),t.is(`mode-${a.mode}`)]),d=e.computed(()=>({backgroundColor:a.backgroundColor,color:a.textColor}));return(r,v)=>(e.openBlock(),e.createElementBlock("ul",{class:e.normalizeClass(p.value),style:e.normalizeStyle(d.value)},[e.renderSlot(r.$slots,"default")],6))}}),y={"arrow-up":"M12 19V5m0 0l-7 7m7-7l7 7","arrow-down":"M12 5v14m0 0l7-7m-7 7l-7-7","arrow-left":"M19 12H5m0 0l7 7m-7-7l7-7","arrow-right":"M5 12h14m0 0l-7-7m7 7l-7 7","arrow-up-bold":"M12 5l-7 7h4v7h6v-7h4l-7-7z","arrow-down-bold":"M12 19l7-7h-4V5H9v7H5l7 7z","arrow-left-bold":"M5 12l7-7v4h7v6h-7v4l-7-7z","arrow-right-bold":"M19 12l-7 7v-4H5v-6h7V5l7 7z","caret-down":"M6 9l6 6 6-6","caret-right":"M9 18l6-6-6-6",plus:"M12 5v14m-7-7h14",minus:"M5 12h14",close:"M6 18L18 6M6 6l12 12",check:"M5 13l4 4L19 7","check-bold":"M4 12l5 5L20 6",edit:"M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7M18.5 2.5a2.121 2.121 0 013 3L12 15l-4 1 1-4 9.5-9.5z",delete:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16",copy:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z",download:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4",upload:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12",refresh:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15",search:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z",filter:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z",more:"M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z","more-h":"M5 12h.01M12 12h.01M19 12h.01M6 12a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0z",setting:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M15 12a3 3 0 11-6 0 3 3 0 016 0z",share:"M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.368 2.684 3 3 0 00-5.368-2.684z",loading:"M12 2v4m0 12v4M4.93 4.93l2.83 2.83m8.48 8.48l2.83 2.83M2 12h4m12 0h4M4.93 19.07l2.83-2.83m8.48-8.48l2.83-2.83",info:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",success:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",warning:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z",error:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z",question:"M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",user:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z","user-add":"M18 9v3m0 0v3m0-3h3m-3 0h-3m-2-5a4 4 0 11-8 0 4 4 0 018 0zM3 20a6 6 0 0112 0v1H3v-1z","user-group":"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z",logout:"M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1",login:"M11 16l-4-4m0 0l4-4m-4 4h14m-5 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h7a3 3 0 013 3v1",file:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z",folder:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z","folder-open":"M5 19a2 2 0 01-2-2V7a2 2 0 012-2h4l2 2h4a2 2 0 012 2v1M5 19h14a2 2 0 002-2v-5a2 2 0 00-2-2H9a2 2 0 00-2 2v5a2 2 0 01-2 2z",document:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z",image:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z",video:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z",music:"M9 19V6l12-3v13M9 19c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zm12-3c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zM9 10l12-3",camera:"M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z M15 13a3 3 0 11-6 0 3 3 0 016 0z",mail:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z",phone:"M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z",chat:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z",bell:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9",message:"M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z",eye:"M15 12a3 3 0 11-6 0 3 3 0 016 0z M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z","eye-off":"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21",calendar:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z",clock:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z",history:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z",timer:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z",location:"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z M15 11a3 3 0 11-6 0 3 3 0 016 0z",map:"M9 20l-5.447-2.724A1 1 0 013 16.382V5.618a1 1 0 011.447-.894L9 7m0 13l6-3m-6 3V7m6 10l4.553 2.276A1 1 0 0021 18.382V7.618a1 1 0 00-.553-.894L15 4m0 13V4m0 0L9 7",globe:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9",star:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z",heart:"M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z","thumb-up":"M14 10h4.764a2 2 0 011.789 2.894l-3.5 7A2 2 0 0115.263 21h-4.017c-.163 0-.326-.02-.485-.06L7 20m7-10V5a2 2 0 00-2-2h-.095c-.5 0-.905.405-.905.905 0 .714-.211 1.412-.608 2.006L7 11v9m7-10h-2M7 20H5a2 2 0 01-2-2v-6a2 2 0 012-2h2.5",link:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1","external-link":"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14",lock:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z",unlock:"M8 11V7a4 4 0 118 0m-4 8v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2z",key:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z",home:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6",menu:"M4 6h16M4 12h16M4 18h16","menu-fold":"M4 6h16M4 12h10M4 18h16","menu-unfold":"M4 6h16M10 12h10M4 18h16","menu-collapse":"M4 6h16M4 12h10M4 18h16","menu-expand":"M4 6h16M10 12h10M4 18h16","sidebar-fold":"M11 19l-7-7 7-7m8 14l-7-7 7-7","sidebar-expand":"M13 5l7 7-7 7M5 5l7 7-7 7","sidebar-left":"M11 19l-7-7 7-7m8 14l-7-7 7-7",dashboard:"M4 5a1 1 0 011-1h4a1 1 0 011 1v5a1 1 0 01-1 1H5a1 1 0 01-1-1V5zM14 5a1 1 0 011-1h4a1 1 0 011 1v2a1 1 0 01-1 1h-4a1 1 0 01-1-1V5zM4 15a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1H5a1 1 0 01-1-1v-4zM14 12a1 1 0 011-1h4a1 1 0 011 1v7a1 1 0 01-1 1h-4a1 1 0 01-1-1v-7z",chart:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z","chart-pie":"M11 3.055A9.001 9.001 0 1020.945 13H11V3.055z M20.488 9H15V3.512A9.025 9.025 0 0120.488 9z","chart-line":"M7 12l3-3 3 3 4-4M8 21l4-4 4 4M3 4h18M4 4v16",report:"M9 17v-2m3 2v-4m3 4v-6m2 10H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z",analytics:"M16 8v8m-4-5v5m-4-2v2m-2 4h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z",system:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M12 15a3 3 0 100-6 3 3 0 000 6z",permission:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z",role:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z","user-manage":"M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z",log:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z",notification:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9",app:"M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z",list:"M4 6h16M4 10h16M4 14h16M4 18h16",grid:"M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z",fullscreen:"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4","fullscreen-exit":"M9 4V9H4m11-5v5h5M4 15h5v5m11-5h-5v5","zoom-in":"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM10 7v6m3-3H7","zoom-out":"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM13 10H7",print:"M17 17h2a2 2 0 002-2v-4a2 2 0 00-2-2H5a2 2 0 00-2 2v4a2 2 0 002 2h2m2 4h6a2 2 0 002-2v-4a2 2 0 00-2-2H9a2 2 0 00-2 2v4a2 2 0 002 2zm8-12V5a2 2 0 00-2-2H9a2 2 0 00-2 2v4h10z",bookmark:"M5 5a2 2 0 012-2h10a2 2 0 012 2v16l-7-3.5L5 21V5z",tag:"M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z",code:"M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4",terminal:"M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z",database:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4",server:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01",cloud:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z",gift:"M12 8v13m0-13V6a2 2 0 112 2h-2zm0 0V5.5A2.5 2.5 0 109.5 8H12zm-7 4h14M5 12a2 2 0 110-4h14a2 2 0 110 4M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7",moon:"M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z",sun:"M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z",theme:"M7 21a4 4 0 01-4-4V5a2 2 0 012-2h4a2 2 0 012 2v12a4 4 0 01-4 4zm0 0h12a2 2 0 002-2v-4a2 2 0 00-2-2h-2.343M11 7.343l1.657-1.657a2 2 0 012.828 0l2.829 2.829a2 2 0 010 2.828l-8.486 8.485M7 17h.01",skin:"M7 4h2v1c0 1.66 1.34 3 3 3s3-1.34 3-3V4h2l3 3v6h-4l1 3v5H7v-5l1-3H4V7l3-3z"};function $(o){return o in y}const x=["stroke-width"],_=["d"],g=e.defineComponent({name:"XIcon",__name:"index",props:{name:{},size:{default:24},color:{},spin:{type:Boolean,default:!1},strokeWidth:{default:2}},setup(o){const n=o,a=M.useNamespace("icon"),l=e.computed(()=>typeof n.size=="number"?`${n.size}px`:n.size),t=e.computed(()=>({width:l.value,height:l.value,color:n.color})),s=e.computed(()=>({strokeWidth:n.strokeWidth})),i=e.computed(()=>[a.b(),a.is("spin",n.spin)]),m=e.computed(()=>n.name&&$(n.name)?y[n.name]:"");return(u,h)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(i.value),style:e.normalizeStyle(t.value)},[m.value?(e.openBlock(),e.createElementBlock("svg",{key:0,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":o.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",style:e.normalizeStyle(s.value)},[e.createElementVNode("path",{d:m.value},null,8,_)],12,x)):e.renderSlot(u.$slots,"default",{key:1},()=>[e.createTextVNode(e.toDisplayString(o.name),1)])],6))}}),C="x-menu-item",L=e.defineComponent({name:"XMenuItem",__name:"MenuItem",props:{index:{default:""},disabled:{type:Boolean,default:!1},icon:{}},setup(o){const n=o,a=e.inject("menu");e.useSlots();const l=e.computed(()=>(a==null?void 0:a.activeIndex.value)===n.index),t=e.computed(()=>a==null?void 0:a.props.collapse),s=e.computed(()=>(a==null?void 0:a.props.mode)==="horizontal"),i=e.computed(()=>[C,{"is-active":l.value,"is-disabled":n.disabled,"is-horizontal":s.value,"is-collapse":t.value}]),m=e.computed(()=>l.value&&(a!=null&&a.props.activeTextColor)?{color:a.props.activeTextColor}:{}),u=()=>{n.disabled||n.index&&(a==null||a.handleSelect(n.index,[n.index]))};return(h,c)=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(i.value),style:e.normalizeStyle(m.value),onClick:u},[e.createElementVNode("div",{class:e.normalizeClass(C+"__content")},[o.icon?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(C+"__icon")},[e.createVNode(e.unref(g),{name:o.icon,size:18},null,8,["name"])],2)):h.$slots.icon?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(C+"__icon")},[e.renderSlot(h.$slots,"icon")],2)):e.createCommentVNode("",!0),e.createElementVNode("span",{class:e.normalizeClass(C+"__text")},[e.renderSlot(h.$slots,"default")],2)],2)],6))}}),A={class:"x-menu-item-group"},T={class:"x-menu-item-group__title"},D=e.defineComponent({name:"XMenuItemGroup",__name:"MenuItemGroup",props:{title:{}},setup(o){return(n,a)=>(e.openBlock(),e.createElementBlock("li",A,[e.createElementVNode("div",T,e.toDisplayString(o.title),1),e.createElementVNode("ul",null,[e.renderSlot(n.$slots,"default")])]))}}),k="x-sub-menu",I=e.defineComponent({name:"XSubMenu",__name:"SubMenu",props:{index:{default:""},title:{default:""},disabled:{type:Boolean,default:!1},icon:{}},setup(o){const n=o,a=e.inject("menu"),l=e.inject("subMenu",null),t=e.ref(!1),s=e.computed(()=>!!l),i=e.computed(()=>a==null?void 0:a.props.collapse),m=e.computed(()=>{var r,v;return i.value?t.value:((v=(r=a==null?void 0:a.openedMenus)==null?void 0:r.value)==null?void 0:v.includes(n.index))??!1}),u=e.computed(()=>(a==null?void 0:a.activeIndex.value)===n.index),h=e.computed(()=>[k,k+((a==null?void 0:a.props.mode)==="horizontal"?"--horizontal":"--vertical"),{"is-active":u.value,"is-opened":m.value,"is-disabled":n.disabled,"is-nested":s.value,"is-collapse":i.value}]),c=()=>{var r,v;n.disabled||i.value||(m.value?(r=a==null?void 0:a.handleClose)==null||r.call(a,n.index):(v=a==null?void 0:a.handleOpen)==null||v.call(a,n.index))},p=()=>{n.disabled||((a==null?void 0:a.props.mode)==="horizontal"||i.value)&&(t.value=!0)},d=()=>{((a==null?void 0:a.props.mode)==="horizontal"||i.value)&&(t.value=!1)};return e.provide("subMenu",{isOpen:m,isNested:s,index:n.index}),(r,v)=>{var f;return e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(h.value),onMouseenter:p,onMouseleave:d},[e.createElementVNode("div",{class:e.normalizeClass(k+"__title"),onClick:c},[e.createElementVNode("div",{class:e.normalizeClass(k+"__content")},[o.icon?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(k+"__icon")},[e.createVNode(e.unref(g),{name:o.icon,size:18},null,8,["name"])],2)):r.$slots.icon?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(k+"__icon")},[e.renderSlot(r.$slots,"icon")],2)):e.createCommentVNode("",!0),e.createElementVNode("span",{class:e.normalizeClass(k+"__text")},[e.renderSlot(r.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(o.title),1)])],2),e.createElementVNode("span",{class:e.normalizeClass([k+"__arrow",{"is-open":m.value}])},[...v[0]||(v[0]=[e.createElementVNode("svg",{viewBox:"0 0 1024 1024",width:"12",height:"12"},[e.createElementVNode("path",{fill:"currentColor",d:"M512 714.667c-17.067 0-32-6.4-44.8-19.2L147.2 375.467c-25.6-25.6-25.6-64 0-89.6s64-25.6 89.6 0L512 561.067l275.2-275.2c25.6-25.6 64-25.6 89.6 0s25.6 64 0 89.6L556.8 695.467c-12.8 12.8-27.733 19.2-44.8 19.2z"})],-1)])],2)],2)],2),e.createVNode(e.Transition,{name:((f=e.unref(a))==null?void 0:f.props.mode)==="horizontal"?"zoom-in-top":"zoom-in-left"},{default:e.withCtx(()=>{var z;return[e.withDirectives(e.createElementVNode("ul",{class:e.normalizeClass([k+"__menu",{"is-horizontal":((z=e.unref(a))==null?void 0:z.props.mode)==="horizontal","is-collapse":i.value}])},[e.renderSlot(r.$slots,"default")],2),[[e.vShow,m.value]])]}),_:3},8,["name"])],34)}}}),X=e.defineComponent({name:"XBreadcrumb",__name:"index",props:{separator:{default:"/"},separatorIcon:{}},setup(o){const n=o,a=M.useNamespace("breadcrumb");e.provide("breadcrumb",{separator:e.computed(()=>n.separator),separatorIcon:e.computed(()=>n.separatorIcon)});const l=e.computed(()=>[a.b()]);return(t,s)=>(e.openBlock(),e.createElementBlock("nav",{class:e.normalizeClass(l.value),"aria-label":"Breadcrumb"},[e.createElementVNode("ol",{class:e.normalizeClass(e.unref(a).e("list"))},[e.renderSlot(t.$slots,"default")],2)],2))}}),O=["aria-current"],j=e.defineComponent({name:"XBreadcrumbItem",__name:"BreadcrumbItem",props:{to:{},replace:{type:Boolean},disabled:{type:Boolean}},emits:["click"],setup(o,{emit:n}){const a=o,l=n,t=M.useNamespace("breadcrumb"),s=e.inject("breadcrumb"),i=e.computed(()=>[t.e("item"),t.is("link",!!a.to&&!a.disabled),t.is("disabled",a.disabled)]),m=e.computed(()=>{var c;return((c=s==null?void 0:s.separator)==null?void 0:c.value)||"/"}),u=e.computed(()=>{var c;return(c=s==null?void 0:s.separatorIcon)==null?void 0:c.value}),h=c=>{a.disabled||(l("click",c),a.to&&typeof a.to=="string"&&(a.replace?window.location.replace(a.to):window.location.href=a.to))};return(c,p)=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(i.value)},[o.to&&!o.disabled?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(t).e("link")),onClick:h},[e.renderSlot(c.$slots,"default")],2)):(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(t).e("text")),"aria-current":o.disabled?"page":void 0},[e.renderSlot(c.$slots,"default")],10,O)),e.createElementVNode("span",{class:e.normalizeClass(e.unref(t).e("separator")),"aria-hidden":"true"},[u.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(t).e("separator-icon"))},e.toDisplayString(u.value),3)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(m.value),1)],64))],2)],2))}}),P=e.defineComponent({name:"XSteps",__name:"index",props:{active:{default:0},direction:{default:"horizontal"},simple:{type:Boolean,default:!1},finishStatus:{default:"finish"},processStatus:{default:"process"},alignCenter:{type:Boolean,default:!1},space:{}},emits:["change","update:active"],setup(o,{emit:n}){const a=o,l=n,t=M.useNamespace("steps"),s=e.ref(a.active),i=e.ref(0);e.watch(()=>a.active,p=>{s.value=p});const m=p=>{s.value=p,l("change",p),l("update:active",p)},u=p=>{i.value=p};e.provide("steps",{props:a,currentActive:s,stepCount:i,setCurrentActive:m,setStepCount:u});const h=e.computed(()=>[t.b(),t.m(a.direction),t.is("simple",a.simple),t.is("center",a.alignCenter)]),c=e.computed(()=>a.space?{"--steps-space":typeof a.space=="number"?`${a.space}px`:a.space}:{});return(p,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(h.value),style:e.normalizeStyle(c.value)},[e.renderSlot(p.$slots,"default")],6))}}),F=e.defineComponent({name:"XStep",__name:"Step",props:{title:{default:""},description:{default:""},icon:{},status:{}},setup(o){const n=o,a=M.useNamespace("step"),l=e.inject("steps"),t=e.ref(-1);e.onMounted(()=>{l&&(t.value=l.stepCount.value,l.setStepCount(l.stepCount.value+1))});const s=e.computed(()=>{var p,d,r;if(n.status)return n.status;const c=((p=l==null?void 0:l.currentActive)==null?void 0:p.value)??0;return t.value<c?((d=l==null?void 0:l.props)==null?void 0:d.finishStatus)||"finish":t.value===c?((r=l==null?void 0:l.props)==null?void 0:r.processStatus)||"process":"wait"}),i=e.computed(()=>{var c;return t.value===(((c=l==null?void 0:l.stepCount)==null?void 0:c.value)||0)-1}),m=e.computed(()=>t.value===0);e.computed(()=>({wait:"#c0c4cc",process:"#409eff",finish:"#67c23a",error:"#f56c6c",success:"#67c23a"})[s.value]||"#c0c4cc");const u=e.computed(()=>{var c;return[a.b(),a.is(s.value),a.is("last",i.value),a.m(((c=l==null?void 0:l.props)==null?void 0:c.direction)||"horizontal")]}),h=()=>{var c;t.value>-1&&((c=l==null?void 0:l.setCurrentActive)==null||c.call(l,t.value))};return(c,p)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(u.value),onClick:h},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).e("head"))},[m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([e.unref(a).e("line"),e.unref(a).em("line","prev")])},null,2)),e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).e("icon"))},[o.icon?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(a).e("icon-inner"))},e.toDisplayString(o.icon),3)):(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(a).e("icon-inner"))},[s.value==="finish"||s.value==="success"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode("✓")],64)):s.value==="error"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode("✕")],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(e.toDisplayString(t.value+1),1)],64))],2))],2),i.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(a).e("line"))},null,2))],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).e("content"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).e("title"))},[e.renderSlot(c.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(o.title),1)])],2),o.description||c.$slots.description?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(a).e("description"))},[e.renderSlot(c.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(o.description),1)])],2)):e.createCommentVNode("",!0)],2)],2))}}),K=e.defineComponent({name:"XPageHeader",__name:"index",props:{title:{default:""},subtitle:{default:""},backText:{default:"返回"},showBack:{type:Boolean,default:!1}},emits:["back"],setup(o,{emit:n}){const a=n,l=M.useNamespace("page-header"),t=()=>{a("back")};return(s,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(l).b())},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("main"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("left"))},[o.showBack?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(l).e("back")),onClick:t},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(l).e("back-icon"))},"←",2),o.backText?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(l).e("back-text"))},e.toDisplayString(o.backText),3)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),e.createElementVNode("span",{class:e.normalizeClass(e.unref(l).e("title"))},[e.renderSlot(s.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(o.title),1)])],2),o.subtitle||s.$slots.subtitle?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(l).e("subtitle"))},[e.renderSlot(s.$slots,"subtitle",{},()=>[e.createTextVNode(e.toDisplayString(o.subtitle),1)])],2)):e.createCommentVNode("",!0)],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("extra"))},[e.renderSlot(s.$slots,"extra")],2)],2),s.$slots.default?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(l).e("content"))},[e.renderSlot(s.$slots,"default")],2)):e.createCommentVNode("",!0),s.$slots.footer?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(l).e("footer"))},[e.renderSlot(s.$slots,"footer")],2)):e.createCommentVNode("",!0)],2))}}),G=e.defineComponent({name:"XDropdown",__name:"index",props:{trigger:{default:"hover"},placement:{default:"bottom"},disabled:{type:Boolean,default:!1},visible:{type:Boolean},hideOnClick:{type:Boolean,default:!0}},emits:["visible-change","click","command"],setup(o,{emit:n}){const a=o,l=n,t=M.useNamespace("dropdown"),s=e.ref(a.visible||!1),i=e.ref(),m=()=>{a.disabled||(s.value=!0,l("visible-change",!0))},u=()=>{s.value=!1,l("visible-change",!1)},h=()=>{s.value?u():m()},c=v=>{l("click",v),l("command",v),a.hideOnClick&&u()};e.provide("x-dropdown",{visible:s,handleClick:c,hide:u});const p=()=>{a.trigger==="hover"&&m()},d=()=>{a.trigger==="hover"&&u()},r=v=>{i.value&&!i.value.contains(v.target)&&u()};return typeof window<"u"&&document.addEventListener("click",r),(v,f)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dropdownRef",ref:i,class:e.normalizeClass([e.unref(t).b(),e.unref(t).is("disabled",o.disabled)]),onMouseenter:p,onMouseleave:d},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(t).e("trigger")),onClick:f[0]||(f[0]=z=>o.trigger==="click"&&h())},[e.renderSlot(v.$slots,"default")],2),e.createVNode(e.Transition,{name:"x-dropdown-zoom"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass([e.unref(t).e("menu"),e.unref(t).m(o.placement)])},[e.renderSlot(v.$slots,"dropdown")],2),[[e.vShow,s.value]])]),_:3})],34))}}),W=e.defineComponent({name:"XDropdownMenu",__name:"DropdownMenu",setup(o){const n=M.useNamespace("dropdown-menu");return(a,l)=>(e.openBlock(),e.createElementBlock("ul",{class:e.normalizeClass(e.unref(n).b())},[e.renderSlot(a.$slots,"default")],2))}}),q=e.defineComponent({name:"XDropdownItem",__name:"DropdownItem",props:{command:{},disabled:{type:Boolean},divided:{type:Boolean},icon:{}},emits:["click"],setup(o,{emit:n}){const a=o,l=n,t=M.useNamespace("dropdown-item"),s=e.inject("x-dropdown"),i=u=>{a.disabled||(l("click",u),s!=null&&s.handleClick&&s.handleClick(a.command??u))},m=e.computed(()=>[t.b(),t.is("disabled",a.disabled),t.is("divided",a.divided)]);return(u,h)=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(m.value),onClick:i},[o.icon?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(t).e("icon"))},e.toDisplayString(o.icon),3)):e.createCommentVNode("",!0),e.createElementVNode("span",{class:e.normalizeClass(e.unref(t).e("content"))},[e.renderSlot(u.$slots,"default")],2)],2))}});exports.Breadcrumb=X;exports.BreadcrumbItem=j;exports.Dropdown=G;exports.DropdownItem=q;exports.DropdownMenu=W;exports.Menu=w;exports.MenuItem=L;exports.MenuItemGroup=D;exports.PageHeader=K;exports.Step=F;exports.Steps=P;exports.SubMenu=I;exports.TabPane=H;exports.Tabs=N;
|