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