vx-vue 1.3.3 → 1.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vxvue.es.js +402 -401
- package/dist/vxvue.umd.js +1 -1
- package/package.json +1 -1
package/dist/vxvue.es.js
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import { useSlots as Ce, ref as $, computed as z, onBeforeUpdate as Me, createElementBlock as m, openBlock as
|
|
1
|
+
import { useSlots as Ce, ref as $, computed as z, onBeforeUpdate as Me, createElementBlock as m, openBlock as c, Fragment as O, renderList as j, createBlock as Z, resolveDynamicComponent as de, createElementVNode as v, useAttrs as K, normalizeClass as C, unref as A, renderSlot as L, toValue as F, watch as X, getCurrentScope as Ve, onScopeDispose as De, onUpdated as Ae, createCommentVNode as I, mergeProps as R, withKeys as se, withModifiers as _, toDisplayString as B, Transition as Le, withCtx as te, createVNode as Y, createTextVNode as J, nextTick as ve, withDirectives as xe, vModelText as Te, onMounted as me, normalizeStyle as ye, resolveComponent as Pe, createSlots as Be, vShow as ze, toHandlers as ue } from "vue";
|
|
2
2
|
const kl = {
|
|
3
3
|
__name: "Accordion",
|
|
4
4
|
props: { activeIndex: { type: [Number, Array], default: null } },
|
|
5
5
|
emits: ["update:activeIndex"],
|
|
6
6
|
setup(e, { emit: u }) {
|
|
7
|
-
const t = e,
|
|
7
|
+
const t = e, o = u, a = Ce(), l = $([]), i = (f) => l.value.push(f), s = z(
|
|
8
8
|
() => a.default().reduce((f, x) => ((x.type.__name || x.type.name) === "AccordionPanel" && f.push(x), f), [])
|
|
9
|
-
),
|
|
9
|
+
), n = (f) => {
|
|
10
10
|
if (Array.isArray(t.activeIndex)) {
|
|
11
11
|
let x = [].concat(t.activeIndex), y = x.findIndex((b) => b === f);
|
|
12
|
-
y === -1 ?
|
|
12
|
+
y === -1 ? o("update:activeIndex", [...x, f]) : (x.splice(y, 1), o("update:activeIndex", x));
|
|
13
13
|
} else
|
|
14
|
-
|
|
14
|
+
o("update:activeIndex", f === t.activeIndex ? -1 : f);
|
|
15
15
|
}, r = (f) => {
|
|
16
16
|
if (f = ++f % s.value.length, !l.value[f].disabled) {
|
|
17
|
-
|
|
17
|
+
n(f), l.value[f].focus();
|
|
18
18
|
return;
|
|
19
19
|
}
|
|
20
20
|
r(f);
|
|
21
|
-
},
|
|
21
|
+
}, d = (f) => {
|
|
22
22
|
if (f = (f || s.value.length) - 1, !l.value[f].disabled) {
|
|
23
|
-
|
|
23
|
+
n(f), l.value[f].focus();
|
|
24
24
|
return;
|
|
25
25
|
}
|
|
26
|
-
|
|
26
|
+
d(f);
|
|
27
27
|
};
|
|
28
|
-
return Me(() => l.value = []), (f, x) => (
|
|
28
|
+
return Me(() => l.value = []), (f, x) => (c(!0), m(O, null, j(s.value, (y, b) => {
|
|
29
29
|
var T;
|
|
30
|
-
return
|
|
30
|
+
return c(), Z(de(y), {
|
|
31
31
|
key: b,
|
|
32
32
|
ref_for: !0,
|
|
33
|
-
ref:
|
|
33
|
+
ref: i,
|
|
34
34
|
show: Array.isArray(e.activeIndex) ? (T = e.activeIndex) == null ? void 0 : T.includes(b) : e.activeIndex === b,
|
|
35
|
-
onSelect: (p) =>
|
|
35
|
+
onSelect: (p) => n(b),
|
|
36
36
|
onKeydown: (p) => r(b),
|
|
37
|
-
onKeyup: (p) =>
|
|
37
|
+
onKeyup: (p) => d(b)
|
|
38
38
|
}, null, 40, ["show", "onSelect", "onKeydown", "onKeyup"]);
|
|
39
39
|
}), 128));
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
42
|
function Ie(e, u) {
|
|
43
|
-
return
|
|
43
|
+
return c(), m("svg", {
|
|
44
44
|
xmlns: "http://www.w3.org/2000/svg",
|
|
45
45
|
viewBox: "0 0 24 24",
|
|
46
46
|
fill: "currentColor",
|
|
@@ -55,7 +55,7 @@ function Ie(e, u) {
|
|
|
55
55
|
]);
|
|
56
56
|
}
|
|
57
57
|
function Ne(e, u) {
|
|
58
|
-
return
|
|
58
|
+
return c(), m("svg", {
|
|
59
59
|
xmlns: "http://www.w3.org/2000/svg",
|
|
60
60
|
viewBox: "0 0 24 24",
|
|
61
61
|
fill: "currentColor",
|
|
@@ -70,7 +70,7 @@ function Ne(e, u) {
|
|
|
70
70
|
]);
|
|
71
71
|
}
|
|
72
72
|
function ie(e, u) {
|
|
73
|
-
return
|
|
73
|
+
return c(), m("svg", {
|
|
74
74
|
xmlns: "http://www.w3.org/2000/svg",
|
|
75
75
|
viewBox: "0 0 24 24",
|
|
76
76
|
fill: "currentColor",
|
|
@@ -85,7 +85,7 @@ function ie(e, u) {
|
|
|
85
85
|
]);
|
|
86
86
|
}
|
|
87
87
|
function re(e, u) {
|
|
88
|
-
return
|
|
88
|
+
return c(), m("svg", {
|
|
89
89
|
xmlns: "http://www.w3.org/2000/svg",
|
|
90
90
|
viewBox: "0 0 24 24",
|
|
91
91
|
fill: "currentColor",
|
|
@@ -99,8 +99,8 @@ function re(e, u) {
|
|
|
99
99
|
})
|
|
100
100
|
]);
|
|
101
101
|
}
|
|
102
|
-
function
|
|
103
|
-
return
|
|
102
|
+
function Oe(e, u) {
|
|
103
|
+
return c(), m("svg", {
|
|
104
104
|
xmlns: "http://www.w3.org/2000/svg",
|
|
105
105
|
viewBox: "0 0 24 24",
|
|
106
106
|
fill: "currentColor",
|
|
@@ -115,7 +115,7 @@ function Ee(e, u) {
|
|
|
115
115
|
]);
|
|
116
116
|
}
|
|
117
117
|
function Fe(e, u) {
|
|
118
|
-
return
|
|
118
|
+
return c(), m("svg", {
|
|
119
119
|
xmlns: "http://www.w3.org/2000/svg",
|
|
120
120
|
viewBox: "0 0 24 24",
|
|
121
121
|
fill: "currentColor",
|
|
@@ -129,8 +129,8 @@ function Fe(e, u) {
|
|
|
129
129
|
})
|
|
130
130
|
]);
|
|
131
131
|
}
|
|
132
|
-
function
|
|
133
|
-
return
|
|
132
|
+
function Ee(e, u) {
|
|
133
|
+
return c(), m("svg", {
|
|
134
134
|
xmlns: "http://www.w3.org/2000/svg",
|
|
135
135
|
viewBox: "0 0 24 24",
|
|
136
136
|
fill: "currentColor",
|
|
@@ -145,7 +145,7 @@ function Oe(e, u) {
|
|
|
145
145
|
]);
|
|
146
146
|
}
|
|
147
147
|
function _e(e, u) {
|
|
148
|
-
return
|
|
148
|
+
return c(), m("svg", {
|
|
149
149
|
xmlns: "http://www.w3.org/2000/svg",
|
|
150
150
|
viewBox: "0 0 24 24",
|
|
151
151
|
fill: "currentColor",
|
|
@@ -160,7 +160,7 @@ function _e(e, u) {
|
|
|
160
160
|
]);
|
|
161
161
|
}
|
|
162
162
|
function fe(e, u) {
|
|
163
|
-
return
|
|
163
|
+
return c(), m("svg", {
|
|
164
164
|
xmlns: "http://www.w3.org/2000/svg",
|
|
165
165
|
viewBox: "0 0 24 24",
|
|
166
166
|
fill: "currentColor",
|
|
@@ -179,48 +179,48 @@ const je = ["id", "disabled", "aria-expanded", "aria-controls"], Ye = ["id", "ar
|
|
|
179
179
|
props: { show: Boolean, disabled: Boolean },
|
|
180
180
|
emits: ["select", "keyup", "keydown"],
|
|
181
181
|
setup(e, { expose: u, emit: t }) {
|
|
182
|
-
const
|
|
182
|
+
const o = t, a = e, l = K(), i = $(null), s = Math.random().toString(20).substring(2, 8), n = (d) => {
|
|
183
183
|
if (!a.disabled) {
|
|
184
|
-
const f = (/* @__PURE__ */ new Map([[40, "keydown"], [38, "keyup"]])).get(
|
|
185
|
-
f && (
|
|
184
|
+
const f = (/* @__PURE__ */ new Map([[40, "keydown"], [38, "keyup"]])).get(d.keyCode);
|
|
185
|
+
f && (o(f), d.preventDefault());
|
|
186
186
|
}
|
|
187
187
|
};
|
|
188
|
-
return u({ focus: () =>
|
|
188
|
+
return u({ focus: () => i.value.focus(), disabled: a.disabled }), (d, f) => (c(), m("div", null, [
|
|
189
189
|
v("button", {
|
|
190
|
-
id: "ap-control-" +
|
|
190
|
+
id: "ap-control-" + A(s),
|
|
191
191
|
ref_key: "btn",
|
|
192
|
-
ref:
|
|
192
|
+
ref: i,
|
|
193
193
|
class: C([
|
|
194
194
|
"flex items-center w-full space-x-2 px-4 py-2 ring-vxvue",
|
|
195
195
|
e.show ? "rounded-t" : "rounded-sm",
|
|
196
196
|
e.disabled ? "bg-slate-300 text-slate-700" : "bg-vxvue hover:bg-vxvue-600 text-white",
|
|
197
|
-
|
|
197
|
+
A(l).class
|
|
198
198
|
]),
|
|
199
199
|
disabled: e.disabled,
|
|
200
200
|
"aria-expanded": e.show,
|
|
201
|
-
"aria-controls": "ap-" +
|
|
201
|
+
"aria-controls": "ap-" + A(s),
|
|
202
202
|
tabindex: "0",
|
|
203
|
-
onClick: f[0] || (f[0] = (x) =>
|
|
204
|
-
onKeydown:
|
|
203
|
+
onClick: f[0] || (f[0] = (x) => o("select")),
|
|
204
|
+
onKeydown: n
|
|
205
205
|
}, [
|
|
206
|
-
e.disabled ? (
|
|
206
|
+
e.disabled ? (c(), Z(A(fe), {
|
|
207
207
|
key: 0,
|
|
208
208
|
class: "size-5"
|
|
209
|
-
})) : (
|
|
209
|
+
})) : (c(), Z(A(re), {
|
|
210
210
|
key: 1,
|
|
211
211
|
class: C(["size-5 transform-gpu transition-transform duration-300", { "rotate-90": e.show }])
|
|
212
212
|
}, null, 8, ["class"])),
|
|
213
213
|
v("span", null, [
|
|
214
|
-
L(
|
|
214
|
+
L(d.$slots, "header")
|
|
215
215
|
])
|
|
216
216
|
], 42, je),
|
|
217
217
|
v("div", {
|
|
218
|
-
id: "ap-" +
|
|
218
|
+
id: "ap-" + A(s),
|
|
219
219
|
class: C(["grid transition-[grid-template-rows] duration-300 ease-in-out", e.show && !e.disabled ? "grid-rows-1" : "grid-rows-[repeat(1,minmax(0,0fr))]"]),
|
|
220
|
-
"aria-labelledby": "ap-control-" +
|
|
220
|
+
"aria-labelledby": "ap-control-" + A(s)
|
|
221
221
|
}, [
|
|
222
222
|
v("div", Re, [
|
|
223
|
-
L(
|
|
223
|
+
L(d.$slots, "default")
|
|
224
224
|
])
|
|
225
225
|
], 10, Ye)
|
|
226
226
|
]));
|
|
@@ -229,12 +229,12 @@ const je = ["id", "disabled", "aria-expanded", "aria-controls"], Ye = ["id", "ar
|
|
|
229
229
|
__name: "Spinner",
|
|
230
230
|
props: { radius: { type: Number, default: 10 }, strokeWidth: { type: Number, default: 4 } },
|
|
231
231
|
setup(e) {
|
|
232
|
-
const u = e, t = z(() => u.radius + u.strokeWidth / 2),
|
|
233
|
-
return (l,
|
|
232
|
+
const u = e, t = z(() => u.radius + u.strokeWidth / 2), o = z(() => u.radius * 2 + u.strokeWidth), a = z(() => u.radius * Math.PI / 1.5);
|
|
233
|
+
return (l, i) => (c(), m("svg", {
|
|
234
234
|
class: "animate-spin",
|
|
235
235
|
xmlns: "http://www.w3.org/2000/svg",
|
|
236
236
|
fill: "none",
|
|
237
|
-
viewBox: "0 0 " +
|
|
237
|
+
viewBox: "0 0 " + o.value + " " + o.value,
|
|
238
238
|
role: "progressbar"
|
|
239
239
|
}, [
|
|
240
240
|
v("circle", {
|
|
@@ -258,7 +258,7 @@ const je = ["id", "disabled", "aria-expanded", "aria-controls"], Ye = ["id", "ar
|
|
|
258
258
|
}
|
|
259
259
|
};
|
|
260
260
|
function qe(e) {
|
|
261
|
-
return Ve() ? (
|
|
261
|
+
return Ve() ? (De(e), !0) : !1;
|
|
262
262
|
}
|
|
263
263
|
const ke = typeof window < "u" && typeof document < "u";
|
|
264
264
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
@@ -272,17 +272,17 @@ function ce(e) {
|
|
|
272
272
|
return Array.isArray(e) ? e : [e];
|
|
273
273
|
}
|
|
274
274
|
const Je = /[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}|z{1,4}|SSS/g;
|
|
275
|
-
function Qe(e, u, t,
|
|
275
|
+
function Qe(e, u, t, o) {
|
|
276
276
|
let a = e < 12 ? "AM" : "PM";
|
|
277
|
-
return
|
|
277
|
+
return o && (a = a.split("").reduce((l, i) => l += `${i}.`, "")), t ? a.toLowerCase() : a;
|
|
278
278
|
}
|
|
279
279
|
function ee(e) {
|
|
280
280
|
const u = ["th", "st", "nd", "rd"], t = e % 100;
|
|
281
281
|
return e + (u[(t - 20) % 10] || u[t] || u[0]);
|
|
282
282
|
}
|
|
283
283
|
function ge(e, u, t = {}) {
|
|
284
|
-
var
|
|
285
|
-
const a = e.getFullYear(), l = e.getMonth(),
|
|
284
|
+
var o;
|
|
285
|
+
const a = e.getFullYear(), l = e.getMonth(), i = e.getDate(), s = e.getHours(), n = e.getMinutes(), r = e.getSeconds(), d = e.getMilliseconds(), f = e.getDay(), x = (o = t.customMeridiem) != null ? o : Qe, y = (T) => {
|
|
286
286
|
var p;
|
|
287
287
|
return (p = T.split(" ")[1]) != null ? p : "";
|
|
288
288
|
}, b = {
|
|
@@ -294,38 +294,38 @@ function ge(e, u, t = {}) {
|
|
|
294
294
|
MM: () => `${l + 1}`.padStart(2, "0"),
|
|
295
295
|
MMM: () => e.toLocaleDateString(F(t.locales), { month: "short" }),
|
|
296
296
|
MMMM: () => e.toLocaleDateString(F(t.locales), { month: "long" }),
|
|
297
|
-
D: () => String(
|
|
298
|
-
Do: () => ee(
|
|
299
|
-
DD: () => `${
|
|
297
|
+
D: () => String(i),
|
|
298
|
+
Do: () => ee(i),
|
|
299
|
+
DD: () => `${i}`.padStart(2, "0"),
|
|
300
300
|
H: () => String(s),
|
|
301
301
|
Ho: () => ee(s),
|
|
302
302
|
HH: () => `${s}`.padStart(2, "0"),
|
|
303
303
|
h: () => `${s % 12 || 12}`.padStart(1, "0"),
|
|
304
304
|
ho: () => ee(s % 12 || 12),
|
|
305
305
|
hh: () => `${s % 12 || 12}`.padStart(2, "0"),
|
|
306
|
-
m: () => String(
|
|
307
|
-
mo: () => ee(
|
|
308
|
-
mm: () => `${
|
|
306
|
+
m: () => String(n),
|
|
307
|
+
mo: () => ee(n),
|
|
308
|
+
mm: () => `${n}`.padStart(2, "0"),
|
|
309
309
|
s: () => String(r),
|
|
310
310
|
so: () => ee(r),
|
|
311
311
|
ss: () => `${r}`.padStart(2, "0"),
|
|
312
|
-
SSS: () => `${
|
|
312
|
+
SSS: () => `${d}`.padStart(3, "0"),
|
|
313
313
|
d: () => f,
|
|
314
314
|
dd: () => e.toLocaleDateString(F(t.locales), { weekday: "narrow" }),
|
|
315
315
|
ddd: () => e.toLocaleDateString(F(t.locales), { weekday: "short" }),
|
|
316
316
|
dddd: () => e.toLocaleDateString(F(t.locales), { weekday: "long" }),
|
|
317
|
-
A: () => x(s,
|
|
318
|
-
AA: () => x(s,
|
|
319
|
-
a: () => x(s,
|
|
320
|
-
aa: () => x(s,
|
|
317
|
+
A: () => x(s, n),
|
|
318
|
+
AA: () => x(s, n, !1, !0),
|
|
319
|
+
a: () => x(s, n, !0),
|
|
320
|
+
aa: () => x(s, n, !0, !0),
|
|
321
321
|
z: () => y(e.toLocaleDateString(F(t.locales), { timeZoneName: "shortOffset" })),
|
|
322
322
|
zz: () => y(e.toLocaleDateString(F(t.locales), { timeZoneName: "shortOffset" })),
|
|
323
323
|
zzz: () => y(e.toLocaleDateString(F(t.locales), { timeZoneName: "shortOffset" })),
|
|
324
324
|
zzzz: () => y(e.toLocaleDateString(F(t.locales), { timeZoneName: "longOffset" }))
|
|
325
325
|
};
|
|
326
326
|
return u.replace(Je, (T, p) => {
|
|
327
|
-
var k,
|
|
328
|
-
return (
|
|
327
|
+
var k, D;
|
|
328
|
+
return (D = p ?? ((k = b[T]) == null ? void 0 : k.call(b))) != null ? D : T;
|
|
329
329
|
});
|
|
330
330
|
}
|
|
331
331
|
function et(e, u, t) {
|
|
@@ -347,70 +347,70 @@ function oe(e) {
|
|
|
347
347
|
function ne(...e) {
|
|
348
348
|
const u = [], t = () => {
|
|
349
349
|
u.forEach((s) => s()), u.length = 0;
|
|
350
|
-
},
|
|
351
|
-
const s = ce(F(e[0])).filter((
|
|
352
|
-
return s.every((
|
|
350
|
+
}, o = (s, n, r, d) => (s.addEventListener(n, r, d), () => s.removeEventListener(n, r, d)), a = z(() => {
|
|
351
|
+
const s = ce(F(e[0])).filter((n) => n != null);
|
|
352
|
+
return s.every((n) => typeof n != "string") ? s : void 0;
|
|
353
353
|
}), l = et(
|
|
354
354
|
() => {
|
|
355
|
-
var s,
|
|
355
|
+
var s, n;
|
|
356
356
|
return [
|
|
357
|
-
(
|
|
357
|
+
(n = (s = a.value) == null ? void 0 : s.map((r) => oe(r))) != null ? n : [$e].filter((r) => r != null),
|
|
358
358
|
ce(F(a.value ? e[1] : e[0])),
|
|
359
|
-
ce(
|
|
359
|
+
ce(A(a.value ? e[2] : e[1])),
|
|
360
360
|
// @ts-expect-error - TypeScript gets the correct types, but somehow still complains
|
|
361
361
|
F(a.value ? e[3] : e[2])
|
|
362
362
|
];
|
|
363
363
|
},
|
|
364
|
-
([s,
|
|
365
|
-
if (t(), !(s != null && s.length) || !(
|
|
364
|
+
([s, n, r, d]) => {
|
|
365
|
+
if (t(), !(s != null && s.length) || !(n != null && n.length) || !(r != null && r.length))
|
|
366
366
|
return;
|
|
367
|
-
const f = Ke(
|
|
367
|
+
const f = Ke(d) ? { ...d } : d;
|
|
368
368
|
u.push(
|
|
369
369
|
...s.flatMap(
|
|
370
|
-
(x) =>
|
|
371
|
-
(y) => r.map((b) =>
|
|
370
|
+
(x) => n.flatMap(
|
|
371
|
+
(y) => r.map((b) => o(x, y, b, f))
|
|
372
372
|
)
|
|
373
373
|
)
|
|
374
374
|
);
|
|
375
375
|
},
|
|
376
376
|
{ flush: "post" }
|
|
377
|
-
),
|
|
377
|
+
), i = () => {
|
|
378
378
|
l(), t();
|
|
379
379
|
};
|
|
380
|
-
return qe(t),
|
|
380
|
+
return qe(t), i;
|
|
381
381
|
}
|
|
382
382
|
let be = !1;
|
|
383
383
|
function he(e, u, t = {}) {
|
|
384
|
-
const { window:
|
|
385
|
-
if (!
|
|
384
|
+
const { window: o = $e, ignore: a = [], capture: l = !0, detectIframe: i = !1, controls: s = !1 } = t;
|
|
385
|
+
if (!o)
|
|
386
386
|
return s ? { stop: le, cancel: le, trigger: le } : le;
|
|
387
387
|
if (Xe && !be) {
|
|
388
388
|
be = !0;
|
|
389
389
|
const p = { passive: !0 };
|
|
390
|
-
Array.from(
|
|
390
|
+
Array.from(o.document.body.children).forEach((k) => ne(k, "click", le, p)), ne(o.document.documentElement, "click", le, p);
|
|
391
391
|
}
|
|
392
|
-
let
|
|
392
|
+
let n = !0;
|
|
393
393
|
const r = (p) => F(a).some((k) => {
|
|
394
394
|
if (typeof k == "string")
|
|
395
|
-
return Array.from(
|
|
395
|
+
return Array.from(o.document.querySelectorAll(k)).some((D) => D === p.target || p.composedPath().includes(D));
|
|
396
396
|
{
|
|
397
|
-
const
|
|
398
|
-
return
|
|
397
|
+
const D = oe(k);
|
|
398
|
+
return D && (p.target === D || p.composedPath().includes(D));
|
|
399
399
|
}
|
|
400
400
|
});
|
|
401
|
-
function
|
|
401
|
+
function d(p) {
|
|
402
402
|
const k = F(p);
|
|
403
403
|
return k && k.$.subTree.shapeFlag === 16;
|
|
404
404
|
}
|
|
405
405
|
function f(p, k) {
|
|
406
|
-
const
|
|
406
|
+
const D = F(p), W = D.$.subTree && D.$.subTree.children;
|
|
407
407
|
return W == null || !Array.isArray(W) ? !1 : W.some((H) => H.el === k.target || k.composedPath().includes(H.el));
|
|
408
408
|
}
|
|
409
409
|
const x = (p) => {
|
|
410
410
|
const k = oe(e);
|
|
411
|
-
if (p.target != null && !(!(k instanceof Element) &&
|
|
412
|
-
if ("detail" in p && p.detail === 0 && (
|
|
413
|
-
|
|
411
|
+
if (p.target != null && !(!(k instanceof Element) && d(e) && f(e, p)) && !(!k || k === p.target || p.composedPath().includes(k))) {
|
|
412
|
+
if ("detail" in p && p.detail === 0 && (n = !r(p)), !n) {
|
|
413
|
+
n = !0;
|
|
414
414
|
return;
|
|
415
415
|
}
|
|
416
416
|
u(p);
|
|
@@ -418,30 +418,30 @@ function he(e, u, t = {}) {
|
|
|
418
418
|
};
|
|
419
419
|
let y = !1;
|
|
420
420
|
const b = [
|
|
421
|
-
ne(
|
|
421
|
+
ne(o, "click", (p) => {
|
|
422
422
|
y || (y = !0, setTimeout(() => {
|
|
423
423
|
y = !1;
|
|
424
424
|
}, 0), x(p));
|
|
425
425
|
}, { passive: !0, capture: l }),
|
|
426
|
-
ne(
|
|
426
|
+
ne(o, "pointerdown", (p) => {
|
|
427
427
|
const k = oe(e);
|
|
428
|
-
|
|
428
|
+
n = !r(p) && !!(k && !p.composedPath().includes(k));
|
|
429
429
|
}, { passive: !0 }),
|
|
430
|
-
|
|
430
|
+
i && ne(o, "blur", (p) => {
|
|
431
431
|
setTimeout(() => {
|
|
432
432
|
var k;
|
|
433
|
-
const
|
|
434
|
-
((k =
|
|
433
|
+
const D = oe(e);
|
|
434
|
+
((k = o.document.activeElement) == null ? void 0 : k.tagName) === "IFRAME" && !(D != null && D.contains(o.document.activeElement)) && u(p);
|
|
435
435
|
}, 0);
|
|
436
436
|
}, { passive: !0 })
|
|
437
437
|
].filter(Boolean), T = () => b.forEach((p) => p());
|
|
438
438
|
return s ? {
|
|
439
439
|
stop: T,
|
|
440
440
|
cancel: () => {
|
|
441
|
-
|
|
441
|
+
n = !1;
|
|
442
442
|
},
|
|
443
443
|
trigger: (p) => {
|
|
444
|
-
|
|
444
|
+
n = !0, x(p), n = !1;
|
|
445
445
|
}
|
|
446
446
|
} : T;
|
|
447
447
|
}
|
|
@@ -457,17 +457,17 @@ const tt = ["value", "onKeydown"], lt = { class: "flex absolute inset-y-0 right-
|
|
|
457
457
|
},
|
|
458
458
|
emits: ["update:modelValue", "blur-sm", "submit"],
|
|
459
459
|
setup(e, { emit: u }) {
|
|
460
|
-
const t = u,
|
|
460
|
+
const t = u, o = e, a = K(), i = (/* @__PURE__ */ (() => {
|
|
461
461
|
let V = 0;
|
|
462
462
|
return (P) => (P || "") + ++V;
|
|
463
|
-
})())((a.id || "autocomplete") + "-"), s = $([]),
|
|
463
|
+
})())((a.id || "autocomplete") + "-"), s = $([]), n = $(-1), r = $(0), d = $(!1), f = $(!1), x = $("top-0 translate-y-12"), y = $(!0), b = $(null), T = $(null), p = $(null), k = z(
|
|
464
464
|
() => s.value.map((V, P) => ({
|
|
465
465
|
id: (a.id || "autocomplete") + "-item-" + P,
|
|
466
|
-
class: [
|
|
466
|
+
class: [o.resultItemClass, { "bg-vxvue-700 text-white": n.value === P }],
|
|
467
467
|
role: "option",
|
|
468
|
-
...
|
|
468
|
+
...n.value === P ? { "aria-selected": "true" } : {}
|
|
469
469
|
}))
|
|
470
|
-
),
|
|
470
|
+
), D = z(() => ({
|
|
471
471
|
role: "combobox",
|
|
472
472
|
autocomplete: "off",
|
|
473
473
|
autocapitalize: "off",
|
|
@@ -475,56 +475,56 @@ const tt = ["value", "onKeydown"], lt = { class: "flex absolute inset-y-0 right-
|
|
|
475
475
|
spellcheck: "false",
|
|
476
476
|
"aria-autocomplete": "list",
|
|
477
477
|
"aria-haspopup": "listbox",
|
|
478
|
-
"aria-owns":
|
|
479
|
-
"aria-expanded":
|
|
480
|
-
"aria-activedescendant":
|
|
478
|
+
"aria-owns": i,
|
|
479
|
+
"aria-expanded": d.value ? "true" : "false",
|
|
480
|
+
"aria-activedescendant": n.value > -1 ? k.value[n.value].id : "",
|
|
481
481
|
...a
|
|
482
482
|
})), W = z(() => ({
|
|
483
|
-
id:
|
|
484
|
-
class: ["absolute min-w-full transform z-10",
|
|
483
|
+
id: i,
|
|
484
|
+
class: ["absolute min-w-full transform z-10", o.resultListClass, x.value],
|
|
485
485
|
role: "listbox"
|
|
486
486
|
})), H = () => {
|
|
487
|
-
|
|
487
|
+
n.value = -1, s.value = [], d.value = !1, y.value = !0;
|
|
488
488
|
}, S = (V) => {
|
|
489
|
-
const P =
|
|
489
|
+
const P = o.search(V);
|
|
490
490
|
if (P instanceof Promise) {
|
|
491
491
|
const G = ++r.value;
|
|
492
492
|
f.value = !0, P.then((U) => {
|
|
493
|
-
G === r.value && (s.value = U, f.value = !1, s.value.length ? (
|
|
493
|
+
G === r.value && (s.value = U, f.value = !1, s.value.length ? (n.value = o.autoSelect ? 0 : -1, d.value = !0) : H());
|
|
494
494
|
});
|
|
495
495
|
} else
|
|
496
|
-
s.value = P, s.value.length === 0 ? H() : (
|
|
496
|
+
s.value = P, s.value.length === 0 ? H() : (n.value = o.autoSelect ? 0 : -1, d.value = !0);
|
|
497
497
|
}, M = () => {
|
|
498
|
-
const V = s.value[
|
|
499
|
-
return V && t("update:modelValue",
|
|
500
|
-
},
|
|
498
|
+
const V = s.value[n.value];
|
|
499
|
+
return V && t("update:modelValue", o.getResultValue(V)), H(), V;
|
|
500
|
+
}, E = (V) => {
|
|
501
501
|
t("update:modelValue", V), S(V);
|
|
502
502
|
}, h = (V) => S(V.target.value), g = () => {
|
|
503
503
|
H(), t("blur-sm");
|
|
504
504
|
}, w = () => {
|
|
505
505
|
const V = s.value.length;
|
|
506
|
-
|
|
506
|
+
n.value = ((n.value - 1) % V + V) % V;
|
|
507
507
|
}, N = (V) => {
|
|
508
|
-
|
|
508
|
+
d.value || h(V);
|
|
509
509
|
const P = s.value.length;
|
|
510
|
-
|
|
510
|
+
n.value = ((n.value + 1) % P + P) % P;
|
|
511
511
|
}, q = () => {
|
|
512
512
|
H(), t("update:modelValue", "");
|
|
513
513
|
}, ae = () => t("submit", M()), Q = (V) => {
|
|
514
514
|
const P = V.target.closest("[data-result-index]");
|
|
515
|
-
P && (
|
|
515
|
+
P && (n.value = parseInt(P.dataset.resultIndex, 10), t("submit", M()));
|
|
516
516
|
};
|
|
517
|
-
return he(p, H),
|
|
517
|
+
return he(p, H), Ae(() => {
|
|
518
518
|
if (b.value) {
|
|
519
519
|
const V = T.value.getBoundingClientRect(), P = b.value.getBoundingClientRect();
|
|
520
520
|
y.value && s.value.length && (y.value = !1, x.value = V.bottom + P.height > window.innerHeight && window.innerHeight - V.bottom < V.top && window.pageYOffset + V.top - P.height > 0 ? "bottom-0 -translate-y-12" : "top-0 translate-y-12");
|
|
521
|
-
const G = b.value.querySelector('[data-result-index="' +
|
|
521
|
+
const G = b.value.querySelector('[data-result-index="' + n.value + '"]');
|
|
522
522
|
if (G) {
|
|
523
523
|
let U = G.getBoundingClientRect();
|
|
524
524
|
U.top < P.top ? b.value.scrollTop -= P.top - U.top : U.bottom > P.bottom && (b.value.scrollTop += U.bottom - P.bottom);
|
|
525
525
|
}
|
|
526
526
|
}
|
|
527
|
-
}), (V, P) => (
|
|
527
|
+
}), (V, P) => (c(), m("div", {
|
|
528
528
|
ref_key: "container",
|
|
529
529
|
ref: p,
|
|
530
530
|
class: C(["inline-block relative", V.$attrs.class])
|
|
@@ -534,8 +534,8 @@ const tt = ["value", "onKeydown"], lt = { class: "flex absolute inset-y-0 right-
|
|
|
534
534
|
ref: T,
|
|
535
535
|
class: "block pr-10 w-full form-input focus:border-vxvue",
|
|
536
536
|
value: e.modelValue
|
|
537
|
-
},
|
|
538
|
-
onInput: P[0] || (P[0] = (G) =>
|
|
537
|
+
}, D.value, {
|
|
538
|
+
onInput: P[0] || (P[0] = (G) => E(G.target.value)),
|
|
539
539
|
onKeydown: [
|
|
540
540
|
se(ae, ["enter"]),
|
|
541
541
|
se(q, ["esc"]),
|
|
@@ -547,12 +547,12 @@ const tt = ["value", "onKeydown"], lt = { class: "flex absolute inset-y-0 right-
|
|
|
547
547
|
onBlur: g
|
|
548
548
|
}), null, 16, tt),
|
|
549
549
|
v("span", lt, [
|
|
550
|
-
f.value ? (
|
|
550
|
+
f.value ? (c(), Z(we, {
|
|
551
551
|
key: 0,
|
|
552
552
|
class: "size-5"
|
|
553
553
|
})) : I("", !0)
|
|
554
554
|
]),
|
|
555
|
-
s.value.length ? (
|
|
555
|
+
s.value.length ? (c(), m("div", R({
|
|
556
556
|
key: 0,
|
|
557
557
|
ref_key: "resultList",
|
|
558
558
|
ref: b
|
|
@@ -561,12 +561,12 @@ const tt = ["value", "onKeydown"], lt = { class: "flex absolute inset-y-0 right-
|
|
|
561
561
|
onMousedown: P[1] || (P[1] = _(() => {
|
|
562
562
|
}, ["prevent"]))
|
|
563
563
|
}), [
|
|
564
|
-
(
|
|
564
|
+
(c(!0), m(O, null, j(s.value, (G, U) => (c(), m("div", { "data-result-index": U }, [
|
|
565
565
|
L(V.$slots, "result", {
|
|
566
566
|
result: G,
|
|
567
567
|
props: k.value[U]
|
|
568
568
|
}, () => [
|
|
569
|
-
(
|
|
569
|
+
(c(), m("div", R({
|
|
570
570
|
key: k.value[U].id,
|
|
571
571
|
ref_for: !0
|
|
572
572
|
}, k.value[U]), B(e.getResultValue(G)), 17))
|
|
@@ -577,14 +577,14 @@ const tt = ["value", "onKeydown"], lt = { class: "flex absolute inset-y-0 right-
|
|
|
577
577
|
}
|
|
578
578
|
}), Se = (e, u) => {
|
|
579
579
|
const t = e.__vccOpts || e;
|
|
580
|
-
for (const [
|
|
581
|
-
t[
|
|
580
|
+
for (const [o, a] of u)
|
|
581
|
+
t[o] = a;
|
|
582
582
|
return t;
|
|
583
583
|
}, st = {
|
|
584
584
|
__name: "VxVueTransition",
|
|
585
585
|
props: { name: { type: String, required: !0, validator: (e) => ["appear", "vert-fade"].includes(e) } },
|
|
586
586
|
setup(e) {
|
|
587
|
-
return (u, t) => (
|
|
587
|
+
return (u, t) => (c(), Z(Le, { name: e.name }, {
|
|
588
588
|
default: te(() => [
|
|
589
589
|
L(u.$slots, "default", {}, void 0, !0)
|
|
590
590
|
]),
|
|
@@ -616,31 +616,31 @@ const tt = ["value", "onKeydown"], lt = { class: "flex absolute inset-y-0 right-
|
|
|
616
616
|
}
|
|
617
617
|
},
|
|
618
618
|
setup(e, { expose: u }) {
|
|
619
|
-
const t = e,
|
|
620
|
-
let
|
|
621
|
-
const
|
|
622
|
-
l.value = !1, x.value !== void 0 ? x.value ?
|
|
619
|
+
const t = e, o = $(""), a = $(""), l = $(!1);
|
|
620
|
+
let i = null, s = null;
|
|
621
|
+
const n = z(() => Array.isArray(t.buttons) ? t.buttons : [t.buttons]), r = $(null), d = (x, y) => {
|
|
622
|
+
l.value = !1, x.value !== void 0 ? x.value ? i() : s() : y ? s() : i();
|
|
623
623
|
};
|
|
624
|
-
return u({ open: (x, y) => (
|
|
625
|
-
|
|
626
|
-
})) }), (x, y) => (
|
|
627
|
-
l.value ? (
|
|
624
|
+
return u({ open: (x, y) => (o.value = x, a.value = y, l.value = !0, ve(() => r.value.firstElementChild.focus()), new Promise((b, T) => {
|
|
625
|
+
i = b, s = T;
|
|
626
|
+
})) }), (x, y) => (c(), m(O, null, [
|
|
627
|
+
l.value ? (c(), m("div", nt)) : I("", !0),
|
|
628
628
|
Y(pe, { name: "appear" }, {
|
|
629
629
|
default: te(() => [
|
|
630
|
-
l.value ? (
|
|
630
|
+
l.value ? (c(), m("div", ot, [
|
|
631
631
|
v("div", rt, [
|
|
632
|
-
l.value ? (
|
|
632
|
+
l.value ? (c(), m("div", ut, [
|
|
633
633
|
y[0] || (y[0] = v("span", {
|
|
634
634
|
class: "hidden sm:inline-block sm:h-screen sm:align-middle",
|
|
635
635
|
"aria-hidden": "true"
|
|
636
636
|
}, "", -1)),
|
|
637
637
|
v("div", it, [
|
|
638
|
-
|
|
638
|
+
o.value || x.$slots.title ? (c(), m("h3", {
|
|
639
639
|
key: 0,
|
|
640
640
|
class: C(["py-4 pt-4 text-lg font-medium text-center sm:py-6", e.headerClass])
|
|
641
641
|
}, [
|
|
642
642
|
L(x.$slots, "title", {}, () => [
|
|
643
|
-
J(B(
|
|
643
|
+
J(B(o.value), 1)
|
|
644
644
|
])
|
|
645
645
|
], 2)) : I("", !0),
|
|
646
646
|
v("div", dt, [
|
|
@@ -659,10 +659,10 @@ const tt = ["value", "onKeydown"], lt = { class: "flex absolute inset-y-0 right-
|
|
|
659
659
|
ref: r,
|
|
660
660
|
class: "flex justify-center mt-5 space-x-2 sm:mt-6"
|
|
661
661
|
}, [
|
|
662
|
-
(
|
|
662
|
+
(c(!0), m(O, null, j(n.value, (b, T) => (c(), m("button", {
|
|
663
663
|
key: b.label,
|
|
664
664
|
class: C([e.buttonClass, b.class]),
|
|
665
|
-
onClick: _((p) =>
|
|
665
|
+
onClick: _((p) => d(b, T), ["prevent"])
|
|
666
666
|
}, B(b.label), 11, ft))), 128))
|
|
667
667
|
], 512)
|
|
668
668
|
])
|
|
@@ -677,30 +677,30 @@ const tt = ["value", "onKeydown"], lt = { class: "flex absolute inset-y-0 right-
|
|
|
677
677
|
}
|
|
678
678
|
};
|
|
679
679
|
function ht(e, u) {
|
|
680
|
-
const t = $(!1),
|
|
681
|
-
let a, l =
|
|
682
|
-
if ((a =
|
|
680
|
+
const t = $(!1), o = F(u);
|
|
681
|
+
let a, l = o.toLowerCase().replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), i = [];
|
|
682
|
+
if ((a = o.match(/\bd\b/gi)) && a.length === 1)
|
|
683
683
|
l = l.replace("d", "(\\d{1,2})");
|
|
684
|
-
else if ((a =
|
|
684
|
+
else if ((a = o.match(/\bdd\b/gi)) && a.length === 1)
|
|
685
685
|
l = l.replace("dd", "(\\d{2})");
|
|
686
686
|
else
|
|
687
687
|
return { date: t };
|
|
688
|
-
if (
|
|
688
|
+
if (i.push({ srcPos: o.toLowerCase().indexOf("d"), destPos: 2 }), (a = o.match(/\bm\b/gi)) && a.length === 1)
|
|
689
689
|
l = l.replace("m", "(\\d{1,2})");
|
|
690
|
-
else if ((a =
|
|
690
|
+
else if ((a = o.match(/\bmm\b/gi)) && a.length === 1)
|
|
691
691
|
l = l.replace("mm", "(\\d{2})");
|
|
692
692
|
else
|
|
693
693
|
return { date: t };
|
|
694
|
-
if (
|
|
694
|
+
if (i.push({ srcPos: o.toLowerCase().indexOf("m"), destPos: 1 }), (a = o.match(/\byyyy\b/gi)) && a.length === 1)
|
|
695
695
|
l = l.replace("yyyy", "(\\d{4})");
|
|
696
696
|
else
|
|
697
697
|
return { date: t };
|
|
698
|
-
if (
|
|
698
|
+
if (i.push({ srcPos: o.toLowerCase().indexOf("y"), destPos: 0 }), !(a = F(e).match(l)))
|
|
699
699
|
return { date: t };
|
|
700
|
-
a.shift(),
|
|
701
|
-
let s = [],
|
|
702
|
-
for (;
|
|
703
|
-
r =
|
|
700
|
+
a.shift(), i.sort((d, f) => d.srcPos < f.srcPos ? -1 : 1);
|
|
701
|
+
let s = [], n, r;
|
|
702
|
+
for (; n = a.shift(); )
|
|
703
|
+
r = i.shift(), s[r.destPos] = n;
|
|
704
704
|
return s = Date.parse(s.join("-")), s && (s = new Date(s), t.value = new Date(s.getFullYear(), s.getMonth(), s.getDate(), 0, 0, 0)), { date: t };
|
|
705
705
|
}
|
|
706
706
|
const pt = { key: 0 }, gt = { class: "text-vxvue-700" }, bt = ["disabled"], xt = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
@@ -713,50 +713,50 @@ const pt = { key: 0 }, gt = { class: "text-vxvue-700" }, bt = ["disabled"], xt =
|
|
|
713
713
|
},
|
|
714
714
|
emits: ["update:modelValue", "toggle-datepicker"],
|
|
715
715
|
setup(e, { emit: u }) {
|
|
716
|
-
const t = u,
|
|
716
|
+
const t = u, o = e, a = $(""), l = z(() => o.modelValue ? ge(o.modelValue, o.outputFormat) : ""), i = z(() => {
|
|
717
717
|
let s = Object.assign({}, K());
|
|
718
718
|
return delete s.class, s;
|
|
719
719
|
});
|
|
720
|
-
return X(() =>
|
|
720
|
+
return X(() => o.modelValue, (s) => a.value = s ? ge(s, o.outputFormat) : ""), (s, n) => (c(), m("div", {
|
|
721
721
|
class: C(["inline-block relative", s.$attrs.class])
|
|
722
722
|
}, [
|
|
723
|
-
l.value ? (
|
|
723
|
+
l.value ? (c(), m("div", pt, [
|
|
724
724
|
v("div", {
|
|
725
725
|
class: C(["block flex items-center w-full form-input bg-vxvue-50", { "pr-10": e.showToggle }])
|
|
726
726
|
}, [
|
|
727
727
|
v("span", gt, B(l.value), 1),
|
|
728
|
-
|
|
728
|
+
i.value.disabled ? I("", !0) : (c(), m("button", {
|
|
729
729
|
key: 0,
|
|
730
730
|
class: "inline-flex shrink-0 justify-center items-center ml-2 rounded-full focus:text-white focus:outline-hidden size-4 text-vxvue hover:bg-vxvue-100 hover:text-vue-700 focus:bg-vxvue-700",
|
|
731
|
-
onClick:
|
|
731
|
+
onClick: n[0] || (n[0] = (r) => t("update:modelValue", null))
|
|
732
732
|
}, [
|
|
733
|
-
Y(
|
|
733
|
+
Y(A(fe), { class: "size-4" })
|
|
734
734
|
]))
|
|
735
735
|
], 2)
|
|
736
|
-
])) : xe((
|
|
736
|
+
])) : xe((c(), m("input", R({
|
|
737
737
|
key: 1,
|
|
738
|
-
"onUpdate:modelValue":
|
|
738
|
+
"onUpdate:modelValue": n[1] || (n[1] = (r) => a.value = r),
|
|
739
739
|
type: "text",
|
|
740
740
|
class: ["block w-full form-input peer focus:border-vxvue", { "pr-10": e.showToggle }]
|
|
741
|
-
},
|
|
742
|
-
onBlur:
|
|
743
|
-
var
|
|
744
|
-
return t("update:modelValue", ((
|
|
741
|
+
}, i.value, {
|
|
742
|
+
onBlur: n[2] || (n[2] = (r) => {
|
|
743
|
+
var d;
|
|
744
|
+
return t("update:modelValue", ((d = A(ht)(a.value, o.inputFormat).date) == null ? void 0 : d.value) || null);
|
|
745
745
|
}),
|
|
746
|
-
onInput:
|
|
746
|
+
onInput: n[3] || (n[3] = _(() => {
|
|
747
747
|
}, ["prevent"]))
|
|
748
748
|
}), null, 16)), [
|
|
749
749
|
[Te, a.value]
|
|
750
750
|
]),
|
|
751
|
-
e.showToggle ? (
|
|
751
|
+
e.showToggle ? (c(), m("button", {
|
|
752
752
|
key: 2,
|
|
753
753
|
ref: "toggleButton",
|
|
754
|
-
class: C(["flex absolute inset-y-0 right-0 items-center px-2 text-vxvue-700",
|
|
755
|
-
disabled:
|
|
754
|
+
class: C(["flex absolute inset-y-0 right-0 items-center px-2 text-vxvue-700", i.value.disabled ? "cursor-not-allowed" : "hover:text-vxvue"]),
|
|
755
|
+
disabled: i.value.disabled,
|
|
756
756
|
"aria-label": "datepicker-toggle",
|
|
757
|
-
onClick:
|
|
757
|
+
onClick: n[4] || (n[4] = _((r) => t("toggle-datepicker"), ["stop"]))
|
|
758
758
|
}, [
|
|
759
|
-
Y(
|
|
759
|
+
Y(A(Ie), { class: "size-6" })
|
|
760
760
|
], 10, bt)) : I("", !0),
|
|
761
761
|
L(s.$slots, "default")
|
|
762
762
|
], 2));
|
|
@@ -777,10 +777,10 @@ const pt = { key: 0 }, gt = { class: "text-vxvue-700" }, bt = ["disabled"], xt =
|
|
|
777
777
|
},
|
|
778
778
|
emits: ["update:modelValue", "month-change", "year-change"],
|
|
779
779
|
setup(e, { emit: u }) {
|
|
780
|
-
const t = e,
|
|
780
|
+
const t = e, o = u, a = (() => {
|
|
781
781
|
const h = /* @__PURE__ */ new Date();
|
|
782
782
|
return new Date(h.getFullYear(), h.getMonth(), h.getDate());
|
|
783
|
-
})(), l = $(null),
|
|
783
|
+
})(), l = $(null), i = $([]), s = $(!1), n = $("days"), r = $(0), d = $({ horiz: "left-0", vert: "top-0" }), f = $(null), x = $(null), y = $(null), b = z(() => t.hasInput && t.maxNumberOfValues === 1), T = z(() => b.value ? { class: ["absolute", s.value ? "block" : "hidden"] } : {}), p = z(() => {
|
|
784
784
|
const h = [], g = l.value.getFullYear(), w = l.value.getMonth(), N = new Date(g, w + 1, 0), q = new Date(g, w, 0).getDay() + 1 - t.startOfWeekIndex, ae = (6 + t.startOfWeekIndex - N.getDay()) % 7;
|
|
785
785
|
for (let Q = -q, V = N.getDate() + ae; Q < V; ++Q)
|
|
786
786
|
h.push(new Date(g, w, Q + 1));
|
|
@@ -789,41 +789,41 @@ const pt = { key: 0 }, gt = { class: "text-vxvue-700" }, bt = ["disabled"], xt =
|
|
|
789
789
|
X(() => t.modelValue, (h) => {
|
|
790
790
|
if (h)
|
|
791
791
|
if (Array.isArray(h)) {
|
|
792
|
-
const g = [], w =
|
|
792
|
+
const g = [], w = i.value;
|
|
793
793
|
h.forEach((N) => {
|
|
794
794
|
N && g.push(new Date(N.getFullYear(), N.getMonth(), N.getDate()));
|
|
795
|
-
}), (g.length !== w.length || ![.../* @__PURE__ */ new Set([...g, ...w])].every((N) => g.filter((q) => q.getTime() === N.getTime()).length === w.filter((q) => q.getTime() === N.getTime()).length)) && (
|
|
795
|
+
}), (g.length !== w.length || ![.../* @__PURE__ */ new Set([...g, ...w])].every((N) => g.filter((q) => q.getTime() === N.getTime()).length === w.filter((q) => q.getTime() === N.getTime()).length)) && (i.value = g, l.value = new Date((g[0] || a).getTime()), l.value.setDate(1));
|
|
796
796
|
} else
|
|
797
|
-
|
|
797
|
+
i.value = [new Date(h.getFullYear(), h.getMonth(), h.getDate())], l.value = new Date(h.getFullYear(), h.getMonth(), 1);
|
|
798
798
|
else
|
|
799
|
-
|
|
799
|
+
i.value = [], l.value = new Date(a.getFullYear(), a.getMonth(), 1);
|
|
800
800
|
}, { immediate: !0 }), X(() => t.shownMonth, (h) => {
|
|
801
801
|
l.value = new Date((h || a).getTime()), l.value.setDate(1);
|
|
802
802
|
}, { immediate: !0 }), X(s, (h) => {
|
|
803
803
|
h && b.value && ve(() => {
|
|
804
804
|
const g = f.value.$el.getBoundingClientRect(), w = x.value.getBoundingClientRect();
|
|
805
|
-
|
|
805
|
+
d.value = {
|
|
806
806
|
horiz: g.right - w.width < 0 ? "left-0" : "right-0",
|
|
807
807
|
vert: g.bottom + w.height > window.innerHeight ? "bottom-0 -translate-y-12" : "top-0 translate-y-12"
|
|
808
808
|
};
|
|
809
809
|
});
|
|
810
810
|
}), he(x, () => {
|
|
811
|
-
s.value = !1,
|
|
811
|
+
s.value = !1, n.value = "days";
|
|
812
812
|
}, { ignore: [y] });
|
|
813
|
-
const
|
|
814
|
-
l.value = new Date(l.value.getFullYear(), h, 1),
|
|
813
|
+
const D = (h) => {
|
|
814
|
+
l.value = new Date(l.value.getFullYear(), h, 1), o("month-change", l.value);
|
|
815
815
|
}, W = (h) => {
|
|
816
|
-
l.value = new Date(h, l.value.getMonth(), 1),
|
|
817
|
-
}, H = (h) =>
|
|
816
|
+
l.value = new Date(h, l.value.getMonth(), 1), o("year-change", l.value);
|
|
817
|
+
}, H = (h) => o("update:modelValue", h), S = (h) => {
|
|
818
818
|
if (s.value = !1, t.maxNumberOfValues === 1)
|
|
819
|
-
|
|
819
|
+
o("update:modelValue", h);
|
|
820
820
|
else {
|
|
821
|
-
const g =
|
|
821
|
+
const g = i.value;
|
|
822
822
|
let w = g.findIndex((N) => N.getTime() === h.getTime());
|
|
823
|
-
w !== -1 ? g.splice(w, 1) : g.length < t.maxNumberOfValues && g.push(h),
|
|
823
|
+
w !== -1 ? g.splice(w, 1) : g.length < t.maxNumberOfValues && g.push(h), o("update:modelValue", g);
|
|
824
824
|
}
|
|
825
|
-
}, M = (h) =>
|
|
826
|
-
const g = h.getMonth() !== l.value.getMonth(), w = M(h), N = h.getTime() === a.getTime(), q = t.validFrom && t.validFrom > h || t.validUntil && t.validUntil < h, ae = !w && t.maxNumberOfValues > 1 &&
|
|
825
|
+
}, M = (h) => i.value.find((g) => (g == null ? void 0 : g.getTime()) === h.getTime()), E = (h) => {
|
|
826
|
+
const g = h.getMonth() !== l.value.getMonth(), w = M(h), N = h.getTime() === a.getTime(), q = t.validFrom && t.validFrom > h || t.validUntil && t.validUntil < h, ae = !w && t.maxNumberOfValues > 1 && i.value.length === t.maxNumberOfValues, Q = t.highlightRange && h > Math.min(...i.value) && h < Math.max(...i.value);
|
|
827
827
|
return {
|
|
828
828
|
"cursor-not-allowed": q || ae,
|
|
829
829
|
"text-vxvue-700": !q && !g && !N && !w,
|
|
@@ -838,13 +838,13 @@ const pt = { key: 0 }, gt = { class: "text-vxvue-700" }, bt = ["disabled"], xt =
|
|
|
838
838
|
return me(() => {
|
|
839
839
|
var h;
|
|
840
840
|
return y.value = (h = f.value) == null ? void 0 : h.$refs.toggleButton;
|
|
841
|
-
}), (h, g) => (
|
|
841
|
+
}), (h, g) => (c(), m("div", {
|
|
842
842
|
class: C(["relative", h.$attrs.class])
|
|
843
843
|
}, [
|
|
844
|
-
b.value ? (
|
|
844
|
+
b.value ? (c(), Z(xt, R({ key: 0 }, h.$attrs, {
|
|
845
845
|
ref_key: "input",
|
|
846
846
|
ref: f,
|
|
847
|
-
"model-value":
|
|
847
|
+
"model-value": i.value[0],
|
|
848
848
|
"show-toggle": !0,
|
|
849
849
|
class: "w-full",
|
|
850
850
|
onToggleDatepicker: g[0] || (g[0] = (w) => s.value = !s.value),
|
|
@@ -858,23 +858,23 @@ const pt = { key: 0 }, gt = { class: "text-vxvue-700" }, bt = ["disabled"], xt =
|
|
|
858
858
|
v("div", R(T.value, {
|
|
859
859
|
ref_key: "calendar",
|
|
860
860
|
ref: x,
|
|
861
|
-
class: ["overflow-hidden z-10 bg-white rounded-sm shadow-md min-w-72 sm:min-w-80", [
|
|
861
|
+
class: ["overflow-hidden z-10 bg-white rounded-sm shadow-md min-w-72 sm:min-w-80", [d.value.horiz, d.value.vert]]
|
|
862
862
|
}), [
|
|
863
|
-
|
|
863
|
+
n.value === "days" ? (c(), m(O, { key: 0 }, [
|
|
864
864
|
v("div", yt, [
|
|
865
865
|
v("div", wt, [
|
|
866
866
|
v("button", {
|
|
867
867
|
class: "shrink-0 text-vxvue-100 hover:text-vxvue-50",
|
|
868
|
-
onClick: g[1] || (g[1] = _((w) =>
|
|
868
|
+
onClick: g[1] || (g[1] = _((w) => D(l.value.getMonth() - 1), ["stop"]))
|
|
869
869
|
}, [
|
|
870
|
-
Y(
|
|
870
|
+
Y(A(ie), { class: "size-6" })
|
|
871
871
|
]),
|
|
872
872
|
v("span", null, B(l.value.toLocaleString(e.locale, { month: "long" })), 1),
|
|
873
873
|
v("button", {
|
|
874
874
|
class: "shrink-0 text-vxvue-100 hover:text-vxvue-50",
|
|
875
|
-
onClick: g[2] || (g[2] = _((w) =>
|
|
875
|
+
onClick: g[2] || (g[2] = _((w) => D(l.value.getMonth() + 1), ["stop"]))
|
|
876
876
|
}, [
|
|
877
|
-
Y(
|
|
877
|
+
Y(A(re), { class: "size-6" })
|
|
878
878
|
])
|
|
879
879
|
]),
|
|
880
880
|
v("div", kt, [
|
|
@@ -882,60 +882,60 @@ const pt = { key: 0 }, gt = { class: "text-vxvue-700" }, bt = ["disabled"], xt =
|
|
|
882
882
|
class: "shrink-0 text-vxvue-100 hover:text-vxvue-50",
|
|
883
883
|
onClick: g[3] || (g[3] = _((w) => W(l.value.getFullYear() - 1), ["stop"]))
|
|
884
884
|
}, [
|
|
885
|
-
Y(
|
|
885
|
+
Y(A(ie), { class: "size-6" })
|
|
886
886
|
]),
|
|
887
887
|
v("button", {
|
|
888
888
|
class: "text-vxvue-100 hover:text-vxvue-50",
|
|
889
889
|
onClick: g[4] || (g[4] = (w) => {
|
|
890
|
-
|
|
890
|
+
n.value = "years", r.value = l.value.getFullYear();
|
|
891
891
|
})
|
|
892
892
|
}, B(l.value.getFullYear()), 1),
|
|
893
893
|
v("button", {
|
|
894
894
|
class: "shrink-0 text-vxvue-100 hover:text-vxvue-50",
|
|
895
895
|
onClick: g[5] || (g[5] = _((w) => W(l.value.getFullYear() + 1), ["stop"]))
|
|
896
896
|
}, [
|
|
897
|
-
Y(
|
|
897
|
+
Y(A(re), { class: "size-6" })
|
|
898
898
|
])
|
|
899
899
|
])
|
|
900
900
|
]),
|
|
901
901
|
v("div", $t, [
|
|
902
|
-
(
|
|
902
|
+
(c(!0), m(O, null, j(k.value, (w, N) => (c(), m("div", {
|
|
903
903
|
key: N,
|
|
904
904
|
class: "py-2 text-center bg-gray-200"
|
|
905
905
|
}, B(w), 1))), 128)),
|
|
906
|
-
(
|
|
906
|
+
(c(!0), m(O, null, j(p.value, (w) => (c(), m("button", {
|
|
907
907
|
key: w,
|
|
908
|
-
class: C(["py-2 rounded-xs block text-center",
|
|
909
|
-
disabled: e.validFrom && e.validFrom > w || e.validUntil && e.validUntil < w || e.maxNumberOfValues > 1 &&
|
|
908
|
+
class: C(["py-2 rounded-xs block text-center", E(w)]),
|
|
909
|
+
disabled: e.validFrom && e.validFrom > w || e.validUntil && e.validUntil < w || e.maxNumberOfValues > 1 && i.value.length === e.maxNumberOfValues && !M(w),
|
|
910
910
|
onClick: _((N) => S(w), ["stop"])
|
|
911
911
|
}, B(w.getDate()), 11, St))), 128))
|
|
912
912
|
])
|
|
913
913
|
], 64)) : I("", !0),
|
|
914
|
-
|
|
914
|
+
n.value === "years" ? (c(), m(O, { key: 1 }, [
|
|
915
915
|
v("div", Ct, [
|
|
916
916
|
v("button", {
|
|
917
917
|
class: "shrink-0 text-vxvue-100 hover:text-vxvue-50",
|
|
918
918
|
onClick: g[6] || (g[6] = _((w) => r.value -= 10, ["stop"]))
|
|
919
919
|
}, [
|
|
920
|
-
Y(
|
|
920
|
+
Y(A(ie), { class: "size-6" })
|
|
921
921
|
]),
|
|
922
922
|
v("span", null, B(r.value) + " - " + B(r.value + 9), 1),
|
|
923
923
|
v("button", {
|
|
924
924
|
class: "shrink-0 text-vxvue-100 hover:text-vxvue-50",
|
|
925
925
|
onClick: g[7] || (g[7] = _((w) => r.value += 10, ["stop"]))
|
|
926
926
|
}, [
|
|
927
|
-
Y(
|
|
927
|
+
Y(A(re), { class: "size-6" })
|
|
928
928
|
])
|
|
929
929
|
]),
|
|
930
930
|
v("div", Mt, [
|
|
931
|
-
(
|
|
931
|
+
(c(), m(O, null, j(10, (w) => v("div", {
|
|
932
932
|
key: w,
|
|
933
933
|
class: "text-center hover:ring-2 text-vxvue-700 hover:ring-vxvue"
|
|
934
934
|
}, [
|
|
935
935
|
v("button", {
|
|
936
936
|
class: "py-2 px-3",
|
|
937
937
|
onClick: _((N) => {
|
|
938
|
-
W(r.value + w - 1),
|
|
938
|
+
W(r.value + w - 1), n.value = "days";
|
|
939
939
|
}, ["stop"])
|
|
940
940
|
}, B(r.value + w - 1), 9, Vt)
|
|
941
941
|
])), 64))
|
|
@@ -944,7 +944,7 @@ const pt = { key: 0 }, gt = { class: "text-vxvue-700" }, bt = ["disabled"], xt =
|
|
|
944
944
|
], 16)
|
|
945
945
|
], 2));
|
|
946
946
|
}
|
|
947
|
-
}),
|
|
947
|
+
}), Dt = ["for"], At = ["id", "multiple", "accept"], Vl = {
|
|
948
948
|
__name: "FormFileButton",
|
|
949
949
|
props: {
|
|
950
950
|
modelValue: { type: Array, default: () => [] },
|
|
@@ -955,20 +955,20 @@ const pt = { key: 0 }, gt = { class: "text-vxvue-700" }, bt = ["disabled"], xt =
|
|
|
955
955
|
},
|
|
956
956
|
emits: ["update:modelValue", "form-data"],
|
|
957
957
|
setup(e, { emit: u }) {
|
|
958
|
-
const t = u,
|
|
958
|
+
const t = u, o = e, a = (i) => {
|
|
959
959
|
const s = new FormData();
|
|
960
|
-
for (let
|
|
961
|
-
s.append(
|
|
960
|
+
for (let n of i)
|
|
961
|
+
s.append(o.name, n, n.name);
|
|
962
962
|
return s;
|
|
963
|
-
}, l = (
|
|
964
|
-
const s =
|
|
963
|
+
}, l = (i) => {
|
|
964
|
+
const s = i.target.files || i.dataTransfer.files;
|
|
965
965
|
if (s) {
|
|
966
|
-
const
|
|
967
|
-
t("update:modelValue",
|
|
966
|
+
const n = [...s];
|
|
967
|
+
t("update:modelValue", n), t("form-data", a(n));
|
|
968
968
|
}
|
|
969
969
|
};
|
|
970
|
-
return (
|
|
971
|
-
L(
|
|
970
|
+
return (i, s) => (c(), m("label", { for: e.id }, [
|
|
971
|
+
L(i.$slots, "default", {}, () => [
|
|
972
972
|
s[0] || (s[0] = J("Upload"))
|
|
973
973
|
]),
|
|
974
974
|
v("input", {
|
|
@@ -978,8 +978,8 @@ const pt = { key: 0 }, gt = { class: "text-vxvue-700" }, bt = ["disabled"], xt =
|
|
|
978
978
|
accept: e.accept,
|
|
979
979
|
class: "hidden",
|
|
980
980
|
onChange: l
|
|
981
|
-
}, null, 40,
|
|
982
|
-
], 8,
|
|
981
|
+
}, null, 40, At)
|
|
982
|
+
], 8, Dt));
|
|
983
983
|
}
|
|
984
984
|
}, Lt = ["value"], Tt = {
|
|
985
985
|
key: 0,
|
|
@@ -995,29 +995,29 @@ const pt = { key: 0 }, gt = { class: "text-vxvue-700" }, bt = ["disabled"], xt =
|
|
|
995
995
|
emits: ["update:modelValue"],
|
|
996
996
|
setup(e, { emit: u }) {
|
|
997
997
|
const t = u;
|
|
998
|
-
return (
|
|
998
|
+
return (o, a) => (c(), m("select", R(o.$attrs, {
|
|
999
999
|
value: e.modelValue,
|
|
1000
1000
|
class: "form-select",
|
|
1001
1001
|
onChange: a[0] || (a[0] = (l) => t("update:modelValue", l.target.value))
|
|
1002
1002
|
}), [
|
|
1003
|
-
e.disabledLabel ? (
|
|
1004
|
-
(
|
|
1003
|
+
e.disabledLabel ? (c(), m("option", Tt, B(e.disabledLabel), 1)) : I("", !0),
|
|
1004
|
+
(c(!0), m(O, null, j(e.options, (l) => (c(), m("option", {
|
|
1005
1005
|
key: l.key !== void 0 ? l.key : l.label || l,
|
|
1006
1006
|
selected: (l.key !== void 0 ? l.key : l.label || l) === e.modelValue,
|
|
1007
1007
|
value: l.key !== void 0 ? l.key : l.label || l
|
|
1008
1008
|
}, B(l.label || l), 9, Pt))), 128))
|
|
1009
1009
|
], 16, Lt));
|
|
1010
1010
|
}
|
|
1011
|
-
}, zt = ["aria-checked", "aria-label"], It = ["d"], Nt = ["checked"],
|
|
1011
|
+
}, zt = ["aria-checked", "aria-label"], It = ["d"], Nt = ["checked"], Dl = {
|
|
1012
1012
|
__name: "FormSwitch",
|
|
1013
1013
|
props: { modelValue: Boolean },
|
|
1014
1014
|
emits: ["update:modelValue"],
|
|
1015
1015
|
setup(e, { emit: u }) {
|
|
1016
|
-
const t = u,
|
|
1016
|
+
const t = u, o = z(() => {
|
|
1017
1017
|
let l = Object.assign({}, K());
|
|
1018
1018
|
return delete l.class, l;
|
|
1019
1019
|
}), a = z(() => K().disabled || K().disabled === "");
|
|
1020
|
-
return (l,
|
|
1020
|
+
return (l, i) => (c(), m("label", {
|
|
1021
1021
|
class: C(l.$attrs.class),
|
|
1022
1022
|
tabindex: "0"
|
|
1023
1023
|
}, [
|
|
@@ -1039,7 +1039,7 @@ const pt = { key: 0 }, gt = { class: "text-vxvue-700" }, bt = ["disabled"], xt =
|
|
|
1039
1039
|
])
|
|
1040
1040
|
}, [
|
|
1041
1041
|
L(l.$slots, "handle", {}, () => [
|
|
1042
|
-
(
|
|
1042
|
+
(c(), m("svg", {
|
|
1043
1043
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1044
1044
|
fill: "none",
|
|
1045
1045
|
viewBox: "0 0 24 24",
|
|
@@ -1055,21 +1055,21 @@ const pt = { key: 0 }, gt = { class: "text-vxvue-700" }, bt = ["disabled"], xt =
|
|
|
1055
1055
|
], 2))
|
|
1056
1056
|
])
|
|
1057
1057
|
], 2),
|
|
1058
|
-
v("input", R(
|
|
1058
|
+
v("input", R(o.value, {
|
|
1059
1059
|
checked: e.modelValue,
|
|
1060
1060
|
class: "hidden",
|
|
1061
1061
|
value: "1",
|
|
1062
1062
|
type: "checkbox",
|
|
1063
|
-
onChange:
|
|
1063
|
+
onChange: i[0] || (i[0] = (s) => t("update:modelValue", s.target.checked))
|
|
1064
1064
|
}), null, 16, Nt)
|
|
1065
1065
|
], 10, zt),
|
|
1066
1066
|
L(l.$slots, "default")
|
|
1067
1067
|
], 2));
|
|
1068
1068
|
}
|
|
1069
|
-
},
|
|
1069
|
+
}, Ot = {
|
|
1070
1070
|
"aria-live": "assertive",
|
|
1071
1071
|
class: "flex fixed inset-0 z-50 items-start py-6 px-4 pointer-events-none sm:p-6"
|
|
1072
|
-
}, Ft = { class: "flex flex-col items-center space-y-4 w-full" },
|
|
1072
|
+
}, Ft = { class: "flex flex-col items-center space-y-4 w-full" }, Et = { class: "p-4" }, _t = { class: "flex items-start" }, jt = { class: "shrink-0" }, Yt = { class: "flex-1 pt-0.5 ml-3 w-0" }, Rt = { class: "font-bold" }, Ht = { class: "mt-1" }, Zt = { class: "flex shrink-0 ml-4" }, Al = /* @__PURE__ */ Object.assign({
|
|
1073
1073
|
inheritAttrs: !1
|
|
1074
1074
|
}, {
|
|
1075
1075
|
__name: "MessageToast",
|
|
@@ -1082,46 +1082,46 @@ const pt = { key: 0 }, gt = { class: "text-vxvue-700" }, bt = ["disabled"], xt =
|
|
|
1082
1082
|
},
|
|
1083
1083
|
emits: ["timeout", "close"],
|
|
1084
1084
|
setup(e, { emit: u }) {
|
|
1085
|
-
const t = e,
|
|
1086
|
-
let
|
|
1085
|
+
const t = e, o = u, a = z(() => typeof t.message == "string" ? [t.message] : t.message), l = $(0);
|
|
1086
|
+
let i = null;
|
|
1087
1087
|
const s = () => {
|
|
1088
|
-
window.clearTimeout(
|
|
1089
|
-
|
|
1088
|
+
window.clearTimeout(i), l.value = 100, t.active && t.timeout && (i = window.setTimeout(() => {
|
|
1089
|
+
o("timeout");
|
|
1090
1090
|
}, t.timeout), window.setTimeout(() => l.value = 0, 0));
|
|
1091
1091
|
};
|
|
1092
|
-
return X(() => t.active, s), me(s), (
|
|
1092
|
+
return X(() => t.active, s), me(s), (n, r) => (c(), m("div", Ot, [
|
|
1093
1093
|
v("div", Ft, [
|
|
1094
1094
|
Y(pe, { name: "vert-fade" }, {
|
|
1095
1095
|
default: te(() => [
|
|
1096
|
-
e.active ? (
|
|
1096
|
+
e.active ? (c(), m("div", {
|
|
1097
1097
|
key: 0,
|
|
1098
|
-
class: C(["overflow-hidden w-full max-w-sm rounded-md ring-1 ring-black/5 shadow-lg pointer-events-auto",
|
|
1098
|
+
class: C(["overflow-hidden w-full max-w-sm rounded-md ring-1 ring-black/5 shadow-lg pointer-events-auto", n.$attrs.class])
|
|
1099
1099
|
}, [
|
|
1100
|
-
v("div",
|
|
1100
|
+
v("div", Et, [
|
|
1101
1101
|
v("div", _t, [
|
|
1102
1102
|
v("div", jt, [
|
|
1103
|
-
L(
|
|
1103
|
+
L(n.$slots, "icon")
|
|
1104
1104
|
]),
|
|
1105
1105
|
v("div", Yt, [
|
|
1106
|
-
L(
|
|
1106
|
+
L(n.$slots, "title", {}, () => [
|
|
1107
1107
|
v("div", Rt, B(e.title), 1)
|
|
1108
1108
|
]),
|
|
1109
|
-
L(
|
|
1110
|
-
(
|
|
1109
|
+
L(n.$slots, "default", {}, () => [
|
|
1110
|
+
(c(!0), m(O, null, j(a.value, (d) => (c(), m("p", Ht, B(d), 1))), 256))
|
|
1111
1111
|
])
|
|
1112
1112
|
]),
|
|
1113
1113
|
v("div", Zt, [
|
|
1114
1114
|
v("button", {
|
|
1115
1115
|
class: "inline-flex text-white bg-black/20 rounded-xs focus:ring-2 focus:outline-hidden hover:text-stone-200 focus:ring-stone-200",
|
|
1116
|
-
onClick: r[0] || (r[0] = (
|
|
1116
|
+
onClick: r[0] || (r[0] = (d) => o("close"))
|
|
1117
1117
|
}, [
|
|
1118
1118
|
r[1] || (r[1] = v("span", { class: "sr-only" }, "Close", -1)),
|
|
1119
|
-
Y(
|
|
1119
|
+
Y(A(fe), { class: "size-5" })
|
|
1120
1120
|
])
|
|
1121
1121
|
])
|
|
1122
1122
|
])
|
|
1123
1123
|
]),
|
|
1124
|
-
e.showTimeoutProgress && e.timeout ? (
|
|
1124
|
+
e.showTimeoutProgress && e.timeout ? (c(), m("div", {
|
|
1125
1125
|
key: 0,
|
|
1126
1126
|
class: "h-1 transition-all ease-linear bg-vxvue-alt",
|
|
1127
1127
|
style: ye({
|
|
@@ -1156,16 +1156,16 @@ const pt = { key: 0 }, gt = { class: "text-vxvue-700" }, bt = ["disabled"], xt =
|
|
|
1156
1156
|
},
|
|
1157
1157
|
emits: ["clicked-outside"],
|
|
1158
1158
|
setup(e, { emit: u }) {
|
|
1159
|
-
const t = u,
|
|
1160
|
-
return he(
|
|
1161
|
-
e.show ? (
|
|
1159
|
+
const t = u, o = $(null);
|
|
1160
|
+
return he(o, () => t("clicked-outside")), (a, l) => (c(), m(O, null, [
|
|
1161
|
+
e.show ? (c(), m("div", Wt)) : I("", !0),
|
|
1162
1162
|
Y(pe, { name: "appear" }, {
|
|
1163
1163
|
default: te(() => [
|
|
1164
|
-
e.show ? (
|
|
1164
|
+
e.show ? (c(), m("div", qt, [
|
|
1165
1165
|
v("div", Ut, [
|
|
1166
1166
|
v("div", {
|
|
1167
1167
|
ref_key: "container",
|
|
1168
|
-
ref:
|
|
1168
|
+
ref: o,
|
|
1169
1169
|
class: C(["overflow-hidden relative max-w-full bg-white rounded-sm ring-1 ring-black/10 shadow-xl transition-all transform xl:max-w-(--breakpoint-xl)", e.containerClass])
|
|
1170
1170
|
}, [
|
|
1171
1171
|
v("div", {
|
|
@@ -1200,45 +1200,45 @@ const pt = { key: 0 }, gt = { class: "text-vxvue-700" }, bt = ["disabled"], xt =
|
|
|
1200
1200
|
},
|
|
1201
1201
|
emits: ["update:page"],
|
|
1202
1202
|
setup(e, { emit: u }) {
|
|
1203
|
-
const t = u,
|
|
1204
|
-
let
|
|
1205
|
-
if (
|
|
1203
|
+
const t = u, o = e, a = $(Math.ceil(o.total / o.perPage)), l = $(null), i = z(() => (o.markerPosition === "above" ? "border-t-4 -mt-[4px]" : "border-b-4 -mb-[4px]") + " py-4"), s = z(() => {
|
|
1204
|
+
let d = [1];
|
|
1205
|
+
if (o.showAllPages || a.value <= 7) {
|
|
1206
1206
|
for (let f = 2; f <= a.value; ++f)
|
|
1207
|
-
|
|
1208
|
-
return
|
|
1207
|
+
d.push(f);
|
|
1208
|
+
return d;
|
|
1209
1209
|
}
|
|
1210
|
-
return l.value >= a.value ?
|
|
1211
|
-
}),
|
|
1210
|
+
return l.value >= a.value ? d.push("dots", l.value - 2, l.value - 1) : l.value - 1 && l.value - 1 > 1 && (l.value > 1 && d.push("dots"), d.push(l.value - 1)), l.value > 1 && d.push(l.value), l.value + 1 < a.value && (d.push(l.value + 1), l.value <= 1 && d.push(l.value + 2), l.value + 2 < a.value && d.push("dots")), l.value < a.value && d.push(a.value), d;
|
|
1211
|
+
}), n = () => {
|
|
1212
1212
|
l.value > 1 && t("update:page", l.value - 1);
|
|
1213
1213
|
}, r = () => {
|
|
1214
1214
|
l.value < a.value && t("update:page", l.value + 1);
|
|
1215
1215
|
};
|
|
1216
|
-
return X(() =>
|
|
1217
|
-
a.value = Math.ceil(
|
|
1218
|
-
}), X(() =>
|
|
1219
|
-
a.value = Math.ceil(
|
|
1220
|
-
}), (
|
|
1216
|
+
return X(() => o.page, (d) => l.value = Math.min(Math.max(d, 1), a.value), { immediate: !0 }), X(() => o.perPage, (d) => {
|
|
1217
|
+
a.value = Math.ceil(o.total / o.perPage), t("update:page", 1);
|
|
1218
|
+
}), X(() => o.total, (d) => {
|
|
1219
|
+
a.value = Math.ceil(o.total / o.perPage), l.value > a.value && t("update:page", a.value);
|
|
1220
|
+
}), (d, f) => (c(), m("nav", Kt, [
|
|
1221
1221
|
v("div", Xt, [
|
|
1222
|
-
e.showNavButtons ? (
|
|
1222
|
+
e.showNavButtons ? (c(), m("button", {
|
|
1223
1223
|
key: 0,
|
|
1224
1224
|
disabled: l.value <= 1,
|
|
1225
1225
|
class: C([
|
|
1226
1226
|
l.value <= 1 ? "pointer-events-none text-gray-500" : "text-vxvue-700",
|
|
1227
1227
|
"inline-flex items-center pr-1 text-sm border-transparent hover:text-vxvue"
|
|
1228
1228
|
]),
|
|
1229
|
-
onClick:
|
|
1229
|
+
onClick: n
|
|
1230
1230
|
}, [
|
|
1231
|
-
Y(
|
|
1231
|
+
Y(A(ie), { class: "size-5" }),
|
|
1232
1232
|
J(" " + B(e.prevText), 1)
|
|
1233
1233
|
], 10, Gt)) : I("", !0)
|
|
1234
1234
|
]),
|
|
1235
1235
|
v("div", Jt, [
|
|
1236
|
-
(
|
|
1236
|
+
(c(!0), m(O, null, j(s.value, (x, y) => (c(), Z(de(e.page !== "dots" ? "button" : "span"), {
|
|
1237
1237
|
key: y,
|
|
1238
1238
|
class: C([
|
|
1239
1239
|
{ "pointer-events-none": x === "dots" },
|
|
1240
1240
|
x === l.value ? "border-vxvue text-vxvue font-bold" : "border-transparent text-gray-500 hover:border-gray-300",
|
|
1241
|
-
|
|
1241
|
+
i.value,
|
|
1242
1242
|
"inline-flex items-center px-4 text-sm"
|
|
1243
1243
|
]),
|
|
1244
1244
|
onClick: (b) => x !== "dots" ? t("update:page", x) : null
|
|
@@ -1250,7 +1250,7 @@ const pt = { key: 0 }, gt = { class: "text-vxvue-700" }, bt = ["disabled"], xt =
|
|
|
1250
1250
|
}, 1032, ["class", "onClick"]))), 128))
|
|
1251
1251
|
]),
|
|
1252
1252
|
v("div", Qt, [
|
|
1253
|
-
e.showNavButtons ? (
|
|
1253
|
+
e.showNavButtons ? (c(), m("button", {
|
|
1254
1254
|
key: 0,
|
|
1255
1255
|
disabled: l.value >= a.value,
|
|
1256
1256
|
class: C([
|
|
@@ -1260,14 +1260,14 @@ const pt = { key: 0 }, gt = { class: "text-vxvue-700" }, bt = ["disabled"], xt =
|
|
|
1260
1260
|
onClick: r
|
|
1261
1261
|
}, [
|
|
1262
1262
|
J(B(e.nextText) + " ", 1),
|
|
1263
|
-
Y(
|
|
1263
|
+
Y(A(re), { class: "size-5" })
|
|
1264
1264
|
], 10, el)) : I("", !0)
|
|
1265
1265
|
])
|
|
1266
1266
|
]));
|
|
1267
1267
|
}
|
|
1268
1268
|
};
|
|
1269
1269
|
function tl(e, u) {
|
|
1270
|
-
return
|
|
1270
|
+
return c(), m("svg", {
|
|
1271
1271
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1272
1272
|
fill: "none",
|
|
1273
1273
|
viewBox: "0 0 24 24",
|
|
@@ -1284,7 +1284,7 @@ function tl(e, u) {
|
|
|
1284
1284
|
]);
|
|
1285
1285
|
}
|
|
1286
1286
|
function ll(e, u) {
|
|
1287
|
-
return
|
|
1287
|
+
return c(), m("svg", {
|
|
1288
1288
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1289
1289
|
fill: "none",
|
|
1290
1290
|
viewBox: "0 0 24 24",
|
|
@@ -1310,30 +1310,30 @@ const al = ["value", "type"], sl = ["disabled"], Pl = /* @__PURE__ */ Object.ass
|
|
|
1310
1310
|
props: { modelValue: { type: String, default: "" } },
|
|
1311
1311
|
emits: ["update:modelValue"],
|
|
1312
1312
|
setup(e, { emit: u }) {
|
|
1313
|
-
const t = u,
|
|
1313
|
+
const t = u, o = $(!1), a = z(() => {
|
|
1314
1314
|
let l = Object.assign({}, K());
|
|
1315
1315
|
return delete l.class, l;
|
|
1316
1316
|
});
|
|
1317
|
-
return (l,
|
|
1317
|
+
return (l, i) => (c(), m("div", {
|
|
1318
1318
|
class: C("inline-block relative " + K().class)
|
|
1319
1319
|
}, [
|
|
1320
1320
|
v("input", R({
|
|
1321
1321
|
value: e.modelValue,
|
|
1322
|
-
type:
|
|
1322
|
+
type: o.value ? "text" : "password"
|
|
1323
1323
|
}, a.value, {
|
|
1324
1324
|
class: "block pr-12 w-full form-input peer",
|
|
1325
|
-
onInput:
|
|
1325
|
+
onInput: i[0] || (i[0] = (s) => t("update:modelValue", s.target.value))
|
|
1326
1326
|
}), null, 16, al),
|
|
1327
1327
|
v("button", {
|
|
1328
1328
|
class: "flex absolute inset-y-0 right-0 items-center px-3 text-brand-700 hover:text-brand",
|
|
1329
1329
|
"aria-label": "show-password-toggle",
|
|
1330
1330
|
disabled: K().disabled ?? !1,
|
|
1331
|
-
onClick:
|
|
1331
|
+
onClick: i[1] || (i[1] = _((s) => o.value = !o.value, ["stop"]))
|
|
1332
1332
|
}, [
|
|
1333
|
-
|
|
1333
|
+
o.value ? (c(), Z(A(tl), {
|
|
1334
1334
|
key: 0,
|
|
1335
1335
|
class: "size-5"
|
|
1336
|
-
})) : (
|
|
1336
|
+
})) : (c(), Z(A(ll), {
|
|
1337
1337
|
key: 1,
|
|
1338
1338
|
class: "size-5"
|
|
1339
1339
|
}))
|
|
@@ -1351,25 +1351,25 @@ const al = ["value", "type"], sl = ["disabled"], Pl = /* @__PURE__ */ Object.ass
|
|
|
1351
1351
|
},
|
|
1352
1352
|
emits: ["update:modelValue", "expand"],
|
|
1353
1353
|
setup(e, { emit: u }) {
|
|
1354
|
-
const t = e,
|
|
1354
|
+
const t = e, o = u, a = $(!1);
|
|
1355
1355
|
return me(() => {
|
|
1356
|
-
t.branch === t.modelValue &&
|
|
1357
|
-
}), (l,
|
|
1356
|
+
t.branch === t.modelValue && o("expand", !0);
|
|
1357
|
+
}), (l, i) => {
|
|
1358
1358
|
const s = Pe("simple-tree", !0);
|
|
1359
|
-
return
|
|
1359
|
+
return c(), m("div", {
|
|
1360
1360
|
class: C([!e.branch.branches || !e.branch.branches.length ? "terminates" : "", l.$attrs.class])
|
|
1361
1361
|
}, [
|
|
1362
1362
|
v("div", nl, [
|
|
1363
|
-
e.branch.branches && e.branch.branches.length ? (
|
|
1363
|
+
e.branch.branches && e.branch.branches.length ? (c(), m("button", {
|
|
1364
1364
|
key: 0,
|
|
1365
1365
|
class: "mr-2",
|
|
1366
|
-
onClick:
|
|
1366
|
+
onClick: i[0] || (i[0] = (n) => a.value = !a.value)
|
|
1367
1367
|
}, [
|
|
1368
1368
|
L(l.$slots, "toggle", {
|
|
1369
1369
|
branch: e.branch,
|
|
1370
1370
|
expanded: a.value
|
|
1371
1371
|
}, () => [
|
|
1372
|
-
(
|
|
1372
|
+
(c(), Z(de(a.value ? A(Ee) : A(_e)), { class: "p-1 text-white rounded-xs size-5 bg-vxvue-700 hover:bg-vxvue" }))
|
|
1373
1373
|
])
|
|
1374
1374
|
])) : I("", !0),
|
|
1375
1375
|
e.branch === e.modelValue ? L(l.$slots, "label-selected", {
|
|
@@ -1377,29 +1377,29 @@ const al = ["value", "type"], sl = ["disabled"], Pl = /* @__PURE__ */ Object.ass
|
|
|
1377
1377
|
branch: e.branch
|
|
1378
1378
|
}, () => [
|
|
1379
1379
|
v("strong", null, B(e.branch.label), 1)
|
|
1380
|
-
]) : (
|
|
1380
|
+
]) : (c(), m("button", {
|
|
1381
1381
|
key: 2,
|
|
1382
|
-
onClick:
|
|
1382
|
+
onClick: i[1] || (i[1] = (n) => o("update:modelValue", e.branch))
|
|
1383
1383
|
}, [
|
|
1384
1384
|
L(l.$slots, "label", { branch: e.branch }, () => [
|
|
1385
1385
|
J(B(e.branch.label), 1)
|
|
1386
1386
|
])
|
|
1387
1387
|
]))
|
|
1388
1388
|
]),
|
|
1389
|
-
e.branch.branches && e.branch.branches.length ? xe((
|
|
1390
|
-
(
|
|
1391
|
-
key:
|
|
1392
|
-
branch:
|
|
1389
|
+
e.branch.branches && e.branch.branches.length ? xe((c(), m("div", ol, [
|
|
1390
|
+
(c(!0), m(O, null, j(e.branch.branches, (n) => (c(), Z(s, {
|
|
1391
|
+
key: n.id || n.key || null,
|
|
1392
|
+
branch: n,
|
|
1393
1393
|
"model-value": e.modelValue,
|
|
1394
|
-
"onUpdate:modelValue":
|
|
1395
|
-
onExpand:
|
|
1396
|
-
a.value = r,
|
|
1394
|
+
"onUpdate:modelValue": i[2] || (i[2] = (r) => o("update:modelValue", r)),
|
|
1395
|
+
onExpand: i[3] || (i[3] = (r) => {
|
|
1396
|
+
a.value = r, o("expand", r);
|
|
1397
1397
|
})
|
|
1398
1398
|
}, Be({ _: 2 }, [
|
|
1399
|
-
j(l.$slots, (r,
|
|
1400
|
-
name:
|
|
1399
|
+
j(l.$slots, (r, d) => ({
|
|
1400
|
+
name: d,
|
|
1401
1401
|
fn: te((f) => [
|
|
1402
|
-
L(l.$slots,
|
|
1402
|
+
L(l.$slots, d, R({ ref_for: !0 }, f))
|
|
1403
1403
|
])
|
|
1404
1404
|
}))
|
|
1405
1405
|
]), 1032, ["branch", "model-value"]))), 128))
|
|
@@ -1414,24 +1414,24 @@ const al = ["value", "type"], sl = ["disabled"], Pl = /* @__PURE__ */ Object.ass
|
|
|
1414
1414
|
props: { vertical: Boolean },
|
|
1415
1415
|
emits: ["dragStart", "dragStop"],
|
|
1416
1416
|
setup(e, { emit: u }) {
|
|
1417
|
-
const t = e,
|
|
1418
|
-
let
|
|
1417
|
+
const t = e, o = u, a = $(null), l = $(null);
|
|
1418
|
+
let i = !1, s = {}, n = null, r = null, d = null;
|
|
1419
1419
|
const f = (b) => {
|
|
1420
1420
|
var T;
|
|
1421
|
-
if (
|
|
1421
|
+
if (i) {
|
|
1422
1422
|
b.preventDefault();
|
|
1423
1423
|
const { pageX: p, pageY: k } = ((T = b.touches) == null ? void 0 : T[0]) ?? b;
|
|
1424
|
-
t.vertical ? a.value.style.height = Math.min(r.height -
|
|
1424
|
+
t.vertical ? a.value.style.height = Math.min(r.height - d.height - (n.y - r.y), Math.max(0, n.height + k - s.y)) + "px" : a.value.style.width = Math.min(r.width - d.width - (n.x - r.x), Math.max(0, n.width + p - s.x)) + "px";
|
|
1425
1425
|
}
|
|
1426
1426
|
}, x = (b) => {
|
|
1427
1427
|
var k;
|
|
1428
|
-
b.preventDefault(), b.currentTarget.focus(),
|
|
1428
|
+
b.preventDefault(), b.currentTarget.focus(), i = !0;
|
|
1429
1429
|
const { pageX: T, pageY: p } = ((k = b.touches) == null ? void 0 : k[0]) ?? b;
|
|
1430
|
-
s = { x: T, y: p },
|
|
1430
|
+
s = { x: T, y: p }, d = l.value.getBoundingClientRect(), n = a.value.getBoundingClientRect(), r = a.value.parentElement.getBoundingClientRect(), b.type === "mousedown" ? (document.addEventListener("mousemove", f), document.addEventListener("mouseup", y)) : (document.addEventListener("touchmove", f), document.addEventListener("touchend", y)), o("dragStart");
|
|
1431
1431
|
}, y = (b) => {
|
|
1432
|
-
|
|
1432
|
+
i && (i = !1, b.type === "mouseup" ? (document.removeEventListener("mousemove", f), document.removeEventListener("mouseup", y)) : (document.removeEventListener("touchmove", f), document.removeEventListener("touchend", y)), setTimeout(() => o("dragStop"), 0));
|
|
1433
1433
|
};
|
|
1434
|
-
return (b, T) => (
|
|
1434
|
+
return (b, T) => (c(), m("div", {
|
|
1435
1435
|
ref_key: "box",
|
|
1436
1436
|
ref: a,
|
|
1437
1437
|
class: "relative"
|
|
@@ -1468,39 +1468,39 @@ const al = ["value", "type"], sl = ["disabled"], Pl = /* @__PURE__ */ Object.ass
|
|
|
1468
1468
|
},
|
|
1469
1469
|
emits: ["update:modelValue", "dragStart", "dragStop"],
|
|
1470
1470
|
setup(e, { emit: u }) {
|
|
1471
|
-
const t = e,
|
|
1471
|
+
const t = e, o = u, a = K(), l = { x: null, y: null }, i = { w: null, h: null };
|
|
1472
1472
|
let s = !1;
|
|
1473
|
-
const
|
|
1473
|
+
const n = $(null), r = $(0), d = z(() => {
|
|
1474
1474
|
const S = t.max, M = t.min;
|
|
1475
|
-
return t.modelValue instanceof Array ? t.modelValue.map((
|
|
1475
|
+
return t.modelValue instanceof Array ? t.modelValue.map((E) => (Math.max(Math.min(E, S), M) - M) * 100 / (S - M)) : (Math.max(Math.min(t.modelValue, S), M) - M) * 100 / (S - M);
|
|
1476
1476
|
}), f = z(() => {
|
|
1477
1477
|
if (t.modelValue instanceof Array) {
|
|
1478
|
-
const S = Math.min(...
|
|
1478
|
+
const S = Math.min(...d.value) + "%", M = Math.max(...d.value) - Math.min(...d.value) + "%";
|
|
1479
1479
|
return t.vertical ? { bottom: S, height: M } : { left: S, width: M };
|
|
1480
1480
|
}
|
|
1481
|
-
return t.vertical ? { bottom: 0, height:
|
|
1481
|
+
return t.vertical ? { bottom: 0, height: d.value + "%" } : { width: d.value + "%" };
|
|
1482
1482
|
}), x = $({
|
|
1483
1483
|
class: (t.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 " + (t.disabled ? "" : " focus:ring-4 focus:outline-hidden border-vxvue cursor-grab hover:bg-vxvue focus:ring-vxvue/50"),
|
|
1484
1484
|
tabindex: 0
|
|
1485
1485
|
}), y = (S) => {
|
|
1486
1486
|
let M = parseFloat(S.toFixed(10));
|
|
1487
1487
|
if (M = Math.min(t.max, Math.max(t.min, M)), t.modelValue instanceof Array) {
|
|
1488
|
-
let
|
|
1489
|
-
|
|
1488
|
+
let E = [...t.modelValue];
|
|
1489
|
+
E[r.value] = M, o("update:modelValue", E);
|
|
1490
1490
|
} else
|
|
1491
|
-
|
|
1491
|
+
o("update:modelValue", M);
|
|
1492
1492
|
}, b = (S) => {
|
|
1493
|
-
const { pageX: M, pageY:
|
|
1493
|
+
const { pageX: M, pageY: E } = S.touches ? S.touches[0] : S, h = t.vertical ? (-E + l.y) / i.h : (M - l.x) / i.w;
|
|
1494
1494
|
y(Math.floor((t.max - t.min) * h + t.min));
|
|
1495
1495
|
}, T = () => {
|
|
1496
|
-
const { clientLeft: S, clientTop: M, scrollLeft:
|
|
1497
|
-
l.x = g.left +
|
|
1496
|
+
const { clientLeft: S, clientTop: M, scrollLeft: E, scrollTop: h } = document.documentElement, g = n.value.getBoundingClientRect();
|
|
1497
|
+
l.x = g.left + E - S, l.y = g.bottom + h - M, i.w = n.value.offsetWidth, i.h = n.value.offsetHeight;
|
|
1498
1498
|
}, p = (S) => {
|
|
1499
1499
|
s && (S.preventDefault(), b(S));
|
|
1500
1500
|
}, k = (S) => {
|
|
1501
|
-
S.preventDefault(), S.currentTarget.focus(), T(), s = !0, S.type === "mousedown" ? (document.addEventListener("mousemove", p), document.addEventListener("mouseup",
|
|
1502
|
-
},
|
|
1503
|
-
s && (s = !1, S.type === "mouseup" ? (document.removeEventListener("mousemove", p), document.removeEventListener("mouseup",
|
|
1501
|
+
S.preventDefault(), S.currentTarget.focus(), T(), s = !0, S.type === "mousedown" ? (document.addEventListener("mousemove", p), document.addEventListener("mouseup", D)) : (document.addEventListener("touchmove", p), document.addEventListener("touchend", D)), o("dragStart");
|
|
1502
|
+
}, D = (S) => {
|
|
1503
|
+
s && (s = !1, S.type === "mouseup" ? (document.removeEventListener("mousemove", p), document.removeEventListener("mouseup", D)) : (document.removeEventListener("touchmove", p), document.removeEventListener("touchend", D)), setTimeout(() => o("dragStop"), 0));
|
|
1504
1504
|
}, W = (S) => {
|
|
1505
1505
|
S.keyCode >= 33 && S.keyCode <= 40 && S.preventDefault();
|
|
1506
1506
|
const M = t.modelValue[r.value] ?? t.modelValue;
|
|
@@ -1528,9 +1528,9 @@ const al = ["value", "type"], sl = ["disabled"], Pl = /* @__PURE__ */ Object.ass
|
|
|
1528
1528
|
}, H = (S) => {
|
|
1529
1529
|
T(), b(S);
|
|
1530
1530
|
};
|
|
1531
|
-
return (S, M) => (
|
|
1531
|
+
return (S, M) => (c(), m("div", R({
|
|
1532
1532
|
ref_key: "track",
|
|
1533
|
-
ref:
|
|
1533
|
+
ref: n,
|
|
1534
1534
|
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"],
|
|
1535
1535
|
role: "slider",
|
|
1536
1536
|
"aria-label": "slider-thumb",
|
|
@@ -1541,14 +1541,14 @@ const al = ["value", "type"], sl = ["disabled"], Pl = /* @__PURE__ */ Object.ass
|
|
|
1541
1541
|
}, ue(e.disabled ? {} : {
|
|
1542
1542
|
click: H
|
|
1543
1543
|
}, !0)), [
|
|
1544
|
-
e.disabled ? I("", !0) : (
|
|
1544
|
+
e.disabled ? I("", !0) : (c(), m("div", {
|
|
1545
1545
|
key: 0,
|
|
1546
1546
|
class: C(["absolute bg-vxvue", e.vertical ? "w-full rounded-t-full rounded-b-full" : "h-full rounded-r-full rounded-l-full"]),
|
|
1547
1547
|
style: ye(f.value)
|
|
1548
1548
|
}, null, 6)),
|
|
1549
|
-
e.modelValue.length ? (
|
|
1550
|
-
id: h ? null :
|
|
1551
|
-
style: e.vertical ? { bottom:
|
|
1549
|
+
e.modelValue.length ? (c(!0), m(O, { key: 2 }, j(e.modelValue, (E, h) => (c(), m("button", R({
|
|
1550
|
+
id: h ? null : A(a).id,
|
|
1551
|
+
style: e.vertical ? { bottom: d.value[h] + "%" } : { left: d.value[h] + "%" },
|
|
1552
1552
|
"aria-label": "slider-thumb-" + (h + 1),
|
|
1553
1553
|
ref_for: !0
|
|
1554
1554
|
}, x.value, ue(e.disabled ? {} : {
|
|
@@ -1560,24 +1560,24 @@ const al = ["value", "type"], sl = ["disabled"], Pl = /* @__PURE__ */ Object.ass
|
|
|
1560
1560
|
mousedown: (g) => {
|
|
1561
1561
|
r.value = h, k(g);
|
|
1562
1562
|
},
|
|
1563
|
-
touchend:
|
|
1564
|
-
mouseup:
|
|
1565
|
-
}, !0)), null, 16, il))), 256)) : (
|
|
1563
|
+
touchend: D,
|
|
1564
|
+
mouseup: D
|
|
1565
|
+
}, !0)), null, 16, il))), 256)) : (c(), m("button", R({
|
|
1566
1566
|
key: 1,
|
|
1567
|
-
id:
|
|
1568
|
-
style: e.vertical ? { bottom:
|
|
1567
|
+
id: A(a).id,
|
|
1568
|
+
style: e.vertical ? { bottom: d.value + "%" } : { left: d.value + "%" },
|
|
1569
1569
|
"aria-label": "slider-thumb"
|
|
1570
1570
|
}, x.value, ue(e.disabled ? {} : {
|
|
1571
1571
|
focus: () => r.value = 0,
|
|
1572
1572
|
keydown: W,
|
|
1573
|
-
touchstart: (
|
|
1574
|
-
r.value = 0, k(
|
|
1573
|
+
touchstart: (E) => {
|
|
1574
|
+
r.value = 0, k(E);
|
|
1575
1575
|
},
|
|
1576
|
-
mousedown: (
|
|
1577
|
-
r.value = 0, k(
|
|
1576
|
+
mousedown: (E) => {
|
|
1577
|
+
r.value = 0, k(E);
|
|
1578
1578
|
},
|
|
1579
|
-
touchend:
|
|
1580
|
-
mouseup:
|
|
1579
|
+
touchend: D,
|
|
1580
|
+
mouseup: D
|
|
1581
1581
|
}, !0)), null, 16, ul))
|
|
1582
1582
|
], 16, rl));
|
|
1583
1583
|
}
|
|
@@ -1605,39 +1605,39 @@ const al = ["value", "type"], sl = ["disabled"], Pl = /* @__PURE__ */ Object.ass
|
|
|
1605
1605
|
},
|
|
1606
1606
|
emits: ["before-sort", "after-sort"],
|
|
1607
1607
|
setup(e, { emit: u }) {
|
|
1608
|
-
const t = e,
|
|
1609
|
-
let
|
|
1610
|
-
const r = t.columns.find(({ prop:
|
|
1611
|
-
return r && (l.value === "asc" && r.sortAscFunction ?
|
|
1612
|
-
}), s = (
|
|
1613
|
-
|
|
1608
|
+
const t = e, o = u, a = $(t.sortProp), l = $(t.sortDirection), i = z(() => {
|
|
1609
|
+
let n = t.rows.slice();
|
|
1610
|
+
const r = t.columns.find(({ prop: d }) => d === a.value);
|
|
1611
|
+
return r && (l.value === "asc" && r.sortAscFunction ? n.sort(r.sortAscFunction) : l.value === "desc" && r.sortDescFunction ? n.sort(r.sortDescFunction) : n.sort((d, f) => d[a.value] < f[a.value] ? l.value === "asc" ? -1 : 1 : d[a.value] > f[a.value] ? l.value === "asc" ? 1 : -1 : 0)), n.slice(t.offset || 0, (t.offset || 0) + (t.count || n.length));
|
|
1612
|
+
}), s = (n) => {
|
|
1613
|
+
o("before-sort", { prop: a.value, dir: l.value }), a.value === n ? l.value = l.value === "asc" ? "desc" : "asc" : (a.value = n, l.value = l.value || "asc"), ve(() => o("after-sort", { prop: a.value, dir: l.value }));
|
|
1614
1614
|
};
|
|
1615
|
-
return (
|
|
1616
|
-
class: C(
|
|
1615
|
+
return (n, r) => (c(), m("table", {
|
|
1616
|
+
class: C(n.$attrs.class || "w-full divide-y divide-y-slate-900 table-fixed")
|
|
1617
1617
|
}, [
|
|
1618
1618
|
v("thead", {
|
|
1619
1619
|
class: C(e.headerClass)
|
|
1620
1620
|
}, [
|
|
1621
1621
|
v("tr", null, [
|
|
1622
|
-
(
|
|
1623
|
-
key:
|
|
1622
|
+
(c(!0), m(O, null, j(e.columns, (d) => (c(), m("th", {
|
|
1623
|
+
key: d.prop,
|
|
1624
1624
|
scope: "col",
|
|
1625
|
-
"data-active": a.value ===
|
|
1625
|
+
"data-active": a.value === d.prop ? "active" : null,
|
|
1626
1626
|
class: C([
|
|
1627
1627
|
"py-3 px-6 text-left",
|
|
1628
|
-
{ "cursor-pointer":
|
|
1629
|
-
|
|
1628
|
+
{ "cursor-pointer": d.sortable },
|
|
1629
|
+
d.cssClass
|
|
1630
1630
|
]),
|
|
1631
|
-
onClick: (f) =>
|
|
1631
|
+
onClick: (f) => d.sortable ? s(d.prop) : null
|
|
1632
1632
|
}, [
|
|
1633
|
-
L(
|
|
1634
|
-
column:
|
|
1633
|
+
L(n.$slots, d.prop + "-header", {
|
|
1634
|
+
column: d,
|
|
1635
1635
|
sortDir: l.value,
|
|
1636
1636
|
sortProp: a.value
|
|
1637
1637
|
}, () => [
|
|
1638
1638
|
v("div", cl, [
|
|
1639
|
-
v("span", null, B(
|
|
1640
|
-
|
|
1639
|
+
v("span", null, B(d.label), 1),
|
|
1640
|
+
d.sortable ? (c(), Z(de(a.value !== d.prop ? A(Oe) : l.value === "asc" ? A(Ne) : A(Fe)), {
|
|
1641
1641
|
key: 0,
|
|
1642
1642
|
class: "size-4"
|
|
1643
1643
|
})) : I("", !0)
|
|
@@ -1649,17 +1649,17 @@ const al = ["value", "type"], sl = ["disabled"], Pl = /* @__PURE__ */ Object.ass
|
|
|
1649
1649
|
v("tbody", {
|
|
1650
1650
|
class: C(e.bodyClass)
|
|
1651
1651
|
}, [
|
|
1652
|
-
(
|
|
1653
|
-
key:
|
|
1654
|
-
class: C(
|
|
1652
|
+
(c(!0), m(O, null, j(i.value, (d) => (c(), m("tr", {
|
|
1653
|
+
key: d[e.keyProperty],
|
|
1654
|
+
class: C(d.cssClass)
|
|
1655
1655
|
}, [
|
|
1656
|
-
(
|
|
1656
|
+
(c(!0), m(O, null, j(e.columns, (f) => (c(), m("td", {
|
|
1657
1657
|
key: f.prop,
|
|
1658
1658
|
"data-active": a.value === f.prop ? "active" : null,
|
|
1659
1659
|
class: "overflow-hidden py-3 px-6 whitespace-nowrap text-ellipsis"
|
|
1660
1660
|
}, [
|
|
1661
|
-
L(
|
|
1662
|
-
J(B(
|
|
1661
|
+
L(n.$slots, f.prop, { row: d }, () => [
|
|
1662
|
+
J(B(d[f.prop]), 1)
|
|
1663
1663
|
])
|
|
1664
1664
|
], 8, vl))), 128))
|
|
1665
1665
|
], 2))), 128))
|
|
@@ -1676,22 +1676,22 @@ const al = ["value", "type"], sl = ["disabled"], Pl = /* @__PURE__ */ Object.ass
|
|
|
1676
1676
|
emits: ["submit"],
|
|
1677
1677
|
setup(e, { emit: u }) {
|
|
1678
1678
|
const t = u;
|
|
1679
|
-
return (
|
|
1679
|
+
return (o, a) => (c(), m("div", ml, [
|
|
1680
1680
|
v("button", {
|
|
1681
|
-
class: C([
|
|
1682
|
-
disabled:
|
|
1681
|
+
class: C([o.$attrs.class, e.theme]),
|
|
1682
|
+
disabled: o.$attrs.disabled || e.busy,
|
|
1683
1683
|
type: "button",
|
|
1684
1684
|
onClick: a[0] || (a[0] = (l) => t("submit"))
|
|
1685
1685
|
}, [
|
|
1686
|
-
L(
|
|
1686
|
+
L(o.$slots, "default", {}, void 0, !0)
|
|
1687
1687
|
], 10, fl),
|
|
1688
|
-
e.busy ? (
|
|
1688
|
+
e.busy ? (c(), Z(we, {
|
|
1689
1689
|
key: 0,
|
|
1690
1690
|
class: C(e.spinnerClass || ["size-5", { error: "text-error", success: "text-success", default: "text-vxvue" }[e.theme || "default"]])
|
|
1691
1691
|
}, null, 8, ["class"])) : I("", !0)
|
|
1692
1692
|
]));
|
|
1693
1693
|
}
|
|
1694
|
-
}),
|
|
1694
|
+
}), Ol = /* @__PURE__ */ Se(hl, [["__scopeId", "data-v-55a337c8"]]), pl = { class: "sm:hidden" }, gl = { class: "hidden sm:block" }, bl = { class: "border-b border-gray-200" }, xl = {
|
|
1695
1695
|
class: "flex -mb-px space-x-8",
|
|
1696
1696
|
"aria-label": "Tabs"
|
|
1697
1697
|
}, yl = ["aria-current", "onClick"], Fl = {
|
|
@@ -1702,31 +1702,31 @@ const al = ["value", "type"], sl = ["disabled"], Pl = /* @__PURE__ */ Object.ass
|
|
|
1702
1702
|
},
|
|
1703
1703
|
emits: ["update:activeIndex"],
|
|
1704
1704
|
setup(e, { emit: u }) {
|
|
1705
|
-
const t = e,
|
|
1705
|
+
const t = e, o = u, a = $(t.items[t.activeIndex] || {}), l = z(() => {
|
|
1706
1706
|
let s = [];
|
|
1707
|
-
return t.items.forEach((
|
|
1708
|
-
|
|
1707
|
+
return t.items.forEach((n, r) => {
|
|
1708
|
+
n.disabled || s.push({ label: n.name, key: r });
|
|
1709
1709
|
}), s;
|
|
1710
1710
|
});
|
|
1711
1711
|
X(() => t.activeIndex, (s) => {
|
|
1712
1712
|
a.value = t.items[s] || {};
|
|
1713
1713
|
});
|
|
1714
|
-
const
|
|
1715
|
-
s.disabled || (a.value = s,
|
|
1714
|
+
const i = (s) => {
|
|
1715
|
+
s.disabled || (a.value = s, o("update:activeIndex", t.items.indexOf(s)));
|
|
1716
1716
|
};
|
|
1717
|
-
return (s,
|
|
1717
|
+
return (s, n) => (c(), m(O, null, [
|
|
1718
1718
|
v("div", pl, [
|
|
1719
1719
|
Y(Bt, {
|
|
1720
1720
|
options: l.value,
|
|
1721
1721
|
"model-value": e.activeIndex,
|
|
1722
1722
|
class: "w-full",
|
|
1723
|
-
"onUpdate:modelValue":
|
|
1723
|
+
"onUpdate:modelValue": n[0] || (n[0] = (r) => o("update:activeIndex", r))
|
|
1724
1724
|
}, null, 8, ["options", "model-value"])
|
|
1725
1725
|
]),
|
|
1726
1726
|
v("div", gl, [
|
|
1727
1727
|
v("div", bl, [
|
|
1728
1728
|
v("nav", xl, [
|
|
1729
|
-
(
|
|
1729
|
+
(c(!0), m(O, null, j(e.items, (r) => (c(), m("a", {
|
|
1730
1730
|
key: r.name,
|
|
1731
1731
|
href: "#",
|
|
1732
1732
|
class: C([
|
|
@@ -1738,7 +1738,7 @@ const al = ["value", "type"], sl = ["disabled"], Pl = /* @__PURE__ */ Object.ass
|
|
|
1738
1738
|
}
|
|
1739
1739
|
]),
|
|
1740
1740
|
"aria-current": a.value === r ? "page" : void 0,
|
|
1741
|
-
onClick: _((
|
|
1741
|
+
onClick: _((d) => i(r), ["prevent"])
|
|
1742
1742
|
}, [
|
|
1743
1743
|
L(s.$slots, "icon", { tab: r }),
|
|
1744
1744
|
v("span", null, [
|
|
@@ -1747,7 +1747,7 @@ const al = ["value", "type"], sl = ["disabled"], Pl = /* @__PURE__ */ Object.ass
|
|
|
1747
1747
|
])
|
|
1748
1748
|
]),
|
|
1749
1749
|
L(s.$slots, "badge", { tab: r }, () => [
|
|
1750
|
-
r.badge ? (
|
|
1750
|
+
r.badge ? (c(), m("span", {
|
|
1751
1751
|
key: 0,
|
|
1752
1752
|
class: C([
|
|
1753
1753
|
"hidden ml-3 py-0.5 px-2.5 rounded-full text-xs font-medium md:inline-block text-current",
|
|
@@ -1765,31 +1765,32 @@ const al = ["value", "type"], sl = ["disabled"], Pl = /* @__PURE__ */ Object.ass
|
|
|
1765
1765
|
])
|
|
1766
1766
|
], 64));
|
|
1767
1767
|
}
|
|
1768
|
-
},
|
|
1768
|
+
}, El = {
|
|
1769
1769
|
mounted: (e) => e.focus()
|
|
1770
1770
|
}, _l = {
|
|
1771
1771
|
mounted: (e, u) => {
|
|
1772
|
-
var
|
|
1772
|
+
var t, o;
|
|
1773
1773
|
if (!["INPUT", "TEXTAREA"].includes(e.nodeName)) {
|
|
1774
|
-
let
|
|
1775
|
-
|
|
1774
|
+
let a = e.querySelector('input:not([type]),input[type="text"],input[type="search"],input[type="email"],input[type="password"],input[type="url"],input[type="tel"]');
|
|
1775
|
+
a || (a = e.querySelector("textarea")), e = a;
|
|
1776
|
+
}
|
|
1777
|
+
if (e) {
|
|
1778
|
+
if (e.querySelector("label")) throw new Error("VFloatingLabel directive: LABEL element found.");
|
|
1779
|
+
const a = Math.random().toString(36).substring(2), l = document.createElement("div");
|
|
1780
|
+
l.classList.add("relative");
|
|
1781
|
+
const i = document.createElement("label");
|
|
1782
|
+
i.classList.add(
|
|
1783
|
+
..."absolute px-2 left-1 top-2 scale-90 text-sm z-10 origin-[0] bg-white -translate-y-4 transform-gpu duration-200".split(" "),
|
|
1784
|
+
..."peer-focus:top-2 peer-focus:scale-90 peer-focus:-translate-y-full".split(" "),
|
|
1785
|
+
..."peer-placeholder-shown:scale-100 peer-placeholder-shown:-translate-y-1/2".split(" "),
|
|
1786
|
+
e.nodeName === "TEXTAREA" ? "peer-placeholder-shown:top-4" : "peer-placeholder-shown:top-1/2"
|
|
1787
|
+
), (t = u.value) != null && t.invalid ? i.classList.add("text-error", "peer-focus:text-error") : i.classList.add("peer-focus:text-blue-600"), e.getAttribute("required") !== null && i.classList.add("required"), i.setAttribute("for", e.getAttribute("id") || a + "-element"), i.innerHTML = ((o = u.value) == null ? void 0 : o.label) || e.getAttribute("placeholder") || a + "-label", e.classList.add("peer"), e.setAttribute("placeholder", " "), e.setAttribute("id", e.getAttribute("id") || a + "-element"), e.parentElement.replaceChild(l, e), l.appendChild(e), l.appendChild(i);
|
|
1776
1788
|
}
|
|
1777
|
-
if (!e) throw new Error("VFloatingLabel directive: No valid INPUT or TEXTAREA element found.");
|
|
1778
|
-
if (e.querySelector("label")) throw new Error("VFloatingLabel directive: LABEL element found.");
|
|
1779
|
-
const t = Math.random().toString(36).substring(2), n = document.createElement("div");
|
|
1780
|
-
n.classList.add("relative");
|
|
1781
|
-
const a = document.createElement("label");
|
|
1782
|
-
a.classList.add(
|
|
1783
|
-
..."absolute px-2 left-1 top-2 scale-90 text-sm z-10 origin-[0] bg-white -translate-y-4 transform-gpu duration-200".split(" "),
|
|
1784
|
-
..."peer-focus:top-2 peer-focus:scale-90 peer-focus:-translate-y-full".split(" "),
|
|
1785
|
-
..."peer-placeholder-shown:scale-100 peer-placeholder-shown:-translate-y-1/2".split(" "),
|
|
1786
|
-
e.nodeName === "TEXTAREA" ? "peer-placeholder-shown:top-4" : "peer-placeholder-shown:top-1/2"
|
|
1787
|
-
), (l = u.value) != null && l.invalid ? a.classList.add("text-error", "peer-focus:text-error") : a.classList.add("peer-focus:text-blue-600"), e.getAttribute("required") !== null && a.classList.add("required"), a.setAttribute("for", e.getAttribute("id") || t + "-element"), a.innerHTML = ((c = u.value) == null ? void 0 : c.label) || e.getAttribute("placeholder") || t + "-label", e.classList.add("peer"), e.setAttribute("placeholder", " "), e.setAttribute("id", e.getAttribute("id") || t + "-element"), e.parentElement.replaceChild(n, e), n.appendChild(e), n.appendChild(a);
|
|
1788
1789
|
},
|
|
1789
1790
|
updated: (e, u) => {
|
|
1790
|
-
var a, l,
|
|
1791
|
-
const t = e.parentNode.querySelector("label"),
|
|
1792
|
-
t.innerHTML = ((l = u.value) == null ? void 0 : l.label) ||
|
|
1791
|
+
var a, l, i;
|
|
1792
|
+
const t = e.parentNode.querySelector("label"), o = (a = e.getAttribute("placeholder")) == null ? void 0 : a.trim();
|
|
1793
|
+
t.innerHTML = ((l = u.value) == null ? void 0 : l.label) || o || t.innerHTML, o && e.setAttribute("placeholder", " "), (i = u.value) != null && i.invalid ? (t.classList.add("text-error", "peer-focus:text-error"), t.classList.remove("peer-focus:text-blue-600")) : (t.classList.remove("text-error", "peer-focus:text-error"), t.classList.add("peer-focus:text-blue-600")), t.classList[e.getAttribute("required") !== null ? "add" : "remove"]("required");
|
|
1793
1794
|
},
|
|
1794
1795
|
beforeUnmount: (e) => e.parentNode.parentNode.removeChild(e.parentNode)
|
|
1795
1796
|
};
|
|
@@ -1802,8 +1803,8 @@ export {
|
|
|
1802
1803
|
Ml as Datepicker,
|
|
1803
1804
|
Vl as FormFileButton,
|
|
1804
1805
|
Bt as FormSelect,
|
|
1805
|
-
|
|
1806
|
-
|
|
1806
|
+
Dl as FormSwitch,
|
|
1807
|
+
Al as MessageToast,
|
|
1807
1808
|
Ll as Modal,
|
|
1808
1809
|
Tl as Pagination,
|
|
1809
1810
|
Pl as PasswordInput,
|
|
@@ -1812,8 +1813,8 @@ export {
|
|
|
1812
1813
|
Il as Slider,
|
|
1813
1814
|
Nl as Sortable,
|
|
1814
1815
|
we as Spinner,
|
|
1815
|
-
|
|
1816
|
+
Ol as SubmitButton,
|
|
1816
1817
|
Fl as Tabs,
|
|
1817
1818
|
_l as VFloatingLabel,
|
|
1818
|
-
|
|
1819
|
+
El as VFocus
|
|
1819
1820
|
};
|