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