vx-vue 0.7.9 → 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/LICENSE +21 -21
- package/README.md +169 -64
- package/dist/style.css +1 -1
- package/dist/vxvue.es.js +897 -806
- package/dist/vxvue.umd.js +1 -1
- package/package.json +40 -40
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
|
+
]);
|
|
84
|
+
}
|
|
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
|
+
]);
|
|
99
|
+
}
|
|
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;
|
|
4
214
|
}
|
|
5
|
-
function
|
|
6
|
-
return typeof e == "function" ? e() :
|
|
215
|
+
function pe(e) {
|
|
216
|
+
return typeof e == "function" ? e() : S(e);
|
|
7
217
|
}
|
|
8
|
-
const
|
|
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
|
|
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,
|
|
26
|
-
var
|
|
27
|
-
const a = e.getFullYear(),
|
|
28
|
-
Yo: () =>
|
|
235
|
+
function ve(e, d, l = {}) {
|
|
236
|
+
var n;
|
|
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
|
-
H: () => String(
|
|
40
|
-
Ho: () =>
|
|
41
|
-
HH: () => `${
|
|
42
|
-
h: () => `${
|
|
43
|
-
ho: () =>
|
|
44
|
-
hh: () => `${
|
|
249
|
+
H: () => String(s),
|
|
250
|
+
Ho: () => K(s),
|
|
251
|
+
HH: () => `${s}`.padStart(2, "0"),
|
|
252
|
+
h: () => `${s % 12 || 12}`.padStart(1, "0"),
|
|
253
|
+
ho: () => K(s % 12 || 12),
|
|
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
|
-
},
|
|
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:
|
|
98
|
-
if (!
|
|
305
|
+
let fe = !1;
|
|
306
|
+
function ce(e, d, l = {}) {
|
|
307
|
+
const { window: n = be, ignore: a = [], capture: t = !0, detectIframe: c = !1 } = l;
|
|
308
|
+
if (!n)
|
|
99
309
|
return ee;
|
|
100
|
-
|
|
101
|
-
let
|
|
102
|
-
const o = (
|
|
103
|
-
if (typeof
|
|
104
|
-
return Array.from(
|
|
310
|
+
Ue && !fe && (fe = !0, Array.from(n.document.body.children).forEach((m) => m.addEventListener("click", ee)), n.document.documentElement.addEventListener("click", ee));
|
|
311
|
+
let s = !0;
|
|
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 (
|
|
114
|
-
|
|
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) {
|
|
324
|
+
s = !0;
|
|
115
325
|
return;
|
|
116
326
|
}
|
|
117
|
-
d(
|
|
327
|
+
d(m);
|
|
118
328
|
}
|
|
119
|
-
}, { passive: !0, capture:
|
|
120
|
-
|
|
121
|
-
const
|
|
122
|
-
|
|
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") + "-"),
|
|
172
|
-
() =>
|
|
173
|
-
id: (a.id || "autocomplete") + "-item-" +
|
|
174
|
-
class: ["autocomplete-item",
|
|
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
|
-
})),
|
|
401
|
+
})), q = D(() => ({
|
|
192
402
|
id: c,
|
|
193
|
-
class: ["autocomplete-list absolute min-w-full transform z-10",
|
|
403
|
+
class: ["autocomplete-list absolute min-w-full transform z-10", n.resultListClass, m.value],
|
|
194
404
|
role: "listbox"
|
|
195
|
-
})),
|
|
196
|
-
o.value = -1,
|
|
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
|
-
|
|
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
|
|
215
|
-
o.value = ((o.value - 1) %
|
|
216
|
-
},
|
|
217
|
-
|
|
218
|
-
const
|
|
219
|
-
o.value = ((o.value + 1) %
|
|
220
|
-
},
|
|
221
|
-
|
|
222
|
-
},
|
|
223
|
-
const
|
|
224
|
-
|
|
424
|
+
const $ = s.value.length;
|
|
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
|
-
|
|
471
|
+
s.value.length ? (u(), v("ul", z({
|
|
262
472
|
key: 0,
|
|
263
473
|
ref_key: "resultList",
|
|
264
|
-
ref:
|
|
265
|
-
},
|
|
266
|
-
onClick:
|
|
267
|
-
onMousedown:
|
|
474
|
+
ref: x
|
|
475
|
+
}, q.value, {
|
|
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
|
-
], 16)) :
|
|
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,118 +516,118 @@ const je = ["value", "onKeydown"], Ye = { class: "flex absolute inset-y-0 right-
|
|
|
306
516
|
}
|
|
307
517
|
},
|
|
308
518
|
setup(e, { expose: d }) {
|
|
309
|
-
const
|
|
310
|
-
let c = null,
|
|
311
|
-
const o =
|
|
312
|
-
|
|
519
|
+
const l = e, n = w(""), a = w(""), t = w(!1);
|
|
520
|
+
let c = null, s = null;
|
|
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
|
-
|
|
325
|
-
|
|
530
|
+
t.value ? (u(), v("div", lt, [
|
|
531
|
+
i("div", at, [
|
|
532
|
+
t.value ? (u(), v("div", st, [
|
|
533
|
+
nt,
|
|
534
|
+
i("div", ot, [
|
|
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
|
-
], 2)) :
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
542
|
+
], 2)) : _("", !0),
|
|
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
|
])
|
|
356
|
-
])) :
|
|
566
|
+
])) : _("", !0)
|
|
357
567
|
])
|
|
358
|
-
])) :
|
|
568
|
+
])) : _("", !0)
|
|
359
569
|
]),
|
|
360
570
|
_: 3
|
|
361
571
|
})
|
|
362
572
|
], 64));
|
|
363
573
|
}
|
|
364
574
|
};
|
|
365
|
-
function
|
|
366
|
-
const
|
|
367
|
-
let a,
|
|
368
|
-
if ((a =
|
|
369
|
-
|
|
370
|
-
else if ((a =
|
|
371
|
-
|
|
575
|
+
function vt(e, d) {
|
|
576
|
+
const l = w(!1), n = de(d);
|
|
577
|
+
let a, t = n.toLowerCase().replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), c = [];
|
|
578
|
+
if ((a = n.match(/\bd\b/gi)) && a.length === 1)
|
|
579
|
+
t = t.replace("d", "(\\d{1,2})");
|
|
580
|
+
else if ((a = n.match(/\bdd\b/gi)) && a.length === 1)
|
|
581
|
+
t = t.replace("dd", "(\\d{2})");
|
|
372
582
|
else
|
|
373
|
-
return { date:
|
|
374
|
-
if (c.push({ srcPos:
|
|
375
|
-
|
|
376
|
-
else if ((a =
|
|
377
|
-
|
|
583
|
+
return { date: l };
|
|
584
|
+
if (c.push({ srcPos: n.toLowerCase().indexOf("d"), destPos: 2 }), (a = n.match(/\bm\b/gi)) && a.length === 1)
|
|
585
|
+
t = t.replace("m", "(\\d{1,2})");
|
|
586
|
+
else if ((a = n.match(/\bmm\b/gi)) && a.length === 1)
|
|
587
|
+
t = t.replace("mm", "(\\d{2})");
|
|
378
588
|
else
|
|
379
|
-
return { date:
|
|
380
|
-
if (c.push({ srcPos:
|
|
381
|
-
|
|
589
|
+
return { date: l };
|
|
590
|
+
if (c.push({ srcPos: n.toLowerCase().indexOf("m"), destPos: 1 }), (a = n.match(/\byyyy\b/gi)) && a.length === 1)
|
|
591
|
+
t = t.replace("yyyy", "(\\d{4})");
|
|
382
592
|
else
|
|
383
|
-
return { date:
|
|
384
|
-
if (c.push({ srcPos:
|
|
385
|
-
return { date:
|
|
386
|
-
a.shift(), c.sort((
|
|
387
|
-
let
|
|
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
|
|
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
|
|
433
|
-
return delete
|
|
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());
|
|
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
|
-
},
|
|
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:
|
|
642
|
-
"onUpdate:modelValue":
|
|
643
|
-
},
|
|
730
|
+
onToggleDatepicker: g[0] || (g[0] = (p) => s.value = !s.value),
|
|
731
|
+
"onUpdate:modelValue": q
|
|
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
|
-
}, 16, ["modelValue", "locale"])) :
|
|
654
|
-
|
|
742
|
+
}, 16, ["modelValue", "locale"])) : _("", !0),
|
|
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,106 +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
|
|
728
|
-
const
|
|
816
|
+
const l = d, n = e, a = (c) => {
|
|
817
|
+
const s = new FormData();
|
|
729
818
|
for (let o of c)
|
|
730
|
-
|
|
731
|
-
return
|
|
732
|
-
},
|
|
733
|
-
const
|
|
734
|
-
if (
|
|
735
|
-
const o = [...
|
|
736
|
-
|
|
819
|
+
s.append(n.name, o, o.name);
|
|
820
|
+
return s;
|
|
821
|
+
}, t = (c) => {
|
|
822
|
+
const s = c.target.files || c.dataTransfer.files;
|
|
823
|
+
if (s) {
|
|
824
|
+
const o = [...s];
|
|
825
|
+
l("update:modelValue", o), l("form-data", a(o));
|
|
737
826
|
}
|
|
738
827
|
};
|
|
739
|
-
return (c,
|
|
740
|
-
|
|
741
|
-
|
|
828
|
+
return (c, s) => (u(), v("label", { for: e.id }, [
|
|
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 (
|
|
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
|
-
}), a =
|
|
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),
|
|
787
876
|
tabindex: "0"
|
|
788
877
|
}, [
|
|
789
|
-
|
|
878
|
+
i("span", {
|
|
790
879
|
role: "switch",
|
|
791
|
-
class:
|
|
880
|
+
class: k([
|
|
792
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",
|
|
793
882
|
a.value ? "bg-slate-200" : e.modelValue ? "bg-vxvue" : "bg-slate-300"
|
|
794
883
|
]),
|
|
795
884
|
"aria-checked": !!e.modelValue,
|
|
796
|
-
"aria-label":
|
|
885
|
+
"aria-label": t.$attrs["aria-label"]
|
|
797
886
|
}, [
|
|
798
|
-
|
|
887
|
+
i("span", {
|
|
799
888
|
"aria-hidden": "true",
|
|
800
|
-
class:
|
|
889
|
+
class: k([
|
|
801
890
|
"inline-block size-5 rounded-full ring-0 shadow transition duration-200 ease-in-out transform pointer-events-none",
|
|
802
891
|
e.modelValue ? "translate-x-5" : "translate-x-0",
|
|
803
892
|
a.value ? "bg-slate-100" : "bg-white"
|
|
804
893
|
])
|
|
805
894
|
}, null, 2),
|
|
806
|
-
|
|
895
|
+
i("input", z(n.value, {
|
|
807
896
|
checked: e.modelValue,
|
|
808
897
|
class: "hidden",
|
|
809
898
|
value: "1",
|
|
810
899
|
type: "checkbox",
|
|
811
|
-
onChange: c[0] || (c[0] = (
|
|
812
|
-
}), null, 16,
|
|
813
|
-
], 10,
|
|
900
|
+
onChange: c[0] || (c[0] = (s) => l("update:modelValue", s.target.checked))
|
|
901
|
+
}), null, 16, It)
|
|
902
|
+
], 10, Bt)
|
|
814
903
|
], 2),
|
|
815
|
-
|
|
904
|
+
A(t.$slots, "default")
|
|
816
905
|
], 64));
|
|
817
906
|
}
|
|
818
|
-
},
|
|
819
|
-
const
|
|
820
|
-
for (const [
|
|
821
|
-
|
|
822
|
-
return
|
|
823
|
-
},
|
|
907
|
+
}, xe = (e, d) => {
|
|
908
|
+
const l = e.__vccOpts || e;
|
|
909
|
+
for (const [n, a] of d)
|
|
910
|
+
l[n] = a;
|
|
911
|
+
return l;
|
|
912
|
+
}, Pt = (e) => (Ae("data-v-62f8007a"), e = e(), _e(), e), Lt = {
|
|
824
913
|
"aria-live": "assertive",
|
|
825
914
|
class: "flex fixed inset-0 z-50 items-start py-6 px-4 pointer-events-none sm:p-6"
|
|
826
|
-
},
|
|
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({
|
|
827
916
|
inheritAttrs: !1
|
|
828
917
|
}, {
|
|
829
918
|
__name: "message-toast",
|
|
@@ -835,62 +924,62 @@ const ht = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, pt
|
|
|
835
924
|
},
|
|
836
925
|
emits: ["timeout", "close"],
|
|
837
926
|
setup(e, { emit: d }) {
|
|
838
|
-
const
|
|
839
|
-
window.clearTimeout(a.value),
|
|
840
|
-
|
|
841
|
-
},
|
|
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(() => {
|
|
929
|
+
n("timeout");
|
|
930
|
+
}, l.timeout));
|
|
842
931
|
};
|
|
843
|
-
return
|
|
844
|
-
|
|
845
|
-
|
|
932
|
+
return W(() => l.active, c), ie(c), (s, o) => (u(), v("div", Lt, [
|
|
933
|
+
i("div", Ft, [
|
|
934
|
+
j(re, { name: "messagetoast-fade" }, {
|
|
846
935
|
default: Q(() => [
|
|
847
936
|
e.active ? (u(), v("div", {
|
|
848
937
|
key: 0,
|
|
849
|
-
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])
|
|
850
939
|
}, [
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
940
|
+
i("div", Ot, [
|
|
941
|
+
i("div", Tt, [
|
|
942
|
+
i("div", zt, [
|
|
943
|
+
A(s.$slots, "icon", {}, void 0, !0)
|
|
855
944
|
]),
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
945
|
+
i("div", jt, [
|
|
946
|
+
i("p", Nt, [
|
|
947
|
+
A(s.$slots, "title", {}, () => [
|
|
948
|
+
E(M(e.title), 1)
|
|
860
949
|
], !0)
|
|
861
950
|
]),
|
|
862
|
-
(u(!0), v(
|
|
863
|
-
|
|
864
|
-
|
|
951
|
+
(u(!0), v(B, null, T(t.value, (f) => (u(), v("p", Yt, [
|
|
952
|
+
A(s.$slots, "default", {}, () => [
|
|
953
|
+
E(M(f), 1)
|
|
865
954
|
], !0)
|
|
866
955
|
]))), 256))
|
|
867
956
|
]),
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
onClick: o[0] || (o[0] = (
|
|
957
|
+
i("div", Et, [
|
|
958
|
+
i("button", {
|
|
959
|
+
onClick: o[0] || (o[0] = (f) => n("close")),
|
|
871
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"
|
|
872
961
|
}, [
|
|
873
|
-
|
|
874
|
-
|
|
962
|
+
Rt,
|
|
963
|
+
j(S(he), { class: "size-5" })
|
|
875
964
|
])
|
|
876
965
|
])
|
|
877
966
|
])
|
|
878
967
|
])
|
|
879
|
-
], 2)) :
|
|
968
|
+
], 2)) : _("", !0)
|
|
880
969
|
]),
|
|
881
970
|
_: 3
|
|
882
971
|
})
|
|
883
972
|
])
|
|
884
973
|
]));
|
|
885
974
|
}
|
|
886
|
-
}),
|
|
975
|
+
}), Vl = /* @__PURE__ */ xe(Ht, [["__scopeId", "data-v-62f8007a"]]), Ut = {
|
|
887
976
|
key: 0,
|
|
888
977
|
class: "fixed inset-0 z-[9998] bg-white/50 backdrop-blur-sm",
|
|
889
978
|
"aria-hidden": "true"
|
|
890
|
-
},
|
|
979
|
+
}, Wt = {
|
|
891
980
|
key: 0,
|
|
892
981
|
class: "fixed inset-0 z-[9999]"
|
|
893
|
-
},
|
|
982
|
+
}, Zt = { class: "flex justify-center items-center h-screen" }, Dl = {
|
|
894
983
|
__name: "modal",
|
|
895
984
|
props: {
|
|
896
985
|
show: Boolean,
|
|
@@ -900,37 +989,37 @@ const ht = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, pt
|
|
|
900
989
|
},
|
|
901
990
|
emits: ["clicked-outside"],
|
|
902
991
|
setup(e, { emit: d }) {
|
|
903
|
-
const
|
|
904
|
-
return ce(
|
|
905
|
-
e.show ? (u(), v("div",
|
|
906
|
-
|
|
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" }, {
|
|
907
996
|
default: Q(() => [
|
|
908
|
-
e.show ? (u(), v("div",
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
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]),
|
|
912
1001
|
ref_key: "container",
|
|
913
|
-
ref:
|
|
1002
|
+
ref: n
|
|
914
1003
|
}, [
|
|
915
|
-
|
|
916
|
-
class:
|
|
1004
|
+
i("div", {
|
|
1005
|
+
class: k(e.headerClass)
|
|
917
1006
|
}, [
|
|
918
|
-
|
|
1007
|
+
A(a.$slots, "title")
|
|
919
1008
|
], 2),
|
|
920
|
-
|
|
921
|
-
class:
|
|
1009
|
+
i("div", {
|
|
1010
|
+
class: k(["overflow-y-auto h-full pb-4 mt-16", e.contentClass])
|
|
922
1011
|
}, [
|
|
923
|
-
|
|
1012
|
+
A(a.$slots, "default")
|
|
924
1013
|
], 2)
|
|
925
1014
|
], 2)
|
|
926
1015
|
])
|
|
927
|
-
])) :
|
|
1016
|
+
])) : _("", !0)
|
|
928
1017
|
]),
|
|
929
1018
|
_: 3
|
|
930
1019
|
})
|
|
931
1020
|
], 64));
|
|
932
1021
|
}
|
|
933
|
-
},
|
|
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 = {
|
|
934
1023
|
__name: "pagination",
|
|
935
1024
|
props: {
|
|
936
1025
|
page: { type: Number, default: 1 },
|
|
@@ -956,67 +1045,67 @@ const ht = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, pt
|
|
|
956
1045
|
},
|
|
957
1046
|
emits: ["update:page"],
|
|
958
1047
|
setup(e, { emit: d }) {
|
|
959
|
-
const
|
|
960
|
-
let
|
|
961
|
-
if (
|
|
962
|
-
for (let
|
|
963
|
-
|
|
964
|
-
return
|
|
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];
|
|
1050
|
+
if (n.showAllPages || a.value <= 7) {
|
|
1051
|
+
for (let h = 2; h <= a.value; ++h)
|
|
1052
|
+
r.push(h);
|
|
1053
|
+
return r;
|
|
965
1054
|
}
|
|
966
|
-
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;
|
|
967
1056
|
}), o = () => {
|
|
968
|
-
|
|
969
|
-
},
|
|
970
|
-
|
|
1057
|
+
t.value > 1 && l("update:page", t.value - 1);
|
|
1058
|
+
}, f = () => {
|
|
1059
|
+
t.value < a.value && l("update:page", t.value + 1);
|
|
971
1060
|
};
|
|
972
|
-
return
|
|
973
|
-
a.value = Math.ceil(
|
|
974
|
-
}),
|
|
975
|
-
a.value = Math.ceil(
|
|
976
|
-
}), (
|
|
977
|
-
|
|
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, [
|
|
978
1067
|
e.showNavButtons ? (u(), v("a", {
|
|
979
1068
|
key: 0,
|
|
980
|
-
onClick:
|
|
1069
|
+
onClick: L(o, ["prevent"]),
|
|
981
1070
|
href: "#",
|
|
982
|
-
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]])
|
|
983
1072
|
}, [
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
], 2)) :
|
|
1073
|
+
j(S(oe), { class: "size-5" }),
|
|
1074
|
+
E(" " + M(e.prevText), 1)
|
|
1075
|
+
], 2)) : _("", !0)
|
|
987
1076
|
]),
|
|
988
|
-
|
|
989
|
-
(u(!0), v(
|
|
990
|
-
onClick:
|
|
991
|
-
key:
|
|
992
|
-
href:
|
|
993
|
-
class:
|
|
994
|
-
"border-vxvue-500 text-vxvue-700":
|
|
995
|
-
"border-transparent text-gray-500":
|
|
996
|
-
"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"
|
|
997
1086
|
}, c.value]])
|
|
998
1087
|
}, {
|
|
999
1088
|
default: Q(() => [
|
|
1000
|
-
|
|
1089
|
+
E(M(m !== "dots" ? m : "..."), 1)
|
|
1001
1090
|
]),
|
|
1002
1091
|
_: 2
|
|
1003
1092
|
}, 1032, ["onClick", "href", "class"]))), 128))
|
|
1004
1093
|
]),
|
|
1005
|
-
|
|
1094
|
+
i("div", Xt, [
|
|
1006
1095
|
e.showNavButtons ? (u(), v("a", {
|
|
1007
1096
|
key: 0,
|
|
1008
|
-
onClick:
|
|
1097
|
+
onClick: L(f, ["prevent"]),
|
|
1009
1098
|
href: "#",
|
|
1010
|
-
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 }]])
|
|
1011
1100
|
}, [
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
], 2)) :
|
|
1101
|
+
E(M(e.nextText) + " ", 1),
|
|
1102
|
+
j(S(te), { class: "size-5" })
|
|
1103
|
+
], 2)) : _("", !0)
|
|
1015
1104
|
])
|
|
1016
1105
|
]));
|
|
1017
1106
|
}
|
|
1018
1107
|
};
|
|
1019
|
-
function
|
|
1108
|
+
function Jt(e, d) {
|
|
1020
1109
|
return u(), v("svg", {
|
|
1021
1110
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1022
1111
|
fill: "none",
|
|
@@ -1026,14 +1115,14 @@ function Zt(e, d) {
|
|
|
1026
1115
|
"aria-hidden": "true",
|
|
1027
1116
|
"data-slot": "icon"
|
|
1028
1117
|
}, [
|
|
1029
|
-
|
|
1118
|
+
i("path", {
|
|
1030
1119
|
"stroke-linecap": "round",
|
|
1031
1120
|
"stroke-linejoin": "round",
|
|
1032
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"
|
|
1033
1122
|
})
|
|
1034
1123
|
]);
|
|
1035
1124
|
}
|
|
1036
|
-
function
|
|
1125
|
+
function Qt(e, d) {
|
|
1037
1126
|
return u(), v("svg", {
|
|
1038
1127
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1039
1128
|
fill: "none",
|
|
@@ -1043,105 +1132,105 @@ function qt(e, d) {
|
|
|
1043
1132
|
"aria-hidden": "true",
|
|
1044
1133
|
"data-slot": "icon"
|
|
1045
1134
|
}, [
|
|
1046
|
-
|
|
1135
|
+
i("path", {
|
|
1047
1136
|
"stroke-linecap": "round",
|
|
1048
1137
|
"stroke-linejoin": "round",
|
|
1049
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"
|
|
1050
1139
|
}),
|
|
1051
|
-
|
|
1140
|
+
i("path", {
|
|
1052
1141
|
"stroke-linecap": "round",
|
|
1053
1142
|
"stroke-linejoin": "round",
|
|
1054
1143
|
d: "M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"
|
|
1055
1144
|
})
|
|
1056
1145
|
]);
|
|
1057
1146
|
}
|
|
1058
|
-
const
|
|
1147
|
+
const el = ["value", "type"], _l = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
1059
1148
|
__name: "password-input",
|
|
1060
1149
|
props: ["modelValue"],
|
|
1061
1150
|
emits: ["update:modelValue"],
|
|
1062
1151
|
setup(e, { emit: d }) {
|
|
1063
|
-
const
|
|
1064
|
-
let
|
|
1065
|
-
return delete
|
|
1152
|
+
const l = d, n = w(!1), a = D(() => {
|
|
1153
|
+
let t = Object.assign({}, U());
|
|
1154
|
+
return delete t.class, t;
|
|
1066
1155
|
});
|
|
1067
|
-
return (
|
|
1068
|
-
class:
|
|
1156
|
+
return (t, c) => (u(), v("div", {
|
|
1157
|
+
class: k("inline-block relative " + U().class)
|
|
1069
1158
|
}, [
|
|
1070
|
-
|
|
1159
|
+
i("input", z({
|
|
1071
1160
|
value: e.modelValue,
|
|
1072
|
-
type:
|
|
1073
|
-
onInput: c[0] || (c[0] = (
|
|
1074
|
-
}, a.value, { class: "block pr-
|
|
1075
|
-
|
|
1076
|
-
class: "flex absolute inset-y-0 right-0 items-center
|
|
1161
|
+
type: n.value ? "text" : "password",
|
|
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",
|
|
1077
1166
|
"aria-label": "show-password-toggle",
|
|
1078
|
-
onClick: c[1] || (c[1] =
|
|
1167
|
+
onClick: c[1] || (c[1] = L((s) => n.value = !n.value, ["stop"]))
|
|
1079
1168
|
}, [
|
|
1080
|
-
|
|
1169
|
+
n.value ? (u(), R(S(Jt), {
|
|
1081
1170
|
key: 0,
|
|
1082
1171
|
class: "size-5"
|
|
1083
|
-
})) : (u(),
|
|
1172
|
+
})) : (u(), R(S(Qt), {
|
|
1084
1173
|
key: 1,
|
|
1085
1174
|
class: "size-5"
|
|
1086
1175
|
}))
|
|
1087
1176
|
]),
|
|
1088
|
-
|
|
1177
|
+
A(t.$slots, "default")
|
|
1089
1178
|
], 2));
|
|
1090
1179
|
}
|
|
1091
|
-
}),
|
|
1180
|
+
}), tl = { class: "flex items-center pb-1" }, ll = ["id", "checked"], al = ["for"], sl = { key: 1 }, nl = ["href"], ol = {
|
|
1092
1181
|
key: 0,
|
|
1093
1182
|
class: "ml-6"
|
|
1094
|
-
},
|
|
1183
|
+
}, Bl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
1095
1184
|
__name: "simple-tree",
|
|
1096
1185
|
props: { branch: { type: Object, default: {} } },
|
|
1097
1186
|
emits: ["branch-selected", "expand"],
|
|
1098
1187
|
setup(e, { emit: d }) {
|
|
1099
|
-
const
|
|
1100
|
-
return
|
|
1101
|
-
|
|
1102
|
-
}), (
|
|
1103
|
-
const
|
|
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);
|
|
1104
1193
|
return u(), v("div", {
|
|
1105
|
-
class:
|
|
1194
|
+
class: k([!e.branch.branches || !e.branch.branches.length ? "terminates" : "", t.$attrs.class])
|
|
1106
1195
|
}, [
|
|
1107
|
-
|
|
1108
|
-
e.branch.branches && e.branch.branches.length ? (u(), v(
|
|
1109
|
-
|
|
1196
|
+
i("div", tl, [
|
|
1197
|
+
e.branch.branches && e.branch.branches.length ? (u(), v(B, { key: 0 }, [
|
|
1198
|
+
i("input", {
|
|
1110
1199
|
type: "checkbox",
|
|
1111
1200
|
id: "branch-" + e.branch.id,
|
|
1112
1201
|
onClick: c[0] || (c[0] = (o) => a.value = !a.value),
|
|
1113
1202
|
checked: a.value,
|
|
1114
1203
|
class: "hidden"
|
|
1115
|
-
}, null, 8,
|
|
1116
|
-
|
|
1204
|
+
}, null, 8, ll),
|
|
1205
|
+
i("label", {
|
|
1117
1206
|
for: "branch-" + e.branch.id,
|
|
1118
1207
|
class: "mr-2"
|
|
1119
1208
|
}, [
|
|
1120
|
-
(u(),
|
|
1121
|
-
], 8,
|
|
1122
|
-
], 64)) :
|
|
1123
|
-
e.branch.current ? (u(), v("strong",
|
|
1209
|
+
(u(), R(le(a.value ? S(Te) : S(ze)), { class: "w-4 h-4 border" }))
|
|
1210
|
+
], 8, al)
|
|
1211
|
+
], 64)) : _("", !0),
|
|
1212
|
+
e.branch.current ? (u(), v("strong", sl, M(e.branch.label), 1)) : (u(), v("a", {
|
|
1124
1213
|
key: 2,
|
|
1125
1214
|
href: e.branch.path,
|
|
1126
|
-
onClick: c[1] || (c[1] =
|
|
1127
|
-
},
|
|
1215
|
+
onClick: c[1] || (c[1] = L((o) => n("branch-selected", e.branch), ["prevent"]))
|
|
1216
|
+
}, M(e.branch.label), 9, nl))
|
|
1128
1217
|
]),
|
|
1129
|
-
e.branch.branches && e.branch.branches.length ?
|
|
1130
|
-
(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, {
|
|
1131
1220
|
branch: o,
|
|
1132
1221
|
key: o.id,
|
|
1133
|
-
onBranchSelected: c[2] || (c[2] = (
|
|
1134
|
-
onExpand: c[3] || (c[3] = (
|
|
1135
|
-
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);
|
|
1136
1225
|
})
|
|
1137
1226
|
}, null, 8, ["branch"]))), 128))
|
|
1138
1227
|
], 512)), [
|
|
1139
|
-
[
|
|
1140
|
-
]) :
|
|
1228
|
+
[Ie, a.value]
|
|
1229
|
+
]) : _("", !0)
|
|
1141
1230
|
], 2);
|
|
1142
1231
|
};
|
|
1143
1232
|
}
|
|
1144
|
-
}),
|
|
1233
|
+
}), rl = ["aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext"], ul = ["id"], il = ["id", "aria-label"], Il = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
1145
1234
|
__name: "slider",
|
|
1146
1235
|
props: {
|
|
1147
1236
|
min: { type: Number, default: 0 },
|
|
@@ -1154,119 +1243,119 @@ const Kt = ["value", "type"], $l = /* @__PURE__ */ Object.assign({ inheritAttrs:
|
|
|
1154
1243
|
},
|
|
1155
1244
|
emits: ["update:modelValue"],
|
|
1156
1245
|
setup(e, { emit: d }) {
|
|
1157
|
-
const
|
|
1158
|
-
let
|
|
1159
|
-
const o =
|
|
1160
|
-
const
|
|
1161
|
-
return
|
|
1162
|
-
}),
|
|
1163
|
-
if (
|
|
1164
|
-
const
|
|
1165
|
-
return
|
|
1246
|
+
const l = e, n = d, a = U(), t = { x: null, y: null }, c = { w: null, h: null };
|
|
1247
|
+
let s = !1;
|
|
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 };
|
|
1166
1255
|
}
|
|
1167
|
-
return
|
|
1168
|
-
}),
|
|
1169
|
-
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"),
|
|
1170
1259
|
tabindex: 0
|
|
1171
|
-
}),
|
|
1172
|
-
let
|
|
1173
|
-
if (
|
|
1174
|
-
let
|
|
1175
|
-
|
|
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);
|
|
1176
1265
|
} else
|
|
1177
|
-
|
|
1178
|
-
},
|
|
1179
|
-
const { pageX:
|
|
1180
|
-
|
|
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));
|
|
1181
1270
|
}, I = () => {
|
|
1182
|
-
const { clientLeft:
|
|
1183
|
-
|
|
1184
|
-
},
|
|
1185
|
-
|
|
1186
|
-
},
|
|
1187
|
-
|
|
1188
|
-
},
|
|
1189
|
-
|
|
1190
|
-
},
|
|
1191
|
-
|
|
1192
|
-
const
|
|
1193
|
-
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) {
|
|
1194
1283
|
case 37:
|
|
1195
1284
|
case 40:
|
|
1196
|
-
|
|
1285
|
+
b(p - 1);
|
|
1197
1286
|
break;
|
|
1198
1287
|
case 39:
|
|
1199
1288
|
case 38:
|
|
1200
|
-
|
|
1289
|
+
b(p + 1);
|
|
1201
1290
|
break;
|
|
1202
1291
|
case 33:
|
|
1203
|
-
|
|
1292
|
+
b(p + (l.max - l.min) / 10);
|
|
1204
1293
|
break;
|
|
1205
1294
|
case 34:
|
|
1206
|
-
|
|
1295
|
+
b(p - (l.max - l.min) / 10);
|
|
1207
1296
|
break;
|
|
1208
1297
|
case 36:
|
|
1209
|
-
|
|
1298
|
+
b(l.min);
|
|
1210
1299
|
break;
|
|
1211
1300
|
case 35:
|
|
1212
|
-
|
|
1301
|
+
b(l.max);
|
|
1213
1302
|
}
|
|
1214
|
-
},
|
|
1215
|
-
I(),
|
|
1303
|
+
}, y = (g) => {
|
|
1304
|
+
I(), x(g);
|
|
1216
1305
|
};
|
|
1217
|
-
return (
|
|
1306
|
+
return (g, p) => (u(), v("div", z({
|
|
1218
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"],
|
|
1219
1308
|
ref_key: "track",
|
|
1220
1309
|
ref: o,
|
|
1221
1310
|
role: "slider",
|
|
1222
1311
|
"aria-label": "slider-thumb",
|
|
1223
1312
|
"aria-valuemin": e.min,
|
|
1224
|
-
"aria-valuemax":
|
|
1313
|
+
"aria-valuemax": l.max,
|
|
1225
1314
|
"aria-valuenow": e.modelValue[0] ?? e.modelValue,
|
|
1226
1315
|
"aria-valuetext": e.modelValue
|
|
1227
|
-
},
|
|
1228
|
-
click:
|
|
1316
|
+
}, se(e.disabled ? {} : {
|
|
1317
|
+
click: y
|
|
1229
1318
|
}, !0)), [
|
|
1230
|
-
e.disabled ?
|
|
1319
|
+
e.disabled ? _("", !0) : (u(), v("div", {
|
|
1231
1320
|
key: 0,
|
|
1232
|
-
class:
|
|
1233
|
-
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)
|
|
1234
1323
|
}, null, 6)),
|
|
1235
|
-
e.modelValue.length ? (u(!0), v(
|
|
1236
|
-
id:
|
|
1237
|
-
style: e.vertical ? { bottom:
|
|
1238
|
-
"aria-label": "slider-thumb-" + (
|
|
1239
|
-
},
|
|
1240
|
-
focus: () =>
|
|
1241
|
-
keydown:
|
|
1242
|
-
mousedown: (
|
|
1243
|
-
|
|
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,
|
|
1330
|
+
keydown: q,
|
|
1331
|
+
mousedown: (N) => {
|
|
1332
|
+
f.value = F, O(N);
|
|
1244
1333
|
},
|
|
1245
|
-
touchstart: (
|
|
1246
|
-
|
|
1334
|
+
touchstart: (N) => {
|
|
1335
|
+
f.value = F, O(N);
|
|
1247
1336
|
},
|
|
1248
|
-
touchmove:
|
|
1249
|
-
touchend:
|
|
1250
|
-
}, !0),
|
|
1337
|
+
touchmove: P,
|
|
1338
|
+
touchend: Z
|
|
1339
|
+
}, !0), m.value), null, 16, il))), 256)) : (u(), v("button", z({
|
|
1251
1340
|
key: 1,
|
|
1252
|
-
id:
|
|
1253
|
-
style: e.vertical ? { bottom:
|
|
1341
|
+
id: S(a).id,
|
|
1342
|
+
style: e.vertical ? { bottom: r.value + "%" } : { left: r.value + "%" },
|
|
1254
1343
|
"aria-label": "slider-thumb"
|
|
1255
|
-
},
|
|
1256
|
-
focus: () =>
|
|
1257
|
-
keydown:
|
|
1258
|
-
mousedown: (
|
|
1259
|
-
|
|
1344
|
+
}, se(e.disabled ? {} : {
|
|
1345
|
+
focus: () => f.value = 0,
|
|
1346
|
+
keydown: q,
|
|
1347
|
+
mousedown: (V) => {
|
|
1348
|
+
f.value = 0, O(V);
|
|
1260
1349
|
},
|
|
1261
|
-
touchstart: (
|
|
1262
|
-
|
|
1350
|
+
touchstart: (V) => {
|
|
1351
|
+
f.value = 0, O(V);
|
|
1263
1352
|
},
|
|
1264
|
-
touchmove:
|
|
1265
|
-
touchend:
|
|
1266
|
-
}, !0),
|
|
1267
|
-
], 16,
|
|
1353
|
+
touchmove: P,
|
|
1354
|
+
touchend: Z
|
|
1355
|
+
}, !0), m.value), null, 16, ul))
|
|
1356
|
+
], 16, rl));
|
|
1268
1357
|
}
|
|
1269
|
-
}),
|
|
1358
|
+
}), cl = { class: "text-white bg-slate-700" }, dl = ["onClick"], vl = { class: "flex items-center space-x-1" }, fl = {
|
|
1270
1359
|
__name: "sortable",
|
|
1271
1360
|
props: {
|
|
1272
1361
|
columns: {
|
|
@@ -1288,62 +1377,62 @@ const Kt = ["value", "type"], $l = /* @__PURE__ */ Object.assign({ inheritAttrs:
|
|
|
1288
1377
|
},
|
|
1289
1378
|
emits: ["before-sort", "after-sort"],
|
|
1290
1379
|
setup(e, { emit: d }) {
|
|
1291
|
-
const
|
|
1292
|
-
let o =
|
|
1293
|
-
const
|
|
1294
|
-
return
|
|
1295
|
-
}),
|
|
1296
|
-
|
|
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));
|
|
1384
|
+
}), s = (o) => {
|
|
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 }));
|
|
1297
1386
|
};
|
|
1298
|
-
return (o,
|
|
1299
|
-
class:
|
|
1387
|
+
return (o, f) => (u(), v("table", {
|
|
1388
|
+
class: k(o.$attrs.class || "w-full divide-y divide-y-slate-900 table-fixed")
|
|
1300
1389
|
}, [
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
(u(!0), v(
|
|
1390
|
+
i("thead", cl, [
|
|
1391
|
+
i("tr", null, [
|
|
1392
|
+
(u(!0), v(B, null, T(e.columns, (r) => (u(), v("th", {
|
|
1304
1393
|
scope: "col",
|
|
1305
|
-
class:
|
|
1306
|
-
{ "cursor-pointer":
|
|
1307
|
-
|
|
1394
|
+
class: k(["py-3 px-6 text-left", [
|
|
1395
|
+
{ "cursor-pointer": r.sortable, active: a.value === r.prop },
|
|
1396
|
+
r.cssClass
|
|
1308
1397
|
]]),
|
|
1309
|
-
onClick: (
|
|
1398
|
+
onClick: (h) => r.sortable ? s(r.prop) : null
|
|
1310
1399
|
}, [
|
|
1311
|
-
|
|
1312
|
-
column:
|
|
1313
|
-
sortDir:
|
|
1400
|
+
A(o.$slots, r.prop + "-header", {
|
|
1401
|
+
column: r,
|
|
1402
|
+
sortDir: t.value,
|
|
1314
1403
|
sortProp: a.value
|
|
1315
1404
|
}, () => [
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
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)), {
|
|
1319
1408
|
key: 0,
|
|
1320
|
-
class: "
|
|
1321
|
-
})) :
|
|
1409
|
+
class: "size-4"
|
|
1410
|
+
})) : _("", !0)
|
|
1322
1411
|
])
|
|
1323
1412
|
], !0)
|
|
1324
|
-
], 10,
|
|
1413
|
+
], 10, dl))), 256))
|
|
1325
1414
|
])
|
|
1326
1415
|
]),
|
|
1327
|
-
|
|
1328
|
-
(u(!0), v(
|
|
1329
|
-
key:
|
|
1330
|
-
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)
|
|
1331
1420
|
}, [
|
|
1332
|
-
(u(!0), v(
|
|
1333
|
-
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 }])
|
|
1334
1423
|
}, [
|
|
1335
|
-
|
|
1336
|
-
|
|
1424
|
+
A(o.$slots, h.prop, { row: r }, () => [
|
|
1425
|
+
E(M(r[h.prop]), 1)
|
|
1337
1426
|
], !0)
|
|
1338
1427
|
], 2))), 256))
|
|
1339
1428
|
], 2))), 128))
|
|
1340
1429
|
])
|
|
1341
1430
|
], 2));
|
|
1342
1431
|
}
|
|
1343
|
-
},
|
|
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 = {
|
|
1344
1433
|
class: "flex -mb-px space-x-8",
|
|
1345
1434
|
"aria-label": "Tabs"
|
|
1346
|
-
},
|
|
1435
|
+
}, bl = ["onClick", "aria-current"], Ll = {
|
|
1347
1436
|
__name: "tabs",
|
|
1348
1437
|
props: {
|
|
1349
1438
|
items: { type: Array, default: [] },
|
|
@@ -1351,56 +1440,56 @@ const Kt = ["value", "type"], $l = /* @__PURE__ */ Object.assign({ inheritAttrs:
|
|
|
1351
1440
|
},
|
|
1352
1441
|
emits: ["update:active-index"],
|
|
1353
1442
|
setup(e, { emit: d }) {
|
|
1354
|
-
const
|
|
1355
|
-
let
|
|
1356
|
-
return
|
|
1357
|
-
o.disabled ||
|
|
1358
|
-
}),
|
|
1443
|
+
const l = e, n = d, a = w(l.items[l.activeIndex] || {}), t = D(() => {
|
|
1444
|
+
let s = [];
|
|
1445
|
+
return l.items.forEach((o, f) => {
|
|
1446
|
+
o.disabled || s.push({ label: o.name, key: f });
|
|
1447
|
+
}), s;
|
|
1359
1448
|
});
|
|
1360
|
-
|
|
1361
|
-
a.value =
|
|
1449
|
+
W(() => l.activeIndex, (s) => {
|
|
1450
|
+
a.value = l.items[s] || {};
|
|
1362
1451
|
});
|
|
1363
|
-
const c = (
|
|
1364
|
-
|
|
1452
|
+
const c = (s) => {
|
|
1453
|
+
s.disabled || (a.value = s, n("update:active-index", l.items.indexOf(s)));
|
|
1365
1454
|
};
|
|
1366
|
-
return (
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
options:
|
|
1455
|
+
return (s, o) => (u(), v(B, null, [
|
|
1456
|
+
i("div", ml, [
|
|
1457
|
+
j(_t, {
|
|
1458
|
+
options: t.value,
|
|
1370
1459
|
"model-value": e.activeIndex,
|
|
1371
|
-
"onUpdate:modelValue": o[0] || (o[0] = (
|
|
1460
|
+
"onUpdate:modelValue": o[0] || (o[0] = (f) => n("update:activeIndex", f)),
|
|
1372
1461
|
class: "w-full"
|
|
1373
1462
|
}, null, 8, ["options", "model-value"])
|
|
1374
1463
|
]),
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
(u(!0), v(
|
|
1379
|
-
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,
|
|
1380
1469
|
href: "#",
|
|
1381
|
-
onClick:
|
|
1382
|
-
class:
|
|
1383
|
-
a.value ===
|
|
1384
|
-
|
|
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" : "",
|
|
1385
1474
|
"group inline-flex items-center py-4 px-1 border-b-4 font-medium"
|
|
1386
1475
|
]),
|
|
1387
|
-
"aria-current": a.value ===
|
|
1476
|
+
"aria-current": a.value === f ? "page" : void 0
|
|
1388
1477
|
}, [
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1478
|
+
A(s.$slots, "icon", { tab: f }),
|
|
1479
|
+
i("span", null, [
|
|
1480
|
+
A(s.$slots, "default", { tab: f }, () => [
|
|
1481
|
+
E(M(f.name), 1)
|
|
1393
1482
|
])
|
|
1394
1483
|
]),
|
|
1395
|
-
|
|
1484
|
+
f.badge ? (u(), v("span", {
|
|
1396
1485
|
key: 0,
|
|
1397
|
-
class:
|
|
1398
|
-
a.value ===
|
|
1399
|
-
|
|
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" : "",
|
|
1400
1489
|
"hidden ml-3 py-0.5 px-2.5 rounded-full text-xs font-medium md:inline-block"
|
|
1401
1490
|
])
|
|
1402
|
-
},
|
|
1403
|
-
], 10,
|
|
1491
|
+
}, M(f.badge), 3)) : _("", !0)
|
|
1492
|
+
], 10, bl))), 128))
|
|
1404
1493
|
])
|
|
1405
1494
|
])
|
|
1406
1495
|
])
|
|
@@ -1408,19 +1497,21 @@ const Kt = ["value", "type"], $l = /* @__PURE__ */ Object.assign({ inheritAttrs:
|
|
|
1408
1497
|
}
|
|
1409
1498
|
};
|
|
1410
1499
|
export {
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
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
|
|
1426
1517
|
};
|