@shopito/design-system-fe 0.1.20 → 0.1.22
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/common/Carousel/Carousel.d.ts +14 -2
- package/dist/common/Carousel/Carousel.d.ts.map +1 -1
- package/dist/common/Carousel/index.d.ts +2 -2
- package/dist/common/Carousel/index.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +183 -169
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -3
package/dist/index.js
CHANGED
|
@@ -337,14 +337,14 @@ function z({ variant: e = "info", title: t, children: n, onClose: r, className:
|
|
|
337
337
|
}
|
|
338
338
|
//#endregion
|
|
339
339
|
//#region src/components/common/Modal/Modal.tsx
|
|
340
|
-
var
|
|
340
|
+
var B = {
|
|
341
341
|
sm: "max-w-sm",
|
|
342
342
|
md: "max-w-md",
|
|
343
343
|
lg: "max-w-lg",
|
|
344
344
|
xl: "max-w-xl",
|
|
345
345
|
full: "max-w-full mx-4"
|
|
346
346
|
};
|
|
347
|
-
function
|
|
347
|
+
function V({ open: e, onClose: t, title: n, children: i, footer: a, size: s = "md", closeOnBackdrop: c = !0 }) {
|
|
348
348
|
let f = o(null);
|
|
349
349
|
return r(() => {
|
|
350
350
|
if (!e) return;
|
|
@@ -368,7 +368,7 @@ function te({ open: e, onClose: t, title: n, children: i, footer: a, size: s = "
|
|
|
368
368
|
role: "dialog",
|
|
369
369
|
"aria-modal": "true",
|
|
370
370
|
"aria-labelledby": n ? "modal-title" : void 0,
|
|
371
|
-
className: ["relative w-full bg-white rounded-xl shadow-xl flex flex-col max-h-[90vh]",
|
|
371
|
+
className: ["relative w-full bg-white rounded-xl shadow-xl flex flex-col max-h-[90vh]", B[s]].join(" "),
|
|
372
372
|
children: [
|
|
373
373
|
n && /* @__PURE__ */ u("div", {
|
|
374
374
|
className: "flex items-center justify-between px-6 py-4 border-b border-gray-100 shrink-0",
|
|
@@ -409,7 +409,7 @@ function te({ open: e, onClose: t, title: n, children: i, footer: a, size: s = "
|
|
|
409
409
|
}
|
|
410
410
|
//#endregion
|
|
411
411
|
//#region src/components/common/Checkbox/Checkbox.tsx
|
|
412
|
-
var
|
|
412
|
+
var H = t(({ label: e, description: t, error: n, indeterminate: r, className: i = "", id: a, ...o }, s) => {
|
|
413
413
|
let c = a ?? e?.toLowerCase().replace(/\s+/g, "-");
|
|
414
414
|
return /* @__PURE__ */ u("div", {
|
|
415
415
|
className: (0, C.default)("checkbox-wrapper", i),
|
|
@@ -441,10 +441,10 @@ var B = t(({ label: e, description: t, error: n, indeterminate: r, className: i
|
|
|
441
441
|
] })]
|
|
442
442
|
});
|
|
443
443
|
});
|
|
444
|
-
|
|
444
|
+
H.displayName = "Checkbox";
|
|
445
445
|
//#endregion
|
|
446
446
|
//#region src/components/common/Toggle/Toggle.tsx
|
|
447
|
-
var
|
|
447
|
+
var U = t(({ label: e, description: t, size: n = "md", className: r = "", id: i, ...a }, o) => {
|
|
448
448
|
let s = i ?? e?.toLowerCase().replace(/\s+/g, "-");
|
|
449
449
|
return /* @__PURE__ */ u("label", {
|
|
450
450
|
htmlFor: s,
|
|
@@ -472,10 +472,10 @@ var V = t(({ label: e, description: t, size: n = "md", className: r = "", id: i,
|
|
|
472
472
|
})] })]
|
|
473
473
|
});
|
|
474
474
|
});
|
|
475
|
-
|
|
475
|
+
U.displayName = "Toggle";
|
|
476
476
|
//#endregion
|
|
477
477
|
//#region src/components/common/Avatar/Avatar.tsx
|
|
478
|
-
var
|
|
478
|
+
var W = [
|
|
479
479
|
"bg-red-500",
|
|
480
480
|
"bg-orange-500",
|
|
481
481
|
"bg-amber-500",
|
|
@@ -486,7 +486,7 @@ var H = [
|
|
|
486
486
|
"bg-violet-500",
|
|
487
487
|
"bg-pink-500"
|
|
488
488
|
];
|
|
489
|
-
function
|
|
489
|
+
function ee({ src: e, alt: t, name: n, size: r = "md", className: i, ...a }) {
|
|
490
490
|
let o = [
|
|
491
491
|
"avatar",
|
|
492
492
|
`avatar-${r}`,
|
|
@@ -494,7 +494,7 @@ function ne({ src: e, alt: t, name: n, size: r = "md", className: i, ...a }) {
|
|
|
494
494
|
], s = (e) => {
|
|
495
495
|
let t = 0;
|
|
496
496
|
for (let n = 0; n < e.length; n++) t += e.charCodeAt(n);
|
|
497
|
-
return
|
|
497
|
+
return W[t % W.length];
|
|
498
498
|
}, c = (e) => e.split(" ").slice(0, 2).map((e) => e[0]).join("").toUpperCase();
|
|
499
499
|
return e ? /* @__PURE__ */ l("span", {
|
|
500
500
|
className: (0, C.default)(o),
|
|
@@ -527,7 +527,7 @@ function ne({ src: e, alt: t, name: n, size: r = "md", className: i, ...a }) {
|
|
|
527
527
|
}
|
|
528
528
|
//#endregion
|
|
529
529
|
//#region src/components/common/Stack/Stack.tsx
|
|
530
|
-
var
|
|
530
|
+
var te = ({ direction: e = "row", gap: t, alignItems: n = "start", justifyItems: r = "start", justifyContent: i = "normal", className: a, children: o }) => /* @__PURE__ */ l("div", {
|
|
531
531
|
className: (0, C.default)("stack", `stack-${e}`, t && `gap-${t}`, {
|
|
532
532
|
start: "items-start",
|
|
533
533
|
end: "items-end",
|
|
@@ -550,14 +550,14 @@ var re = ({ direction: e = "row", gap: t, alignItems: n = "start", justifyItems:
|
|
|
550
550
|
stretch: "justify-stretch"
|
|
551
551
|
}[i], a),
|
|
552
552
|
children: o
|
|
553
|
-
}),
|
|
553
|
+
}), ne = {
|
|
554
554
|
1: "grid-cols-1",
|
|
555
555
|
2: "grid-cols-2",
|
|
556
556
|
3: "grid-cols-3",
|
|
557
557
|
4: "grid-cols-4",
|
|
558
558
|
6: "grid-cols-6",
|
|
559
559
|
12: "grid-cols-12"
|
|
560
|
-
},
|
|
560
|
+
}, re = {
|
|
561
561
|
0: "gap-0",
|
|
562
562
|
1: "gap-1",
|
|
563
563
|
2: "gap-2",
|
|
@@ -569,7 +569,7 @@ var re = ({ direction: e = "row", gap: t, alignItems: n = "start", justifyItems:
|
|
|
569
569
|
10: "gap-10",
|
|
570
570
|
12: "gap-12",
|
|
571
571
|
16: "gap-16"
|
|
572
|
-
},
|
|
572
|
+
}, ie = {
|
|
573
573
|
0: "gap-y-0",
|
|
574
574
|
1: "gap-y-1",
|
|
575
575
|
2: "gap-y-2",
|
|
@@ -581,7 +581,7 @@ var re = ({ direction: e = "row", gap: t, alignItems: n = "start", justifyItems:
|
|
|
581
581
|
10: "gap-y-10",
|
|
582
582
|
12: "gap-y-12",
|
|
583
583
|
16: "gap-y-16"
|
|
584
|
-
},
|
|
584
|
+
}, ae = {
|
|
585
585
|
0: "gap-x-0",
|
|
586
586
|
1: "gap-x-1",
|
|
587
587
|
2: "gap-x-2",
|
|
@@ -593,7 +593,7 @@ var re = ({ direction: e = "row", gap: t, alignItems: n = "start", justifyItems:
|
|
|
593
593
|
10: "gap-x-10",
|
|
594
594
|
12: "gap-x-12",
|
|
595
595
|
16: "gap-x-16"
|
|
596
|
-
},
|
|
596
|
+
}, oe = {
|
|
597
597
|
1: "col-span-1",
|
|
598
598
|
2: "col-span-2",
|
|
599
599
|
3: "col-span-3",
|
|
@@ -606,7 +606,7 @@ var re = ({ direction: e = "row", gap: t, alignItems: n = "start", justifyItems:
|
|
|
606
606
|
10: "col-span-10",
|
|
607
607
|
11: "col-span-11",
|
|
608
608
|
12: "col-span-12"
|
|
609
|
-
},
|
|
609
|
+
}, se = {
|
|
610
610
|
1: "sm:col-span-1",
|
|
611
611
|
2: "sm:col-span-2",
|
|
612
612
|
3: "sm:col-span-3",
|
|
@@ -619,7 +619,7 @@ var re = ({ direction: e = "row", gap: t, alignItems: n = "start", justifyItems:
|
|
|
619
619
|
10: "sm:col-span-10",
|
|
620
620
|
11: "sm:col-span-11",
|
|
621
621
|
12: "sm:col-span-12"
|
|
622
|
-
},
|
|
622
|
+
}, ce = {
|
|
623
623
|
1: "md:col-span-1",
|
|
624
624
|
2: "md:col-span-2",
|
|
625
625
|
3: "md:col-span-3",
|
|
@@ -632,7 +632,7 @@ var re = ({ direction: e = "row", gap: t, alignItems: n = "start", justifyItems:
|
|
|
632
632
|
10: "md:col-span-10",
|
|
633
633
|
11: "md:col-span-11",
|
|
634
634
|
12: "md:col-span-12"
|
|
635
|
-
},
|
|
635
|
+
}, le = {
|
|
636
636
|
1: "lg:col-span-1",
|
|
637
637
|
2: "lg:col-span-2",
|
|
638
638
|
3: "lg:col-span-3",
|
|
@@ -645,7 +645,7 @@ var re = ({ direction: e = "row", gap: t, alignItems: n = "start", justifyItems:
|
|
|
645
645
|
10: "lg:col-span-10",
|
|
646
646
|
11: "lg:col-span-11",
|
|
647
647
|
12: "lg:col-span-12"
|
|
648
|
-
},
|
|
648
|
+
}, ue = {
|
|
649
649
|
1: "xl:col-span-1",
|
|
650
650
|
2: "xl:col-span-2",
|
|
651
651
|
3: "xl:col-span-3",
|
|
@@ -658,7 +658,7 @@ var re = ({ direction: e = "row", gap: t, alignItems: n = "start", justifyItems:
|
|
|
658
658
|
10: "xl:col-span-10",
|
|
659
659
|
11: "xl:col-span-11",
|
|
660
660
|
12: "xl:col-span-12"
|
|
661
|
-
},
|
|
661
|
+
}, de = {
|
|
662
662
|
1: "col-start-2",
|
|
663
663
|
2: "col-start-3",
|
|
664
664
|
3: "col-start-4",
|
|
@@ -670,7 +670,7 @@ var re = ({ direction: e = "row", gap: t, alignItems: n = "start", justifyItems:
|
|
|
670
670
|
9: "col-start-10",
|
|
671
671
|
10: "col-start-11",
|
|
672
672
|
11: "col-start-12"
|
|
673
|
-
},
|
|
673
|
+
}, fe = {
|
|
674
674
|
1: "sm:col-start-2",
|
|
675
675
|
2: "sm:col-start-3",
|
|
676
676
|
3: "sm:col-start-4",
|
|
@@ -682,7 +682,7 @@ var re = ({ direction: e = "row", gap: t, alignItems: n = "start", justifyItems:
|
|
|
682
682
|
9: "sm:col-start-10",
|
|
683
683
|
10: "sm:col-start-11",
|
|
684
684
|
11: "sm:col-start-12"
|
|
685
|
-
},
|
|
685
|
+
}, pe = {
|
|
686
686
|
1: "md:col-start-2",
|
|
687
687
|
2: "md:col-start-3",
|
|
688
688
|
3: "md:col-start-4",
|
|
@@ -694,7 +694,7 @@ var re = ({ direction: e = "row", gap: t, alignItems: n = "start", justifyItems:
|
|
|
694
694
|
9: "md:col-start-10",
|
|
695
695
|
10: "md:col-start-11",
|
|
696
696
|
11: "md:col-start-12"
|
|
697
|
-
},
|
|
697
|
+
}, me = {
|
|
698
698
|
1: "lg:col-start-2",
|
|
699
699
|
2: "lg:col-start-3",
|
|
700
700
|
3: "lg:col-start-4",
|
|
@@ -706,7 +706,7 @@ var re = ({ direction: e = "row", gap: t, alignItems: n = "start", justifyItems:
|
|
|
706
706
|
9: "lg:col-start-10",
|
|
707
707
|
10: "lg:col-start-11",
|
|
708
708
|
11: "lg:col-start-12"
|
|
709
|
-
},
|
|
709
|
+
}, he = {
|
|
710
710
|
1: "xl:col-start-2",
|
|
711
711
|
2: "xl:col-start-3",
|
|
712
712
|
3: "xl:col-start-4",
|
|
@@ -718,20 +718,20 @@ var re = ({ direction: e = "row", gap: t, alignItems: n = "start", justifyItems:
|
|
|
718
718
|
9: "xl:col-start-10",
|
|
719
719
|
10: "xl:col-start-11",
|
|
720
720
|
11: "xl:col-start-12"
|
|
721
|
-
},
|
|
722
|
-
className: (0, C.default)("grid", "w-full",
|
|
721
|
+
}, G = ({ children: e, cols: t = 12, gap: n, rowGap: r, colGap: i, as: a = "div", className: o }) => /* @__PURE__ */ l(a, {
|
|
722
|
+
className: (0, C.default)("grid", "w-full", ne[t], n !== void 0 && re[n], r !== void 0 && ie[r], i !== void 0 && ae[i], o),
|
|
723
723
|
children: e
|
|
724
724
|
});
|
|
725
|
-
|
|
726
|
-
var
|
|
727
|
-
className: (0, C.default)(t &&
|
|
725
|
+
G.displayName = "Grid";
|
|
726
|
+
var K = ({ children: e, span: t, sm: n, md: r, lg: i, xl: a, offset: o, smOffset: s, mdOffset: c, lgOffset: u, xlOffset: d, className: f, ...p }) => /* @__PURE__ */ l("div", {
|
|
727
|
+
className: (0, C.default)(t && oe[t], n && se[n], r && ce[r], i && le[i], a && ue[a], o && de[o], s && fe[s], c && pe[c], u && me[u], d && he[d], f),
|
|
728
728
|
...p,
|
|
729
729
|
children: e
|
|
730
730
|
});
|
|
731
|
-
|
|
731
|
+
K.displayName = "Col";
|
|
732
732
|
//#endregion
|
|
733
733
|
//#region src/components/common/QuantityInput/QuantityInput.tsx
|
|
734
|
-
var
|
|
734
|
+
var q = ({ value: e, onChange: t, min: n = 1, max: a = 999, step: c = 1, disabled: d = !1, label: f, error: p, hint: m, id: h, className: g }) => {
|
|
735
735
|
let _ = i(), v = h ?? _, y = o(null), [b, x] = s(String(e));
|
|
736
736
|
r(() => {
|
|
737
737
|
document.activeElement !== y.current && x(String(e));
|
|
@@ -778,7 +778,7 @@ var G = ({ value: e, onChange: t, min: n = 1, max: a = 999, step: c = 1, disable
|
|
|
778
778
|
disabled: d || !A,
|
|
779
779
|
"aria-label": "Snížit množství",
|
|
780
780
|
tabIndex: -1,
|
|
781
|
-
children: /* @__PURE__ */ l(
|
|
781
|
+
children: /* @__PURE__ */ l(ge, {})
|
|
782
782
|
}),
|
|
783
783
|
/* @__PURE__ */ l("input", {
|
|
784
784
|
ref: y,
|
|
@@ -803,7 +803,7 @@ var G = ({ value: e, onChange: t, min: n = 1, max: a = 999, step: c = 1, disable
|
|
|
803
803
|
disabled: d || !j,
|
|
804
804
|
"aria-label": "Zvýšit množství",
|
|
805
805
|
tabIndex: -1,
|
|
806
|
-
children: /* @__PURE__ */ l(
|
|
806
|
+
children: /* @__PURE__ */ l(_e, {})
|
|
807
807
|
})
|
|
808
808
|
]
|
|
809
809
|
}),
|
|
@@ -814,8 +814,8 @@ var G = ({ value: e, onChange: t, min: n = 1, max: a = 999, step: c = 1, disable
|
|
|
814
814
|
]
|
|
815
815
|
});
|
|
816
816
|
};
|
|
817
|
-
|
|
818
|
-
var
|
|
817
|
+
q.displayName = "QuantityInput";
|
|
818
|
+
var ge = () => /* @__PURE__ */ l("svg", {
|
|
819
819
|
width: "12",
|
|
820
820
|
height: "2",
|
|
821
821
|
viewBox: "0 0 12 2",
|
|
@@ -827,7 +827,7 @@ var ve = () => /* @__PURE__ */ l("svg", {
|
|
|
827
827
|
strokeWidth: "1.5",
|
|
828
828
|
strokeLinecap: "round"
|
|
829
829
|
})
|
|
830
|
-
}),
|
|
830
|
+
}), _e = () => /* @__PURE__ */ l("svg", {
|
|
831
831
|
width: "12",
|
|
832
832
|
height: "12",
|
|
833
833
|
viewBox: "0 0 12 12",
|
|
@@ -839,36 +839,36 @@ var ve = () => /* @__PURE__ */ l("svg", {
|
|
|
839
839
|
strokeWidth: "1.5",
|
|
840
840
|
strokeLinecap: "round"
|
|
841
841
|
})
|
|
842
|
-
}),
|
|
843
|
-
if (t <= n * 2 + 5) return
|
|
842
|
+
}), J = (e, t) => Array.from({ length: t - e + 1 }, (t, n) => e + n), ve = (e, t, n) => {
|
|
843
|
+
if (t <= n * 2 + 5) return J(1, t);
|
|
844
844
|
let r = Math.max(e - n, 1), i = Math.min(e + n, t), a = r > 2, o = i < t - 1;
|
|
845
845
|
return !a && o ? [
|
|
846
|
-
...
|
|
846
|
+
...J(1, 3 + n * 2),
|
|
847
847
|
"…",
|
|
848
848
|
t
|
|
849
849
|
] : a && !o ? [
|
|
850
850
|
1,
|
|
851
851
|
"…",
|
|
852
|
-
...
|
|
852
|
+
...J(t - (2 + n * 2), t)
|
|
853
853
|
] : [
|
|
854
854
|
1,
|
|
855
855
|
"…",
|
|
856
|
-
...
|
|
856
|
+
...J(r, i),
|
|
857
857
|
"…",
|
|
858
858
|
t
|
|
859
859
|
];
|
|
860
|
-
},
|
|
860
|
+
}, Y = ({ active: e, disabled: t, children: n, ...r }) => /* @__PURE__ */ l("button", {
|
|
861
861
|
disabled: t,
|
|
862
862
|
className: (0, C.default)("pagination-button", `pagination-button-${e ? "active" : "inactive"}`),
|
|
863
863
|
...r,
|
|
864
864
|
children: n
|
|
865
|
-
}),
|
|
866
|
-
let i =
|
|
865
|
+
}), X = ({ page: e, totalPages: t, onPageChange: n, siblingsCount: r = 1 }) => {
|
|
866
|
+
let i = ve(e, t, r);
|
|
867
867
|
return /* @__PURE__ */ u("nav", {
|
|
868
868
|
"aria-label": "Pagination",
|
|
869
869
|
className: "pagination",
|
|
870
870
|
children: [
|
|
871
|
-
/* @__PURE__ */ l(
|
|
871
|
+
/* @__PURE__ */ l(Y, {
|
|
872
872
|
disabled: e <= 1,
|
|
873
873
|
onClick: () => n(e - 1),
|
|
874
874
|
"aria-label": "Previous page",
|
|
@@ -889,14 +889,14 @@ var ve = () => /* @__PURE__ */ l("svg", {
|
|
|
889
889
|
i.map((t, r) => t === "…" ? /* @__PURE__ */ l("span", {
|
|
890
890
|
className: "pagination-dots",
|
|
891
891
|
children: "…"
|
|
892
|
-
}, `dots-${r}`) : /* @__PURE__ */ l(
|
|
892
|
+
}, `dots-${r}`) : /* @__PURE__ */ l(Y, {
|
|
893
893
|
active: t === e,
|
|
894
894
|
onClick: () => n(t),
|
|
895
895
|
"aria-label": `Page ${t}`,
|
|
896
896
|
"aria-current": t === e ? "page" : void 0,
|
|
897
897
|
children: t
|
|
898
898
|
}, t)),
|
|
899
|
-
/* @__PURE__ */ l(
|
|
899
|
+
/* @__PURE__ */ l(Y, {
|
|
900
900
|
disabled: e >= t,
|
|
901
901
|
onClick: () => n(e + 1),
|
|
902
902
|
"aria-label": "Next page",
|
|
@@ -919,75 +919,89 @@ var ve = () => /* @__PURE__ */ l("svg", {
|
|
|
919
919
|
};
|
|
920
920
|
//#endregion
|
|
921
921
|
//#region src/components/common/Carousel/Carousel.tsx
|
|
922
|
-
function
|
|
923
|
-
|
|
924
|
-
|
|
922
|
+
function ye({ src: e, alt: t, children: n, className: r, style: i }) {
|
|
923
|
+
return /* @__PURE__ */ l("div", {
|
|
924
|
+
role: t ? "img" : void 0,
|
|
925
|
+
"aria-label": t,
|
|
926
|
+
className: (0, C.default)("carousel-cover", r),
|
|
927
|
+
style: {
|
|
928
|
+
backgroundImage: `url(${e})`,
|
|
929
|
+
...i
|
|
930
|
+
},
|
|
931
|
+
children: n
|
|
932
|
+
});
|
|
933
|
+
}
|
|
934
|
+
function be({ children: t, slidesPerView: i = 1, gap: d = 16, height: f, arrows: p = !0, dots: m = !0, autoPlay: h = !1, autoPlayInterval: g = 4e3, loop: _ = !1, className: v, ...y }) {
|
|
935
|
+
let b = e.toArray(t), x = b.length, S = _ ? x - 1 : Math.max(0, x - i), w = x > i, [T, E] = s(0), [D, O] = s(!1), k = o(null), A = o(null), j = o(null), M = o(null), N = n((e, t = !0) => {
|
|
936
|
+
let n = k.current;
|
|
925
937
|
if (!n) return;
|
|
926
938
|
let r = n.children[e];
|
|
927
939
|
r && (t || (n.style.transition = "none", n.getBoundingClientRect()), n.style.transform = `translateX(${-r.offsetLeft}px)`, t || (n.getBoundingClientRect(), n.style.transition = ""));
|
|
928
|
-
}, []),
|
|
929
|
-
|
|
940
|
+
}, []), P = n((e) => {
|
|
941
|
+
E(_ ? (e % x + x) % x : Math.max(0, Math.min(e, S)));
|
|
930
942
|
}, [
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
]),
|
|
943
|
+
x,
|
|
944
|
+
_,
|
|
945
|
+
S
|
|
946
|
+
]), F = n(() => P(T - 1), [T, P]), I = n(() => P(T + 1), [T, P]);
|
|
935
947
|
a(() => {
|
|
936
|
-
|
|
937
|
-
}, [
|
|
938
|
-
let e =
|
|
948
|
+
N(T);
|
|
949
|
+
}, [T, N]), r(() => {
|
|
950
|
+
let e = A.current;
|
|
939
951
|
if (!e) return;
|
|
940
|
-
let t = new ResizeObserver(() =>
|
|
952
|
+
let t = new ResizeObserver(() => N(T, !1));
|
|
941
953
|
return t.observe(e), () => t.disconnect();
|
|
942
|
-
}, [
|
|
943
|
-
if (!(!
|
|
944
|
-
|
|
954
|
+
}, [T, N]), r(() => {
|
|
955
|
+
if (!(!h || D || !w)) return j.current = setInterval(I, g), () => {
|
|
956
|
+
j.current && clearInterval(j.current);
|
|
945
957
|
};
|
|
946
958
|
}, [
|
|
947
|
-
m,
|
|
948
|
-
E,
|
|
949
959
|
h,
|
|
950
|
-
|
|
951
|
-
|
|
960
|
+
D,
|
|
961
|
+
g,
|
|
962
|
+
I,
|
|
963
|
+
w
|
|
952
964
|
]);
|
|
953
|
-
let
|
|
954
|
-
|
|
955
|
-
},
|
|
956
|
-
if (
|
|
957
|
-
let t = e.changedTouches[0].clientX -
|
|
958
|
-
Math.abs(t) > 50 && (t < 0 ?
|
|
965
|
+
let L = (e) => {
|
|
966
|
+
M.current = e.touches[0].clientX;
|
|
967
|
+
}, R = (e) => {
|
|
968
|
+
if (M.current === null) return;
|
|
969
|
+
let t = e.changedTouches[0].clientX - M.current;
|
|
970
|
+
Math.abs(t) > 50 && (t < 0 ? I() : F()), M.current = null;
|
|
959
971
|
};
|
|
960
|
-
if (
|
|
961
|
-
let
|
|
972
|
+
if (x === 0) return null;
|
|
973
|
+
let z = _ || T > 0, B = _ || T < S, V = `calc((100% - ${d}px * ${i - 1}) / ${i})`;
|
|
962
974
|
return /* @__PURE__ */ u("div", {
|
|
963
|
-
className: (0, C.default)("carousel",
|
|
964
|
-
onMouseEnter: () =>
|
|
965
|
-
onMouseLeave: () =>
|
|
966
|
-
onTouchStart:
|
|
967
|
-
onTouchEnd:
|
|
968
|
-
...
|
|
975
|
+
className: (0, C.default)("carousel", v),
|
|
976
|
+
onMouseEnter: () => O(!0),
|
|
977
|
+
onMouseLeave: () => O(!1),
|
|
978
|
+
onTouchStart: L,
|
|
979
|
+
onTouchEnd: R,
|
|
980
|
+
...y,
|
|
969
981
|
children: [
|
|
970
982
|
/* @__PURE__ */ l("div", {
|
|
971
|
-
ref:
|
|
983
|
+
ref: A,
|
|
972
984
|
className: "carousel-viewport",
|
|
985
|
+
style: f ? { height: f } : void 0,
|
|
973
986
|
children: /* @__PURE__ */ l("div", {
|
|
974
|
-
ref:
|
|
987
|
+
ref: k,
|
|
975
988
|
className: "carousel-track",
|
|
976
989
|
style: { gap: `${d}px` },
|
|
977
|
-
children:
|
|
990
|
+
children: b.map((e, t) => /* @__PURE__ */ l("div", {
|
|
978
991
|
className: "carousel-slide",
|
|
979
992
|
style: {
|
|
980
|
-
minWidth:
|
|
981
|
-
maxWidth:
|
|
993
|
+
minWidth: V,
|
|
994
|
+
maxWidth: V,
|
|
995
|
+
...f && { height: f }
|
|
982
996
|
},
|
|
983
|
-
"aria-hidden": t <
|
|
997
|
+
"aria-hidden": t < T || t >= T + i,
|
|
984
998
|
children: e
|
|
985
999
|
}, t))
|
|
986
1000
|
})
|
|
987
1001
|
}),
|
|
988
|
-
|
|
989
|
-
onClick:
|
|
990
|
-
disabled: !
|
|
1002
|
+
p && w && /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l("button", {
|
|
1003
|
+
onClick: F,
|
|
1004
|
+
disabled: !z,
|
|
991
1005
|
className: "carousel-btn carousel-btn-prev",
|
|
992
1006
|
"aria-label": "Previous slide",
|
|
993
1007
|
children: /* @__PURE__ */ l("svg", {
|
|
@@ -1004,8 +1018,8 @@ function xe({ children: t, slidesPerView: i = 1, gap: d = 16, arrows: f = !0, do
|
|
|
1004
1018
|
})
|
|
1005
1019
|
})
|
|
1006
1020
|
}), /* @__PURE__ */ l("button", {
|
|
1007
|
-
onClick:
|
|
1008
|
-
disabled: !
|
|
1021
|
+
onClick: I,
|
|
1022
|
+
disabled: !B,
|
|
1009
1023
|
className: "carousel-btn carousel-btn-next",
|
|
1010
1024
|
"aria-label": "Next slide",
|
|
1011
1025
|
children: /* @__PURE__ */ l("svg", {
|
|
@@ -1022,13 +1036,13 @@ function xe({ children: t, slidesPerView: i = 1, gap: d = 16, arrows: f = !0, do
|
|
|
1022
1036
|
})
|
|
1023
1037
|
})
|
|
1024
1038
|
})] }),
|
|
1025
|
-
|
|
1039
|
+
m && w && /* @__PURE__ */ l("div", {
|
|
1026
1040
|
className: "carousel-dots",
|
|
1027
|
-
children: Array.from({ length:
|
|
1028
|
-
onClick: () =>
|
|
1029
|
-
className: (0, C.default)("carousel-dot", t ===
|
|
1041
|
+
children: Array.from({ length: S + 1 }).map((e, t) => /* @__PURE__ */ l("button", {
|
|
1042
|
+
onClick: () => P(t),
|
|
1043
|
+
className: (0, C.default)("carousel-dot", t === T && "carousel-dot-active"),
|
|
1030
1044
|
"aria-label": `Go to slide ${t + 1}`,
|
|
1031
|
-
"aria-current": t ===
|
|
1045
|
+
"aria-current": t === T ? "true" : void 0
|
|
1032
1046
|
}, t))
|
|
1033
1047
|
})
|
|
1034
1048
|
]
|
|
@@ -1036,7 +1050,7 @@ function xe({ children: t, slidesPerView: i = 1, gap: d = 16, arrows: f = !0, do
|
|
|
1036
1050
|
}
|
|
1037
1051
|
//#endregion
|
|
1038
1052
|
//#region src/components/Header/Header.tsx
|
|
1039
|
-
function
|
|
1053
|
+
function Z({ trigger: e, items: t, onSelect: n, getKey: r, renderItem: i }) {
|
|
1040
1054
|
let [a, c] = s(!1), d = o(null), f = () => c(!1);
|
|
1041
1055
|
return /* @__PURE__ */ u("div", {
|
|
1042
1056
|
ref: d,
|
|
@@ -1071,7 +1085,7 @@ function Y({ trigger: e, items: t, onSelect: n, getKey: r, renderItem: i }) {
|
|
|
1071
1085
|
})]
|
|
1072
1086
|
});
|
|
1073
1087
|
}
|
|
1074
|
-
function
|
|
1088
|
+
function xe() {
|
|
1075
1089
|
return /* @__PURE__ */ l("svg", {
|
|
1076
1090
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1077
1091
|
fill: "none",
|
|
@@ -1086,7 +1100,7 @@ function Se() {
|
|
|
1086
1100
|
})
|
|
1087
1101
|
});
|
|
1088
1102
|
}
|
|
1089
|
-
function
|
|
1103
|
+
function Se({ logo: e, searchPlaceholder: t = "Hledat produkty…", onSearch: n, cartItemCount: r = 0, onCartClick: i, isLoggedIn: a = !1, customerName: o, onCustomerClick: d, currencies: f = [], selectedCurrency: p, onCurrencyChange: m, locales: h = [], selectedLocale: g, onLocaleChange: _, rightSlot: v }) {
|
|
1090
1104
|
let [y, b] = s(""), x = f.find((e) => e.code === p), S = h.find((e) => e.code === g);
|
|
1091
1105
|
return /* @__PURE__ */ l("header", {
|
|
1092
1106
|
className: "bg-white border-b border-gray-200 sticky top-0 z-40",
|
|
@@ -1109,7 +1123,7 @@ function Ce({ logo: e, searchPlaceholder: t = "Hledat produkty…", onSearch: n,
|
|
|
1109
1123
|
onKeyDown: (e) => {
|
|
1110
1124
|
e.key === "Enter" && n?.(y);
|
|
1111
1125
|
},
|
|
1112
|
-
leftIcon: /* @__PURE__ */ l(
|
|
1126
|
+
leftIcon: /* @__PURE__ */ l(xe, {}),
|
|
1113
1127
|
rightIcon: y ? /* @__PURE__ */ l("button", {
|
|
1114
1128
|
onClick: () => {
|
|
1115
1129
|
b(""), n?.("");
|
|
@@ -1135,7 +1149,7 @@ function Ce({ logo: e, searchPlaceholder: t = "Hledat produkty…", onSearch: n,
|
|
|
1135
1149
|
/* @__PURE__ */ u("div", {
|
|
1136
1150
|
className: "flex items-center gap-1 shrink-0 ml-auto",
|
|
1137
1151
|
children: [
|
|
1138
|
-
f.length > 0 && /* @__PURE__ */ l(
|
|
1152
|
+
f.length > 0 && /* @__PURE__ */ l(Z, {
|
|
1139
1153
|
trigger: /* @__PURE__ */ u("button", {
|
|
1140
1154
|
className: "flex items-center gap-1 px-2 py-1.5 rounded-md text-sm text-gray-600 hover:bg-gray-50 transition-colors font-medium",
|
|
1141
1155
|
children: [
|
|
@@ -1144,7 +1158,7 @@ function Ce({ logo: e, searchPlaceholder: t = "Hledat produkty…", onSearch: n,
|
|
|
1144
1158
|
className: "text-xs text-gray-400",
|
|
1145
1159
|
children: x?.code ?? p
|
|
1146
1160
|
}),
|
|
1147
|
-
/* @__PURE__ */ l(
|
|
1161
|
+
/* @__PURE__ */ l(Q, { className: "w-3 h-3 text-gray-400" })
|
|
1148
1162
|
]
|
|
1149
1163
|
}),
|
|
1150
1164
|
items: f,
|
|
@@ -1158,7 +1172,7 @@ function Ce({ logo: e, searchPlaceholder: t = "Hledat produkty…", onSearch: n,
|
|
|
1158
1172
|
}), /* @__PURE__ */ l("span", { children: e.label })]
|
|
1159
1173
|
})
|
|
1160
1174
|
}),
|
|
1161
|
-
h.length > 0 && /* @__PURE__ */ l(
|
|
1175
|
+
h.length > 0 && /* @__PURE__ */ l(Z, {
|
|
1162
1176
|
trigger: /* @__PURE__ */ u("button", {
|
|
1163
1177
|
className: "flex items-center gap-1 px-2 py-1.5 rounded-md text-sm text-gray-600 hover:bg-gray-50 transition-colors",
|
|
1164
1178
|
children: [
|
|
@@ -1170,7 +1184,7 @@ function Ce({ logo: e, searchPlaceholder: t = "Hledat produkty…", onSearch: n,
|
|
|
1170
1184
|
className: "font-medium uppercase",
|
|
1171
1185
|
children: S?.code ?? g
|
|
1172
1186
|
}),
|
|
1173
|
-
/* @__PURE__ */ l(
|
|
1187
|
+
/* @__PURE__ */ l(Q, { className: "w-3 h-3 text-gray-400" })
|
|
1174
1188
|
]
|
|
1175
1189
|
}),
|
|
1176
1190
|
items: h,
|
|
@@ -1195,7 +1209,7 @@ function Ce({ logo: e, searchPlaceholder: t = "Hledat produkty…", onSearch: n,
|
|
|
1195
1209
|
}), o && /* @__PURE__ */ l("span", {
|
|
1196
1210
|
className: "hidden sm:block font-medium max-w-32 truncate",
|
|
1197
1211
|
children: o
|
|
1198
|
-
})] }) : /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l(
|
|
1212
|
+
})] }) : /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l(Ce, { className: "w-5 h-5" }), /* @__PURE__ */ l("span", {
|
|
1199
1213
|
className: "hidden sm:block font-medium",
|
|
1200
1214
|
children: "Přihlásit se"
|
|
1201
1215
|
})] })
|
|
@@ -1205,7 +1219,7 @@ function Ce({ logo: e, searchPlaceholder: t = "Hledat produkty…", onSearch: n,
|
|
|
1205
1219
|
className: "relative flex items-center gap-1.5 px-2.5 py-1.5 rounded-md text-sm text-gray-600 hover:bg-gray-50 transition-colors",
|
|
1206
1220
|
"aria-label": `Cart, ${r} items`,
|
|
1207
1221
|
children: [
|
|
1208
|
-
/* @__PURE__ */ l(
|
|
1222
|
+
/* @__PURE__ */ l(we, { className: "w-5 h-5" }),
|
|
1209
1223
|
/* @__PURE__ */ l("span", {
|
|
1210
1224
|
className: "hidden sm:block font-medium",
|
|
1211
1225
|
children: "Košík"
|
|
@@ -1223,7 +1237,7 @@ function Ce({ logo: e, searchPlaceholder: t = "Hledat produkty…", onSearch: n,
|
|
|
1223
1237
|
})
|
|
1224
1238
|
});
|
|
1225
1239
|
}
|
|
1226
|
-
function
|
|
1240
|
+
function Q({ className: e }) {
|
|
1227
1241
|
return /* @__PURE__ */ l("svg", {
|
|
1228
1242
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1229
1243
|
fill: "none",
|
|
@@ -1238,7 +1252,7 @@ function X({ className: e }) {
|
|
|
1238
1252
|
})
|
|
1239
1253
|
});
|
|
1240
1254
|
}
|
|
1241
|
-
function
|
|
1255
|
+
function Ce({ className: e }) {
|
|
1242
1256
|
return /* @__PURE__ */ l("svg", {
|
|
1243
1257
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1244
1258
|
fill: "none",
|
|
@@ -1253,7 +1267,7 @@ function we({ className: e }) {
|
|
|
1253
1267
|
})
|
|
1254
1268
|
});
|
|
1255
1269
|
}
|
|
1256
|
-
function
|
|
1270
|
+
function we({ className: e }) {
|
|
1257
1271
|
return /* @__PURE__ */ l("svg", {
|
|
1258
1272
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1259
1273
|
fill: "none",
|
|
@@ -1270,8 +1284,8 @@ function Te({ className: e }) {
|
|
|
1270
1284
|
}
|
|
1271
1285
|
//#endregion
|
|
1272
1286
|
//#region src/components/CategoryTree/CategoryTree.tsx
|
|
1273
|
-
function
|
|
1274
|
-
let o = e.children && e.children.length > 0, [c, d] = s(a ||
|
|
1287
|
+
function $({ node: e, activeId: t, onSelect: n, showCounts: r, depth: i, defaultExpandAll: a }) {
|
|
1288
|
+
let o = e.children && e.children.length > 0, [c, d] = s(a || Te(e, t)), f = e.id === t;
|
|
1275
1289
|
return /* @__PURE__ */ u("li", { children: [/* @__PURE__ */ u("div", {
|
|
1276
1290
|
className: [
|
|
1277
1291
|
"group flex items-center gap-1.5 rounded-lg px-2 py-1.5 cursor-pointer select-none",
|
|
@@ -1321,7 +1335,7 @@ function Z({ node: e, activeId: t, onSelect: n, showCounts: r, depth: i, default
|
|
|
1321
1335
|
]
|
|
1322
1336
|
}), o && c && /* @__PURE__ */ l("ul", {
|
|
1323
1337
|
role: "group",
|
|
1324
|
-
children: e.children.map((e) => /* @__PURE__ */ l(
|
|
1338
|
+
children: e.children.map((e) => /* @__PURE__ */ l($, {
|
|
1325
1339
|
node: e,
|
|
1326
1340
|
activeId: t,
|
|
1327
1341
|
onSelect: n,
|
|
@@ -1331,8 +1345,8 @@ function Z({ node: e, activeId: t, onSelect: n, showCounts: r, depth: i, default
|
|
|
1331
1345
|
}, e.id))
|
|
1332
1346
|
})] });
|
|
1333
1347
|
}
|
|
1334
|
-
function
|
|
1335
|
-
return !t || !e.children ? !1 : e.children.some((e) => e.id === t ||
|
|
1348
|
+
function Te(e, t) {
|
|
1349
|
+
return !t || !e.children ? !1 : e.children.some((e) => e.id === t || Te(e, t));
|
|
1336
1350
|
}
|
|
1337
1351
|
function Ee({ categories: e, activeId: t, onSelect: n, showCounts: r = !0, defaultExpandAll: i = !1, className: a = "", ...o }) {
|
|
1338
1352
|
let s = (e) => n?.(e);
|
|
@@ -1343,7 +1357,7 @@ function Ee({ categories: e, activeId: t, onSelect: n, showCounts: r = !0, defau
|
|
|
1343
1357
|
children: /* @__PURE__ */ l("ul", {
|
|
1344
1358
|
role: "tree",
|
|
1345
1359
|
className: "space-y-0.5",
|
|
1346
|
-
children: e.map((e) => /* @__PURE__ */ l(
|
|
1360
|
+
children: e.map((e) => /* @__PURE__ */ l($, {
|
|
1347
1361
|
node: e,
|
|
1348
1362
|
activeId: t,
|
|
1349
1363
|
onSelect: s,
|
|
@@ -1671,13 +1685,13 @@ function Me(e) {
|
|
|
1671
1685
|
let t = e.toLowerCase();
|
|
1672
1686
|
return t === "sale" || t === "akce" ? "danger" : t === "new" || t === "nové" ? "primary" : t === "hot" ? "warning" : "default";
|
|
1673
1687
|
}
|
|
1674
|
-
function
|
|
1688
|
+
function Ne(e, t = "Kč") {
|
|
1675
1689
|
return `${e.toLocaleString("cs-CZ")} ${t}`;
|
|
1676
1690
|
}
|
|
1677
|
-
function
|
|
1691
|
+
function Pe(e, t) {
|
|
1678
1692
|
return Math.round((1 - t / e) * 100);
|
|
1679
1693
|
}
|
|
1680
|
-
function
|
|
1694
|
+
function Fe({ product: e, onAddToCart: t, onWishlistToggle: n, isWishlisted: r = !1, onProductClick: i, size: a = "default", className: o = "" }) {
|
|
1681
1695
|
let [c, d] = s(!1), [f, p] = s(!1), m = e.originalPrice !== void 0 && e.originalPrice > e.price;
|
|
1682
1696
|
return /* @__PURE__ */ u("article", {
|
|
1683
1697
|
className: [
|
|
@@ -1704,7 +1718,7 @@ function Pe({ product: e, onAddToCart: t, onWishlistToggle: n, isWishlisted: r =
|
|
|
1704
1718
|
children: /* @__PURE__ */ l(j, {
|
|
1705
1719
|
variant: Me(e.badge),
|
|
1706
1720
|
size: "sm",
|
|
1707
|
-
children: e.badge === "sale" && m ? `-${
|
|
1721
|
+
children: e.badge === "sale" && m ? `-${Pe(e.originalPrice, e.price)}%` : e.badge
|
|
1708
1722
|
})
|
|
1709
1723
|
}),
|
|
1710
1724
|
e.inStock === !1 && /* @__PURE__ */ l("div", {
|
|
@@ -1795,10 +1809,10 @@ function Pe({ product: e, onAddToCart: t, onWishlistToggle: n, isWishlisted: r =
|
|
|
1795
1809
|
className: "flex items-baseline gap-2 mt-auto pt-1",
|
|
1796
1810
|
children: [/* @__PURE__ */ l("span", {
|
|
1797
1811
|
className: `font-bold text-gray-900 ${a === "compact" ? "text-base" : "text-lg"}`,
|
|
1798
|
-
children:
|
|
1812
|
+
children: Ne(e.price, e.currency)
|
|
1799
1813
|
}), m && /* @__PURE__ */ l("span", {
|
|
1800
1814
|
className: "text-sm text-gray-400 line-through",
|
|
1801
|
-
children:
|
|
1815
|
+
children: Ne(e.originalPrice, e.currency)
|
|
1802
1816
|
})]
|
|
1803
1817
|
})
|
|
1804
1818
|
]
|
|
@@ -1807,12 +1821,12 @@ function Pe({ product: e, onAddToCart: t, onWishlistToggle: n, isWishlisted: r =
|
|
|
1807
1821
|
}
|
|
1808
1822
|
//#endregion
|
|
1809
1823
|
//#region src/components/ProductGrid/ProductGrid.tsx
|
|
1810
|
-
var
|
|
1824
|
+
var Ie = {
|
|
1811
1825
|
2: "grid-cols-2",
|
|
1812
1826
|
3: "grid-cols-2 md:grid-cols-3",
|
|
1813
1827
|
4: "grid-cols-2 sm:grid-cols-3 lg:grid-cols-4",
|
|
1814
1828
|
5: "grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5"
|
|
1815
|
-
},
|
|
1829
|
+
}, Le = [
|
|
1816
1830
|
{
|
|
1817
1831
|
value: "newest",
|
|
1818
1832
|
label: "Nejnovější"
|
|
@@ -1834,7 +1848,7 @@ var Fe = {
|
|
|
1834
1848
|
label: "Bestsellery"
|
|
1835
1849
|
}
|
|
1836
1850
|
];
|
|
1837
|
-
function
|
|
1851
|
+
function Re() {
|
|
1838
1852
|
return /* @__PURE__ */ u("div", {
|
|
1839
1853
|
className: "rounded-xl border border-gray-100 overflow-hidden animate-pulse",
|
|
1840
1854
|
children: [/* @__PURE__ */ l("div", { className: "aspect-4/3 bg-gray-200" }), /* @__PURE__ */ u("div", {
|
|
@@ -1847,7 +1861,7 @@ function Le() {
|
|
|
1847
1861
|
})]
|
|
1848
1862
|
});
|
|
1849
1863
|
}
|
|
1850
|
-
function
|
|
1864
|
+
function ze({ products: e, totalCount: t, page: n = 1, onPageChange: r, perPage: i = 20, columns: a = 4, sortOptions: o = Le, selectedSort: s, onSortChange: c, activeFilters: d = [], onRemoveFilter: f, onClearFilters: p, loading: m = !1, emptyState: h, onAddToCart: g, onWishlistToggle: _, onProductClick: v, wishlisted: y = [], className: b = "" }) {
|
|
1851
1865
|
let x = t ? Math.ceil(t / i) : void 0, S = a >= 5 ? "compact" : "default";
|
|
1852
1866
|
return /* @__PURE__ */ u("div", {
|
|
1853
1867
|
className: ["w-full", b].filter(Boolean).join(" "),
|
|
@@ -1900,8 +1914,8 @@ function Re({ products: e, totalCount: t, page: n = 1, onPageChange: r, perPage:
|
|
|
1900
1914
|
})]
|
|
1901
1915
|
}),
|
|
1902
1916
|
m ? /* @__PURE__ */ l("div", {
|
|
1903
|
-
className: `grid gap-4 ${
|
|
1904
|
-
children: Array.from({ length: i > 12 ? 12 : i }).map((e, t) => /* @__PURE__ */ l(
|
|
1917
|
+
className: `grid gap-4 ${Ie[a]}`,
|
|
1918
|
+
children: Array.from({ length: i > 12 ? 12 : i }).map((e, t) => /* @__PURE__ */ l(Re, {}, t))
|
|
1905
1919
|
}) : e.length === 0 ? /* @__PURE__ */ l("div", {
|
|
1906
1920
|
className: "py-16 text-center",
|
|
1907
1921
|
children: h ?? /* @__PURE__ */ u("div", {
|
|
@@ -1927,8 +1941,8 @@ function Re({ products: e, totalCount: t, page: n = 1, onPageChange: r, perPage:
|
|
|
1927
1941
|
]
|
|
1928
1942
|
})
|
|
1929
1943
|
}) : /* @__PURE__ */ l("div", {
|
|
1930
|
-
className: `grid gap-4 ${
|
|
1931
|
-
children: e.map((e) => /* @__PURE__ */ l(
|
|
1944
|
+
className: `grid gap-4 ${Ie[a]}`,
|
|
1945
|
+
children: e.map((e) => /* @__PURE__ */ l(Fe, {
|
|
1932
1946
|
product: e,
|
|
1933
1947
|
size: S,
|
|
1934
1948
|
onAddToCart: g,
|
|
@@ -1939,7 +1953,7 @@ function Re({ products: e, totalCount: t, page: n = 1, onPageChange: r, perPage:
|
|
|
1939
1953
|
}),
|
|
1940
1954
|
x && x > 1 && r && /* @__PURE__ */ l("div", {
|
|
1941
1955
|
className: "flex justify-center mt-8",
|
|
1942
|
-
children: /* @__PURE__ */ l(
|
|
1956
|
+
children: /* @__PURE__ */ l(X, {
|
|
1943
1957
|
page: n,
|
|
1944
1958
|
totalPages: x,
|
|
1945
1959
|
onPageChange: r
|
|
@@ -1950,14 +1964,14 @@ function Re({ products: e, totalCount: t, page: n = 1, onPageChange: r, perPage:
|
|
|
1950
1964
|
}
|
|
1951
1965
|
//#endregion
|
|
1952
1966
|
//#region src/components/CallToAction/CallToAction.tsx
|
|
1953
|
-
var
|
|
1967
|
+
var Be = {
|
|
1954
1968
|
default: "bg-gray-50 border border-gray-200",
|
|
1955
1969
|
primary: "bg-primary-600",
|
|
1956
1970
|
dark: "bg-gray-900",
|
|
1957
1971
|
gradient: "bg-linear-to-br from-primary-600 via-primary-700 to-violet-700",
|
|
1958
1972
|
outline: "bg-white border-2 border-primary-600",
|
|
1959
1973
|
image: "relative overflow-hidden"
|
|
1960
|
-
},
|
|
1974
|
+
}, Ve = {
|
|
1961
1975
|
default: {
|
|
1962
1976
|
eyebrow: "text-primary-600",
|
|
1963
1977
|
title: "text-gray-900",
|
|
@@ -1988,7 +2002,7 @@ var ze = {
|
|
|
1988
2002
|
title: "text-white",
|
|
1989
2003
|
description: "text-white/80"
|
|
1990
2004
|
}
|
|
1991
|
-
},
|
|
2005
|
+
}, He = {
|
|
1992
2006
|
sm: {
|
|
1993
2007
|
wrapper: "px-6 py-6 rounded-xl",
|
|
1994
2008
|
title: "text-xl font-bold",
|
|
@@ -2013,7 +2027,7 @@ var ze = {
|
|
|
2013
2027
|
description: "text-xl",
|
|
2014
2028
|
eyebrow: "text-sm"
|
|
2015
2029
|
}
|
|
2016
|
-
},
|
|
2030
|
+
}, Ue = {
|
|
2017
2031
|
left: {
|
|
2018
2032
|
wrapper: "items-start text-left",
|
|
2019
2033
|
actions: "justify-start"
|
|
@@ -2027,8 +2041,8 @@ var ze = {
|
|
|
2027
2041
|
actions: "justify-end"
|
|
2028
2042
|
}
|
|
2029
2043
|
};
|
|
2030
|
-
function
|
|
2031
|
-
let h =
|
|
2044
|
+
function We({ eyebrow: e, title: t, description: n, actions: r = [], align: i = "center", layout: a = "stacked", size: o = "md", variant: s = "default", background: c, backgroundImage: d, media: f, className: p = "", style: m }) {
|
|
2045
|
+
let h = Ve[s], g = He[o], _ = Ue[i], v = a === "inline", y = {
|
|
2032
2046
|
...c ? { background: c } : {},
|
|
2033
2047
|
...d ? {
|
|
2034
2048
|
backgroundImage: `url(${d})`,
|
|
@@ -2040,7 +2054,7 @@ function Ue({ eyebrow: e, title: t, description: n, actions: r = [], align: i =
|
|
|
2040
2054
|
return /* @__PURE__ */ u("div", {
|
|
2041
2055
|
className: [
|
|
2042
2056
|
"w-full",
|
|
2043
|
-
|
|
2057
|
+
Be[s],
|
|
2044
2058
|
g.wrapper,
|
|
2045
2059
|
p
|
|
2046
2060
|
].filter(Boolean).join(" "),
|
|
@@ -2073,7 +2087,7 @@ function Ue({ eyebrow: e, title: t, description: n, actions: r = [], align: i =
|
|
|
2073
2087
|
className: `flex flex-wrap gap-3 ${v ? "shrink-0" : _.actions}`,
|
|
2074
2088
|
children: r.map((e, t) => {
|
|
2075
2089
|
let n = /* @__PURE__ */ l(w, {
|
|
2076
|
-
variant: e.variant ?? (t === 0 ?
|
|
2090
|
+
variant: e.variant ?? (t === 0 ? Ge(s) : "outline"),
|
|
2077
2091
|
size: e.size ?? (o === "sm" ? "sm" : o === "xl" ? "lg" : "md"),
|
|
2078
2092
|
onClick: e.onClick,
|
|
2079
2093
|
children: e.label
|
|
@@ -2089,12 +2103,12 @@ function Ue({ eyebrow: e, title: t, description: n, actions: r = [], align: i =
|
|
|
2089
2103
|
})]
|
|
2090
2104
|
});
|
|
2091
2105
|
}
|
|
2092
|
-
function
|
|
2106
|
+
function Ge(e) {
|
|
2093
2107
|
return e === "default" || e === "outline" ? "primary" : "secondary";
|
|
2094
2108
|
}
|
|
2095
2109
|
//#endregion
|
|
2096
2110
|
//#region src/components/Footer/Footer.tsx
|
|
2097
|
-
function
|
|
2111
|
+
function Ke() {
|
|
2098
2112
|
return /* @__PURE__ */ l("svg", {
|
|
2099
2113
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2100
2114
|
fill: "none",
|
|
@@ -2109,7 +2123,7 @@ function Ge() {
|
|
|
2109
2123
|
})
|
|
2110
2124
|
});
|
|
2111
2125
|
}
|
|
2112
|
-
function
|
|
2126
|
+
function qe() {
|
|
2113
2127
|
return /* @__PURE__ */ l("svg", {
|
|
2114
2128
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2115
2129
|
fill: "none",
|
|
@@ -2124,7 +2138,7 @@ function Ke() {
|
|
|
2124
2138
|
})
|
|
2125
2139
|
});
|
|
2126
2140
|
}
|
|
2127
|
-
function
|
|
2141
|
+
function Je() {
|
|
2128
2142
|
return /* @__PURE__ */ u("svg", {
|
|
2129
2143
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2130
2144
|
fill: "none",
|
|
@@ -2143,7 +2157,7 @@ function qe() {
|
|
|
2143
2157
|
})]
|
|
2144
2158
|
});
|
|
2145
2159
|
}
|
|
2146
|
-
function
|
|
2160
|
+
function Ye() {
|
|
2147
2161
|
return /* @__PURE__ */ l("svg", {
|
|
2148
2162
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2149
2163
|
fill: "none",
|
|
@@ -2158,7 +2172,7 @@ function Je() {
|
|
|
2158
2172
|
})
|
|
2159
2173
|
});
|
|
2160
2174
|
}
|
|
2161
|
-
function
|
|
2175
|
+
function Xe() {
|
|
2162
2176
|
return /* @__PURE__ */ l("svg", {
|
|
2163
2177
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2164
2178
|
viewBox: "0 0 24 24",
|
|
@@ -2167,7 +2181,7 @@ function Ye() {
|
|
|
2167
2181
|
children: /* @__PURE__ */ l("path", { d: "M24 12.073C24 5.405 18.627 0 12 0S0 5.405 0 12.073C0 18.1 4.388 23.094 10.125 24v-8.437H7.078v-3.49h3.047V9.41c0-3.025 1.792-4.697 4.533-4.697 1.312 0 2.686.236 2.686.236v2.97h-1.513c-1.491 0-1.956.93-1.956 1.886v2.267h3.328l-.532 3.49h-2.796V24C19.612 23.094 24 18.1 24 12.073z" })
|
|
2168
2182
|
});
|
|
2169
2183
|
}
|
|
2170
|
-
function
|
|
2184
|
+
function Ze() {
|
|
2171
2185
|
return /* @__PURE__ */ l("svg", {
|
|
2172
2186
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2173
2187
|
viewBox: "0 0 24 24",
|
|
@@ -2176,7 +2190,7 @@ function Xe() {
|
|
|
2176
2190
|
children: /* @__PURE__ */ l("path", { d: "M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zm0-2.163c-3.259 0-3.667.014-4.947.072-4.358.2-6.78 2.618-6.98 6.98-.059 1.281-.073 1.689-.073 4.948 0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98 1.281.058 1.689.072 4.948.072 3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98-1.281-.059-1.69-.073-4.949-.073zm0 5.838a6.162 6.162 0 100 12.324 6.162 6.162 0 000-12.324zM12 16a4 4 0 110-8 4 4 0 010 8zm6.406-11.845a1.44 1.44 0 100 2.881 1.44 1.44 0 000-2.881z" })
|
|
2177
2191
|
});
|
|
2178
2192
|
}
|
|
2179
|
-
function
|
|
2193
|
+
function Qe() {
|
|
2180
2194
|
return /* @__PURE__ */ l("svg", {
|
|
2181
2195
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2182
2196
|
viewBox: "0 0 24 24",
|
|
@@ -2185,7 +2199,7 @@ function Ze() {
|
|
|
2185
2199
|
children: /* @__PURE__ */ l("path", { d: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" })
|
|
2186
2200
|
});
|
|
2187
2201
|
}
|
|
2188
|
-
function
|
|
2202
|
+
function $e() {
|
|
2189
2203
|
return /* @__PURE__ */ l("svg", {
|
|
2190
2204
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2191
2205
|
viewBox: "0 0 24 24",
|
|
@@ -2194,7 +2208,7 @@ function Qe() {
|
|
|
2194
2208
|
children: /* @__PURE__ */ l("path", { d: "M23.498 6.186a3.016 3.016 0 00-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 00.502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 002.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 002.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z" })
|
|
2195
2209
|
});
|
|
2196
2210
|
}
|
|
2197
|
-
function
|
|
2211
|
+
function et() {
|
|
2198
2212
|
return /* @__PURE__ */ l("svg", {
|
|
2199
2213
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2200
2214
|
viewBox: "0 0 24 24",
|
|
@@ -2203,34 +2217,34 @@ function $e() {
|
|
|
2203
2217
|
children: /* @__PURE__ */ l("path", { d: "M19.59 6.69a4.83 4.83 0 01-3.77-4.25V2h-3.45v13.67a2.89 2.89 0 01-2.88 2.5 2.89 2.89 0 01-2.89-2.89 2.89 2.89 0 012.89-2.89c.28 0 .54.04.79.1V9.01a6.33 6.33 0 00-.79-.05 6.34 6.34 0 00-6.34 6.34 6.34 6.34 0 006.34 6.34 6.34 6.34 0 006.33-6.34V8.69a8.18 8.18 0 004.78 1.52V6.76a4.85 4.85 0 01-1.01-.07z" })
|
|
2204
2218
|
});
|
|
2205
2219
|
}
|
|
2206
|
-
var
|
|
2207
|
-
facebook:
|
|
2208
|
-
instagram:
|
|
2209
|
-
twitter:
|
|
2210
|
-
youtube:
|
|
2211
|
-
tiktok:
|
|
2212
|
-
},
|
|
2213
|
-
phone:
|
|
2214
|
-
email:
|
|
2215
|
-
address:
|
|
2216
|
-
hours:
|
|
2220
|
+
var tt = {
|
|
2221
|
+
facebook: Xe,
|
|
2222
|
+
instagram: Ze,
|
|
2223
|
+
twitter: Qe,
|
|
2224
|
+
youtube: $e,
|
|
2225
|
+
tiktok: et
|
|
2226
|
+
}, nt = {
|
|
2227
|
+
phone: Ke,
|
|
2228
|
+
email: qe,
|
|
2229
|
+
address: Je,
|
|
2230
|
+
hours: Ye
|
|
2217
2231
|
};
|
|
2218
|
-
function
|
|
2232
|
+
function rt(e) {
|
|
2219
2233
|
if (!e) return null;
|
|
2220
2234
|
if (typeof e == "string") {
|
|
2221
|
-
let t =
|
|
2235
|
+
let t = nt[e];
|
|
2222
2236
|
return t ? /* @__PURE__ */ l(t, {}) : null;
|
|
2223
2237
|
}
|
|
2224
2238
|
return e;
|
|
2225
2239
|
}
|
|
2226
|
-
function
|
|
2240
|
+
function it(e) {
|
|
2227
2241
|
if (typeof e == "string") {
|
|
2228
|
-
let t =
|
|
2242
|
+
let t = tt[e];
|
|
2229
2243
|
return t ? /* @__PURE__ */ l(t, {}) : null;
|
|
2230
2244
|
}
|
|
2231
2245
|
return e;
|
|
2232
2246
|
}
|
|
2233
|
-
function
|
|
2247
|
+
function at({ logo: e, tagline: t, contactHeading: n = "Kontakty", contacts: r = [], linkGroups: i = [], socialLinks: a = [], copyright: o, bottomLinks: s = [], className: c = "" }) {
|
|
2234
2248
|
let d = (/* @__PURE__ */ new Date()).getFullYear();
|
|
2235
2249
|
return /* @__PURE__ */ l("footer", {
|
|
2236
2250
|
className: ["bg-gray-900 text-gray-300", c].filter(Boolean).join(" "),
|
|
@@ -2255,7 +2269,7 @@ function it({ logo: e, tagline: t, contactHeading: n = "Kontakty", contacts: r =
|
|
|
2255
2269
|
}), /* @__PURE__ */ l("ul", {
|
|
2256
2270
|
className: "space-y-3",
|
|
2257
2271
|
children: r.map((e, t) => {
|
|
2258
|
-
let n =
|
|
2272
|
+
let n = rt(e.icon), r = /* @__PURE__ */ u("div", {
|
|
2259
2273
|
className: "flex items-start gap-2.5",
|
|
2260
2274
|
children: [n && /* @__PURE__ */ l("span", {
|
|
2261
2275
|
className: "mt-0.5 text-primary-400",
|
|
@@ -2280,7 +2294,7 @@ function it({ logo: e, tagline: t, contactHeading: n = "Kontakty", contacts: r =
|
|
|
2280
2294
|
href: e.href,
|
|
2281
2295
|
"aria-label": e.label,
|
|
2282
2296
|
className: "w-8 h-8 flex items-center justify-center rounded-lg bg-gray-800 text-gray-400 hover:bg-primary-600 hover:text-white transition-colors",
|
|
2283
|
-
children:
|
|
2297
|
+
children: it(e.icon)
|
|
2284
2298
|
}, t))
|
|
2285
2299
|
})
|
|
2286
2300
|
]
|
|
@@ -2326,6 +2340,6 @@ function it({ logo: e, tagline: t, contactHeading: n = "Kontakty", contacts: r =
|
|
|
2326
2340
|
});
|
|
2327
2341
|
}
|
|
2328
2342
|
//#endregion
|
|
2329
|
-
export { z as Alert,
|
|
2343
|
+
export { z as Alert, ee as Avatar, j as Badge, ke as BannerCarousel, w as Button, We as CallToAction, N as Card, F as CardBody, I as CardFooter, P as CardHeader, be as Carousel, ye as CarouselCover, Ee as CategoryTree, H as Checkbox, K as Col, x as Container, at as Footer, G as Grid, Se as Header, k as Heading, E as IconButton, D as Input, T as LoadingSpin, S as Main, Oe as MegaMenu, V as Modal, X as Pagination, Fe as ProductCard, ze as ProductGrid, q as QuantityInput, O as Select, L as Spinner, te as Stack, A as Text, U as Toggle };
|
|
2330
2344
|
|
|
2331
2345
|
//# sourceMappingURL=index.js.map
|