vx-vue 0.7.4 → 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 +603 -567
- package/dist/vxvue.umd.js +1 -1
- package/package.json +17 -10
package/dist/vxvue.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getCurrentScope as ke, onScopeDispose as $e, unref as D, watch 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
|
}
|
|
@@ -7,24 +7,24 @@ function he(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,113 +45,113 @@ 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: () => `${
|
|
52
|
-
d: () =>
|
|
48
|
+
s: () => String(m),
|
|
49
|
+
so: () => W(m),
|
|
50
|
+
ss: () => `${m}`.padStart(2, "0"),
|
|
51
|
+
SSS: () => `${i}`.padStart(3, "0"),
|
|
52
|
+
d: () => y,
|
|
53
53
|
dd: () => e.toLocaleDateString(t.locales, { weekday: "narrow" }),
|
|
54
54
|
ddd: () => e.toLocaleDateString(t.locales, { weekday: "short" }),
|
|
55
55
|
dddd: () => e.toLocaleDateString(t.locales, { weekday: "long" }),
|
|
56
|
-
A: () =>
|
|
57
|
-
AA: () =>
|
|
58
|
-
a: () =>
|
|
59
|
-
aa: () =>
|
|
56
|
+
A: () => f(s, o),
|
|
57
|
+
AA: () => f(s, o, !1, !0),
|
|
58
|
+
a: () => f(s, o, !0),
|
|
59
|
+
aa: () => f(s, o, !0, !0)
|
|
60
60
|
};
|
|
61
|
-
return
|
|
62
|
-
var
|
|
63
|
-
return (
|
|
61
|
+
return d.replace(Te, (w, I) => {
|
|
62
|
+
var T, F;
|
|
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
|
-
const
|
|
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
|
-
const o = (
|
|
102
|
+
const o = (f) => a.some((g) => {
|
|
103
103
|
if (typeof g == "string")
|
|
104
|
-
return Array.from(n.document.querySelectorAll(g)).some((w) => w ===
|
|
104
|
+
return Array.from(n.document.querySelectorAll(g)).some((w) => w === f.target || f.composedPath().includes(w));
|
|
105
105
|
{
|
|
106
106
|
const w = J(g);
|
|
107
|
-
return w && (
|
|
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
|
-
if (!(!g || g ===
|
|
113
|
-
if (
|
|
112
|
+
if (!(!g || g === f.target || f.composedPath().includes(g))) {
|
|
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
|
-
s = !o(
|
|
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 =
|
|
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 === $ }],
|
|
@@ -176,7 +176,7 @@ const je = ["value", "onKeydown"], Ye = { class: "flex absolute inset-y-0 right-
|
|
|
176
176
|
role: "option",
|
|
177
177
|
...o.value === $ ? { "aria-selected": "true" } : {}
|
|
178
178
|
}))
|
|
179
|
-
),
|
|
179
|
+
), U = V(() => ({
|
|
180
180
|
role: "combobox",
|
|
181
181
|
autocomplete: "off",
|
|
182
182
|
autocapitalize: "off",
|
|
@@ -185,80 +185,80 @@ 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":
|
|
189
|
-
"aria-activedescendant": o.value > -1 ?
|
|
188
|
+
"aria-expanded": i.value ? "true" : "false",
|
|
189
|
+
"aria-activedescendant": o.value > -1 ? F.value[o.value].id : "",
|
|
190
190
|
...a
|
|
191
|
-
})), q =
|
|
191
|
+
})), q = V(() => ({
|
|
192
192
|
id: c,
|
|
193
|
-
class: ["autocomplete-list absolute min-w-full transform z-10", n.resultListClass,
|
|
193
|
+
class: ["autocomplete-list absolute min-w-full transform z-10", n.resultListClass, f.value],
|
|
194
194
|
role: "listbox"
|
|
195
|
-
})),
|
|
196
|
-
o.value = -1, s.value = [],
|
|
197
|
-
},
|
|
195
|
+
})), b = () => {
|
|
196
|
+
o.value = -1, s.value = [], i.value = !1, g.value = !0;
|
|
197
|
+
}, p = (k) => {
|
|
198
198
|
const $ = n.search(k);
|
|
199
199
|
if ($ instanceof Promise) {
|
|
200
|
-
const
|
|
201
|
-
|
|
202
|
-
|
|
200
|
+
const R = ++m.value;
|
|
201
|
+
y.value = !0, $.then((N) => {
|
|
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 ?
|
|
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
|
-
return k && t("update:modelValue", n.getResultValue(k)),
|
|
208
|
+
return k && t("update:modelValue", n.getResultValue(k)), b(), k;
|
|
209
209
|
}, M = (k) => {
|
|
210
|
-
t("update:modelValue", k),
|
|
211
|
-
},
|
|
212
|
-
|
|
213
|
-
},
|
|
210
|
+
t("update:modelValue", k), p(k);
|
|
211
|
+
}, L = (k) => p(k.target.value), E = () => {
|
|
212
|
+
b(), t("blur");
|
|
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 = () => {
|
|
221
|
-
|
|
221
|
+
b(), t("update:modelValue", "");
|
|
222
222
|
}, ye = () => t("submit", h()), we = (k) => {
|
|
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
|
-
const k =
|
|
229
|
-
g.value && s.value.length && (g.value = !1,
|
|
230
|
-
const
|
|
231
|
-
if (
|
|
232
|
-
let
|
|
233
|
-
|
|
228
|
+
const k = I.value.getBoundingClientRect(), $ = w.value.getBoundingClientRect();
|
|
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");
|
|
230
|
+
const R = w.value.querySelector('[data-result-index="' + o.value + '"]');
|
|
231
|
+
if (R) {
|
|
232
|
+
let N = R.getBoundingClientRect();
|
|
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, $) => (
|
|
236
|
+
}), (k, $) => (u(), v("div", {
|
|
237
237
|
class: C(["inline-block relative", k.$attrs.class]),
|
|
238
238
|
ref_key: "container",
|
|
239
|
-
ref:
|
|
239
|
+
ref: T
|
|
240
240
|
}, [
|
|
241
|
-
|
|
241
|
+
r("input", j({
|
|
242
242
|
ref_key: "input",
|
|
243
|
-
ref:
|
|
243
|
+
ref: I,
|
|
244
244
|
class: "block pr-10 w-full form-input focus:border-vxvue",
|
|
245
245
|
value: e.modelValue
|
|
246
|
-
},
|
|
247
|
-
onInput: $[0] || ($[0] = (
|
|
246
|
+
}, U.value, {
|
|
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:
|
|
256
|
-
onBlur:
|
|
255
|
+
onFocus: L,
|
|
256
|
+
onBlur: E
|
|
257
257
|
}), null, 16, je),
|
|
258
|
-
|
|
259
|
-
|
|
258
|
+
r("span", Ye, [
|
|
259
|
+
y.value ? (u(), v("svg", Ee, Re)) : _("", !0)
|
|
260
260
|
]),
|
|
261
|
-
s.value.length ? (
|
|
261
|
+
s.value.length ? (u(), v("ul", j({
|
|
262
262
|
key: 0,
|
|
263
263
|
ref_key: "resultList",
|
|
264
264
|
ref: w
|
|
@@ -267,15 +267,15 @@ const je = ["value", "onKeydown"], Ye = { class: "flex absolute inset-y-0 right-
|
|
|
267
267
|
onMousedown: $[1] || ($[1] = P(() => {
|
|
268
268
|
}, ["prevent"]))
|
|
269
269
|
}), [
|
|
270
|
-
(
|
|
271
|
-
result:
|
|
272
|
-
props:
|
|
270
|
+
(u(!0), v(A, null, O(s.value, (R, N) => B(k.$slots, "result", {
|
|
271
|
+
result: R,
|
|
272
|
+
props: F.value[N]
|
|
273
273
|
}, () => [
|
|
274
|
-
(
|
|
275
|
-
key:
|
|
276
|
-
},
|
|
274
|
+
(u(), v("li", j({
|
|
275
|
+
key: F.value[N].id
|
|
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:
|
|
309
|
-
const t = e, n =
|
|
308
|
+
setup(e, { expose: d }) {
|
|
309
|
+
const t = e, n = x(""), a = x(""), l = x(!1);
|
|
310
310
|
let c = null, s = null;
|
|
311
|
-
const o =
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
311
|
+
const o = V(() => Array.isArray(t.buttons) ? t.buttons : [t.buttons]), m = x(null), i = (f, g) => {
|
|
312
|
+
l.value = !1, f.value !== void 0 ? f.value ? c() : s() : g ? s() : c();
|
|
313
|
+
};
|
|
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
|
+
c = w, s = I;
|
|
316
|
+
})) }), (f, g) => (u(), v(A, null, [
|
|
317
|
+
l.value ? (u(), v("div", He)) : _("", !0),
|
|
316
318
|
Y(oe, { name: "appear" }, {
|
|
317
319
|
default: Q(() => [
|
|
318
|
-
l.value ? (
|
|
319
|
-
|
|
320
|
-
l.value ? (
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
n.value ? (
|
|
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", {
|
|
324
326
|
key: 0,
|
|
325
327
|
class: C(["py-4 pt-4 text-lg font-medium text-center sm:py-6", e.headerClass])
|
|
326
328
|
}, [
|
|
327
|
-
B(
|
|
328
|
-
|
|
329
|
+
B(f.$slots, "title", { title: n.value }, () => [
|
|
330
|
+
z(S(n.value), 1)
|
|
329
331
|
])
|
|
330
|
-
], 2)) :
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
B(
|
|
332
|
+
], 2)) : _("", !0),
|
|
333
|
+
r("div", Ge, [
|
|
334
|
+
r("div", Xe, [
|
|
335
|
+
r("div", Je, [
|
|
336
|
+
B(f.$slots, "icon")
|
|
335
337
|
]),
|
|
336
|
-
|
|
337
|
-
B(
|
|
338
|
-
|
|
338
|
+
r("p", Qe, [
|
|
339
|
+
B(f.$slots, "default", { message: a.value }, () => [
|
|
340
|
+
z(S(a.value), 1)
|
|
339
341
|
])
|
|
340
342
|
])
|
|
341
343
|
]),
|
|
342
|
-
|
|
344
|
+
r("div", {
|
|
343
345
|
class: "flex justify-center mt-5 space-x-2 sm:mt-6",
|
|
344
346
|
ref_key: "buttonsContainer",
|
|
345
|
-
ref:
|
|
347
|
+
ref: m
|
|
346
348
|
}, [
|
|
347
|
-
(
|
|
348
|
-
class: C([e.buttonClass,
|
|
349
|
-
onClick: P((
|
|
350
|
-
|
|
351
|
-
}, ["prevent"])
|
|
352
|
-
}, S(g.label), 11, et))), 256))
|
|
349
|
+
(u(!0), v(A, null, O(o.value, (w, I) => (u(), v("button", {
|
|
350
|
+
class: C([e.buttonClass, w.class]),
|
|
351
|
+
onClick: P((T) => i(w, I), ["prevent"])
|
|
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 =
|
|
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
|
|
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 ? (
|
|
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
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 ? (
|
|
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
|
+
}, rt, 512)) : _("", !0),
|
|
468
469
|
B(s.$slots, "default")
|
|
469
470
|
], 2));
|
|
470
471
|
}
|
|
471
|
-
};
|
|
472
|
-
function
|
|
473
|
-
return
|
|
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", {
|
|
474
490
|
xmlns: "http://www.w3.org/2000/svg",
|
|
475
491
|
viewBox: "0 0 24 24",
|
|
476
492
|
fill: "currentColor",
|
|
477
|
-
"aria-hidden": "true"
|
|
493
|
+
"aria-hidden": "true",
|
|
494
|
+
"data-slot": "icon"
|
|
478
495
|
}, [
|
|
479
|
-
|
|
496
|
+
r("path", {
|
|
480
497
|
"fill-rule": "evenodd",
|
|
481
|
-
d: "M7.72 12.53a.75.75 0
|
|
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",
|
|
482
499
|
"clip-rule": "evenodd"
|
|
483
500
|
})
|
|
484
501
|
]);
|
|
485
502
|
}
|
|
486
|
-
function ne(e,
|
|
487
|
-
return
|
|
503
|
+
function ne(e, d) {
|
|
504
|
+
return u(), v("svg", {
|
|
488
505
|
xmlns: "http://www.w3.org/2000/svg",
|
|
489
506
|
viewBox: "0 0 24 24",
|
|
490
507
|
fill: "currentColor",
|
|
491
|
-
"aria-hidden": "true"
|
|
508
|
+
"aria-hidden": "true",
|
|
509
|
+
"data-slot": "icon"
|
|
492
510
|
}, [
|
|
493
|
-
|
|
511
|
+
r("path", {
|
|
494
512
|
"fill-rule": "evenodd",
|
|
495
|
-
d: "M16.28 11.47a.75.75 0
|
|
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",
|
|
496
514
|
"clip-rule": "evenodd"
|
|
497
515
|
})
|
|
498
516
|
]);
|
|
499
517
|
}
|
|
500
|
-
function
|
|
501
|
-
return
|
|
518
|
+
function ct(e, d) {
|
|
519
|
+
return u(), v("svg", {
|
|
502
520
|
xmlns: "http://www.w3.org/2000/svg",
|
|
503
521
|
viewBox: "0 0 24 24",
|
|
504
522
|
fill: "currentColor",
|
|
505
|
-
"aria-hidden": "true"
|
|
523
|
+
"aria-hidden": "true",
|
|
524
|
+
"data-slot": "icon"
|
|
506
525
|
}, [
|
|
507
|
-
|
|
526
|
+
r("path", {
|
|
508
527
|
"fill-rule": "evenodd",
|
|
509
|
-
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",
|
|
510
529
|
"clip-rule": "evenodd"
|
|
511
530
|
})
|
|
512
531
|
]);
|
|
513
532
|
}
|
|
514
|
-
function
|
|
515
|
-
return
|
|
533
|
+
function dt(e, d) {
|
|
534
|
+
return u(), v("svg", {
|
|
516
535
|
xmlns: "http://www.w3.org/2000/svg",
|
|
517
536
|
viewBox: "0 0 24 24",
|
|
518
537
|
fill: "currentColor",
|
|
519
|
-
"aria-hidden": "true"
|
|
538
|
+
"aria-hidden": "true",
|
|
539
|
+
"data-slot": "icon"
|
|
520
540
|
}, [
|
|
521
|
-
|
|
541
|
+
r("path", {
|
|
522
542
|
"fill-rule": "evenodd",
|
|
523
|
-
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",
|
|
524
544
|
"clip-rule": "evenodd"
|
|
525
545
|
})
|
|
526
546
|
]);
|
|
527
547
|
}
|
|
528
|
-
function
|
|
529
|
-
return
|
|
548
|
+
function vt(e, d) {
|
|
549
|
+
return u(), v("svg", {
|
|
530
550
|
xmlns: "http://www.w3.org/2000/svg",
|
|
531
551
|
viewBox: "0 0 24 24",
|
|
532
552
|
fill: "currentColor",
|
|
533
|
-
"aria-hidden": "true"
|
|
553
|
+
"aria-hidden": "true",
|
|
554
|
+
"data-slot": "icon"
|
|
534
555
|
}, [
|
|
535
|
-
|
|
556
|
+
r("path", {
|
|
536
557
|
"fill-rule": "evenodd",
|
|
537
|
-
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",
|
|
538
559
|
"clip-rule": "evenodd"
|
|
539
560
|
})
|
|
540
561
|
]);
|
|
541
562
|
}
|
|
542
|
-
|
|
563
|
+
function mt(e, d) {
|
|
564
|
+
return u(), v("svg", {
|
|
565
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
566
|
+
viewBox: "0 0 24 24",
|
|
567
|
+
fill: "currentColor",
|
|
568
|
+
"aria-hidden": "true",
|
|
569
|
+
"data-slot": "icon"
|
|
570
|
+
}, [
|
|
571
|
+
r("path", {
|
|
572
|
+
"fill-rule": "evenodd",
|
|
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",
|
|
574
|
+
"clip-rule": "evenodd"
|
|
575
|
+
})
|
|
576
|
+
]);
|
|
577
|
+
}
|
|
578
|
+
function ft(e, d) {
|
|
579
|
+
return u(), v("svg", {
|
|
580
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
581
|
+
viewBox: "0 0 24 24",
|
|
582
|
+
fill: "currentColor",
|
|
583
|
+
"aria-hidden": "true",
|
|
584
|
+
"data-slot": "icon"
|
|
585
|
+
}, [
|
|
586
|
+
r("path", {
|
|
587
|
+
"fill-rule": "evenodd",
|
|
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",
|
|
589
|
+
"clip-rule": "evenodd"
|
|
590
|
+
})
|
|
591
|
+
]);
|
|
592
|
+
}
|
|
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,101 +602,101 @@ 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 =
|
|
556
|
-
let
|
|
557
|
-
return new Date(
|
|
558
|
-
})(), l =
|
|
559
|
-
const
|
|
560
|
-
for (let
|
|
561
|
-
|
|
562
|
-
return
|
|
563
|
-
}),
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
}, { immediate: !0 }),
|
|
567
|
-
|
|
568
|
-
const
|
|
569
|
-
o.value =
|
|
605
|
+
setup(e, { emit: d }) {
|
|
606
|
+
const t = e, n = d, a = (() => {
|
|
607
|
+
let b = /* @__PURE__ */ new Date();
|
|
608
|
+
return new Date(b.getFullYear(), b.getMonth(), b.getDate());
|
|
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));
|
|
613
|
+
return b;
|
|
614
|
+
}), I = V(() => t.startOfWeekIndex ? t.dayNames.slice(1).concat(t.dayNames[0]) : t.dayNames.slice());
|
|
615
|
+
H(() => t.modelValue, (b) => {
|
|
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);
|
|
617
|
+
}, { immediate: !0 }), H(s, (b) => {
|
|
618
|
+
b && t.hasInput && re(() => {
|
|
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
|
-
}),
|
|
572
|
-
const
|
|
573
|
-
l.value = new Date(l.value.getFullYear(),
|
|
574
|
-
},
|
|
575
|
-
l.value = new Date(
|
|
576
|
-
},
|
|
577
|
-
c.value =
|
|
578
|
-
}, q = (
|
|
579
|
-
c.value =
|
|
622
|
+
}), ce(y, () => s.value = !1, { ignore: [f] });
|
|
623
|
+
const T = (b) => {
|
|
624
|
+
l.value = new Date(l.value.getFullYear(), b, 1), n("month-change", l.value);
|
|
625
|
+
}, F = (b) => {
|
|
626
|
+
l.value = new Date(b, l.value.getMonth(), 1), n("year-change", l.value);
|
|
627
|
+
}, U = (b) => {
|
|
628
|
+
c.value = b, n("update:modelValue", b), s.value = !t.hasInput;
|
|
629
|
+
}, q = (b) => {
|
|
630
|
+
c.value = b, n("update:modelValue", b);
|
|
580
631
|
};
|
|
581
632
|
return ue(() => {
|
|
582
|
-
var
|
|
583
|
-
return
|
|
584
|
-
}), (
|
|
585
|
-
class: C(["relative",
|
|
633
|
+
var b;
|
|
634
|
+
return f.value = (b = i.value) == null ? void 0 : b.$refs.toggleButton;
|
|
635
|
+
}), (b, p) => (u(), v("div", {
|
|
636
|
+
class: C(["relative", b.$attrs.class])
|
|
586
637
|
}, [
|
|
587
|
-
e.hasInput ? (
|
|
638
|
+
e.hasInput ? (u(), Z(ut, j({
|
|
588
639
|
key: 0,
|
|
589
640
|
modelValue: c.value,
|
|
590
|
-
onToggleDatepicker:
|
|
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
|
-
B(
|
|
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
|
-
ref:
|
|
606
|
-
class: [o.value,
|
|
656
|
+
ref: y,
|
|
657
|
+
class: [o.value, m.value]
|
|
607
658
|
}), [
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
onClick:
|
|
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
665
|
Y(D(se), { class: "w-6 h-6" })
|
|
615
666
|
]),
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
onClick:
|
|
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
672
|
Y(D(ne), { class: "w-6 h-6" })
|
|
622
673
|
])
|
|
623
674
|
]),
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
onClick:
|
|
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
680
|
Y(D(se), { class: "w-6 h-6" })
|
|
630
681
|
]),
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
onClick:
|
|
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
687
|
Y(D(ne), { class: "w-6 h-6" })
|
|
637
688
|
])
|
|
638
689
|
])
|
|
639
690
|
]),
|
|
640
|
-
|
|
641
|
-
(
|
|
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
|
-
(
|
|
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(),
|
|
@@ -655,14 +706,14 @@ const vt = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, mt
|
|
|
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: P((M) => e.validFrom && e.validFrom > h || e.validUntil && e.validUntil < h ? null :
|
|
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,85 +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) => (
|
|
739
|
+
return (c, s) => (u(), v("label", { for: e.id }, [
|
|
689
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) => (
|
|
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 ? (
|
|
718
|
-
(
|
|
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) => (
|
|
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
|
-
}
|
|
758
|
-
const be = (e, m) => {
|
|
809
|
+
}, be = (e, d) => {
|
|
759
810
|
const t = e.__vccOpts || e;
|
|
760
|
-
for (const [n, a] of
|
|
811
|
+
for (const [n, a] of d)
|
|
761
812
|
t[n] = a;
|
|
762
813
|
return t;
|
|
763
|
-
},
|
|
814
|
+
}, Dt = (e) => (Me("data-v-62f8007a"), e = e(), Ve(), e), _t = {
|
|
764
815
|
"aria-live": "assertive",
|
|
765
816
|
class: "flex fixed inset-0 z-50 items-start py-6 px-4 pointer-events-none sm:p-6"
|
|
766
|
-
},
|
|
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({
|
|
767
818
|
inheritAttrs: !1
|
|
768
819
|
}, {
|
|
769
820
|
__name: "message-toast",
|
|
@@ -774,63 +825,63 @@ const be = (e, m) => {
|
|
|
774
825
|
active: { type: Boolean, default: !1 }
|
|
775
826
|
},
|
|
776
827
|
emits: ["timeout", "close"],
|
|
777
|
-
setup(e, { emit:
|
|
778
|
-
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 = () => {
|
|
779
830
|
window.clearTimeout(a.value), t.active && t.timeout && (a.value = window.setTimeout(() => {
|
|
780
831
|
n("timeout");
|
|
781
832
|
}, t.timeout));
|
|
782
833
|
};
|
|
783
|
-
return
|
|
784
|
-
|
|
834
|
+
return H(() => t.active, c), ue(c), (s, o) => (u(), v("div", _t, [
|
|
835
|
+
r("div", At, [
|
|
785
836
|
Y(oe, { name: "messagetoast-fade" }, {
|
|
786
837
|
default: Q(() => [
|
|
787
|
-
e.active ? (
|
|
838
|
+
e.active ? (u(), v("div", {
|
|
788
839
|
key: 0,
|
|
789
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])
|
|
790
841
|
}, [
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
842
|
+
r("div", Bt, [
|
|
843
|
+
r("div", Pt, [
|
|
844
|
+
r("div", Lt, [
|
|
794
845
|
B(s.$slots, "icon", {}, void 0, !0)
|
|
795
846
|
]),
|
|
796
|
-
|
|
797
|
-
|
|
847
|
+
r("div", Ft, [
|
|
848
|
+
r("p", It, [
|
|
798
849
|
B(s.$slots, "title", {}, () => [
|
|
799
|
-
|
|
850
|
+
z(S(e.title), 1)
|
|
800
851
|
], !0)
|
|
801
852
|
]),
|
|
802
|
-
(
|
|
853
|
+
(u(!0), v(A, null, O(l.value, (m) => (u(), v("p", Tt, [
|
|
803
854
|
B(s.$slots, "default", {}, () => [
|
|
804
|
-
|
|
855
|
+
z(S(m), 1)
|
|
805
856
|
], !0)
|
|
806
857
|
]))), 256))
|
|
807
858
|
]),
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
onClick: o[0] || (o[0] = (
|
|
859
|
+
r("div", Ot, [
|
|
860
|
+
r("button", {
|
|
861
|
+
onClick: o[0] || (o[0] = (m) => n("close")),
|
|
811
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"
|
|
812
863
|
}, [
|
|
813
|
-
|
|
814
|
-
Y(D(
|
|
864
|
+
jt,
|
|
865
|
+
Y(D(ft), { class: "size-5" })
|
|
815
866
|
])
|
|
816
867
|
])
|
|
817
868
|
])
|
|
818
869
|
])
|
|
819
|
-
], 2)) :
|
|
870
|
+
], 2)) : _("", !0)
|
|
820
871
|
]),
|
|
821
872
|
_: 3
|
|
822
873
|
})
|
|
823
874
|
])
|
|
824
875
|
]));
|
|
825
876
|
}
|
|
826
|
-
}),
|
|
877
|
+
}), yl = /* @__PURE__ */ be(Yt, [["__scopeId", "data-v-62f8007a"]]), Et = {
|
|
827
878
|
key: 0,
|
|
828
879
|
class: "fixed inset-0 z-[9998] bg-white/50 backdrop-blur-sm",
|
|
829
880
|
"aria-hidden": "true"
|
|
830
|
-
},
|
|
881
|
+
}, Nt = {
|
|
831
882
|
key: 0,
|
|
832
883
|
class: "fixed inset-0 z-[9999]"
|
|
833
|
-
},
|
|
884
|
+
}, zt = { class: "flex justify-center items-center h-screen" }, wl = {
|
|
834
885
|
__name: "modal",
|
|
835
886
|
props: {
|
|
836
887
|
show: Boolean,
|
|
@@ -839,38 +890,38 @@ const be = (e, m) => {
|
|
|
839
890
|
contentClass: { type: String, default: "" }
|
|
840
891
|
},
|
|
841
892
|
emits: ["clicked-outside"],
|
|
842
|
-
setup(e, { emit:
|
|
843
|
-
const t =
|
|
844
|
-
return
|
|
845
|
-
e.show ? (
|
|
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),
|
|
846
897
|
Y(oe, { name: "appear" }, {
|
|
847
898
|
default: Q(() => [
|
|
848
|
-
e.show ? (
|
|
849
|
-
|
|
850
|
-
|
|
899
|
+
e.show ? (u(), v("div", Nt, [
|
|
900
|
+
r("div", zt, [
|
|
901
|
+
r("div", {
|
|
851
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]),
|
|
852
903
|
ref_key: "container",
|
|
853
904
|
ref: n
|
|
854
905
|
}, [
|
|
855
|
-
|
|
906
|
+
r("div", {
|
|
856
907
|
class: C(e.headerClass)
|
|
857
908
|
}, [
|
|
858
909
|
B(a.$slots, "title")
|
|
859
910
|
], 2),
|
|
860
|
-
|
|
911
|
+
r("div", {
|
|
861
912
|
class: C(["overflow-y-auto h-full pb-4 mt-16", e.contentClass])
|
|
862
913
|
}, [
|
|
863
914
|
B(a.$slots, "default")
|
|
864
915
|
], 2)
|
|
865
916
|
], 2)
|
|
866
917
|
])
|
|
867
|
-
])) :
|
|
918
|
+
])) : _("", !0)
|
|
868
919
|
]),
|
|
869
920
|
_: 3
|
|
870
921
|
})
|
|
871
922
|
], 64));
|
|
872
923
|
}
|
|
873
|
-
},
|
|
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 = {
|
|
874
925
|
__name: "pagination",
|
|
875
926
|
props: {
|
|
876
927
|
page: { type: Number, default: 1 },
|
|
@@ -895,190 +946,193 @@ const be = (e, m) => {
|
|
|
895
946
|
}
|
|
896
947
|
},
|
|
897
948
|
emits: ["update:page"],
|
|
898
|
-
setup(e, { emit:
|
|
899
|
-
const t =
|
|
900
|
-
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];
|
|
901
952
|
if (n.showAllPages || a.value <= 7) {
|
|
902
|
-
for (let
|
|
903
|
-
|
|
904
|
-
return
|
|
953
|
+
for (let y = 2; y <= a.value; ++y)
|
|
954
|
+
i.push(y);
|
|
955
|
+
return i;
|
|
905
956
|
}
|
|
906
|
-
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;
|
|
907
958
|
}), o = () => {
|
|
908
959
|
l.value > 1 && t("update:page", l.value - 1);
|
|
909
|
-
},
|
|
960
|
+
}, m = () => {
|
|
910
961
|
l.value < a.value && t("update:page", l.value + 1);
|
|
911
962
|
};
|
|
912
|
-
return
|
|
963
|
+
return H(() => n.page, (i) => l.value = Math.min(Math.max(i, 1), a.value), { immediate: !0 }), H(() => n.perPage, (i) => {
|
|
913
964
|
a.value = Math.ceil(n.total / n.perPage), t("update:page", 1);
|
|
914
|
-
}),
|
|
965
|
+
}), H(() => n.total, (i) => {
|
|
915
966
|
a.value = Math.ceil(n.total / n.perPage), l.value > a.value && t("update:page", 1);
|
|
916
|
-
}), (
|
|
917
|
-
|
|
918
|
-
e.showNavButtons ? (
|
|
967
|
+
}), (i, y) => (u(), v("nav", Rt, [
|
|
968
|
+
r("div", Ht, [
|
|
969
|
+
e.showNavButtons ? (u(), v("a", {
|
|
919
970
|
key: 0,
|
|
920
971
|
onClick: P(o, ["prevent"]),
|
|
921
972
|
href: "#",
|
|
922
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]])
|
|
923
974
|
}, [
|
|
924
|
-
Y(D(se), { class: "
|
|
925
|
-
|
|
926
|
-
],
|
|
975
|
+
Y(D(se), { class: "size-5" }),
|
|
976
|
+
z(" " + S(e.prevText), 1)
|
|
977
|
+
], 2)) : _("", !0)
|
|
927
978
|
]),
|
|
928
|
-
|
|
929
|
-
(
|
|
930
|
-
onClick: P((w) =>
|
|
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"]),
|
|
931
982
|
key: g,
|
|
932
|
-
href:
|
|
983
|
+
href: f !== "dots" ? "#" : null,
|
|
933
984
|
class: C(["inline-flex items-center px-4 text-sm font-medium", [{
|
|
934
|
-
"border-vxvue-500 text-vxvue-700":
|
|
935
|
-
"border-transparent text-gray-500":
|
|
936
|
-
"hover:text-gray-700 hover:border-gray-300":
|
|
985
|
+
"border-vxvue-500 text-vxvue-700": f === l.value,
|
|
986
|
+
"border-transparent text-gray-500": f !== l.value,
|
|
987
|
+
"hover:text-gray-700 hover:border-gray-300": f !== "dots"
|
|
937
988
|
}, c.value]])
|
|
938
989
|
}, {
|
|
939
990
|
default: Q(() => [
|
|
940
|
-
|
|
991
|
+
z(S(f !== "dots" ? f : "..."), 1)
|
|
941
992
|
]),
|
|
942
993
|
_: 2
|
|
943
994
|
}, 1032, ["onClick", "href", "class"]))), 128))
|
|
944
995
|
]),
|
|
945
|
-
|
|
946
|
-
e.showNavButtons ? (
|
|
996
|
+
r("div", Wt, [
|
|
997
|
+
e.showNavButtons ? (u(), v("a", {
|
|
947
998
|
key: 0,
|
|
948
|
-
onClick: P(
|
|
999
|
+
onClick: P(m, ["prevent"]),
|
|
949
1000
|
href: "#",
|
|
950
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 }]])
|
|
951
1002
|
}, [
|
|
952
|
-
|
|
953
|
-
Y(D(ne), { class: "
|
|
954
|
-
],
|
|
1003
|
+
z(S(e.nextText) + " ", 1),
|
|
1004
|
+
Y(D(ne), { class: "size-5" })
|
|
1005
|
+
], 2)) : _("", !0)
|
|
955
1006
|
])
|
|
956
1007
|
]));
|
|
957
1008
|
}
|
|
958
1009
|
};
|
|
959
|
-
function
|
|
960
|
-
return
|
|
1010
|
+
function Zt(e, d) {
|
|
1011
|
+
return u(), v("svg", {
|
|
961
1012
|
xmlns: "http://www.w3.org/2000/svg",
|
|
962
1013
|
fill: "none",
|
|
963
1014
|
viewBox: "0 0 24 24",
|
|
964
1015
|
"stroke-width": "1.5",
|
|
965
1016
|
stroke: "currentColor",
|
|
966
|
-
"aria-hidden": "true"
|
|
1017
|
+
"aria-hidden": "true",
|
|
1018
|
+
"data-slot": "icon"
|
|
967
1019
|
}, [
|
|
968
|
-
|
|
1020
|
+
r("path", {
|
|
969
1021
|
"stroke-linecap": "round",
|
|
970
1022
|
"stroke-linejoin": "round",
|
|
971
|
-
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"
|
|
972
1024
|
})
|
|
973
1025
|
]);
|
|
974
1026
|
}
|
|
975
|
-
function qt(e,
|
|
976
|
-
return
|
|
1027
|
+
function qt(e, d) {
|
|
1028
|
+
return u(), v("svg", {
|
|
977
1029
|
xmlns: "http://www.w3.org/2000/svg",
|
|
978
1030
|
fill: "none",
|
|
979
1031
|
viewBox: "0 0 24 24",
|
|
980
1032
|
"stroke-width": "1.5",
|
|
981
1033
|
stroke: "currentColor",
|
|
982
|
-
"aria-hidden": "true"
|
|
1034
|
+
"aria-hidden": "true",
|
|
1035
|
+
"data-slot": "icon"
|
|
983
1036
|
}, [
|
|
984
|
-
|
|
1037
|
+
r("path", {
|
|
985
1038
|
"stroke-linecap": "round",
|
|
986
1039
|
"stroke-linejoin": "round",
|
|
987
|
-
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"
|
|
988
1041
|
}),
|
|
989
|
-
|
|
1042
|
+
r("path", {
|
|
990
1043
|
"stroke-linecap": "round",
|
|
991
1044
|
"stroke-linejoin": "round",
|
|
992
|
-
d: "M15 12a3 3 0
|
|
1045
|
+
d: "M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"
|
|
993
1046
|
})
|
|
994
1047
|
]);
|
|
995
1048
|
}
|
|
996
|
-
const Kt = ["value", "type"],
|
|
1049
|
+
const Kt = ["value", "type"], $l = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
997
1050
|
__name: "password-input",
|
|
998
1051
|
props: ["modelValue"],
|
|
999
1052
|
emits: ["update:modelValue"],
|
|
1000
|
-
setup(e, { emit:
|
|
1001
|
-
const t =
|
|
1053
|
+
setup(e, { emit: d }) {
|
|
1054
|
+
const t = d, n = x(!1), a = V(() => {
|
|
1002
1055
|
let l = Object.assign({}, K());
|
|
1003
1056
|
return delete l.class, l;
|
|
1004
1057
|
});
|
|
1005
|
-
return (l, c) => (
|
|
1058
|
+
return (l, c) => (u(), v("div", {
|
|
1006
1059
|
class: C("inline-block relative " + K().class)
|
|
1007
1060
|
}, [
|
|
1008
|
-
|
|
1061
|
+
r("input", j({
|
|
1009
1062
|
value: e.modelValue,
|
|
1010
1063
|
type: n.value ? "text" : "password",
|
|
1011
1064
|
onInput: c[0] || (c[0] = (s) => t("update:modelValue", s.target.value))
|
|
1012
1065
|
}, a.value, { class: "block pr-10 w-full form-input peer" }), null, 16, Kt),
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
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"]))
|
|
1016
1070
|
}, [
|
|
1017
|
-
n.value ? (
|
|
1071
|
+
n.value ? (u(), Z(D(Zt), {
|
|
1018
1072
|
key: 0,
|
|
1019
|
-
class: "
|
|
1020
|
-
})) : (
|
|
1073
|
+
class: "size-5"
|
|
1074
|
+
})) : (u(), Z(D(qt), {
|
|
1021
1075
|
key: 1,
|
|
1022
|
-
class: "
|
|
1076
|
+
class: "size-5"
|
|
1023
1077
|
}))
|
|
1024
1078
|
]),
|
|
1025
1079
|
B(l.$slots, "default")
|
|
1026
1080
|
], 2));
|
|
1027
1081
|
}
|
|
1028
|
-
}), 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 = {
|
|
1029
1083
|
key: 0,
|
|
1030
1084
|
class: "ml-6"
|
|
1031
|
-
},
|
|
1085
|
+
}, Cl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
1032
1086
|
__name: "simple-tree",
|
|
1033
1087
|
props: { branch: { type: Object, default: {} } },
|
|
1034
1088
|
emits: ["branch-selected", "expand"],
|
|
1035
|
-
setup(e, { emit:
|
|
1036
|
-
const t = e, n =
|
|
1089
|
+
setup(e, { emit: d }) {
|
|
1090
|
+
const t = e, n = d, a = x(!1);
|
|
1037
1091
|
return ue(() => {
|
|
1038
1092
|
t.branch.current && n("expand", !0);
|
|
1039
1093
|
}), (l, c) => {
|
|
1040
|
-
const s =
|
|
1041
|
-
return
|
|
1094
|
+
const s = De("simple-tree", !0);
|
|
1095
|
+
return u(), v("div", {
|
|
1042
1096
|
class: C([!e.branch.branches || !e.branch.branches.length ? "terminates" : "", l.$attrs.class])
|
|
1043
1097
|
}, [
|
|
1044
|
-
|
|
1045
|
-
e.branch.branches && e.branch.branches.length ? (
|
|
1046
|
-
|
|
1098
|
+
r("div", Gt, [
|
|
1099
|
+
e.branch.branches && e.branch.branches.length ? (u(), v(A, { key: 0 }, [
|
|
1100
|
+
r("input", {
|
|
1047
1101
|
type: "checkbox",
|
|
1048
1102
|
id: "branch-" + e.branch.id,
|
|
1049
1103
|
onClick: c[0] || (c[0] = (o) => a.value = !a.value),
|
|
1050
1104
|
checked: a.value,
|
|
1051
1105
|
class: "hidden"
|
|
1052
1106
|
}, null, 8, Xt),
|
|
1053
|
-
|
|
1107
|
+
r("label", {
|
|
1054
1108
|
for: "branch-" + e.branch.id,
|
|
1055
1109
|
class: "mr-2"
|
|
1056
1110
|
}, [
|
|
1057
|
-
(
|
|
1058
|
-
], 8,
|
|
1059
|
-
], 64)) :
|
|
1060
|
-
e.branch.current ? (
|
|
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", {
|
|
1061
1115
|
key: 2,
|
|
1062
1116
|
href: e.branch.path,
|
|
1063
1117
|
onClick: c[1] || (c[1] = P((o) => n("branch-selected", e.branch), ["prevent"]))
|
|
1064
|
-
}, S(e.branch.label), 9,
|
|
1118
|
+
}, S(e.branch.label), 9, el))
|
|
1065
1119
|
]),
|
|
1066
|
-
e.branch.branches && e.branch.branches.length ?
|
|
1067
|
-
(
|
|
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, {
|
|
1068
1122
|
branch: o,
|
|
1069
1123
|
key: o.id,
|
|
1070
|
-
onBranchSelected: c[2] || (c[2] = (
|
|
1071
|
-
onExpand: c[3] || (c[3] = (
|
|
1072
|
-
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);
|
|
1073
1127
|
})
|
|
1074
1128
|
}, null, 8, ["branch"]))), 128))
|
|
1075
1129
|
], 512)), [
|
|
1076
|
-
[
|
|
1077
|
-
]) :
|
|
1130
|
+
[_e, a.value]
|
|
1131
|
+
]) : _("", !0)
|
|
1078
1132
|
], 2);
|
|
1079
1133
|
};
|
|
1080
1134
|
}
|
|
1081
|
-
}),
|
|
1135
|
+
}), ll = ["aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext"], al = ["id"], sl = ["id", "aria-label"], Sl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
1082
1136
|
__name: "slider",
|
|
1083
1137
|
props: {
|
|
1084
1138
|
min: { type: Number, default: 0 },
|
|
@@ -1086,55 +1140,48 @@ const Kt = ["value", "type"], Sl = /* @__PURE__ */ Object.assign({ inheritAttrs:
|
|
|
1086
1140
|
vertical: Boolean,
|
|
1087
1141
|
disabled: Boolean,
|
|
1088
1142
|
modelValue: { type: [Number, Array], validator(e) {
|
|
1089
|
-
return typeof e == "number" || e.every((
|
|
1143
|
+
return typeof e == "number" || e.every((d) => typeof d == "number");
|
|
1090
1144
|
} }
|
|
1091
1145
|
},
|
|
1092
1146
|
emits: ["update:modelValue"],
|
|
1093
|
-
setup(e, { emit:
|
|
1094
|
-
const t = e, n =
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1147
|
+
setup(e, { emit: d }) {
|
|
1148
|
+
const t = e, n = d, a = K(), l = { x: null, y: null }, c = { w: null, h: null };
|
|
1149
|
+
let s = !1;
|
|
1150
|
+
const o = x(null), m = x(0), i = V(() => {
|
|
1151
|
+
const p = t.max, h = t.min;
|
|
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);
|
|
1153
|
+
}), y = V(() => {
|
|
1098
1154
|
if (t.modelValue instanceof Array) {
|
|
1099
|
-
const
|
|
1100
|
-
return t.vertical ? { bottom:
|
|
1155
|
+
const p = Math.min(...i.value) + "%", h = Math.max(...i.value) - Math.min(...i.value) + "%";
|
|
1156
|
+
return t.vertical ? { bottom: p, height: h } : { left: p, width: h };
|
|
1101
1157
|
}
|
|
1102
|
-
return t.vertical ? { bottom: 0, height:
|
|
1103
|
-
}),
|
|
1104
|
-
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
|
|
1105
|
-
tabindex: 0
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
"aria-valuemax": t.max
|
|
1109
|
-
}), g = (f) => {
|
|
1110
|
-
let h = parseFloat(f.toFixed(10));
|
|
1158
|
+
return t.vertical ? { bottom: 0, height: i.value + "%" } : { width: i.value + "%" };
|
|
1159
|
+
}), f = x({
|
|
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
|
|
1162
|
+
}), g = (p) => {
|
|
1163
|
+
let h = parseFloat(p.toFixed(10));
|
|
1111
1164
|
if (h = Math.min(t.max, Math.max(t.min, h)), t.modelValue instanceof Array) {
|
|
1112
1165
|
let M = [...t.modelValue];
|
|
1113
|
-
M[
|
|
1166
|
+
M[m.value] = h, n("update:modelValue", M);
|
|
1114
1167
|
} else
|
|
1115
1168
|
n("update:modelValue", h);
|
|
1116
|
-
}, w = (
|
|
1117
|
-
const { pageX: h, pageY: M } =
|
|
1118
|
-
g(Math.floor((t.max - t.min) *
|
|
1119
|
-
},
|
|
1120
|
-
const
|
|
1121
|
-
l.value =
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
},
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
}, H = () => {
|
|
1133
|
-
s.value && (s.value = !1, document.removeEventListener("mousemove", I), document.removeEventListener("mouseup", H));
|
|
1134
|
-
}, q = (f) => {
|
|
1135
|
-
f.keyCode >= 33 && f.keyCode <= 40 && f.preventDefault();
|
|
1136
|
-
const h = t.modelValue[v.value] ?? t.modelValue;
|
|
1137
|
-
switch (f.keyCode) {
|
|
1169
|
+
}, w = (p) => {
|
|
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));
|
|
1172
|
+
}, I = () => {
|
|
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;
|
|
1175
|
+
}, T = (p) => {
|
|
1176
|
+
s && (p.preventDefault(), w(p));
|
|
1177
|
+
}, F = (p) => {
|
|
1178
|
+
p.preventDefault(), p.currentTarget.focus(), I(), s = !0, document.addEventListener("mousemove", T), document.addEventListener("mouseup", U);
|
|
1179
|
+
}, U = () => {
|
|
1180
|
+
s && (s = !1, document.removeEventListener("mousemove", T), document.removeEventListener("mouseup", U));
|
|
1181
|
+
}, q = (p) => {
|
|
1182
|
+
p.keyCode >= 33 && p.keyCode <= 40 && p.preventDefault();
|
|
1183
|
+
const h = t.modelValue[m.value] ?? t.modelValue;
|
|
1184
|
+
switch (p.keyCode) {
|
|
1138
1185
|
case 37:
|
|
1139
1186
|
case 40:
|
|
1140
1187
|
g(h - 1);
|
|
@@ -1155,78 +1202,70 @@ const Kt = ["value", "type"], Sl = /* @__PURE__ */ Object.assign({ inheritAttrs:
|
|
|
1155
1202
|
case 35:
|
|
1156
1203
|
g(t.max);
|
|
1157
1204
|
}
|
|
1158
|
-
},
|
|
1159
|
-
|
|
1205
|
+
}, b = (p) => {
|
|
1206
|
+
I(), w(p);
|
|
1160
1207
|
};
|
|
1161
|
-
return (
|
|
1208
|
+
return (p, h) => (u(), v("div", j({
|
|
1162
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"],
|
|
1163
1210
|
ref_key: "track",
|
|
1164
|
-
ref: o
|
|
1165
|
-
|
|
1166
|
-
|
|
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 ? {} : {
|
|
1219
|
+
click: b
|
|
1167
1220
|
}, !0)), [
|
|
1168
|
-
e.disabled ?
|
|
1221
|
+
e.disabled ? _("", !0) : (u(), v("div", {
|
|
1169
1222
|
key: 0,
|
|
1170
1223
|
class: C(["absolute bg-vxvue", e.vertical ? "w-full rounded-t-full rounded-b-full" : "h-full rounded-r-full rounded-l-full"]),
|
|
1171
|
-
style: Ae(
|
|
1224
|
+
style: Ae(y.value)
|
|
1172
1225
|
}, null, 6)),
|
|
1173
|
-
e.modelValue.length ? (
|
|
1174
|
-
id:
|
|
1175
|
-
style: e.vertical ? { bottom:
|
|
1176
|
-
"aria-
|
|
1177
|
-
},
|
|
1178
|
-
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,
|
|
1179
1232
|
keydown: q,
|
|
1180
|
-
mousedown: (
|
|
1181
|
-
|
|
1233
|
+
mousedown: (E) => {
|
|
1234
|
+
m.value = L, F(E);
|
|
1182
1235
|
},
|
|
1183
|
-
touchstart: (
|
|
1184
|
-
|
|
1236
|
+
touchstart: (E) => {
|
|
1237
|
+
m.value = L, F(E);
|
|
1185
1238
|
},
|
|
1186
|
-
touchmove:
|
|
1187
|
-
touchend:
|
|
1188
|
-
}, !0),
|
|
1239
|
+
touchmove: T,
|
|
1240
|
+
touchend: U
|
|
1241
|
+
}, !0), f.value), null, 16, sl))), 256)) : (u(), v("button", j({
|
|
1189
1242
|
key: 1,
|
|
1190
1243
|
id: D(a).id,
|
|
1191
|
-
style: e.vertical ? { bottom:
|
|
1192
|
-
"aria-
|
|
1193
|
-
},
|
|
1194
|
-
focus: () =>
|
|
1244
|
+
style: e.vertical ? { bottom: i.value + "%" } : { left: i.value + "%" },
|
|
1245
|
+
"aria-label": "slider-thumb"
|
|
1246
|
+
}, le(e.disabled ? {} : {
|
|
1247
|
+
focus: () => m.value = 0,
|
|
1195
1248
|
keydown: q,
|
|
1196
1249
|
mousedown: (M) => {
|
|
1197
|
-
|
|
1250
|
+
m.value = 0, F(M);
|
|
1198
1251
|
},
|
|
1199
1252
|
touchstart: (M) => {
|
|
1200
|
-
|
|
1253
|
+
m.value = 0, F(M);
|
|
1201
1254
|
},
|
|
1202
|
-
touchmove:
|
|
1203
|
-
touchend:
|
|
1204
|
-
}, !0),
|
|
1205
|
-
], 16));
|
|
1255
|
+
touchmove: T,
|
|
1256
|
+
touchend: U
|
|
1257
|
+
}, !0), f.value), null, 16, al))
|
|
1258
|
+
], 16, ll));
|
|
1206
1259
|
}
|
|
1207
|
-
})
|
|
1208
|
-
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 = {
|
|
1209
|
-
key: 0,
|
|
1210
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1211
|
-
class: "flex-shrink-0 ml-2 w-4 h-4",
|
|
1212
|
-
fill: "none",
|
|
1213
|
-
viewBox: "0 0 24 24",
|
|
1214
|
-
stroke: "currentColor"
|
|
1215
|
-
}, ul = ["d"], il = {
|
|
1216
|
-
key: 1,
|
|
1217
|
-
"stroke-linecap": "round",
|
|
1218
|
-
"stroke-linejoin": "round",
|
|
1219
|
-
"stroke-width": "2",
|
|
1220
|
-
d: "M8 9l4-4 4 4m0 6l-4 4-4-4"
|
|
1221
|
-
}, cl = {
|
|
1260
|
+
}), nl = { class: "text-white bg-slate-700" }, ol = ["onClick"], rl = { class: "flex items-center space-x-1" }, ul = {
|
|
1222
1261
|
__name: "sortable",
|
|
1223
1262
|
props: {
|
|
1224
1263
|
columns: {
|
|
1225
1264
|
type: Array,
|
|
1226
1265
|
required: !0,
|
|
1227
1266
|
validator: (e) => {
|
|
1228
|
-
for (const
|
|
1229
|
-
if (
|
|
1267
|
+
for (const d of e)
|
|
1268
|
+
if (d.label === void 0 || d.prop === void 0)
|
|
1230
1269
|
return !1;
|
|
1231
1270
|
return !0;
|
|
1232
1271
|
}
|
|
@@ -1239,123 +1278,120 @@ const al = { class: "w-full divide-y divide-y-slate-900" }, sl = { class: "text-
|
|
|
1239
1278
|
keyProperty: { type: String, default: "key" }
|
|
1240
1279
|
},
|
|
1241
1280
|
emits: ["before-sort", "after-sort"],
|
|
1242
|
-
setup(e, { emit:
|
|
1243
|
-
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(() => {
|
|
1244
1283
|
let o = t.rows.slice();
|
|
1245
|
-
const
|
|
1246
|
-
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));
|
|
1247
1286
|
}), s = (o) => {
|
|
1248
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 }));
|
|
1249
1288
|
};
|
|
1250
|
-
return (o,
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1289
|
+
return (o, m) => (u(), v("table", {
|
|
1290
|
+
class: C(o.$attrs.class || "w-full divide-y divide-y-slate-900 table-fixed")
|
|
1291
|
+
}, [
|
|
1292
|
+
r("thead", nl, [
|
|
1293
|
+
r("tr", null, [
|
|
1294
|
+
(u(!0), v(A, null, O(e.columns, (i) => (u(), v("th", {
|
|
1254
1295
|
scope: "col",
|
|
1255
1296
|
class: C(["py-3 px-6 text-left", [
|
|
1256
|
-
{ "cursor-pointer":
|
|
1257
|
-
|
|
1297
|
+
{ "cursor-pointer": i.sortable, active: a.value === i.prop },
|
|
1298
|
+
i.cssClass
|
|
1258
1299
|
]]),
|
|
1259
|
-
onClick: (
|
|
1300
|
+
onClick: (y) => i.sortable ? s(i.prop) : null
|
|
1260
1301
|
}, [
|
|
1261
|
-
B(o.$slots,
|
|
1262
|
-
column:
|
|
1302
|
+
B(o.$slots, i.prop + "-header", {
|
|
1303
|
+
column: i,
|
|
1263
1304
|
sortDir: l.value,
|
|
1264
1305
|
sortProp: a.value
|
|
1265
1306
|
}, () => [
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
"stroke-linejoin": "round",
|
|
1273
|
-
"stroke-width": "2",
|
|
1274
|
-
d: l.value === "asc" ? "M19 9l-7 7-7-7" : "M5 15l7-7 7 7"
|
|
1275
|
-
}, null, 8, ul)) : (r(), d("path", il))
|
|
1276
|
-
])) : V("", !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)
|
|
1277
1313
|
])
|
|
1278
1314
|
], !0)
|
|
1279
|
-
], 10,
|
|
1315
|
+
], 10, ol))), 256))
|
|
1280
1316
|
])
|
|
1281
1317
|
]),
|
|
1282
|
-
|
|
1283
|
-
(
|
|
1284
|
-
key:
|
|
1285
|
-
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)
|
|
1286
1322
|
}, [
|
|
1287
|
-
(
|
|
1288
|
-
class: C(["py-3 px-6 whitespace-nowrap", { active: a.value ===
|
|
1323
|
+
(u(!0), v(A, null, O(e.columns, (y) => (u(), v("td", {
|
|
1324
|
+
class: C(["py-3 px-6 whitespace-nowrap text-ellipsis overflow-hidden", { active: a.value === y.prop }])
|
|
1289
1325
|
}, [
|
|
1290
|
-
B(o.$slots,
|
|
1291
|
-
|
|
1326
|
+
B(o.$slots, y.prop, { row: i }, () => [
|
|
1327
|
+
z(S(i[y.prop]), 1)
|
|
1292
1328
|
], !0)
|
|
1293
1329
|
], 2))), 256))
|
|
1294
1330
|
], 2))), 128))
|
|
1295
1331
|
])
|
|
1296
|
-
]));
|
|
1332
|
+
], 2));
|
|
1297
1333
|
}
|
|
1298
|
-
},
|
|
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 = {
|
|
1299
1335
|
class: "flex -mb-px space-x-8",
|
|
1300
1336
|
"aria-label": "Tabs"
|
|
1301
|
-
},
|
|
1337
|
+
}, ml = ["onClick", "aria-current"], Vl = {
|
|
1302
1338
|
__name: "tabs",
|
|
1303
1339
|
props: {
|
|
1304
1340
|
items: { type: Array, default: [] },
|
|
1305
1341
|
activeIndex: { type: Number, default: 0 }
|
|
1306
1342
|
},
|
|
1307
1343
|
emits: ["update:active-index"],
|
|
1308
|
-
setup(e, { emit:
|
|
1309
|
-
const t = e, n =
|
|
1344
|
+
setup(e, { emit: d }) {
|
|
1345
|
+
const t = e, n = d, a = x(t.items[t.activeIndex] || {}), l = V(() => {
|
|
1310
1346
|
let s = [];
|
|
1311
|
-
return t.items.forEach((o,
|
|
1312
|
-
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 });
|
|
1313
1349
|
}), s;
|
|
1314
1350
|
});
|
|
1315
|
-
|
|
1351
|
+
H(() => t.activeIndex, (s) => {
|
|
1316
1352
|
a.value = t.items[s] || {};
|
|
1317
1353
|
});
|
|
1318
1354
|
const c = (s) => {
|
|
1319
1355
|
s.disabled || (a.value = s, n("update:active-index", t.items.indexOf(s)));
|
|
1320
1356
|
};
|
|
1321
|
-
return (s, o) => (
|
|
1322
|
-
|
|
1323
|
-
Y(
|
|
1357
|
+
return (s, o) => (u(), v(A, null, [
|
|
1358
|
+
r("div", il, [
|
|
1359
|
+
Y(St, {
|
|
1324
1360
|
options: l.value,
|
|
1325
1361
|
"model-value": e.activeIndex,
|
|
1326
|
-
"onUpdate:modelValue": o[0] || (o[0] = (
|
|
1362
|
+
"onUpdate:modelValue": o[0] || (o[0] = (m) => n("update:activeIndex", m)),
|
|
1327
1363
|
class: "w-full"
|
|
1328
1364
|
}, null, 8, ["options", "model-value"])
|
|
1329
1365
|
]),
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
(
|
|
1334
|
-
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,
|
|
1335
1371
|
href: "#",
|
|
1336
|
-
onClick: P((
|
|
1372
|
+
onClick: P((i) => c(m), ["prevent"]),
|
|
1337
1373
|
class: C([
|
|
1338
|
-
a.value ===
|
|
1339
|
-
|
|
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" : "",
|
|
1340
1376
|
"group inline-flex items-center py-4 px-1 border-b-4 font-medium"
|
|
1341
1377
|
]),
|
|
1342
|
-
"aria-current": a.value ===
|
|
1378
|
+
"aria-current": a.value === m ? "page" : void 0
|
|
1343
1379
|
}, [
|
|
1344
|
-
B(s.$slots, "icon", { tab:
|
|
1345
|
-
|
|
1346
|
-
B(s.$slots, "default", { tab:
|
|
1347
|
-
|
|
1380
|
+
B(s.$slots, "icon", { tab: m }),
|
|
1381
|
+
r("span", null, [
|
|
1382
|
+
B(s.$slots, "default", { tab: m }, () => [
|
|
1383
|
+
z(S(m.name), 1)
|
|
1348
1384
|
])
|
|
1349
1385
|
]),
|
|
1350
|
-
|
|
1386
|
+
m.badge ? (u(), v("span", {
|
|
1351
1387
|
key: 0,
|
|
1352
1388
|
class: C([
|
|
1353
|
-
a.value ===
|
|
1354
|
-
|
|
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" : "",
|
|
1355
1391
|
"hidden ml-3 py-0.5 px-2.5 rounded-full text-xs font-medium md:inline-block"
|
|
1356
1392
|
])
|
|
1357
|
-
}, S(
|
|
1358
|
-
], 10,
|
|
1393
|
+
}, S(m.badge), 3)) : _("", !0)
|
|
1394
|
+
], 10, ml))), 128))
|
|
1359
1395
|
])
|
|
1360
1396
|
])
|
|
1361
1397
|
])
|
|
@@ -1363,19 +1399,19 @@ const al = { class: "w-full divide-y divide-y-slate-900" }, sl = { class: "text-
|
|
|
1363
1399
|
}
|
|
1364
1400
|
};
|
|
1365
1401
|
export {
|
|
1366
|
-
|
|
1367
|
-
|
|
1402
|
+
hl as Autocomplete,
|
|
1403
|
+
pl as Confirm,
|
|
1368
1404
|
ut as DateInput,
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
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
|
|
1381
1417
|
};
|