@toteat-eng/ds-react 2026.6.10-3 → 2026.6.10-5
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/GroupedButtons/GroupedButtons.d.ts +2 -0
- 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/Tab/Tab.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 +628 -588
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +3 -3
- 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,37 +1831,38 @@ 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
|
+
"data-testid": e["data-testid"],
|
|
1865
1866
|
disabled: a || e.disabled,
|
|
1866
1867
|
onClick: () => g(e.value),
|
|
1867
1868
|
children: [e.icon && /* @__PURE__ */ d(F, {
|
|
@@ -1871,7 +1872,7 @@ function Rr({ label: e, options: t, selectedButton: n, size: r = "medium", fullW
|
|
|
1871
1872
|
}, e.value))
|
|
1872
1873
|
});
|
|
1873
1874
|
}
|
|
1874
|
-
var
|
|
1875
|
+
var Br = {
|
|
1875
1876
|
header: "_header_1dj55_2",
|
|
1876
1877
|
item: "_item_1dj55_17",
|
|
1877
1878
|
title: "_title_1dj55_24",
|
|
@@ -1879,18 +1880,18 @@ var zr = {
|
|
|
1879
1880
|
};
|
|
1880
1881
|
//#endregion
|
|
1881
1882
|
//#region src/components/Header/Header.tsx
|
|
1882
|
-
function
|
|
1883
|
+
function Vr({ headers: e = [], spaceBetween: t = !1, className: n, ...r }) {
|
|
1883
1884
|
return /* @__PURE__ */ d("section", {
|
|
1884
|
-
className: [
|
|
1885
|
+
className: [Br.header, n].filter(Boolean).join(" "),
|
|
1885
1886
|
"data-space-between": t ? "" : void 0,
|
|
1886
1887
|
...r,
|
|
1887
1888
|
children: e.map((e) => /* @__PURE__ */ f("div", {
|
|
1888
|
-
className:
|
|
1889
|
+
className: Br.item,
|
|
1889
1890
|
children: [/* @__PURE__ */ d("p", {
|
|
1890
|
-
className:
|
|
1891
|
+
className: Br.title,
|
|
1891
1892
|
children: e.title
|
|
1892
1893
|
}), e.description && /* @__PURE__ */ d("p", {
|
|
1893
|
-
className:
|
|
1894
|
+
className: Br.description,
|
|
1894
1895
|
children: e.description
|
|
1895
1896
|
})]
|
|
1896
1897
|
}, e.title))
|
|
@@ -1898,12 +1899,12 @@ function Br({ headers: e = [], spaceBetween: t = !1, className: n, ...r }) {
|
|
|
1898
1899
|
}
|
|
1899
1900
|
//#endregion
|
|
1900
1901
|
//#region src/components/LanguageSelector/LanguageSelector.tsx
|
|
1901
|
-
function
|
|
1902
|
+
function Hr({ value: e, options: t, onChange: n, "data-testid": r }) {
|
|
1902
1903
|
let i = s(() => t.map(({ value: e, label: t }) => ({
|
|
1903
1904
|
value: e,
|
|
1904
1905
|
label: t
|
|
1905
1906
|
})), [t]);
|
|
1906
|
-
return /* @__PURE__ */ d(
|
|
1907
|
+
return /* @__PURE__ */ d(fr, {
|
|
1907
1908
|
text: t.find((t) => t.value === e)?.label ?? e,
|
|
1908
1909
|
menuItems: i,
|
|
1909
1910
|
size: "small",
|
|
@@ -1912,22 +1913,22 @@ function Vr({ value: e, options: t, onChange: n, "data-testid": r }) {
|
|
|
1912
1913
|
"data-testid": r
|
|
1913
1914
|
});
|
|
1914
1915
|
}
|
|
1915
|
-
var
|
|
1916
|
+
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
1917
|
//#endregion
|
|
1917
1918
|
//#region src/components/LogoToteat/LogoToteat.tsx
|
|
1918
|
-
function
|
|
1919
|
+
function Xr(e) {
|
|
1919
1920
|
return e.replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<");
|
|
1920
1921
|
}
|
|
1921
|
-
var
|
|
1922
|
-
original:
|
|
1923
|
-
"cream-orange":
|
|
1924
|
-
"black-cream":
|
|
1925
|
-
},
|
|
1926
|
-
original:
|
|
1927
|
-
"cream-orange":
|
|
1928
|
-
"black-cream":
|
|
1922
|
+
var Zr = {
|
|
1923
|
+
original: Yr,
|
|
1924
|
+
"cream-orange": qr,
|
|
1925
|
+
"black-cream": Jr
|
|
1926
|
+
}, Qr = {
|
|
1927
|
+
original: Kr,
|
|
1928
|
+
"cream-orange": Wr,
|
|
1929
|
+
"black-cream": Gr
|
|
1929
1930
|
};
|
|
1930
|
-
function
|
|
1931
|
+
function $r(e, t, n) {
|
|
1931
1932
|
if (t !== void 0 && n !== void 0) return {
|
|
1932
1933
|
width: t,
|
|
1933
1934
|
height: n
|
|
@@ -1950,17 +1951,17 @@ function Qr(e, t, n) {
|
|
|
1950
1951
|
height: Math.round(t / 317 * 80)
|
|
1951
1952
|
};
|
|
1952
1953
|
}
|
|
1953
|
-
function
|
|
1954
|
-
let s = e === "icon" ?
|
|
1954
|
+
function ei({ mode: e = "complete", variant: t = "original", width: n, height: r, alt: i = "Logo Toteat", className: a, ...o }) {
|
|
1955
|
+
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
1956
|
return /* @__PURE__ */ d("span", {
|
|
1956
|
-
className: [
|
|
1957
|
+
className: [Ur.logo, a].filter(Boolean).join(" "),
|
|
1957
1958
|
"data-mode": e,
|
|
1958
1959
|
"data-variant": t,
|
|
1959
1960
|
...o,
|
|
1960
1961
|
dangerouslySetInnerHTML: { __html: l }
|
|
1961
1962
|
});
|
|
1962
1963
|
}
|
|
1963
|
-
var
|
|
1964
|
+
var G = {
|
|
1964
1965
|
multiselect: "_multiselect_jb72r_2",
|
|
1965
1966
|
trigger: "_trigger_jb72r_10",
|
|
1966
1967
|
placeholder: "_placeholder_jb72r_42",
|
|
@@ -1971,9 +1972,9 @@ var K = {
|
|
|
1971
1972
|
search: "_search_jb72r_120",
|
|
1972
1973
|
option: "_option_jb72r_108",
|
|
1973
1974
|
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 } =
|
|
1975
|
+
}, ti = 240;
|
|
1976
|
+
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 }) {
|
|
1977
|
+
let [m, h] = l(!1), [g, _] = l(""), { isOpen: v, containerRef: y, triggerRef: b, toggle: x, closeAndFocusTrigger: S } = ur({
|
|
1977
1978
|
disabled: c,
|
|
1978
1979
|
closeOnOutsideClick: !1
|
|
1979
1980
|
}), C = e.filter((e) => t.includes(e.value)), w = e.filter((e) => !t.includes(e.value) && e.label.toLowerCase().includes(g.toLowerCase()));
|
|
@@ -1996,31 +1997,31 @@ function ti({ options: e, value: t, onChange: n, placeholder: r = "Seleccionar..
|
|
|
1996
1997
|
}, [v, S]), i(() => {
|
|
1997
1998
|
if (!v || !y.current) return;
|
|
1998
1999
|
let e = y.current.getBoundingClientRect();
|
|
1999
|
-
h(window.innerHeight - e.bottom <
|
|
2000
|
+
h(window.innerHeight - e.bottom < ti + 8);
|
|
2000
2001
|
}, [v, y]);
|
|
2001
2002
|
let T = (e) => n([...t, e]), E = (e) => n(t.filter((t) => t !== e));
|
|
2002
2003
|
return /* @__PURE__ */ f("div", {
|
|
2003
2004
|
ref: y,
|
|
2004
|
-
className:
|
|
2005
|
+
className: G.multiselect,
|
|
2005
2006
|
"data-error": u || void 0,
|
|
2006
2007
|
"data-disabled": c || void 0,
|
|
2007
2008
|
"data-testid": p,
|
|
2008
2009
|
children: [/* @__PURE__ */ f("button", {
|
|
2009
2010
|
ref: b,
|
|
2010
2011
|
type: "button",
|
|
2011
|
-
className:
|
|
2012
|
+
className: G.trigger,
|
|
2012
2013
|
onClick: x,
|
|
2013
2014
|
"aria-haspopup": "listbox",
|
|
2014
2015
|
"aria-expanded": v,
|
|
2015
2016
|
disabled: c,
|
|
2016
2017
|
children: [C.length === 0 && /* @__PURE__ */ d("span", {
|
|
2017
|
-
className:
|
|
2018
|
+
className: G.placeholder,
|
|
2018
2019
|
children: r
|
|
2019
2020
|
}), C.map((e) => /* @__PURE__ */ f("span", {
|
|
2020
|
-
className:
|
|
2021
|
+
className: G.tag,
|
|
2021
2022
|
children: [e.label, /* @__PURE__ */ d("button", {
|
|
2022
2023
|
type: "button",
|
|
2023
|
-
className:
|
|
2024
|
+
className: G.tagRemove,
|
|
2024
2025
|
onClick: (t) => {
|
|
2025
2026
|
t.stopPropagation(), E(e.value);
|
|
2026
2027
|
},
|
|
@@ -2029,38 +2030,38 @@ function ti({ options: e, value: t, onChange: n, placeholder: r = "Seleccionar..
|
|
|
2029
2030
|
})]
|
|
2030
2031
|
}, e.value))]
|
|
2031
2032
|
}), v && /* @__PURE__ */ f("div", {
|
|
2032
|
-
className:
|
|
2033
|
+
className: G.dropdown,
|
|
2033
2034
|
role: "listbox",
|
|
2034
2035
|
"aria-multiselectable": "true",
|
|
2035
2036
|
"data-upward": m || void 0,
|
|
2036
2037
|
children: [/* @__PURE__ */ d("input", {
|
|
2037
2038
|
type: "text",
|
|
2038
|
-
className:
|
|
2039
|
+
className: G.search,
|
|
2039
2040
|
placeholder: a,
|
|
2040
2041
|
"aria-label": a,
|
|
2041
2042
|
value: g,
|
|
2042
2043
|
onChange: (e) => _(e.target.value),
|
|
2043
2044
|
autoFocus: !0
|
|
2044
2045
|
}), /* @__PURE__ */ f("div", {
|
|
2045
|
-
className:
|
|
2046
|
+
className: G.optionsList,
|
|
2046
2047
|
children: [w.map((e) => /* @__PURE__ */ d("button", {
|
|
2047
2048
|
type: "button",
|
|
2048
2049
|
role: "option",
|
|
2049
2050
|
"aria-selected": t.includes(e.value),
|
|
2050
|
-
className:
|
|
2051
|
+
className: G.option,
|
|
2051
2052
|
onClick: () => {
|
|
2052
2053
|
T(e.value), _("");
|
|
2053
2054
|
},
|
|
2054
2055
|
children: e.label
|
|
2055
2056
|
}, e.value)), w.length === 0 && /* @__PURE__ */ d("div", {
|
|
2056
|
-
className:
|
|
2057
|
+
className: G.noResults,
|
|
2057
2058
|
children: o
|
|
2058
2059
|
})]
|
|
2059
2060
|
})]
|
|
2060
2061
|
})]
|
|
2061
2062
|
});
|
|
2062
2063
|
}
|
|
2063
|
-
var
|
|
2064
|
+
var K = {
|
|
2064
2065
|
navbar: "_navbar_1rz8d_2",
|
|
2065
2066
|
navLeft: "_navLeft_1rz8d_16",
|
|
2066
2067
|
menuButton: "_menuButton_1rz8d_27",
|
|
@@ -2075,20 +2076,20 @@ var q = {
|
|
|
2075
2076
|
};
|
|
2076
2077
|
//#endregion
|
|
2077
2078
|
//#region src/components/NavBar/NavBar.tsx
|
|
2078
|
-
function
|
|
2079
|
+
function ri({ restaurantName: e, onMenuToggle: t, onLogoClick: n, onRightToggle: r, isLoading: i = !1, isPinLocked: a = !1, rightSlot: o, "data-testid": s }) {
|
|
2079
2080
|
return a ? null : /* @__PURE__ */ f("header", {
|
|
2080
|
-
className:
|
|
2081
|
+
className: K.navbar,
|
|
2081
2082
|
"data-testid": s,
|
|
2082
2083
|
children: [
|
|
2083
2084
|
/* @__PURE__ */ f("div", {
|
|
2084
|
-
className:
|
|
2085
|
+
className: K.navLeft,
|
|
2085
2086
|
children: [/* @__PURE__ */ d("button", {
|
|
2086
2087
|
type: "button",
|
|
2087
|
-
className:
|
|
2088
|
+
className: K.menuButton,
|
|
2088
2089
|
onClick: t,
|
|
2089
2090
|
"aria-label": "Abrir menú",
|
|
2090
2091
|
children: /* @__PURE__ */ d("span", {
|
|
2091
|
-
className:
|
|
2092
|
+
className: K.menuIcon,
|
|
2092
2093
|
"aria-hidden": "true"
|
|
2093
2094
|
})
|
|
2094
2095
|
}), i && /* @__PURE__ */ d("img", {
|
|
@@ -2096,31 +2097,31 @@ function ni({ restaurantName: e, onMenuToggle: t, onLogoClick: n, onRightToggle:
|
|
|
2096
2097
|
alt: "Cargando",
|
|
2097
2098
|
width: 20,
|
|
2098
2099
|
height: 20,
|
|
2099
|
-
className:
|
|
2100
|
+
className: K.spinner
|
|
2100
2101
|
})]
|
|
2101
2102
|
}),
|
|
2102
2103
|
/* @__PURE__ */ f("div", {
|
|
2103
|
-
className:
|
|
2104
|
+
className: K.navCenter,
|
|
2104
2105
|
children: [/* @__PURE__ */ d("button", {
|
|
2105
2106
|
type: "button",
|
|
2106
|
-
className:
|
|
2107
|
+
className: K.logoBrand,
|
|
2107
2108
|
onClick: n,
|
|
2108
2109
|
"aria-label": "Ir al inicio",
|
|
2109
2110
|
children: /* @__PURE__ */ d("img", {
|
|
2110
2111
|
src: "/assets/angular/dsLogo.svg",
|
|
2111
2112
|
alt: "Toteat",
|
|
2112
|
-
className:
|
|
2113
|
+
className: K.logo
|
|
2113
2114
|
})
|
|
2114
2115
|
}), /* @__PURE__ */ d("span", {
|
|
2115
|
-
className:
|
|
2116
|
+
className: K.restaurantName,
|
|
2116
2117
|
children: e
|
|
2117
2118
|
})]
|
|
2118
2119
|
}),
|
|
2119
2120
|
/* @__PURE__ */ f("div", {
|
|
2120
|
-
className:
|
|
2121
|
+
className: K.navRight,
|
|
2121
2122
|
children: [o, /* @__PURE__ */ d("button", {
|
|
2122
2123
|
type: "button",
|
|
2123
|
-
className:
|
|
2124
|
+
className: K.rightButton,
|
|
2124
2125
|
onClick: r,
|
|
2125
2126
|
"aria-label": "Pantalla completa",
|
|
2126
2127
|
children: /* @__PURE__ */ d("img", {
|
|
@@ -2135,7 +2136,7 @@ function ni({ restaurantName: e, onMenuToggle: t, onLogoClick: n, onRightToggle:
|
|
|
2135
2136
|
]
|
|
2136
2137
|
});
|
|
2137
2138
|
}
|
|
2138
|
-
var
|
|
2139
|
+
var ii = {
|
|
2139
2140
|
overlay: "_overlay_8yoic_2",
|
|
2140
2141
|
"overlay-fade-in": "_overlay-fade-in_8yoic_1",
|
|
2141
2142
|
backdrop: "_backdrop_8yoic_22",
|
|
@@ -2143,11 +2144,11 @@ var ri = {
|
|
|
2143
2144
|
};
|
|
2144
2145
|
//#endregion
|
|
2145
2146
|
//#region src/components/Overlay/Overlay.tsx
|
|
2146
|
-
function
|
|
2147
|
+
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
2148
|
let v = r(() => {
|
|
2148
2149
|
a && t();
|
|
2149
2150
|
}, [a, t]);
|
|
2150
|
-
return
|
|
2151
|
+
return rr(e && c, { strategy: "overflow" }), i(() => {
|
|
2151
2152
|
if (!e || !s) return;
|
|
2152
2153
|
let t = (e) => {
|
|
2153
2154
|
e.key === "Escape" && v();
|
|
@@ -2159,7 +2160,7 @@ function ii({ visible: e = !1, onClose: t, children: n, dismissible: a = !0, clo
|
|
|
2159
2160
|
v
|
|
2160
2161
|
]), !e || typeof document > "u" ? null : j(/* @__PURE__ */ f("div", {
|
|
2161
2162
|
"data-testid": _,
|
|
2162
|
-
className: [
|
|
2163
|
+
className: [ii.overlay, g].filter(Boolean).join(" "),
|
|
2163
2164
|
"data-blur": l ? "" : void 0,
|
|
2164
2165
|
"data-placement": u,
|
|
2165
2166
|
style: { "--overlay-z-index": String(p) },
|
|
@@ -2167,18 +2168,18 @@ function ii({ visible: e = !1, onClose: t, children: n, dismissible: a = !0, clo
|
|
|
2167
2168
|
"aria-label": h,
|
|
2168
2169
|
children: [/* @__PURE__ */ d("button", {
|
|
2169
2170
|
type: "button",
|
|
2170
|
-
className:
|
|
2171
|
+
className: ii.backdrop,
|
|
2171
2172
|
"data-backdrop": "",
|
|
2172
2173
|
onClick: o ? v : void 0,
|
|
2173
2174
|
"aria-hidden": "true",
|
|
2174
2175
|
tabIndex: -1
|
|
2175
2176
|
}), /* @__PURE__ */ d("div", {
|
|
2176
|
-
className:
|
|
2177
|
+
className: ii.content,
|
|
2177
2178
|
children: n
|
|
2178
2179
|
})]
|
|
2179
2180
|
}), document.body);
|
|
2180
2181
|
}
|
|
2181
|
-
var
|
|
2182
|
+
var q = {
|
|
2182
2183
|
overlayMessage: "_overlayMessage_we8nc_2",
|
|
2183
2184
|
header: "_header_we8nc_20",
|
|
2184
2185
|
iconWrap: "_iconWrap_we8nc_30",
|
|
@@ -2189,21 +2190,21 @@ var J = {
|
|
|
2189
2190
|
closeBtn: "_closeBtn_we8nc_66",
|
|
2190
2191
|
body: "_body_we8nc_94",
|
|
2191
2192
|
actions: "_actions_we8nc_101"
|
|
2192
|
-
},
|
|
2193
|
+
}, oi = {
|
|
2193
2194
|
success: "success-outline",
|
|
2194
2195
|
info: "info-outline",
|
|
2195
2196
|
warning: "exclamation-outline",
|
|
2196
2197
|
error: "error-outline"
|
|
2197
|
-
},
|
|
2198
|
+
}, si = {
|
|
2198
2199
|
success: "var(--ds-color-success)",
|
|
2199
2200
|
info: "var(--ds-color-info)",
|
|
2200
2201
|
warning: "var(--ds-color-warning)",
|
|
2201
2202
|
error: "var(--ds-color-primary)"
|
|
2202
2203
|
};
|
|
2203
|
-
function
|
|
2204
|
-
let S = a(), C = a(), w = i ??
|
|
2204
|
+
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 }) {
|
|
2205
|
+
let S = a(), C = a(), w = i ?? oi[r], T = si[r], E = !!n, D = !!u || !!p;
|
|
2205
2206
|
return /* @__PURE__ */ f("div", {
|
|
2206
|
-
className:
|
|
2207
|
+
className: q.overlayMessage,
|
|
2207
2208
|
"data-status": r,
|
|
2208
2209
|
"data-standalone": _ ? "" : void 0,
|
|
2209
2210
|
role: _ ? "region" : "alertdialog",
|
|
@@ -2214,13 +2215,13 @@ function si({ title: e, eyebrow: t, children: n, status: r = "success", iconName
|
|
|
2214
2215
|
"data-testid": x,
|
|
2215
2216
|
children: [
|
|
2216
2217
|
/* @__PURE__ */ f("header", {
|
|
2217
|
-
className:
|
|
2218
|
+
className: q.header,
|
|
2218
2219
|
children: [
|
|
2219
2220
|
/* @__PURE__ */ d("div", {
|
|
2220
|
-
className:
|
|
2221
|
+
className: q.iconWrap,
|
|
2221
2222
|
"aria-hidden": "true",
|
|
2222
2223
|
children: /* @__PURE__ */ d("span", {
|
|
2223
|
-
className:
|
|
2224
|
+
className: q.iconColor,
|
|
2224
2225
|
style: { "--om-icon-color": T },
|
|
2225
2226
|
children: /* @__PURE__ */ d(F, {
|
|
2226
2227
|
name: w,
|
|
@@ -2229,18 +2230,18 @@ function si({ title: e, eyebrow: t, children: n, status: r = "success", iconName
|
|
|
2229
2230
|
})
|
|
2230
2231
|
}),
|
|
2231
2232
|
/* @__PURE__ */ f("div", {
|
|
2232
|
-
className:
|
|
2233
|
+
className: q.headline,
|
|
2233
2234
|
children: [t && /* @__PURE__ */ d("p", {
|
|
2234
|
-
className:
|
|
2235
|
+
className: q.eyebrow,
|
|
2235
2236
|
children: t
|
|
2236
2237
|
}), /* @__PURE__ */ d("h2", {
|
|
2237
|
-
className:
|
|
2238
|
+
className: q.title,
|
|
2238
2239
|
id: S,
|
|
2239
2240
|
children: e
|
|
2240
2241
|
})]
|
|
2241
2242
|
}),
|
|
2242
|
-
s && c && /* @__PURE__ */ d(
|
|
2243
|
-
className:
|
|
2243
|
+
s && c && /* @__PURE__ */ d(sr, {
|
|
2244
|
+
className: q.closeBtn,
|
|
2244
2245
|
label: l,
|
|
2245
2246
|
onClick: v,
|
|
2246
2247
|
size: 20
|
|
@@ -2248,12 +2249,12 @@ function si({ title: e, eyebrow: t, children: n, status: r = "success", iconName
|
|
|
2248
2249
|
]
|
|
2249
2250
|
}),
|
|
2250
2251
|
E && /* @__PURE__ */ d("div", {
|
|
2251
|
-
className:
|
|
2252
|
+
className: q.body,
|
|
2252
2253
|
id: C,
|
|
2253
2254
|
children: n
|
|
2254
2255
|
}),
|
|
2255
2256
|
D && /* @__PURE__ */ f("footer", {
|
|
2256
|
-
className:
|
|
2257
|
+
className: q.actions,
|
|
2257
2258
|
children: [p && /* @__PURE__ */ d(I, {
|
|
2258
2259
|
variant: "outline",
|
|
2259
2260
|
fullWidth: !0,
|
|
@@ -2271,14 +2272,14 @@ function si({ title: e, eyebrow: t, children: n, status: r = "success", iconName
|
|
|
2271
2272
|
]
|
|
2272
2273
|
});
|
|
2273
2274
|
}
|
|
2274
|
-
function
|
|
2275
|
-
return e ? u ? /* @__PURE__ */ d(
|
|
2275
|
+
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 }) {
|
|
2276
|
+
return e ? u ? /* @__PURE__ */ d(ci, {
|
|
2276
2277
|
...p,
|
|
2277
2278
|
standalone: !0,
|
|
2278
2279
|
dismissible: n,
|
|
2279
2280
|
onClose: t,
|
|
2280
2281
|
"data-testid": f
|
|
2281
|
-
}) : /* @__PURE__ */ d(
|
|
2282
|
+
}) : /* @__PURE__ */ d(ai, {
|
|
2282
2283
|
visible: e,
|
|
2283
2284
|
onClose: t,
|
|
2284
2285
|
dismissible: n,
|
|
@@ -2289,7 +2290,7 @@ function ci({ visible: e = !1, onClose: t, dismissible: n = !0, closeOnBackdrop:
|
|
|
2289
2290
|
blur: s,
|
|
2290
2291
|
placement: c,
|
|
2291
2292
|
"aria-label": l,
|
|
2292
|
-
children: /* @__PURE__ */ d(
|
|
2293
|
+
children: /* @__PURE__ */ d(ci, {
|
|
2293
2294
|
...p,
|
|
2294
2295
|
dismissible: n,
|
|
2295
2296
|
onClose: t,
|
|
@@ -2297,15 +2298,15 @@ function ci({ visible: e = !1, onClose: t, dismissible: n = !0, closeOnBackdrop:
|
|
|
2297
2298
|
})
|
|
2298
2299
|
}) : null;
|
|
2299
2300
|
}
|
|
2300
|
-
var
|
|
2301
|
-
function
|
|
2301
|
+
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}";
|
|
2302
|
+
function pi(e) {
|
|
2302
2303
|
let t = (t, n) => {
|
|
2303
2304
|
let r = e.createShader(t);
|
|
2304
2305
|
return e.shaderSource(r, n), e.compileShader(r), r;
|
|
2305
2306
|
}, n = e.createProgram();
|
|
2306
|
-
return e.attachShader(n, t(e.VERTEX_SHADER,
|
|
2307
|
+
return e.attachShader(n, t(e.VERTEX_SHADER, di)), e.attachShader(n, t(e.FRAGMENT_SHADER, fi)), e.linkProgram(n), n;
|
|
2307
2308
|
}
|
|
2308
|
-
function
|
|
2309
|
+
function mi({ active: e }) {
|
|
2309
2310
|
let t = c(null);
|
|
2310
2311
|
return i(() => {
|
|
2311
2312
|
if (!e || !t.current || window.matchMedia("(prefers-reduced-motion: reduce)").matches) return;
|
|
@@ -2316,7 +2317,7 @@ function pi({ active: e }) {
|
|
|
2316
2317
|
if (!r) return;
|
|
2317
2318
|
let i = () => {
|
|
2318
2319
|
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 =
|
|
2320
|
+
}, a = pi(r);
|
|
2320
2321
|
r.useProgram(a);
|
|
2321
2322
|
let o = r.createBuffer();
|
|
2322
2323
|
r.bindBuffer(r.ARRAY_BUFFER, o), r.bufferData(r.ARRAY_BUFFER, new Float32Array([
|
|
@@ -2345,15 +2346,15 @@ function pi({ active: e }) {
|
|
|
2345
2346
|
};
|
|
2346
2347
|
}, [e]), /* @__PURE__ */ d("canvas", {
|
|
2347
2348
|
ref: t,
|
|
2348
|
-
className:
|
|
2349
|
+
className: ui.canvas,
|
|
2349
2350
|
"aria-hidden": "true"
|
|
2350
2351
|
});
|
|
2351
2352
|
}
|
|
2352
|
-
var
|
|
2353
|
+
var hi = {
|
|
2353
2354
|
overlay: "_overlay_15uou_3",
|
|
2354
2355
|
logoLayer: "_logoLayer_15uou_58",
|
|
2355
2356
|
srOnly: "_srOnly_15uou_103"
|
|
2356
|
-
},
|
|
2357
|
+
}, J = {
|
|
2357
2358
|
outer: "_outer_1o0vn_9",
|
|
2358
2359
|
circle: "_circle_1o0vn_20",
|
|
2359
2360
|
"circle-lift": "_circle-lift_1o0vn_1",
|
|
@@ -2366,27 +2367,27 @@ var mi = {
|
|
|
2366
2367
|
};
|
|
2367
2368
|
//#endregion
|
|
2368
2369
|
//#region src/components/PageLoadingOverlay/ToteatLogo.tsx
|
|
2369
|
-
function
|
|
2370
|
+
function gi() {
|
|
2370
2371
|
return /* @__PURE__ */ f("div", {
|
|
2371
|
-
className:
|
|
2372
|
+
className: J.outer,
|
|
2372
2373
|
"aria-hidden": "true",
|
|
2373
2374
|
children: [
|
|
2374
|
-
/* @__PURE__ */ d("div", { className:
|
|
2375
|
-
/* @__PURE__ */ d("div", { className:
|
|
2376
|
-
/* @__PURE__ */ d("div", { className:
|
|
2375
|
+
/* @__PURE__ */ d("div", { className: J.ring }),
|
|
2376
|
+
/* @__PURE__ */ d("div", { className: J.ring }),
|
|
2377
|
+
/* @__PURE__ */ d("div", { className: J.ring }),
|
|
2377
2378
|
/* @__PURE__ */ d("div", {
|
|
2378
|
-
className:
|
|
2379
|
+
className: J.circle,
|
|
2379
2380
|
children: /* @__PURE__ */ f("svg", {
|
|
2380
|
-
className:
|
|
2381
|
+
className: J.logo,
|
|
2381
2382
|
viewBox: "0 0 80 80",
|
|
2382
2383
|
fill: "none",
|
|
2383
2384
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2384
2385
|
"aria-hidden": "true",
|
|
2385
2386
|
children: [/* @__PURE__ */ d("path", {
|
|
2386
|
-
className:
|
|
2387
|
+
className: J.pathDark,
|
|
2387
2388
|
d: "M47.328 24.999V10H32.329v14.999h-15v15h15v14.999h14.999V39.999h14.999V25z"
|
|
2388
2389
|
}), /* @__PURE__ */ d("path", {
|
|
2389
|
-
className:
|
|
2390
|
+
className: J.pathRed,
|
|
2390
2391
|
d: "M32.328 40a15 15 0 0 0 14.998 15h15v15H47.329a15 15 0 0 1-15-15z"
|
|
2391
2392
|
})]
|
|
2392
2393
|
})
|
|
@@ -2396,26 +2397,26 @@ function hi() {
|
|
|
2396
2397
|
}
|
|
2397
2398
|
//#endregion
|
|
2398
2399
|
//#region src/components/PageLoadingOverlay/PageLoadingOverlay.tsx
|
|
2399
|
-
function
|
|
2400
|
+
function _i({ isOpen: e, label: t = "Cargando…", "data-testid": n }) {
|
|
2400
2401
|
return j(/* @__PURE__ */ f(u, { children: [
|
|
2401
2402
|
/* @__PURE__ */ d("div", {
|
|
2402
|
-
className:
|
|
2403
|
+
className: hi.overlay,
|
|
2403
2404
|
"data-open": e,
|
|
2404
2405
|
role: "status",
|
|
2405
2406
|
"aria-live": "polite",
|
|
2406
2407
|
"aria-busy": e,
|
|
2407
2408
|
"aria-label": t,
|
|
2408
2409
|
"data-testid": n,
|
|
2409
|
-
children: /* @__PURE__ */ d(
|
|
2410
|
+
children: /* @__PURE__ */ d(mi, { active: e })
|
|
2410
2411
|
}),
|
|
2411
2412
|
/* @__PURE__ */ d("div", {
|
|
2412
|
-
className: `${
|
|
2413
|
+
className: `${hi.logoLayer} tot-ds-root`,
|
|
2413
2414
|
"data-open": e,
|
|
2414
2415
|
"aria-hidden": "true",
|
|
2415
|
-
children: /* @__PURE__ */ d(
|
|
2416
|
+
children: /* @__PURE__ */ d(gi, {})
|
|
2416
2417
|
}),
|
|
2417
2418
|
/* @__PURE__ */ d("span", {
|
|
2418
|
-
className:
|
|
2419
|
+
className: hi.srOnly,
|
|
2419
2420
|
"aria-live": "polite",
|
|
2420
2421
|
"aria-atomic": "true",
|
|
2421
2422
|
children: e ? t : ""
|
|
@@ -2424,15 +2425,15 @@ function gi({ isOpen: e, label: t = "Cargando…", "data-testid": n }) {
|
|
|
2424
2425
|
}
|
|
2425
2426
|
//#endregion
|
|
2426
2427
|
//#region src/components/PermissionGate/PermissionGate.tsx
|
|
2427
|
-
function
|
|
2428
|
+
function vi({ granted: e, children: t, fallback: n = null }) {
|
|
2428
2429
|
return /* @__PURE__ */ d(u, { children: e ? t : n });
|
|
2429
2430
|
}
|
|
2430
|
-
var
|
|
2431
|
+
var yi = { overlay: "_overlay_16mjb_2" };
|
|
2431
2432
|
//#endregion
|
|
2432
2433
|
//#region src/components/PinLockOverlay/PinLockOverlay.tsx
|
|
2433
|
-
function
|
|
2434
|
+
function bi({ isLocked: e, children: t, "data-testid": n }) {
|
|
2434
2435
|
return e ? /* @__PURE__ */ d("div", {
|
|
2435
|
-
className:
|
|
2436
|
+
className: yi.overlay,
|
|
2436
2437
|
role: "dialog",
|
|
2437
2438
|
"aria-label": "Pantalla bloqueada — ingresa tu PIN",
|
|
2438
2439
|
"aria-modal": "true",
|
|
@@ -2440,7 +2441,7 @@ function yi({ isLocked: e, children: t, "data-testid": n }) {
|
|
|
2440
2441
|
children: t
|
|
2441
2442
|
}) : null;
|
|
2442
2443
|
}
|
|
2443
|
-
var
|
|
2444
|
+
var xi = {
|
|
2444
2445
|
tile: "_tile_gu9b4_2",
|
|
2445
2446
|
image: "_image_gu9b4_45",
|
|
2446
2447
|
name: "_name_gu9b4_53",
|
|
@@ -2449,13 +2450,13 @@ var bi = {
|
|
|
2449
2450
|
};
|
|
2450
2451
|
//#endregion
|
|
2451
2452
|
//#region src/components/ProductTile/ProductTile.tsx
|
|
2452
|
-
function
|
|
2453
|
+
function Si({ product: e, onAdd: t, "data-testid": n }) {
|
|
2453
2454
|
let r;
|
|
2454
2455
|
e.stockStatus === "depleted" ? r = "depleted" : e.stockStatus === "low" && (r = "low");
|
|
2455
2456
|
let i = e.stockStatus === "depleted";
|
|
2456
2457
|
return /* @__PURE__ */ f("button", {
|
|
2457
2458
|
type: "button",
|
|
2458
|
-
className:
|
|
2459
|
+
className: xi.tile,
|
|
2459
2460
|
"data-stock": r,
|
|
2460
2461
|
onClick: () => {
|
|
2461
2462
|
i || t(e);
|
|
@@ -2468,34 +2469,34 @@ function xi({ product: e, onAdd: t, "data-testid": n }) {
|
|
|
2468
2469
|
e.imageUrl && /* @__PURE__ */ d("img", {
|
|
2469
2470
|
src: e.imageUrl,
|
|
2470
2471
|
alt: "",
|
|
2471
|
-
className:
|
|
2472
|
+
className: xi.image,
|
|
2472
2473
|
"aria-hidden": "true",
|
|
2473
2474
|
loading: "lazy"
|
|
2474
2475
|
}),
|
|
2475
2476
|
/* @__PURE__ */ d("span", {
|
|
2476
|
-
className:
|
|
2477
|
+
className: xi.name,
|
|
2477
2478
|
children: e.name
|
|
2478
2479
|
}),
|
|
2479
2480
|
/* @__PURE__ */ f("span", {
|
|
2480
|
-
className:
|
|
2481
|
+
className: xi.price,
|
|
2481
2482
|
children: ["$", e.price.toLocaleString("es-CL")]
|
|
2482
2483
|
}),
|
|
2483
2484
|
e.hasExtras && /* @__PURE__ */ d("span", {
|
|
2484
|
-
className:
|
|
2485
|
+
className: xi.badge,
|
|
2485
2486
|
"data-type": "extras",
|
|
2486
2487
|
role: "img",
|
|
2487
2488
|
"aria-label": "Tiene extras",
|
|
2488
2489
|
children: "+"
|
|
2489
2490
|
}),
|
|
2490
2491
|
e.isWeighed && /* @__PURE__ */ d("span", {
|
|
2491
|
-
className:
|
|
2492
|
+
className: xi.badge,
|
|
2492
2493
|
"data-type": "weighed",
|
|
2493
2494
|
role: "img",
|
|
2494
2495
|
"aria-label": "Producto por peso",
|
|
2495
2496
|
children: "kg"
|
|
2496
2497
|
}),
|
|
2497
2498
|
e.stockStatus === "low" && /* @__PURE__ */ d("span", {
|
|
2498
|
-
className:
|
|
2499
|
+
className: xi.badge,
|
|
2499
2500
|
"data-type": "low-stock",
|
|
2500
2501
|
role: "img",
|
|
2501
2502
|
"aria-label": "Stock bajo",
|
|
@@ -2504,7 +2505,7 @@ function xi({ product: e, onAdd: t, "data-testid": n }) {
|
|
|
2504
2505
|
]
|
|
2505
2506
|
});
|
|
2506
2507
|
}
|
|
2507
|
-
var
|
|
2508
|
+
var Ci = n(Si), wi = {
|
|
2508
2509
|
wrapper: "_wrapper_lqgoi_2",
|
|
2509
2510
|
input: "_input_lqgoi_9",
|
|
2510
2511
|
circle: "_circle_lqgoi_27",
|
|
@@ -2512,10 +2513,10 @@ var Si = n(xi), Ci = {
|
|
|
2512
2513
|
};
|
|
2513
2514
|
//#endregion
|
|
2514
2515
|
//#region src/components/Radio/Radio.tsx
|
|
2515
|
-
function
|
|
2516
|
+
function Ti({ label: e, className: t, id: n, ref: r, "data-testid": i, ...a }) {
|
|
2516
2517
|
let o = n ?? `radio-${a.value}`;
|
|
2517
2518
|
return /* @__PURE__ */ f("label", {
|
|
2518
|
-
className: [
|
|
2519
|
+
className: [wi.wrapper, t].filter(Boolean).join(" "),
|
|
2519
2520
|
htmlFor: o,
|
|
2520
2521
|
"data-testid": i,
|
|
2521
2522
|
children: [
|
|
@@ -2523,21 +2524,21 @@ function wi({ label: e, className: t, id: n, ref: r, "data-testid": i, ...a }) {
|
|
|
2523
2524
|
ref: r,
|
|
2524
2525
|
type: "radio",
|
|
2525
2526
|
id: o,
|
|
2526
|
-
className:
|
|
2527
|
+
className: wi.input,
|
|
2527
2528
|
...a
|
|
2528
2529
|
}),
|
|
2529
2530
|
/* @__PURE__ */ d("span", {
|
|
2530
|
-
className:
|
|
2531
|
+
className: wi.circle,
|
|
2531
2532
|
"aria-hidden": "true"
|
|
2532
2533
|
}),
|
|
2533
2534
|
e && /* @__PURE__ */ d("span", {
|
|
2534
|
-
className:
|
|
2535
|
+
className: wi.label,
|
|
2535
2536
|
children: e
|
|
2536
2537
|
})
|
|
2537
2538
|
]
|
|
2538
2539
|
});
|
|
2539
2540
|
}
|
|
2540
|
-
var
|
|
2541
|
+
var Ei = {
|
|
2541
2542
|
root: "_root_fxapc_2",
|
|
2542
2543
|
srOnly: "_srOnly_fxapc_8",
|
|
2543
2544
|
input: "_input_fxapc_20",
|
|
@@ -2545,18 +2546,18 @@ var Ti = {
|
|
|
2545
2546
|
};
|
|
2546
2547
|
//#endregion
|
|
2547
2548
|
//#region src/components/SearchInput/SearchInput.tsx
|
|
2548
|
-
function
|
|
2549
|
+
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
2550
|
let h = a(), g = o ?? h, _ = c(null);
|
|
2550
2551
|
function v() {
|
|
2551
2552
|
n ? n() : t(""), _.current?.focus();
|
|
2552
2553
|
}
|
|
2553
2554
|
return /* @__PURE__ */ f("div", {
|
|
2554
|
-
className: [
|
|
2555
|
+
className: [Ei.root, u].filter(Boolean).join(" "),
|
|
2555
2556
|
"data-testid": m,
|
|
2556
2557
|
children: [
|
|
2557
2558
|
/* @__PURE__ */ d("label", {
|
|
2558
2559
|
htmlFor: g,
|
|
2559
|
-
className:
|
|
2560
|
+
className: Ei.srOnly,
|
|
2560
2561
|
children: i
|
|
2561
2562
|
}),
|
|
2562
2563
|
/* @__PURE__ */ d("input", {
|
|
@@ -2564,7 +2565,7 @@ function Ei({ value: e, onChange: t, onClear: n, placeholder: r, label: i, id: o
|
|
|
2564
2565
|
ref: _,
|
|
2565
2566
|
id: g,
|
|
2566
2567
|
type: "search",
|
|
2567
|
-
className:
|
|
2568
|
+
className: Ei.input,
|
|
2568
2569
|
value: e,
|
|
2569
2570
|
onChange: (e) => t(e.target.value),
|
|
2570
2571
|
placeholder: r,
|
|
@@ -2572,7 +2573,7 @@ function Ei({ value: e, onChange: t, onClear: n, placeholder: r, label: i, id: o
|
|
|
2572
2573
|
}),
|
|
2573
2574
|
e.length > 0 && /* @__PURE__ */ d("button", {
|
|
2574
2575
|
type: "button",
|
|
2575
|
-
className:
|
|
2576
|
+
className: Ei.clearButton,
|
|
2576
2577
|
"aria-label": l,
|
|
2577
2578
|
disabled: s,
|
|
2578
2579
|
onClick: v,
|
|
@@ -2585,7 +2586,7 @@ function Ei({ value: e, onChange: t, onClear: n, placeholder: r, label: i, id: o
|
|
|
2585
2586
|
]
|
|
2586
2587
|
});
|
|
2587
2588
|
}
|
|
2588
|
-
var
|
|
2589
|
+
var Oi = {
|
|
2589
2590
|
root: "_root_1nkx3_2",
|
|
2590
2591
|
content: "_content_1nkx3_9",
|
|
2591
2592
|
iconWrap: "_iconWrap_1nkx3_16",
|
|
@@ -2596,15 +2597,15 @@ var Di = {
|
|
|
2596
2597
|
};
|
|
2597
2598
|
//#endregion
|
|
2598
2599
|
//#region src/components/SectionHeader/SectionHeader.tsx
|
|
2599
|
-
function
|
|
2600
|
+
function ki({ title: e, description: t, icon: n, iconSize: r = 32, headingLevel: i = 2, actions: a, className: o, "data-testid": s }) {
|
|
2600
2601
|
let c = `h${i}`;
|
|
2601
2602
|
return /* @__PURE__ */ f("header", {
|
|
2602
|
-
className: [
|
|
2603
|
+
className: [Oi.root, o].filter(Boolean).join(" "),
|
|
2603
2604
|
"data-testid": s,
|
|
2604
2605
|
children: [/* @__PURE__ */ f("div", {
|
|
2605
|
-
className:
|
|
2606
|
+
className: Oi.content,
|
|
2606
2607
|
children: [n && /* @__PURE__ */ d("span", {
|
|
2607
|
-
className:
|
|
2608
|
+
className: Oi.iconWrap,
|
|
2608
2609
|
"aria-hidden": "true",
|
|
2609
2610
|
children: /* @__PURE__ */ d(F, {
|
|
2610
2611
|
name: n,
|
|
@@ -2612,22 +2613,22 @@ function Oi({ title: e, description: t, icon: n, iconSize: r = 32, headingLevel:
|
|
|
2612
2613
|
"aria-hidden": "true"
|
|
2613
2614
|
})
|
|
2614
2615
|
}), /* @__PURE__ */ f("div", {
|
|
2615
|
-
className:
|
|
2616
|
+
className: Oi.text,
|
|
2616
2617
|
children: [/* @__PURE__ */ d(c, {
|
|
2617
|
-
className:
|
|
2618
|
+
className: Oi.title,
|
|
2618
2619
|
children: e
|
|
2619
2620
|
}), t && /* @__PURE__ */ d("p", {
|
|
2620
|
-
className:
|
|
2621
|
+
className: Oi.description,
|
|
2621
2622
|
children: t
|
|
2622
2623
|
})]
|
|
2623
2624
|
})]
|
|
2624
2625
|
}), a && /* @__PURE__ */ d("div", {
|
|
2625
|
-
className:
|
|
2626
|
+
className: Oi.actions,
|
|
2626
2627
|
children: a
|
|
2627
2628
|
})]
|
|
2628
2629
|
});
|
|
2629
2630
|
}
|
|
2630
|
-
var
|
|
2631
|
+
var Y = {
|
|
2631
2632
|
select: "_select_yvx76_2",
|
|
2632
2633
|
trigger: "_trigger_yvx76_7",
|
|
2633
2634
|
value: "_value_yvx76_61",
|
|
@@ -2640,8 +2641,8 @@ var X = {
|
|
|
2640
2641
|
};
|
|
2641
2642
|
//#endregion
|
|
2642
2643
|
//#region src/components/Select/Select.tsx
|
|
2643
|
-
function
|
|
2644
|
-
let [h, g] = l(""), { isOpen: _, containerRef: v, triggerRef: y, toggle: b, close: x, closeAndFocusTrigger: S } =
|
|
2644
|
+
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 }) {
|
|
2645
|
+
let [h, g] = l(""), { isOpen: _, containerRef: v, triggerRef: y, toggle: b, close: x, closeAndFocusTrigger: S } = ur({
|
|
2645
2646
|
disabled: c,
|
|
2646
2647
|
closeOnOutsideClick: !1
|
|
2647
2648
|
}), C = e.find((e) => e.value === t), w = a ? e.filter((e) => e.label.toLowerCase().includes(h.toLowerCase())) : e;
|
|
@@ -2663,7 +2664,7 @@ function ki({ options: e, value: t, onChange: n, placeholder: r = "Seleccionar..
|
|
|
2663
2664
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
2664
2665
|
}, [_, S]), /* @__PURE__ */ f("div", {
|
|
2665
2666
|
ref: v,
|
|
2666
|
-
className:
|
|
2667
|
+
className: Y.select,
|
|
2667
2668
|
"data-open": _ || void 0,
|
|
2668
2669
|
"data-error": u || void 0,
|
|
2669
2670
|
"data-disabled": c || void 0,
|
|
@@ -2677,16 +2678,16 @@ function ki({ options: e, value: t, onChange: n, placeholder: r = "Seleccionar..
|
|
|
2677
2678
|
/* @__PURE__ */ f("button", {
|
|
2678
2679
|
ref: y,
|
|
2679
2680
|
type: "button",
|
|
2680
|
-
className:
|
|
2681
|
+
className: Y.trigger,
|
|
2681
2682
|
onClick: b,
|
|
2682
2683
|
"aria-haspopup": "listbox",
|
|
2683
2684
|
"aria-expanded": _,
|
|
2684
2685
|
disabled: c,
|
|
2685
2686
|
children: [/* @__PURE__ */ d("span", {
|
|
2686
|
-
className: C ?
|
|
2687
|
+
className: C ? Y.value : Y.placeholder,
|
|
2687
2688
|
children: C?.label ?? r
|
|
2688
2689
|
}), /* @__PURE__ */ d("span", {
|
|
2689
|
-
className:
|
|
2690
|
+
className: Y.chevron,
|
|
2690
2691
|
"aria-hidden": "true",
|
|
2691
2692
|
children: /* @__PURE__ */ d(F, {
|
|
2692
2693
|
name: "chevron-down-outline",
|
|
@@ -2696,12 +2697,12 @@ function ki({ options: e, value: t, onChange: n, placeholder: r = "Seleccionar..
|
|
|
2696
2697
|
})]
|
|
2697
2698
|
}),
|
|
2698
2699
|
_ && /* @__PURE__ */ f("div", {
|
|
2699
|
-
className:
|
|
2700
|
+
className: Y.dropdown,
|
|
2700
2701
|
role: "listbox",
|
|
2701
2702
|
children: [
|
|
2702
2703
|
a && /* @__PURE__ */ d("input", {
|
|
2703
2704
|
type: "text",
|
|
2704
|
-
className:
|
|
2705
|
+
className: Y.search,
|
|
2705
2706
|
placeholder: o,
|
|
2706
2707
|
"aria-label": o,
|
|
2707
2708
|
value: h,
|
|
@@ -2712,7 +2713,7 @@ function ki({ options: e, value: t, onChange: n, placeholder: r = "Seleccionar..
|
|
|
2712
2713
|
type: "button",
|
|
2713
2714
|
role: "option",
|
|
2714
2715
|
"aria-selected": e.value === t,
|
|
2715
|
-
className:
|
|
2716
|
+
className: Y.option,
|
|
2716
2717
|
"data-selected": e.value === t || void 0,
|
|
2717
2718
|
disabled: e.disabled,
|
|
2718
2719
|
onClick: () => {
|
|
@@ -2721,7 +2722,7 @@ function ki({ options: e, value: t, onChange: n, placeholder: r = "Seleccionar..
|
|
|
2721
2722
|
children: e.label
|
|
2722
2723
|
}, e.value)),
|
|
2723
2724
|
w.length === 0 && /* @__PURE__ */ d("div", {
|
|
2724
|
-
className:
|
|
2725
|
+
className: Y.noResults,
|
|
2725
2726
|
children: s
|
|
2726
2727
|
})
|
|
2727
2728
|
]
|
|
@@ -2729,35 +2730,35 @@ function ki({ options: e, value: t, onChange: n, placeholder: r = "Seleccionar..
|
|
|
2729
2730
|
]
|
|
2730
2731
|
});
|
|
2731
2732
|
}
|
|
2732
|
-
var
|
|
2733
|
+
var ji = {
|
|
2733
2734
|
backdrop: "_backdrop_e6k21_2",
|
|
2734
2735
|
sidebar: "_sidebar_e6k21_19"
|
|
2735
2736
|
};
|
|
2736
2737
|
//#endregion
|
|
2737
2738
|
//#region src/components/Sidebar/Sidebar.tsx
|
|
2738
|
-
function
|
|
2739
|
+
function Mi({ isOpen: e, onClose: t, isPinLocked: n = !1, isModal: r = !1, children: i }) {
|
|
2739
2740
|
return n || r ? null : /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", {
|
|
2740
|
-
className:
|
|
2741
|
+
className: ji.backdrop,
|
|
2741
2742
|
"data-open": e,
|
|
2742
2743
|
"data-testid": "sidebar-backdrop",
|
|
2743
2744
|
onClick: t,
|
|
2744
2745
|
role: "presentation",
|
|
2745
2746
|
"aria-hidden": "true"
|
|
2746
2747
|
}), /* @__PURE__ */ d("nav", {
|
|
2747
|
-
className:
|
|
2748
|
+
className: ji.sidebar,
|
|
2748
2749
|
"data-open": e,
|
|
2749
2750
|
"aria-label": "Menú principal",
|
|
2750
2751
|
children: i
|
|
2751
2752
|
})] });
|
|
2752
2753
|
}
|
|
2753
|
-
var
|
|
2754
|
+
var Ni = {
|
|
2754
2755
|
item: "_item_1twlt_2",
|
|
2755
2756
|
active: "_active_1twlt_33"
|
|
2756
|
-
},
|
|
2757
|
-
function
|
|
2757
|
+
}, Pi = Ni.item, Fi = Ni.active;
|
|
2758
|
+
function Ii({ label: e, isActive: t = !1, className: n, type: r = "button", ...i }) {
|
|
2758
2759
|
return /* @__PURE__ */ d("button", {
|
|
2759
2760
|
type: r,
|
|
2760
|
-
className: L(
|
|
2761
|
+
className: L(Ni.item, t && Ni.active, n),
|
|
2761
2762
|
"data-active": t || void 0,
|
|
2762
2763
|
...i,
|
|
2763
2764
|
children: e
|
|
@@ -2765,7 +2766,7 @@ function Fi({ label: e, isActive: t = !1, className: n, type: r = "button", ...i
|
|
|
2765
2766
|
}
|
|
2766
2767
|
//#endregion
|
|
2767
2768
|
//#region src/hooks/useToggle.ts
|
|
2768
|
-
function
|
|
2769
|
+
function Li(e = !1) {
|
|
2769
2770
|
let [t, n] = l(e);
|
|
2770
2771
|
return [
|
|
2771
2772
|
t,
|
|
@@ -2773,7 +2774,7 @@ function Ii(e = !1) {
|
|
|
2773
2774
|
n
|
|
2774
2775
|
];
|
|
2775
2776
|
}
|
|
2776
|
-
var
|
|
2777
|
+
var X = {
|
|
2777
2778
|
section: "_section_gn76y_2",
|
|
2778
2779
|
trigger: "_trigger_gn76y_7",
|
|
2779
2780
|
icon: "_icon_gn76y_44",
|
|
@@ -2785,44 +2786,44 @@ var Z = {
|
|
|
2785
2786
|
};
|
|
2786
2787
|
//#endregion
|
|
2787
2788
|
//#region src/components/SidebarNavSection/SidebarNavSection.tsx
|
|
2788
|
-
function
|
|
2789
|
-
let [c, l] =
|
|
2789
|
+
function Ri({ title: e, icon: t, titleSuffix: n, defaultOpen: r = !1, isActive: i = !1, className: a, children: o, "data-testid": s }) {
|
|
2790
|
+
let [c, l] = Li(r);
|
|
2790
2791
|
return /* @__PURE__ */ f("div", {
|
|
2791
|
-
className: L(
|
|
2792
|
+
className: L(X.section, a),
|
|
2792
2793
|
"data-testid": s,
|
|
2793
2794
|
children: [/* @__PURE__ */ f("button", {
|
|
2794
2795
|
type: "button",
|
|
2795
|
-
className:
|
|
2796
|
+
className: X.trigger,
|
|
2796
2797
|
"data-open": c || void 0,
|
|
2797
2798
|
"data-active": i || void 0,
|
|
2798
2799
|
onClick: l,
|
|
2799
2800
|
"aria-expanded": c,
|
|
2800
2801
|
children: [
|
|
2801
2802
|
t && /* @__PURE__ */ d("span", {
|
|
2802
|
-
className:
|
|
2803
|
+
className: X.icon,
|
|
2803
2804
|
"aria-hidden": "true",
|
|
2804
2805
|
children: t
|
|
2805
2806
|
}),
|
|
2806
2807
|
/* @__PURE__ */ d("span", {
|
|
2807
|
-
className:
|
|
2808
|
+
className: X.title,
|
|
2808
2809
|
children: e
|
|
2809
2810
|
}),
|
|
2810
2811
|
n && /* @__PURE__ */ d("span", {
|
|
2811
|
-
className:
|
|
2812
|
+
className: X.suffix,
|
|
2812
2813
|
"aria-hidden": "true",
|
|
2813
2814
|
children: n
|
|
2814
2815
|
}),
|
|
2815
2816
|
/* @__PURE__ */ d("span", {
|
|
2816
|
-
className:
|
|
2817
|
+
className: X.chevron,
|
|
2817
2818
|
"aria-hidden": "true"
|
|
2818
2819
|
})
|
|
2819
2820
|
]
|
|
2820
2821
|
}), /* @__PURE__ */ d("div", {
|
|
2821
|
-
className:
|
|
2822
|
+
className: X.content,
|
|
2822
2823
|
"data-open": c || void 0,
|
|
2823
2824
|
inert: !c || void 0,
|
|
2824
2825
|
children: /* @__PURE__ */ d("div", {
|
|
2825
|
-
className:
|
|
2826
|
+
className: X.inner,
|
|
2826
2827
|
children: o
|
|
2827
2828
|
})
|
|
2828
2829
|
})]
|
|
@@ -2830,7 +2831,7 @@ function Li({ title: e, icon: t, titleSuffix: n, defaultOpen: r = !1, isActive:
|
|
|
2830
2831
|
}
|
|
2831
2832
|
//#endregion
|
|
2832
2833
|
//#region src/components/StatusBadge/StatusBadge.tsx
|
|
2833
|
-
function
|
|
2834
|
+
function zi({ status: e, labels: t, variants: n, fallbackLabel: r, fallbackVariant: i = "default", size: a, "data-testid": o }) {
|
|
2834
2835
|
return /* @__PURE__ */ d(In, {
|
|
2835
2836
|
variant: n[e] ?? i,
|
|
2836
2837
|
size: a,
|
|
@@ -2838,26 +2839,76 @@ function Ri({ status: e, labels: t, variants: n, fallbackLabel: r, fallbackVaria
|
|
|
2838
2839
|
children: t[e] ?? r ?? e
|
|
2839
2840
|
});
|
|
2840
2841
|
}
|
|
2841
|
-
|
|
2842
|
+
//#endregion
|
|
2843
|
+
//#region src/components/UserNotification/NotificationBase.tsx
|
|
2844
|
+
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 }) {
|
|
2845
|
+
let p = e === "error";
|
|
2846
|
+
return /* @__PURE__ */ f("div", {
|
|
2847
|
+
className: [t, s].filter(Boolean).join(" "),
|
|
2848
|
+
"data-variant": e,
|
|
2849
|
+
role: p ? "alert" : "status",
|
|
2850
|
+
"aria-live": p ? "assertive" : "polite",
|
|
2851
|
+
"aria-atomic": u ? "true" : void 0,
|
|
2852
|
+
"data-testid": c,
|
|
2853
|
+
children: [
|
|
2854
|
+
i && /* @__PURE__ */ d(F, {
|
|
2855
|
+
name: i,
|
|
2856
|
+
size: 20,
|
|
2857
|
+
"aria-hidden": "true"
|
|
2858
|
+
}),
|
|
2859
|
+
/* @__PURE__ */ d("span", {
|
|
2860
|
+
className: n,
|
|
2861
|
+
children: o
|
|
2862
|
+
}),
|
|
2863
|
+
a && /* @__PURE__ */ d("span", {
|
|
2864
|
+
className: r,
|
|
2865
|
+
children: a
|
|
2866
|
+
}),
|
|
2867
|
+
l
|
|
2868
|
+
]
|
|
2869
|
+
});
|
|
2870
|
+
}
|
|
2871
|
+
var Vi = {
|
|
2872
|
+
statusBanner: "_statusBanner_azeha_2",
|
|
2873
|
+
content: "_content_azeha_40",
|
|
2874
|
+
action: "_action_azeha_45"
|
|
2875
|
+
};
|
|
2876
|
+
//#endregion
|
|
2877
|
+
//#region src/components/StatusBanner/StatusBanner.tsx
|
|
2878
|
+
function Hi({ variant: e = "info", icon: t, action: n, children: r, className: i, "data-testid": a }) {
|
|
2879
|
+
return /* @__PURE__ */ d(Bi, {
|
|
2880
|
+
variant: e,
|
|
2881
|
+
rootClassName: Vi.statusBanner,
|
|
2882
|
+
contentClassName: Vi.content,
|
|
2883
|
+
actionClassName: Vi.action,
|
|
2884
|
+
icon: t,
|
|
2885
|
+
action: n,
|
|
2886
|
+
className: i,
|
|
2887
|
+
"data-testid": a,
|
|
2888
|
+
ariaAtomic: !0,
|
|
2889
|
+
children: r
|
|
2890
|
+
});
|
|
2891
|
+
}
|
|
2892
|
+
var Ui = {
|
|
2842
2893
|
stepper: "_stepper_16r3t_2",
|
|
2843
2894
|
button: "_button_16r3t_8",
|
|
2844
2895
|
output: "_output_16r3t_46"
|
|
2845
2896
|
};
|
|
2846
2897
|
//#endregion
|
|
2847
2898
|
//#region src/components/Stepper/Stepper.tsx
|
|
2848
|
-
function
|
|
2899
|
+
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
2900
|
let p = a || e <= n, m = a || e >= r;
|
|
2850
2901
|
return /* @__PURE__ */ f("div", {
|
|
2851
2902
|
role: "group",
|
|
2852
2903
|
"aria-label": o,
|
|
2853
|
-
className: [
|
|
2904
|
+
className: [Ui.stepper, l].filter(Boolean).join(" "),
|
|
2854
2905
|
"data-testid": u,
|
|
2855
2906
|
children: [
|
|
2856
2907
|
/* @__PURE__ */ d("button", {
|
|
2857
2908
|
type: "button",
|
|
2858
2909
|
"aria-label": s,
|
|
2859
2910
|
disabled: p,
|
|
2860
|
-
className:
|
|
2911
|
+
className: Ui.button,
|
|
2861
2912
|
onClick: () => t(Math.max(n, e - i)),
|
|
2862
2913
|
children: /* @__PURE__ */ d(F, {
|
|
2863
2914
|
name: "minus-filled",
|
|
@@ -2866,7 +2917,7 @@ function Bi({ value: e, onChange: t, min: n = 0, max: r = 2 ** 53 - 1, step: i =
|
|
|
2866
2917
|
})
|
|
2867
2918
|
}),
|
|
2868
2919
|
/* @__PURE__ */ d("output", {
|
|
2869
|
-
className:
|
|
2920
|
+
className: Ui.output,
|
|
2870
2921
|
"aria-live": "polite",
|
|
2871
2922
|
children: e
|
|
2872
2923
|
}),
|
|
@@ -2874,7 +2925,7 @@ function Bi({ value: e, onChange: t, min: n = 0, max: r = 2 ** 53 - 1, step: i =
|
|
|
2874
2925
|
type: "button",
|
|
2875
2926
|
"aria-label": c,
|
|
2876
2927
|
disabled: m,
|
|
2877
|
-
className:
|
|
2928
|
+
className: Ui.button,
|
|
2878
2929
|
onClick: () => t(Math.min(r, e + i)),
|
|
2879
2930
|
children: /* @__PURE__ */ d(F, {
|
|
2880
2931
|
name: "plus-filled",
|
|
@@ -2885,29 +2936,30 @@ function Bi({ value: e, onChange: t, min: n = 0, max: r = 2 ** 53 - 1, step: i =
|
|
|
2885
2936
|
]
|
|
2886
2937
|
});
|
|
2887
2938
|
}
|
|
2888
|
-
var
|
|
2939
|
+
var Gi = {
|
|
2889
2940
|
tab: "_tab_1g43g_3",
|
|
2890
2941
|
group: "_group_1g43g_20"
|
|
2891
2942
|
};
|
|
2892
2943
|
//#endregion
|
|
2893
2944
|
//#region src/components/Tab/Tab.tsx
|
|
2894
|
-
function
|
|
2945
|
+
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
2946
|
let [p, m] = l(() => e[0]?.value), h = n !== void 0, g = h ? n : p, _ = c(h);
|
|
2896
2947
|
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
2948
|
let v = e.map((e) => ({
|
|
2898
2949
|
value: e.value,
|
|
2899
2950
|
label: e.label,
|
|
2900
2951
|
disabled: e.disabled,
|
|
2901
|
-
icon: e.icon
|
|
2952
|
+
icon: e.icon,
|
|
2953
|
+
"data-testid": e["data-testid"]
|
|
2902
2954
|
}));
|
|
2903
2955
|
return /* @__PURE__ */ d("div", {
|
|
2904
|
-
className: [
|
|
2956
|
+
className: [Gi.tab, u].filter(Boolean).join(" "),
|
|
2905
2957
|
"data-size": r,
|
|
2906
2958
|
"data-full-width": i ? "" : void 0,
|
|
2907
2959
|
"data-selected-color": a,
|
|
2908
2960
|
"data-testid": f,
|
|
2909
|
-
children: /* @__PURE__ */ d(
|
|
2910
|
-
className:
|
|
2961
|
+
children: /* @__PURE__ */ d(zr, {
|
|
2962
|
+
className: Gi.group,
|
|
2911
2963
|
label: t,
|
|
2912
2964
|
options: v,
|
|
2913
2965
|
selectedButton: g,
|
|
@@ -2924,19 +2976,19 @@ function Hi({ tabs: e, label: t, selectedTab: n, size: r = "medium", fullWidth:
|
|
|
2924
2976
|
})
|
|
2925
2977
|
});
|
|
2926
2978
|
}
|
|
2927
|
-
var
|
|
2979
|
+
var qi = { tabbar: "_tabbar_qy5zr_2" };
|
|
2928
2980
|
//#endregion
|
|
2929
2981
|
//#region src/components/TabBar/TabBar.tsx
|
|
2930
|
-
function
|
|
2982
|
+
function Ji({ variant: e = "default", children: t, "data-testid": n }) {
|
|
2931
2983
|
return /* @__PURE__ */ d("div", {
|
|
2932
|
-
className:
|
|
2984
|
+
className: qi.tabbar,
|
|
2933
2985
|
role: "tablist",
|
|
2934
2986
|
"data-variant": e,
|
|
2935
2987
|
"data-testid": n,
|
|
2936
2988
|
children: t
|
|
2937
2989
|
});
|
|
2938
2990
|
}
|
|
2939
|
-
var
|
|
2991
|
+
var Yi = {
|
|
2940
2992
|
tabs: "_tabs_zujvo_2",
|
|
2941
2993
|
tabList: "_tabList_zujvo_8",
|
|
2942
2994
|
tab: "_tab_zujvo_2",
|
|
@@ -2944,7 +2996,7 @@ var Gi = {
|
|
|
2944
2996
|
};
|
|
2945
2997
|
//#endregion
|
|
2946
2998
|
//#region src/components/Tabs/Tabs.tsx
|
|
2947
|
-
function
|
|
2999
|
+
function Xi({ items: e, defaultTab: t, activeTab: n, "aria-label": r, onChange: i, "data-testid": a }) {
|
|
2948
3000
|
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
3001
|
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
3002
|
let g = (e) => {
|
|
@@ -2954,10 +3006,10 @@ function Ki({ items: e, defaultTab: t, activeTab: n, "aria-label": r, onChange:
|
|
|
2954
3006
|
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
3007
|
}, v = e.find((e) => e.id === p)?.content;
|
|
2956
3008
|
return /* @__PURE__ */ f("div", {
|
|
2957
|
-
className:
|
|
3009
|
+
className: Yi.tabs,
|
|
2958
3010
|
"data-testid": a,
|
|
2959
3011
|
children: [/* @__PURE__ */ d("div", {
|
|
2960
|
-
className:
|
|
3012
|
+
className: Yi.tabList,
|
|
2961
3013
|
role: "tablist",
|
|
2962
3014
|
"aria-label": r,
|
|
2963
3015
|
children: e.map((e, t) => /* @__PURE__ */ d("button", {
|
|
@@ -2969,7 +3021,7 @@ function Ki({ items: e, defaultTab: t, activeTab: n, "aria-label": r, onChange:
|
|
|
2969
3021
|
"aria-selected": e.id === p,
|
|
2970
3022
|
"aria-controls": v == null ? void 0 : `panel-${p}`,
|
|
2971
3023
|
id: `tab-${e.id}`,
|
|
2972
|
-
className:
|
|
3024
|
+
className: Yi.tab,
|
|
2973
3025
|
"data-active": e.id === p || void 0,
|
|
2974
3026
|
disabled: e.disabled,
|
|
2975
3027
|
tabIndex: e.id === p ? 0 : -1,
|
|
@@ -2981,25 +3033,25 @@ function Ki({ items: e, defaultTab: t, activeTab: n, "aria-label": r, onChange:
|
|
|
2981
3033
|
role: "tabpanel",
|
|
2982
3034
|
id: `panel-${p}`,
|
|
2983
3035
|
"aria-labelledby": `tab-${p}`,
|
|
2984
|
-
className:
|
|
3036
|
+
className: Yi.panel,
|
|
2985
3037
|
children: v
|
|
2986
3038
|
})]
|
|
2987
3039
|
});
|
|
2988
3040
|
}
|
|
2989
|
-
var
|
|
3041
|
+
var Zi = { textarea: "_textarea_1vuas_2" };
|
|
2990
3042
|
//#endregion
|
|
2991
3043
|
//#region src/components/Textarea/Textarea.tsx
|
|
2992
|
-
function
|
|
3044
|
+
function Qi({ error: e, className: t, rows: n = 3, ref: r, ...i }) {
|
|
2993
3045
|
return /* @__PURE__ */ d("textarea", {
|
|
2994
3046
|
ref: r,
|
|
2995
3047
|
rows: n,
|
|
2996
|
-
className: [
|
|
3048
|
+
className: [Zi.textarea, t].filter(Boolean).join(" "),
|
|
2997
3049
|
"data-error": e ? "" : void 0,
|
|
2998
3050
|
"aria-invalid": e || void 0,
|
|
2999
3051
|
...i
|
|
3000
3052
|
});
|
|
3001
3053
|
}
|
|
3002
|
-
var
|
|
3054
|
+
var Z = {
|
|
3003
3055
|
input: "_input_8nxer_3",
|
|
3004
3056
|
root: "_root_8nxer_65",
|
|
3005
3057
|
field: "_field_8nxer_74",
|
|
@@ -3013,26 +3065,26 @@ var Q = {
|
|
|
3013
3065
|
meta: "_meta_8nxer_224",
|
|
3014
3066
|
messages: "_messages_8nxer_235",
|
|
3015
3067
|
error: "_error_8nxer_273"
|
|
3016
|
-
},
|
|
3068
|
+
}, $i = {
|
|
3017
3069
|
success: "success-filled-green",
|
|
3018
3070
|
warning: "warning-outline",
|
|
3019
3071
|
error: "error-filled-red"
|
|
3020
|
-
},
|
|
3072
|
+
}, ea = {
|
|
3021
3073
|
small: 16,
|
|
3022
3074
|
medium: 20,
|
|
3023
3075
|
large: 24
|
|
3024
3076
|
};
|
|
3025
|
-
function
|
|
3077
|
+
function ta(e, t) {
|
|
3026
3078
|
return e === void 0 ? t ? "error" : "default" : e;
|
|
3027
3079
|
}
|
|
3028
|
-
var
|
|
3080
|
+
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
3081
|
let oe = a(), se = O ?? oe, N = c(null);
|
|
3030
3082
|
o(ae, () => N.current, []);
|
|
3031
|
-
let [ce, le] = l(!1), ue = D === "password", de = ue && ce ? "text" : D, fe =
|
|
3083
|
+
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
3084
|
ne,
|
|
3033
3085
|
ge,
|
|
3034
3086
|
_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" ?
|
|
3087
|
+
].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
3088
|
if (j || M) return;
|
|
3037
3089
|
let e = N.current;
|
|
3038
3090
|
e && A && ((Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")?.set)?.call(e, ""), e.dispatchEvent(new Event("input", { bubbles: !0 }))), y?.(), N.current?.focus();
|
|
@@ -3044,7 +3096,7 @@ var Qi = t(function({ size: e = "medium", error: t = !1, showPasswordToggle: n =
|
|
|
3044
3096
|
]), ke = !!i || Ee || !!g || we || xe || Se || !!Ce || T, Ae = /* @__PURE__ */ d("input", {
|
|
3045
3097
|
ref: N,
|
|
3046
3098
|
id: se,
|
|
3047
|
-
className: ke ?
|
|
3099
|
+
className: ke ? Z.input : [Z.input, E].filter(Boolean).join(" "),
|
|
3048
3100
|
type: de,
|
|
3049
3101
|
value: k,
|
|
3050
3102
|
onChange: A,
|
|
@@ -3062,7 +3114,7 @@ var Qi = t(function({ size: e = "medium", error: t = !1, showPasswordToggle: n =
|
|
|
3062
3114
|
...ie
|
|
3063
3115
|
});
|
|
3064
3116
|
return ke ? /* @__PURE__ */ f("div", {
|
|
3065
|
-
className: [
|
|
3117
|
+
className: [Z.root, E].filter(Boolean).join(" "),
|
|
3066
3118
|
"data-size": e,
|
|
3067
3119
|
"data-status": fe,
|
|
3068
3120
|
"data-disabled": j || void 0,
|
|
@@ -3071,26 +3123,26 @@ var Qi = t(function({ size: e = "medium", error: t = !1, showPasswordToggle: n =
|
|
|
3071
3123
|
children: [
|
|
3072
3124
|
i && /* @__PURE__ */ f("label", {
|
|
3073
3125
|
htmlFor: se,
|
|
3074
|
-
className:
|
|
3126
|
+
className: Z.label,
|
|
3075
3127
|
children: [/* @__PURE__ */ d("span", { children: i }), s && /* @__PURE__ */ d("span", {
|
|
3076
|
-
className:
|
|
3128
|
+
className: Z.required,
|
|
3077
3129
|
"aria-hidden": "true",
|
|
3078
3130
|
children: "*"
|
|
3079
3131
|
})]
|
|
3080
3132
|
}),
|
|
3081
3133
|
/* @__PURE__ */ f("div", {
|
|
3082
|
-
className:
|
|
3134
|
+
className: Z.field,
|
|
3083
3135
|
children: [
|
|
3084
3136
|
g && /* @__PURE__ */ d(F, {
|
|
3085
3137
|
name: g,
|
|
3086
3138
|
size: De,
|
|
3087
3139
|
"aria-hidden": "true",
|
|
3088
|
-
className:
|
|
3140
|
+
className: Z.adornment
|
|
3089
3141
|
}),
|
|
3090
3142
|
Ae,
|
|
3091
3143
|
xe && /* @__PURE__ */ d("button", {
|
|
3092
3144
|
type: "button",
|
|
3093
|
-
className:
|
|
3145
|
+
className: Z.actionButton,
|
|
3094
3146
|
"aria-label": b,
|
|
3095
3147
|
onClick: Oe,
|
|
3096
3148
|
children: /* @__PURE__ */ d(F, {
|
|
@@ -3101,7 +3153,7 @@ var Qi = t(function({ size: e = "medium", error: t = !1, showPasswordToggle: n =
|
|
|
3101
3153
|
}),
|
|
3102
3154
|
Se && /* @__PURE__ */ d("button", {
|
|
3103
3155
|
type: "button",
|
|
3104
|
-
className:
|
|
3156
|
+
className: Z.actionButton,
|
|
3105
3157
|
"aria-label": ce ? S : x,
|
|
3106
3158
|
"aria-pressed": ce,
|
|
3107
3159
|
disabled: j,
|
|
@@ -3116,35 +3168,35 @@ var Qi = t(function({ size: e = "medium", error: t = !1, showPasswordToggle: n =
|
|
|
3116
3168
|
name: _,
|
|
3117
3169
|
size: De,
|
|
3118
3170
|
"aria-hidden": "true",
|
|
3119
|
-
className:
|
|
3171
|
+
className: Z.adornment
|
|
3120
3172
|
}),
|
|
3121
3173
|
Ce && /* @__PURE__ */ d(F, {
|
|
3122
3174
|
name: Ce,
|
|
3123
3175
|
size: De,
|
|
3124
3176
|
"aria-hidden": "true",
|
|
3125
|
-
className:
|
|
3177
|
+
className: Z.statusIcon
|
|
3126
3178
|
})
|
|
3127
3179
|
]
|
|
3128
3180
|
}),
|
|
3129
3181
|
Ee && /* @__PURE__ */ f("div", {
|
|
3130
|
-
className:
|
|
3182
|
+
className: Z.meta,
|
|
3131
3183
|
"data-helper-align": h,
|
|
3132
3184
|
"data-has-both": (he || P) && Te ? "" : void 0,
|
|
3133
3185
|
children: [(he || P) && /* @__PURE__ */ f("div", {
|
|
3134
|
-
className:
|
|
3186
|
+
className: Z.messages,
|
|
3135
3187
|
children: [he && /* @__PURE__ */ d("p", {
|
|
3136
3188
|
id: ge,
|
|
3137
|
-
className:
|
|
3189
|
+
className: Z.helper,
|
|
3138
3190
|
children: m
|
|
3139
3191
|
}), P && /* @__PURE__ */ d("p", {
|
|
3140
3192
|
id: _e,
|
|
3141
|
-
className:
|
|
3193
|
+
className: Z.error,
|
|
3142
3194
|
role: "alert",
|
|
3143
3195
|
"aria-live": "polite",
|
|
3144
3196
|
children: me
|
|
3145
3197
|
})]
|
|
3146
3198
|
}), Te && /* @__PURE__ */ f("span", {
|
|
3147
|
-
className:
|
|
3199
|
+
className: Z.counter,
|
|
3148
3200
|
children: [be, typeof ee == "number" && `/${ee}`]
|
|
3149
3201
|
})]
|
|
3150
3202
|
})
|
|
@@ -3153,7 +3205,7 @@ var Qi = t(function({ size: e = "medium", error: t = !1, showPasswordToggle: n =
|
|
|
3153
3205
|
});
|
|
3154
3206
|
//#endregion
|
|
3155
3207
|
//#region src/components/ThemeGate/ThemeGate.tsx
|
|
3156
|
-
function
|
|
3208
|
+
function ra({ theme: e, children: t, className: n, "data-testid": r }) {
|
|
3157
3209
|
return /* @__PURE__ */ d("div", {
|
|
3158
3210
|
"data-theme": e,
|
|
3159
3211
|
className: n,
|
|
@@ -3161,49 +3213,49 @@ function $i({ theme: e, children: t, className: n, "data-testid": r }) {
|
|
|
3161
3213
|
children: t
|
|
3162
3214
|
});
|
|
3163
3215
|
}
|
|
3164
|
-
var
|
|
3216
|
+
var ia = {
|
|
3165
3217
|
container: "_container_18wzq_2",
|
|
3166
3218
|
toast: "_toast_18wzq_22",
|
|
3167
3219
|
"ds-toast-enter": "_ds-toast-enter_18wzq_1",
|
|
3168
3220
|
toastMessage: "_toastMessage_18wzq_61",
|
|
3169
3221
|
dismissButton: "_dismissButton_18wzq_65"
|
|
3170
|
-
},
|
|
3171
|
-
function
|
|
3172
|
-
for (let e of
|
|
3222
|
+
}, aa = [], oa = /* @__PURE__ */ new Set(), sa = 0;
|
|
3223
|
+
function ca() {
|
|
3224
|
+
for (let e of oa) e([...aa]);
|
|
3173
3225
|
}
|
|
3174
|
-
function
|
|
3175
|
-
let t = `toast-${++
|
|
3176
|
-
return
|
|
3226
|
+
function la(e) {
|
|
3227
|
+
let t = `toast-${++sa}-${Date.now()}`;
|
|
3228
|
+
return aa = [...aa, {
|
|
3177
3229
|
id: t,
|
|
3178
3230
|
message: e.message,
|
|
3179
3231
|
variant: e.variant ?? "info",
|
|
3180
3232
|
duration: e.duration,
|
|
3181
3233
|
dismissible: e.dismissible,
|
|
3182
3234
|
"data-testid": e["data-testid"]
|
|
3183
|
-
}],
|
|
3235
|
+
}], ca(), t;
|
|
3184
3236
|
}
|
|
3185
|
-
function
|
|
3186
|
-
|
|
3237
|
+
function ua(e) {
|
|
3238
|
+
aa = aa.filter((t) => t.id !== e), ca();
|
|
3187
3239
|
}
|
|
3188
|
-
function
|
|
3189
|
-
let [e, t] = l(
|
|
3240
|
+
function da() {
|
|
3241
|
+
let [e, t] = l(aa), n = c(!0);
|
|
3190
3242
|
return i(() => {
|
|
3191
3243
|
n.current = !0;
|
|
3192
3244
|
let e = (e) => {
|
|
3193
3245
|
n.current && t(e);
|
|
3194
3246
|
};
|
|
3195
|
-
return
|
|
3196
|
-
n.current = !1,
|
|
3247
|
+
return oa.add(e), () => {
|
|
3248
|
+
n.current = !1, oa.delete(e);
|
|
3197
3249
|
};
|
|
3198
3250
|
}, []), {
|
|
3199
3251
|
toasts: e,
|
|
3200
|
-
addToast: r((e) =>
|
|
3201
|
-
dismissToast: r((e) =>
|
|
3252
|
+
addToast: r((e) => la(e), []),
|
|
3253
|
+
dismissToast: r((e) => ua(e), [])
|
|
3202
3254
|
};
|
|
3203
3255
|
}
|
|
3204
3256
|
//#endregion
|
|
3205
3257
|
//#region src/components/Toast/Toast.tsx
|
|
3206
|
-
function
|
|
3258
|
+
function fa({ toast: e, onDismiss: t, dismissLabel: n = "Cerrar notificación" }) {
|
|
3207
3259
|
let { id: r, message: a, variant: o, duration: s = 4e3, dismissible: l = !0, "data-testid": u } = e, p = c(void 0);
|
|
3208
3260
|
return i(() => (p.current = setTimeout(() => {
|
|
3209
3261
|
t(r);
|
|
@@ -3214,35 +3266,35 @@ function ca({ toast: e, onDismiss: t, dismissLabel: n = "Cerrar notificación" }
|
|
|
3214
3266
|
s,
|
|
3215
3267
|
t
|
|
3216
3268
|
]), /* @__PURE__ */ f("div", {
|
|
3217
|
-
className:
|
|
3269
|
+
className: ia.toast,
|
|
3218
3270
|
"data-variant": o,
|
|
3219
3271
|
role: o === "error" || o === "warning" ? "alert" : "status",
|
|
3220
3272
|
"aria-atomic": "true",
|
|
3221
3273
|
"data-testid": u,
|
|
3222
3274
|
children: [/* @__PURE__ */ d("span", {
|
|
3223
|
-
className:
|
|
3275
|
+
className: ia.toastMessage,
|
|
3224
3276
|
children: a
|
|
3225
|
-
}), l && /* @__PURE__ */ d(
|
|
3226
|
-
className:
|
|
3277
|
+
}), l && /* @__PURE__ */ d(sr, {
|
|
3278
|
+
className: ia.dismissButton,
|
|
3227
3279
|
onClick: () => t(r),
|
|
3228
3280
|
label: n,
|
|
3229
3281
|
size: 14
|
|
3230
3282
|
})]
|
|
3231
3283
|
});
|
|
3232
3284
|
}
|
|
3233
|
-
function
|
|
3234
|
-
let { toasts: n, dismissToast: r } =
|
|
3285
|
+
function pa({ notificationsLabel: e = "Notificaciones", dismissLabel: t }) {
|
|
3286
|
+
let { toasts: n, dismissToast: r } = da();
|
|
3235
3287
|
return typeof document > "u" ? null : j(/* @__PURE__ */ d("section", {
|
|
3236
|
-
className:
|
|
3288
|
+
className: ia.container,
|
|
3237
3289
|
"aria-label": e,
|
|
3238
|
-
children: n.map((e) => /* @__PURE__ */ d(
|
|
3290
|
+
children: n.map((e) => /* @__PURE__ */ d(fa, {
|
|
3239
3291
|
toast: e,
|
|
3240
3292
|
onDismiss: r,
|
|
3241
3293
|
dismissLabel: t
|
|
3242
3294
|
}, e.id))
|
|
3243
3295
|
}), document.body);
|
|
3244
3296
|
}
|
|
3245
|
-
var
|
|
3297
|
+
var ma = {
|
|
3246
3298
|
wrapper: "_wrapper_1hq4w_2",
|
|
3247
3299
|
input: "_input_1hq4w_9",
|
|
3248
3300
|
track: "_track_1hq4w_29",
|
|
@@ -3251,10 +3303,10 @@ var ua = {
|
|
|
3251
3303
|
};
|
|
3252
3304
|
//#endregion
|
|
3253
3305
|
//#region src/components/Toggle/Toggle.tsx
|
|
3254
|
-
function
|
|
3306
|
+
function ha({ label: e, size: t = "medium", className: n, id: r, ref: i, "data-testid": a, ...o }) {
|
|
3255
3307
|
let s = r ?? `toggle-${String(e ?? "").toLowerCase().replace(/\s+/g, "-")}`;
|
|
3256
3308
|
return /* @__PURE__ */ f("label", {
|
|
3257
|
-
className:
|
|
3309
|
+
className: ma.wrapper,
|
|
3258
3310
|
"data-size": t,
|
|
3259
3311
|
htmlFor: s,
|
|
3260
3312
|
"data-testid": a,
|
|
@@ -3265,55 +3317,55 @@ function da({ label: e, size: t = "medium", className: n, id: r, ref: i, "data-t
|
|
|
3265
3317
|
role: "switch",
|
|
3266
3318
|
"aria-checked": o.checked ?? !1,
|
|
3267
3319
|
id: s,
|
|
3268
|
-
className:
|
|
3320
|
+
className: ma.input,
|
|
3269
3321
|
...o
|
|
3270
3322
|
}),
|
|
3271
3323
|
/* @__PURE__ */ d("span", {
|
|
3272
|
-
className:
|
|
3324
|
+
className: ma.track,
|
|
3273
3325
|
"aria-hidden": "true",
|
|
3274
|
-
children: /* @__PURE__ */ d("span", { className:
|
|
3326
|
+
children: /* @__PURE__ */ d("span", { className: ma.thumb })
|
|
3275
3327
|
}),
|
|
3276
3328
|
e && /* @__PURE__ */ d("span", {
|
|
3277
|
-
className:
|
|
3329
|
+
className: ma.label,
|
|
3278
3330
|
children: e
|
|
3279
3331
|
})
|
|
3280
3332
|
]
|
|
3281
3333
|
});
|
|
3282
3334
|
}
|
|
3283
|
-
var
|
|
3335
|
+
var ga = {
|
|
3284
3336
|
trigger: "_trigger_wx3tb_2",
|
|
3285
3337
|
tooltip: "_tooltip_wx3tb_7"
|
|
3286
|
-
},
|
|
3287
|
-
function
|
|
3338
|
+
}, _a = 8;
|
|
3339
|
+
function va(e, t) {
|
|
3288
3340
|
switch (t) {
|
|
3289
3341
|
case "top": return {
|
|
3290
|
-
top: e.top -
|
|
3342
|
+
top: e.top - _a,
|
|
3291
3343
|
left: e.left + e.width / 2
|
|
3292
3344
|
};
|
|
3293
3345
|
case "bottom": return {
|
|
3294
|
-
top: e.bottom +
|
|
3346
|
+
top: e.bottom + _a,
|
|
3295
3347
|
left: e.left + e.width / 2
|
|
3296
3348
|
};
|
|
3297
3349
|
case "left": return {
|
|
3298
3350
|
top: e.top + e.height / 2,
|
|
3299
|
-
left: e.left -
|
|
3351
|
+
left: e.left - _a
|
|
3300
3352
|
};
|
|
3301
3353
|
case "right": return {
|
|
3302
3354
|
top: e.top + e.height / 2,
|
|
3303
|
-
left: e.right +
|
|
3355
|
+
left: e.right + _a
|
|
3304
3356
|
};
|
|
3305
3357
|
}
|
|
3306
3358
|
}
|
|
3307
|
-
function
|
|
3359
|
+
function ya({ content: e, children: t, placement: n = "top", "data-testid": i }) {
|
|
3308
3360
|
let [o, s] = l(!1), [p, m] = l({
|
|
3309
3361
|
top: 0,
|
|
3310
3362
|
left: 0
|
|
3311
3363
|
}), h = c(null), g = a(), _ = r(() => {
|
|
3312
|
-
h.current && (m(
|
|
3364
|
+
h.current && (m(va(h.current.getBoundingClientRect(), n)), s(!0));
|
|
3313
3365
|
}, [n]), v = r(() => s(!1), []);
|
|
3314
3366
|
return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("span", {
|
|
3315
3367
|
ref: h,
|
|
3316
|
-
className:
|
|
3368
|
+
className: ga.trigger,
|
|
3317
3369
|
"aria-describedby": o ? g : void 0,
|
|
3318
3370
|
onMouseEnter: _,
|
|
3319
3371
|
onMouseLeave: v,
|
|
@@ -3324,7 +3376,7 @@ function ha({ content: e, children: t, placement: n = "top", "data-testid": i })
|
|
|
3324
3376
|
}), o && typeof document < "u" && j(/* @__PURE__ */ d("div", {
|
|
3325
3377
|
id: g,
|
|
3326
3378
|
role: "tooltip",
|
|
3327
|
-
className:
|
|
3379
|
+
className: ga.tooltip,
|
|
3328
3380
|
"data-placement": n,
|
|
3329
3381
|
style: {
|
|
3330
3382
|
top: p.top,
|
|
@@ -3333,7 +3385,7 @@ function ha({ content: e, children: t, placement: n = "top", "data-testid": i })
|
|
|
3333
3385
|
children: e
|
|
3334
3386
|
}), document.body)] });
|
|
3335
3387
|
}
|
|
3336
|
-
var
|
|
3388
|
+
var Q = {
|
|
3337
3389
|
treeItem: "_treeItem_164yx_2",
|
|
3338
3390
|
content: "_content_164yx_7",
|
|
3339
3391
|
childrenSlot: "_childrenSlot_164yx_19",
|
|
@@ -3348,29 +3400,29 @@ var $ = {
|
|
|
3348
3400
|
};
|
|
3349
3401
|
//#endregion
|
|
3350
3402
|
//#region src/components/TreeItem/TreeItem.tsx
|
|
3351
|
-
function
|
|
3403
|
+
function $(e) {
|
|
3352
3404
|
return e ? "" : void 0;
|
|
3353
3405
|
}
|
|
3354
|
-
function
|
|
3406
|
+
function ba(e) {
|
|
3355
3407
|
return [
|
|
3356
3408
|
"INPUT",
|
|
3357
3409
|
"TEXTAREA",
|
|
3358
3410
|
"SELECT"
|
|
3359
3411
|
].includes(e.tagName) || e.isContentEditable;
|
|
3360
3412
|
}
|
|
3361
|
-
function
|
|
3413
|
+
function xa(e, t, n) {
|
|
3362
3414
|
return e === "ArrowRight" ? t && !n : e === "ArrowLeft" ? t && n : !1;
|
|
3363
3415
|
}
|
|
3364
|
-
function
|
|
3365
|
-
if (!(t.disabled ||
|
|
3416
|
+
function Sa(e, t, n, r, i, a, o) {
|
|
3417
|
+
if (!(t.disabled || ba(e.target))) {
|
|
3366
3418
|
if (e.key === "Enter" || e.key === " ") {
|
|
3367
3419
|
e.preventDefault(), n ? a(t.id) : i && o(t.id);
|
|
3368
3420
|
return;
|
|
3369
3421
|
}
|
|
3370
|
-
|
|
3422
|
+
xa(e.key, n, r) && (e.preventDefault(), a(t.id));
|
|
3371
3423
|
}
|
|
3372
3424
|
}
|
|
3373
|
-
function
|
|
3425
|
+
function Ca(e, t, n, r, i, a, o, s, c) {
|
|
3374
3426
|
return {
|
|
3375
3427
|
handleDragStart(n) {
|
|
3376
3428
|
if (!r.current) {
|
|
@@ -3414,25 +3466,25 @@ function ba(e, t, n, r, i, a, o, s, c) {
|
|
|
3414
3466
|
}
|
|
3415
3467
|
};
|
|
3416
3468
|
}
|
|
3417
|
-
function
|
|
3469
|
+
function wa({ item: e, level: t, selectable: n, selected: r, prefixSlot: i, labelSlot: a, metaSlot: o, suffixSlot: s, onToggleSelect: c }) {
|
|
3418
3470
|
return /* @__PURE__ */ f(u, { children: [
|
|
3419
|
-
n && /* @__PURE__ */ d(
|
|
3471
|
+
n && /* @__PURE__ */ d(qn, {
|
|
3420
3472
|
checked: r,
|
|
3421
3473
|
disabled: e.disabled,
|
|
3422
|
-
className:
|
|
3474
|
+
className: Q.checkbox,
|
|
3423
3475
|
onChange: () => !e.disabled && c(e.id)
|
|
3424
3476
|
}),
|
|
3425
3477
|
i?.(e, t),
|
|
3426
3478
|
/* @__PURE__ */ f("div", {
|
|
3427
|
-
className:
|
|
3479
|
+
className: Q.slotsWrapper,
|
|
3428
3480
|
children: [
|
|
3429
3481
|
a ? a(e, t) : /* @__PURE__ */ d("span", {
|
|
3430
|
-
className:
|
|
3482
|
+
className: Q.label,
|
|
3431
3483
|
"data-testid": "tree-item-label",
|
|
3432
3484
|
children: e.label
|
|
3433
3485
|
}),
|
|
3434
3486
|
o ? o(e, t) : e.meta && /* @__PURE__ */ d("span", {
|
|
3435
|
-
className:
|
|
3487
|
+
className: Q.meta,
|
|
3436
3488
|
children: e.meta
|
|
3437
3489
|
}),
|
|
3438
3490
|
s?.(e, t)
|
|
@@ -3440,19 +3492,19 @@ function xa({ item: e, level: t, selectable: n, selected: r, prefixSlot: i, labe
|
|
|
3440
3492
|
})
|
|
3441
3493
|
] });
|
|
3442
3494
|
}
|
|
3443
|
-
function
|
|
3444
|
-
let O = c(!1), k = (t) =>
|
|
3495
|
+
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 }) {
|
|
3496
|
+
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
3497
|
return /* @__PURE__ */ f("div", {
|
|
3446
|
-
className:
|
|
3498
|
+
className: Q.treeItem,
|
|
3447
3499
|
style: { "--tree-item-indent": `${t * s}px` },
|
|
3448
3500
|
"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":
|
|
3501
|
+
"data-expanded": $(n),
|
|
3502
|
+
"data-selected": $(r),
|
|
3503
|
+
"data-disabled": $(e.disabled),
|
|
3504
|
+
"data-has-children": $(o),
|
|
3505
|
+
"data-bordered": $(u),
|
|
3506
|
+
"data-striped": $(m),
|
|
3507
|
+
"data-odd-row": $(m && p % 2 == 1),
|
|
3456
3508
|
"data-testid": C,
|
|
3457
3509
|
role: "treeitem",
|
|
3458
3510
|
"aria-level": t + 1,
|
|
@@ -3465,7 +3517,7 @@ function Sa({ item: e, level: t = 0, expanded: n = !1, selected: r = !1, draggab
|
|
|
3465
3517
|
O.current = !1;
|
|
3466
3518
|
},
|
|
3467
3519
|
children: [/* @__PURE__ */ f("div", {
|
|
3468
|
-
className:
|
|
3520
|
+
className: Q.content,
|
|
3469
3521
|
draggable: i && !e.disabled,
|
|
3470
3522
|
onDragStart: A.handleDragStart,
|
|
3471
3523
|
onDragEnd: A.handleDragEnd,
|
|
@@ -3474,7 +3526,7 @@ function Sa({ item: e, level: t = 0, expanded: n = !1, selected: r = !1, draggab
|
|
|
3474
3526
|
onDrop: A.handleDrop,
|
|
3475
3527
|
children: [
|
|
3476
3528
|
i && /* @__PURE__ */ d("span", {
|
|
3477
|
-
className:
|
|
3529
|
+
className: Q.dragHandle,
|
|
3478
3530
|
"data-testid": "tree-item-drag-handle",
|
|
3479
3531
|
"aria-hidden": "true",
|
|
3480
3532
|
onMouseDown: (e) => {
|
|
@@ -3489,10 +3541,10 @@ function Sa({ item: e, level: t = 0, expanded: n = !1, selected: r = !1, draggab
|
|
|
3489
3541
|
})
|
|
3490
3542
|
}),
|
|
3491
3543
|
/* @__PURE__ */ d("div", {
|
|
3492
|
-
className:
|
|
3544
|
+
className: Q.indent,
|
|
3493
3545
|
"aria-hidden": "true"
|
|
3494
3546
|
}),
|
|
3495
|
-
/* @__PURE__ */ d(
|
|
3547
|
+
/* @__PURE__ */ d(wa, {
|
|
3496
3548
|
item: e,
|
|
3497
3549
|
level: t,
|
|
3498
3550
|
selectable: a,
|
|
@@ -3505,7 +3557,7 @@ function Sa({ item: e, level: t = 0, expanded: n = !1, selected: r = !1, draggab
|
|
|
3505
3557
|
}),
|
|
3506
3558
|
o ? /* @__PURE__ */ d("button", {
|
|
3507
3559
|
type: "button",
|
|
3508
|
-
className:
|
|
3560
|
+
className: Q.expandBtn,
|
|
3509
3561
|
"aria-expanded": n,
|
|
3510
3562
|
"aria-label": n ? "Collapse" : "Expand",
|
|
3511
3563
|
disabled: e.disabled,
|
|
@@ -3517,42 +3569,42 @@ function Sa({ item: e, level: t = 0, expanded: n = !1, selected: r = !1, draggab
|
|
|
3517
3569
|
size: 16
|
|
3518
3570
|
})
|
|
3519
3571
|
}) : /* @__PURE__ */ d("span", {
|
|
3520
|
-
className:
|
|
3572
|
+
className: Q.expandPlaceholder,
|
|
3521
3573
|
"aria-hidden": "true"
|
|
3522
3574
|
})
|
|
3523
3575
|
]
|
|
3524
3576
|
}), o && /* @__PURE__ */ d("div", {
|
|
3525
|
-
className:
|
|
3577
|
+
className: Q.childrenSlot,
|
|
3526
3578
|
hidden: !n,
|
|
3527
3579
|
children: S
|
|
3528
3580
|
})]
|
|
3529
3581
|
});
|
|
3530
3582
|
}
|
|
3531
|
-
var
|
|
3583
|
+
var Ea = { treeList: "_treeList_trryv_2" };
|
|
3532
3584
|
//#endregion
|
|
3533
3585
|
//#region src/components/TreeList/TreeList.tsx
|
|
3534
|
-
function
|
|
3586
|
+
function Da(e, t) {
|
|
3535
3587
|
for (let n of e) {
|
|
3536
3588
|
if (n.id === t) return n;
|
|
3537
3589
|
if (n.children) {
|
|
3538
|
-
let e =
|
|
3590
|
+
let e = Da(n.children, t);
|
|
3539
3591
|
if (e) return e;
|
|
3540
3592
|
}
|
|
3541
3593
|
}
|
|
3542
3594
|
return null;
|
|
3543
3595
|
}
|
|
3544
|
-
function
|
|
3596
|
+
function Oa(e, t) {
|
|
3545
3597
|
let n = /* @__PURE__ */ new Map(), r = 0;
|
|
3546
3598
|
function i(e) {
|
|
3547
3599
|
for (let a of e) n.set(a.id, r++), a.children?.length && t.includes(a.id) && i(a.children);
|
|
3548
3600
|
}
|
|
3549
3601
|
return i(e), n;
|
|
3550
3602
|
}
|
|
3551
|
-
function
|
|
3603
|
+
function ka(e) {
|
|
3552
3604
|
let { items: t, parentId: n, level: r, expandedIds: i, selectedIds: a, flatIndexMap: o } = e;
|
|
3553
3605
|
return t.map((t) => {
|
|
3554
3606
|
let s = !!t.children?.length, c = i.includes(t.id);
|
|
3555
|
-
return /* @__PURE__ */ d(
|
|
3607
|
+
return /* @__PURE__ */ d(Ta, {
|
|
3556
3608
|
item: t,
|
|
3557
3609
|
level: r,
|
|
3558
3610
|
parentId: n,
|
|
@@ -3575,7 +3627,7 @@ function Ea(e) {
|
|
|
3575
3627
|
metaSlot: e.metaSlot,
|
|
3576
3628
|
prefixSlot: e.prefixSlot,
|
|
3577
3629
|
suffixSlot: e.suffixSlot,
|
|
3578
|
-
children: s && c && t.children && /* @__PURE__ */ d(
|
|
3630
|
+
children: s && c && t.children && /* @__PURE__ */ d(ka, {
|
|
3579
3631
|
...e,
|
|
3580
3632
|
items: t.children,
|
|
3581
3633
|
parentId: t.id,
|
|
@@ -3584,14 +3636,14 @@ function Ea(e) {
|
|
|
3584
3636
|
}, t.id);
|
|
3585
3637
|
});
|
|
3586
3638
|
}
|
|
3587
|
-
function
|
|
3639
|
+
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
3640
|
let [x, S] = l([]), [C, w] = l([]), T = c(null), E = n ?? x, D = i ?? C, O = {
|
|
3589
3641
|
items: e,
|
|
3590
3642
|
parentId: null,
|
|
3591
3643
|
level: 0,
|
|
3592
3644
|
expandedIds: E,
|
|
3593
3645
|
selectedIds: D,
|
|
3594
|
-
flatIndexMap: s(() =>
|
|
3646
|
+
flatIndexMap: s(() => Oa(e, E), [e, E]),
|
|
3595
3647
|
draggable: t,
|
|
3596
3648
|
selectable: a,
|
|
3597
3649
|
bordered: u,
|
|
@@ -3631,7 +3683,7 @@ function Da({ items: e = [], draggable: t = !1, expandedIds: n, selectedIds: i,
|
|
|
3631
3683
|
if (!n || n.parentId !== t.parentId) return;
|
|
3632
3684
|
let r = n.itemId, i = t.item.id;
|
|
3633
3685
|
if (r === i) return;
|
|
3634
|
-
let a = t.parentId === null ? e :
|
|
3686
|
+
let a = t.parentId === null ? e : Da(e, t.parentId)?.children;
|
|
3635
3687
|
if (!a) return;
|
|
3636
3688
|
let o = a.findIndex((e) => e.id === r), s = a.findIndex((e) => e.id === i);
|
|
3637
3689
|
o === -1 || s === -1 || h?.({
|
|
@@ -3648,14 +3700,14 @@ function Da({ items: e = [], draggable: t = !1, expandedIds: n, selectedIds: i,
|
|
|
3648
3700
|
suffixSlot: y
|
|
3649
3701
|
};
|
|
3650
3702
|
return /* @__PURE__ */ d("div", {
|
|
3651
|
-
className:
|
|
3703
|
+
className: Ea.treeList,
|
|
3652
3704
|
role: "tree",
|
|
3653
3705
|
"data-draggable": t ? "" : void 0,
|
|
3654
3706
|
"data-testid": b,
|
|
3655
|
-
children: /* @__PURE__ */ d(
|
|
3707
|
+
children: /* @__PURE__ */ d(ka, { ...O })
|
|
3656
3708
|
});
|
|
3657
3709
|
}
|
|
3658
|
-
var
|
|
3710
|
+
var ja = {
|
|
3659
3711
|
notification: "_notification_i6esb_2",
|
|
3660
3712
|
content: "_content_i6esb_40",
|
|
3661
3713
|
action: "_action_i6esb_45",
|
|
@@ -3663,38 +3715,26 @@ var Oa = {
|
|
|
3663
3715
|
};
|
|
3664
3716
|
//#endregion
|
|
3665
3717
|
//#region src/components/UserNotification/UserNotification.tsx
|
|
3666
|
-
function
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3718
|
+
function Ma({ variant: e = "info", icon: t, onDismiss: n, dismissLabel: r = "Cerrar", action: i, children: a, className: o, "data-testid": s }) {
|
|
3719
|
+
return /* @__PURE__ */ d(Bi, {
|
|
3720
|
+
variant: e,
|
|
3721
|
+
rootClassName: ja.notification,
|
|
3722
|
+
contentClassName: ja.content,
|
|
3723
|
+
actionClassName: ja.action,
|
|
3724
|
+
icon: t,
|
|
3725
|
+
action: i,
|
|
3726
|
+
className: o,
|
|
3673
3727
|
"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
|
-
]
|
|
3728
|
+
dismissSlot: /* @__PURE__ */ d(sr, {
|
|
3729
|
+
className: ja.dismiss,
|
|
3730
|
+
onClick: n,
|
|
3731
|
+
label: r,
|
|
3732
|
+
size: 20
|
|
3733
|
+
}),
|
|
3734
|
+
children: a
|
|
3695
3735
|
});
|
|
3696
3736
|
}
|
|
3697
|
-
var
|
|
3737
|
+
var Na = {
|
|
3698
3738
|
header: "_header_u329l_2",
|
|
3699
3739
|
titleSection: "_titleSection_u329l_12",
|
|
3700
3740
|
title: "_title_u329l_12",
|
|
@@ -3702,23 +3742,23 @@ var Aa = {
|
|
|
3702
3742
|
};
|
|
3703
3743
|
//#endregion
|
|
3704
3744
|
//#region src/layouts/AdminPageHeader/AdminPageHeader.tsx
|
|
3705
|
-
function
|
|
3745
|
+
function Pa({ title: e, actions: t, "data-testid": n }) {
|
|
3706
3746
|
return /* @__PURE__ */ f("header", {
|
|
3707
|
-
className:
|
|
3747
|
+
className: Na.header,
|
|
3708
3748
|
"data-testid": n,
|
|
3709
3749
|
children: [/* @__PURE__ */ d("div", {
|
|
3710
|
-
className:
|
|
3750
|
+
className: Na.titleSection,
|
|
3711
3751
|
children: /* @__PURE__ */ d("span", {
|
|
3712
|
-
className:
|
|
3752
|
+
className: Na.title,
|
|
3713
3753
|
children: e
|
|
3714
3754
|
})
|
|
3715
3755
|
}), t && /* @__PURE__ */ d("div", {
|
|
3716
|
-
className:
|
|
3756
|
+
className: Na.actions,
|
|
3717
3757
|
children: t
|
|
3718
3758
|
})]
|
|
3719
3759
|
});
|
|
3720
3760
|
}
|
|
3721
|
-
var
|
|
3761
|
+
var Fa = {
|
|
3722
3762
|
shell: "_shell_1c2iw_2",
|
|
3723
3763
|
body: "_body_1c2iw_10",
|
|
3724
3764
|
sidebarSlot: "_sidebarSlot_1c2iw_16",
|
|
@@ -3728,14 +3768,14 @@ var Ma = {
|
|
|
3728
3768
|
};
|
|
3729
3769
|
//#endregion
|
|
3730
3770
|
//#region src/layouts/AppShell/AppShell.tsx
|
|
3731
|
-
function
|
|
3732
|
-
return c ? /* @__PURE__ */ d(
|
|
3771
|
+
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 }) {
|
|
3772
|
+
return c ? /* @__PURE__ */ d(bi, {
|
|
3733
3773
|
isLocked: !0,
|
|
3734
3774
|
children: l
|
|
3735
3775
|
}) : /* @__PURE__ */ f("div", {
|
|
3736
|
-
className:
|
|
3776
|
+
className: Fa.shell,
|
|
3737
3777
|
"data-testid": p,
|
|
3738
|
-
children: [/* @__PURE__ */ d(
|
|
3778
|
+
children: [/* @__PURE__ */ d(ri, {
|
|
3739
3779
|
restaurantName: e,
|
|
3740
3780
|
onMenuToggle: t,
|
|
3741
3781
|
onLogoClick: n,
|
|
@@ -3743,82 +3783,82 @@ function Na({ restaurantName: e, onMenuToggle: t, onLogoClick: n, onRightToggle:
|
|
|
3743
3783
|
isLoading: u,
|
|
3744
3784
|
rightSlot: s
|
|
3745
3785
|
}), /* @__PURE__ */ f("div", {
|
|
3746
|
-
className:
|
|
3786
|
+
className: Fa.body,
|
|
3747
3787
|
children: [/* @__PURE__ */ d("div", {
|
|
3748
|
-
className:
|
|
3788
|
+
className: Fa.sidebarSlot,
|
|
3749
3789
|
children: i
|
|
3750
3790
|
}), /* @__PURE__ */ f("div", {
|
|
3751
|
-
className:
|
|
3791
|
+
className: Fa.contentArea,
|
|
3752
3792
|
children: [/* @__PURE__ */ d("main", {
|
|
3753
|
-
className:
|
|
3793
|
+
className: Fa.main,
|
|
3754
3794
|
children: a
|
|
3755
3795
|
}), o && /* @__PURE__ */ d("div", {
|
|
3756
|
-
className:
|
|
3796
|
+
className: Fa.tabBarSlot,
|
|
3757
3797
|
children: o
|
|
3758
3798
|
})]
|
|
3759
3799
|
})]
|
|
3760
3800
|
})]
|
|
3761
3801
|
});
|
|
3762
3802
|
}
|
|
3763
|
-
var
|
|
3803
|
+
var La = { divider: "_divider_1nit0_1" };
|
|
3764
3804
|
//#endregion
|
|
3765
3805
|
//#region src/layouts/Divider/Divider.tsx
|
|
3766
|
-
function
|
|
3806
|
+
function Ra({ orientation: e = "horizontal", spacing: t = "md", className: n, "data-testid": r }) {
|
|
3767
3807
|
return /* @__PURE__ */ d("hr", {
|
|
3768
|
-
className: [
|
|
3808
|
+
className: [La.divider, n].filter(Boolean).join(" "),
|
|
3769
3809
|
"data-orientation": e,
|
|
3770
3810
|
"data-spacing": t,
|
|
3771
3811
|
"aria-orientation": e,
|
|
3772
3812
|
"data-testid": r
|
|
3773
3813
|
});
|
|
3774
3814
|
}
|
|
3775
|
-
var
|
|
3815
|
+
var za = { grid: "_grid_w5ah8_2" }, Ba = {
|
|
3776
3816
|
xs: "var(--ds-space-1)",
|
|
3777
3817
|
sm: "var(--ds-space-2)",
|
|
3778
3818
|
md: "var(--ds-space-3)",
|
|
3779
3819
|
lg: "var(--ds-space-4)",
|
|
3780
3820
|
xl: "var(--ds-space-6)"
|
|
3781
3821
|
};
|
|
3782
|
-
function
|
|
3822
|
+
function Va({ columns: e = 1, gap: t = "md", children: n, className: r, style: i, "data-testid": a }) {
|
|
3783
3823
|
let o = {
|
|
3784
3824
|
"--grid-columns": typeof e == "number" ? `repeat(${e}, minmax(0, 1fr))` : e,
|
|
3785
|
-
"--grid-gap":
|
|
3825
|
+
"--grid-gap": Ba[t],
|
|
3786
3826
|
...i
|
|
3787
3827
|
};
|
|
3788
3828
|
return /* @__PURE__ */ d("div", {
|
|
3789
|
-
className: [
|
|
3829
|
+
className: [za.grid, r].filter(Boolean).join(" "),
|
|
3790
3830
|
style: o,
|
|
3791
3831
|
"data-testid": a,
|
|
3792
3832
|
children: n
|
|
3793
3833
|
});
|
|
3794
3834
|
}
|
|
3795
|
-
var
|
|
3835
|
+
var Ha = {
|
|
3796
3836
|
footer: "_footer_1dat1_2",
|
|
3797
3837
|
dot: "_dot_1dat1_14",
|
|
3798
3838
|
info: "_info_1dat1_22"
|
|
3799
3839
|
};
|
|
3800
3840
|
//#endregion
|
|
3801
3841
|
//#region src/layouts/LoginFooter/LoginFooter.tsx
|
|
3802
|
-
function
|
|
3842
|
+
function Ua({ languageSelector: e, appName: t = "Toteat©", version: n, env: r, className: i, "data-testid": a }) {
|
|
3803
3843
|
return /* @__PURE__ */ f("footer", {
|
|
3804
|
-
className: [
|
|
3844
|
+
className: [Ha.footer, i].filter(Boolean).join(" "),
|
|
3805
3845
|
"data-testid": a,
|
|
3806
3846
|
children: [
|
|
3807
3847
|
e,
|
|
3808
3848
|
e && /* @__PURE__ */ d("span", {
|
|
3809
|
-
className:
|
|
3849
|
+
className: Ha.dot,
|
|
3810
3850
|
"aria-hidden": "true"
|
|
3811
3851
|
}),
|
|
3812
3852
|
/* @__PURE__ */ d("span", {
|
|
3813
|
-
className:
|
|
3853
|
+
className: Ha.info,
|
|
3814
3854
|
children: t
|
|
3815
3855
|
}),
|
|
3816
3856
|
(n || r) && /* @__PURE__ */ d("span", {
|
|
3817
|
-
className:
|
|
3857
|
+
className: Ha.dot,
|
|
3818
3858
|
"aria-hidden": "true"
|
|
3819
3859
|
}),
|
|
3820
3860
|
(n || r) && /* @__PURE__ */ f("span", {
|
|
3821
|
-
className:
|
|
3861
|
+
className: Ha.info,
|
|
3822
3862
|
children: [
|
|
3823
3863
|
n && /* @__PURE__ */ f(u, { children: ["Ver: ", n] }),
|
|
3824
3864
|
n && r && /* @__PURE__ */ d(u, { children: "\xA0\xA0" }),
|
|
@@ -3828,24 +3868,24 @@ function Ba({ languageSelector: e, appName: t = "Toteat©", version: n, env: r,
|
|
|
3828
3868
|
]
|
|
3829
3869
|
});
|
|
3830
3870
|
}
|
|
3831
|
-
var
|
|
3871
|
+
var Wa = {
|
|
3832
3872
|
page: "_page_s8gdl_2",
|
|
3833
3873
|
card: "_card_s8gdl_45",
|
|
3834
3874
|
cardEntrance: "_cardEntrance_s8gdl_1"
|
|
3835
3875
|
};
|
|
3836
3876
|
//#endregion
|
|
3837
3877
|
//#region src/layouts/LoginPageLayout/LoginPageLayout.tsx
|
|
3838
|
-
function
|
|
3878
|
+
function Ga({ children: e, "data-testid": t }) {
|
|
3839
3879
|
return /* @__PURE__ */ d("main", {
|
|
3840
|
-
className:
|
|
3880
|
+
className: Wa.page,
|
|
3841
3881
|
"data-testid": t,
|
|
3842
3882
|
children: /* @__PURE__ */ d("div", {
|
|
3843
|
-
className:
|
|
3883
|
+
className: Wa.card,
|
|
3844
3884
|
children: e
|
|
3845
3885
|
})
|
|
3846
3886
|
});
|
|
3847
3887
|
}
|
|
3848
|
-
var
|
|
3888
|
+
var Ka = {
|
|
3849
3889
|
root: "_root_11bhp_2",
|
|
3850
3890
|
sidebar: "_sidebar_11bhp_20",
|
|
3851
3891
|
main: "_main_11bhp_37",
|
|
@@ -3854,22 +3894,22 @@ var Ua = {
|
|
|
3854
3894
|
};
|
|
3855
3895
|
//#endregion
|
|
3856
3896
|
//#region src/layouts/PageLayout/PageLayout.tsx
|
|
3857
|
-
function
|
|
3897
|
+
function qa({ sidebar: e, header: t, children: n, collapsed: r = !1, className: i, "data-testid": a }) {
|
|
3858
3898
|
return /* @__PURE__ */ f("div", {
|
|
3859
|
-
className: [
|
|
3899
|
+
className: [Ka.root, i].filter(Boolean).join(" "),
|
|
3860
3900
|
"data-sidebar-collapsed": r ? "" : void 0,
|
|
3861
3901
|
"data-testid": a,
|
|
3862
3902
|
children: [e && /* @__PURE__ */ d("aside", {
|
|
3863
|
-
className:
|
|
3903
|
+
className: Ka.sidebar,
|
|
3864
3904
|
"aria-label": "Navegación lateral",
|
|
3865
3905
|
children: e
|
|
3866
3906
|
}), /* @__PURE__ */ f("div", {
|
|
3867
|
-
className:
|
|
3907
|
+
className: Ka.main,
|
|
3868
3908
|
children: [t && /* @__PURE__ */ d("header", {
|
|
3869
|
-
className:
|
|
3909
|
+
className: Ka.header,
|
|
3870
3910
|
children: t
|
|
3871
3911
|
}), /* @__PURE__ */ d("main", {
|
|
3872
|
-
className:
|
|
3912
|
+
className: Ka.content,
|
|
3873
3913
|
children: n
|
|
3874
3914
|
})]
|
|
3875
3915
|
})]
|
|
@@ -3877,36 +3917,36 @@ function Wa({ sidebar: e, header: t, children: n, collapsed: r = !1, className:
|
|
|
3877
3917
|
}
|
|
3878
3918
|
//#endregion
|
|
3879
3919
|
//#region src/layouts/Stack/Stack.tsx
|
|
3880
|
-
var
|
|
3920
|
+
var Ja = {
|
|
3881
3921
|
xs: "var(--ds-space-1)",
|
|
3882
3922
|
sm: "var(--ds-space-2)",
|
|
3883
3923
|
md: "var(--ds-space-3)",
|
|
3884
3924
|
lg: "var(--ds-space-4)",
|
|
3885
3925
|
xl: "var(--ds-space-6)",
|
|
3886
3926
|
"2xl": "var(--ds-space-8)"
|
|
3887
|
-
},
|
|
3927
|
+
}, Ya = {
|
|
3888
3928
|
start: "flex-start",
|
|
3889
3929
|
center: "center",
|
|
3890
3930
|
end: "flex-end",
|
|
3891
3931
|
between: "space-between",
|
|
3892
3932
|
around: "space-around",
|
|
3893
3933
|
evenly: "space-evenly"
|
|
3894
|
-
},
|
|
3934
|
+
}, Xa = {
|
|
3895
3935
|
start: "flex-start",
|
|
3896
3936
|
center: "center",
|
|
3897
3937
|
end: "flex-end",
|
|
3898
3938
|
stretch: "stretch",
|
|
3899
3939
|
baseline: "baseline"
|
|
3900
3940
|
};
|
|
3901
|
-
function
|
|
3941
|
+
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
3942
|
return /* @__PURE__ */ d(e ?? "div", {
|
|
3903
3943
|
className: s,
|
|
3904
3944
|
style: {
|
|
3905
3945
|
display: "flex",
|
|
3906
3946
|
flexDirection: t === "vertical" ? "column" : "row",
|
|
3907
|
-
gap:
|
|
3908
|
-
alignItems: r ?
|
|
3909
|
-
justifyContent: i ?
|
|
3947
|
+
gap: Ja[n],
|
|
3948
|
+
alignItems: r ? Xa[r] : void 0,
|
|
3949
|
+
justifyContent: i ? Ya[i] : void 0,
|
|
3910
3950
|
flexWrap: a ? "wrap" : void 0,
|
|
3911
3951
|
...c
|
|
3912
3952
|
},
|
|
@@ -3916,20 +3956,20 @@ function Ja({ as: e, direction: t = "vertical", gap: n = "md", align: r, justify
|
|
|
3916
3956
|
}
|
|
3917
3957
|
//#endregion
|
|
3918
3958
|
//#region src/utils/csv.ts
|
|
3919
|
-
function
|
|
3959
|
+
function Qa(e) {
|
|
3920
3960
|
if (e == null) return "";
|
|
3921
3961
|
let t = String(e);
|
|
3922
3962
|
return /[",\r\n]/.test(t) ? `"${t.replace(/"/g, "\"\"")}"` : t;
|
|
3923
3963
|
}
|
|
3924
|
-
function
|
|
3925
|
-
return e.length === 0 ? "" : e.map((e) => e.map(
|
|
3964
|
+
function $a(e) {
|
|
3965
|
+
return e.length === 0 ? "" : e.map((e) => e.map(Qa).join(",")).join("\r\n");
|
|
3926
3966
|
}
|
|
3927
3967
|
//#endregion
|
|
3928
3968
|
//#region src/utils/portal.ts
|
|
3929
|
-
function
|
|
3969
|
+
function eo(e, t) {
|
|
3930
3970
|
return j(e, t ?? document.body);
|
|
3931
3971
|
}
|
|
3932
3972
|
//#endregion
|
|
3933
|
-
export { Dn as Accordion,
|
|
3973
|
+
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
3974
|
|
|
3935
3975
|
//# sourceMappingURL=index.es.js.map
|