vx-vue 0.7.5 → 0.7.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/style.css +1 -1
- package/dist/vxvue.es.js +509 -469
- package/dist/vxvue.umd.js +1 -1
- package/package.json +17 -10
package/dist/vxvue.es.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { getCurrentScope as ke, onScopeDispose as $e, unref as
|
|
1
|
+
import { getCurrentScope as ke, onScopeDispose as $e, unref as D, watch as H, useAttrs as K, ref as x, computed as V, onUpdated as Ce, openBlock as u, createElementBlock as v, normalizeClass as C, createElementVNode as r, mergeProps as j, withKeys as X, withModifiers as P, createCommentVNode as _, Fragment as A, renderList as O, renderSlot as B, toDisplayString as S, createVNode as Y, Transition as oe, withCtx as Q, createTextVNode as z, nextTick as re, toValue as de, withDirectives as fe, vModelText as Se, onMounted as ue, createBlock as Z, pushScopeId as Me, popScopeId as Ve, resolveDynamicComponent as ie, resolveComponent as De, vShow as _e, toHandlers as le, normalizeStyle as Ae } from "vue";
|
|
2
2
|
function Be(e) {
|
|
3
3
|
return ke() ? ($e(e), !0) : !1;
|
|
4
4
|
}
|
|
5
5
|
function he(e) {
|
|
6
|
-
return typeof e == "function" ? e() :
|
|
6
|
+
return typeof e == "function" ? e() : D(e);
|
|
7
7
|
}
|
|
8
8
|
const pe = typeof window < "u" && typeof document < "u";
|
|
9
9
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
10
|
-
const Pe = Object.prototype.toString, Le = (e) => Pe.call(e) === "[object Object]",
|
|
10
|
+
const Pe = Object.prototype.toString, Le = (e) => Pe.call(e) === "[object Object]", ee = () => {
|
|
11
11
|
}, Fe = /* @__PURE__ */ Ie();
|
|
12
12
|
function Ie() {
|
|
13
|
-
var e;
|
|
14
|
-
return pe && ((e = window == null ? void 0 : window.navigator) == null ? void 0 : e.userAgent) &&
|
|
13
|
+
var e, d;
|
|
14
|
+
return pe && ((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));
|
|
15
15
|
}
|
|
16
16
|
const Te = /[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;
|
|
17
|
-
function Oe(e,
|
|
17
|
+
function Oe(e, d, t, n) {
|
|
18
18
|
let a = e < 12 ? "AM" : "PM";
|
|
19
19
|
return n && (a = a.split("").reduce((l, c) => l += `${c}.`, "")), t ? a.toLowerCase() : a;
|
|
20
20
|
}
|
|
21
21
|
function W(e) {
|
|
22
|
-
const
|
|
23
|
-
return e + (
|
|
22
|
+
const d = ["th", "st", "nd", "rd"], t = e % 100;
|
|
23
|
+
return e + (d[(t - 20) % 10] || d[t] || d[0]);
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function ve(e, d, t = {}) {
|
|
26
26
|
var n;
|
|
27
|
-
const a = e.getFullYear(), l = e.getMonth(), c = e.getDate(), s = e.getHours(), o = e.getMinutes(),
|
|
27
|
+
const a = e.getFullYear(), l = e.getMonth(), c = e.getDate(), s = e.getHours(), o = e.getMinutes(), m = e.getSeconds(), i = e.getMilliseconds(), y = e.getDay(), f = (n = t.customMeridiem) != null ? n : Oe, g = {
|
|
28
28
|
Yo: () => W(a),
|
|
29
29
|
YY: () => String(a).slice(-2),
|
|
30
30
|
YYYY: () => a,
|
|
@@ -45,10 +45,10 @@ function de(e, m, t = {}) {
|
|
|
45
45
|
m: () => String(o),
|
|
46
46
|
mo: () => W(o),
|
|
47
47
|
mm: () => `${o}`.padStart(2, "0"),
|
|
48
|
-
s: () => String(
|
|
49
|
-
so: () => W(
|
|
50
|
-
ss: () => `${
|
|
51
|
-
SSS: () => `${
|
|
48
|
+
s: () => String(m),
|
|
49
|
+
so: () => W(m),
|
|
50
|
+
ss: () => `${m}`.padStart(2, "0"),
|
|
51
|
+
SSS: () => `${i}`.padStart(3, "0"),
|
|
52
52
|
d: () => y,
|
|
53
53
|
dd: () => e.toLocaleDateString(t.locales, { weekday: "narrow" }),
|
|
54
54
|
ddd: () => e.toLocaleDateString(t.locales, { weekday: "short" }),
|
|
@@ -58,46 +58,46 @@ function de(e, m, t = {}) {
|
|
|
58
58
|
a: () => f(s, o, !0),
|
|
59
59
|
aa: () => f(s, o, !0, !0)
|
|
60
60
|
};
|
|
61
|
-
return
|
|
61
|
+
return d.replace(Te, (w, I) => {
|
|
62
62
|
var T, F;
|
|
63
63
|
return (F = I ?? ((T = g[w]) == null ? void 0 : T.call(g))) != null ? F : w;
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
66
|
function J(e) {
|
|
67
|
-
var
|
|
67
|
+
var d;
|
|
68
68
|
const t = he(e);
|
|
69
|
-
return (
|
|
69
|
+
return (d = t == null ? void 0 : t.$el) != null ? d : t;
|
|
70
70
|
}
|
|
71
71
|
const ge = pe ? window : void 0;
|
|
72
|
-
function
|
|
73
|
-
let
|
|
74
|
-
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([t, n, a] = e,
|
|
75
|
-
return
|
|
72
|
+
function ae(...e) {
|
|
73
|
+
let d, t, n, a;
|
|
74
|
+
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([t, n, a] = e, d = ge) : [d, t, n, a] = e, !d)
|
|
75
|
+
return ee;
|
|
76
76
|
Array.isArray(t) || (t = [t]), Array.isArray(n) || (n = [n]);
|
|
77
77
|
const l = [], c = () => {
|
|
78
|
-
l.forEach((
|
|
79
|
-
}, s = (
|
|
80
|
-
() => [J(
|
|
81
|
-
([
|
|
82
|
-
if (c(), !
|
|
78
|
+
l.forEach((i) => i()), l.length = 0;
|
|
79
|
+
}, s = (i, y, f, g) => (i.addEventListener(y, f, g), () => i.removeEventListener(y, f, g)), o = H(
|
|
80
|
+
() => [J(d), he(a)],
|
|
81
|
+
([i, y]) => {
|
|
82
|
+
if (c(), !i)
|
|
83
83
|
return;
|
|
84
84
|
const f = Le(y) ? { ...y } : y;
|
|
85
85
|
l.push(
|
|
86
|
-
...t.flatMap((g) => n.map((w) => s(
|
|
86
|
+
...t.flatMap((g) => n.map((w) => s(i, g, w, f)))
|
|
87
87
|
);
|
|
88
88
|
},
|
|
89
89
|
{ immediate: !0, flush: "post" }
|
|
90
|
-
),
|
|
90
|
+
), m = () => {
|
|
91
91
|
o(), c();
|
|
92
92
|
};
|
|
93
|
-
return Be(
|
|
93
|
+
return Be(m), m;
|
|
94
94
|
}
|
|
95
|
-
let
|
|
96
|
-
function
|
|
95
|
+
let me = !1;
|
|
96
|
+
function ce(e, d, t = {}) {
|
|
97
97
|
const { window: n = ge, ignore: a = [], capture: l = !0, detectIframe: c = !1 } = t;
|
|
98
98
|
if (!n)
|
|
99
|
-
return;
|
|
100
|
-
Fe && !
|
|
99
|
+
return ee;
|
|
100
|
+
Fe && !me && (me = !0, Array.from(n.document.body.children).forEach((f) => f.addEventListener("click", ee)), n.document.documentElement.addEventListener("click", ee));
|
|
101
101
|
let s = !0;
|
|
102
102
|
const o = (f) => a.some((g) => {
|
|
103
103
|
if (typeof g == "string")
|
|
@@ -106,52 +106,52 @@ function ie(e, m, t = {}) {
|
|
|
106
106
|
const w = J(g);
|
|
107
107
|
return w && (f.target === w || f.composedPath().includes(w));
|
|
108
108
|
}
|
|
109
|
-
}),
|
|
110
|
-
|
|
109
|
+
}), i = [
|
|
110
|
+
ae(n, "click", (f) => {
|
|
111
111
|
const g = J(e);
|
|
112
112
|
if (!(!g || g === f.target || f.composedPath().includes(g))) {
|
|
113
113
|
if (f.detail === 0 && (s = !o(f)), !s) {
|
|
114
114
|
s = !0;
|
|
115
115
|
return;
|
|
116
116
|
}
|
|
117
|
-
|
|
117
|
+
d(f);
|
|
118
118
|
}
|
|
119
119
|
}, { passive: !0, capture: l }),
|
|
120
|
-
|
|
120
|
+
ae(n, "pointerdown", (f) => {
|
|
121
121
|
const g = J(e);
|
|
122
122
|
s = !o(f) && !!(g && !f.composedPath().includes(g));
|
|
123
123
|
}, { passive: !0 }),
|
|
124
|
-
c &&
|
|
124
|
+
c && ae(n, "blur", (f) => {
|
|
125
125
|
setTimeout(() => {
|
|
126
126
|
var g;
|
|
127
127
|
const w = J(e);
|
|
128
|
-
((g = n.document.activeElement) == null ? void 0 : g.tagName) === "IFRAME" && !(w != null && w.contains(n.document.activeElement)) &&
|
|
128
|
+
((g = n.document.activeElement) == null ? void 0 : g.tagName) === "IFRAME" && !(w != null && w.contains(n.document.activeElement)) && d(f);
|
|
129
129
|
}, 0);
|
|
130
130
|
})
|
|
131
131
|
].filter(Boolean);
|
|
132
|
-
return () =>
|
|
132
|
+
return () => i.forEach((f) => f());
|
|
133
133
|
}
|
|
134
134
|
const je = ["value", "onKeydown"], Ye = { class: "flex absolute inset-y-0 right-0 items-center pr-3 text-vxvue-700" }, Ee = {
|
|
135
135
|
key: 0,
|
|
136
|
-
class: "
|
|
136
|
+
class: "size-5 animate-spin",
|
|
137
137
|
xmlns: "http://www.w3.org/2000/svg",
|
|
138
138
|
fill: "none",
|
|
139
139
|
viewBox: "0 0 24 24"
|
|
140
|
-
}, Ne = /* @__PURE__ */
|
|
140
|
+
}, Ne = /* @__PURE__ */ r("circle", {
|
|
141
141
|
class: "opacity-25",
|
|
142
142
|
cx: "12",
|
|
143
143
|
cy: "12",
|
|
144
144
|
r: "10",
|
|
145
145
|
stroke: "currentColor",
|
|
146
146
|
"stroke-width": "4"
|
|
147
|
-
}, null, -1), ze = /* @__PURE__ */
|
|
147
|
+
}, null, -1), ze = /* @__PURE__ */ r("path", {
|
|
148
148
|
class: "opacity-75",
|
|
149
149
|
fill: "currentColor",
|
|
150
150
|
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
151
151
|
}, null, -1), Re = [
|
|
152
152
|
Ne,
|
|
153
153
|
ze
|
|
154
|
-
],
|
|
154
|
+
], hl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
155
155
|
__name: "autocomplete",
|
|
156
156
|
props: {
|
|
157
157
|
modelValue: { type: String, default: "" },
|
|
@@ -164,11 +164,11 @@ const je = ["value", "onKeydown"], Ye = { class: "flex absolute inset-y-0 right-
|
|
|
164
164
|
autoSelect: Boolean
|
|
165
165
|
},
|
|
166
166
|
emits: ["update:modelValue", "blur", "submit"],
|
|
167
|
-
setup(e, { emit:
|
|
168
|
-
const t =
|
|
167
|
+
setup(e, { emit: d }) {
|
|
168
|
+
const t = d, n = e, a = K(), c = (/* @__PURE__ */ (() => {
|
|
169
169
|
let k = 0;
|
|
170
170
|
return ($) => ($ || "") + ++k;
|
|
171
|
-
})())((a.id || "autocomplete") + "-"), s = x([]), o = x(-1),
|
|
171
|
+
})())((a.id || "autocomplete") + "-"), s = x([]), o = x(-1), m = x(0), i = x(!1), y = x(!1), f = x("top-0 translate-y-12"), g = x(!0), w = x(null), I = x(null), T = x(null), F = V(
|
|
172
172
|
() => s.value.map((k, $) => ({
|
|
173
173
|
id: (a.id || "autocomplete") + "-item-" + $,
|
|
174
174
|
class: ["autocomplete-item", n.resultItemClass, { "bg-vxvue-700 text-white": o.value === $ }],
|
|
@@ -185,7 +185,7 @@ const je = ["value", "onKeydown"], Ye = { class: "flex absolute inset-y-0 right-
|
|
|
185
185
|
"aria-autocomplete": "list",
|
|
186
186
|
"aria-haspopup": "listbox",
|
|
187
187
|
"aria-owns": c,
|
|
188
|
-
"aria-expanded":
|
|
188
|
+
"aria-expanded": i.value ? "true" : "false",
|
|
189
189
|
"aria-activedescendant": o.value > -1 ? F.value[o.value].id : "",
|
|
190
190
|
...a
|
|
191
191
|
})), q = V(() => ({
|
|
@@ -193,28 +193,28 @@ const je = ["value", "onKeydown"], Ye = { class: "flex absolute inset-y-0 right-
|
|
|
193
193
|
class: ["autocomplete-list absolute min-w-full transform z-10", n.resultListClass, f.value],
|
|
194
194
|
role: "listbox"
|
|
195
195
|
})), b = () => {
|
|
196
|
-
o.value = -1, s.value = [],
|
|
196
|
+
o.value = -1, s.value = [], i.value = !1, g.value = !0;
|
|
197
197
|
}, p = (k) => {
|
|
198
198
|
const $ = n.search(k);
|
|
199
199
|
if ($ instanceof Promise) {
|
|
200
|
-
const R = ++
|
|
200
|
+
const R = ++m.value;
|
|
201
201
|
y.value = !0, $.then((N) => {
|
|
202
|
-
R ===
|
|
202
|
+
R === m.value && (s.value = N, y.value = !1, s.value.length ? (o.value = n.autoSelect ? 0 : -1, i.value = !0) : b());
|
|
203
203
|
});
|
|
204
204
|
} else
|
|
205
|
-
s.value = $, s.value.length === 0 ? b() : (o.value = n.autoSelect ? 0 : -1,
|
|
205
|
+
s.value = $, s.value.length === 0 ? b() : (o.value = n.autoSelect ? 0 : -1, i.value = !0);
|
|
206
206
|
}, h = () => {
|
|
207
207
|
const k = s.value[o.value];
|
|
208
208
|
return k && t("update:modelValue", n.getResultValue(k)), b(), k;
|
|
209
209
|
}, M = (k) => {
|
|
210
210
|
t("update:modelValue", k), p(k);
|
|
211
|
-
},
|
|
211
|
+
}, L = (k) => p(k.target.value), E = () => {
|
|
212
212
|
b(), t("blur");
|
|
213
|
-
},
|
|
213
|
+
}, G = () => {
|
|
214
214
|
const k = s.value.length;
|
|
215
215
|
o.value = ((o.value - 1) % k + k) % k;
|
|
216
|
-
},
|
|
217
|
-
|
|
216
|
+
}, te = (k) => {
|
|
217
|
+
i.value || L(k);
|
|
218
218
|
const $ = s.value.length;
|
|
219
219
|
o.value = ((o.value + 1) % $ + $) % $;
|
|
220
220
|
}, xe = () => {
|
|
@@ -223,7 +223,7 @@ const je = ["value", "onKeydown"], Ye = { class: "flex absolute inset-y-0 right-
|
|
|
223
223
|
const $ = k.target.closest("[data-result-index]");
|
|
224
224
|
$ && (o.value = parseInt($.dataset.resultIndex, 10), t("submit", h()));
|
|
225
225
|
};
|
|
226
|
-
return
|
|
226
|
+
return ce(T, b), Ce(() => {
|
|
227
227
|
if (w.value) {
|
|
228
228
|
const k = I.value.getBoundingClientRect(), $ = w.value.getBoundingClientRect();
|
|
229
229
|
g.value && s.value.length && (g.value = !1, f.value = k.bottom + $.height > window.innerHeight && window.innerHeight - k.bottom < k.top && window.pageYOffset + k.top - $.height > 0 ? "bottom-0 -translate-y-12" : "top-0 translate-y-12");
|
|
@@ -233,12 +233,12 @@ const je = ["value", "onKeydown"], Ye = { class: "flex absolute inset-y-0 right-
|
|
|
233
233
|
N.top < $.top ? w.value.scrollTop -= $.top - N.top : N.bottom > $.bottom && (w.value.scrollTop += N.bottom - $.bottom);
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
|
-
}), (k, $) => (u(),
|
|
236
|
+
}), (k, $) => (u(), v("div", {
|
|
237
237
|
class: C(["inline-block relative", k.$attrs.class]),
|
|
238
238
|
ref_key: "container",
|
|
239
239
|
ref: T
|
|
240
240
|
}, [
|
|
241
|
-
|
|
241
|
+
r("input", j({
|
|
242
242
|
ref_key: "input",
|
|
243
243
|
ref: I,
|
|
244
244
|
class: "block pr-10 w-full form-input focus:border-vxvue",
|
|
@@ -246,36 +246,36 @@ const je = ["value", "onKeydown"], Ye = { class: "flex absolute inset-y-0 right-
|
|
|
246
246
|
}, U.value, {
|
|
247
247
|
onInput: $[0] || ($[0] = (R) => M(R.target.value)),
|
|
248
248
|
onKeydown: [
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
249
|
+
X(ye, ["enter"]),
|
|
250
|
+
X(xe, ["esc"]),
|
|
251
|
+
X(h, ["tab"]),
|
|
252
|
+
X(P(G, ["prevent"]), ["up"]),
|
|
253
|
+
X(P(te, ["prevent"]), ["down"])
|
|
254
254
|
],
|
|
255
|
-
onFocus:
|
|
255
|
+
onFocus: L,
|
|
256
256
|
onBlur: E
|
|
257
257
|
}), null, 16, je),
|
|
258
|
-
|
|
259
|
-
y.value ? (u(),
|
|
258
|
+
r("span", Ye, [
|
|
259
|
+
y.value ? (u(), v("svg", Ee, Re)) : _("", !0)
|
|
260
260
|
]),
|
|
261
|
-
s.value.length ? (u(),
|
|
261
|
+
s.value.length ? (u(), v("ul", j({
|
|
262
262
|
key: 0,
|
|
263
263
|
ref_key: "resultList",
|
|
264
264
|
ref: w
|
|
265
265
|
}, q.value, {
|
|
266
266
|
onClick: we,
|
|
267
|
-
onMousedown: $[1] || ($[1] =
|
|
267
|
+
onMousedown: $[1] || ($[1] = P(() => {
|
|
268
268
|
}, ["prevent"]))
|
|
269
269
|
}), [
|
|
270
|
-
(u(!0),
|
|
270
|
+
(u(!0), v(A, null, O(s.value, (R, N) => B(k.$slots, "result", {
|
|
271
271
|
result: R,
|
|
272
272
|
props: F.value[N]
|
|
273
273
|
}, () => [
|
|
274
|
-
(u(),
|
|
274
|
+
(u(), v("li", j({
|
|
275
275
|
key: F.value[N].id
|
|
276
276
|
}, F.value[N]), S(e.getResultValue(R)), 17))
|
|
277
277
|
])), 256))
|
|
278
|
-
], 16)) :
|
|
278
|
+
], 16)) : _("", !0)
|
|
279
279
|
], 2));
|
|
280
280
|
}
|
|
281
281
|
}), He = {
|
|
@@ -285,16 +285,16 @@ const je = ["value", "onKeydown"], Ye = { class: "flex absolute inset-y-0 right-
|
|
|
285
285
|
}, Ue = {
|
|
286
286
|
key: 0,
|
|
287
287
|
class: "overflow-y-auto fixed inset-0 z-50"
|
|
288
|
-
}, We = { class: "flex justify-center items-center min-h-screen text-center sm:block sm:p-0" },
|
|
288
|
+
}, We = { class: "flex justify-center items-center min-h-screen text-center sm:block sm:p-0" }, Ze = { key: 0 }, qe = /* @__PURE__ */ r("span", {
|
|
289
289
|
class: "hidden sm:inline-block sm:h-screen sm:align-middle",
|
|
290
290
|
"aria-hidden": "true"
|
|
291
|
-
}, "", -1),
|
|
291
|
+
}, "", -1), Ke = { 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" }, Ge = { class: "px-4 pb-4 mt-4 sm:px-6 sm:pb-6 sm:mt-5" }, Xe = { class: "flex flex-row items-center" }, Je = { class: "flex-shrink-0" }, Qe = { class: "flex-grow text-center" }, et = ["onClick"], pl = {
|
|
292
292
|
__name: "confirm",
|
|
293
293
|
props: {
|
|
294
294
|
buttons: {
|
|
295
295
|
type: [Object, Array],
|
|
296
296
|
default: { label: "Ok" },
|
|
297
|
-
validator: (e) => Array.isArray(e) && e.length <= 2 && e.filter((
|
|
297
|
+
validator: (e) => Array.isArray(e) && e.length <= 2 && e.filter((d) => d.label !== "undefined" && d.value !== "undefined").length === e.length || e.label !== void 0 && e.value !== void 0
|
|
298
298
|
},
|
|
299
299
|
headerClass: {
|
|
300
300
|
type: String,
|
|
@@ -305,65 +305,65 @@ const je = ["value", "onKeydown"], Ye = { class: "flex absolute inset-y-0 right-
|
|
|
305
305
|
default: "button"
|
|
306
306
|
}
|
|
307
307
|
},
|
|
308
|
-
setup(e, { expose:
|
|
308
|
+
setup(e, { expose: d }) {
|
|
309
309
|
const t = e, n = x(""), a = x(""), l = x(!1);
|
|
310
310
|
let c = null, s = null;
|
|
311
|
-
const o = V(() => Array.isArray(t.buttons) ? t.buttons : [t.buttons]),
|
|
311
|
+
const o = V(() => Array.isArray(t.buttons) ? t.buttons : [t.buttons]), m = x(null), i = (f, g) => {
|
|
312
312
|
l.value = !1, f.value !== void 0 ? f.value ? c() : s() : g ? s() : c();
|
|
313
313
|
};
|
|
314
|
-
return
|
|
314
|
+
return d({ open: (f, g) => (n.value = f, a.value = g, l.value = !0, re(() => m.value.firstElementChild.focus()), new Promise((w, I) => {
|
|
315
315
|
c = w, s = I;
|
|
316
|
-
})) }), (f, g) => (u(),
|
|
317
|
-
l.value ? (u(),
|
|
316
|
+
})) }), (f, g) => (u(), v(A, null, [
|
|
317
|
+
l.value ? (u(), v("div", He)) : _("", !0),
|
|
318
318
|
Y(oe, { name: "appear" }, {
|
|
319
319
|
default: Q(() => [
|
|
320
|
-
l.value ? (u(),
|
|
321
|
-
|
|
322
|
-
l.value ? (u(),
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
n.value ? (u(),
|
|
320
|
+
l.value ? (u(), v("div", Ue, [
|
|
321
|
+
r("div", We, [
|
|
322
|
+
l.value ? (u(), v("div", Ze, [
|
|
323
|
+
qe,
|
|
324
|
+
r("div", Ke, [
|
|
325
|
+
n.value ? (u(), v("h3", {
|
|
326
326
|
key: 0,
|
|
327
327
|
class: C(["py-4 pt-4 text-lg font-medium text-center sm:py-6", e.headerClass])
|
|
328
328
|
}, [
|
|
329
|
-
|
|
329
|
+
B(f.$slots, "title", { title: n.value }, () => [
|
|
330
330
|
z(S(n.value), 1)
|
|
331
331
|
])
|
|
332
|
-
], 2)) :
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
332
|
+
], 2)) : _("", !0),
|
|
333
|
+
r("div", Ge, [
|
|
334
|
+
r("div", Xe, [
|
|
335
|
+
r("div", Je, [
|
|
336
|
+
B(f.$slots, "icon")
|
|
337
337
|
]),
|
|
338
|
-
|
|
339
|
-
|
|
338
|
+
r("p", Qe, [
|
|
339
|
+
B(f.$slots, "default", { message: a.value }, () => [
|
|
340
340
|
z(S(a.value), 1)
|
|
341
341
|
])
|
|
342
342
|
])
|
|
343
343
|
]),
|
|
344
|
-
|
|
344
|
+
r("div", {
|
|
345
345
|
class: "flex justify-center mt-5 space-x-2 sm:mt-6",
|
|
346
346
|
ref_key: "buttonsContainer",
|
|
347
|
-
ref:
|
|
347
|
+
ref: m
|
|
348
348
|
}, [
|
|
349
|
-
(u(!0),
|
|
349
|
+
(u(!0), v(A, null, O(o.value, (w, I) => (u(), v("button", {
|
|
350
350
|
class: C([e.buttonClass, w.class]),
|
|
351
|
-
onClick:
|
|
351
|
+
onClick: P((T) => i(w, I), ["prevent"])
|
|
352
352
|
}, S(w.label), 11, et))), 256))
|
|
353
353
|
], 512)
|
|
354
354
|
])
|
|
355
355
|
])
|
|
356
|
-
])) :
|
|
356
|
+
])) : _("", !0)
|
|
357
357
|
])
|
|
358
|
-
])) :
|
|
358
|
+
])) : _("", !0)
|
|
359
359
|
]),
|
|
360
360
|
_: 3
|
|
361
361
|
})
|
|
362
362
|
], 64));
|
|
363
363
|
}
|
|
364
364
|
};
|
|
365
|
-
function tt(e,
|
|
366
|
-
const t = x(!1), n =
|
|
365
|
+
function tt(e, d) {
|
|
366
|
+
const t = x(!1), n = de(d);
|
|
367
367
|
let a, l = n.toLowerCase().replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), c = [];
|
|
368
368
|
if ((a = n.match(/\bd\b/gi)) && a.length === 1)
|
|
369
369
|
l = l.replace("d", "(\\d{1,2})");
|
|
@@ -381,35 +381,35 @@ function tt(e, m) {
|
|
|
381
381
|
l = l.replace("yyyy", "(\\d{4})");
|
|
382
382
|
else
|
|
383
383
|
return { date: t };
|
|
384
|
-
if (c.push({ srcPos: n.toLowerCase().indexOf("y"), destPos: 0 }), !(a =
|
|
384
|
+
if (c.push({ srcPos: n.toLowerCase().indexOf("y"), destPos: 0 }), !(a = de(e).match(l)))
|
|
385
385
|
return { date: t };
|
|
386
|
-
a.shift(), c.sort((
|
|
387
|
-
let s = [], o,
|
|
386
|
+
a.shift(), c.sort((i, y) => i.srcPos < y.srcPos ? -1 : 1);
|
|
387
|
+
let s = [], o, m;
|
|
388
388
|
for (; o = a.shift(); )
|
|
389
|
-
|
|
389
|
+
m = c.shift(), s[m.destPos] = o;
|
|
390
390
|
return s = Date.parse(s.join("-")), s && (s = new Date(s), t.value = new Date(s.getFullYear(), s.getMonth(), s.getDate(), 0, 0, 0)), { date: t };
|
|
391
391
|
}
|
|
392
|
-
const lt = { key: 0 }, at = { class: "text-vxvue-700" }, st = /* @__PURE__ */
|
|
392
|
+
const lt = { key: 0 }, at = { class: "text-vxvue-700" }, st = /* @__PURE__ */ r("svg", {
|
|
393
393
|
class: "w-2 h-2",
|
|
394
394
|
stroke: "currentColor",
|
|
395
395
|
fill: "none",
|
|
396
396
|
viewBox: "0 0 8 8"
|
|
397
397
|
}, [
|
|
398
|
-
/* @__PURE__ */
|
|
398
|
+
/* @__PURE__ */ r("path", {
|
|
399
399
|
"stroke-linecap": "round",
|
|
400
400
|
"stroke-width": "1.5",
|
|
401
401
|
d: "M1 1l6 6m0-6L1 7"
|
|
402
402
|
})
|
|
403
403
|
], -1), nt = [
|
|
404
404
|
st
|
|
405
|
-
], ot = /* @__PURE__ */
|
|
405
|
+
], ot = /* @__PURE__ */ r("svg", {
|
|
406
406
|
xmlns: "http://www.w3.org/2000/svg",
|
|
407
407
|
class: "w-6 h-6",
|
|
408
408
|
fill: "none",
|
|
409
409
|
viewBox: "0 0 24 24",
|
|
410
410
|
stroke: "currentColor"
|
|
411
411
|
}, [
|
|
412
|
-
/* @__PURE__ */
|
|
412
|
+
/* @__PURE__ */ r("path", {
|
|
413
413
|
"stroke-linecap": "round",
|
|
414
414
|
"stroke-linejoin": "round",
|
|
415
415
|
"stroke-width": "2",
|
|
@@ -417,7 +417,7 @@ const lt = { key: 0 }, at = { class: "text-vxvue-700" }, st = /* @__PURE__ */ i(
|
|
|
417
417
|
})
|
|
418
418
|
], -1), rt = [
|
|
419
419
|
ot
|
|
420
|
-
], ut = {
|
|
420
|
+
], ut = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
421
421
|
__name: "date-input",
|
|
422
422
|
props: {
|
|
423
423
|
outputFormat: { type: String, default: "YYYY-MM-DD" },
|
|
@@ -427,119 +427,170 @@ const lt = { key: 0 }, at = { class: "text-vxvue-700" }, st = /* @__PURE__ */ i(
|
|
|
427
427
|
modelValue: Date
|
|
428
428
|
},
|
|
429
429
|
emits: ["update:modelValue", "toggle-datepicker"],
|
|
430
|
-
setup(e, { emit:
|
|
431
|
-
const t =
|
|
430
|
+
setup(e, { emit: d }) {
|
|
431
|
+
const t = d, n = e, a = x(""), l = V(() => n.modelValue ? ve(n.modelValue, n.outputFormat) : ""), c = V(() => {
|
|
432
432
|
let s = Object.assign({}, K());
|
|
433
433
|
return delete s.class, s;
|
|
434
434
|
});
|
|
435
|
-
return H(() => n.modelValue, (s) => a.value = s ?
|
|
435
|
+
return H(() => n.modelValue, (s) => a.value = s ? ve(s, n.outputFormat) : ""), (s, o) => (u(), v("div", {
|
|
436
436
|
class: C(["inline-block relative", s.$attrs.class])
|
|
437
437
|
}, [
|
|
438
|
-
l.value ? (u(),
|
|
439
|
-
|
|
438
|
+
l.value ? (u(), v("div", lt, [
|
|
439
|
+
r("div", {
|
|
440
440
|
class: C(["block flex items-center w-full form-input bg-vxvue-50", { "pr-10": e.showButton }])
|
|
441
441
|
}, [
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
onClick: o[0] || (o[0] = (
|
|
442
|
+
r("span", at, S(l.value), 1),
|
|
443
|
+
r("button", {
|
|
444
|
+
onClick: o[0] || (o[0] = (m) => t("update:modelValue", null)),
|
|
445
445
|
class: "inline-flex flex-shrink-0 justify-center items-center ml-2 w-4 h-4 rounded-full focus:text-white focus:outline-none text-vxvue hover:bg-vxvue-100 hover:text-vue-700 focus:bg-vxvue-700"
|
|
446
446
|
}, nt)
|
|
447
447
|
], 2)
|
|
448
|
-
])) :
|
|
448
|
+
])) : fe((u(), v("input", j({
|
|
449
449
|
key: 1,
|
|
450
450
|
type: "text",
|
|
451
451
|
class: ["block w-full form-input peer focus:border-vxvue", { "pr-10": e.showButton }],
|
|
452
|
-
"onUpdate:modelValue": o[1] || (o[1] = (
|
|
453
|
-
onBlur: o[2] || (o[2] = (
|
|
454
|
-
var
|
|
455
|
-
return t("update:modelValue", ((
|
|
452
|
+
"onUpdate:modelValue": o[1] || (o[1] = (m) => a.value = m),
|
|
453
|
+
onBlur: o[2] || (o[2] = (m) => {
|
|
454
|
+
var i;
|
|
455
|
+
return t("update:modelValue", ((i = D(tt)(a.value, n.inputFormat).date) == null ? void 0 : i.value) || null);
|
|
456
456
|
}),
|
|
457
|
-
onInput: o[3] || (o[3] =
|
|
457
|
+
onInput: o[3] || (o[3] = P(() => {
|
|
458
458
|
}, ["prevent"]))
|
|
459
459
|
}, c.value), null, 16)), [
|
|
460
460
|
[Se, a.value]
|
|
461
461
|
]),
|
|
462
|
-
e.showButton ? (u(),
|
|
462
|
+
e.showButton ? (u(), v("button", {
|
|
463
463
|
key: 2,
|
|
464
464
|
class: "flex absolute inset-y-0 right-0 items-center px-2 text-vxvue-700 hover:text-vxvue",
|
|
465
|
-
|
|
465
|
+
"aria-label": "datepicker-toggle",
|
|
466
|
+
onClick: o[4] || (o[4] = P((m) => t("toggle-datepicker"), ["stop"])),
|
|
466
467
|
ref: "toggleButton"
|
|
467
|
-
}, rt, 512)) :
|
|
468
|
-
|
|
468
|
+
}, rt, 512)) : _("", !0),
|
|
469
|
+
B(s.$slots, "default")
|
|
469
470
|
], 2));
|
|
470
471
|
}
|
|
471
|
-
};
|
|
472
|
-
function
|
|
473
|
-
return u(),
|
|
472
|
+
});
|
|
473
|
+
function it(e, d) {
|
|
474
|
+
return u(), v("svg", {
|
|
475
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
476
|
+
viewBox: "0 0 24 24",
|
|
477
|
+
fill: "currentColor",
|
|
478
|
+
"aria-hidden": "true",
|
|
479
|
+
"data-slot": "icon"
|
|
480
|
+
}, [
|
|
481
|
+
r("path", {
|
|
482
|
+
"fill-rule": "evenodd",
|
|
483
|
+
d: "M12.53 16.28a.75.75 0 0 1-1.06 0l-7.5-7.5a.75.75 0 0 1 1.06-1.06L12 14.69l6.97-6.97a.75.75 0 1 1 1.06 1.06l-7.5 7.5Z",
|
|
484
|
+
"clip-rule": "evenodd"
|
|
485
|
+
})
|
|
486
|
+
]);
|
|
487
|
+
}
|
|
488
|
+
function se(e, d) {
|
|
489
|
+
return u(), v("svg", {
|
|
490
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
491
|
+
viewBox: "0 0 24 24",
|
|
492
|
+
fill: "currentColor",
|
|
493
|
+
"aria-hidden": "true",
|
|
494
|
+
"data-slot": "icon"
|
|
495
|
+
}, [
|
|
496
|
+
r("path", {
|
|
497
|
+
"fill-rule": "evenodd",
|
|
498
|
+
d: "M7.72 12.53a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 1 1 1.06 1.06L9.31 12l6.97 6.97a.75.75 0 1 1-1.06 1.06l-7.5-7.5Z",
|
|
499
|
+
"clip-rule": "evenodd"
|
|
500
|
+
})
|
|
501
|
+
]);
|
|
502
|
+
}
|
|
503
|
+
function ne(e, d) {
|
|
504
|
+
return u(), v("svg", {
|
|
505
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
506
|
+
viewBox: "0 0 24 24",
|
|
507
|
+
fill: "currentColor",
|
|
508
|
+
"aria-hidden": "true",
|
|
509
|
+
"data-slot": "icon"
|
|
510
|
+
}, [
|
|
511
|
+
r("path", {
|
|
512
|
+
"fill-rule": "evenodd",
|
|
513
|
+
d: "M16.28 11.47a.75.75 0 0 1 0 1.06l-7.5 7.5a.75.75 0 0 1-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 0 1 1.06-1.06l7.5 7.5Z",
|
|
514
|
+
"clip-rule": "evenodd"
|
|
515
|
+
})
|
|
516
|
+
]);
|
|
517
|
+
}
|
|
518
|
+
function ct(e, d) {
|
|
519
|
+
return u(), v("svg", {
|
|
474
520
|
xmlns: "http://www.w3.org/2000/svg",
|
|
475
521
|
viewBox: "0 0 24 24",
|
|
476
522
|
fill: "currentColor",
|
|
477
|
-
"aria-hidden": "true"
|
|
523
|
+
"aria-hidden": "true",
|
|
524
|
+
"data-slot": "icon"
|
|
478
525
|
}, [
|
|
479
|
-
|
|
526
|
+
r("path", {
|
|
480
527
|
"fill-rule": "evenodd",
|
|
481
|
-
d: "
|
|
528
|
+
d: "M11.47 4.72a.75.75 0 0 1 1.06 0l3.75 3.75a.75.75 0 0 1-1.06 1.06L12 6.31 8.78 9.53a.75.75 0 0 1-1.06-1.06l3.75-3.75Zm-3.75 9.75a.75.75 0 0 1 1.06 0L12 17.69l3.22-3.22a.75.75 0 1 1 1.06 1.06l-3.75 3.75a.75.75 0 0 1-1.06 0l-3.75-3.75a.75.75 0 0 1 0-1.06Z",
|
|
482
529
|
"clip-rule": "evenodd"
|
|
483
530
|
})
|
|
484
531
|
]);
|
|
485
532
|
}
|
|
486
|
-
function
|
|
487
|
-
return u(),
|
|
533
|
+
function dt(e, d) {
|
|
534
|
+
return u(), v("svg", {
|
|
488
535
|
xmlns: "http://www.w3.org/2000/svg",
|
|
489
536
|
viewBox: "0 0 24 24",
|
|
490
537
|
fill: "currentColor",
|
|
491
|
-
"aria-hidden": "true"
|
|
538
|
+
"aria-hidden": "true",
|
|
539
|
+
"data-slot": "icon"
|
|
492
540
|
}, [
|
|
493
|
-
|
|
541
|
+
r("path", {
|
|
494
542
|
"fill-rule": "evenodd",
|
|
495
|
-
d: "
|
|
543
|
+
d: "M11.47 7.72a.75.75 0 0 1 1.06 0l7.5 7.5a.75.75 0 1 1-1.06 1.06L12 9.31l-6.97 6.97a.75.75 0 0 1-1.06-1.06l7.5-7.5Z",
|
|
496
544
|
"clip-rule": "evenodd"
|
|
497
545
|
})
|
|
498
546
|
]);
|
|
499
547
|
}
|
|
500
|
-
function
|
|
501
|
-
return u(),
|
|
548
|
+
function vt(e, d) {
|
|
549
|
+
return u(), v("svg", {
|
|
502
550
|
xmlns: "http://www.w3.org/2000/svg",
|
|
503
551
|
viewBox: "0 0 24 24",
|
|
504
552
|
fill: "currentColor",
|
|
505
|
-
"aria-hidden": "true"
|
|
553
|
+
"aria-hidden": "true",
|
|
554
|
+
"data-slot": "icon"
|
|
506
555
|
}, [
|
|
507
|
-
|
|
556
|
+
r("path", {
|
|
508
557
|
"fill-rule": "evenodd",
|
|
509
|
-
d: "
|
|
558
|
+
d: "M4.25 12a.75.75 0 0 1 .75-.75h14a.75.75 0 0 1 0 1.5H5a.75.75 0 0 1-.75-.75Z",
|
|
510
559
|
"clip-rule": "evenodd"
|
|
511
560
|
})
|
|
512
561
|
]);
|
|
513
562
|
}
|
|
514
|
-
function
|
|
515
|
-
return u(),
|
|
563
|
+
function mt(e, d) {
|
|
564
|
+
return u(), v("svg", {
|
|
516
565
|
xmlns: "http://www.w3.org/2000/svg",
|
|
517
566
|
viewBox: "0 0 24 24",
|
|
518
567
|
fill: "currentColor",
|
|
519
|
-
"aria-hidden": "true"
|
|
568
|
+
"aria-hidden": "true",
|
|
569
|
+
"data-slot": "icon"
|
|
520
570
|
}, [
|
|
521
|
-
|
|
571
|
+
r("path", {
|
|
522
572
|
"fill-rule": "evenodd",
|
|
523
|
-
d: "M12 3.75a.75.75 0
|
|
573
|
+
d: "M12 3.75a.75.75 0 0 1 .75.75v6.75h6.75a.75.75 0 0 1 0 1.5h-6.75v6.75a.75.75 0 0 1-1.5 0v-6.75H4.5a.75.75 0 0 1 0-1.5h6.75V4.5a.75.75 0 0 1 .75-.75Z",
|
|
524
574
|
"clip-rule": "evenodd"
|
|
525
575
|
})
|
|
526
576
|
]);
|
|
527
577
|
}
|
|
528
|
-
function
|
|
529
|
-
return u(),
|
|
578
|
+
function ft(e, d) {
|
|
579
|
+
return u(), v("svg", {
|
|
530
580
|
xmlns: "http://www.w3.org/2000/svg",
|
|
531
581
|
viewBox: "0 0 24 24",
|
|
532
582
|
fill: "currentColor",
|
|
533
|
-
"aria-hidden": "true"
|
|
583
|
+
"aria-hidden": "true",
|
|
584
|
+
"data-slot": "icon"
|
|
534
585
|
}, [
|
|
535
|
-
|
|
586
|
+
r("path", {
|
|
536
587
|
"fill-rule": "evenodd",
|
|
537
|
-
d: "M5.47 5.47a.75.75 0
|
|
588
|
+
d: "M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z",
|
|
538
589
|
"clip-rule": "evenodd"
|
|
539
590
|
})
|
|
540
591
|
]);
|
|
541
592
|
}
|
|
542
|
-
const
|
|
593
|
+
const ht = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, pt = { class: "flex w-1/2 justify-between" }, gt = { class: "flex w-1/2 justify-between" }, bt = { class: "grid grid-cols-7 gap-0.5 p-0.5" }, xt = ["disabled", "onClick"], gl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
543
594
|
__name: "datepicker",
|
|
544
595
|
props: {
|
|
545
596
|
modelValue: [Date, Boolean],
|
|
@@ -551,24 +602,24 @@ const vt = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, mt
|
|
|
551
602
|
hasInput: { type: Boolean, default: !0 }
|
|
552
603
|
},
|
|
553
604
|
emits: ["update:modelValue", "month-change", "year-change"],
|
|
554
|
-
setup(e, { emit:
|
|
555
|
-
const t = e, n =
|
|
605
|
+
setup(e, { emit: d }) {
|
|
606
|
+
const t = e, n = d, a = (() => {
|
|
556
607
|
let b = /* @__PURE__ */ new Date();
|
|
557
608
|
return new Date(b.getFullYear(), b.getMonth(), b.getDate());
|
|
558
|
-
})(), l = x(new Date(a.getFullYear(), a.getMonth(), 1)), c = x(null), s = x(!t.hasInput), o = x("left-0"),
|
|
559
|
-
const b = [], p = l.value.getFullYear(), h = l.value.getMonth(), M = new Date(p, h + 1, 0),
|
|
560
|
-
for (let
|
|
561
|
-
b.push(new Date(p, h,
|
|
609
|
+
})(), l = x(new Date(a.getFullYear(), a.getMonth(), 1)), c = x(null), s = x(!t.hasInput), o = x("left-0"), m = x("top-0"), i = x(null), y = x(null), f = x(null), g = V(() => t.hasInput ? { class: ["absolute", s.value ? "block" : "hidden"] } : {}), w = V(() => {
|
|
610
|
+
const b = [], p = l.value.getFullYear(), h = l.value.getMonth(), M = new Date(p, h + 1, 0), L = new Date(p, h, 0).getDay() + 1 - t.startOfWeekIndex, E = (6 + t.startOfWeekIndex - M.getDay()) % 7;
|
|
611
|
+
for (let G = -L, te = M.getDate() + E; G < te; ++G)
|
|
612
|
+
b.push(new Date(p, h, G + 1));
|
|
562
613
|
return b;
|
|
563
614
|
}), I = V(() => t.startOfWeekIndex ? t.dayNames.slice(1).concat(t.dayNames[0]) : t.dayNames.slice());
|
|
564
615
|
H(() => t.modelValue, (b) => {
|
|
565
616
|
b ? (c.value = new Date(b.getFullYear(), b.getMonth(), b.getDate()), l.value = new Date(c.value.getTime())) : (c.value = null, l.value = new Date(a.getTime())), l.value.setDate(1);
|
|
566
617
|
}, { immediate: !0 }), H(s, (b) => {
|
|
567
618
|
b && t.hasInput && re(() => {
|
|
568
|
-
const p =
|
|
569
|
-
o.value = p.left + h.width > window.innerWidth ? "right-0" : "left-0",
|
|
619
|
+
const p = i.value.$el.getBoundingClientRect(), h = y.value.getBoundingClientRect();
|
|
620
|
+
o.value = p.left + h.width > window.innerWidth ? "right-0" : "left-0", m.value = p.bottom + h.height > window.innerHeight ? "bottom-0 -translate-y-12" : "top-0 translate-y-12";
|
|
570
621
|
});
|
|
571
|
-
}),
|
|
622
|
+
}), ce(y, () => s.value = !1, { ignore: [f] });
|
|
572
623
|
const T = (b) => {
|
|
573
624
|
l.value = new Date(l.value.getFullYear(), b, 1), n("month-change", l.value);
|
|
574
625
|
}, F = (b) => {
|
|
@@ -580,89 +631,89 @@ const vt = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, mt
|
|
|
580
631
|
};
|
|
581
632
|
return ue(() => {
|
|
582
633
|
var b;
|
|
583
|
-
return f.value = (b =
|
|
584
|
-
}), (b, p) => (u(),
|
|
634
|
+
return f.value = (b = i.value) == null ? void 0 : b.$refs.toggleButton;
|
|
635
|
+
}), (b, p) => (u(), v("div", {
|
|
585
636
|
class: C(["relative", b.$attrs.class])
|
|
586
637
|
}, [
|
|
587
|
-
e.hasInput ? (u(),
|
|
638
|
+
e.hasInput ? (u(), Z(ut, j({
|
|
588
639
|
key: 0,
|
|
589
640
|
modelValue: c.value,
|
|
590
641
|
onToggleDatepicker: p[0] || (p[0] = (h) => s.value = !s.value),
|
|
591
642
|
"onUpdate:modelValue": q
|
|
592
643
|
}, b.$attrs, {
|
|
593
644
|
ref_key: "input",
|
|
594
|
-
ref:
|
|
645
|
+
ref: i,
|
|
595
646
|
class: "w-full",
|
|
596
647
|
locale: e.locale
|
|
597
648
|
}), {
|
|
598
649
|
default: Q(() => [
|
|
599
|
-
|
|
650
|
+
B(b.$slots, "default")
|
|
600
651
|
]),
|
|
601
652
|
_: 3
|
|
602
|
-
}, 16, ["modelValue", "locale"])) :
|
|
603
|
-
|
|
653
|
+
}, 16, ["modelValue", "locale"])) : _("", !0),
|
|
654
|
+
r("div", j({ class: "z-10 bg-white shadow-md" }, g.value, {
|
|
604
655
|
ref_key: "calendar",
|
|
605
656
|
ref: y,
|
|
606
|
-
class: [o.value,
|
|
657
|
+
class: [o.value, m.value]
|
|
607
658
|
}), [
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
onClick: p[1] || (p[1] =
|
|
659
|
+
r("div", ht, [
|
|
660
|
+
r("div", pt, [
|
|
661
|
+
r("button", {
|
|
662
|
+
onClick: p[1] || (p[1] = P((h) => T(l.value.getMonth() - 1), ["stop"])),
|
|
612
663
|
class: "flex-shrink-0 text-vxvue-100 hover:text-vxvue-50"
|
|
613
664
|
}, [
|
|
614
|
-
Y(
|
|
665
|
+
Y(D(se), { class: "w-6 h-6" })
|
|
615
666
|
]),
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
onClick: p[2] || (p[2] =
|
|
667
|
+
r("span", null, S(l.value.toLocaleString(e.locale, { month: "long" })), 1),
|
|
668
|
+
r("button", {
|
|
669
|
+
onClick: p[2] || (p[2] = P((h) => T(l.value.getMonth() + 1), ["stop"])),
|
|
619
670
|
class: "flex-shrink-0 text-vxvue-100 hover:text-vxvue-50"
|
|
620
671
|
}, [
|
|
621
|
-
Y(
|
|
672
|
+
Y(D(ne), { class: "w-6 h-6" })
|
|
622
673
|
])
|
|
623
674
|
]),
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
onClick: p[3] || (p[3] =
|
|
675
|
+
r("div", gt, [
|
|
676
|
+
r("button", {
|
|
677
|
+
onClick: p[3] || (p[3] = P((h) => F(l.value.getFullYear() - 1), ["stop"])),
|
|
627
678
|
class: "flex-shrink-0 text-vxvue-100 hover:text-vxvue-50"
|
|
628
679
|
}, [
|
|
629
|
-
Y(
|
|
680
|
+
Y(D(se), { class: "w-6 h-6" })
|
|
630
681
|
]),
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
onClick: p[4] || (p[4] =
|
|
682
|
+
r("div", null, S(l.value.getFullYear()), 1),
|
|
683
|
+
r("button", {
|
|
684
|
+
onClick: p[4] || (p[4] = P((h) => F(l.value.getFullYear() + 1), ["stop"])),
|
|
634
685
|
class: "flex-shrink-0 text-vxvue-100 hover:text-vxvue-50"
|
|
635
686
|
}, [
|
|
636
|
-
Y(
|
|
687
|
+
Y(D(ne), { class: "w-6 h-6" })
|
|
637
688
|
])
|
|
638
689
|
])
|
|
639
690
|
]),
|
|
640
|
-
|
|
641
|
-
(u(!0),
|
|
691
|
+
r("div", bt, [
|
|
692
|
+
(u(!0), v(A, null, O(I.value, (h, M) => (u(), v("div", {
|
|
642
693
|
class: "py-2 text-center bg-gray-200",
|
|
643
694
|
key: M
|
|
644
695
|
}, S(h), 1))), 128)),
|
|
645
|
-
(u(!0),
|
|
696
|
+
(u(!0), v(A, null, O(w.value, (h) => (u(), v("div", {
|
|
646
697
|
class: C(["text-center", h.getMonth() - l.value.getMonth() === 0 ? "text-vxvue-700" : "text-gray-400"])
|
|
647
698
|
}, [
|
|
648
|
-
|
|
699
|
+
r("button", {
|
|
649
700
|
class: C([
|
|
650
701
|
{
|
|
651
702
|
"bg-vxvue-700 text-white": c.value && h.getTime() === c.value.getTime(),
|
|
652
|
-
"bg-gray-200": h.getTime() ===
|
|
703
|
+
"bg-gray-200": h.getTime() === D(a).getTime(),
|
|
653
704
|
"text-red-400": e.validFrom && e.validFrom > h || e.validUntil && e.validUntil < h
|
|
654
705
|
},
|
|
655
706
|
"py-2 px-3 rounded-sm"
|
|
656
707
|
]),
|
|
657
708
|
disabled: e.validFrom && e.validFrom > h || e.validUntil && e.validUntil < h,
|
|
658
|
-
onClick:
|
|
659
|
-
}, S(h.getDate()), 11,
|
|
709
|
+
onClick: P((M) => e.validFrom && e.validFrom > h || e.validUntil && e.validUntil < h ? null : U(h), ["stop"])
|
|
710
|
+
}, S(h.getDate()), 11, xt)
|
|
660
711
|
], 2))), 256))
|
|
661
712
|
])
|
|
662
713
|
], 16)
|
|
663
714
|
], 2));
|
|
664
715
|
}
|
|
665
|
-
},
|
|
716
|
+
}), yt = ["for"], wt = ["id", "multiple", "accept"], bl = {
|
|
666
717
|
__name: "form-file-button",
|
|
667
718
|
props: {
|
|
668
719
|
modelValue: { type: Array },
|
|
@@ -672,8 +723,8 @@ const vt = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, mt
|
|
|
672
723
|
id: { type: String, default: "form-file-button-" + Math.ceil(Math.random() * 1e3) }
|
|
673
724
|
},
|
|
674
725
|
emits: ["update:modelValue", "form-data"],
|
|
675
|
-
setup(e, { emit:
|
|
676
|
-
const t =
|
|
726
|
+
setup(e, { emit: d }) {
|
|
727
|
+
const t = d, n = e, a = (c) => {
|
|
677
728
|
const s = new FormData();
|
|
678
729
|
for (let o of c)
|
|
679
730
|
s.append(n.name, o, o.name);
|
|
@@ -685,84 +736,85 @@ const vt = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, mt
|
|
|
685
736
|
t("update:modelValue", o), t("form-data", a(o));
|
|
686
737
|
}
|
|
687
738
|
};
|
|
688
|
-
return (c, s) => (u(),
|
|
689
|
-
|
|
739
|
+
return (c, s) => (u(), v("label", { for: e.id }, [
|
|
740
|
+
B(c.$slots, "default", {}, () => [
|
|
690
741
|
z("Upload")
|
|
691
742
|
]),
|
|
692
|
-
|
|
743
|
+
r("input", {
|
|
693
744
|
type: "file",
|
|
694
745
|
id: e.id,
|
|
695
746
|
multiple: e.multiple,
|
|
696
747
|
accept: e.accept,
|
|
697
748
|
onChange: l,
|
|
698
749
|
class: "hidden"
|
|
699
|
-
}, null, 40,
|
|
700
|
-
], 8,
|
|
750
|
+
}, null, 40, wt)
|
|
751
|
+
], 8, yt));
|
|
701
752
|
}
|
|
702
|
-
},
|
|
753
|
+
}, kt = ["value"], $t = {
|
|
703
754
|
key: 0,
|
|
704
755
|
disabled: "",
|
|
705
756
|
value: ""
|
|
706
|
-
},
|
|
757
|
+
}, Ct = ["value", "selected"], St = {
|
|
707
758
|
__name: "form-select",
|
|
708
759
|
props: { options: Array, modelValue: [String, Number], disabledLabel: String },
|
|
709
760
|
emits: ["update:modelValue"],
|
|
710
|
-
setup(e, { emit:
|
|
711
|
-
const t =
|
|
712
|
-
return (n, a) => (u(),
|
|
761
|
+
setup(e, { emit: d }) {
|
|
762
|
+
const t = d;
|
|
763
|
+
return (n, a) => (u(), v("select", j(n.$attrs, {
|
|
713
764
|
value: e.modelValue,
|
|
714
765
|
class: "form-select",
|
|
715
766
|
onChange: a[0] || (a[0] = (l) => t("update:modelValue", l.target.value))
|
|
716
767
|
}), [
|
|
717
|
-
e.disabledLabel ? (u(),
|
|
718
|
-
(u(!0),
|
|
768
|
+
e.disabledLabel ? (u(), v("option", $t, S(e.disabledLabel), 1)) : _("", !0),
|
|
769
|
+
(u(!0), v(A, null, O(e.options, (l) => (u(), v("option", {
|
|
719
770
|
value: l.key !== void 0 ? l.key : l.label || l,
|
|
720
771
|
selected: (l.key !== void 0 ? l.key : l.label || l) === e.modelValue
|
|
721
|
-
}, S(l.label || l), 9,
|
|
722
|
-
], 16,
|
|
772
|
+
}, S(l.label || l), 9, Ct))), 256))
|
|
773
|
+
], 16, kt));
|
|
723
774
|
}
|
|
724
|
-
},
|
|
775
|
+
}, Mt = ["aria-checked", "aria-label"], Vt = ["checked"], xl = {
|
|
725
776
|
__name: "form-switch",
|
|
726
777
|
props: ["modelValue"],
|
|
727
778
|
emits: ["update:modelValue"],
|
|
728
|
-
setup(e, { emit:
|
|
729
|
-
const t = e, n =
|
|
779
|
+
setup(e, { emit: d }) {
|
|
780
|
+
const t = e, n = d, a = V(() => t.modelValue ? "bg-vxvue" : "bg-slate-200"), l = V(() => t.modelValue ? "translate-x-5" : "translate-x-0"), c = V(() => {
|
|
730
781
|
let s = Object.assign({}, K());
|
|
731
782
|
return delete s.class, s;
|
|
732
783
|
});
|
|
733
|
-
return (s, o) => (u(),
|
|
734
|
-
|
|
784
|
+
return (s, o) => (u(), v(A, null, [
|
|
785
|
+
r("label", {
|
|
735
786
|
class: C(s.$attrs.class)
|
|
736
787
|
}, [
|
|
737
|
-
|
|
788
|
+
r("span", {
|
|
738
789
|
class: C([a.value, "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"]),
|
|
739
790
|
role: "switch",
|
|
740
|
-
"aria-checked": !!e.modelValue
|
|
791
|
+
"aria-checked": !!e.modelValue,
|
|
792
|
+
"aria-label": s.$attrs["aria-label"]
|
|
741
793
|
}, [
|
|
742
|
-
|
|
794
|
+
r("span", {
|
|
743
795
|
"aria-hidden": "true",
|
|
744
|
-
class: C([l.value, "inline-block
|
|
796
|
+
class: C([l.value, "inline-block size-5 bg-white rounded-full ring-0 shadow transition duration-200 ease-in-out transform pointer-events-none"])
|
|
745
797
|
}, null, 2),
|
|
746
|
-
|
|
798
|
+
r("input", j({
|
|
747
799
|
class: "hidden",
|
|
748
800
|
value: "1",
|
|
749
801
|
type: "checkbox",
|
|
750
|
-
onChange: o[0] || (o[0] = (
|
|
751
|
-
}, c.value, { checked: e.modelValue }), null, 16,
|
|
752
|
-
], 10,
|
|
802
|
+
onChange: o[0] || (o[0] = (m) => n("update:modelValue", m.target.checked))
|
|
803
|
+
}, c.value, { checked: e.modelValue }), null, 16, Vt)
|
|
804
|
+
], 10, Mt)
|
|
753
805
|
], 2),
|
|
754
|
-
|
|
806
|
+
B(s.$slots, "default")
|
|
755
807
|
], 64));
|
|
756
808
|
}
|
|
757
|
-
}, be = (e,
|
|
809
|
+
}, be = (e, d) => {
|
|
758
810
|
const t = e.__vccOpts || e;
|
|
759
|
-
for (const [n, a] of
|
|
811
|
+
for (const [n, a] of d)
|
|
760
812
|
t[n] = a;
|
|
761
813
|
return t;
|
|
762
|
-
},
|
|
814
|
+
}, Dt = (e) => (Me("data-v-62f8007a"), e = e(), Ve(), e), _t = {
|
|
763
815
|
"aria-live": "assertive",
|
|
764
816
|
class: "flex fixed inset-0 z-50 items-start py-6 px-4 pointer-events-none sm:p-6"
|
|
765
|
-
},
|
|
817
|
+
}, At = { class: "flex flex-col items-center space-y-4 w-full" }, Bt = { class: "p-4" }, Pt = { class: "flex items-start" }, Lt = { class: "flex-shrink-0" }, Ft = { class: "flex-1 pt-0.5 ml-3 w-0" }, It = { class: "font-bold" }, Tt = { class: "mt-1" }, Ot = { class: "flex flex-shrink-0 ml-4" }, jt = /* @__PURE__ */ Dt(() => /* @__PURE__ */ r("span", { class: "sr-only" }, "Close", -1)), Yt = /* @__PURE__ */ Object.assign({
|
|
766
818
|
inheritAttrs: !1
|
|
767
819
|
}, {
|
|
768
820
|
__name: "message-toast",
|
|
@@ -773,63 +825,63 @@ const vt = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, mt
|
|
|
773
825
|
active: { type: Boolean, default: !1 }
|
|
774
826
|
},
|
|
775
827
|
emits: ["timeout", "close"],
|
|
776
|
-
setup(e, { emit:
|
|
777
|
-
const t = e, n =
|
|
828
|
+
setup(e, { emit: d }) {
|
|
829
|
+
const t = e, n = d, a = x(null), l = V(() => typeof t.message == "string" ? [t.message] : t.message), c = () => {
|
|
778
830
|
window.clearTimeout(a.value), t.active && t.timeout && (a.value = window.setTimeout(() => {
|
|
779
831
|
n("timeout");
|
|
780
832
|
}, t.timeout));
|
|
781
833
|
};
|
|
782
|
-
return H(() => t.active, c), ue(c), (s, o) => (u(),
|
|
783
|
-
|
|
834
|
+
return H(() => t.active, c), ue(c), (s, o) => (u(), v("div", _t, [
|
|
835
|
+
r("div", At, [
|
|
784
836
|
Y(oe, { name: "messagetoast-fade" }, {
|
|
785
837
|
default: Q(() => [
|
|
786
|
-
e.active ? (u(),
|
|
838
|
+
e.active ? (u(), v("div", {
|
|
787
839
|
key: 0,
|
|
788
840
|
class: C(["overflow-hidden w-full max-w-sm rounded-md ring-1 ring-black ring-opacity-5 shadow-lg pointer-events-auto", s.$attrs.class])
|
|
789
841
|
}, [
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
842
|
+
r("div", Bt, [
|
|
843
|
+
r("div", Pt, [
|
|
844
|
+
r("div", Lt, [
|
|
845
|
+
B(s.$slots, "icon", {}, void 0, !0)
|
|
794
846
|
]),
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
847
|
+
r("div", Ft, [
|
|
848
|
+
r("p", It, [
|
|
849
|
+
B(s.$slots, "title", {}, () => [
|
|
798
850
|
z(S(e.title), 1)
|
|
799
851
|
], !0)
|
|
800
852
|
]),
|
|
801
|
-
(u(!0),
|
|
802
|
-
|
|
803
|
-
z(S(
|
|
853
|
+
(u(!0), v(A, null, O(l.value, (m) => (u(), v("p", Tt, [
|
|
854
|
+
B(s.$slots, "default", {}, () => [
|
|
855
|
+
z(S(m), 1)
|
|
804
856
|
], !0)
|
|
805
857
|
]))), 256))
|
|
806
858
|
]),
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
onClick: o[0] || (o[0] = (
|
|
859
|
+
r("div", Ot, [
|
|
860
|
+
r("button", {
|
|
861
|
+
onClick: o[0] || (o[0] = (m) => n("close")),
|
|
810
862
|
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"
|
|
811
863
|
}, [
|
|
812
|
-
|
|
813
|
-
Y(
|
|
864
|
+
jt,
|
|
865
|
+
Y(D(ft), { class: "size-5" })
|
|
814
866
|
])
|
|
815
867
|
])
|
|
816
868
|
])
|
|
817
869
|
])
|
|
818
|
-
], 2)) :
|
|
870
|
+
], 2)) : _("", !0)
|
|
819
871
|
]),
|
|
820
872
|
_: 3
|
|
821
873
|
})
|
|
822
874
|
])
|
|
823
875
|
]));
|
|
824
876
|
}
|
|
825
|
-
}),
|
|
877
|
+
}), yl = /* @__PURE__ */ be(Yt, [["__scopeId", "data-v-62f8007a"]]), Et = {
|
|
826
878
|
key: 0,
|
|
827
879
|
class: "fixed inset-0 z-[9998] bg-white/50 backdrop-blur-sm",
|
|
828
880
|
"aria-hidden": "true"
|
|
829
|
-
},
|
|
881
|
+
}, Nt = {
|
|
830
882
|
key: 0,
|
|
831
883
|
class: "fixed inset-0 z-[9999]"
|
|
832
|
-
},
|
|
884
|
+
}, zt = { class: "flex justify-center items-center h-screen" }, wl = {
|
|
833
885
|
__name: "modal",
|
|
834
886
|
props: {
|
|
835
887
|
show: Boolean,
|
|
@@ -838,38 +890,38 @@ const vt = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, mt
|
|
|
838
890
|
contentClass: { type: String, default: "" }
|
|
839
891
|
},
|
|
840
892
|
emits: ["clicked-outside"],
|
|
841
|
-
setup(e, { emit:
|
|
842
|
-
const t =
|
|
843
|
-
return
|
|
844
|
-
e.show ? (u(),
|
|
893
|
+
setup(e, { emit: d }) {
|
|
894
|
+
const t = d, n = x(null);
|
|
895
|
+
return ce(n, () => t("clicked-outside")), (a, l) => (u(), v(A, null, [
|
|
896
|
+
e.show ? (u(), v("div", Et)) : _("", !0),
|
|
845
897
|
Y(oe, { name: "appear" }, {
|
|
846
898
|
default: Q(() => [
|
|
847
|
-
e.show ? (u(),
|
|
848
|
-
|
|
849
|
-
|
|
899
|
+
e.show ? (u(), v("div", Nt, [
|
|
900
|
+
r("div", zt, [
|
|
901
|
+
r("div", {
|
|
850
902
|
class: C(["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]),
|
|
851
903
|
ref_key: "container",
|
|
852
904
|
ref: n
|
|
853
905
|
}, [
|
|
854
|
-
|
|
906
|
+
r("div", {
|
|
855
907
|
class: C(e.headerClass)
|
|
856
908
|
}, [
|
|
857
|
-
|
|
909
|
+
B(a.$slots, "title")
|
|
858
910
|
], 2),
|
|
859
|
-
|
|
911
|
+
r("div", {
|
|
860
912
|
class: C(["overflow-y-auto h-full pb-4 mt-16", e.contentClass])
|
|
861
913
|
}, [
|
|
862
|
-
|
|
914
|
+
B(a.$slots, "default")
|
|
863
915
|
], 2)
|
|
864
916
|
], 2)
|
|
865
917
|
])
|
|
866
|
-
])) :
|
|
918
|
+
])) : _("", !0)
|
|
867
919
|
]),
|
|
868
920
|
_: 3
|
|
869
921
|
})
|
|
870
922
|
], 64));
|
|
871
923
|
}
|
|
872
|
-
},
|
|
924
|
+
}, Rt = { class: "flex justify-between items-center px-4 sm:px-0" }, Ht = { class: "flex flex-1 -mt-px w-0" }, Ut = { class: "hidden md:flex md:-mt-px" }, Wt = { class: "flex flex-1 justify-end -mt-px w-0" }, kl = {
|
|
873
925
|
__name: "pagination",
|
|
874
926
|
props: {
|
|
875
927
|
page: { type: Number, default: 1 },
|
|
@@ -894,39 +946,39 @@ const vt = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, mt
|
|
|
894
946
|
}
|
|
895
947
|
},
|
|
896
948
|
emits: ["update:page"],
|
|
897
|
-
setup(e, { emit:
|
|
898
|
-
const t =
|
|
899
|
-
let
|
|
949
|
+
setup(e, { emit: d }) {
|
|
950
|
+
const t = d, n = e, a = x(Math.ceil(n.total / n.perPage)), l = x(null), c = V(() => n.markerPosition === "above" ? "border-t-2 pt-4" : "border-b-2 pb-4"), s = V(() => {
|
|
951
|
+
let i = [1];
|
|
900
952
|
if (n.showAllPages || a.value <= 7) {
|
|
901
953
|
for (let y = 2; y <= a.value; ++y)
|
|
902
|
-
|
|
903
|
-
return
|
|
954
|
+
i.push(y);
|
|
955
|
+
return i;
|
|
904
956
|
}
|
|
905
|
-
return l.value >= a.value ?
|
|
957
|
+
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;
|
|
906
958
|
}), o = () => {
|
|
907
959
|
l.value > 1 && t("update:page", l.value - 1);
|
|
908
|
-
},
|
|
960
|
+
}, m = () => {
|
|
909
961
|
l.value < a.value && t("update:page", l.value + 1);
|
|
910
962
|
};
|
|
911
|
-
return H(() => n.page, (
|
|
963
|
+
return H(() => n.page, (i) => l.value = Math.min(Math.max(i, 1), a.value), { immediate: !0 }), H(() => n.perPage, (i) => {
|
|
912
964
|
a.value = Math.ceil(n.total / n.perPage), t("update:page", 1);
|
|
913
|
-
}), H(() => n.total, (
|
|
965
|
+
}), H(() => n.total, (i) => {
|
|
914
966
|
a.value = Math.ceil(n.total / n.perPage), l.value > a.value && t("update:page", 1);
|
|
915
|
-
}), (
|
|
916
|
-
|
|
917
|
-
e.showNavButtons ? (u(),
|
|
967
|
+
}), (i, y) => (u(), v("nav", Rt, [
|
|
968
|
+
r("div", Ht, [
|
|
969
|
+
e.showNavButtons ? (u(), v("a", {
|
|
918
970
|
key: 0,
|
|
919
|
-
onClick:
|
|
971
|
+
onClick: P(o, ["prevent"]),
|
|
920
972
|
href: "#",
|
|
921
973
|
class: C(["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 }, c.value]])
|
|
922
974
|
}, [
|
|
923
|
-
Y(
|
|
975
|
+
Y(D(se), { class: "size-5" }),
|
|
924
976
|
z(" " + S(e.prevText), 1)
|
|
925
|
-
],
|
|
977
|
+
], 2)) : _("", !0)
|
|
926
978
|
]),
|
|
927
|
-
|
|
928
|
-
(u(!0),
|
|
929
|
-
onClick:
|
|
979
|
+
r("div", Ut, [
|
|
980
|
+
(u(!0), v(A, null, O(s.value, (f, g) => (u(), Z(ie(f !== "dots" ? "a" : "span"), {
|
|
981
|
+
onClick: P((w) => f !== "dots" ? t("update:page", f) : null, ["prevent"]),
|
|
930
982
|
key: g,
|
|
931
983
|
href: f !== "dots" ? "#" : null,
|
|
932
984
|
class: C(["inline-flex items-center px-4 text-sm font-medium", [{
|
|
@@ -941,143 +993,146 @@ const vt = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, mt
|
|
|
941
993
|
_: 2
|
|
942
994
|
}, 1032, ["onClick", "href", "class"]))), 128))
|
|
943
995
|
]),
|
|
944
|
-
|
|
945
|
-
e.showNavButtons ? (u(),
|
|
996
|
+
r("div", Wt, [
|
|
997
|
+
e.showNavButtons ? (u(), v("a", {
|
|
946
998
|
key: 0,
|
|
947
|
-
onClick:
|
|
999
|
+
onClick: P(m, ["prevent"]),
|
|
948
1000
|
href: "#",
|
|
949
1001
|
class: C(["inline-flex items-center pl-1 text-sm font-medium text-gray-500 border-transparent hover:text-gray-700 hover:border-gray-300", [c.value, { "cursor-default pointer-events-none": l.value >= a.value }]])
|
|
950
1002
|
}, [
|
|
951
1003
|
z(S(e.nextText) + " ", 1),
|
|
952
|
-
Y(
|
|
953
|
-
],
|
|
1004
|
+
Y(D(ne), { class: "size-5" })
|
|
1005
|
+
], 2)) : _("", !0)
|
|
954
1006
|
])
|
|
955
1007
|
]));
|
|
956
1008
|
}
|
|
957
1009
|
};
|
|
958
|
-
function
|
|
959
|
-
return u(),
|
|
1010
|
+
function Zt(e, d) {
|
|
1011
|
+
return u(), v("svg", {
|
|
960
1012
|
xmlns: "http://www.w3.org/2000/svg",
|
|
961
1013
|
fill: "none",
|
|
962
1014
|
viewBox: "0 0 24 24",
|
|
963
1015
|
"stroke-width": "1.5",
|
|
964
1016
|
stroke: "currentColor",
|
|
965
|
-
"aria-hidden": "true"
|
|
1017
|
+
"aria-hidden": "true",
|
|
1018
|
+
"data-slot": "icon"
|
|
966
1019
|
}, [
|
|
967
|
-
|
|
1020
|
+
r("path", {
|
|
968
1021
|
"stroke-linecap": "round",
|
|
969
1022
|
"stroke-linejoin": "round",
|
|
970
|
-
d: "M3.98 8.223A10.477 10.477 0
|
|
1023
|
+
d: "M3.98 8.223A10.477 10.477 0 0 0 1.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.451 10.451 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.522 10.522 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88"
|
|
971
1024
|
})
|
|
972
1025
|
]);
|
|
973
1026
|
}
|
|
974
|
-
function qt(e,
|
|
975
|
-
return u(),
|
|
1027
|
+
function qt(e, d) {
|
|
1028
|
+
return u(), v("svg", {
|
|
976
1029
|
xmlns: "http://www.w3.org/2000/svg",
|
|
977
1030
|
fill: "none",
|
|
978
1031
|
viewBox: "0 0 24 24",
|
|
979
1032
|
"stroke-width": "1.5",
|
|
980
1033
|
stroke: "currentColor",
|
|
981
|
-
"aria-hidden": "true"
|
|
1034
|
+
"aria-hidden": "true",
|
|
1035
|
+
"data-slot": "icon"
|
|
982
1036
|
}, [
|
|
983
|
-
|
|
1037
|
+
r("path", {
|
|
984
1038
|
"stroke-linecap": "round",
|
|
985
1039
|
"stroke-linejoin": "round",
|
|
986
|
-
d: "M2.036 12.322a1.012 1.012 0
|
|
1040
|
+
d: "M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z"
|
|
987
1041
|
}),
|
|
988
|
-
|
|
1042
|
+
r("path", {
|
|
989
1043
|
"stroke-linecap": "round",
|
|
990
1044
|
"stroke-linejoin": "round",
|
|
991
|
-
d: "M15 12a3 3 0
|
|
1045
|
+
d: "M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"
|
|
992
1046
|
})
|
|
993
1047
|
]);
|
|
994
1048
|
}
|
|
995
|
-
const Kt = ["value", "type"],
|
|
1049
|
+
const Kt = ["value", "type"], $l = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
996
1050
|
__name: "password-input",
|
|
997
1051
|
props: ["modelValue"],
|
|
998
1052
|
emits: ["update:modelValue"],
|
|
999
|
-
setup(e, { emit:
|
|
1000
|
-
const t =
|
|
1053
|
+
setup(e, { emit: d }) {
|
|
1054
|
+
const t = d, n = x(!1), a = V(() => {
|
|
1001
1055
|
let l = Object.assign({}, K());
|
|
1002
1056
|
return delete l.class, l;
|
|
1003
1057
|
});
|
|
1004
|
-
return (l, c) => (u(),
|
|
1058
|
+
return (l, c) => (u(), v("div", {
|
|
1005
1059
|
class: C("inline-block relative " + K().class)
|
|
1006
1060
|
}, [
|
|
1007
|
-
|
|
1061
|
+
r("input", j({
|
|
1008
1062
|
value: e.modelValue,
|
|
1009
1063
|
type: n.value ? "text" : "password",
|
|
1010
1064
|
onInput: c[0] || (c[0] = (s) => t("update:modelValue", s.target.value))
|
|
1011
1065
|
}, a.value, { class: "block pr-10 w-full form-input peer" }), null, 16, Kt),
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1066
|
+
r("button", {
|
|
1067
|
+
class: "flex absolute inset-y-0 right-0 items-center pr-3 text-brand-700 hover:text-brand",
|
|
1068
|
+
"aria-label": "show-password-toggle",
|
|
1069
|
+
onClick: c[1] || (c[1] = P((s) => n.value = !n.value, ["stop"]))
|
|
1015
1070
|
}, [
|
|
1016
|
-
n.value ? (u(),
|
|
1071
|
+
n.value ? (u(), Z(D(Zt), {
|
|
1017
1072
|
key: 0,
|
|
1018
|
-
class: "
|
|
1019
|
-
})) : (u(),
|
|
1073
|
+
class: "size-5"
|
|
1074
|
+
})) : (u(), Z(D(qt), {
|
|
1020
1075
|
key: 1,
|
|
1021
|
-
class: "
|
|
1076
|
+
class: "size-5"
|
|
1022
1077
|
}))
|
|
1023
1078
|
]),
|
|
1024
|
-
|
|
1079
|
+
B(l.$slots, "default")
|
|
1025
1080
|
], 2));
|
|
1026
1081
|
}
|
|
1027
|
-
}), Gt = { class: "flex items-center pb-1" }, Xt = ["id", "checked"],
|
|
1082
|
+
}), Gt = { class: "flex items-center pb-1" }, Xt = ["id", "checked"], Jt = ["for"], Qt = { key: 1 }, el = ["href"], tl = {
|
|
1028
1083
|
key: 0,
|
|
1029
1084
|
class: "ml-6"
|
|
1030
|
-
},
|
|
1085
|
+
}, Cl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
1031
1086
|
__name: "simple-tree",
|
|
1032
1087
|
props: { branch: { type: Object, default: {} } },
|
|
1033
1088
|
emits: ["branch-selected", "expand"],
|
|
1034
|
-
setup(e, { emit:
|
|
1035
|
-
const t = e, n =
|
|
1089
|
+
setup(e, { emit: d }) {
|
|
1090
|
+
const t = e, n = d, a = x(!1);
|
|
1036
1091
|
return ue(() => {
|
|
1037
1092
|
t.branch.current && n("expand", !0);
|
|
1038
1093
|
}), (l, c) => {
|
|
1039
1094
|
const s = De("simple-tree", !0);
|
|
1040
|
-
return u(),
|
|
1095
|
+
return u(), v("div", {
|
|
1041
1096
|
class: C([!e.branch.branches || !e.branch.branches.length ? "terminates" : "", l.$attrs.class])
|
|
1042
1097
|
}, [
|
|
1043
|
-
|
|
1044
|
-
e.branch.branches && e.branch.branches.length ? (u(),
|
|
1045
|
-
|
|
1098
|
+
r("div", Gt, [
|
|
1099
|
+
e.branch.branches && e.branch.branches.length ? (u(), v(A, { key: 0 }, [
|
|
1100
|
+
r("input", {
|
|
1046
1101
|
type: "checkbox",
|
|
1047
1102
|
id: "branch-" + e.branch.id,
|
|
1048
1103
|
onClick: c[0] || (c[0] = (o) => a.value = !a.value),
|
|
1049
1104
|
checked: a.value,
|
|
1050
1105
|
class: "hidden"
|
|
1051
1106
|
}, null, 8, Xt),
|
|
1052
|
-
|
|
1107
|
+
r("label", {
|
|
1053
1108
|
for: "branch-" + e.branch.id,
|
|
1054
1109
|
class: "mr-2"
|
|
1055
1110
|
}, [
|
|
1056
|
-
(u(),
|
|
1057
|
-
], 8,
|
|
1058
|
-
], 64)) :
|
|
1059
|
-
e.branch.current ? (u(),
|
|
1111
|
+
(u(), Z(ie(a.value ? D(vt) : D(mt)), { class: "w-4 h-4 border" }))
|
|
1112
|
+
], 8, Jt)
|
|
1113
|
+
], 64)) : _("", !0),
|
|
1114
|
+
e.branch.current ? (u(), v("strong", Qt, S(e.branch.label), 1)) : (u(), v("a", {
|
|
1060
1115
|
key: 2,
|
|
1061
1116
|
href: e.branch.path,
|
|
1062
|
-
onClick: c[1] || (c[1] =
|
|
1063
|
-
}, S(e.branch.label), 9,
|
|
1117
|
+
onClick: c[1] || (c[1] = P((o) => n("branch-selected", e.branch), ["prevent"]))
|
|
1118
|
+
}, S(e.branch.label), 9, el))
|
|
1064
1119
|
]),
|
|
1065
|
-
e.branch.branches && e.branch.branches.length ?
|
|
1066
|
-
(u(!0),
|
|
1120
|
+
e.branch.branches && e.branch.branches.length ? fe((u(), v("ul", tl, [
|
|
1121
|
+
(u(!0), v(A, null, O(e.branch.branches, (o) => (u(), Z(s, {
|
|
1067
1122
|
branch: o,
|
|
1068
1123
|
key: o.id,
|
|
1069
|
-
onBranchSelected: c[2] || (c[2] = (
|
|
1070
|
-
onExpand: c[3] || (c[3] = (
|
|
1071
|
-
a.value =
|
|
1124
|
+
onBranchSelected: c[2] || (c[2] = (m) => n("branch-selected", m)),
|
|
1125
|
+
onExpand: c[3] || (c[3] = (m) => {
|
|
1126
|
+
a.value = m, n("expand", m);
|
|
1072
1127
|
})
|
|
1073
1128
|
}, null, 8, ["branch"]))), 128))
|
|
1074
1129
|
], 512)), [
|
|
1075
1130
|
[_e, a.value]
|
|
1076
|
-
]) :
|
|
1131
|
+
]) : _("", !0)
|
|
1077
1132
|
], 2);
|
|
1078
1133
|
};
|
|
1079
1134
|
}
|
|
1080
|
-
}),
|
|
1135
|
+
}), ll = ["aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext"], al = ["id"], sl = ["id", "aria-label"], Sl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
1081
1136
|
__name: "slider",
|
|
1082
1137
|
props: {
|
|
1083
1138
|
min: { type: Number, default: 0 },
|
|
@@ -1085,41 +1140,38 @@ const Kt = ["value", "type"], Cl = /* @__PURE__ */ Object.assign({ inheritAttrs:
|
|
|
1085
1140
|
vertical: Boolean,
|
|
1086
1141
|
disabled: Boolean,
|
|
1087
1142
|
modelValue: { type: [Number, Array], validator(e) {
|
|
1088
|
-
return typeof e == "number" || e.every((
|
|
1143
|
+
return typeof e == "number" || e.every((d) => typeof d == "number");
|
|
1089
1144
|
} }
|
|
1090
1145
|
},
|
|
1091
1146
|
emits: ["update:modelValue"],
|
|
1092
|
-
setup(e, { emit:
|
|
1093
|
-
const t = e, n =
|
|
1147
|
+
setup(e, { emit: d }) {
|
|
1148
|
+
const t = e, n = d, a = K(), l = { x: null, y: null }, c = { w: null, h: null };
|
|
1094
1149
|
let s = !1;
|
|
1095
|
-
const o = x(null),
|
|
1150
|
+
const o = x(null), m = x(0), i = V(() => {
|
|
1096
1151
|
const p = t.max, h = t.min;
|
|
1097
|
-
return t.modelValue instanceof Array ? t.modelValue.map((M) => Math.max(Math.min(M, p), h) * 100 / (p - h)) : Math.max(Math.min(t.modelValue, p), h) * 100 / (p - h);
|
|
1152
|
+
return t.modelValue instanceof Array ? t.modelValue.map((M) => (Math.max(Math.min(M, p), h) - h) * 100 / (p - h)) : (Math.max(Math.min(t.modelValue, p), h) - h) * 100 / (p - h);
|
|
1098
1153
|
}), y = V(() => {
|
|
1099
1154
|
if (t.modelValue instanceof Array) {
|
|
1100
|
-
const p = Math.min(...
|
|
1155
|
+
const p = Math.min(...i.value) + "%", h = Math.max(...i.value) - Math.min(...i.value) + "%";
|
|
1101
1156
|
return t.vertical ? { bottom: p, height: h } : { left: p, width: h };
|
|
1102
1157
|
}
|
|
1103
|
-
return t.vertical ? { bottom: 0, height:
|
|
1158
|
+
return t.vertical ? { bottom: 0, height: i.value + "%" } : { width: i.value + "%" };
|
|
1104
1159
|
}), f = x({
|
|
1105
|
-
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
|
|
1106
|
-
tabindex: 0
|
|
1107
|
-
role: "slider",
|
|
1108
|
-
"aria-valuemin": t.min,
|
|
1109
|
-
"aria-valuemax": t.max
|
|
1160
|
+
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"),
|
|
1161
|
+
tabindex: 0
|
|
1110
1162
|
}), g = (p) => {
|
|
1111
1163
|
let h = parseFloat(p.toFixed(10));
|
|
1112
1164
|
if (h = Math.min(t.max, Math.max(t.min, h)), t.modelValue instanceof Array) {
|
|
1113
1165
|
let M = [...t.modelValue];
|
|
1114
|
-
M[
|
|
1166
|
+
M[m.value] = h, n("update:modelValue", M);
|
|
1115
1167
|
} else
|
|
1116
1168
|
n("update:modelValue", h);
|
|
1117
1169
|
}, w = (p) => {
|
|
1118
|
-
const { pageX: h, pageY: M } = p.touches ? p.touches[0] : p,
|
|
1119
|
-
g(Math.floor((t.max - t.min) *
|
|
1170
|
+
const { pageX: h, pageY: M } = p.touches ? p.touches[0] : p, L = t.vertical ? (-M + l.y) / c.h : (h - l.x) / c.w;
|
|
1171
|
+
g(Math.floor((t.max - t.min) * L + t.min));
|
|
1120
1172
|
}, I = () => {
|
|
1121
|
-
const { clientLeft: p, clientTop: h, scrollLeft: M, scrollTop:
|
|
1122
|
-
l.x = E.left + M - p, l.y = E.bottom +
|
|
1173
|
+
const { clientLeft: p, clientTop: h, scrollLeft: M, scrollTop: L } = document.documentElement, E = o.value.getBoundingClientRect();
|
|
1174
|
+
l.x = E.left + M - p, l.y = E.bottom + L - h, c.w = o.value.offsetWidth, c.h = o.value.offsetHeight;
|
|
1123
1175
|
}, T = (p) => {
|
|
1124
1176
|
s && (p.preventDefault(), w(p));
|
|
1125
1177
|
}, F = (p) => {
|
|
@@ -1128,7 +1180,7 @@ const Kt = ["value", "type"], Cl = /* @__PURE__ */ Object.assign({ inheritAttrs:
|
|
|
1128
1180
|
s && (s = !1, document.removeEventListener("mousemove", T), document.removeEventListener("mouseup", U));
|
|
1129
1181
|
}, q = (p) => {
|
|
1130
1182
|
p.keyCode >= 33 && p.keyCode <= 40 && p.preventDefault();
|
|
1131
|
-
const h = t.modelValue[
|
|
1183
|
+
const h = t.modelValue[m.value] ?? t.modelValue;
|
|
1132
1184
|
switch (p.keyCode) {
|
|
1133
1185
|
case 37:
|
|
1134
1186
|
case 40:
|
|
@@ -1153,74 +1205,67 @@ const Kt = ["value", "type"], Cl = /* @__PURE__ */ Object.assign({ inheritAttrs:
|
|
|
1153
1205
|
}, b = (p) => {
|
|
1154
1206
|
I(), w(p);
|
|
1155
1207
|
};
|
|
1156
|
-
return (p, h) => (u(),
|
|
1208
|
+
return (p, h) => (u(), v("div", j({
|
|
1157
1209
|
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"],
|
|
1158
1210
|
ref_key: "track",
|
|
1159
|
-
ref: o
|
|
1160
|
-
|
|
1211
|
+
ref: o,
|
|
1212
|
+
role: "slider",
|
|
1213
|
+
"aria-label": "slider-thumb",
|
|
1214
|
+
"aria-valuemin": e.min,
|
|
1215
|
+
"aria-valuemax": t.max,
|
|
1216
|
+
"aria-valuenow": e.modelValue[0] ?? e.modelValue,
|
|
1217
|
+
"aria-valuetext": e.modelValue
|
|
1218
|
+
}, le(e.disabled ? {} : {
|
|
1161
1219
|
click: b
|
|
1162
1220
|
}, !0)), [
|
|
1163
|
-
e.disabled ?
|
|
1221
|
+
e.disabled ? _("", !0) : (u(), v("div", {
|
|
1164
1222
|
key: 0,
|
|
1165
1223
|
class: C(["absolute bg-vxvue", e.vertical ? "w-full rounded-t-full rounded-b-full" : "h-full rounded-r-full rounded-l-full"]),
|
|
1166
1224
|
style: Ae(y.value)
|
|
1167
1225
|
}, null, 6)),
|
|
1168
|
-
e.modelValue.length ? (u(!0),
|
|
1169
|
-
id:
|
|
1170
|
-
style: e.vertical ? { bottom:
|
|
1171
|
-
"aria-
|
|
1172
|
-
},
|
|
1173
|
-
focus: () =>
|
|
1226
|
+
e.modelValue.length ? (u(!0), v(A, { key: 2 }, O(e.modelValue, (M, L) => (u(), v("button", j({
|
|
1227
|
+
id: L ? null : D(a).id,
|
|
1228
|
+
style: e.vertical ? { bottom: i.value[L] + "%" } : { left: i.value[L] + "%" },
|
|
1229
|
+
"aria-label": "slider-thumb-" + (L + 1)
|
|
1230
|
+
}, le(e.disabled ? {} : {
|
|
1231
|
+
focus: () => m.value = L,
|
|
1174
1232
|
keydown: q,
|
|
1175
1233
|
mousedown: (E) => {
|
|
1176
|
-
|
|
1234
|
+
m.value = L, F(E);
|
|
1177
1235
|
},
|
|
1178
1236
|
touchstart: (E) => {
|
|
1179
|
-
|
|
1237
|
+
m.value = L, F(E);
|
|
1180
1238
|
},
|
|
1181
1239
|
touchmove: T,
|
|
1182
1240
|
touchend: U
|
|
1183
|
-
}, !0), f.value), null, 16,
|
|
1241
|
+
}, !0), f.value), null, 16, sl))), 256)) : (u(), v("button", j({
|
|
1184
1242
|
key: 1,
|
|
1185
|
-
id:
|
|
1186
|
-
style: e.vertical ? { bottom:
|
|
1187
|
-
"aria-
|
|
1188
|
-
},
|
|
1189
|
-
focus: () =>
|
|
1243
|
+
id: D(a).id,
|
|
1244
|
+
style: e.vertical ? { bottom: i.value + "%" } : { left: i.value + "%" },
|
|
1245
|
+
"aria-label": "slider-thumb"
|
|
1246
|
+
}, le(e.disabled ? {} : {
|
|
1247
|
+
focus: () => m.value = 0,
|
|
1190
1248
|
keydown: q,
|
|
1191
1249
|
mousedown: (M) => {
|
|
1192
|
-
|
|
1250
|
+
m.value = 0, F(M);
|
|
1193
1251
|
},
|
|
1194
1252
|
touchstart: (M) => {
|
|
1195
|
-
|
|
1253
|
+
m.value = 0, F(M);
|
|
1196
1254
|
},
|
|
1197
1255
|
touchmove: T,
|
|
1198
1256
|
touchend: U
|
|
1199
|
-
}, !0), f.value), null, 16,
|
|
1200
|
-
], 16));
|
|
1257
|
+
}, !0), f.value), null, 16, al))
|
|
1258
|
+
], 16, ll));
|
|
1201
1259
|
}
|
|
1202
|
-
}),
|
|
1203
|
-
key: 0,
|
|
1204
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1205
|
-
class: "flex-shrink-0 ml-2 w-4 h-4",
|
|
1206
|
-
fill: "none",
|
|
1207
|
-
viewBox: "0 0 24 24",
|
|
1208
|
-
stroke: "currentColor"
|
|
1209
|
-
}, rl = ["d"], ul = {
|
|
1210
|
-
key: 1,
|
|
1211
|
-
"stroke-linecap": "round",
|
|
1212
|
-
"stroke-linejoin": "round",
|
|
1213
|
-
"stroke-width": "2",
|
|
1214
|
-
d: "M8 9l4-4 4 4m0 6l-4 4-4-4"
|
|
1215
|
-
}, il = {
|
|
1260
|
+
}), nl = { class: "text-white bg-slate-700" }, ol = ["onClick"], rl = { class: "flex items-center space-x-1" }, ul = {
|
|
1216
1261
|
__name: "sortable",
|
|
1217
1262
|
props: {
|
|
1218
1263
|
columns: {
|
|
1219
1264
|
type: Array,
|
|
1220
1265
|
required: !0,
|
|
1221
1266
|
validator: (e) => {
|
|
1222
|
-
for (const
|
|
1223
|
-
if (
|
|
1267
|
+
for (const d of e)
|
|
1268
|
+
if (d.label === void 0 || d.prop === void 0)
|
|
1224
1269
|
return !1;
|
|
1225
1270
|
return !0;
|
|
1226
1271
|
}
|
|
@@ -1233,79 +1278,74 @@ const Kt = ["value", "type"], Cl = /* @__PURE__ */ Object.assign({ inheritAttrs:
|
|
|
1233
1278
|
keyProperty: { type: String, default: "key" }
|
|
1234
1279
|
},
|
|
1235
1280
|
emits: ["before-sort", "after-sort"],
|
|
1236
|
-
setup(e, { emit:
|
|
1237
|
-
const t = e, n =
|
|
1281
|
+
setup(e, { emit: d }) {
|
|
1282
|
+
const t = e, n = d, a = x(t.sortProp), l = x(t.sortDirection), c = V(() => {
|
|
1238
1283
|
let o = t.rows.slice();
|
|
1239
|
-
const
|
|
1240
|
-
return
|
|
1284
|
+
const m = t.columns.find(({ prop: i }) => i === a.value);
|
|
1285
|
+
return m && (l.value === "asc" && m.sortAscFunction ? o.sort(m.sortAscFunction) : l.value === "desc" && m.sortDescFunction ? o.sort(m.sortDescFunction) : o.sort((i, y) => i[a.value] < y[a.value] ? l.value === "asc" ? -1 : 1 : i[a.value] > y[a.value] ? l.value === "asc" ? 1 : -1 : 0)), o.slice(t.offset || 0, (t.offset || 0) + (t.count || o.length));
|
|
1241
1286
|
}), s = (o) => {
|
|
1242
1287
|
n("before-sort", { prop: a.value, dir: l.value }), a.value === o ? l.value = l.value === "asc" ? "desc" : "asc" : (a.value = o, l.value = l.value || "asc"), re(() => n("after-sort", { prop: a.value, dir: l.value }));
|
|
1243
1288
|
};
|
|
1244
|
-
return (o,
|
|
1289
|
+
return (o, m) => (u(), v("table", {
|
|
1245
1290
|
class: C(o.$attrs.class || "w-full divide-y divide-y-slate-900 table-fixed")
|
|
1246
1291
|
}, [
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
(u(!0),
|
|
1292
|
+
r("thead", nl, [
|
|
1293
|
+
r("tr", null, [
|
|
1294
|
+
(u(!0), v(A, null, O(e.columns, (i) => (u(), v("th", {
|
|
1250
1295
|
scope: "col",
|
|
1251
1296
|
class: C(["py-3 px-6 text-left", [
|
|
1252
|
-
{ "cursor-pointer":
|
|
1253
|
-
|
|
1297
|
+
{ "cursor-pointer": i.sortable, active: a.value === i.prop },
|
|
1298
|
+
i.cssClass
|
|
1254
1299
|
]]),
|
|
1255
|
-
onClick: (y) =>
|
|
1300
|
+
onClick: (y) => i.sortable ? s(i.prop) : null
|
|
1256
1301
|
}, [
|
|
1257
|
-
|
|
1258
|
-
column:
|
|
1302
|
+
B(o.$slots, i.prop + "-header", {
|
|
1303
|
+
column: i,
|
|
1259
1304
|
sortDir: l.value,
|
|
1260
1305
|
sortProp: a.value
|
|
1261
1306
|
}, () => [
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
"stroke-linejoin": "round",
|
|
1269
|
-
"stroke-width": "2",
|
|
1270
|
-
d: l.value === "asc" ? "M19 9l-7 7-7-7" : "M5 15l7-7 7 7"
|
|
1271
|
-
}, null, 8, rl)) : (u(), d("path", ul))
|
|
1272
|
-
])) : D("", !0)
|
|
1307
|
+
r("div", rl, [
|
|
1308
|
+
r("span", null, S(i.label), 1),
|
|
1309
|
+
i.sortable ? (u(), Z(ie(a.value !== i.prop ? D(ct) : l.value === "asc" ? D(it) : D(dt)), {
|
|
1310
|
+
key: 0,
|
|
1311
|
+
class: "h-4 w-4"
|
|
1312
|
+
})) : _("", !0)
|
|
1273
1313
|
])
|
|
1274
1314
|
], !0)
|
|
1275
|
-
], 10,
|
|
1315
|
+
], 10, ol))), 256))
|
|
1276
1316
|
])
|
|
1277
1317
|
]),
|
|
1278
|
-
|
|
1279
|
-
(u(!0),
|
|
1280
|
-
key:
|
|
1281
|
-
class: C(
|
|
1318
|
+
r("tbody", null, [
|
|
1319
|
+
(u(!0), v(A, null, O(c.value, (i) => (u(), v("tr", {
|
|
1320
|
+
key: i[e.keyProperty],
|
|
1321
|
+
class: C(i.cssClass)
|
|
1282
1322
|
}, [
|
|
1283
|
-
(u(!0),
|
|
1323
|
+
(u(!0), v(A, null, O(e.columns, (y) => (u(), v("td", {
|
|
1284
1324
|
class: C(["py-3 px-6 whitespace-nowrap text-ellipsis overflow-hidden", { active: a.value === y.prop }])
|
|
1285
1325
|
}, [
|
|
1286
|
-
|
|
1287
|
-
z(S(
|
|
1326
|
+
B(o.$slots, y.prop, { row: i }, () => [
|
|
1327
|
+
z(S(i[y.prop]), 1)
|
|
1288
1328
|
], !0)
|
|
1289
1329
|
], 2))), 256))
|
|
1290
1330
|
], 2))), 128))
|
|
1291
1331
|
])
|
|
1292
1332
|
], 2));
|
|
1293
1333
|
}
|
|
1294
|
-
},
|
|
1334
|
+
}, Ml = /* @__PURE__ */ be(ul, [["__scopeId", "data-v-f823032d"]]), il = { class: "sm:hidden" }, cl = { class: "hidden sm:block" }, dl = { class: "border-b border-gray-200" }, vl = {
|
|
1295
1335
|
class: "flex -mb-px space-x-8",
|
|
1296
1336
|
"aria-label": "Tabs"
|
|
1297
|
-
},
|
|
1337
|
+
}, ml = ["onClick", "aria-current"], Vl = {
|
|
1298
1338
|
__name: "tabs",
|
|
1299
1339
|
props: {
|
|
1300
1340
|
items: { type: Array, default: [] },
|
|
1301
1341
|
activeIndex: { type: Number, default: 0 }
|
|
1302
1342
|
},
|
|
1303
1343
|
emits: ["update:active-index"],
|
|
1304
|
-
setup(e, { emit:
|
|
1305
|
-
const t = e, n =
|
|
1344
|
+
setup(e, { emit: d }) {
|
|
1345
|
+
const t = e, n = d, a = x(t.items[t.activeIndex] || {}), l = V(() => {
|
|
1306
1346
|
let s = [];
|
|
1307
|
-
return t.items.forEach((o,
|
|
1308
|
-
o.disabled || s.push({ label: o.name, key:
|
|
1347
|
+
return t.items.forEach((o, m) => {
|
|
1348
|
+
o.disabled || s.push({ label: o.name, key: m });
|
|
1309
1349
|
}), s;
|
|
1310
1350
|
});
|
|
1311
1351
|
H(() => t.activeIndex, (s) => {
|
|
@@ -1314,44 +1354,44 @@ const Kt = ["value", "type"], Cl = /* @__PURE__ */ Object.assign({ inheritAttrs:
|
|
|
1314
1354
|
const c = (s) => {
|
|
1315
1355
|
s.disabled || (a.value = s, n("update:active-index", t.items.indexOf(s)));
|
|
1316
1356
|
};
|
|
1317
|
-
return (s, o) => (u(),
|
|
1318
|
-
|
|
1319
|
-
Y(
|
|
1357
|
+
return (s, o) => (u(), v(A, null, [
|
|
1358
|
+
r("div", il, [
|
|
1359
|
+
Y(St, {
|
|
1320
1360
|
options: l.value,
|
|
1321
1361
|
"model-value": e.activeIndex,
|
|
1322
|
-
"onUpdate:modelValue": o[0] || (o[0] = (
|
|
1362
|
+
"onUpdate:modelValue": o[0] || (o[0] = (m) => n("update:activeIndex", m)),
|
|
1323
1363
|
class: "w-full"
|
|
1324
1364
|
}, null, 8, ["options", "model-value"])
|
|
1325
1365
|
]),
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
(u(!0),
|
|
1330
|
-
key:
|
|
1366
|
+
r("div", cl, [
|
|
1367
|
+
r("div", dl, [
|
|
1368
|
+
r("nav", vl, [
|
|
1369
|
+
(u(!0), v(A, null, O(e.items, (m) => (u(), v("a", {
|
|
1370
|
+
key: m.name,
|
|
1331
1371
|
href: "#",
|
|
1332
|
-
onClick:
|
|
1372
|
+
onClick: P((i) => c(m), ["prevent"]),
|
|
1333
1373
|
class: C([
|
|
1334
|
-
a.value ===
|
|
1335
|
-
|
|
1374
|
+
a.value === m ? "border-vxvue-500 text-vxvue-600" : "border-transparent text-gray-900 hover:text-gray-700 hover:border-gray-300",
|
|
1375
|
+
m.disabled ? "cursor-not-allowed text-gray-400 hover:border-transparent" : "",
|
|
1336
1376
|
"group inline-flex items-center py-4 px-1 border-b-4 font-medium"
|
|
1337
1377
|
]),
|
|
1338
|
-
"aria-current": a.value ===
|
|
1378
|
+
"aria-current": a.value === m ? "page" : void 0
|
|
1339
1379
|
}, [
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
z(S(
|
|
1380
|
+
B(s.$slots, "icon", { tab: m }),
|
|
1381
|
+
r("span", null, [
|
|
1382
|
+
B(s.$slots, "default", { tab: m }, () => [
|
|
1383
|
+
z(S(m.name), 1)
|
|
1344
1384
|
])
|
|
1345
1385
|
]),
|
|
1346
|
-
|
|
1386
|
+
m.badge ? (u(), v("span", {
|
|
1347
1387
|
key: 0,
|
|
1348
1388
|
class: C([
|
|
1349
|
-
a.value ===
|
|
1350
|
-
|
|
1389
|
+
a.value === m ? "bg-vxvue-50 text-vxvue-700" : "bg-gray-200 text-gray-900",
|
|
1390
|
+
m.disabled ? "bg-gray-100 text-gray-400" : "",
|
|
1351
1391
|
"hidden ml-3 py-0.5 px-2.5 rounded-full text-xs font-medium md:inline-block"
|
|
1352
1392
|
])
|
|
1353
|
-
}, S(
|
|
1354
|
-
], 10,
|
|
1393
|
+
}, S(m.badge), 3)) : _("", !0)
|
|
1394
|
+
], 10, ml))), 128))
|
|
1355
1395
|
])
|
|
1356
1396
|
])
|
|
1357
1397
|
])
|
|
@@ -1359,19 +1399,19 @@ const Kt = ["value", "type"], Cl = /* @__PURE__ */ Object.assign({ inheritAttrs:
|
|
|
1359
1399
|
}
|
|
1360
1400
|
};
|
|
1361
1401
|
export {
|
|
1362
|
-
|
|
1363
|
-
|
|
1402
|
+
hl as Autocomplete,
|
|
1403
|
+
pl as Confirm,
|
|
1364
1404
|
ut as DateInput,
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1405
|
+
gl as Datepicker,
|
|
1406
|
+
bl as FormFileButton,
|
|
1407
|
+
St as FormSelect,
|
|
1408
|
+
xl as FormSwitch,
|
|
1409
|
+
yl as MessageToast,
|
|
1410
|
+
wl as Modal,
|
|
1411
|
+
kl as Pagination,
|
|
1412
|
+
$l as PasswordInput,
|
|
1413
|
+
Cl as SimpleTree,
|
|
1414
|
+
Sl as Slider,
|
|
1415
|
+
Ml as Sortable,
|
|
1416
|
+
Vl as Tabs
|
|
1377
1417
|
};
|