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