vx-vue 1.2.1 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -28
- package/dist/style.css +1 -1
- package/dist/vxvue.es.js +595 -548
- package/dist/vxvue.umd.js +1 -1
- package/package.json +17 -18
package/dist/vxvue.es.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { useSlots as Se, ref as $, computed as
|
|
1
|
+
import { useSlots as Se, ref as $, computed as z, onBeforeUpdate as Ce, createElementBlock as m, openBlock as d, Fragment as N, renderList as Y, createBlock as U, resolveDynamicComponent as de, createElementVNode as v, useAttrs as q, normalizeClass as C, unref as A, renderSlot as B, toValue as F, watch as X, getCurrentScope as Me, onScopeDispose as Ve, onUpdated as De, createCommentVNode as O, mergeProps as R, withKeys as se, withModifiers as j, toDisplayString as P, createVNode as _, Transition as ve, withCtx as le, createTextVNode as J, nextTick as me, withDirectives as xe, vModelText as Ae, onMounted as fe, normalizeStyle as ye, resolveComponent as Le, createSlots as Te, vShow as Be, toHandlers as ue } from "vue";
|
|
2
2
|
const yl = {
|
|
3
3
|
__name: "accordion",
|
|
4
4
|
props: { activeIndex: { type: [Number, Array], default: null } },
|
|
5
5
|
emits: ["update:activeIndex"],
|
|
6
|
-
setup(e, { emit:
|
|
7
|
-
const t = e, o =
|
|
6
|
+
setup(e, { emit: i }) {
|
|
7
|
+
const t = e, o = i, a = Se(), l = $([]), c = (f) => l.value.push(f), s = z(() => a.default().reduce((f, x) => ((x.type.__name || x.type.name) === "accordion-panel" && f.push(x), f), [])), n = (f) => {
|
|
8
8
|
if (Array.isArray(t.activeIndex)) {
|
|
9
|
-
let
|
|
10
|
-
|
|
9
|
+
let x = [].concat(t.activeIndex), y = x.findIndex((b) => b === f);
|
|
10
|
+
y === -1 ? o("update:activeIndex", [...x, f]) : (x.splice(y, 1), o("update:activeIndex", x));
|
|
11
11
|
} else
|
|
12
12
|
o("update:activeIndex", f === t.activeIndex ? -1 : f);
|
|
13
13
|
}, r = (f) => {
|
|
@@ -23,22 +23,22 @@ const yl = {
|
|
|
23
23
|
}
|
|
24
24
|
u(f);
|
|
25
25
|
};
|
|
26
|
-
return Ce(() => l.value = []), (f,
|
|
27
|
-
var
|
|
28
|
-
return
|
|
29
|
-
key:
|
|
26
|
+
return Ce(() => l.value = []), (f, x) => (d(!0), m(N, null, Y(s.value, (y, b) => {
|
|
27
|
+
var L;
|
|
28
|
+
return d(), U(de(y), {
|
|
29
|
+
key: b,
|
|
30
30
|
ref_for: !0,
|
|
31
31
|
ref: c,
|
|
32
|
-
show: Array.isArray(e.activeIndex) ? (
|
|
33
|
-
onSelect: (
|
|
34
|
-
onKeydown: (
|
|
35
|
-
onKeyup: (
|
|
32
|
+
show: Array.isArray(e.activeIndex) ? (L = e.activeIndex) == null ? void 0 : L.includes(b) : e.activeIndex === b,
|
|
33
|
+
onSelect: (p) => n(b),
|
|
34
|
+
onKeydown: (p) => r(b),
|
|
35
|
+
onKeyup: (p) => u(b)
|
|
36
36
|
}, null, 40, ["show", "onSelect", "onKeydown", "onKeyup"]);
|
|
37
37
|
}), 128));
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
|
-
function
|
|
41
|
-
return
|
|
40
|
+
function Pe(e, i) {
|
|
41
|
+
return d(), m("svg", {
|
|
42
42
|
xmlns: "http://www.w3.org/2000/svg",
|
|
43
43
|
viewBox: "0 0 24 24",
|
|
44
44
|
fill: "currentColor",
|
|
@@ -52,8 +52,8 @@ function Le(e, d) {
|
|
|
52
52
|
})
|
|
53
53
|
]);
|
|
54
54
|
}
|
|
55
|
-
function
|
|
56
|
-
return
|
|
55
|
+
function ze(e, i) {
|
|
56
|
+
return d(), m("svg", {
|
|
57
57
|
xmlns: "http://www.w3.org/2000/svg",
|
|
58
58
|
viewBox: "0 0 24 24",
|
|
59
59
|
fill: "currentColor",
|
|
@@ -67,8 +67,8 @@ function Ie(e, d) {
|
|
|
67
67
|
})
|
|
68
68
|
]);
|
|
69
69
|
}
|
|
70
|
-
function
|
|
71
|
-
return
|
|
70
|
+
function ie(e, i) {
|
|
71
|
+
return d(), m("svg", {
|
|
72
72
|
xmlns: "http://www.w3.org/2000/svg",
|
|
73
73
|
viewBox: "0 0 24 24",
|
|
74
74
|
fill: "currentColor",
|
|
@@ -82,8 +82,8 @@ function ue(e, d) {
|
|
|
82
82
|
})
|
|
83
83
|
]);
|
|
84
84
|
}
|
|
85
|
-
function
|
|
86
|
-
return
|
|
85
|
+
function re(e, i) {
|
|
86
|
+
return d(), m("svg", {
|
|
87
87
|
xmlns: "http://www.w3.org/2000/svg",
|
|
88
88
|
viewBox: "0 0 24 24",
|
|
89
89
|
fill: "currentColor",
|
|
@@ -97,8 +97,8 @@ function oe(e, d) {
|
|
|
97
97
|
})
|
|
98
98
|
]);
|
|
99
99
|
}
|
|
100
|
-
function Oe(e,
|
|
101
|
-
return
|
|
100
|
+
function Oe(e, i) {
|
|
101
|
+
return d(), m("svg", {
|
|
102
102
|
xmlns: "http://www.w3.org/2000/svg",
|
|
103
103
|
viewBox: "0 0 24 24",
|
|
104
104
|
fill: "currentColor",
|
|
@@ -112,8 +112,8 @@ function Oe(e, d) {
|
|
|
112
112
|
})
|
|
113
113
|
]);
|
|
114
114
|
}
|
|
115
|
-
function
|
|
116
|
-
return
|
|
115
|
+
function Ie(e, i) {
|
|
116
|
+
return d(), m("svg", {
|
|
117
117
|
xmlns: "http://www.w3.org/2000/svg",
|
|
118
118
|
viewBox: "0 0 24 24",
|
|
119
119
|
fill: "currentColor",
|
|
@@ -127,8 +127,8 @@ function ze(e, d) {
|
|
|
127
127
|
})
|
|
128
128
|
]);
|
|
129
129
|
}
|
|
130
|
-
function
|
|
131
|
-
return
|
|
130
|
+
function Ne(e, i) {
|
|
131
|
+
return d(), m("svg", {
|
|
132
132
|
xmlns: "http://www.w3.org/2000/svg",
|
|
133
133
|
viewBox: "0 0 24 24",
|
|
134
134
|
fill: "currentColor",
|
|
@@ -142,8 +142,8 @@ function Fe(e, d) {
|
|
|
142
142
|
})
|
|
143
143
|
]);
|
|
144
144
|
}
|
|
145
|
-
function
|
|
146
|
-
return
|
|
145
|
+
function Fe(e, i) {
|
|
146
|
+
return d(), m("svg", {
|
|
147
147
|
xmlns: "http://www.w3.org/2000/svg",
|
|
148
148
|
viewBox: "0 0 24 24",
|
|
149
149
|
fill: "currentColor",
|
|
@@ -157,8 +157,8 @@ function Ne(e, d) {
|
|
|
157
157
|
})
|
|
158
158
|
]);
|
|
159
159
|
}
|
|
160
|
-
function he(e,
|
|
161
|
-
return
|
|
160
|
+
function he(e, i) {
|
|
161
|
+
return d(), m("svg", {
|
|
162
162
|
xmlns: "http://www.w3.org/2000/svg",
|
|
163
163
|
viewBox: "0 0 24 24",
|
|
164
164
|
fill: "currentColor",
|
|
@@ -176,14 +176,14 @@ const Ee = ["id", "disabled", "aria-expanded", "aria-controls"], je = ["id", "ar
|
|
|
176
176
|
__name: "accordion-panel",
|
|
177
177
|
props: { show: Boolean, disabled: Boolean },
|
|
178
178
|
emits: ["select", "keyup", "keydown"],
|
|
179
|
-
setup(e, { expose:
|
|
179
|
+
setup(e, { expose: i, emit: t }) {
|
|
180
180
|
const o = t, a = e, l = q(), c = $(null), s = Math.random().toString(20).substring(2, 8), n = (u) => {
|
|
181
181
|
if (!a.disabled) {
|
|
182
182
|
const f = (/* @__PURE__ */ new Map([[40, "keydown"], [38, "keyup"]])).get(u.keyCode);
|
|
183
183
|
f && (o(f), u.preventDefault());
|
|
184
184
|
}
|
|
185
185
|
};
|
|
186
|
-
return
|
|
186
|
+
return i({ focus: () => c.value.focus(), disabled: a.disabled }), (u, f) => (d(), m("div", null, [
|
|
187
187
|
v("button", {
|
|
188
188
|
id: "ap-control-" + A(s),
|
|
189
189
|
ref_key: "btn",
|
|
@@ -198,18 +198,18 @@ const Ee = ["id", "disabled", "aria-expanded", "aria-controls"], je = ["id", "ar
|
|
|
198
198
|
"aria-expanded": e.show,
|
|
199
199
|
"aria-controls": "ap-" + A(s),
|
|
200
200
|
tabindex: "0",
|
|
201
|
-
onClick: f[0] || (f[0] = (
|
|
201
|
+
onClick: f[0] || (f[0] = (x) => o("select")),
|
|
202
202
|
onKeydown: n
|
|
203
203
|
}, [
|
|
204
|
-
e.disabled ? (
|
|
204
|
+
e.disabled ? (d(), U(A(he), {
|
|
205
205
|
key: 0,
|
|
206
206
|
class: "size-5"
|
|
207
|
-
})) : (
|
|
207
|
+
})) : (d(), U(A(re), {
|
|
208
208
|
key: 1,
|
|
209
209
|
class: C(["size-5 transform-gpu transition-transform duration-300", { "rotate-90": e.show }])
|
|
210
210
|
}, null, 8, ["class"])),
|
|
211
211
|
v("span", null, [
|
|
212
|
-
|
|
212
|
+
B(u.$slots, "header")
|
|
213
213
|
])
|
|
214
214
|
], 42, Ee),
|
|
215
215
|
v("div", {
|
|
@@ -218,17 +218,17 @@ const Ee = ["id", "disabled", "aria-expanded", "aria-controls"], je = ["id", "ar
|
|
|
218
218
|
"aria-labelledby": "ap-control-" + A(s)
|
|
219
219
|
}, [
|
|
220
220
|
v("div", Ye, [
|
|
221
|
-
|
|
221
|
+
B(u.$slots, "default")
|
|
222
222
|
])
|
|
223
223
|
], 10, je)
|
|
224
224
|
]));
|
|
225
225
|
}
|
|
226
|
-
}), _e = ["viewBox"], Re = ["cx", "cy", "r", "stroke-width"],
|
|
226
|
+
}), _e = ["viewBox"], Re = ["cx", "cy", "r", "stroke-width"], Ze = ["cx", "cy", "r", "stroke-width", "stroke-dasharray"], we = {
|
|
227
227
|
__name: "spinner",
|
|
228
228
|
props: { radius: { type: Number, default: 10 }, strokeWidth: { type: Number, default: 4 } },
|
|
229
229
|
setup(e) {
|
|
230
|
-
const
|
|
231
|
-
return (l, c) => (
|
|
230
|
+
const i = e, t = z(() => i.radius + i.strokeWidth / 2), o = z(() => i.radius * 2 + i.strokeWidth), a = z(() => i.radius * Math.PI / 1.5);
|
|
231
|
+
return (l, c) => (d(), m("svg", {
|
|
232
232
|
class: "animate-spin",
|
|
233
233
|
xmlns: "http://www.w3.org/2000/svg",
|
|
234
234
|
fill: "none",
|
|
@@ -251,44 +251,47 @@ const Ee = ["id", "disabled", "aria-expanded", "aria-controls"], je = ["id", "ar
|
|
|
251
251
|
"stroke-width": e.strokeWidth,
|
|
252
252
|
"stroke-dasharray": a.value + " " + e.radius * 100,
|
|
253
253
|
"stroke-linecap": "round"
|
|
254
|
-
}, null, 8,
|
|
254
|
+
}, null, 8, Ze)
|
|
255
255
|
], 8, _e));
|
|
256
256
|
}
|
|
257
257
|
};
|
|
258
|
-
function
|
|
258
|
+
function He(e) {
|
|
259
259
|
return Me() ? (Ve(e), !0) : !1;
|
|
260
260
|
}
|
|
261
261
|
const ke = typeof window < "u" && typeof document < "u";
|
|
262
262
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
263
|
-
const
|
|
263
|
+
const We = Object.prototype.toString, Ue = (e) => We.call(e) === "[object Object]", te = () => {
|
|
264
264
|
}, Ke = /* @__PURE__ */ qe();
|
|
265
265
|
function qe() {
|
|
266
|
-
var e,
|
|
267
|
-
return ke && ((e = window == null ? void 0 : window.navigator) == null ? void 0 : e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((
|
|
266
|
+
var e, i;
|
|
267
|
+
return ke && ((e = window == null ? void 0 : window.navigator) == null ? void 0 : e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((i = window == null ? void 0 : window.navigator) == null ? void 0 : i.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));
|
|
268
268
|
}
|
|
269
269
|
function ce(e) {
|
|
270
270
|
return Array.isArray(e) ? e : [e];
|
|
271
271
|
}
|
|
272
|
-
const Xe = /[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;
|
|
273
|
-
function Ge(e,
|
|
272
|
+
const Xe = /[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;
|
|
273
|
+
function Ge(e, i, t, o) {
|
|
274
274
|
let a = e < 12 ? "AM" : "PM";
|
|
275
275
|
return o && (a = a.split("").reduce((l, c) => l += `${c}.`, "")), t ? a.toLowerCase() : a;
|
|
276
276
|
}
|
|
277
277
|
function ee(e) {
|
|
278
|
-
const
|
|
279
|
-
return e + (
|
|
278
|
+
const i = ["th", "st", "nd", "rd"], t = e % 100;
|
|
279
|
+
return e + (i[(t - 20) % 10] || i[t] || i[0]);
|
|
280
280
|
}
|
|
281
|
-
function ge(e,
|
|
281
|
+
function ge(e, i, t = {}) {
|
|
282
282
|
var o;
|
|
283
|
-
const a = e.getFullYear(), l = e.getMonth(), c = e.getDate(), s = e.getHours(), n = e.getMinutes(), r = e.getSeconds(), u = e.getMilliseconds(), f = e.getDay(),
|
|
283
|
+
const a = e.getFullYear(), l = e.getMonth(), c = e.getDate(), s = e.getHours(), n = e.getMinutes(), r = e.getSeconds(), u = e.getMilliseconds(), f = e.getDay(), x = (o = t.customMeridiem) != null ? o : Ge, y = (L) => {
|
|
284
|
+
var p;
|
|
285
|
+
return (p = L.split(" ")[1]) != null ? p : "";
|
|
286
|
+
}, b = {
|
|
284
287
|
Yo: () => ee(a),
|
|
285
288
|
YY: () => String(a).slice(-2),
|
|
286
289
|
YYYY: () => a,
|
|
287
290
|
M: () => l + 1,
|
|
288
291
|
Mo: () => ee(l + 1),
|
|
289
292
|
MM: () => `${l + 1}`.padStart(2, "0"),
|
|
290
|
-
MMM: () => e.toLocaleDateString(
|
|
291
|
-
MMMM: () => e.toLocaleDateString(
|
|
293
|
+
MMM: () => e.toLocaleDateString(F(t.locales), { month: "short" }),
|
|
294
|
+
MMMM: () => e.toLocaleDateString(F(t.locales), { month: "long" }),
|
|
292
295
|
D: () => String(c),
|
|
293
296
|
Do: () => ee(c),
|
|
294
297
|
DD: () => `${c}`.padStart(2, "0"),
|
|
@@ -306,23 +309,27 @@ function ge(e, d, t = {}) {
|
|
|
306
309
|
ss: () => `${r}`.padStart(2, "0"),
|
|
307
310
|
SSS: () => `${u}`.padStart(3, "0"),
|
|
308
311
|
d: () => f,
|
|
309
|
-
dd: () => e.toLocaleDateString(
|
|
310
|
-
ddd: () => e.toLocaleDateString(
|
|
311
|
-
dddd: () => e.toLocaleDateString(
|
|
312
|
-
A: () =>
|
|
313
|
-
AA: () =>
|
|
314
|
-
a: () =>
|
|
315
|
-
aa: () =>
|
|
312
|
+
dd: () => e.toLocaleDateString(F(t.locales), { weekday: "narrow" }),
|
|
313
|
+
ddd: () => e.toLocaleDateString(F(t.locales), { weekday: "short" }),
|
|
314
|
+
dddd: () => e.toLocaleDateString(F(t.locales), { weekday: "long" }),
|
|
315
|
+
A: () => x(s, n),
|
|
316
|
+
AA: () => x(s, n, !1, !0),
|
|
317
|
+
a: () => x(s, n, !0),
|
|
318
|
+
aa: () => x(s, n, !0, !0),
|
|
319
|
+
z: () => y(e.toLocaleDateString(F(t.locales), { timeZoneName: "shortOffset" })),
|
|
320
|
+
zz: () => y(e.toLocaleDateString(F(t.locales), { timeZoneName: "shortOffset" })),
|
|
321
|
+
zzz: () => y(e.toLocaleDateString(F(t.locales), { timeZoneName: "shortOffset" })),
|
|
322
|
+
zzzz: () => y(e.toLocaleDateString(F(t.locales), { timeZoneName: "longOffset" }))
|
|
316
323
|
};
|
|
317
|
-
return
|
|
318
|
-
var
|
|
319
|
-
return (
|
|
324
|
+
return i.replace(Xe, (L, p) => {
|
|
325
|
+
var k, D;
|
|
326
|
+
return (D = p ?? ((k = b[L]) == null ? void 0 : k.call(b))) != null ? D : L;
|
|
320
327
|
});
|
|
321
328
|
}
|
|
322
|
-
function Je(e,
|
|
329
|
+
function Je(e, i, t) {
|
|
323
330
|
return X(
|
|
324
331
|
e,
|
|
325
|
-
|
|
332
|
+
i,
|
|
326
333
|
{
|
|
327
334
|
...t,
|
|
328
335
|
immediate: !0
|
|
@@ -330,36 +337,36 @@ function Je(e, d, t) {
|
|
|
330
337
|
);
|
|
331
338
|
}
|
|
332
339
|
const $e = ke ? window : void 0;
|
|
333
|
-
function
|
|
334
|
-
var
|
|
335
|
-
const t =
|
|
336
|
-
return (
|
|
340
|
+
function oe(e) {
|
|
341
|
+
var i;
|
|
342
|
+
const t = F(e);
|
|
343
|
+
return (i = t == null ? void 0 : t.$el) != null ? i : t;
|
|
337
344
|
}
|
|
338
|
-
function
|
|
339
|
-
const
|
|
340
|
-
|
|
341
|
-
}, o = (s, n, r, u) => (s.addEventListener(n, r, u), () => s.removeEventListener(n, r, u)), a =
|
|
342
|
-
const s = ce(
|
|
345
|
+
function ne(...e) {
|
|
346
|
+
const i = [], t = () => {
|
|
347
|
+
i.forEach((s) => s()), i.length = 0;
|
|
348
|
+
}, o = (s, n, r, u) => (s.addEventListener(n, r, u), () => s.removeEventListener(n, r, u)), a = z(() => {
|
|
349
|
+
const s = ce(F(e[0])).filter((n) => n != null);
|
|
343
350
|
return s.every((n) => typeof n != "string") ? s : void 0;
|
|
344
351
|
}), l = Je(
|
|
345
352
|
() => {
|
|
346
353
|
var s, n;
|
|
347
354
|
return [
|
|
348
|
-
(n = (s = a.value) == null ? void 0 : s.map((r) =>
|
|
349
|
-
ce(
|
|
355
|
+
(n = (s = a.value) == null ? void 0 : s.map((r) => oe(r))) != null ? n : [$e].filter((r) => r != null),
|
|
356
|
+
ce(F(a.value ? e[1] : e[0])),
|
|
350
357
|
ce(A(a.value ? e[2] : e[1])),
|
|
351
358
|
// @ts-expect-error - TypeScript gets the correct types, but somehow still complains
|
|
352
|
-
|
|
359
|
+
F(a.value ? e[3] : e[2])
|
|
353
360
|
];
|
|
354
361
|
},
|
|
355
362
|
([s, n, r, u]) => {
|
|
356
363
|
if (t(), !(s != null && s.length) || !(n != null && n.length) || !(r != null && r.length))
|
|
357
364
|
return;
|
|
358
365
|
const f = Ue(u) ? { ...u } : u;
|
|
359
|
-
|
|
366
|
+
i.push(
|
|
360
367
|
...s.flatMap(
|
|
361
|
-
(
|
|
362
|
-
(
|
|
368
|
+
(x) => n.flatMap(
|
|
369
|
+
(y) => r.map((b) => o(x, y, b, f))
|
|
363
370
|
)
|
|
364
371
|
)
|
|
365
372
|
);
|
|
@@ -368,65 +375,73 @@ function se(...e) {
|
|
|
368
375
|
), c = () => {
|
|
369
376
|
l(), t();
|
|
370
377
|
};
|
|
371
|
-
return
|
|
378
|
+
return He(t), c;
|
|
372
379
|
}
|
|
373
380
|
let be = !1;
|
|
374
|
-
function pe(e,
|
|
375
|
-
const { window: o = $e, ignore: a = [], capture: l = !0, detectIframe: c = !1 } = t;
|
|
381
|
+
function pe(e, i, t = {}) {
|
|
382
|
+
const { window: o = $e, ignore: a = [], capture: l = !0, detectIframe: c = !1, controls: s = !1 } = t;
|
|
376
383
|
if (!o)
|
|
377
|
-
return
|
|
384
|
+
return s ? { stop: te, cancel: te, trigger: te } : te;
|
|
378
385
|
if (Ke && !be) {
|
|
379
386
|
be = !0;
|
|
380
|
-
const
|
|
381
|
-
Array.from(o.document.body.children).forEach((
|
|
387
|
+
const p = { passive: !0 };
|
|
388
|
+
Array.from(o.document.body.children).forEach((k) => ne(k, "click", te, p)), ne(o.document.documentElement, "click", te, p);
|
|
382
389
|
}
|
|
383
|
-
let
|
|
384
|
-
const
|
|
385
|
-
if (typeof
|
|
386
|
-
return Array.from(o.document.querySelectorAll(
|
|
390
|
+
let n = !0;
|
|
391
|
+
const r = (p) => F(a).some((k) => {
|
|
392
|
+
if (typeof k == "string")
|
|
393
|
+
return Array.from(o.document.querySelectorAll(k)).some((D) => D === p.target || p.composedPath().includes(D));
|
|
387
394
|
{
|
|
388
|
-
const
|
|
389
|
-
return
|
|
395
|
+
const D = oe(k);
|
|
396
|
+
return D && (p.target === D || p.composedPath().includes(D));
|
|
390
397
|
}
|
|
391
398
|
});
|
|
392
|
-
function
|
|
393
|
-
const
|
|
394
|
-
return
|
|
399
|
+
function u(p) {
|
|
400
|
+
const k = F(p);
|
|
401
|
+
return k && k.$.subTree.shapeFlag === 16;
|
|
395
402
|
}
|
|
396
|
-
function
|
|
397
|
-
const
|
|
398
|
-
return
|
|
403
|
+
function f(p, k) {
|
|
404
|
+
const D = F(p), H = D.$.subTree && D.$.subTree.children;
|
|
405
|
+
return H == null || !Array.isArray(H) ? !1 : H.some((Z) => Z.el === k.target || k.composedPath().includes(Z.el));
|
|
399
406
|
}
|
|
400
|
-
const
|
|
401
|
-
const
|
|
402
|
-
if (
|
|
403
|
-
if (
|
|
404
|
-
|
|
407
|
+
const x = (p) => {
|
|
408
|
+
const k = oe(e);
|
|
409
|
+
if (p.target != null && !(!(k instanceof Element) && u(e) && f(e, p)) && !(!k || k === p.target || p.composedPath().includes(k))) {
|
|
410
|
+
if ("detail" in p && p.detail === 0 && (n = !r(p)), !n) {
|
|
411
|
+
n = !0;
|
|
405
412
|
return;
|
|
406
413
|
}
|
|
407
|
-
|
|
414
|
+
i(p);
|
|
408
415
|
}
|
|
409
416
|
};
|
|
410
|
-
let
|
|
411
|
-
const
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
}, 0),
|
|
417
|
+
let y = !1;
|
|
418
|
+
const b = [
|
|
419
|
+
ne(o, "click", (p) => {
|
|
420
|
+
y || (y = !0, setTimeout(() => {
|
|
421
|
+
y = !1;
|
|
422
|
+
}, 0), x(p));
|
|
416
423
|
}, { passive: !0, capture: l }),
|
|
417
|
-
|
|
418
|
-
const
|
|
419
|
-
|
|
424
|
+
ne(o, "pointerdown", (p) => {
|
|
425
|
+
const k = oe(e);
|
|
426
|
+
n = !r(p) && !!(k && !p.composedPath().includes(k));
|
|
420
427
|
}, { passive: !0 }),
|
|
421
|
-
c &&
|
|
428
|
+
c && ne(o, "blur", (p) => {
|
|
422
429
|
setTimeout(() => {
|
|
423
|
-
var
|
|
424
|
-
const
|
|
425
|
-
((
|
|
430
|
+
var k;
|
|
431
|
+
const D = oe(e);
|
|
432
|
+
((k = o.document.activeElement) == null ? void 0 : k.tagName) === "IFRAME" && !(D != null && D.contains(o.document.activeElement)) && i(p);
|
|
426
433
|
}, 0);
|
|
427
434
|
}, { passive: !0 })
|
|
428
|
-
].filter(Boolean);
|
|
429
|
-
return
|
|
435
|
+
].filter(Boolean), L = () => b.forEach((p) => p());
|
|
436
|
+
return s ? {
|
|
437
|
+
stop: L,
|
|
438
|
+
cancel: () => {
|
|
439
|
+
n = !1;
|
|
440
|
+
},
|
|
441
|
+
trigger: (p) => {
|
|
442
|
+
n = !0, x(p), n = !1;
|
|
443
|
+
}
|
|
444
|
+
} : L;
|
|
430
445
|
}
|
|
431
446
|
const Qe = ["value", "onKeydown"], et = { class: "flex absolute inset-y-0 right-0 items-center pr-3 text-vxvue-700" }, tt = ["data-result-index"], kl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
432
447
|
__name: "autocomplete",
|
|
@@ -439,18 +454,18 @@ const Qe = ["value", "onKeydown"], et = { class: "flex absolute inset-y-0 right-
|
|
|
439
454
|
autoSelect: Boolean
|
|
440
455
|
},
|
|
441
456
|
emits: ["update:modelValue", "blur-sm", "submit"],
|
|
442
|
-
setup(e, { emit:
|
|
443
|
-
const t =
|
|
444
|
-
let
|
|
445
|
-
return (
|
|
446
|
-
})())((a.id || "autocomplete") + "-"), s = $([]), n = $(-1), r = $(0), u = $(!1), f = $(!1),
|
|
447
|
-
() => s.value.map((
|
|
448
|
-
id: (a.id || "autocomplete") + "-item-" +
|
|
449
|
-
class: [o.resultItemClass, { "bg-vxvue-700 text-white": n.value ===
|
|
457
|
+
setup(e, { emit: i }) {
|
|
458
|
+
const t = i, o = e, a = q(), c = (/* @__PURE__ */ (() => {
|
|
459
|
+
let V = 0;
|
|
460
|
+
return (T) => (T || "") + ++V;
|
|
461
|
+
})())((a.id || "autocomplete") + "-"), s = $([]), n = $(-1), r = $(0), u = $(!1), f = $(!1), x = $("top-0 translate-y-12"), y = $(!0), b = $(null), L = $(null), p = $(null), k = z(
|
|
462
|
+
() => s.value.map((V, T) => ({
|
|
463
|
+
id: (a.id || "autocomplete") + "-item-" + T,
|
|
464
|
+
class: [o.resultItemClass, { "bg-vxvue-700 text-white": n.value === T }],
|
|
450
465
|
role: "option",
|
|
451
|
-
...n.value ===
|
|
466
|
+
...n.value === T ? { "aria-selected": "true" } : {}
|
|
452
467
|
}))
|
|
453
|
-
),
|
|
468
|
+
), D = z(() => ({
|
|
454
469
|
role: "combobox",
|
|
455
470
|
autocomplete: "off",
|
|
456
471
|
autocapitalize: "off",
|
|
@@ -460,102 +475,102 @@ const Qe = ["value", "onKeydown"], et = { class: "flex absolute inset-y-0 right-
|
|
|
460
475
|
"aria-haspopup": "listbox",
|
|
461
476
|
"aria-owns": c,
|
|
462
477
|
"aria-expanded": u.value ? "true" : "false",
|
|
463
|
-
"aria-activedescendant": n.value > -1 ?
|
|
478
|
+
"aria-activedescendant": n.value > -1 ? k.value[n.value].id : "",
|
|
464
479
|
...a
|
|
465
|
-
})),
|
|
480
|
+
})), H = z(() => ({
|
|
466
481
|
id: c,
|
|
467
|
-
class: ["absolute min-w-full transform z-10", o.resultListClass,
|
|
482
|
+
class: ["absolute min-w-full transform z-10", o.resultListClass, x.value],
|
|
468
483
|
role: "listbox"
|
|
469
|
-
})),
|
|
470
|
-
n.value = -1, s.value = [], u.value = !1,
|
|
471
|
-
}, S = (
|
|
472
|
-
const
|
|
473
|
-
if (
|
|
484
|
+
})), Z = () => {
|
|
485
|
+
n.value = -1, s.value = [], u.value = !1, y.value = !0;
|
|
486
|
+
}, S = (V) => {
|
|
487
|
+
const T = o.search(V);
|
|
488
|
+
if (T instanceof Promise) {
|
|
474
489
|
const G = ++r.value;
|
|
475
|
-
f.value = !0,
|
|
476
|
-
G === r.value && (s.value =
|
|
490
|
+
f.value = !0, T.then((K) => {
|
|
491
|
+
G === r.value && (s.value = K, f.value = !1, s.value.length ? (n.value = o.autoSelect ? 0 : -1, u.value = !0) : Z());
|
|
477
492
|
});
|
|
478
493
|
} else
|
|
479
|
-
s.value =
|
|
480
|
-
},
|
|
481
|
-
const
|
|
482
|
-
return
|
|
483
|
-
},
|
|
484
|
-
t("update:modelValue",
|
|
485
|
-
}, h = (
|
|
486
|
-
|
|
487
|
-
},
|
|
488
|
-
const
|
|
489
|
-
n.value = ((n.value - 1) %
|
|
490
|
-
},
|
|
491
|
-
u.value || h(
|
|
492
|
-
const
|
|
493
|
-
n.value = ((n.value + 1) %
|
|
494
|
-
},
|
|
495
|
-
|
|
496
|
-
},
|
|
497
|
-
const
|
|
498
|
-
|
|
494
|
+
s.value = T, s.value.length === 0 ? Z() : (n.value = o.autoSelect ? 0 : -1, u.value = !0);
|
|
495
|
+
}, M = () => {
|
|
496
|
+
const V = s.value[n.value];
|
|
497
|
+
return V && t("update:modelValue", o.getResultValue(V)), Z(), V;
|
|
498
|
+
}, E = (V) => {
|
|
499
|
+
t("update:modelValue", V), S(V);
|
|
500
|
+
}, h = (V) => S(V.target.value), g = () => {
|
|
501
|
+
Z(), t("blur-sm");
|
|
502
|
+
}, w = () => {
|
|
503
|
+
const V = s.value.length;
|
|
504
|
+
n.value = ((n.value - 1) % V + V) % V;
|
|
505
|
+
}, I = (V) => {
|
|
506
|
+
u.value || h(V);
|
|
507
|
+
const T = s.value.length;
|
|
508
|
+
n.value = ((n.value + 1) % T + T) % T;
|
|
509
|
+
}, W = () => {
|
|
510
|
+
Z(), t("update:modelValue", "");
|
|
511
|
+
}, ae = () => t("submit", M()), Q = (V) => {
|
|
512
|
+
const T = V.target.closest("[data-result-index]");
|
|
513
|
+
T && (n.value = parseInt(T.dataset.resultIndex, 10), t("submit", M()));
|
|
499
514
|
};
|
|
500
|
-
return pe(
|
|
501
|
-
if (
|
|
502
|
-
const
|
|
503
|
-
|
|
504
|
-
const G =
|
|
515
|
+
return pe(p, Z), De(() => {
|
|
516
|
+
if (b.value) {
|
|
517
|
+
const V = L.value.getBoundingClientRect(), T = b.value.getBoundingClientRect();
|
|
518
|
+
y.value && s.value.length && (y.value = !1, x.value = V.bottom + T.height > window.innerHeight && window.innerHeight - V.bottom < V.top && window.pageYOffset + V.top - T.height > 0 ? "bottom-0 -translate-y-12" : "top-0 translate-y-12");
|
|
519
|
+
const G = b.value.querySelector('[data-result-index="' + n.value + '"]');
|
|
505
520
|
if (G) {
|
|
506
|
-
let
|
|
507
|
-
|
|
521
|
+
let K = G.getBoundingClientRect();
|
|
522
|
+
K.top < T.top ? b.value.scrollTop -= T.top - K.top : K.bottom > T.bottom && (b.value.scrollTop += K.bottom - T.bottom);
|
|
508
523
|
}
|
|
509
524
|
}
|
|
510
|
-
}), (
|
|
525
|
+
}), (V, T) => (d(), m("div", {
|
|
511
526
|
ref_key: "container",
|
|
512
|
-
ref:
|
|
513
|
-
class: C(["inline-block relative",
|
|
527
|
+
ref: p,
|
|
528
|
+
class: C(["inline-block relative", V.$attrs.class])
|
|
514
529
|
}, [
|
|
515
530
|
v("input", R({
|
|
516
531
|
ref_key: "input",
|
|
517
|
-
ref:
|
|
532
|
+
ref: L,
|
|
518
533
|
class: "block pr-10 w-full form-input focus:border-vxvue",
|
|
519
534
|
value: e.modelValue
|
|
520
|
-
},
|
|
521
|
-
onInput:
|
|
535
|
+
}, D.value, {
|
|
536
|
+
onInput: T[0] || (T[0] = (G) => E(G.target.value)),
|
|
522
537
|
onKeydown: [
|
|
523
|
-
ae
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
538
|
+
se(ae, ["enter"]),
|
|
539
|
+
se(W, ["esc"]),
|
|
540
|
+
se(M, ["tab"]),
|
|
541
|
+
se(j(w, ["prevent"]), ["up"]),
|
|
542
|
+
se(j(I, ["prevent"]), ["down"])
|
|
528
543
|
],
|
|
529
544
|
onFocus: h,
|
|
530
|
-
onBlur:
|
|
545
|
+
onBlur: g
|
|
531
546
|
}), null, 16, Qe),
|
|
532
547
|
v("span", et, [
|
|
533
|
-
f.value ? (
|
|
548
|
+
f.value ? (d(), U(we, {
|
|
534
549
|
key: 0,
|
|
535
550
|
class: "size-5"
|
|
536
|
-
})) :
|
|
551
|
+
})) : O("", !0)
|
|
537
552
|
]),
|
|
538
|
-
s.value.length ? (
|
|
553
|
+
s.value.length ? (d(), m("div", R({
|
|
539
554
|
key: 0,
|
|
540
555
|
ref_key: "resultList",
|
|
541
|
-
ref:
|
|
542
|
-
},
|
|
556
|
+
ref: b
|
|
557
|
+
}, H.value, {
|
|
543
558
|
onClick: Q,
|
|
544
|
-
onMousedown:
|
|
559
|
+
onMousedown: T[1] || (T[1] = j(() => {
|
|
545
560
|
}, ["prevent"]))
|
|
546
561
|
}), [
|
|
547
|
-
(
|
|
548
|
-
|
|
562
|
+
(d(!0), m(N, null, Y(s.value, (G, K) => (d(), m("div", { "data-result-index": K }, [
|
|
563
|
+
B(V.$slots, "result", {
|
|
549
564
|
result: G,
|
|
550
|
-
props:
|
|
565
|
+
props: k.value[K]
|
|
551
566
|
}, () => [
|
|
552
|
-
(
|
|
553
|
-
key:
|
|
567
|
+
(d(), m("div", R({
|
|
568
|
+
key: k.value[K].id,
|
|
554
569
|
ref_for: !0
|
|
555
|
-
},
|
|
570
|
+
}, k.value[K]), P(e.getResultValue(G)), 17))
|
|
556
571
|
])
|
|
557
572
|
], 8, tt))), 256))
|
|
558
|
-
], 16)) :
|
|
573
|
+
], 16)) : O("", !0)
|
|
559
574
|
], 2));
|
|
560
575
|
}
|
|
561
576
|
}), lt = {
|
|
@@ -571,7 +586,7 @@ const Qe = ["value", "onKeydown"], et = { class: "flex absolute inset-y-0 right-
|
|
|
571
586
|
buttons: {
|
|
572
587
|
type: [Object, Array],
|
|
573
588
|
default: () => ({ label: "Ok" }),
|
|
574
|
-
validator: (e) => Array.isArray(e) && e.length <= 2 && e.filter((
|
|
589
|
+
validator: (e) => Array.isArray(e) && e.length <= 2 && e.filter((i) => i.label !== "undefined" && i.value !== "undefined").length === e.length || e.label !== void 0 && e.value !== void 0
|
|
575
590
|
},
|
|
576
591
|
headerClass: {
|
|
577
592
|
type: String,
|
|
@@ -582,42 +597,42 @@ const Qe = ["value", "onKeydown"], et = { class: "flex absolute inset-y-0 right-
|
|
|
582
597
|
default: "button"
|
|
583
598
|
}
|
|
584
599
|
},
|
|
585
|
-
setup(e, { expose:
|
|
600
|
+
setup(e, { expose: i }) {
|
|
586
601
|
const t = e, o = $(""), a = $(""), l = $(!1);
|
|
587
602
|
let c = null, s = null;
|
|
588
|
-
const n =
|
|
589
|
-
l.value = !1,
|
|
603
|
+
const n = z(() => Array.isArray(t.buttons) ? t.buttons : [t.buttons]), r = $(null), u = (x, y) => {
|
|
604
|
+
l.value = !1, x.value !== void 0 ? x.value ? c() : s() : y ? s() : c();
|
|
590
605
|
};
|
|
591
|
-
return
|
|
592
|
-
c =
|
|
593
|
-
})) }), (
|
|
594
|
-
l.value ? (
|
|
595
|
-
|
|
596
|
-
default:
|
|
597
|
-
l.value ? (
|
|
606
|
+
return i({ open: (x, y) => (o.value = x, a.value = y, l.value = !0, me(() => r.value.firstElementChild.focus()), new Promise((b, L) => {
|
|
607
|
+
c = b, s = L;
|
|
608
|
+
})) }), (x, y) => (d(), m(N, null, [
|
|
609
|
+
l.value ? (d(), m("div", lt)) : O("", !0),
|
|
610
|
+
_(ve, { name: "appear" }, {
|
|
611
|
+
default: le(() => [
|
|
612
|
+
l.value ? (d(), m("div", at, [
|
|
598
613
|
v("div", st, [
|
|
599
|
-
l.value ? (
|
|
600
|
-
|
|
614
|
+
l.value ? (d(), m("div", nt, [
|
|
615
|
+
y[0] || (y[0] = v("span", {
|
|
601
616
|
class: "hidden sm:inline-block sm:h-screen sm:align-middle",
|
|
602
617
|
"aria-hidden": "true"
|
|
603
618
|
}, "", -1)),
|
|
604
619
|
v("div", ot, [
|
|
605
|
-
o.value ||
|
|
620
|
+
o.value || x.$slots.title ? (d(), m("h3", {
|
|
606
621
|
key: 0,
|
|
607
622
|
class: C(["py-4 pt-4 text-lg font-medium text-center sm:py-6", e.headerClass])
|
|
608
623
|
}, [
|
|
609
|
-
|
|
610
|
-
J(
|
|
624
|
+
B(x.$slots, "title", {}, () => [
|
|
625
|
+
J(P(o.value), 1)
|
|
611
626
|
])
|
|
612
|
-
], 2)) :
|
|
627
|
+
], 2)) : O("", !0),
|
|
613
628
|
v("div", rt, [
|
|
614
629
|
v("div", ut, [
|
|
615
630
|
v("div", it, [
|
|
616
|
-
|
|
631
|
+
B(x.$slots, "icon")
|
|
617
632
|
]),
|
|
618
633
|
v("p", dt, [
|
|
619
|
-
|
|
620
|
-
J(
|
|
634
|
+
B(x.$slots, "default", {}, () => [
|
|
635
|
+
J(P(a.value), 1)
|
|
621
636
|
])
|
|
622
637
|
])
|
|
623
638
|
]),
|
|
@@ -626,25 +641,25 @@ const Qe = ["value", "onKeydown"], et = { class: "flex absolute inset-y-0 right-
|
|
|
626
641
|
ref: r,
|
|
627
642
|
class: "flex justify-center mt-5 space-x-2 sm:mt-6"
|
|
628
643
|
}, [
|
|
629
|
-
(
|
|
630
|
-
key:
|
|
631
|
-
class: C([e.buttonClass,
|
|
632
|
-
onClick:
|
|
633
|
-
},
|
|
644
|
+
(d(!0), m(N, null, Y(n.value, (b, L) => (d(), m("button", {
|
|
645
|
+
key: b.label,
|
|
646
|
+
class: C([e.buttonClass, b.class]),
|
|
647
|
+
onClick: j((p) => u(b, L), ["prevent"])
|
|
648
|
+
}, P(b.label), 11, ct))), 128))
|
|
634
649
|
], 512)
|
|
635
650
|
])
|
|
636
651
|
])
|
|
637
|
-
])) :
|
|
652
|
+
])) : O("", !0)
|
|
638
653
|
])
|
|
639
|
-
])) :
|
|
654
|
+
])) : O("", !0)
|
|
640
655
|
]),
|
|
641
656
|
_: 3
|
|
642
657
|
})
|
|
643
658
|
], 64));
|
|
644
659
|
}
|
|
645
660
|
};
|
|
646
|
-
function vt(e,
|
|
647
|
-
const t = $(!1), o =
|
|
661
|
+
function vt(e, i) {
|
|
662
|
+
const t = $(!1), o = F(i);
|
|
648
663
|
let a, l = o.toLowerCase().replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), c = [];
|
|
649
664
|
if ((a = o.match(/\bd\b/gi)) && a.length === 1)
|
|
650
665
|
l = l.replace("d", "(\\d{1,2})");
|
|
@@ -662,7 +677,7 @@ function vt(e, d) {
|
|
|
662
677
|
l = l.replace("yyyy", "(\\d{4})");
|
|
663
678
|
else
|
|
664
679
|
return { date: t };
|
|
665
|
-
if (c.push({ srcPos: o.toLowerCase().indexOf("y"), destPos: 0 }), !(a =
|
|
680
|
+
if (c.push({ srcPos: o.toLowerCase().indexOf("y"), destPos: 0 }), !(a = F(e).match(l)))
|
|
666
681
|
return { date: t };
|
|
667
682
|
a.shift(), c.sort((u, f) => u.srcPos < f.srcPos ? -1 : 1);
|
|
668
683
|
let s = [], n, r;
|
|
@@ -679,28 +694,28 @@ const mt = { key: 0 }, ft = { class: "text-vxvue-700" }, ht = ["disabled"], pt =
|
|
|
679
694
|
modelValue: Date
|
|
680
695
|
},
|
|
681
696
|
emits: ["update:modelValue", "toggle-datepicker"],
|
|
682
|
-
setup(e, { emit:
|
|
683
|
-
const t =
|
|
697
|
+
setup(e, { emit: i }) {
|
|
698
|
+
const t = i, o = e, a = $(""), l = z(() => o.modelValue ? ge(o.modelValue, o.outputFormat) : ""), c = z(() => {
|
|
684
699
|
let s = Object.assign({}, q());
|
|
685
700
|
return delete s.class, s;
|
|
686
701
|
});
|
|
687
|
-
return X(() => o.modelValue, (s) => a.value = s ? ge(s, o.outputFormat) : ""), (s, n) => (
|
|
702
|
+
return X(() => o.modelValue, (s) => a.value = s ? ge(s, o.outputFormat) : ""), (s, n) => (d(), m("div", {
|
|
688
703
|
class: C(["inline-block relative", s.$attrs.class])
|
|
689
704
|
}, [
|
|
690
|
-
l.value ? (
|
|
705
|
+
l.value ? (d(), m("div", mt, [
|
|
691
706
|
v("div", {
|
|
692
707
|
class: C(["block flex items-center w-full form-input bg-vxvue-50", { "pr-10": e.showToggle }])
|
|
693
708
|
}, [
|
|
694
|
-
v("span", ft,
|
|
695
|
-
c.value.disabled ?
|
|
709
|
+
v("span", ft, P(l.value), 1),
|
|
710
|
+
c.value.disabled ? O("", !0) : (d(), m("button", {
|
|
696
711
|
key: 0,
|
|
697
712
|
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",
|
|
698
713
|
onClick: n[0] || (n[0] = (r) => t("update:modelValue", null))
|
|
699
714
|
}, [
|
|
700
|
-
|
|
715
|
+
_(A(he), { class: "size-4" })
|
|
701
716
|
]))
|
|
702
717
|
], 2)
|
|
703
|
-
])) : xe((
|
|
718
|
+
])) : xe((d(), m("input", R({
|
|
704
719
|
key: 1,
|
|
705
720
|
"onUpdate:modelValue": n[1] || (n[1] = (r) => a.value = r),
|
|
706
721
|
type: "text",
|
|
@@ -710,28 +725,28 @@ const mt = { key: 0 }, ft = { class: "text-vxvue-700" }, ht = ["disabled"], pt =
|
|
|
710
725
|
var u;
|
|
711
726
|
return t("update:modelValue", ((u = A(vt)(a.value, o.inputFormat).date) == null ? void 0 : u.value) || null);
|
|
712
727
|
}),
|
|
713
|
-
onInput: n[3] || (n[3] =
|
|
728
|
+
onInput: n[3] || (n[3] = j(() => {
|
|
714
729
|
}, ["prevent"]))
|
|
715
730
|
}), null, 16)), [
|
|
716
731
|
[Ae, a.value]
|
|
717
732
|
]),
|
|
718
|
-
e.showToggle ? (
|
|
733
|
+
e.showToggle ? (d(), m("button", {
|
|
719
734
|
key: 2,
|
|
720
735
|
ref: "toggleButton",
|
|
721
736
|
class: C(["flex absolute inset-y-0 right-0 items-center px-2 text-vxvue-700", c.value.disabled ? "cursor-not-allowed" : "hover:text-vxvue"]),
|
|
722
737
|
disabled: c.value.disabled,
|
|
723
738
|
"aria-label": "datepicker-toggle",
|
|
724
|
-
onClick: n[4] || (n[4] =
|
|
739
|
+
onClick: n[4] || (n[4] = j((r) => t("toggle-datepicker"), ["stop"]))
|
|
725
740
|
}, [
|
|
726
|
-
|
|
727
|
-
], 10, ht)) :
|
|
728
|
-
|
|
741
|
+
_(A(Pe), { class: "size-6" })
|
|
742
|
+
], 10, ht)) : O("", !0),
|
|
743
|
+
B(s.$slots, "default")
|
|
729
744
|
], 2));
|
|
730
745
|
}
|
|
731
746
|
}), gt = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, bt = { class: "flex justify-between w-1/2" }, xt = { class: "flex justify-between w-1/2" }, yt = { class: "grid grid-cols-7 gap-0.5 p-0.5" }, wt = ["disabled", "onClick"], kt = { class: "flex justify-between items-center py-2 px-3 text-white bg-vxvue-700" }, $t = { class: "grid grid-cols-2 gap-0.5 p-0.5" }, St = ["onClick"], Sl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
732
747
|
__name: "datepicker",
|
|
733
748
|
props: {
|
|
734
|
-
modelValue: { type: [Date, Array], default: null, validator: (e,
|
|
749
|
+
modelValue: { type: [Date, Array], default: null, validator: (e, i) => e instanceof Date && i.maxNumberOfValues === 1 || e.every((t) => t instanceof Date || t === null) && e.length <= i.maxNumberOfValues },
|
|
735
750
|
shownMonth: Date,
|
|
736
751
|
maxNumberOfValues: { type: Number, default: 1 },
|
|
737
752
|
validFrom: Date,
|
|
@@ -743,23 +758,23 @@ const mt = { key: 0 }, ft = { class: "text-vxvue-700" }, ht = ["disabled"], pt =
|
|
|
743
758
|
hasInput: { type: Boolean, default: !0 }
|
|
744
759
|
},
|
|
745
760
|
emits: ["update:modelValue", "month-change", "year-change"],
|
|
746
|
-
setup(e, { emit:
|
|
747
|
-
const t = e, o =
|
|
761
|
+
setup(e, { emit: i }) {
|
|
762
|
+
const t = e, o = i, a = (() => {
|
|
748
763
|
const h = /* @__PURE__ */ new Date();
|
|
749
764
|
return new Date(h.getFullYear(), h.getMonth(), h.getDate());
|
|
750
|
-
})(), l = $(null), c = $([]), s = $(!1), n = $("days"), r = $(0), u = $({ horiz: "left-0", vert: "top-0" }), f = $(null),
|
|
751
|
-
const h = [],
|
|
752
|
-
for (let Q = -
|
|
753
|
-
h.push(new Date(
|
|
765
|
+
})(), l = $(null), c = $([]), s = $(!1), n = $("days"), r = $(0), u = $({ horiz: "left-0", vert: "top-0" }), f = $(null), x = $(null), y = $(null), b = z(() => t.hasInput && t.maxNumberOfValues === 1), L = z(() => b.value ? { class: ["absolute", s.value ? "block" : "hidden"] } : {}), p = z(() => {
|
|
766
|
+
const h = [], g = l.value.getFullYear(), w = l.value.getMonth(), I = new Date(g, w + 1, 0), W = new Date(g, w, 0).getDay() + 1 - t.startOfWeekIndex, ae = (6 + t.startOfWeekIndex - I.getDay()) % 7;
|
|
767
|
+
for (let Q = -W, V = I.getDate() + ae; Q < V; ++Q)
|
|
768
|
+
h.push(new Date(g, w, Q + 1));
|
|
754
769
|
return h;
|
|
755
|
-
}),
|
|
770
|
+
}), k = z(() => t.startOfWeekIndex ? t.dayNames.slice(1).concat(t.dayNames[0]) : t.dayNames);
|
|
756
771
|
X(() => t.modelValue, (h) => {
|
|
757
772
|
if (h)
|
|
758
773
|
if (Array.isArray(h)) {
|
|
759
|
-
const
|
|
760
|
-
h.forEach((
|
|
761
|
-
|
|
762
|
-
}), (
|
|
774
|
+
const g = [], w = c.value;
|
|
775
|
+
h.forEach((I) => {
|
|
776
|
+
I && g.push(new Date(I.getFullYear(), I.getMonth(), I.getDate()));
|
|
777
|
+
}), (g.length !== w.length || ![.../* @__PURE__ */ new Set([...g, ...w])].every((I) => g.filter((W) => W.getTime() === I.getTime()).length === w.filter((W) => W.getTime() === I.getTime()).length)) && (c.value = g, l.value = new Date((g[0] || a).getTime()), l.value.setDate(1));
|
|
763
778
|
} else
|
|
764
779
|
c.value = [new Date(h.getFullYear(), h.getMonth(), h.getDate())], l.value = new Date(h.getFullYear(), h.getMonth(), 1);
|
|
765
780
|
else
|
|
@@ -767,147 +782,147 @@ const mt = { key: 0 }, ft = { class: "text-vxvue-700" }, ht = ["disabled"], pt =
|
|
|
767
782
|
}, { immediate: !0 }), X(() => t.shownMonth, (h) => {
|
|
768
783
|
l.value = new Date((h || a).getTime()), l.value.setDate(1);
|
|
769
784
|
}, { immediate: !0 }), X(s, (h) => {
|
|
770
|
-
h &&
|
|
771
|
-
const
|
|
785
|
+
h && b.value && me(() => {
|
|
786
|
+
const g = f.value.$el.getBoundingClientRect(), w = x.value.getBoundingClientRect();
|
|
772
787
|
u.value = {
|
|
773
|
-
horiz:
|
|
774
|
-
vert:
|
|
788
|
+
horiz: g.right - w.width < 0 ? "left-0" : "right-0",
|
|
789
|
+
vert: g.bottom + w.height > window.innerHeight ? "bottom-0 -translate-y-12" : "top-0 translate-y-12"
|
|
775
790
|
};
|
|
776
791
|
});
|
|
777
|
-
}), pe(
|
|
792
|
+
}), pe(x, () => {
|
|
778
793
|
s.value = !1, n.value = "days";
|
|
779
|
-
}, { ignore: [
|
|
780
|
-
const
|
|
794
|
+
}, { ignore: [y] });
|
|
795
|
+
const D = (h) => {
|
|
781
796
|
l.value = new Date(l.value.getFullYear(), h, 1), o("month-change", l.value);
|
|
782
|
-
},
|
|
797
|
+
}, H = (h) => {
|
|
783
798
|
l.value = new Date(h, l.value.getMonth(), 1), o("year-change", l.value);
|
|
784
|
-
},
|
|
799
|
+
}, Z = (h) => o("update:modelValue", h), S = (h) => {
|
|
785
800
|
if (s.value = !1, t.maxNumberOfValues === 1)
|
|
786
801
|
o("update:modelValue", h);
|
|
787
802
|
else {
|
|
788
|
-
const
|
|
789
|
-
let
|
|
790
|
-
|
|
803
|
+
const g = c.value;
|
|
804
|
+
let w = g.findIndex((I) => I.getTime() === h.getTime());
|
|
805
|
+
w !== -1 ? g.splice(w, 1) : g.length < t.maxNumberOfValues && g.push(h), o("update:modelValue", g);
|
|
791
806
|
}
|
|
792
|
-
},
|
|
793
|
-
const
|
|
807
|
+
}, M = (h) => c.value.find((g) => (g == null ? void 0 : g.getTime()) === h.getTime()), E = (h) => {
|
|
808
|
+
const g = h.getMonth() !== l.value.getMonth(), w = M(h), I = h.getTime() === a.getTime(), W = t.validFrom && t.validFrom > h || t.validUntil && t.validUntil < h, ae = !w && t.maxNumberOfValues > 1 && c.value.length === t.maxNumberOfValues, Q = t.highlightRange && h > Math.min(...c.value) && h < Math.max(...c.value);
|
|
794
809
|
return {
|
|
795
|
-
"cursor-not-allowed":
|
|
796
|
-
"text-vxvue-700": !
|
|
797
|
-
"text-error":
|
|
798
|
-
"text-gray-400":
|
|
799
|
-
"bg-vxvue-alt-300 font-bold":
|
|
800
|
-
"bg-vxvue-700 text-white":
|
|
801
|
-
"hover:ring-2 hover:ring-vxvue": !
|
|
802
|
-
"bg-vxvue-100/50": Q && !
|
|
810
|
+
"cursor-not-allowed": W || ae,
|
|
811
|
+
"text-vxvue-700": !W && !g && !I && !w,
|
|
812
|
+
"text-error": W && !g,
|
|
813
|
+
"text-gray-400": g && !I && !w,
|
|
814
|
+
"bg-vxvue-alt-300 font-bold": I && !w,
|
|
815
|
+
"bg-vxvue-700 text-white": w,
|
|
816
|
+
"hover:ring-2 hover:ring-vxvue": !W,
|
|
817
|
+
"bg-vxvue-100/50": Q && !I && !w
|
|
803
818
|
};
|
|
804
819
|
};
|
|
805
820
|
return fe(() => {
|
|
806
821
|
var h;
|
|
807
|
-
return
|
|
808
|
-
}), (h,
|
|
822
|
+
return y.value = (h = f.value) == null ? void 0 : h.$refs.toggleButton;
|
|
823
|
+
}), (h, g) => (d(), m("div", {
|
|
809
824
|
class: C(["relative", h.$attrs.class])
|
|
810
825
|
}, [
|
|
811
|
-
|
|
826
|
+
b.value ? (d(), U(pt, R({ key: 0 }, h.$attrs, {
|
|
812
827
|
ref_key: "input",
|
|
813
828
|
ref: f,
|
|
814
829
|
"model-value": c.value[0],
|
|
815
830
|
"show-toggle": !0,
|
|
816
831
|
class: "w-full",
|
|
817
|
-
onToggleDatepicker:
|
|
818
|
-
"onUpdate:modelValue":
|
|
832
|
+
onToggleDatepicker: g[0] || (g[0] = (w) => s.value = !s.value),
|
|
833
|
+
"onUpdate:modelValue": Z
|
|
819
834
|
}), {
|
|
820
|
-
default:
|
|
821
|
-
|
|
835
|
+
default: le(() => [
|
|
836
|
+
B(h.$slots, "default")
|
|
822
837
|
]),
|
|
823
838
|
_: 3
|
|
824
|
-
}, 16, ["model-value"])) :
|
|
825
|
-
v("div", R(
|
|
839
|
+
}, 16, ["model-value"])) : O("", !0),
|
|
840
|
+
v("div", R(L.value, {
|
|
826
841
|
ref_key: "calendar",
|
|
827
|
-
ref:
|
|
842
|
+
ref: x,
|
|
828
843
|
class: ["overflow-hidden z-10 bg-white rounded-sm shadow-md min-w-72 sm:min-w-80", [u.value.horiz, u.value.vert]]
|
|
829
844
|
}), [
|
|
830
|
-
n.value === "days" ? (
|
|
845
|
+
n.value === "days" ? (d(), m(N, { key: 0 }, [
|
|
831
846
|
v("div", gt, [
|
|
832
847
|
v("div", bt, [
|
|
833
848
|
v("button", {
|
|
834
849
|
class: "shrink-0 text-vxvue-100 hover:text-vxvue-50",
|
|
835
|
-
onClick:
|
|
850
|
+
onClick: g[1] || (g[1] = j((w) => D(l.value.getMonth() - 1), ["stop"]))
|
|
836
851
|
}, [
|
|
837
|
-
|
|
852
|
+
_(A(ie), { class: "size-6" })
|
|
838
853
|
]),
|
|
839
|
-
v("span", null,
|
|
854
|
+
v("span", null, P(l.value.toLocaleString(e.locale, { month: "long" })), 1),
|
|
840
855
|
v("button", {
|
|
841
856
|
class: "shrink-0 text-vxvue-100 hover:text-vxvue-50",
|
|
842
|
-
onClick:
|
|
857
|
+
onClick: g[2] || (g[2] = j((w) => D(l.value.getMonth() + 1), ["stop"]))
|
|
843
858
|
}, [
|
|
844
|
-
|
|
859
|
+
_(A(re), { class: "size-6" })
|
|
845
860
|
])
|
|
846
861
|
]),
|
|
847
862
|
v("div", xt, [
|
|
848
863
|
v("button", {
|
|
849
864
|
class: "shrink-0 text-vxvue-100 hover:text-vxvue-50",
|
|
850
|
-
onClick:
|
|
865
|
+
onClick: g[3] || (g[3] = j((w) => H(l.value.getFullYear() - 1), ["stop"]))
|
|
851
866
|
}, [
|
|
852
|
-
|
|
867
|
+
_(A(ie), { class: "size-6" })
|
|
853
868
|
]),
|
|
854
869
|
v("button", {
|
|
855
870
|
class: "text-vxvue-100 hover:text-vxvue-50",
|
|
856
|
-
onClick:
|
|
871
|
+
onClick: g[4] || (g[4] = (w) => {
|
|
857
872
|
n.value = "years", r.value = l.value.getFullYear();
|
|
858
873
|
})
|
|
859
|
-
},
|
|
874
|
+
}, P(l.value.getFullYear()), 1),
|
|
860
875
|
v("button", {
|
|
861
876
|
class: "shrink-0 text-vxvue-100 hover:text-vxvue-50",
|
|
862
|
-
onClick:
|
|
877
|
+
onClick: g[5] || (g[5] = j((w) => H(l.value.getFullYear() + 1), ["stop"]))
|
|
863
878
|
}, [
|
|
864
|
-
|
|
879
|
+
_(A(re), { class: "size-6" })
|
|
865
880
|
])
|
|
866
881
|
])
|
|
867
882
|
]),
|
|
868
883
|
v("div", yt, [
|
|
869
|
-
(
|
|
870
|
-
key:
|
|
884
|
+
(d(!0), m(N, null, Y(k.value, (w, I) => (d(), m("div", {
|
|
885
|
+
key: I,
|
|
871
886
|
class: "py-2 text-center bg-gray-200"
|
|
872
|
-
},
|
|
873
|
-
(
|
|
874
|
-
key:
|
|
875
|
-
class: C(["py-2 rounded-xs block text-center",
|
|
876
|
-
disabled: e.validFrom && e.validFrom >
|
|
877
|
-
onClick:
|
|
878
|
-
},
|
|
887
|
+
}, P(w), 1))), 128)),
|
|
888
|
+
(d(!0), m(N, null, Y(p.value, (w) => (d(), m("button", {
|
|
889
|
+
key: w,
|
|
890
|
+
class: C(["py-2 rounded-xs block text-center", E(w)]),
|
|
891
|
+
disabled: e.validFrom && e.validFrom > w || e.validUntil && e.validUntil < w || e.maxNumberOfValues > 1 && c.value.length === e.maxNumberOfValues && !M(w),
|
|
892
|
+
onClick: j((I) => S(w), ["stop"])
|
|
893
|
+
}, P(w.getDate()), 11, wt))), 128))
|
|
879
894
|
])
|
|
880
|
-
], 64)) :
|
|
881
|
-
n.value === "years" ? (
|
|
895
|
+
], 64)) : O("", !0),
|
|
896
|
+
n.value === "years" ? (d(), m(N, { key: 1 }, [
|
|
882
897
|
v("div", kt, [
|
|
883
898
|
v("button", {
|
|
884
899
|
class: "shrink-0 text-vxvue-100 hover:text-vxvue-50",
|
|
885
|
-
onClick:
|
|
900
|
+
onClick: g[6] || (g[6] = j((w) => r.value -= 10, ["stop"]))
|
|
886
901
|
}, [
|
|
887
|
-
|
|
902
|
+
_(A(ie), { class: "size-6" })
|
|
888
903
|
]),
|
|
889
|
-
v("span", null,
|
|
904
|
+
v("span", null, P(r.value) + " - " + P(r.value + 9), 1),
|
|
890
905
|
v("button", {
|
|
891
906
|
class: "shrink-0 text-vxvue-100 hover:text-vxvue-50",
|
|
892
|
-
onClick:
|
|
907
|
+
onClick: g[7] || (g[7] = j((w) => r.value += 10, ["stop"]))
|
|
893
908
|
}, [
|
|
894
|
-
|
|
909
|
+
_(A(re), { class: "size-6" })
|
|
895
910
|
])
|
|
896
911
|
]),
|
|
897
912
|
v("div", $t, [
|
|
898
|
-
(
|
|
899
|
-
key:
|
|
913
|
+
(d(), m(N, null, Y(10, (w) => v("div", {
|
|
914
|
+
key: w,
|
|
900
915
|
class: "text-center hover:ring-2 text-vxvue-700 hover:ring-vxvue"
|
|
901
916
|
}, [
|
|
902
917
|
v("button", {
|
|
903
918
|
class: "py-2 px-3",
|
|
904
|
-
onClick:
|
|
905
|
-
|
|
919
|
+
onClick: j((I) => {
|
|
920
|
+
H(r.value + w - 1), n.value = "days";
|
|
906
921
|
}, ["stop"])
|
|
907
|
-
},
|
|
922
|
+
}, P(r.value + w - 1), 9, St)
|
|
908
923
|
])), 64))
|
|
909
924
|
])
|
|
910
|
-
], 64)) :
|
|
925
|
+
], 64)) : O("", !0)
|
|
911
926
|
], 16)
|
|
912
927
|
], 2));
|
|
913
928
|
}
|
|
@@ -921,8 +936,8 @@ const mt = { key: 0 }, ft = { class: "text-vxvue-700" }, ht = ["disabled"], pt =
|
|
|
921
936
|
id: { type: String, default: "form-file-button-" + Math.ceil(Math.random() * 1e3) }
|
|
922
937
|
},
|
|
923
938
|
emits: ["update:modelValue", "form-data"],
|
|
924
|
-
setup(e, { emit:
|
|
925
|
-
const t =
|
|
939
|
+
setup(e, { emit: i }) {
|
|
940
|
+
const t = i, o = e, a = (c) => {
|
|
926
941
|
const s = new FormData();
|
|
927
942
|
for (let n of c)
|
|
928
943
|
s.append(o.name, n, n.name);
|
|
@@ -934,8 +949,8 @@ const mt = { key: 0 }, ft = { class: "text-vxvue-700" }, ht = ["disabled"], pt =
|
|
|
934
949
|
t("update:modelValue", n), t("form-data", a(n));
|
|
935
950
|
}
|
|
936
951
|
};
|
|
937
|
-
return (c, s) => (
|
|
938
|
-
|
|
952
|
+
return (c, s) => (d(), m("label", { for: e.id }, [
|
|
953
|
+
B(c.$slots, "default", {}, () => [
|
|
939
954
|
s[0] || (s[0] = J("Upload"))
|
|
940
955
|
]),
|
|
941
956
|
v("input", {
|
|
@@ -952,7 +967,7 @@ const mt = { key: 0 }, ft = { class: "text-vxvue-700" }, ht = ["disabled"], pt =
|
|
|
952
967
|
key: 0,
|
|
953
968
|
disabled: "",
|
|
954
969
|
value: ""
|
|
955
|
-
}, At = ["selected", "value"],
|
|
970
|
+
}, At = ["selected", "value"], Lt = {
|
|
956
971
|
__name: "form-select",
|
|
957
972
|
props: {
|
|
958
973
|
options: { type: Array, default: () => [] },
|
|
@@ -960,31 +975,31 @@ const mt = { key: 0 }, ft = { class: "text-vxvue-700" }, ht = ["disabled"], pt =
|
|
|
960
975
|
disabledLabel: { type: String, default: "" }
|
|
961
976
|
},
|
|
962
977
|
emits: ["update:modelValue"],
|
|
963
|
-
setup(e, { emit:
|
|
964
|
-
const t =
|
|
965
|
-
return (o, a) => (
|
|
978
|
+
setup(e, { emit: i }) {
|
|
979
|
+
const t = i;
|
|
980
|
+
return (o, a) => (d(), m("select", R(o.$attrs, {
|
|
966
981
|
value: e.modelValue,
|
|
967
982
|
class: "form-select",
|
|
968
983
|
onChange: a[0] || (a[0] = (l) => t("update:modelValue", l.target.value))
|
|
969
984
|
}), [
|
|
970
|
-
e.disabledLabel ? (
|
|
971
|
-
(
|
|
985
|
+
e.disabledLabel ? (d(), m("option", Dt, P(e.disabledLabel), 1)) : O("", !0),
|
|
986
|
+
(d(!0), m(N, null, Y(e.options, (l) => (d(), m("option", {
|
|
972
987
|
key: l.key !== void 0 ? l.key : l.label || l,
|
|
973
988
|
selected: (l.key !== void 0 ? l.key : l.label || l) === e.modelValue,
|
|
974
989
|
value: l.key !== void 0 ? l.key : l.label || l
|
|
975
|
-
},
|
|
990
|
+
}, P(l.label || l), 9, At))), 128))
|
|
976
991
|
], 16, Vt));
|
|
977
992
|
}
|
|
978
|
-
},
|
|
993
|
+
}, Tt = ["aria-checked", "aria-label"], Bt = ["d"], Pt = ["checked"], Ml = {
|
|
979
994
|
__name: "form-switch",
|
|
980
995
|
props: { modelValue: Boolean },
|
|
981
996
|
emits: ["update:modelValue"],
|
|
982
|
-
setup(e, { emit:
|
|
983
|
-
const t =
|
|
997
|
+
setup(e, { emit: i }) {
|
|
998
|
+
const t = i, o = z(() => {
|
|
984
999
|
let l = Object.assign({}, q());
|
|
985
1000
|
return delete l.class, l;
|
|
986
|
-
}), a =
|
|
987
|
-
return (l, c) => (
|
|
1001
|
+
}), a = z(() => q().disabled || q().disabled === "");
|
|
1002
|
+
return (l, c) => (d(), m("label", {
|
|
988
1003
|
class: C(l.$attrs.class),
|
|
989
1004
|
tabindex: "0"
|
|
990
1005
|
}, [
|
|
@@ -1005,8 +1020,8 @@ const mt = { key: 0 }, ft = { class: "text-vxvue-700" }, ht = ["disabled"], pt =
|
|
|
1005
1020
|
a.value ? "bg-slate-100" : "bg-white"
|
|
1006
1021
|
])
|
|
1007
1022
|
}, [
|
|
1008
|
-
|
|
1009
|
-
(
|
|
1023
|
+
B(l.$slots, "handle", {}, () => [
|
|
1024
|
+
(d(), m("svg", {
|
|
1010
1025
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1011
1026
|
fill: "none",
|
|
1012
1027
|
viewBox: "0 0 24 24",
|
|
@@ -1018,7 +1033,7 @@ const mt = { key: 0 }, ft = { class: "text-vxvue-700" }, ht = ["disabled"], pt =
|
|
|
1018
1033
|
"stroke-linecap": "round",
|
|
1019
1034
|
"stroke-linejoin": "round",
|
|
1020
1035
|
d: e.modelValue ? "M12 18 V6" : "m18.5 12 c0 3.5 -3 6.5 -6.5 6.5 -3.5 0 -6.5 -3 -6.5 -6.5 0 -3.5 3 -6.5 6.5 -6.5 3.5 0 6.5 3 6.5 6.5z"
|
|
1021
|
-
}, null, 8,
|
|
1036
|
+
}, null, 8, Bt)
|
|
1022
1037
|
], 2))
|
|
1023
1038
|
])
|
|
1024
1039
|
], 2),
|
|
@@ -1028,15 +1043,15 @@ const mt = { key: 0 }, ft = { class: "text-vxvue-700" }, ht = ["disabled"], pt =
|
|
|
1028
1043
|
value: "1",
|
|
1029
1044
|
type: "checkbox",
|
|
1030
1045
|
onChange: c[0] || (c[0] = (s) => t("update:modelValue", s.target.checked))
|
|
1031
|
-
}), null, 16,
|
|
1032
|
-
], 10,
|
|
1033
|
-
|
|
1046
|
+
}), null, 16, Pt)
|
|
1047
|
+
], 10, Tt),
|
|
1048
|
+
B(l.$slots, "default")
|
|
1034
1049
|
], 2));
|
|
1035
1050
|
}
|
|
1036
|
-
},
|
|
1051
|
+
}, zt = {
|
|
1037
1052
|
"aria-live": "assertive",
|
|
1038
1053
|
class: "flex fixed inset-0 z-50 items-start py-6 px-4 pointer-events-none sm:p-6"
|
|
1039
|
-
}, Ot = { class: "flex flex-col items-center space-y-4 w-full" },
|
|
1054
|
+
}, Ot = { class: "flex flex-col items-center space-y-4 w-full" }, It = { class: "p-4" }, Nt = { class: "flex items-start" }, Ft = { class: "shrink-0" }, Et = { class: "flex-1 pt-0.5 ml-3 w-0" }, jt = { class: "font-bold" }, Yt = { class: "mt-1" }, _t = { class: "flex shrink-0 ml-4" }, Vl = /* @__PURE__ */ Object.assign({
|
|
1040
1055
|
inheritAttrs: !1
|
|
1041
1056
|
}, {
|
|
1042
1057
|
__name: "message-toast",
|
|
@@ -1049,33 +1064,33 @@ const mt = { key: 0 }, ft = { class: "text-vxvue-700" }, ht = ["disabled"], pt =
|
|
|
1049
1064
|
showTimeoutProgress: { type: Boolean, default: !1 }
|
|
1050
1065
|
},
|
|
1051
1066
|
emits: ["timeout", "close"],
|
|
1052
|
-
setup(e, { emit:
|
|
1053
|
-
const t = e, o =
|
|
1067
|
+
setup(e, { emit: i }) {
|
|
1068
|
+
const t = e, o = i, a = z(() => typeof t.message == "string" ? [t.message] : t.message), l = $(0);
|
|
1054
1069
|
let c = null;
|
|
1055
1070
|
const s = () => {
|
|
1056
1071
|
window.clearTimeout(c), l.value = 100, t.active && t.timeout && (c = window.setTimeout(() => {
|
|
1057
1072
|
o("timeout");
|
|
1058
1073
|
}, t.timeout), window.setTimeout(() => l.value = 0, 0));
|
|
1059
1074
|
};
|
|
1060
|
-
return X(() => t.active, s), fe(s), (n, r) => (
|
|
1075
|
+
return X(() => t.active, s), fe(s), (n, r) => (d(), m("div", zt, [
|
|
1061
1076
|
v("div", Ot, [
|
|
1062
|
-
|
|
1063
|
-
default:
|
|
1064
|
-
e.active ? (
|
|
1077
|
+
_(ve, { name: e.transition }, {
|
|
1078
|
+
default: le(() => [
|
|
1079
|
+
e.active ? (d(), m("div", {
|
|
1065
1080
|
key: 0,
|
|
1066
1081
|
class: C(["overflow-hidden w-full max-w-sm rounded-md ring-1 ring-black/5 shadow-lg pointer-events-auto", n.$attrs.class])
|
|
1067
1082
|
}, [
|
|
1068
|
-
v("div",
|
|
1069
|
-
v("div",
|
|
1070
|
-
v("div",
|
|
1071
|
-
|
|
1083
|
+
v("div", It, [
|
|
1084
|
+
v("div", Nt, [
|
|
1085
|
+
v("div", Ft, [
|
|
1086
|
+
B(n.$slots, "icon")
|
|
1072
1087
|
]),
|
|
1073
1088
|
v("div", Et, [
|
|
1074
|
-
|
|
1075
|
-
v("div", jt,
|
|
1089
|
+
B(n.$slots, "title", {}, () => [
|
|
1090
|
+
v("div", jt, P(e.title), 1)
|
|
1076
1091
|
]),
|
|
1077
|
-
|
|
1078
|
-
(
|
|
1092
|
+
B(n.$slots, "default", {}, () => [
|
|
1093
|
+
(d(!0), m(N, null, Y(a.value, (u) => (d(), m("p", Yt, P(u), 1))), 256))
|
|
1079
1094
|
])
|
|
1080
1095
|
]),
|
|
1081
1096
|
v("div", _t, [
|
|
@@ -1084,12 +1099,12 @@ const mt = { key: 0 }, ft = { class: "text-vxvue-700" }, ht = ["disabled"], pt =
|
|
|
1084
1099
|
onClick: r[0] || (r[0] = (u) => o("close"))
|
|
1085
1100
|
}, [
|
|
1086
1101
|
r[1] || (r[1] = v("span", { class: "sr-only" }, "Close", -1)),
|
|
1087
|
-
|
|
1102
|
+
_(A(he), { class: "size-5" })
|
|
1088
1103
|
])
|
|
1089
1104
|
])
|
|
1090
1105
|
])
|
|
1091
1106
|
]),
|
|
1092
|
-
e.showTimeoutProgress && e.timeout ? (
|
|
1107
|
+
e.showTimeoutProgress && e.timeout ? (d(), m("div", {
|
|
1093
1108
|
key: 0,
|
|
1094
1109
|
class: "h-1 transition-all ease-linear bg-vxvue-alt",
|
|
1095
1110
|
style: ye({
|
|
@@ -1099,8 +1114,8 @@ const mt = { key: 0 }, ft = { class: "text-vxvue-700" }, ht = ["disabled"], pt =
|
|
|
1099
1114
|
role: "progressbar",
|
|
1100
1115
|
"aria-hidden": "false",
|
|
1101
1116
|
"aria-label": "notification timer"
|
|
1102
|
-
}, null, 4)) :
|
|
1103
|
-
], 2)) :
|
|
1117
|
+
}, null, 4)) : O("", !0)
|
|
1118
|
+
], 2)) : O("", !0)
|
|
1104
1119
|
]),
|
|
1105
1120
|
_: 3
|
|
1106
1121
|
}, 8, ["name"])
|
|
@@ -1111,10 +1126,10 @@ const mt = { key: 0 }, ft = { class: "text-vxvue-700" }, ht = ["disabled"], pt =
|
|
|
1111
1126
|
key: 0,
|
|
1112
1127
|
class: "fixed inset-0 z-9998 bg-white/50 backdrop-blur-xs",
|
|
1113
1128
|
"aria-hidden": "true"
|
|
1114
|
-
},
|
|
1129
|
+
}, Zt = {
|
|
1115
1130
|
key: 0,
|
|
1116
1131
|
class: "fixed inset-0 z-9999"
|
|
1117
|
-
},
|
|
1132
|
+
}, Ht = { class: "flex justify-center items-center h-screen" }, Dl = {
|
|
1118
1133
|
__name: "modal",
|
|
1119
1134
|
props: {
|
|
1120
1135
|
show: Boolean,
|
|
@@ -1123,14 +1138,14 @@ const mt = { key: 0 }, ft = { class: "text-vxvue-700" }, ht = ["disabled"], pt =
|
|
|
1123
1138
|
contentClass: { type: String, default: "" }
|
|
1124
1139
|
},
|
|
1125
1140
|
emits: ["clicked-outside"],
|
|
1126
|
-
setup(e, { emit:
|
|
1127
|
-
const t =
|
|
1128
|
-
return pe(o, () => t("clicked-outside")), (a, l) => (
|
|
1129
|
-
e.show ? (
|
|
1130
|
-
|
|
1131
|
-
default:
|
|
1132
|
-
e.show ? (
|
|
1133
|
-
v("div",
|
|
1141
|
+
setup(e, { emit: i }) {
|
|
1142
|
+
const t = i, o = $(null);
|
|
1143
|
+
return pe(o, () => t("clicked-outside")), (a, l) => (d(), m(N, null, [
|
|
1144
|
+
e.show ? (d(), m("div", Rt)) : O("", !0),
|
|
1145
|
+
_(ve, { name: "appear" }, {
|
|
1146
|
+
default: le(() => [
|
|
1147
|
+
e.show ? (d(), m("div", Zt, [
|
|
1148
|
+
v("div", Ht, [
|
|
1134
1149
|
v("div", {
|
|
1135
1150
|
ref_key: "container",
|
|
1136
1151
|
ref: o,
|
|
@@ -1139,22 +1154,22 @@ const mt = { key: 0 }, ft = { class: "text-vxvue-700" }, ht = ["disabled"], pt =
|
|
|
1139
1154
|
v("div", {
|
|
1140
1155
|
class: C(e.headerClass)
|
|
1141
1156
|
}, [
|
|
1142
|
-
|
|
1157
|
+
B(a.$slots, "title")
|
|
1143
1158
|
], 2),
|
|
1144
1159
|
v("div", {
|
|
1145
1160
|
class: C(["overflow-y-auto h-full pb-4 mt-16", e.contentClass])
|
|
1146
1161
|
}, [
|
|
1147
|
-
|
|
1162
|
+
B(a.$slots, "default")
|
|
1148
1163
|
], 2)
|
|
1149
1164
|
], 2)
|
|
1150
1165
|
])
|
|
1151
|
-
])) :
|
|
1166
|
+
])) : O("", !0)
|
|
1152
1167
|
]),
|
|
1153
1168
|
_: 3
|
|
1154
1169
|
})
|
|
1155
1170
|
], 64));
|
|
1156
1171
|
}
|
|
1157
|
-
},
|
|
1172
|
+
}, Wt = { class: "flex justify-between items-center px-4 sm:px-0" }, Ut = { class: "flex flex-1 -mt-px w-0" }, Kt = ["disabled"], qt = { class: "hidden md:flex md:-mt-px" }, Xt = { class: "flex flex-1 justify-end -mt-px w-0" }, Gt = ["disabled"], Al = {
|
|
1158
1173
|
__name: "pagination",
|
|
1159
1174
|
props: {
|
|
1160
1175
|
page: { type: Number, default: 1 },
|
|
@@ -1167,8 +1182,8 @@ const mt = { key: 0 }, ft = { class: "text-vxvue-700" }, ht = ["disabled"], pt =
|
|
|
1167
1182
|
markerPosition: { type: String, default: "above", validator: (e) => ["above", "below"].includes(e) }
|
|
1168
1183
|
},
|
|
1169
1184
|
emits: ["update:page"],
|
|
1170
|
-
setup(e, { emit:
|
|
1171
|
-
const t =
|
|
1185
|
+
setup(e, { emit: i }) {
|
|
1186
|
+
const t = i, o = e, a = $(Math.ceil(o.total / o.perPage)), l = $(null), c = z(() => (o.markerPosition === "above" ? "border-t-4 -mt-[4px]" : "border-b-4 -mb-[4px]") + " py-4"), s = z(() => {
|
|
1172
1187
|
let u = [1];
|
|
1173
1188
|
if (o.showAllPages || a.value <= 7) {
|
|
1174
1189
|
for (let f = 2; f <= a.value; ++f)
|
|
@@ -1185,9 +1200,9 @@ const mt = { key: 0 }, ft = { class: "text-vxvue-700" }, ht = ["disabled"], pt =
|
|
|
1185
1200
|
a.value = Math.ceil(o.total / o.perPage), t("update:page", 1);
|
|
1186
1201
|
}), X(() => o.total, (u) => {
|
|
1187
1202
|
a.value = Math.ceil(o.total / o.perPage), l.value > a.value && t("update:page", a.value);
|
|
1188
|
-
}), (u, f) => (
|
|
1203
|
+
}), (u, f) => (d(), m("nav", Wt, [
|
|
1189
1204
|
v("div", Ut, [
|
|
1190
|
-
e.showNavButtons ? (
|
|
1205
|
+
e.showNavButtons ? (d(), m("button", {
|
|
1191
1206
|
key: 0,
|
|
1192
1207
|
disabled: l.value <= 1,
|
|
1193
1208
|
class: C([
|
|
@@ -1196,29 +1211,29 @@ const mt = { key: 0 }, ft = { class: "text-vxvue-700" }, ht = ["disabled"], pt =
|
|
|
1196
1211
|
]),
|
|
1197
1212
|
onClick: n
|
|
1198
1213
|
}, [
|
|
1199
|
-
|
|
1200
|
-
J(" " +
|
|
1201
|
-
], 10, Kt)) :
|
|
1214
|
+
_(A(ie), { class: "size-5" }),
|
|
1215
|
+
J(" " + P(e.prevText), 1)
|
|
1216
|
+
], 10, Kt)) : O("", !0)
|
|
1202
1217
|
]),
|
|
1203
1218
|
v("div", qt, [
|
|
1204
|
-
(
|
|
1205
|
-
key:
|
|
1219
|
+
(d(!0), m(N, null, Y(s.value, (x, y) => (d(), U(de(e.page !== "dots" ? "button" : "span"), {
|
|
1220
|
+
key: y,
|
|
1206
1221
|
class: C([
|
|
1207
|
-
{ "pointer-events-none":
|
|
1208
|
-
|
|
1222
|
+
{ "pointer-events-none": x === "dots" },
|
|
1223
|
+
x === l.value ? "border-vxvue text-vxvue font-bold" : "border-transparent text-gray-500 hover:border-gray-300",
|
|
1209
1224
|
c.value,
|
|
1210
1225
|
"inline-flex items-center px-4 text-sm"
|
|
1211
1226
|
]),
|
|
1212
|
-
onClick: (
|
|
1227
|
+
onClick: (b) => x !== "dots" ? t("update:page", x) : null
|
|
1213
1228
|
}, {
|
|
1214
|
-
default:
|
|
1215
|
-
J(
|
|
1229
|
+
default: le(() => [
|
|
1230
|
+
J(P(x !== "dots" ? x : "…"), 1)
|
|
1216
1231
|
]),
|
|
1217
1232
|
_: 2
|
|
1218
1233
|
}, 1032, ["class", "onClick"]))), 128))
|
|
1219
1234
|
]),
|
|
1220
1235
|
v("div", Xt, [
|
|
1221
|
-
e.showNavButtons ? (
|
|
1236
|
+
e.showNavButtons ? (d(), m("button", {
|
|
1222
1237
|
key: 0,
|
|
1223
1238
|
disabled: l.value >= a.value,
|
|
1224
1239
|
class: C([
|
|
@@ -1227,15 +1242,15 @@ const mt = { key: 0 }, ft = { class: "text-vxvue-700" }, ht = ["disabled"], pt =
|
|
|
1227
1242
|
]),
|
|
1228
1243
|
onClick: r
|
|
1229
1244
|
}, [
|
|
1230
|
-
J(
|
|
1231
|
-
|
|
1232
|
-
], 10, Gt)) :
|
|
1245
|
+
J(P(e.nextText) + " ", 1),
|
|
1246
|
+
_(A(re), { class: "size-5" })
|
|
1247
|
+
], 10, Gt)) : O("", !0)
|
|
1233
1248
|
])
|
|
1234
1249
|
]));
|
|
1235
1250
|
}
|
|
1236
1251
|
};
|
|
1237
|
-
function Jt(e,
|
|
1238
|
-
return
|
|
1252
|
+
function Jt(e, i) {
|
|
1253
|
+
return d(), m("svg", {
|
|
1239
1254
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1240
1255
|
fill: "none",
|
|
1241
1256
|
viewBox: "0 0 24 24",
|
|
@@ -1251,8 +1266,8 @@ function Jt(e, d) {
|
|
|
1251
1266
|
})
|
|
1252
1267
|
]);
|
|
1253
1268
|
}
|
|
1254
|
-
function Qt(e,
|
|
1255
|
-
return
|
|
1269
|
+
function Qt(e, i) {
|
|
1270
|
+
return d(), m("svg", {
|
|
1256
1271
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1257
1272
|
fill: "none",
|
|
1258
1273
|
viewBox: "0 0 24 24",
|
|
@@ -1273,16 +1288,16 @@ function Qt(e, d) {
|
|
|
1273
1288
|
})
|
|
1274
1289
|
]);
|
|
1275
1290
|
}
|
|
1276
|
-
const el = ["value", "type"], tl = ["disabled"],
|
|
1291
|
+
const el = ["value", "type"], tl = ["disabled"], Ll = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
1277
1292
|
__name: "password-input",
|
|
1278
1293
|
props: { modelValue: { type: String, default: "" } },
|
|
1279
1294
|
emits: ["update:modelValue"],
|
|
1280
|
-
setup(e, { emit:
|
|
1281
|
-
const t =
|
|
1295
|
+
setup(e, { emit: i }) {
|
|
1296
|
+
const t = i, o = $(!1), a = z(() => {
|
|
1282
1297
|
let l = Object.assign({}, q());
|
|
1283
1298
|
return delete l.class, l;
|
|
1284
1299
|
});
|
|
1285
|
-
return (l, c) => (
|
|
1300
|
+
return (l, c) => (d(), m("div", {
|
|
1286
1301
|
class: C("inline-block relative " + q().class)
|
|
1287
1302
|
}, [
|
|
1288
1303
|
v("input", R({
|
|
@@ -1296,12 +1311,12 @@ const el = ["value", "type"], tl = ["disabled"], Bl = /* @__PURE__ */ Object.ass
|
|
|
1296
1311
|
class: "flex absolute inset-y-0 right-0 items-center px-3 text-brand-700 hover:text-brand",
|
|
1297
1312
|
"aria-label": "show-password-toggle",
|
|
1298
1313
|
disabled: q().disabled ?? !1,
|
|
1299
|
-
onClick: c[1] || (c[1] =
|
|
1314
|
+
onClick: c[1] || (c[1] = j((s) => o.value = !o.value, ["stop"]))
|
|
1300
1315
|
}, [
|
|
1301
|
-
o.value ? (
|
|
1316
|
+
o.value ? (d(), U(A(Jt), {
|
|
1302
1317
|
key: 0,
|
|
1303
1318
|
class: "size-5"
|
|
1304
|
-
})) : (
|
|
1319
|
+
})) : (d(), U(A(Qt), {
|
|
1305
1320
|
key: 1,
|
|
1306
1321
|
class: "size-5"
|
|
1307
1322
|
}))
|
|
@@ -1311,51 +1326,51 @@ const el = ["value", "type"], tl = ["disabled"], Bl = /* @__PURE__ */ Object.ass
|
|
|
1311
1326
|
}), ll = { class: "flex items-center pb-1" }, al = {
|
|
1312
1327
|
key: 0,
|
|
1313
1328
|
class: "ml-6"
|
|
1314
|
-
},
|
|
1329
|
+
}, Tl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
1315
1330
|
__name: "simple-tree",
|
|
1316
1331
|
props: {
|
|
1317
1332
|
branch: { type: Object, default: () => ({}) },
|
|
1318
1333
|
modelValue: { type: Object, default: null }
|
|
1319
1334
|
},
|
|
1320
1335
|
emits: ["update:modelValue", "expand"],
|
|
1321
|
-
setup(e, { emit:
|
|
1322
|
-
const t = e, o =
|
|
1336
|
+
setup(e, { emit: i }) {
|
|
1337
|
+
const t = e, o = i, a = $(!1);
|
|
1323
1338
|
return fe(() => {
|
|
1324
1339
|
t.branch === t.modelValue && o("expand", !0);
|
|
1325
1340
|
}), (l, c) => {
|
|
1326
|
-
const s =
|
|
1327
|
-
return
|
|
1341
|
+
const s = Le("simple-tree", !0);
|
|
1342
|
+
return d(), m("div", {
|
|
1328
1343
|
class: C([!e.branch.branches || !e.branch.branches.length ? "terminates" : "", l.$attrs.class])
|
|
1329
1344
|
}, [
|
|
1330
1345
|
v("div", ll, [
|
|
1331
|
-
e.branch.branches && e.branch.branches.length ? (
|
|
1346
|
+
e.branch.branches && e.branch.branches.length ? (d(), m("button", {
|
|
1332
1347
|
key: 0,
|
|
1333
1348
|
class: "mr-2",
|
|
1334
1349
|
onClick: c[0] || (c[0] = (n) => a.value = !a.value)
|
|
1335
1350
|
}, [
|
|
1336
|
-
|
|
1351
|
+
B(l.$slots, "toggle", {
|
|
1337
1352
|
branch: e.branch,
|
|
1338
1353
|
expanded: a.value
|
|
1339
1354
|
}, () => [
|
|
1340
|
-
(
|
|
1355
|
+
(d(), U(de(a.value ? A(Ne) : A(Fe)), { class: "p-1 text-white rounded-xs size-5 bg-vxvue-700 hover:bg-vxvue" }))
|
|
1341
1356
|
])
|
|
1342
|
-
])) :
|
|
1343
|
-
e.branch === e.modelValue ?
|
|
1357
|
+
])) : O("", !0),
|
|
1358
|
+
e.branch === e.modelValue ? B(l.$slots, "label-selected", {
|
|
1344
1359
|
key: 1,
|
|
1345
1360
|
branch: e.branch
|
|
1346
1361
|
}, () => [
|
|
1347
|
-
v("strong", null,
|
|
1348
|
-
]) : (
|
|
1362
|
+
v("strong", null, P(e.branch.label), 1)
|
|
1363
|
+
]) : (d(), m("button", {
|
|
1349
1364
|
key: 2,
|
|
1350
1365
|
onClick: c[1] || (c[1] = (n) => o("update:modelValue", e.branch))
|
|
1351
1366
|
}, [
|
|
1352
|
-
|
|
1353
|
-
J(
|
|
1367
|
+
B(l.$slots, "label", { branch: e.branch }, () => [
|
|
1368
|
+
J(P(e.branch.label), 1)
|
|
1354
1369
|
])
|
|
1355
1370
|
]))
|
|
1356
1371
|
]),
|
|
1357
|
-
e.branch.branches && e.branch.branches.length ? xe((
|
|
1358
|
-
(
|
|
1372
|
+
e.branch.branches && e.branch.branches.length ? xe((d(), m("div", al, [
|
|
1373
|
+
(d(!0), m(N, null, Y(e.branch.branches, (n) => (d(), U(s, {
|
|
1359
1374
|
key: n.id || n.key || null,
|
|
1360
1375
|
branch: n,
|
|
1361
1376
|
"model-value": e.modelValue,
|
|
@@ -1363,59 +1378,59 @@ const el = ["value", "type"], tl = ["disabled"], Bl = /* @__PURE__ */ Object.ass
|
|
|
1363
1378
|
onExpand: c[3] || (c[3] = (r) => {
|
|
1364
1379
|
a.value = r, o("expand", r);
|
|
1365
1380
|
})
|
|
1366
|
-
},
|
|
1367
|
-
|
|
1381
|
+
}, Te({ _: 2 }, [
|
|
1382
|
+
Y(l.$slots, (r, u) => ({
|
|
1368
1383
|
name: u,
|
|
1369
|
-
fn:
|
|
1370
|
-
|
|
1384
|
+
fn: le((f) => [
|
|
1385
|
+
B(l.$slots, u, R({ ref_for: !0 }, f))
|
|
1371
1386
|
])
|
|
1372
1387
|
}))
|
|
1373
1388
|
]), 1032, ["branch", "model-value"]))), 128))
|
|
1374
1389
|
], 512)), [
|
|
1375
|
-
[
|
|
1376
|
-
]) :
|
|
1390
|
+
[Be, a.value]
|
|
1391
|
+
]) : O("", !0)
|
|
1377
1392
|
], 2);
|
|
1378
1393
|
};
|
|
1379
1394
|
}
|
|
1380
|
-
}),
|
|
1395
|
+
}), Bl = {
|
|
1381
1396
|
__name: "sizable",
|
|
1382
1397
|
props: { vertical: Boolean },
|
|
1383
1398
|
emits: ["dragStart", "dragStop"],
|
|
1384
|
-
setup(e, { emit:
|
|
1385
|
-
const t = e, o =
|
|
1399
|
+
setup(e, { emit: i }) {
|
|
1400
|
+
const t = e, o = i, a = $(null), l = $(null);
|
|
1386
1401
|
let c = !1, s = {}, n = null, r = null, u = null;
|
|
1387
|
-
const f = (
|
|
1388
|
-
var
|
|
1402
|
+
const f = (b) => {
|
|
1403
|
+
var L;
|
|
1389
1404
|
if (c) {
|
|
1390
|
-
|
|
1391
|
-
const { pageX:
|
|
1392
|
-
t.vertical ? a.value.style.height = Math.min(r.height - u.height - (n.y - r.y), Math.max(0, n.height +
|
|
1405
|
+
b.preventDefault();
|
|
1406
|
+
const { pageX: p, pageY: k } = ((L = b.touches) == null ? void 0 : L[0]) ?? b;
|
|
1407
|
+
t.vertical ? a.value.style.height = Math.min(r.height - u.height - (n.y - r.y), Math.max(0, n.height + k - s.y)) + "px" : a.value.style.width = Math.min(r.width - u.width - (n.x - r.x), Math.max(0, n.width + p - s.x)) + "px";
|
|
1393
1408
|
}
|
|
1394
|
-
},
|
|
1395
|
-
var
|
|
1396
|
-
|
|
1397
|
-
const { pageX:
|
|
1398
|
-
s = { x:
|
|
1399
|
-
},
|
|
1400
|
-
c && (c = !1,
|
|
1409
|
+
}, x = (b) => {
|
|
1410
|
+
var k;
|
|
1411
|
+
b.preventDefault(), b.currentTarget.focus(), c = !0;
|
|
1412
|
+
const { pageX: L, pageY: p } = ((k = b.touches) == null ? void 0 : k[0]) ?? b;
|
|
1413
|
+
s = { x: L, y: p }, u = 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");
|
|
1414
|
+
}, y = (b) => {
|
|
1415
|
+
c && (c = !1, b.type === "mouseup" ? (document.removeEventListener("mousemove", f), document.removeEventListener("mouseup", y)) : (document.removeEventListener("touchmove", f), document.removeEventListener("touchend", y)), setTimeout(() => o("dragStop"), 0));
|
|
1401
1416
|
};
|
|
1402
|
-
return (
|
|
1417
|
+
return (b, L) => (d(), m("div", {
|
|
1403
1418
|
ref_key: "box",
|
|
1404
1419
|
ref: a,
|
|
1405
1420
|
class: "relative"
|
|
1406
1421
|
}, [
|
|
1407
|
-
|
|
1422
|
+
B(b.$slots, "default"),
|
|
1408
1423
|
v("div", R({
|
|
1409
1424
|
ref_key: "handle",
|
|
1410
1425
|
ref: l,
|
|
1411
1426
|
class: ["absolute flex", t.vertical ? "inset-x-0 top-full justify-center py-1 cursor-ns-resize" : "inset-y-0 left-full items-center px-1 cursor-ew-resize"]
|
|
1412
|
-
},
|
|
1413
|
-
touchstart:
|
|
1414
|
-
mousedown:
|
|
1415
|
-
touchend:
|
|
1416
|
-
mouseup:
|
|
1427
|
+
}, ue({
|
|
1428
|
+
touchstart: x,
|
|
1429
|
+
mousedown: x,
|
|
1430
|
+
touchend: y,
|
|
1431
|
+
mouseup: y
|
|
1417
1432
|
}, !0)), [
|
|
1418
|
-
|
|
1433
|
+
B(b.$slots, "handle", {}, () => [
|
|
1419
1434
|
v("div", {
|
|
1420
1435
|
class: C(["rounded-full bg-vxvue", t.vertical ? "h-1.5 w-8" : "h-8 w-1.5"])
|
|
1421
1436
|
}, null, 2)
|
|
@@ -1423,7 +1438,7 @@ const el = ["value", "type"], tl = ["disabled"], Bl = /* @__PURE__ */ Object.ass
|
|
|
1423
1438
|
], 16)
|
|
1424
1439
|
], 512));
|
|
1425
1440
|
}
|
|
1426
|
-
}, sl = ["aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext"], nl = ["id"], ol = ["id", "aria-label"],
|
|
1441
|
+
}, sl = ["aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext"], nl = ["id"], ol = ["id", "aria-label"], Pl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
1427
1442
|
__name: "slider",
|
|
1428
1443
|
props: {
|
|
1429
1444
|
min: { type: Number, default: 0 },
|
|
@@ -1431,72 +1446,72 @@ const el = ["value", "type"], tl = ["disabled"], Bl = /* @__PURE__ */ Object.ass
|
|
|
1431
1446
|
vertical: Boolean,
|
|
1432
1447
|
disabled: Boolean,
|
|
1433
1448
|
modelValue: { type: [Number, Array], default: null, validator(e) {
|
|
1434
|
-
return typeof e == "number" || e.every((
|
|
1449
|
+
return typeof e == "number" || e.every((i) => typeof i == "number");
|
|
1435
1450
|
} }
|
|
1436
1451
|
},
|
|
1437
1452
|
emits: ["update:modelValue", "dragStart", "dragStop"],
|
|
1438
|
-
setup(e, { emit:
|
|
1439
|
-
const t = e, o =
|
|
1453
|
+
setup(e, { emit: i }) {
|
|
1454
|
+
const t = e, o = i, a = q(), l = { x: null, y: null }, c = { w: null, h: null };
|
|
1440
1455
|
let s = !1;
|
|
1441
|
-
const n = $(null), r = $(0), u =
|
|
1442
|
-
const S = t.max,
|
|
1443
|
-
return t.modelValue instanceof Array ? t.modelValue.map((
|
|
1444
|
-
}), f =
|
|
1456
|
+
const n = $(null), r = $(0), u = z(() => {
|
|
1457
|
+
const S = t.max, M = t.min;
|
|
1458
|
+
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);
|
|
1459
|
+
}), f = z(() => {
|
|
1445
1460
|
if (t.modelValue instanceof Array) {
|
|
1446
|
-
const S = Math.min(...u.value) + "%",
|
|
1447
|
-
return t.vertical ? { bottom: S, height:
|
|
1461
|
+
const S = Math.min(...u.value) + "%", M = Math.max(...u.value) - Math.min(...u.value) + "%";
|
|
1462
|
+
return t.vertical ? { bottom: S, height: M } : { left: S, width: M };
|
|
1448
1463
|
}
|
|
1449
1464
|
return t.vertical ? { bottom: 0, height: u.value + "%" } : { width: u.value + "%" };
|
|
1450
|
-
}),
|
|
1465
|
+
}), x = $({
|
|
1451
1466
|
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"),
|
|
1452
1467
|
tabindex: 0
|
|
1453
|
-
}),
|
|
1454
|
-
let
|
|
1455
|
-
if (
|
|
1456
|
-
let
|
|
1457
|
-
|
|
1468
|
+
}), y = (S) => {
|
|
1469
|
+
let M = parseFloat(S.toFixed(10));
|
|
1470
|
+
if (M = Math.min(t.max, Math.max(t.min, M)), t.modelValue instanceof Array) {
|
|
1471
|
+
let E = [...t.modelValue];
|
|
1472
|
+
E[r.value] = M, o("update:modelValue", E);
|
|
1458
1473
|
} else
|
|
1459
|
-
o("update:modelValue",
|
|
1460
|
-
},
|
|
1461
|
-
const { pageX:
|
|
1462
|
-
|
|
1463
|
-
},
|
|
1464
|
-
const { clientLeft: S, clientTop:
|
|
1465
|
-
l.x =
|
|
1466
|
-
},
|
|
1467
|
-
s && (S.preventDefault(),
|
|
1468
|
-
},
|
|
1469
|
-
S.preventDefault(), S.currentTarget.focus(),
|
|
1470
|
-
},
|
|
1471
|
-
s && (s = !1, S.type === "mouseup" ? (document.removeEventListener("mousemove",
|
|
1472
|
-
},
|
|
1474
|
+
o("update:modelValue", M);
|
|
1475
|
+
}, b = (S) => {
|
|
1476
|
+
const { pageX: M, pageY: E } = S.touches ? S.touches[0] : S, h = t.vertical ? (-E + l.y) / c.h : (M - l.x) / c.w;
|
|
1477
|
+
y(Math.floor((t.max - t.min) * h + t.min));
|
|
1478
|
+
}, L = () => {
|
|
1479
|
+
const { clientLeft: S, clientTop: M, scrollLeft: E, scrollTop: h } = document.documentElement, g = n.value.getBoundingClientRect();
|
|
1480
|
+
l.x = g.left + E - S, l.y = g.bottom + h - M, c.w = n.value.offsetWidth, c.h = n.value.offsetHeight;
|
|
1481
|
+
}, p = (S) => {
|
|
1482
|
+
s && (S.preventDefault(), b(S));
|
|
1483
|
+
}, k = (S) => {
|
|
1484
|
+
S.preventDefault(), S.currentTarget.focus(), L(), s = !0, S.type === "mousedown" ? (document.addEventListener("mousemove", p), document.addEventListener("mouseup", D)) : (document.addEventListener("touchmove", p), document.addEventListener("touchend", D)), o("dragStart");
|
|
1485
|
+
}, D = (S) => {
|
|
1486
|
+
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));
|
|
1487
|
+
}, H = (S) => {
|
|
1473
1488
|
S.keyCode >= 33 && S.keyCode <= 40 && S.preventDefault();
|
|
1474
|
-
const
|
|
1489
|
+
const M = t.modelValue[r.value] ?? t.modelValue;
|
|
1475
1490
|
switch (S.keyCode) {
|
|
1476
1491
|
case 37:
|
|
1477
1492
|
case 40:
|
|
1478
|
-
|
|
1493
|
+
y(M - 1);
|
|
1479
1494
|
break;
|
|
1480
1495
|
case 39:
|
|
1481
1496
|
case 38:
|
|
1482
|
-
|
|
1497
|
+
y(M + 1);
|
|
1483
1498
|
break;
|
|
1484
1499
|
case 33:
|
|
1485
|
-
|
|
1500
|
+
y(M + (t.max - t.min) / 10);
|
|
1486
1501
|
break;
|
|
1487
1502
|
case 34:
|
|
1488
|
-
|
|
1503
|
+
y(M - (t.max - t.min) / 10);
|
|
1489
1504
|
break;
|
|
1490
1505
|
case 36:
|
|
1491
|
-
|
|
1506
|
+
y(t.min);
|
|
1492
1507
|
break;
|
|
1493
1508
|
case 35:
|
|
1494
|
-
|
|
1509
|
+
y(t.max);
|
|
1495
1510
|
}
|
|
1496
|
-
},
|
|
1497
|
-
|
|
1511
|
+
}, Z = (S) => {
|
|
1512
|
+
L(), b(S);
|
|
1498
1513
|
};
|
|
1499
|
-
return (S,
|
|
1514
|
+
return (S, M) => (d(), m("div", R({
|
|
1500
1515
|
ref_key: "track",
|
|
1501
1516
|
ref: n,
|
|
1502
1517
|
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"],
|
|
@@ -1506,58 +1521,58 @@ const el = ["value", "type"], tl = ["disabled"], Bl = /* @__PURE__ */ Object.ass
|
|
|
1506
1521
|
"aria-valuemax": t.max,
|
|
1507
1522
|
"aria-valuenow": e.modelValue[0] ?? e.modelValue,
|
|
1508
1523
|
"aria-valuetext": e.modelValue
|
|
1509
|
-
},
|
|
1510
|
-
click:
|
|
1524
|
+
}, ue(e.disabled ? {} : {
|
|
1525
|
+
click: Z
|
|
1511
1526
|
}, !0)), [
|
|
1512
|
-
e.disabled ?
|
|
1527
|
+
e.disabled ? O("", !0) : (d(), m("div", {
|
|
1513
1528
|
key: 0,
|
|
1514
1529
|
class: C(["absolute bg-vxvue", e.vertical ? "w-full rounded-t-full rounded-b-full" : "h-full rounded-r-full rounded-l-full"]),
|
|
1515
1530
|
style: ye(f.value)
|
|
1516
1531
|
}, null, 6)),
|
|
1517
|
-
e.modelValue.length ? (
|
|
1532
|
+
e.modelValue.length ? (d(!0), m(N, { key: 2 }, Y(e.modelValue, (E, h) => (d(), m("button", R({
|
|
1518
1533
|
id: h ? null : A(a).id,
|
|
1519
1534
|
style: e.vertical ? { bottom: u.value[h] + "%" } : { left: u.value[h] + "%" },
|
|
1520
1535
|
"aria-label": "slider-thumb-" + (h + 1),
|
|
1521
1536
|
ref_for: !0
|
|
1522
|
-
},
|
|
1537
|
+
}, x.value, ue(e.disabled ? {} : {
|
|
1523
1538
|
focus: () => r.value = h,
|
|
1524
|
-
keydown:
|
|
1525
|
-
touchstart: (
|
|
1526
|
-
r.value = h,
|
|
1539
|
+
keydown: H,
|
|
1540
|
+
touchstart: (g) => {
|
|
1541
|
+
r.value = h, k(g);
|
|
1527
1542
|
},
|
|
1528
|
-
mousedown: (
|
|
1529
|
-
r.value = h,
|
|
1543
|
+
mousedown: (g) => {
|
|
1544
|
+
r.value = h, k(g);
|
|
1530
1545
|
},
|
|
1531
|
-
touchend:
|
|
1532
|
-
mouseup:
|
|
1533
|
-
}, !0)), null, 16, ol))), 256)) : (
|
|
1546
|
+
touchend: D,
|
|
1547
|
+
mouseup: D
|
|
1548
|
+
}, !0)), null, 16, ol))), 256)) : (d(), m("button", R({
|
|
1534
1549
|
key: 1,
|
|
1535
1550
|
id: A(a).id,
|
|
1536
1551
|
style: e.vertical ? { bottom: u.value + "%" } : { left: u.value + "%" },
|
|
1537
1552
|
"aria-label": "slider-thumb"
|
|
1538
|
-
},
|
|
1553
|
+
}, x.value, ue(e.disabled ? {} : {
|
|
1539
1554
|
focus: () => r.value = 0,
|
|
1540
|
-
keydown:
|
|
1541
|
-
touchstart: (
|
|
1542
|
-
r.value = 0,
|
|
1555
|
+
keydown: H,
|
|
1556
|
+
touchstart: (E) => {
|
|
1557
|
+
r.value = 0, k(E);
|
|
1543
1558
|
},
|
|
1544
|
-
mousedown: (
|
|
1545
|
-
r.value = 0,
|
|
1559
|
+
mousedown: (E) => {
|
|
1560
|
+
r.value = 0, k(E);
|
|
1546
1561
|
},
|
|
1547
|
-
touchend:
|
|
1548
|
-
mouseup:
|
|
1562
|
+
touchend: D,
|
|
1563
|
+
mouseup: D
|
|
1549
1564
|
}, !0)), null, 16, nl))
|
|
1550
1565
|
], 16, sl));
|
|
1551
1566
|
}
|
|
1552
|
-
}), rl = ["data-active", "onClick"], ul = { class: "flex items-center space-x-1" }, il = ["data-active"],
|
|
1567
|
+
}), rl = ["data-active", "onClick"], ul = { class: "flex items-center space-x-1" }, il = ["data-active"], zl = {
|
|
1553
1568
|
__name: "sortable",
|
|
1554
1569
|
props: {
|
|
1555
1570
|
columns: {
|
|
1556
1571
|
type: Array,
|
|
1557
1572
|
required: !0,
|
|
1558
1573
|
validator: (e) => {
|
|
1559
|
-
for (const
|
|
1560
|
-
if (
|
|
1574
|
+
for (const i of e)
|
|
1575
|
+
if (i.label === void 0 || i.prop === void 0)
|
|
1561
1576
|
return !1;
|
|
1562
1577
|
return !0;
|
|
1563
1578
|
}
|
|
@@ -1572,22 +1587,22 @@ const el = ["value", "type"], tl = ["disabled"], Bl = /* @__PURE__ */ Object.ass
|
|
|
1572
1587
|
bodyClass: { type: String, default: "[&>*:nth-child(even)]:bg-vxvue-50 [&>*:nth-child(even)_*[data-active]]:bg-vxvue-alt-100 [&>*:nth-child(odd)_*[data-active]]:bg-vxvue-alt-50" }
|
|
1573
1588
|
},
|
|
1574
1589
|
emits: ["before-sort", "after-sort"],
|
|
1575
|
-
setup(e, { emit:
|
|
1576
|
-
const t = e, o =
|
|
1590
|
+
setup(e, { emit: i }) {
|
|
1591
|
+
const t = e, o = i, a = $(t.sortProp), l = $(t.sortDirection), c = z(() => {
|
|
1577
1592
|
let n = t.rows.slice();
|
|
1578
1593
|
const r = t.columns.find(({ prop: u }) => u === a.value);
|
|
1579
1594
|
return r && (l.value === "asc" && r.sortAscFunction ? n.sort(r.sortAscFunction) : l.value === "desc" && r.sortDescFunction ? n.sort(r.sortDescFunction) : n.sort((u, f) => u[a.value] < f[a.value] ? l.value === "asc" ? -1 : 1 : u[a.value] > f[a.value] ? l.value === "asc" ? 1 : -1 : 0)), n.slice(t.offset || 0, (t.offset || 0) + (t.count || n.length));
|
|
1580
1595
|
}), s = (n) => {
|
|
1581
1596
|
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"), me(() => o("after-sort", { prop: a.value, dir: l.value }));
|
|
1582
1597
|
};
|
|
1583
|
-
return (n, r) => (
|
|
1598
|
+
return (n, r) => (d(), m("table", {
|
|
1584
1599
|
class: C(n.$attrs.class || "w-full divide-y divide-y-slate-900 table-fixed")
|
|
1585
1600
|
}, [
|
|
1586
1601
|
v("thead", {
|
|
1587
1602
|
class: C(e.headerClass)
|
|
1588
1603
|
}, [
|
|
1589
1604
|
v("tr", null, [
|
|
1590
|
-
(
|
|
1605
|
+
(d(!0), m(N, null, Y(e.columns, (u) => (d(), m("th", {
|
|
1591
1606
|
key: u.prop,
|
|
1592
1607
|
scope: "col",
|
|
1593
1608
|
"data-active": a.value === u.prop ? "active" : null,
|
|
@@ -1598,17 +1613,17 @@ const el = ["value", "type"], tl = ["disabled"], Bl = /* @__PURE__ */ Object.ass
|
|
|
1598
1613
|
]),
|
|
1599
1614
|
onClick: (f) => u.sortable ? s(u.prop) : null
|
|
1600
1615
|
}, [
|
|
1601
|
-
|
|
1616
|
+
B(n.$slots, u.prop + "-header", {
|
|
1602
1617
|
column: u,
|
|
1603
1618
|
sortDir: l.value,
|
|
1604
1619
|
sortProp: a.value
|
|
1605
1620
|
}, () => [
|
|
1606
1621
|
v("div", ul, [
|
|
1607
|
-
v("span", null,
|
|
1608
|
-
u.sortable ? (
|
|
1622
|
+
v("span", null, P(u.label), 1),
|
|
1623
|
+
u.sortable ? (d(), U(de(a.value !== u.prop ? A(Oe) : l.value === "asc" ? A(ze) : A(Ie)), {
|
|
1609
1624
|
key: 0,
|
|
1610
1625
|
class: "size-4"
|
|
1611
|
-
})) :
|
|
1626
|
+
})) : O("", !0)
|
|
1612
1627
|
])
|
|
1613
1628
|
])
|
|
1614
1629
|
], 10, rl))), 128))
|
|
@@ -1617,26 +1632,26 @@ const el = ["value", "type"], tl = ["disabled"], Bl = /* @__PURE__ */ Object.ass
|
|
|
1617
1632
|
v("tbody", {
|
|
1618
1633
|
class: C(e.bodyClass)
|
|
1619
1634
|
}, [
|
|
1620
|
-
(
|
|
1635
|
+
(d(!0), m(N, null, Y(c.value, (u) => (d(), m("tr", {
|
|
1621
1636
|
key: u[e.keyProperty],
|
|
1622
1637
|
class: C(u.cssClass)
|
|
1623
1638
|
}, [
|
|
1624
|
-
(
|
|
1639
|
+
(d(!0), m(N, null, Y(e.columns, (f) => (d(), m("td", {
|
|
1625
1640
|
key: f.prop,
|
|
1626
1641
|
"data-active": a.value === f.prop ? "active" : null,
|
|
1627
1642
|
class: "overflow-hidden py-3 px-6 whitespace-nowrap text-ellipsis"
|
|
1628
1643
|
}, [
|
|
1629
|
-
|
|
1630
|
-
J(
|
|
1644
|
+
B(n.$slots, f.prop, { row: u }, () => [
|
|
1645
|
+
J(P(u[f.prop]), 1)
|
|
1631
1646
|
])
|
|
1632
1647
|
], 8, il))), 128))
|
|
1633
1648
|
], 2))), 128))
|
|
1634
1649
|
], 2)
|
|
1635
1650
|
], 2));
|
|
1636
1651
|
}
|
|
1637
|
-
}, dl = (e,
|
|
1652
|
+
}, dl = (e, i) => {
|
|
1638
1653
|
const t = e.__vccOpts || e;
|
|
1639
|
-
for (const [o, a] of
|
|
1654
|
+
for (const [o, a] of i)
|
|
1640
1655
|
t[o] = a;
|
|
1641
1656
|
return t;
|
|
1642
1657
|
}, cl = { class: "flex items-center space-x-2" }, vl = ["disabled"], ml = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
@@ -1647,35 +1662,35 @@ const el = ["value", "type"], tl = ["disabled"], Bl = /* @__PURE__ */ Object.ass
|
|
|
1647
1662
|
theme: { type: String, default: null }
|
|
1648
1663
|
},
|
|
1649
1664
|
emits: ["submit"],
|
|
1650
|
-
setup(e, { emit:
|
|
1651
|
-
const t =
|
|
1652
|
-
return (o, a) => (
|
|
1665
|
+
setup(e, { emit: i }) {
|
|
1666
|
+
const t = i;
|
|
1667
|
+
return (o, a) => (d(), m("div", cl, [
|
|
1653
1668
|
v("button", {
|
|
1654
1669
|
class: C([o.$attrs.class, e.theme]),
|
|
1655
1670
|
disabled: o.$attrs.disabled || e.busy,
|
|
1656
1671
|
type: "button",
|
|
1657
1672
|
onClick: a[0] || (a[0] = (l) => t("submit"))
|
|
1658
1673
|
}, [
|
|
1659
|
-
|
|
1674
|
+
B(o.$slots, "default", {}, void 0, !0)
|
|
1660
1675
|
], 10, vl),
|
|
1661
|
-
e.busy ? (
|
|
1676
|
+
e.busy ? (d(), U(we, {
|
|
1662
1677
|
key: 0,
|
|
1663
1678
|
class: C(e.spinnerClass || ["size-5", { error: "text-error", success: "text-success", default: "text-vxvue" }[e.theme || "default"]])
|
|
1664
|
-
}, null, 8, ["class"])) :
|
|
1679
|
+
}, null, 8, ["class"])) : O("", !0)
|
|
1665
1680
|
]));
|
|
1666
1681
|
}
|
|
1667
1682
|
}), Ol = /* @__PURE__ */ dl(ml, [["__scopeId", "data-v-9f360713"]]), fl = { class: "sm:hidden" }, hl = { class: "hidden sm:block" }, pl = { class: "border-b border-gray-200" }, gl = {
|
|
1668
1683
|
class: "flex -mb-px space-x-8",
|
|
1669
1684
|
"aria-label": "Tabs"
|
|
1670
|
-
}, bl = ["aria-current", "onClick"],
|
|
1685
|
+
}, bl = ["aria-current", "onClick"], Il = {
|
|
1671
1686
|
__name: "tabs",
|
|
1672
1687
|
props: {
|
|
1673
1688
|
items: { type: Array, default: () => [] },
|
|
1674
1689
|
activeIndex: { type: Number, default: 0 }
|
|
1675
1690
|
},
|
|
1676
1691
|
emits: ["update:activeIndex"],
|
|
1677
|
-
setup(e, { emit:
|
|
1678
|
-
const t = e, o =
|
|
1692
|
+
setup(e, { emit: i }) {
|
|
1693
|
+
const t = e, o = i, a = $(t.items[t.activeIndex] || {}), l = z(() => {
|
|
1679
1694
|
let s = [];
|
|
1680
1695
|
return t.items.forEach((n, r) => {
|
|
1681
1696
|
n.disabled || s.push({ label: n.name, key: r });
|
|
@@ -1687,9 +1702,9 @@ const el = ["value", "type"], tl = ["disabled"], Bl = /* @__PURE__ */ Object.ass
|
|
|
1687
1702
|
const c = (s) => {
|
|
1688
1703
|
s.disabled || (a.value = s, o("update:activeIndex", t.items.indexOf(s)));
|
|
1689
1704
|
};
|
|
1690
|
-
return (s, n) => (
|
|
1705
|
+
return (s, n) => (d(), m(N, null, [
|
|
1691
1706
|
v("div", fl, [
|
|
1692
|
-
|
|
1707
|
+
_(Lt, {
|
|
1693
1708
|
options: l.value,
|
|
1694
1709
|
"model-value": e.activeIndex,
|
|
1695
1710
|
class: "w-full",
|
|
@@ -1699,7 +1714,7 @@ const el = ["value", "type"], tl = ["disabled"], Bl = /* @__PURE__ */ Object.ass
|
|
|
1699
1714
|
v("div", hl, [
|
|
1700
1715
|
v("div", pl, [
|
|
1701
1716
|
v("nav", gl, [
|
|
1702
|
-
(
|
|
1717
|
+
(d(!0), m(N, null, Y(e.items, (r) => (d(), m("a", {
|
|
1703
1718
|
key: r.name,
|
|
1704
1719
|
href: "#",
|
|
1705
1720
|
class: C([
|
|
@@ -1711,16 +1726,16 @@ const el = ["value", "type"], tl = ["disabled"], Bl = /* @__PURE__ */ Object.ass
|
|
|
1711
1726
|
}
|
|
1712
1727
|
]),
|
|
1713
1728
|
"aria-current": a.value === r ? "page" : void 0,
|
|
1714
|
-
onClick:
|
|
1729
|
+
onClick: j((u) => c(r), ["prevent"])
|
|
1715
1730
|
}, [
|
|
1716
|
-
|
|
1731
|
+
B(s.$slots, "icon", { tab: r }),
|
|
1717
1732
|
v("span", null, [
|
|
1718
|
-
|
|
1719
|
-
J(
|
|
1733
|
+
B(s.$slots, "default", { tab: r }, () => [
|
|
1734
|
+
J(P(r.name), 1)
|
|
1720
1735
|
])
|
|
1721
1736
|
]),
|
|
1722
|
-
|
|
1723
|
-
r.badge ? (
|
|
1737
|
+
B(s.$slots, "badge", { tab: r }, () => [
|
|
1738
|
+
r.badge ? (d(), m("span", {
|
|
1724
1739
|
key: 0,
|
|
1725
1740
|
class: C([
|
|
1726
1741
|
"hidden ml-3 py-0.5 px-2.5 rounded-full text-xs font-medium md:inline-block text-current",
|
|
@@ -1730,7 +1745,7 @@ const el = ["value", "type"], tl = ["disabled"], Bl = /* @__PURE__ */ Object.ass
|
|
|
1730
1745
|
"bg-gray-200": a.value !== r && !r.disabled
|
|
1731
1746
|
}
|
|
1732
1747
|
])
|
|
1733
|
-
},
|
|
1748
|
+
}, P(r.badge), 3)) : O("", !0)
|
|
1734
1749
|
])
|
|
1735
1750
|
], 10, bl))), 128))
|
|
1736
1751
|
])
|
|
@@ -1738,6 +1753,36 @@ const el = ["value", "type"], tl = ["disabled"], Bl = /* @__PURE__ */ Object.ass
|
|
|
1738
1753
|
])
|
|
1739
1754
|
], 64));
|
|
1740
1755
|
}
|
|
1756
|
+
}, Nl = {
|
|
1757
|
+
mounted: (e) => e.focus()
|
|
1758
|
+
}, Fl = {
|
|
1759
|
+
mounted: (e, i) => {
|
|
1760
|
+
var l, c;
|
|
1761
|
+
const t = Math.random().toString(36).substring(2), o = document.createElement("div");
|
|
1762
|
+
o.classList.add("relative");
|
|
1763
|
+
const a = document.createElement("label");
|
|
1764
|
+
a.classList.add(
|
|
1765
|
+
"absolute",
|
|
1766
|
+
"px-2",
|
|
1767
|
+
"left-1",
|
|
1768
|
+
"top-2",
|
|
1769
|
+
"scale-90",
|
|
1770
|
+
"text-sm",
|
|
1771
|
+
"z-10",
|
|
1772
|
+
"origin-[0]",
|
|
1773
|
+
"bg-white",
|
|
1774
|
+
"-translate-y-4",
|
|
1775
|
+
"transform-gpu",
|
|
1776
|
+
"duration-200",
|
|
1777
|
+
"peer-focus:text-blue-600",
|
|
1778
|
+
"peer-focus:top-2",
|
|
1779
|
+
"peer-focus:scale-90",
|
|
1780
|
+
"peer-focus:-translate-y-full",
|
|
1781
|
+
"peer-placeholder-shown:scale-100",
|
|
1782
|
+
"peer-placeholder-shown:-translate-y-1/2",
|
|
1783
|
+
e.nodeName === "TEXTAREA" ? "peer-placeholder-shown:top-4" : "peer-placeholder-shown:top-1/2"
|
|
1784
|
+
), (l = i.value) != null && l.invalid && a.classList.add("text-error"), e.getAttribute("required") !== null && a.classList.add("required"), a.setAttribute("for", e.getAttribute("id") || t + "-element"), a.innerHTML = ((c = i.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(o, e), o.appendChild(e), o.appendChild(a);
|
|
1785
|
+
}
|
|
1741
1786
|
};
|
|
1742
1787
|
export {
|
|
1743
1788
|
yl as Accordion,
|
|
@@ -1747,17 +1792,19 @@ export {
|
|
|
1747
1792
|
pt as DateInput,
|
|
1748
1793
|
Sl as Datepicker,
|
|
1749
1794
|
Cl as FormFileButton,
|
|
1750
|
-
|
|
1795
|
+
Lt as FormSelect,
|
|
1751
1796
|
Ml as FormSwitch,
|
|
1752
1797
|
Vl as MessageToast,
|
|
1753
1798
|
Dl as Modal,
|
|
1754
1799
|
Al as Pagination,
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1800
|
+
Ll as PasswordInput,
|
|
1801
|
+
Tl as SimpleTree,
|
|
1802
|
+
Bl as Sizable,
|
|
1803
|
+
Pl as Slider,
|
|
1804
|
+
zl as Sortable,
|
|
1760
1805
|
we as Spinner,
|
|
1761
1806
|
Ol as SubmitButton,
|
|
1762
|
-
|
|
1807
|
+
Il as Tabs,
|
|
1808
|
+
Fl as VFloatingLabel,
|
|
1809
|
+
Nl as VFocus
|
|
1763
1810
|
};
|