@toteat-eng/ds-react 2026.6.10-3 → 2026.6.10-4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/StatusBanner/StatusBanner.d.ts +18 -0
- package/dist/components/StatusBanner/__stories__/StatusBanner.stories.d.ts +23 -0
- package/dist/components/StatusBanner/index.d.ts +2 -0
- package/dist/components/UserNotification/NotificationBase.d.ts +41 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.es.js +625 -587
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -350,7 +350,7 @@ function In({ variant: e = "default", size: t = "medium", children: n, className
|
|
|
350
350
|
children: n
|
|
351
351
|
});
|
|
352
352
|
}
|
|
353
|
-
var
|
|
353
|
+
var Ln = {
|
|
354
354
|
nav: "_nav_2i10d_2",
|
|
355
355
|
back: "_back_2i10d_9",
|
|
356
356
|
crumbs: "_crumbs_2i10d_40",
|
|
@@ -361,14 +361,14 @@ var R = {
|
|
|
361
361
|
};
|
|
362
362
|
//#endregion
|
|
363
363
|
//#region src/components/Breadcrumb/Breadcrumb.tsx
|
|
364
|
-
function
|
|
364
|
+
function Rn({ items: e, onBack: t, backLabel: n = "Volver", label: r = "Ruta de navegación", className: i, "data-testid": a }) {
|
|
365
365
|
return e.length === 0 ? null : /* @__PURE__ */ f("nav", {
|
|
366
366
|
"aria-label": r,
|
|
367
|
-
className: [
|
|
367
|
+
className: [Ln.nav, i].filter(Boolean).join(" "),
|
|
368
368
|
"data-testid": a,
|
|
369
369
|
children: [t && /* @__PURE__ */ d("button", {
|
|
370
370
|
type: "button",
|
|
371
|
-
className:
|
|
371
|
+
className: Ln.back,
|
|
372
372
|
onClick: t,
|
|
373
373
|
"aria-label": n,
|
|
374
374
|
children: /* @__PURE__ */ d(F, {
|
|
@@ -377,18 +377,18 @@ function Ln({ items: e, onBack: t, backLabel: n = "Volver", label: r = "Ruta de
|
|
|
377
377
|
"aria-hidden": "true"
|
|
378
378
|
})
|
|
379
379
|
}), /* @__PURE__ */ d("ol", {
|
|
380
|
-
className:
|
|
380
|
+
className: Ln.crumbs,
|
|
381
381
|
children: e.map((t, n) => {
|
|
382
382
|
let r = n === e.length - 1;
|
|
383
383
|
return /* @__PURE__ */ d("li", {
|
|
384
|
-
className:
|
|
384
|
+
className: Ln.item,
|
|
385
385
|
"aria-current": r ? "page" : void 0,
|
|
386
386
|
children: t.href && !r ? /* @__PURE__ */ d("a", {
|
|
387
387
|
href: t.href,
|
|
388
|
-
className:
|
|
388
|
+
className: Ln.link,
|
|
389
389
|
children: t.label
|
|
390
390
|
}) : /* @__PURE__ */ d("span", {
|
|
391
|
-
className: r ?
|
|
391
|
+
className: r ? Ln.current : Ln.ancestor,
|
|
392
392
|
children: t.label
|
|
393
393
|
})
|
|
394
394
|
}, t.id);
|
|
@@ -396,12 +396,12 @@ function Ln({ items: e, onBack: t, backLabel: n = "Volver", label: r = "Ruta de
|
|
|
396
396
|
})]
|
|
397
397
|
});
|
|
398
398
|
}
|
|
399
|
-
var
|
|
399
|
+
var zn = { card: "_card_b9brq_2" };
|
|
400
400
|
//#endregion
|
|
401
401
|
//#region src/components/Card/Card.tsx
|
|
402
|
-
function
|
|
402
|
+
function Bn({ padding: e = "small", elevation: t = "none", hoverable: n = !1, maxWidth: r, children: i, className: a, style: o, ...s }) {
|
|
403
403
|
return /* @__PURE__ */ d("section", {
|
|
404
|
-
className: [
|
|
404
|
+
className: [zn.card, a].filter(Boolean).join(" "),
|
|
405
405
|
"data-padding": e,
|
|
406
406
|
"data-elevation": t,
|
|
407
407
|
"data-hoverable": n ? "" : void 0,
|
|
@@ -413,7 +413,7 @@ function zn({ padding: e = "small", elevation: t = "none", hoverable: n = !1, ma
|
|
|
413
413
|
children: i
|
|
414
414
|
});
|
|
415
415
|
}
|
|
416
|
-
var
|
|
416
|
+
var R = {
|
|
417
417
|
chartWrapper: "_chartWrapper_2djq2_2",
|
|
418
418
|
chartTitle: "_chartTitle_2djq2_7",
|
|
419
419
|
kpiCard: "_kpiCard_2djq2_16",
|
|
@@ -421,7 +421,7 @@ var z = {
|
|
|
421
421
|
kpiValue: "_kpiValue_2djq2_31",
|
|
422
422
|
kpiChange: "_kpiChange_2djq2_38",
|
|
423
423
|
emptyState: "_emptyState_2djq2_55"
|
|
424
|
-
},
|
|
424
|
+
}, Vn = [
|
|
425
425
|
"#ff4235",
|
|
426
426
|
"#2563eb",
|
|
427
427
|
"#16a34a",
|
|
@@ -429,12 +429,12 @@ var z = {
|
|
|
429
429
|
"#7c3aed",
|
|
430
430
|
"#0891b2"
|
|
431
431
|
];
|
|
432
|
-
function
|
|
432
|
+
function Hn({ data: e, xKey: t, series: n, height: r = 300, title: i, formatY: a, formatValue: o, hideLegend: s, "data-testid": c }) {
|
|
433
433
|
return e?.length ? /* @__PURE__ */ f("div", {
|
|
434
|
-
className:
|
|
434
|
+
className: R.chartWrapper,
|
|
435
435
|
"data-testid": c,
|
|
436
436
|
children: [i && /* @__PURE__ */ d("div", {
|
|
437
|
-
className:
|
|
437
|
+
className: R.chartTitle,
|
|
438
438
|
children: i
|
|
439
439
|
}), /* @__PURE__ */ d(x, {
|
|
440
440
|
width: "100%",
|
|
@@ -466,7 +466,7 @@ function Vn({ data: e, xKey: t, series: n, height: r = 300, title: i, formatY: a
|
|
|
466
466
|
type: "monotone",
|
|
467
467
|
dataKey: e.dataKey,
|
|
468
468
|
name: e.label ?? e.dataKey,
|
|
469
|
-
stroke: e.color ??
|
|
469
|
+
stroke: e.color ?? Vn[t % Vn.length],
|
|
470
470
|
strokeWidth: 2,
|
|
471
471
|
dot: !1,
|
|
472
472
|
activeDot: { r: 4 }
|
|
@@ -475,16 +475,16 @@ function Vn({ data: e, xKey: t, series: n, height: r = 300, title: i, formatY: a
|
|
|
475
475
|
})
|
|
476
476
|
})]
|
|
477
477
|
}) : /* @__PURE__ */ d("div", {
|
|
478
|
-
className:
|
|
478
|
+
className: R.emptyState,
|
|
479
479
|
children: "Sin datos"
|
|
480
480
|
});
|
|
481
481
|
}
|
|
482
|
-
function
|
|
482
|
+
function Un({ data: e, xKey: t, series: n, height: r = 300, title: i, formatY: a, formatValue: o, hideLegend: s, "data-testid": c }) {
|
|
483
483
|
return e?.length ? /* @__PURE__ */ f("div", {
|
|
484
|
-
className:
|
|
484
|
+
className: R.chartWrapper,
|
|
485
485
|
"data-testid": c,
|
|
486
486
|
children: [i && /* @__PURE__ */ d("div", {
|
|
487
|
-
className:
|
|
487
|
+
className: R.chartTitle,
|
|
488
488
|
children: i
|
|
489
489
|
}), /* @__PURE__ */ d(x, {
|
|
490
490
|
width: "100%",
|
|
@@ -515,7 +515,7 @@ function Hn({ data: e, xKey: t, series: n, height: r = 300, title: i, formatY: a
|
|
|
515
515
|
n.map((e, t) => /* @__PURE__ */ d(h, {
|
|
516
516
|
dataKey: e.dataKey,
|
|
517
517
|
name: e.label ?? e.dataKey,
|
|
518
|
-
fill: e.color ??
|
|
518
|
+
fill: e.color ?? Vn[t % Vn.length],
|
|
519
519
|
radius: [
|
|
520
520
|
2,
|
|
521
521
|
2,
|
|
@@ -527,16 +527,16 @@ function Hn({ data: e, xKey: t, series: n, height: r = 300, title: i, formatY: a
|
|
|
527
527
|
})
|
|
528
528
|
})]
|
|
529
529
|
}) : /* @__PURE__ */ d("div", {
|
|
530
|
-
className:
|
|
530
|
+
className: R.emptyState,
|
|
531
531
|
children: "Sin datos"
|
|
532
532
|
});
|
|
533
533
|
}
|
|
534
|
-
function
|
|
534
|
+
function Wn({ data: e, xKey: t, series: n, height: r = 300, title: i, formatY: a, formatValue: o, hideLegend: s, "data-testid": c }) {
|
|
535
535
|
return e?.length ? /* @__PURE__ */ f("div", {
|
|
536
|
-
className:
|
|
536
|
+
className: R.chartWrapper,
|
|
537
537
|
"data-testid": c,
|
|
538
538
|
children: [i && /* @__PURE__ */ d("div", {
|
|
539
|
-
className:
|
|
539
|
+
className: R.chartTitle,
|
|
540
540
|
children: i
|
|
541
541
|
}), /* @__PURE__ */ d(x, {
|
|
542
542
|
width: "100%",
|
|
@@ -565,7 +565,7 @@ function Un({ data: e, xKey: t, series: n, height: r = 300, title: i, formatY: a
|
|
|
565
565
|
/* @__PURE__ */ d(S, { formatter: o ? (e) => o(e) : void 0 }),
|
|
566
566
|
!s && /* @__PURE__ */ d(v, {}),
|
|
567
567
|
n.map((e, t) => {
|
|
568
|
-
let n = e.color ??
|
|
568
|
+
let n = e.color ?? Vn[t % Vn.length];
|
|
569
569
|
return /* @__PURE__ */ d(p, {
|
|
570
570
|
type: "monotone",
|
|
571
571
|
dataKey: e.dataKey,
|
|
@@ -580,32 +580,32 @@ function Un({ data: e, xKey: t, series: n, height: r = 300, title: i, formatY: a
|
|
|
580
580
|
})
|
|
581
581
|
})]
|
|
582
582
|
}) : /* @__PURE__ */ d("div", {
|
|
583
|
-
className:
|
|
583
|
+
className: R.emptyState,
|
|
584
584
|
children: "Sin datos"
|
|
585
585
|
});
|
|
586
586
|
}
|
|
587
|
-
function
|
|
587
|
+
function Gn({ label: e, value: t, change: n, trend: r = "neutral", "data-testid": i }) {
|
|
588
588
|
return /* @__PURE__ */ f("div", {
|
|
589
|
-
className:
|
|
589
|
+
className: R.kpiCard,
|
|
590
590
|
"data-testid": i,
|
|
591
591
|
children: [
|
|
592
592
|
/* @__PURE__ */ d("div", {
|
|
593
|
-
className:
|
|
593
|
+
className: R.kpiLabel,
|
|
594
594
|
children: e
|
|
595
595
|
}),
|
|
596
596
|
/* @__PURE__ */ d("div", {
|
|
597
|
-
className:
|
|
597
|
+
className: R.kpiValue,
|
|
598
598
|
children: t
|
|
599
599
|
}),
|
|
600
600
|
n && /* @__PURE__ */ d("div", {
|
|
601
|
-
className:
|
|
601
|
+
className: R.kpiChange,
|
|
602
602
|
"data-trend": r,
|
|
603
603
|
children: n
|
|
604
604
|
})
|
|
605
605
|
]
|
|
606
606
|
});
|
|
607
607
|
}
|
|
608
|
-
var
|
|
608
|
+
var Kn = {
|
|
609
609
|
wrapper: "_wrapper_rrvhj_2",
|
|
610
610
|
input: "_input_rrvhj_9",
|
|
611
611
|
checkmark: "_checkmark_rrvhj_27",
|
|
@@ -613,10 +613,10 @@ var Gn = {
|
|
|
613
613
|
};
|
|
614
614
|
//#endregion
|
|
615
615
|
//#region src/components/Checkbox/Checkbox.tsx
|
|
616
|
-
function
|
|
616
|
+
function qn({ label: e, className: t, id: n, ref: r, "data-testid": i, ...a }) {
|
|
617
617
|
let o = n ?? `checkbox-${String(e ?? "").toLowerCase().replace(/\s+/g, "-")}`;
|
|
618
618
|
return /* @__PURE__ */ f("label", {
|
|
619
|
-
className: [
|
|
619
|
+
className: [Kn.wrapper, t].filter(Boolean).join(" "),
|
|
620
620
|
htmlFor: o,
|
|
621
621
|
"data-testid": i,
|
|
622
622
|
children: [
|
|
@@ -624,21 +624,21 @@ function Kn({ label: e, className: t, id: n, ref: r, "data-testid": i, ...a }) {
|
|
|
624
624
|
ref: r,
|
|
625
625
|
type: "checkbox",
|
|
626
626
|
id: o,
|
|
627
|
-
className:
|
|
627
|
+
className: Kn.input,
|
|
628
628
|
...a
|
|
629
629
|
}),
|
|
630
630
|
/* @__PURE__ */ d("span", {
|
|
631
|
-
className:
|
|
631
|
+
className: Kn.checkmark,
|
|
632
632
|
"aria-hidden": "true"
|
|
633
633
|
}),
|
|
634
634
|
e && /* @__PURE__ */ d("span", {
|
|
635
|
-
className:
|
|
635
|
+
className: Kn.label,
|
|
636
636
|
children: e
|
|
637
637
|
})
|
|
638
638
|
]
|
|
639
639
|
});
|
|
640
640
|
}
|
|
641
|
-
var
|
|
641
|
+
var Jn = {
|
|
642
642
|
wrapper: "_wrapper_1b0cf_2",
|
|
643
643
|
icon: "_icon_1b0cf_12",
|
|
644
644
|
"ds-coming-soon-fade-in": "_ds-coming-soon-fade-in_1b0cf_1",
|
|
@@ -646,25 +646,25 @@ var qn = {
|
|
|
646
646
|
};
|
|
647
647
|
//#endregion
|
|
648
648
|
//#region src/components/ComingSoon/ComingSoon.tsx
|
|
649
|
-
function
|
|
649
|
+
function Yn({ message: e, icon: t = "lock-password-1-outline", className: n, "data-testid": r }) {
|
|
650
650
|
let i = e?.trim() ? e : "Próximamente";
|
|
651
651
|
return /* @__PURE__ */ f("div", {
|
|
652
652
|
role: "status",
|
|
653
653
|
"aria-live": "polite",
|
|
654
|
-
className: [
|
|
654
|
+
className: [Jn.wrapper, n].filter(Boolean).join(" "),
|
|
655
655
|
"data-testid": r,
|
|
656
656
|
children: [/* @__PURE__ */ d(F, {
|
|
657
657
|
name: t,
|
|
658
658
|
size: 40,
|
|
659
659
|
"aria-hidden": "true",
|
|
660
|
-
className:
|
|
660
|
+
className: Jn.icon
|
|
661
661
|
}), /* @__PURE__ */ d("p", {
|
|
662
|
-
className:
|
|
662
|
+
className: Jn.message,
|
|
663
663
|
children: i
|
|
664
664
|
})]
|
|
665
665
|
});
|
|
666
666
|
}
|
|
667
|
-
var
|
|
667
|
+
var Xn = {
|
|
668
668
|
row: "_row_1ubkn_2",
|
|
669
669
|
labelCol: "_labelCol_1ubkn_31",
|
|
670
670
|
label: "_label_1ubkn_31",
|
|
@@ -673,30 +673,30 @@ var Yn = {
|
|
|
673
673
|
};
|
|
674
674
|
//#endregion
|
|
675
675
|
//#region src/components/ConfigRow/ConfigRow.tsx
|
|
676
|
-
function
|
|
676
|
+
function Zn({ label: e, description: t, children: n, htmlFor: r, dimmed: i = !1, divider: a = !0, className: o, "data-testid": s }) {
|
|
677
677
|
let c = r ? "label" : "span";
|
|
678
678
|
return /* @__PURE__ */ f("div", {
|
|
679
|
-
className: [
|
|
679
|
+
className: [Xn.row, o].filter(Boolean).join(" "),
|
|
680
680
|
"data-dimmed": i || void 0,
|
|
681
681
|
"data-divider": a || void 0,
|
|
682
682
|
"data-testid": s,
|
|
683
683
|
children: [/* @__PURE__ */ f("div", {
|
|
684
|
-
className:
|
|
684
|
+
className: Xn.labelCol,
|
|
685
685
|
children: [/* @__PURE__ */ d(c, {
|
|
686
686
|
htmlFor: r,
|
|
687
|
-
className:
|
|
687
|
+
className: Xn.label,
|
|
688
688
|
children: e
|
|
689
689
|
}), t && /* @__PURE__ */ d("span", {
|
|
690
|
-
className:
|
|
690
|
+
className: Xn.description,
|
|
691
691
|
children: t
|
|
692
692
|
})]
|
|
693
693
|
}), /* @__PURE__ */ d("div", {
|
|
694
|
-
className:
|
|
694
|
+
className: Xn.controlCol,
|
|
695
695
|
children: n
|
|
696
696
|
})]
|
|
697
697
|
});
|
|
698
698
|
}
|
|
699
|
-
var
|
|
699
|
+
var z = {
|
|
700
700
|
wrapper: "_wrapper_1m4th_2",
|
|
701
701
|
search: "_search_1m4th_12",
|
|
702
702
|
tableContainer: "_tableContainer_1m4th_28",
|
|
@@ -712,13 +712,13 @@ var B = {
|
|
|
712
712
|
};
|
|
713
713
|
//#endregion
|
|
714
714
|
//#region src/components/DataTable/DataTable.tsx
|
|
715
|
-
function
|
|
715
|
+
function Qn(e) {
|
|
716
716
|
let t = e.getIsSorted();
|
|
717
717
|
if (t === "asc") return "ascending";
|
|
718
718
|
if (t === "desc") return "descending";
|
|
719
719
|
if (e.getCanSort()) return "none";
|
|
720
720
|
}
|
|
721
|
-
function
|
|
721
|
+
function $n({ data: e, columns: t, isLoading: n = !1, loadingSlot: r, pageSize: a = 20, searchable: o = !1, sortable: u = !0, paginated: p = !0, emptyMessage: m = "Sin resultados", searchPlaceholder: h = "Buscar...", previousLabel: g = "Anterior", nextLabel: _ = "Siguiente", onRowClick: v, selectable: y = !1, onSelectionChange: b, manualPagination: x = !1, pageCount: S, onPageChange: C, "data-testid": w }) {
|
|
722
722
|
let [j, M] = l([]), [ee, te] = l(""), [ne, re] = l({
|
|
723
723
|
pageIndex: 0,
|
|
724
724
|
pageSize: a
|
|
@@ -726,12 +726,12 @@ function Qn({ data: e, columns: t, isLoading: n = !1, loadingSlot: r, pageSize:
|
|
|
726
726
|
id: "__select__",
|
|
727
727
|
size: 40,
|
|
728
728
|
enableSorting: !1,
|
|
729
|
-
header: ({ table: e }) => /* @__PURE__ */ d(
|
|
729
|
+
header: ({ table: e }) => /* @__PURE__ */ d(qn, {
|
|
730
730
|
checked: e.getIsAllPageRowsSelected(),
|
|
731
731
|
onChange: e.getToggleAllPageRowsSelectedHandler(),
|
|
732
732
|
"aria-label": "Select all rows"
|
|
733
733
|
}),
|
|
734
|
-
cell: ({ row: e }) => /* @__PURE__ */ d(
|
|
734
|
+
cell: ({ row: e }) => /* @__PURE__ */ d(qn, {
|
|
735
735
|
checked: e.getIsSelected(),
|
|
736
736
|
onChange: e.getToggleSelectedHandler(),
|
|
737
737
|
"aria-label": `Select row ${e.index + 1}`
|
|
@@ -779,28 +779,28 @@ function Qn({ data: e, columns: t, isLoading: n = !1, loadingSlot: r, pageSize:
|
|
|
779
779
|
x,
|
|
780
780
|
C
|
|
781
781
|
]), n ? /* @__PURE__ */ d("div", {
|
|
782
|
-
className:
|
|
782
|
+
className: z.loading,
|
|
783
783
|
children: r ?? /* @__PURE__ */ d(kn, { size: "large" })
|
|
784
784
|
}) : /* @__PURE__ */ f("div", {
|
|
785
|
-
className:
|
|
785
|
+
className: z.wrapper,
|
|
786
786
|
"data-testid": w,
|
|
787
787
|
children: [
|
|
788
788
|
o && /* @__PURE__ */ d("input", {
|
|
789
789
|
type: "text",
|
|
790
|
-
className:
|
|
790
|
+
className: z.search,
|
|
791
791
|
placeholder: h,
|
|
792
792
|
value: ee,
|
|
793
793
|
onChange: (e) => te(e.target.value)
|
|
794
794
|
}),
|
|
795
795
|
/* @__PURE__ */ d("div", {
|
|
796
|
-
className:
|
|
796
|
+
className: z.tableContainer,
|
|
797
797
|
children: /* @__PURE__ */ f("table", {
|
|
798
|
-
className:
|
|
798
|
+
className: z.table,
|
|
799
799
|
children: [/* @__PURE__ */ d("thead", { children: N.getHeaderGroups().map((e) => /* @__PURE__ */ d("tr", { children: e.headers.map((e) => /* @__PURE__ */ f("th", {
|
|
800
|
-
className:
|
|
800
|
+
className: z.th,
|
|
801
801
|
"data-sortable": e.column.getCanSort() || void 0,
|
|
802
802
|
onClick: e.column.getToggleSortingHandler(),
|
|
803
|
-
"aria-sort":
|
|
803
|
+
"aria-sort": Qn(e.column),
|
|
804
804
|
children: [
|
|
805
805
|
T(e.column.columnDef.header, e.getContext()),
|
|
806
806
|
e.column.getIsSorted() === "asc" && " ▲",
|
|
@@ -808,10 +808,10 @@ function Qn({ data: e, columns: t, isLoading: n = !1, loadingSlot: r, pageSize:
|
|
|
808
808
|
]
|
|
809
809
|
}, e.id)) }, e.id)) }), /* @__PURE__ */ d("tbody", { children: N.getRowModel().rows.length === 0 ? /* @__PURE__ */ d("tr", { children: /* @__PURE__ */ d("td", {
|
|
810
810
|
colSpan: se.length,
|
|
811
|
-
className:
|
|
811
|
+
className: z.empty,
|
|
812
812
|
children: m
|
|
813
813
|
}) }) : N.getRowModel().rows.map((e) => /* @__PURE__ */ d("tr", {
|
|
814
|
-
className:
|
|
814
|
+
className: z.tr,
|
|
815
815
|
"data-clickable": !!v || void 0,
|
|
816
816
|
"data-selected": e.getIsSelected() || void 0,
|
|
817
817
|
onClick: () => v?.(e.original),
|
|
@@ -821,24 +821,24 @@ function Qn({ data: e, columns: t, isLoading: n = !1, loadingSlot: r, pageSize:
|
|
|
821
821
|
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), v(e.original));
|
|
822
822
|
} : void 0,
|
|
823
823
|
children: e.getVisibleCells().map((e) => /* @__PURE__ */ d("td", {
|
|
824
|
-
className:
|
|
824
|
+
className: z.td,
|
|
825
825
|
children: T(e.column.columnDef.cell, e.getContext())
|
|
826
826
|
}, e.id))
|
|
827
827
|
}, e.id)) })]
|
|
828
828
|
})
|
|
829
829
|
}),
|
|
830
830
|
p && (x ? (S ?? 0) > 1 : N.getPageCount() > 1) && /* @__PURE__ */ f("div", {
|
|
831
|
-
className:
|
|
831
|
+
className: z.pagination,
|
|
832
832
|
children: [
|
|
833
833
|
/* @__PURE__ */ d("button", {
|
|
834
834
|
type: "button",
|
|
835
|
-
className:
|
|
835
|
+
className: z.pageButton,
|
|
836
836
|
onClick: () => N.previousPage(),
|
|
837
837
|
disabled: !N.getCanPreviousPage(),
|
|
838
838
|
children: g
|
|
839
839
|
}),
|
|
840
840
|
/* @__PURE__ */ f("span", {
|
|
841
|
-
className:
|
|
841
|
+
className: z.pageInfo,
|
|
842
842
|
children: [
|
|
843
843
|
N.getState().pagination.pageIndex + 1,
|
|
844
844
|
" /",
|
|
@@ -848,7 +848,7 @@ function Qn({ data: e, columns: t, isLoading: n = !1, loadingSlot: r, pageSize:
|
|
|
848
848
|
}),
|
|
849
849
|
/* @__PURE__ */ d("button", {
|
|
850
850
|
type: "button",
|
|
851
|
-
className:
|
|
851
|
+
className: z.pageButton,
|
|
852
852
|
onClick: () => N.nextPage(),
|
|
853
853
|
disabled: !N.getCanNextPage(),
|
|
854
854
|
children: _
|
|
@@ -858,34 +858,34 @@ function Qn({ data: e, columns: t, isLoading: n = !1, loadingSlot: r, pageSize:
|
|
|
858
858
|
]
|
|
859
859
|
});
|
|
860
860
|
}
|
|
861
|
-
var
|
|
861
|
+
var er = {
|
|
862
862
|
wrapper: "_wrapper_kap55_2",
|
|
863
863
|
label: "_label_kap55_8",
|
|
864
864
|
input: "_input_kap55_16"
|
|
865
865
|
};
|
|
866
866
|
//#endregion
|
|
867
867
|
//#region src/components/DatePicker/DatePicker.tsx
|
|
868
|
-
function
|
|
868
|
+
function tr({ error: e, label: t, className: n, id: r, ref: i, "data-testid": o, ...s }) {
|
|
869
869
|
let c = a(), l = r ?? c;
|
|
870
870
|
return /* @__PURE__ */ f("div", {
|
|
871
|
-
className: L(
|
|
871
|
+
className: L(er.wrapper, n),
|
|
872
872
|
"data-testid": o,
|
|
873
873
|
children: [t && /* @__PURE__ */ d("label", {
|
|
874
874
|
htmlFor: l,
|
|
875
|
-
className:
|
|
875
|
+
className: er.label,
|
|
876
876
|
children: t
|
|
877
877
|
}), /* @__PURE__ */ d("input", {
|
|
878
878
|
ref: i,
|
|
879
879
|
type: "date",
|
|
880
880
|
id: l,
|
|
881
|
-
className:
|
|
881
|
+
className: er.input,
|
|
882
882
|
"data-error": e || void 0,
|
|
883
883
|
"aria-invalid": e || void 0,
|
|
884
884
|
...s
|
|
885
885
|
})]
|
|
886
886
|
});
|
|
887
887
|
}
|
|
888
|
-
var
|
|
888
|
+
var B = {
|
|
889
889
|
wrapper: "_wrapper_18zqm_2",
|
|
890
890
|
field: "_field_18zqm_8",
|
|
891
891
|
label: "_label_18zqm_15",
|
|
@@ -894,22 +894,22 @@ var V = {
|
|
|
894
894
|
};
|
|
895
895
|
//#endregion
|
|
896
896
|
//#region src/components/DateRangePicker/DateRangePicker.tsx
|
|
897
|
-
function
|
|
897
|
+
function nr({ startDate: e = "", endDate: t = "", onStartChange: n, onEndChange: r, startLabel: i = "Desde", endLabel: o = "Hasta", error: s, disabled: c, minDate: l, maxDate: u, className: p, "data-testid": m }) {
|
|
898
898
|
let h = a(), g = a();
|
|
899
899
|
return /* @__PURE__ */ f("div", {
|
|
900
|
-
className: L(
|
|
900
|
+
className: L(B.wrapper, p),
|
|
901
901
|
"data-testid": m,
|
|
902
902
|
children: [
|
|
903
903
|
/* @__PURE__ */ f("div", {
|
|
904
|
-
className:
|
|
904
|
+
className: B.field,
|
|
905
905
|
children: [/* @__PURE__ */ d("label", {
|
|
906
906
|
htmlFor: h,
|
|
907
|
-
className:
|
|
907
|
+
className: B.label,
|
|
908
908
|
children: i
|
|
909
909
|
}), /* @__PURE__ */ d("input", {
|
|
910
910
|
id: h,
|
|
911
911
|
type: "date",
|
|
912
|
-
className:
|
|
912
|
+
className: B.input,
|
|
913
913
|
value: e,
|
|
914
914
|
min: l,
|
|
915
915
|
max: t || u,
|
|
@@ -920,20 +920,20 @@ function tr({ startDate: e = "", endDate: t = "", onStartChange: n, onEndChange:
|
|
|
920
920
|
})]
|
|
921
921
|
}),
|
|
922
922
|
/* @__PURE__ */ d("span", {
|
|
923
|
-
className:
|
|
923
|
+
className: B.separator,
|
|
924
924
|
"aria-hidden": "true",
|
|
925
925
|
children: "—"
|
|
926
926
|
}),
|
|
927
927
|
/* @__PURE__ */ f("div", {
|
|
928
|
-
className:
|
|
928
|
+
className: B.field,
|
|
929
929
|
children: [/* @__PURE__ */ d("label", {
|
|
930
930
|
htmlFor: g,
|
|
931
|
-
className:
|
|
931
|
+
className: B.label,
|
|
932
932
|
children: o
|
|
933
933
|
}), /* @__PURE__ */ d("input", {
|
|
934
934
|
id: g,
|
|
935
935
|
type: "date",
|
|
936
|
-
className:
|
|
936
|
+
className: B.input,
|
|
937
937
|
value: t,
|
|
938
938
|
min: e || l,
|
|
939
939
|
max: u,
|
|
@@ -948,7 +948,7 @@ function tr({ startDate: e = "", endDate: t = "", onStartChange: n, onEndChange:
|
|
|
948
948
|
}
|
|
949
949
|
//#endregion
|
|
950
950
|
//#region src/hooks/useScrollLock.ts
|
|
951
|
-
function
|
|
951
|
+
function rr(e, t = {}) {
|
|
952
952
|
let { strategy: n = "fixed" } = t;
|
|
953
953
|
i(() => {
|
|
954
954
|
if (!e) return;
|
|
@@ -963,11 +963,11 @@ function nr(e, t = {}) {
|
|
|
963
963
|
}
|
|
964
964
|
//#endregion
|
|
965
965
|
//#region src/utils/focusTrap.ts
|
|
966
|
-
var
|
|
967
|
-
function
|
|
966
|
+
var ir = "a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
967
|
+
function ar(e, t) {
|
|
968
968
|
i(() => {
|
|
969
969
|
if (!t || !e.current) return;
|
|
970
|
-
let n = e.current, r = document.activeElement, i = () => Array.from(n.querySelectorAll(
|
|
970
|
+
let n = e.current, r = document.activeElement, i = () => Array.from(n.querySelectorAll(ir));
|
|
971
971
|
i()[0]?.focus();
|
|
972
972
|
function a(e) {
|
|
973
973
|
if (e.key !== "Tab") return;
|
|
@@ -981,13 +981,13 @@ function ir(e, t) {
|
|
|
981
981
|
};
|
|
982
982
|
}, [t, e]);
|
|
983
983
|
}
|
|
984
|
-
var
|
|
984
|
+
var or = { closeButton: "_closeButton_drwqj_8" };
|
|
985
985
|
//#endregion
|
|
986
986
|
//#region src/components/CloseButton/CloseButton.tsx
|
|
987
|
-
function
|
|
987
|
+
function sr({ onClick: e, label: t = "Cerrar", size: n = 20, className: r, "data-testid": i }) {
|
|
988
988
|
return /* @__PURE__ */ d("button", {
|
|
989
989
|
type: "button",
|
|
990
|
-
className: L(
|
|
990
|
+
className: L(or.closeButton, r),
|
|
991
991
|
onClick: e,
|
|
992
992
|
"aria-label": t,
|
|
993
993
|
"data-testid": i,
|
|
@@ -998,7 +998,7 @@ function or({ onClick: e, label: t = "Cerrar", size: n = 20, className: r, "data
|
|
|
998
998
|
})
|
|
999
999
|
});
|
|
1000
1000
|
}
|
|
1001
|
-
var
|
|
1001
|
+
var cr = {
|
|
1002
1002
|
overlay: "_overlay_1szyt_2",
|
|
1003
1003
|
"ds-fade-in": "_ds-fade-in_1szyt_1",
|
|
1004
1004
|
overlayBackdrop: "_overlayBackdrop_1szyt_14",
|
|
@@ -1011,19 +1011,19 @@ var sr = {
|
|
|
1011
1011
|
};
|
|
1012
1012
|
//#endregion
|
|
1013
1013
|
//#region src/components/Dialog/Dialog.tsx
|
|
1014
|
-
function
|
|
1014
|
+
function lr({ open: e, onClose: t, title: n, children: r, size: o = "medium", className: s, "data-testid": l }) {
|
|
1015
1015
|
let u = a(), p = c(null);
|
|
1016
|
-
return
|
|
1016
|
+
return rr(e), ar(p, e), i(() => {
|
|
1017
1017
|
if (!e) return;
|
|
1018
1018
|
let n = (e) => {
|
|
1019
1019
|
e.key === "Escape" && (e.preventDefault(), t());
|
|
1020
1020
|
};
|
|
1021
1021
|
return document.addEventListener("keydown", n), () => document.removeEventListener("keydown", n);
|
|
1022
1022
|
}, [e, t]), !e || typeof document > "u" ? null : j(/* @__PURE__ */ f("div", {
|
|
1023
|
-
className:
|
|
1023
|
+
className: cr.overlay,
|
|
1024
1024
|
children: [/* @__PURE__ */ d("button", {
|
|
1025
1025
|
type: "button",
|
|
1026
|
-
className:
|
|
1026
|
+
className: cr.overlayBackdrop,
|
|
1027
1027
|
onClick: t,
|
|
1028
1028
|
"aria-label": "Cerrar",
|
|
1029
1029
|
tabIndex: -1
|
|
@@ -1032,24 +1032,24 @@ function cr({ open: e, onClose: t, title: n, children: r, size: o = "medium", cl
|
|
|
1032
1032
|
role: "dialog",
|
|
1033
1033
|
"aria-modal": "true",
|
|
1034
1034
|
"aria-labelledby": u,
|
|
1035
|
-
className: [
|
|
1035
|
+
className: [cr.dialog, s].filter(Boolean).join(" "),
|
|
1036
1036
|
"data-size": o,
|
|
1037
1037
|
tabIndex: -1,
|
|
1038
1038
|
"data-testid": l,
|
|
1039
1039
|
children: [/* @__PURE__ */ f("div", {
|
|
1040
|
-
className:
|
|
1040
|
+
className: cr.header,
|
|
1041
1041
|
children: [/* @__PURE__ */ d("h2", {
|
|
1042
1042
|
id: u,
|
|
1043
|
-
className:
|
|
1043
|
+
className: cr.title,
|
|
1044
1044
|
children: n
|
|
1045
|
-
}), /* @__PURE__ */ d(
|
|
1046
|
-
className:
|
|
1045
|
+
}), /* @__PURE__ */ d(sr, {
|
|
1046
|
+
className: cr.closeButton,
|
|
1047
1047
|
onClick: t,
|
|
1048
1048
|
label: "Cerrar diálogo",
|
|
1049
1049
|
size: 20
|
|
1050
1050
|
})]
|
|
1051
1051
|
}), /* @__PURE__ */ d("div", {
|
|
1052
|
-
className:
|
|
1052
|
+
className: cr.body,
|
|
1053
1053
|
children: r
|
|
1054
1054
|
})]
|
|
1055
1055
|
})]
|
|
@@ -1057,7 +1057,7 @@ function cr({ open: e, onClose: t, title: n, children: r, size: o = "medium", cl
|
|
|
1057
1057
|
}
|
|
1058
1058
|
//#endregion
|
|
1059
1059
|
//#region src/hooks/useDropdown.ts
|
|
1060
|
-
function
|
|
1060
|
+
function ur(e = {}) {
|
|
1061
1061
|
let { itemCount: t = 0, onSelectIndex: n, onOpen: a, onClose: o, disabled: s = !1, closeOnOutsideClick: u = !0 } = e, [d, f] = l(!1), [p, m] = l(-1), h = c(null), g = c(null), _ = c(o);
|
|
1062
1062
|
_.current = o;
|
|
1063
1063
|
let v = c(n);
|
|
@@ -1129,7 +1129,7 @@ function lr(e = {}) {
|
|
|
1129
1129
|
])
|
|
1130
1130
|
};
|
|
1131
1131
|
}
|
|
1132
|
-
var
|
|
1132
|
+
var V = {
|
|
1133
1133
|
root: "_root_4t7ma_2",
|
|
1134
1134
|
menuEnter: "_menuEnter_4t7ma_1",
|
|
1135
1135
|
trigger: "_trigger_4t7ma_7",
|
|
@@ -1140,17 +1140,17 @@ var H = {
|
|
|
1140
1140
|
menuItem: "_menuItem_4t7ma_172",
|
|
1141
1141
|
menuIcon: "_menuIcon_4t7ma_200",
|
|
1142
1142
|
menuLabel: "_menuLabel_4t7ma_204"
|
|
1143
|
-
},
|
|
1143
|
+
}, dr = {
|
|
1144
1144
|
tiny: 14,
|
|
1145
1145
|
small: 16,
|
|
1146
1146
|
medium: 20,
|
|
1147
1147
|
large: 24
|
|
1148
1148
|
};
|
|
1149
|
-
function
|
|
1149
|
+
function fr({ text: e, menuItems: t, size: n = "medium", variant: r = "primary", disabled: i = !1, onSelect: a, onOpen: o, onClose: s, "data-testid": c }) {
|
|
1150
1150
|
function l(e) {
|
|
1151
1151
|
e.disabled || (a?.(e), g());
|
|
1152
1152
|
}
|
|
1153
|
-
let { isOpen: u, containerRef: p, triggerRef: m, activeIndex: h, close: g, toggle: _, handleTriggerKeyDown: v } =
|
|
1153
|
+
let { isOpen: u, containerRef: p, triggerRef: m, activeIndex: h, close: g, toggle: _, handleTriggerKeyDown: v } = ur({
|
|
1154
1154
|
itemCount: t.length,
|
|
1155
1155
|
disabled: i,
|
|
1156
1156
|
onOpen: o,
|
|
@@ -1159,10 +1159,10 @@ function dr({ text: e, menuItems: t, size: n = "medium", variant: r = "primary",
|
|
|
1159
1159
|
let n = t[e];
|
|
1160
1160
|
n && !n.disabled && l(n);
|
|
1161
1161
|
}
|
|
1162
|
-
}), y =
|
|
1162
|
+
}), y = dr[n];
|
|
1163
1163
|
return /* @__PURE__ */ f("div", {
|
|
1164
1164
|
ref: p,
|
|
1165
|
-
className:
|
|
1165
|
+
className: V.root,
|
|
1166
1166
|
"data-size": n,
|
|
1167
1167
|
"data-variant": r,
|
|
1168
1168
|
"data-open": u || void 0,
|
|
@@ -1171,7 +1171,7 @@ function dr({ text: e, menuItems: t, size: n = "medium", variant: r = "primary",
|
|
|
1171
1171
|
children: [/* @__PURE__ */ f("button", {
|
|
1172
1172
|
ref: m,
|
|
1173
1173
|
type: "button",
|
|
1174
|
-
className:
|
|
1174
|
+
className: V.trigger,
|
|
1175
1175
|
disabled: i,
|
|
1176
1176
|
"aria-expanded": u,
|
|
1177
1177
|
"aria-haspopup": "listbox",
|
|
@@ -1179,15 +1179,15 @@ function dr({ text: e, menuItems: t, size: n = "medium", variant: r = "primary",
|
|
|
1179
1179
|
onKeyDown: v,
|
|
1180
1180
|
children: [
|
|
1181
1181
|
/* @__PURE__ */ d("span", {
|
|
1182
|
-
className:
|
|
1182
|
+
className: V.triggerText,
|
|
1183
1183
|
children: e
|
|
1184
1184
|
}),
|
|
1185
1185
|
/* @__PURE__ */ d("span", {
|
|
1186
|
-
className:
|
|
1186
|
+
className: V.separator,
|
|
1187
1187
|
"aria-hidden": "true"
|
|
1188
1188
|
}),
|
|
1189
1189
|
/* @__PURE__ */ d("span", {
|
|
1190
|
-
className:
|
|
1190
|
+
className: V.iconWrapper,
|
|
1191
1191
|
children: /* @__PURE__ */ d(F, {
|
|
1192
1192
|
name: "chevron-down-outline",
|
|
1193
1193
|
size: y,
|
|
@@ -1196,11 +1196,11 @@ function dr({ text: e, menuItems: t, size: n = "medium", variant: r = "primary",
|
|
|
1196
1196
|
})
|
|
1197
1197
|
]
|
|
1198
1198
|
}), u && /* @__PURE__ */ d("div", {
|
|
1199
|
-
className:
|
|
1199
|
+
className: V.menu,
|
|
1200
1200
|
role: "listbox",
|
|
1201
1201
|
"aria-label": `${e} options`,
|
|
1202
1202
|
children: t.map((e, t) => /* @__PURE__ */ f("div", {
|
|
1203
|
-
className:
|
|
1203
|
+
className: V.menuItem,
|
|
1204
1204
|
"data-focused": h === t || void 0,
|
|
1205
1205
|
"data-disabled": e.disabled || void 0,
|
|
1206
1206
|
role: "option",
|
|
@@ -1214,16 +1214,16 @@ function dr({ text: e, menuItems: t, size: n = "medium", variant: r = "primary",
|
|
|
1214
1214
|
name: e.icon,
|
|
1215
1215
|
size: y,
|
|
1216
1216
|
"aria-hidden": "true",
|
|
1217
|
-
className:
|
|
1217
|
+
className: V.menuIcon
|
|
1218
1218
|
}), /* @__PURE__ */ d("span", {
|
|
1219
|
-
className:
|
|
1219
|
+
className: V.menuLabel,
|
|
1220
1220
|
children: e.label
|
|
1221
1221
|
})]
|
|
1222
1222
|
}, e.value))
|
|
1223
1223
|
})]
|
|
1224
1224
|
});
|
|
1225
1225
|
}
|
|
1226
|
-
var
|
|
1226
|
+
var pr = {
|
|
1227
1227
|
container: "_container_1mo04_2",
|
|
1228
1228
|
triggerWrapper: "_triggerWrapper_1mo04_8",
|
|
1229
1229
|
menu: "_menu_1mo04_19",
|
|
@@ -1232,26 +1232,26 @@ var fr = {
|
|
|
1232
1232
|
};
|
|
1233
1233
|
//#endregion
|
|
1234
1234
|
//#region src/components/DropdownMenu/DropdownMenu.tsx
|
|
1235
|
-
function
|
|
1236
|
-
let a = c(/* @__PURE__ */ new Map()), { isOpen: o, containerRef: s, triggerRef: l, toggle: u, close: p, closeAndFocusTrigger: m } =
|
|
1235
|
+
function mr({ trigger: e, items: t, align: n = "left", "data-testid": r }) {
|
|
1236
|
+
let a = c(/* @__PURE__ */ new Map()), { isOpen: o, containerRef: s, triggerRef: l, toggle: u, close: p, closeAndFocusTrigger: m } = ur();
|
|
1237
1237
|
return i(() => {
|
|
1238
1238
|
if (!o) return;
|
|
1239
1239
|
let e = t.find((e) => !e.disabled);
|
|
1240
1240
|
e && a.current.get(e.id)?.focus();
|
|
1241
1241
|
}, [o, t]), /* @__PURE__ */ f("div", {
|
|
1242
1242
|
ref: s,
|
|
1243
|
-
className:
|
|
1243
|
+
className: pr.container,
|
|
1244
1244
|
"data-testid": r,
|
|
1245
1245
|
children: [/* @__PURE__ */ d("button", {
|
|
1246
1246
|
ref: l,
|
|
1247
1247
|
type: "button",
|
|
1248
|
-
className:
|
|
1248
|
+
className: pr.triggerWrapper,
|
|
1249
1249
|
onClick: u,
|
|
1250
1250
|
"aria-haspopup": "menu",
|
|
1251
1251
|
"aria-expanded": o,
|
|
1252
1252
|
children: e
|
|
1253
1253
|
}), o && /* @__PURE__ */ d("div", {
|
|
1254
|
-
className:
|
|
1254
|
+
className: pr.menu,
|
|
1255
1255
|
"data-align": n,
|
|
1256
1256
|
role: "menu",
|
|
1257
1257
|
onKeyDown: (e) => {
|
|
@@ -1268,7 +1268,7 @@ function pr({ trigger: e, items: t, align: n = "left", "data-testid": r }) {
|
|
|
1268
1268
|
},
|
|
1269
1269
|
type: "button",
|
|
1270
1270
|
role: "menuitem",
|
|
1271
|
-
className:
|
|
1271
|
+
className: pr.menuItem,
|
|
1272
1272
|
"data-danger": e.danger || void 0,
|
|
1273
1273
|
disabled: e.disabled,
|
|
1274
1274
|
tabIndex: -1,
|
|
@@ -1276,63 +1276,63 @@ function pr({ trigger: e, items: t, align: n = "left", "data-testid": r }) {
|
|
|
1276
1276
|
e.onClick(), p();
|
|
1277
1277
|
},
|
|
1278
1278
|
children: [e.icon && /* @__PURE__ */ d("span", {
|
|
1279
|
-
className:
|
|
1279
|
+
className: pr.icon,
|
|
1280
1280
|
children: e.icon
|
|
1281
1281
|
}), e.label]
|
|
1282
1282
|
}, e.id))
|
|
1283
1283
|
})]
|
|
1284
1284
|
});
|
|
1285
1285
|
}
|
|
1286
|
-
var
|
|
1286
|
+
var hr = {
|
|
1287
1287
|
skeleton: "_skeleton_d5768_2",
|
|
1288
1288
|
"ds-skeleton-shimmer": "_ds-skeleton-shimmer_d5768_1"
|
|
1289
1289
|
};
|
|
1290
1290
|
//#endregion
|
|
1291
1291
|
//#region src/components/Skeleton/Skeleton.tsx
|
|
1292
|
-
function
|
|
1292
|
+
function gr(e) {
|
|
1293
1293
|
if (e !== void 0) return typeof e == "number" ? `${e}px` : e;
|
|
1294
1294
|
}
|
|
1295
|
-
function
|
|
1295
|
+
function _r({ width: e, height: t, variant: n = "rectangular", className: r, "data-testid": i }) {
|
|
1296
1296
|
return /* @__PURE__ */ d("span", {
|
|
1297
1297
|
"aria-hidden": "true",
|
|
1298
|
-
className: [
|
|
1298
|
+
className: [hr.skeleton, r].filter(Boolean).join(" "),
|
|
1299
1299
|
"data-variant": n,
|
|
1300
1300
|
"data-testid": i,
|
|
1301
1301
|
style: {
|
|
1302
|
-
width:
|
|
1303
|
-
height:
|
|
1302
|
+
width: gr(e),
|
|
1303
|
+
height: gr(t)
|
|
1304
1304
|
}
|
|
1305
1305
|
});
|
|
1306
1306
|
}
|
|
1307
|
-
var
|
|
1307
|
+
var vr = {
|
|
1308
1308
|
imagePreview: "_imagePreview_1rnes_2",
|
|
1309
1309
|
hidden: "_hidden_1rnes_21",
|
|
1310
1310
|
errorIcon: "_errorIcon_1rnes_27"
|
|
1311
1311
|
};
|
|
1312
1312
|
//#endregion
|
|
1313
1313
|
//#region src/components/ImagePreview/ImagePreview.tsx
|
|
1314
|
-
function
|
|
1314
|
+
function yr(e) {
|
|
1315
1315
|
return e.startsWith("data:image/");
|
|
1316
1316
|
}
|
|
1317
|
-
function
|
|
1317
|
+
function br(e) {
|
|
1318
1318
|
try {
|
|
1319
1319
|
return new URL(e), !0;
|
|
1320
1320
|
} catch {
|
|
1321
1321
|
return !1;
|
|
1322
1322
|
}
|
|
1323
1323
|
}
|
|
1324
|
-
function
|
|
1324
|
+
function xr({ imageSrc: e, width: t = 40, height: n = 40, alt: r = "Image without alt text", borderRadius: a = 8, className: o, "data-testid": s }) {
|
|
1325
1325
|
let [c, u] = l(() => e ? "loading" : "error");
|
|
1326
1326
|
return i(() => {
|
|
1327
1327
|
if (!e) {
|
|
1328
1328
|
u("error");
|
|
1329
1329
|
return;
|
|
1330
1330
|
}
|
|
1331
|
-
if (!
|
|
1331
|
+
if (!yr(e) && !br(e)) {
|
|
1332
1332
|
u("error");
|
|
1333
1333
|
return;
|
|
1334
1334
|
}
|
|
1335
|
-
if (
|
|
1335
|
+
if (yr(e)) {
|
|
1336
1336
|
u("loaded");
|
|
1337
1337
|
return;
|
|
1338
1338
|
}
|
|
@@ -1342,7 +1342,7 @@ function br({ imageSrc: e, width: t = 40, height: n = 40, alt: r = "Image withou
|
|
|
1342
1342
|
t.onload = null, t.onerror = null;
|
|
1343
1343
|
};
|
|
1344
1344
|
}, [e]), /* @__PURE__ */ f("div", {
|
|
1345
|
-
className: [
|
|
1345
|
+
className: [vr.imagePreview, o].filter(Boolean).join(" "),
|
|
1346
1346
|
"data-state": c,
|
|
1347
1347
|
"data-testid": s,
|
|
1348
1348
|
role: c === "error" ? "img" : void 0,
|
|
@@ -1359,15 +1359,15 @@ function br({ imageSrc: e, width: t = 40, height: n = 40, alt: r = "Image withou
|
|
|
1359
1359
|
width: t,
|
|
1360
1360
|
height: n,
|
|
1361
1361
|
decoding: "async",
|
|
1362
|
-
loading:
|
|
1363
|
-
className: c === "loading" ?
|
|
1362
|
+
loading: yr(e) ? void 0 : "lazy",
|
|
1363
|
+
className: c === "loading" ? vr.hidden : void 0
|
|
1364
1364
|
}),
|
|
1365
|
-
c === "loading" && /* @__PURE__ */ d(
|
|
1365
|
+
c === "loading" && /* @__PURE__ */ d(_r, {
|
|
1366
1366
|
width: t,
|
|
1367
1367
|
height: n
|
|
1368
1368
|
}),
|
|
1369
1369
|
c === "error" && /* @__PURE__ */ d("span", {
|
|
1370
|
-
className:
|
|
1370
|
+
className: vr.errorIcon,
|
|
1371
1371
|
children: /* @__PURE__ */ d(F, {
|
|
1372
1372
|
name: "error-outline",
|
|
1373
1373
|
size: Math.round(t * .6),
|
|
@@ -1377,7 +1377,7 @@ function br({ imageSrc: e, width: t = 40, height: n = 40, alt: r = "Image withou
|
|
|
1377
1377
|
]
|
|
1378
1378
|
});
|
|
1379
1379
|
}
|
|
1380
|
-
var
|
|
1380
|
+
var H = {
|
|
1381
1381
|
container: "_container_10rwp_2",
|
|
1382
1382
|
previewGrid: "_previewGrid_10rwp_10",
|
|
1383
1383
|
previewBtn: "_previewBtn_10rwp_18",
|
|
@@ -1386,7 +1386,7 @@ var U = {
|
|
|
1386
1386
|
zoneLabel: "_zoneLabel_10rwp_81",
|
|
1387
1387
|
description: "_description_10rwp_88",
|
|
1388
1388
|
fileList: "_fileList_10rwp_94"
|
|
1389
|
-
},
|
|
1389
|
+
}, Sr = {
|
|
1390
1390
|
images: {
|
|
1391
1391
|
types: [
|
|
1392
1392
|
"png",
|
|
@@ -1426,11 +1426,11 @@ var U = {
|
|
|
1426
1426
|
mimeTypes: ["application/vnd.ms-excel", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"]
|
|
1427
1427
|
}
|
|
1428
1428
|
};
|
|
1429
|
-
function
|
|
1430
|
-
return
|
|
1429
|
+
function Cr(e) {
|
|
1430
|
+
return Sr[e].mimeTypes.join(",");
|
|
1431
1431
|
}
|
|
1432
|
-
function
|
|
1433
|
-
let { types: n, mimeTypes: r } =
|
|
1432
|
+
function wr(e, t) {
|
|
1433
|
+
let { types: n, mimeTypes: r } = Sr[t];
|
|
1434
1434
|
return Array.from(e).filter((e) => {
|
|
1435
1435
|
let t = r.some((t) => e.type === t), i = n.some((t) => e.name.toLowerCase().endsWith(`.${t}`));
|
|
1436
1436
|
return t || i;
|
|
@@ -1438,39 +1438,39 @@ function Cr(e, t) {
|
|
|
1438
1438
|
}
|
|
1439
1439
|
//#endregion
|
|
1440
1440
|
//#region src/components/DropZone/DropZone.tsx
|
|
1441
|
-
async function
|
|
1441
|
+
async function Tr(e, t) {
|
|
1442
1442
|
return t ? new Promise((t) => {
|
|
1443
1443
|
let n = new FileReader();
|
|
1444
1444
|
n.onload = (e) => t(e.target?.result ?? ""), n.readAsDataURL(e);
|
|
1445
1445
|
}) : "";
|
|
1446
1446
|
}
|
|
1447
|
-
async function
|
|
1447
|
+
async function Er(e, t) {
|
|
1448
1448
|
return Promise.all(e.map(async (e) => ({
|
|
1449
1449
|
id: crypto.randomUUID(),
|
|
1450
1450
|
file: e,
|
|
1451
1451
|
name: e.name,
|
|
1452
|
-
preview: await
|
|
1452
|
+
preview: await Tr(e, t)
|
|
1453
1453
|
})));
|
|
1454
1454
|
}
|
|
1455
|
-
function
|
|
1455
|
+
function Dr({ label: e = "Haz click o arrastra un archivo para subir", allowedFileTypes: t = "images", multiple: n = !0, displayPreview: r = !0, displayFileList: a = !1, value: o, onDrop: s, onDropError: u, onRemove: p, onChange: m, className: h, "data-testid": g }) {
|
|
1456
1456
|
let _ = c(null), [v, y] = l(!1), [b, x] = l(!1), [S, C] = l(o ?? []);
|
|
1457
1457
|
i(() => {
|
|
1458
1458
|
o !== void 0 && C(o ?? []);
|
|
1459
1459
|
}, [o]);
|
|
1460
|
-
let w = o === void 0 ? S : o ?? [], T = (a || !r && !a) && w.length > 0, E =
|
|
1460
|
+
let w = o === void 0 ? S : o ?? [], T = (a || !r && !a) && w.length > 0, E = Sr[t].types, D = Cr(t), O = t === "images";
|
|
1461
1461
|
async function k(e, r) {
|
|
1462
1462
|
if (e.length === 0) {
|
|
1463
1463
|
u?.(`No files match the allowed types: ${t}`);
|
|
1464
1464
|
return;
|
|
1465
1465
|
}
|
|
1466
|
-
let i = await
|
|
1466
|
+
let i = await Er(e, O), a = n ? [...w, ...i] : i;
|
|
1467
1467
|
o === void 0 && C(a), m?.(a), s(r);
|
|
1468
1468
|
}
|
|
1469
1469
|
async function A(e) {
|
|
1470
1470
|
if (!b) {
|
|
1471
1471
|
x(!0);
|
|
1472
1472
|
try {
|
|
1473
|
-
await k(
|
|
1473
|
+
await k(wr(e, t), e);
|
|
1474
1474
|
} catch (e) {
|
|
1475
1475
|
u?.(e instanceof Error ? e.message : "Unknown error");
|
|
1476
1476
|
} finally {
|
|
@@ -1483,16 +1483,16 @@ function Er({ label: e = "Haz click o arrastra un archivo para subir", allowedFi
|
|
|
1483
1483
|
o === void 0 && C(n), m?.(n), t && p?.(t);
|
|
1484
1484
|
}
|
|
1485
1485
|
return /* @__PURE__ */ f("div", {
|
|
1486
|
-
className: [
|
|
1486
|
+
className: [H.container, h].filter(Boolean).join(" "),
|
|
1487
1487
|
"data-testid": g,
|
|
1488
1488
|
children: [
|
|
1489
1489
|
r && w.length > 0 && /* @__PURE__ */ d("div", {
|
|
1490
|
-
className:
|
|
1490
|
+
className: H.previewGrid,
|
|
1491
1491
|
children: w.map((e, t) => /* @__PURE__ */ f("button", {
|
|
1492
1492
|
type: "button",
|
|
1493
|
-
className:
|
|
1493
|
+
className: H.previewBtn,
|
|
1494
1494
|
onClick: () => j(t),
|
|
1495
|
-
children: [/* @__PURE__ */ d(
|
|
1495
|
+
children: [/* @__PURE__ */ d(xr, {
|
|
1496
1496
|
imageSrc: e.preview,
|
|
1497
1497
|
width: 70,
|
|
1498
1498
|
height: 70,
|
|
@@ -1507,7 +1507,7 @@ function Er({ label: e = "Haz click o arrastra un archivo para subir", allowedFi
|
|
|
1507
1507
|
}),
|
|
1508
1508
|
/* @__PURE__ */ f("button", {
|
|
1509
1509
|
type: "button",
|
|
1510
|
-
className:
|
|
1510
|
+
className: H.zone,
|
|
1511
1511
|
"data-dragging": v ? "" : void 0,
|
|
1512
1512
|
"data-processing": b ? "" : void 0,
|
|
1513
1513
|
"aria-label": e,
|
|
@@ -1535,7 +1535,7 @@ function Er({ label: e = "Haz click o arrastra un archivo para subir", allowedFi
|
|
|
1535
1535
|
/* @__PURE__ */ d("input", {
|
|
1536
1536
|
ref: _,
|
|
1537
1537
|
type: "file",
|
|
1538
|
-
className:
|
|
1538
|
+
className: H.input,
|
|
1539
1539
|
multiple: n,
|
|
1540
1540
|
accept: D,
|
|
1541
1541
|
tabIndex: -1,
|
|
@@ -1546,11 +1546,11 @@ function Er({ label: e = "Haz click o arrastra un archivo para subir", allowedFi
|
|
|
1546
1546
|
}
|
|
1547
1547
|
}),
|
|
1548
1548
|
/* @__PURE__ */ d("strong", {
|
|
1549
|
-
className:
|
|
1549
|
+
className: H.zoneLabel,
|
|
1550
1550
|
children: e
|
|
1551
1551
|
}),
|
|
1552
1552
|
/* @__PURE__ */ f("p", {
|
|
1553
|
-
className:
|
|
1553
|
+
className: H.description,
|
|
1554
1554
|
children: [
|
|
1555
1555
|
"(",
|
|
1556
1556
|
E.join(", "),
|
|
@@ -1560,7 +1560,7 @@ function Er({ label: e = "Haz click o arrastra un archivo para subir", allowedFi
|
|
|
1560
1560
|
]
|
|
1561
1561
|
}),
|
|
1562
1562
|
T && /* @__PURE__ */ d("div", {
|
|
1563
|
-
className:
|
|
1563
|
+
className: H.fileList,
|
|
1564
1564
|
children: w.map((e, t) => /* @__PURE__ */ d(I, {
|
|
1565
1565
|
variant: "outline",
|
|
1566
1566
|
size: "small",
|
|
@@ -1573,7 +1573,7 @@ function Er({ label: e = "Haz click o arrastra un archivo para subir", allowedFi
|
|
|
1573
1573
|
}
|
|
1574
1574
|
//#endregion
|
|
1575
1575
|
//#region src/components/DsProvider/DsProvider.tsx
|
|
1576
|
-
function
|
|
1576
|
+
function Or({ theme: e, children: t, className: n, "data-testid": r }) {
|
|
1577
1577
|
return /* @__PURE__ */ d("div", {
|
|
1578
1578
|
className: L("tot-ds-root", n),
|
|
1579
1579
|
"data-theme": e,
|
|
@@ -1581,23 +1581,23 @@ function Dr({ theme: e, children: t, className: n, "data-testid": r }) {
|
|
|
1581
1581
|
children: t
|
|
1582
1582
|
});
|
|
1583
1583
|
}
|
|
1584
|
-
var
|
|
1584
|
+
var kr = {
|
|
1585
1585
|
wrapper: "_wrapper_x6gz1_1",
|
|
1586
1586
|
message: "_message_x6gz1_10"
|
|
1587
1587
|
};
|
|
1588
1588
|
//#endregion
|
|
1589
1589
|
//#region src/components/EmptyState/EmptyState.tsx
|
|
1590
|
-
function
|
|
1590
|
+
function Ar({ message: e, action: t, "data-testid": n }) {
|
|
1591
1591
|
return /* @__PURE__ */ f("div", {
|
|
1592
|
-
className:
|
|
1592
|
+
className: kr.wrapper,
|
|
1593
1593
|
"data-testid": n,
|
|
1594
1594
|
children: [/* @__PURE__ */ d("p", {
|
|
1595
|
-
className:
|
|
1595
|
+
className: kr.message,
|
|
1596
1596
|
children: e
|
|
1597
1597
|
}), t]
|
|
1598
1598
|
});
|
|
1599
1599
|
}
|
|
1600
|
-
var
|
|
1600
|
+
var U = {
|
|
1601
1601
|
errorContainer: "_errorContainer_1tgia_2",
|
|
1602
1602
|
errorCard: "_errorCard_1tgia_10",
|
|
1603
1603
|
icon: "_icon_1tgia_19",
|
|
@@ -1606,7 +1606,7 @@ var W = {
|
|
|
1606
1606
|
details: "_details_1tgia_39",
|
|
1607
1607
|
stack: "_stack_1tgia_57",
|
|
1608
1608
|
retryButton: "_retryButton_1tgia_70"
|
|
1609
|
-
},
|
|
1609
|
+
}, jr = class extends e {
|
|
1610
1610
|
constructor(e) {
|
|
1611
1611
|
super(e), this.state = {
|
|
1612
1612
|
hasError: !1,
|
|
@@ -1632,10 +1632,10 @@ var W = {
|
|
|
1632
1632
|
let { hasError: e, error: t } = this.state, { children: n, fallback: r } = this.props, i = this.props["data-testid"];
|
|
1633
1633
|
return e && t ? typeof r == "function" ? r(t, this.handleRetry) : r || /* @__PURE__ */ d("div", {
|
|
1634
1634
|
role: "alert",
|
|
1635
|
-
className:
|
|
1635
|
+
className: U.errorContainer,
|
|
1636
1636
|
"data-testid": i,
|
|
1637
1637
|
children: /* @__PURE__ */ f("div", {
|
|
1638
|
-
className:
|
|
1638
|
+
className: U.errorCard,
|
|
1639
1639
|
children: [
|
|
1640
1640
|
/* @__PURE__ */ f("svg", {
|
|
1641
1641
|
width: "48",
|
|
@@ -1646,7 +1646,7 @@ var W = {
|
|
|
1646
1646
|
strokeWidth: "1.5",
|
|
1647
1647
|
strokeLinecap: "round",
|
|
1648
1648
|
strokeLinejoin: "round",
|
|
1649
|
-
className:
|
|
1649
|
+
className: U.icon,
|
|
1650
1650
|
"aria-hidden": "true",
|
|
1651
1651
|
children: [
|
|
1652
1652
|
/* @__PURE__ */ d("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z" }),
|
|
@@ -1655,23 +1655,23 @@ var W = {
|
|
|
1655
1655
|
]
|
|
1656
1656
|
}),
|
|
1657
1657
|
/* @__PURE__ */ d("h2", {
|
|
1658
|
-
className:
|
|
1658
|
+
className: U.title,
|
|
1659
1659
|
children: "Algo salió mal"
|
|
1660
1660
|
}),
|
|
1661
1661
|
/* @__PURE__ */ d("p", {
|
|
1662
|
-
className:
|
|
1662
|
+
className: U.message,
|
|
1663
1663
|
children: "Ha ocurrido un error inesperado. Por favor intenta de nuevo."
|
|
1664
1664
|
}),
|
|
1665
1665
|
process.env.NODE_ENV !== "production" && /* @__PURE__ */ f("details", {
|
|
1666
|
-
className:
|
|
1666
|
+
className: U.details,
|
|
1667
1667
|
children: [/* @__PURE__ */ d("summary", { children: "Detalle del error" }), /* @__PURE__ */ d("pre", {
|
|
1668
|
-
className:
|
|
1668
|
+
className: U.stack,
|
|
1669
1669
|
children: t.message
|
|
1670
1670
|
})]
|
|
1671
1671
|
}),
|
|
1672
1672
|
/* @__PURE__ */ d("button", {
|
|
1673
1673
|
type: "button",
|
|
1674
|
-
className:
|
|
1674
|
+
className: U.retryButton,
|
|
1675
1675
|
onClick: this.handleRetry,
|
|
1676
1676
|
children: "Intentar de nuevo"
|
|
1677
1677
|
})
|
|
@@ -1679,7 +1679,7 @@ var W = {
|
|
|
1679
1679
|
})
|
|
1680
1680
|
}) : n;
|
|
1681
1681
|
}
|
|
1682
|
-
},
|
|
1682
|
+
}, W = {
|
|
1683
1683
|
content: "_content_wq4ph_2",
|
|
1684
1684
|
category: "_category_wq4ph_8",
|
|
1685
1685
|
categoryName: "_categoryName_wq4ph_15",
|
|
@@ -1691,7 +1691,7 @@ var W = {
|
|
|
1691
1691
|
};
|
|
1692
1692
|
//#endregion
|
|
1693
1693
|
//#region src/components/ExtrasDialog/ExtrasDialog.tsx
|
|
1694
|
-
function
|
|
1694
|
+
function Mr({ open: e, onClose: t, onConfirm: n, categories: r, productName: i, "data-testid": a }) {
|
|
1695
1695
|
let [o, s] = l(/* @__PURE__ */ new Map()), c = (e, t, n, r) => {
|
|
1696
1696
|
s((i) => {
|
|
1697
1697
|
let a = new Map(i), o = a.get(e) ?? [];
|
|
@@ -1717,42 +1717,42 @@ function jr({ open: e, onClose: t, onConfirm: n, categories: r, productName: i,
|
|
|
1717
1717
|
}, m = () => {
|
|
1718
1718
|
s(/* @__PURE__ */ new Map()), t();
|
|
1719
1719
|
};
|
|
1720
|
-
return /* @__PURE__ */ d(
|
|
1720
|
+
return /* @__PURE__ */ d(lr, {
|
|
1721
1721
|
open: e,
|
|
1722
1722
|
onClose: m,
|
|
1723
1723
|
title: `Extras — ${i}`,
|
|
1724
1724
|
size: "large",
|
|
1725
1725
|
"data-testid": a,
|
|
1726
1726
|
children: /* @__PURE__ */ f("div", {
|
|
1727
|
-
className:
|
|
1727
|
+
className: W.content,
|
|
1728
1728
|
children: [r.map((e) => /* @__PURE__ */ f("fieldset", {
|
|
1729
|
-
className:
|
|
1729
|
+
className: W.category,
|
|
1730
1730
|
children: [/* @__PURE__ */ f("legend", {
|
|
1731
|
-
className:
|
|
1731
|
+
className: W.categoryName,
|
|
1732
1732
|
children: [e.name, /* @__PURE__ */ d("span", {
|
|
1733
|
-
className:
|
|
1733
|
+
className: W.categoryHint,
|
|
1734
1734
|
children: e.selectionType === "single" ? "Elige 1" : `Máx. ${e.maxSelections}`
|
|
1735
1735
|
})]
|
|
1736
1736
|
}), /* @__PURE__ */ d("div", {
|
|
1737
|
-
className:
|
|
1737
|
+
className: W.options,
|
|
1738
1738
|
children: e.products.map((t) => {
|
|
1739
1739
|
let n = (o.get(e.id) ?? []).some((e) => e.productId === t.productId);
|
|
1740
1740
|
return /* @__PURE__ */ f("button", {
|
|
1741
1741
|
type: "button",
|
|
1742
|
-
className:
|
|
1742
|
+
className: W.option,
|
|
1743
1743
|
"data-selected": n ? "" : void 0,
|
|
1744
1744
|
"aria-pressed": n,
|
|
1745
1745
|
disabled: !t.inStock,
|
|
1746
1746
|
onClick: () => c(e.id, t.productId, e.selectionType, e.maxSelections),
|
|
1747
1747
|
children: [/* @__PURE__ */ d("span", { children: t.name }), t.price > 0 && /* @__PURE__ */ f("span", {
|
|
1748
|
-
className:
|
|
1748
|
+
className: W.extraPrice,
|
|
1749
1749
|
children: ["+$", t.price]
|
|
1750
1750
|
})]
|
|
1751
1751
|
}, t.productId);
|
|
1752
1752
|
})
|
|
1753
1753
|
})]
|
|
1754
1754
|
}, e.id)), /* @__PURE__ */ f("div", {
|
|
1755
|
-
className:
|
|
1755
|
+
className: W.actions,
|
|
1756
1756
|
children: [/* @__PURE__ */ d(I, {
|
|
1757
1757
|
variant: "ghost",
|
|
1758
1758
|
onClick: m,
|
|
@@ -1766,7 +1766,7 @@ function jr({ open: e, onClose: t, onConfirm: n, categories: r, productName: i,
|
|
|
1766
1766
|
})
|
|
1767
1767
|
});
|
|
1768
1768
|
}
|
|
1769
|
-
var
|
|
1769
|
+
var Nr = {
|
|
1770
1770
|
field: "_field_7gstu_2",
|
|
1771
1771
|
label: "_label_7gstu_8",
|
|
1772
1772
|
required: "_required_7gstu_16",
|
|
@@ -1775,30 +1775,30 @@ var Mr = {
|
|
|
1775
1775
|
};
|
|
1776
1776
|
//#endregion
|
|
1777
1777
|
//#region src/components/FormField/FormField.tsx
|
|
1778
|
-
function
|
|
1778
|
+
function Pr({ label: e, htmlFor: t, error: n, description: r, required: i = !1, children: a, className: o, "data-testid": s }) {
|
|
1779
1779
|
let c = t ? `${t}-error` : void 0, l = t ? `${t}-description` : void 0;
|
|
1780
1780
|
return /* @__PURE__ */ f("div", {
|
|
1781
|
-
className: [
|
|
1781
|
+
className: [Nr.field, o].filter(Boolean).join(" "),
|
|
1782
1782
|
"data-testid": s,
|
|
1783
1783
|
children: [
|
|
1784
1784
|
/* @__PURE__ */ f("label", {
|
|
1785
1785
|
htmlFor: t,
|
|
1786
|
-
className:
|
|
1786
|
+
className: Nr.label,
|
|
1787
1787
|
children: [e, i && /* @__PURE__ */ f("span", {
|
|
1788
|
-
className:
|
|
1788
|
+
className: Nr.required,
|
|
1789
1789
|
"aria-hidden": "true",
|
|
1790
1790
|
children: [" ", "*"]
|
|
1791
1791
|
})]
|
|
1792
1792
|
}),
|
|
1793
1793
|
r && /* @__PURE__ */ d("p", {
|
|
1794
1794
|
id: l,
|
|
1795
|
-
className:
|
|
1795
|
+
className: Nr.description,
|
|
1796
1796
|
children: r
|
|
1797
1797
|
}),
|
|
1798
1798
|
a,
|
|
1799
1799
|
n && /* @__PURE__ */ d("p", {
|
|
1800
1800
|
id: c,
|
|
1801
|
-
className:
|
|
1801
|
+
className: Nr.error,
|
|
1802
1802
|
role: "alert",
|
|
1803
1803
|
"aria-live": "polite",
|
|
1804
1804
|
children: n
|
|
@@ -1806,15 +1806,15 @@ function Nr({ label: e, htmlFor: t, error: n, description: r, required: i = !1,
|
|
|
1806
1806
|
]
|
|
1807
1807
|
});
|
|
1808
1808
|
}
|
|
1809
|
-
var
|
|
1809
|
+
var Fr = {
|
|
1810
1810
|
wrapper: "_wrapper_8byuq_2",
|
|
1811
1811
|
error: "_error_8byuq_9"
|
|
1812
1812
|
};
|
|
1813
1813
|
//#endregion
|
|
1814
1814
|
//#region src/components/GoogleSignInButton/GoogleSignInButton.tsx
|
|
1815
|
-
function
|
|
1815
|
+
function Ir({ onSignIn: e, isPending: t = !1, isError: n = !1, error: r, "data-testid": i }) {
|
|
1816
1816
|
return /* @__PURE__ */ f("div", {
|
|
1817
|
-
className:
|
|
1817
|
+
className: Fr.wrapper,
|
|
1818
1818
|
"data-testid": i,
|
|
1819
1819
|
children: [/* @__PURE__ */ f(I, {
|
|
1820
1820
|
type: "button",
|
|
@@ -1831,36 +1831,36 @@ function Fr({ onSignIn: e, isPending: t = !1, isError: n = !1, error: r, "data-t
|
|
|
1831
1831
|
}), "Google"]
|
|
1832
1832
|
}), n && /* @__PURE__ */ d("span", {
|
|
1833
1833
|
role: "alert",
|
|
1834
|
-
className:
|
|
1834
|
+
className: Fr.error,
|
|
1835
1835
|
children: r instanceof Error ? r.message : "Error al iniciar sesión con Google"
|
|
1836
1836
|
})]
|
|
1837
1837
|
});
|
|
1838
1838
|
}
|
|
1839
|
-
var
|
|
1839
|
+
var Lr = {
|
|
1840
1840
|
groupedButtons: "_groupedButtons_13s4p_2",
|
|
1841
1841
|
button: "_button_13s4p_15"
|
|
1842
1842
|
};
|
|
1843
1843
|
//#endregion
|
|
1844
1844
|
//#region src/components/GroupedButtons/GroupedButtons.tsx
|
|
1845
|
-
function
|
|
1845
|
+
function Rr(e, t) {
|
|
1846
1846
|
return t === 1 ? "standalone" : e === 0 ? "left" : e === t - 1 ? "right" : "center";
|
|
1847
1847
|
}
|
|
1848
|
-
function
|
|
1848
|
+
function zr({ label: e, options: t, selectedButton: n, size: r = "medium", fullWidth: i = !1, disabled: a = !1, onChange: o, className: s, ...c }) {
|
|
1849
1849
|
let [u, p] = l(() => t[0]?.value), m = n !== void 0, h = m ? n : u, g = (e) => {
|
|
1850
1850
|
let n = t.find((t) => t.value === e);
|
|
1851
1851
|
a || n?.disabled || (m || p(e), o?.(e));
|
|
1852
1852
|
};
|
|
1853
1853
|
return /* @__PURE__ */ d("fieldset", {
|
|
1854
1854
|
"aria-label": e,
|
|
1855
|
-
className: [
|
|
1855
|
+
className: [Lr.groupedButtons, s].filter(Boolean).join(" "),
|
|
1856
1856
|
disabled: a,
|
|
1857
1857
|
"data-full-width": i ? "" : void 0,
|
|
1858
1858
|
...c,
|
|
1859
1859
|
children: t.map((e, n) => /* @__PURE__ */ f("button", {
|
|
1860
1860
|
type: "button",
|
|
1861
|
-
className:
|
|
1861
|
+
className: Lr.button,
|
|
1862
1862
|
"data-size": r,
|
|
1863
|
-
"data-position":
|
|
1863
|
+
"data-position": Rr(n, t.length),
|
|
1864
1864
|
"data-selected": h === e.value ? "" : void 0,
|
|
1865
1865
|
disabled: a || e.disabled,
|
|
1866
1866
|
onClick: () => g(e.value),
|
|
@@ -1871,7 +1871,7 @@ function Rr({ label: e, options: t, selectedButton: n, size: r = "medium", fullW
|
|
|
1871
1871
|
}, e.value))
|
|
1872
1872
|
});
|
|
1873
1873
|
}
|
|
1874
|
-
var
|
|
1874
|
+
var Br = {
|
|
1875
1875
|
header: "_header_1dj55_2",
|
|
1876
1876
|
item: "_item_1dj55_17",
|
|
1877
1877
|
title: "_title_1dj55_24",
|
|
@@ -1879,18 +1879,18 @@ var zr = {
|
|
|
1879
1879
|
};
|
|
1880
1880
|
//#endregion
|
|
1881
1881
|
//#region src/components/Header/Header.tsx
|
|
1882
|
-
function
|
|
1882
|
+
function Vr({ headers: e = [], spaceBetween: t = !1, className: n, ...r }) {
|
|
1883
1883
|
return /* @__PURE__ */ d("section", {
|
|
1884
|
-
className: [
|
|
1884
|
+
className: [Br.header, n].filter(Boolean).join(" "),
|
|
1885
1885
|
"data-space-between": t ? "" : void 0,
|
|
1886
1886
|
...r,
|
|
1887
1887
|
children: e.map((e) => /* @__PURE__ */ f("div", {
|
|
1888
|
-
className:
|
|
1888
|
+
className: Br.item,
|
|
1889
1889
|
children: [/* @__PURE__ */ d("p", {
|
|
1890
|
-
className:
|
|
1890
|
+
className: Br.title,
|
|
1891
1891
|
children: e.title
|
|
1892
1892
|
}), e.description && /* @__PURE__ */ d("p", {
|
|
1893
|
-
className:
|
|
1893
|
+
className: Br.description,
|
|
1894
1894
|
children: e.description
|
|
1895
1895
|
})]
|
|
1896
1896
|
}, e.title))
|
|
@@ -1898,12 +1898,12 @@ function Br({ headers: e = [], spaceBetween: t = !1, className: n, ...r }) {
|
|
|
1898
1898
|
}
|
|
1899
1899
|
//#endregion
|
|
1900
1900
|
//#region src/components/LanguageSelector/LanguageSelector.tsx
|
|
1901
|
-
function
|
|
1901
|
+
function Hr({ value: e, options: t, onChange: n, "data-testid": r }) {
|
|
1902
1902
|
let i = s(() => t.map(({ value: e, label: t }) => ({
|
|
1903
1903
|
value: e,
|
|
1904
1904
|
label: t
|
|
1905
1905
|
})), [t]);
|
|
1906
|
-
return /* @__PURE__ */ d(
|
|
1906
|
+
return /* @__PURE__ */ d(fr, {
|
|
1907
1907
|
text: t.find((t) => t.value === e)?.label ?? e,
|
|
1908
1908
|
menuItems: i,
|
|
1909
1909
|
size: "small",
|
|
@@ -1912,22 +1912,22 @@ function Vr({ value: e, options: t, onChange: n, "data-testid": r }) {
|
|
|
1912
1912
|
"data-testid": r
|
|
1913
1913
|
});
|
|
1914
1914
|
}
|
|
1915
|
-
var
|
|
1915
|
+
var Ur = { logo: "_logo_t6mnr_2" }, Wr = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"80\" height=\"80\" fill=\"none\" viewBox=\"0 0 80 80\"><path fill=\"#e6d9ca\" d=\"M47.328 24.999V10H32.329v14.999h-15v15h15v14.999h14.999V39.999h14.999V25z\"/><path fill=\"#ff4235\" d=\"M32.328 40a15 15 0 0 0 14.998 15h15v15H47.329a15 15 0 0 1-15-15z\"/></svg>\n", Gr = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"80\" height=\"80\" fill=\"none\" viewBox=\"0 0 80 80\"><path fill=\"#1b1b1b\" d=\"M47.328 24.999V10H32.329v14.999h-15v15h15v14.999h14.999V39.999h14.999V25z\"/><path fill=\"#e6d9ca\" d=\"M32.328 40a15 15 0 0 0 14.998 15h15v15H47.329a15 15 0 0 1-15-15z\"/></svg>\n", Kr = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"80\" height=\"80\" fill=\"none\" viewBox=\"0 0 80 80\"><path fill=\"#1b1b1b\" d=\"M47.328 24.999V10H32.329v14.999h-15v15h15v14.999h14.999V39.999h14.999V25z\"/><path fill=\"#ff4235\" d=\"M32.328 40a15 15 0 0 0 14.998 15h15v15H47.329a15 15 0 0 1-15-15z\"/></svg>\n", qr = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"317\" height=\"80\" fill=\"none\" viewBox=\"0 0 317 80\"><g clip-path=\"url(#a)\"><path fill=\"#e6d9ca\" d=\"M7.54 63.372v-33.22H.02V15.932h7.539V0h16.046v15.93h11.31v14.223h-11.33v33.34zM103.586 47.3c0 18.721-14.222 32.706-31.612 32.706S40.484 66.021 40.484 47.3s14.08-32.95 31.49-32.95 31.612 14.222 31.612 32.95m-16.168.121c0-10.823-6.932-18.363-15.444-18.363s-15.438 7.54-15.438 18.363c0 10.574 6.932 17.87 15.438 17.87s15.444-7.296 15.444-17.87M142.002 78.406c-18.357 1.92-28.086-9.12-28.086-26.242V30.153h-7.539V15.93h7.571V0h16.002v15.93h11.303v14.223H129.95v22.133c0 8.75 4.006 12.033 12.033 11.52z\"/><path fill=\"#ff4235\" d=\"M163.155 53.502c2.068 7.68 8.148 12.398 15.688 12.398 5.345 0 10.574-2.31 13.249-7.297h17.141c-3.642 12.801-14.721 21.403-30.268 21.403-17.634 0-32.099-14.593-32.099-32.706s14.465-32.95 32.099-32.95c18.478 0 33.794 14.344 31.484 39.152zm31.363-13.134c-1.92-7.297-8.026-11.918-15.681-11.918-7.297 0-13.134 4.622-15.445 11.918zM260.296 72.71c-4.135 4.378-10.452 7.04-19.202 7.04-13.255 0-25.41-6.688-25.41-20.308 0-14.082 11.79-17.75 25.654-18.965 10.458-.973 17.87-2.19 17.87-7.297 0-3.283-4.256-5.959-11.425-5.959-5.716 0-12.283 2.56-13.742 7.905h-16.052c1.581-11.911 13.005-20.789 29.442-20.789 25.41 0 27.356 16.411 27.356 21.397V68.32c.137 3.481.751 6.927 1.824 10.24H261.89a22.4 22.4 0 0 1-1.594-5.85m-.486-24.322c-3.405 2.189-8.628 3.283-15.195 4.013-7.905.851-12.769 2.56-12.769 7.169 0 3.526 4.134 5.958 10.58 5.958 9.601 0 17.384-3.283 17.384-11.303zM316.205 78.406c-18.357 1.92-28.086-9.12-28.086-26.242V30.153h-7.52V15.93h7.539V0h16.046v15.93h11.31v14.223h-11.31v22.133c0 8.75 4.014 12.033 12.04 11.52zM7.495 47.044a16.45 16.45 0 0 0 16.392 16.392l10.99.044.038 16.354-10.983-.045A16.45 16.45 0 0 1 7.54 63.397z\"/></g><defs><clipPath id=\"a\"><path fill=\"#fff\" d=\"M0 0h316.224v80H0z\"/></clipPath></defs></svg>\n", Jr = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"317\" height=\"80\" fill=\"none\" viewBox=\"0 0 317 80\"><g clip-path=\"url(#a)\"><path fill=\"#1b1b1b\" d=\"M7.54 63.372v-33.22H.02V15.932h7.539V0h16.046v15.93h11.31v14.223h-11.31v33.34zM103.586 47.3c0 18.721-14.222 32.706-31.612 32.706S40.484 66.021 40.484 47.3s14.08-32.95 31.49-32.95 31.612 14.222 31.612 32.95m-16.168.121c0-10.823-6.931-18.363-15.444-18.363s-15.438 7.54-15.438 18.363c0 10.574 6.932 17.87 15.438 17.87s15.444-7.296 15.444-17.87M142.002 78.406c-18.357 1.92-28.086-9.12-28.086-26.242V30.153h-7.539V15.93h7.571V0h16.002v15.93h11.303v14.223H129.95v22.133c0 8.75 4.006 12.033 12.033 11.52z\"/><path fill=\"#e6d9ca\" d=\"M163.155 53.502c2.068 7.68 8.148 12.398 15.688 12.398 5.345 0 10.574-2.31 13.249-7.297h17.141c-3.642 12.801-14.721 21.403-30.268 21.403-17.634 0-32.099-14.593-32.099-32.706s14.465-32.95 32.099-32.95c18.478 0 33.794 14.344 31.484 39.152zm31.363-13.134c-1.92-7.297-8.026-11.918-15.681-11.918-7.297 0-13.134 4.622-15.445 11.918zM260.296 72.71c-4.135 4.378-10.452 7.04-19.202 7.04-13.255 0-25.41-6.688-25.41-20.308 0-14.082 11.79-17.75 25.654-18.965 10.458-.973 17.87-2.19 17.87-7.297 0-3.283-4.256-5.959-11.425-5.959-5.716 0-12.283 2.56-13.742 7.905h-16.046c1.581-11.911 13.006-20.789 29.442-20.789 25.41 0 27.356 16.411 27.356 21.397V68.32c.137 3.481.751 6.927 1.824 10.24h-14.721a22.4 22.4 0 0 1-1.6-5.85m-.486-24.322c-3.406 2.189-8.628 3.283-15.195 4.013-7.905.851-12.801 2.56-12.801 7.169 0 3.526 4.134 5.958 10.58 5.958 9.601 0 17.384-3.283 17.384-11.303zM316.204 78.406c-18.356 1.92-28.085-9.12-28.085-26.242V30.153h-7.54V15.93h7.54V0h16.046v15.93h11.31v14.223h-11.31v22.133c0 8.75 4.013 12.033 12.039 11.52zM7.495 47.044a16.45 16.45 0 0 0 16.392 16.392l10.99.044.038 16.354-10.983-.045A16.45 16.45 0 0 1 7.54 63.397z\"/></g><defs><clipPath id=\"a\"><path fill=\"#fff\" d=\"M0 0h316.224v80H0z\"/></clipPath></defs></svg>\n", Yr = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"317\" height=\"80\" fill=\"none\" viewBox=\"0 0 317 80\"><g clip-path=\"url(#a)\"><path fill=\"#1b1b1b\" d=\"M7.54 63.372v-33.22H.02V15.932h7.539V0h16.046v15.93h11.31v14.223h-11.33v33.34zM103.586 47.3c0 18.721-14.222 32.706-31.612 32.706S40.484 66.021 40.484 47.3s14.08-32.95 31.49-32.95 31.612 14.222 31.612 32.95m-16.168.121c0-10.823-6.932-18.363-15.444-18.363s-15.438 7.54-15.438 18.363c0 10.574 6.932 17.87 15.438 17.87s15.444-7.296 15.444-17.87M142.002 78.406c-18.357 1.92-28.086-9.12-28.086-26.242V30.153h-7.539V15.93h7.571V0h16.002v15.93h11.303v14.223H129.95v22.133c0 8.75 4.006 12.033 12.033 11.52z\"/><path fill=\"#ff4235\" d=\"M163.155 53.502c2.068 7.68 8.148 12.398 15.688 12.398 5.345 0 10.574-2.31 13.249-7.297h17.141c-3.642 12.801-14.721 21.403-30.268 21.403-17.634 0-32.099-14.593-32.099-32.706s14.465-32.95 32.099-32.95c18.478 0 33.794 14.344 31.484 39.152zm31.363-13.134c-1.92-7.297-8.026-11.918-15.681-11.918-7.297 0-13.134 4.622-15.445 11.918zM260.296 72.71c-4.135 4.378-10.452 7.04-19.202 7.04-13.255 0-25.41-6.688-25.41-20.308 0-14.082 11.79-17.75 25.654-18.965 10.458-.973 17.87-2.19 17.87-7.297 0-3.283-4.256-5.959-11.425-5.959-5.716 0-12.283 2.56-13.742 7.905h-16.046c1.581-11.911 13.006-20.789 29.442-20.789 25.41 0 27.356 16.411 27.356 21.397V68.32c.137 3.481.751 6.927 1.824 10.24h-14.721a22.4 22.4 0 0 1-1.6-5.85m-.486-24.322c-3.405 2.189-8.628 3.283-15.195 4.013-7.905.851-12.801 2.56-12.801 7.169 0 3.526 4.135 5.958 10.58 5.958 9.601 0 17.384-3.283 17.384-11.303zM316.204 78.406c-18.356 1.92-28.085-9.12-28.085-26.242V30.153h-7.54V15.93h7.54V0h16.046v15.93h11.31v14.223h-11.31v22.133c0 8.75 4.013 12.033 12.039 11.52zM7.495 47.044a16.45 16.45 0 0 0 16.392 16.392l10.99.044.038 16.354-10.983-.045A16.45 16.45 0 0 1 7.54 63.397z\"/></g><defs><clipPath id=\"a\"><path fill=\"#fff\" d=\"M0 0h316.224v80H0z\"/></clipPath></defs></svg>\n";
|
|
1916
1916
|
//#endregion
|
|
1917
1917
|
//#region src/components/LogoToteat/LogoToteat.tsx
|
|
1918
|
-
function
|
|
1918
|
+
function Xr(e) {
|
|
1919
1919
|
return e.replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<");
|
|
1920
1920
|
}
|
|
1921
|
-
var
|
|
1922
|
-
original:
|
|
1923
|
-
"cream-orange":
|
|
1924
|
-
"black-cream":
|
|
1925
|
-
},
|
|
1926
|
-
original:
|
|
1927
|
-
"cream-orange":
|
|
1928
|
-
"black-cream":
|
|
1921
|
+
var Zr = {
|
|
1922
|
+
original: Yr,
|
|
1923
|
+
"cream-orange": qr,
|
|
1924
|
+
"black-cream": Jr
|
|
1925
|
+
}, Qr = {
|
|
1926
|
+
original: Kr,
|
|
1927
|
+
"cream-orange": Wr,
|
|
1928
|
+
"black-cream": Gr
|
|
1929
1929
|
};
|
|
1930
|
-
function
|
|
1930
|
+
function $r(e, t, n) {
|
|
1931
1931
|
if (t !== void 0 && n !== void 0) return {
|
|
1932
1932
|
width: t,
|
|
1933
1933
|
height: n
|
|
@@ -1950,17 +1950,17 @@ function Qr(e, t, n) {
|
|
|
1950
1950
|
height: Math.round(t / 317 * 80)
|
|
1951
1951
|
};
|
|
1952
1952
|
}
|
|
1953
|
-
function
|
|
1954
|
-
let s = e === "icon" ?
|
|
1953
|
+
function ei({ mode: e = "complete", variant: t = "original", width: n, height: r, alt: i = "Logo Toteat", className: a, ...o }) {
|
|
1954
|
+
let s = e === "icon" ? Qr[t] : Zr[t], c = $r(e, n, r), l = s.replace(/width="\d+"/, `width="${c.width}"`).replace(/height="\d+"/, `height="${c.height}"`).replace(/<svg/, `<svg role="img" aria-label="${Xr(i)}"`);
|
|
1955
1955
|
return /* @__PURE__ */ d("span", {
|
|
1956
|
-
className: [
|
|
1956
|
+
className: [Ur.logo, a].filter(Boolean).join(" "),
|
|
1957
1957
|
"data-mode": e,
|
|
1958
1958
|
"data-variant": t,
|
|
1959
1959
|
...o,
|
|
1960
1960
|
dangerouslySetInnerHTML: { __html: l }
|
|
1961
1961
|
});
|
|
1962
1962
|
}
|
|
1963
|
-
var
|
|
1963
|
+
var G = {
|
|
1964
1964
|
multiselect: "_multiselect_jb72r_2",
|
|
1965
1965
|
trigger: "_trigger_jb72r_10",
|
|
1966
1966
|
placeholder: "_placeholder_jb72r_42",
|
|
@@ -1971,9 +1971,9 @@ var K = {
|
|
|
1971
1971
|
search: "_search_jb72r_120",
|
|
1972
1972
|
option: "_option_jb72r_108",
|
|
1973
1973
|
noResults: "_noResults_jb72r_162"
|
|
1974
|
-
},
|
|
1975
|
-
function
|
|
1976
|
-
let [m, h] = l(!1), [g, _] = l(""), { isOpen: v, containerRef: y, triggerRef: b, toggle: x, closeAndFocusTrigger: S } =
|
|
1974
|
+
}, ti = 240;
|
|
1975
|
+
function ni({ options: e, value: t, onChange: n, placeholder: r = "Seleccionar...", searchPlaceholder: a = "Buscar...", noResultsText: o = "Sin resultados", removeLabel: s = "Eliminar", disabled: c, error: u, "data-testid": p }) {
|
|
1976
|
+
let [m, h] = l(!1), [g, _] = l(""), { isOpen: v, containerRef: y, triggerRef: b, toggle: x, closeAndFocusTrigger: S } = ur({
|
|
1977
1977
|
disabled: c,
|
|
1978
1978
|
closeOnOutsideClick: !1
|
|
1979
1979
|
}), C = e.filter((e) => t.includes(e.value)), w = e.filter((e) => !t.includes(e.value) && e.label.toLowerCase().includes(g.toLowerCase()));
|
|
@@ -1996,31 +1996,31 @@ function ti({ options: e, value: t, onChange: n, placeholder: r = "Seleccionar..
|
|
|
1996
1996
|
}, [v, S]), i(() => {
|
|
1997
1997
|
if (!v || !y.current) return;
|
|
1998
1998
|
let e = y.current.getBoundingClientRect();
|
|
1999
|
-
h(window.innerHeight - e.bottom <
|
|
1999
|
+
h(window.innerHeight - e.bottom < ti + 8);
|
|
2000
2000
|
}, [v, y]);
|
|
2001
2001
|
let T = (e) => n([...t, e]), E = (e) => n(t.filter((t) => t !== e));
|
|
2002
2002
|
return /* @__PURE__ */ f("div", {
|
|
2003
2003
|
ref: y,
|
|
2004
|
-
className:
|
|
2004
|
+
className: G.multiselect,
|
|
2005
2005
|
"data-error": u || void 0,
|
|
2006
2006
|
"data-disabled": c || void 0,
|
|
2007
2007
|
"data-testid": p,
|
|
2008
2008
|
children: [/* @__PURE__ */ f("button", {
|
|
2009
2009
|
ref: b,
|
|
2010
2010
|
type: "button",
|
|
2011
|
-
className:
|
|
2011
|
+
className: G.trigger,
|
|
2012
2012
|
onClick: x,
|
|
2013
2013
|
"aria-haspopup": "listbox",
|
|
2014
2014
|
"aria-expanded": v,
|
|
2015
2015
|
disabled: c,
|
|
2016
2016
|
children: [C.length === 0 && /* @__PURE__ */ d("span", {
|
|
2017
|
-
className:
|
|
2017
|
+
className: G.placeholder,
|
|
2018
2018
|
children: r
|
|
2019
2019
|
}), C.map((e) => /* @__PURE__ */ f("span", {
|
|
2020
|
-
className:
|
|
2020
|
+
className: G.tag,
|
|
2021
2021
|
children: [e.label, /* @__PURE__ */ d("button", {
|
|
2022
2022
|
type: "button",
|
|
2023
|
-
className:
|
|
2023
|
+
className: G.tagRemove,
|
|
2024
2024
|
onClick: (t) => {
|
|
2025
2025
|
t.stopPropagation(), E(e.value);
|
|
2026
2026
|
},
|
|
@@ -2029,38 +2029,38 @@ function ti({ options: e, value: t, onChange: n, placeholder: r = "Seleccionar..
|
|
|
2029
2029
|
})]
|
|
2030
2030
|
}, e.value))]
|
|
2031
2031
|
}), v && /* @__PURE__ */ f("div", {
|
|
2032
|
-
className:
|
|
2032
|
+
className: G.dropdown,
|
|
2033
2033
|
role: "listbox",
|
|
2034
2034
|
"aria-multiselectable": "true",
|
|
2035
2035
|
"data-upward": m || void 0,
|
|
2036
2036
|
children: [/* @__PURE__ */ d("input", {
|
|
2037
2037
|
type: "text",
|
|
2038
|
-
className:
|
|
2038
|
+
className: G.search,
|
|
2039
2039
|
placeholder: a,
|
|
2040
2040
|
"aria-label": a,
|
|
2041
2041
|
value: g,
|
|
2042
2042
|
onChange: (e) => _(e.target.value),
|
|
2043
2043
|
autoFocus: !0
|
|
2044
2044
|
}), /* @__PURE__ */ f("div", {
|
|
2045
|
-
className:
|
|
2045
|
+
className: G.optionsList,
|
|
2046
2046
|
children: [w.map((e) => /* @__PURE__ */ d("button", {
|
|
2047
2047
|
type: "button",
|
|
2048
2048
|
role: "option",
|
|
2049
2049
|
"aria-selected": t.includes(e.value),
|
|
2050
|
-
className:
|
|
2050
|
+
className: G.option,
|
|
2051
2051
|
onClick: () => {
|
|
2052
2052
|
T(e.value), _("");
|
|
2053
2053
|
},
|
|
2054
2054
|
children: e.label
|
|
2055
2055
|
}, e.value)), w.length === 0 && /* @__PURE__ */ d("div", {
|
|
2056
|
-
className:
|
|
2056
|
+
className: G.noResults,
|
|
2057
2057
|
children: o
|
|
2058
2058
|
})]
|
|
2059
2059
|
})]
|
|
2060
2060
|
})]
|
|
2061
2061
|
});
|
|
2062
2062
|
}
|
|
2063
|
-
var
|
|
2063
|
+
var K = {
|
|
2064
2064
|
navbar: "_navbar_1rz8d_2",
|
|
2065
2065
|
navLeft: "_navLeft_1rz8d_16",
|
|
2066
2066
|
menuButton: "_menuButton_1rz8d_27",
|
|
@@ -2075,20 +2075,20 @@ var q = {
|
|
|
2075
2075
|
};
|
|
2076
2076
|
//#endregion
|
|
2077
2077
|
//#region src/components/NavBar/NavBar.tsx
|
|
2078
|
-
function
|
|
2078
|
+
function ri({ restaurantName: e, onMenuToggle: t, onLogoClick: n, onRightToggle: r, isLoading: i = !1, isPinLocked: a = !1, rightSlot: o, "data-testid": s }) {
|
|
2079
2079
|
return a ? null : /* @__PURE__ */ f("header", {
|
|
2080
|
-
className:
|
|
2080
|
+
className: K.navbar,
|
|
2081
2081
|
"data-testid": s,
|
|
2082
2082
|
children: [
|
|
2083
2083
|
/* @__PURE__ */ f("div", {
|
|
2084
|
-
className:
|
|
2084
|
+
className: K.navLeft,
|
|
2085
2085
|
children: [/* @__PURE__ */ d("button", {
|
|
2086
2086
|
type: "button",
|
|
2087
|
-
className:
|
|
2087
|
+
className: K.menuButton,
|
|
2088
2088
|
onClick: t,
|
|
2089
2089
|
"aria-label": "Abrir menú",
|
|
2090
2090
|
children: /* @__PURE__ */ d("span", {
|
|
2091
|
-
className:
|
|
2091
|
+
className: K.menuIcon,
|
|
2092
2092
|
"aria-hidden": "true"
|
|
2093
2093
|
})
|
|
2094
2094
|
}), i && /* @__PURE__ */ d("img", {
|
|
@@ -2096,31 +2096,31 @@ function ni({ restaurantName: e, onMenuToggle: t, onLogoClick: n, onRightToggle:
|
|
|
2096
2096
|
alt: "Cargando",
|
|
2097
2097
|
width: 20,
|
|
2098
2098
|
height: 20,
|
|
2099
|
-
className:
|
|
2099
|
+
className: K.spinner
|
|
2100
2100
|
})]
|
|
2101
2101
|
}),
|
|
2102
2102
|
/* @__PURE__ */ f("div", {
|
|
2103
|
-
className:
|
|
2103
|
+
className: K.navCenter,
|
|
2104
2104
|
children: [/* @__PURE__ */ d("button", {
|
|
2105
2105
|
type: "button",
|
|
2106
|
-
className:
|
|
2106
|
+
className: K.logoBrand,
|
|
2107
2107
|
onClick: n,
|
|
2108
2108
|
"aria-label": "Ir al inicio",
|
|
2109
2109
|
children: /* @__PURE__ */ d("img", {
|
|
2110
2110
|
src: "/assets/angular/dsLogo.svg",
|
|
2111
2111
|
alt: "Toteat",
|
|
2112
|
-
className:
|
|
2112
|
+
className: K.logo
|
|
2113
2113
|
})
|
|
2114
2114
|
}), /* @__PURE__ */ d("span", {
|
|
2115
|
-
className:
|
|
2115
|
+
className: K.restaurantName,
|
|
2116
2116
|
children: e
|
|
2117
2117
|
})]
|
|
2118
2118
|
}),
|
|
2119
2119
|
/* @__PURE__ */ f("div", {
|
|
2120
|
-
className:
|
|
2120
|
+
className: K.navRight,
|
|
2121
2121
|
children: [o, /* @__PURE__ */ d("button", {
|
|
2122
2122
|
type: "button",
|
|
2123
|
-
className:
|
|
2123
|
+
className: K.rightButton,
|
|
2124
2124
|
onClick: r,
|
|
2125
2125
|
"aria-label": "Pantalla completa",
|
|
2126
2126
|
children: /* @__PURE__ */ d("img", {
|
|
@@ -2135,7 +2135,7 @@ function ni({ restaurantName: e, onMenuToggle: t, onLogoClick: n, onRightToggle:
|
|
|
2135
2135
|
]
|
|
2136
2136
|
});
|
|
2137
2137
|
}
|
|
2138
|
-
var
|
|
2138
|
+
var ii = {
|
|
2139
2139
|
overlay: "_overlay_8yoic_2",
|
|
2140
2140
|
"overlay-fade-in": "_overlay-fade-in_8yoic_1",
|
|
2141
2141
|
backdrop: "_backdrop_8yoic_22",
|
|
@@ -2143,11 +2143,11 @@ var ri = {
|
|
|
2143
2143
|
};
|
|
2144
2144
|
//#endregion
|
|
2145
2145
|
//#region src/components/Overlay/Overlay.tsx
|
|
2146
|
-
function
|
|
2146
|
+
function ai({ visible: e = !1, onClose: t, children: n, dismissible: a = !0, closeOnBackdrop: o = !0, closeOnEsc: s = !0, lockScroll: c = !0, blur: l = !1, placement: u = "center", zIndex: p = 1200, role: m = "presentation", "aria-label": h, className: g, "data-testid": _ }) {
|
|
2147
2147
|
let v = r(() => {
|
|
2148
2148
|
a && t();
|
|
2149
2149
|
}, [a, t]);
|
|
2150
|
-
return
|
|
2150
|
+
return rr(e && c, { strategy: "overflow" }), i(() => {
|
|
2151
2151
|
if (!e || !s) return;
|
|
2152
2152
|
let t = (e) => {
|
|
2153
2153
|
e.key === "Escape" && v();
|
|
@@ -2159,7 +2159,7 @@ function ii({ visible: e = !1, onClose: t, children: n, dismissible: a = !0, clo
|
|
|
2159
2159
|
v
|
|
2160
2160
|
]), !e || typeof document > "u" ? null : j(/* @__PURE__ */ f("div", {
|
|
2161
2161
|
"data-testid": _,
|
|
2162
|
-
className: [
|
|
2162
|
+
className: [ii.overlay, g].filter(Boolean).join(" "),
|
|
2163
2163
|
"data-blur": l ? "" : void 0,
|
|
2164
2164
|
"data-placement": u,
|
|
2165
2165
|
style: { "--overlay-z-index": String(p) },
|
|
@@ -2167,18 +2167,18 @@ function ii({ visible: e = !1, onClose: t, children: n, dismissible: a = !0, clo
|
|
|
2167
2167
|
"aria-label": h,
|
|
2168
2168
|
children: [/* @__PURE__ */ d("button", {
|
|
2169
2169
|
type: "button",
|
|
2170
|
-
className:
|
|
2170
|
+
className: ii.backdrop,
|
|
2171
2171
|
"data-backdrop": "",
|
|
2172
2172
|
onClick: o ? v : void 0,
|
|
2173
2173
|
"aria-hidden": "true",
|
|
2174
2174
|
tabIndex: -1
|
|
2175
2175
|
}), /* @__PURE__ */ d("div", {
|
|
2176
|
-
className:
|
|
2176
|
+
className: ii.content,
|
|
2177
2177
|
children: n
|
|
2178
2178
|
})]
|
|
2179
2179
|
}), document.body);
|
|
2180
2180
|
}
|
|
2181
|
-
var
|
|
2181
|
+
var q = {
|
|
2182
2182
|
overlayMessage: "_overlayMessage_we8nc_2",
|
|
2183
2183
|
header: "_header_we8nc_20",
|
|
2184
2184
|
iconWrap: "_iconWrap_we8nc_30",
|
|
@@ -2189,21 +2189,21 @@ var J = {
|
|
|
2189
2189
|
closeBtn: "_closeBtn_we8nc_66",
|
|
2190
2190
|
body: "_body_we8nc_94",
|
|
2191
2191
|
actions: "_actions_we8nc_101"
|
|
2192
|
-
},
|
|
2192
|
+
}, oi = {
|
|
2193
2193
|
success: "success-outline",
|
|
2194
2194
|
info: "info-outline",
|
|
2195
2195
|
warning: "exclamation-outline",
|
|
2196
2196
|
error: "error-outline"
|
|
2197
|
-
},
|
|
2197
|
+
}, si = {
|
|
2198
2198
|
success: "var(--ds-color-success)",
|
|
2199
2199
|
info: "var(--ds-color-info)",
|
|
2200
2200
|
warning: "var(--ds-color-warning)",
|
|
2201
2201
|
error: "var(--ds-color-primary)"
|
|
2202
2202
|
};
|
|
2203
|
-
function
|
|
2204
|
-
let S = a(), C = a(), w = i ??
|
|
2203
|
+
function ci({ title: e, eyebrow: t, children: n, status: r = "success", iconName: i, iconSize: o = 44, dismissible: s = !0, showCloseButton: c = !0, closeButtonLabel: l = "Close overlay message", primaryButtonLabel: u, secondaryButtonLabel: p, loadingPrimary: m = !1, loadingSecondary: h = !1, maxWidth: g = 400, standalone: _ = !1, onClose: v, onPrimaryClick: y, onSecondaryClick: b, "data-testid": x }) {
|
|
2204
|
+
let S = a(), C = a(), w = i ?? oi[r], T = si[r], E = !!n, D = !!u || !!p;
|
|
2205
2205
|
return /* @__PURE__ */ f("div", {
|
|
2206
|
-
className:
|
|
2206
|
+
className: q.overlayMessage,
|
|
2207
2207
|
"data-status": r,
|
|
2208
2208
|
"data-standalone": _ ? "" : void 0,
|
|
2209
2209
|
role: _ ? "region" : "alertdialog",
|
|
@@ -2214,13 +2214,13 @@ function si({ title: e, eyebrow: t, children: n, status: r = "success", iconName
|
|
|
2214
2214
|
"data-testid": x,
|
|
2215
2215
|
children: [
|
|
2216
2216
|
/* @__PURE__ */ f("header", {
|
|
2217
|
-
className:
|
|
2217
|
+
className: q.header,
|
|
2218
2218
|
children: [
|
|
2219
2219
|
/* @__PURE__ */ d("div", {
|
|
2220
|
-
className:
|
|
2220
|
+
className: q.iconWrap,
|
|
2221
2221
|
"aria-hidden": "true",
|
|
2222
2222
|
children: /* @__PURE__ */ d("span", {
|
|
2223
|
-
className:
|
|
2223
|
+
className: q.iconColor,
|
|
2224
2224
|
style: { "--om-icon-color": T },
|
|
2225
2225
|
children: /* @__PURE__ */ d(F, {
|
|
2226
2226
|
name: w,
|
|
@@ -2229,18 +2229,18 @@ function si({ title: e, eyebrow: t, children: n, status: r = "success", iconName
|
|
|
2229
2229
|
})
|
|
2230
2230
|
}),
|
|
2231
2231
|
/* @__PURE__ */ f("div", {
|
|
2232
|
-
className:
|
|
2232
|
+
className: q.headline,
|
|
2233
2233
|
children: [t && /* @__PURE__ */ d("p", {
|
|
2234
|
-
className:
|
|
2234
|
+
className: q.eyebrow,
|
|
2235
2235
|
children: t
|
|
2236
2236
|
}), /* @__PURE__ */ d("h2", {
|
|
2237
|
-
className:
|
|
2237
|
+
className: q.title,
|
|
2238
2238
|
id: S,
|
|
2239
2239
|
children: e
|
|
2240
2240
|
})]
|
|
2241
2241
|
}),
|
|
2242
|
-
s && c && /* @__PURE__ */ d(
|
|
2243
|
-
className:
|
|
2242
|
+
s && c && /* @__PURE__ */ d(sr, {
|
|
2243
|
+
className: q.closeBtn,
|
|
2244
2244
|
label: l,
|
|
2245
2245
|
onClick: v,
|
|
2246
2246
|
size: 20
|
|
@@ -2248,12 +2248,12 @@ function si({ title: e, eyebrow: t, children: n, status: r = "success", iconName
|
|
|
2248
2248
|
]
|
|
2249
2249
|
}),
|
|
2250
2250
|
E && /* @__PURE__ */ d("div", {
|
|
2251
|
-
className:
|
|
2251
|
+
className: q.body,
|
|
2252
2252
|
id: C,
|
|
2253
2253
|
children: n
|
|
2254
2254
|
}),
|
|
2255
2255
|
D && /* @__PURE__ */ f("footer", {
|
|
2256
|
-
className:
|
|
2256
|
+
className: q.actions,
|
|
2257
2257
|
children: [p && /* @__PURE__ */ d(I, {
|
|
2258
2258
|
variant: "outline",
|
|
2259
2259
|
fullWidth: !0,
|
|
@@ -2271,14 +2271,14 @@ function si({ title: e, eyebrow: t, children: n, status: r = "success", iconName
|
|
|
2271
2271
|
]
|
|
2272
2272
|
});
|
|
2273
2273
|
}
|
|
2274
|
-
function
|
|
2275
|
-
return e ? u ? /* @__PURE__ */ d(
|
|
2274
|
+
function li({ visible: e = !1, onClose: t, dismissible: n = !0, closeOnBackdrop: r = !0, closeOnEsc: i = !0, lockScroll: a = !0, zIndex: o = 1200, blur: s = !1, placement: c = "center", "aria-label": l, standalone: u = !1, "data-testid": f, ...p }) {
|
|
2275
|
+
return e ? u ? /* @__PURE__ */ d(ci, {
|
|
2276
2276
|
...p,
|
|
2277
2277
|
standalone: !0,
|
|
2278
2278
|
dismissible: n,
|
|
2279
2279
|
onClose: t,
|
|
2280
2280
|
"data-testid": f
|
|
2281
|
-
}) : /* @__PURE__ */ d(
|
|
2281
|
+
}) : /* @__PURE__ */ d(ai, {
|
|
2282
2282
|
visible: e,
|
|
2283
2283
|
onClose: t,
|
|
2284
2284
|
dismissible: n,
|
|
@@ -2289,7 +2289,7 @@ function ci({ visible: e = !1, onClose: t, dismissible: n = !0, closeOnBackdrop:
|
|
|
2289
2289
|
blur: s,
|
|
2290
2290
|
placement: c,
|
|
2291
2291
|
"aria-label": l,
|
|
2292
|
-
children: /* @__PURE__ */ d(
|
|
2292
|
+
children: /* @__PURE__ */ d(ci, {
|
|
2293
2293
|
...p,
|
|
2294
2294
|
dismissible: n,
|
|
2295
2295
|
onClose: t,
|
|
@@ -2297,15 +2297,15 @@ function ci({ visible: e = !1, onClose: t, dismissible: n = !0, closeOnBackdrop:
|
|
|
2297
2297
|
})
|
|
2298
2298
|
}) : null;
|
|
2299
2299
|
}
|
|
2300
|
-
var
|
|
2301
|
-
function
|
|
2300
|
+
var ui = { canvas: "_canvas_ljz2v_7" }, di = "#version 300 es\nin vec2 a_pos;\nvoid main() { gl_Position = vec4(a_pos, 0.0, 1.0); }", fi = "#version 300 es\nprecision highp float;\n\nuniform float u_time;\nuniform vec2 u_res;\nout vec4 fragColor;\n\n#define PI 3.14159265359\n#define CELL 18.0 /* px per grid cell */\n#define RADIUS 2.1 /* dot radius in px */\n#define SPEED 25.0 /* wave propagation */\n#define PERIOD 3.8 /* seconds per cycle */\n#define AMP 0.40 /* wave amplitude */\n#define BASE 1.30 /* resting scale */\n\nfloat swave(float t, float k) {\n return (2.0 * AMP / PI) * atan(sin(2.0 * PI * t / PERIOD) / k);\n}\n\nvoid main() {\n vec2 p = gl_FragCoord.xy;\n vec2 center = u_res * 0.5;\n vec2 gridP = p / CELL;\n\n float alpha = 0.0;\n\n for (int dy = -2; dy <= 2; dy++) {\n for (int dx = -2; dx <= 2; dx++) {\n /* grid cell index of this neighbour */\n vec2 cell = floor(gridP) + vec2(float(dx), float(dy));\n\n /* hex stagger: odd x-columns shift down half a cell */\n float hexY = mod(cell.x, 2.0) * 0.5;\n\n /* dot centre in grid units relative to screen centre */\n vec2 origGU = cell + vec2(0.5, 0.5 + hexY) - center / CELL;\n\n /* distance with 8-fold angular symmetry → petal wave-front */\n float d8 = length(origGU) + 0.5 * cos(8.0 * atan(origGU.y, origGU.x));\n\n /* smooth-square-wave breathing */\n float k = 0.15 + 0.2 * abs(d8) / 72.0;\n float wave = swave(u_time - d8 / SPEED, k);\n float scale = wave + BASE;\n\n /* animated dot centre in pixel space */\n vec2 animPx = origGU * scale * CELL + center;\n\n /* soft circle SDF */\n float dist = length(p - animPx);\n float a = 1.0 - smoothstep(RADIUS - 0.6, RADIUS + 0.6, dist);\n alpha = max(alpha, a);\n }\n }\n\n /* primary colour #ff4235 at low opacity — sits on frosted-glass overlay */\n fragColor = vec4(1.0, 0.259, 0.208, alpha * 0.28);\n}";
|
|
2301
|
+
function pi(e) {
|
|
2302
2302
|
let t = (t, n) => {
|
|
2303
2303
|
let r = e.createShader(t);
|
|
2304
2304
|
return e.shaderSource(r, n), e.compileShader(r), r;
|
|
2305
2305
|
}, n = e.createProgram();
|
|
2306
|
-
return e.attachShader(n, t(e.VERTEX_SHADER,
|
|
2306
|
+
return e.attachShader(n, t(e.VERTEX_SHADER, di)), e.attachShader(n, t(e.FRAGMENT_SHADER, fi)), e.linkProgram(n), n;
|
|
2307
2307
|
}
|
|
2308
|
-
function
|
|
2308
|
+
function mi({ active: e }) {
|
|
2309
2309
|
let t = c(null);
|
|
2310
2310
|
return i(() => {
|
|
2311
2311
|
if (!e || !t.current || window.matchMedia("(prefers-reduced-motion: reduce)").matches) return;
|
|
@@ -2316,7 +2316,7 @@ function pi({ active: e }) {
|
|
|
2316
2316
|
if (!r) return;
|
|
2317
2317
|
let i = () => {
|
|
2318
2318
|
n.width = window.innerWidth, n.height = window.innerHeight, r.viewport(0, 0, n.width, n.height), r.uniform2f(l, n.width, n.height);
|
|
2319
|
-
}, a =
|
|
2319
|
+
}, a = pi(r);
|
|
2320
2320
|
r.useProgram(a);
|
|
2321
2321
|
let o = r.createBuffer();
|
|
2322
2322
|
r.bindBuffer(r.ARRAY_BUFFER, o), r.bufferData(r.ARRAY_BUFFER, new Float32Array([
|
|
@@ -2345,15 +2345,15 @@ function pi({ active: e }) {
|
|
|
2345
2345
|
};
|
|
2346
2346
|
}, [e]), /* @__PURE__ */ d("canvas", {
|
|
2347
2347
|
ref: t,
|
|
2348
|
-
className:
|
|
2348
|
+
className: ui.canvas,
|
|
2349
2349
|
"aria-hidden": "true"
|
|
2350
2350
|
});
|
|
2351
2351
|
}
|
|
2352
|
-
var
|
|
2352
|
+
var hi = {
|
|
2353
2353
|
overlay: "_overlay_15uou_3",
|
|
2354
2354
|
logoLayer: "_logoLayer_15uou_58",
|
|
2355
2355
|
srOnly: "_srOnly_15uou_103"
|
|
2356
|
-
},
|
|
2356
|
+
}, J = {
|
|
2357
2357
|
outer: "_outer_1o0vn_9",
|
|
2358
2358
|
circle: "_circle_1o0vn_20",
|
|
2359
2359
|
"circle-lift": "_circle-lift_1o0vn_1",
|
|
@@ -2366,27 +2366,27 @@ var mi = {
|
|
|
2366
2366
|
};
|
|
2367
2367
|
//#endregion
|
|
2368
2368
|
//#region src/components/PageLoadingOverlay/ToteatLogo.tsx
|
|
2369
|
-
function
|
|
2369
|
+
function gi() {
|
|
2370
2370
|
return /* @__PURE__ */ f("div", {
|
|
2371
|
-
className:
|
|
2371
|
+
className: J.outer,
|
|
2372
2372
|
"aria-hidden": "true",
|
|
2373
2373
|
children: [
|
|
2374
|
-
/* @__PURE__ */ d("div", { className:
|
|
2375
|
-
/* @__PURE__ */ d("div", { className:
|
|
2376
|
-
/* @__PURE__ */ d("div", { className:
|
|
2374
|
+
/* @__PURE__ */ d("div", { className: J.ring }),
|
|
2375
|
+
/* @__PURE__ */ d("div", { className: J.ring }),
|
|
2376
|
+
/* @__PURE__ */ d("div", { className: J.ring }),
|
|
2377
2377
|
/* @__PURE__ */ d("div", {
|
|
2378
|
-
className:
|
|
2378
|
+
className: J.circle,
|
|
2379
2379
|
children: /* @__PURE__ */ f("svg", {
|
|
2380
|
-
className:
|
|
2380
|
+
className: J.logo,
|
|
2381
2381
|
viewBox: "0 0 80 80",
|
|
2382
2382
|
fill: "none",
|
|
2383
2383
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2384
2384
|
"aria-hidden": "true",
|
|
2385
2385
|
children: [/* @__PURE__ */ d("path", {
|
|
2386
|
-
className:
|
|
2386
|
+
className: J.pathDark,
|
|
2387
2387
|
d: "M47.328 24.999V10H32.329v14.999h-15v15h15v14.999h14.999V39.999h14.999V25z"
|
|
2388
2388
|
}), /* @__PURE__ */ d("path", {
|
|
2389
|
-
className:
|
|
2389
|
+
className: J.pathRed,
|
|
2390
2390
|
d: "M32.328 40a15 15 0 0 0 14.998 15h15v15H47.329a15 15 0 0 1-15-15z"
|
|
2391
2391
|
})]
|
|
2392
2392
|
})
|
|
@@ -2396,26 +2396,26 @@ function hi() {
|
|
|
2396
2396
|
}
|
|
2397
2397
|
//#endregion
|
|
2398
2398
|
//#region src/components/PageLoadingOverlay/PageLoadingOverlay.tsx
|
|
2399
|
-
function
|
|
2399
|
+
function _i({ isOpen: e, label: t = "Cargando…", "data-testid": n }) {
|
|
2400
2400
|
return j(/* @__PURE__ */ f(u, { children: [
|
|
2401
2401
|
/* @__PURE__ */ d("div", {
|
|
2402
|
-
className:
|
|
2402
|
+
className: hi.overlay,
|
|
2403
2403
|
"data-open": e,
|
|
2404
2404
|
role: "status",
|
|
2405
2405
|
"aria-live": "polite",
|
|
2406
2406
|
"aria-busy": e,
|
|
2407
2407
|
"aria-label": t,
|
|
2408
2408
|
"data-testid": n,
|
|
2409
|
-
children: /* @__PURE__ */ d(
|
|
2409
|
+
children: /* @__PURE__ */ d(mi, { active: e })
|
|
2410
2410
|
}),
|
|
2411
2411
|
/* @__PURE__ */ d("div", {
|
|
2412
|
-
className: `${
|
|
2412
|
+
className: `${hi.logoLayer} tot-ds-root`,
|
|
2413
2413
|
"data-open": e,
|
|
2414
2414
|
"aria-hidden": "true",
|
|
2415
|
-
children: /* @__PURE__ */ d(
|
|
2415
|
+
children: /* @__PURE__ */ d(gi, {})
|
|
2416
2416
|
}),
|
|
2417
2417
|
/* @__PURE__ */ d("span", {
|
|
2418
|
-
className:
|
|
2418
|
+
className: hi.srOnly,
|
|
2419
2419
|
"aria-live": "polite",
|
|
2420
2420
|
"aria-atomic": "true",
|
|
2421
2421
|
children: e ? t : ""
|
|
@@ -2424,15 +2424,15 @@ function gi({ isOpen: e, label: t = "Cargando…", "data-testid": n }) {
|
|
|
2424
2424
|
}
|
|
2425
2425
|
//#endregion
|
|
2426
2426
|
//#region src/components/PermissionGate/PermissionGate.tsx
|
|
2427
|
-
function
|
|
2427
|
+
function vi({ granted: e, children: t, fallback: n = null }) {
|
|
2428
2428
|
return /* @__PURE__ */ d(u, { children: e ? t : n });
|
|
2429
2429
|
}
|
|
2430
|
-
var
|
|
2430
|
+
var yi = { overlay: "_overlay_16mjb_2" };
|
|
2431
2431
|
//#endregion
|
|
2432
2432
|
//#region src/components/PinLockOverlay/PinLockOverlay.tsx
|
|
2433
|
-
function
|
|
2433
|
+
function bi({ isLocked: e, children: t, "data-testid": n }) {
|
|
2434
2434
|
return e ? /* @__PURE__ */ d("div", {
|
|
2435
|
-
className:
|
|
2435
|
+
className: yi.overlay,
|
|
2436
2436
|
role: "dialog",
|
|
2437
2437
|
"aria-label": "Pantalla bloqueada — ingresa tu PIN",
|
|
2438
2438
|
"aria-modal": "true",
|
|
@@ -2440,7 +2440,7 @@ function yi({ isLocked: e, children: t, "data-testid": n }) {
|
|
|
2440
2440
|
children: t
|
|
2441
2441
|
}) : null;
|
|
2442
2442
|
}
|
|
2443
|
-
var
|
|
2443
|
+
var xi = {
|
|
2444
2444
|
tile: "_tile_gu9b4_2",
|
|
2445
2445
|
image: "_image_gu9b4_45",
|
|
2446
2446
|
name: "_name_gu9b4_53",
|
|
@@ -2449,13 +2449,13 @@ var bi = {
|
|
|
2449
2449
|
};
|
|
2450
2450
|
//#endregion
|
|
2451
2451
|
//#region src/components/ProductTile/ProductTile.tsx
|
|
2452
|
-
function
|
|
2452
|
+
function Si({ product: e, onAdd: t, "data-testid": n }) {
|
|
2453
2453
|
let r;
|
|
2454
2454
|
e.stockStatus === "depleted" ? r = "depleted" : e.stockStatus === "low" && (r = "low");
|
|
2455
2455
|
let i = e.stockStatus === "depleted";
|
|
2456
2456
|
return /* @__PURE__ */ f("button", {
|
|
2457
2457
|
type: "button",
|
|
2458
|
-
className:
|
|
2458
|
+
className: xi.tile,
|
|
2459
2459
|
"data-stock": r,
|
|
2460
2460
|
onClick: () => {
|
|
2461
2461
|
i || t(e);
|
|
@@ -2468,34 +2468,34 @@ function xi({ product: e, onAdd: t, "data-testid": n }) {
|
|
|
2468
2468
|
e.imageUrl && /* @__PURE__ */ d("img", {
|
|
2469
2469
|
src: e.imageUrl,
|
|
2470
2470
|
alt: "",
|
|
2471
|
-
className:
|
|
2471
|
+
className: xi.image,
|
|
2472
2472
|
"aria-hidden": "true",
|
|
2473
2473
|
loading: "lazy"
|
|
2474
2474
|
}),
|
|
2475
2475
|
/* @__PURE__ */ d("span", {
|
|
2476
|
-
className:
|
|
2476
|
+
className: xi.name,
|
|
2477
2477
|
children: e.name
|
|
2478
2478
|
}),
|
|
2479
2479
|
/* @__PURE__ */ f("span", {
|
|
2480
|
-
className:
|
|
2480
|
+
className: xi.price,
|
|
2481
2481
|
children: ["$", e.price.toLocaleString("es-CL")]
|
|
2482
2482
|
}),
|
|
2483
2483
|
e.hasExtras && /* @__PURE__ */ d("span", {
|
|
2484
|
-
className:
|
|
2484
|
+
className: xi.badge,
|
|
2485
2485
|
"data-type": "extras",
|
|
2486
2486
|
role: "img",
|
|
2487
2487
|
"aria-label": "Tiene extras",
|
|
2488
2488
|
children: "+"
|
|
2489
2489
|
}),
|
|
2490
2490
|
e.isWeighed && /* @__PURE__ */ d("span", {
|
|
2491
|
-
className:
|
|
2491
|
+
className: xi.badge,
|
|
2492
2492
|
"data-type": "weighed",
|
|
2493
2493
|
role: "img",
|
|
2494
2494
|
"aria-label": "Producto por peso",
|
|
2495
2495
|
children: "kg"
|
|
2496
2496
|
}),
|
|
2497
2497
|
e.stockStatus === "low" && /* @__PURE__ */ d("span", {
|
|
2498
|
-
className:
|
|
2498
|
+
className: xi.badge,
|
|
2499
2499
|
"data-type": "low-stock",
|
|
2500
2500
|
role: "img",
|
|
2501
2501
|
"aria-label": "Stock bajo",
|
|
@@ -2504,7 +2504,7 @@ function xi({ product: e, onAdd: t, "data-testid": n }) {
|
|
|
2504
2504
|
]
|
|
2505
2505
|
});
|
|
2506
2506
|
}
|
|
2507
|
-
var
|
|
2507
|
+
var Ci = n(Si), wi = {
|
|
2508
2508
|
wrapper: "_wrapper_lqgoi_2",
|
|
2509
2509
|
input: "_input_lqgoi_9",
|
|
2510
2510
|
circle: "_circle_lqgoi_27",
|
|
@@ -2512,10 +2512,10 @@ var Si = n(xi), Ci = {
|
|
|
2512
2512
|
};
|
|
2513
2513
|
//#endregion
|
|
2514
2514
|
//#region src/components/Radio/Radio.tsx
|
|
2515
|
-
function
|
|
2515
|
+
function Ti({ label: e, className: t, id: n, ref: r, "data-testid": i, ...a }) {
|
|
2516
2516
|
let o = n ?? `radio-${a.value}`;
|
|
2517
2517
|
return /* @__PURE__ */ f("label", {
|
|
2518
|
-
className: [
|
|
2518
|
+
className: [wi.wrapper, t].filter(Boolean).join(" "),
|
|
2519
2519
|
htmlFor: o,
|
|
2520
2520
|
"data-testid": i,
|
|
2521
2521
|
children: [
|
|
@@ -2523,21 +2523,21 @@ function wi({ label: e, className: t, id: n, ref: r, "data-testid": i, ...a }) {
|
|
|
2523
2523
|
ref: r,
|
|
2524
2524
|
type: "radio",
|
|
2525
2525
|
id: o,
|
|
2526
|
-
className:
|
|
2526
|
+
className: wi.input,
|
|
2527
2527
|
...a
|
|
2528
2528
|
}),
|
|
2529
2529
|
/* @__PURE__ */ d("span", {
|
|
2530
|
-
className:
|
|
2530
|
+
className: wi.circle,
|
|
2531
2531
|
"aria-hidden": "true"
|
|
2532
2532
|
}),
|
|
2533
2533
|
e && /* @__PURE__ */ d("span", {
|
|
2534
|
-
className:
|
|
2534
|
+
className: wi.label,
|
|
2535
2535
|
children: e
|
|
2536
2536
|
})
|
|
2537
2537
|
]
|
|
2538
2538
|
});
|
|
2539
2539
|
}
|
|
2540
|
-
var
|
|
2540
|
+
var Ei = {
|
|
2541
2541
|
root: "_root_fxapc_2",
|
|
2542
2542
|
srOnly: "_srOnly_fxapc_8",
|
|
2543
2543
|
input: "_input_fxapc_20",
|
|
@@ -2545,18 +2545,18 @@ var Ti = {
|
|
|
2545
2545
|
};
|
|
2546
2546
|
//#endregion
|
|
2547
2547
|
//#region src/components/SearchInput/SearchInput.tsx
|
|
2548
|
-
function
|
|
2548
|
+
function Di({ value: e, onChange: t, onClear: n, placeholder: r, label: i, id: o, disabled: s = !1, clearLabel: l = "Limpiar búsqueda", className: u, inputProps: p, "data-testid": m }) {
|
|
2549
2549
|
let h = a(), g = o ?? h, _ = c(null);
|
|
2550
2550
|
function v() {
|
|
2551
2551
|
n ? n() : t(""), _.current?.focus();
|
|
2552
2552
|
}
|
|
2553
2553
|
return /* @__PURE__ */ f("div", {
|
|
2554
|
-
className: [
|
|
2554
|
+
className: [Ei.root, u].filter(Boolean).join(" "),
|
|
2555
2555
|
"data-testid": m,
|
|
2556
2556
|
children: [
|
|
2557
2557
|
/* @__PURE__ */ d("label", {
|
|
2558
2558
|
htmlFor: g,
|
|
2559
|
-
className:
|
|
2559
|
+
className: Ei.srOnly,
|
|
2560
2560
|
children: i
|
|
2561
2561
|
}),
|
|
2562
2562
|
/* @__PURE__ */ d("input", {
|
|
@@ -2564,7 +2564,7 @@ function Ei({ value: e, onChange: t, onClear: n, placeholder: r, label: i, id: o
|
|
|
2564
2564
|
ref: _,
|
|
2565
2565
|
id: g,
|
|
2566
2566
|
type: "search",
|
|
2567
|
-
className:
|
|
2567
|
+
className: Ei.input,
|
|
2568
2568
|
value: e,
|
|
2569
2569
|
onChange: (e) => t(e.target.value),
|
|
2570
2570
|
placeholder: r,
|
|
@@ -2572,7 +2572,7 @@ function Ei({ value: e, onChange: t, onClear: n, placeholder: r, label: i, id: o
|
|
|
2572
2572
|
}),
|
|
2573
2573
|
e.length > 0 && /* @__PURE__ */ d("button", {
|
|
2574
2574
|
type: "button",
|
|
2575
|
-
className:
|
|
2575
|
+
className: Ei.clearButton,
|
|
2576
2576
|
"aria-label": l,
|
|
2577
2577
|
disabled: s,
|
|
2578
2578
|
onClick: v,
|
|
@@ -2585,7 +2585,7 @@ function Ei({ value: e, onChange: t, onClear: n, placeholder: r, label: i, id: o
|
|
|
2585
2585
|
]
|
|
2586
2586
|
});
|
|
2587
2587
|
}
|
|
2588
|
-
var
|
|
2588
|
+
var Oi = {
|
|
2589
2589
|
root: "_root_1nkx3_2",
|
|
2590
2590
|
content: "_content_1nkx3_9",
|
|
2591
2591
|
iconWrap: "_iconWrap_1nkx3_16",
|
|
@@ -2596,15 +2596,15 @@ var Di = {
|
|
|
2596
2596
|
};
|
|
2597
2597
|
//#endregion
|
|
2598
2598
|
//#region src/components/SectionHeader/SectionHeader.tsx
|
|
2599
|
-
function
|
|
2599
|
+
function ki({ title: e, description: t, icon: n, iconSize: r = 32, headingLevel: i = 2, actions: a, className: o, "data-testid": s }) {
|
|
2600
2600
|
let c = `h${i}`;
|
|
2601
2601
|
return /* @__PURE__ */ f("header", {
|
|
2602
|
-
className: [
|
|
2602
|
+
className: [Oi.root, o].filter(Boolean).join(" "),
|
|
2603
2603
|
"data-testid": s,
|
|
2604
2604
|
children: [/* @__PURE__ */ f("div", {
|
|
2605
|
-
className:
|
|
2605
|
+
className: Oi.content,
|
|
2606
2606
|
children: [n && /* @__PURE__ */ d("span", {
|
|
2607
|
-
className:
|
|
2607
|
+
className: Oi.iconWrap,
|
|
2608
2608
|
"aria-hidden": "true",
|
|
2609
2609
|
children: /* @__PURE__ */ d(F, {
|
|
2610
2610
|
name: n,
|
|
@@ -2612,22 +2612,22 @@ function Oi({ title: e, description: t, icon: n, iconSize: r = 32, headingLevel:
|
|
|
2612
2612
|
"aria-hidden": "true"
|
|
2613
2613
|
})
|
|
2614
2614
|
}), /* @__PURE__ */ f("div", {
|
|
2615
|
-
className:
|
|
2615
|
+
className: Oi.text,
|
|
2616
2616
|
children: [/* @__PURE__ */ d(c, {
|
|
2617
|
-
className:
|
|
2617
|
+
className: Oi.title,
|
|
2618
2618
|
children: e
|
|
2619
2619
|
}), t && /* @__PURE__ */ d("p", {
|
|
2620
|
-
className:
|
|
2620
|
+
className: Oi.description,
|
|
2621
2621
|
children: t
|
|
2622
2622
|
})]
|
|
2623
2623
|
})]
|
|
2624
2624
|
}), a && /* @__PURE__ */ d("div", {
|
|
2625
|
-
className:
|
|
2625
|
+
className: Oi.actions,
|
|
2626
2626
|
children: a
|
|
2627
2627
|
})]
|
|
2628
2628
|
});
|
|
2629
2629
|
}
|
|
2630
|
-
var
|
|
2630
|
+
var Y = {
|
|
2631
2631
|
select: "_select_yvx76_2",
|
|
2632
2632
|
trigger: "_trigger_yvx76_7",
|
|
2633
2633
|
value: "_value_yvx76_61",
|
|
@@ -2640,8 +2640,8 @@ var X = {
|
|
|
2640
2640
|
};
|
|
2641
2641
|
//#endregion
|
|
2642
2642
|
//#region src/components/Select/Select.tsx
|
|
2643
|
-
function
|
|
2644
|
-
let [h, g] = l(""), { isOpen: _, containerRef: v, triggerRef: y, toggle: b, close: x, closeAndFocusTrigger: S } =
|
|
2643
|
+
function Ai({ options: e, value: t, onChange: n, placeholder: r = "Seleccionar...", searchable: a = !1, searchPlaceholder: o = "Buscar...", noResultsText: s = "Sin resultados", disabled: c, error: u, name: p, "data-testid": m }) {
|
|
2644
|
+
let [h, g] = l(""), { isOpen: _, containerRef: v, triggerRef: y, toggle: b, close: x, closeAndFocusTrigger: S } = ur({
|
|
2645
2645
|
disabled: c,
|
|
2646
2646
|
closeOnOutsideClick: !1
|
|
2647
2647
|
}), C = e.find((e) => e.value === t), w = a ? e.filter((e) => e.label.toLowerCase().includes(h.toLowerCase())) : e;
|
|
@@ -2663,7 +2663,7 @@ function ki({ options: e, value: t, onChange: n, placeholder: r = "Seleccionar..
|
|
|
2663
2663
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
2664
2664
|
}, [_, S]), /* @__PURE__ */ f("div", {
|
|
2665
2665
|
ref: v,
|
|
2666
|
-
className:
|
|
2666
|
+
className: Y.select,
|
|
2667
2667
|
"data-open": _ || void 0,
|
|
2668
2668
|
"data-error": u || void 0,
|
|
2669
2669
|
"data-disabled": c || void 0,
|
|
@@ -2677,16 +2677,16 @@ function ki({ options: e, value: t, onChange: n, placeholder: r = "Seleccionar..
|
|
|
2677
2677
|
/* @__PURE__ */ f("button", {
|
|
2678
2678
|
ref: y,
|
|
2679
2679
|
type: "button",
|
|
2680
|
-
className:
|
|
2680
|
+
className: Y.trigger,
|
|
2681
2681
|
onClick: b,
|
|
2682
2682
|
"aria-haspopup": "listbox",
|
|
2683
2683
|
"aria-expanded": _,
|
|
2684
2684
|
disabled: c,
|
|
2685
2685
|
children: [/* @__PURE__ */ d("span", {
|
|
2686
|
-
className: C ?
|
|
2686
|
+
className: C ? Y.value : Y.placeholder,
|
|
2687
2687
|
children: C?.label ?? r
|
|
2688
2688
|
}), /* @__PURE__ */ d("span", {
|
|
2689
|
-
className:
|
|
2689
|
+
className: Y.chevron,
|
|
2690
2690
|
"aria-hidden": "true",
|
|
2691
2691
|
children: /* @__PURE__ */ d(F, {
|
|
2692
2692
|
name: "chevron-down-outline",
|
|
@@ -2696,12 +2696,12 @@ function ki({ options: e, value: t, onChange: n, placeholder: r = "Seleccionar..
|
|
|
2696
2696
|
})]
|
|
2697
2697
|
}),
|
|
2698
2698
|
_ && /* @__PURE__ */ f("div", {
|
|
2699
|
-
className:
|
|
2699
|
+
className: Y.dropdown,
|
|
2700
2700
|
role: "listbox",
|
|
2701
2701
|
children: [
|
|
2702
2702
|
a && /* @__PURE__ */ d("input", {
|
|
2703
2703
|
type: "text",
|
|
2704
|
-
className:
|
|
2704
|
+
className: Y.search,
|
|
2705
2705
|
placeholder: o,
|
|
2706
2706
|
"aria-label": o,
|
|
2707
2707
|
value: h,
|
|
@@ -2712,7 +2712,7 @@ function ki({ options: e, value: t, onChange: n, placeholder: r = "Seleccionar..
|
|
|
2712
2712
|
type: "button",
|
|
2713
2713
|
role: "option",
|
|
2714
2714
|
"aria-selected": e.value === t,
|
|
2715
|
-
className:
|
|
2715
|
+
className: Y.option,
|
|
2716
2716
|
"data-selected": e.value === t || void 0,
|
|
2717
2717
|
disabled: e.disabled,
|
|
2718
2718
|
onClick: () => {
|
|
@@ -2721,7 +2721,7 @@ function ki({ options: e, value: t, onChange: n, placeholder: r = "Seleccionar..
|
|
|
2721
2721
|
children: e.label
|
|
2722
2722
|
}, e.value)),
|
|
2723
2723
|
w.length === 0 && /* @__PURE__ */ d("div", {
|
|
2724
|
-
className:
|
|
2724
|
+
className: Y.noResults,
|
|
2725
2725
|
children: s
|
|
2726
2726
|
})
|
|
2727
2727
|
]
|
|
@@ -2729,35 +2729,35 @@ function ki({ options: e, value: t, onChange: n, placeholder: r = "Seleccionar..
|
|
|
2729
2729
|
]
|
|
2730
2730
|
});
|
|
2731
2731
|
}
|
|
2732
|
-
var
|
|
2732
|
+
var ji = {
|
|
2733
2733
|
backdrop: "_backdrop_e6k21_2",
|
|
2734
2734
|
sidebar: "_sidebar_e6k21_19"
|
|
2735
2735
|
};
|
|
2736
2736
|
//#endregion
|
|
2737
2737
|
//#region src/components/Sidebar/Sidebar.tsx
|
|
2738
|
-
function
|
|
2738
|
+
function Mi({ isOpen: e, onClose: t, isPinLocked: n = !1, isModal: r = !1, children: i }) {
|
|
2739
2739
|
return n || r ? null : /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", {
|
|
2740
|
-
className:
|
|
2740
|
+
className: ji.backdrop,
|
|
2741
2741
|
"data-open": e,
|
|
2742
2742
|
"data-testid": "sidebar-backdrop",
|
|
2743
2743
|
onClick: t,
|
|
2744
2744
|
role: "presentation",
|
|
2745
2745
|
"aria-hidden": "true"
|
|
2746
2746
|
}), /* @__PURE__ */ d("nav", {
|
|
2747
|
-
className:
|
|
2747
|
+
className: ji.sidebar,
|
|
2748
2748
|
"data-open": e,
|
|
2749
2749
|
"aria-label": "Menú principal",
|
|
2750
2750
|
children: i
|
|
2751
2751
|
})] });
|
|
2752
2752
|
}
|
|
2753
|
-
var
|
|
2753
|
+
var Ni = {
|
|
2754
2754
|
item: "_item_1twlt_2",
|
|
2755
2755
|
active: "_active_1twlt_33"
|
|
2756
|
-
},
|
|
2757
|
-
function
|
|
2756
|
+
}, Pi = Ni.item, Fi = Ni.active;
|
|
2757
|
+
function Ii({ label: e, isActive: t = !1, className: n, type: r = "button", ...i }) {
|
|
2758
2758
|
return /* @__PURE__ */ d("button", {
|
|
2759
2759
|
type: r,
|
|
2760
|
-
className: L(
|
|
2760
|
+
className: L(Ni.item, t && Ni.active, n),
|
|
2761
2761
|
"data-active": t || void 0,
|
|
2762
2762
|
...i,
|
|
2763
2763
|
children: e
|
|
@@ -2765,7 +2765,7 @@ function Fi({ label: e, isActive: t = !1, className: n, type: r = "button", ...i
|
|
|
2765
2765
|
}
|
|
2766
2766
|
//#endregion
|
|
2767
2767
|
//#region src/hooks/useToggle.ts
|
|
2768
|
-
function
|
|
2768
|
+
function Li(e = !1) {
|
|
2769
2769
|
let [t, n] = l(e);
|
|
2770
2770
|
return [
|
|
2771
2771
|
t,
|
|
@@ -2773,7 +2773,7 @@ function Ii(e = !1) {
|
|
|
2773
2773
|
n
|
|
2774
2774
|
];
|
|
2775
2775
|
}
|
|
2776
|
-
var
|
|
2776
|
+
var X = {
|
|
2777
2777
|
section: "_section_gn76y_2",
|
|
2778
2778
|
trigger: "_trigger_gn76y_7",
|
|
2779
2779
|
icon: "_icon_gn76y_44",
|
|
@@ -2785,44 +2785,44 @@ var Z = {
|
|
|
2785
2785
|
};
|
|
2786
2786
|
//#endregion
|
|
2787
2787
|
//#region src/components/SidebarNavSection/SidebarNavSection.tsx
|
|
2788
|
-
function
|
|
2789
|
-
let [c, l] =
|
|
2788
|
+
function Ri({ title: e, icon: t, titleSuffix: n, defaultOpen: r = !1, isActive: i = !1, className: a, children: o, "data-testid": s }) {
|
|
2789
|
+
let [c, l] = Li(r);
|
|
2790
2790
|
return /* @__PURE__ */ f("div", {
|
|
2791
|
-
className: L(
|
|
2791
|
+
className: L(X.section, a),
|
|
2792
2792
|
"data-testid": s,
|
|
2793
2793
|
children: [/* @__PURE__ */ f("button", {
|
|
2794
2794
|
type: "button",
|
|
2795
|
-
className:
|
|
2795
|
+
className: X.trigger,
|
|
2796
2796
|
"data-open": c || void 0,
|
|
2797
2797
|
"data-active": i || void 0,
|
|
2798
2798
|
onClick: l,
|
|
2799
2799
|
"aria-expanded": c,
|
|
2800
2800
|
children: [
|
|
2801
2801
|
t && /* @__PURE__ */ d("span", {
|
|
2802
|
-
className:
|
|
2802
|
+
className: X.icon,
|
|
2803
2803
|
"aria-hidden": "true",
|
|
2804
2804
|
children: t
|
|
2805
2805
|
}),
|
|
2806
2806
|
/* @__PURE__ */ d("span", {
|
|
2807
|
-
className:
|
|
2807
|
+
className: X.title,
|
|
2808
2808
|
children: e
|
|
2809
2809
|
}),
|
|
2810
2810
|
n && /* @__PURE__ */ d("span", {
|
|
2811
|
-
className:
|
|
2811
|
+
className: X.suffix,
|
|
2812
2812
|
"aria-hidden": "true",
|
|
2813
2813
|
children: n
|
|
2814
2814
|
}),
|
|
2815
2815
|
/* @__PURE__ */ d("span", {
|
|
2816
|
-
className:
|
|
2816
|
+
className: X.chevron,
|
|
2817
2817
|
"aria-hidden": "true"
|
|
2818
2818
|
})
|
|
2819
2819
|
]
|
|
2820
2820
|
}), /* @__PURE__ */ d("div", {
|
|
2821
|
-
className:
|
|
2821
|
+
className: X.content,
|
|
2822
2822
|
"data-open": c || void 0,
|
|
2823
2823
|
inert: !c || void 0,
|
|
2824
2824
|
children: /* @__PURE__ */ d("div", {
|
|
2825
|
-
className:
|
|
2825
|
+
className: X.inner,
|
|
2826
2826
|
children: o
|
|
2827
2827
|
})
|
|
2828
2828
|
})]
|
|
@@ -2830,7 +2830,7 @@ function Li({ title: e, icon: t, titleSuffix: n, defaultOpen: r = !1, isActive:
|
|
|
2830
2830
|
}
|
|
2831
2831
|
//#endregion
|
|
2832
2832
|
//#region src/components/StatusBadge/StatusBadge.tsx
|
|
2833
|
-
function
|
|
2833
|
+
function zi({ status: e, labels: t, variants: n, fallbackLabel: r, fallbackVariant: i = "default", size: a, "data-testid": o }) {
|
|
2834
2834
|
return /* @__PURE__ */ d(In, {
|
|
2835
2835
|
variant: n[e] ?? i,
|
|
2836
2836
|
size: a,
|
|
@@ -2838,26 +2838,76 @@ function Ri({ status: e, labels: t, variants: n, fallbackLabel: r, fallbackVaria
|
|
|
2838
2838
|
children: t[e] ?? r ?? e
|
|
2839
2839
|
});
|
|
2840
2840
|
}
|
|
2841
|
-
|
|
2841
|
+
//#endregion
|
|
2842
|
+
//#region src/components/UserNotification/NotificationBase.tsx
|
|
2843
|
+
function Bi({ variant: e, rootClassName: t, contentClassName: n, actionClassName: r, icon: i, action: a, children: o, className: s, "data-testid": c, dismissSlot: l, ariaAtomic: u }) {
|
|
2844
|
+
let p = e === "error";
|
|
2845
|
+
return /* @__PURE__ */ f("div", {
|
|
2846
|
+
className: [t, s].filter(Boolean).join(" "),
|
|
2847
|
+
"data-variant": e,
|
|
2848
|
+
role: p ? "alert" : "status",
|
|
2849
|
+
"aria-live": p ? "assertive" : "polite",
|
|
2850
|
+
"aria-atomic": u ? "true" : void 0,
|
|
2851
|
+
"data-testid": c,
|
|
2852
|
+
children: [
|
|
2853
|
+
i && /* @__PURE__ */ d(F, {
|
|
2854
|
+
name: i,
|
|
2855
|
+
size: 20,
|
|
2856
|
+
"aria-hidden": "true"
|
|
2857
|
+
}),
|
|
2858
|
+
/* @__PURE__ */ d("span", {
|
|
2859
|
+
className: n,
|
|
2860
|
+
children: o
|
|
2861
|
+
}),
|
|
2862
|
+
a && /* @__PURE__ */ d("span", {
|
|
2863
|
+
className: r,
|
|
2864
|
+
children: a
|
|
2865
|
+
}),
|
|
2866
|
+
l
|
|
2867
|
+
]
|
|
2868
|
+
});
|
|
2869
|
+
}
|
|
2870
|
+
var Vi = {
|
|
2871
|
+
statusBanner: "_statusBanner_azeha_2",
|
|
2872
|
+
content: "_content_azeha_40",
|
|
2873
|
+
action: "_action_azeha_45"
|
|
2874
|
+
};
|
|
2875
|
+
//#endregion
|
|
2876
|
+
//#region src/components/StatusBanner/StatusBanner.tsx
|
|
2877
|
+
function Hi({ variant: e = "info", icon: t, action: n, children: r, className: i, "data-testid": a }) {
|
|
2878
|
+
return /* @__PURE__ */ d(Bi, {
|
|
2879
|
+
variant: e,
|
|
2880
|
+
rootClassName: Vi.statusBanner,
|
|
2881
|
+
contentClassName: Vi.content,
|
|
2882
|
+
actionClassName: Vi.action,
|
|
2883
|
+
icon: t,
|
|
2884
|
+
action: n,
|
|
2885
|
+
className: i,
|
|
2886
|
+
"data-testid": a,
|
|
2887
|
+
ariaAtomic: !0,
|
|
2888
|
+
children: r
|
|
2889
|
+
});
|
|
2890
|
+
}
|
|
2891
|
+
var Ui = {
|
|
2842
2892
|
stepper: "_stepper_16r3t_2",
|
|
2843
2893
|
button: "_button_16r3t_8",
|
|
2844
2894
|
output: "_output_16r3t_46"
|
|
2845
2895
|
};
|
|
2846
2896
|
//#endregion
|
|
2847
2897
|
//#region src/components/Stepper/Stepper.tsx
|
|
2848
|
-
function
|
|
2898
|
+
function Wi({ value: e, onChange: t, min: n = 0, max: r = 2 ** 53 - 1, step: i = 1, disabled: a = !1, "aria-label": o, decrementLabel: s = "Disminuir", incrementLabel: c = "Aumentar", className: l, "data-testid": u }) {
|
|
2849
2899
|
let p = a || e <= n, m = a || e >= r;
|
|
2850
2900
|
return /* @__PURE__ */ f("div", {
|
|
2851
2901
|
role: "group",
|
|
2852
2902
|
"aria-label": o,
|
|
2853
|
-
className: [
|
|
2903
|
+
className: [Ui.stepper, l].filter(Boolean).join(" "),
|
|
2854
2904
|
"data-testid": u,
|
|
2855
2905
|
children: [
|
|
2856
2906
|
/* @__PURE__ */ d("button", {
|
|
2857
2907
|
type: "button",
|
|
2858
2908
|
"aria-label": s,
|
|
2859
2909
|
disabled: p,
|
|
2860
|
-
className:
|
|
2910
|
+
className: Ui.button,
|
|
2861
2911
|
onClick: () => t(Math.max(n, e - i)),
|
|
2862
2912
|
children: /* @__PURE__ */ d(F, {
|
|
2863
2913
|
name: "minus-filled",
|
|
@@ -2866,7 +2916,7 @@ function Bi({ value: e, onChange: t, min: n = 0, max: r = 2 ** 53 - 1, step: i =
|
|
|
2866
2916
|
})
|
|
2867
2917
|
}),
|
|
2868
2918
|
/* @__PURE__ */ d("output", {
|
|
2869
|
-
className:
|
|
2919
|
+
className: Ui.output,
|
|
2870
2920
|
"aria-live": "polite",
|
|
2871
2921
|
children: e
|
|
2872
2922
|
}),
|
|
@@ -2874,7 +2924,7 @@ function Bi({ value: e, onChange: t, min: n = 0, max: r = 2 ** 53 - 1, step: i =
|
|
|
2874
2924
|
type: "button",
|
|
2875
2925
|
"aria-label": c,
|
|
2876
2926
|
disabled: m,
|
|
2877
|
-
className:
|
|
2927
|
+
className: Ui.button,
|
|
2878
2928
|
onClick: () => t(Math.min(r, e + i)),
|
|
2879
2929
|
children: /* @__PURE__ */ d(F, {
|
|
2880
2930
|
name: "plus-filled",
|
|
@@ -2885,13 +2935,13 @@ function Bi({ value: e, onChange: t, min: n = 0, max: r = 2 ** 53 - 1, step: i =
|
|
|
2885
2935
|
]
|
|
2886
2936
|
});
|
|
2887
2937
|
}
|
|
2888
|
-
var
|
|
2938
|
+
var Gi = {
|
|
2889
2939
|
tab: "_tab_1g43g_3",
|
|
2890
2940
|
group: "_group_1g43g_20"
|
|
2891
2941
|
};
|
|
2892
2942
|
//#endregion
|
|
2893
2943
|
//#region src/components/Tab/Tab.tsx
|
|
2894
|
-
function
|
|
2944
|
+
function Ki({ tabs: e, label: t, selectedTab: n, size: r = "medium", fullWidth: i = !0, selectedColor: a = "secondary", onChange: o, onTabClick: s, className: u, "data-testid": f }) {
|
|
2895
2945
|
let [p, m] = l(() => e[0]?.value), h = n !== void 0, g = h ? n : p, _ = c(h);
|
|
2896
2946
|
process.env.NODE_ENV !== "production" && _.current !== h && console.error("Tab: `selectedTab` prop changed from %s to %s. A component cannot switch between controlled and uncontrolled modes.", _.current ? "controlled" : "uncontrolled", h ? "controlled" : "uncontrolled");
|
|
2897
2947
|
let v = e.map((e) => ({
|
|
@@ -2901,13 +2951,13 @@ function Hi({ tabs: e, label: t, selectedTab: n, size: r = "medium", fullWidth:
|
|
|
2901
2951
|
icon: e.icon
|
|
2902
2952
|
}));
|
|
2903
2953
|
return /* @__PURE__ */ d("div", {
|
|
2904
|
-
className: [
|
|
2954
|
+
className: [Gi.tab, u].filter(Boolean).join(" "),
|
|
2905
2955
|
"data-size": r,
|
|
2906
2956
|
"data-full-width": i ? "" : void 0,
|
|
2907
2957
|
"data-selected-color": a,
|
|
2908
2958
|
"data-testid": f,
|
|
2909
|
-
children: /* @__PURE__ */ d(
|
|
2910
|
-
className:
|
|
2959
|
+
children: /* @__PURE__ */ d(zr, {
|
|
2960
|
+
className: Gi.group,
|
|
2911
2961
|
label: t,
|
|
2912
2962
|
options: v,
|
|
2913
2963
|
selectedButton: g,
|
|
@@ -2924,19 +2974,19 @@ function Hi({ tabs: e, label: t, selectedTab: n, size: r = "medium", fullWidth:
|
|
|
2924
2974
|
})
|
|
2925
2975
|
});
|
|
2926
2976
|
}
|
|
2927
|
-
var
|
|
2977
|
+
var qi = { tabbar: "_tabbar_qy5zr_2" };
|
|
2928
2978
|
//#endregion
|
|
2929
2979
|
//#region src/components/TabBar/TabBar.tsx
|
|
2930
|
-
function
|
|
2980
|
+
function Ji({ variant: e = "default", children: t, "data-testid": n }) {
|
|
2931
2981
|
return /* @__PURE__ */ d("div", {
|
|
2932
|
-
className:
|
|
2982
|
+
className: qi.tabbar,
|
|
2933
2983
|
role: "tablist",
|
|
2934
2984
|
"data-variant": e,
|
|
2935
2985
|
"data-testid": n,
|
|
2936
2986
|
children: t
|
|
2937
2987
|
});
|
|
2938
2988
|
}
|
|
2939
|
-
var
|
|
2989
|
+
var Yi = {
|
|
2940
2990
|
tabs: "_tabs_zujvo_2",
|
|
2941
2991
|
tabList: "_tabList_zujvo_8",
|
|
2942
2992
|
tab: "_tab_zujvo_2",
|
|
@@ -2944,7 +2994,7 @@ var Gi = {
|
|
|
2944
2994
|
};
|
|
2945
2995
|
//#endregion
|
|
2946
2996
|
//#region src/components/Tabs/Tabs.tsx
|
|
2947
|
-
function
|
|
2997
|
+
function Xi({ items: e, defaultTab: t, activeTab: n, "aria-label": r, onChange: i, "data-testid": a }) {
|
|
2948
2998
|
let [o, s] = l(t ?? e[0]?.id ?? ""), u = n !== void 0, p = u ? n : o, m = c(/* @__PURE__ */ new Map()), h = c(u);
|
|
2949
2999
|
process.env.NODE_ENV !== "production" && h.current !== u && console.error("Tabs: `activeTab` prop changed from %s to %s. A component cannot switch between controlled and uncontrolled modes.", h.current ? "controlled" : "uncontrolled", u ? "controlled" : "uncontrolled");
|
|
2950
3000
|
let g = (e) => {
|
|
@@ -2954,10 +3004,10 @@ function Ki({ items: e, defaultTab: t, activeTab: n, "aria-label": r, onChange:
|
|
|
2954
3004
|
t.key === "ArrowRight" ? (t.preventDefault(), a = r[(i + 1) % r.length]) : t.key === "ArrowLeft" ? (t.preventDefault(), a = r[(i - 1 + r.length) % r.length]) : t.key === "Home" ? (t.preventDefault(), a = r[0]) : t.key === "End" && (t.preventDefault(), a = r[r.length - 1]), a && (g(a), m.current.get(a)?.focus());
|
|
2955
3005
|
}, v = e.find((e) => e.id === p)?.content;
|
|
2956
3006
|
return /* @__PURE__ */ f("div", {
|
|
2957
|
-
className:
|
|
3007
|
+
className: Yi.tabs,
|
|
2958
3008
|
"data-testid": a,
|
|
2959
3009
|
children: [/* @__PURE__ */ d("div", {
|
|
2960
|
-
className:
|
|
3010
|
+
className: Yi.tabList,
|
|
2961
3011
|
role: "tablist",
|
|
2962
3012
|
"aria-label": r,
|
|
2963
3013
|
children: e.map((e, t) => /* @__PURE__ */ d("button", {
|
|
@@ -2969,7 +3019,7 @@ function Ki({ items: e, defaultTab: t, activeTab: n, "aria-label": r, onChange:
|
|
|
2969
3019
|
"aria-selected": e.id === p,
|
|
2970
3020
|
"aria-controls": v == null ? void 0 : `panel-${p}`,
|
|
2971
3021
|
id: `tab-${e.id}`,
|
|
2972
|
-
className:
|
|
3022
|
+
className: Yi.tab,
|
|
2973
3023
|
"data-active": e.id === p || void 0,
|
|
2974
3024
|
disabled: e.disabled,
|
|
2975
3025
|
tabIndex: e.id === p ? 0 : -1,
|
|
@@ -2981,25 +3031,25 @@ function Ki({ items: e, defaultTab: t, activeTab: n, "aria-label": r, onChange:
|
|
|
2981
3031
|
role: "tabpanel",
|
|
2982
3032
|
id: `panel-${p}`,
|
|
2983
3033
|
"aria-labelledby": `tab-${p}`,
|
|
2984
|
-
className:
|
|
3034
|
+
className: Yi.panel,
|
|
2985
3035
|
children: v
|
|
2986
3036
|
})]
|
|
2987
3037
|
});
|
|
2988
3038
|
}
|
|
2989
|
-
var
|
|
3039
|
+
var Zi = { textarea: "_textarea_1vuas_2" };
|
|
2990
3040
|
//#endregion
|
|
2991
3041
|
//#region src/components/Textarea/Textarea.tsx
|
|
2992
|
-
function
|
|
3042
|
+
function Qi({ error: e, className: t, rows: n = 3, ref: r, ...i }) {
|
|
2993
3043
|
return /* @__PURE__ */ d("textarea", {
|
|
2994
3044
|
ref: r,
|
|
2995
3045
|
rows: n,
|
|
2996
|
-
className: [
|
|
3046
|
+
className: [Zi.textarea, t].filter(Boolean).join(" "),
|
|
2997
3047
|
"data-error": e ? "" : void 0,
|
|
2998
3048
|
"aria-invalid": e || void 0,
|
|
2999
3049
|
...i
|
|
3000
3050
|
});
|
|
3001
3051
|
}
|
|
3002
|
-
var
|
|
3052
|
+
var Z = {
|
|
3003
3053
|
input: "_input_8nxer_3",
|
|
3004
3054
|
root: "_root_8nxer_65",
|
|
3005
3055
|
field: "_field_8nxer_74",
|
|
@@ -3013,26 +3063,26 @@ var Q = {
|
|
|
3013
3063
|
meta: "_meta_8nxer_224",
|
|
3014
3064
|
messages: "_messages_8nxer_235",
|
|
3015
3065
|
error: "_error_8nxer_273"
|
|
3016
|
-
},
|
|
3066
|
+
}, $i = {
|
|
3017
3067
|
success: "success-filled-green",
|
|
3018
3068
|
warning: "warning-outline",
|
|
3019
3069
|
error: "error-filled-red"
|
|
3020
|
-
},
|
|
3070
|
+
}, ea = {
|
|
3021
3071
|
small: 16,
|
|
3022
3072
|
medium: 20,
|
|
3023
3073
|
large: 24
|
|
3024
3074
|
};
|
|
3025
|
-
function
|
|
3075
|
+
function ta(e, t) {
|
|
3026
3076
|
return e === void 0 ? t ? "error" : "default" : e;
|
|
3027
3077
|
}
|
|
3028
|
-
var
|
|
3078
|
+
var na = t(function({ size: e = "medium", error: t = !1, showPasswordToggle: n = !1, label: i, required: s = !1, validationState: u, errorMessage: p, helperText: m, helperTextAlign: h = "right", prefixIcon: g, suffixIcon: _, clearable: v = !1, onClear: y, clearLabel: b = "Limpiar", showPasswordLabel: x = "Mostrar contraseña", hidePasswordLabel: S = "Ocultar contraseña", showCounter: C = !1, showValidationIcon: w = !0, fullWidth: T = !1, className: E, type: D = "text", id: O, value: k, onChange: A, disabled: j, readOnly: M, maxLength: ee, "aria-label": te, "aria-describedby": ne, "data-testid": re, ...ie }, ae) {
|
|
3029
3079
|
let oe = a(), se = O ?? oe, N = c(null);
|
|
3030
3080
|
o(ae, () => N.current, []);
|
|
3031
|
-
let [ce, le] = l(!1), ue = D === "password", de = ue && ce ? "text" : D, fe =
|
|
3081
|
+
let [ce, le] = l(!1), ue = D === "password", de = ue && ce ? "text" : D, fe = ta(u, t), pe = fe === "error", me = pe ? p : void 0, P = !!me, he = !!m && !P, ge = he ? `${se}-helper` : void 0, _e = P ? `${se}-error` : void 0, ve = [
|
|
3032
3082
|
ne,
|
|
3033
3083
|
ge,
|
|
3034
3084
|
_e
|
|
3035
|
-
].filter(Boolean).join(" ") || void 0, ye = typeof k == "string" || typeof k == "number" ? `${k}`.length > 0 : !1, be = typeof k == "string" || typeof k == "number" ? `${k}`.length : 0, xe = v && !!A && ye && !j && !M && !ue, Se = ue && n, Ce = w && fe !== "default" ?
|
|
3085
|
+
].filter(Boolean).join(" ") || void 0, ye = typeof k == "string" || typeof k == "number" ? `${k}`.length > 0 : !1, be = typeof k == "string" || typeof k == "number" ? `${k}`.length : 0, xe = v && !!A && ye && !j && !M && !ue, Se = ue && n, Ce = w && fe !== "default" ? $i[fe] : void 0, we = !!_ && !xe && !Se, Te = C || typeof ee == "number", Ee = he || P || Te, De = ea[e], Oe = r(() => {
|
|
3036
3086
|
if (j || M) return;
|
|
3037
3087
|
let e = N.current;
|
|
3038
3088
|
e && A && ((Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")?.set)?.call(e, ""), e.dispatchEvent(new Event("input", { bubbles: !0 }))), y?.(), N.current?.focus();
|
|
@@ -3044,7 +3094,7 @@ var Qi = t(function({ size: e = "medium", error: t = !1, showPasswordToggle: n =
|
|
|
3044
3094
|
]), ke = !!i || Ee || !!g || we || xe || Se || !!Ce || T, Ae = /* @__PURE__ */ d("input", {
|
|
3045
3095
|
ref: N,
|
|
3046
3096
|
id: se,
|
|
3047
|
-
className: ke ?
|
|
3097
|
+
className: ke ? Z.input : [Z.input, E].filter(Boolean).join(" "),
|
|
3048
3098
|
type: de,
|
|
3049
3099
|
value: k,
|
|
3050
3100
|
onChange: A,
|
|
@@ -3062,7 +3112,7 @@ var Qi = t(function({ size: e = "medium", error: t = !1, showPasswordToggle: n =
|
|
|
3062
3112
|
...ie
|
|
3063
3113
|
});
|
|
3064
3114
|
return ke ? /* @__PURE__ */ f("div", {
|
|
3065
|
-
className: [
|
|
3115
|
+
className: [Z.root, E].filter(Boolean).join(" "),
|
|
3066
3116
|
"data-size": e,
|
|
3067
3117
|
"data-status": fe,
|
|
3068
3118
|
"data-disabled": j || void 0,
|
|
@@ -3071,26 +3121,26 @@ var Qi = t(function({ size: e = "medium", error: t = !1, showPasswordToggle: n =
|
|
|
3071
3121
|
children: [
|
|
3072
3122
|
i && /* @__PURE__ */ f("label", {
|
|
3073
3123
|
htmlFor: se,
|
|
3074
|
-
className:
|
|
3124
|
+
className: Z.label,
|
|
3075
3125
|
children: [/* @__PURE__ */ d("span", { children: i }), s && /* @__PURE__ */ d("span", {
|
|
3076
|
-
className:
|
|
3126
|
+
className: Z.required,
|
|
3077
3127
|
"aria-hidden": "true",
|
|
3078
3128
|
children: "*"
|
|
3079
3129
|
})]
|
|
3080
3130
|
}),
|
|
3081
3131
|
/* @__PURE__ */ f("div", {
|
|
3082
|
-
className:
|
|
3132
|
+
className: Z.field,
|
|
3083
3133
|
children: [
|
|
3084
3134
|
g && /* @__PURE__ */ d(F, {
|
|
3085
3135
|
name: g,
|
|
3086
3136
|
size: De,
|
|
3087
3137
|
"aria-hidden": "true",
|
|
3088
|
-
className:
|
|
3138
|
+
className: Z.adornment
|
|
3089
3139
|
}),
|
|
3090
3140
|
Ae,
|
|
3091
3141
|
xe && /* @__PURE__ */ d("button", {
|
|
3092
3142
|
type: "button",
|
|
3093
|
-
className:
|
|
3143
|
+
className: Z.actionButton,
|
|
3094
3144
|
"aria-label": b,
|
|
3095
3145
|
onClick: Oe,
|
|
3096
3146
|
children: /* @__PURE__ */ d(F, {
|
|
@@ -3101,7 +3151,7 @@ var Qi = t(function({ size: e = "medium", error: t = !1, showPasswordToggle: n =
|
|
|
3101
3151
|
}),
|
|
3102
3152
|
Se && /* @__PURE__ */ d("button", {
|
|
3103
3153
|
type: "button",
|
|
3104
|
-
className:
|
|
3154
|
+
className: Z.actionButton,
|
|
3105
3155
|
"aria-label": ce ? S : x,
|
|
3106
3156
|
"aria-pressed": ce,
|
|
3107
3157
|
disabled: j,
|
|
@@ -3116,35 +3166,35 @@ var Qi = t(function({ size: e = "medium", error: t = !1, showPasswordToggle: n =
|
|
|
3116
3166
|
name: _,
|
|
3117
3167
|
size: De,
|
|
3118
3168
|
"aria-hidden": "true",
|
|
3119
|
-
className:
|
|
3169
|
+
className: Z.adornment
|
|
3120
3170
|
}),
|
|
3121
3171
|
Ce && /* @__PURE__ */ d(F, {
|
|
3122
3172
|
name: Ce,
|
|
3123
3173
|
size: De,
|
|
3124
3174
|
"aria-hidden": "true",
|
|
3125
|
-
className:
|
|
3175
|
+
className: Z.statusIcon
|
|
3126
3176
|
})
|
|
3127
3177
|
]
|
|
3128
3178
|
}),
|
|
3129
3179
|
Ee && /* @__PURE__ */ f("div", {
|
|
3130
|
-
className:
|
|
3180
|
+
className: Z.meta,
|
|
3131
3181
|
"data-helper-align": h,
|
|
3132
3182
|
"data-has-both": (he || P) && Te ? "" : void 0,
|
|
3133
3183
|
children: [(he || P) && /* @__PURE__ */ f("div", {
|
|
3134
|
-
className:
|
|
3184
|
+
className: Z.messages,
|
|
3135
3185
|
children: [he && /* @__PURE__ */ d("p", {
|
|
3136
3186
|
id: ge,
|
|
3137
|
-
className:
|
|
3187
|
+
className: Z.helper,
|
|
3138
3188
|
children: m
|
|
3139
3189
|
}), P && /* @__PURE__ */ d("p", {
|
|
3140
3190
|
id: _e,
|
|
3141
|
-
className:
|
|
3191
|
+
className: Z.error,
|
|
3142
3192
|
role: "alert",
|
|
3143
3193
|
"aria-live": "polite",
|
|
3144
3194
|
children: me
|
|
3145
3195
|
})]
|
|
3146
3196
|
}), Te && /* @__PURE__ */ f("span", {
|
|
3147
|
-
className:
|
|
3197
|
+
className: Z.counter,
|
|
3148
3198
|
children: [be, typeof ee == "number" && `/${ee}`]
|
|
3149
3199
|
})]
|
|
3150
3200
|
})
|
|
@@ -3153,7 +3203,7 @@ var Qi = t(function({ size: e = "medium", error: t = !1, showPasswordToggle: n =
|
|
|
3153
3203
|
});
|
|
3154
3204
|
//#endregion
|
|
3155
3205
|
//#region src/components/ThemeGate/ThemeGate.tsx
|
|
3156
|
-
function
|
|
3206
|
+
function ra({ theme: e, children: t, className: n, "data-testid": r }) {
|
|
3157
3207
|
return /* @__PURE__ */ d("div", {
|
|
3158
3208
|
"data-theme": e,
|
|
3159
3209
|
className: n,
|
|
@@ -3161,49 +3211,49 @@ function $i({ theme: e, children: t, className: n, "data-testid": r }) {
|
|
|
3161
3211
|
children: t
|
|
3162
3212
|
});
|
|
3163
3213
|
}
|
|
3164
|
-
var
|
|
3214
|
+
var ia = {
|
|
3165
3215
|
container: "_container_18wzq_2",
|
|
3166
3216
|
toast: "_toast_18wzq_22",
|
|
3167
3217
|
"ds-toast-enter": "_ds-toast-enter_18wzq_1",
|
|
3168
3218
|
toastMessage: "_toastMessage_18wzq_61",
|
|
3169
3219
|
dismissButton: "_dismissButton_18wzq_65"
|
|
3170
|
-
},
|
|
3171
|
-
function
|
|
3172
|
-
for (let e of
|
|
3220
|
+
}, aa = [], oa = /* @__PURE__ */ new Set(), sa = 0;
|
|
3221
|
+
function ca() {
|
|
3222
|
+
for (let e of oa) e([...aa]);
|
|
3173
3223
|
}
|
|
3174
|
-
function
|
|
3175
|
-
let t = `toast-${++
|
|
3176
|
-
return
|
|
3224
|
+
function la(e) {
|
|
3225
|
+
let t = `toast-${++sa}-${Date.now()}`;
|
|
3226
|
+
return aa = [...aa, {
|
|
3177
3227
|
id: t,
|
|
3178
3228
|
message: e.message,
|
|
3179
3229
|
variant: e.variant ?? "info",
|
|
3180
3230
|
duration: e.duration,
|
|
3181
3231
|
dismissible: e.dismissible,
|
|
3182
3232
|
"data-testid": e["data-testid"]
|
|
3183
|
-
}],
|
|
3233
|
+
}], ca(), t;
|
|
3184
3234
|
}
|
|
3185
|
-
function
|
|
3186
|
-
|
|
3235
|
+
function ua(e) {
|
|
3236
|
+
aa = aa.filter((t) => t.id !== e), ca();
|
|
3187
3237
|
}
|
|
3188
|
-
function
|
|
3189
|
-
let [e, t] = l(
|
|
3238
|
+
function da() {
|
|
3239
|
+
let [e, t] = l(aa), n = c(!0);
|
|
3190
3240
|
return i(() => {
|
|
3191
3241
|
n.current = !0;
|
|
3192
3242
|
let e = (e) => {
|
|
3193
3243
|
n.current && t(e);
|
|
3194
3244
|
};
|
|
3195
|
-
return
|
|
3196
|
-
n.current = !1,
|
|
3245
|
+
return oa.add(e), () => {
|
|
3246
|
+
n.current = !1, oa.delete(e);
|
|
3197
3247
|
};
|
|
3198
3248
|
}, []), {
|
|
3199
3249
|
toasts: e,
|
|
3200
|
-
addToast: r((e) =>
|
|
3201
|
-
dismissToast: r((e) =>
|
|
3250
|
+
addToast: r((e) => la(e), []),
|
|
3251
|
+
dismissToast: r((e) => ua(e), [])
|
|
3202
3252
|
};
|
|
3203
3253
|
}
|
|
3204
3254
|
//#endregion
|
|
3205
3255
|
//#region src/components/Toast/Toast.tsx
|
|
3206
|
-
function
|
|
3256
|
+
function fa({ toast: e, onDismiss: t, dismissLabel: n = "Cerrar notificación" }) {
|
|
3207
3257
|
let { id: r, message: a, variant: o, duration: s = 4e3, dismissible: l = !0, "data-testid": u } = e, p = c(void 0);
|
|
3208
3258
|
return i(() => (p.current = setTimeout(() => {
|
|
3209
3259
|
t(r);
|
|
@@ -3214,35 +3264,35 @@ function ca({ toast: e, onDismiss: t, dismissLabel: n = "Cerrar notificación" }
|
|
|
3214
3264
|
s,
|
|
3215
3265
|
t
|
|
3216
3266
|
]), /* @__PURE__ */ f("div", {
|
|
3217
|
-
className:
|
|
3267
|
+
className: ia.toast,
|
|
3218
3268
|
"data-variant": o,
|
|
3219
3269
|
role: o === "error" || o === "warning" ? "alert" : "status",
|
|
3220
3270
|
"aria-atomic": "true",
|
|
3221
3271
|
"data-testid": u,
|
|
3222
3272
|
children: [/* @__PURE__ */ d("span", {
|
|
3223
|
-
className:
|
|
3273
|
+
className: ia.toastMessage,
|
|
3224
3274
|
children: a
|
|
3225
|
-
}), l && /* @__PURE__ */ d(
|
|
3226
|
-
className:
|
|
3275
|
+
}), l && /* @__PURE__ */ d(sr, {
|
|
3276
|
+
className: ia.dismissButton,
|
|
3227
3277
|
onClick: () => t(r),
|
|
3228
3278
|
label: n,
|
|
3229
3279
|
size: 14
|
|
3230
3280
|
})]
|
|
3231
3281
|
});
|
|
3232
3282
|
}
|
|
3233
|
-
function
|
|
3234
|
-
let { toasts: n, dismissToast: r } =
|
|
3283
|
+
function pa({ notificationsLabel: e = "Notificaciones", dismissLabel: t }) {
|
|
3284
|
+
let { toasts: n, dismissToast: r } = da();
|
|
3235
3285
|
return typeof document > "u" ? null : j(/* @__PURE__ */ d("section", {
|
|
3236
|
-
className:
|
|
3286
|
+
className: ia.container,
|
|
3237
3287
|
"aria-label": e,
|
|
3238
|
-
children: n.map((e) => /* @__PURE__ */ d(
|
|
3288
|
+
children: n.map((e) => /* @__PURE__ */ d(fa, {
|
|
3239
3289
|
toast: e,
|
|
3240
3290
|
onDismiss: r,
|
|
3241
3291
|
dismissLabel: t
|
|
3242
3292
|
}, e.id))
|
|
3243
3293
|
}), document.body);
|
|
3244
3294
|
}
|
|
3245
|
-
var
|
|
3295
|
+
var ma = {
|
|
3246
3296
|
wrapper: "_wrapper_1hq4w_2",
|
|
3247
3297
|
input: "_input_1hq4w_9",
|
|
3248
3298
|
track: "_track_1hq4w_29",
|
|
@@ -3251,10 +3301,10 @@ var ua = {
|
|
|
3251
3301
|
};
|
|
3252
3302
|
//#endregion
|
|
3253
3303
|
//#region src/components/Toggle/Toggle.tsx
|
|
3254
|
-
function
|
|
3304
|
+
function ha({ label: e, size: t = "medium", className: n, id: r, ref: i, "data-testid": a, ...o }) {
|
|
3255
3305
|
let s = r ?? `toggle-${String(e ?? "").toLowerCase().replace(/\s+/g, "-")}`;
|
|
3256
3306
|
return /* @__PURE__ */ f("label", {
|
|
3257
|
-
className:
|
|
3307
|
+
className: ma.wrapper,
|
|
3258
3308
|
"data-size": t,
|
|
3259
3309
|
htmlFor: s,
|
|
3260
3310
|
"data-testid": a,
|
|
@@ -3265,55 +3315,55 @@ function da({ label: e, size: t = "medium", className: n, id: r, ref: i, "data-t
|
|
|
3265
3315
|
role: "switch",
|
|
3266
3316
|
"aria-checked": o.checked ?? !1,
|
|
3267
3317
|
id: s,
|
|
3268
|
-
className:
|
|
3318
|
+
className: ma.input,
|
|
3269
3319
|
...o
|
|
3270
3320
|
}),
|
|
3271
3321
|
/* @__PURE__ */ d("span", {
|
|
3272
|
-
className:
|
|
3322
|
+
className: ma.track,
|
|
3273
3323
|
"aria-hidden": "true",
|
|
3274
|
-
children: /* @__PURE__ */ d("span", { className:
|
|
3324
|
+
children: /* @__PURE__ */ d("span", { className: ma.thumb })
|
|
3275
3325
|
}),
|
|
3276
3326
|
e && /* @__PURE__ */ d("span", {
|
|
3277
|
-
className:
|
|
3327
|
+
className: ma.label,
|
|
3278
3328
|
children: e
|
|
3279
3329
|
})
|
|
3280
3330
|
]
|
|
3281
3331
|
});
|
|
3282
3332
|
}
|
|
3283
|
-
var
|
|
3333
|
+
var ga = {
|
|
3284
3334
|
trigger: "_trigger_wx3tb_2",
|
|
3285
3335
|
tooltip: "_tooltip_wx3tb_7"
|
|
3286
|
-
},
|
|
3287
|
-
function
|
|
3336
|
+
}, _a = 8;
|
|
3337
|
+
function va(e, t) {
|
|
3288
3338
|
switch (t) {
|
|
3289
3339
|
case "top": return {
|
|
3290
|
-
top: e.top -
|
|
3340
|
+
top: e.top - _a,
|
|
3291
3341
|
left: e.left + e.width / 2
|
|
3292
3342
|
};
|
|
3293
3343
|
case "bottom": return {
|
|
3294
|
-
top: e.bottom +
|
|
3344
|
+
top: e.bottom + _a,
|
|
3295
3345
|
left: e.left + e.width / 2
|
|
3296
3346
|
};
|
|
3297
3347
|
case "left": return {
|
|
3298
3348
|
top: e.top + e.height / 2,
|
|
3299
|
-
left: e.left -
|
|
3349
|
+
left: e.left - _a
|
|
3300
3350
|
};
|
|
3301
3351
|
case "right": return {
|
|
3302
3352
|
top: e.top + e.height / 2,
|
|
3303
|
-
left: e.right +
|
|
3353
|
+
left: e.right + _a
|
|
3304
3354
|
};
|
|
3305
3355
|
}
|
|
3306
3356
|
}
|
|
3307
|
-
function
|
|
3357
|
+
function ya({ content: e, children: t, placement: n = "top", "data-testid": i }) {
|
|
3308
3358
|
let [o, s] = l(!1), [p, m] = l({
|
|
3309
3359
|
top: 0,
|
|
3310
3360
|
left: 0
|
|
3311
3361
|
}), h = c(null), g = a(), _ = r(() => {
|
|
3312
|
-
h.current && (m(
|
|
3362
|
+
h.current && (m(va(h.current.getBoundingClientRect(), n)), s(!0));
|
|
3313
3363
|
}, [n]), v = r(() => s(!1), []);
|
|
3314
3364
|
return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("span", {
|
|
3315
3365
|
ref: h,
|
|
3316
|
-
className:
|
|
3366
|
+
className: ga.trigger,
|
|
3317
3367
|
"aria-describedby": o ? g : void 0,
|
|
3318
3368
|
onMouseEnter: _,
|
|
3319
3369
|
onMouseLeave: v,
|
|
@@ -3324,7 +3374,7 @@ function ha({ content: e, children: t, placement: n = "top", "data-testid": i })
|
|
|
3324
3374
|
}), o && typeof document < "u" && j(/* @__PURE__ */ d("div", {
|
|
3325
3375
|
id: g,
|
|
3326
3376
|
role: "tooltip",
|
|
3327
|
-
className:
|
|
3377
|
+
className: ga.tooltip,
|
|
3328
3378
|
"data-placement": n,
|
|
3329
3379
|
style: {
|
|
3330
3380
|
top: p.top,
|
|
@@ -3333,7 +3383,7 @@ function ha({ content: e, children: t, placement: n = "top", "data-testid": i })
|
|
|
3333
3383
|
children: e
|
|
3334
3384
|
}), document.body)] });
|
|
3335
3385
|
}
|
|
3336
|
-
var
|
|
3386
|
+
var Q = {
|
|
3337
3387
|
treeItem: "_treeItem_164yx_2",
|
|
3338
3388
|
content: "_content_164yx_7",
|
|
3339
3389
|
childrenSlot: "_childrenSlot_164yx_19",
|
|
@@ -3348,29 +3398,29 @@ var $ = {
|
|
|
3348
3398
|
};
|
|
3349
3399
|
//#endregion
|
|
3350
3400
|
//#region src/components/TreeItem/TreeItem.tsx
|
|
3351
|
-
function
|
|
3401
|
+
function $(e) {
|
|
3352
3402
|
return e ? "" : void 0;
|
|
3353
3403
|
}
|
|
3354
|
-
function
|
|
3404
|
+
function ba(e) {
|
|
3355
3405
|
return [
|
|
3356
3406
|
"INPUT",
|
|
3357
3407
|
"TEXTAREA",
|
|
3358
3408
|
"SELECT"
|
|
3359
3409
|
].includes(e.tagName) || e.isContentEditable;
|
|
3360
3410
|
}
|
|
3361
|
-
function
|
|
3411
|
+
function xa(e, t, n) {
|
|
3362
3412
|
return e === "ArrowRight" ? t && !n : e === "ArrowLeft" ? t && n : !1;
|
|
3363
3413
|
}
|
|
3364
|
-
function
|
|
3365
|
-
if (!(t.disabled ||
|
|
3414
|
+
function Sa(e, t, n, r, i, a, o) {
|
|
3415
|
+
if (!(t.disabled || ba(e.target))) {
|
|
3366
3416
|
if (e.key === "Enter" || e.key === " ") {
|
|
3367
3417
|
e.preventDefault(), n ? a(t.id) : i && o(t.id);
|
|
3368
3418
|
return;
|
|
3369
3419
|
}
|
|
3370
|
-
|
|
3420
|
+
xa(e.key, n, r) && (e.preventDefault(), a(t.id));
|
|
3371
3421
|
}
|
|
3372
3422
|
}
|
|
3373
|
-
function
|
|
3423
|
+
function Ca(e, t, n, r, i, a, o, s, c) {
|
|
3374
3424
|
return {
|
|
3375
3425
|
handleDragStart(n) {
|
|
3376
3426
|
if (!r.current) {
|
|
@@ -3414,25 +3464,25 @@ function ba(e, t, n, r, i, a, o, s, c) {
|
|
|
3414
3464
|
}
|
|
3415
3465
|
};
|
|
3416
3466
|
}
|
|
3417
|
-
function
|
|
3467
|
+
function wa({ item: e, level: t, selectable: n, selected: r, prefixSlot: i, labelSlot: a, metaSlot: o, suffixSlot: s, onToggleSelect: c }) {
|
|
3418
3468
|
return /* @__PURE__ */ f(u, { children: [
|
|
3419
|
-
n && /* @__PURE__ */ d(
|
|
3469
|
+
n && /* @__PURE__ */ d(qn, {
|
|
3420
3470
|
checked: r,
|
|
3421
3471
|
disabled: e.disabled,
|
|
3422
|
-
className:
|
|
3472
|
+
className: Q.checkbox,
|
|
3423
3473
|
onChange: () => !e.disabled && c(e.id)
|
|
3424
3474
|
}),
|
|
3425
3475
|
i?.(e, t),
|
|
3426
3476
|
/* @__PURE__ */ f("div", {
|
|
3427
|
-
className:
|
|
3477
|
+
className: Q.slotsWrapper,
|
|
3428
3478
|
children: [
|
|
3429
3479
|
a ? a(e, t) : /* @__PURE__ */ d("span", {
|
|
3430
|
-
className:
|
|
3480
|
+
className: Q.label,
|
|
3431
3481
|
"data-testid": "tree-item-label",
|
|
3432
3482
|
children: e.label
|
|
3433
3483
|
}),
|
|
3434
3484
|
o ? o(e, t) : e.meta && /* @__PURE__ */ d("span", {
|
|
3435
|
-
className:
|
|
3485
|
+
className: Q.meta,
|
|
3436
3486
|
children: e.meta
|
|
3437
3487
|
}),
|
|
3438
3488
|
s?.(e, t)
|
|
@@ -3440,19 +3490,19 @@ function xa({ item: e, level: t, selectable: n, selected: r, prefixSlot: i, labe
|
|
|
3440
3490
|
})
|
|
3441
3491
|
] });
|
|
3442
3492
|
}
|
|
3443
|
-
function
|
|
3444
|
-
let O = c(!1), k = (t) =>
|
|
3493
|
+
function Ta({ item: e, level: t = 0, expanded: n = !1, selected: r = !1, draggable: i = !1, selectable: a = !1, hasChildren: o = !1, indentSize: s = 24, parentId: l = null, bordered: u = !1, flatIndex: p = 0, striped: m = !1, onToggleExpand: h, onToggleSelect: g, onDragStart: _, onDragEnd: v, onDragOver: y, onDragLeave: b, onDrop: x, children: S, "data-testid": C, labelSlot: w, metaSlot: T, prefixSlot: E, suffixSlot: D }) {
|
|
3494
|
+
let O = c(!1), k = (t) => Sa(t, e, o, n, a, h, g), A = Ca(e, l, i, O, _, v, y, b, x);
|
|
3445
3495
|
return /* @__PURE__ */ f("div", {
|
|
3446
|
-
className:
|
|
3496
|
+
className: Q.treeItem,
|
|
3447
3497
|
style: { "--tree-item-indent": `${t * s}px` },
|
|
3448
3498
|
"data-level": t,
|
|
3449
|
-
"data-expanded":
|
|
3450
|
-
"data-selected":
|
|
3451
|
-
"data-disabled":
|
|
3452
|
-
"data-has-children":
|
|
3453
|
-
"data-bordered":
|
|
3454
|
-
"data-striped":
|
|
3455
|
-
"data-odd-row":
|
|
3499
|
+
"data-expanded": $(n),
|
|
3500
|
+
"data-selected": $(r),
|
|
3501
|
+
"data-disabled": $(e.disabled),
|
|
3502
|
+
"data-has-children": $(o),
|
|
3503
|
+
"data-bordered": $(u),
|
|
3504
|
+
"data-striped": $(m),
|
|
3505
|
+
"data-odd-row": $(m && p % 2 == 1),
|
|
3456
3506
|
"data-testid": C,
|
|
3457
3507
|
role: "treeitem",
|
|
3458
3508
|
"aria-level": t + 1,
|
|
@@ -3465,7 +3515,7 @@ function Sa({ item: e, level: t = 0, expanded: n = !1, selected: r = !1, draggab
|
|
|
3465
3515
|
O.current = !1;
|
|
3466
3516
|
},
|
|
3467
3517
|
children: [/* @__PURE__ */ f("div", {
|
|
3468
|
-
className:
|
|
3518
|
+
className: Q.content,
|
|
3469
3519
|
draggable: i && !e.disabled,
|
|
3470
3520
|
onDragStart: A.handleDragStart,
|
|
3471
3521
|
onDragEnd: A.handleDragEnd,
|
|
@@ -3474,7 +3524,7 @@ function Sa({ item: e, level: t = 0, expanded: n = !1, selected: r = !1, draggab
|
|
|
3474
3524
|
onDrop: A.handleDrop,
|
|
3475
3525
|
children: [
|
|
3476
3526
|
i && /* @__PURE__ */ d("span", {
|
|
3477
|
-
className:
|
|
3527
|
+
className: Q.dragHandle,
|
|
3478
3528
|
"data-testid": "tree-item-drag-handle",
|
|
3479
3529
|
"aria-hidden": "true",
|
|
3480
3530
|
onMouseDown: (e) => {
|
|
@@ -3489,10 +3539,10 @@ function Sa({ item: e, level: t = 0, expanded: n = !1, selected: r = !1, draggab
|
|
|
3489
3539
|
})
|
|
3490
3540
|
}),
|
|
3491
3541
|
/* @__PURE__ */ d("div", {
|
|
3492
|
-
className:
|
|
3542
|
+
className: Q.indent,
|
|
3493
3543
|
"aria-hidden": "true"
|
|
3494
3544
|
}),
|
|
3495
|
-
/* @__PURE__ */ d(
|
|
3545
|
+
/* @__PURE__ */ d(wa, {
|
|
3496
3546
|
item: e,
|
|
3497
3547
|
level: t,
|
|
3498
3548
|
selectable: a,
|
|
@@ -3505,7 +3555,7 @@ function Sa({ item: e, level: t = 0, expanded: n = !1, selected: r = !1, draggab
|
|
|
3505
3555
|
}),
|
|
3506
3556
|
o ? /* @__PURE__ */ d("button", {
|
|
3507
3557
|
type: "button",
|
|
3508
|
-
className:
|
|
3558
|
+
className: Q.expandBtn,
|
|
3509
3559
|
"aria-expanded": n,
|
|
3510
3560
|
"aria-label": n ? "Collapse" : "Expand",
|
|
3511
3561
|
disabled: e.disabled,
|
|
@@ -3517,42 +3567,42 @@ function Sa({ item: e, level: t = 0, expanded: n = !1, selected: r = !1, draggab
|
|
|
3517
3567
|
size: 16
|
|
3518
3568
|
})
|
|
3519
3569
|
}) : /* @__PURE__ */ d("span", {
|
|
3520
|
-
className:
|
|
3570
|
+
className: Q.expandPlaceholder,
|
|
3521
3571
|
"aria-hidden": "true"
|
|
3522
3572
|
})
|
|
3523
3573
|
]
|
|
3524
3574
|
}), o && /* @__PURE__ */ d("div", {
|
|
3525
|
-
className:
|
|
3575
|
+
className: Q.childrenSlot,
|
|
3526
3576
|
hidden: !n,
|
|
3527
3577
|
children: S
|
|
3528
3578
|
})]
|
|
3529
3579
|
});
|
|
3530
3580
|
}
|
|
3531
|
-
var
|
|
3581
|
+
var Ea = { treeList: "_treeList_trryv_2" };
|
|
3532
3582
|
//#endregion
|
|
3533
3583
|
//#region src/components/TreeList/TreeList.tsx
|
|
3534
|
-
function
|
|
3584
|
+
function Da(e, t) {
|
|
3535
3585
|
for (let n of e) {
|
|
3536
3586
|
if (n.id === t) return n;
|
|
3537
3587
|
if (n.children) {
|
|
3538
|
-
let e =
|
|
3588
|
+
let e = Da(n.children, t);
|
|
3539
3589
|
if (e) return e;
|
|
3540
3590
|
}
|
|
3541
3591
|
}
|
|
3542
3592
|
return null;
|
|
3543
3593
|
}
|
|
3544
|
-
function
|
|
3594
|
+
function Oa(e, t) {
|
|
3545
3595
|
let n = /* @__PURE__ */ new Map(), r = 0;
|
|
3546
3596
|
function i(e) {
|
|
3547
3597
|
for (let a of e) n.set(a.id, r++), a.children?.length && t.includes(a.id) && i(a.children);
|
|
3548
3598
|
}
|
|
3549
3599
|
return i(e), n;
|
|
3550
3600
|
}
|
|
3551
|
-
function
|
|
3601
|
+
function ka(e) {
|
|
3552
3602
|
let { items: t, parentId: n, level: r, expandedIds: i, selectedIds: a, flatIndexMap: o } = e;
|
|
3553
3603
|
return t.map((t) => {
|
|
3554
3604
|
let s = !!t.children?.length, c = i.includes(t.id);
|
|
3555
|
-
return /* @__PURE__ */ d(
|
|
3605
|
+
return /* @__PURE__ */ d(Ta, {
|
|
3556
3606
|
item: t,
|
|
3557
3607
|
level: r,
|
|
3558
3608
|
parentId: n,
|
|
@@ -3575,7 +3625,7 @@ function Ea(e) {
|
|
|
3575
3625
|
metaSlot: e.metaSlot,
|
|
3576
3626
|
prefixSlot: e.prefixSlot,
|
|
3577
3627
|
suffixSlot: e.suffixSlot,
|
|
3578
|
-
children: s && c && t.children && /* @__PURE__ */ d(
|
|
3628
|
+
children: s && c && t.children && /* @__PURE__ */ d(ka, {
|
|
3579
3629
|
...e,
|
|
3580
3630
|
items: t.children,
|
|
3581
3631
|
parentId: t.id,
|
|
@@ -3584,14 +3634,14 @@ function Ea(e) {
|
|
|
3584
3634
|
}, t.id);
|
|
3585
3635
|
});
|
|
3586
3636
|
}
|
|
3587
|
-
function
|
|
3637
|
+
function Aa({ items: e = [], draggable: t = !1, expandedIds: n, selectedIds: i, selectable: a = !1, indentSize: o = 24, bordered: u = !1, striped: f = !1, onExpandChange: p, onSelectChange: m, onReorder: h, labelSlot: g, metaSlot: _, prefixSlot: v, suffixSlot: y, "data-testid": b }) {
|
|
3588
3638
|
let [x, S] = l([]), [C, w] = l([]), T = c(null), E = n ?? x, D = i ?? C, O = {
|
|
3589
3639
|
items: e,
|
|
3590
3640
|
parentId: null,
|
|
3591
3641
|
level: 0,
|
|
3592
3642
|
expandedIds: E,
|
|
3593
3643
|
selectedIds: D,
|
|
3594
|
-
flatIndexMap: s(() =>
|
|
3644
|
+
flatIndexMap: s(() => Oa(e, E), [e, E]),
|
|
3595
3645
|
draggable: t,
|
|
3596
3646
|
selectable: a,
|
|
3597
3647
|
bordered: u,
|
|
@@ -3631,7 +3681,7 @@ function Da({ items: e = [], draggable: t = !1, expandedIds: n, selectedIds: i,
|
|
|
3631
3681
|
if (!n || n.parentId !== t.parentId) return;
|
|
3632
3682
|
let r = n.itemId, i = t.item.id;
|
|
3633
3683
|
if (r === i) return;
|
|
3634
|
-
let a = t.parentId === null ? e :
|
|
3684
|
+
let a = t.parentId === null ? e : Da(e, t.parentId)?.children;
|
|
3635
3685
|
if (!a) return;
|
|
3636
3686
|
let o = a.findIndex((e) => e.id === r), s = a.findIndex((e) => e.id === i);
|
|
3637
3687
|
o === -1 || s === -1 || h?.({
|
|
@@ -3648,14 +3698,14 @@ function Da({ items: e = [], draggable: t = !1, expandedIds: n, selectedIds: i,
|
|
|
3648
3698
|
suffixSlot: y
|
|
3649
3699
|
};
|
|
3650
3700
|
return /* @__PURE__ */ d("div", {
|
|
3651
|
-
className:
|
|
3701
|
+
className: Ea.treeList,
|
|
3652
3702
|
role: "tree",
|
|
3653
3703
|
"data-draggable": t ? "" : void 0,
|
|
3654
3704
|
"data-testid": b,
|
|
3655
|
-
children: /* @__PURE__ */ d(
|
|
3705
|
+
children: /* @__PURE__ */ d(ka, { ...O })
|
|
3656
3706
|
});
|
|
3657
3707
|
}
|
|
3658
|
-
var
|
|
3708
|
+
var ja = {
|
|
3659
3709
|
notification: "_notification_i6esb_2",
|
|
3660
3710
|
content: "_content_i6esb_40",
|
|
3661
3711
|
action: "_action_i6esb_45",
|
|
@@ -3663,38 +3713,26 @@ var Oa = {
|
|
|
3663
3713
|
};
|
|
3664
3714
|
//#endregion
|
|
3665
3715
|
//#region src/components/UserNotification/UserNotification.tsx
|
|
3666
|
-
function
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3716
|
+
function Ma({ variant: e = "info", icon: t, onDismiss: n, dismissLabel: r = "Cerrar", action: i, children: a, className: o, "data-testid": s }) {
|
|
3717
|
+
return /* @__PURE__ */ d(Bi, {
|
|
3718
|
+
variant: e,
|
|
3719
|
+
rootClassName: ja.notification,
|
|
3720
|
+
contentClassName: ja.content,
|
|
3721
|
+
actionClassName: ja.action,
|
|
3722
|
+
icon: t,
|
|
3723
|
+
action: i,
|
|
3724
|
+
className: o,
|
|
3673
3725
|
"data-testid": s,
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
className: Oa.content,
|
|
3682
|
-
children: a
|
|
3683
|
-
}),
|
|
3684
|
-
i && /* @__PURE__ */ d("span", {
|
|
3685
|
-
className: Oa.action,
|
|
3686
|
-
children: i
|
|
3687
|
-
}),
|
|
3688
|
-
/* @__PURE__ */ d(or, {
|
|
3689
|
-
className: Oa.dismiss,
|
|
3690
|
-
onClick: n,
|
|
3691
|
-
label: r,
|
|
3692
|
-
size: 20
|
|
3693
|
-
})
|
|
3694
|
-
]
|
|
3726
|
+
dismissSlot: /* @__PURE__ */ d(sr, {
|
|
3727
|
+
className: ja.dismiss,
|
|
3728
|
+
onClick: n,
|
|
3729
|
+
label: r,
|
|
3730
|
+
size: 20
|
|
3731
|
+
}),
|
|
3732
|
+
children: a
|
|
3695
3733
|
});
|
|
3696
3734
|
}
|
|
3697
|
-
var
|
|
3735
|
+
var Na = {
|
|
3698
3736
|
header: "_header_u329l_2",
|
|
3699
3737
|
titleSection: "_titleSection_u329l_12",
|
|
3700
3738
|
title: "_title_u329l_12",
|
|
@@ -3702,23 +3740,23 @@ var Aa = {
|
|
|
3702
3740
|
};
|
|
3703
3741
|
//#endregion
|
|
3704
3742
|
//#region src/layouts/AdminPageHeader/AdminPageHeader.tsx
|
|
3705
|
-
function
|
|
3743
|
+
function Pa({ title: e, actions: t, "data-testid": n }) {
|
|
3706
3744
|
return /* @__PURE__ */ f("header", {
|
|
3707
|
-
className:
|
|
3745
|
+
className: Na.header,
|
|
3708
3746
|
"data-testid": n,
|
|
3709
3747
|
children: [/* @__PURE__ */ d("div", {
|
|
3710
|
-
className:
|
|
3748
|
+
className: Na.titleSection,
|
|
3711
3749
|
children: /* @__PURE__ */ d("span", {
|
|
3712
|
-
className:
|
|
3750
|
+
className: Na.title,
|
|
3713
3751
|
children: e
|
|
3714
3752
|
})
|
|
3715
3753
|
}), t && /* @__PURE__ */ d("div", {
|
|
3716
|
-
className:
|
|
3754
|
+
className: Na.actions,
|
|
3717
3755
|
children: t
|
|
3718
3756
|
})]
|
|
3719
3757
|
});
|
|
3720
3758
|
}
|
|
3721
|
-
var
|
|
3759
|
+
var Fa = {
|
|
3722
3760
|
shell: "_shell_1c2iw_2",
|
|
3723
3761
|
body: "_body_1c2iw_10",
|
|
3724
3762
|
sidebarSlot: "_sidebarSlot_1c2iw_16",
|
|
@@ -3728,14 +3766,14 @@ var Ma = {
|
|
|
3728
3766
|
};
|
|
3729
3767
|
//#endregion
|
|
3730
3768
|
//#region src/layouts/AppShell/AppShell.tsx
|
|
3731
|
-
function
|
|
3732
|
-
return c ? /* @__PURE__ */ d(
|
|
3769
|
+
function Ia({ restaurantName: e, onMenuToggle: t, onLogoClick: n, onRightToggle: r, sidebar: i, children: a, tabBar: o, headerRight: s, isPinLocked: c = !1, pinLockContent: l, isLoading: u = !1, "data-testid": p }) {
|
|
3770
|
+
return c ? /* @__PURE__ */ d(bi, {
|
|
3733
3771
|
isLocked: !0,
|
|
3734
3772
|
children: l
|
|
3735
3773
|
}) : /* @__PURE__ */ f("div", {
|
|
3736
|
-
className:
|
|
3774
|
+
className: Fa.shell,
|
|
3737
3775
|
"data-testid": p,
|
|
3738
|
-
children: [/* @__PURE__ */ d(
|
|
3776
|
+
children: [/* @__PURE__ */ d(ri, {
|
|
3739
3777
|
restaurantName: e,
|
|
3740
3778
|
onMenuToggle: t,
|
|
3741
3779
|
onLogoClick: n,
|
|
@@ -3743,82 +3781,82 @@ function Na({ restaurantName: e, onMenuToggle: t, onLogoClick: n, onRightToggle:
|
|
|
3743
3781
|
isLoading: u,
|
|
3744
3782
|
rightSlot: s
|
|
3745
3783
|
}), /* @__PURE__ */ f("div", {
|
|
3746
|
-
className:
|
|
3784
|
+
className: Fa.body,
|
|
3747
3785
|
children: [/* @__PURE__ */ d("div", {
|
|
3748
|
-
className:
|
|
3786
|
+
className: Fa.sidebarSlot,
|
|
3749
3787
|
children: i
|
|
3750
3788
|
}), /* @__PURE__ */ f("div", {
|
|
3751
|
-
className:
|
|
3789
|
+
className: Fa.contentArea,
|
|
3752
3790
|
children: [/* @__PURE__ */ d("main", {
|
|
3753
|
-
className:
|
|
3791
|
+
className: Fa.main,
|
|
3754
3792
|
children: a
|
|
3755
3793
|
}), o && /* @__PURE__ */ d("div", {
|
|
3756
|
-
className:
|
|
3794
|
+
className: Fa.tabBarSlot,
|
|
3757
3795
|
children: o
|
|
3758
3796
|
})]
|
|
3759
3797
|
})]
|
|
3760
3798
|
})]
|
|
3761
3799
|
});
|
|
3762
3800
|
}
|
|
3763
|
-
var
|
|
3801
|
+
var La = { divider: "_divider_1nit0_1" };
|
|
3764
3802
|
//#endregion
|
|
3765
3803
|
//#region src/layouts/Divider/Divider.tsx
|
|
3766
|
-
function
|
|
3804
|
+
function Ra({ orientation: e = "horizontal", spacing: t = "md", className: n, "data-testid": r }) {
|
|
3767
3805
|
return /* @__PURE__ */ d("hr", {
|
|
3768
|
-
className: [
|
|
3806
|
+
className: [La.divider, n].filter(Boolean).join(" "),
|
|
3769
3807
|
"data-orientation": e,
|
|
3770
3808
|
"data-spacing": t,
|
|
3771
3809
|
"aria-orientation": e,
|
|
3772
3810
|
"data-testid": r
|
|
3773
3811
|
});
|
|
3774
3812
|
}
|
|
3775
|
-
var
|
|
3813
|
+
var za = { grid: "_grid_w5ah8_2" }, Ba = {
|
|
3776
3814
|
xs: "var(--ds-space-1)",
|
|
3777
3815
|
sm: "var(--ds-space-2)",
|
|
3778
3816
|
md: "var(--ds-space-3)",
|
|
3779
3817
|
lg: "var(--ds-space-4)",
|
|
3780
3818
|
xl: "var(--ds-space-6)"
|
|
3781
3819
|
};
|
|
3782
|
-
function
|
|
3820
|
+
function Va({ columns: e = 1, gap: t = "md", children: n, className: r, style: i, "data-testid": a }) {
|
|
3783
3821
|
let o = {
|
|
3784
3822
|
"--grid-columns": typeof e == "number" ? `repeat(${e}, minmax(0, 1fr))` : e,
|
|
3785
|
-
"--grid-gap":
|
|
3823
|
+
"--grid-gap": Ba[t],
|
|
3786
3824
|
...i
|
|
3787
3825
|
};
|
|
3788
3826
|
return /* @__PURE__ */ d("div", {
|
|
3789
|
-
className: [
|
|
3827
|
+
className: [za.grid, r].filter(Boolean).join(" "),
|
|
3790
3828
|
style: o,
|
|
3791
3829
|
"data-testid": a,
|
|
3792
3830
|
children: n
|
|
3793
3831
|
});
|
|
3794
3832
|
}
|
|
3795
|
-
var
|
|
3833
|
+
var Ha = {
|
|
3796
3834
|
footer: "_footer_1dat1_2",
|
|
3797
3835
|
dot: "_dot_1dat1_14",
|
|
3798
3836
|
info: "_info_1dat1_22"
|
|
3799
3837
|
};
|
|
3800
3838
|
//#endregion
|
|
3801
3839
|
//#region src/layouts/LoginFooter/LoginFooter.tsx
|
|
3802
|
-
function
|
|
3840
|
+
function Ua({ languageSelector: e, appName: t = "Toteat©", version: n, env: r, className: i, "data-testid": a }) {
|
|
3803
3841
|
return /* @__PURE__ */ f("footer", {
|
|
3804
|
-
className: [
|
|
3842
|
+
className: [Ha.footer, i].filter(Boolean).join(" "),
|
|
3805
3843
|
"data-testid": a,
|
|
3806
3844
|
children: [
|
|
3807
3845
|
e,
|
|
3808
3846
|
e && /* @__PURE__ */ d("span", {
|
|
3809
|
-
className:
|
|
3847
|
+
className: Ha.dot,
|
|
3810
3848
|
"aria-hidden": "true"
|
|
3811
3849
|
}),
|
|
3812
3850
|
/* @__PURE__ */ d("span", {
|
|
3813
|
-
className:
|
|
3851
|
+
className: Ha.info,
|
|
3814
3852
|
children: t
|
|
3815
3853
|
}),
|
|
3816
3854
|
(n || r) && /* @__PURE__ */ d("span", {
|
|
3817
|
-
className:
|
|
3855
|
+
className: Ha.dot,
|
|
3818
3856
|
"aria-hidden": "true"
|
|
3819
3857
|
}),
|
|
3820
3858
|
(n || r) && /* @__PURE__ */ f("span", {
|
|
3821
|
-
className:
|
|
3859
|
+
className: Ha.info,
|
|
3822
3860
|
children: [
|
|
3823
3861
|
n && /* @__PURE__ */ f(u, { children: ["Ver: ", n] }),
|
|
3824
3862
|
n && r && /* @__PURE__ */ d(u, { children: "\xA0\xA0" }),
|
|
@@ -3828,24 +3866,24 @@ function Ba({ languageSelector: e, appName: t = "Toteat©", version: n, env: r,
|
|
|
3828
3866
|
]
|
|
3829
3867
|
});
|
|
3830
3868
|
}
|
|
3831
|
-
var
|
|
3869
|
+
var Wa = {
|
|
3832
3870
|
page: "_page_s8gdl_2",
|
|
3833
3871
|
card: "_card_s8gdl_45",
|
|
3834
3872
|
cardEntrance: "_cardEntrance_s8gdl_1"
|
|
3835
3873
|
};
|
|
3836
3874
|
//#endregion
|
|
3837
3875
|
//#region src/layouts/LoginPageLayout/LoginPageLayout.tsx
|
|
3838
|
-
function
|
|
3876
|
+
function Ga({ children: e, "data-testid": t }) {
|
|
3839
3877
|
return /* @__PURE__ */ d("main", {
|
|
3840
|
-
className:
|
|
3878
|
+
className: Wa.page,
|
|
3841
3879
|
"data-testid": t,
|
|
3842
3880
|
children: /* @__PURE__ */ d("div", {
|
|
3843
|
-
className:
|
|
3881
|
+
className: Wa.card,
|
|
3844
3882
|
children: e
|
|
3845
3883
|
})
|
|
3846
3884
|
});
|
|
3847
3885
|
}
|
|
3848
|
-
var
|
|
3886
|
+
var Ka = {
|
|
3849
3887
|
root: "_root_11bhp_2",
|
|
3850
3888
|
sidebar: "_sidebar_11bhp_20",
|
|
3851
3889
|
main: "_main_11bhp_37",
|
|
@@ -3854,22 +3892,22 @@ var Ua = {
|
|
|
3854
3892
|
};
|
|
3855
3893
|
//#endregion
|
|
3856
3894
|
//#region src/layouts/PageLayout/PageLayout.tsx
|
|
3857
|
-
function
|
|
3895
|
+
function qa({ sidebar: e, header: t, children: n, collapsed: r = !1, className: i, "data-testid": a }) {
|
|
3858
3896
|
return /* @__PURE__ */ f("div", {
|
|
3859
|
-
className: [
|
|
3897
|
+
className: [Ka.root, i].filter(Boolean).join(" "),
|
|
3860
3898
|
"data-sidebar-collapsed": r ? "" : void 0,
|
|
3861
3899
|
"data-testid": a,
|
|
3862
3900
|
children: [e && /* @__PURE__ */ d("aside", {
|
|
3863
|
-
className:
|
|
3901
|
+
className: Ka.sidebar,
|
|
3864
3902
|
"aria-label": "Navegación lateral",
|
|
3865
3903
|
children: e
|
|
3866
3904
|
}), /* @__PURE__ */ f("div", {
|
|
3867
|
-
className:
|
|
3905
|
+
className: Ka.main,
|
|
3868
3906
|
children: [t && /* @__PURE__ */ d("header", {
|
|
3869
|
-
className:
|
|
3907
|
+
className: Ka.header,
|
|
3870
3908
|
children: t
|
|
3871
3909
|
}), /* @__PURE__ */ d("main", {
|
|
3872
|
-
className:
|
|
3910
|
+
className: Ka.content,
|
|
3873
3911
|
children: n
|
|
3874
3912
|
})]
|
|
3875
3913
|
})]
|
|
@@ -3877,36 +3915,36 @@ function Wa({ sidebar: e, header: t, children: n, collapsed: r = !1, className:
|
|
|
3877
3915
|
}
|
|
3878
3916
|
//#endregion
|
|
3879
3917
|
//#region src/layouts/Stack/Stack.tsx
|
|
3880
|
-
var
|
|
3918
|
+
var Ja = {
|
|
3881
3919
|
xs: "var(--ds-space-1)",
|
|
3882
3920
|
sm: "var(--ds-space-2)",
|
|
3883
3921
|
md: "var(--ds-space-3)",
|
|
3884
3922
|
lg: "var(--ds-space-4)",
|
|
3885
3923
|
xl: "var(--ds-space-6)",
|
|
3886
3924
|
"2xl": "var(--ds-space-8)"
|
|
3887
|
-
},
|
|
3925
|
+
}, Ya = {
|
|
3888
3926
|
start: "flex-start",
|
|
3889
3927
|
center: "center",
|
|
3890
3928
|
end: "flex-end",
|
|
3891
3929
|
between: "space-between",
|
|
3892
3930
|
around: "space-around",
|
|
3893
3931
|
evenly: "space-evenly"
|
|
3894
|
-
},
|
|
3932
|
+
}, Xa = {
|
|
3895
3933
|
start: "flex-start",
|
|
3896
3934
|
center: "center",
|
|
3897
3935
|
end: "flex-end",
|
|
3898
3936
|
stretch: "stretch",
|
|
3899
3937
|
baseline: "baseline"
|
|
3900
3938
|
};
|
|
3901
|
-
function
|
|
3939
|
+
function Za({ as: e, direction: t = "vertical", gap: n = "md", align: r, justify: i, wrap: a = !1, children: o, className: s, style: c, ...l }) {
|
|
3902
3940
|
return /* @__PURE__ */ d(e ?? "div", {
|
|
3903
3941
|
className: s,
|
|
3904
3942
|
style: {
|
|
3905
3943
|
display: "flex",
|
|
3906
3944
|
flexDirection: t === "vertical" ? "column" : "row",
|
|
3907
|
-
gap:
|
|
3908
|
-
alignItems: r ?
|
|
3909
|
-
justifyContent: i ?
|
|
3945
|
+
gap: Ja[n],
|
|
3946
|
+
alignItems: r ? Xa[r] : void 0,
|
|
3947
|
+
justifyContent: i ? Ya[i] : void 0,
|
|
3910
3948
|
flexWrap: a ? "wrap" : void 0,
|
|
3911
3949
|
...c
|
|
3912
3950
|
},
|
|
@@ -3916,20 +3954,20 @@ function Ja({ as: e, direction: t = "vertical", gap: n = "md", align: r, justify
|
|
|
3916
3954
|
}
|
|
3917
3955
|
//#endregion
|
|
3918
3956
|
//#region src/utils/csv.ts
|
|
3919
|
-
function
|
|
3957
|
+
function Qa(e) {
|
|
3920
3958
|
if (e == null) return "";
|
|
3921
3959
|
let t = String(e);
|
|
3922
3960
|
return /[",\r\n]/.test(t) ? `"${t.replace(/"/g, "\"\"")}"` : t;
|
|
3923
3961
|
}
|
|
3924
|
-
function
|
|
3925
|
-
return e.length === 0 ? "" : e.map((e) => e.map(
|
|
3962
|
+
function $a(e) {
|
|
3963
|
+
return e.length === 0 ? "" : e.map((e) => e.map(Qa).join(",")).join("\r\n");
|
|
3926
3964
|
}
|
|
3927
3965
|
//#endregion
|
|
3928
3966
|
//#region src/utils/portal.ts
|
|
3929
|
-
function
|
|
3967
|
+
function eo(e, t) {
|
|
3930
3968
|
return j(e, t ?? document.body);
|
|
3931
3969
|
}
|
|
3932
3970
|
//#endregion
|
|
3933
|
-
export { Dn as Accordion,
|
|
3971
|
+
export { Dn as Accordion, Pa as AdminPageHeader, Ia as AppShell, Mn as AppleSignInButton, Wn as AreaChart, Pn as BackgroundWrapper, In as Badge, Un as BarChart, Rn as Breadcrumb, I as Button, Bn as Card, qn as Checkbox, Yn as ComingSoon, Zn as ConfigRow, $n as DataTable, tr as DatePicker, nr as DateRangePicker, lr as Dialog, Ra as Divider, Dr as DropZone, fr as DropdownButton, mr as DropdownMenu, Or as DsProvider, Ar as EmptyState, jr as ErrorBoundary, Mr as ExtrasDialog, Pr as FormField, Ir as GoogleSignInButton, Va as Grid, zr as GroupedButtons, Vr as Header, F as Icon, xr as ImagePreview, Gn as KpiCard, Hr as LanguageSelector, Hn as LineChart, Ua as LoginFooter, Ga as LoginPageLayout, ei as LogoToteat, ni as Multiselect, ri as NavBar, ai as Overlay, li as OverlayMessage, qa as PageLayout, _i as PageLoadingOverlay, vi as PermissionGate, bi as PinLockOverlay, Ci as ProductTile, Ti as Radio, Di as SearchInput, ki as SectionHeader, Ai as Select, Mi as Sidebar, Ii as SidebarNavItem, Ri as SidebarNavSection, _r as Skeleton, kn as Spinner, Za as Stack, zi as StatusBadge, Hi as StatusBanner, Wi as Stepper, Ki as Tab, Ji as TabBar, Xi as Tabs, na as TextInput, Qi as Textarea, ra as ThemeGate, pa as ToastContainer, ha as Toggle, ya as Tooltip, Ta as TreeItem, Aa as TreeList, Ma as UserNotification, L as cn, Qa as escapeCell, eo as portal, $a as rowsToCsv, Fi as sidebarNavItemActiveClass, Pi as sidebarNavItemClass, ar as useFocusTrap, da as useToast };
|
|
3934
3972
|
|
|
3935
3973
|
//# sourceMappingURL=index.es.js.map
|