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