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