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