cattle-care-ui 0.4.0 → 0.5.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/components/VideoCard.d.ts +4 -3
- package/dist/index.js +622 -581
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -213,12 +213,12 @@ var M = {
|
|
|
213
213
|
};
|
|
214
214
|
//#endregion
|
|
215
215
|
//#region src/components/Badge.tsx
|
|
216
|
-
function
|
|
216
|
+
function ee(...e) {
|
|
217
217
|
return e.filter(Boolean).join(" ");
|
|
218
218
|
}
|
|
219
|
-
function
|
|
219
|
+
function N({ variant: e = "neutral", size: t = "base", children: n, iconLeft: r, iconRight: i, dot: a, ...o }) {
|
|
220
220
|
return /* @__PURE__ */ y("span", {
|
|
221
|
-
className:
|
|
221
|
+
className: ee(M.badge, M[e], M[t]),
|
|
222
222
|
...o,
|
|
223
223
|
children: [
|
|
224
224
|
a && /* @__PURE__ */ v("span", {
|
|
@@ -239,13 +239,13 @@ function P({ variant: e = "neutral", size: t = "base", children: n, iconLeft: r,
|
|
|
239
239
|
}
|
|
240
240
|
//#endregion
|
|
241
241
|
//#region node_modules/lucide-react/dist/esm/shared/src/utils/toKebabCase.mjs
|
|
242
|
-
var
|
|
242
|
+
var P = (e) => e?.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
243
243
|
//#endregion
|
|
244
244
|
//#region node_modules/lucide-react/dist/esm/shared/src/utils/toLucideIconData.mjs
|
|
245
|
-
function
|
|
245
|
+
function F(e, t, n = []) {
|
|
246
246
|
if (t == null) throw Error("[lucide]: iconNode is required when icon name is used");
|
|
247
247
|
return {
|
|
248
|
-
name:
|
|
248
|
+
name: P(e),
|
|
249
249
|
size: 24,
|
|
250
250
|
node: t,
|
|
251
251
|
...n.length > 0 ? { aliases: n } : {}
|
|
@@ -253,7 +253,7 @@ function I(e, t, n = []) {
|
|
|
253
253
|
}
|
|
254
254
|
//#endregion
|
|
255
255
|
//#region node_modules/lucide-react/dist/esm/shared/src/utils/toCamelCase.mjs
|
|
256
|
-
var
|
|
256
|
+
var te = (e) => {
|
|
257
257
|
let t = "", n = !1;
|
|
258
258
|
for (let r of e) {
|
|
259
259
|
if (r === "-" || r === "_" || r <= " ") {
|
|
@@ -263,10 +263,10 @@ var ee = (e) => {
|
|
|
263
263
|
t.length === 0 ? t += r.toLowerCase() : t += n ? r.toUpperCase() : r, n = !1;
|
|
264
264
|
}
|
|
265
265
|
return t;
|
|
266
|
-
},
|
|
267
|
-
let t =
|
|
266
|
+
}, ne = (e) => {
|
|
267
|
+
let t = te(e);
|
|
268
268
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
269
|
-
},
|
|
269
|
+
}, I = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), L = {
|
|
270
270
|
xmlns: "http://www.w3.org/2000/svg",
|
|
271
271
|
width: 24,
|
|
272
272
|
height: 24,
|
|
@@ -279,22 +279,22 @@ var ee = (e) => {
|
|
|
279
279
|
};
|
|
280
280
|
//#endregion
|
|
281
281
|
//#region node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconNode.mjs
|
|
282
|
-
function
|
|
282
|
+
function R(e) {
|
|
283
283
|
return e != null;
|
|
284
284
|
}
|
|
285
|
-
function
|
|
286
|
-
let n = t.attributeNames ?? {}, r = (e) => n[e] ?? e, i = e.size ?? e.width ??
|
|
285
|
+
function z(e, t = {}) {
|
|
286
|
+
let n = t.attributeNames ?? {}, r = (e) => n[e] ?? e, i = e.size ?? e.width ?? L.width, a = e.size ?? e.height ?? L.height, o = e.aliases?.filter((e) => typeof e == "string" && e.trim() !== "").map((e) => `lucide-${e}`) ?? [], s = [...e.name ? [`lucide-${e.name}`] : [], ...o], c = t.className?.split(" ").filter(Boolean) ?? [], l = t.includeDefaultClasses === !1 ? I(...c) : I("lucide", ...s, ...c), u = t.absoluteStrokeWidth ? Number(t.strokeWidth ?? L["stroke-width"]) * Number(e.size ?? e.width ?? L.width) / Number(t.size ?? t.width ?? L.width) : t.strokeWidth ?? L["stroke-width"];
|
|
287
287
|
return [
|
|
288
288
|
"svg",
|
|
289
289
|
{
|
|
290
|
-
...Object.entries(
|
|
290
|
+
...Object.entries(L).reduce((e, [t, n]) => (e[r(t)] = n, e), {}),
|
|
291
291
|
..."color" in t && t.color && { [r("stroke")]: t.color },
|
|
292
|
-
..."size" in t &&
|
|
292
|
+
..."size" in t && R(t.size) && {
|
|
293
293
|
[r("width")]: t.size,
|
|
294
294
|
[r("height")]: t.size
|
|
295
295
|
},
|
|
296
|
-
..."width" in t &&
|
|
297
|
-
..."height" in t &&
|
|
296
|
+
..."width" in t && R(t.width) && { [r("width")]: t.width },
|
|
297
|
+
..."height" in t && R(t.height) && { [r("height")]: t.height },
|
|
298
298
|
[r("stroke-width")]: u,
|
|
299
299
|
...l && { [r("class")]: l },
|
|
300
300
|
[r("viewBox")]: `0 0 ${i} ${a}`,
|
|
@@ -316,8 +316,8 @@ function B(e, t = {}) {
|
|
|
316
316
|
}
|
|
317
317
|
//#endregion
|
|
318
318
|
//#region node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconForReact.mjs
|
|
319
|
-
function
|
|
320
|
-
return
|
|
319
|
+
function re(e, t = {}) {
|
|
320
|
+
return z(e, {
|
|
321
321
|
...t,
|
|
322
322
|
attributeNames: {
|
|
323
323
|
...t.attributeNames,
|
|
@@ -331,22 +331,22 @@ function ne(e, t = {}) {
|
|
|
331
331
|
}
|
|
332
332
|
//#endregion
|
|
333
333
|
//#region node_modules/lucide-react/dist/esm/shared/src/utils/hasA11yProp.mjs
|
|
334
|
-
var
|
|
334
|
+
var ie = (e) => {
|
|
335
335
|
for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
|
|
336
336
|
return !1;
|
|
337
|
-
},
|
|
337
|
+
}, ae = r({}), oe = () => c(ae), se = a(({ color: e, size: t, width: n, height: r, strokeWidth: a, absoluteStrokeWidth: o, nonScalingStroke: s, className: c = "", children: l, iconNode: u = [], icon: d = {
|
|
338
338
|
node: u,
|
|
339
339
|
aliases: [],
|
|
340
340
|
size: 24
|
|
341
341
|
}, ...f }, p) => {
|
|
342
|
-
let { size: m = 24, strokeWidth: h = 2, absoluteStrokeWidth: g = !1, nonScalingStroke: _ = !1, color: v = "currentColor", className: y = "" } =
|
|
342
|
+
let { size: m = 24, strokeWidth: h = 2, absoluteStrokeWidth: g = !1, nonScalingStroke: _ = !1, color: v = "currentColor", className: y = "" } = oe() ?? {}, b = !!l || ie(f), [x, S, C = []] = re(d, {
|
|
343
343
|
color: e ?? v,
|
|
344
344
|
width: n ?? t ?? m,
|
|
345
345
|
height: r ?? t ?? m,
|
|
346
346
|
strokeWidth: a ?? h,
|
|
347
347
|
absoluteStrokeWidth: o ?? g,
|
|
348
348
|
nonScalingStroke: s ?? _,
|
|
349
|
-
className:
|
|
349
|
+
className: I(y, c),
|
|
350
350
|
hasA11yProp: b,
|
|
351
351
|
attributes: f
|
|
352
352
|
});
|
|
@@ -357,18 +357,18 @@ var re = (e) => {
|
|
|
357
357
|
});
|
|
358
358
|
//#endregion
|
|
359
359
|
//#region node_modules/lucide-react/dist/esm/createLucideIcon.mjs
|
|
360
|
-
function
|
|
361
|
-
let r = typeof e == "string" ?
|
|
360
|
+
function B(e, t = [], n = []) {
|
|
361
|
+
let r = typeof e == "string" ? F(e, t, n) : e, o = a(({ className: e, ...t }, n) => i(se, {
|
|
362
362
|
ref: n,
|
|
363
363
|
icon: r,
|
|
364
364
|
className: e,
|
|
365
365
|
...t
|
|
366
366
|
}));
|
|
367
|
-
return r.name && (o.displayName =
|
|
367
|
+
return r.name && (o.displayName = ne(r.name)), o;
|
|
368
368
|
}
|
|
369
369
|
//#endregion
|
|
370
370
|
//#region node_modules/lucide-react/dist/esm/icons/archive.mjs
|
|
371
|
-
var
|
|
371
|
+
var V = {
|
|
372
372
|
name: "archive",
|
|
373
373
|
size: 24,
|
|
374
374
|
node: [
|
|
@@ -390,8 +390,8 @@ var H = {
|
|
|
390
390
|
}]
|
|
391
391
|
]
|
|
392
392
|
};
|
|
393
|
-
|
|
394
|
-
var
|
|
393
|
+
V.node;
|
|
394
|
+
var ce = B(V), H = {
|
|
395
395
|
name: "calendar-days",
|
|
396
396
|
size: 24,
|
|
397
397
|
node: [
|
|
@@ -441,8 +441,8 @@ var se = V(H), U = {
|
|
|
441
441
|
}]
|
|
442
442
|
]
|
|
443
443
|
};
|
|
444
|
-
|
|
445
|
-
var
|
|
444
|
+
H.node;
|
|
445
|
+
var le = B(H), ue = {
|
|
446
446
|
name: "check",
|
|
447
447
|
size: 24,
|
|
448
448
|
node: [["path", {
|
|
@@ -450,8 +450,8 @@ var ce = V(U), le = {
|
|
|
450
450
|
key: "1gmf2c"
|
|
451
451
|
}]]
|
|
452
452
|
};
|
|
453
|
-
|
|
454
|
-
var
|
|
453
|
+
ue.node;
|
|
454
|
+
var U = B(ue), W = {
|
|
455
455
|
name: "chevron-down",
|
|
456
456
|
size: 24,
|
|
457
457
|
node: [["path", {
|
|
@@ -459,8 +459,8 @@ var W = V(le), ue = {
|
|
|
459
459
|
key: "qrunsl"
|
|
460
460
|
}]]
|
|
461
461
|
};
|
|
462
|
-
|
|
463
|
-
var de =
|
|
462
|
+
W.node;
|
|
463
|
+
var de = B(W), fe = {
|
|
464
464
|
name: "chevron-left",
|
|
465
465
|
size: 24,
|
|
466
466
|
node: [["path", {
|
|
@@ -469,7 +469,7 @@ var de = V(ue), fe = {
|
|
|
469
469
|
}]]
|
|
470
470
|
};
|
|
471
471
|
fe.node;
|
|
472
|
-
var pe =
|
|
472
|
+
var pe = B(fe), me = {
|
|
473
473
|
name: "chevron-right",
|
|
474
474
|
size: 24,
|
|
475
475
|
node: [["path", {
|
|
@@ -478,7 +478,7 @@ var pe = V(fe), me = {
|
|
|
478
478
|
}]]
|
|
479
479
|
};
|
|
480
480
|
me.node;
|
|
481
|
-
var he =
|
|
481
|
+
var he = B(me), ge = {
|
|
482
482
|
name: "eye-off",
|
|
483
483
|
size: 24,
|
|
484
484
|
node: [
|
|
@@ -501,7 +501,7 @@ var he = V(me), ge = {
|
|
|
501
501
|
]
|
|
502
502
|
};
|
|
503
503
|
ge.node;
|
|
504
|
-
var _e =
|
|
504
|
+
var _e = B(ge), ve = {
|
|
505
505
|
name: "eye",
|
|
506
506
|
size: 24,
|
|
507
507
|
node: [["path", {
|
|
@@ -515,7 +515,47 @@ var _e = V(ge), ve = {
|
|
|
515
515
|
}]]
|
|
516
516
|
};
|
|
517
517
|
ve.node;
|
|
518
|
-
var ye =
|
|
518
|
+
var ye = B(ve), be = {
|
|
519
|
+
name: "image-off",
|
|
520
|
+
size: 24,
|
|
521
|
+
node: [
|
|
522
|
+
["line", {
|
|
523
|
+
x1: "2",
|
|
524
|
+
x2: "22",
|
|
525
|
+
y1: "2",
|
|
526
|
+
y2: "22",
|
|
527
|
+
key: "a6p6uj"
|
|
528
|
+
}],
|
|
529
|
+
["path", {
|
|
530
|
+
d: "M10.41 10.41a2 2 0 1 1-2.83-2.83",
|
|
531
|
+
key: "1bzlo9"
|
|
532
|
+
}],
|
|
533
|
+
["line", {
|
|
534
|
+
x1: "13.5",
|
|
535
|
+
x2: "6",
|
|
536
|
+
y1: "13.5",
|
|
537
|
+
y2: "21",
|
|
538
|
+
key: "1q0aeu"
|
|
539
|
+
}],
|
|
540
|
+
["line", {
|
|
541
|
+
x1: "18",
|
|
542
|
+
x2: "21",
|
|
543
|
+
y1: "12",
|
|
544
|
+
y2: "15",
|
|
545
|
+
key: "5mozeu"
|
|
546
|
+
}],
|
|
547
|
+
["path", {
|
|
548
|
+
d: "M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59",
|
|
549
|
+
key: "mmje98"
|
|
550
|
+
}],
|
|
551
|
+
["path", {
|
|
552
|
+
d: "M21 15V5a2 2 0 0 0-2-2H9",
|
|
553
|
+
key: "43el77"
|
|
554
|
+
}]
|
|
555
|
+
]
|
|
556
|
+
};
|
|
557
|
+
be.node;
|
|
558
|
+
var xe = B(be), Se = {
|
|
519
559
|
name: "lock",
|
|
520
560
|
size: 24,
|
|
521
561
|
node: [["rect", {
|
|
@@ -531,8 +571,8 @@ var ye = V(ve), be = {
|
|
|
531
571
|
key: "fwvmzm"
|
|
532
572
|
}]]
|
|
533
573
|
};
|
|
534
|
-
|
|
535
|
-
var
|
|
574
|
+
Se.node;
|
|
575
|
+
var Ce = B(Se), we = {
|
|
536
576
|
name: "play",
|
|
537
577
|
size: 24,
|
|
538
578
|
node: [["path", {
|
|
@@ -540,8 +580,8 @@ var xe = V(be), Se = {
|
|
|
540
580
|
key: "10ikf1"
|
|
541
581
|
}]]
|
|
542
582
|
};
|
|
543
|
-
|
|
544
|
-
var
|
|
583
|
+
we.node;
|
|
584
|
+
var Te = B(we), Ee = {
|
|
545
585
|
name: "search",
|
|
546
586
|
size: 24,
|
|
547
587
|
node: [["path", {
|
|
@@ -554,8 +594,8 @@ var Ce = V(Se), we = {
|
|
|
554
594
|
key: "4ej97u"
|
|
555
595
|
}]]
|
|
556
596
|
};
|
|
557
|
-
|
|
558
|
-
var
|
|
597
|
+
Ee.node;
|
|
598
|
+
var De = B(Ee), Oe = {
|
|
559
599
|
name: "user",
|
|
560
600
|
size: 24,
|
|
561
601
|
node: [["path", {
|
|
@@ -568,8 +608,8 @@ var Te = V(we), Ee = {
|
|
|
568
608
|
key: "17ys0d"
|
|
569
609
|
}]]
|
|
570
610
|
};
|
|
571
|
-
|
|
572
|
-
var
|
|
611
|
+
Oe.node;
|
|
612
|
+
var ke = B(Oe), Ae = {
|
|
573
613
|
name: "x",
|
|
574
614
|
size: 24,
|
|
575
615
|
node: [["path", {
|
|
@@ -580,8 +620,8 @@ var De = V(Ee), Oe = {
|
|
|
580
620
|
key: "d8bk6v"
|
|
581
621
|
}]]
|
|
582
622
|
};
|
|
583
|
-
|
|
584
|
-
var
|
|
623
|
+
Ae.node;
|
|
624
|
+
var je = B(Ae), Me = {
|
|
585
625
|
neutral: "_neutral_11vj2_1",
|
|
586
626
|
pill: "_pill_11vj2_2",
|
|
587
627
|
accent: "_accent_11vj2_3",
|
|
@@ -599,53 +639,53 @@ var ke = V(Oe), Ae = {
|
|
|
599
639
|
main: "_main_11vj2_161",
|
|
600
640
|
remove: "_remove_11vj2_162",
|
|
601
641
|
removable: "_removable_11vj2_189"
|
|
602
|
-
},
|
|
642
|
+
}, Ne = {
|
|
603
643
|
chip: "_chip_ny74i_5",
|
|
604
644
|
disabled: "_disabled_ny74i_15",
|
|
605
645
|
selected: "_selected_ny74i_28"
|
|
606
646
|
};
|
|
607
647
|
//#endregion
|
|
608
648
|
//#region src/components/Tag.tsx
|
|
609
|
-
function
|
|
649
|
+
function Pe(...e) {
|
|
610
650
|
return e.filter(Boolean).join(" ");
|
|
611
651
|
}
|
|
612
|
-
function
|
|
652
|
+
function Fe(e) {
|
|
613
653
|
if (e.variant === "count") {
|
|
614
654
|
let { variant: t, children: n, ...r } = e;
|
|
615
655
|
return /* @__PURE__ */ v("span", {
|
|
616
|
-
className:
|
|
656
|
+
className: Me[t],
|
|
617
657
|
...r,
|
|
618
658
|
children: n
|
|
619
659
|
});
|
|
620
660
|
}
|
|
621
|
-
let { variant: t = "neutral", children: n, onClick: r, pressed: i, disabled: a, leading: o, onRemove: s, removeLabel: c, ...l } = e, u = !!r, d = !!s, f = t === "chip", p = u && i === !0, m = Me
|
|
622
|
-
className:
|
|
661
|
+
let { variant: t = "neutral", children: n, onClick: r, pressed: i, disabled: a, leading: o, onRemove: s, removeLabel: c, ...l } = e, u = !!r, d = !!s, f = t === "chip", p = u && i === !0, m = Pe(Me[t], f && Ne.chip, f && p && Ne.selected, f && a && Ne.disabled, (u || d) && Me.interactive, p && Me.pressed, a && Me.disabled, (o != null || d) && Me.slots), h = /* @__PURE__ */ y(_, { children: [o != null && /* @__PURE__ */ v("span", {
|
|
662
|
+
className: Me.leading,
|
|
623
663
|
children: o
|
|
624
664
|
}), n] });
|
|
625
665
|
return d ? /* @__PURE__ */ y("span", {
|
|
626
|
-
className:
|
|
666
|
+
className: Pe(m, Me.removable),
|
|
627
667
|
...l,
|
|
628
668
|
children: [u ? /* @__PURE__ */ v("button", {
|
|
629
669
|
type: "button",
|
|
630
|
-
className: Me
|
|
670
|
+
className: Pe(Me.main, Me.slots),
|
|
631
671
|
"aria-pressed": i,
|
|
632
672
|
disabled: a,
|
|
633
673
|
onClick: r,
|
|
634
674
|
children: h
|
|
635
675
|
}) : h, /* @__PURE__ */ v("button", {
|
|
636
676
|
type: "button",
|
|
637
|
-
className:
|
|
677
|
+
className: Me.remove,
|
|
638
678
|
"aria-label": c,
|
|
639
679
|
disabled: a,
|
|
640
680
|
onClick: () => s(),
|
|
641
|
-
children: /* @__PURE__ */ v(
|
|
681
|
+
children: /* @__PURE__ */ v(je, {
|
|
642
682
|
size: 12,
|
|
643
683
|
"aria-hidden": "true"
|
|
644
684
|
})
|
|
645
685
|
})]
|
|
646
686
|
}) : u ? /* @__PURE__ */ v("button", {
|
|
647
687
|
type: "button",
|
|
648
|
-
className:
|
|
688
|
+
className: Pe(m, Me.button),
|
|
649
689
|
"aria-pressed": i,
|
|
650
690
|
disabled: a,
|
|
651
691
|
onClick: r,
|
|
@@ -657,20 +697,20 @@ function Ne(e) {
|
|
|
657
697
|
children: h
|
|
658
698
|
});
|
|
659
699
|
}
|
|
660
|
-
var
|
|
700
|
+
var Ie = {
|
|
661
701
|
group: "_group_kw1z2_1",
|
|
662
702
|
sm: "_sm_kw1z2_9",
|
|
663
703
|
chip: "_chip_kw1z2_13 _chip_ny74i_5",
|
|
664
704
|
base: "_base_kw1z2_28",
|
|
665
705
|
selected: "_selected_kw1z2_44 _selected_ny74i_28"
|
|
666
|
-
},
|
|
706
|
+
}, Le = {
|
|
667
707
|
group: "_group_1gqda_1",
|
|
668
708
|
groupLabel: "_groupLabel_1gqda_7"
|
|
669
|
-
},
|
|
709
|
+
}, Re = { label: "_label_1hzxz_1" };
|
|
670
710
|
//#endregion
|
|
671
711
|
//#region src/components/FieldLabel.tsx
|
|
672
|
-
function
|
|
673
|
-
let r = `${
|
|
712
|
+
function ze({ children: e, htmlFor: t, className: n }) {
|
|
713
|
+
let r = `${Re.label} ${n ?? ""}`.trim();
|
|
674
714
|
return t ? /* @__PURE__ */ v("label", {
|
|
675
715
|
className: r,
|
|
676
716
|
htmlFor: t,
|
|
@@ -682,36 +722,36 @@ function Le({ children: e, htmlFor: t, className: n }) {
|
|
|
682
722
|
}
|
|
683
723
|
//#endregion
|
|
684
724
|
//#region src/components/TagGroup.tsx
|
|
685
|
-
function
|
|
725
|
+
function Be({ items: e, value: t, onChange: n, size: r = "base", disabled: i = !1, label: a, ...o }) {
|
|
686
726
|
function s(e) {
|
|
687
727
|
n(t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
|
|
688
728
|
}
|
|
689
729
|
let c = /* @__PURE__ */ v("div", {
|
|
690
730
|
role: "group",
|
|
691
731
|
"aria-label": a ? void 0 : o["aria-label"],
|
|
692
|
-
className: `${
|
|
732
|
+
className: `${Ie.group} ${Ie[r]}`,
|
|
693
733
|
children: e.map((e) => {
|
|
694
734
|
let n = t.includes(e.value), r = i || e.disabled;
|
|
695
735
|
return /* @__PURE__ */ v("button", {
|
|
696
736
|
type: "button",
|
|
697
737
|
"aria-pressed": n,
|
|
698
738
|
disabled: r,
|
|
699
|
-
className: [
|
|
739
|
+
className: [Ie.chip, n && Ie.selected].filter(Boolean).join(" "),
|
|
700
740
|
onClick: () => !r && s(e.value),
|
|
701
741
|
children: e.label
|
|
702
742
|
}, e.value);
|
|
703
743
|
})
|
|
704
744
|
});
|
|
705
745
|
return a ? /* @__PURE__ */ y("div", {
|
|
706
|
-
className:
|
|
746
|
+
className: Le.group,
|
|
707
747
|
...o,
|
|
708
|
-
children: [/* @__PURE__ */ v(
|
|
709
|
-
className:
|
|
748
|
+
children: [/* @__PURE__ */ v(ze, {
|
|
749
|
+
className: Le.groupLabel,
|
|
710
750
|
children: a
|
|
711
751
|
}), c]
|
|
712
752
|
}) : c;
|
|
713
753
|
}
|
|
714
|
-
var
|
|
754
|
+
var Ve = {
|
|
715
755
|
toolbar: "_toolbar_1naq9_1",
|
|
716
756
|
searchWrap: "_searchWrap_1naq9_14",
|
|
717
757
|
searchIcon: "_searchIcon_1naq9_33",
|
|
@@ -721,7 +761,7 @@ var ze = {
|
|
|
721
761
|
};
|
|
722
762
|
//#endregion
|
|
723
763
|
//#region src/components/Toolbar.tsx
|
|
724
|
-
function
|
|
764
|
+
function He({ searchValue: e, onSearchChange: t, placeholder: n = "Search…", shortcutLabel: r = "⌘K", shortcutKey: i = "k", children: a }) {
|
|
725
765
|
let o = p(null);
|
|
726
766
|
return l(() => {
|
|
727
767
|
function e(e) {
|
|
@@ -729,36 +769,36 @@ function Be({ searchValue: e, onSearchChange: t, placeholder: n = "Search…", s
|
|
|
729
769
|
}
|
|
730
770
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
731
771
|
}, [i]), /* @__PURE__ */ y("div", {
|
|
732
|
-
className:
|
|
772
|
+
className: Ve.toolbar,
|
|
733
773
|
children: [/* @__PURE__ */ y("div", {
|
|
734
|
-
className:
|
|
774
|
+
className: Ve.searchWrap,
|
|
735
775
|
children: [
|
|
736
776
|
/* @__PURE__ */ v("span", {
|
|
737
|
-
className:
|
|
738
|
-
children: /* @__PURE__ */ v(
|
|
777
|
+
className: Ve.searchIcon,
|
|
778
|
+
children: /* @__PURE__ */ v(De, {})
|
|
739
779
|
}),
|
|
740
780
|
/* @__PURE__ */ v("input", {
|
|
741
781
|
ref: o,
|
|
742
782
|
type: "text",
|
|
743
|
-
className:
|
|
783
|
+
className: Ve.search,
|
|
744
784
|
placeholder: n,
|
|
745
785
|
autoComplete: "off",
|
|
746
786
|
value: e,
|
|
747
787
|
onChange: (e) => t?.(e.target.value)
|
|
748
788
|
}),
|
|
749
789
|
r && /* @__PURE__ */ v("span", {
|
|
750
|
-
className:
|
|
790
|
+
className: Ve.searchShortcut,
|
|
751
791
|
"aria-hidden": "true",
|
|
752
792
|
children: r
|
|
753
793
|
})
|
|
754
794
|
]
|
|
755
795
|
}), a && /* @__PURE__ */ v("div", {
|
|
756
|
-
className:
|
|
796
|
+
className: Ve.controls,
|
|
757
797
|
children: a
|
|
758
798
|
})]
|
|
759
799
|
});
|
|
760
800
|
}
|
|
761
|
-
var
|
|
801
|
+
var Ue = {
|
|
762
802
|
anchor: "_anchor_1r8q2_3",
|
|
763
803
|
sentinel: "_sentinel_1r8q2_8",
|
|
764
804
|
header: "_header_1r8q2_17",
|
|
@@ -766,8 +806,8 @@ var Ve = {
|
|
|
766
806
|
card: "_card_1r8q2_49",
|
|
767
807
|
left: "_left_1r8q2_104",
|
|
768
808
|
right: "_right_1r8q2_105"
|
|
769
|
-
},
|
|
770
|
-
function
|
|
809
|
+
}, We = 4;
|
|
810
|
+
function Ge(e) {
|
|
771
811
|
let t = e.parentElement;
|
|
772
812
|
for (; t && t !== document.body && t !== document.documentElement;) {
|
|
773
813
|
let { overflowY: e } = getComputedStyle(t);
|
|
@@ -776,7 +816,7 @@ function Ue(e) {
|
|
|
776
816
|
}
|
|
777
817
|
return null;
|
|
778
818
|
}
|
|
779
|
-
function
|
|
819
|
+
function Ke({ left: e, right: t, children: n, scrollRoot: r, threshold: i = We, floatOnMobile: a = !1, onStateChange: o, className: s, "data-testid": c = "header" }) {
|
|
780
820
|
let u = p(null), [d, f] = m("top"), [h, g] = m(!1), b = p(o);
|
|
781
821
|
l(() => {
|
|
782
822
|
b.current = o;
|
|
@@ -788,7 +828,7 @@ function We({ left: e, right: t, children: n, scrollRoot: r, threshold: i = He,
|
|
|
788
828
|
let e = u.current;
|
|
789
829
|
if (!e) return;
|
|
790
830
|
let t, n, i = !0, a = 0, o = () => {
|
|
791
|
-
let o = r === void 0 ?
|
|
831
|
+
let o = r === void 0 ? Ge(e) : r;
|
|
792
832
|
t && o === n || (t?.disconnect(), n = o, t = new IntersectionObserver((e) => {
|
|
793
833
|
let t = e[e.length - 1];
|
|
794
834
|
f(t.isIntersecting ? "top" : "floating"), i && (i = !1, a = requestAnimationFrame(() => g(!0)));
|
|
@@ -799,20 +839,20 @@ function We({ left: e, right: t, children: n, scrollRoot: r, threshold: i = He,
|
|
|
799
839
|
};
|
|
800
840
|
}, [r, i]);
|
|
801
841
|
let S = [
|
|
802
|
-
|
|
803
|
-
h ?
|
|
842
|
+
Ue.card,
|
|
843
|
+
h ? Ue.animated : "",
|
|
804
844
|
s
|
|
805
845
|
].filter(Boolean).join(" ");
|
|
806
846
|
return /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("div", {
|
|
807
|
-
className:
|
|
847
|
+
className: Ue.anchor,
|
|
808
848
|
"aria-hidden": "true",
|
|
809
849
|
children: /* @__PURE__ */ v("div", {
|
|
810
850
|
ref: u,
|
|
811
|
-
className:
|
|
851
|
+
className: Ue.sentinel,
|
|
812
852
|
style: { top: i }
|
|
813
853
|
})
|
|
814
854
|
}), /* @__PURE__ */ v("header", {
|
|
815
|
-
className: [
|
|
855
|
+
className: [Ue.header, h ? Ue.animated : ""].filter(Boolean).join(" "),
|
|
816
856
|
"data-state": d,
|
|
817
857
|
"data-float-mobile": a ? "" : void 0,
|
|
818
858
|
"data-testid": c,
|
|
@@ -821,16 +861,16 @@ function We({ left: e, right: t, children: n, scrollRoot: r, threshold: i = He,
|
|
|
821
861
|
"data-state": d,
|
|
822
862
|
"data-float-mobile": a ? "" : void 0,
|
|
823
863
|
children: n ?? /* @__PURE__ */ y(_, { children: [e && /* @__PURE__ */ v("div", {
|
|
824
|
-
className:
|
|
864
|
+
className: Ue.left,
|
|
825
865
|
children: e
|
|
826
866
|
}), t && /* @__PURE__ */ v("div", {
|
|
827
|
-
className:
|
|
867
|
+
className: Ue.right,
|
|
828
868
|
children: t
|
|
829
869
|
})] })
|
|
830
870
|
})
|
|
831
871
|
})] });
|
|
832
872
|
}
|
|
833
|
-
var
|
|
873
|
+
var qe = {
|
|
834
874
|
checkbox: "_checkbox_553ny_1",
|
|
835
875
|
control: "_control_553ny_8",
|
|
836
876
|
labelText: "_labelText_553ny_17",
|
|
@@ -841,15 +881,15 @@ var Ge = {
|
|
|
841
881
|
};
|
|
842
882
|
//#endregion
|
|
843
883
|
//#region src/components/Checkbox.tsx
|
|
844
|
-
function
|
|
884
|
+
function Je({ checked: e, onChange: t, onBlur: n, name: r, label: i, ariaLabel: a, disabled: o, className: s, ref: c }) {
|
|
845
885
|
return /* @__PURE__ */ y("label", {
|
|
846
|
-
className: `${
|
|
886
|
+
className: `${qe.checkbox} ${s ?? ""}`,
|
|
847
887
|
children: [/* @__PURE__ */ y("span", {
|
|
848
|
-
className:
|
|
888
|
+
className: qe.control,
|
|
849
889
|
children: [/* @__PURE__ */ v("input", {
|
|
850
890
|
ref: c,
|
|
851
891
|
type: "checkbox",
|
|
852
|
-
className:
|
|
892
|
+
className: qe.input,
|
|
853
893
|
checked: e,
|
|
854
894
|
onChange: t,
|
|
855
895
|
onBlur: n,
|
|
@@ -857,46 +897,46 @@ function Ke({ checked: e, onChange: t, onBlur: n, name: r, label: i, ariaLabel:
|
|
|
857
897
|
"aria-label": a,
|
|
858
898
|
disabled: o
|
|
859
899
|
}), /* @__PURE__ */ v("span", {
|
|
860
|
-
className:
|
|
900
|
+
className: qe.box,
|
|
861
901
|
children: /* @__PURE__ */ v("svg", {
|
|
862
|
-
className:
|
|
902
|
+
className: qe.icon,
|
|
863
903
|
viewBox: "0 0 17 18",
|
|
864
904
|
"aria-hidden": "true",
|
|
865
905
|
children: /* @__PURE__ */ v("polyline", { points: "1 9 7 14 15 4" })
|
|
866
906
|
})
|
|
867
907
|
})]
|
|
868
908
|
}), i && /* @__PURE__ */ v("span", {
|
|
869
|
-
className:
|
|
909
|
+
className: qe.labelText,
|
|
870
910
|
children: i
|
|
871
911
|
})]
|
|
872
912
|
});
|
|
873
913
|
}
|
|
874
|
-
function
|
|
914
|
+
function Ye({ checked: e, disabled: t }) {
|
|
875
915
|
return /* @__PURE__ */ v("span", {
|
|
876
|
-
className: `${
|
|
916
|
+
className: `${qe.box} ${qe.indicator}`,
|
|
877
917
|
"data-checked": e,
|
|
878
918
|
"data-disabled": t || void 0,
|
|
879
919
|
"aria-hidden": "true",
|
|
880
920
|
children: /* @__PURE__ */ v("svg", {
|
|
881
|
-
className:
|
|
921
|
+
className: qe.icon,
|
|
882
922
|
viewBox: "0 0 17 18",
|
|
883
923
|
"aria-hidden": "true",
|
|
884
924
|
children: /* @__PURE__ */ v("polyline", { points: "1 9 7 14 15 4" })
|
|
885
925
|
})
|
|
886
926
|
});
|
|
887
927
|
}
|
|
888
|
-
function
|
|
928
|
+
function Xe({ label: e, items: t, value: n, onChange: r, disabled: i, ...a }) {
|
|
889
929
|
function o(e) {
|
|
890
930
|
r(n.includes(e) ? n.filter((t) => t !== e) : [...n, e]);
|
|
891
931
|
}
|
|
892
932
|
return /* @__PURE__ */ y("div", {
|
|
893
933
|
role: "group",
|
|
894
934
|
"aria-label": e ? void 0 : a["aria-label"],
|
|
895
|
-
className:
|
|
896
|
-
children: [e && /* @__PURE__ */ v(
|
|
897
|
-
className:
|
|
935
|
+
className: Le.group,
|
|
936
|
+
children: [e && /* @__PURE__ */ v(ze, {
|
|
937
|
+
className: Le.groupLabel,
|
|
898
938
|
children: e
|
|
899
|
-
}), t.map((e) => /* @__PURE__ */ v(
|
|
939
|
+
}), t.map((e) => /* @__PURE__ */ v(Je, {
|
|
900
940
|
checked: n.includes(e.value),
|
|
901
941
|
onChange: () => o(e.value),
|
|
902
942
|
label: e.label,
|
|
@@ -904,7 +944,7 @@ function Je({ label: e, items: t, value: n, onChange: r, disabled: i, ...a }) {
|
|
|
904
944
|
}, e.value))]
|
|
905
945
|
});
|
|
906
946
|
}
|
|
907
|
-
var
|
|
947
|
+
var Ze = {
|
|
908
948
|
radio: "_radio_2lj6y_1",
|
|
909
949
|
control: "_control_2lj6y_8",
|
|
910
950
|
labelText: "_labelText_2lj6y_17",
|
|
@@ -914,15 +954,15 @@ var Ye = {
|
|
|
914
954
|
};
|
|
915
955
|
//#endregion
|
|
916
956
|
//#region src/components/RadioButton.tsx
|
|
917
|
-
function
|
|
957
|
+
function Qe({ checked: e, onChange: t, onBlur: n, name: r, value: i, label: a, ariaLabel: o, disabled: s, className: c, ref: l }) {
|
|
918
958
|
return /* @__PURE__ */ y("label", {
|
|
919
|
-
className: `${
|
|
959
|
+
className: `${Ze.radio} ${c ?? ""}`,
|
|
920
960
|
children: [/* @__PURE__ */ y("span", {
|
|
921
|
-
className:
|
|
961
|
+
className: Ze.control,
|
|
922
962
|
children: [/* @__PURE__ */ v("input", {
|
|
923
963
|
ref: l,
|
|
924
964
|
type: "radio",
|
|
925
|
-
className:
|
|
965
|
+
className: Ze.input,
|
|
926
966
|
checked: e,
|
|
927
967
|
onChange: t,
|
|
928
968
|
onBlur: n,
|
|
@@ -931,24 +971,24 @@ function Xe({ checked: e, onChange: t, onBlur: n, name: r, value: i, label: a, a
|
|
|
931
971
|
"aria-label": o,
|
|
932
972
|
disabled: s
|
|
933
973
|
}), /* @__PURE__ */ v("span", {
|
|
934
|
-
className:
|
|
935
|
-
children: /* @__PURE__ */ v("span", { className:
|
|
974
|
+
className: Ze.circle,
|
|
975
|
+
children: /* @__PURE__ */ v("span", { className: Ze.dot })
|
|
936
976
|
})]
|
|
937
977
|
}), a && /* @__PURE__ */ v("span", {
|
|
938
|
-
className:
|
|
978
|
+
className: Ze.labelText,
|
|
939
979
|
children: a
|
|
940
980
|
})]
|
|
941
981
|
});
|
|
942
982
|
}
|
|
943
|
-
function
|
|
983
|
+
function $e({ label: e, name: t, items: n, value: r, onChange: i, disabled: a, ...o }) {
|
|
944
984
|
return /* @__PURE__ */ y("div", {
|
|
945
985
|
role: "radiogroup",
|
|
946
986
|
"aria-label": e ? void 0 : o["aria-label"],
|
|
947
|
-
className:
|
|
948
|
-
children: [e && /* @__PURE__ */ v(
|
|
949
|
-
className:
|
|
987
|
+
className: Le.group,
|
|
988
|
+
children: [e && /* @__PURE__ */ v(ze, {
|
|
989
|
+
className: Le.groupLabel,
|
|
950
990
|
children: e
|
|
951
|
-
}), n.map((e) => /* @__PURE__ */ v(
|
|
991
|
+
}), n.map((e) => /* @__PURE__ */ v(Qe, {
|
|
952
992
|
name: t,
|
|
953
993
|
value: e.value,
|
|
954
994
|
checked: r === e.value,
|
|
@@ -958,7 +998,7 @@ function Ze({ label: e, name: t, items: n, value: r, onChange: i, disabled: a, .
|
|
|
958
998
|
}, e.value))]
|
|
959
999
|
});
|
|
960
1000
|
}
|
|
961
|
-
var
|
|
1001
|
+
var et = {
|
|
962
1002
|
switch: "_switch_102e5_1",
|
|
963
1003
|
input: "_input_102e5_7",
|
|
964
1004
|
control: "_control_102e5_10",
|
|
@@ -970,25 +1010,25 @@ var Qe = {
|
|
|
970
1010
|
};
|
|
971
1011
|
//#endregion
|
|
972
1012
|
//#region src/components/Switch.tsx
|
|
973
|
-
function
|
|
1013
|
+
function tt({ checked: e, onChange: t, size: n = "base", label: r, ariaLabel: i, disabled: a, className: o }) {
|
|
974
1014
|
return /* @__PURE__ */ y("label", {
|
|
975
|
-
className: `${
|
|
1015
|
+
className: `${et.switch} ${o ?? ""}`,
|
|
976
1016
|
children: [/* @__PURE__ */ y("span", {
|
|
977
|
-
className: `${
|
|
1017
|
+
className: `${et.control} ${et[n]}`,
|
|
978
1018
|
children: [/* @__PURE__ */ v("input", {
|
|
979
1019
|
type: "checkbox",
|
|
980
1020
|
role: "switch",
|
|
981
|
-
className:
|
|
1021
|
+
className: et.input,
|
|
982
1022
|
checked: e,
|
|
983
1023
|
onChange: t,
|
|
984
1024
|
"aria-label": i,
|
|
985
1025
|
disabled: a
|
|
986
1026
|
}), /* @__PURE__ */ v("span", {
|
|
987
|
-
className:
|
|
988
|
-
children: /* @__PURE__ */ v("span", { className:
|
|
1027
|
+
className: et.track,
|
|
1028
|
+
children: /* @__PURE__ */ v("span", { className: et.thumb })
|
|
989
1029
|
})]
|
|
990
1030
|
}), r && /* @__PURE__ */ v("span", {
|
|
991
|
-
className:
|
|
1031
|
+
className: et.labelText,
|
|
992
1032
|
children: r
|
|
993
1033
|
})]
|
|
994
1034
|
});
|
|
@@ -1013,12 +1053,12 @@ var G = {
|
|
|
1013
1053
|
};
|
|
1014
1054
|
//#endregion
|
|
1015
1055
|
//#region src/components/TextField.tsx
|
|
1016
|
-
function
|
|
1056
|
+
function nt({ label: e, helperText: t, error: n, size: r = "base", variant: i = "default", leadingIcon: a, shortcut: o, id: s, className: c, ref: l, ...d }) {
|
|
1017
1057
|
let f = u(), m = s ?? f, h = p(null);
|
|
1018
1058
|
return D(o, () => h.current?.focus()), /* @__PURE__ */ y("div", {
|
|
1019
1059
|
className: [G.field, c].filter(Boolean).join(" "),
|
|
1020
1060
|
children: [
|
|
1021
|
-
e && /* @__PURE__ */ v(
|
|
1061
|
+
e && /* @__PURE__ */ v(ze, {
|
|
1022
1062
|
htmlFor: m,
|
|
1023
1063
|
children: e
|
|
1024
1064
|
}),
|
|
@@ -1077,11 +1117,11 @@ var K = {
|
|
|
1077
1117
|
};
|
|
1078
1118
|
//#endregion
|
|
1079
1119
|
//#region src/components/TextArea.tsx
|
|
1080
|
-
function
|
|
1120
|
+
function rt(e, t) {
|
|
1081
1121
|
typeof e == "function" ? e(t) : e && (e.current = t);
|
|
1082
1122
|
}
|
|
1083
|
-
function
|
|
1084
|
-
let O = u(), k = l ?? O, A = p(null), j = _ !== void 0, [M,
|
|
1123
|
+
function it({ label: e, helperText: t, error: n, size: r = "base", resize: i = "vertical", autoResize: a = !1, maxRows: o = 8, showCount: c = !1, id: l, className: f, ref: h, rows: g = 3, value: _, defaultValue: b, maxLength: x, disabled: S, readOnly: C, onChange: w, onInput: T, "aria-describedby": E, ...D }) {
|
|
1124
|
+
let O = u(), k = l ?? O, A = p(null), j = _ !== void 0, [M, ee] = m(() => String(b ?? "").length), N = j ? String(_).length : M, P = s(() => {
|
|
1085
1125
|
let e = A.current;
|
|
1086
1126
|
if (!e || !a) return;
|
|
1087
1127
|
let t = getComputedStyle(e), n = parseFloat(t.fontSize) || 14, r = parseFloat(t.lineHeight) || n * 1.4, i = (parseFloat(t.paddingTop) || 0) + (parseFloat(t.paddingBottom) || 0), s = r * o + i;
|
|
@@ -1090,9 +1130,9 @@ function nt({ label: e, helperText: t, error: n, size: r = "base", resize: i = "
|
|
|
1090
1130
|
e.style.height = `${c}px`, e.style.overflowY = e.scrollHeight > s ? "auto" : "hidden";
|
|
1091
1131
|
}, [a, o]);
|
|
1092
1132
|
d(() => {
|
|
1093
|
-
|
|
1133
|
+
P();
|
|
1094
1134
|
}, [
|
|
1095
|
-
|
|
1135
|
+
P,
|
|
1096
1136
|
_,
|
|
1097
1137
|
g,
|
|
1098
1138
|
r
|
|
@@ -1100,44 +1140,44 @@ function nt({ label: e, helperText: t, error: n, size: r = "base", resize: i = "
|
|
|
1100
1140
|
let e = A.current;
|
|
1101
1141
|
if (!a || !e || typeof ResizeObserver > "u") return;
|
|
1102
1142
|
let t = e.clientWidth, n = new ResizeObserver(() => {
|
|
1103
|
-
e.clientWidth !== t && (t = e.clientWidth,
|
|
1143
|
+
e.clientWidth !== t && (t = e.clientWidth, P());
|
|
1104
1144
|
});
|
|
1105
1145
|
return n.observe(e), () => n.disconnect();
|
|
1106
|
-
}, [a,
|
|
1146
|
+
}, [a, P]), d(() => {
|
|
1107
1147
|
let e = A.current;
|
|
1108
1148
|
!a && e && (e.style.height = "", e.style.overflowY = "");
|
|
1109
1149
|
}, [a]);
|
|
1110
|
-
let
|
|
1111
|
-
j ||
|
|
1112
|
-
},
|
|
1113
|
-
j || (
|
|
1114
|
-
},
|
|
1150
|
+
let F = (e) => {
|
|
1151
|
+
j || ee(e.target.value.length), w?.(e);
|
|
1152
|
+
}, te = (e) => {
|
|
1153
|
+
j || (ee(e.currentTarget.value.length), P()), T?.(e);
|
|
1154
|
+
}, ne = `${k}-helper`, I = `${k}-error`, L = `${k}-count`, R = [
|
|
1115
1155
|
E,
|
|
1116
|
-
n ?
|
|
1117
|
-
c ?
|
|
1118
|
-
].filter(Boolean).join(" ") || void 0,
|
|
1156
|
+
n ? I : t ? ne : null,
|
|
1157
|
+
c ? L : null
|
|
1158
|
+
].filter(Boolean).join(" ") || void 0, z = x ? N / x : 0, re = z >= 1 ? K.countLimit : z >= .9 ? K.countNear : "", ie = [
|
|
1119
1159
|
K.wrap,
|
|
1120
1160
|
K[r],
|
|
1121
1161
|
n ? K.errorWrap : "",
|
|
1122
1162
|
S ? K.disabled : "",
|
|
1123
1163
|
C ? K.readOnly : ""
|
|
1124
|
-
].filter(Boolean).join(" "),
|
|
1164
|
+
].filter(Boolean).join(" "), ae = a ? "none" : i;
|
|
1125
1165
|
return /* @__PURE__ */ y("div", {
|
|
1126
1166
|
className: [K.field, f].filter(Boolean).join(" "),
|
|
1127
1167
|
children: [
|
|
1128
|
-
e && /* @__PURE__ */ v(
|
|
1168
|
+
e && /* @__PURE__ */ v(ze, {
|
|
1129
1169
|
htmlFor: k,
|
|
1130
1170
|
children: e
|
|
1131
1171
|
}),
|
|
1132
1172
|
/* @__PURE__ */ v("div", {
|
|
1133
|
-
className:
|
|
1173
|
+
className: ie,
|
|
1134
1174
|
children: /* @__PURE__ */ v("textarea", {
|
|
1135
1175
|
...D,
|
|
1136
1176
|
ref: (e) => {
|
|
1137
|
-
A.current = e,
|
|
1177
|
+
A.current = e, rt(h, e);
|
|
1138
1178
|
},
|
|
1139
1179
|
id: k,
|
|
1140
|
-
className: `${K.textarea} ${K[`resize-${
|
|
1180
|
+
className: `${K.textarea} ${K[`resize-${ae}`]}`,
|
|
1141
1181
|
rows: g,
|
|
1142
1182
|
value: _,
|
|
1143
1183
|
defaultValue: b,
|
|
@@ -1145,25 +1185,25 @@ function nt({ label: e, helperText: t, error: n, size: r = "base", resize: i = "
|
|
|
1145
1185
|
disabled: S,
|
|
1146
1186
|
readOnly: C,
|
|
1147
1187
|
"aria-invalid": n ? !0 : D["aria-invalid"],
|
|
1148
|
-
"aria-describedby":
|
|
1149
|
-
onChange:
|
|
1150
|
-
onInput:
|
|
1188
|
+
"aria-describedby": R,
|
|
1189
|
+
onChange: F,
|
|
1190
|
+
onInput: te
|
|
1151
1191
|
})
|
|
1152
1192
|
}),
|
|
1153
1193
|
(n || t || c) && /* @__PURE__ */ y("div", {
|
|
1154
1194
|
className: K.footer,
|
|
1155
1195
|
children: [n ? /* @__PURE__ */ v("span", {
|
|
1156
|
-
id:
|
|
1196
|
+
id: I,
|
|
1157
1197
|
className: K.errorText,
|
|
1158
1198
|
children: n
|
|
1159
1199
|
}) : t ? /* @__PURE__ */ v("span", {
|
|
1160
|
-
id:
|
|
1200
|
+
id: ne,
|
|
1161
1201
|
className: K.helperText,
|
|
1162
1202
|
children: t
|
|
1163
1203
|
}) : null, c && /* @__PURE__ */ v("span", {
|
|
1164
|
-
id:
|
|
1165
|
-
className: `${K.count} ${
|
|
1166
|
-
children: x ? `${
|
|
1204
|
+
id: L,
|
|
1205
|
+
className: `${K.count} ${re}`,
|
|
1206
|
+
children: x ? `${N} / ${x}` : N
|
|
1167
1207
|
})]
|
|
1168
1208
|
})
|
|
1169
1209
|
]
|
|
@@ -1171,12 +1211,12 @@ function nt({ label: e, helperText: t, error: n, size: r = "base", resize: i = "
|
|
|
1171
1211
|
}
|
|
1172
1212
|
//#endregion
|
|
1173
1213
|
//#region src/components/PasswordField.tsx
|
|
1174
|
-
function
|
|
1214
|
+
function at({ label: e, helperText: t, error: n, size: r = "base", showLabel: i = "Show password", hideLabel: a = "Hide password", defaultVisible: o = !1, id: s, className: c, ref: l, disabled: d, ...f }) {
|
|
1175
1215
|
let p = u(), h = s ?? p, [g, _] = m(o);
|
|
1176
1216
|
return /* @__PURE__ */ y("div", {
|
|
1177
1217
|
className: [G.field, c].filter(Boolean).join(" "),
|
|
1178
1218
|
children: [
|
|
1179
|
-
e && /* @__PURE__ */ v(
|
|
1219
|
+
e && /* @__PURE__ */ v(ze, {
|
|
1180
1220
|
htmlFor: h,
|
|
1181
1221
|
children: e
|
|
1182
1222
|
}),
|
|
@@ -1213,12 +1253,12 @@ function rt({ label: e, helperText: t, error: n, size: r = "base", showLabel: i
|
|
|
1213
1253
|
}
|
|
1214
1254
|
//#endregion
|
|
1215
1255
|
//#region src/components/DateField.tsx
|
|
1216
|
-
function
|
|
1256
|
+
function ot({ label: e, helperText: t, error: n, size: r = "base", openLabel: i = "Open calendar", id: a, className: o, ref: s, onClick: c, disabled: l, ...d }) {
|
|
1217
1257
|
let f = u(), p = a ?? f;
|
|
1218
1258
|
return /* @__PURE__ */ y("div", {
|
|
1219
1259
|
className: [G.field, o].filter(Boolean).join(" "),
|
|
1220
1260
|
children: [
|
|
1221
|
-
e && /* @__PURE__ */ v(
|
|
1261
|
+
e && /* @__PURE__ */ v(ze, {
|
|
1222
1262
|
htmlFor: p,
|
|
1223
1263
|
children: e
|
|
1224
1264
|
}),
|
|
@@ -1252,44 +1292,44 @@ function it({ label: e, helperText: t, error: n, size: r = "base", openLabel: i
|
|
|
1252
1292
|
}
|
|
1253
1293
|
//#endregion
|
|
1254
1294
|
//#region src/utils/date.ts
|
|
1255
|
-
function
|
|
1295
|
+
function st(e) {
|
|
1256
1296
|
return new Date(e.getFullYear(), e.getMonth(), e.getDate());
|
|
1257
1297
|
}
|
|
1258
|
-
function
|
|
1298
|
+
function ct(e, t) {
|
|
1259
1299
|
return new Date(e.getFullYear(), e.getMonth(), e.getDate() + t);
|
|
1260
1300
|
}
|
|
1261
|
-
function
|
|
1301
|
+
function lt(e, t) {
|
|
1262
1302
|
return new Date(e, t + 1, 0).getDate();
|
|
1263
1303
|
}
|
|
1264
|
-
function
|
|
1265
|
-
let n = new Date(e.getFullYear(), e.getMonth() + t, 1), r = Math.min(e.getDate(),
|
|
1304
|
+
function ut(e, t) {
|
|
1305
|
+
let n = new Date(e.getFullYear(), e.getMonth() + t, 1), r = Math.min(e.getDate(), lt(n.getFullYear(), n.getMonth()));
|
|
1266
1306
|
return new Date(n.getFullYear(), n.getMonth(), r);
|
|
1267
1307
|
}
|
|
1268
|
-
function
|
|
1308
|
+
function dt(e, t) {
|
|
1269
1309
|
return e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate();
|
|
1270
1310
|
}
|
|
1271
|
-
function
|
|
1311
|
+
function ft(e, t) {
|
|
1272
1312
|
return e.getFullYear() - t.getFullYear() || e.getMonth() - t.getMonth() || e.getDate() - t.getDate();
|
|
1273
1313
|
}
|
|
1274
|
-
function
|
|
1275
|
-
return !!(t &&
|
|
1314
|
+
function pt(e, t, n) {
|
|
1315
|
+
return !!(t && ft(e, t) < 0 || n && ft(e, n) > 0);
|
|
1276
1316
|
}
|
|
1277
|
-
function
|
|
1278
|
-
return t &&
|
|
1317
|
+
function mt(e, t, n) {
|
|
1318
|
+
return t && ft(e, t) < 0 ? st(t) : n && ft(e, n) > 0 ? st(n) : st(e);
|
|
1279
1319
|
}
|
|
1280
|
-
function
|
|
1281
|
-
return
|
|
1320
|
+
function ht(e, t) {
|
|
1321
|
+
return ct(e, -((e.getDay() - t + 7) % 7));
|
|
1282
1322
|
}
|
|
1283
|
-
function
|
|
1284
|
-
return
|
|
1323
|
+
function gt(e, t) {
|
|
1324
|
+
return ct(ht(e, t), 6);
|
|
1285
1325
|
}
|
|
1286
|
-
var
|
|
1287
|
-
function
|
|
1288
|
-
let r =
|
|
1289
|
-
for (let e = 0; e <
|
|
1326
|
+
var _t = 6;
|
|
1327
|
+
function vt(e, t, n) {
|
|
1328
|
+
let r = ht(new Date(e, t, 1), n), i = [];
|
|
1329
|
+
for (let e = 0; e < _t; e++) {
|
|
1290
1330
|
let n = [];
|
|
1291
1331
|
for (let i = 0; i < 7; i++) {
|
|
1292
|
-
let a =
|
|
1332
|
+
let a = ct(r, e * 7 + i);
|
|
1293
1333
|
n.push({
|
|
1294
1334
|
date: a,
|
|
1295
1335
|
inMonth: a.getMonth() === t
|
|
@@ -1316,28 +1356,28 @@ var q = {
|
|
|
1316
1356
|
rangeStart: "_rangeStart_1mr3c_92",
|
|
1317
1357
|
rangeEnd: "_rangeEnd_1mr3c_96",
|
|
1318
1358
|
hiddenDay: "_hiddenDay_1mr3c_100"
|
|
1319
|
-
},
|
|
1320
|
-
function
|
|
1359
|
+
}, yt = (e) => `${e.getFullYear()}-${e.getMonth() + 1}-${e.getDate()}`;
|
|
1360
|
+
function bt(e, t) {
|
|
1321
1361
|
let n = new Date(e.getFullYear(), e.getMonth() + 1, 0).getDate();
|
|
1322
1362
|
return new Date(e.getFullYear(), e.getMonth(), Math.min(t, n));
|
|
1323
1363
|
}
|
|
1324
|
-
function
|
|
1364
|
+
function xt(e, t) {
|
|
1325
1365
|
return e.charAt(0).toLocaleUpperCase(t) + e.slice(1);
|
|
1326
1366
|
}
|
|
1327
|
-
function
|
|
1328
|
-
let [S, C] = m(() => _ ?
|
|
1329
|
-
w !== T && (E(w), _ && (S.getFullYear() !== _.getFullYear() || S.getMonth() !== _.getMonth()) && C(
|
|
1330
|
-
let D = e ?
|
|
1331
|
-
D !== O && (A(D), e && C(
|
|
1332
|
-
let j = p(null), M = p(!!o),
|
|
1367
|
+
function St({ value: e, onChange: t, minDate: n, maxDate: r, locale: i = "en", weekStartsOn: a = 0, autoFocus: o, previousMonthLabel: s = "Previous month", nextMonthLabel: c = "Next month", className: d, range: h, onDayHover: g, month: _, onMonthChange: b, hideNavigation: x }) {
|
|
1368
|
+
let [S, C] = m(() => _ ? bt(_, (e ?? /* @__PURE__ */ new Date()).getDate()) : mt(e ?? /* @__PURE__ */ new Date(), n, r)), w = _ ? `${_.getFullYear()}-${_.getMonth()}` : null, [T, E] = m(w);
|
|
1369
|
+
w !== T && (E(w), _ && (S.getFullYear() !== _.getFullYear() || S.getMonth() !== _.getMonth()) && C(bt(_, S.getDate())));
|
|
1370
|
+
let D = e ? yt(e) : null, [O, A] = m(D);
|
|
1371
|
+
D !== O && (A(D), e && C(mt(e, n, r)));
|
|
1372
|
+
let j = p(null), M = p(!!o), ee = u();
|
|
1333
1373
|
l(() => {
|
|
1334
|
-
M.current && (M.current = !1, j.current?.querySelector(`[data-date="${
|
|
1374
|
+
M.current && (M.current = !1, j.current?.querySelector(`[data-date="${yt(S)}"]`)?.focus());
|
|
1335
1375
|
}, [S]);
|
|
1336
|
-
let
|
|
1376
|
+
let N = S.getFullYear(), P = S.getMonth(), F = f(() => vt(N, P, a), [
|
|
1377
|
+
N,
|
|
1337
1378
|
P,
|
|
1338
|
-
F,
|
|
1339
1379
|
a
|
|
1340
|
-
]),
|
|
1380
|
+
]), te = st(/* @__PURE__ */ new Date()), ne = !!(h?.start && h.end && ft(h.start, h.end) > 0), I = ne ? h.end : h?.start ?? null, L = ne ? h.start : h?.end ?? null, R = !!(I && L && ft(I, L) !== 0), z = f(() => ({
|
|
1341
1381
|
title: new Intl.DateTimeFormat(i, {
|
|
1342
1382
|
month: "long",
|
|
1343
1383
|
year: "numeric"
|
|
@@ -1345,51 +1385,51 @@ function bt({ value: e, onChange: t, minDate: n, maxDate: r, locale: i = "en", w
|
|
|
1345
1385
|
short: new Intl.DateTimeFormat(i, { weekday: "short" }),
|
|
1346
1386
|
long: new Intl.DateTimeFormat(i, { weekday: "long" }),
|
|
1347
1387
|
full: new Intl.DateTimeFormat(i, { dateStyle: "full" })
|
|
1348
|
-
}), [i]),
|
|
1349
|
-
short:
|
|
1350
|
-
long:
|
|
1351
|
-
})),
|
|
1352
|
-
function
|
|
1388
|
+
}), [i]), re = h ? F.filter((e) => e.some((e) => e.inMonth)) : F, ie = F[0].map(({ date: e }) => ({
|
|
1389
|
+
short: xt(z.short.format(e), i).slice(0, 2),
|
|
1390
|
+
long: z.long.format(e)
|
|
1391
|
+
})), ae = (e) => !!n && new Date(e.getFullYear(), e.getMonth(), 0) < st(n), oe = (e) => !!r && new Date(e.getFullYear(), e.getMonth() + 1, 1) > st(r), se = ae(S), B = oe(S);
|
|
1392
|
+
function V(e) {
|
|
1353
1393
|
b && (e.getFullYear() !== S.getFullYear() || e.getMonth() !== S.getMonth()) && b(e), C(e);
|
|
1354
1394
|
}
|
|
1355
|
-
function
|
|
1356
|
-
M.current = !0,
|
|
1395
|
+
function ce(e) {
|
|
1396
|
+
M.current = !0, V(mt(e, n, r));
|
|
1357
1397
|
}
|
|
1358
|
-
function
|
|
1359
|
-
let t =
|
|
1360
|
-
M.current = e < 0 ?
|
|
1398
|
+
function H(e) {
|
|
1399
|
+
let t = mt(ut(S, e), n, r);
|
|
1400
|
+
M.current = e < 0 ? ae(t) : oe(t), V(t);
|
|
1361
1401
|
}
|
|
1362
|
-
function
|
|
1402
|
+
function le(e) {
|
|
1363
1403
|
let t = null;
|
|
1364
1404
|
switch (e.key) {
|
|
1365
1405
|
case "ArrowLeft":
|
|
1366
|
-
t =
|
|
1406
|
+
t = ct(S, -1);
|
|
1367
1407
|
break;
|
|
1368
1408
|
case "ArrowRight":
|
|
1369
|
-
t =
|
|
1409
|
+
t = ct(S, 1);
|
|
1370
1410
|
break;
|
|
1371
1411
|
case "ArrowUp":
|
|
1372
|
-
t =
|
|
1412
|
+
t = ct(S, -7);
|
|
1373
1413
|
break;
|
|
1374
1414
|
case "ArrowDown":
|
|
1375
|
-
t =
|
|
1415
|
+
t = ct(S, 7);
|
|
1376
1416
|
break;
|
|
1377
1417
|
case "PageUp":
|
|
1378
|
-
t =
|
|
1418
|
+
t = ut(S, -1);
|
|
1379
1419
|
break;
|
|
1380
1420
|
case "PageDown":
|
|
1381
|
-
t =
|
|
1421
|
+
t = ut(S, 1);
|
|
1382
1422
|
break;
|
|
1383
1423
|
case "Home":
|
|
1384
|
-
t =
|
|
1424
|
+
t = ht(S, a);
|
|
1385
1425
|
break;
|
|
1386
|
-
case "End": t =
|
|
1426
|
+
case "End": t = gt(S, a);
|
|
1387
1427
|
}
|
|
1388
|
-
t && (e.preventDefault(),
|
|
1428
|
+
t && (e.preventDefault(), ce(t));
|
|
1389
1429
|
}
|
|
1390
|
-
function
|
|
1391
|
-
let n =
|
|
1392
|
-
|
|
1430
|
+
function ue(e) {
|
|
1431
|
+
let n = st(e);
|
|
1432
|
+
V(n), t(n);
|
|
1393
1433
|
}
|
|
1394
1434
|
return /* @__PURE__ */ y("div", {
|
|
1395
1435
|
className: [q.calendar, d].filter(Boolean).join(" "),
|
|
@@ -1402,14 +1442,14 @@ function bt({ value: e, onChange: t, minDate: n, maxDate: r, locale: i = "en", w
|
|
|
1402
1442
|
className: q.navButton,
|
|
1403
1443
|
leadingIcon: /* @__PURE__ */ v(pe, {}),
|
|
1404
1444
|
"aria-label": s,
|
|
1405
|
-
disabled:
|
|
1406
|
-
onClick: () =>
|
|
1445
|
+
disabled: se,
|
|
1446
|
+
onClick: () => H(-1)
|
|
1407
1447
|
}),
|
|
1408
1448
|
/* @__PURE__ */ v("div", {
|
|
1409
|
-
id:
|
|
1449
|
+
id: ee,
|
|
1410
1450
|
className: q.title,
|
|
1411
1451
|
"aria-live": "polite",
|
|
1412
|
-
children:
|
|
1452
|
+
children: xt(z.title.format(S), i)
|
|
1413
1453
|
}),
|
|
1414
1454
|
x === "next" ? /* @__PURE__ */ v("span", {}) : /* @__PURE__ */ v(k, {
|
|
1415
1455
|
variant: "tertiary",
|
|
@@ -1417,65 +1457,65 @@ function bt({ value: e, onChange: t, minDate: n, maxDate: r, locale: i = "en", w
|
|
|
1417
1457
|
className: q.navButton,
|
|
1418
1458
|
leadingIcon: /* @__PURE__ */ v(he, {}),
|
|
1419
1459
|
"aria-label": c,
|
|
1420
|
-
disabled:
|
|
1421
|
-
onClick: () =>
|
|
1460
|
+
disabled: B,
|
|
1461
|
+
onClick: () => H(1)
|
|
1422
1462
|
})
|
|
1423
1463
|
]
|
|
1424
1464
|
}), /* @__PURE__ */ y("div", {
|
|
1425
1465
|
ref: j,
|
|
1426
1466
|
role: "grid",
|
|
1427
|
-
"aria-labelledby":
|
|
1467
|
+
"aria-labelledby": ee,
|
|
1428
1468
|
className: q.grid,
|
|
1429
|
-
onKeyDown:
|
|
1469
|
+
onKeyDown: le,
|
|
1430
1470
|
onMouseLeave: g ? () => g(null) : void 0,
|
|
1431
1471
|
children: [/* @__PURE__ */ v("div", {
|
|
1432
1472
|
role: "row",
|
|
1433
1473
|
className: q.row,
|
|
1434
|
-
children:
|
|
1474
|
+
children: ie.map((e) => /* @__PURE__ */ v("span", {
|
|
1435
1475
|
role: "columnheader",
|
|
1436
1476
|
"aria-label": e.long,
|
|
1437
1477
|
className: q.weekday,
|
|
1438
1478
|
children: e.short
|
|
1439
1479
|
}, e.long))
|
|
1440
|
-
}),
|
|
1480
|
+
}), re.map((t) => /* @__PURE__ */ v("div", {
|
|
1441
1481
|
role: "row",
|
|
1442
1482
|
className: q.row,
|
|
1443
1483
|
children: t.map(({ date: t, inMonth: i }) => {
|
|
1444
|
-
let a =
|
|
1484
|
+
let a = pt(t, n, r), o = !!I && dt(t, I), s = !!L && dt(t, L), c = !!(I && L) && ft(t, I) > 0 && ft(t, L) < 0, l = h ? o || s : !!e && dt(t, e), u = !!h && !i, d = dt(t, te);
|
|
1445
1485
|
return /* @__PURE__ */ v("button", {
|
|
1446
1486
|
type: "button",
|
|
1447
1487
|
role: "gridcell",
|
|
1448
|
-
"data-date":
|
|
1449
|
-
tabIndex:
|
|
1488
|
+
"data-date": yt(t),
|
|
1489
|
+
tabIndex: dt(t, S) && !u ? 0 : -1,
|
|
1450
1490
|
"aria-selected": l || c,
|
|
1451
1491
|
"aria-hidden": u || void 0,
|
|
1452
1492
|
"aria-disabled": a || void 0,
|
|
1453
1493
|
"aria-current": d ? "date" : void 0,
|
|
1454
|
-
"aria-label":
|
|
1494
|
+
"aria-label": z.full.format(t),
|
|
1455
1495
|
className: [
|
|
1456
1496
|
q.day,
|
|
1457
1497
|
!i && q.outside,
|
|
1458
1498
|
u && q.hiddenDay,
|
|
1459
1499
|
c && q.inRange,
|
|
1460
|
-
|
|
1461
|
-
|
|
1500
|
+
R && o && q.rangeStart,
|
|
1501
|
+
R && s && q.rangeEnd,
|
|
1462
1502
|
d && q.today,
|
|
1463
1503
|
l && q.selected,
|
|
1464
1504
|
a && q.disabled
|
|
1465
1505
|
].filter(Boolean).join(" "),
|
|
1466
1506
|
onMouseDown: a ? (e) => e.preventDefault() : void 0,
|
|
1467
|
-
onClick: a || u ? void 0 : () =>
|
|
1507
|
+
onClick: a || u ? void 0 : () => ue(t),
|
|
1468
1508
|
onMouseEnter: g && !u ? () => g(t) : void 0,
|
|
1469
1509
|
onFocus: g && !u ? () => g(t) : void 0,
|
|
1470
1510
|
children: t.getDate()
|
|
1471
|
-
},
|
|
1511
|
+
}, yt(t));
|
|
1472
1512
|
})
|
|
1473
|
-
},
|
|
1513
|
+
}, yt(t[0].date)))]
|
|
1474
1514
|
})]
|
|
1475
1515
|
});
|
|
1476
1516
|
}
|
|
1477
|
-
var
|
|
1478
|
-
function
|
|
1517
|
+
var Ct = 4, wt = 8;
|
|
1518
|
+
function Tt({ isOpen: e, popupRef: t, getAnchor: n, placement: r, onClose: i, layoutKey: a }) {
|
|
1479
1519
|
let o = s(() => {
|
|
1480
1520
|
let e = t.current, i = n();
|
|
1481
1521
|
if (!e || !i) return;
|
|
@@ -1484,9 +1524,9 @@ function Ct({ isOpen: e, popupRef: t, getAnchor: n, placement: r, onClose: i, la
|
|
|
1484
1524
|
return;
|
|
1485
1525
|
}
|
|
1486
1526
|
let a = i.getBoundingClientRect(), o = e.offsetWidth, s = e.offsetHeight, c = document.documentElement.clientWidth, l = window.innerHeight, u = r === "bottom-end" ? a.right - o : a.left;
|
|
1487
|
-
u = Math.max(
|
|
1488
|
-
let d = a.bottom +
|
|
1489
|
-
m && (d = a.top -
|
|
1527
|
+
u = Math.max(wt, Math.min(u, c - o - wt));
|
|
1528
|
+
let d = a.bottom + Ct, f = d + s <= l - wt, p = a.top - Ct - s >= wt, m = !f && p;
|
|
1529
|
+
m && (d = a.top - Ct - s), e.dataset.flipped = String(m), e.dataset.align = r === "bottom-end" ? "end" : "start", e.style.left = `${u}px`, e.style.top = `${d}px`;
|
|
1490
1530
|
}, [
|
|
1491
1531
|
n,
|
|
1492
1532
|
r,
|
|
@@ -1532,15 +1572,15 @@ function Ct({ isOpen: e, popupRef: t, getAnchor: n, placement: r, onClose: i, la
|
|
|
1532
1572
|
t
|
|
1533
1573
|
]);
|
|
1534
1574
|
}
|
|
1535
|
-
var
|
|
1575
|
+
var Et = { popup: "_popup_eco0g_1" };
|
|
1536
1576
|
//#endregion
|
|
1537
1577
|
//#region src/components/DatePicker.tsx
|
|
1538
|
-
function
|
|
1539
|
-
let [D, O] = m(!1), k = p(null), A = p(null), j = u(), M = D && !i,
|
|
1578
|
+
function Dt({ value: e, onChange: t, minDate: n, maxDate: r, disabled: i, locale: a = "en", weekStartsOn: o = 0, formatValue: c, placement: l = "bottom-start", label: d, helperText: h, error: b, size: x, openLabel: S, placeholder: C, dialogLabel: w = "Choose date", className: T, id: E }) {
|
|
1579
|
+
let [D, O] = m(!1), k = p(null), A = p(null), j = u(), M = D && !i, ee = f(() => new Intl.DateTimeFormat(a, {
|
|
1540
1580
|
month: "short",
|
|
1541
1581
|
day: "2-digit"
|
|
1542
|
-
}), [a]),
|
|
1543
|
-
|
|
1582
|
+
}), [a]), N = e ? c ? c(e) : ee.format(e) : "";
|
|
1583
|
+
Tt({
|
|
1544
1584
|
isOpen: M,
|
|
1545
1585
|
popupRef: A,
|
|
1546
1586
|
getAnchor: s(() => k.current?.parentElement ?? k.current, []),
|
|
@@ -1549,13 +1589,13 @@ function Tt({ value: e, onChange: t, minDate: n, maxDate: r, disabled: i, locale
|
|
|
1549
1589
|
O(!1), e && k.current?.focus();
|
|
1550
1590
|
}, [])
|
|
1551
1591
|
});
|
|
1552
|
-
function
|
|
1592
|
+
function P(e) {
|
|
1553
1593
|
(e.key === "Enter" || e.key === " " || e.key === "ArrowDown") && (e.preventDefault(), i || O(!0));
|
|
1554
1594
|
}
|
|
1555
|
-
function
|
|
1595
|
+
function F(e) {
|
|
1556
1596
|
t(e), O(!1), k.current?.focus();
|
|
1557
1597
|
}
|
|
1558
|
-
return /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(
|
|
1598
|
+
return /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(ot, {
|
|
1559
1599
|
ref: k,
|
|
1560
1600
|
id: E,
|
|
1561
1601
|
className: T,
|
|
@@ -1566,23 +1606,23 @@ function Tt({ value: e, onChange: t, minDate: n, maxDate: r, disabled: i, locale
|
|
|
1566
1606
|
openLabel: S,
|
|
1567
1607
|
placeholder: C,
|
|
1568
1608
|
disabled: i,
|
|
1569
|
-
value:
|
|
1609
|
+
value: N,
|
|
1570
1610
|
role: "combobox",
|
|
1571
1611
|
"aria-haspopup": "dialog",
|
|
1572
1612
|
"aria-expanded": M,
|
|
1573
1613
|
"aria-controls": M ? j : void 0,
|
|
1574
1614
|
onClick: () => !i && O((e) => !e),
|
|
1575
|
-
onKeyDown:
|
|
1615
|
+
onKeyDown: P
|
|
1576
1616
|
}), M && g(/* @__PURE__ */ v("div", {
|
|
1577
1617
|
ref: A,
|
|
1578
1618
|
id: j,
|
|
1579
1619
|
role: "dialog",
|
|
1580
1620
|
"aria-label": w,
|
|
1581
|
-
className:
|
|
1582
|
-
children: /* @__PURE__ */ v(
|
|
1621
|
+
className: Et.popup,
|
|
1622
|
+
children: /* @__PURE__ */ v(St, {
|
|
1583
1623
|
autoFocus: !0,
|
|
1584
1624
|
value: e,
|
|
1585
|
-
onChange:
|
|
1625
|
+
onChange: F,
|
|
1586
1626
|
minDate: n,
|
|
1587
1627
|
maxDate: r,
|
|
1588
1628
|
locale: a,
|
|
@@ -1590,7 +1630,7 @@ function Tt({ value: e, onChange: t, minDate: n, maxDate: r, disabled: i, locale
|
|
|
1590
1630
|
})
|
|
1591
1631
|
}), document.body)] });
|
|
1592
1632
|
}
|
|
1593
|
-
var
|
|
1633
|
+
var Ot = {
|
|
1594
1634
|
skeleton: "_skeleton_5dl4r_2",
|
|
1595
1635
|
rect: "_rect_5dl4r_7",
|
|
1596
1636
|
text: "_text_5dl4r_13",
|
|
@@ -1600,11 +1640,11 @@ var Et = {
|
|
|
1600
1640
|
};
|
|
1601
1641
|
//#endregion
|
|
1602
1642
|
//#region src/components/Skeleton.tsx
|
|
1603
|
-
function
|
|
1643
|
+
function kt({ variant: e = "rect", width: t, height: n, size: r, animated: i = !0, className: a, "data-testid": o }) {
|
|
1604
1644
|
let s = [
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
i &&
|
|
1645
|
+
Ot.skeleton,
|
|
1646
|
+
Ot[e],
|
|
1647
|
+
i && Ot.animated,
|
|
1608
1648
|
a
|
|
1609
1649
|
].filter(Boolean).join(" "), c = {};
|
|
1610
1650
|
return e === "circle" && r !== void 0 && (c.width = r, c.height = r), t !== void 0 && (c.width = t), n !== void 0 && (c.height = n), /* @__PURE__ */ v("div", {
|
|
@@ -1616,12 +1656,12 @@ function Dt({ variant: e = "rect", width: t, height: n, size: r, animated: i = !
|
|
|
1616
1656
|
}
|
|
1617
1657
|
//#endregion
|
|
1618
1658
|
//#region src/utils/dateRange.ts
|
|
1619
|
-
function
|
|
1659
|
+
function At(e) {
|
|
1620
1660
|
return e.start !== null && e.end !== null;
|
|
1621
1661
|
}
|
|
1622
|
-
function
|
|
1623
|
-
let n =
|
|
1624
|
-
return e.start && !e.end &&
|
|
1662
|
+
function jt(e, t) {
|
|
1663
|
+
let n = st(t);
|
|
1664
|
+
return e.start && !e.end && ft(n, e.start) >= 0 ? {
|
|
1625
1665
|
start: e.start,
|
|
1626
1666
|
end: n
|
|
1627
1667
|
} : {
|
|
@@ -1629,8 +1669,8 @@ function kt(e, t) {
|
|
|
1629
1669
|
end: null
|
|
1630
1670
|
};
|
|
1631
1671
|
}
|
|
1632
|
-
function
|
|
1633
|
-
return e.start && !e.end && t ?
|
|
1672
|
+
function Mt(e, t) {
|
|
1673
|
+
return e.start && !e.end && t ? ft(t, e.start) < 0 ? {
|
|
1634
1674
|
start: t,
|
|
1635
1675
|
end: e.start
|
|
1636
1676
|
} : {
|
|
@@ -1638,8 +1678,8 @@ function At(e, t) {
|
|
|
1638
1678
|
end: t
|
|
1639
1679
|
} : e;
|
|
1640
1680
|
}
|
|
1641
|
-
var
|
|
1642
|
-
function
|
|
1681
|
+
var Nt = " – ";
|
|
1682
|
+
function Pt(e, { locale: t, today: n = /* @__PURE__ */ new Date(), formatValue: r }) {
|
|
1643
1683
|
let { start: i, end: a } = e;
|
|
1644
1684
|
if (!i && !a) return "";
|
|
1645
1685
|
let o = new Intl.DateTimeFormat(t, {
|
|
@@ -1650,7 +1690,7 @@ function Mt(e, { locale: t, today: n = /* @__PURE__ */ new Date(), formatValue:
|
|
|
1650
1690
|
day: "2-digit",
|
|
1651
1691
|
year: "numeric"
|
|
1652
1692
|
}), c = [i, a].some((e) => e && e.getFullYear() !== n.getFullYear()), l = (e) => r ? r(e) : (c ? s : o).format(e);
|
|
1653
|
-
return i && !a ? l(i) : !i && a ? l(a) :
|
|
1693
|
+
return i && !a ? l(i) : !i && a ? l(a) : dt(i, a) ? l(i) : `${l(i)}${Nt}${l(a)}`;
|
|
1654
1694
|
}
|
|
1655
1695
|
var J = {
|
|
1656
1696
|
field: "_field_18ses_1",
|
|
@@ -1673,87 +1713,87 @@ var J = {
|
|
|
1673
1713
|
months: "_months_18ses_214",
|
|
1674
1714
|
month: "_month_18ses_214",
|
|
1675
1715
|
footer: "_footer_18ses_222"
|
|
1676
|
-
},
|
|
1677
|
-
function
|
|
1716
|
+
}, Ft = "(min-width: 640px)";
|
|
1717
|
+
function It(e) {
|
|
1678
1718
|
return h((t) => {
|
|
1679
1719
|
let n = window.matchMedia(e);
|
|
1680
1720
|
return n.addEventListener("change", t), () => n.removeEventListener("change", t);
|
|
1681
1721
|
}, () => window.matchMedia(e).matches, () => !1);
|
|
1682
1722
|
}
|
|
1683
|
-
var
|
|
1684
|
-
function
|
|
1685
|
-
let i =
|
|
1686
|
-
return r && (i =
|
|
1723
|
+
var Lt = (e) => new Date(e.getFullYear(), e.getMonth(), 1), Rt = (e, t) => e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth();
|
|
1724
|
+
function zt(e, t, n, r) {
|
|
1725
|
+
let i = Lt(e.end ?? e.start ?? n ?? /* @__PURE__ */ new Date());
|
|
1726
|
+
return r && (i = ut(i, -1)), t && ft(i, Lt(t)) < 0 && (i = Lt(t)), i;
|
|
1687
1727
|
}
|
|
1688
|
-
function
|
|
1689
|
-
let [
|
|
1728
|
+
function Bt({ value: e, onChange: t, minDate: n, maxDate: r, presets: i = [], activePresetId: a, disabled: o, loading: c, locale: l = "en", weekStartsOn: d = 0, formatValue: h, placement: b = "bottom-start", size: x = "base", label: S, helperText: C, error: w, placeholder: T = "Select period", openLabel: E = "Choose period", dialogLabel: D = "Choose period", applyLabel: O = "Apply", cancelLabel: A = "Cancel", className: j, id: M }) {
|
|
1729
|
+
let [ee, N] = m(!1), [P, F] = m({
|
|
1690
1730
|
start: null,
|
|
1691
1731
|
end: null
|
|
1692
|
-
}), [
|
|
1732
|
+
}), [te, ne] = m(null), [I, L] = m(() => zt(e, n, r, !0)), [R, z] = m(() => st(/* @__PURE__ */ new Date())), re = p(null), ie = p(null), ae = u(), oe = M ?? ae, se = u(), B = It(Ft), V = ee && !o && !c, ce = a ? i.find((e) => e.id === a) : void 0, H = (e, t) => e && t ? ft(e, t) === 0 : e === t, ue = V && !!P.start && !(H(P.start, e.start) && H(P.end, e.end)), U = f(() => ue ? Pt(P, {
|
|
1693
1733
|
locale: l,
|
|
1694
1734
|
formatValue: h
|
|
1695
|
-
}) :
|
|
1735
|
+
}) : ce?.label ?? Pt(e, {
|
|
1696
1736
|
locale: l,
|
|
1697
1737
|
formatValue: h
|
|
1698
1738
|
}), [
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1739
|
+
ue,
|
|
1740
|
+
P,
|
|
1741
|
+
ce,
|
|
1702
1742
|
e,
|
|
1703
1743
|
l,
|
|
1704
1744
|
h
|
|
1705
|
-
]),
|
|
1706
|
-
|
|
1745
|
+
]), W = s(() => re.current, []), fe = s((e) => {
|
|
1746
|
+
N(!1), e && re.current?.focus();
|
|
1707
1747
|
}, []);
|
|
1708
|
-
|
|
1709
|
-
isOpen:
|
|
1710
|
-
popupRef:
|
|
1711
|
-
getAnchor:
|
|
1748
|
+
Tt({
|
|
1749
|
+
isOpen: V,
|
|
1750
|
+
popupRef: ie,
|
|
1751
|
+
getAnchor: W,
|
|
1712
1752
|
placement: b,
|
|
1713
1753
|
onClose: fe,
|
|
1714
|
-
layoutKey: `${
|
|
1754
|
+
layoutKey: `${B}-${I.getTime()}`
|
|
1715
1755
|
});
|
|
1716
1756
|
function pe() {
|
|
1717
|
-
o || c || (
|
|
1757
|
+
o || c || (F({
|
|
1718
1758
|
start: e.start,
|
|
1719
1759
|
end: e.end
|
|
1720
|
-
}),
|
|
1760
|
+
}), ne(null), L(zt(e, n, r, B)), z(e.end ?? e.start ?? st(/* @__PURE__ */ new Date())), N(!0));
|
|
1721
1761
|
}
|
|
1722
1762
|
function me() {
|
|
1723
|
-
|
|
1763
|
+
V ? fe(!1) : pe();
|
|
1724
1764
|
}
|
|
1725
1765
|
function he(e) {
|
|
1726
|
-
e.key === "ArrowDown" && !
|
|
1766
|
+
e.key === "ArrowDown" && !V && (e.preventDefault(), pe());
|
|
1727
1767
|
}
|
|
1728
1768
|
function ge(e) {
|
|
1729
1769
|
t(e.range()), fe(!0);
|
|
1730
1770
|
}
|
|
1731
1771
|
function _e() {
|
|
1732
|
-
|
|
1733
|
-
start:
|
|
1734
|
-
end:
|
|
1772
|
+
At(P) && (t({
|
|
1773
|
+
start: P.start,
|
|
1774
|
+
end: P.end
|
|
1735
1775
|
}), fe(!0));
|
|
1736
1776
|
}
|
|
1737
|
-
let ve = (e) => (t) =>
|
|
1738
|
-
value:
|
|
1739
|
-
onChange: (e) =>
|
|
1777
|
+
let ve = (e) => (t) => L(ut(Lt(t), -e)), ye = Mt(P, te), be = ut(I, 1), xe = B && Rt(R, be), Se = {
|
|
1778
|
+
value: R,
|
|
1779
|
+
onChange: (e) => F((t) => jt(t, e)),
|
|
1740
1780
|
minDate: n,
|
|
1741
1781
|
maxDate: r,
|
|
1742
1782
|
locale: l,
|
|
1743
1783
|
weekStartsOn: d,
|
|
1744
1784
|
range: ye,
|
|
1745
|
-
onDayHover:
|
|
1785
|
+
onDayHover: ne
|
|
1746
1786
|
}, Ce = i.length > 0;
|
|
1747
1787
|
return /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ y("div", {
|
|
1748
1788
|
className: [J.field, j].filter(Boolean).join(" "),
|
|
1749
1789
|
children: [
|
|
1750
|
-
S && /* @__PURE__ */ v(
|
|
1751
|
-
htmlFor:
|
|
1790
|
+
S && /* @__PURE__ */ v(ze, {
|
|
1791
|
+
htmlFor: oe,
|
|
1752
1792
|
children: S
|
|
1753
1793
|
}),
|
|
1754
1794
|
/* @__PURE__ */ y("button", {
|
|
1755
|
-
ref:
|
|
1756
|
-
id:
|
|
1795
|
+
ref: re,
|
|
1796
|
+
id: oe,
|
|
1757
1797
|
type: "button",
|
|
1758
1798
|
className: [
|
|
1759
1799
|
J.trigger,
|
|
@@ -1763,8 +1803,8 @@ function Rt({ value: e, onChange: t, minDate: n, maxDate: r, presets: i = [], ac
|
|
|
1763
1803
|
disabled: o || c,
|
|
1764
1804
|
"aria-label": S ? void 0 : E,
|
|
1765
1805
|
"aria-haspopup": "dialog",
|
|
1766
|
-
"aria-expanded":
|
|
1767
|
-
"aria-controls":
|
|
1806
|
+
"aria-expanded": V,
|
|
1807
|
+
"aria-controls": V ? se : void 0,
|
|
1768
1808
|
"aria-busy": c || void 0,
|
|
1769
1809
|
onClick: me,
|
|
1770
1810
|
onKeyDown: he,
|
|
@@ -1772,20 +1812,20 @@ function Rt({ value: e, onChange: t, minDate: n, maxDate: r, presets: i = [], ac
|
|
|
1772
1812
|
/* @__PURE__ */ v("span", {
|
|
1773
1813
|
className: J.icon,
|
|
1774
1814
|
"aria-hidden": !0,
|
|
1775
|
-
children: /* @__PURE__ */ v(
|
|
1815
|
+
children: /* @__PURE__ */ v(le, {})
|
|
1776
1816
|
}),
|
|
1777
1817
|
c ? /* @__PURE__ */ v("span", {
|
|
1778
1818
|
className: J.value,
|
|
1779
|
-
children: /* @__PURE__ */ v(
|
|
1819
|
+
children: /* @__PURE__ */ v(kt, {
|
|
1780
1820
|
variant: "text",
|
|
1781
1821
|
width: "60%"
|
|
1782
1822
|
})
|
|
1783
1823
|
}) : /* @__PURE__ */ v("span", {
|
|
1784
|
-
className: [J.value, !
|
|
1785
|
-
children:
|
|
1824
|
+
className: [J.value, !U && J.placeholder].filter(Boolean).join(" "),
|
|
1825
|
+
children: U || T
|
|
1786
1826
|
}),
|
|
1787
1827
|
/* @__PURE__ */ v("span", {
|
|
1788
|
-
className: [J.chevron,
|
|
1828
|
+
className: [J.chevron, V && J.chevronOpen].filter(Boolean).join(" "),
|
|
1789
1829
|
"aria-hidden": !0,
|
|
1790
1830
|
children: /* @__PURE__ */ v(de, {})
|
|
1791
1831
|
})
|
|
@@ -1799,9 +1839,9 @@ function Rt({ value: e, onChange: t, minDate: n, maxDate: r, presets: i = [], ac
|
|
|
1799
1839
|
children: C
|
|
1800
1840
|
}) : null
|
|
1801
1841
|
]
|
|
1802
|
-
}),
|
|
1803
|
-
ref:
|
|
1804
|
-
id:
|
|
1842
|
+
}), V && g(/* @__PURE__ */ y("div", {
|
|
1843
|
+
ref: ie,
|
|
1844
|
+
id: se,
|
|
1805
1845
|
role: "dialog",
|
|
1806
1846
|
"aria-label": D,
|
|
1807
1847
|
className: J.popup,
|
|
@@ -1822,16 +1862,16 @@ function Rt({ value: e, onChange: t, minDate: n, maxDate: r, presets: i = [], ac
|
|
|
1822
1862
|
className: J.months,
|
|
1823
1863
|
children: [/* @__PURE__ */ v("div", {
|
|
1824
1864
|
className: J.month,
|
|
1825
|
-
children: /* @__PURE__ */ v(
|
|
1865
|
+
children: /* @__PURE__ */ v(St, {
|
|
1826
1866
|
...Se,
|
|
1827
1867
|
autoFocus: !xe,
|
|
1828
|
-
month:
|
|
1868
|
+
month: I,
|
|
1829
1869
|
onMonthChange: ve(0),
|
|
1830
|
-
hideNavigation:
|
|
1870
|
+
hideNavigation: B ? "next" : void 0
|
|
1831
1871
|
})
|
|
1832
|
-
}),
|
|
1872
|
+
}), B && /* @__PURE__ */ v("div", {
|
|
1833
1873
|
className: J.month,
|
|
1834
|
-
children: /* @__PURE__ */ v(
|
|
1874
|
+
children: /* @__PURE__ */ v(St, {
|
|
1835
1875
|
...Se,
|
|
1836
1876
|
autoFocus: xe,
|
|
1837
1877
|
month: be,
|
|
@@ -1849,7 +1889,7 @@ function Rt({ value: e, onChange: t, minDate: n, maxDate: r, presets: i = [], ac
|
|
|
1849
1889
|
}), /* @__PURE__ */ v(k, {
|
|
1850
1890
|
variant: "primary",
|
|
1851
1891
|
size: "sm",
|
|
1852
|
-
disabled: !
|
|
1892
|
+
disabled: !At(P),
|
|
1853
1893
|
onClick: _e,
|
|
1854
1894
|
children: O
|
|
1855
1895
|
})]
|
|
@@ -1857,7 +1897,7 @@ function Rt({ value: e, onChange: t, minDate: n, maxDate: r, presets: i = [], ac
|
|
|
1857
1897
|
})]
|
|
1858
1898
|
}), document.body)] });
|
|
1859
1899
|
}
|
|
1860
|
-
var
|
|
1900
|
+
var Vt = {
|
|
1861
1901
|
field: "_field_l0zl7_1",
|
|
1862
1902
|
inputWrap: "_inputWrap_l0zl7_6",
|
|
1863
1903
|
errorWrap: "_errorWrap_l0zl7_19",
|
|
@@ -1871,64 +1911,64 @@ var zt = {
|
|
|
1871
1911
|
};
|
|
1872
1912
|
//#endregion
|
|
1873
1913
|
//#region src/components/NumberField.tsx
|
|
1874
|
-
function
|
|
1914
|
+
function Ht({ label: e, helperText: t, error: n, size: r = "base", prefix: i, suffix: a, id: o, ...s }) {
|
|
1875
1915
|
let c = u(), l = o ?? c;
|
|
1876
1916
|
return /* @__PURE__ */ y("div", {
|
|
1877
|
-
className:
|
|
1917
|
+
className: Vt.field,
|
|
1878
1918
|
children: [
|
|
1879
|
-
e && /* @__PURE__ */ v(
|
|
1919
|
+
e && /* @__PURE__ */ v(ze, {
|
|
1880
1920
|
htmlFor: l,
|
|
1881
1921
|
children: e
|
|
1882
1922
|
}),
|
|
1883
1923
|
/* @__PURE__ */ y("div", {
|
|
1884
|
-
className: `${
|
|
1924
|
+
className: `${Vt.inputWrap} ${Vt[r]} ${n ? Vt.errorWrap : ""}`,
|
|
1885
1925
|
children: [
|
|
1886
1926
|
i && /* @__PURE__ */ v("span", {
|
|
1887
|
-
className:
|
|
1927
|
+
className: Vt.prefix,
|
|
1888
1928
|
children: i
|
|
1889
1929
|
}),
|
|
1890
1930
|
/* @__PURE__ */ v("input", {
|
|
1891
1931
|
id: l,
|
|
1892
|
-
className:
|
|
1932
|
+
className: Vt.input,
|
|
1893
1933
|
...s
|
|
1894
1934
|
}),
|
|
1895
1935
|
a && /* @__PURE__ */ v("span", {
|
|
1896
|
-
className:
|
|
1936
|
+
className: Vt.suffix,
|
|
1897
1937
|
children: a
|
|
1898
1938
|
})
|
|
1899
1939
|
]
|
|
1900
1940
|
}),
|
|
1901
1941
|
n ? /* @__PURE__ */ v("span", {
|
|
1902
|
-
className:
|
|
1942
|
+
className: Vt.errorText,
|
|
1903
1943
|
children: n
|
|
1904
1944
|
}) : t ? /* @__PURE__ */ v("span", {
|
|
1905
|
-
className:
|
|
1945
|
+
className: Vt.helperText,
|
|
1906
1946
|
children: t
|
|
1907
1947
|
}) : null
|
|
1908
1948
|
]
|
|
1909
1949
|
});
|
|
1910
1950
|
}
|
|
1911
|
-
var
|
|
1951
|
+
var Ut = {
|
|
1912
1952
|
menu: "_menu_xz84k_1",
|
|
1913
1953
|
divider: "_divider_xz84k_15"
|
|
1914
1954
|
};
|
|
1915
1955
|
//#endregion
|
|
1916
1956
|
//#region src/components/Menu.tsx
|
|
1917
|
-
function
|
|
1957
|
+
function Wt({ children: e, ...t }) {
|
|
1918
1958
|
return /* @__PURE__ */ v("div", {
|
|
1919
1959
|
role: "menu",
|
|
1920
|
-
className:
|
|
1960
|
+
className: Ut.menu,
|
|
1921
1961
|
...t,
|
|
1922
1962
|
children: e
|
|
1923
1963
|
});
|
|
1924
1964
|
}
|
|
1925
|
-
function
|
|
1965
|
+
function Gt() {
|
|
1926
1966
|
return /* @__PURE__ */ v("div", {
|
|
1927
|
-
className:
|
|
1967
|
+
className: Ut.divider,
|
|
1928
1968
|
role: "separator"
|
|
1929
1969
|
});
|
|
1930
1970
|
}
|
|
1931
|
-
var
|
|
1971
|
+
var Kt = {
|
|
1932
1972
|
item: "_item_15ucz_1",
|
|
1933
1973
|
base: "_base_15ucz_21",
|
|
1934
1974
|
icon: "_icon_15ucz_28",
|
|
@@ -1941,12 +1981,12 @@ var Wt = {
|
|
|
1941
1981
|
};
|
|
1942
1982
|
//#endregion
|
|
1943
1983
|
//#region src/components/MenuItem.tsx
|
|
1944
|
-
function
|
|
1984
|
+
function qt({ leading: e, icon: t, trailing: n, selected: r, destructive: i, size: a = "sm", children: o, ...s }) {
|
|
1945
1985
|
let c = [
|
|
1946
|
-
|
|
1947
|
-
a === "base" &&
|
|
1948
|
-
r &&
|
|
1949
|
-
i &&
|
|
1986
|
+
Kt.item,
|
|
1987
|
+
a === "base" && Kt.base,
|
|
1988
|
+
r && Kt.selected,
|
|
1989
|
+
i && Kt.destructive
|
|
1950
1990
|
].filter(Boolean).join(" ");
|
|
1951
1991
|
return /* @__PURE__ */ y("button", {
|
|
1952
1992
|
type: "button",
|
|
@@ -1955,24 +1995,24 @@ function Gt({ leading: e, icon: t, trailing: n, selected: r, destructive: i, siz
|
|
|
1955
1995
|
...s,
|
|
1956
1996
|
children: [
|
|
1957
1997
|
e && /* @__PURE__ */ v("span", {
|
|
1958
|
-
className:
|
|
1998
|
+
className: Kt.leading,
|
|
1959
1999
|
children: e
|
|
1960
2000
|
}),
|
|
1961
2001
|
t && /* @__PURE__ */ v("span", {
|
|
1962
|
-
className:
|
|
2002
|
+
className: Kt.icon,
|
|
1963
2003
|
children: t
|
|
1964
2004
|
}),
|
|
1965
2005
|
/* @__PURE__ */ v("span", {
|
|
1966
|
-
className:
|
|
2006
|
+
className: Kt.label,
|
|
1967
2007
|
children: o
|
|
1968
2008
|
}),
|
|
1969
2009
|
n && /* @__PURE__ */ v("span", {
|
|
1970
|
-
className:
|
|
2010
|
+
className: Kt.trailing,
|
|
1971
2011
|
children: n
|
|
1972
2012
|
}),
|
|
1973
2013
|
r && /* @__PURE__ */ v("span", {
|
|
1974
|
-
className:
|
|
1975
|
-
children: /* @__PURE__ */ v(
|
|
2014
|
+
className: Kt.check,
|
|
2015
|
+
children: /* @__PURE__ */ v(U, {})
|
|
1976
2016
|
})
|
|
1977
2017
|
]
|
|
1978
2018
|
});
|
|
@@ -2014,15 +2054,15 @@ var Y = {
|
|
|
2014
2054
|
};
|
|
2015
2055
|
//#endregion
|
|
2016
2056
|
//#region src/components/Dropdown.tsx
|
|
2017
|
-
function
|
|
2057
|
+
function Jt(e) {
|
|
2018
2058
|
return e.searchText === void 0 ? typeof e.label == "string" || typeof e.label == "number" ? String(e.label) : "" : e.searchText;
|
|
2019
2059
|
}
|
|
2020
|
-
function
|
|
2060
|
+
function Yt(e) {
|
|
2021
2061
|
return typeof e.label == "string" || typeof e.label == "number" ? String(e.label) : e.searchText;
|
|
2022
2062
|
}
|
|
2023
|
-
var
|
|
2024
|
-
function
|
|
2025
|
-
let { variant: t = "field", triggerLabel: n, menuAlign: r = "start", label: i, helperText: a, error: o, size: c = "base", placeholder: f = "Select…", options: h, disabled: g, searchable: b, searchPlaceholder: x = "Search…", noResultsText: S = "No matches", defaultOpen: C = !1, autoFocus: w, className: T, labelClassName: E, "aria-label": D, "data-testid": O } = e, A = e.multiple === !0, [j, M] = m(C), [
|
|
2063
|
+
var Xt = (e) => `and ${e} more`;
|
|
2064
|
+
function Zt(e) {
|
|
2065
|
+
let { variant: t = "field", triggerLabel: n, menuAlign: r = "start", label: i, helperText: a, error: o, size: c = "base", placeholder: f = "Select…", options: h, disabled: g, searchable: b, searchPlaceholder: x = "Search…", noResultsText: S = "No matches", defaultOpen: C = !1, autoFocus: w, className: T, labelClassName: E, "aria-label": D, "data-testid": O } = e, A = e.multiple === !0, [j, M] = m(C), [ee, N] = m(C), [P, F] = m(""), [te, ne] = m(!1), [I, L] = m(null), R = p(null), z = p(null), re = p(null), ie = p(null), ae = s((e) => {
|
|
2026
2066
|
if (!e) return;
|
|
2027
2067
|
let t = () => e.toggleAttribute("data-scrollable", e.scrollHeight > e.clientHeight);
|
|
2028
2068
|
t();
|
|
@@ -2033,61 +2073,61 @@ function Yt(e) {
|
|
|
2033
2073
|
return r.observe(e, { childList: !0 }), () => {
|
|
2034
2074
|
n.disconnect(), r.disconnect();
|
|
2035
2075
|
};
|
|
2036
|
-
}, []),
|
|
2076
|
+
}, []), oe = u(), se = u(), B = e.multiple ? void 0 : e.value, V = e.multiple && e.value || [], ce = V.map((e) => h.find((t) => t.value === e)).filter((e) => e !== void 0), H = A ? void 0 : h.find((e) => e.value === B), le = P.trim().toLowerCase(), ue = b && le ? h.filter((e) => Jt(e).toLowerCase().includes(le)) : h, U = ue.filter((e) => !e.disabled).map((e) => e.value), W = t === "field";
|
|
2037
2077
|
function fe() {
|
|
2038
|
-
|
|
2078
|
+
N(!0), M(!0);
|
|
2039
2079
|
}
|
|
2040
2080
|
function pe() {
|
|
2041
|
-
M(!1),
|
|
2081
|
+
M(!1), F("");
|
|
2042
2082
|
}
|
|
2043
2083
|
l(() => {
|
|
2044
2084
|
if (!j) return;
|
|
2045
2085
|
if (b) {
|
|
2046
|
-
|
|
2086
|
+
ie.current?.focus();
|
|
2047
2087
|
return;
|
|
2048
2088
|
}
|
|
2049
|
-
let e = (A ?
|
|
2050
|
-
(
|
|
2089
|
+
let e = (A ? ce.find((e) => !e.disabled)?.value : B) ?? U[0];
|
|
2090
|
+
(R.current?.querySelector(`[data-value="${e}"]`))?.focus();
|
|
2051
2091
|
}, [j]), d(() => {
|
|
2052
|
-
if (!j || !
|
|
2053
|
-
let e =
|
|
2054
|
-
|
|
2092
|
+
if (!j || !re.current || !R.current) return;
|
|
2093
|
+
let e = R.current.getBoundingClientRect(), t = re.current.offsetHeight, n = window.innerHeight - e.bottom, r = e.top;
|
|
2094
|
+
ne(n < t + 8 && r > n);
|
|
2055
2095
|
}, [j]), l(() => {
|
|
2056
2096
|
if (!j) return;
|
|
2057
2097
|
function e(e) {
|
|
2058
|
-
|
|
2098
|
+
R.current?.contains(e.target) || pe();
|
|
2059
2099
|
}
|
|
2060
2100
|
function t(e) {
|
|
2061
|
-
e.key === "Escape" && (pe(),
|
|
2101
|
+
e.key === "Escape" && (pe(), z.current?.focus()), e.key === "Tab" && A && pe();
|
|
2062
2102
|
}
|
|
2063
2103
|
return window.addEventListener("pointerdown", e), window.addEventListener("keydown", t), () => {
|
|
2064
2104
|
window.removeEventListener("pointerdown", e), window.removeEventListener("keydown", t);
|
|
2065
2105
|
};
|
|
2066
2106
|
}, [j, A]);
|
|
2067
2107
|
function me(e) {
|
|
2068
|
-
e !== void 0 &&
|
|
2108
|
+
e !== void 0 && R.current?.querySelector(`[data-value="${e}"]`)?.focus();
|
|
2069
2109
|
}
|
|
2070
2110
|
function he(e) {
|
|
2071
2111
|
(e.key === "ArrowDown" || e.key === "Enter" || e.key === " ") && (e.preventDefault(), fe());
|
|
2072
2112
|
}
|
|
2073
2113
|
function ge(e) {
|
|
2074
|
-
e.key === "ArrowDown" && (e.preventDefault(), me(
|
|
2114
|
+
e.key === "ArrowDown" && (e.preventDefault(), me(U[0])), e.key === "Enter" && U.length === 1 && (e.preventDefault(), ye(U[0]));
|
|
2075
2115
|
}
|
|
2076
2116
|
function _e(e, t) {
|
|
2077
|
-
let n =
|
|
2117
|
+
let n = U.indexOf(t);
|
|
2078
2118
|
if (n === -1) return;
|
|
2079
2119
|
let r = null;
|
|
2080
|
-
if (e.key === "ArrowDown" && (r = (n + 1) %
|
|
2120
|
+
if (e.key === "ArrowDown" && (r = (n + 1) % U.length), e.key === "ArrowUp") {
|
|
2081
2121
|
if (b && n === 0) {
|
|
2082
|
-
e.preventDefault(),
|
|
2122
|
+
e.preventDefault(), ie.current?.focus();
|
|
2083
2123
|
return;
|
|
2084
2124
|
}
|
|
2085
|
-
r = (n - 1 +
|
|
2125
|
+
r = (n - 1 + U.length) % U.length;
|
|
2086
2126
|
}
|
|
2087
|
-
e.key === "Home" && (r = 0), e.key === "End" && (r =
|
|
2127
|
+
e.key === "Home" && (r = 0), e.key === "End" && (r = U.length - 1), r !== null && (e.preventDefault(), me(U[r]));
|
|
2088
2128
|
}
|
|
2089
2129
|
function ve(e) {
|
|
2090
|
-
|
|
2130
|
+
L((t) => ({
|
|
2091
2131
|
top: e.offsetTop,
|
|
2092
2132
|
height: e.offsetHeight,
|
|
2093
2133
|
instant: !t
|
|
@@ -2099,22 +2139,22 @@ function Yt(e) {
|
|
|
2099
2139
|
e.onChange(n.includes(t) ? n.filter((e) => e !== t) : [...n, t]);
|
|
2100
2140
|
return;
|
|
2101
2141
|
}
|
|
2102
|
-
e.onChange(t), pe(),
|
|
2142
|
+
e.onChange(t), pe(), z.current?.focus();
|
|
2103
2143
|
}
|
|
2104
2144
|
function be() {
|
|
2105
|
-
if (e.multiple && e.renderTriggerLabel) return e.renderTriggerLabel(
|
|
2106
|
-
let t =
|
|
2107
|
-
if (
|
|
2108
|
-
let n =
|
|
2109
|
-
return n === void 0 ? `${
|
|
2145
|
+
if (e.multiple && e.renderTriggerLabel) return e.renderTriggerLabel(ce);
|
|
2146
|
+
let t = ce[0];
|
|
2147
|
+
if (ce.length === 1) return t.label;
|
|
2148
|
+
let n = Yt(t);
|
|
2149
|
+
return n === void 0 ? `${ce.length} selected` : `${n} ${(e.multiple && e.moreText || Xt)(ce.length - 1)}`;
|
|
2110
2150
|
}
|
|
2111
|
-
let xe = n === void 0 && (A ?
|
|
2151
|
+
let xe = n === void 0 && (A ? ce.length === 0 : !H), Se = A && e.triggerPrefix ? /* @__PURE__ */ y("span", {
|
|
2112
2152
|
className: Y.prefix,
|
|
2113
2153
|
children: [e.triggerPrefix, " "]
|
|
2114
|
-
}) : null, Ce = n ?? (xe ? f : A ? be() :
|
|
2154
|
+
}) : null, Ce = n ?? (xe ? f : A ? be() : H?.label), we = /* @__PURE__ */ y(_, { children: [Se, Ce] }), Te = {
|
|
2115
2155
|
"aria-haspopup": "listbox",
|
|
2116
2156
|
"aria-expanded": j,
|
|
2117
|
-
"aria-controls": j ?
|
|
2157
|
+
"aria-controls": j ? se : void 0,
|
|
2118
2158
|
"aria-label": i ? void 0 : D,
|
|
2119
2159
|
autoFocus: w,
|
|
2120
2160
|
disabled: g,
|
|
@@ -2122,26 +2162,26 @@ function Yt(e) {
|
|
|
2122
2162
|
onKeyDown: he
|
|
2123
2163
|
};
|
|
2124
2164
|
return /* @__PURE__ */ y("div", {
|
|
2125
|
-
className: [
|
|
2126
|
-
ref:
|
|
2165
|
+
className: [W ? Y.field : Y.fieldInline, T].filter(Boolean).join(" "),
|
|
2166
|
+
ref: R,
|
|
2127
2167
|
"data-testid": O,
|
|
2128
2168
|
children: [
|
|
2129
|
-
|
|
2130
|
-
htmlFor:
|
|
2169
|
+
W && i && /* @__PURE__ */ v(ze, {
|
|
2170
|
+
htmlFor: oe,
|
|
2131
2171
|
className: E,
|
|
2132
2172
|
children: i
|
|
2133
2173
|
}),
|
|
2134
|
-
|
|
2135
|
-
ref:
|
|
2136
|
-
id:
|
|
2174
|
+
W ? /* @__PURE__ */ y("button", {
|
|
2175
|
+
ref: z,
|
|
2176
|
+
id: oe,
|
|
2137
2177
|
type: "button",
|
|
2138
2178
|
role: "combobox",
|
|
2139
2179
|
className: `${Y.trigger} ${Y[c]} ${o ? Y.errorWrap : ""}`,
|
|
2140
2180
|
...Te,
|
|
2141
2181
|
children: [
|
|
2142
|
-
|
|
2182
|
+
H?.icon && /* @__PURE__ */ v("span", {
|
|
2143
2183
|
className: Y.icon,
|
|
2144
|
-
children:
|
|
2184
|
+
children: H.icon
|
|
2145
2185
|
}),
|
|
2146
2186
|
/* @__PURE__ */ v("span", {
|
|
2147
2187
|
className: `${Y.value} ${xe ? Y.placeholder : ""}`,
|
|
@@ -2153,15 +2193,15 @@ function Yt(e) {
|
|
|
2153
2193
|
})
|
|
2154
2194
|
]
|
|
2155
2195
|
}) : t === "pill" ? /* @__PURE__ */ y("button", {
|
|
2156
|
-
ref:
|
|
2157
|
-
id:
|
|
2196
|
+
ref: z,
|
|
2197
|
+
id: oe,
|
|
2158
2198
|
type: "button",
|
|
2159
2199
|
className: Y.pillTrigger,
|
|
2160
2200
|
...Te,
|
|
2161
2201
|
children: [
|
|
2162
|
-
|
|
2202
|
+
H?.icon && /* @__PURE__ */ v("span", {
|
|
2163
2203
|
className: Y.pillIcon,
|
|
2164
|
-
children:
|
|
2204
|
+
children: H.icon
|
|
2165
2205
|
}),
|
|
2166
2206
|
we,
|
|
2167
2207
|
/* @__PURE__ */ v("span", {
|
|
@@ -2170,12 +2210,12 @@ function Yt(e) {
|
|
|
2170
2210
|
})
|
|
2171
2211
|
]
|
|
2172
2212
|
}) : /* @__PURE__ */ v(k, {
|
|
2173
|
-
ref:
|
|
2174
|
-
id:
|
|
2213
|
+
ref: z,
|
|
2214
|
+
id: oe,
|
|
2175
2215
|
variant: t,
|
|
2176
2216
|
size: c,
|
|
2177
2217
|
className: c === "base" ? Y.buttonTriggerBase : void 0,
|
|
2178
|
-
leadingIcon:
|
|
2218
|
+
leadingIcon: H?.icon,
|
|
2179
2219
|
trailingIcon: /* @__PURE__ */ v("span", {
|
|
2180
2220
|
className: `${Y.buttonChevron} ${j ? Y.chevronOpen : ""}`,
|
|
2181
2221
|
children: /* @__PURE__ */ v(de, {})
|
|
@@ -2183,70 +2223,70 @@ function Yt(e) {
|
|
|
2183
2223
|
...Te,
|
|
2184
2224
|
children: we
|
|
2185
2225
|
}),
|
|
2186
|
-
|
|
2187
|
-
ref:
|
|
2226
|
+
ee && /* @__PURE__ */ v("div", {
|
|
2227
|
+
ref: re,
|
|
2188
2228
|
className: [
|
|
2189
2229
|
Y.menuWrap,
|
|
2190
|
-
!
|
|
2191
|
-
!
|
|
2192
|
-
!
|
|
2193
|
-
|
|
2230
|
+
!W && Y.menuWrapAuto,
|
|
2231
|
+
!W && A && Y.menuWrapMultiple,
|
|
2232
|
+
!W && r === "end" && Y.menuWrapEnd,
|
|
2233
|
+
te && Y.menuWrapUp,
|
|
2194
2234
|
!j && Y.menuWrapClosing
|
|
2195
2235
|
].filter(Boolean).join(" "),
|
|
2196
2236
|
onAnimationEnd: (e) => {
|
|
2197
|
-
j || e.target !== e.currentTarget || (
|
|
2237
|
+
j || e.target !== e.currentTarget || (N(!1), ne(!1));
|
|
2198
2238
|
},
|
|
2199
|
-
children: /* @__PURE__ */ y(
|
|
2239
|
+
children: /* @__PURE__ */ y(Wt, {
|
|
2200
2240
|
role: "presentation",
|
|
2201
|
-
style:
|
|
2241
|
+
style: W ? { width: "100%" } : void 0,
|
|
2202
2242
|
children: [b && /* @__PURE__ */ v("input", {
|
|
2203
|
-
ref:
|
|
2243
|
+
ref: ie,
|
|
2204
2244
|
type: "text",
|
|
2205
2245
|
className: Y.search,
|
|
2206
|
-
value:
|
|
2246
|
+
value: P,
|
|
2207
2247
|
placeholder: x,
|
|
2208
2248
|
"aria-label": x,
|
|
2209
|
-
"aria-controls":
|
|
2249
|
+
"aria-controls": se,
|
|
2210
2250
|
autoComplete: "off",
|
|
2211
2251
|
spellCheck: !1,
|
|
2212
2252
|
onChange: (e) => {
|
|
2213
|
-
|
|
2253
|
+
F(e.target.value), L(null);
|
|
2214
2254
|
},
|
|
2215
2255
|
onKeyDown: ge
|
|
2216
2256
|
}), /* @__PURE__ */ y("div", {
|
|
2217
|
-
id:
|
|
2257
|
+
id: se,
|
|
2218
2258
|
role: "listbox",
|
|
2219
2259
|
"aria-multiselectable": A || void 0,
|
|
2220
2260
|
"aria-label": i ?? D,
|
|
2221
|
-
ref:
|
|
2261
|
+
ref: ae,
|
|
2222
2262
|
className: Y.list,
|
|
2223
|
-
onMouseLeave: () =>
|
|
2263
|
+
onMouseLeave: () => L(null),
|
|
2224
2264
|
onBlur: (e) => {
|
|
2225
|
-
e.currentTarget.contains(e.relatedTarget) ||
|
|
2265
|
+
e.currentTarget.contains(e.relatedTarget) || L(null);
|
|
2226
2266
|
},
|
|
2227
|
-
children: [
|
|
2267
|
+
children: [I && ue.length > 0 && /* @__PURE__ */ v("span", {
|
|
2228
2268
|
"aria-hidden": "true",
|
|
2229
|
-
className: `${Y.highlight} ${
|
|
2269
|
+
className: `${Y.highlight} ${I.instant ? Y.highlightInstant : ""}`,
|
|
2230
2270
|
style: {
|
|
2231
|
-
transform: `translateY(${
|
|
2232
|
-
height:
|
|
2271
|
+
transform: `translateY(${I.top}px)`,
|
|
2272
|
+
height: I.height
|
|
2233
2273
|
}
|
|
2234
|
-
}),
|
|
2274
|
+
}), ue.length === 0 ? /* @__PURE__ */ v("div", {
|
|
2235
2275
|
className: Y.noResults,
|
|
2236
2276
|
role: "presentation",
|
|
2237
2277
|
children: S
|
|
2238
|
-
}) :
|
|
2278
|
+
}) : ue.map((e, n) => /* @__PURE__ */ v(qt, {
|
|
2239
2279
|
style: { "--i": Math.min(n, 8) },
|
|
2240
2280
|
"data-value": e.value,
|
|
2241
2281
|
role: "option",
|
|
2242
|
-
"aria-selected": A ?
|
|
2282
|
+
"aria-selected": A ? V.includes(e.value) : e.value === B,
|
|
2243
2283
|
size: t === "pill" ? "sm" : c,
|
|
2244
2284
|
icon: e.icon,
|
|
2245
|
-
leading: A ? /* @__PURE__ */ v(
|
|
2246
|
-
checked:
|
|
2285
|
+
leading: A ? /* @__PURE__ */ v(Ye, {
|
|
2286
|
+
checked: V.includes(e.value),
|
|
2247
2287
|
disabled: e.disabled
|
|
2248
2288
|
}) : void 0,
|
|
2249
|
-
selected: !A && e.value ===
|
|
2289
|
+
selected: !A && e.value === B,
|
|
2250
2290
|
disabled: e.disabled,
|
|
2251
2291
|
onClick: () => ye(e.value),
|
|
2252
2292
|
onMouseEnter: (t) => !e.disabled && ve(t.currentTarget),
|
|
@@ -2257,17 +2297,17 @@ function Yt(e) {
|
|
|
2257
2297
|
})]
|
|
2258
2298
|
})
|
|
2259
2299
|
}),
|
|
2260
|
-
|
|
2300
|
+
W && o ? /* @__PURE__ */ v("span", {
|
|
2261
2301
|
className: Y.errorText,
|
|
2262
2302
|
children: o
|
|
2263
|
-
}) :
|
|
2303
|
+
}) : W && a ? /* @__PURE__ */ v("span", {
|
|
2264
2304
|
className: Y.helperText,
|
|
2265
2305
|
children: a
|
|
2266
2306
|
}) : null
|
|
2267
2307
|
]
|
|
2268
2308
|
});
|
|
2269
2309
|
}
|
|
2270
|
-
var
|
|
2310
|
+
var Qt = {
|
|
2271
2311
|
item: "_item_5896s_2",
|
|
2272
2312
|
active: "_active_5896s_38",
|
|
2273
2313
|
inList: "_inList_5896s_41",
|
|
@@ -2278,41 +2318,41 @@ var Xt = {
|
|
|
2278
2318
|
glide: "_glide_5896s_115",
|
|
2279
2319
|
glideAnimated: "_glideAnimated_5896s_128",
|
|
2280
2320
|
glideVisible: "_glideVisible_5896s_134"
|
|
2281
|
-
},
|
|
2282
|
-
function
|
|
2283
|
-
let l = c(
|
|
2284
|
-
|
|
2285
|
-
n &&
|
|
2286
|
-
l &&
|
|
2321
|
+
}, $t = "data-nav-item", en = r(!1);
|
|
2322
|
+
function tn({ icon: e, trailing: t, active: n, as: r, href: i, className: a, children: o, ...s }) {
|
|
2323
|
+
let l = c(en), u = r ?? (i === void 0 ? "button" : "a"), d = u === "button", f = [
|
|
2324
|
+
Qt.item,
|
|
2325
|
+
n && Qt.active,
|
|
2326
|
+
l && Qt.inList,
|
|
2287
2327
|
a
|
|
2288
2328
|
].filter(Boolean).join(" ");
|
|
2289
2329
|
return /* @__PURE__ */ y(u, {
|
|
2290
2330
|
...d ? { type: "button" } : {},
|
|
2291
2331
|
...i === void 0 ? {} : { href: i },
|
|
2292
|
-
[
|
|
2332
|
+
[$t]: "",
|
|
2293
2333
|
"aria-current": n ? "page" : void 0,
|
|
2294
2334
|
className: f,
|
|
2295
2335
|
...s,
|
|
2296
2336
|
children: [
|
|
2297
2337
|
e && /* @__PURE__ */ v("span", {
|
|
2298
|
-
className:
|
|
2338
|
+
className: Qt.icon,
|
|
2299
2339
|
"aria-hidden": !0,
|
|
2300
2340
|
children: e
|
|
2301
2341
|
}),
|
|
2302
2342
|
/* @__PURE__ */ v("span", {
|
|
2303
|
-
className:
|
|
2343
|
+
className: Qt.label,
|
|
2304
2344
|
children: o
|
|
2305
2345
|
}),
|
|
2306
2346
|
t && /* @__PURE__ */ v("span", {
|
|
2307
|
-
className:
|
|
2347
|
+
className: Qt.trailing,
|
|
2308
2348
|
children: t
|
|
2309
2349
|
})
|
|
2310
2350
|
]
|
|
2311
2351
|
});
|
|
2312
2352
|
}
|
|
2313
|
-
function
|
|
2353
|
+
function nn({ children: e, className: t, ...n }) {
|
|
2314
2354
|
let r = p(null), [i, a] = m(null), [o, c] = m(!1), [l, u] = m(!1), f = s((e) => {
|
|
2315
|
-
let t = r.current, n = e instanceof Element ? e.closest(`[${
|
|
2355
|
+
let t = r.current, n = e instanceof Element ? e.closest(`[${$t}]`) : null;
|
|
2316
2356
|
if (!t || !n || !t.contains(n)) return;
|
|
2317
2357
|
if (n.matches(":disabled, [aria-disabled=\"true\"], [hidden]")) {
|
|
2318
2358
|
c(!1);
|
|
@@ -2326,11 +2366,11 @@ function en({ children: e, className: t, ...n }) {
|
|
|
2326
2366
|
}, [o]);
|
|
2327
2367
|
return d(() => {
|
|
2328
2368
|
o || u(!1);
|
|
2329
|
-
}, [o]), /* @__PURE__ */ v(
|
|
2369
|
+
}, [o]), /* @__PURE__ */ v(en.Provider, {
|
|
2330
2370
|
value: !0,
|
|
2331
2371
|
children: /* @__PURE__ */ y("div", {
|
|
2332
2372
|
ref: r,
|
|
2333
|
-
className: [
|
|
2373
|
+
className: [Qt.list, t].filter(Boolean).join(" "),
|
|
2334
2374
|
onMouseOver: (e) => f(e.target),
|
|
2335
2375
|
onMouseLeave: () => c(!1),
|
|
2336
2376
|
onFocus: (e) => e.target.matches(":focus-visible") && f(e.target),
|
|
@@ -2339,9 +2379,9 @@ function en({ children: e, className: t, ...n }) {
|
|
|
2339
2379
|
children: [/* @__PURE__ */ v("span", {
|
|
2340
2380
|
"aria-hidden": !0,
|
|
2341
2381
|
className: [
|
|
2342
|
-
|
|
2343
|
-
l &&
|
|
2344
|
-
o &&
|
|
2382
|
+
Qt.glide,
|
|
2383
|
+
l && Qt.glideAnimated,
|
|
2384
|
+
o && Qt.glideVisible
|
|
2345
2385
|
].filter(Boolean).join(" "),
|
|
2346
2386
|
style: i ? {
|
|
2347
2387
|
translate: `0 ${i.top}px`,
|
|
@@ -2353,7 +2393,7 @@ function en({ children: e, className: t, ...n }) {
|
|
|
2353
2393
|
}
|
|
2354
2394
|
//#endregion
|
|
2355
2395
|
//#region src/components/Logo.tsx
|
|
2356
|
-
function
|
|
2396
|
+
function rn({ size: e = 40, "aria-label": t, ...n }) {
|
|
2357
2397
|
return /* @__PURE__ */ y("svg", {
|
|
2358
2398
|
width: e,
|
|
2359
2399
|
height: e,
|
|
@@ -2395,7 +2435,7 @@ var X = {
|
|
|
2395
2435
|
};
|
|
2396
2436
|
//#endregion
|
|
2397
2437
|
//#region src/components/Sidebar.tsx
|
|
2398
|
-
function
|
|
2438
|
+
function an({ header: e, switcher: t, children: n, footer: r, switcherLayout: i = "inset", "aria-label": a, className: o }) {
|
|
2399
2439
|
return /* @__PURE__ */ y("aside", {
|
|
2400
2440
|
className: [X.root, o].filter(Boolean).join(" "),
|
|
2401
2441
|
children: [
|
|
@@ -2421,7 +2461,7 @@ function nn({ header: e, switcher: t, children: n, footer: r, switcherLayout: i
|
|
|
2421
2461
|
]
|
|
2422
2462
|
});
|
|
2423
2463
|
}
|
|
2424
|
-
function
|
|
2464
|
+
function on({ title: e, subtitle: t, action: n }) {
|
|
2425
2465
|
return /* @__PURE__ */ y("div", {
|
|
2426
2466
|
className: X.footerRow,
|
|
2427
2467
|
children: [/* @__PURE__ */ y("div", {
|
|
@@ -2439,7 +2479,7 @@ function rn({ title: e, subtitle: t, action: n }) {
|
|
|
2439
2479
|
})]
|
|
2440
2480
|
});
|
|
2441
2481
|
}
|
|
2442
|
-
function
|
|
2482
|
+
function sn({ items: e, value: t, onChange: n, "aria-label": r }) {
|
|
2443
2483
|
return /* @__PURE__ */ v("div", {
|
|
2444
2484
|
role: "group",
|
|
2445
2485
|
"aria-label": r,
|
|
@@ -2465,21 +2505,21 @@ function an({ items: e, value: t, onChange: n, "aria-label": r }) {
|
|
|
2465
2505
|
}, e.value))
|
|
2466
2506
|
});
|
|
2467
2507
|
}
|
|
2468
|
-
var
|
|
2508
|
+
var cn = { highlight: "_highlight_1pz29_1" };
|
|
2469
2509
|
//#endregion
|
|
2470
2510
|
//#region src/components/HighlightText.tsx
|
|
2471
|
-
function
|
|
2511
|
+
function ln(e) {
|
|
2472
2512
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
2473
2513
|
}
|
|
2474
|
-
function
|
|
2514
|
+
function un({ text: e, query: n }) {
|
|
2475
2515
|
if (!n) return /* @__PURE__ */ v(_, { children: e });
|
|
2476
|
-
let r = e.split(RegExp(`(${
|
|
2516
|
+
let r = e.split(RegExp(`(${ln(n)})`, "ig"));
|
|
2477
2517
|
return /* @__PURE__ */ v(_, { children: r.map((e, r) => e.toLowerCase() === n.toLowerCase() ? /* @__PURE__ */ v("mark", {
|
|
2478
|
-
className:
|
|
2518
|
+
className: cn.highlight,
|
|
2479
2519
|
children: e
|
|
2480
2520
|
}, r) : /* @__PURE__ */ v(t, { children: e }, r)) });
|
|
2481
2521
|
}
|
|
2482
|
-
var
|
|
2522
|
+
var dn = {
|
|
2483
2523
|
group: "_group_1bg0h_1",
|
|
2484
2524
|
btn: "_btn_1bg0h_4",
|
|
2485
2525
|
caret: "_caret_1bg0h_29",
|
|
@@ -2501,24 +2541,24 @@ var ln = {
|
|
|
2501
2541
|
};
|
|
2502
2542
|
//#endregion
|
|
2503
2543
|
//#region src/components/FilterSection.tsx
|
|
2504
|
-
function
|
|
2544
|
+
function fn({ label: e, options: t, optionLabel: n, activeSet: r, onToggle: i, onSetAll: a, searchable: o }) {
|
|
2505
2545
|
let [s, c] = m(""), l = s.trim().toLowerCase(), u = l ? t.filter((e) => n(e).toLowerCase().includes(l)) : t, d = t.length > 0 && r.size === t.length;
|
|
2506
2546
|
return /* @__PURE__ */ y("div", { children: [
|
|
2507
2547
|
/* @__PURE__ */ y("div", {
|
|
2508
|
-
className:
|
|
2548
|
+
className: dn.sectionHeader,
|
|
2509
2549
|
children: [/* @__PURE__ */ v("div", {
|
|
2510
|
-
className:
|
|
2550
|
+
className: dn.sectionLabel,
|
|
2511
2551
|
children: e
|
|
2512
2552
|
}), a && /* @__PURE__ */ v("button", {
|
|
2513
2553
|
type: "button",
|
|
2514
|
-
className:
|
|
2554
|
+
className: dn.allToggle,
|
|
2515
2555
|
onClick: () => a(d ? [] : t),
|
|
2516
2556
|
children: d ? "Deselect all" : "Select all"
|
|
2517
2557
|
})]
|
|
2518
2558
|
}),
|
|
2519
2559
|
o && /* @__PURE__ */ v("input", {
|
|
2520
2560
|
type: "text",
|
|
2521
|
-
className:
|
|
2561
|
+
className: dn.search,
|
|
2522
2562
|
placeholder: `Search ${e.toLowerCase()}…`,
|
|
2523
2563
|
autoComplete: "off",
|
|
2524
2564
|
value: s,
|
|
@@ -2526,12 +2566,12 @@ function un({ label: e, options: t, optionLabel: n, activeSet: r, onToggle: i, o
|
|
|
2526
2566
|
onChange: (e) => c(e.target.value)
|
|
2527
2567
|
}),
|
|
2528
2568
|
/* @__PURE__ */ y("div", {
|
|
2529
|
-
className:
|
|
2569
|
+
className: dn.optionsList,
|
|
2530
2570
|
children: [u.length === 0 && /* @__PURE__ */ v("div", {
|
|
2531
|
-
className:
|
|
2571
|
+
className: dn.empty,
|
|
2532
2572
|
children: "No match"
|
|
2533
|
-
}), u.map((e) => /* @__PURE__ */ v(
|
|
2534
|
-
className:
|
|
2573
|
+
}), u.map((e) => /* @__PURE__ */ v(Je, {
|
|
2574
|
+
className: dn.option,
|
|
2535
2575
|
checked: r.has(e),
|
|
2536
2576
|
onChange: () => i(e),
|
|
2537
2577
|
label: n(e)
|
|
@@ -2539,7 +2579,7 @@ function un({ label: e, options: t, optionLabel: n, activeSet: r, onToggle: i, o
|
|
|
2539
2579
|
})
|
|
2540
2580
|
] });
|
|
2541
2581
|
}
|
|
2542
|
-
var
|
|
2582
|
+
var pn = {
|
|
2543
2583
|
line: "_line_vczwq_1",
|
|
2544
2584
|
box: "_box_vczwq_2",
|
|
2545
2585
|
indicator: "_indicator_vczwq_9",
|
|
@@ -2555,7 +2595,7 @@ var dn = {
|
|
|
2555
2595
|
};
|
|
2556
2596
|
//#endregion
|
|
2557
2597
|
//#region src/components/Tabs.tsx
|
|
2558
|
-
function
|
|
2598
|
+
function mn({ items: e, value: t, onChange: n, variant: r = "line", size: i = "base", ...a }) {
|
|
2559
2599
|
let o = e.filter((e) => !e.disabled).map((e) => e.value), s = p(null), c = p(/* @__PURE__ */ new Map()), l = p(t), [u, f] = m(null), [h, g] = m("idle");
|
|
2560
2600
|
d(() => {
|
|
2561
2601
|
let e = c.current.get(t);
|
|
@@ -2594,18 +2634,18 @@ function fn({ items: e, value: t, onChange: n, variant: r = "line", size: i = "b
|
|
|
2594
2634
|
ref: s,
|
|
2595
2635
|
role: "tablist",
|
|
2596
2636
|
className: [
|
|
2597
|
-
|
|
2598
|
-
r === "box" && i === "sm" &&
|
|
2599
|
-
r === "box" && i === "lg" &&
|
|
2637
|
+
pn[r],
|
|
2638
|
+
r === "box" && i === "sm" && pn.sm,
|
|
2639
|
+
r === "box" && i === "lg" && pn.lg
|
|
2600
2640
|
].filter(Boolean).join(" "),
|
|
2601
2641
|
onKeyDown: b,
|
|
2602
2642
|
...a,
|
|
2603
2643
|
children: [u && /* @__PURE__ */ v("span", {
|
|
2604
2644
|
"aria-hidden": !0,
|
|
2605
2645
|
className: [
|
|
2606
|
-
|
|
2607
|
-
r === "line" ?
|
|
2608
|
-
h === "settling" &&
|
|
2646
|
+
pn.indicator,
|
|
2647
|
+
r === "line" ? pn.indicatorLine : pn.indicatorBox,
|
|
2648
|
+
h === "settling" && pn.settling
|
|
2609
2649
|
].filter(Boolean).join(" "),
|
|
2610
2650
|
onTransitionEnd: _,
|
|
2611
2651
|
style: {
|
|
@@ -2626,34 +2666,34 @@ function fn({ items: e, value: t, onChange: n, variant: r = "line", size: i = "b
|
|
|
2626
2666
|
disabled: e.disabled,
|
|
2627
2667
|
tabIndex: r ? 0 : -1,
|
|
2628
2668
|
className: [
|
|
2629
|
-
|
|
2630
|
-
r &&
|
|
2631
|
-
i &&
|
|
2669
|
+
pn.tab,
|
|
2670
|
+
r && pn.selected,
|
|
2671
|
+
i && pn.iconOnly
|
|
2632
2672
|
].filter(Boolean).join(" "),
|
|
2633
2673
|
onClick: () => !e.disabled && n(e.value),
|
|
2634
2674
|
children: [e.icon && /* @__PURE__ */ v("span", {
|
|
2635
|
-
className:
|
|
2675
|
+
className: pn.icon,
|
|
2636
2676
|
children: e.icon
|
|
2637
2677
|
}), e.label]
|
|
2638
2678
|
}, e.value);
|
|
2639
2679
|
})]
|
|
2640
2680
|
});
|
|
2641
2681
|
}
|
|
2642
|
-
var
|
|
2682
|
+
var hn = {
|
|
2643
2683
|
root: "_root_16e39_1",
|
|
2644
2684
|
label: "_label_16e39_7"
|
|
2645
2685
|
};
|
|
2646
2686
|
//#endregion
|
|
2647
2687
|
//#region src/components/Toggle.tsx
|
|
2648
|
-
function
|
|
2688
|
+
function gn({ items: e, value: t, onChange: n, label: r, "aria-label": i }) {
|
|
2649
2689
|
let a = u();
|
|
2650
2690
|
return /* @__PURE__ */ y("div", {
|
|
2651
|
-
className:
|
|
2691
|
+
className: hn.root,
|
|
2652
2692
|
children: [r && /* @__PURE__ */ v("span", {
|
|
2653
2693
|
id: a,
|
|
2654
|
-
className:
|
|
2694
|
+
className: hn.label,
|
|
2655
2695
|
children: r
|
|
2656
|
-
}), /* @__PURE__ */ v(
|
|
2696
|
+
}), /* @__PURE__ */ v(mn, {
|
|
2657
2697
|
items: e,
|
|
2658
2698
|
value: t,
|
|
2659
2699
|
onChange: n,
|
|
@@ -2664,7 +2704,7 @@ function mn({ items: e, value: t, onChange: n, label: r, "aria-label": i }) {
|
|
|
2664
2704
|
})]
|
|
2665
2705
|
});
|
|
2666
2706
|
}
|
|
2667
|
-
var
|
|
2707
|
+
var _n = {
|
|
2668
2708
|
spinner: "_spinner_9jjxr_3",
|
|
2669
2709
|
inner: "_inner_9jjxr_11",
|
|
2670
2710
|
outer: "_outer_9jjxr_12",
|
|
@@ -2675,10 +2715,10 @@ var hn = {
|
|
|
2675
2715
|
};
|
|
2676
2716
|
//#endregion
|
|
2677
2717
|
//#region src/components/Spinner.tsx
|
|
2678
|
-
function
|
|
2718
|
+
function vn({ variant: e = "default", size: t = 64, label: n = "Loading", className: r, "data-testid": i }) {
|
|
2679
2719
|
let a = [
|
|
2680
|
-
|
|
2681
|
-
|
|
2720
|
+
_n.spinner,
|
|
2721
|
+
_n[e],
|
|
2682
2722
|
r
|
|
2683
2723
|
].filter(Boolean).join(" ");
|
|
2684
2724
|
return /* @__PURE__ */ y("div", {
|
|
@@ -2691,7 +2731,7 @@ function gn({ variant: e = "default", size: t = 64, label: n = "Loading", classN
|
|
|
2691
2731
|
},
|
|
2692
2732
|
"data-testid": i,
|
|
2693
2733
|
children: [/* @__PURE__ */ v("svg", {
|
|
2694
|
-
className:
|
|
2734
|
+
className: _n.inner,
|
|
2695
2735
|
width: t,
|
|
2696
2736
|
height: t,
|
|
2697
2737
|
viewBox: "0 0 64 64",
|
|
@@ -2699,7 +2739,7 @@ function gn({ variant: e = "default", size: t = 64, label: n = "Loading", classN
|
|
|
2699
2739
|
"aria-hidden": "true",
|
|
2700
2740
|
children: /* @__PURE__ */ v("path", { d: "M45.4273 17.5099C45.5053 17.5796 45.5088 17.6535 45.4377 17.7316L38.8829 24.8071C38.8634 24.828 38.8365 24.8404 38.8079 24.8416C38.7793 24.8428 38.7514 24.8326 38.7303 24.8134C36.6569 22.9045 34.221 22.0275 31.4225 22.1823C29.9153 22.2659 28.5572 22.6333 27.3483 23.2845C25.0295 24.5352 23.4428 26.4155 22.588 28.9253C20.717 34.4308 24.3708 40.1612 29.8184 41.6584C30.8097 41.9302 31.99 41.9735 33.3593 41.788C35.158 41.5433 36.8709 40.5854 38.3412 39.5627C38.4022 39.5203 38.4764 39.5014 38.5502 39.5094C38.6241 39.5175 38.6925 39.552 38.7428 39.6066L45.1742 46.6069C45.1803 46.6137 45.185 46.6217 45.188 46.6303C45.191 46.639 45.1923 46.6482 45.1917 46.6573C45.1911 46.6665 45.1887 46.6754 45.1846 46.6836C45.1805 46.6918 45.1748 46.6992 45.1679 46.7052C44.4401 47.3033 43.6502 47.8855 42.7982 48.4516C39.8799 50.3897 36.6339 51.4633 33.0602 51.6725C29.3847 51.8872 25.9031 51.1106 22.6152 49.3425C19.7917 47.8227 17.4903 45.764 15.7112 43.1663C14.4132 41.2707 13.4349 39.3097 12.8667 37.0717C11.973 33.5775 11.9925 30.1014 12.9253 26.6435C13.1679 25.7483 13.5465 24.8469 13.8414 23.9412C14.6703 21.4035 16.9915 18.887 18.9133 17.1899C26.3467 10.6186 38.1184 10.8908 45.4273 17.5099Z" })
|
|
2701
2741
|
}), /* @__PURE__ */ v("svg", {
|
|
2702
|
-
className:
|
|
2742
|
+
className: _n.outer,
|
|
2703
2743
|
width: t,
|
|
2704
2744
|
height: t,
|
|
2705
2745
|
viewBox: "0 0 64 64",
|
|
@@ -2731,14 +2771,14 @@ var Z = {
|
|
|
2731
2771
|
sheet: "_sheet_3vs6a_206",
|
|
2732
2772
|
fullscreen: "_fullscreen_3vs6a_212",
|
|
2733
2773
|
instant: "_instant_3vs6a_222"
|
|
2734
|
-
},
|
|
2735
|
-
function
|
|
2736
|
-
let t = c(
|
|
2774
|
+
}, yn = 200, bn = "(max-width: 639px)", xn = "(prefers-reduced-motion: reduce)", Sn = "a[href], button:not(:disabled), input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"])", Cn = r(null);
|
|
2775
|
+
function wn(e) {
|
|
2776
|
+
let t = c(Cn);
|
|
2737
2777
|
if (!t) throw Error(`${e} must be rendered inside <Modal>`);
|
|
2738
2778
|
return t;
|
|
2739
2779
|
}
|
|
2740
|
-
var
|
|
2741
|
-
function
|
|
2780
|
+
var Tn = [];
|
|
2781
|
+
function En(e) {
|
|
2742
2782
|
let [t, n] = m(() => typeof window < "u" && window.matchMedia(e).matches);
|
|
2743
2783
|
return l(() => {
|
|
2744
2784
|
let t = window.matchMedia(e), r = () => n(t.matches);
|
|
@@ -2746,114 +2786,114 @@ function wn(e) {
|
|
|
2746
2786
|
}, [e]), t;
|
|
2747
2787
|
}
|
|
2748
2788
|
function Q({ open: e, onClose: t, layout: n = "vertical", mobile: r = "sheet", onSubmit: i, dismissible: a = !0, instantInitialOpen: o = !1, portalSelector: c = "#container", isTop: d = !0, role: f = "dialog", "aria-labelledby": h, "data-testid": _, className: y, children: b }) {
|
|
2749
|
-
let x = u(), S = `${x}-title`, C = `${x}-description`, [w, T] = m(!1), [E, D] = m(e), [O, k] = m(e && o), [A, j] = m(!1), M =
|
|
2750
|
-
|
|
2789
|
+
let x = u(), S = `${x}-title`, C = `${x}-description`, [w, T] = m(!1), [E, D] = m(e), [O, k] = m(e && o), [A, j] = m(!1), M = En(bn), ee = En(xn), N = p(null), P = p(null), F = p(!1), te = p(!1), ne = p(Symbol("modal")), I = p(e), L = p(t);
|
|
2790
|
+
L.current = t, l(() => T(!0), []), l(() => {
|
|
2751
2791
|
if (e) {
|
|
2752
|
-
if (
|
|
2753
|
-
if (
|
|
2792
|
+
if (F.current) return;
|
|
2793
|
+
if (P.current = document.activeElement instanceof HTMLElement ? document.activeElement : null, D(!0), I.current && o) {
|
|
2754
2794
|
k(!0);
|
|
2755
2795
|
return;
|
|
2756
2796
|
}
|
|
2757
2797
|
let e = requestAnimationFrame(() => k(!0));
|
|
2758
2798
|
return () => cancelAnimationFrame(e);
|
|
2759
2799
|
}
|
|
2760
|
-
if (
|
|
2761
|
-
let t = setTimeout(() => D(!1),
|
|
2800
|
+
if (F.current = !1, k(!1), !E) return;
|
|
2801
|
+
let t = setTimeout(() => D(!1), ee ? 0 : yn);
|
|
2762
2802
|
return () => clearTimeout(t);
|
|
2763
2803
|
}, [e]), l(() => {
|
|
2764
|
-
!E &&
|
|
2804
|
+
!E && P.current && (P.current.focus?.(), P.current = null);
|
|
2765
2805
|
}, [E]);
|
|
2766
|
-
let
|
|
2767
|
-
if (!a ||
|
|
2768
|
-
|
|
2769
|
-
let e =
|
|
2770
|
-
window.setTimeout(() =>
|
|
2771
|
-
}, [a,
|
|
2806
|
+
let R = s(() => {
|
|
2807
|
+
if (!a || F.current) return;
|
|
2808
|
+
F.current = !0, k(!1);
|
|
2809
|
+
let e = ee ? 0 : yn;
|
|
2810
|
+
window.setTimeout(() => L.current(), e);
|
|
2811
|
+
}, [a, ee]);
|
|
2772
2812
|
l(() => {
|
|
2773
2813
|
if (!E) return;
|
|
2774
|
-
let e =
|
|
2775
|
-
d &&
|
|
2814
|
+
let e = ne.current;
|
|
2815
|
+
d && Tn.push(e);
|
|
2776
2816
|
let t = (t) => {
|
|
2777
|
-
t.key === "Escape" &&
|
|
2817
|
+
t.key === "Escape" && Tn[Tn.length - 1] === e && (t.preventDefault(), R());
|
|
2778
2818
|
};
|
|
2779
2819
|
document.addEventListener("keydown", t);
|
|
2780
2820
|
let { body: n } = document, r = n.style.overflow, i = n.style.paddingRight, a = window.innerWidth - document.documentElement.clientWidth;
|
|
2781
|
-
return n.style.overflow = "hidden", a > 0 && (n.style.paddingRight = `${a}px`),
|
|
2821
|
+
return n.style.overflow = "hidden", a > 0 && (n.style.paddingRight = `${a}px`), N.current?.focus({ preventScroll: !0 }), () => {
|
|
2782
2822
|
document.removeEventListener("keydown", t);
|
|
2783
|
-
let a =
|
|
2784
|
-
a !== -1 &&
|
|
2823
|
+
let a = Tn.indexOf(e);
|
|
2824
|
+
a !== -1 && Tn.splice(a, 1), n.style.overflow = r, n.style.paddingRight = i;
|
|
2785
2825
|
};
|
|
2786
2826
|
}, [
|
|
2787
2827
|
E,
|
|
2788
2828
|
d,
|
|
2789
|
-
|
|
2829
|
+
R
|
|
2790
2830
|
]);
|
|
2791
|
-
let
|
|
2792
|
-
if (e.key !== "Tab" || !
|
|
2793
|
-
let t = Array.from(
|
|
2831
|
+
let z = (e) => {
|
|
2832
|
+
if (e.key !== "Tab" || !N.current) return;
|
|
2833
|
+
let t = Array.from(N.current.querySelectorAll(Sn));
|
|
2794
2834
|
if (t.length === 0) {
|
|
2795
2835
|
e.preventDefault();
|
|
2796
2836
|
return;
|
|
2797
2837
|
}
|
|
2798
2838
|
let n = t[0], r = t[t.length - 1], i = document.activeElement;
|
|
2799
|
-
e.shiftKey && (i === n || i ===
|
|
2839
|
+
e.shiftKey && (i === n || i === N.current) ? (e.preventDefault(), r.focus()) : !e.shiftKey && i === r && (e.preventDefault(), n.focus());
|
|
2800
2840
|
};
|
|
2801
2841
|
if (!w || !E) return null;
|
|
2802
|
-
let
|
|
2842
|
+
let re = document.querySelector(c) ?? document.body, ie = [
|
|
2803
2843
|
Z.modal,
|
|
2804
2844
|
Z[n],
|
|
2805
2845
|
Z[r],
|
|
2806
2846
|
O && Z.visible,
|
|
2807
2847
|
o && Z.instant,
|
|
2808
2848
|
y
|
|
2809
|
-
].filter(Boolean).join(" "),
|
|
2849
|
+
].filter(Boolean).join(" "), ae = {
|
|
2810
2850
|
role: f,
|
|
2811
2851
|
"aria-modal": !0,
|
|
2812
2852
|
"aria-labelledby": h ?? S,
|
|
2813
2853
|
"aria-describedby": A ? C : void 0,
|
|
2814
2854
|
tabIndex: -1,
|
|
2815
|
-
className:
|
|
2855
|
+
className: ie,
|
|
2816
2856
|
"data-testid": _,
|
|
2817
|
-
onKeyDown:
|
|
2818
|
-
},
|
|
2857
|
+
onKeyDown: z
|
|
2858
|
+
}, oe = {
|
|
2819
2859
|
layout: n,
|
|
2820
2860
|
titleId: h ?? S,
|
|
2821
2861
|
descriptionId: C,
|
|
2822
2862
|
isMobile: M,
|
|
2823
2863
|
dismissible: a,
|
|
2824
2864
|
setHasDescription: j,
|
|
2825
|
-
requestClose:
|
|
2865
|
+
requestClose: R
|
|
2826
2866
|
};
|
|
2827
|
-
return g(/* @__PURE__ */ v(
|
|
2828
|
-
value:
|
|
2867
|
+
return g(/* @__PURE__ */ v(Cn.Provider, {
|
|
2868
|
+
value: oe,
|
|
2829
2869
|
children: /* @__PURE__ */ v("div", {
|
|
2830
2870
|
className: `${Z.backdrop} ${O ? Z.visible : ""} ${o ? Z.instant : ""}`.trim(),
|
|
2831
2871
|
onPointerDown: (e) => {
|
|
2832
|
-
|
|
2872
|
+
te.current = e.target !== e.currentTarget;
|
|
2833
2873
|
},
|
|
2834
2874
|
onClick: (e) => {
|
|
2835
|
-
e.target === e.currentTarget && !
|
|
2875
|
+
e.target === e.currentTarget && !te.current && R(), te.current = !1;
|
|
2836
2876
|
},
|
|
2837
2877
|
children: i ? /* @__PURE__ */ v("form", {
|
|
2838
|
-
ref:
|
|
2878
|
+
ref: N,
|
|
2839
2879
|
onSubmit: i,
|
|
2840
|
-
...
|
|
2880
|
+
...ae,
|
|
2841
2881
|
children: b
|
|
2842
2882
|
}) : /* @__PURE__ */ v("div", {
|
|
2843
|
-
ref:
|
|
2844
|
-
...
|
|
2883
|
+
ref: N,
|
|
2884
|
+
...ae,
|
|
2845
2885
|
children: b
|
|
2846
2886
|
})
|
|
2847
2887
|
})
|
|
2848
|
-
}),
|
|
2888
|
+
}), re);
|
|
2849
2889
|
}
|
|
2850
|
-
function
|
|
2851
|
-
let { requestClose: n, dismissible: r } =
|
|
2890
|
+
function Dn({ children: e, onClose: t }) {
|
|
2891
|
+
let { requestClose: n, dismissible: r } = wn("Modal.Cover");
|
|
2852
2892
|
return /* @__PURE__ */ y("div", {
|
|
2853
2893
|
className: Z.cover,
|
|
2854
2894
|
children: [e, t && /* @__PURE__ */ v(k, {
|
|
2855
2895
|
variant: "tertiary",
|
|
2856
|
-
leadingIcon: /* @__PURE__ */ v(
|
|
2896
|
+
leadingIcon: /* @__PURE__ */ v(je, {}),
|
|
2857
2897
|
"aria-label": "Close",
|
|
2858
2898
|
"data-testid": "modal-close",
|
|
2859
2899
|
className: Z.closeButton,
|
|
@@ -2864,7 +2904,7 @@ function Tn({ children: e, onClose: t }) {
|
|
|
2864
2904
|
})]
|
|
2865
2905
|
});
|
|
2866
2906
|
}
|
|
2867
|
-
function
|
|
2907
|
+
function On({ children: t }) {
|
|
2868
2908
|
let n = e.toArray(t), r = n.filter((e) => o(e) && e.type.isModalIcon === !0), i = n.filter((e) => !r.includes(e));
|
|
2869
2909
|
return /* @__PURE__ */ y("div", {
|
|
2870
2910
|
className: Z.message,
|
|
@@ -2874,52 +2914,52 @@ function En({ children: t }) {
|
|
|
2874
2914
|
})]
|
|
2875
2915
|
});
|
|
2876
2916
|
}
|
|
2877
|
-
function
|
|
2917
|
+
function kn({ children: e, tone: t = "neutral" }) {
|
|
2878
2918
|
return /* @__PURE__ */ v("div", {
|
|
2879
2919
|
className: `${Z.icon} ${Z[`tone-${t}`]}`,
|
|
2880
2920
|
"aria-hidden": "true",
|
|
2881
2921
|
children: e
|
|
2882
2922
|
});
|
|
2883
2923
|
}
|
|
2884
|
-
function
|
|
2885
|
-
let { titleId: n } =
|
|
2924
|
+
function An({ children: e, id: t }) {
|
|
2925
|
+
let { titleId: n } = wn("Modal.Title");
|
|
2886
2926
|
return /* @__PURE__ */ v("h2", {
|
|
2887
2927
|
id: t ?? n,
|
|
2888
2928
|
className: Z.title,
|
|
2889
2929
|
children: e
|
|
2890
2930
|
});
|
|
2891
2931
|
}
|
|
2892
|
-
function
|
|
2893
|
-
let { descriptionId: t, setHasDescription: n } =
|
|
2932
|
+
function jn({ children: e }) {
|
|
2933
|
+
let { descriptionId: t, setHasDescription: n } = wn("Modal.Description");
|
|
2894
2934
|
return l(() => (n(!0), () => n(!1)), [n]), /* @__PURE__ */ v("p", {
|
|
2895
2935
|
id: t,
|
|
2896
2936
|
className: Z.description,
|
|
2897
2937
|
children: e
|
|
2898
2938
|
});
|
|
2899
2939
|
}
|
|
2900
|
-
function
|
|
2940
|
+
function Mn({ children: e }) {
|
|
2901
2941
|
return /* @__PURE__ */ v("p", {
|
|
2902
2942
|
className: Z.hint,
|
|
2903
2943
|
children: e
|
|
2904
2944
|
});
|
|
2905
2945
|
}
|
|
2906
|
-
function
|
|
2946
|
+
function Nn({ children: e }) {
|
|
2907
2947
|
return /* @__PURE__ */ v("div", {
|
|
2908
2948
|
className: Z.body,
|
|
2909
2949
|
children: e
|
|
2910
2950
|
});
|
|
2911
2951
|
}
|
|
2912
|
-
function
|
|
2913
|
-
let { isMobile: r } =
|
|
2952
|
+
function Pn({ children: t }) {
|
|
2953
|
+
let { isMobile: r } = wn("Modal.Footer"), i = r ? e.map(t, (e) => o(e) && e.type === k ? n(e, { size: "base" }) : e) : t;
|
|
2914
2954
|
return /* @__PURE__ */ v("div", {
|
|
2915
2955
|
className: Z.footer,
|
|
2916
2956
|
children: i
|
|
2917
2957
|
});
|
|
2918
2958
|
}
|
|
2919
|
-
Q.Cover =
|
|
2959
|
+
Q.Cover = Dn, Q.Message = On, kn.isModalIcon = !0, Q.Icon = kn, Q.Title = An, Q.Description = jn, Q.Hint = Mn, Q.Body = Nn, Q.Footer = Pn;
|
|
2920
2960
|
//#endregion
|
|
2921
2961
|
//#region src/components/ConfirmDialog.tsx
|
|
2922
|
-
function
|
|
2962
|
+
function Fn({ open: e, onClose: t, onConfirm: n, title: r, description: i, icon: a, confirmLabel: o, cancelLabel: s = "Cancel", tone: c = "default", loading: l = !1, "data-testid": u }) {
|
|
2923
2963
|
let d = c === "dangerous";
|
|
2924
2964
|
return /* @__PURE__ */ y(Q, {
|
|
2925
2965
|
open: e,
|
|
@@ -2948,7 +2988,7 @@ function Nn({ open: e, onClose: t, onConfirm: n, title: r, description: i, icon:
|
|
|
2948
2988
|
})] })]
|
|
2949
2989
|
});
|
|
2950
2990
|
}
|
|
2951
|
-
var
|
|
2991
|
+
var In = {
|
|
2952
2992
|
root: "_root_rybn9_1",
|
|
2953
2993
|
success: "_success_rybn9_11",
|
|
2954
2994
|
warning: "_warning_rybn9_17",
|
|
@@ -2961,45 +3001,45 @@ var Pn = {
|
|
|
2961
3001
|
};
|
|
2962
3002
|
//#endregion
|
|
2963
3003
|
//#region src/components/EmptyState.tsx
|
|
2964
|
-
function
|
|
3004
|
+
function Ln({ tone: e = "neutral", icon: t, title: n, children: r, action: i, ...a }) {
|
|
2965
3005
|
return /* @__PURE__ */ y("div", {
|
|
2966
|
-
className: `${
|
|
3006
|
+
className: `${In.root} ${e === "neutral" ? "" : In[e]}`,
|
|
2967
3007
|
...a,
|
|
2968
3008
|
children: [t != null && /* @__PURE__ */ v("div", {
|
|
2969
|
-
className:
|
|
3009
|
+
className: In.icon,
|
|
2970
3010
|
"aria-hidden": "true",
|
|
2971
3011
|
children: t
|
|
2972
3012
|
}), /* @__PURE__ */ y("div", {
|
|
2973
|
-
className:
|
|
3013
|
+
className: In.body,
|
|
2974
3014
|
children: [
|
|
2975
3015
|
/* @__PURE__ */ v("p", {
|
|
2976
|
-
className:
|
|
3016
|
+
className: In.title,
|
|
2977
3017
|
children: n
|
|
2978
3018
|
}),
|
|
2979
3019
|
r != null && /* @__PURE__ */ v("div", {
|
|
2980
|
-
className:
|
|
3020
|
+
className: In.text,
|
|
2981
3021
|
children: r
|
|
2982
3022
|
}),
|
|
2983
3023
|
i != null && /* @__PURE__ */ v("div", {
|
|
2984
|
-
className:
|
|
3024
|
+
className: In.action,
|
|
2985
3025
|
children: i
|
|
2986
3026
|
})
|
|
2987
3027
|
]
|
|
2988
3028
|
})]
|
|
2989
3029
|
});
|
|
2990
3030
|
}
|
|
2991
|
-
var
|
|
2992
|
-
function
|
|
3031
|
+
var Rn = { photoPreview: "_photoPreview_1m76k_2" }, zn = 180, Bn = 12, Vn = 8;
|
|
3032
|
+
function Hn(e, t, n = zn) {
|
|
2993
3033
|
let r = (e, t) => {
|
|
2994
|
-
let r = e +
|
|
2995
|
-
return Math.max(
|
|
3034
|
+
let r = e + Bn, i = r + n + Vn > t ? e - Bn - n : r;
|
|
3035
|
+
return Math.max(Vn, i);
|
|
2996
3036
|
};
|
|
2997
3037
|
return {
|
|
2998
3038
|
left: r(e, window.innerWidth),
|
|
2999
3039
|
top: r(t, window.innerHeight)
|
|
3000
3040
|
};
|
|
3001
3041
|
}
|
|
3002
|
-
function
|
|
3042
|
+
function Un({ src: e, size: t = zn, children: r }) {
|
|
3003
3043
|
let [i, a] = m(null), [o, s] = m(), c = i !== null;
|
|
3004
3044
|
if (l(() => {
|
|
3005
3045
|
if (!c) return;
|
|
@@ -3025,14 +3065,14 @@ function Vn({ src: e, size: t = Ln, children: r }) {
|
|
|
3025
3065
|
}
|
|
3026
3066
|
});
|
|
3027
3067
|
return /* @__PURE__ */ y(_, { children: [f, i && g(/* @__PURE__ */ v("img", {
|
|
3028
|
-
className:
|
|
3068
|
+
className: Rn.photoPreview,
|
|
3029
3069
|
src: e,
|
|
3030
3070
|
alt: "",
|
|
3031
3071
|
"aria-hidden": "true",
|
|
3032
3072
|
style: {
|
|
3033
3073
|
width: t,
|
|
3034
3074
|
height: t,
|
|
3035
|
-
...
|
|
3075
|
+
...Hn(i.x, i.y, t)
|
|
3036
3076
|
},
|
|
3037
3077
|
onError: () => {
|
|
3038
3078
|
s(e), a(null);
|
|
@@ -3069,26 +3109,27 @@ var $ = {
|
|
|
3069
3109
|
workerText: "_workerText_awfe3_227",
|
|
3070
3110
|
actions: "_actions_awfe3_232",
|
|
3071
3111
|
srOnly: "_srOnly_awfe3_243"
|
|
3072
|
-
},
|
|
3112
|
+
}, Wn = {
|
|
3073
3113
|
worker: "Worker:",
|
|
3074
3114
|
comment: "Comment:",
|
|
3075
3115
|
inaccessible: "Inaccessible",
|
|
3076
3116
|
archived: "Archived",
|
|
3117
|
+
unavailable: "Preview unavailable",
|
|
3077
3118
|
new: "Unwatched"
|
|
3078
3119
|
};
|
|
3079
|
-
function
|
|
3120
|
+
function Gn({ preview: e, previewFallback: t = "inaccessible", onPreviewError: n, previewAlt: r, dateTime: i, title: a, description: o, meta: s, worker: c, comment: l, viewed: u = !1, current: d, onClick: f, hoverable: p, actions: h, labels: g, "aria-label": b, className: x, "data-testid": S }) {
|
|
3080
3121
|
let C = {
|
|
3081
|
-
...
|
|
3122
|
+
...Wn,
|
|
3082
3123
|
...g
|
|
3083
3124
|
}, [w, T] = m(), [E, D] = m(), O = !!e && w !== e, k = c?.photo, A = !!k && E !== k, j = !!f, M = (e) => {
|
|
3084
3125
|
e.target === e.currentTarget && (e.key === "Enter" ? f?.() : e.key === " " && (e.preventDefault(), f?.()));
|
|
3085
|
-
},
|
|
3126
|
+
}, ee = [
|
|
3086
3127
|
$.root,
|
|
3087
3128
|
(j || p) && $.interactive,
|
|
3088
3129
|
d && $.current,
|
|
3089
3130
|
h != null && $.hasActions,
|
|
3090
3131
|
x
|
|
3091
|
-
].filter(Boolean).join(" "),
|
|
3132
|
+
].filter(Boolean).join(" "), N = j ? {
|
|
3092
3133
|
role: "button",
|
|
3093
3134
|
tabIndex: 0,
|
|
3094
3135
|
"aria-label": b ?? (l ? `Video ${l}` : "Video"),
|
|
@@ -3096,9 +3137,9 @@ function Un({ preview: e, previewFallback: t = "inaccessible", onPreviewError: n
|
|
|
3096
3137
|
onKeyDown: M
|
|
3097
3138
|
} : { "aria-label": b };
|
|
3098
3139
|
return /* @__PURE__ */ y("div", {
|
|
3099
|
-
className:
|
|
3140
|
+
className: ee,
|
|
3100
3141
|
"data-testid": S,
|
|
3101
|
-
...
|
|
3142
|
+
...N,
|
|
3102
3143
|
children: [
|
|
3103
3144
|
/* @__PURE__ */ y("div", {
|
|
3104
3145
|
className: $.side,
|
|
@@ -3115,17 +3156,17 @@ function Un({ preview: e, previewFallback: t = "inaccessible", onPreviewError: n
|
|
|
3115
3156
|
}
|
|
3116
3157
|
}) : /* @__PURE__ */ v("div", {
|
|
3117
3158
|
className: `${$.tile} ${t === "play" ? $.tilePlay : ""}`,
|
|
3118
|
-
children: t === "play" ? /* @__PURE__ */ v(
|
|
3159
|
+
children: t === "play" ? /* @__PURE__ */ v(Te, {
|
|
3119
3160
|
size: 20,
|
|
3120
3161
|
"aria-hidden": "true"
|
|
3121
3162
|
}) : /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("span", {
|
|
3122
3163
|
className: $.icon,
|
|
3123
|
-
children: v(t === "archived" ?
|
|
3164
|
+
children: v(t === "archived" ? ce : t === "unavailable" ? xe : Ce, {
|
|
3124
3165
|
size: 12,
|
|
3125
3166
|
strokeWidth: 1,
|
|
3126
3167
|
"aria-hidden": "true"
|
|
3127
3168
|
})
|
|
3128
|
-
}), /* @__PURE__ */ v("span", { children: t === "archived" ? C.archived : C.inaccessible })] })
|
|
3169
|
+
}), /* @__PURE__ */ v("span", { children: t === "archived" ? C.archived : t === "unavailable" ? C.unavailable : C.inaccessible })] })
|
|
3129
3170
|
})
|
|
3130
3171
|
}), !u && /* @__PURE__ */ v("span", {
|
|
3131
3172
|
className: $.badge,
|
|
@@ -3165,7 +3206,7 @@ function Un({ preview: e, previewFallback: t = "inaccessible", onPreviewError: n
|
|
|
3165
3206
|
children: C.worker
|
|
3166
3207
|
}), /* @__PURE__ */ y("div", {
|
|
3167
3208
|
className: $.workerRow,
|
|
3168
|
-
children: [A ? /* @__PURE__ */ v(
|
|
3209
|
+
children: [A ? /* @__PURE__ */ v(Un, {
|
|
3169
3210
|
src: k,
|
|
3170
3211
|
children: /* @__PURE__ */ v("img", {
|
|
3171
3212
|
className: $.photo,
|
|
@@ -3178,7 +3219,7 @@ function Un({ preview: e, previewFallback: t = "inaccessible", onPreviewError: n
|
|
|
3178
3219
|
}) : /* @__PURE__ */ v("div", {
|
|
3179
3220
|
className: `${$.photo} ${$.emptyPhoto}`,
|
|
3180
3221
|
"aria-hidden": "true",
|
|
3181
|
-
children: /* @__PURE__ */ v(
|
|
3222
|
+
children: /* @__PURE__ */ v(ke, { size: 20 })
|
|
3182
3223
|
}), /* @__PURE__ */ v("div", {
|
|
3183
3224
|
className: $.workerText,
|
|
3184
3225
|
children: /* @__PURE__ */ v("div", {
|
|
@@ -3205,14 +3246,14 @@ function Un({ preview: e, previewFallback: t = "inaccessible", onPreviewError: n
|
|
|
3205
3246
|
]
|
|
3206
3247
|
});
|
|
3207
3248
|
}
|
|
3208
|
-
function
|
|
3249
|
+
function Kn({ className: e, "data-testid": t }) {
|
|
3209
3250
|
return /* @__PURE__ */ y("div", {
|
|
3210
3251
|
className: `${$.root} ${e ?? ""}`,
|
|
3211
3252
|
"data-testid": t,
|
|
3212
3253
|
"aria-hidden": "true",
|
|
3213
3254
|
children: [/* @__PURE__ */ v("div", {
|
|
3214
3255
|
className: $.side,
|
|
3215
|
-
children: /* @__PURE__ */ v(
|
|
3256
|
+
children: /* @__PURE__ */ v(kt, {
|
|
3216
3257
|
width: 72,
|
|
3217
3258
|
height: 48
|
|
3218
3259
|
})
|
|
@@ -3221,15 +3262,15 @@ function Wn({ className: e, "data-testid": t }) {
|
|
|
3221
3262
|
children: /* @__PURE__ */ y("div", {
|
|
3222
3263
|
className: $.info,
|
|
3223
3264
|
children: [
|
|
3224
|
-
/* @__PURE__ */ v(
|
|
3265
|
+
/* @__PURE__ */ v(kt, {
|
|
3225
3266
|
variant: "text",
|
|
3226
3267
|
width: "40%"
|
|
3227
3268
|
}),
|
|
3228
|
-
/* @__PURE__ */ v(
|
|
3269
|
+
/* @__PURE__ */ v(kt, {
|
|
3229
3270
|
variant: "text",
|
|
3230
3271
|
width: "65%"
|
|
3231
3272
|
}),
|
|
3232
|
-
/* @__PURE__ */ v(
|
|
3273
|
+
/* @__PURE__ */ v(kt, {
|
|
3233
3274
|
variant: "text",
|
|
3234
3275
|
width: "90%"
|
|
3235
3276
|
})
|
|
@@ -3238,18 +3279,18 @@ function Wn({ className: e, "data-testid": t }) {
|
|
|
3238
3279
|
})]
|
|
3239
3280
|
});
|
|
3240
3281
|
}
|
|
3241
|
-
var
|
|
3282
|
+
var qn = Object.assign(Gn, { Skeleton: Kn });
|
|
3242
3283
|
//#endregion
|
|
3243
3284
|
//#region src/utils/format.ts
|
|
3244
|
-
function
|
|
3285
|
+
function Jn(e) {
|
|
3245
3286
|
let t = Math.floor(e / 60), n = e % 60;
|
|
3246
3287
|
return `${t}h:${String(n).padStart(2, "0")}m`;
|
|
3247
3288
|
}
|
|
3248
|
-
function
|
|
3289
|
+
function Yn(e, t) {
|
|
3249
3290
|
let n = Math.floor(e / 60), r = e % 60, i = (e) => String(e).padStart(2, "0");
|
|
3250
3291
|
return `${i(n)}:${i(r)}:${i(t)}`;
|
|
3251
3292
|
}
|
|
3252
3293
|
//#endregion
|
|
3253
|
-
export {
|
|
3294
|
+
export { N as Badge, k as Button, St as Calendar, j as Card, Je as Checkbox, Xe as CheckboxGroup, Fn as ConfirmDialog, ot as DateField, Dt as DatePicker, Bt as DateRangePicker, Zt as Dropdown, Ln as EmptyState, ze as FieldLabel, fn as FilterSection, un as HighlightText, sn as LanguageSwitch, rn as Logo, Wt as Menu, Gt as MenuDivider, qt as MenuItem, Q as Modal, tn as NavItem, nn as NavList, Ht as NumberField, at as PasswordField, Un as PhotoPreview, Qe as RadioButton, $e as RadioGroup, an as Sidebar, on as SidebarFooter, kt as Skeleton, vn as Spinner, tt as Switch, mn as Tabs, Fe as Tag, Be as TagGroup, it as TextArea, nt as TextField, gn as Toggle, He as Toolbar, Ke as ToolbarAdaptive, C as Tooltip, qn as VideoCard, Jn as formatDuration, Yn as formatDurationHMS };
|
|
3254
3295
|
|
|
3255
3296
|
//# sourceMappingURL=index.js.map
|