@leodamours/ds-components 0.3.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1047 -996
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as z, ref as j, watch as
|
|
1
|
+
import { defineComponent as z, ref as j, watch as re, computed as w, openBlock as g, createElementBlock as p, normalizeClass as V, toDisplayString as L, createCommentVNode as R, renderSlot as P, createTextVNode as K, createBlock as N, resolveDynamicComponent as Te, normalizeStyle as _, createElementVNode as $, shallowRef as Tt, getCurrentScope as Vt, onScopeDispose as Rt, shallowReadonly as he, unref as S, mergeProps as me, createVNode as te, withCtx as Ae, Teleport as Oe, withModifiers as Lt, Fragment as le, renderList as ie, nextTick as fe, onMounted as qe, withKeys as rt, onBeforeUnmount as Ke, Transition as lt, reactive as Bt, TransitionGroup as St } from "vue";
|
|
2
2
|
import { a as Mo, c as jo, e as Po, g as Io, b as Fo, d as No, h as Wo, f as Ho, r as qo, s as Ko, i as Uo, t as Xo } from "./palette-DkSoRw54.js";
|
|
3
|
-
const
|
|
3
|
+
const At = ["aria-label"], Ot = ["src", "alt"], ho = /* @__PURE__ */ z({
|
|
4
4
|
__name: "DsAvatar",
|
|
5
5
|
props: {
|
|
6
6
|
src: {},
|
|
@@ -11,7 +11,7 @@ const Bt = ["aria-label"], At = ["src", "alt"], ho = /* @__PURE__ */ z({
|
|
|
11
11
|
},
|
|
12
12
|
setup(e) {
|
|
13
13
|
const n = e, t = j(!1);
|
|
14
|
-
|
|
14
|
+
re(() => n.src, () => {
|
|
15
15
|
t.value = !1;
|
|
16
16
|
});
|
|
17
17
|
const s = w(() => n.name ? n.name.split(" ").map((a) => a[0]).slice(0, 2).join("").toUpperCase() : "?"), o = w(() => [
|
|
@@ -40,23 +40,23 @@ const Bt = ["aria-label"], At = ["src", "alt"], ho = /* @__PURE__ */ z({
|
|
|
40
40
|
neutral: "bg-neutral-soft text-neutral-on-soft"
|
|
41
41
|
}[n.variant]
|
|
42
42
|
].join(" "));
|
|
43
|
-
return (a, i) => (g(),
|
|
44
|
-
class:
|
|
43
|
+
return (a, i) => (g(), p("span", {
|
|
44
|
+
class: V(o.value),
|
|
45
45
|
role: "img",
|
|
46
46
|
"aria-label": e.alt || e.name
|
|
47
47
|
}, [
|
|
48
|
-
e.src && !t.value ? (g(),
|
|
48
|
+
e.src && !t.value ? (g(), p("img", {
|
|
49
49
|
key: 0,
|
|
50
50
|
src: e.src,
|
|
51
51
|
alt: e.alt || e.name || "",
|
|
52
52
|
class: "w-full h-full object-cover rounded-full",
|
|
53
|
-
onError: i[0] || (i[0] = (
|
|
54
|
-
}, null, 40,
|
|
53
|
+
onError: i[0] || (i[0] = (l) => t.value = !0)
|
|
54
|
+
}, null, 40, Ot)) : (g(), p("span", {
|
|
55
55
|
key: 1,
|
|
56
|
-
class:
|
|
56
|
+
class: V(r.value),
|
|
57
57
|
"aria-hidden": "true"
|
|
58
58
|
}, L(s.value), 3))
|
|
59
|
-
], 10,
|
|
59
|
+
], 10, At));
|
|
60
60
|
}
|
|
61
61
|
}), vo = /* @__PURE__ */ z({
|
|
62
62
|
__name: "DsBadge",
|
|
@@ -100,20 +100,20 @@ const Bt = ["aria-label"], At = ["src", "alt"], ho = /* @__PURE__ */ z({
|
|
|
100
100
|
};
|
|
101
101
|
return ["inline-block", "rounded-full", o[n.size], r[n.variant]].join(" ");
|
|
102
102
|
});
|
|
103
|
-
return (o, r) => (g(),
|
|
104
|
-
class:
|
|
103
|
+
return (o, r) => (g(), p("span", {
|
|
104
|
+
class: V(t.value)
|
|
105
105
|
}, [
|
|
106
|
-
e.dot ? (g(),
|
|
106
|
+
e.dot ? (g(), p("span", {
|
|
107
107
|
key: 0,
|
|
108
|
-
class:
|
|
108
|
+
class: V(s.value),
|
|
109
109
|
"aria-hidden": "true"
|
|
110
|
-
}, null, 2)) :
|
|
111
|
-
e.dot ?
|
|
110
|
+
}, null, 2)) : R("", !0),
|
|
111
|
+
e.dot ? R("", !0) : P(o.$slots, "default", { key: 1 }, () => [
|
|
112
112
|
K(L(e.label), 1)
|
|
113
113
|
])
|
|
114
114
|
], 2));
|
|
115
115
|
}
|
|
116
|
-
}),
|
|
116
|
+
}), zt = ["type", "disabled", "aria-label", "aria-busy"], Et = { key: 1 }, it = /* @__PURE__ */ z({
|
|
117
117
|
__name: "DsButton",
|
|
118
118
|
props: {
|
|
119
119
|
label: {},
|
|
@@ -218,33 +218,33 @@ const Bt = ["aria-label"], At = ["src", "alt"], ho = /* @__PURE__ */ z({
|
|
|
218
218
|
medium: "w-4 h-4",
|
|
219
219
|
large: "w-5 h-5"
|
|
220
220
|
})[n.size]);
|
|
221
|
-
return (o, r) => (g(),
|
|
221
|
+
return (o, r) => (g(), p("button", {
|
|
222
222
|
type: e.htmlType,
|
|
223
223
|
disabled: e.disabled || e.loading,
|
|
224
224
|
"aria-label": e.ariaLabel,
|
|
225
225
|
"aria-busy": e.loading ? "true" : void 0,
|
|
226
|
-
class:
|
|
226
|
+
class: V(t.value),
|
|
227
227
|
onClick: r[0] || (r[0] = (a) => o.$emit("click", a))
|
|
228
228
|
}, [
|
|
229
229
|
e.iconLeft ? (g(), N(Te(e.iconLeft), {
|
|
230
230
|
key: 0,
|
|
231
|
-
class:
|
|
232
|
-
style:
|
|
231
|
+
class: V(s.value),
|
|
232
|
+
style: _(e.label || o.$slots.default ? "margin-right: 0.375rem" : ""),
|
|
233
233
|
"aria-hidden": "true"
|
|
234
|
-
}, null, 8, ["class", "style"])) :
|
|
235
|
-
e.label ? (g(),
|
|
234
|
+
}, null, 8, ["class", "style"])) : R("", !0),
|
|
235
|
+
e.label ? (g(), p("span", Et, L(e.label), 1)) : P(o.$slots, "default", { key: 2 }),
|
|
236
236
|
e.iconRight ? (g(), N(Te(e.iconRight), {
|
|
237
237
|
key: 3,
|
|
238
|
-
class:
|
|
239
|
-
style:
|
|
238
|
+
class: V(s.value),
|
|
239
|
+
style: _(e.label || o.$slots.default ? "margin-left: 0.375rem" : ""),
|
|
240
240
|
"aria-hidden": "true"
|
|
241
|
-
}, null, 8, ["class", "style"])) :
|
|
242
|
-
], 10,
|
|
241
|
+
}, null, 8, ["class", "style"])) : R("", !0)
|
|
242
|
+
], 10, zt));
|
|
243
243
|
}
|
|
244
|
-
}),
|
|
244
|
+
}), Mt = {
|
|
245
245
|
key: 0,
|
|
246
246
|
class: "px-4 py-3 border-b border-b-solid border-border"
|
|
247
|
-
},
|
|
247
|
+
}, jt = {
|
|
248
248
|
key: 1,
|
|
249
249
|
class: "px-4 py-3 border-t border-t-solid border-border"
|
|
250
250
|
}, po = /* @__PURE__ */ z({
|
|
@@ -256,29 +256,29 @@ const Bt = ["aria-label"], At = ["src", "alt"], ho = /* @__PURE__ */ z({
|
|
|
256
256
|
setup(e) {
|
|
257
257
|
const n = e, t = w(() => {
|
|
258
258
|
const o = ["rounded-lg", "bg-bg", "overflow-hidden"], r = {
|
|
259
|
-
default: ["border", "border-solid", "border-border-strong"
|
|
259
|
+
default: ["border", "border-solid", "border-border-strong"],
|
|
260
260
|
outlined: ["border", "border-solid", "border-border-strong"],
|
|
261
261
|
elevated: ["shadow-default"]
|
|
262
262
|
};
|
|
263
263
|
return [...o, ...r[n.variant]].join(" ");
|
|
264
264
|
}), s = w(() => n.noPadding ? "" : "px-4 py-4");
|
|
265
|
-
return (o, r) => (g(),
|
|
266
|
-
class:
|
|
265
|
+
return (o, r) => (g(), p("div", {
|
|
266
|
+
class: V(t.value)
|
|
267
267
|
}, [
|
|
268
|
-
o.$slots.header ? (g(),
|
|
268
|
+
o.$slots.header ? (g(), p("div", Mt, [
|
|
269
269
|
P(o.$slots, "header")
|
|
270
|
-
])) :
|
|
271
|
-
|
|
272
|
-
class:
|
|
270
|
+
])) : R("", !0),
|
|
271
|
+
$("div", {
|
|
272
|
+
class: V(s.value)
|
|
273
273
|
}, [
|
|
274
274
|
P(o.$slots, "default")
|
|
275
275
|
], 2),
|
|
276
|
-
o.$slots.footer ? (g(),
|
|
276
|
+
o.$slots.footer ? (g(), p("div", jt, [
|
|
277
277
|
P(o.$slots, "footer")
|
|
278
|
-
])) :
|
|
278
|
+
])) : R("", !0)
|
|
279
279
|
], 2));
|
|
280
280
|
}
|
|
281
|
-
}),
|
|
281
|
+
}), Pt = ["id", "checked", "disabled", "value"], It = {
|
|
282
282
|
key: 0,
|
|
283
283
|
viewBox: "0 0 12 12",
|
|
284
284
|
fill: "none",
|
|
@@ -304,39 +304,39 @@ const Bt = ["aria-label"], At = ["src", "alt"], ho = /* @__PURE__ */ z({
|
|
|
304
304
|
medium: { box: "w-4 h-4", label: "text-sm", radius: "rounded" },
|
|
305
305
|
large: { box: "w-5 h-5", label: "text-base", radius: "rounded-md" }
|
|
306
306
|
}, r = w(() => {
|
|
307
|
-
const
|
|
308
|
-
|
|
309
|
-
|
|
307
|
+
const l = o[t.size], c = [
|
|
308
|
+
l.box,
|
|
309
|
+
l.radius,
|
|
310
310
|
"inline-flex items-center justify-center",
|
|
311
311
|
"border border-solid",
|
|
312
312
|
"transition-all duration-fast",
|
|
313
313
|
"shrink-0"
|
|
314
314
|
];
|
|
315
|
-
return t.disabled ?
|
|
315
|
+
return t.disabled ? c.push(
|
|
316
316
|
t.modelValue ? "bg-brand-disabled border-brand-disabled text-brand-on-solid" : "bg-bg-tertiary border-border text-transparent",
|
|
317
317
|
"opacity-60"
|
|
318
|
-
) : t.modelValue ?
|
|
318
|
+
) : t.modelValue ? c.push("bg-brand border-brand text-brand-on-solid") : c.push(
|
|
319
319
|
"bg-bg border-border-strong text-transparent",
|
|
320
320
|
"group-hover:border-brand",
|
|
321
321
|
"peer-focus-visible:ring-2 peer-focus-visible:ring-focus-ring peer-focus-visible:ring-offset-2"
|
|
322
|
-
),
|
|
322
|
+
), c.join(" ");
|
|
323
323
|
}), a = w(() => [
|
|
324
324
|
"font-sans select-none",
|
|
325
325
|
o[t.size].label,
|
|
326
326
|
t.disabled ? "text-fg-disabled" : "text-fg"
|
|
327
|
-
].join(" ")), i = (
|
|
327
|
+
].join(" ")), i = (l) => {
|
|
328
328
|
if (t.disabled) return;
|
|
329
|
-
const d =
|
|
330
|
-
s("update:modelValue", d), s("change", d,
|
|
329
|
+
const d = l.target.checked;
|
|
330
|
+
s("update:modelValue", d), s("change", d, l);
|
|
331
331
|
};
|
|
332
|
-
return (
|
|
333
|
-
class:
|
|
332
|
+
return (l, c) => (g(), p("label", {
|
|
333
|
+
class: V([
|
|
334
334
|
"inline-flex items-center gap-2",
|
|
335
335
|
e.disabled ? "cursor-not-allowed" : "cursor-pointer",
|
|
336
336
|
"group"
|
|
337
337
|
])
|
|
338
338
|
}, [
|
|
339
|
-
|
|
339
|
+
$("input", {
|
|
340
340
|
id: e.id,
|
|
341
341
|
type: "checkbox",
|
|
342
342
|
checked: e.modelValue,
|
|
@@ -344,97 +344,97 @@ const Bt = ["aria-label"], At = ["src", "alt"], ho = /* @__PURE__ */ z({
|
|
|
344
344
|
value: e.value,
|
|
345
345
|
class: "sr-only peer",
|
|
346
346
|
onChange: i
|
|
347
|
-
}, null, 40,
|
|
348
|
-
|
|
349
|
-
class:
|
|
347
|
+
}, null, 40, Pt),
|
|
348
|
+
$("span", {
|
|
349
|
+
class: V(r.value),
|
|
350
350
|
"aria-hidden": "true"
|
|
351
351
|
}, [
|
|
352
|
-
e.modelValue ? (g(),
|
|
353
|
-
|
|
354
|
-
])])) :
|
|
352
|
+
e.modelValue ? (g(), p("svg", It, [...c[0] || (c[0] = [
|
|
353
|
+
$("polyline", { points: "2.5 6 5 8.5 9.5 3.5" }, null, -1)
|
|
354
|
+
])])) : R("", !0)
|
|
355
355
|
], 2),
|
|
356
|
-
e.label ||
|
|
356
|
+
e.label || l.$slots.default ? (g(), p("span", {
|
|
357
357
|
key: 0,
|
|
358
|
-
class:
|
|
358
|
+
class: V(a.value)
|
|
359
359
|
}, [
|
|
360
|
-
P(
|
|
360
|
+
P(l.$slots, "default", {}, () => [
|
|
361
361
|
K(L(e.label), 1)
|
|
362
362
|
])
|
|
363
|
-
], 2)) :
|
|
363
|
+
], 2)) : R("", !0)
|
|
364
364
|
], 2));
|
|
365
365
|
}
|
|
366
|
-
}),
|
|
366
|
+
}), ce = Math.min, q = Math.max, Ve = Math.round, De = Math.floor, Z = (e) => ({
|
|
367
367
|
x: e,
|
|
368
368
|
y: e
|
|
369
|
-
}),
|
|
369
|
+
}), Ft = {
|
|
370
370
|
left: "right",
|
|
371
371
|
right: "left",
|
|
372
372
|
bottom: "top",
|
|
373
373
|
top: "bottom"
|
|
374
|
-
},
|
|
374
|
+
}, Nt = {
|
|
375
375
|
start: "end",
|
|
376
376
|
end: "start"
|
|
377
377
|
};
|
|
378
378
|
function Fe(e, n, t) {
|
|
379
|
-
return q(e,
|
|
379
|
+
return q(e, ce(n, t));
|
|
380
380
|
}
|
|
381
|
-
function
|
|
381
|
+
function xe(e, n) {
|
|
382
382
|
return typeof e == "function" ? e(n) : e;
|
|
383
383
|
}
|
|
384
|
-
function
|
|
384
|
+
function de(e) {
|
|
385
385
|
return e.split("-")[0];
|
|
386
386
|
}
|
|
387
|
-
function
|
|
387
|
+
function we(e) {
|
|
388
388
|
return e.split("-")[1];
|
|
389
389
|
}
|
|
390
390
|
function ct(e) {
|
|
391
391
|
return e === "x" ? "y" : "x";
|
|
392
392
|
}
|
|
393
|
-
function
|
|
393
|
+
function Ue(e) {
|
|
394
394
|
return e === "y" ? "height" : "width";
|
|
395
395
|
}
|
|
396
|
-
const
|
|
397
|
-
function
|
|
398
|
-
return
|
|
396
|
+
const Wt = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
397
|
+
function se(e) {
|
|
398
|
+
return Wt.has(de(e)) ? "y" : "x";
|
|
399
399
|
}
|
|
400
|
-
function
|
|
401
|
-
return ct(
|
|
400
|
+
function Xe(e) {
|
|
401
|
+
return ct(se(e));
|
|
402
402
|
}
|
|
403
|
-
function
|
|
403
|
+
function Ht(e, n, t) {
|
|
404
404
|
t === void 0 && (t = !1);
|
|
405
|
-
const s =
|
|
405
|
+
const s = we(e), o = Xe(e), r = Ue(o);
|
|
406
406
|
let a = o === "x" ? s === (t ? "end" : "start") ? "right" : "left" : s === "start" ? "bottom" : "top";
|
|
407
407
|
return n.reference[r] > n.floating[r] && (a = Re(a)), [a, Re(a)];
|
|
408
408
|
}
|
|
409
|
-
function
|
|
409
|
+
function qt(e) {
|
|
410
410
|
const n = Re(e);
|
|
411
411
|
return [Ne(e), n, Ne(n)];
|
|
412
412
|
}
|
|
413
413
|
function Ne(e) {
|
|
414
|
-
return e.replace(/start|end/g, (n) =>
|
|
414
|
+
return e.replace(/start|end/g, (n) => Nt[n]);
|
|
415
415
|
}
|
|
416
|
-
const
|
|
417
|
-
function
|
|
416
|
+
const Ze = ["left", "right"], _e = ["right", "left"], Kt = ["top", "bottom"], Ut = ["bottom", "top"];
|
|
417
|
+
function Xt(e, n, t) {
|
|
418
418
|
switch (e) {
|
|
419
419
|
case "top":
|
|
420
420
|
case "bottom":
|
|
421
|
-
return t ? n ?
|
|
421
|
+
return t ? n ? _e : Ze : n ? Ze : _e;
|
|
422
422
|
case "left":
|
|
423
423
|
case "right":
|
|
424
|
-
return n ?
|
|
424
|
+
return n ? Kt : Ut;
|
|
425
425
|
default:
|
|
426
426
|
return [];
|
|
427
427
|
}
|
|
428
428
|
}
|
|
429
|
-
function
|
|
430
|
-
const o =
|
|
431
|
-
let r =
|
|
429
|
+
function Yt(e, n, t, s) {
|
|
430
|
+
const o = we(e);
|
|
431
|
+
let r = Xt(de(e), t === "start", s);
|
|
432
432
|
return o && (r = r.map((a) => a + "-" + o), n && (r = r.concat(r.map(Ne)))), r;
|
|
433
433
|
}
|
|
434
434
|
function Re(e) {
|
|
435
|
-
return e.replace(/left|right|bottom|top/g, (n) =>
|
|
435
|
+
return e.replace(/left|right|bottom|top/g, (n) => Ft[n]);
|
|
436
436
|
}
|
|
437
|
-
function
|
|
437
|
+
function Gt(e) {
|
|
438
438
|
return {
|
|
439
439
|
top: 0,
|
|
440
440
|
right: 0,
|
|
@@ -444,7 +444,7 @@ function Yt(e) {
|
|
|
444
444
|
};
|
|
445
445
|
}
|
|
446
446
|
function dt(e) {
|
|
447
|
-
return typeof e != "number" ?
|
|
447
|
+
return typeof e != "number" ? Gt(e) : {
|
|
448
448
|
top: e,
|
|
449
449
|
right: e,
|
|
450
450
|
bottom: e,
|
|
@@ -469,55 +469,55 @@ function Le(e) {
|
|
|
469
469
|
y: t
|
|
470
470
|
};
|
|
471
471
|
}
|
|
472
|
-
function
|
|
472
|
+
function et(e, n, t) {
|
|
473
473
|
let {
|
|
474
474
|
reference: s,
|
|
475
475
|
floating: o
|
|
476
476
|
} = e;
|
|
477
|
-
const r =
|
|
478
|
-
let
|
|
479
|
-
switch (
|
|
477
|
+
const r = se(n), a = Xe(n), i = Ue(a), l = de(n), c = r === "y", d = s.x + s.width / 2 - o.width / 2, u = s.y + s.height / 2 - o.height / 2, b = s[i] / 2 - o[i] / 2;
|
|
478
|
+
let f;
|
|
479
|
+
switch (l) {
|
|
480
480
|
case "top":
|
|
481
|
-
|
|
481
|
+
f = {
|
|
482
482
|
x: d,
|
|
483
483
|
y: s.y - o.height
|
|
484
484
|
};
|
|
485
485
|
break;
|
|
486
486
|
case "bottom":
|
|
487
|
-
|
|
487
|
+
f = {
|
|
488
488
|
x: d,
|
|
489
489
|
y: s.y + s.height
|
|
490
490
|
};
|
|
491
491
|
break;
|
|
492
492
|
case "right":
|
|
493
|
-
|
|
493
|
+
f = {
|
|
494
494
|
x: s.x + s.width,
|
|
495
|
-
y:
|
|
495
|
+
y: u
|
|
496
496
|
};
|
|
497
497
|
break;
|
|
498
498
|
case "left":
|
|
499
|
-
|
|
499
|
+
f = {
|
|
500
500
|
x: s.x - o.width,
|
|
501
|
-
y:
|
|
501
|
+
y: u
|
|
502
502
|
};
|
|
503
503
|
break;
|
|
504
504
|
default:
|
|
505
|
-
|
|
505
|
+
f = {
|
|
506
506
|
x: s.x,
|
|
507
507
|
y: s.y
|
|
508
508
|
};
|
|
509
509
|
}
|
|
510
|
-
switch (
|
|
510
|
+
switch (we(n)) {
|
|
511
511
|
case "start":
|
|
512
|
-
|
|
512
|
+
f[a] -= b * (t && c ? -1 : 1);
|
|
513
513
|
break;
|
|
514
514
|
case "end":
|
|
515
|
-
|
|
515
|
+
f[a] += b * (t && c ? -1 : 1);
|
|
516
516
|
break;
|
|
517
517
|
}
|
|
518
|
-
return
|
|
518
|
+
return f;
|
|
519
519
|
}
|
|
520
|
-
async function
|
|
520
|
+
async function Jt(e, n) {
|
|
521
521
|
var t;
|
|
522
522
|
n === void 0 && (n = {});
|
|
523
523
|
const {
|
|
@@ -526,24 +526,24 @@ async function Gt(e, n) {
|
|
|
526
526
|
platform: r,
|
|
527
527
|
rects: a,
|
|
528
528
|
elements: i,
|
|
529
|
-
strategy:
|
|
529
|
+
strategy: l
|
|
530
530
|
} = e, {
|
|
531
|
-
boundary:
|
|
531
|
+
boundary: c = "clippingAncestors",
|
|
532
532
|
rootBoundary: d = "viewport",
|
|
533
|
-
elementContext:
|
|
533
|
+
elementContext: u = "floating",
|
|
534
534
|
altBoundary: b = !1,
|
|
535
|
-
padding:
|
|
536
|
-
} =
|
|
537
|
-
element: (t = await (r.isElement == null ? void 0 : r.isElement(
|
|
538
|
-
boundary:
|
|
535
|
+
padding: f = 0
|
|
536
|
+
} = xe(n, e), h = dt(f), v = i[b ? u === "floating" ? "reference" : "floating" : u], y = Le(await r.getClippingRect({
|
|
537
|
+
element: (t = await (r.isElement == null ? void 0 : r.isElement(v))) == null || t ? v : v.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(i.floating)),
|
|
538
|
+
boundary: c,
|
|
539
539
|
rootBoundary: d,
|
|
540
|
-
strategy:
|
|
541
|
-
})),
|
|
540
|
+
strategy: l
|
|
541
|
+
})), k = u === "floating" ? {
|
|
542
542
|
x: s,
|
|
543
543
|
y: o,
|
|
544
544
|
width: a.floating.width,
|
|
545
545
|
height: a.floating.height
|
|
546
|
-
} : a.reference,
|
|
546
|
+
} : a.reference, C = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(i.floating)), A = await (r.isElement == null ? void 0 : r.isElement(C)) ? await (r.getScale == null ? void 0 : r.getScale(C)) || {
|
|
547
547
|
x: 1,
|
|
548
548
|
y: 1
|
|
549
549
|
} : {
|
|
@@ -551,82 +551,82 @@ async function Gt(e, n) {
|
|
|
551
551
|
y: 1
|
|
552
552
|
}, T = Le(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
553
553
|
elements: i,
|
|
554
|
-
rect:
|
|
555
|
-
offsetParent:
|
|
556
|
-
strategy:
|
|
557
|
-
}) :
|
|
554
|
+
rect: k,
|
|
555
|
+
offsetParent: C,
|
|
556
|
+
strategy: l
|
|
557
|
+
}) : k);
|
|
558
558
|
return {
|
|
559
|
-
top: (
|
|
560
|
-
bottom: (T.bottom -
|
|
561
|
-
left: (
|
|
562
|
-
right: (T.right -
|
|
559
|
+
top: (y.top - T.top + h.top) / A.y,
|
|
560
|
+
bottom: (T.bottom - y.bottom + h.bottom) / A.y,
|
|
561
|
+
left: (y.left - T.left + h.left) / A.x,
|
|
562
|
+
right: (T.right - y.right + h.right) / A.x
|
|
563
563
|
};
|
|
564
564
|
}
|
|
565
|
-
const
|
|
565
|
+
const Qt = async (e, n, t) => {
|
|
566
566
|
const {
|
|
567
567
|
placement: s = "bottom",
|
|
568
568
|
strategy: o = "absolute",
|
|
569
569
|
middleware: r = [],
|
|
570
570
|
platform: a
|
|
571
|
-
} = t, i = r.filter(Boolean),
|
|
572
|
-
let
|
|
571
|
+
} = t, i = r.filter(Boolean), l = await (a.isRTL == null ? void 0 : a.isRTL(n));
|
|
572
|
+
let c = await a.getElementRects({
|
|
573
573
|
reference: e,
|
|
574
574
|
floating: n,
|
|
575
575
|
strategy: o
|
|
576
576
|
}), {
|
|
577
577
|
x: d,
|
|
578
|
-
y:
|
|
579
|
-
} =
|
|
580
|
-
for (let
|
|
578
|
+
y: u
|
|
579
|
+
} = et(c, s, l), b = s, f = {}, h = 0;
|
|
580
|
+
for (let v = 0; v < i.length; v++) {
|
|
581
581
|
var m;
|
|
582
582
|
const {
|
|
583
|
-
name:
|
|
584
|
-
fn:
|
|
585
|
-
} = i[
|
|
586
|
-
x:
|
|
583
|
+
name: y,
|
|
584
|
+
fn: k
|
|
585
|
+
} = i[v], {
|
|
586
|
+
x: C,
|
|
587
587
|
y: A,
|
|
588
588
|
data: T,
|
|
589
|
-
reset:
|
|
590
|
-
} = await
|
|
589
|
+
reset: B
|
|
590
|
+
} = await k({
|
|
591
591
|
x: d,
|
|
592
|
-
y:
|
|
592
|
+
y: u,
|
|
593
593
|
initialPlacement: s,
|
|
594
594
|
placement: b,
|
|
595
595
|
strategy: o,
|
|
596
|
-
middlewareData:
|
|
597
|
-
rects:
|
|
596
|
+
middlewareData: f,
|
|
597
|
+
rects: c,
|
|
598
598
|
platform: {
|
|
599
599
|
...a,
|
|
600
|
-
detectOverflow: (m = a.detectOverflow) != null ? m :
|
|
600
|
+
detectOverflow: (m = a.detectOverflow) != null ? m : Jt
|
|
601
601
|
},
|
|
602
602
|
elements: {
|
|
603
603
|
reference: e,
|
|
604
604
|
floating: n
|
|
605
605
|
}
|
|
606
606
|
});
|
|
607
|
-
d =
|
|
608
|
-
...
|
|
609
|
-
[
|
|
610
|
-
...
|
|
607
|
+
d = C ?? d, u = A ?? u, f = {
|
|
608
|
+
...f,
|
|
609
|
+
[y]: {
|
|
610
|
+
...f[y],
|
|
611
611
|
...T
|
|
612
612
|
}
|
|
613
|
-
},
|
|
613
|
+
}, B && h <= 50 && (h++, typeof B == "object" && (B.placement && (b = B.placement), B.rects && (c = B.rects === !0 ? await a.getElementRects({
|
|
614
614
|
reference: e,
|
|
615
615
|
floating: n,
|
|
616
616
|
strategy: o
|
|
617
|
-
}) :
|
|
617
|
+
}) : B.rects), {
|
|
618
618
|
x: d,
|
|
619
|
-
y:
|
|
620
|
-
} =
|
|
619
|
+
y: u
|
|
620
|
+
} = et(c, b, l)), v = -1);
|
|
621
621
|
}
|
|
622
622
|
return {
|
|
623
623
|
x: d,
|
|
624
|
-
y:
|
|
624
|
+
y: u,
|
|
625
625
|
placement: b,
|
|
626
626
|
strategy: o,
|
|
627
|
-
middlewareData:
|
|
627
|
+
middlewareData: f
|
|
628
628
|
};
|
|
629
|
-
},
|
|
629
|
+
}, Zt = (e) => ({
|
|
630
630
|
name: "arrow",
|
|
631
631
|
options: e,
|
|
632
632
|
async fn(n) {
|
|
@@ -637,24 +637,24 @@ const Jt = async (e, n, t) => {
|
|
|
637
637
|
rects: r,
|
|
638
638
|
platform: a,
|
|
639
639
|
elements: i,
|
|
640
|
-
middlewareData:
|
|
640
|
+
middlewareData: l
|
|
641
641
|
} = n, {
|
|
642
|
-
element:
|
|
642
|
+
element: c,
|
|
643
643
|
padding: d = 0
|
|
644
|
-
} =
|
|
645
|
-
if (
|
|
644
|
+
} = xe(e, n) || {};
|
|
645
|
+
if (c == null)
|
|
646
646
|
return {};
|
|
647
|
-
const
|
|
647
|
+
const u = dt(d), b = {
|
|
648
648
|
x: t,
|
|
649
649
|
y: s
|
|
650
|
-
},
|
|
651
|
-
let
|
|
652
|
-
(
|
|
653
|
-
const M = A / 2 - T / 2, I =
|
|
650
|
+
}, f = Xe(o), h = Ue(f), m = await a.getDimensions(c), v = f === "y", y = v ? "top" : "left", k = v ? "bottom" : "right", C = v ? "clientHeight" : "clientWidth", A = r.reference[h] + r.reference[f] - b[f] - r.floating[h], T = b[f] - r.reference[f], B = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(c));
|
|
651
|
+
let D = B ? B[C] : 0;
|
|
652
|
+
(!D || !await (a.isElement == null ? void 0 : a.isElement(B))) && (D = i.floating[C] || r.floating[h]);
|
|
653
|
+
const M = A / 2 - T / 2, I = D / 2 - m[h] / 2 - 1, W = ce(u[y], I), Y = ce(u[k], I), X = W, x = D - m[h] - Y, O = D / 2 - m[h] / 2 + M, E = Fe(X, O, x), F = !l.arrow && we(o) != null && O !== E && r.reference[h] / 2 - (O < X ? W : Y) - m[h] / 2 < 0, H = F ? O < X ? O - X : O - x : 0;
|
|
654
654
|
return {
|
|
655
|
-
[
|
|
655
|
+
[f]: b[f] + H,
|
|
656
656
|
data: {
|
|
657
|
-
[
|
|
657
|
+
[f]: E,
|
|
658
658
|
centerOffset: O - E - H,
|
|
659
659
|
...F && {
|
|
660
660
|
alignmentOffset: H
|
|
@@ -663,7 +663,7 @@ const Jt = async (e, n, t) => {
|
|
|
663
663
|
reset: F
|
|
664
664
|
};
|
|
665
665
|
}
|
|
666
|
-
}),
|
|
666
|
+
}), _t = function(e) {
|
|
667
667
|
return e === void 0 && (e = {}), {
|
|
668
668
|
name: "flip",
|
|
669
669
|
options: e,
|
|
@@ -674,25 +674,25 @@ const Jt = async (e, n, t) => {
|
|
|
674
674
|
middlewareData: r,
|
|
675
675
|
rects: a,
|
|
676
676
|
initialPlacement: i,
|
|
677
|
-
platform:
|
|
678
|
-
elements:
|
|
677
|
+
platform: l,
|
|
678
|
+
elements: c
|
|
679
679
|
} = n, {
|
|
680
680
|
mainAxis: d = !0,
|
|
681
|
-
crossAxis:
|
|
681
|
+
crossAxis: u = !0,
|
|
682
682
|
fallbackPlacements: b,
|
|
683
|
-
fallbackStrategy:
|
|
684
|
-
fallbackAxisSideDirection:
|
|
683
|
+
fallbackStrategy: f = "bestFit",
|
|
684
|
+
fallbackAxisSideDirection: h = "none",
|
|
685
685
|
flipAlignment: m = !0,
|
|
686
|
-
...
|
|
687
|
-
} =
|
|
686
|
+
...v
|
|
687
|
+
} = xe(e, n);
|
|
688
688
|
if ((t = r.arrow) != null && t.alignmentOffset)
|
|
689
689
|
return {};
|
|
690
|
-
const
|
|
691
|
-
!b &&
|
|
692
|
-
const
|
|
690
|
+
const y = de(o), k = se(i), C = de(i) === i, A = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), T = b || (C || !m ? [Re(i)] : qt(i)), B = h !== "none";
|
|
691
|
+
!b && B && T.push(...Yt(i, m, h, A));
|
|
692
|
+
const D = [i, ...T], M = await l.detectOverflow(n, v), I = [];
|
|
693
693
|
let W = ((s = r.flip) == null ? void 0 : s.overflows) || [];
|
|
694
|
-
if (d && I.push(M[
|
|
695
|
-
const O =
|
|
694
|
+
if (d && I.push(M[y]), u) {
|
|
695
|
+
const O = Ht(o, a, A);
|
|
696
696
|
I.push(M[O[0]], M[O[1]]);
|
|
697
697
|
}
|
|
698
698
|
if (W = [...W, {
|
|
@@ -700,10 +700,10 @@ const Jt = async (e, n, t) => {
|
|
|
700
700
|
overflows: I
|
|
701
701
|
}], !I.every((O) => O <= 0)) {
|
|
702
702
|
var Y, X;
|
|
703
|
-
const O = (((Y = r.flip) == null ? void 0 : Y.index) || 0) + 1, E =
|
|
704
|
-
if (E && (!(
|
|
703
|
+
const O = (((Y = r.flip) == null ? void 0 : Y.index) || 0) + 1, E = D[O];
|
|
704
|
+
if (E && (!(u === "alignment" ? k !== se(E) : !1) || // We leave the current main axis only if every placement on that axis
|
|
705
705
|
// overflows the main axis.
|
|
706
|
-
W.every((G) =>
|
|
706
|
+
W.every((G) => se(G.placement) === k ? G.overflows[0] > 0 : !0)))
|
|
707
707
|
return {
|
|
708
708
|
data: {
|
|
709
709
|
index: O,
|
|
@@ -715,18 +715,18 @@ const Jt = async (e, n, t) => {
|
|
|
715
715
|
};
|
|
716
716
|
let F = (X = W.filter((H) => H.overflows[0] <= 0).sort((H, G) => H.overflows[1] - G.overflows[1])[0]) == null ? void 0 : X.placement;
|
|
717
717
|
if (!F)
|
|
718
|
-
switch (
|
|
718
|
+
switch (f) {
|
|
719
719
|
case "bestFit": {
|
|
720
720
|
var x;
|
|
721
721
|
const H = (x = W.filter((G) => {
|
|
722
|
-
if (
|
|
723
|
-
const
|
|
724
|
-
return
|
|
722
|
+
if (B) {
|
|
723
|
+
const ae = se(G.placement);
|
|
724
|
+
return ae === k || // Create a bias to the `y` side axis due to horizontal
|
|
725
725
|
// reading directions favoring greater width.
|
|
726
|
-
|
|
726
|
+
ae === "y";
|
|
727
727
|
}
|
|
728
728
|
return !0;
|
|
729
|
-
}).map((G) => [G.placement, G.overflows.filter((
|
|
729
|
+
}).map((G) => [G.placement, G.overflows.filter((ae) => ae > 0).reduce((ae, Dt) => ae + Dt, 0)]).sort((G, ae) => G[1] - ae[1])[0]) == null ? void 0 : x[0];
|
|
730
730
|
H && (F = H);
|
|
731
731
|
break;
|
|
732
732
|
}
|
|
@@ -744,35 +744,35 @@ const Jt = async (e, n, t) => {
|
|
|
744
744
|
return {};
|
|
745
745
|
}
|
|
746
746
|
};
|
|
747
|
-
},
|
|
748
|
-
async function
|
|
747
|
+
}, en = /* @__PURE__ */ new Set(["left", "top"]);
|
|
748
|
+
async function tn(e, n) {
|
|
749
749
|
const {
|
|
750
750
|
placement: t,
|
|
751
751
|
platform: s,
|
|
752
752
|
elements: o
|
|
753
|
-
} = e, r = await (s.isRTL == null ? void 0 : s.isRTL(o.floating)), a =
|
|
753
|
+
} = e, r = await (s.isRTL == null ? void 0 : s.isRTL(o.floating)), a = de(t), i = we(t), l = se(t) === "y", c = en.has(a) ? -1 : 1, d = r && l ? -1 : 1, u = xe(n, e);
|
|
754
754
|
let {
|
|
755
755
|
mainAxis: b,
|
|
756
|
-
crossAxis:
|
|
757
|
-
alignmentAxis:
|
|
758
|
-
} = typeof
|
|
759
|
-
mainAxis:
|
|
756
|
+
crossAxis: f,
|
|
757
|
+
alignmentAxis: h
|
|
758
|
+
} = typeof u == "number" ? {
|
|
759
|
+
mainAxis: u,
|
|
760
760
|
crossAxis: 0,
|
|
761
761
|
alignmentAxis: null
|
|
762
762
|
} : {
|
|
763
|
-
mainAxis:
|
|
764
|
-
crossAxis:
|
|
765
|
-
alignmentAxis:
|
|
763
|
+
mainAxis: u.mainAxis || 0,
|
|
764
|
+
crossAxis: u.crossAxis || 0,
|
|
765
|
+
alignmentAxis: u.alignmentAxis
|
|
766
766
|
};
|
|
767
|
-
return i && typeof
|
|
768
|
-
x:
|
|
769
|
-
y: b *
|
|
767
|
+
return i && typeof h == "number" && (f = i === "end" ? h * -1 : h), l ? {
|
|
768
|
+
x: f * d,
|
|
769
|
+
y: b * c
|
|
770
770
|
} : {
|
|
771
|
-
x: b *
|
|
772
|
-
y:
|
|
771
|
+
x: b * c,
|
|
772
|
+
y: f * d
|
|
773
773
|
};
|
|
774
774
|
}
|
|
775
|
-
const
|
|
775
|
+
const nn = function(e) {
|
|
776
776
|
return e === void 0 && (e = 0), {
|
|
777
777
|
name: "offset",
|
|
778
778
|
options: e,
|
|
@@ -783,18 +783,18 @@ const tn = function(e) {
|
|
|
783
783
|
y: r,
|
|
784
784
|
placement: a,
|
|
785
785
|
middlewareData: i
|
|
786
|
-
} = n,
|
|
786
|
+
} = n, l = await tn(n, e);
|
|
787
787
|
return a === ((t = i.offset) == null ? void 0 : t.placement) && (s = i.arrow) != null && s.alignmentOffset ? {} : {
|
|
788
|
-
x: o +
|
|
789
|
-
y: r +
|
|
788
|
+
x: o + l.x,
|
|
789
|
+
y: r + l.y,
|
|
790
790
|
data: {
|
|
791
|
-
...
|
|
791
|
+
...l,
|
|
792
792
|
placement: a
|
|
793
793
|
}
|
|
794
794
|
};
|
|
795
795
|
}
|
|
796
796
|
};
|
|
797
|
-
},
|
|
797
|
+
}, sn = function(e) {
|
|
798
798
|
return e === void 0 && (e = {}), {
|
|
799
799
|
name: "shift",
|
|
800
800
|
options: e,
|
|
@@ -807,51 +807,51 @@ const tn = function(e) {
|
|
|
807
807
|
} = n, {
|
|
808
808
|
mainAxis: a = !0,
|
|
809
809
|
crossAxis: i = !1,
|
|
810
|
-
limiter:
|
|
811
|
-
fn: (
|
|
810
|
+
limiter: l = {
|
|
811
|
+
fn: (y) => {
|
|
812
812
|
let {
|
|
813
|
-
x:
|
|
814
|
-
y:
|
|
815
|
-
} =
|
|
813
|
+
x: k,
|
|
814
|
+
y: C
|
|
815
|
+
} = y;
|
|
816
816
|
return {
|
|
817
|
-
x:
|
|
818
|
-
y:
|
|
817
|
+
x: k,
|
|
818
|
+
y: C
|
|
819
819
|
};
|
|
820
820
|
}
|
|
821
821
|
},
|
|
822
|
-
...
|
|
823
|
-
} =
|
|
822
|
+
...c
|
|
823
|
+
} = xe(e, n), d = {
|
|
824
824
|
x: t,
|
|
825
825
|
y: s
|
|
826
|
-
},
|
|
827
|
-
let
|
|
826
|
+
}, u = await r.detectOverflow(n, c), b = se(de(o)), f = ct(b);
|
|
827
|
+
let h = d[f], m = d[b];
|
|
828
828
|
if (a) {
|
|
829
|
-
const
|
|
830
|
-
|
|
829
|
+
const y = f === "y" ? "top" : "left", k = f === "y" ? "bottom" : "right", C = h + u[y], A = h - u[k];
|
|
830
|
+
h = Fe(C, h, A);
|
|
831
831
|
}
|
|
832
832
|
if (i) {
|
|
833
|
-
const
|
|
834
|
-
m = Fe(
|
|
833
|
+
const y = b === "y" ? "top" : "left", k = b === "y" ? "bottom" : "right", C = m + u[y], A = m - u[k];
|
|
834
|
+
m = Fe(C, m, A);
|
|
835
835
|
}
|
|
836
|
-
const
|
|
836
|
+
const v = l.fn({
|
|
837
837
|
...n,
|
|
838
|
-
[
|
|
838
|
+
[f]: h,
|
|
839
839
|
[b]: m
|
|
840
840
|
});
|
|
841
841
|
return {
|
|
842
|
-
...
|
|
842
|
+
...v,
|
|
843
843
|
data: {
|
|
844
|
-
x:
|
|
845
|
-
y:
|
|
844
|
+
x: v.x - t,
|
|
845
|
+
y: v.y - s,
|
|
846
846
|
enabled: {
|
|
847
|
-
[
|
|
847
|
+
[f]: a,
|
|
848
848
|
[b]: i
|
|
849
849
|
}
|
|
850
850
|
}
|
|
851
851
|
};
|
|
852
852
|
}
|
|
853
853
|
};
|
|
854
|
-
},
|
|
854
|
+
}, on = function(e) {
|
|
855
855
|
return e === void 0 && (e = {}), {
|
|
856
856
|
name: "size",
|
|
857
857
|
options: e,
|
|
@@ -863,28 +863,28 @@ const tn = function(e) {
|
|
|
863
863
|
platform: a,
|
|
864
864
|
elements: i
|
|
865
865
|
} = n, {
|
|
866
|
-
apply:
|
|
866
|
+
apply: l = () => {
|
|
867
867
|
},
|
|
868
|
-
...
|
|
869
|
-
} =
|
|
870
|
-
width:
|
|
868
|
+
...c
|
|
869
|
+
} = xe(e, n), d = await a.detectOverflow(n, c), u = de(o), b = we(o), f = se(o) === "y", {
|
|
870
|
+
width: h,
|
|
871
871
|
height: m
|
|
872
872
|
} = r.floating;
|
|
873
|
-
let
|
|
874
|
-
|
|
875
|
-
const
|
|
876
|
-
let
|
|
877
|
-
if ((t = n.middlewareData.shift) != null && t.enabled.x && (M =
|
|
873
|
+
let v, y;
|
|
874
|
+
u === "top" || u === "bottom" ? (v = u, y = b === (await (a.isRTL == null ? void 0 : a.isRTL(i.floating)) ? "start" : "end") ? "left" : "right") : (y = u, v = b === "end" ? "top" : "bottom");
|
|
875
|
+
const k = m - d.top - d.bottom, C = h - d.left - d.right, A = ce(m - d[v], k), T = ce(h - d[y], C), B = !n.middlewareData.shift;
|
|
876
|
+
let D = A, M = T;
|
|
877
|
+
if ((t = n.middlewareData.shift) != null && t.enabled.x && (M = C), (s = n.middlewareData.shift) != null && s.enabled.y && (D = k), B && !b) {
|
|
878
878
|
const W = q(d.left, 0), Y = q(d.right, 0), X = q(d.top, 0), x = q(d.bottom, 0);
|
|
879
|
-
|
|
879
|
+
f ? M = h - 2 * (W !== 0 || Y !== 0 ? W + Y : q(d.left, d.right)) : D = m - 2 * (X !== 0 || x !== 0 ? X + x : q(d.top, d.bottom));
|
|
880
880
|
}
|
|
881
|
-
await
|
|
881
|
+
await l({
|
|
882
882
|
...n,
|
|
883
883
|
availableWidth: M,
|
|
884
|
-
availableHeight:
|
|
884
|
+
availableHeight: D
|
|
885
885
|
});
|
|
886
886
|
const I = await a.getDimensions(i.floating);
|
|
887
|
-
return
|
|
887
|
+
return h !== I.width || m !== I.height ? {
|
|
888
888
|
reset: {
|
|
889
889
|
rects: !0
|
|
890
890
|
}
|
|
@@ -895,30 +895,30 @@ const tn = function(e) {
|
|
|
895
895
|
function ze() {
|
|
896
896
|
return typeof window < "u";
|
|
897
897
|
}
|
|
898
|
-
function
|
|
899
|
-
return
|
|
898
|
+
function ge(e) {
|
|
899
|
+
return Ye(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
900
900
|
}
|
|
901
901
|
function U(e) {
|
|
902
902
|
var n;
|
|
903
903
|
return (e == null || (n = e.ownerDocument) == null ? void 0 : n.defaultView) || window;
|
|
904
904
|
}
|
|
905
|
-
function
|
|
905
|
+
function ne(e) {
|
|
906
906
|
var n;
|
|
907
|
-
return (n = (
|
|
907
|
+
return (n = (Ye(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : n.documentElement;
|
|
908
908
|
}
|
|
909
|
-
function
|
|
909
|
+
function Ye(e) {
|
|
910
910
|
return ze() ? e instanceof Node || e instanceof U(e).Node : !1;
|
|
911
911
|
}
|
|
912
912
|
function J(e) {
|
|
913
913
|
return ze() ? e instanceof Element || e instanceof U(e).Element : !1;
|
|
914
914
|
}
|
|
915
|
-
function
|
|
915
|
+
function ee(e) {
|
|
916
916
|
return ze() ? e instanceof HTMLElement || e instanceof U(e).HTMLElement : !1;
|
|
917
917
|
}
|
|
918
|
-
function
|
|
918
|
+
function tt(e) {
|
|
919
919
|
return !ze() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof U(e).ShadowRoot;
|
|
920
920
|
}
|
|
921
|
-
const
|
|
921
|
+
const an = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
922
922
|
function Ce(e) {
|
|
923
923
|
const {
|
|
924
924
|
overflow: n,
|
|
@@ -926,15 +926,15 @@ function Ce(e) {
|
|
|
926
926
|
overflowY: s,
|
|
927
927
|
display: o
|
|
928
928
|
} = Q(e);
|
|
929
|
-
return /auto|scroll|overlay|hidden|clip/.test(n + s + t) && !
|
|
929
|
+
return /auto|scroll|overlay|hidden|clip/.test(n + s + t) && !an.has(o);
|
|
930
930
|
}
|
|
931
931
|
const rn = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
932
|
-
function
|
|
933
|
-
return rn.has(
|
|
932
|
+
function ln(e) {
|
|
933
|
+
return rn.has(ge(e));
|
|
934
934
|
}
|
|
935
|
-
const
|
|
935
|
+
const cn = [":popover-open", ":modal"];
|
|
936
936
|
function Ee(e) {
|
|
937
|
-
return
|
|
937
|
+
return cn.some((n) => {
|
|
938
938
|
try {
|
|
939
939
|
return e.matches(n);
|
|
940
940
|
} catch {
|
|
@@ -942,28 +942,28 @@ function Ee(e) {
|
|
|
942
942
|
}
|
|
943
943
|
});
|
|
944
944
|
}
|
|
945
|
-
const
|
|
946
|
-
function
|
|
947
|
-
const n =
|
|
948
|
-
return
|
|
945
|
+
const dn = ["transform", "translate", "scale", "rotate", "perspective"], un = ["transform", "translate", "scale", "rotate", "perspective", "filter"], fn = ["paint", "layout", "strict", "content"];
|
|
946
|
+
function Ge(e) {
|
|
947
|
+
const n = Je(), t = J(e) ? Q(e) : e;
|
|
948
|
+
return dn.some((s) => t[s] ? t[s] !== "none" : !1) || (t.containerType ? t.containerType !== "normal" : !1) || !n && (t.backdropFilter ? t.backdropFilter !== "none" : !1) || !n && (t.filter ? t.filter !== "none" : !1) || un.some((s) => (t.willChange || "").includes(s)) || fn.some((s) => (t.contain || "").includes(s));
|
|
949
949
|
}
|
|
950
|
-
function
|
|
951
|
-
let n =
|
|
952
|
-
for (;
|
|
953
|
-
if (
|
|
950
|
+
function bn(e) {
|
|
951
|
+
let n = ue(e);
|
|
952
|
+
for (; ee(n) && !ye(n); ) {
|
|
953
|
+
if (Ge(n))
|
|
954
954
|
return n;
|
|
955
955
|
if (Ee(n))
|
|
956
956
|
return null;
|
|
957
|
-
n =
|
|
957
|
+
n = ue(n);
|
|
958
958
|
}
|
|
959
959
|
return null;
|
|
960
960
|
}
|
|
961
|
-
function
|
|
961
|
+
function Je() {
|
|
962
962
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
963
963
|
}
|
|
964
|
-
const
|
|
965
|
-
function
|
|
966
|
-
return
|
|
964
|
+
const mn = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
965
|
+
function ye(e) {
|
|
966
|
+
return mn.has(ge(e));
|
|
967
967
|
}
|
|
968
968
|
function Q(e) {
|
|
969
969
|
return U(e).getComputedStyle(e);
|
|
@@ -977,21 +977,21 @@ function Me(e) {
|
|
|
977
977
|
scrollTop: e.scrollY
|
|
978
978
|
};
|
|
979
979
|
}
|
|
980
|
-
function
|
|
981
|
-
if (
|
|
980
|
+
function ue(e) {
|
|
981
|
+
if (ge(e) === "html")
|
|
982
982
|
return e;
|
|
983
983
|
const n = (
|
|
984
984
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
985
985
|
e.assignedSlot || // DOM Element detected.
|
|
986
986
|
e.parentNode || // ShadowRoot detected.
|
|
987
|
-
|
|
988
|
-
|
|
987
|
+
tt(e) && e.host || // Fallback.
|
|
988
|
+
ne(e)
|
|
989
989
|
);
|
|
990
|
-
return
|
|
990
|
+
return tt(n) ? n.host : n;
|
|
991
991
|
}
|
|
992
992
|
function ut(e) {
|
|
993
|
-
const n =
|
|
994
|
-
return
|
|
993
|
+
const n = ue(e);
|
|
994
|
+
return ye(n) ? e.ownerDocument ? e.ownerDocument.body : e.body : ee(n) && Ce(n) ? n : ut(n);
|
|
995
995
|
}
|
|
996
996
|
function $e(e, n, t) {
|
|
997
997
|
var s;
|
|
@@ -1009,19 +1009,19 @@ function We(e) {
|
|
|
1009
1009
|
function ft(e) {
|
|
1010
1010
|
const n = Q(e);
|
|
1011
1011
|
let t = parseFloat(n.width) || 0, s = parseFloat(n.height) || 0;
|
|
1012
|
-
const o =
|
|
1012
|
+
const o = ee(e), r = o ? e.offsetWidth : t, a = o ? e.offsetHeight : s, i = Ve(t) !== r || Ve(s) !== a;
|
|
1013
1013
|
return i && (t = r, s = a), {
|
|
1014
1014
|
width: t,
|
|
1015
1015
|
height: s,
|
|
1016
1016
|
$: i
|
|
1017
1017
|
};
|
|
1018
1018
|
}
|
|
1019
|
-
function
|
|
1019
|
+
function Qe(e) {
|
|
1020
1020
|
return J(e) ? e : e.contextElement;
|
|
1021
1021
|
}
|
|
1022
|
-
function
|
|
1023
|
-
const n =
|
|
1024
|
-
if (!
|
|
1022
|
+
function pe(e) {
|
|
1023
|
+
const n = Qe(e);
|
|
1024
|
+
if (!ee(n))
|
|
1025
1025
|
return Z(1);
|
|
1026
1026
|
const t = n.getBoundingClientRect(), {
|
|
1027
1027
|
width: s,
|
|
@@ -1034,42 +1034,42 @@ function ve(e) {
|
|
|
1034
1034
|
y: i
|
|
1035
1035
|
};
|
|
1036
1036
|
}
|
|
1037
|
-
const
|
|
1037
|
+
const gn = /* @__PURE__ */ Z(0);
|
|
1038
1038
|
function bt(e) {
|
|
1039
1039
|
const n = U(e);
|
|
1040
|
-
return !
|
|
1040
|
+
return !Je() || !n.visualViewport ? gn : {
|
|
1041
1041
|
x: n.visualViewport.offsetLeft,
|
|
1042
1042
|
y: n.visualViewport.offsetTop
|
|
1043
1043
|
};
|
|
1044
1044
|
}
|
|
1045
|
-
function
|
|
1045
|
+
function hn(e, n, t) {
|
|
1046
1046
|
return n === void 0 && (n = !1), !t || n && t !== U(e) ? !1 : n;
|
|
1047
1047
|
}
|
|
1048
|
-
function
|
|
1048
|
+
function be(e, n, t, s) {
|
|
1049
1049
|
n === void 0 && (n = !1), t === void 0 && (t = !1);
|
|
1050
|
-
const o = e.getBoundingClientRect(), r =
|
|
1050
|
+
const o = e.getBoundingClientRect(), r = Qe(e);
|
|
1051
1051
|
let a = Z(1);
|
|
1052
|
-
n && (s ? J(s) && (a =
|
|
1053
|
-
const i =
|
|
1054
|
-
let
|
|
1052
|
+
n && (s ? J(s) && (a = pe(s)) : a = pe(e));
|
|
1053
|
+
const i = hn(r, t, s) ? bt(r) : Z(0);
|
|
1054
|
+
let l = (o.left + i.x) / a.x, c = (o.top + i.y) / a.y, d = o.width / a.x, u = o.height / a.y;
|
|
1055
1055
|
if (r) {
|
|
1056
|
-
const b = U(r),
|
|
1057
|
-
let
|
|
1058
|
-
for (; m && s &&
|
|
1059
|
-
const
|
|
1060
|
-
|
|
1056
|
+
const b = U(r), f = s && J(s) ? U(s) : s;
|
|
1057
|
+
let h = b, m = We(h);
|
|
1058
|
+
for (; m && s && f !== h; ) {
|
|
1059
|
+
const v = pe(m), y = m.getBoundingClientRect(), k = Q(m), C = y.left + (m.clientLeft + parseFloat(k.paddingLeft)) * v.x, A = y.top + (m.clientTop + parseFloat(k.paddingTop)) * v.y;
|
|
1060
|
+
l *= v.x, c *= v.y, d *= v.x, u *= v.y, l += C, c += A, h = U(m), m = We(h);
|
|
1061
1061
|
}
|
|
1062
1062
|
}
|
|
1063
1063
|
return Le({
|
|
1064
1064
|
width: d,
|
|
1065
|
-
height:
|
|
1066
|
-
x:
|
|
1067
|
-
y:
|
|
1065
|
+
height: u,
|
|
1066
|
+
x: l,
|
|
1067
|
+
y: c
|
|
1068
1068
|
});
|
|
1069
1069
|
}
|
|
1070
1070
|
function je(e, n) {
|
|
1071
1071
|
const t = Me(e).scrollLeft;
|
|
1072
|
-
return n ? n.left + t :
|
|
1072
|
+
return n ? n.left + t : be(ne(e)).left + t;
|
|
1073
1073
|
}
|
|
1074
1074
|
function mt(e, n) {
|
|
1075
1075
|
const t = e.getBoundingClientRect(), s = t.left + n.scrollLeft - je(e, t), o = t.top + n.scrollTop;
|
|
@@ -1078,38 +1078,38 @@ function mt(e, n) {
|
|
|
1078
1078
|
y: o
|
|
1079
1079
|
};
|
|
1080
1080
|
}
|
|
1081
|
-
function
|
|
1081
|
+
function vn(e) {
|
|
1082
1082
|
let {
|
|
1083
1083
|
elements: n,
|
|
1084
1084
|
rect: t,
|
|
1085
1085
|
offsetParent: s,
|
|
1086
1086
|
strategy: o
|
|
1087
1087
|
} = e;
|
|
1088
|
-
const r = o === "fixed", a =
|
|
1088
|
+
const r = o === "fixed", a = ne(s), i = n ? Ee(n.floating) : !1;
|
|
1089
1089
|
if (s === a || i && r)
|
|
1090
1090
|
return t;
|
|
1091
|
-
let
|
|
1091
|
+
let l = {
|
|
1092
1092
|
scrollLeft: 0,
|
|
1093
1093
|
scrollTop: 0
|
|
1094
|
-
},
|
|
1095
|
-
const d = Z(0),
|
|
1096
|
-
if ((
|
|
1097
|
-
const
|
|
1098
|
-
|
|
1094
|
+
}, c = Z(1);
|
|
1095
|
+
const d = Z(0), u = ee(s);
|
|
1096
|
+
if ((u || !u && !r) && ((ge(s) !== "body" || Ce(a)) && (l = Me(s)), ee(s))) {
|
|
1097
|
+
const f = be(s);
|
|
1098
|
+
c = pe(s), d.x = f.x + s.clientLeft, d.y = f.y + s.clientTop;
|
|
1099
1099
|
}
|
|
1100
|
-
const b = a && !
|
|
1100
|
+
const b = a && !u && !r ? mt(a, l) : Z(0);
|
|
1101
1101
|
return {
|
|
1102
|
-
width: t.width *
|
|
1103
|
-
height: t.height *
|
|
1104
|
-
x: t.x *
|
|
1105
|
-
y: t.y *
|
|
1102
|
+
width: t.width * c.x,
|
|
1103
|
+
height: t.height * c.y,
|
|
1104
|
+
x: t.x * c.x - l.scrollLeft * c.x + d.x + b.x,
|
|
1105
|
+
y: t.y * c.y - l.scrollTop * c.y + d.y + b.y
|
|
1106
1106
|
};
|
|
1107
1107
|
}
|
|
1108
|
-
function
|
|
1108
|
+
function pn(e) {
|
|
1109
1109
|
return Array.from(e.getClientRects());
|
|
1110
1110
|
}
|
|
1111
|
-
function
|
|
1112
|
-
const n =
|
|
1111
|
+
function yn(e) {
|
|
1112
|
+
const n = ne(e), t = Me(e), s = e.ownerDocument.body, o = q(n.scrollWidth, n.clientWidth, s.scrollWidth, s.clientWidth), r = q(n.scrollHeight, n.clientHeight, s.scrollHeight, s.clientHeight);
|
|
1113
1113
|
let a = -t.scrollLeft + je(e);
|
|
1114
1114
|
const i = -t.scrollTop;
|
|
1115
1115
|
return Q(s).direction === "rtl" && (a += q(n.clientWidth, s.clientWidth) - o), {
|
|
@@ -1119,45 +1119,45 @@ function pn(e) {
|
|
|
1119
1119
|
y: i
|
|
1120
1120
|
};
|
|
1121
1121
|
}
|
|
1122
|
-
const
|
|
1123
|
-
function
|
|
1124
|
-
const t = U(e), s =
|
|
1125
|
-
let r = s.clientWidth, a = s.clientHeight, i = 0,
|
|
1122
|
+
const nt = 25;
|
|
1123
|
+
function xn(e, n) {
|
|
1124
|
+
const t = U(e), s = ne(e), o = t.visualViewport;
|
|
1125
|
+
let r = s.clientWidth, a = s.clientHeight, i = 0, l = 0;
|
|
1126
1126
|
if (o) {
|
|
1127
1127
|
r = o.width, a = o.height;
|
|
1128
|
-
const d =
|
|
1129
|
-
(!d || d && n === "fixed") && (i = o.offsetLeft,
|
|
1128
|
+
const d = Je();
|
|
1129
|
+
(!d || d && n === "fixed") && (i = o.offsetLeft, l = o.offsetTop);
|
|
1130
1130
|
}
|
|
1131
|
-
const
|
|
1132
|
-
if (
|
|
1133
|
-
const d = s.ownerDocument,
|
|
1134
|
-
|
|
1135
|
-
} else
|
|
1131
|
+
const c = je(s);
|
|
1132
|
+
if (c <= 0) {
|
|
1133
|
+
const d = s.ownerDocument, u = d.body, b = getComputedStyle(u), f = d.compatMode === "CSS1Compat" && parseFloat(b.marginLeft) + parseFloat(b.marginRight) || 0, h = Math.abs(s.clientWidth - u.clientWidth - f);
|
|
1134
|
+
h <= nt && (r -= h);
|
|
1135
|
+
} else c <= nt && (r += c);
|
|
1136
1136
|
return {
|
|
1137
1137
|
width: r,
|
|
1138
1138
|
height: a,
|
|
1139
1139
|
x: i,
|
|
1140
|
-
y:
|
|
1140
|
+
y: l
|
|
1141
1141
|
};
|
|
1142
1142
|
}
|
|
1143
|
-
const
|
|
1144
|
-
function
|
|
1145
|
-
const t =
|
|
1143
|
+
const wn = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
1144
|
+
function kn(e, n) {
|
|
1145
|
+
const t = be(e, !0, n === "fixed"), s = t.top + e.clientTop, o = t.left + e.clientLeft, r = ee(e) ? pe(e) : Z(1), a = e.clientWidth * r.x, i = e.clientHeight * r.y, l = o * r.x, c = s * r.y;
|
|
1146
1146
|
return {
|
|
1147
1147
|
width: a,
|
|
1148
1148
|
height: i,
|
|
1149
|
-
x:
|
|
1150
|
-
y:
|
|
1149
|
+
x: l,
|
|
1150
|
+
y: c
|
|
1151
1151
|
};
|
|
1152
1152
|
}
|
|
1153
|
-
function
|
|
1153
|
+
function st(e, n, t) {
|
|
1154
1154
|
let s;
|
|
1155
1155
|
if (n === "viewport")
|
|
1156
|
-
s =
|
|
1156
|
+
s = xn(e, t);
|
|
1157
1157
|
else if (n === "document")
|
|
1158
|
-
s =
|
|
1158
|
+
s = yn(ne(e));
|
|
1159
1159
|
else if (J(n))
|
|
1160
|
-
s =
|
|
1160
|
+
s = kn(n, t);
|
|
1161
1161
|
else {
|
|
1162
1162
|
const o = bt(e);
|
|
1163
1163
|
s = {
|
|
@@ -1170,41 +1170,41 @@ function tt(e, n, t) {
|
|
|
1170
1170
|
return Le(s);
|
|
1171
1171
|
}
|
|
1172
1172
|
function gt(e, n) {
|
|
1173
|
-
const t =
|
|
1174
|
-
return t === n || !J(t) ||
|
|
1173
|
+
const t = ue(e);
|
|
1174
|
+
return t === n || !J(t) || ye(t) ? !1 : Q(t).position === "fixed" || gt(t, n);
|
|
1175
1175
|
}
|
|
1176
|
-
function
|
|
1176
|
+
function $n(e, n) {
|
|
1177
1177
|
const t = n.get(e);
|
|
1178
1178
|
if (t)
|
|
1179
1179
|
return t;
|
|
1180
|
-
let s = $e(e, [], !1).filter((i) => J(i) &&
|
|
1180
|
+
let s = $e(e, [], !1).filter((i) => J(i) && ge(i) !== "body"), o = null;
|
|
1181
1181
|
const r = Q(e).position === "fixed";
|
|
1182
|
-
let a = r ?
|
|
1183
|
-
for (; J(a) && !
|
|
1184
|
-
const i = Q(a),
|
|
1185
|
-
!
|
|
1182
|
+
let a = r ? ue(e) : e;
|
|
1183
|
+
for (; J(a) && !ye(a); ) {
|
|
1184
|
+
const i = Q(a), l = Ge(a);
|
|
1185
|
+
!l && i.position === "fixed" && (o = null), (r ? !l && !o : !l && i.position === "static" && !!o && wn.has(o.position) || Ce(a) && !l && gt(e, a)) ? s = s.filter((d) => d !== a) : o = i, a = ue(a);
|
|
1186
1186
|
}
|
|
1187
1187
|
return n.set(e, s), s;
|
|
1188
1188
|
}
|
|
1189
|
-
function
|
|
1189
|
+
function Cn(e) {
|
|
1190
1190
|
let {
|
|
1191
1191
|
element: n,
|
|
1192
1192
|
boundary: t,
|
|
1193
1193
|
rootBoundary: s,
|
|
1194
1194
|
strategy: o
|
|
1195
1195
|
} = e;
|
|
1196
|
-
const a = [...t === "clippingAncestors" ? Ee(n) ? [] :
|
|
1197
|
-
const
|
|
1198
|
-
return
|
|
1199
|
-
},
|
|
1196
|
+
const a = [...t === "clippingAncestors" ? Ee(n) ? [] : $n(n, this._c) : [].concat(t), s], i = a[0], l = a.reduce((c, d) => {
|
|
1197
|
+
const u = st(n, d, o);
|
|
1198
|
+
return c.top = q(u.top, c.top), c.right = ce(u.right, c.right), c.bottom = ce(u.bottom, c.bottom), c.left = q(u.left, c.left), c;
|
|
1199
|
+
}, st(n, i, o));
|
|
1200
1200
|
return {
|
|
1201
|
-
width:
|
|
1202
|
-
height:
|
|
1203
|
-
x:
|
|
1204
|
-
y:
|
|
1201
|
+
width: l.right - l.left,
|
|
1202
|
+
height: l.bottom - l.top,
|
|
1203
|
+
x: l.left,
|
|
1204
|
+
y: l.top
|
|
1205
1205
|
};
|
|
1206
1206
|
}
|
|
1207
|
-
function
|
|
1207
|
+
function Dn(e) {
|
|
1208
1208
|
const {
|
|
1209
1209
|
width: n,
|
|
1210
1210
|
height: t
|
|
@@ -1214,25 +1214,25 @@ function Cn(e) {
|
|
|
1214
1214
|
height: t
|
|
1215
1215
|
};
|
|
1216
1216
|
}
|
|
1217
|
-
function
|
|
1218
|
-
const s =
|
|
1217
|
+
function Tn(e, n, t) {
|
|
1218
|
+
const s = ee(n), o = ne(n), r = t === "fixed", a = be(e, !0, r, n);
|
|
1219
1219
|
let i = {
|
|
1220
1220
|
scrollLeft: 0,
|
|
1221
1221
|
scrollTop: 0
|
|
1222
1222
|
};
|
|
1223
|
-
const
|
|
1224
|
-
function
|
|
1225
|
-
|
|
1223
|
+
const l = Z(0);
|
|
1224
|
+
function c() {
|
|
1225
|
+
l.x = je(o);
|
|
1226
1226
|
}
|
|
1227
1227
|
if (s || !s && !r)
|
|
1228
|
-
if ((
|
|
1229
|
-
const
|
|
1230
|
-
|
|
1231
|
-
} else o &&
|
|
1232
|
-
r && !s && o &&
|
|
1233
|
-
const d = o && !s && !r ? mt(o, i) : Z(0),
|
|
1228
|
+
if ((ge(n) !== "body" || Ce(o)) && (i = Me(n)), s) {
|
|
1229
|
+
const f = be(n, !0, r, n);
|
|
1230
|
+
l.x = f.x + n.clientLeft, l.y = f.y + n.clientTop;
|
|
1231
|
+
} else o && c();
|
|
1232
|
+
r && !s && o && c();
|
|
1233
|
+
const d = o && !s && !r ? mt(o, i) : Z(0), u = a.left + i.scrollLeft - l.x - d.x, b = a.top + i.scrollTop - l.y - d.y;
|
|
1234
1234
|
return {
|
|
1235
|
-
x:
|
|
1235
|
+
x: u,
|
|
1236
1236
|
y: b,
|
|
1237
1237
|
width: a.width,
|
|
1238
1238
|
height: a.height
|
|
@@ -1241,36 +1241,36 @@ function Dn(e, n, t) {
|
|
|
1241
1241
|
function Ie(e) {
|
|
1242
1242
|
return Q(e).position === "static";
|
|
1243
1243
|
}
|
|
1244
|
-
function
|
|
1245
|
-
if (!
|
|
1244
|
+
function ot(e, n) {
|
|
1245
|
+
if (!ee(e) || Q(e).position === "fixed")
|
|
1246
1246
|
return null;
|
|
1247
1247
|
if (n)
|
|
1248
1248
|
return n(e);
|
|
1249
1249
|
let t = e.offsetParent;
|
|
1250
|
-
return
|
|
1250
|
+
return ne(e) === t && (t = t.ownerDocument.body), t;
|
|
1251
1251
|
}
|
|
1252
1252
|
function ht(e, n) {
|
|
1253
1253
|
const t = U(e);
|
|
1254
1254
|
if (Ee(e))
|
|
1255
1255
|
return t;
|
|
1256
|
-
if (!
|
|
1257
|
-
let o =
|
|
1258
|
-
for (; o && !
|
|
1256
|
+
if (!ee(e)) {
|
|
1257
|
+
let o = ue(e);
|
|
1258
|
+
for (; o && !ye(o); ) {
|
|
1259
1259
|
if (J(o) && !Ie(o))
|
|
1260
1260
|
return o;
|
|
1261
|
-
o =
|
|
1261
|
+
o = ue(o);
|
|
1262
1262
|
}
|
|
1263
1263
|
return t;
|
|
1264
1264
|
}
|
|
1265
|
-
let s =
|
|
1266
|
-
for (; s &&
|
|
1267
|
-
s =
|
|
1268
|
-
return s &&
|
|
1265
|
+
let s = ot(e, n);
|
|
1266
|
+
for (; s && ln(s) && Ie(s); )
|
|
1267
|
+
s = ot(s, n);
|
|
1268
|
+
return s && ye(s) && Ie(s) && !Ge(s) ? t : s || bn(e) || t;
|
|
1269
1269
|
}
|
|
1270
|
-
const
|
|
1270
|
+
const Vn = async function(e) {
|
|
1271
1271
|
const n = this.getOffsetParent || ht, t = this.getDimensions, s = await t(e.floating);
|
|
1272
1272
|
return {
|
|
1273
|
-
reference:
|
|
1273
|
+
reference: Tn(e.reference, await n(e.floating), e.strategy),
|
|
1274
1274
|
floating: {
|
|
1275
1275
|
x: 0,
|
|
1276
1276
|
y: 0,
|
|
@@ -1279,65 +1279,65 @@ const Tn = async function(e) {
|
|
|
1279
1279
|
}
|
|
1280
1280
|
};
|
|
1281
1281
|
};
|
|
1282
|
-
function
|
|
1282
|
+
function Rn(e) {
|
|
1283
1283
|
return Q(e).direction === "rtl";
|
|
1284
1284
|
}
|
|
1285
|
-
const
|
|
1286
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
1287
|
-
getDocumentElement:
|
|
1288
|
-
getClippingRect:
|
|
1285
|
+
const Ln = {
|
|
1286
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: vn,
|
|
1287
|
+
getDocumentElement: ne,
|
|
1288
|
+
getClippingRect: Cn,
|
|
1289
1289
|
getOffsetParent: ht,
|
|
1290
|
-
getElementRects:
|
|
1291
|
-
getClientRects:
|
|
1292
|
-
getDimensions:
|
|
1293
|
-
getScale:
|
|
1290
|
+
getElementRects: Vn,
|
|
1291
|
+
getClientRects: pn,
|
|
1292
|
+
getDimensions: Dn,
|
|
1293
|
+
getScale: pe,
|
|
1294
1294
|
isElement: J,
|
|
1295
|
-
isRTL:
|
|
1295
|
+
isRTL: Rn
|
|
1296
1296
|
};
|
|
1297
1297
|
function vt(e, n) {
|
|
1298
1298
|
return e.x === n.x && e.y === n.y && e.width === n.width && e.height === n.height;
|
|
1299
1299
|
}
|
|
1300
|
-
function
|
|
1300
|
+
function Bn(e, n) {
|
|
1301
1301
|
let t = null, s;
|
|
1302
|
-
const o =
|
|
1302
|
+
const o = ne(e);
|
|
1303
1303
|
function r() {
|
|
1304
1304
|
var i;
|
|
1305
1305
|
clearTimeout(s), (i = t) == null || i.disconnect(), t = null;
|
|
1306
1306
|
}
|
|
1307
|
-
function a(i,
|
|
1308
|
-
i === void 0 && (i = !1),
|
|
1309
|
-
const
|
|
1307
|
+
function a(i, l) {
|
|
1308
|
+
i === void 0 && (i = !1), l === void 0 && (l = 1), r();
|
|
1309
|
+
const c = e.getBoundingClientRect(), {
|
|
1310
1310
|
left: d,
|
|
1311
|
-
top:
|
|
1311
|
+
top: u,
|
|
1312
1312
|
width: b,
|
|
1313
|
-
height:
|
|
1314
|
-
} =
|
|
1315
|
-
if (i || n(), !b || !
|
|
1313
|
+
height: f
|
|
1314
|
+
} = c;
|
|
1315
|
+
if (i || n(), !b || !f)
|
|
1316
1316
|
return;
|
|
1317
|
-
const
|
|
1318
|
-
rootMargin: -
|
|
1319
|
-
threshold: q(0,
|
|
1317
|
+
const h = De(u), m = De(o.clientWidth - (d + b)), v = De(o.clientHeight - (u + f)), y = De(d), C = {
|
|
1318
|
+
rootMargin: -h + "px " + -m + "px " + -v + "px " + -y + "px",
|
|
1319
|
+
threshold: q(0, ce(1, l)) || 1
|
|
1320
1320
|
};
|
|
1321
1321
|
let A = !0;
|
|
1322
|
-
function T(
|
|
1323
|
-
const
|
|
1324
|
-
if (
|
|
1322
|
+
function T(B) {
|
|
1323
|
+
const D = B[0].intersectionRatio;
|
|
1324
|
+
if (D !== l) {
|
|
1325
1325
|
if (!A)
|
|
1326
1326
|
return a();
|
|
1327
|
-
|
|
1327
|
+
D ? a(!1, D) : s = setTimeout(() => {
|
|
1328
1328
|
a(!1, 1e-7);
|
|
1329
1329
|
}, 1e3);
|
|
1330
1330
|
}
|
|
1331
|
-
|
|
1331
|
+
D === 1 && !vt(c, e.getBoundingClientRect()) && a(), A = !1;
|
|
1332
1332
|
}
|
|
1333
1333
|
try {
|
|
1334
1334
|
t = new IntersectionObserver(T, {
|
|
1335
|
-
...
|
|
1335
|
+
...C,
|
|
1336
1336
|
// Handle <iframe>s
|
|
1337
1337
|
root: o.ownerDocument
|
|
1338
1338
|
});
|
|
1339
1339
|
} catch {
|
|
1340
|
-
t = new IntersectionObserver(T,
|
|
1340
|
+
t = new IntersectionObserver(T, C);
|
|
1341
1341
|
}
|
|
1342
1342
|
t.observe(e);
|
|
1343
1343
|
}
|
|
@@ -1350,68 +1350,68 @@ function Sn(e, n, t, s) {
|
|
|
1350
1350
|
ancestorResize: r = !0,
|
|
1351
1351
|
elementResize: a = typeof ResizeObserver == "function",
|
|
1352
1352
|
layoutShift: i = typeof IntersectionObserver == "function",
|
|
1353
|
-
animationFrame:
|
|
1354
|
-
} = s,
|
|
1355
|
-
d.forEach((
|
|
1356
|
-
o &&
|
|
1353
|
+
animationFrame: l = !1
|
|
1354
|
+
} = s, c = Qe(e), d = o || r ? [...c ? $e(c) : [], ...$e(n)] : [];
|
|
1355
|
+
d.forEach((y) => {
|
|
1356
|
+
o && y.addEventListener("scroll", t, {
|
|
1357
1357
|
passive: !0
|
|
1358
|
-
}), r &&
|
|
1358
|
+
}), r && y.addEventListener("resize", t);
|
|
1359
1359
|
});
|
|
1360
|
-
const
|
|
1361
|
-
let b = -1,
|
|
1362
|
-
a && (
|
|
1363
|
-
let [
|
|
1364
|
-
|
|
1365
|
-
var
|
|
1366
|
-
(
|
|
1360
|
+
const u = c && i ? Bn(c, t) : null;
|
|
1361
|
+
let b = -1, f = null;
|
|
1362
|
+
a && (f = new ResizeObserver((y) => {
|
|
1363
|
+
let [k] = y;
|
|
1364
|
+
k && k.target === c && f && (f.unobserve(n), cancelAnimationFrame(b), b = requestAnimationFrame(() => {
|
|
1365
|
+
var C;
|
|
1366
|
+
(C = f) == null || C.observe(n);
|
|
1367
1367
|
})), t();
|
|
1368
|
-
}),
|
|
1369
|
-
let
|
|
1370
|
-
|
|
1371
|
-
function
|
|
1372
|
-
const
|
|
1373
|
-
m && !vt(m,
|
|
1368
|
+
}), c && !l && f.observe(c), f.observe(n));
|
|
1369
|
+
let h, m = l ? be(e) : null;
|
|
1370
|
+
l && v();
|
|
1371
|
+
function v() {
|
|
1372
|
+
const y = be(e);
|
|
1373
|
+
m && !vt(m, y) && t(), m = y, h = requestAnimationFrame(v);
|
|
1374
1374
|
}
|
|
1375
1375
|
return t(), () => {
|
|
1376
|
-
var
|
|
1377
|
-
d.forEach((
|
|
1378
|
-
o &&
|
|
1379
|
-
}),
|
|
1376
|
+
var y;
|
|
1377
|
+
d.forEach((k) => {
|
|
1378
|
+
o && k.removeEventListener("scroll", t), r && k.removeEventListener("resize", t);
|
|
1379
|
+
}), u == null || u(), (y = f) == null || y.disconnect(), f = null, l && cancelAnimationFrame(h);
|
|
1380
1380
|
};
|
|
1381
1381
|
}
|
|
1382
|
-
const pt =
|
|
1382
|
+
const pt = nn, yt = sn, xt = _t, An = on, On = Zt, zn = (e, n, t) => {
|
|
1383
1383
|
const s = /* @__PURE__ */ new Map(), o = {
|
|
1384
|
-
platform:
|
|
1384
|
+
platform: Ln,
|
|
1385
1385
|
...t
|
|
1386
1386
|
}, r = {
|
|
1387
1387
|
...o.platform,
|
|
1388
1388
|
_c: s
|
|
1389
1389
|
};
|
|
1390
|
-
return
|
|
1390
|
+
return Qt(e, n, {
|
|
1391
1391
|
...o,
|
|
1392
1392
|
platform: r
|
|
1393
1393
|
});
|
|
1394
1394
|
};
|
|
1395
|
-
function
|
|
1395
|
+
function En(e) {
|
|
1396
1396
|
return e != null && typeof e == "object" && "$el" in e;
|
|
1397
1397
|
}
|
|
1398
1398
|
function He(e) {
|
|
1399
|
-
if (
|
|
1399
|
+
if (En(e)) {
|
|
1400
1400
|
const n = e.$el;
|
|
1401
|
-
return
|
|
1401
|
+
return Ye(n) && ge(n) === "#comment" ? null : n;
|
|
1402
1402
|
}
|
|
1403
1403
|
return e;
|
|
1404
1404
|
}
|
|
1405
|
-
function
|
|
1406
|
-
return typeof e == "function" ? e() :
|
|
1405
|
+
function ve(e) {
|
|
1406
|
+
return typeof e == "function" ? e() : S(e);
|
|
1407
1407
|
}
|
|
1408
|
-
function
|
|
1408
|
+
function Mn(e) {
|
|
1409
1409
|
return {
|
|
1410
1410
|
name: "arrow",
|
|
1411
1411
|
options: e,
|
|
1412
1412
|
fn(n) {
|
|
1413
|
-
const t = He(
|
|
1414
|
-
return t == null ? {} :
|
|
1413
|
+
const t = He(ve(e.element));
|
|
1414
|
+
return t == null ? {} : On({
|
|
1415
1415
|
element: t,
|
|
1416
1416
|
padding: e.padding
|
|
1417
1417
|
}).fn(n);
|
|
@@ -1421,101 +1421,101 @@ function En(e) {
|
|
|
1421
1421
|
function wt(e) {
|
|
1422
1422
|
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
1423
1423
|
}
|
|
1424
|
-
function
|
|
1424
|
+
function at(e, n) {
|
|
1425
1425
|
const t = wt(e);
|
|
1426
1426
|
return Math.round(n * t) / t;
|
|
1427
1427
|
}
|
|
1428
1428
|
function kt(e, n, t) {
|
|
1429
1429
|
t === void 0 && (t = {});
|
|
1430
1430
|
const s = t.whileElementsMounted, o = w(() => {
|
|
1431
|
-
var
|
|
1432
|
-
return (
|
|
1433
|
-
}), r = w(() =>
|
|
1434
|
-
var
|
|
1435
|
-
return (
|
|
1431
|
+
var D;
|
|
1432
|
+
return (D = ve(t.open)) != null ? D : !0;
|
|
1433
|
+
}), r = w(() => ve(t.middleware)), a = w(() => {
|
|
1434
|
+
var D;
|
|
1435
|
+
return (D = ve(t.placement)) != null ? D : "bottom";
|
|
1436
1436
|
}), i = w(() => {
|
|
1437
|
-
var
|
|
1438
|
-
return (
|
|
1439
|
-
}),
|
|
1440
|
-
var
|
|
1441
|
-
return (
|
|
1442
|
-
}),
|
|
1443
|
-
const
|
|
1444
|
-
position:
|
|
1437
|
+
var D;
|
|
1438
|
+
return (D = ve(t.strategy)) != null ? D : "absolute";
|
|
1439
|
+
}), l = w(() => {
|
|
1440
|
+
var D;
|
|
1441
|
+
return (D = ve(t.transform)) != null ? D : !0;
|
|
1442
|
+
}), c = w(() => He(e.value)), d = w(() => He(n.value)), u = j(0), b = j(0), f = j(i.value), h = j(a.value), m = Tt({}), v = j(!1), y = w(() => {
|
|
1443
|
+
const D = {
|
|
1444
|
+
position: f.value,
|
|
1445
1445
|
left: "0",
|
|
1446
1446
|
top: "0"
|
|
1447
1447
|
};
|
|
1448
1448
|
if (!d.value)
|
|
1449
|
-
return
|
|
1450
|
-
const M =
|
|
1451
|
-
return
|
|
1452
|
-
|
|
1449
|
+
return D;
|
|
1450
|
+
const M = at(d.value, u.value), I = at(d.value, b.value);
|
|
1451
|
+
return l.value ? {
|
|
1452
|
+
...D,
|
|
1453
1453
|
transform: "translate(" + M + "px, " + I + "px)",
|
|
1454
1454
|
...wt(d.value) >= 1.5 && {
|
|
1455
1455
|
willChange: "transform"
|
|
1456
1456
|
}
|
|
1457
1457
|
} : {
|
|
1458
|
-
position:
|
|
1458
|
+
position: f.value,
|
|
1459
1459
|
left: M + "px",
|
|
1460
1460
|
top: I + "px"
|
|
1461
1461
|
};
|
|
1462
1462
|
});
|
|
1463
|
-
let
|
|
1464
|
-
function
|
|
1465
|
-
if (
|
|
1463
|
+
let k;
|
|
1464
|
+
function C() {
|
|
1465
|
+
if (c.value == null || d.value == null)
|
|
1466
1466
|
return;
|
|
1467
|
-
const
|
|
1468
|
-
|
|
1467
|
+
const D = o.value;
|
|
1468
|
+
zn(c.value, d.value, {
|
|
1469
1469
|
middleware: r.value,
|
|
1470
1470
|
placement: a.value,
|
|
1471
1471
|
strategy: i.value
|
|
1472
1472
|
}).then((M) => {
|
|
1473
|
-
|
|
1473
|
+
u.value = M.x, b.value = M.y, f.value = M.strategy, h.value = M.placement, m.value = M.middlewareData, v.value = D !== !1;
|
|
1474
1474
|
});
|
|
1475
1475
|
}
|
|
1476
1476
|
function A() {
|
|
1477
|
-
typeof
|
|
1477
|
+
typeof k == "function" && (k(), k = void 0);
|
|
1478
1478
|
}
|
|
1479
1479
|
function T() {
|
|
1480
1480
|
if (A(), s === void 0) {
|
|
1481
|
-
|
|
1481
|
+
C();
|
|
1482
1482
|
return;
|
|
1483
1483
|
}
|
|
1484
|
-
if (
|
|
1485
|
-
|
|
1484
|
+
if (c.value != null && d.value != null) {
|
|
1485
|
+
k = s(c.value, d.value, C);
|
|
1486
1486
|
return;
|
|
1487
1487
|
}
|
|
1488
1488
|
}
|
|
1489
|
-
function
|
|
1490
|
-
o.value || (
|
|
1489
|
+
function B() {
|
|
1490
|
+
o.value || (v.value = !1);
|
|
1491
1491
|
}
|
|
1492
|
-
return
|
|
1492
|
+
return re([r, a, i, o], C, {
|
|
1493
1493
|
flush: "sync"
|
|
1494
|
-
}),
|
|
1494
|
+
}), re([c, d], T, {
|
|
1495
1495
|
flush: "sync"
|
|
1496
|
-
}),
|
|
1496
|
+
}), re(o, B, {
|
|
1497
1497
|
flush: "sync"
|
|
1498
1498
|
}), Vt() && Rt(A), {
|
|
1499
|
-
x:
|
|
1500
|
-
y:
|
|
1501
|
-
strategy:
|
|
1502
|
-
placement:
|
|
1503
|
-
middlewareData:
|
|
1504
|
-
isPositioned:
|
|
1505
|
-
floatingStyles:
|
|
1506
|
-
update:
|
|
1499
|
+
x: he(u),
|
|
1500
|
+
y: he(b),
|
|
1501
|
+
strategy: he(f),
|
|
1502
|
+
placement: he(h),
|
|
1503
|
+
middlewareData: he(m),
|
|
1504
|
+
isPositioned: he(v),
|
|
1505
|
+
floatingStyles: y,
|
|
1506
|
+
update: C
|
|
1507
1507
|
};
|
|
1508
1508
|
}
|
|
1509
|
-
const
|
|
1509
|
+
const jn = /* @__PURE__ */ z({
|
|
1510
1510
|
inheritAttrs: !1,
|
|
1511
1511
|
__name: "DsIconCheck",
|
|
1512
1512
|
setup(e) {
|
|
1513
|
-
return (n, t) => (g(),
|
|
1513
|
+
return (n, t) => (g(), p("svg", me({
|
|
1514
1514
|
fill: "none",
|
|
1515
1515
|
stroke: "currentColor",
|
|
1516
1516
|
viewBox: "0 0 24 24"
|
|
1517
1517
|
}, n.$attrs, { "aria-hidden": "true" }), [...t[0] || (t[0] = [
|
|
1518
|
-
|
|
1518
|
+
$("path", {
|
|
1519
1519
|
"stroke-linecap": "round",
|
|
1520
1520
|
"stroke-linejoin": "round",
|
|
1521
1521
|
"stroke-width": "2",
|
|
@@ -1527,12 +1527,12 @@ const Mn = /* @__PURE__ */ z({
|
|
|
1527
1527
|
inheritAttrs: !1,
|
|
1528
1528
|
__name: "DsIconChevronDown",
|
|
1529
1529
|
setup(e) {
|
|
1530
|
-
return (n, t) => (g(),
|
|
1530
|
+
return (n, t) => (g(), p("svg", me({
|
|
1531
1531
|
fill: "none",
|
|
1532
1532
|
stroke: "currentColor",
|
|
1533
1533
|
viewBox: "0 0 24 24"
|
|
1534
1534
|
}, n.$attrs, { "aria-hidden": "true" }), [...t[0] || (t[0] = [
|
|
1535
|
-
|
|
1535
|
+
$("path", {
|
|
1536
1536
|
"stroke-linecap": "round",
|
|
1537
1537
|
"stroke-linejoin": "round",
|
|
1538
1538
|
"stroke-width": "2",
|
|
@@ -1540,16 +1540,16 @@ const Mn = /* @__PURE__ */ z({
|
|
|
1540
1540
|
}, null, -1)
|
|
1541
1541
|
])], 16));
|
|
1542
1542
|
}
|
|
1543
|
-
}),
|
|
1543
|
+
}), Pn = /* @__PURE__ */ z({
|
|
1544
1544
|
inheritAttrs: !1,
|
|
1545
1545
|
__name: "DsIconChevronUp",
|
|
1546
1546
|
setup(e) {
|
|
1547
|
-
return (n, t) => (g(),
|
|
1547
|
+
return (n, t) => (g(), p("svg", me({
|
|
1548
1548
|
fill: "none",
|
|
1549
1549
|
stroke: "currentColor",
|
|
1550
1550
|
viewBox: "0 0 24 24"
|
|
1551
1551
|
}, n.$attrs, { "aria-hidden": "true" }), [...t[0] || (t[0] = [
|
|
1552
|
-
|
|
1552
|
+
$("path", {
|
|
1553
1553
|
"stroke-linecap": "round",
|
|
1554
1554
|
"stroke-linejoin": "round",
|
|
1555
1555
|
"stroke-width": "2",
|
|
@@ -1557,16 +1557,16 @@ const Mn = /* @__PURE__ */ z({
|
|
|
1557
1557
|
}, null, -1)
|
|
1558
1558
|
])], 16));
|
|
1559
1559
|
}
|
|
1560
|
-
}),
|
|
1560
|
+
}), In = /* @__PURE__ */ z({
|
|
1561
1561
|
inheritAttrs: !1,
|
|
1562
1562
|
__name: "DsIconInfo",
|
|
1563
1563
|
setup(e) {
|
|
1564
|
-
return (n, t) => (g(),
|
|
1564
|
+
return (n, t) => (g(), p("svg", me({
|
|
1565
1565
|
fill: "none",
|
|
1566
1566
|
stroke: "currentColor",
|
|
1567
1567
|
viewBox: "0 0 24 24"
|
|
1568
1568
|
}, n.$attrs, { "aria-hidden": "true" }), [...t[0] || (t[0] = [
|
|
1569
|
-
|
|
1569
|
+
$("path", {
|
|
1570
1570
|
"stroke-linecap": "round",
|
|
1571
1571
|
"stroke-linejoin": "round",
|
|
1572
1572
|
"stroke-width": "2",
|
|
@@ -1574,16 +1574,16 @@ const Mn = /* @__PURE__ */ z({
|
|
|
1574
1574
|
}, null, -1)
|
|
1575
1575
|
])], 16));
|
|
1576
1576
|
}
|
|
1577
|
-
}),
|
|
1577
|
+
}), Fn = /* @__PURE__ */ z({
|
|
1578
1578
|
inheritAttrs: !1,
|
|
1579
1579
|
__name: "DsIconSort",
|
|
1580
1580
|
setup(e) {
|
|
1581
|
-
return (n, t) => (g(),
|
|
1581
|
+
return (n, t) => (g(), p("svg", me({
|
|
1582
1582
|
fill: "none",
|
|
1583
1583
|
stroke: "currentColor",
|
|
1584
1584
|
viewBox: "0 0 24 24"
|
|
1585
1585
|
}, n.$attrs, { "aria-hidden": "true" }), [...t[0] || (t[0] = [
|
|
1586
|
-
|
|
1586
|
+
$("path", {
|
|
1587
1587
|
"stroke-linecap": "round",
|
|
1588
1588
|
"stroke-linejoin": "round",
|
|
1589
1589
|
"stroke-width": "2",
|
|
@@ -1595,12 +1595,12 @@ const Mn = /* @__PURE__ */ z({
|
|
|
1595
1595
|
inheritAttrs: !1,
|
|
1596
1596
|
__name: "DsIconWarning",
|
|
1597
1597
|
setup(e) {
|
|
1598
|
-
return (n, t) => (g(),
|
|
1598
|
+
return (n, t) => (g(), p("svg", me({
|
|
1599
1599
|
fill: "none",
|
|
1600
1600
|
stroke: "currentColor",
|
|
1601
1601
|
viewBox: "0 0 24 24"
|
|
1602
1602
|
}, n.$attrs, { "aria-hidden": "true" }), [...t[0] || (t[0] = [
|
|
1603
|
-
|
|
1603
|
+
$("path", {
|
|
1604
1604
|
"stroke-linecap": "round",
|
|
1605
1605
|
"stroke-linejoin": "round",
|
|
1606
1606
|
"stroke-width": "2",
|
|
@@ -1608,16 +1608,16 @@ const Mn = /* @__PURE__ */ z({
|
|
|
1608
1608
|
}, null, -1)
|
|
1609
1609
|
])], 16));
|
|
1610
1610
|
}
|
|
1611
|
-
}),
|
|
1611
|
+
}), Be = /* @__PURE__ */ z({
|
|
1612
1612
|
inheritAttrs: !1,
|
|
1613
1613
|
__name: "DsIconX",
|
|
1614
1614
|
setup(e) {
|
|
1615
|
-
return (n, t) => (g(),
|
|
1615
|
+
return (n, t) => (g(), p("svg", me({
|
|
1616
1616
|
fill: "none",
|
|
1617
1617
|
stroke: "currentColor",
|
|
1618
1618
|
viewBox: "0 0 24 24"
|
|
1619
1619
|
}, n.$attrs, { "aria-hidden": "true" }), [...t[0] || (t[0] = [
|
|
1620
|
-
|
|
1620
|
+
$("path", {
|
|
1621
1621
|
"stroke-linecap": "round",
|
|
1622
1622
|
"stroke-linejoin": "round",
|
|
1623
1623
|
"stroke-width": "2",
|
|
@@ -1626,11 +1626,11 @@ const Mn = /* @__PURE__ */ z({
|
|
|
1626
1626
|
])], 16));
|
|
1627
1627
|
}
|
|
1628
1628
|
});
|
|
1629
|
-
let
|
|
1630
|
-
function
|
|
1631
|
-
return `${e}-${++
|
|
1629
|
+
let Nn = 0;
|
|
1630
|
+
function oe(e = "ds") {
|
|
1631
|
+
return `${e}-${++Nn}`;
|
|
1632
1632
|
}
|
|
1633
|
-
const
|
|
1633
|
+
const Wn = { class: "relative" }, Hn = ["id", "aria-label"], qn = ["id", "aria-selected", "aria-disabled", "onClick", "onMouseenter"], Kn = {
|
|
1634
1634
|
key: 0,
|
|
1635
1635
|
class: "px-3 py-2 text-sm text-fg-disabled",
|
|
1636
1636
|
role: "status"
|
|
@@ -1650,16 +1650,16 @@ const Nn = { class: "relative" }, Wn = ["id", "aria-label"], Hn = ["id", "aria-s
|
|
|
1650
1650
|
},
|
|
1651
1651
|
emits: ["update:modelValue", "change"],
|
|
1652
1652
|
setup(e, { emit: n }) {
|
|
1653
|
-
const t = e, s = n, o = j(), r = j(), a = j(!1), i =
|
|
1654
|
-
if (!(!a.value ||
|
|
1655
|
-
return d(
|
|
1656
|
-
}), d = (x) => `${i}-option-${x}`, { floatingStyles:
|
|
1653
|
+
const t = e, s = n, o = j(), r = j(), a = j(!1), i = oe("listbox"), l = j(-1), c = w(() => {
|
|
1654
|
+
if (!(!a.value || l.value < 0))
|
|
1655
|
+
return d(l.value);
|
|
1656
|
+
}), d = (x) => `${i}-option-${x}`, { floatingStyles: u } = kt(o, r, {
|
|
1657
1657
|
placement: "bottom-start",
|
|
1658
1658
|
middleware: [
|
|
1659
1659
|
pt(4),
|
|
1660
1660
|
xt(),
|
|
1661
1661
|
yt({ padding: 8 }),
|
|
1662
|
-
|
|
1662
|
+
An({
|
|
1663
1663
|
apply({ rects: x }) {
|
|
1664
1664
|
r.value && Object.assign(r.value.style, {
|
|
1665
1665
|
minWidth: `${x.reference.width}px`
|
|
@@ -1668,45 +1668,45 @@ const Nn = { class: "relative" }, Wn = ["id", "aria-label"], Hn = ["id", "aria-s
|
|
|
1668
1668
|
})
|
|
1669
1669
|
],
|
|
1670
1670
|
whileElementsMounted: Sn
|
|
1671
|
-
}), b = w(() => t.modelValue),
|
|
1672
|
-
|
|
1671
|
+
}), b = w(() => t.modelValue), f = w(() => t.options.find((x) => m(x) === b.value)), h = w(() => f.value ? v(f.value) : ""), m = (x) => typeof x == "object" && x !== null ? x.value : x, v = (x) => typeof x == "object" && x !== null ? x.label : String(x), y = (x) => typeof x == "object" && x !== null && x.disabled || !1, k = () => {
|
|
1672
|
+
fe(() => {
|
|
1673
1673
|
const x = r.value;
|
|
1674
|
-
if (!x ||
|
|
1675
|
-
const O = x.querySelector(`#${d(
|
|
1674
|
+
if (!x || l.value < 0) return;
|
|
1675
|
+
const O = x.querySelector(`#${d(l.value)}`);
|
|
1676
1676
|
O == null || O.scrollIntoView({ block: "nearest" });
|
|
1677
1677
|
});
|
|
1678
|
-
},
|
|
1678
|
+
}, C = (x, O) => {
|
|
1679
1679
|
let E = x;
|
|
1680
1680
|
for (; E >= 0 && E < t.options.length; ) {
|
|
1681
|
-
if (!
|
|
1681
|
+
if (!y(t.options[E])) return E;
|
|
1682
1682
|
E += O;
|
|
1683
1683
|
}
|
|
1684
1684
|
return -1;
|
|
1685
1685
|
}, A = () => {
|
|
1686
|
-
const x =
|
|
1687
|
-
x >= 0 && (
|
|
1686
|
+
const x = C(l.value + 1, 1);
|
|
1687
|
+
x >= 0 && (l.value = x, k());
|
|
1688
1688
|
}, T = () => {
|
|
1689
|
-
const x =
|
|
1690
|
-
x >= 0 && (
|
|
1691
|
-
},
|
|
1692
|
-
const x =
|
|
1693
|
-
x >= 0 && (
|
|
1694
|
-
},
|
|
1695
|
-
const x =
|
|
1696
|
-
x >= 0 && (
|
|
1689
|
+
const x = C(l.value - 1, -1);
|
|
1690
|
+
x >= 0 && (l.value = x, k());
|
|
1691
|
+
}, B = () => {
|
|
1692
|
+
const x = C(0, 1);
|
|
1693
|
+
x >= 0 && (l.value = x, k());
|
|
1694
|
+
}, D = () => {
|
|
1695
|
+
const x = C(t.options.length - 1, -1);
|
|
1696
|
+
x >= 0 && (l.value = x, k());
|
|
1697
1697
|
}, M = () => {
|
|
1698
|
-
t.disabled || t.loading || (a.value = !0,
|
|
1698
|
+
t.disabled || t.loading || (a.value = !0, fe(() => {
|
|
1699
1699
|
const x = t.options.findIndex(
|
|
1700
1700
|
(O) => m(O) === b.value
|
|
1701
1701
|
);
|
|
1702
|
-
x >= 0 && !
|
|
1702
|
+
x >= 0 && !y(t.options[x]) ? l.value = x : B(), k();
|
|
1703
1703
|
}));
|
|
1704
1704
|
}, I = () => {
|
|
1705
|
-
a.value = !1,
|
|
1705
|
+
a.value = !1, l.value = -1;
|
|
1706
1706
|
}, W = () => {
|
|
1707
1707
|
t.disabled || t.loading || (a.value ? I() : M());
|
|
1708
1708
|
}, Y = (x) => {
|
|
1709
|
-
if (
|
|
1709
|
+
if (y(x)) return;
|
|
1710
1710
|
const O = m(x);
|
|
1711
1711
|
s("update:modelValue", O), s("change", O, x), I();
|
|
1712
1712
|
}, X = (x) => {
|
|
@@ -1717,20 +1717,20 @@ const Nn = { class: "relative" }, Wn = ["id", "aria-label"], Hn = ["id", "aria-s
|
|
|
1717
1717
|
}
|
|
1718
1718
|
switch (x.key) {
|
|
1719
1719
|
case "ArrowDown":
|
|
1720
|
-
x.preventDefault(),
|
|
1720
|
+
x.preventDefault(), l.value < 0 ? B() : A();
|
|
1721
1721
|
break;
|
|
1722
1722
|
case "ArrowUp":
|
|
1723
|
-
x.preventDefault(),
|
|
1723
|
+
x.preventDefault(), l.value < 0 ? D() : T();
|
|
1724
1724
|
break;
|
|
1725
1725
|
case "Home":
|
|
1726
|
-
x.preventDefault(),
|
|
1726
|
+
x.preventDefault(), B();
|
|
1727
1727
|
break;
|
|
1728
1728
|
case "End":
|
|
1729
|
-
x.preventDefault(),
|
|
1729
|
+
x.preventDefault(), D();
|
|
1730
1730
|
break;
|
|
1731
1731
|
case "Enter":
|
|
1732
1732
|
case " ":
|
|
1733
|
-
x.preventDefault(),
|
|
1733
|
+
x.preventDefault(), l.value >= 0 && l.value < t.options.length && Y(t.options[l.value]);
|
|
1734
1734
|
break;
|
|
1735
1735
|
case "Escape":
|
|
1736
1736
|
x.preventDefault(), I();
|
|
@@ -1741,8 +1741,8 @@ const Nn = { class: "relative" }, Wn = ["id", "aria-label"], Hn = ["id", "aria-s
|
|
|
1741
1741
|
}
|
|
1742
1742
|
}
|
|
1743
1743
|
};
|
|
1744
|
-
return (x, O) => (g(),
|
|
1745
|
-
|
|
1744
|
+
return (x, O) => (g(), p("div", Wn, [
|
|
1745
|
+
te(it, {
|
|
1746
1746
|
ref_key: "triggerRef",
|
|
1747
1747
|
ref: o,
|
|
1748
1748
|
variant: e.variant,
|
|
@@ -1750,72 +1750,72 @@ const Nn = { class: "relative" }, Wn = ["id", "aria-label"], Hn = ["id", "aria-s
|
|
|
1750
1750
|
loading: e.loading,
|
|
1751
1751
|
size: e.size,
|
|
1752
1752
|
iconLeft: e.iconLeft,
|
|
1753
|
-
iconRight:
|
|
1753
|
+
iconRight: S(Pe),
|
|
1754
1754
|
fullWidth: e.fullWidth,
|
|
1755
1755
|
role: "combobox",
|
|
1756
1756
|
"aria-expanded": a.value ? "true" : "false",
|
|
1757
|
-
"aria-controls":
|
|
1757
|
+
"aria-controls": S(i),
|
|
1758
1758
|
"aria-haspopup": "listbox",
|
|
1759
|
-
"aria-activedescendant":
|
|
1759
|
+
"aria-activedescendant": c.value,
|
|
1760
1760
|
onClick: W,
|
|
1761
1761
|
onKeydown: X
|
|
1762
1762
|
}, {
|
|
1763
1763
|
default: Ae(() => [
|
|
1764
1764
|
P(x.$slots, "trigger", {}, () => [
|
|
1765
|
-
K(L(
|
|
1765
|
+
K(L(h.value || e.placeholder), 1)
|
|
1766
1766
|
])
|
|
1767
1767
|
]),
|
|
1768
1768
|
_: 3
|
|
1769
1769
|
}, 8, ["variant", "disabled", "loading", "size", "iconLeft", "iconRight", "fullWidth", "aria-expanded", "aria-controls", "aria-activedescendant"]),
|
|
1770
1770
|
(g(), N(Oe, { to: "body" }, [
|
|
1771
|
-
a.value ? (g(),
|
|
1771
|
+
a.value ? (g(), p("div", {
|
|
1772
1772
|
key: 0,
|
|
1773
1773
|
ref_key: "floatingRef",
|
|
1774
1774
|
ref: r,
|
|
1775
|
-
id:
|
|
1775
|
+
id: S(i),
|
|
1776
1776
|
role: "listbox",
|
|
1777
1777
|
"aria-label": e.placeholder,
|
|
1778
|
-
style:
|
|
1778
|
+
style: _(S(u)),
|
|
1779
1779
|
class: "z-dropdown min-w-32 bg-bg border border-solid border-border rounded-md shadow-default max-h-64 overflow-y-auto",
|
|
1780
1780
|
onClick: O[0] || (O[0] = Lt(() => {
|
|
1781
1781
|
}, ["stop"]))
|
|
1782
1782
|
}, [
|
|
1783
|
-
(g(!0),
|
|
1783
|
+
(g(!0), p(le, null, ie(e.options, (E, F) => (g(), p("div", {
|
|
1784
1784
|
key: m(E),
|
|
1785
1785
|
id: d(F),
|
|
1786
1786
|
role: "option",
|
|
1787
1787
|
"aria-selected": b.value === m(E) ? "true" : "false",
|
|
1788
|
-
"aria-disabled":
|
|
1789
|
-
class:
|
|
1788
|
+
"aria-disabled": y(E) ? "true" : void 0,
|
|
1789
|
+
class: V([
|
|
1790
1790
|
"px-3 py-2 text-sm transition-colors outline-none",
|
|
1791
|
-
|
|
1791
|
+
y(E) ? "opacity-50 cursor-not-allowed" : "cursor-pointer",
|
|
1792
1792
|
b.value === m(E) ? "bg-brand text-brand-on-solid" : "",
|
|
1793
|
-
|
|
1794
|
-
(
|
|
1793
|
+
l.value === F && b.value !== m(E) ? "bg-surface-hover" : "",
|
|
1794
|
+
(l.value !== F && b.value !== m(E), ""),
|
|
1795
1795
|
F === 0 ? "rounded-t-md" : "",
|
|
1796
1796
|
F === e.options.length - 1 ? "rounded-b-md" : ""
|
|
1797
1797
|
]),
|
|
1798
1798
|
onClick: (H) => Y(E),
|
|
1799
|
-
onMouseenter: (H) =>
|
|
1799
|
+
onMouseenter: (H) => l.value = F
|
|
1800
1800
|
}, [
|
|
1801
1801
|
P(x.$slots, "option", {
|
|
1802
1802
|
option: E,
|
|
1803
1803
|
index: F
|
|
1804
1804
|
}, () => [
|
|
1805
|
-
K(L(
|
|
1805
|
+
K(L(v(E)), 1)
|
|
1806
1806
|
])
|
|
1807
|
-
], 42,
|
|
1808
|
-
e.options.length ?
|
|
1809
|
-
], 12,
|
|
1807
|
+
], 42, qn))), 128)),
|
|
1808
|
+
e.options.length ? R("", !0) : (g(), p("div", Kn, L(e.emptyText), 1))
|
|
1809
|
+
], 12, Hn)) : R("", !0)
|
|
1810
1810
|
])),
|
|
1811
|
-
a.value ? (g(),
|
|
1811
|
+
a.value ? (g(), p("div", {
|
|
1812
1812
|
key: 0,
|
|
1813
1813
|
class: "fixed inset-0 z-dropdown",
|
|
1814
1814
|
onClick: I
|
|
1815
|
-
})) :
|
|
1815
|
+
})) : R("", !0)
|
|
1816
1816
|
]));
|
|
1817
1817
|
}
|
|
1818
|
-
}),
|
|
1818
|
+
}), Un = ["aria-expanded"], Xn = { class: "text-label" }, Yn = { class: "flex items-center gap-2" }, Gn = { class: "px-4 pb-4 border-t border-t-solid border-border" }, Jn = { class: "pt-3" }, wo = /* @__PURE__ */ z({
|
|
1819
1819
|
__name: "DsExpandableCard",
|
|
1820
1820
|
props: {
|
|
1821
1821
|
title: {},
|
|
@@ -1825,71 +1825,76 @@ const Nn = { class: "relative" }, Wn = ["id", "aria-label"], Hn = ["id", "aria-s
|
|
|
1825
1825
|
},
|
|
1826
1826
|
emits: ["update:modelValue"],
|
|
1827
1827
|
setup(e, { emit: n }) {
|
|
1828
|
-
const t = e, s = n, o = j(null), r = j(0), a = j(t.modelValue ?? t.defaultExpanded)
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1828
|
+
const t = e, s = n, o = j(null), r = j(0), a = j(t.modelValue ?? t.defaultExpanded);
|
|
1829
|
+
re(
|
|
1830
|
+
() => t.modelValue,
|
|
1831
|
+
(u) => {
|
|
1832
|
+
u !== void 0 && (a.value = u);
|
|
1833
|
+
}
|
|
1834
|
+
);
|
|
1835
|
+
function i() {
|
|
1836
|
+
a.value = !a.value, s("update:modelValue", a.value);
|
|
1832
1837
|
}
|
|
1833
|
-
const
|
|
1834
|
-
maxHeight:
|
|
1838
|
+
const l = w(() => ({
|
|
1839
|
+
maxHeight: a.value ? `${r.value}px` : "0px"
|
|
1835
1840
|
}));
|
|
1836
|
-
function
|
|
1837
|
-
o.value && (o.value.style.maxHeight = "none", r.value = o.value.scrollHeight, o.value.style.maxHeight =
|
|
1841
|
+
function c() {
|
|
1842
|
+
o.value && (o.value.style.maxHeight = "none", r.value = o.value.scrollHeight, o.value.style.maxHeight = a.value ? `${r.value}px` : "0px");
|
|
1838
1843
|
}
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
}),
|
|
1842
|
-
|
|
1844
|
+
qe(() => {
|
|
1845
|
+
fe(c);
|
|
1846
|
+
}), re(a, () => {
|
|
1847
|
+
fe(c);
|
|
1843
1848
|
});
|
|
1844
|
-
const
|
|
1845
|
-
const
|
|
1846
|
-
default: ["border", "border-solid", "border-border-strong"
|
|
1849
|
+
const d = w(() => {
|
|
1850
|
+
const u = ["rounded-lg", "bg-bg", "overflow-hidden"], b = {
|
|
1851
|
+
default: ["border", "border-solid", "border-border-strong"],
|
|
1847
1852
|
outlined: ["border", "border-solid", "border-border-strong"],
|
|
1848
1853
|
elevated: ["shadow-default"]
|
|
1849
1854
|
};
|
|
1850
|
-
return [...
|
|
1855
|
+
return [...u, ...b[t.variant]].join(" ");
|
|
1851
1856
|
});
|
|
1852
|
-
return (
|
|
1853
|
-
class:
|
|
1857
|
+
return (u, b) => (g(), p("div", {
|
|
1858
|
+
class: V(d.value)
|
|
1854
1859
|
}, [
|
|
1855
|
-
|
|
1860
|
+
$("button", {
|
|
1856
1861
|
type: "button",
|
|
1857
1862
|
class: "w-full flex items-center justify-between px-4 py-3 text-left bg-transparent border-none cursor-pointer",
|
|
1858
|
-
"aria-expanded":
|
|
1859
|
-
onClick:
|
|
1863
|
+
"aria-expanded": a.value,
|
|
1864
|
+
onClick: i
|
|
1860
1865
|
}, [
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
P(
|
|
1864
|
-
|
|
1865
|
-
class:
|
|
1866
|
+
$("span", Xn, L(e.title), 1),
|
|
1867
|
+
$("span", Yn, [
|
|
1868
|
+
P(u.$slots, "header-extra"),
|
|
1869
|
+
te(S(Pe), {
|
|
1870
|
+
class: V(["w-4 h-4 text-fg-secondary transition-transform duration-normal", { "rotate-180": a.value }]),
|
|
1866
1871
|
"aria-hidden": "true"
|
|
1867
1872
|
}, null, 8, ["class"])
|
|
1868
1873
|
])
|
|
1869
|
-
], 8,
|
|
1870
|
-
|
|
1874
|
+
], 8, Un),
|
|
1875
|
+
$("div", {
|
|
1871
1876
|
ref_key: "contentRef",
|
|
1872
1877
|
ref: o,
|
|
1873
1878
|
class: "overflow-hidden transition-all duration-normal ease-in-out",
|
|
1874
|
-
style:
|
|
1879
|
+
style: _(l.value)
|
|
1875
1880
|
}, [
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
P(
|
|
1881
|
+
$("div", Gn, [
|
|
1882
|
+
$("div", Jn, [
|
|
1883
|
+
P(u.$slots, "default")
|
|
1879
1884
|
])
|
|
1880
1885
|
])
|
|
1881
1886
|
], 4)
|
|
1882
1887
|
], 2));
|
|
1883
1888
|
}
|
|
1884
|
-
}),
|
|
1889
|
+
}), Qn = { class: "w-full" }, Zn = ["for"], _n = {
|
|
1885
1890
|
key: 0,
|
|
1886
1891
|
class: "text-error ml-1",
|
|
1887
1892
|
"aria-hidden": "true"
|
|
1888
|
-
},
|
|
1893
|
+
}, es = { class: "relative" }, ts = {
|
|
1889
1894
|
key: 0,
|
|
1890
1895
|
class: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",
|
|
1891
1896
|
"aria-hidden": "true"
|
|
1892
|
-
},
|
|
1897
|
+
}, ns = ["id", "type", "value", "placeholder", "disabled", "readonly", "required", "autocomplete", "maxlength", "min", "max", "step", "aria-describedby", "aria-invalid"], ss = {
|
|
1893
1898
|
key: 1,
|
|
1894
1899
|
class: "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none",
|
|
1895
1900
|
"aria-hidden": "true"
|
|
@@ -1917,10 +1922,10 @@ const Nn = { class: "relative" }, Wn = ["id", "aria-label"], Hn = ["id", "aria-s
|
|
|
1917
1922
|
},
|
|
1918
1923
|
emits: ["update:modelValue", "blur", "focus", "enter", "clear"],
|
|
1919
1924
|
setup(e, { expose: n, emit: t }) {
|
|
1920
|
-
const s = e, o = t, r = j(null), a =
|
|
1925
|
+
const s = e, o = t, r = j(null), a = oe("input"), i = `${a}-help`, l = `${a}-error`, c = w(() => {
|
|
1921
1926
|
const T = [];
|
|
1922
|
-
return s.helpText && !s.error && T.push(i), s.error && T.push(
|
|
1923
|
-
}), d = w(() => s.clearable && b.value && !s.disabled),
|
|
1927
|
+
return s.helpText && !s.error && T.push(i), s.error && T.push(l), T.length > 0 ? T.join(" ") : void 0;
|
|
1928
|
+
}), d = w(() => s.clearable && b.value && !s.disabled), u = w(() => s.iconRight || s.clearable), b = w(() => s.modelValue == null ? !1 : typeof s.modelValue == "string" ? s.modelValue.length > 0 : !0), f = w(() => {
|
|
1924
1929
|
const T = [
|
|
1925
1930
|
"block",
|
|
1926
1931
|
"w-full",
|
|
@@ -1939,20 +1944,20 @@ const Nn = { class: "relative" }, Wn = ["id", "aria-label"], Hn = ["id", "aria-s
|
|
|
1939
1944
|
"disabled:bg-surface-disabled",
|
|
1940
1945
|
"disabled:text-fg-disabled",
|
|
1941
1946
|
"box-border"
|
|
1942
|
-
],
|
|
1947
|
+
], D = {
|
|
1943
1948
|
small: { text: "text-sm", py: "py-1", px: "px-2", pl: "pl-8", pr: "pr-8" },
|
|
1944
1949
|
medium: { text: "text-base", py: "py-2", px: "px-3", pl: "pl-10", pr: "pr-10" },
|
|
1945
1950
|
large: { text: "text-lg", py: "py-3", px: "px-4", pl: "pl-12", pr: "pr-12" }
|
|
1946
1951
|
}[s.size], M = s.error ? ["border-error-border", "focus:border-error", "focus:ring-error"] : ["border-border", "focus:border-border-focus", "focus:ring-focus-ring"];
|
|
1947
1952
|
return [
|
|
1948
1953
|
...T,
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
s.iconLeft ?
|
|
1952
|
-
|
|
1954
|
+
D.text,
|
|
1955
|
+
D.py,
|
|
1956
|
+
s.iconLeft ? D.pl : D.px,
|
|
1957
|
+
u.value ? D.pr : D.px,
|
|
1953
1958
|
...M
|
|
1954
1959
|
].join(" ");
|
|
1955
|
-
}),
|
|
1960
|
+
}), h = w(() => [
|
|
1956
1961
|
"absolute inset-y-0 flex items-center justify-center",
|
|
1957
1962
|
{
|
|
1958
1963
|
small: "right-2",
|
|
@@ -1962,23 +1967,23 @@ const Nn = { class: "relative" }, Wn = ["id", "aria-label"], Hn = ["id", "aria-s
|
|
|
1962
1967
|
"appearance-none bg-transparent border-none p-0 m-0",
|
|
1963
1968
|
"text-fg-tertiary hover:text-fg-secondary",
|
|
1964
1969
|
"cursor-pointer transition-colors"
|
|
1965
|
-
].join(" ")), m = w(() => ({ small: "w-3.5 h-3.5", medium: "w-4 h-4", large: "w-5 h-5" })[s.size]),
|
|
1966
|
-
const T = { small: "w-4 h-4", medium: "w-5 h-5", large: "w-6 h-6" },
|
|
1967
|
-
return `${T[s.size]} ${
|
|
1970
|
+
].join(" ")), m = w(() => ({ small: "w-3.5 h-3.5", medium: "w-4 h-4", large: "w-5 h-5" })[s.size]), v = w(() => {
|
|
1971
|
+
const T = { small: "w-4 h-4", medium: "w-5 h-5", large: "w-6 h-6" }, B = s.error ? "text-error" : "text-fg-tertiary";
|
|
1972
|
+
return `${T[s.size]} ${B}`;
|
|
1968
1973
|
});
|
|
1969
|
-
function
|
|
1970
|
-
const
|
|
1974
|
+
function y(T) {
|
|
1975
|
+
const B = T.target;
|
|
1971
1976
|
if (s.type === "number") {
|
|
1972
|
-
const
|
|
1973
|
-
o("update:modelValue", Number.isNaN(
|
|
1977
|
+
const D = Number(B.value);
|
|
1978
|
+
o("update:modelValue", Number.isNaN(D) ? B.value : D);
|
|
1974
1979
|
} else
|
|
1975
|
-
o("update:modelValue",
|
|
1980
|
+
o("update:modelValue", B.value);
|
|
1976
1981
|
}
|
|
1977
|
-
function
|
|
1982
|
+
function k() {
|
|
1978
1983
|
var T;
|
|
1979
1984
|
o("update:modelValue", ""), o("clear"), (T = r.value) == null || T.focus();
|
|
1980
1985
|
}
|
|
1981
|
-
function
|
|
1986
|
+
function C() {
|
|
1982
1987
|
var T;
|
|
1983
1988
|
(T = r.value) == null || T.focus();
|
|
1984
1989
|
}
|
|
@@ -1986,25 +1991,25 @@ const Nn = { class: "relative" }, Wn = ["id", "aria-label"], Hn = ["id", "aria-s
|
|
|
1986
1991
|
var T;
|
|
1987
1992
|
(T = r.value) == null || T.blur();
|
|
1988
1993
|
}
|
|
1989
|
-
return n({ focus:
|
|
1990
|
-
e.label ? (g(),
|
|
1994
|
+
return n({ focus: C, blur: A, inputRef: r }), (T, B) => (g(), p("div", Qn, [
|
|
1995
|
+
e.label ? (g(), p("label", {
|
|
1991
1996
|
key: 0,
|
|
1992
|
-
for:
|
|
1997
|
+
for: S(a),
|
|
1993
1998
|
class: "block text-label mb-1"
|
|
1994
1999
|
}, [
|
|
1995
2000
|
K(L(e.label) + " ", 1),
|
|
1996
|
-
e.required ? (g(),
|
|
1997
|
-
], 8,
|
|
1998
|
-
|
|
1999
|
-
e.iconLeft ? (g(),
|
|
2001
|
+
e.required ? (g(), p("span", _n, "*")) : R("", !0)
|
|
2002
|
+
], 8, Zn)) : R("", !0),
|
|
2003
|
+
$("div", es, [
|
|
2004
|
+
e.iconLeft ? (g(), p("div", ts, [
|
|
2000
2005
|
(g(), N(Te(e.iconLeft), {
|
|
2001
|
-
class:
|
|
2006
|
+
class: V(v.value)
|
|
2002
2007
|
}, null, 8, ["class"]))
|
|
2003
|
-
])) :
|
|
2004
|
-
|
|
2008
|
+
])) : R("", !0),
|
|
2009
|
+
$("input", {
|
|
2005
2010
|
ref_key: "inputRef",
|
|
2006
2011
|
ref: r,
|
|
2007
|
-
id:
|
|
2012
|
+
id: S(a),
|
|
2008
2013
|
type: e.type,
|
|
2009
2014
|
value: e.modelValue,
|
|
2010
2015
|
placeholder: e.placeholder,
|
|
@@ -2016,49 +2021,49 @@ const Nn = { class: "relative" }, Wn = ["id", "aria-label"], Hn = ["id", "aria-s
|
|
|
2016
2021
|
min: e.min,
|
|
2017
2022
|
max: e.max,
|
|
2018
2023
|
step: e.step,
|
|
2019
|
-
"aria-describedby":
|
|
2024
|
+
"aria-describedby": c.value,
|
|
2020
2025
|
"aria-invalid": e.error ? "true" : void 0,
|
|
2021
|
-
class:
|
|
2022
|
-
onInput:
|
|
2023
|
-
onBlur:
|
|
2024
|
-
onFocus:
|
|
2025
|
-
onKeydown:
|
|
2026
|
-
}, null, 42,
|
|
2027
|
-
e.iconRight && !d.value ? (g(),
|
|
2026
|
+
class: V(f.value),
|
|
2027
|
+
onInput: y,
|
|
2028
|
+
onBlur: B[0] || (B[0] = (D) => T.$emit("blur", D)),
|
|
2029
|
+
onFocus: B[1] || (B[1] = (D) => T.$emit("focus", D)),
|
|
2030
|
+
onKeydown: B[2] || (B[2] = rt((D) => T.$emit("enter"), ["enter"]))
|
|
2031
|
+
}, null, 42, ns),
|
|
2032
|
+
e.iconRight && !d.value ? (g(), p("div", ss, [
|
|
2028
2033
|
(g(), N(Te(e.iconRight), {
|
|
2029
|
-
class:
|
|
2034
|
+
class: V(v.value)
|
|
2030
2035
|
}, null, 8, ["class"]))
|
|
2031
|
-
])) :
|
|
2032
|
-
d.value ? (g(),
|
|
2036
|
+
])) : R("", !0),
|
|
2037
|
+
d.value ? (g(), p("button", {
|
|
2033
2038
|
key: 2,
|
|
2034
2039
|
type: "button",
|
|
2035
2040
|
"aria-label": "Clear input",
|
|
2036
|
-
class:
|
|
2037
|
-
onClick:
|
|
2041
|
+
class: V(h.value),
|
|
2042
|
+
onClick: k
|
|
2038
2043
|
}, [
|
|
2039
|
-
|
|
2040
|
-
class:
|
|
2044
|
+
te(S(Be), {
|
|
2045
|
+
class: V(m.value)
|
|
2041
2046
|
}, null, 8, ["class"])
|
|
2042
|
-
], 2)) :
|
|
2047
|
+
], 2)) : R("", !0)
|
|
2043
2048
|
]),
|
|
2044
|
-
e.helpText && !e.error ? (g(),
|
|
2049
|
+
e.helpText && !e.error ? (g(), p("div", {
|
|
2045
2050
|
key: 1,
|
|
2046
2051
|
id: i,
|
|
2047
2052
|
class: "mt-1 text-caption"
|
|
2048
|
-
}, L(e.helpText), 1)) :
|
|
2049
|
-
e.error ? (g(),
|
|
2053
|
+
}, L(e.helpText), 1)) : R("", !0),
|
|
2054
|
+
e.error ? (g(), p("div", {
|
|
2050
2055
|
key: 2,
|
|
2051
|
-
id:
|
|
2056
|
+
id: l,
|
|
2052
2057
|
class: "mt-1 text-sm text-error font-sans",
|
|
2053
2058
|
role: "alert",
|
|
2054
2059
|
"aria-live": "polite"
|
|
2055
|
-
}, L(e.error), 1)) :
|
|
2060
|
+
}, L(e.error), 1)) : R("", !0)
|
|
2056
2061
|
]));
|
|
2057
2062
|
}
|
|
2058
|
-
}),
|
|
2063
|
+
}), os = {
|
|
2059
2064
|
key: 1,
|
|
2060
2065
|
class: "sr-only"
|
|
2061
|
-
},
|
|
2066
|
+
}, as = /* @__PURE__ */ z({
|
|
2062
2067
|
__name: "DsLoadingSpinner",
|
|
2063
2068
|
props: {
|
|
2064
2069
|
size: { default: "medium" },
|
|
@@ -2111,25 +2116,25 @@ const Nn = { class: "relative" }, Wn = ["id", "aria-label"], Hn = ["id", "aria-s
|
|
|
2111
2116
|
"text-fg-secondary",
|
|
2112
2117
|
"font-medium"
|
|
2113
2118
|
].join(" "));
|
|
2114
|
-
return (r, a) => (g(),
|
|
2115
|
-
class:
|
|
2119
|
+
return (r, a) => (g(), p("div", {
|
|
2120
|
+
class: V(t.value),
|
|
2116
2121
|
role: "status",
|
|
2117
2122
|
"aria-live": "polite"
|
|
2118
2123
|
}, [
|
|
2119
|
-
|
|
2120
|
-
class:
|
|
2124
|
+
$("div", {
|
|
2125
|
+
class: V(s.value),
|
|
2121
2126
|
"aria-hidden": "true"
|
|
2122
2127
|
}, null, 2),
|
|
2123
|
-
e.text ? (g(),
|
|
2128
|
+
e.text ? (g(), p("span", {
|
|
2124
2129
|
key: 0,
|
|
2125
|
-
class:
|
|
2126
|
-
}, L(e.text), 3)) : (g(),
|
|
2130
|
+
class: V(o.value)
|
|
2131
|
+
}, L(e.text), 3)) : (g(), p("span", os, "Loading"))
|
|
2127
2132
|
], 2));
|
|
2128
2133
|
}
|
|
2129
|
-
}), rs = ["aria-labelledby"],
|
|
2134
|
+
}), rs = ["aria-labelledby"], ls = { class: "flex items-center justify-between px-6 py-4" }, is = ["id"], cs = { class: "px-6 py-4 overflow-y-auto flex-1" }, ds = {
|
|
2130
2135
|
key: 0,
|
|
2131
2136
|
class: "px-6 py-4"
|
|
2132
|
-
},
|
|
2137
|
+
}, us = /* @__PURE__ */ z({
|
|
2133
2138
|
__name: "DsModal",
|
|
2134
2139
|
props: {
|
|
2135
2140
|
modelValue: { type: Boolean },
|
|
@@ -2140,7 +2145,7 @@ const Nn = { class: "relative" }, Wn = ["id", "aria-label"], Hn = ["id", "aria-s
|
|
|
2140
2145
|
},
|
|
2141
2146
|
emits: ["update:modelValue", "close"],
|
|
2142
2147
|
setup(e, { emit: n }) {
|
|
2143
|
-
const t = e, s = n, o =
|
|
2148
|
+
const t = e, s = n, o = oe("modal-title"), r = j(null);
|
|
2144
2149
|
let a = null;
|
|
2145
2150
|
const i = w(() => `relative z-sticky bg-bg rounded-xl shadow-lg overflow-hidden w-full ${{
|
|
2146
2151
|
sm: "max-w-sm",
|
|
@@ -2148,39 +2153,39 @@ const Nn = { class: "relative" }, Wn = ["id", "aria-label"], Hn = ["id", "aria-s
|
|
|
2148
2153
|
lg: "max-w-2xl",
|
|
2149
2154
|
xl: "max-w-4xl"
|
|
2150
2155
|
}[t.size]} max-h-[90vh] flex flex-col`);
|
|
2151
|
-
function
|
|
2156
|
+
function l() {
|
|
2152
2157
|
s("update:modelValue", !1), s("close");
|
|
2153
2158
|
}
|
|
2154
|
-
function
|
|
2155
|
-
t.persistent ||
|
|
2159
|
+
function c() {
|
|
2160
|
+
t.persistent || l();
|
|
2156
2161
|
}
|
|
2157
2162
|
function d() {
|
|
2158
|
-
t.persistent ||
|
|
2163
|
+
t.persistent || l();
|
|
2159
2164
|
}
|
|
2160
|
-
function
|
|
2165
|
+
function u() {
|
|
2161
2166
|
return r.value ? Array.from(
|
|
2162
2167
|
r.value.querySelectorAll(
|
|
2163
2168
|
'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])'
|
|
2164
2169
|
)
|
|
2165
2170
|
) : [];
|
|
2166
2171
|
}
|
|
2167
|
-
function b(
|
|
2168
|
-
if (
|
|
2169
|
-
const
|
|
2170
|
-
if (
|
|
2171
|
-
const m =
|
|
2172
|
-
|
|
2172
|
+
function b(f) {
|
|
2173
|
+
if (f.key !== "Tab") return;
|
|
2174
|
+
const h = u();
|
|
2175
|
+
if (h.length === 0) return;
|
|
2176
|
+
const m = h[0], v = h[h.length - 1];
|
|
2177
|
+
f.shiftKey && document.activeElement === m ? (f.preventDefault(), v.focus()) : !f.shiftKey && document.activeElement === v && (f.preventDefault(), m.focus());
|
|
2173
2178
|
}
|
|
2174
|
-
return
|
|
2179
|
+
return re(
|
|
2175
2180
|
() => t.modelValue,
|
|
2176
|
-
async (
|
|
2177
|
-
var
|
|
2178
|
-
|
|
2181
|
+
async (f) => {
|
|
2182
|
+
var h;
|
|
2183
|
+
f ? (a = document.activeElement, document.body.style.overflow = "hidden", document.addEventListener("keydown", b), await fe(), (h = r.value) == null || h.focus()) : (document.body.style.overflow = "", document.removeEventListener("keydown", b), a == null || a.focus(), a = null);
|
|
2179
2184
|
}
|
|
2180
|
-
),
|
|
2185
|
+
), Ke(() => {
|
|
2181
2186
|
document.body.style.overflow = "", document.removeEventListener("keydown", b);
|
|
2182
|
-
}), (
|
|
2183
|
-
|
|
2187
|
+
}), (f, h) => (g(), N(Oe, { to: "body" }, [
|
|
2188
|
+
te(lt, {
|
|
2184
2189
|
"enter-active-class": "ds-modal-enter-active",
|
|
2185
2190
|
"enter-from-class": "ds-modal-enter-from",
|
|
2186
2191
|
"enter-to-class": "ds-modal-enter-to",
|
|
@@ -2189,49 +2194,49 @@ const Nn = { class: "relative" }, Wn = ["id", "aria-label"], Hn = ["id", "aria-s
|
|
|
2189
2194
|
"leave-to-class": "ds-modal-enter-from"
|
|
2190
2195
|
}, {
|
|
2191
2196
|
default: Ae(() => [
|
|
2192
|
-
e.modelValue ? (g(),
|
|
2197
|
+
e.modelValue ? (g(), p("div", {
|
|
2193
2198
|
key: 0,
|
|
2194
2199
|
class: "fixed inset-0 z-modal flex items-center justify-center p-4",
|
|
2195
2200
|
onKeydown: rt(d, ["escape"])
|
|
2196
2201
|
}, [
|
|
2197
|
-
|
|
2202
|
+
$("div", {
|
|
2198
2203
|
class: "absolute inset-0 bg-overlay backdrop-blur-sm",
|
|
2199
2204
|
"aria-hidden": "true",
|
|
2200
|
-
onClick:
|
|
2205
|
+
onClick: c
|
|
2201
2206
|
}),
|
|
2202
|
-
|
|
2207
|
+
$("div", {
|
|
2203
2208
|
ref_key: "panelRef",
|
|
2204
2209
|
ref: r,
|
|
2205
2210
|
role: "dialog",
|
|
2206
2211
|
"aria-modal": "true",
|
|
2207
|
-
"aria-labelledby":
|
|
2208
|
-
class:
|
|
2212
|
+
"aria-labelledby": S(o),
|
|
2213
|
+
class: V(i.value),
|
|
2209
2214
|
tabindex: "-1"
|
|
2210
2215
|
}, [
|
|
2211
|
-
|
|
2212
|
-
P(
|
|
2213
|
-
|
|
2214
|
-
id:
|
|
2216
|
+
$("div", ls, [
|
|
2217
|
+
P(f.$slots, "header", {}, () => [
|
|
2218
|
+
$("h2", {
|
|
2219
|
+
id: S(o),
|
|
2215
2220
|
class: "text-heading-lg m-0"
|
|
2216
|
-
}, L(e.title), 9,
|
|
2221
|
+
}, L(e.title), 9, is)
|
|
2217
2222
|
], !0),
|
|
2218
2223
|
e.closable ? (g(), N(it, {
|
|
2219
2224
|
key: 0,
|
|
2220
2225
|
variant: "ghost",
|
|
2221
2226
|
size: "small",
|
|
2222
|
-
"icon-left":
|
|
2227
|
+
"icon-left": S(Be),
|
|
2223
2228
|
"aria-label": "Close dialog",
|
|
2224
|
-
onClick:
|
|
2225
|
-
}, null, 8, ["icon-left"])) :
|
|
2229
|
+
onClick: l
|
|
2230
|
+
}, null, 8, ["icon-left"])) : R("", !0)
|
|
2226
2231
|
]),
|
|
2227
|
-
|
|
2228
|
-
P(
|
|
2232
|
+
$("div", cs, [
|
|
2233
|
+
P(f.$slots, "default", {}, void 0, !0)
|
|
2229
2234
|
]),
|
|
2230
|
-
|
|
2231
|
-
P(
|
|
2232
|
-
])) :
|
|
2235
|
+
f.$slots.footer ? (g(), p("div", ds, [
|
|
2236
|
+
P(f.$slots, "footer", {}, void 0, !0)
|
|
2237
|
+
])) : R("", !0)
|
|
2233
2238
|
], 10, rs)
|
|
2234
|
-
], 32)) :
|
|
2239
|
+
], 32)) : R("", !0)
|
|
2235
2240
|
]),
|
|
2236
2241
|
_: 3
|
|
2237
2242
|
})
|
|
@@ -2242,7 +2247,7 @@ const Nn = { class: "relative" }, Wn = ["id", "aria-label"], Hn = ["id", "aria-s
|
|
|
2242
2247
|
for (const [s, o] of n)
|
|
2243
2248
|
t[s] = o;
|
|
2244
2249
|
return t;
|
|
2245
|
-
}, $o = /* @__PURE__ */ Ct(
|
|
2250
|
+
}, $o = /* @__PURE__ */ Ct(us, [["__scopeId", "data-v-cc8b4649"]]), fs = ["id", "name", "checked", "disabled", "value"], Co = /* @__PURE__ */ z({
|
|
2246
2251
|
__name: "DsRadio",
|
|
2247
2252
|
props: {
|
|
2248
2253
|
modelValue: { type: [String, Number, Boolean] },
|
|
@@ -2260,7 +2265,7 @@ const Nn = { class: "relative" }, Wn = ["id", "aria-label"], Hn = ["id", "aria-s
|
|
|
2260
2265
|
medium: { circle: "w-4 h-4", dot: "w-2 h-2", label: "text-sm" },
|
|
2261
2266
|
large: { circle: "w-5 h-5", dot: "w-2.5 h-2.5", label: "text-base" }
|
|
2262
2267
|
}, a = w(() => {
|
|
2263
|
-
const
|
|
2268
|
+
const u = [
|
|
2264
2269
|
r[t.size].circle,
|
|
2265
2270
|
"rounded-full",
|
|
2266
2271
|
"inline-flex items-center justify-center",
|
|
@@ -2268,34 +2273,34 @@ const Nn = { class: "relative" }, Wn = ["id", "aria-label"], Hn = ["id", "aria-s
|
|
|
2268
2273
|
"transition-all duration-fast",
|
|
2269
2274
|
"shrink-0"
|
|
2270
2275
|
];
|
|
2271
|
-
return t.disabled ?
|
|
2276
|
+
return t.disabled ? u.push(
|
|
2272
2277
|
o.value ? "bg-bg border-brand-disabled" : "bg-bg-tertiary border-border",
|
|
2273
2278
|
"opacity-60"
|
|
2274
|
-
) : o.value ?
|
|
2279
|
+
) : o.value ? u.push("bg-bg border-brand") : u.push(
|
|
2275
2280
|
"bg-bg border-border-strong",
|
|
2276
2281
|
"group-hover:border-brand",
|
|
2277
2282
|
"peer-focus-visible:ring-2 peer-focus-visible:ring-focus-ring peer-focus-visible:ring-offset-2"
|
|
2278
|
-
),
|
|
2283
|
+
), u.join(" ");
|
|
2279
2284
|
}), i = w(() => {
|
|
2280
|
-
const
|
|
2281
|
-
return t.disabled ?
|
|
2282
|
-
}),
|
|
2285
|
+
const u = [r[t.size].dot, "rounded-full"];
|
|
2286
|
+
return t.disabled ? u.push("bg-brand-disabled") : u.push("bg-brand"), u.join(" ");
|
|
2287
|
+
}), l = w(() => [
|
|
2283
2288
|
"font-sans select-none",
|
|
2284
2289
|
r[t.size].label,
|
|
2285
2290
|
t.disabled ? "text-fg-disabled" : "text-fg"
|
|
2286
|
-
].join(" ")),
|
|
2291
|
+
].join(" ")), c = (d) => {
|
|
2287
2292
|
if (t.disabled) return;
|
|
2288
|
-
const
|
|
2293
|
+
const u = d.target, b = t.value ?? u.value;
|
|
2289
2294
|
s("update:modelValue", b), s("change", b, d);
|
|
2290
2295
|
};
|
|
2291
|
-
return (d,
|
|
2292
|
-
class:
|
|
2296
|
+
return (d, u) => (g(), p("label", {
|
|
2297
|
+
class: V([
|
|
2293
2298
|
"inline-flex items-center gap-2",
|
|
2294
2299
|
e.disabled ? "cursor-not-allowed" : "cursor-pointer",
|
|
2295
2300
|
"group"
|
|
2296
2301
|
])
|
|
2297
2302
|
}, [
|
|
2298
|
-
|
|
2303
|
+
$("input", {
|
|
2299
2304
|
id: e.id,
|
|
2300
2305
|
type: "radio",
|
|
2301
2306
|
name: e.name,
|
|
@@ -2303,32 +2308,32 @@ const Nn = { class: "relative" }, Wn = ["id", "aria-label"], Hn = ["id", "aria-s
|
|
|
2303
2308
|
disabled: e.disabled,
|
|
2304
2309
|
value: e.value,
|
|
2305
2310
|
class: "sr-only peer",
|
|
2306
|
-
onChange:
|
|
2307
|
-
}, null, 40,
|
|
2308
|
-
|
|
2309
|
-
class:
|
|
2311
|
+
onChange: c
|
|
2312
|
+
}, null, 40, fs),
|
|
2313
|
+
$("span", {
|
|
2314
|
+
class: V(a.value),
|
|
2310
2315
|
"aria-hidden": "true"
|
|
2311
2316
|
}, [
|
|
2312
|
-
o.value ? (g(),
|
|
2317
|
+
o.value ? (g(), p("span", {
|
|
2313
2318
|
key: 0,
|
|
2314
|
-
class:
|
|
2315
|
-
}, null, 2)) :
|
|
2319
|
+
class: V(i.value)
|
|
2320
|
+
}, null, 2)) : R("", !0)
|
|
2316
2321
|
], 2),
|
|
2317
|
-
e.label || d.$slots.default ? (g(),
|
|
2322
|
+
e.label || d.$slots.default ? (g(), p("span", {
|
|
2318
2323
|
key: 0,
|
|
2319
|
-
class:
|
|
2324
|
+
class: V(l.value)
|
|
2320
2325
|
}, [
|
|
2321
2326
|
P(d.$slots, "default", {}, () => [
|
|
2322
2327
|
K(L(e.label), 1)
|
|
2323
2328
|
])
|
|
2324
|
-
], 2)) :
|
|
2329
|
+
], 2)) : R("", !0)
|
|
2325
2330
|
], 2));
|
|
2326
2331
|
}
|
|
2327
|
-
}),
|
|
2332
|
+
}), bs = { class: "w-full" }, ms = ["for"], gs = {
|
|
2328
2333
|
key: 0,
|
|
2329
2334
|
class: "text-error ml-1",
|
|
2330
2335
|
"aria-hidden": "true"
|
|
2331
|
-
},
|
|
2336
|
+
}, hs = { class: "relative" }, vs = ["id", "value", "disabled", "required", "aria-describedby", "aria-invalid"], ps = ["selected"], ys = ["value", "disabled"], xs = {
|
|
2332
2337
|
class: "pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",
|
|
2333
2338
|
"aria-hidden": "true"
|
|
2334
2339
|
}, Do = /* @__PURE__ */ z({
|
|
@@ -2346,10 +2351,10 @@ const Nn = { class: "relative" }, Wn = ["id", "aria-label"], Hn = ["id", "aria-s
|
|
|
2346
2351
|
},
|
|
2347
2352
|
emits: ["update:modelValue", "blur", "focus"],
|
|
2348
2353
|
setup(e, { emit: n }) {
|
|
2349
|
-
const t = e, s = n, o =
|
|
2354
|
+
const t = e, s = n, o = oe("select"), r = `${o}-help`, a = `${o}-error`, i = w(() => {
|
|
2350
2355
|
const d = [];
|
|
2351
2356
|
return t.helpText && !t.error && d.push(r), t.error && d.push(a), d.length > 0 ? d.join(" ") : void 0;
|
|
2352
|
-
}),
|
|
2357
|
+
}), l = w(() => {
|
|
2353
2358
|
const d = [
|
|
2354
2359
|
"block",
|
|
2355
2360
|
"w-full",
|
|
@@ -2369,75 +2374,75 @@ const Nn = { class: "relative" }, Wn = ["id", "aria-label"], Hn = ["id", "aria-s
|
|
|
2369
2374
|
"font-sans",
|
|
2370
2375
|
"box-border",
|
|
2371
2376
|
"pr-10"
|
|
2372
|
-
],
|
|
2377
|
+
], u = {
|
|
2373
2378
|
small: "px-2 py-1 text-sm",
|
|
2374
2379
|
medium: "px-3 py-2 text-base",
|
|
2375
2380
|
large: "px-4 py-3 text-lg"
|
|
2376
2381
|
}, b = t.error ? ["border-error-border", "focus:border-error", "focus:ring-error"] : ["border-border", "focus:border-border-focus", "focus:ring-focus-ring"];
|
|
2377
|
-
return [...d,
|
|
2378
|
-
}),
|
|
2379
|
-
const b = d.target.value,
|
|
2380
|
-
s("update:modelValue",
|
|
2382
|
+
return [...d, u[t.size], ...b].join(" ");
|
|
2383
|
+
}), c = (d) => {
|
|
2384
|
+
const b = d.target.value, f = t.options.find((h) => String(h.value) === b);
|
|
2385
|
+
s("update:modelValue", f && typeof f.value == "number" ? f.value : b);
|
|
2381
2386
|
};
|
|
2382
|
-
return (d,
|
|
2383
|
-
e.label ? (g(),
|
|
2387
|
+
return (d, u) => (g(), p("div", bs, [
|
|
2388
|
+
e.label ? (g(), p("label", {
|
|
2384
2389
|
key: 0,
|
|
2385
|
-
for:
|
|
2390
|
+
for: S(o),
|
|
2386
2391
|
class: "block text-label mb-1"
|
|
2387
2392
|
}, [
|
|
2388
2393
|
K(L(e.label) + " ", 1),
|
|
2389
|
-
e.required ? (g(),
|
|
2390
|
-
], 8,
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
id:
|
|
2394
|
+
e.required ? (g(), p("span", gs, "*")) : R("", !0)
|
|
2395
|
+
], 8, ms)) : R("", !0),
|
|
2396
|
+
$("div", hs, [
|
|
2397
|
+
$("select", {
|
|
2398
|
+
id: S(o),
|
|
2394
2399
|
value: e.modelValue,
|
|
2395
2400
|
disabled: e.disabled,
|
|
2396
2401
|
required: e.required,
|
|
2397
2402
|
"aria-describedby": i.value,
|
|
2398
2403
|
"aria-invalid": e.error ? "true" : void 0,
|
|
2399
|
-
class:
|
|
2400
|
-
onChange:
|
|
2401
|
-
onBlur:
|
|
2402
|
-
onFocus:
|
|
2404
|
+
class: V(l.value),
|
|
2405
|
+
onChange: c,
|
|
2406
|
+
onBlur: u[0] || (u[0] = (b) => d.$emit("blur", b)),
|
|
2407
|
+
onFocus: u[1] || (u[1] = (b) => d.$emit("focus", b))
|
|
2403
2408
|
}, [
|
|
2404
|
-
e.placeholder ? (g(),
|
|
2409
|
+
e.placeholder ? (g(), p("option", {
|
|
2405
2410
|
key: 0,
|
|
2406
2411
|
value: "",
|
|
2407
2412
|
disabled: "",
|
|
2408
2413
|
selected: !e.modelValue
|
|
2409
|
-
}, L(e.placeholder), 9,
|
|
2410
|
-
(g(!0),
|
|
2414
|
+
}, L(e.placeholder), 9, ps)) : R("", !0),
|
|
2415
|
+
(g(!0), p(le, null, ie(e.options, (b) => (g(), p("option", {
|
|
2411
2416
|
key: b.value,
|
|
2412
2417
|
value: b.value,
|
|
2413
2418
|
disabled: b.disabled
|
|
2414
|
-
}, L(b.label), 9,
|
|
2415
|
-
], 42,
|
|
2416
|
-
|
|
2417
|
-
|
|
2419
|
+
}, L(b.label), 9, ys))), 128))
|
|
2420
|
+
], 42, vs),
|
|
2421
|
+
$("div", xs, [
|
|
2422
|
+
te(S(Pe), { class: "w-4 h-4 text-fg-tertiary" })
|
|
2418
2423
|
])
|
|
2419
2424
|
]),
|
|
2420
|
-
e.helpText && !e.error ? (g(),
|
|
2425
|
+
e.helpText && !e.error ? (g(), p("div", {
|
|
2421
2426
|
key: 1,
|
|
2422
2427
|
id: r,
|
|
2423
2428
|
class: "mt-1 text-caption"
|
|
2424
|
-
}, L(e.helpText), 1)) :
|
|
2425
|
-
e.error ? (g(),
|
|
2429
|
+
}, L(e.helpText), 1)) : R("", !0),
|
|
2430
|
+
e.error ? (g(), p("div", {
|
|
2426
2431
|
key: 2,
|
|
2427
2432
|
id: a,
|
|
2428
2433
|
class: "mt-1 text-sm text-error font-sans",
|
|
2429
2434
|
role: "alert",
|
|
2430
2435
|
"aria-live": "polite"
|
|
2431
|
-
}, L(e.error), 1)) :
|
|
2436
|
+
}, L(e.error), 1)) : R("", !0)
|
|
2432
2437
|
]));
|
|
2433
2438
|
}
|
|
2434
|
-
}),
|
|
2439
|
+
}), ws = { class: "flex flex-col gap-1.5" }, ks = {
|
|
2435
2440
|
key: 0,
|
|
2436
2441
|
class: "flex items-center justify-between"
|
|
2437
|
-
},
|
|
2442
|
+
}, $s = ["for"], Cs = {
|
|
2438
2443
|
key: 1,
|
|
2439
2444
|
class: "text-body-sm tabular-nums"
|
|
2440
|
-
},
|
|
2445
|
+
}, Ds = ["id", "value", "min", "max", "step", "disabled"], Ts = /* @__PURE__ */ z({
|
|
2441
2446
|
__name: "DsSlider",
|
|
2442
2447
|
props: {
|
|
2443
2448
|
modelValue: { default: 0 },
|
|
@@ -2450,37 +2455,37 @@ const Nn = { class: "relative" }, Wn = ["id", "aria-label"], Hn = ["id", "aria-s
|
|
|
2450
2455
|
},
|
|
2451
2456
|
emits: ["update:modelValue"],
|
|
2452
2457
|
setup(e, { emit: n }) {
|
|
2453
|
-
const t = e, s = n, o =
|
|
2458
|
+
const t = e, s = n, o = oe(), r = w(() => (t.modelValue - t.min) / (t.max - t.min) * 100), a = w(() => ({
|
|
2454
2459
|
"--slider-percent": `${r.value}%`
|
|
2455
2460
|
}));
|
|
2456
|
-
function i(
|
|
2457
|
-
const
|
|
2458
|
-
s("update:modelValue", Number(
|
|
2461
|
+
function i(l) {
|
|
2462
|
+
const c = l.target;
|
|
2463
|
+
s("update:modelValue", Number(c.value));
|
|
2459
2464
|
}
|
|
2460
|
-
return (
|
|
2461
|
-
e.label || e.showValue ? (g(),
|
|
2462
|
-
e.label ? (g(),
|
|
2465
|
+
return (l, c) => (g(), p("div", ws, [
|
|
2466
|
+
e.label || e.showValue ? (g(), p("div", ks, [
|
|
2467
|
+
e.label ? (g(), p("label", {
|
|
2463
2468
|
key: 0,
|
|
2464
|
-
for:
|
|
2469
|
+
for: S(o),
|
|
2465
2470
|
class: "text-label"
|
|
2466
|
-
}, L(e.label), 9,
|
|
2467
|
-
e.showValue ? (g(),
|
|
2468
|
-
])) :
|
|
2469
|
-
|
|
2470
|
-
id:
|
|
2471
|
+
}, L(e.label), 9, $s)) : R("", !0),
|
|
2472
|
+
e.showValue ? (g(), p("span", Cs, L(e.modelValue), 1)) : R("", !0)
|
|
2473
|
+
])) : R("", !0),
|
|
2474
|
+
$("input", {
|
|
2475
|
+
id: S(o),
|
|
2471
2476
|
type: "range",
|
|
2472
|
-
class:
|
|
2477
|
+
class: V(["ds-slider", { "opacity-50 cursor-not-allowed": e.disabled }]),
|
|
2473
2478
|
value: e.modelValue,
|
|
2474
2479
|
min: e.min,
|
|
2475
2480
|
max: e.max,
|
|
2476
2481
|
step: e.step,
|
|
2477
2482
|
disabled: e.disabled,
|
|
2478
|
-
style:
|
|
2483
|
+
style: _(a.value),
|
|
2479
2484
|
onInput: i
|
|
2480
|
-
}, null, 46,
|
|
2485
|
+
}, null, 46, Ds)
|
|
2481
2486
|
]));
|
|
2482
2487
|
}
|
|
2483
|
-
}), To = /* @__PURE__ */ Ct(
|
|
2488
|
+
}), To = /* @__PURE__ */ Ct(Ts, [["__scopeId", "data-v-75234e8c"]]), Vs = ["id", "checked", "aria-checked", "disabled"], Vo = /* @__PURE__ */ z({
|
|
2484
2489
|
__name: "DsSwitch",
|
|
2485
2490
|
props: {
|
|
2486
2491
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -2492,7 +2497,7 @@ const Nn = { class: "relative" }, Wn = ["id", "aria-label"], Hn = ["id", "aria-s
|
|
|
2492
2497
|
},
|
|
2493
2498
|
emits: ["update:modelValue", "change"],
|
|
2494
2499
|
setup(e, { emit: n }) {
|
|
2495
|
-
const t = e, s = n, o =
|
|
2500
|
+
const t = e, s = n, o = oe("switch"), r = t.id ?? o, a = {
|
|
2496
2501
|
small: { track: "w-7 h-4", thumb: "w-3 h-3", translate: "translate-x-3", label: "text-xs" },
|
|
2497
2502
|
medium: { track: "w-9 h-5", thumb: "w-4 h-4", translate: "translate-x-4", label: "text-sm" },
|
|
2498
2503
|
large: { track: "w-11 h-6", thumb: "w-5 h-5", translate: "translate-x-5", label: "text-base" }
|
|
@@ -2509,35 +2514,35 @@ const Nn = { class: "relative" }, Wn = ["id", "aria-label"], Hn = ["id", "aria-s
|
|
|
2509
2514
|
t.modelValue ? "bg-brand-disabled" : "bg-neutral-border",
|
|
2510
2515
|
"opacity-60"
|
|
2511
2516
|
) : t.modelValue ? b.push("bg-brand", "group-hover:bg-brand-hover") : b.push("bg-neutral-border", "group-hover:bg-neutral-border-hover"), t.disabled || b.push("peer-focus-visible:ring-2 peer-focus-visible:ring-focus-ring peer-focus-visible:ring-offset-2"), b.join(" ");
|
|
2512
|
-
}),
|
|
2513
|
-
const
|
|
2514
|
-
|
|
2517
|
+
}), l = w(() => {
|
|
2518
|
+
const u = a[t.size], b = [
|
|
2519
|
+
u.thumb,
|
|
2515
2520
|
"absolute left-0.5",
|
|
2516
2521
|
"rounded-full",
|
|
2517
2522
|
"bg-bg",
|
|
2518
2523
|
"shadow-thumb",
|
|
2519
2524
|
"transition-transform duration-fast"
|
|
2520
2525
|
];
|
|
2521
|
-
return t.modelValue && b.push(
|
|
2522
|
-
}),
|
|
2526
|
+
return t.modelValue && b.push(u.translate), b.join(" ");
|
|
2527
|
+
}), c = w(() => [
|
|
2523
2528
|
"font-sans select-none",
|
|
2524
2529
|
a[t.size].label,
|
|
2525
2530
|
t.disabled ? "text-fg-disabled" : "text-fg"
|
|
2526
|
-
].join(" ")), d = (
|
|
2531
|
+
].join(" ")), d = (u) => {
|
|
2527
2532
|
if (t.disabled) return;
|
|
2528
|
-
const
|
|
2529
|
-
s("update:modelValue",
|
|
2533
|
+
const f = u.target.checked;
|
|
2534
|
+
s("update:modelValue", f), s("change", f, u);
|
|
2530
2535
|
};
|
|
2531
|
-
return (
|
|
2532
|
-
class:
|
|
2536
|
+
return (u, b) => (g(), p("label", {
|
|
2537
|
+
class: V([
|
|
2533
2538
|
"inline-flex items-center gap-2",
|
|
2534
2539
|
e.labelPosition === "left" ? "flex-row-reverse" : "",
|
|
2535
2540
|
e.disabled ? "cursor-not-allowed" : "cursor-pointer",
|
|
2536
2541
|
"group"
|
|
2537
2542
|
])
|
|
2538
2543
|
}, [
|
|
2539
|
-
|
|
2540
|
-
id:
|
|
2544
|
+
$("input", {
|
|
2545
|
+
id: S(r),
|
|
2541
2546
|
type: "checkbox",
|
|
2542
2547
|
role: "switch",
|
|
2543
2548
|
checked: e.modelValue,
|
|
@@ -2545,35 +2550,35 @@ const Nn = { class: "relative" }, Wn = ["id", "aria-label"], Hn = ["id", "aria-s
|
|
|
2545
2550
|
disabled: e.disabled,
|
|
2546
2551
|
class: "sr-only peer",
|
|
2547
2552
|
onChange: d
|
|
2548
|
-
}, null, 40,
|
|
2549
|
-
|
|
2550
|
-
class:
|
|
2553
|
+
}, null, 40, Vs),
|
|
2554
|
+
$("span", {
|
|
2555
|
+
class: V(i.value),
|
|
2551
2556
|
"aria-hidden": "true"
|
|
2552
2557
|
}, [
|
|
2553
|
-
|
|
2554
|
-
class:
|
|
2558
|
+
$("span", {
|
|
2559
|
+
class: V(l.value)
|
|
2555
2560
|
}, null, 2)
|
|
2556
2561
|
], 2),
|
|
2557
|
-
e.label ||
|
|
2562
|
+
e.label || u.$slots.default ? (g(), p("span", {
|
|
2558
2563
|
key: 0,
|
|
2559
|
-
class:
|
|
2564
|
+
class: V(c.value)
|
|
2560
2565
|
}, [
|
|
2561
|
-
P(
|
|
2566
|
+
P(u.$slots, "default", {}, () => [
|
|
2562
2567
|
K(L(e.label), 1)
|
|
2563
2568
|
])
|
|
2564
|
-
], 2)) :
|
|
2569
|
+
], 2)) : R("", !0)
|
|
2565
2570
|
], 2));
|
|
2566
2571
|
}
|
|
2567
|
-
}),
|
|
2572
|
+
}), Rs = { class: "w-full overflow-x-auto rounded-lg border border-solid border-border-light" }, Ls = {
|
|
2568
2573
|
class: "w-full border-collapse text-sm",
|
|
2569
2574
|
role: "table"
|
|
2570
|
-
},
|
|
2575
|
+
}, Bs = { class: "bg-bg-secondary" }, Ss = ["aria-sort", "onClick"], As = {
|
|
2571
2576
|
key: 0,
|
|
2572
2577
|
class: "inline-flex",
|
|
2573
2578
|
"aria-hidden": "true"
|
|
2574
|
-
},
|
|
2579
|
+
}, Os = { key: 0 }, zs = ["colspan"], Es = { key: 1 }, Ms = ["colspan"], js = ["onClick"], Ps = ["onClick"], Is = {
|
|
2575
2580
|
key: 0,
|
|
2576
|
-
class: "flex items-center justify-between px-4 py-3
|
|
2581
|
+
class: "flex items-center justify-between px-4 py-3 bg-bg-secondary text-sm"
|
|
2577
2582
|
}, Fs = { class: "text-fg-secondary" }, Ns = { class: "flex gap-2" }, Ws = ["disabled"], Hs = ["disabled"], Ro = /* @__PURE__ */ z({
|
|
2578
2583
|
__name: "DsTable",
|
|
2579
2584
|
props: {
|
|
@@ -2596,17 +2601,17 @@ const Nn = { class: "relative" }, Wn = ["id", "aria-label"], Hn = ["id", "aria-s
|
|
|
2596
2601
|
s.pagination.page * s.pagination.perPage,
|
|
2597
2602
|
s.pagination.total
|
|
2598
2603
|
) : 0);
|
|
2599
|
-
function
|
|
2604
|
+
function l(m) {
|
|
2600
2605
|
s.sortBy === m ? s.sortOrder === "asc" ? o("update:sortOrder", "desc") : (o("update:sortBy", ""), o("update:sortOrder", "asc")) : (o("update:sortBy", m), o("update:sortOrder", "asc"));
|
|
2601
2606
|
}
|
|
2602
|
-
function
|
|
2607
|
+
function c(m) {
|
|
2603
2608
|
if (m.sortable)
|
|
2604
2609
|
return s.sortBy !== m.key ? "none" : s.sortOrder === "asc" ? "ascending" : "descending";
|
|
2605
2610
|
}
|
|
2606
2611
|
function d(m) {
|
|
2607
2612
|
return m === "center" ? "justify-center" : m === "right" ? "justify-end" : "";
|
|
2608
2613
|
}
|
|
2609
|
-
function
|
|
2614
|
+
function u(m) {
|
|
2610
2615
|
return [
|
|
2611
2616
|
"px-4 py-3 text-left font-sans text-sm font-500 text-fg-secondary",
|
|
2612
2617
|
m.sortable ? "cursor-pointer select-none hover:text-fg" : ""
|
|
@@ -2615,62 +2620,62 @@ const Nn = { class: "relative" }, Wn = ["id", "aria-label"], Hn = ["id", "aria-s
|
|
|
2615
2620
|
function b(m) {
|
|
2616
2621
|
return `px-4 py-3 ${m.align === "center" ? "text-center" : m.align === "right" ? "text-right" : "text-left"}`;
|
|
2617
2622
|
}
|
|
2618
|
-
function
|
|
2619
|
-
o("row:click", m,
|
|
2623
|
+
function f(m, v) {
|
|
2624
|
+
o("row:click", m, v);
|
|
2620
2625
|
}
|
|
2621
|
-
function
|
|
2622
|
-
o("cell:click", m,
|
|
2626
|
+
function h(m, v) {
|
|
2627
|
+
o("cell:click", m, v);
|
|
2623
2628
|
}
|
|
2624
2629
|
return n({
|
|
2625
|
-
handleRowClick:
|
|
2626
|
-
handleCellClick:
|
|
2627
|
-
}), (m,
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
class:
|
|
2630
|
+
handleRowClick: f,
|
|
2631
|
+
handleCellClick: h
|
|
2632
|
+
}), (m, v) => (g(), p("div", Rs, [
|
|
2633
|
+
$("table", Ls, [
|
|
2634
|
+
$("thead", {
|
|
2635
|
+
class: V(e.stickyHeader ? "sticky top-0 z-sticky" : "")
|
|
2631
2636
|
}, [
|
|
2632
|
-
|
|
2633
|
-
(g(!0),
|
|
2634
|
-
key:
|
|
2635
|
-
style:
|
|
2636
|
-
class:
|
|
2637
|
-
"aria-sort":
|
|
2638
|
-
onClick: (
|
|
2637
|
+
$("tr", Bs, [
|
|
2638
|
+
(g(!0), p(le, null, ie(e.columns, (y) => (g(), p("th", {
|
|
2639
|
+
key: y.key,
|
|
2640
|
+
style: _(y.width ? { width: y.width } : void 0),
|
|
2641
|
+
class: V(u(y)),
|
|
2642
|
+
"aria-sort": c(y),
|
|
2643
|
+
onClick: (k) => y.sortable ? l(y.key) : void 0
|
|
2639
2644
|
}, [
|
|
2640
|
-
|
|
2641
|
-
class:
|
|
2645
|
+
$("div", {
|
|
2646
|
+
class: V(["flex items-center gap-1", d(y.align)])
|
|
2642
2647
|
}, [
|
|
2643
|
-
P(m.$slots, `header-${
|
|
2644
|
-
K(L(
|
|
2648
|
+
P(m.$slots, `header-${y.key}`, { column: y }, () => [
|
|
2649
|
+
K(L(y.label), 1)
|
|
2645
2650
|
]),
|
|
2646
|
-
|
|
2647
|
-
e.sortBy ===
|
|
2651
|
+
y.sortable ? (g(), p("span", As, [
|
|
2652
|
+
e.sortBy === y.key && e.sortOrder === "asc" ? (g(), N(S(Pn), {
|
|
2648
2653
|
key: 0,
|
|
2649
2654
|
class: "w-4 h-4"
|
|
2650
|
-
})) : e.sortBy ===
|
|
2655
|
+
})) : e.sortBy === y.key && e.sortOrder === "desc" ? (g(), N(S(Pe), {
|
|
2651
2656
|
key: 1,
|
|
2652
2657
|
class: "w-4 h-4"
|
|
2653
|
-
})) : (g(), N(
|
|
2658
|
+
})) : (g(), N(S(Fn), {
|
|
2654
2659
|
key: 2,
|
|
2655
2660
|
class: "w-4 h-4 text-fg-tertiary"
|
|
2656
2661
|
}))
|
|
2657
|
-
])) :
|
|
2662
|
+
])) : R("", !0)
|
|
2658
2663
|
], 2)
|
|
2659
2664
|
], 14, Ss))), 128))
|
|
2660
2665
|
])
|
|
2661
2666
|
], 2),
|
|
2662
|
-
|
|
2663
|
-
e.loading ? (g(),
|
|
2664
|
-
|
|
2667
|
+
$("tbody", null, [
|
|
2668
|
+
e.loading ? (g(), p("tr", Os, [
|
|
2669
|
+
$("td", {
|
|
2665
2670
|
colspan: e.columns.length,
|
|
2666
2671
|
class: "text-center py-12"
|
|
2667
2672
|
}, [
|
|
2668
2673
|
P(m.$slots, "loading", {}, () => [
|
|
2669
|
-
|
|
2674
|
+
te(as, { centered: "" })
|
|
2670
2675
|
])
|
|
2671
2676
|
], 8, zs)
|
|
2672
|
-
])) : e.rows.length === 0 ? (g(),
|
|
2673
|
-
|
|
2677
|
+
])) : e.rows.length === 0 ? (g(), p("tr", Es, [
|
|
2678
|
+
$("td", {
|
|
2674
2679
|
colspan: e.columns.length,
|
|
2675
2680
|
class: "text-center py-12 text-fg-secondary"
|
|
2676
2681
|
}, [
|
|
@@ -2678,48 +2683,48 @@ const Nn = { class: "relative" }, Wn = ["id", "aria-label"], Hn = ["id", "aria-s
|
|
|
2678
2683
|
K(L(e.emptyText), 1)
|
|
2679
2684
|
])
|
|
2680
2685
|
], 8, Ms)
|
|
2681
|
-
])) :
|
|
2682
|
-
(g(!0),
|
|
2683
|
-
key:
|
|
2684
|
-
class:
|
|
2685
|
-
"
|
|
2686
|
-
e.striped &&
|
|
2686
|
+
])) : R("", !0),
|
|
2687
|
+
(g(!0), p(le, null, ie(e.rows, (y, k) => (g(), p("tr", {
|
|
2688
|
+
key: k,
|
|
2689
|
+
class: V([
|
|
2690
|
+
"transition-colors hover:bg-surface-hover-light",
|
|
2691
|
+
e.striped && k % 2 === 1 ? "bg-bg-secondary" : ""
|
|
2687
2692
|
]),
|
|
2688
|
-
onClick: (
|
|
2693
|
+
onClick: (C) => f(y, k)
|
|
2689
2694
|
}, [
|
|
2690
|
-
(g(!0),
|
|
2691
|
-
key:
|
|
2692
|
-
class:
|
|
2693
|
-
onClick: (A) =>
|
|
2695
|
+
(g(!0), p(le, null, ie(e.columns, (C) => (g(), p("td", {
|
|
2696
|
+
key: C.key,
|
|
2697
|
+
class: V(b(C)),
|
|
2698
|
+
onClick: (A) => h(y, C.key)
|
|
2694
2699
|
}, [
|
|
2695
|
-
P(m.$slots, `cell-${
|
|
2696
|
-
row:
|
|
2697
|
-
value:
|
|
2698
|
-
index:
|
|
2700
|
+
P(m.$slots, `cell-${C.key}`, {
|
|
2701
|
+
row: y,
|
|
2702
|
+
value: y[C.key],
|
|
2703
|
+
index: k
|
|
2699
2704
|
}, () => [
|
|
2700
|
-
K(L(
|
|
2705
|
+
K(L(y[C.key]), 1)
|
|
2701
2706
|
])
|
|
2702
2707
|
], 10, Ps))), 128))
|
|
2703
2708
|
], 10, js))), 128))
|
|
2704
2709
|
])
|
|
2705
2710
|
]),
|
|
2706
|
-
e.pagination ? (g(),
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2711
|
+
e.pagination ? (g(), p("div", Is, [
|
|
2712
|
+
$("span", Fs, L(a.value) + "–" + L(i.value) + " " + L(e.ofLabel) + " " + L(e.pagination.total), 1),
|
|
2713
|
+
$("div", Ns, [
|
|
2714
|
+
$("button", {
|
|
2710
2715
|
type: "button",
|
|
2711
2716
|
disabled: e.pagination.page <= 1,
|
|
2712
2717
|
class: "px-3 py-1 rounded-md border border-solid border-border bg-bg text-fg disabled:opacity-50 disabled:cursor-not-allowed hover:bg-surface-hover-light transition-colors",
|
|
2713
|
-
onClick:
|
|
2718
|
+
onClick: v[0] || (v[0] = (y) => m.$emit("update:page", e.pagination.page - 1))
|
|
2714
2719
|
}, L(e.previousPageLabel), 9, Ws),
|
|
2715
|
-
|
|
2720
|
+
$("button", {
|
|
2716
2721
|
type: "button",
|
|
2717
2722
|
disabled: e.pagination.page >= r.value,
|
|
2718
2723
|
class: "px-3 py-1 rounded-md border border-solid border-border bg-bg text-fg disabled:opacity-50 disabled:cursor-not-allowed hover:bg-surface-hover-light transition-colors",
|
|
2719
|
-
onClick:
|
|
2724
|
+
onClick: v[1] || (v[1] = (y) => m.$emit("update:page", e.pagination.page + 1))
|
|
2720
2725
|
}, L(e.nextPageLabel), 9, Hs)
|
|
2721
2726
|
])
|
|
2722
|
-
])) :
|
|
2727
|
+
])) : R("", !0)
|
|
2723
2728
|
]));
|
|
2724
2729
|
}
|
|
2725
2730
|
}), qs = ["aria-label"], Ks = ["id", "aria-selected", "aria-controls", "tabindex", "disabled", "onClick", "onKeydown"], Us = ["id", "aria-labelledby", "hidden"], Lo = /* @__PURE__ */ z({
|
|
@@ -2732,81 +2737,127 @@ const Nn = { class: "relative" }, Wn = ["id", "aria-label"], Hn = ["id", "aria-s
|
|
|
2732
2737
|
},
|
|
2733
2738
|
emits: ["update:modelValue"],
|
|
2734
2739
|
setup(e, { emit: n }) {
|
|
2735
|
-
const t = e, s = n, o =
|
|
2736
|
-
() => t.variant === "line" ? "flex border-b border-
|
|
2740
|
+
const t = e, s = n, o = oe("tabs"), r = j(null), a = w(
|
|
2741
|
+
() => t.variant === "line" ? "relative flex gap-1 border-b border-t-0 border-l-0 border-r-0 border-solid border-border" : "relative flex gap-1 bg-neutral-soft p-1 rounded-lg"
|
|
2737
2742
|
);
|
|
2738
|
-
function
|
|
2739
|
-
|
|
2743
|
+
function i(h) {
|
|
2744
|
+
h.disabled || s("update:modelValue", h.key);
|
|
2740
2745
|
}
|
|
2741
|
-
function
|
|
2742
|
-
const
|
|
2746
|
+
function l(h) {
|
|
2747
|
+
const m = t.modelValue === h.key, v = "relative z-1 font-medium text-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed";
|
|
2743
2748
|
return t.variant === "line" ? [
|
|
2744
|
-
|
|
2745
|
-
"px-4 py-2
|
|
2746
|
-
|
|
2749
|
+
v,
|
|
2750
|
+
"px-4 py-2.5 rounded-t-md border-0 bg-transparent",
|
|
2751
|
+
m ? "text-brand" : "text-fg-secondary hover:text-fg not-disabled:hover:bg-surface-hover-light"
|
|
2747
2752
|
].join(" ") : [
|
|
2748
|
-
|
|
2749
|
-
"px-3 py-1.5
|
|
2750
|
-
|
|
2753
|
+
v,
|
|
2754
|
+
"px-3 py-1.5 rounded-md border-0 bg-transparent",
|
|
2755
|
+
m ? "text-fg" : "text-fg-secondary hover:text-fg"
|
|
2751
2756
|
].join(" ");
|
|
2752
2757
|
}
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2758
|
+
const c = Bt({ left: 0, top: 0, width: 0, height: 0, visible: !1 }), d = j(!1);
|
|
2759
|
+
function u() {
|
|
2760
|
+
const h = document.getElementById(`${o}-tab-${t.modelValue}`);
|
|
2761
|
+
if (!h) {
|
|
2762
|
+
c.visible = !1;
|
|
2763
|
+
return;
|
|
2764
|
+
}
|
|
2765
|
+
c.left = h.offsetLeft, c.top = h.offsetTop, c.width = h.offsetWidth, c.height = h.offsetHeight, c.visible = !0;
|
|
2766
|
+
}
|
|
2767
|
+
let b = null;
|
|
2768
|
+
qe(async () => {
|
|
2769
|
+
await fe(), u(), requestAnimationFrame(() => {
|
|
2770
|
+
d.value = !0;
|
|
2771
|
+
}), typeof ResizeObserver < "u" && r.value && (b = new ResizeObserver(() => u()), b.observe(r.value));
|
|
2772
|
+
}), Ke(() => {
|
|
2773
|
+
b == null || b.disconnect();
|
|
2774
|
+
}), re(
|
|
2775
|
+
[() => t.modelValue, () => t.variant, () => t.tabs],
|
|
2776
|
+
async () => {
|
|
2777
|
+
await fe(), u();
|
|
2778
|
+
},
|
|
2779
|
+
{ deep: !0 }
|
|
2780
|
+
);
|
|
2781
|
+
function f(h, m) {
|
|
2782
|
+
const v = t.tabs.filter((T) => !T.disabled), y = v.findIndex(
|
|
2783
|
+
(T) => T.key === t.tabs[m].key
|
|
2756
2784
|
);
|
|
2757
|
-
let
|
|
2758
|
-
switch (
|
|
2785
|
+
let k = -1;
|
|
2786
|
+
switch (h.key) {
|
|
2759
2787
|
case "ArrowRight":
|
|
2760
2788
|
case "ArrowDown":
|
|
2761
|
-
|
|
2789
|
+
h.preventDefault(), k = (y + 1) % v.length;
|
|
2762
2790
|
break;
|
|
2763
2791
|
case "ArrowLeft":
|
|
2764
2792
|
case "ArrowUp":
|
|
2765
|
-
|
|
2793
|
+
h.preventDefault(), k = (y - 1 + v.length) % v.length;
|
|
2766
2794
|
break;
|
|
2767
2795
|
case "Home":
|
|
2768
|
-
|
|
2796
|
+
h.preventDefault(), k = 0;
|
|
2769
2797
|
break;
|
|
2770
2798
|
case "End":
|
|
2771
|
-
|
|
2799
|
+
h.preventDefault(), k = v.length - 1;
|
|
2772
2800
|
break;
|
|
2773
2801
|
default:
|
|
2774
2802
|
return;
|
|
2775
2803
|
}
|
|
2776
|
-
const
|
|
2777
|
-
s("update:modelValue",
|
|
2778
|
-
const
|
|
2779
|
-
|
|
2804
|
+
const C = v[k];
|
|
2805
|
+
s("update:modelValue", C.key);
|
|
2806
|
+
const A = document.getElementById(`${o}-tab-${C.key}`);
|
|
2807
|
+
A == null || A.focus();
|
|
2780
2808
|
}
|
|
2781
|
-
return (
|
|
2782
|
-
|
|
2783
|
-
|
|
2809
|
+
return (h, m) => (g(), p("div", null, [
|
|
2810
|
+
$("div", {
|
|
2811
|
+
ref_key: "tablistRef",
|
|
2812
|
+
ref: r,
|
|
2813
|
+
class: V(a.value),
|
|
2784
2814
|
role: "tablist",
|
|
2785
2815
|
"aria-label": e.ariaLabel
|
|
2786
2816
|
}, [
|
|
2787
|
-
|
|
2788
|
-
key:
|
|
2789
|
-
|
|
2817
|
+
e.variant === "line" ? (g(), p("span", {
|
|
2818
|
+
key: 0,
|
|
2819
|
+
"aria-hidden": "true",
|
|
2820
|
+
class: V(["pointer-events-none absolute bottom-0 h-2px rounded-full bg-brand", d.value ? "transition-all duration-200 ease-out motion-reduce:transition-none" : ""]),
|
|
2821
|
+
style: _({
|
|
2822
|
+
left: `${c.left}px`,
|
|
2823
|
+
width: `${c.width}px`,
|
|
2824
|
+
opacity: c.visible ? 1 : 0
|
|
2825
|
+
})
|
|
2826
|
+
}, null, 6)) : (g(), p("span", {
|
|
2827
|
+
key: 1,
|
|
2828
|
+
"aria-hidden": "true",
|
|
2829
|
+
class: V(["pointer-events-none absolute rounded-md bg-bg shadow-default", d.value ? "transition-all duration-200 ease-out motion-reduce:transition-none" : ""]),
|
|
2830
|
+
style: _({
|
|
2831
|
+
left: `${c.left}px`,
|
|
2832
|
+
top: `${c.top}px`,
|
|
2833
|
+
width: `${c.width}px`,
|
|
2834
|
+
height: `${c.height}px`,
|
|
2835
|
+
opacity: c.visible ? 1 : 0
|
|
2836
|
+
})
|
|
2837
|
+
}, null, 6)),
|
|
2838
|
+
(g(!0), p(le, null, ie(e.tabs, (v, y) => (g(), p("button", {
|
|
2839
|
+
key: v.key,
|
|
2840
|
+
id: `${S(o)}-tab-${v.key}`,
|
|
2790
2841
|
role: "tab",
|
|
2791
2842
|
type: "button",
|
|
2792
|
-
"aria-selected": e.modelValue ===
|
|
2793
|
-
"aria-controls": `${
|
|
2794
|
-
tabindex: e.modelValue ===
|
|
2795
|
-
disabled:
|
|
2796
|
-
class:
|
|
2797
|
-
onClick: (
|
|
2798
|
-
onKeydown: (
|
|
2799
|
-
}, L(
|
|
2843
|
+
"aria-selected": e.modelValue === v.key,
|
|
2844
|
+
"aria-controls": `${S(o)}-panel-${v.key}`,
|
|
2845
|
+
tabindex: e.modelValue === v.key ? 0 : -1,
|
|
2846
|
+
disabled: v.disabled,
|
|
2847
|
+
class: V(l(v)),
|
|
2848
|
+
onClick: (k) => i(v),
|
|
2849
|
+
onKeydown: (k) => f(k, y)
|
|
2850
|
+
}, L(v.label), 43, Ks))), 128))
|
|
2800
2851
|
], 10, qs),
|
|
2801
|
-
(g(!0),
|
|
2802
|
-
key:
|
|
2803
|
-
id: `${
|
|
2852
|
+
(g(!0), p(le, null, ie(e.tabs, (v) => (g(), p("div", {
|
|
2853
|
+
key: v.key,
|
|
2854
|
+
id: `${S(o)}-panel-${v.key}`,
|
|
2804
2855
|
role: "tabpanel",
|
|
2805
|
-
"aria-labelledby": `${
|
|
2806
|
-
hidden: e.modelValue !==
|
|
2856
|
+
"aria-labelledby": `${S(o)}-tab-${v.key}`,
|
|
2857
|
+
hidden: e.modelValue !== v.key,
|
|
2807
2858
|
tabindex: 0
|
|
2808
2859
|
}, [
|
|
2809
|
-
e.modelValue ===
|
|
2860
|
+
e.modelValue === v.key ? P(h.$slots, v.key, { key: 0 }) : R("", !0)
|
|
2810
2861
|
], 8, Us))), 128))
|
|
2811
2862
|
]));
|
|
2812
2863
|
}
|
|
@@ -2820,7 +2871,7 @@ const Nn = { class: "relative" }, Wn = ["id", "aria-label"], Hn = ["id", "aria-s
|
|
|
2820
2871
|
}, _s = {
|
|
2821
2872
|
key: 2,
|
|
2822
2873
|
class: "text-caption ml-auto"
|
|
2823
|
-
},
|
|
2874
|
+
}, Bo = /* @__PURE__ */ z({
|
|
2824
2875
|
__name: "DsTextarea",
|
|
2825
2876
|
props: {
|
|
2826
2877
|
modelValue: {},
|
|
@@ -2837,10 +2888,10 @@ const Nn = { class: "relative" }, Wn = ["id", "aria-label"], Hn = ["id", "aria-s
|
|
|
2837
2888
|
},
|
|
2838
2889
|
emits: ["update:modelValue", "blur", "focus"],
|
|
2839
2890
|
setup(e, { expose: n, emit: t }) {
|
|
2840
|
-
const s = e, o = t, r = j(null), a =
|
|
2891
|
+
const s = e, o = t, r = j(null), a = oe("textarea"), i = `${a}-help`, l = `${a}-error`, c = w(() => {
|
|
2841
2892
|
const m = [];
|
|
2842
|
-
return s.helpText && !s.error && m.push(i), s.error && m.push(
|
|
2843
|
-
}), d = w(() => (s.modelValue || "").length),
|
|
2893
|
+
return s.helpText && !s.error && m.push(i), s.error && m.push(l), m.length > 0 ? m.join(" ") : void 0;
|
|
2894
|
+
}), d = w(() => (s.modelValue || "").length), u = w(() => {
|
|
2844
2895
|
const m = [
|
|
2845
2896
|
"block",
|
|
2846
2897
|
"w-full",
|
|
@@ -2860,38 +2911,38 @@ const Nn = { class: "relative" }, Wn = ["id", "aria-label"], Hn = ["id", "aria-s
|
|
|
2860
2911
|
"disabled:bg-surface-disabled",
|
|
2861
2912
|
"disabled:text-fg-disabled",
|
|
2862
2913
|
"box-border"
|
|
2863
|
-
],
|
|
2914
|
+
], v = {
|
|
2864
2915
|
small: "px-2 py-1 text-sm",
|
|
2865
2916
|
medium: "px-3 py-2 text-base",
|
|
2866
2917
|
large: "px-4 py-3 text-lg"
|
|
2867
|
-
},
|
|
2868
|
-
return [...m,
|
|
2918
|
+
}, y = s.error ? ["border-error-border", "focus:border-error", "focus:ring-error"] : ["border-border", "focus:border-border-focus", "focus:ring-focus-ring"];
|
|
2919
|
+
return [...m, v[s.size], ...y].join(" ");
|
|
2869
2920
|
}), b = (m) => {
|
|
2870
|
-
const
|
|
2871
|
-
o("update:modelValue",
|
|
2921
|
+
const v = m.target;
|
|
2922
|
+
o("update:modelValue", v.value);
|
|
2872
2923
|
};
|
|
2873
|
-
function
|
|
2924
|
+
function f() {
|
|
2874
2925
|
var m;
|
|
2875
2926
|
(m = r.value) == null || m.focus();
|
|
2876
2927
|
}
|
|
2877
|
-
function
|
|
2928
|
+
function h() {
|
|
2878
2929
|
var m;
|
|
2879
2930
|
(m = r.value) == null || m.blur();
|
|
2880
2931
|
}
|
|
2881
|
-
return n({ focus:
|
|
2882
|
-
e.label ? (g(),
|
|
2932
|
+
return n({ focus: f, blur: h, textareaRef: r }), (m, v) => (g(), p("div", Xs, [
|
|
2933
|
+
e.label ? (g(), p("label", {
|
|
2883
2934
|
key: 0,
|
|
2884
|
-
for:
|
|
2935
|
+
for: S(a),
|
|
2885
2936
|
class: "block text-label mb-1"
|
|
2886
2937
|
}, [
|
|
2887
2938
|
K(L(e.label) + " ", 1),
|
|
2888
|
-
e.required ? (g(),
|
|
2889
|
-
], 8, Ys)) :
|
|
2890
|
-
|
|
2891
|
-
|
|
2939
|
+
e.required ? (g(), p("span", Gs, "*")) : R("", !0)
|
|
2940
|
+
], 8, Ys)) : R("", !0),
|
|
2941
|
+
$("div", Js, [
|
|
2942
|
+
$("textarea", {
|
|
2892
2943
|
ref_key: "textareaRef",
|
|
2893
2944
|
ref: r,
|
|
2894
|
-
id:
|
|
2945
|
+
id: S(a),
|
|
2895
2946
|
value: e.modelValue,
|
|
2896
2947
|
placeholder: e.placeholder,
|
|
2897
2948
|
disabled: e.disabled,
|
|
@@ -2899,45 +2950,45 @@ const Nn = { class: "relative" }, Wn = ["id", "aria-label"], Hn = ["id", "aria-s
|
|
|
2899
2950
|
required: e.required,
|
|
2900
2951
|
rows: e.rows,
|
|
2901
2952
|
maxlength: e.maxLength,
|
|
2902
|
-
"aria-describedby":
|
|
2953
|
+
"aria-describedby": c.value,
|
|
2903
2954
|
"aria-invalid": e.error ? "true" : void 0,
|
|
2904
|
-
class:
|
|
2955
|
+
class: V(u.value),
|
|
2905
2956
|
onInput: b,
|
|
2906
|
-
onBlur:
|
|
2907
|
-
onFocus:
|
|
2957
|
+
onBlur: v[0] || (v[0] = (y) => m.$emit("blur", y)),
|
|
2958
|
+
onFocus: v[1] || (v[1] = (y) => m.$emit("focus", y))
|
|
2908
2959
|
}, null, 42, Qs)
|
|
2909
2960
|
]),
|
|
2910
|
-
e.helpText || e.error || e.maxLength ? (g(),
|
|
2911
|
-
e.helpText && !e.error ? (g(),
|
|
2961
|
+
e.helpText || e.error || e.maxLength ? (g(), p("div", Zs, [
|
|
2962
|
+
e.helpText && !e.error ? (g(), p("div", {
|
|
2912
2963
|
key: 0,
|
|
2913
2964
|
id: i,
|
|
2914
2965
|
class: "text-caption"
|
|
2915
|
-
}, L(e.helpText), 1)) :
|
|
2916
|
-
e.error ? (g(),
|
|
2966
|
+
}, L(e.helpText), 1)) : R("", !0),
|
|
2967
|
+
e.error ? (g(), p("div", {
|
|
2917
2968
|
key: 1,
|
|
2918
|
-
id:
|
|
2969
|
+
id: l,
|
|
2919
2970
|
class: "text-sm text-error font-sans",
|
|
2920
2971
|
role: "alert",
|
|
2921
2972
|
"aria-live": "polite"
|
|
2922
|
-
}, L(e.error), 1)) :
|
|
2923
|
-
e.maxLength ? (g(),
|
|
2924
|
-
])) :
|
|
2973
|
+
}, L(e.error), 1)) : R("", !0),
|
|
2974
|
+
e.maxLength ? (g(), p("div", _s, L(d.value) + " / " + L(e.maxLength), 1)) : R("", !0)
|
|
2975
|
+
])) : R("", !0)
|
|
2925
2976
|
]));
|
|
2926
2977
|
}
|
|
2927
|
-
}), eo = { class: "flex flex-col items-center justify-center h-screen gap-4px" }, to = { class: "text-heading-xl text-fg m-0 p-0" }, no = { class: "text-body-lg text-fg-secondary m-0 p-0" },
|
|
2978
|
+
}), eo = { class: "flex flex-col items-center justify-center h-screen gap-4px" }, to = { class: "text-heading-xl text-fg m-0 p-0" }, no = { class: "text-body-lg text-fg-secondary m-0 p-0" }, So = /* @__PURE__ */ z({
|
|
2928
2979
|
__name: "DsUnderConstruction",
|
|
2929
2980
|
props: {
|
|
2930
2981
|
title: { default: "Under Construction" },
|
|
2931
2982
|
description: { default: "This page is under construction. Please check back later." }
|
|
2932
2983
|
},
|
|
2933
2984
|
setup(e) {
|
|
2934
|
-
return (n, t) => (g(),
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2985
|
+
return (n, t) => (g(), p("div", eo, [
|
|
2986
|
+
te(S($t), { class: "w-10 h-10 text-fg-secondary" }),
|
|
2987
|
+
$("h2", to, L(e.title), 1),
|
|
2988
|
+
$("p", no, L(e.description), 1)
|
|
2938
2989
|
]));
|
|
2939
2990
|
}
|
|
2940
|
-
}), so = ["role", "aria-live"], oo = { class: "flex items-start gap-3 flex-1 min-w-0" },
|
|
2991
|
+
}), so = ["role", "aria-live"], oo = { class: "flex items-start gap-3 flex-1 min-w-0" }, ao = { class: "flex-1 min-w-0" }, ro = {
|
|
2941
2992
|
key: 0,
|
|
2942
2993
|
class: "text-label m-0"
|
|
2943
2994
|
}, lo = /* @__PURE__ */ z({
|
|
@@ -2954,10 +3005,10 @@ const Nn = { class: "relative" }, Wn = ["id", "aria-label"], Hn = ["id", "aria-s
|
|
|
2954
3005
|
s("dismiss", t.toast.id);
|
|
2955
3006
|
}, r));
|
|
2956
3007
|
}
|
|
2957
|
-
function
|
|
3008
|
+
function l() {
|
|
2958
3009
|
o && (clearTimeout(o), o = null, r -= Date.now() - a);
|
|
2959
3010
|
}
|
|
2960
|
-
function
|
|
3011
|
+
function c() {
|
|
2961
3012
|
i();
|
|
2962
3013
|
}
|
|
2963
3014
|
const d = {
|
|
@@ -2966,7 +3017,7 @@ const Nn = { class: "relative" }, Wn = ["id", "aria-label"], Hn = ["id", "aria-s
|
|
|
2966
3017
|
success: "border-l-success",
|
|
2967
3018
|
warning: "border-l-warning",
|
|
2968
3019
|
info: "border-l-info"
|
|
2969
|
-
},
|
|
3020
|
+
}, u = w(() => [
|
|
2970
3021
|
"flex items-start gap-3 w-80 p-4 bg-bg border border-solid border-border rounded-lg shadow-lg",
|
|
2971
3022
|
"border-l-4",
|
|
2972
3023
|
d[t.toast.variant] || "border-l-brand"
|
|
@@ -2976,59 +3027,59 @@ const Nn = { class: "relative" }, Wn = ["id", "aria-label"], Hn = ["id", "aria-s
|
|
|
2976
3027
|
success: "text-success",
|
|
2977
3028
|
warning: "text-warning",
|
|
2978
3029
|
info: "text-info"
|
|
2979
|
-
},
|
|
2980
|
-
return
|
|
3030
|
+
}, f = w(() => ["shrink-0 mt-0.5", b[t.toast.variant] || "text-brand"].join(" "));
|
|
3031
|
+
return qe(() => {
|
|
2981
3032
|
t.toast.duration > 0 && i();
|
|
2982
|
-
}),
|
|
3033
|
+
}), Ke(() => {
|
|
2983
3034
|
o && clearTimeout(o);
|
|
2984
|
-
}), (
|
|
2985
|
-
class:
|
|
3035
|
+
}), (h, m) => (g(), p("div", {
|
|
3036
|
+
class: V(u.value),
|
|
2986
3037
|
role: e.toast.variant === "error" ? "alert" : "status",
|
|
2987
3038
|
"aria-live": e.toast.variant === "error" ? "assertive" : "polite",
|
|
2988
|
-
onMouseenter:
|
|
2989
|
-
onMouseleave:
|
|
3039
|
+
onMouseenter: l,
|
|
3040
|
+
onMouseleave: c
|
|
2990
3041
|
}, [
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
class:
|
|
3042
|
+
$("div", oo, [
|
|
3043
|
+
$("span", {
|
|
3044
|
+
class: V(f.value),
|
|
2994
3045
|
"aria-hidden": "true"
|
|
2995
3046
|
}, [
|
|
2996
|
-
e.toast.variant === "success" ? (g(), N(
|
|
3047
|
+
e.toast.variant === "success" ? (g(), N(S(jn), {
|
|
2997
3048
|
key: 0,
|
|
2998
3049
|
class: "w-5 h-5"
|
|
2999
|
-
})) : e.toast.variant === "error" ? (g(), N(
|
|
3050
|
+
})) : e.toast.variant === "error" ? (g(), N(S(Be), {
|
|
3000
3051
|
key: 1,
|
|
3001
3052
|
class: "w-5 h-5"
|
|
3002
|
-
})) : e.toast.variant === "warning" ? (g(), N(
|
|
3053
|
+
})) : e.toast.variant === "warning" ? (g(), N(S($t), {
|
|
3003
3054
|
key: 2,
|
|
3004
3055
|
class: "w-5 h-5"
|
|
3005
|
-
})) : (g(), N(
|
|
3056
|
+
})) : (g(), N(S(In), {
|
|
3006
3057
|
key: 3,
|
|
3007
3058
|
class: "w-5 h-5"
|
|
3008
3059
|
}))
|
|
3009
3060
|
], 2),
|
|
3010
|
-
|
|
3011
|
-
e.toast.title ? (g(),
|
|
3012
|
-
|
|
3013
|
-
class:
|
|
3061
|
+
$("div", ao, [
|
|
3062
|
+
e.toast.title ? (g(), p("p", ro, L(e.toast.title), 1)) : R("", !0),
|
|
3063
|
+
$("p", {
|
|
3064
|
+
class: V(["text-body-sm m-0", e.toast.title ? "mt-0.5" : ""])
|
|
3014
3065
|
}, L(e.toast.message), 3)
|
|
3015
3066
|
])
|
|
3016
3067
|
]),
|
|
3017
|
-
e.toast.closable ? (g(),
|
|
3068
|
+
e.toast.closable ? (g(), p("button", {
|
|
3018
3069
|
key: 0,
|
|
3019
3070
|
type: "button",
|
|
3020
3071
|
class: "appearance-none bg-transparent border-none p-1 rounded-md text-fg-tertiary hover:text-fg cursor-pointer transition-colors shrink-0 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring",
|
|
3021
3072
|
"aria-label": "Dismiss notification",
|
|
3022
|
-
onClick: m[0] || (m[0] = (
|
|
3073
|
+
onClick: m[0] || (m[0] = (v) => h.$emit("dismiss", e.toast.id))
|
|
3023
3074
|
}, [
|
|
3024
|
-
|
|
3025
|
-
])) :
|
|
3075
|
+
te(S(Be), { class: "w-4 h-4" })
|
|
3076
|
+
])) : R("", !0)
|
|
3026
3077
|
], 42, so));
|
|
3027
3078
|
}
|
|
3028
3079
|
});
|
|
3029
3080
|
let io = 0;
|
|
3030
|
-
const
|
|
3031
|
-
function
|
|
3081
|
+
const Se = j([]);
|
|
3082
|
+
function ke(e, n, t) {
|
|
3032
3083
|
const s = ++io, o = {
|
|
3033
3084
|
id: s,
|
|
3034
3085
|
variant: e,
|
|
@@ -3037,21 +3088,21 @@ function we(e, n, t) {
|
|
|
3037
3088
|
duration: (t == null ? void 0 : t.duration) ?? 5e3,
|
|
3038
3089
|
closable: (t == null ? void 0 : t.closable) ?? !0
|
|
3039
3090
|
};
|
|
3040
|
-
return
|
|
3091
|
+
return Se.value.push(o), s;
|
|
3041
3092
|
}
|
|
3042
3093
|
function co(e) {
|
|
3043
|
-
const n =
|
|
3044
|
-
n !== -1 &&
|
|
3094
|
+
const n = Se.value.findIndex((t) => t.id === e);
|
|
3095
|
+
n !== -1 && Se.value.splice(n, 1);
|
|
3045
3096
|
}
|
|
3046
3097
|
function uo() {
|
|
3047
3098
|
return {
|
|
3048
|
-
toasts:
|
|
3099
|
+
toasts: Se,
|
|
3049
3100
|
removeToast: co,
|
|
3050
|
-
success: (e, n) =>
|
|
3051
|
-
error: (e, n) =>
|
|
3052
|
-
warning: (e, n) =>
|
|
3053
|
-
info: (e, n) =>
|
|
3054
|
-
brand: (e, n) =>
|
|
3101
|
+
success: (e, n) => ke("success", e, n),
|
|
3102
|
+
error: (e, n) => ke("error", e, n),
|
|
3103
|
+
warning: (e, n) => ke("warning", e, n),
|
|
3104
|
+
info: (e, n) => ke("info", e, n),
|
|
3105
|
+
brand: (e, n) => ke("brand", e, n)
|
|
3055
3106
|
};
|
|
3056
3107
|
}
|
|
3057
3108
|
const fo = {
|
|
@@ -3062,8 +3113,8 @@ const fo = {
|
|
|
3062
3113
|
setup(e) {
|
|
3063
3114
|
const { toasts: n, removeToast: t } = uo();
|
|
3064
3115
|
return (s, o) => (g(), N(Oe, { to: "body" }, [
|
|
3065
|
-
|
|
3066
|
-
|
|
3116
|
+
$("div", fo, [
|
|
3117
|
+
te(St, {
|
|
3067
3118
|
"enter-active-class": "transition-all duration-slow ease-out",
|
|
3068
3119
|
"enter-from-class": "opacity-0 translate-x-8",
|
|
3069
3120
|
"enter-to-class": "opacity-100 translate-x-0",
|
|
@@ -3072,10 +3123,10 @@ const fo = {
|
|
|
3072
3123
|
"leave-to-class": "opacity-0 translate-x-8"
|
|
3073
3124
|
}, {
|
|
3074
3125
|
default: Ae(() => [
|
|
3075
|
-
(g(!0),
|
|
3126
|
+
(g(!0), p(le, null, ie(S(n), (r) => (g(), N(lo, {
|
|
3076
3127
|
key: r.id,
|
|
3077
3128
|
toast: r,
|
|
3078
|
-
onDismiss:
|
|
3129
|
+
onDismiss: S(t)
|
|
3079
3130
|
}, null, 8, ["toast", "onDismiss"]))), 128))
|
|
3080
3131
|
]),
|
|
3081
3132
|
_: 1
|
|
@@ -3091,41 +3142,41 @@ const fo = {
|
|
|
3091
3142
|
disabled: { type: Boolean, default: !1 }
|
|
3092
3143
|
},
|
|
3093
3144
|
setup(e) {
|
|
3094
|
-
const n = e, t =
|
|
3145
|
+
const n = e, t = oe("tooltip"), s = j(!1), o = j(null), r = j(null), a = j(null), { floatingStyles: i, middlewareData: l, placement: c } = kt(o, r, {
|
|
3095
3146
|
placement: w(() => n.placement),
|
|
3096
|
-
middleware: [pt(8), xt(), yt({ padding: 8 }),
|
|
3147
|
+
middleware: [pt(8), xt(), yt({ padding: 8 }), Mn({ element: a })]
|
|
3097
3148
|
}), d = w(() => {
|
|
3098
|
-
const
|
|
3099
|
-
if (!
|
|
3100
|
-
const
|
|
3149
|
+
const f = l.value.arrow;
|
|
3150
|
+
if (!f) return {};
|
|
3151
|
+
const h = c.value.split("-")[0], m = { top: "bottom", right: "left", bottom: "top", left: "right" }[h];
|
|
3101
3152
|
return {
|
|
3102
|
-
left:
|
|
3103
|
-
top:
|
|
3153
|
+
left: f.x != null ? `${f.x}px` : "",
|
|
3154
|
+
top: f.y != null ? `${f.y}px` : "",
|
|
3104
3155
|
[m]: "-4px"
|
|
3105
3156
|
};
|
|
3106
3157
|
});
|
|
3107
|
-
function
|
|
3158
|
+
function u() {
|
|
3108
3159
|
n.disabled || (s.value = !0);
|
|
3109
3160
|
}
|
|
3110
3161
|
function b() {
|
|
3111
3162
|
s.value = !1;
|
|
3112
3163
|
}
|
|
3113
|
-
return (
|
|
3164
|
+
return (f, h) => (g(), p("div", {
|
|
3114
3165
|
class: "inline-flex",
|
|
3115
|
-
onMouseenter:
|
|
3166
|
+
onMouseenter: u,
|
|
3116
3167
|
onMouseleave: b,
|
|
3117
|
-
onFocusin:
|
|
3168
|
+
onFocusin: u,
|
|
3118
3169
|
onFocusout: b
|
|
3119
3170
|
}, [
|
|
3120
|
-
|
|
3171
|
+
$("div", {
|
|
3121
3172
|
ref_key: "referenceRef",
|
|
3122
3173
|
ref: o,
|
|
3123
|
-
"aria-describedby": s.value ?
|
|
3174
|
+
"aria-describedby": s.value ? S(t) : void 0
|
|
3124
3175
|
}, [
|
|
3125
|
-
P(
|
|
3176
|
+
P(f.$slots, "default")
|
|
3126
3177
|
], 8, bo),
|
|
3127
3178
|
(g(), N(Oe, { to: "body" }, [
|
|
3128
|
-
|
|
3179
|
+
te(lt, {
|
|
3129
3180
|
"enter-active-class": "transition-opacity duration-fast",
|
|
3130
3181
|
"enter-from-class": "opacity-0",
|
|
3131
3182
|
"enter-to-class": "opacity-100",
|
|
@@ -3134,23 +3185,23 @@ const fo = {
|
|
|
3134
3185
|
"leave-to-class": "opacity-0"
|
|
3135
3186
|
}, {
|
|
3136
3187
|
default: Ae(() => [
|
|
3137
|
-
s.value && !e.disabled ? (g(),
|
|
3188
|
+
s.value && !e.disabled ? (g(), p("div", {
|
|
3138
3189
|
key: 0,
|
|
3139
|
-
id:
|
|
3190
|
+
id: S(t),
|
|
3140
3191
|
ref_key: "floatingRef",
|
|
3141
3192
|
ref: r,
|
|
3142
3193
|
role: "tooltip",
|
|
3143
|
-
style:
|
|
3194
|
+
style: _(S(i)),
|
|
3144
3195
|
class: "z-tooltip px-2 py-1 text-xs font-medium bg-bg-inverse text-fg-inverse rounded-md shadow-md max-w-xs pointer-events-none"
|
|
3145
3196
|
}, [
|
|
3146
3197
|
K(L(e.content) + " ", 1),
|
|
3147
|
-
|
|
3198
|
+
$("div", {
|
|
3148
3199
|
ref_key: "arrowRef",
|
|
3149
3200
|
ref: a,
|
|
3150
|
-
style:
|
|
3201
|
+
style: _(d.value),
|
|
3151
3202
|
class: "absolute w-2 h-2 bg-bg-inverse rotate-45"
|
|
3152
3203
|
}, null, 4)
|
|
3153
|
-
], 12, mo)) :
|
|
3204
|
+
], 12, mo)) : R("", !0)
|
|
3154
3205
|
]),
|
|
3155
3206
|
_: 1
|
|
3156
3207
|
})
|
|
@@ -3167,7 +3218,7 @@ export {
|
|
|
3167
3218
|
xo as DsDropdownSelect,
|
|
3168
3219
|
wo as DsExpandableCard,
|
|
3169
3220
|
ko as DsInput,
|
|
3170
|
-
|
|
3221
|
+
as as DsLoadingSpinner,
|
|
3171
3222
|
$o as DsModal,
|
|
3172
3223
|
Co as DsRadio,
|
|
3173
3224
|
Do as DsSelect,
|
|
@@ -3175,11 +3226,11 @@ export {
|
|
|
3175
3226
|
Vo as DsSwitch,
|
|
3176
3227
|
Ro as DsTable,
|
|
3177
3228
|
Lo as DsTabs,
|
|
3178
|
-
|
|
3229
|
+
Bo as DsTextarea,
|
|
3179
3230
|
lo as DsToast,
|
|
3180
3231
|
Ao as DsToastContainer,
|
|
3181
3232
|
Oo as DsTooltip,
|
|
3182
|
-
|
|
3233
|
+
So as DsUnderConstruction,
|
|
3183
3234
|
Mo as allTokens,
|
|
3184
3235
|
jo as colorTokens,
|
|
3185
3236
|
Po as expandBases,
|
|
@@ -3192,6 +3243,6 @@ export {
|
|
|
3192
3243
|
Ko as shadowTokens,
|
|
3193
3244
|
Uo as spacingTokens,
|
|
3194
3245
|
Xo as tokenToCssVar,
|
|
3195
|
-
|
|
3246
|
+
oe as useId,
|
|
3196
3247
|
uo as useToast
|
|
3197
3248
|
};
|