@leodamours/ds-components 0.2.7 → 0.2.8
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/components/DsTable.vue.d.ts +3 -0
- package/dist/index.js +533 -529
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -39,7 +39,7 @@ const Bt = ["aria-label"], Tt = ["src", "alt"], ns = /* @__PURE__ */ S({
|
|
|
39
39
|
neutral: "bg-neutral-soft text-neutral-on-soft"
|
|
40
40
|
}[n.variant]
|
|
41
41
|
].join(" "));
|
|
42
|
-
return (a,
|
|
42
|
+
return (a, u) => (g(), v("span", {
|
|
43
43
|
class: T(s.value),
|
|
44
44
|
role: "img",
|
|
45
45
|
"aria-label": e.alt || e.name
|
|
@@ -49,7 +49,7 @@ const Bt = ["aria-label"], Tt = ["src", "alt"], ns = /* @__PURE__ */ S({
|
|
|
49
49
|
src: e.src,
|
|
50
50
|
alt: e.alt || e.name || "",
|
|
51
51
|
class: "w-full h-full object-cover rounded-full",
|
|
52
|
-
onError:
|
|
52
|
+
onError: u[0] || (u[0] = (c) => t.value = !0)
|
|
53
53
|
}, null, 40, Tt)) : (g(), v("span", {
|
|
54
54
|
key: 1,
|
|
55
55
|
class: T(r.value),
|
|
@@ -197,12 +197,12 @@ const Bt = ["aria-label"], Tt = ["src", "alt"], ns = /* @__PURE__ */ S({
|
|
|
197
197
|
"hover:bg-error-hover",
|
|
198
198
|
"active:bg-error-active"
|
|
199
199
|
]
|
|
200
|
-
},
|
|
200
|
+
}, u = n.fullWidth ? ["w-full"] : [];
|
|
201
201
|
return [
|
|
202
202
|
...s,
|
|
203
203
|
...r[n.size],
|
|
204
204
|
...a[n.variant],
|
|
205
|
-
...
|
|
205
|
+
...u
|
|
206
206
|
].join(" ");
|
|
207
207
|
}), o = k(() => ({
|
|
208
208
|
small: "w-3 h-3",
|
|
@@ -258,32 +258,32 @@ const Bt = ["aria-label"], Tt = ["src", "alt"], ns = /* @__PURE__ */ S({
|
|
|
258
258
|
medium: { box: "w-4 h-4", label: "text-sm", radius: "rounded" },
|
|
259
259
|
large: { box: "w-5 h-5", label: "text-base", radius: "rounded-md" }
|
|
260
260
|
}, r = k(() => {
|
|
261
|
-
const
|
|
262
|
-
|
|
263
|
-
|
|
261
|
+
const c = s[t.size], f = [
|
|
262
|
+
c.box,
|
|
263
|
+
c.radius,
|
|
264
264
|
"inline-flex items-center justify-center",
|
|
265
265
|
"border border-solid",
|
|
266
266
|
"transition-all duration-150",
|
|
267
267
|
"shrink-0"
|
|
268
268
|
];
|
|
269
|
-
return t.disabled ?
|
|
269
|
+
return t.disabled ? f.push(
|
|
270
270
|
t.modelValue ? "bg-brand-disabled border-brand-disabled text-brand-on-solid" : "bg-bg-tertiary border-border text-transparent",
|
|
271
271
|
"opacity-60"
|
|
272
|
-
) : t.modelValue ?
|
|
272
|
+
) : t.modelValue ? f.push("bg-brand border-brand text-brand-on-solid") : f.push(
|
|
273
273
|
"bg-bg border-border-strong text-transparent",
|
|
274
274
|
"group-hover:border-brand",
|
|
275
275
|
"peer-focus-visible:ring-2 peer-focus-visible:ring-brand peer-focus-visible:ring-offset-2"
|
|
276
|
-
),
|
|
276
|
+
), f.join(" ");
|
|
277
277
|
}), a = k(() => [
|
|
278
278
|
"font-sans select-none",
|
|
279
279
|
s[t.size].label,
|
|
280
280
|
t.disabled ? "text-fg-disabled" : "text-fg"
|
|
281
|
-
].join(" ")),
|
|
281
|
+
].join(" ")), u = (c) => {
|
|
282
282
|
if (t.disabled) return;
|
|
283
|
-
const
|
|
284
|
-
o("update:modelValue",
|
|
283
|
+
const d = c.target.checked;
|
|
284
|
+
o("update:modelValue", d), o("change", d, c);
|
|
285
285
|
};
|
|
286
|
-
return (
|
|
286
|
+
return (c, f) => (g(), v("label", {
|
|
287
287
|
class: T([
|
|
288
288
|
"inline-flex items-center gap-2",
|
|
289
289
|
e.disabled ? "cursor-not-allowed" : "cursor-pointer",
|
|
@@ -297,21 +297,21 @@ const Bt = ["aria-label"], Tt = ["src", "alt"], ns = /* @__PURE__ */ S({
|
|
|
297
297
|
disabled: e.disabled,
|
|
298
298
|
value: e.value,
|
|
299
299
|
class: "sr-only peer",
|
|
300
|
-
onChange:
|
|
300
|
+
onChange: u
|
|
301
301
|
}, null, 40, Vt),
|
|
302
302
|
F("span", {
|
|
303
303
|
class: T(r.value),
|
|
304
304
|
"aria-hidden": "true"
|
|
305
305
|
}, [
|
|
306
|
-
e.modelValue ? (g(), v("svg", St, [...
|
|
306
|
+
e.modelValue ? (g(), v("svg", St, [...f[0] || (f[0] = [
|
|
307
307
|
F("polyline", { points: "2.5 6 5 8.5 9.5 3.5" }, null, -1)
|
|
308
308
|
])])) : D("", !0)
|
|
309
309
|
], 2),
|
|
310
|
-
e.label ||
|
|
310
|
+
e.label || c.$slots.default ? (g(), v("span", {
|
|
311
311
|
key: 0,
|
|
312
312
|
class: T(a.value)
|
|
313
313
|
}, [
|
|
314
|
-
N(
|
|
314
|
+
N(c.$slots, "default", {}, () => [
|
|
315
315
|
X(E(e.label), 1)
|
|
316
316
|
])
|
|
317
317
|
], 2)) : D("", !0)
|
|
@@ -428,48 +428,48 @@ function Ze(e, n, t) {
|
|
|
428
428
|
reference: o,
|
|
429
429
|
floating: s
|
|
430
430
|
} = e;
|
|
431
|
-
const r = ne(n), a = qe(n),
|
|
432
|
-
let
|
|
433
|
-
switch (
|
|
431
|
+
const r = ne(n), a = qe(n), u = He(a), c = le(n), f = r === "y", d = o.x + o.width / 2 - s.width / 2, i = o.y + o.height / 2 - s.height / 2, m = o[u] / 2 - s[u] / 2;
|
|
432
|
+
let l;
|
|
433
|
+
switch (c) {
|
|
434
434
|
case "top":
|
|
435
|
-
|
|
436
|
-
x:
|
|
435
|
+
l = {
|
|
436
|
+
x: d,
|
|
437
437
|
y: o.y - s.height
|
|
438
438
|
};
|
|
439
439
|
break;
|
|
440
440
|
case "bottom":
|
|
441
|
-
|
|
442
|
-
x:
|
|
441
|
+
l = {
|
|
442
|
+
x: d,
|
|
443
443
|
y: o.y + o.height
|
|
444
444
|
};
|
|
445
445
|
break;
|
|
446
446
|
case "right":
|
|
447
|
-
|
|
447
|
+
l = {
|
|
448
448
|
x: o.x + o.width,
|
|
449
|
-
y:
|
|
449
|
+
y: i
|
|
450
450
|
};
|
|
451
451
|
break;
|
|
452
452
|
case "left":
|
|
453
|
-
|
|
453
|
+
l = {
|
|
454
454
|
x: o.x - s.width,
|
|
455
|
-
y:
|
|
455
|
+
y: i
|
|
456
456
|
};
|
|
457
457
|
break;
|
|
458
458
|
default:
|
|
459
|
-
|
|
459
|
+
l = {
|
|
460
460
|
x: o.x,
|
|
461
461
|
y: o.y
|
|
462
462
|
};
|
|
463
463
|
}
|
|
464
464
|
switch (ye(n)) {
|
|
465
465
|
case "start":
|
|
466
|
-
|
|
466
|
+
l[a] -= m * (t && f ? -1 : 1);
|
|
467
467
|
break;
|
|
468
468
|
case "end":
|
|
469
|
-
|
|
469
|
+
l[a] += m * (t && f ? -1 : 1);
|
|
470
470
|
break;
|
|
471
471
|
}
|
|
472
|
-
return
|
|
472
|
+
return l;
|
|
473
473
|
}
|
|
474
474
|
async function Ut(e, n) {
|
|
475
475
|
var t;
|
|
@@ -479,41 +479,41 @@ async function Ut(e, n) {
|
|
|
479
479
|
y: s,
|
|
480
480
|
platform: r,
|
|
481
481
|
rects: a,
|
|
482
|
-
elements:
|
|
483
|
-
strategy:
|
|
482
|
+
elements: u,
|
|
483
|
+
strategy: c
|
|
484
484
|
} = e, {
|
|
485
|
-
boundary:
|
|
486
|
-
rootBoundary:
|
|
487
|
-
elementContext:
|
|
488
|
-
altBoundary:
|
|
489
|
-
padding:
|
|
490
|
-
} = pe(n, e),
|
|
491
|
-
element: (t = await (r.isElement == null ? void 0 : r.isElement(y))) == null || t ? y : y.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(
|
|
492
|
-
boundary:
|
|
493
|
-
rootBoundary:
|
|
494
|
-
strategy:
|
|
495
|
-
})), C =
|
|
485
|
+
boundary: f = "clippingAncestors",
|
|
486
|
+
rootBoundary: d = "viewport",
|
|
487
|
+
elementContext: i = "floating",
|
|
488
|
+
altBoundary: m = !1,
|
|
489
|
+
padding: l = 0
|
|
490
|
+
} = pe(n, e), h = it(l), y = u[m ? i === "floating" ? "reference" : "floating" : i], w = Ae(await r.getClippingRect({
|
|
491
|
+
element: (t = await (r.isElement == null ? void 0 : r.isElement(y))) == null || t ? y : y.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(u.floating)),
|
|
492
|
+
boundary: f,
|
|
493
|
+
rootBoundary: d,
|
|
494
|
+
strategy: c
|
|
495
|
+
})), C = i === "floating" ? {
|
|
496
496
|
x: o,
|
|
497
497
|
y: s,
|
|
498
498
|
width: a.floating.width,
|
|
499
499
|
height: a.floating.height
|
|
500
|
-
} : a.reference, x = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(
|
|
500
|
+
} : a.reference, x = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(u.floating)), $ = await (r.isElement == null ? void 0 : r.isElement(x)) ? await (r.getScale == null ? void 0 : r.getScale(x)) || {
|
|
501
501
|
x: 1,
|
|
502
502
|
y: 1
|
|
503
503
|
} : {
|
|
504
504
|
x: 1,
|
|
505
505
|
y: 1
|
|
506
506
|
}, B = Ae(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
507
|
-
elements:
|
|
507
|
+
elements: u,
|
|
508
508
|
rect: C,
|
|
509
509
|
offsetParent: x,
|
|
510
|
-
strategy:
|
|
510
|
+
strategy: c
|
|
511
511
|
}) : C);
|
|
512
512
|
return {
|
|
513
|
-
top: (w.top - B.top +
|
|
514
|
-
bottom: (B.bottom - w.bottom +
|
|
515
|
-
left: (w.left - B.left +
|
|
516
|
-
right: (B.right - w.right +
|
|
513
|
+
top: (w.top - B.top + h.top) / $.y,
|
|
514
|
+
bottom: (B.bottom - w.bottom + h.bottom) / $.y,
|
|
515
|
+
left: (w.left - B.left + h.left) / $.x,
|
|
516
|
+
right: (B.right - w.right + h.right) / $.x
|
|
517
517
|
};
|
|
518
518
|
}
|
|
519
519
|
const Xt = async (e, n, t) => {
|
|
@@ -522,63 +522,63 @@ const Xt = async (e, n, t) => {
|
|
|
522
522
|
strategy: s = "absolute",
|
|
523
523
|
middleware: r = [],
|
|
524
524
|
platform: a
|
|
525
|
-
} = t,
|
|
526
|
-
let
|
|
525
|
+
} = t, u = r.filter(Boolean), c = await (a.isRTL == null ? void 0 : a.isRTL(n));
|
|
526
|
+
let f = await a.getElementRects({
|
|
527
527
|
reference: e,
|
|
528
528
|
floating: n,
|
|
529
529
|
strategy: s
|
|
530
530
|
}), {
|
|
531
|
-
x:
|
|
532
|
-
y:
|
|
533
|
-
} = Ze(
|
|
534
|
-
for (let y = 0; y <
|
|
535
|
-
var
|
|
531
|
+
x: d,
|
|
532
|
+
y: i
|
|
533
|
+
} = Ze(f, o, c), m = o, l = {}, h = 0;
|
|
534
|
+
for (let y = 0; y < u.length; y++) {
|
|
535
|
+
var b;
|
|
536
536
|
const {
|
|
537
537
|
name: w,
|
|
538
538
|
fn: C
|
|
539
|
-
} =
|
|
539
|
+
} = u[y], {
|
|
540
540
|
x,
|
|
541
541
|
y: $,
|
|
542
542
|
data: B,
|
|
543
543
|
reset: O
|
|
544
544
|
} = await C({
|
|
545
|
-
x:
|
|
546
|
-
y:
|
|
545
|
+
x: d,
|
|
546
|
+
y: i,
|
|
547
547
|
initialPlacement: o,
|
|
548
|
-
placement:
|
|
548
|
+
placement: m,
|
|
549
549
|
strategy: s,
|
|
550
|
-
middlewareData:
|
|
551
|
-
rects:
|
|
550
|
+
middlewareData: l,
|
|
551
|
+
rects: f,
|
|
552
552
|
platform: {
|
|
553
553
|
...a,
|
|
554
|
-
detectOverflow: (
|
|
554
|
+
detectOverflow: (b = a.detectOverflow) != null ? b : Ut
|
|
555
555
|
},
|
|
556
556
|
elements: {
|
|
557
557
|
reference: e,
|
|
558
558
|
floating: n
|
|
559
559
|
}
|
|
560
560
|
});
|
|
561
|
-
|
|
562
|
-
...
|
|
561
|
+
d = x ?? d, i = $ ?? i, l = {
|
|
562
|
+
...l,
|
|
563
563
|
[w]: {
|
|
564
|
-
...
|
|
564
|
+
...l[w],
|
|
565
565
|
...B
|
|
566
566
|
}
|
|
567
|
-
}, O &&
|
|
567
|
+
}, O && h <= 50 && (h++, typeof O == "object" && (O.placement && (m = O.placement), O.rects && (f = O.rects === !0 ? await a.getElementRects({
|
|
568
568
|
reference: e,
|
|
569
569
|
floating: n,
|
|
570
570
|
strategy: s
|
|
571
571
|
}) : O.rects), {
|
|
572
|
-
x:
|
|
573
|
-
y:
|
|
574
|
-
} = Ze(
|
|
572
|
+
x: d,
|
|
573
|
+
y: i
|
|
574
|
+
} = Ze(f, m, c)), y = -1);
|
|
575
575
|
}
|
|
576
576
|
return {
|
|
577
|
-
x:
|
|
578
|
-
y:
|
|
579
|
-
placement:
|
|
577
|
+
x: d,
|
|
578
|
+
y: i,
|
|
579
|
+
placement: m,
|
|
580
580
|
strategy: s,
|
|
581
|
-
middlewareData:
|
|
581
|
+
middlewareData: l
|
|
582
582
|
};
|
|
583
583
|
}, Yt = (e) => ({
|
|
584
584
|
name: "arrow",
|
|
@@ -590,25 +590,25 @@ const Xt = async (e, n, t) => {
|
|
|
590
590
|
placement: s,
|
|
591
591
|
rects: r,
|
|
592
592
|
platform: a,
|
|
593
|
-
elements:
|
|
594
|
-
middlewareData:
|
|
593
|
+
elements: u,
|
|
594
|
+
middlewareData: c
|
|
595
595
|
} = n, {
|
|
596
|
-
element:
|
|
597
|
-
padding:
|
|
596
|
+
element: f,
|
|
597
|
+
padding: d = 0
|
|
598
598
|
} = pe(e, n) || {};
|
|
599
|
-
if (
|
|
599
|
+
if (f == null)
|
|
600
600
|
return {};
|
|
601
|
-
const
|
|
601
|
+
const i = it(d), m = {
|
|
602
602
|
x: t,
|
|
603
603
|
y: o
|
|
604
|
-
},
|
|
604
|
+
}, l = qe(s), h = He(l), b = await a.getDimensions(f), y = l === "y", w = y ? "top" : "left", C = y ? "bottom" : "right", x = y ? "clientHeight" : "clientWidth", $ = r.reference[h] + r.reference[l] - m[l] - r.floating[h], B = m[l] - r.reference[l], O = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(f));
|
|
605
605
|
let A = O ? O[x] : 0;
|
|
606
|
-
(!A || !await (a.isElement == null ? void 0 : a.isElement(O))) && (A =
|
|
607
|
-
const z = $ / 2 - B / 2, M = A / 2 - h
|
|
606
|
+
(!A || !await (a.isElement == null ? void 0 : a.isElement(O))) && (A = u.floating[x] || r.floating[h]);
|
|
607
|
+
const z = $ / 2 - B / 2, M = A / 2 - b[h] / 2 - 1, W = ae(i[w], M), Y = ae(i[C], M), U = W, p = A - b[h] - Y, L = A / 2 - b[h] / 2 + z, V = Pe(U, L, p), P = !c.arrow && ye(s) != null && L !== V && r.reference[h] / 2 - (L < U ? W : Y) - b[h] / 2 < 0, H = P ? L < U ? L - U : L - p : 0;
|
|
608
608
|
return {
|
|
609
|
-
[
|
|
609
|
+
[l]: m[l] + H,
|
|
610
610
|
data: {
|
|
611
|
-
[
|
|
611
|
+
[l]: V,
|
|
612
612
|
centerOffset: L - V - H,
|
|
613
613
|
...P && {
|
|
614
614
|
alignmentOffset: H
|
|
@@ -627,25 +627,25 @@ const Xt = async (e, n, t) => {
|
|
|
627
627
|
placement: s,
|
|
628
628
|
middlewareData: r,
|
|
629
629
|
rects: a,
|
|
630
|
-
initialPlacement:
|
|
631
|
-
platform:
|
|
632
|
-
elements:
|
|
630
|
+
initialPlacement: u,
|
|
631
|
+
platform: c,
|
|
632
|
+
elements: f
|
|
633
633
|
} = n, {
|
|
634
|
-
mainAxis:
|
|
635
|
-
crossAxis:
|
|
636
|
-
fallbackPlacements:
|
|
637
|
-
fallbackStrategy:
|
|
638
|
-
fallbackAxisSideDirection:
|
|
639
|
-
flipAlignment:
|
|
634
|
+
mainAxis: d = !0,
|
|
635
|
+
crossAxis: i = !0,
|
|
636
|
+
fallbackPlacements: m,
|
|
637
|
+
fallbackStrategy: l = "bestFit",
|
|
638
|
+
fallbackAxisSideDirection: h = "none",
|
|
639
|
+
flipAlignment: b = !0,
|
|
640
640
|
...y
|
|
641
641
|
} = pe(e, n);
|
|
642
642
|
if ((t = r.arrow) != null && t.alignmentOffset)
|
|
643
643
|
return {};
|
|
644
|
-
const w = le(s), C = ne(
|
|
645
|
-
!
|
|
646
|
-
const A = [
|
|
644
|
+
const w = le(s), C = ne(u), x = le(u) === u, $ = await (c.isRTL == null ? void 0 : c.isRTL(f.floating)), B = m || (x || !b ? [Ee(u)] : It(u)), O = h !== "none";
|
|
645
|
+
!m && O && B.push(...qt(u, b, h, $));
|
|
646
|
+
const A = [u, ...B], z = await c.detectOverflow(n, y), M = [];
|
|
647
647
|
let W = ((o = r.flip) == null ? void 0 : o.overflows) || [];
|
|
648
|
-
if (
|
|
648
|
+
if (d && M.push(z[w]), i) {
|
|
649
649
|
const L = Pt(s, a, $);
|
|
650
650
|
M.push(z[L[0]], z[L[1]]);
|
|
651
651
|
}
|
|
@@ -655,7 +655,7 @@ const Xt = async (e, n, t) => {
|
|
|
655
655
|
}], !M.every((L) => L <= 0)) {
|
|
656
656
|
var Y, U;
|
|
657
657
|
const L = (((Y = r.flip) == null ? void 0 : Y.index) || 0) + 1, V = A[L];
|
|
658
|
-
if (V && (!(
|
|
658
|
+
if (V && (!(i === "alignment" ? C !== ne(V) : !1) || // We leave the current main axis only if every placement on that axis
|
|
659
659
|
// overflows the main axis.
|
|
660
660
|
W.every((G) => ne(G.placement) === C ? G.overflows[0] > 0 : !0)))
|
|
661
661
|
return {
|
|
@@ -669,7 +669,7 @@ const Xt = async (e, n, t) => {
|
|
|
669
669
|
};
|
|
670
670
|
let P = (U = W.filter((H) => H.overflows[0] <= 0).sort((H, G) => H.overflows[1] - G.overflows[1])[0]) == null ? void 0 : U.placement;
|
|
671
671
|
if (!P)
|
|
672
|
-
switch (
|
|
672
|
+
switch (l) {
|
|
673
673
|
case "bestFit": {
|
|
674
674
|
var p;
|
|
675
675
|
const H = (p = W.filter((G) => {
|
|
@@ -685,7 +685,7 @@ const Xt = async (e, n, t) => {
|
|
|
685
685
|
break;
|
|
686
686
|
}
|
|
687
687
|
case "initialPlacement":
|
|
688
|
-
P =
|
|
688
|
+
P = u;
|
|
689
689
|
break;
|
|
690
690
|
}
|
|
691
691
|
if (s !== P)
|
|
@@ -704,26 +704,26 @@ async function Qt(e, n) {
|
|
|
704
704
|
placement: t,
|
|
705
705
|
platform: o,
|
|
706
706
|
elements: s
|
|
707
|
-
} = e, r = await (o.isRTL == null ? void 0 : o.isRTL(s.floating)), a = le(t),
|
|
707
|
+
} = e, r = await (o.isRTL == null ? void 0 : o.isRTL(s.floating)), a = le(t), u = ye(t), c = ne(t) === "y", f = Jt.has(a) ? -1 : 1, d = r && c ? -1 : 1, i = pe(n, e);
|
|
708
708
|
let {
|
|
709
|
-
mainAxis:
|
|
710
|
-
crossAxis:
|
|
711
|
-
alignmentAxis:
|
|
712
|
-
} = typeof
|
|
713
|
-
mainAxis:
|
|
709
|
+
mainAxis: m,
|
|
710
|
+
crossAxis: l,
|
|
711
|
+
alignmentAxis: h
|
|
712
|
+
} = typeof i == "number" ? {
|
|
713
|
+
mainAxis: i,
|
|
714
714
|
crossAxis: 0,
|
|
715
715
|
alignmentAxis: null
|
|
716
716
|
} : {
|
|
717
|
-
mainAxis:
|
|
718
|
-
crossAxis:
|
|
719
|
-
alignmentAxis:
|
|
717
|
+
mainAxis: i.mainAxis || 0,
|
|
718
|
+
crossAxis: i.crossAxis || 0,
|
|
719
|
+
alignmentAxis: i.alignmentAxis
|
|
720
720
|
};
|
|
721
|
-
return
|
|
722
|
-
x:
|
|
723
|
-
y:
|
|
721
|
+
return u && typeof h == "number" && (l = u === "end" ? h * -1 : h), c ? {
|
|
722
|
+
x: l * d,
|
|
723
|
+
y: m * f
|
|
724
724
|
} : {
|
|
725
|
-
x:
|
|
726
|
-
y:
|
|
725
|
+
x: m * f,
|
|
726
|
+
y: l * d
|
|
727
727
|
};
|
|
728
728
|
}
|
|
729
729
|
const Zt = function(e) {
|
|
@@ -736,13 +736,13 @@ const Zt = function(e) {
|
|
|
736
736
|
x: s,
|
|
737
737
|
y: r,
|
|
738
738
|
placement: a,
|
|
739
|
-
middlewareData:
|
|
740
|
-
} = n,
|
|
741
|
-
return a === ((t =
|
|
742
|
-
x: s +
|
|
743
|
-
y: r +
|
|
739
|
+
middlewareData: u
|
|
740
|
+
} = n, c = await Qt(n, e);
|
|
741
|
+
return a === ((t = u.offset) == null ? void 0 : t.placement) && (o = u.arrow) != null && o.alignmentOffset ? {} : {
|
|
742
|
+
x: s + c.x,
|
|
743
|
+
y: r + c.y,
|
|
744
744
|
data: {
|
|
745
|
-
...
|
|
745
|
+
...c,
|
|
746
746
|
placement: a
|
|
747
747
|
}
|
|
748
748
|
};
|
|
@@ -760,8 +760,8 @@ const Zt = function(e) {
|
|
|
760
760
|
platform: r
|
|
761
761
|
} = n, {
|
|
762
762
|
mainAxis: a = !0,
|
|
763
|
-
crossAxis:
|
|
764
|
-
limiter:
|
|
763
|
+
crossAxis: u = !1,
|
|
764
|
+
limiter: c = {
|
|
765
765
|
fn: (w) => {
|
|
766
766
|
let {
|
|
767
767
|
x: C,
|
|
@@ -773,24 +773,24 @@ const Zt = function(e) {
|
|
|
773
773
|
};
|
|
774
774
|
}
|
|
775
775
|
},
|
|
776
|
-
...
|
|
777
|
-
} = pe(e, n),
|
|
776
|
+
...f
|
|
777
|
+
} = pe(e, n), d = {
|
|
778
778
|
x: t,
|
|
779
779
|
y: o
|
|
780
|
-
},
|
|
781
|
-
let
|
|
780
|
+
}, i = await r.detectOverflow(n, f), m = ne(le(s)), l = lt(m);
|
|
781
|
+
let h = d[l], b = d[m];
|
|
782
782
|
if (a) {
|
|
783
|
-
const w =
|
|
784
|
-
m = Pe(x, m, $);
|
|
785
|
-
}
|
|
786
|
-
if (d) {
|
|
787
|
-
const w = f === "y" ? "top" : "left", C = f === "y" ? "bottom" : "right", x = h + l[w], $ = h - l[C];
|
|
783
|
+
const w = l === "y" ? "top" : "left", C = l === "y" ? "bottom" : "right", x = h + i[w], $ = h - i[C];
|
|
788
784
|
h = Pe(x, h, $);
|
|
789
785
|
}
|
|
790
|
-
|
|
786
|
+
if (u) {
|
|
787
|
+
const w = m === "y" ? "top" : "left", C = m === "y" ? "bottom" : "right", x = b + i[w], $ = b - i[C];
|
|
788
|
+
b = Pe(x, b, $);
|
|
789
|
+
}
|
|
790
|
+
const y = c.fn({
|
|
791
791
|
...n,
|
|
792
|
-
[
|
|
793
|
-
[
|
|
792
|
+
[l]: h,
|
|
793
|
+
[m]: b
|
|
794
794
|
});
|
|
795
795
|
return {
|
|
796
796
|
...y,
|
|
@@ -798,8 +798,8 @@ const Zt = function(e) {
|
|
|
798
798
|
x: y.x - t,
|
|
799
799
|
y: y.y - o,
|
|
800
800
|
enabled: {
|
|
801
|
-
[
|
|
802
|
-
[
|
|
801
|
+
[l]: a,
|
|
802
|
+
[m]: u
|
|
803
803
|
}
|
|
804
804
|
}
|
|
805
805
|
};
|
|
@@ -815,30 +815,30 @@ const Zt = function(e) {
|
|
|
815
815
|
placement: s,
|
|
816
816
|
rects: r,
|
|
817
817
|
platform: a,
|
|
818
|
-
elements:
|
|
818
|
+
elements: u
|
|
819
819
|
} = n, {
|
|
820
|
-
apply:
|
|
820
|
+
apply: c = () => {
|
|
821
821
|
},
|
|
822
|
-
...
|
|
823
|
-
} = pe(e, n),
|
|
824
|
-
width:
|
|
825
|
-
height:
|
|
822
|
+
...f
|
|
823
|
+
} = pe(e, n), d = await a.detectOverflow(n, f), i = le(s), m = ye(s), l = ne(s) === "y", {
|
|
824
|
+
width: h,
|
|
825
|
+
height: b
|
|
826
826
|
} = r.floating;
|
|
827
827
|
let y, w;
|
|
828
|
-
|
|
829
|
-
const C =
|
|
828
|
+
i === "top" || i === "bottom" ? (y = i, w = m === (await (a.isRTL == null ? void 0 : a.isRTL(u.floating)) ? "start" : "end") ? "left" : "right") : (w = i, y = m === "end" ? "top" : "bottom");
|
|
829
|
+
const C = b - d.top - d.bottom, x = h - d.left - d.right, $ = ae(b - d[y], C), B = ae(h - d[w], x), O = !n.middlewareData.shift;
|
|
830
830
|
let A = $, z = B;
|
|
831
|
-
if ((t = n.middlewareData.shift) != null && t.enabled.x && (z = x), (o = n.middlewareData.shift) != null && o.enabled.y && (A = C), O && !
|
|
832
|
-
const W = q(
|
|
833
|
-
|
|
831
|
+
if ((t = n.middlewareData.shift) != null && t.enabled.x && (z = x), (o = n.middlewareData.shift) != null && o.enabled.y && (A = C), O && !m) {
|
|
832
|
+
const W = q(d.left, 0), Y = q(d.right, 0), U = q(d.top, 0), p = q(d.bottom, 0);
|
|
833
|
+
l ? z = h - 2 * (W !== 0 || Y !== 0 ? W + Y : q(d.left, d.right)) : A = b - 2 * (U !== 0 || p !== 0 ? U + p : q(d.top, d.bottom));
|
|
834
834
|
}
|
|
835
|
-
await
|
|
835
|
+
await c({
|
|
836
836
|
...n,
|
|
837
837
|
availableWidth: z,
|
|
838
838
|
availableHeight: A
|
|
839
839
|
});
|
|
840
|
-
const M = await a.getDimensions(
|
|
841
|
-
return
|
|
840
|
+
const M = await a.getDimensions(u.floating);
|
|
841
|
+
return h !== M.width || b !== M.height ? {
|
|
842
842
|
reset: {
|
|
843
843
|
rects: !0
|
|
844
844
|
}
|
|
@@ -952,8 +952,8 @@ function ke(e, n, t) {
|
|
|
952
952
|
n === void 0 && (n = []), t === void 0 && (t = !0);
|
|
953
953
|
const s = ct(e), r = s === ((o = e.ownerDocument) == null ? void 0 : o.body), a = K(s);
|
|
954
954
|
if (r) {
|
|
955
|
-
const
|
|
956
|
-
return n.concat(a, a.visualViewport || [], Fe(s) ? s : [],
|
|
955
|
+
const u = Ne(a);
|
|
956
|
+
return n.concat(a, a.visualViewport || [], Fe(s) ? s : [], u && t ? ke(u) : []);
|
|
957
957
|
}
|
|
958
958
|
return n.concat(s, ke(s, [], t));
|
|
959
959
|
}
|
|
@@ -963,11 +963,11 @@ function Ne(e) {
|
|
|
963
963
|
function dt(e) {
|
|
964
964
|
const n = Q(e);
|
|
965
965
|
let t = parseFloat(n.width) || 0, o = parseFloat(n.height) || 0;
|
|
966
|
-
const s = ee(e), r = s ? e.offsetWidth : t, a = s ? e.offsetHeight : o,
|
|
967
|
-
return
|
|
966
|
+
const s = ee(e), r = s ? e.offsetWidth : t, a = s ? e.offsetHeight : o, u = De(t) !== r || De(o) !== a;
|
|
967
|
+
return u && (t = r, o = a), {
|
|
968
968
|
width: t,
|
|
969
969
|
height: o,
|
|
970
|
-
$:
|
|
970
|
+
$: u
|
|
971
971
|
};
|
|
972
972
|
}
|
|
973
973
|
function Ye(e) {
|
|
@@ -982,10 +982,10 @@ function ge(e) {
|
|
|
982
982
|
height: s,
|
|
983
983
|
$: r
|
|
984
984
|
} = dt(n);
|
|
985
|
-
let a = (r ? De(t.width) : t.width) / o,
|
|
986
|
-
return (!a || !Number.isFinite(a)) && (a = 1), (!
|
|
985
|
+
let a = (r ? De(t.width) : t.width) / o, u = (r ? De(t.height) : t.height) / s;
|
|
986
|
+
return (!a || !Number.isFinite(a)) && (a = 1), (!u || !Number.isFinite(u)) && (u = 1), {
|
|
987
987
|
x: a,
|
|
988
|
-
y:
|
|
988
|
+
y: u
|
|
989
989
|
};
|
|
990
990
|
}
|
|
991
991
|
const un = /* @__PURE__ */ Z(0);
|
|
@@ -1004,21 +1004,21 @@ function ce(e, n, t, o) {
|
|
|
1004
1004
|
const s = e.getBoundingClientRect(), r = Ye(e);
|
|
1005
1005
|
let a = Z(1);
|
|
1006
1006
|
n && (o ? J(o) && (a = ge(o)) : a = ge(e));
|
|
1007
|
-
const
|
|
1008
|
-
let
|
|
1007
|
+
const u = fn(r, t, o) ? ut(r) : Z(0);
|
|
1008
|
+
let c = (s.left + u.x) / a.x, f = (s.top + u.y) / a.y, d = s.width / a.x, i = s.height / a.y;
|
|
1009
1009
|
if (r) {
|
|
1010
|
-
const
|
|
1011
|
-
let
|
|
1012
|
-
for (;
|
|
1013
|
-
const y = ge(
|
|
1014
|
-
|
|
1010
|
+
const m = K(r), l = o && J(o) ? K(o) : o;
|
|
1011
|
+
let h = m, b = Ne(h);
|
|
1012
|
+
for (; b && o && l !== h; ) {
|
|
1013
|
+
const y = ge(b), w = b.getBoundingClientRect(), C = Q(b), x = w.left + (b.clientLeft + parseFloat(C.paddingLeft)) * y.x, $ = w.top + (b.clientTop + parseFloat(C.paddingTop)) * y.y;
|
|
1014
|
+
c *= y.x, f *= y.y, d *= y.x, i *= y.y, c += x, f += $, h = K(b), b = Ne(h);
|
|
1015
1015
|
}
|
|
1016
1016
|
}
|
|
1017
1017
|
return Ae({
|
|
1018
|
-
width:
|
|
1019
|
-
height:
|
|
1020
|
-
x:
|
|
1021
|
-
y:
|
|
1018
|
+
width: d,
|
|
1019
|
+
height: i,
|
|
1020
|
+
x: c,
|
|
1021
|
+
y: f
|
|
1022
1022
|
});
|
|
1023
1023
|
}
|
|
1024
1024
|
function ze(e, n) {
|
|
@@ -1039,24 +1039,24 @@ function bn(e) {
|
|
|
1039
1039
|
offsetParent: o,
|
|
1040
1040
|
strategy: s
|
|
1041
1041
|
} = e;
|
|
1042
|
-
const r = s === "fixed", a = te(o),
|
|
1043
|
-
if (o === a ||
|
|
1042
|
+
const r = s === "fixed", a = te(o), u = n ? Ve(n.floating) : !1;
|
|
1043
|
+
if (o === a || u && r)
|
|
1044
1044
|
return t;
|
|
1045
|
-
let
|
|
1045
|
+
let c = {
|
|
1046
1046
|
scrollLeft: 0,
|
|
1047
1047
|
scrollTop: 0
|
|
1048
|
-
},
|
|
1049
|
-
const
|
|
1050
|
-
if ((
|
|
1051
|
-
const
|
|
1052
|
-
|
|
1048
|
+
}, f = Z(1);
|
|
1049
|
+
const d = Z(0), i = ee(o);
|
|
1050
|
+
if ((i || !i && !r) && ((ue(o) !== "body" || Fe(a)) && (c = Se(o)), ee(o))) {
|
|
1051
|
+
const l = ce(o);
|
|
1052
|
+
f = ge(o), d.x = l.x + o.clientLeft, d.y = l.y + o.clientTop;
|
|
1053
1053
|
}
|
|
1054
|
-
const
|
|
1054
|
+
const m = a && !i && !r ? ft(a, c) : Z(0);
|
|
1055
1055
|
return {
|
|
1056
|
-
width: t.width *
|
|
1057
|
-
height: t.height *
|
|
1058
|
-
x: t.x *
|
|
1059
|
-
y: t.y *
|
|
1056
|
+
width: t.width * f.x,
|
|
1057
|
+
height: t.height * f.y,
|
|
1058
|
+
x: t.x * f.x - c.scrollLeft * f.x + d.x + m.x,
|
|
1059
|
+
y: t.y * f.y - c.scrollTop * f.y + d.y + m.y
|
|
1060
1060
|
};
|
|
1061
1061
|
}
|
|
1062
1062
|
function mn(e) {
|
|
@@ -1065,43 +1065,43 @@ function mn(e) {
|
|
|
1065
1065
|
function gn(e) {
|
|
1066
1066
|
const n = te(e), t = Se(e), o = e.ownerDocument.body, s = q(n.scrollWidth, n.clientWidth, o.scrollWidth, o.clientWidth), r = q(n.scrollHeight, n.clientHeight, o.scrollHeight, o.clientHeight);
|
|
1067
1067
|
let a = -t.scrollLeft + ze(e);
|
|
1068
|
-
const
|
|
1068
|
+
const u = -t.scrollTop;
|
|
1069
1069
|
return Q(o).direction === "rtl" && (a += q(n.clientWidth, o.clientWidth) - s), {
|
|
1070
1070
|
width: s,
|
|
1071
1071
|
height: r,
|
|
1072
1072
|
x: a,
|
|
1073
|
-
y:
|
|
1073
|
+
y: u
|
|
1074
1074
|
};
|
|
1075
1075
|
}
|
|
1076
1076
|
const et = 25;
|
|
1077
1077
|
function hn(e, n) {
|
|
1078
1078
|
const t = K(e), o = te(e), s = t.visualViewport;
|
|
1079
|
-
let r = o.clientWidth, a = o.clientHeight,
|
|
1079
|
+
let r = o.clientWidth, a = o.clientHeight, u = 0, c = 0;
|
|
1080
1080
|
if (s) {
|
|
1081
1081
|
r = s.width, a = s.height;
|
|
1082
|
-
const
|
|
1083
|
-
(!
|
|
1082
|
+
const d = Xe();
|
|
1083
|
+
(!d || d && n === "fixed") && (u = s.offsetLeft, c = s.offsetTop);
|
|
1084
1084
|
}
|
|
1085
|
-
const
|
|
1086
|
-
if (
|
|
1087
|
-
const
|
|
1088
|
-
|
|
1089
|
-
} else
|
|
1085
|
+
const f = ze(o);
|
|
1086
|
+
if (f <= 0) {
|
|
1087
|
+
const d = o.ownerDocument, i = d.body, m = getComputedStyle(i), l = d.compatMode === "CSS1Compat" && parseFloat(m.marginLeft) + parseFloat(m.marginRight) || 0, h = Math.abs(o.clientWidth - i.clientWidth - l);
|
|
1088
|
+
h <= et && (r -= h);
|
|
1089
|
+
} else f <= et && (r += f);
|
|
1090
1090
|
return {
|
|
1091
1091
|
width: r,
|
|
1092
1092
|
height: a,
|
|
1093
|
-
x:
|
|
1094
|
-
y:
|
|
1093
|
+
x: u,
|
|
1094
|
+
y: c
|
|
1095
1095
|
};
|
|
1096
1096
|
}
|
|
1097
1097
|
const vn = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
1098
1098
|
function pn(e, n) {
|
|
1099
|
-
const t = ce(e, !0, n === "fixed"), o = t.top + e.clientTop, s = t.left + e.clientLeft, r = ee(e) ? ge(e) : Z(1), a = e.clientWidth * r.x,
|
|
1099
|
+
const t = ce(e, !0, n === "fixed"), o = t.top + e.clientTop, s = t.left + e.clientLeft, r = ee(e) ? ge(e) : Z(1), a = e.clientWidth * r.x, u = e.clientHeight * r.y, c = s * r.x, f = o * r.y;
|
|
1100
1100
|
return {
|
|
1101
1101
|
width: a,
|
|
1102
|
-
height:
|
|
1103
|
-
x:
|
|
1104
|
-
y:
|
|
1102
|
+
height: u,
|
|
1103
|
+
x: c,
|
|
1104
|
+
y: f
|
|
1105
1105
|
};
|
|
1106
1106
|
}
|
|
1107
1107
|
function tt(e, n, t) {
|
|
@@ -1131,12 +1131,12 @@ function yn(e, n) {
|
|
|
1131
1131
|
const t = n.get(e);
|
|
1132
1132
|
if (t)
|
|
1133
1133
|
return t;
|
|
1134
|
-
let o = ke(e, [], !1).filter((
|
|
1134
|
+
let o = ke(e, [], !1).filter((u) => J(u) && ue(u) !== "body"), s = null;
|
|
1135
1135
|
const r = Q(e).position === "fixed";
|
|
1136
1136
|
let a = r ? ie(e) : e;
|
|
1137
1137
|
for (; J(a) && !ve(a); ) {
|
|
1138
|
-
const
|
|
1139
|
-
!
|
|
1138
|
+
const u = Q(a), c = Ue(a);
|
|
1139
|
+
!c && u.position === "fixed" && (s = null), (r ? !c && !s : !c && u.position === "static" && !!s && vn.has(s.position) || Fe(a) && !c && bt(e, a)) ? o = o.filter((d) => d !== a) : s = u, a = ie(a);
|
|
1140
1140
|
}
|
|
1141
1141
|
return n.set(e, o), o;
|
|
1142
1142
|
}
|
|
@@ -1147,15 +1147,15 @@ function xn(e) {
|
|
|
1147
1147
|
rootBoundary: o,
|
|
1148
1148
|
strategy: s
|
|
1149
1149
|
} = e;
|
|
1150
|
-
const a = [...t === "clippingAncestors" ? Ve(n) ? [] : yn(n, this._c) : [].concat(t), o],
|
|
1151
|
-
const
|
|
1152
|
-
return
|
|
1153
|
-
}, tt(n,
|
|
1150
|
+
const a = [...t === "clippingAncestors" ? Ve(n) ? [] : yn(n, this._c) : [].concat(t), o], u = a[0], c = a.reduce((f, d) => {
|
|
1151
|
+
const i = tt(n, d, s);
|
|
1152
|
+
return f.top = q(i.top, f.top), f.right = ae(i.right, f.right), f.bottom = ae(i.bottom, f.bottom), f.left = q(i.left, f.left), f;
|
|
1153
|
+
}, tt(n, u, s));
|
|
1154
1154
|
return {
|
|
1155
|
-
width:
|
|
1156
|
-
height:
|
|
1157
|
-
x:
|
|
1158
|
-
y:
|
|
1155
|
+
width: c.right - c.left,
|
|
1156
|
+
height: c.bottom - c.top,
|
|
1157
|
+
x: c.left,
|
|
1158
|
+
y: c.top
|
|
1159
1159
|
};
|
|
1160
1160
|
}
|
|
1161
1161
|
function wn(e) {
|
|
@@ -1170,24 +1170,24 @@ function wn(e) {
|
|
|
1170
1170
|
}
|
|
1171
1171
|
function kn(e, n, t) {
|
|
1172
1172
|
const o = ee(n), s = te(n), r = t === "fixed", a = ce(e, !0, r, n);
|
|
1173
|
-
let
|
|
1173
|
+
let u = {
|
|
1174
1174
|
scrollLeft: 0,
|
|
1175
1175
|
scrollTop: 0
|
|
1176
1176
|
};
|
|
1177
|
-
const
|
|
1178
|
-
function
|
|
1179
|
-
|
|
1177
|
+
const c = Z(0);
|
|
1178
|
+
function f() {
|
|
1179
|
+
c.x = ze(s);
|
|
1180
1180
|
}
|
|
1181
1181
|
if (o || !o && !r)
|
|
1182
|
-
if ((ue(n) !== "body" || Fe(s)) && (
|
|
1183
|
-
const
|
|
1184
|
-
|
|
1185
|
-
} else s &&
|
|
1186
|
-
r && !o && s &&
|
|
1187
|
-
const
|
|
1182
|
+
if ((ue(n) !== "body" || Fe(s)) && (u = Se(n)), o) {
|
|
1183
|
+
const l = ce(n, !0, r, n);
|
|
1184
|
+
c.x = l.x + n.clientLeft, c.y = l.y + n.clientTop;
|
|
1185
|
+
} else s && f();
|
|
1186
|
+
r && !o && s && f();
|
|
1187
|
+
const d = s && !o && !r ? ft(s, u) : Z(0), i = a.left + u.scrollLeft - c.x - d.x, m = a.top + u.scrollTop - c.y - d.y;
|
|
1188
1188
|
return {
|
|
1189
|
-
x:
|
|
1190
|
-
y:
|
|
1189
|
+
x: i,
|
|
1190
|
+
y: m,
|
|
1191
1191
|
width: a.width,
|
|
1192
1192
|
height: a.height
|
|
1193
1193
|
};
|
|
@@ -1255,34 +1255,34 @@ function Dn(e, n) {
|
|
|
1255
1255
|
let t = null, o;
|
|
1256
1256
|
const s = te(e);
|
|
1257
1257
|
function r() {
|
|
1258
|
-
var
|
|
1259
|
-
clearTimeout(o), (
|
|
1258
|
+
var u;
|
|
1259
|
+
clearTimeout(o), (u = t) == null || u.disconnect(), t = null;
|
|
1260
1260
|
}
|
|
1261
|
-
function a(
|
|
1262
|
-
|
|
1263
|
-
const
|
|
1264
|
-
left:
|
|
1265
|
-
top:
|
|
1266
|
-
width:
|
|
1267
|
-
height:
|
|
1268
|
-
} =
|
|
1269
|
-
if (
|
|
1261
|
+
function a(u, c) {
|
|
1262
|
+
u === void 0 && (u = !1), c === void 0 && (c = 1), r();
|
|
1263
|
+
const f = e.getBoundingClientRect(), {
|
|
1264
|
+
left: d,
|
|
1265
|
+
top: i,
|
|
1266
|
+
width: m,
|
|
1267
|
+
height: l
|
|
1268
|
+
} = f;
|
|
1269
|
+
if (u || n(), !m || !l)
|
|
1270
1270
|
return;
|
|
1271
|
-
const
|
|
1272
|
-
rootMargin: -
|
|
1273
|
-
threshold: q(0, ae(1,
|
|
1271
|
+
const h = Ce(i), b = Ce(s.clientWidth - (d + m)), y = Ce(s.clientHeight - (i + l)), w = Ce(d), x = {
|
|
1272
|
+
rootMargin: -h + "px " + -b + "px " + -y + "px " + -w + "px",
|
|
1273
|
+
threshold: q(0, ae(1, c)) || 1
|
|
1274
1274
|
};
|
|
1275
1275
|
let $ = !0;
|
|
1276
1276
|
function B(O) {
|
|
1277
1277
|
const A = O[0].intersectionRatio;
|
|
1278
|
-
if (A !==
|
|
1278
|
+
if (A !== c) {
|
|
1279
1279
|
if (!$)
|
|
1280
1280
|
return a();
|
|
1281
1281
|
A ? a(!1, A) : o = setTimeout(() => {
|
|
1282
1282
|
a(!1, 1e-7);
|
|
1283
1283
|
}, 1e3);
|
|
1284
1284
|
}
|
|
1285
|
-
A === 1 && !gt(
|
|
1285
|
+
A === 1 && !gt(f, e.getBoundingClientRect()) && a(), $ = !1;
|
|
1286
1286
|
}
|
|
1287
1287
|
try {
|
|
1288
1288
|
t = new IntersectionObserver(B, {
|
|
@@ -1303,34 +1303,34 @@ function En(e, n, t, o) {
|
|
|
1303
1303
|
ancestorScroll: s = !0,
|
|
1304
1304
|
ancestorResize: r = !0,
|
|
1305
1305
|
elementResize: a = typeof ResizeObserver == "function",
|
|
1306
|
-
layoutShift:
|
|
1307
|
-
animationFrame:
|
|
1308
|
-
} = o,
|
|
1309
|
-
|
|
1306
|
+
layoutShift: u = typeof IntersectionObserver == "function",
|
|
1307
|
+
animationFrame: c = !1
|
|
1308
|
+
} = o, f = Ye(e), d = s || r ? [...f ? ke(f) : [], ...ke(n)] : [];
|
|
1309
|
+
d.forEach((w) => {
|
|
1310
1310
|
s && w.addEventListener("scroll", t, {
|
|
1311
1311
|
passive: !0
|
|
1312
1312
|
}), r && w.addEventListener("resize", t);
|
|
1313
1313
|
});
|
|
1314
|
-
const
|
|
1315
|
-
let
|
|
1316
|
-
a && (
|
|
1314
|
+
const i = f && u ? Dn(f, t) : null;
|
|
1315
|
+
let m = -1, l = null;
|
|
1316
|
+
a && (l = new ResizeObserver((w) => {
|
|
1317
1317
|
let [C] = w;
|
|
1318
|
-
C && C.target ===
|
|
1318
|
+
C && C.target === f && l && (l.unobserve(n), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
|
|
1319
1319
|
var x;
|
|
1320
|
-
(x =
|
|
1320
|
+
(x = l) == null || x.observe(n);
|
|
1321
1321
|
})), t();
|
|
1322
|
-
}),
|
|
1323
|
-
let
|
|
1324
|
-
|
|
1322
|
+
}), f && !c && l.observe(f), l.observe(n));
|
|
1323
|
+
let h, b = c ? ce(e) : null;
|
|
1324
|
+
c && y();
|
|
1325
1325
|
function y() {
|
|
1326
1326
|
const w = ce(e);
|
|
1327
|
-
|
|
1327
|
+
b && !gt(b, w) && t(), b = w, h = requestAnimationFrame(y);
|
|
1328
1328
|
}
|
|
1329
1329
|
return t(), () => {
|
|
1330
1330
|
var w;
|
|
1331
|
-
|
|
1331
|
+
d.forEach((C) => {
|
|
1332
1332
|
s && C.removeEventListener("scroll", t), r && C.removeEventListener("resize", t);
|
|
1333
|
-
}),
|
|
1333
|
+
}), i == null || i(), (w = l) == null || w.disconnect(), l = null, c && cancelAnimationFrame(h);
|
|
1334
1334
|
};
|
|
1335
1335
|
}
|
|
1336
1336
|
const ht = Zt, vt = _t, pt = Gt, An = en, Bn = Yt, Tn = (e, n, t) => {
|
|
@@ -1387,44 +1387,44 @@ function xt(e, n, t) {
|
|
|
1387
1387
|
}), r = k(() => me(t.middleware)), a = k(() => {
|
|
1388
1388
|
var A;
|
|
1389
1389
|
return (A = me(t.placement)) != null ? A : "bottom";
|
|
1390
|
-
}),
|
|
1390
|
+
}), u = k(() => {
|
|
1391
1391
|
var A;
|
|
1392
1392
|
return (A = me(t.strategy)) != null ? A : "absolute";
|
|
1393
|
-
}),
|
|
1393
|
+
}), c = k(() => {
|
|
1394
1394
|
var A;
|
|
1395
1395
|
return (A = me(t.transform)) != null ? A : !0;
|
|
1396
|
-
}),
|
|
1396
|
+
}), f = k(() => We(e.value)), d = k(() => We(n.value)), i = j(0), m = j(0), l = j(u.value), h = j(a.value), b = Ft({}), y = j(!1), w = k(() => {
|
|
1397
1397
|
const A = {
|
|
1398
|
-
position:
|
|
1398
|
+
position: l.value,
|
|
1399
1399
|
left: "0",
|
|
1400
1400
|
top: "0"
|
|
1401
1401
|
};
|
|
1402
|
-
if (!
|
|
1402
|
+
if (!d.value)
|
|
1403
1403
|
return A;
|
|
1404
|
-
const z = ot(
|
|
1405
|
-
return
|
|
1404
|
+
const z = ot(d.value, i.value), M = ot(d.value, m.value);
|
|
1405
|
+
return c.value ? {
|
|
1406
1406
|
...A,
|
|
1407
1407
|
transform: "translate(" + z + "px, " + M + "px)",
|
|
1408
|
-
...yt(
|
|
1408
|
+
...yt(d.value) >= 1.5 && {
|
|
1409
1409
|
willChange: "transform"
|
|
1410
1410
|
}
|
|
1411
1411
|
} : {
|
|
1412
|
-
position:
|
|
1412
|
+
position: l.value,
|
|
1413
1413
|
left: z + "px",
|
|
1414
1414
|
top: M + "px"
|
|
1415
1415
|
};
|
|
1416
1416
|
});
|
|
1417
1417
|
let C;
|
|
1418
1418
|
function x() {
|
|
1419
|
-
if (
|
|
1419
|
+
if (f.value == null || d.value == null)
|
|
1420
1420
|
return;
|
|
1421
1421
|
const A = s.value;
|
|
1422
|
-
Tn(
|
|
1422
|
+
Tn(f.value, d.value, {
|
|
1423
1423
|
middleware: r.value,
|
|
1424
1424
|
placement: a.value,
|
|
1425
|
-
strategy:
|
|
1425
|
+
strategy: u.value
|
|
1426
1426
|
}).then((z) => {
|
|
1427
|
-
|
|
1427
|
+
i.value = z.x, m.value = z.y, l.value = z.strategy, h.value = z.placement, b.value = z.middlewareData, y.value = A !== !1;
|
|
1428
1428
|
});
|
|
1429
1429
|
}
|
|
1430
1430
|
function $() {
|
|
@@ -1435,26 +1435,26 @@ function xt(e, n, t) {
|
|
|
1435
1435
|
x();
|
|
1436
1436
|
return;
|
|
1437
1437
|
}
|
|
1438
|
-
if (
|
|
1439
|
-
C = o(
|
|
1438
|
+
if (f.value != null && d.value != null) {
|
|
1439
|
+
C = o(f.value, d.value, x);
|
|
1440
1440
|
return;
|
|
1441
1441
|
}
|
|
1442
1442
|
}
|
|
1443
1443
|
function O() {
|
|
1444
1444
|
s.value || (y.value = !1);
|
|
1445
1445
|
}
|
|
1446
|
-
return we([r, a,
|
|
1446
|
+
return we([r, a, u, s], x, {
|
|
1447
1447
|
flush: "sync"
|
|
1448
|
-
}), we([
|
|
1448
|
+
}), we([f, d], B, {
|
|
1449
1449
|
flush: "sync"
|
|
1450
1450
|
}), we(s, O, {
|
|
1451
1451
|
flush: "sync"
|
|
1452
1452
|
}), Ct() && $t($), {
|
|
1453
|
-
x: be(
|
|
1454
|
-
y: be(
|
|
1455
|
-
strategy: be(
|
|
1456
|
-
placement: be(
|
|
1457
|
-
middlewareData: be(
|
|
1453
|
+
x: be(i),
|
|
1454
|
+
y: be(m),
|
|
1455
|
+
strategy: be(l),
|
|
1456
|
+
placement: be(h),
|
|
1457
|
+
middlewareData: be(b),
|
|
1458
1458
|
isPositioned: be(y),
|
|
1459
1459
|
floatingStyles: w,
|
|
1460
1460
|
update: x
|
|
@@ -1604,10 +1604,10 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
1604
1604
|
},
|
|
1605
1605
|
emits: ["update:modelValue", "change"],
|
|
1606
1606
|
setup(e, { emit: n }) {
|
|
1607
|
-
const t = e, o = n, s = j(), r = j(), a = j(!1),
|
|
1608
|
-
if (!(!a.value ||
|
|
1609
|
-
return c
|
|
1610
|
-
}),
|
|
1607
|
+
const t = e, o = n, s = j(), r = j(), a = j(!1), u = fe("listbox"), c = j(-1), f = k(() => {
|
|
1608
|
+
if (!(!a.value || c.value < 0))
|
|
1609
|
+
return d(c.value);
|
|
1610
|
+
}), d = (p) => `${u}-option-${p}`, { floatingStyles: i } = xt(s, r, {
|
|
1611
1611
|
placement: "bottom-start",
|
|
1612
1612
|
middleware: [
|
|
1613
1613
|
ht(4),
|
|
@@ -1622,11 +1622,11 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
1622
1622
|
})
|
|
1623
1623
|
],
|
|
1624
1624
|
whileElementsMounted: En
|
|
1625
|
-
}),
|
|
1625
|
+
}), m = k(() => t.modelValue), l = k(() => t.options.find((p) => b(p) === m.value)), h = k(() => l.value ? y(l.value) : ""), b = (p) => typeof p == "object" && p !== null ? p.value : p, y = (p) => typeof p == "object" && p !== null ? p.label : String(p), w = (p) => typeof p == "object" && p !== null && p.disabled || !1, C = () => {
|
|
1626
1626
|
je(() => {
|
|
1627
1627
|
const p = r.value;
|
|
1628
|
-
if (!p ||
|
|
1629
|
-
const L = p.querySelector(`#${c
|
|
1628
|
+
if (!p || c.value < 0) return;
|
|
1629
|
+
const L = p.querySelector(`#${d(c.value)}`);
|
|
1630
1630
|
L == null || L.scrollIntoView({ block: "nearest" });
|
|
1631
1631
|
});
|
|
1632
1632
|
}, x = (p, L) => {
|
|
@@ -1637,31 +1637,31 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
1637
1637
|
}
|
|
1638
1638
|
return -1;
|
|
1639
1639
|
}, $ = () => {
|
|
1640
|
-
const p = x(
|
|
1641
|
-
p >= 0 && (
|
|
1640
|
+
const p = x(c.value + 1, 1);
|
|
1641
|
+
p >= 0 && (c.value = p, C());
|
|
1642
1642
|
}, B = () => {
|
|
1643
|
-
const p = x(
|
|
1644
|
-
p >= 0 && (
|
|
1643
|
+
const p = x(c.value - 1, -1);
|
|
1644
|
+
p >= 0 && (c.value = p, C());
|
|
1645
1645
|
}, O = () => {
|
|
1646
1646
|
const p = x(0, 1);
|
|
1647
|
-
p >= 0 && (
|
|
1647
|
+
p >= 0 && (c.value = p, C());
|
|
1648
1648
|
}, A = () => {
|
|
1649
1649
|
const p = x(t.options.length - 1, -1);
|
|
1650
|
-
p >= 0 && (
|
|
1650
|
+
p >= 0 && (c.value = p, C());
|
|
1651
1651
|
}, z = () => {
|
|
1652
1652
|
t.disabled || t.loading || (a.value = !0, je(() => {
|
|
1653
1653
|
const p = t.options.findIndex(
|
|
1654
|
-
(L) =>
|
|
1654
|
+
(L) => b(L) === m.value
|
|
1655
1655
|
);
|
|
1656
|
-
p >= 0 && !w(t.options[p]) ?
|
|
1656
|
+
p >= 0 && !w(t.options[p]) ? c.value = p : O(), C();
|
|
1657
1657
|
}));
|
|
1658
1658
|
}, M = () => {
|
|
1659
|
-
a.value = !1,
|
|
1659
|
+
a.value = !1, c.value = -1;
|
|
1660
1660
|
}, W = () => {
|
|
1661
1661
|
t.disabled || t.loading || (a.value ? M() : z());
|
|
1662
1662
|
}, Y = (p) => {
|
|
1663
1663
|
if (w(p)) return;
|
|
1664
|
-
const L =
|
|
1664
|
+
const L = b(p);
|
|
1665
1665
|
o("update:modelValue", L), o("change", L, p), M();
|
|
1666
1666
|
}, U = (p) => {
|
|
1667
1667
|
if (!(t.disabled || t.loading)) {
|
|
@@ -1671,10 +1671,10 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
1671
1671
|
}
|
|
1672
1672
|
switch (p.key) {
|
|
1673
1673
|
case "ArrowDown":
|
|
1674
|
-
p.preventDefault(),
|
|
1674
|
+
p.preventDefault(), c.value < 0 ? O() : $();
|
|
1675
1675
|
break;
|
|
1676
1676
|
case "ArrowUp":
|
|
1677
|
-
p.preventDefault(),
|
|
1677
|
+
p.preventDefault(), c.value < 0 ? A() : B();
|
|
1678
1678
|
break;
|
|
1679
1679
|
case "Home":
|
|
1680
1680
|
p.preventDefault(), O();
|
|
@@ -1684,7 +1684,7 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
1684
1684
|
break;
|
|
1685
1685
|
case "Enter":
|
|
1686
1686
|
case " ":
|
|
1687
|
-
p.preventDefault(),
|
|
1687
|
+
p.preventDefault(), c.value >= 0 && c.value < t.options.length && Y(t.options[c.value]);
|
|
1688
1688
|
break;
|
|
1689
1689
|
case "Escape":
|
|
1690
1690
|
p.preventDefault(), M();
|
|
@@ -1708,15 +1708,15 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
1708
1708
|
fullWidth: e.fullWidth,
|
|
1709
1709
|
role: "combobox",
|
|
1710
1710
|
"aria-expanded": a.value ? "true" : "false",
|
|
1711
|
-
"aria-controls": R(
|
|
1711
|
+
"aria-controls": R(u),
|
|
1712
1712
|
"aria-haspopup": "listbox",
|
|
1713
|
-
"aria-activedescendant":
|
|
1713
|
+
"aria-activedescendant": f.value,
|
|
1714
1714
|
onClick: W,
|
|
1715
1715
|
onKeydown: U
|
|
1716
1716
|
}, {
|
|
1717
1717
|
default: Re(() => [
|
|
1718
1718
|
N(p.$slots, "trigger", {}, () => [
|
|
1719
|
-
X(E(
|
|
1719
|
+
X(E(h.value || e.placeholder), 1)
|
|
1720
1720
|
])
|
|
1721
1721
|
]),
|
|
1722
1722
|
_: 3
|
|
@@ -1726,31 +1726,31 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
1726
1726
|
key: 0,
|
|
1727
1727
|
ref_key: "floatingRef",
|
|
1728
1728
|
ref: r,
|
|
1729
|
-
id: R(
|
|
1729
|
+
id: R(u),
|
|
1730
1730
|
role: "listbox",
|
|
1731
1731
|
"aria-label": e.placeholder,
|
|
1732
|
-
style: he(R(
|
|
1732
|
+
style: he(R(i)),
|
|
1733
1733
|
class: "z-50 min-w-32 bg-bg border border-solid border-border rounded-md shadow-default max-h-64 overflow-y-auto",
|
|
1734
1734
|
onClick: L[0] || (L[0] = Dt(() => {
|
|
1735
1735
|
}, ["stop"]))
|
|
1736
1736
|
}, [
|
|
1737
1737
|
(g(!0), v(se, null, re(e.options, (V, P) => (g(), v("div", {
|
|
1738
|
-
key:
|
|
1739
|
-
id:
|
|
1738
|
+
key: b(V),
|
|
1739
|
+
id: d(P),
|
|
1740
1740
|
role: "option",
|
|
1741
|
-
"aria-selected":
|
|
1741
|
+
"aria-selected": m.value === b(V) ? "true" : "false",
|
|
1742
1742
|
"aria-disabled": w(V) ? "true" : void 0,
|
|
1743
1743
|
class: T([
|
|
1744
1744
|
"px-3 py-2 text-sm transition-colors outline-none",
|
|
1745
1745
|
w(V) ? "opacity-50 cursor-not-allowed" : "cursor-pointer",
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
(
|
|
1746
|
+
m.value === b(V) ? "bg-brand text-brand-on-solid" : "",
|
|
1747
|
+
c.value === P && m.value !== b(V) ? "bg-surface-hover" : "",
|
|
1748
|
+
(c.value !== P && m.value !== b(V), ""),
|
|
1749
1749
|
P === 0 ? "rounded-t-md" : "",
|
|
1750
1750
|
P === e.options.length - 1 ? "rounded-b-md" : ""
|
|
1751
1751
|
]),
|
|
1752
1752
|
onClick: (H) => Y(V),
|
|
1753
|
-
onMouseenter: (H) =>
|
|
1753
|
+
onMouseenter: (H) => c.value = P
|
|
1754
1754
|
}, [
|
|
1755
1755
|
N(p.$slots, "option", {
|
|
1756
1756
|
option: V,
|
|
@@ -1805,10 +1805,10 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
1805
1805
|
},
|
|
1806
1806
|
emits: ["update:modelValue", "blur", "focus", "enter", "clear"],
|
|
1807
1807
|
setup(e, { expose: n, emit: t }) {
|
|
1808
|
-
const o = e, s = t, r = j(null), a = fe("input"),
|
|
1808
|
+
const o = e, s = t, r = j(null), a = fe("input"), u = `${a}-help`, c = `${a}-error`, f = k(() => {
|
|
1809
1809
|
const x = [];
|
|
1810
|
-
return o.helpText && !o.error && x.push(
|
|
1811
|
-
}),
|
|
1810
|
+
return o.helpText && !o.error && x.push(u), o.error && x.push(c), x.length > 0 ? x.join(" ") : void 0;
|
|
1811
|
+
}), d = k(() => o.clearable && m.value && !o.disabled), i = k(() => o.iconRight || o.clearable), m = k(() => o.modelValue == null ? !1 : typeof o.modelValue == "string" ? o.modelValue.length > 0 : !0), l = k(() => {
|
|
1812
1812
|
const x = [
|
|
1813
1813
|
"block",
|
|
1814
1814
|
"w-full",
|
|
@@ -1837,14 +1837,14 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
1837
1837
|
B.text,
|
|
1838
1838
|
B.py,
|
|
1839
1839
|
o.iconLeft ? B.pl : B.px,
|
|
1840
|
-
|
|
1840
|
+
i.value ? B.pr : B.px,
|
|
1841
1841
|
...O
|
|
1842
1842
|
].join(" ");
|
|
1843
|
-
}),
|
|
1843
|
+
}), h = k(() => {
|
|
1844
1844
|
const x = { small: "w-4 h-4", medium: "w-5 h-5", large: "w-6 h-6" }, $ = o.error ? "text-error" : "text-fg-tertiary";
|
|
1845
1845
|
return `${x[o.size]} ${$}`;
|
|
1846
1846
|
});
|
|
1847
|
-
function
|
|
1847
|
+
function b(x) {
|
|
1848
1848
|
const $ = x.target;
|
|
1849
1849
|
if (o.type === "number") {
|
|
1850
1850
|
const B = Number($.value);
|
|
@@ -1876,7 +1876,7 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
1876
1876
|
F("div", Kn, [
|
|
1877
1877
|
e.iconLeft ? (g(), v("div", Un, [
|
|
1878
1878
|
(g(), I($e(e.iconLeft), {
|
|
1879
|
-
class: T(
|
|
1879
|
+
class: T(h.value)
|
|
1880
1880
|
}, null, 8, ["class"]))
|
|
1881
1881
|
])) : D("", !0),
|
|
1882
1882
|
F("input", {
|
|
@@ -1894,20 +1894,20 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
1894
1894
|
min: e.min,
|
|
1895
1895
|
max: e.max,
|
|
1896
1896
|
step: e.step,
|
|
1897
|
-
"aria-describedby":
|
|
1897
|
+
"aria-describedby": f.value,
|
|
1898
1898
|
"aria-invalid": e.error ? "true" : void 0,
|
|
1899
|
-
class: T(
|
|
1900
|
-
onInput:
|
|
1899
|
+
class: T(l.value),
|
|
1900
|
+
onInput: b,
|
|
1901
1901
|
onBlur: $[0] || ($[0] = (B) => x.$emit("blur", B)),
|
|
1902
1902
|
onFocus: $[1] || ($[1] = (B) => x.$emit("focus", B)),
|
|
1903
1903
|
onKeydown: $[2] || ($[2] = st((B) => x.$emit("enter"), ["enter"]))
|
|
1904
1904
|
}, null, 42, Xn),
|
|
1905
|
-
e.iconRight && !
|
|
1905
|
+
e.iconRight && !d.value ? (g(), v("div", Yn, [
|
|
1906
1906
|
(g(), I($e(e.iconRight), {
|
|
1907
|
-
class: T(
|
|
1907
|
+
class: T(h.value)
|
|
1908
1908
|
}, null, 8, ["class"]))
|
|
1909
1909
|
])) : D("", !0),
|
|
1910
|
-
|
|
1910
|
+
d.value ? (g(), v("button", {
|
|
1911
1911
|
key: 2,
|
|
1912
1912
|
type: "button",
|
|
1913
1913
|
"aria-label": "Clear input",
|
|
@@ -1919,12 +1919,12 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
1919
1919
|
]),
|
|
1920
1920
|
e.helpText && !e.error ? (g(), v("div", {
|
|
1921
1921
|
key: 1,
|
|
1922
|
-
id:
|
|
1922
|
+
id: u,
|
|
1923
1923
|
class: "mt-1 text-caption"
|
|
1924
1924
|
}, E(e.helpText), 1)) : D("", !0),
|
|
1925
1925
|
e.error ? (g(), v("div", {
|
|
1926
1926
|
key: 2,
|
|
1927
|
-
id:
|
|
1927
|
+
id: c,
|
|
1928
1928
|
class: "mt-1 text-sm text-error font-sans",
|
|
1929
1929
|
role: "alert",
|
|
1930
1930
|
"aria-live": "polite"
|
|
@@ -1955,7 +1955,7 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
1955
1955
|
small: ["w-4", "h-4", "border-2"],
|
|
1956
1956
|
medium: ["w-6", "h-6", "border-4"],
|
|
1957
1957
|
large: ["w-8", "h-8", "border-6"]
|
|
1958
|
-
},
|
|
1958
|
+
}, u = {
|
|
1959
1959
|
primary: [
|
|
1960
1960
|
"border-brand",
|
|
1961
1961
|
"border-t-transparent"
|
|
@@ -1976,7 +1976,7 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
1976
1976
|
return [
|
|
1977
1977
|
...r,
|
|
1978
1978
|
...a[n.size],
|
|
1979
|
-
...
|
|
1979
|
+
...u[n.variant]
|
|
1980
1980
|
].join(" ");
|
|
1981
1981
|
}), s = k(() => [
|
|
1982
1982
|
{
|
|
@@ -2018,44 +2018,44 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2018
2018
|
setup(e, { emit: n }) {
|
|
2019
2019
|
const t = e, o = n, s = fe("modal-title"), r = j(null);
|
|
2020
2020
|
let a = null;
|
|
2021
|
-
const
|
|
2021
|
+
const u = k(() => `relative z-10 bg-bg rounded-lg shadow-lg w-full ${{
|
|
2022
2022
|
sm: "max-w-sm",
|
|
2023
2023
|
md: "max-w-lg",
|
|
2024
2024
|
lg: "max-w-2xl",
|
|
2025
2025
|
xl: "max-w-4xl"
|
|
2026
2026
|
}[t.size]} max-h-[90vh] flex flex-col`);
|
|
2027
|
-
function
|
|
2027
|
+
function c() {
|
|
2028
2028
|
o("update:modelValue", !1), o("close");
|
|
2029
2029
|
}
|
|
2030
|
-
function
|
|
2031
|
-
t.persistent ||
|
|
2030
|
+
function f() {
|
|
2031
|
+
t.persistent || c();
|
|
2032
2032
|
}
|
|
2033
|
-
function
|
|
2034
|
-
t.persistent ||
|
|
2033
|
+
function d() {
|
|
2034
|
+
t.persistent || c();
|
|
2035
2035
|
}
|
|
2036
|
-
function
|
|
2036
|
+
function i() {
|
|
2037
2037
|
return r.value ? Array.from(
|
|
2038
2038
|
r.value.querySelectorAll(
|
|
2039
2039
|
'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])'
|
|
2040
2040
|
)
|
|
2041
2041
|
) : [];
|
|
2042
2042
|
}
|
|
2043
|
-
function
|
|
2044
|
-
if (
|
|
2045
|
-
const
|
|
2046
|
-
if (
|
|
2047
|
-
const
|
|
2048
|
-
|
|
2043
|
+
function m(l) {
|
|
2044
|
+
if (l.key !== "Tab") return;
|
|
2045
|
+
const h = i();
|
|
2046
|
+
if (h.length === 0) return;
|
|
2047
|
+
const b = h[0], y = h[h.length - 1];
|
|
2048
|
+
l.shiftKey && document.activeElement === b ? (l.preventDefault(), y.focus()) : !l.shiftKey && document.activeElement === y && (l.preventDefault(), b.focus());
|
|
2049
2049
|
}
|
|
2050
2050
|
return we(
|
|
2051
2051
|
() => t.modelValue,
|
|
2052
|
-
async (
|
|
2053
|
-
var
|
|
2054
|
-
|
|
2052
|
+
async (l) => {
|
|
2053
|
+
var h;
|
|
2054
|
+
l ? (a = document.activeElement, document.body.style.overflow = "hidden", document.addEventListener("keydown", m), await je(), (h = r.value) == null || h.focus()) : (document.body.style.overflow = "", document.removeEventListener("keydown", m), a == null || a.focus(), a = null);
|
|
2055
2055
|
}
|
|
2056
2056
|
), rt(() => {
|
|
2057
|
-
document.body.style.overflow = "", document.removeEventListener("keydown",
|
|
2058
|
-
}), (
|
|
2057
|
+
document.body.style.overflow = "", document.removeEventListener("keydown", m);
|
|
2058
|
+
}), (l, h) => (g(), I(Le, { to: "body" }, [
|
|
2059
2059
|
_(at, {
|
|
2060
2060
|
"enter-active-class": "transition-opacity duration-200",
|
|
2061
2061
|
"enter-from-class": "opacity-0",
|
|
@@ -2068,12 +2068,12 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2068
2068
|
e.modelValue ? (g(), v("div", {
|
|
2069
2069
|
key: 0,
|
|
2070
2070
|
class: "fixed inset-0 z-50 flex items-center justify-center p-4",
|
|
2071
|
-
onKeydown: st(
|
|
2071
|
+
onKeydown: st(d, ["escape"])
|
|
2072
2072
|
}, [
|
|
2073
2073
|
F("div", {
|
|
2074
2074
|
class: "absolute inset-0 bg-bg-inverse/50",
|
|
2075
2075
|
"aria-hidden": "true",
|
|
2076
|
-
onClick:
|
|
2076
|
+
onClick: f
|
|
2077
2077
|
}),
|
|
2078
2078
|
F("div", {
|
|
2079
2079
|
ref_key: "panelRef",
|
|
@@ -2081,11 +2081,11 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2081
2081
|
role: "dialog",
|
|
2082
2082
|
"aria-modal": "true",
|
|
2083
2083
|
"aria-labelledby": R(s),
|
|
2084
|
-
class: T(
|
|
2084
|
+
class: T(u.value),
|
|
2085
2085
|
tabindex: "-1"
|
|
2086
2086
|
}, [
|
|
2087
2087
|
F("div", Zn, [
|
|
2088
|
-
N(
|
|
2088
|
+
N(l.$slots, "header", {}, () => [
|
|
2089
2089
|
F("h2", {
|
|
2090
2090
|
id: R(s),
|
|
2091
2091
|
class: "text-heading-lg m-0"
|
|
@@ -2096,16 +2096,16 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2096
2096
|
type: "button",
|
|
2097
2097
|
class: "p-1 rounded-md text-fg-tertiary hover:text-fg hover:bg-surface-hover-light transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand",
|
|
2098
2098
|
"aria-label": "Close dialog",
|
|
2099
|
-
onClick:
|
|
2099
|
+
onClick: c
|
|
2100
2100
|
}, [
|
|
2101
2101
|
_(R(Be), { class: "w-5 h-5" })
|
|
2102
2102
|
])) : D("", !0)
|
|
2103
2103
|
]),
|
|
2104
2104
|
F("div", eo, [
|
|
2105
|
-
N(
|
|
2105
|
+
N(l.$slots, "default")
|
|
2106
2106
|
]),
|
|
2107
|
-
|
|
2108
|
-
N(
|
|
2107
|
+
l.$slots.footer ? (g(), v("div", to, [
|
|
2108
|
+
N(l.$slots, "footer")
|
|
2109
2109
|
])) : D("", !0)
|
|
2110
2110
|
], 10, Qn)
|
|
2111
2111
|
], 32)) : D("", !0)
|
|
@@ -2132,7 +2132,7 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2132
2132
|
medium: { circle: "w-4 h-4", dot: "w-2 h-2", label: "text-sm" },
|
|
2133
2133
|
large: { circle: "w-5 h-5", dot: "w-2.5 h-2.5", label: "text-base" }
|
|
2134
2134
|
}, a = k(() => {
|
|
2135
|
-
const
|
|
2135
|
+
const i = [
|
|
2136
2136
|
r[t.size].circle,
|
|
2137
2137
|
"rounded-full",
|
|
2138
2138
|
"inline-flex items-center justify-center",
|
|
@@ -2140,27 +2140,27 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2140
2140
|
"transition-all duration-150",
|
|
2141
2141
|
"shrink-0"
|
|
2142
2142
|
];
|
|
2143
|
-
return t.disabled ?
|
|
2143
|
+
return t.disabled ? i.push(
|
|
2144
2144
|
s.value ? "bg-bg border-brand-disabled" : "bg-bg-tertiary border-border",
|
|
2145
2145
|
"opacity-60"
|
|
2146
|
-
) : s.value ?
|
|
2146
|
+
) : s.value ? i.push("bg-bg border-brand") : i.push(
|
|
2147
2147
|
"bg-bg border-border-strong",
|
|
2148
2148
|
"group-hover:border-brand",
|
|
2149
2149
|
"peer-focus-visible:ring-2 peer-focus-visible:ring-brand peer-focus-visible:ring-offset-2"
|
|
2150
|
-
),
|
|
2151
|
-
}),
|
|
2152
|
-
const
|
|
2153
|
-
return t.disabled ?
|
|
2154
|
-
}),
|
|
2150
|
+
), i.join(" ");
|
|
2151
|
+
}), u = k(() => {
|
|
2152
|
+
const i = [r[t.size].dot, "rounded-full"];
|
|
2153
|
+
return t.disabled ? i.push("bg-brand-disabled") : i.push("bg-brand"), i.join(" ");
|
|
2154
|
+
}), c = k(() => [
|
|
2155
2155
|
"font-sans select-none",
|
|
2156
2156
|
r[t.size].label,
|
|
2157
2157
|
t.disabled ? "text-fg-disabled" : "text-fg"
|
|
2158
|
-
].join(" ")),
|
|
2158
|
+
].join(" ")), f = (d) => {
|
|
2159
2159
|
if (t.disabled) return;
|
|
2160
|
-
const
|
|
2161
|
-
o("update:modelValue",
|
|
2160
|
+
const i = d.target, m = t.value ?? i.value;
|
|
2161
|
+
o("update:modelValue", m), o("change", m, d);
|
|
2162
2162
|
};
|
|
2163
|
-
return (
|
|
2163
|
+
return (d, i) => (g(), v("label", {
|
|
2164
2164
|
class: T([
|
|
2165
2165
|
"inline-flex items-center gap-2",
|
|
2166
2166
|
e.disabled ? "cursor-not-allowed" : "cursor-pointer",
|
|
@@ -2175,7 +2175,7 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2175
2175
|
disabled: e.disabled,
|
|
2176
2176
|
value: e.value,
|
|
2177
2177
|
class: "sr-only peer",
|
|
2178
|
-
onChange:
|
|
2178
|
+
onChange: f
|
|
2179
2179
|
}, null, 40, no),
|
|
2180
2180
|
F("span", {
|
|
2181
2181
|
class: T(a.value),
|
|
@@ -2183,14 +2183,14 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2183
2183
|
}, [
|
|
2184
2184
|
s.value ? (g(), v("span", {
|
|
2185
2185
|
key: 0,
|
|
2186
|
-
class: T(
|
|
2186
|
+
class: T(u.value)
|
|
2187
2187
|
}, null, 2)) : D("", !0)
|
|
2188
2188
|
], 2),
|
|
2189
|
-
e.label ||
|
|
2189
|
+
e.label || d.$slots.default ? (g(), v("span", {
|
|
2190
2190
|
key: 0,
|
|
2191
|
-
class: T(
|
|
2191
|
+
class: T(c.value)
|
|
2192
2192
|
}, [
|
|
2193
|
-
N(
|
|
2193
|
+
N(d.$slots, "default", {}, () => [
|
|
2194
2194
|
X(E(e.label), 1)
|
|
2195
2195
|
])
|
|
2196
2196
|
], 2)) : D("", !0)
|
|
@@ -2218,11 +2218,11 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2218
2218
|
},
|
|
2219
2219
|
emits: ["update:modelValue", "blur", "focus"],
|
|
2220
2220
|
setup(e, { emit: n }) {
|
|
2221
|
-
const t = e, o = n, s = fe("select"), r = `${s}-help`, a = `${s}-error`,
|
|
2222
|
-
const
|
|
2223
|
-
return t.helpText && !t.error &&
|
|
2224
|
-
}),
|
|
2225
|
-
const
|
|
2221
|
+
const t = e, o = n, s = fe("select"), r = `${s}-help`, a = `${s}-error`, u = k(() => {
|
|
2222
|
+
const d = [];
|
|
2223
|
+
return t.helpText && !t.error && d.push(r), t.error && d.push(a), d.length > 0 ? d.join(" ") : void 0;
|
|
2224
|
+
}), c = k(() => {
|
|
2225
|
+
const d = [
|
|
2226
2226
|
"block",
|
|
2227
2227
|
"w-full",
|
|
2228
2228
|
"rounded-md",
|
|
@@ -2241,17 +2241,17 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2241
2241
|
"font-sans",
|
|
2242
2242
|
"box-border",
|
|
2243
2243
|
"pr-10"
|
|
2244
|
-
],
|
|
2244
|
+
], i = {
|
|
2245
2245
|
small: "px-2 py-1 text-sm",
|
|
2246
2246
|
medium: "px-3 py-2 text-base",
|
|
2247
2247
|
large: "px-4 py-3 text-lg"
|
|
2248
|
-
},
|
|
2249
|
-
return [...
|
|
2250
|
-
}),
|
|
2251
|
-
const
|
|
2252
|
-
o("update:modelValue",
|
|
2248
|
+
}, m = t.error ? ["border-error-border", "focus:border-error", "focus:ring-error"] : ["border-border", "focus:border-border-focus", "focus:ring-brand"];
|
|
2249
|
+
return [...d, i[t.size], ...m].join(" ");
|
|
2250
|
+
}), f = (d) => {
|
|
2251
|
+
const m = d.target.value, l = t.options.find((h) => String(h.value) === m);
|
|
2252
|
+
o("update:modelValue", l && typeof l.value == "number" ? l.value : m);
|
|
2253
2253
|
};
|
|
2254
|
-
return (
|
|
2254
|
+
return (d, i) => (g(), v("div", oo, [
|
|
2255
2255
|
e.label ? (g(), v("label", {
|
|
2256
2256
|
key: 0,
|
|
2257
2257
|
for: R(s),
|
|
@@ -2266,12 +2266,12 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2266
2266
|
value: e.modelValue,
|
|
2267
2267
|
disabled: e.disabled,
|
|
2268
2268
|
required: e.required,
|
|
2269
|
-
"aria-describedby":
|
|
2269
|
+
"aria-describedby": u.value,
|
|
2270
2270
|
"aria-invalid": e.error ? "true" : void 0,
|
|
2271
|
-
class: T(
|
|
2272
|
-
onChange:
|
|
2273
|
-
onBlur:
|
|
2274
|
-
onFocus:
|
|
2271
|
+
class: T(c.value),
|
|
2272
|
+
onChange: f,
|
|
2273
|
+
onBlur: i[0] || (i[0] = (m) => d.$emit("blur", m)),
|
|
2274
|
+
onFocus: i[1] || (i[1] = (m) => d.$emit("focus", m))
|
|
2275
2275
|
}, [
|
|
2276
2276
|
e.placeholder ? (g(), v("option", {
|
|
2277
2277
|
key: 0,
|
|
@@ -2279,11 +2279,11 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2279
2279
|
disabled: "",
|
|
2280
2280
|
selected: !e.modelValue
|
|
2281
2281
|
}, E(e.placeholder), 9, io)) : D("", !0),
|
|
2282
|
-
(g(!0), v(se, null, re(e.options, (
|
|
2283
|
-
key:
|
|
2284
|
-
value:
|
|
2285
|
-
disabled:
|
|
2286
|
-
}, E(
|
|
2282
|
+
(g(!0), v(se, null, re(e.options, (m) => (g(), v("option", {
|
|
2283
|
+
key: m.value,
|
|
2284
|
+
value: m.value,
|
|
2285
|
+
disabled: m.disabled
|
|
2286
|
+
}, E(m.label), 9, co))), 128))
|
|
2287
2287
|
], 42, lo),
|
|
2288
2288
|
F("div", uo, [
|
|
2289
2289
|
_(R(Ge), { class: "w-4 h-4 text-fg-tertiary" })
|
|
@@ -2329,55 +2329,58 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2329
2329
|
ofLabel: { default: "of" },
|
|
2330
2330
|
pagination: {}
|
|
2331
2331
|
},
|
|
2332
|
-
emits: ["update:sortBy", "update:sortOrder", "update:page"],
|
|
2332
|
+
emits: ["update:sortBy", "update:sortOrder", "update:page", "row:click"],
|
|
2333
2333
|
setup(e, { emit: n }) {
|
|
2334
2334
|
const t = e, o = n, s = k(() => t.pagination ? Math.ceil(t.pagination.total / t.pagination.perPage) : 0), r = k(() => t.pagination ? (t.pagination.page - 1) * t.pagination.perPage + 1 : 0), a = k(() => t.pagination ? Math.min(
|
|
2335
2335
|
t.pagination.page * t.pagination.perPage,
|
|
2336
2336
|
t.pagination.total
|
|
2337
2337
|
) : 0);
|
|
2338
|
-
function
|
|
2339
|
-
t.sortBy ===
|
|
2338
|
+
function u(l) {
|
|
2339
|
+
t.sortBy === l ? t.sortOrder === "asc" ? o("update:sortOrder", "desc") : (o("update:sortBy", ""), o("update:sortOrder", "asc")) : (o("update:sortBy", l), o("update:sortOrder", "asc"));
|
|
2340
2340
|
}
|
|
2341
|
-
function
|
|
2342
|
-
if (
|
|
2343
|
-
return t.sortBy !==
|
|
2341
|
+
function c(l) {
|
|
2342
|
+
if (l.sortable)
|
|
2343
|
+
return t.sortBy !== l.key ? "none" : t.sortOrder === "asc" ? "ascending" : "descending";
|
|
2344
2344
|
}
|
|
2345
|
-
function
|
|
2346
|
-
return
|
|
2345
|
+
function f(l) {
|
|
2346
|
+
return l === "center" ? "justify-center" : l === "right" ? "justify-end" : "";
|
|
2347
2347
|
}
|
|
2348
|
-
function
|
|
2348
|
+
function d(l) {
|
|
2349
2349
|
return [
|
|
2350
2350
|
"px-4 py-3 text-left font-sans text-sm font-500 text-fg-secondary",
|
|
2351
|
-
|
|
2351
|
+
l.sortable ? "cursor-pointer select-none hover:text-fg" : ""
|
|
2352
2352
|
].join(" ");
|
|
2353
2353
|
}
|
|
2354
|
-
function l
|
|
2355
|
-
return `px-4 py-3 ${
|
|
2354
|
+
function i(l) {
|
|
2355
|
+
return `px-4 py-3 ${l.align === "center" ? "text-center" : l.align === "right" ? "text-right" : "text-left"}`;
|
|
2356
|
+
}
|
|
2357
|
+
function m(l) {
|
|
2358
|
+
o("row:click", l);
|
|
2356
2359
|
}
|
|
2357
|
-
return (
|
|
2360
|
+
return (l, h) => (g(), v("div", fo, [
|
|
2358
2361
|
F("table", bo, [
|
|
2359
2362
|
F("thead", {
|
|
2360
2363
|
class: T(e.stickyHeader ? "sticky top-0 z-10" : "")
|
|
2361
2364
|
}, [
|
|
2362
2365
|
F("tr", mo, [
|
|
2363
|
-
(g(!0), v(se, null, re(e.columns, (
|
|
2364
|
-
key:
|
|
2365
|
-
style: he(
|
|
2366
|
-
class: T(
|
|
2367
|
-
"aria-sort":
|
|
2368
|
-
onClick: (
|
|
2366
|
+
(g(!0), v(se, null, re(e.columns, (b) => (g(), v("th", {
|
|
2367
|
+
key: b.key,
|
|
2368
|
+
style: he(b.width ? { width: b.width } : void 0),
|
|
2369
|
+
class: T(d(b)),
|
|
2370
|
+
"aria-sort": c(b),
|
|
2371
|
+
onClick: (y) => b.sortable ? u(b.key) : void 0
|
|
2369
2372
|
}, [
|
|
2370
2373
|
F("div", {
|
|
2371
|
-
class: T(["flex items-center gap-1", b
|
|
2374
|
+
class: T(["flex items-center gap-1", f(b.align)])
|
|
2372
2375
|
}, [
|
|
2373
|
-
N(
|
|
2374
|
-
X(E(
|
|
2376
|
+
N(l.$slots, `header-${b.key}`, { column: b }, () => [
|
|
2377
|
+
X(E(b.label), 1)
|
|
2375
2378
|
]),
|
|
2376
|
-
|
|
2377
|
-
e.sortBy ===
|
|
2379
|
+
b.sortable ? (g(), v("span", ho, [
|
|
2380
|
+
e.sortBy === b.key && e.sortOrder === "asc" ? (g(), I(R(Sn), {
|
|
2378
2381
|
key: 0,
|
|
2379
2382
|
class: "w-4 h-4"
|
|
2380
|
-
})) : e.sortBy ===
|
|
2383
|
+
})) : e.sortBy === b.key && e.sortOrder === "desc" ? (g(), I(R(Ge), {
|
|
2381
2384
|
key: 1,
|
|
2382
2385
|
class: "w-4 h-4"
|
|
2383
2386
|
})) : (g(), I(R(zn), {
|
|
@@ -2395,7 +2398,7 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2395
2398
|
colspan: e.columns.length,
|
|
2396
2399
|
class: "text-center py-12"
|
|
2397
2400
|
}, [
|
|
2398
|
-
N(
|
|
2401
|
+
N(l.$slots, "loading", {}, () => [
|
|
2399
2402
|
_(Jn, { centered: "" })
|
|
2400
2403
|
])
|
|
2401
2404
|
], 8, yo)
|
|
@@ -2404,28 +2407,29 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2404
2407
|
colspan: e.columns.length,
|
|
2405
2408
|
class: "text-center py-12 text-fg-secondary"
|
|
2406
2409
|
}, [
|
|
2407
|
-
N(
|
|
2410
|
+
N(l.$slots, "empty", {}, () => [
|
|
2408
2411
|
X(E(e.emptyText), 1)
|
|
2409
2412
|
])
|
|
2410
2413
|
], 8, wo)
|
|
2411
2414
|
])) : D("", !0),
|
|
2412
|
-
(g(!0), v(se, null, re(e.rows, (
|
|
2413
|
-
key:
|
|
2415
|
+
(g(!0), v(se, null, re(e.rows, (b, y) => (g(), v("tr", {
|
|
2416
|
+
key: y,
|
|
2414
2417
|
class: T([
|
|
2415
2418
|
"border-b border-solid border-y-border-light transition-colors hover:bg-surface-hover-light border-x-border",
|
|
2416
|
-
e.striped &&
|
|
2419
|
+
e.striped && y % 2 === 1 ? "bg-bg-secondary" : ""
|
|
2417
2420
|
])
|
|
2418
2421
|
}, [
|
|
2419
|
-
(g(!0), v(se, null, re(e.columns, (
|
|
2420
|
-
key:
|
|
2421
|
-
class: T(
|
|
2422
|
+
(g(!0), v(se, null, re(e.columns, (w) => (g(), v("td", {
|
|
2423
|
+
key: w.key,
|
|
2424
|
+
class: T(i(w))
|
|
2422
2425
|
}, [
|
|
2423
|
-
N(
|
|
2424
|
-
row:
|
|
2425
|
-
value:
|
|
2426
|
-
index:
|
|
2426
|
+
N(l.$slots, `cell-${w.key}`, {
|
|
2427
|
+
row: b,
|
|
2428
|
+
value: b[w.key],
|
|
2429
|
+
index: y,
|
|
2430
|
+
onClick: (C) => m(b)
|
|
2427
2431
|
}, () => [
|
|
2428
|
-
X(E(
|
|
2432
|
+
X(E(b[w.key]), 1)
|
|
2429
2433
|
])
|
|
2430
2434
|
], 2))), 128))
|
|
2431
2435
|
], 2))), 128))
|
|
@@ -2438,13 +2442,13 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2438
2442
|
type: "button",
|
|
2439
2443
|
disabled: e.pagination.page <= 1,
|
|
2440
2444
|
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",
|
|
2441
|
-
onClick:
|
|
2445
|
+
onClick: h[0] || (h[0] = (b) => l.$emit("update:page", e.pagination.page - 1))
|
|
2442
2446
|
}, E(e.previousPageLabel), 9, $o),
|
|
2443
2447
|
F("button", {
|
|
2444
2448
|
type: "button",
|
|
2445
2449
|
disabled: e.pagination.page >= s.value,
|
|
2446
2450
|
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",
|
|
2447
|
-
onClick:
|
|
2451
|
+
onClick: h[1] || (h[1] = (b) => l.$emit("update:page", e.pagination.page + 1))
|
|
2448
2452
|
}, E(e.nextPageLabel), 9, Do)
|
|
2449
2453
|
])
|
|
2450
2454
|
])) : D("", !0)
|
|
@@ -2463,78 +2467,78 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2463
2467
|
const t = e, o = n, s = fe("tabs"), r = k(
|
|
2464
2468
|
() => t.variant === "line" ? "flex border-b border-solid border-border gap-0" : "flex gap-1 bg-neutral-soft p-1 rounded-lg"
|
|
2465
2469
|
);
|
|
2466
|
-
function a(
|
|
2467
|
-
|
|
2470
|
+
function a(f) {
|
|
2471
|
+
f.disabled || o("update:modelValue", f.key);
|
|
2468
2472
|
}
|
|
2469
|
-
function
|
|
2470
|
-
const
|
|
2473
|
+
function u(f) {
|
|
2474
|
+
const d = t.modelValue === f.key, i = "font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed";
|
|
2471
2475
|
return t.variant === "line" ? [
|
|
2472
|
-
|
|
2476
|
+
i,
|
|
2473
2477
|
"px-4 py-2 text-sm border-b-2 border-solid border-t-0 border-l-0 border-r-0 bg-transparent -mb-px",
|
|
2474
|
-
|
|
2478
|
+
d ? "border-b-brand text-brand" : "border-b-transparent text-fg-secondary hover:text-fg hover:border-b-border-strong"
|
|
2475
2479
|
].join(" ") : [
|
|
2476
|
-
|
|
2480
|
+
i,
|
|
2477
2481
|
"px-3 py-1.5 text-sm rounded-md border-0",
|
|
2478
|
-
|
|
2482
|
+
d ? "bg-bg text-fg shadow-default" : "bg-transparent text-fg-secondary hover:text-fg"
|
|
2479
2483
|
].join(" ");
|
|
2480
2484
|
}
|
|
2481
|
-
function
|
|
2482
|
-
const
|
|
2483
|
-
(y) => y.key === t.tabs[
|
|
2485
|
+
function c(f, d) {
|
|
2486
|
+
const i = t.tabs.filter((y) => !y.disabled), m = i.findIndex(
|
|
2487
|
+
(y) => y.key === t.tabs[d].key
|
|
2484
2488
|
);
|
|
2485
|
-
let
|
|
2486
|
-
switch (
|
|
2489
|
+
let l = -1;
|
|
2490
|
+
switch (f.key) {
|
|
2487
2491
|
case "ArrowRight":
|
|
2488
2492
|
case "ArrowDown":
|
|
2489
|
-
|
|
2493
|
+
f.preventDefault(), l = (m + 1) % i.length;
|
|
2490
2494
|
break;
|
|
2491
2495
|
case "ArrowLeft":
|
|
2492
2496
|
case "ArrowUp":
|
|
2493
|
-
|
|
2497
|
+
f.preventDefault(), l = (m - 1 + i.length) % i.length;
|
|
2494
2498
|
break;
|
|
2495
2499
|
case "Home":
|
|
2496
|
-
|
|
2500
|
+
f.preventDefault(), l = 0;
|
|
2497
2501
|
break;
|
|
2498
2502
|
case "End":
|
|
2499
|
-
|
|
2503
|
+
f.preventDefault(), l = i.length - 1;
|
|
2500
2504
|
break;
|
|
2501
2505
|
default:
|
|
2502
2506
|
return;
|
|
2503
2507
|
}
|
|
2504
|
-
const
|
|
2505
|
-
o("update:modelValue",
|
|
2506
|
-
const
|
|
2507
|
-
|
|
2508
|
+
const h = i[l];
|
|
2509
|
+
o("update:modelValue", h.key);
|
|
2510
|
+
const b = document.getElementById(`${s}-tab-${h.key}`);
|
|
2511
|
+
b == null || b.focus();
|
|
2508
2512
|
}
|
|
2509
|
-
return (
|
|
2513
|
+
return (f, d) => (g(), v("div", null, [
|
|
2510
2514
|
F("div", {
|
|
2511
2515
|
class: T(r.value),
|
|
2512
2516
|
role: "tablist",
|
|
2513
2517
|
"aria-label": e.ariaLabel
|
|
2514
2518
|
}, [
|
|
2515
|
-
(g(!0), v(se, null, re(e.tabs, (
|
|
2516
|
-
key:
|
|
2517
|
-
id: `${R(s)}-tab-${
|
|
2519
|
+
(g(!0), v(se, null, re(e.tabs, (i, m) => (g(), v("button", {
|
|
2520
|
+
key: i.key,
|
|
2521
|
+
id: `${R(s)}-tab-${i.key}`,
|
|
2518
2522
|
role: "tab",
|
|
2519
2523
|
type: "button",
|
|
2520
|
-
"aria-selected": e.modelValue ===
|
|
2521
|
-
"aria-controls": `${R(s)}-panel-${
|
|
2522
|
-
tabindex: e.modelValue ===
|
|
2523
|
-
disabled:
|
|
2524
|
-
class: T(
|
|
2525
|
-
onClick: (
|
|
2526
|
-
onKeydown: (
|
|
2527
|
-
}, E(
|
|
2524
|
+
"aria-selected": e.modelValue === i.key,
|
|
2525
|
+
"aria-controls": `${R(s)}-panel-${i.key}`,
|
|
2526
|
+
tabindex: e.modelValue === i.key ? 0 : -1,
|
|
2527
|
+
disabled: i.disabled,
|
|
2528
|
+
class: T(u(i)),
|
|
2529
|
+
onClick: (l) => a(i),
|
|
2530
|
+
onKeydown: (l) => c(l, m)
|
|
2531
|
+
}, E(i.label), 43, Ao))), 128))
|
|
2528
2532
|
], 10, Eo),
|
|
2529
|
-
(g(!0), v(se, null, re(e.tabs, (
|
|
2530
|
-
key:
|
|
2531
|
-
id: `${R(s)}-panel-${
|
|
2533
|
+
(g(!0), v(se, null, re(e.tabs, (i) => (g(), v("div", {
|
|
2534
|
+
key: i.key,
|
|
2535
|
+
id: `${R(s)}-panel-${i.key}`,
|
|
2532
2536
|
role: "tabpanel",
|
|
2533
|
-
"aria-labelledby": `${R(s)}-tab-${
|
|
2534
|
-
hidden: e.modelValue !==
|
|
2537
|
+
"aria-labelledby": `${R(s)}-tab-${i.key}`,
|
|
2538
|
+
hidden: e.modelValue !== i.key,
|
|
2535
2539
|
tabindex: 0
|
|
2536
2540
|
}, [
|
|
2537
|
-
e.modelValue ===
|
|
2541
|
+
e.modelValue === i.key ? N(f.$slots, i.key, { key: 0 }) : D("", !0)
|
|
2538
2542
|
], 8, Bo))), 128))
|
|
2539
2543
|
]));
|
|
2540
2544
|
}
|
|
@@ -2565,11 +2569,11 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2565
2569
|
},
|
|
2566
2570
|
emits: ["update:modelValue", "blur", "focus"],
|
|
2567
2571
|
setup(e, { expose: n, emit: t }) {
|
|
2568
|
-
const o = e, s = t, r = j(null), a = fe("textarea"),
|
|
2569
|
-
const
|
|
2570
|
-
return o.helpText && !o.error &&
|
|
2571
|
-
}),
|
|
2572
|
-
const
|
|
2572
|
+
const o = e, s = t, r = j(null), a = fe("textarea"), u = `${a}-help`, c = `${a}-error`, f = k(() => {
|
|
2573
|
+
const b = [];
|
|
2574
|
+
return o.helpText && !o.error && b.push(u), o.error && b.push(c), b.length > 0 ? b.join(" ") : void 0;
|
|
2575
|
+
}), d = k(() => (o.modelValue || "").length), i = k(() => {
|
|
2576
|
+
const b = [
|
|
2573
2577
|
"block",
|
|
2574
2578
|
"w-full",
|
|
2575
2579
|
"rounded-md",
|
|
@@ -2593,20 +2597,20 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2593
2597
|
medium: "px-3 py-2 text-base",
|
|
2594
2598
|
large: "px-4 py-3 text-lg"
|
|
2595
2599
|
}, w = o.error ? ["border-error-border", "focus:border-error", "focus:ring-error"] : ["border-border", "focus:border-border-focus", "focus:ring-brand"];
|
|
2596
|
-
return [...
|
|
2597
|
-
}),
|
|
2598
|
-
const y =
|
|
2600
|
+
return [...b, y[o.size], ...w].join(" ");
|
|
2601
|
+
}), m = (b) => {
|
|
2602
|
+
const y = b.target;
|
|
2599
2603
|
s("update:modelValue", y.value);
|
|
2600
2604
|
};
|
|
2601
|
-
function
|
|
2602
|
-
var
|
|
2603
|
-
(
|
|
2605
|
+
function l() {
|
|
2606
|
+
var b;
|
|
2607
|
+
(b = r.value) == null || b.focus();
|
|
2604
2608
|
}
|
|
2605
|
-
function
|
|
2606
|
-
var
|
|
2607
|
-
(
|
|
2609
|
+
function h() {
|
|
2610
|
+
var b;
|
|
2611
|
+
(b = r.value) == null || b.blur();
|
|
2608
2612
|
}
|
|
2609
|
-
return n({ focus:
|
|
2613
|
+
return n({ focus: l, blur: h, textareaRef: r }), (b, y) => (g(), v("div", To, [
|
|
2610
2614
|
e.label ? (g(), v("label", {
|
|
2611
2615
|
key: 0,
|
|
2612
2616
|
for: R(a),
|
|
@@ -2627,28 +2631,28 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2627
2631
|
required: e.required,
|
|
2628
2632
|
rows: e.rows,
|
|
2629
2633
|
maxlength: e.maxLength,
|
|
2630
|
-
"aria-describedby":
|
|
2634
|
+
"aria-describedby": f.value,
|
|
2631
2635
|
"aria-invalid": e.error ? "true" : void 0,
|
|
2632
|
-
class: T(
|
|
2633
|
-
onInput:
|
|
2634
|
-
onBlur: y[0] || (y[0] = (w) =>
|
|
2635
|
-
onFocus: y[1] || (y[1] = (w) =>
|
|
2636
|
+
class: T(i.value),
|
|
2637
|
+
onInput: m,
|
|
2638
|
+
onBlur: y[0] || (y[0] = (w) => b.$emit("blur", w)),
|
|
2639
|
+
onFocus: y[1] || (y[1] = (w) => b.$emit("focus", w))
|
|
2636
2640
|
}, null, 42, Vo)
|
|
2637
2641
|
]),
|
|
2638
2642
|
e.helpText || e.error || e.maxLength ? (g(), v("div", So, [
|
|
2639
2643
|
e.helpText && !e.error ? (g(), v("div", {
|
|
2640
2644
|
key: 0,
|
|
2641
|
-
id:
|
|
2645
|
+
id: u,
|
|
2642
2646
|
class: "text-caption"
|
|
2643
2647
|
}, E(e.helpText), 1)) : D("", !0),
|
|
2644
2648
|
e.error ? (g(), v("div", {
|
|
2645
2649
|
key: 1,
|
|
2646
|
-
id:
|
|
2650
|
+
id: c,
|
|
2647
2651
|
class: "text-sm text-error font-sans",
|
|
2648
2652
|
role: "alert",
|
|
2649
2653
|
"aria-live": "polite"
|
|
2650
2654
|
}, E(e.error), 1)) : D("", !0),
|
|
2651
|
-
e.maxLength ? (g(), v("div", zo, E(
|
|
2655
|
+
e.maxLength ? (g(), v("div", zo, E(d.value) + " / " + E(e.maxLength), 1)) : D("", !0)
|
|
2652
2656
|
])) : D("", !0)
|
|
2653
2657
|
]));
|
|
2654
2658
|
}
|
|
@@ -2677,48 +2681,48 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2677
2681
|
setup(e, { emit: n }) {
|
|
2678
2682
|
const t = e, o = n;
|
|
2679
2683
|
let s = null, r = t.toast.duration, a = 0;
|
|
2680
|
-
function
|
|
2684
|
+
function u() {
|
|
2681
2685
|
r <= 0 || (a = Date.now(), s = setTimeout(() => {
|
|
2682
2686
|
o("dismiss", t.toast.id);
|
|
2683
2687
|
}, r));
|
|
2684
2688
|
}
|
|
2685
|
-
function
|
|
2689
|
+
function c() {
|
|
2686
2690
|
s && (clearTimeout(s), s = null, r -= Date.now() - a);
|
|
2687
2691
|
}
|
|
2688
|
-
function
|
|
2689
|
-
|
|
2692
|
+
function f() {
|
|
2693
|
+
u();
|
|
2690
2694
|
}
|
|
2691
|
-
const
|
|
2695
|
+
const d = {
|
|
2692
2696
|
brand: "border-l-brand",
|
|
2693
2697
|
error: "border-l-error",
|
|
2694
2698
|
success: "border-l-success",
|
|
2695
2699
|
warning: "border-l-warning",
|
|
2696
2700
|
info: "border-l-info"
|
|
2697
|
-
},
|
|
2701
|
+
}, i = k(() => [
|
|
2698
2702
|
"flex items-start gap-3 w-80 p-4 bg-bg border border-solid border-border rounded-lg shadow-lg",
|
|
2699
2703
|
"border-l-4",
|
|
2700
|
-
|
|
2701
|
-
].join(" ")),
|
|
2704
|
+
d[t.toast.variant] || "border-l-brand"
|
|
2705
|
+
].join(" ")), m = {
|
|
2702
2706
|
brand: "text-brand",
|
|
2703
2707
|
error: "text-error",
|
|
2704
2708
|
success: "text-success",
|
|
2705
2709
|
warning: "text-warning",
|
|
2706
2710
|
info: "text-info"
|
|
2707
|
-
},
|
|
2711
|
+
}, l = k(() => ["shrink-0 mt-0.5", m[t.toast.variant] || "text-brand"].join(" "));
|
|
2708
2712
|
return Et(() => {
|
|
2709
|
-
t.toast.duration > 0 &&
|
|
2713
|
+
t.toast.duration > 0 && u();
|
|
2710
2714
|
}), rt(() => {
|
|
2711
2715
|
s && clearTimeout(s);
|
|
2712
|
-
}), (
|
|
2713
|
-
class: T(
|
|
2716
|
+
}), (h, b) => (g(), v("div", {
|
|
2717
|
+
class: T(i.value),
|
|
2714
2718
|
role: e.toast.variant === "error" ? "alert" : "status",
|
|
2715
2719
|
"aria-live": e.toast.variant === "error" ? "assertive" : "polite",
|
|
2716
|
-
onMouseenter:
|
|
2717
|
-
onMouseleave:
|
|
2720
|
+
onMouseenter: c,
|
|
2721
|
+
onMouseleave: f
|
|
2718
2722
|
}, [
|
|
2719
2723
|
F("div", No, [
|
|
2720
2724
|
F("span", {
|
|
2721
|
-
class: T(
|
|
2725
|
+
class: T(l.value),
|
|
2722
2726
|
"aria-hidden": "true"
|
|
2723
2727
|
}, [
|
|
2724
2728
|
e.toast.variant === "success" ? (g(), I(R(On), {
|
|
@@ -2747,7 +2751,7 @@ const jn = { class: "relative" }, Pn = ["id", "aria-label"], In = ["id", "aria-s
|
|
|
2747
2751
|
type: "button",
|
|
2748
2752
|
class: "p-1 rounded-md text-fg-tertiary hover:text-fg transition-colors shrink-0 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand",
|
|
2749
2753
|
"aria-label": "Dismiss notification",
|
|
2750
|
-
onClick:
|
|
2754
|
+
onClick: b[0] || (b[0] = (y) => h.$emit("dismiss", e.toast.id))
|
|
2751
2755
|
}, [
|
|
2752
2756
|
_(R(Be), { class: "w-4 h-4" })
|
|
2753
2757
|
])) : D("", !0)
|
|
@@ -2819,38 +2823,38 @@ const Yo = {
|
|
|
2819
2823
|
disabled: { type: Boolean, default: !1 }
|
|
2820
2824
|
},
|
|
2821
2825
|
setup(e) {
|
|
2822
|
-
const n = e, t = fe("tooltip"), o = j(!1), s = j(null), r = j(null), a = j(null), { floatingStyles:
|
|
2826
|
+
const n = e, t = fe("tooltip"), o = j(!1), s = j(null), r = j(null), a = j(null), { floatingStyles: u, middlewareData: c, placement: f } = xt(s, r, {
|
|
2823
2827
|
placement: k(() => n.placement),
|
|
2824
2828
|
middleware: [ht(8), pt(), vt({ padding: 8 }), Ln({ element: a })]
|
|
2825
|
-
}),
|
|
2826
|
-
const
|
|
2827
|
-
if (!
|
|
2828
|
-
const
|
|
2829
|
+
}), d = k(() => {
|
|
2830
|
+
const l = c.value.arrow;
|
|
2831
|
+
if (!l) return {};
|
|
2832
|
+
const h = f.value.split("-")[0], b = { top: "bottom", right: "left", bottom: "top", left: "right" }[h];
|
|
2829
2833
|
return {
|
|
2830
|
-
left:
|
|
2831
|
-
top:
|
|
2832
|
-
[
|
|
2834
|
+
left: l.x != null ? `${l.x}px` : "",
|
|
2835
|
+
top: l.y != null ? `${l.y}px` : "",
|
|
2836
|
+
[b]: "-4px"
|
|
2833
2837
|
};
|
|
2834
2838
|
});
|
|
2835
|
-
function
|
|
2839
|
+
function i() {
|
|
2836
2840
|
n.disabled || (o.value = !0);
|
|
2837
2841
|
}
|
|
2838
|
-
function
|
|
2842
|
+
function m() {
|
|
2839
2843
|
o.value = !1;
|
|
2840
2844
|
}
|
|
2841
|
-
return (
|
|
2845
|
+
return (l, h) => (g(), v("div", {
|
|
2842
2846
|
class: "inline-flex",
|
|
2843
|
-
onMouseenter:
|
|
2844
|
-
onMouseleave:
|
|
2845
|
-
onFocusin:
|
|
2846
|
-
onFocusout:
|
|
2847
|
+
onMouseenter: i,
|
|
2848
|
+
onMouseleave: m,
|
|
2849
|
+
onFocusin: i,
|
|
2850
|
+
onFocusout: m
|
|
2847
2851
|
}, [
|
|
2848
2852
|
F("div", {
|
|
2849
2853
|
ref_key: "referenceRef",
|
|
2850
2854
|
ref: s,
|
|
2851
2855
|
"aria-describedby": o.value ? R(t) : void 0
|
|
2852
2856
|
}, [
|
|
2853
|
-
N(
|
|
2857
|
+
N(l.$slots, "default")
|
|
2854
2858
|
], 8, Go),
|
|
2855
2859
|
(g(), I(Le, { to: "body" }, [
|
|
2856
2860
|
_(at, {
|
|
@@ -2868,14 +2872,14 @@ const Yo = {
|
|
|
2868
2872
|
ref_key: "floatingRef",
|
|
2869
2873
|
ref: r,
|
|
2870
2874
|
role: "tooltip",
|
|
2871
|
-
style: he(R(
|
|
2875
|
+
style: he(R(u)),
|
|
2872
2876
|
class: "z-50 px-2 py-1 text-xs font-medium bg-bg-inverse text-fg-inverse rounded-md shadow-md max-w-xs pointer-events-none"
|
|
2873
2877
|
}, [
|
|
2874
2878
|
X(E(e.content) + " ", 1),
|
|
2875
2879
|
F("div", {
|
|
2876
2880
|
ref_key: "arrowRef",
|
|
2877
2881
|
ref: a,
|
|
2878
|
-
style: he(
|
|
2882
|
+
style: he(d.value),
|
|
2879
2883
|
class: "absolute w-2 h-2 bg-bg-inverse rotate-45"
|
|
2880
2884
|
}, null, 4)
|
|
2881
2885
|
], 12, Jo)) : D("", !0)
|