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