@reinosoft-ui/core 0.1.41 → 0.1.43
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 +996 -990
- 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
|
|
1
|
+
import { defineComponent as T, ref as h, computed as I, watch as Y, onMounted as ae, createElementBlock as f, openBlock as v, normalizeStyle as ge, 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 ye, createVNode as P, createTextVNode as me, onBeforeUnmount as He, Teleport as Ie, resolveDynamicComponent as Ve, useAttrs as Ne, inject as se, h as F, useSlots as Fe, resolveComponent as h1, vModelRadio as g1, vModelDynamic as y1, 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 = I(() => 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:
|
|
42
|
+
style: ge(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,20 +74,20 @@ 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) => {
|
|
82
82
|
e.component("Image", xe);
|
|
83
83
|
};
|
|
84
|
-
const
|
|
84
|
+
const H1 = /* @__PURE__ */ T({
|
|
85
85
|
__name: "Button",
|
|
86
86
|
setup(e, { expose: o }) {
|
|
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",
|
|
@@ -96,11 +96,11 @@ const I1 = /* @__PURE__ */ T({
|
|
|
96
96
|
U(a.$slots, "default", {}, void 0, !0)
|
|
97
97
|
], 16));
|
|
98
98
|
}
|
|
99
|
-
}), he = /* @__PURE__ */ K(
|
|
99
|
+
}), he = /* @__PURE__ */ K(H1, [["__scopeId", "data-v-b46162b4"]]);
|
|
100
100
|
he.install = (e) => {
|
|
101
101
|
e.component("Button", he);
|
|
102
102
|
};
|
|
103
|
-
const
|
|
103
|
+
const I1 = ["id", "aria-checked", "aria-disabled", "disabled", "onKeydown"], B1 = /* @__PURE__ */ T({
|
|
104
104
|
__name: "Toggle",
|
|
105
105
|
props: /* @__PURE__ */ ee({
|
|
106
106
|
id: {},
|
|
@@ -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 = I(() => 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,11 +129,11 @@ 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)
|
|
136
|
-
])], 42,
|
|
136
|
+
])], 42, I1));
|
|
137
137
|
}
|
|
138
138
|
}), Ye = /* @__PURE__ */ K(B1, [["__scopeId", "data-v-d2681823"]]);
|
|
139
139
|
Ye.install = (e) => {
|
|
@@ -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 b = p.cloneContents();
|
|
179
|
+
n.innerHTML = "", n.appendChild(u), n.innerHTML === "" && (n.innerHTML = "<br>"), s.innerHTML = "", s.appendChild(b), s.innerHTML === "" && (s.innerHTML = "<br>"), n.after(s);
|
|
180
|
+
const g = document.createRange();
|
|
181
|
+
g.setStart(s, 0), g.collapse(!0), t.removeAllRanges(), t.addRange(g), 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,171 +200,171 @@ 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 (!
|
|
207
|
-
const
|
|
208
|
-
if (!
|
|
209
|
-
const D =
|
|
210
|
-
|
|
211
|
-
}, s = (
|
|
212
|
-
const
|
|
213
|
-
if (!
|
|
214
|
-
const D =
|
|
205
|
+
const k = e;
|
|
206
|
+
if (!k) return;
|
|
207
|
+
const H = window.getSelection();
|
|
208
|
+
if (!H || H.rangeCount === 0) return;
|
|
209
|
+
const D = H.getRangeAt(0);
|
|
210
|
+
k.contains(D.commonAncestorContainer) && (t.value = D.cloneRange());
|
|
211
|
+
}, s = (k) => {
|
|
212
|
+
const H = window.getSelection();
|
|
213
|
+
if (!H || H.rangeCount === 0 || H.isCollapsed) return !1;
|
|
214
|
+
const D = H.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, k, 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(k);
|
|
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), H.removeAllRanges(), H.addRange(w), i();
|
|
234
234
|
}
|
|
235
|
-
return
|
|
236
|
-
},
|
|
237
|
-
if (!
|
|
238
|
-
const D =
|
|
235
|
+
return g(), c(k);
|
|
236
|
+
}, r = (k, H) => {
|
|
237
|
+
if (!k || !H || !(H instanceof HTMLElement)) return [];
|
|
238
|
+
const D = k.commonAncestorContainer, V = H.contains(D) ? H : D.nodeType === 3 ? D.parentNode : D, _ = document.createTreeWalker(
|
|
239
239
|
V,
|
|
240
240
|
NodeFilter.SHOW_TEXT,
|
|
241
241
|
{
|
|
242
242
|
acceptNode(x) {
|
|
243
|
-
return
|
|
243
|
+
return H.contains(x) && k.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
|
-
},
|
|
251
|
-
const
|
|
252
|
-
if (!
|
|
253
|
-
const D =
|
|
250
|
+
}, l = (k) => {
|
|
251
|
+
const H = window.getSelection();
|
|
252
|
+
if (!H || H.rangeCount === 0) return !1;
|
|
253
|
+
const D = H.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() === k.toLowerCase() ? "p" : k.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 = (
|
|
261
|
-
const
|
|
262
|
-
if (!
|
|
263
|
-
for (;
|
|
264
|
-
if (
|
|
265
|
-
|
|
259
|
+
return x.selectNodeContents(w), H.removeAllRanges(), H.addRange(x), i(), g(), C(k);
|
|
260
|
+
}, d = (k) => {
|
|
261
|
+
const H = e;
|
|
262
|
+
if (!H) return null;
|
|
263
|
+
for (; k && k !== H; ) {
|
|
264
|
+
if (k instanceof HTMLElement && k.dataset.block !== void 0) return k;
|
|
265
|
+
k = k.parentNode;
|
|
266
266
|
}
|
|
267
267
|
return null;
|
|
268
|
-
}, u = (
|
|
268
|
+
}, u = (k, H) => {
|
|
269
269
|
const D = e;
|
|
270
270
|
if (!D) return null;
|
|
271
|
-
for (;
|
|
272
|
-
if (
|
|
273
|
-
|
|
271
|
+
for (; k && k !== D; ) {
|
|
272
|
+
if (k instanceof HTMLElement && k.tagName.toLowerCase() === H.toLowerCase()) return k;
|
|
273
|
+
k = k.parentNode;
|
|
274
274
|
}
|
|
275
275
|
return null;
|
|
276
|
-
}, p = (
|
|
277
|
-
if (
|
|
278
|
-
const
|
|
279
|
-
if (!
|
|
280
|
-
const D =
|
|
276
|
+
}, p = (k) => {
|
|
277
|
+
if (k.key !== "Enter" || k.shiftKey) return;
|
|
278
|
+
const H = window.getSelection();
|
|
279
|
+
if (!H || H.rangeCount === 0) return;
|
|
280
|
+
const D = H.getRangeAt(0), V = u(D.startContainer, "li");
|
|
281
281
|
if (!V) return;
|
|
282
|
-
|
|
282
|
+
k.preventDefault(), k.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(), b(x);
|
|
288
288
|
return;
|
|
289
289
|
}
|
|
290
|
-
const
|
|
291
|
-
|
|
292
|
-
},
|
|
293
|
-
const
|
|
294
|
-
|
|
295
|
-
},
|
|
290
|
+
const w = document.createElement("li");
|
|
291
|
+
w.innerHTML = "<br>", V.after(w), b(w);
|
|
292
|
+
}, b = (k) => {
|
|
293
|
+
const H = document.createRange(), D = window.getSelection();
|
|
294
|
+
H.selectNodeContents(k), H.collapse(!0), D?.removeAllRanges(), D?.addRange(H);
|
|
295
|
+
}, g = () => {
|
|
296
296
|
e instanceof Node && e.normalize();
|
|
297
|
-
}, c = (
|
|
298
|
-
const
|
|
299
|
-
if (!
|
|
300
|
-
let D =
|
|
297
|
+
}, c = (k) => {
|
|
298
|
+
const H = t.value;
|
|
299
|
+
if (!H) return !1;
|
|
300
|
+
let D = H.startContainer;
|
|
301
301
|
D.nodeType === Node.TEXT_NODE && (D = D.parentNode);
|
|
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() === k.toLowerCase()) return !0;
|
|
306
306
|
D = D.parentNode;
|
|
307
307
|
}
|
|
308
308
|
return !1;
|
|
309
|
-
},
|
|
310
|
-
const
|
|
311
|
-
if (!
|
|
312
|
-
let D =
|
|
309
|
+
}, C = (k) => {
|
|
310
|
+
const H = t.value;
|
|
311
|
+
if (!H) return !1;
|
|
312
|
+
let D = H.startContainer;
|
|
313
313
|
D.nodeType === Node.TEXT_NODE && (D = D.parentNode);
|
|
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() === k.toLowerCase()) return !0;
|
|
318
318
|
D = D.parentNode;
|
|
319
319
|
}
|
|
320
320
|
return !1;
|
|
321
321
|
}, $ = () => {
|
|
322
|
-
const
|
|
323
|
-
|
|
322
|
+
const k = e;
|
|
323
|
+
k && k.focus();
|
|
324
324
|
}, L = () => {
|
|
325
|
-
const
|
|
326
|
-
if (!
|
|
327
|
-
const
|
|
328
|
-
|
|
329
|
-
},
|
|
330
|
-
const
|
|
331
|
-
if (!
|
|
332
|
-
const D =
|
|
325
|
+
const k = e;
|
|
326
|
+
if (!k || !t.value || !k || !k.contains(t.value.commonAncestorContainer)) return;
|
|
327
|
+
const H = window.getSelection();
|
|
328
|
+
H && (H.removeAllRanges(), H.addRange(t.value));
|
|
329
|
+
}, m = () => n.value?.focusFirstButton?.(), B = (k) => {
|
|
330
|
+
const H = window.getSelection();
|
|
331
|
+
if (!H || H.rangeCount === 0) return;
|
|
332
|
+
const D = H.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 = k(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, y = 0, A = null,
|
|
345
|
+
let oe = 0, Z = null, y = 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, y = R - oe), !A && oe + ie >= x && (A = j,
|
|
348
|
+
!Z && oe + ie >= R && (Z = j, y = 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, y) : z.setStart(
|
|
352
|
-
}, O = (
|
|
353
|
-
const
|
|
354
|
-
|
|
351
|
+
Z ? z.setStart(Z, y) : z.setStart(G, 0), !E && A ? z.setEnd(A, X) : z.collapse(!0), H.removeAllRanges(), H.addRange(z), i(), g();
|
|
352
|
+
}, O = (k) => {
|
|
353
|
+
const H = e.parentElement?.querySelector("#editor-status");
|
|
354
|
+
H && (H.textContent = k, setTimeout(() => H.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: g,
|
|
360
360
|
rootElement: e,
|
|
361
361
|
saveSelection: i,
|
|
362
362
|
restoreSelection: L,
|
|
363
363
|
isInlineActive: c,
|
|
364
|
-
isBlockActive:
|
|
364
|
+
isBlockActive: C,
|
|
365
365
|
focus: $,
|
|
366
|
-
toolbarRef:
|
|
367
|
-
focusFirstToolbarButton:
|
|
366
|
+
toolbarRef: n,
|
|
367
|
+
focusFirstToolbarButton: m,
|
|
368
368
|
replaceCurrentBlock: B,
|
|
369
369
|
buttons: a,
|
|
370
370
|
announce: O
|
|
@@ -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
|
{
|
|
@@ -911,7 +911,7 @@ const s1 = (e) => {
|
|
|
911
911
|
"stroke-width": 2
|
|
912
912
|
}
|
|
913
913
|
]
|
|
914
|
-
},
|
|
914
|
+
}, gt = {
|
|
915
915
|
viewBox: "0 0 24 24",
|
|
916
916
|
paths: [
|
|
917
917
|
{
|
|
@@ -957,7 +957,7 @@ const s1 = (e) => {
|
|
|
957
957
|
"stroke-width": 2
|
|
958
958
|
}
|
|
959
959
|
]
|
|
960
|
-
},
|
|
960
|
+
}, yt = {
|
|
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
|
{
|
|
@@ -1100,7 +1100,7 @@ const s1 = (e) => {
|
|
|
1100
1100
|
fill: "currentColor"
|
|
1101
1101
|
}
|
|
1102
1102
|
]
|
|
1103
|
-
},
|
|
1103
|
+
}, Ht = {
|
|
1104
1104
|
viewBox: "0 0 24 24",
|
|
1105
1105
|
transform: "matrix(-1,0,0,1,0,0)",
|
|
1106
1106
|
paths: [
|
|
@@ -1127,7 +1127,7 @@ const s1 = (e) => {
|
|
|
1127
1127
|
"stroke-width": 2
|
|
1128
1128
|
}
|
|
1129
1129
|
]
|
|
1130
|
-
},
|
|
1130
|
+
}, It = {
|
|
1131
1131
|
viewBox: "0 0 24 24",
|
|
1132
1132
|
paths: [
|
|
1133
1133
|
{
|
|
@@ -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: yt,
|
|
1847
1847
|
oList: dt,
|
|
1848
1848
|
uList: ct,
|
|
1849
1849
|
close: vt,
|
|
@@ -1852,7 +1852,7 @@ const s1 = (e) => {
|
|
|
1852
1852
|
image: mt,
|
|
1853
1853
|
phone: ht,
|
|
1854
1854
|
trash: Ct,
|
|
1855
|
-
share:
|
|
1855
|
+
share: gt,
|
|
1856
1856
|
spotfy: kt,
|
|
1857
1857
|
church: wt,
|
|
1858
1858
|
health: Dt,
|
|
@@ -1860,13 +1860,13 @@ const s1 = (e) => {
|
|
|
1860
1860
|
shield: Lt,
|
|
1861
1861
|
upload: xt,
|
|
1862
1862
|
italic: Vt,
|
|
1863
|
-
logout:
|
|
1863
|
+
logout: Ht,
|
|
1864
1864
|
ticket: Bt,
|
|
1865
|
-
search:
|
|
1865
|
+
search: It,
|
|
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 = I(() => ({
|
|
1962
|
+
top: `${n.value}px`,
|
|
1963
1963
|
left: `${a.value}px`
|
|
1964
|
-
})),
|
|
1964
|
+
})), l = (c, C) => c && (s.value[C] = c), d = I(() => [
|
|
1965
1965
|
{
|
|
1966
1966
|
key: "strong",
|
|
1967
1967
|
label: "bold",
|
|
@@ -2013,47 +2013,47 @@ const s1 = (e) => {
|
|
|
2013
2013
|
},
|
|
2014
2014
|
isActive: (c) => c.isBlockActive("blockquote")
|
|
2015
2015
|
}
|
|
2016
|
-
]), u =
|
|
2016
|
+
]), u = I(() => [
|
|
2017
2017
|
...d.value,
|
|
2018
2018
|
...t.editor?.buttons ?? []
|
|
2019
2019
|
]), p = async () => {
|
|
2020
2020
|
await we(), s.value[0]?.focus();
|
|
2021
|
-
},
|
|
2022
|
-
const
|
|
2021
|
+
}, b = (c) => {
|
|
2022
|
+
const C = s.value, $ = C.indexOf(document.activeElement);
|
|
2023
2023
|
if (c.key === "ArrowRight") {
|
|
2024
2024
|
c.preventDefault();
|
|
2025
|
-
const L = $ <
|
|
2026
|
-
|
|
2025
|
+
const L = $ < C.length - 1 ? $ + 1 : 0;
|
|
2026
|
+
C[L]?.focus();
|
|
2027
2027
|
}
|
|
2028
2028
|
if (c.key === "ArrowLeft") {
|
|
2029
2029
|
c.preventDefault();
|
|
2030
|
-
const L = $ > 0 ? $ - 1 :
|
|
2031
|
-
|
|
2030
|
+
const L = $ > 0 ? $ - 1 : C.length - 1;
|
|
2031
|
+
C[L]?.focus();
|
|
2032
2032
|
}
|
|
2033
|
-
c.key === "Home" && (c.preventDefault(),
|
|
2034
|
-
},
|
|
2033
|
+
c.key === "Home" && (c.preventDefault(), C[0]?.focus()), c.key === "End" && (c.preventDefault(), C[C.length - 1]?.focus()), c.key === "Escape" && (c.preventDefault(), t.editor?.restoreSelection(), t.editor?.focus());
|
|
2034
|
+
}, g = () => {
|
|
2035
2035
|
const c = window.getSelection();
|
|
2036
2036
|
if (!c || c.rangeCount === 0) {
|
|
2037
2037
|
i.value = !1;
|
|
2038
2038
|
return;
|
|
2039
2039
|
}
|
|
2040
|
-
const
|
|
2041
|
-
if (!
|
|
2040
|
+
const C = t.editor?.rootElement;
|
|
2041
|
+
if (!C) return;
|
|
2042
2042
|
const $ = c.getRangeAt(0);
|
|
2043
|
-
if (!
|
|
2043
|
+
if (!C.contains($.commonAncestorContainer) || c.isCollapsed) {
|
|
2044
2044
|
i.value = !1;
|
|
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", g), window.addEventListener("scroll", g, !0), window.addEventListener("resize", g);
|
|
2052
|
+
}), be(() => {
|
|
2053
|
+
document.removeEventListener("selectionchange", g), window.removeEventListener("scroll", g, !0), window.removeEventListener("resize", g);
|
|
2054
2054
|
}), o({
|
|
2055
2055
|
focusFirstButton: p
|
|
2056
|
-
}), (c,
|
|
2056
|
+
}), (c, C) => (v(), J($e, { name: "tooltip-fade" }, {
|
|
2057
2057
|
default: W(() => [
|
|
2058
2058
|
i.value ? (v(), f("div", {
|
|
2059
2059
|
key: 0,
|
|
@@ -2061,19 +2061,19 @@ const s1 = (e) => {
|
|
|
2061
2061
|
role: "toolbar",
|
|
2062
2062
|
"aria-label": "Formatting options",
|
|
2063
2063
|
"aria-controls": e.editorId,
|
|
2064
|
-
style:
|
|
2064
|
+
style: ge(r.value),
|
|
2065
2065
|
tabindex: "-1",
|
|
2066
|
-
onKeydown:
|
|
2066
|
+
onKeydown: b
|
|
2067
2067
|
}, [
|
|
2068
|
-
|
|
2068
|
+
C[0] || (C[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: (
|
|
2073
|
+
ref: (m) => l(m, L),
|
|
2074
2074
|
class: re({ "is-active": $.isActive?.(t.editor) }),
|
|
2075
2075
|
"aria-pressed": $.isActive?.(t.editor),
|
|
2076
|
-
onMousedown: le((
|
|
2076
|
+
onMousedown: le((m) => $.action(t.editor), ["prevent"]),
|
|
2077
2077
|
"aria-label": $.ariaLabel
|
|
2078
2078
|
}, [
|
|
2079
2079
|
$.type === "icon" ? (v(), J(ce, {
|
|
@@ -2087,7 +2087,7 @@ const s1 = (e) => {
|
|
|
2087
2087
|
_: 1
|
|
2088
2088
|
}));
|
|
2089
2089
|
}
|
|
2090
|
-
}),
|
|
2090
|
+
}), g2 = /* @__PURE__ */ K(h2, [["__scopeId", "data-v-3f279ebe"]]), y2 = { 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
|
+
}), ye("announce", (r) => i.value?.announce(r)), (r, l) => (v(), f("section", y2, [
|
|
2117
2117
|
P(N1, {
|
|
2118
2118
|
ref_key: "contentRef",
|
|
2119
2119
|
ref: s,
|
|
@@ -2121,25 +2121,25 @@ const s1 = (e) => {
|
|
|
2121
2121
|
"editor-id": S(a),
|
|
2122
2122
|
"aria-label": e.ariaLabel
|
|
2123
2123
|
}, null, 8, ["editor", "editor-id", "aria-label"]),
|
|
2124
|
-
P(
|
|
2124
|
+
P(g2, {
|
|
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 = {
|
|
2140
2140
|
key: 0,
|
|
2141
2141
|
class: "ui-upload__progress-wrapper"
|
|
2142
|
-
}, V2 = { class: "ui-upload__progress-text" },
|
|
2142
|
+
}, V2 = { class: "ui-upload__progress-text" }, H2 = ["value", "aria-label"], I2 = {
|
|
2143
2143
|
key: 1,
|
|
2144
2144
|
class: "ui-upload__status success",
|
|
2145
2145
|
style: { color: "var(--green-color)" },
|
|
@@ -2174,90 +2174,90 @@ 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 = I(() => t.value), p = I(() => a.maxSize === 1 / 0 ? "Unlimited" : V(a.maxSize)), b = I(() => !a.disabled && (a.multiple || t.value.length === 0)), g = I(() => u.value.some((w) => w.status === "uploading")), c = () => b.value && d.value?.click(), C = () => {
|
|
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
|
-
},
|
|
2191
|
-
const x =
|
|
2190
|
+
}, m = (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
|
-
},
|
|
2231
|
-
|
|
2232
|
-
}, D = () => t.value = [...u.value], V = (
|
|
2227
|
+
n("upload", w, G);
|
|
2228
|
+
}, k = (w) => {
|
|
2229
|
+
w.controller && (w.controller.abort(), w.status = "canceled", w.controller = void 0, _(`Canceled uploading ${w.file.name}`), D());
|
|
2230
|
+
}, H = (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": g.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"])),
|
|
2258
2258
|
x[2] || (x[2] = ve(le((E) => !e.disabled && c(), ["prevent"]), ["space"]))
|
|
2259
2259
|
],
|
|
2260
|
-
onDragover: x[3] || (x[3] = le((E) => !e.disabled &&
|
|
2260
|
+
onDragover: x[3] || (x[3] = le((E) => !e.disabled && C(), ["prevent"])),
|
|
2261
2261
|
onDragleave: $,
|
|
2262
2262
|
onDrop: x[4] || (x[4] = le((E) => !e.disabled && L(E), ["prevent"]))
|
|
2263
2263
|
}, [
|
|
@@ -2269,11 +2269,11 @@ const g2 = ["tabindex", "aria-label", "aria-describedby", "aria-busy", "aria-dis
|
|
|
2269
2269
|
multiple: e.multiple,
|
|
2270
2270
|
accept: e.accept,
|
|
2271
2271
|
disabled: e.disabled,
|
|
2272
|
-
onChange:
|
|
2272
|
+
onChange: m
|
|
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,11 +2297,11 @@ 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: () =>
|
|
2304
|
-
retry: () =>
|
|
2303
|
+
cancel: () => k(E),
|
|
2304
|
+
retry: () => H(E)
|
|
2305
2305
|
}, () => [
|
|
2306
2306
|
M("div", M2, [
|
|
2307
2307
|
M("span", L2, N(E.file.name), 1),
|
|
@@ -2314,9 +2314,9 @@ const g2 = ["tabindex", "aria-label", "aria-describedby", "aria-busy", "aria-dis
|
|
|
2314
2314
|
value: E.progress,
|
|
2315
2315
|
max: "100",
|
|
2316
2316
|
"aria-label": `Upload progress for ${E.file.name}`
|
|
2317
|
-
}, null, 8,
|
|
2317
|
+
}, null, 8, H2)
|
|
2318
2318
|
])) : q("", !0),
|
|
2319
|
-
E.status === "success" ? (v(), f("span",
|
|
2319
|
+
E.status === "success" ? (v(), f("span", I2, " Uploaded successful ")) : q("", !0),
|
|
2320
2320
|
E.status === "error" ? (v(), f("span", B2, N(E.error || "Upload failed"), 1)) : q("", !0),
|
|
2321
2321
|
E.status === "canceled" ? (v(), f("span", _2, " Upload canceled ")) : q("", !0),
|
|
2322
2322
|
M("div", D2, [
|
|
@@ -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) => k(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) => H(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,78 +2383,78 @@ 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
|
-
}, w = () => {
|
|
2393
|
-
r && (clearTimeout(r), r = null), a.value = !1;
|
|
2394
2392
|
}, b = () => {
|
|
2393
|
+
l && (clearTimeout(l), l = null), a.value = !1;
|
|
2394
|
+
}, g = () => {
|
|
2395
2395
|
if (!i.value || !s.value) return {};
|
|
2396
|
-
const
|
|
2396
|
+
const C = i.value.getBoundingClientRect(), $ = s.value.getBoundingClientRect(), L = {
|
|
2397
2397
|
position: "fixed"
|
|
2398
2398
|
};
|
|
2399
2399
|
switch (o.placement) {
|
|
2400
2400
|
case "top":
|
|
2401
|
-
L.left = `${
|
|
2401
|
+
L.left = `${C.left + C.width / 2 - $.width / 2}px`, L.top = `${C.top - $.height - t}px`;
|
|
2402
2402
|
break;
|
|
2403
2403
|
case "bottom":
|
|
2404
|
-
L.left = `${
|
|
2404
|
+
L.left = `${C.left + C.width / 2 - $.width / 2}px`, L.top = `${C.bottom + t}px`;
|
|
2405
2405
|
break;
|
|
2406
2406
|
case "left":
|
|
2407
|
-
L.left = `${
|
|
2407
|
+
L.left = `${C.left - $.width - t}px`, L.top = `${C.top + C.height / 2 - $.height / 2}px`;
|
|
2408
2408
|
break;
|
|
2409
2409
|
case "right":
|
|
2410
|
-
L.left = `${
|
|
2410
|
+
L.left = `${C.right + t}px`, L.top = `${C.top + C.height / 2 - $.height / 2}px`;
|
|
2411
2411
|
break;
|
|
2412
2412
|
}
|
|
2413
2413
|
return L;
|
|
2414
2414
|
}, c = () => {
|
|
2415
|
-
|
|
2415
|
+
r.value = g();
|
|
2416
2416
|
};
|
|
2417
|
-
return Y(a, async (
|
|
2418
|
-
if (!
|
|
2417
|
+
return Y(a, async (C) => {
|
|
2418
|
+
if (!C) {
|
|
2419
2419
|
d?.(), d = null, u?.disconnect(), u = null;
|
|
2420
2420
|
return;
|
|
2421
2421
|
}
|
|
2422
2422
|
await we(), c(), d = T2(c), u = new ResizeObserver(c), s.value && u.observe(s.value), i.value && u.observe(i.value);
|
|
2423
|
-
}),
|
|
2423
|
+
}), He(() => {
|
|
2424
2424
|
d?.(), u?.disconnect();
|
|
2425
|
-
}), (
|
|
2425
|
+
}), (C, $) => (v(), f(te, null, [
|
|
2426
2426
|
M("span", {
|
|
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: b,
|
|
2435
2435
|
onFocus: p,
|
|
2436
|
-
onBlur:
|
|
2437
|
-
onKeydown: ve(
|
|
2436
|
+
onBlur: b,
|
|
2437
|
+
onKeydown: ve(b, ["esc"])
|
|
2438
2438
|
}, [
|
|
2439
|
-
U(
|
|
2439
|
+
U(C.$slots, "default", {}, void 0, !0)
|
|
2440
2440
|
], 40, Z2),
|
|
2441
|
-
(v(), J(
|
|
2441
|
+
(v(), J(Ie, { to: "body" }, [
|
|
2442
2442
|
P($e, { name: "tooltip-fade" }, {
|
|
2443
2443
|
default: W(() => [
|
|
2444
2444
|
a.value ? (v(), f("div", {
|
|
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:
|
|
2454
|
+
style: ge(r.value)
|
|
2455
2455
|
}, [
|
|
2456
2456
|
$[0] || ($[0] = M("div", { class: "tooltip-arrow" }, null, -1)),
|
|
2457
|
-
U(
|
|
2457
|
+
U(C.$slots, "content", {}, () => [
|
|
2458
2458
|
me(N(e.content), 1)
|
|
2459
2459
|
], !0)
|
|
2460
2460
|
], 12, E2)) : q("", !0)
|
|
@@ -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 = I(() => t.clickable || t.as === "button" || t.as === "a"), s = I(() => [
|
|
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 = I(() => 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((b) => !e.disabled && i.value && l(b), ["prevent"]), ["enter"])),
|
|
2507
|
+
p[1] || (p[1] = ve(le((b) => !e.disabled && i.value && l(b), ["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) =>
|
|
2563
|
+
}), Gn = /* @__PURE__ */ K(Y2, [["__scopeId", "data-v-0f5d7308"]]), Pe = (e, o, t, a) => I(() => {
|
|
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) => I(() => Object.keys(e).includes("required") && e.required !== "false" ? "true" : void 0), W2 = (e) => I(() => 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:
|
|
2632
|
-
return
|
|
2633
|
-
}), $ = h(!1), L = () => $.value = !$.value,
|
|
2634
|
-
const
|
|
2635
|
-
t.value = a.type === "number" ? Number(
|
|
2636
|
-
}, B = (
|
|
2637
|
-
u.value = !0,
|
|
2638
|
-
}, O = (
|
|
2639
|
-
u.value = !1,
|
|
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 = I(() => t.value !== null && t.value !== void 0 && t.value !== ""), b = I(() => d ? `${l} ${s}-required-hint` : l), g = I(() => a.invalid === !0 && a.errorMessage ? r : void 0), c = I(() => a.type === "password" ? $.value ? "text" : "password" : a.type), C = I(() => {
|
|
2631
|
+
const { type: k, ...H } = i;
|
|
2632
|
+
return H;
|
|
2633
|
+
}), $ = h(!1), L = () => $.value = !$.value, m = (k) => {
|
|
2634
|
+
const H = k.target;
|
|
2635
|
+
t.value = a.type === "number" ? Number(H.value) : H.value;
|
|
2636
|
+
}, B = (k) => {
|
|
2637
|
+
u.value = !0, n("focus", k);
|
|
2638
|
+
}, O = (k) => {
|
|
2639
|
+
u.value = !1, n("blur", k);
|
|
2640
2640
|
};
|
|
2641
|
-
return (
|
|
2641
|
+
return (k, H) => (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", {
|
|
@@ -2648,20 +2648,20 @@ const N2 = {
|
|
|
2648
2648
|
M("input", Ce({
|
|
2649
2649
|
id: e.id,
|
|
2650
2650
|
type: c.value
|
|
2651
|
-
},
|
|
2651
|
+
}, C.value, {
|
|
2652
2652
|
class: "input",
|
|
2653
|
-
onInput:
|
|
2653
|
+
onInput: m,
|
|
2654
2654
|
onFocus: B,
|
|
2655
2655
|
onBlur: O,
|
|
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": g.value,
|
|
2660
|
+
"aria-describedby": S(Pe)(k.$props, k.$slots, r, b.value).value
|
|
2661
2661
|
}), null, 16, aa),
|
|
2662
|
-
P(Ke, { hintId:
|
|
2662
|
+
P(Ke, { hintId: l }, {
|
|
2663
2663
|
default: W(() => [
|
|
2664
|
-
U(
|
|
2664
|
+
U(k.$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(k.$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 =
|
|
2709
|
+
const o = e, t = h("loading"), a = I(() => o.src && t.value !== "error"), n = I(() => o.name ? o.name.split(" ").map((l) => l[0]).slice(0, 2).join("").toUpperCase() : ""), i = I(() => 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,66 +2745,66 @@ 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 = I(() => a.id ?? de()), u = `${d.value}-label`, p = `${d.value}-listbox`, b = `${d.value}-error`, g = `${d.value}-hint`, c = `${d.value}-value`, C = h(null), $ = h(null), L = I(() => t.value !== null && t.value !== void 0 && t.value !== ""), m = I(() => C.value !== null ? `${p}-option-${C.value}` : void 0), B = Be(s).value, O = I(() => B ? `${g} ${d.value}-required-hint` : g), k = I(() => i.value && m.value ? m.value : void 0), H = I(() => $.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 y = Z.relatedTarget, A =
|
|
2761
|
-
!A || A?.contains(y) || (
|
|
2760
|
+
const y = Z.relatedTarget, A = l.value;
|
|
2761
|
+
!A || A?.contains(y) || (r.value = !1, i.value = !1, n("blur", Z));
|
|
2762
2762
|
}, _ = (Z) => {
|
|
2763
|
-
i.value = !i.value, i.value && t.value.toString().length > 0 && (
|
|
2763
|
+
i.value = !i.value, i.value && t.value.toString().length > 0 && (C.value = C.value ?? a.options.findIndex((y) => !y.disabled)), !(!a.options || a.options.length === 0) && n("click", Z);
|
|
2764
2764
|
}, R = (Z, y) => {
|
|
2765
|
-
const A =
|
|
2766
|
-
!A || Z.disabled || ($.value = y,
|
|
2767
|
-
},
|
|
2765
|
+
const A = l.value;
|
|
2766
|
+
!A || Z.disabled || ($.value = y, C.value = y, 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,
|
|
2769
|
+
i.value = !0, C.value = C.value ?? a.options.findIndex((y) => !y.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
2774
|
const y = E();
|
|
2775
|
-
y >= 0 && (
|
|
2775
|
+
y >= 0 && (C.value = y), Z.preventDefault();
|
|
2776
2776
|
}
|
|
2777
2777
|
if (Z.key === "End") {
|
|
2778
|
-
const y =
|
|
2779
|
-
y >= 0 && (
|
|
2778
|
+
const y = G();
|
|
2779
|
+
y >= 0 && (C.value = y), Z.preventDefault();
|
|
2780
2780
|
}
|
|
2781
2781
|
if (Z.key === "Enter" || Z.key === " ") {
|
|
2782
|
-
if (
|
|
2783
|
-
const y = a.options[
|
|
2782
|
+
if (C.value === null) return;
|
|
2783
|
+
const y = a.options[C.value];
|
|
2784
2784
|
if (!y || y.disabled) return;
|
|
2785
|
-
R(y,
|
|
2785
|
+
R(y, C.value), i.value = !1, Z.preventDefault();
|
|
2786
2786
|
}
|
|
2787
2787
|
Z.key === "Escape" && (i.value = !1);
|
|
2788
2788
|
}
|
|
2789
2789
|
}, x = (Z) => {
|
|
2790
|
-
if (
|
|
2791
|
-
let y =
|
|
2790
|
+
if (C.value === null) return;
|
|
2791
|
+
let y = C.value;
|
|
2792
2792
|
do
|
|
2793
2793
|
y += Z;
|
|
2794
2794
|
while (y >= 0 && y < a.options.length && a.options[y]?.disabled);
|
|
2795
|
-
y >= 0 && y < a.options.length && (
|
|
2796
|
-
}, E = () => a.options.findIndex((Z) => !Z.disabled),
|
|
2797
|
-
const y =
|
|
2795
|
+
y >= 0 && y < a.options.length && (C.value = y);
|
|
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 y = l.value;
|
|
2798
2798
|
!y || y.contains(Z.target) || (i.value = !1);
|
|
2799
2799
|
};
|
|
2800
|
-
|
|
2800
|
+
He(() => {
|
|
2801
2801
|
document.removeEventListener("mousedown", Q);
|
|
2802
2802
|
});
|
|
2803
2803
|
const oe = () => {
|
|
2804
2804
|
const Z = a.options.findIndex((y) => y.key === t.value);
|
|
2805
2805
|
if (Z > -1) {
|
|
2806
|
-
$.value = Z,
|
|
2807
|
-
const y =
|
|
2806
|
+
$.value = Z, C.value = Z;
|
|
2807
|
+
const y = l.value;
|
|
2808
2808
|
y && y.classList.add("filled");
|
|
2809
2809
|
}
|
|
2810
2810
|
};
|
|
@@ -2815,8 +2815,8 @@ const N2 = {
|
|
|
2815
2815
|
}
|
|
2816
2816
|
}), (Z, y) => (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, b, O.value).value,
|
|
2834
|
+
"aria-activedescendant": k.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", {
|
|
@@ -2848,7 +2848,7 @@ const N2 = {
|
|
|
2848
2848
|
class: "selected-object",
|
|
2849
2849
|
"aria-live": "polite",
|
|
2850
2850
|
"aria-atomic": "true",
|
|
2851
|
-
innerHTML:
|
|
2851
|
+
innerHTML: H.value
|
|
2852
2852
|
}, null, 8, ua),
|
|
2853
2853
|
P(ce, {
|
|
2854
2854
|
name: "directionDown",
|
|
@@ -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":
|
|
2869
|
+
class: re(["option", { "focus-visible": C.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: g }, {
|
|
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: b,
|
|
2897
2897
|
invalid: e.invalid,
|
|
2898
2898
|
errorMessage: e.errorMessage
|
|
2899
2899
|
}, null, 8, ["invalid", "errorMessage"])
|
|
@@ -2902,7 +2902,7 @@ const N2 = {
|
|
|
2902
2902
|
}), Qn = /* @__PURE__ */ K(va, [["__scopeId", "data-v-31f7b19f"]]), fa = ["aria-label"], pa = ["onKeydown"], Ca = {
|
|
2903
2903
|
key: 1,
|
|
2904
2904
|
class: "rs-gallery-thumbs"
|
|
2905
|
-
}, ma = ["aria-selected"], ha = ["onClick"],
|
|
2905
|
+
}, ma = ["aria-selected"], ha = ["onClick"], ga = /* @__PURE__ */ T({
|
|
2906
2906
|
__name: "GalleryCarousel",
|
|
2907
2907
|
props: /* @__PURE__ */ ee({
|
|
2908
2908
|
images: {},
|
|
@@ -2923,30 +2923,30 @@ 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,
|
|
2927
|
-
|
|
2928
|
-
},
|
|
2929
|
-
|
|
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 = I(() => t.value), p = I(() => a.images[u.value]), b = (m, B) => {
|
|
2927
|
+
m && (i.value[B] = m);
|
|
2928
|
+
}, g = (m) => {
|
|
2929
|
+
m !== u.value && (s.value = m > u.value ? "next" : "prev", t.value = m, n("change", m));
|
|
2930
2930
|
}, c = () => {
|
|
2931
2931
|
if (u.value === a.images.length - 1) {
|
|
2932
|
-
a.loop &&
|
|
2932
|
+
a.loop && g(0);
|
|
2933
2933
|
return;
|
|
2934
2934
|
}
|
|
2935
|
-
|
|
2936
|
-
},
|
|
2935
|
+
g(u.value + 1);
|
|
2936
|
+
}, C = () => {
|
|
2937
2937
|
if (u.value === 0) {
|
|
2938
|
-
a.loop &&
|
|
2938
|
+
a.loop && g(a.images.length - 1);
|
|
2939
2939
|
return;
|
|
2940
2940
|
}
|
|
2941
|
-
|
|
2941
|
+
g(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
|
-
return Y(u, async (
|
|
2947
|
+
return Y(u, async (m) => {
|
|
2948
2948
|
await we();
|
|
2949
|
-
const B = i.value[
|
|
2949
|
+
const B = i.value[m];
|
|
2950
2950
|
B && B.scrollIntoView({
|
|
2951
2951
|
behavior: window.matchMedia("(prefers-reduced-motion: reduce)").matches ? "auto" : "smooth",
|
|
2952
2952
|
inline: "center",
|
|
@@ -2954,22 +2954,22 @@ const N2 = {
|
|
|
2954
2954
|
});
|
|
2955
2955
|
}), Y(() => a.images, () => {
|
|
2956
2956
|
i.value = [];
|
|
2957
|
-
}), (
|
|
2957
|
+
}), (m, B) => (v(), f("div", {
|
|
2958
2958
|
role: "region",
|
|
2959
2959
|
class: "rs-gallery",
|
|
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:
|
|
2970
|
+
style: ge(r.value ? { height: `${r.value}px` } : void 0),
|
|
2971
2971
|
onKeydown: [
|
|
2972
|
-
ve(le(
|
|
2972
|
+
ve(le(C, ["prevent"]), ["left"]),
|
|
2973
2973
|
ve(le(c, ["prevent"]), ["right"])
|
|
2974
2974
|
]
|
|
2975
2975
|
}, [
|
|
@@ -2989,31 +2989,31 @@ const N2 = {
|
|
|
2989
2989
|
]),
|
|
2990
2990
|
_: 1
|
|
2991
2991
|
}, 8, ["name"]),
|
|
2992
|
-
U(
|
|
2992
|
+
U(m.$slots, "overlay", {
|
|
2993
2993
|
image: p.value,
|
|
2994
2994
|
index: u.value
|
|
2995
2995
|
}, void 0, !0)
|
|
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, k) => (v(), f("li", {
|
|
3004
3004
|
key: O.src,
|
|
3005
3005
|
ref_for: !0,
|
|
3006
|
-
ref: (
|
|
3007
|
-
"aria-selected": u.value ===
|
|
3006
|
+
ref: (H) => b(H, k),
|
|
3007
|
+
"aria-selected": u.value === k
|
|
3008
3008
|
}, [
|
|
3009
3009
|
M("button", {
|
|
3010
3010
|
type: "button",
|
|
3011
|
-
class: re(["rs-gallery-thumb", { active: u.value ===
|
|
3012
|
-
onClick: (
|
|
3011
|
+
class: re(["rs-gallery-thumb", { active: u.value === k }]),
|
|
3012
|
+
onClick: (H) => g(k)
|
|
3013
3013
|
}, [
|
|
3014
3014
|
P(xe, {
|
|
3015
3015
|
src: O.src,
|
|
3016
|
-
alt: `Select image ${
|
|
3016
|
+
alt: `Select image ${k + 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(
|
|
3024
|
+
}), i1 = /* @__PURE__ */ K(ga, [["__scopeId", "data-v-dcfacff6"]]), ya = ["aria-label"], ba = ["onClick"], ka = /* @__PURE__ */ T({
|
|
3025
3025
|
__name: "GalleryGrid",
|
|
3026
3026
|
props: {
|
|
3027
3027
|
images: {},
|
|
@@ -3038,23 +3038,23 @@ const N2 = {
|
|
|
3038
3038
|
setup(e) {
|
|
3039
3039
|
return (o, t) => (v(), f("div", {
|
|
3040
3040
|
class: "rs-gallery-grid",
|
|
3041
|
-
style:
|
|
3041
|
+
style: ge({ "--grid-columns": e.columns, "--grid-gap": e.gap }),
|
|
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, ya));
|
|
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 = I(() => e.motion), u = I(() => e.size);
|
|
3082
|
+
return ye(_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,33 +3095,33 @@ 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"])'
|
|
3106
3106
|
)
|
|
3107
|
-
).filter((
|
|
3107
|
+
).filter((C) => !C.hasAttribute("disabled"));
|
|
3108
3108
|
if (p.length === 0) {
|
|
3109
3109
|
u.setAttribute("tabindex", "-1"), u.focus();
|
|
3110
3110
|
return;
|
|
3111
3111
|
}
|
|
3112
|
-
const
|
|
3113
|
-
|
|
3112
|
+
const b = p[0], g = p[p.length - 1], c = (C) => {
|
|
3113
|
+
C.key === "Tab" && (C.shiftKey && document.activeElement === b ? (C.preventDefault(), g?.focus()) : !C.shiftKey && document.activeElement === g && (C.preventDefault(), b?.focus()));
|
|
3114
3114
|
};
|
|
3115
|
-
u.addEventListener("keydown", c),
|
|
3115
|
+
u.addEventListener("keydown", c), b?.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 = "");
|
|
3122
3122
|
};
|
|
3123
3123
|
return () => F(
|
|
3124
|
-
|
|
3124
|
+
Ie,
|
|
3125
3125
|
{ to: "body" },
|
|
3126
3126
|
F(
|
|
3127
3127
|
$e,
|
|
@@ -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 = I({
|
|
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
|
|
@@ -3373,7 +3373,7 @@ const wa = /* @__PURE__ */ T({
|
|
|
3373
3373
|
}
|
|
3374
3374
|
}), t1 = /* @__PURE__ */ K(Va, [["__scopeId", "data-v-d6be1b96"]]);
|
|
3375
3375
|
t1.install = (e) => e.component("ImageGallery", t1);
|
|
3376
|
-
const
|
|
3376
|
+
const Ha = ["aria-busy"], Ia = {
|
|
3377
3377
|
key: 0,
|
|
3378
3378
|
class: "message",
|
|
3379
3379
|
"aria-hidden": "true"
|
|
@@ -3386,31 +3386,31 @@ 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",
|
|
3411
|
+
e.message ? (v(), f("span", Ia, N(n.value), 1)) : q("", !0),
|
|
3412
3412
|
M("span", Ba, N(e.message || "Loading"), 1)
|
|
3413
|
-
], 8,
|
|
3413
|
+
], 8, Ha));
|
|
3414
3414
|
}
|
|
3415
3415
|
}), C1 = /* @__PURE__ */ K(_a, [["__scopeId", "data-v-e61a1cf5"]]), Da = ["id", "required", "checked", "disabled", "aria-invalid", "aria-disabled", "aria-checked"], Ra = {
|
|
3416
3416
|
class: "checkbox-control",
|
|
@@ -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 = I(() => n.id ?? `checkbox-${i}`), r = h(null), l = W2(n).value, d = I(() => n.required ? !0 : void 0), u = I(() => n.triState && a.value === void 0 ? "mixed" : void 0);
|
|
3440
3440
|
Y(
|
|
3441
3441
|
() => a.value,
|
|
3442
|
-
(
|
|
3443
|
-
|
|
3442
|
+
(b) => {
|
|
3443
|
+
r.value && (r.value.indeterminate = b === void 0, r.value.checked = b === !0);
|
|
3444
3444
|
},
|
|
3445
3445
|
{ immediate: !0 }
|
|
3446
3446
|
);
|
|
3447
|
-
const p = (
|
|
3448
|
-
if (!
|
|
3449
|
-
if (!
|
|
3450
|
-
const
|
|
3451
|
-
a.value =
|
|
3447
|
+
const p = (b) => {
|
|
3448
|
+
if (!n.disabled) {
|
|
3449
|
+
if (!n.triState) {
|
|
3450
|
+
const g = b.target.checked;
|
|
3451
|
+
a.value = g, 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 (b, g) => (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: g[0] || (g[0] = (c) => e.triState ? p(c) : void 0),
|
|
3471
|
+
onChange: g[1] || (g[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, [...g[2] || (g[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, [...g[3] || (g[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(b.$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(
|
|
3511
|
-
const
|
|
3512
|
-
t.value = s.type === "number" ? Number(
|
|
3513
|
-
}, $ =
|
|
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`, b = Be(a).value, g = I(() => b ? `${p} ${d}-required-hint` : p), c = Pe(s, n, u, g.value).value, C = (L) => {
|
|
3510
|
+
ze(r.value, l.value);
|
|
3511
|
+
const m = L.target;
|
|
3512
|
+
t.value = s.type === "number" ? Number(m.value) : m.value;
|
|
3513
|
+
}, $ = I(() => s.invalid === !0 && s.errorMessage ? u : void 0);
|
|
3514
3514
|
return ae(() => {
|
|
3515
|
-
ze(
|
|
3516
|
-
}), (L,
|
|
3517
|
-
class: re(["textarea-box", { required: S(
|
|
3515
|
+
ze(r.value, l.value);
|
|
3516
|
+
}), (L, m) => (v(), f("div", {
|
|
3517
|
+
class: re(["textarea-box", { required: S(b), 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:
|
|
3528
|
-
onBlur:
|
|
3529
|
-
onInput:
|
|
3527
|
+
onFocus: m[0] || (m[0] = (B) => S(G2)(B, l.value, i)),
|
|
3528
|
+
onBlur: m[1] || (m[1] = (B) => S(X2)(B, r.value, l.value, i)),
|
|
3529
|
+
onInput: C,
|
|
3530
3530
|
value: t.value,
|
|
3531
|
-
required: S(
|
|
3531
|
+
required: S(b),
|
|
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(b)
|
|
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 = (g, c) => g && (n.value[c] = g);
|
|
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 g = u(), c = Object.values(p()).every(Boolean);
|
|
3626
|
+
return g && c;
|
|
3627
3627
|
}, u = () => {
|
|
3628
|
-
const
|
|
3628
|
+
const g = p(), c = Object.values(g).filter(Boolean).length, C = t.password.length >= 12 ? 1 : 0, $ = Math.min(100, (c + C) * 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
|
|
3631
|
+
const g = b();
|
|
3632
|
+
return n.value.forEach((c) => {
|
|
3633
|
+
const C = c.dataset.rule, $ = !!g[C];
|
|
3634
3634
|
c.classList.toggle("passed", $);
|
|
3635
|
-
}),
|
|
3636
|
-
},
|
|
3637
|
-
const
|
|
3635
|
+
}), g;
|
|
3636
|
+
}, b = () => {
|
|
3637
|
+
const g = {};
|
|
3638
3638
|
return t.rules.forEach((c) => {
|
|
3639
|
-
|
|
3639
|
+
g[c.key] = c.validator(
|
|
3640
3640
|
t.password,
|
|
3641
3641
|
t.passwordConfirmation
|
|
3642
3642
|
);
|
|
3643
|
-
}),
|
|
3643
|
+
}), g;
|
|
3644
3644
|
};
|
|
3645
|
-
return (
|
|
3645
|
+
return (g, c) => (v(), f("section", Ua, [
|
|
3646
3646
|
M("ul", ja, [
|
|
3647
|
-
(v(!0), f(te, null, ue(t.rules, (
|
|
3648
|
-
key:
|
|
3647
|
+
(v(!0), f(te, null, ue(t.rules, (C, $) => (v(), f("li", {
|
|
3648
|
+
key: C.key,
|
|
3649
3649
|
class: "password-rule",
|
|
3650
|
-
"data-rule":
|
|
3650
|
+
"data-rule": C.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
|
-
me(" " + N(
|
|
3655
|
+
me(" " + N(C.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 =
|
|
3752
|
-
return (s,
|
|
3751
|
+
const o = e, t = fe(e, "modelValue"), a = I(() => o.invalid ? "true" : void 0), n = I(() => o.required && !o.disabled ? "true" : void 0), i = I(() => 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
|
+
[g1, 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
|
}
|
|
@@ -3788,11 +3788,11 @@ const Ja = {
|
|
|
3788
3788
|
class: "option recents",
|
|
3789
3789
|
"aria-disabled": "true",
|
|
3790
3790
|
"aria-hidden": "true"
|
|
3791
|
-
}, mo = ["onClick"], ho = { class: "option-value" },
|
|
3791
|
+
}, mo = ["onClick"], ho = { class: "option-value" }, go = {
|
|
3792
3792
|
key: 0,
|
|
3793
3793
|
class: "start-icon",
|
|
3794
3794
|
"aria-hidden": "true"
|
|
3795
|
-
},
|
|
3795
|
+
}, yo = /* @__PURE__ */ T({
|
|
3796
3796
|
__name: "Autocomplete",
|
|
3797
3797
|
props: /* @__PURE__ */ ee({
|
|
3798
3798
|
id: {},
|
|
@@ -3818,7 +3818,7 @@ 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 = I(() => t.id ? `${t.id}-search-history` : "search-history"), g = `${de()}-list`, c = h(!1), C = I(() => n.value !== null && n.value !== void 0 && n.value !== ""), $ = I(() => d.value !== null ? `${g}-option-${d.value}` : void 0), L = I(() => r.value && $.value ? $.value : void 0), m = I(() => l.value.length > 0), B = I(() => {
|
|
3822
3822
|
if (!t.filterable) return t.options;
|
|
3823
3823
|
const y = s.value.toLowerCase();
|
|
3824
3824
|
return t.options.filter((A) => t.getValue(A).toLowerCase().includes(y));
|
|
@@ -3828,13 +3828,13 @@ const Ja = {
|
|
|
3828
3828
|
(y) => {
|
|
3829
3829
|
if (y)
|
|
3830
3830
|
try {
|
|
3831
|
-
|
|
3831
|
+
l.value = JSON.parse(localStorage.getItem(y) || "[]");
|
|
3832
3832
|
} catch {
|
|
3833
|
-
|
|
3833
|
+
l.value = [];
|
|
3834
3834
|
}
|
|
3835
3835
|
},
|
|
3836
3836
|
{ immediate: !0 }
|
|
3837
|
-
), Y(
|
|
3837
|
+
), Y(r, async (y) => {
|
|
3838
3838
|
if (!y) {
|
|
3839
3839
|
d.value = null;
|
|
3840
3840
|
return;
|
|
@@ -3843,31 +3843,31 @@ const Ja = {
|
|
|
3843
3843
|
}), Y(
|
|
3844
3844
|
() => t.loading,
|
|
3845
3845
|
async (y) => {
|
|
3846
|
-
y ||
|
|
3846
|
+
y || 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
|
-
},
|
|
3854
|
+
const k = (y) => {
|
|
3855
|
+
s.value.length >= t.minChars && !t.filterable && !t.loading && (r.value = !0), c.value = !0, a("focus", y);
|
|
3856
|
+
}, H = (y) => {
|
|
3857
3857
|
const A = y.relatedTarget;
|
|
3858
|
-
i.value?.contains(A) || (
|
|
3858
|
+
i.value?.contains(A) || (r.value = !1, n.value ? w() : s.value = "", c.value = !1, a("blur", y));
|
|
3859
3859
|
}, D = (y, A) => {
|
|
3860
|
-
const
|
|
3861
|
-
if (!
|
|
3862
|
-
|
|
3860
|
+
const X = i.value;
|
|
3861
|
+
if (!X || t.isDisabled(y)) return;
|
|
3862
|
+
r.value = !1, E(s.value), u.value = A, d.value = A;
|
|
3863
3863
|
const z = t.getKey(y);
|
|
3864
|
-
z && z.toString().length > 0 ?
|
|
3864
|
+
z && z.toString().length > 0 ? X.classList.add("filled") : X.classList.remove("filled"), s.value = t.getValue(y), n.value = z, a("select", z);
|
|
3865
3865
|
}, V = (y) => {
|
|
3866
|
-
if (!
|
|
3867
|
-
|
|
3866
|
+
if (!r.value && ["ArrowDown", "ArrowUp"].includes(y.key)) {
|
|
3867
|
+
r.value = !0, d.value = d.value ?? B.value.findIndex((A) => !t.isDisabled(A)), y.preventDefault();
|
|
3868
3868
|
return;
|
|
3869
3869
|
}
|
|
3870
|
-
if (
|
|
3870
|
+
if (r.value) {
|
|
3871
3871
|
if (y.key === "ArrowDown" && (_(1), y.preventDefault()), y.key === "ArrowUp" && (_(-1), y.preventDefault()), y.key === "Home") {
|
|
3872
3872
|
const A = oe();
|
|
3873
3873
|
A >= 0 && (d.value = A), y.preventDefault();
|
|
@@ -3880,9 +3880,9 @@ const Ja = {
|
|
|
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, y.preventDefault();
|
|
3884
3884
|
}
|
|
3885
|
-
y.key === "Escape" && (
|
|
3885
|
+
y.key === "Escape" && (r.value = !1);
|
|
3886
3886
|
}
|
|
3887
3887
|
}, _ = (y) => {
|
|
3888
3888
|
if (d.value === null) return;
|
|
@@ -3892,27 +3892,27 @@ const Ja = {
|
|
|
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 y = t.options.findIndex((A) => t.getKey(A) ===
|
|
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 y = t.options.findIndex((A) => t.getKey(A) === n.value);
|
|
3899
3899
|
y > -1 && (d.value = y, u.value = y, s.value = t.getValue(t.options[y]));
|
|
3900
3900
|
};
|
|
3901
3901
|
Y(
|
|
3902
|
-
[() => t.options.length, () =>
|
|
3902
|
+
[() => t.options.length, () => n.value],
|
|
3903
3903
|
async ([y, A]) => {
|
|
3904
|
-
A && y !== 0 && (await we(),
|
|
3904
|
+
A && y !== 0 && (await we(), w());
|
|
3905
3905
|
},
|
|
3906
3906
|
{ flush: "post", immediate: !0 }
|
|
3907
3907
|
);
|
|
3908
3908
|
const x = () => {
|
|
3909
|
-
s.value = "",
|
|
3909
|
+
s.value = "", n.value = "";
|
|
3910
3910
|
}, E = (y) => {
|
|
3911
|
-
!y || y.trim().length === 0 || (
|
|
3911
|
+
!y || y.trim().length === 0 || (l.value = [
|
|
3912
3912
|
y,
|
|
3913
|
-
...
|
|
3914
|
-
].slice(0, t.suggestionsLimit), localStorage.setItem(p.value, JSON.stringify(
|
|
3915
|
-
},
|
|
3913
|
+
...l.value.filter((A) => A !== y)
|
|
3914
|
+
].slice(0, t.suggestionsLimit), localStorage.setItem(p.value, JSON.stringify(l.value)));
|
|
3915
|
+
}, G = (y) => {
|
|
3916
3916
|
s.value = y, R();
|
|
3917
3917
|
}, Q = () => {
|
|
3918
3918
|
const y = oe();
|
|
@@ -3921,8 +3921,8 @@ const Ja = {
|
|
|
3921
3921
|
for (let y = B.value.length - 1; y >= 0; y--) if (!t.isDisabled(B.value[y])) return y;
|
|
3922
3922
|
return -1;
|
|
3923
3923
|
};
|
|
3924
|
-
return ae(() =>
|
|
3925
|
-
class: re(["autocomplete", { required: S(O), error: e.invalid, "has-icon": Object.keys(y.$slots).includes("icon"), filled:
|
|
3924
|
+
return ae(() => w()), (y, A) => (v(), f("div", {
|
|
3925
|
+
class: re(["autocomplete", { required: S(O), error: e.invalid, "has-icon": Object.keys(y.$slots).includes("icon"), filled: C.value, focused: c.value }]),
|
|
3926
3926
|
ref_key: "autocompleteRef",
|
|
3927
3927
|
ref: i
|
|
3928
3928
|
}, [
|
|
@@ -3936,59 +3936,59 @@ const Ja = {
|
|
|
3936
3936
|
}, y.$attrs, {
|
|
3937
3937
|
role: "combobox",
|
|
3938
3938
|
"aria-autocomplete": "list",
|
|
3939
|
-
"aria-expanded":
|
|
3940
|
-
"aria-controls":
|
|
3939
|
+
"aria-expanded": r.value,
|
|
3940
|
+
"aria-controls": g,
|
|
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:
|
|
3948
|
-
onBlur:
|
|
3946
|
+
"onUpdate:modelValue": A[0] || (A[0] = (X) => s.value = X),
|
|
3947
|
+
onFocus: k,
|
|
3948
|
+
onBlur: H,
|
|
3949
3949
|
onInput: R,
|
|
3950
3950
|
onKeydown: V
|
|
3951
3951
|
}), null, 16, uo), [
|
|
3952
|
-
[
|
|
3952
|
+
[y1, s.value]
|
|
3953
3953
|
]),
|
|
3954
3954
|
P($e, { name: "select" }, {
|
|
3955
3955
|
default: W(() => [
|
|
3956
3956
|
Me(M("ul", {
|
|
3957
|
-
id:
|
|
3957
|
+
id: g,
|
|
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: `${g}-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
3977
|
U(y.$slots, "option", {
|
|
3978
|
-
option:
|
|
3979
|
-
value: e.getValue(
|
|
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, {
|
|
@@ -3997,26 +3997,26 @@ const Ja = {
|
|
|
3997
3997
|
role: "status",
|
|
3998
3998
|
message: "Loading"
|
|
3999
3999
|
})),
|
|
4000
|
-
|
|
4000
|
+
m.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
|
-
y.$slots.icon ? (v(), f("span",
|
|
4019
|
+
y.$slots.icon ? (v(), f("span", go, [
|
|
4020
4020
|
U(y.$slots, "icon", {}, void 0, !0)
|
|
4021
4021
|
])) : q("", !0),
|
|
4022
4022
|
s.value.length > 0 && !e.disabled ? (v(), J(he, {
|
|
@@ -4042,7 +4042,7 @@ const Ja = {
|
|
|
4042
4042
|
})) : q("", !0)
|
|
4043
4043
|
], 2));
|
|
4044
4044
|
}
|
|
4045
|
-
}), ll = /* @__PURE__ */ K(
|
|
4045
|
+
}), ll = /* @__PURE__ */ K(yo, [["__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,31 +4082,31 @@ 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 = () => {
|
|
4107
4107
|
cancelAnimationFrame(s), a.value = "closing", setTimeout(() => pe.toasts = pe.toasts.filter((u) => u.id !== o.id), $o);
|
|
4108
4108
|
};
|
|
4109
|
-
return ae(() => o.variant === "error" && o.focus && t.value?.focus()),
|
|
4109
|
+
return ae(() => o.variant === "error" && o.focus && t.value?.focus()), He(() => cancelAnimationFrame(s)), (u, p) => (v(), f("div", {
|
|
4110
4110
|
ref_key: "rootRef",
|
|
4111
4111
|
ref: t,
|
|
4112
4112
|
tabindex: "-1",
|
|
@@ -4138,19 +4138,19 @@ 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:
|
|
4141
|
+
style: ge({ width: n.value + "%" })
|
|
4142
4142
|
}, null, 4)
|
|
4143
4143
|
])) : q("", !0)
|
|
4144
4144
|
], 8, Mo));
|
|
4145
4145
|
}
|
|
4146
|
-
}),
|
|
4146
|
+
}), Ho = /* @__PURE__ */ K(Vo, [["__scopeId", "data-v-f9e75b9d"]]), Io = { class: "toast-viewport" }, Bo = { class: "toast-message" }, _o = { key: 0 }, Do = ["id"], Ro = /* @__PURE__ */ T({
|
|
4147
4147
|
__name: "ToastViewport",
|
|
4148
4148
|
setup(e) {
|
|
4149
|
-
return (o, t) => (v(), J(
|
|
4150
|
-
M("div",
|
|
4151
|
-
P(
|
|
4149
|
+
return (o, t) => (v(), J(Ie, { to: "body" }, [
|
|
4150
|
+
M("div", Io, [
|
|
4151
|
+
P(b1, { name: "toast-stack" }, {
|
|
4152
4152
|
default: W(() => [
|
|
4153
|
-
(v(!0), f(te, null, ue(S(pe).toasts, (a) => (v(), J(
|
|
4153
|
+
(v(!0), f(te, null, ue(S(pe).toasts, (a) => (v(), J(Ho, {
|
|
4154
4154
|
key: a.id,
|
|
4155
4155
|
id: a.id,
|
|
4156
4156
|
duration: a.duration,
|
|
@@ -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 =
|
|
4203
|
-
return (
|
|
4200
|
+
const t = e, a = o, n = h(), i = h();
|
|
4201
|
+
ye("card:labelId", n), ye("card:descriptionId", i);
|
|
4202
|
+
const s = I(() => 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 = I(() => 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 =
|
|
4293
|
+
const u = I(() => o.status ? o.status : d < t.current.value ? "completed" : d === t.current.value ? "active" : "pending"), p = I(() => t?.icons?.[u.value]), b = I(() => a.icon ? "slot" : o.icon ? o.icon : p.value), g = I(() => {
|
|
4294
4294
|
switch (u.value) {
|
|
4295
4295
|
case "completed":
|
|
4296
4296
|
return "Stage completed";
|
|
@@ -4301,7 +4301,7 @@ const sl = {
|
|
|
4301
4301
|
default:
|
|
4302
4302
|
return "Stage pending";
|
|
4303
4303
|
}
|
|
4304
|
-
}), c =
|
|
4304
|
+
}), c = I(() => {
|
|
4305
4305
|
switch (u.value) {
|
|
4306
4306
|
case "completed":
|
|
4307
4307
|
return "success";
|
|
@@ -4312,7 +4312,7 @@ const sl = {
|
|
|
4312
4312
|
default:
|
|
4313
4313
|
return "default";
|
|
4314
4314
|
}
|
|
4315
|
-
}),
|
|
4315
|
+
}), C = I(() => o.size ?? t.size ?? "sm"), $ = I(() => {
|
|
4316
4316
|
switch (u.value) {
|
|
4317
4317
|
case "completed":
|
|
4318
4318
|
return "Completed";
|
|
@@ -4330,27 +4330,27 @@ const sl = {
|
|
|
4330
4330
|
{ immediate: !0 }
|
|
4331
4331
|
);
|
|
4332
4332
|
const L = () => {
|
|
4333
|
-
|
|
4334
|
-
|
|
4333
|
+
r == null && (r = requestAnimationFrame(() => {
|
|
4334
|
+
r = null, m();
|
|
4335
4335
|
}));
|
|
4336
|
-
},
|
|
4337
|
-
if (!
|
|
4338
|
-
const O = i.value.getBoundingClientRect(),
|
|
4339
|
-
t.registerIndicatorCenter(d,
|
|
4336
|
+
}, m = () => {
|
|
4337
|
+
if (!n.value || !i.value) return;
|
|
4338
|
+
const O = i.value.getBoundingClientRect(), k = t.stepsRef.value.getBoundingClientRect(), H = t.orientation === "vertical" ? O.top + O.height / 2 - k.top : O.left + O.width / 2 - k.left;
|
|
4339
|
+
t.registerIndicatorCenter(d, H);
|
|
4340
4340
|
}, B = (O) => {
|
|
4341
|
-
const
|
|
4341
|
+
const k = t.orientation === "horizontal", H = t.orientation === "vertical";
|
|
4342
4342
|
switch (O.key) {
|
|
4343
4343
|
case "ArrowRight":
|
|
4344
|
-
|
|
4344
|
+
k && t.focusNext();
|
|
4345
4345
|
break;
|
|
4346
4346
|
case "ArrowLeft":
|
|
4347
|
-
|
|
4347
|
+
k && t.focusPrev();
|
|
4348
4348
|
break;
|
|
4349
4349
|
case "ArrowDown":
|
|
4350
|
-
|
|
4350
|
+
H && t.focusNext();
|
|
4351
4351
|
break;
|
|
4352
4352
|
case "ArrowUp":
|
|
4353
|
-
|
|
4353
|
+
H && t.focusPrev();
|
|
4354
4354
|
break;
|
|
4355
4355
|
case "Home":
|
|
4356
4356
|
t.focusFirst();
|
|
@@ -4364,17 +4364,17 @@ const sl = {
|
|
|
4364
4364
|
O.preventDefault();
|
|
4365
4365
|
};
|
|
4366
4366
|
return ae(() => {
|
|
4367
|
-
!
|
|
4368
|
-
requestAnimationFrame(
|
|
4369
|
-
}),
|
|
4367
|
+
!n.value || !i.value || (requestAnimationFrame(() => {
|
|
4368
|
+
requestAnimationFrame(m);
|
|
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, k) => (v(), f("li", {
|
|
4375
4375
|
ref_key: "stepRef",
|
|
4376
|
-
ref:
|
|
4377
|
-
class: re(["step", `step__${
|
|
4376
|
+
ref: n,
|
|
4377
|
+
class: re(["step", `step__${C.value}`]),
|
|
4378
4378
|
role: "listitem",
|
|
4379
4379
|
"data-status": u.value,
|
|
4380
4380
|
"data-orientation": s.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) : b.value ? (v(), J(ce, {
|
|
4401
4401
|
key: 1,
|
|
4402
|
-
name:
|
|
4402
|
+
name: b.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, [...k[0] || (k[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, [...k[1] || (k[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(g.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 ye("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 = I(() => n.value ?? 0), l = `steps-description-${de()}`, d = w1({}), u = r1({});
|
|
4469
4469
|
let p = null;
|
|
4470
|
-
const
|
|
4470
|
+
const b = I(() => (a.default?.() ?? [])[r.value]?.props?.title ?? ""), g = I(() => Object.entries(u).filter(([, _]) => _ !== "completed").length === 0), c = I(
|
|
4471
4471
|
() => Object.values(u).includes("error")
|
|
4472
|
-
),
|
|
4473
|
-
const _ =
|
|
4472
|
+
), C = I(() => {
|
|
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,40 +4479,40 @@ 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
|
+
}), $ = I(() => {
|
|
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
|
-
function
|
|
4502
|
+
function m(_) {
|
|
4503
4503
|
i.value.push(_), t.value = i.value.length;
|
|
4504
4504
|
}
|
|
4505
4505
|
function B(_) {
|
|
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 k() {
|
|
4512
|
+
O(n.value + 1);
|
|
4513
4513
|
}
|
|
4514
|
-
function
|
|
4515
|
-
O(
|
|
4514
|
+
function H() {
|
|
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:
|
|
4528
|
-
update: (_) =>
|
|
4526
|
+
}), be(() => p?.disconnect()), ye("StepsContext", {
|
|
4527
|
+
current: I(() => n.value),
|
|
4528
|
+
update: (_) => n.value = _,
|
|
4529
4529
|
stepsCount: t,
|
|
4530
4530
|
icons: o.icons,
|
|
4531
4531
|
size: o.size,
|
|
@@ -4536,10 +4536,10 @@ const sl = {
|
|
|
4536
4536
|
u[_] = R;
|
|
4537
4537
|
},
|
|
4538
4538
|
registerIndicatorCenter: L,
|
|
4539
|
-
registerStep:
|
|
4539
|
+
registerStep: m,
|
|
4540
4540
|
unregisterStep: B,
|
|
4541
|
-
focusNext:
|
|
4542
|
-
focusPrev:
|
|
4541
|
+
focusNext: k,
|
|
4542
|
+
focusPrev: H,
|
|
4543
4543
|
focusFirst: D,
|
|
4544
4544
|
focusLast: V
|
|
4545
4545
|
}), (_, R) => (v(), f(te, null, [
|
|
@@ -4550,44 +4550,44 @@ 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", {
|
|
4560
4560
|
class: "track",
|
|
4561
4561
|
"aria-hidden": "true",
|
|
4562
|
-
style:
|
|
4562
|
+
style: ge($.value)
|
|
4563
4563
|
}, [
|
|
4564
4564
|
M("div", {
|
|
4565
4565
|
class: "track-progress",
|
|
4566
4566
|
"data-error": c.value,
|
|
4567
|
-
"data-completed":
|
|
4568
|
-
style:
|
|
4567
|
+
"data-completed": g.value,
|
|
4568
|
+
style: ge(C.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(b.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 ye("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 = I(() => 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,
|
|
4674
|
+
}, mn = ["aria-label", "aria-selected", "aria-current", "onClick", "onKeydown"], hn = 0.35, gn = 0.2, yn = /* @__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),
|
|
4697
|
-
let L = null,
|
|
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), b = h([]), g = h(1), c = h(o.value), C = h(null), $ = h(null);
|
|
4697
|
+
let L = null, m = null;
|
|
4698
4698
|
Y(
|
|
4699
4699
|
() => o.value,
|
|
4700
4700
|
(z) => c.value = z
|
|
4701
4701
|
);
|
|
4702
|
-
const B =
|
|
4703
|
-
const z = c.value * (100 /
|
|
4702
|
+
const B = I(() => b.value[c.value] ?? void 0), O = I(() => Math.floor(c.value / g.value)), k = I(() => Math.ceil(G.value / g.value)), H = I(() => Math.max(0, G.value - g.value)), D = I(() => {
|
|
4703
|
+
const z = c.value * (100 / g.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 / g.value), ne = k.value;
|
|
4712
|
+
j = (ie % ne + ne) % ne * g.value;
|
|
4713
4713
|
} else
|
|
4714
4714
|
j = Math.min(
|
|
4715
4715
|
Math.max(z, 0),
|
|
4716
|
-
|
|
4716
|
+
H.value
|
|
4717
4717
|
);
|
|
4718
4718
|
c.value = j, o.value = j;
|
|
4719
|
-
}, _ = () => V(c.value +
|
|
4719
|
+
}, _ = () => V(c.value + g.value), R = () => V(c.value - g.value), w = (z) => {
|
|
4720
4720
|
z.key === "ArrowRight" ? _() : z.key === "ArrowLeft" && R();
|
|
4721
|
-
}, x = (z) => (
|
|
4721
|
+
}, x = (z) => (b.value.includes(z) || b.value.push(z), b.value.indexOf(z)), E = (z) => b.value = b.value.filter((j) => j !== z), G = I(() => b.value.length), Q = () => {
|
|
4722
4722
|
!t.autoplay || L !== null || (L = window.setInterval(() => {
|
|
4723
4723
|
d.value || _();
|
|
4724
4724
|
}, t.autoplayDelay));
|
|
@@ -4732,48 +4732,48 @@ const sl = {
|
|
|
4732
4732
|
for (const [ne, ke] of j) z >= ne && (ie = ke);
|
|
4733
4733
|
return ie;
|
|
4734
4734
|
}, y = (z) => {
|
|
4735
|
-
z.button === 0 && (u.value = !0,
|
|
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 / g.value, ie = i.value / j;
|
|
4744
|
+
Math.abs(r.value) > hn ? r.value < 0 ? _() : R() : Math.abs(ie) > gn ? ie < 0 ? _() : R() : V(p.value), i.value = 0, r.value = 0, Q();
|
|
4745
4745
|
};
|
|
4746
4746
|
return ae(() => {
|
|
4747
|
-
Q(),
|
|
4747
|
+
Q(), C.value && (m = new ResizeObserver((z) => {
|
|
4748
4748
|
const j = z[0]?.contentRect.width;
|
|
4749
|
-
j !== void 0 && (
|
|
4750
|
-
}),
|
|
4751
|
-
}),
|
|
4752
|
-
oe(),
|
|
4749
|
+
j !== void 0 && (g.value = Z(j));
|
|
4750
|
+
}), m.observe(C.value));
|
|
4751
|
+
}), be(() => {
|
|
4752
|
+
oe(), m?.disconnect();
|
|
4753
4753
|
}), Y(
|
|
4754
4754
|
() => t.autoplay,
|
|
4755
4755
|
(z) => {
|
|
4756
4756
|
z ? Q() : oe();
|
|
4757
4757
|
},
|
|
4758
4758
|
{ immediate: !0 }
|
|
4759
|
-
), Y(
|
|
4759
|
+
), Y(g, () => c.value = Math.min(c.value, H.value)), ye("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 ? g : h(t.itemsPerView)
|
|
4766
4766
|
}), (z, j) => (v(), f("div", {
|
|
4767
4767
|
ref_key: "rootRef",
|
|
4768
|
-
ref:
|
|
4768
|
+
ref: C,
|
|
4769
4769
|
role: "region",
|
|
4770
4770
|
class: "carousel",
|
|
4771
4771
|
"aria-roledescription": "carousel",
|
|
4772
4772
|
"aria-label": e.ariaLabel,
|
|
4773
4773
|
tabindex: "0",
|
|
4774
4774
|
"aria-activedescendant": B.value,
|
|
4775
|
-
style:
|
|
4776
|
-
onKeydown:
|
|
4775
|
+
style: ge({ "--items-per-view": g.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),
|
|
@@ -4788,16 +4788,16 @@ const sl = {
|
|
|
4788
4788
|
ref_key: "trackRef",
|
|
4789
4789
|
ref: $,
|
|
4790
4790
|
class: "carousel-track",
|
|
4791
|
-
style:
|
|
4791
|
+
style: ge(D.value),
|
|
4792
4792
|
onPointerdown: y,
|
|
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 / g.value) + 1) + " of " + N(k.value), 1),
|
|
4801
4801
|
M("button", {
|
|
4802
4802
|
type: "button",
|
|
4803
4803
|
class: "carousel-control prev",
|
|
@@ -4815,42 +4815,42 @@ 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(k.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 / g.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 * g.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 + k.value) % k.value * g.value), ["prevent"]), ["left"]),
|
|
4829
|
+
ve(le((ke) => V((ne + 1) % k.value * g.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(yn, [["__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 = I(() => Math.abs(o.deltaX.value) > 5), i = I(() => 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
|
-
}), hl = /* @__PURE__ */ K(kn, [["__scopeId", "data-v-a569d055"]]), De = /* @__PURE__ */ Symbol("TabsContext"),
|
|
4853
|
+
}), hl = /* @__PURE__ */ K(kn, [["__scopeId", "data-v-a569d055"]]), De = /* @__PURE__ */ Symbol("TabsContext"), gl = T({
|
|
4854
4854
|
name: "Tabs",
|
|
4855
4855
|
props: {
|
|
4856
4856
|
modelValue: String,
|
|
@@ -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,55 +4879,55 @@ const sl = {
|
|
|
4879
4879
|
), Y(i, (c) => {
|
|
4880
4880
|
!a.value && c.length && (a.value = c[0]);
|
|
4881
4881
|
});
|
|
4882
|
-
const
|
|
4883
|
-
const
|
|
4884
|
-
if (!
|
|
4882
|
+
const l = (c, C) => i.value[C] = c, d = (c) => {
|
|
4883
|
+
const C = i.value.filter(Boolean);
|
|
4884
|
+
if (!C.length) return;
|
|
4885
4885
|
const $ = a.value;
|
|
4886
4886
|
if (!$) {
|
|
4887
4887
|
a.value = c, o("update:modelValue", c);
|
|
4888
4888
|
return;
|
|
4889
4889
|
}
|
|
4890
|
-
const L =
|
|
4891
|
-
if (L === -1 ||
|
|
4890
|
+
const L = C.indexOf($), m = C.indexOf(c);
|
|
4891
|
+
if (L === -1 || m === -1) {
|
|
4892
4892
|
a.value = c, o("update:modelValue", c);
|
|
4893
4893
|
return;
|
|
4894
4894
|
}
|
|
4895
|
-
L !== -1 &&
|
|
4896
|
-
}, u =
|
|
4897
|
-
c instanceof HTMLElement &&
|
|
4898
|
-
},
|
|
4899
|
-
if (c instanceof HTMLElement &&
|
|
4900
|
-
const
|
|
4895
|
+
L !== -1 && m !== -1 && (s.value = m > L ? "forward" : "backward"), $ !== c && (a.value = c, o("update:modelValue", c));
|
|
4896
|
+
}, u = I(() => s.value === "forward" ? "tab-slide-forward" : "tab-slide-backward"), p = (c) => {
|
|
4897
|
+
c instanceof HTMLElement && r.value && (r.value.style.height = `${c.offsetHeight}px`);
|
|
4898
|
+
}, b = (c) => {
|
|
4899
|
+
if (c instanceof HTMLElement && r.value) {
|
|
4900
|
+
const C = c.offsetHeight;
|
|
4901
4901
|
requestAnimationFrame(() => {
|
|
4902
|
-
|
|
4902
|
+
r.value && (r.value.style.height = `${C}px`);
|
|
4903
4903
|
});
|
|
4904
4904
|
}
|
|
4905
|
-
},
|
|
4906
|
-
|
|
4905
|
+
}, g = () => {
|
|
4906
|
+
r.value && (r.value.style.height = "");
|
|
4907
4907
|
};
|
|
4908
|
-
return
|
|
4908
|
+
return ye(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
|
-
const c = t.default?.() || [],
|
|
4920
|
-
c.forEach((
|
|
4921
|
-
|
|
4919
|
+
const c = t.default?.() || [], C = [], $ = [];
|
|
4920
|
+
c.forEach((m) => {
|
|
4921
|
+
m.type?.name === "TabsContent" ? $.push(m) : C.push(m);
|
|
4922
4922
|
});
|
|
4923
|
-
const L = $.find((
|
|
4923
|
+
const L = $.find((m) => m.props?.value === a.value);
|
|
4924
4924
|
return [
|
|
4925
|
-
...
|
|
4925
|
+
...C,
|
|
4926
4926
|
F(
|
|
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: b,
|
|
4939
|
+
onAfterEnter: g
|
|
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
|
+
}), yl = 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 =
|
|
4984
|
+
const a = I(() => 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 b = l[u];
|
|
5012
|
+
t.activationMode.value === "auto" && t.setValue(b), requestAnimationFrame(() => {
|
|
5013
|
+
document.getElementById(`tab-${b}`)?.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,43 +5056,43 @@ 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,
|
|
5061
|
-
}, u = () => t.value = !t.value, p = (
|
|
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
|
+
}, u = () => t.value = !t.value, p = (m) => {
|
|
5062
5062
|
const B = `dropdown-item-${o++}`;
|
|
5063
|
-
return
|
|
5064
|
-
},
|
|
5065
|
-
const B =
|
|
5063
|
+
return n.value[B] = m, B;
|
|
5064
|
+
}, b = (m) => {
|
|
5065
|
+
const B = n.value[m];
|
|
5066
5066
|
B && B.focus();
|
|
5067
|
-
},
|
|
5068
|
-
const
|
|
5069
|
-
|
|
5067
|
+
}, g = () => {
|
|
5068
|
+
const m = Object.keys(n.value)[0];
|
|
5069
|
+
m && b(m);
|
|
5070
5070
|
}, c = () => {
|
|
5071
|
-
const
|
|
5072
|
-
B &&
|
|
5073
|
-
},
|
|
5074
|
-
const B = Object.keys(
|
|
5075
|
-
O >= 0 && O < B.length - 1 &&
|
|
5076
|
-
}, $ = (
|
|
5077
|
-
const B = Object.keys(
|
|
5078
|
-
O > 0 &&
|
|
5079
|
-
}, L = (
|
|
5080
|
-
return
|
|
5081
|
-
open:
|
|
5071
|
+
const m = Object.keys(n.value), B = m[m.length - 1];
|
|
5072
|
+
B && b(B);
|
|
5073
|
+
}, C = (m) => {
|
|
5074
|
+
const B = Object.keys(n.value), O = L(m), k = B[O + 1];
|
|
5075
|
+
O >= 0 && O < B.length - 1 && k && b(k);
|
|
5076
|
+
}, $ = (m) => {
|
|
5077
|
+
const B = Object.keys(n.value), O = L(m), k = B[O - 1];
|
|
5078
|
+
O > 0 && k && b(k);
|
|
5079
|
+
}, L = (m) => Object.keys(n.value).indexOf(m);
|
|
5080
|
+
return ye("DropdownContext", {
|
|
5081
|
+
open: l,
|
|
5082
5082
|
close: d,
|
|
5083
5083
|
toggle: u,
|
|
5084
5084
|
isOpen: t,
|
|
5085
5085
|
registerItem: p,
|
|
5086
|
-
focusItem:
|
|
5087
|
-
focusNextItem:
|
|
5086
|
+
focusItem: b,
|
|
5087
|
+
focusNextItem: C,
|
|
5088
5088
|
focusPrevItem: $,
|
|
5089
|
-
focusFirstItem:
|
|
5089
|
+
focusFirstItem: g,
|
|
5090
5090
|
focusLastItem: c,
|
|
5091
5091
|
triggerRef: a,
|
|
5092
5092
|
menuId: s,
|
|
5093
|
-
triggerId:
|
|
5094
|
-
}), (
|
|
5095
|
-
U(
|
|
5093
|
+
triggerId: r
|
|
5094
|
+
}), (m, B) => (v(), f("div", wn, [
|
|
5095
|
+
U(m.$slots, "default")
|
|
5096
5096
|
]));
|
|
5097
5097
|
}
|
|
5098
5098
|
}), Mn = /* @__PURE__ */ T({
|
|
@@ -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,57 +5132,63 @@ 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 = 16, u = r.getBoundingClientRect(), p = l.getBoundingClientRect();
|
|
5142
|
+
let b = u.bottom, g = u.left;
|
|
5143
|
+
g = Math.min(
|
|
5144
|
+
Math.max(d, g),
|
|
5145
|
+
window.innerWidth - p.width - d
|
|
5146
|
+
);
|
|
5147
|
+
const c = window.innerHeight - u.bottom, C = u.top;
|
|
5148
|
+
c < p.height && C > p.height && (b = u.top - p.height), b = Math.min(
|
|
5149
|
+
Math.max(d, b),
|
|
5150
|
+
window.innerHeight - p.height - d
|
|
5151
|
+
), a.value = {
|
|
5143
5152
|
"--dropdown-menu-position": "fixed",
|
|
5144
|
-
"--dropdown-menu-top": `${
|
|
5145
|
-
"--dropdown-menu-left": `${
|
|
5153
|
+
"--dropdown-menu-top": `${b}px`,
|
|
5154
|
+
"--dropdown-menu-left": `${g}px`
|
|
5146
5155
|
};
|
|
5147
5156
|
};
|
|
5148
5157
|
return Y(
|
|
5149
5158
|
() => 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);
|
|
5159
|
+
(r) => {
|
|
5160
|
+
r ? (requestAnimationFrame(() => {
|
|
5161
|
+
s(), o.focusFirstItem();
|
|
5162
|
+
}), document.addEventListener("pointerdown", n, !0)) : document.removeEventListener("pointerdown", n, !0);
|
|
5157
5163
|
}
|
|
5158
5164
|
), ae(() => {
|
|
5159
5165
|
window.addEventListener("scroll", s, !0), window.addEventListener("resize", s);
|
|
5160
|
-
}),
|
|
5166
|
+
}), be(() => {
|
|
5161
5167
|
window.removeEventListener("scroll", s, !0), window.removeEventListener("resize", s);
|
|
5162
|
-
}), (
|
|
5168
|
+
}), (r, l) => (v(), J(Ie, { to: "body" }, [
|
|
5163
5169
|
S(o).isOpen.value ? (v(), f("div", {
|
|
5164
5170
|
key: 0,
|
|
5165
5171
|
role: "menu",
|
|
5166
5172
|
ref_key: "menuRef",
|
|
5167
5173
|
ref: t,
|
|
5168
|
-
style:
|
|
5174
|
+
style: ge(a.value),
|
|
5169
5175
|
id: S(o).menuId,
|
|
5170
5176
|
"aria-orientation": "vertical",
|
|
5171
5177
|
"aria-labelledby": S(o).triggerId,
|
|
5172
5178
|
class: "ui-dropdown-menu",
|
|
5173
5179
|
onKeydown: i
|
|
5174
5180
|
}, [
|
|
5175
|
-
U(
|
|
5181
|
+
U(r.$slots, "default", {}, void 0, !0)
|
|
5176
5182
|
], 44, Ln)) : q("", !0)
|
|
5177
5183
|
]));
|
|
5178
5184
|
}
|
|
5179
|
-
}), Ll = /* @__PURE__ */ K(xn, [["__scopeId", "data-v-
|
|
5185
|
+
}), Ll = /* @__PURE__ */ K(xn, [["__scopeId", "data-v-acff21c3"]]), $n = /* @__PURE__ */ T({
|
|
5180
5186
|
__name: "DropdownItem",
|
|
5181
5187
|
setup(e) {
|
|
5182
5188
|
const o = se("DropdownContext");
|
|
5183
5189
|
if (!o) throw new Error("DropdownItem must be used within a Dropdown");
|
|
5184
5190
|
let t;
|
|
5185
|
-
const a = h(),
|
|
5191
|
+
const a = h(), n = (i) => {
|
|
5186
5192
|
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
5193
|
};
|
|
5188
5194
|
return ae(() => t = o.registerItem(a.value)), (i, s) => (v(), f("div", {
|
|
@@ -5191,40 +5197,40 @@ const sl = {
|
|
|
5191
5197
|
role: "menuitem",
|
|
5192
5198
|
class: "ui-dropdown-item",
|
|
5193
5199
|
tabindex: "-1",
|
|
5194
|
-
onKeydown:
|
|
5200
|
+
onKeydown: n,
|
|
5195
5201
|
onClick: s[0] || (s[0] = //@ts-ignore
|
|
5196
|
-
(...
|
|
5197
|
-
onPointerenter: s[1] || (s[1] = (
|
|
5202
|
+
(...r) => S(o).close && S(o).close(...r)),
|
|
5203
|
+
onPointerenter: s[1] || (s[1] = (r) => a.value?.focus())
|
|
5198
5204
|
}, [
|
|
5199
5205
|
U(i.$slots, "default", {}, void 0, !0)
|
|
5200
5206
|
], 544));
|
|
5201
5207
|
}
|
|
5202
5208
|
}), 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
|
-
}),
|
|
5207
|
-
const
|
|
5208
|
-
return Array.from({ length: 7 }).map((
|
|
5209
|
-
const
|
|
5210
|
-
return
|
|
5209
|
+
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 = I(() => {
|
|
5210
|
+
const b = new Intl.DateTimeFormat(t, { month: "long", year: "numeric" }).format(n.value);
|
|
5211
|
+
return b.charAt(0).toUpperCase() + b.slice(1);
|
|
5212
|
+
}), r = I(() => {
|
|
5213
|
+
const b = new Date(2021, 5, 6);
|
|
5214
|
+
return Array.from({ length: 7 }).map((g, c) => {
|
|
5215
|
+
const C = new Date(b);
|
|
5216
|
+
return C.setDate(b.getDate() + (c + i) % 7), new Intl.DateTimeFormat(t, { weekday: "short" }).format(C).replace(".", "");
|
|
5211
5217
|
});
|
|
5212
|
-
}),
|
|
5213
|
-
const
|
|
5214
|
-
for (let B = 0; B < $; B++)
|
|
5215
|
-
for (let B = 1; B <= L; B++)
|
|
5216
|
-
return
|
|
5218
|
+
}), l = I(() => {
|
|
5219
|
+
const b = n.value.getFullYear(), g = n.value.getMonth(), c = new Date(b, g, 1), C = new Date(b, g + 1, 0), $ = (c.getDay() - i + 7) % 7, L = C.getDate(), m = [];
|
|
5220
|
+
for (let B = 0; B < $; B++) m.push(null);
|
|
5221
|
+
for (let B = 1; B <= L; B++) m.push(new Date(b, g, B));
|
|
5222
|
+
return m;
|
|
5217
5223
|
});
|
|
5218
5224
|
return {
|
|
5219
5225
|
today: o,
|
|
5220
5226
|
selected: a,
|
|
5221
|
-
currentMonth:
|
|
5227
|
+
currentMonth: n,
|
|
5222
5228
|
monthLabel: s,
|
|
5223
|
-
weekDays:
|
|
5224
|
-
days:
|
|
5225
|
-
nextMonth: () =>
|
|
5226
|
-
prevMonth: () =>
|
|
5227
|
-
select: (
|
|
5229
|
+
weekDays: r,
|
|
5230
|
+
days: l,
|
|
5231
|
+
nextMonth: () => n.value = new Date(n.value.getFullYear(), n.value.getMonth() + 1, 1),
|
|
5232
|
+
prevMonth: () => n.value = new Date(n.value.getFullYear(), n.value.getMonth() - 1, 1),
|
|
5233
|
+
select: (b) => a.value = b
|
|
5228
5234
|
};
|
|
5229
5235
|
}, m1 = /(DD|MM|YYYY|HH|mm|ss)/g, Ee = (e, o) => {
|
|
5230
5236
|
const t = {
|
|
@@ -5237,31 +5243,31 @@ const sl = {
|
|
|
5237
5243
|
};
|
|
5238
5244
|
return o.replace(/DD|MM|YYYY|HH|mm|ss/g, (a) => t[a]);
|
|
5239
5245
|
}, 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
|
|
5246
|
+
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);
|
|
5247
|
+
if (!n?.groups) return null;
|
|
5248
|
+
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);
|
|
5249
|
+
return Hn(i, s, r) ? new Date(r, s - 1, i, l, d, u, 0) : null;
|
|
5244
5250
|
};
|
|
5245
|
-
function
|
|
5246
|
-
if (!Number.isInteger(e) || !Number.isInteger(o) || !Number.isInteger(t) || o < 1 || o > 12 || t < a || t >
|
|
5251
|
+
function Hn(e, o, t, a = 1900, n = 2100) {
|
|
5252
|
+
if (!Number.isInteger(e) || !Number.isInteger(o) || !Number.isInteger(t) || o < 1 || o > 12 || t < a || t > n) return !1;
|
|
5247
5253
|
const i = new Date(t, o, 0).getDate();
|
|
5248
5254
|
if (e < 1 || e > i) return !1;
|
|
5249
5255
|
const s = new Date(t, o - 1, e);
|
|
5250
5256
|
return s.getFullYear() === t && s.getMonth() === o - 1 && s.getDate() === e;
|
|
5251
5257
|
}
|
|
5252
|
-
const
|
|
5258
|
+
const In = (e, o) => {
|
|
5253
5259
|
const t = e.replace(/\D/g, ""), a = o.match(m1);
|
|
5254
5260
|
if (!a) return e;
|
|
5255
|
-
let
|
|
5261
|
+
let n = "", i = 0;
|
|
5256
5262
|
for (const s of a) {
|
|
5257
|
-
const
|
|
5258
|
-
if (!
|
|
5259
|
-
if (
|
|
5263
|
+
const r = s.length, l = t.slice(i, i + r);
|
|
5264
|
+
if (!l) break;
|
|
5265
|
+
if (n += l, i += l.length, i < t.length) {
|
|
5260
5266
|
const d = o.indexOf(s) + s.length, u = o[d];
|
|
5261
|
-
u && !u.match(/[DMYHms]/) && (
|
|
5267
|
+
u && !u.match(/[DMYHms]/) && (n += u);
|
|
5262
5268
|
}
|
|
5263
5269
|
}
|
|
5264
|
-
return
|
|
5270
|
+
return n;
|
|
5265
5271
|
}, Bn = (e) => {
|
|
5266
5272
|
const o = e.match(m1);
|
|
5267
5273
|
return o ? o.reduce((t, a) => t + a.length, 0) : 0;
|
|
@@ -5288,27 +5294,27 @@ const Hn = (e, o) => {
|
|
|
5288
5294
|
}),
|
|
5289
5295
|
emits: /* @__PURE__ */ ee(["update:open"], ["update:modelValue"]),
|
|
5290
5296
|
setup(e, { emit: o }) {
|
|
5291
|
-
const t = fe(e, "modelValue"), a = o,
|
|
5297
|
+
const t = fe(e, "modelValue"), a = o, n = e, i = h(!1), s = h(""), r = h(null), l = h(null), {
|
|
5292
5298
|
monthLabel: d,
|
|
5293
5299
|
weekDays: u,
|
|
5294
5300
|
currentMonth: p,
|
|
5295
|
-
days:
|
|
5296
|
-
nextMonth:
|
|
5301
|
+
days: b,
|
|
5302
|
+
nextMonth: g,
|
|
5297
5303
|
prevMonth: c,
|
|
5298
|
-
select:
|
|
5304
|
+
select: C
|
|
5299
5305
|
} = Vn({
|
|
5300
5306
|
modelValue: t.value,
|
|
5301
|
-
locale:
|
|
5302
|
-
firstDayOfWeek:
|
|
5307
|
+
locale: n.locale,
|
|
5308
|
+
firstDayOfWeek: n.firstDayOfWeek
|
|
5303
5309
|
});
|
|
5304
5310
|
Y(
|
|
5305
5311
|
() => t.value,
|
|
5306
5312
|
(V) => {
|
|
5307
5313
|
if (!V) {
|
|
5308
|
-
s.value = "",
|
|
5314
|
+
s.value = "", l.value = null;
|
|
5309
5315
|
return;
|
|
5310
5316
|
}
|
|
5311
|
-
|
|
5317
|
+
C(V), p.value = new Date(V), l.value = V, s.value = Ee(V, n.format);
|
|
5312
5318
|
},
|
|
5313
5319
|
{ immediate: !0 }
|
|
5314
5320
|
), Y(
|
|
@@ -5316,25 +5322,25 @@ const Hn = (e, o) => {
|
|
|
5316
5322
|
async (V) => {
|
|
5317
5323
|
if (V) {
|
|
5318
5324
|
await we();
|
|
5319
|
-
let _ =
|
|
5325
|
+
let _ = r.value?.querySelector('button[data-selected="true"]');
|
|
5320
5326
|
if (!_) {
|
|
5321
5327
|
const R = /* @__PURE__ */ new Date();
|
|
5322
|
-
_ = Array.from(
|
|
5328
|
+
_ = Array.from(r.value?.querySelectorAll("button") || []).find((w) => Number(w.textContent) === R.getDate() && !w.disabled);
|
|
5323
5329
|
}
|
|
5324
|
-
_ && _.focus(), document.addEventListener("keydown",
|
|
5325
|
-
} else document.removeEventListener("keydown",
|
|
5330
|
+
_ && _.focus(), document.addEventListener("keydown", m);
|
|
5331
|
+
} else document.removeEventListener("keydown", m);
|
|
5326
5332
|
}
|
|
5327
5333
|
);
|
|
5328
5334
|
const $ = (V) => {
|
|
5329
|
-
|
|
5330
|
-
}, L = (V) => !V || !
|
|
5335
|
+
l.value = V, t.value = V, s.value = Ee(V, n.format), C(V), i.value = !1;
|
|
5336
|
+
}, L = (V) => !V || !l.value ? "" : V.toDateString() === l.value.toDateString() ? "dp-selected" : "", m = (V) => V.key === "Escape" && (i.value = !1), B = (V) => {
|
|
5331
5337
|
V.key === "Backspace" || V.key === "Delete" || V.key === "ArrowLeft" || V.key === "ArrowRight" || V.key === "Tab" || /[0-9]/.test(V.key) || V.preventDefault();
|
|
5332
5338
|
}, O = (V) => {
|
|
5333
5339
|
const _ = V.target, R = _.selectionStart ?? 0, x = _.value.slice(0, R).replace(/\D/g, "").length;
|
|
5334
5340
|
let E = _.value.replace(/\D/g, "");
|
|
5335
|
-
const
|
|
5336
|
-
E = E.slice(0,
|
|
5337
|
-
const Q =
|
|
5341
|
+
const G = Bn(n.format);
|
|
5342
|
+
E = E.slice(0, G);
|
|
5343
|
+
const Q = In(E, n.format);
|
|
5338
5344
|
s.value = Q, _.value = Q;
|
|
5339
5345
|
let oe = 0, Z = 0;
|
|
5340
5346
|
for (let A = 0; A < Q.length; A++)
|
|
@@ -5343,19 +5349,19 @@ const Hn = (e, o) => {
|
|
|
5343
5349
|
break;
|
|
5344
5350
|
}
|
|
5345
5351
|
requestAnimationFrame(() => _.setSelectionRange(oe, oe));
|
|
5346
|
-
const y = l1(Q,
|
|
5347
|
-
y && (
|
|
5348
|
-
},
|
|
5352
|
+
const y = l1(Q, n.format);
|
|
5353
|
+
y && (l.value = y, t.value = y);
|
|
5354
|
+
}, k = () => {
|
|
5349
5355
|
i.value || (i.value = !0, a("update:open", !0));
|
|
5350
|
-
},
|
|
5351
|
-
|
|
5356
|
+
}, H = (V) => {
|
|
5357
|
+
r.value && (r.value.contains(V.target) || (i.value = !1, a("update:open", !1)));
|
|
5352
5358
|
}, D = () => {
|
|
5353
|
-
const V = l1(s.value,
|
|
5354
|
-
!V && !
|
|
5359
|
+
const V = l1(s.value, n.format);
|
|
5360
|
+
!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
5361
|
};
|
|
5356
|
-
return ae(() => document.addEventListener("mousedown",
|
|
5362
|
+
return ae(() => document.addEventListener("mousedown", H)), He(() => document.removeEventListener("mousedown", H)), (V, _) => (v(), f("div", {
|
|
5357
5363
|
ref_key: "root",
|
|
5358
|
-
ref:
|
|
5364
|
+
ref: r,
|
|
5359
5365
|
class: re(["dp", { required: Object.keys(V.$attrs).includes("required") }])
|
|
5360
5366
|
}, [
|
|
5361
5367
|
M("label", {
|
|
@@ -5369,9 +5375,9 @@ const Hn = (e, o) => {
|
|
|
5369
5375
|
onBlur: D,
|
|
5370
5376
|
onInput: O,
|
|
5371
5377
|
onKeydown: B,
|
|
5372
|
-
onMousedown:
|
|
5378
|
+
onMousedown: k,
|
|
5373
5379
|
required: Object.keys(V.$attrs).includes("required") || void 0,
|
|
5374
|
-
"aria-invalid": !
|
|
5380
|
+
"aria-invalid": !l.value && s.value !== "",
|
|
5375
5381
|
disabled: e.disabled ? !0 : void 0,
|
|
5376
5382
|
"data-disabled": e.disabled ? !0 : void 0,
|
|
5377
5383
|
"aria-describedby": "time-help",
|
|
@@ -5382,7 +5388,7 @@ const Hn = (e, o) => {
|
|
|
5382
5388
|
P(he, {
|
|
5383
5389
|
type: "button",
|
|
5384
5390
|
class: "btn-icon",
|
|
5385
|
-
onClick:
|
|
5391
|
+
onClick: k,
|
|
5386
5392
|
disabled: e.disabled || void 0
|
|
5387
5393
|
}, {
|
|
5388
5394
|
default: W(() => [
|
|
@@ -5405,7 +5411,7 @@ const Hn = (e, o) => {
|
|
|
5405
5411
|
M("span", Sn, N(S(d)), 1),
|
|
5406
5412
|
M("button", {
|
|
5407
5413
|
onClick: _[1] || (_[1] = //@ts-ignore
|
|
5408
|
-
(...R) => S(
|
|
5414
|
+
(...R) => S(g) && S(g)(...R)),
|
|
5409
5415
|
class: "btn__next_month",
|
|
5410
5416
|
"aria-label": "Next month"
|
|
5411
5417
|
}, "›")
|
|
@@ -5417,8 +5423,8 @@ const Hn = (e, o) => {
|
|
|
5417
5423
|
}, N(R), 1))), 128))
|
|
5418
5424
|
]),
|
|
5419
5425
|
M("div", Zn, [
|
|
5420
|
-
(v(!0), f(te, null, ue(S(
|
|
5421
|
-
key:
|
|
5426
|
+
(v(!0), f(te, null, ue(S(b), (R, w) => (v(), f("button", {
|
|
5427
|
+
key: w,
|
|
5422
5428
|
type: "button",
|
|
5423
5429
|
role: "gridcell",
|
|
5424
5430
|
class: re(["btn__day", L(R)]),
|
|
@@ -5426,7 +5432,7 @@ const Hn = (e, o) => {
|
|
|
5426
5432
|
"aria-pressed": L(R) === "dp-selected",
|
|
5427
5433
|
"data-selected": R && L(R) === "dp-selected",
|
|
5428
5434
|
onMousedown: le((x) => R && $(R), ["prevent"]),
|
|
5429
|
-
"aria-label": R ? R.toLocaleDateString(
|
|
5435
|
+
"aria-label": R ? R.toLocaleDateString(n.locale, { weekday: "long", year: "numeric", month: "long", day: "numeric" }) : ""
|
|
5430
5436
|
}, N(R?.getDate()), 43, En))), 128))
|
|
5431
5437
|
]),
|
|
5432
5438
|
P(he, {
|
|
@@ -5466,51 +5472,51 @@ const Hn = (e, o) => {
|
|
|
5466
5472
|
}),
|
|
5467
5473
|
emits: ["update:modelValue"],
|
|
5468
5474
|
setup(e) {
|
|
5469
|
-
const o = fe(e, "modelValue"), t = e, a = de(),
|
|
5475
|
+
const o = fe(e, "modelValue"), t = e, a = de(), n = h(!1), i = h(null), s = I(() => t.format.includes("HH")), r = I(() => t.format.includes("mm")), l = I(() => 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)), b = h(o.value?.getSeconds() ?? (l.value ? 0 : void 0));
|
|
5470
5476
|
Y(o, (L) => {
|
|
5471
5477
|
if (L) {
|
|
5472
|
-
const
|
|
5473
|
-
d.value =
|
|
5478
|
+
const m = new Date(L);
|
|
5479
|
+
d.value = m, u.value = m.getHours(), p.value = m.getMinutes(), b.value = m.getSeconds();
|
|
5474
5480
|
} else
|
|
5475
|
-
d.value = null, u.value = 0, p.value = 0,
|
|
5481
|
+
d.value = null, u.value = 0, p.value = 0, b.value = 0;
|
|
5476
5482
|
}, { immediate: !0 }), Y(d, (L) => {
|
|
5477
5483
|
if (!L) return;
|
|
5478
|
-
const
|
|
5479
|
-
|
|
5480
|
-
}, { immediate: !0 }), Y([d, u, p,
|
|
5484
|
+
const m = L.getHours(), B = L.getMinutes(), O = L.getSeconds();
|
|
5485
|
+
m !== u.value && (u.value = m), B !== p.value && (p.value = B), O !== b.value && (b.value = O);
|
|
5486
|
+
}, { immediate: !0 }), Y([d, u, p, b], () => {
|
|
5481
5487
|
if (!d.value) {
|
|
5482
5488
|
o.value = null;
|
|
5483
5489
|
return;
|
|
5484
5490
|
}
|
|
5485
|
-
const L = Math.min(Math.max(u.value ?? 0, 0), 23),
|
|
5486
|
-
O.setHours(L,
|
|
5491
|
+
const L = Math.min(Math.max(u.value ?? 0, 0), 23), m = Math.min(Math.max(p.value ?? 0, 0), 59), B = Math.min(Math.max(b.value ?? 0, 0), 59), O = new Date(d.value);
|
|
5492
|
+
O.setHours(L, m, B, 0), (!o.value || o.value.getTime() !== O.getTime()) && (o.value = O);
|
|
5487
5493
|
});
|
|
5488
|
-
const
|
|
5489
|
-
i.value && (i.value.contains(L.target) || (
|
|
5494
|
+
const g = (L) => {
|
|
5495
|
+
i.value && (i.value.contains(L.target) || (n.value = !1));
|
|
5490
5496
|
}, c = (L) => {
|
|
5491
|
-
const
|
|
5492
|
-
isNaN(
|
|
5493
|
-
},
|
|
5494
|
-
const
|
|
5495
|
-
isNaN(
|
|
5497
|
+
const m = Number(L.target.value);
|
|
5498
|
+
isNaN(m) || m < 0 ? u.value = 0 : m > 23 ? u.value = 23 : u.value = m;
|
|
5499
|
+
}, C = (L) => {
|
|
5500
|
+
const m = Number(L.target.value);
|
|
5501
|
+
isNaN(m) || m < 0 ? p.value = 0 : m > 59 ? p.value = 59 : p.value = m;
|
|
5496
5502
|
}, $ = (L) => {
|
|
5497
|
-
const
|
|
5498
|
-
isNaN(
|
|
5503
|
+
const m = Number(L.target.value);
|
|
5504
|
+
isNaN(m) || m < 0 ? b.value = 0 : m > 59 ? b.value = 59 : b.value = m;
|
|
5499
5505
|
};
|
|
5500
5506
|
return ae(() => {
|
|
5501
|
-
document.addEventListener("mousedown",
|
|
5502
|
-
}),
|
|
5503
|
-
document.removeEventListener("mousedown",
|
|
5504
|
-
}), (L,
|
|
5507
|
+
document.addEventListener("mousedown", g);
|
|
5508
|
+
}), He(() => {
|
|
5509
|
+
document.removeEventListener("mousedown", g);
|
|
5510
|
+
}), (L, m) => (v(), f("div", {
|
|
5505
5511
|
class: "dtp",
|
|
5506
5512
|
ref_key: "root",
|
|
5507
5513
|
ref: i
|
|
5508
5514
|
}, [
|
|
5509
5515
|
P(On, {
|
|
5510
5516
|
modelValue: d.value,
|
|
5511
|
-
"onUpdate:modelValue":
|
|
5512
|
-
open:
|
|
5513
|
-
"onUpdate:open":
|
|
5517
|
+
"onUpdate:modelValue": m[3] || (m[3] = (B) => d.value = B),
|
|
5518
|
+
open: n.value,
|
|
5519
|
+
"onUpdate:open": m[4] || (m[4] = (B) => n.value = B),
|
|
5514
5520
|
locale: e.locale,
|
|
5515
5521
|
format: e.format,
|
|
5516
5522
|
label: e.label,
|
|
@@ -5518,12 +5524,12 @@ const Hn = (e, o) => {
|
|
|
5518
5524
|
placeholder: e.placeholder
|
|
5519
5525
|
}, {
|
|
5520
5526
|
time: W(() => [
|
|
5521
|
-
|
|
5527
|
+
n.value ? (v(), f("div", qn, [
|
|
5522
5528
|
s.value ? Me((v(), f("input", {
|
|
5523
5529
|
key: 0,
|
|
5524
5530
|
id: `hour_${S(a)}`,
|
|
5525
5531
|
type: "number",
|
|
5526
|
-
"onUpdate:modelValue":
|
|
5532
|
+
"onUpdate:modelValue": m[0] || (m[0] = (B) => u.value = B),
|
|
5527
5533
|
min: "0",
|
|
5528
5534
|
max: "23",
|
|
5529
5535
|
"aria-label": "Hour",
|
|
@@ -5539,19 +5545,19 @@ const Hn = (e, o) => {
|
|
|
5539
5545
|
{ number: !0 }
|
|
5540
5546
|
]
|
|
5541
5547
|
]) : q("", !0),
|
|
5542
|
-
s.value &&
|
|
5543
|
-
|
|
5548
|
+
s.value && r.value ? (v(), f("span", Fn, ":")) : q("", !0),
|
|
5549
|
+
r.value ? Me((v(), f("input", {
|
|
5544
5550
|
key: 2,
|
|
5545
5551
|
id: `minute_${S(a)}`,
|
|
5546
5552
|
type: "number",
|
|
5547
|
-
"onUpdate:modelValue":
|
|
5553
|
+
"onUpdate:modelValue": m[1] || (m[1] = (B) => p.value = B),
|
|
5548
5554
|
min: "0",
|
|
5549
5555
|
max: "59",
|
|
5550
5556
|
"aria-label": "Minute",
|
|
5551
5557
|
"aria-valuemin": "0",
|
|
5552
5558
|
"aria-valuemax": "59",
|
|
5553
5559
|
"aria-valuenow": p.value,
|
|
5554
|
-
onInput:
|
|
5560
|
+
onInput: C
|
|
5555
5561
|
}, null, 40, Pn)), [
|
|
5556
5562
|
[
|
|
5557
5563
|
Ae,
|
|
@@ -5560,23 +5566,23 @@ const Hn = (e, o) => {
|
|
|
5560
5566
|
{ number: !0 }
|
|
5561
5567
|
]
|
|
5562
5568
|
]) : q("", !0),
|
|
5563
|
-
(s.value ||
|
|
5564
|
-
|
|
5569
|
+
(s.value || r.value) && l.value ? (v(), f("span", Kn, ":")) : q("", !0),
|
|
5570
|
+
l.value ? Me((v(), f("input", {
|
|
5565
5571
|
key: 4,
|
|
5566
5572
|
id: `second_${S(a)}`,
|
|
5567
5573
|
type: "number",
|
|
5568
|
-
"onUpdate:modelValue":
|
|
5574
|
+
"onUpdate:modelValue": m[2] || (m[2] = (B) => b.value = B),
|
|
5569
5575
|
min: "0",
|
|
5570
5576
|
max: "59",
|
|
5571
5577
|
"aria-label": "Second",
|
|
5572
5578
|
"aria-valuemin": "0",
|
|
5573
5579
|
"aria-valuemax": "59",
|
|
5574
|
-
"aria-valuenow":
|
|
5580
|
+
"aria-valuenow": b.value,
|
|
5575
5581
|
onInput: $
|
|
5576
5582
|
}, null, 40, Un)), [
|
|
5577
5583
|
[
|
|
5578
5584
|
Ae,
|
|
5579
|
-
|
|
5585
|
+
b.value,
|
|
5580
5586
|
void 0,
|
|
5581
5587
|
{ number: !0 }
|
|
5582
5588
|
]
|
|
@@ -5614,11 +5620,11 @@ const Hn = (e, o) => {
|
|
|
5614
5620
|
},
|
|
5615
5621
|
emits: ["update:sort", "rowClick"],
|
|
5616
5622
|
setup(e, { emit: o, slots: t }) {
|
|
5617
|
-
const a = (
|
|
5618
|
-
if (!
|
|
5619
|
-
const d = e.sort?.key ===
|
|
5620
|
-
o("update:sort", { key:
|
|
5621
|
-
},
|
|
5623
|
+
const a = (l) => {
|
|
5624
|
+
if (!l.sortable) return;
|
|
5625
|
+
const d = e.sort?.key === l.key && e.sort.direction === "asc" ? "desc" : "asc";
|
|
5626
|
+
o("update:sort", { key: l.key, direction: d });
|
|
5627
|
+
}, n = () => window.matchMedia("(max-width: 640px)").matches, i = (l, d) => d.split(".").reduce((u, p) => u?.[p], l), s = () => F(
|
|
5622
5628
|
"div",
|
|
5623
5629
|
{
|
|
5624
5630
|
class: "rs-table-mobile",
|
|
@@ -5626,16 +5632,16 @@ const Hn = (e, o) => {
|
|
|
5626
5632
|
"aria-busy": e.loading || void 0
|
|
5627
5633
|
},
|
|
5628
5634
|
e.loading ? t.loading?.() ?? "Loading..." : e.data.length === 0 ? t.empty?.() ?? "No data available." : e.data.map(
|
|
5629
|
-
(
|
|
5635
|
+
(l, d) => F(
|
|
5630
5636
|
"div",
|
|
5631
5637
|
{
|
|
5632
|
-
key:
|
|
5638
|
+
key: l.id ?? d,
|
|
5633
5639
|
class: "rs-table-card",
|
|
5634
5640
|
role: e.rowClickable ? "button" : "listitem",
|
|
5635
5641
|
tabindex: e.rowClickable ? 0 : void 0,
|
|
5636
|
-
onClick: e.rowClickable ? () => o("rowClick",
|
|
5642
|
+
onClick: e.rowClickable ? () => o("rowClick", l) : void 0,
|
|
5637
5643
|
onKeydown: e.rowClickable ? (u) => {
|
|
5638
|
-
(u.key === "Enter" || u.key === " ") && (u.preventDefault(), o("rowClick",
|
|
5644
|
+
(u.key === "Enter" || u.key === " ") && (u.preventDefault(), o("rowClick", l));
|
|
5639
5645
|
} : void 0
|
|
5640
5646
|
},
|
|
5641
5647
|
e.columns.map(
|
|
@@ -5652,17 +5658,17 @@ const Hn = (e, o) => {
|
|
|
5652
5658
|
"span",
|
|
5653
5659
|
{ class: "rs-table-card-value" },
|
|
5654
5660
|
t.cell?.({
|
|
5655
|
-
row:
|
|
5661
|
+
row: l,
|
|
5656
5662
|
column: u,
|
|
5657
|
-
value: i(
|
|
5658
|
-
}) ?? i(
|
|
5663
|
+
value: i(l, u.key)
|
|
5664
|
+
}) ?? i(l, u.key)
|
|
5659
5665
|
)
|
|
5660
5666
|
]
|
|
5661
5667
|
)
|
|
5662
5668
|
)
|
|
5663
5669
|
)
|
|
5664
5670
|
)
|
|
5665
|
-
),
|
|
5671
|
+
), r = () => F(
|
|
5666
5672
|
"div",
|
|
5667
5673
|
{ class: "rs-table-container" },
|
|
5668
5674
|
F(
|
|
@@ -5682,19 +5688,19 @@ const Hn = (e, o) => {
|
|
|
5682
5688
|
"tr",
|
|
5683
5689
|
null,
|
|
5684
5690
|
e.columns.map(
|
|
5685
|
-
(
|
|
5691
|
+
(l) => F(
|
|
5686
5692
|
"th",
|
|
5687
5693
|
{
|
|
5688
|
-
key:
|
|
5694
|
+
key: l.key,
|
|
5689
5695
|
style: {
|
|
5690
|
-
width:
|
|
5691
|
-
textAlign:
|
|
5696
|
+
width: l.width || "auto",
|
|
5697
|
+
textAlign: l.align || "left"
|
|
5692
5698
|
},
|
|
5693
|
-
"aria-sort":
|
|
5694
|
-
tabindex:
|
|
5695
|
-
onClick:
|
|
5696
|
-
onKeydown:
|
|
5697
|
-
(d.key === "Enter" || d.key === " ") && (d.preventDefault(), a(
|
|
5699
|
+
"aria-sort": l.sortable ? e.sort?.key === l.key ? e.sort.direction === "asc" ? "ascending" : "descending" : "none" : void 0,
|
|
5700
|
+
tabindex: l.sortable ? 0 : void 0,
|
|
5701
|
+
onClick: l.sortable ? () => a(l) : void 0,
|
|
5702
|
+
onKeydown: l.sortable ? (d) => {
|
|
5703
|
+
(d.key === "Enter" || d.key === " ") && (d.preventDefault(), a(l));
|
|
5698
5704
|
} : void 0,
|
|
5699
5705
|
scope: "col"
|
|
5700
5706
|
},
|
|
@@ -5704,12 +5710,12 @@ const Hn = (e, o) => {
|
|
|
5704
5710
|
[
|
|
5705
5711
|
F(
|
|
5706
5712
|
"span",
|
|
5707
|
-
|
|
5713
|
+
l.header
|
|
5708
5714
|
),
|
|
5709
|
-
|
|
5715
|
+
l.sortable ? F(
|
|
5710
5716
|
ce,
|
|
5711
5717
|
{
|
|
5712
|
-
name: e.sort?.key ===
|
|
5718
|
+
name: e.sort?.key === l.key ? e.sort.direction === "asc" ? "sortAsc" : "sortDesc" : "sort",
|
|
5713
5719
|
size: 16
|
|
5714
5720
|
}
|
|
5715
5721
|
) : null
|
|
@@ -5747,15 +5753,15 @@ const Hn = (e, o) => {
|
|
|
5747
5753
|
]
|
|
5748
5754
|
)
|
|
5749
5755
|
] : e.data.map(
|
|
5750
|
-
(
|
|
5756
|
+
(l, d) => F(
|
|
5751
5757
|
"tr",
|
|
5752
5758
|
{
|
|
5753
|
-
key:
|
|
5759
|
+
key: l.id ?? d,
|
|
5754
5760
|
tabindex: e.rowClickable ? 0 : void 0,
|
|
5755
5761
|
role: e.rowClickable ? "button" : void 0,
|
|
5756
|
-
onClick: e.rowClickable ? () => o("rowClick",
|
|
5762
|
+
onClick: e.rowClickable ? () => o("rowClick", l) : void 0,
|
|
5757
5763
|
onKeydown: e.rowClickable ? (u) => {
|
|
5758
|
-
(u.key === "Enter" || u.key === " ") && (u.preventDefault(), o("rowClick",
|
|
5764
|
+
(u.key === "Enter" || u.key === " ") && (u.preventDefault(), o("rowClick", l));
|
|
5759
5765
|
} : void 0,
|
|
5760
5766
|
"data-clickable": e.rowClickable || void 0
|
|
5761
5767
|
},
|
|
@@ -5769,10 +5775,10 @@ const Hn = (e, o) => {
|
|
|
5769
5775
|
}
|
|
5770
5776
|
},
|
|
5771
5777
|
t.cell?.({
|
|
5772
|
-
row:
|
|
5778
|
+
row: l,
|
|
5773
5779
|
column: u,
|
|
5774
|
-
value: i(
|
|
5775
|
-
}) ?? i(
|
|
5780
|
+
value: i(l, u.key)
|
|
5781
|
+
}) ?? i(l, u.key)
|
|
5776
5782
|
)
|
|
5777
5783
|
)
|
|
5778
5784
|
)
|
|
@@ -5783,15 +5789,15 @@ const Hn = (e, o) => {
|
|
|
5783
5789
|
)
|
|
5784
5790
|
);
|
|
5785
5791
|
return () => {
|
|
5786
|
-
const
|
|
5792
|
+
const l = e.responsive === "card" || e.responsive === "auto" && n();
|
|
5787
5793
|
return F(
|
|
5788
5794
|
"div",
|
|
5789
5795
|
{ class: "rs-table-container" },
|
|
5790
|
-
|
|
5796
|
+
l ? s() : r()
|
|
5791
5797
|
);
|
|
5792
5798
|
};
|
|
5793
5799
|
}
|
|
5794
|
-
}), Re = /* @__PURE__ */ Symbol("AccordionContext"),
|
|
5800
|
+
}), Re = /* @__PURE__ */ Symbol("AccordionContext"), Hl = T({
|
|
5795
5801
|
name: "Accordion",
|
|
5796
5802
|
props: {
|
|
5797
5803
|
multiple: { type: Boolean, default: !1 },
|
|
@@ -5801,37 +5807,37 @@ const Hn = (e, o) => {
|
|
|
5801
5807
|
}
|
|
5802
5808
|
},
|
|
5803
5809
|
setup(e, { slots: o }) {
|
|
5804
|
-
const t = h([]), a = h(new Set(e.defaultOpen)),
|
|
5810
|
+
const t = h([]), a = h(new Set(e.defaultOpen)), n = (p) => {
|
|
5805
5811
|
if (a.value.has(p)) {
|
|
5806
5812
|
a.value.delete(p);
|
|
5807
5813
|
return;
|
|
5808
5814
|
}
|
|
5809
5815
|
e.multiple || a.value.clear(), a.value.add(p);
|
|
5810
5816
|
}, 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[(
|
|
5817
|
+
p.disabled || t.value.includes(p) || (t.value.push(p), t.value.sort((b, g) => b.offsetTop - g.offsetTop));
|
|
5818
|
+
}, s = (p) => t.value = t.value.filter((b) => b !== p), r = (p) => {
|
|
5819
|
+
const b = t.value.indexOf(p);
|
|
5820
|
+
t.value[(b + 1) % t.value.length]?.focus();
|
|
5821
|
+
}, l = (p) => {
|
|
5822
|
+
const b = t.value.indexOf(p);
|
|
5823
|
+
t.value[(b - 1 + t.value.length) % t.value.length]?.focus();
|
|
5818
5824
|
}, d = () => t.value[0]?.focus(), u = () => {
|
|
5819
5825
|
const p = t.value;
|
|
5820
5826
|
p.length && p[p.length - 1]?.focus();
|
|
5821
5827
|
};
|
|
5822
|
-
return
|
|
5828
|
+
return ye(Re, {
|
|
5823
5829
|
multiple: e.multiple,
|
|
5824
5830
|
openItems: a,
|
|
5825
|
-
toggle:
|
|
5831
|
+
toggle: n,
|
|
5826
5832
|
registerHeader: i,
|
|
5827
5833
|
unregisterHeader: s,
|
|
5828
|
-
focusNext:
|
|
5829
|
-
focusPrev:
|
|
5834
|
+
focusNext: r,
|
|
5835
|
+
focusPrev: l,
|
|
5830
5836
|
focusFirst: d,
|
|
5831
5837
|
focusLast: u
|
|
5832
5838
|
}), () => o.default?.();
|
|
5833
5839
|
}
|
|
5834
|
-
}),
|
|
5840
|
+
}), Il = T({
|
|
5835
5841
|
name: "AccordionItem",
|
|
5836
5842
|
props: {
|
|
5837
5843
|
id: { type: String, required: !0 },
|
|
@@ -5840,7 +5846,7 @@ const Hn = (e, o) => {
|
|
|
5840
5846
|
setup(e, { slots: o }) {
|
|
5841
5847
|
const t = se(Re);
|
|
5842
5848
|
if (!t) throw new Error("AccordionItem must be used inside Accordion");
|
|
5843
|
-
const a =
|
|
5849
|
+
const a = I(() => t.openItems.value.has(e.id));
|
|
5844
5850
|
return () => F(
|
|
5845
5851
|
"div",
|
|
5846
5852
|
{
|
|
@@ -5859,28 +5865,28 @@ const Hn = (e, o) => {
|
|
|
5859
5865
|
setup(e, { slots: o }) {
|
|
5860
5866
|
const t = se(Re), a = h(null);
|
|
5861
5867
|
if (!t) throw new Error("AccordionHeader must be used inside Accordion");
|
|
5862
|
-
const
|
|
5868
|
+
const n = I(() => t.openItems.value.has(e.id)), i = () => {
|
|
5863
5869
|
e.disabled || t.toggle?.(e.id);
|
|
5864
|
-
}, s = (
|
|
5870
|
+
}, s = (r) => {
|
|
5865
5871
|
if (a.value)
|
|
5866
|
-
switch (
|
|
5872
|
+
switch (r.key) {
|
|
5867
5873
|
case "ArrowDown":
|
|
5868
|
-
|
|
5874
|
+
r.preventDefault(), t.focusNext(a.value);
|
|
5869
5875
|
break;
|
|
5870
5876
|
case "ArrowUp":
|
|
5871
|
-
|
|
5877
|
+
r.preventDefault(), t.focusPrev(a.value);
|
|
5872
5878
|
break;
|
|
5873
5879
|
case "Home":
|
|
5874
|
-
|
|
5880
|
+
r.preventDefault(), t.focusFirst();
|
|
5875
5881
|
break;
|
|
5876
5882
|
case "End":
|
|
5877
|
-
|
|
5883
|
+
r.preventDefault(), t.focusLast();
|
|
5878
5884
|
break;
|
|
5879
5885
|
}
|
|
5880
5886
|
};
|
|
5881
5887
|
return ae(() => {
|
|
5882
5888
|
a.value && t.registerHeader(a.value);
|
|
5883
|
-
}),
|
|
5889
|
+
}), He(() => {
|
|
5884
5890
|
a.value && t.unregisterHeader(a.value);
|
|
5885
5891
|
}), () => F(
|
|
5886
5892
|
"button",
|
|
@@ -5889,10 +5895,10 @@ const Hn = (e, o) => {
|
|
|
5889
5895
|
id: `header-${e.id}`,
|
|
5890
5896
|
type: "button",
|
|
5891
5897
|
class: "rs-accordion-trigger",
|
|
5892
|
-
"aria-expanded":
|
|
5898
|
+
"aria-expanded": n.value,
|
|
5893
5899
|
"aria-controls": `panel-${e.id}`,
|
|
5894
5900
|
disabled: e.disabled,
|
|
5895
|
-
"data-state":
|
|
5901
|
+
"data-state": n.value ? "open" : "closed",
|
|
5896
5902
|
onClick: i,
|
|
5897
5903
|
onKeydown: s
|
|
5898
5904
|
},
|
|
@@ -5918,7 +5924,7 @@ const Hn = (e, o) => {
|
|
|
5918
5924
|
setup(e, { slots: o }) {
|
|
5919
5925
|
const t = se(Re);
|
|
5920
5926
|
if (!t) throw new Error("AccordionPanel must be used inside Accordion");
|
|
5921
|
-
const a =
|
|
5927
|
+
const a = I(() => t.openItems.value.has(e.id));
|
|
5922
5928
|
return () => F(
|
|
5923
5929
|
"div",
|
|
5924
5930
|
{
|
|
@@ -5938,9 +5944,9 @@ const Hn = (e, o) => {
|
|
|
5938
5944
|
}
|
|
5939
5945
|
});
|
|
5940
5946
|
export {
|
|
5941
|
-
|
|
5947
|
+
Hl as Accordion,
|
|
5942
5948
|
Bl as AccordionHeader,
|
|
5943
|
-
|
|
5949
|
+
Il as AccordionItem,
|
|
5944
5950
|
_l as AccordionPanel,
|
|
5945
5951
|
ll as Autocomplete,
|
|
5946
5952
|
Jn as Avatar,
|
|
@@ -5959,13 +5965,13 @@ export {
|
|
|
5959
5965
|
xl as DropdownItem,
|
|
5960
5966
|
Ll as DropdownMenu,
|
|
5961
5967
|
Ml as DropdownTrigger,
|
|
5962
|
-
|
|
5968
|
+
Xe as Editor,
|
|
5963
5969
|
Pa as Highlight,
|
|
5964
5970
|
ce as Icon,
|
|
5965
5971
|
xe as Image,
|
|
5966
5972
|
t1 as ImageGallery,
|
|
5967
|
-
|
|
5968
|
-
|
|
5973
|
+
Xn as Input,
|
|
5974
|
+
Gn as Link,
|
|
5969
5975
|
Oe as Modal,
|
|
5970
5976
|
f1 as ModalBody,
|
|
5971
5977
|
p1 as ModalClose,
|
|
@@ -5980,10 +5986,10 @@ export {
|
|
|
5980
5986
|
vl as Step,
|
|
5981
5987
|
fl as Steps,
|
|
5982
5988
|
Vl as Table,
|
|
5983
|
-
|
|
5989
|
+
gl as Tabs,
|
|
5984
5990
|
kl as TabsContent,
|
|
5985
|
-
|
|
5986
|
-
|
|
5991
|
+
yl as TabsList,
|
|
5992
|
+
bl as TabsTrigger,
|
|
5987
5993
|
U2 as Tag,
|
|
5988
5994
|
al as Textarea,
|
|
5989
5995
|
pl as Timeline,
|