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