vx-vue 1.0.0 → 1.0.3
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/style.css +1 -1
- package/dist/vxvue.es.js +517 -454
- package/dist/vxvue.umd.js +1 -1
- package/package.json +15 -11
package/dist/vxvue.es.js
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { useSlots as Ce, ref as w, computed as
|
|
2
|
-
const
|
|
1
|
+
import { useSlots as Ce, ref as w, computed as L, onBeforeUpdate as Me, openBlock as u, createElementBlock as m, Fragment as _, renderList as F, createBlock as Y, resolveDynamicComponent as ne, createElementVNode as i, useAttrs as W, normalizeClass as $, unref as V, renderSlot as M, getCurrentScope as Ve, onScopeDispose as De, watch as U, onUpdated as Ae, mergeProps as O, withKeys as Q, withModifiers as z, createCommentVNode as B, toDisplayString as D, createVNode as j, Transition as ie, withCtx as G, createTextVNode as Z, nextTick as de, toValue as fe, withDirectives as ge, vModelText as Be, onMounted as ce, normalizeStyle as be, pushScopeId as Le, popScopeId as Pe, resolveComponent as Ie, createSlots as _e, vShow as Te, toHandlers as le } from "vue";
|
|
2
|
+
const Vl = {
|
|
3
3
|
__name: "accordion",
|
|
4
4
|
props: { activeIndex: [Number, Array] },
|
|
5
5
|
emits: ["update:activeIndex"],
|
|
6
6
|
setup(e, { emit: d }) {
|
|
7
|
-
const t = e, s = d, a = Ce(), l = w([]), c = (
|
|
7
|
+
const t = e, s = d, a = Ce(), l = w([]), c = (f) => l.value.push(f), n = L(() => (l.value = [], a.default().reduce((f, h) => ((h.type.__name || h.type.name) === "accordion-panel" && f.push(h), f), []))), o = (f) => {
|
|
8
8
|
if (Array.isArray(t.activeIndex)) {
|
|
9
|
-
let
|
|
10
|
-
|
|
9
|
+
let h = [].concat(t.activeIndex), b = h.findIndex((g) => g === f);
|
|
10
|
+
b === -1 ? s("update:activeIndex", [...h, f]) : (h.splice(b, 1), s("update:activeIndex", h));
|
|
11
11
|
} else
|
|
12
|
-
s("update:activeIndex",
|
|
13
|
-
}, v = (
|
|
14
|
-
if (
|
|
15
|
-
o(
|
|
12
|
+
s("update:activeIndex", f === t.activeIndex ? -1 : f);
|
|
13
|
+
}, v = (f) => {
|
|
14
|
+
if (f = ++f % n.value.length, !l.value[f].disabled) {
|
|
15
|
+
o(f), l.value[f].focus();
|
|
16
16
|
return;
|
|
17
17
|
}
|
|
18
|
-
v(
|
|
19
|
-
},
|
|
20
|
-
if (
|
|
21
|
-
o(
|
|
18
|
+
v(f);
|
|
19
|
+
}, r = (f) => {
|
|
20
|
+
if (f = (f || n.value.length) - 1, !l.value[f].disabled) {
|
|
21
|
+
o(f), l.value[f].focus();
|
|
22
22
|
return;
|
|
23
23
|
}
|
|
24
|
-
|
|
24
|
+
r(f);
|
|
25
25
|
};
|
|
26
|
-
return
|
|
27
|
-
var
|
|
28
|
-
return
|
|
29
|
-
key:
|
|
30
|
-
show: Array.isArray(e.activeIndex) ? ((
|
|
31
|
-
onSelect: (
|
|
32
|
-
onKeydown: (
|
|
33
|
-
onKeyup: (
|
|
26
|
+
return Me(() => l.value = []), (f, h) => (u(!0), m(_, null, F(n.value, (b, g) => {
|
|
27
|
+
var A;
|
|
28
|
+
return u(), Y(ne(b), {
|
|
29
|
+
key: g,
|
|
30
|
+
show: Array.isArray(e.activeIndex) ? ((A = e.activeIndex) == null ? void 0 : A.indexOf(g)) !== -1 : e.activeIndex === g,
|
|
31
|
+
onSelect: (P) => o(g),
|
|
32
|
+
onKeydown: (P) => v(g),
|
|
33
|
+
onKeyup: (P) => r(g),
|
|
34
34
|
ref_for: !0,
|
|
35
35
|
ref: c
|
|
36
36
|
}, null, 40, ["show", "onSelect", "onKeydown", "onKeyup"]);
|
|
37
37
|
}), 128));
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
|
-
function
|
|
41
|
-
return
|
|
40
|
+
function ze(e, d) {
|
|
41
|
+
return u(), 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 Oe(e, d) {
|
|
|
52
52
|
})
|
|
53
53
|
]);
|
|
54
54
|
}
|
|
55
|
-
function
|
|
56
|
-
return
|
|
55
|
+
function ae(e, d) {
|
|
56
|
+
return u(), m("svg", {
|
|
57
57
|
xmlns: "http://www.w3.org/2000/svg",
|
|
58
58
|
viewBox: "0 0 24 24",
|
|
59
59
|
fill: "currentColor",
|
|
@@ -68,7 +68,7 @@ function le(e, d) {
|
|
|
68
68
|
]);
|
|
69
69
|
}
|
|
70
70
|
function te(e, d) {
|
|
71
|
-
return
|
|
71
|
+
return u(), 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 te(e, d) {
|
|
|
82
82
|
})
|
|
83
83
|
]);
|
|
84
84
|
}
|
|
85
|
-
function
|
|
86
|
-
return
|
|
85
|
+
function Fe(e, d) {
|
|
86
|
+
return u(), 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 ze(e, d) {
|
|
|
97
97
|
})
|
|
98
98
|
]);
|
|
99
99
|
}
|
|
100
|
-
function
|
|
101
|
-
return
|
|
100
|
+
function Ee(e, d) {
|
|
101
|
+
return u(), 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 Te(e, d) {
|
|
|
112
112
|
})
|
|
113
113
|
]);
|
|
114
114
|
}
|
|
115
|
-
function
|
|
116
|
-
return
|
|
115
|
+
function Oe(e, d) {
|
|
116
|
+
return u(), 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 je(e, d) {
|
|
|
127
127
|
})
|
|
128
128
|
]);
|
|
129
129
|
}
|
|
130
|
-
function
|
|
131
|
-
return
|
|
130
|
+
function je(e, d) {
|
|
131
|
+
return u(), 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 Ne(e, d) {
|
|
|
142
142
|
})
|
|
143
143
|
]);
|
|
144
144
|
}
|
|
145
|
-
function
|
|
146
|
-
return
|
|
145
|
+
function xe(e, d) {
|
|
146
|
+
return u(), m("svg", {
|
|
147
147
|
xmlns: "http://www.w3.org/2000/svg",
|
|
148
148
|
viewBox: "0 0 24 24",
|
|
149
149
|
fill: "currentColor",
|
|
@@ -157,20 +157,20 @@ function be(e, d) {
|
|
|
157
157
|
})
|
|
158
158
|
]);
|
|
159
159
|
}
|
|
160
|
-
const Ye = ["id", "disabled", "aria-expanded", "aria-controls"],
|
|
160
|
+
const Ye = ["id", "disabled", "aria-expanded", "aria-controls"], Ne = ["aria-labelledby", "id"], Re = { class: "overflow-hidden rounded-b" }, Dl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
161
161
|
__name: "accordion-panel",
|
|
162
162
|
props: { show: Boolean, disabled: Boolean },
|
|
163
163
|
emits: ["select", "keyup", "keydown"],
|
|
164
164
|
setup(e, { expose: d, emit: t }) {
|
|
165
|
-
const s = t, a = e, l = W(), c = w(null), n = Math.random().toString(20).substring(2, 8), o = (
|
|
165
|
+
const s = t, a = e, l = W(), c = w(null), n = Math.random().toString(20).substring(2, 8), o = (r) => {
|
|
166
166
|
if (!a.disabled) {
|
|
167
|
-
const
|
|
168
|
-
|
|
167
|
+
const f = (/* @__PURE__ */ new Map([[40, "keydown"], [38, "keyup"]])).get(r.keyCode);
|
|
168
|
+
f && (s(f), r.preventDefault());
|
|
169
169
|
}
|
|
170
170
|
};
|
|
171
|
-
return d({ focus: () => c.value.focus(), disabled: a.disabled }), (
|
|
171
|
+
return d({ focus: () => c.value.focus(), disabled: a.disabled }), (r, f) => (u(), m("div", null, [
|
|
172
172
|
i("button", {
|
|
173
|
-
onClick:
|
|
173
|
+
onClick: f[0] || (f[0] = (h) => s("select")),
|
|
174
174
|
onKeydown: o,
|
|
175
175
|
class: $([
|
|
176
176
|
"flex items-center w-full space-x-2 px-4 py-2 ring-vxvue",
|
|
@@ -186,15 +186,15 @@ const Ye = ["id", "disabled", "aria-expanded", "aria-controls"], Ee = ["aria-lab
|
|
|
186
186
|
ref: c,
|
|
187
187
|
tabindex: "0"
|
|
188
188
|
}, [
|
|
189
|
-
e.disabled ? (
|
|
189
|
+
e.disabled ? (u(), Y(V(xe), {
|
|
190
190
|
key: 0,
|
|
191
191
|
class: "size-5"
|
|
192
|
-
})) : (
|
|
192
|
+
})) : (u(), Y(V(te), {
|
|
193
193
|
key: 1,
|
|
194
194
|
class: $(["size-5 transform-gpu transition-transform duration-300", { "rotate-90": e.show }])
|
|
195
195
|
}, null, 8, ["class"])),
|
|
196
196
|
i("span", null, [
|
|
197
|
-
M(
|
|
197
|
+
M(r.$slots, "header")
|
|
198
198
|
])
|
|
199
199
|
], 42, Ye),
|
|
200
200
|
i("div", {
|
|
@@ -203,17 +203,17 @@ const Ye = ["id", "disabled", "aria-expanded", "aria-controls"], Ee = ["aria-lab
|
|
|
203
203
|
id: "ap-" + V(n)
|
|
204
204
|
}, [
|
|
205
205
|
i("div", Re, [
|
|
206
|
-
M(
|
|
206
|
+
M(r.$slots, "default")
|
|
207
207
|
])
|
|
208
|
-
], 10,
|
|
208
|
+
], 10, Ne)
|
|
209
209
|
]));
|
|
210
210
|
}
|
|
211
|
-
}), We = ["viewBox"], He = ["cx", "cy", "r", "stroke-width"], Ue = ["cx", "cy", "r", "stroke-width", "stroke-dasharray"],
|
|
211
|
+
}), We = ["viewBox"], He = ["cx", "cy", "r", "stroke-width"], Ue = ["cx", "cy", "r", "stroke-width", "stroke-dasharray"], ye = {
|
|
212
212
|
__name: "spinner",
|
|
213
213
|
props: { radius: { type: Number, default: 10 }, strokeWidth: { type: Number, default: 4 } },
|
|
214
214
|
setup(e) {
|
|
215
|
-
const d = e, t =
|
|
216
|
-
return (l, c) => (
|
|
215
|
+
const d = e, t = L(() => d.radius + d.strokeWidth / 2), s = L(() => d.radius * 2 + d.strokeWidth), a = L(() => d.radius * Math.PI / 1.5);
|
|
216
|
+
return (l, c) => (u(), m("svg", {
|
|
217
217
|
class: "animate-spin",
|
|
218
218
|
xmlns: "http://www.w3.org/2000/svg",
|
|
219
219
|
fill: "none",
|
|
@@ -241,20 +241,20 @@ const Ye = ["id", "disabled", "aria-expanded", "aria-controls"], Ee = ["aria-lab
|
|
|
241
241
|
}
|
|
242
242
|
};
|
|
243
243
|
function Ze(e) {
|
|
244
|
-
return Ve() ? (
|
|
244
|
+
return Ve() ? (De(e), !0) : !1;
|
|
245
245
|
}
|
|
246
|
-
function
|
|
246
|
+
function we(e) {
|
|
247
247
|
return typeof e == "function" ? e() : V(e);
|
|
248
248
|
}
|
|
249
|
-
const
|
|
249
|
+
const ke = typeof window < "u" && typeof document < "u";
|
|
250
250
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
251
|
-
const Ke = Object.prototype.toString, qe = (e) => Ke.call(e) === "[object Object]",
|
|
252
|
-
},
|
|
253
|
-
function
|
|
251
|
+
const Ke = Object.prototype.toString, qe = (e) => Ke.call(e) === "[object Object]", se = () => {
|
|
252
|
+
}, Xe = /* @__PURE__ */ Ge();
|
|
253
|
+
function Ge() {
|
|
254
254
|
var e, d;
|
|
255
|
-
return
|
|
255
|
+
return ke && ((e = window == null ? void 0 : window.navigator) == null ? void 0 : e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((d = window == null ? void 0 : window.navigator) == null ? void 0 : d.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));
|
|
256
256
|
}
|
|
257
|
-
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}|SSS/g;
|
|
257
|
+
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}|SSS/g;
|
|
258
258
|
function Qe(e, d, t, s) {
|
|
259
259
|
let a = e < 12 ? "AM" : "PM";
|
|
260
260
|
return s && (a = a.split("").reduce((l, c) => l += `${c}.`, "")), t ? a.toLowerCase() : a;
|
|
@@ -265,7 +265,7 @@ function q(e) {
|
|
|
265
265
|
}
|
|
266
266
|
function he(e, d, t = {}) {
|
|
267
267
|
var s;
|
|
268
|
-
const a = e.getFullYear(), l = e.getMonth(), c = e.getDate(), n = e.getHours(), o = e.getMinutes(), v = e.getSeconds(),
|
|
268
|
+
const a = e.getFullYear(), l = e.getMonth(), c = e.getDate(), n = e.getHours(), o = e.getMinutes(), v = e.getSeconds(), r = e.getMilliseconds(), f = e.getDay(), h = (s = t.customMeridiem) != null ? s : Qe, b = {
|
|
269
269
|
Yo: () => q(a),
|
|
270
270
|
YY: () => String(a).slice(-2),
|
|
271
271
|
YYYY: () => a,
|
|
@@ -289,42 +289,42 @@ function he(e, d, t = {}) {
|
|
|
289
289
|
s: () => String(v),
|
|
290
290
|
so: () => q(v),
|
|
291
291
|
ss: () => `${v}`.padStart(2, "0"),
|
|
292
|
-
SSS: () => `${
|
|
293
|
-
d: () =>
|
|
292
|
+
SSS: () => `${r}`.padStart(3, "0"),
|
|
293
|
+
d: () => f,
|
|
294
294
|
dd: () => e.toLocaleDateString(t.locales, { weekday: "narrow" }),
|
|
295
295
|
ddd: () => e.toLocaleDateString(t.locales, { weekday: "short" }),
|
|
296
296
|
dddd: () => e.toLocaleDateString(t.locales, { weekday: "long" }),
|
|
297
|
-
A: () =>
|
|
298
|
-
AA: () =>
|
|
299
|
-
a: () =>
|
|
300
|
-
aa: () =>
|
|
297
|
+
A: () => h(n, o),
|
|
298
|
+
AA: () => h(n, o, !1, !0),
|
|
299
|
+
a: () => h(n, o, !0),
|
|
300
|
+
aa: () => h(n, o, !0, !0)
|
|
301
301
|
};
|
|
302
|
-
return d.replace(Je, (
|
|
303
|
-
var
|
|
304
|
-
return (
|
|
302
|
+
return d.replace(Je, (g, A) => {
|
|
303
|
+
var P, I;
|
|
304
|
+
return (I = A ?? ((P = b[g]) == null ? void 0 : P.call(b))) != null ? I : g;
|
|
305
305
|
});
|
|
306
306
|
}
|
|
307
307
|
function ee(e) {
|
|
308
308
|
var d;
|
|
309
|
-
const t =
|
|
309
|
+
const t = we(e);
|
|
310
310
|
return (d = t == null ? void 0 : t.$el) != null ? d : t;
|
|
311
311
|
}
|
|
312
|
-
const
|
|
312
|
+
const $e = ke ? window : void 0;
|
|
313
313
|
function ue(...e) {
|
|
314
314
|
let d, t, s, a;
|
|
315
|
-
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([t, s, a] = e, d =
|
|
316
|
-
return
|
|
315
|
+
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([t, s, a] = e, d = $e) : [d, t, s, a] = e, !d)
|
|
316
|
+
return se;
|
|
317
317
|
Array.isArray(t) || (t = [t]), Array.isArray(s) || (s = [s]);
|
|
318
318
|
const l = [], c = () => {
|
|
319
|
-
l.forEach((
|
|
320
|
-
}, n = (
|
|
321
|
-
() => [ee(d),
|
|
322
|
-
([
|
|
323
|
-
if (c(), !
|
|
319
|
+
l.forEach((r) => r()), l.length = 0;
|
|
320
|
+
}, n = (r, f, h, b) => (r.addEventListener(f, h, b), () => r.removeEventListener(f, h, b)), o = U(
|
|
321
|
+
() => [ee(d), we(a)],
|
|
322
|
+
([r, f]) => {
|
|
323
|
+
if (c(), !r)
|
|
324
324
|
return;
|
|
325
|
-
const
|
|
325
|
+
const h = qe(f) ? { ...f } : f;
|
|
326
326
|
l.push(
|
|
327
|
-
...t.flatMap((
|
|
327
|
+
...t.flatMap((b) => s.map((g) => n(r, b, g, h)))
|
|
328
328
|
);
|
|
329
329
|
},
|
|
330
330
|
{ immediate: !0, flush: "post" }
|
|
@@ -335,42 +335,42 @@ function ue(...e) {
|
|
|
335
335
|
}
|
|
336
336
|
let pe = !1;
|
|
337
337
|
function ve(e, d, t = {}) {
|
|
338
|
-
const { window: s =
|
|
338
|
+
const { window: s = $e, ignore: a = [], capture: l = !0, detectIframe: c = !1 } = t;
|
|
339
339
|
if (!s)
|
|
340
|
-
return
|
|
341
|
-
|
|
340
|
+
return se;
|
|
341
|
+
Xe && !pe && (pe = !0, Array.from(s.document.body.children).forEach((h) => h.addEventListener("click", se)), s.document.documentElement.addEventListener("click", se));
|
|
342
342
|
let n = !0;
|
|
343
|
-
const o = (
|
|
344
|
-
if (typeof
|
|
345
|
-
return Array.from(s.document.querySelectorAll(
|
|
343
|
+
const o = (h) => a.some((b) => {
|
|
344
|
+
if (typeof b == "string")
|
|
345
|
+
return Array.from(s.document.querySelectorAll(b)).some((g) => g === h.target || h.composedPath().includes(g));
|
|
346
346
|
{
|
|
347
|
-
const
|
|
348
|
-
return
|
|
347
|
+
const g = ee(b);
|
|
348
|
+
return g && (h.target === g || h.composedPath().includes(g));
|
|
349
349
|
}
|
|
350
|
-
}),
|
|
351
|
-
ue(s, "click", (
|
|
352
|
-
const
|
|
353
|
-
if (!(!
|
|
354
|
-
if (
|
|
350
|
+
}), r = [
|
|
351
|
+
ue(s, "click", (h) => {
|
|
352
|
+
const b = ee(e);
|
|
353
|
+
if (!(!b || b === h.target || h.composedPath().includes(b))) {
|
|
354
|
+
if (h.detail === 0 && (n = !o(h)), !n) {
|
|
355
355
|
n = !0;
|
|
356
356
|
return;
|
|
357
357
|
}
|
|
358
|
-
d(
|
|
358
|
+
d(h);
|
|
359
359
|
}
|
|
360
360
|
}, { passive: !0, capture: l }),
|
|
361
|
-
ue(s, "pointerdown", (
|
|
362
|
-
const
|
|
363
|
-
n = !o(
|
|
361
|
+
ue(s, "pointerdown", (h) => {
|
|
362
|
+
const b = ee(e);
|
|
363
|
+
n = !o(h) && !!(b && !h.composedPath().includes(b));
|
|
364
364
|
}, { passive: !0 }),
|
|
365
|
-
c && ue(s, "blur", (
|
|
365
|
+
c && ue(s, "blur", (h) => {
|
|
366
366
|
setTimeout(() => {
|
|
367
|
-
var
|
|
368
|
-
const
|
|
369
|
-
((
|
|
367
|
+
var b;
|
|
368
|
+
const g = ee(e);
|
|
369
|
+
((b = s.document.activeElement) == null ? void 0 : b.tagName) === "IFRAME" && !(g != null && g.contains(s.document.activeElement)) && d(h);
|
|
370
370
|
}, 0);
|
|
371
371
|
})
|
|
372
372
|
].filter(Boolean);
|
|
373
|
-
return () =>
|
|
373
|
+
return () => r.forEach((h) => h());
|
|
374
374
|
}
|
|
375
375
|
const et = ["value", "onKeydown"], tt = { class: "flex absolute inset-y-0 right-0 items-center pr-3 text-vxvue-700" }, lt = ["data-result-index"], Al = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
376
376
|
__name: "autocomplete",
|
|
@@ -385,16 +385,16 @@ const et = ["value", "onKeydown"], tt = { class: "flex absolute inset-y-0 right-
|
|
|
385
385
|
emits: ["update:modelValue", "blur", "submit"],
|
|
386
386
|
setup(e, { emit: d }) {
|
|
387
387
|
const t = d, s = e, a = W(), c = (/* @__PURE__ */ (() => {
|
|
388
|
-
let
|
|
389
|
-
return (
|
|
390
|
-
})())((a.id || "autocomplete") + "-"), n = w([]), o = w(-1), v = w(0),
|
|
391
|
-
() => n.value.map((
|
|
392
|
-
id: (a.id || "autocomplete") + "-item-" +
|
|
393
|
-
class: [s.resultItemClass, { "bg-vxvue-700 text-white": o.value ===
|
|
388
|
+
let S = 0;
|
|
389
|
+
return (C) => (C || "") + ++S;
|
|
390
|
+
})())((a.id || "autocomplete") + "-"), n = w([]), o = w(-1), v = w(0), r = w(!1), f = w(!1), h = w("top-0 translate-y-12"), b = w(!0), g = w(null), A = w(null), P = w(null), I = L(
|
|
391
|
+
() => n.value.map((S, C) => ({
|
|
392
|
+
id: (a.id || "autocomplete") + "-item-" + C,
|
|
393
|
+
class: [s.resultItemClass, { "bg-vxvue-700 text-white": o.value === C }],
|
|
394
394
|
role: "option",
|
|
395
|
-
...o.value ===
|
|
395
|
+
...o.value === C ? { "aria-selected": "true" } : {}
|
|
396
396
|
}))
|
|
397
|
-
), E =
|
|
397
|
+
), E = L(() => ({
|
|
398
398
|
role: "combobox",
|
|
399
399
|
autocomplete: "off",
|
|
400
400
|
autocapitalize: "off",
|
|
@@ -403,100 +403,100 @@ const et = ["value", "onKeydown"], tt = { class: "flex absolute inset-y-0 right-
|
|
|
403
403
|
"aria-autocomplete": "list",
|
|
404
404
|
"aria-haspopup": "listbox",
|
|
405
405
|
"aria-owns": c,
|
|
406
|
-
"aria-expanded":
|
|
407
|
-
"aria-activedescendant": o.value > -1 ?
|
|
406
|
+
"aria-expanded": r.value ? "true" : "false",
|
|
407
|
+
"aria-activedescendant": o.value > -1 ? I.value[o.value].id : "",
|
|
408
408
|
...a
|
|
409
|
-
})),
|
|
409
|
+
})), X = L(() => ({
|
|
410
410
|
id: c,
|
|
411
|
-
class: ["absolute min-w-full transform z-10", s.resultListClass,
|
|
411
|
+
class: ["absolute min-w-full transform z-10", s.resultListClass, h.value],
|
|
412
412
|
role: "listbox"
|
|
413
413
|
})), R = () => {
|
|
414
|
-
o.value = -1, n.value = [],
|
|
415
|
-
}, k = (
|
|
416
|
-
const
|
|
417
|
-
if (
|
|
414
|
+
o.value = -1, n.value = [], r.value = !1, b.value = !0;
|
|
415
|
+
}, k = (S) => {
|
|
416
|
+
const C = s.search(S);
|
|
417
|
+
if (C instanceof Promise) {
|
|
418
418
|
const H = ++v.value;
|
|
419
|
-
|
|
420
|
-
H === v.value && (n.value =
|
|
419
|
+
f.value = !0, C.then((N) => {
|
|
420
|
+
H === v.value && (n.value = N, f.value = !1, n.value.length ? (o.value = s.autoSelect ? 0 : -1, r.value = !0) : R());
|
|
421
421
|
});
|
|
422
422
|
} else
|
|
423
|
-
n.value =
|
|
423
|
+
n.value = C, n.value.length === 0 ? R() : (o.value = s.autoSelect ? 0 : -1, r.value = !0);
|
|
424
424
|
}, p = () => {
|
|
425
|
-
const
|
|
426
|
-
return
|
|
427
|
-
},
|
|
428
|
-
t("update:modelValue",
|
|
429
|
-
},
|
|
425
|
+
const S = n.value[o.value];
|
|
426
|
+
return S && t("update:modelValue", s.getResultValue(S)), R(), S;
|
|
427
|
+
}, y = (S) => {
|
|
428
|
+
t("update:modelValue", S), k(S);
|
|
429
|
+
}, x = (S) => k(S.target.value), T = () => {
|
|
430
430
|
R(), t("blur");
|
|
431
431
|
}, K = () => {
|
|
432
|
-
const C = n.value.length;
|
|
433
|
-
o.value = ((o.value - 1) % C + C) % C;
|
|
434
|
-
}, ne = (C) => {
|
|
435
|
-
u.value || b(C);
|
|
436
432
|
const S = n.value.length;
|
|
437
|
-
o.value = ((o.value
|
|
433
|
+
o.value = ((o.value - 1) % S + S) % S;
|
|
434
|
+
}, oe = (S) => {
|
|
435
|
+
r.value || x(S);
|
|
436
|
+
const C = n.value.length;
|
|
437
|
+
o.value = ((o.value + 1) % C + C) % C;
|
|
438
438
|
}, J = () => {
|
|
439
439
|
R(), t("update:modelValue", "");
|
|
440
|
-
},
|
|
441
|
-
const
|
|
442
|
-
|
|
440
|
+
}, re = () => t("submit", p()), Se = (S) => {
|
|
441
|
+
const C = S.target.closest("[data-result-index]");
|
|
442
|
+
C && (o.value = parseInt(C.dataset.resultIndex, 10), t("submit", p()));
|
|
443
443
|
};
|
|
444
|
-
return ve(
|
|
445
|
-
if (
|
|
446
|
-
const
|
|
447
|
-
|
|
448
|
-
const H =
|
|
444
|
+
return ve(P, R), Ae(() => {
|
|
445
|
+
if (g.value) {
|
|
446
|
+
const S = A.value.getBoundingClientRect(), C = g.value.getBoundingClientRect();
|
|
447
|
+
b.value && n.value.length && (b.value = !1, h.value = S.bottom + C.height > window.innerHeight && window.innerHeight - S.bottom < S.top && window.pageYOffset + S.top - C.height > 0 ? "bottom-0 -translate-y-12" : "top-0 translate-y-12");
|
|
448
|
+
const H = g.value.querySelector('[data-result-index="' + o.value + '"]');
|
|
449
449
|
if (H) {
|
|
450
|
-
let
|
|
451
|
-
|
|
450
|
+
let N = H.getBoundingClientRect();
|
|
451
|
+
N.top < C.top ? g.value.scrollTop -= C.top - N.top : N.bottom > C.bottom && (g.value.scrollTop += N.bottom - C.bottom);
|
|
452
452
|
}
|
|
453
453
|
}
|
|
454
|
-
}), (
|
|
455
|
-
class: $(["inline-block relative",
|
|
454
|
+
}), (S, C) => (u(), m("div", {
|
|
455
|
+
class: $(["inline-block relative", S.$attrs.class]),
|
|
456
456
|
ref_key: "container",
|
|
457
|
-
ref:
|
|
457
|
+
ref: P
|
|
458
458
|
}, [
|
|
459
|
-
i("input",
|
|
459
|
+
i("input", O({
|
|
460
460
|
ref_key: "input",
|
|
461
|
-
ref:
|
|
461
|
+
ref: A,
|
|
462
462
|
class: "block pr-10 w-full form-input focus:border-vxvue",
|
|
463
463
|
value: e.modelValue
|
|
464
464
|
}, E.value, {
|
|
465
|
-
onInput:
|
|
465
|
+
onInput: C[0] || (C[0] = (H) => y(H.target.value)),
|
|
466
466
|
onKeydown: [
|
|
467
|
-
Q(
|
|
467
|
+
Q(re, ["enter"]),
|
|
468
468
|
Q(J, ["esc"]),
|
|
469
469
|
Q(p, ["tab"]),
|
|
470
|
-
Q(
|
|
471
|
-
Q(
|
|
470
|
+
Q(z(K, ["prevent"]), ["up"]),
|
|
471
|
+
Q(z(oe, ["prevent"]), ["down"])
|
|
472
472
|
],
|
|
473
|
-
onFocus:
|
|
474
|
-
onBlur:
|
|
473
|
+
onFocus: x,
|
|
474
|
+
onBlur: T
|
|
475
475
|
}), null, 16, et),
|
|
476
476
|
i("span", tt, [
|
|
477
|
-
|
|
477
|
+
f.value ? (u(), Y(ye, {
|
|
478
478
|
key: 0,
|
|
479
479
|
class: "size-5"
|
|
480
480
|
})) : B("", !0)
|
|
481
481
|
]),
|
|
482
|
-
n.value.length ? (
|
|
482
|
+
n.value.length ? (u(), m("div", O({
|
|
483
483
|
key: 0,
|
|
484
484
|
ref_key: "resultList",
|
|
485
|
-
ref:
|
|
486
|
-
},
|
|
487
|
-
onClick:
|
|
488
|
-
onMousedown:
|
|
485
|
+
ref: g
|
|
486
|
+
}, X.value, {
|
|
487
|
+
onClick: Se,
|
|
488
|
+
onMousedown: C[1] || (C[1] = z(() => {
|
|
489
489
|
}, ["prevent"]))
|
|
490
490
|
}), [
|
|
491
|
-
(
|
|
492
|
-
M(
|
|
491
|
+
(u(!0), m(_, null, F(n.value, (H, N) => (u(), m("div", { "data-result-index": N }, [
|
|
492
|
+
M(S.$slots, "result", {
|
|
493
493
|
result: H,
|
|
494
|
-
props:
|
|
494
|
+
props: I.value[N]
|
|
495
495
|
}, () => [
|
|
496
|
-
(
|
|
497
|
-
key:
|
|
496
|
+
(u(), m("div", O({
|
|
497
|
+
key: I.value[N].id,
|
|
498
498
|
ref_for: !0
|
|
499
|
-
},
|
|
499
|
+
}, I.value[N]), D(e.getResultValue(H)), 17))
|
|
500
500
|
])
|
|
501
501
|
], 8, lt))), 256))
|
|
502
502
|
], 16)) : B("", !0)
|
|
@@ -532,35 +532,35 @@ const et = ["value", "onKeydown"], tt = { class: "flex absolute inset-y-0 right-
|
|
|
532
532
|
setup(e, { expose: d }) {
|
|
533
533
|
const t = e, s = w(""), a = w(""), l = w(!1);
|
|
534
534
|
let c = null, n = null;
|
|
535
|
-
const o =
|
|
536
|
-
l.value = !1,
|
|
535
|
+
const o = L(() => Array.isArray(t.buttons) ? t.buttons : [t.buttons]), v = w(null), r = (h, b) => {
|
|
536
|
+
l.value = !1, h.value !== void 0 ? h.value ? c() : n() : b ? n() : c();
|
|
537
537
|
};
|
|
538
|
-
return d({ open: (
|
|
539
|
-
c =
|
|
540
|
-
})) }), (
|
|
541
|
-
l.value ? (
|
|
542
|
-
|
|
543
|
-
default:
|
|
544
|
-
l.value ? (
|
|
538
|
+
return d({ open: (h, b) => (s.value = h, a.value = b, l.value = !0, de(() => v.value.firstElementChild.focus()), new Promise((g, A) => {
|
|
539
|
+
c = g, n = A;
|
|
540
|
+
})) }), (h, b) => (u(), m(_, null, [
|
|
541
|
+
l.value ? (u(), m("div", at)) : B("", !0),
|
|
542
|
+
j(ie, { name: "appear" }, {
|
|
543
|
+
default: G(() => [
|
|
544
|
+
l.value ? (u(), m("div", st, [
|
|
545
545
|
i("div", nt, [
|
|
546
|
-
l.value ? (
|
|
546
|
+
l.value ? (u(), m("div", ot, [
|
|
547
547
|
rt,
|
|
548
548
|
i("div", ut, [
|
|
549
|
-
s.value ||
|
|
549
|
+
s.value || h.$slots.title ? (u(), m("h3", {
|
|
550
550
|
key: 0,
|
|
551
551
|
class: $(["py-4 pt-4 text-lg font-medium text-center sm:py-6", e.headerClass])
|
|
552
552
|
}, [
|
|
553
|
-
M(
|
|
553
|
+
M(h.$slots, "title", {}, () => [
|
|
554
554
|
Z(D(s.value), 1)
|
|
555
555
|
])
|
|
556
556
|
], 2)) : B("", !0),
|
|
557
557
|
i("div", it, [
|
|
558
558
|
i("div", dt, [
|
|
559
559
|
i("div", ct, [
|
|
560
|
-
M(
|
|
560
|
+
M(h.$slots, "icon")
|
|
561
561
|
]),
|
|
562
562
|
i("p", vt, [
|
|
563
|
-
M(
|
|
563
|
+
M(h.$slots, "default", {}, () => [
|
|
564
564
|
Z(D(a.value), 1)
|
|
565
565
|
])
|
|
566
566
|
])
|
|
@@ -570,10 +570,10 @@ const et = ["value", "onKeydown"], tt = { class: "flex absolute inset-y-0 right-
|
|
|
570
570
|
ref_key: "buttonsContainer",
|
|
571
571
|
ref: v
|
|
572
572
|
}, [
|
|
573
|
-
(
|
|
574
|
-
class: $([e.buttonClass,
|
|
575
|
-
onClick:
|
|
576
|
-
}, D(
|
|
573
|
+
(u(!0), m(_, null, F(o.value, (g, A) => (u(), m("button", {
|
|
574
|
+
class: $([e.buttonClass, g.class]),
|
|
575
|
+
onClick: z((P) => r(g, A), ["prevent"])
|
|
576
|
+
}, D(g.label), 11, mt))), 256))
|
|
577
577
|
], 512)
|
|
578
578
|
])
|
|
579
579
|
])
|
|
@@ -607,7 +607,7 @@ function ft(e, d) {
|
|
|
607
607
|
return { date: t };
|
|
608
608
|
if (c.push({ srcPos: s.toLowerCase().indexOf("y"), destPos: 0 }), !(a = fe(e).match(l)))
|
|
609
609
|
return { date: t };
|
|
610
|
-
a.shift(), c.sort((
|
|
610
|
+
a.shift(), c.sort((r, f) => r.srcPos < f.srcPos ? -1 : 1);
|
|
611
611
|
let n = [], o, v;
|
|
612
612
|
for (; o = a.shift(); )
|
|
613
613
|
v = c.shift(), n[v.destPos] = o;
|
|
@@ -646,21 +646,21 @@ const ht = { key: 0 }, pt = { class: "text-vxvue-700" }, gt = /* @__PURE__ */ i(
|
|
|
646
646
|
props: {
|
|
647
647
|
outputFormat: { type: String, default: "YYYY-MM-DD" },
|
|
648
648
|
inputFormat: { type: String, default: "YYYY-MM-DD" },
|
|
649
|
-
|
|
649
|
+
showToggle: { type: Boolean, default: !1 },
|
|
650
650
|
modelValue: Date
|
|
651
651
|
},
|
|
652
652
|
emits: ["update:modelValue", "toggle-datepicker"],
|
|
653
653
|
setup(e, { emit: d }) {
|
|
654
|
-
const t = d, s = e, a = w(""), l =
|
|
654
|
+
const t = d, s = e, a = w(""), l = L(() => s.modelValue ? he(s.modelValue, s.outputFormat) : ""), c = L(() => {
|
|
655
655
|
let n = Object.assign({}, W());
|
|
656
656
|
return delete n.class, n;
|
|
657
657
|
});
|
|
658
|
-
return U(() => s.modelValue, (n) => a.value = n ? he(n, s.outputFormat) : ""), (n, o) => (
|
|
658
|
+
return U(() => s.modelValue, (n) => a.value = n ? he(n, s.outputFormat) : ""), (n, o) => (u(), m("div", {
|
|
659
659
|
class: $(["inline-block relative", n.$attrs.class])
|
|
660
660
|
}, [
|
|
661
|
-
l.value ? (
|
|
661
|
+
l.value ? (u(), m("div", ht, [
|
|
662
662
|
i("div", {
|
|
663
|
-
class: $(["block flex items-center w-full form-input bg-vxvue-50", { "pr-10": e.
|
|
663
|
+
class: $(["block flex items-center w-full form-input bg-vxvue-50", { "pr-10": e.showToggle }])
|
|
664
664
|
}, [
|
|
665
665
|
i("span", pt, D(l.value), 1),
|
|
666
666
|
i("button", {
|
|
@@ -668,34 +668,34 @@ const ht = { key: 0 }, pt = { class: "text-vxvue-700" }, gt = /* @__PURE__ */ i(
|
|
|
668
668
|
class: "inline-flex flex-shrink-0 justify-center items-center ml-2 rounded-full focus:text-white focus:outline-none size-4 text-vxvue hover:bg-vxvue-100 hover:text-vue-700 focus:bg-vxvue-700"
|
|
669
669
|
}, bt)
|
|
670
670
|
], 2)
|
|
671
|
-
])) : ge((
|
|
671
|
+
])) : ge((u(), m("input", O({
|
|
672
672
|
key: 1,
|
|
673
673
|
type: "text",
|
|
674
|
-
class: ["block w-full form-input peer focus:border-vxvue", { "pr-10": e.
|
|
674
|
+
class: ["block w-full form-input peer focus:border-vxvue", { "pr-10": e.showToggle }],
|
|
675
675
|
"onUpdate:modelValue": o[1] || (o[1] = (v) => a.value = v),
|
|
676
676
|
onBlur: o[2] || (o[2] = (v) => {
|
|
677
|
-
var
|
|
678
|
-
return t("update:modelValue", ((
|
|
677
|
+
var r;
|
|
678
|
+
return t("update:modelValue", ((r = V(ft)(a.value, s.inputFormat).date) == null ? void 0 : r.value) || null);
|
|
679
679
|
}),
|
|
680
|
-
onInput: o[3] || (o[3] =
|
|
680
|
+
onInput: o[3] || (o[3] = z(() => {
|
|
681
681
|
}, ["prevent"]))
|
|
682
682
|
}, c.value), null, 16)), [
|
|
683
|
-
[
|
|
683
|
+
[Be, a.value]
|
|
684
684
|
]),
|
|
685
|
-
e.
|
|
685
|
+
e.showToggle ? (u(), m("button", {
|
|
686
686
|
key: 2,
|
|
687
687
|
class: "flex absolute inset-y-0 right-0 items-center px-2 text-vxvue-700 hover:text-vxvue",
|
|
688
688
|
"aria-label": "datepicker-toggle",
|
|
689
|
-
onClick: o[4] || (o[4] =
|
|
689
|
+
onClick: o[4] || (o[4] = z((v) => t("toggle-datepicker"), ["stop"])),
|
|
690
690
|
ref: "toggleButton"
|
|
691
691
|
}, yt, 512)) : B("", !0),
|
|
692
692
|
M(n.$slots, "default")
|
|
693
693
|
], 2));
|
|
694
694
|
}
|
|
695
|
-
}), kt = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, $t = { class: "flex justify-between w-1/2" },
|
|
695
|
+
}), kt = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, $t = { class: "flex justify-between w-1/2" }, St = { class: "flex justify-between w-1/2" }, Ct = { class: "grid grid-cols-7 gap-0.5 p-0.5" }, Mt = ["disabled", "onClick"], Vt = { class: "flex justify-between items-center py-2 px-3 text-white bg-vxvue-700" }, Dt = { class: "grid grid-cols-2 gap-0.5 p-0.5" }, At = { class: "text-center hover:ring-2 text-vxvue-700 hover:ring-vxvue" }, Bt = ["onClick"], Ll = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
696
696
|
__name: "datepicker",
|
|
697
697
|
props: {
|
|
698
|
-
modelValue:
|
|
698
|
+
modelValue: Date,
|
|
699
699
|
validFrom: Date,
|
|
700
700
|
validUntil: Date,
|
|
701
701
|
dayNames: { type: Array, default: () => "S M T W T F S".split(" ") },
|
|
@@ -708,154 +708,155 @@ const ht = { key: 0 }, pt = { class: "text-vxvue-700" }, gt = /* @__PURE__ */ i(
|
|
|
708
708
|
const t = e, s = d, a = (() => {
|
|
709
709
|
let p = /* @__PURE__ */ new Date();
|
|
710
710
|
return new Date(p.getFullYear(), p.getMonth(), p.getDate());
|
|
711
|
-
})(), l = w(new Date(a.getFullYear(), a.getMonth(), 1)), c = w(null), n = w(!t.hasInput), o = w("days"), v = w(0),
|
|
712
|
-
const p = [],
|
|
713
|
-
for (let J = -K,
|
|
714
|
-
p.push(new Date(
|
|
711
|
+
})(), l = w(new Date(a.getFullYear(), a.getMonth(), 1)), c = w(null), n = w(!t.hasInput), o = w("days"), v = w(0), r = w({ horiz: "left-0", vert: "top-0" }), f = w(null), h = w(null), b = w(null), g = L(() => t.hasInput ? { class: ["absolute", n.value ? "block" : "hidden"] } : {}), A = L(() => {
|
|
712
|
+
const p = [], y = l.value.getFullYear(), x = l.value.getMonth(), T = new Date(y, x + 1, 0), K = new Date(y, x, 0).getDay() + 1 - t.startOfWeekIndex, oe = (6 + t.startOfWeekIndex - T.getDay()) % 7;
|
|
713
|
+
for (let J = -K, re = T.getDate() + oe; J < re; ++J)
|
|
714
|
+
p.push(new Date(y, x, J + 1));
|
|
715
715
|
return p;
|
|
716
|
-
}),
|
|
716
|
+
}), P = L(() => t.startOfWeekIndex ? t.dayNames.slice(1).concat(t.dayNames[0]) : t.dayNames);
|
|
717
717
|
U(() => t.modelValue, (p) => {
|
|
718
718
|
p ? (c.value = new Date(p.getFullYear(), p.getMonth(), p.getDate()), l.value = new Date(c.value.getTime())) : (c.value = null, l.value = new Date(a.getTime())), l.value.setDate(1);
|
|
719
719
|
}, { immediate: !0 }), U(n, (p) => {
|
|
720
720
|
p && t.hasInput && de(() => {
|
|
721
|
-
const
|
|
722
|
-
|
|
723
|
-
horiz:
|
|
724
|
-
vert:
|
|
721
|
+
const y = f.value.$el.getBoundingClientRect(), x = h.value.getBoundingClientRect();
|
|
722
|
+
r.value = {
|
|
723
|
+
horiz: y.right - x.width < 0 ? "left-0" : "right-0",
|
|
724
|
+
vert: y.bottom + x.height > window.innerHeight ? "bottom-0 -translate-y-12" : "top-0 translate-y-12"
|
|
725
725
|
};
|
|
726
726
|
});
|
|
727
|
-
}), ve(
|
|
727
|
+
}), ve(h, () => {
|
|
728
728
|
n.value = !1, o.value = "days";
|
|
729
|
-
}, { ignore: [
|
|
730
|
-
const
|
|
729
|
+
}, { ignore: [b] });
|
|
730
|
+
const I = (p) => {
|
|
731
731
|
l.value = new Date(l.value.getFullYear(), p, 1), s("month-change", l.value);
|
|
732
732
|
}, E = (p) => {
|
|
733
733
|
l.value = new Date(p, l.value.getMonth(), 1), s("year-change", l.value);
|
|
734
|
-
},
|
|
734
|
+
}, X = (p) => {
|
|
735
735
|
n.value = !t.hasInput, c.value = p, s("update:modelValue", p);
|
|
736
736
|
}, R = (p) => {
|
|
737
737
|
c.value = p, s("update:modelValue", p);
|
|
738
738
|
}, k = (p) => {
|
|
739
|
-
const
|
|
739
|
+
const y = p.getMonth() !== l.value.getMonth(), x = c.value && p.getTime() === c.value.getTime(), T = p.getTime() === a.getTime(), K = t.validFrom && t.validFrom > p || t.validUntil && t.validUntil < p;
|
|
740
740
|
return [
|
|
741
741
|
"py-2 rounded-sm block text-center",
|
|
742
742
|
{
|
|
743
|
-
"text-vxvue-700": !K && !
|
|
744
|
-
"text-error": K && !
|
|
745
|
-
"text-gray-400":
|
|
746
|
-
"bg-gray-200":
|
|
747
|
-
"bg-vxvue-700 text-white":
|
|
743
|
+
"text-vxvue-700": !K && !y && !T && !x,
|
|
744
|
+
"text-error": K && !y,
|
|
745
|
+
"text-gray-400": y && !T && !x,
|
|
746
|
+
"bg-gray-200": T && !x,
|
|
747
|
+
"bg-vxvue-700 text-white": x,
|
|
748
748
|
"hover:ring-2 hover:ring-vxvue": !K
|
|
749
749
|
}
|
|
750
750
|
];
|
|
751
751
|
};
|
|
752
752
|
return ce(() => {
|
|
753
753
|
var p;
|
|
754
|
-
return
|
|
755
|
-
}), (p,
|
|
754
|
+
return b.value = (p = f.value) == null ? void 0 : p.$refs.toggleButton;
|
|
755
|
+
}), (p, y) => (u(), m("div", {
|
|
756
756
|
class: $(["relative", p.$attrs.class])
|
|
757
757
|
}, [
|
|
758
|
-
e.hasInput ? (
|
|
758
|
+
e.hasInput ? (u(), Y(wt, O({
|
|
759
759
|
key: 0,
|
|
760
760
|
modelValue: c.value,
|
|
761
|
-
|
|
761
|
+
"show-toggle": !0,
|
|
762
|
+
onToggleDatepicker: y[0] || (y[0] = (x) => n.value = !n.value),
|
|
762
763
|
"onUpdate:modelValue": R
|
|
763
764
|
}, p.$attrs, {
|
|
764
765
|
ref_key: "input",
|
|
765
|
-
ref:
|
|
766
|
+
ref: f,
|
|
766
767
|
class: "w-full"
|
|
767
768
|
}), {
|
|
768
|
-
default:
|
|
769
|
+
default: G(() => [
|
|
769
770
|
M(p.$slots, "default")
|
|
770
771
|
]),
|
|
771
772
|
_: 3
|
|
772
773
|
}, 16, ["modelValue"])) : B("", !0),
|
|
773
|
-
i("div",
|
|
774
|
+
i("div", O({ class: "overflow-hidden z-10 bg-white rounded shadow-md min-w-72 sm:min-w-80" }, g.value, {
|
|
774
775
|
ref_key: "calendar",
|
|
775
|
-
ref:
|
|
776
|
-
class: [
|
|
776
|
+
ref: h,
|
|
777
|
+
class: [r.value.horiz, r.value.vert]
|
|
777
778
|
}), [
|
|
778
|
-
o.value === "days" ? (
|
|
779
|
+
o.value === "days" ? (u(), m(_, { key: 0 }, [
|
|
779
780
|
i("div", kt, [
|
|
780
781
|
i("div", $t, [
|
|
781
782
|
i("button", {
|
|
782
|
-
onClick:
|
|
783
|
+
onClick: y[1] || (y[1] = z((x) => I(l.value.getMonth() - 1), ["stop"])),
|
|
783
784
|
class: "flex-shrink-0 text-vxvue-100 hover:text-vxvue-50"
|
|
784
785
|
}, [
|
|
785
|
-
|
|
786
|
+
j(V(ae), { class: "size-6" })
|
|
786
787
|
]),
|
|
787
788
|
i("span", null, D(l.value.toLocaleString(e.locale, { month: "long" })), 1),
|
|
788
789
|
i("button", {
|
|
789
|
-
onClick:
|
|
790
|
+
onClick: y[2] || (y[2] = z((x) => I(l.value.getMonth() + 1), ["stop"])),
|
|
790
791
|
class: "flex-shrink-0 text-vxvue-100 hover:text-vxvue-50"
|
|
791
792
|
}, [
|
|
792
|
-
|
|
793
|
+
j(V(te), { class: "size-6" })
|
|
793
794
|
])
|
|
794
795
|
]),
|
|
795
|
-
i("div",
|
|
796
|
+
i("div", St, [
|
|
796
797
|
i("button", {
|
|
797
|
-
onClick:
|
|
798
|
+
onClick: y[3] || (y[3] = z((x) => E(l.value.getFullYear() - 1), ["stop"])),
|
|
798
799
|
class: "flex-shrink-0 text-vxvue-100 hover:text-vxvue-50"
|
|
799
800
|
}, [
|
|
800
|
-
|
|
801
|
+
j(V(ae), { class: "size-6" })
|
|
801
802
|
]),
|
|
802
803
|
i("button", {
|
|
803
804
|
class: "text-vxvue-100 hover:text-vxvue-50",
|
|
804
|
-
onClick:
|
|
805
|
+
onClick: y[4] || (y[4] = (x) => {
|
|
805
806
|
o.value = "years", v.value = l.value.getFullYear();
|
|
806
807
|
})
|
|
807
808
|
}, D(l.value.getFullYear()), 1),
|
|
808
809
|
i("button", {
|
|
809
|
-
onClick:
|
|
810
|
+
onClick: y[5] || (y[5] = z((x) => E(l.value.getFullYear() + 1), ["stop"])),
|
|
810
811
|
class: "flex-shrink-0 text-vxvue-100 hover:text-vxvue-50"
|
|
811
812
|
}, [
|
|
812
|
-
|
|
813
|
+
j(V(te), { class: "size-6" })
|
|
813
814
|
])
|
|
814
815
|
])
|
|
815
816
|
]),
|
|
816
|
-
i("div",
|
|
817
|
-
(
|
|
817
|
+
i("div", Ct, [
|
|
818
|
+
(u(!0), m(_, null, F(P.value, (x, T) => (u(), m("div", {
|
|
818
819
|
class: "py-2 text-center bg-gray-200",
|
|
819
|
-
key:
|
|
820
|
-
}, D(
|
|
821
|
-
(
|
|
822
|
-
class: $(k(
|
|
823
|
-
disabled: e.validFrom && e.validFrom >
|
|
824
|
-
onClick:
|
|
825
|
-
}, D(
|
|
820
|
+
key: T
|
|
821
|
+
}, D(x), 1))), 128)),
|
|
822
|
+
(u(!0), m(_, null, F(A.value, (x) => (u(), m("button", {
|
|
823
|
+
class: $(k(x)),
|
|
824
|
+
disabled: e.validFrom && e.validFrom > x || e.validUntil && e.validUntil < x,
|
|
825
|
+
onClick: z((T) => e.validFrom && e.validFrom > x || e.validUntil && e.validUntil < x ? null : X(x), ["stop"])
|
|
826
|
+
}, D(x.getDate()), 11, Mt))), 256))
|
|
826
827
|
])
|
|
827
828
|
], 64)) : B("", !0),
|
|
828
|
-
o.value === "years" ? (
|
|
829
|
-
i("div",
|
|
829
|
+
o.value === "years" ? (u(), m(_, { key: 1 }, [
|
|
830
|
+
i("div", Vt, [
|
|
830
831
|
i("button", {
|
|
831
|
-
onClick:
|
|
832
|
+
onClick: y[6] || (y[6] = z((x) => v.value -= 10, ["stop"])),
|
|
832
833
|
class: "flex-shrink-0 text-vxvue-100 hover:text-vxvue-50"
|
|
833
834
|
}, [
|
|
834
|
-
|
|
835
|
+
j(V(ae), { class: "size-6" })
|
|
835
836
|
]),
|
|
836
837
|
i("span", null, D(v.value) + " - " + D(v.value + 9), 1),
|
|
837
838
|
i("button", {
|
|
838
|
-
onClick:
|
|
839
|
+
onClick: y[7] || (y[7] = z((x) => v.value += 10, ["stop"])),
|
|
839
840
|
class: "flex-shrink-0 text-vxvue-100 hover:text-vxvue-50"
|
|
840
841
|
}, [
|
|
841
|
-
|
|
842
|
+
j(V(te), { class: "size-6" })
|
|
842
843
|
])
|
|
843
844
|
]),
|
|
844
845
|
i("div", Dt, [
|
|
845
|
-
(
|
|
846
|
+
(u(), m(_, null, F(10, (x) => i("div", At, [
|
|
846
847
|
i("button", {
|
|
847
848
|
class: "py-2 px-3",
|
|
848
|
-
onClick:
|
|
849
|
-
E(v.value +
|
|
849
|
+
onClick: z((T) => {
|
|
850
|
+
E(v.value + x - 1), o.value = "days";
|
|
850
851
|
}, ["stop"])
|
|
851
|
-
}, D(v.value +
|
|
852
|
+
}, D(v.value + x - 1), 9, Bt)
|
|
852
853
|
])), 64))
|
|
853
854
|
])
|
|
854
855
|
], 64)) : B("", !0)
|
|
855
856
|
], 16)
|
|
856
857
|
], 2));
|
|
857
858
|
}
|
|
858
|
-
}),
|
|
859
|
+
}), Lt = ["for"], Pt = ["id", "multiple", "accept"], Pl = {
|
|
859
860
|
__name: "form-file-button",
|
|
860
861
|
props: {
|
|
861
862
|
modelValue: { type: Array },
|
|
@@ -878,7 +879,7 @@ const ht = { key: 0 }, pt = { class: "text-vxvue-700" }, gt = /* @__PURE__ */ i(
|
|
|
878
879
|
t("update:modelValue", o), t("form-data", a(o));
|
|
879
880
|
}
|
|
880
881
|
};
|
|
881
|
-
return (c, n) => (
|
|
882
|
+
return (c, n) => (u(), m("label", { for: e.id }, [
|
|
882
883
|
M(c.$slots, "default", {}, () => [
|
|
883
884
|
Z("Upload")
|
|
884
885
|
]),
|
|
@@ -890,40 +891,40 @@ const ht = { key: 0 }, pt = { class: "text-vxvue-700" }, gt = /* @__PURE__ */ i(
|
|
|
890
891
|
onChange: l,
|
|
891
892
|
class: "hidden"
|
|
892
893
|
}, null, 40, Pt)
|
|
893
|
-
], 8,
|
|
894
|
+
], 8, Lt));
|
|
894
895
|
}
|
|
895
|
-
},
|
|
896
|
+
}, It = ["value"], _t = {
|
|
896
897
|
key: 0,
|
|
897
898
|
disabled: "",
|
|
898
899
|
value: ""
|
|
899
|
-
},
|
|
900
|
+
}, Tt = ["value", "selected"], zt = {
|
|
900
901
|
__name: "form-select",
|
|
901
902
|
props: { options: Array, modelValue: [String, Number], disabledLabel: String },
|
|
902
903
|
emits: ["update:modelValue"],
|
|
903
904
|
setup(e, { emit: d }) {
|
|
904
905
|
const t = d;
|
|
905
|
-
return (s, a) => (
|
|
906
|
+
return (s, a) => (u(), m("select", O(s.$attrs, {
|
|
906
907
|
value: e.modelValue,
|
|
907
908
|
class: "form-select",
|
|
908
909
|
onChange: a[0] || (a[0] = (l) => t("update:modelValue", l.target.value))
|
|
909
910
|
}), [
|
|
910
|
-
e.disabledLabel ? (
|
|
911
|
-
(
|
|
911
|
+
e.disabledLabel ? (u(), m("option", _t, D(e.disabledLabel), 1)) : B("", !0),
|
|
912
|
+
(u(!0), m(_, null, F(e.options, (l) => (u(), m("option", {
|
|
912
913
|
value: l.key !== void 0 ? l.key : l.label || l,
|
|
913
914
|
selected: (l.key !== void 0 ? l.key : l.label || l) === e.modelValue
|
|
914
|
-
}, D(l.label || l), 9,
|
|
915
|
-
], 16,
|
|
915
|
+
}, D(l.label || l), 9, Tt))), 256))
|
|
916
|
+
], 16, It));
|
|
916
917
|
}
|
|
917
|
-
},
|
|
918
|
+
}, Ft = ["aria-checked", "aria-label"], Et = ["d"], Ot = ["checked"], Il = {
|
|
918
919
|
__name: "form-switch",
|
|
919
920
|
props: { modelValue: Boolean },
|
|
920
921
|
emits: ["update:modelValue"],
|
|
921
922
|
setup(e, { emit: d }) {
|
|
922
|
-
const t = d, s =
|
|
923
|
+
const t = d, s = L(() => {
|
|
923
924
|
let l = Object.assign({}, W());
|
|
924
925
|
return delete l.class, l;
|
|
925
|
-
}), a =
|
|
926
|
-
return (l, c) => (
|
|
926
|
+
}), a = L(() => W().disabled || W().disabled === "");
|
|
927
|
+
return (l, c) => (u(), m("label", {
|
|
927
928
|
class: $(l.$attrs.class),
|
|
928
929
|
tabindex: "0"
|
|
929
930
|
}, [
|
|
@@ -945,7 +946,7 @@ const ht = { key: 0 }, pt = { class: "text-vxvue-700" }, gt = /* @__PURE__ */ i(
|
|
|
945
946
|
])
|
|
946
947
|
}, [
|
|
947
948
|
M(l.$slots, "handle", {}, () => [
|
|
948
|
-
(
|
|
949
|
+
(u(), m("svg", {
|
|
949
950
|
xmlns: "http://www.w3.org/2000/svg",
|
|
950
951
|
fill: "none",
|
|
951
952
|
viewBox: "0 0 24 24",
|
|
@@ -957,18 +958,18 @@ const ht = { key: 0 }, pt = { class: "text-vxvue-700" }, gt = /* @__PURE__ */ i(
|
|
|
957
958
|
"stroke-linecap": "round",
|
|
958
959
|
"stroke-linejoin": "round",
|
|
959
960
|
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"
|
|
960
|
-
}, null, 8,
|
|
961
|
+
}, null, 8, Et)
|
|
961
962
|
], 2))
|
|
962
963
|
])
|
|
963
964
|
], 2),
|
|
964
|
-
i("input",
|
|
965
|
+
i("input", O(s.value, {
|
|
965
966
|
checked: e.modelValue,
|
|
966
967
|
class: "hidden",
|
|
967
968
|
value: "1",
|
|
968
969
|
type: "checkbox",
|
|
969
970
|
onChange: c[0] || (c[0] = (n) => t("update:modelValue", n.target.checked))
|
|
970
|
-
}), null, 16,
|
|
971
|
-
], 10,
|
|
971
|
+
}), null, 16, Ot)
|
|
972
|
+
], 10, Ft),
|
|
972
973
|
M(l.$slots, "default")
|
|
973
974
|
], 2));
|
|
974
975
|
}
|
|
@@ -977,10 +978,10 @@ const ht = { key: 0 }, pt = { class: "text-vxvue-700" }, gt = /* @__PURE__ */ i(
|
|
|
977
978
|
for (const [s, a] of d)
|
|
978
979
|
t[s] = a;
|
|
979
980
|
return t;
|
|
980
|
-
},
|
|
981
|
+
}, jt = (e) => (Le("data-v-921b665d"), e = e(), Pe(), e), Yt = {
|
|
981
982
|
"aria-live": "assertive",
|
|
982
983
|
class: "flex fixed inset-0 z-50 items-start py-6 px-4 pointer-events-none sm:p-6"
|
|
983
|
-
},
|
|
984
|
+
}, Nt = { class: "flex flex-col items-center space-y-4 w-full" }, Rt = { class: "p-4" }, Wt = { class: "flex items-start" }, Ht = { class: "flex-shrink-0" }, Ut = { class: "flex-1 pt-0.5 ml-3 w-0" }, Zt = { class: "font-bold" }, Kt = { class: "mt-1" }, qt = { class: "flex flex-shrink-0 ml-4" }, Xt = /* @__PURE__ */ jt(() => /* @__PURE__ */ i("span", { class: "sr-only" }, "Close", -1)), Gt = /* @__PURE__ */ Object.assign({
|
|
984
985
|
inheritAttrs: !1
|
|
985
986
|
}, {
|
|
986
987
|
__name: "message-toast",
|
|
@@ -988,47 +989,61 @@ const ht = { key: 0 }, pt = { class: "text-vxvue-700" }, gt = /* @__PURE__ */ i(
|
|
|
988
989
|
title: String,
|
|
989
990
|
message: [String, Array],
|
|
990
991
|
timeout: { type: Number, default: 5e3 },
|
|
991
|
-
active: { type: Boolean, default: !1 }
|
|
992
|
+
active: { type: Boolean, default: !1 },
|
|
993
|
+
showTimeoutProgress: { type: Boolean, default: !1 }
|
|
992
994
|
},
|
|
993
995
|
emits: ["timeout", "close"],
|
|
994
996
|
setup(e, { emit: d }) {
|
|
995
|
-
const t = e, s = d, a =
|
|
996
|
-
|
|
997
|
+
const t = e, s = d, a = L(() => typeof t.message == "string" ? [t.message] : t.message), l = w(0);
|
|
998
|
+
let c = null;
|
|
999
|
+
const n = () => {
|
|
1000
|
+
window.clearTimeout(c), l.value = 100, t.active && t.timeout && (c = window.setTimeout(() => {
|
|
997
1001
|
s("timeout");
|
|
998
|
-
}, t.timeout));
|
|
1002
|
+
}, t.timeout), window.setTimeout(() => l.value = 0, 0));
|
|
999
1003
|
};
|
|
1000
|
-
return U(() => t.active,
|
|
1001
|
-
i("div",
|
|
1002
|
-
|
|
1003
|
-
default:
|
|
1004
|
-
e.active ? (
|
|
1004
|
+
return U(() => t.active, n), ce(n), (o, v) => (u(), m("div", Yt, [
|
|
1005
|
+
i("div", Nt, [
|
|
1006
|
+
j(ie, { name: "messagetoast-fade" }, {
|
|
1007
|
+
default: G(() => [
|
|
1008
|
+
e.active ? (u(), m("div", {
|
|
1005
1009
|
key: 0,
|
|
1006
|
-
class: $(["overflow-hidden w-full max-w-sm rounded-md ring-1 ring-black ring-opacity-5 shadow-lg pointer-events-auto",
|
|
1010
|
+
class: $(["overflow-hidden w-full max-w-sm rounded-md ring-1 ring-black ring-opacity-5 shadow-lg pointer-events-auto", o.$attrs.class])
|
|
1007
1011
|
}, [
|
|
1008
1012
|
i("div", Rt, [
|
|
1009
1013
|
i("div", Wt, [
|
|
1010
1014
|
i("div", Ht, [
|
|
1011
|
-
M(
|
|
1015
|
+
M(o.$slots, "icon", {}, void 0, !0)
|
|
1012
1016
|
]),
|
|
1013
1017
|
i("div", Ut, [
|
|
1014
|
-
M(
|
|
1018
|
+
M(o.$slots, "title", {}, () => [
|
|
1015
1019
|
i("div", Zt, D(e.title), 1)
|
|
1016
1020
|
], !0),
|
|
1017
|
-
M(
|
|
1018
|
-
(
|
|
1021
|
+
M(o.$slots, "default", {}, () => [
|
|
1022
|
+
(u(!0), m(_, null, F(a.value, (r) => (u(), m("p", Kt, D(r), 1))), 256))
|
|
1019
1023
|
], !0)
|
|
1020
1024
|
]),
|
|
1021
1025
|
i("div", qt, [
|
|
1022
1026
|
i("button", {
|
|
1023
|
-
onClick:
|
|
1027
|
+
onClick: v[0] || (v[0] = (r) => s("close")),
|
|
1024
1028
|
class: "inline-flex text-white bg-black bg-opacity-20 rounded-sm focus:ring-2 focus:outline-none hover:text-stone-200 focus:ring-stone-200"
|
|
1025
1029
|
}, [
|
|
1026
|
-
|
|
1027
|
-
|
|
1030
|
+
Xt,
|
|
1031
|
+
j(V(xe), { class: "size-5" })
|
|
1028
1032
|
])
|
|
1029
1033
|
])
|
|
1030
1034
|
])
|
|
1031
|
-
])
|
|
1035
|
+
]),
|
|
1036
|
+
e.showTimeoutProgress && e.timeout ? (u(), m("div", {
|
|
1037
|
+
key: 0,
|
|
1038
|
+
class: "h-1 bg-vxvue-alt ease-linear transition-all",
|
|
1039
|
+
style: be({
|
|
1040
|
+
width: l.value + "%",
|
|
1041
|
+
"transition-duration": e.timeout + "ms"
|
|
1042
|
+
}),
|
|
1043
|
+
role: "progressbar",
|
|
1044
|
+
"aria-hidden": "false",
|
|
1045
|
+
"aria-label": "notification timer"
|
|
1046
|
+
}, null, 4)) : B("", !0)
|
|
1032
1047
|
], 2)) : B("", !0)
|
|
1033
1048
|
]),
|
|
1034
1049
|
_: 3
|
|
@@ -1036,14 +1051,14 @@ const ht = { key: 0 }, pt = { class: "text-vxvue-700" }, gt = /* @__PURE__ */ i(
|
|
|
1036
1051
|
])
|
|
1037
1052
|
]));
|
|
1038
1053
|
}
|
|
1039
|
-
}),
|
|
1054
|
+
}), _l = /* @__PURE__ */ me(Gt, [["__scopeId", "data-v-921b665d"]]), Jt = {
|
|
1040
1055
|
key: 0,
|
|
1041
1056
|
class: "fixed inset-0 z-[9998] bg-white/50 backdrop-blur-sm",
|
|
1042
1057
|
"aria-hidden": "true"
|
|
1043
1058
|
}, Qt = {
|
|
1044
1059
|
key: 0,
|
|
1045
1060
|
class: "fixed inset-0 z-[9999]"
|
|
1046
|
-
}, el = { class: "flex justify-center items-center h-screen" },
|
|
1061
|
+
}, el = { class: "flex justify-center items-center h-screen" }, Tl = {
|
|
1047
1062
|
__name: "modal",
|
|
1048
1063
|
props: {
|
|
1049
1064
|
show: Boolean,
|
|
@@ -1054,11 +1069,11 @@ const ht = { key: 0 }, pt = { class: "text-vxvue-700" }, gt = /* @__PURE__ */ i(
|
|
|
1054
1069
|
emits: ["clicked-outside"],
|
|
1055
1070
|
setup(e, { emit: d }) {
|
|
1056
1071
|
const t = d, s = w(null);
|
|
1057
|
-
return ve(s, () => t("clicked-outside")), (a, l) => (
|
|
1058
|
-
e.show ? (
|
|
1059
|
-
|
|
1060
|
-
default:
|
|
1061
|
-
e.show ? (
|
|
1072
|
+
return ve(s, () => t("clicked-outside")), (a, l) => (u(), m(_, null, [
|
|
1073
|
+
e.show ? (u(), m("div", Jt)) : B("", !0),
|
|
1074
|
+
j(ie, { name: "appear" }, {
|
|
1075
|
+
default: G(() => [
|
|
1076
|
+
e.show ? (u(), m("div", Qt, [
|
|
1062
1077
|
i("div", el, [
|
|
1063
1078
|
i("div", {
|
|
1064
1079
|
class: $(["overflow-hidden relative max-w-full bg-white rounded ring-1 ring-black ring-opacity-10 shadow-xl transition-all transform xl:max-w-screen-xl", e.containerClass]),
|
|
@@ -1083,7 +1098,7 @@ const ht = { key: 0 }, pt = { class: "text-vxvue-700" }, gt = /* @__PURE__ */ i(
|
|
|
1083
1098
|
})
|
|
1084
1099
|
], 64));
|
|
1085
1100
|
}
|
|
1086
|
-
}, tl = { class: "flex justify-between items-center px-4 sm:px-0" }, ll = { class: "flex flex-1 -mt-px w-0" }, al = { class: "hidden md:flex md:-mt-px" }, sl = { class: "flex flex-1 justify-end -mt-px w-0" },
|
|
1101
|
+
}, tl = { class: "flex justify-between items-center px-4 sm:px-0" }, ll = { class: "flex flex-1 -mt-px w-0" }, al = { class: "hidden md:flex md:-mt-px" }, sl = { class: "flex flex-1 justify-end -mt-px w-0" }, zl = {
|
|
1087
1102
|
__name: "pagination",
|
|
1088
1103
|
props: {
|
|
1089
1104
|
page: { type: Number, default: 1 },
|
|
@@ -1109,68 +1124,68 @@ const ht = { key: 0 }, pt = { class: "text-vxvue-700" }, gt = /* @__PURE__ */ i(
|
|
|
1109
1124
|
},
|
|
1110
1125
|
emits: ["update:page"],
|
|
1111
1126
|
setup(e, { emit: d }) {
|
|
1112
|
-
const t = d, s = e, a = w(Math.ceil(s.total / s.perPage)), l = w(null), c =
|
|
1113
|
-
let
|
|
1127
|
+
const t = d, s = e, a = w(Math.ceil(s.total / s.perPage)), l = w(null), c = L(() => (s.markerPosition === "above" ? "border-t-2 -mt-[2px]" : "border-b-2 -mb-[2px]") + " py-4"), n = L(() => {
|
|
1128
|
+
let r = [1];
|
|
1114
1129
|
if (s.showAllPages || a.value <= 7) {
|
|
1115
|
-
for (let
|
|
1116
|
-
|
|
1117
|
-
return
|
|
1130
|
+
for (let f = 2; f <= a.value; ++f)
|
|
1131
|
+
r.push(f);
|
|
1132
|
+
return r;
|
|
1118
1133
|
}
|
|
1119
|
-
return l.value >= a.value ?
|
|
1134
|
+
return l.value >= a.value ? r.push("dots", l.value - 2, l.value - 1) : l.value - 1 && l.value - 1 > 1 && (l.value > 1 && r.push("dots"), r.push(l.value - 1)), l.value > 1 && r.push(l.value), l.value + 1 < a.value && (r.push(l.value + 1), l.value <= 1 && r.push(l.value + 2), l.value + 2 < a.value && r.push("dots")), l.value < a.value && r.push(a.value), r;
|
|
1120
1135
|
}), o = () => {
|
|
1121
1136
|
l.value > 1 && t("update:page", l.value - 1);
|
|
1122
1137
|
}, v = () => {
|
|
1123
1138
|
l.value < a.value && t("update:page", l.value + 1);
|
|
1124
1139
|
};
|
|
1125
|
-
return U(() => s.page, (
|
|
1140
|
+
return U(() => s.page, (r) => l.value = Math.min(Math.max(r, 1), a.value), { immediate: !0 }), U(() => s.perPage, (r) => {
|
|
1126
1141
|
a.value = Math.ceil(s.total / s.perPage), t("update:page", 1);
|
|
1127
|
-
}), U(() => s.total, (
|
|
1142
|
+
}), U(() => s.total, (r) => {
|
|
1128
1143
|
a.value = Math.ceil(s.total / s.perPage), l.value > a.value && t("update:page", 1);
|
|
1129
|
-
}), (
|
|
1144
|
+
}), (r, f) => (u(), m("nav", tl, [
|
|
1130
1145
|
i("div", ll, [
|
|
1131
|
-
e.showNavButtons ? (
|
|
1146
|
+
e.showNavButtons ? (u(), m("a", {
|
|
1132
1147
|
key: 0,
|
|
1133
|
-
onClick:
|
|
1148
|
+
onClick: z(o, ["prevent"]),
|
|
1134
1149
|
href: "#",
|
|
1135
1150
|
class: $(["inline-flex items-center pr-1 text-sm font-medium text-gray-500 border-transparent hover:text-gray-700 hover:border-gray-300 !no-underline", [{ "cursor-default pointer-events-none": l.value <= 1 }, c.value]])
|
|
1136
1151
|
}, [
|
|
1137
|
-
|
|
1152
|
+
j(V(ae), { class: "size-5" }),
|
|
1138
1153
|
Z(" " + D(e.prevText), 1)
|
|
1139
1154
|
], 2)) : B("", !0)
|
|
1140
1155
|
]),
|
|
1141
1156
|
i("div", al, [
|
|
1142
|
-
(
|
|
1143
|
-
onClick:
|
|
1144
|
-
key:
|
|
1145
|
-
href:
|
|
1157
|
+
(u(!0), m(_, null, F(n.value, (h, b) => (u(), Y(ne(h !== "dots" ? "a" : "span"), {
|
|
1158
|
+
onClick: z((g) => h !== "dots" ? t("update:page", h) : null, ["prevent"]),
|
|
1159
|
+
key: b,
|
|
1160
|
+
href: h !== "dots" ? "#" : null,
|
|
1146
1161
|
class: $(["inline-flex items-center px-4 text-sm font-medium !no-underline", [{
|
|
1147
|
-
"border-vxvue-500 text-vxvue-700":
|
|
1148
|
-
"border-transparent text-gray-500":
|
|
1149
|
-
"hover:text-gray-700 hover:border-gray-300":
|
|
1162
|
+
"border-vxvue-500 text-vxvue-700": h === l.value,
|
|
1163
|
+
"border-transparent text-gray-500": h !== l.value,
|
|
1164
|
+
"hover:text-gray-700 hover:border-gray-300": h !== "dots"
|
|
1150
1165
|
}, c.value]])
|
|
1151
1166
|
}, {
|
|
1152
|
-
default:
|
|
1153
|
-
Z(D(
|
|
1167
|
+
default: G(() => [
|
|
1168
|
+
Z(D(h !== "dots" ? h : "..."), 1)
|
|
1154
1169
|
]),
|
|
1155
1170
|
_: 2
|
|
1156
1171
|
}, 1032, ["onClick", "href", "class"]))), 128))
|
|
1157
1172
|
]),
|
|
1158
1173
|
i("div", sl, [
|
|
1159
|
-
e.showNavButtons ? (
|
|
1174
|
+
e.showNavButtons ? (u(), m("a", {
|
|
1160
1175
|
key: 0,
|
|
1161
|
-
onClick:
|
|
1176
|
+
onClick: z(v, ["prevent"]),
|
|
1162
1177
|
href: "#",
|
|
1163
1178
|
class: $(["inline-flex items-center pl-1 text-sm font-medium text-gray-500 border-transparent hover:text-gray-700 hover:border-gray-300 !no-underline", [c.value, { "cursor-default pointer-events-none": l.value >= a.value }]])
|
|
1164
1179
|
}, [
|
|
1165
1180
|
Z(D(e.nextText) + " ", 1),
|
|
1166
|
-
|
|
1181
|
+
j(V(te), { class: "size-5" })
|
|
1167
1182
|
], 2)) : B("", !0)
|
|
1168
1183
|
])
|
|
1169
1184
|
]));
|
|
1170
1185
|
}
|
|
1171
1186
|
};
|
|
1172
1187
|
function nl(e, d) {
|
|
1173
|
-
return
|
|
1188
|
+
return u(), m("svg", {
|
|
1174
1189
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1175
1190
|
fill: "none",
|
|
1176
1191
|
viewBox: "0 0 24 24",
|
|
@@ -1187,7 +1202,7 @@ function nl(e, d) {
|
|
|
1187
1202
|
]);
|
|
1188
1203
|
}
|
|
1189
1204
|
function ol(e, d) {
|
|
1190
|
-
return
|
|
1205
|
+
return u(), m("svg", {
|
|
1191
1206
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1192
1207
|
fill: "none",
|
|
1193
1208
|
viewBox: "0 0 24 24",
|
|
@@ -1208,19 +1223,19 @@ function ol(e, d) {
|
|
|
1208
1223
|
})
|
|
1209
1224
|
]);
|
|
1210
1225
|
}
|
|
1211
|
-
const rl = ["value", "type"], ul = ["disabled"],
|
|
1226
|
+
const rl = ["value", "type"], ul = ["disabled"], Fl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
1212
1227
|
__name: "password-input",
|
|
1213
1228
|
props: ["modelValue"],
|
|
1214
1229
|
emits: ["update:modelValue"],
|
|
1215
1230
|
setup(e, { emit: d }) {
|
|
1216
|
-
const t = d, s = w(!1), a =
|
|
1231
|
+
const t = d, s = w(!1), a = L(() => {
|
|
1217
1232
|
let l = Object.assign({}, W());
|
|
1218
1233
|
return delete l.class, l;
|
|
1219
1234
|
});
|
|
1220
|
-
return (l, c) => (
|
|
1235
|
+
return (l, c) => (u(), m("div", {
|
|
1221
1236
|
class: $("inline-block relative " + W().class)
|
|
1222
1237
|
}, [
|
|
1223
|
-
i("input",
|
|
1238
|
+
i("input", O({
|
|
1224
1239
|
value: e.modelValue,
|
|
1225
1240
|
type: s.value ? "text" : "password",
|
|
1226
1241
|
onInput: c[0] || (c[0] = (n) => t("update:modelValue", n.target.value))
|
|
@@ -1229,12 +1244,12 @@ const rl = ["value", "type"], ul = ["disabled"], zl = /* @__PURE__ */ Object.ass
|
|
|
1229
1244
|
class: "flex absolute inset-y-0 right-0 items-center px-3 text-brand-700 hover:text-brand",
|
|
1230
1245
|
"aria-label": "show-password-toggle",
|
|
1231
1246
|
disabled: W().disabled ?? !1,
|
|
1232
|
-
onClick: c[1] || (c[1] =
|
|
1247
|
+
onClick: c[1] || (c[1] = z((n) => s.value = !s.value, ["stop"]))
|
|
1233
1248
|
}, [
|
|
1234
|
-
s.value ? (
|
|
1249
|
+
s.value ? (u(), Y(V(nl), {
|
|
1235
1250
|
key: 0,
|
|
1236
1251
|
class: "size-5"
|
|
1237
|
-
})) : (
|
|
1252
|
+
})) : (u(), Y(V(ol), {
|
|
1238
1253
|
key: 1,
|
|
1239
1254
|
class: "size-5"
|
|
1240
1255
|
}))
|
|
@@ -1244,7 +1259,7 @@ const rl = ["value", "type"], ul = ["disabled"], zl = /* @__PURE__ */ Object.ass
|
|
|
1244
1259
|
}), il = { class: "flex items-center pb-1" }, dl = {
|
|
1245
1260
|
key: 0,
|
|
1246
1261
|
class: "ml-6"
|
|
1247
|
-
},
|
|
1262
|
+
}, El = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
1248
1263
|
__name: "simple-tree",
|
|
1249
1264
|
props: {
|
|
1250
1265
|
branch: { type: Object, default: {} },
|
|
@@ -1256,12 +1271,12 @@ const rl = ["value", "type"], ul = ["disabled"], zl = /* @__PURE__ */ Object.ass
|
|
|
1256
1271
|
return ce(() => {
|
|
1257
1272
|
t.branch === t.modelValue && s("expand", !0);
|
|
1258
1273
|
}), (l, c) => {
|
|
1259
|
-
const n =
|
|
1260
|
-
return
|
|
1274
|
+
const n = Ie("simple-tree", !0);
|
|
1275
|
+
return u(), m("div", {
|
|
1261
1276
|
class: $([!e.branch.branches || !e.branch.branches.length ? "terminates" : "", l.$attrs.class])
|
|
1262
1277
|
}, [
|
|
1263
1278
|
i("div", il, [
|
|
1264
|
-
e.branch.branches && e.branch.branches.length ? (
|
|
1279
|
+
e.branch.branches && e.branch.branches.length ? (u(), m("button", {
|
|
1265
1280
|
key: 0,
|
|
1266
1281
|
onClick: c[0] || (c[0] = (o) => a.value = !a.value),
|
|
1267
1282
|
class: "mr-2"
|
|
@@ -1270,7 +1285,7 @@ const rl = ["value", "type"], ul = ["disabled"], zl = /* @__PURE__ */ Object.ass
|
|
|
1270
1285
|
branch: e.branch,
|
|
1271
1286
|
expanded: a.value
|
|
1272
1287
|
}, () => [
|
|
1273
|
-
(
|
|
1288
|
+
(u(), Y(ne(a.value ? V(Oe) : V(je)), { class: "p-1 text-white rounded-sm size-5 bg-vxvue-700 hover:bg-vxvue" }))
|
|
1274
1289
|
])
|
|
1275
1290
|
])) : B("", !0),
|
|
1276
1291
|
e.branch === e.modelValue ? M(l.$slots, "label-selected", {
|
|
@@ -1278,7 +1293,7 @@ const rl = ["value", "type"], ul = ["disabled"], zl = /* @__PURE__ */ Object.ass
|
|
|
1278
1293
|
branch: e.branch
|
|
1279
1294
|
}, () => [
|
|
1280
1295
|
i("strong", null, D(e.branch.label), 1)
|
|
1281
|
-
]) : (
|
|
1296
|
+
]) : (u(), m("button", {
|
|
1282
1297
|
key: 2,
|
|
1283
1298
|
onClick: c[1] || (c[1] = (o) => s("update:modelValue", e.branch))
|
|
1284
1299
|
}, [
|
|
@@ -1287,8 +1302,8 @@ const rl = ["value", "type"], ul = ["disabled"], zl = /* @__PURE__ */ Object.ass
|
|
|
1287
1302
|
])
|
|
1288
1303
|
]))
|
|
1289
1304
|
]),
|
|
1290
|
-
e.branch.branches && e.branch.branches.length ? ge((
|
|
1291
|
-
(
|
|
1305
|
+
e.branch.branches && e.branch.branches.length ? ge((u(), m("div", dl, [
|
|
1306
|
+
(u(!0), m(_, null, F(e.branch.branches, (o) => (u(), Y(n, {
|
|
1292
1307
|
key: o.id || o.key || null,
|
|
1293
1308
|
branch: o,
|
|
1294
1309
|
"model-value": e.modelValue,
|
|
@@ -1297,20 +1312,67 @@ const rl = ["value", "type"], ul = ["disabled"], zl = /* @__PURE__ */ Object.ass
|
|
|
1297
1312
|
a.value = v, s("expand", v);
|
|
1298
1313
|
})
|
|
1299
1314
|
}, _e({ _: 2 }, [
|
|
1300
|
-
|
|
1301
|
-
name:
|
|
1302
|
-
fn:
|
|
1303
|
-
M(l.$slots,
|
|
1315
|
+
F(l.$slots, (v, r) => ({
|
|
1316
|
+
name: r,
|
|
1317
|
+
fn: G((f) => [
|
|
1318
|
+
M(l.$slots, r, O({ ref_for: !0 }, f))
|
|
1304
1319
|
])
|
|
1305
1320
|
}))
|
|
1306
1321
|
]), 1032, ["branch", "model-value"]))), 128))
|
|
1307
1322
|
], 512)), [
|
|
1308
|
-
[
|
|
1323
|
+
[Te, a.value]
|
|
1309
1324
|
]) : B("", !0)
|
|
1310
1325
|
], 2);
|
|
1311
1326
|
};
|
|
1312
1327
|
}
|
|
1313
|
-
}),
|
|
1328
|
+
}), Ol = {
|
|
1329
|
+
__name: "sizable",
|
|
1330
|
+
props: { vertical: Boolean },
|
|
1331
|
+
emits: ["dragStart", "dragStop"],
|
|
1332
|
+
setup(e, { emit: d }) {
|
|
1333
|
+
const t = e, s = d, a = w(null), l = w(null);
|
|
1334
|
+
let c = !1, n = {}, o = null, v = null, r = null;
|
|
1335
|
+
const f = (g) => {
|
|
1336
|
+
var A;
|
|
1337
|
+
if (c) {
|
|
1338
|
+
g.preventDefault();
|
|
1339
|
+
const { pageX: P, pageY: I } = ((A = g.touches) == null ? void 0 : A[0]) ?? g;
|
|
1340
|
+
t.vertical ? a.value.style.height = Math.min(v.height - r.height - (o.y - v.y), o.height + I - n.y) + "px" : a.value.style.width = Math.min(v.width - r.width - (o.x - v.x), o.width + P - n.x) + "px";
|
|
1341
|
+
}
|
|
1342
|
+
}, h = (g) => {
|
|
1343
|
+
var I;
|
|
1344
|
+
g.preventDefault(), g.currentTarget.focus(), c = !0;
|
|
1345
|
+
const { pageX: A, pageY: P } = ((I = g.touches) == null ? void 0 : I[0]) ?? g;
|
|
1346
|
+
n = { x: A, y: P }, r = l.value.getBoundingClientRect(), o = a.value.getBoundingClientRect(), v = a.value.parentElement.getBoundingClientRect(), g.type === "mousedown" ? (document.addEventListener("mousemove", f), document.addEventListener("mouseup", b)) : (document.addEventListener("touchmove", f), document.addEventListener("touchend", b)), s("dragStart");
|
|
1347
|
+
}, b = (g) => {
|
|
1348
|
+
c && (c = !1, g.type === "mouseup" ? (document.removeEventListener("mousemove", f), document.removeEventListener("mouseup", b)) : (document.removeEventListener("touchmove", f), document.removeEventListener("touchend", b)), setTimeout(() => s("dragStop"), 0));
|
|
1349
|
+
};
|
|
1350
|
+
return (g, A) => (u(), m("div", {
|
|
1351
|
+
class: "relative",
|
|
1352
|
+
ref_key: "box",
|
|
1353
|
+
ref: a
|
|
1354
|
+
}, [
|
|
1355
|
+
M(g.$slots, "default"),
|
|
1356
|
+
i("div", O({
|
|
1357
|
+
class: ["absolute flex", t.vertical ? "inset-x-0 top-full justify-center py-2 cursor-ns-resize" : "inset-y-0 left-full items-center px-2 cursor-ew-resize"]
|
|
1358
|
+
}, le({
|
|
1359
|
+
touchstart: h,
|
|
1360
|
+
mousedown: h,
|
|
1361
|
+
touchend: b,
|
|
1362
|
+
mouseup: b
|
|
1363
|
+
}, !0), {
|
|
1364
|
+
ref_key: "handle",
|
|
1365
|
+
ref: l
|
|
1366
|
+
}), [
|
|
1367
|
+
M(g.$slots, "handle", {}, () => [
|
|
1368
|
+
i("div", {
|
|
1369
|
+
class: $(["rounded-full bg-vxvue-400", t.vertical ? "h-1.5 w-8" : "h-8 w-1.5"])
|
|
1370
|
+
}, null, 2)
|
|
1371
|
+
])
|
|
1372
|
+
], 16)
|
|
1373
|
+
], 512));
|
|
1374
|
+
}
|
|
1375
|
+
}, cl = ["aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext"], vl = ["id"], ml = ["id", "aria-label"], jl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
1314
1376
|
__name: "slider",
|
|
1315
1377
|
props: {
|
|
1316
1378
|
min: { type: Number, default: 0 },
|
|
@@ -1321,69 +1383,69 @@ const rl = ["value", "type"], ul = ["disabled"], zl = /* @__PURE__ */ Object.ass
|
|
|
1321
1383
|
return typeof e == "number" || e.every((d) => typeof d == "number");
|
|
1322
1384
|
} }
|
|
1323
1385
|
},
|
|
1324
|
-
emits: ["update:modelValue"],
|
|
1386
|
+
emits: ["update:modelValue", "dragStart", "dragStop"],
|
|
1325
1387
|
setup(e, { emit: d }) {
|
|
1326
1388
|
const t = e, s = d, a = W(), l = { x: null, y: null }, c = { w: null, h: null };
|
|
1327
1389
|
let n = !1;
|
|
1328
|
-
const o = w(null), v = w(0),
|
|
1390
|
+
const o = w(null), v = w(0), r = L(() => {
|
|
1329
1391
|
const k = t.max, p = t.min;
|
|
1330
|
-
return t.modelValue instanceof Array ? t.modelValue.map((
|
|
1331
|
-
}),
|
|
1392
|
+
return t.modelValue instanceof Array ? t.modelValue.map((y) => (Math.max(Math.min(y, k), p) - p) * 100 / (k - p)) : (Math.max(Math.min(t.modelValue, k), p) - p) * 100 / (k - p);
|
|
1393
|
+
}), f = L(() => {
|
|
1332
1394
|
if (t.modelValue instanceof Array) {
|
|
1333
|
-
const k = Math.min(...
|
|
1395
|
+
const k = Math.min(...r.value) + "%", p = Math.max(...r.value) - Math.min(...r.value) + "%";
|
|
1334
1396
|
return t.vertical ? { bottom: k, height: p } : { left: k, width: p };
|
|
1335
1397
|
}
|
|
1336
|
-
return t.vertical ? { bottom: 0, height:
|
|
1337
|
-
}),
|
|
1398
|
+
return t.vertical ? { bottom: 0, height: r.value + "%" } : { width: r.value + "%" };
|
|
1399
|
+
}), h = w({
|
|
1338
1400
|
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-none border-vxvue cursor-grab hover:bg-vxvue focus:ring-vxvue/50"),
|
|
1339
1401
|
tabindex: 0
|
|
1340
|
-
}),
|
|
1402
|
+
}), b = (k) => {
|
|
1341
1403
|
let p = parseFloat(k.toFixed(10));
|
|
1342
1404
|
if (p = Math.min(t.max, Math.max(t.min, p)), t.modelValue instanceof Array) {
|
|
1343
|
-
let
|
|
1344
|
-
|
|
1405
|
+
let y = [...t.modelValue];
|
|
1406
|
+
y[v.value] = p, s("update:modelValue", y);
|
|
1345
1407
|
} else
|
|
1346
1408
|
s("update:modelValue", p);
|
|
1347
|
-
},
|
|
1348
|
-
const { pageX: p, pageY:
|
|
1349
|
-
|
|
1350
|
-
},
|
|
1351
|
-
const { clientLeft: k, clientTop: p, scrollLeft:
|
|
1352
|
-
l.x =
|
|
1353
|
-
},
|
|
1354
|
-
n && (k.preventDefault(),
|
|
1355
|
-
},
|
|
1356
|
-
k.preventDefault(), k.currentTarget.focus(),
|
|
1357
|
-
}, E = () => {
|
|
1358
|
-
n && (n = !1, document.removeEventListener("mousemove",
|
|
1359
|
-
},
|
|
1409
|
+
}, g = (k) => {
|
|
1410
|
+
const { pageX: p, pageY: y } = k.touches ? k.touches[0] : k, x = t.vertical ? (-y + l.y) / c.h : (p - l.x) / c.w;
|
|
1411
|
+
b(Math.floor((t.max - t.min) * x + t.min));
|
|
1412
|
+
}, A = () => {
|
|
1413
|
+
const { clientLeft: k, clientTop: p, scrollLeft: y, scrollTop: x } = document.documentElement, T = o.value.getBoundingClientRect();
|
|
1414
|
+
l.x = T.left + y - k, l.y = T.bottom + x - p, c.w = o.value.offsetWidth, c.h = o.value.offsetHeight;
|
|
1415
|
+
}, P = (k) => {
|
|
1416
|
+
n && (k.preventDefault(), g(k));
|
|
1417
|
+
}, I = (k) => {
|
|
1418
|
+
k.preventDefault(), k.currentTarget.focus(), A(), n = !0, k.type === "mousedown" ? (document.addEventListener("mousemove", P), document.addEventListener("mouseup", E)) : (document.addEventListener("touchmove", P), document.addEventListener("touchend", E)), s("dragStart");
|
|
1419
|
+
}, E = (k) => {
|
|
1420
|
+
n && (n = !1, k.type === "mouseup" ? (document.removeEventListener("mousemove", P), document.removeEventListener("mouseup", E)) : (document.removeEventListener("touchmove", P), document.removeEventListener("touchend", E)), setTimeout(() => s("dragStop"), 0));
|
|
1421
|
+
}, X = (k) => {
|
|
1360
1422
|
k.keyCode >= 33 && k.keyCode <= 40 && k.preventDefault();
|
|
1361
1423
|
const p = t.modelValue[v.value] ?? t.modelValue;
|
|
1362
1424
|
switch (k.keyCode) {
|
|
1363
1425
|
case 37:
|
|
1364
1426
|
case 40:
|
|
1365
|
-
|
|
1427
|
+
b(p - 1);
|
|
1366
1428
|
break;
|
|
1367
1429
|
case 39:
|
|
1368
1430
|
case 38:
|
|
1369
|
-
|
|
1431
|
+
b(p + 1);
|
|
1370
1432
|
break;
|
|
1371
1433
|
case 33:
|
|
1372
|
-
|
|
1434
|
+
b(p + (t.max - t.min) / 10);
|
|
1373
1435
|
break;
|
|
1374
1436
|
case 34:
|
|
1375
|
-
|
|
1437
|
+
b(p - (t.max - t.min) / 10);
|
|
1376
1438
|
break;
|
|
1377
1439
|
case 36:
|
|
1378
|
-
|
|
1440
|
+
b(t.min);
|
|
1379
1441
|
break;
|
|
1380
1442
|
case 35:
|
|
1381
|
-
|
|
1443
|
+
b(t.max);
|
|
1382
1444
|
}
|
|
1383
1445
|
}, R = (k) => {
|
|
1384
|
-
|
|
1446
|
+
A(), g(k);
|
|
1385
1447
|
};
|
|
1386
|
-
return (k, p) => (
|
|
1448
|
+
return (k, p) => (u(), m("div", O({
|
|
1387
1449
|
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"],
|
|
1388
1450
|
ref_key: "track",
|
|
1389
1451
|
ref: o,
|
|
@@ -1393,49 +1455,49 @@ const rl = ["value", "type"], ul = ["disabled"], zl = /* @__PURE__ */ Object.ass
|
|
|
1393
1455
|
"aria-valuemax": t.max,
|
|
1394
1456
|
"aria-valuenow": e.modelValue[0] ?? e.modelValue,
|
|
1395
1457
|
"aria-valuetext": e.modelValue
|
|
1396
|
-
},
|
|
1458
|
+
}, le(e.disabled ? {} : {
|
|
1397
1459
|
click: R
|
|
1398
1460
|
}, !0)), [
|
|
1399
|
-
e.disabled ? B("", !0) : (
|
|
1461
|
+
e.disabled ? B("", !0) : (u(), m("div", {
|
|
1400
1462
|
key: 0,
|
|
1401
1463
|
class: $(["absolute bg-vxvue", e.vertical ? "w-full rounded-t-full rounded-b-full" : "h-full rounded-r-full rounded-l-full"]),
|
|
1402
|
-
style:
|
|
1464
|
+
style: be(f.value)
|
|
1403
1465
|
}, null, 6)),
|
|
1404
|
-
e.modelValue.length ? (
|
|
1405
|
-
id:
|
|
1406
|
-
style: e.vertical ? { bottom:
|
|
1407
|
-
"aria-label": "slider-thumb-" + (
|
|
1408
|
-
},
|
|
1409
|
-
focus: () => v.value =
|
|
1410
|
-
keydown:
|
|
1411
|
-
|
|
1412
|
-
v.value =
|
|
1466
|
+
e.modelValue.length ? (u(!0), m(_, { key: 2 }, F(e.modelValue, (y, x) => (u(), m("button", O({
|
|
1467
|
+
id: x ? null : V(a).id,
|
|
1468
|
+
style: e.vertical ? { bottom: r.value[x] + "%" } : { left: r.value[x] + "%" },
|
|
1469
|
+
"aria-label": "slider-thumb-" + (x + 1)
|
|
1470
|
+
}, le(e.disabled ? {} : {
|
|
1471
|
+
focus: () => v.value = x,
|
|
1472
|
+
keydown: X,
|
|
1473
|
+
touchstart: (T) => {
|
|
1474
|
+
v.value = x, I(T);
|
|
1413
1475
|
},
|
|
1414
|
-
|
|
1415
|
-
v.value =
|
|
1476
|
+
mousedown: (T) => {
|
|
1477
|
+
v.value = x, I(T);
|
|
1416
1478
|
},
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
}, !0), { ref_for: !0 },
|
|
1479
|
+
touchend: E,
|
|
1480
|
+
mouseup: E
|
|
1481
|
+
}, !0), { ref_for: !0 }, h.value), null, 16, ml))), 256)) : (u(), m("button", O({
|
|
1420
1482
|
key: 1,
|
|
1421
1483
|
id: V(a).id,
|
|
1422
|
-
style: e.vertical ? { bottom:
|
|
1484
|
+
style: e.vertical ? { bottom: r.value + "%" } : { left: r.value + "%" },
|
|
1423
1485
|
"aria-label": "slider-thumb"
|
|
1424
|
-
},
|
|
1486
|
+
}, le(e.disabled ? {} : {
|
|
1425
1487
|
focus: () => v.value = 0,
|
|
1426
|
-
keydown:
|
|
1427
|
-
|
|
1428
|
-
v.value = 0,
|
|
1488
|
+
keydown: X,
|
|
1489
|
+
touchstart: (y) => {
|
|
1490
|
+
v.value = 0, I(y);
|
|
1429
1491
|
},
|
|
1430
|
-
|
|
1431
|
-
v.value = 0,
|
|
1492
|
+
mousedown: (y) => {
|
|
1493
|
+
v.value = 0, I(y);
|
|
1432
1494
|
},
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
}, !0),
|
|
1495
|
+
touchend: E,
|
|
1496
|
+
mouseup: E
|
|
1497
|
+
}, !0), h.value), null, 16, vl))
|
|
1436
1498
|
], 16, cl));
|
|
1437
1499
|
}
|
|
1438
|
-
}), fl = { class: "text-white bg-
|
|
1500
|
+
}), fl = { class: "text-white bg-slate-700" }, hl = ["onClick"], pl = { class: "flex items-center space-x-1" }, gl = {
|
|
1439
1501
|
__name: "sortable",
|
|
1440
1502
|
props: {
|
|
1441
1503
|
columns: {
|
|
@@ -1457,34 +1519,34 @@ const rl = ["value", "type"], ul = ["disabled"], zl = /* @__PURE__ */ Object.ass
|
|
|
1457
1519
|
},
|
|
1458
1520
|
emits: ["before-sort", "after-sort"],
|
|
1459
1521
|
setup(e, { emit: d }) {
|
|
1460
|
-
const t = e, s = d, a = w(t.sortProp), l = w(t.sortDirection), c =
|
|
1522
|
+
const t = e, s = d, a = w(t.sortProp), l = w(t.sortDirection), c = L(() => {
|
|
1461
1523
|
let o = t.rows.slice();
|
|
1462
|
-
const v = t.columns.find(({ prop:
|
|
1463
|
-
return v && (l.value === "asc" && v.sortAscFunction ? o.sort(v.sortAscFunction) : l.value === "desc" && v.sortDescFunction ? o.sort(v.sortDescFunction) : o.sort((
|
|
1524
|
+
const v = t.columns.find(({ prop: r }) => r === a.value);
|
|
1525
|
+
return v && (l.value === "asc" && v.sortAscFunction ? o.sort(v.sortAscFunction) : l.value === "desc" && v.sortDescFunction ? o.sort(v.sortDescFunction) : o.sort((r, f) => r[a.value] < f[a.value] ? l.value === "asc" ? -1 : 1 : r[a.value] > f[a.value] ? l.value === "asc" ? 1 : -1 : 0)), o.slice(t.offset || 0, (t.offset || 0) + (t.count || o.length));
|
|
1464
1526
|
}), n = (o) => {
|
|
1465
1527
|
s("before-sort", { prop: a.value, dir: l.value }), a.value === o ? l.value = l.value === "asc" ? "desc" : "asc" : (a.value = o, l.value = l.value || "asc"), de(() => s("after-sort", { prop: a.value, dir: l.value }));
|
|
1466
1528
|
};
|
|
1467
|
-
return (o, v) => (
|
|
1529
|
+
return (o, v) => (u(), m("table", {
|
|
1468
1530
|
class: $(o.$attrs.class || "w-full divide-y divide-y-slate-900 table-fixed")
|
|
1469
1531
|
}, [
|
|
1470
1532
|
i("thead", fl, [
|
|
1471
1533
|
i("tr", null, [
|
|
1472
|
-
(
|
|
1534
|
+
(u(!0), m(_, null, F(e.columns, (r) => (u(), m("th", {
|
|
1473
1535
|
scope: "col",
|
|
1474
1536
|
class: $(["py-3 px-6 text-left", [
|
|
1475
|
-
{ "cursor-pointer":
|
|
1476
|
-
|
|
1537
|
+
{ "cursor-pointer": r.sortable, active: a.value === r.prop },
|
|
1538
|
+
r.cssClass
|
|
1477
1539
|
]]),
|
|
1478
|
-
onClick: (
|
|
1540
|
+
onClick: (f) => r.sortable ? n(r.prop) : null
|
|
1479
1541
|
}, [
|
|
1480
|
-
M(o.$slots,
|
|
1481
|
-
column:
|
|
1542
|
+
M(o.$slots, r.prop + "-header", {
|
|
1543
|
+
column: r,
|
|
1482
1544
|
sortDir: l.value,
|
|
1483
1545
|
sortProp: a.value
|
|
1484
1546
|
}, () => [
|
|
1485
1547
|
i("div", pl, [
|
|
1486
|
-
i("span", null, D(
|
|
1487
|
-
|
|
1548
|
+
i("span", null, D(r.label), 1),
|
|
1549
|
+
r.sortable ? (u(), Y(ne(a.value !== r.prop ? V(Fe) : l.value === "asc" ? V(ze) : V(Ee)), {
|
|
1488
1550
|
key: 0,
|
|
1489
1551
|
class: "size-4"
|
|
1490
1552
|
})) : B("", !0)
|
|
@@ -1494,28 +1556,28 @@ const rl = ["value", "type"], ul = ["disabled"], zl = /* @__PURE__ */ Object.ass
|
|
|
1494
1556
|
])
|
|
1495
1557
|
]),
|
|
1496
1558
|
i("tbody", null, [
|
|
1497
|
-
(
|
|
1498
|
-
key:
|
|
1499
|
-
class: $(
|
|
1559
|
+
(u(!0), m(_, null, F(c.value, (r) => (u(), m("tr", {
|
|
1560
|
+
key: r[e.keyProperty],
|
|
1561
|
+
class: $(r.cssClass)
|
|
1500
1562
|
}, [
|
|
1501
|
-
(
|
|
1502
|
-
class: $(["overflow-hidden py-3 px-6 whitespace-nowrap text-ellipsis", { active: a.value ===
|
|
1563
|
+
(u(!0), m(_, null, F(e.columns, (f) => (u(), m("td", {
|
|
1564
|
+
class: $(["overflow-hidden py-3 px-6 whitespace-nowrap text-ellipsis", { active: a.value === f.prop }])
|
|
1503
1565
|
}, [
|
|
1504
|
-
M(o.$slots,
|
|
1505
|
-
Z(D(
|
|
1566
|
+
M(o.$slots, f.prop, { row: r }, () => [
|
|
1567
|
+
Z(D(r[f.prop]), 1)
|
|
1506
1568
|
], !0)
|
|
1507
1569
|
], 2))), 256))
|
|
1508
1570
|
], 2))), 128))
|
|
1509
1571
|
])
|
|
1510
1572
|
], 2));
|
|
1511
1573
|
}
|
|
1512
|
-
},
|
|
1574
|
+
}, Yl = /* @__PURE__ */ me(gl, [["__scopeId", "data-v-7ec18969"]]), bl = { class: "flex items-center space-x-2" }, xl = ["disabled"], yl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
1513
1575
|
__name: "submit-button",
|
|
1514
1576
|
props: { busy: Boolean, spinnerClass: String, theme: String },
|
|
1515
1577
|
emits: ["submit"],
|
|
1516
1578
|
setup(e, { emit: d }) {
|
|
1517
1579
|
const t = d;
|
|
1518
|
-
return (s, a) => (
|
|
1580
|
+
return (s, a) => (u(), m("div", bl, [
|
|
1519
1581
|
i("button", {
|
|
1520
1582
|
class: $([s.$attrs.class, e.theme]),
|
|
1521
1583
|
disabled: s.$attrs.disabled || e.busy,
|
|
@@ -1524,16 +1586,16 @@ const rl = ["value", "type"], ul = ["disabled"], zl = /* @__PURE__ */ Object.ass
|
|
|
1524
1586
|
}, [
|
|
1525
1587
|
M(s.$slots, "default", {}, void 0, !0)
|
|
1526
1588
|
], 10, xl),
|
|
1527
|
-
e.busy ? (
|
|
1589
|
+
e.busy ? (u(), Y(ye, {
|
|
1528
1590
|
key: 0,
|
|
1529
1591
|
class: $(e.spinnerClass || ["size-5", { error: "text-error", success: "text-success", default: "text-vxvue" }[e.theme || "default"]])
|
|
1530
1592
|
}, null, 8, ["class"])) : B("", !0)
|
|
1531
1593
|
]));
|
|
1532
1594
|
}
|
|
1533
|
-
}),
|
|
1595
|
+
}), Nl = /* @__PURE__ */ me(yl, [["__scopeId", "data-v-2eba6082"]]), wl = { class: "sm:hidden" }, kl = { class: "hidden sm:block" }, $l = { class: "border-b border-gray-200" }, Sl = {
|
|
1534
1596
|
class: "flex -mb-px space-x-8",
|
|
1535
1597
|
"aria-label": "Tabs"
|
|
1536
|
-
},
|
|
1598
|
+
}, Cl = ["onClick", "aria-current"], Rl = {
|
|
1537
1599
|
__name: "tabs",
|
|
1538
1600
|
props: {
|
|
1539
1601
|
items: { type: Array, default: [] },
|
|
@@ -1541,7 +1603,7 @@ const rl = ["value", "type"], ul = ["disabled"], zl = /* @__PURE__ */ Object.ass
|
|
|
1541
1603
|
},
|
|
1542
1604
|
emits: ["update:active-index"],
|
|
1543
1605
|
setup(e, { emit: d }) {
|
|
1544
|
-
const t = e, s = d, a = w(t.items[t.activeIndex] || {}), l =
|
|
1606
|
+
const t = e, s = d, a = w(t.items[t.activeIndex] || {}), l = L(() => {
|
|
1545
1607
|
let n = [];
|
|
1546
1608
|
return t.items.forEach((o, v) => {
|
|
1547
1609
|
o.disabled || n.push({ label: o.name, key: v });
|
|
@@ -1553,9 +1615,9 @@ const rl = ["value", "type"], ul = ["disabled"], zl = /* @__PURE__ */ Object.ass
|
|
|
1553
1615
|
const c = (n) => {
|
|
1554
1616
|
n.disabled || (a.value = n, s("update:active-index", t.items.indexOf(n)));
|
|
1555
1617
|
};
|
|
1556
|
-
return (n, o) => (
|
|
1618
|
+
return (n, o) => (u(), m(_, null, [
|
|
1557
1619
|
i("div", wl, [
|
|
1558
|
-
|
|
1620
|
+
j(zt, {
|
|
1559
1621
|
options: l.value,
|
|
1560
1622
|
"model-value": e.activeIndex,
|
|
1561
1623
|
"onUpdate:modelValue": o[0] || (o[0] = (v) => s("update:activeIndex", v)),
|
|
@@ -1564,11 +1626,11 @@ const rl = ["value", "type"], ul = ["disabled"], zl = /* @__PURE__ */ Object.ass
|
|
|
1564
1626
|
]),
|
|
1565
1627
|
i("div", kl, [
|
|
1566
1628
|
i("div", $l, [
|
|
1567
|
-
i("nav",
|
|
1568
|
-
(
|
|
1629
|
+
i("nav", Sl, [
|
|
1630
|
+
(u(!0), m(_, null, F(e.items, (v) => (u(), m("a", {
|
|
1569
1631
|
key: v.name,
|
|
1570
1632
|
href: "#",
|
|
1571
|
-
onClick:
|
|
1633
|
+
onClick: z((r) => c(v), ["prevent"]),
|
|
1572
1634
|
class: $([
|
|
1573
1635
|
a.value === v ? "border-vxvue-500 text-vxvue-600" : "border-transparent text-gray-900 hover:text-gray-700 hover:border-gray-300",
|
|
1574
1636
|
v.disabled ? "cursor-not-allowed text-gray-400 hover:border-transparent" : "",
|
|
@@ -1583,7 +1645,7 @@ const rl = ["value", "type"], ul = ["disabled"], zl = /* @__PURE__ */ Object.ass
|
|
|
1583
1645
|
])
|
|
1584
1646
|
]),
|
|
1585
1647
|
M(n.$slots, "badge", { tab: v }, () => [
|
|
1586
|
-
v.badge ? (
|
|
1648
|
+
v.badge ? (u(), m("span", {
|
|
1587
1649
|
key: 0,
|
|
1588
1650
|
class: $([
|
|
1589
1651
|
a.value === v ? "bg-vxvue-50 text-vxvue-700" : "bg-gray-200 text-gray-900",
|
|
@@ -1592,7 +1654,7 @@ const rl = ["value", "type"], ul = ["disabled"], zl = /* @__PURE__ */ Object.ass
|
|
|
1592
1654
|
])
|
|
1593
1655
|
}, D(v.badge), 3)) : B("", !0)
|
|
1594
1656
|
])
|
|
1595
|
-
], 10,
|
|
1657
|
+
], 10, Cl))), 128))
|
|
1596
1658
|
])
|
|
1597
1659
|
])
|
|
1598
1660
|
])
|
|
@@ -1600,23 +1662,24 @@ const rl = ["value", "type"], ul = ["disabled"], zl = /* @__PURE__ */ Object.ass
|
|
|
1600
1662
|
}
|
|
1601
1663
|
};
|
|
1602
1664
|
export {
|
|
1603
|
-
|
|
1665
|
+
Vl as Accordion,
|
|
1604
1666
|
Dl as AccordionPanel,
|
|
1605
1667
|
Al as Autocomplete,
|
|
1606
1668
|
Bl as Confirm,
|
|
1607
1669
|
wt as DateInput,
|
|
1608
|
-
|
|
1670
|
+
Ll as Datepicker,
|
|
1609
1671
|
Pl as FormFileButton,
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1672
|
+
zt as FormSelect,
|
|
1673
|
+
Il as FormSwitch,
|
|
1674
|
+
_l as MessageToast,
|
|
1675
|
+
Tl as Modal,
|
|
1676
|
+
zl as Pagination,
|
|
1677
|
+
Fl as PasswordInput,
|
|
1678
|
+
El as SimpleTree,
|
|
1679
|
+
Ol as Sizable,
|
|
1617
1680
|
jl as Slider,
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1681
|
+
Yl as Sortable,
|
|
1682
|
+
ye as Spinner,
|
|
1683
|
+
Nl as SubmitButton,
|
|
1684
|
+
Rl as Tabs
|
|
1622
1685
|
};
|