vx-vue 0.7.7 → 0.8.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/README.md +124 -19
- package/dist/style.css +1 -1
- package/dist/vxvue.es.js +855 -755
- package/dist/vxvue.umd.js +1 -1
- package/package.json +7 -7
package/dist/vxvue.es.js
CHANGED
|
@@ -1,157 +1,367 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { useSlots as $e, ref as w, computed as D, onBeforeUpdate as Ce, openBlock as u, createElementBlock as v, Fragment as B, renderList as T, createBlock as R, resolveDynamicComponent as le, createElementVNode as i, useAttrs as U, normalizeClass as k, unref as S, renderSlot as A, getCurrentScope as Se, onScopeDispose as Me, watch as W, onUpdated as Ve, mergeProps as z, withKeys as X, withModifiers as L, createCommentVNode as _, toDisplayString as M, createVNode as j, Transition as re, withCtx as Q, createTextVNode as E, nextTick as ue, toValue as de, withDirectives as me, vModelText as De, onMounted as ie, pushScopeId as Ae, popScopeId as _e, resolveComponent as Be, vShow as Ie, toHandlers as se, normalizeStyle as Pe } from "vue";
|
|
2
|
+
const yl = {
|
|
3
|
+
__name: "accordion",
|
|
4
|
+
props: { activeIndex: [Number, Array] },
|
|
5
|
+
emits: ["update:activeIndex"],
|
|
6
|
+
setup(e, { emit: d }) {
|
|
7
|
+
const l = e, n = d, a = $e(), t = w([]), c = (h) => t.value.push(h), s = D(() => (t.value = [], a.default().reduce((h, m) => ((m.type.__name || m.type.name) === "accordion-panel" && h.push(m), h), []))), o = (h) => {
|
|
8
|
+
if (Array.isArray(l.activeIndex)) {
|
|
9
|
+
let m = [].concat(l.activeIndex), b = m.findIndex((x) => x === h);
|
|
10
|
+
b === -1 ? n("update:activeIndex", [...m, h]) : (m.splice(b, 1), n("update:activeIndex", m));
|
|
11
|
+
} else
|
|
12
|
+
n("update:activeIndex", h === l.activeIndex ? -1 : h);
|
|
13
|
+
}, f = (h) => {
|
|
14
|
+
if (h = ++h % s.value.length, !t.value[h].disabled) {
|
|
15
|
+
o(h), t.value[h].focus();
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
f(h);
|
|
19
|
+
}, r = (h) => {
|
|
20
|
+
if (h = (h || s.value.length) - 1, !t.value[h].disabled) {
|
|
21
|
+
o(h), t.value[h].focus();
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
r(h);
|
|
25
|
+
};
|
|
26
|
+
return Ce(() => t.value = []), (h, m) => (u(!0), v(B, null, T(s.value, (b, x) => {
|
|
27
|
+
var I;
|
|
28
|
+
return u(), R(le(b), {
|
|
29
|
+
key: x,
|
|
30
|
+
show: Array.isArray(e.activeIndex) ? ((I = e.activeIndex) == null ? void 0 : I.indexOf(x)) !== -1 : e.activeIndex === x,
|
|
31
|
+
onSelect: (P) => o(x),
|
|
32
|
+
onKeydown: (P) => f(x),
|
|
33
|
+
onKeyup: (P) => r(x),
|
|
34
|
+
ref_for: !0,
|
|
35
|
+
ref: c
|
|
36
|
+
}, null, 40, ["show", "onSelect", "onKeydown", "onKeyup"]);
|
|
37
|
+
}), 128));
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
function Le(e, d) {
|
|
41
|
+
return u(), v("svg", {
|
|
42
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
43
|
+
viewBox: "0 0 24 24",
|
|
44
|
+
fill: "currentColor",
|
|
45
|
+
"aria-hidden": "true",
|
|
46
|
+
"data-slot": "icon"
|
|
47
|
+
}, [
|
|
48
|
+
i("path", {
|
|
49
|
+
"fill-rule": "evenodd",
|
|
50
|
+
d: "M12.53 16.28a.75.75 0 0 1-1.06 0l-7.5-7.5a.75.75 0 0 1 1.06-1.06L12 14.69l6.97-6.97a.75.75 0 1 1 1.06 1.06l-7.5 7.5Z",
|
|
51
|
+
"clip-rule": "evenodd"
|
|
52
|
+
})
|
|
53
|
+
]);
|
|
54
|
+
}
|
|
55
|
+
function oe(e, d) {
|
|
56
|
+
return u(), v("svg", {
|
|
57
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
58
|
+
viewBox: "0 0 24 24",
|
|
59
|
+
fill: "currentColor",
|
|
60
|
+
"aria-hidden": "true",
|
|
61
|
+
"data-slot": "icon"
|
|
62
|
+
}, [
|
|
63
|
+
i("path", {
|
|
64
|
+
"fill-rule": "evenodd",
|
|
65
|
+
d: "M7.72 12.53a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 1 1 1.06 1.06L9.31 12l6.97 6.97a.75.75 0 1 1-1.06 1.06l-7.5-7.5Z",
|
|
66
|
+
"clip-rule": "evenodd"
|
|
67
|
+
})
|
|
68
|
+
]);
|
|
69
|
+
}
|
|
70
|
+
function te(e, d) {
|
|
71
|
+
return u(), v("svg", {
|
|
72
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
73
|
+
viewBox: "0 0 24 24",
|
|
74
|
+
fill: "currentColor",
|
|
75
|
+
"aria-hidden": "true",
|
|
76
|
+
"data-slot": "icon"
|
|
77
|
+
}, [
|
|
78
|
+
i("path", {
|
|
79
|
+
"fill-rule": "evenodd",
|
|
80
|
+
d: "M16.28 11.47a.75.75 0 0 1 0 1.06l-7.5 7.5a.75.75 0 0 1-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 0 1 1.06-1.06l7.5 7.5Z",
|
|
81
|
+
"clip-rule": "evenodd"
|
|
82
|
+
})
|
|
83
|
+
]);
|
|
4
84
|
}
|
|
5
|
-
function
|
|
6
|
-
return
|
|
85
|
+
function Fe(e, d) {
|
|
86
|
+
return u(), v("svg", {
|
|
87
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
88
|
+
viewBox: "0 0 24 24",
|
|
89
|
+
fill: "currentColor",
|
|
90
|
+
"aria-hidden": "true",
|
|
91
|
+
"data-slot": "icon"
|
|
92
|
+
}, [
|
|
93
|
+
i("path", {
|
|
94
|
+
"fill-rule": "evenodd",
|
|
95
|
+
d: "M11.47 4.72a.75.75 0 0 1 1.06 0l3.75 3.75a.75.75 0 0 1-1.06 1.06L12 6.31 8.78 9.53a.75.75 0 0 1-1.06-1.06l3.75-3.75Zm-3.75 9.75a.75.75 0 0 1 1.06 0L12 17.69l3.22-3.22a.75.75 0 1 1 1.06 1.06l-3.75 3.75a.75.75 0 0 1-1.06 0l-3.75-3.75a.75.75 0 0 1 0-1.06Z",
|
|
96
|
+
"clip-rule": "evenodd"
|
|
97
|
+
})
|
|
98
|
+
]);
|
|
7
99
|
}
|
|
8
|
-
|
|
100
|
+
function Oe(e, d) {
|
|
101
|
+
return u(), v("svg", {
|
|
102
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
103
|
+
viewBox: "0 0 24 24",
|
|
104
|
+
fill: "currentColor",
|
|
105
|
+
"aria-hidden": "true",
|
|
106
|
+
"data-slot": "icon"
|
|
107
|
+
}, [
|
|
108
|
+
i("path", {
|
|
109
|
+
"fill-rule": "evenodd",
|
|
110
|
+
d: "M11.47 7.72a.75.75 0 0 1 1.06 0l7.5 7.5a.75.75 0 1 1-1.06 1.06L12 9.31l-6.97 6.97a.75.75 0 0 1-1.06-1.06l7.5-7.5Z",
|
|
111
|
+
"clip-rule": "evenodd"
|
|
112
|
+
})
|
|
113
|
+
]);
|
|
114
|
+
}
|
|
115
|
+
function Te(e, d) {
|
|
116
|
+
return u(), v("svg", {
|
|
117
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
118
|
+
viewBox: "0 0 24 24",
|
|
119
|
+
fill: "currentColor",
|
|
120
|
+
"aria-hidden": "true",
|
|
121
|
+
"data-slot": "icon"
|
|
122
|
+
}, [
|
|
123
|
+
i("path", {
|
|
124
|
+
"fill-rule": "evenodd",
|
|
125
|
+
d: "M4.25 12a.75.75 0 0 1 .75-.75h14a.75.75 0 0 1 0 1.5H5a.75.75 0 0 1-.75-.75Z",
|
|
126
|
+
"clip-rule": "evenodd"
|
|
127
|
+
})
|
|
128
|
+
]);
|
|
129
|
+
}
|
|
130
|
+
function ze(e, d) {
|
|
131
|
+
return u(), v("svg", {
|
|
132
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
133
|
+
viewBox: "0 0 24 24",
|
|
134
|
+
fill: "currentColor",
|
|
135
|
+
"aria-hidden": "true",
|
|
136
|
+
"data-slot": "icon"
|
|
137
|
+
}, [
|
|
138
|
+
i("path", {
|
|
139
|
+
"fill-rule": "evenodd",
|
|
140
|
+
d: "M12 3.75a.75.75 0 0 1 .75.75v6.75h6.75a.75.75 0 0 1 0 1.5h-6.75v6.75a.75.75 0 0 1-1.5 0v-6.75H4.5a.75.75 0 0 1 0-1.5h6.75V4.5a.75.75 0 0 1 .75-.75Z",
|
|
141
|
+
"clip-rule": "evenodd"
|
|
142
|
+
})
|
|
143
|
+
]);
|
|
144
|
+
}
|
|
145
|
+
function he(e, d) {
|
|
146
|
+
return u(), v("svg", {
|
|
147
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
148
|
+
viewBox: "0 0 24 24",
|
|
149
|
+
fill: "currentColor",
|
|
150
|
+
"aria-hidden": "true",
|
|
151
|
+
"data-slot": "icon"
|
|
152
|
+
}, [
|
|
153
|
+
i("path", {
|
|
154
|
+
"fill-rule": "evenodd",
|
|
155
|
+
d: "M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z",
|
|
156
|
+
"clip-rule": "evenodd"
|
|
157
|
+
})
|
|
158
|
+
]);
|
|
159
|
+
}
|
|
160
|
+
const je = ["id", "disabled", "aria-expanded", "aria-controls"], Ne = ["aria-labelledby", "id"], Ye = { class: "overflow-hidden rounded-b" }, wl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
161
|
+
__name: "accordion-panel",
|
|
162
|
+
props: { show: Boolean, disabled: Boolean },
|
|
163
|
+
emits: ["select", "keyup", "keydown"],
|
|
164
|
+
setup(e, { expose: d, emit: l }) {
|
|
165
|
+
const n = l, a = e, t = U(), c = w(null), s = Math.random().toString(20).substring(2, 8), o = (r) => {
|
|
166
|
+
if (!a.disabled) {
|
|
167
|
+
const h = (/* @__PURE__ */ new Map([[40, "keydown"], [38, "keyup"]])).get(r.keyCode);
|
|
168
|
+
h && (n(h), r.preventDefault());
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
return d({ focus: () => c.value.focus(), disabled: a.disabled }), (r, h) => (u(), v("div", null, [
|
|
172
|
+
i("button", {
|
|
173
|
+
onClick: h[0] || (h[0] = (m) => n("select")),
|
|
174
|
+
onKeydown: o,
|
|
175
|
+
class: k([
|
|
176
|
+
"flex items-center w-full space-x-2 px-4 py-2 ring-vxvue",
|
|
177
|
+
e.show ? "rounded-t" : "rounded",
|
|
178
|
+
e.disabled ? "bg-slate-300 text-slate-700" : "bg-vxvue hover:bg-vxvue-600 text-white",
|
|
179
|
+
S(t).class
|
|
180
|
+
]),
|
|
181
|
+
id: "ap-control-" + S(s),
|
|
182
|
+
disabled: e.disabled,
|
|
183
|
+
"aria-expanded": e.show,
|
|
184
|
+
"aria-controls": "ap-" + S(s),
|
|
185
|
+
ref_key: "btn",
|
|
186
|
+
ref: c,
|
|
187
|
+
tabindex: "0"
|
|
188
|
+
}, [
|
|
189
|
+
e.disabled ? (u(), R(S(he), {
|
|
190
|
+
key: 0,
|
|
191
|
+
class: "size-5"
|
|
192
|
+
})) : (u(), R(S(te), {
|
|
193
|
+
key: 1,
|
|
194
|
+
class: k(["size-5 transform-gpu transition-transform duration-300", { "rotate-90": e.show }])
|
|
195
|
+
}, null, 8, ["class"])),
|
|
196
|
+
i("span", null, [
|
|
197
|
+
A(r.$slots, "header")
|
|
198
|
+
])
|
|
199
|
+
], 42, je),
|
|
200
|
+
i("div", {
|
|
201
|
+
class: k(["grid transition-grid-template-rows duration-300 ease-in-out", e.show && !e.disabled ? "grid-rows-1" : "grid-rows-0"]),
|
|
202
|
+
"aria-labelledby": "ap-control-" + S(s),
|
|
203
|
+
id: "ap-" + S(s)
|
|
204
|
+
}, [
|
|
205
|
+
i("div", Ye, [
|
|
206
|
+
A(r.$slots, "default")
|
|
207
|
+
])
|
|
208
|
+
], 10, Ne)
|
|
209
|
+
]));
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
function Ee(e) {
|
|
213
|
+
return Se() ? (Me(e), !0) : !1;
|
|
214
|
+
}
|
|
215
|
+
function pe(e) {
|
|
216
|
+
return typeof e == "function" ? e() : S(e);
|
|
217
|
+
}
|
|
218
|
+
const ge = typeof window < "u" && typeof document < "u";
|
|
9
219
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
10
|
-
const
|
|
11
|
-
},
|
|
12
|
-
function
|
|
220
|
+
const Re = Object.prototype.toString, He = (e) => Re.call(e) === "[object Object]", ee = () => {
|
|
221
|
+
}, Ue = /* @__PURE__ */ We();
|
|
222
|
+
function We() {
|
|
13
223
|
var e, d;
|
|
14
|
-
return
|
|
224
|
+
return ge && ((e = window == null ? void 0 : window.navigator) == null ? void 0 : e.userAgent) && (/iP(ad|hone|od)/.test(window.navigator.userAgent) || ((d = window == null ? void 0 : window.navigator) == null ? void 0 : d.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));
|
|
15
225
|
}
|
|
16
|
-
const
|
|
17
|
-
function
|
|
226
|
+
const Ze = /[YMDHhms]o|\[([^\]]+)]|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;
|
|
227
|
+
function Ke(e, d, l, n) {
|
|
18
228
|
let a = e < 12 ? "AM" : "PM";
|
|
19
|
-
return n && (a = a.split("").reduce((
|
|
229
|
+
return n && (a = a.split("").reduce((t, c) => t += `${c}.`, "")), l ? a.toLowerCase() : a;
|
|
20
230
|
}
|
|
21
|
-
function
|
|
22
|
-
const d = ["th", "st", "nd", "rd"],
|
|
23
|
-
return e + (d[(
|
|
231
|
+
function K(e) {
|
|
232
|
+
const d = ["th", "st", "nd", "rd"], l = e % 100;
|
|
233
|
+
return e + (d[(l - 20) % 10] || d[l] || d[0]);
|
|
24
234
|
}
|
|
25
|
-
function ve(e, d,
|
|
235
|
+
function ve(e, d, l = {}) {
|
|
26
236
|
var n;
|
|
27
|
-
const a = e.getFullYear(),
|
|
28
|
-
Yo: () =>
|
|
237
|
+
const a = e.getFullYear(), t = e.getMonth(), c = e.getDate(), s = e.getHours(), o = e.getMinutes(), f = e.getSeconds(), r = e.getMilliseconds(), h = e.getDay(), m = (n = l.customMeridiem) != null ? n : Ke, b = {
|
|
238
|
+
Yo: () => K(a),
|
|
29
239
|
YY: () => String(a).slice(-2),
|
|
30
240
|
YYYY: () => a,
|
|
31
|
-
M: () =>
|
|
32
|
-
Mo: () =>
|
|
33
|
-
MM: () => `${
|
|
34
|
-
MMM: () => e.toLocaleDateString(
|
|
35
|
-
MMMM: () => e.toLocaleDateString(
|
|
241
|
+
M: () => t + 1,
|
|
242
|
+
Mo: () => K(t + 1),
|
|
243
|
+
MM: () => `${t + 1}`.padStart(2, "0"),
|
|
244
|
+
MMM: () => e.toLocaleDateString(l.locales, { month: "short" }),
|
|
245
|
+
MMMM: () => e.toLocaleDateString(l.locales, { month: "long" }),
|
|
36
246
|
D: () => String(c),
|
|
37
|
-
Do: () =>
|
|
247
|
+
Do: () => K(c),
|
|
38
248
|
DD: () => `${c}`.padStart(2, "0"),
|
|
39
249
|
H: () => String(s),
|
|
40
|
-
Ho: () =>
|
|
250
|
+
Ho: () => K(s),
|
|
41
251
|
HH: () => `${s}`.padStart(2, "0"),
|
|
42
252
|
h: () => `${s % 12 || 12}`.padStart(1, "0"),
|
|
43
|
-
ho: () =>
|
|
253
|
+
ho: () => K(s % 12 || 12),
|
|
44
254
|
hh: () => `${s % 12 || 12}`.padStart(2, "0"),
|
|
45
255
|
m: () => String(o),
|
|
46
|
-
mo: () =>
|
|
256
|
+
mo: () => K(o),
|
|
47
257
|
mm: () => `${o}`.padStart(2, "0"),
|
|
48
|
-
s: () => String(
|
|
49
|
-
so: () =>
|
|
50
|
-
ss: () => `${
|
|
51
|
-
SSS: () => `${
|
|
52
|
-
d: () =>
|
|
53
|
-
dd: () => e.toLocaleDateString(
|
|
54
|
-
ddd: () => e.toLocaleDateString(
|
|
55
|
-
dddd: () => e.toLocaleDateString(
|
|
56
|
-
A: () =>
|
|
57
|
-
AA: () =>
|
|
58
|
-
a: () =>
|
|
59
|
-
aa: () =>
|
|
258
|
+
s: () => String(f),
|
|
259
|
+
so: () => K(f),
|
|
260
|
+
ss: () => `${f}`.padStart(2, "0"),
|
|
261
|
+
SSS: () => `${r}`.padStart(3, "0"),
|
|
262
|
+
d: () => h,
|
|
263
|
+
dd: () => e.toLocaleDateString(l.locales, { weekday: "narrow" }),
|
|
264
|
+
ddd: () => e.toLocaleDateString(l.locales, { weekday: "short" }),
|
|
265
|
+
dddd: () => e.toLocaleDateString(l.locales, { weekday: "long" }),
|
|
266
|
+
A: () => m(s, o),
|
|
267
|
+
AA: () => m(s, o, !1, !0),
|
|
268
|
+
a: () => m(s, o, !0),
|
|
269
|
+
aa: () => m(s, o, !0, !0)
|
|
60
270
|
};
|
|
61
|
-
return d.replace(
|
|
62
|
-
var
|
|
63
|
-
return (
|
|
271
|
+
return d.replace(Ze, (x, I) => {
|
|
272
|
+
var P, O;
|
|
273
|
+
return (O = I ?? ((P = b[x]) == null ? void 0 : P.call(b))) != null ? O : x;
|
|
64
274
|
});
|
|
65
275
|
}
|
|
66
276
|
function J(e) {
|
|
67
277
|
var d;
|
|
68
|
-
const
|
|
69
|
-
return (d =
|
|
278
|
+
const l = pe(e);
|
|
279
|
+
return (d = l == null ? void 0 : l.$el) != null ? d : l;
|
|
70
280
|
}
|
|
71
|
-
const
|
|
72
|
-
function
|
|
73
|
-
let d,
|
|
74
|
-
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([
|
|
281
|
+
const be = ge ? window : void 0;
|
|
282
|
+
function ne(...e) {
|
|
283
|
+
let d, l, n, a;
|
|
284
|
+
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([l, n, a] = e, d = be) : [d, l, n, a] = e, !d)
|
|
75
285
|
return ee;
|
|
76
|
-
Array.isArray(
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
}, s = (
|
|
80
|
-
() => [J(d),
|
|
81
|
-
([
|
|
82
|
-
if (c(), !
|
|
286
|
+
Array.isArray(l) || (l = [l]), Array.isArray(n) || (n = [n]);
|
|
287
|
+
const t = [], c = () => {
|
|
288
|
+
t.forEach((r) => r()), t.length = 0;
|
|
289
|
+
}, s = (r, h, m, b) => (r.addEventListener(h, m, b), () => r.removeEventListener(h, m, b)), o = W(
|
|
290
|
+
() => [J(d), pe(a)],
|
|
291
|
+
([r, h]) => {
|
|
292
|
+
if (c(), !r)
|
|
83
293
|
return;
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
...
|
|
294
|
+
const m = He(h) ? { ...h } : h;
|
|
295
|
+
t.push(
|
|
296
|
+
...l.flatMap((b) => n.map((x) => s(r, b, x, m)))
|
|
87
297
|
);
|
|
88
298
|
},
|
|
89
299
|
{ immediate: !0, flush: "post" }
|
|
90
|
-
),
|
|
300
|
+
), f = () => {
|
|
91
301
|
o(), c();
|
|
92
302
|
};
|
|
93
|
-
return
|
|
303
|
+
return Ee(f), f;
|
|
94
304
|
}
|
|
95
|
-
let
|
|
96
|
-
function ce(e, d,
|
|
97
|
-
const { window: n =
|
|
305
|
+
let fe = !1;
|
|
306
|
+
function ce(e, d, l = {}) {
|
|
307
|
+
const { window: n = be, ignore: a = [], capture: t = !0, detectIframe: c = !1 } = l;
|
|
98
308
|
if (!n)
|
|
99
309
|
return ee;
|
|
100
|
-
|
|
310
|
+
Ue && !fe && (fe = !0, Array.from(n.document.body.children).forEach((m) => m.addEventListener("click", ee)), n.document.documentElement.addEventListener("click", ee));
|
|
101
311
|
let s = !0;
|
|
102
|
-
const o = (
|
|
103
|
-
if (typeof
|
|
104
|
-
return Array.from(n.document.querySelectorAll(
|
|
312
|
+
const o = (m) => a.some((b) => {
|
|
313
|
+
if (typeof b == "string")
|
|
314
|
+
return Array.from(n.document.querySelectorAll(b)).some((x) => x === m.target || m.composedPath().includes(x));
|
|
105
315
|
{
|
|
106
|
-
const
|
|
107
|
-
return
|
|
316
|
+
const x = J(b);
|
|
317
|
+
return x && (m.target === x || m.composedPath().includes(x));
|
|
108
318
|
}
|
|
109
|
-
}),
|
|
110
|
-
|
|
111
|
-
const
|
|
112
|
-
if (!(!
|
|
113
|
-
if (
|
|
319
|
+
}), r = [
|
|
320
|
+
ne(n, "click", (m) => {
|
|
321
|
+
const b = J(e);
|
|
322
|
+
if (!(!b || b === m.target || m.composedPath().includes(b))) {
|
|
323
|
+
if (m.detail === 0 && (s = !o(m)), !s) {
|
|
114
324
|
s = !0;
|
|
115
325
|
return;
|
|
116
326
|
}
|
|
117
|
-
d(
|
|
327
|
+
d(m);
|
|
118
328
|
}
|
|
119
|
-
}, { passive: !0, capture:
|
|
120
|
-
|
|
121
|
-
const
|
|
122
|
-
s = !o(
|
|
329
|
+
}, { passive: !0, capture: t }),
|
|
330
|
+
ne(n, "pointerdown", (m) => {
|
|
331
|
+
const b = J(e);
|
|
332
|
+
s = !o(m) && !!(b && !m.composedPath().includes(b));
|
|
123
333
|
}, { passive: !0 }),
|
|
124
|
-
c &&
|
|
334
|
+
c && ne(n, "blur", (m) => {
|
|
125
335
|
setTimeout(() => {
|
|
126
|
-
var
|
|
127
|
-
const
|
|
128
|
-
((
|
|
336
|
+
var b;
|
|
337
|
+
const x = J(e);
|
|
338
|
+
((b = n.document.activeElement) == null ? void 0 : b.tagName) === "IFRAME" && !(x != null && x.contains(n.document.activeElement)) && d(m);
|
|
129
339
|
}, 0);
|
|
130
340
|
})
|
|
131
341
|
].filter(Boolean);
|
|
132
|
-
return () =>
|
|
342
|
+
return () => r.forEach((m) => m());
|
|
133
343
|
}
|
|
134
|
-
const
|
|
344
|
+
const qe = ["value", "onKeydown"], Ge = { class: "flex absolute inset-y-0 right-0 items-center pr-3 text-vxvue-700" }, Xe = {
|
|
135
345
|
key: 0,
|
|
136
|
-
class: "size-5
|
|
346
|
+
class: "animate-spin size-5",
|
|
137
347
|
xmlns: "http://www.w3.org/2000/svg",
|
|
138
348
|
fill: "none",
|
|
139
349
|
viewBox: "0 0 24 24"
|
|
140
|
-
},
|
|
350
|
+
}, Je = /* @__PURE__ */ i("circle", {
|
|
141
351
|
class: "opacity-25",
|
|
142
352
|
cx: "12",
|
|
143
353
|
cy: "12",
|
|
144
354
|
r: "10",
|
|
145
355
|
stroke: "currentColor",
|
|
146
356
|
"stroke-width": "4"
|
|
147
|
-
}, null, -1),
|
|
357
|
+
}, null, -1), Qe = /* @__PURE__ */ i("path", {
|
|
148
358
|
class: "opacity-75",
|
|
149
359
|
fill: "currentColor",
|
|
150
360
|
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
151
|
-
}, null, -1),
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
],
|
|
361
|
+
}, null, -1), et = [
|
|
362
|
+
Je,
|
|
363
|
+
Qe
|
|
364
|
+
], kl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
155
365
|
__name: "autocomplete",
|
|
156
366
|
props: {
|
|
157
367
|
modelValue: { type: String, default: "" },
|
|
@@ -165,18 +375,18 @@ const je = ["value", "onKeydown"], Ye = { class: "flex absolute inset-y-0 right-
|
|
|
165
375
|
},
|
|
166
376
|
emits: ["update:modelValue", "blur", "submit"],
|
|
167
377
|
setup(e, { emit: d }) {
|
|
168
|
-
const
|
|
169
|
-
let
|
|
170
|
-
return (
|
|
171
|
-
})())((a.id || "autocomplete") + "-"), s =
|
|
172
|
-
() => s.value.map((
|
|
173
|
-
id: (a.id || "autocomplete") + "-item-" +
|
|
174
|
-
class: ["autocomplete-item", n.resultItemClass, { "bg-vxvue-700 text-white": o.value ===
|
|
175
|
-
"data-result-index":
|
|
378
|
+
const l = d, n = e, a = U(), c = (/* @__PURE__ */ (() => {
|
|
379
|
+
let $ = 0;
|
|
380
|
+
return (C) => (C || "") + ++$;
|
|
381
|
+
})())((a.id || "autocomplete") + "-"), s = w([]), o = w(-1), f = w(0), r = w(!1), h = w(!1), m = w("top-0 translate-y-12"), b = w(!0), x = w(null), I = w(null), P = w(null), O = D(
|
|
382
|
+
() => s.value.map(($, C) => ({
|
|
383
|
+
id: (a.id || "autocomplete") + "-item-" + C,
|
|
384
|
+
class: ["autocomplete-item", n.resultItemClass, { "bg-vxvue-700 text-white": o.value === C }],
|
|
385
|
+
"data-result-index": C,
|
|
176
386
|
role: "option",
|
|
177
|
-
...o.value ===
|
|
387
|
+
...o.value === C ? { "aria-selected": "true" } : {}
|
|
178
388
|
}))
|
|
179
|
-
),
|
|
389
|
+
), Z = D(() => ({
|
|
180
390
|
role: "combobox",
|
|
181
391
|
autocomplete: "off",
|
|
182
392
|
autocapitalize: "off",
|
|
@@ -185,110 +395,110 @@ const je = ["value", "onKeydown"], Ye = { class: "flex absolute inset-y-0 right-
|
|
|
185
395
|
"aria-autocomplete": "list",
|
|
186
396
|
"aria-haspopup": "listbox",
|
|
187
397
|
"aria-owns": c,
|
|
188
|
-
"aria-expanded":
|
|
189
|
-
"aria-activedescendant": o.value > -1 ?
|
|
398
|
+
"aria-expanded": r.value ? "true" : "false",
|
|
399
|
+
"aria-activedescendant": o.value > -1 ? O.value[o.value].id : "",
|
|
190
400
|
...a
|
|
191
|
-
})), q =
|
|
401
|
+
})), q = D(() => ({
|
|
192
402
|
id: c,
|
|
193
|
-
class: ["autocomplete-list absolute min-w-full transform z-10", n.resultListClass,
|
|
403
|
+
class: ["autocomplete-list absolute min-w-full transform z-10", n.resultListClass, m.value],
|
|
194
404
|
role: "listbox"
|
|
195
|
-
})),
|
|
196
|
-
o.value = -1, s.value = [],
|
|
197
|
-
},
|
|
198
|
-
const
|
|
199
|
-
if (
|
|
200
|
-
const
|
|
201
|
-
|
|
202
|
-
|
|
405
|
+
})), y = () => {
|
|
406
|
+
o.value = -1, s.value = [], r.value = !1, b.value = !0;
|
|
407
|
+
}, g = ($) => {
|
|
408
|
+
const C = n.search($);
|
|
409
|
+
if (C instanceof Promise) {
|
|
410
|
+
const H = ++f.value;
|
|
411
|
+
h.value = !0, C.then((Y) => {
|
|
412
|
+
H === f.value && (s.value = Y, h.value = !1, s.value.length ? (o.value = n.autoSelect ? 0 : -1, r.value = !0) : y());
|
|
203
413
|
});
|
|
204
414
|
} else
|
|
205
|
-
s.value =
|
|
206
|
-
},
|
|
207
|
-
const
|
|
208
|
-
return
|
|
209
|
-
},
|
|
210
|
-
|
|
211
|
-
},
|
|
212
|
-
|
|
415
|
+
s.value = C, s.value.length === 0 ? y() : (o.value = n.autoSelect ? 0 : -1, r.value = !0);
|
|
416
|
+
}, p = () => {
|
|
417
|
+
const $ = s.value[o.value];
|
|
418
|
+
return $ && l("update:modelValue", n.getResultValue($)), y(), $;
|
|
419
|
+
}, V = ($) => {
|
|
420
|
+
l("update:modelValue", $), g($);
|
|
421
|
+
}, F = ($) => g($.target.value), N = () => {
|
|
422
|
+
y(), l("blur");
|
|
213
423
|
}, G = () => {
|
|
214
|
-
const k = s.value.length;
|
|
215
|
-
o.value = ((o.value - 1) % k + k) % k;
|
|
216
|
-
}, te = (k) => {
|
|
217
|
-
i.value || L(k);
|
|
218
424
|
const $ = s.value.length;
|
|
219
|
-
o.value = ((o.value
|
|
220
|
-
},
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
425
|
+
o.value = ((o.value - 1) % $ + $) % $;
|
|
426
|
+
}, ae = ($) => {
|
|
427
|
+
r.value || F($);
|
|
428
|
+
const C = s.value.length;
|
|
429
|
+
o.value = ((o.value + 1) % C + C) % C;
|
|
430
|
+
}, ye = () => {
|
|
431
|
+
y(), l("update:modelValue", "");
|
|
432
|
+
}, we = () => l("submit", p()), ke = ($) => {
|
|
433
|
+
const C = $.target.closest("[data-result-index]");
|
|
434
|
+
C && (o.value = parseInt(C.dataset.resultIndex, 10), l("submit", p()));
|
|
225
435
|
};
|
|
226
|
-
return ce(
|
|
227
|
-
if (
|
|
228
|
-
const
|
|
229
|
-
|
|
230
|
-
const
|
|
231
|
-
if (
|
|
232
|
-
let
|
|
233
|
-
|
|
436
|
+
return ce(P, y), Ve(() => {
|
|
437
|
+
if (x.value) {
|
|
438
|
+
const $ = I.value.getBoundingClientRect(), C = x.value.getBoundingClientRect();
|
|
439
|
+
b.value && s.value.length && (b.value = !1, m.value = $.bottom + C.height > window.innerHeight && window.innerHeight - $.bottom < $.top && window.pageYOffset + $.top - C.height > 0 ? "bottom-0 -translate-y-12" : "top-0 translate-y-12");
|
|
440
|
+
const H = x.value.querySelector('[data-result-index="' + o.value + '"]');
|
|
441
|
+
if (H) {
|
|
442
|
+
let Y = H.getBoundingClientRect();
|
|
443
|
+
Y.top < C.top ? x.value.scrollTop -= C.top - Y.top : Y.bottom > C.bottom && (x.value.scrollTop += Y.bottom - C.bottom);
|
|
234
444
|
}
|
|
235
445
|
}
|
|
236
|
-
}), (
|
|
237
|
-
class:
|
|
446
|
+
}), ($, C) => (u(), v("div", {
|
|
447
|
+
class: k(["inline-block relative", $.$attrs.class]),
|
|
238
448
|
ref_key: "container",
|
|
239
|
-
ref:
|
|
449
|
+
ref: P
|
|
240
450
|
}, [
|
|
241
|
-
|
|
451
|
+
i("input", z({
|
|
242
452
|
ref_key: "input",
|
|
243
453
|
ref: I,
|
|
244
454
|
class: "block pr-10 w-full form-input focus:border-vxvue",
|
|
245
455
|
value: e.modelValue
|
|
246
|
-
},
|
|
247
|
-
onInput:
|
|
456
|
+
}, Z.value, {
|
|
457
|
+
onInput: C[0] || (C[0] = (H) => V(H.target.value)),
|
|
248
458
|
onKeydown: [
|
|
249
|
-
X(
|
|
250
|
-
X(
|
|
251
|
-
X(
|
|
252
|
-
X(
|
|
253
|
-
X(
|
|
459
|
+
X(we, ["enter"]),
|
|
460
|
+
X(ye, ["esc"]),
|
|
461
|
+
X(p, ["tab"]),
|
|
462
|
+
X(L(G, ["prevent"]), ["up"]),
|
|
463
|
+
X(L(ae, ["prevent"]), ["down"])
|
|
254
464
|
],
|
|
255
|
-
onFocus:
|
|
256
|
-
onBlur:
|
|
257
|
-
}), null, 16,
|
|
258
|
-
|
|
259
|
-
|
|
465
|
+
onFocus: F,
|
|
466
|
+
onBlur: N
|
|
467
|
+
}), null, 16, qe),
|
|
468
|
+
i("span", Ge, [
|
|
469
|
+
h.value ? (u(), v("svg", Xe, et)) : _("", !0)
|
|
260
470
|
]),
|
|
261
|
-
s.value.length ? (u(), v("ul",
|
|
471
|
+
s.value.length ? (u(), v("ul", z({
|
|
262
472
|
key: 0,
|
|
263
473
|
ref_key: "resultList",
|
|
264
|
-
ref:
|
|
474
|
+
ref: x
|
|
265
475
|
}, q.value, {
|
|
266
|
-
onClick:
|
|
267
|
-
onMousedown:
|
|
476
|
+
onClick: ke,
|
|
477
|
+
onMousedown: C[1] || (C[1] = L(() => {
|
|
268
478
|
}, ["prevent"]))
|
|
269
479
|
}), [
|
|
270
|
-
(u(!0), v(
|
|
271
|
-
result:
|
|
272
|
-
props:
|
|
480
|
+
(u(!0), v(B, null, T(s.value, (H, Y) => A($.$slots, "result", {
|
|
481
|
+
result: H,
|
|
482
|
+
props: O.value[Y]
|
|
273
483
|
}, () => [
|
|
274
|
-
(u(), v("li",
|
|
275
|
-
key:
|
|
276
|
-
},
|
|
484
|
+
(u(), v("li", z({
|
|
485
|
+
key: O.value[Y].id
|
|
486
|
+
}, O.value[Y]), M(e.getResultValue(H)), 17))
|
|
277
487
|
])), 256))
|
|
278
488
|
], 16)) : _("", !0)
|
|
279
489
|
], 2));
|
|
280
490
|
}
|
|
281
|
-
}),
|
|
491
|
+
}), tt = {
|
|
282
492
|
key: 0,
|
|
283
493
|
class: "fixed inset-0 z-50 bg-black bg-opacity-50 backdrop-blur-sm",
|
|
284
494
|
"aria-hidden": "true"
|
|
285
|
-
},
|
|
495
|
+
}, lt = {
|
|
286
496
|
key: 0,
|
|
287
497
|
class: "overflow-y-auto fixed inset-0 z-50"
|
|
288
|
-
},
|
|
498
|
+
}, at = { class: "flex justify-center items-center min-h-screen text-center sm:block sm:p-0" }, st = { key: 0 }, nt = /* @__PURE__ */ i("span", {
|
|
289
499
|
class: "hidden sm:inline-block sm:h-screen sm:align-middle",
|
|
290
500
|
"aria-hidden": "true"
|
|
291
|
-
}, "", -1),
|
|
501
|
+
}, "", -1), ot = { 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" }, rt = { class: "px-4 pb-4 mt-4 sm:px-6 sm:pb-6 sm:mt-5" }, ut = { class: "flex flex-row items-center" }, it = { class: "flex-shrink-0" }, ct = { class: "flex-grow text-center" }, dt = ["onClick"], $l = {
|
|
292
502
|
__name: "confirm",
|
|
293
503
|
props: {
|
|
294
504
|
buttons: {
|
|
@@ -306,50 +516,50 @@ const je = ["value", "onKeydown"], Ye = { class: "flex absolute inset-y-0 right-
|
|
|
306
516
|
}
|
|
307
517
|
},
|
|
308
518
|
setup(e, { expose: d }) {
|
|
309
|
-
const
|
|
519
|
+
const l = e, n = w(""), a = w(""), t = w(!1);
|
|
310
520
|
let c = null, s = null;
|
|
311
|
-
const o =
|
|
312
|
-
|
|
521
|
+
const o = D(() => Array.isArray(l.buttons) ? l.buttons : [l.buttons]), f = w(null), r = (m, b) => {
|
|
522
|
+
t.value = !1, m.value !== void 0 ? m.value ? c() : s() : b ? s() : c();
|
|
313
523
|
};
|
|
314
|
-
return d({ open: (
|
|
315
|
-
c =
|
|
316
|
-
})) }), (
|
|
317
|
-
|
|
318
|
-
|
|
524
|
+
return d({ open: (m, b) => (n.value = m, a.value = b, t.value = !0, ue(() => f.value.firstElementChild.focus()), new Promise((x, I) => {
|
|
525
|
+
c = x, s = I;
|
|
526
|
+
})) }), (m, b) => (u(), v(B, null, [
|
|
527
|
+
t.value ? (u(), v("div", tt)) : _("", !0),
|
|
528
|
+
j(re, { name: "appear" }, {
|
|
319
529
|
default: Q(() => [
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
530
|
+
t.value ? (u(), v("div", lt, [
|
|
531
|
+
i("div", at, [
|
|
532
|
+
t.value ? (u(), v("div", st, [
|
|
533
|
+
nt,
|
|
534
|
+
i("div", ot, [
|
|
325
535
|
n.value ? (u(), v("h3", {
|
|
326
536
|
key: 0,
|
|
327
|
-
class:
|
|
537
|
+
class: k(["py-4 pt-4 text-lg font-medium text-center sm:py-6", e.headerClass])
|
|
328
538
|
}, [
|
|
329
|
-
|
|
330
|
-
|
|
539
|
+
A(m.$slots, "title", { title: n.value }, () => [
|
|
540
|
+
E(M(n.value), 1)
|
|
331
541
|
])
|
|
332
542
|
], 2)) : _("", !0),
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
543
|
+
i("div", rt, [
|
|
544
|
+
i("div", ut, [
|
|
545
|
+
i("div", it, [
|
|
546
|
+
A(m.$slots, "icon")
|
|
337
547
|
]),
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
548
|
+
i("p", ct, [
|
|
549
|
+
A(m.$slots, "default", { message: a.value }, () => [
|
|
550
|
+
E(M(a.value), 1)
|
|
341
551
|
])
|
|
342
552
|
])
|
|
343
553
|
]),
|
|
344
|
-
|
|
554
|
+
i("div", {
|
|
345
555
|
class: "flex justify-center mt-5 space-x-2 sm:mt-6",
|
|
346
556
|
ref_key: "buttonsContainer",
|
|
347
|
-
ref:
|
|
557
|
+
ref: f
|
|
348
558
|
}, [
|
|
349
|
-
(u(!0), v(
|
|
350
|
-
class:
|
|
351
|
-
onClick:
|
|
352
|
-
},
|
|
559
|
+
(u(!0), v(B, null, T(o.value, (x, I) => (u(), v("button", {
|
|
560
|
+
class: k([e.buttonClass, x.class]),
|
|
561
|
+
onClick: L((P) => r(x, I), ["prevent"])
|
|
562
|
+
}, M(x.label), 11, dt))), 256))
|
|
353
563
|
], 512)
|
|
354
564
|
])
|
|
355
565
|
])
|
|
@@ -362,62 +572,62 @@ const je = ["value", "onKeydown"], Ye = { class: "flex absolute inset-y-0 right-
|
|
|
362
572
|
], 64));
|
|
363
573
|
}
|
|
364
574
|
};
|
|
365
|
-
function
|
|
366
|
-
const
|
|
367
|
-
let a,
|
|
575
|
+
function vt(e, d) {
|
|
576
|
+
const l = w(!1), n = de(d);
|
|
577
|
+
let a, t = n.toLowerCase().replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), c = [];
|
|
368
578
|
if ((a = n.match(/\bd\b/gi)) && a.length === 1)
|
|
369
|
-
|
|
579
|
+
t = t.replace("d", "(\\d{1,2})");
|
|
370
580
|
else if ((a = n.match(/\bdd\b/gi)) && a.length === 1)
|
|
371
|
-
|
|
581
|
+
t = t.replace("dd", "(\\d{2})");
|
|
372
582
|
else
|
|
373
|
-
return { date:
|
|
583
|
+
return { date: l };
|
|
374
584
|
if (c.push({ srcPos: n.toLowerCase().indexOf("d"), destPos: 2 }), (a = n.match(/\bm\b/gi)) && a.length === 1)
|
|
375
|
-
|
|
585
|
+
t = t.replace("m", "(\\d{1,2})");
|
|
376
586
|
else if ((a = n.match(/\bmm\b/gi)) && a.length === 1)
|
|
377
|
-
|
|
587
|
+
t = t.replace("mm", "(\\d{2})");
|
|
378
588
|
else
|
|
379
|
-
return { date:
|
|
589
|
+
return { date: l };
|
|
380
590
|
if (c.push({ srcPos: n.toLowerCase().indexOf("m"), destPos: 1 }), (a = n.match(/\byyyy\b/gi)) && a.length === 1)
|
|
381
|
-
|
|
591
|
+
t = t.replace("yyyy", "(\\d{4})");
|
|
382
592
|
else
|
|
383
|
-
return { date:
|
|
384
|
-
if (c.push({ srcPos: n.toLowerCase().indexOf("y"), destPos: 0 }), !(a = de(e).match(
|
|
385
|
-
return { date:
|
|
386
|
-
a.shift(), c.sort((
|
|
387
|
-
let s = [], o,
|
|
593
|
+
return { date: l };
|
|
594
|
+
if (c.push({ srcPos: n.toLowerCase().indexOf("y"), destPos: 0 }), !(a = de(e).match(t)))
|
|
595
|
+
return { date: l };
|
|
596
|
+
a.shift(), c.sort((r, h) => r.srcPos < h.srcPos ? -1 : 1);
|
|
597
|
+
let s = [], o, f;
|
|
388
598
|
for (; o = a.shift(); )
|
|
389
|
-
|
|
390
|
-
return s = Date.parse(s.join("-")), s && (s = new Date(s),
|
|
599
|
+
f = c.shift(), s[f.destPos] = o;
|
|
600
|
+
return s = Date.parse(s.join("-")), s && (s = new Date(s), l.value = new Date(s.getFullYear(), s.getMonth(), s.getDate(), 0, 0, 0)), { date: l };
|
|
391
601
|
}
|
|
392
|
-
const
|
|
393
|
-
class: "
|
|
602
|
+
const ft = { key: 0 }, mt = { class: "text-vxvue-700" }, ht = /* @__PURE__ */ i("svg", {
|
|
603
|
+
class: "size-2",
|
|
394
604
|
stroke: "currentColor",
|
|
395
605
|
fill: "none",
|
|
396
606
|
viewBox: "0 0 8 8"
|
|
397
607
|
}, [
|
|
398
|
-
/* @__PURE__ */
|
|
608
|
+
/* @__PURE__ */ i("path", {
|
|
399
609
|
"stroke-linecap": "round",
|
|
400
610
|
"stroke-width": "1.5",
|
|
401
611
|
d: "M1 1l6 6m0-6L1 7"
|
|
402
612
|
})
|
|
403
|
-
], -1),
|
|
404
|
-
|
|
405
|
-
],
|
|
613
|
+
], -1), pt = [
|
|
614
|
+
ht
|
|
615
|
+
], gt = /* @__PURE__ */ i("svg", {
|
|
406
616
|
xmlns: "http://www.w3.org/2000/svg",
|
|
407
|
-
class: "
|
|
617
|
+
class: "size-6",
|
|
408
618
|
fill: "none",
|
|
409
619
|
viewBox: "0 0 24 24",
|
|
410
620
|
stroke: "currentColor"
|
|
411
621
|
}, [
|
|
412
|
-
/* @__PURE__ */
|
|
622
|
+
/* @__PURE__ */ i("path", {
|
|
413
623
|
"stroke-linecap": "round",
|
|
414
624
|
"stroke-linejoin": "round",
|
|
415
625
|
"stroke-width": "2",
|
|
416
626
|
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"
|
|
417
627
|
})
|
|
418
|
-
], -1),
|
|
419
|
-
|
|
420
|
-
],
|
|
628
|
+
], -1), bt = [
|
|
629
|
+
gt
|
|
630
|
+
], xt = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
421
631
|
__name: "date-input",
|
|
422
632
|
props: {
|
|
423
633
|
outputFormat: { type: String, default: "YYYY-MM-DD" },
|
|
@@ -428,169 +638,48 @@ const lt = { key: 0 }, at = { class: "text-vxvue-700" }, st = /* @__PURE__ */ r(
|
|
|
428
638
|
},
|
|
429
639
|
emits: ["update:modelValue", "toggle-datepicker"],
|
|
430
640
|
setup(e, { emit: d }) {
|
|
431
|
-
const
|
|
432
|
-
let s = Object.assign({},
|
|
641
|
+
const l = d, n = e, a = w(""), t = D(() => n.modelValue ? ve(n.modelValue, n.outputFormat) : ""), c = D(() => {
|
|
642
|
+
let s = Object.assign({}, U());
|
|
433
643
|
return delete s.class, s;
|
|
434
644
|
});
|
|
435
|
-
return
|
|
436
|
-
class:
|
|
645
|
+
return W(() => n.modelValue, (s) => a.value = s ? ve(s, n.outputFormat) : ""), (s, o) => (u(), v("div", {
|
|
646
|
+
class: k(["inline-block relative", s.$attrs.class])
|
|
437
647
|
}, [
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
class:
|
|
648
|
+
t.value ? (u(), v("div", ft, [
|
|
649
|
+
i("div", {
|
|
650
|
+
class: k(["block flex items-center w-full form-input bg-vxvue-50", { "pr-10": e.showButton }])
|
|
441
651
|
}, [
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
onClick: o[0] || (o[0] = (
|
|
445
|
-
class: "inline-flex flex-shrink-0 justify-center items-center ml-2
|
|
446
|
-
},
|
|
652
|
+
i("span", mt, M(t.value), 1),
|
|
653
|
+
i("button", {
|
|
654
|
+
onClick: o[0] || (o[0] = (f) => l("update:modelValue", null)),
|
|
655
|
+
class: "inline-flex flex-shrink-0 justify-center items-center ml-2 rounded-full focus:text-white focus:outline-none size-4 text-vxvue hover:bg-vxvue-100 hover:text-vue-700 focus:bg-vxvue-700"
|
|
656
|
+
}, pt)
|
|
447
657
|
], 2)
|
|
448
|
-
])) :
|
|
658
|
+
])) : me((u(), v("input", z({
|
|
449
659
|
key: 1,
|
|
450
660
|
type: "text",
|
|
451
661
|
class: ["block w-full form-input peer focus:border-vxvue", { "pr-10": e.showButton }],
|
|
452
|
-
"onUpdate:modelValue": o[1] || (o[1] = (
|
|
453
|
-
onBlur: o[2] || (o[2] = (
|
|
454
|
-
var
|
|
455
|
-
return
|
|
662
|
+
"onUpdate:modelValue": o[1] || (o[1] = (f) => a.value = f),
|
|
663
|
+
onBlur: o[2] || (o[2] = (f) => {
|
|
664
|
+
var r;
|
|
665
|
+
return l("update:modelValue", ((r = S(vt)(a.value, n.inputFormat).date) == null ? void 0 : r.value) || null);
|
|
456
666
|
}),
|
|
457
|
-
onInput: o[3] || (o[3] =
|
|
667
|
+
onInput: o[3] || (o[3] = L(() => {
|
|
458
668
|
}, ["prevent"]))
|
|
459
669
|
}, c.value), null, 16)), [
|
|
460
|
-
[
|
|
670
|
+
[De, a.value]
|
|
461
671
|
]),
|
|
462
672
|
e.showButton ? (u(), v("button", {
|
|
463
673
|
key: 2,
|
|
464
674
|
class: "flex absolute inset-y-0 right-0 items-center px-2 text-vxvue-700 hover:text-vxvue",
|
|
465
675
|
"aria-label": "datepicker-toggle",
|
|
466
|
-
onClick: o[4] || (o[4] =
|
|
676
|
+
onClick: o[4] || (o[4] = L((f) => l("toggle-datepicker"), ["stop"])),
|
|
467
677
|
ref: "toggleButton"
|
|
468
|
-
},
|
|
469
|
-
|
|
678
|
+
}, bt, 512)) : _("", !0),
|
|
679
|
+
A(s.$slots, "default")
|
|
470
680
|
], 2));
|
|
471
681
|
}
|
|
472
|
-
})
|
|
473
|
-
function it(e, d) {
|
|
474
|
-
return u(), v("svg", {
|
|
475
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
476
|
-
viewBox: "0 0 24 24",
|
|
477
|
-
fill: "currentColor",
|
|
478
|
-
"aria-hidden": "true",
|
|
479
|
-
"data-slot": "icon"
|
|
480
|
-
}, [
|
|
481
|
-
r("path", {
|
|
482
|
-
"fill-rule": "evenodd",
|
|
483
|
-
d: "M12.53 16.28a.75.75 0 0 1-1.06 0l-7.5-7.5a.75.75 0 0 1 1.06-1.06L12 14.69l6.97-6.97a.75.75 0 1 1 1.06 1.06l-7.5 7.5Z",
|
|
484
|
-
"clip-rule": "evenodd"
|
|
485
|
-
})
|
|
486
|
-
]);
|
|
487
|
-
}
|
|
488
|
-
function se(e, d) {
|
|
489
|
-
return u(), v("svg", {
|
|
490
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
491
|
-
viewBox: "0 0 24 24",
|
|
492
|
-
fill: "currentColor",
|
|
493
|
-
"aria-hidden": "true",
|
|
494
|
-
"data-slot": "icon"
|
|
495
|
-
}, [
|
|
496
|
-
r("path", {
|
|
497
|
-
"fill-rule": "evenodd",
|
|
498
|
-
d: "M7.72 12.53a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 1 1 1.06 1.06L9.31 12l6.97 6.97a.75.75 0 1 1-1.06 1.06l-7.5-7.5Z",
|
|
499
|
-
"clip-rule": "evenodd"
|
|
500
|
-
})
|
|
501
|
-
]);
|
|
502
|
-
}
|
|
503
|
-
function ne(e, d) {
|
|
504
|
-
return u(), v("svg", {
|
|
505
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
506
|
-
viewBox: "0 0 24 24",
|
|
507
|
-
fill: "currentColor",
|
|
508
|
-
"aria-hidden": "true",
|
|
509
|
-
"data-slot": "icon"
|
|
510
|
-
}, [
|
|
511
|
-
r("path", {
|
|
512
|
-
"fill-rule": "evenodd",
|
|
513
|
-
d: "M16.28 11.47a.75.75 0 0 1 0 1.06l-7.5 7.5a.75.75 0 0 1-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 0 1 1.06-1.06l7.5 7.5Z",
|
|
514
|
-
"clip-rule": "evenodd"
|
|
515
|
-
})
|
|
516
|
-
]);
|
|
517
|
-
}
|
|
518
|
-
function ct(e, d) {
|
|
519
|
-
return u(), v("svg", {
|
|
520
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
521
|
-
viewBox: "0 0 24 24",
|
|
522
|
-
fill: "currentColor",
|
|
523
|
-
"aria-hidden": "true",
|
|
524
|
-
"data-slot": "icon"
|
|
525
|
-
}, [
|
|
526
|
-
r("path", {
|
|
527
|
-
"fill-rule": "evenodd",
|
|
528
|
-
d: "M11.47 4.72a.75.75 0 0 1 1.06 0l3.75 3.75a.75.75 0 0 1-1.06 1.06L12 6.31 8.78 9.53a.75.75 0 0 1-1.06-1.06l3.75-3.75Zm-3.75 9.75a.75.75 0 0 1 1.06 0L12 17.69l3.22-3.22a.75.75 0 1 1 1.06 1.06l-3.75 3.75a.75.75 0 0 1-1.06 0l-3.75-3.75a.75.75 0 0 1 0-1.06Z",
|
|
529
|
-
"clip-rule": "evenodd"
|
|
530
|
-
})
|
|
531
|
-
]);
|
|
532
|
-
}
|
|
533
|
-
function dt(e, d) {
|
|
534
|
-
return u(), v("svg", {
|
|
535
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
536
|
-
viewBox: "0 0 24 24",
|
|
537
|
-
fill: "currentColor",
|
|
538
|
-
"aria-hidden": "true",
|
|
539
|
-
"data-slot": "icon"
|
|
540
|
-
}, [
|
|
541
|
-
r("path", {
|
|
542
|
-
"fill-rule": "evenodd",
|
|
543
|
-
d: "M11.47 7.72a.75.75 0 0 1 1.06 0l7.5 7.5a.75.75 0 1 1-1.06 1.06L12 9.31l-6.97 6.97a.75.75 0 0 1-1.06-1.06l7.5-7.5Z",
|
|
544
|
-
"clip-rule": "evenodd"
|
|
545
|
-
})
|
|
546
|
-
]);
|
|
547
|
-
}
|
|
548
|
-
function vt(e, d) {
|
|
549
|
-
return u(), v("svg", {
|
|
550
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
551
|
-
viewBox: "0 0 24 24",
|
|
552
|
-
fill: "currentColor",
|
|
553
|
-
"aria-hidden": "true",
|
|
554
|
-
"data-slot": "icon"
|
|
555
|
-
}, [
|
|
556
|
-
r("path", {
|
|
557
|
-
"fill-rule": "evenodd",
|
|
558
|
-
d: "M4.25 12a.75.75 0 0 1 .75-.75h14a.75.75 0 0 1 0 1.5H5a.75.75 0 0 1-.75-.75Z",
|
|
559
|
-
"clip-rule": "evenodd"
|
|
560
|
-
})
|
|
561
|
-
]);
|
|
562
|
-
}
|
|
563
|
-
function mt(e, d) {
|
|
564
|
-
return u(), v("svg", {
|
|
565
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
566
|
-
viewBox: "0 0 24 24",
|
|
567
|
-
fill: "currentColor",
|
|
568
|
-
"aria-hidden": "true",
|
|
569
|
-
"data-slot": "icon"
|
|
570
|
-
}, [
|
|
571
|
-
r("path", {
|
|
572
|
-
"fill-rule": "evenodd",
|
|
573
|
-
d: "M12 3.75a.75.75 0 0 1 .75.75v6.75h6.75a.75.75 0 0 1 0 1.5h-6.75v6.75a.75.75 0 0 1-1.5 0v-6.75H4.5a.75.75 0 0 1 0-1.5h6.75V4.5a.75.75 0 0 1 .75-.75Z",
|
|
574
|
-
"clip-rule": "evenodd"
|
|
575
|
-
})
|
|
576
|
-
]);
|
|
577
|
-
}
|
|
578
|
-
function ft(e, d) {
|
|
579
|
-
return u(), v("svg", {
|
|
580
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
581
|
-
viewBox: "0 0 24 24",
|
|
582
|
-
fill: "currentColor",
|
|
583
|
-
"aria-hidden": "true",
|
|
584
|
-
"data-slot": "icon"
|
|
585
|
-
}, [
|
|
586
|
-
r("path", {
|
|
587
|
-
"fill-rule": "evenodd",
|
|
588
|
-
d: "M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z",
|
|
589
|
-
"clip-rule": "evenodd"
|
|
590
|
-
})
|
|
591
|
-
]);
|
|
592
|
-
}
|
|
593
|
-
const ht = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, pt = { class: "flex w-1/2 justify-between" }, gt = { class: "flex w-1/2 justify-between" }, bt = { class: "grid grid-cols-7 gap-0.5 p-0.5" }, xt = ["disabled", "onClick"], gl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
682
|
+
}), yt = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, wt = { class: "flex justify-between w-1/2" }, kt = { class: "flex justify-between w-1/2" }, $t = { class: "grid grid-cols-7 gap-0.5 p-0.5" }, Ct = ["disabled", "onClick"], Cl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
594
683
|
__name: "datepicker",
|
|
595
684
|
props: {
|
|
596
685
|
modelValue: [Date, Boolean],
|
|
@@ -603,117 +692,117 @@ const ht = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, pt
|
|
|
603
692
|
},
|
|
604
693
|
emits: ["update:modelValue", "month-change", "year-change"],
|
|
605
694
|
setup(e, { emit: d }) {
|
|
606
|
-
const
|
|
607
|
-
let
|
|
608
|
-
return new Date(
|
|
609
|
-
})(),
|
|
610
|
-
const
|
|
611
|
-
for (let G = -
|
|
612
|
-
|
|
613
|
-
return
|
|
614
|
-
}), I =
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
}, { immediate: !0 }),
|
|
618
|
-
|
|
619
|
-
const
|
|
620
|
-
o.value =
|
|
695
|
+
const l = e, n = d, a = (() => {
|
|
696
|
+
let y = /* @__PURE__ */ new Date();
|
|
697
|
+
return new Date(y.getFullYear(), y.getMonth(), y.getDate());
|
|
698
|
+
})(), t = w(new Date(a.getFullYear(), a.getMonth(), 1)), c = w(null), s = w(!l.hasInput), o = w("left-0"), f = w("top-0"), r = w(null), h = w(null), m = w(null), b = D(() => l.hasInput ? { class: ["absolute", s.value ? "block" : "hidden"] } : {}), x = D(() => {
|
|
699
|
+
const y = [], g = t.value.getFullYear(), p = t.value.getMonth(), V = new Date(g, p + 1, 0), F = new Date(g, p, 0).getDay() + 1 - l.startOfWeekIndex, N = (6 + l.startOfWeekIndex - V.getDay()) % 7;
|
|
700
|
+
for (let G = -F, ae = V.getDate() + N; G < ae; ++G)
|
|
701
|
+
y.push(new Date(g, p, G + 1));
|
|
702
|
+
return y;
|
|
703
|
+
}), I = D(() => l.startOfWeekIndex ? l.dayNames.slice(1).concat(l.dayNames[0]) : l.dayNames.slice());
|
|
704
|
+
W(() => l.modelValue, (y) => {
|
|
705
|
+
y ? (c.value = new Date(y.getFullYear(), y.getMonth(), y.getDate()), t.value = new Date(c.value.getTime())) : (c.value = null, t.value = new Date(a.getTime())), t.value.setDate(1);
|
|
706
|
+
}, { immediate: !0 }), W(s, (y) => {
|
|
707
|
+
y && l.hasInput && ue(() => {
|
|
708
|
+
const g = r.value.$el.getBoundingClientRect(), p = h.value.getBoundingClientRect();
|
|
709
|
+
o.value = g.left + p.width > window.innerWidth ? "right-0" : "left-0", f.value = g.bottom + p.height > window.innerHeight ? "bottom-0 -translate-y-12" : "top-0 translate-y-12";
|
|
621
710
|
});
|
|
622
|
-
}), ce(
|
|
623
|
-
const
|
|
624
|
-
|
|
625
|
-
},
|
|
626
|
-
|
|
627
|
-
},
|
|
628
|
-
c.value =
|
|
629
|
-
}, q = (
|
|
630
|
-
c.value =
|
|
711
|
+
}), ce(h, () => s.value = !1, { ignore: [m] });
|
|
712
|
+
const P = (y) => {
|
|
713
|
+
t.value = new Date(t.value.getFullYear(), y, 1), n("month-change", t.value);
|
|
714
|
+
}, O = (y) => {
|
|
715
|
+
t.value = new Date(y, t.value.getMonth(), 1), n("year-change", t.value);
|
|
716
|
+
}, Z = (y) => {
|
|
717
|
+
c.value = y, n("update:modelValue", y), s.value = !l.hasInput;
|
|
718
|
+
}, q = (y) => {
|
|
719
|
+
c.value = y, n("update:modelValue", y);
|
|
631
720
|
};
|
|
632
|
-
return
|
|
633
|
-
var
|
|
634
|
-
return
|
|
635
|
-
}), (
|
|
636
|
-
class:
|
|
721
|
+
return ie(() => {
|
|
722
|
+
var y;
|
|
723
|
+
return m.value = (y = r.value) == null ? void 0 : y.$refs.toggleButton;
|
|
724
|
+
}), (y, g) => (u(), v("div", {
|
|
725
|
+
class: k(["relative", y.$attrs.class])
|
|
637
726
|
}, [
|
|
638
|
-
e.hasInput ? (u(),
|
|
727
|
+
e.hasInput ? (u(), R(xt, z({
|
|
639
728
|
key: 0,
|
|
640
729
|
modelValue: c.value,
|
|
641
|
-
onToggleDatepicker:
|
|
730
|
+
onToggleDatepicker: g[0] || (g[0] = (p) => s.value = !s.value),
|
|
642
731
|
"onUpdate:modelValue": q
|
|
643
|
-
},
|
|
732
|
+
}, y.$attrs, {
|
|
644
733
|
ref_key: "input",
|
|
645
|
-
ref:
|
|
734
|
+
ref: r,
|
|
646
735
|
class: "w-full",
|
|
647
736
|
locale: e.locale
|
|
648
737
|
}), {
|
|
649
738
|
default: Q(() => [
|
|
650
|
-
|
|
739
|
+
A(y.$slots, "default")
|
|
651
740
|
]),
|
|
652
741
|
_: 3
|
|
653
742
|
}, 16, ["modelValue", "locale"])) : _("", !0),
|
|
654
|
-
|
|
743
|
+
i("div", z({ class: "z-10 bg-white shadow-md" }, b.value, {
|
|
655
744
|
ref_key: "calendar",
|
|
656
|
-
ref:
|
|
657
|
-
class: [o.value,
|
|
745
|
+
ref: h,
|
|
746
|
+
class: [o.value, f.value]
|
|
658
747
|
}), [
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
onClick:
|
|
748
|
+
i("div", yt, [
|
|
749
|
+
i("div", wt, [
|
|
750
|
+
i("button", {
|
|
751
|
+
onClick: g[1] || (g[1] = L((p) => P(t.value.getMonth() - 1), ["stop"])),
|
|
663
752
|
class: "flex-shrink-0 text-vxvue-100 hover:text-vxvue-50"
|
|
664
753
|
}, [
|
|
665
|
-
|
|
754
|
+
j(S(oe), { class: "size-6" })
|
|
666
755
|
]),
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
onClick:
|
|
756
|
+
i("span", null, M(t.value.toLocaleString(e.locale, { month: "long" })), 1),
|
|
757
|
+
i("button", {
|
|
758
|
+
onClick: g[2] || (g[2] = L((p) => P(t.value.getMonth() + 1), ["stop"])),
|
|
670
759
|
class: "flex-shrink-0 text-vxvue-100 hover:text-vxvue-50"
|
|
671
760
|
}, [
|
|
672
|
-
|
|
761
|
+
j(S(te), { class: "size-6" })
|
|
673
762
|
])
|
|
674
763
|
]),
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
onClick:
|
|
764
|
+
i("div", kt, [
|
|
765
|
+
i("button", {
|
|
766
|
+
onClick: g[3] || (g[3] = L((p) => O(t.value.getFullYear() - 1), ["stop"])),
|
|
678
767
|
class: "flex-shrink-0 text-vxvue-100 hover:text-vxvue-50"
|
|
679
768
|
}, [
|
|
680
|
-
|
|
769
|
+
j(S(oe), { class: "size-6" })
|
|
681
770
|
]),
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
onClick:
|
|
771
|
+
i("div", null, M(t.value.getFullYear()), 1),
|
|
772
|
+
i("button", {
|
|
773
|
+
onClick: g[4] || (g[4] = L((p) => O(t.value.getFullYear() + 1), ["stop"])),
|
|
685
774
|
class: "flex-shrink-0 text-vxvue-100 hover:text-vxvue-50"
|
|
686
775
|
}, [
|
|
687
|
-
|
|
776
|
+
j(S(te), { class: "size-6" })
|
|
688
777
|
])
|
|
689
778
|
])
|
|
690
779
|
]),
|
|
691
|
-
|
|
692
|
-
(u(!0), v(
|
|
780
|
+
i("div", $t, [
|
|
781
|
+
(u(!0), v(B, null, T(I.value, (p, V) => (u(), v("div", {
|
|
693
782
|
class: "py-2 text-center bg-gray-200",
|
|
694
|
-
key:
|
|
695
|
-
},
|
|
696
|
-
(u(!0), v(
|
|
697
|
-
class:
|
|
783
|
+
key: V
|
|
784
|
+
}, M(p), 1))), 128)),
|
|
785
|
+
(u(!0), v(B, null, T(x.value, (p) => (u(), v("div", {
|
|
786
|
+
class: k(["text-center", p.getMonth() - t.value.getMonth() === 0 ? "text-vxvue-700" : "text-gray-400"])
|
|
698
787
|
}, [
|
|
699
|
-
|
|
700
|
-
class:
|
|
788
|
+
i("button", {
|
|
789
|
+
class: k([
|
|
701
790
|
{
|
|
702
|
-
"bg-vxvue-700 text-white": c.value &&
|
|
703
|
-
"bg-gray-200":
|
|
704
|
-
"text-red-400": e.validFrom && e.validFrom >
|
|
791
|
+
"bg-vxvue-700 text-white": c.value && p.getTime() === c.value.getTime(),
|
|
792
|
+
"bg-gray-200": p.getTime() === S(a).getTime(),
|
|
793
|
+
"text-red-400": e.validFrom && e.validFrom > p || e.validUntil && e.validUntil < p
|
|
705
794
|
},
|
|
706
795
|
"py-2 px-3 rounded-sm"
|
|
707
796
|
]),
|
|
708
|
-
disabled: e.validFrom && e.validFrom >
|
|
709
|
-
onClick:
|
|
710
|
-
},
|
|
797
|
+
disabled: e.validFrom && e.validFrom > p || e.validUntil && e.validUntil < p,
|
|
798
|
+
onClick: L((V) => e.validFrom && e.validFrom > p || e.validUntil && e.validUntil < p ? null : Z(p), ["stop"])
|
|
799
|
+
}, M(p.getDate()), 11, Ct)
|
|
711
800
|
], 2))), 256))
|
|
712
801
|
])
|
|
713
802
|
], 16)
|
|
714
803
|
], 2));
|
|
715
804
|
}
|
|
716
|
-
}),
|
|
805
|
+
}), St = ["for"], Mt = ["id", "multiple", "accept"], Sl = {
|
|
717
806
|
__name: "form-file-button",
|
|
718
807
|
props: {
|
|
719
808
|
modelValue: { type: Array },
|
|
@@ -724,97 +813,106 @@ const ht = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, pt
|
|
|
724
813
|
},
|
|
725
814
|
emits: ["update:modelValue", "form-data"],
|
|
726
815
|
setup(e, { emit: d }) {
|
|
727
|
-
const
|
|
816
|
+
const l = d, n = e, a = (c) => {
|
|
728
817
|
const s = new FormData();
|
|
729
818
|
for (let o of c)
|
|
730
819
|
s.append(n.name, o, o.name);
|
|
731
820
|
return s;
|
|
732
|
-
},
|
|
821
|
+
}, t = (c) => {
|
|
733
822
|
const s = c.target.files || c.dataTransfer.files;
|
|
734
823
|
if (s) {
|
|
735
824
|
const o = [...s];
|
|
736
|
-
|
|
825
|
+
l("update:modelValue", o), l("form-data", a(o));
|
|
737
826
|
}
|
|
738
827
|
};
|
|
739
828
|
return (c, s) => (u(), v("label", { for: e.id }, [
|
|
740
|
-
|
|
741
|
-
|
|
829
|
+
A(c.$slots, "default", {}, () => [
|
|
830
|
+
E("Upload")
|
|
742
831
|
]),
|
|
743
|
-
|
|
832
|
+
i("input", {
|
|
744
833
|
type: "file",
|
|
745
834
|
id: e.id,
|
|
746
835
|
multiple: e.multiple,
|
|
747
836
|
accept: e.accept,
|
|
748
|
-
onChange:
|
|
837
|
+
onChange: t,
|
|
749
838
|
class: "hidden"
|
|
750
|
-
}, null, 40,
|
|
751
|
-
], 8,
|
|
839
|
+
}, null, 40, Mt)
|
|
840
|
+
], 8, St));
|
|
752
841
|
}
|
|
753
|
-
},
|
|
842
|
+
}, Vt = ["value"], Dt = {
|
|
754
843
|
key: 0,
|
|
755
844
|
disabled: "",
|
|
756
845
|
value: ""
|
|
757
|
-
},
|
|
846
|
+
}, At = ["value", "selected"], _t = {
|
|
758
847
|
__name: "form-select",
|
|
759
848
|
props: { options: Array, modelValue: [String, Number], disabledLabel: String },
|
|
760
849
|
emits: ["update:modelValue"],
|
|
761
850
|
setup(e, { emit: d }) {
|
|
762
|
-
const
|
|
763
|
-
return (n, a) => (u(), v("select",
|
|
851
|
+
const l = d;
|
|
852
|
+
return (n, a) => (u(), v("select", z(n.$attrs, {
|
|
764
853
|
value: e.modelValue,
|
|
765
854
|
class: "form-select",
|
|
766
|
-
onChange: a[0] || (a[0] = (
|
|
855
|
+
onChange: a[0] || (a[0] = (t) => l("update:modelValue", t.target.value))
|
|
767
856
|
}), [
|
|
768
|
-
e.disabledLabel ? (u(), v("option",
|
|
769
|
-
(u(!0), v(
|
|
770
|
-
value:
|
|
771
|
-
selected: (
|
|
772
|
-
},
|
|
773
|
-
], 16,
|
|
857
|
+
e.disabledLabel ? (u(), v("option", Dt, M(e.disabledLabel), 1)) : _("", !0),
|
|
858
|
+
(u(!0), v(B, null, T(e.options, (t) => (u(), v("option", {
|
|
859
|
+
value: t.key !== void 0 ? t.key : t.label || t,
|
|
860
|
+
selected: (t.key !== void 0 ? t.key : t.label || t) === e.modelValue
|
|
861
|
+
}, M(t.label || t), 9, At))), 256))
|
|
862
|
+
], 16, Vt));
|
|
774
863
|
}
|
|
775
|
-
},
|
|
864
|
+
}, Bt = ["aria-checked", "aria-label"], It = ["checked"], Ml = {
|
|
776
865
|
__name: "form-switch",
|
|
777
866
|
props: ["modelValue"],
|
|
778
867
|
emits: ["update:modelValue"],
|
|
779
868
|
setup(e, { emit: d }) {
|
|
780
|
-
const
|
|
781
|
-
let
|
|
782
|
-
return delete
|
|
783
|
-
});
|
|
784
|
-
return (
|
|
785
|
-
|
|
786
|
-
class:
|
|
869
|
+
const l = d, n = D(() => {
|
|
870
|
+
let t = Object.assign({}, U());
|
|
871
|
+
return delete t.class, t;
|
|
872
|
+
}), a = D(() => U().disabled || U().disabled === "");
|
|
873
|
+
return (t, c) => (u(), v(B, null, [
|
|
874
|
+
i("label", {
|
|
875
|
+
class: k(t.$attrs.class),
|
|
876
|
+
tabindex: "0"
|
|
787
877
|
}, [
|
|
788
|
-
|
|
789
|
-
class: C([a.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"]),
|
|
878
|
+
i("span", {
|
|
790
879
|
role: "switch",
|
|
880
|
+
class: k([
|
|
881
|
+
"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",
|
|
882
|
+
a.value ? "bg-slate-200" : e.modelValue ? "bg-vxvue" : "bg-slate-300"
|
|
883
|
+
]),
|
|
791
884
|
"aria-checked": !!e.modelValue,
|
|
792
|
-
"aria-label":
|
|
885
|
+
"aria-label": t.$attrs["aria-label"]
|
|
793
886
|
}, [
|
|
794
|
-
|
|
887
|
+
i("span", {
|
|
795
888
|
"aria-hidden": "true",
|
|
796
|
-
class:
|
|
889
|
+
class: k([
|
|
890
|
+
"inline-block size-5 rounded-full ring-0 shadow transition duration-200 ease-in-out transform pointer-events-none",
|
|
891
|
+
e.modelValue ? "translate-x-5" : "translate-x-0",
|
|
892
|
+
a.value ? "bg-slate-100" : "bg-white"
|
|
893
|
+
])
|
|
797
894
|
}, null, 2),
|
|
798
|
-
|
|
895
|
+
i("input", z(n.value, {
|
|
896
|
+
checked: e.modelValue,
|
|
799
897
|
class: "hidden",
|
|
800
898
|
value: "1",
|
|
801
899
|
type: "checkbox",
|
|
802
|
-
onChange:
|
|
803
|
-
}
|
|
804
|
-
], 10,
|
|
900
|
+
onChange: c[0] || (c[0] = (s) => l("update:modelValue", s.target.checked))
|
|
901
|
+
}), null, 16, It)
|
|
902
|
+
], 10, Bt)
|
|
805
903
|
], 2),
|
|
806
|
-
|
|
904
|
+
A(t.$slots, "default")
|
|
807
905
|
], 64));
|
|
808
906
|
}
|
|
809
|
-
},
|
|
810
|
-
const
|
|
907
|
+
}, xe = (e, d) => {
|
|
908
|
+
const l = e.__vccOpts || e;
|
|
811
909
|
for (const [n, a] of d)
|
|
812
|
-
|
|
813
|
-
return
|
|
814
|
-
},
|
|
910
|
+
l[n] = a;
|
|
911
|
+
return l;
|
|
912
|
+
}, Pt = (e) => (Ae("data-v-62f8007a"), e = e(), _e(), e), Lt = {
|
|
815
913
|
"aria-live": "assertive",
|
|
816
914
|
class: "flex fixed inset-0 z-50 items-start py-6 px-4 pointer-events-none sm:p-6"
|
|
817
|
-
},
|
|
915
|
+
}, Ft = { class: "flex flex-col items-center space-y-4 w-full" }, Ot = { class: "p-4" }, Tt = { class: "flex items-start" }, zt = { class: "flex-shrink-0" }, jt = { class: "flex-1 pt-0.5 ml-3 w-0" }, Nt = { class: "font-bold" }, Yt = { class: "mt-1" }, Et = { class: "flex flex-shrink-0 ml-4" }, Rt = /* @__PURE__ */ Pt(() => /* @__PURE__ */ i("span", { class: "sr-only" }, "Close", -1)), Ht = /* @__PURE__ */ Object.assign({
|
|
818
916
|
inheritAttrs: !1
|
|
819
917
|
}, {
|
|
820
918
|
__name: "message-toast",
|
|
@@ -826,43 +924,43 @@ const ht = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, pt
|
|
|
826
924
|
},
|
|
827
925
|
emits: ["timeout", "close"],
|
|
828
926
|
setup(e, { emit: d }) {
|
|
829
|
-
const
|
|
830
|
-
window.clearTimeout(a.value),
|
|
927
|
+
const l = e, n = d, a = w(null), t = D(() => typeof l.message == "string" ? [l.message] : l.message), c = () => {
|
|
928
|
+
window.clearTimeout(a.value), l.active && l.timeout && (a.value = window.setTimeout(() => {
|
|
831
929
|
n("timeout");
|
|
832
|
-
},
|
|
930
|
+
}, l.timeout));
|
|
833
931
|
};
|
|
834
|
-
return
|
|
835
|
-
|
|
836
|
-
|
|
932
|
+
return W(() => l.active, c), ie(c), (s, o) => (u(), v("div", Lt, [
|
|
933
|
+
i("div", Ft, [
|
|
934
|
+
j(re, { name: "messagetoast-fade" }, {
|
|
837
935
|
default: Q(() => [
|
|
838
936
|
e.active ? (u(), v("div", {
|
|
839
937
|
key: 0,
|
|
840
|
-
class:
|
|
938
|
+
class: k(["overflow-hidden w-full max-w-sm rounded-md ring-1 ring-black ring-opacity-5 shadow-lg pointer-events-auto", s.$attrs.class])
|
|
841
939
|
}, [
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
940
|
+
i("div", Ot, [
|
|
941
|
+
i("div", Tt, [
|
|
942
|
+
i("div", zt, [
|
|
943
|
+
A(s.$slots, "icon", {}, void 0, !0)
|
|
846
944
|
]),
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
945
|
+
i("div", jt, [
|
|
946
|
+
i("p", Nt, [
|
|
947
|
+
A(s.$slots, "title", {}, () => [
|
|
948
|
+
E(M(e.title), 1)
|
|
851
949
|
], !0)
|
|
852
950
|
]),
|
|
853
|
-
(u(!0), v(
|
|
854
|
-
|
|
855
|
-
|
|
951
|
+
(u(!0), v(B, null, T(t.value, (f) => (u(), v("p", Yt, [
|
|
952
|
+
A(s.$slots, "default", {}, () => [
|
|
953
|
+
E(M(f), 1)
|
|
856
954
|
], !0)
|
|
857
955
|
]))), 256))
|
|
858
956
|
]),
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
onClick: o[0] || (o[0] = (
|
|
957
|
+
i("div", Et, [
|
|
958
|
+
i("button", {
|
|
959
|
+
onClick: o[0] || (o[0] = (f) => n("close")),
|
|
862
960
|
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"
|
|
863
961
|
}, [
|
|
864
|
-
|
|
865
|
-
|
|
962
|
+
Rt,
|
|
963
|
+
j(S(he), { class: "size-5" })
|
|
866
964
|
])
|
|
867
965
|
])
|
|
868
966
|
])
|
|
@@ -874,14 +972,14 @@ const ht = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, pt
|
|
|
874
972
|
])
|
|
875
973
|
]));
|
|
876
974
|
}
|
|
877
|
-
}),
|
|
975
|
+
}), Vl = /* @__PURE__ */ xe(Ht, [["__scopeId", "data-v-62f8007a"]]), Ut = {
|
|
878
976
|
key: 0,
|
|
879
977
|
class: "fixed inset-0 z-[9998] bg-white/50 backdrop-blur-sm",
|
|
880
978
|
"aria-hidden": "true"
|
|
881
|
-
},
|
|
979
|
+
}, Wt = {
|
|
882
980
|
key: 0,
|
|
883
981
|
class: "fixed inset-0 z-[9999]"
|
|
884
|
-
},
|
|
982
|
+
}, Zt = { class: "flex justify-center items-center h-screen" }, Dl = {
|
|
885
983
|
__name: "modal",
|
|
886
984
|
props: {
|
|
887
985
|
show: Boolean,
|
|
@@ -891,27 +989,27 @@ const ht = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, pt
|
|
|
891
989
|
},
|
|
892
990
|
emits: ["clicked-outside"],
|
|
893
991
|
setup(e, { emit: d }) {
|
|
894
|
-
const
|
|
895
|
-
return ce(n, () =>
|
|
896
|
-
e.show ? (u(), v("div",
|
|
897
|
-
|
|
992
|
+
const l = d, n = w(null);
|
|
993
|
+
return ce(n, () => l("clicked-outside")), (a, t) => (u(), v(B, null, [
|
|
994
|
+
e.show ? (u(), v("div", Ut)) : _("", !0),
|
|
995
|
+
j(re, { name: "appear" }, {
|
|
898
996
|
default: Q(() => [
|
|
899
|
-
e.show ? (u(), v("div",
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
class:
|
|
997
|
+
e.show ? (u(), v("div", Wt, [
|
|
998
|
+
i("div", Zt, [
|
|
999
|
+
i("div", {
|
|
1000
|
+
class: k(["overflow-hidden relative max-w-full bg-white rounded ring-1 ring-black ring-opacity-10 shadow-xl transition-all transform xl:max-w-screen-xl", e.containerClass]),
|
|
903
1001
|
ref_key: "container",
|
|
904
1002
|
ref: n
|
|
905
1003
|
}, [
|
|
906
|
-
|
|
907
|
-
class:
|
|
1004
|
+
i("div", {
|
|
1005
|
+
class: k(e.headerClass)
|
|
908
1006
|
}, [
|
|
909
|
-
|
|
1007
|
+
A(a.$slots, "title")
|
|
910
1008
|
], 2),
|
|
911
|
-
|
|
912
|
-
class:
|
|
1009
|
+
i("div", {
|
|
1010
|
+
class: k(["overflow-y-auto h-full pb-4 mt-16", e.contentClass])
|
|
913
1011
|
}, [
|
|
914
|
-
|
|
1012
|
+
A(a.$slots, "default")
|
|
915
1013
|
], 2)
|
|
916
1014
|
], 2)
|
|
917
1015
|
])
|
|
@@ -921,7 +1019,7 @@ const ht = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, pt
|
|
|
921
1019
|
})
|
|
922
1020
|
], 64));
|
|
923
1021
|
}
|
|
924
|
-
},
|
|
1022
|
+
}, Kt = { class: "flex justify-between items-center px-4 sm:px-0" }, qt = { class: "flex flex-1 -mt-px w-0" }, Gt = { class: "hidden md:flex md:-mt-px" }, Xt = { class: "flex flex-1 justify-end -mt-px w-0" }, Al = {
|
|
925
1023
|
__name: "pagination",
|
|
926
1024
|
props: {
|
|
927
1025
|
page: { type: Number, default: 1 },
|
|
@@ -947,67 +1045,67 @@ const ht = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, pt
|
|
|
947
1045
|
},
|
|
948
1046
|
emits: ["update:page"],
|
|
949
1047
|
setup(e, { emit: d }) {
|
|
950
|
-
const
|
|
951
|
-
let
|
|
1048
|
+
const l = d, n = e, a = w(Math.ceil(n.total / n.perPage)), t = w(null), c = D(() => (n.markerPosition === "above" ? "border-t-2 -mt-[2px]" : "border-b-2 -mb-[2px]") + " py-4"), s = D(() => {
|
|
1049
|
+
let r = [1];
|
|
952
1050
|
if (n.showAllPages || a.value <= 7) {
|
|
953
|
-
for (let
|
|
954
|
-
|
|
955
|
-
return
|
|
1051
|
+
for (let h = 2; h <= a.value; ++h)
|
|
1052
|
+
r.push(h);
|
|
1053
|
+
return r;
|
|
956
1054
|
}
|
|
957
|
-
return
|
|
1055
|
+
return t.value >= a.value ? r.push("dots", t.value - 2, t.value - 1) : t.value - 1 && t.value - 1 > 1 && (t.value > 1 && r.push("dots"), r.push(t.value - 1)), t.value > 1 && r.push(t.value), t.value + 1 < a.value && (r.push(t.value + 1), t.value <= 1 && r.push(t.value + 2), t.value + 2 < a.value && r.push("dots")), t.value < a.value && r.push(a.value), r;
|
|
958
1056
|
}), o = () => {
|
|
959
|
-
|
|
960
|
-
},
|
|
961
|
-
|
|
1057
|
+
t.value > 1 && l("update:page", t.value - 1);
|
|
1058
|
+
}, f = () => {
|
|
1059
|
+
t.value < a.value && l("update:page", t.value + 1);
|
|
962
1060
|
};
|
|
963
|
-
return
|
|
964
|
-
a.value = Math.ceil(n.total / n.perPage),
|
|
965
|
-
}),
|
|
966
|
-
a.value = Math.ceil(n.total / n.perPage),
|
|
967
|
-
}), (
|
|
968
|
-
|
|
1061
|
+
return W(() => n.page, (r) => t.value = Math.min(Math.max(r, 1), a.value), { immediate: !0 }), W(() => n.perPage, (r) => {
|
|
1062
|
+
a.value = Math.ceil(n.total / n.perPage), l("update:page", 1);
|
|
1063
|
+
}), W(() => n.total, (r) => {
|
|
1064
|
+
a.value = Math.ceil(n.total / n.perPage), t.value > a.value && l("update:page", 1);
|
|
1065
|
+
}), (r, h) => (u(), v("nav", Kt, [
|
|
1066
|
+
i("div", qt, [
|
|
969
1067
|
e.showNavButtons ? (u(), v("a", {
|
|
970
1068
|
key: 0,
|
|
971
|
-
onClick:
|
|
1069
|
+
onClick: L(o, ["prevent"]),
|
|
972
1070
|
href: "#",
|
|
973
|
-
class:
|
|
1071
|
+
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 }, c.value]])
|
|
974
1072
|
}, [
|
|
975
|
-
|
|
976
|
-
|
|
1073
|
+
j(S(oe), { class: "size-5" }),
|
|
1074
|
+
E(" " + M(e.prevText), 1)
|
|
977
1075
|
], 2)) : _("", !0)
|
|
978
1076
|
]),
|
|
979
|
-
|
|
980
|
-
(u(!0), v(
|
|
981
|
-
onClick:
|
|
982
|
-
key:
|
|
983
|
-
href:
|
|
984
|
-
class:
|
|
985
|
-
"border-vxvue-500 text-vxvue-700":
|
|
986
|
-
"border-transparent text-gray-500":
|
|
987
|
-
"hover:text-gray-700 hover:border-gray-300":
|
|
1077
|
+
i("div", Gt, [
|
|
1078
|
+
(u(!0), v(B, null, T(s.value, (m, b) => (u(), R(le(m !== "dots" ? "a" : "span"), {
|
|
1079
|
+
onClick: L((x) => m !== "dots" ? l("update:page", m) : null, ["prevent"]),
|
|
1080
|
+
key: b,
|
|
1081
|
+
href: m !== "dots" ? "#" : null,
|
|
1082
|
+
class: k(["inline-flex items-center px-4 text-sm font-medium", [{
|
|
1083
|
+
"border-vxvue-500 text-vxvue-700": m === t.value,
|
|
1084
|
+
"border-transparent text-gray-500": m !== t.value,
|
|
1085
|
+
"hover:text-gray-700 hover:border-gray-300": m !== "dots"
|
|
988
1086
|
}, c.value]])
|
|
989
1087
|
}, {
|
|
990
1088
|
default: Q(() => [
|
|
991
|
-
|
|
1089
|
+
E(M(m !== "dots" ? m : "..."), 1)
|
|
992
1090
|
]),
|
|
993
1091
|
_: 2
|
|
994
1092
|
}, 1032, ["onClick", "href", "class"]))), 128))
|
|
995
1093
|
]),
|
|
996
|
-
|
|
1094
|
+
i("div", Xt, [
|
|
997
1095
|
e.showNavButtons ? (u(), v("a", {
|
|
998
1096
|
key: 0,
|
|
999
|
-
onClick:
|
|
1097
|
+
onClick: L(f, ["prevent"]),
|
|
1000
1098
|
href: "#",
|
|
1001
|
-
class:
|
|
1099
|
+
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", [c.value, { "cursor-default pointer-events-none": t.value >= a.value }]])
|
|
1002
1100
|
}, [
|
|
1003
|
-
|
|
1004
|
-
|
|
1101
|
+
E(M(e.nextText) + " ", 1),
|
|
1102
|
+
j(S(te), { class: "size-5" })
|
|
1005
1103
|
], 2)) : _("", !0)
|
|
1006
1104
|
])
|
|
1007
1105
|
]));
|
|
1008
1106
|
}
|
|
1009
1107
|
};
|
|
1010
|
-
function
|
|
1108
|
+
function Jt(e, d) {
|
|
1011
1109
|
return u(), v("svg", {
|
|
1012
1110
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1013
1111
|
fill: "none",
|
|
@@ -1017,14 +1115,14 @@ function Zt(e, d) {
|
|
|
1017
1115
|
"aria-hidden": "true",
|
|
1018
1116
|
"data-slot": "icon"
|
|
1019
1117
|
}, [
|
|
1020
|
-
|
|
1118
|
+
i("path", {
|
|
1021
1119
|
"stroke-linecap": "round",
|
|
1022
1120
|
"stroke-linejoin": "round",
|
|
1023
1121
|
d: "M3.98 8.223A10.477 10.477 0 0 0 1.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.451 10.451 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.522 10.522 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88"
|
|
1024
1122
|
})
|
|
1025
1123
|
]);
|
|
1026
1124
|
}
|
|
1027
|
-
function
|
|
1125
|
+
function Qt(e, d) {
|
|
1028
1126
|
return u(), v("svg", {
|
|
1029
1127
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1030
1128
|
fill: "none",
|
|
@@ -1034,105 +1132,105 @@ function qt(e, d) {
|
|
|
1034
1132
|
"aria-hidden": "true",
|
|
1035
1133
|
"data-slot": "icon"
|
|
1036
1134
|
}, [
|
|
1037
|
-
|
|
1135
|
+
i("path", {
|
|
1038
1136
|
"stroke-linecap": "round",
|
|
1039
1137
|
"stroke-linejoin": "round",
|
|
1040
1138
|
d: "M2.036 12.322a1.012 1.012 0 0 1 0-.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"
|
|
1041
1139
|
}),
|
|
1042
|
-
|
|
1140
|
+
i("path", {
|
|
1043
1141
|
"stroke-linecap": "round",
|
|
1044
1142
|
"stroke-linejoin": "round",
|
|
1045
1143
|
d: "M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"
|
|
1046
1144
|
})
|
|
1047
1145
|
]);
|
|
1048
1146
|
}
|
|
1049
|
-
const
|
|
1147
|
+
const el = ["value", "type"], _l = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
1050
1148
|
__name: "password-input",
|
|
1051
1149
|
props: ["modelValue"],
|
|
1052
1150
|
emits: ["update:modelValue"],
|
|
1053
1151
|
setup(e, { emit: d }) {
|
|
1054
|
-
const
|
|
1055
|
-
let
|
|
1056
|
-
return delete
|
|
1152
|
+
const l = d, n = w(!1), a = D(() => {
|
|
1153
|
+
let t = Object.assign({}, U());
|
|
1154
|
+
return delete t.class, t;
|
|
1057
1155
|
});
|
|
1058
|
-
return (
|
|
1059
|
-
class:
|
|
1156
|
+
return (t, c) => (u(), v("div", {
|
|
1157
|
+
class: k("inline-block relative " + U().class)
|
|
1060
1158
|
}, [
|
|
1061
|
-
|
|
1159
|
+
i("input", z({
|
|
1062
1160
|
value: e.modelValue,
|
|
1063
1161
|
type: n.value ? "text" : "password",
|
|
1064
|
-
onInput: c[0] || (c[0] = (s) =>
|
|
1065
|
-
}, a.value, { class: "block pr-
|
|
1066
|
-
|
|
1067
|
-
class: "flex absolute inset-y-0 right-0 items-center
|
|
1162
|
+
onInput: c[0] || (c[0] = (s) => l("update:modelValue", s.target.value))
|
|
1163
|
+
}, a.value, { class: "block pr-12 w-full form-input peer" }), null, 16, el),
|
|
1164
|
+
i("button", {
|
|
1165
|
+
class: "flex absolute inset-y-0 right-0 items-center px-3 text-brand-700 hover:text-brand",
|
|
1068
1166
|
"aria-label": "show-password-toggle",
|
|
1069
|
-
onClick: c[1] || (c[1] =
|
|
1167
|
+
onClick: c[1] || (c[1] = L((s) => n.value = !n.value, ["stop"]))
|
|
1070
1168
|
}, [
|
|
1071
|
-
n.value ? (u(),
|
|
1169
|
+
n.value ? (u(), R(S(Jt), {
|
|
1072
1170
|
key: 0,
|
|
1073
1171
|
class: "size-5"
|
|
1074
|
-
})) : (u(),
|
|
1172
|
+
})) : (u(), R(S(Qt), {
|
|
1075
1173
|
key: 1,
|
|
1076
1174
|
class: "size-5"
|
|
1077
1175
|
}))
|
|
1078
1176
|
]),
|
|
1079
|
-
|
|
1177
|
+
A(t.$slots, "default")
|
|
1080
1178
|
], 2));
|
|
1081
1179
|
}
|
|
1082
|
-
}),
|
|
1180
|
+
}), tl = { class: "flex items-center pb-1" }, ll = ["id", "checked"], al = ["for"], sl = { key: 1 }, nl = ["href"], ol = {
|
|
1083
1181
|
key: 0,
|
|
1084
1182
|
class: "ml-6"
|
|
1085
|
-
},
|
|
1183
|
+
}, Bl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
1086
1184
|
__name: "simple-tree",
|
|
1087
1185
|
props: { branch: { type: Object, default: {} } },
|
|
1088
1186
|
emits: ["branch-selected", "expand"],
|
|
1089
1187
|
setup(e, { emit: d }) {
|
|
1090
|
-
const
|
|
1091
|
-
return
|
|
1092
|
-
|
|
1093
|
-
}), (
|
|
1094
|
-
const s =
|
|
1188
|
+
const l = e, n = d, a = w(!1);
|
|
1189
|
+
return ie(() => {
|
|
1190
|
+
l.branch.current && n("expand", !0);
|
|
1191
|
+
}), (t, c) => {
|
|
1192
|
+
const s = Be("simple-tree", !0);
|
|
1095
1193
|
return u(), v("div", {
|
|
1096
|
-
class:
|
|
1194
|
+
class: k([!e.branch.branches || !e.branch.branches.length ? "terminates" : "", t.$attrs.class])
|
|
1097
1195
|
}, [
|
|
1098
|
-
|
|
1099
|
-
e.branch.branches && e.branch.branches.length ? (u(), v(
|
|
1100
|
-
|
|
1196
|
+
i("div", tl, [
|
|
1197
|
+
e.branch.branches && e.branch.branches.length ? (u(), v(B, { key: 0 }, [
|
|
1198
|
+
i("input", {
|
|
1101
1199
|
type: "checkbox",
|
|
1102
1200
|
id: "branch-" + e.branch.id,
|
|
1103
1201
|
onClick: c[0] || (c[0] = (o) => a.value = !a.value),
|
|
1104
1202
|
checked: a.value,
|
|
1105
1203
|
class: "hidden"
|
|
1106
|
-
}, null, 8,
|
|
1107
|
-
|
|
1204
|
+
}, null, 8, ll),
|
|
1205
|
+
i("label", {
|
|
1108
1206
|
for: "branch-" + e.branch.id,
|
|
1109
1207
|
class: "mr-2"
|
|
1110
1208
|
}, [
|
|
1111
|
-
(u(),
|
|
1112
|
-
], 8,
|
|
1209
|
+
(u(), R(le(a.value ? S(Te) : S(ze)), { class: "w-4 h-4 border" }))
|
|
1210
|
+
], 8, al)
|
|
1113
1211
|
], 64)) : _("", !0),
|
|
1114
|
-
e.branch.current ? (u(), v("strong",
|
|
1212
|
+
e.branch.current ? (u(), v("strong", sl, M(e.branch.label), 1)) : (u(), v("a", {
|
|
1115
1213
|
key: 2,
|
|
1116
1214
|
href: e.branch.path,
|
|
1117
|
-
onClick: c[1] || (c[1] =
|
|
1118
|
-
},
|
|
1215
|
+
onClick: c[1] || (c[1] = L((o) => n("branch-selected", e.branch), ["prevent"]))
|
|
1216
|
+
}, M(e.branch.label), 9, nl))
|
|
1119
1217
|
]),
|
|
1120
|
-
e.branch.branches && e.branch.branches.length ?
|
|
1121
|
-
(u(!0), v(
|
|
1218
|
+
e.branch.branches && e.branch.branches.length ? me((u(), v("ul", ol, [
|
|
1219
|
+
(u(!0), v(B, null, T(e.branch.branches, (o) => (u(), R(s, {
|
|
1122
1220
|
branch: o,
|
|
1123
1221
|
key: o.id,
|
|
1124
|
-
onBranchSelected: c[2] || (c[2] = (
|
|
1125
|
-
onExpand: c[3] || (c[3] = (
|
|
1126
|
-
a.value =
|
|
1222
|
+
onBranchSelected: c[2] || (c[2] = (f) => n("branch-selected", f)),
|
|
1223
|
+
onExpand: c[3] || (c[3] = (f) => {
|
|
1224
|
+
a.value = f, n("expand", f);
|
|
1127
1225
|
})
|
|
1128
1226
|
}, null, 8, ["branch"]))), 128))
|
|
1129
1227
|
], 512)), [
|
|
1130
|
-
[
|
|
1228
|
+
[Ie, a.value]
|
|
1131
1229
|
]) : _("", !0)
|
|
1132
1230
|
], 2);
|
|
1133
1231
|
};
|
|
1134
1232
|
}
|
|
1135
|
-
}),
|
|
1233
|
+
}), rl = ["aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext"], ul = ["id"], il = ["id", "aria-label"], Il = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
1136
1234
|
__name: "slider",
|
|
1137
1235
|
props: {
|
|
1138
1236
|
min: { type: Number, default: 0 },
|
|
@@ -1145,119 +1243,119 @@ const Kt = ["value", "type"], $l = /* @__PURE__ */ Object.assign({ inheritAttrs:
|
|
|
1145
1243
|
},
|
|
1146
1244
|
emits: ["update:modelValue"],
|
|
1147
1245
|
setup(e, { emit: d }) {
|
|
1148
|
-
const
|
|
1246
|
+
const l = e, n = d, a = U(), t = { x: null, y: null }, c = { w: null, h: null };
|
|
1149
1247
|
let s = !1;
|
|
1150
|
-
const o =
|
|
1151
|
-
const
|
|
1152
|
-
return
|
|
1153
|
-
}),
|
|
1154
|
-
if (
|
|
1155
|
-
const
|
|
1156
|
-
return
|
|
1248
|
+
const o = w(null), f = w(0), r = D(() => {
|
|
1249
|
+
const g = l.max, p = l.min;
|
|
1250
|
+
return l.modelValue instanceof Array ? l.modelValue.map((V) => (Math.max(Math.min(V, g), p) - p) * 100 / (g - p)) : (Math.max(Math.min(l.modelValue, g), p) - p) * 100 / (g - p);
|
|
1251
|
+
}), h = D(() => {
|
|
1252
|
+
if (l.modelValue instanceof Array) {
|
|
1253
|
+
const g = Math.min(...r.value) + "%", p = Math.max(...r.value) - Math.min(...r.value) + "%";
|
|
1254
|
+
return l.vertical ? { bottom: g, height: p } : { left: g, width: p };
|
|
1157
1255
|
}
|
|
1158
|
-
return
|
|
1159
|
-
}),
|
|
1160
|
-
class: (
|
|
1256
|
+
return l.vertical ? { bottom: 0, height: r.value + "%" } : { width: r.value + "%" };
|
|
1257
|
+
}), m = w({
|
|
1258
|
+
class: (l.vertical ? "left-0 -translate-x-1.5 translate-y-2.5" : "top-0 -translate-x-2.5 -translate-y-1.5") + " touch-none absolute size-5 rounded-full border-2 bg-white transition-colors duration-200 " + (l.disabled ? "" : " focus:ring-4 focus:outline-none border-vxvue cursor-grab hover:bg-vxvue focus:ring-vxvue/50"),
|
|
1161
1259
|
tabindex: 0
|
|
1162
|
-
}),
|
|
1163
|
-
let
|
|
1164
|
-
if (
|
|
1165
|
-
let
|
|
1166
|
-
|
|
1260
|
+
}), b = (g) => {
|
|
1261
|
+
let p = parseFloat(g.toFixed(10));
|
|
1262
|
+
if (p = Math.min(l.max, Math.max(l.min, p)), l.modelValue instanceof Array) {
|
|
1263
|
+
let V = [...l.modelValue];
|
|
1264
|
+
V[f.value] = p, n("update:modelValue", V);
|
|
1167
1265
|
} else
|
|
1168
|
-
n("update:modelValue",
|
|
1169
|
-
},
|
|
1170
|
-
const { pageX:
|
|
1171
|
-
|
|
1266
|
+
n("update:modelValue", p);
|
|
1267
|
+
}, x = (g) => {
|
|
1268
|
+
const { pageX: p, pageY: V } = g.touches ? g.touches[0] : g, F = l.vertical ? (-V + t.y) / c.h : (p - t.x) / c.w;
|
|
1269
|
+
b(Math.floor((l.max - l.min) * F + l.min));
|
|
1172
1270
|
}, I = () => {
|
|
1173
|
-
const { clientLeft:
|
|
1174
|
-
|
|
1175
|
-
},
|
|
1176
|
-
s && (
|
|
1177
|
-
},
|
|
1178
|
-
|
|
1179
|
-
},
|
|
1180
|
-
s && (s = !1, document.removeEventListener("mousemove",
|
|
1181
|
-
}, q = (
|
|
1182
|
-
|
|
1183
|
-
const
|
|
1184
|
-
switch (
|
|
1271
|
+
const { clientLeft: g, clientTop: p, scrollLeft: V, scrollTop: F } = document.documentElement, N = o.value.getBoundingClientRect();
|
|
1272
|
+
t.x = N.left + V - g, t.y = N.bottom + F - p, c.w = o.value.offsetWidth, c.h = o.value.offsetHeight;
|
|
1273
|
+
}, P = (g) => {
|
|
1274
|
+
s && (g.preventDefault(), x(g));
|
|
1275
|
+
}, O = (g) => {
|
|
1276
|
+
g.preventDefault(), g.currentTarget.focus(), I(), s = !0, document.addEventListener("mousemove", P), document.addEventListener("mouseup", Z);
|
|
1277
|
+
}, Z = () => {
|
|
1278
|
+
s && (s = !1, document.removeEventListener("mousemove", P), document.removeEventListener("mouseup", Z));
|
|
1279
|
+
}, q = (g) => {
|
|
1280
|
+
g.keyCode >= 33 && g.keyCode <= 40 && g.preventDefault();
|
|
1281
|
+
const p = l.modelValue[f.value] ?? l.modelValue;
|
|
1282
|
+
switch (g.keyCode) {
|
|
1185
1283
|
case 37:
|
|
1186
1284
|
case 40:
|
|
1187
|
-
|
|
1285
|
+
b(p - 1);
|
|
1188
1286
|
break;
|
|
1189
1287
|
case 39:
|
|
1190
1288
|
case 38:
|
|
1191
|
-
|
|
1289
|
+
b(p + 1);
|
|
1192
1290
|
break;
|
|
1193
1291
|
case 33:
|
|
1194
|
-
|
|
1292
|
+
b(p + (l.max - l.min) / 10);
|
|
1195
1293
|
break;
|
|
1196
1294
|
case 34:
|
|
1197
|
-
|
|
1295
|
+
b(p - (l.max - l.min) / 10);
|
|
1198
1296
|
break;
|
|
1199
1297
|
case 36:
|
|
1200
|
-
|
|
1298
|
+
b(l.min);
|
|
1201
1299
|
break;
|
|
1202
1300
|
case 35:
|
|
1203
|
-
|
|
1301
|
+
b(l.max);
|
|
1204
1302
|
}
|
|
1205
|
-
},
|
|
1206
|
-
I(),
|
|
1303
|
+
}, y = (g) => {
|
|
1304
|
+
I(), x(g);
|
|
1207
1305
|
};
|
|
1208
|
-
return (
|
|
1306
|
+
return (g, p) => (u(), v("div", z({
|
|
1209
1307
|
class: ["relative bg-slate-300", e.vertical ? "h-full w-2 rounded-t-full rounded-b-full" : "w-full h-2 rounded-r-full rounded-l-full"],
|
|
1210
1308
|
ref_key: "track",
|
|
1211
1309
|
ref: o,
|
|
1212
1310
|
role: "slider",
|
|
1213
1311
|
"aria-label": "slider-thumb",
|
|
1214
1312
|
"aria-valuemin": e.min,
|
|
1215
|
-
"aria-valuemax":
|
|
1313
|
+
"aria-valuemax": l.max,
|
|
1216
1314
|
"aria-valuenow": e.modelValue[0] ?? e.modelValue,
|
|
1217
1315
|
"aria-valuetext": e.modelValue
|
|
1218
|
-
},
|
|
1219
|
-
click:
|
|
1316
|
+
}, se(e.disabled ? {} : {
|
|
1317
|
+
click: y
|
|
1220
1318
|
}, !0)), [
|
|
1221
1319
|
e.disabled ? _("", !0) : (u(), v("div", {
|
|
1222
1320
|
key: 0,
|
|
1223
|
-
class:
|
|
1224
|
-
style:
|
|
1321
|
+
class: k(["absolute bg-vxvue", e.vertical ? "w-full rounded-t-full rounded-b-full" : "h-full rounded-r-full rounded-l-full"]),
|
|
1322
|
+
style: Pe(h.value)
|
|
1225
1323
|
}, null, 6)),
|
|
1226
|
-
e.modelValue.length ? (u(!0), v(
|
|
1227
|
-
id:
|
|
1228
|
-
style: e.vertical ? { bottom:
|
|
1229
|
-
"aria-label": "slider-thumb-" + (
|
|
1230
|
-
},
|
|
1231
|
-
focus: () =>
|
|
1324
|
+
e.modelValue.length ? (u(!0), v(B, { key: 2 }, T(e.modelValue, (V, F) => (u(), v("button", z({
|
|
1325
|
+
id: F ? null : S(a).id,
|
|
1326
|
+
style: e.vertical ? { bottom: r.value[F] + "%" } : { left: r.value[F] + "%" },
|
|
1327
|
+
"aria-label": "slider-thumb-" + (F + 1)
|
|
1328
|
+
}, se(e.disabled ? {} : {
|
|
1329
|
+
focus: () => f.value = F,
|
|
1232
1330
|
keydown: q,
|
|
1233
|
-
mousedown: (
|
|
1234
|
-
|
|
1331
|
+
mousedown: (N) => {
|
|
1332
|
+
f.value = F, O(N);
|
|
1235
1333
|
},
|
|
1236
|
-
touchstart: (
|
|
1237
|
-
|
|
1334
|
+
touchstart: (N) => {
|
|
1335
|
+
f.value = F, O(N);
|
|
1238
1336
|
},
|
|
1239
|
-
touchmove:
|
|
1240
|
-
touchend:
|
|
1241
|
-
}, !0),
|
|
1337
|
+
touchmove: P,
|
|
1338
|
+
touchend: Z
|
|
1339
|
+
}, !0), m.value), null, 16, il))), 256)) : (u(), v("button", z({
|
|
1242
1340
|
key: 1,
|
|
1243
|
-
id:
|
|
1244
|
-
style: e.vertical ? { bottom:
|
|
1341
|
+
id: S(a).id,
|
|
1342
|
+
style: e.vertical ? { bottom: r.value + "%" } : { left: r.value + "%" },
|
|
1245
1343
|
"aria-label": "slider-thumb"
|
|
1246
|
-
},
|
|
1247
|
-
focus: () =>
|
|
1344
|
+
}, se(e.disabled ? {} : {
|
|
1345
|
+
focus: () => f.value = 0,
|
|
1248
1346
|
keydown: q,
|
|
1249
|
-
mousedown: (
|
|
1250
|
-
|
|
1347
|
+
mousedown: (V) => {
|
|
1348
|
+
f.value = 0, O(V);
|
|
1251
1349
|
},
|
|
1252
|
-
touchstart: (
|
|
1253
|
-
|
|
1350
|
+
touchstart: (V) => {
|
|
1351
|
+
f.value = 0, O(V);
|
|
1254
1352
|
},
|
|
1255
|
-
touchmove:
|
|
1256
|
-
touchend:
|
|
1257
|
-
}, !0),
|
|
1258
|
-
], 16,
|
|
1353
|
+
touchmove: P,
|
|
1354
|
+
touchend: Z
|
|
1355
|
+
}, !0), m.value), null, 16, ul))
|
|
1356
|
+
], 16, rl));
|
|
1259
1357
|
}
|
|
1260
|
-
}),
|
|
1358
|
+
}), cl = { class: "text-white bg-slate-700" }, dl = ["onClick"], vl = { class: "flex items-center space-x-1" }, fl = {
|
|
1261
1359
|
__name: "sortable",
|
|
1262
1360
|
props: {
|
|
1263
1361
|
columns: {
|
|
@@ -1279,62 +1377,62 @@ const Kt = ["value", "type"], $l = /* @__PURE__ */ Object.assign({ inheritAttrs:
|
|
|
1279
1377
|
},
|
|
1280
1378
|
emits: ["before-sort", "after-sort"],
|
|
1281
1379
|
setup(e, { emit: d }) {
|
|
1282
|
-
const
|
|
1283
|
-
let o =
|
|
1284
|
-
const
|
|
1285
|
-
return
|
|
1380
|
+
const l = e, n = d, a = w(l.sortProp), t = w(l.sortDirection), c = D(() => {
|
|
1381
|
+
let o = l.rows.slice();
|
|
1382
|
+
const f = l.columns.find(({ prop: r }) => r === a.value);
|
|
1383
|
+
return f && (t.value === "asc" && f.sortAscFunction ? o.sort(f.sortAscFunction) : t.value === "desc" && f.sortDescFunction ? o.sort(f.sortDescFunction) : o.sort((r, h) => r[a.value] < h[a.value] ? t.value === "asc" ? -1 : 1 : r[a.value] > h[a.value] ? t.value === "asc" ? 1 : -1 : 0)), o.slice(l.offset || 0, (l.offset || 0) + (l.count || o.length));
|
|
1286
1384
|
}), s = (o) => {
|
|
1287
|
-
n("before-sort", { prop: a.value, dir:
|
|
1385
|
+
n("before-sort", { prop: a.value, dir: t.value }), a.value === o ? t.value = t.value === "asc" ? "desc" : "asc" : (a.value = o, t.value = t.value || "asc"), ue(() => n("after-sort", { prop: a.value, dir: t.value }));
|
|
1288
1386
|
};
|
|
1289
|
-
return (o,
|
|
1290
|
-
class:
|
|
1387
|
+
return (o, f) => (u(), v("table", {
|
|
1388
|
+
class: k(o.$attrs.class || "w-full divide-y divide-y-slate-900 table-fixed")
|
|
1291
1389
|
}, [
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
(u(!0), v(
|
|
1390
|
+
i("thead", cl, [
|
|
1391
|
+
i("tr", null, [
|
|
1392
|
+
(u(!0), v(B, null, T(e.columns, (r) => (u(), v("th", {
|
|
1295
1393
|
scope: "col",
|
|
1296
|
-
class:
|
|
1297
|
-
{ "cursor-pointer":
|
|
1298
|
-
|
|
1394
|
+
class: k(["py-3 px-6 text-left", [
|
|
1395
|
+
{ "cursor-pointer": r.sortable, active: a.value === r.prop },
|
|
1396
|
+
r.cssClass
|
|
1299
1397
|
]]),
|
|
1300
|
-
onClick: (
|
|
1398
|
+
onClick: (h) => r.sortable ? s(r.prop) : null
|
|
1301
1399
|
}, [
|
|
1302
|
-
|
|
1303
|
-
column:
|
|
1304
|
-
sortDir:
|
|
1400
|
+
A(o.$slots, r.prop + "-header", {
|
|
1401
|
+
column: r,
|
|
1402
|
+
sortDir: t.value,
|
|
1305
1403
|
sortProp: a.value
|
|
1306
1404
|
}, () => [
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1405
|
+
i("div", vl, [
|
|
1406
|
+
i("span", null, M(r.label), 1),
|
|
1407
|
+
r.sortable ? (u(), R(le(a.value !== r.prop ? S(Fe) : t.value === "asc" ? S(Le) : S(Oe)), {
|
|
1310
1408
|
key: 0,
|
|
1311
|
-
class: "
|
|
1409
|
+
class: "size-4"
|
|
1312
1410
|
})) : _("", !0)
|
|
1313
1411
|
])
|
|
1314
1412
|
], !0)
|
|
1315
|
-
], 10,
|
|
1413
|
+
], 10, dl))), 256))
|
|
1316
1414
|
])
|
|
1317
1415
|
]),
|
|
1318
|
-
|
|
1319
|
-
(u(!0), v(
|
|
1320
|
-
key:
|
|
1321
|
-
class:
|
|
1416
|
+
i("tbody", null, [
|
|
1417
|
+
(u(!0), v(B, null, T(c.value, (r) => (u(), v("tr", {
|
|
1418
|
+
key: r[e.keyProperty],
|
|
1419
|
+
class: k(r.cssClass)
|
|
1322
1420
|
}, [
|
|
1323
|
-
(u(!0), v(
|
|
1324
|
-
class:
|
|
1421
|
+
(u(!0), v(B, null, T(e.columns, (h) => (u(), v("td", {
|
|
1422
|
+
class: k(["overflow-hidden py-3 px-6 whitespace-nowrap text-ellipsis", { active: a.value === h.prop }])
|
|
1325
1423
|
}, [
|
|
1326
|
-
|
|
1327
|
-
|
|
1424
|
+
A(o.$slots, h.prop, { row: r }, () => [
|
|
1425
|
+
E(M(r[h.prop]), 1)
|
|
1328
1426
|
], !0)
|
|
1329
1427
|
], 2))), 256))
|
|
1330
1428
|
], 2))), 128))
|
|
1331
1429
|
])
|
|
1332
1430
|
], 2));
|
|
1333
1431
|
}
|
|
1334
|
-
},
|
|
1432
|
+
}, Pl = /* @__PURE__ */ xe(fl, [["__scopeId", "data-v-7ec18969"]]), ml = { class: "sm:hidden" }, hl = { class: "hidden sm:block" }, pl = { class: "border-b border-gray-200" }, gl = {
|
|
1335
1433
|
class: "flex -mb-px space-x-8",
|
|
1336
1434
|
"aria-label": "Tabs"
|
|
1337
|
-
},
|
|
1435
|
+
}, bl = ["onClick", "aria-current"], Ll = {
|
|
1338
1436
|
__name: "tabs",
|
|
1339
1437
|
props: {
|
|
1340
1438
|
items: { type: Array, default: [] },
|
|
@@ -1342,56 +1440,56 @@ const Kt = ["value", "type"], $l = /* @__PURE__ */ Object.assign({ inheritAttrs:
|
|
|
1342
1440
|
},
|
|
1343
1441
|
emits: ["update:active-index"],
|
|
1344
1442
|
setup(e, { emit: d }) {
|
|
1345
|
-
const
|
|
1443
|
+
const l = e, n = d, a = w(l.items[l.activeIndex] || {}), t = D(() => {
|
|
1346
1444
|
let s = [];
|
|
1347
|
-
return
|
|
1348
|
-
o.disabled || s.push({ label: o.name, key:
|
|
1445
|
+
return l.items.forEach((o, f) => {
|
|
1446
|
+
o.disabled || s.push({ label: o.name, key: f });
|
|
1349
1447
|
}), s;
|
|
1350
1448
|
});
|
|
1351
|
-
|
|
1352
|
-
a.value =
|
|
1449
|
+
W(() => l.activeIndex, (s) => {
|
|
1450
|
+
a.value = l.items[s] || {};
|
|
1353
1451
|
});
|
|
1354
1452
|
const c = (s) => {
|
|
1355
|
-
s.disabled || (a.value = s, n("update:active-index",
|
|
1453
|
+
s.disabled || (a.value = s, n("update:active-index", l.items.indexOf(s)));
|
|
1356
1454
|
};
|
|
1357
|
-
return (s, o) => (u(), v(
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
options:
|
|
1455
|
+
return (s, o) => (u(), v(B, null, [
|
|
1456
|
+
i("div", ml, [
|
|
1457
|
+
j(_t, {
|
|
1458
|
+
options: t.value,
|
|
1361
1459
|
"model-value": e.activeIndex,
|
|
1362
|
-
"onUpdate:modelValue": o[0] || (o[0] = (
|
|
1460
|
+
"onUpdate:modelValue": o[0] || (o[0] = (f) => n("update:activeIndex", f)),
|
|
1363
1461
|
class: "w-full"
|
|
1364
1462
|
}, null, 8, ["options", "model-value"])
|
|
1365
1463
|
]),
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
(u(!0), v(
|
|
1370
|
-
key:
|
|
1464
|
+
i("div", hl, [
|
|
1465
|
+
i("div", pl, [
|
|
1466
|
+
i("nav", gl, [
|
|
1467
|
+
(u(!0), v(B, null, T(e.items, (f) => (u(), v("a", {
|
|
1468
|
+
key: f.name,
|
|
1371
1469
|
href: "#",
|
|
1372
|
-
onClick:
|
|
1373
|
-
class:
|
|
1374
|
-
a.value ===
|
|
1375
|
-
|
|
1470
|
+
onClick: L((r) => c(f), ["prevent"]),
|
|
1471
|
+
class: k([
|
|
1472
|
+
a.value === f ? "border-vxvue-500 text-vxvue-600" : "border-transparent text-gray-900 hover:text-gray-700 hover:border-gray-300",
|
|
1473
|
+
f.disabled ? "cursor-not-allowed text-gray-400 hover:border-transparent" : "",
|
|
1376
1474
|
"group inline-flex items-center py-4 px-1 border-b-4 font-medium"
|
|
1377
1475
|
]),
|
|
1378
|
-
"aria-current": a.value ===
|
|
1476
|
+
"aria-current": a.value === f ? "page" : void 0
|
|
1379
1477
|
}, [
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1478
|
+
A(s.$slots, "icon", { tab: f }),
|
|
1479
|
+
i("span", null, [
|
|
1480
|
+
A(s.$slots, "default", { tab: f }, () => [
|
|
1481
|
+
E(M(f.name), 1)
|
|
1384
1482
|
])
|
|
1385
1483
|
]),
|
|
1386
|
-
|
|
1484
|
+
f.badge ? (u(), v("span", {
|
|
1387
1485
|
key: 0,
|
|
1388
|
-
class:
|
|
1389
|
-
a.value ===
|
|
1390
|
-
|
|
1486
|
+
class: k([
|
|
1487
|
+
a.value === f ? "bg-vxvue-50 text-vxvue-700" : "bg-gray-200 text-gray-900",
|
|
1488
|
+
f.disabled ? "bg-gray-100 text-gray-400" : "",
|
|
1391
1489
|
"hidden ml-3 py-0.5 px-2.5 rounded-full text-xs font-medium md:inline-block"
|
|
1392
1490
|
])
|
|
1393
|
-
},
|
|
1394
|
-
], 10,
|
|
1491
|
+
}, M(f.badge), 3)) : _("", !0)
|
|
1492
|
+
], 10, bl))), 128))
|
|
1395
1493
|
])
|
|
1396
1494
|
])
|
|
1397
1495
|
])
|
|
@@ -1399,19 +1497,21 @@ const Kt = ["value", "type"], $l = /* @__PURE__ */ Object.assign({ inheritAttrs:
|
|
|
1399
1497
|
}
|
|
1400
1498
|
};
|
|
1401
1499
|
export {
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1500
|
+
yl as Accordion,
|
|
1501
|
+
wl as AccordionPanel,
|
|
1502
|
+
kl as Autocomplete,
|
|
1503
|
+
$l as Confirm,
|
|
1504
|
+
xt as DateInput,
|
|
1505
|
+
Cl as Datepicker,
|
|
1506
|
+
Sl as FormFileButton,
|
|
1507
|
+
_t as FormSelect,
|
|
1508
|
+
Ml as FormSwitch,
|
|
1509
|
+
Vl as MessageToast,
|
|
1510
|
+
Dl as Modal,
|
|
1511
|
+
Al as Pagination,
|
|
1512
|
+
_l as PasswordInput,
|
|
1513
|
+
Bl as SimpleTree,
|
|
1514
|
+
Il as Slider,
|
|
1515
|
+
Pl as Sortable,
|
|
1516
|
+
Ll as Tabs
|
|
1417
1517
|
};
|