@reinosoft-ui/core 0.1.24 → 0.1.25
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 +1259 -1258
- 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,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const k1 = ["aria-busy"], w1 = ["aria-label"], M1 = ["src", "srcset", "sizes", "alt", "aria-hidden", "loading", "decoding"], L1 = /* @__PURE__ */
|
|
1
|
+
import { defineComponent as B, ref as p, computed as L, watch as Y, onMounted as ae, createElementBlock as f, openBlock as v, normalizeStyle as ye, normalizeClass as re, renderSlot as j, createCommentVNode as O, withDirectives as Ie, createElementVNode as b, vShow as ze, mergeProps as Ce, mergeModels as te, useModel as pe, withKeys as de, withModifiers as ne, onUnmounted as ge, Fragment as le, unref as R, toDisplayString as K, renderList as ve, createBlock as J, Transition as $e, withCtx as W, nextTick as Le, useId as ue, provide as be, createVNode as P, createTextVNode as me, onBeforeUnmount as He, Teleport as Be, resolveDynamicComponent as Ve, useAttrs as Oe, inject as se, h as F, useSlots as qe, resolveComponent as p1, vModelRadio as m1, vModelDynamic as h1, reactive as n1, TransitionGroup as y1, createApp as b1, shallowRef as g1 } from "vue";
|
|
2
|
+
const k1 = ["aria-busy"], w1 = ["aria-label"], M1 = ["src", "srcset", "sizes", "alt", "aria-hidden", "loading", "decoding"], L1 = /* @__PURE__ */ B({
|
|
3
3
|
__name: "Image",
|
|
4
4
|
props: {
|
|
5
5
|
src: {},
|
|
@@ -15,11 +15,11 @@ const k1 = ["aria-busy"], w1 = ["aria-label"], M1 = ["src", "srcset", "sizes", "
|
|
|
15
15
|
},
|
|
16
16
|
emits: ["loaded", "error"],
|
|
17
17
|
setup(e, { emit: o }) {
|
|
18
|
-
const t = e, a = o, s =
|
|
18
|
+
const t = e, a = o, s = p(t.src), l = p(), i = p("loading"), n = L(() => t.ratio ? {
|
|
19
19
|
aspectRatio: typeof t.ratio == "number" ? `${t.ratio}` : t.ratio
|
|
20
|
-
} : void 0),
|
|
20
|
+
} : void 0), r = () => {
|
|
21
21
|
i.value = "loaded", a("loaded");
|
|
22
|
-
},
|
|
22
|
+
}, c = () => {
|
|
23
23
|
if (t.fallbackSrc && s.value !== t.fallbackSrc) {
|
|
24
24
|
s.value = t.fallbackSrc, i.value = "loading";
|
|
25
25
|
return;
|
|
@@ -28,11 +28,11 @@ const k1 = ["aria-busy"], w1 = ["aria-label"], M1 = ["src", "srcset", "sizes", "
|
|
|
28
28
|
};
|
|
29
29
|
return Y(
|
|
30
30
|
() => t.src,
|
|
31
|
-
(
|
|
32
|
-
s.value =
|
|
31
|
+
(u) => {
|
|
32
|
+
s.value = u, i.value = "loading";
|
|
33
33
|
}
|
|
34
|
-
), ae(() =>
|
|
35
|
-
class:
|
|
34
|
+
), ae(() => l.value?.complete && l.value.naturalWidth > 0 && (i.value = "loaded")), (u, h) => (v(), f("div", {
|
|
35
|
+
class: re(["ui-image", {
|
|
36
36
|
"is-loading": i.value === "loading",
|
|
37
37
|
"is-error": i.value === "error",
|
|
38
38
|
"is-loaded": i.value === "loaded",
|
|
@@ -41,21 +41,21 @@ const k1 = ["aria-busy"], w1 = ["aria-label"], M1 = ["src", "srcset", "sizes", "
|
|
|
41
41
|
style: ye(n.value),
|
|
42
42
|
"aria-busy": i.value === "loading" || void 0
|
|
43
43
|
}, [
|
|
44
|
-
i.value === "loading" ? j(
|
|
44
|
+
i.value === "loading" ? j(u.$slots, "placeholder", { key: 0 }, () => [
|
|
45
45
|
h[0] || (h[0] = b("div", {
|
|
46
46
|
class: "ui-image__placeholder",
|
|
47
47
|
"aria-hidden": "true"
|
|
48
48
|
}, null, -1))
|
|
49
|
-
], !0) : i.value === "error" ? j(
|
|
49
|
+
], !0) : i.value === "error" ? j(u.$slots, "fallback", { key: 1 }, () => [
|
|
50
50
|
b("div", {
|
|
51
51
|
class: "ui-image__fallback",
|
|
52
52
|
role: "img",
|
|
53
53
|
"aria-label": e.decorative ? void 0 : e.alt
|
|
54
54
|
}, "Image not available", 8, w1)
|
|
55
|
-
], !0) :
|
|
55
|
+
], !0) : O("", !0),
|
|
56
56
|
Ie(b("img", {
|
|
57
57
|
ref_key: "imgRef",
|
|
58
|
-
ref:
|
|
58
|
+
ref: l,
|
|
59
59
|
class: "ui-image__img",
|
|
60
60
|
src: s.value,
|
|
61
61
|
srcset: e.srcset,
|
|
@@ -64,8 +64,8 @@ const k1 = ["aria-busy"], w1 = ["aria-label"], M1 = ["src", "srcset", "sizes", "
|
|
|
64
64
|
"aria-hidden": e.decorative || void 0,
|
|
65
65
|
loading: e.lazy ? "lazy" : void 0,
|
|
66
66
|
decoding: e.decoding,
|
|
67
|
-
onLoad:
|
|
68
|
-
onError:
|
|
67
|
+
onLoad: r,
|
|
68
|
+
onError: c
|
|
69
69
|
}, null, 40, M1), [
|
|
70
70
|
[ze, i.value !== "error"]
|
|
71
71
|
])
|
|
@@ -80,13 +80,13 @@ const k1 = ["aria-busy"], w1 = ["aria-label"], M1 = ["src", "srcset", "sizes", "
|
|
|
80
80
|
xe.install = (e) => {
|
|
81
81
|
e.component("Image", xe);
|
|
82
82
|
};
|
|
83
|
-
const x1 = /* @__PURE__ */
|
|
83
|
+
const x1 = /* @__PURE__ */ B({
|
|
84
84
|
__name: "Button",
|
|
85
85
|
setup(e, { expose: o }) {
|
|
86
|
-
const t =
|
|
86
|
+
const t = p();
|
|
87
87
|
return o({
|
|
88
88
|
el: t
|
|
89
|
-
}), (a, s) => (v(), f("button",
|
|
89
|
+
}), (a, s) => (v(), f("button", Ce({
|
|
90
90
|
ref_key: "rootRef",
|
|
91
91
|
ref: t,
|
|
92
92
|
type: "button",
|
|
@@ -99,7 +99,7 @@ const x1 = /* @__PURE__ */ _({
|
|
|
99
99
|
he.install = (e) => {
|
|
100
100
|
e.component("Button", he);
|
|
101
101
|
};
|
|
102
|
-
const $1 = ["id", "aria-checked", "aria-disabled", "disabled", "onKeydown"], V1 = /* @__PURE__ */
|
|
102
|
+
const $1 = ["id", "aria-checked", "aria-disabled", "disabled", "onKeydown"], V1 = /* @__PURE__ */ B({
|
|
103
103
|
__name: "Toggle",
|
|
104
104
|
props: /* @__PURE__ */ te({
|
|
105
105
|
id: {},
|
|
@@ -110,25 +110,25 @@ const $1 = ["id", "aria-checked", "aria-disabled", "disabled", "onKeydown"], V1
|
|
|
110
110
|
}),
|
|
111
111
|
emits: /* @__PURE__ */ te(["change"], ["update:modelValue"]),
|
|
112
112
|
setup(e, { emit: o }) {
|
|
113
|
-
const t =
|
|
113
|
+
const t = pe(e, "modelValue"), a = o, s = e, l = L(() => t.value), i = () => {
|
|
114
114
|
if (s.disabled) return;
|
|
115
115
|
const n = !t.value;
|
|
116
116
|
t.value = n, a("change", n);
|
|
117
117
|
};
|
|
118
|
-
return (n,
|
|
118
|
+
return (n, r) => (v(), f("button", {
|
|
119
119
|
id: e.id,
|
|
120
120
|
role: "switch",
|
|
121
121
|
type: "button",
|
|
122
|
-
class:
|
|
123
|
-
"aria-checked":
|
|
122
|
+
class: re(["ui-toggle", { "ui-toggle--checked": l.value, "ui-toggle--disabled": e.disabled }]),
|
|
123
|
+
"aria-checked": l.value,
|
|
124
124
|
"aria-disabled": e.disabled || void 0,
|
|
125
125
|
disabled: e.disabled || void 0,
|
|
126
126
|
onClick: i,
|
|
127
127
|
onKeydown: [
|
|
128
|
-
|
|
129
|
-
|
|
128
|
+
de(ne(i, ["prevent"]), ["space"]),
|
|
129
|
+
de(ne(i, ["prevent"]), ["enter"])
|
|
130
130
|
]
|
|
131
|
-
}, [...
|
|
131
|
+
}, [...r[0] || (r[0] = [
|
|
132
132
|
b("span", { class: "ui-toggle__track" }, [
|
|
133
133
|
b("span", { class: "ui-toggle__thumb" })
|
|
134
134
|
], -1)
|
|
@@ -170,14 +170,14 @@ const l1 = (e) => {
|
|
|
170
170
|
if (!s) return;
|
|
171
171
|
const i = B1("p");
|
|
172
172
|
document.createRange().selectNodeContents(s);
|
|
173
|
-
const
|
|
174
|
-
|
|
175
|
-
const
|
|
176
|
-
h.selectNodeContents(s), h.setStart(
|
|
177
|
-
const
|
|
178
|
-
s.innerHTML = "", s.appendChild(
|
|
179
|
-
const
|
|
180
|
-
|
|
173
|
+
const r = a.cloneRange(), c = document.createRange();
|
|
174
|
+
c.selectNodeContents(s), c.setEnd(r.startContainer, r.startOffset);
|
|
175
|
+
const u = c.cloneContents(), h = document.createRange();
|
|
176
|
+
h.selectNodeContents(s), h.setStart(r.startContainer, r.startOffset);
|
|
177
|
+
const x = h.cloneContents();
|
|
178
|
+
s.innerHTML = "", s.appendChild(u), s.innerHTML === "" && (s.innerHTML = "<br>"), i.innerHTML = "", i.appendChild(x), i.innerHTML === "" && (i.innerHTML = "<br>"), s.after(i);
|
|
179
|
+
const w = document.createRange();
|
|
180
|
+
w.setStart(i, 0), w.collapse(!0), t.removeAllRanges(), t.addRange(w), o?.normalize();
|
|
181
181
|
}, Z1 = () => {
|
|
182
182
|
const e = window.getSelection();
|
|
183
183
|
if (!e || e.rangeCount === 0) return;
|
|
@@ -188,192 +188,192 @@ const l1 = (e) => {
|
|
|
188
188
|
if (!o || o.rangeCount === 0) return;
|
|
189
189
|
const t = o.getRangeAt(0), a = l1(t.startContainer);
|
|
190
190
|
if (!a || !(a.textContent === "" || a.innerHTML === "<br>")) return;
|
|
191
|
-
const
|
|
192
|
-
if (e.preventDefault(), !
|
|
191
|
+
const l = a.previousElementSibling, i = a.nextElementSibling;
|
|
192
|
+
if (e.preventDefault(), !l && !i) {
|
|
193
193
|
a.innerHTML = "<br>", Ge(a);
|
|
194
194
|
return;
|
|
195
195
|
}
|
|
196
|
-
|
|
196
|
+
l && l.dataset.block !== void 0 ? (a.remove(), A1(l)) : i && i.dataset.block !== void 0 && (a.remove(), Ge(i));
|
|
197
197
|
}, A1 = (e) => {
|
|
198
198
|
const o = document.createRange(), t = window.getSelection();
|
|
199
199
|
o.selectNodeContents(e), o.collapse(!1), t?.removeAllRanges(), t?.addRange(o);
|
|
200
200
|
}, T1 = (e, o) => {
|
|
201
|
-
const t =
|
|
202
|
-
let s =
|
|
203
|
-
const
|
|
204
|
-
const
|
|
205
|
-
if (!
|
|
206
|
-
const
|
|
207
|
-
if (!
|
|
208
|
-
const
|
|
209
|
-
|
|
210
|
-
}, i = (
|
|
211
|
-
const
|
|
212
|
-
if (!
|
|
213
|
-
const
|
|
214
|
-
if (!
|
|
215
|
-
const Z = n(
|
|
201
|
+
const t = p(null), a = o?.buttons ?? [];
|
|
202
|
+
let s = p(null);
|
|
203
|
+
const l = () => {
|
|
204
|
+
const y = e;
|
|
205
|
+
if (!y) return;
|
|
206
|
+
const M = window.getSelection();
|
|
207
|
+
if (!M || M.rangeCount === 0) return;
|
|
208
|
+
const H = M.getRangeAt(0);
|
|
209
|
+
y.contains(H.commonAncestorContainer) && (t.value = H.cloneRange());
|
|
210
|
+
}, i = (y) => {
|
|
211
|
+
const M = window.getSelection();
|
|
212
|
+
if (!M || M.rangeCount === 0 || M.isCollapsed) return !1;
|
|
213
|
+
const H = M.getRangeAt(0), q = e;
|
|
214
|
+
if (!q) return !1;
|
|
215
|
+
const Z = n(H, q), N = [];
|
|
216
216
|
if (Z.forEach((m) => {
|
|
217
|
-
const
|
|
218
|
-
if (
|
|
219
|
-
let
|
|
220
|
-
|
|
221
|
-
const
|
|
222
|
-
if (
|
|
223
|
-
H1(
|
|
217
|
+
const k = m === H.startContainer ? H.startOffset : 0, E = m === H.endContainer ? H.endOffset : m.textContent.length;
|
|
218
|
+
if (k === E) return;
|
|
219
|
+
let G;
|
|
220
|
+
k === 0 && E === m.textContent.length ? G = m : (G = m.splitText(k), E - k < G.textContent.length && G.splitText(E - k));
|
|
221
|
+
const I = I1(G, y, q);
|
|
222
|
+
if (I)
|
|
223
|
+
H1(I), N.push(G);
|
|
224
224
|
else {
|
|
225
|
-
const
|
|
226
|
-
|
|
225
|
+
const T = document.createElement(y);
|
|
226
|
+
G.replaceWith(T), T.appendChild(G), N.push(G);
|
|
227
227
|
}
|
|
228
|
-
}),
|
|
228
|
+
}), N.length > 0) {
|
|
229
229
|
const m = document.createRange();
|
|
230
|
-
m.setStart(
|
|
231
|
-
const
|
|
232
|
-
m.setEnd(
|
|
230
|
+
m.setStart(N[0], 0);
|
|
231
|
+
const k = N[N.length - 1];
|
|
232
|
+
m.setEnd(k, k.textContent.length), M.removeAllRanges(), M.addRange(m), l();
|
|
233
233
|
}
|
|
234
|
-
return
|
|
235
|
-
}, n = (
|
|
236
|
-
if (!
|
|
237
|
-
const
|
|
238
|
-
|
|
234
|
+
return w(), d(y);
|
|
235
|
+
}, n = (y, M) => {
|
|
236
|
+
if (!y || !M || !(M instanceof HTMLElement)) return [];
|
|
237
|
+
const H = y.commonAncestorContainer, q = M.contains(H) ? M : H.nodeType === 3 ? H.parentNode : H, Z = document.createTreeWalker(
|
|
238
|
+
q,
|
|
239
239
|
NodeFilter.SHOW_TEXT,
|
|
240
240
|
{
|
|
241
|
-
acceptNode(
|
|
242
|
-
return
|
|
241
|
+
acceptNode(k) {
|
|
242
|
+
return M.contains(k) && y.intersectsNode(k) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_REJECT;
|
|
243
243
|
}
|
|
244
244
|
}
|
|
245
|
-
),
|
|
245
|
+
), N = [];
|
|
246
246
|
let m;
|
|
247
|
-
for (; m = Z.nextNode(); )
|
|
248
|
-
return
|
|
249
|
-
},
|
|
250
|
-
const
|
|
251
|
-
if (!
|
|
252
|
-
const
|
|
253
|
-
if (!
|
|
254
|
-
const
|
|
255
|
-
for (
|
|
256
|
-
|
|
257
|
-
const
|
|
258
|
-
return
|
|
259
|
-
},
|
|
260
|
-
const
|
|
261
|
-
if (!
|
|
262
|
-
for (;
|
|
263
|
-
if (
|
|
264
|
-
|
|
247
|
+
for (; m = Z.nextNode(); ) N.push(m);
|
|
248
|
+
return N;
|
|
249
|
+
}, r = (y) => {
|
|
250
|
+
const M = window.getSelection();
|
|
251
|
+
if (!M || M.rangeCount === 0) return !1;
|
|
252
|
+
const H = M.getRangeAt(0), q = c(H.startContainer);
|
|
253
|
+
if (!q) return !1;
|
|
254
|
+
const N = q.tagName.toLowerCase() === y.toLowerCase() ? "p" : y.toLowerCase(), m = document.createElement(N);
|
|
255
|
+
for (N === "blockquote" && m.setAttribute("class", "rs-blockquote"), m.dataset.block = "true"; q.firstChild; ) m.appendChild(q.firstChild);
|
|
256
|
+
q.replaceWith(m);
|
|
257
|
+
const k = document.createRange();
|
|
258
|
+
return k.selectNodeContents(m), M.removeAllRanges(), M.addRange(k), l(), w(), C(y);
|
|
259
|
+
}, c = (y) => {
|
|
260
|
+
const M = e;
|
|
261
|
+
if (!M) return null;
|
|
262
|
+
for (; y && y !== M; ) {
|
|
263
|
+
if (y instanceof HTMLElement && y.dataset.block !== void 0) return y;
|
|
264
|
+
y = y.parentNode;
|
|
265
265
|
}
|
|
266
266
|
return null;
|
|
267
|
-
},
|
|
268
|
-
const
|
|
269
|
-
if (!
|
|
270
|
-
for (;
|
|
271
|
-
if (
|
|
272
|
-
|
|
267
|
+
}, u = (y, M) => {
|
|
268
|
+
const H = e;
|
|
269
|
+
if (!H) return null;
|
|
270
|
+
for (; y && y !== H; ) {
|
|
271
|
+
if (y instanceof HTMLElement && y.tagName.toLowerCase() === M.toLowerCase()) return y;
|
|
272
|
+
y = y.parentNode;
|
|
273
273
|
}
|
|
274
274
|
return null;
|
|
275
|
-
}, h = (
|
|
276
|
-
if (
|
|
277
|
-
const
|
|
278
|
-
if (!
|
|
279
|
-
const
|
|
280
|
-
if (!
|
|
281
|
-
|
|
282
|
-
const Z =
|
|
275
|
+
}, h = (y) => {
|
|
276
|
+
if (y.key !== "Enter" || y.shiftKey) return;
|
|
277
|
+
const M = window.getSelection();
|
|
278
|
+
if (!M || M.rangeCount === 0) return;
|
|
279
|
+
const H = M.getRangeAt(0), q = u(H.startContainer, "li");
|
|
280
|
+
if (!q) return;
|
|
281
|
+
y.preventDefault(), y.stopPropagation();
|
|
282
|
+
const Z = q.parentElement;
|
|
283
283
|
if (!Z) return;
|
|
284
|
-
if (
|
|
285
|
-
const
|
|
286
|
-
|
|
284
|
+
if (q.textContent?.trim() === "") {
|
|
285
|
+
const k = document.createElement("p");
|
|
286
|
+
k.dataset.block = "true", k.innerHTML = "<br>", Z.after(k), q.remove(), Z.children.length === 0 && Z.remove(), x(k);
|
|
287
287
|
return;
|
|
288
288
|
}
|
|
289
289
|
const m = document.createElement("li");
|
|
290
|
-
m.innerHTML = "<br>",
|
|
291
|
-
},
|
|
292
|
-
const
|
|
293
|
-
|
|
294
|
-
},
|
|
290
|
+
m.innerHTML = "<br>", q.after(m), x(m);
|
|
291
|
+
}, x = (y) => {
|
|
292
|
+
const M = document.createRange(), H = window.getSelection();
|
|
293
|
+
M.selectNodeContents(y), M.collapse(!0), H?.removeAllRanges(), H?.addRange(M);
|
|
294
|
+
}, w = () => {
|
|
295
295
|
e instanceof Node && e.normalize();
|
|
296
|
-
},
|
|
297
|
-
const
|
|
298
|
-
if (!
|
|
299
|
-
let
|
|
300
|
-
|
|
301
|
-
const
|
|
302
|
-
if (!
|
|
303
|
-
for (;
|
|
304
|
-
if (
|
|
305
|
-
|
|
296
|
+
}, d = (y) => {
|
|
297
|
+
const M = t.value;
|
|
298
|
+
if (!M) return !1;
|
|
299
|
+
let H = M.startContainer;
|
|
300
|
+
H.nodeType === Node.TEXT_NODE && (H = H.parentNode);
|
|
301
|
+
const q = e;
|
|
302
|
+
if (!q) return !1;
|
|
303
|
+
for (; H && H !== q; ) {
|
|
304
|
+
if (H instanceof HTMLElement && H.tagName.toLowerCase() === y.toLowerCase()) return !0;
|
|
305
|
+
H = H.parentNode;
|
|
306
306
|
}
|
|
307
307
|
return !1;
|
|
308
|
-
},
|
|
309
|
-
const
|
|
310
|
-
if (!
|
|
311
|
-
let
|
|
312
|
-
|
|
313
|
-
const
|
|
314
|
-
if (!
|
|
315
|
-
for (;
|
|
316
|
-
if (
|
|
317
|
-
|
|
308
|
+
}, C = (y) => {
|
|
309
|
+
const M = t.value;
|
|
310
|
+
if (!M) return !1;
|
|
311
|
+
let H = M.startContainer;
|
|
312
|
+
H.nodeType === Node.TEXT_NODE && (H = H.parentNode);
|
|
313
|
+
const q = e;
|
|
314
|
+
if (!q) return !1;
|
|
315
|
+
for (; H && H !== q; ) {
|
|
316
|
+
if (H instanceof HTMLElement && H.dataset.block !== void 0 && H.tagName.toLowerCase() === y.toLowerCase()) return !0;
|
|
317
|
+
H = H.parentNode;
|
|
318
318
|
}
|
|
319
319
|
return !1;
|
|
320
320
|
}, V = () => {
|
|
321
|
-
const
|
|
322
|
-
|
|
323
|
-
},
|
|
324
|
-
const
|
|
325
|
-
if (!
|
|
326
|
-
const
|
|
327
|
-
|
|
328
|
-
},
|
|
329
|
-
const
|
|
330
|
-
if (!
|
|
331
|
-
const
|
|
332
|
-
if (!
|
|
333
|
-
const Z =
|
|
334
|
-
Z.selectNodeContents(
|
|
335
|
-
const
|
|
336
|
-
m.selectNodeContents(
|
|
337
|
-
const
|
|
338
|
-
|
|
339
|
-
const
|
|
340
|
-
|
|
321
|
+
const y = e;
|
|
322
|
+
y && y.focus();
|
|
323
|
+
}, _ = () => {
|
|
324
|
+
const y = e;
|
|
325
|
+
if (!y || !t.value || !y || !y.contains(t.value.commonAncestorContainer)) return;
|
|
326
|
+
const M = window.getSelection();
|
|
327
|
+
M && (M.removeAllRanges(), M.addRange(t.value));
|
|
328
|
+
}, g = () => s.value?.focusFirstButton?.(), D = (y) => {
|
|
329
|
+
const M = window.getSelection();
|
|
330
|
+
if (!M || M.rangeCount === 0) return;
|
|
331
|
+
const H = M.getRangeAt(0), q = c(H.startContainer);
|
|
332
|
+
if (!q) return;
|
|
333
|
+
const Z = H.cloneRange();
|
|
334
|
+
Z.selectNodeContents(q), Z.setEnd(H.startContainer, H.startOffset);
|
|
335
|
+
const N = Z.toString().length, m = H.cloneRange();
|
|
336
|
+
m.selectNodeContents(q), m.setEnd(H.endContainer, H.endOffset);
|
|
337
|
+
const k = m.toString().length, E = H.collapsed, G = y(q);
|
|
338
|
+
q.replaceWith(G);
|
|
339
|
+
const I = document.createTreeWalker(
|
|
340
|
+
G,
|
|
341
341
|
NodeFilter.SHOW_TEXT,
|
|
342
342
|
null
|
|
343
343
|
);
|
|
344
|
-
let
|
|
345
|
-
for (;
|
|
346
|
-
const X =
|
|
347
|
-
!
|
|
344
|
+
let T = 0, oe = null, $ = 0, z = null, Q = 0;
|
|
345
|
+
for (; I.nextNode(); ) {
|
|
346
|
+
const X = I.currentNode, ie = X.textContent?.length ?? 0;
|
|
347
|
+
!oe && T + ie >= N && (oe = X, $ = N - T), !z && T + ie >= k && (z = X, Q = k - T), T += ie;
|
|
348
348
|
}
|
|
349
|
-
const
|
|
350
|
-
|
|
351
|
-
},
|
|
352
|
-
const
|
|
353
|
-
|
|
349
|
+
const A = document.createRange();
|
|
350
|
+
oe ? A.setStart(oe, $) : A.setStart(G, 0), !E && z ? A.setEnd(z, Q) : A.collapse(!0), M.removeAllRanges(), M.addRange(A), l(), w();
|
|
351
|
+
}, S = (y) => {
|
|
352
|
+
const M = e.parentElement?.querySelector("#editor-status");
|
|
353
|
+
M && (M.textContent = y, setTimeout(() => M.textContent = "", 2e3));
|
|
354
354
|
};
|
|
355
355
|
return e.addEventListener("keydown", h, { capture: !0 }), {
|
|
356
356
|
toggleInline: i,
|
|
357
|
-
toggleBlock:
|
|
358
|
-
normalize:
|
|
357
|
+
toggleBlock: r,
|
|
358
|
+
normalize: w,
|
|
359
359
|
rootElement: e,
|
|
360
|
-
saveSelection:
|
|
361
|
-
restoreSelection:
|
|
362
|
-
isInlineActive:
|
|
363
|
-
isBlockActive:
|
|
360
|
+
saveSelection: l,
|
|
361
|
+
restoreSelection: _,
|
|
362
|
+
isInlineActive: d,
|
|
363
|
+
isBlockActive: C,
|
|
364
364
|
focus: V,
|
|
365
365
|
toolbarRef: s,
|
|
366
|
-
focusFirstToolbarButton:
|
|
366
|
+
focusFirstToolbarButton: g,
|
|
367
367
|
replaceCurrentBlock: D,
|
|
368
368
|
buttons: a,
|
|
369
|
-
announce:
|
|
369
|
+
announce: S
|
|
370
370
|
};
|
|
371
371
|
}, S1 = ["id", "aria-label"], E1 = {
|
|
372
372
|
id: "editor-status",
|
|
373
373
|
class: "sr-only",
|
|
374
374
|
"aria-live": "polite",
|
|
375
375
|
"aria-atomic": "true"
|
|
376
|
-
}, D1 = /* @__PURE__ */
|
|
376
|
+
}, D1 = /* @__PURE__ */ B({
|
|
377
377
|
__name: "EditorContent",
|
|
378
378
|
props: {
|
|
379
379
|
editor: {},
|
|
@@ -381,7 +381,7 @@ const l1 = (e) => {
|
|
|
381
381
|
ariaLabel: {}
|
|
382
382
|
},
|
|
383
383
|
setup(e, { expose: o }) {
|
|
384
|
-
const t = e, a =
|
|
384
|
+
const t = e, a = p(""), s = p(null), l = (n) => {
|
|
385
385
|
if (n.ctrlKey || n.metaKey)
|
|
386
386
|
switch (n.altKey && n.key === "F10" && (n.preventDefault(), t.editor?.restoreSelection(), t.editor?.focusFirstToolbarButton()), n.key.toLowerCase()) {
|
|
387
387
|
case "b":
|
|
@@ -397,14 +397,14 @@ const l1 = (e) => {
|
|
|
397
397
|
}, i = () => {
|
|
398
398
|
const n = window.getSelection();
|
|
399
399
|
if (!n || n.rangeCount === 0) return;
|
|
400
|
-
const
|
|
401
|
-
if (!
|
|
402
|
-
const
|
|
403
|
-
|
|
400
|
+
const r = s.value;
|
|
401
|
+
if (!r) return;
|
|
402
|
+
const c = n.getRangeAt(0);
|
|
403
|
+
r.contains(c.commonAncestorContainer) && t.editor?.saveSelection();
|
|
404
404
|
};
|
|
405
405
|
return ae(() => document.addEventListener("selectionchange", i)), ge(() => document.removeEventListener("selectionchange", i)), o({
|
|
406
406
|
getRoot: () => s
|
|
407
|
-
}), (n,
|
|
407
|
+
}), (n, r) => (v(), f(le, null, [
|
|
408
408
|
b("div", {
|
|
409
409
|
ref_key: "rootRef",
|
|
410
410
|
ref: s,
|
|
@@ -416,23 +416,23 @@ const l1 = (e) => {
|
|
|
416
416
|
"aria-label": e.ariaLabel || "Text editor",
|
|
417
417
|
"aria-describedby": "editor-help editor-status",
|
|
418
418
|
onKeydown: [
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
419
|
+
l,
|
|
420
|
+
r[0] || (r[0] = de((c) => R(_1)(c, e.editor), ["enter"])),
|
|
421
|
+
r[1] || (r[1] = de(
|
|
422
422
|
//@ts-ignore
|
|
423
|
-
(...
|
|
423
|
+
(...c) => R(We) && R(We)(...c),
|
|
424
424
|
["backspace"]
|
|
425
425
|
))
|
|
426
426
|
],
|
|
427
|
-
onMouseup:
|
|
428
|
-
(...
|
|
429
|
-
onKeyup:
|
|
430
|
-
(...
|
|
431
|
-
}, [...
|
|
427
|
+
onMouseup: r[2] || (r[2] = //@ts-ignore
|
|
428
|
+
(...c) => e.editor?.saveSelection && e.editor?.saveSelection(...c)),
|
|
429
|
+
onKeyup: r[3] || (r[3] = //@ts-ignore
|
|
430
|
+
(...c) => e.editor?.saveSelection && e.editor?.saveSelection(...c))
|
|
431
|
+
}, [...r[4] || (r[4] = [
|
|
432
432
|
b("p", { "data-block": "" }, "Write here...", -1)
|
|
433
433
|
])], 40, S1),
|
|
434
434
|
b("div", E1, K(a.value), 1),
|
|
435
|
-
|
|
435
|
+
r[5] || (r[5] = b("p", {
|
|
436
436
|
id: "editor-help",
|
|
437
437
|
class: "sr-only"
|
|
438
438
|
}, " Use Ctrl+B for bold, Ctrl+I for italic, Alt+Ctrl+1 for heading level 1. ", -1))
|
|
@@ -1898,7 +1898,7 @@ const l1 = (e) => {
|
|
|
1898
1898
|
shoppingBag: r2,
|
|
1899
1899
|
directionDown: s2,
|
|
1900
1900
|
shoppingBasket: i2
|
|
1901
|
-
}, u2 = ["viewBox", "transform", "width", "height"], c2 = /* @__PURE__ */
|
|
1901
|
+
}, u2 = ["viewBox", "transform", "width", "height"], c2 = /* @__PURE__ */ B({
|
|
1902
1902
|
__name: "Icon",
|
|
1903
1903
|
props: {
|
|
1904
1904
|
name: {},
|
|
@@ -1908,7 +1908,7 @@ const l1 = (e) => {
|
|
|
1908
1908
|
setup(e) {
|
|
1909
1909
|
return (o, t) => (v(), f("svg", {
|
|
1910
1910
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1911
|
-
class:
|
|
1911
|
+
class: re(["icon", { spin: e.spin }]),
|
|
1912
1912
|
viewBox: R(Te)[e.name].viewBox,
|
|
1913
1913
|
transform: R(Te)[e.name].transform || void 0,
|
|
1914
1914
|
width: e.size || 24,
|
|
@@ -1916,35 +1916,35 @@ const l1 = (e) => {
|
|
|
1916
1916
|
fill: "none",
|
|
1917
1917
|
"aria-hidden": "true"
|
|
1918
1918
|
}, [
|
|
1919
|
-
(v(!0), f(
|
|
1920
|
-
a.type === "path" ? (v(), f("path",
|
|
1919
|
+
(v(!0), f(le, null, ve(R(Te)[e.name].paths, (a, s) => (v(), f(le, { key: s }, [
|
|
1920
|
+
a.type === "path" ? (v(), f("path", Ce({
|
|
1921
1921
|
key: 0,
|
|
1922
1922
|
ref_for: !0
|
|
1923
|
-
}, a), null, 16)) :
|
|
1924
|
-
a.type === "circle" ? (v(), f("circle",
|
|
1923
|
+
}, a), null, 16)) : O("", !0),
|
|
1924
|
+
a.type === "circle" ? (v(), f("circle", Ce({
|
|
1925
1925
|
key: 1,
|
|
1926
1926
|
ref_for: !0
|
|
1927
|
-
}, a), null, 16)) :
|
|
1928
|
-
a.type === "line" ? (v(), f("line",
|
|
1927
|
+
}, a), null, 16)) : O("", !0),
|
|
1928
|
+
a.type === "line" ? (v(), f("line", Ce({
|
|
1929
1929
|
key: 2,
|
|
1930
1930
|
ref_for: !0
|
|
1931
|
-
}, a), null, 16)) :
|
|
1932
|
-
a.type === "polyline" ? (v(), f("polyline",
|
|
1931
|
+
}, a), null, 16)) : O("", !0),
|
|
1932
|
+
a.type === "polyline" ? (v(), f("polyline", Ce({
|
|
1933
1933
|
key: 3,
|
|
1934
1934
|
ref_for: !0
|
|
1935
|
-
}, a), null, 16)) :
|
|
1936
|
-
a.type === "rect" ? (v(), f("rect",
|
|
1935
|
+
}, a), null, 16)) : O("", !0),
|
|
1936
|
+
a.type === "rect" ? (v(), f("rect", Ce({
|
|
1937
1937
|
key: 4,
|
|
1938
1938
|
ref_for: !0
|
|
1939
|
-
}, a), null, 16)) :
|
|
1940
|
-
a.type === "polygon" ? (v(), f("polygon",
|
|
1939
|
+
}, a), null, 16)) : O("", !0),
|
|
1940
|
+
a.type === "polygon" ? (v(), f("polygon", Ce({
|
|
1941
1941
|
key: 5,
|
|
1942
1942
|
ref_for: !0
|
|
1943
|
-
}, a), null, 16)) :
|
|
1943
|
+
}, a), null, 16)) : O("", !0)
|
|
1944
1944
|
], 64))), 128))
|
|
1945
1945
|
], 10, u2));
|
|
1946
1946
|
}
|
|
1947
|
-
}),
|
|
1947
|
+
}), ce = /* @__PURE__ */ U(c2, [["__scopeId", "data-v-dd8423eb"]]), d2 = ["aria-controls"], v2 = ["aria-pressed", "onMousedown", "aria-label"], f2 = { key: 1 }, C2 = /* @__PURE__ */ B({
|
|
1948
1948
|
__name: "FloatingToolbar",
|
|
1949
1949
|
props: {
|
|
1950
1950
|
editor: {},
|
|
@@ -1952,44 +1952,44 @@ const l1 = (e) => {
|
|
|
1952
1952
|
buttons: {}
|
|
1953
1953
|
},
|
|
1954
1954
|
setup(e, { expose: o }) {
|
|
1955
|
-
const t = e, a =
|
|
1955
|
+
const t = e, a = p(0), s = p(0), l = p(!1), i = p([]);
|
|
1956
1956
|
Y(
|
|
1957
|
-
|
|
1958
|
-
(
|
|
1957
|
+
l,
|
|
1958
|
+
(d) => !d && (i.value = [])
|
|
1959
1959
|
);
|
|
1960
|
-
const n =
|
|
1960
|
+
const n = L(() => ({
|
|
1961
1961
|
top: `${s.value}px`,
|
|
1962
1962
|
left: `${a.value}px`
|
|
1963
|
-
})),
|
|
1963
|
+
})), r = (d, C) => d && (i.value[C] = d), c = L(() => [
|
|
1964
1964
|
{
|
|
1965
1965
|
key: "strong",
|
|
1966
1966
|
label: "bold",
|
|
1967
1967
|
type: "icon",
|
|
1968
1968
|
ariaLabel: "Bold",
|
|
1969
|
-
action: (
|
|
1970
|
-
|
|
1969
|
+
action: (d) => {
|
|
1970
|
+
d.restoreSelection(), d.toggleInline("strong"), d.focus(), d.announce(d.isInlineActive("strong") ? "Bold enabled" : "Bold disabled");
|
|
1971
1971
|
},
|
|
1972
|
-
isActive: (
|
|
1972
|
+
isActive: (d) => d.isInlineActive("strong")
|
|
1973
1973
|
},
|
|
1974
1974
|
{
|
|
1975
1975
|
key: "em",
|
|
1976
1976
|
label: "italic",
|
|
1977
1977
|
type: "icon",
|
|
1978
1978
|
ariaLabel: "Italic",
|
|
1979
|
-
action: (
|
|
1980
|
-
|
|
1979
|
+
action: (d) => {
|
|
1980
|
+
d.restoreSelection(), d.toggleInline("em"), d.focus(), d.announce(d.isInlineActive("em") ? "Italic enabled" : "Italic disabled");
|
|
1981
1981
|
},
|
|
1982
|
-
isActive: (
|
|
1982
|
+
isActive: (d) => d.isInlineActive("em")
|
|
1983
1983
|
},
|
|
1984
1984
|
{
|
|
1985
1985
|
key: "h1",
|
|
1986
1986
|
label: "head",
|
|
1987
1987
|
type: "icon",
|
|
1988
1988
|
ariaLabel: "Heading 1",
|
|
1989
|
-
action: (
|
|
1990
|
-
|
|
1989
|
+
action: (d) => {
|
|
1990
|
+
d.restoreSelection(), d.toggleBlock("h1"), d.focus(), d.announce(d.isBlockActive("h1") ? "Heading level 1 enabled" : "Heading level 1 disabled");
|
|
1991
1991
|
},
|
|
1992
|
-
isActive: (
|
|
1992
|
+
isActive: (d) => d.isBlockActive("h1")
|
|
1993
1993
|
},
|
|
1994
1994
|
{
|
|
1995
1995
|
key: "h4",
|
|
@@ -1997,64 +1997,64 @@ const l1 = (e) => {
|
|
|
1997
1997
|
type: "icon",
|
|
1998
1998
|
ariaLabel: "Heading 4",
|
|
1999
1999
|
size: 12,
|
|
2000
|
-
action: (
|
|
2001
|
-
|
|
2000
|
+
action: (d) => {
|
|
2001
|
+
d.restoreSelection(), d.toggleBlock("h4"), d.focus(), d.announce(d.isBlockActive("h4") ? "Heading level 4 enabled" : "Heading level 4 disabled");
|
|
2002
2002
|
},
|
|
2003
|
-
isActive: (
|
|
2003
|
+
isActive: (d) => d.isBlockActive("h4")
|
|
2004
2004
|
},
|
|
2005
2005
|
{
|
|
2006
2006
|
key: "quote",
|
|
2007
2007
|
label: "❝",
|
|
2008
2008
|
type: "text",
|
|
2009
2009
|
ariaLabel: "Blockquote",
|
|
2010
|
-
action: (
|
|
2011
|
-
|
|
2010
|
+
action: (d) => {
|
|
2011
|
+
d.restoreSelection(), d.toggleBlock("blockquote"), d.focus(), d.announce(d.isBlockActive("blockquote") ? "Blockquote enabled" : "Blockquote disabled");
|
|
2012
2012
|
},
|
|
2013
|
-
isActive: (
|
|
2013
|
+
isActive: (d) => d.isBlockActive("blockquote")
|
|
2014
2014
|
}
|
|
2015
|
-
]),
|
|
2016
|
-
...
|
|
2015
|
+
]), u = L(() => [
|
|
2016
|
+
...c.value,
|
|
2017
2017
|
...t.editor?.buttons ?? []
|
|
2018
2018
|
]), h = async () => {
|
|
2019
2019
|
await Le(), i.value[0]?.focus();
|
|
2020
|
-
},
|
|
2021
|
-
const
|
|
2022
|
-
if (
|
|
2023
|
-
|
|
2024
|
-
const
|
|
2025
|
-
|
|
2020
|
+
}, x = (d) => {
|
|
2021
|
+
const C = i.value, V = C.indexOf(document.activeElement);
|
|
2022
|
+
if (d.key === "ArrowRight") {
|
|
2023
|
+
d.preventDefault();
|
|
2024
|
+
const _ = V < C.length - 1 ? V + 1 : 0;
|
|
2025
|
+
C[_]?.focus();
|
|
2026
2026
|
}
|
|
2027
|
-
if (
|
|
2028
|
-
|
|
2029
|
-
const
|
|
2030
|
-
|
|
2027
|
+
if (d.key === "ArrowLeft") {
|
|
2028
|
+
d.preventDefault();
|
|
2029
|
+
const _ = V > 0 ? V - 1 : C.length - 1;
|
|
2030
|
+
C[_]?.focus();
|
|
2031
2031
|
}
|
|
2032
|
-
|
|
2033
|
-
},
|
|
2034
|
-
const
|
|
2035
|
-
if (!
|
|
2036
|
-
|
|
2032
|
+
d.key === "Home" && (d.preventDefault(), C[0]?.focus()), d.key === "End" && (d.preventDefault(), C[C.length - 1]?.focus()), d.key === "Escape" && (d.preventDefault(), t.editor?.restoreSelection(), t.editor?.focus());
|
|
2033
|
+
}, w = () => {
|
|
2034
|
+
const d = window.getSelection();
|
|
2035
|
+
if (!d || d.rangeCount === 0) {
|
|
2036
|
+
l.value = !1;
|
|
2037
2037
|
return;
|
|
2038
2038
|
}
|
|
2039
|
-
const
|
|
2040
|
-
if (!
|
|
2041
|
-
const V =
|
|
2042
|
-
if (!
|
|
2043
|
-
|
|
2039
|
+
const C = t.editor?.rootElement;
|
|
2040
|
+
if (!C) return;
|
|
2041
|
+
const V = d.getRangeAt(0);
|
|
2042
|
+
if (!C.contains(V.commonAncestorContainer) || d.isCollapsed) {
|
|
2043
|
+
l.value = !1;
|
|
2044
2044
|
return;
|
|
2045
2045
|
}
|
|
2046
|
-
const
|
|
2047
|
-
a.value =
|
|
2046
|
+
const _ = V.getBoundingClientRect();
|
|
2047
|
+
a.value = _.left + _.width / 2, s.value = _.top - 45, l.value = !0;
|
|
2048
2048
|
};
|
|
2049
2049
|
return ae(() => {
|
|
2050
|
-
document.addEventListener("selectionchange",
|
|
2050
|
+
document.addEventListener("selectionchange", w), window.addEventListener("scroll", w, !0), window.addEventListener("resize", w);
|
|
2051
2051
|
}), ge(() => {
|
|
2052
|
-
document.removeEventListener("selectionchange",
|
|
2052
|
+
document.removeEventListener("selectionchange", w), window.removeEventListener("scroll", w, !0), window.removeEventListener("resize", w);
|
|
2053
2053
|
}), o({
|
|
2054
2054
|
focusFirstButton: h
|
|
2055
|
-
}), (
|
|
2056
|
-
default:
|
|
2057
|
-
|
|
2055
|
+
}), (d, C) => (v(), J($e, { name: "tooltip-fade" }, {
|
|
2056
|
+
default: W(() => [
|
|
2057
|
+
l.value ? (v(), f("div", {
|
|
2058
2058
|
key: 0,
|
|
2059
2059
|
class: "toolbar",
|
|
2060
2060
|
role: "toolbar",
|
|
@@ -2062,31 +2062,31 @@ const l1 = (e) => {
|
|
|
2062
2062
|
"aria-controls": e.editorId,
|
|
2063
2063
|
style: ye(n.value),
|
|
2064
2064
|
tabindex: "-1",
|
|
2065
|
-
onKeydown:
|
|
2065
|
+
onKeydown: x
|
|
2066
2066
|
}, [
|
|
2067
|
-
|
|
2068
|
-
(v(!0), f(
|
|
2069
|
-
key: V.key ??
|
|
2067
|
+
C[0] || (C[0] = b("div", { class: "arrow" }, null, -1)),
|
|
2068
|
+
(v(!0), f(le, null, ve(u.value, (V, _) => (v(), f("button", {
|
|
2069
|
+
key: V.key ?? _,
|
|
2070
2070
|
type: "button",
|
|
2071
2071
|
ref_for: !0,
|
|
2072
|
-
ref: (
|
|
2073
|
-
class:
|
|
2072
|
+
ref: (g) => r(g, _),
|
|
2073
|
+
class: re({ "is-active": V.isActive?.(t.editor) }),
|
|
2074
2074
|
"aria-pressed": V.isActive?.(t.editor),
|
|
2075
|
-
onMousedown:
|
|
2075
|
+
onMousedown: ne((g) => V.action(t.editor), ["prevent"]),
|
|
2076
2076
|
"aria-label": V.ariaLabel
|
|
2077
2077
|
}, [
|
|
2078
|
-
V.type === "icon" ? (v(),
|
|
2078
|
+
V.type === "icon" ? (v(), J(ce, {
|
|
2079
2079
|
key: 0,
|
|
2080
2080
|
name: V.label,
|
|
2081
2081
|
size: V.size ?? 14
|
|
2082
2082
|
}, null, 8, ["name", "size"])) : (v(), f("span", f2, K(V.label), 1))
|
|
2083
2083
|
], 42, v2))), 128))
|
|
2084
|
-
], 44, d2)) :
|
|
2084
|
+
], 44, d2)) : O("", !0)
|
|
2085
2085
|
]),
|
|
2086
2086
|
_: 1
|
|
2087
2087
|
}));
|
|
2088
2088
|
}
|
|
2089
|
-
}), p2 = /* @__PURE__ */ U(C2, [["__scopeId", "data-v-3f279ebe"]]), m2 = { class: "editor" }, Je = /* @__PURE__ */
|
|
2089
|
+
}), p2 = /* @__PURE__ */ U(C2, [["__scopeId", "data-v-3f279ebe"]]), m2 = { class: "editor" }, Je = /* @__PURE__ */ B({
|
|
2090
2090
|
__name: "Editor",
|
|
2091
2091
|
props: /* @__PURE__ */ te({
|
|
2092
2092
|
ariaLabel: {},
|
|
@@ -2099,31 +2099,31 @@ const l1 = (e) => {
|
|
|
2099
2099
|
}),
|
|
2100
2100
|
emits: ["update:modelValue"],
|
|
2101
2101
|
setup(e) {
|
|
2102
|
-
const o =
|
|
2102
|
+
const o = pe(e, "modelValue"), t = e, a = ue(), s = p(), l = p(null), i = p(null);
|
|
2103
2103
|
return Y(
|
|
2104
2104
|
() => o.value,
|
|
2105
2105
|
(n) => {
|
|
2106
|
-
const
|
|
2107
|
-
|
|
2106
|
+
const r = i.value?.getRoot()?.value;
|
|
2107
|
+
r && r.innerHTML !== n && (r.innerHTML = n, l.value?.normalize());
|
|
2108
2108
|
}
|
|
2109
2109
|
), ae(() => {
|
|
2110
|
-
const
|
|
2111
|
-
if (!
|
|
2112
|
-
|
|
2113
|
-
const
|
|
2114
|
-
|
|
2115
|
-
}), be("announce", (n) =>
|
|
2110
|
+
const r = i.value?.getRoot()?.value;
|
|
2111
|
+
if (!r) return;
|
|
2112
|
+
l.value = T1(r, { buttons: t.buttons ?? [] }), l.value && (l.value.toolbarRef = s);
|
|
2113
|
+
const c = () => o.value = r.innerHTML;
|
|
2114
|
+
r.addEventListener("input", c), ge(() => r.removeEventListener("input", c));
|
|
2115
|
+
}), be("announce", (n) => l.value?.announce(n)), (n, r) => (v(), f("section", m2, [
|
|
2116
2116
|
P(z1, {
|
|
2117
2117
|
ref_key: "contentRef",
|
|
2118
2118
|
ref: i,
|
|
2119
|
-
editor:
|
|
2119
|
+
editor: l.value,
|
|
2120
2120
|
"editor-id": R(a),
|
|
2121
2121
|
"aria-label": e.ariaLabel
|
|
2122
2122
|
}, null, 8, ["editor", "editor-id", "aria-label"]),
|
|
2123
2123
|
P(p2, {
|
|
2124
2124
|
ref_key: "toolbarRef",
|
|
2125
2125
|
ref: s,
|
|
2126
|
-
editor:
|
|
2126
|
+
editor: l.value,
|
|
2127
2127
|
"editor-id": R(a)
|
|
2128
2128
|
}, null, 8, ["editor", "editor-id"])
|
|
2129
2129
|
]));
|
|
@@ -2155,7 +2155,7 @@ const h2 = ["tabindex", "aria-label", "aria-describedby", "aria-busy", "aria-dis
|
|
|
2155
2155
|
}, H2 = { class: "ui-upload__actions" }, B2 = {
|
|
2156
2156
|
class: "sr-only",
|
|
2157
2157
|
"aria-live": "polite"
|
|
2158
|
-
}, _2 = ["id"], R2 = /* @__PURE__ */
|
|
2158
|
+
}, _2 = ["id"], R2 = /* @__PURE__ */ B({
|
|
2159
2159
|
__name: "Upload",
|
|
2160
2160
|
props: /* @__PURE__ */ te({
|
|
2161
2161
|
multiple: { type: Boolean, default: !1 },
|
|
@@ -2173,193 +2173,193 @@ const h2 = ["tabindex", "aria-label", "aria-describedby", "aria-busy", "aria-dis
|
|
|
2173
2173
|
}),
|
|
2174
2174
|
emits: /* @__PURE__ */ te(["select", "upload", "remove"], ["update:modelValue"]),
|
|
2175
2175
|
setup(e, { emit: o }) {
|
|
2176
|
-
const t =
|
|
2177
|
-
a.disabled || (
|
|
2176
|
+
const t = pe(e, "modelValue"), a = e, s = o, l = p(0), i = p(""), n = p(!1), r = ue(), c = p(), u = L(() => t.value), h = L(() => a.maxSize === 1 / 0 ? "Unlimited" : q(a.maxSize)), x = L(() => !a.disabled && (a.multiple || t.value.length === 0)), w = L(() => u.value.some((m) => m.status === "uploading")), d = () => x.value && c.value?.click(), C = () => {
|
|
2177
|
+
a.disabled || (l.value++, n.value = !0);
|
|
2178
2178
|
}, V = () => {
|
|
2179
|
-
|
|
2180
|
-
},
|
|
2181
|
-
if (!a.disabled && !(!a.multiple && t.value.length > 0) && (
|
|
2179
|
+
l.value = Math.max(0, l.value - 1), l.value === 0 && (n.value = !1);
|
|
2180
|
+
}, _ = (m) => {
|
|
2181
|
+
if (!a.disabled && !(!a.multiple && t.value.length > 0) && (l.value = 0, n.value = !1, !!m.dataTransfer)) {
|
|
2182
2182
|
if (!a.multiple && m.dataTransfer?.files.length) {
|
|
2183
|
-
const
|
|
2184
|
-
D([
|
|
2183
|
+
const k = m.dataTransfer.files[0];
|
|
2184
|
+
D([k]);
|
|
2185
2185
|
return;
|
|
2186
2186
|
}
|
|
2187
2187
|
D(Array.from(m.dataTransfer.files));
|
|
2188
2188
|
}
|
|
2189
|
-
},
|
|
2190
|
-
const
|
|
2191
|
-
|
|
2189
|
+
}, g = (m) => {
|
|
2190
|
+
const k = m.target;
|
|
2191
|
+
k.files && (D(Array.from(k.files)), k.value = "");
|
|
2192
2192
|
}, D = (m) => {
|
|
2193
|
-
const
|
|
2194
|
-
for (const
|
|
2195
|
-
if (
|
|
2196
|
-
|
|
2193
|
+
const k = [];
|
|
2194
|
+
for (const G of m) {
|
|
2195
|
+
if (u.value.length + k.length >= a.maxFiles) break;
|
|
2196
|
+
G.size > a.maxSize || k.push({
|
|
2197
2197
|
id: crypto.randomUUID(),
|
|
2198
|
-
file:
|
|
2198
|
+
file: G,
|
|
2199
2199
|
progress: 0,
|
|
2200
2200
|
status: "idle"
|
|
2201
2201
|
});
|
|
2202
2202
|
}
|
|
2203
|
-
if (!
|
|
2204
|
-
s("select",
|
|
2205
|
-
const
|
|
2206
|
-
t.value =
|
|
2207
|
-
},
|
|
2208
|
-
const
|
|
2209
|
-
m.progress = 0, m.error = void 0, m.status = "uploading", m.controller =
|
|
2210
|
-
const
|
|
2211
|
-
|
|
2203
|
+
if (!k.length) return;
|
|
2204
|
+
s("select", k.map((G) => G.file));
|
|
2205
|
+
const E = [...u.value, ...k];
|
|
2206
|
+
t.value = E, a.autoUpload && k.forEach(S);
|
|
2207
|
+
}, S = (m) => {
|
|
2208
|
+
const k = new AbortController();
|
|
2209
|
+
m.progress = 0, m.error = void 0, m.status = "uploading", m.controller = k, Z(`Started uploading ${m.file.name}`);
|
|
2210
|
+
const E = () => {
|
|
2211
|
+
k.signal.removeEventListener("abort", E);
|
|
2212
2212
|
};
|
|
2213
|
-
|
|
2214
|
-
const
|
|
2215
|
-
signal:
|
|
2216
|
-
onProgress: (
|
|
2217
|
-
m.progress =
|
|
2213
|
+
k.signal.addEventListener("abort", E);
|
|
2214
|
+
const G = {
|
|
2215
|
+
signal: k.signal,
|
|
2216
|
+
onProgress: (I) => {
|
|
2217
|
+
m.progress = I, H();
|
|
2218
2218
|
},
|
|
2219
2219
|
done: () => {
|
|
2220
|
-
m.status = "success", m.progress = 100, m.controller = void 0, Z(`Finished uploading ${m.file.name}`),
|
|
2220
|
+
m.status = "success", m.progress = 100, m.controller = void 0, Z(`Finished uploading ${m.file.name}`), H();
|
|
2221
2221
|
},
|
|
2222
|
-
fail: (
|
|
2223
|
-
m.status = "error", m.error =
|
|
2222
|
+
fail: (I) => {
|
|
2223
|
+
m.status = "error", m.error = I, m.controller = void 0, Z(`Failed to upload ${m.file.name}: ${I}`), H();
|
|
2224
2224
|
}
|
|
2225
2225
|
};
|
|
2226
|
-
s("upload", m,
|
|
2227
|
-
},
|
|
2228
|
-
m.controller && (m.controller.abort(), m.status = "canceled", m.controller = void 0, Z(`Canceled uploading ${m.file.name}`),
|
|
2229
|
-
},
|
|
2230
|
-
m.status !== "error" && m.status !== "canceled" ||
|
|
2231
|
-
},
|
|
2232
|
-
const
|
|
2233
|
-
let
|
|
2234
|
-
for (; m >= 1024 &&
|
|
2235
|
-
m /= 1024,
|
|
2236
|
-
return `${m.toFixed(2)} ${
|
|
2226
|
+
s("upload", m, G);
|
|
2227
|
+
}, y = (m) => {
|
|
2228
|
+
m.controller && (m.controller.abort(), m.status = "canceled", m.controller = void 0, Z(`Canceled uploading ${m.file.name}`), H());
|
|
2229
|
+
}, M = (m) => {
|
|
2230
|
+
m.status !== "error" && m.status !== "canceled" || S(m);
|
|
2231
|
+
}, H = () => t.value = [...u.value], q = (m) => {
|
|
2232
|
+
const k = ["B", "KB", "MB", "GB", "TB"];
|
|
2233
|
+
let E = 0;
|
|
2234
|
+
for (; m >= 1024 && E < k.length - 1; )
|
|
2235
|
+
m /= 1024, E++;
|
|
2236
|
+
return `${m.toFixed(2)} ${k[E]}`;
|
|
2237
2237
|
}, Z = (m) => {
|
|
2238
2238
|
i.value = "", requestAnimationFrame(() => {
|
|
2239
2239
|
i.value = m;
|
|
2240
2240
|
});
|
|
2241
|
-
},
|
|
2242
|
-
m.controller && m.controller.abort(), s("remove", m), t.value =
|
|
2241
|
+
}, N = (m) => {
|
|
2242
|
+
m.controller && m.controller.abort(), s("remove", m), t.value = u.value.filter((k) => k.id !== m.id);
|
|
2243
2243
|
};
|
|
2244
|
-
return (m,
|
|
2244
|
+
return (m, k) => (v(), f("div", {
|
|
2245
2245
|
role: "button",
|
|
2246
2246
|
class: "ui-upload",
|
|
2247
2247
|
tabindex: e.disabled ? -1 : 0,
|
|
2248
2248
|
"aria-label": e.ariaLabel || "File upload area",
|
|
2249
|
-
"aria-describedby": n.value ? R(
|
|
2250
|
-
"aria-busy":
|
|
2249
|
+
"aria-describedby": n.value ? R(r) : void 0,
|
|
2250
|
+
"aria-busy": w.value ? "true" : void 0,
|
|
2251
2251
|
"aria-disabled": e.disabled ? "true" : void 0,
|
|
2252
2252
|
"data-disabled": e.disabled || void 0,
|
|
2253
2253
|
"data-dragging": n.value || void 0,
|
|
2254
|
-
onClick:
|
|
2254
|
+
onClick: k[0] || (k[0] = (E) => !e.disabled && d()),
|
|
2255
2255
|
onKeydown: [
|
|
2256
|
-
|
|
2257
|
-
|
|
2256
|
+
k[1] || (k[1] = de(ne((E) => !e.disabled && d(), ["stop", "prevent"]), ["enter"])),
|
|
2257
|
+
k[2] || (k[2] = de(ne((E) => !e.disabled && d(), ["prevent"]), ["space"]))
|
|
2258
2258
|
],
|
|
2259
|
-
onDragover:
|
|
2259
|
+
onDragover: k[3] || (k[3] = ne((E) => !e.disabled && C(), ["prevent"])),
|
|
2260
2260
|
onDragleave: V,
|
|
2261
|
-
onDrop:
|
|
2261
|
+
onDrop: k[4] || (k[4] = ne((E) => !e.disabled && _(E), ["prevent"]))
|
|
2262
2262
|
}, [
|
|
2263
2263
|
b("input", {
|
|
2264
2264
|
type: "file",
|
|
2265
2265
|
ref_key: "inputRef",
|
|
2266
|
-
ref:
|
|
2266
|
+
ref: c,
|
|
2267
2267
|
class: "ui-upload__input",
|
|
2268
2268
|
multiple: e.multiple,
|
|
2269
2269
|
accept: e.accept,
|
|
2270
2270
|
disabled: e.disabled,
|
|
2271
|
-
onChange:
|
|
2271
|
+
onChange: g
|
|
2272
2272
|
}, null, 40, y2),
|
|
2273
2273
|
e.multiple || !e.multiple && t.value.length === 0 ? j(m.$slots, "default", {
|
|
2274
2274
|
key: 0,
|
|
2275
2275
|
dragging: n.value
|
|
2276
2276
|
}, () => [
|
|
2277
|
-
P(
|
|
2277
|
+
P(ce, {
|
|
2278
2278
|
name: "upload",
|
|
2279
2279
|
size: 32
|
|
2280
2280
|
}),
|
|
2281
|
-
|
|
2282
|
-
|
|
2281
|
+
k[6] || (k[6] = b("p", null, "Drag and Drop files here", -1)),
|
|
2282
|
+
k[7] || (k[7] = b("span", null, "or", -1)),
|
|
2283
2283
|
P(he, {
|
|
2284
2284
|
type: "button",
|
|
2285
2285
|
class: "btn btn-outline"
|
|
2286
2286
|
}, {
|
|
2287
|
-
default:
|
|
2287
|
+
default: W(() => [...k[5] || (k[5] = [
|
|
2288
2288
|
me("Choose File", -1)
|
|
2289
2289
|
])]),
|
|
2290
2290
|
_: 1
|
|
2291
2291
|
}),
|
|
2292
2292
|
b("span", null, "Maximum size: " + K(h.value), 1)
|
|
2293
|
-
], !0) :
|
|
2294
|
-
|
|
2295
|
-
(v(!0), f(
|
|
2296
|
-
key:
|
|
2293
|
+
], !0) : O("", !0),
|
|
2294
|
+
u.value?.length ? (v(), f("ul", b2, [
|
|
2295
|
+
(v(!0), f(le, null, ve(u.value, (E) => (v(), f("li", {
|
|
2296
|
+
key: E.id,
|
|
2297
2297
|
class: "ui-upload__item"
|
|
2298
2298
|
}, [
|
|
2299
2299
|
j(m.$slots, "file", {
|
|
2300
|
-
file:
|
|
2301
|
-
remove: () =>
|
|
2302
|
-
cancel: () =>
|
|
2303
|
-
retry: () =>
|
|
2300
|
+
file: E,
|
|
2301
|
+
remove: () => N(E),
|
|
2302
|
+
cancel: () => y(E),
|
|
2303
|
+
retry: () => M(E)
|
|
2304
2304
|
}, () => [
|
|
2305
2305
|
b("div", g2, [
|
|
2306
|
-
b("span", k2, K(
|
|
2307
|
-
b("span", w2, K(
|
|
2306
|
+
b("span", k2, K(E.file.name), 1),
|
|
2307
|
+
b("span", w2, K(q(E.file.size)), 1)
|
|
2308
2308
|
]),
|
|
2309
|
-
|
|
2310
|
-
b("span", L2, K(
|
|
2309
|
+
E.status === "uploading" ? (v(), f("div", M2, [
|
|
2310
|
+
b("span", L2, K(E.progress) + "% ", 1),
|
|
2311
2311
|
b("progress", {
|
|
2312
2312
|
class: "ui-upload__progress",
|
|
2313
|
-
value:
|
|
2313
|
+
value: E.progress,
|
|
2314
2314
|
max: "100",
|
|
2315
|
-
"aria-label": `Upload progress for ${
|
|
2315
|
+
"aria-label": `Upload progress for ${E.file.name}`
|
|
2316
2316
|
}, null, 8, x2)
|
|
2317
|
-
])) :
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2317
|
+
])) : O("", !0),
|
|
2318
|
+
E.status === "success" ? (v(), f("span", $2, " Uploaded successful ")) : O("", !0),
|
|
2319
|
+
E.status === "error" ? (v(), f("span", V2, K(E.error || "Upload failed"), 1)) : O("", !0),
|
|
2320
|
+
E.status === "canceled" ? (v(), f("span", I2, " Upload canceled ")) : O("", !0),
|
|
2321
2321
|
b("div", H2, [
|
|
2322
|
-
|
|
2322
|
+
E.status === "uploading" ? (v(), J(he, {
|
|
2323
2323
|
key: 0,
|
|
2324
2324
|
type: "button",
|
|
2325
2325
|
class: "btn-danger btn-xs",
|
|
2326
|
-
onClick:
|
|
2326
|
+
onClick: ne((G) => y(E), ["stop"])
|
|
2327
2327
|
}, {
|
|
2328
|
-
default:
|
|
2328
|
+
default: W(() => [...k[8] || (k[8] = [
|
|
2329
2329
|
me(" Cancel ", -1)
|
|
2330
2330
|
])]),
|
|
2331
2331
|
_: 1
|
|
2332
|
-
}, 8, ["onClick"])) :
|
|
2333
|
-
|
|
2332
|
+
}, 8, ["onClick"])) : O("", !0),
|
|
2333
|
+
E.status === "error" || E.status === "canceled" ? (v(), J(he, {
|
|
2334
2334
|
key: 1,
|
|
2335
2335
|
type: "button",
|
|
2336
2336
|
class: "btn-info btn-xs",
|
|
2337
|
-
onClick:
|
|
2337
|
+
onClick: ne((G) => M(E), ["stop"])
|
|
2338
2338
|
}, {
|
|
2339
|
-
default:
|
|
2339
|
+
default: W(() => [...k[9] || (k[9] = [
|
|
2340
2340
|
me(" Retry ", -1)
|
|
2341
2341
|
])]),
|
|
2342
2342
|
_: 1
|
|
2343
|
-
}, 8, ["onClick"])) :
|
|
2344
|
-
|
|
2343
|
+
}, 8, ["onClick"])) : O("", !0),
|
|
2344
|
+
E.status !== "uploading" ? (v(), J(he, {
|
|
2345
2345
|
key: 2,
|
|
2346
2346
|
type: "button",
|
|
2347
2347
|
class: "btn-outline btn-xs",
|
|
2348
|
-
onClick:
|
|
2348
|
+
onClick: ne((G) => N(E), ["stop"]),
|
|
2349
2349
|
"aria-label": "Remove file"
|
|
2350
2350
|
}, {
|
|
2351
|
-
default:
|
|
2351
|
+
default: W(() => [...k[10] || (k[10] = [
|
|
2352
2352
|
me(" Remove ", -1)
|
|
2353
2353
|
])]),
|
|
2354
2354
|
_: 1
|
|
2355
|
-
}, 8, ["onClick"])) :
|
|
2355
|
+
}, 8, ["onClick"])) : O("", !0)
|
|
2356
2356
|
])
|
|
2357
2357
|
], !0)
|
|
2358
2358
|
]))), 128))
|
|
2359
|
-
])) :
|
|
2359
|
+
])) : O("", !0),
|
|
2360
2360
|
b("div", B2, K(i.value), 1),
|
|
2361
2361
|
b("p", {
|
|
2362
|
-
id: R(
|
|
2362
|
+
id: R(r),
|
|
2363
2363
|
class: "sr-only"
|
|
2364
2364
|
}, " Drop files to upload ", 8, _2)
|
|
2365
2365
|
], 40, h2));
|
|
@@ -2373,7 +2373,7 @@ const Z2 = (e) => {
|
|
|
2373
2373
|
return window.addEventListener("scroll", o, !0), window.addEventListener("resize", t), () => {
|
|
2374
2374
|
window.removeEventListener("scroll", o, !0), window.removeEventListener("resize", t);
|
|
2375
2375
|
};
|
|
2376
|
-
}, A2 = ["aria-describedby", "aria-disabled", "aria-expanded"], T2 = ["aria-hidden", "data-placement"], S2 = 8, E2 = 6, D2 = /* @__PURE__ */
|
|
2376
|
+
}, A2 = ["aria-describedby", "aria-disabled", "aria-expanded"], T2 = ["aria-hidden", "data-placement"], S2 = 8, E2 = 6, D2 = /* @__PURE__ */ B({
|
|
2377
2377
|
__name: "Tooltip",
|
|
2378
2378
|
props: {
|
|
2379
2379
|
content: {},
|
|
@@ -2382,64 +2382,64 @@ const Z2 = (e) => {
|
|
|
2382
2382
|
disabled: { type: Boolean, default: !1 }
|
|
2383
2383
|
},
|
|
2384
2384
|
setup(e) {
|
|
2385
|
-
const o = e, t = S2 + E2, a =
|
|
2386
|
-
let
|
|
2385
|
+
const o = e, t = S2 + E2, a = p(!1), s = `tooltip-${ue()}`, l = p(null), i = p(null), n = p({});
|
|
2386
|
+
let r = null, c = null, u = null;
|
|
2387
2387
|
const h = () => {
|
|
2388
|
-
o.disabled || (
|
|
2389
|
-
a.value = !0,
|
|
2388
|
+
o.disabled || (r && (clearTimeout(r), r = null), o.delay ? r = window.setTimeout(() => {
|
|
2389
|
+
a.value = !0, r = null;
|
|
2390
2390
|
}, o.delay) : a.value = !0);
|
|
2391
|
-
},
|
|
2392
|
-
|
|
2393
|
-
},
|
|
2394
|
-
if (!
|
|
2395
|
-
const
|
|
2391
|
+
}, x = () => {
|
|
2392
|
+
r && (clearTimeout(r), r = null), a.value = !1;
|
|
2393
|
+
}, w = () => {
|
|
2394
|
+
if (!l.value || !i.value) return {};
|
|
2395
|
+
const C = l.value.getBoundingClientRect(), V = i.value.getBoundingClientRect(), _ = {
|
|
2396
2396
|
position: "fixed"
|
|
2397
2397
|
};
|
|
2398
2398
|
switch (o.placement) {
|
|
2399
2399
|
case "top":
|
|
2400
|
-
|
|
2400
|
+
_.left = `${C.left + C.width / 2 - V.width / 2}px`, _.top = `${C.top - V.height - t}px`;
|
|
2401
2401
|
break;
|
|
2402
2402
|
case "bottom":
|
|
2403
|
-
|
|
2403
|
+
_.left = `${C.left + C.width / 2 - V.width / 2}px`, _.top = `${C.bottom + t}px`;
|
|
2404
2404
|
break;
|
|
2405
2405
|
case "left":
|
|
2406
|
-
|
|
2406
|
+
_.left = `${C.left - V.width - t}px`, _.top = `${C.top + C.height / 2 - V.height / 2}px`;
|
|
2407
2407
|
break;
|
|
2408
2408
|
case "right":
|
|
2409
|
-
|
|
2409
|
+
_.left = `${C.right + t}px`, _.top = `${C.top + C.height / 2 - V.height / 2}px`;
|
|
2410
2410
|
break;
|
|
2411
2411
|
}
|
|
2412
|
-
return
|
|
2413
|
-
},
|
|
2414
|
-
n.value =
|
|
2412
|
+
return _;
|
|
2413
|
+
}, d = () => {
|
|
2414
|
+
n.value = w();
|
|
2415
2415
|
};
|
|
2416
|
-
return Y(a, async (
|
|
2417
|
-
if (!
|
|
2418
|
-
|
|
2416
|
+
return Y(a, async (C) => {
|
|
2417
|
+
if (!C) {
|
|
2418
|
+
c?.(), c = null, u?.disconnect(), u = null;
|
|
2419
2419
|
return;
|
|
2420
2420
|
}
|
|
2421
|
-
await Le(),
|
|
2421
|
+
await Le(), d(), c = Z2(d), u = new ResizeObserver(d), i.value && u.observe(i.value), l.value && u.observe(l.value);
|
|
2422
2422
|
}), He(() => {
|
|
2423
|
-
|
|
2424
|
-
}), (
|
|
2423
|
+
c?.(), u?.disconnect();
|
|
2424
|
+
}), (C, V) => (v(), f(le, null, [
|
|
2425
2425
|
b("span", {
|
|
2426
2426
|
ref_key: "triggerRef",
|
|
2427
|
-
ref:
|
|
2427
|
+
ref: l,
|
|
2428
2428
|
class: "tooltip-trigger",
|
|
2429
2429
|
"aria-describedby": a.value ? s : void 0,
|
|
2430
2430
|
"aria-disabled": e.disabled || void 0,
|
|
2431
2431
|
"aria-expanded": a.value || void 0,
|
|
2432
2432
|
onMouseenter: h,
|
|
2433
|
-
onMouseleave:
|
|
2433
|
+
onMouseleave: x,
|
|
2434
2434
|
onFocus: h,
|
|
2435
|
-
onBlur:
|
|
2436
|
-
onKeydown:
|
|
2435
|
+
onBlur: x,
|
|
2436
|
+
onKeydown: de(x, ["esc"])
|
|
2437
2437
|
}, [
|
|
2438
|
-
j(
|
|
2438
|
+
j(C.$slots, "default", {}, void 0, !0)
|
|
2439
2439
|
], 40, A2),
|
|
2440
|
-
(v(),
|
|
2440
|
+
(v(), J(Be, { to: "body" }, [
|
|
2441
2441
|
P($e, { name: "tooltip-fade" }, {
|
|
2442
|
-
default:
|
|
2442
|
+
default: W(() => [
|
|
2443
2443
|
a.value ? (v(), f("div", {
|
|
2444
2444
|
key: 0,
|
|
2445
2445
|
ref_key: "tooltipRef",
|
|
@@ -2453,10 +2453,10 @@ const Z2 = (e) => {
|
|
|
2453
2453
|
style: ye(n.value)
|
|
2454
2454
|
}, [
|
|
2455
2455
|
V[0] || (V[0] = b("div", { class: "tooltip-arrow" }, null, -1)),
|
|
2456
|
-
j(
|
|
2456
|
+
j(C.$slots, "content", {}, () => [
|
|
2457
2457
|
me(K(e.content), 1)
|
|
2458
2458
|
], !0)
|
|
2459
|
-
], 12, T2)) :
|
|
2459
|
+
], 12, T2)) : O("", !0)
|
|
2460
2460
|
]),
|
|
2461
2461
|
_: 3
|
|
2462
2462
|
})
|
|
@@ -2470,7 +2470,7 @@ Qe.install = (e) => {
|
|
|
2470
2470
|
const z2 = {
|
|
2471
2471
|
key: 0,
|
|
2472
2472
|
class: "ui-tag__icon"
|
|
2473
|
-
}, O2 = { class: "ui-tag__label" }, q2 = ["aria-label"], N2 = /* @__PURE__ */
|
|
2473
|
+
}, O2 = { class: "ui-tag__label" }, q2 = ["aria-label"], N2 = /* @__PURE__ */ B({
|
|
2474
2474
|
__name: "Tag",
|
|
2475
2475
|
props: {
|
|
2476
2476
|
as: { default: "span" },
|
|
@@ -2483,53 +2483,53 @@ const z2 = {
|
|
|
2483
2483
|
},
|
|
2484
2484
|
emits: ["click", "remove"],
|
|
2485
2485
|
setup(e, { emit: o }) {
|
|
2486
|
-
const t = e, a = o, s =
|
|
2486
|
+
const t = e, a = o, s = p(), l = L(() => t.clickable || t.as === "button" || t.as === "a"), i = L(() => [
|
|
2487
2487
|
`ui-tag--${t.variant}`,
|
|
2488
2488
|
`ui-tag--${t.size}`,
|
|
2489
2489
|
{
|
|
2490
2490
|
"is-clickable": t.clickable,
|
|
2491
2491
|
"is-removable": t.removable
|
|
2492
2492
|
}
|
|
2493
|
-
]), n =
|
|
2494
|
-
t.disabled || !
|
|
2495
|
-
},
|
|
2496
|
-
return (
|
|
2493
|
+
]), n = L(() => t.clickable && t.as !== "button" && t.as !== "a"), r = (u) => {
|
|
2494
|
+
t.disabled || !l.value || a("click", u);
|
|
2495
|
+
}, c = () => a("remove");
|
|
2496
|
+
return (u, h) => (v(), J(Ve(e.as), {
|
|
2497
2497
|
ref_key: "rootRef",
|
|
2498
2498
|
ref: s,
|
|
2499
|
-
class:
|
|
2499
|
+
class: re(["ui-tag", i.value]),
|
|
2500
2500
|
"aria-disabled": e.disabled || void 0,
|
|
2501
2501
|
tabindex: e.disabled ? -1 : n.value ? 0 : void 0,
|
|
2502
2502
|
role: n.value ? "button" : void 0,
|
|
2503
|
-
onClick:
|
|
2503
|
+
onClick: r,
|
|
2504
2504
|
onKeydown: [
|
|
2505
|
-
h[0] || (h[0] =
|
|
2506
|
-
h[1] || (h[1] =
|
|
2505
|
+
h[0] || (h[0] = de(ne((x) => !e.disabled && l.value && r(x), ["prevent"]), ["enter"])),
|
|
2506
|
+
h[1] || (h[1] = de(ne((x) => !e.disabled && l.value && r(x), ["prevent"]), ["space"]))
|
|
2507
2507
|
]
|
|
2508
2508
|
}, {
|
|
2509
|
-
default:
|
|
2510
|
-
|
|
2511
|
-
j(
|
|
2512
|
-
])) :
|
|
2509
|
+
default: W(() => [
|
|
2510
|
+
u.$slots.icon ? (v(), f("span", z2, [
|
|
2511
|
+
j(u.$slots, "icon", {}, void 0, !0)
|
|
2512
|
+
])) : O("", !0),
|
|
2513
2513
|
b("span", O2, [
|
|
2514
|
-
j(
|
|
2514
|
+
j(u.$slots, "default", {}, void 0, !0)
|
|
2515
2515
|
]),
|
|
2516
2516
|
e.removable ? (v(), f("button", {
|
|
2517
2517
|
key: 1,
|
|
2518
2518
|
class: "ui-tag__remove",
|
|
2519
2519
|
type: "button",
|
|
2520
2520
|
"aria-label": `Remove ${e.textContent}`,
|
|
2521
|
-
onClick:
|
|
2521
|
+
onClick: ne(c, ["stop"])
|
|
2522
2522
|
}, [
|
|
2523
|
-
P(
|
|
2523
|
+
P(ce, {
|
|
2524
2524
|
name: "close",
|
|
2525
2525
|
size: 32
|
|
2526
2526
|
})
|
|
2527
|
-
], 8, q2)) :
|
|
2527
|
+
], 8, q2)) : O("", !0)
|
|
2528
2528
|
]),
|
|
2529
2529
|
_: 3
|
|
2530
2530
|
}, 40, ["class", "aria-disabled", "tabindex", "role"]));
|
|
2531
2531
|
}
|
|
2532
|
-
}), F2 = /* @__PURE__ */ U(N2, [["__scopeId", "data-v-ea48b943"]]), K2 = ["href", "aria-disabled", "tabindex", "target", "aria-current", "rel"], P2 = /* @__PURE__ */
|
|
2532
|
+
}), F2 = /* @__PURE__ */ U(N2, [["__scopeId", "data-v-ea48b943"]]), K2 = ["href", "aria-disabled", "tabindex", "target", "aria-current", "rel"], P2 = /* @__PURE__ */ B({
|
|
2533
2533
|
__name: "Link",
|
|
2534
2534
|
props: {
|
|
2535
2535
|
target: {},
|
|
@@ -2539,14 +2539,14 @@ const z2 = {
|
|
|
2539
2539
|
},
|
|
2540
2540
|
emits: ["click"],
|
|
2541
2541
|
setup(e, { emit: o }) {
|
|
2542
|
-
const t = e, a = o, s = (
|
|
2543
|
-
if (t.disabled ||
|
|
2544
|
-
|
|
2542
|
+
const t = e, a = o, s = (l) => {
|
|
2543
|
+
if (t.disabled || l.button !== 0) {
|
|
2544
|
+
l.preventDefault();
|
|
2545
2545
|
return;
|
|
2546
2546
|
}
|
|
2547
|
-
a("click",
|
|
2547
|
+
a("click", l);
|
|
2548
2548
|
};
|
|
2549
|
-
return (
|
|
2549
|
+
return (l, i) => (v(), f("a", {
|
|
2550
2550
|
class: "link",
|
|
2551
2551
|
href: e.disabled ? void 0 : e.href,
|
|
2552
2552
|
"aria-disabled": e.disabled ? "true" : void 0,
|
|
@@ -2556,19 +2556,19 @@ const z2 = {
|
|
|
2556
2556
|
"aria-current": e.ariaCurrent,
|
|
2557
2557
|
rel: e.target === "_blank" ? "noopener noreferrer" : void 0
|
|
2558
2558
|
}, [
|
|
2559
|
-
j(
|
|
2559
|
+
j(l.$slots, "default", {}, void 0, !0)
|
|
2560
2560
|
], 8, K2));
|
|
2561
2561
|
}
|
|
2562
|
-
}), po = /* @__PURE__ */ U(P2, [["__scopeId", "data-v-0f5d7308"]]), Ne = (e, o, t, a) =>
|
|
2562
|
+
}), po = /* @__PURE__ */ U(P2, [["__scopeId", "data-v-0f5d7308"]]), Ne = (e, o, t, a) => L(() => {
|
|
2563
2563
|
const s = [];
|
|
2564
2564
|
return e.invalid && e.errorMessage && s.push(t), o.hint && s.push(a), s.length > 0 ? s.join(" ") : void 0;
|
|
2565
|
-
}), _e = (e) =>
|
|
2565
|
+
}), _e = (e) => L(() => Object.keys(e).includes("required") && e.required !== "false" ? "true" : void 0), r1 = (e) => L(() => e.disabled === !0 ? "true" : void 0), Fe = (e, o, t) => {
|
|
2566
2566
|
o && (o.classList.add("focused"), t("focus", e));
|
|
2567
2567
|
}, Ke = (e, o, t, a) => {
|
|
2568
2568
|
we(o, t), t && (t?.classList.remove("focused"), a("blur", e));
|
|
2569
2569
|
}, we = (e, o) => {
|
|
2570
2570
|
!e || !o || (e.value.length > 0 ? o.classList.add("filled") : o.classList.remove("filled"));
|
|
2571
|
-
}, U2 = ["id"], Pe = /* @__PURE__ */
|
|
2571
|
+
}, U2 = ["id"], Pe = /* @__PURE__ */ B({
|
|
2572
2572
|
__name: "Hint",
|
|
2573
2573
|
props: {
|
|
2574
2574
|
hintId: {}
|
|
@@ -2580,9 +2580,9 @@ const z2 = {
|
|
|
2580
2580
|
class: "visually-hidden"
|
|
2581
2581
|
}, [
|
|
2582
2582
|
j(o.$slots, "default")
|
|
2583
|
-
], 8, U2)) :
|
|
2583
|
+
], 8, U2)) : O("", !0);
|
|
2584
2584
|
}
|
|
2585
|
-
}), j2 = ["id"], Ue = /* @__PURE__ */
|
|
2585
|
+
}), j2 = ["id"], Ue = /* @__PURE__ */ B({
|
|
2586
2586
|
__name: "RequiredHint",
|
|
2587
2587
|
props: {
|
|
2588
2588
|
baseId: {},
|
|
@@ -2593,9 +2593,9 @@ const z2 = {
|
|
|
2593
2593
|
key: 0,
|
|
2594
2594
|
id: `${e.baseId}-required-hint`,
|
|
2595
2595
|
class: "visually-hidden"
|
|
2596
|
-
}, " Required field ", 8, j2)) :
|
|
2596
|
+
}, " Required field ", 8, j2)) : O("", !0);
|
|
2597
2597
|
}
|
|
2598
|
-
}), X2 = ["id"], je = /* @__PURE__ */
|
|
2598
|
+
}), X2 = ["id"], je = /* @__PURE__ */ B({
|
|
2599
2599
|
__name: "ErrorMessage",
|
|
2600
2600
|
props: {
|
|
2601
2601
|
errorId: {},
|
|
@@ -2608,9 +2608,9 @@ const z2 = {
|
|
|
2608
2608
|
id: e.errorId,
|
|
2609
2609
|
class: "error-text",
|
|
2610
2610
|
role: "alert"
|
|
2611
|
-
}, K(e.errorMessage), 9, X2)) :
|
|
2611
|
+
}, K(e.errorMessage), 9, X2)) : O("", !0);
|
|
2612
2612
|
}
|
|
2613
|
-
}), G2 = ["for"], W2 = ["id", "type", "value", "required", "aria-invalid", "aria-errormessage", "aria-describedby"], J2 = /* @__PURE__ */
|
|
2613
|
+
}), G2 = ["for"], W2 = ["id", "type", "value", "required", "aria-invalid", "aria-errormessage", "aria-describedby"], J2 = /* @__PURE__ */ B({
|
|
2614
2614
|
__name: "Input",
|
|
2615
2615
|
props: /* @__PURE__ */ te({
|
|
2616
2616
|
id: {},
|
|
@@ -2626,69 +2626,69 @@ const z2 = {
|
|
|
2626
2626
|
}),
|
|
2627
2627
|
emits: /* @__PURE__ */ te(["focus", "blur"], ["update:modelValue"]),
|
|
2628
2628
|
setup(e, { emit: o }) {
|
|
2629
|
-
const t =
|
|
2630
|
-
const { type: D, ...
|
|
2631
|
-
return
|
|
2632
|
-
}),
|
|
2633
|
-
we(
|
|
2634
|
-
const
|
|
2635
|
-
t.value = a.type === "number" ? Number(
|
|
2629
|
+
const t = pe(e, "modelValue"), a = e, s = o, l = Oe(), i = ue(), n = `${i}-error`, r = `${i}-hint`, c = _e(l).value, u = L(() => c ? `${r} ${i}-required-hint` : r), h = L(() => a.invalid === !0 && a.errorMessage ? n : void 0), x = L(() => a.type === "password" ? V.value ? "text" : "password" : a.type), w = L(() => {
|
|
2630
|
+
const { type: D, ...S } = l;
|
|
2631
|
+
return S;
|
|
2632
|
+
}), d = p(null), C = p(null), V = p(!1), _ = () => V.value = !V.value, g = (D) => {
|
|
2633
|
+
we(d.value, C.value);
|
|
2634
|
+
const S = D.target;
|
|
2635
|
+
t.value = a.type === "number" ? Number(S.value) : S.value;
|
|
2636
2636
|
};
|
|
2637
2637
|
return ae(() => {
|
|
2638
|
-
we(
|
|
2639
|
-
}), (D,
|
|
2640
|
-
class:
|
|
2638
|
+
we(d.value, C.value);
|
|
2639
|
+
}), (D, S) => (v(), f("div", {
|
|
2640
|
+
class: re(["input-box", { required: R(c), error: e.invalid }]),
|
|
2641
2641
|
ref_key: "inputBoxRef",
|
|
2642
|
-
ref:
|
|
2642
|
+
ref: C
|
|
2643
2643
|
}, [
|
|
2644
2644
|
b("label", {
|
|
2645
2645
|
for: e.id,
|
|
2646
2646
|
class: "label"
|
|
2647
2647
|
}, K(e.label), 9, G2),
|
|
2648
|
-
b("input",
|
|
2648
|
+
b("input", Ce({
|
|
2649
2649
|
id: e.id,
|
|
2650
|
-
type:
|
|
2651
|
-
},
|
|
2650
|
+
type: x.value
|
|
2651
|
+
}, w.value, {
|
|
2652
2652
|
class: "input",
|
|
2653
|
-
onInput:
|
|
2654
|
-
onFocus:
|
|
2655
|
-
onBlur:
|
|
2653
|
+
onInput: g,
|
|
2654
|
+
onFocus: S[0] || (S[0] = (y) => R(Fe)(y, C.value, s)),
|
|
2655
|
+
onBlur: S[1] || (S[1] = (y) => R(Ke)(y, d.value, C.value, s)),
|
|
2656
2656
|
value: t.value,
|
|
2657
|
-
required: R(
|
|
2657
|
+
required: R(c),
|
|
2658
2658
|
"aria-invalid": e.invalid ? "true" : void 0,
|
|
2659
2659
|
"aria-errormessage": h.value,
|
|
2660
|
-
"aria-describedby": R(Ne)(D.$props, D.$slots, n,
|
|
2660
|
+
"aria-describedby": R(Ne)(D.$props, D.$slots, n, u.value).value,
|
|
2661
2661
|
ref_key: "inputRef",
|
|
2662
|
-
ref:
|
|
2662
|
+
ref: d
|
|
2663
2663
|
}), null, 16, W2),
|
|
2664
|
-
P(Pe, { hintId:
|
|
2665
|
-
default:
|
|
2664
|
+
P(Pe, { hintId: r }, {
|
|
2665
|
+
default: W(() => [
|
|
2666
2666
|
j(D.$slots, "hint", {}, void 0, !0)
|
|
2667
2667
|
]),
|
|
2668
2668
|
_: 3
|
|
2669
2669
|
}),
|
|
2670
2670
|
P(Ue, {
|
|
2671
2671
|
baseId: R(i),
|
|
2672
|
-
isRequired: R(
|
|
2672
|
+
isRequired: R(c)
|
|
2673
2673
|
}, null, 8, ["baseId", "isRequired"]),
|
|
2674
2674
|
P(je, {
|
|
2675
2675
|
errorId: n,
|
|
2676
2676
|
invalid: e.invalid,
|
|
2677
2677
|
errorMessage: e.errorMessage
|
|
2678
2678
|
}, null, 8, ["invalid", "errorMessage"]),
|
|
2679
|
-
e.type === "password" ? (v(),
|
|
2679
|
+
e.type === "password" ? (v(), J(he, Ce({ key: 0 }, Object.keys(D.$attrs).includes("disabled") ? { disabled: !0 } : void 0, {
|
|
2680
2680
|
type: "button",
|
|
2681
2681
|
class: "btn-icon",
|
|
2682
|
-
onClick:
|
|
2682
|
+
onClick: _,
|
|
2683
2683
|
"aria-label": V.value ? "Hide password" : "Show password"
|
|
2684
2684
|
}), {
|
|
2685
|
-
default:
|
|
2686
|
-
P(
|
|
2685
|
+
default: W(() => [
|
|
2686
|
+
P(ce, {
|
|
2687
2687
|
name: V.value ? "eyeOff" : "eye"
|
|
2688
2688
|
}, null, 8, ["name"])
|
|
2689
2689
|
]),
|
|
2690
2690
|
_: 1
|
|
2691
|
-
}, 16, ["aria-label"])) :
|
|
2691
|
+
}, 16, ["aria-label"])) : O("", !0)
|
|
2692
2692
|
], 2));
|
|
2693
2693
|
}
|
|
2694
2694
|
}), mo = /* @__PURE__ */ U(J2, [["__scopeId", "data-v-90332310"]]), Y2 = ["data-size", "data-shape", "aria-label", "aria-busy"], Q2 = {
|
|
@@ -2698,7 +2698,7 @@ const z2 = {
|
|
|
2698
2698
|
key: 2,
|
|
2699
2699
|
class: "ui-avatar__fallback",
|
|
2700
2700
|
"aria-hidden": "true"
|
|
2701
|
-
}, t5 = /* @__PURE__ */
|
|
2701
|
+
}, t5 = /* @__PURE__ */ B({
|
|
2702
2702
|
__name: "Avatar",
|
|
2703
2703
|
props: {
|
|
2704
2704
|
src: {},
|
|
@@ -2708,18 +2708,18 @@ const z2 = {
|
|
|
2708
2708
|
shape: { default: "circle" }
|
|
2709
2709
|
},
|
|
2710
2710
|
setup(e) {
|
|
2711
|
-
const o = e, t =
|
|
2711
|
+
const o = e, t = p("loading"), a = L(() => o.src && t.value !== "error"), s = L(() => o.name ? o.name.split(" ").map((r) => r[0]).slice(0, 2).join("").toUpperCase() : ""), l = L(() => o.alt ? o.alt : o.name ? o.name : "Avatar"), i = () => t.value = "loaded", n = () => t.value = "error";
|
|
2712
2712
|
return Y(
|
|
2713
2713
|
() => o.src,
|
|
2714
2714
|
() => o.src && (t.value = "loading")
|
|
2715
|
-
), ae(() => !o.src && (t.value = "error")), (
|
|
2715
|
+
), ae(() => !o.src && (t.value = "error")), (r, c) => (v(), f("div", {
|
|
2716
2716
|
class: "ui-avatar",
|
|
2717
2717
|
"data-size": e.size,
|
|
2718
2718
|
"data-shape": e.shape,
|
|
2719
|
-
"aria-label": a.value ? void 0 :
|
|
2719
|
+
"aria-label": a.value ? void 0 : l.value,
|
|
2720
2720
|
"aria-busy": t.value === "loading" || void 0
|
|
2721
2721
|
}, [
|
|
2722
|
-
a.value ? (v(),
|
|
2722
|
+
a.value ? (v(), J(xe, {
|
|
2723
2723
|
key: 0,
|
|
2724
2724
|
src: e.src,
|
|
2725
2725
|
alt: e.alt ?? "",
|
|
@@ -2727,13 +2727,13 @@ const z2 = {
|
|
|
2727
2727
|
onLoad: i,
|
|
2728
2728
|
onError: n
|
|
2729
2729
|
}, null, 8, ["src", "alt"])) : t.value === "loading" ? (v(), f("div", Q2)) : (v(), f("div", e5, [
|
|
2730
|
-
j(
|
|
2730
|
+
j(r.$slots, "default", {}, () => [
|
|
2731
2731
|
me(K(s.value), 1)
|
|
2732
2732
|
], !0)
|
|
2733
2733
|
]))
|
|
2734
2734
|
], 8, Y2));
|
|
2735
2735
|
}
|
|
2736
|
-
}), ho = /* @__PURE__ */ U(t5, [["__scopeId", "data-v-e36c822a"]]), a5 = ["id", "aria-expanded", "aria-invalid", "aria-labelledby", "aria-required", "aria-describedby", "aria-activedescendant", "aria-disabled"
|
|
2736
|
+
}), ho = /* @__PURE__ */ U(t5, [["__scopeId", "data-v-e36c822a"]]), a5 = ["id", "aria-expanded", "aria-invalid", "aria-labelledby", "aria-required", "aria-describedby", "aria-activedescendant", "aria-disabled"], o5 = ["innerHTML"], n5 = ["id", "aria-disabled", "aria-selected", "onClick"], l5 = ["innerHTML"], r5 = /* @__PURE__ */ B({
|
|
2737
2737
|
__name: "Select",
|
|
2738
2738
|
props: /* @__PURE__ */ te({
|
|
2739
2739
|
id: {},
|
|
@@ -2747,156 +2747,157 @@ const z2 = {
|
|
|
2747
2747
|
}),
|
|
2748
2748
|
emits: /* @__PURE__ */ te(["focus", "blur", "change", "click"], ["update:modelValue"]),
|
|
2749
2749
|
setup(e, { emit: o }) {
|
|
2750
|
-
const t =
|
|
2751
|
-
Y(
|
|
2752
|
-
|
|
2750
|
+
const t = pe(e, "modelValue"), a = e, s = o, l = p(!1);
|
|
2751
|
+
Y(l, (I) => {
|
|
2752
|
+
I ? document.addEventListener("mousedown", G) : document.removeEventListener("mousedown", G);
|
|
2753
2753
|
});
|
|
2754
|
-
const i = Oe(), n =
|
|
2755
|
-
const
|
|
2756
|
-
|
|
2757
|
-
},
|
|
2758
|
-
const
|
|
2759
|
-
!
|
|
2760
|
-
},
|
|
2761
|
-
|
|
2762
|
-
},
|
|
2763
|
-
const
|
|
2764
|
-
!
|
|
2765
|
-
},
|
|
2766
|
-
if (!
|
|
2767
|
-
|
|
2754
|
+
const i = Oe(), n = p(null), r = p(null), c = L(() => a.id ?? ue()), u = `${c.value}-label`, h = `${c.value}-listbox`, x = `${c.value}-error`, w = `${c.value}-hint`, d = `${c.value}-value`, C = p(null), V = p(null), _ = L(() => C.value !== null ? `${h}-option-${C.value}` : void 0), g = _e(i).value, D = L(() => g ? `${w} ${c.value}-required-hint` : w), S = L(() => l.value && _.value ? _.value : void 0), y = L(() => V.value !== null ? a.options[V.value]?.value : ""), M = (I) => {
|
|
2755
|
+
const T = n.value;
|
|
2756
|
+
T && (T.classList.add("focused"), s("focus", I));
|
|
2757
|
+
}, H = (I) => {
|
|
2758
|
+
const T = I.relatedTarget, oe = n.value;
|
|
2759
|
+
!oe || oe?.contains(T) || (oe.classList.remove("focused"), l.value = !1, s("blur", I));
|
|
2760
|
+
}, q = (I) => {
|
|
2761
|
+
l.value = !l.value, l.value && t.value.toString().length > 0 && (C.value = C.value ?? a.options.findIndex((T) => !T.disabled)), !(!a.options || a.options.length === 0) && s("click", I);
|
|
2762
|
+
}, Z = (I, T) => {
|
|
2763
|
+
const oe = n.value;
|
|
2764
|
+
!oe || I.disabled || (V.value = T, C.value = T, I && I.key && I.key.toString().length > 0 ? oe.classList.add("filled") : oe.classList.remove("filled"), t.value = I.key, s("change", I.key));
|
|
2765
|
+
}, N = (I) => {
|
|
2766
|
+
if (!l.value && ["ArrowDown", "ArrowUp"].includes(I.key)) {
|
|
2767
|
+
l.value = !0, C.value = C.value ?? a.options.findIndex((T) => !T.disabled), I.preventDefault();
|
|
2768
2768
|
return;
|
|
2769
2769
|
}
|
|
2770
|
-
if (
|
|
2771
|
-
if (
|
|
2772
|
-
const
|
|
2773
|
-
|
|
2770
|
+
if (l.value) {
|
|
2771
|
+
if (I.key === "ArrowDown" && (m(1), I.preventDefault()), I.key === "ArrowUp" && (m(-1), I.preventDefault()), I.key === "Home") {
|
|
2772
|
+
const T = k();
|
|
2773
|
+
T >= 0 && (C.value = T), I.preventDefault();
|
|
2774
2774
|
}
|
|
2775
|
-
if (
|
|
2776
|
-
const
|
|
2777
|
-
|
|
2775
|
+
if (I.key === "End") {
|
|
2776
|
+
const T = E();
|
|
2777
|
+
T >= 0 && (C.value = T), I.preventDefault();
|
|
2778
2778
|
}
|
|
2779
|
-
if (
|
|
2780
|
-
if (
|
|
2781
|
-
const
|
|
2782
|
-
if (!
|
|
2783
|
-
|
|
2779
|
+
if (I.key === "Enter" || I.key === " ") {
|
|
2780
|
+
if (C.value === null) return;
|
|
2781
|
+
const T = a.options[C.value];
|
|
2782
|
+
if (!T || T.disabled) return;
|
|
2783
|
+
Z(T, C.value), l.value = !1, I.preventDefault();
|
|
2784
2784
|
}
|
|
2785
|
-
|
|
2785
|
+
I.key === "Escape" && (l.value = !1);
|
|
2786
2786
|
}
|
|
2787
|
-
},
|
|
2788
|
-
if (
|
|
2789
|
-
let
|
|
2787
|
+
}, m = (I) => {
|
|
2788
|
+
if (C.value === null) return;
|
|
2789
|
+
let T = C.value;
|
|
2790
2790
|
do
|
|
2791
|
-
|
|
2792
|
-
while (
|
|
2793
|
-
|
|
2794
|
-
},
|
|
2795
|
-
const
|
|
2796
|
-
!
|
|
2791
|
+
T += I;
|
|
2792
|
+
while (T >= 0 && T < a.options.length && a.options[T]?.disabled);
|
|
2793
|
+
T >= 0 && T < a.options.length && (C.value = T);
|
|
2794
|
+
}, k = () => a.options.findIndex((I) => !I.disabled), E = () => [...a.options].reverse().findIndex((I) => !I.disabled) >= 0 ? a.options.length - 1 - [...a.options].reverse().findIndex((I) => !I.disabled) : -1, G = (I) => {
|
|
2795
|
+
const T = n.value;
|
|
2796
|
+
!T || T.contains(I.target) || (l.value = !1);
|
|
2797
2797
|
};
|
|
2798
2798
|
return He(() => {
|
|
2799
|
-
document.removeEventListener("mousedown",
|
|
2799
|
+
document.removeEventListener("mousedown", G);
|
|
2800
2800
|
}), ae(() => {
|
|
2801
2801
|
if (t.value.toString().length > 0) {
|
|
2802
2802
|
if (!a.options || a.options.length === 0) return;
|
|
2803
|
-
const
|
|
2804
|
-
if (
|
|
2805
|
-
|
|
2806
|
-
const
|
|
2807
|
-
|
|
2803
|
+
const I = a.options.findIndex((T) => T.key === t.value);
|
|
2804
|
+
if (I > -1) {
|
|
2805
|
+
V.value = I, C.value = I;
|
|
2806
|
+
const T = n.value;
|
|
2807
|
+
T && T.classList.add("filled");
|
|
2808
2808
|
}
|
|
2809
2809
|
}
|
|
2810
|
-
}), (
|
|
2810
|
+
}), (I, T) => (v(), f("div", {
|
|
2811
2811
|
ref_key: "selectRef",
|
|
2812
2812
|
ref: n,
|
|
2813
|
-
class:
|
|
2813
|
+
class: re(["select-box", { required: Object.keys(I.$attrs).includes("required"), error: e.invalid }])
|
|
2814
2814
|
}, [
|
|
2815
|
-
b("button", {
|
|
2816
|
-
id:
|
|
2815
|
+
b("button", Ce({
|
|
2816
|
+
id: c.value,
|
|
2817
2817
|
class: "select-btn",
|
|
2818
2818
|
role: "combobox",
|
|
2819
|
-
type: "button"
|
|
2819
|
+
type: "button"
|
|
2820
|
+
}, I.$attrs, {
|
|
2820
2821
|
"aria-haspopup": "listbox",
|
|
2821
|
-
"aria-expanded":
|
|
2822
|
-
"aria-controls":
|
|
2822
|
+
"aria-expanded": l.value,
|
|
2823
|
+
"aria-controls": h,
|
|
2823
2824
|
"aria-invalid": e.invalid ? "true" : void 0,
|
|
2824
|
-
"aria-labelledby": `${
|
|
2825
|
-
"aria-required": R(
|
|
2826
|
-
"aria-describedby": R(Ne)(
|
|
2827
|
-
"aria-activedescendant":
|
|
2828
|
-
"aria-disabled":
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
ref:
|
|
2835
|
-
}, [
|
|
2825
|
+
"aria-labelledby": `${u} ${d}`,
|
|
2826
|
+
"aria-required": R(g),
|
|
2827
|
+
"aria-describedby": R(Ne)(I.$props, I.$slots, x, D.value).value,
|
|
2828
|
+
"aria-activedescendant": S.value,
|
|
2829
|
+
"aria-disabled": R(i).disabled ? "true" : void 0,
|
|
2830
|
+
onBlur: H,
|
|
2831
|
+
onFocus: M,
|
|
2832
|
+
onClick: q,
|
|
2833
|
+
onKeydown: N,
|
|
2834
|
+
ref_key: "buttonRef",
|
|
2835
|
+
ref: r
|
|
2836
|
+
}), [
|
|
2836
2837
|
b("span", {
|
|
2837
|
-
id:
|
|
2838
|
+
id: u,
|
|
2838
2839
|
class: "label"
|
|
2839
2840
|
}, K(e.label), 1),
|
|
2840
2841
|
b("span", {
|
|
2841
|
-
id:
|
|
2842
|
+
id: d,
|
|
2842
2843
|
class: "selected-object",
|
|
2843
2844
|
"aria-live": "polite",
|
|
2844
2845
|
"aria-atomic": "true",
|
|
2845
|
-
innerHTML:
|
|
2846
|
+
innerHTML: y.value
|
|
2846
2847
|
}, null, 8, o5),
|
|
2847
|
-
P(
|
|
2848
|
+
P(ce, {
|
|
2848
2849
|
name: "directionDown",
|
|
2849
2850
|
"aria-hidden": "true"
|
|
2850
2851
|
})
|
|
2851
|
-
],
|
|
2852
|
+
], 16, a5),
|
|
2852
2853
|
P($e, { name: "select" }, {
|
|
2853
|
-
default:
|
|
2854
|
+
default: W(() => [
|
|
2854
2855
|
Ie(b("ul", {
|
|
2855
|
-
id:
|
|
2856
|
+
id: h,
|
|
2856
2857
|
role: "listbox",
|
|
2857
2858
|
class: "options"
|
|
2858
2859
|
}, [
|
|
2859
|
-
(v(!0), f(
|
|
2860
|
-
id: `${
|
|
2861
|
-
key:
|
|
2860
|
+
(v(!0), f(le, null, ve(e.options, (oe, $) => (v(), f("li", {
|
|
2861
|
+
id: `${h}-option-${$}`,
|
|
2862
|
+
key: $,
|
|
2862
2863
|
role: "option",
|
|
2863
|
-
class:
|
|
2864
|
-
"aria-disabled":
|
|
2865
|
-
"aria-selected":
|
|
2866
|
-
onClick: (
|
|
2864
|
+
class: re(["option", { "focus-visible": C.value === $ }]),
|
|
2865
|
+
"aria-disabled": oe.disabled,
|
|
2866
|
+
"aria-selected": V.value === $,
|
|
2867
|
+
onClick: (z) => !oe.disabled && Z(oe, $)
|
|
2867
2868
|
}, [
|
|
2868
2869
|
b("div", {
|
|
2869
2870
|
class: "option-value",
|
|
2870
|
-
innerHTML:
|
|
2871
|
+
innerHTML: oe.value
|
|
2871
2872
|
}, null, 8, l5)
|
|
2872
2873
|
], 10, n5))), 128))
|
|
2873
2874
|
], 512), [
|
|
2874
|
-
[ze,
|
|
2875
|
+
[ze, l.value]
|
|
2875
2876
|
])
|
|
2876
2877
|
]),
|
|
2877
2878
|
_: 1
|
|
2878
2879
|
}),
|
|
2879
|
-
P(Pe, { hintId:
|
|
2880
|
-
default:
|
|
2881
|
-
j(
|
|
2880
|
+
P(Pe, { hintId: w }, {
|
|
2881
|
+
default: W(() => [
|
|
2882
|
+
j(I.$slots, "hint", {}, void 0, !0)
|
|
2882
2883
|
]),
|
|
2883
2884
|
_: 3
|
|
2884
2885
|
}),
|
|
2885
2886
|
P(Ue, {
|
|
2886
|
-
baseId:
|
|
2887
|
-
isRequired: R(
|
|
2887
|
+
baseId: c.value,
|
|
2888
|
+
isRequired: R(g)
|
|
2888
2889
|
}, null, 8, ["baseId", "isRequired"]),
|
|
2889
2890
|
P(je, {
|
|
2890
|
-
errorId:
|
|
2891
|
+
errorId: x,
|
|
2891
2892
|
invalid: e.invalid,
|
|
2892
2893
|
errorMessage: e.errorMessage
|
|
2893
2894
|
}, null, 8, ["invalid", "errorMessage"])
|
|
2894
2895
|
], 2));
|
|
2895
2896
|
}
|
|
2896
|
-
}), yo = /* @__PURE__ */ U(r5, [["__scopeId", "data-v-
|
|
2897
|
+
}), yo = /* @__PURE__ */ U(r5, [["__scopeId", "data-v-ae05bfc1"]]), s5 = ["aria-label"], i5 = ["onKeydown"], u5 = {
|
|
2897
2898
|
key: 1,
|
|
2898
2899
|
class: "rs-gallery-thumbs"
|
|
2899
|
-
}, c5 = ["aria-selected"], d5 = ["onClick"], v5 = /* @__PURE__ */
|
|
2900
|
+
}, c5 = ["aria-selected"], d5 = ["onClick"], v5 = /* @__PURE__ */ B({
|
|
2900
2901
|
__name: "GalleryCarousel",
|
|
2901
2902
|
props: /* @__PURE__ */ te({
|
|
2902
2903
|
images: {},
|
|
@@ -2917,105 +2918,105 @@ const z2 = {
|
|
|
2917
2918
|
}),
|
|
2918
2919
|
emits: /* @__PURE__ */ te(["change"], ["update:modelValue"]),
|
|
2919
2920
|
setup(e, { emit: o }) {
|
|
2920
|
-
const t =
|
|
2921
|
-
|
|
2922
|
-
},
|
|
2923
|
-
|
|
2924
|
-
},
|
|
2925
|
-
if (
|
|
2926
|
-
a.loop &&
|
|
2921
|
+
const t = pe(e, "modelValue"), a = e, s = o, l = p([]), i = p("next"), n = p(null), r = `gallery-caption-${ue()}`, c = p(null), u = L(() => t.value), h = L(() => a.images[u.value]), x = (g, D) => {
|
|
2922
|
+
g && (l.value[D] = g);
|
|
2923
|
+
}, w = (g) => {
|
|
2924
|
+
g !== u.value && (i.value = g > u.value ? "next" : "prev", t.value = g, s("change", g));
|
|
2925
|
+
}, d = () => {
|
|
2926
|
+
if (u.value === a.images.length - 1) {
|
|
2927
|
+
a.loop && w(0);
|
|
2927
2928
|
return;
|
|
2928
2929
|
}
|
|
2929
|
-
|
|
2930
|
-
},
|
|
2931
|
-
if (
|
|
2932
|
-
a.loop &&
|
|
2930
|
+
w(u.value + 1);
|
|
2931
|
+
}, C = () => {
|
|
2932
|
+
if (u.value === 0) {
|
|
2933
|
+
a.loop && w(a.images.length - 1);
|
|
2933
2934
|
return;
|
|
2934
2935
|
}
|
|
2935
|
-
|
|
2936
|
+
w(u.value - 1);
|
|
2936
2937
|
}, V = () => {
|
|
2937
|
-
|
|
2938
|
-
},
|
|
2938
|
+
c.value && (n.value = c.value.offsetHeight);
|
|
2939
|
+
}, _ = () => {
|
|
2939
2940
|
n.value = null;
|
|
2940
2941
|
};
|
|
2941
|
-
return Y(
|
|
2942
|
+
return Y(u, async (g) => {
|
|
2942
2943
|
await Le();
|
|
2943
|
-
const D =
|
|
2944
|
+
const D = l.value[g];
|
|
2944
2945
|
D && D.scrollIntoView({
|
|
2945
2946
|
behavior: window.matchMedia("(prefers-reduced-motion: reduce)").matches ? "auto" : "smooth",
|
|
2946
2947
|
inline: "center",
|
|
2947
2948
|
block: "nearest"
|
|
2948
2949
|
});
|
|
2949
2950
|
}), Y(() => a.images, () => {
|
|
2950
|
-
|
|
2951
|
-
}), (
|
|
2951
|
+
l.value = [];
|
|
2952
|
+
}), (g, D) => (v(), f("div", {
|
|
2952
2953
|
role: "region",
|
|
2953
2954
|
class: "rs-gallery",
|
|
2954
2955
|
"aria-roledescription": "carousel",
|
|
2955
2956
|
"aria-label": e.ariaLabel || "Image gallery",
|
|
2956
2957
|
"aria-live": "polite",
|
|
2957
|
-
"aria-describedby":
|
|
2958
|
+
"aria-describedby": r
|
|
2958
2959
|
}, [
|
|
2959
2960
|
b("div", {
|
|
2960
2961
|
ref_key: "previewRef",
|
|
2961
|
-
ref:
|
|
2962
|
+
ref: c,
|
|
2962
2963
|
tabindex: "0",
|
|
2963
2964
|
class: "rs-gallery-review",
|
|
2964
2965
|
style: ye(n.value ? { height: `${n.value}px` } : void 0),
|
|
2965
2966
|
onKeydown: [
|
|
2966
|
-
|
|
2967
|
-
|
|
2967
|
+
de(ne(C, ["prevent"]), ["left"]),
|
|
2968
|
+
de(ne(d, ["prevent"]), ["right"])
|
|
2968
2969
|
]
|
|
2969
2970
|
}, [
|
|
2970
2971
|
P($e, {
|
|
2971
2972
|
name: `rs-gallery-slide-${i.value}`,
|
|
2972
2973
|
mode: "out-in",
|
|
2973
2974
|
onBeforeLeave: V,
|
|
2974
|
-
onAfterEnter:
|
|
2975
|
+
onAfterEnter: _
|
|
2975
2976
|
}, {
|
|
2976
|
-
default:
|
|
2977
|
-
h.value ? (v(),
|
|
2977
|
+
default: W(() => [
|
|
2978
|
+
h.value ? (v(), J(xe, {
|
|
2978
2979
|
key: h.value.src,
|
|
2979
2980
|
src: h.value.src,
|
|
2980
2981
|
alt: h.value.alt || "",
|
|
2981
2982
|
transform: e.transform
|
|
2982
|
-
}, null, 8, ["src", "alt", "transform"])) :
|
|
2983
|
+
}, null, 8, ["src", "alt", "transform"])) : O("", !0)
|
|
2983
2984
|
]),
|
|
2984
2985
|
_: 1
|
|
2985
2986
|
}, 8, ["name"]),
|
|
2986
|
-
j(
|
|
2987
|
+
j(g.$slots, "overlay", {
|
|
2987
2988
|
image: h.value,
|
|
2988
|
-
index:
|
|
2989
|
+
index: u.value
|
|
2989
2990
|
}, void 0, !0)
|
|
2990
2991
|
], 44, i5),
|
|
2991
2992
|
h.value?.title ? (v(), f("p", {
|
|
2992
2993
|
key: 0,
|
|
2993
|
-
id:
|
|
2994
|
+
id: r,
|
|
2994
2995
|
class: "rs-gallery-caption"
|
|
2995
|
-
}, K(h.value.title), 1)) :
|
|
2996
|
+
}, K(h.value.title), 1)) : O("", !0),
|
|
2996
2997
|
e.showThumbnails ? (v(), f("ul", u5, [
|
|
2997
|
-
(v(!0), f(
|
|
2998
|
-
key:
|
|
2998
|
+
(v(!0), f(le, null, ve(e.images, (S, y) => (v(), f("li", {
|
|
2999
|
+
key: S.src,
|
|
2999
3000
|
ref_for: !0,
|
|
3000
|
-
ref: (
|
|
3001
|
-
"aria-selected":
|
|
3001
|
+
ref: (M) => x(M, y),
|
|
3002
|
+
"aria-selected": u.value === y
|
|
3002
3003
|
}, [
|
|
3003
3004
|
b("button", {
|
|
3004
3005
|
type: "button",
|
|
3005
|
-
class:
|
|
3006
|
-
onClick: (
|
|
3006
|
+
class: re(["rs-gallery-thumb", { active: u.value === y }]),
|
|
3007
|
+
onClick: (M) => w(y)
|
|
3007
3008
|
}, [
|
|
3008
3009
|
P(xe, {
|
|
3009
|
-
src:
|
|
3010
|
-
alt: `Select image ${
|
|
3010
|
+
src: S.src,
|
|
3011
|
+
alt: `Select image ${y + 1}`,
|
|
3011
3012
|
transform: e.transformThumbnails
|
|
3012
3013
|
}, null, 8, ["src", "alt", "transform"])
|
|
3013
3014
|
], 10, d5)
|
|
3014
3015
|
], 8, c5))), 128))
|
|
3015
|
-
])) :
|
|
3016
|
+
])) : O("", !0)
|
|
3016
3017
|
], 8, s5));
|
|
3017
3018
|
}
|
|
3018
|
-
}), s1 = /* @__PURE__ */ U(v5, [["__scopeId", "data-v-dcfacff6"]]), f5 = ["aria-label"], C5 = ["onClick"], p5 = /* @__PURE__ */
|
|
3019
|
+
}), s1 = /* @__PURE__ */ U(v5, [["__scopeId", "data-v-dcfacff6"]]), f5 = ["aria-label"], C5 = ["onClick"], p5 = /* @__PURE__ */ B({
|
|
3019
3020
|
__name: "GalleryGrid",
|
|
3020
3021
|
props: {
|
|
3021
3022
|
images: {},
|
|
@@ -3036,11 +3037,11 @@ const z2 = {
|
|
|
3036
3037
|
role: "list",
|
|
3037
3038
|
"aria-label": e.ariaLabel || "Image grid gallery"
|
|
3038
3039
|
}, [
|
|
3039
|
-
(v(!0), f(
|
|
3040
|
+
(v(!0), f(le, null, ve(e.images, (a, s) => (v(), f("button", {
|
|
3040
3041
|
key: a.src,
|
|
3041
3042
|
type: "button",
|
|
3042
3043
|
class: "grid-item",
|
|
3043
|
-
onClick: (
|
|
3044
|
+
onClick: (l) => o.$emit("change", s)
|
|
3044
3045
|
}, [
|
|
3045
3046
|
P(xe, {
|
|
3046
3047
|
src: a.src,
|
|
@@ -3052,7 +3053,7 @@ const z2 = {
|
|
|
3052
3053
|
}
|
|
3053
3054
|
}), i1 = /* @__PURE__ */ U(p5, [["__scopeId", "data-v-17067a4b"]]), Re = /* @__PURE__ */ Symbol("ModalContext");
|
|
3054
3055
|
let Se = 0, e1 = 0, Ee = null;
|
|
3055
|
-
const De =
|
|
3056
|
+
const De = B({
|
|
3056
3057
|
name: "Modal",
|
|
3057
3058
|
props: {
|
|
3058
3059
|
motion: {
|
|
@@ -3068,50 +3069,50 @@ const De = _({
|
|
|
3068
3069
|
},
|
|
3069
3070
|
emits: ["update:open", "opened", "closed"],
|
|
3070
3071
|
setup(e, { emit: o, slots: t }) {
|
|
3071
|
-
const a =
|
|
3072
|
+
const a = p(!1), s = p(e.open), l = ue(), i = `modal-title-${l}`, n = `modal-desc-${l}`;
|
|
3072
3073
|
Y(() => e.open, (h) => s.value = h), Y(s, (h) => {
|
|
3073
3074
|
o("update:open", h), o(h ? "opened" : "closed");
|
|
3074
3075
|
});
|
|
3075
|
-
const
|
|
3076
|
+
const r = () => s.value = !1, c = L(() => e.motion), u = L(() => e.size);
|
|
3076
3077
|
return be(Re, {
|
|
3077
3078
|
isOpen: s,
|
|
3078
|
-
motion:
|
|
3079
|
-
size:
|
|
3080
|
-
close:
|
|
3079
|
+
motion: c,
|
|
3080
|
+
size: u,
|
|
3081
|
+
close: r,
|
|
3081
3082
|
closeOnOverlay: e.closeOnOverlay,
|
|
3082
3083
|
labelId: i,
|
|
3083
3084
|
descriptionId: n,
|
|
3084
3085
|
hasTitle: a
|
|
3085
3086
|
}), () => t.default?.();
|
|
3086
3087
|
}
|
|
3087
|
-
}), u1 =
|
|
3088
|
+
}), u1 = B({
|
|
3088
3089
|
name: "ModalContent",
|
|
3089
3090
|
setup(e, { slots: o }) {
|
|
3090
|
-
const t =
|
|
3091
|
+
const t = se(Re);
|
|
3091
3092
|
if (!t) throw new Error("ModalContent components must be used inside <Modal>");
|
|
3092
|
-
const a =
|
|
3093
|
-
|
|
3093
|
+
const a = p(null), s = ++Se, l = (u) => {
|
|
3094
|
+
u.key === "Escape" && s === Se && t.close();
|
|
3094
3095
|
};
|
|
3095
3096
|
let i = null;
|
|
3096
|
-
const n = (
|
|
3097
|
+
const n = (u) => {
|
|
3097
3098
|
const h = Array.from(
|
|
3098
|
-
|
|
3099
|
+
u.querySelectorAll(
|
|
3099
3100
|
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
3100
3101
|
)
|
|
3101
|
-
).filter((
|
|
3102
|
+
).filter((C) => !C.hasAttribute("disabled"));
|
|
3102
3103
|
if (h.length === 0) {
|
|
3103
|
-
|
|
3104
|
+
u.setAttribute("tabindex", "-1"), u.focus();
|
|
3104
3105
|
return;
|
|
3105
3106
|
}
|
|
3106
|
-
const
|
|
3107
|
-
|
|
3107
|
+
const x = h[0], w = h[h.length - 1], d = (C) => {
|
|
3108
|
+
C.key === "Tab" && (C.shiftKey && document.activeElement === x ? (C.preventDefault(), w?.focus()) : !C.shiftKey && document.activeElement === w && (C.preventDefault(), x?.focus()));
|
|
3108
3109
|
};
|
|
3109
|
-
|
|
3110
|
-
|
|
3110
|
+
u.addEventListener("keydown", d), x?.focus(), i = () => {
|
|
3111
|
+
u.removeEventListener("keydown", d), i = null;
|
|
3111
3112
|
};
|
|
3112
|
-
},
|
|
3113
|
+
}, r = () => {
|
|
3113
3114
|
++e1 === 1 && (document.body.style.overflow = "hidden");
|
|
3114
|
-
},
|
|
3115
|
+
}, c = () => {
|
|
3115
3116
|
--e1 === 0 && (document.body.style.overflow = "");
|
|
3116
3117
|
};
|
|
3117
3118
|
return () => F(
|
|
@@ -3123,13 +3124,13 @@ const De = _({
|
|
|
3123
3124
|
name: `modal-${t.motion.value}`,
|
|
3124
3125
|
appear: !0,
|
|
3125
3126
|
onEnter: () => {
|
|
3126
|
-
Ee = document.activeElement,
|
|
3127
|
+
Ee = document.activeElement, r();
|
|
3127
3128
|
},
|
|
3128
3129
|
onAfterEnter: () => {
|
|
3129
|
-
a.value && (n(a.value), document.addEventListener("keydown",
|
|
3130
|
+
a.value && (n(a.value), document.addEventListener("keydown", l));
|
|
3130
3131
|
},
|
|
3131
3132
|
onAfterLeave: () => {
|
|
3132
|
-
Se--, document.removeEventListener("keydown",
|
|
3133
|
+
Se--, document.removeEventListener("keydown", l), i?.(), c(), Ee?.focus(), Ee = null;
|
|
3133
3134
|
}
|
|
3134
3135
|
},
|
|
3135
3136
|
{
|
|
@@ -3148,7 +3149,7 @@ const De = _({
|
|
|
3148
3149
|
"aria-labelledby": t.labelId,
|
|
3149
3150
|
"aria-describedby": t.descriptionId,
|
|
3150
3151
|
class: ["modal-content", `modal--${t.size.value}`],
|
|
3151
|
-
onClick: (
|
|
3152
|
+
onClick: (u) => u.stopPropagation()
|
|
3152
3153
|
},
|
|
3153
3154
|
o.default?.()
|
|
3154
3155
|
)
|
|
@@ -3157,32 +3158,32 @@ const De = _({
|
|
|
3157
3158
|
)
|
|
3158
3159
|
);
|
|
3159
3160
|
}
|
|
3160
|
-
}), c1 =
|
|
3161
|
+
}), c1 = B({
|
|
3161
3162
|
name: "ModalTitle",
|
|
3162
3163
|
setup(e, { slots: o }) {
|
|
3163
|
-
const t =
|
|
3164
|
+
const t = se(Re);
|
|
3164
3165
|
if (!t) throw new Error("ModalTitle components must be used inside <Modal>");
|
|
3165
3166
|
return t.hasTitle.value = !0, () => F("h2", { id: t.labelId }, o.default?.());
|
|
3166
3167
|
}
|
|
3167
|
-
}), d1 =
|
|
3168
|
+
}), d1 = B({
|
|
3168
3169
|
name: "ModalHeader",
|
|
3169
3170
|
setup(e, { slots: o }) {
|
|
3170
3171
|
return () => F("div", { class: "modal-header" }, o.default?.());
|
|
3171
3172
|
}
|
|
3172
|
-
}), v1 =
|
|
3173
|
+
}), v1 = B({
|
|
3173
3174
|
name: "ModalBody",
|
|
3174
3175
|
setup(e, { slots: o }) {
|
|
3175
3176
|
return () => F("div", { class: "modal-body" }, o.default?.());
|
|
3176
3177
|
}
|
|
3177
|
-
}), bo =
|
|
3178
|
+
}), bo = B({
|
|
3178
3179
|
name: "ModalFooter",
|
|
3179
3180
|
setup(e, { slots: o }) {
|
|
3180
3181
|
return () => F("div", { class: "modal-footer" }, o.default?.());
|
|
3181
3182
|
}
|
|
3182
|
-
}), f1 =
|
|
3183
|
+
}), f1 = B({
|
|
3183
3184
|
name: "ModalClose",
|
|
3184
3185
|
setup() {
|
|
3185
|
-
const e =
|
|
3186
|
+
const e = se(Re);
|
|
3186
3187
|
if (!e) throw new Error("ModalClose components must be used inside <Modal>");
|
|
3187
3188
|
return () => F(
|
|
3188
3189
|
"button",
|
|
@@ -3192,7 +3193,7 @@ const De = _({
|
|
|
3192
3193
|
"aria-label": "Close modal",
|
|
3193
3194
|
onClick: e.close
|
|
3194
3195
|
},
|
|
3195
|
-
F(
|
|
3196
|
+
F(ce, { name: "close", size: 32 })
|
|
3196
3197
|
);
|
|
3197
3198
|
}
|
|
3198
3199
|
});
|
|
@@ -3201,7 +3202,7 @@ Object.assign(De, {
|
|
|
3201
3202
|
e.component("Modal", De), e.component("ModalBody", v1), e.component("ModalTitle", c1), e.component("ModalClose", f1), e.component("ModalHeader", d1), e.component("ModalContent", u1);
|
|
3202
3203
|
}
|
|
3203
3204
|
});
|
|
3204
|
-
const m5 = /* @__PURE__ */
|
|
3205
|
+
const m5 = /* @__PURE__ */ B({
|
|
3205
3206
|
__name: "GalleryGridWithLightbox",
|
|
3206
3207
|
props: {
|
|
3207
3208
|
images: {},
|
|
@@ -3216,10 +3217,10 @@ const m5 = /* @__PURE__ */ _({
|
|
|
3216
3217
|
},
|
|
3217
3218
|
emits: ["change"],
|
|
3218
3219
|
setup(e) {
|
|
3219
|
-
const o =
|
|
3220
|
-
o.value =
|
|
3220
|
+
const o = p(0), t = p(!1), a = (l) => {
|
|
3221
|
+
o.value = l, t.value = !0;
|
|
3221
3222
|
}, s = () => t.value = !1;
|
|
3222
|
-
return (
|
|
3223
|
+
return (l, i) => (v(), f(le, null, [
|
|
3223
3224
|
P(i1, {
|
|
3224
3225
|
images: e.images,
|
|
3225
3226
|
onChange: a,
|
|
@@ -3232,13 +3233,13 @@ const m5 = /* @__PURE__ */ _({
|
|
|
3232
3233
|
motion: "fade",
|
|
3233
3234
|
size: "xl"
|
|
3234
3235
|
}, {
|
|
3235
|
-
default:
|
|
3236
|
+
default: W(() => [
|
|
3236
3237
|
P(R(u1), null, {
|
|
3237
|
-
default:
|
|
3238
|
+
default: W(() => [
|
|
3238
3239
|
P(R(d1), null, {
|
|
3239
|
-
default:
|
|
3240
|
+
default: W(() => [
|
|
3240
3241
|
P(R(c1), null, {
|
|
3241
|
-
default:
|
|
3242
|
+
default: W(() => [...i[3] || (i[3] = [
|
|
3242
3243
|
me("Image Gallery", -1)
|
|
3243
3244
|
])]),
|
|
3244
3245
|
_: 1
|
|
@@ -3248,12 +3249,12 @@ const m5 = /* @__PURE__ */ _({
|
|
|
3248
3249
|
_: 1
|
|
3249
3250
|
}),
|
|
3250
3251
|
P(R(v1), null, {
|
|
3251
|
-
default:
|
|
3252
|
+
default: W(() => [
|
|
3252
3253
|
P(s1, {
|
|
3253
3254
|
modelValue: o.value,
|
|
3254
3255
|
"onUpdate:modelValue": i[0] || (i[0] = (n) => o.value = n),
|
|
3255
3256
|
images: e.images,
|
|
3256
|
-
onChange: i[1] || (i[1] = (n) =>
|
|
3257
|
+
onChange: i[1] || (i[1] = (n) => l.$emit("change", n)),
|
|
3257
3258
|
onClose: s,
|
|
3258
3259
|
"aria-label": e.ariaLabel,
|
|
3259
3260
|
"transform-thumbnails": e.transform
|
|
@@ -3269,7 +3270,7 @@ const m5 = /* @__PURE__ */ _({
|
|
|
3269
3270
|
}, 8, ["open"])
|
|
3270
3271
|
], 64));
|
|
3271
3272
|
}
|
|
3272
|
-
}), h5 = { class: "rs-gallery-masonry" }, y5 = /* @__PURE__ */
|
|
3273
|
+
}), h5 = { class: "rs-gallery-masonry" }, y5 = /* @__PURE__ */ B({
|
|
3273
3274
|
__name: "GalleryMasonry",
|
|
3274
3275
|
props: {
|
|
3275
3276
|
images: {},
|
|
@@ -3284,7 +3285,7 @@ const m5 = /* @__PURE__ */ _({
|
|
|
3284
3285
|
},
|
|
3285
3286
|
setup(e) {
|
|
3286
3287
|
return (o, t) => (v(), f("div", h5, [
|
|
3287
|
-
(v(!0), f(
|
|
3288
|
+
(v(!0), f(le, null, ve(e.images, (a) => (v(), f("button", {
|
|
3288
3289
|
key: a.src,
|
|
3289
3290
|
class: "masonry-item"
|
|
3290
3291
|
}, [
|
|
@@ -3300,7 +3301,7 @@ const m5 = /* @__PURE__ */ _({
|
|
|
3300
3301
|
class: "rs-image-gallery",
|
|
3301
3302
|
role: "region",
|
|
3302
3303
|
"aria-label": "Image gallery"
|
|
3303
|
-
}, k5 = /* @__PURE__ */
|
|
3304
|
+
}, k5 = /* @__PURE__ */ B({
|
|
3304
3305
|
__name: "ImageGallery",
|
|
3305
3306
|
props: /* @__PURE__ */ te({
|
|
3306
3307
|
images: {},
|
|
@@ -3321,48 +3322,48 @@ const m5 = /* @__PURE__ */ _({
|
|
|
3321
3322
|
}),
|
|
3322
3323
|
emits: /* @__PURE__ */ te(["change"], ["update:modelValue"]),
|
|
3323
3324
|
setup(e, { emit: o }) {
|
|
3324
|
-
const t =
|
|
3325
|
+
const t = pe(e, "modelValue"), a = o, s = L({
|
|
3325
3326
|
get: () => t.value ?? 0,
|
|
3326
3327
|
set: (i) => {
|
|
3327
3328
|
t.value = i, a("change", i);
|
|
3328
3329
|
}
|
|
3329
|
-
}),
|
|
3330
|
+
}), l = (i) => s.value = i;
|
|
3330
3331
|
return (i, n) => (v(), f("section", g5, [
|
|
3331
|
-
e.layout === "carousel" ? (v(),
|
|
3332
|
+
e.layout === "carousel" ? (v(), J(s1, {
|
|
3332
3333
|
key: 0,
|
|
3333
3334
|
modelValue: s.value,
|
|
3334
|
-
"onUpdate:modelValue": n[0] || (n[0] = (
|
|
3335
|
+
"onUpdate:modelValue": n[0] || (n[0] = (r) => s.value = r),
|
|
3335
3336
|
images: e.images,
|
|
3336
3337
|
loop: e.loop,
|
|
3337
3338
|
"aria-label": e.ariaLabel,
|
|
3338
3339
|
transform: e.transform,
|
|
3339
3340
|
"transform-thumbnails": e.transformThumbnails,
|
|
3340
3341
|
"show-thumbnails": e.showThumbnails
|
|
3341
|
-
}, null, 8, ["modelValue", "images", "loop", "aria-label", "transform", "transform-thumbnails", "show-thumbnails"])) : e.layout === "grid" ? (v(),
|
|
3342
|
+
}, null, 8, ["modelValue", "images", "loop", "aria-label", "transform", "transform-thumbnails", "show-thumbnails"])) : e.layout === "grid" ? (v(), J(i1, {
|
|
3342
3343
|
key: 1,
|
|
3343
3344
|
modelValue: s.value,
|
|
3344
|
-
"onUpdate:modelValue": n[1] || (n[1] = (
|
|
3345
|
+
"onUpdate:modelValue": n[1] || (n[1] = (r) => s.value = r),
|
|
3345
3346
|
images: e.images,
|
|
3346
|
-
onSelect:
|
|
3347
|
+
onSelect: l,
|
|
3347
3348
|
columns: e.columns,
|
|
3348
3349
|
gap: e.gap,
|
|
3349
3350
|
transform: e.transform,
|
|
3350
3351
|
"aria-label": e.ariaLabel
|
|
3351
|
-
}, null, 8, ["modelValue", "images", "columns", "gap", "transform", "aria-label"])) : e.layout === "grid-lightbox" ? (v(),
|
|
3352
|
+
}, null, 8, ["modelValue", "images", "columns", "gap", "transform", "aria-label"])) : e.layout === "grid-lightbox" ? (v(), J(m5, {
|
|
3352
3353
|
key: 2,
|
|
3353
3354
|
modelValue: s.value,
|
|
3354
|
-
"onUpdate:modelValue": n[2] || (n[2] = (
|
|
3355
|
+
"onUpdate:modelValue": n[2] || (n[2] = (r) => s.value = r),
|
|
3355
3356
|
images: e.images,
|
|
3356
3357
|
transform: e.transform,
|
|
3357
3358
|
"aria-label": e.ariaLabel
|
|
3358
|
-
}, null, 8, ["modelValue", "images", "transform", "aria-label"])) : e.layout === "masonry" ? (v(),
|
|
3359
|
+
}, null, 8, ["modelValue", "images", "transform", "aria-label"])) : e.layout === "masonry" ? (v(), J(b5, {
|
|
3359
3360
|
key: 3,
|
|
3360
3361
|
modelValue: s.value,
|
|
3361
|
-
"onUpdate:modelValue": n[3] || (n[3] = (
|
|
3362
|
+
"onUpdate:modelValue": n[3] || (n[3] = (r) => s.value = r),
|
|
3362
3363
|
images: e.images,
|
|
3363
3364
|
transform: e.transform,
|
|
3364
3365
|
"aria-label": e.ariaLabel
|
|
3365
|
-
}, null, 8, ["modelValue", "images", "transform", "aria-label"])) :
|
|
3366
|
+
}, null, 8, ["modelValue", "images", "transform", "aria-label"])) : O("", !0)
|
|
3366
3367
|
]));
|
|
3367
3368
|
}
|
|
3368
3369
|
}), t1 = /* @__PURE__ */ U(k5, [["__scopeId", "data-v-d6be1b96"]]);
|
|
@@ -3374,13 +3375,13 @@ const w5 = ["aria-busy"], M5 = {
|
|
|
3374
3375
|
}, L5 = {
|
|
3375
3376
|
class: "message sr-only",
|
|
3376
3377
|
"aria-atomic": "true"
|
|
3377
|
-
}, x5 = /* @__PURE__ */
|
|
3378
|
+
}, x5 = /* @__PURE__ */ B({
|
|
3378
3379
|
__name: "Spinner",
|
|
3379
3380
|
props: {
|
|
3380
3381
|
message: {}
|
|
3381
3382
|
},
|
|
3382
3383
|
setup(e) {
|
|
3383
|
-
const o = e, t =
|
|
3384
|
+
const o = e, t = p(0), a = p(null), s = p(o.message || ""), l = () => {
|
|
3384
3385
|
!o.message || a.value !== null || s.value.length > 0 && (a.value = window.setInterval(() => {
|
|
3385
3386
|
t.value = t.value % 3 + 1, s.value = `${o.message}${".".repeat(t.value)}`;
|
|
3386
3387
|
}, 750));
|
|
@@ -3389,20 +3390,20 @@ const w5 = ["aria-busy"], M5 = {
|
|
|
3389
3390
|
};
|
|
3390
3391
|
return Y(
|
|
3391
3392
|
() => o.message,
|
|
3392
|
-
(n,
|
|
3393
|
-
n !==
|
|
3393
|
+
(n, r) => {
|
|
3394
|
+
n !== r && (s.value = n || "", i());
|
|
3394
3395
|
}
|
|
3395
|
-
), ae(
|
|
3396
|
+
), ae(l), ge(i), (n, r) => (v(), f("div", {
|
|
3396
3397
|
class: "spinner-container",
|
|
3397
3398
|
role: "status",
|
|
3398
3399
|
"aria-live": "polite",
|
|
3399
3400
|
"aria-busy": !!e.message
|
|
3400
3401
|
}, [
|
|
3401
|
-
|
|
3402
|
+
r[0] || (r[0] = b("div", {
|
|
3402
3403
|
class: "spinner",
|
|
3403
3404
|
"aria-hidden": "true"
|
|
3404
3405
|
}, null, -1)),
|
|
3405
|
-
e.message ? (v(), f("span", M5, K(s.value), 1)) :
|
|
3406
|
+
e.message ? (v(), f("span", M5, K(s.value), 1)) : O("", !0),
|
|
3406
3407
|
b("span", L5, K(e.message || "Loading"), 1)
|
|
3407
3408
|
], 8, w5));
|
|
3408
3409
|
}
|
|
@@ -3416,7 +3417,7 @@ const w5 = ["aria-busy"], M5 = {
|
|
|
3416
3417
|
key: 1,
|
|
3417
3418
|
class: "indeterminate",
|
|
3418
3419
|
"view-box": "0 0 16 16"
|
|
3419
|
-
}, B5 = { class: "checkbox-label" }, _5 = /* @__PURE__ */
|
|
3420
|
+
}, B5 = { class: "checkbox-label" }, _5 = /* @__PURE__ */ B({
|
|
3420
3421
|
__name: "Checkbox",
|
|
3421
3422
|
props: /* @__PURE__ */ te({
|
|
3422
3423
|
id: {},
|
|
@@ -3430,61 +3431,61 @@ const w5 = ["aria-busy"], M5 = {
|
|
|
3430
3431
|
}),
|
|
3431
3432
|
emits: /* @__PURE__ */ te(["change"], ["update:modelValue"]),
|
|
3432
3433
|
setup(e, { emit: o }) {
|
|
3433
|
-
const t = o, a =
|
|
3434
|
+
const t = o, a = pe(e, "modelValue"), s = e, l = ue(), i = L(() => s.id ?? `checkbox-${l}`), n = p(null), r = r1(s).value, c = L(() => s.required ? !0 : void 0), u = L(() => s.triState && a.value === void 0 ? "mixed" : void 0);
|
|
3434
3435
|
Y(
|
|
3435
3436
|
() => a.value,
|
|
3436
|
-
(
|
|
3437
|
-
n.value && (n.value.indeterminate =
|
|
3437
|
+
(x) => {
|
|
3438
|
+
n.value && (n.value.indeterminate = x === void 0, n.value.checked = x === !0);
|
|
3438
3439
|
},
|
|
3439
3440
|
{ immediate: !0 }
|
|
3440
3441
|
);
|
|
3441
|
-
const h = (
|
|
3442
|
+
const h = (x) => {
|
|
3442
3443
|
if (!s.disabled) {
|
|
3443
3444
|
if (!s.triState) {
|
|
3444
|
-
const
|
|
3445
|
-
a.value =
|
|
3445
|
+
const w = x.target.checked;
|
|
3446
|
+
a.value = w, t("change", a.value);
|
|
3446
3447
|
return;
|
|
3447
3448
|
}
|
|
3448
3449
|
a.value === !1 ? a.value = !0 : a.value === !0 ? a.value = void 0 : a.value = !1, t("change", a.value);
|
|
3449
3450
|
}
|
|
3450
3451
|
};
|
|
3451
|
-
return (
|
|
3452
|
-
class:
|
|
3452
|
+
return (x, w) => (v(), f("label", {
|
|
3453
|
+
class: re(["checkbox-root", { required: c.value, error: e.invalid }])
|
|
3453
3454
|
}, [
|
|
3454
3455
|
b("input", {
|
|
3455
3456
|
id: i.value,
|
|
3456
3457
|
type: "checkbox",
|
|
3457
3458
|
class: "checkbox",
|
|
3458
|
-
required:
|
|
3459
|
+
required: c.value,
|
|
3459
3460
|
checked: a.value === !0,
|
|
3460
3461
|
disabled: e.disabled,
|
|
3461
3462
|
"aria-invalid": e.invalid ? "true" : void 0,
|
|
3462
|
-
"aria-disabled": R(
|
|
3463
|
-
"aria-checked":
|
|
3464
|
-
onClick:
|
|
3465
|
-
onChange:
|
|
3463
|
+
"aria-disabled": R(r),
|
|
3464
|
+
"aria-checked": u.value,
|
|
3465
|
+
onClick: w[0] || (w[0] = (d) => e.triState ? h(d) : void 0),
|
|
3466
|
+
onChange: w[1] || (w[1] = (d) => e.triState ? void 0 : h(d)),
|
|
3466
3467
|
ref_key: "inputRef",
|
|
3467
3468
|
ref: n
|
|
3468
3469
|
}, null, 40, $5),
|
|
3469
3470
|
b("span", V5, [
|
|
3470
|
-
a.value === !0 ? (v(), f("svg", I5, [...
|
|
3471
|
+
a.value === !0 ? (v(), f("svg", I5, [...w[2] || (w[2] = [
|
|
3471
3472
|
b("path", {
|
|
3472
3473
|
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",
|
|
3473
3474
|
fill: "currentColor"
|
|
3474
3475
|
}, null, -1)
|
|
3475
|
-
])])) : a.value === void 0 ? (v(), f("svg", H5, [...
|
|
3476
|
+
])])) : a.value === void 0 ? (v(), f("svg", H5, [...w[3] || (w[3] = [
|
|
3476
3477
|
b("path", {
|
|
3477
3478
|
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",
|
|
3478
3479
|
fill: "currentColor"
|
|
3479
3480
|
}, null, -1)
|
|
3480
|
-
])])) :
|
|
3481
|
+
])])) : O("", !0)
|
|
3481
3482
|
]),
|
|
3482
3483
|
b("span", B5, [
|
|
3483
|
-
j(
|
|
3484
|
+
j(x.$slots, "default", {}, void 0, !0)
|
|
3484
3485
|
])
|
|
3485
3486
|
], 2));
|
|
3486
3487
|
}
|
|
3487
|
-
}), go = /* @__PURE__ */ U(_5, [["__scopeId", "data-v-3a0c4f73"]]), R5 = ["for"], Z5 = ["id", "value", "required", "aria-invalid", "aria-errormessage", "aria-describedby"], A5 = /* @__PURE__ */
|
|
3488
|
+
}), go = /* @__PURE__ */ U(_5, [["__scopeId", "data-v-3a0c4f73"]]), R5 = ["for"], Z5 = ["id", "value", "required", "aria-invalid", "aria-errormessage", "aria-describedby"], A5 = /* @__PURE__ */ B({
|
|
3488
3489
|
__name: "Textarea",
|
|
3489
3490
|
props: /* @__PURE__ */ te({
|
|
3490
3491
|
id: {},
|
|
@@ -3500,53 +3501,53 @@ const w5 = ["aria-busy"], M5 = {
|
|
|
3500
3501
|
}),
|
|
3501
3502
|
emits: /* @__PURE__ */ te(["focus", "blur"], ["update:modelValue"]),
|
|
3502
3503
|
setup(e, { emit: o }) {
|
|
3503
|
-
const t =
|
|
3504
|
-
we(n.value,
|
|
3505
|
-
const
|
|
3506
|
-
t.value = i.type === "number" ? Number(
|
|
3507
|
-
}, V =
|
|
3504
|
+
const t = pe(e, "modelValue"), a = Oe(), s = qe(), l = o, i = e, n = p(null), r = p(null), c = ue(), u = `${c}-error`, h = `${c}-hint`, x = _e(a).value, w = L(() => x ? `${h} ${c}-required-hint` : h), d = Ne(i, s, u, w.value).value, C = (_) => {
|
|
3505
|
+
we(n.value, r.value);
|
|
3506
|
+
const g = _.target;
|
|
3507
|
+
t.value = i.type === "number" ? Number(g.value) : g.value;
|
|
3508
|
+
}, V = L(() => i.invalid === !0 && i.errorMessage ? u : void 0);
|
|
3508
3509
|
return ae(() => {
|
|
3509
|
-
we(n.value,
|
|
3510
|
-
}), (
|
|
3511
|
-
class:
|
|
3510
|
+
we(n.value, r.value);
|
|
3511
|
+
}), (_, g) => (v(), f("div", {
|
|
3512
|
+
class: re(["textarea-box", { required: R(x), error: e.invalid }]),
|
|
3512
3513
|
ref_key: "inputBoxRef",
|
|
3513
|
-
ref:
|
|
3514
|
+
ref: r
|
|
3514
3515
|
}, [
|
|
3515
3516
|
b("label", {
|
|
3516
3517
|
for: e.id,
|
|
3517
3518
|
class: "label"
|
|
3518
3519
|
}, K(e.label), 9, R5),
|
|
3519
|
-
b("textarea",
|
|
3520
|
+
b("textarea", Ce({ id: e.id }, _.$attrs, {
|
|
3520
3521
|
class: "custom-textarea",
|
|
3521
|
-
onFocus:
|
|
3522
|
-
onBlur:
|
|
3523
|
-
onInput:
|
|
3522
|
+
onFocus: g[0] || (g[0] = (D) => R(Fe)(D, r.value, l)),
|
|
3523
|
+
onBlur: g[1] || (g[1] = (D) => R(Ke)(D, n.value, r.value, l)),
|
|
3524
|
+
onInput: C,
|
|
3524
3525
|
value: t.value,
|
|
3525
|
-
required: R(
|
|
3526
|
+
required: R(x),
|
|
3526
3527
|
"aria-invalid": e.invalid ? "true" : void 0,
|
|
3527
3528
|
"aria-errormessage": V.value,
|
|
3528
|
-
"aria-describedby": R(
|
|
3529
|
+
"aria-describedby": R(d),
|
|
3529
3530
|
ref_key: "textareaRef",
|
|
3530
3531
|
ref: n
|
|
3531
3532
|
}), " ", 16, Z5),
|
|
3532
3533
|
P(Pe, { hintId: h }, {
|
|
3533
|
-
default:
|
|
3534
|
-
j(
|
|
3534
|
+
default: W(() => [
|
|
3535
|
+
j(_.$slots, "hint", {}, void 0, !0)
|
|
3535
3536
|
]),
|
|
3536
3537
|
_: 3
|
|
3537
3538
|
}),
|
|
3538
3539
|
P(Ue, {
|
|
3539
|
-
baseId: R(
|
|
3540
|
-
isRequired: R(
|
|
3540
|
+
baseId: R(c),
|
|
3541
|
+
isRequired: R(x)
|
|
3541
3542
|
}, null, 8, ["baseId", "isRequired"]),
|
|
3542
3543
|
P(je, {
|
|
3543
|
-
errorId:
|
|
3544
|
+
errorId: u,
|
|
3544
3545
|
invalid: e.invalid,
|
|
3545
3546
|
errorMessage: e.errorMessage
|
|
3546
3547
|
}, null, 8, ["invalid", "errorMessage"])
|
|
3547
3548
|
], 2));
|
|
3548
3549
|
}
|
|
3549
|
-
}), ko = /* @__PURE__ */ U(A5, [["__scopeId", "data-v-3615613f"]]), T5 = { key: 0 }, S5 = { key: 1 }, E5 = /* @__PURE__ */
|
|
3550
|
+
}), ko = /* @__PURE__ */ U(A5, [["__scopeId", "data-v-3615613f"]]), T5 = { key: 0 }, S5 = { key: 1 }, E5 = /* @__PURE__ */ B({
|
|
3550
3551
|
__name: "Highlight",
|
|
3551
3552
|
props: {
|
|
3552
3553
|
text: {},
|
|
@@ -3555,11 +3556,11 @@ const w5 = ["aria-busy"], M5 = {
|
|
|
3555
3556
|
setup(e) {
|
|
3556
3557
|
const o = (t, a) => {
|
|
3557
3558
|
if (!a) return [{ text: t, match: !1 }];
|
|
3558
|
-
const s = a.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"),
|
|
3559
|
+
const s = a.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), l = new RegExp(s, "ig"), i = [];
|
|
3559
3560
|
let n = 0;
|
|
3560
|
-
return t.replace(
|
|
3561
|
+
return t.replace(l, (r, c) => (c > n && i.push({ text: t.slice(n, c), match: !1 }), i.push({ text: r, match: !0 }), n = c + r.length, r)), n < t.length && i.push({ text: t.slice(n), match: !1 }), i;
|
|
3561
3562
|
};
|
|
3562
|
-
return (t, a) => (v(!0), f(
|
|
3563
|
+
return (t, a) => (v(!0), f(le, null, ve(o(e.text, e.query), (s, l) => (v(), f(le, { key: l }, [
|
|
3563
3564
|
s.match ? (v(), f("mark", T5, K(s.text), 1)) : (v(), f("span", S5, K(s.text), 1))
|
|
3564
3565
|
], 64))), 128));
|
|
3565
3566
|
}
|
|
@@ -3577,37 +3578,37 @@ const O5 = {
|
|
|
3577
3578
|
key: 0,
|
|
3578
3579
|
class: "ui-breadcrumb__separator",
|
|
3579
3580
|
"aria-hidden": "true"
|
|
3580
|
-
}, F5 = /* @__PURE__ */
|
|
3581
|
+
}, F5 = /* @__PURE__ */ B({
|
|
3581
3582
|
__name: "Breadcrumb",
|
|
3582
3583
|
props: {
|
|
3583
3584
|
items: {},
|
|
3584
3585
|
separator: { default: "/" }
|
|
3585
3586
|
},
|
|
3586
3587
|
setup(e) {
|
|
3587
|
-
const o = e, t =
|
|
3588
|
+
const o = e, t = se(z5), a = (n) => n === o.items.length - 1, s = (n, r) => l(n, r), l = (n, r) => a(r) || n.disabled ? "span" : n.to && t ? p1("RouterLink") : n.href ? "a" : "span", i = (n, r) => a(r) || n.disabled ? { "data-disabled": n.disabled || void 0 } : n.to ? { to: n.to } : n.href ? {
|
|
3588
3589
|
href: n.href,
|
|
3589
3590
|
target: n.external ? "_blank" : void 0,
|
|
3590
3591
|
rel: n.external ? "noopener noreferrer" : void 0,
|
|
3591
3592
|
"aria-label": n.external ? `${n.label} (opens in a new tab)` : void 0
|
|
3592
3593
|
} : {};
|
|
3593
|
-
return (n,
|
|
3594
|
+
return (n, r) => (v(), f("nav", O5, [
|
|
3594
3595
|
b("ol", q5, [
|
|
3595
|
-
(v(!0), f(
|
|
3596
|
-
key:
|
|
3596
|
+
(v(!0), f(le, null, ve(e.items, (c, u) => (v(), f("li", {
|
|
3597
|
+
key: c.to ?? c.href ?? `${c.label}-${u}`,
|
|
3597
3598
|
class: "ui-breadcrumb__item"
|
|
3598
3599
|
}, [
|
|
3599
|
-
(v(),
|
|
3600
|
-
"aria-posinset":
|
|
3600
|
+
(v(), J(Ve(s(c, u)), Ce({ class: "ui-breadcrumb__link" }, { ref_for: !0 }, i(c, u), {
|
|
3601
|
+
"aria-posinset": u + 1,
|
|
3601
3602
|
"aria-setsize": e.items.length,
|
|
3602
|
-
"aria-current": a(
|
|
3603
|
-
tabindex: a(
|
|
3603
|
+
"aria-current": a(u) ? "page" : void 0,
|
|
3604
|
+
tabindex: a(u) || s(c, u) === "span" ? -1 : void 0
|
|
3604
3605
|
}), {
|
|
3605
|
-
default:
|
|
3606
|
-
me(K(
|
|
3606
|
+
default: W(() => [
|
|
3607
|
+
me(K(c.label), 1)
|
|
3607
3608
|
]),
|
|
3608
3609
|
_: 2
|
|
3609
3610
|
}, 1040, ["aria-posinset", "aria-setsize", "aria-current", "tabindex"])),
|
|
3610
|
-
a(
|
|
3611
|
+
a(u) ? O("", !0) : (v(), f("span", N5, [
|
|
3611
3612
|
j(n.$slots, "separator", {}, () => [
|
|
3612
3613
|
me(K(e.separator), 1)
|
|
3613
3614
|
], !0)
|
|
@@ -3620,7 +3621,7 @@ const O5 = {
|
|
|
3620
3621
|
key: 0,
|
|
3621
3622
|
class: "radio-control",
|
|
3622
3623
|
"aria-hidden": "true"
|
|
3623
|
-
}, X5 = { class: "radio-label" }, G5 = /* @__PURE__ */
|
|
3624
|
+
}, X5 = { class: "radio-label" }, G5 = /* @__PURE__ */ B({
|
|
3624
3625
|
__name: "RadioButton",
|
|
3625
3626
|
props: /* @__PURE__ */ te({
|
|
3626
3627
|
name: {},
|
|
@@ -3638,31 +3639,31 @@ const O5 = {
|
|
|
3638
3639
|
}),
|
|
3639
3640
|
emits: ["update:modelValue"],
|
|
3640
3641
|
setup(e) {
|
|
3641
|
-
const o = e, t =
|
|
3642
|
+
const o = e, t = pe(e, "modelValue"), a = L(() => o.invalid ? "true" : void 0), s = L(() => o.required && !o.disabled ? "true" : void 0), l = L(() => o.disabled ? !0 : void 0);
|
|
3642
3643
|
return (i, n) => (v(), f("fieldset", {
|
|
3643
|
-
class:
|
|
3644
|
+
class: re(["radio-group", { "in-column": e.inColumn, btn: e.mode === "button" }]),
|
|
3644
3645
|
"aria-invalid": a.value,
|
|
3645
3646
|
"aria-required": s.value,
|
|
3646
|
-
disabled:
|
|
3647
|
+
disabled: l.value
|
|
3647
3648
|
}, [
|
|
3648
3649
|
b("legend", P5, K(e.name), 1),
|
|
3649
|
-
(v(!0), f(
|
|
3650
|
-
key:
|
|
3651
|
-
class:
|
|
3650
|
+
(v(!0), f(le, null, ve(e.options, (r) => (v(), f("label", {
|
|
3651
|
+
key: r.key,
|
|
3652
|
+
class: re(["radio", { checked: t.value === r.key, disabled: e.disabled || r.disabled }])
|
|
3652
3653
|
}, [
|
|
3653
3654
|
Ie(b("input", {
|
|
3654
3655
|
type: "radio",
|
|
3655
3656
|
class: "radio-input",
|
|
3656
3657
|
name: e.name,
|
|
3657
|
-
value:
|
|
3658
|
-
disabled: e.disabled ||
|
|
3658
|
+
value: r.key,
|
|
3659
|
+
disabled: e.disabled || r.disabled,
|
|
3659
3660
|
required: e.required,
|
|
3660
|
-
"onUpdate:modelValue": n[0] || (n[0] = (
|
|
3661
|
+
"onUpdate:modelValue": n[0] || (n[0] = (c) => t.value = c)
|
|
3661
3662
|
}, null, 8, U5), [
|
|
3662
3663
|
[m1, t.value]
|
|
3663
3664
|
]),
|
|
3664
|
-
e.mode === "standard" ? (v(), f("span", j5)) :
|
|
3665
|
-
b("span", X5, K(
|
|
3665
|
+
e.mode === "standard" ? (v(), f("span", j5)) : O("", !0),
|
|
3666
|
+
b("span", X5, K(r.label), 1)
|
|
3666
3667
|
], 2))), 128))
|
|
3667
3668
|
], 10, K5));
|
|
3668
3669
|
}
|
|
@@ -3682,7 +3683,7 @@ const O5 = {
|
|
|
3682
3683
|
key: 0,
|
|
3683
3684
|
class: "start-icon",
|
|
3684
3685
|
"aria-hidden": "true"
|
|
3685
|
-
}, ra = /* @__PURE__ */
|
|
3686
|
+
}, ra = /* @__PURE__ */ B({
|
|
3686
3687
|
__name: "Autocomplete",
|
|
3687
3688
|
props: /* @__PURE__ */ te({
|
|
3688
3689
|
id: {},
|
|
@@ -3708,32 +3709,32 @@ const O5 = {
|
|
|
3708
3709
|
}),
|
|
3709
3710
|
emits: /* @__PURE__ */ te(["change", "select", "focus", "blur"], ["update:modelValue"]),
|
|
3710
3711
|
setup(e, { emit: o }) {
|
|
3711
|
-
const t = e, a = o, s =
|
|
3712
|
+
const t = e, a = o, s = pe(e, "modelValue"), l = p(null), i = p(null), n = p(""), r = p(!1), c = p([]), u = p(null), h = p(null), x = L(() => t.id ? `${t.id}-search-history` : "search-history"), d = `${ue()}-list`, C = L(() => u.value !== null ? `${d}-option-${u.value}` : void 0), V = L(() => r.value && C.value ? C.value : void 0), _ = L(() => c.value.length > 0), g = L(() => {
|
|
3712
3713
|
if (!t.filterable) return t.options;
|
|
3713
|
-
const
|
|
3714
|
-
return t.options.filter((z) => t.getValue(z).toLowerCase().includes(
|
|
3715
|
-
}), D = r1(t).value,
|
|
3716
|
-
Y(n, () => we(
|
|
3717
|
-
() =>
|
|
3718
|
-
(
|
|
3719
|
-
if (
|
|
3714
|
+
const $ = n.value.toLowerCase();
|
|
3715
|
+
return t.options.filter((z) => t.getValue(z).toLowerCase().includes($));
|
|
3716
|
+
}), D = r1(t).value, S = _e(t).value;
|
|
3717
|
+
Y(n, () => we(l.value, i.value)), Y(
|
|
3718
|
+
() => x.value,
|
|
3719
|
+
($) => {
|
|
3720
|
+
if ($)
|
|
3720
3721
|
try {
|
|
3721
|
-
|
|
3722
|
+
c.value = JSON.parse(localStorage.getItem($) || "[]");
|
|
3722
3723
|
} catch {
|
|
3723
|
-
|
|
3724
|
+
c.value = [];
|
|
3724
3725
|
}
|
|
3725
3726
|
},
|
|
3726
3727
|
{ immediate: !0 }
|
|
3727
|
-
), Y(
|
|
3728
|
-
if (
|
|
3729
|
-
|
|
3728
|
+
), Y(r, async ($) => {
|
|
3729
|
+
if (!$) {
|
|
3730
|
+
u.value = null;
|
|
3730
3731
|
return;
|
|
3731
3732
|
}
|
|
3732
|
-
|
|
3733
|
+
g.value.length !== 0 && (await Le(), I());
|
|
3733
3734
|
}), Y(
|
|
3734
3735
|
() => t.loading,
|
|
3735
|
-
async (
|
|
3736
|
-
|
|
3736
|
+
async ($) => {
|
|
3737
|
+
$ || r.value && g.value.length !== 0 && (await Le(), I());
|
|
3737
3738
|
}
|
|
3738
3739
|
), Y(
|
|
3739
3740
|
() => t.options,
|
|
@@ -3741,72 +3742,72 @@ const O5 = {
|
|
|
3741
3742
|
h.value = null;
|
|
3742
3743
|
}
|
|
3743
3744
|
);
|
|
3744
|
-
const
|
|
3745
|
-
n.value.length >= t.minChars && !t.filterable && !t.loading && (
|
|
3746
|
-
},
|
|
3747
|
-
const z =
|
|
3748
|
-
i.value?.contains(z) || (
|
|
3749
|
-
},
|
|
3745
|
+
const y = ($) => {
|
|
3746
|
+
n.value.length >= t.minChars && !t.filterable && !t.loading && (r.value = !0), Fe($, i.value, a);
|
|
3747
|
+
}, M = ($) => {
|
|
3748
|
+
const z = $.relatedTarget;
|
|
3749
|
+
i.value?.contains(z) || (r.value = !1, s.value ? m() : n.value = "", Ke($, l.value, i.value, a));
|
|
3750
|
+
}, H = ($, z) => {
|
|
3750
3751
|
const Q = i.value;
|
|
3751
|
-
if (!Q || t.isDisabled(
|
|
3752
|
-
|
|
3753
|
-
const
|
|
3754
|
-
|
|
3755
|
-
},
|
|
3756
|
-
if (!
|
|
3757
|
-
|
|
3752
|
+
if (!Q || t.isDisabled($)) return;
|
|
3753
|
+
r.value = !1, E(n.value), h.value = z, u.value = z;
|
|
3754
|
+
const A = t.getKey($);
|
|
3755
|
+
A && A.toString().length > 0 ? Q.classList.add("filled") : Q.classList.remove("filled"), n.value = t.getValue($), s.value = A, a("select", A);
|
|
3756
|
+
}, q = ($) => {
|
|
3757
|
+
if (!r.value && ["ArrowDown", "ArrowUp"].includes($.key)) {
|
|
3758
|
+
r.value = !0, u.value = u.value ?? g.value.findIndex((z) => !t.isDisabled(z)), $.preventDefault();
|
|
3758
3759
|
return;
|
|
3759
3760
|
}
|
|
3760
|
-
if (
|
|
3761
|
-
if (
|
|
3762
|
-
const z =
|
|
3763
|
-
z >= 0 && (
|
|
3761
|
+
if (r.value) {
|
|
3762
|
+
if ($.key === "ArrowDown" && (Z(1), $.preventDefault()), $.key === "ArrowUp" && (Z(-1), $.preventDefault()), $.key === "Home") {
|
|
3763
|
+
const z = T();
|
|
3764
|
+
z >= 0 && (u.value = z), $.preventDefault();
|
|
3764
3765
|
}
|
|
3765
|
-
if (
|
|
3766
|
-
const z =
|
|
3767
|
-
z >= 0 && (
|
|
3766
|
+
if ($.key === "End") {
|
|
3767
|
+
const z = oe();
|
|
3768
|
+
z >= 0 && (u.value = z), $.preventDefault();
|
|
3768
3769
|
}
|
|
3769
|
-
if (
|
|
3770
|
-
if (
|
|
3771
|
-
const z =
|
|
3770
|
+
if ($.key === "Enter") {
|
|
3771
|
+
if (u.value === null) return;
|
|
3772
|
+
const z = g.value[u.value];
|
|
3772
3773
|
if (!z || t.isDisabled(z)) return;
|
|
3773
|
-
|
|
3774
|
+
H(z, u.value), r.value = !1, $.preventDefault();
|
|
3774
3775
|
}
|
|
3775
|
-
|
|
3776
|
+
$.key === "Escape" && (r.value = !1);
|
|
3776
3777
|
}
|
|
3777
|
-
}, Z = (
|
|
3778
|
-
if (
|
|
3779
|
-
let z =
|
|
3778
|
+
}, Z = ($) => {
|
|
3779
|
+
if (u.value === null) return;
|
|
3780
|
+
let z = u.value;
|
|
3780
3781
|
do
|
|
3781
|
-
z +=
|
|
3782
|
-
while (z >= 0 && z <
|
|
3783
|
-
z >= 0 && z <
|
|
3784
|
-
},
|
|
3785
|
-
n.value.length === 0 && (s.value = ""), we(
|
|
3782
|
+
z += $;
|
|
3783
|
+
while (z >= 0 && z < g.value.length && t.isDisabled(g.value[z]));
|
|
3784
|
+
z >= 0 && z < g.value.length && (u.value = z);
|
|
3785
|
+
}, N = () => {
|
|
3786
|
+
n.value.length === 0 && (s.value = ""), we(l.value, i.value), n.value.length >= t.minChars ? (a("change", n.value), r.value = !0) : r.value = !1;
|
|
3786
3787
|
}, m = () => {
|
|
3787
3788
|
if (s.value.toString().length === 0 || !t.options || t.options.length === 0) return;
|
|
3788
|
-
const
|
|
3789
|
-
|
|
3790
|
-
},
|
|
3789
|
+
const $ = t.options.findIndex((z) => t.getKey(z) === s.value);
|
|
3790
|
+
$ > -1 && (u.value = $, h.value = $, n.value = t.getValue(t.options[$]), we(l.value, i.value));
|
|
3791
|
+
}, k = () => {
|
|
3791
3792
|
n.value = "", s.value = "";
|
|
3792
|
-
},
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
...
|
|
3796
|
-
].slice(0, t.suggestionsLimit), localStorage.setItem(
|
|
3797
|
-
},
|
|
3798
|
-
n.value =
|
|
3799
|
-
},
|
|
3800
|
-
const
|
|
3801
|
-
|
|
3802
|
-
},
|
|
3803
|
-
for (let
|
|
3793
|
+
}, E = ($) => {
|
|
3794
|
+
!$ || $.trim().length === 0 || (c.value = [
|
|
3795
|
+
$,
|
|
3796
|
+
...c.value.filter((z) => z !== $)
|
|
3797
|
+
].slice(0, t.suggestionsLimit), localStorage.setItem(x.value, JSON.stringify(c.value)));
|
|
3798
|
+
}, G = ($) => {
|
|
3799
|
+
n.value = $, N();
|
|
3800
|
+
}, I = () => {
|
|
3801
|
+
const $ = T();
|
|
3802
|
+
$ >= 0 && (u.value = $);
|
|
3803
|
+
}, T = () => g.value.findIndex(($) => !t.isDisabled($)), oe = () => {
|
|
3804
|
+
for (let $ = g.value.length - 1; $ >= 0; $--) if (!t.isDisabled(g.value[$])) return $;
|
|
3804
3805
|
return -1;
|
|
3805
3806
|
};
|
|
3806
3807
|
return ae(() => {
|
|
3807
|
-
m(), we(
|
|
3808
|
-
}), (
|
|
3809
|
-
class:
|
|
3808
|
+
m(), we(l.value, i.value);
|
|
3809
|
+
}), ($, z) => (v(), f("div", {
|
|
3810
|
+
class: re(["autocomplete", { required: R(S), error: e.invalid, "has-icon": Object.keys($.$slots).includes("icon") }]),
|
|
3810
3811
|
ref_key: "autocompleteRef",
|
|
3811
3812
|
ref: i
|
|
3812
3813
|
}, [
|
|
@@ -3814,57 +3815,57 @@ const O5 = {
|
|
|
3814
3815
|
for: e.id,
|
|
3815
3816
|
class: "label"
|
|
3816
3817
|
}, K(e.label), 9, W5),
|
|
3817
|
-
Ie(b("input",
|
|
3818
|
+
Ie(b("input", Ce({
|
|
3818
3819
|
id: e.id,
|
|
3819
3820
|
type: e.type
|
|
3820
|
-
},
|
|
3821
|
+
}, $.$attrs, {
|
|
3821
3822
|
ref_key: "inputRef",
|
|
3822
|
-
ref:
|
|
3823
|
+
ref: l,
|
|
3823
3824
|
role: "combobox",
|
|
3824
3825
|
"aria-autocomplete": "list",
|
|
3825
|
-
"aria-expanded":
|
|
3826
|
-
"aria-controls":
|
|
3826
|
+
"aria-expanded": r.value,
|
|
3827
|
+
"aria-controls": d,
|
|
3827
3828
|
"aria-activedescendant": V.value,
|
|
3828
|
-
"aria-required": R(
|
|
3829
|
+
"aria-required": R(S),
|
|
3829
3830
|
"aria-invalid": e.invalid ? "true" : void 0,
|
|
3830
3831
|
disabled: R(D),
|
|
3831
3832
|
"onUpdate:modelValue": z[0] || (z[0] = (Q) => n.value = Q),
|
|
3832
|
-
onFocus:
|
|
3833
|
-
onBlur:
|
|
3834
|
-
onInput:
|
|
3835
|
-
onKeydown:
|
|
3833
|
+
onFocus: y,
|
|
3834
|
+
onBlur: M,
|
|
3835
|
+
onInput: N,
|
|
3836
|
+
onKeydown: q
|
|
3836
3837
|
}), null, 16, J5), [
|
|
3837
3838
|
[h1, n.value]
|
|
3838
3839
|
]),
|
|
3839
3840
|
P($e, { name: "select" }, {
|
|
3840
|
-
default:
|
|
3841
|
+
default: W(() => [
|
|
3841
3842
|
Ie(b("ul", {
|
|
3842
|
-
id:
|
|
3843
|
+
id: d,
|
|
3843
3844
|
role: "listbox",
|
|
3844
3845
|
class: "options"
|
|
3845
3846
|
}, [
|
|
3846
|
-
|
|
3847
|
-
id: `${
|
|
3847
|
+
g.value.length > 0 ? (v(!0), f(le, { key: 0 }, ve(g.value, (Q, A) => (v(), f("li", {
|
|
3848
|
+
id: `${d}-option-${A}`,
|
|
3848
3849
|
key: e.getKey(Q),
|
|
3849
3850
|
role: "option",
|
|
3850
|
-
class:
|
|
3851
|
+
class: re(["option", { "focus-visible": u.value === A }]),
|
|
3851
3852
|
"aria-disabled": t.isDisabled(Q) || void 0,
|
|
3852
|
-
"aria-selected":
|
|
3853
|
-
onMousedown: z[1] || (z[1] =
|
|
3853
|
+
"aria-selected": A === h.value,
|
|
3854
|
+
onMousedown: z[1] || (z[1] = ne(() => {
|
|
3854
3855
|
}, ["prevent"])),
|
|
3855
|
-
onClick: (X) => !t.isDisabled(Q) &&
|
|
3856
|
+
onClick: (X) => !t.isDisabled(Q) && H(Q, A)
|
|
3856
3857
|
}, [
|
|
3857
|
-
t.isDisabled(Q) ?
|
|
3858
|
+
t.isDisabled(Q) ? O("", !0) : (v(), J(ce, {
|
|
3858
3859
|
key: 0,
|
|
3859
3860
|
name: "search",
|
|
3860
3861
|
size: 22
|
|
3861
3862
|
})),
|
|
3862
|
-
j(
|
|
3863
|
+
j($.$slots, "option", {
|
|
3863
3864
|
option: Q,
|
|
3864
3865
|
value: e.getValue(Q),
|
|
3865
3866
|
query: n.value,
|
|
3866
|
-
selected:
|
|
3867
|
-
active:
|
|
3867
|
+
selected: A === h.value,
|
|
3868
|
+
active: A === u.value
|
|
3868
3869
|
}, () => [
|
|
3869
3870
|
b("div", Q5, [
|
|
3870
3871
|
P(D5, {
|
|
@@ -3874,48 +3875,48 @@ const O5 = {
|
|
|
3874
3875
|
])
|
|
3875
3876
|
], !0),
|
|
3876
3877
|
b("div", ea, K(e.getValue(Q)), 1)
|
|
3877
|
-
], 42, Y5))), 128)) :
|
|
3878
|
+
], 42, Y5))), 128)) : g.value.length === 0 && !e.loading ? (v(), f("li", ta, [...z[3] || (z[3] = [
|
|
3878
3879
|
b("div", { class: "option-value" }, "No results found", -1)
|
|
3879
|
-
])])) : (v(),
|
|
3880
|
+
])])) : (v(), J(C1, {
|
|
3880
3881
|
key: 2,
|
|
3881
3882
|
"aria-live": "polite",
|
|
3882
3883
|
role: "status",
|
|
3883
3884
|
message: "Loading"
|
|
3884
3885
|
})),
|
|
3885
|
-
|
|
3886
|
+
_.value ? (v(), f("li", aa, [...z[4] || (z[4] = [
|
|
3886
3887
|
b("div", { class: "option-value" }, " Recents ", -1)
|
|
3887
|
-
])])) :
|
|
3888
|
-
(v(!0), f(
|
|
3888
|
+
])])) : O("", !0),
|
|
3889
|
+
(v(!0), f(le, null, ve(c.value, (Q) => (v(), f("li", {
|
|
3889
3890
|
key: Q,
|
|
3890
3891
|
role: "presentation",
|
|
3891
3892
|
"aria-hidden": "true",
|
|
3892
3893
|
class: "option recent-item",
|
|
3893
|
-
onClick: (
|
|
3894
|
+
onClick: (A) => G(Q)
|
|
3894
3895
|
}, [
|
|
3895
|
-
P(
|
|
3896
|
+
P(ce, { name: "clock" }),
|
|
3896
3897
|
b("div", na, K(Q), 1)
|
|
3897
3898
|
], 8, oa))), 128))
|
|
3898
3899
|
], 512), [
|
|
3899
|
-
[ze,
|
|
3900
|
+
[ze, r.value]
|
|
3900
3901
|
])
|
|
3901
3902
|
]),
|
|
3902
3903
|
_: 3
|
|
3903
3904
|
}),
|
|
3904
|
-
|
|
3905
|
-
j(
|
|
3906
|
-
])) :
|
|
3907
|
-
n.value.length > 0 ? (v(),
|
|
3905
|
+
$.$slots.icon ? (v(), f("span", la, [
|
|
3906
|
+
j($.$slots, "icon", {}, void 0, !0)
|
|
3907
|
+
])) : O("", !0),
|
|
3908
|
+
n.value.length > 0 ? (v(), J(he, {
|
|
3908
3909
|
key: 1,
|
|
3909
3910
|
type: "button",
|
|
3910
3911
|
class: "btn btn-icon",
|
|
3911
3912
|
"aria-label": "Clear search query",
|
|
3912
3913
|
title: "Clear search query",
|
|
3913
|
-
onMousedown: z[2] || (z[2] =
|
|
3914
|
+
onMousedown: z[2] || (z[2] = ne(() => {
|
|
3914
3915
|
}, ["prevent"])),
|
|
3915
|
-
onClick:
|
|
3916
|
+
onClick: k
|
|
3916
3917
|
}, {
|
|
3917
|
-
default:
|
|
3918
|
-
P(
|
|
3918
|
+
default: W(() => [
|
|
3919
|
+
P(ce, {
|
|
3919
3920
|
class: "clear-search",
|
|
3920
3921
|
"aria-hidden": "true",
|
|
3921
3922
|
name: "close",
|
|
@@ -3923,7 +3924,7 @@ const O5 = {
|
|
|
3923
3924
|
})
|
|
3924
3925
|
]),
|
|
3925
3926
|
_: 1
|
|
3926
|
-
})) :
|
|
3927
|
+
})) : O("", !0)
|
|
3927
3928
|
], 2));
|
|
3928
3929
|
}
|
|
3929
3930
|
}), Lo = /* @__PURE__ */ U(ra, [["__scopeId", "data-v-aefb7615"]]), sa = 5, fe = n1({
|
|
@@ -3956,7 +3957,7 @@ const Me = (e, o = "info") => {
|
|
|
3956
3957
|
), ca = ["data-variant", "data-state", "role", "aria-describedby"], da = { class: "content" }, va = {
|
|
3957
3958
|
key: 0,
|
|
3958
3959
|
class: "progress"
|
|
3959
|
-
}, fa = 160, Ca = /* @__PURE__ */
|
|
3960
|
+
}, fa = 160, Ca = /* @__PURE__ */ B({
|
|
3960
3961
|
__name: "ToastRoot",
|
|
3961
3962
|
props: {
|
|
3962
3963
|
id: {},
|
|
@@ -3966,31 +3967,31 @@ const Me = (e, o = "info") => {
|
|
|
3966
3967
|
focus: { type: Boolean }
|
|
3967
3968
|
},
|
|
3968
3969
|
setup(e) {
|
|
3969
|
-
const o = e, t =
|
|
3970
|
-
let
|
|
3970
|
+
const o = e, t = p(null), a = p("open"), s = p(100);
|
|
3971
|
+
let l = Date.now(), i;
|
|
3971
3972
|
const n = () => {
|
|
3972
|
-
const
|
|
3973
|
-
if (s.value = Math.max(0, 100 -
|
|
3974
|
-
|
|
3973
|
+
const u = Date.now() - l;
|
|
3974
|
+
if (s.value = Math.max(0, 100 - u / o.duration * 100), s.value <= 0) {
|
|
3975
|
+
c();
|
|
3975
3976
|
return;
|
|
3976
3977
|
}
|
|
3977
3978
|
i = requestAnimationFrame(n);
|
|
3978
|
-
},
|
|
3979
|
+
}, r = () => {
|
|
3979
3980
|
if (cancelAnimationFrame(i), o.duration === 1 / 0) {
|
|
3980
3981
|
s.value = 100;
|
|
3981
3982
|
return;
|
|
3982
3983
|
}
|
|
3983
|
-
|
|
3984
|
+
l = Date.now(), i = requestAnimationFrame(n);
|
|
3984
3985
|
};
|
|
3985
3986
|
Y(
|
|
3986
3987
|
() => o.duration,
|
|
3987
|
-
() =>
|
|
3988
|
+
() => r(),
|
|
3988
3989
|
{ immediate: !0 }
|
|
3989
3990
|
);
|
|
3990
|
-
const
|
|
3991
|
-
cancelAnimationFrame(i), a.value = "closing", setTimeout(() => fe.toasts = fe.toasts.filter((
|
|
3991
|
+
const c = () => {
|
|
3992
|
+
cancelAnimationFrame(i), a.value = "closing", setTimeout(() => fe.toasts = fe.toasts.filter((u) => u.id !== o.id), fa);
|
|
3992
3993
|
};
|
|
3993
|
-
return ae(() => o.variant === "error" && o.focus && t.value?.focus()), He(() => cancelAnimationFrame(i)), (
|
|
3994
|
+
return ae(() => o.variant === "error" && o.focus && t.value?.focus()), He(() => cancelAnimationFrame(i)), (u, h) => (v(), f("div", {
|
|
3994
3995
|
ref_key: "rootRef",
|
|
3995
3996
|
ref: t,
|
|
3996
3997
|
tabindex: "-1",
|
|
@@ -4003,15 +4004,15 @@ const Me = (e, o = "info") => {
|
|
|
4003
4004
|
"aria-describedby": e.loading ? void 0 : `toast-desc-${e.id}`
|
|
4004
4005
|
}, [
|
|
4005
4006
|
b("div", da, [
|
|
4006
|
-
j(
|
|
4007
|
+
j(u.$slots, "default", {}, void 0, !0),
|
|
4007
4008
|
P(he, {
|
|
4008
4009
|
type: "button",
|
|
4009
|
-
onClick:
|
|
4010
|
+
onClick: c,
|
|
4010
4011
|
"aria-label": `Close ${e.variant} notification`,
|
|
4011
4012
|
class: "btn-sm"
|
|
4012
4013
|
}, {
|
|
4013
|
-
default:
|
|
4014
|
-
P(
|
|
4014
|
+
default: W(() => [
|
|
4015
|
+
P(ce, {
|
|
4015
4016
|
name: "close",
|
|
4016
4017
|
size: 32
|
|
4017
4018
|
})
|
|
@@ -4024,27 +4025,27 @@ const Me = (e, o = "info") => {
|
|
|
4024
4025
|
class: "bar",
|
|
4025
4026
|
style: ye({ width: s.value + "%" })
|
|
4026
4027
|
}, null, 4)
|
|
4027
|
-
])) :
|
|
4028
|
+
])) : O("", !0)
|
|
4028
4029
|
], 8, ca));
|
|
4029
4030
|
}
|
|
4030
|
-
}), pa = /* @__PURE__ */ U(Ca, [["__scopeId", "data-v-f9e75b9d"]]), ma = { class: "toast-viewport" }, ha = { class: "toast-message" }, ya = { key: 0 }, ba = ["id"], ga = /* @__PURE__ */
|
|
4031
|
+
}), pa = /* @__PURE__ */ U(Ca, [["__scopeId", "data-v-f9e75b9d"]]), ma = { class: "toast-viewport" }, ha = { class: "toast-message" }, ya = { key: 0 }, ba = ["id"], ga = /* @__PURE__ */ B({
|
|
4031
4032
|
__name: "ToastViewport",
|
|
4032
4033
|
setup(e) {
|
|
4033
|
-
return (o, t) => (v(),
|
|
4034
|
+
return (o, t) => (v(), J(Be, { to: "body" }, [
|
|
4034
4035
|
b("div", ma, [
|
|
4035
4036
|
P(y1, { name: "toast-stack" }, {
|
|
4036
|
-
default:
|
|
4037
|
-
(v(!0), f(
|
|
4037
|
+
default: W(() => [
|
|
4038
|
+
(v(!0), f(le, null, ve(R(fe).toasts, (a) => (v(), J(pa, {
|
|
4038
4039
|
key: a.id,
|
|
4039
4040
|
id: a.id,
|
|
4040
4041
|
duration: a.duration,
|
|
4041
4042
|
variant: a.variant,
|
|
4042
4043
|
loading: a.loading
|
|
4043
4044
|
}, {
|
|
4044
|
-
default:
|
|
4045
|
+
default: W(() => [
|
|
4045
4046
|
b("div", ha, [
|
|
4046
|
-
a.title ? (v(), f("strong", ya, K(a.title), 1)) :
|
|
4047
|
-
a.loading ? (v(),
|
|
4047
|
+
a.title ? (v(), f("strong", ya, K(a.title), 1)) : O("", !0),
|
|
4048
|
+
a.loading ? (v(), J(C1, {
|
|
4048
4049
|
key: 1,
|
|
4049
4050
|
message: a.description,
|
|
4050
4051
|
"aria-hidden": "true"
|
|
@@ -4073,7 +4074,7 @@ const $o = {
|
|
|
4073
4074
|
a.setAttribute("data-toast-host", ""), document.body.appendChild(a), b1(a1).mount(a);
|
|
4074
4075
|
}
|
|
4075
4076
|
}
|
|
4076
|
-
}, ka = /* @__PURE__ */
|
|
4077
|
+
}, ka = /* @__PURE__ */ B({
|
|
4077
4078
|
__name: "Card",
|
|
4078
4079
|
props: {
|
|
4079
4080
|
as: { default: "div" },
|
|
@@ -4081,48 +4082,48 @@ const $o = {
|
|
|
4081
4082
|
},
|
|
4082
4083
|
emits: ["click"],
|
|
4083
4084
|
setup(e, { emit: o }) {
|
|
4084
|
-
const t = e, a = o, s =
|
|
4085
|
-
be("card:labelId", s), be("card:descriptionId",
|
|
4086
|
-
const i =
|
|
4087
|
-
return (
|
|
4088
|
-
class:
|
|
4085
|
+
const t = e, a = o, s = p(), l = p();
|
|
4086
|
+
be("card:labelId", s), be("card:descriptionId", l);
|
|
4087
|
+
const i = L(() => t.clickable && t.as !== "button" && t.as !== "a"), n = () => t.clickable && a("click");
|
|
4088
|
+
return (r, c) => (v(), J(Ve(e.as), {
|
|
4089
|
+
class: re(["rs-card", { clickable: e.clickable }]),
|
|
4089
4090
|
tabindex: i.value ? 0 : void 0,
|
|
4090
4091
|
role: i.value ? "button" : void 0,
|
|
4091
4092
|
onClick: n,
|
|
4092
4093
|
onKeydown: [
|
|
4093
|
-
|
|
4094
|
-
|
|
4094
|
+
c[0] || (c[0] = de(ne((u) => i.value && n(), ["prevent"]), ["enter"])),
|
|
4095
|
+
c[1] || (c[1] = de(ne((u) => i.value && n(), ["prevent"]), ["space"]))
|
|
4095
4096
|
],
|
|
4096
4097
|
"aria-labelledby": s.value,
|
|
4097
|
-
"aria-describedby":
|
|
4098
|
+
"aria-describedby": l.value
|
|
4098
4099
|
}, {
|
|
4099
|
-
default:
|
|
4100
|
-
j(
|
|
4100
|
+
default: W(() => [
|
|
4101
|
+
j(r.$slots, "default", {}, void 0, !0)
|
|
4101
4102
|
]),
|
|
4102
4103
|
_: 3
|
|
4103
4104
|
}, 40, ["class", "tabindex", "role", "aria-labelledby", "aria-describedby"]));
|
|
4104
4105
|
}
|
|
4105
|
-
}), Vo = /* @__PURE__ */ U(ka, [["__scopeId", "data-v-e892a9f2"]]), wa = /* @__PURE__ */
|
|
4106
|
+
}), Vo = /* @__PURE__ */ U(ka, [["__scopeId", "data-v-e892a9f2"]]), wa = /* @__PURE__ */ B({
|
|
4106
4107
|
__name: "CardHeader",
|
|
4107
4108
|
props: {
|
|
4108
4109
|
as: { default: "div" }
|
|
4109
4110
|
},
|
|
4110
4111
|
setup(e) {
|
|
4111
|
-
const o =
|
|
4112
|
-
return ae(() => o && (o.value = t)), (a, s) => (v(),
|
|
4112
|
+
const o = se("card:labelId", void 0), t = `rs-card-label-${ue()}`;
|
|
4113
|
+
return ae(() => o && (o.value = t)), (a, s) => (v(), J(Ve(e.as), {
|
|
4113
4114
|
id: t,
|
|
4114
4115
|
class: "rs-card-header"
|
|
4115
4116
|
}, {
|
|
4116
|
-
default:
|
|
4117
|
+
default: W(() => [
|
|
4117
4118
|
j(a.$slots, "default", {}, void 0, !0)
|
|
4118
4119
|
]),
|
|
4119
4120
|
_: 3
|
|
4120
4121
|
}));
|
|
4121
4122
|
}
|
|
4122
|
-
}), Io = /* @__PURE__ */ U(wa, [["__scopeId", "data-v-570794b4"]]), Ma = /* @__PURE__ */
|
|
4123
|
+
}), Io = /* @__PURE__ */ U(wa, [["__scopeId", "data-v-570794b4"]]), Ma = /* @__PURE__ */ B({
|
|
4123
4124
|
__name: "CardBody",
|
|
4124
4125
|
setup(e) {
|
|
4125
|
-
const o =
|
|
4126
|
+
const o = se("card:descriptionId", void 0), t = `rs-card-desc-${ue()}`;
|
|
4126
4127
|
return ae(() => o && (o.value = t)), (a, s) => (v(), f("div", {
|
|
4127
4128
|
id: t,
|
|
4128
4129
|
class: "rs-card-body"
|
|
@@ -4130,14 +4131,14 @@ const $o = {
|
|
|
4130
4131
|
j(a.$slots, "default", {}, void 0, !0)
|
|
4131
4132
|
]));
|
|
4132
4133
|
}
|
|
4133
|
-
}), Ho = /* @__PURE__ */ U(Ma, [["__scopeId", "data-v-f0380fda"]]), La = /* @__PURE__ */
|
|
4134
|
+
}), Ho = /* @__PURE__ */ U(Ma, [["__scopeId", "data-v-f0380fda"]]), La = /* @__PURE__ */ B({
|
|
4134
4135
|
__name: "CardFooter",
|
|
4135
4136
|
props: {
|
|
4136
4137
|
as: { default: "div" }
|
|
4137
4138
|
},
|
|
4138
4139
|
setup(e) {
|
|
4139
|
-
return (o, t) => (v(),
|
|
4140
|
-
default:
|
|
4140
|
+
return (o, t) => (v(), J(Ve(e.as), { class: "rs-card-footer" }, {
|
|
4141
|
+
default: W(() => [
|
|
4141
4142
|
j(o.$slots, "default", {}, void 0, !0)
|
|
4142
4143
|
]),
|
|
4143
4144
|
_: 3
|
|
@@ -4159,7 +4160,7 @@ const $o = {
|
|
|
4159
4160
|
}, Ha = ["id"], Ba = { class: "addons" }, _a = ["id"], Ra = {
|
|
4160
4161
|
key: 0,
|
|
4161
4162
|
class: "slot-default"
|
|
4162
|
-
}, Za = /* @__PURE__ */
|
|
4163
|
+
}, Za = /* @__PURE__ */ B({
|
|
4163
4164
|
__name: "Step",
|
|
4164
4165
|
props: {
|
|
4165
4166
|
title: {},
|
|
@@ -4168,14 +4169,14 @@ const $o = {
|
|
|
4168
4169
|
size: {}
|
|
4169
4170
|
},
|
|
4170
4171
|
setup(e) {
|
|
4171
|
-
const o = e, t =
|
|
4172
|
+
const o = e, t = se("StepsContext");
|
|
4172
4173
|
if (!t) throw new Error("Step component must be used inside Steps.");
|
|
4173
|
-
const a = qe(), s =
|
|
4174
|
-
let n = null,
|
|
4175
|
-
const
|
|
4176
|
-
if (
|
|
4177
|
-
const
|
|
4178
|
-
switch (
|
|
4174
|
+
const a = qe(), s = p(null), l = p(null), i = L(() => t.orientation ?? "horizontal");
|
|
4175
|
+
let n = null, r = null;
|
|
4176
|
+
const c = se("StepIndex");
|
|
4177
|
+
if (c == null) throw new Error("StepIndex component must be used inside Steps.");
|
|
4178
|
+
const u = L(() => o.status ? o.status : c < t.current.value ? "completed" : c === t.current.value ? "active" : "pending"), h = L(() => t?.icons?.[u.value]), x = L(() => a.icon ? "slot" : o.icon ? o.icon : h.value), w = L(() => {
|
|
4179
|
+
switch (u.value) {
|
|
4179
4180
|
case "completed":
|
|
4180
4181
|
return "Stage completed";
|
|
4181
4182
|
case "active":
|
|
@@ -4185,8 +4186,8 @@ const $o = {
|
|
|
4185
4186
|
default:
|
|
4186
4187
|
return "Stage pending";
|
|
4187
4188
|
}
|
|
4188
|
-
}),
|
|
4189
|
-
switch (
|
|
4189
|
+
}), d = L(() => {
|
|
4190
|
+
switch (u.value) {
|
|
4190
4191
|
case "completed":
|
|
4191
4192
|
return "success";
|
|
4192
4193
|
case "active":
|
|
@@ -4196,8 +4197,8 @@ const $o = {
|
|
|
4196
4197
|
default:
|
|
4197
4198
|
return "default";
|
|
4198
4199
|
}
|
|
4199
|
-
}),
|
|
4200
|
-
switch (
|
|
4200
|
+
}), C = L(() => o.size ?? t.size ?? "sm"), V = L(() => {
|
|
4201
|
+
switch (u.value) {
|
|
4201
4202
|
case "completed":
|
|
4202
4203
|
return "Completed";
|
|
4203
4204
|
case "active":
|
|
@@ -4209,32 +4210,32 @@ const $o = {
|
|
|
4209
4210
|
}
|
|
4210
4211
|
});
|
|
4211
4212
|
Y(
|
|
4212
|
-
() =>
|
|
4213
|
-
(
|
|
4213
|
+
() => u.value,
|
|
4214
|
+
(S) => t.registerStepStatus(c, S),
|
|
4214
4215
|
{ immediate: !0 }
|
|
4215
4216
|
);
|
|
4216
|
-
const
|
|
4217
|
+
const _ = () => {
|
|
4217
4218
|
n == null && (n = requestAnimationFrame(() => {
|
|
4218
|
-
n = null,
|
|
4219
|
+
n = null, g();
|
|
4219
4220
|
}));
|
|
4220
|
-
},
|
|
4221
|
-
if (!s.value || !
|
|
4222
|
-
const
|
|
4223
|
-
t.registerIndicatorCenter(
|
|
4224
|
-
}, D = (
|
|
4225
|
-
const
|
|
4226
|
-
switch (
|
|
4221
|
+
}, g = () => {
|
|
4222
|
+
if (!s.value || !l.value) return;
|
|
4223
|
+
const S = l.value.getBoundingClientRect(), y = t.stepsRef.value.getBoundingClientRect(), M = t.orientation === "vertical" ? S.top + S.height / 2 - y.top : S.left + S.width / 2 - y.left;
|
|
4224
|
+
t.registerIndicatorCenter(c, M);
|
|
4225
|
+
}, D = (S) => {
|
|
4226
|
+
const y = t.orientation === "horizontal", M = t.orientation === "vertical";
|
|
4227
|
+
switch (S.key) {
|
|
4227
4228
|
case "ArrowRight":
|
|
4228
|
-
|
|
4229
|
+
y && t.focusNext();
|
|
4229
4230
|
break;
|
|
4230
4231
|
case "ArrowLeft":
|
|
4231
|
-
|
|
4232
|
+
y && t.focusPrev();
|
|
4232
4233
|
break;
|
|
4233
4234
|
case "ArrowDown":
|
|
4234
|
-
|
|
4235
|
+
M && t.focusNext();
|
|
4235
4236
|
break;
|
|
4236
4237
|
case "ArrowUp":
|
|
4237
|
-
|
|
4238
|
+
M && t.focusPrev();
|
|
4238
4239
|
break;
|
|
4239
4240
|
case "Home":
|
|
4240
4241
|
t.focusFirst();
|
|
@@ -4245,84 +4246,84 @@ const $o = {
|
|
|
4245
4246
|
default:
|
|
4246
4247
|
return;
|
|
4247
4248
|
}
|
|
4248
|
-
|
|
4249
|
+
S.preventDefault();
|
|
4249
4250
|
};
|
|
4250
4251
|
return ae(() => {
|
|
4251
|
-
!s.value || !
|
|
4252
|
-
requestAnimationFrame(
|
|
4253
|
-
}),
|
|
4254
|
-
|
|
4255
|
-
}),
|
|
4252
|
+
!s.value || !l.value || (requestAnimationFrame(() => {
|
|
4253
|
+
requestAnimationFrame(g);
|
|
4254
|
+
}), r = new ResizeObserver(() => {
|
|
4255
|
+
_();
|
|
4256
|
+
}), r.observe(s.value), r.observe(l.value), t.stepsRef.value && r.observe(t.stepsRef.value), t.registerStep(s.value));
|
|
4256
4257
|
}), ge(() => {
|
|
4257
|
-
|
|
4258
|
-
}), (
|
|
4258
|
+
r?.disconnect(), t.unregisterStep(s.value), n != null && cancelAnimationFrame(n);
|
|
4259
|
+
}), (S, y) => (v(), f("li", {
|
|
4259
4260
|
ref_key: "stepRef",
|
|
4260
4261
|
ref: s,
|
|
4261
|
-
class:
|
|
4262
|
+
class: re(["step", `step__${C.value}`]),
|
|
4262
4263
|
role: "listitem",
|
|
4263
|
-
"data-status":
|
|
4264
|
+
"data-status": u.value,
|
|
4264
4265
|
"data-orientation": i.value,
|
|
4265
|
-
"data-active":
|
|
4266
|
-
"data-completed":
|
|
4267
|
-
"aria-labelledby": `step-title-${R(
|
|
4268
|
-
tabindex:
|
|
4269
|
-
"aria-current":
|
|
4270
|
-
"aria-posinset": R(
|
|
4266
|
+
"data-active": u.value === "active",
|
|
4267
|
+
"data-completed": u.value === "completed",
|
|
4268
|
+
"aria-labelledby": `step-title-${R(c)}`,
|
|
4269
|
+
tabindex: u.value === "active" ? 0 : -1,
|
|
4270
|
+
"aria-current": u.value === "active" ? "step" : void 0,
|
|
4271
|
+
"aria-posinset": R(c) + 1,
|
|
4271
4272
|
"aria-setsize": R(t).stepsCount.value,
|
|
4272
|
-
"aria-describedby": `step-status-${R(
|
|
4273
|
+
"aria-describedby": `step-status-${R(c)}`,
|
|
4273
4274
|
onKeydown: D
|
|
4274
4275
|
}, [
|
|
4275
4276
|
b("span", {
|
|
4276
4277
|
ref_key: "indicatorRef",
|
|
4277
|
-
ref:
|
|
4278
|
+
ref: l,
|
|
4278
4279
|
class: "indicator",
|
|
4279
4280
|
"aria-hidden": "true"
|
|
4280
4281
|
}, [
|
|
4281
|
-
|
|
4282
|
+
S.$slots.icon ? j(S.$slots, "icon", {
|
|
4282
4283
|
key: 0,
|
|
4283
|
-
status:
|
|
4284
|
-
}, void 0, !0) :
|
|
4284
|
+
status: u.value
|
|
4285
|
+
}, void 0, !0) : x.value ? (v(), J(ce, {
|
|
4285
4286
|
key: 1,
|
|
4286
|
-
name:
|
|
4287
|
+
name: x.value,
|
|
4287
4288
|
class: "icon"
|
|
4288
|
-
}, null, 8, ["name"])) :
|
|
4289
|
-
|
|
4289
|
+
}, null, 8, ["name"])) : O("", !0),
|
|
4290
|
+
u.value === "completed" ? (v(), f("svg", $a, [...y[0] || (y[0] = [
|
|
4290
4291
|
b("path", {
|
|
4291
4292
|
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",
|
|
4292
4293
|
fill: "currentColor"
|
|
4293
4294
|
}, null, -1)
|
|
4294
|
-
])])) :
|
|
4295
|
+
])])) : u.value === "error" ? (v(), f("svg", Va, [...y[1] || (y[1] = [
|
|
4295
4296
|
b("path", {
|
|
4296
4297
|
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",
|
|
4297
4298
|
fill: "currentColor"
|
|
4298
4299
|
}, null, -1)
|
|
4299
|
-
])])) :
|
|
4300
|
+
])])) : u.value === "active" ? (v(), f("span", Ia)) : O("", !0)
|
|
4300
4301
|
], 512),
|
|
4301
4302
|
b("span", {
|
|
4302
|
-
id: `step-status-${R(
|
|
4303
|
+
id: `step-status-${R(c)}`,
|
|
4303
4304
|
class: "sr-only"
|
|
4304
|
-
}, K(
|
|
4305
|
+
}, K(w.value), 9, Ha),
|
|
4305
4306
|
b("div", Ba, [
|
|
4306
4307
|
b("span", {
|
|
4307
|
-
id: `step-title-${R(
|
|
4308
|
+
id: `step-title-${R(c)}`,
|
|
4308
4309
|
class: "title"
|
|
4309
4310
|
}, K(e.title), 9, _a),
|
|
4310
4311
|
P(F2, {
|
|
4311
|
-
variant:
|
|
4312
|
+
variant: d.value,
|
|
4312
4313
|
size: "sm"
|
|
4313
4314
|
}, {
|
|
4314
|
-
default:
|
|
4315
|
+
default: W(() => [
|
|
4315
4316
|
me(K(V.value), 1)
|
|
4316
4317
|
]),
|
|
4317
4318
|
_: 1
|
|
4318
4319
|
}, 8, ["variant"]),
|
|
4319
|
-
|
|
4320
|
-
j(
|
|
4321
|
-
])) :
|
|
4320
|
+
S.$slots.default ? (v(), f("span", Ra, [
|
|
4321
|
+
j(S.$slots, "default", {}, void 0, !0)
|
|
4322
|
+
])) : O("", !0)
|
|
4322
4323
|
])
|
|
4323
4324
|
], 42, xa));
|
|
4324
4325
|
}
|
|
4325
|
-
}), _o = /* @__PURE__ */ U(Za, [["__scopeId", "data-v-5c2d8caa"]]), Aa = /* @__PURE__ */
|
|
4326
|
+
}), _o = /* @__PURE__ */ U(Za, [["__scopeId", "data-v-5c2d8caa"]]), Aa = /* @__PURE__ */ B({
|
|
4326
4327
|
__name: "StepsItem",
|
|
4327
4328
|
props: {
|
|
4328
4329
|
index: {}
|
|
@@ -4334,7 +4335,7 @@ const $o = {
|
|
|
4334
4335
|
"aria-live": "polite",
|
|
4335
4336
|
"aria-atomic": "true",
|
|
4336
4337
|
class: "sr-only"
|
|
4337
|
-
}, Da = /* @__PURE__ */
|
|
4338
|
+
}, Da = /* @__PURE__ */ B({
|
|
4338
4339
|
__name: "Steps",
|
|
4339
4340
|
props: /* @__PURE__ */ te({
|
|
4340
4341
|
orientation: { default: "horizontal" },
|
|
@@ -4349,13 +4350,13 @@ const $o = {
|
|
|
4349
4350
|
}),
|
|
4350
4351
|
emits: ["update:modelValue"],
|
|
4351
4352
|
setup(e) {
|
|
4352
|
-
const o = e, t =
|
|
4353
|
+
const o = e, t = p(0), a = qe(), s = pe(e, "modelValue"), l = p([]), i = p(null), n = L(() => s.value ?? 0), r = `steps-description-${ue()}`, c = g1({}), u = n1({});
|
|
4353
4354
|
let h = null;
|
|
4354
|
-
const
|
|
4355
|
-
() => Object.values(
|
|
4356
|
-
),
|
|
4357
|
-
const Z = n.value,
|
|
4358
|
-
if (
|
|
4355
|
+
const x = L(() => (a.default?.() ?? [])[n.value]?.props?.title ?? ""), w = L(() => Object.entries(u).filter(([, Z]) => Z !== "completed").length === 0), d = L(
|
|
4356
|
+
() => Object.values(u).includes("error")
|
|
4357
|
+
), C = L(() => {
|
|
4358
|
+
const Z = n.value, N = c;
|
|
4359
|
+
if (N.value[0] == null || N.value[Z] == null)
|
|
4359
4360
|
return o.orientation === "vertical" ? {
|
|
4360
4361
|
height: "100%",
|
|
4361
4362
|
top: "0px"
|
|
@@ -4363,70 +4364,70 @@ const $o = {
|
|
|
4363
4364
|
width: "100%",
|
|
4364
4365
|
left: "0px"
|
|
4365
4366
|
};
|
|
4366
|
-
const m =
|
|
4367
|
+
const m = N.value[0], k = N.value[Z];
|
|
4367
4368
|
return o.orientation === "vertical" ? {
|
|
4368
4369
|
top: `${m}px`,
|
|
4369
|
-
height: `${
|
|
4370
|
+
height: `${k - m}px`
|
|
4370
4371
|
} : {
|
|
4371
4372
|
left: `${m}px`,
|
|
4372
|
-
width: `${
|
|
4373
|
+
width: `${k - m}px`
|
|
4373
4374
|
};
|
|
4374
|
-
}), V =
|
|
4375
|
-
const Z = Object.values(
|
|
4375
|
+
}), V = L(() => {
|
|
4376
|
+
const Z = Object.values(c.value).sort((k, E) => k - E);
|
|
4376
4377
|
if (Z.length < 2) return {};
|
|
4377
|
-
const
|
|
4378
|
+
const N = Z[0], m = Z[Z.length - 1];
|
|
4378
4379
|
return o.orientation === "vertical" ? {
|
|
4379
|
-
top: `${
|
|
4380
|
-
height: `${m -
|
|
4380
|
+
top: `${N}px`,
|
|
4381
|
+
height: `${m - N}px`
|
|
4381
4382
|
} : {
|
|
4382
|
-
left: `${
|
|
4383
|
+
left: `${N}px`,
|
|
4383
4384
|
right: `calc(100% - ${m}px)`
|
|
4384
4385
|
};
|
|
4385
|
-
}),
|
|
4386
|
-
function
|
|
4387
|
-
|
|
4386
|
+
}), _ = (Z, N) => c.value = { ...c.value, [Z]: N };
|
|
4387
|
+
function g(Z) {
|
|
4388
|
+
l.value.push(Z), t.value = l.value.length;
|
|
4388
4389
|
}
|
|
4389
4390
|
function D(Z) {
|
|
4390
|
-
|
|
4391
|
+
l.value = l.value.filter((N) => N !== Z), t.value = l.value.length;
|
|
4391
4392
|
}
|
|
4392
|
-
function
|
|
4393
|
-
Z < 0 || Z >=
|
|
4393
|
+
function S(Z) {
|
|
4394
|
+
Z < 0 || Z >= l.value.length || (s.value = Z, l.value[Z]?.focus());
|
|
4394
4395
|
}
|
|
4395
|
-
function
|
|
4396
|
-
|
|
4396
|
+
function y() {
|
|
4397
|
+
S(s.value + 1);
|
|
4397
4398
|
}
|
|
4398
|
-
function
|
|
4399
|
-
|
|
4399
|
+
function M() {
|
|
4400
|
+
S(s.value - 1);
|
|
4400
4401
|
}
|
|
4401
|
-
function
|
|
4402
|
-
|
|
4402
|
+
function H() {
|
|
4403
|
+
S(0);
|
|
4403
4404
|
}
|
|
4404
|
-
function
|
|
4405
|
-
|
|
4405
|
+
function q() {
|
|
4406
|
+
S(t.value - 1);
|
|
4406
4407
|
}
|
|
4407
4408
|
return ae(() => {
|
|
4408
4409
|
i.value && (h = new ResizeObserver(() => {
|
|
4409
4410
|
}), h.observe(i.value));
|
|
4410
4411
|
}), ge(() => h?.disconnect()), be("StepsContext", {
|
|
4411
|
-
current:
|
|
4412
|
+
current: L(() => s.value),
|
|
4412
4413
|
update: (Z) => s.value = Z,
|
|
4413
4414
|
stepsCount: t,
|
|
4414
4415
|
icons: o.icons,
|
|
4415
4416
|
size: o.size,
|
|
4416
4417
|
orientation: o.orientation,
|
|
4417
|
-
stepStatusMap:
|
|
4418
|
+
stepStatusMap: u,
|
|
4418
4419
|
stepsRef: i,
|
|
4419
|
-
registerStepStatus: (Z,
|
|
4420
|
-
|
|
4420
|
+
registerStepStatus: (Z, N) => {
|
|
4421
|
+
u[Z] = N;
|
|
4421
4422
|
},
|
|
4422
|
-
registerIndicatorCenter:
|
|
4423
|
-
registerStep:
|
|
4423
|
+
registerIndicatorCenter: _,
|
|
4424
|
+
registerStep: g,
|
|
4424
4425
|
unregisterStep: D,
|
|
4425
|
-
focusNext:
|
|
4426
|
-
focusPrev:
|
|
4427
|
-
focusFirst:
|
|
4428
|
-
focusLast:
|
|
4429
|
-
}), (Z,
|
|
4426
|
+
focusNext: y,
|
|
4427
|
+
focusPrev: M,
|
|
4428
|
+
focusFirst: H,
|
|
4429
|
+
focusLast: q
|
|
4430
|
+
}), (Z, N) => (v(), f(le, null, [
|
|
4430
4431
|
b("ol", {
|
|
4431
4432
|
ref_key: "stepsRef",
|
|
4432
4433
|
ref: i,
|
|
@@ -4434,10 +4435,10 @@ const $o = {
|
|
|
4434
4435
|
role: "list",
|
|
4435
4436
|
"data-size": e.size,
|
|
4436
4437
|
"data-orientation": o.orientation,
|
|
4437
|
-
"aria-describedby":
|
|
4438
|
+
"aria-describedby": r
|
|
4438
4439
|
}, [
|
|
4439
4440
|
b("p", {
|
|
4440
|
-
id:
|
|
4441
|
+
id: r,
|
|
4441
4442
|
class: "sr-only"
|
|
4442
4443
|
}, " This is a multi-step process. Use arrow keys to navigate between steps. "),
|
|
4443
4444
|
b("div", {
|
|
@@ -4447,25 +4448,25 @@ const $o = {
|
|
|
4447
4448
|
}, [
|
|
4448
4449
|
b("div", {
|
|
4449
4450
|
class: "track-progress",
|
|
4450
|
-
"data-error":
|
|
4451
|
-
"data-completed":
|
|
4452
|
-
style: ye(
|
|
4451
|
+
"data-error": d.value,
|
|
4452
|
+
"data-completed": w.value,
|
|
4453
|
+
style: ye(C.value)
|
|
4453
4454
|
}, null, 12, Sa)
|
|
4454
4455
|
], 4),
|
|
4455
|
-
(v(!0), f(
|
|
4456
|
-
key:
|
|
4457
|
-
index:
|
|
4456
|
+
(v(!0), f(le, null, ve(Z.$slots.default?.(), (m, k) => (v(), J(Aa, {
|
|
4457
|
+
key: k,
|
|
4458
|
+
index: k
|
|
4458
4459
|
}, {
|
|
4459
|
-
default:
|
|
4460
|
-
(v(),
|
|
4460
|
+
default: W(() => [
|
|
4461
|
+
(v(), J(Ve(m)))
|
|
4461
4462
|
]),
|
|
4462
4463
|
_: 2
|
|
4463
4464
|
}, 1032, ["index"]))), 128))
|
|
4464
4465
|
], 8, Ta),
|
|
4465
|
-
b("div", Ea, " Step " + K(n.value + 1) + " of " + K(t.value) + ": " + K(
|
|
4466
|
+
b("div", Ea, " Step " + K(n.value + 1) + " of " + K(t.value) + ": " + K(x.value), 1)
|
|
4466
4467
|
], 64));
|
|
4467
4468
|
}
|
|
4468
|
-
}), Ro = /* @__PURE__ */ U(Da, [["__scopeId", "data-v-8697173d"]]), za = ["data-align"], Oa = /* @__PURE__ */
|
|
4469
|
+
}), Ro = /* @__PURE__ */ U(Da, [["__scopeId", "data-v-8697173d"]]), za = ["data-align"], Oa = /* @__PURE__ */ B({
|
|
4469
4470
|
__name: "Timeline",
|
|
4470
4471
|
props: {
|
|
4471
4472
|
align: { default: "left" }
|
|
@@ -4479,7 +4480,7 @@ const $o = {
|
|
|
4479
4480
|
j(t.$slots, "default", {}, void 0, !0)
|
|
4480
4481
|
], 8, za));
|
|
4481
4482
|
}
|
|
4482
|
-
}), Zo = /* @__PURE__ */ U(Oa, [["__scopeId", "data-v-d56deb2b"]]), qa = ["data-align", "aria-labelledby", "aria-describedby"], Na = { class: "ui-timeline-content" }, Fa = ["datetime"], Ka = { class: "ui-timeline-date--month" }, Pa = { class: "ui-timeline-date--day" }, Ua = { class: "ui-timeline-date--year" }, ja = ["data-direction"], Xa = { class: "info" }, Ga = ["id"], Wa = { class: "addons" }, Ja = /* @__PURE__ */
|
|
4483
|
+
}), Zo = /* @__PURE__ */ U(Oa, [["__scopeId", "data-v-d56deb2b"]]), qa = ["data-align", "aria-labelledby", "aria-describedby"], Na = { class: "ui-timeline-content" }, Fa = ["datetime"], Ka = { class: "ui-timeline-date--month" }, Pa = { class: "ui-timeline-date--day" }, Ua = { class: "ui-timeline-date--year" }, ja = ["data-direction"], Xa = { class: "info" }, Ga = ["id"], Wa = { class: "addons" }, Ja = /* @__PURE__ */ B({
|
|
4483
4484
|
__name: "TimelineItem",
|
|
4484
4485
|
props: {
|
|
4485
4486
|
date: {},
|
|
@@ -4490,20 +4491,20 @@ const $o = {
|
|
|
4490
4491
|
titleAs: {}
|
|
4491
4492
|
},
|
|
4492
4493
|
setup(e) {
|
|
4493
|
-
const o = e, t =
|
|
4494
|
+
const o = e, t = se("TimelineContext");
|
|
4494
4495
|
if (!t) throw new Error("TimelineItem must be used within a Timeline component");
|
|
4495
|
-
const a =
|
|
4496
|
-
const
|
|
4497
|
-
return
|
|
4498
|
-
}, n = (
|
|
4499
|
-
return (
|
|
4496
|
+
const a = ue(), s = ue(), l = L(() => t.align === "alternate" ? (o.index ?? 0) % 2 === 0 ? "ui-timeline-item--left" : "ui-timeline-item--right" : `ui-timeline-item--${t.align}`), i = (c) => {
|
|
4497
|
+
const u = new Date(c).getDay();
|
|
4498
|
+
return u < 10 ? `0${u}` : u;
|
|
4499
|
+
}, n = (c) => new Date(c).toLocaleString("default", { month: "short" }), r = (c) => new Date(c).getFullYear();
|
|
4500
|
+
return (c, u) => (v(), f("li", {
|
|
4500
4501
|
tabindex: "0",
|
|
4501
|
-
class:
|
|
4502
|
+
class: re([l.value, "ui-timeline-item"]),
|
|
4502
4503
|
"data-align": R(t).align,
|
|
4503
4504
|
"aria-labelledby": e.title ? R(a) : void 0,
|
|
4504
4505
|
"aria-describedby": e.description ? R(s) : void 0
|
|
4505
4506
|
}, [
|
|
4506
|
-
|
|
4507
|
+
u[0] || (u[0] = b("div", {
|
|
4507
4508
|
class: "ui-timeline-marker",
|
|
4508
4509
|
"aria-hidden": "true"
|
|
4509
4510
|
}, null, -1)),
|
|
@@ -4515,34 +4516,34 @@ const $o = {
|
|
|
4515
4516
|
}, [
|
|
4516
4517
|
b("span", Ka, K(n(e.date)), 1),
|
|
4517
4518
|
b("span", Pa, K(i(e.date)), 1),
|
|
4518
|
-
b("span", Ua, K(
|
|
4519
|
-
], 8, Fa)) :
|
|
4519
|
+
b("span", Ua, K(r(e.date)), 1)
|
|
4520
|
+
], 8, Fa)) : O("", !0),
|
|
4520
4521
|
b("div", {
|
|
4521
4522
|
class: "ui-timeline-body",
|
|
4522
4523
|
"data-direction": e.flexDirection
|
|
4523
4524
|
}, [
|
|
4524
4525
|
b("div", Xa, [
|
|
4525
|
-
j(
|
|
4526
|
-
(v(),
|
|
4526
|
+
j(c.$slots, "title", {}, () => [
|
|
4527
|
+
(v(), J(Ve(e.titleAs ?? "h3"), {
|
|
4527
4528
|
id: R(a),
|
|
4528
4529
|
class: "ui-timeline-title"
|
|
4529
4530
|
}, {
|
|
4530
|
-
default:
|
|
4531
|
+
default: W(() => [
|
|
4531
4532
|
me(K(e.title), 1)
|
|
4532
4533
|
]),
|
|
4533
4534
|
_: 1
|
|
4534
4535
|
}, 8, ["id"]))
|
|
4535
4536
|
], !0),
|
|
4536
|
-
j(
|
|
4537
|
+
j(c.$slots, "description", {}, () => [
|
|
4537
4538
|
e.description ? (v(), f("p", {
|
|
4538
4539
|
key: 0,
|
|
4539
4540
|
id: R(s),
|
|
4540
4541
|
class: "ui-timeline-description"
|
|
4541
|
-
}, K(e.description), 9, Ga)) :
|
|
4542
|
+
}, K(e.description), 9, Ga)) : O("", !0)
|
|
4542
4543
|
], !0)
|
|
4543
4544
|
]),
|
|
4544
4545
|
b("div", Wa, [
|
|
4545
|
-
j(
|
|
4546
|
+
j(c.$slots, "default", {}, void 0, !0)
|
|
4546
4547
|
])
|
|
4547
4548
|
], 8, ja)
|
|
4548
4549
|
])
|
|
@@ -4555,7 +4556,7 @@ const $o = {
|
|
|
4555
4556
|
key: 0,
|
|
4556
4557
|
role: "tablist",
|
|
4557
4558
|
class: "carousel-indicators"
|
|
4558
|
-
}, ao = ["aria-label", "aria-selected", "aria-current", "onClick", "onKeydown"], oo = 0.35, no = 0.2, lo = /* @__PURE__ */
|
|
4559
|
+
}, ao = ["aria-label", "aria-selected", "aria-current", "onClick", "onKeydown"], oo = 0.35, no = 0.2, lo = /* @__PURE__ */ B({
|
|
4559
4560
|
__name: "Carousel",
|
|
4560
4561
|
props: /* @__PURE__ */ te({
|
|
4561
4562
|
ariaLabel: { default: "Carousel" },
|
|
@@ -4577,91 +4578,91 @@ const $o = {
|
|
|
4577
4578
|
}),
|
|
4578
4579
|
emits: ["update:modelValue"],
|
|
4579
4580
|
setup(e) {
|
|
4580
|
-
const o =
|
|
4581
|
-
let
|
|
4581
|
+
const o = pe(e, "modelValue"), t = e, a = p(0), s = p(0), l = p(0), i = p(0), n = p(0), r = p(0), c = p(!1), u = p(!1), h = p(0), x = p([]), w = p(1), d = p(o.value), C = p(null), V = p(null);
|
|
4582
|
+
let _ = null, g = null;
|
|
4582
4583
|
Y(
|
|
4583
4584
|
() => o.value,
|
|
4584
|
-
(
|
|
4585
|
+
(A) => d.value = A
|
|
4585
4586
|
);
|
|
4586
|
-
const D =
|
|
4587
|
-
const
|
|
4587
|
+
const D = L(() => x.value[d.value] ?? void 0), S = L(() => Math.floor(d.value / w.value)), y = L(() => Math.ceil(G.value / w.value)), M = L(() => Math.max(0, G.value - w.value)), H = L(() => {
|
|
4588
|
+
const A = d.value * (100 / w.value), X = u.value && V.value ? l.value / V.value.clientWidth * 100 : 0;
|
|
4588
4589
|
return {
|
|
4589
|
-
transform: `translateX(calc(-${
|
|
4590
|
-
transition:
|
|
4590
|
+
transform: `translateX(calc(-${A}% + ${X}%))`,
|
|
4591
|
+
transition: u.value ? "none" : "transform 300ms ease"
|
|
4591
4592
|
};
|
|
4592
|
-
}),
|
|
4593
|
-
let X =
|
|
4593
|
+
}), q = (A) => {
|
|
4594
|
+
let X = A;
|
|
4594
4595
|
if (t.loop) {
|
|
4595
|
-
const
|
|
4596
|
-
X = (
|
|
4596
|
+
const ie = Math.round(A / w.value), ee = y.value;
|
|
4597
|
+
X = (ie % ee + ee) % ee * w.value;
|
|
4597
4598
|
} else
|
|
4598
4599
|
X = Math.min(
|
|
4599
|
-
Math.max(
|
|
4600
|
-
|
|
4600
|
+
Math.max(A, 0),
|
|
4601
|
+
M.value
|
|
4601
4602
|
);
|
|
4602
|
-
|
|
4603
|
-
}, Z = () =>
|
|
4604
|
-
|
|
4605
|
-
},
|
|
4606
|
-
!t.autoplay ||
|
|
4607
|
-
|
|
4603
|
+
d.value = X, o.value = X;
|
|
4604
|
+
}, Z = () => q(d.value + w.value), N = () => q(d.value - w.value), m = (A) => {
|
|
4605
|
+
A.key === "ArrowRight" ? Z() : A.key === "ArrowLeft" && N();
|
|
4606
|
+
}, k = (A) => (x.value.includes(A) || x.value.push(A), x.value.indexOf(A)), E = (A) => x.value = x.value.filter((X) => X !== A), G = L(() => x.value.length), I = () => {
|
|
4607
|
+
!t.autoplay || _ !== null || (_ = window.setInterval(() => {
|
|
4608
|
+
c.value || Z();
|
|
4608
4609
|
}, t.autoplayDelay));
|
|
4609
|
-
},
|
|
4610
|
-
|
|
4611
|
-
},
|
|
4610
|
+
}, T = () => {
|
|
4611
|
+
_ !== null && (clearInterval(_), _ = null);
|
|
4612
|
+
}, oe = (A) => {
|
|
4612
4613
|
if (typeof t.itemsPerView == "number")
|
|
4613
4614
|
return t.itemsPerView;
|
|
4614
4615
|
const X = Object.entries(t.itemsPerView).map(([ee, ke]) => [Number(ee), ke]).sort((ee, ke) => ee[0] - ke[0]);
|
|
4615
|
-
let
|
|
4616
|
-
for (const [ee, ke] of X)
|
|
4617
|
-
return
|
|
4618
|
-
},
|
|
4619
|
-
|
|
4620
|
-
}, z = (
|
|
4621
|
-
if (!
|
|
4622
|
-
const X = performance.now(),
|
|
4623
|
-
ee > 0 && (n.value =
|
|
4624
|
-
}, Q = (
|
|
4625
|
-
if (!
|
|
4626
|
-
|
|
4627
|
-
const X = V.value.clientWidth /
|
|
4628
|
-
Math.abs(n.value) > oo ? n.value < 0 ? Z() :
|
|
4616
|
+
let ie = X[0]?.[1] ?? 1;
|
|
4617
|
+
for (const [ee, ke] of X) A >= ee && (ie = ke);
|
|
4618
|
+
return ie;
|
|
4619
|
+
}, $ = (A) => {
|
|
4620
|
+
A.button === 0 && (u.value = !0, s.value = A.clientX, a.value = A.clientX, r.value = A.clientX, l.value = 0, i.value = performance.now(), n.value = 0, h.value = d.value, V.value?.setPointerCapture(A.pointerId), T(), V.value.style.userSelect = "");
|
|
4621
|
+
}, z = (A) => {
|
|
4622
|
+
if (!u.value) return;
|
|
4623
|
+
const X = performance.now(), ie = A.clientX - a.value, ee = X - i.value;
|
|
4624
|
+
ee > 0 && (n.value = ie / ee), a.value = A.clientX, i.value = X, r.value = A.clientX, l.value = r.value - s.value;
|
|
4625
|
+
}, Q = (A) => {
|
|
4626
|
+
if (!u.value) return;
|
|
4627
|
+
u.value = !1, V.value?.releasePointerCapture(A.pointerId), V.value.style.userSelect = "";
|
|
4628
|
+
const X = V.value.clientWidth / w.value, ie = l.value / X;
|
|
4629
|
+
Math.abs(n.value) > oo ? n.value < 0 ? Z() : N() : Math.abs(ie) > no ? ie < 0 ? Z() : N() : q(h.value), l.value = 0, n.value = 0, I();
|
|
4629
4630
|
};
|
|
4630
4631
|
return ae(() => {
|
|
4631
|
-
|
|
4632
|
-
const X =
|
|
4633
|
-
X !== void 0 && (
|
|
4634
|
-
}),
|
|
4632
|
+
I(), C.value && (g = new ResizeObserver((A) => {
|
|
4633
|
+
const X = A[0]?.contentRect.width;
|
|
4634
|
+
X !== void 0 && (w.value = oe(X));
|
|
4635
|
+
}), g.observe(C.value));
|
|
4635
4636
|
}), ge(() => {
|
|
4636
|
-
|
|
4637
|
+
T(), g?.disconnect();
|
|
4637
4638
|
}), Y(
|
|
4638
4639
|
() => t.autoplay,
|
|
4639
|
-
(
|
|
4640
|
-
|
|
4640
|
+
(A) => {
|
|
4641
|
+
A ? I() : T();
|
|
4641
4642
|
},
|
|
4642
4643
|
{ immediate: !0 }
|
|
4643
|
-
), Y(
|
|
4644
|
-
register:
|
|
4645
|
-
unregister:
|
|
4646
|
-
activeIndex:
|
|
4647
|
-
slideCount:
|
|
4648
|
-
deltaX:
|
|
4649
|
-
itemsPerView: t.itemsPerView instanceof Object ?
|
|
4650
|
-
}), (
|
|
4644
|
+
), Y(w, () => d.value = Math.min(d.value, M.value)), be("CarouselContext", {
|
|
4645
|
+
register: k,
|
|
4646
|
+
unregister: E,
|
|
4647
|
+
activeIndex: d,
|
|
4648
|
+
slideCount: G,
|
|
4649
|
+
deltaX: l,
|
|
4650
|
+
itemsPerView: t.itemsPerView instanceof Object ? w : p(t.itemsPerView)
|
|
4651
|
+
}), (A, X) => (v(), f("div", {
|
|
4651
4652
|
ref_key: "rootRef",
|
|
4652
|
-
ref:
|
|
4653
|
+
ref: C,
|
|
4653
4654
|
role: "region",
|
|
4654
4655
|
class: "carousel",
|
|
4655
4656
|
"aria-roledescription": "carousel",
|
|
4656
4657
|
"aria-label": e.ariaLabel,
|
|
4657
4658
|
tabindex: "0",
|
|
4658
4659
|
"aria-activedescendant": D.value,
|
|
4659
|
-
style: ye({ "--items-per-view":
|
|
4660
|
+
style: ye({ "--items-per-view": w.value }),
|
|
4660
4661
|
onKeydown: m,
|
|
4661
|
-
onMouseenter: X[0] || (X[0] = (
|
|
4662
|
-
onMouseleave: X[1] || (X[1] = (
|
|
4663
|
-
onFocusin: X[2] || (X[2] = (
|
|
4664
|
-
onFocusout: X[3] || (X[3] = (
|
|
4662
|
+
onMouseenter: X[0] || (X[0] = (ie) => c.value = !0),
|
|
4663
|
+
onMouseleave: X[1] || (X[1] = (ie) => c.value = !1),
|
|
4664
|
+
onFocusin: X[2] || (X[2] = (ie) => c.value = !0),
|
|
4665
|
+
onFocusout: X[3] || (X[3] = (ie) => c.value = !1)
|
|
4665
4666
|
}, [
|
|
4666
4667
|
X[4] || (X[4] = b("span", {
|
|
4667
4668
|
id: "carousel-instructions",
|
|
@@ -4672,23 +4673,23 @@ const $o = {
|
|
|
4672
4673
|
ref_key: "trackRef",
|
|
4673
4674
|
ref: V,
|
|
4674
4675
|
class: "carousel-track",
|
|
4675
|
-
style: ye(
|
|
4676
|
-
onPointerdown:
|
|
4676
|
+
style: ye(H.value),
|
|
4677
|
+
onPointerdown: $,
|
|
4677
4678
|
onPointermove: z,
|
|
4678
4679
|
onPointerup: Q,
|
|
4679
4680
|
onPointercancel: Q
|
|
4680
4681
|
}, [
|
|
4681
|
-
j(
|
|
4682
|
+
j(A.$slots, "default", {}, void 0, !0)
|
|
4682
4683
|
], 36)
|
|
4683
4684
|
]),
|
|
4684
|
-
b("span", eo, " Slide " + K(Math.floor(
|
|
4685
|
+
b("span", eo, " Slide " + K(Math.floor(d.value / w.value) + 1) + " of " + K(y.value), 1),
|
|
4685
4686
|
b("button", {
|
|
4686
4687
|
type: "button",
|
|
4687
4688
|
class: "carousel-control prev",
|
|
4688
4689
|
"aria-label": "Previous slide",
|
|
4689
|
-
onClick:
|
|
4690
|
+
onClick: N
|
|
4690
4691
|
}, [
|
|
4691
|
-
P(
|
|
4692
|
+
P(ce, { name: "directionDown" })
|
|
4692
4693
|
]),
|
|
4693
4694
|
b("button", {
|
|
4694
4695
|
type: "button",
|
|
@@ -4696,45 +4697,45 @@ const $o = {
|
|
|
4696
4697
|
"aria-label": "Next slide",
|
|
4697
4698
|
onClick: Z
|
|
4698
4699
|
}, [
|
|
4699
|
-
P(
|
|
4700
|
+
P(ce, { name: "directionDown" })
|
|
4700
4701
|
]),
|
|
4701
4702
|
e.showIndicators ? (v(), f("div", to, [
|
|
4702
|
-
(v(!0), f(
|
|
4703
|
+
(v(!0), f(le, null, ve(y.value, (ie, ee) => (v(), f("button", {
|
|
4703
4704
|
role: "tab",
|
|
4704
4705
|
type: "button",
|
|
4705
4706
|
key: ee,
|
|
4706
|
-
class:
|
|
4707
|
+
class: re(["indicator", { active: ee === Math.floor(d.value / w.value) }]),
|
|
4707
4708
|
"aria-label": `Go to slide ${ee + 1}`,
|
|
4708
|
-
"aria-selected": ee ===
|
|
4709
|
-
"aria-current": ee ===
|
|
4710
|
-
onClick: (ke) =>
|
|
4709
|
+
"aria-selected": ee === S.value,
|
|
4710
|
+
"aria-current": ee === S.value,
|
|
4711
|
+
onClick: (ke) => q(ee * w.value),
|
|
4711
4712
|
onKeydown: [
|
|
4712
|
-
|
|
4713
|
-
|
|
4713
|
+
de(ne((ke) => q((ee - 1 + y.value) % y.value * w.value), ["prevent"]), ["left"]),
|
|
4714
|
+
de(ne((ke) => q((ee + 1) % y.value * w.value), ["prevent"]), ["right"])
|
|
4714
4715
|
]
|
|
4715
4716
|
}, null, 42, ao))), 128))
|
|
4716
|
-
])) :
|
|
4717
|
+
])) : O("", !0)
|
|
4717
4718
|
], 44, Ya));
|
|
4718
4719
|
}
|
|
4719
|
-
}), To = /* @__PURE__ */ U(lo, [["__scopeId", "data-v-30cdfc00"]]), ro = ["aria-hidden", "aria-label"], so = /* @__PURE__ */
|
|
4720
|
+
}), To = /* @__PURE__ */ U(lo, [["__scopeId", "data-v-30cdfc00"]]), ro = ["aria-hidden", "aria-label"], so = /* @__PURE__ */ B({
|
|
4720
4721
|
__name: "CarouselItem",
|
|
4721
4722
|
setup(e) {
|
|
4722
|
-
const o =
|
|
4723
|
+
const o = se("CarouselContext");
|
|
4723
4724
|
if (!o) throw new Error("CarouselItem must be used inside a Carousel");
|
|
4724
|
-
const t = "carousel-item-" +
|
|
4725
|
+
const t = "carousel-item-" + ue(), a = p(0), s = L(() => Math.abs(o.deltaX.value) > 5), l = L(() => Math.floor(a.value / o.itemsPerView.value) === Math.floor(o.activeIndex.value / o.itemsPerView.value));
|
|
4725
4726
|
return ae(() => a.value = o.register(t)), ge(() => o.unregister(t)), (i, n) => (v(), f("div", {
|
|
4726
4727
|
role: "group",
|
|
4727
4728
|
class: "carousel-item",
|
|
4728
4729
|
id: t,
|
|
4729
4730
|
"aria-roledescription": "slide",
|
|
4730
|
-
"aria-hidden": !
|
|
4731
|
+
"aria-hidden": !l.value,
|
|
4731
4732
|
"aria-label": `Slide ${a.value + 1}`,
|
|
4732
|
-
onClickCapture: n[0] || (n[0] = (
|
|
4733
|
+
onClickCapture: n[0] || (n[0] = (r) => s.value && r.preventDefault())
|
|
4733
4734
|
}, [
|
|
4734
4735
|
j(i.$slots, "default", {}, void 0, !0)
|
|
4735
4736
|
], 40, ro));
|
|
4736
4737
|
}
|
|
4737
|
-
}), So = /* @__PURE__ */ U(so, [["__scopeId", "data-v-a569d055"]]), Ze = /* @__PURE__ */ Symbol("TabsContext"), Eo =
|
|
4738
|
+
}), So = /* @__PURE__ */ U(so, [["__scopeId", "data-v-a569d055"]]), Ze = /* @__PURE__ */ Symbol("TabsContext"), Eo = B({
|
|
4738
4739
|
name: "Tabs",
|
|
4739
4740
|
props: {
|
|
4740
4741
|
modelValue: String,
|
|
@@ -4750,63 +4751,63 @@ const $o = {
|
|
|
4750
4751
|
},
|
|
4751
4752
|
emits: ["update:modelValue"],
|
|
4752
4753
|
setup(e, { emit: o, slots: t }) {
|
|
4753
|
-
const a =
|
|
4754
|
-
Y(a, (
|
|
4755
|
-
!
|
|
4756
|
-
document.getElementById(`tab-${
|
|
4754
|
+
const a = p(e.modelValue ?? e.defaultValue), s = p(!1), l = p([]), i = p("forward"), n = p();
|
|
4755
|
+
Y(a, (d) => {
|
|
4756
|
+
!d || !s.value || requestAnimationFrame(() => {
|
|
4757
|
+
document.getElementById(`tab-${d}`)?.focus(), s.value = !1;
|
|
4757
4758
|
});
|
|
4758
4759
|
}), Y(
|
|
4759
4760
|
() => e.modelValue,
|
|
4760
|
-
(
|
|
4761
|
-
|
|
4761
|
+
(d) => {
|
|
4762
|
+
d !== void 0 && (a.value = d);
|
|
4762
4763
|
}
|
|
4763
|
-
), Y(
|
|
4764
|
-
!a.value &&
|
|
4764
|
+
), Y(l, (d) => {
|
|
4765
|
+
!a.value && d.length && (a.value = d[0]);
|
|
4765
4766
|
});
|
|
4766
|
-
const
|
|
4767
|
-
const
|
|
4768
|
-
if (!
|
|
4767
|
+
const r = (d, C) => l.value[C] = d, c = (d) => {
|
|
4768
|
+
const C = l.value.filter(Boolean);
|
|
4769
|
+
if (!C.length) return;
|
|
4769
4770
|
const V = a.value;
|
|
4770
4771
|
if (!V) {
|
|
4771
|
-
a.value =
|
|
4772
|
+
a.value = d, o("update:modelValue", d);
|
|
4772
4773
|
return;
|
|
4773
4774
|
}
|
|
4774
|
-
const
|
|
4775
|
-
if (
|
|
4776
|
-
a.value =
|
|
4775
|
+
const _ = C.indexOf(V), g = C.indexOf(d);
|
|
4776
|
+
if (_ === -1 || g === -1) {
|
|
4777
|
+
a.value = d, o("update:modelValue", d);
|
|
4777
4778
|
return;
|
|
4778
4779
|
}
|
|
4779
|
-
|
|
4780
|
-
},
|
|
4781
|
-
|
|
4782
|
-
},
|
|
4783
|
-
if (
|
|
4784
|
-
const
|
|
4780
|
+
_ !== -1 && g !== -1 && (i.value = g > _ ? "forward" : "backward"), V !== d && (a.value = d, o("update:modelValue", d));
|
|
4781
|
+
}, u = L(() => i.value === "forward" ? "tab-slide-forward" : "tab-slide-backward"), h = (d) => {
|
|
4782
|
+
d instanceof HTMLElement && n.value && (n.value.style.height = `${d.offsetHeight}px`);
|
|
4783
|
+
}, x = (d) => {
|
|
4784
|
+
if (d instanceof HTMLElement && n.value) {
|
|
4785
|
+
const C = d.offsetHeight;
|
|
4785
4786
|
requestAnimationFrame(() => {
|
|
4786
|
-
n.value && (n.value.style.height = `${
|
|
4787
|
+
n.value && (n.value.style.height = `${C}px`);
|
|
4787
4788
|
});
|
|
4788
4789
|
}
|
|
4789
|
-
},
|
|
4790
|
+
}, w = () => {
|
|
4790
4791
|
n.value && (n.value.style.height = "");
|
|
4791
4792
|
};
|
|
4792
4793
|
return be(Ze, {
|
|
4793
4794
|
activeValue: a,
|
|
4794
|
-
setValue:
|
|
4795
|
-
registerTrigger:
|
|
4795
|
+
setValue: c,
|
|
4796
|
+
registerTrigger: r,
|
|
4796
4797
|
direction: i,
|
|
4797
|
-
activationMode:
|
|
4798
|
-
orientation:
|
|
4799
|
-
triggers:
|
|
4798
|
+
activationMode: p(e.activationMode),
|
|
4799
|
+
orientation: p(e.orientation),
|
|
4800
|
+
triggers: l,
|
|
4800
4801
|
contentWrapperRef: n,
|
|
4801
4802
|
focusOnChange: s
|
|
4802
4803
|
}), () => {
|
|
4803
|
-
const
|
|
4804
|
-
|
|
4805
|
-
|
|
4804
|
+
const d = t.default?.() || [], C = [], V = [];
|
|
4805
|
+
d.forEach((g) => {
|
|
4806
|
+
g.type?.name === "TabsContent" ? V.push(g) : C.push(g);
|
|
4806
4807
|
});
|
|
4807
|
-
const
|
|
4808
|
+
const _ = V.find((g) => g.props?.value === a.value);
|
|
4808
4809
|
return [
|
|
4809
|
-
...
|
|
4810
|
+
...C,
|
|
4810
4811
|
F(
|
|
4811
4812
|
"div",
|
|
4812
4813
|
{
|
|
@@ -4816,25 +4817,25 @@ const $o = {
|
|
|
4816
4817
|
F(
|
|
4817
4818
|
$e,
|
|
4818
4819
|
{
|
|
4819
|
-
name:
|
|
4820
|
+
name: u.value,
|
|
4820
4821
|
mode: "out-in",
|
|
4821
4822
|
onBeforeLeave: h,
|
|
4822
|
-
onEnter:
|
|
4823
|
-
onAfterEnter:
|
|
4823
|
+
onEnter: x,
|
|
4824
|
+
onAfterEnter: w
|
|
4824
4825
|
},
|
|
4825
|
-
() =>
|
|
4826
|
-
...
|
|
4827
|
-
key:
|
|
4828
|
-
},
|
|
4826
|
+
() => _ ? [F(_.type, {
|
|
4827
|
+
..._.props,
|
|
4828
|
+
key: _.props.value
|
|
4829
|
+
}, _.children)] : []
|
|
4829
4830
|
)
|
|
4830
4831
|
)
|
|
4831
4832
|
];
|
|
4832
4833
|
};
|
|
4833
4834
|
}
|
|
4834
|
-
}), Do =
|
|
4835
|
+
}), Do = B({
|
|
4835
4836
|
name: "TabsList",
|
|
4836
4837
|
setup(e, { slots: o }) {
|
|
4837
|
-
const t =
|
|
4838
|
+
const t = se(Ze);
|
|
4838
4839
|
if (!t) throw new Error("TabsList components must be used inside <Tabs>");
|
|
4839
4840
|
return () => F(
|
|
4840
4841
|
"div",
|
|
@@ -4846,7 +4847,7 @@ const $o = {
|
|
|
4846
4847
|
o.default?.()
|
|
4847
4848
|
);
|
|
4848
4849
|
}
|
|
4849
|
-
}), zo =
|
|
4850
|
+
}), zo = B({
|
|
4850
4851
|
name: "TabsTrigger",
|
|
4851
4852
|
props: {
|
|
4852
4853
|
value: {
|
|
@@ -4863,38 +4864,38 @@ const $o = {
|
|
|
4863
4864
|
}
|
|
4864
4865
|
},
|
|
4865
4866
|
setup(e, { slots: o }) {
|
|
4866
|
-
const t =
|
|
4867
|
+
const t = se(Ze);
|
|
4867
4868
|
if (!t) throw new Error("TabsTrigger components must be used inside <Tabs>");
|
|
4868
|
-
const a =
|
|
4869
|
+
const a = L(() => t.activeValue.value === e.value), s = () => !e.disabled && t.setValue(e.value), l = (i) => {
|
|
4869
4870
|
if (t.focusOnChange.value = !0, !["ArrowRight", "ArrowLeft", "ArrowDown", "ArrowUp", "Home", "End"].includes(i.key)) return;
|
|
4870
4871
|
i.preventDefault();
|
|
4871
|
-
const
|
|
4872
|
-
let
|
|
4872
|
+
const r = t.triggers.value.filter(Boolean);
|
|
4873
|
+
let u = r.indexOf(e.value);
|
|
4873
4874
|
const h = t.orientation.value === "horizontal";
|
|
4874
4875
|
switch (i.key) {
|
|
4875
4876
|
case "ArrowRight":
|
|
4876
|
-
h &&
|
|
4877
|
+
h && u++;
|
|
4877
4878
|
break;
|
|
4878
4879
|
case "ArrowLeft":
|
|
4879
|
-
h &&
|
|
4880
|
+
h && u--;
|
|
4880
4881
|
break;
|
|
4881
4882
|
case "ArrowDown":
|
|
4882
|
-
h ||
|
|
4883
|
+
h || u++;
|
|
4883
4884
|
break;
|
|
4884
4885
|
case "ArrowUp":
|
|
4885
|
-
h ||
|
|
4886
|
+
h || u--;
|
|
4886
4887
|
break;
|
|
4887
4888
|
case "Home":
|
|
4888
|
-
|
|
4889
|
+
u = 0;
|
|
4889
4890
|
break;
|
|
4890
4891
|
case "End":
|
|
4891
|
-
|
|
4892
|
+
u = r.length - 1;
|
|
4892
4893
|
break;
|
|
4893
4894
|
}
|
|
4894
|
-
|
|
4895
|
-
const
|
|
4896
|
-
t.activationMode.value === "auto" && t.setValue(
|
|
4897
|
-
document.getElementById(`tab-${
|
|
4895
|
+
u = (u + r.length) % r.length;
|
|
4896
|
+
const x = r[u];
|
|
4897
|
+
t.activationMode.value === "auto" && t.setValue(x), requestAnimationFrame(() => {
|
|
4898
|
+
document.getElementById(`tab-${x}`)?.focus();
|
|
4898
4899
|
});
|
|
4899
4900
|
};
|
|
4900
4901
|
return ae(() => !e.disabled && t.registerTrigger(e.value, e.index)), ge(() => t.triggers.value[e.index] = void 0), () => F(
|
|
@@ -4909,12 +4910,12 @@ const $o = {
|
|
|
4909
4910
|
disabled: e.disabled ?? void 0,
|
|
4910
4911
|
class: "tabs-trigger",
|
|
4911
4912
|
onClick: s,
|
|
4912
|
-
onKeydown:
|
|
4913
|
+
onKeydown: l
|
|
4913
4914
|
},
|
|
4914
4915
|
{ default: () => o.default?.() }
|
|
4915
4916
|
);
|
|
4916
4917
|
}
|
|
4917
|
-
}), Oo =
|
|
4918
|
+
}), Oo = B({
|
|
4918
4919
|
name: "TabsContent",
|
|
4919
4920
|
props: {
|
|
4920
4921
|
value: {
|
|
@@ -4923,7 +4924,7 @@ const $o = {
|
|
|
4923
4924
|
}
|
|
4924
4925
|
},
|
|
4925
4926
|
setup(e, { slots: o }) {
|
|
4926
|
-
if (!
|
|
4927
|
+
if (!se(Ze)) throw new Error("TabsContent components must be used inside <Tabs>");
|
|
4927
4928
|
return () => F(
|
|
4928
4929
|
"div",
|
|
4929
4930
|
{
|
|
@@ -4936,97 +4937,97 @@ const $o = {
|
|
|
4936
4937
|
o.default?.()
|
|
4937
4938
|
);
|
|
4938
4939
|
}
|
|
4939
|
-
}), io = { class: "ui-dropdown" }, qo = /* @__PURE__ */
|
|
4940
|
+
}), io = { class: "ui-dropdown" }, qo = /* @__PURE__ */ B({
|
|
4940
4941
|
__name: "Dropdown",
|
|
4941
4942
|
setup(e) {
|
|
4942
4943
|
let o = 0;
|
|
4943
|
-
const t =
|
|
4944
|
+
const t = p(!1), a = p(null), s = p({}), l = `dropdown-${ue()}`, i = `${l}-menu`, n = `${l}-trigger`, r = () => t.value = !0, c = () => {
|
|
4944
4945
|
t.value = !1, s.value = {}, o = 0, a.value?.focus({ preventScroll: !0 });
|
|
4945
|
-
},
|
|
4946
|
+
}, u = () => t.value = !t.value, h = (g) => {
|
|
4946
4947
|
const D = `dropdown-item-${o++}`;
|
|
4947
|
-
return s.value[D] =
|
|
4948
|
-
},
|
|
4949
|
-
const D = s.value[
|
|
4948
|
+
return s.value[D] = g, D;
|
|
4949
|
+
}, x = (g) => {
|
|
4950
|
+
const D = s.value[g];
|
|
4950
4951
|
D && D.focus();
|
|
4951
|
-
},
|
|
4952
|
-
const
|
|
4953
|
-
|
|
4954
|
-
},
|
|
4955
|
-
const
|
|
4956
|
-
D &&
|
|
4957
|
-
},
|
|
4958
|
-
const D = Object.keys(s.value),
|
|
4959
|
-
|
|
4960
|
-
}, V = (
|
|
4961
|
-
const D = Object.keys(s.value),
|
|
4962
|
-
|
|
4963
|
-
},
|
|
4952
|
+
}, w = () => {
|
|
4953
|
+
const g = Object.keys(s.value)[0];
|
|
4954
|
+
g && x(g);
|
|
4955
|
+
}, d = () => {
|
|
4956
|
+
const g = Object.keys(s.value), D = g[g.length - 1];
|
|
4957
|
+
D && x(D);
|
|
4958
|
+
}, C = (g) => {
|
|
4959
|
+
const D = Object.keys(s.value), S = _(g), y = D[S + 1];
|
|
4960
|
+
S >= 0 && S < D.length - 1 && y && x(y);
|
|
4961
|
+
}, V = (g) => {
|
|
4962
|
+
const D = Object.keys(s.value), S = _(g), y = D[S - 1];
|
|
4963
|
+
S > 0 && y && x(y);
|
|
4964
|
+
}, _ = (g) => Object.keys(s.value).indexOf(g);
|
|
4964
4965
|
return be("DropdownContext", {
|
|
4965
|
-
open:
|
|
4966
|
-
close:
|
|
4967
|
-
toggle:
|
|
4966
|
+
open: r,
|
|
4967
|
+
close: c,
|
|
4968
|
+
toggle: u,
|
|
4968
4969
|
isOpen: t,
|
|
4969
4970
|
registerItem: h,
|
|
4970
|
-
focusItem:
|
|
4971
|
-
focusNextItem:
|
|
4971
|
+
focusItem: x,
|
|
4972
|
+
focusNextItem: C,
|
|
4972
4973
|
focusPrevItem: V,
|
|
4973
|
-
focusFirstItem:
|
|
4974
|
-
focusLastItem:
|
|
4974
|
+
focusFirstItem: w,
|
|
4975
|
+
focusLastItem: d,
|
|
4975
4976
|
triggerRef: a,
|
|
4976
4977
|
menuId: i,
|
|
4977
4978
|
triggerId: n
|
|
4978
|
-
}), (
|
|
4979
|
-
j(
|
|
4979
|
+
}), (g, D) => (v(), f("div", io, [
|
|
4980
|
+
j(g.$slots, "default")
|
|
4980
4981
|
]));
|
|
4981
4982
|
}
|
|
4982
|
-
}), uo = /* @__PURE__ */
|
|
4983
|
+
}), uo = /* @__PURE__ */ B({
|
|
4983
4984
|
__name: "DropdownTrigger",
|
|
4984
4985
|
props: {
|
|
4985
4986
|
variant: { default: "button" }
|
|
4986
4987
|
},
|
|
4987
4988
|
setup(e) {
|
|
4988
|
-
const o = e, t =
|
|
4989
|
+
const o = e, t = se("DropdownContext");
|
|
4989
4990
|
if (!t) throw new Error("DropdownTrigger must be used within a Dropdown");
|
|
4990
|
-
const a =
|
|
4991
|
-
|
|
4991
|
+
const a = p(), s = (l) => {
|
|
4992
|
+
l.key === "ArrowDown" && (l.preventDefault(), t.open(), Le(() => t.focusFirstItem())), l.key === "ArrowUp" && (l.preventDefault(), t.open(), Le(() => t.focusLastItem()));
|
|
4992
4993
|
};
|
|
4993
|
-
return ae(() => t.triggerRef.value = a.value?.el), (
|
|
4994
|
+
return ae(() => t.triggerRef.value = a.value?.el), (l, i) => (v(), J(he, {
|
|
4994
4995
|
ref_key: "btn",
|
|
4995
4996
|
ref: a,
|
|
4996
4997
|
id: R(t).triggerId,
|
|
4997
|
-
class:
|
|
4998
|
+
class: re(["ui-dropdown-trigger", { "btn-outline": o.variant === "button" }]),
|
|
4998
4999
|
"aria-haspopup": "menu",
|
|
4999
5000
|
"aria-controls": R(t).menuId,
|
|
5000
5001
|
"aria-expanded": R(t).isOpen.value,
|
|
5001
5002
|
onClick: R(t).toggle,
|
|
5002
5003
|
onKeydown: s
|
|
5003
5004
|
}, {
|
|
5004
|
-
default:
|
|
5005
|
-
j(
|
|
5006
|
-
o.variant === "button" ? (v(),
|
|
5005
|
+
default: W(() => [
|
|
5006
|
+
j(l.$slots, "default", {}, void 0, !0),
|
|
5007
|
+
o.variant === "button" ? (v(), J(ce, {
|
|
5007
5008
|
key: 0,
|
|
5008
5009
|
name: "directionDown"
|
|
5009
|
-
})) :
|
|
5010
|
+
})) : O("", !0)
|
|
5010
5011
|
]),
|
|
5011
5012
|
_: 3
|
|
5012
5013
|
}, 8, ["id", "class", "aria-controls", "aria-expanded", "onClick"]));
|
|
5013
5014
|
}
|
|
5014
|
-
}), No = /* @__PURE__ */ U(uo, [["__scopeId", "data-v-267a3d51"]]), co = ["id", "aria-labelledby"], vo = /* @__PURE__ */
|
|
5015
|
+
}), No = /* @__PURE__ */ U(uo, [["__scopeId", "data-v-267a3d51"]]), co = ["id", "aria-labelledby"], vo = /* @__PURE__ */ B({
|
|
5015
5016
|
__name: "DropdownMenu",
|
|
5016
5017
|
setup(e) {
|
|
5017
|
-
const o =
|
|
5018
|
+
const o = se("DropdownContext");
|
|
5018
5019
|
if (!o) throw new Error("DropdownMenu must be used within a Dropdown");
|
|
5019
|
-
const t =
|
|
5020
|
-
const
|
|
5021
|
-
t.value?.contains(
|
|
5022
|
-
},
|
|
5020
|
+
const t = p(), a = p({}), s = (n) => {
|
|
5021
|
+
const r = n.target;
|
|
5022
|
+
t.value?.contains(r) || o.triggerRef.value?.contains(r) || o.close();
|
|
5023
|
+
}, l = (n) => n.key === "Escape" && o.close(), i = () => {
|
|
5023
5024
|
const n = o.triggerRef.value;
|
|
5024
5025
|
if (!n) return;
|
|
5025
|
-
const
|
|
5026
|
+
const r = n.getBoundingClientRect();
|
|
5026
5027
|
a.value = {
|
|
5027
5028
|
"--dropdown-menu-position": "fixed",
|
|
5028
|
-
"--dropdown-menu-top": `${
|
|
5029
|
-
"--dropdown-menu-left": `${
|
|
5029
|
+
"--dropdown-menu-top": `${r.bottom}px`,
|
|
5030
|
+
"--dropdown-menu-left": `${r.left}px`
|
|
5030
5031
|
};
|
|
5031
5032
|
};
|
|
5032
5033
|
return Y(
|
|
@@ -5043,7 +5044,7 @@ const $o = {
|
|
|
5043
5044
|
window.addEventListener("scroll", i, !0), window.addEventListener("resize", i);
|
|
5044
5045
|
}), ge(() => {
|
|
5045
5046
|
window.removeEventListener("scroll", i, !0), window.removeEventListener("resize", i);
|
|
5046
|
-
}), (n,
|
|
5047
|
+
}), (n, r) => (v(), J(Be, { to: "body" }, [
|
|
5047
5048
|
R(o).isOpen.value ? (v(), f("div", {
|
|
5048
5049
|
key: 0,
|
|
5049
5050
|
role: "menu",
|
|
@@ -5054,22 +5055,22 @@ const $o = {
|
|
|
5054
5055
|
"aria-orientation": "vertical",
|
|
5055
5056
|
"aria-labelledby": R(o).triggerId,
|
|
5056
5057
|
class: "ui-dropdown-menu",
|
|
5057
|
-
onKeydown:
|
|
5058
|
+
onKeydown: l
|
|
5058
5059
|
}, [
|
|
5059
5060
|
j(n.$slots, "default", {}, void 0, !0)
|
|
5060
|
-
], 44, co)) :
|
|
5061
|
+
], 44, co)) : O("", !0)
|
|
5061
5062
|
]));
|
|
5062
5063
|
}
|
|
5063
|
-
}), Fo = /* @__PURE__ */ U(vo, [["__scopeId", "data-v-f2be8ab5"]]), fo = /* @__PURE__ */
|
|
5064
|
+
}), Fo = /* @__PURE__ */ U(vo, [["__scopeId", "data-v-f2be8ab5"]]), fo = /* @__PURE__ */ B({
|
|
5064
5065
|
__name: "DropdownItem",
|
|
5065
5066
|
setup(e) {
|
|
5066
|
-
const o =
|
|
5067
|
+
const o = se("DropdownContext");
|
|
5067
5068
|
if (!o) throw new Error("DropdownItem must be used within a Dropdown");
|
|
5068
5069
|
let t;
|
|
5069
|
-
const a =
|
|
5070
|
-
|
|
5070
|
+
const a = p(), s = (l) => {
|
|
5071
|
+
l.key === "ArrowDown" && (l.preventDefault(), o.focusNextItem(t)), l.key === "ArrowUp" && (l.preventDefault(), o.focusPrevItem(t)), (l.key === "Enter" || l.key === " ") && (l.preventDefault(), a.value?.click(), o.close());
|
|
5071
5072
|
};
|
|
5072
|
-
return ae(() => t = o.registerItem(a.value)), (
|
|
5073
|
+
return ae(() => t = o.registerItem(a.value)), (l, i) => (v(), f("div", {
|
|
5073
5074
|
ref_key: "itemRef",
|
|
5074
5075
|
ref: a,
|
|
5075
5076
|
role: "menuitem",
|
|
@@ -5080,10 +5081,10 @@ const $o = {
|
|
|
5080
5081
|
(...n) => R(o).close && R(o).close(...n)),
|
|
5081
5082
|
onPointerenter: i[1] || (i[1] = (n) => a.value?.focus())
|
|
5082
5083
|
}, [
|
|
5083
|
-
j(
|
|
5084
|
+
j(l.$slots, "default", {}, void 0, !0)
|
|
5084
5085
|
], 544));
|
|
5085
5086
|
}
|
|
5086
|
-
}), Ko = /* @__PURE__ */ U(fo, [["__scopeId", "data-v-69de3d9c"]]), Po =
|
|
5087
|
+
}), Ko = /* @__PURE__ */ U(fo, [["__scopeId", "data-v-69de3d9c"]]), Po = B({
|
|
5087
5088
|
name: "Table",
|
|
5088
5089
|
props: {
|
|
5089
5090
|
columns: {
|
|
@@ -5112,9 +5113,9 @@ const $o = {
|
|
|
5112
5113
|
setup(e, { emit: o, slots: t }) {
|
|
5113
5114
|
const a = (n) => {
|
|
5114
5115
|
if (!n.sortable) return;
|
|
5115
|
-
const
|
|
5116
|
-
o("update:sort", { key: n.key, direction:
|
|
5117
|
-
}, s = () => window.matchMedia("(max-width: 640px)").matches,
|
|
5116
|
+
const r = e.sort?.key === n.key && e.sort.direction === "asc" ? "desc" : "asc";
|
|
5117
|
+
o("update:sort", { key: n.key, direction: r });
|
|
5118
|
+
}, s = () => window.matchMedia("(max-width: 640px)").matches, l = () => F(
|
|
5118
5119
|
"div",
|
|
5119
5120
|
{
|
|
5120
5121
|
class: "rs-table-mobile",
|
|
@@ -5122,36 +5123,36 @@ const $o = {
|
|
|
5122
5123
|
"aria-busy": e.loading || void 0
|
|
5123
5124
|
},
|
|
5124
5125
|
e.loading ? t.loading?.() ?? "Loading..." : e.data.length === 0 ? t.empty?.() ?? "No data available." : e.data.map(
|
|
5125
|
-
(n,
|
|
5126
|
+
(n, r) => F(
|
|
5126
5127
|
"div",
|
|
5127
5128
|
{
|
|
5128
|
-
key: n.id ??
|
|
5129
|
+
key: n.id ?? r,
|
|
5129
5130
|
class: "rs-table-card",
|
|
5130
5131
|
role: e.rowClickable ? "button" : "listitem",
|
|
5131
5132
|
tabindex: e.rowClickable ? 0 : void 0,
|
|
5132
5133
|
onClick: e.rowClickable ? () => o("rowClick", n) : void 0,
|
|
5133
|
-
onKeydown: e.rowClickable ? (
|
|
5134
|
-
(
|
|
5134
|
+
onKeydown: e.rowClickable ? (c) => {
|
|
5135
|
+
(c.key === "Enter" || c.key === " ") && (c.preventDefault(), o("rowClick", n));
|
|
5135
5136
|
} : void 0
|
|
5136
5137
|
},
|
|
5137
5138
|
e.columns.map(
|
|
5138
|
-
(
|
|
5139
|
+
(c) => F(
|
|
5139
5140
|
"div",
|
|
5140
5141
|
{ class: "rs-table-card-row" },
|
|
5141
5142
|
[
|
|
5142
5143
|
F(
|
|
5143
5144
|
"span",
|
|
5144
5145
|
{ class: "rs-table-card-label" },
|
|
5145
|
-
|
|
5146
|
+
c.header
|
|
5146
5147
|
),
|
|
5147
5148
|
F(
|
|
5148
5149
|
"span",
|
|
5149
5150
|
{ class: "rs-table-card-value" },
|
|
5150
5151
|
t.cell?.({
|
|
5151
5152
|
row: n,
|
|
5152
|
-
column:
|
|
5153
|
-
value: n[
|
|
5154
|
-
}) ?? n[
|
|
5153
|
+
column: c,
|
|
5154
|
+
value: n[c.key]
|
|
5155
|
+
}) ?? n[c.key]
|
|
5155
5156
|
)
|
|
5156
5157
|
]
|
|
5157
5158
|
)
|
|
@@ -5189,8 +5190,8 @@ const $o = {
|
|
|
5189
5190
|
"aria-sort": n.sortable ? e.sort?.key === n.key ? e.sort.direction === "asc" ? "ascending" : "descending" : "none" : void 0,
|
|
5190
5191
|
tabindex: n.sortable ? 0 : void 0,
|
|
5191
5192
|
onClick: n.sortable ? () => a(n) : void 0,
|
|
5192
|
-
onKeydown: n.sortable ? (
|
|
5193
|
-
(
|
|
5193
|
+
onKeydown: n.sortable ? (r) => {
|
|
5194
|
+
(r.key === "Enter" || r.key === " ") && (r.preventDefault(), a(n));
|
|
5194
5195
|
} : void 0,
|
|
5195
5196
|
scope: "col"
|
|
5196
5197
|
},
|
|
@@ -5203,7 +5204,7 @@ const $o = {
|
|
|
5203
5204
|
n.header
|
|
5204
5205
|
),
|
|
5205
5206
|
n.sortable ? F(
|
|
5206
|
-
|
|
5207
|
+
ce,
|
|
5207
5208
|
{
|
|
5208
5209
|
name: e.sort?.key === n.key ? e.sort.direction === "asc" ? "sortAsc" : "sortDesc" : "sort",
|
|
5209
5210
|
size: 16
|
|
@@ -5243,32 +5244,32 @@ const $o = {
|
|
|
5243
5244
|
]
|
|
5244
5245
|
)
|
|
5245
5246
|
] : e.data.map(
|
|
5246
|
-
(n,
|
|
5247
|
+
(n, r) => F(
|
|
5247
5248
|
"tr",
|
|
5248
5249
|
{
|
|
5249
|
-
key: n.id ??
|
|
5250
|
+
key: n.id ?? r,
|
|
5250
5251
|
tabindex: e.rowClickable ? 0 : void 0,
|
|
5251
5252
|
role: e.rowClickable ? "button" : void 0,
|
|
5252
5253
|
onClick: e.rowClickable ? () => o("rowClick", n) : void 0,
|
|
5253
|
-
onKeydown: e.rowClickable ? (
|
|
5254
|
-
(
|
|
5254
|
+
onKeydown: e.rowClickable ? (c) => {
|
|
5255
|
+
(c.key === "Enter" || c.key === " ") && (c.preventDefault(), o("rowClick", n));
|
|
5255
5256
|
} : void 0,
|
|
5256
5257
|
"data-clickable": e.rowClickable || void 0
|
|
5257
5258
|
},
|
|
5258
5259
|
e.columns.map(
|
|
5259
|
-
(
|
|
5260
|
+
(c) => F(
|
|
5260
5261
|
"td",
|
|
5261
5262
|
{
|
|
5262
|
-
key:
|
|
5263
|
+
key: c.key,
|
|
5263
5264
|
style: {
|
|
5264
|
-
textAlign:
|
|
5265
|
+
textAlign: c.align || "left"
|
|
5265
5266
|
}
|
|
5266
5267
|
},
|
|
5267
5268
|
t.cell?.({
|
|
5268
5269
|
row: n,
|
|
5269
|
-
column:
|
|
5270
|
-
value: n[
|
|
5271
|
-
}) ?? n[
|
|
5270
|
+
column: c,
|
|
5271
|
+
value: n[c.key]
|
|
5272
|
+
}) ?? n[c.key]
|
|
5272
5273
|
)
|
|
5273
5274
|
)
|
|
5274
5275
|
)
|
|
@@ -5283,11 +5284,11 @@ const $o = {
|
|
|
5283
5284
|
return F(
|
|
5284
5285
|
"div",
|
|
5285
5286
|
{ class: "rs-table-container" },
|
|
5286
|
-
n ?
|
|
5287
|
+
n ? l() : i()
|
|
5287
5288
|
);
|
|
5288
5289
|
};
|
|
5289
5290
|
}
|
|
5290
|
-
}), Ae = /* @__PURE__ */ Symbol("AccordionContext"), Uo =
|
|
5291
|
+
}), Ae = /* @__PURE__ */ Symbol("AccordionContext"), Uo = B({
|
|
5291
5292
|
name: "Accordion",
|
|
5292
5293
|
props: {
|
|
5293
5294
|
multiple: { type: Boolean, default: !1 },
|
|
@@ -5297,21 +5298,21 @@ const $o = {
|
|
|
5297
5298
|
}
|
|
5298
5299
|
},
|
|
5299
5300
|
setup(e, { slots: o }) {
|
|
5300
|
-
const t =
|
|
5301
|
+
const t = p([]), a = p(new Set(e.defaultOpen)), s = (h) => {
|
|
5301
5302
|
if (a.value.has(h)) {
|
|
5302
5303
|
a.value.delete(h);
|
|
5303
5304
|
return;
|
|
5304
5305
|
}
|
|
5305
5306
|
e.multiple || a.value.clear(), a.value.add(h);
|
|
5306
|
-
}, r = (h) => {
|
|
5307
|
-
h.disabled || t.value.includes(h) || (t.value.push(h), t.value.sort((L, M) => L.offsetTop - M.offsetTop));
|
|
5308
|
-
}, i = (h) => t.value = t.value.filter((L) => L !== h), n = (h) => {
|
|
5309
|
-
const L = t.value.indexOf(h);
|
|
5310
|
-
t.value[(L + 1) % t.value.length]?.focus();
|
|
5311
5307
|
}, l = (h) => {
|
|
5312
|
-
|
|
5313
|
-
|
|
5314
|
-
|
|
5308
|
+
h.disabled || t.value.includes(h) || (t.value.push(h), t.value.sort((x, w) => x.offsetTop - w.offsetTop));
|
|
5309
|
+
}, i = (h) => t.value = t.value.filter((x) => x !== h), n = (h) => {
|
|
5310
|
+
const x = t.value.indexOf(h);
|
|
5311
|
+
t.value[(x + 1) % t.value.length]?.focus();
|
|
5312
|
+
}, r = (h) => {
|
|
5313
|
+
const x = t.value.indexOf(h);
|
|
5314
|
+
t.value[(x - 1 + t.value.length) % t.value.length]?.focus();
|
|
5315
|
+
}, c = () => t.value[0]?.focus(), u = () => {
|
|
5315
5316
|
const h = t.value;
|
|
5316
5317
|
h.length && h[h.length - 1]?.focus();
|
|
5317
5318
|
};
|
|
@@ -5319,24 +5320,24 @@ const $o = {
|
|
|
5319
5320
|
multiple: e.multiple,
|
|
5320
5321
|
openItems: a,
|
|
5321
5322
|
toggle: s,
|
|
5322
|
-
registerHeader:
|
|
5323
|
+
registerHeader: l,
|
|
5323
5324
|
unregisterHeader: i,
|
|
5324
5325
|
focusNext: n,
|
|
5325
|
-
focusPrev:
|
|
5326
|
-
focusFirst:
|
|
5327
|
-
focusLast:
|
|
5326
|
+
focusPrev: r,
|
|
5327
|
+
focusFirst: c,
|
|
5328
|
+
focusLast: u
|
|
5328
5329
|
}), () => o.default?.();
|
|
5329
5330
|
}
|
|
5330
|
-
}), jo =
|
|
5331
|
+
}), jo = B({
|
|
5331
5332
|
name: "AccordionItem",
|
|
5332
5333
|
props: {
|
|
5333
5334
|
id: { type: String, required: !0 },
|
|
5334
5335
|
disabled: { type: Boolean, default: !1 }
|
|
5335
5336
|
},
|
|
5336
5337
|
setup(e, { slots: o }) {
|
|
5337
|
-
const t =
|
|
5338
|
+
const t = se(Ae);
|
|
5338
5339
|
if (!t) throw new Error("AccordionItem must be used inside Accordion");
|
|
5339
|
-
const a =
|
|
5340
|
+
const a = L(() => t.openItems.value.has(e.id));
|
|
5340
5341
|
return () => F(
|
|
5341
5342
|
"div",
|
|
5342
5343
|
{
|
|
@@ -5346,16 +5347,16 @@ const $o = {
|
|
|
5346
5347
|
o.default?.({ open: a.value })
|
|
5347
5348
|
);
|
|
5348
5349
|
}
|
|
5349
|
-
}), Xo =
|
|
5350
|
+
}), Xo = B({
|
|
5350
5351
|
name: "AccordionHeader",
|
|
5351
5352
|
props: {
|
|
5352
5353
|
id: { type: String, required: !0 },
|
|
5353
5354
|
disabled: { type: Boolean, default: !1 }
|
|
5354
5355
|
},
|
|
5355
5356
|
setup(e, { slots: o }) {
|
|
5356
|
-
const t =
|
|
5357
|
+
const t = se(Ae), a = p(null);
|
|
5357
5358
|
if (!t) throw new Error("AccordionHeader must be used inside Accordion");
|
|
5358
|
-
const s =
|
|
5359
|
+
const s = L(() => t.openItems.value.has(e.id)), l = () => {
|
|
5359
5360
|
e.disabled || t.toggle?.(e.id);
|
|
5360
5361
|
}, i = (n) => {
|
|
5361
5362
|
if (a.value)
|
|
@@ -5389,7 +5390,7 @@ const $o = {
|
|
|
5389
5390
|
"aria-controls": `panel-${e.id}`,
|
|
5390
5391
|
disabled: e.disabled,
|
|
5391
5392
|
"data-state": s.value ? "open" : "closed",
|
|
5392
|
-
onClick:
|
|
5393
|
+
onClick: l,
|
|
5393
5394
|
onKeydown: i
|
|
5394
5395
|
},
|
|
5395
5396
|
[
|
|
@@ -5401,20 +5402,20 @@ const $o = {
|
|
|
5401
5402
|
F(
|
|
5402
5403
|
"span",
|
|
5403
5404
|
{ class: "rs-accordion-trigger__icon", "aria-hidden": "true" },
|
|
5404
|
-
F(
|
|
5405
|
+
F(ce, { name: "directionDown" })
|
|
5405
5406
|
)
|
|
5406
5407
|
]
|
|
5407
5408
|
);
|
|
5408
5409
|
}
|
|
5409
|
-
}), Go =
|
|
5410
|
+
}), Go = B({
|
|
5410
5411
|
name: "AccordionPanel",
|
|
5411
5412
|
props: {
|
|
5412
5413
|
id: { type: String, required: !0 }
|
|
5413
5414
|
},
|
|
5414
5415
|
setup(e, { slots: o }) {
|
|
5415
|
-
const t =
|
|
5416
|
+
const t = se(Ae);
|
|
5416
5417
|
if (!t) throw new Error("AccordionPanel must be used inside Accordion");
|
|
5417
|
-
const a =
|
|
5418
|
+
const a = L(() => t.openItems.value.has(e.id));
|
|
5418
5419
|
return () => F(
|
|
5419
5420
|
"div",
|
|
5420
5421
|
{
|
|
@@ -5455,7 +5456,7 @@ export {
|
|
|
5455
5456
|
No as DropdownTrigger,
|
|
5456
5457
|
Je as Editor,
|
|
5457
5458
|
D5 as Highlight,
|
|
5458
|
-
|
|
5459
|
+
ce as Icon,
|
|
5459
5460
|
xe as Image,
|
|
5460
5461
|
t1 as ImageGallery,
|
|
5461
5462
|
mo as Input,
|