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