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