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