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