vx-vue 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +36 -33
- package/dist/style.css +1 -1
- package/dist/vxvue.es.js +719 -372
- package/dist/vxvue.umd.js +1 -1
- package/package.json +27 -26
package/dist/vxvue.es.js
CHANGED
|
@@ -1,111 +1,21 @@
|
|
|
1
|
-
import { openBlock as
|
|
2
|
-
|
|
3
|
-
return a(), o("svg", {
|
|
4
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
5
|
-
fill: "none",
|
|
6
|
-
viewBox: "0 0 24 24",
|
|
7
|
-
"stroke-width": "1.5",
|
|
8
|
-
stroke: "currentColor",
|
|
9
|
-
"aria-hidden": "true"
|
|
10
|
-
}, [
|
|
11
|
-
n("path", {
|
|
12
|
-
"stroke-linecap": "round",
|
|
13
|
-
"stroke-linejoin": "round",
|
|
14
|
-
d: "M3.98 8.223A10.477 10.477 0 001.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0112 4.5c4.756 0 8.773 3.162 10.065 7.498a10.523 10.523 0 01-4.293 5.774M6.228 6.228L3 3m3.228 3.228l3.65 3.65m7.894 7.894L21 21m-3.228-3.228l-3.65-3.65m0 0a3 3 0 10-4.243-4.243m4.242 4.242L9.88 9.88"
|
|
15
|
-
})
|
|
16
|
-
]);
|
|
17
|
-
}
|
|
18
|
-
function F(t, i) {
|
|
19
|
-
return a(), o("svg", {
|
|
20
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
21
|
-
fill: "none",
|
|
22
|
-
viewBox: "0 0 24 24",
|
|
23
|
-
"stroke-width": "1.5",
|
|
24
|
-
stroke: "currentColor",
|
|
25
|
-
"aria-hidden": "true"
|
|
26
|
-
}, [
|
|
27
|
-
n("path", {
|
|
28
|
-
"stroke-linecap": "round",
|
|
29
|
-
"stroke-linejoin": "round",
|
|
30
|
-
d: "M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178z"
|
|
31
|
-
}),
|
|
32
|
-
n("path", {
|
|
33
|
-
"stroke-linecap": "round",
|
|
34
|
-
"stroke-linejoin": "round",
|
|
35
|
-
d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z"
|
|
36
|
-
})
|
|
37
|
-
]);
|
|
38
|
-
}
|
|
39
|
-
const E = ["value", "type"], Ee = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
40
|
-
__name: "password-input",
|
|
41
|
-
props: ["modelValue"],
|
|
42
|
-
emits: ["update:modelValue"],
|
|
43
|
-
setup(t, { emit: i }) {
|
|
44
|
-
const s = g(!1), l = _(() => {
|
|
45
|
-
let e = Object.assign({}, T());
|
|
46
|
-
return delete e.class, e;
|
|
47
|
-
});
|
|
48
|
-
return (e, v) => (a(), o("div", {
|
|
49
|
-
class: f("inline-block relative " + T().class)
|
|
50
|
-
}, [
|
|
51
|
-
n("input", N({
|
|
52
|
-
value: t.modelValue,
|
|
53
|
-
type: s.value ? "text" : "password",
|
|
54
|
-
onInput: v[0] || (v[0] = (u) => i("update:modelValue", u.target.value))
|
|
55
|
-
}, l.value, { class: "block pr-10 w-full form-input peer" }), null, 16, E),
|
|
56
|
-
n("button", {
|
|
57
|
-
onClick: v[1] || (v[1] = C((u) => s.value = !s.value, ["stop"])),
|
|
58
|
-
class: "flex absolute inset-y-0 right-0 items-center pr-3 text-brand-700 hover:text-brand"
|
|
59
|
-
}, [
|
|
60
|
-
s.value ? (a(), B($(I), {
|
|
61
|
-
key: 0,
|
|
62
|
-
class: "w-5 h-5"
|
|
63
|
-
})) : (a(), B($(F), {
|
|
64
|
-
key: 1,
|
|
65
|
-
class: "w-5 h-5"
|
|
66
|
-
}))
|
|
67
|
-
]),
|
|
68
|
-
x(e.$slots, "default")
|
|
69
|
-
], 2));
|
|
70
|
-
}
|
|
71
|
-
}), q = ["value"], R = {
|
|
72
|
-
key: 0,
|
|
73
|
-
disabled: "",
|
|
74
|
-
value: ""
|
|
75
|
-
}, U = ["value", "selected"], G = {
|
|
76
|
-
__name: "form-select",
|
|
77
|
-
props: { options: Array, modelValue: [String, Number], disabledLabel: String },
|
|
78
|
-
emits: ["update:modelValue"],
|
|
79
|
-
setup(t, { emit: i }) {
|
|
80
|
-
return (s, l) => (a(), o("select", N(s.$attrs, {
|
|
81
|
-
value: t.modelValue,
|
|
82
|
-
class: "form-select",
|
|
83
|
-
onChange: l[0] || (l[0] = (e) => i("update:modelValue", e.target.value))
|
|
84
|
-
}), [
|
|
85
|
-
t.disabledLabel ? (a(), o("option", R, h(t.disabledLabel), 1)) : y("", !0),
|
|
86
|
-
(a(!0), o(b, null, k(t.options, (e) => (a(), o("option", {
|
|
87
|
-
value: e.key !== void 0 ? e.key : e.label || e,
|
|
88
|
-
selected: (e.key !== void 0 ? e.key : e.label || e) === t.modelValue
|
|
89
|
-
}, h(e.label || e), 9, U))), 256))
|
|
90
|
-
], 16, q));
|
|
91
|
-
}
|
|
92
|
-
}, H = {
|
|
1
|
+
import { ref as w, computed as $, openBlock as r, createElementBlock as d, Fragment as D, createCommentVNode as C, createVNode as F, Transition as Z, withCtx as z, createElementVNode as u, normalizeClass as k, renderSlot as S, createTextVNode as A, toDisplayString as y, renderList as V, withModifiers as M, unref as _, nextTick as R, toValue as q, getCurrentScope as ue, onScopeDispose as ie, watch as B, useAttrs as E, withDirectives as J, mergeProps as L, vModelText as ce, createBlock as O, onMounted as K, resolveDynamicComponent as Q, resolveComponent as de, vShow as ve } from "vue";
|
|
2
|
+
const he = {
|
|
93
3
|
key: 0,
|
|
94
4
|
class: "fixed inset-0 z-50 bg-black bg-opacity-50 backdrop-blur-sm",
|
|
95
5
|
"aria-hidden": "true"
|
|
96
|
-
},
|
|
6
|
+
}, fe = {
|
|
97
7
|
key: 0,
|
|
98
8
|
class: "overflow-y-auto fixed inset-0 z-50"
|
|
99
|
-
},
|
|
9
|
+
}, me = { class: "flex justify-center items-end px-4 pt-4 pb-20 min-h-screen text-center sm:block sm:p-0" }, pe = { key: 0 }, ge = /* @__PURE__ */ u("span", {
|
|
100
10
|
class: "hidden sm:inline-block sm:h-screen sm:align-middle",
|
|
101
11
|
"aria-hidden": "true"
|
|
102
|
-
}, "", -1),
|
|
12
|
+
}, "", -1), xe = { class: "inline-block overflow-hidden text-left align-bottom bg-white rounded shadow-xl transition-all transform sm:my-8 sm:w-full sm:max-w-sm sm:align-middle lg:max-w-lg" }, be = { class: "px-4 pb-4 mt-4 sm:px-6 sm:pb-6 sm:mt-5" }, we = { class: "flex flex-row items-center" }, ye = { class: "flex-shrink-0" }, ke = { class: "flex-grow text-center" }, $e = ["onClick"], Tt = {
|
|
103
13
|
__name: "confirm",
|
|
104
14
|
props: {
|
|
105
15
|
buttons: {
|
|
106
16
|
type: [Object, Array],
|
|
107
17
|
default: { label: "Ok" },
|
|
108
|
-
validator: (
|
|
18
|
+
validator: (e) => Array.isArray(e) && e.length <= 2 && e.filter((a) => a.label !== "undefined" && a.value !== "undefined").length === e.length || e.label !== void 0 && e.value !== void 0
|
|
109
19
|
},
|
|
110
20
|
headerClass: {
|
|
111
21
|
type: String,
|
|
@@ -116,142 +26,520 @@ const E = ["value", "type"], Ee = /* @__PURE__ */ Object.assign({ inheritAttrs:
|
|
|
116
26
|
default: "button"
|
|
117
27
|
}
|
|
118
28
|
},
|
|
119
|
-
setup(
|
|
120
|
-
const
|
|
121
|
-
let
|
|
122
|
-
const
|
|
123
|
-
return
|
|
124
|
-
|
|
125
|
-
})) }), (
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
default:
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
29
|
+
setup(e, { expose: a }) {
|
|
30
|
+
const l = e, s = w(""), t = w(""), o = w(!1);
|
|
31
|
+
let c = null, n = null;
|
|
32
|
+
const v = $(() => Array.isArray(l.buttons) ? l.buttons : [l.buttons]), i = w(null);
|
|
33
|
+
return a({ open: (m, h) => (s.value = m, t.value = h, o.value = !0, R(() => i.value.firstElementChild.focus()), new Promise((p, b) => {
|
|
34
|
+
c = p, n = b;
|
|
35
|
+
})) }), (m, h) => (r(), d(D, null, [
|
|
36
|
+
o.value ? (r(), d("div", he)) : C("", !0),
|
|
37
|
+
F(Z, { name: "appear" }, {
|
|
38
|
+
default: z(() => [
|
|
39
|
+
o.value ? (r(), d("div", fe, [
|
|
40
|
+
u("div", me, [
|
|
41
|
+
o.value ? (r(), d("div", pe, [
|
|
42
|
+
ge,
|
|
43
|
+
u("div", xe, [
|
|
44
|
+
s.value ? (r(), d("h3", {
|
|
135
45
|
key: 0,
|
|
136
|
-
class:
|
|
46
|
+
class: k(["py-4 pt-4 text-lg font-medium text-center sm:py-6", e.headerClass])
|
|
137
47
|
}, [
|
|
138
|
-
|
|
139
|
-
|
|
48
|
+
S(m.$slots, "title", { title: s.value }, () => [
|
|
49
|
+
A(y(s.value), 1)
|
|
140
50
|
])
|
|
141
|
-
], 2)) :
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
51
|
+
], 2)) : C("", !0),
|
|
52
|
+
u("div", be, [
|
|
53
|
+
u("div", we, [
|
|
54
|
+
u("div", ye, [
|
|
55
|
+
S(m.$slots, "icon")
|
|
146
56
|
]),
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
57
|
+
u("p", ke, [
|
|
58
|
+
S(m.$slots, "default", { message: t.value }, () => [
|
|
59
|
+
A(y(t.value), 1)
|
|
150
60
|
])
|
|
151
61
|
])
|
|
152
62
|
]),
|
|
153
|
-
|
|
63
|
+
u("div", {
|
|
154
64
|
class: "flex justify-center mt-5 space-x-2 sm:mt-6",
|
|
155
65
|
ref_key: "buttonsContainer",
|
|
156
|
-
ref:
|
|
66
|
+
ref: i
|
|
157
67
|
}, [
|
|
158
|
-
(
|
|
159
|
-
class:
|
|
160
|
-
onClick:
|
|
161
|
-
|
|
68
|
+
(r(!0), d(D, null, V(v.value, (p, b) => (r(), d("button", {
|
|
69
|
+
class: k([e.buttonClass, p.class]),
|
|
70
|
+
onClick: M((T) => {
|
|
71
|
+
o.value = !1, b === 0 ? _(c)() : _(n)();
|
|
162
72
|
}, ["prevent"])
|
|
163
|
-
},
|
|
73
|
+
}, y(p.label), 11, $e))), 256))
|
|
164
74
|
], 512)
|
|
165
75
|
])
|
|
166
76
|
])
|
|
167
|
-
])) :
|
|
77
|
+
])) : C("", !0)
|
|
168
78
|
])
|
|
169
|
-
])) :
|
|
79
|
+
])) : C("", !0)
|
|
170
80
|
]),
|
|
171
81
|
_: 3
|
|
172
82
|
})
|
|
173
83
|
], 64));
|
|
174
84
|
}
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
85
|
+
};
|
|
86
|
+
function _e(e, a) {
|
|
87
|
+
const l = w(!1), s = q(a);
|
|
88
|
+
let t, o = s.toLowerCase().replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), c = [];
|
|
89
|
+
if ((t = s.match(/\bd\b/gi)) && t.length === 1)
|
|
90
|
+
o = o.replace("d", "(\\d{1,2})");
|
|
91
|
+
else if ((t = s.match(/\bdd\b/gi)) && t.length === 1)
|
|
92
|
+
o = o.replace("dd", "(\\d{2})");
|
|
93
|
+
else
|
|
94
|
+
return { date: l };
|
|
95
|
+
if (c.push({ srcPos: s.toLowerCase().indexOf("d"), destPos: 2 }), (t = s.match(/\bm\b/gi)) && t.length === 1)
|
|
96
|
+
o = o.replace("m", "(\\d{1,2})");
|
|
97
|
+
else if ((t = s.match(/\bmm\b/gi)) && t.length === 1)
|
|
98
|
+
o = o.replace("mm", "(\\d{2})");
|
|
99
|
+
else
|
|
100
|
+
return { date: l };
|
|
101
|
+
if (c.push({ srcPos: s.toLowerCase().indexOf("m"), destPos: 1 }), (t = s.match(/\byyyy\b/gi)) && t.length === 1)
|
|
102
|
+
o = o.replace("yyyy", "(\\d{4})");
|
|
103
|
+
else
|
|
104
|
+
return { date: l };
|
|
105
|
+
if (c.push({ srcPos: s.toLowerCase().indexOf("y"), destPos: 0 }), !(t = q(e).match(o)))
|
|
106
|
+
return { date: l };
|
|
107
|
+
t.shift(), c.sort((f, m) => f.srcPos < m.srcPos ? -1 : 1);
|
|
108
|
+
let n = [], v, i;
|
|
109
|
+
for (; v = t.shift(); )
|
|
110
|
+
i = c.shift(), n[i.destPos] = v;
|
|
111
|
+
return n = Date.parse(n.join("-")), n && (n = new Date(n), l.value = new Date(n.getFullYear(), n.getMonth(), n.getDate(), 0, 0, 0)), { date: l };
|
|
112
|
+
}
|
|
113
|
+
function Ce(e) {
|
|
114
|
+
return ue() ? (ie(e), !0) : !1;
|
|
115
|
+
}
|
|
116
|
+
function ee(e) {
|
|
117
|
+
return typeof e == "function" ? e() : _(e);
|
|
118
|
+
}
|
|
119
|
+
const te = typeof window < "u" && typeof document < "u", De = Object.prototype.toString, Se = (e) => De.call(e) === "[object Object]", W = () => {
|
|
120
|
+
}, Me = /* @__PURE__ */ Ve();
|
|
121
|
+
function Ve() {
|
|
122
|
+
var e;
|
|
123
|
+
return te && ((e = window == null ? void 0 : window.navigator) == null ? void 0 : e.userAgent) && /* @__PURE__ */ /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
|
124
|
+
}
|
|
125
|
+
const Pe = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|SSS/g;
|
|
126
|
+
function Ae(e, a, l, s) {
|
|
127
|
+
let t = e < 12 ? "AM" : "PM";
|
|
128
|
+
return s && (t = t.split("").reduce((o, c) => o += `${c}.`, "")), l ? t.toLowerCase() : t;
|
|
129
|
+
}
|
|
130
|
+
function G(e, a, l = {}) {
|
|
131
|
+
var s;
|
|
132
|
+
const t = e.getFullYear(), o = e.getMonth(), c = e.getDate(), n = e.getHours(), v = e.getMinutes(), i = e.getSeconds(), f = e.getMilliseconds(), m = e.getDay(), h = (s = l.customMeridiem) != null ? s : Ae, p = {
|
|
133
|
+
YY: () => String(t).slice(-2),
|
|
134
|
+
YYYY: () => t,
|
|
135
|
+
M: () => o + 1,
|
|
136
|
+
MM: () => `${o + 1}`.padStart(2, "0"),
|
|
137
|
+
MMM: () => e.toLocaleDateString(l.locales, { month: "short" }),
|
|
138
|
+
MMMM: () => e.toLocaleDateString(l.locales, { month: "long" }),
|
|
139
|
+
D: () => String(c),
|
|
140
|
+
DD: () => `${c}`.padStart(2, "0"),
|
|
141
|
+
H: () => String(n),
|
|
142
|
+
HH: () => `${n}`.padStart(2, "0"),
|
|
143
|
+
h: () => `${n % 12 || 12}`.padStart(1, "0"),
|
|
144
|
+
hh: () => `${n % 12 || 12}`.padStart(2, "0"),
|
|
145
|
+
m: () => String(v),
|
|
146
|
+
mm: () => `${v}`.padStart(2, "0"),
|
|
147
|
+
s: () => String(i),
|
|
148
|
+
ss: () => `${i}`.padStart(2, "0"),
|
|
149
|
+
SSS: () => `${f}`.padStart(3, "0"),
|
|
150
|
+
d: () => m,
|
|
151
|
+
dd: () => e.toLocaleDateString(l.locales, { weekday: "narrow" }),
|
|
152
|
+
ddd: () => e.toLocaleDateString(l.locales, { weekday: "short" }),
|
|
153
|
+
dddd: () => e.toLocaleDateString(l.locales, { weekday: "long" }),
|
|
154
|
+
A: () => h(n, v),
|
|
155
|
+
AA: () => h(n, v, !1, !0),
|
|
156
|
+
a: () => h(n, v, !0),
|
|
157
|
+
aa: () => h(n, v, !0, !0)
|
|
158
|
+
};
|
|
159
|
+
return a.replace(Pe, (b, T) => {
|
|
160
|
+
var I, N;
|
|
161
|
+
return (N = T ?? ((I = p[b]) == null ? void 0 : I.call(p))) != null ? N : b;
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
function Y(e) {
|
|
165
|
+
var a;
|
|
166
|
+
const l = ee(e);
|
|
167
|
+
return (a = l == null ? void 0 : l.$el) != null ? a : l;
|
|
168
|
+
}
|
|
169
|
+
const le = te ? window : void 0;
|
|
170
|
+
function U(...e) {
|
|
171
|
+
let a, l, s, t;
|
|
172
|
+
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([l, s, t] = e, a = le) : [a, l, s, t] = e, !a)
|
|
173
|
+
return W;
|
|
174
|
+
Array.isArray(l) || (l = [l]), Array.isArray(s) || (s = [s]);
|
|
175
|
+
const o = [], c = () => {
|
|
176
|
+
o.forEach((f) => f()), o.length = 0;
|
|
177
|
+
}, n = (f, m, h, p) => (f.addEventListener(m, h, p), () => f.removeEventListener(m, h, p)), v = B(
|
|
178
|
+
() => [Y(a), ee(t)],
|
|
179
|
+
([f, m]) => {
|
|
180
|
+
if (c(), !f)
|
|
181
|
+
return;
|
|
182
|
+
const h = Se(m) ? { ...m } : m;
|
|
183
|
+
o.push(
|
|
184
|
+
...l.flatMap((p) => s.map((b) => n(f, p, b, h)))
|
|
185
|
+
);
|
|
186
|
+
},
|
|
187
|
+
{ immediate: !0, flush: "post" }
|
|
188
|
+
), i = () => {
|
|
189
|
+
v(), c();
|
|
190
|
+
};
|
|
191
|
+
return Ce(i), i;
|
|
192
|
+
}
|
|
193
|
+
let X = !1;
|
|
194
|
+
function Be(e, a, l = {}) {
|
|
195
|
+
const { window: s = le, ignore: t = [], capture: o = !0, detectIframe: c = !1 } = l;
|
|
196
|
+
if (!s)
|
|
197
|
+
return;
|
|
198
|
+
Me && !X && (X = !0, Array.from(s.document.body.children).forEach((h) => h.addEventListener("click", W)), s.document.documentElement.addEventListener("click", W));
|
|
199
|
+
let n = !0;
|
|
200
|
+
const v = (h) => t.some((p) => {
|
|
201
|
+
if (typeof p == "string")
|
|
202
|
+
return Array.from(s.document.querySelectorAll(p)).some((b) => b === h.target || h.composedPath().includes(b));
|
|
203
|
+
{
|
|
204
|
+
const b = Y(p);
|
|
205
|
+
return b && (h.target === b || h.composedPath().includes(b));
|
|
206
|
+
}
|
|
207
|
+
}), f = [
|
|
208
|
+
U(s, "click", (h) => {
|
|
209
|
+
const p = Y(e);
|
|
210
|
+
if (!(!p || p === h.target || h.composedPath().includes(p))) {
|
|
211
|
+
if (h.detail === 0 && (n = !v(h)), !n) {
|
|
212
|
+
n = !0;
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
a(h);
|
|
216
|
+
}
|
|
217
|
+
}, { passive: !0, capture: o }),
|
|
218
|
+
U(s, "pointerdown", (h) => {
|
|
219
|
+
const p = Y(e);
|
|
220
|
+
p && (n = !h.composedPath().includes(p) && !v(h));
|
|
221
|
+
}, { passive: !0 }),
|
|
222
|
+
c && U(s, "blur", (h) => {
|
|
223
|
+
setTimeout(() => {
|
|
224
|
+
var p;
|
|
225
|
+
const b = Y(e);
|
|
226
|
+
((p = s.document.activeElement) == null ? void 0 : p.tagName) === "IFRAME" && !(b != null && b.contains(s.document.activeElement)) && a(h);
|
|
227
|
+
}, 0);
|
|
228
|
+
})
|
|
229
|
+
].filter(Boolean);
|
|
230
|
+
return () => f.forEach((h) => h());
|
|
231
|
+
}
|
|
232
|
+
const Fe = { key: 0 }, Le = { class: "text-vxvue-700" }, Oe = /* @__PURE__ */ u("svg", {
|
|
233
|
+
class: "w-2 h-2",
|
|
234
|
+
stroke: "currentColor",
|
|
235
|
+
fill: "none",
|
|
236
|
+
viewBox: "0 0 8 8"
|
|
237
|
+
}, [
|
|
238
|
+
/* @__PURE__ */ u("path", {
|
|
239
|
+
"stroke-linecap": "round",
|
|
240
|
+
"stroke-width": "1.5",
|
|
241
|
+
d: "M1 1l6 6m0-6L1 7"
|
|
242
|
+
})
|
|
243
|
+
], -1), Te = [
|
|
244
|
+
Oe
|
|
245
|
+
], je = /* @__PURE__ */ u("svg", {
|
|
246
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
247
|
+
class: "w-6 h-6",
|
|
248
|
+
fill: "none",
|
|
249
|
+
viewBox: "0 0 24 24",
|
|
250
|
+
stroke: "currentColor"
|
|
251
|
+
}, [
|
|
252
|
+
/* @__PURE__ */ u("path", {
|
|
253
|
+
"stroke-linecap": "round",
|
|
254
|
+
"stroke-linejoin": "round",
|
|
255
|
+
"stroke-width": "2",
|
|
256
|
+
d: "M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"
|
|
257
|
+
})
|
|
258
|
+
], -1), Ye = [
|
|
259
|
+
je
|
|
260
|
+
], Ie = {
|
|
261
|
+
__name: "date-input",
|
|
262
|
+
props: {
|
|
263
|
+
outputFormat: { type: String, default: "YYYY-MM-DD" },
|
|
264
|
+
inputFormat: { type: String, default: "YYYY-MM-DD" },
|
|
265
|
+
showButton: { type: Boolean, default: !0 },
|
|
266
|
+
locale: { type: String, default: "default" },
|
|
267
|
+
modelValue: Date
|
|
268
|
+
},
|
|
269
|
+
emits: ["update:modelValue", "toggle-datepicker"],
|
|
270
|
+
setup(e, { emit: a }) {
|
|
271
|
+
const l = e, s = w(""), t = $(() => l.modelValue ? G(l.modelValue, l.outputFormat) : ""), o = $(() => {
|
|
272
|
+
let c = Object.assign({}, E());
|
|
273
|
+
return delete c.class, c;
|
|
183
274
|
});
|
|
184
|
-
return (
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
class:
|
|
190
|
-
role: "switch",
|
|
191
|
-
"aria-checked": !!t.modelValue
|
|
275
|
+
return B(() => l.modelValue, (c) => s.value = c ? G(c, l.outputFormat) : ""), (c, n) => (r(), d("div", {
|
|
276
|
+
class: k(["inline-block relative", c.$attrs.class])
|
|
277
|
+
}, [
|
|
278
|
+
t.value ? (r(), d("div", Fe, [
|
|
279
|
+
u("div", {
|
|
280
|
+
class: k(["block flex items-center w-full form-input bg-vxvue-50", { "pr-10": e.showButton }])
|
|
192
281
|
}, [
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
]
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
282
|
+
u("span", Le, y(t.value), 1),
|
|
283
|
+
u("button", {
|
|
284
|
+
onClick: n[0] || (n[0] = (v) => a("update:modelValue", null)),
|
|
285
|
+
class: "inline-flex flex-shrink-0 justify-center items-center ml-2 w-4 h-4 rounded-full focus:text-white focus:outline-none text-vxvue hover:bg-vxvue-100 hover:text-vue-700 focus:bg-vxvue-700"
|
|
286
|
+
}, Te)
|
|
287
|
+
], 2)
|
|
288
|
+
])) : J((r(), d("input", L({
|
|
289
|
+
key: 1,
|
|
290
|
+
type: "text",
|
|
291
|
+
class: ["block w-full form-input focus:border-vxvue peer", { "pr-10": e.showButton }],
|
|
292
|
+
"onUpdate:modelValue": n[1] || (n[1] = (v) => s.value = v),
|
|
293
|
+
onBlur: n[2] || (n[2] = (v) => {
|
|
294
|
+
var i;
|
|
295
|
+
return a("update:modelValue", ((i = _(_e)(s.value, l.inputFormat).date) == null ? void 0 : i.value) || null);
|
|
296
|
+
}),
|
|
297
|
+
onInput: n[3] || (n[3] = M(() => {
|
|
298
|
+
}, ["prevent"]))
|
|
299
|
+
}, o.value), null, 16)), [
|
|
300
|
+
[ce, s.value]
|
|
301
|
+
]),
|
|
302
|
+
e.showButton ? (r(), d("button", {
|
|
303
|
+
key: 2,
|
|
304
|
+
class: "flex absolute inset-y-0 right-0 items-center px-2 text-vxvue-700 hover:text-vxvue",
|
|
305
|
+
onClick: n[4] || (n[4] = M((v) => a("toggle-datepicker"), ["stop"]))
|
|
306
|
+
}, Ye)) : C("", !0),
|
|
307
|
+
S(c.$slots, "default")
|
|
308
|
+
], 2));
|
|
207
309
|
}
|
|
208
310
|
};
|
|
209
|
-
function
|
|
210
|
-
return
|
|
311
|
+
function se(e, a) {
|
|
312
|
+
return r(), d("svg", {
|
|
211
313
|
xmlns: "http://www.w3.org/2000/svg",
|
|
212
314
|
viewBox: "0 0 24 24",
|
|
213
315
|
fill: "currentColor",
|
|
214
316
|
"aria-hidden": "true"
|
|
215
317
|
}, [
|
|
216
|
-
|
|
318
|
+
u("path", {
|
|
217
319
|
"fill-rule": "evenodd",
|
|
218
320
|
d: "M7.72 12.53a.75.75 0 010-1.06l7.5-7.5a.75.75 0 111.06 1.06L9.31 12l6.97 6.97a.75.75 0 11-1.06 1.06l-7.5-7.5z",
|
|
219
321
|
"clip-rule": "evenodd"
|
|
220
322
|
})
|
|
221
323
|
]);
|
|
222
324
|
}
|
|
223
|
-
function
|
|
224
|
-
return
|
|
325
|
+
function ne(e, a) {
|
|
326
|
+
return r(), d("svg", {
|
|
225
327
|
xmlns: "http://www.w3.org/2000/svg",
|
|
226
328
|
viewBox: "0 0 24 24",
|
|
227
329
|
fill: "currentColor",
|
|
228
330
|
"aria-hidden": "true"
|
|
229
331
|
}, [
|
|
230
|
-
|
|
332
|
+
u("path", {
|
|
231
333
|
"fill-rule": "evenodd",
|
|
232
334
|
d: "M16.28 11.47a.75.75 0 010 1.06l-7.5 7.5a.75.75 0 01-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 011.06-1.06l7.5 7.5z",
|
|
233
335
|
"clip-rule": "evenodd"
|
|
234
336
|
})
|
|
235
337
|
]);
|
|
236
338
|
}
|
|
237
|
-
function
|
|
238
|
-
return
|
|
339
|
+
function Ne(e, a) {
|
|
340
|
+
return r(), d("svg", {
|
|
341
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
342
|
+
viewBox: "0 0 24 24",
|
|
343
|
+
fill: "currentColor",
|
|
344
|
+
"aria-hidden": "true"
|
|
345
|
+
}, [
|
|
346
|
+
u("path", {
|
|
347
|
+
"fill-rule": "evenodd",
|
|
348
|
+
d: "M3.75 12a.75.75 0 01.75-.75h15a.75.75 0 010 1.5h-15a.75.75 0 01-.75-.75z",
|
|
349
|
+
"clip-rule": "evenodd"
|
|
350
|
+
})
|
|
351
|
+
]);
|
|
352
|
+
}
|
|
353
|
+
function Ee(e, a) {
|
|
354
|
+
return r(), d("svg", {
|
|
355
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
356
|
+
viewBox: "0 0 24 24",
|
|
357
|
+
fill: "currentColor",
|
|
358
|
+
"aria-hidden": "true"
|
|
359
|
+
}, [
|
|
360
|
+
u("path", {
|
|
361
|
+
"fill-rule": "evenodd",
|
|
362
|
+
d: "M12 3.75a.75.75 0 01.75.75v6.75h6.75a.75.75 0 010 1.5h-6.75v6.75a.75.75 0 01-1.5 0v-6.75H4.5a.75.75 0 010-1.5h6.75V4.5a.75.75 0 01.75-.75z",
|
|
363
|
+
"clip-rule": "evenodd"
|
|
364
|
+
})
|
|
365
|
+
]);
|
|
366
|
+
}
|
|
367
|
+
function ze(e, a) {
|
|
368
|
+
return r(), d("svg", {
|
|
239
369
|
xmlns: "http://www.w3.org/2000/svg",
|
|
240
370
|
viewBox: "0 0 24 24",
|
|
241
371
|
fill: "currentColor",
|
|
242
372
|
"aria-hidden": "true"
|
|
243
373
|
}, [
|
|
244
|
-
|
|
374
|
+
u("path", {
|
|
245
375
|
"fill-rule": "evenodd",
|
|
246
376
|
d: "M5.47 5.47a.75.75 0 011.06 0L12 10.94l5.47-5.47a.75.75 0 111.06 1.06L13.06 12l5.47 5.47a.75.75 0 11-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 01-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 010-1.06z",
|
|
247
377
|
"clip-rule": "evenodd"
|
|
248
378
|
})
|
|
249
379
|
]);
|
|
250
380
|
}
|
|
251
|
-
const
|
|
381
|
+
const He = { class: "flex flex-row items-center py-2 px-3 text-white bg-vxvue-700" }, Ue = ["onClick"], We = { class: "flex-grow text-center" }, Re = ["onClick"], qe = { class: "grid grid-cols-7 gap-0.5 p-0.5" }, Ge = ["disabled", "onClick"], jt = {
|
|
382
|
+
__name: "datepicker",
|
|
383
|
+
props: {
|
|
384
|
+
modelValue: [Date, Boolean],
|
|
385
|
+
validFrom: Date,
|
|
386
|
+
validUntil: Date,
|
|
387
|
+
dayNames: { type: Array, default: () => "S M T W T F S".split(" ") },
|
|
388
|
+
locale: { type: String, default: "default" },
|
|
389
|
+
startOfWeekIndex: { type: Number, default: 0, validator: (e) => e === 0 || e === 1 },
|
|
390
|
+
hasInput: { type: Boolean, default: !0 }
|
|
391
|
+
},
|
|
392
|
+
emits: ["update:modelValue", "month-change"],
|
|
393
|
+
setup(e, { emit: a }) {
|
|
394
|
+
const l = e, s = (() => {
|
|
395
|
+
let g = /* @__PURE__ */ new Date();
|
|
396
|
+
return new Date(g.getFullYear(), g.getMonth(), g.getDate());
|
|
397
|
+
})(), t = w(new Date(s.getFullYear(), s.getMonth(), 1)), o = w(null), c = w(!l.hasInput), n = w("left-0"), v = w("top-0"), i = w(null), f = w(null), m = $(() => l.hasInput ? { class: ["absolute", c.value ? "block" : "hidden"] } : {}), h = $(() => {
|
|
398
|
+
const g = [], P = t.value.getFullYear(), x = t.value.getMonth(), j = new Date(P, x + 1, 0), ae = new Date(P, x, 0).getDay() + 1 - l.startOfWeekIndex, oe = (6 + l.startOfWeekIndex - j.getDay()) % 7;
|
|
399
|
+
for (let H = -ae, re = j.getDate() + oe; H < re; ++H)
|
|
400
|
+
g.push(new Date(P, x, H + 1));
|
|
401
|
+
return g;
|
|
402
|
+
}), p = $(() => l.startOfWeekIndex ? l.dayNames.slice(1).concat(l.dayNames[0]) : l.dayNames.slice());
|
|
403
|
+
B(() => l.modelValue, (g) => {
|
|
404
|
+
g ? (o.value = new Date(g.getFullYear(), g.getMonth(), g.getDate()), t.value = new Date(o.value.getTime())) : (o.value = null, t.value = new Date(s.getTime())), t.value.setDate(1);
|
|
405
|
+
}, { immediate: !0 }), B(c, (g) => {
|
|
406
|
+
g && l.hasInput && R(() => {
|
|
407
|
+
const P = i.value.$el.getBoundingClientRect(), x = f.value.getBoundingClientRect();
|
|
408
|
+
n.value = P.left + x.width > window.innerWidth ? "right-0" : "left-0", v.value = P.bottom + x.height > window.innerHeight ? "bottom-0 -translate-y-12" : "top-0 translate-y-12";
|
|
409
|
+
});
|
|
410
|
+
}), Be(f, () => c.value = !1);
|
|
411
|
+
const b = () => {
|
|
412
|
+
t.value = new Date(t.value.getFullYear(), t.value.getMonth() - 1, 1), a("month-change", t.value);
|
|
413
|
+
}, T = () => {
|
|
414
|
+
t.value = new Date(t.value.getFullYear(), t.value.getMonth() + 1, 1), a("month-change", t.value);
|
|
415
|
+
}, I = (g) => {
|
|
416
|
+
o.value = g, a("update:modelValue", g), c.value = !l.hasInput;
|
|
417
|
+
}, N = (g) => {
|
|
418
|
+
o.value = g, a("update:modelValue", g);
|
|
419
|
+
};
|
|
420
|
+
return (g, P) => (r(), d("div", {
|
|
421
|
+
class: k(["relative", g.$attrs.class])
|
|
422
|
+
}, [
|
|
423
|
+
e.hasInput ? (r(), O(Ie, L({
|
|
424
|
+
key: 0,
|
|
425
|
+
modelValue: o.value,
|
|
426
|
+
onToggleDatepicker: P[0] || (P[0] = (x) => c.value = !0),
|
|
427
|
+
"onUpdate:modelValue": N
|
|
428
|
+
}, g.$attrs, {
|
|
429
|
+
ref_key: "input",
|
|
430
|
+
ref: i,
|
|
431
|
+
class: "w-full",
|
|
432
|
+
locale: e.locale
|
|
433
|
+
}), {
|
|
434
|
+
default: z(() => [
|
|
435
|
+
S(g.$slots, "default")
|
|
436
|
+
]),
|
|
437
|
+
_: 3
|
|
438
|
+
}, 16, ["modelValue", "locale"])) : C("", !0),
|
|
439
|
+
u("div", L({ class: "z-10 bg-white shadow-md" }, m.value, {
|
|
440
|
+
ref_key: "calendar",
|
|
441
|
+
ref: f,
|
|
442
|
+
class: [n.value, v.value]
|
|
443
|
+
}), [
|
|
444
|
+
u("div", He, [
|
|
445
|
+
u("button", {
|
|
446
|
+
onClick: M(b, ["stop"]),
|
|
447
|
+
class: "flex-shrink-0 text-vxvue-100 hover:text-vxvue-50"
|
|
448
|
+
}, [
|
|
449
|
+
F(_(se), { class: "w-6 h-6" })
|
|
450
|
+
], 8, Ue),
|
|
451
|
+
u("div", We, y(t.value.toLocaleString(e.locale, { month: "long" })) + " " + y(t.value.getFullYear()), 1),
|
|
452
|
+
u("button", {
|
|
453
|
+
onClick: M(T, ["stop"]),
|
|
454
|
+
class: "flex-shrink-0 text-vxvue-100 hover:text-vxvue-50"
|
|
455
|
+
}, [
|
|
456
|
+
F(_(ne), { class: "w-6 h-6" })
|
|
457
|
+
], 8, Re)
|
|
458
|
+
]),
|
|
459
|
+
u("div", qe, [
|
|
460
|
+
(r(!0), d(D, null, V(p.value, (x, j) => (r(), d("div", {
|
|
461
|
+
class: "py-2 text-center bg-gray-200",
|
|
462
|
+
key: j
|
|
463
|
+
}, y(x), 1))), 128)),
|
|
464
|
+
(r(!0), d(D, null, V(h.value, (x) => (r(), d("div", {
|
|
465
|
+
class: k(["text-center", x.getMonth() - t.value.getMonth() === 0 ? "text-vxvue-700" : "text-gray-400"])
|
|
466
|
+
}, [
|
|
467
|
+
u("button", {
|
|
468
|
+
class: k([
|
|
469
|
+
{
|
|
470
|
+
"bg-vxvue-700 text-white": o.value && x.getTime() === o.value.getTime(),
|
|
471
|
+
"bg-gray-200": x.getTime() === _(s).getTime(),
|
|
472
|
+
"text-red-400": e.validFrom && e.validFrom > x || e.validUntil && e.validUntil < x
|
|
473
|
+
},
|
|
474
|
+
"py-2 px-3 rounded-sm"
|
|
475
|
+
]),
|
|
476
|
+
disabled: e.validFrom && e.validFrom > x || e.validUntil && e.validUntil < x,
|
|
477
|
+
onClick: M((j) => e.validFrom && e.validFrom > x || e.validUntil && e.validUntil < x ? null : I(x), ["stop"])
|
|
478
|
+
}, y(x.getDate()), 11, Ge)
|
|
479
|
+
], 2))), 256))
|
|
480
|
+
])
|
|
481
|
+
], 16)
|
|
482
|
+
], 2));
|
|
483
|
+
}
|
|
484
|
+
}, Xe = ["value"], Ze = {
|
|
485
|
+
key: 0,
|
|
486
|
+
disabled: "",
|
|
487
|
+
value: ""
|
|
488
|
+
}, Je = ["value", "selected"], Yt = {
|
|
489
|
+
__name: "form-select",
|
|
490
|
+
props: { options: Array, modelValue: [String, Number], disabledLabel: String },
|
|
491
|
+
emits: ["update:modelValue"],
|
|
492
|
+
setup(e, { emit: a }) {
|
|
493
|
+
return (l, s) => (r(), d("select", L(l.$attrs, {
|
|
494
|
+
value: e.modelValue,
|
|
495
|
+
class: "form-select",
|
|
496
|
+
onChange: s[0] || (s[0] = (t) => a("update:modelValue", t.target.value))
|
|
497
|
+
}), [
|
|
498
|
+
e.disabledLabel ? (r(), d("option", Ze, y(e.disabledLabel), 1)) : C("", !0),
|
|
499
|
+
(r(!0), d(D, null, V(e.options, (t) => (r(), d("option", {
|
|
500
|
+
value: t.key !== void 0 ? t.key : t.label || t,
|
|
501
|
+
selected: (t.key !== void 0 ? t.key : t.label || t) === e.modelValue
|
|
502
|
+
}, y(t.label || t), 9, Je))), 256))
|
|
503
|
+
], 16, Xe));
|
|
504
|
+
}
|
|
505
|
+
}, Ke = ["aria-checked"], Qe = ["checked"], It = {
|
|
506
|
+
__name: "form-switch",
|
|
507
|
+
props: ["modelValue"],
|
|
508
|
+
emits: ["update:modelValue"],
|
|
509
|
+
setup(e, { emit: a }) {
|
|
510
|
+
const l = e, s = $(() => l.modelValue ? "bg-vxvue" : "bg-slate-200"), t = $(() => l.modelValue ? "translate-x-5" : "translate-x-0"), o = $(() => {
|
|
511
|
+
let c = Object.assign({}, E());
|
|
512
|
+
return delete c.class, c;
|
|
513
|
+
});
|
|
514
|
+
return (c, n) => (r(), d(D, null, [
|
|
515
|
+
u("label", {
|
|
516
|
+
class: k(c.$attrs.class)
|
|
517
|
+
}, [
|
|
518
|
+
u("span", {
|
|
519
|
+
class: k([s.value, "inline-flex relative flex-shrink-0 w-11 h-6 rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out cursor-pointer focus:ring-2 focus:ring-offset-2 focus:outline-none focus:ring-vxvue"]),
|
|
520
|
+
role: "switch",
|
|
521
|
+
"aria-checked": !!e.modelValue
|
|
522
|
+
}, [
|
|
523
|
+
u("span", {
|
|
524
|
+
"aria-hidden": "true",
|
|
525
|
+
class: k([t.value, "inline-block w-5 h-5 bg-white rounded-full ring-0 shadow transition duration-200 ease-in-out transform pointer-events-none"])
|
|
526
|
+
}, null, 2),
|
|
527
|
+
u("input", L({
|
|
528
|
+
class: "hidden",
|
|
529
|
+
value: "1",
|
|
530
|
+
type: "checkbox",
|
|
531
|
+
onChange: n[0] || (n[0] = (v) => a("update:modelValue", v.target.checked))
|
|
532
|
+
}, o.value, { checked: e.modelValue }), null, 16, Qe)
|
|
533
|
+
], 10, Ke)
|
|
534
|
+
], 2),
|
|
535
|
+
S(c.$slots, "default")
|
|
536
|
+
], 64));
|
|
537
|
+
}
|
|
538
|
+
};
|
|
539
|
+
const et = {
|
|
252
540
|
"aria-live": "assertive",
|
|
253
541
|
class: "flex fixed inset-0 z-50 items-start py-6 px-4 pointer-events-none sm:p-6"
|
|
254
|
-
},
|
|
542
|
+
}, tt = { class: "flex flex-col items-center space-y-4 w-full" }, lt = { class: "p-4" }, st = { class: "flex items-start" }, nt = { class: "flex-shrink-0" }, at = { class: "flex-1 pt-0.5 ml-3 w-0" }, ot = { class: "font-bold" }, rt = { class: "mt-1" }, ut = { class: "flex flex-shrink-0 ml-4" }, it = /* @__PURE__ */ u("span", { class: "sr-only" }, "Close", -1), Nt = /* @__PURE__ */ Object.assign({
|
|
255
543
|
inheritAttrs: !1
|
|
256
544
|
}, {
|
|
257
545
|
__name: "message-toast",
|
|
@@ -262,56 +550,56 @@ const ie = {
|
|
|
262
550
|
active: { type: Boolean, default: !1 }
|
|
263
551
|
},
|
|
264
552
|
emits: ["timeout", "close"],
|
|
265
|
-
setup(
|
|
266
|
-
const
|
|
267
|
-
window.clearTimeout(
|
|
268
|
-
|
|
269
|
-
},
|
|
553
|
+
setup(e, { emit: a }) {
|
|
554
|
+
const l = e, s = w(null), t = $(() => typeof l.message == "string" ? [l.message] : l.message), o = () => {
|
|
555
|
+
window.clearTimeout(s.value), l.active && l.timeout && (s.value = window.setTimeout(() => {
|
|
556
|
+
a("timeout");
|
|
557
|
+
}, l.timeout));
|
|
270
558
|
};
|
|
271
|
-
return
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
default:
|
|
275
|
-
|
|
559
|
+
return B(() => l.active, o), K(o), (c, n) => (r(), d("div", et, [
|
|
560
|
+
u("div", tt, [
|
|
561
|
+
F(Z, { name: "messagetoast-fade" }, {
|
|
562
|
+
default: z(() => [
|
|
563
|
+
e.active ? (r(), d("div", {
|
|
276
564
|
key: 0,
|
|
277
|
-
class:
|
|
565
|
+
class: k(["overflow-hidden w-full max-w-sm rounded-md ring-1 ring-black ring-opacity-5 shadow-lg pointer-events-auto", c.$attrs.class])
|
|
278
566
|
}, [
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
567
|
+
u("div", lt, [
|
|
568
|
+
u("div", st, [
|
|
569
|
+
u("div", nt, [
|
|
570
|
+
S(c.$slots, "icon")
|
|
283
571
|
]),
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
572
|
+
u("div", at, [
|
|
573
|
+
u("p", ot, [
|
|
574
|
+
S(c.$slots, "title", {}, () => [
|
|
575
|
+
A(y(e.title), 1)
|
|
288
576
|
])
|
|
289
577
|
]),
|
|
290
|
-
(
|
|
291
|
-
|
|
292
|
-
|
|
578
|
+
(r(!0), d(D, null, V(t.value, (v) => (r(), d("p", rt, [
|
|
579
|
+
S(c.$slots, "default", {}, () => [
|
|
580
|
+
A(y(v), 1)
|
|
293
581
|
])
|
|
294
582
|
]))), 256))
|
|
295
583
|
]),
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
onClick:
|
|
584
|
+
u("div", ut, [
|
|
585
|
+
u("button", {
|
|
586
|
+
onClick: n[0] || (n[0] = (v) => a("close")),
|
|
299
587
|
class: "inline-flex text-white bg-black bg-opacity-20 rounded-sm focus:ring-2 focus:outline-none hover:text-stone-200 focus:ring-stone-200"
|
|
300
588
|
}, [
|
|
301
|
-
|
|
302
|
-
|
|
589
|
+
it,
|
|
590
|
+
F(_(ze), { class: "w-5 h-5" })
|
|
303
591
|
])
|
|
304
592
|
])
|
|
305
593
|
])
|
|
306
594
|
])
|
|
307
|
-
], 2)) :
|
|
595
|
+
], 2)) : C("", !0)
|
|
308
596
|
]),
|
|
309
597
|
_: 3
|
|
310
598
|
})
|
|
311
599
|
])
|
|
312
600
|
]));
|
|
313
601
|
}
|
|
314
|
-
}),
|
|
602
|
+
}), ct = { class: "flex justify-between items-center px-4 sm:px-0" }, dt = { class: "flex flex-1 -mt-px w-0" }, vt = ["onClick"], ht = { class: "hidden md:flex md:-mt-px" }, ft = { class: "flex flex-1 justify-end -mt-px w-0" }, mt = ["onClick"], Et = {
|
|
315
603
|
__name: "pagination",
|
|
316
604
|
props: {
|
|
317
605
|
page: { type: Number, default: 1 },
|
|
@@ -319,8 +607,8 @@ const ie = {
|
|
|
319
607
|
perPage: {
|
|
320
608
|
type: Number,
|
|
321
609
|
default: 20,
|
|
322
|
-
validator(
|
|
323
|
-
return
|
|
610
|
+
validator(e) {
|
|
611
|
+
return e >= 1;
|
|
324
612
|
}
|
|
325
613
|
},
|
|
326
614
|
showNavButtons: { type: Boolean, default: !0 },
|
|
@@ -330,100 +618,223 @@ const ie = {
|
|
|
330
618
|
markerPosition: {
|
|
331
619
|
type: String,
|
|
332
620
|
default: "above",
|
|
333
|
-
validator(
|
|
334
|
-
return ["above", "below"].indexOf(
|
|
621
|
+
validator(e) {
|
|
622
|
+
return ["above", "below"].indexOf(e) !== -1;
|
|
335
623
|
}
|
|
336
624
|
}
|
|
337
625
|
},
|
|
338
626
|
emits: ["update:page"],
|
|
339
|
-
setup(
|
|
340
|
-
const
|
|
341
|
-
let
|
|
342
|
-
if (
|
|
343
|
-
for (let
|
|
344
|
-
|
|
345
|
-
return
|
|
627
|
+
setup(e, { emit: a }) {
|
|
628
|
+
const l = e, s = w(Math.ceil(l.total / l.perPage)), t = w(null), o = $(() => l.markerPosition === "above" ? "border-t-2 pt-4" : "border-b-2 pb-4"), c = $(() => {
|
|
629
|
+
let i = [1];
|
|
630
|
+
if (l.showAllPages || s.value <= 7) {
|
|
631
|
+
for (let f = 2; f <= s.value; ++f)
|
|
632
|
+
i.push(f);
|
|
633
|
+
return i;
|
|
346
634
|
}
|
|
347
|
-
return
|
|
348
|
-
}),
|
|
349
|
-
|
|
350
|
-
},
|
|
351
|
-
|
|
635
|
+
return t.value >= s.value ? i.push("dots", t.value - 2, t.value - 1) : t.value - 1 && t.value - 1 > 1 && (t.value > 1 && i.push("dots"), i.push(t.value - 1)), t.value > 1 && i.push(t.value), t.value + 1 < s.value && (i.push(t.value + 1), t.value <= 1 && i.push(t.value + 2), t.value + 2 < this.maxPage && i.push("dots")), t.value < this.maxPage && i.push(this.maxPage), i;
|
|
636
|
+
}), n = () => {
|
|
637
|
+
t.value > 1 && a("update:page", t.value - 1);
|
|
638
|
+
}, v = () => {
|
|
639
|
+
t.value < s.value && a("update:page", t.value + 1);
|
|
352
640
|
};
|
|
353
|
-
return
|
|
354
|
-
|
|
355
|
-
}),
|
|
356
|
-
|
|
357
|
-
}), (
|
|
358
|
-
|
|
359
|
-
|
|
641
|
+
return B(() => l.page, (i) => t.value = Math.min(Math.max(i, 1), s.value), { immediate: !0 }), B(() => l.perPage, (i) => {
|
|
642
|
+
s.value = Math.ceil(l.total / l.perPage), a("update:page", 1);
|
|
643
|
+
}), B(() => l.total, (i) => {
|
|
644
|
+
s.value = Math.ceil(l.total / l.perPage), t.value > s.value && a("update:page", 1);
|
|
645
|
+
}), (i, f) => (r(), d("nav", ct, [
|
|
646
|
+
u("div", dt, [
|
|
647
|
+
e.showNavButtons ? (r(), d("a", {
|
|
360
648
|
key: 0,
|
|
361
|
-
onClick:
|
|
649
|
+
onClick: M(n, ["prevent"]),
|
|
362
650
|
href: "#",
|
|
363
|
-
class:
|
|
651
|
+
class: k(["inline-flex items-center pr-1 text-sm font-medium text-gray-500 border-transparent hover:text-gray-700 hover:border-gray-300", [{ "cursor-default pointer-events-none": t.value <= 1 }, o.value]])
|
|
364
652
|
}, [
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
], 10,
|
|
653
|
+
F(_(se), { class: "w-5 h-5" }),
|
|
654
|
+
A(" " + y(e.prevText), 1)
|
|
655
|
+
], 10, vt)) : C("", !0)
|
|
368
656
|
]),
|
|
369
|
-
|
|
370
|
-
(
|
|
371
|
-
onClick:
|
|
372
|
-
key:
|
|
373
|
-
href:
|
|
374
|
-
class:
|
|
375
|
-
"border-vxvue-500 text-vxvue-700":
|
|
376
|
-
"border-transparent text-gray-500":
|
|
377
|
-
"hover:text-gray-700 hover:border-gray-300":
|
|
378
|
-
},
|
|
657
|
+
u("div", ht, [
|
|
658
|
+
(r(!0), d(D, null, V(c.value, (m, h) => (r(), O(Q(m !== "dots" ? "a" : "span"), {
|
|
659
|
+
onClick: M((p) => m !== "dots" ? a("update:page", m) : null, ["prevent"]),
|
|
660
|
+
key: h,
|
|
661
|
+
href: m !== "dots" ? "#" : null,
|
|
662
|
+
class: k(["inline-flex items-center px-4 text-sm font-medium", [{
|
|
663
|
+
"border-vxvue-500 text-vxvue-700": m === t.value,
|
|
664
|
+
"border-transparent text-gray-500": m !== t.value,
|
|
665
|
+
"hover:text-gray-700 hover:border-gray-300": m !== "dots"
|
|
666
|
+
}, o.value]])
|
|
379
667
|
}, {
|
|
380
|
-
default:
|
|
381
|
-
|
|
668
|
+
default: z(() => [
|
|
669
|
+
A(y(m !== "dots" ? m : "..."), 1)
|
|
382
670
|
]),
|
|
383
671
|
_: 2
|
|
384
672
|
}, 1032, ["onClick", "href", "class"]))), 128))
|
|
385
673
|
]),
|
|
386
|
-
|
|
387
|
-
|
|
674
|
+
u("div", ft, [
|
|
675
|
+
e.showNavButtons ? (r(), d("a", {
|
|
388
676
|
key: 0,
|
|
389
|
-
onClick:
|
|
677
|
+
onClick: M(v, ["prevent"]),
|
|
390
678
|
href: "#",
|
|
391
|
-
class:
|
|
679
|
+
class: k(["inline-flex items-center pl-1 text-sm font-medium text-gray-500 border-transparent hover:text-gray-700 hover:border-gray-300", [o.value, { "cursor-default pointer-events-none": t.value >= s.value }]])
|
|
392
680
|
}, [
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
], 10,
|
|
681
|
+
A(y(e.nextText) + " ", 1),
|
|
682
|
+
F(_(ne), { class: "w-5 h-5" })
|
|
683
|
+
], 10, mt)) : C("", !0)
|
|
396
684
|
])
|
|
397
685
|
]));
|
|
398
686
|
}
|
|
399
687
|
};
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
688
|
+
function pt(e, a) {
|
|
689
|
+
return r(), d("svg", {
|
|
690
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
691
|
+
fill: "none",
|
|
692
|
+
viewBox: "0 0 24 24",
|
|
693
|
+
"stroke-width": "1.5",
|
|
694
|
+
stroke: "currentColor",
|
|
695
|
+
"aria-hidden": "true"
|
|
696
|
+
}, [
|
|
697
|
+
u("path", {
|
|
698
|
+
"stroke-linecap": "round",
|
|
699
|
+
"stroke-linejoin": "round",
|
|
700
|
+
d: "M3.98 8.223A10.477 10.477 0 001.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0112 4.5c4.756 0 8.773 3.162 10.065 7.498a10.523 10.523 0 01-4.293 5.774M6.228 6.228L3 3m3.228 3.228l3.65 3.65m7.894 7.894L21 21m-3.228-3.228l-3.65-3.65m0 0a3 3 0 10-4.243-4.243m4.242 4.242L9.88 9.88"
|
|
701
|
+
})
|
|
702
|
+
]);
|
|
703
|
+
}
|
|
704
|
+
function gt(e, a) {
|
|
705
|
+
return r(), d("svg", {
|
|
706
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
707
|
+
fill: "none",
|
|
708
|
+
viewBox: "0 0 24 24",
|
|
709
|
+
"stroke-width": "1.5",
|
|
710
|
+
stroke: "currentColor",
|
|
711
|
+
"aria-hidden": "true"
|
|
712
|
+
}, [
|
|
713
|
+
u("path", {
|
|
714
|
+
"stroke-linecap": "round",
|
|
715
|
+
"stroke-linejoin": "round",
|
|
716
|
+
d: "M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178z"
|
|
717
|
+
}),
|
|
718
|
+
u("path", {
|
|
719
|
+
"stroke-linecap": "round",
|
|
720
|
+
"stroke-linejoin": "round",
|
|
721
|
+
d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z"
|
|
722
|
+
})
|
|
723
|
+
]);
|
|
724
|
+
}
|
|
725
|
+
const xt = ["value", "type"], zt = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
726
|
+
__name: "password-input",
|
|
727
|
+
props: ["modelValue"],
|
|
728
|
+
emits: ["update:modelValue"],
|
|
729
|
+
setup(e, { emit: a }) {
|
|
730
|
+
const l = w(!1), s = $(() => {
|
|
731
|
+
let t = Object.assign({}, E());
|
|
732
|
+
return delete t.class, t;
|
|
733
|
+
});
|
|
734
|
+
return (t, o) => (r(), d("div", {
|
|
735
|
+
class: k("inline-block relative " + E().class)
|
|
736
|
+
}, [
|
|
737
|
+
u("input", L({
|
|
738
|
+
value: e.modelValue,
|
|
739
|
+
type: l.value ? "text" : "password",
|
|
740
|
+
onInput: o[0] || (o[0] = (c) => a("update:modelValue", c.target.value))
|
|
741
|
+
}, s.value, { class: "block pr-10 w-full form-input peer" }), null, 16, xt),
|
|
742
|
+
u("button", {
|
|
743
|
+
onClick: o[1] || (o[1] = M((c) => l.value = !l.value, ["stop"])),
|
|
744
|
+
class: "flex absolute inset-y-0 right-0 items-center pr-3 text-brand-700 hover:text-brand"
|
|
745
|
+
}, [
|
|
746
|
+
l.value ? (r(), O(_(pt), {
|
|
747
|
+
key: 0,
|
|
748
|
+
class: "w-5 h-5"
|
|
749
|
+
})) : (r(), O(_(gt), {
|
|
750
|
+
key: 1,
|
|
751
|
+
class: "w-5 h-5"
|
|
752
|
+
}))
|
|
753
|
+
]),
|
|
754
|
+
S(t.$slots, "default")
|
|
755
|
+
], 2));
|
|
756
|
+
}
|
|
757
|
+
}), bt = { class: "flex items-center pb-1" }, wt = ["id", "checked"], yt = ["for"], kt = { key: 1 }, $t = ["href"], _t = {
|
|
758
|
+
key: 0,
|
|
759
|
+
class: "ml-6"
|
|
760
|
+
}, Ht = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
761
|
+
__name: "simple-tree",
|
|
762
|
+
props: { branch: { type: Object, default: {} } },
|
|
763
|
+
emits: ["branch-selected", "expand"],
|
|
764
|
+
setup(e, { emit: a }) {
|
|
765
|
+
const l = e, s = w(!1);
|
|
766
|
+
return K(() => {
|
|
767
|
+
l.branch.current && a("expand", !0);
|
|
768
|
+
}), (t, o) => {
|
|
769
|
+
const c = de("simple-tree", !0);
|
|
770
|
+
return r(), d("div", {
|
|
771
|
+
class: k([!e.branch.branches || !e.branch.branches.length ? "terminates" : "", t.$attrs.class])
|
|
772
|
+
}, [
|
|
773
|
+
u("div", bt, [
|
|
774
|
+
e.branch.branches && e.branch.branches.length ? (r(), d(D, { key: 0 }, [
|
|
775
|
+
u("input", {
|
|
776
|
+
type: "checkbox",
|
|
777
|
+
id: "branch-" + e.branch.id,
|
|
778
|
+
onClick: o[0] || (o[0] = (n) => s.value = !s.value),
|
|
779
|
+
checked: s.value,
|
|
780
|
+
class: "hidden"
|
|
781
|
+
}, null, 8, wt),
|
|
782
|
+
u("label", {
|
|
783
|
+
for: "branch-" + e.branch.id,
|
|
784
|
+
class: "mr-2"
|
|
785
|
+
}, [
|
|
786
|
+
(r(), O(Q(s.value ? _(Ne) : _(Ee)), { class: "w-4 h-4 border" }))
|
|
787
|
+
], 8, yt)
|
|
788
|
+
], 64)) : C("", !0),
|
|
789
|
+
e.branch.current ? (r(), d("strong", kt, y(e.branch.label), 1)) : (r(), d("a", {
|
|
790
|
+
key: 2,
|
|
791
|
+
href: e.branch.path,
|
|
792
|
+
onClick: o[1] || (o[1] = M((n) => a("branch-selected", e.branch), ["prevent"]))
|
|
793
|
+
}, y(e.branch.label), 9, $t))
|
|
794
|
+
]),
|
|
795
|
+
e.branch.branches && e.branch.branches.length ? J((r(), d("ul", _t, [
|
|
796
|
+
(r(!0), d(D, null, V(e.branch.branches, (n) => (r(), O(c, {
|
|
797
|
+
branch: n,
|
|
798
|
+
key: n.id,
|
|
799
|
+
onBranchSelected: o[2] || (o[2] = (v) => a("branch-selected", v)),
|
|
800
|
+
onExpand: o[3] || (o[3] = (v) => {
|
|
801
|
+
s.value = v, a("expand", v);
|
|
802
|
+
})
|
|
803
|
+
}, null, 8, ["branch"]))), 128))
|
|
804
|
+
], 512)), [
|
|
805
|
+
[ve, s.value]
|
|
806
|
+
]) : C("", !0)
|
|
807
|
+
], 2);
|
|
808
|
+
};
|
|
809
|
+
}
|
|
810
|
+
});
|
|
811
|
+
const Ct = (e, a) => {
|
|
812
|
+
const l = e.__vccOpts || e;
|
|
813
|
+
for (const [s, t] of a)
|
|
814
|
+
l[s] = t;
|
|
815
|
+
return l;
|
|
816
|
+
}, Dt = { class: "overflow-hidden rounded ring-1 ring-opacity-10 shadow ring-slate-500" }, St = { class: "min-w-full divide-y divide-y-slate-900" }, Mt = { class: "text-white bg-slate-700" }, Vt = ["onClick"], Pt = { class: "flex items-center" }, At = {
|
|
406
817
|
key: 0,
|
|
407
818
|
xmlns: "http://www.w3.org/2000/svg",
|
|
408
819
|
class: "flex-shrink-0 ml-2 w-4 h-4",
|
|
409
820
|
fill: "none",
|
|
410
821
|
viewBox: "0 0 24 24",
|
|
411
822
|
stroke: "currentColor"
|
|
412
|
-
},
|
|
823
|
+
}, Bt = ["d"], Ft = {
|
|
413
824
|
key: 1,
|
|
414
825
|
"stroke-linecap": "round",
|
|
415
826
|
"stroke-linejoin": "round",
|
|
416
827
|
"stroke-width": "2",
|
|
417
828
|
d: "M8 9l4-4 4 4m0 6l-4 4-4-4"
|
|
418
|
-
},
|
|
829
|
+
}, Lt = {
|
|
419
830
|
__name: "sortable",
|
|
420
831
|
props: {
|
|
421
832
|
columns: {
|
|
422
833
|
type: Array,
|
|
423
834
|
required: !0,
|
|
424
|
-
validator: (
|
|
425
|
-
for (const
|
|
426
|
-
if (
|
|
835
|
+
validator: (e) => {
|
|
836
|
+
for (const a of e)
|
|
837
|
+
if (a.label === void 0 || a.prop === void 0)
|
|
427
838
|
return !1;
|
|
428
839
|
return !0;
|
|
429
840
|
}
|
|
@@ -432,61 +843,61 @@ const $e = (t, i) => {
|
|
|
432
843
|
offset: { type: Number, default: null },
|
|
433
844
|
count: { type: Number, default: null },
|
|
434
845
|
sortProp: { type: String },
|
|
435
|
-
sortDirection: { type: String, validator: (
|
|
846
|
+
sortDirection: { type: String, validator: (e) => !e || ["asc", "desc"].indexOf(e) !== -1 },
|
|
436
847
|
keyProperty: { type: String, default: "key" }
|
|
437
848
|
},
|
|
438
849
|
emits: ["before-sort", "after-sort"],
|
|
439
|
-
setup(
|
|
440
|
-
const
|
|
441
|
-
let
|
|
442
|
-
const
|
|
443
|
-
return
|
|
444
|
-
}),
|
|
445
|
-
|
|
850
|
+
setup(e, { emit: a }) {
|
|
851
|
+
const l = e, s = w(l.sortProp), t = w(l.sortDirection), o = $(() => {
|
|
852
|
+
let n = l.rows.slice();
|
|
853
|
+
const v = l.columns.find(({ prop: i }) => i === s.value);
|
|
854
|
+
return v && (t.value === "asc" && v.sortAscFunction ? n.sort(v.sortAscFunction) : t.value === "desc" && v.sortDescFunction ? n.sort(v.sortDescFunction) : n.sort((i, f) => i[s.value] < f[s.value] ? t.value === "asc" ? -1 : 1 : i[s.value] > f[s.value] ? t.value === "asc" ? 1 : -1 : 0)), n.slice(l.offset || 0, (l.offset || 0) + (l.count || n.length));
|
|
855
|
+
}), c = (n) => {
|
|
856
|
+
a("before-sort", { prop: s.value, dir: t.value }), s.value === n ? t.value = t.value === "asc" ? "desc" : "asc" : (s.value = n, t.value = t.value || "asc"), R(() => a("after-sort", { prop: s.value, dir: t.value }));
|
|
446
857
|
};
|
|
447
|
-
return (
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
(
|
|
858
|
+
return (n, v) => (r(), d("div", Dt, [
|
|
859
|
+
u("table", St, [
|
|
860
|
+
u("thead", Mt, [
|
|
861
|
+
u("tr", null, [
|
|
862
|
+
(r(!0), d(D, null, V(e.columns, (i) => (r(), d("th", {
|
|
452
863
|
scope: "col",
|
|
453
|
-
class:
|
|
454
|
-
{ "cursor-pointer":
|
|
455
|
-
|
|
864
|
+
class: k(["py-3 px-6 text-left", [
|
|
865
|
+
{ "cursor-pointer": i.sortable, active: s.value === i.prop },
|
|
866
|
+
i.cssClass
|
|
456
867
|
]]),
|
|
457
|
-
onClick: (
|
|
868
|
+
onClick: (f) => i.sortable ? c(i.prop) : null
|
|
458
869
|
}, [
|
|
459
|
-
|
|
460
|
-
column:
|
|
461
|
-
sortDir:
|
|
462
|
-
sortProp:
|
|
870
|
+
S(n.$slots, i.prop + "-header", {
|
|
871
|
+
column: i,
|
|
872
|
+
sortDir: t.value,
|
|
873
|
+
sortProp: s.value
|
|
463
874
|
}, () => [
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
875
|
+
u("div", Pt, [
|
|
876
|
+
u("span", null, y(i.label), 1),
|
|
877
|
+
i.sortable ? (r(), d("svg", At, [
|
|
878
|
+
s.value === i.prop ? (r(), d("path", {
|
|
468
879
|
key: 0,
|
|
469
880
|
"stroke-linecap": "round",
|
|
470
881
|
"stroke-linejoin": "round",
|
|
471
882
|
"stroke-width": "2",
|
|
472
|
-
d:
|
|
473
|
-
}, null, 8,
|
|
474
|
-
])) :
|
|
883
|
+
d: t.value === "asc" ? "M19 9l-7 7-7-7" : "M5 15l7-7 7 7"
|
|
884
|
+
}, null, 8, Bt)) : (r(), d("path", Ft))
|
|
885
|
+
])) : C("", !0)
|
|
475
886
|
])
|
|
476
887
|
], !0)
|
|
477
|
-
], 10,
|
|
888
|
+
], 10, Vt))), 256))
|
|
478
889
|
])
|
|
479
890
|
]),
|
|
480
|
-
|
|
481
|
-
(
|
|
482
|
-
key:
|
|
483
|
-
class:
|
|
891
|
+
u("tbody", null, [
|
|
892
|
+
(r(!0), d(D, null, V(o.value, (i) => (r(), d("tr", {
|
|
893
|
+
key: i[e.keyProperty],
|
|
894
|
+
class: k(i.cssClass)
|
|
484
895
|
}, [
|
|
485
|
-
(
|
|
486
|
-
class:
|
|
896
|
+
(r(!0), d(D, null, V(e.columns, (f) => (r(), d("td", {
|
|
897
|
+
class: k(["py-3 px-6 whitespace-nowrap", { active: s.value === f.prop }])
|
|
487
898
|
}, [
|
|
488
|
-
|
|
489
|
-
|
|
899
|
+
S(n.$slots, f.prop, { row: i }, () => [
|
|
900
|
+
A(y(i[f.prop]), 1)
|
|
490
901
|
], !0)
|
|
491
902
|
], 2))), 256))
|
|
492
903
|
], 2))), 128))
|
|
@@ -494,80 +905,16 @@ const $e = (t, i) => {
|
|
|
494
905
|
])
|
|
495
906
|
]));
|
|
496
907
|
}
|
|
497
|
-
},
|
|
498
|
-
class: "flex -mb-px space-x-8",
|
|
499
|
-
"aria-label": "Tabs"
|
|
500
|
-
}, De = ["onClick", "aria-current"], Je = {
|
|
501
|
-
__name: "tabs",
|
|
502
|
-
props: {
|
|
503
|
-
items: { type: Array, default: [] },
|
|
504
|
-
activeIndex: { type: Number, default: 0 }
|
|
505
|
-
},
|
|
506
|
-
emits: ["update:active-index"],
|
|
507
|
-
setup(t, { emit: i }) {
|
|
508
|
-
const s = t, l = g(s.items[s.activeIndex] || {}), e = _(() => {
|
|
509
|
-
let u = [];
|
|
510
|
-
return s.items.forEach((c, d) => {
|
|
511
|
-
c.disabled || u.push({ label: c.name, key: d });
|
|
512
|
-
}), u;
|
|
513
|
-
});
|
|
514
|
-
V(() => s.activeIndex, (u) => {
|
|
515
|
-
l.value = s.items[u] || {};
|
|
516
|
-
});
|
|
517
|
-
const v = (u) => {
|
|
518
|
-
u.disabled || (l.value = u, i("update:active-index", s.items.indexOf(u)));
|
|
519
|
-
};
|
|
520
|
-
return (u, c) => (a(), o(b, null, [
|
|
521
|
-
n("div", je, [
|
|
522
|
-
P(G, {
|
|
523
|
-
options: e.value,
|
|
524
|
-
"model-value": t.activeIndex,
|
|
525
|
-
"onUpdate:modelValue": c[0] || (c[0] = (d) => i("update:activeIndex", d)),
|
|
526
|
-
class: "w-full"
|
|
527
|
-
}, null, 8, ["options", "model-value"])
|
|
528
|
-
]),
|
|
529
|
-
n("div", Le, [
|
|
530
|
-
n("div", Oe, [
|
|
531
|
-
n("nav", ze, [
|
|
532
|
-
(a(!0), o(b, null, k(t.items, (d) => (a(), o("a", {
|
|
533
|
-
key: d.name,
|
|
534
|
-
href: "#",
|
|
535
|
-
onClick: C((r) => v(d), ["prevent"]),
|
|
536
|
-
class: f([
|
|
537
|
-
l.value === d ? "border-vxvue-500 text-vxvue-600" : "border-transparent text-gray-900 hover:text-gray-700 hover:border-gray-300",
|
|
538
|
-
d.disabled ? "cursor-not-allowed text-gray-400 hover:border-transparent" : "",
|
|
539
|
-
"group inline-flex items-center py-4 px-1 border-b-4 font-medium"
|
|
540
|
-
]),
|
|
541
|
-
"aria-current": l.value === d ? "page" : void 0
|
|
542
|
-
}, [
|
|
543
|
-
x(u.$slots, "icon", { tab: d }),
|
|
544
|
-
n("span", null, [
|
|
545
|
-
x(u.$slots, "default", { tab: d }, () => [
|
|
546
|
-
w(h(d.name), 1)
|
|
547
|
-
])
|
|
548
|
-
]),
|
|
549
|
-
d.badge ? (a(), o("span", {
|
|
550
|
-
key: 0,
|
|
551
|
-
class: f([
|
|
552
|
-
l.value === d ? "bg-vxvue-50 text-vxvue-700" : "bg-gray-200 text-gray-900",
|
|
553
|
-
d.disabled ? "bg-gray-100 text-gray-400" : "",
|
|
554
|
-
"hidden ml-3 py-0.5 px-2.5 rounded-full text-xs font-medium md:inline-block"
|
|
555
|
-
])
|
|
556
|
-
}, h(d.badge), 3)) : y("", !0)
|
|
557
|
-
], 10, De))), 128))
|
|
558
|
-
])
|
|
559
|
-
])
|
|
560
|
-
])
|
|
561
|
-
], 64));
|
|
562
|
-
}
|
|
563
|
-
};
|
|
908
|
+
}, Ut = /* @__PURE__ */ Ct(Lt, [["__scopeId", "data-v-069dfce3"]]);
|
|
564
909
|
export {
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
910
|
+
Tt as Confirm,
|
|
911
|
+
Ie as DateInput,
|
|
912
|
+
jt as Datepicker,
|
|
913
|
+
Yt as FormSelect,
|
|
914
|
+
It as FormSwitch,
|
|
915
|
+
Nt as MessageToast,
|
|
916
|
+
Et as Pagination,
|
|
917
|
+
zt as PasswordInput,
|
|
918
|
+
Ht as SimpleTree,
|
|
919
|
+
Ut as Sortable
|
|
573
920
|
};
|