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