@reinosoft-ui/core 0.1.41 → 0.1.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/reinosoft-ui.es.js +844 -846
- package/dist/reinosoft-ui.umd.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/reinosoft-ui.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as T, ref as h, computed as H, watch as Y, onMounted as ae, createElementBlock as f, openBlock as v, normalizeStyle as ye, normalizeClass as re, renderSlot as U, createCommentVNode as q, withDirectives as Me, createElementVNode as M, vShow as qe, mergeProps as Ce, mergeModels as ee, useModel as fe, withKeys as ve, withModifiers as le, onUnmounted as
|
|
1
|
+
import { defineComponent as T, ref as h, computed as H, watch as Y, onMounted as ae, createElementBlock as f, openBlock as v, normalizeStyle as ye, normalizeClass as re, renderSlot as U, createCommentVNode as q, withDirectives as Me, createElementVNode as M, vShow as qe, mergeProps as Ce, mergeModels as ee, useModel as fe, withKeys as ve, withModifiers as le, onUnmounted as be, Fragment as te, unref as S, toDisplayString as N, renderList as ue, createBlock as J, Transition as $e, withCtx as W, nextTick as we, useId as de, provide as ge, createVNode as P, createTextVNode as me, onBeforeUnmount as Ie, Teleport as He, resolveDynamicComponent as Ve, useAttrs as Ne, inject as se, h as F, useSlots as Fe, resolveComponent as h1, vModelRadio as y1, vModelDynamic as g1, reactive as r1, TransitionGroup as b1, createApp as k1, shallowRef as w1, vModelText as Ae } from "vue";
|
|
2
2
|
import { routerKey as M1 } from "vue-router";
|
|
3
3
|
const L1 = ["aria-busy"], x1 = ["aria-label"], $1 = ["src", "srcset", "sizes", "alt", "aria-hidden", "loading", "decoding"], V1 = /* @__PURE__ */ T({
|
|
4
4
|
__name: "Image",
|
|
@@ -16,13 +16,13 @@ const L1 = ["aria-busy"], x1 = ["aria-label"], $1 = ["src", "srcset", "sizes", "
|
|
|
16
16
|
},
|
|
17
17
|
emits: ["loaded", "error"],
|
|
18
18
|
setup(e, { emit: o }) {
|
|
19
|
-
const t = e, a = o,
|
|
19
|
+
const t = e, a = o, n = h(t.src), i = h(), s = h("loading"), r = H(() => t.ratio ? {
|
|
20
20
|
aspectRatio: typeof t.ratio == "number" ? `${t.ratio}` : t.ratio
|
|
21
|
-
} : void 0),
|
|
21
|
+
} : void 0), l = () => {
|
|
22
22
|
s.value = "loaded", a("loaded");
|
|
23
23
|
}, d = () => {
|
|
24
|
-
if (t.fallbackSrc &&
|
|
25
|
-
|
|
24
|
+
if (t.fallbackSrc && n.value !== t.fallbackSrc) {
|
|
25
|
+
n.value = t.fallbackSrc, s.value = "loading";
|
|
26
26
|
return;
|
|
27
27
|
}
|
|
28
28
|
s.value = "error", a("error");
|
|
@@ -30,7 +30,7 @@ const L1 = ["aria-busy"], x1 = ["aria-label"], $1 = ["src", "srcset", "sizes", "
|
|
|
30
30
|
return Y(
|
|
31
31
|
() => t.src,
|
|
32
32
|
(u) => {
|
|
33
|
-
|
|
33
|
+
n.value = u, s.value = "loading";
|
|
34
34
|
}
|
|
35
35
|
), ae(() => i.value?.complete && i.value.naturalWidth > 0 && (s.value = "loaded")), (u, p) => (v(), f("div", {
|
|
36
36
|
class: re(["ui-image", {
|
|
@@ -39,7 +39,7 @@ const L1 = ["aria-busy"], x1 = ["aria-label"], $1 = ["src", "srcset", "sizes", "
|
|
|
39
39
|
"is-loaded": s.value === "loaded",
|
|
40
40
|
transform: e.transform
|
|
41
41
|
}]),
|
|
42
|
-
style: ye(
|
|
42
|
+
style: ye(r.value),
|
|
43
43
|
"aria-busy": s.value === "loading" || void 0
|
|
44
44
|
}, [
|
|
45
45
|
s.value === "loading" ? U(u.$slots, "placeholder", { key: 0 }, () => [
|
|
@@ -58,14 +58,14 @@ const L1 = ["aria-busy"], x1 = ["aria-label"], $1 = ["src", "srcset", "sizes", "
|
|
|
58
58
|
ref_key: "imgRef",
|
|
59
59
|
ref: i,
|
|
60
60
|
class: "ui-image__img",
|
|
61
|
-
src:
|
|
61
|
+
src: n.value,
|
|
62
62
|
srcset: e.srcset,
|
|
63
63
|
sizes: e.sizes,
|
|
64
64
|
alt: e.decorative ? "" : e.alt,
|
|
65
65
|
"aria-hidden": e.decorative || void 0,
|
|
66
66
|
loading: e.lazy ? "lazy" : void 0,
|
|
67
67
|
decoding: e.decoding,
|
|
68
|
-
onLoad:
|
|
68
|
+
onLoad: l,
|
|
69
69
|
onError: d
|
|
70
70
|
}, null, 40, $1), [
|
|
71
71
|
[qe, s.value !== "error"]
|
|
@@ -74,8 +74,8 @@ const L1 = ["aria-busy"], x1 = ["aria-label"], $1 = ["src", "srcset", "sizes", "
|
|
|
74
74
|
}
|
|
75
75
|
}), K = (e, o) => {
|
|
76
76
|
const t = e.__vccOpts || e;
|
|
77
|
-
for (const [a,
|
|
78
|
-
t[a] =
|
|
77
|
+
for (const [a, n] of o)
|
|
78
|
+
t[a] = n;
|
|
79
79
|
return t;
|
|
80
80
|
}, xe = /* @__PURE__ */ K(V1, [["__scopeId", "data-v-4c5a40da"]]);
|
|
81
81
|
xe.install = (e) => {
|
|
@@ -87,7 +87,7 @@ const I1 = /* @__PURE__ */ T({
|
|
|
87
87
|
const t = h();
|
|
88
88
|
return o({
|
|
89
89
|
el: t
|
|
90
|
-
}), (a,
|
|
90
|
+
}), (a, n) => (v(), f("button", Ce({
|
|
91
91
|
ref_key: "rootRef",
|
|
92
92
|
ref: t,
|
|
93
93
|
type: "button",
|
|
@@ -111,12 +111,12 @@ const H1 = ["id", "aria-checked", "aria-disabled", "disabled", "onKeydown"], B1
|
|
|
111
111
|
}),
|
|
112
112
|
emits: /* @__PURE__ */ ee(["change"], ["update:modelValue"]),
|
|
113
113
|
setup(e, { emit: o }) {
|
|
114
|
-
const t = fe(e, "modelValue"), a = o,
|
|
115
|
-
if (
|
|
116
|
-
const
|
|
117
|
-
t.value =
|
|
114
|
+
const t = fe(e, "modelValue"), a = o, n = e, i = H(() => t.value), s = () => {
|
|
115
|
+
if (n.disabled) return;
|
|
116
|
+
const r = !t.value;
|
|
117
|
+
t.value = r, a("change", r);
|
|
118
118
|
};
|
|
119
|
-
return (
|
|
119
|
+
return (r, l) => (v(), f("button", {
|
|
120
120
|
id: e.id,
|
|
121
121
|
role: "switch",
|
|
122
122
|
type: "button",
|
|
@@ -129,7 +129,7 @@ const H1 = ["id", "aria-checked", "aria-disabled", "disabled", "onKeydown"], B1
|
|
|
129
129
|
ve(le(s, ["prevent"]), ["space"]),
|
|
130
130
|
ve(le(s, ["prevent"]), ["enter"])
|
|
131
131
|
]
|
|
132
|
-
}, [...
|
|
132
|
+
}, [...l[0] || (l[0] = [
|
|
133
133
|
M("span", { class: "ui-toggle__track" }, [
|
|
134
134
|
M("span", { class: "ui-toggle__thumb" })
|
|
135
135
|
], -1)
|
|
@@ -167,24 +167,24 @@ const s1 = (e) => {
|
|
|
167
167
|
e.preventDefault();
|
|
168
168
|
const t = window.getSelection();
|
|
169
169
|
if (!t || t.rangeCount === 0) return;
|
|
170
|
-
const a = t.getRangeAt(0),
|
|
171
|
-
if (!
|
|
170
|
+
const a = t.getRangeAt(0), n = s1(a.startContainer);
|
|
171
|
+
if (!n) return;
|
|
172
172
|
const s = R1("p");
|
|
173
|
-
document.createRange().selectNodeContents(
|
|
174
|
-
const
|
|
175
|
-
d.selectNodeContents(
|
|
173
|
+
document.createRange().selectNodeContents(n);
|
|
174
|
+
const l = a.cloneRange(), d = document.createRange();
|
|
175
|
+
d.selectNodeContents(n), d.setEnd(l.startContainer, l.startOffset);
|
|
176
176
|
const u = d.cloneContents(), p = document.createRange();
|
|
177
|
-
p.selectNodeContents(
|
|
178
|
-
const
|
|
179
|
-
|
|
180
|
-
const
|
|
181
|
-
|
|
177
|
+
p.selectNodeContents(n), p.setStart(l.startContainer, l.startOffset);
|
|
178
|
+
const k = p.cloneContents();
|
|
179
|
+
n.innerHTML = "", n.appendChild(u), n.innerHTML === "" && (n.innerHTML = "<br>"), s.innerHTML = "", s.appendChild(k), s.innerHTML === "" && (s.innerHTML = "<br>"), n.after(s);
|
|
180
|
+
const y = document.createRange();
|
|
181
|
+
y.setStart(s, 0), y.collapse(!0), t.removeAllRanges(), t.addRange(y), o?.normalize();
|
|
182
182
|
}, T1 = () => {
|
|
183
183
|
const e = window.getSelection();
|
|
184
184
|
if (!e || e.rangeCount === 0) return;
|
|
185
185
|
const o = e.getRangeAt(0), t = document.createElement("br");
|
|
186
186
|
o.insertNode(t), o.setStartAfter(t), o.collapse(!0), e.removeAllRanges(), e.addRange(o);
|
|
187
|
-
},
|
|
187
|
+
}, Ge = (e) => {
|
|
188
188
|
const o = window.getSelection();
|
|
189
189
|
if (!o || o.rangeCount === 0) return;
|
|
190
190
|
const t = o.getRangeAt(0), a = s1(t.startContainer);
|
|
@@ -200,101 +200,101 @@ const s1 = (e) => {
|
|
|
200
200
|
o.selectNodeContents(e), o.collapse(!1), t?.removeAllRanges(), t?.addRange(o);
|
|
201
201
|
}, E1 = (e, o) => {
|
|
202
202
|
const t = h(null), a = o?.buttons ?? [];
|
|
203
|
-
let
|
|
203
|
+
let n = h(null);
|
|
204
204
|
const i = () => {
|
|
205
|
-
const
|
|
206
|
-
if (!
|
|
205
|
+
const b = e;
|
|
206
|
+
if (!b) return;
|
|
207
207
|
const I = window.getSelection();
|
|
208
208
|
if (!I || I.rangeCount === 0) return;
|
|
209
209
|
const D = I.getRangeAt(0);
|
|
210
|
-
|
|
211
|
-
}, s = (
|
|
210
|
+
b.contains(D.commonAncestorContainer) && (t.value = D.cloneRange());
|
|
211
|
+
}, s = (b) => {
|
|
212
212
|
const I = window.getSelection();
|
|
213
213
|
if (!I || I.rangeCount === 0 || I.isCollapsed) return !1;
|
|
214
214
|
const D = I.getRangeAt(0), V = e;
|
|
215
215
|
if (!V) return !1;
|
|
216
|
-
const _ =
|
|
217
|
-
if (_.forEach((
|
|
218
|
-
const x =
|
|
216
|
+
const _ = r(D, V), R = [];
|
|
217
|
+
if (_.forEach((w) => {
|
|
218
|
+
const x = w === D.startContainer ? D.startOffset : 0, E = w === D.endContainer ? D.endOffset : w.textContent.length;
|
|
219
219
|
if (x === E) return;
|
|
220
|
-
let
|
|
221
|
-
x === 0 && E ===
|
|
222
|
-
const Q = _1(
|
|
220
|
+
let G;
|
|
221
|
+
x === 0 && E === w.textContent.length ? G = w : (G = w.splitText(x), E - x < G.textContent.length && G.splitText(E - x));
|
|
222
|
+
const Q = _1(G, b, V);
|
|
223
223
|
if (Q)
|
|
224
|
-
D1(Q), R.push(
|
|
224
|
+
D1(Q), R.push(G);
|
|
225
225
|
else {
|
|
226
|
-
const oe = document.createElement(
|
|
227
|
-
|
|
226
|
+
const oe = document.createElement(b);
|
|
227
|
+
G.replaceWith(oe), oe.appendChild(G), R.push(G);
|
|
228
228
|
}
|
|
229
229
|
}), R.length > 0) {
|
|
230
|
-
const
|
|
231
|
-
|
|
230
|
+
const w = document.createRange();
|
|
231
|
+
w.setStart(R[0], 0);
|
|
232
232
|
const x = R[R.length - 1];
|
|
233
|
-
|
|
233
|
+
w.setEnd(x, x.textContent.length), I.removeAllRanges(), I.addRange(w), i();
|
|
234
234
|
}
|
|
235
|
-
return
|
|
236
|
-
},
|
|
237
|
-
if (!
|
|
238
|
-
const D =
|
|
235
|
+
return y(), c(b);
|
|
236
|
+
}, r = (b, I) => {
|
|
237
|
+
if (!b || !I || !(I instanceof HTMLElement)) return [];
|
|
238
|
+
const D = b.commonAncestorContainer, V = I.contains(D) ? I : D.nodeType === 3 ? D.parentNode : D, _ = document.createTreeWalker(
|
|
239
239
|
V,
|
|
240
240
|
NodeFilter.SHOW_TEXT,
|
|
241
241
|
{
|
|
242
242
|
acceptNode(x) {
|
|
243
|
-
return I.contains(x) &&
|
|
243
|
+
return I.contains(x) && b.intersectsNode(x) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_REJECT;
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
246
|
), R = [];
|
|
247
|
-
let
|
|
248
|
-
for (;
|
|
247
|
+
let w;
|
|
248
|
+
for (; w = _.nextNode(); ) R.push(w);
|
|
249
249
|
return R;
|
|
250
|
-
},
|
|
250
|
+
}, l = (b) => {
|
|
251
251
|
const I = window.getSelection();
|
|
252
252
|
if (!I || I.rangeCount === 0) return !1;
|
|
253
253
|
const D = I.getRangeAt(0), V = d(D.startContainer);
|
|
254
254
|
if (!V) return !1;
|
|
255
|
-
const R = V.tagName.toLowerCase() ===
|
|
256
|
-
for (R === "blockquote" &&
|
|
257
|
-
V.replaceWith(
|
|
255
|
+
const R = V.tagName.toLowerCase() === b.toLowerCase() ? "p" : b.toLowerCase(), w = document.createElement(R);
|
|
256
|
+
for (R === "blockquote" && w.setAttribute("class", "rs-blockquote"), w.dataset.block = "true"; V.firstChild; ) w.appendChild(V.firstChild);
|
|
257
|
+
V.replaceWith(w);
|
|
258
258
|
const x = document.createRange();
|
|
259
|
-
return x.selectNodeContents(
|
|
260
|
-
}, d = (
|
|
259
|
+
return x.selectNodeContents(w), I.removeAllRanges(), I.addRange(x), i(), y(), m(b);
|
|
260
|
+
}, d = (b) => {
|
|
261
261
|
const I = e;
|
|
262
262
|
if (!I) return null;
|
|
263
|
-
for (;
|
|
264
|
-
if (
|
|
265
|
-
|
|
263
|
+
for (; b && b !== I; ) {
|
|
264
|
+
if (b instanceof HTMLElement && b.dataset.block !== void 0) return b;
|
|
265
|
+
b = b.parentNode;
|
|
266
266
|
}
|
|
267
267
|
return null;
|
|
268
|
-
}, u = (
|
|
268
|
+
}, u = (b, I) => {
|
|
269
269
|
const D = e;
|
|
270
270
|
if (!D) return null;
|
|
271
|
-
for (;
|
|
272
|
-
if (
|
|
273
|
-
|
|
271
|
+
for (; b && b !== D; ) {
|
|
272
|
+
if (b instanceof HTMLElement && b.tagName.toLowerCase() === I.toLowerCase()) return b;
|
|
273
|
+
b = b.parentNode;
|
|
274
274
|
}
|
|
275
275
|
return null;
|
|
276
|
-
}, p = (
|
|
277
|
-
if (
|
|
276
|
+
}, p = (b) => {
|
|
277
|
+
if (b.key !== "Enter" || b.shiftKey) return;
|
|
278
278
|
const I = window.getSelection();
|
|
279
279
|
if (!I || I.rangeCount === 0) return;
|
|
280
280
|
const D = I.getRangeAt(0), V = u(D.startContainer, "li");
|
|
281
281
|
if (!V) return;
|
|
282
|
-
|
|
282
|
+
b.preventDefault(), b.stopPropagation();
|
|
283
283
|
const _ = V.parentElement;
|
|
284
284
|
if (!_) return;
|
|
285
285
|
if (V.textContent?.trim() === "") {
|
|
286
286
|
const x = document.createElement("p");
|
|
287
|
-
x.dataset.block = "true", x.innerHTML = "<br>", _.after(x), V.remove(), _.children.length === 0 && _.remove(),
|
|
287
|
+
x.dataset.block = "true", x.innerHTML = "<br>", _.after(x), V.remove(), _.children.length === 0 && _.remove(), k(x);
|
|
288
288
|
return;
|
|
289
289
|
}
|
|
290
|
-
const
|
|
291
|
-
|
|
292
|
-
},
|
|
290
|
+
const w = document.createElement("li");
|
|
291
|
+
w.innerHTML = "<br>", V.after(w), k(w);
|
|
292
|
+
}, k = (b) => {
|
|
293
293
|
const I = document.createRange(), D = window.getSelection();
|
|
294
|
-
I.selectNodeContents(
|
|
295
|
-
},
|
|
294
|
+
I.selectNodeContents(b), I.collapse(!0), D?.removeAllRanges(), D?.addRange(I);
|
|
295
|
+
}, y = () => {
|
|
296
296
|
e instanceof Node && e.normalize();
|
|
297
|
-
}, c = (
|
|
297
|
+
}, c = (b) => {
|
|
298
298
|
const I = t.value;
|
|
299
299
|
if (!I) return !1;
|
|
300
300
|
let D = I.startContainer;
|
|
@@ -302,11 +302,11 @@ const s1 = (e) => {
|
|
|
302
302
|
const V = e;
|
|
303
303
|
if (!V) return !1;
|
|
304
304
|
for (; D && D !== V; ) {
|
|
305
|
-
if (D instanceof HTMLElement && D.tagName.toLowerCase() ===
|
|
305
|
+
if (D instanceof HTMLElement && D.tagName.toLowerCase() === b.toLowerCase()) return !0;
|
|
306
306
|
D = D.parentNode;
|
|
307
307
|
}
|
|
308
308
|
return !1;
|
|
309
|
-
}, m = (
|
|
309
|
+
}, m = (b) => {
|
|
310
310
|
const I = t.value;
|
|
311
311
|
if (!I) return !1;
|
|
312
312
|
let D = I.startContainer;
|
|
@@ -314,56 +314,56 @@ const s1 = (e) => {
|
|
|
314
314
|
const V = e;
|
|
315
315
|
if (!V) return !1;
|
|
316
316
|
for (; D && D !== V; ) {
|
|
317
|
-
if (D instanceof HTMLElement && D.dataset.block !== void 0 && D.tagName.toLowerCase() ===
|
|
317
|
+
if (D instanceof HTMLElement && D.dataset.block !== void 0 && D.tagName.toLowerCase() === b.toLowerCase()) return !0;
|
|
318
318
|
D = D.parentNode;
|
|
319
319
|
}
|
|
320
320
|
return !1;
|
|
321
321
|
}, $ = () => {
|
|
322
|
-
const
|
|
323
|
-
|
|
322
|
+
const b = e;
|
|
323
|
+
b && b.focus();
|
|
324
324
|
}, L = () => {
|
|
325
|
-
const
|
|
326
|
-
if (!
|
|
325
|
+
const b = e;
|
|
326
|
+
if (!b || !t.value || !b || !b.contains(t.value.commonAncestorContainer)) return;
|
|
327
327
|
const I = window.getSelection();
|
|
328
328
|
I && (I.removeAllRanges(), I.addRange(t.value));
|
|
329
|
-
}, C = () =>
|
|
329
|
+
}, C = () => n.value?.focusFirstButton?.(), B = (b) => {
|
|
330
330
|
const I = window.getSelection();
|
|
331
331
|
if (!I || I.rangeCount === 0) return;
|
|
332
332
|
const D = I.getRangeAt(0), V = d(D.startContainer);
|
|
333
333
|
if (!V) return;
|
|
334
334
|
const _ = D.cloneRange();
|
|
335
335
|
_.selectNodeContents(V), _.setEnd(D.startContainer, D.startOffset);
|
|
336
|
-
const R = _.toString().length,
|
|
337
|
-
|
|
338
|
-
const x =
|
|
339
|
-
V.replaceWith(
|
|
336
|
+
const R = _.toString().length, w = D.cloneRange();
|
|
337
|
+
w.selectNodeContents(V), w.setEnd(D.endContainer, D.endOffset);
|
|
338
|
+
const x = w.toString().length, E = D.collapsed, G = b(V);
|
|
339
|
+
V.replaceWith(G);
|
|
340
340
|
const Q = document.createTreeWalker(
|
|
341
|
-
|
|
341
|
+
G,
|
|
342
342
|
NodeFilter.SHOW_TEXT,
|
|
343
343
|
null
|
|
344
344
|
);
|
|
345
|
-
let oe = 0, Z = null,
|
|
345
|
+
let oe = 0, Z = null, g = 0, A = null, X = 0;
|
|
346
346
|
for (; Q.nextNode(); ) {
|
|
347
347
|
const j = Q.currentNode, ie = j.textContent?.length ?? 0;
|
|
348
|
-
!Z && oe + ie >= R && (Z = j,
|
|
348
|
+
!Z && oe + ie >= R && (Z = j, g = R - oe), !A && oe + ie >= x && (A = j, X = x - oe), oe += ie;
|
|
349
349
|
}
|
|
350
350
|
const z = document.createRange();
|
|
351
|
-
Z ? z.setStart(Z,
|
|
352
|
-
}, O = (
|
|
351
|
+
Z ? z.setStart(Z, g) : z.setStart(G, 0), !E && A ? z.setEnd(A, X) : z.collapse(!0), I.removeAllRanges(), I.addRange(z), i(), y();
|
|
352
|
+
}, O = (b) => {
|
|
353
353
|
const I = e.parentElement?.querySelector("#editor-status");
|
|
354
|
-
I && (I.textContent =
|
|
354
|
+
I && (I.textContent = b, setTimeout(() => I.textContent = "", 2e3));
|
|
355
355
|
};
|
|
356
356
|
return e.addEventListener("keydown", p, { capture: !0 }), {
|
|
357
357
|
toggleInline: s,
|
|
358
|
-
toggleBlock:
|
|
359
|
-
normalize:
|
|
358
|
+
toggleBlock: l,
|
|
359
|
+
normalize: y,
|
|
360
360
|
rootElement: e,
|
|
361
361
|
saveSelection: i,
|
|
362
362
|
restoreSelection: L,
|
|
363
363
|
isInlineActive: c,
|
|
364
364
|
isBlockActive: m,
|
|
365
365
|
focus: $,
|
|
366
|
-
toolbarRef:
|
|
366
|
+
toolbarRef: n,
|
|
367
367
|
focusFirstToolbarButton: C,
|
|
368
368
|
replaceCurrentBlock: B,
|
|
369
369
|
buttons: a,
|
|
@@ -382,33 +382,33 @@ const s1 = (e) => {
|
|
|
382
382
|
ariaLabel: {}
|
|
383
383
|
},
|
|
384
384
|
setup(e, { expose: o }) {
|
|
385
|
-
const t = e, a = h(""),
|
|
386
|
-
if (
|
|
387
|
-
switch (
|
|
385
|
+
const t = e, a = h(""), n = h(null), i = (r) => {
|
|
386
|
+
if (r.ctrlKey || r.metaKey)
|
|
387
|
+
switch (r.altKey && r.key === "F10" && (r.preventDefault(), t.editor?.restoreSelection(), t.editor?.focusFirstToolbarButton()), r.key.toLowerCase()) {
|
|
388
388
|
case "b":
|
|
389
|
-
|
|
389
|
+
r.preventDefault(), t.editor?.restoreSelection(), t.editor?.toggleInline("strong"), t.editor?.focus(), t.editor?.announce(t.editor.isInlineActive("strong") ? "Bold enabled" : "Bold disabled");
|
|
390
390
|
break;
|
|
391
391
|
case "i":
|
|
392
|
-
|
|
392
|
+
r.preventDefault(), t.editor?.restoreSelection(), t.editor?.toggleInline("em"), t.editor?.focus(), t.editor?.announce(t.editor.isInlineActive("em") ? "Italic enabled" : "Italic disabled");
|
|
393
393
|
break;
|
|
394
394
|
case "1":
|
|
395
|
-
|
|
395
|
+
r.altKey && (r.preventDefault(), t.editor?.restoreSelection(), t.editor?.toggleBlock("h1"), t.editor?.focus(), t.editor?.announce(t.editor.isBlockActive("h1") ? "Heading level 1 enabled" : "Heading level 1 disabled"));
|
|
396
396
|
break;
|
|
397
397
|
}
|
|
398
398
|
}, s = () => {
|
|
399
|
-
const
|
|
400
|
-
if (!
|
|
401
|
-
const
|
|
402
|
-
if (!
|
|
403
|
-
const d =
|
|
404
|
-
|
|
399
|
+
const r = window.getSelection();
|
|
400
|
+
if (!r || r.rangeCount === 0) return;
|
|
401
|
+
const l = n.value;
|
|
402
|
+
if (!l) return;
|
|
403
|
+
const d = r.getRangeAt(0);
|
|
404
|
+
l.contains(d.commonAncestorContainer) && t.editor?.saveSelection();
|
|
405
405
|
};
|
|
406
|
-
return ae(() => document.addEventListener("selectionchange", s)),
|
|
407
|
-
getRoot: () =>
|
|
408
|
-
}), (
|
|
406
|
+
return ae(() => document.addEventListener("selectionchange", s)), be(() => document.removeEventListener("selectionchange", s)), o({
|
|
407
|
+
getRoot: () => n
|
|
408
|
+
}), (r, l) => (v(), f(te, null, [
|
|
409
409
|
M("div", {
|
|
410
410
|
ref_key: "rootRef",
|
|
411
|
-
ref:
|
|
411
|
+
ref: n,
|
|
412
412
|
class: "editor",
|
|
413
413
|
contenteditable: "",
|
|
414
414
|
id: e.editorId,
|
|
@@ -418,22 +418,22 @@ const s1 = (e) => {
|
|
|
418
418
|
"aria-describedby": "editor-help editor-status",
|
|
419
419
|
onKeydown: [
|
|
420
420
|
i,
|
|
421
|
-
|
|
422
|
-
|
|
421
|
+
l[0] || (l[0] = ve((d) => S(A1)(d, e.editor), ["enter"])),
|
|
422
|
+
l[1] || (l[1] = ve(
|
|
423
423
|
//@ts-ignore
|
|
424
|
-
(...d) => S(
|
|
424
|
+
(...d) => S(Ge) && S(Ge)(...d),
|
|
425
425
|
["backspace"]
|
|
426
426
|
))
|
|
427
427
|
],
|
|
428
|
-
onMouseup:
|
|
428
|
+
onMouseup: l[2] || (l[2] = //@ts-ignore
|
|
429
429
|
(...d) => e.editor?.saveSelection && e.editor?.saveSelection(...d)),
|
|
430
|
-
onKeyup:
|
|
430
|
+
onKeyup: l[3] || (l[3] = //@ts-ignore
|
|
431
431
|
(...d) => e.editor?.saveSelection && e.editor?.saveSelection(...d))
|
|
432
|
-
}, [...
|
|
432
|
+
}, [...l[4] || (l[4] = [
|
|
433
433
|
M("p", { "data-block": "" }, "Write here...", -1)
|
|
434
434
|
])], 40, z1),
|
|
435
435
|
M("div", O1, N(a.value), 1),
|
|
436
|
-
|
|
436
|
+
l[5] || (l[5] = M("p", {
|
|
437
437
|
id: "editor-help",
|
|
438
438
|
class: "sr-only"
|
|
439
439
|
}, " Use Ctrl+B for bold, Ctrl+I for italic, Alt+Ctrl+1 for heading level 1. ", -1))
|
|
@@ -540,7 +540,7 @@ const s1 = (e) => {
|
|
|
540
540
|
"stroke-linejoin": "round"
|
|
541
541
|
}
|
|
542
542
|
]
|
|
543
|
-
},
|
|
543
|
+
}, G1 = {
|
|
544
544
|
viewBox: "0 0 24 24",
|
|
545
545
|
paths: [
|
|
546
546
|
{
|
|
@@ -556,7 +556,7 @@ const s1 = (e) => {
|
|
|
556
556
|
"stroke-width": 2
|
|
557
557
|
}
|
|
558
558
|
]
|
|
559
|
-
},
|
|
559
|
+
}, X1 = {
|
|
560
560
|
viewBox: "0 0 24 24",
|
|
561
561
|
paths: [
|
|
562
562
|
{
|
|
@@ -957,7 +957,7 @@ const s1 = (e) => {
|
|
|
957
957
|
"stroke-width": 2
|
|
958
958
|
}
|
|
959
959
|
]
|
|
960
|
-
},
|
|
960
|
+
}, gt = {
|
|
961
961
|
viewBox: "0 0 24 24",
|
|
962
962
|
paths: [
|
|
963
963
|
{
|
|
@@ -967,7 +967,7 @@ const s1 = (e) => {
|
|
|
967
967
|
"stroke-width": 2
|
|
968
968
|
}
|
|
969
969
|
]
|
|
970
|
-
},
|
|
970
|
+
}, bt = {
|
|
971
971
|
viewBox: "0 0 24 24",
|
|
972
972
|
paths: [
|
|
973
973
|
{
|
|
@@ -1493,7 +1493,7 @@ const s1 = (e) => {
|
|
|
1493
1493
|
fill: "currentColor"
|
|
1494
1494
|
}
|
|
1495
1495
|
]
|
|
1496
|
-
},
|
|
1496
|
+
}, Gt = {
|
|
1497
1497
|
viewBox: "0 0 24 24",
|
|
1498
1498
|
paths: [
|
|
1499
1499
|
{
|
|
@@ -1523,7 +1523,7 @@ const s1 = (e) => {
|
|
|
1523
1523
|
"stroke-width": 2
|
|
1524
1524
|
}
|
|
1525
1525
|
]
|
|
1526
|
-
},
|
|
1526
|
+
}, Xt = {
|
|
1527
1527
|
viewBox: "0 0 24 24",
|
|
1528
1528
|
paths: [
|
|
1529
1529
|
{
|
|
@@ -1829,8 +1829,8 @@ const s1 = (e) => {
|
|
|
1829
1829
|
art: j1,
|
|
1830
1830
|
plus: Y1,
|
|
1831
1831
|
bars: W1,
|
|
1832
|
-
bell:
|
|
1833
|
-
lock:
|
|
1832
|
+
bell: G1,
|
|
1833
|
+
lock: X1,
|
|
1834
1834
|
star: J1,
|
|
1835
1835
|
home: et,
|
|
1836
1836
|
edit: Q1,
|
|
@@ -1843,7 +1843,7 @@ const s1 = (e) => {
|
|
|
1843
1843
|
head: ot,
|
|
1844
1844
|
bold: it,
|
|
1845
1845
|
card: ut,
|
|
1846
|
-
heart:
|
|
1846
|
+
heart: gt,
|
|
1847
1847
|
oList: dt,
|
|
1848
1848
|
uList: ct,
|
|
1849
1849
|
close: vt,
|
|
@@ -1866,7 +1866,7 @@ const s1 = (e) => {
|
|
|
1866
1866
|
eyeOff: Rt,
|
|
1867
1867
|
cookie: _t,
|
|
1868
1868
|
camera: $t,
|
|
1869
|
-
pencil:
|
|
1869
|
+
pencil: bt,
|
|
1870
1870
|
fashion: At,
|
|
1871
1871
|
addUser: St,
|
|
1872
1872
|
loading: Zt,
|
|
@@ -1883,9 +1883,9 @@ const s1 = (e) => {
|
|
|
1883
1883
|
sortDesc: jt,
|
|
1884
1884
|
location: Yt,
|
|
1885
1885
|
keyShield: Wt,
|
|
1886
|
-
clipboard:
|
|
1886
|
+
clipboard: Xt,
|
|
1887
1887
|
corporate: Jt,
|
|
1888
|
-
instagram:
|
|
1888
|
+
instagram: Gt,
|
|
1889
1889
|
arrowLeft: Qt,
|
|
1890
1890
|
starSolid: e2,
|
|
1891
1891
|
basketball: a2,
|
|
@@ -1917,7 +1917,7 @@ const s1 = (e) => {
|
|
|
1917
1917
|
fill: "none",
|
|
1918
1918
|
"aria-hidden": "true"
|
|
1919
1919
|
}, [
|
|
1920
|
-
(v(!0), f(te, null, ue(S(Se)[e.name].paths, (a,
|
|
1920
|
+
(v(!0), f(te, null, ue(S(Se)[e.name].paths, (a, n) => (v(), f(te, { key: n }, [
|
|
1921
1921
|
a.type === "path" ? (v(), f("path", Ce({
|
|
1922
1922
|
key: 0,
|
|
1923
1923
|
ref_for: !0
|
|
@@ -1953,15 +1953,15 @@ const s1 = (e) => {
|
|
|
1953
1953
|
buttons: {}
|
|
1954
1954
|
},
|
|
1955
1955
|
setup(e, { expose: o }) {
|
|
1956
|
-
const t = e, a = h(0),
|
|
1956
|
+
const t = e, a = h(0), n = h(0), i = h(!1), s = h([]);
|
|
1957
1957
|
Y(
|
|
1958
1958
|
i,
|
|
1959
1959
|
(c) => !c && (s.value = [])
|
|
1960
1960
|
);
|
|
1961
|
-
const
|
|
1962
|
-
top: `${
|
|
1961
|
+
const r = H(() => ({
|
|
1962
|
+
top: `${n.value}px`,
|
|
1963
1963
|
left: `${a.value}px`
|
|
1964
|
-
})),
|
|
1964
|
+
})), l = (c, m) => c && (s.value[m] = c), d = H(() => [
|
|
1965
1965
|
{
|
|
1966
1966
|
key: "strong",
|
|
1967
1967
|
label: "bold",
|
|
@@ -2018,7 +2018,7 @@ const s1 = (e) => {
|
|
|
2018
2018
|
...t.editor?.buttons ?? []
|
|
2019
2019
|
]), p = async () => {
|
|
2020
2020
|
await we(), s.value[0]?.focus();
|
|
2021
|
-
},
|
|
2021
|
+
}, k = (c) => {
|
|
2022
2022
|
const m = s.value, $ = m.indexOf(document.activeElement);
|
|
2023
2023
|
if (c.key === "ArrowRight") {
|
|
2024
2024
|
c.preventDefault();
|
|
@@ -2031,7 +2031,7 @@ const s1 = (e) => {
|
|
|
2031
2031
|
m[L]?.focus();
|
|
2032
2032
|
}
|
|
2033
2033
|
c.key === "Home" && (c.preventDefault(), m[0]?.focus()), c.key === "End" && (c.preventDefault(), m[m.length - 1]?.focus()), c.key === "Escape" && (c.preventDefault(), t.editor?.restoreSelection(), t.editor?.focus());
|
|
2034
|
-
},
|
|
2034
|
+
}, y = () => {
|
|
2035
2035
|
const c = window.getSelection();
|
|
2036
2036
|
if (!c || c.rangeCount === 0) {
|
|
2037
2037
|
i.value = !1;
|
|
@@ -2045,12 +2045,12 @@ const s1 = (e) => {
|
|
|
2045
2045
|
return;
|
|
2046
2046
|
}
|
|
2047
2047
|
const L = $.getBoundingClientRect();
|
|
2048
|
-
a.value = L.left + L.width / 2,
|
|
2048
|
+
a.value = L.left + L.width / 2, n.value = L.top - 45, i.value = !0;
|
|
2049
2049
|
};
|
|
2050
2050
|
return ae(() => {
|
|
2051
|
-
document.addEventListener("selectionchange",
|
|
2052
|
-
}),
|
|
2053
|
-
document.removeEventListener("selectionchange",
|
|
2051
|
+
document.addEventListener("selectionchange", y), window.addEventListener("scroll", y, !0), window.addEventListener("resize", y);
|
|
2052
|
+
}), be(() => {
|
|
2053
|
+
document.removeEventListener("selectionchange", y), window.removeEventListener("scroll", y, !0), window.removeEventListener("resize", y);
|
|
2054
2054
|
}), o({
|
|
2055
2055
|
focusFirstButton: p
|
|
2056
2056
|
}), (c, m) => (v(), J($e, { name: "tooltip-fade" }, {
|
|
@@ -2061,16 +2061,16 @@ const s1 = (e) => {
|
|
|
2061
2061
|
role: "toolbar",
|
|
2062
2062
|
"aria-label": "Formatting options",
|
|
2063
2063
|
"aria-controls": e.editorId,
|
|
2064
|
-
style: ye(
|
|
2064
|
+
style: ye(r.value),
|
|
2065
2065
|
tabindex: "-1",
|
|
2066
|
-
onKeydown:
|
|
2066
|
+
onKeydown: k
|
|
2067
2067
|
}, [
|
|
2068
2068
|
m[0] || (m[0] = M("div", { class: "arrow" }, null, -1)),
|
|
2069
2069
|
(v(!0), f(te, null, ue(u.value, ($, L) => (v(), f("button", {
|
|
2070
2070
|
key: $.key ?? L,
|
|
2071
2071
|
type: "button",
|
|
2072
2072
|
ref_for: !0,
|
|
2073
|
-
ref: (C) =>
|
|
2073
|
+
ref: (C) => l(C, L),
|
|
2074
2074
|
class: re({ "is-active": $.isActive?.(t.editor) }),
|
|
2075
2075
|
"aria-pressed": $.isActive?.(t.editor),
|
|
2076
2076
|
onMousedown: le((C) => $.action(t.editor), ["prevent"]),
|
|
@@ -2087,7 +2087,7 @@ const s1 = (e) => {
|
|
|
2087
2087
|
_: 1
|
|
2088
2088
|
}));
|
|
2089
2089
|
}
|
|
2090
|
-
}), y2 = /* @__PURE__ */ K(h2, [["__scopeId", "data-v-3f279ebe"]]),
|
|
2090
|
+
}), y2 = /* @__PURE__ */ K(h2, [["__scopeId", "data-v-3f279ebe"]]), g2 = { class: "editor" }, Xe = /* @__PURE__ */ T({
|
|
2091
2091
|
__name: "Editor",
|
|
2092
2092
|
props: /* @__PURE__ */ ee({
|
|
2093
2093
|
ariaLabel: {},
|
|
@@ -2100,20 +2100,20 @@ const s1 = (e) => {
|
|
|
2100
2100
|
}),
|
|
2101
2101
|
emits: ["update:modelValue"],
|
|
2102
2102
|
setup(e) {
|
|
2103
|
-
const o = fe(e, "modelValue"), t = e, a = de(),
|
|
2103
|
+
const o = fe(e, "modelValue"), t = e, a = de(), n = h(), i = h(null), s = h(null);
|
|
2104
2104
|
return Y(
|
|
2105
2105
|
() => o.value,
|
|
2106
|
-
(
|
|
2107
|
-
const
|
|
2108
|
-
|
|
2106
|
+
(r) => {
|
|
2107
|
+
const l = s.value?.getRoot()?.value;
|
|
2108
|
+
l && l.innerHTML !== r && (l.innerHTML = r, i.value?.normalize());
|
|
2109
2109
|
}
|
|
2110
2110
|
), ae(() => {
|
|
2111
|
-
const
|
|
2112
|
-
if (!
|
|
2113
|
-
i.value = E1(
|
|
2114
|
-
const d = () => o.value =
|
|
2115
|
-
|
|
2116
|
-
}),
|
|
2111
|
+
const l = s.value?.getRoot()?.value;
|
|
2112
|
+
if (!l) return;
|
|
2113
|
+
i.value = E1(l, { buttons: t.buttons ?? [] }), i.value && (i.value.toolbarRef = n);
|
|
2114
|
+
const d = () => o.value = l.innerHTML;
|
|
2115
|
+
l.addEventListener("input", d), be(() => l.removeEventListener("input", d));
|
|
2116
|
+
}), ge("announce", (r) => i.value?.announce(r)), (r, l) => (v(), f("section", g2, [
|
|
2117
2117
|
P(N1, {
|
|
2118
2118
|
ref_key: "contentRef",
|
|
2119
2119
|
ref: s,
|
|
@@ -2123,17 +2123,17 @@ const s1 = (e) => {
|
|
|
2123
2123
|
}, null, 8, ["editor", "editor-id", "aria-label"]),
|
|
2124
2124
|
P(y2, {
|
|
2125
2125
|
ref_key: "toolbarRef",
|
|
2126
|
-
ref:
|
|
2126
|
+
ref: n,
|
|
2127
2127
|
editor: i.value,
|
|
2128
2128
|
"editor-id": S(a)
|
|
2129
2129
|
}, null, 8, ["editor", "editor-id"])
|
|
2130
2130
|
]));
|
|
2131
2131
|
}
|
|
2132
2132
|
});
|
|
2133
|
-
|
|
2134
|
-
e.component("Editor",
|
|
2133
|
+
Xe.install = (e) => {
|
|
2134
|
+
e.component("Editor", Xe);
|
|
2135
2135
|
};
|
|
2136
|
-
const
|
|
2136
|
+
const b2 = ["tabindex", "aria-label", "aria-describedby", "aria-busy", "aria-disabled", "data-disabled", "data-dragging"], k2 = ["multiple", "accept", "disabled"], w2 = {
|
|
2137
2137
|
key: 1,
|
|
2138
2138
|
class: "ui-upload__list"
|
|
2139
2139
|
}, M2 = { class: "ui-upload__item--default" }, L2 = { class: "ui-upload__file-name" }, x2 = { class: "ui-upload__file-size" }, $2 = {
|
|
@@ -2174,84 +2174,84 @@ const g2 = ["tabindex", "aria-label", "aria-describedby", "aria-busy", "aria-dis
|
|
|
2174
2174
|
}),
|
|
2175
2175
|
emits: /* @__PURE__ */ ee(["select", "upload", "remove"], ["update:modelValue"]),
|
|
2176
2176
|
setup(e, { emit: o }) {
|
|
2177
|
-
const t = fe(e, "modelValue"), a = e,
|
|
2178
|
-
a.disabled || (i.value++,
|
|
2177
|
+
const t = fe(e, "modelValue"), a = e, n = o, i = h(0), s = h(""), r = h(!1), l = de(), d = h(), u = H(() => t.value), p = H(() => a.maxSize === 1 / 0 ? "Unlimited" : V(a.maxSize)), k = H(() => !a.disabled && (a.multiple || t.value.length === 0)), y = H(() => u.value.some((w) => w.status === "uploading")), c = () => k.value && d.value?.click(), m = () => {
|
|
2178
|
+
a.disabled || (i.value++, r.value = !0);
|
|
2179
2179
|
}, $ = () => {
|
|
2180
|
-
i.value = Math.max(0, i.value - 1), i.value === 0 && (
|
|
2181
|
-
}, L = (
|
|
2182
|
-
if (!a.disabled && !(!a.multiple && t.value.length > 0) && (i.value = 0,
|
|
2183
|
-
if (!a.multiple &&
|
|
2184
|
-
const x =
|
|
2180
|
+
i.value = Math.max(0, i.value - 1), i.value === 0 && (r.value = !1);
|
|
2181
|
+
}, L = (w) => {
|
|
2182
|
+
if (!a.disabled && !(!a.multiple && t.value.length > 0) && (i.value = 0, r.value = !1, !!w.dataTransfer)) {
|
|
2183
|
+
if (!a.multiple && w.dataTransfer?.files.length) {
|
|
2184
|
+
const x = w.dataTransfer.files[0];
|
|
2185
2185
|
B([x]);
|
|
2186
2186
|
return;
|
|
2187
2187
|
}
|
|
2188
|
-
B(Array.from(
|
|
2188
|
+
B(Array.from(w.dataTransfer.files));
|
|
2189
2189
|
}
|
|
2190
|
-
}, C = (
|
|
2191
|
-
const x =
|
|
2190
|
+
}, C = (w) => {
|
|
2191
|
+
const x = w.target;
|
|
2192
2192
|
x.files && (B(Array.from(x.files)), x.value = "");
|
|
2193
|
-
}, B = (
|
|
2193
|
+
}, B = (w) => {
|
|
2194
2194
|
const x = [];
|
|
2195
|
-
for (const
|
|
2195
|
+
for (const G of w) {
|
|
2196
2196
|
if (u.value.length + x.length >= a.maxFiles) break;
|
|
2197
|
-
|
|
2197
|
+
G.size > a.maxSize || x.push({
|
|
2198
2198
|
id: crypto.randomUUID(),
|
|
2199
|
-
file:
|
|
2199
|
+
file: G,
|
|
2200
2200
|
progress: 0,
|
|
2201
2201
|
status: "idle"
|
|
2202
2202
|
});
|
|
2203
2203
|
}
|
|
2204
2204
|
if (!x.length) return;
|
|
2205
|
-
|
|
2205
|
+
n("select", x.map((G) => G.file));
|
|
2206
2206
|
const E = [...u.value, ...x];
|
|
2207
2207
|
t.value = E, a.autoUpload && x.forEach(O);
|
|
2208
|
-
}, O = (
|
|
2208
|
+
}, O = (w) => {
|
|
2209
2209
|
const x = new AbortController();
|
|
2210
|
-
|
|
2210
|
+
w.progress = 0, w.error = void 0, w.status = "uploading", w.controller = x, _(`Started uploading ${w.file.name}`);
|
|
2211
2211
|
const E = () => {
|
|
2212
2212
|
x.signal.removeEventListener("abort", E);
|
|
2213
2213
|
};
|
|
2214
2214
|
x.signal.addEventListener("abort", E);
|
|
2215
|
-
const
|
|
2215
|
+
const G = {
|
|
2216
2216
|
signal: x.signal,
|
|
2217
2217
|
onProgress: (Q) => {
|
|
2218
|
-
|
|
2218
|
+
w.progress = Q, D();
|
|
2219
2219
|
},
|
|
2220
2220
|
done: () => {
|
|
2221
|
-
|
|
2221
|
+
w.status = "success", w.progress = 100, w.controller = void 0, _(`Finished uploading ${w.file.name}`), D();
|
|
2222
2222
|
},
|
|
2223
2223
|
fail: (Q) => {
|
|
2224
|
-
|
|
2224
|
+
w.status = "error", w.error = Q, w.controller = void 0, _(`Failed to upload ${w.file.name}: ${Q}`), D();
|
|
2225
2225
|
}
|
|
2226
2226
|
};
|
|
2227
|
-
|
|
2228
|
-
},
|
|
2229
|
-
|
|
2230
|
-
}, I = (
|
|
2231
|
-
|
|
2232
|
-
}, D = () => t.value = [...u.value], V = (
|
|
2227
|
+
n("upload", w, G);
|
|
2228
|
+
}, b = (w) => {
|
|
2229
|
+
w.controller && (w.controller.abort(), w.status = "canceled", w.controller = void 0, _(`Canceled uploading ${w.file.name}`), D());
|
|
2230
|
+
}, I = (w) => {
|
|
2231
|
+
w.status !== "error" && w.status !== "canceled" || O(w);
|
|
2232
|
+
}, D = () => t.value = [...u.value], V = (w) => {
|
|
2233
2233
|
const x = ["B", "KB", "MB", "GB", "TB"];
|
|
2234
2234
|
let E = 0;
|
|
2235
|
-
for (;
|
|
2236
|
-
|
|
2237
|
-
return `${
|
|
2238
|
-
}, _ = (
|
|
2235
|
+
for (; w >= 1024 && E < x.length - 1; )
|
|
2236
|
+
w /= 1024, E++;
|
|
2237
|
+
return `${w.toFixed(2)} ${x[E]}`;
|
|
2238
|
+
}, _ = (w) => {
|
|
2239
2239
|
s.value = "", requestAnimationFrame(() => {
|
|
2240
|
-
s.value =
|
|
2240
|
+
s.value = w;
|
|
2241
2241
|
});
|
|
2242
|
-
}, R = (
|
|
2243
|
-
|
|
2242
|
+
}, R = (w) => {
|
|
2243
|
+
w.controller && w.controller.abort(), n("remove", w), t.value = u.value.filter((x) => x.id !== w.id);
|
|
2244
2244
|
};
|
|
2245
|
-
return (
|
|
2245
|
+
return (w, x) => (v(), f("div", {
|
|
2246
2246
|
role: "button",
|
|
2247
2247
|
class: "ui-upload",
|
|
2248
2248
|
tabindex: e.disabled ? -1 : 0,
|
|
2249
2249
|
"aria-label": e.ariaLabel || "File upload area",
|
|
2250
|
-
"aria-describedby":
|
|
2251
|
-
"aria-busy":
|
|
2250
|
+
"aria-describedby": r.value ? S(l) : void 0,
|
|
2251
|
+
"aria-busy": y.value ? "true" : void 0,
|
|
2252
2252
|
"aria-disabled": e.disabled ? "true" : void 0,
|
|
2253
2253
|
"data-disabled": e.disabled || void 0,
|
|
2254
|
-
"data-dragging":
|
|
2254
|
+
"data-dragging": r.value || void 0,
|
|
2255
2255
|
onClick: x[0] || (x[0] = (E) => !e.disabled && c()),
|
|
2256
2256
|
onKeydown: [
|
|
2257
2257
|
x[1] || (x[1] = ve(le((E) => !e.disabled && c(), ["stop", "prevent"]), ["enter"])),
|
|
@@ -2271,9 +2271,9 @@ const g2 = ["tabindex", "aria-label", "aria-describedby", "aria-busy", "aria-dis
|
|
|
2271
2271
|
disabled: e.disabled,
|
|
2272
2272
|
onChange: C
|
|
2273
2273
|
}, null, 40, k2),
|
|
2274
|
-
e.multiple || !e.multiple && t.value.length === 0 ? U(
|
|
2274
|
+
e.multiple || !e.multiple && t.value.length === 0 ? U(w.$slots, "default", {
|
|
2275
2275
|
key: 0,
|
|
2276
|
-
dragging:
|
|
2276
|
+
dragging: r.value
|
|
2277
2277
|
}, () => [
|
|
2278
2278
|
P(ce, {
|
|
2279
2279
|
name: "upload",
|
|
@@ -2297,10 +2297,10 @@ const g2 = ["tabindex", "aria-label", "aria-describedby", "aria-busy", "aria-dis
|
|
|
2297
2297
|
key: E.id,
|
|
2298
2298
|
class: "ui-upload__item"
|
|
2299
2299
|
}, [
|
|
2300
|
-
U(
|
|
2300
|
+
U(w.$slots, "file", {
|
|
2301
2301
|
file: E,
|
|
2302
2302
|
remove: () => R(E),
|
|
2303
|
-
cancel: () =>
|
|
2303
|
+
cancel: () => b(E),
|
|
2304
2304
|
retry: () => I(E)
|
|
2305
2305
|
}, () => [
|
|
2306
2306
|
M("div", M2, [
|
|
@@ -2324,7 +2324,7 @@ const g2 = ["tabindex", "aria-label", "aria-describedby", "aria-busy", "aria-dis
|
|
|
2324
2324
|
key: 0,
|
|
2325
2325
|
type: "button",
|
|
2326
2326
|
class: "btn-danger btn-xs",
|
|
2327
|
-
onClick: le((
|
|
2327
|
+
onClick: le((G) => b(E), ["stop"])
|
|
2328
2328
|
}, {
|
|
2329
2329
|
default: W(() => [...x[8] || (x[8] = [
|
|
2330
2330
|
me(" Cancel ", -1)
|
|
@@ -2335,7 +2335,7 @@ const g2 = ["tabindex", "aria-label", "aria-describedby", "aria-busy", "aria-dis
|
|
|
2335
2335
|
key: 1,
|
|
2336
2336
|
type: "button",
|
|
2337
2337
|
class: "btn-info btn-xs",
|
|
2338
|
-
onClick: le((
|
|
2338
|
+
onClick: le((G) => I(E), ["stop"])
|
|
2339
2339
|
}, {
|
|
2340
2340
|
default: W(() => [...x[9] || (x[9] = [
|
|
2341
2341
|
me(" Retry ", -1)
|
|
@@ -2346,7 +2346,7 @@ const g2 = ["tabindex", "aria-label", "aria-describedby", "aria-busy", "aria-dis
|
|
|
2346
2346
|
key: 2,
|
|
2347
2347
|
type: "button",
|
|
2348
2348
|
class: "btn-outline btn-xs",
|
|
2349
|
-
onClick: le((
|
|
2349
|
+
onClick: le((G) => R(E), ["stop"]),
|
|
2350
2350
|
"aria-label": "Remove file"
|
|
2351
2351
|
}, {
|
|
2352
2352
|
default: W(() => [...x[10] || (x[10] = [
|
|
@@ -2360,10 +2360,10 @@ const g2 = ["tabindex", "aria-label", "aria-describedby", "aria-busy", "aria-dis
|
|
|
2360
2360
|
])) : q("", !0),
|
|
2361
2361
|
M("div", R2, N(s.value), 1),
|
|
2362
2362
|
M("p", {
|
|
2363
|
-
id: S(
|
|
2363
|
+
id: S(l),
|
|
2364
2364
|
class: "sr-only"
|
|
2365
2365
|
}, " Drop files to upload ", 8, A2)
|
|
2366
|
-
], 40,
|
|
2366
|
+
], 40, b2));
|
|
2367
2367
|
}
|
|
2368
2368
|
}), Je = /* @__PURE__ */ K(S2, [["__scopeId", "data-v-041ff337"]]);
|
|
2369
2369
|
Je.install = (e) => {
|
|
@@ -2383,15 +2383,15 @@ const T2 = (e) => {
|
|
|
2383
2383
|
disabled: { type: Boolean, default: !1 }
|
|
2384
2384
|
},
|
|
2385
2385
|
setup(e) {
|
|
2386
|
-
const o = e, t = z2 + O2, a = h(!1),
|
|
2387
|
-
let
|
|
2386
|
+
const o = e, t = z2 + O2, a = h(!1), n = `tooltip-${de()}`, i = h(null), s = h(null), r = h({});
|
|
2387
|
+
let l = null, d = null, u = null;
|
|
2388
2388
|
const p = () => {
|
|
2389
|
-
o.disabled || (
|
|
2390
|
-
a.value = !0,
|
|
2389
|
+
o.disabled || (l && (clearTimeout(l), l = null), o.delay ? l = window.setTimeout(() => {
|
|
2390
|
+
a.value = !0, l = null;
|
|
2391
2391
|
}, o.delay) : a.value = !0);
|
|
2392
|
-
},
|
|
2393
|
-
|
|
2394
|
-
},
|
|
2392
|
+
}, k = () => {
|
|
2393
|
+
l && (clearTimeout(l), l = null), a.value = !1;
|
|
2394
|
+
}, y = () => {
|
|
2395
2395
|
if (!i.value || !s.value) return {};
|
|
2396
2396
|
const m = i.value.getBoundingClientRect(), $ = s.value.getBoundingClientRect(), L = {
|
|
2397
2397
|
position: "fixed"
|
|
@@ -2412,7 +2412,7 @@ const T2 = (e) => {
|
|
|
2412
2412
|
}
|
|
2413
2413
|
return L;
|
|
2414
2414
|
}, c = () => {
|
|
2415
|
-
|
|
2415
|
+
r.value = y();
|
|
2416
2416
|
};
|
|
2417
2417
|
return Y(a, async (m) => {
|
|
2418
2418
|
if (!m) {
|
|
@@ -2427,14 +2427,14 @@ const T2 = (e) => {
|
|
|
2427
2427
|
ref_key: "triggerRef",
|
|
2428
2428
|
ref: i,
|
|
2429
2429
|
class: "tooltip-trigger",
|
|
2430
|
-
"aria-describedby": a.value ?
|
|
2430
|
+
"aria-describedby": a.value ? n : void 0,
|
|
2431
2431
|
"aria-disabled": e.disabled || void 0,
|
|
2432
2432
|
"aria-expanded": a.value || void 0,
|
|
2433
2433
|
onMouseenter: p,
|
|
2434
|
-
onMouseleave:
|
|
2434
|
+
onMouseleave: k,
|
|
2435
2435
|
onFocus: p,
|
|
2436
|
-
onBlur:
|
|
2437
|
-
onKeydown: ve(
|
|
2436
|
+
onBlur: k,
|
|
2437
|
+
onKeydown: ve(k, ["esc"])
|
|
2438
2438
|
}, [
|
|
2439
2439
|
U(m.$slots, "default", {}, void 0, !0)
|
|
2440
2440
|
], 40, Z2),
|
|
@@ -2445,13 +2445,13 @@ const T2 = (e) => {
|
|
|
2445
2445
|
key: 0,
|
|
2446
2446
|
ref_key: "tooltipRef",
|
|
2447
2447
|
ref: s,
|
|
2448
|
-
id:
|
|
2448
|
+
id: n,
|
|
2449
2449
|
class: "tooltip-content",
|
|
2450
2450
|
role: "tooltip",
|
|
2451
2451
|
"aria-live": "polite",
|
|
2452
2452
|
"aria-hidden": !a.value,
|
|
2453
2453
|
"data-placement": o.placement,
|
|
2454
|
-
style: ye(
|
|
2454
|
+
style: ye(r.value)
|
|
2455
2455
|
}, [
|
|
2456
2456
|
$[0] || ($[0] = M("div", { class: "tooltip-arrow" }, null, -1)),
|
|
2457
2457
|
U(m.$slots, "content", {}, () => [
|
|
@@ -2484,27 +2484,27 @@ const N2 = {
|
|
|
2484
2484
|
},
|
|
2485
2485
|
emits: ["click", "remove"],
|
|
2486
2486
|
setup(e, { emit: o }) {
|
|
2487
|
-
const t = e, a = o,
|
|
2487
|
+
const t = e, a = o, n = h(), i = H(() => t.clickable || t.as === "button" || t.as === "a"), s = H(() => [
|
|
2488
2488
|
`ui-tag--${t.variant}`,
|
|
2489
2489
|
`ui-tag--${t.size}`,
|
|
2490
2490
|
{
|
|
2491
2491
|
"is-clickable": t.clickable,
|
|
2492
2492
|
"is-removable": t.removable
|
|
2493
2493
|
}
|
|
2494
|
-
]),
|
|
2494
|
+
]), r = H(() => t.clickable && t.as !== "button" && t.as !== "a"), l = (u) => {
|
|
2495
2495
|
t.disabled || !i.value || a("click", u);
|
|
2496
2496
|
}, d = () => a("remove");
|
|
2497
2497
|
return (u, p) => (v(), J(Ve(e.as), {
|
|
2498
2498
|
ref_key: "rootRef",
|
|
2499
|
-
ref:
|
|
2499
|
+
ref: n,
|
|
2500
2500
|
class: re(["ui-tag", s.value]),
|
|
2501
2501
|
"aria-disabled": e.disabled || void 0,
|
|
2502
|
-
tabindex: e.disabled ? -1 :
|
|
2503
|
-
role:
|
|
2504
|
-
onClick:
|
|
2502
|
+
tabindex: e.disabled ? -1 : r.value ? 0 : void 0,
|
|
2503
|
+
role: r.value ? "button" : void 0,
|
|
2504
|
+
onClick: l,
|
|
2505
2505
|
onKeydown: [
|
|
2506
|
-
p[0] || (p[0] = ve(le((
|
|
2507
|
-
p[1] || (p[1] = ve(le((
|
|
2506
|
+
p[0] || (p[0] = ve(le((k) => !e.disabled && i.value && l(k), ["prevent"]), ["enter"])),
|
|
2507
|
+
p[1] || (p[1] = ve(le((k) => !e.disabled && i.value && l(k), ["prevent"]), ["space"]))
|
|
2508
2508
|
]
|
|
2509
2509
|
}, {
|
|
2510
2510
|
default: W(() => [
|
|
@@ -2540,7 +2540,7 @@ const N2 = {
|
|
|
2540
2540
|
},
|
|
2541
2541
|
emits: ["click"],
|
|
2542
2542
|
setup(e, { emit: o }) {
|
|
2543
|
-
const t = e, a = o,
|
|
2543
|
+
const t = e, a = o, n = (i) => {
|
|
2544
2544
|
if (t.disabled || i.button !== 0) {
|
|
2545
2545
|
i.preventDefault();
|
|
2546
2546
|
return;
|
|
@@ -2552,7 +2552,7 @@ const N2 = {
|
|
|
2552
2552
|
href: e.disabled ? void 0 : e.href,
|
|
2553
2553
|
"aria-disabled": e.disabled ? "true" : void 0,
|
|
2554
2554
|
tabindex: e.disabled ? -1 : 0,
|
|
2555
|
-
onClick:
|
|
2555
|
+
onClick: n,
|
|
2556
2556
|
target: e.target,
|
|
2557
2557
|
"aria-current": e.ariaCurrent,
|
|
2558
2558
|
rel: e.target === "_blank" ? "noopener noreferrer" : void 0
|
|
@@ -2560,12 +2560,12 @@ const N2 = {
|
|
|
2560
2560
|
U(i.$slots, "default", {}, void 0, !0)
|
|
2561
2561
|
], 8, j2));
|
|
2562
2562
|
}
|
|
2563
|
-
}),
|
|
2564
|
-
const
|
|
2565
|
-
return e.invalid && e.errorMessage &&
|
|
2566
|
-
}), Be = (e) => H(() => Object.keys(e).includes("required") && e.required !== "false" ? "true" : void 0), W2 = (e) => H(() => e.disabled === !0 ? "true" : void 0),
|
|
2563
|
+
}), Gn = /* @__PURE__ */ K(Y2, [["__scopeId", "data-v-0f5d7308"]]), Pe = (e, o, t, a) => H(() => {
|
|
2564
|
+
const n = [];
|
|
2565
|
+
return e.invalid && e.errorMessage && n.push(t), o.hint && n.push(a), n.length > 0 ? n.join(" ") : void 0;
|
|
2566
|
+
}), Be = (e) => H(() => Object.keys(e).includes("required") && e.required !== "false" ? "true" : void 0), W2 = (e) => H(() => e.disabled === !0 ? "true" : void 0), G2 = (e, o, t) => {
|
|
2567
2567
|
o && (o.classList.add("focused"), t("focus", e));
|
|
2568
|
-
},
|
|
2568
|
+
}, X2 = (e, o, t, a) => {
|
|
2569
2569
|
ze(o, t), t && (t?.classList.remove("focused"), a("blur", e));
|
|
2570
2570
|
}, ze = (e, o) => {
|
|
2571
2571
|
!e || !o || (e.value.length > 0 ? o.classList.add("filled") : o.classList.remove("filled"));
|
|
@@ -2627,18 +2627,18 @@ const N2 = {
|
|
|
2627
2627
|
}),
|
|
2628
2628
|
emits: /* @__PURE__ */ ee(["focus", "blur"], ["update:modelValue"]),
|
|
2629
2629
|
setup(e, { emit: o }) {
|
|
2630
|
-
const t = fe(e, "modelValue"), a = e,
|
|
2631
|
-
const { type:
|
|
2630
|
+
const t = fe(e, "modelValue"), a = e, n = o, i = Ne(), s = de(), r = `${s}-error`, l = `${s}-hint`, d = Be(i).value, u = h(!1), p = H(() => t.value !== null && t.value !== void 0 && t.value !== ""), k = H(() => d ? `${l} ${s}-required-hint` : l), y = H(() => a.invalid === !0 && a.errorMessage ? r : void 0), c = H(() => a.type === "password" ? $.value ? "text" : "password" : a.type), m = H(() => {
|
|
2631
|
+
const { type: b, ...I } = i;
|
|
2632
2632
|
return I;
|
|
2633
|
-
}), $ = h(!1), L = () => $.value = !$.value, C = (
|
|
2634
|
-
const I =
|
|
2633
|
+
}), $ = h(!1), L = () => $.value = !$.value, C = (b) => {
|
|
2634
|
+
const I = b.target;
|
|
2635
2635
|
t.value = a.type === "number" ? Number(I.value) : I.value;
|
|
2636
|
-
}, B = (
|
|
2637
|
-
u.value = !0,
|
|
2638
|
-
}, O = (
|
|
2639
|
-
u.value = !1,
|
|
2636
|
+
}, B = (b) => {
|
|
2637
|
+
u.value = !0, n("focus", b);
|
|
2638
|
+
}, O = (b) => {
|
|
2639
|
+
u.value = !1, n("blur", b);
|
|
2640
2640
|
};
|
|
2641
|
-
return (
|
|
2641
|
+
return (b, I) => (v(), f("div", {
|
|
2642
2642
|
class: re(["input-box", { required: S(d), error: e.invalid, filled: p.value, focused: u.value }])
|
|
2643
2643
|
}, [
|
|
2644
2644
|
M("label", {
|
|
@@ -2656,12 +2656,12 @@ const N2 = {
|
|
|
2656
2656
|
value: t.value,
|
|
2657
2657
|
required: S(d),
|
|
2658
2658
|
"aria-invalid": e.invalid ? "true" : void 0,
|
|
2659
|
-
"aria-errormessage":
|
|
2660
|
-
"aria-describedby": S(Pe)(
|
|
2659
|
+
"aria-errormessage": y.value,
|
|
2660
|
+
"aria-describedby": S(Pe)(b.$props, b.$slots, r, k.value).value
|
|
2661
2661
|
}), null, 16, aa),
|
|
2662
|
-
P(Ke, { hintId:
|
|
2662
|
+
P(Ke, { hintId: l }, {
|
|
2663
2663
|
default: W(() => [
|
|
2664
|
-
U(
|
|
2664
|
+
U(b.$slots, "hint", {}, void 0, !0)
|
|
2665
2665
|
]),
|
|
2666
2666
|
_: 3
|
|
2667
2667
|
}),
|
|
@@ -2670,11 +2670,11 @@ const N2 = {
|
|
|
2670
2670
|
isRequired: S(d)
|
|
2671
2671
|
}, null, 8, ["baseId", "isRequired"]),
|
|
2672
2672
|
P(je, {
|
|
2673
|
-
errorId:
|
|
2673
|
+
errorId: r,
|
|
2674
2674
|
invalid: e.invalid,
|
|
2675
2675
|
errorMessage: e.errorMessage
|
|
2676
2676
|
}, null, 8, ["invalid", "errorMessage"]),
|
|
2677
|
-
e.type === "password" ? (v(), J(he, Ce({ key: 0 }, Object.keys(
|
|
2677
|
+
e.type === "password" ? (v(), J(he, Ce({ key: 0 }, Object.keys(b.$attrs).includes("disabled") ? { disabled: !0 } : void 0, {
|
|
2678
2678
|
type: "button",
|
|
2679
2679
|
class: "btn-icon",
|
|
2680
2680
|
onClick: L,
|
|
@@ -2689,7 +2689,7 @@ const N2 = {
|
|
|
2689
2689
|
}, 16, ["aria-label"])) : q("", !0)
|
|
2690
2690
|
], 2));
|
|
2691
2691
|
}
|
|
2692
|
-
}),
|
|
2692
|
+
}), Xn = /* @__PURE__ */ K(oa, [["__scopeId", "data-v-97f2485f"]]), na = ["data-size", "data-shape", "aria-label", "aria-busy"], la = {
|
|
2693
2693
|
key: 1,
|
|
2694
2694
|
class: "ui-avatar__loading"
|
|
2695
2695
|
}, ra = {
|
|
@@ -2706,11 +2706,11 @@ const N2 = {
|
|
|
2706
2706
|
shape: { default: "circle" }
|
|
2707
2707
|
},
|
|
2708
2708
|
setup(e) {
|
|
2709
|
-
const o = e, t = h("loading"), a = H(() => o.src && t.value !== "error"),
|
|
2709
|
+
const o = e, t = h("loading"), a = H(() => o.src && t.value !== "error"), n = H(() => o.name ? o.name.split(" ").map((l) => l[0]).slice(0, 2).join("").toUpperCase() : ""), i = H(() => o.alt ? o.alt : o.name ? o.name : "Avatar"), s = () => t.value = "loaded", r = () => t.value = "error";
|
|
2710
2710
|
return Y(
|
|
2711
2711
|
() => o.src,
|
|
2712
2712
|
() => o.src && (t.value = "loading")
|
|
2713
|
-
), ae(() => !o.src && (t.value = "error")), (
|
|
2713
|
+
), ae(() => !o.src && (t.value = "error")), (l, d) => (v(), f("div", {
|
|
2714
2714
|
class: "ui-avatar",
|
|
2715
2715
|
"data-size": e.size,
|
|
2716
2716
|
"data-shape": e.shape,
|
|
@@ -2723,10 +2723,10 @@ const N2 = {
|
|
|
2723
2723
|
alt: e.alt ?? "",
|
|
2724
2724
|
class: "ui-avatar__img",
|
|
2725
2725
|
onLoad: s,
|
|
2726
|
-
onError:
|
|
2726
|
+
onError: r
|
|
2727
2727
|
}, null, 8, ["src", "alt"])) : t.value === "loading" ? (v(), f("div", la)) : (v(), f("div", ra, [
|
|
2728
|
-
U(
|
|
2729
|
-
me(N(
|
|
2728
|
+
U(l.$slots, "default", {}, () => [
|
|
2729
|
+
me(N(n.value), 1)
|
|
2730
2730
|
], !0)
|
|
2731
2731
|
]))
|
|
2732
2732
|
], 8, na));
|
|
@@ -2745,67 +2745,67 @@ const N2 = {
|
|
|
2745
2745
|
}),
|
|
2746
2746
|
emits: /* @__PURE__ */ ee(["focus", "blur", "change", "click"], ["update:modelValue"]),
|
|
2747
2747
|
setup(e, { emit: o }) {
|
|
2748
|
-
const t = fe(e, "modelValue"), a = e,
|
|
2748
|
+
const t = fe(e, "modelValue"), a = e, n = o, i = h(!1);
|
|
2749
2749
|
Y(i, (Z) => {
|
|
2750
2750
|
Z ? document.addEventListener("mousedown", Q) : document.removeEventListener("mousedown", Q);
|
|
2751
2751
|
});
|
|
2752
|
-
const s = Ne(),
|
|
2752
|
+
const s = Ne(), r = h(!1), l = h(null), d = H(() => a.id ?? de()), u = `${d.value}-label`, p = `${d.value}-listbox`, k = `${d.value}-error`, y = `${d.value}-hint`, c = `${d.value}-value`, m = h(null), $ = h(null), L = H(() => t.value !== null && t.value !== void 0 && t.value !== ""), C = H(() => m.value !== null ? `${p}-option-${m.value}` : void 0), B = Be(s).value, O = H(() => B ? `${y} ${d.value}-required-hint` : y), b = H(() => i.value && C.value ? C.value : void 0), I = H(() => $.value !== null ? a.options[$.value]?.value : "");
|
|
2753
2753
|
Y(
|
|
2754
2754
|
() => t.value,
|
|
2755
2755
|
() => oe()
|
|
2756
2756
|
);
|
|
2757
2757
|
const D = (Z) => {
|
|
2758
|
-
|
|
2758
|
+
r.value = !0, n("focus", Z);
|
|
2759
2759
|
}, V = (Z) => {
|
|
2760
|
-
const
|
|
2761
|
-
!A || A?.contains(
|
|
2760
|
+
const g = Z.relatedTarget, A = l.value;
|
|
2761
|
+
!A || A?.contains(g) || (r.value = !1, i.value = !1, n("blur", Z));
|
|
2762
2762
|
}, _ = (Z) => {
|
|
2763
|
-
i.value = !i.value, i.value && t.value.toString().length > 0 && (m.value = m.value ?? a.options.findIndex((
|
|
2764
|
-
}, R = (Z,
|
|
2765
|
-
const A =
|
|
2766
|
-
!A || Z.disabled || ($.value =
|
|
2767
|
-
},
|
|
2763
|
+
i.value = !i.value, i.value && t.value.toString().length > 0 && (m.value = m.value ?? a.options.findIndex((g) => !g.disabled)), !(!a.options || a.options.length === 0) && n("click", Z);
|
|
2764
|
+
}, R = (Z, g) => {
|
|
2765
|
+
const A = l.value;
|
|
2766
|
+
!A || Z.disabled || ($.value = g, m.value = g, Z && Z.key && Z.key.toString().length > 0 ? A.classList.add("filled") : A.classList.remove("filled"), t.value = Z.key, n("change", Z.key));
|
|
2767
|
+
}, w = (Z) => {
|
|
2768
2768
|
if (!i.value && ["ArrowDown", "ArrowUp"].includes(Z.key)) {
|
|
2769
|
-
i.value = !0, m.value = m.value ?? a.options.findIndex((
|
|
2769
|
+
i.value = !0, m.value = m.value ?? a.options.findIndex((g) => !g.disabled), Z.preventDefault();
|
|
2770
2770
|
return;
|
|
2771
2771
|
}
|
|
2772
2772
|
if (i.value) {
|
|
2773
2773
|
if (Z.key === "ArrowDown" && (x(1), Z.preventDefault()), Z.key === "ArrowUp" && (x(-1), Z.preventDefault()), Z.key === "Home") {
|
|
2774
|
-
const
|
|
2775
|
-
|
|
2774
|
+
const g = E();
|
|
2775
|
+
g >= 0 && (m.value = g), Z.preventDefault();
|
|
2776
2776
|
}
|
|
2777
2777
|
if (Z.key === "End") {
|
|
2778
|
-
const
|
|
2779
|
-
|
|
2778
|
+
const g = G();
|
|
2779
|
+
g >= 0 && (m.value = g), Z.preventDefault();
|
|
2780
2780
|
}
|
|
2781
2781
|
if (Z.key === "Enter" || Z.key === " ") {
|
|
2782
2782
|
if (m.value === null) return;
|
|
2783
|
-
const
|
|
2784
|
-
if (!
|
|
2785
|
-
R(
|
|
2783
|
+
const g = a.options[m.value];
|
|
2784
|
+
if (!g || g.disabled) return;
|
|
2785
|
+
R(g, m.value), i.value = !1, Z.preventDefault();
|
|
2786
2786
|
}
|
|
2787
2787
|
Z.key === "Escape" && (i.value = !1);
|
|
2788
2788
|
}
|
|
2789
2789
|
}, x = (Z) => {
|
|
2790
2790
|
if (m.value === null) return;
|
|
2791
|
-
let
|
|
2791
|
+
let g = m.value;
|
|
2792
2792
|
do
|
|
2793
|
-
|
|
2794
|
-
while (
|
|
2795
|
-
|
|
2796
|
-
}, E = () => a.options.findIndex((Z) => !Z.disabled),
|
|
2797
|
-
const
|
|
2798
|
-
!
|
|
2793
|
+
g += Z;
|
|
2794
|
+
while (g >= 0 && g < a.options.length && a.options[g]?.disabled);
|
|
2795
|
+
g >= 0 && g < a.options.length && (m.value = g);
|
|
2796
|
+
}, E = () => a.options.findIndex((Z) => !Z.disabled), G = () => [...a.options].reverse().findIndex((Z) => !Z.disabled) >= 0 ? a.options.length - 1 - [...a.options].reverse().findIndex((Z) => !Z.disabled) : -1, Q = (Z) => {
|
|
2797
|
+
const g = l.value;
|
|
2798
|
+
!g || g.contains(Z.target) || (i.value = !1);
|
|
2799
2799
|
};
|
|
2800
2800
|
Ie(() => {
|
|
2801
2801
|
document.removeEventListener("mousedown", Q);
|
|
2802
2802
|
});
|
|
2803
2803
|
const oe = () => {
|
|
2804
|
-
const Z = a.options.findIndex((
|
|
2804
|
+
const Z = a.options.findIndex((g) => g.key === t.value);
|
|
2805
2805
|
if (Z > -1) {
|
|
2806
2806
|
$.value = Z, m.value = Z;
|
|
2807
|
-
const
|
|
2808
|
-
|
|
2807
|
+
const g = l.value;
|
|
2808
|
+
g && g.classList.add("filled");
|
|
2809
2809
|
}
|
|
2810
2810
|
};
|
|
2811
2811
|
return ae(() => {
|
|
@@ -2813,10 +2813,10 @@ const N2 = {
|
|
|
2813
2813
|
if (!a.options || a.options.length === 0) return;
|
|
2814
2814
|
oe();
|
|
2815
2815
|
}
|
|
2816
|
-
}), (Z,
|
|
2816
|
+
}), (Z, g) => (v(), f("div", {
|
|
2817
2817
|
ref_key: "selectRef",
|
|
2818
|
-
ref:
|
|
2819
|
-
class: re(["select-box", { required: Object.keys(Z.$attrs).includes("required"), error: e.invalid, filled: L.value, focused:
|
|
2818
|
+
ref: l,
|
|
2819
|
+
class: re(["select-box", { required: Object.keys(Z.$attrs).includes("required"), error: e.invalid, filled: L.value, focused: r.value }])
|
|
2820
2820
|
}, [
|
|
2821
2821
|
M("button", Ce({
|
|
2822
2822
|
id: d.value,
|
|
@@ -2830,13 +2830,13 @@ const N2 = {
|
|
|
2830
2830
|
"aria-invalid": e.invalid ? "true" : void 0,
|
|
2831
2831
|
"aria-labelledby": `${u} ${c}`,
|
|
2832
2832
|
"aria-required": S(B),
|
|
2833
|
-
"aria-describedby": S(Pe)(Z.$props, Z.$slots,
|
|
2834
|
-
"aria-activedescendant":
|
|
2833
|
+
"aria-describedby": S(Pe)(Z.$props, Z.$slots, k, O.value).value,
|
|
2834
|
+
"aria-activedescendant": b.value,
|
|
2835
2835
|
"aria-disabled": S(s).disabled ? "true" : void 0,
|
|
2836
2836
|
onBlur: V,
|
|
2837
2837
|
onFocus: D,
|
|
2838
2838
|
onClick: _,
|
|
2839
|
-
onKeydown:
|
|
2839
|
+
onKeydown: w,
|
|
2840
2840
|
ref: "buttonRef"
|
|
2841
2841
|
}), [
|
|
2842
2842
|
M("span", {
|
|
@@ -2862,14 +2862,14 @@ const N2 = {
|
|
|
2862
2862
|
role: "listbox",
|
|
2863
2863
|
class: "options"
|
|
2864
2864
|
}, [
|
|
2865
|
-
(v(!0), f(te, null, ue(e.options, (A,
|
|
2866
|
-
id: `${p}-option-${
|
|
2867
|
-
key:
|
|
2865
|
+
(v(!0), f(te, null, ue(e.options, (A, X) => (v(), f("li", {
|
|
2866
|
+
id: `${p}-option-${X}`,
|
|
2867
|
+
key: X,
|
|
2868
2868
|
role: "option",
|
|
2869
|
-
class: re(["option", { "focus-visible": m.value ===
|
|
2869
|
+
class: re(["option", { "focus-visible": m.value === X }]),
|
|
2870
2870
|
"aria-disabled": A.disabled,
|
|
2871
|
-
"aria-selected": $.value ===
|
|
2872
|
-
onClick: (z) => !A.disabled && R(A,
|
|
2871
|
+
"aria-selected": $.value === X,
|
|
2872
|
+
onClick: (z) => !A.disabled && R(A, X)
|
|
2873
2873
|
}, [
|
|
2874
2874
|
M("div", {
|
|
2875
2875
|
class: "option-value",
|
|
@@ -2882,7 +2882,7 @@ const N2 = {
|
|
|
2882
2882
|
]),
|
|
2883
2883
|
_: 1
|
|
2884
2884
|
}),
|
|
2885
|
-
P(Ke, { hintId:
|
|
2885
|
+
P(Ke, { hintId: y }, {
|
|
2886
2886
|
default: W(() => [
|
|
2887
2887
|
U(Z.$slots, "hint", {}, void 0, !0)
|
|
2888
2888
|
]),
|
|
@@ -2893,7 +2893,7 @@ const N2 = {
|
|
|
2893
2893
|
isRequired: S(B)
|
|
2894
2894
|
}, null, 8, ["baseId", "isRequired"]),
|
|
2895
2895
|
P(je, {
|
|
2896
|
-
errorId:
|
|
2896
|
+
errorId: k,
|
|
2897
2897
|
invalid: e.invalid,
|
|
2898
2898
|
errorMessage: e.errorMessage
|
|
2899
2899
|
}, null, 8, ["invalid", "errorMessage"])
|
|
@@ -2923,26 +2923,26 @@ const N2 = {
|
|
|
2923
2923
|
}),
|
|
2924
2924
|
emits: /* @__PURE__ */ ee(["change"], ["update:modelValue"]),
|
|
2925
2925
|
setup(e, { emit: o }) {
|
|
2926
|
-
const t = fe(e, "modelValue"), a = e,
|
|
2926
|
+
const t = fe(e, "modelValue"), a = e, n = o, i = h([]), s = h("next"), r = h(null), l = `gallery-caption-${de()}`, d = h(null), u = H(() => t.value), p = H(() => a.images[u.value]), k = (C, B) => {
|
|
2927
2927
|
C && (i.value[B] = C);
|
|
2928
|
-
},
|
|
2929
|
-
C !== u.value && (s.value = C > u.value ? "next" : "prev", t.value = C,
|
|
2928
|
+
}, y = (C) => {
|
|
2929
|
+
C !== u.value && (s.value = C > u.value ? "next" : "prev", t.value = C, n("change", C));
|
|
2930
2930
|
}, c = () => {
|
|
2931
2931
|
if (u.value === a.images.length - 1) {
|
|
2932
|
-
a.loop &&
|
|
2932
|
+
a.loop && y(0);
|
|
2933
2933
|
return;
|
|
2934
2934
|
}
|
|
2935
|
-
|
|
2935
|
+
y(u.value + 1);
|
|
2936
2936
|
}, m = () => {
|
|
2937
2937
|
if (u.value === 0) {
|
|
2938
|
-
a.loop &&
|
|
2938
|
+
a.loop && y(a.images.length - 1);
|
|
2939
2939
|
return;
|
|
2940
2940
|
}
|
|
2941
|
-
|
|
2941
|
+
y(u.value - 1);
|
|
2942
2942
|
}, $ = () => {
|
|
2943
|
-
d.value && (
|
|
2943
|
+
d.value && (r.value = d.value.offsetHeight);
|
|
2944
2944
|
}, L = () => {
|
|
2945
|
-
|
|
2945
|
+
r.value = null;
|
|
2946
2946
|
};
|
|
2947
2947
|
return Y(u, async (C) => {
|
|
2948
2948
|
await we();
|
|
@@ -2960,14 +2960,14 @@ const N2 = {
|
|
|
2960
2960
|
"aria-roledescription": "carousel",
|
|
2961
2961
|
"aria-label": e.ariaLabel || "Image gallery",
|
|
2962
2962
|
"aria-live": "polite",
|
|
2963
|
-
"aria-describedby":
|
|
2963
|
+
"aria-describedby": l
|
|
2964
2964
|
}, [
|
|
2965
2965
|
M("div", {
|
|
2966
2966
|
ref_key: "previewRef",
|
|
2967
2967
|
ref: d,
|
|
2968
2968
|
tabindex: "0",
|
|
2969
2969
|
class: "rs-gallery-review",
|
|
2970
|
-
style: ye(
|
|
2970
|
+
style: ye(r.value ? { height: `${r.value}px` } : void 0),
|
|
2971
2971
|
onKeydown: [
|
|
2972
2972
|
ve(le(m, ["prevent"]), ["left"]),
|
|
2973
2973
|
ve(le(c, ["prevent"]), ["right"])
|
|
@@ -2996,24 +2996,24 @@ const N2 = {
|
|
|
2996
2996
|
], 44, pa),
|
|
2997
2997
|
p.value?.title ? (v(), f("p", {
|
|
2998
2998
|
key: 0,
|
|
2999
|
-
id:
|
|
2999
|
+
id: l,
|
|
3000
3000
|
class: "rs-gallery-caption"
|
|
3001
3001
|
}, N(p.value.title), 1)) : q("", !0),
|
|
3002
3002
|
e.showThumbnails ? (v(), f("ul", Ca, [
|
|
3003
|
-
(v(!0), f(te, null, ue(e.images, (O,
|
|
3003
|
+
(v(!0), f(te, null, ue(e.images, (O, b) => (v(), f("li", {
|
|
3004
3004
|
key: O.src,
|
|
3005
3005
|
ref_for: !0,
|
|
3006
|
-
ref: (I) =>
|
|
3007
|
-
"aria-selected": u.value ===
|
|
3006
|
+
ref: (I) => k(I, b),
|
|
3007
|
+
"aria-selected": u.value === b
|
|
3008
3008
|
}, [
|
|
3009
3009
|
M("button", {
|
|
3010
3010
|
type: "button",
|
|
3011
|
-
class: re(["rs-gallery-thumb", { active: u.value ===
|
|
3012
|
-
onClick: (I) => b
|
|
3011
|
+
class: re(["rs-gallery-thumb", { active: u.value === b }]),
|
|
3012
|
+
onClick: (I) => y(b)
|
|
3013
3013
|
}, [
|
|
3014
3014
|
P(xe, {
|
|
3015
3015
|
src: O.src,
|
|
3016
|
-
alt: `Select image ${
|
|
3016
|
+
alt: `Select image ${b + 1}`,
|
|
3017
3017
|
transform: e.transformThumbnails
|
|
3018
3018
|
}, null, 8, ["src", "alt", "transform"])
|
|
3019
3019
|
], 10, ha)
|
|
@@ -3021,7 +3021,7 @@ const N2 = {
|
|
|
3021
3021
|
])) : q("", !0)
|
|
3022
3022
|
], 8, fa));
|
|
3023
3023
|
}
|
|
3024
|
-
}), i1 = /* @__PURE__ */ K(ya, [["__scopeId", "data-v-dcfacff6"]]),
|
|
3024
|
+
}), i1 = /* @__PURE__ */ K(ya, [["__scopeId", "data-v-dcfacff6"]]), ga = ["aria-label"], ba = ["onClick"], ka = /* @__PURE__ */ T({
|
|
3025
3025
|
__name: "GalleryGrid",
|
|
3026
3026
|
props: {
|
|
3027
3027
|
images: {},
|
|
@@ -3042,19 +3042,19 @@ const N2 = {
|
|
|
3042
3042
|
role: "list",
|
|
3043
3043
|
"aria-label": e.ariaLabel || "Image grid gallery"
|
|
3044
3044
|
}, [
|
|
3045
|
-
(v(!0), f(te, null, ue(e.images, (a,
|
|
3045
|
+
(v(!0), f(te, null, ue(e.images, (a, n) => (v(), f("button", {
|
|
3046
3046
|
key: a.src,
|
|
3047
3047
|
type: "button",
|
|
3048
3048
|
class: "grid-item",
|
|
3049
|
-
onClick: (i) => o.$emit("change",
|
|
3049
|
+
onClick: (i) => o.$emit("change", n)
|
|
3050
3050
|
}, [
|
|
3051
3051
|
P(xe, {
|
|
3052
3052
|
src: a.src,
|
|
3053
3053
|
alt: a.alt || "",
|
|
3054
3054
|
transform: e.transform
|
|
3055
3055
|
}, null, 8, ["src", "alt", "transform"])
|
|
3056
|
-
], 8,
|
|
3057
|
-
], 12,
|
|
3056
|
+
], 8, ba))), 128))
|
|
3057
|
+
], 12, ga));
|
|
3058
3058
|
}
|
|
3059
3059
|
}), u1 = /* @__PURE__ */ K(ka, [["__scopeId", "data-v-17067a4b"]]), _e = /* @__PURE__ */ Symbol("ModalContext");
|
|
3060
3060
|
let Te = 0, e1 = 0, Ze = null;
|
|
@@ -3074,19 +3074,19 @@ const Oe = T({
|
|
|
3074
3074
|
},
|
|
3075
3075
|
emits: ["update:open", "opened", "closed"],
|
|
3076
3076
|
setup(e, { emit: o, slots: t }) {
|
|
3077
|
-
const a = h(!1),
|
|
3078
|
-
Y(() => e.open, (p) =>
|
|
3077
|
+
const a = h(!1), n = h(e.open), i = de(), s = `modal-title-${i}`, r = `modal-desc-${i}`;
|
|
3078
|
+
Y(() => e.open, (p) => n.value = p), Y(n, (p) => {
|
|
3079
3079
|
o("update:open", p), o(p ? "opened" : "closed");
|
|
3080
3080
|
});
|
|
3081
|
-
const
|
|
3082
|
-
return
|
|
3083
|
-
isOpen:
|
|
3081
|
+
const l = () => n.value = !1, d = H(() => e.motion), u = H(() => e.size);
|
|
3082
|
+
return ge(_e, {
|
|
3083
|
+
isOpen: n,
|
|
3084
3084
|
motion: d,
|
|
3085
3085
|
size: u,
|
|
3086
|
-
close:
|
|
3086
|
+
close: l,
|
|
3087
3087
|
closeOnOverlay: e.closeOnOverlay,
|
|
3088
3088
|
labelId: s,
|
|
3089
|
-
descriptionId:
|
|
3089
|
+
descriptionId: r,
|
|
3090
3090
|
hasTitle: a
|
|
3091
3091
|
}), () => t.default?.();
|
|
3092
3092
|
}
|
|
@@ -3095,11 +3095,11 @@ const Oe = T({
|
|
|
3095
3095
|
setup(e, { slots: o }) {
|
|
3096
3096
|
const t = se(_e);
|
|
3097
3097
|
if (!t) throw new Error("ModalContent components must be used inside <Modal>");
|
|
3098
|
-
const a = h(null),
|
|
3099
|
-
u.key === "Escape" &&
|
|
3098
|
+
const a = h(null), n = ++Te, i = (u) => {
|
|
3099
|
+
u.key === "Escape" && n === Te && t.close();
|
|
3100
3100
|
};
|
|
3101
3101
|
let s = null;
|
|
3102
|
-
const
|
|
3102
|
+
const r = (u) => {
|
|
3103
3103
|
const p = Array.from(
|
|
3104
3104
|
u.querySelectorAll(
|
|
3105
3105
|
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
@@ -3109,13 +3109,13 @@ const Oe = T({
|
|
|
3109
3109
|
u.setAttribute("tabindex", "-1"), u.focus();
|
|
3110
3110
|
return;
|
|
3111
3111
|
}
|
|
3112
|
-
const
|
|
3113
|
-
m.key === "Tab" && (m.shiftKey && document.activeElement ===
|
|
3112
|
+
const k = p[0], y = p[p.length - 1], c = (m) => {
|
|
3113
|
+
m.key === "Tab" && (m.shiftKey && document.activeElement === k ? (m.preventDefault(), y?.focus()) : !m.shiftKey && document.activeElement === y && (m.preventDefault(), k?.focus()));
|
|
3114
3114
|
};
|
|
3115
|
-
u.addEventListener("keydown", c),
|
|
3115
|
+
u.addEventListener("keydown", c), k?.focus(), s = () => {
|
|
3116
3116
|
u.removeEventListener("keydown", c), s = null;
|
|
3117
3117
|
};
|
|
3118
|
-
},
|
|
3118
|
+
}, l = () => {
|
|
3119
3119
|
++e1 === 1 && (document.body.style.overflow = "hidden");
|
|
3120
3120
|
}, d = () => {
|
|
3121
3121
|
--e1 === 0 && (document.body.style.overflow = "");
|
|
@@ -3129,10 +3129,10 @@ const Oe = T({
|
|
|
3129
3129
|
name: `modal-${t.motion.value}`,
|
|
3130
3130
|
appear: !0,
|
|
3131
3131
|
onEnter: () => {
|
|
3132
|
-
Ze = document.activeElement,
|
|
3132
|
+
Ze = document.activeElement, l();
|
|
3133
3133
|
},
|
|
3134
3134
|
onAfterEnter: () => {
|
|
3135
|
-
a.value && (
|
|
3135
|
+
a.value && (r(a.value), document.addEventListener("keydown", i));
|
|
3136
3136
|
},
|
|
3137
3137
|
onAfterLeave: () => {
|
|
3138
3138
|
Te--, document.removeEventListener("keydown", i), s?.(), d(), Ze?.focus(), Ze = null;
|
|
@@ -3224,7 +3224,7 @@ const wa = /* @__PURE__ */ T({
|
|
|
3224
3224
|
setup(e) {
|
|
3225
3225
|
const o = h(0), t = h(!1), a = (i) => {
|
|
3226
3226
|
o.value = i, t.value = !0;
|
|
3227
|
-
},
|
|
3227
|
+
}, n = () => t.value = !1;
|
|
3228
3228
|
return (i, s) => (v(), f(te, null, [
|
|
3229
3229
|
P(u1, {
|
|
3230
3230
|
images: e.images,
|
|
@@ -3234,7 +3234,7 @@ const wa = /* @__PURE__ */ T({
|
|
|
3234
3234
|
}, null, 8, ["images", "aria-label", "transform"]),
|
|
3235
3235
|
P(S(Oe), {
|
|
3236
3236
|
open: t.value,
|
|
3237
|
-
"onUpdate:open": s[2] || (s[2] = (
|
|
3237
|
+
"onUpdate:open": s[2] || (s[2] = (r) => t.value = r),
|
|
3238
3238
|
motion: "fade",
|
|
3239
3239
|
size: "xl"
|
|
3240
3240
|
}, {
|
|
@@ -3257,10 +3257,10 @@ const wa = /* @__PURE__ */ T({
|
|
|
3257
3257
|
default: W(() => [
|
|
3258
3258
|
P(i1, {
|
|
3259
3259
|
modelValue: o.value,
|
|
3260
|
-
"onUpdate:modelValue": s[0] || (s[0] = (
|
|
3260
|
+
"onUpdate:modelValue": s[0] || (s[0] = (r) => o.value = r),
|
|
3261
3261
|
images: e.images,
|
|
3262
|
-
onChange: s[1] || (s[1] = (
|
|
3263
|
-
onClose:
|
|
3262
|
+
onChange: s[1] || (s[1] = (r) => i.$emit("change", r)),
|
|
3263
|
+
onClose: n,
|
|
3264
3264
|
"aria-label": e.ariaLabel,
|
|
3265
3265
|
"transform-thumbnails": e.transform
|
|
3266
3266
|
}, null, 8, ["modelValue", "images", "aria-label", "transform-thumbnails"])
|
|
@@ -3327,17 +3327,17 @@ const wa = /* @__PURE__ */ T({
|
|
|
3327
3327
|
}),
|
|
3328
3328
|
emits: /* @__PURE__ */ ee(["change"], ["update:modelValue"]),
|
|
3329
3329
|
setup(e, { emit: o }) {
|
|
3330
|
-
const t = fe(e, "modelValue"), a = o,
|
|
3330
|
+
const t = fe(e, "modelValue"), a = o, n = H({
|
|
3331
3331
|
get: () => t.value ?? 0,
|
|
3332
3332
|
set: (s) => {
|
|
3333
3333
|
t.value = s, a("change", s);
|
|
3334
3334
|
}
|
|
3335
|
-
}), i = (s) =>
|
|
3336
|
-
return (s,
|
|
3335
|
+
}), i = (s) => n.value = s;
|
|
3336
|
+
return (s, r) => (v(), f("section", $a, [
|
|
3337
3337
|
e.layout === "carousel" ? (v(), J(i1, {
|
|
3338
3338
|
key: 0,
|
|
3339
|
-
modelValue:
|
|
3340
|
-
"onUpdate:modelValue":
|
|
3339
|
+
modelValue: n.value,
|
|
3340
|
+
"onUpdate:modelValue": r[0] || (r[0] = (l) => n.value = l),
|
|
3341
3341
|
images: e.images,
|
|
3342
3342
|
loop: e.loop,
|
|
3343
3343
|
"aria-label": e.ariaLabel,
|
|
@@ -3346,8 +3346,8 @@ const wa = /* @__PURE__ */ T({
|
|
|
3346
3346
|
"show-thumbnails": e.showThumbnails
|
|
3347
3347
|
}, null, 8, ["modelValue", "images", "loop", "aria-label", "transform", "transform-thumbnails", "show-thumbnails"])) : e.layout === "grid" ? (v(), J(u1, {
|
|
3348
3348
|
key: 1,
|
|
3349
|
-
modelValue:
|
|
3350
|
-
"onUpdate:modelValue":
|
|
3349
|
+
modelValue: n.value,
|
|
3350
|
+
"onUpdate:modelValue": r[1] || (r[1] = (l) => n.value = l),
|
|
3351
3351
|
images: e.images,
|
|
3352
3352
|
onSelect: i,
|
|
3353
3353
|
columns: e.columns,
|
|
@@ -3356,15 +3356,15 @@ const wa = /* @__PURE__ */ T({
|
|
|
3356
3356
|
"aria-label": e.ariaLabel
|
|
3357
3357
|
}, null, 8, ["modelValue", "images", "columns", "gap", "transform", "aria-label"])) : e.layout === "grid-lightbox" ? (v(), J(wa, {
|
|
3358
3358
|
key: 2,
|
|
3359
|
-
modelValue:
|
|
3360
|
-
"onUpdate:modelValue":
|
|
3359
|
+
modelValue: n.value,
|
|
3360
|
+
"onUpdate:modelValue": r[2] || (r[2] = (l) => n.value = l),
|
|
3361
3361
|
images: e.images,
|
|
3362
3362
|
transform: e.transform,
|
|
3363
3363
|
"aria-label": e.ariaLabel
|
|
3364
3364
|
}, null, 8, ["modelValue", "images", "transform", "aria-label"])) : e.layout === "masonry" ? (v(), J(xa, {
|
|
3365
3365
|
key: 3,
|
|
3366
|
-
modelValue:
|
|
3367
|
-
"onUpdate:modelValue":
|
|
3366
|
+
modelValue: n.value,
|
|
3367
|
+
"onUpdate:modelValue": r[3] || (r[3] = (l) => n.value = l),
|
|
3368
3368
|
images: e.images,
|
|
3369
3369
|
transform: e.transform,
|
|
3370
3370
|
"aria-label": e.ariaLabel
|
|
@@ -3386,29 +3386,29 @@ const Ia = ["aria-busy"], Ha = {
|
|
|
3386
3386
|
message: {}
|
|
3387
3387
|
},
|
|
3388
3388
|
setup(e) {
|
|
3389
|
-
const o = e, t = h(0), a = h(null),
|
|
3390
|
-
!o.message || a.value !== null ||
|
|
3391
|
-
t.value = t.value % 3 + 1,
|
|
3389
|
+
const o = e, t = h(0), a = h(null), n = h(o.message || ""), i = () => {
|
|
3390
|
+
!o.message || a.value !== null || n.value.length > 0 && (a.value = window.setInterval(() => {
|
|
3391
|
+
t.value = t.value % 3 + 1, n.value = `${o.message}${".".repeat(t.value)}`;
|
|
3392
3392
|
}, 750));
|
|
3393
3393
|
}, s = () => {
|
|
3394
3394
|
a.value !== null && (clearInterval(a.value), a.value = null);
|
|
3395
3395
|
};
|
|
3396
3396
|
return Y(
|
|
3397
3397
|
() => o.message,
|
|
3398
|
-
(
|
|
3399
|
-
|
|
3398
|
+
(r, l) => {
|
|
3399
|
+
r !== l && (n.value = r || "", s());
|
|
3400
3400
|
}
|
|
3401
|
-
), ae(i),
|
|
3401
|
+
), ae(i), be(s), (r, l) => (v(), f("div", {
|
|
3402
3402
|
class: "spinner-container",
|
|
3403
3403
|
role: "status",
|
|
3404
3404
|
"aria-live": "polite",
|
|
3405
3405
|
"aria-busy": !!e.message
|
|
3406
3406
|
}, [
|
|
3407
|
-
|
|
3407
|
+
l[0] || (l[0] = M("div", {
|
|
3408
3408
|
class: "spinner",
|
|
3409
3409
|
"aria-hidden": "true"
|
|
3410
3410
|
}, null, -1)),
|
|
3411
|
-
e.message ? (v(), f("span", Ha, N(
|
|
3411
|
+
e.message ? (v(), f("span", Ha, N(n.value), 1)) : q("", !0),
|
|
3412
3412
|
M("span", Ba, N(e.message || "Loading"), 1)
|
|
3413
3413
|
], 8, Ia));
|
|
3414
3414
|
}
|
|
@@ -3436,25 +3436,25 @@ const Ia = ["aria-busy"], Ha = {
|
|
|
3436
3436
|
}),
|
|
3437
3437
|
emits: /* @__PURE__ */ ee(["change"], ["update:modelValue"]),
|
|
3438
3438
|
setup(e, { emit: o }) {
|
|
3439
|
-
const t = o, a = fe(e, "modelValue"),
|
|
3439
|
+
const t = o, a = fe(e, "modelValue"), n = e, i = de(), s = H(() => n.id ?? `checkbox-${i}`), r = h(null), l = W2(n).value, d = H(() => n.required ? !0 : void 0), u = H(() => n.triState && a.value === void 0 ? "mixed" : void 0);
|
|
3440
3440
|
Y(
|
|
3441
3441
|
() => a.value,
|
|
3442
|
-
(
|
|
3443
|
-
|
|
3442
|
+
(k) => {
|
|
3443
|
+
r.value && (r.value.indeterminate = k === void 0, r.value.checked = k === !0);
|
|
3444
3444
|
},
|
|
3445
3445
|
{ immediate: !0 }
|
|
3446
3446
|
);
|
|
3447
|
-
const p = (
|
|
3448
|
-
if (!
|
|
3449
|
-
if (!
|
|
3450
|
-
const
|
|
3451
|
-
a.value =
|
|
3447
|
+
const p = (k) => {
|
|
3448
|
+
if (!n.disabled) {
|
|
3449
|
+
if (!n.triState) {
|
|
3450
|
+
const y = k.target.checked;
|
|
3451
|
+
a.value = y, t("change", a.value);
|
|
3452
3452
|
return;
|
|
3453
3453
|
}
|
|
3454
3454
|
a.value === !1 ? a.value = !0 : a.value === !0 ? a.value = void 0 : a.value = !1, t("change", a.value);
|
|
3455
3455
|
}
|
|
3456
3456
|
};
|
|
3457
|
-
return (
|
|
3457
|
+
return (k, y) => (v(), f("label", {
|
|
3458
3458
|
class: re(["checkbox-root", { required: d.value, error: e.invalid }])
|
|
3459
3459
|
}, [
|
|
3460
3460
|
M("input", {
|
|
@@ -3465,20 +3465,20 @@ const Ia = ["aria-busy"], Ha = {
|
|
|
3465
3465
|
checked: a.value === !0,
|
|
3466
3466
|
disabled: e.disabled,
|
|
3467
3467
|
"aria-invalid": e.invalid ? "true" : void 0,
|
|
3468
|
-
"aria-disabled": S(
|
|
3468
|
+
"aria-disabled": S(l),
|
|
3469
3469
|
"aria-checked": u.value,
|
|
3470
|
-
onClick:
|
|
3471
|
-
onChange:
|
|
3470
|
+
onClick: y[0] || (y[0] = (c) => e.triState ? p(c) : void 0),
|
|
3471
|
+
onChange: y[1] || (y[1] = (c) => e.triState ? void 0 : p(c)),
|
|
3472
3472
|
ref_key: "inputRef",
|
|
3473
|
-
ref:
|
|
3473
|
+
ref: r
|
|
3474
3474
|
}, null, 40, Da),
|
|
3475
3475
|
M("span", Ra, [
|
|
3476
|
-
a.value === !0 ? (v(), f("svg", Aa, [...
|
|
3476
|
+
a.value === !0 ? (v(), f("svg", Aa, [...y[2] || (y[2] = [
|
|
3477
3477
|
M("path", {
|
|
3478
3478
|
d: "M4.86199 11.5948C4.78717 11.5923 4.71366 11.5745 4.64596 11.5426C4.57826 11.5107 4.51779 11.4652 4.46827 11.4091L0.753985 7.69483C0.683167 7.64891 0.623706 7.58751 0.580092 7.51525C0.536478 7.44299 0.509851 7.36177 0.502221 7.27771C0.49459 7.19366 0.506156 7.10897 0.536046 7.03004C0.565935 6.95111 0.613367 6.88 0.674759 6.82208C0.736151 6.76416 0.8099 6.72095 0.890436 6.69571C0.970973 6.67046 1.05619 6.66385 1.13966 6.67635C1.22313 6.68886 1.30266 6.72017 1.37226 6.76792C1.44186 6.81567 1.4997 6.8786 1.54141 6.95197L4.86199 10.2503L12.6397 2.49483C12.7444 2.42694 12.8689 2.39617 12.9932 2.40745C13.1174 2.41873 13.2343 2.47141 13.3251 2.55705C13.4159 2.64268 13.4753 2.75632 13.4938 2.87973C13.5123 3.00315 13.4888 3.1292 13.4271 3.23768L5.2557 11.4091C5.20618 11.4652 5.14571 11.5107 5.07801 11.5426C5.01031 11.5745 4.9368 11.5923 4.86199 11.5948Z",
|
|
3479
3479
|
fill: "currentColor"
|
|
3480
3480
|
}, null, -1)
|
|
3481
|
-
])])) : a.value === void 0 ? (v(), f("svg", Sa, [...
|
|
3481
|
+
])])) : a.value === void 0 ? (v(), f("svg", Sa, [...y[3] || (y[3] = [
|
|
3482
3482
|
M("path", {
|
|
3483
3483
|
d: "M8.01186 7.00933L12.27 2.75116C12.341 2.68501 12.398 2.60524 12.4375 2.51661C12.4769 2.42798 12.4982 2.3323 12.4999 2.23529C12.5016 2.13827 12.4838 2.0419 12.4474 1.95194C12.4111 1.86197 12.357 1.78024 12.2884 1.71163C12.2198 1.64302 12.138 1.58893 12.0481 1.55259C11.9581 1.51625 11.8617 1.4984 11.7647 1.50011C11.6677 1.50182 11.572 1.52306 11.4834 1.56255C11.3948 1.60204 11.315 1.65898 11.2488 1.72997L6.99067 5.98814L2.7325 1.72997C2.59553 1.60234 2.41437 1.53286 2.22718 1.53616C2.03999 1.53946 1.8614 1.61529 1.72901 1.74767C1.59663 1.88006 1.5208 2.05865 1.5175 2.24584C1.5142 2.43303 1.58368 2.61419 1.71131 2.75116L5.96948 7.00933L1.71131 11.2675C1.576 11.403 1.5 11.5866 1.5 11.7781C1.5 11.9696 1.576 12.1532 1.71131 12.2887C1.84679 12.424 2.03043 12.5 2.2219 12.5C2.41338 12.5 2.59702 12.424 2.7325 12.2887L6.99067 8.03052L11.2488 12.2887C11.3843 12.424 11.568 12.5 11.7594 12.5C11.9509 12.5 12.1346 12.424 12.27 12.2887C12.4053 12.1532 12.4813 11.9696 12.4813 11.7781C12.4813 11.5866 12.4053 11.403 12.27 11.2675L8.01186 7.00933Z",
|
|
3484
3484
|
fill: "currentColor"
|
|
@@ -3486,7 +3486,7 @@ const Ia = ["aria-busy"], Ha = {
|
|
|
3486
3486
|
])])) : q("", !0)
|
|
3487
3487
|
]),
|
|
3488
3488
|
M("span", Ta, [
|
|
3489
|
-
U(
|
|
3489
|
+
U(k.$slots, "default", {}, void 0, !0)
|
|
3490
3490
|
])
|
|
3491
3491
|
], 2));
|
|
3492
3492
|
}
|
|
@@ -3506,17 +3506,17 @@ const Ia = ["aria-busy"], Ha = {
|
|
|
3506
3506
|
}),
|
|
3507
3507
|
emits: /* @__PURE__ */ ee(["focus", "blur"], ["update:modelValue"]),
|
|
3508
3508
|
setup(e, { emit: o }) {
|
|
3509
|
-
const t = fe(e, "modelValue"), a = Ne(),
|
|
3510
|
-
ze(
|
|
3509
|
+
const t = fe(e, "modelValue"), a = Ne(), n = Fe(), i = o, s = e, r = h(null), l = h(null), d = de(), u = `${d}-error`, p = `${d}-hint`, k = Be(a).value, y = H(() => k ? `${p} ${d}-required-hint` : p), c = Pe(s, n, u, y.value).value, m = (L) => {
|
|
3510
|
+
ze(r.value, l.value);
|
|
3511
3511
|
const C = L.target;
|
|
3512
3512
|
t.value = s.type === "number" ? Number(C.value) : C.value;
|
|
3513
3513
|
}, $ = H(() => s.invalid === !0 && s.errorMessage ? u : void 0);
|
|
3514
3514
|
return ae(() => {
|
|
3515
|
-
ze(
|
|
3515
|
+
ze(r.value, l.value);
|
|
3516
3516
|
}), (L, C) => (v(), f("div", {
|
|
3517
|
-
class: re(["textarea-box", { required: S(
|
|
3517
|
+
class: re(["textarea-box", { required: S(k), error: e.invalid }]),
|
|
3518
3518
|
ref_key: "inputBoxRef",
|
|
3519
|
-
ref:
|
|
3519
|
+
ref: l
|
|
3520
3520
|
}, [
|
|
3521
3521
|
M("label", {
|
|
3522
3522
|
for: e.id,
|
|
@@ -3524,16 +3524,16 @@ const Ia = ["aria-busy"], Ha = {
|
|
|
3524
3524
|
}, N(e.label), 9, Ea),
|
|
3525
3525
|
M("textarea", Ce({ id: e.id }, L.$attrs, {
|
|
3526
3526
|
class: "custom-textarea",
|
|
3527
|
-
onFocus: C[0] || (C[0] = (B) => S(
|
|
3528
|
-
onBlur: C[1] || (C[1] = (B) => S(
|
|
3527
|
+
onFocus: C[0] || (C[0] = (B) => S(G2)(B, l.value, i)),
|
|
3528
|
+
onBlur: C[1] || (C[1] = (B) => S(X2)(B, r.value, l.value, i)),
|
|
3529
3529
|
onInput: m,
|
|
3530
3530
|
value: t.value,
|
|
3531
|
-
required: S(
|
|
3531
|
+
required: S(k),
|
|
3532
3532
|
"aria-invalid": e.invalid ? "true" : void 0,
|
|
3533
3533
|
"aria-errormessage": $.value,
|
|
3534
3534
|
"aria-describedby": S(c),
|
|
3535
3535
|
ref_key: "textareaRef",
|
|
3536
|
-
ref:
|
|
3536
|
+
ref: r
|
|
3537
3537
|
}), " ", 16, za),
|
|
3538
3538
|
P(Ke, { hintId: p }, {
|
|
3539
3539
|
default: W(() => [
|
|
@@ -3543,7 +3543,7 @@ const Ia = ["aria-busy"], Ha = {
|
|
|
3543
3543
|
}),
|
|
3544
3544
|
P(Ue, {
|
|
3545
3545
|
baseId: S(d),
|
|
3546
|
-
isRequired: S(
|
|
3546
|
+
isRequired: S(k)
|
|
3547
3547
|
}, null, 8, ["baseId", "isRequired"]),
|
|
3548
3548
|
P(je, {
|
|
3549
3549
|
errorId: u,
|
|
@@ -3561,12 +3561,12 @@ const Ia = ["aria-busy"], Ha = {
|
|
|
3561
3561
|
setup(e) {
|
|
3562
3562
|
const o = (t, a) => {
|
|
3563
3563
|
if (!a) return [{ text: t, match: !1 }];
|
|
3564
|
-
const
|
|
3565
|
-
let
|
|
3566
|
-
return t.replace(i, (
|
|
3564
|
+
const n = a.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), i = new RegExp(n, "ig"), s = [];
|
|
3565
|
+
let r = 0;
|
|
3566
|
+
return t.replace(i, (l, d) => (d > r && s.push({ text: t.slice(r, d), match: !1 }), s.push({ text: l, match: !0 }), r = d + l.length, l)), r < t.length && s.push({ text: t.slice(r), match: !1 }), s;
|
|
3567
3567
|
};
|
|
3568
|
-
return (t, a) => (v(!0), f(te, null, ue(o(e.text, e.query), (
|
|
3569
|
-
|
|
3568
|
+
return (t, a) => (v(!0), f(te, null, ue(o(e.text, e.query), (n, i) => (v(), f(te, { key: i }, [
|
|
3569
|
+
n.match ? (v(), f("mark", qa, N(n.text), 1)) : (v(), f("span", Na, N(n.text), 1))
|
|
3570
3570
|
], 64))), 128));
|
|
3571
3571
|
}
|
|
3572
3572
|
}), Pa = /* @__PURE__ */ K(Fa, [["__scopeId", "data-v-edfa70b3"]]), Ka = [
|
|
@@ -3595,7 +3595,7 @@ const Ia = ["aria-busy"], Ha = {
|
|
|
3595
3595
|
label: "The passwords must match.",
|
|
3596
3596
|
validator: (e, o) => e === o && e.length > 0
|
|
3597
3597
|
}
|
|
3598
|
-
], Ua = { class: "password-validation" }, ja = { class: "password-rules" }, Ya = ["data-rule"], Wa = { class: "strength-meter" },
|
|
3598
|
+
], Ua = { class: "password-validation" }, ja = { class: "password-rules" }, Ya = ["data-rule"], Wa = { class: "strength-meter" }, Ga = { class: "strength-top" }, Xa = /* @__PURE__ */ T({
|
|
3599
3599
|
__name: "PasswordValidator",
|
|
3600
3600
|
props: {
|
|
3601
3601
|
id: {},
|
|
@@ -3607,7 +3607,7 @@ const Ia = ["aria-busy"], Ha = {
|
|
|
3607
3607
|
},
|
|
3608
3608
|
emits: ["valid"],
|
|
3609
3609
|
setup(e, { emit: o }) {
|
|
3610
|
-
const t = e, a = o,
|
|
3610
|
+
const t = e, a = o, n = h([]), i = h(null), s = h(null), r = (y, c) => y && (n.value[c] = y);
|
|
3611
3611
|
Y(
|
|
3612
3612
|
() => t.password,
|
|
3613
3613
|
() => {
|
|
@@ -3619,44 +3619,44 @@ const Ia = ["aria-busy"], Ha = {
|
|
|
3619
3619
|
a("valid", d());
|
|
3620
3620
|
}
|
|
3621
3621
|
);
|
|
3622
|
-
const
|
|
3622
|
+
const l = {
|
|
3623
3623
|
"--strength-fill-color": t.strengthFillColor
|
|
3624
3624
|
}, d = () => {
|
|
3625
|
-
const
|
|
3626
|
-
return
|
|
3625
|
+
const y = u(), c = Object.values(p()).every(Boolean);
|
|
3626
|
+
return y && c;
|
|
3627
3627
|
}, u = () => {
|
|
3628
|
-
const
|
|
3628
|
+
const y = p(), c = Object.values(y).filter(Boolean).length, m = t.password.length >= 12 ? 1 : 0, $ = Math.min(100, (c + m) * 20), L = Math.min(t.labels.length - 1, Math.floor($ / 25));
|
|
3629
3629
|
return i.value && (i.value.style.width = `${$}%`), s.value && (s.value.textContent = t.labels[L] ?? "Very weak"), c === t.rules.length;
|
|
3630
3630
|
}, p = () => {
|
|
3631
|
-
const
|
|
3632
|
-
return
|
|
3633
|
-
const m = c.dataset.rule, $ = !!
|
|
3631
|
+
const y = k();
|
|
3632
|
+
return n.value.forEach((c) => {
|
|
3633
|
+
const m = c.dataset.rule, $ = !!y[m];
|
|
3634
3634
|
c.classList.toggle("passed", $);
|
|
3635
|
-
}),
|
|
3636
|
-
},
|
|
3637
|
-
const
|
|
3635
|
+
}), y;
|
|
3636
|
+
}, k = () => {
|
|
3637
|
+
const y = {};
|
|
3638
3638
|
return t.rules.forEach((c) => {
|
|
3639
|
-
|
|
3639
|
+
y[c.key] = c.validator(
|
|
3640
3640
|
t.password,
|
|
3641
3641
|
t.passwordConfirmation
|
|
3642
3642
|
);
|
|
3643
|
-
}),
|
|
3643
|
+
}), y;
|
|
3644
3644
|
};
|
|
3645
|
-
return (
|
|
3645
|
+
return (y, c) => (v(), f("section", Ua, [
|
|
3646
3646
|
M("ul", ja, [
|
|
3647
3647
|
(v(!0), f(te, null, ue(t.rules, (m, $) => (v(), f("li", {
|
|
3648
3648
|
key: m.key,
|
|
3649
3649
|
class: "password-rule",
|
|
3650
3650
|
"data-rule": m.key,
|
|
3651
3651
|
ref_for: !0,
|
|
3652
|
-
ref: (L) =>
|
|
3652
|
+
ref: (L) => r(L, $)
|
|
3653
3653
|
}, [
|
|
3654
3654
|
c[0] || (c[0] = M("span", { class: "rule-icon" }, "•", -1)),
|
|
3655
3655
|
me(" " + N(m.label), 1)
|
|
3656
3656
|
], 8, Ya))), 128))
|
|
3657
3657
|
]),
|
|
3658
3658
|
M("div", Wa, [
|
|
3659
|
-
M("div",
|
|
3659
|
+
M("div", Ga, [
|
|
3660
3660
|
c[1] || (c[1] = M("span", null, "Força da senha", -1)),
|
|
3661
3661
|
M("span", {
|
|
3662
3662
|
ref_key: "strengthLabelRef",
|
|
@@ -3665,7 +3665,7 @@ const Ia = ["aria-busy"], Ha = {
|
|
|
3665
3665
|
]),
|
|
3666
3666
|
M("div", {
|
|
3667
3667
|
class: "strength-bar",
|
|
3668
|
-
style:
|
|
3668
|
+
style: l
|
|
3669
3669
|
}, [
|
|
3670
3670
|
M("div", {
|
|
3671
3671
|
class: "strength-fill",
|
|
@@ -3676,7 +3676,7 @@ const Ia = ["aria-busy"], Ha = {
|
|
|
3676
3676
|
])
|
|
3677
3677
|
]));
|
|
3678
3678
|
}
|
|
3679
|
-
}), a1 = /* @__PURE__ */ K(
|
|
3679
|
+
}), a1 = /* @__PURE__ */ K(Xa, [["__scopeId", "data-v-e7569cc0"]]);
|
|
3680
3680
|
a1.install = (e) => {
|
|
3681
3681
|
e.component("PasswordValidator", a1);
|
|
3682
3682
|
};
|
|
@@ -3694,23 +3694,23 @@ const Ja = {
|
|
|
3694
3694
|
separator: { default: "/" }
|
|
3695
3695
|
},
|
|
3696
3696
|
setup(e) {
|
|
3697
|
-
const o = e, t = se(M1), a = (
|
|
3698
|
-
href:
|
|
3699
|
-
target:
|
|
3700
|
-
rel:
|
|
3701
|
-
"aria-label":
|
|
3697
|
+
const o = e, t = se(M1), a = (r) => r === o.items.length - 1, n = (r, l) => i(r, l), i = (r, l) => a(l) || r.disabled ? "span" : r.to && t ? h1("RouterLink") : r.href ? "a" : "span", s = (r, l) => a(l) || r.disabled ? { "data-disabled": r.disabled || void 0 } : r.to ? { to: r.to } : r.href ? {
|
|
3698
|
+
href: r.href,
|
|
3699
|
+
target: r.external ? "_blank" : void 0,
|
|
3700
|
+
rel: r.external ? "noopener noreferrer" : void 0,
|
|
3701
|
+
"aria-label": r.external ? `${r.label} (opens in a new tab)` : void 0
|
|
3702
3702
|
} : {};
|
|
3703
|
-
return (
|
|
3703
|
+
return (r, l) => (v(), f("nav", Ja, [
|
|
3704
3704
|
M("ol", Qa, [
|
|
3705
3705
|
(v(!0), f(te, null, ue(e.items, (d, u) => (v(), f("li", {
|
|
3706
3706
|
key: d.to ?? d.href ?? `${d.label}-${u}`,
|
|
3707
3707
|
class: "ui-breadcrumb__item"
|
|
3708
3708
|
}, [
|
|
3709
|
-
(v(), J(Ve(
|
|
3709
|
+
(v(), J(Ve(n(d, u)), Ce({ class: "ui-breadcrumb__link" }, { ref_for: !0 }, s(d, u), {
|
|
3710
3710
|
"aria-posinset": u + 1,
|
|
3711
3711
|
"aria-setsize": e.items.length,
|
|
3712
3712
|
"aria-current": a(u) ? "page" : void 0,
|
|
3713
|
-
tabindex: a(u) ||
|
|
3713
|
+
tabindex: a(u) || n(d, u) === "span" ? -1 : void 0
|
|
3714
3714
|
}), {
|
|
3715
3715
|
default: W(() => [
|
|
3716
3716
|
me(N(d.label), 1)
|
|
@@ -3718,7 +3718,7 @@ const Ja = {
|
|
|
3718
3718
|
_: 2
|
|
3719
3719
|
}, 1040, ["aria-posinset", "aria-setsize", "aria-current", "tabindex"])),
|
|
3720
3720
|
a(u) ? q("", !0) : (v(), f("span", eo, [
|
|
3721
|
-
U(
|
|
3721
|
+
U(r.$slots, "separator", {}, () => [
|
|
3722
3722
|
me(N(e.separator), 1)
|
|
3723
3723
|
], !0)
|
|
3724
3724
|
]))
|
|
@@ -3748,31 +3748,31 @@ const Ja = {
|
|
|
3748
3748
|
}),
|
|
3749
3749
|
emits: ["update:modelValue"],
|
|
3750
3750
|
setup(e) {
|
|
3751
|
-
const o = e, t = fe(e, "modelValue"), a = H(() => o.invalid ? "true" : void 0),
|
|
3752
|
-
return (s,
|
|
3751
|
+
const o = e, t = fe(e, "modelValue"), a = H(() => o.invalid ? "true" : void 0), n = H(() => o.required && !o.disabled ? "true" : void 0), i = H(() => o.disabled ? !0 : void 0);
|
|
3752
|
+
return (s, r) => (v(), f("fieldset", {
|
|
3753
3753
|
class: re(["radio-group", { "in-column": e.inColumn, btn: e.mode === "button" }]),
|
|
3754
3754
|
"aria-invalid": a.value,
|
|
3755
|
-
"aria-required":
|
|
3755
|
+
"aria-required": n.value,
|
|
3756
3756
|
disabled: i.value
|
|
3757
3757
|
}, [
|
|
3758
3758
|
M("legend", oo, N(e.name), 1),
|
|
3759
|
-
(v(!0), f(te, null, ue(e.options, (
|
|
3760
|
-
key:
|
|
3761
|
-
class: re(["radio", { checked: t.value ===
|
|
3759
|
+
(v(!0), f(te, null, ue(e.options, (l) => (v(), f("label", {
|
|
3760
|
+
key: l.key,
|
|
3761
|
+
class: re(["radio", { checked: t.value === l.key, disabled: e.disabled || l.disabled }])
|
|
3762
3762
|
}, [
|
|
3763
3763
|
Me(M("input", {
|
|
3764
3764
|
type: "radio",
|
|
3765
3765
|
class: "radio-input",
|
|
3766
3766
|
name: e.name,
|
|
3767
|
-
value:
|
|
3768
|
-
disabled: e.disabled ||
|
|
3767
|
+
value: l.key,
|
|
3768
|
+
disabled: e.disabled || l.disabled,
|
|
3769
3769
|
required: e.required,
|
|
3770
|
-
"onUpdate:modelValue":
|
|
3770
|
+
"onUpdate:modelValue": r[0] || (r[0] = (d) => t.value = d)
|
|
3771
3771
|
}, null, 8, no), [
|
|
3772
3772
|
[y1, t.value]
|
|
3773
3773
|
]),
|
|
3774
3774
|
e.mode === "standard" ? (v(), f("span", lo)) : q("", !0),
|
|
3775
|
-
M("span", ro, N(
|
|
3775
|
+
M("span", ro, N(l.label), 1)
|
|
3776
3776
|
], 2))), 128))
|
|
3777
3777
|
], 10, ao));
|
|
3778
3778
|
}
|
|
@@ -3792,7 +3792,7 @@ const Ja = {
|
|
|
3792
3792
|
key: 0,
|
|
3793
3793
|
class: "start-icon",
|
|
3794
3794
|
"aria-hidden": "true"
|
|
3795
|
-
},
|
|
3795
|
+
}, go = /* @__PURE__ */ T({
|
|
3796
3796
|
__name: "Autocomplete",
|
|
3797
3797
|
props: /* @__PURE__ */ ee({
|
|
3798
3798
|
id: {},
|
|
@@ -3818,111 +3818,111 @@ const Ja = {
|
|
|
3818
3818
|
}),
|
|
3819
3819
|
emits: /* @__PURE__ */ ee(["change", "select", "focus", "blur"], ["update:modelValue"]),
|
|
3820
3820
|
setup(e, { emit: o }) {
|
|
3821
|
-
const t = e, a = o,
|
|
3821
|
+
const t = e, a = o, n = fe(e, "modelValue"), i = h(null), s = h(""), r = h(!1), l = h([]), d = h(null), u = h(null), p = H(() => t.id ? `${t.id}-search-history` : "search-history"), y = `${de()}-list`, c = h(!1), m = H(() => n.value !== null && n.value !== void 0 && n.value !== ""), $ = H(() => d.value !== null ? `${y}-option-${d.value}` : void 0), L = H(() => r.value && $.value ? $.value : void 0), C = H(() => l.value.length > 0), B = H(() => {
|
|
3822
3822
|
if (!t.filterable) return t.options;
|
|
3823
|
-
const
|
|
3824
|
-
return t.options.filter((A) => t.getValue(A).toLowerCase().includes(
|
|
3823
|
+
const g = s.value.toLowerCase();
|
|
3824
|
+
return t.options.filter((A) => t.getValue(A).toLowerCase().includes(g));
|
|
3825
3825
|
}), O = Be(t).value;
|
|
3826
3826
|
Y(
|
|
3827
3827
|
() => p.value,
|
|
3828
|
-
(
|
|
3829
|
-
if (
|
|
3828
|
+
(g) => {
|
|
3829
|
+
if (g)
|
|
3830
3830
|
try {
|
|
3831
|
-
|
|
3831
|
+
l.value = JSON.parse(localStorage.getItem(g) || "[]");
|
|
3832
3832
|
} catch {
|
|
3833
|
-
|
|
3833
|
+
l.value = [];
|
|
3834
3834
|
}
|
|
3835
3835
|
},
|
|
3836
3836
|
{ immediate: !0 }
|
|
3837
|
-
), Y(
|
|
3838
|
-
if (!
|
|
3837
|
+
), Y(r, async (g) => {
|
|
3838
|
+
if (!g) {
|
|
3839
3839
|
d.value = null;
|
|
3840
3840
|
return;
|
|
3841
3841
|
}
|
|
3842
3842
|
B.value.length !== 0 && (await we(), Q());
|
|
3843
3843
|
}), Y(
|
|
3844
3844
|
() => t.loading,
|
|
3845
|
-
async (
|
|
3846
|
-
|
|
3845
|
+
async (g) => {
|
|
3846
|
+
g || r.value && B.value.length !== 0 && (await we(), Q());
|
|
3847
3847
|
}
|
|
3848
3848
|
), Y(
|
|
3849
3849
|
() => t.options,
|
|
3850
3850
|
() => {
|
|
3851
|
-
|
|
3851
|
+
n.value || (u.value = null, d.value = null);
|
|
3852
3852
|
}
|
|
3853
3853
|
);
|
|
3854
|
-
const
|
|
3855
|
-
s.value.length >= t.minChars && !t.filterable && !t.loading && (
|
|
3856
|
-
}, I = (
|
|
3857
|
-
const A =
|
|
3858
|
-
i.value?.contains(A) || (
|
|
3859
|
-
}, D = (
|
|
3860
|
-
const
|
|
3861
|
-
if (!
|
|
3862
|
-
|
|
3863
|
-
const z = t.getKey(
|
|
3864
|
-
z && z.toString().length > 0 ?
|
|
3865
|
-
}, V = (
|
|
3866
|
-
if (!
|
|
3867
|
-
|
|
3854
|
+
const b = (g) => {
|
|
3855
|
+
s.value.length >= t.minChars && !t.filterable && !t.loading && (r.value = !0), c.value = !0, a("focus", g);
|
|
3856
|
+
}, I = (g) => {
|
|
3857
|
+
const A = g.relatedTarget;
|
|
3858
|
+
i.value?.contains(A) || (r.value = !1, n.value ? w() : s.value = "", c.value = !1, a("blur", g));
|
|
3859
|
+
}, D = (g, A) => {
|
|
3860
|
+
const X = i.value;
|
|
3861
|
+
if (!X || t.isDisabled(g)) return;
|
|
3862
|
+
r.value = !1, E(s.value), u.value = A, d.value = A;
|
|
3863
|
+
const z = t.getKey(g);
|
|
3864
|
+
z && z.toString().length > 0 ? X.classList.add("filled") : X.classList.remove("filled"), s.value = t.getValue(g), n.value = z, a("select", z);
|
|
3865
|
+
}, V = (g) => {
|
|
3866
|
+
if (!r.value && ["ArrowDown", "ArrowUp"].includes(g.key)) {
|
|
3867
|
+
r.value = !0, d.value = d.value ?? B.value.findIndex((A) => !t.isDisabled(A)), g.preventDefault();
|
|
3868
3868
|
return;
|
|
3869
3869
|
}
|
|
3870
|
-
if (
|
|
3871
|
-
if (
|
|
3870
|
+
if (r.value) {
|
|
3871
|
+
if (g.key === "ArrowDown" && (_(1), g.preventDefault()), g.key === "ArrowUp" && (_(-1), g.preventDefault()), g.key === "Home") {
|
|
3872
3872
|
const A = oe();
|
|
3873
|
-
A >= 0 && (d.value = A),
|
|
3873
|
+
A >= 0 && (d.value = A), g.preventDefault();
|
|
3874
3874
|
}
|
|
3875
|
-
if (
|
|
3875
|
+
if (g.key === "End") {
|
|
3876
3876
|
const A = Z();
|
|
3877
|
-
A >= 0 && (d.value = A),
|
|
3877
|
+
A >= 0 && (d.value = A), g.preventDefault();
|
|
3878
3878
|
}
|
|
3879
|
-
if (
|
|
3879
|
+
if (g.key === "Enter") {
|
|
3880
3880
|
if (d.value === null) return;
|
|
3881
3881
|
const A = B.value[d.value];
|
|
3882
3882
|
if (!A || t.isDisabled(A)) return;
|
|
3883
|
-
D(A, d.value),
|
|
3883
|
+
D(A, d.value), r.value = !1, g.preventDefault();
|
|
3884
3884
|
}
|
|
3885
|
-
|
|
3885
|
+
g.key === "Escape" && (r.value = !1);
|
|
3886
3886
|
}
|
|
3887
|
-
}, _ = (
|
|
3887
|
+
}, _ = (g) => {
|
|
3888
3888
|
if (d.value === null) return;
|
|
3889
3889
|
let A = d.value;
|
|
3890
3890
|
do
|
|
3891
|
-
A +=
|
|
3891
|
+
A += g;
|
|
3892
3892
|
while (A >= 0 && A < B.value.length && t.isDisabled(B.value[A]));
|
|
3893
3893
|
A >= 0 && A < B.value.length && (d.value = A);
|
|
3894
3894
|
}, R = () => {
|
|
3895
|
-
s.value.length === 0 && (
|
|
3896
|
-
},
|
|
3897
|
-
if (
|
|
3898
|
-
const
|
|
3899
|
-
|
|
3895
|
+
s.value.length === 0 && (n.value = ""), s.value.length >= t.minChars ? (a("change", s.value), r.value = !0) : r.value = !1;
|
|
3896
|
+
}, w = () => {
|
|
3897
|
+
if (n.value.toString().length === 0 || !t.options || t.options.length === 0) return;
|
|
3898
|
+
const g = t.options.findIndex((A) => t.getKey(A) === n.value);
|
|
3899
|
+
g > -1 && (d.value = g, u.value = g, s.value = t.getValue(t.options[g]));
|
|
3900
3900
|
};
|
|
3901
3901
|
Y(
|
|
3902
|
-
[() => t.options.length, () =>
|
|
3903
|
-
async ([
|
|
3904
|
-
A &&
|
|
3902
|
+
[() => t.options.length, () => n.value],
|
|
3903
|
+
async ([g, A]) => {
|
|
3904
|
+
A && g !== 0 && (await we(), w());
|
|
3905
3905
|
},
|
|
3906
3906
|
{ flush: "post", immediate: !0 }
|
|
3907
3907
|
);
|
|
3908
3908
|
const x = () => {
|
|
3909
|
-
s.value = "",
|
|
3910
|
-
}, E = (
|
|
3911
|
-
!
|
|
3912
|
-
|
|
3913
|
-
...
|
|
3914
|
-
].slice(0, t.suggestionsLimit), localStorage.setItem(p.value, JSON.stringify(
|
|
3915
|
-
},
|
|
3916
|
-
s.value =
|
|
3909
|
+
s.value = "", n.value = "";
|
|
3910
|
+
}, E = (g) => {
|
|
3911
|
+
!g || g.trim().length === 0 || (l.value = [
|
|
3912
|
+
g,
|
|
3913
|
+
...l.value.filter((A) => A !== g)
|
|
3914
|
+
].slice(0, t.suggestionsLimit), localStorage.setItem(p.value, JSON.stringify(l.value)));
|
|
3915
|
+
}, G = (g) => {
|
|
3916
|
+
s.value = g, R();
|
|
3917
3917
|
}, Q = () => {
|
|
3918
|
-
const
|
|
3919
|
-
|
|
3920
|
-
}, oe = () => B.value.findIndex((
|
|
3921
|
-
for (let
|
|
3918
|
+
const g = oe();
|
|
3919
|
+
g >= 0 && (d.value = g);
|
|
3920
|
+
}, oe = () => B.value.findIndex((g) => !t.isDisabled(g)), Z = () => {
|
|
3921
|
+
for (let g = B.value.length - 1; g >= 0; g--) if (!t.isDisabled(B.value[g])) return g;
|
|
3922
3922
|
return -1;
|
|
3923
3923
|
};
|
|
3924
|
-
return ae(() =>
|
|
3925
|
-
class: re(["autocomplete", { required: S(O), error: e.invalid, "has-icon": Object.keys(
|
|
3924
|
+
return ae(() => w()), (g, A) => (v(), f("div", {
|
|
3925
|
+
class: re(["autocomplete", { required: S(O), error: e.invalid, "has-icon": Object.keys(g.$slots).includes("icon"), filled: m.value, focused: c.value }]),
|
|
3926
3926
|
ref_key: "autocompleteRef",
|
|
3927
3927
|
ref: i
|
|
3928
3928
|
}, [
|
|
@@ -3933,62 +3933,62 @@ const Ja = {
|
|
|
3933
3933
|
Me(M("input", Ce({
|
|
3934
3934
|
id: e.id,
|
|
3935
3935
|
type: e.type
|
|
3936
|
-
},
|
|
3936
|
+
}, g.$attrs, {
|
|
3937
3937
|
role: "combobox",
|
|
3938
3938
|
"aria-autocomplete": "list",
|
|
3939
|
-
"aria-expanded":
|
|
3940
|
-
"aria-controls":
|
|
3939
|
+
"aria-expanded": r.value,
|
|
3940
|
+
"aria-controls": y,
|
|
3941
3941
|
"aria-activedescendant": L.value,
|
|
3942
3942
|
"aria-required": S(O),
|
|
3943
3943
|
"aria-invalid": e.invalid ? "true" : void 0,
|
|
3944
3944
|
disabled: e.disabled ? !0 : void 0,
|
|
3945
3945
|
"aria-disabled": e.disabled ? !0 : void 0,
|
|
3946
|
-
"onUpdate:modelValue": A[0] || (A[0] = (
|
|
3947
|
-
onFocus:
|
|
3946
|
+
"onUpdate:modelValue": A[0] || (A[0] = (X) => s.value = X),
|
|
3947
|
+
onFocus: b,
|
|
3948
3948
|
onBlur: I,
|
|
3949
3949
|
onInput: R,
|
|
3950
3950
|
onKeydown: V
|
|
3951
3951
|
}), null, 16, uo), [
|
|
3952
|
-
[
|
|
3952
|
+
[g1, s.value]
|
|
3953
3953
|
]),
|
|
3954
3954
|
P($e, { name: "select" }, {
|
|
3955
3955
|
default: W(() => [
|
|
3956
3956
|
Me(M("ul", {
|
|
3957
|
-
id:
|
|
3957
|
+
id: y,
|
|
3958
3958
|
role: "listbox",
|
|
3959
3959
|
class: "options"
|
|
3960
3960
|
}, [
|
|
3961
|
-
B.value.length > 0 ? (v(!0), f(te, { key: 0 }, ue(B.value, (
|
|
3962
|
-
id: `${
|
|
3963
|
-
key: e.getKey(
|
|
3961
|
+
B.value.length > 0 ? (v(!0), f(te, { key: 0 }, ue(B.value, (X, z) => (v(), f("li", {
|
|
3962
|
+
id: `${y}-option-${z}`,
|
|
3963
|
+
key: e.getKey(X),
|
|
3964
3964
|
role: "option",
|
|
3965
3965
|
class: re(["option", { "focus-visible": d.value === z }]),
|
|
3966
|
-
"aria-disabled": t.isDisabled(
|
|
3966
|
+
"aria-disabled": t.isDisabled(X) || void 0,
|
|
3967
3967
|
"aria-selected": z === u.value,
|
|
3968
3968
|
onMousedown: A[1] || (A[1] = le(() => {
|
|
3969
3969
|
}, ["prevent"])),
|
|
3970
|
-
onClick: (j) => !t.isDisabled(
|
|
3970
|
+
onClick: (j) => !t.isDisabled(X) && D(X, z)
|
|
3971
3971
|
}, [
|
|
3972
|
-
t.isDisabled(
|
|
3972
|
+
t.isDisabled(X) ? q("", !0) : (v(), J(ce, {
|
|
3973
3973
|
key: 0,
|
|
3974
3974
|
name: "search",
|
|
3975
3975
|
size: 22
|
|
3976
3976
|
})),
|
|
3977
|
-
U(
|
|
3978
|
-
option:
|
|
3979
|
-
value: e.getValue(
|
|
3977
|
+
U(g.$slots, "option", {
|
|
3978
|
+
option: X,
|
|
3979
|
+
value: e.getValue(X),
|
|
3980
3980
|
query: s.value,
|
|
3981
3981
|
selected: z === u.value,
|
|
3982
3982
|
active: z === d.value
|
|
3983
3983
|
}, () => [
|
|
3984
3984
|
M("div", vo, [
|
|
3985
3985
|
P(Pa, {
|
|
3986
|
-
text: e.getValue(
|
|
3986
|
+
text: e.getValue(X),
|
|
3987
3987
|
query: s.value
|
|
3988
3988
|
}, null, 8, ["text", "query"])
|
|
3989
3989
|
])
|
|
3990
3990
|
], !0),
|
|
3991
|
-
M("div", fo, N(e.getValue(
|
|
3991
|
+
M("div", fo, N(e.getValue(X)), 1)
|
|
3992
3992
|
], 42, co))), 128)) : B.value.length === 0 && !e.loading ? (v(), f("li", po, [...A[3] || (A[3] = [
|
|
3993
3993
|
M("div", { class: "option-value" }, "No results found", -1)
|
|
3994
3994
|
])])) : (v(), J(C1, {
|
|
@@ -4000,24 +4000,24 @@ const Ja = {
|
|
|
4000
4000
|
C.value ? (v(), f("li", Co, [...A[4] || (A[4] = [
|
|
4001
4001
|
M("div", { class: "option-value" }, " Recents ", -1)
|
|
4002
4002
|
])])) : q("", !0),
|
|
4003
|
-
(v(!0), f(te, null, ue(
|
|
4004
|
-
key:
|
|
4003
|
+
(v(!0), f(te, null, ue(l.value, (X) => (v(), f("li", {
|
|
4004
|
+
key: X,
|
|
4005
4005
|
role: "presentation",
|
|
4006
4006
|
"aria-hidden": "true",
|
|
4007
4007
|
class: "option recent-item",
|
|
4008
|
-
onClick: (z) => X
|
|
4008
|
+
onClick: (z) => G(X)
|
|
4009
4009
|
}, [
|
|
4010
4010
|
P(ce, { name: "clock" }),
|
|
4011
|
-
M("div", ho, N(
|
|
4011
|
+
M("div", ho, N(X), 1)
|
|
4012
4012
|
], 8, mo))), 128))
|
|
4013
4013
|
], 512), [
|
|
4014
|
-
[qe,
|
|
4014
|
+
[qe, r.value]
|
|
4015
4015
|
])
|
|
4016
4016
|
]),
|
|
4017
4017
|
_: 3
|
|
4018
4018
|
}),
|
|
4019
|
-
|
|
4020
|
-
U(
|
|
4019
|
+
g.$slots.icon ? (v(), f("span", yo, [
|
|
4020
|
+
U(g.$slots, "icon", {}, void 0, !0)
|
|
4021
4021
|
])) : q("", !0),
|
|
4022
4022
|
s.value.length > 0 && !e.disabled ? (v(), J(he, {
|
|
4023
4023
|
key: 1,
|
|
@@ -4042,7 +4042,7 @@ const Ja = {
|
|
|
4042
4042
|
})) : q("", !0)
|
|
4043
4043
|
], 2));
|
|
4044
4044
|
}
|
|
4045
|
-
}), ll = /* @__PURE__ */ K(
|
|
4045
|
+
}), ll = /* @__PURE__ */ K(go, [["__scopeId", "data-v-75e8a9a2"]]), bo = 5, pe = r1({
|
|
4046
4046
|
toasts: []
|
|
4047
4047
|
});
|
|
4048
4048
|
let ko = 0;
|
|
@@ -4053,7 +4053,7 @@ const Le = (e, o = "info") => {
|
|
|
4053
4053
|
...typeof e == "string" ? { description: e } : e,
|
|
4054
4054
|
variant: o
|
|
4055
4055
|
};
|
|
4056
|
-
return pe.toasts.push(t), pe.toasts.length >
|
|
4056
|
+
return pe.toasts.push(t), pe.toasts.length > bo && pe.toasts.shift(), t.id;
|
|
4057
4057
|
}, wo = (e, o) => pe.toasts = pe.toasts.map((t) => t.id === e ? { ...t, ...o, loading: !1 } : t), rl = Object.assign(
|
|
4058
4058
|
(e) => Le(e),
|
|
4059
4059
|
{
|
|
@@ -4082,25 +4082,25 @@ const Le = (e, o = "info") => {
|
|
|
4082
4082
|
focus: { type: Boolean }
|
|
4083
4083
|
},
|
|
4084
4084
|
setup(e) {
|
|
4085
|
-
const o = e, t = h(null), a = h("open"),
|
|
4085
|
+
const o = e, t = h(null), a = h("open"), n = h(100);
|
|
4086
4086
|
let i = Date.now(), s;
|
|
4087
|
-
const
|
|
4087
|
+
const r = () => {
|
|
4088
4088
|
const u = Date.now() - i;
|
|
4089
|
-
if (
|
|
4089
|
+
if (n.value = Math.max(0, 100 - u / o.duration * 100), n.value <= 0) {
|
|
4090
4090
|
d();
|
|
4091
4091
|
return;
|
|
4092
4092
|
}
|
|
4093
|
-
s = requestAnimationFrame(
|
|
4094
|
-
},
|
|
4093
|
+
s = requestAnimationFrame(r);
|
|
4094
|
+
}, l = () => {
|
|
4095
4095
|
if (cancelAnimationFrame(s), o.duration === 1 / 0) {
|
|
4096
|
-
|
|
4096
|
+
n.value = 100;
|
|
4097
4097
|
return;
|
|
4098
4098
|
}
|
|
4099
|
-
i = Date.now(), s = requestAnimationFrame(
|
|
4099
|
+
i = Date.now(), s = requestAnimationFrame(r);
|
|
4100
4100
|
};
|
|
4101
4101
|
Y(
|
|
4102
4102
|
() => o.duration,
|
|
4103
|
-
() =>
|
|
4103
|
+
() => l(),
|
|
4104
4104
|
{ immediate: !0 }
|
|
4105
4105
|
);
|
|
4106
4106
|
const d = () => {
|
|
@@ -4138,7 +4138,7 @@ const Le = (e, o = "info") => {
|
|
|
4138
4138
|
e.duration !== 1 / 0 ? (v(), f("div", xo, [
|
|
4139
4139
|
M("div", {
|
|
4140
4140
|
class: "bar",
|
|
4141
|
-
style: ye({ width:
|
|
4141
|
+
style: ye({ width: n.value + "%" })
|
|
4142
4142
|
}, null, 4)
|
|
4143
4143
|
])) : q("", !0)
|
|
4144
4144
|
], 8, Mo));
|
|
@@ -4148,7 +4148,7 @@ const Le = (e, o = "info") => {
|
|
|
4148
4148
|
setup(e) {
|
|
4149
4149
|
return (o, t) => (v(), J(He, { to: "body" }, [
|
|
4150
4150
|
M("div", Ho, [
|
|
4151
|
-
P(
|
|
4151
|
+
P(b1, { name: "toast-stack" }, {
|
|
4152
4152
|
default: W(() => [
|
|
4153
4153
|
(v(!0), f(te, null, ue(S(pe).toasts, (a) => (v(), J(Io, {
|
|
4154
4154
|
key: a.id,
|
|
@@ -4197,23 +4197,23 @@ const sl = {
|
|
|
4197
4197
|
},
|
|
4198
4198
|
emits: ["click"],
|
|
4199
4199
|
setup(e, { emit: o }) {
|
|
4200
|
-
const t = e, a = o,
|
|
4201
|
-
|
|
4202
|
-
const s = H(() => t.clickable && t.as !== "button" && t.as !== "a"),
|
|
4203
|
-
return (
|
|
4200
|
+
const t = e, a = o, n = h(), i = h();
|
|
4201
|
+
ge("card:labelId", n), ge("card:descriptionId", i);
|
|
4202
|
+
const s = H(() => t.clickable && t.as !== "button" && t.as !== "a"), r = () => t.clickable && a("click");
|
|
4203
|
+
return (l, d) => (v(), J(Ve(e.as), {
|
|
4204
4204
|
class: re(["rs-card", { clickable: e.clickable }]),
|
|
4205
4205
|
tabindex: s.value ? 0 : void 0,
|
|
4206
4206
|
role: s.value ? "button" : void 0,
|
|
4207
|
-
onClick:
|
|
4207
|
+
onClick: r,
|
|
4208
4208
|
onKeydown: [
|
|
4209
|
-
d[0] || (d[0] = ve(le((u) => s.value &&
|
|
4210
|
-
d[1] || (d[1] = ve(le((u) => s.value &&
|
|
4209
|
+
d[0] || (d[0] = ve(le((u) => s.value && r(), ["prevent"]), ["enter"])),
|
|
4210
|
+
d[1] || (d[1] = ve(le((u) => s.value && r(), ["prevent"]), ["space"]))
|
|
4211
4211
|
],
|
|
4212
|
-
"aria-labelledby":
|
|
4212
|
+
"aria-labelledby": n.value,
|
|
4213
4213
|
"aria-describedby": i.value
|
|
4214
4214
|
}, {
|
|
4215
4215
|
default: W(() => [
|
|
4216
|
-
U(
|
|
4216
|
+
U(l.$slots, "default", {}, void 0, !0)
|
|
4217
4217
|
]),
|
|
4218
4218
|
_: 3
|
|
4219
4219
|
}, 40, ["class", "tabindex", "role", "aria-labelledby", "aria-describedby"]));
|
|
@@ -4225,7 +4225,7 @@ const sl = {
|
|
|
4225
4225
|
},
|
|
4226
4226
|
setup(e) {
|
|
4227
4227
|
const o = se("card:labelId", void 0), t = `rs-card-label-${de()}`;
|
|
4228
|
-
return ae(() => o && (o.value = t)), (a,
|
|
4228
|
+
return ae(() => o && (o.value = t)), (a, n) => (v(), J(Ve(e.as), {
|
|
4229
4229
|
id: t,
|
|
4230
4230
|
class: "rs-card-header"
|
|
4231
4231
|
}, {
|
|
@@ -4239,7 +4239,7 @@ const sl = {
|
|
|
4239
4239
|
__name: "CardBody",
|
|
4240
4240
|
setup(e) {
|
|
4241
4241
|
const o = se("card:descriptionId", void 0), t = `rs-card-desc-${de()}`;
|
|
4242
|
-
return ae(() => o && (o.value = t)), (a,
|
|
4242
|
+
return ae(() => o && (o.value = t)), (a, n) => (v(), f("div", {
|
|
4243
4243
|
id: t,
|
|
4244
4244
|
class: "rs-card-body"
|
|
4245
4245
|
}, [
|
|
@@ -4286,11 +4286,11 @@ const sl = {
|
|
|
4286
4286
|
setup(e) {
|
|
4287
4287
|
const o = e, t = se("StepsContext");
|
|
4288
4288
|
if (!t) throw new Error("Step component must be used inside Steps.");
|
|
4289
|
-
const a = Fe(),
|
|
4290
|
-
let
|
|
4289
|
+
const a = Fe(), n = h(null), i = h(null), s = H(() => t.orientation ?? "horizontal");
|
|
4290
|
+
let r = null, l = null;
|
|
4291
4291
|
const d = se("StepIndex");
|
|
4292
4292
|
if (d == null) throw new Error("StepIndex component must be used inside Steps.");
|
|
4293
|
-
const u = H(() => o.status ? o.status : d < t.current.value ? "completed" : d === t.current.value ? "active" : "pending"), p = H(() => t?.icons?.[u.value]),
|
|
4293
|
+
const u = H(() => o.status ? o.status : d < t.current.value ? "completed" : d === t.current.value ? "active" : "pending"), p = H(() => t?.icons?.[u.value]), k = H(() => a.icon ? "slot" : o.icon ? o.icon : p.value), y = H(() => {
|
|
4294
4294
|
switch (u.value) {
|
|
4295
4295
|
case "completed":
|
|
4296
4296
|
return "Stage completed";
|
|
@@ -4330,21 +4330,21 @@ const sl = {
|
|
|
4330
4330
|
{ immediate: !0 }
|
|
4331
4331
|
);
|
|
4332
4332
|
const L = () => {
|
|
4333
|
-
|
|
4334
|
-
|
|
4333
|
+
r == null && (r = requestAnimationFrame(() => {
|
|
4334
|
+
r = null, C();
|
|
4335
4335
|
}));
|
|
4336
4336
|
}, C = () => {
|
|
4337
|
-
if (!
|
|
4338
|
-
const O = i.value.getBoundingClientRect(),
|
|
4337
|
+
if (!n.value || !i.value) return;
|
|
4338
|
+
const O = i.value.getBoundingClientRect(), b = t.stepsRef.value.getBoundingClientRect(), I = t.orientation === "vertical" ? O.top + O.height / 2 - b.top : O.left + O.width / 2 - b.left;
|
|
4339
4339
|
t.registerIndicatorCenter(d, I);
|
|
4340
4340
|
}, B = (O) => {
|
|
4341
|
-
const
|
|
4341
|
+
const b = t.orientation === "horizontal", I = t.orientation === "vertical";
|
|
4342
4342
|
switch (O.key) {
|
|
4343
4343
|
case "ArrowRight":
|
|
4344
|
-
|
|
4344
|
+
b && t.focusNext();
|
|
4345
4345
|
break;
|
|
4346
4346
|
case "ArrowLeft":
|
|
4347
|
-
|
|
4347
|
+
b && t.focusPrev();
|
|
4348
4348
|
break;
|
|
4349
4349
|
case "ArrowDown":
|
|
4350
4350
|
I && t.focusNext();
|
|
@@ -4364,16 +4364,16 @@ const sl = {
|
|
|
4364
4364
|
O.preventDefault();
|
|
4365
4365
|
};
|
|
4366
4366
|
return ae(() => {
|
|
4367
|
-
!
|
|
4367
|
+
!n.value || !i.value || (requestAnimationFrame(() => {
|
|
4368
4368
|
requestAnimationFrame(C);
|
|
4369
|
-
}),
|
|
4369
|
+
}), l = new ResizeObserver(() => {
|
|
4370
4370
|
L();
|
|
4371
|
-
}),
|
|
4372
|
-
}),
|
|
4373
|
-
|
|
4374
|
-
}), (O,
|
|
4371
|
+
}), l.observe(n.value), l.observe(i.value), t.stepsRef.value && l.observe(t.stepsRef.value), t.registerStep(n.value));
|
|
4372
|
+
}), be(() => {
|
|
4373
|
+
l?.disconnect(), t.unregisterStep(n.value), r != null && cancelAnimationFrame(r);
|
|
4374
|
+
}), (O, b) => (v(), f("li", {
|
|
4375
4375
|
ref_key: "stepRef",
|
|
4376
|
-
ref:
|
|
4376
|
+
ref: n,
|
|
4377
4377
|
class: re(["step", `step__${m.value}`]),
|
|
4378
4378
|
role: "listitem",
|
|
4379
4379
|
"data-status": u.value,
|
|
@@ -4397,17 +4397,17 @@ const sl = {
|
|
|
4397
4397
|
O.$slots.icon ? U(O.$slots, "icon", {
|
|
4398
4398
|
key: 0,
|
|
4399
4399
|
status: u.value
|
|
4400
|
-
}, void 0, !0) :
|
|
4400
|
+
}, void 0, !0) : k.value ? (v(), J(ce, {
|
|
4401
4401
|
key: 1,
|
|
4402
|
-
name:
|
|
4402
|
+
name: k.value,
|
|
4403
4403
|
class: "icon"
|
|
4404
4404
|
}, null, 8, ["name"])) : q("", !0),
|
|
4405
|
-
u.value === "completed" ? (v(), f("svg", zo, [...
|
|
4405
|
+
u.value === "completed" ? (v(), f("svg", zo, [...b[0] || (b[0] = [
|
|
4406
4406
|
M("path", {
|
|
4407
4407
|
d: "M4.86199 11.5948C4.78717 11.5923 4.71366 11.5745 4.64596 11.5426C4.57826 11.5107 4.51779 11.4652 4.46827 11.4091L0.753985 7.69483C0.683167 7.64891 0.623706 7.58751 0.580092 7.51525C0.536478 7.44299 0.509851 7.36177 0.502221 7.27771C0.49459 7.19366 0.506156 7.10897 0.536046 7.03004C0.565935 6.95111 0.613367 6.88 0.674759 6.82208C0.736151 6.76416 0.8099 6.72095 0.890436 6.69571C0.970973 6.67046 1.05619 6.66385 1.13966 6.67635C1.22313 6.68886 1.30266 6.72017 1.37226 6.76792C1.44186 6.81567 1.4997 6.8786 1.54141 6.95197L4.86199 10.2503L12.6397 2.49483C12.7444 2.42694 12.8689 2.39617 12.9932 2.40745C13.1174 2.41873 13.2343 2.47141 13.3251 2.55705C13.4159 2.64268 13.4753 2.75632 13.4938 2.87973C13.5123 3.00315 13.4888 3.1292 13.4271 3.23768L5.2557 11.4091C5.20618 11.4652 5.14571 11.5107 5.07801 11.5426C5.01031 11.5745 4.9368 11.5923 4.86199 11.5948Z",
|
|
4408
4408
|
fill: "currentColor"
|
|
4409
4409
|
}, null, -1)
|
|
4410
|
-
])])) : u.value === "error" ? (v(), f("svg", Oo, [...
|
|
4410
|
+
])])) : u.value === "error" ? (v(), f("svg", Oo, [...b[1] || (b[1] = [
|
|
4411
4411
|
M("path", {
|
|
4412
4412
|
d: "M8.01186 7.00933L12.27 2.75116C12.341 2.68501 12.398 2.60524 12.4375 2.51661C12.4769 2.42798 12.4982 2.3323 12.4999 2.23529C12.5016 2.13827 12.4838 2.0419 12.4474 1.95194C12.4111 1.86197 12.357 1.78024 12.2884 1.71163C12.2198 1.64302 12.138 1.58893 12.0481 1.55259C11.9581 1.51625 11.8617 1.4984 11.7647 1.50011C11.6677 1.50182 11.572 1.52306 11.4834 1.56255C11.3948 1.60204 11.315 1.65898 11.2488 1.72997L6.99067 5.98814L2.7325 1.72997C2.59553 1.60234 2.41437 1.53286 2.22718 1.53616C2.03999 1.53946 1.8614 1.61529 1.72901 1.74767C1.59663 1.88006 1.5208 2.05865 1.5175 2.24584C1.5142 2.43303 1.58368 2.61419 1.71131 2.75116L5.96948 7.00933L1.71131 11.2675C1.576 11.403 1.5 11.5866 1.5 11.7781C1.5 11.9696 1.576 12.1532 1.71131 12.2887C1.84679 12.424 2.03043 12.5 2.2219 12.5C2.41338 12.5 2.59702 12.424 2.7325 12.2887L6.99067 8.03052L11.2488 12.2887C11.3843 12.424 11.568 12.5 11.7594 12.5C11.9509 12.5 12.1346 12.424 12.27 12.2887C12.4053 12.1532 12.4813 11.9696 12.4813 11.7781C12.4813 11.5866 12.4053 11.403 12.27 11.2675L8.01186 7.00933Z",
|
|
4413
4413
|
fill: "currentColor"
|
|
@@ -4417,7 +4417,7 @@ const sl = {
|
|
|
4417
4417
|
M("span", {
|
|
4418
4418
|
id: `step-status-${S(d)}`,
|
|
4419
4419
|
class: "sr-only"
|
|
4420
|
-
}, N(
|
|
4420
|
+
}, N(y.value), 9, No),
|
|
4421
4421
|
M("div", Fo, [
|
|
4422
4422
|
M("span", {
|
|
4423
4423
|
id: `step-title-${S(d)}`,
|
|
@@ -4444,13 +4444,13 @@ const sl = {
|
|
|
4444
4444
|
index: {}
|
|
4445
4445
|
},
|
|
4446
4446
|
setup(e) {
|
|
4447
|
-
return
|
|
4447
|
+
return ge("StepIndex", e.index), (t, a) => U(t.$slots, "default");
|
|
4448
4448
|
}
|
|
4449
|
-
}), Yo = ["data-size", "data-orientation"], Wo = ["data-error", "data-completed"],
|
|
4449
|
+
}), Yo = ["data-size", "data-orientation"], Wo = ["data-error", "data-completed"], Go = {
|
|
4450
4450
|
"aria-live": "polite",
|
|
4451
4451
|
"aria-atomic": "true",
|
|
4452
4452
|
class: "sr-only"
|
|
4453
|
-
},
|
|
4453
|
+
}, Xo = /* @__PURE__ */ T({
|
|
4454
4454
|
__name: "Steps",
|
|
4455
4455
|
props: /* @__PURE__ */ ee({
|
|
4456
4456
|
orientation: { default: "horizontal" },
|
|
@@ -4465,12 +4465,12 @@ const sl = {
|
|
|
4465
4465
|
}),
|
|
4466
4466
|
emits: ["update:modelValue"],
|
|
4467
4467
|
setup(e) {
|
|
4468
|
-
const o = e, t = h(0), a = Fe(),
|
|
4468
|
+
const o = e, t = h(0), a = Fe(), n = fe(e, "modelValue"), i = h([]), s = h(null), r = H(() => n.value ?? 0), l = `steps-description-${de()}`, d = w1({}), u = r1({});
|
|
4469
4469
|
let p = null;
|
|
4470
|
-
const
|
|
4470
|
+
const k = H(() => (a.default?.() ?? [])[r.value]?.props?.title ?? ""), y = H(() => Object.entries(u).filter(([, _]) => _ !== "completed").length === 0), c = H(
|
|
4471
4471
|
() => Object.values(u).includes("error")
|
|
4472
4472
|
), m = H(() => {
|
|
4473
|
-
const _ =
|
|
4473
|
+
const _ = r.value, R = d;
|
|
4474
4474
|
if (R.value[0] == null || R.value[_] == null)
|
|
4475
4475
|
return o.orientation === "vertical" ? {
|
|
4476
4476
|
height: "100%",
|
|
@@ -4479,24 +4479,24 @@ const sl = {
|
|
|
4479
4479
|
width: "100%",
|
|
4480
4480
|
left: "0px"
|
|
4481
4481
|
};
|
|
4482
|
-
const
|
|
4482
|
+
const w = R.value[0], x = R.value[_];
|
|
4483
4483
|
return o.orientation === "vertical" ? {
|
|
4484
|
-
top: `${
|
|
4485
|
-
height: `${x -
|
|
4484
|
+
top: `${w}px`,
|
|
4485
|
+
height: `${x - w}px`
|
|
4486
4486
|
} : {
|
|
4487
|
-
left: `${
|
|
4488
|
-
width: `${x -
|
|
4487
|
+
left: `${w}px`,
|
|
4488
|
+
width: `${x - w}px`
|
|
4489
4489
|
};
|
|
4490
4490
|
}), $ = H(() => {
|
|
4491
4491
|
const _ = Object.values(d.value).sort((x, E) => x - E);
|
|
4492
4492
|
if (_.length < 2) return {};
|
|
4493
|
-
const R = _[0],
|
|
4493
|
+
const R = _[0], w = _[_.length - 1];
|
|
4494
4494
|
return o.orientation === "vertical" ? {
|
|
4495
4495
|
top: `${R}px`,
|
|
4496
|
-
height: `${
|
|
4496
|
+
height: `${w - R}px`
|
|
4497
4497
|
} : {
|
|
4498
4498
|
left: `${R}px`,
|
|
4499
|
-
right: `calc(100% - ${
|
|
4499
|
+
right: `calc(100% - ${w}px)`
|
|
4500
4500
|
};
|
|
4501
4501
|
}), L = (_, R) => d.value = { ...d.value, [_]: R };
|
|
4502
4502
|
function C(_) {
|
|
@@ -4506,13 +4506,13 @@ const sl = {
|
|
|
4506
4506
|
i.value = i.value.filter((R) => R !== _), t.value = i.value.length;
|
|
4507
4507
|
}
|
|
4508
4508
|
function O(_) {
|
|
4509
|
-
_ < 0 || _ >= i.value.length || (
|
|
4509
|
+
_ < 0 || _ >= i.value.length || (n.value = _, i.value[_]?.focus());
|
|
4510
4510
|
}
|
|
4511
|
-
function
|
|
4512
|
-
O(
|
|
4511
|
+
function b() {
|
|
4512
|
+
O(n.value + 1);
|
|
4513
4513
|
}
|
|
4514
4514
|
function I() {
|
|
4515
|
-
O(
|
|
4515
|
+
O(n.value - 1);
|
|
4516
4516
|
}
|
|
4517
4517
|
function D() {
|
|
4518
4518
|
O(0);
|
|
@@ -4523,9 +4523,9 @@ const sl = {
|
|
|
4523
4523
|
return ae(() => {
|
|
4524
4524
|
s.value && (p = new ResizeObserver(() => {
|
|
4525
4525
|
}), p.observe(s.value));
|
|
4526
|
-
}),
|
|
4527
|
-
current: H(() =>
|
|
4528
|
-
update: (_) =>
|
|
4526
|
+
}), be(() => p?.disconnect()), ge("StepsContext", {
|
|
4527
|
+
current: H(() => n.value),
|
|
4528
|
+
update: (_) => n.value = _,
|
|
4529
4529
|
stepsCount: t,
|
|
4530
4530
|
icons: o.icons,
|
|
4531
4531
|
size: o.size,
|
|
@@ -4538,7 +4538,7 @@ const sl = {
|
|
|
4538
4538
|
registerIndicatorCenter: L,
|
|
4539
4539
|
registerStep: C,
|
|
4540
4540
|
unregisterStep: B,
|
|
4541
|
-
focusNext:
|
|
4541
|
+
focusNext: b,
|
|
4542
4542
|
focusPrev: I,
|
|
4543
4543
|
focusFirst: D,
|
|
4544
4544
|
focusLast: V
|
|
@@ -4550,10 +4550,10 @@ const sl = {
|
|
|
4550
4550
|
role: "list",
|
|
4551
4551
|
"data-size": e.size,
|
|
4552
4552
|
"data-orientation": o.orientation,
|
|
4553
|
-
"aria-describedby":
|
|
4553
|
+
"aria-describedby": l
|
|
4554
4554
|
}, [
|
|
4555
4555
|
M("p", {
|
|
4556
|
-
id:
|
|
4556
|
+
id: l,
|
|
4557
4557
|
class: "sr-only"
|
|
4558
4558
|
}, " This is a multi-step process. Use arrow keys to navigate between steps. "),
|
|
4559
4559
|
M("div", {
|
|
@@ -4564,30 +4564,30 @@ const sl = {
|
|
|
4564
4564
|
M("div", {
|
|
4565
4565
|
class: "track-progress",
|
|
4566
4566
|
"data-error": c.value,
|
|
4567
|
-
"data-completed":
|
|
4567
|
+
"data-completed": y.value,
|
|
4568
4568
|
style: ye(m.value)
|
|
4569
4569
|
}, null, 12, Wo)
|
|
4570
4570
|
], 4),
|
|
4571
|
-
(v(!0), f(te, null, ue(_.$slots.default?.(), (
|
|
4571
|
+
(v(!0), f(te, null, ue(_.$slots.default?.(), (w, x) => (v(), J(jo, {
|
|
4572
4572
|
key: x,
|
|
4573
4573
|
index: x
|
|
4574
4574
|
}, {
|
|
4575
4575
|
default: W(() => [
|
|
4576
|
-
(v(), J(Ve(
|
|
4576
|
+
(v(), J(Ve(w)))
|
|
4577
4577
|
]),
|
|
4578
4578
|
_: 2
|
|
4579
4579
|
}, 1032, ["index"]))), 128))
|
|
4580
4580
|
], 8, Yo),
|
|
4581
|
-
M("div",
|
|
4581
|
+
M("div", Go, " Step " + N(r.value + 1) + " of " + N(t.value) + ": " + N(k.value), 1)
|
|
4582
4582
|
], 64));
|
|
4583
4583
|
}
|
|
4584
|
-
}), fl = /* @__PURE__ */ K(
|
|
4584
|
+
}), fl = /* @__PURE__ */ K(Xo, [["__scopeId", "data-v-8697173d"]]), Jo = ["data-align"], Qo = /* @__PURE__ */ T({
|
|
4585
4585
|
__name: "Timeline",
|
|
4586
4586
|
props: {
|
|
4587
4587
|
align: { default: "left" }
|
|
4588
4588
|
},
|
|
4589
4589
|
setup(e) {
|
|
4590
|
-
return
|
|
4590
|
+
return ge("TimelineContext", e), (t, a) => (v(), f("ol", {
|
|
4591
4591
|
role: "list",
|
|
4592
4592
|
class: "ui-timeline",
|
|
4593
4593
|
"data-align": e.align
|
|
@@ -4608,16 +4608,16 @@ const sl = {
|
|
|
4608
4608
|
setup(e) {
|
|
4609
4609
|
const o = e, t = se("TimelineContext");
|
|
4610
4610
|
if (!t) throw new Error("TimelineItem must be used within a Timeline component");
|
|
4611
|
-
const a = de(),
|
|
4611
|
+
const a = de(), n = de(), i = H(() => t.align === "alternate" ? (o.index ?? 0) % 2 === 0 ? "ui-timeline-item--left" : "ui-timeline-item--right" : `ui-timeline-item--${t.align}`), s = (d) => {
|
|
4612
4612
|
const u = new Date(d).getDay();
|
|
4613
4613
|
return u < 10 ? `0${u}` : u;
|
|
4614
|
-
},
|
|
4614
|
+
}, r = (d) => new Date(d).toLocaleString("default", { month: "short" }), l = (d) => new Date(d).getFullYear();
|
|
4615
4615
|
return (d, u) => (v(), f("li", {
|
|
4616
4616
|
tabindex: "0",
|
|
4617
4617
|
class: re([i.value, "ui-timeline-item"]),
|
|
4618
4618
|
"data-align": S(t).align,
|
|
4619
4619
|
"aria-labelledby": e.title ? S(a) : void 0,
|
|
4620
|
-
"aria-describedby": e.description ? S(
|
|
4620
|
+
"aria-describedby": e.description ? S(n) : void 0
|
|
4621
4621
|
}, [
|
|
4622
4622
|
u[0] || (u[0] = M("div", {
|
|
4623
4623
|
class: "ui-timeline-marker",
|
|
@@ -4629,9 +4629,9 @@ const sl = {
|
|
|
4629
4629
|
class: "ui-timeline-date",
|
|
4630
4630
|
datetime: e.date
|
|
4631
4631
|
}, [
|
|
4632
|
-
M("span", on, N(
|
|
4632
|
+
M("span", on, N(r(e.date)), 1),
|
|
4633
4633
|
M("span", nn, N(s(e.date)), 1),
|
|
4634
|
-
M("span", ln, N(
|
|
4634
|
+
M("span", ln, N(l(e.date)), 1)
|
|
4635
4635
|
], 8, an)) : q("", !0),
|
|
4636
4636
|
M("div", {
|
|
4637
4637
|
class: "ui-timeline-body",
|
|
@@ -4652,7 +4652,7 @@ const sl = {
|
|
|
4652
4652
|
U(d.$slots, "description", {}, () => [
|
|
4653
4653
|
e.description ? (v(), f("p", {
|
|
4654
4654
|
key: 0,
|
|
4655
|
-
id: S(
|
|
4655
|
+
id: S(n),
|
|
4656
4656
|
class: "ui-timeline-description"
|
|
4657
4657
|
}, N(e.description), 9, un)) : q("", !0)
|
|
4658
4658
|
], !0)
|
|
@@ -4671,7 +4671,7 @@ const sl = {
|
|
|
4671
4671
|
key: 0,
|
|
4672
4672
|
role: "tablist",
|
|
4673
4673
|
class: "carousel-indicators"
|
|
4674
|
-
}, mn = ["aria-label", "aria-selected", "aria-current", "onClick", "onKeydown"], hn = 0.35, yn = 0.2,
|
|
4674
|
+
}, mn = ["aria-label", "aria-selected", "aria-current", "onClick", "onKeydown"], hn = 0.35, yn = 0.2, gn = /* @__PURE__ */ T({
|
|
4675
4675
|
__name: "Carousel",
|
|
4676
4676
|
props: /* @__PURE__ */ ee({
|
|
4677
4677
|
ariaLabel: { default: "Carousel" },
|
|
@@ -4693,14 +4693,14 @@ const sl = {
|
|
|
4693
4693
|
}),
|
|
4694
4694
|
emits: ["update:modelValue"],
|
|
4695
4695
|
setup(e) {
|
|
4696
|
-
const o = fe(e, "modelValue"), t = e, a = h(0),
|
|
4696
|
+
const o = fe(e, "modelValue"), t = e, a = h(0), n = h(0), i = h(0), s = h(0), r = h(0), l = h(0), d = h(!1), u = h(!1), p = h(0), k = h([]), y = h(1), c = h(o.value), m = h(null), $ = h(null);
|
|
4697
4697
|
let L = null, C = null;
|
|
4698
4698
|
Y(
|
|
4699
4699
|
() => o.value,
|
|
4700
4700
|
(z) => c.value = z
|
|
4701
4701
|
);
|
|
4702
|
-
const B = H(() =>
|
|
4703
|
-
const z = c.value * (100 /
|
|
4702
|
+
const B = H(() => k.value[c.value] ?? void 0), O = H(() => Math.floor(c.value / y.value)), b = H(() => Math.ceil(G.value / y.value)), I = H(() => Math.max(0, G.value - y.value)), D = H(() => {
|
|
4703
|
+
const z = c.value * (100 / y.value), j = u.value && $.value ? i.value / $.value.clientWidth * 100 : 0;
|
|
4704
4704
|
return {
|
|
4705
4705
|
transform: `translateX(calc(-${z}% + ${j}%))`,
|
|
4706
4706
|
transition: u.value ? "none" : "transform 300ms ease"
|
|
@@ -4708,17 +4708,17 @@ const sl = {
|
|
|
4708
4708
|
}), V = (z) => {
|
|
4709
4709
|
let j = z;
|
|
4710
4710
|
if (t.loop) {
|
|
4711
|
-
const ie = Math.round(z /
|
|
4712
|
-
j = (ie % ne + ne) % ne *
|
|
4711
|
+
const ie = Math.round(z / y.value), ne = b.value;
|
|
4712
|
+
j = (ie % ne + ne) % ne * y.value;
|
|
4713
4713
|
} else
|
|
4714
4714
|
j = Math.min(
|
|
4715
4715
|
Math.max(z, 0),
|
|
4716
4716
|
I.value
|
|
4717
4717
|
);
|
|
4718
4718
|
c.value = j, o.value = j;
|
|
4719
|
-
}, _ = () => V(c.value +
|
|
4719
|
+
}, _ = () => V(c.value + y.value), R = () => V(c.value - y.value), w = (z) => {
|
|
4720
4720
|
z.key === "ArrowRight" ? _() : z.key === "ArrowLeft" && R();
|
|
4721
|
-
}, x = (z) => (
|
|
4721
|
+
}, x = (z) => (k.value.includes(z) || k.value.push(z), k.value.indexOf(z)), E = (z) => k.value = k.value.filter((j) => j !== z), G = H(() => k.value.length), Q = () => {
|
|
4722
4722
|
!t.autoplay || L !== null || (L = window.setInterval(() => {
|
|
4723
4723
|
d.value || _();
|
|
4724
4724
|
}, t.autoplayDelay));
|
|
@@ -4731,24 +4731,24 @@ const sl = {
|
|
|
4731
4731
|
let ie = j[0]?.[1] ?? 1;
|
|
4732
4732
|
for (const [ne, ke] of j) z >= ne && (ie = ke);
|
|
4733
4733
|
return ie;
|
|
4734
|
-
},
|
|
4735
|
-
z.button === 0 && (u.value = !0,
|
|
4734
|
+
}, g = (z) => {
|
|
4735
|
+
z.button === 0 && (u.value = !0, n.value = z.clientX, a.value = z.clientX, l.value = z.clientX, i.value = 0, s.value = performance.now(), r.value = 0, p.value = c.value, $.value?.setPointerCapture(z.pointerId), oe(), $.value.style.userSelect = "");
|
|
4736
4736
|
}, A = (z) => {
|
|
4737
4737
|
if (!u.value) return;
|
|
4738
4738
|
const j = performance.now(), ie = z.clientX - a.value, ne = j - s.value;
|
|
4739
|
-
ne > 0 && (
|
|
4740
|
-
},
|
|
4739
|
+
ne > 0 && (r.value = ie / ne), a.value = z.clientX, s.value = j, l.value = z.clientX, i.value = l.value - n.value;
|
|
4740
|
+
}, X = (z) => {
|
|
4741
4741
|
if (!u.value) return;
|
|
4742
4742
|
u.value = !1, $.value?.releasePointerCapture(z.pointerId), $.value.style.userSelect = "";
|
|
4743
|
-
const j = $.value.clientWidth /
|
|
4744
|
-
Math.abs(
|
|
4743
|
+
const j = $.value.clientWidth / y.value, ie = i.value / j;
|
|
4744
|
+
Math.abs(r.value) > hn ? r.value < 0 ? _() : R() : Math.abs(ie) > yn ? ie < 0 ? _() : R() : V(p.value), i.value = 0, r.value = 0, Q();
|
|
4745
4745
|
};
|
|
4746
4746
|
return ae(() => {
|
|
4747
4747
|
Q(), m.value && (C = new ResizeObserver((z) => {
|
|
4748
4748
|
const j = z[0]?.contentRect.width;
|
|
4749
|
-
j !== void 0 && (
|
|
4749
|
+
j !== void 0 && (y.value = Z(j));
|
|
4750
4750
|
}), C.observe(m.value));
|
|
4751
|
-
}),
|
|
4751
|
+
}), be(() => {
|
|
4752
4752
|
oe(), C?.disconnect();
|
|
4753
4753
|
}), Y(
|
|
4754
4754
|
() => t.autoplay,
|
|
@@ -4756,13 +4756,13 @@ const sl = {
|
|
|
4756
4756
|
z ? Q() : oe();
|
|
4757
4757
|
},
|
|
4758
4758
|
{ immediate: !0 }
|
|
4759
|
-
), Y(
|
|
4759
|
+
), Y(y, () => c.value = Math.min(c.value, I.value)), ge("CarouselContext", {
|
|
4760
4760
|
register: x,
|
|
4761
4761
|
unregister: E,
|
|
4762
4762
|
activeIndex: c,
|
|
4763
|
-
slideCount:
|
|
4763
|
+
slideCount: G,
|
|
4764
4764
|
deltaX: i,
|
|
4765
|
-
itemsPerView: t.itemsPerView instanceof Object ?
|
|
4765
|
+
itemsPerView: t.itemsPerView instanceof Object ? y : h(t.itemsPerView)
|
|
4766
4766
|
}), (z, j) => (v(), f("div", {
|
|
4767
4767
|
ref_key: "rootRef",
|
|
4768
4768
|
ref: m,
|
|
@@ -4772,8 +4772,8 @@ const sl = {
|
|
|
4772
4772
|
"aria-label": e.ariaLabel,
|
|
4773
4773
|
tabindex: "0",
|
|
4774
4774
|
"aria-activedescendant": B.value,
|
|
4775
|
-
style: ye({ "--items-per-view":
|
|
4776
|
-
onKeydown:
|
|
4775
|
+
style: ye({ "--items-per-view": y.value }),
|
|
4776
|
+
onKeydown: w,
|
|
4777
4777
|
onMouseenter: j[0] || (j[0] = (ie) => d.value = !0),
|
|
4778
4778
|
onMouseleave: j[1] || (j[1] = (ie) => d.value = !1),
|
|
4779
4779
|
onFocusin: j[2] || (j[2] = (ie) => d.value = !0),
|
|
@@ -4789,15 +4789,15 @@ const sl = {
|
|
|
4789
4789
|
ref: $,
|
|
4790
4790
|
class: "carousel-track",
|
|
4791
4791
|
style: ye(D.value),
|
|
4792
|
-
onPointerdown:
|
|
4792
|
+
onPointerdown: g,
|
|
4793
4793
|
onPointermove: A,
|
|
4794
|
-
onPointerup:
|
|
4795
|
-
onPointercancel:
|
|
4794
|
+
onPointerup: X,
|
|
4795
|
+
onPointercancel: X
|
|
4796
4796
|
}, [
|
|
4797
4797
|
U(z.$slots, "default", {}, void 0, !0)
|
|
4798
4798
|
], 36)
|
|
4799
4799
|
]),
|
|
4800
|
-
M("span", pn, " Slide " + N(Math.floor(c.value /
|
|
4800
|
+
M("span", pn, " Slide " + N(Math.floor(c.value / y.value) + 1) + " of " + N(b.value), 1),
|
|
4801
4801
|
M("button", {
|
|
4802
4802
|
type: "button",
|
|
4803
4803
|
class: "carousel-control prev",
|
|
@@ -4815,40 +4815,40 @@ const sl = {
|
|
|
4815
4815
|
P(ce, { name: "directionDown" })
|
|
4816
4816
|
]),
|
|
4817
4817
|
e.showIndicators ? (v(), f("div", Cn, [
|
|
4818
|
-
(v(!0), f(te, null, ue(
|
|
4818
|
+
(v(!0), f(te, null, ue(b.value, (ie, ne) => (v(), f("button", {
|
|
4819
4819
|
role: "tab",
|
|
4820
4820
|
type: "button",
|
|
4821
4821
|
key: ne,
|
|
4822
|
-
class: re(["indicator", { active: ne === Math.floor(c.value /
|
|
4822
|
+
class: re(["indicator", { active: ne === Math.floor(c.value / y.value) }]),
|
|
4823
4823
|
"aria-label": `Go to slide ${ne + 1}`,
|
|
4824
4824
|
"aria-selected": ne === O.value,
|
|
4825
4825
|
"aria-current": ne === O.value,
|
|
4826
|
-
onClick: (ke) => V(ne *
|
|
4826
|
+
onClick: (ke) => V(ne * y.value),
|
|
4827
4827
|
onKeydown: [
|
|
4828
|
-
ve(le((ke) => V((ne - 1 +
|
|
4829
|
-
ve(le((ke) => V((ne + 1) %
|
|
4828
|
+
ve(le((ke) => V((ne - 1 + b.value) % b.value * y.value), ["prevent"]), ["left"]),
|
|
4829
|
+
ve(le((ke) => V((ne + 1) % b.value * y.value), ["prevent"]), ["right"])
|
|
4830
4830
|
]
|
|
4831
4831
|
}, null, 42, mn))), 128))
|
|
4832
4832
|
])) : q("", !0)
|
|
4833
4833
|
], 44, vn));
|
|
4834
4834
|
}
|
|
4835
|
-
}), ml = /* @__PURE__ */ K(
|
|
4835
|
+
}), ml = /* @__PURE__ */ K(gn, [["__scopeId", "data-v-30cdfc00"]]), bn = ["aria-hidden", "aria-label"], kn = /* @__PURE__ */ T({
|
|
4836
4836
|
__name: "CarouselItem",
|
|
4837
4837
|
setup(e) {
|
|
4838
4838
|
const o = se("CarouselContext");
|
|
4839
4839
|
if (!o) throw new Error("CarouselItem must be used inside a Carousel");
|
|
4840
|
-
const t = "carousel-item-" + de(), a = h(0),
|
|
4841
|
-
return ae(() => a.value = o.register(t)),
|
|
4840
|
+
const t = "carousel-item-" + de(), a = h(0), n = H(() => Math.abs(o.deltaX.value) > 5), i = H(() => Math.floor(a.value / o.itemsPerView.value) === Math.floor(o.activeIndex.value / o.itemsPerView.value));
|
|
4841
|
+
return ae(() => a.value = o.register(t)), be(() => o.unregister(t)), (s, r) => (v(), f("div", {
|
|
4842
4842
|
role: "group",
|
|
4843
4843
|
class: "carousel-item",
|
|
4844
4844
|
id: t,
|
|
4845
4845
|
"aria-roledescription": "slide",
|
|
4846
4846
|
"aria-hidden": !i.value,
|
|
4847
4847
|
"aria-label": `Slide ${a.value + 1}`,
|
|
4848
|
-
onClickCapture:
|
|
4848
|
+
onClickCapture: r[0] || (r[0] = (l) => n.value && l.preventDefault())
|
|
4849
4849
|
}, [
|
|
4850
4850
|
U(s.$slots, "default", {}, void 0, !0)
|
|
4851
|
-
], 40,
|
|
4851
|
+
], 40, bn));
|
|
4852
4852
|
}
|
|
4853
4853
|
}), hl = /* @__PURE__ */ K(kn, [["__scopeId", "data-v-a569d055"]]), De = /* @__PURE__ */ Symbol("TabsContext"), yl = T({
|
|
4854
4854
|
name: "Tabs",
|
|
@@ -4866,10 +4866,10 @@ const sl = {
|
|
|
4866
4866
|
},
|
|
4867
4867
|
emits: ["update:modelValue"],
|
|
4868
4868
|
setup(e, { emit: o, slots: t }) {
|
|
4869
|
-
const a = h(e.modelValue ?? e.defaultValue),
|
|
4869
|
+
const a = h(e.modelValue ?? e.defaultValue), n = h(!1), i = h([]), s = h("forward"), r = h();
|
|
4870
4870
|
Y(a, (c) => {
|
|
4871
|
-
!c || !
|
|
4872
|
-
document.getElementById(`tab-${c}`)?.focus(),
|
|
4871
|
+
!c || !n.value || requestAnimationFrame(() => {
|
|
4872
|
+
document.getElementById(`tab-${c}`)?.focus(), n.value = !1;
|
|
4873
4873
|
});
|
|
4874
4874
|
}), Y(
|
|
4875
4875
|
() => e.modelValue,
|
|
@@ -4879,7 +4879,7 @@ const sl = {
|
|
|
4879
4879
|
), Y(i, (c) => {
|
|
4880
4880
|
!a.value && c.length && (a.value = c[0]);
|
|
4881
4881
|
});
|
|
4882
|
-
const
|
|
4882
|
+
const l = (c, m) => i.value[m] = c, d = (c) => {
|
|
4883
4883
|
const m = i.value.filter(Boolean);
|
|
4884
4884
|
if (!m.length) return;
|
|
4885
4885
|
const $ = a.value;
|
|
@@ -4894,27 +4894,27 @@ const sl = {
|
|
|
4894
4894
|
}
|
|
4895
4895
|
L !== -1 && C !== -1 && (s.value = C > L ? "forward" : "backward"), $ !== c && (a.value = c, o("update:modelValue", c));
|
|
4896
4896
|
}, u = H(() => s.value === "forward" ? "tab-slide-forward" : "tab-slide-backward"), p = (c) => {
|
|
4897
|
-
c instanceof HTMLElement &&
|
|
4898
|
-
},
|
|
4899
|
-
if (c instanceof HTMLElement &&
|
|
4897
|
+
c instanceof HTMLElement && r.value && (r.value.style.height = `${c.offsetHeight}px`);
|
|
4898
|
+
}, k = (c) => {
|
|
4899
|
+
if (c instanceof HTMLElement && r.value) {
|
|
4900
4900
|
const m = c.offsetHeight;
|
|
4901
4901
|
requestAnimationFrame(() => {
|
|
4902
|
-
|
|
4902
|
+
r.value && (r.value.style.height = `${m}px`);
|
|
4903
4903
|
});
|
|
4904
4904
|
}
|
|
4905
|
-
},
|
|
4906
|
-
|
|
4905
|
+
}, y = () => {
|
|
4906
|
+
r.value && (r.value.style.height = "");
|
|
4907
4907
|
};
|
|
4908
|
-
return
|
|
4908
|
+
return ge(De, {
|
|
4909
4909
|
activeValue: a,
|
|
4910
4910
|
setValue: d,
|
|
4911
|
-
registerTrigger:
|
|
4911
|
+
registerTrigger: l,
|
|
4912
4912
|
direction: s,
|
|
4913
4913
|
activationMode: h(e.activationMode),
|
|
4914
4914
|
orientation: h(e.orientation),
|
|
4915
4915
|
triggers: i,
|
|
4916
|
-
contentWrapperRef:
|
|
4917
|
-
focusOnChange:
|
|
4916
|
+
contentWrapperRef: r,
|
|
4917
|
+
focusOnChange: n
|
|
4918
4918
|
}), () => {
|
|
4919
4919
|
const c = t.default?.() || [], m = [], $ = [];
|
|
4920
4920
|
c.forEach((C) => {
|
|
@@ -4927,7 +4927,7 @@ const sl = {
|
|
|
4927
4927
|
"div",
|
|
4928
4928
|
{
|
|
4929
4929
|
class: "tabs-content-wrapper",
|
|
4930
|
-
ref:
|
|
4930
|
+
ref: r
|
|
4931
4931
|
},
|
|
4932
4932
|
F(
|
|
4933
4933
|
$e,
|
|
@@ -4935,8 +4935,8 @@ const sl = {
|
|
|
4935
4935
|
name: u.value,
|
|
4936
4936
|
mode: "out-in",
|
|
4937
4937
|
onBeforeLeave: p,
|
|
4938
|
-
onEnter:
|
|
4939
|
-
onAfterEnter:
|
|
4938
|
+
onEnter: k,
|
|
4939
|
+
onAfterEnter: y
|
|
4940
4940
|
},
|
|
4941
4941
|
() => L ? [F(L.type, {
|
|
4942
4942
|
...L.props,
|
|
@@ -4947,7 +4947,7 @@ const sl = {
|
|
|
4947
4947
|
];
|
|
4948
4948
|
};
|
|
4949
4949
|
}
|
|
4950
|
-
}),
|
|
4950
|
+
}), gl = T({
|
|
4951
4951
|
name: "TabsList",
|
|
4952
4952
|
setup(e, { slots: o }) {
|
|
4953
4953
|
const t = se(De);
|
|
@@ -4962,7 +4962,7 @@ const sl = {
|
|
|
4962
4962
|
o.default?.()
|
|
4963
4963
|
);
|
|
4964
4964
|
}
|
|
4965
|
-
}),
|
|
4965
|
+
}), bl = T({
|
|
4966
4966
|
name: "TabsTrigger",
|
|
4967
4967
|
props: {
|
|
4968
4968
|
value: {
|
|
@@ -4981,11 +4981,11 @@ const sl = {
|
|
|
4981
4981
|
setup(e, { slots: o }) {
|
|
4982
4982
|
const t = se(De);
|
|
4983
4983
|
if (!t) throw new Error("TabsTrigger components must be used inside <Tabs>");
|
|
4984
|
-
const a = H(() => t.activeValue.value === e.value),
|
|
4984
|
+
const a = H(() => t.activeValue.value === e.value), n = () => !e.disabled && t.setValue(e.value), i = (s) => {
|
|
4985
4985
|
if (t.focusOnChange.value = !0, !["ArrowRight", "ArrowLeft", "ArrowDown", "ArrowUp", "Home", "End"].includes(s.key)) return;
|
|
4986
4986
|
s.preventDefault();
|
|
4987
|
-
const
|
|
4988
|
-
let u =
|
|
4987
|
+
const l = t.triggers.value.filter(Boolean);
|
|
4988
|
+
let u = l.indexOf(e.value);
|
|
4989
4989
|
const p = t.orientation.value === "horizontal";
|
|
4990
4990
|
switch (s.key) {
|
|
4991
4991
|
case "ArrowRight":
|
|
@@ -5004,16 +5004,16 @@ const sl = {
|
|
|
5004
5004
|
u = 0;
|
|
5005
5005
|
break;
|
|
5006
5006
|
case "End":
|
|
5007
|
-
u =
|
|
5007
|
+
u = l.length - 1;
|
|
5008
5008
|
break;
|
|
5009
5009
|
}
|
|
5010
|
-
u = (u +
|
|
5011
|
-
const
|
|
5012
|
-
t.activationMode.value === "auto" && t.setValue(
|
|
5013
|
-
document.getElementById(`tab-${
|
|
5010
|
+
u = (u + l.length) % l.length;
|
|
5011
|
+
const k = l[u];
|
|
5012
|
+
t.activationMode.value === "auto" && t.setValue(k), requestAnimationFrame(() => {
|
|
5013
|
+
document.getElementById(`tab-${k}`)?.focus();
|
|
5014
5014
|
});
|
|
5015
5015
|
};
|
|
5016
|
-
return ae(() => !e.disabled && t.registerTrigger(e.value, e.index)),
|
|
5016
|
+
return ae(() => !e.disabled && t.registerTrigger(e.value, e.index)), be(() => t.triggers.value[e.index] = void 0), () => F(
|
|
5017
5017
|
he,
|
|
5018
5018
|
{
|
|
5019
5019
|
role: "tab",
|
|
@@ -5024,7 +5024,7 @@ const sl = {
|
|
|
5024
5024
|
tabindex: a.value ? 0 : -1,
|
|
5025
5025
|
disabled: e.disabled ?? void 0,
|
|
5026
5026
|
class: "tabs-trigger",
|
|
5027
|
-
onClick:
|
|
5027
|
+
onClick: n,
|
|
5028
5028
|
onKeydown: i
|
|
5029
5029
|
},
|
|
5030
5030
|
{ default: () => o.default?.() }
|
|
@@ -5056,41 +5056,41 @@ const sl = {
|
|
|
5056
5056
|
__name: "Dropdown",
|
|
5057
5057
|
setup(e) {
|
|
5058
5058
|
let o = 0;
|
|
5059
|
-
const t = h(!1), a = h(null),
|
|
5060
|
-
t.value = !1,
|
|
5059
|
+
const t = h(!1), a = h(null), n = h({}), i = `dropdown-${de()}`, s = `${i}-menu`, r = `${i}-trigger`, l = () => t.value = !0, d = () => {
|
|
5060
|
+
t.value = !1, n.value = {}, o = 0, a.value?.focus({ preventScroll: !0 });
|
|
5061
5061
|
}, u = () => t.value = !t.value, p = (C) => {
|
|
5062
5062
|
const B = `dropdown-item-${o++}`;
|
|
5063
|
-
return
|
|
5064
|
-
},
|
|
5065
|
-
const B =
|
|
5063
|
+
return n.value[B] = C, B;
|
|
5064
|
+
}, k = (C) => {
|
|
5065
|
+
const B = n.value[C];
|
|
5066
5066
|
B && B.focus();
|
|
5067
|
-
},
|
|
5068
|
-
const C = Object.keys(
|
|
5069
|
-
C &&
|
|
5067
|
+
}, y = () => {
|
|
5068
|
+
const C = Object.keys(n.value)[0];
|
|
5069
|
+
C && k(C);
|
|
5070
5070
|
}, c = () => {
|
|
5071
|
-
const C = Object.keys(
|
|
5072
|
-
B &&
|
|
5071
|
+
const C = Object.keys(n.value), B = C[C.length - 1];
|
|
5072
|
+
B && k(B);
|
|
5073
5073
|
}, m = (C) => {
|
|
5074
|
-
const B = Object.keys(
|
|
5075
|
-
O >= 0 && O < B.length - 1 &&
|
|
5074
|
+
const B = Object.keys(n.value), O = L(C), b = B[O + 1];
|
|
5075
|
+
O >= 0 && O < B.length - 1 && b && k(b);
|
|
5076
5076
|
}, $ = (C) => {
|
|
5077
|
-
const B = Object.keys(
|
|
5078
|
-
O > 0 &&
|
|
5079
|
-
}, L = (C) => Object.keys(
|
|
5080
|
-
return
|
|
5081
|
-
open:
|
|
5077
|
+
const B = Object.keys(n.value), O = L(C), b = B[O - 1];
|
|
5078
|
+
O > 0 && b && k(b);
|
|
5079
|
+
}, L = (C) => Object.keys(n.value).indexOf(C);
|
|
5080
|
+
return ge("DropdownContext", {
|
|
5081
|
+
open: l,
|
|
5082
5082
|
close: d,
|
|
5083
5083
|
toggle: u,
|
|
5084
5084
|
isOpen: t,
|
|
5085
5085
|
registerItem: p,
|
|
5086
|
-
focusItem:
|
|
5086
|
+
focusItem: k,
|
|
5087
5087
|
focusNextItem: m,
|
|
5088
5088
|
focusPrevItem: $,
|
|
5089
|
-
focusFirstItem:
|
|
5089
|
+
focusFirstItem: y,
|
|
5090
5090
|
focusLastItem: c,
|
|
5091
5091
|
triggerRef: a,
|
|
5092
5092
|
menuId: s,
|
|
5093
|
-
triggerId:
|
|
5093
|
+
triggerId: r
|
|
5094
5094
|
}), (C, B) => (v(), f("div", wn, [
|
|
5095
5095
|
U(C.$slots, "default")
|
|
5096
5096
|
]));
|
|
@@ -5103,7 +5103,7 @@ const sl = {
|
|
|
5103
5103
|
setup(e) {
|
|
5104
5104
|
const o = e, t = se("DropdownContext");
|
|
5105
5105
|
if (!t) throw new Error("DropdownTrigger must be used within a Dropdown");
|
|
5106
|
-
const a = h(),
|
|
5106
|
+
const a = h(), n = (i) => {
|
|
5107
5107
|
i.key === "ArrowDown" && (i.preventDefault(), t.open(), we(() => t.focusFirstItem())), i.key === "ArrowUp" && (i.preventDefault(), t.open(), we(() => t.focusLastItem()));
|
|
5108
5108
|
};
|
|
5109
5109
|
return ae(() => t.triggerRef.value = a.value?.el), (i, s) => (v(), J(he, {
|
|
@@ -5115,7 +5115,7 @@ const sl = {
|
|
|
5115
5115
|
"aria-controls": S(t).menuId,
|
|
5116
5116
|
"aria-expanded": S(t).isOpen.value,
|
|
5117
5117
|
onClick: S(t).toggle,
|
|
5118
|
-
onKeydown:
|
|
5118
|
+
onKeydown: n
|
|
5119
5119
|
}, {
|
|
5120
5120
|
default: W(() => [
|
|
5121
5121
|
U(i.$slots, "default", {}, void 0, !0),
|
|
@@ -5132,34 +5132,32 @@ const sl = {
|
|
|
5132
5132
|
setup(e) {
|
|
5133
5133
|
const o = se("DropdownContext");
|
|
5134
5134
|
if (!o) throw new Error("DropdownMenu must be used within a Dropdown");
|
|
5135
|
-
const t = h(), a = h({}),
|
|
5136
|
-
const
|
|
5137
|
-
t.value?.contains(
|
|
5138
|
-
}, i = (
|
|
5139
|
-
const
|
|
5140
|
-
if (!
|
|
5141
|
-
const r =
|
|
5142
|
-
|
|
5135
|
+
const t = h(), a = h({}), n = (r) => {
|
|
5136
|
+
const l = r.target;
|
|
5137
|
+
t.value?.contains(l) || o.triggerRef.value?.contains(l) || o.close();
|
|
5138
|
+
}, i = (r) => r.key === "Escape" && o.close(), s = () => {
|
|
5139
|
+
const r = o.triggerRef.value, l = t.value;
|
|
5140
|
+
if (!r || !l) return;
|
|
5141
|
+
const d = 8, u = r.getBoundingClientRect(), p = l.getBoundingClientRect();
|
|
5142
|
+
let k = u.bottom, y = u.left;
|
|
5143
|
+
y = Math.min(Math.max(d, y), window.innerWidth - p.width - d), a.value = {
|
|
5143
5144
|
"--dropdown-menu-position": "fixed",
|
|
5144
|
-
"--dropdown-menu-top": `${
|
|
5145
|
-
"--dropdown-menu-left": `${
|
|
5145
|
+
"--dropdown-menu-top": `${k}px`,
|
|
5146
|
+
"--dropdown-menu-left": `${y}px`
|
|
5146
5147
|
};
|
|
5147
5148
|
};
|
|
5148
5149
|
return Y(
|
|
5149
5150
|
() => o.isOpen.value,
|
|
5150
|
-
(
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
() => o.isOpen.value,
|
|
5155
|
-
(n) => {
|
|
5156
|
-
n ? document.addEventListener("pointerdown", l, !0) : document.removeEventListener("pointerdown", l, !0);
|
|
5151
|
+
(r) => {
|
|
5152
|
+
r ? (requestAnimationFrame(() => {
|
|
5153
|
+
s(), o.focusFirstItem();
|
|
5154
|
+
}), document.addEventListener("pointerdown", n, !0)) : document.removeEventListener("pointerdown", n, !0);
|
|
5157
5155
|
}
|
|
5158
5156
|
), ae(() => {
|
|
5159
5157
|
window.addEventListener("scroll", s, !0), window.addEventListener("resize", s);
|
|
5160
|
-
}),
|
|
5158
|
+
}), be(() => {
|
|
5161
5159
|
window.removeEventListener("scroll", s, !0), window.removeEventListener("resize", s);
|
|
5162
|
-
}), (
|
|
5160
|
+
}), (r, l) => (v(), J(He, { to: "body" }, [
|
|
5163
5161
|
S(o).isOpen.value ? (v(), f("div", {
|
|
5164
5162
|
key: 0,
|
|
5165
5163
|
role: "menu",
|
|
@@ -5172,17 +5170,17 @@ const sl = {
|
|
|
5172
5170
|
class: "ui-dropdown-menu",
|
|
5173
5171
|
onKeydown: i
|
|
5174
5172
|
}, [
|
|
5175
|
-
U(
|
|
5173
|
+
U(r.$slots, "default", {}, void 0, !0)
|
|
5176
5174
|
], 44, Ln)) : q("", !0)
|
|
5177
5175
|
]));
|
|
5178
5176
|
}
|
|
5179
|
-
}), Ll = /* @__PURE__ */ K(xn, [["__scopeId", "data-v-
|
|
5177
|
+
}), Ll = /* @__PURE__ */ K(xn, [["__scopeId", "data-v-851556e4"]]), $n = /* @__PURE__ */ T({
|
|
5180
5178
|
__name: "DropdownItem",
|
|
5181
5179
|
setup(e) {
|
|
5182
5180
|
const o = se("DropdownContext");
|
|
5183
5181
|
if (!o) throw new Error("DropdownItem must be used within a Dropdown");
|
|
5184
5182
|
let t;
|
|
5185
|
-
const a = h(),
|
|
5183
|
+
const a = h(), n = (i) => {
|
|
5186
5184
|
i.key === "ArrowDown" && (i.preventDefault(), o.focusNextItem(t)), i.key === "ArrowUp" && (i.preventDefault(), o.focusPrevItem(t)), (i.key === "Enter" || i.key === " ") && (i.preventDefault(), a.value?.click(), o.close());
|
|
5187
5185
|
};
|
|
5188
5186
|
return ae(() => t = o.registerItem(a.value)), (i, s) => (v(), f("div", {
|
|
@@ -5191,40 +5189,40 @@ const sl = {
|
|
|
5191
5189
|
role: "menuitem",
|
|
5192
5190
|
class: "ui-dropdown-item",
|
|
5193
5191
|
tabindex: "-1",
|
|
5194
|
-
onKeydown:
|
|
5192
|
+
onKeydown: n,
|
|
5195
5193
|
onClick: s[0] || (s[0] = //@ts-ignore
|
|
5196
|
-
(...
|
|
5197
|
-
onPointerenter: s[1] || (s[1] = (
|
|
5194
|
+
(...r) => S(o).close && S(o).close(...r)),
|
|
5195
|
+
onPointerenter: s[1] || (s[1] = (r) => a.value?.focus())
|
|
5198
5196
|
}, [
|
|
5199
5197
|
U(i.$slots, "default", {}, void 0, !0)
|
|
5200
5198
|
], 544));
|
|
5201
5199
|
}
|
|
5202
5200
|
}), xl = /* @__PURE__ */ K($n, [["__scopeId", "data-v-69de3d9c"]]), Vn = (e) => {
|
|
5203
|
-
const o = /* @__PURE__ */ new Date(), t = e.locale || "default", a = h(e.modelValue ?? null),
|
|
5204
|
-
const
|
|
5205
|
-
return
|
|
5206
|
-
}), n = H(() => {
|
|
5207
|
-
const w = new Date(2021, 5, 6);
|
|
5208
|
-
return Array.from({ length: 7 }).map((b, c) => {
|
|
5209
|
-
const m = new Date(w);
|
|
5210
|
-
return m.setDate(w.getDate() + (c + i) % 7), new Intl.DateTimeFormat(t, { weekday: "short" }).format(m).replace(".", "");
|
|
5211
|
-
});
|
|
5201
|
+
const o = /* @__PURE__ */ new Date(), t = e.locale || "default", a = h(e.modelValue ?? null), n = h(e.modelValue ? new Date(e.modelValue) : o), i = e.firstDayOfWeek ?? 0, s = H(() => {
|
|
5202
|
+
const k = new Intl.DateTimeFormat(t, { month: "long", year: "numeric" }).format(n.value);
|
|
5203
|
+
return k.charAt(0).toUpperCase() + k.slice(1);
|
|
5212
5204
|
}), r = H(() => {
|
|
5213
|
-
const
|
|
5205
|
+
const k = new Date(2021, 5, 6);
|
|
5206
|
+
return Array.from({ length: 7 }).map((y, c) => {
|
|
5207
|
+
const m = new Date(k);
|
|
5208
|
+
return m.setDate(k.getDate() + (c + i) % 7), new Intl.DateTimeFormat(t, { weekday: "short" }).format(m).replace(".", "");
|
|
5209
|
+
});
|
|
5210
|
+
}), l = H(() => {
|
|
5211
|
+
const k = n.value.getFullYear(), y = n.value.getMonth(), c = new Date(k, y, 1), m = new Date(k, y + 1, 0), $ = (c.getDay() - i + 7) % 7, L = m.getDate(), C = [];
|
|
5214
5212
|
for (let B = 0; B < $; B++) C.push(null);
|
|
5215
|
-
for (let B = 1; B <= L; B++) C.push(new Date(
|
|
5213
|
+
for (let B = 1; B <= L; B++) C.push(new Date(k, y, B));
|
|
5216
5214
|
return C;
|
|
5217
5215
|
});
|
|
5218
5216
|
return {
|
|
5219
5217
|
today: o,
|
|
5220
5218
|
selected: a,
|
|
5221
|
-
currentMonth:
|
|
5219
|
+
currentMonth: n,
|
|
5222
5220
|
monthLabel: s,
|
|
5223
|
-
weekDays:
|
|
5224
|
-
days:
|
|
5225
|
-
nextMonth: () =>
|
|
5226
|
-
prevMonth: () =>
|
|
5227
|
-
select: (
|
|
5221
|
+
weekDays: r,
|
|
5222
|
+
days: l,
|
|
5223
|
+
nextMonth: () => n.value = new Date(n.value.getFullYear(), n.value.getMonth() + 1, 1),
|
|
5224
|
+
prevMonth: () => n.value = new Date(n.value.getFullYear(), n.value.getMonth() - 1, 1),
|
|
5225
|
+
select: (k) => a.value = k
|
|
5228
5226
|
};
|
|
5229
5227
|
}, m1 = /(DD|MM|YYYY|HH|mm|ss)/g, Ee = (e, o) => {
|
|
5230
5228
|
const t = {
|
|
@@ -5237,13 +5235,13 @@ const sl = {
|
|
|
5237
5235
|
};
|
|
5238
5236
|
return o.replace(/DD|MM|YYYY|HH|mm|ss/g, (a) => t[a]);
|
|
5239
5237
|
}, l1 = (e, o) => {
|
|
5240
|
-
const t = o.replace("DD", "(?<day>\\d{2})").replace("MM", "(?<month>\\d{2})").replace("YYYY", "(?<year>\\d{4})").replace("HH", "(?<hour>\\d{2})").replace("mm", "(?<minute>\\d{2})").replace("ss", "(?<second>\\d{2})"), a = new RegExp(`^${t}$`),
|
|
5241
|
-
if (!
|
|
5242
|
-
const i = Number(
|
|
5243
|
-
return In(i, s,
|
|
5238
|
+
const t = o.replace("DD", "(?<day>\\d{2})").replace("MM", "(?<month>\\d{2})").replace("YYYY", "(?<year>\\d{4})").replace("HH", "(?<hour>\\d{2})").replace("mm", "(?<minute>\\d{2})").replace("ss", "(?<second>\\d{2})"), a = new RegExp(`^${t}$`), n = e.match(a);
|
|
5239
|
+
if (!n?.groups) return null;
|
|
5240
|
+
const i = Number(n.groups.day ?? 1), s = Number(n.groups.month ?? 1), r = Number(n.groups.year ?? 1970), l = Number(n.groups.hour ?? 0), d = Number(n.groups.minute ?? 0), u = Number(n.groups.second ?? 0);
|
|
5241
|
+
return In(i, s, r) ? new Date(r, s - 1, i, l, d, u, 0) : null;
|
|
5244
5242
|
};
|
|
5245
|
-
function In(e, o, t, a = 1900,
|
|
5246
|
-
if (!Number.isInteger(e) || !Number.isInteger(o) || !Number.isInteger(t) || o < 1 || o > 12 || t < a || t >
|
|
5243
|
+
function In(e, o, t, a = 1900, n = 2100) {
|
|
5244
|
+
if (!Number.isInteger(e) || !Number.isInteger(o) || !Number.isInteger(t) || o < 1 || o > 12 || t < a || t > n) return !1;
|
|
5247
5245
|
const i = new Date(t, o, 0).getDate();
|
|
5248
5246
|
if (e < 1 || e > i) return !1;
|
|
5249
5247
|
const s = new Date(t, o - 1, e);
|
|
@@ -5252,16 +5250,16 @@ function In(e, o, t, a = 1900, l = 2100) {
|
|
|
5252
5250
|
const Hn = (e, o) => {
|
|
5253
5251
|
const t = e.replace(/\D/g, ""), a = o.match(m1);
|
|
5254
5252
|
if (!a) return e;
|
|
5255
|
-
let
|
|
5253
|
+
let n = "", i = 0;
|
|
5256
5254
|
for (const s of a) {
|
|
5257
|
-
const
|
|
5258
|
-
if (!
|
|
5259
|
-
if (
|
|
5255
|
+
const r = s.length, l = t.slice(i, i + r);
|
|
5256
|
+
if (!l) break;
|
|
5257
|
+
if (n += l, i += l.length, i < t.length) {
|
|
5260
5258
|
const d = o.indexOf(s) + s.length, u = o[d];
|
|
5261
|
-
u && !u.match(/[DMYHms]/) && (
|
|
5259
|
+
u && !u.match(/[DMYHms]/) && (n += u);
|
|
5262
5260
|
}
|
|
5263
5261
|
}
|
|
5264
|
-
return
|
|
5262
|
+
return n;
|
|
5265
5263
|
}, Bn = (e) => {
|
|
5266
5264
|
const o = e.match(m1);
|
|
5267
5265
|
return o ? o.reduce((t, a) => t + a.length, 0) : 0;
|
|
@@ -5288,27 +5286,27 @@ const Hn = (e, o) => {
|
|
|
5288
5286
|
}),
|
|
5289
5287
|
emits: /* @__PURE__ */ ee(["update:open"], ["update:modelValue"]),
|
|
5290
5288
|
setup(e, { emit: o }) {
|
|
5291
|
-
const t = fe(e, "modelValue"), a = o,
|
|
5289
|
+
const t = fe(e, "modelValue"), a = o, n = e, i = h(!1), s = h(""), r = h(null), l = h(null), {
|
|
5292
5290
|
monthLabel: d,
|
|
5293
5291
|
weekDays: u,
|
|
5294
5292
|
currentMonth: p,
|
|
5295
|
-
days:
|
|
5296
|
-
nextMonth:
|
|
5293
|
+
days: k,
|
|
5294
|
+
nextMonth: y,
|
|
5297
5295
|
prevMonth: c,
|
|
5298
5296
|
select: m
|
|
5299
5297
|
} = Vn({
|
|
5300
5298
|
modelValue: t.value,
|
|
5301
|
-
locale:
|
|
5302
|
-
firstDayOfWeek:
|
|
5299
|
+
locale: n.locale,
|
|
5300
|
+
firstDayOfWeek: n.firstDayOfWeek
|
|
5303
5301
|
});
|
|
5304
5302
|
Y(
|
|
5305
5303
|
() => t.value,
|
|
5306
5304
|
(V) => {
|
|
5307
5305
|
if (!V) {
|
|
5308
|
-
s.value = "",
|
|
5306
|
+
s.value = "", l.value = null;
|
|
5309
5307
|
return;
|
|
5310
5308
|
}
|
|
5311
|
-
m(V), p.value = new Date(V),
|
|
5309
|
+
m(V), p.value = new Date(V), l.value = V, s.value = Ee(V, n.format);
|
|
5312
5310
|
},
|
|
5313
5311
|
{ immediate: !0 }
|
|
5314
5312
|
), Y(
|
|
@@ -5316,25 +5314,25 @@ const Hn = (e, o) => {
|
|
|
5316
5314
|
async (V) => {
|
|
5317
5315
|
if (V) {
|
|
5318
5316
|
await we();
|
|
5319
|
-
let _ =
|
|
5317
|
+
let _ = r.value?.querySelector('button[data-selected="true"]');
|
|
5320
5318
|
if (!_) {
|
|
5321
5319
|
const R = /* @__PURE__ */ new Date();
|
|
5322
|
-
_ = Array.from(
|
|
5320
|
+
_ = Array.from(r.value?.querySelectorAll("button") || []).find((w) => Number(w.textContent) === R.getDate() && !w.disabled);
|
|
5323
5321
|
}
|
|
5324
5322
|
_ && _.focus(), document.addEventListener("keydown", C);
|
|
5325
5323
|
} else document.removeEventListener("keydown", C);
|
|
5326
5324
|
}
|
|
5327
5325
|
);
|
|
5328
5326
|
const $ = (V) => {
|
|
5329
|
-
|
|
5330
|
-
}, L = (V) => !V || !
|
|
5327
|
+
l.value = V, t.value = V, s.value = Ee(V, n.format), m(V), i.value = !1;
|
|
5328
|
+
}, L = (V) => !V || !l.value ? "" : V.toDateString() === l.value.toDateString() ? "dp-selected" : "", C = (V) => V.key === "Escape" && (i.value = !1), B = (V) => {
|
|
5331
5329
|
V.key === "Backspace" || V.key === "Delete" || V.key === "ArrowLeft" || V.key === "ArrowRight" || V.key === "Tab" || /[0-9]/.test(V.key) || V.preventDefault();
|
|
5332
5330
|
}, O = (V) => {
|
|
5333
5331
|
const _ = V.target, R = _.selectionStart ?? 0, x = _.value.slice(0, R).replace(/\D/g, "").length;
|
|
5334
5332
|
let E = _.value.replace(/\D/g, "");
|
|
5335
|
-
const
|
|
5336
|
-
E = E.slice(0,
|
|
5337
|
-
const Q = Hn(E,
|
|
5333
|
+
const G = Bn(n.format);
|
|
5334
|
+
E = E.slice(0, G);
|
|
5335
|
+
const Q = Hn(E, n.format);
|
|
5338
5336
|
s.value = Q, _.value = Q;
|
|
5339
5337
|
let oe = 0, Z = 0;
|
|
5340
5338
|
for (let A = 0; A < Q.length; A++)
|
|
@@ -5343,19 +5341,19 @@ const Hn = (e, o) => {
|
|
|
5343
5341
|
break;
|
|
5344
5342
|
}
|
|
5345
5343
|
requestAnimationFrame(() => _.setSelectionRange(oe, oe));
|
|
5346
|
-
const
|
|
5347
|
-
|
|
5348
|
-
},
|
|
5344
|
+
const g = l1(Q, n.format);
|
|
5345
|
+
g && (l.value = g, t.value = g);
|
|
5346
|
+
}, b = () => {
|
|
5349
5347
|
i.value || (i.value = !0, a("update:open", !0));
|
|
5350
5348
|
}, I = (V) => {
|
|
5351
|
-
|
|
5349
|
+
r.value && (r.value.contains(V.target) || (i.value = !1, a("update:open", !1)));
|
|
5352
5350
|
}, D = () => {
|
|
5353
|
-
const V = l1(s.value,
|
|
5354
|
-
!V && !
|
|
5351
|
+
const V = l1(s.value, n.format);
|
|
5352
|
+
!V && !l.value ? (s.value = "", t.value = null, l.value = null) : V && (l.value = V, t.value = V, s.value = Ee(V, n.format));
|
|
5355
5353
|
};
|
|
5356
5354
|
return ae(() => document.addEventListener("mousedown", I)), Ie(() => document.removeEventListener("mousedown", I)), (V, _) => (v(), f("div", {
|
|
5357
5355
|
ref_key: "root",
|
|
5358
|
-
ref:
|
|
5356
|
+
ref: r,
|
|
5359
5357
|
class: re(["dp", { required: Object.keys(V.$attrs).includes("required") }])
|
|
5360
5358
|
}, [
|
|
5361
5359
|
M("label", {
|
|
@@ -5369,9 +5367,9 @@ const Hn = (e, o) => {
|
|
|
5369
5367
|
onBlur: D,
|
|
5370
5368
|
onInput: O,
|
|
5371
5369
|
onKeydown: B,
|
|
5372
|
-
onMousedown:
|
|
5370
|
+
onMousedown: b,
|
|
5373
5371
|
required: Object.keys(V.$attrs).includes("required") || void 0,
|
|
5374
|
-
"aria-invalid": !
|
|
5372
|
+
"aria-invalid": !l.value && s.value !== "",
|
|
5375
5373
|
disabled: e.disabled ? !0 : void 0,
|
|
5376
5374
|
"data-disabled": e.disabled ? !0 : void 0,
|
|
5377
5375
|
"aria-describedby": "time-help",
|
|
@@ -5382,7 +5380,7 @@ const Hn = (e, o) => {
|
|
|
5382
5380
|
P(he, {
|
|
5383
5381
|
type: "button",
|
|
5384
5382
|
class: "btn-icon",
|
|
5385
|
-
onClick:
|
|
5383
|
+
onClick: b,
|
|
5386
5384
|
disabled: e.disabled || void 0
|
|
5387
5385
|
}, {
|
|
5388
5386
|
default: W(() => [
|
|
@@ -5405,7 +5403,7 @@ const Hn = (e, o) => {
|
|
|
5405
5403
|
M("span", Sn, N(S(d)), 1),
|
|
5406
5404
|
M("button", {
|
|
5407
5405
|
onClick: _[1] || (_[1] = //@ts-ignore
|
|
5408
|
-
(...R) => S(
|
|
5406
|
+
(...R) => S(y) && S(y)(...R)),
|
|
5409
5407
|
class: "btn__next_month",
|
|
5410
5408
|
"aria-label": "Next month"
|
|
5411
5409
|
}, "›")
|
|
@@ -5417,8 +5415,8 @@ const Hn = (e, o) => {
|
|
|
5417
5415
|
}, N(R), 1))), 128))
|
|
5418
5416
|
]),
|
|
5419
5417
|
M("div", Zn, [
|
|
5420
|
-
(v(!0), f(te, null, ue(S(
|
|
5421
|
-
key:
|
|
5418
|
+
(v(!0), f(te, null, ue(S(k), (R, w) => (v(), f("button", {
|
|
5419
|
+
key: w,
|
|
5422
5420
|
type: "button",
|
|
5423
5421
|
role: "gridcell",
|
|
5424
5422
|
class: re(["btn__day", L(R)]),
|
|
@@ -5426,7 +5424,7 @@ const Hn = (e, o) => {
|
|
|
5426
5424
|
"aria-pressed": L(R) === "dp-selected",
|
|
5427
5425
|
"data-selected": R && L(R) === "dp-selected",
|
|
5428
5426
|
onMousedown: le((x) => R && $(R), ["prevent"]),
|
|
5429
|
-
"aria-label": R ? R.toLocaleDateString(
|
|
5427
|
+
"aria-label": R ? R.toLocaleDateString(n.locale, { weekday: "long", year: "numeric", month: "long", day: "numeric" }) : ""
|
|
5430
5428
|
}, N(R?.getDate()), 43, En))), 128))
|
|
5431
5429
|
]),
|
|
5432
5430
|
P(he, {
|
|
@@ -5466,27 +5464,27 @@ const Hn = (e, o) => {
|
|
|
5466
5464
|
}),
|
|
5467
5465
|
emits: ["update:modelValue"],
|
|
5468
5466
|
setup(e) {
|
|
5469
|
-
const o = fe(e, "modelValue"), t = e, a = de(),
|
|
5467
|
+
const o = fe(e, "modelValue"), t = e, a = de(), n = h(!1), i = h(null), s = H(() => t.format.includes("HH")), r = H(() => t.format.includes("mm")), l = H(() => t.format.includes("ss")), d = h(o.value ?? null), u = h(o.value?.getHours() ?? (s.value ? 0 : void 0)), p = h(o.value?.getMinutes() ?? (r.value ? 0 : void 0)), k = h(o.value?.getSeconds() ?? (l.value ? 0 : void 0));
|
|
5470
5468
|
Y(o, (L) => {
|
|
5471
5469
|
if (L) {
|
|
5472
5470
|
const C = new Date(L);
|
|
5473
|
-
d.value = C, u.value = C.getHours(), p.value = C.getMinutes(),
|
|
5471
|
+
d.value = C, u.value = C.getHours(), p.value = C.getMinutes(), k.value = C.getSeconds();
|
|
5474
5472
|
} else
|
|
5475
|
-
d.value = null, u.value = 0, p.value = 0,
|
|
5473
|
+
d.value = null, u.value = 0, p.value = 0, k.value = 0;
|
|
5476
5474
|
}, { immediate: !0 }), Y(d, (L) => {
|
|
5477
5475
|
if (!L) return;
|
|
5478
5476
|
const C = L.getHours(), B = L.getMinutes(), O = L.getSeconds();
|
|
5479
|
-
C !== u.value && (u.value = C), B !== p.value && (p.value = B), O !==
|
|
5480
|
-
}, { immediate: !0 }), Y([d, u, p,
|
|
5477
|
+
C !== u.value && (u.value = C), B !== p.value && (p.value = B), O !== k.value && (k.value = O);
|
|
5478
|
+
}, { immediate: !0 }), Y([d, u, p, k], () => {
|
|
5481
5479
|
if (!d.value) {
|
|
5482
5480
|
o.value = null;
|
|
5483
5481
|
return;
|
|
5484
5482
|
}
|
|
5485
|
-
const L = Math.min(Math.max(u.value ?? 0, 0), 23), C = Math.min(Math.max(p.value ?? 0, 0), 59), B = Math.min(Math.max(
|
|
5483
|
+
const L = Math.min(Math.max(u.value ?? 0, 0), 23), C = Math.min(Math.max(p.value ?? 0, 0), 59), B = Math.min(Math.max(k.value ?? 0, 0), 59), O = new Date(d.value);
|
|
5486
5484
|
O.setHours(L, C, B, 0), (!o.value || o.value.getTime() !== O.getTime()) && (o.value = O);
|
|
5487
5485
|
});
|
|
5488
|
-
const
|
|
5489
|
-
i.value && (i.value.contains(L.target) || (
|
|
5486
|
+
const y = (L) => {
|
|
5487
|
+
i.value && (i.value.contains(L.target) || (n.value = !1));
|
|
5490
5488
|
}, c = (L) => {
|
|
5491
5489
|
const C = Number(L.target.value);
|
|
5492
5490
|
isNaN(C) || C < 0 ? u.value = 0 : C > 23 ? u.value = 23 : u.value = C;
|
|
@@ -5495,12 +5493,12 @@ const Hn = (e, o) => {
|
|
|
5495
5493
|
isNaN(C) || C < 0 ? p.value = 0 : C > 59 ? p.value = 59 : p.value = C;
|
|
5496
5494
|
}, $ = (L) => {
|
|
5497
5495
|
const C = Number(L.target.value);
|
|
5498
|
-
isNaN(C) || C < 0 ?
|
|
5496
|
+
isNaN(C) || C < 0 ? k.value = 0 : C > 59 ? k.value = 59 : k.value = C;
|
|
5499
5497
|
};
|
|
5500
5498
|
return ae(() => {
|
|
5501
|
-
document.addEventListener("mousedown",
|
|
5499
|
+
document.addEventListener("mousedown", y);
|
|
5502
5500
|
}), Ie(() => {
|
|
5503
|
-
document.removeEventListener("mousedown",
|
|
5501
|
+
document.removeEventListener("mousedown", y);
|
|
5504
5502
|
}), (L, C) => (v(), f("div", {
|
|
5505
5503
|
class: "dtp",
|
|
5506
5504
|
ref_key: "root",
|
|
@@ -5509,8 +5507,8 @@ const Hn = (e, o) => {
|
|
|
5509
5507
|
P(On, {
|
|
5510
5508
|
modelValue: d.value,
|
|
5511
5509
|
"onUpdate:modelValue": C[3] || (C[3] = (B) => d.value = B),
|
|
5512
|
-
open:
|
|
5513
|
-
"onUpdate:open": C[4] || (C[4] = (B) =>
|
|
5510
|
+
open: n.value,
|
|
5511
|
+
"onUpdate:open": C[4] || (C[4] = (B) => n.value = B),
|
|
5514
5512
|
locale: e.locale,
|
|
5515
5513
|
format: e.format,
|
|
5516
5514
|
label: e.label,
|
|
@@ -5518,7 +5516,7 @@ const Hn = (e, o) => {
|
|
|
5518
5516
|
placeholder: e.placeholder
|
|
5519
5517
|
}, {
|
|
5520
5518
|
time: W(() => [
|
|
5521
|
-
|
|
5519
|
+
n.value ? (v(), f("div", qn, [
|
|
5522
5520
|
s.value ? Me((v(), f("input", {
|
|
5523
5521
|
key: 0,
|
|
5524
5522
|
id: `hour_${S(a)}`,
|
|
@@ -5539,8 +5537,8 @@ const Hn = (e, o) => {
|
|
|
5539
5537
|
{ number: !0 }
|
|
5540
5538
|
]
|
|
5541
5539
|
]) : q("", !0),
|
|
5542
|
-
s.value &&
|
|
5543
|
-
|
|
5540
|
+
s.value && r.value ? (v(), f("span", Fn, ":")) : q("", !0),
|
|
5541
|
+
r.value ? Me((v(), f("input", {
|
|
5544
5542
|
key: 2,
|
|
5545
5543
|
id: `minute_${S(a)}`,
|
|
5546
5544
|
type: "number",
|
|
@@ -5560,23 +5558,23 @@ const Hn = (e, o) => {
|
|
|
5560
5558
|
{ number: !0 }
|
|
5561
5559
|
]
|
|
5562
5560
|
]) : q("", !0),
|
|
5563
|
-
(s.value ||
|
|
5564
|
-
|
|
5561
|
+
(s.value || r.value) && l.value ? (v(), f("span", Kn, ":")) : q("", !0),
|
|
5562
|
+
l.value ? Me((v(), f("input", {
|
|
5565
5563
|
key: 4,
|
|
5566
5564
|
id: `second_${S(a)}`,
|
|
5567
5565
|
type: "number",
|
|
5568
|
-
"onUpdate:modelValue": C[2] || (C[2] = (B) =>
|
|
5566
|
+
"onUpdate:modelValue": C[2] || (C[2] = (B) => k.value = B),
|
|
5569
5567
|
min: "0",
|
|
5570
5568
|
max: "59",
|
|
5571
5569
|
"aria-label": "Second",
|
|
5572
5570
|
"aria-valuemin": "0",
|
|
5573
5571
|
"aria-valuemax": "59",
|
|
5574
|
-
"aria-valuenow":
|
|
5572
|
+
"aria-valuenow": k.value,
|
|
5575
5573
|
onInput: $
|
|
5576
5574
|
}, null, 40, Un)), [
|
|
5577
5575
|
[
|
|
5578
5576
|
Ae,
|
|
5579
|
-
|
|
5577
|
+
k.value,
|
|
5580
5578
|
void 0,
|
|
5581
5579
|
{ number: !0 }
|
|
5582
5580
|
]
|
|
@@ -5614,11 +5612,11 @@ const Hn = (e, o) => {
|
|
|
5614
5612
|
},
|
|
5615
5613
|
emits: ["update:sort", "rowClick"],
|
|
5616
5614
|
setup(e, { emit: o, slots: t }) {
|
|
5617
|
-
const a = (
|
|
5618
|
-
if (!
|
|
5619
|
-
const d = e.sort?.key ===
|
|
5620
|
-
o("update:sort", { key:
|
|
5621
|
-
},
|
|
5615
|
+
const a = (l) => {
|
|
5616
|
+
if (!l.sortable) return;
|
|
5617
|
+
const d = e.sort?.key === l.key && e.sort.direction === "asc" ? "desc" : "asc";
|
|
5618
|
+
o("update:sort", { key: l.key, direction: d });
|
|
5619
|
+
}, n = () => window.matchMedia("(max-width: 640px)").matches, i = (l, d) => d.split(".").reduce((u, p) => u?.[p], l), s = () => F(
|
|
5622
5620
|
"div",
|
|
5623
5621
|
{
|
|
5624
5622
|
class: "rs-table-mobile",
|
|
@@ -5626,16 +5624,16 @@ const Hn = (e, o) => {
|
|
|
5626
5624
|
"aria-busy": e.loading || void 0
|
|
5627
5625
|
},
|
|
5628
5626
|
e.loading ? t.loading?.() ?? "Loading..." : e.data.length === 0 ? t.empty?.() ?? "No data available." : e.data.map(
|
|
5629
|
-
(
|
|
5627
|
+
(l, d) => F(
|
|
5630
5628
|
"div",
|
|
5631
5629
|
{
|
|
5632
|
-
key:
|
|
5630
|
+
key: l.id ?? d,
|
|
5633
5631
|
class: "rs-table-card",
|
|
5634
5632
|
role: e.rowClickable ? "button" : "listitem",
|
|
5635
5633
|
tabindex: e.rowClickable ? 0 : void 0,
|
|
5636
|
-
onClick: e.rowClickable ? () => o("rowClick",
|
|
5634
|
+
onClick: e.rowClickable ? () => o("rowClick", l) : void 0,
|
|
5637
5635
|
onKeydown: e.rowClickable ? (u) => {
|
|
5638
|
-
(u.key === "Enter" || u.key === " ") && (u.preventDefault(), o("rowClick",
|
|
5636
|
+
(u.key === "Enter" || u.key === " ") && (u.preventDefault(), o("rowClick", l));
|
|
5639
5637
|
} : void 0
|
|
5640
5638
|
},
|
|
5641
5639
|
e.columns.map(
|
|
@@ -5652,17 +5650,17 @@ const Hn = (e, o) => {
|
|
|
5652
5650
|
"span",
|
|
5653
5651
|
{ class: "rs-table-card-value" },
|
|
5654
5652
|
t.cell?.({
|
|
5655
|
-
row:
|
|
5653
|
+
row: l,
|
|
5656
5654
|
column: u,
|
|
5657
|
-
value: i(
|
|
5658
|
-
}) ?? i(
|
|
5655
|
+
value: i(l, u.key)
|
|
5656
|
+
}) ?? i(l, u.key)
|
|
5659
5657
|
)
|
|
5660
5658
|
]
|
|
5661
5659
|
)
|
|
5662
5660
|
)
|
|
5663
5661
|
)
|
|
5664
5662
|
)
|
|
5665
|
-
),
|
|
5663
|
+
), r = () => F(
|
|
5666
5664
|
"div",
|
|
5667
5665
|
{ class: "rs-table-container" },
|
|
5668
5666
|
F(
|
|
@@ -5682,19 +5680,19 @@ const Hn = (e, o) => {
|
|
|
5682
5680
|
"tr",
|
|
5683
5681
|
null,
|
|
5684
5682
|
e.columns.map(
|
|
5685
|
-
(
|
|
5683
|
+
(l) => F(
|
|
5686
5684
|
"th",
|
|
5687
5685
|
{
|
|
5688
|
-
key:
|
|
5686
|
+
key: l.key,
|
|
5689
5687
|
style: {
|
|
5690
|
-
width:
|
|
5691
|
-
textAlign:
|
|
5688
|
+
width: l.width || "auto",
|
|
5689
|
+
textAlign: l.align || "left"
|
|
5692
5690
|
},
|
|
5693
|
-
"aria-sort":
|
|
5694
|
-
tabindex:
|
|
5695
|
-
onClick:
|
|
5696
|
-
onKeydown:
|
|
5697
|
-
(d.key === "Enter" || d.key === " ") && (d.preventDefault(), a(
|
|
5691
|
+
"aria-sort": l.sortable ? e.sort?.key === l.key ? e.sort.direction === "asc" ? "ascending" : "descending" : "none" : void 0,
|
|
5692
|
+
tabindex: l.sortable ? 0 : void 0,
|
|
5693
|
+
onClick: l.sortable ? () => a(l) : void 0,
|
|
5694
|
+
onKeydown: l.sortable ? (d) => {
|
|
5695
|
+
(d.key === "Enter" || d.key === " ") && (d.preventDefault(), a(l));
|
|
5698
5696
|
} : void 0,
|
|
5699
5697
|
scope: "col"
|
|
5700
5698
|
},
|
|
@@ -5704,12 +5702,12 @@ const Hn = (e, o) => {
|
|
|
5704
5702
|
[
|
|
5705
5703
|
F(
|
|
5706
5704
|
"span",
|
|
5707
|
-
|
|
5705
|
+
l.header
|
|
5708
5706
|
),
|
|
5709
|
-
|
|
5707
|
+
l.sortable ? F(
|
|
5710
5708
|
ce,
|
|
5711
5709
|
{
|
|
5712
|
-
name: e.sort?.key ===
|
|
5710
|
+
name: e.sort?.key === l.key ? e.sort.direction === "asc" ? "sortAsc" : "sortDesc" : "sort",
|
|
5713
5711
|
size: 16
|
|
5714
5712
|
}
|
|
5715
5713
|
) : null
|
|
@@ -5747,15 +5745,15 @@ const Hn = (e, o) => {
|
|
|
5747
5745
|
]
|
|
5748
5746
|
)
|
|
5749
5747
|
] : e.data.map(
|
|
5750
|
-
(
|
|
5748
|
+
(l, d) => F(
|
|
5751
5749
|
"tr",
|
|
5752
5750
|
{
|
|
5753
|
-
key:
|
|
5751
|
+
key: l.id ?? d,
|
|
5754
5752
|
tabindex: e.rowClickable ? 0 : void 0,
|
|
5755
5753
|
role: e.rowClickable ? "button" : void 0,
|
|
5756
|
-
onClick: e.rowClickable ? () => o("rowClick",
|
|
5754
|
+
onClick: e.rowClickable ? () => o("rowClick", l) : void 0,
|
|
5757
5755
|
onKeydown: e.rowClickable ? (u) => {
|
|
5758
|
-
(u.key === "Enter" || u.key === " ") && (u.preventDefault(), o("rowClick",
|
|
5756
|
+
(u.key === "Enter" || u.key === " ") && (u.preventDefault(), o("rowClick", l));
|
|
5759
5757
|
} : void 0,
|
|
5760
5758
|
"data-clickable": e.rowClickable || void 0
|
|
5761
5759
|
},
|
|
@@ -5769,10 +5767,10 @@ const Hn = (e, o) => {
|
|
|
5769
5767
|
}
|
|
5770
5768
|
},
|
|
5771
5769
|
t.cell?.({
|
|
5772
|
-
row:
|
|
5770
|
+
row: l,
|
|
5773
5771
|
column: u,
|
|
5774
|
-
value: i(
|
|
5775
|
-
}) ?? i(
|
|
5772
|
+
value: i(l, u.key)
|
|
5773
|
+
}) ?? i(l, u.key)
|
|
5776
5774
|
)
|
|
5777
5775
|
)
|
|
5778
5776
|
)
|
|
@@ -5783,11 +5781,11 @@ const Hn = (e, o) => {
|
|
|
5783
5781
|
)
|
|
5784
5782
|
);
|
|
5785
5783
|
return () => {
|
|
5786
|
-
const
|
|
5784
|
+
const l = e.responsive === "card" || e.responsive === "auto" && n();
|
|
5787
5785
|
return F(
|
|
5788
5786
|
"div",
|
|
5789
5787
|
{ class: "rs-table-container" },
|
|
5790
|
-
|
|
5788
|
+
l ? s() : r()
|
|
5791
5789
|
);
|
|
5792
5790
|
};
|
|
5793
5791
|
}
|
|
@@ -5801,32 +5799,32 @@ const Hn = (e, o) => {
|
|
|
5801
5799
|
}
|
|
5802
5800
|
},
|
|
5803
5801
|
setup(e, { slots: o }) {
|
|
5804
|
-
const t = h([]), a = h(new Set(e.defaultOpen)),
|
|
5802
|
+
const t = h([]), a = h(new Set(e.defaultOpen)), n = (p) => {
|
|
5805
5803
|
if (a.value.has(p)) {
|
|
5806
5804
|
a.value.delete(p);
|
|
5807
5805
|
return;
|
|
5808
5806
|
}
|
|
5809
5807
|
e.multiple || a.value.clear(), a.value.add(p);
|
|
5810
5808
|
}, i = (p) => {
|
|
5811
|
-
p.disabled || t.value.includes(p) || (t.value.push(p), t.value.sort((
|
|
5812
|
-
}, s = (p) => t.value = t.value.filter((
|
|
5813
|
-
const
|
|
5814
|
-
t.value[(
|
|
5815
|
-
},
|
|
5816
|
-
const
|
|
5817
|
-
t.value[(
|
|
5809
|
+
p.disabled || t.value.includes(p) || (t.value.push(p), t.value.sort((k, y) => k.offsetTop - y.offsetTop));
|
|
5810
|
+
}, s = (p) => t.value = t.value.filter((k) => k !== p), r = (p) => {
|
|
5811
|
+
const k = t.value.indexOf(p);
|
|
5812
|
+
t.value[(k + 1) % t.value.length]?.focus();
|
|
5813
|
+
}, l = (p) => {
|
|
5814
|
+
const k = t.value.indexOf(p);
|
|
5815
|
+
t.value[(k - 1 + t.value.length) % t.value.length]?.focus();
|
|
5818
5816
|
}, d = () => t.value[0]?.focus(), u = () => {
|
|
5819
5817
|
const p = t.value;
|
|
5820
5818
|
p.length && p[p.length - 1]?.focus();
|
|
5821
5819
|
};
|
|
5822
|
-
return
|
|
5820
|
+
return ge(Re, {
|
|
5823
5821
|
multiple: e.multiple,
|
|
5824
5822
|
openItems: a,
|
|
5825
|
-
toggle:
|
|
5823
|
+
toggle: n,
|
|
5826
5824
|
registerHeader: i,
|
|
5827
5825
|
unregisterHeader: s,
|
|
5828
|
-
focusNext:
|
|
5829
|
-
focusPrev:
|
|
5826
|
+
focusNext: r,
|
|
5827
|
+
focusPrev: l,
|
|
5830
5828
|
focusFirst: d,
|
|
5831
5829
|
focusLast: u
|
|
5832
5830
|
}), () => o.default?.();
|
|
@@ -5859,22 +5857,22 @@ const Hn = (e, o) => {
|
|
|
5859
5857
|
setup(e, { slots: o }) {
|
|
5860
5858
|
const t = se(Re), a = h(null);
|
|
5861
5859
|
if (!t) throw new Error("AccordionHeader must be used inside Accordion");
|
|
5862
|
-
const
|
|
5860
|
+
const n = H(() => t.openItems.value.has(e.id)), i = () => {
|
|
5863
5861
|
e.disabled || t.toggle?.(e.id);
|
|
5864
|
-
}, s = (
|
|
5862
|
+
}, s = (r) => {
|
|
5865
5863
|
if (a.value)
|
|
5866
|
-
switch (
|
|
5864
|
+
switch (r.key) {
|
|
5867
5865
|
case "ArrowDown":
|
|
5868
|
-
|
|
5866
|
+
r.preventDefault(), t.focusNext(a.value);
|
|
5869
5867
|
break;
|
|
5870
5868
|
case "ArrowUp":
|
|
5871
|
-
|
|
5869
|
+
r.preventDefault(), t.focusPrev(a.value);
|
|
5872
5870
|
break;
|
|
5873
5871
|
case "Home":
|
|
5874
|
-
|
|
5872
|
+
r.preventDefault(), t.focusFirst();
|
|
5875
5873
|
break;
|
|
5876
5874
|
case "End":
|
|
5877
|
-
|
|
5875
|
+
r.preventDefault(), t.focusLast();
|
|
5878
5876
|
break;
|
|
5879
5877
|
}
|
|
5880
5878
|
};
|
|
@@ -5889,10 +5887,10 @@ const Hn = (e, o) => {
|
|
|
5889
5887
|
id: `header-${e.id}`,
|
|
5890
5888
|
type: "button",
|
|
5891
5889
|
class: "rs-accordion-trigger",
|
|
5892
|
-
"aria-expanded":
|
|
5890
|
+
"aria-expanded": n.value,
|
|
5893
5891
|
"aria-controls": `panel-${e.id}`,
|
|
5894
5892
|
disabled: e.disabled,
|
|
5895
|
-
"data-state":
|
|
5893
|
+
"data-state": n.value ? "open" : "closed",
|
|
5896
5894
|
onClick: i,
|
|
5897
5895
|
onKeydown: s
|
|
5898
5896
|
},
|
|
@@ -5959,13 +5957,13 @@ export {
|
|
|
5959
5957
|
xl as DropdownItem,
|
|
5960
5958
|
Ll as DropdownMenu,
|
|
5961
5959
|
Ml as DropdownTrigger,
|
|
5962
|
-
|
|
5960
|
+
Xe as Editor,
|
|
5963
5961
|
Pa as Highlight,
|
|
5964
5962
|
ce as Icon,
|
|
5965
5963
|
xe as Image,
|
|
5966
5964
|
t1 as ImageGallery,
|
|
5967
|
-
|
|
5968
|
-
|
|
5965
|
+
Xn as Input,
|
|
5966
|
+
Gn as Link,
|
|
5969
5967
|
Oe as Modal,
|
|
5970
5968
|
f1 as ModalBody,
|
|
5971
5969
|
p1 as ModalClose,
|
|
@@ -5982,8 +5980,8 @@ export {
|
|
|
5982
5980
|
Vl as Table,
|
|
5983
5981
|
yl as Tabs,
|
|
5984
5982
|
kl as TabsContent,
|
|
5985
|
-
|
|
5986
|
-
|
|
5983
|
+
gl as TabsList,
|
|
5984
|
+
bl as TabsTrigger,
|
|
5987
5985
|
U2 as Tag,
|
|
5988
5986
|
al as Textarea,
|
|
5989
5987
|
pl as Timeline,
|