@reinosoft-ui/core 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/dist/reinosoft-ui.es.js +4428 -0
- package/dist/reinosoft-ui.umd.js +1 -0
- package/dist/style.css +1 -0
- package/dist/vite.svg +1 -0
- package/package.json +33 -0
|
@@ -0,0 +1,4428 @@
|
|
|
1
|
+
import { defineComponent as T, ref as b, computed as L, watch as Y, onMounted as te, createElementBlock as m, openBlock as v, normalizeStyle as be, normalizeClass as re, renderSlot as j, createCommentVNode as K, withDirectives as He, createElementVNode as w, vShow as Oe, mergeProps as we, onUnmounted as he, Fragment as ae, withKeys as ve, unref as _, toDisplayString as U, renderList as de, createBlock as J, Transition as Ie, withCtx as G, withModifiers as oe, nextTick as Me, mergeModels as se, useModel as Ce, useId as ue, provide as ge, createVNode as P, createTextVNode as me, onBeforeUnmount as Ve, Teleport as _e, resolveDynamicComponent as xe, useAttrs as Ne, inject as le, h as F, useSlots as qe, resolveComponent as mt, vModelRadio as pt, vModelDynamic as bt, reactive as ot, TransitionGroup as gt, createApp as Ct, shallowRef as ht } from "vue";
|
|
2
|
+
const yt = ["aria-busy"], kt = ["aria-label"], wt = ["src", "srcset", "sizes", "alt", "aria-hidden", "loading", "decoding"], Lt = /* @__PURE__ */ T({
|
|
3
|
+
__name: "Image",
|
|
4
|
+
props: {
|
|
5
|
+
src: {},
|
|
6
|
+
alt: {},
|
|
7
|
+
fallbackSrc: {},
|
|
8
|
+
srcset: {},
|
|
9
|
+
sizes: {},
|
|
10
|
+
ratio: {},
|
|
11
|
+
lazy: { type: Boolean, default: !0 },
|
|
12
|
+
decoding: { default: "async" },
|
|
13
|
+
decorative: { type: Boolean },
|
|
14
|
+
transform: { type: Boolean }
|
|
15
|
+
},
|
|
16
|
+
emits: ["loaded", "error"],
|
|
17
|
+
setup(e, { emit: a }) {
|
|
18
|
+
const t = e, n = a, s = b(t.src), r = b(), i = b("loading"), o = L(() => t.ratio ? {
|
|
19
|
+
aspectRatio: typeof t.ratio == "number" ? `${t.ratio}` : t.ratio
|
|
20
|
+
} : void 0), l = () => {
|
|
21
|
+
i.value = "loaded", n("loaded");
|
|
22
|
+
}, c = () => {
|
|
23
|
+
if (t.fallbackSrc && s.value !== t.fallbackSrc) {
|
|
24
|
+
s.value = t.fallbackSrc, i.value = "loading";
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
i.value = "error", n("error");
|
|
28
|
+
};
|
|
29
|
+
return Y(
|
|
30
|
+
() => t.src,
|
|
31
|
+
(u) => {
|
|
32
|
+
s.value = u, i.value = "loading";
|
|
33
|
+
}
|
|
34
|
+
), te(() => r.value?.complete && r.value.naturalWidth > 0 && (i.value = "loaded")), (u, g) => (v(), m("div", {
|
|
35
|
+
class: re(["ui-image", {
|
|
36
|
+
"is-loading": i.value === "loading",
|
|
37
|
+
"is-error": i.value === "error",
|
|
38
|
+
"is-loaded": i.value === "loaded",
|
|
39
|
+
transform: e.transform
|
|
40
|
+
}]),
|
|
41
|
+
style: be(o.value),
|
|
42
|
+
"aria-busy": i.value === "loading" || void 0
|
|
43
|
+
}, [
|
|
44
|
+
i.value === "loading" ? j(u.$slots, "placeholder", { key: 0 }, () => [
|
|
45
|
+
g[0] || (g[0] = w("div", {
|
|
46
|
+
class: "ui-image__placeholder",
|
|
47
|
+
"aria-hidden": "true"
|
|
48
|
+
}, null, -1))
|
|
49
|
+
], !0) : i.value === "error" ? j(u.$slots, "fallback", { key: 1 }, () => [
|
|
50
|
+
w("div", {
|
|
51
|
+
class: "ui-image__fallback",
|
|
52
|
+
role: "img",
|
|
53
|
+
"aria-label": e.decorative ? void 0 : e.alt
|
|
54
|
+
}, "Image not available", 8, kt)
|
|
55
|
+
], !0) : K("", !0),
|
|
56
|
+
He(w("img", {
|
|
57
|
+
ref_key: "imgRef",
|
|
58
|
+
ref: r,
|
|
59
|
+
class: "ui-image__img",
|
|
60
|
+
src: s.value,
|
|
61
|
+
srcset: e.srcset,
|
|
62
|
+
sizes: e.sizes,
|
|
63
|
+
alt: e.decorative ? "" : e.alt,
|
|
64
|
+
"aria-hidden": e.decorative || void 0,
|
|
65
|
+
loading: e.lazy ? "lazy" : void 0,
|
|
66
|
+
decoding: e.decoding,
|
|
67
|
+
onLoad: l,
|
|
68
|
+
onError: c
|
|
69
|
+
}, null, 40, wt), [
|
|
70
|
+
[Oe, i.value !== "error"]
|
|
71
|
+
])
|
|
72
|
+
], 14, yt));
|
|
73
|
+
}
|
|
74
|
+
}), W = (e, a) => {
|
|
75
|
+
const t = e.__vccOpts || e;
|
|
76
|
+
for (const [n, s] of a)
|
|
77
|
+
t[n] = s;
|
|
78
|
+
return t;
|
|
79
|
+
}, $e = /* @__PURE__ */ W(Lt, [["__scopeId", "data-v-4c5a40da"]]);
|
|
80
|
+
$e.install = (e) => {
|
|
81
|
+
e.component("Image", $e);
|
|
82
|
+
};
|
|
83
|
+
const Mt = /* @__PURE__ */ T({
|
|
84
|
+
__name: "Button",
|
|
85
|
+
setup(e, { expose: a }) {
|
|
86
|
+
const t = b();
|
|
87
|
+
return a({
|
|
88
|
+
el: t
|
|
89
|
+
}), (n, s) => (v(), m("button", we({
|
|
90
|
+
ref_key: "rootRef",
|
|
91
|
+
ref: t,
|
|
92
|
+
type: "button",
|
|
93
|
+
class: "btn"
|
|
94
|
+
}, n.$attrs), [
|
|
95
|
+
j(n.$slots, "default", {}, void 0, !0)
|
|
96
|
+
], 16));
|
|
97
|
+
}
|
|
98
|
+
}), pe = /* @__PURE__ */ W(Mt, [["__scopeId", "data-v-3b1d64a5"]]);
|
|
99
|
+
pe.install = (e) => {
|
|
100
|
+
e.component("Button", pe);
|
|
101
|
+
};
|
|
102
|
+
const lt = (e) => {
|
|
103
|
+
for (; e; ) {
|
|
104
|
+
if (e instanceof HTMLElement && e.dataset?.block !== void 0) return e;
|
|
105
|
+
e = e.parentNode;
|
|
106
|
+
}
|
|
107
|
+
return null;
|
|
108
|
+
}, $t = (e, a, t) => {
|
|
109
|
+
for (; e && e !== t; ) {
|
|
110
|
+
if (e instanceof HTMLElement && e.tagName.toLowerCase() === a) return e;
|
|
111
|
+
e = e.parentNode;
|
|
112
|
+
}
|
|
113
|
+
return null;
|
|
114
|
+
}, It = (e) => e.replaceWith(...Array.from(e.childNodes)), xt = (e = "p") => {
|
|
115
|
+
const a = document.createElement(e);
|
|
116
|
+
return a.dataset.block = "", a.innerHTML = "<br>", a;
|
|
117
|
+
}, We = (e) => {
|
|
118
|
+
const a = document.createRange(), t = window.getSelection();
|
|
119
|
+
a.selectNodeContents(e), a.collapse(!0), t?.removeAllRanges(), t?.addRange(a);
|
|
120
|
+
}, Ht = (e, a) => {
|
|
121
|
+
if (e.shiftKey) {
|
|
122
|
+
_t();
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
Vt(e, a);
|
|
126
|
+
}, Vt = (e, a) => {
|
|
127
|
+
e.preventDefault();
|
|
128
|
+
const t = window.getSelection();
|
|
129
|
+
if (!t || t.rangeCount === 0) return;
|
|
130
|
+
const n = t.getRangeAt(0), s = lt(n.startContainer);
|
|
131
|
+
if (!s) return;
|
|
132
|
+
const i = xt("p");
|
|
133
|
+
document.createRange().selectNodeContents(s);
|
|
134
|
+
const l = n.cloneRange(), c = document.createRange();
|
|
135
|
+
c.selectNodeContents(s), c.setEnd(l.startContainer, l.startOffset);
|
|
136
|
+
const u = c.cloneContents(), g = document.createRange();
|
|
137
|
+
g.selectNodeContents(s), g.setStart(l.startContainer, l.startOffset);
|
|
138
|
+
const $ = g.cloneContents();
|
|
139
|
+
s.innerHTML = "", s.appendChild(u), s.innerHTML === "" && (s.innerHTML = "<br>"), i.innerHTML = "", i.appendChild($), i.innerHTML === "" && (i.innerHTML = "<br>"), s.after(i);
|
|
140
|
+
const H = document.createRange();
|
|
141
|
+
H.setStart(i, 0), H.collapse(!0), t.removeAllRanges(), t.addRange(H), a?.normalize();
|
|
142
|
+
}, _t = () => {
|
|
143
|
+
const e = window.getSelection();
|
|
144
|
+
if (!e || e.rangeCount === 0) return;
|
|
145
|
+
const a = e.getRangeAt(0), t = document.createElement("br");
|
|
146
|
+
a.insertNode(t), a.setStartAfter(t), a.collapse(!0), e.removeAllRanges(), e.addRange(a);
|
|
147
|
+
}, Xe = (e) => {
|
|
148
|
+
const a = window.getSelection();
|
|
149
|
+
if (!a || a.rangeCount === 0) return;
|
|
150
|
+
const t = a.getRangeAt(0), n = lt(t.startContainer);
|
|
151
|
+
if (!n || !(n.textContent === "" || n.innerHTML === "<br>")) return;
|
|
152
|
+
const r = n.previousElementSibling, i = n.nextElementSibling;
|
|
153
|
+
if (e.preventDefault(), !r && !i) {
|
|
154
|
+
n.innerHTML = "<br>", We(n);
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
r && r.dataset.block !== void 0 ? (n.remove(), Rt(r)) : i && i.dataset.block !== void 0 && (n.remove(), We(i));
|
|
158
|
+
}, Rt = (e) => {
|
|
159
|
+
const a = document.createRange(), t = window.getSelection();
|
|
160
|
+
a.selectNodeContents(e), a.collapse(!1), t?.removeAllRanges(), t?.addRange(a);
|
|
161
|
+
}, Bt = (e, a) => {
|
|
162
|
+
const t = b(null), n = a?.buttons ?? [];
|
|
163
|
+
let s = b(null);
|
|
164
|
+
const r = () => {
|
|
165
|
+
const f = e;
|
|
166
|
+
if (!f) return;
|
|
167
|
+
const k = window.getSelection();
|
|
168
|
+
if (!k || k.rangeCount === 0) return;
|
|
169
|
+
const V = k.getRangeAt(0);
|
|
170
|
+
f.contains(V.commonAncestorContainer) && (t.value = V.cloneRange());
|
|
171
|
+
}, i = (f) => {
|
|
172
|
+
const k = window.getSelection();
|
|
173
|
+
if (!k || k.rangeCount === 0 || k.isCollapsed) return !1;
|
|
174
|
+
const V = k.getRangeAt(0), q = e;
|
|
175
|
+
if (!q) return !1;
|
|
176
|
+
const A = o(V, q), z = [];
|
|
177
|
+
if (A.forEach((p) => {
|
|
178
|
+
const h = p === V.startContainer ? V.startOffset : 0, E = p === V.endContainer ? V.endOffset : p.textContent.length;
|
|
179
|
+
if (h === E) return;
|
|
180
|
+
let X;
|
|
181
|
+
h === 0 && E === p.textContent.length ? X = p : (X = p.splitText(h), E - h < X.textContent.length && X.splitText(E - h));
|
|
182
|
+
const x = $t(X, f, q);
|
|
183
|
+
if (x)
|
|
184
|
+
It(x), z.push(X);
|
|
185
|
+
else {
|
|
186
|
+
const S = document.createElement(f);
|
|
187
|
+
X.replaceWith(S), S.appendChild(X), z.push(X);
|
|
188
|
+
}
|
|
189
|
+
}), z.length > 0) {
|
|
190
|
+
const p = document.createRange();
|
|
191
|
+
p.setStart(z[0], 0);
|
|
192
|
+
const h = z[z.length - 1];
|
|
193
|
+
p.setEnd(h, h.textContent.length), k.removeAllRanges(), k.addRange(p), r();
|
|
194
|
+
}
|
|
195
|
+
return H(), d(f);
|
|
196
|
+
}, o = (f, k) => {
|
|
197
|
+
if (!f || !k || !(k instanceof HTMLElement)) return [];
|
|
198
|
+
const V = f.commonAncestorContainer, q = k.contains(V) ? k : V.nodeType === 3 ? V.parentNode : V, A = document.createTreeWalker(
|
|
199
|
+
q,
|
|
200
|
+
NodeFilter.SHOW_TEXT,
|
|
201
|
+
{
|
|
202
|
+
acceptNode(h) {
|
|
203
|
+
return k.contains(h) && f.intersectsNode(h) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_REJECT;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
), z = [];
|
|
207
|
+
let p;
|
|
208
|
+
for (; p = A.nextNode(); ) z.push(p);
|
|
209
|
+
return z;
|
|
210
|
+
}, l = (f) => {
|
|
211
|
+
const k = window.getSelection();
|
|
212
|
+
if (!k || k.rangeCount === 0) return !1;
|
|
213
|
+
const V = k.getRangeAt(0), q = c(V.startContainer);
|
|
214
|
+
if (!q) return !1;
|
|
215
|
+
const z = q.tagName.toLowerCase() === f.toLowerCase() ? "p" : f.toLowerCase(), p = document.createElement(z);
|
|
216
|
+
for (z === "blockquote" && p.setAttribute("class", "rs-blockquote"), p.dataset.block = "true"; q.firstChild; ) p.appendChild(q.firstChild);
|
|
217
|
+
q.replaceWith(p);
|
|
218
|
+
const h = document.createRange();
|
|
219
|
+
return h.selectNodeContents(p), k.removeAllRanges(), k.addRange(h), r(), H(), C(f);
|
|
220
|
+
}, c = (f) => {
|
|
221
|
+
const k = e;
|
|
222
|
+
if (!k) return null;
|
|
223
|
+
for (; f && f !== k; ) {
|
|
224
|
+
if (f instanceof HTMLElement && f.dataset.block !== void 0) return f;
|
|
225
|
+
f = f.parentNode;
|
|
226
|
+
}
|
|
227
|
+
return null;
|
|
228
|
+
}, u = (f, k) => {
|
|
229
|
+
const V = e;
|
|
230
|
+
if (!V) return null;
|
|
231
|
+
for (; f && f !== V; ) {
|
|
232
|
+
if (f instanceof HTMLElement && f.tagName.toLowerCase() === k.toLowerCase()) return f;
|
|
233
|
+
f = f.parentNode;
|
|
234
|
+
}
|
|
235
|
+
return null;
|
|
236
|
+
}, g = (f) => {
|
|
237
|
+
if (f.key !== "Enter" || f.shiftKey) return;
|
|
238
|
+
const k = window.getSelection();
|
|
239
|
+
if (!k || k.rangeCount === 0) return;
|
|
240
|
+
const V = k.getRangeAt(0), q = u(V.startContainer, "li");
|
|
241
|
+
if (!q) return;
|
|
242
|
+
f.preventDefault(), f.stopPropagation();
|
|
243
|
+
const A = q.parentElement;
|
|
244
|
+
if (!A) return;
|
|
245
|
+
if (q.textContent?.trim() === "") {
|
|
246
|
+
const h = document.createElement("p");
|
|
247
|
+
h.dataset.block = "true", h.innerHTML = "<br>", A.after(h), q.remove(), A.children.length === 0 && A.remove(), $(h);
|
|
248
|
+
return;
|
|
249
|
+
}
|
|
250
|
+
const p = document.createElement("li");
|
|
251
|
+
p.innerHTML = "<br>", q.after(p), $(p);
|
|
252
|
+
}, $ = (f) => {
|
|
253
|
+
const k = document.createRange(), V = window.getSelection();
|
|
254
|
+
k.selectNodeContents(f), k.collapse(!0), V?.removeAllRanges(), V?.addRange(k);
|
|
255
|
+
}, H = () => {
|
|
256
|
+
e instanceof Node && e.normalize();
|
|
257
|
+
}, d = (f) => {
|
|
258
|
+
const k = t.value;
|
|
259
|
+
if (!k) return !1;
|
|
260
|
+
let V = k.startContainer;
|
|
261
|
+
V.nodeType === Node.TEXT_NODE && (V = V.parentNode);
|
|
262
|
+
const q = e;
|
|
263
|
+
if (!q) return !1;
|
|
264
|
+
for (; V && V !== q; ) {
|
|
265
|
+
if (V instanceof HTMLElement && V.tagName.toLowerCase() === f.toLowerCase()) return !0;
|
|
266
|
+
V = V.parentNode;
|
|
267
|
+
}
|
|
268
|
+
return !1;
|
|
269
|
+
}, C = (f) => {
|
|
270
|
+
const k = t.value;
|
|
271
|
+
if (!k) return !1;
|
|
272
|
+
let V = k.startContainer;
|
|
273
|
+
V.nodeType === Node.TEXT_NODE && (V = V.parentNode);
|
|
274
|
+
const q = e;
|
|
275
|
+
if (!q) return !1;
|
|
276
|
+
for (; V && V !== q; ) {
|
|
277
|
+
if (V instanceof HTMLElement && V.dataset.block !== void 0 && V.tagName.toLowerCase() === f.toLowerCase()) return !0;
|
|
278
|
+
V = V.parentNode;
|
|
279
|
+
}
|
|
280
|
+
return !1;
|
|
281
|
+
}, I = () => {
|
|
282
|
+
const f = e;
|
|
283
|
+
f && f.focus();
|
|
284
|
+
}, R = () => {
|
|
285
|
+
const f = e;
|
|
286
|
+
if (!f || !t.value || !f || !f.contains(t.value.commonAncestorContainer)) return;
|
|
287
|
+
const k = window.getSelection();
|
|
288
|
+
k && (k.removeAllRanges(), k.addRange(t.value));
|
|
289
|
+
}, y = () => s.value?.focusFirstButton?.(), D = (f) => {
|
|
290
|
+
const k = window.getSelection();
|
|
291
|
+
if (!k || k.rangeCount === 0) return;
|
|
292
|
+
const V = k.getRangeAt(0), q = c(V.startContainer);
|
|
293
|
+
if (!q) return;
|
|
294
|
+
const A = V.cloneRange();
|
|
295
|
+
A.selectNodeContents(q), A.setEnd(V.startContainer, V.startOffset);
|
|
296
|
+
const z = A.toString().length, p = V.cloneRange();
|
|
297
|
+
p.selectNodeContents(q), p.setEnd(V.endContainer, V.endOffset);
|
|
298
|
+
const h = p.toString().length, E = V.collapsed, X = f(q);
|
|
299
|
+
q.replaceWith(X);
|
|
300
|
+
const x = document.createTreeWalker(
|
|
301
|
+
X,
|
|
302
|
+
NodeFilter.SHOW_TEXT,
|
|
303
|
+
null
|
|
304
|
+
);
|
|
305
|
+
let S = 0, Q = null, fe = 0, M = null, O = 0;
|
|
306
|
+
for (; x.nextNode(); ) {
|
|
307
|
+
const N = x.currentNode, ne = N.textContent?.length ?? 0;
|
|
308
|
+
!Q && S + ne >= z && (Q = N, fe = z - S), !M && S + ne >= h && (M = N, O = h - S), S += ne;
|
|
309
|
+
}
|
|
310
|
+
const B = document.createRange();
|
|
311
|
+
Q ? B.setStart(Q, fe) : B.setStart(X, 0), !E && M ? B.setEnd(M, O) : B.collapse(!0), k.removeAllRanges(), k.addRange(B), r(), H();
|
|
312
|
+
}, Z = (f) => {
|
|
313
|
+
const k = e.parentElement?.querySelector("#editor-status");
|
|
314
|
+
k && (k.textContent = f, setTimeout(() => k.textContent = "", 2e3));
|
|
315
|
+
};
|
|
316
|
+
return e.addEventListener("keydown", g, { capture: !0 }), {
|
|
317
|
+
toggleInline: i,
|
|
318
|
+
toggleBlock: l,
|
|
319
|
+
normalize: H,
|
|
320
|
+
rootElement: e,
|
|
321
|
+
saveSelection: r,
|
|
322
|
+
restoreSelection: R,
|
|
323
|
+
isInlineActive: d,
|
|
324
|
+
isBlockActive: C,
|
|
325
|
+
focus: I,
|
|
326
|
+
toolbarRef: s,
|
|
327
|
+
focusFirstToolbarButton: y,
|
|
328
|
+
replaceCurrentBlock: D,
|
|
329
|
+
buttons: n,
|
|
330
|
+
announce: Z
|
|
331
|
+
};
|
|
332
|
+
}, Tt = ["id", "aria-label"], At = {
|
|
333
|
+
id: "editor-status",
|
|
334
|
+
class: "sr-only",
|
|
335
|
+
"aria-live": "polite",
|
|
336
|
+
"aria-atomic": "true"
|
|
337
|
+
}, St = /* @__PURE__ */ T({
|
|
338
|
+
__name: "EditorContent",
|
|
339
|
+
props: {
|
|
340
|
+
editor: {},
|
|
341
|
+
editorId: {},
|
|
342
|
+
ariaLabel: {}
|
|
343
|
+
},
|
|
344
|
+
setup(e, { expose: a }) {
|
|
345
|
+
const t = e, n = b(""), s = b(null), r = (o) => {
|
|
346
|
+
if (o.ctrlKey || o.metaKey)
|
|
347
|
+
switch (o.altKey && o.key === "F10" && (o.preventDefault(), t.editor?.restoreSelection(), t.editor?.focusFirstToolbarButton()), o.key.toLowerCase()) {
|
|
348
|
+
case "b":
|
|
349
|
+
o.preventDefault(), t.editor?.restoreSelection(), t.editor?.toggleInline("strong"), t.editor?.focus(), t.editor?.announce(t.editor.isInlineActive("strong") ? "Bold enabled" : "Bold disabled");
|
|
350
|
+
break;
|
|
351
|
+
case "i":
|
|
352
|
+
o.preventDefault(), t.editor?.restoreSelection(), t.editor?.toggleInline("em"), t.editor?.focus(), t.editor?.announce(t.editor.isInlineActive("em") ? "Italic enabled" : "Italic disabled");
|
|
353
|
+
break;
|
|
354
|
+
case "1":
|
|
355
|
+
o.altKey && (o.preventDefault(), t.editor?.restoreSelection(), t.editor?.toggleBlock("h1"), t.editor?.focus(), t.editor?.announce(t.editor.isBlockActive("h1") ? "Heading level 1 enabled" : "Heading level 1 disabled"));
|
|
356
|
+
break;
|
|
357
|
+
}
|
|
358
|
+
}, i = () => {
|
|
359
|
+
const o = window.getSelection();
|
|
360
|
+
if (!o || o.rangeCount === 0) return;
|
|
361
|
+
const l = s.value;
|
|
362
|
+
if (!l) return;
|
|
363
|
+
const c = o.getRangeAt(0);
|
|
364
|
+
l.contains(c.commonAncestorContainer) && t.editor?.saveSelection();
|
|
365
|
+
};
|
|
366
|
+
return te(() => document.addEventListener("selectionchange", i)), he(() => document.removeEventListener("selectionchange", i)), a({
|
|
367
|
+
getRoot: () => s
|
|
368
|
+
}), (o, l) => (v(), m(ae, null, [
|
|
369
|
+
w("div", {
|
|
370
|
+
ref_key: "rootRef",
|
|
371
|
+
ref: s,
|
|
372
|
+
class: "editor",
|
|
373
|
+
contenteditable: "",
|
|
374
|
+
id: e.editorId,
|
|
375
|
+
role: "textbox",
|
|
376
|
+
"aria-multiline": "true",
|
|
377
|
+
"aria-label": e.ariaLabel || "Text editor",
|
|
378
|
+
"aria-describedby": "editor-help editor-status",
|
|
379
|
+
onKeydown: [
|
|
380
|
+
r,
|
|
381
|
+
l[0] || (l[0] = ve((c) => _(Ht)(c, e.editor), ["enter"])),
|
|
382
|
+
l[1] || (l[1] = ve(
|
|
383
|
+
//@ts-ignore
|
|
384
|
+
(...c) => _(Xe) && _(Xe)(...c),
|
|
385
|
+
["backspace"]
|
|
386
|
+
))
|
|
387
|
+
],
|
|
388
|
+
onMouseup: l[2] || (l[2] = //@ts-ignore
|
|
389
|
+
(...c) => e.editor?.saveSelection && e.editor?.saveSelection(...c)),
|
|
390
|
+
onKeyup: l[3] || (l[3] = //@ts-ignore
|
|
391
|
+
(...c) => e.editor?.saveSelection && e.editor?.saveSelection(...c))
|
|
392
|
+
}, [...l[4] || (l[4] = [
|
|
393
|
+
w("p", { "data-block": "" }, "Write here...", -1)
|
|
394
|
+
])], 40, Tt),
|
|
395
|
+
w("div", At, U(n.value), 1),
|
|
396
|
+
l[5] || (l[5] = w("p", {
|
|
397
|
+
id: "editor-help",
|
|
398
|
+
class: "sr-only"
|
|
399
|
+
}, " Use Ctrl+B for bold, Ctrl+I for italic, Alt+Ctrl+1 for heading level 1. ", -1))
|
|
400
|
+
], 64));
|
|
401
|
+
}
|
|
402
|
+
}), Zt = /* @__PURE__ */ W(St, [["__scopeId", "data-v-445744be"]]), Et = {
|
|
403
|
+
viewBox: "0 0 24 24",
|
|
404
|
+
paths: [
|
|
405
|
+
{
|
|
406
|
+
type: "path",
|
|
407
|
+
d: "M12 2V4M21 5L19.5 6.5M2.99997 5L4.49997 6.5M12 22C15.6042 22 18.8134 19.6545 20.8772 17.6789C22.3743 16.2458 22.3743 13.7542 20.8772 12.3211C18.8134 10.3455 15.6042 8 12 8C8.3958 8 5.18661 10.3455 3.12281 12.3211C1.62573 13.7542 1.62573 16.2458 3.12281 17.6789C5.18661 19.6545 8.3958 22 12 22ZM15 15C15 16.6569 13.6568 18 12 18C10.3431 18 8.99997 16.6569 8.99997 15C8.99997 13.3431 10.3431 12 12 12C13.6568 12 15 13.3431 15 15Z",
|
|
408
|
+
fill: "none",
|
|
409
|
+
stroke: "currentColor",
|
|
410
|
+
strokeWidth: 1.5,
|
|
411
|
+
strokeLinecap: "round"
|
|
412
|
+
}
|
|
413
|
+
]
|
|
414
|
+
}, Dt = {
|
|
415
|
+
viewBox: "0 0 24 24",
|
|
416
|
+
paths: [
|
|
417
|
+
{
|
|
418
|
+
type: "path",
|
|
419
|
+
d: "M10.0328 3.27141C10.8375 1.5762 13.1625 1.57619 13.9672 3.27141L15.3579 6.20118C15.6774 6.87435 16.2951 7.34094 17.0096 7.44888L20.1193 7.91869C21.9187 8.19053 22.6371 10.4895 21.3351 11.8091L19.0849 14.0896C18.5679 14.6136 18.332 15.3685 18.454 16.1084L18.9852 19.3285C19.2926 21.1918 17.4116 22.6126 15.8022 21.7329L13.0208 20.2126C12.3817 19.8633 11.6183 19.8633 10.9792 20.2126L8.19776 21.7329C6.58839 22.6126 4.70742 21.1918 5.01479 19.3286L5.54599 16.1084C5.66804 15.3685 5.43211 14.6136 4.91508 14.0896L2.66488 11.8091C1.36287 10.4895 2.08133 8.19053 3.88066 7.91869L6.99037 7.44888C7.70489 7.34094 8.32257 6.87435 8.64211 6.20118L10.0328 3.27141Z",
|
|
420
|
+
fill: "none",
|
|
421
|
+
stroke: "currentColor",
|
|
422
|
+
strokeWidth: 1.5,
|
|
423
|
+
strokeLinecap: "round"
|
|
424
|
+
}
|
|
425
|
+
]
|
|
426
|
+
}, Ot = {
|
|
427
|
+
viewBox: "0 0 24 24",
|
|
428
|
+
paths: [
|
|
429
|
+
{
|
|
430
|
+
type: "path",
|
|
431
|
+
d: "M22 12V18C22 20.2091 20.2091 22 18 22H6C3.79086 22 2 20.2091 2 18V6C2 3.79086 3.79086 2 6 2H12M15.6864 4.02275C15.6864 4.02275 15.6864 5.45305 17.1167 6.88334C18.547 8.31364 19.9773 8.31364 19.9773 8.31364M9.15467 15.9896L12.1583 15.5605C12.5916 15.4986 12.9931 15.2978 13.3025 14.9884L21.4076 6.88334C22.1975 6.09341 22.1975 4.81268 21.4076 4.02275L19.9773 2.59245C19.1873 1.80252 17.9066 1.80252 17.1167 2.59245L9.01164 10.6975C8.70217 11.0069 8.50142 11.4084 8.43952 11.8417L8.01044 14.8453C7.91508 15.5128 8.4872 16.0849 9.15467 15.9896Z",
|
|
432
|
+
fill: "none",
|
|
433
|
+
stroke: "currentColor",
|
|
434
|
+
strokeWidth: 1.5,
|
|
435
|
+
strokeLinecap: "round"
|
|
436
|
+
}
|
|
437
|
+
]
|
|
438
|
+
}, Nt = {
|
|
439
|
+
viewBox: "0 0 24 24",
|
|
440
|
+
paths: [
|
|
441
|
+
{
|
|
442
|
+
type: "path",
|
|
443
|
+
d: "M10 18H14M16.1804 22H7.81965C5.5109 22 3.6393 20.214 3.6393 18.0108V13.133C3.6393 12.4248 3.34447 11.7456 2.81969 11.2448C1.60381 10.0845 1.76187 8.16205 3.15251 7.19692L9.54124 2.763C11.0071 1.74567 12.9929 1.74567 14.4588 2.763L20.8475 7.19691C22.2381 8.16205 22.3962 10.0845 21.1803 11.2448C20.6555 11.7456 20.3607 12.4248 20.3607 13.133V18.0108C20.3607 20.214 18.4891 22 16.1804 22Z",
|
|
444
|
+
fill: "none",
|
|
445
|
+
stroke: "currentColor",
|
|
446
|
+
strokeWidth: 1.5,
|
|
447
|
+
strokeLinecap: "round",
|
|
448
|
+
strokeLinejoin: "round"
|
|
449
|
+
}
|
|
450
|
+
]
|
|
451
|
+
}, qt = {
|
|
452
|
+
viewBox: "0 0 24 24",
|
|
453
|
+
paths: [
|
|
454
|
+
{
|
|
455
|
+
type: "circle",
|
|
456
|
+
cx: 12,
|
|
457
|
+
cy: 7,
|
|
458
|
+
r: 1,
|
|
459
|
+
fill: "currentColor"
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
type: "path",
|
|
463
|
+
d: "M11 9.24997C10.5858 9.24997 10.25 9.58576 10.25 9.99997C10.25 10.4142 10.5858 10.75 11 10.75V9.24997ZM12 9.99997H12.75C12.75 9.58576 12.4142 9.24997 12 9.24997V9.99997ZM11.25 17C11.25 17.4142 11.5858 17.75 12 17.75C12.4142 17.75 12.75 17.4142 12.75 17H11.25ZM5.07846 5.43932L5.46063 6.08465L5.07846 5.43932ZM5.07846 18.5607L5.46063 17.9153H5.46063L5.07846 18.5607ZM14.0785 21.4288L13.6963 20.7834V20.7834L14.0785 21.4288ZM9.92154 21.4288L9.53937 22.0741V22.0741L9.92154 21.4288ZM18.9215 18.5607L19.3037 19.206V19.206L18.9215 18.5607ZM18.9215 5.43932L18.5394 6.08465L18.9215 5.43932ZM14.0785 2.57125L13.6963 3.21658L14.0785 2.57125ZM9.92154 2.57125L9.53937 1.92592L9.92154 2.57125ZM11 10.75H12V9.24997H11V10.75ZM11.25 9.99997V17H12.75V9.99997H11.25ZM13.6963 3.21658L18.5394 6.08465L19.3037 4.79399L14.4606 1.92592L13.6963 3.21658ZM20.25 9.13192V14.8681H21.75V9.13192H20.25ZM18.5394 17.9153L13.6963 20.7834L14.4606 22.0741L19.3037 19.206L18.5394 17.9153ZM10.3037 20.7834L5.46063 17.9153L4.6963 19.206L9.53937 22.0741L10.3037 20.7834ZM3.75 14.8681V9.13192H2.25V14.8681H3.75ZM5.46063 6.08465L10.3037 3.21658L9.53937 1.92592L4.6963 4.79399L5.46063 6.08465ZM3.75 9.13192C3.75 7.86735 4.40779 6.70814 5.46063 6.08465L4.6963 4.79399C3.17682 5.69383 2.25 7.34985 2.25 9.13192H3.75ZM5.46063 17.9153C4.40779 17.2919 3.75 16.1327 3.75 14.8681H2.25C2.25 16.6502 3.17682 18.3062 4.6963 19.206L5.46063 17.9153ZM13.6963 20.7834C12.6458 21.4055 11.3542 21.4055 10.3037 20.7834L9.53937 22.0741C11.0612 22.9753 12.9388 22.9753 14.4606 22.0741L13.6963 20.7834ZM20.25 14.8681C20.25 16.1327 19.5922 17.2919 18.5394 17.9153L19.3037 19.206C20.8232 18.3062 21.75 16.6502 21.75 14.8681H20.25ZM18.5394 6.08465C19.5922 6.70814 20.25 7.86735 20.25 9.13192H21.75C21.75 7.34985 20.8232 5.69383 19.3037 4.79399L18.5394 6.08465ZM14.4606 1.92592C12.9388 1.02469 11.0612 1.02469 9.53937 1.92592L10.3037 3.21658C11.3542 2.59447 12.6458 2.59447 13.6963 3.21658L14.4606 1.92592Z",
|
|
464
|
+
fill: "currentColor"
|
|
465
|
+
}
|
|
466
|
+
]
|
|
467
|
+
}, zt = {
|
|
468
|
+
viewBox: "0 0 24 24",
|
|
469
|
+
paths: [
|
|
470
|
+
{
|
|
471
|
+
type: "path",
|
|
472
|
+
d: "M7.835,16.17c-.23-.23-.446-.482-.641-.748-.325-.446-.227-1.072,.22-1.397,.446-.325,1.071-.227,1.397,.219,.129,.178,.274,.349,.437,.511,.803,.803,1.87,1.245,3.005,1.245s2.203-.442,3.005-1.245l5.5-5.5c1.657-1.657,1.657-4.354,0-6.011s-4.354-1.657-6.011,0l-1.058,1.058c-.391,.391-1.023,.391-1.414,0s-.391-1.023,0-1.414l1.058-1.058c2.437-2.438,6.402-2.438,8.839,0,2.437,2.437,2.437,6.402,0,8.839l-5.5,5.5c-1.18,1.181-2.75,1.831-4.419,1.831s-3.239-.65-4.418-1.83Zm-1.582,7.83c1.67,0,3.239-.65,4.419-1.831l1.058-1.058c.391-.39,.391-1.023,0-1.414-.39-.391-1.023-.39-1.414,0l-1.059,1.058c-.803,.803-1.87,1.245-3.005,1.245s-2.202-.442-3.005-1.245-1.245-1.87-1.245-3.005,.442-2.203,1.245-3.005l5.5-5.5c.803-.803,1.87-1.245,3.005-1.245s2.203,.442,3.005,1.245c.16,.161,.306,.332,.436,.51,.324,.447,.949,.547,1.397,.221,.447-.325,.546-.95,.221-1.397-.19-.262-.405-.513-.639-.747-1.181-1.182-2.751-1.832-4.42-1.832s-3.239,.65-4.419,1.831L1.834,13.331C.653,14.511,.003,16.081,.003,17.75c0,1.669,.65,3.239,1.831,4.419,1.18,1.181,2.749,1.831,4.419,1.831Z",
|
|
473
|
+
fill: "currentColor"
|
|
474
|
+
}
|
|
475
|
+
]
|
|
476
|
+
}, Ft = {
|
|
477
|
+
viewBox: "0 0 24 24",
|
|
478
|
+
paths: [
|
|
479
|
+
{
|
|
480
|
+
type: "path",
|
|
481
|
+
d: "m24,22.5c0,.828-.672,1.5-1.5,1.5h-4c-.828,0-1.5-.672-1.5-1.5s.672-1.5,1.5-1.5h.5v-8H5v8h.5c.828,0,1.5.672,1.5,1.5s-.672,1.5-1.5,1.5H1.5c-.828,0-1.5-.672-1.5-1.5s.672-1.5,1.5-1.5h.5V3h-.5c-.828,0-1.5-.672-1.5-1.5S.672,0,1.5,0h4c.828,0,1.5.672,1.5,1.5s-.672,1.5-1.5,1.5h-.5v7h14V3h-.5c-.828,0-1.5-.672-1.5-1.5s.672-1.5,1.5-1.5h4c.828,0,1.5.672,1.5,1.5s-.672,1.5-1.5,1.5h-.5v18h.5c.828,0,1.5.672,1.5,1.5Z",
|
|
482
|
+
fill: "currentColor"
|
|
483
|
+
}
|
|
484
|
+
]
|
|
485
|
+
}, Kt = {
|
|
486
|
+
viewBox: "0 0 24 24",
|
|
487
|
+
paths: [
|
|
488
|
+
{
|
|
489
|
+
type: "path",
|
|
490
|
+
d: "M3.43944 5.87673C3.16425 6.18631 3.19214 6.66037 3.50173 6.93556C3.81131 7.21075 4.28537 7.18286 4.56056 6.87327L3.43944 5.87673ZM5.50518 4.68167L4.94462 4.1834L4.94462 4.1834L5.50518 4.68167ZM8.49482 4.68167L9.05538 4.1834V4.1834L8.49482 4.68167ZM8.49482 19.3183L9.05538 19.8166L8.49482 19.3183ZM10.5606 18.1233C10.8357 17.8137 10.8079 17.3396 10.4983 17.0644C10.1887 16.7893 9.71463 16.8171 9.43944 17.1267L10.5606 18.1233ZM5.50518 19.3183L4.94462 19.8166L5.50518 19.3183ZM4.56056 17.1267C4.28537 16.8171 3.81131 16.7893 3.50173 17.0644C3.19214 17.3396 3.16425 17.8137 3.43944 18.1233L4.56056 17.1267ZM4.56056 6.87327L6.06574 5.17994L4.94462 4.1834L3.43944 5.87673L4.56056 6.87327ZM7.93426 5.17994L9.43944 6.87327L10.5606 5.87673L9.05538 4.1834L7.93426 5.17994ZM9.05538 19.8166L10.5606 18.1233L9.43944 17.1267L7.93426 18.8201L9.05538 19.8166ZM6.06574 18.8201L4.56056 17.1267L3.43944 18.1233L4.94462 19.8166L6.06574 18.8201ZM7.93426 18.8201C7.43702 19.3794 6.56298 19.3794 6.06574 18.8201L4.94462 19.8166C6.03855 21.0473 7.96145 21.0473 9.05538 19.8166L7.93426 18.8201ZM6.06574 5.17994C6.56298 4.62055 7.43702 4.62055 7.93426 5.17994L9.05538 4.1834C7.96145 2.95273 6.03855 2.95273 4.94462 4.1834L6.06574 5.17994ZM17 9.25C15.7574 9.25 14.75 8.24264 14.75 7H13.25C13.25 9.07107 14.9289 10.75 17 10.75V9.25ZM19.25 7C19.25 8.24264 18.2426 9.25 17 9.25V10.75C19.0711 10.75 20.75 9.07107 20.75 7H19.25ZM17 4.75C18.2426 4.75 19.25 5.75736 19.25 7H20.75C20.75 4.92893 19.0711 3.25 17 3.25V4.75ZM17 3.25C14.9289 3.25 13.25 4.92893 13.25 7H14.75C14.75 5.75736 15.7574 4.75 17 4.75V3.25ZM17 19.25C15.7574 19.25 14.75 18.2426 14.75 17H13.25C13.25 19.0711 14.9289 20.75 17 20.75V19.25ZM19.25 17C19.25 18.2426 18.2426 19.25 17 19.25V20.75C19.0711 20.75 20.75 19.0711 20.75 17H19.25ZM17 14.75C18.2426 14.75 19.25 15.7574 19.25 17H20.75C20.75 14.9289 19.0711 13.25 17 13.25V14.75ZM17 13.25C14.9289 13.25 13.25 14.9289 13.25 17H14.75C14.75 15.7574 15.7574 14.75 17 14.75V13.25ZM6.25 4V20H7.75V4H6.25Z",
|
|
491
|
+
fill: "currentColor"
|
|
492
|
+
}
|
|
493
|
+
]
|
|
494
|
+
}, Pt = {
|
|
495
|
+
viewBox: "0 0 24 24",
|
|
496
|
+
paths: [
|
|
497
|
+
{
|
|
498
|
+
type: "path",
|
|
499
|
+
d: "M17.616 3.17157L18.1463 2.64124V2.64124L17.616 3.17157ZM20.8284 6.38398L20.2981 6.91431V6.91431L20.8284 6.38398ZM6.25 22V22.75H7.75V22H6.25ZM16.25 22V22.75H17.75V22H16.25ZM15 7.75C15.4142 7.75 15.75 7.41421 15.75 7C15.75 6.58579 15.4142 6.25 15 6.25V7.75ZM9 6.25C8.58579 6.25 8.25 6.58579 8.25 7C8.25 7.41421 8.58579 7.75 9 7.75V6.25ZM21.25 9.21241V18H22.75V9.21241H21.25ZM18 21.25H6V22.75H18V21.25ZM2.75 18V6H1.25V18H2.75ZM6 2.75H14.7876V1.25H6V2.75ZM17.0857 3.7019L20.2981 6.91431L21.3588 5.85365L18.1463 2.64124L17.0857 3.7019ZM14.7876 2.75C15.6495 2.75 16.4762 3.09241 17.0857 3.7019L18.1463 2.64124C17.2556 1.75045 16.0474 1.25 14.7876 1.25V2.75ZM6 21.25C4.20507 21.25 2.75 19.7949 2.75 18H1.25C1.25 20.6234 3.37665 22.75 6 22.75V21.25ZM21.25 18C21.25 19.7949 19.7949 21.25 18 21.25V22.75C20.6234 22.75 22.75 20.6234 22.75 18H21.25ZM22.75 9.21241C22.75 7.95263 22.2496 6.74445 21.3588 5.85365L20.2981 6.91431C20.9076 7.52381 21.25 8.35046 21.25 9.21241H22.75ZM2.75 6C2.75 4.20507 4.20508 2.75 6 2.75V1.25C3.37665 1.25 1.25 3.37665 1.25 6H2.75ZM7.75 22V16H6.25V22H7.75ZM9 14.75H15V13.25H9V14.75ZM16.25 16V22H17.75V16H16.25ZM15 14.75C15.6904 14.75 16.25 15.3096 16.25 16H17.75C17.75 14.4812 16.5188 13.25 15 13.25V14.75ZM7.75 16C7.75 15.3096 8.30964 14.75 9 14.75V13.25C7.48122 13.25 6.25 14.4812 6.25 16H7.75ZM15 6.25L9 6.25V7.75L15 7.75V6.25Z",
|
|
500
|
+
fill: "currentColor"
|
|
501
|
+
}
|
|
502
|
+
]
|
|
503
|
+
}, Ut = {
|
|
504
|
+
viewBox: "0 0 24 24",
|
|
505
|
+
paths: [
|
|
506
|
+
{
|
|
507
|
+
type: "path",
|
|
508
|
+
d: "M22 12C22 15.0134 20.6672 17.7154 18.5588 19.5488C16.8031 21.0756 14.5095 22 12 22C9.49052 22 7.19694 21.0756 5.44117 19.5488C3.33285 17.7154 2 15.0134 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z",
|
|
509
|
+
fill: "currentColor",
|
|
510
|
+
opacity: 0.4
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
type: "path",
|
|
514
|
+
d: "M18.5588 19.5488C17.5654 16.8918 15.0036 15 12 15C8.99637 15 6.43459 16.8918 5.44116 19.5488C7.19693 21.0756 9.49052 22 12 22C14.5095 22 16.8031 21.0756 18.5588 19.5488Z",
|
|
515
|
+
fill: "currentColor"
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
type: "circle",
|
|
519
|
+
cx: 12,
|
|
520
|
+
cy: 10,
|
|
521
|
+
r: 3,
|
|
522
|
+
fill: "currentColor"
|
|
523
|
+
}
|
|
524
|
+
]
|
|
525
|
+
}, jt = {
|
|
526
|
+
viewBox: "0 0 24 24",
|
|
527
|
+
paths: [
|
|
528
|
+
{
|
|
529
|
+
type: "path",
|
|
530
|
+
d: "M5 13L8.52642 15.8211C9.35374 16.483 10.5536 16.3848 11.2624 15.5973L19 7",
|
|
531
|
+
fill: "none",
|
|
532
|
+
stroke: "currentColor",
|
|
533
|
+
strokeWidth: 1.5,
|
|
534
|
+
strokeLinecap: "round",
|
|
535
|
+
strokeLinejoin: "round"
|
|
536
|
+
}
|
|
537
|
+
]
|
|
538
|
+
}, Wt = {
|
|
539
|
+
viewBox: "0 0 24 24",
|
|
540
|
+
paths: [
|
|
541
|
+
{
|
|
542
|
+
type: "path",
|
|
543
|
+
d: "M17.954,10.663A6.986,6.986,0,0,0,12,0H5A2,2,0,0,0,3,2V22a2,2,0,0,0,2,2H15a6.994,6.994,0,0,0,2.954-13.337ZM7,4h5a3,3,0,0,1,0,6H7Zm8,16H7V14h8a3,3,0,0,1,0,6Z",
|
|
544
|
+
fill: "currentColor"
|
|
545
|
+
}
|
|
546
|
+
]
|
|
547
|
+
}, Xt = {
|
|
548
|
+
viewBox: "0 0 24 24",
|
|
549
|
+
paths: [
|
|
550
|
+
{
|
|
551
|
+
type: "path",
|
|
552
|
+
d: "M6 6H22C22.2652 6 22.5196 5.89464 22.7071 5.70711C22.8946 5.51957 23 5.26522 23 5C23 4.73478 22.8946 4.48043 22.7071 4.29289C22.5196 4.10536 22.2652 4 22 4H6C5.73478 4 5.48043 4.10536 5.29289 4.29289C5.10536 4.48043 5 4.73478 5 5C5 5.26522 5.10536 5.51957 5.29289 5.70711C5.48043 5.89464 5.73478 6 6 6Z",
|
|
553
|
+
fill: "currentColor"
|
|
554
|
+
},
|
|
555
|
+
{
|
|
556
|
+
type: "path",
|
|
557
|
+
d: "M22 10.5H6C5.73478 10.5 5.48043 10.6054 5.29289 10.7929C5.10536 10.9804 5 11.2348 5 11.5C5 11.7652 5.10536 12.0196 5.29289 12.2071C5.48043 12.3946 5.73478 12.5 6 12.5H22C22.2652 12.5 22.5196 12.3946 22.7071 12.2071C22.8946 12.0196 23 11.7652 23 11.5C23 11.2348 22.8946 10.9804 22.7071 10.7929C22.5196 10.6054 22.2652 10.5 22 10.5Z",
|
|
558
|
+
fill: "currentColor"
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
type: "path",
|
|
562
|
+
d: "M22 17H6C5.73478 17 5.48043 17.1054 5.29289 17.2929C5.10536 17.4804 5 17.7348 5 18C5 18.2652 5.10536 18.5196 5.29289 18.7071C5.48043 18.8946 5.73478 19 6 19H22C22.2652 19 22.5196 18.8946 22.7071 18.7071C22.8946 18.5196 23 18.2652 23 18C23 17.7348 22.8946 17.4804 22.7071 17.2929C22.5196 17.1054 22.2652 17 22 17Z",
|
|
563
|
+
fill: "currentColor"
|
|
564
|
+
},
|
|
565
|
+
{
|
|
566
|
+
type: "path",
|
|
567
|
+
d: "M1.94744 3V7.36364H1.02486V3.87571H0.99929L0 4.50213V3.68395L1.08026 3H1.94744Z",
|
|
568
|
+
fill: "currentColor"
|
|
569
|
+
},
|
|
570
|
+
{
|
|
571
|
+
type: "path",
|
|
572
|
+
d: "M0.0426136 13.9233V13.2585L1.59588 11.8203C1.72798 11.6925 1.83878 11.5774 1.92827 11.4751C2.01918 11.3729 2.08807 11.2727 2.13494 11.1747C2.18182 11.0753 2.20526 10.968 2.20526 10.853C2.20526 10.7251 2.17614 10.6151 2.1179 10.5227C2.05966 10.429 1.98011 10.3572 1.87926 10.3075C1.77841 10.2564 1.66406 10.2308 1.53622 10.2308C1.4027 10.2308 1.28622 10.2578 1.18679 10.3118C1.08736 10.3658 1.01065 10.4432 0.956676 10.544C0.902699 10.6449 0.87571 10.7649 0.87571 10.9041H0C0 10.6186 0.0646307 10.3707 0.193892 10.1605C0.323153 9.95028 0.504261 9.78764 0.737216 9.67259C0.97017 9.55753 1.23864 9.5 1.54261 9.5C1.85511 9.5 2.12713 9.5554 2.35866 9.66619C2.59162 9.77557 2.77273 9.92756 2.90199 10.1222C3.03125 10.3168 3.09588 10.5398 3.09588 10.7912C3.09588 10.956 3.06321 11.1186 2.99787 11.2791C2.93395 11.4396 2.8196 11.6179 2.65483 11.8139C2.49006 12.0085 2.25781 12.2422 1.9581 12.5149L1.32102 13.1392V13.169H3.15341V13.9233H0.0426136Z",
|
|
573
|
+
fill: "currentColor"
|
|
574
|
+
},
|
|
575
|
+
{
|
|
576
|
+
type: "path",
|
|
577
|
+
d: "M1.65554 20.483C1.33736 20.483 1.05398 20.4283 0.805398 20.3189C0.558239 20.2081 0.362926 20.0561 0.21946 19.8629C0.0774147 19.6683 0.00426136 19.4439 0 19.1896H0.928977C0.934659 19.2962 0.96946 19.3899 1.03338 19.4709C1.09872 19.5504 1.18537 19.6122 1.29332 19.6562C1.40128 19.7003 1.52273 19.7223 1.65767 19.7223C1.7983 19.7223 1.92259 19.6974 2.03054 19.6477C2.13849 19.598 2.22301 19.5291 2.28409 19.4411C2.34517 19.353 2.37571 19.2514 2.37571 19.1364C2.37571 19.0199 2.34304 18.9169 2.2777 18.8274C2.21378 18.7365 2.12145 18.6655 2.00071 18.6143C1.88139 18.5632 1.73935 18.5376 1.57457 18.5376H1.16761V17.8601H1.57457C1.71378 17.8601 1.83665 17.8359 1.94318 17.7876C2.05114 17.7393 2.13494 17.6726 2.1946 17.5874C2.25426 17.5007 2.28409 17.3999 2.28409 17.2848C2.28409 17.1754 2.25781 17.0795 2.20526 16.9972C2.15412 16.9134 2.08168 16.848 1.98793 16.8011C1.8956 16.7543 1.78764 16.7308 1.66406 16.7308C1.53906 16.7308 1.42472 16.7536 1.32102 16.799C1.21733 16.843 1.13423 16.9063 1.07173 16.9886C1.00923 17.071 0.975852 17.1676 0.971591 17.2784H0.0873579C0.0916193 17.027 0.163352 16.8054 0.302557 16.6136C0.441761 16.4219 0.629261 16.272 0.865057 16.1641C1.10227 16.0547 1.37003 16 1.66832 16C1.96946 16 2.23295 16.0547 2.45881 16.1641C2.68466 16.2734 2.86009 16.4212 2.98509 16.6072C3.11151 16.7919 3.17401 16.9993 3.17259 17.2294C3.17401 17.4737 3.09801 17.6776 2.9446 17.8409C2.79261 18.0043 2.59446 18.108 2.35014 18.152V18.1861C2.67116 18.2273 2.91548 18.3388 3.0831 18.5206C3.25213 18.701 3.33594 18.9268 3.33452 19.1982C3.33594 19.4467 3.2642 19.6676 3.11932 19.8608C2.97585 20.054 2.7777 20.206 2.52486 20.3168C2.27202 20.4276 1.98224 20.483 1.65554 20.483Z",
|
|
578
|
+
fill: "currentColor"
|
|
579
|
+
}
|
|
580
|
+
]
|
|
581
|
+
}, Gt = {
|
|
582
|
+
viewBox: "0 0 24 24",
|
|
583
|
+
paths: [
|
|
584
|
+
{
|
|
585
|
+
type: "path",
|
|
586
|
+
d: "M7,6H23a1,1,0,0,0,0-2H7A1,1,0,0,0,7,6Z",
|
|
587
|
+
fill: "currentColor"
|
|
588
|
+
},
|
|
589
|
+
{
|
|
590
|
+
type: "path",
|
|
591
|
+
d: "M23,11H7a1,1,0,0,0,0,2H23a1,1,0,0,0,0-2Z",
|
|
592
|
+
fill: "currentColor"
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
type: "path",
|
|
596
|
+
d: "M23,18H7a1,1,0,0,0,0,2H23a1,1,0,0,0,0-2Z",
|
|
597
|
+
fill: "currentColor"
|
|
598
|
+
},
|
|
599
|
+
{
|
|
600
|
+
type: "circle",
|
|
601
|
+
cx: 3,
|
|
602
|
+
cy: 5,
|
|
603
|
+
r: 2,
|
|
604
|
+
fill: "currentColor"
|
|
605
|
+
},
|
|
606
|
+
{
|
|
607
|
+
type: "circle",
|
|
608
|
+
cx: 3,
|
|
609
|
+
cy: 12,
|
|
610
|
+
r: 2,
|
|
611
|
+
fill: "currentColor"
|
|
612
|
+
},
|
|
613
|
+
{
|
|
614
|
+
type: "circle",
|
|
615
|
+
cx: 3,
|
|
616
|
+
cy: 19,
|
|
617
|
+
r: 2,
|
|
618
|
+
fill: "currentColor"
|
|
619
|
+
}
|
|
620
|
+
]
|
|
621
|
+
}, Jt = {
|
|
622
|
+
viewBox: "0 0 24 24",
|
|
623
|
+
paths: [
|
|
624
|
+
{
|
|
625
|
+
type: "path",
|
|
626
|
+
d: "M16.2427 7.75738L7.75739 16.2427M16.2427 16.2426L7.75739 7.75732",
|
|
627
|
+
fill: "none",
|
|
628
|
+
stroke: "currentColor",
|
|
629
|
+
strokeWidth: 1.5,
|
|
630
|
+
strokeLinecap: "round",
|
|
631
|
+
strokeLinejoin: "round"
|
|
632
|
+
}
|
|
633
|
+
]
|
|
634
|
+
}, Yt = {
|
|
635
|
+
viewBox: "0 0 24 24",
|
|
636
|
+
paths: [
|
|
637
|
+
{
|
|
638
|
+
type: "path",
|
|
639
|
+
d: "M12 12H11.25C11.25 12.3228 11.4566 12.6094 11.7628 12.7115L12 12ZM12.75 7C12.75 6.58579 12.4142 6.25 12 6.25C11.5858 6.25 11.25 6.58579 11.25 7H12.75ZM14.7628 13.7115C15.1558 13.8425 15.5805 13.6301 15.7115 13.2372C15.8425 12.8442 15.6301 12.4195 15.2372 12.2885L14.7628 13.7115ZM12.75 12V7H11.25V12H12.75ZM11.7628 12.7115L14.7628 13.7115L15.2372 12.2885L12.2372 11.2885L11.7628 12.7115ZM21.25 12C21.25 17.1086 17.1086 21.25 12 21.25V22.75C17.9371 22.75 22.75 17.9371 22.75 12H21.25ZM12 21.25C6.89137 21.25 2.75 17.1086 2.75 12H1.25C1.25 17.9371 6.06294 22.75 12 22.75V21.25ZM2.75 12C2.75 6.89137 6.89137 2.75 12 2.75V1.25C6.06294 1.25 1.25 6.06294 1.25 12H2.75ZM12 2.75C17.1086 2.75 21.25 6.89137 21.25 12H22.75C22.75 6.06294 17.9371 1.25 12 1.25V2.75Z",
|
|
640
|
+
fill: "currentColor"
|
|
641
|
+
}
|
|
642
|
+
]
|
|
643
|
+
}, Qt = {
|
|
644
|
+
viewBox: "0 0 24 24",
|
|
645
|
+
paths: [
|
|
646
|
+
{
|
|
647
|
+
type: "path",
|
|
648
|
+
d: "M15 10L13.7071 11.2929C13.3166 11.6834 13.3166 12.3166 13.7071 12.7071L15 14M14 12L22 12M6 20C3.79086 20 2 18.2091 2 16V8C2 5.79086 3.79086 4 6 4M6 20C8.20914 20 10 18.2091 10 16V8C10 5.79086 8.20914 4 6 4M6 20H14C16.2091 20 18 18.2091 18 16M6 4H14C16.2091 4 18 5.79086 18 8",
|
|
649
|
+
fill: "none",
|
|
650
|
+
stroke: "currentColor",
|
|
651
|
+
strokeWidth: 1.5,
|
|
652
|
+
strokeLinecap: "round",
|
|
653
|
+
strokeLinejoin: "round"
|
|
654
|
+
}
|
|
655
|
+
]
|
|
656
|
+
}, ea = {
|
|
657
|
+
viewBox: "0 0 24 24",
|
|
658
|
+
paths: [
|
|
659
|
+
{
|
|
660
|
+
type: "path",
|
|
661
|
+
d: "M19 9L18.2841 18.3068C18.1238 20.3908 16.386 22 14.2959 22H9.70412C7.61398 22 5.87621 20.3908 5.71591 18.3068L5 9M21 7C18.4021 5.73398 15.3137 5 12 5C8.68635 5 5.59792 5.73398 3 7M10 5V4C10 2.89543 10.8954 2 12 2C13.1046 2 14 2.89543 14 4V5M10 11V17M14 11V17",
|
|
662
|
+
fill: "none",
|
|
663
|
+
stroke: "currentColor",
|
|
664
|
+
strokeWidth: 1.5,
|
|
665
|
+
strokeLinecap: "round",
|
|
666
|
+
strokeLinejoin: "round"
|
|
667
|
+
}
|
|
668
|
+
]
|
|
669
|
+
}, ta = {
|
|
670
|
+
viewBox: "0 0 24 24",
|
|
671
|
+
paths: [
|
|
672
|
+
{
|
|
673
|
+
type: "path",
|
|
674
|
+
d: "M2 6C2 3.79086 3.79086 2 6 2H18C20.2091 2 22 3.79086 22 6V18C22 20.2091 20.2091 22 18 22H6C3.79086 22 2 20.2091 2 18V6Z",
|
|
675
|
+
fill: "currentColor",
|
|
676
|
+
opacity: 0.4
|
|
677
|
+
},
|
|
678
|
+
{
|
|
679
|
+
type: "path",
|
|
680
|
+
d: "M6 21.9999H18C20.2091 21.9999 22 20.209 22 17.9999V13.9999L19.061 11.8838C17.5338 10.7842 15.4467 10.8978 14.0479 12.1567L9.95209 15.843C8.55331 17.1019 6.4662 17.2155 4.93901 16.1159L2 13.9999V17.9999C2 20.209 3.79086 21.9999 6 21.9999Z",
|
|
681
|
+
fill: "currentColor"
|
|
682
|
+
},
|
|
683
|
+
{
|
|
684
|
+
type: "circle",
|
|
685
|
+
cx: 8.5,
|
|
686
|
+
cy: 8.5,
|
|
687
|
+
r: 2.5,
|
|
688
|
+
fill: "currentColor"
|
|
689
|
+
}
|
|
690
|
+
]
|
|
691
|
+
}, aa = {
|
|
692
|
+
viewBox: "0 0 24 24",
|
|
693
|
+
paths: [
|
|
694
|
+
{
|
|
695
|
+
type: "path",
|
|
696
|
+
d: "M18.4,7.379a1.128,1.128,0,0,1-.769-.754h0a8,8,0,1,0-15.1,5.237A1.046,1.046,0,0,1,2.223,13.1,5.5,5.5,0,0,0,.057,18.3,5.622,5.622,0,0,0,5.683,23H11a1,1,0,0,0,1-1h0a1,1,0,0,0-1-1H5.683a3.614,3.614,0,0,1-3.646-2.981,3.456,3.456,0,0,1,1.376-3.313A3.021,3.021,0,0,0,4.4,11.141a6.113,6.113,0,0,1-.073-4.126A5.956,5.956,0,0,1,9.215,3.05,6.109,6.109,0,0,1,9.987,3a5.984,5.984,0,0,1,5.756,4.28,2.977,2.977,0,0,0,2.01,1.99,5.934,5.934,0,0,1,.778,11.09.976.976,0,0,0-.531.888h0a.988.988,0,0,0,1.388.915c4.134-1.987,6.38-7.214,2.88-12.264A6.935,6.935,0,0,0,18.4,7.379Z",
|
|
697
|
+
fill: "currentColor"
|
|
698
|
+
},
|
|
699
|
+
{
|
|
700
|
+
type: "path",
|
|
701
|
+
d: "M18.707,16.707a1,1,0,0,0,0-1.414l-1.586-1.586a3,3,0,0,0-4.242,0l-1.586,1.586a1,1,0,0,0,1.414,1.414L14,15.414V23a1,1,0,0,0,2,0V15.414l1.293,1.293a1,1,0,0,0,1.414,0Z",
|
|
702
|
+
fill: "currentColor"
|
|
703
|
+
}
|
|
704
|
+
]
|
|
705
|
+
}, na = {
|
|
706
|
+
viewBox: "0 0 24 24",
|
|
707
|
+
paths: [
|
|
708
|
+
{
|
|
709
|
+
type: "path",
|
|
710
|
+
d: "M20,0H7A1,1,0,0,0,7,2h5.354L9.627,22H4a1,1,0,0,0,0,2H17a1,1,0,0,0,0-2H11.646L14.373,2H20a1,1,0,0,0,0-2Z",
|
|
711
|
+
fill: "currentColor"
|
|
712
|
+
}
|
|
713
|
+
]
|
|
714
|
+
}, oa = {
|
|
715
|
+
viewBox: "0 0 24 24",
|
|
716
|
+
paths: [
|
|
717
|
+
{
|
|
718
|
+
type: "path",
|
|
719
|
+
d: "M20 14L21.2929 12.7071C21.6834 12.3166 21.6834 11.6834 21.2929 11.2929L20 10",
|
|
720
|
+
fill: "none",
|
|
721
|
+
stroke: "currentColor",
|
|
722
|
+
strokeWidth: 1.5,
|
|
723
|
+
strokeLinecap: "round",
|
|
724
|
+
strokeLinejoin: "round"
|
|
725
|
+
},
|
|
726
|
+
{
|
|
727
|
+
type: "path",
|
|
728
|
+
d: "M21 12H13M6 20C3.79086 20 2 18.2091 2 16V8C2 5.79086 3.79086 4 6 4M6 20C8.20914 20 10 18.2091 10 16V8C10 5.79086 8.20914 4 6 4M6 20H14C16.2091 20 18 18.2091 18 16M6 4H14C16.2091 4 18 5.79086 18 8",
|
|
729
|
+
fill: "none",
|
|
730
|
+
stroke: "currentColor",
|
|
731
|
+
strokeWidth: 1.5,
|
|
732
|
+
strokeLinecap: "round",
|
|
733
|
+
strokeLinejoin: "round"
|
|
734
|
+
}
|
|
735
|
+
]
|
|
736
|
+
}, la = {
|
|
737
|
+
viewBox: "0 0 24 24",
|
|
738
|
+
paths: [
|
|
739
|
+
{
|
|
740
|
+
type: "path",
|
|
741
|
+
d: "M18 15.7661L19.5373 17.3034C20.1542 17.9203 20.1542 18.9204 19.5373 19.5373C18.9204 20.1542 17.9203 20.1542 17.3034 19.5373L15.766 18M4 10.8C4 7.04446 7.04446 4 10.8 4C14.5555 4 17.6 7.04446 17.6 10.8C17.6 14.5555 14.5555 17.6 10.8 17.6C7.04446 17.6 4 14.5555 4 10.8Z",
|
|
742
|
+
fill: "none",
|
|
743
|
+
stroke: "currentColor",
|
|
744
|
+
strokeWidth: 1.5,
|
|
745
|
+
strokeLinecap: "round"
|
|
746
|
+
}
|
|
747
|
+
]
|
|
748
|
+
}, sa = {
|
|
749
|
+
viewBox: "0 0 24 24",
|
|
750
|
+
paths: [
|
|
751
|
+
{
|
|
752
|
+
type: "path",
|
|
753
|
+
d: "M21.0181 14.8356L20.7727 15.5444H20.7727L21.0181 14.8356ZM21.0181 9.16437L21.2635 9.8731V9.8731L21.0181 9.16437ZM2.98189 14.8356L3.22727 15.5444H3.22727L2.98189 14.8356ZM2.98189 9.16437L2.73652 9.8731L2.73652 9.8731L2.98189 9.16437ZM15.5303 9.53033C15.8232 9.23744 15.8232 8.76256 15.5303 8.46967C15.2374 8.17678 14.7626 8.17678 14.4697 8.46967L15.5303 9.53033ZM8.46967 14.4697C8.17678 14.7626 8.17678 15.2374 8.46967 15.5303C8.76256 15.8232 9.23744 15.8232 9.53033 15.5303L8.46967 14.4697ZM6 20.25C4.20507 20.25 2.75 18.7949 2.75 17H1.25C1.25 19.6234 3.37665 21.75 6 21.75V20.25ZM21.25 17C21.25 18.7949 19.7949 20.25 18 20.25V21.75C20.6234 21.75 22.75 19.6234 22.75 17H21.25ZM18 3.75C19.7949 3.75 21.25 5.20507 21.25 7H22.75C22.75 4.37665 20.6234 2.25 18 2.25V3.75ZM6 2.25C3.37665 2.25 1.25 4.37665 1.25 7H2.75C2.75 5.20507 4.20507 3.75 6 3.75V2.25ZM21.2635 14.1269C20.3815 13.8216 19.75 12.9836 19.75 12H18.25C18.25 13.6424 19.3054 15.0363 20.7727 15.5444L21.2635 14.1269ZM19.75 12C19.75 11.0164 20.3815 10.1784 21.2635 9.8731L20.7727 8.45565C19.3054 8.96367 18.25 10.3576 18.25 12H19.75ZM4.25 12C4.25 12.9836 3.61845 13.8216 2.73652 14.1269L3.22727 15.5444C4.69461 15.0363 5.75 13.6424 5.75 12H4.25ZM2.73652 9.8731C3.61845 10.1784 4.25 11.0164 4.25 12H5.75C5.75 10.3576 4.69462 8.96367 3.22727 8.45565L2.73652 9.8731ZM22.75 8V7H21.25V8H22.75ZM21.25 16V17H22.75V16H21.25ZM1.25 16V17H2.75V16H1.25ZM2.75 8V7H1.25V8H2.75ZM18 20.25H6V21.75H18V20.25ZM18 2.25H6V3.75H18V2.25ZM2.73652 14.1269C2.05785 14.3619 1.25 14.9975 1.25 16H2.75C2.75 15.9441 2.77081 15.8708 2.85172 15.7813C2.9366 15.6873 3.06974 15.5989 3.22727 15.5444L2.73652 14.1269ZM21.2635 9.8731C21.9422 9.63813 22.75 9.00246 22.75 8H21.25C21.25 8.05587 21.2292 8.12917 21.1483 8.21871C21.0634 8.31265 20.9303 8.40111 20.7727 8.45565L21.2635 9.8731ZM3.22727 8.45565C3.06974 8.40111 2.9366 8.31265 2.85172 8.21871C2.77081 8.12917 2.75 8.05587 2.75 8H1.25C1.25 9.00246 2.05785 9.63813 2.73652 9.8731L3.22727 8.45565ZM20.7727 15.5444C20.9303 15.5989 21.0634 15.6873 21.1483 15.7813C21.2292 15.8708 21.25 15.9441 21.25 16H22.75C22.75 14.9975 21.9422 14.3619 21.2635 14.1269L20.7727 15.5444ZM9.25 9C9.25 9.13807 9.13807 9.25 9 9.25V10.75C9.9665 10.75 10.75 9.9665 10.75 9H9.25ZM9 9.25C8.86193 9.25 8.75 9.13807 8.75 9H7.25C7.25 9.9665 8.0335 10.75 9 10.75V9.25ZM8.75 9C8.75 8.86193 8.86193 8.75 9 8.75V7.25C8.0335 7.25 7.25 8.0335 7.25 9H8.75ZM9 8.75C9.13807 8.75 9.25 8.86193 9.25 9H10.75C10.75 8.0335 9.9665 7.25 9 7.25V8.75ZM15.25 15C15.25 15.1381 15.1381 15.25 15 15.25V16.75C15.9665 16.75 16.75 15.9665 16.75 15H15.25ZM15 15.25C14.8619 15.25 14.75 15.1381 14.75 15H13.25C13.25 15.9665 14.0335 16.75 15 16.75V15.25ZM14.75 15C14.75 14.8619 14.8619 14.75 15 14.75V13.25C14.0335 13.25 13.25 14.0335 13.25 15H14.75ZM15 14.75C15.1381 14.75 15.25 14.8619 15.25 15H16.75C16.75 14.0335 15.9665 13.25 15 13.25V14.75ZM14.4697 8.46967L8.46967 14.4697L9.53033 15.5303L15.5303 9.53033L14.4697 8.46967Z",
|
|
754
|
+
fill: "currentColor"
|
|
755
|
+
}
|
|
756
|
+
]
|
|
757
|
+
}, ra = {
|
|
758
|
+
viewBox: "0 0 24 24",
|
|
759
|
+
paths: [
|
|
760
|
+
{
|
|
761
|
+
type: "path",
|
|
762
|
+
d: "M4.00006 4L20.0001 20M14.0001 14.2361C13.4693 14.7111 12.7684 15 12.0001 15C10.3432 15 9.00006 13.6569 9.00006 12C9.00006 11.2316 9.28891 10.5308 9.76395 10M19.6078 15.6077C20.1792 15.1103 20.6903 14.6099 21.1304 14.1469C22.29 12.9268 22.29 11.0732 21.1304 9.8531C19.1746 7.79533 15.8156 5 12.0001 5C11.1087 5 10.2422 5.15256 9.41276 5.41264M6.50006 6.80338C5.0415 7.73444 3.7977 8.87678 2.86977 9.8531C1.71016 11.0732 1.71016 12.9268 2.86977 14.1469C4.82555 16.2047 8.18455 19 12.0001 19C13.8681 19 15.6268 18.3299 17.1649 17.4044",
|
|
763
|
+
fill: "none",
|
|
764
|
+
stroke: "currentColor",
|
|
765
|
+
strokeWidth: 1.5,
|
|
766
|
+
strokeLinecap: "round"
|
|
767
|
+
}
|
|
768
|
+
]
|
|
769
|
+
}, ia = {
|
|
770
|
+
viewBox: "0 0 24 24",
|
|
771
|
+
paths: [
|
|
772
|
+
{
|
|
773
|
+
type: "path",
|
|
774
|
+
d: "M12 17H21M12 11H18M12 5H15M3 14.625L4.50518 16.3183C5.30076 17.2134 6.69924 17.2134 7.49482 16.3183L9 14.625M6 17V5",
|
|
775
|
+
fill: "none",
|
|
776
|
+
stroke: "currentColor",
|
|
777
|
+
strokeWidth: 1.5,
|
|
778
|
+
strokeLinecap: "round",
|
|
779
|
+
strokeLinejoin: "round"
|
|
780
|
+
}
|
|
781
|
+
]
|
|
782
|
+
}, ua = {
|
|
783
|
+
viewBox: "0 0 24 24",
|
|
784
|
+
paths: [
|
|
785
|
+
{
|
|
786
|
+
type: "path",
|
|
787
|
+
d: "M12 5V2M12 22V19M7.05028 7.05024L4.92896 4.92892M19.0711 19.0711L16.9498 16.9497M19 12H22M2 12H5M16.9497 7.05024L19.071 4.92892M4.92891 19.0711L7.05023 16.9497",
|
|
788
|
+
fill: "none",
|
|
789
|
+
stroke: "currentColor",
|
|
790
|
+
strokeWidth: 1.5,
|
|
791
|
+
strokeLinecap: "round",
|
|
792
|
+
strokeLinejoin: "round"
|
|
793
|
+
}
|
|
794
|
+
]
|
|
795
|
+
}, da = {
|
|
796
|
+
viewBox: "0 0 24 24",
|
|
797
|
+
paths: [
|
|
798
|
+
{
|
|
799
|
+
type: "path",
|
|
800
|
+
d: "M15.25 7C15.25 8.79493 13.7949 10.25 12 10.25V11.75C14.6234 11.75 16.75 9.62335 16.75 7H15.25ZM12 10.25C10.2051 10.25 8.75 8.79493 8.75 7H7.25C7.25 9.62335 9.37665 11.75 12 11.75V10.25ZM8.75 7C8.75 5.20507 10.2051 3.75 12 3.75V2.25C9.37665 2.25 7.25 4.37665 7.25 7H8.75ZM12 3.75C13.7949 3.75 15.25 5.20507 15.25 7H16.75C16.75 4.37665 14.6234 2.25 12 2.25V3.75ZM18.25 17.5C18.25 18.0294 17.8014 18.7105 16.6143 19.3041C15.4722 19.8751 13.8418 20.25 12 20.25V21.75C14.0242 21.75 15.8938 21.3414 17.2852 20.6457C18.6316 19.9725 19.75 18.9036 19.75 17.5H18.25ZM12 20.25C10.1582 20.25 8.52782 19.8751 7.38566 19.3041C6.19864 18.7105 5.75 18.0294 5.75 17.5H4.25C4.25 18.9036 5.36836 19.9725 6.71484 20.6457C8.10618 21.3414 9.97582 21.75 12 21.75V20.25ZM5.75 17.5C5.75 16.9706 6.19864 16.2895 7.38566 15.6959C8.52782 15.1249 10.1582 14.75 12 14.75V13.25C9.97582 13.25 8.10618 13.6586 6.71484 14.3543C5.36836 15.0275 4.25 16.0964 4.25 17.5H5.75ZM12 14.75C13.8418 14.75 15.4722 15.1249 16.6143 15.6959C17.8014 16.2895 18.25 16.9706 18.25 17.5H19.75C19.75 16.0964 18.6316 15.0275 17.2852 14.3543C15.8938 13.6586 14.0242 13.25 12 13.25V14.75Z",
|
|
801
|
+
fill: "currentColor"
|
|
802
|
+
}
|
|
803
|
+
]
|
|
804
|
+
}, ca = {
|
|
805
|
+
viewBox: "0 0 24 24",
|
|
806
|
+
paths: [
|
|
807
|
+
{
|
|
808
|
+
type: "circle",
|
|
809
|
+
cx: 12,
|
|
810
|
+
cy: 17,
|
|
811
|
+
r: 1,
|
|
812
|
+
transform: "rotate(-180 12 17)",
|
|
813
|
+
fill: "currentColor"
|
|
814
|
+
},
|
|
815
|
+
{
|
|
816
|
+
type: "path",
|
|
817
|
+
d: "M11.9999 8.99997V14M4.32789 21H19.6721C21.4445 21 22.5649 19.1433 21.7041 17.6324L14.032 4.16592C13.1464 2.61136 10.8536 2.61136 9.96798 4.16592L2.29587 17.6324C1.4351 19.1433 2.55546 21 4.32789 21Z",
|
|
818
|
+
fill: "none",
|
|
819
|
+
stroke: "currentColor",
|
|
820
|
+
strokeWidth: 1.5,
|
|
821
|
+
strokeLinecap: "round",
|
|
822
|
+
strokeLinejoin: "round"
|
|
823
|
+
}
|
|
824
|
+
]
|
|
825
|
+
}, va = {
|
|
826
|
+
viewBox: "0 0 24 24",
|
|
827
|
+
paths: [
|
|
828
|
+
{
|
|
829
|
+
type: "path",
|
|
830
|
+
d: "M12 18H21M12 12H18M12 6H15M3 8.375L4.50518 6.68167C5.30076 5.78664 6.69924 5.78664 7.49482 6.68167L9 8.375M6 6V18",
|
|
831
|
+
fill: "none",
|
|
832
|
+
stroke: "currentColor",
|
|
833
|
+
strokeWidth: 1.5,
|
|
834
|
+
strokeLinecap: "round",
|
|
835
|
+
strokeLinejoin: "round"
|
|
836
|
+
}
|
|
837
|
+
]
|
|
838
|
+
}, fa = {
|
|
839
|
+
viewBox: "0 0 24 24",
|
|
840
|
+
paths: [
|
|
841
|
+
{
|
|
842
|
+
type: "path",
|
|
843
|
+
d: "M6 21.25C5.58579 21.25 5.25 21.5858 5.25 22C5.25 22.4142 5.58579 22.75 6 22.75V21.25ZM18 22.75C18.4142 22.75 18.75 22.4142 18.75 22C18.75 21.5858 18.4142 21.25 18 21.25V22.75ZM18.75 9.5C18.75 11.2065 17.6599 13.4136 16.1547 15.2468C15.4148 16.1481 14.6072 16.9179 13.8465 17.4554C13.0624 18.0094 12.4227 18.25 12 18.25V19.75C12.8898 19.75 13.8438 19.294 14.7121 18.6804C15.6038 18.0504 16.5071 17.1815 17.314 16.1987C18.9026 14.2638 20.25 11.7209 20.25 9.5H18.75ZM12 18.25C11.5925 18.25 10.9595 17.9993 10.171 17.4074C9.409 16.8353 8.59932 16.0178 7.85679 15.0668C6.34675 13.1327 5.25 10.825 5.25 9.11111H3.75C3.75 11.3246 5.09075 13.9614 6.67446 15.9899C7.4788 17.0201 8.38006 17.9385 9.27041 18.6069C10.1343 19.2555 11.095 19.75 12 19.75V18.25ZM5.25 9.11111C5.25 5.48059 8.47857 2.75 12 2.75V1.25C7.78944 1.25 3.75 4.51941 3.75 9.11111H5.25ZM12 2.75C15.4938 2.75 18.75 5.45503 18.75 9.5H20.25C20.25 4.54497 16.2382 1.25 12 1.25V2.75ZM14.25 9C14.25 10.2426 13.2426 11.25 12 11.25V12.75C14.0711 12.75 15.75 11.0711 15.75 9H14.25ZM12 11.25C10.7574 11.25 9.75 10.2426 9.75 9H8.25C8.25 11.0711 9.92893 12.75 12 12.75V11.25ZM9.75 9C9.75 7.75736 10.7574 6.75 12 6.75V5.25C9.92893 5.25 8.25 6.92893 8.25 9H9.75ZM12 6.75C13.2426 6.75 14.25 7.75736 14.25 9H15.75C15.75 6.92893 14.0711 5.25 12 5.25V6.75ZM6 22.75H18V21.25H6V22.75Z",
|
|
844
|
+
fill: "currentColor"
|
|
845
|
+
}
|
|
846
|
+
]
|
|
847
|
+
}, ma = {
|
|
848
|
+
viewBox: "0 0 24 24",
|
|
849
|
+
paths: [
|
|
850
|
+
{
|
|
851
|
+
type: "path",
|
|
852
|
+
d: "M10.0328 3.27141C10.8375 1.5762 13.1625 1.5762 13.9672 3.27141L15.3579 6.20118C15.6774 6.87435 16.2951 7.34094 17.0096 7.44888L20.1193 7.91869C21.9187 8.19053 22.6371 10.4895 21.3351 11.8091L19.0849 14.0896C18.5679 14.6136 18.332 15.3685 18.454 16.1084L18.9852 19.3285C19.2926 21.1918 17.4116 22.6126 15.8022 21.7329L13.0208 20.2126C12.3817 19.8633 11.6183 19.8633 10.9792 20.2126L8.19776 21.7329C6.58839 22.6126 4.70742 21.1918 5.01479 19.3286L5.54599 16.1084C5.66804 15.3685 5.43211 14.6136 4.91508 14.0896L2.66488 11.8091C1.36287 10.4895 2.08133 8.19053 3.88066 7.91869L6.99037 7.44888C7.70489 7.34094 8.32257 6.87435 8.64211 6.20118L10.0328 3.27141Z",
|
|
853
|
+
fill: "currentColor"
|
|
854
|
+
}
|
|
855
|
+
]
|
|
856
|
+
}, pa = {
|
|
857
|
+
viewBox: "0 0 24 24",
|
|
858
|
+
paths: [
|
|
859
|
+
{
|
|
860
|
+
type: "path",
|
|
861
|
+
d: "M6.34311 14.8284C5.56206 15.6094 5.56206 16.8758 6.34311 17.6568C7.12416 18.4379 8.39049 18.4379 9.17154 17.6568L12 14.8284L14.8284 17.6568C15.6094 18.4379 16.8758 18.4379 17.6568 17.6568C18.4379 16.8758 18.4379 15.6094 17.6568 14.8284L14.8284 12L17.6568 9.17154C18.4379 8.39049 18.4379 7.12416 17.6568 6.34311C16.8758 5.56206 15.6094 5.56206 14.8284 6.34311L12 9.17154L9.17154 6.34311C8.39049 5.56206 7.12416 5.56206 6.34311 6.34311C5.56206 7.12416 5.56206 8.39049 6.34311 9.17154L9.17154 12L6.34311 14.8284Z",
|
|
862
|
+
fill: "currentColor"
|
|
863
|
+
}
|
|
864
|
+
]
|
|
865
|
+
}, ba = {
|
|
866
|
+
viewBox: "0 0 24 24",
|
|
867
|
+
paths: [
|
|
868
|
+
{
|
|
869
|
+
type: "path",
|
|
870
|
+
d: "M16 6C16 3.79086 14.2091 2 12 2C9.79085 2 7.99999 3.79086 7.99999 6M6.8197 22H17.1803C19.6848 22 21.5733 19.7245 21.1118 17.2628L19.6118 9.26285C19.257 7.37095 17.6051 6 15.6803 6H8.3197C6.39484 6 4.74294 7.37096 4.38821 9.26285L2.88821 17.2628C2.42665 19.7245 4.31515 22 6.8197 22Z",
|
|
871
|
+
fill: "none",
|
|
872
|
+
stroke: "currentColor",
|
|
873
|
+
strokeWidth: 1.5,
|
|
874
|
+
strokeLinecap: "round",
|
|
875
|
+
strokeLinejoin: "round"
|
|
876
|
+
}
|
|
877
|
+
]
|
|
878
|
+
}, ga = {
|
|
879
|
+
viewBox: "0 0 24 24",
|
|
880
|
+
paths: [
|
|
881
|
+
{
|
|
882
|
+
type: "path",
|
|
883
|
+
d: "M6.41438 9.53151C6.67313 9.20806 7.1451 9.15562 7.46855 9.41438L12 13.0396L16.5315 9.41438C16.855 9.15562 17.3269 9.20806 17.5857 9.53151C17.8444 9.85495 17.792 10.3269 17.4685 10.5857L12.4685 14.5857C12.1946 14.8048 11.8054 14.8048 11.5315 14.5857L6.53151 10.5857C6.20806 10.3269 6.15562 9.85495 6.41438 9.53151Z",
|
|
884
|
+
fill: "currentColor",
|
|
885
|
+
fillRule: "evenodd",
|
|
886
|
+
clipRule: "evenodd"
|
|
887
|
+
}
|
|
888
|
+
]
|
|
889
|
+
}, Ca = {
|
|
890
|
+
viewBox: "0 0 24 24",
|
|
891
|
+
paths: [
|
|
892
|
+
{
|
|
893
|
+
type: "path",
|
|
894
|
+
d: "M2.58683 10H21.4132M8 14H16M9 18H15M9 2L6 6M15 2L18 6M18.0351 6L5.96486 6C3.45403 6 1.57594 8.32624 2.08312 10.808L3.71804 18.808C4.09787 20.6666 5.71942 22 7.59978 22H16.4002C18.2806 22 19.9021 20.6666 20.282 18.808L21.9169 10.808C22.4241 8.32624 20.546 6 18.0351 6Z",
|
|
895
|
+
fill: "none",
|
|
896
|
+
stroke: "currentColor",
|
|
897
|
+
strokeWidth: 1.5,
|
|
898
|
+
strokeLinecap: "round",
|
|
899
|
+
strokeLinejoin: "round"
|
|
900
|
+
}
|
|
901
|
+
]
|
|
902
|
+
}, Ge = {
|
|
903
|
+
eye: Et,
|
|
904
|
+
star: Dt,
|
|
905
|
+
home: Nt,
|
|
906
|
+
edit: Ot,
|
|
907
|
+
disk: Pt,
|
|
908
|
+
user: Ut,
|
|
909
|
+
info: qt,
|
|
910
|
+
sort: Kt,
|
|
911
|
+
tick: jt,
|
|
912
|
+
link: zt,
|
|
913
|
+
head: Ft,
|
|
914
|
+
bold: Wt,
|
|
915
|
+
oList: Xt,
|
|
916
|
+
uList: Gt,
|
|
917
|
+
close: Jt,
|
|
918
|
+
clock: Yt,
|
|
919
|
+
login: Qt,
|
|
920
|
+
image: ta,
|
|
921
|
+
trash: ea,
|
|
922
|
+
upload: aa,
|
|
923
|
+
italic: na,
|
|
924
|
+
logout: oa,
|
|
925
|
+
ticket: sa,
|
|
926
|
+
search: la,
|
|
927
|
+
eyeOff: ra,
|
|
928
|
+
loading: ua,
|
|
929
|
+
sortAsc: ia,
|
|
930
|
+
profile: da,
|
|
931
|
+
warning: ca,
|
|
932
|
+
sortDesc: va,
|
|
933
|
+
location: fa,
|
|
934
|
+
starSolid: ma,
|
|
935
|
+
closeSolid: pa,
|
|
936
|
+
shoppingBag: ba,
|
|
937
|
+
directionDown: ga,
|
|
938
|
+
shoppingBasket: Ca
|
|
939
|
+
}, ha = ["viewBox", "width", "height"], ya = /* @__PURE__ */ T({
|
|
940
|
+
__name: "Icon",
|
|
941
|
+
props: {
|
|
942
|
+
name: {},
|
|
943
|
+
size: {},
|
|
944
|
+
spin: { type: Boolean }
|
|
945
|
+
},
|
|
946
|
+
setup(e) {
|
|
947
|
+
return (a, t) => (v(), m("svg", {
|
|
948
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
949
|
+
class: re(["icon", { spin: e.spin }]),
|
|
950
|
+
viewBox: _(Ge)[e.name].viewBox,
|
|
951
|
+
width: e.size || 24,
|
|
952
|
+
height: e.size || 24,
|
|
953
|
+
fill: "none",
|
|
954
|
+
"aria-hidden": "true"
|
|
955
|
+
}, [
|
|
956
|
+
(v(!0), m(ae, null, de(_(Ge)[e.name].paths, (n, s) => (v(), m(ae, { key: s }, [
|
|
957
|
+
n.type === "path" ? (v(), m("path", we({
|
|
958
|
+
key: 0,
|
|
959
|
+
ref_for: !0
|
|
960
|
+
}, n), null, 16)) : K("", !0),
|
|
961
|
+
n.type === "circle" ? (v(), m("circle", we({
|
|
962
|
+
key: 1,
|
|
963
|
+
ref_for: !0
|
|
964
|
+
}, n), null, 16)) : K("", !0),
|
|
965
|
+
n.type === "line" ? (v(), m("line", we({
|
|
966
|
+
key: 2,
|
|
967
|
+
ref_for: !0
|
|
968
|
+
}, n), null, 16)) : K("", !0)
|
|
969
|
+
], 64))), 128))
|
|
970
|
+
], 10, ha));
|
|
971
|
+
}
|
|
972
|
+
}), ie = /* @__PURE__ */ W(ya, [["__scopeId", "data-v-4fb44ca8"]]), ka = ["aria-controls"], wa = ["aria-pressed", "onMousedown", "aria-label"], La = { key: 1 }, Ma = /* @__PURE__ */ T({
|
|
973
|
+
__name: "FloatingToolbar",
|
|
974
|
+
props: {
|
|
975
|
+
editor: {},
|
|
976
|
+
editorId: {},
|
|
977
|
+
buttons: {}
|
|
978
|
+
},
|
|
979
|
+
setup(e, { expose: a }) {
|
|
980
|
+
const t = e, n = b(0), s = b(0), r = b(!1), i = b([]);
|
|
981
|
+
Y(
|
|
982
|
+
r,
|
|
983
|
+
(d) => !d && (i.value = [])
|
|
984
|
+
);
|
|
985
|
+
const o = L(() => ({
|
|
986
|
+
top: `${s.value}px`,
|
|
987
|
+
left: `${n.value}px`
|
|
988
|
+
})), l = (d, C) => d && (i.value[C] = d), c = L(() => [
|
|
989
|
+
{
|
|
990
|
+
key: "strong",
|
|
991
|
+
label: "bold",
|
|
992
|
+
type: "icon",
|
|
993
|
+
ariaLabel: "Bold",
|
|
994
|
+
action: (d) => {
|
|
995
|
+
d.restoreSelection(), d.toggleInline("strong"), d.focus(), d.announce(d.isInlineActive("strong") ? "Bold enabled" : "Bold disabled");
|
|
996
|
+
},
|
|
997
|
+
isActive: (d) => d.isInlineActive("strong")
|
|
998
|
+
},
|
|
999
|
+
{
|
|
1000
|
+
key: "em",
|
|
1001
|
+
label: "italic",
|
|
1002
|
+
type: "icon",
|
|
1003
|
+
ariaLabel: "Italic",
|
|
1004
|
+
action: (d) => {
|
|
1005
|
+
d.restoreSelection(), d.toggleInline("em"), d.focus(), d.announce(d.isInlineActive("em") ? "Italic enabled" : "Italic disabled");
|
|
1006
|
+
},
|
|
1007
|
+
isActive: (d) => d.isInlineActive("em")
|
|
1008
|
+
},
|
|
1009
|
+
{
|
|
1010
|
+
key: "h1",
|
|
1011
|
+
label: "head",
|
|
1012
|
+
type: "icon",
|
|
1013
|
+
ariaLabel: "Heading 1",
|
|
1014
|
+
action: (d) => {
|
|
1015
|
+
d.restoreSelection(), d.toggleBlock("h1"), d.focus(), d.announce(d.isBlockActive("h1") ? "Heading level 1 enabled" : "Heading level 1 disabled");
|
|
1016
|
+
},
|
|
1017
|
+
isActive: (d) => d.isBlockActive("h1")
|
|
1018
|
+
},
|
|
1019
|
+
{
|
|
1020
|
+
key: "h4",
|
|
1021
|
+
label: "head",
|
|
1022
|
+
type: "icon",
|
|
1023
|
+
ariaLabel: "Heading 4",
|
|
1024
|
+
size: 12,
|
|
1025
|
+
action: (d) => {
|
|
1026
|
+
d.restoreSelection(), d.toggleBlock("h4"), d.focus(), d.announce(d.isBlockActive("h4") ? "Heading level 4 enabled" : "Heading level 4 disabled");
|
|
1027
|
+
},
|
|
1028
|
+
isActive: (d) => d.isBlockActive("h4")
|
|
1029
|
+
},
|
|
1030
|
+
{
|
|
1031
|
+
key: "quote",
|
|
1032
|
+
label: "❝",
|
|
1033
|
+
type: "text",
|
|
1034
|
+
ariaLabel: "Blockquote",
|
|
1035
|
+
action: (d) => {
|
|
1036
|
+
d.restoreSelection(), d.toggleBlock("blockquote"), d.focus(), d.announce(d.isBlockActive("blockquote") ? "Blockquote enabled" : "Blockquote disabled");
|
|
1037
|
+
},
|
|
1038
|
+
isActive: (d) => d.isBlockActive("blockquote")
|
|
1039
|
+
}
|
|
1040
|
+
]), u = L(() => [
|
|
1041
|
+
...c.value,
|
|
1042
|
+
...t.editor?.buttons ?? []
|
|
1043
|
+
]), g = async () => {
|
|
1044
|
+
await Me(), i.value[0]?.focus();
|
|
1045
|
+
}, $ = (d) => {
|
|
1046
|
+
const C = i.value, I = C.indexOf(document.activeElement);
|
|
1047
|
+
if (d.key === "ArrowRight") {
|
|
1048
|
+
d.preventDefault();
|
|
1049
|
+
const R = I < C.length - 1 ? I + 1 : 0;
|
|
1050
|
+
C[R]?.focus();
|
|
1051
|
+
}
|
|
1052
|
+
if (d.key === "ArrowLeft") {
|
|
1053
|
+
d.preventDefault();
|
|
1054
|
+
const R = I > 0 ? I - 1 : C.length - 1;
|
|
1055
|
+
C[R]?.focus();
|
|
1056
|
+
}
|
|
1057
|
+
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());
|
|
1058
|
+
}, H = () => {
|
|
1059
|
+
const d = window.getSelection();
|
|
1060
|
+
if (!d || d.rangeCount === 0) {
|
|
1061
|
+
r.value = !1;
|
|
1062
|
+
return;
|
|
1063
|
+
}
|
|
1064
|
+
const C = t.editor?.rootElement;
|
|
1065
|
+
if (!C) return;
|
|
1066
|
+
const I = d.getRangeAt(0);
|
|
1067
|
+
if (!C.contains(I.commonAncestorContainer) || d.isCollapsed) {
|
|
1068
|
+
r.value = !1;
|
|
1069
|
+
return;
|
|
1070
|
+
}
|
|
1071
|
+
const R = I.getBoundingClientRect();
|
|
1072
|
+
n.value = R.left + R.width / 2, s.value = R.top - 45, r.value = !0;
|
|
1073
|
+
};
|
|
1074
|
+
return te(() => {
|
|
1075
|
+
document.addEventListener("selectionchange", H), window.addEventListener("scroll", H, !0), window.addEventListener("resize", H);
|
|
1076
|
+
}), he(() => {
|
|
1077
|
+
document.removeEventListener("selectionchange", H), window.removeEventListener("scroll", H, !0), window.removeEventListener("resize", H);
|
|
1078
|
+
}), a({
|
|
1079
|
+
focusFirstButton: g
|
|
1080
|
+
}), (d, C) => (v(), J(Ie, { name: "tooltip-fade" }, {
|
|
1081
|
+
default: G(() => [
|
|
1082
|
+
r.value ? (v(), m("div", {
|
|
1083
|
+
key: 0,
|
|
1084
|
+
class: "toolbar",
|
|
1085
|
+
role: "toolbar",
|
|
1086
|
+
"aria-label": "Formatting options",
|
|
1087
|
+
"aria-controls": e.editorId,
|
|
1088
|
+
style: be(o.value),
|
|
1089
|
+
tabindex: "-1",
|
|
1090
|
+
onKeydown: $
|
|
1091
|
+
}, [
|
|
1092
|
+
C[0] || (C[0] = w("div", { class: "arrow" }, null, -1)),
|
|
1093
|
+
(v(!0), m(ae, null, de(u.value, (I, R) => (v(), m("button", {
|
|
1094
|
+
key: I.key ?? R,
|
|
1095
|
+
type: "button",
|
|
1096
|
+
ref_for: !0,
|
|
1097
|
+
ref: (y) => l(y, R),
|
|
1098
|
+
class: re({ "is-active": I.isActive?.(t.editor) }),
|
|
1099
|
+
"aria-pressed": I.isActive?.(t.editor),
|
|
1100
|
+
onMousedown: oe((y) => I.action(t.editor), ["prevent"]),
|
|
1101
|
+
"aria-label": I.ariaLabel
|
|
1102
|
+
}, [
|
|
1103
|
+
I.type === "icon" ? (v(), J(ie, {
|
|
1104
|
+
key: 0,
|
|
1105
|
+
name: I.label,
|
|
1106
|
+
size: I.size ?? 14
|
|
1107
|
+
}, null, 8, ["name", "size"])) : (v(), m("span", La, U(I.label), 1))
|
|
1108
|
+
], 42, wa))), 128))
|
|
1109
|
+
], 44, ka)) : K("", !0)
|
|
1110
|
+
]),
|
|
1111
|
+
_: 1
|
|
1112
|
+
}));
|
|
1113
|
+
}
|
|
1114
|
+
}), $a = /* @__PURE__ */ W(Ma, [["__scopeId", "data-v-3f279ebe"]]), Ia = { class: "editor" }, Je = /* @__PURE__ */ T({
|
|
1115
|
+
__name: "Editor",
|
|
1116
|
+
props: /* @__PURE__ */ se({
|
|
1117
|
+
ariaLabel: {},
|
|
1118
|
+
buttons: {}
|
|
1119
|
+
}, {
|
|
1120
|
+
modelValue: {
|
|
1121
|
+
required: !0
|
|
1122
|
+
},
|
|
1123
|
+
modelModifiers: {}
|
|
1124
|
+
}),
|
|
1125
|
+
emits: ["update:modelValue"],
|
|
1126
|
+
setup(e) {
|
|
1127
|
+
const a = Ce(e, "modelValue"), t = e, n = ue(), s = b(), r = b(null), i = b(null);
|
|
1128
|
+
return Y(
|
|
1129
|
+
() => a.value,
|
|
1130
|
+
(o) => {
|
|
1131
|
+
const l = i.value?.getRoot()?.value;
|
|
1132
|
+
l && l.innerHTML !== o && (l.innerHTML = o, r.value?.normalize());
|
|
1133
|
+
}
|
|
1134
|
+
), te(() => {
|
|
1135
|
+
const l = i.value?.getRoot()?.value;
|
|
1136
|
+
if (!l) return;
|
|
1137
|
+
r.value = Bt(l, { buttons: t.buttons ?? [] }), r.value && (r.value.toolbarRef = s);
|
|
1138
|
+
const c = () => a.value = l.innerHTML;
|
|
1139
|
+
l.addEventListener("input", c), he(() => l.removeEventListener("input", c));
|
|
1140
|
+
}), ge("announce", (o) => r.value?.announce(o)), (o, l) => (v(), m("section", Ia, [
|
|
1141
|
+
P(Zt, {
|
|
1142
|
+
ref_key: "contentRef",
|
|
1143
|
+
ref: i,
|
|
1144
|
+
editor: r.value,
|
|
1145
|
+
"editor-id": _(n),
|
|
1146
|
+
"aria-label": e.ariaLabel
|
|
1147
|
+
}, null, 8, ["editor", "editor-id", "aria-label"]),
|
|
1148
|
+
P($a, {
|
|
1149
|
+
ref_key: "toolbarRef",
|
|
1150
|
+
ref: s,
|
|
1151
|
+
editor: r.value,
|
|
1152
|
+
"editor-id": _(n)
|
|
1153
|
+
}, null, 8, ["editor", "editor-id"])
|
|
1154
|
+
]));
|
|
1155
|
+
}
|
|
1156
|
+
});
|
|
1157
|
+
Je.install = (e) => {
|
|
1158
|
+
e.component("Editor", Je);
|
|
1159
|
+
};
|
|
1160
|
+
const xa = ["tabindex", "aria-label", "aria-describedby", "aria-busy", "aria-disabled", "data-disabled", "data-dragging"], Ha = ["multiple", "accept", "disabled"], Va = {
|
|
1161
|
+
key: 1,
|
|
1162
|
+
class: "ui-upload__list"
|
|
1163
|
+
}, _a = { class: "ui-upload__item--default" }, Ra = { class: "ui-upload__file-name" }, Ba = { class: "ui-upload__file-size" }, Ta = {
|
|
1164
|
+
key: 0,
|
|
1165
|
+
class: "ui-upload__progress-wrapper"
|
|
1166
|
+
}, Aa = { class: "ui-upload__progress-text" }, Sa = ["value", "aria-label"], Za = {
|
|
1167
|
+
key: 1,
|
|
1168
|
+
class: "ui-upload__status success",
|
|
1169
|
+
style: { color: "var(--green-color)" },
|
|
1170
|
+
role: "status"
|
|
1171
|
+
}, Ea = {
|
|
1172
|
+
key: 2,
|
|
1173
|
+
class: "ui-upload__status error",
|
|
1174
|
+
style: { color: "var(--red-color)" },
|
|
1175
|
+
role: "alert"
|
|
1176
|
+
}, Da = {
|
|
1177
|
+
key: 3,
|
|
1178
|
+
class: "ui-upload__status canceled",
|
|
1179
|
+
role: "status"
|
|
1180
|
+
}, Oa = { class: "ui-upload__actions" }, Na = {
|
|
1181
|
+
class: "sr-only",
|
|
1182
|
+
"aria-live": "polite"
|
|
1183
|
+
}, qa = ["id"], za = /* @__PURE__ */ T({
|
|
1184
|
+
__name: "Upload",
|
|
1185
|
+
props: /* @__PURE__ */ se({
|
|
1186
|
+
multiple: { type: Boolean, default: !1 },
|
|
1187
|
+
accept: { default: "*/*" },
|
|
1188
|
+
maxSize: { default: 1 / 0 },
|
|
1189
|
+
maxFiles: { default: 1 / 0 },
|
|
1190
|
+
disabled: { type: Boolean },
|
|
1191
|
+
autoUpload: { type: Boolean, default: !0 },
|
|
1192
|
+
ariaLabel: {}
|
|
1193
|
+
}, {
|
|
1194
|
+
modelValue: {
|
|
1195
|
+
default: () => []
|
|
1196
|
+
},
|
|
1197
|
+
modelModifiers: {}
|
|
1198
|
+
}),
|
|
1199
|
+
emits: /* @__PURE__ */ se(["select", "upload", "remove"], ["update:modelValue"]),
|
|
1200
|
+
setup(e, { emit: a }) {
|
|
1201
|
+
const t = Ce(e, "modelValue"), n = e, s = a, r = b(0), i = b(""), o = b(!1), l = ue(), c = b(), u = L(() => t.value), g = L(() => n.maxSize === 1 / 0 ? "Unlimited" : q(n.maxSize)), $ = L(() => !n.disabled && (n.multiple || t.value.length === 0)), H = L(() => u.value.some((p) => p.status === "uploading")), d = () => $.value && c.value?.click(), C = () => {
|
|
1202
|
+
n.disabled || (r.value++, o.value = !0);
|
|
1203
|
+
}, I = () => {
|
|
1204
|
+
r.value = Math.max(0, r.value - 1), r.value === 0 && (o.value = !1);
|
|
1205
|
+
}, R = (p) => {
|
|
1206
|
+
if (!n.disabled && !(!n.multiple && t.value.length > 0) && (r.value = 0, o.value = !1, !!p.dataTransfer)) {
|
|
1207
|
+
if (!n.multiple && p.dataTransfer?.files.length) {
|
|
1208
|
+
const h = p.dataTransfer.files[0];
|
|
1209
|
+
D([h]);
|
|
1210
|
+
return;
|
|
1211
|
+
}
|
|
1212
|
+
D(Array.from(p.dataTransfer.files));
|
|
1213
|
+
}
|
|
1214
|
+
}, y = (p) => {
|
|
1215
|
+
const h = p.target;
|
|
1216
|
+
h.files && (D(Array.from(h.files)), h.value = "");
|
|
1217
|
+
}, D = (p) => {
|
|
1218
|
+
const h = [];
|
|
1219
|
+
for (const X of p) {
|
|
1220
|
+
if (u.value.length + h.length >= n.maxFiles) break;
|
|
1221
|
+
X.size > n.maxSize || h.push({
|
|
1222
|
+
id: crypto.randomUUID(),
|
|
1223
|
+
file: X,
|
|
1224
|
+
progress: 0,
|
|
1225
|
+
status: "idle"
|
|
1226
|
+
});
|
|
1227
|
+
}
|
|
1228
|
+
if (!h.length) return;
|
|
1229
|
+
s("select", h.map((X) => X.file));
|
|
1230
|
+
const E = [...u.value, ...h];
|
|
1231
|
+
t.value = E, n.autoUpload && h.forEach(Z);
|
|
1232
|
+
}, Z = (p) => {
|
|
1233
|
+
const h = new AbortController();
|
|
1234
|
+
p.progress = 0, p.error = void 0, p.status = "uploading", p.controller = h, A(`Started uploading ${p.file.name}`);
|
|
1235
|
+
const E = () => {
|
|
1236
|
+
h.signal.removeEventListener("abort", E);
|
|
1237
|
+
};
|
|
1238
|
+
h.signal.addEventListener("abort", E);
|
|
1239
|
+
const X = {
|
|
1240
|
+
signal: h.signal,
|
|
1241
|
+
onProgress: (x) => {
|
|
1242
|
+
p.progress = x, V();
|
|
1243
|
+
},
|
|
1244
|
+
done: () => {
|
|
1245
|
+
p.status = "success", p.progress = 100, p.controller = void 0, A(`Finished uploading ${p.file.name}`), V();
|
|
1246
|
+
},
|
|
1247
|
+
fail: (x) => {
|
|
1248
|
+
p.status = "error", p.error = x, p.controller = void 0, A(`Failed to upload ${p.file.name}: ${x}`), V();
|
|
1249
|
+
}
|
|
1250
|
+
};
|
|
1251
|
+
s("upload", p, X);
|
|
1252
|
+
}, f = (p) => {
|
|
1253
|
+
p.controller && (p.controller.abort(), p.status = "canceled", p.controller = void 0, A(`Canceled uploading ${p.file.name}`), V());
|
|
1254
|
+
}, k = (p) => {
|
|
1255
|
+
p.status !== "error" && p.status !== "canceled" || Z(p);
|
|
1256
|
+
}, V = () => t.value = [...u.value], q = (p) => {
|
|
1257
|
+
const h = ["B", "KB", "MB", "GB", "TB"];
|
|
1258
|
+
let E = 0;
|
|
1259
|
+
for (; p >= 1024 && E < h.length - 1; )
|
|
1260
|
+
p /= 1024, E++;
|
|
1261
|
+
return `${p.toFixed(2)} ${h[E]}`;
|
|
1262
|
+
}, A = (p) => {
|
|
1263
|
+
i.value = "", requestAnimationFrame(() => {
|
|
1264
|
+
i.value = p;
|
|
1265
|
+
});
|
|
1266
|
+
}, z = (p) => {
|
|
1267
|
+
p.controller && p.controller.abort(), s("remove", p), t.value = u.value.filter((h) => h.id !== p.id);
|
|
1268
|
+
};
|
|
1269
|
+
return (p, h) => (v(), m("div", {
|
|
1270
|
+
role: "button",
|
|
1271
|
+
class: "ui-upload",
|
|
1272
|
+
tabindex: e.disabled ? -1 : 0,
|
|
1273
|
+
"aria-label": e.ariaLabel || "File upload area",
|
|
1274
|
+
"aria-describedby": o.value ? _(l) : void 0,
|
|
1275
|
+
"aria-busy": H.value ? "true" : void 0,
|
|
1276
|
+
"aria-disabled": e.disabled ? "true" : void 0,
|
|
1277
|
+
"data-disabled": e.disabled || void 0,
|
|
1278
|
+
"data-dragging": o.value || void 0,
|
|
1279
|
+
onClick: h[0] || (h[0] = (E) => !e.disabled && d()),
|
|
1280
|
+
onKeydown: [
|
|
1281
|
+
h[1] || (h[1] = ve(oe((E) => !e.disabled && d(), ["stop", "prevent"]), ["enter"])),
|
|
1282
|
+
h[2] || (h[2] = ve(oe((E) => !e.disabled && d(), ["prevent"]), ["space"]))
|
|
1283
|
+
],
|
|
1284
|
+
onDragover: h[3] || (h[3] = oe((E) => !e.disabled && C(), ["prevent"])),
|
|
1285
|
+
onDragleave: I,
|
|
1286
|
+
onDrop: h[4] || (h[4] = oe((E) => !e.disabled && R(E), ["prevent"]))
|
|
1287
|
+
}, [
|
|
1288
|
+
w("input", {
|
|
1289
|
+
type: "file",
|
|
1290
|
+
ref_key: "inputRef",
|
|
1291
|
+
ref: c,
|
|
1292
|
+
class: "ui-upload__input",
|
|
1293
|
+
multiple: e.multiple,
|
|
1294
|
+
accept: e.accept,
|
|
1295
|
+
disabled: e.disabled,
|
|
1296
|
+
onChange: y
|
|
1297
|
+
}, null, 40, Ha),
|
|
1298
|
+
e.multiple || !e.multiple && t.value.length === 0 ? j(p.$slots, "default", {
|
|
1299
|
+
key: 0,
|
|
1300
|
+
dragging: o.value
|
|
1301
|
+
}, () => [
|
|
1302
|
+
P(ie, {
|
|
1303
|
+
name: "upload",
|
|
1304
|
+
size: 32
|
|
1305
|
+
}),
|
|
1306
|
+
h[6] || (h[6] = w("p", null, "Drag and Drop files here", -1)),
|
|
1307
|
+
h[7] || (h[7] = w("span", null, "or", -1)),
|
|
1308
|
+
P(pe, {
|
|
1309
|
+
type: "button",
|
|
1310
|
+
class: "btn btn-outline"
|
|
1311
|
+
}, {
|
|
1312
|
+
default: G(() => [...h[5] || (h[5] = [
|
|
1313
|
+
me("Choose File", -1)
|
|
1314
|
+
])]),
|
|
1315
|
+
_: 1
|
|
1316
|
+
}),
|
|
1317
|
+
w("span", null, "Maximum size: " + U(g.value), 1)
|
|
1318
|
+
], !0) : K("", !0),
|
|
1319
|
+
u.value?.length ? (v(), m("ul", Va, [
|
|
1320
|
+
(v(!0), m(ae, null, de(u.value, (E) => (v(), m("li", {
|
|
1321
|
+
key: E.id,
|
|
1322
|
+
class: "ui-upload__item"
|
|
1323
|
+
}, [
|
|
1324
|
+
j(p.$slots, "file", {
|
|
1325
|
+
file: E,
|
|
1326
|
+
remove: () => z(E),
|
|
1327
|
+
cancel: () => f(E),
|
|
1328
|
+
retry: () => k(E)
|
|
1329
|
+
}, () => [
|
|
1330
|
+
w("div", _a, [
|
|
1331
|
+
w("span", Ra, U(E.file.name), 1),
|
|
1332
|
+
w("span", Ba, U(q(E.file.size)), 1)
|
|
1333
|
+
]),
|
|
1334
|
+
E.status === "uploading" ? (v(), m("div", Ta, [
|
|
1335
|
+
w("span", Aa, U(E.progress) + "% ", 1),
|
|
1336
|
+
w("progress", {
|
|
1337
|
+
class: "ui-upload__progress",
|
|
1338
|
+
value: E.progress,
|
|
1339
|
+
max: "100",
|
|
1340
|
+
"aria-label": `Upload progress for ${E.file.name}`
|
|
1341
|
+
}, null, 8, Sa)
|
|
1342
|
+
])) : K("", !0),
|
|
1343
|
+
E.status === "success" ? (v(), m("span", Za, " Uploaded successful ")) : K("", !0),
|
|
1344
|
+
E.status === "error" ? (v(), m("span", Ea, U(E.error || "Upload failed"), 1)) : K("", !0),
|
|
1345
|
+
E.status === "canceled" ? (v(), m("span", Da, " Upload canceled ")) : K("", !0),
|
|
1346
|
+
w("div", Oa, [
|
|
1347
|
+
E.status === "uploading" ? (v(), J(pe, {
|
|
1348
|
+
key: 0,
|
|
1349
|
+
type: "button",
|
|
1350
|
+
class: "btn-danger btn-xs",
|
|
1351
|
+
onClick: oe((X) => f(E), ["stop"])
|
|
1352
|
+
}, {
|
|
1353
|
+
default: G(() => [...h[8] || (h[8] = [
|
|
1354
|
+
me(" Cancel ", -1)
|
|
1355
|
+
])]),
|
|
1356
|
+
_: 1
|
|
1357
|
+
}, 8, ["onClick"])) : K("", !0),
|
|
1358
|
+
E.status === "error" || E.status === "canceled" ? (v(), J(pe, {
|
|
1359
|
+
key: 1,
|
|
1360
|
+
type: "button",
|
|
1361
|
+
class: "btn-info btn-xs",
|
|
1362
|
+
onClick: oe((X) => k(E), ["stop"])
|
|
1363
|
+
}, {
|
|
1364
|
+
default: G(() => [...h[9] || (h[9] = [
|
|
1365
|
+
me(" Retry ", -1)
|
|
1366
|
+
])]),
|
|
1367
|
+
_: 1
|
|
1368
|
+
}, 8, ["onClick"])) : K("", !0),
|
|
1369
|
+
E.status !== "uploading" ? (v(), J(pe, {
|
|
1370
|
+
key: 2,
|
|
1371
|
+
type: "button",
|
|
1372
|
+
class: "btn-outline btn-xs",
|
|
1373
|
+
onClick: oe((X) => z(E), ["stop"]),
|
|
1374
|
+
"aria-label": "Remove file"
|
|
1375
|
+
}, {
|
|
1376
|
+
default: G(() => [...h[10] || (h[10] = [
|
|
1377
|
+
me(" Remove ", -1)
|
|
1378
|
+
])]),
|
|
1379
|
+
_: 1
|
|
1380
|
+
}, 8, ["onClick"])) : K("", !0)
|
|
1381
|
+
])
|
|
1382
|
+
], !0)
|
|
1383
|
+
]))), 128))
|
|
1384
|
+
])) : K("", !0),
|
|
1385
|
+
w("div", Na, U(i.value), 1),
|
|
1386
|
+
w("p", {
|
|
1387
|
+
id: _(l),
|
|
1388
|
+
class: "sr-only"
|
|
1389
|
+
}, " Drop files to upload ", 8, qa)
|
|
1390
|
+
], 40, xa));
|
|
1391
|
+
}
|
|
1392
|
+
}), Ye = /* @__PURE__ */ W(za, [["__scopeId", "data-v-041ff337"]]);
|
|
1393
|
+
Ye.install = (e) => {
|
|
1394
|
+
e.component("Upload", Ye);
|
|
1395
|
+
};
|
|
1396
|
+
const Fa = (e) => {
|
|
1397
|
+
const a = () => e(), t = () => e();
|
|
1398
|
+
return window.addEventListener("scroll", a, !0), window.addEventListener("resize", t), () => {
|
|
1399
|
+
window.removeEventListener("scroll", a, !0), window.removeEventListener("resize", t);
|
|
1400
|
+
};
|
|
1401
|
+
}, Ka = ["aria-describedby", "aria-disabled", "aria-expanded"], Pa = ["aria-hidden", "data-placement"], Ua = 8, ja = 6, Wa = /* @__PURE__ */ T({
|
|
1402
|
+
__name: "Tooltip",
|
|
1403
|
+
props: {
|
|
1404
|
+
content: {},
|
|
1405
|
+
placement: { default: "top" },
|
|
1406
|
+
delay: { default: 0 },
|
|
1407
|
+
disabled: { type: Boolean, default: !1 }
|
|
1408
|
+
},
|
|
1409
|
+
setup(e) {
|
|
1410
|
+
const a = e, t = Ua + ja, n = b(!1), s = `tooltip-${ue()}`, r = b(null), i = b(null), o = b({});
|
|
1411
|
+
let l = null, c = null, u = null;
|
|
1412
|
+
const g = () => {
|
|
1413
|
+
a.disabled || (l && (clearTimeout(l), l = null), a.delay ? l = window.setTimeout(() => {
|
|
1414
|
+
n.value = !0, l = null;
|
|
1415
|
+
}, a.delay) : n.value = !0);
|
|
1416
|
+
}, $ = () => {
|
|
1417
|
+
l && (clearTimeout(l), l = null), n.value = !1;
|
|
1418
|
+
}, H = () => {
|
|
1419
|
+
if (!r.value || !i.value) return {};
|
|
1420
|
+
const C = r.value.getBoundingClientRect(), I = i.value.getBoundingClientRect(), R = {
|
|
1421
|
+
position: "fixed"
|
|
1422
|
+
};
|
|
1423
|
+
switch (a.placement) {
|
|
1424
|
+
case "top":
|
|
1425
|
+
R.left = `${C.left + C.width / 2 - I.width / 2}px`, R.top = `${C.top - I.height - t}px`;
|
|
1426
|
+
break;
|
|
1427
|
+
case "bottom":
|
|
1428
|
+
R.left = `${C.left + C.width / 2 - I.width / 2}px`, R.top = `${C.bottom + t}px`;
|
|
1429
|
+
break;
|
|
1430
|
+
case "left":
|
|
1431
|
+
R.left = `${C.left - I.width - t}px`, R.top = `${C.top + C.height / 2 - I.height / 2}px`;
|
|
1432
|
+
break;
|
|
1433
|
+
case "right":
|
|
1434
|
+
R.left = `${C.right + t}px`, R.top = `${C.top + C.height / 2 - I.height / 2}px`;
|
|
1435
|
+
break;
|
|
1436
|
+
}
|
|
1437
|
+
return R;
|
|
1438
|
+
}, d = () => {
|
|
1439
|
+
o.value = H();
|
|
1440
|
+
};
|
|
1441
|
+
return Y(n, async (C) => {
|
|
1442
|
+
if (!C) {
|
|
1443
|
+
c?.(), c = null, u?.disconnect(), u = null;
|
|
1444
|
+
return;
|
|
1445
|
+
}
|
|
1446
|
+
await Me(), d(), c = Fa(d), u = new ResizeObserver(d), i.value && u.observe(i.value), r.value && u.observe(r.value);
|
|
1447
|
+
}), Ve(() => {
|
|
1448
|
+
c?.(), u?.disconnect();
|
|
1449
|
+
}), (C, I) => (v(), m(ae, null, [
|
|
1450
|
+
w("span", {
|
|
1451
|
+
ref_key: "triggerRef",
|
|
1452
|
+
ref: r,
|
|
1453
|
+
class: "tooltip-trigger",
|
|
1454
|
+
"aria-describedby": n.value ? s : void 0,
|
|
1455
|
+
"aria-disabled": e.disabled || void 0,
|
|
1456
|
+
"aria-expanded": n.value || void 0,
|
|
1457
|
+
onMouseenter: g,
|
|
1458
|
+
onMouseleave: $,
|
|
1459
|
+
onFocus: g,
|
|
1460
|
+
onBlur: $,
|
|
1461
|
+
onKeydown: ve($, ["esc"])
|
|
1462
|
+
}, [
|
|
1463
|
+
j(C.$slots, "default", {}, void 0, !0)
|
|
1464
|
+
], 40, Ka),
|
|
1465
|
+
(v(), J(_e, { to: "body" }, [
|
|
1466
|
+
P(Ie, { name: "tooltip-fade" }, {
|
|
1467
|
+
default: G(() => [
|
|
1468
|
+
n.value ? (v(), m("div", {
|
|
1469
|
+
key: 0,
|
|
1470
|
+
ref_key: "tooltipRef",
|
|
1471
|
+
ref: i,
|
|
1472
|
+
id: s,
|
|
1473
|
+
class: "tooltip-content",
|
|
1474
|
+
role: "tooltip",
|
|
1475
|
+
"aria-live": "polite",
|
|
1476
|
+
"aria-hidden": !n.value,
|
|
1477
|
+
"data-placement": a.placement,
|
|
1478
|
+
style: be(o.value)
|
|
1479
|
+
}, [
|
|
1480
|
+
I[0] || (I[0] = w("div", { class: "tooltip-arrow" }, null, -1)),
|
|
1481
|
+
j(C.$slots, "content", {}, () => [
|
|
1482
|
+
me(U(e.content), 1)
|
|
1483
|
+
], !0)
|
|
1484
|
+
], 12, Pa)) : K("", !0)
|
|
1485
|
+
]),
|
|
1486
|
+
_: 3
|
|
1487
|
+
})
|
|
1488
|
+
]))
|
|
1489
|
+
], 64));
|
|
1490
|
+
}
|
|
1491
|
+
}), Qe = /* @__PURE__ */ W(Wa, [["__scopeId", "data-v-c489ef7b"]]);
|
|
1492
|
+
Qe.install = (e) => {
|
|
1493
|
+
e.component("Tooltip", Qe);
|
|
1494
|
+
};
|
|
1495
|
+
const Xa = {
|
|
1496
|
+
key: 0,
|
|
1497
|
+
class: "ui-tag__icon"
|
|
1498
|
+
}, Ga = { class: "ui-tag__label" }, Ja = ["aria-label"], Ya = /* @__PURE__ */ T({
|
|
1499
|
+
__name: "Tag",
|
|
1500
|
+
props: {
|
|
1501
|
+
as: { default: "span" },
|
|
1502
|
+
variant: { default: "default" },
|
|
1503
|
+
size: { default: "md" },
|
|
1504
|
+
clickable: { type: Boolean, default: !1 },
|
|
1505
|
+
removable: { type: Boolean, default: !1 },
|
|
1506
|
+
disabled: { type: Boolean },
|
|
1507
|
+
textContent: { default: "tag" }
|
|
1508
|
+
},
|
|
1509
|
+
emits: ["click", "remove"],
|
|
1510
|
+
setup(e, { emit: a }) {
|
|
1511
|
+
const t = e, n = a, s = b(), r = L(() => t.clickable || t.as === "button" || t.as === "a"), i = L(() => [
|
|
1512
|
+
`ui-tag--${t.variant}`,
|
|
1513
|
+
`ui-tag--${t.size}`,
|
|
1514
|
+
{
|
|
1515
|
+
"is-clickable": t.clickable,
|
|
1516
|
+
"is-removable": t.removable
|
|
1517
|
+
}
|
|
1518
|
+
]), o = L(() => t.clickable && t.as !== "button" && t.as !== "a"), l = (u) => {
|
|
1519
|
+
t.disabled || !r.value || n("click", u);
|
|
1520
|
+
}, c = () => n("remove");
|
|
1521
|
+
return (u, g) => (v(), J(xe(e.as), {
|
|
1522
|
+
ref_key: "rootRef",
|
|
1523
|
+
ref: s,
|
|
1524
|
+
class: re(["ui-tag", i.value]),
|
|
1525
|
+
"aria-disabled": e.disabled || void 0,
|
|
1526
|
+
tabindex: e.disabled ? -1 : o.value ? 0 : void 0,
|
|
1527
|
+
role: o.value ? "button" : void 0,
|
|
1528
|
+
onClick: l,
|
|
1529
|
+
onKeydown: [
|
|
1530
|
+
g[0] || (g[0] = ve(oe(($) => !e.disabled && r.value && l($), ["prevent"]), ["enter"])),
|
|
1531
|
+
g[1] || (g[1] = ve(oe(($) => !e.disabled && r.value && l($), ["prevent"]), ["space"]))
|
|
1532
|
+
]
|
|
1533
|
+
}, {
|
|
1534
|
+
default: G(() => [
|
|
1535
|
+
u.$slots.icon ? (v(), m("span", Xa, [
|
|
1536
|
+
j(u.$slots, "icon", {}, void 0, !0)
|
|
1537
|
+
])) : K("", !0),
|
|
1538
|
+
w("span", Ga, [
|
|
1539
|
+
j(u.$slots, "default", {}, void 0, !0)
|
|
1540
|
+
]),
|
|
1541
|
+
e.removable ? (v(), m("button", {
|
|
1542
|
+
key: 1,
|
|
1543
|
+
class: "ui-tag__remove",
|
|
1544
|
+
type: "button",
|
|
1545
|
+
"aria-label": `Remove ${e.textContent}`,
|
|
1546
|
+
onClick: oe(c, ["stop"])
|
|
1547
|
+
}, [
|
|
1548
|
+
P(ie, {
|
|
1549
|
+
name: "close",
|
|
1550
|
+
size: 32
|
|
1551
|
+
})
|
|
1552
|
+
], 8, Ja)) : K("", !0)
|
|
1553
|
+
]),
|
|
1554
|
+
_: 3
|
|
1555
|
+
}, 40, ["class", "aria-disabled", "tabindex", "role"]));
|
|
1556
|
+
}
|
|
1557
|
+
}), Qa = /* @__PURE__ */ W(Ya, [["__scopeId", "data-v-ea48b943"]]), en = ["href", "aria-disabled", "tabindex", "target", "aria-current", "rel"], tn = /* @__PURE__ */ T({
|
|
1558
|
+
__name: "Link",
|
|
1559
|
+
props: {
|
|
1560
|
+
target: {},
|
|
1561
|
+
ariaCurrent: {},
|
|
1562
|
+
disabled: { type: Boolean },
|
|
1563
|
+
href: {}
|
|
1564
|
+
},
|
|
1565
|
+
emits: ["click"],
|
|
1566
|
+
setup(e, { emit: a }) {
|
|
1567
|
+
const t = e, n = a, s = (r) => {
|
|
1568
|
+
if (t.disabled || r.button !== 0) {
|
|
1569
|
+
r.preventDefault();
|
|
1570
|
+
return;
|
|
1571
|
+
}
|
|
1572
|
+
n("click", r);
|
|
1573
|
+
};
|
|
1574
|
+
return (r, i) => (v(), m("a", {
|
|
1575
|
+
class: "link",
|
|
1576
|
+
href: e.disabled ? void 0 : e.href,
|
|
1577
|
+
"aria-disabled": e.disabled ? "true" : void 0,
|
|
1578
|
+
tabindex: e.disabled ? -1 : 0,
|
|
1579
|
+
onClick: s,
|
|
1580
|
+
target: e.target,
|
|
1581
|
+
"aria-current": e.ariaCurrent,
|
|
1582
|
+
rel: e.target === "_blank" ? "noopener noreferrer" : void 0
|
|
1583
|
+
}, [
|
|
1584
|
+
j(r.$slots, "default", {}, void 0, !0)
|
|
1585
|
+
], 8, en));
|
|
1586
|
+
}
|
|
1587
|
+
}), kl = /* @__PURE__ */ W(tn, [["__scopeId", "data-v-0f5d7308"]]), ze = (e, a, t, n) => L(() => {
|
|
1588
|
+
const s = [];
|
|
1589
|
+
return e.invalid && e.errorMessage && s.push(t), a.hint && s.push(n), s.length > 0 ? s.join(" ") : void 0;
|
|
1590
|
+
}), Re = (e) => L(() => Object.keys(e).includes("required") && e.required !== "false" ? "true" : void 0), Be = (e) => L(() => e.invalid === !0 ? "true" : void 0), an = (e) => L(() => e.disabled === !0 ? "true" : void 0), Fe = (e, a, t) => {
|
|
1591
|
+
a && (a.classList.add("focused"), t("focus", e));
|
|
1592
|
+
}, Ke = (e, a, t, n) => {
|
|
1593
|
+
ke(a, t), t && (t?.classList.remove("focused"), n("blur", e));
|
|
1594
|
+
}, ke = (e, a) => {
|
|
1595
|
+
!e || !a || (e.value.length > 0 ? a.classList.add("filled") : a.classList.remove("filled"));
|
|
1596
|
+
}, nn = ["id"], Pe = /* @__PURE__ */ T({
|
|
1597
|
+
__name: "Hint",
|
|
1598
|
+
props: {
|
|
1599
|
+
hintId: {}
|
|
1600
|
+
},
|
|
1601
|
+
setup(e) {
|
|
1602
|
+
return (a, t) => a.$slots.default ? (v(), m("p", {
|
|
1603
|
+
key: 0,
|
|
1604
|
+
id: e.hintId,
|
|
1605
|
+
class: "visually-hidden"
|
|
1606
|
+
}, [
|
|
1607
|
+
j(a.$slots, "default")
|
|
1608
|
+
], 8, nn)) : K("", !0);
|
|
1609
|
+
}
|
|
1610
|
+
}), on = ["id"], Ue = /* @__PURE__ */ T({
|
|
1611
|
+
__name: "RequiredHint",
|
|
1612
|
+
props: {
|
|
1613
|
+
baseId: {},
|
|
1614
|
+
isRequired: {}
|
|
1615
|
+
},
|
|
1616
|
+
setup(e) {
|
|
1617
|
+
return (a, t) => e.isRequired ? (v(), m("p", {
|
|
1618
|
+
key: 0,
|
|
1619
|
+
id: `${e.baseId}-required-hint`,
|
|
1620
|
+
class: "visually-hidden"
|
|
1621
|
+
}, " Required field ", 8, on)) : K("", !0);
|
|
1622
|
+
}
|
|
1623
|
+
}), ln = ["id"], je = /* @__PURE__ */ T({
|
|
1624
|
+
__name: "ErrorMessage",
|
|
1625
|
+
props: {
|
|
1626
|
+
errorId: {},
|
|
1627
|
+
invalid: {},
|
|
1628
|
+
errorMessage: {}
|
|
1629
|
+
},
|
|
1630
|
+
setup(e) {
|
|
1631
|
+
return (a, t) => e.invalid && e.errorMessage ? (v(), m("p", {
|
|
1632
|
+
key: 0,
|
|
1633
|
+
id: e.errorId,
|
|
1634
|
+
class: "error-text",
|
|
1635
|
+
role: "alert"
|
|
1636
|
+
}, U(e.errorMessage), 9, ln)) : K("", !0);
|
|
1637
|
+
}
|
|
1638
|
+
}), sn = ["for"], rn = ["id", "type", "value", "required", "aria-invalid", "aria-errormessage", "aria-describedby"], un = /* @__PURE__ */ T({
|
|
1639
|
+
__name: "Input",
|
|
1640
|
+
props: /* @__PURE__ */ se({
|
|
1641
|
+
id: {},
|
|
1642
|
+
label: {},
|
|
1643
|
+
type: {},
|
|
1644
|
+
invalid: { type: Boolean },
|
|
1645
|
+
errorMessage: {}
|
|
1646
|
+
}, {
|
|
1647
|
+
modelValue: {
|
|
1648
|
+
required: !0
|
|
1649
|
+
},
|
|
1650
|
+
modelModifiers: {}
|
|
1651
|
+
}),
|
|
1652
|
+
emits: /* @__PURE__ */ se(["focus", "blur"], ["update:modelValue"]),
|
|
1653
|
+
setup(e, { emit: a }) {
|
|
1654
|
+
const t = Ce(e, "modelValue"), n = e, s = a, r = Ne(), i = ue(), o = `${i}-error`, l = `${i}-hint`, c = Re(r).value, u = Be(n).value, g = L(() => c ? `${l} ${i}-required-hint` : l), $ = L(() => n.invalid === !0 && n.errorMessage ? o : void 0), H = L(() => n.type === "password" ? R.value ? "text" : "password" : n.type), d = L(() => {
|
|
1655
|
+
const { type: Z, ...f } = r;
|
|
1656
|
+
return f;
|
|
1657
|
+
}), C = b(null), I = b(null), R = b(!1), y = () => R.value = !R.value, D = (Z) => {
|
|
1658
|
+
ke(C.value, I.value);
|
|
1659
|
+
const f = Z.target;
|
|
1660
|
+
t.value = n.type === "number" ? Number(f.value) : f.value;
|
|
1661
|
+
};
|
|
1662
|
+
return te(() => {
|
|
1663
|
+
ke(C.value, I.value);
|
|
1664
|
+
}), (Z, f) => (v(), m("div", {
|
|
1665
|
+
class: re(["input-box", { required: _(c), error: _(u) }]),
|
|
1666
|
+
ref_key: "inputBoxRef",
|
|
1667
|
+
ref: I
|
|
1668
|
+
}, [
|
|
1669
|
+
w("label", {
|
|
1670
|
+
for: e.id,
|
|
1671
|
+
class: "label"
|
|
1672
|
+
}, U(e.label), 9, sn),
|
|
1673
|
+
w("input", we({
|
|
1674
|
+
id: e.id,
|
|
1675
|
+
type: H.value
|
|
1676
|
+
}, d.value, {
|
|
1677
|
+
class: "input",
|
|
1678
|
+
onInput: D,
|
|
1679
|
+
onFocus: f[0] || (f[0] = (k) => _(Fe)(k, I.value, s)),
|
|
1680
|
+
onBlur: f[1] || (f[1] = (k) => _(Ke)(k, C.value, I.value, s)),
|
|
1681
|
+
value: t.value,
|
|
1682
|
+
required: _(c),
|
|
1683
|
+
"aria-invalid": _(u),
|
|
1684
|
+
"aria-errormessage": $.value,
|
|
1685
|
+
"aria-describedby": _(ze)(Z.$props, Z.$slots, o, g.value).value,
|
|
1686
|
+
ref_key: "inputRef",
|
|
1687
|
+
ref: C
|
|
1688
|
+
}), null, 16, rn),
|
|
1689
|
+
P(Pe, { hintId: l }, {
|
|
1690
|
+
default: G(() => [
|
|
1691
|
+
j(Z.$slots, "hint", {}, void 0, !0)
|
|
1692
|
+
]),
|
|
1693
|
+
_: 3
|
|
1694
|
+
}),
|
|
1695
|
+
P(Ue, {
|
|
1696
|
+
baseId: _(i),
|
|
1697
|
+
isRequired: _(c)
|
|
1698
|
+
}, null, 8, ["baseId", "isRequired"]),
|
|
1699
|
+
P(je, {
|
|
1700
|
+
errorId: o,
|
|
1701
|
+
invalid: _(u),
|
|
1702
|
+
errorMessage: e.errorMessage
|
|
1703
|
+
}, null, 8, ["invalid", "errorMessage"]),
|
|
1704
|
+
e.type === "password" ? (v(), J(pe, we({ key: 0 }, Object.keys(Z.$attrs).includes("disabled") ? { disabled: !0 } : void 0, {
|
|
1705
|
+
type: "button",
|
|
1706
|
+
class: "btn-icon",
|
|
1707
|
+
onClick: y,
|
|
1708
|
+
"aria-label": R.value ? "Hide password" : "Show password"
|
|
1709
|
+
}), {
|
|
1710
|
+
default: G(() => [
|
|
1711
|
+
P(ie, {
|
|
1712
|
+
name: R.value ? "eyeOff" : "eye"
|
|
1713
|
+
}, null, 8, ["name"])
|
|
1714
|
+
]),
|
|
1715
|
+
_: 1
|
|
1716
|
+
}, 16, ["aria-label"])) : K("", !0)
|
|
1717
|
+
], 2));
|
|
1718
|
+
}
|
|
1719
|
+
}), wl = /* @__PURE__ */ W(un, [["__scopeId", "data-v-7a6dcf4f"]]), dn = ["data-size", "data-shape", "aria-label", "aria-busy"], cn = {
|
|
1720
|
+
key: 1,
|
|
1721
|
+
class: "ui-avatar__loading"
|
|
1722
|
+
}, vn = {
|
|
1723
|
+
key: 2,
|
|
1724
|
+
class: "ui-avatar__fallback",
|
|
1725
|
+
"aria-hidden": "true"
|
|
1726
|
+
}, fn = /* @__PURE__ */ T({
|
|
1727
|
+
__name: "Avatar",
|
|
1728
|
+
props: {
|
|
1729
|
+
src: {},
|
|
1730
|
+
alt: {},
|
|
1731
|
+
name: {},
|
|
1732
|
+
size: { default: "md" },
|
|
1733
|
+
shape: { default: "circle" }
|
|
1734
|
+
},
|
|
1735
|
+
setup(e) {
|
|
1736
|
+
const a = e, t = b("loading"), n = L(() => a.src && t.value !== "error"), s = L(() => a.name ? a.name.split(" ").map((l) => l[0]).slice(0, 2).join("").toUpperCase() : ""), r = L(() => a.alt ? a.alt : a.name ? a.name : "Avatar"), i = () => t.value = "loaded", o = () => t.value = "error";
|
|
1737
|
+
return Y(
|
|
1738
|
+
() => a.src,
|
|
1739
|
+
() => a.src && (t.value = "loading")
|
|
1740
|
+
), te(() => !a.src && (t.value = "error")), (l, c) => (v(), m("div", {
|
|
1741
|
+
class: "ui-avatar",
|
|
1742
|
+
"data-size": e.size,
|
|
1743
|
+
"data-shape": e.shape,
|
|
1744
|
+
"aria-label": n.value ? void 0 : r.value,
|
|
1745
|
+
"aria-busy": t.value === "loading" || void 0
|
|
1746
|
+
}, [
|
|
1747
|
+
n.value ? (v(), J($e, {
|
|
1748
|
+
key: 0,
|
|
1749
|
+
src: e.src,
|
|
1750
|
+
alt: e.alt ?? "",
|
|
1751
|
+
class: "ui-avatar__img",
|
|
1752
|
+
onLoad: i,
|
|
1753
|
+
onError: o
|
|
1754
|
+
}, null, 8, ["src", "alt"])) : t.value === "loading" ? (v(), m("div", cn)) : (v(), m("div", vn, [
|
|
1755
|
+
j(l.$slots, "default", {}, () => [
|
|
1756
|
+
me(U(s.value), 1)
|
|
1757
|
+
], !0)
|
|
1758
|
+
]))
|
|
1759
|
+
], 8, dn));
|
|
1760
|
+
}
|
|
1761
|
+
}), Ll = /* @__PURE__ */ W(fn, [["__scopeId", "data-v-e36c822a"]]), mn = ["id", "aria-expanded", "aria-invalid", "aria-labelledby", "aria-required", "aria-describedby", "aria-activedescendant", "aria-disabled", "disabled"], pn = ["innerHTML"], bn = ["id", "aria-disabled", "aria-selected", "onClick"], gn = ["innerHTML"], Cn = /* @__PURE__ */ T({
|
|
1762
|
+
__name: "Select",
|
|
1763
|
+
props: /* @__PURE__ */ se({
|
|
1764
|
+
id: {},
|
|
1765
|
+
options: {},
|
|
1766
|
+
label: {},
|
|
1767
|
+
invalid: { type: Boolean },
|
|
1768
|
+
errorMessage: {}
|
|
1769
|
+
}, {
|
|
1770
|
+
modelValue: { required: !0 },
|
|
1771
|
+
modelModifiers: {}
|
|
1772
|
+
}),
|
|
1773
|
+
emits: /* @__PURE__ */ se(["focus", "blur", "change", "click"], ["update:modelValue"]),
|
|
1774
|
+
setup(e, { emit: a }) {
|
|
1775
|
+
const t = Ce(e, "modelValue"), n = e, s = a, r = b(!1);
|
|
1776
|
+
Y(r, (x) => {
|
|
1777
|
+
x ? document.addEventListener("mousedown", X) : document.removeEventListener("mousedown", X);
|
|
1778
|
+
});
|
|
1779
|
+
const i = Ne(), o = b(null), l = L(() => n.id ?? ue()), c = `${l.value}-label`, u = `${l.value}-listbox`, g = `${l.value}-error`, $ = `${l.value}-hint`, H = `${l.value}-value`, d = b(null), C = b(null), I = L(() => d.value !== null ? `${u}-option-${d.value}` : void 0), R = Be(n).value, y = Re(i).value, D = L(() => y ? `${$} ${l.value}-required-hint` : $), Z = L(() => r.value && I.value ? I.value : void 0), f = L(() => C.value !== null ? n.options[C.value]?.value : ""), k = (x) => {
|
|
1780
|
+
const S = o.value;
|
|
1781
|
+
S && (S.classList.add("focused"), s("focus", x));
|
|
1782
|
+
}, V = (x) => {
|
|
1783
|
+
const S = x.relatedTarget, Q = o.value;
|
|
1784
|
+
!Q || Q?.contains(S) || (Q.classList.remove("focused"), r.value = !1, s("blur", x));
|
|
1785
|
+
}, q = (x) => {
|
|
1786
|
+
r.value = !r.value, r.value && t.value.toString().length > 0 && (d.value = d.value ?? n.options.findIndex((S) => !S.disabled)), !(!n.options || n.options.length === 0) && s("click", x);
|
|
1787
|
+
}, A = (x, S) => {
|
|
1788
|
+
const Q = o.value;
|
|
1789
|
+
!Q || x.disabled || (C.value = S, d.value = S, x && x.key && x.key.toString().length > 0 ? Q.classList.add("filled") : Q.classList.remove("filled"), t.value = x.key, s("change", x.key));
|
|
1790
|
+
}, z = (x) => {
|
|
1791
|
+
if (!r.value && ["ArrowDown", "ArrowUp"].includes(x.key)) {
|
|
1792
|
+
r.value = !0, d.value = d.value ?? n.options.findIndex((S) => !S.disabled), x.preventDefault();
|
|
1793
|
+
return;
|
|
1794
|
+
}
|
|
1795
|
+
if (r.value) {
|
|
1796
|
+
if (x.key === "ArrowDown" && (p(1), x.preventDefault()), x.key === "ArrowUp" && (p(-1), x.preventDefault()), x.key === "Home") {
|
|
1797
|
+
const S = h();
|
|
1798
|
+
S >= 0 && (d.value = S), x.preventDefault();
|
|
1799
|
+
}
|
|
1800
|
+
if (x.key === "End") {
|
|
1801
|
+
const S = E();
|
|
1802
|
+
S >= 0 && (d.value = S), x.preventDefault();
|
|
1803
|
+
}
|
|
1804
|
+
if (x.key === "Enter" || x.key === " ") {
|
|
1805
|
+
if (d.value === null) return;
|
|
1806
|
+
const S = n.options[d.value];
|
|
1807
|
+
if (!S || S.disabled) return;
|
|
1808
|
+
A(S, d.value), r.value = !1, x.preventDefault();
|
|
1809
|
+
}
|
|
1810
|
+
x.key === "Escape" && (r.value = !1);
|
|
1811
|
+
}
|
|
1812
|
+
}, p = (x) => {
|
|
1813
|
+
if (d.value === null) return;
|
|
1814
|
+
let S = d.value;
|
|
1815
|
+
do
|
|
1816
|
+
S += x;
|
|
1817
|
+
while (S >= 0 && S < n.options.length && n.options[S]?.disabled);
|
|
1818
|
+
S >= 0 && S < n.options.length && (d.value = S);
|
|
1819
|
+
}, h = () => n.options.findIndex((x) => !x.disabled), E = () => [...n.options].reverse().findIndex((x) => !x.disabled) >= 0 ? n.options.length - 1 - [...n.options].reverse().findIndex((x) => !x.disabled) : -1, X = (x) => {
|
|
1820
|
+
const S = o.value;
|
|
1821
|
+
!S || S.contains(x.target) || (r.value = !1);
|
|
1822
|
+
};
|
|
1823
|
+
return Ve(() => {
|
|
1824
|
+
document.removeEventListener("mousedown", X);
|
|
1825
|
+
}), te(() => {
|
|
1826
|
+
if (t.value.toString().length > 0) {
|
|
1827
|
+
if (!n.options || n.options.length === 0) return;
|
|
1828
|
+
const x = n.options.findIndex((S) => S.key === t.value);
|
|
1829
|
+
if (x > -1) {
|
|
1830
|
+
C.value = x, d.value = x;
|
|
1831
|
+
const S = o.value;
|
|
1832
|
+
S && S.classList.add("filled");
|
|
1833
|
+
}
|
|
1834
|
+
}
|
|
1835
|
+
}), (x, S) => (v(), m("div", {
|
|
1836
|
+
ref_key: "selectRef",
|
|
1837
|
+
ref: o,
|
|
1838
|
+
class: re(["select-box", { required: Object.keys(x.$attrs).includes("required"), error: e.invalid }])
|
|
1839
|
+
}, [
|
|
1840
|
+
w("button", {
|
|
1841
|
+
id: l.value,
|
|
1842
|
+
class: "select-btn",
|
|
1843
|
+
role: "combobox",
|
|
1844
|
+
type: "button",
|
|
1845
|
+
"aria-haspopup": "listbox",
|
|
1846
|
+
"aria-expanded": r.value,
|
|
1847
|
+
"aria-controls": u,
|
|
1848
|
+
"aria-invalid": _(R),
|
|
1849
|
+
"aria-labelledby": `${c} ${H}`,
|
|
1850
|
+
"aria-required": _(y),
|
|
1851
|
+
"aria-describedby": _(ze)(x.$props, x.$slots, g, D.value).value,
|
|
1852
|
+
"aria-activedescendant": Z.value,
|
|
1853
|
+
"aria-disabled": x.$attrs.disabled ? "true" : void 0,
|
|
1854
|
+
disabled: x.$attrs.disabled ? "true" : void 0,
|
|
1855
|
+
onBlur: V,
|
|
1856
|
+
onFocus: k,
|
|
1857
|
+
onClick: q,
|
|
1858
|
+
onKeydown: z,
|
|
1859
|
+
ref: "buttonRef"
|
|
1860
|
+
}, [
|
|
1861
|
+
w("span", {
|
|
1862
|
+
id: c,
|
|
1863
|
+
class: "label"
|
|
1864
|
+
}, U(e.label), 1),
|
|
1865
|
+
w("span", {
|
|
1866
|
+
id: H,
|
|
1867
|
+
class: "selected-object",
|
|
1868
|
+
"aria-live": "polite",
|
|
1869
|
+
"aria-atomic": "true",
|
|
1870
|
+
innerHTML: f.value
|
|
1871
|
+
}, null, 8, pn),
|
|
1872
|
+
P(ie, {
|
|
1873
|
+
name: "directionDown",
|
|
1874
|
+
"aria-hidden": "true"
|
|
1875
|
+
})
|
|
1876
|
+
], 40, mn),
|
|
1877
|
+
P(Ie, { name: "select" }, {
|
|
1878
|
+
default: G(() => [
|
|
1879
|
+
He(w("ul", {
|
|
1880
|
+
id: u,
|
|
1881
|
+
role: "listbox",
|
|
1882
|
+
class: "options"
|
|
1883
|
+
}, [
|
|
1884
|
+
(v(!0), m(ae, null, de(e.options, (Q, fe) => (v(), m("li", {
|
|
1885
|
+
id: `${u}-option-${fe}`,
|
|
1886
|
+
key: fe,
|
|
1887
|
+
role: "option",
|
|
1888
|
+
class: re(["option", { "focus-visible": d.value === fe }]),
|
|
1889
|
+
"aria-disabled": Q.disabled,
|
|
1890
|
+
"aria-selected": C.value === fe,
|
|
1891
|
+
onClick: (M) => !Q.disabled && A(Q, fe)
|
|
1892
|
+
}, [
|
|
1893
|
+
w("div", {
|
|
1894
|
+
class: "option-value",
|
|
1895
|
+
innerHTML: Q.value
|
|
1896
|
+
}, null, 8, gn)
|
|
1897
|
+
], 10, bn))), 128))
|
|
1898
|
+
], 512), [
|
|
1899
|
+
[Oe, r.value]
|
|
1900
|
+
])
|
|
1901
|
+
]),
|
|
1902
|
+
_: 1
|
|
1903
|
+
}),
|
|
1904
|
+
P(Pe, { hintId: $ }, {
|
|
1905
|
+
default: G(() => [
|
|
1906
|
+
j(x.$slots, "hint", {}, void 0, !0)
|
|
1907
|
+
]),
|
|
1908
|
+
_: 3
|
|
1909
|
+
}),
|
|
1910
|
+
P(Ue, {
|
|
1911
|
+
baseId: l.value,
|
|
1912
|
+
isRequired: _(y)
|
|
1913
|
+
}, null, 8, ["baseId", "isRequired"]),
|
|
1914
|
+
P(je, {
|
|
1915
|
+
errorId: g,
|
|
1916
|
+
invalid: _(R),
|
|
1917
|
+
errorMessage: e.errorMessage
|
|
1918
|
+
}, null, 8, ["invalid", "errorMessage"])
|
|
1919
|
+
], 2));
|
|
1920
|
+
}
|
|
1921
|
+
}), Ml = /* @__PURE__ */ W(Cn, [["__scopeId", "data-v-a3ab3a6e"]]), hn = ["aria-label"], yn = ["onKeydown"], kn = {
|
|
1922
|
+
key: 1,
|
|
1923
|
+
class: "rs-gallery-thumbs"
|
|
1924
|
+
}, wn = ["aria-selected"], Ln = ["onClick"], Mn = /* @__PURE__ */ T({
|
|
1925
|
+
__name: "GalleryCarousel",
|
|
1926
|
+
props: /* @__PURE__ */ se({
|
|
1927
|
+
images: {},
|
|
1928
|
+
layout: { default: "carousel" },
|
|
1929
|
+
showThumbnails: { type: Boolean, default: !0 },
|
|
1930
|
+
loop: { type: Boolean, default: !0 },
|
|
1931
|
+
transform: { type: Boolean },
|
|
1932
|
+
transformThumbnails: { type: Boolean },
|
|
1933
|
+
ariaLabel: {},
|
|
1934
|
+
columns: {},
|
|
1935
|
+
gap: {}
|
|
1936
|
+
}, {
|
|
1937
|
+
modelValue: {
|
|
1938
|
+
type: Number,
|
|
1939
|
+
default: 0
|
|
1940
|
+
},
|
|
1941
|
+
modelModifiers: {}
|
|
1942
|
+
}),
|
|
1943
|
+
emits: /* @__PURE__ */ se(["change"], ["update:modelValue"]),
|
|
1944
|
+
setup(e, { emit: a }) {
|
|
1945
|
+
const t = Ce(e, "modelValue"), n = e, s = a, r = b([]), i = b("next"), o = b(null), l = `gallery-caption-${ue()}`, c = b(null), u = L(() => t.value), g = L(() => n.images[u.value]), $ = (y, D) => {
|
|
1946
|
+
y && (r.value[D] = y);
|
|
1947
|
+
}, H = (y) => {
|
|
1948
|
+
y !== u.value && (i.value = y > u.value ? "next" : "prev", t.value = y, s("change", y));
|
|
1949
|
+
}, d = () => {
|
|
1950
|
+
if (u.value === n.images.length - 1) {
|
|
1951
|
+
n.loop && H(0);
|
|
1952
|
+
return;
|
|
1953
|
+
}
|
|
1954
|
+
H(u.value + 1);
|
|
1955
|
+
}, C = () => {
|
|
1956
|
+
if (u.value === 0) {
|
|
1957
|
+
n.loop && H(n.images.length - 1);
|
|
1958
|
+
return;
|
|
1959
|
+
}
|
|
1960
|
+
H(u.value - 1);
|
|
1961
|
+
}, I = () => {
|
|
1962
|
+
c.value && (o.value = c.value.offsetHeight);
|
|
1963
|
+
}, R = () => {
|
|
1964
|
+
o.value = null;
|
|
1965
|
+
};
|
|
1966
|
+
return Y(u, async (y) => {
|
|
1967
|
+
await Me();
|
|
1968
|
+
const D = r.value[y];
|
|
1969
|
+
D && D.scrollIntoView({
|
|
1970
|
+
behavior: window.matchMedia("(prefers-reduced-motion: reduce)").matches ? "auto" : "smooth",
|
|
1971
|
+
inline: "center",
|
|
1972
|
+
block: "nearest"
|
|
1973
|
+
});
|
|
1974
|
+
}), Y(() => n.images, () => {
|
|
1975
|
+
r.value = [];
|
|
1976
|
+
}), (y, D) => (v(), m("div", {
|
|
1977
|
+
role: "region",
|
|
1978
|
+
class: "rs-gallery",
|
|
1979
|
+
"aria-roledescription": "carousel",
|
|
1980
|
+
"aria-label": e.ariaLabel || "Image gallery",
|
|
1981
|
+
"aria-live": "polite",
|
|
1982
|
+
"aria-describedby": l
|
|
1983
|
+
}, [
|
|
1984
|
+
w("div", {
|
|
1985
|
+
ref_key: "previewRef",
|
|
1986
|
+
ref: c,
|
|
1987
|
+
tabindex: "0",
|
|
1988
|
+
class: "rs-gallery-review",
|
|
1989
|
+
style: be(o.value ? { height: `${o.value}px` } : void 0),
|
|
1990
|
+
onKeydown: [
|
|
1991
|
+
ve(oe(C, ["prevent"]), ["left"]),
|
|
1992
|
+
ve(oe(d, ["prevent"]), ["right"])
|
|
1993
|
+
]
|
|
1994
|
+
}, [
|
|
1995
|
+
P(Ie, {
|
|
1996
|
+
name: `rs-gallery-slide-${i.value}`,
|
|
1997
|
+
mode: "out-in",
|
|
1998
|
+
onBeforeLeave: I,
|
|
1999
|
+
onAfterEnter: R
|
|
2000
|
+
}, {
|
|
2001
|
+
default: G(() => [
|
|
2002
|
+
g.value ? (v(), J($e, {
|
|
2003
|
+
key: g.value.src,
|
|
2004
|
+
src: g.value.src,
|
|
2005
|
+
alt: g.value.alt || "",
|
|
2006
|
+
transform: e.transform
|
|
2007
|
+
}, null, 8, ["src", "alt", "transform"])) : K("", !0)
|
|
2008
|
+
]),
|
|
2009
|
+
_: 1
|
|
2010
|
+
}, 8, ["name"]),
|
|
2011
|
+
j(y.$slots, "overlay", {
|
|
2012
|
+
image: g.value,
|
|
2013
|
+
index: u.value
|
|
2014
|
+
}, void 0, !0)
|
|
2015
|
+
], 44, yn),
|
|
2016
|
+
g.value?.title ? (v(), m("p", {
|
|
2017
|
+
key: 0,
|
|
2018
|
+
id: l,
|
|
2019
|
+
class: "rs-gallery-caption"
|
|
2020
|
+
}, U(g.value.title), 1)) : K("", !0),
|
|
2021
|
+
e.showThumbnails ? (v(), m("ul", kn, [
|
|
2022
|
+
(v(!0), m(ae, null, de(e.images, (Z, f) => (v(), m("li", {
|
|
2023
|
+
key: Z.src,
|
|
2024
|
+
ref_for: !0,
|
|
2025
|
+
ref: (k) => $(k, f),
|
|
2026
|
+
"aria-selected": u.value === f
|
|
2027
|
+
}, [
|
|
2028
|
+
w("button", {
|
|
2029
|
+
type: "button",
|
|
2030
|
+
class: re(["rs-gallery-thumb", { active: u.value === f }]),
|
|
2031
|
+
onClick: (k) => H(f)
|
|
2032
|
+
}, [
|
|
2033
|
+
P($e, {
|
|
2034
|
+
src: Z.src,
|
|
2035
|
+
alt: `Select image ${f + 1}`,
|
|
2036
|
+
transform: e.transformThumbnails
|
|
2037
|
+
}, null, 8, ["src", "alt", "transform"])
|
|
2038
|
+
], 10, Ln)
|
|
2039
|
+
], 8, wn))), 128))
|
|
2040
|
+
])) : K("", !0)
|
|
2041
|
+
], 8, hn));
|
|
2042
|
+
}
|
|
2043
|
+
}), st = /* @__PURE__ */ W(Mn, [["__scopeId", "data-v-dcfacff6"]]), $n = ["aria-label"], In = ["onClick"], xn = /* @__PURE__ */ T({
|
|
2044
|
+
__name: "GalleryGrid",
|
|
2045
|
+
props: {
|
|
2046
|
+
images: {},
|
|
2047
|
+
layout: {},
|
|
2048
|
+
showThumbnails: { type: Boolean },
|
|
2049
|
+
loop: { type: Boolean },
|
|
2050
|
+
transform: { type: Boolean, default: !0 },
|
|
2051
|
+
transformThumbnails: { type: Boolean },
|
|
2052
|
+
ariaLabel: {},
|
|
2053
|
+
columns: { default: 3 },
|
|
2054
|
+
gap: {}
|
|
2055
|
+
},
|
|
2056
|
+
emits: ["change"],
|
|
2057
|
+
setup(e) {
|
|
2058
|
+
return (a, t) => (v(), m("div", {
|
|
2059
|
+
class: "rs-gallery-grid",
|
|
2060
|
+
style: be({ "--grid-columns": e.columns, "--grid-gap": e.gap }),
|
|
2061
|
+
role: "list",
|
|
2062
|
+
"aria-label": e.ariaLabel || "Image grid gallery"
|
|
2063
|
+
}, [
|
|
2064
|
+
(v(!0), m(ae, null, de(e.images, (n, s) => (v(), m("button", {
|
|
2065
|
+
key: n.src,
|
|
2066
|
+
type: "button",
|
|
2067
|
+
class: "grid-item",
|
|
2068
|
+
onClick: (r) => a.$emit("change", s)
|
|
2069
|
+
}, [
|
|
2070
|
+
P($e, {
|
|
2071
|
+
src: n.src,
|
|
2072
|
+
alt: n.alt || "",
|
|
2073
|
+
transform: e.transform
|
|
2074
|
+
}, null, 8, ["src", "alt", "transform"])
|
|
2075
|
+
], 8, In))), 128))
|
|
2076
|
+
], 12, $n));
|
|
2077
|
+
}
|
|
2078
|
+
}), rt = /* @__PURE__ */ W(xn, [["__scopeId", "data-v-17067a4b"]]), Te = /* @__PURE__ */ Symbol("ModalContext");
|
|
2079
|
+
let Ze = 0, et = 0, Ee = null;
|
|
2080
|
+
const De = T({
|
|
2081
|
+
name: "Modal",
|
|
2082
|
+
props: {
|
|
2083
|
+
motion: {
|
|
2084
|
+
type: String,
|
|
2085
|
+
default: "fade"
|
|
2086
|
+
},
|
|
2087
|
+
size: {
|
|
2088
|
+
type: String,
|
|
2089
|
+
default: "md"
|
|
2090
|
+
},
|
|
2091
|
+
open: { type: Boolean, default: !1 },
|
|
2092
|
+
closeOnOverlay: { type: Boolean, default: !0 }
|
|
2093
|
+
},
|
|
2094
|
+
emits: ["update:open", "opened", "closed"],
|
|
2095
|
+
setup(e, { emit: a, slots: t }) {
|
|
2096
|
+
const n = b(!1), s = b(e.open), r = ue(), i = `modal-title-${r}`, o = `modal-desc-${r}`;
|
|
2097
|
+
Y(() => e.open, (g) => s.value = g), Y(s, (g) => {
|
|
2098
|
+
a("update:open", g), a(g ? "opened" : "closed");
|
|
2099
|
+
});
|
|
2100
|
+
const l = () => s.value = !1, c = L(() => e.motion), u = L(() => e.size);
|
|
2101
|
+
return ge(Te, {
|
|
2102
|
+
isOpen: s,
|
|
2103
|
+
motion: c,
|
|
2104
|
+
size: u,
|
|
2105
|
+
close: l,
|
|
2106
|
+
closeOnOverlay: e.closeOnOverlay,
|
|
2107
|
+
labelId: i,
|
|
2108
|
+
descriptionId: o,
|
|
2109
|
+
hasTitle: n
|
|
2110
|
+
}), () => t.default?.();
|
|
2111
|
+
}
|
|
2112
|
+
}), it = T({
|
|
2113
|
+
name: "ModalContent",
|
|
2114
|
+
setup(e, { slots: a }) {
|
|
2115
|
+
const t = le(Te);
|
|
2116
|
+
if (!t) throw new Error("ModalContent components must be used inside <Modal>");
|
|
2117
|
+
const n = b(null), s = ++Ze, r = (u) => {
|
|
2118
|
+
u.key === "Escape" && s === Ze && t.close();
|
|
2119
|
+
};
|
|
2120
|
+
let i = null;
|
|
2121
|
+
const o = (u) => {
|
|
2122
|
+
const g = Array.from(
|
|
2123
|
+
u.querySelectorAll(
|
|
2124
|
+
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
2125
|
+
)
|
|
2126
|
+
).filter((C) => !C.hasAttribute("disabled"));
|
|
2127
|
+
if (g.length === 0) {
|
|
2128
|
+
u.setAttribute("tabindex", "-1"), u.focus();
|
|
2129
|
+
return;
|
|
2130
|
+
}
|
|
2131
|
+
const $ = g[0], H = g[g.length - 1], d = (C) => {
|
|
2132
|
+
C.key === "Tab" && (C.shiftKey && document.activeElement === $ ? (C.preventDefault(), H?.focus()) : !C.shiftKey && document.activeElement === H && (C.preventDefault(), $?.focus()));
|
|
2133
|
+
};
|
|
2134
|
+
u.addEventListener("keydown", d), $?.focus(), i = () => {
|
|
2135
|
+
u.removeEventListener("keydown", d), i = null;
|
|
2136
|
+
};
|
|
2137
|
+
}, l = () => {
|
|
2138
|
+
++et === 1 && (document.body.style.overflow = "hidden");
|
|
2139
|
+
}, c = () => {
|
|
2140
|
+
--et === 0 && (document.body.style.overflow = "");
|
|
2141
|
+
};
|
|
2142
|
+
return () => F(
|
|
2143
|
+
_e,
|
|
2144
|
+
{ to: "body" },
|
|
2145
|
+
F(
|
|
2146
|
+
Ie,
|
|
2147
|
+
{
|
|
2148
|
+
name: `modal-${t.motion.value}`,
|
|
2149
|
+
appear: !0,
|
|
2150
|
+
onEnter: () => {
|
|
2151
|
+
Ee = document.activeElement, l();
|
|
2152
|
+
},
|
|
2153
|
+
onAfterEnter: () => {
|
|
2154
|
+
n.value && (o(n.value), document.addEventListener("keydown", r));
|
|
2155
|
+
},
|
|
2156
|
+
onAfterLeave: () => {
|
|
2157
|
+
Ze--, document.removeEventListener("keydown", r), i?.(), c(), Ee?.focus(), Ee = null;
|
|
2158
|
+
}
|
|
2159
|
+
},
|
|
2160
|
+
{
|
|
2161
|
+
default: () => t.isOpen.value ? F(
|
|
2162
|
+
"div",
|
|
2163
|
+
{
|
|
2164
|
+
class: "modal-overlay",
|
|
2165
|
+
onClick: () => t.closeOnOverlay && t.close()
|
|
2166
|
+
},
|
|
2167
|
+
F(
|
|
2168
|
+
"div",
|
|
2169
|
+
{
|
|
2170
|
+
ref: n,
|
|
2171
|
+
role: "dialog",
|
|
2172
|
+
"aria-modal": "true",
|
|
2173
|
+
"aria-labelledby": t.labelId,
|
|
2174
|
+
"aria-describedby": t.descriptionId,
|
|
2175
|
+
class: ["modal-content", `modal--${t.size.value}`],
|
|
2176
|
+
onClick: (u) => u.stopPropagation()
|
|
2177
|
+
},
|
|
2178
|
+
a.default?.()
|
|
2179
|
+
)
|
|
2180
|
+
) : null
|
|
2181
|
+
}
|
|
2182
|
+
)
|
|
2183
|
+
);
|
|
2184
|
+
}
|
|
2185
|
+
}), ut = T({
|
|
2186
|
+
name: "ModalTitle",
|
|
2187
|
+
setup(e, { slots: a }) {
|
|
2188
|
+
const t = le(Te);
|
|
2189
|
+
if (!t) throw new Error("ModalTitle components must be used inside <Modal>");
|
|
2190
|
+
return t.hasTitle.value = !0, () => F("h2", { id: t.labelId }, a.default?.());
|
|
2191
|
+
}
|
|
2192
|
+
}), dt = T({
|
|
2193
|
+
name: "ModalHeader",
|
|
2194
|
+
setup(e, { slots: a }) {
|
|
2195
|
+
return () => F("div", { class: "modal-header" }, a.default?.());
|
|
2196
|
+
}
|
|
2197
|
+
}), ct = T({
|
|
2198
|
+
name: "ModalBody",
|
|
2199
|
+
setup(e, { slots: a }) {
|
|
2200
|
+
return () => F("div", { class: "modal-body" }, a.default?.());
|
|
2201
|
+
}
|
|
2202
|
+
}), $l = T({
|
|
2203
|
+
name: "ModalFooter",
|
|
2204
|
+
setup(e, { slots: a }) {
|
|
2205
|
+
return () => F("div", { class: "modal-footer" }, a.default?.());
|
|
2206
|
+
}
|
|
2207
|
+
}), vt = T({
|
|
2208
|
+
name: "ModalClose",
|
|
2209
|
+
setup() {
|
|
2210
|
+
const e = le(Te);
|
|
2211
|
+
if (!e) throw new Error("ModalClose components must be used inside <Modal>");
|
|
2212
|
+
return () => F(
|
|
2213
|
+
"button",
|
|
2214
|
+
{
|
|
2215
|
+
class: "modal-close",
|
|
2216
|
+
type: "button",
|
|
2217
|
+
"aria-label": "Close modal",
|
|
2218
|
+
onClick: e.close
|
|
2219
|
+
},
|
|
2220
|
+
F(ie, { name: "close", size: 32 })
|
|
2221
|
+
);
|
|
2222
|
+
}
|
|
2223
|
+
});
|
|
2224
|
+
Object.assign(De, {
|
|
2225
|
+
install(e) {
|
|
2226
|
+
e.component("Modal", De), e.component("ModalBody", ct), e.component("ModalTitle", ut), e.component("ModalClose", vt), e.component("ModalHeader", dt), e.component("ModalContent", it);
|
|
2227
|
+
}
|
|
2228
|
+
});
|
|
2229
|
+
const Hn = /* @__PURE__ */ T({
|
|
2230
|
+
__name: "GalleryGridWithLightbox",
|
|
2231
|
+
props: {
|
|
2232
|
+
images: {},
|
|
2233
|
+
layout: {},
|
|
2234
|
+
showThumbnails: { type: Boolean },
|
|
2235
|
+
loop: { type: Boolean },
|
|
2236
|
+
transform: { type: Boolean },
|
|
2237
|
+
transformThumbnails: { type: Boolean },
|
|
2238
|
+
ariaLabel: {},
|
|
2239
|
+
columns: {},
|
|
2240
|
+
gap: {}
|
|
2241
|
+
},
|
|
2242
|
+
emits: ["change"],
|
|
2243
|
+
setup(e) {
|
|
2244
|
+
const a = b(0), t = b(!1), n = (r) => {
|
|
2245
|
+
a.value = r, t.value = !0;
|
|
2246
|
+
}, s = () => t.value = !1;
|
|
2247
|
+
return (r, i) => (v(), m(ae, null, [
|
|
2248
|
+
P(rt, {
|
|
2249
|
+
images: e.images,
|
|
2250
|
+
onChange: n,
|
|
2251
|
+
"aria-label": e.ariaLabel,
|
|
2252
|
+
transform: e.transform
|
|
2253
|
+
}, null, 8, ["images", "aria-label", "transform"]),
|
|
2254
|
+
P(_(De), {
|
|
2255
|
+
open: t.value,
|
|
2256
|
+
"onUpdate:open": i[2] || (i[2] = (o) => t.value = o),
|
|
2257
|
+
motion: "fade",
|
|
2258
|
+
size: "xl"
|
|
2259
|
+
}, {
|
|
2260
|
+
default: G(() => [
|
|
2261
|
+
P(_(it), null, {
|
|
2262
|
+
default: G(() => [
|
|
2263
|
+
P(_(dt), null, {
|
|
2264
|
+
default: G(() => [
|
|
2265
|
+
P(_(ut), null, {
|
|
2266
|
+
default: G(() => [...i[3] || (i[3] = [
|
|
2267
|
+
me("Image Gallery", -1)
|
|
2268
|
+
])]),
|
|
2269
|
+
_: 1
|
|
2270
|
+
}),
|
|
2271
|
+
P(_(vt))
|
|
2272
|
+
]),
|
|
2273
|
+
_: 1
|
|
2274
|
+
}),
|
|
2275
|
+
P(_(ct), null, {
|
|
2276
|
+
default: G(() => [
|
|
2277
|
+
P(st, {
|
|
2278
|
+
modelValue: a.value,
|
|
2279
|
+
"onUpdate:modelValue": i[0] || (i[0] = (o) => a.value = o),
|
|
2280
|
+
images: e.images,
|
|
2281
|
+
onChange: i[1] || (i[1] = (o) => r.$emit("change", o)),
|
|
2282
|
+
onClose: s,
|
|
2283
|
+
"aria-label": e.ariaLabel,
|
|
2284
|
+
"transform-thumbnails": e.transform
|
|
2285
|
+
}, null, 8, ["modelValue", "images", "aria-label", "transform-thumbnails"])
|
|
2286
|
+
]),
|
|
2287
|
+
_: 1
|
|
2288
|
+
})
|
|
2289
|
+
]),
|
|
2290
|
+
_: 1
|
|
2291
|
+
})
|
|
2292
|
+
]),
|
|
2293
|
+
_: 1
|
|
2294
|
+
}, 8, ["open"])
|
|
2295
|
+
], 64));
|
|
2296
|
+
}
|
|
2297
|
+
}), Vn = { class: "rs-gallery-masonry" }, _n = /* @__PURE__ */ T({
|
|
2298
|
+
__name: "GalleryMasonry",
|
|
2299
|
+
props: {
|
|
2300
|
+
images: {},
|
|
2301
|
+
layout: {},
|
|
2302
|
+
showThumbnails: { type: Boolean },
|
|
2303
|
+
loop: { type: Boolean },
|
|
2304
|
+
transform: { type: Boolean, default: !0 },
|
|
2305
|
+
transformThumbnails: { type: Boolean },
|
|
2306
|
+
ariaLabel: {},
|
|
2307
|
+
columns: { default: 3 },
|
|
2308
|
+
gap: { default: "1rem" }
|
|
2309
|
+
},
|
|
2310
|
+
setup(e) {
|
|
2311
|
+
return (a, t) => (v(), m("div", Vn, [
|
|
2312
|
+
(v(!0), m(ae, null, de(e.images, (n) => (v(), m("button", {
|
|
2313
|
+
key: n.src,
|
|
2314
|
+
class: "masonry-item"
|
|
2315
|
+
}, [
|
|
2316
|
+
P($e, {
|
|
2317
|
+
src: n.src,
|
|
2318
|
+
alt: n.alt || "",
|
|
2319
|
+
transform: e.transform
|
|
2320
|
+
}, null, 8, ["src", "alt", "transform"])
|
|
2321
|
+
]))), 128))
|
|
2322
|
+
]));
|
|
2323
|
+
}
|
|
2324
|
+
}), Rn = /* @__PURE__ */ W(_n, [["__scopeId", "data-v-afb75845"]]), Bn = {
|
|
2325
|
+
class: "rs-image-gallery",
|
|
2326
|
+
role: "region",
|
|
2327
|
+
"aria-label": "Image gallery"
|
|
2328
|
+
}, Tn = /* @__PURE__ */ T({
|
|
2329
|
+
__name: "ImageGallery",
|
|
2330
|
+
props: /* @__PURE__ */ se({
|
|
2331
|
+
images: {},
|
|
2332
|
+
layout: { default: "carousel" },
|
|
2333
|
+
showThumbnails: { type: Boolean, default: !0 },
|
|
2334
|
+
loop: { type: Boolean, default: !0 },
|
|
2335
|
+
transform: { type: Boolean },
|
|
2336
|
+
transformThumbnails: { type: Boolean },
|
|
2337
|
+
ariaLabel: {},
|
|
2338
|
+
columns: {},
|
|
2339
|
+
gap: { default: "1rem" }
|
|
2340
|
+
}, {
|
|
2341
|
+
modelValue: {
|
|
2342
|
+
type: Number,
|
|
2343
|
+
default: 0
|
|
2344
|
+
},
|
|
2345
|
+
modelModifiers: {}
|
|
2346
|
+
}),
|
|
2347
|
+
emits: /* @__PURE__ */ se(["change"], ["update:modelValue"]),
|
|
2348
|
+
setup(e, { emit: a }) {
|
|
2349
|
+
const t = Ce(e, "modelValue"), n = a, s = L({
|
|
2350
|
+
get: () => t.value ?? 0,
|
|
2351
|
+
set: (i) => {
|
|
2352
|
+
t.value = i, n("change", i);
|
|
2353
|
+
}
|
|
2354
|
+
}), r = (i) => s.value = i;
|
|
2355
|
+
return (i, o) => (v(), m("section", Bn, [
|
|
2356
|
+
e.layout === "carousel" ? (v(), J(st, {
|
|
2357
|
+
key: 0,
|
|
2358
|
+
modelValue: s.value,
|
|
2359
|
+
"onUpdate:modelValue": o[0] || (o[0] = (l) => s.value = l),
|
|
2360
|
+
images: e.images,
|
|
2361
|
+
loop: e.loop,
|
|
2362
|
+
"aria-label": e.ariaLabel,
|
|
2363
|
+
transform: e.transform,
|
|
2364
|
+
"transform-thumbnails": e.transformThumbnails,
|
|
2365
|
+
"show-thumbnails": e.showThumbnails
|
|
2366
|
+
}, null, 8, ["modelValue", "images", "loop", "aria-label", "transform", "transform-thumbnails", "show-thumbnails"])) : e.layout === "grid" ? (v(), J(rt, {
|
|
2367
|
+
key: 1,
|
|
2368
|
+
modelValue: s.value,
|
|
2369
|
+
"onUpdate:modelValue": o[1] || (o[1] = (l) => s.value = l),
|
|
2370
|
+
images: e.images,
|
|
2371
|
+
onSelect: r,
|
|
2372
|
+
columns: e.columns,
|
|
2373
|
+
gap: e.gap,
|
|
2374
|
+
transform: e.transform,
|
|
2375
|
+
"aria-label": e.ariaLabel
|
|
2376
|
+
}, null, 8, ["modelValue", "images", "columns", "gap", "transform", "aria-label"])) : e.layout === "grid-lightbox" ? (v(), J(Hn, {
|
|
2377
|
+
key: 2,
|
|
2378
|
+
modelValue: s.value,
|
|
2379
|
+
"onUpdate:modelValue": o[2] || (o[2] = (l) => s.value = l),
|
|
2380
|
+
images: e.images,
|
|
2381
|
+
transform: e.transform,
|
|
2382
|
+
"aria-label": e.ariaLabel
|
|
2383
|
+
}, null, 8, ["modelValue", "images", "transform", "aria-label"])) : e.layout === "masonry" ? (v(), J(Rn, {
|
|
2384
|
+
key: 3,
|
|
2385
|
+
modelValue: s.value,
|
|
2386
|
+
"onUpdate:modelValue": o[3] || (o[3] = (l) => s.value = l),
|
|
2387
|
+
images: e.images,
|
|
2388
|
+
transform: e.transform,
|
|
2389
|
+
"aria-label": e.ariaLabel
|
|
2390
|
+
}, null, 8, ["modelValue", "images", "transform", "aria-label"])) : K("", !0)
|
|
2391
|
+
]));
|
|
2392
|
+
}
|
|
2393
|
+
}), tt = /* @__PURE__ */ W(Tn, [["__scopeId", "data-v-d6be1b96"]]);
|
|
2394
|
+
tt.install = (e) => e.component("ImageGallery", tt);
|
|
2395
|
+
const An = ["aria-busy"], Sn = {
|
|
2396
|
+
key: 0,
|
|
2397
|
+
class: "message",
|
|
2398
|
+
"aria-hidden": "true"
|
|
2399
|
+
}, Zn = {
|
|
2400
|
+
class: "message sr-only",
|
|
2401
|
+
"aria-atomic": "true"
|
|
2402
|
+
}, En = /* @__PURE__ */ T({
|
|
2403
|
+
__name: "Spinner",
|
|
2404
|
+
props: {
|
|
2405
|
+
message: {}
|
|
2406
|
+
},
|
|
2407
|
+
setup(e) {
|
|
2408
|
+
const a = e, t = b(0), n = b(null), s = b(a.message || ""), r = () => {
|
|
2409
|
+
!a.message || n.value !== null || s.value.length > 0 && (n.value = window.setInterval(() => {
|
|
2410
|
+
t.value = t.value % 3 + 1, s.value = `${a.message}${".".repeat(t.value)}`;
|
|
2411
|
+
}, 750));
|
|
2412
|
+
}, i = () => {
|
|
2413
|
+
n.value !== null && (clearInterval(n.value), n.value = null);
|
|
2414
|
+
};
|
|
2415
|
+
return Y(
|
|
2416
|
+
() => a.message,
|
|
2417
|
+
(o, l) => {
|
|
2418
|
+
o !== l && (s.value = o || "", i());
|
|
2419
|
+
}
|
|
2420
|
+
), te(r), he(i), (o, l) => (v(), m("div", {
|
|
2421
|
+
class: "spinner-container",
|
|
2422
|
+
role: "status",
|
|
2423
|
+
"aria-live": "polite",
|
|
2424
|
+
"aria-busy": !!e.message
|
|
2425
|
+
}, [
|
|
2426
|
+
l[0] || (l[0] = w("div", {
|
|
2427
|
+
class: "spinner",
|
|
2428
|
+
"aria-hidden": "true"
|
|
2429
|
+
}, null, -1)),
|
|
2430
|
+
e.message ? (v(), m("span", Sn, U(s.value), 1)) : K("", !0),
|
|
2431
|
+
w("span", Zn, U(e.message || "Loading"), 1)
|
|
2432
|
+
], 8, An));
|
|
2433
|
+
}
|
|
2434
|
+
}), ft = /* @__PURE__ */ W(En, [["__scopeId", "data-v-e61a1cf5"]]), Dn = ["for"], On = ["id", "value", "required", "aria-invalid", "aria-errormessage", "aria-describedby"], Nn = /* @__PURE__ */ T({
|
|
2435
|
+
__name: "Textarea",
|
|
2436
|
+
props: /* @__PURE__ */ se({
|
|
2437
|
+
id: {},
|
|
2438
|
+
label: {},
|
|
2439
|
+
type: {},
|
|
2440
|
+
invalid: { type: Boolean },
|
|
2441
|
+
errorMessage: {}
|
|
2442
|
+
}, {
|
|
2443
|
+
modelValue: {
|
|
2444
|
+
required: !0
|
|
2445
|
+
},
|
|
2446
|
+
modelModifiers: {}
|
|
2447
|
+
}),
|
|
2448
|
+
emits: /* @__PURE__ */ se(["focus", "blur"], ["update:modelValue"]),
|
|
2449
|
+
setup(e, { emit: a }) {
|
|
2450
|
+
const t = Ce(e, "modelValue"), n = Ne(), s = qe(), r = a, i = e, o = b(null), l = b(null), c = ue(), u = `${c}-error`, g = `${c}-hint`, $ = Re(n).value, H = Be(i).value, d = L(() => $ ? `${g} ${c}-required-hint` : g), C = ze(i, s, u, d.value).value, I = (y) => {
|
|
2451
|
+
ke(o.value, l.value);
|
|
2452
|
+
const D = y.target;
|
|
2453
|
+
t.value = i.type === "number" ? Number(D.value) : D.value;
|
|
2454
|
+
}, R = L(() => i.invalid === !0 && i.errorMessage ? u : void 0);
|
|
2455
|
+
return te(() => {
|
|
2456
|
+
ke(o.value, l.value);
|
|
2457
|
+
}), (y, D) => (v(), m("div", {
|
|
2458
|
+
class: re(["textarea-box", { required: _($), error: _(H) }]),
|
|
2459
|
+
ref_key: "inputBoxRef",
|
|
2460
|
+
ref: l
|
|
2461
|
+
}, [
|
|
2462
|
+
w("label", {
|
|
2463
|
+
for: e.id,
|
|
2464
|
+
class: "label"
|
|
2465
|
+
}, U(e.label), 9, Dn),
|
|
2466
|
+
w("textarea", we({ id: e.id }, y.$attrs, {
|
|
2467
|
+
class: "custom-textarea",
|
|
2468
|
+
onFocus: D[0] || (D[0] = (Z) => _(Fe)(Z, l.value, r)),
|
|
2469
|
+
onBlur: D[1] || (D[1] = (Z) => _(Ke)(Z, o.value, l.value, r)),
|
|
2470
|
+
onInput: I,
|
|
2471
|
+
value: t.value,
|
|
2472
|
+
required: _($),
|
|
2473
|
+
"aria-invalid": _(H),
|
|
2474
|
+
"aria-errormessage": R.value,
|
|
2475
|
+
"aria-describedby": _(C),
|
|
2476
|
+
ref_key: "textareaRef",
|
|
2477
|
+
ref: o
|
|
2478
|
+
}), " ", 16, On),
|
|
2479
|
+
P(Pe, { hintId: g }, {
|
|
2480
|
+
default: G(() => [
|
|
2481
|
+
j(y.$slots, "hint", {}, void 0, !0)
|
|
2482
|
+
]),
|
|
2483
|
+
_: 3
|
|
2484
|
+
}),
|
|
2485
|
+
P(Ue, {
|
|
2486
|
+
baseId: _(c),
|
|
2487
|
+
isRequired: _($)
|
|
2488
|
+
}, null, 8, ["baseId", "isRequired"]),
|
|
2489
|
+
P(je, {
|
|
2490
|
+
errorId: u,
|
|
2491
|
+
invalid: _(H),
|
|
2492
|
+
errorMessage: e.errorMessage
|
|
2493
|
+
}, null, 8, ["invalid", "errorMessage"])
|
|
2494
|
+
], 2));
|
|
2495
|
+
}
|
|
2496
|
+
}), Il = /* @__PURE__ */ W(Nn, [["__scopeId", "data-v-d5062a27"]]), qn = { key: 0 }, zn = { key: 1 }, Fn = /* @__PURE__ */ T({
|
|
2497
|
+
__name: "Highlight",
|
|
2498
|
+
props: {
|
|
2499
|
+
text: {},
|
|
2500
|
+
query: {}
|
|
2501
|
+
},
|
|
2502
|
+
setup(e) {
|
|
2503
|
+
const a = (t, n) => {
|
|
2504
|
+
if (!n) return [{ text: t, match: !1 }];
|
|
2505
|
+
const s = n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), r = new RegExp(s, "ig"), i = [];
|
|
2506
|
+
let o = 0;
|
|
2507
|
+
return t.replace(r, (l, c) => (c > o && i.push({ text: t.slice(o, c), match: !1 }), i.push({ text: l, match: !0 }), o = c + l.length, l)), o < t.length && i.push({ text: t.slice(o), match: !1 }), i;
|
|
2508
|
+
};
|
|
2509
|
+
return (t, n) => (v(!0), m(ae, null, de(a(e.text, e.query), (s, r) => (v(), m(ae, { key: r }, [
|
|
2510
|
+
s.match ? (v(), m("mark", qn, U(s.text), 1)) : (v(), m("span", zn, U(s.text), 1))
|
|
2511
|
+
], 64))), 128));
|
|
2512
|
+
}
|
|
2513
|
+
}), Kn = /* @__PURE__ */ W(Fn, [["__scopeId", "data-v-edfa70b3"]]);
|
|
2514
|
+
process.env.NODE_ENV;
|
|
2515
|
+
process.env.NODE_ENV;
|
|
2516
|
+
process.env.NODE_ENV;
|
|
2517
|
+
const Pn = /* @__PURE__ */ Symbol(process.env.NODE_ENV !== "production" ? "router" : "");
|
|
2518
|
+
process.env.NODE_ENV;
|
|
2519
|
+
process.env.NODE_ENV;
|
|
2520
|
+
const Un = {
|
|
2521
|
+
class: "ui-breadcrumb",
|
|
2522
|
+
"aria-label": "Breadcrumb"
|
|
2523
|
+
}, jn = { class: "ui-breadcrumb__list" }, Wn = {
|
|
2524
|
+
key: 0,
|
|
2525
|
+
class: "ui-breadcrumb__separator",
|
|
2526
|
+
"aria-hidden": "true"
|
|
2527
|
+
}, Xn = /* @__PURE__ */ T({
|
|
2528
|
+
__name: "Breadcrumb",
|
|
2529
|
+
props: {
|
|
2530
|
+
items: {},
|
|
2531
|
+
separator: { default: "/" }
|
|
2532
|
+
},
|
|
2533
|
+
setup(e) {
|
|
2534
|
+
const a = e, t = le(Pn), n = (o) => o === a.items.length - 1, s = (o, l) => r(o, l), r = (o, l) => n(l) || o.disabled ? "span" : o.to && t ? mt("RouterLink") : o.href ? "a" : "span", i = (o, l) => n(l) || o.disabled ? { "data-disabled": o.disabled || void 0 } : o.to ? { to: o.to } : o.href ? {
|
|
2535
|
+
href: o.href,
|
|
2536
|
+
target: o.external ? "_blank" : void 0,
|
|
2537
|
+
rel: o.external ? "noopener noreferrer" : void 0,
|
|
2538
|
+
"aria-label": o.external ? `${o.label} (opens in a new tab)` : void 0
|
|
2539
|
+
} : {};
|
|
2540
|
+
return (o, l) => (v(), m("nav", Un, [
|
|
2541
|
+
w("ol", jn, [
|
|
2542
|
+
(v(!0), m(ae, null, de(e.items, (c, u) => (v(), m("li", {
|
|
2543
|
+
key: c.to ?? c.href ?? `${c.label}-${u}`,
|
|
2544
|
+
class: "ui-breadcrumb__item"
|
|
2545
|
+
}, [
|
|
2546
|
+
(v(), J(xe(s(c, u)), we({ class: "ui-breadcrumb__link" }, { ref_for: !0 }, i(c, u), {
|
|
2547
|
+
"aria-posinset": u + 1,
|
|
2548
|
+
"aria-setsize": e.items.length,
|
|
2549
|
+
"aria-current": n(u) ? "page" : void 0,
|
|
2550
|
+
tabindex: n(u) || s(c, u) === "span" ? -1 : void 0
|
|
2551
|
+
}), {
|
|
2552
|
+
default: G(() => [
|
|
2553
|
+
me(U(c.label), 1)
|
|
2554
|
+
]),
|
|
2555
|
+
_: 2
|
|
2556
|
+
}, 1040, ["aria-posinset", "aria-setsize", "aria-current", "tabindex"])),
|
|
2557
|
+
n(u) ? K("", !0) : (v(), m("span", Wn, [
|
|
2558
|
+
j(o.$slots, "separator", {}, () => [
|
|
2559
|
+
me(U(e.separator), 1)
|
|
2560
|
+
], !0)
|
|
2561
|
+
]))
|
|
2562
|
+
]))), 128))
|
|
2563
|
+
])
|
|
2564
|
+
]));
|
|
2565
|
+
}
|
|
2566
|
+
}), xl = /* @__PURE__ */ W(Xn, [["__scopeId", "data-v-baed1592"]]), Gn = ["aria-invalid", "aria-required", "disabled"], Jn = { class: "sr-only" }, Yn = ["name", "value", "disabled", "required"], Qn = {
|
|
2567
|
+
key: 0,
|
|
2568
|
+
class: "radio-control",
|
|
2569
|
+
"aria-hidden": "true"
|
|
2570
|
+
}, eo = { class: "radio-label" }, to = /* @__PURE__ */ T({
|
|
2571
|
+
__name: "RadioButton",
|
|
2572
|
+
props: /* @__PURE__ */ se({
|
|
2573
|
+
name: {},
|
|
2574
|
+
options: {},
|
|
2575
|
+
disabled: { type: Boolean },
|
|
2576
|
+
required: { type: Boolean },
|
|
2577
|
+
invalid: { type: Boolean },
|
|
2578
|
+
inColumn: { type: Boolean },
|
|
2579
|
+
mode: { default: "standard" }
|
|
2580
|
+
}, {
|
|
2581
|
+
modelValue: {
|
|
2582
|
+
required: !0
|
|
2583
|
+
},
|
|
2584
|
+
modelModifiers: {}
|
|
2585
|
+
}),
|
|
2586
|
+
emits: ["update:modelValue"],
|
|
2587
|
+
setup(e) {
|
|
2588
|
+
const a = e, t = Ce(e, "modelValue"), n = L(() => a.invalid ? "true" : void 0), s = L(() => a.required && !a.disabled ? "true" : void 0), r = L(() => a.disabled ? !0 : void 0);
|
|
2589
|
+
return (i, o) => (v(), m("fieldset", {
|
|
2590
|
+
class: re(["radio-group", { "in-column": e.inColumn, btn: e.mode === "button" }]),
|
|
2591
|
+
"aria-invalid": n.value,
|
|
2592
|
+
"aria-required": s.value,
|
|
2593
|
+
disabled: r.value
|
|
2594
|
+
}, [
|
|
2595
|
+
w("legend", Jn, U(e.name), 1),
|
|
2596
|
+
(v(!0), m(ae, null, de(e.options, (l) => (v(), m("label", {
|
|
2597
|
+
key: l.key,
|
|
2598
|
+
class: re(["radio", { checked: t.value === l.key, disabled: e.disabled || l.disabled }])
|
|
2599
|
+
}, [
|
|
2600
|
+
He(w("input", {
|
|
2601
|
+
type: "radio",
|
|
2602
|
+
class: "radio-input",
|
|
2603
|
+
name: e.name,
|
|
2604
|
+
value: l.key,
|
|
2605
|
+
disabled: e.disabled || l.disabled,
|
|
2606
|
+
required: e.required,
|
|
2607
|
+
"onUpdate:modelValue": o[0] || (o[0] = (c) => t.value = c)
|
|
2608
|
+
}, null, 8, Yn), [
|
|
2609
|
+
[pt, t.value]
|
|
2610
|
+
]),
|
|
2611
|
+
e.mode === "standard" ? (v(), m("span", Qn)) : K("", !0),
|
|
2612
|
+
w("span", eo, U(l.label), 1)
|
|
2613
|
+
], 2))), 128))
|
|
2614
|
+
], 10, Gn));
|
|
2615
|
+
}
|
|
2616
|
+
}), Hl = /* @__PURE__ */ W(to, [["__scopeId", "data-v-8f76f7f0"]]), ao = ["for"], no = ["id", "type", "aria-expanded", "aria-activedescendant", "aria-required", "aria-invalid", "disabled"], oo = ["id", "aria-disabled", "aria-selected", "onClick"], lo = {
|
|
2617
|
+
class: "option-value",
|
|
2618
|
+
"aria-hidden": "true"
|
|
2619
|
+
}, so = { class: "option-value sr-only" }, ro = {
|
|
2620
|
+
key: 1,
|
|
2621
|
+
class: "option no-found",
|
|
2622
|
+
"aria-disabled": "true"
|
|
2623
|
+
}, io = {
|
|
2624
|
+
key: 3,
|
|
2625
|
+
class: "option recents",
|
|
2626
|
+
"aria-disabled": "true",
|
|
2627
|
+
"aria-hidden": "true"
|
|
2628
|
+
}, uo = ["onClick"], co = { class: "option-value" }, vo = {
|
|
2629
|
+
key: 0,
|
|
2630
|
+
class: "start-icon",
|
|
2631
|
+
"aria-hidden": "true"
|
|
2632
|
+
}, fo = /* @__PURE__ */ T({
|
|
2633
|
+
__name: "Autocomplete",
|
|
2634
|
+
props: /* @__PURE__ */ se({
|
|
2635
|
+
id: {},
|
|
2636
|
+
type: { default: "text" },
|
|
2637
|
+
options: {},
|
|
2638
|
+
label: {},
|
|
2639
|
+
disabled: { type: Boolean, default: !1 },
|
|
2640
|
+
required: {},
|
|
2641
|
+
loading: { type: Boolean },
|
|
2642
|
+
minChars: { default: 1 },
|
|
2643
|
+
filterable: { type: Boolean, default: !0 },
|
|
2644
|
+
showSuggestionsOnFocus: { type: Boolean, default: !1 },
|
|
2645
|
+
suggestionsLimit: { default: 10 },
|
|
2646
|
+
getKey: {},
|
|
2647
|
+
getValue: {},
|
|
2648
|
+
isDisabled: { type: Function, default: () => !1 }
|
|
2649
|
+
}, {
|
|
2650
|
+
modelValue: {
|
|
2651
|
+
required: !0
|
|
2652
|
+
},
|
|
2653
|
+
modelModifiers: {}
|
|
2654
|
+
}),
|
|
2655
|
+
emits: /* @__PURE__ */ se(["change", "select", "focus", "blur"], ["update:modelValue"]),
|
|
2656
|
+
setup(e, { emit: a }) {
|
|
2657
|
+
const t = e, n = a, s = Ce(e, "modelValue"), r = b(null), i = b(null), o = b(""), l = b(!1), c = b([]), u = b(null), g = b(null), $ = L(() => t.id ? `${t.id}-search-history` : "search-history"), d = `${ue()}-list`, C = L(() => u.value !== null ? `${d}-option-${u.value}` : void 0), I = L(() => l.value && C.value ? C.value : void 0), R = L(() => c.value.length > 0), y = L(() => {
|
|
2658
|
+
if (!t.filterable) return t.options;
|
|
2659
|
+
const M = o.value.toLowerCase();
|
|
2660
|
+
return t.options.filter((O) => t.getValue(O).toLowerCase().includes(M));
|
|
2661
|
+
}), D = Be(t).value, Z = an(t).value, f = Re(t).value;
|
|
2662
|
+
Y(o, () => ke(r.value, i.value)), Y(
|
|
2663
|
+
() => $.value,
|
|
2664
|
+
(M) => {
|
|
2665
|
+
if (M)
|
|
2666
|
+
try {
|
|
2667
|
+
c.value = JSON.parse(localStorage.getItem(M) || "[]");
|
|
2668
|
+
} catch {
|
|
2669
|
+
c.value = [];
|
|
2670
|
+
}
|
|
2671
|
+
},
|
|
2672
|
+
{ immediate: !0 }
|
|
2673
|
+
), Y(l, async (M) => {
|
|
2674
|
+
if (!M) {
|
|
2675
|
+
u.value = null;
|
|
2676
|
+
return;
|
|
2677
|
+
}
|
|
2678
|
+
y.value.length !== 0 && (await Me(), S());
|
|
2679
|
+
}), Y(
|
|
2680
|
+
() => t.loading,
|
|
2681
|
+
async (M) => {
|
|
2682
|
+
M || l.value && y.value.length !== 0 && (await Me(), S());
|
|
2683
|
+
}
|
|
2684
|
+
), Y(
|
|
2685
|
+
() => t.options,
|
|
2686
|
+
() => {
|
|
2687
|
+
g.value = null;
|
|
2688
|
+
}
|
|
2689
|
+
);
|
|
2690
|
+
const k = (M) => {
|
|
2691
|
+
o.value.length >= t.minChars && !t.filterable && !t.loading && (l.value = !0), Fe(M, i.value, n);
|
|
2692
|
+
}, V = (M) => {
|
|
2693
|
+
const O = M.relatedTarget;
|
|
2694
|
+
i.value?.contains(O) || (l.value = !1, s.value ? h() : o.value = "", Ke(M, r.value, i.value, n));
|
|
2695
|
+
}, q = (M, O) => {
|
|
2696
|
+
const B = i.value;
|
|
2697
|
+
if (!B || t.isDisabled(M)) return;
|
|
2698
|
+
l.value = !1, X(o.value), g.value = O, u.value = O;
|
|
2699
|
+
const N = t.getKey(M);
|
|
2700
|
+
N && N.toString().length > 0 ? B.classList.add("filled") : B.classList.remove("filled"), o.value = t.getValue(M), s.value = N, n("select", N);
|
|
2701
|
+
}, A = (M) => {
|
|
2702
|
+
if (!l.value && ["ArrowDown", "ArrowUp"].includes(M.key)) {
|
|
2703
|
+
l.value = !0, u.value = u.value ?? y.value.findIndex((O) => !t.isDisabled(O)), M.preventDefault();
|
|
2704
|
+
return;
|
|
2705
|
+
}
|
|
2706
|
+
if (l.value) {
|
|
2707
|
+
if (M.key === "ArrowDown" && (z(1), M.preventDefault()), M.key === "ArrowUp" && (z(-1), M.preventDefault()), M.key === "Home") {
|
|
2708
|
+
const O = Q();
|
|
2709
|
+
O >= 0 && (u.value = O), M.preventDefault();
|
|
2710
|
+
}
|
|
2711
|
+
if (M.key === "End") {
|
|
2712
|
+
const O = fe();
|
|
2713
|
+
O >= 0 && (u.value = O), M.preventDefault();
|
|
2714
|
+
}
|
|
2715
|
+
if (M.key === "Enter") {
|
|
2716
|
+
if (u.value === null) return;
|
|
2717
|
+
const O = y.value[u.value];
|
|
2718
|
+
if (!O || t.isDisabled(O)) return;
|
|
2719
|
+
q(O, u.value), l.value = !1, M.preventDefault();
|
|
2720
|
+
}
|
|
2721
|
+
M.key === "Escape" && (l.value = !1);
|
|
2722
|
+
}
|
|
2723
|
+
}, z = (M) => {
|
|
2724
|
+
if (u.value === null) return;
|
|
2725
|
+
let O = u.value;
|
|
2726
|
+
do
|
|
2727
|
+
O += M;
|
|
2728
|
+
while (O >= 0 && O < y.value.length && t.isDisabled(y.value[O]));
|
|
2729
|
+
O >= 0 && O < y.value.length && (u.value = O);
|
|
2730
|
+
}, p = () => {
|
|
2731
|
+
o.value.length === 0 && (s.value = ""), ke(r.value, i.value), o.value.length >= t.minChars ? (n("change", o.value), l.value = !0) : l.value = !1;
|
|
2732
|
+
}, h = () => {
|
|
2733
|
+
if (s.value.toString().length === 0 || !t.options || t.options.length === 0) return;
|
|
2734
|
+
const M = t.options.findIndex((O) => t.getKey(O) === s.value);
|
|
2735
|
+
M > -1 && (u.value = M, g.value = M, o.value = t.getValue(t.options[M]), ke(r.value, i.value));
|
|
2736
|
+
}, E = () => {
|
|
2737
|
+
o.value = "", s.value = "";
|
|
2738
|
+
}, X = (M) => {
|
|
2739
|
+
!M || M.trim().length === 0 || (c.value = [
|
|
2740
|
+
M,
|
|
2741
|
+
...c.value.filter((O) => O !== M)
|
|
2742
|
+
].slice(0, t.suggestionsLimit), localStorage.setItem($.value, JSON.stringify(c.value)));
|
|
2743
|
+
}, x = (M) => {
|
|
2744
|
+
o.value = M, p();
|
|
2745
|
+
}, S = () => {
|
|
2746
|
+
const M = Q();
|
|
2747
|
+
M >= 0 && (u.value = M);
|
|
2748
|
+
}, Q = () => y.value.findIndex((M) => !t.isDisabled(M)), fe = () => {
|
|
2749
|
+
for (let M = y.value.length - 1; M >= 0; M--) if (!t.isDisabled(y.value[M])) return M;
|
|
2750
|
+
return -1;
|
|
2751
|
+
};
|
|
2752
|
+
return te(() => {
|
|
2753
|
+
h(), ke(r.value, i.value);
|
|
2754
|
+
}), (M, O) => (v(), m("div", {
|
|
2755
|
+
class: re(["autocomplete", { required: _(f), error: _(D), "has-icon": Object.keys(M.$slots).includes("icon") }]),
|
|
2756
|
+
ref_key: "autocompleteRef",
|
|
2757
|
+
ref: i
|
|
2758
|
+
}, [
|
|
2759
|
+
w("label", {
|
|
2760
|
+
for: e.id,
|
|
2761
|
+
class: "label"
|
|
2762
|
+
}, U(e.label), 9, ao),
|
|
2763
|
+
He(w("input", we({
|
|
2764
|
+
id: e.id,
|
|
2765
|
+
type: e.type
|
|
2766
|
+
}, M.$attrs, {
|
|
2767
|
+
ref_key: "inputRef",
|
|
2768
|
+
ref: r,
|
|
2769
|
+
role: "combobox",
|
|
2770
|
+
"aria-autocomplete": "list",
|
|
2771
|
+
"aria-expanded": l.value,
|
|
2772
|
+
"aria-controls": d,
|
|
2773
|
+
"aria-activedescendant": I.value,
|
|
2774
|
+
"aria-required": _(f),
|
|
2775
|
+
"aria-invalid": _(D),
|
|
2776
|
+
disabled: _(Z),
|
|
2777
|
+
"onUpdate:modelValue": O[0] || (O[0] = (B) => o.value = B),
|
|
2778
|
+
onFocus: k,
|
|
2779
|
+
onBlur: V,
|
|
2780
|
+
onInput: p,
|
|
2781
|
+
onKeydown: A
|
|
2782
|
+
}), null, 16, no), [
|
|
2783
|
+
[bt, o.value]
|
|
2784
|
+
]),
|
|
2785
|
+
P(Ie, { name: "select" }, {
|
|
2786
|
+
default: G(() => [
|
|
2787
|
+
He(w("ul", {
|
|
2788
|
+
id: d,
|
|
2789
|
+
role: "listbox",
|
|
2790
|
+
class: "options"
|
|
2791
|
+
}, [
|
|
2792
|
+
y.value.length > 0 ? (v(!0), m(ae, { key: 0 }, de(y.value, (B, N) => (v(), m("li", {
|
|
2793
|
+
id: `${d}-option-${N}`,
|
|
2794
|
+
key: e.getKey(B),
|
|
2795
|
+
role: "option",
|
|
2796
|
+
class: re(["option", { "focus-visible": u.value === N }]),
|
|
2797
|
+
"aria-disabled": t.isDisabled(B) || void 0,
|
|
2798
|
+
"aria-selected": N === g.value,
|
|
2799
|
+
onMousedown: O[1] || (O[1] = oe(() => {
|
|
2800
|
+
}, ["prevent"])),
|
|
2801
|
+
onClick: (ne) => !t.isDisabled(B) && q(B, N)
|
|
2802
|
+
}, [
|
|
2803
|
+
t.isDisabled(B) ? K("", !0) : (v(), J(ie, {
|
|
2804
|
+
key: 0,
|
|
2805
|
+
name: "search",
|
|
2806
|
+
size: 22
|
|
2807
|
+
})),
|
|
2808
|
+
j(M.$slots, "option", {
|
|
2809
|
+
option: B,
|
|
2810
|
+
value: e.getValue(B),
|
|
2811
|
+
query: o.value,
|
|
2812
|
+
selected: N === g.value,
|
|
2813
|
+
active: N === u.value
|
|
2814
|
+
}, () => [
|
|
2815
|
+
w("div", lo, [
|
|
2816
|
+
P(Kn, {
|
|
2817
|
+
text: e.getValue(B),
|
|
2818
|
+
query: o.value
|
|
2819
|
+
}, null, 8, ["text", "query"])
|
|
2820
|
+
])
|
|
2821
|
+
], !0),
|
|
2822
|
+
w("div", so, U(e.getValue(B)), 1)
|
|
2823
|
+
], 42, oo))), 128)) : y.value.length === 0 && !e.loading ? (v(), m("li", ro, [...O[3] || (O[3] = [
|
|
2824
|
+
w("div", { class: "option-value" }, "No results found", -1)
|
|
2825
|
+
])])) : (v(), J(ft, {
|
|
2826
|
+
key: 2,
|
|
2827
|
+
"aria-live": "polite",
|
|
2828
|
+
role: "status",
|
|
2829
|
+
message: "Loading"
|
|
2830
|
+
})),
|
|
2831
|
+
R.value ? (v(), m("li", io, [...O[4] || (O[4] = [
|
|
2832
|
+
w("div", { class: "option-value" }, " Recents ", -1)
|
|
2833
|
+
])])) : K("", !0),
|
|
2834
|
+
(v(!0), m(ae, null, de(c.value, (B) => (v(), m("li", {
|
|
2835
|
+
key: B,
|
|
2836
|
+
role: "presentation",
|
|
2837
|
+
"aria-hidden": "true",
|
|
2838
|
+
class: "option recent-item",
|
|
2839
|
+
onClick: (N) => x(B)
|
|
2840
|
+
}, [
|
|
2841
|
+
P(ie, { name: "clock" }),
|
|
2842
|
+
w("div", co, U(B), 1)
|
|
2843
|
+
], 8, uo))), 128))
|
|
2844
|
+
], 512), [
|
|
2845
|
+
[Oe, l.value]
|
|
2846
|
+
])
|
|
2847
|
+
]),
|
|
2848
|
+
_: 3
|
|
2849
|
+
}),
|
|
2850
|
+
M.$slots.icon ? (v(), m("span", vo, [
|
|
2851
|
+
j(M.$slots, "icon", {}, void 0, !0)
|
|
2852
|
+
])) : K("", !0),
|
|
2853
|
+
o.value.length > 0 ? (v(), J(pe, {
|
|
2854
|
+
key: 1,
|
|
2855
|
+
type: "button",
|
|
2856
|
+
class: "btn btn-icon",
|
|
2857
|
+
"aria-label": "Clear search query",
|
|
2858
|
+
title: "Clear search query",
|
|
2859
|
+
onMousedown: O[2] || (O[2] = oe(() => {
|
|
2860
|
+
}, ["prevent"])),
|
|
2861
|
+
onClick: E
|
|
2862
|
+
}, {
|
|
2863
|
+
default: G(() => [
|
|
2864
|
+
P(ie, {
|
|
2865
|
+
class: "clear-search",
|
|
2866
|
+
"aria-hidden": "true",
|
|
2867
|
+
name: "close",
|
|
2868
|
+
size: 28
|
|
2869
|
+
})
|
|
2870
|
+
]),
|
|
2871
|
+
_: 1
|
|
2872
|
+
})) : K("", !0)
|
|
2873
|
+
], 2));
|
|
2874
|
+
}
|
|
2875
|
+
}), Vl = /* @__PURE__ */ W(fo, [["__scopeId", "data-v-7fffa12c"]]), mo = 5, ce = ot({
|
|
2876
|
+
toasts: []
|
|
2877
|
+
});
|
|
2878
|
+
let po = 0;
|
|
2879
|
+
const Le = (e, a = "info") => {
|
|
2880
|
+
const t = {
|
|
2881
|
+
id: `toast-${po++}`,
|
|
2882
|
+
duration: 4e3,
|
|
2883
|
+
...typeof e == "string" ? { description: e } : e,
|
|
2884
|
+
variant: a
|
|
2885
|
+
};
|
|
2886
|
+
return ce.toasts.push(t), ce.toasts.length > mo && ce.toasts.shift(), t.id;
|
|
2887
|
+
}, bo = (e, a) => ce.toasts = ce.toasts.map((t) => t.id === e ? { ...t, ...a, loading: !1 } : t), _l = Object.assign(
|
|
2888
|
+
(e) => Le(e),
|
|
2889
|
+
{
|
|
2890
|
+
update: bo,
|
|
2891
|
+
success: (e) => Le(e, "success"),
|
|
2892
|
+
error: (e) => Le(e, "error"),
|
|
2893
|
+
info: (e) => Le(e, "info"),
|
|
2894
|
+
warning: (e) => Le(e, "warning"),
|
|
2895
|
+
loading: (e) => Le({ description: e, loading: !0, variant: "info", duration: 1 / 0 }),
|
|
2896
|
+
dismiss: (e) => ce.toasts = ce.toasts.filter((a) => a.id !== e),
|
|
2897
|
+
promise(e, a) {
|
|
2898
|
+
const t = Le({ loading: !0, description: a.loading, duration: 1 / 0 });
|
|
2899
|
+
return e.then(() => ce.toasts = ce.toasts.map((n) => n.id === t ? { ...n, description: a.success, duration: 3e3, variant: "success", loading: !1 } : n)).catch(() => ce.toasts = ce.toasts.map((n) => n.id === t ? { ...n, description: a.error, duration: 5e3, variant: "error", loading: !1 } : n)), e;
|
|
2900
|
+
}
|
|
2901
|
+
}
|
|
2902
|
+
), go = ["data-variant", "data-state", "role", "aria-describedby"], Co = { class: "content" }, ho = {
|
|
2903
|
+
key: 0,
|
|
2904
|
+
class: "progress"
|
|
2905
|
+
}, yo = 160, ko = /* @__PURE__ */ T({
|
|
2906
|
+
__name: "ToastRoot",
|
|
2907
|
+
props: {
|
|
2908
|
+
id: {},
|
|
2909
|
+
variant: { default: "info" },
|
|
2910
|
+
duration: { default: 4e3 },
|
|
2911
|
+
loading: { type: Boolean },
|
|
2912
|
+
focus: { type: Boolean }
|
|
2913
|
+
},
|
|
2914
|
+
setup(e) {
|
|
2915
|
+
const a = e, t = b(null), n = b("open"), s = b(100);
|
|
2916
|
+
let r = Date.now(), i;
|
|
2917
|
+
const o = () => {
|
|
2918
|
+
const u = Date.now() - r;
|
|
2919
|
+
if (s.value = Math.max(0, 100 - u / a.duration * 100), s.value <= 0) {
|
|
2920
|
+
c();
|
|
2921
|
+
return;
|
|
2922
|
+
}
|
|
2923
|
+
i = requestAnimationFrame(o);
|
|
2924
|
+
}, l = () => {
|
|
2925
|
+
if (cancelAnimationFrame(i), a.duration === 1 / 0) {
|
|
2926
|
+
s.value = 100;
|
|
2927
|
+
return;
|
|
2928
|
+
}
|
|
2929
|
+
r = Date.now(), i = requestAnimationFrame(o);
|
|
2930
|
+
};
|
|
2931
|
+
Y(
|
|
2932
|
+
() => a.duration,
|
|
2933
|
+
() => l(),
|
|
2934
|
+
{ immediate: !0 }
|
|
2935
|
+
);
|
|
2936
|
+
const c = () => {
|
|
2937
|
+
cancelAnimationFrame(i), n.value = "closing", setTimeout(() => ce.toasts = ce.toasts.filter((u) => u.id !== a.id), yo);
|
|
2938
|
+
};
|
|
2939
|
+
return te(() => a.variant === "error" && a.focus && t.value?.focus()), Ve(() => cancelAnimationFrame(i)), (u, g) => (v(), m("div", {
|
|
2940
|
+
ref_key: "rootRef",
|
|
2941
|
+
ref: t,
|
|
2942
|
+
tabindex: "-1",
|
|
2943
|
+
class: "toast",
|
|
2944
|
+
"data-variant": e.variant,
|
|
2945
|
+
"data-state": n.value,
|
|
2946
|
+
role: e.variant === "error" ? "alert" : "status",
|
|
2947
|
+
"aria-live": "polite",
|
|
2948
|
+
"aria-atomic": "true",
|
|
2949
|
+
"aria-describedby": e.loading ? void 0 : `toast-desc-${e.id}`
|
|
2950
|
+
}, [
|
|
2951
|
+
w("div", Co, [
|
|
2952
|
+
j(u.$slots, "default", {}, void 0, !0),
|
|
2953
|
+
P(pe, {
|
|
2954
|
+
type: "button",
|
|
2955
|
+
onClick: c,
|
|
2956
|
+
"aria-label": `Close ${e.variant} notification`,
|
|
2957
|
+
class: "btn-sm"
|
|
2958
|
+
}, {
|
|
2959
|
+
default: G(() => [
|
|
2960
|
+
P(ie, {
|
|
2961
|
+
name: "close",
|
|
2962
|
+
size: 32
|
|
2963
|
+
})
|
|
2964
|
+
]),
|
|
2965
|
+
_: 1
|
|
2966
|
+
}, 8, ["aria-label"])
|
|
2967
|
+
]),
|
|
2968
|
+
e.duration !== 1 / 0 ? (v(), m("div", ho, [
|
|
2969
|
+
w("div", {
|
|
2970
|
+
class: "bar",
|
|
2971
|
+
style: be({ width: s.value + "%" })
|
|
2972
|
+
}, null, 4)
|
|
2973
|
+
])) : K("", !0)
|
|
2974
|
+
], 8, go));
|
|
2975
|
+
}
|
|
2976
|
+
}), wo = /* @__PURE__ */ W(ko, [["__scopeId", "data-v-f9e75b9d"]]), Lo = { class: "toast-viewport" }, Mo = { class: "toast-message" }, $o = { key: 0 }, Io = ["id"], xo = /* @__PURE__ */ T({
|
|
2977
|
+
__name: "ToastViewport",
|
|
2978
|
+
setup(e) {
|
|
2979
|
+
return (a, t) => (v(), J(_e, { to: "body" }, [
|
|
2980
|
+
w("div", Lo, [
|
|
2981
|
+
P(gt, { name: "toast-stack" }, {
|
|
2982
|
+
default: G(() => [
|
|
2983
|
+
(v(!0), m(ae, null, de(_(ce).toasts, (n) => (v(), J(wo, {
|
|
2984
|
+
key: n.id,
|
|
2985
|
+
id: n.id,
|
|
2986
|
+
duration: n.duration,
|
|
2987
|
+
variant: n.variant,
|
|
2988
|
+
loading: n.loading
|
|
2989
|
+
}, {
|
|
2990
|
+
default: G(() => [
|
|
2991
|
+
w("div", Mo, [
|
|
2992
|
+
n.title ? (v(), m("strong", $o, U(n.title), 1)) : K("", !0),
|
|
2993
|
+
n.loading ? (v(), J(ft, {
|
|
2994
|
+
key: 1,
|
|
2995
|
+
message: n.description,
|
|
2996
|
+
"aria-hidden": "true"
|
|
2997
|
+
}, null, 8, ["message"])) : (v(), m("p", {
|
|
2998
|
+
key: 2,
|
|
2999
|
+
id: `toast-desc-${n.id}`
|
|
3000
|
+
}, U(n.description), 9, Io))
|
|
3001
|
+
])
|
|
3002
|
+
]),
|
|
3003
|
+
_: 2
|
|
3004
|
+
}, 1032, ["id", "duration", "variant", "loading"]))), 128))
|
|
3005
|
+
]),
|
|
3006
|
+
_: 1
|
|
3007
|
+
})
|
|
3008
|
+
])
|
|
3009
|
+
]));
|
|
3010
|
+
}
|
|
3011
|
+
}), at = /* @__PURE__ */ W(xo, [["__scopeId", "data-v-afe47f2a"]]);
|
|
3012
|
+
let nt = !1;
|
|
3013
|
+
const Rl = {
|
|
3014
|
+
install(e, a = {}) {
|
|
3015
|
+
const { autoMount: t = !0 } = a;
|
|
3016
|
+
if (e.component("ToastViewport", at), t && !nt && typeof window < "u") {
|
|
3017
|
+
nt = !0;
|
|
3018
|
+
const n = document.createElement("div");
|
|
3019
|
+
n.setAttribute("data-toast-host", ""), document.body.appendChild(n), Ct(at).mount(n);
|
|
3020
|
+
}
|
|
3021
|
+
}
|
|
3022
|
+
}, Ho = /* @__PURE__ */ T({
|
|
3023
|
+
__name: "Card",
|
|
3024
|
+
props: {
|
|
3025
|
+
as: { default: "div" },
|
|
3026
|
+
clickable: { type: Boolean, default: !1 }
|
|
3027
|
+
},
|
|
3028
|
+
emits: ["click"],
|
|
3029
|
+
setup(e, { emit: a }) {
|
|
3030
|
+
const t = e, n = a, s = b(), r = b();
|
|
3031
|
+
ge("card:labelId", s), ge("card:descriptionId", r);
|
|
3032
|
+
const i = L(() => t.clickable && t.as !== "button" && t.as !== "a"), o = () => t.clickable && n("click");
|
|
3033
|
+
return (l, c) => (v(), J(xe(e.as), {
|
|
3034
|
+
class: re(["rs-card", { clickable: e.clickable }]),
|
|
3035
|
+
tabindex: i.value ? 0 : void 0,
|
|
3036
|
+
role: i.value ? "button" : void 0,
|
|
3037
|
+
onClick: o,
|
|
3038
|
+
onKeydown: [
|
|
3039
|
+
c[0] || (c[0] = ve(oe((u) => i.value && o(), ["prevent"]), ["enter"])),
|
|
3040
|
+
c[1] || (c[1] = ve(oe((u) => i.value && o(), ["prevent"]), ["space"]))
|
|
3041
|
+
],
|
|
3042
|
+
"aria-labelledby": s.value,
|
|
3043
|
+
"aria-describedby": r.value
|
|
3044
|
+
}, {
|
|
3045
|
+
default: G(() => [
|
|
3046
|
+
j(l.$slots, "default", {}, void 0, !0)
|
|
3047
|
+
]),
|
|
3048
|
+
_: 3
|
|
3049
|
+
}, 40, ["class", "tabindex", "role", "aria-labelledby", "aria-describedby"]));
|
|
3050
|
+
}
|
|
3051
|
+
}), Bl = /* @__PURE__ */ W(Ho, [["__scopeId", "data-v-e892a9f2"]]), Vo = /* @__PURE__ */ T({
|
|
3052
|
+
__name: "CardHeader",
|
|
3053
|
+
props: {
|
|
3054
|
+
as: { default: "div" }
|
|
3055
|
+
},
|
|
3056
|
+
setup(e) {
|
|
3057
|
+
const a = le("card:labelId", void 0), t = `rs-card-label-${ue()}`;
|
|
3058
|
+
return te(() => a && (a.value = t)), (n, s) => (v(), J(xe(e.as), {
|
|
3059
|
+
id: t,
|
|
3060
|
+
class: "rs-card-header"
|
|
3061
|
+
}, {
|
|
3062
|
+
default: G(() => [
|
|
3063
|
+
j(n.$slots, "default", {}, void 0, !0)
|
|
3064
|
+
]),
|
|
3065
|
+
_: 3
|
|
3066
|
+
}));
|
|
3067
|
+
}
|
|
3068
|
+
}), Tl = /* @__PURE__ */ W(Vo, [["__scopeId", "data-v-570794b4"]]), _o = /* @__PURE__ */ T({
|
|
3069
|
+
__name: "CardBody",
|
|
3070
|
+
setup(e) {
|
|
3071
|
+
const a = le("card:descriptionId", void 0), t = `rs-card-desc-${ue()}`;
|
|
3072
|
+
return te(() => a && (a.value = t)), (n, s) => (v(), m("div", {
|
|
3073
|
+
id: t,
|
|
3074
|
+
class: "rs-card-body"
|
|
3075
|
+
}, [
|
|
3076
|
+
j(n.$slots, "default", {}, void 0, !0)
|
|
3077
|
+
]));
|
|
3078
|
+
}
|
|
3079
|
+
}), Al = /* @__PURE__ */ W(_o, [["__scopeId", "data-v-f0380fda"]]), Ro = /* @__PURE__ */ T({
|
|
3080
|
+
__name: "CardFooter",
|
|
3081
|
+
props: {
|
|
3082
|
+
as: { default: "div" }
|
|
3083
|
+
},
|
|
3084
|
+
setup(e) {
|
|
3085
|
+
return (a, t) => (v(), J(xe(e.as), { class: "rs-card-footer" }, {
|
|
3086
|
+
default: G(() => [
|
|
3087
|
+
j(a.$slots, "default", {}, void 0, !0)
|
|
3088
|
+
]),
|
|
3089
|
+
_: 3
|
|
3090
|
+
}));
|
|
3091
|
+
}
|
|
3092
|
+
}), Sl = /* @__PURE__ */ W(Ro, [["__scopeId", "data-v-9b223473"]]), Bo = ["data-status", "data-orientation", "data-active", "data-completed", "aria-labelledby", "tabindex", "aria-current", "aria-posinset", "aria-setsize", "aria-describedby"], To = {
|
|
3093
|
+
key: 2,
|
|
3094
|
+
class: "icon",
|
|
3095
|
+
"aria-hidden": "true",
|
|
3096
|
+
focusable: "false"
|
|
3097
|
+
}, Ao = {
|
|
3098
|
+
key: 3,
|
|
3099
|
+
class: "icon",
|
|
3100
|
+
"aria-hidden": "true",
|
|
3101
|
+
focusable: "false"
|
|
3102
|
+
}, So = {
|
|
3103
|
+
key: 4,
|
|
3104
|
+
class: "dot"
|
|
3105
|
+
}, Zo = ["id"], Eo = { class: "addons" }, Do = ["id"], Oo = {
|
|
3106
|
+
key: 0,
|
|
3107
|
+
class: "slot-default"
|
|
3108
|
+
}, No = /* @__PURE__ */ T({
|
|
3109
|
+
__name: "Step",
|
|
3110
|
+
props: {
|
|
3111
|
+
title: {},
|
|
3112
|
+
status: {},
|
|
3113
|
+
icon: {},
|
|
3114
|
+
size: {}
|
|
3115
|
+
},
|
|
3116
|
+
setup(e) {
|
|
3117
|
+
const a = e, t = le("StepsContext");
|
|
3118
|
+
if (!t) throw new Error("Step component must be used inside Steps.");
|
|
3119
|
+
const n = qe(), s = b(null), r = b(null), i = L(() => t.orientation ?? "horizontal");
|
|
3120
|
+
let o = null, l = null;
|
|
3121
|
+
const c = le("StepIndex");
|
|
3122
|
+
if (c == null) throw new Error("StepIndex component must be used inside Steps.");
|
|
3123
|
+
const u = L(() => a.status ? a.status : c < t.current.value ? "completed" : c === t.current.value ? "active" : "pending"), g = L(() => t?.icons?.[u.value]), $ = L(() => n.icon ? "slot" : a.icon ? a.icon : g.value), H = L(() => {
|
|
3124
|
+
switch (u.value) {
|
|
3125
|
+
case "completed":
|
|
3126
|
+
return "Stage completed";
|
|
3127
|
+
case "active":
|
|
3128
|
+
return "Current stage";
|
|
3129
|
+
case "error":
|
|
3130
|
+
return "Stage with error";
|
|
3131
|
+
default:
|
|
3132
|
+
return "Stage pending";
|
|
3133
|
+
}
|
|
3134
|
+
}), d = L(() => {
|
|
3135
|
+
switch (u.value) {
|
|
3136
|
+
case "completed":
|
|
3137
|
+
return "success";
|
|
3138
|
+
case "active":
|
|
3139
|
+
return "info";
|
|
3140
|
+
case "error":
|
|
3141
|
+
return "error";
|
|
3142
|
+
default:
|
|
3143
|
+
return "default";
|
|
3144
|
+
}
|
|
3145
|
+
}), C = L(() => a.size ?? t.size ?? "sm"), I = L(() => {
|
|
3146
|
+
switch (u.value) {
|
|
3147
|
+
case "completed":
|
|
3148
|
+
return "Completed";
|
|
3149
|
+
case "active":
|
|
3150
|
+
return "In Progress";
|
|
3151
|
+
case "error":
|
|
3152
|
+
return "Error";
|
|
3153
|
+
default:
|
|
3154
|
+
return "Pending";
|
|
3155
|
+
}
|
|
3156
|
+
});
|
|
3157
|
+
Y(
|
|
3158
|
+
() => u.value,
|
|
3159
|
+
(Z) => t.registerStepStatus(c, Z),
|
|
3160
|
+
{ immediate: !0 }
|
|
3161
|
+
);
|
|
3162
|
+
const R = () => {
|
|
3163
|
+
o == null && (o = requestAnimationFrame(() => {
|
|
3164
|
+
o = null, y();
|
|
3165
|
+
}));
|
|
3166
|
+
}, y = () => {
|
|
3167
|
+
if (!s.value || !r.value) return;
|
|
3168
|
+
const Z = r.value.getBoundingClientRect(), f = t.stepsRef.value.getBoundingClientRect(), k = t.orientation === "vertical" ? Z.top + Z.height / 2 - f.top : Z.left + Z.width / 2 - f.left;
|
|
3169
|
+
t.registerIndicatorCenter(c, k);
|
|
3170
|
+
}, D = (Z) => {
|
|
3171
|
+
const f = t.orientation === "horizontal", k = t.orientation === "vertical";
|
|
3172
|
+
switch (Z.key) {
|
|
3173
|
+
case "ArrowRight":
|
|
3174
|
+
f && t.focusNext();
|
|
3175
|
+
break;
|
|
3176
|
+
case "ArrowLeft":
|
|
3177
|
+
f && t.focusPrev();
|
|
3178
|
+
break;
|
|
3179
|
+
case "ArrowDown":
|
|
3180
|
+
k && t.focusNext();
|
|
3181
|
+
break;
|
|
3182
|
+
case "ArrowUp":
|
|
3183
|
+
k && t.focusPrev();
|
|
3184
|
+
break;
|
|
3185
|
+
case "Home":
|
|
3186
|
+
t.focusFirst();
|
|
3187
|
+
break;
|
|
3188
|
+
case "End":
|
|
3189
|
+
t.focusLast();
|
|
3190
|
+
break;
|
|
3191
|
+
default:
|
|
3192
|
+
return;
|
|
3193
|
+
}
|
|
3194
|
+
Z.preventDefault();
|
|
3195
|
+
};
|
|
3196
|
+
return te(() => {
|
|
3197
|
+
!s.value || !r.value || (requestAnimationFrame(() => {
|
|
3198
|
+
requestAnimationFrame(y);
|
|
3199
|
+
}), l = new ResizeObserver(() => {
|
|
3200
|
+
R();
|
|
3201
|
+
}), l.observe(s.value), l.observe(r.value), t.stepsRef.value && l.observe(t.stepsRef.value), t.registerStep(s.value));
|
|
3202
|
+
}), he(() => {
|
|
3203
|
+
l?.disconnect(), t.unregisterStep(s.value), o != null && cancelAnimationFrame(o);
|
|
3204
|
+
}), (Z, f) => (v(), m("li", {
|
|
3205
|
+
ref_key: "stepRef",
|
|
3206
|
+
ref: s,
|
|
3207
|
+
class: re(["step", `step__${C.value}`]),
|
|
3208
|
+
role: "listitem",
|
|
3209
|
+
"data-status": u.value,
|
|
3210
|
+
"data-orientation": i.value,
|
|
3211
|
+
"data-active": u.value === "active",
|
|
3212
|
+
"data-completed": u.value === "completed",
|
|
3213
|
+
"aria-labelledby": `step-title-${_(c)}`,
|
|
3214
|
+
tabindex: u.value === "active" ? 0 : -1,
|
|
3215
|
+
"aria-current": u.value === "active" ? "step" : void 0,
|
|
3216
|
+
"aria-posinset": _(c) + 1,
|
|
3217
|
+
"aria-setsize": _(t).stepsCount.value,
|
|
3218
|
+
"aria-describedby": `step-status-${_(c)}`,
|
|
3219
|
+
onKeydown: D
|
|
3220
|
+
}, [
|
|
3221
|
+
w("span", {
|
|
3222
|
+
ref_key: "indicatorRef",
|
|
3223
|
+
ref: r,
|
|
3224
|
+
class: "indicator",
|
|
3225
|
+
"aria-hidden": "true"
|
|
3226
|
+
}, [
|
|
3227
|
+
Z.$slots.icon ? j(Z.$slots, "icon", {
|
|
3228
|
+
key: 0,
|
|
3229
|
+
status: u.value
|
|
3230
|
+
}, void 0, !0) : $.value ? (v(), J(ie, {
|
|
3231
|
+
key: 1,
|
|
3232
|
+
name: $.value,
|
|
3233
|
+
class: "icon"
|
|
3234
|
+
}, null, 8, ["name"])) : K("", !0),
|
|
3235
|
+
u.value === "completed" ? (v(), m("svg", To, [...f[0] || (f[0] = [
|
|
3236
|
+
w("path", {
|
|
3237
|
+
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",
|
|
3238
|
+
fill: "currentColor"
|
|
3239
|
+
}, null, -1)
|
|
3240
|
+
])])) : u.value === "error" ? (v(), m("svg", Ao, [...f[1] || (f[1] = [
|
|
3241
|
+
w("path", {
|
|
3242
|
+
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",
|
|
3243
|
+
fill: "currentColor"
|
|
3244
|
+
}, null, -1)
|
|
3245
|
+
])])) : u.value === "active" ? (v(), m("span", So)) : K("", !0)
|
|
3246
|
+
], 512),
|
|
3247
|
+
w("span", {
|
|
3248
|
+
id: `step-status-${_(c)}`,
|
|
3249
|
+
class: "sr-only"
|
|
3250
|
+
}, U(H.value), 9, Zo),
|
|
3251
|
+
w("div", Eo, [
|
|
3252
|
+
w("span", {
|
|
3253
|
+
id: `step-title-${_(c)}`,
|
|
3254
|
+
class: "title"
|
|
3255
|
+
}, U(e.title), 9, Do),
|
|
3256
|
+
P(Qa, {
|
|
3257
|
+
variant: d.value,
|
|
3258
|
+
size: "sm"
|
|
3259
|
+
}, {
|
|
3260
|
+
default: G(() => [
|
|
3261
|
+
me(U(I.value), 1)
|
|
3262
|
+
]),
|
|
3263
|
+
_: 1
|
|
3264
|
+
}, 8, ["variant"]),
|
|
3265
|
+
Z.$slots.default ? (v(), m("span", Oo, [
|
|
3266
|
+
j(Z.$slots, "default", {}, void 0, !0)
|
|
3267
|
+
])) : K("", !0)
|
|
3268
|
+
])
|
|
3269
|
+
], 42, Bo));
|
|
3270
|
+
}
|
|
3271
|
+
}), Zl = /* @__PURE__ */ W(No, [["__scopeId", "data-v-5c2d8caa"]]), qo = /* @__PURE__ */ T({
|
|
3272
|
+
__name: "StepsItem",
|
|
3273
|
+
props: {
|
|
3274
|
+
index: {}
|
|
3275
|
+
},
|
|
3276
|
+
setup(e) {
|
|
3277
|
+
return ge("StepIndex", e.index), (t, n) => j(t.$slots, "default");
|
|
3278
|
+
}
|
|
3279
|
+
}), zo = ["data-size", "data-orientation"], Fo = ["data-error", "data-completed"], Ko = {
|
|
3280
|
+
"aria-live": "polite",
|
|
3281
|
+
"aria-atomic": "true",
|
|
3282
|
+
class: "sr-only"
|
|
3283
|
+
}, Po = /* @__PURE__ */ T({
|
|
3284
|
+
__name: "Steps",
|
|
3285
|
+
props: /* @__PURE__ */ se({
|
|
3286
|
+
orientation: { default: "horizontal" },
|
|
3287
|
+
icons: {},
|
|
3288
|
+
size: { default: "sm" }
|
|
3289
|
+
}, {
|
|
3290
|
+
modelValue: {
|
|
3291
|
+
type: Number,
|
|
3292
|
+
default: 0
|
|
3293
|
+
},
|
|
3294
|
+
modelModifiers: {}
|
|
3295
|
+
}),
|
|
3296
|
+
emits: ["update:modelValue"],
|
|
3297
|
+
setup(e) {
|
|
3298
|
+
const a = e, t = b(0), n = qe(), s = Ce(e, "modelValue"), r = b([]), i = b(null), o = L(() => s.value ?? 0), l = `steps-description-${ue()}`, c = ht({}), u = ot({});
|
|
3299
|
+
let g = null;
|
|
3300
|
+
const $ = L(() => (n.default?.() ?? [])[o.value]?.props?.title ?? ""), H = L(() => Object.entries(u).filter(([, A]) => A !== "completed").length === 0), d = L(
|
|
3301
|
+
() => Object.values(u).includes("error")
|
|
3302
|
+
), C = L(() => {
|
|
3303
|
+
const A = o.value, z = c;
|
|
3304
|
+
if (z.value[0] == null || z.value[A] == null)
|
|
3305
|
+
return a.orientation === "vertical" ? {
|
|
3306
|
+
height: "100%",
|
|
3307
|
+
top: "0px"
|
|
3308
|
+
} : {
|
|
3309
|
+
width: "100%",
|
|
3310
|
+
left: "0px"
|
|
3311
|
+
};
|
|
3312
|
+
const p = z.value[0], h = z.value[A];
|
|
3313
|
+
return a.orientation === "vertical" ? {
|
|
3314
|
+
top: `${p}px`,
|
|
3315
|
+
height: `${h - p}px`
|
|
3316
|
+
} : {
|
|
3317
|
+
left: `${p}px`,
|
|
3318
|
+
width: `${h - p}px`
|
|
3319
|
+
};
|
|
3320
|
+
}), I = L(() => {
|
|
3321
|
+
const A = Object.values(c.value).sort((h, E) => h - E);
|
|
3322
|
+
if (A.length < 2) return {};
|
|
3323
|
+
const z = A[0], p = A[A.length - 1];
|
|
3324
|
+
return a.orientation === "vertical" ? {
|
|
3325
|
+
top: `${z}px`,
|
|
3326
|
+
height: `${p - z}px`
|
|
3327
|
+
} : {
|
|
3328
|
+
left: `${z}px`,
|
|
3329
|
+
right: `calc(100% - ${p}px)`
|
|
3330
|
+
};
|
|
3331
|
+
}), R = (A, z) => c.value = { ...c.value, [A]: z };
|
|
3332
|
+
function y(A) {
|
|
3333
|
+
r.value.push(A), t.value = r.value.length;
|
|
3334
|
+
}
|
|
3335
|
+
function D(A) {
|
|
3336
|
+
r.value = r.value.filter((z) => z !== A), t.value = r.value.length;
|
|
3337
|
+
}
|
|
3338
|
+
function Z(A) {
|
|
3339
|
+
A < 0 || A >= r.value.length || (s.value = A, r.value[A]?.focus());
|
|
3340
|
+
}
|
|
3341
|
+
function f() {
|
|
3342
|
+
Z(s.value + 1);
|
|
3343
|
+
}
|
|
3344
|
+
function k() {
|
|
3345
|
+
Z(s.value - 1);
|
|
3346
|
+
}
|
|
3347
|
+
function V() {
|
|
3348
|
+
Z(0);
|
|
3349
|
+
}
|
|
3350
|
+
function q() {
|
|
3351
|
+
Z(t.value - 1);
|
|
3352
|
+
}
|
|
3353
|
+
return te(() => {
|
|
3354
|
+
i.value && (g = new ResizeObserver(() => {
|
|
3355
|
+
}), g.observe(i.value));
|
|
3356
|
+
}), he(() => g?.disconnect()), ge("StepsContext", {
|
|
3357
|
+
current: L(() => s.value),
|
|
3358
|
+
update: (A) => s.value = A,
|
|
3359
|
+
stepsCount: t,
|
|
3360
|
+
icons: a.icons,
|
|
3361
|
+
size: a.size,
|
|
3362
|
+
orientation: a.orientation,
|
|
3363
|
+
stepStatusMap: u,
|
|
3364
|
+
stepsRef: i,
|
|
3365
|
+
registerStepStatus: (A, z) => {
|
|
3366
|
+
u[A] = z;
|
|
3367
|
+
},
|
|
3368
|
+
registerIndicatorCenter: R,
|
|
3369
|
+
registerStep: y,
|
|
3370
|
+
unregisterStep: D,
|
|
3371
|
+
focusNext: f,
|
|
3372
|
+
focusPrev: k,
|
|
3373
|
+
focusFirst: V,
|
|
3374
|
+
focusLast: q
|
|
3375
|
+
}), (A, z) => (v(), m(ae, null, [
|
|
3376
|
+
w("ol", {
|
|
3377
|
+
ref_key: "stepsRef",
|
|
3378
|
+
ref: i,
|
|
3379
|
+
class: "steps",
|
|
3380
|
+
role: "list",
|
|
3381
|
+
"data-size": e.size,
|
|
3382
|
+
"data-orientation": a.orientation,
|
|
3383
|
+
"aria-describedby": l
|
|
3384
|
+
}, [
|
|
3385
|
+
w("p", {
|
|
3386
|
+
id: l,
|
|
3387
|
+
class: "sr-only"
|
|
3388
|
+
}, " This is a multi-step process. Use arrow keys to navigate between steps. "),
|
|
3389
|
+
w("div", {
|
|
3390
|
+
class: "track",
|
|
3391
|
+
"aria-hidden": "true",
|
|
3392
|
+
style: be(I.value)
|
|
3393
|
+
}, [
|
|
3394
|
+
w("div", {
|
|
3395
|
+
class: "track-progress",
|
|
3396
|
+
"data-error": d.value,
|
|
3397
|
+
"data-completed": H.value,
|
|
3398
|
+
style: be(C.value)
|
|
3399
|
+
}, null, 12, Fo)
|
|
3400
|
+
], 4),
|
|
3401
|
+
(v(!0), m(ae, null, de(A.$slots.default?.(), (p, h) => (v(), J(qo, {
|
|
3402
|
+
key: h,
|
|
3403
|
+
index: h
|
|
3404
|
+
}, {
|
|
3405
|
+
default: G(() => [
|
|
3406
|
+
(v(), J(xe(p)))
|
|
3407
|
+
]),
|
|
3408
|
+
_: 2
|
|
3409
|
+
}, 1032, ["index"]))), 128))
|
|
3410
|
+
], 8, zo),
|
|
3411
|
+
w("div", Ko, " Step " + U(o.value + 1) + " of " + U(t.value) + ": " + U($.value), 1)
|
|
3412
|
+
], 64));
|
|
3413
|
+
}
|
|
3414
|
+
}), El = /* @__PURE__ */ W(Po, [["__scopeId", "data-v-8697173d"]]), Uo = ["data-align"], jo = /* @__PURE__ */ T({
|
|
3415
|
+
__name: "Timeline",
|
|
3416
|
+
props: {
|
|
3417
|
+
align: { default: "left" }
|
|
3418
|
+
},
|
|
3419
|
+
setup(e) {
|
|
3420
|
+
return ge("TimelineContext", e), (t, n) => (v(), m("ol", {
|
|
3421
|
+
role: "list",
|
|
3422
|
+
class: "ui-timeline",
|
|
3423
|
+
"data-align": e.align
|
|
3424
|
+
}, [
|
|
3425
|
+
j(t.$slots, "default", {}, void 0, !0)
|
|
3426
|
+
], 8, Uo));
|
|
3427
|
+
}
|
|
3428
|
+
}), Dl = /* @__PURE__ */ W(jo, [["__scopeId", "data-v-d56deb2b"]]), Wo = ["data-align", "aria-labelledby", "aria-describedby"], Xo = { class: "ui-timeline-content" }, Go = ["datetime"], Jo = { class: "ui-timeline-date--month" }, Yo = { class: "ui-timeline-date--day" }, Qo = { class: "ui-timeline-date--year" }, el = ["data-direction"], tl = { class: "info" }, al = ["id"], nl = { class: "addons" }, ol = /* @__PURE__ */ T({
|
|
3429
|
+
__name: "TimelineItem",
|
|
3430
|
+
props: {
|
|
3431
|
+
date: {},
|
|
3432
|
+
title: {},
|
|
3433
|
+
description: {},
|
|
3434
|
+
index: {},
|
|
3435
|
+
flexDirection: {},
|
|
3436
|
+
titleAs: {}
|
|
3437
|
+
},
|
|
3438
|
+
setup(e) {
|
|
3439
|
+
const a = e, t = le("TimelineContext");
|
|
3440
|
+
if (!t) throw new Error("TimelineItem must be used within a Timeline component");
|
|
3441
|
+
const n = ue(), s = ue(), r = L(() => t.align === "alternate" ? (a.index ?? 0) % 2 === 0 ? "ui-timeline-item--left" : "ui-timeline-item--right" : `ui-timeline-item--${t.align}`), i = (c) => {
|
|
3442
|
+
const u = new Date(c).getDay();
|
|
3443
|
+
return u < 10 ? `0${u}` : u;
|
|
3444
|
+
}, o = (c) => new Date(c).toLocaleString("default", { month: "short" }), l = (c) => new Date(c).getFullYear();
|
|
3445
|
+
return (c, u) => (v(), m("li", {
|
|
3446
|
+
tabindex: "0",
|
|
3447
|
+
class: re([r.value, "ui-timeline-item"]),
|
|
3448
|
+
"data-align": _(t).align,
|
|
3449
|
+
"aria-labelledby": e.title ? _(n) : void 0,
|
|
3450
|
+
"aria-describedby": e.description ? _(s) : void 0
|
|
3451
|
+
}, [
|
|
3452
|
+
u[0] || (u[0] = w("div", {
|
|
3453
|
+
class: "ui-timeline-marker",
|
|
3454
|
+
"aria-hidden": "true"
|
|
3455
|
+
}, null, -1)),
|
|
3456
|
+
w("div", Xo, [
|
|
3457
|
+
e.date ? (v(), m("time", {
|
|
3458
|
+
key: 0,
|
|
3459
|
+
class: "ui-timeline-date",
|
|
3460
|
+
datetime: e.date
|
|
3461
|
+
}, [
|
|
3462
|
+
w("span", Jo, U(o(e.date)), 1),
|
|
3463
|
+
w("span", Yo, U(i(e.date)), 1),
|
|
3464
|
+
w("span", Qo, U(l(e.date)), 1)
|
|
3465
|
+
], 8, Go)) : K("", !0),
|
|
3466
|
+
w("div", {
|
|
3467
|
+
class: "ui-timeline-body",
|
|
3468
|
+
"data-direction": e.flexDirection
|
|
3469
|
+
}, [
|
|
3470
|
+
w("div", tl, [
|
|
3471
|
+
j(c.$slots, "title", {}, () => [
|
|
3472
|
+
(v(), J(xe(e.titleAs ?? "h3"), {
|
|
3473
|
+
id: _(n),
|
|
3474
|
+
class: "ui-timeline-title"
|
|
3475
|
+
}, {
|
|
3476
|
+
default: G(() => [
|
|
3477
|
+
me(U(e.title), 1)
|
|
3478
|
+
]),
|
|
3479
|
+
_: 1
|
|
3480
|
+
}, 8, ["id"]))
|
|
3481
|
+
], !0),
|
|
3482
|
+
j(c.$slots, "description", {}, () => [
|
|
3483
|
+
e.description ? (v(), m("p", {
|
|
3484
|
+
key: 0,
|
|
3485
|
+
id: _(s),
|
|
3486
|
+
class: "ui-timeline-description"
|
|
3487
|
+
}, U(e.description), 9, al)) : K("", !0)
|
|
3488
|
+
], !0)
|
|
3489
|
+
]),
|
|
3490
|
+
w("div", nl, [
|
|
3491
|
+
j(c.$slots, "default", {}, void 0, !0)
|
|
3492
|
+
])
|
|
3493
|
+
], 8, el)
|
|
3494
|
+
])
|
|
3495
|
+
], 10, Wo));
|
|
3496
|
+
}
|
|
3497
|
+
}), Ol = /* @__PURE__ */ W(ol, [["__scopeId", "data-v-10599410"]]), ll = ["aria-label", "aria-activedescendant"], sl = { class: "carousel-viewport" }, rl = {
|
|
3498
|
+
class: "sr-only",
|
|
3499
|
+
"aria-live": "polite"
|
|
3500
|
+
}, il = {
|
|
3501
|
+
key: 0,
|
|
3502
|
+
role: "tablist",
|
|
3503
|
+
class: "carousel-indicators"
|
|
3504
|
+
}, ul = ["aria-label", "aria-selected", "aria-current", "onClick", "onKeydown"], dl = 0.35, cl = 0.2, vl = /* @__PURE__ */ T({
|
|
3505
|
+
__name: "Carousel",
|
|
3506
|
+
props: /* @__PURE__ */ se({
|
|
3507
|
+
ariaLabel: { default: "Carousel" },
|
|
3508
|
+
showIndicators: { type: Boolean, default: !0 },
|
|
3509
|
+
loop: { type: Boolean, default: !0 },
|
|
3510
|
+
itemsPerView: { default: () => ({
|
|
3511
|
+
0: 2,
|
|
3512
|
+
640: 4,
|
|
3513
|
+
1024: 6
|
|
3514
|
+
}) },
|
|
3515
|
+
autoplay: { type: Boolean, default: !1 },
|
|
3516
|
+
autoplayDelay: { default: 3e3 }
|
|
3517
|
+
}, {
|
|
3518
|
+
modelValue: {
|
|
3519
|
+
type: Number,
|
|
3520
|
+
default: 0
|
|
3521
|
+
},
|
|
3522
|
+
modelModifiers: {}
|
|
3523
|
+
}),
|
|
3524
|
+
emits: ["update:modelValue"],
|
|
3525
|
+
setup(e) {
|
|
3526
|
+
const a = Ce(e, "modelValue"), t = e, n = b(0), s = b(0), r = b(0), i = b(0), o = b(0), l = b(0), c = b(!1), u = b(!1), g = b(0), $ = b([]), H = b(1), d = b(a.value), C = b(null), I = b(null);
|
|
3527
|
+
let R = null, y = null;
|
|
3528
|
+
Y(
|
|
3529
|
+
() => a.value,
|
|
3530
|
+
(B) => d.value = B
|
|
3531
|
+
);
|
|
3532
|
+
const D = L(() => $.value[d.value] ?? void 0), Z = L(() => Math.floor(d.value / H.value)), f = L(() => Math.ceil(X.value / H.value)), k = L(() => Math.max(0, X.value - H.value)), V = L(() => {
|
|
3533
|
+
const B = d.value * (100 / H.value), N = u.value && I.value ? r.value / I.value.clientWidth * 100 : 0;
|
|
3534
|
+
return {
|
|
3535
|
+
transform: `translateX(calc(-${B}% + ${N}%))`,
|
|
3536
|
+
transition: u.value ? "none" : "transform 300ms ease"
|
|
3537
|
+
};
|
|
3538
|
+
}), q = (B) => {
|
|
3539
|
+
let N = B;
|
|
3540
|
+
if (t.loop) {
|
|
3541
|
+
const ne = Math.round(B / H.value), ee = f.value;
|
|
3542
|
+
N = (ne % ee + ee) % ee * H.value;
|
|
3543
|
+
} else
|
|
3544
|
+
N = Math.min(
|
|
3545
|
+
Math.max(B, 0),
|
|
3546
|
+
k.value
|
|
3547
|
+
);
|
|
3548
|
+
d.value = N, a.value = N;
|
|
3549
|
+
}, A = () => q(d.value + H.value), z = () => q(d.value - H.value), p = (B) => {
|
|
3550
|
+
B.key === "ArrowRight" ? A() : B.key === "ArrowLeft" && z();
|
|
3551
|
+
}, h = (B) => ($.value.includes(B) || $.value.push(B), $.value.indexOf(B)), E = (B) => $.value = $.value.filter((N) => N !== B), X = L(() => $.value.length), x = () => {
|
|
3552
|
+
!t.autoplay || R !== null || (R = window.setInterval(() => {
|
|
3553
|
+
c.value || A();
|
|
3554
|
+
}, t.autoplayDelay));
|
|
3555
|
+
}, S = () => {
|
|
3556
|
+
R !== null && (clearInterval(R), R = null);
|
|
3557
|
+
}, Q = (B) => {
|
|
3558
|
+
if (typeof t.itemsPerView == "number")
|
|
3559
|
+
return t.itemsPerView;
|
|
3560
|
+
const N = Object.entries(t.itemsPerView).map(([ee, ye]) => [Number(ee), ye]).sort((ee, ye) => ee[0] - ye[0]);
|
|
3561
|
+
let ne = N[0]?.[1] ?? 1;
|
|
3562
|
+
for (const [ee, ye] of N) B >= ee && (ne = ye);
|
|
3563
|
+
return ne;
|
|
3564
|
+
}, fe = (B) => {
|
|
3565
|
+
B.button === 0 && (u.value = !0, s.value = B.clientX, n.value = B.clientX, l.value = B.clientX, r.value = 0, i.value = performance.now(), o.value = 0, g.value = d.value, I.value?.setPointerCapture(B.pointerId), S(), I.value.style.userSelect = "");
|
|
3566
|
+
}, M = (B) => {
|
|
3567
|
+
if (!u.value) return;
|
|
3568
|
+
const N = performance.now(), ne = B.clientX - n.value, ee = N - i.value;
|
|
3569
|
+
ee > 0 && (o.value = ne / ee), n.value = B.clientX, i.value = N, l.value = B.clientX, r.value = l.value - s.value;
|
|
3570
|
+
}, O = (B) => {
|
|
3571
|
+
if (!u.value) return;
|
|
3572
|
+
u.value = !1, I.value?.releasePointerCapture(B.pointerId), I.value.style.userSelect = "";
|
|
3573
|
+
const N = I.value.clientWidth / H.value, ne = r.value / N;
|
|
3574
|
+
Math.abs(o.value) > dl ? o.value < 0 ? A() : z() : Math.abs(ne) > cl ? ne < 0 ? A() : z() : q(g.value), r.value = 0, o.value = 0, x();
|
|
3575
|
+
};
|
|
3576
|
+
return te(() => {
|
|
3577
|
+
x(), C.value && (y = new ResizeObserver((B) => {
|
|
3578
|
+
const N = B[0]?.contentRect.width;
|
|
3579
|
+
N !== void 0 && (H.value = Q(N));
|
|
3580
|
+
}), y.observe(C.value));
|
|
3581
|
+
}), he(() => {
|
|
3582
|
+
S(), y?.disconnect();
|
|
3583
|
+
}), Y(
|
|
3584
|
+
() => t.autoplay,
|
|
3585
|
+
(B) => {
|
|
3586
|
+
B ? x() : S();
|
|
3587
|
+
},
|
|
3588
|
+
{ immediate: !0 }
|
|
3589
|
+
), Y(H, () => d.value = Math.min(d.value, k.value)), ge("CarouselContext", {
|
|
3590
|
+
register: h,
|
|
3591
|
+
unregister: E,
|
|
3592
|
+
activeIndex: d,
|
|
3593
|
+
slideCount: X,
|
|
3594
|
+
deltaX: r,
|
|
3595
|
+
itemsPerView: t.itemsPerView instanceof Object ? H : b(t.itemsPerView)
|
|
3596
|
+
}), (B, N) => (v(), m("div", {
|
|
3597
|
+
ref_key: "rootRef",
|
|
3598
|
+
ref: C,
|
|
3599
|
+
role: "region",
|
|
3600
|
+
class: "carousel",
|
|
3601
|
+
"aria-roledescription": "carousel",
|
|
3602
|
+
"aria-label": e.ariaLabel,
|
|
3603
|
+
tabindex: "0",
|
|
3604
|
+
"aria-activedescendant": D.value,
|
|
3605
|
+
style: be({ "--items-per-view": H.value }),
|
|
3606
|
+
onKeydown: p,
|
|
3607
|
+
onMouseenter: N[0] || (N[0] = (ne) => c.value = !0),
|
|
3608
|
+
onMouseleave: N[1] || (N[1] = (ne) => c.value = !1),
|
|
3609
|
+
onFocusin: N[2] || (N[2] = (ne) => c.value = !0),
|
|
3610
|
+
onFocusout: N[3] || (N[3] = (ne) => c.value = !1)
|
|
3611
|
+
}, [
|
|
3612
|
+
N[4] || (N[4] = w("span", {
|
|
3613
|
+
id: "carousel-instructions",
|
|
3614
|
+
class: "sr-only"
|
|
3615
|
+
}, " Use left and right arrow keys to navigate slides ", -1)),
|
|
3616
|
+
w("div", sl, [
|
|
3617
|
+
w("div", {
|
|
3618
|
+
ref_key: "trackRef",
|
|
3619
|
+
ref: I,
|
|
3620
|
+
class: "carousel-track",
|
|
3621
|
+
style: be(V.value),
|
|
3622
|
+
onPointerdown: fe,
|
|
3623
|
+
onPointermove: M,
|
|
3624
|
+
onPointerup: O,
|
|
3625
|
+
onPointercancel: O
|
|
3626
|
+
}, [
|
|
3627
|
+
j(B.$slots, "default", {}, void 0, !0)
|
|
3628
|
+
], 36)
|
|
3629
|
+
]),
|
|
3630
|
+
w("span", rl, " Slide " + U(Math.floor(d.value / H.value) + 1) + " of " + U(f.value), 1),
|
|
3631
|
+
w("button", {
|
|
3632
|
+
type: "button",
|
|
3633
|
+
class: "carousel-control prev",
|
|
3634
|
+
"aria-label": "Previous slide",
|
|
3635
|
+
onClick: z
|
|
3636
|
+
}, [
|
|
3637
|
+
P(ie, { name: "directionDown" })
|
|
3638
|
+
]),
|
|
3639
|
+
w("button", {
|
|
3640
|
+
type: "button",
|
|
3641
|
+
class: "carousel-control next",
|
|
3642
|
+
"aria-label": "Next slide",
|
|
3643
|
+
onClick: A
|
|
3644
|
+
}, [
|
|
3645
|
+
P(ie, { name: "directionDown" })
|
|
3646
|
+
]),
|
|
3647
|
+
e.showIndicators ? (v(), m("div", il, [
|
|
3648
|
+
(v(!0), m(ae, null, de(f.value, (ne, ee) => (v(), m("button", {
|
|
3649
|
+
role: "tab",
|
|
3650
|
+
type: "button",
|
|
3651
|
+
key: ee,
|
|
3652
|
+
class: re(["indicator", { active: ee === Math.floor(d.value / H.value) }]),
|
|
3653
|
+
"aria-label": `Go to slide ${ee + 1}`,
|
|
3654
|
+
"aria-selected": ee === Z.value,
|
|
3655
|
+
"aria-current": ee === Z.value,
|
|
3656
|
+
onClick: (ye) => q(ee * H.value),
|
|
3657
|
+
onKeydown: [
|
|
3658
|
+
ve(oe((ye) => q((ee - 1 + f.value) % f.value * H.value), ["prevent"]), ["left"]),
|
|
3659
|
+
ve(oe((ye) => q((ee + 1) % f.value * H.value), ["prevent"]), ["right"])
|
|
3660
|
+
]
|
|
3661
|
+
}, null, 42, ul))), 128))
|
|
3662
|
+
])) : K("", !0)
|
|
3663
|
+
], 44, ll));
|
|
3664
|
+
}
|
|
3665
|
+
}), Nl = /* @__PURE__ */ W(vl, [["__scopeId", "data-v-30cdfc00"]]), fl = ["aria-hidden", "aria-label"], ml = /* @__PURE__ */ T({
|
|
3666
|
+
__name: "CarouselItem",
|
|
3667
|
+
setup(e) {
|
|
3668
|
+
const a = le("CarouselContext");
|
|
3669
|
+
if (!a) throw new Error("CarouselItem must be used inside a Carousel");
|
|
3670
|
+
const t = "carousel-item-" + ue(), n = b(0), s = L(() => Math.abs(a.deltaX.value) > 5), r = L(() => Math.floor(n.value / a.itemsPerView.value) === Math.floor(a.activeIndex.value / a.itemsPerView.value));
|
|
3671
|
+
return te(() => n.value = a.register(t)), he(() => a.unregister(t)), (i, o) => (v(), m("div", {
|
|
3672
|
+
role: "group",
|
|
3673
|
+
class: "carousel-item",
|
|
3674
|
+
id: t,
|
|
3675
|
+
"aria-roledescription": "slide",
|
|
3676
|
+
"aria-hidden": !r.value,
|
|
3677
|
+
"aria-label": `Slide ${n.value + 1}`,
|
|
3678
|
+
onClickCapture: o[0] || (o[0] = (l) => s.value && l.preventDefault())
|
|
3679
|
+
}, [
|
|
3680
|
+
j(i.$slots, "default", {}, void 0, !0)
|
|
3681
|
+
], 40, fl));
|
|
3682
|
+
}
|
|
3683
|
+
}), ql = /* @__PURE__ */ W(ml, [["__scopeId", "data-v-a569d055"]]), Ae = /* @__PURE__ */ Symbol("TabsContext"), zl = T({
|
|
3684
|
+
name: "Tabs",
|
|
3685
|
+
props: {
|
|
3686
|
+
modelValue: String,
|
|
3687
|
+
defaultValue: String,
|
|
3688
|
+
orientation: {
|
|
3689
|
+
type: String,
|
|
3690
|
+
default: "horizontal"
|
|
3691
|
+
},
|
|
3692
|
+
activationMode: {
|
|
3693
|
+
type: String,
|
|
3694
|
+
default: "auto"
|
|
3695
|
+
}
|
|
3696
|
+
},
|
|
3697
|
+
emits: ["update:modelValue"],
|
|
3698
|
+
setup(e, { emit: a, slots: t }) {
|
|
3699
|
+
const n = b(e.modelValue ?? e.defaultValue), s = b(!1), r = b([]), i = b("forward"), o = b();
|
|
3700
|
+
Y(n, (d) => {
|
|
3701
|
+
!d || !s.value || requestAnimationFrame(() => {
|
|
3702
|
+
document.getElementById(`tab-${d}`)?.focus(), s.value = !1;
|
|
3703
|
+
});
|
|
3704
|
+
}), Y(
|
|
3705
|
+
() => e.modelValue,
|
|
3706
|
+
(d) => {
|
|
3707
|
+
d !== void 0 && (n.value = d);
|
|
3708
|
+
}
|
|
3709
|
+
), Y(r, (d) => {
|
|
3710
|
+
!n.value && d.length && (n.value = d[0]);
|
|
3711
|
+
});
|
|
3712
|
+
const l = (d, C) => r.value[C] = d, c = (d) => {
|
|
3713
|
+
const C = r.value.filter(Boolean);
|
|
3714
|
+
if (!C.length) return;
|
|
3715
|
+
const I = n.value;
|
|
3716
|
+
if (!I) {
|
|
3717
|
+
n.value = d, a("update:modelValue", d);
|
|
3718
|
+
return;
|
|
3719
|
+
}
|
|
3720
|
+
const R = C.indexOf(I), y = C.indexOf(d);
|
|
3721
|
+
if (R === -1 || y === -1) {
|
|
3722
|
+
n.value = d, a("update:modelValue", d);
|
|
3723
|
+
return;
|
|
3724
|
+
}
|
|
3725
|
+
R !== -1 && y !== -1 && (i.value = y > R ? "forward" : "backward"), I !== d && (n.value = d, a("update:modelValue", d));
|
|
3726
|
+
}, u = L(() => i.value === "forward" ? "tab-slide-forward" : "tab-slide-backward"), g = (d) => {
|
|
3727
|
+
d instanceof HTMLElement && o.value && (o.value.style.height = `${d.offsetHeight}px`);
|
|
3728
|
+
}, $ = (d) => {
|
|
3729
|
+
if (d instanceof HTMLElement && o.value) {
|
|
3730
|
+
const C = d.offsetHeight;
|
|
3731
|
+
requestAnimationFrame(() => {
|
|
3732
|
+
o.value && (o.value.style.height = `${C}px`);
|
|
3733
|
+
});
|
|
3734
|
+
}
|
|
3735
|
+
}, H = () => {
|
|
3736
|
+
o.value && (o.value.style.height = "");
|
|
3737
|
+
};
|
|
3738
|
+
return ge(Ae, {
|
|
3739
|
+
activeValue: n,
|
|
3740
|
+
setValue: c,
|
|
3741
|
+
registerTrigger: l,
|
|
3742
|
+
direction: i,
|
|
3743
|
+
activationMode: b(e.activationMode),
|
|
3744
|
+
orientation: b(e.orientation),
|
|
3745
|
+
triggers: r,
|
|
3746
|
+
contentWrapperRef: o,
|
|
3747
|
+
focusOnChange: s
|
|
3748
|
+
}), () => {
|
|
3749
|
+
const d = t.default?.() || [], C = [], I = [];
|
|
3750
|
+
d.forEach((y) => {
|
|
3751
|
+
y.type?.name === "TabsContent" ? I.push(y) : C.push(y);
|
|
3752
|
+
});
|
|
3753
|
+
const R = I.find((y) => y.props?.value === n.value);
|
|
3754
|
+
return [
|
|
3755
|
+
...C,
|
|
3756
|
+
F(
|
|
3757
|
+
"div",
|
|
3758
|
+
{
|
|
3759
|
+
class: "tabs-content-wrapper",
|
|
3760
|
+
ref: o
|
|
3761
|
+
},
|
|
3762
|
+
F(
|
|
3763
|
+
Ie,
|
|
3764
|
+
{
|
|
3765
|
+
name: u.value,
|
|
3766
|
+
mode: "out-in",
|
|
3767
|
+
onBeforeLeave: g,
|
|
3768
|
+
onEnter: $,
|
|
3769
|
+
onAfterEnter: H
|
|
3770
|
+
},
|
|
3771
|
+
() => R ? [F(R.type, {
|
|
3772
|
+
...R.props,
|
|
3773
|
+
key: R.props.value
|
|
3774
|
+
}, R.children)] : []
|
|
3775
|
+
)
|
|
3776
|
+
)
|
|
3777
|
+
];
|
|
3778
|
+
};
|
|
3779
|
+
}
|
|
3780
|
+
}), Fl = T({
|
|
3781
|
+
name: "TabsList",
|
|
3782
|
+
setup(e, { slots: a }) {
|
|
3783
|
+
const t = le(Ae);
|
|
3784
|
+
if (!t) throw new Error("TabsList components must be used inside <Tabs>");
|
|
3785
|
+
return () => F(
|
|
3786
|
+
"div",
|
|
3787
|
+
{
|
|
3788
|
+
role: "tablist",
|
|
3789
|
+
class: "tabs-list",
|
|
3790
|
+
"aria-orientation": t.orientation.value
|
|
3791
|
+
},
|
|
3792
|
+
a.default?.()
|
|
3793
|
+
);
|
|
3794
|
+
}
|
|
3795
|
+
}), Kl = T({
|
|
3796
|
+
name: "TabsTrigger",
|
|
3797
|
+
props: {
|
|
3798
|
+
value: {
|
|
3799
|
+
type: String,
|
|
3800
|
+
required: !0
|
|
3801
|
+
},
|
|
3802
|
+
index: {
|
|
3803
|
+
type: Number,
|
|
3804
|
+
required: !0
|
|
3805
|
+
},
|
|
3806
|
+
disabled: {
|
|
3807
|
+
type: Boolean,
|
|
3808
|
+
required: !1
|
|
3809
|
+
}
|
|
3810
|
+
},
|
|
3811
|
+
setup(e, { slots: a }) {
|
|
3812
|
+
const t = le(Ae);
|
|
3813
|
+
if (!t) throw new Error("TabsTrigger components must be used inside <Tabs>");
|
|
3814
|
+
const n = L(() => t.activeValue.value === e.value), s = () => !e.disabled && t.setValue(e.value), r = (i) => {
|
|
3815
|
+
if (t.focusOnChange.value = !0, !["ArrowRight", "ArrowLeft", "ArrowDown", "ArrowUp", "Home", "End"].includes(i.key)) return;
|
|
3816
|
+
i.preventDefault();
|
|
3817
|
+
const l = t.triggers.value.filter(Boolean);
|
|
3818
|
+
let u = l.indexOf(e.value);
|
|
3819
|
+
const g = t.orientation.value === "horizontal";
|
|
3820
|
+
switch (i.key) {
|
|
3821
|
+
case "ArrowRight":
|
|
3822
|
+
g && u++;
|
|
3823
|
+
break;
|
|
3824
|
+
case "ArrowLeft":
|
|
3825
|
+
g && u--;
|
|
3826
|
+
break;
|
|
3827
|
+
case "ArrowDown":
|
|
3828
|
+
g || u++;
|
|
3829
|
+
break;
|
|
3830
|
+
case "ArrowUp":
|
|
3831
|
+
g || u--;
|
|
3832
|
+
break;
|
|
3833
|
+
case "Home":
|
|
3834
|
+
u = 0;
|
|
3835
|
+
break;
|
|
3836
|
+
case "End":
|
|
3837
|
+
u = l.length - 1;
|
|
3838
|
+
break;
|
|
3839
|
+
}
|
|
3840
|
+
u = (u + l.length) % l.length;
|
|
3841
|
+
const $ = l[u];
|
|
3842
|
+
t.activationMode.value === "auto" && t.setValue($), requestAnimationFrame(() => {
|
|
3843
|
+
document.getElementById(`tab-${$}`)?.focus();
|
|
3844
|
+
});
|
|
3845
|
+
};
|
|
3846
|
+
return te(() => !e.disabled && t.registerTrigger(e.value, e.index)), he(() => t.triggers.value[e.index] = void 0), () => F(
|
|
3847
|
+
pe,
|
|
3848
|
+
{
|
|
3849
|
+
role: "tab",
|
|
3850
|
+
id: `tab-${e.value}`,
|
|
3851
|
+
"aria-selected": n.value,
|
|
3852
|
+
"aria-controls": `panel-${e.value}`,
|
|
3853
|
+
"aria-disabled": e.disabled || void 0,
|
|
3854
|
+
tabindex: n.value ? 0 : -1,
|
|
3855
|
+
disabled: e.disabled ?? void 0,
|
|
3856
|
+
class: "tabs-trigger",
|
|
3857
|
+
onClick: s,
|
|
3858
|
+
onKeydown: r
|
|
3859
|
+
},
|
|
3860
|
+
{ default: () => a.default?.() }
|
|
3861
|
+
);
|
|
3862
|
+
}
|
|
3863
|
+
}), Pl = T({
|
|
3864
|
+
name: "TabsContent",
|
|
3865
|
+
props: {
|
|
3866
|
+
value: {
|
|
3867
|
+
type: String,
|
|
3868
|
+
required: !0
|
|
3869
|
+
}
|
|
3870
|
+
},
|
|
3871
|
+
setup(e, { slots: a }) {
|
|
3872
|
+
if (!le(Ae)) throw new Error("TabsContent components must be used inside <Tabs>");
|
|
3873
|
+
return () => F(
|
|
3874
|
+
"div",
|
|
3875
|
+
{
|
|
3876
|
+
id: `panel-${e.value}`,
|
|
3877
|
+
class: "tabs-content",
|
|
3878
|
+
role: "tabpanel",
|
|
3879
|
+
"aria-labelledby": `tab-${e.value}`,
|
|
3880
|
+
tabindex: -1
|
|
3881
|
+
},
|
|
3882
|
+
a.default?.()
|
|
3883
|
+
);
|
|
3884
|
+
}
|
|
3885
|
+
}), pl = { class: "ui-dropdown" }, Ul = /* @__PURE__ */ T({
|
|
3886
|
+
__name: "Dropdown",
|
|
3887
|
+
setup(e) {
|
|
3888
|
+
let a = 0;
|
|
3889
|
+
const t = b(!1), n = b(null), s = b({}), r = `dropdown-${ue()}`, i = `${r}-menu`, o = `${r}-trigger`, l = () => t.value = !0, c = () => {
|
|
3890
|
+
t.value = !1, s.value = {}, a = 0, n.value?.focus({ preventScroll: !0 });
|
|
3891
|
+
}, u = () => t.value = !t.value, g = (y) => {
|
|
3892
|
+
const D = `dropdown-item-${a++}`;
|
|
3893
|
+
return s.value[D] = y, D;
|
|
3894
|
+
}, $ = (y) => {
|
|
3895
|
+
const D = s.value[y];
|
|
3896
|
+
D && D.focus();
|
|
3897
|
+
}, H = () => {
|
|
3898
|
+
const y = Object.keys(s.value)[0];
|
|
3899
|
+
y && $(y);
|
|
3900
|
+
}, d = () => {
|
|
3901
|
+
const y = Object.keys(s.value), D = y[y.length - 1];
|
|
3902
|
+
D && $(D);
|
|
3903
|
+
}, C = (y) => {
|
|
3904
|
+
const D = Object.keys(s.value), Z = R(y), f = D[Z + 1];
|
|
3905
|
+
Z >= 0 && Z < D.length - 1 && f && $(f);
|
|
3906
|
+
}, I = (y) => {
|
|
3907
|
+
const D = Object.keys(s.value), Z = R(y), f = D[Z - 1];
|
|
3908
|
+
Z > 0 && f && $(f);
|
|
3909
|
+
}, R = (y) => Object.keys(s.value).indexOf(y);
|
|
3910
|
+
return ge("DropdownContext", {
|
|
3911
|
+
open: l,
|
|
3912
|
+
close: c,
|
|
3913
|
+
toggle: u,
|
|
3914
|
+
isOpen: t,
|
|
3915
|
+
registerItem: g,
|
|
3916
|
+
focusItem: $,
|
|
3917
|
+
focusNextItem: C,
|
|
3918
|
+
focusPrevItem: I,
|
|
3919
|
+
focusFirstItem: H,
|
|
3920
|
+
focusLastItem: d,
|
|
3921
|
+
triggerRef: n,
|
|
3922
|
+
menuId: i,
|
|
3923
|
+
triggerId: o
|
|
3924
|
+
}), (y, D) => (v(), m("div", pl, [
|
|
3925
|
+
j(y.$slots, "default")
|
|
3926
|
+
]));
|
|
3927
|
+
}
|
|
3928
|
+
}), bl = /* @__PURE__ */ T({
|
|
3929
|
+
__name: "DropdownTrigger",
|
|
3930
|
+
setup(e) {
|
|
3931
|
+
const a = le("DropdownContext");
|
|
3932
|
+
if (!a) throw new Error("DropdownTrigger must be used within a Dropdown");
|
|
3933
|
+
const t = b(), n = (s) => {
|
|
3934
|
+
s.key === "ArrowDown" && (s.preventDefault(), a.open(), Me(() => a.focusFirstItem())), s.key === "ArrowUp" && (s.preventDefault(), a.open(), Me(() => a.focusLastItem()));
|
|
3935
|
+
};
|
|
3936
|
+
return te(() => a.triggerRef.value = t.value?.el), (s, r) => (v(), J(pe, {
|
|
3937
|
+
ref_key: "btn",
|
|
3938
|
+
ref: t,
|
|
3939
|
+
id: _(a).triggerId,
|
|
3940
|
+
class: "btn-outline ui-dropdown-trigger",
|
|
3941
|
+
"aria-haspopup": "menu",
|
|
3942
|
+
"aria-controls": _(a).menuId,
|
|
3943
|
+
"aria-expanded": _(a).isOpen.value,
|
|
3944
|
+
onClick: _(a).toggle,
|
|
3945
|
+
onKeydown: n
|
|
3946
|
+
}, {
|
|
3947
|
+
default: G(() => [
|
|
3948
|
+
j(s.$slots, "default", {}, void 0, !0),
|
|
3949
|
+
P(ie, { name: "directionDown" })
|
|
3950
|
+
]),
|
|
3951
|
+
_: 3
|
|
3952
|
+
}, 8, ["id", "aria-controls", "aria-expanded", "onClick"]));
|
|
3953
|
+
}
|
|
3954
|
+
}), jl = /* @__PURE__ */ W(bl, [["__scopeId", "data-v-b8f0b77e"]]), gl = ["id", "aria-labelledby"], Cl = /* @__PURE__ */ T({
|
|
3955
|
+
__name: "DropdownMenu",
|
|
3956
|
+
setup(e) {
|
|
3957
|
+
const a = le("DropdownContext");
|
|
3958
|
+
if (!a) throw new Error("DropdownMenu must be used within a Dropdown");
|
|
3959
|
+
const t = b(), n = b({}), s = (o) => {
|
|
3960
|
+
const l = o.target;
|
|
3961
|
+
t.value?.contains(l) || a.triggerRef.value?.contains(l) || a.close();
|
|
3962
|
+
}, r = (o) => o.key === "Escape" && a.close(), i = () => {
|
|
3963
|
+
const o = a.triggerRef.value;
|
|
3964
|
+
if (!o) return;
|
|
3965
|
+
const l = o.getBoundingClientRect();
|
|
3966
|
+
n.value = {
|
|
3967
|
+
position: "fixed",
|
|
3968
|
+
top: `${l.bottom}px`,
|
|
3969
|
+
left: `${l.left}px`
|
|
3970
|
+
};
|
|
3971
|
+
};
|
|
3972
|
+
return Y(
|
|
3973
|
+
() => a.isOpen.value,
|
|
3974
|
+
(o) => {
|
|
3975
|
+
o && (i(), requestAnimationFrame(() => a.focusFirstItem()));
|
|
3976
|
+
}
|
|
3977
|
+
), Y(
|
|
3978
|
+
() => a.isOpen.value,
|
|
3979
|
+
(o) => {
|
|
3980
|
+
o ? document.addEventListener("pointerdown", s, !0) : document.removeEventListener("pointerdown", s, !0);
|
|
3981
|
+
}
|
|
3982
|
+
), te(() => {
|
|
3983
|
+
window.addEventListener("scroll", i, !0), window.addEventListener("resize", i);
|
|
3984
|
+
}), he(() => {
|
|
3985
|
+
window.removeEventListener("scroll", i, !0), window.removeEventListener("resize", i);
|
|
3986
|
+
}), (o, l) => (v(), J(_e, { to: "body" }, [
|
|
3987
|
+
_(a).isOpen.value ? (v(), m("div", {
|
|
3988
|
+
key: 0,
|
|
3989
|
+
role: "menu",
|
|
3990
|
+
ref_key: "menuRef",
|
|
3991
|
+
ref: t,
|
|
3992
|
+
style: be(n.value),
|
|
3993
|
+
id: _(a).menuId,
|
|
3994
|
+
"aria-orientation": "vertical",
|
|
3995
|
+
"aria-labelledby": _(a).triggerId,
|
|
3996
|
+
class: "ui-dropdown-menu",
|
|
3997
|
+
onKeydown: r
|
|
3998
|
+
}, [
|
|
3999
|
+
j(o.$slots, "default", {}, void 0, !0)
|
|
4000
|
+
], 44, gl)) : K("", !0)
|
|
4001
|
+
]));
|
|
4002
|
+
}
|
|
4003
|
+
}), Wl = /* @__PURE__ */ W(Cl, [["__scopeId", "data-v-3b7b0ae5"]]), hl = /* @__PURE__ */ T({
|
|
4004
|
+
__name: "DropdownItem",
|
|
4005
|
+
setup(e) {
|
|
4006
|
+
const a = le("DropdownContext");
|
|
4007
|
+
if (!a) throw new Error("DropdownItem must be used within a Dropdown");
|
|
4008
|
+
let t;
|
|
4009
|
+
const n = b(), s = (r) => {
|
|
4010
|
+
r.key === "ArrowDown" && (r.preventDefault(), a.focusNextItem(t)), r.key === "ArrowUp" && (r.preventDefault(), a.focusPrevItem(t)), (r.key === "Enter" || r.key === " ") && (r.preventDefault(), n.value?.click(), a.close());
|
|
4011
|
+
};
|
|
4012
|
+
return te(() => t = a.registerItem(n.value)), (r, i) => (v(), m("div", {
|
|
4013
|
+
ref_key: "itemRef",
|
|
4014
|
+
ref: n,
|
|
4015
|
+
role: "menuitem",
|
|
4016
|
+
class: "ui-dropdown-item",
|
|
4017
|
+
tabindex: "-1",
|
|
4018
|
+
onKeydown: s,
|
|
4019
|
+
onClick: i[0] || (i[0] = //@ts-ignore
|
|
4020
|
+
(...o) => _(a).close && _(a).close(...o)),
|
|
4021
|
+
onPointerenter: i[1] || (i[1] = (o) => n.value?.focus())
|
|
4022
|
+
}, [
|
|
4023
|
+
j(r.$slots, "default", {}, void 0, !0)
|
|
4024
|
+
], 544));
|
|
4025
|
+
}
|
|
4026
|
+
}), Xl = /* @__PURE__ */ W(hl, [["__scopeId", "data-v-69de3d9c"]]), Gl = T({
|
|
4027
|
+
name: "Table",
|
|
4028
|
+
props: {
|
|
4029
|
+
columns: {
|
|
4030
|
+
type: Array,
|
|
4031
|
+
required: !0
|
|
4032
|
+
},
|
|
4033
|
+
data: {
|
|
4034
|
+
type: Array,
|
|
4035
|
+
required: !0
|
|
4036
|
+
},
|
|
4037
|
+
sort: {
|
|
4038
|
+
type: Object,
|
|
4039
|
+
default: null
|
|
4040
|
+
},
|
|
4041
|
+
rowClickable: {
|
|
4042
|
+
type: Boolean,
|
|
4043
|
+
default: !1
|
|
4044
|
+
},
|
|
4045
|
+
responsive: {
|
|
4046
|
+
type: String,
|
|
4047
|
+
default: "auto"
|
|
4048
|
+
},
|
|
4049
|
+
loading: Boolean
|
|
4050
|
+
},
|
|
4051
|
+
emits: ["update:sort", "rowClick"],
|
|
4052
|
+
setup(e, { emit: a, slots: t }) {
|
|
4053
|
+
const n = (o) => {
|
|
4054
|
+
if (!o.sortable) return;
|
|
4055
|
+
const l = e.sort?.key === o.key && e.sort.direction === "asc" ? "desc" : "asc";
|
|
4056
|
+
a("update:sort", { key: o.key, direction: l });
|
|
4057
|
+
}, s = () => window.matchMedia("(max-width: 640px)").matches, r = () => F(
|
|
4058
|
+
"div",
|
|
4059
|
+
{
|
|
4060
|
+
class: "rs-table-mobile",
|
|
4061
|
+
role: "list",
|
|
4062
|
+
"aria-busy": e.loading || void 0
|
|
4063
|
+
},
|
|
4064
|
+
e.loading ? t.loading?.() ?? "Loading..." : e.data.length === 0 ? t.empty?.() ?? "No data available." : e.data.map(
|
|
4065
|
+
(o, l) => F(
|
|
4066
|
+
"div",
|
|
4067
|
+
{
|
|
4068
|
+
key: o.id ?? l,
|
|
4069
|
+
class: "rs-table-card",
|
|
4070
|
+
role: e.rowClickable ? "button" : "listitem",
|
|
4071
|
+
tabindex: e.rowClickable ? 0 : void 0,
|
|
4072
|
+
onClick: e.rowClickable ? () => a("rowClick", o) : void 0,
|
|
4073
|
+
onKeydown: e.rowClickable ? (c) => {
|
|
4074
|
+
(c.key === "Enter" || c.key === " ") && (c.preventDefault(), a("rowClick", o));
|
|
4075
|
+
} : void 0
|
|
4076
|
+
},
|
|
4077
|
+
e.columns.map(
|
|
4078
|
+
(c) => F(
|
|
4079
|
+
"div",
|
|
4080
|
+
{ class: "rs-table-card-row" },
|
|
4081
|
+
[
|
|
4082
|
+
F(
|
|
4083
|
+
"span",
|
|
4084
|
+
{ class: "rs-table-card-label" },
|
|
4085
|
+
c.header
|
|
4086
|
+
),
|
|
4087
|
+
F(
|
|
4088
|
+
"span",
|
|
4089
|
+
{ class: "rs-table-card-value" },
|
|
4090
|
+
t.cell?.({
|
|
4091
|
+
row: o,
|
|
4092
|
+
column: c,
|
|
4093
|
+
value: o[c.key]
|
|
4094
|
+
}) ?? o[c.key]
|
|
4095
|
+
)
|
|
4096
|
+
]
|
|
4097
|
+
)
|
|
4098
|
+
)
|
|
4099
|
+
)
|
|
4100
|
+
)
|
|
4101
|
+
), i = () => F(
|
|
4102
|
+
"div",
|
|
4103
|
+
{ class: "rs-table-container" },
|
|
4104
|
+
F(
|
|
4105
|
+
"div",
|
|
4106
|
+
{ class: "rs-table-scroll" },
|
|
4107
|
+
F(
|
|
4108
|
+
"table",
|
|
4109
|
+
{
|
|
4110
|
+
class: "rs-table",
|
|
4111
|
+
"aria-busy": e.loading || void 0
|
|
4112
|
+
},
|
|
4113
|
+
[
|
|
4114
|
+
F(
|
|
4115
|
+
"thead",
|
|
4116
|
+
null,
|
|
4117
|
+
F(
|
|
4118
|
+
"tr",
|
|
4119
|
+
null,
|
|
4120
|
+
e.columns.map(
|
|
4121
|
+
(o) => F(
|
|
4122
|
+
"th",
|
|
4123
|
+
{
|
|
4124
|
+
key: o.key,
|
|
4125
|
+
style: {
|
|
4126
|
+
width: o.width || "auto",
|
|
4127
|
+
textAlign: o.align || "left"
|
|
4128
|
+
},
|
|
4129
|
+
"aria-sort": o.sortable ? e.sort?.key === o.key ? e.sort.direction === "asc" ? "ascending" : "descending" : "none" : void 0,
|
|
4130
|
+
tabindex: o.sortable ? 0 : void 0,
|
|
4131
|
+
onClick: o.sortable ? () => n(o) : void 0,
|
|
4132
|
+
onKeydown: o.sortable ? (l) => {
|
|
4133
|
+
(l.key === "Enter" || l.key === " ") && (l.preventDefault(), n(o));
|
|
4134
|
+
} : void 0,
|
|
4135
|
+
scope: "col"
|
|
4136
|
+
},
|
|
4137
|
+
F(
|
|
4138
|
+
"div",
|
|
4139
|
+
{ class: "rs-table-th-content" },
|
|
4140
|
+
[
|
|
4141
|
+
F(
|
|
4142
|
+
"span",
|
|
4143
|
+
o.header
|
|
4144
|
+
),
|
|
4145
|
+
o.sortable ? F(
|
|
4146
|
+
ie,
|
|
4147
|
+
{
|
|
4148
|
+
name: e.sort?.key === o.key ? e.sort.direction === "asc" ? "sortAsc" : "sortDesc" : "sort",
|
|
4149
|
+
size: 16
|
|
4150
|
+
}
|
|
4151
|
+
) : null
|
|
4152
|
+
]
|
|
4153
|
+
)
|
|
4154
|
+
)
|
|
4155
|
+
)
|
|
4156
|
+
)
|
|
4157
|
+
),
|
|
4158
|
+
F(
|
|
4159
|
+
"tbody",
|
|
4160
|
+
null,
|
|
4161
|
+
e.loading ? [
|
|
4162
|
+
F(
|
|
4163
|
+
"tr",
|
|
4164
|
+
null,
|
|
4165
|
+
[
|
|
4166
|
+
F(
|
|
4167
|
+
"td",
|
|
4168
|
+
{ colspan: e.columns.length },
|
|
4169
|
+
t.loading?.() ?? "Loading..."
|
|
4170
|
+
)
|
|
4171
|
+
]
|
|
4172
|
+
)
|
|
4173
|
+
] : e.data.length === 0 ? [
|
|
4174
|
+
F(
|
|
4175
|
+
"tr",
|
|
4176
|
+
null,
|
|
4177
|
+
[
|
|
4178
|
+
F(
|
|
4179
|
+
"td",
|
|
4180
|
+
{ colspan: e.columns.length },
|
|
4181
|
+
t.empty?.() ?? "No data available."
|
|
4182
|
+
)
|
|
4183
|
+
]
|
|
4184
|
+
)
|
|
4185
|
+
] : e.data.map(
|
|
4186
|
+
(o, l) => F(
|
|
4187
|
+
"tr",
|
|
4188
|
+
{
|
|
4189
|
+
key: o.id ?? l,
|
|
4190
|
+
tabindex: e.rowClickable ? 0 : void 0,
|
|
4191
|
+
role: e.rowClickable ? "button" : void 0,
|
|
4192
|
+
onClick: e.rowClickable ? () => a("rowClick", o) : void 0,
|
|
4193
|
+
onKeydown: e.rowClickable ? (c) => {
|
|
4194
|
+
(c.key === "Enter" || c.key === " ") && (c.preventDefault(), a("rowClick", o));
|
|
4195
|
+
} : void 0,
|
|
4196
|
+
"data-clickable": e.rowClickable || void 0
|
|
4197
|
+
},
|
|
4198
|
+
e.columns.map(
|
|
4199
|
+
(c) => F(
|
|
4200
|
+
"td",
|
|
4201
|
+
{
|
|
4202
|
+
key: c.key,
|
|
4203
|
+
style: {
|
|
4204
|
+
textAlign: c.align || "left"
|
|
4205
|
+
}
|
|
4206
|
+
},
|
|
4207
|
+
t.cell?.({
|
|
4208
|
+
row: o,
|
|
4209
|
+
column: c,
|
|
4210
|
+
value: o[c.key]
|
|
4211
|
+
}) ?? o[c.key]
|
|
4212
|
+
)
|
|
4213
|
+
)
|
|
4214
|
+
)
|
|
4215
|
+
)
|
|
4216
|
+
)
|
|
4217
|
+
]
|
|
4218
|
+
)
|
|
4219
|
+
)
|
|
4220
|
+
);
|
|
4221
|
+
return () => {
|
|
4222
|
+
const o = e.responsive === "card" || e.responsive === "auto" && s();
|
|
4223
|
+
return F(
|
|
4224
|
+
"div",
|
|
4225
|
+
{ class: "rs-table-container" },
|
|
4226
|
+
o ? r() : i()
|
|
4227
|
+
);
|
|
4228
|
+
};
|
|
4229
|
+
}
|
|
4230
|
+
}), Se = /* @__PURE__ */ Symbol("AccordionContext"), Jl = T({
|
|
4231
|
+
name: "Accordion",
|
|
4232
|
+
props: {
|
|
4233
|
+
multiple: { type: Boolean, default: !1 },
|
|
4234
|
+
defaultOpen: {
|
|
4235
|
+
type: Array,
|
|
4236
|
+
default: () => []
|
|
4237
|
+
}
|
|
4238
|
+
},
|
|
4239
|
+
setup(e, { slots: a }) {
|
|
4240
|
+
const t = b([]), n = b(new Set(e.defaultOpen)), s = (g) => {
|
|
4241
|
+
if (n.value.has(g)) {
|
|
4242
|
+
n.value.delete(g);
|
|
4243
|
+
return;
|
|
4244
|
+
}
|
|
4245
|
+
e.multiple || n.value.clear(), n.value.add(g);
|
|
4246
|
+
}, r = (g) => {
|
|
4247
|
+
g.disabled || t.value.includes(g) || (t.value.push(g), t.value.sort(($, H) => $.offsetTop - H.offsetTop));
|
|
4248
|
+
}, i = (g) => t.value = t.value.filter(($) => $ !== g), o = (g) => {
|
|
4249
|
+
const $ = t.value.indexOf(g);
|
|
4250
|
+
t.value[($ + 1) % t.value.length]?.focus();
|
|
4251
|
+
}, l = (g) => {
|
|
4252
|
+
const $ = t.value.indexOf(g);
|
|
4253
|
+
t.value[($ - 1 + t.value.length) % t.value.length]?.focus();
|
|
4254
|
+
}, c = () => t.value[0]?.focus(), u = () => {
|
|
4255
|
+
const g = t.value;
|
|
4256
|
+
g.length && g[g.length - 1]?.focus();
|
|
4257
|
+
};
|
|
4258
|
+
return ge(Se, {
|
|
4259
|
+
multiple: e.multiple,
|
|
4260
|
+
openItems: n,
|
|
4261
|
+
toggle: s,
|
|
4262
|
+
registerHeader: r,
|
|
4263
|
+
unregisterHeader: i,
|
|
4264
|
+
focusNext: o,
|
|
4265
|
+
focusPrev: l,
|
|
4266
|
+
focusFirst: c,
|
|
4267
|
+
focusLast: u
|
|
4268
|
+
}), () => a.default?.();
|
|
4269
|
+
}
|
|
4270
|
+
}), Yl = T({
|
|
4271
|
+
name: "AccordionItem",
|
|
4272
|
+
props: {
|
|
4273
|
+
id: { type: String, required: !0 },
|
|
4274
|
+
disabled: { type: Boolean, default: !1 }
|
|
4275
|
+
},
|
|
4276
|
+
setup(e, { slots: a }) {
|
|
4277
|
+
const t = le(Se);
|
|
4278
|
+
if (!t) throw new Error("AccordionItem must be used inside Accordion");
|
|
4279
|
+
const n = L(() => t.openItems.value.has(e.id));
|
|
4280
|
+
return () => F(
|
|
4281
|
+
"div",
|
|
4282
|
+
{
|
|
4283
|
+
class: "rs-accordion-item",
|
|
4284
|
+
"data-state": n.value ? "open" : "closed"
|
|
4285
|
+
},
|
|
4286
|
+
a.default?.({ open: n.value })
|
|
4287
|
+
);
|
|
4288
|
+
}
|
|
4289
|
+
}), Ql = T({
|
|
4290
|
+
name: "AccordionHeader",
|
|
4291
|
+
props: {
|
|
4292
|
+
id: { type: String, required: !0 },
|
|
4293
|
+
disabled: { type: Boolean, default: !1 }
|
|
4294
|
+
},
|
|
4295
|
+
setup(e, { slots: a }) {
|
|
4296
|
+
const t = le(Se), n = b(null);
|
|
4297
|
+
if (!t) throw new Error("AccordionHeader must be used inside Accordion");
|
|
4298
|
+
const s = L(() => t.openItems.value.has(e.id)), r = () => {
|
|
4299
|
+
e.disabled || t.toggle?.(e.id);
|
|
4300
|
+
}, i = (o) => {
|
|
4301
|
+
if (n.value)
|
|
4302
|
+
switch (o.key) {
|
|
4303
|
+
case "ArrowDown":
|
|
4304
|
+
o.preventDefault(), t.focusNext(n.value);
|
|
4305
|
+
break;
|
|
4306
|
+
case "ArrowUp":
|
|
4307
|
+
o.preventDefault(), t.focusPrev(n.value);
|
|
4308
|
+
break;
|
|
4309
|
+
case "Home":
|
|
4310
|
+
o.preventDefault(), t.focusFirst();
|
|
4311
|
+
break;
|
|
4312
|
+
case "End":
|
|
4313
|
+
o.preventDefault(), t.focusLast();
|
|
4314
|
+
break;
|
|
4315
|
+
}
|
|
4316
|
+
};
|
|
4317
|
+
return te(() => {
|
|
4318
|
+
n.value && t.registerHeader(n.value);
|
|
4319
|
+
}), Ve(() => {
|
|
4320
|
+
n.value && t.unregisterHeader(n.value);
|
|
4321
|
+
}), () => F(
|
|
4322
|
+
"button",
|
|
4323
|
+
{
|
|
4324
|
+
ref: n,
|
|
4325
|
+
id: `header-${e.id}`,
|
|
4326
|
+
type: "button",
|
|
4327
|
+
class: "rs-accordion-trigger",
|
|
4328
|
+
"aria-expanded": s.value,
|
|
4329
|
+
"aria-controls": `panel-${e.id}`,
|
|
4330
|
+
disabled: e.disabled,
|
|
4331
|
+
"data-state": s.value ? "open" : "closed",
|
|
4332
|
+
onClick: r,
|
|
4333
|
+
onKeydown: i
|
|
4334
|
+
},
|
|
4335
|
+
[
|
|
4336
|
+
F(
|
|
4337
|
+
"span",
|
|
4338
|
+
{ class: "rs-accordion-trigger__label" },
|
|
4339
|
+
a.default?.()
|
|
4340
|
+
),
|
|
4341
|
+
F(
|
|
4342
|
+
"span",
|
|
4343
|
+
{ class: "rs-accordion-trigger__icon", "aria-hidden": "true" },
|
|
4344
|
+
F(ie, { name: "directionDown" })
|
|
4345
|
+
)
|
|
4346
|
+
]
|
|
4347
|
+
);
|
|
4348
|
+
}
|
|
4349
|
+
}), es = T({
|
|
4350
|
+
name: "AccordionPanel",
|
|
4351
|
+
props: {
|
|
4352
|
+
id: { type: String, required: !0 }
|
|
4353
|
+
},
|
|
4354
|
+
setup(e, { slots: a }) {
|
|
4355
|
+
const t = le(Se);
|
|
4356
|
+
if (!t) throw new Error("AccordionPanel must be used inside Accordion");
|
|
4357
|
+
const n = L(() => t.openItems.value.has(e.id));
|
|
4358
|
+
return () => F(
|
|
4359
|
+
"div",
|
|
4360
|
+
{
|
|
4361
|
+
id: `panel-${e.id}`,
|
|
4362
|
+
class: "rs-accordion-panel",
|
|
4363
|
+
role: "region",
|
|
4364
|
+
"aria-hidden": !n.value,
|
|
4365
|
+
"data-state": n.value ? "open" : "closed",
|
|
4366
|
+
"aria-labelledby": `header-${e.id}`
|
|
4367
|
+
},
|
|
4368
|
+
F(
|
|
4369
|
+
"div",
|
|
4370
|
+
{ class: "rs-accordion-panel__inner" },
|
|
4371
|
+
a.default?.()
|
|
4372
|
+
)
|
|
4373
|
+
);
|
|
4374
|
+
}
|
|
4375
|
+
});
|
|
4376
|
+
export {
|
|
4377
|
+
Jl as Accordion,
|
|
4378
|
+
Ql as AccordionHeader,
|
|
4379
|
+
Yl as AccordionItem,
|
|
4380
|
+
es as AccordionPanel,
|
|
4381
|
+
Vl as Autocomplete,
|
|
4382
|
+
Ll as Avatar,
|
|
4383
|
+
xl as Breadcrumb,
|
|
4384
|
+
pe as Button,
|
|
4385
|
+
Bl as Card,
|
|
4386
|
+
Al as CardBody,
|
|
4387
|
+
Sl as CardFooter,
|
|
4388
|
+
Tl as CardHeader,
|
|
4389
|
+
Nl as Carousel,
|
|
4390
|
+
ql as CarouselItem,
|
|
4391
|
+
Ul as Dropdown,
|
|
4392
|
+
Xl as DropdownItem,
|
|
4393
|
+
Wl as DropdownMenu,
|
|
4394
|
+
jl as DropdownTrigger,
|
|
4395
|
+
Je as Editor,
|
|
4396
|
+
Kn as Highlight,
|
|
4397
|
+
ie as Icon,
|
|
4398
|
+
$e as Image,
|
|
4399
|
+
tt as ImageGallery,
|
|
4400
|
+
wl as Input,
|
|
4401
|
+
kl as Link,
|
|
4402
|
+
De as Modal,
|
|
4403
|
+
ct as ModalBody,
|
|
4404
|
+
vt as ModalClose,
|
|
4405
|
+
it as ModalContent,
|
|
4406
|
+
$l as ModalFooter,
|
|
4407
|
+
dt as ModalHeader,
|
|
4408
|
+
ut as ModalTitle,
|
|
4409
|
+
Hl as RadioButton,
|
|
4410
|
+
Ml as Select,
|
|
4411
|
+
ft as Spinner,
|
|
4412
|
+
Zl as Step,
|
|
4413
|
+
El as Steps,
|
|
4414
|
+
Gl as Table,
|
|
4415
|
+
zl as Tabs,
|
|
4416
|
+
Pl as TabsContent,
|
|
4417
|
+
Fl as TabsList,
|
|
4418
|
+
Kl as TabsTrigger,
|
|
4419
|
+
Qa as Tag,
|
|
4420
|
+
Il as Textarea,
|
|
4421
|
+
Dl as Timeline,
|
|
4422
|
+
Ol as TimelineItem,
|
|
4423
|
+
Rl as ToastPlugin,
|
|
4424
|
+
at as ToastViewport,
|
|
4425
|
+
Qe as Tooltip,
|
|
4426
|
+
Ye as Upload,
|
|
4427
|
+
_l as toast
|
|
4428
|
+
};
|