@shopito/design-system-fe 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common/Container/Container.d.ts +6 -0
- package/dist/common/Container/Container.d.ts.map +1 -0
- package/dist/common/Container/index.d.ts +2 -0
- package/dist/common/Container/index.d.ts.map +1 -0
- package/dist/common/Main/Main.d.ts +6 -0
- package/dist/common/Main/Main.d.ts.map +1 -0
- package/dist/common/Main/index.d.ts +2 -0
- package/dist/common/Main/index.d.ts.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +176 -170
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8,10 +8,16 @@ var l = Object.create, u = Object.defineProperty, d = Object.getOwnPropertyDescr
|
|
|
8
8
|
enumerable: !(r = d(t, s)) || r.enumerable
|
|
9
9
|
});
|
|
10
10
|
return e;
|
|
11
|
-
}, _ =
|
|
11
|
+
}, _ = (e, t, n) => (n = e == null ? {} : l(p(e)), g(t || !e || !e.__esModule ? u(n, "default", {
|
|
12
12
|
value: e,
|
|
13
13
|
enumerable: !0
|
|
14
|
-
}) : n, e)))
|
|
14
|
+
}) : n, e)), v = ({ children: e }) => /* @__PURE__ */ o("div", {
|
|
15
|
+
className: "container",
|
|
16
|
+
children: e
|
|
17
|
+
}), y = ({ children: e }) => /* @__PURE__ */ o("main", {
|
|
18
|
+
className: "main",
|
|
19
|
+
children: e
|
|
20
|
+
}), b = /* @__PURE__ */ _((/* @__PURE__ */ h(((e, t) => {
|
|
15
21
|
(function() {
|
|
16
22
|
var e = {}.hasOwnProperty;
|
|
17
23
|
function n() {
|
|
@@ -37,10 +43,10 @@ var l = Object.create, u = Object.defineProperty, d = Object.getOwnPropertyDescr
|
|
|
37
43
|
return n;
|
|
38
44
|
}) : window.classNames = n;
|
|
39
45
|
})();
|
|
40
|
-
})))(), 1),
|
|
46
|
+
})))(), 1), x = e(({ variant: e = "primary", size: t = "md", loading: n = !1, fullWidth: r = !1, disabled: i, children: a, className: c = "", ...l }, u) => /* @__PURE__ */ s("button", {
|
|
41
47
|
ref: u,
|
|
42
48
|
disabled: i || n,
|
|
43
|
-
className: (0,
|
|
49
|
+
className: (0, b.default)("btn", e && `btn-${e}`, t && `btn-${t}`, r && "w-full", c),
|
|
44
50
|
...l,
|
|
45
51
|
children: [n && /* @__PURE__ */ s("svg", {
|
|
46
52
|
className: "animate-spin h-4 w-4 shrink-0",
|
|
@@ -61,11 +67,11 @@ var l = Object.create, u = Object.defineProperty, d = Object.getOwnPropertyDescr
|
|
|
61
67
|
})]
|
|
62
68
|
}), a]
|
|
63
69
|
}));
|
|
64
|
-
|
|
70
|
+
x.displayName = "Button";
|
|
65
71
|
//#endregion
|
|
66
72
|
//#region src/components/common/LoadingSpin/LoadingSpin.tsx
|
|
67
|
-
var
|
|
68
|
-
className: (0,
|
|
73
|
+
var S = ({ size: e = "md" }) => /* @__PURE__ */ s("svg", {
|
|
74
|
+
className: (0, b.default)("loading-spin", `loading-spin-${e}`),
|
|
69
75
|
xmlns: "http://www.w3.org/2000/svg",
|
|
70
76
|
fill: "none",
|
|
71
77
|
viewBox: "0 0 24 24",
|
|
@@ -81,19 +87,19 @@ var y = ({ size: e = "md" }) => /* @__PURE__ */ s("svg", {
|
|
|
81
87
|
fill: "currentColor",
|
|
82
88
|
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"
|
|
83
89
|
})]
|
|
84
|
-
}),
|
|
90
|
+
}), C = e(({ icon: e, label: t, variant: n = "ghost", size: r = "md", loading: i = !1, disabled: a, className: s = "", ...c }, l) => /* @__PURE__ */ o("button", {
|
|
85
91
|
ref: l,
|
|
86
92
|
disabled: a || i,
|
|
87
93
|
"aria-label": t,
|
|
88
94
|
title: t,
|
|
89
|
-
className: (0,
|
|
95
|
+
className: (0, b.default)("icon-button", `icon-button-${n}`, `icon-button-${r}`, s),
|
|
90
96
|
...c,
|
|
91
|
-
children: i ? /* @__PURE__ */ o(
|
|
97
|
+
children: i ? /* @__PURE__ */ o(S, { size: r }) : e
|
|
92
98
|
}));
|
|
93
|
-
|
|
99
|
+
C.displayName = "IconButton";
|
|
94
100
|
//#endregion
|
|
95
101
|
//#region src/components/common/Input/Input.tsx
|
|
96
|
-
var
|
|
102
|
+
var w = e(({ label: e, error: t, hint: n, leftIcon: r, rightIcon: i, fullWidth: a = !1, className: c = "", id: l, ...u }, d) => {
|
|
97
103
|
let f = l ?? e?.toLowerCase().replace(/\s+/g, "-");
|
|
98
104
|
return /* @__PURE__ */ s("div", {
|
|
99
105
|
className: a ? "w-full" : "inline-block",
|
|
@@ -113,7 +119,7 @@ var x = e(({ label: e, error: t, hint: n, leftIcon: r, rightIcon: i, fullWidth:
|
|
|
113
119
|
/* @__PURE__ */ o("input", {
|
|
114
120
|
ref: d,
|
|
115
121
|
id: f,
|
|
116
|
-
className: (0,
|
|
122
|
+
className: (0, b.default)("input", t && "has-error", !!r && "with-left-icon", !!i && "with-right-icon", a && "w-full", c),
|
|
117
123
|
...u
|
|
118
124
|
}),
|
|
119
125
|
i && /* @__PURE__ */ o("span", {
|
|
@@ -123,19 +129,19 @@ var x = e(({ label: e, error: t, hint: n, leftIcon: r, rightIcon: i, fullWidth:
|
|
|
123
129
|
]
|
|
124
130
|
}),
|
|
125
131
|
(t || n) && /* @__PURE__ */ o("p", {
|
|
126
|
-
className: (0,
|
|
132
|
+
className: (0, b.default)("helper-text", t && "has-error"),
|
|
127
133
|
children: t ?? n
|
|
128
134
|
})
|
|
129
135
|
]
|
|
130
136
|
});
|
|
131
137
|
});
|
|
132
|
-
|
|
138
|
+
w.displayName = "Input";
|
|
133
139
|
//#endregion
|
|
134
140
|
//#region src/components/common/Select/Select.tsx
|
|
135
|
-
var
|
|
141
|
+
var T = e(({ label: e, error: t, hint: n, options: r, placeholder: i, fullWidth: a = !1, className: c = "", id: l, ...u }, d) => {
|
|
136
142
|
let f = l ?? e?.toLowerCase().replace(/\s+/g, "-");
|
|
137
143
|
return /* @__PURE__ */ s("div", {
|
|
138
|
-
className: (0,
|
|
144
|
+
className: (0, b.default)("select-wrapper", a && "w-full"),
|
|
139
145
|
children: [
|
|
140
146
|
e && /* @__PURE__ */ o("label", {
|
|
141
147
|
htmlFor: f,
|
|
@@ -147,7 +153,7 @@ var S = e(({ label: e, error: t, hint: n, options: r, placeholder: i, fullWidth:
|
|
|
147
153
|
children: [/* @__PURE__ */ s("select", {
|
|
148
154
|
ref: d,
|
|
149
155
|
id: f,
|
|
150
|
-
className: (0,
|
|
156
|
+
className: (0, b.default)("select", t && "has-error", a && "w-full", c),
|
|
151
157
|
...u,
|
|
152
158
|
children: [i && /* @__PURE__ */ o("option", {
|
|
153
159
|
value: "",
|
|
@@ -176,62 +182,62 @@ var S = e(({ label: e, error: t, hint: n, options: r, placeholder: i, fullWidth:
|
|
|
176
182
|
})]
|
|
177
183
|
}),
|
|
178
184
|
(t || n) && /* @__PURE__ */ o("p", {
|
|
179
|
-
className: (0,
|
|
185
|
+
className: (0, b.default)("select-helper", t && "has-error"),
|
|
180
186
|
children: t ?? n
|
|
181
187
|
})
|
|
182
188
|
]
|
|
183
189
|
});
|
|
184
190
|
});
|
|
185
|
-
|
|
191
|
+
T.displayName = "Select";
|
|
186
192
|
//#endregion
|
|
187
193
|
//#region src/components/common/Typography/Heading.tsx
|
|
188
|
-
var
|
|
189
|
-
className: (0,
|
|
194
|
+
var E = ({ as: e, level: t = 1, color: n = "default", className: r = "", children: i, ...a }) => /* @__PURE__ */ o(e ?? `h${t}`, {
|
|
195
|
+
className: (0, b.default)(`text-color-${n}`, `heading-size-${t}`, r),
|
|
190
196
|
...a,
|
|
191
197
|
children: i
|
|
192
|
-
}),
|
|
193
|
-
className: (0,
|
|
198
|
+
}), D = ({ variant: e = "body", color: t = "default", as: n = "p", className: r = "", children: i, ...a }) => /* @__PURE__ */ o(n, {
|
|
199
|
+
className: (0, b.default)(`text-color-${t}`, `text-variant-${e}`, r),
|
|
194
200
|
...a,
|
|
195
201
|
children: i
|
|
196
202
|
});
|
|
197
203
|
//#endregion
|
|
198
204
|
//#region src/components/common/Badge/Badge.tsx
|
|
199
|
-
function
|
|
205
|
+
function O({ variant: e = "default", size: t = "md", dot: n = !1, className: r, children: i, ...a }) {
|
|
200
206
|
return /* @__PURE__ */ s("span", {
|
|
201
|
-
className: (0,
|
|
207
|
+
className: (0, b.default)("badge", `badge-${e}`, `badge-${t}`, r),
|
|
202
208
|
...a,
|
|
203
|
-
children: [n && /* @__PURE__ */ o("span", { className: (0,
|
|
209
|
+
children: [n && /* @__PURE__ */ o("span", { className: (0, b.default)("badge-dot", `badge-dot-${e}`) }), i]
|
|
204
210
|
});
|
|
205
211
|
}
|
|
206
212
|
//#endregion
|
|
207
213
|
//#region src/components/common/Card/Card.tsx
|
|
208
|
-
var
|
|
214
|
+
var ee = {
|
|
209
215
|
none: "",
|
|
210
216
|
sm: "p-4",
|
|
211
217
|
md: "p-6",
|
|
212
218
|
lg: "p-8"
|
|
213
219
|
};
|
|
214
|
-
function
|
|
220
|
+
function te({ children: e, padding: t = "md", shadow: n = !0, border: r = !0, className: i = "", ...a }) {
|
|
215
221
|
return /* @__PURE__ */ o("div", {
|
|
216
222
|
className: [
|
|
217
223
|
"bg-white rounded-xl overflow-hidden",
|
|
218
224
|
r ? "border border-gray-200" : "",
|
|
219
225
|
n ? "shadow-sm" : "",
|
|
220
|
-
|
|
226
|
+
ee[t],
|
|
221
227
|
i
|
|
222
228
|
].filter(Boolean).join(" "),
|
|
223
229
|
...a,
|
|
224
230
|
children: e
|
|
225
231
|
});
|
|
226
232
|
}
|
|
227
|
-
function
|
|
233
|
+
function ne({ children: e, className: t = "", ...n }) {
|
|
228
234
|
return /* @__PURE__ */ o("div", {
|
|
229
235
|
className: ["px-6 py-4 border-b border-gray-100", t].filter(Boolean).join(" "),
|
|
230
236
|
...n,
|
|
231
237
|
children: e
|
|
232
238
|
});
|
|
233
239
|
}
|
|
234
|
-
function
|
|
240
|
+
function re({ children: e, className: t = "", ...n }) {
|
|
235
241
|
return /* @__PURE__ */ o("div", {
|
|
236
242
|
className: ["p-6", t].filter(Boolean).join(" "),
|
|
237
243
|
...n,
|
|
@@ -247,13 +253,13 @@ function k({ children: e, className: t = "", ...n }) {
|
|
|
247
253
|
}
|
|
248
254
|
//#endregion
|
|
249
255
|
//#region src/components/common/Spinner/Spinner.tsx
|
|
250
|
-
function
|
|
256
|
+
function A({ size: e = "md", color: t = "primary", label: n = "Loading…", className: r = "", ...i }) {
|
|
251
257
|
return /* @__PURE__ */ s("span", {
|
|
252
258
|
role: "status",
|
|
253
259
|
"aria-label": n,
|
|
254
|
-
className: (0,
|
|
260
|
+
className: (0, b.default)("spinner-wrapper", r),
|
|
255
261
|
...i,
|
|
256
|
-
children: [/* @__PURE__ */ o("span", { className: (0,
|
|
262
|
+
children: [/* @__PURE__ */ o("span", { className: (0, b.default)("spinner", `spinner-${e}`, `spinner-${t}`) }), /* @__PURE__ */ o("span", {
|
|
257
263
|
className: "sr-only",
|
|
258
264
|
children: n
|
|
259
265
|
})]
|
|
@@ -261,7 +267,7 @@ function te({ size: e = "md", color: t = "primary", label: n = "Loading…", cla
|
|
|
261
267
|
}
|
|
262
268
|
//#endregion
|
|
263
269
|
//#region src/components/common/Alert/Alert.tsx
|
|
264
|
-
var
|
|
270
|
+
var j = {
|
|
265
271
|
info: /* @__PURE__ */ o("path", {
|
|
266
272
|
strokeLinecap: "round",
|
|
267
273
|
strokeLinejoin: "round",
|
|
@@ -283,10 +289,10 @@ var ne = {
|
|
|
283
289
|
d: "M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z"
|
|
284
290
|
})
|
|
285
291
|
};
|
|
286
|
-
function
|
|
292
|
+
function M({ variant: e = "info", title: t, children: n, onClose: r, className: i = "", ...a }) {
|
|
287
293
|
return /* @__PURE__ */ s("div", {
|
|
288
294
|
role: "alert",
|
|
289
|
-
className: (0,
|
|
295
|
+
className: (0, b.default)("alert", `alert-${e}`, i),
|
|
290
296
|
...a,
|
|
291
297
|
children: [
|
|
292
298
|
/* @__PURE__ */ o("svg", {
|
|
@@ -295,8 +301,8 @@ function A({ variant: e = "info", title: t, children: n, onClose: r, className:
|
|
|
295
301
|
viewBox: "0 0 24 24",
|
|
296
302
|
strokeWidth: 1.5,
|
|
297
303
|
stroke: "currentColor",
|
|
298
|
-
className: (0,
|
|
299
|
-
children:
|
|
304
|
+
className: (0, b.default)("alert-icon", `alert-icon-${e}`),
|
|
305
|
+
children: j[e]
|
|
300
306
|
}),
|
|
301
307
|
/* @__PURE__ */ s("div", {
|
|
302
308
|
className: "flex-1 min-w-0",
|
|
@@ -331,14 +337,14 @@ function A({ variant: e = "info", title: t, children: n, onClose: r, className:
|
|
|
331
337
|
}
|
|
332
338
|
//#endregion
|
|
333
339
|
//#region src/components/common/Modal/Modal.tsx
|
|
334
|
-
var
|
|
340
|
+
var N = {
|
|
335
341
|
sm: "max-w-sm",
|
|
336
342
|
md: "max-w-md",
|
|
337
343
|
lg: "max-w-lg",
|
|
338
344
|
xl: "max-w-xl",
|
|
339
345
|
full: "max-w-full mx-4"
|
|
340
346
|
};
|
|
341
|
-
function
|
|
347
|
+
function P({ open: e, onClose: t, title: i, children: a, footer: l, size: u = "md", closeOnBackdrop: d = !0 }) {
|
|
342
348
|
let f = r(null);
|
|
343
349
|
return n(() => {
|
|
344
350
|
if (!e) return;
|
|
@@ -362,7 +368,7 @@ function j({ open: e, onClose: t, title: i, children: a, footer: l, size: u = "m
|
|
|
362
368
|
role: "dialog",
|
|
363
369
|
"aria-modal": "true",
|
|
364
370
|
"aria-labelledby": i ? "modal-title" : void 0,
|
|
365
|
-
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]", N[u]].join(" "),
|
|
366
372
|
children: [
|
|
367
373
|
i && /* @__PURE__ */ s("div", {
|
|
368
374
|
className: "flex items-center justify-between px-6 py-4 border-b border-gray-100 shrink-0",
|
|
@@ -403,10 +409,10 @@ function j({ open: e, onClose: t, title: i, children: a, footer: l, size: u = "m
|
|
|
403
409
|
}
|
|
404
410
|
//#endregion
|
|
405
411
|
//#region src/components/common/Checkbox/Checkbox.tsx
|
|
406
|
-
var
|
|
412
|
+
var F = e(({ label: e, description: t, error: n, indeterminate: r, className: i = "", id: a, ...c }, l) => {
|
|
407
413
|
let u = a ?? e?.toLowerCase().replace(/\s+/g, "-");
|
|
408
414
|
return /* @__PURE__ */ s("div", {
|
|
409
|
-
className: (0,
|
|
415
|
+
className: (0, b.default)("checkbox-wrapper", i),
|
|
410
416
|
children: [/* @__PURE__ */ o("div", {
|
|
411
417
|
className: "checkbox-wrapper-inner",
|
|
412
418
|
children: /* @__PURE__ */ o("input", {
|
|
@@ -415,7 +421,7 @@ var M = e(({ label: e, description: t, error: n, indeterminate: r, className: i
|
|
|
415
421
|
},
|
|
416
422
|
id: u,
|
|
417
423
|
type: "checkbox",
|
|
418
|
-
className: (0,
|
|
424
|
+
className: (0, b.default)("checkbox", n && "has-error"),
|
|
419
425
|
...c
|
|
420
426
|
})
|
|
421
427
|
}), (e || t) && /* @__PURE__ */ s("div", { children: [
|
|
@@ -435,16 +441,16 @@ var M = e(({ label: e, description: t, error: n, indeterminate: r, className: i
|
|
|
435
441
|
] })]
|
|
436
442
|
});
|
|
437
443
|
});
|
|
438
|
-
|
|
444
|
+
F.displayName = "Checkbox";
|
|
439
445
|
//#endregion
|
|
440
446
|
//#region src/components/common/Toggle/Toggle.tsx
|
|
441
|
-
var
|
|
447
|
+
var I = e(({ label: e, description: t, size: n = "md", className: r = "", id: i, ...a }, c) => {
|
|
442
448
|
let l = i ?? e?.toLowerCase().replace(/\s+/g, "-");
|
|
443
449
|
return /* @__PURE__ */ s("label", {
|
|
444
450
|
htmlFor: l,
|
|
445
|
-
className: (0,
|
|
451
|
+
className: (0, b.default)("toggle", a.disabled && "toggle-disabled", r),
|
|
446
452
|
children: [/* @__PURE__ */ s("div", {
|
|
447
|
-
className: (0,
|
|
453
|
+
className: (0, b.default)("toggle-wrapper", `toggle-wrapper-${n}`),
|
|
448
454
|
children: [
|
|
449
455
|
/* @__PURE__ */ o("input", {
|
|
450
456
|
ref: c,
|
|
@@ -455,7 +461,7 @@ var N = e(({ label: e, description: t, size: n = "md", className: r = "", id: i,
|
|
|
455
461
|
...a
|
|
456
462
|
}),
|
|
457
463
|
/* @__PURE__ */ o("div", { className: "toggle-track" }),
|
|
458
|
-
/* @__PURE__ */ o("div", { className: (0,
|
|
464
|
+
/* @__PURE__ */ o("div", { className: (0, b.default)("toggle-thumb", `toggle-thumb-${n}`) })
|
|
459
465
|
]
|
|
460
466
|
}), (e || t) && /* @__PURE__ */ s("div", { children: [e && /* @__PURE__ */ o("span", {
|
|
461
467
|
className: "toggle-label",
|
|
@@ -466,10 +472,10 @@ var N = e(({ label: e, description: t, size: n = "md", className: r = "", id: i,
|
|
|
466
472
|
})] })]
|
|
467
473
|
});
|
|
468
474
|
});
|
|
469
|
-
|
|
475
|
+
I.displayName = "Toggle";
|
|
470
476
|
//#endregion
|
|
471
477
|
//#region src/components/common/Avatar/Avatar.tsx
|
|
472
|
-
var
|
|
478
|
+
var L = [
|
|
473
479
|
"bg-red-500",
|
|
474
480
|
"bg-orange-500",
|
|
475
481
|
"bg-amber-500",
|
|
@@ -480,7 +486,7 @@ var P = [
|
|
|
480
486
|
"bg-violet-500",
|
|
481
487
|
"bg-pink-500"
|
|
482
488
|
];
|
|
483
|
-
function
|
|
489
|
+
function ie({ src: e, alt: t, name: n, size: r = "md", className: i, ...a }) {
|
|
484
490
|
let s = [
|
|
485
491
|
"avatar",
|
|
486
492
|
`avatar-${r}`,
|
|
@@ -488,10 +494,10 @@ function F({ src: e, alt: t, name: n, size: r = "md", className: i, ...a }) {
|
|
|
488
494
|
], c = (e) => {
|
|
489
495
|
let t = 0;
|
|
490
496
|
for (let n = 0; n < e.length; n++) t += e.charCodeAt(n);
|
|
491
|
-
return
|
|
497
|
+
return L[t % L.length];
|
|
492
498
|
}, l = (e) => e.split(" ").slice(0, 2).map((e) => e[0]).join("").toUpperCase();
|
|
493
499
|
return e ? /* @__PURE__ */ o("span", {
|
|
494
|
-
className: (0,
|
|
500
|
+
className: (0, b.default)(s),
|
|
495
501
|
...a,
|
|
496
502
|
children: /* @__PURE__ */ o("img", {
|
|
497
503
|
src: e,
|
|
@@ -499,12 +505,12 @@ function F({ src: e, alt: t, name: n, size: r = "md", className: i, ...a }) {
|
|
|
499
505
|
className: "w-full h-full object-cover"
|
|
500
506
|
})
|
|
501
507
|
}) : n ? /* @__PURE__ */ o("span", {
|
|
502
|
-
className: (0,
|
|
508
|
+
className: (0, b.default)(s, c(n)),
|
|
503
509
|
"aria-label": n,
|
|
504
510
|
...a,
|
|
505
511
|
children: l(n)
|
|
506
512
|
}) : /* @__PURE__ */ o("span", {
|
|
507
|
-
className: (0,
|
|
513
|
+
className: (0, b.default)(s, "avatar-fallback"),
|
|
508
514
|
...a,
|
|
509
515
|
children: /* @__PURE__ */ o("svg", {
|
|
510
516
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -521,36 +527,36 @@ function F({ src: e, alt: t, name: n, size: r = "md", className: i, ...a }) {
|
|
|
521
527
|
}
|
|
522
528
|
//#endregion
|
|
523
529
|
//#region src/components/common/Pagination/Pagination.tsx
|
|
524
|
-
var
|
|
525
|
-
if (t <= n * 2 + 5) return
|
|
530
|
+
var R = (e, t) => Array.from({ length: t - e + 1 }, (t, n) => e + n), z = (e, t, n) => {
|
|
531
|
+
if (t <= n * 2 + 5) return R(1, t);
|
|
526
532
|
let r = Math.max(e - n, 1), i = Math.min(e + n, t), a = r > 2, o = i < t - 1;
|
|
527
533
|
return !a && o ? [
|
|
528
|
-
...
|
|
534
|
+
...R(1, 3 + n * 2),
|
|
529
535
|
"…",
|
|
530
536
|
t
|
|
531
537
|
] : a && !o ? [
|
|
532
538
|
1,
|
|
533
539
|
"…",
|
|
534
|
-
...
|
|
540
|
+
...R(t - (2 + n * 2), t)
|
|
535
541
|
] : [
|
|
536
542
|
1,
|
|
537
543
|
"…",
|
|
538
|
-
...
|
|
544
|
+
...R(r, i),
|
|
539
545
|
"…",
|
|
540
546
|
t
|
|
541
547
|
];
|
|
542
|
-
},
|
|
548
|
+
}, B = ({ active: e, disabled: t, children: n, ...r }) => /* @__PURE__ */ o("button", {
|
|
543
549
|
disabled: t,
|
|
544
|
-
className: (0,
|
|
550
|
+
className: (0, b.default)("pagination-button", `pagination-button-${e ? "active" : "inactive"}`),
|
|
545
551
|
...r,
|
|
546
552
|
children: n
|
|
547
|
-
}),
|
|
548
|
-
let i =
|
|
553
|
+
}), V = ({ page: e, totalPages: t, onPageChange: n, siblingsCount: r = 1 }) => {
|
|
554
|
+
let i = z(e, t, r);
|
|
549
555
|
return /* @__PURE__ */ s("nav", {
|
|
550
556
|
"aria-label": "Pagination",
|
|
551
557
|
className: "pagination",
|
|
552
558
|
children: [
|
|
553
|
-
/* @__PURE__ */ o(
|
|
559
|
+
/* @__PURE__ */ o(B, {
|
|
554
560
|
disabled: e <= 1,
|
|
555
561
|
onClick: () => n(e - 1),
|
|
556
562
|
"aria-label": "Previous page",
|
|
@@ -571,14 +577,14 @@ var I = (e, t) => Array.from({ length: t - e + 1 }, (t, n) => e + n), ie = (e, t
|
|
|
571
577
|
i.map((t, r) => t === "…" ? /* @__PURE__ */ o("span", {
|
|
572
578
|
className: "pagination-dots",
|
|
573
579
|
children: "…"
|
|
574
|
-
}, `dots-${r}`) : /* @__PURE__ */ o(
|
|
580
|
+
}, `dots-${r}`) : /* @__PURE__ */ o(B, {
|
|
575
581
|
active: t === e,
|
|
576
582
|
onClick: () => n(t),
|
|
577
583
|
"aria-label": `Page ${t}`,
|
|
578
584
|
"aria-current": t === e ? "page" : void 0,
|
|
579
585
|
children: t
|
|
580
586
|
}, t)),
|
|
581
|
-
/* @__PURE__ */ o(
|
|
587
|
+
/* @__PURE__ */ o(B, {
|
|
582
588
|
disabled: e >= t,
|
|
583
589
|
onClick: () => n(e + 1),
|
|
584
590
|
"aria-label": "Next page",
|
|
@@ -601,7 +607,7 @@ var I = (e, t) => Array.from({ length: t - e + 1 }, (t, n) => e + n), ie = (e, t
|
|
|
601
607
|
};
|
|
602
608
|
//#endregion
|
|
603
609
|
//#region src/components/Header/Header.tsx
|
|
604
|
-
function
|
|
610
|
+
function H({ trigger: e, items: t, onSelect: n, getKey: a, renderItem: c }) {
|
|
605
611
|
let [l, u] = i(!1), d = r(null), f = () => u(!1);
|
|
606
612
|
return /* @__PURE__ */ s("div", {
|
|
607
613
|
ref: d,
|
|
@@ -636,7 +642,7 @@ function z({ trigger: e, items: t, onSelect: n, getKey: a, renderItem: c }) {
|
|
|
636
642
|
})]
|
|
637
643
|
});
|
|
638
644
|
}
|
|
639
|
-
function
|
|
645
|
+
function U() {
|
|
640
646
|
return /* @__PURE__ */ o("svg", {
|
|
641
647
|
xmlns: "http://www.w3.org/2000/svg",
|
|
642
648
|
fill: "none",
|
|
@@ -651,8 +657,8 @@ function B() {
|
|
|
651
657
|
})
|
|
652
658
|
});
|
|
653
659
|
}
|
|
654
|
-
function
|
|
655
|
-
let [y, b] = i(""),
|
|
660
|
+
function W({ logo: e, searchPlaceholder: t = "Hledat produkty…", onSearch: n, cartItemCount: r = 0, onCartClick: c, isLoggedIn: l = !1, customerName: u, onCustomerClick: d, currencies: f = [], selectedCurrency: p, onCurrencyChange: m, locales: h = [], selectedLocale: g, onLocaleChange: _, rightSlot: v }) {
|
|
661
|
+
let [y, b] = i(""), x = f.find((e) => e.code === p), S = h.find((e) => e.code === g);
|
|
656
662
|
return /* @__PURE__ */ o("header", {
|
|
657
663
|
className: "bg-white border-b border-gray-200 sticky top-0 z-40",
|
|
658
664
|
children: /* @__PURE__ */ s("div", {
|
|
@@ -667,7 +673,7 @@ function V({ logo: e, searchPlaceholder: t = "Hledat produkty…", onSearch: n,
|
|
|
667
673
|
}),
|
|
668
674
|
/* @__PURE__ */ o("div", {
|
|
669
675
|
className: "flex-1 max-w-xl",
|
|
670
|
-
children: /* @__PURE__ */ o(
|
|
676
|
+
children: /* @__PURE__ */ o(w, {
|
|
671
677
|
fullWidth: !0,
|
|
672
678
|
placeholder: t,
|
|
673
679
|
value: y,
|
|
@@ -675,7 +681,7 @@ function V({ logo: e, searchPlaceholder: t = "Hledat produkty…", onSearch: n,
|
|
|
675
681
|
onKeyDown: (e) => {
|
|
676
682
|
e.key === "Enter" && n?.(y);
|
|
677
683
|
},
|
|
678
|
-
leftIcon: /* @__PURE__ */ o(
|
|
684
|
+
leftIcon: /* @__PURE__ */ o(U, {}),
|
|
679
685
|
rightIcon: y ? /* @__PURE__ */ o("button", {
|
|
680
686
|
onClick: () => {
|
|
681
687
|
b(""), n?.("");
|
|
@@ -701,16 +707,16 @@ function V({ logo: e, searchPlaceholder: t = "Hledat produkty…", onSearch: n,
|
|
|
701
707
|
/* @__PURE__ */ s("div", {
|
|
702
708
|
className: "flex items-center gap-1 shrink-0 ml-auto",
|
|
703
709
|
children: [
|
|
704
|
-
f.length > 0 && /* @__PURE__ */ o(
|
|
710
|
+
f.length > 0 && /* @__PURE__ */ o(H, {
|
|
705
711
|
trigger: /* @__PURE__ */ s("button", {
|
|
706
712
|
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",
|
|
707
713
|
children: [
|
|
708
|
-
/* @__PURE__ */ o("span", { children:
|
|
714
|
+
/* @__PURE__ */ o("span", { children: x?.symbol ?? p }),
|
|
709
715
|
/* @__PURE__ */ o("span", {
|
|
710
716
|
className: "text-xs text-gray-400",
|
|
711
|
-
children:
|
|
717
|
+
children: x?.code ?? p
|
|
712
718
|
}),
|
|
713
|
-
/* @__PURE__ */ o(
|
|
719
|
+
/* @__PURE__ */ o(G, { className: "w-3 h-3 text-gray-400" })
|
|
714
720
|
]
|
|
715
721
|
}),
|
|
716
722
|
items: f,
|
|
@@ -724,19 +730,19 @@ function V({ logo: e, searchPlaceholder: t = "Hledat produkty…", onSearch: n,
|
|
|
724
730
|
}), /* @__PURE__ */ o("span", { children: e.label })]
|
|
725
731
|
})
|
|
726
732
|
}),
|
|
727
|
-
h.length > 0 && /* @__PURE__ */ o(
|
|
733
|
+
h.length > 0 && /* @__PURE__ */ o(H, {
|
|
728
734
|
trigger: /* @__PURE__ */ s("button", {
|
|
729
735
|
className: "flex items-center gap-1 px-2 py-1.5 rounded-md text-sm text-gray-600 hover:bg-gray-50 transition-colors",
|
|
730
736
|
children: [
|
|
731
|
-
|
|
737
|
+
S?.flag && /* @__PURE__ */ o("span", {
|
|
732
738
|
className: "text-base leading-none",
|
|
733
|
-
children:
|
|
739
|
+
children: S.flag
|
|
734
740
|
}),
|
|
735
741
|
/* @__PURE__ */ o("span", {
|
|
736
742
|
className: "font-medium uppercase",
|
|
737
|
-
children:
|
|
743
|
+
children: S?.code ?? g
|
|
738
744
|
}),
|
|
739
|
-
/* @__PURE__ */ o(
|
|
745
|
+
/* @__PURE__ */ o(G, { className: "w-3 h-3 text-gray-400" })
|
|
740
746
|
]
|
|
741
747
|
}),
|
|
742
748
|
items: h,
|
|
@@ -761,7 +767,7 @@ function V({ logo: e, searchPlaceholder: t = "Hledat produkty…", onSearch: n,
|
|
|
761
767
|
}), u && /* @__PURE__ */ o("span", {
|
|
762
768
|
className: "hidden sm:block font-medium max-w-32 truncate",
|
|
763
769
|
children: u
|
|
764
|
-
})] }) : /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ o(
|
|
770
|
+
})] }) : /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ o(K, { className: "w-5 h-5" }), /* @__PURE__ */ o("span", {
|
|
765
771
|
className: "hidden sm:block font-medium",
|
|
766
772
|
children: "Přihlásit se"
|
|
767
773
|
})] })
|
|
@@ -771,7 +777,7 @@ function V({ logo: e, searchPlaceholder: t = "Hledat produkty…", onSearch: n,
|
|
|
771
777
|
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",
|
|
772
778
|
"aria-label": `Cart, ${r} items`,
|
|
773
779
|
children: [
|
|
774
|
-
/* @__PURE__ */ o(
|
|
780
|
+
/* @__PURE__ */ o(q, { className: "w-5 h-5" }),
|
|
775
781
|
/* @__PURE__ */ o("span", {
|
|
776
782
|
className: "hidden sm:block font-medium",
|
|
777
783
|
children: "Košík"
|
|
@@ -789,7 +795,7 @@ function V({ logo: e, searchPlaceholder: t = "Hledat produkty…", onSearch: n,
|
|
|
789
795
|
})
|
|
790
796
|
});
|
|
791
797
|
}
|
|
792
|
-
function
|
|
798
|
+
function G({ className: e }) {
|
|
793
799
|
return /* @__PURE__ */ o("svg", {
|
|
794
800
|
xmlns: "http://www.w3.org/2000/svg",
|
|
795
801
|
fill: "none",
|
|
@@ -804,7 +810,7 @@ function H({ className: e }) {
|
|
|
804
810
|
})
|
|
805
811
|
});
|
|
806
812
|
}
|
|
807
|
-
function
|
|
813
|
+
function K({ className: e }) {
|
|
808
814
|
return /* @__PURE__ */ o("svg", {
|
|
809
815
|
xmlns: "http://www.w3.org/2000/svg",
|
|
810
816
|
fill: "none",
|
|
@@ -819,7 +825,7 @@ function U({ className: e }) {
|
|
|
819
825
|
})
|
|
820
826
|
});
|
|
821
827
|
}
|
|
822
|
-
function
|
|
828
|
+
function q({ className: e }) {
|
|
823
829
|
return /* @__PURE__ */ o("svg", {
|
|
824
830
|
xmlns: "http://www.w3.org/2000/svg",
|
|
825
831
|
fill: "none",
|
|
@@ -836,8 +842,8 @@ function W({ className: e }) {
|
|
|
836
842
|
}
|
|
837
843
|
//#endregion
|
|
838
844
|
//#region src/components/CategoryTree/CategoryTree.tsx
|
|
839
|
-
function
|
|
840
|
-
let l = e.children && e.children.length > 0, [u, d] = i(c ||
|
|
845
|
+
function J({ node: e, activeId: t, onSelect: n, showCounts: r, depth: a, defaultExpandAll: c }) {
|
|
846
|
+
let l = e.children && e.children.length > 0, [u, d] = i(c || Y(e, t)), f = e.id === t;
|
|
841
847
|
return /* @__PURE__ */ s("li", { children: [/* @__PURE__ */ s("div", {
|
|
842
848
|
className: [
|
|
843
849
|
"group flex items-center gap-1.5 rounded-lg px-2 py-1.5 cursor-pointer select-none",
|
|
@@ -887,7 +893,7 @@ function G({ node: e, activeId: t, onSelect: n, showCounts: r, depth: a, default
|
|
|
887
893
|
]
|
|
888
894
|
}), l && u && /* @__PURE__ */ o("ul", {
|
|
889
895
|
role: "group",
|
|
890
|
-
children: e.children.map((e) => /* @__PURE__ */ o(
|
|
896
|
+
children: e.children.map((e) => /* @__PURE__ */ o(J, {
|
|
891
897
|
node: e,
|
|
892
898
|
activeId: t,
|
|
893
899
|
onSelect: n,
|
|
@@ -897,10 +903,10 @@ function G({ node: e, activeId: t, onSelect: n, showCounts: r, depth: a, default
|
|
|
897
903
|
}, e.id))
|
|
898
904
|
})] });
|
|
899
905
|
}
|
|
900
|
-
function
|
|
901
|
-
return !t || !e.children ? !1 : e.children.some((e) => e.id === t ||
|
|
906
|
+
function Y(e, t) {
|
|
907
|
+
return !t || !e.children ? !1 : e.children.some((e) => e.id === t || Y(e, t));
|
|
902
908
|
}
|
|
903
|
-
function
|
|
909
|
+
function ae({ categories: e, activeId: t, onSelect: n, showCounts: r = !0, defaultExpandAll: i = !1, className: a = "", ...s }) {
|
|
904
910
|
let c = (e) => n?.(e);
|
|
905
911
|
return /* @__PURE__ */ o("nav", {
|
|
906
912
|
"aria-label": "Category navigation",
|
|
@@ -909,7 +915,7 @@ function q({ categories: e, activeId: t, onSelect: n, showCounts: r = !0, defaul
|
|
|
909
915
|
children: /* @__PURE__ */ o("ul", {
|
|
910
916
|
role: "tree",
|
|
911
917
|
className: "space-y-0.5",
|
|
912
|
-
children: e.map((e) => /* @__PURE__ */ o(
|
|
918
|
+
children: e.map((e) => /* @__PURE__ */ o(J, {
|
|
913
919
|
node: e,
|
|
914
920
|
activeId: t,
|
|
915
921
|
onSelect: c,
|
|
@@ -922,7 +928,7 @@ function q({ categories: e, activeId: t, onSelect: n, showCounts: r = !0, defaul
|
|
|
922
928
|
}
|
|
923
929
|
//#endregion
|
|
924
930
|
//#region src/components/MegaMenu/MegaMenu.tsx
|
|
925
|
-
function
|
|
931
|
+
function oe({ item: e, onNavigate: t, onClose: n }) {
|
|
926
932
|
return e.columns?.length ? /* @__PURE__ */ o("div", {
|
|
927
933
|
className: "absolute left-0 right-0 top-full z-50 bg-white border-b border-gray-200 shadow-lg",
|
|
928
934
|
children: /* @__PURE__ */ s("div", {
|
|
@@ -985,7 +991,7 @@ function J({ item: e, onNavigate: t, onClose: n }) {
|
|
|
985
991
|
})
|
|
986
992
|
}) : null;
|
|
987
993
|
}
|
|
988
|
-
function
|
|
994
|
+
function se({ items: e, activeId: t, onNavigate: n }) {
|
|
989
995
|
let [a, c] = i(null), l = r(null), u = (e) => {
|
|
990
996
|
l.current && clearTimeout(l.current), c(e);
|
|
991
997
|
}, d = () => {
|
|
@@ -1048,7 +1054,7 @@ function Y({ items: e, activeId: t, onNavigate: n }) {
|
|
|
1048
1054
|
}), p?.columns?.length && /* @__PURE__ */ o("div", {
|
|
1049
1055
|
onMouseEnter: f,
|
|
1050
1056
|
onMouseLeave: d,
|
|
1051
|
-
children: /* @__PURE__ */ o(
|
|
1057
|
+
children: /* @__PURE__ */ o(oe, {
|
|
1052
1058
|
item: p,
|
|
1053
1059
|
onNavigate: (e) => n?.(e),
|
|
1054
1060
|
onClose: () => c(null)
|
|
@@ -1058,7 +1064,7 @@ function Y({ items: e, activeId: t, onNavigate: n }) {
|
|
|
1058
1064
|
}
|
|
1059
1065
|
//#endregion
|
|
1060
1066
|
//#region src/components/BannerCarousel/BannerCarousel.tsx
|
|
1061
|
-
function
|
|
1067
|
+
function ce({ banners: e, autoPlay: c = !0, autoPlayInterval: l = 5e3, arrows: u = !0, dots: d = !0, className: f = "", aspectRatio: p = "3 / 1" }) {
|
|
1062
1068
|
let [m, h] = i(0), [g, _] = i(!1), v = r(null), y = r(null), b = e.length, x = t((e) => {
|
|
1063
1069
|
h((e % b + b) % b);
|
|
1064
1070
|
}, [b]), S = () => x(m - 1), C = t(() => x(m + 1), [m, x]);
|
|
@@ -1198,7 +1204,7 @@ function X({ banners: e, autoPlay: c = !0, autoPlayInterval: l = 5e3, arrows: u
|
|
|
1198
1204
|
}
|
|
1199
1205
|
//#endregion
|
|
1200
1206
|
//#region src/components/ProductCard/ProductCard.tsx
|
|
1201
|
-
function
|
|
1207
|
+
function le({ filled: e }) {
|
|
1202
1208
|
return /* @__PURE__ */ o("svg", {
|
|
1203
1209
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1204
1210
|
viewBox: "0 0 24 24",
|
|
@@ -1211,7 +1217,7 @@ function ae({ filled: e }) {
|
|
|
1211
1217
|
})
|
|
1212
1218
|
});
|
|
1213
1219
|
}
|
|
1214
|
-
function
|
|
1220
|
+
function ue({ value: e, count: t }) {
|
|
1215
1221
|
return /* @__PURE__ */ s("div", {
|
|
1216
1222
|
className: "flex items-center gap-1",
|
|
1217
1223
|
children: [/* @__PURE__ */ o("div", {
|
|
@@ -1222,7 +1228,7 @@ function oe({ value: e, count: t }) {
|
|
|
1222
1228
|
3,
|
|
1223
1229
|
4,
|
|
1224
1230
|
5
|
|
1225
|
-
].map((t) => /* @__PURE__ */ o(
|
|
1231
|
+
].map((t) => /* @__PURE__ */ o(le, { filled: t <= Math.round(e) }, t))
|
|
1226
1232
|
}), t !== void 0 && /* @__PURE__ */ s("span", {
|
|
1227
1233
|
className: "text-xs text-gray-400",
|
|
1228
1234
|
children: [
|
|
@@ -1233,17 +1239,17 @@ function oe({ value: e, count: t }) {
|
|
|
1233
1239
|
})]
|
|
1234
1240
|
});
|
|
1235
1241
|
}
|
|
1236
|
-
function
|
|
1242
|
+
function de(e) {
|
|
1237
1243
|
let t = e.toLowerCase();
|
|
1238
1244
|
return t === "sale" || t === "akce" ? "danger" : t === "new" || t === "nové" ? "primary" : t === "hot" ? "warning" : "default";
|
|
1239
1245
|
}
|
|
1240
|
-
function
|
|
1246
|
+
function X(e, t = "Kč") {
|
|
1241
1247
|
return `${e.toLocaleString("cs-CZ")} ${t}`;
|
|
1242
1248
|
}
|
|
1243
|
-
function
|
|
1249
|
+
function fe(e, t) {
|
|
1244
1250
|
return Math.round((1 - t / e) * 100);
|
|
1245
1251
|
}
|
|
1246
|
-
function
|
|
1252
|
+
function Z({ product: e, onAddToCart: t, onWishlistToggle: n, isWishlisted: r = !1, onProductClick: a, size: c = "default", className: l = "" }) {
|
|
1247
1253
|
let [u, d] = i(!1), [f, p] = i(!1), m = e.originalPrice !== void 0 && e.originalPrice > e.price;
|
|
1248
1254
|
return /* @__PURE__ */ s("article", {
|
|
1249
1255
|
className: [
|
|
@@ -1267,10 +1273,10 @@ function Q({ product: e, onAddToCart: t, onWishlistToggle: n, isWishlisted: r =
|
|
|
1267
1273
|
}),
|
|
1268
1274
|
e.badge && /* @__PURE__ */ o("div", {
|
|
1269
1275
|
className: "absolute top-2 left-2",
|
|
1270
|
-
children: /* @__PURE__ */ o(
|
|
1271
|
-
variant:
|
|
1276
|
+
children: /* @__PURE__ */ o(O, {
|
|
1277
|
+
variant: de(e.badge),
|
|
1272
1278
|
size: "sm",
|
|
1273
|
-
children: e.badge === "sale" && m ? `-${
|
|
1279
|
+
children: e.badge === "sale" && m ? `-${fe(e.originalPrice, e.price)}%` : e.badge
|
|
1274
1280
|
})
|
|
1275
1281
|
}),
|
|
1276
1282
|
e.inStock === !1 && /* @__PURE__ */ o("div", {
|
|
@@ -1306,7 +1312,7 @@ function Q({ product: e, onAddToCart: t, onWishlistToggle: n, isWishlisted: r =
|
|
|
1306
1312
|
}),
|
|
1307
1313
|
/* @__PURE__ */ o("div", {
|
|
1308
1314
|
className: ["absolute bottom-0 left-0 right-0 p-2 transition-transform duration-200", u ? "translate-y-0" : "translate-y-full"].join(" "),
|
|
1309
|
-
children: /* @__PURE__ */ o(
|
|
1315
|
+
children: /* @__PURE__ */ o(x, {
|
|
1310
1316
|
variant: "primary",
|
|
1311
1317
|
size: "sm",
|
|
1312
1318
|
fullWidth: !0,
|
|
@@ -1353,7 +1359,7 @@ function Q({ product: e, onAddToCart: t, onWishlistToggle: n, isWishlisted: r =
|
|
|
1353
1359
|
className: `font-medium text-gray-900 leading-snug line-clamp-2 group-hover:text-primary-600 transition-colors ${c === "compact" ? "text-xs" : "text-sm"}`,
|
|
1354
1360
|
children: e.name
|
|
1355
1361
|
}),
|
|
1356
|
-
e.rating !== void 0 && /* @__PURE__ */ o(
|
|
1362
|
+
e.rating !== void 0 && /* @__PURE__ */ o(ue, {
|
|
1357
1363
|
value: e.rating,
|
|
1358
1364
|
count: e.reviewCount
|
|
1359
1365
|
}),
|
|
@@ -1361,10 +1367,10 @@ function Q({ product: e, onAddToCart: t, onWishlistToggle: n, isWishlisted: r =
|
|
|
1361
1367
|
className: "flex items-baseline gap-2 mt-auto pt-1",
|
|
1362
1368
|
children: [/* @__PURE__ */ o("span", {
|
|
1363
1369
|
className: `font-bold text-gray-900 ${c === "compact" ? "text-base" : "text-lg"}`,
|
|
1364
|
-
children:
|
|
1370
|
+
children: X(e.price, e.currency)
|
|
1365
1371
|
}), m && /* @__PURE__ */ o("span", {
|
|
1366
1372
|
className: "text-sm text-gray-400 line-through",
|
|
1367
|
-
children:
|
|
1373
|
+
children: X(e.originalPrice, e.currency)
|
|
1368
1374
|
})]
|
|
1369
1375
|
})
|
|
1370
1376
|
]
|
|
@@ -1373,12 +1379,12 @@ function Q({ product: e, onAddToCart: t, onWishlistToggle: n, isWishlisted: r =
|
|
|
1373
1379
|
}
|
|
1374
1380
|
//#endregion
|
|
1375
1381
|
//#region src/components/ProductGrid/ProductGrid.tsx
|
|
1376
|
-
var
|
|
1382
|
+
var Q = {
|
|
1377
1383
|
2: "grid-cols-2",
|
|
1378
1384
|
3: "grid-cols-2 md:grid-cols-3",
|
|
1379
1385
|
4: "grid-cols-2 sm:grid-cols-3 lg:grid-cols-4",
|
|
1380
1386
|
5: "grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5"
|
|
1381
|
-
},
|
|
1387
|
+
}, pe = [
|
|
1382
1388
|
{
|
|
1383
1389
|
value: "newest",
|
|
1384
1390
|
label: "Nejnovější"
|
|
@@ -1400,7 +1406,7 @@ var $ = {
|
|
|
1400
1406
|
label: "Bestsellery"
|
|
1401
1407
|
}
|
|
1402
1408
|
];
|
|
1403
|
-
function
|
|
1409
|
+
function me() {
|
|
1404
1410
|
return /* @__PURE__ */ s("div", {
|
|
1405
1411
|
className: "rounded-xl border border-gray-100 overflow-hidden animate-pulse",
|
|
1406
1412
|
children: [/* @__PURE__ */ o("div", { className: "aspect-4/3 bg-gray-200" }), /* @__PURE__ */ s("div", {
|
|
@@ -1413,8 +1419,8 @@ function ue() {
|
|
|
1413
1419
|
})]
|
|
1414
1420
|
});
|
|
1415
1421
|
}
|
|
1416
|
-
function
|
|
1417
|
-
let x = t ? Math.ceil(t / i) : void 0,
|
|
1422
|
+
function he({ products: e, totalCount: t, page: n = 1, onPageChange: r, perPage: i = 20, columns: a = 4, sortOptions: c = pe, selectedSort: l, onSortChange: u, activeFilters: d = [], onRemoveFilter: f, onClearFilters: p, loading: m = !1, emptyState: h, onAddToCart: g, onWishlistToggle: _, onProductClick: v, wishlisted: y = [], className: b = "" }) {
|
|
1423
|
+
let x = t ? Math.ceil(t / i) : void 0, S = a >= 5 ? "compact" : "default";
|
|
1418
1424
|
return /* @__PURE__ */ s("div", {
|
|
1419
1425
|
className: ["w-full", b].filter(Boolean).join(" "),
|
|
1420
1426
|
children: [
|
|
@@ -1457,7 +1463,7 @@ function de({ products: e, totalCount: t, page: n = 1, onPageChange: r, perPage:
|
|
|
1457
1463
|
children: "Zrušit vše"
|
|
1458
1464
|
})
|
|
1459
1465
|
]
|
|
1460
|
-
}), /* @__PURE__ */ o(
|
|
1466
|
+
}), /* @__PURE__ */ o(T, {
|
|
1461
1467
|
options: c,
|
|
1462
1468
|
value: l ?? "",
|
|
1463
1469
|
onChange: (e) => u?.(e.target.value),
|
|
@@ -1466,8 +1472,8 @@ function de({ products: e, totalCount: t, page: n = 1, onPageChange: r, perPage:
|
|
|
1466
1472
|
})]
|
|
1467
1473
|
}),
|
|
1468
1474
|
m ? /* @__PURE__ */ o("div", {
|
|
1469
|
-
className: `grid gap-4 ${
|
|
1470
|
-
children: Array.from({ length: i > 12 ? 12 : i }).map((e, t) => /* @__PURE__ */ o(
|
|
1475
|
+
className: `grid gap-4 ${Q[a]}`,
|
|
1476
|
+
children: Array.from({ length: i > 12 ? 12 : i }).map((e, t) => /* @__PURE__ */ o(me, {}, t))
|
|
1471
1477
|
}) : e.length === 0 ? /* @__PURE__ */ o("div", {
|
|
1472
1478
|
className: "py-16 text-center",
|
|
1473
1479
|
children: h ?? /* @__PURE__ */ s("div", {
|
|
@@ -1493,10 +1499,10 @@ function de({ products: e, totalCount: t, page: n = 1, onPageChange: r, perPage:
|
|
|
1493
1499
|
]
|
|
1494
1500
|
})
|
|
1495
1501
|
}) : /* @__PURE__ */ o("div", {
|
|
1496
|
-
className: `grid gap-4 ${
|
|
1497
|
-
children: e.map((e) => /* @__PURE__ */ o(
|
|
1502
|
+
className: `grid gap-4 ${Q[a]}`,
|
|
1503
|
+
children: e.map((e) => /* @__PURE__ */ o(Z, {
|
|
1498
1504
|
product: e,
|
|
1499
|
-
size:
|
|
1505
|
+
size: S,
|
|
1500
1506
|
onAddToCart: g,
|
|
1501
1507
|
onWishlistToggle: _,
|
|
1502
1508
|
onProductClick: v,
|
|
@@ -1505,7 +1511,7 @@ function de({ products: e, totalCount: t, page: n = 1, onPageChange: r, perPage:
|
|
|
1505
1511
|
}),
|
|
1506
1512
|
x && x > 1 && r && /* @__PURE__ */ o("div", {
|
|
1507
1513
|
className: "flex justify-center mt-8",
|
|
1508
|
-
children: /* @__PURE__ */ o(
|
|
1514
|
+
children: /* @__PURE__ */ o(V, {
|
|
1509
1515
|
page: n,
|
|
1510
1516
|
totalPages: x,
|
|
1511
1517
|
onPageChange: r
|
|
@@ -1516,14 +1522,14 @@ function de({ products: e, totalCount: t, page: n = 1, onPageChange: r, perPage:
|
|
|
1516
1522
|
}
|
|
1517
1523
|
//#endregion
|
|
1518
1524
|
//#region src/components/CallToAction/CallToAction.tsx
|
|
1519
|
-
var
|
|
1525
|
+
var ge = {
|
|
1520
1526
|
default: "bg-gray-50 border border-gray-200",
|
|
1521
1527
|
primary: "bg-primary-600",
|
|
1522
1528
|
dark: "bg-gray-900",
|
|
1523
1529
|
gradient: "bg-linear-to-br from-primary-600 via-primary-700 to-violet-700",
|
|
1524
1530
|
outline: "bg-white border-2 border-primary-600",
|
|
1525
1531
|
image: "relative overflow-hidden"
|
|
1526
|
-
},
|
|
1532
|
+
}, _e = {
|
|
1527
1533
|
default: {
|
|
1528
1534
|
eyebrow: "text-primary-600",
|
|
1529
1535
|
title: "text-gray-900",
|
|
@@ -1554,7 +1560,7 @@ var fe = {
|
|
|
1554
1560
|
title: "text-white",
|
|
1555
1561
|
description: "text-white/80"
|
|
1556
1562
|
}
|
|
1557
|
-
},
|
|
1563
|
+
}, ve = {
|
|
1558
1564
|
sm: {
|
|
1559
1565
|
wrapper: "px-6 py-6 rounded-xl",
|
|
1560
1566
|
title: "text-xl font-bold",
|
|
@@ -1579,7 +1585,7 @@ var fe = {
|
|
|
1579
1585
|
description: "text-xl",
|
|
1580
1586
|
eyebrow: "text-sm"
|
|
1581
1587
|
}
|
|
1582
|
-
},
|
|
1588
|
+
}, ye = {
|
|
1583
1589
|
left: {
|
|
1584
1590
|
wrapper: "items-start text-left",
|
|
1585
1591
|
actions: "justify-start"
|
|
@@ -1593,8 +1599,8 @@ var fe = {
|
|
|
1593
1599
|
actions: "justify-end"
|
|
1594
1600
|
}
|
|
1595
1601
|
};
|
|
1596
|
-
function
|
|
1597
|
-
let h =
|
|
1602
|
+
function be({ eyebrow: e, title: t, description: n, actions: r = [], align: i = "center", layout: a = "stacked", size: c = "md", variant: l = "default", background: u, backgroundImage: d, media: f, className: p = "", style: m }) {
|
|
1603
|
+
let h = _e[l], g = ve[c], _ = ye[i], v = a === "inline", y = {
|
|
1598
1604
|
...u ? { background: u } : {},
|
|
1599
1605
|
...d ? {
|
|
1600
1606
|
backgroundImage: `url(${d})`,
|
|
@@ -1606,16 +1612,16 @@ function ge({ eyebrow: e, title: t, description: n, actions: r = [], align: i =
|
|
|
1606
1612
|
return /* @__PURE__ */ s("div", {
|
|
1607
1613
|
className: [
|
|
1608
1614
|
"w-full",
|
|
1609
|
-
|
|
1615
|
+
ge[l],
|
|
1610
1616
|
g.wrapper,
|
|
1611
1617
|
p
|
|
1612
1618
|
].filter(Boolean).join(" "),
|
|
1613
|
-
style: Object.keys(
|
|
1619
|
+
style: Object.keys(y).length ? y : void 0,
|
|
1614
1620
|
children: [(l === "image" || d) && /* @__PURE__ */ o("div", { className: "absolute inset-0 bg-black/50" }), /* @__PURE__ */ s("div", {
|
|
1615
|
-
className: `relative ${
|
|
1621
|
+
className: `relative ${v ? "flex flex-wrap items-center justify-between gap-6" : `flex flex-col gap-4 ${_.wrapper}`}`,
|
|
1616
1622
|
children: [
|
|
1617
1623
|
/* @__PURE__ */ s("div", {
|
|
1618
|
-
className: `flex flex-col gap-2 ${
|
|
1624
|
+
className: `flex flex-col gap-2 ${v ? "flex-1 min-w-0" : _.wrapper}`,
|
|
1619
1625
|
children: [
|
|
1620
1626
|
e && /* @__PURE__ */ o("p", {
|
|
1621
1627
|
className: `font-semibold uppercase tracking-widest ${g.eyebrow} ${h.eyebrow}`,
|
|
@@ -1631,15 +1637,15 @@ function ge({ eyebrow: e, title: t, description: n, actions: r = [], align: i =
|
|
|
1631
1637
|
})
|
|
1632
1638
|
]
|
|
1633
1639
|
}),
|
|
1634
|
-
f && !
|
|
1640
|
+
f && !v && /* @__PURE__ */ o("div", {
|
|
1635
1641
|
className: "mt-2",
|
|
1636
1642
|
children: f
|
|
1637
1643
|
}),
|
|
1638
1644
|
r.length > 0 && /* @__PURE__ */ o("div", {
|
|
1639
|
-
className: `flex flex-wrap gap-3 ${
|
|
1645
|
+
className: `flex flex-wrap gap-3 ${v ? "shrink-0" : _.actions}`,
|
|
1640
1646
|
children: r.map((e, t) => {
|
|
1641
|
-
let n = /* @__PURE__ */ o(
|
|
1642
|
-
variant: e.variant ?? (t === 0 ?
|
|
1647
|
+
let n = /* @__PURE__ */ o(x, {
|
|
1648
|
+
variant: e.variant ?? (t === 0 ? xe(l) : "outline"),
|
|
1643
1649
|
size: e.size ?? (c === "sm" ? "sm" : c === "xl" ? "lg" : "md"),
|
|
1644
1650
|
onClick: e.onClick,
|
|
1645
1651
|
children: e.label
|
|
@@ -1655,12 +1661,12 @@ function ge({ eyebrow: e, title: t, description: n, actions: r = [], align: i =
|
|
|
1655
1661
|
})]
|
|
1656
1662
|
});
|
|
1657
1663
|
}
|
|
1658
|
-
function
|
|
1664
|
+
function xe(e) {
|
|
1659
1665
|
return e === "default" || e === "outline" ? "primary" : "secondary";
|
|
1660
1666
|
}
|
|
1661
1667
|
//#endregion
|
|
1662
1668
|
//#region src/components/Footer/Footer.tsx
|
|
1663
|
-
function
|
|
1669
|
+
function Se() {
|
|
1664
1670
|
return /* @__PURE__ */ o("svg", {
|
|
1665
1671
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1666
1672
|
fill: "none",
|
|
@@ -1675,7 +1681,7 @@ function ve() {
|
|
|
1675
1681
|
})
|
|
1676
1682
|
});
|
|
1677
1683
|
}
|
|
1678
|
-
function
|
|
1684
|
+
function Ce() {
|
|
1679
1685
|
return /* @__PURE__ */ o("svg", {
|
|
1680
1686
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1681
1687
|
fill: "none",
|
|
@@ -1690,7 +1696,7 @@ function ye() {
|
|
|
1690
1696
|
})
|
|
1691
1697
|
});
|
|
1692
1698
|
}
|
|
1693
|
-
function
|
|
1699
|
+
function we() {
|
|
1694
1700
|
return /* @__PURE__ */ s("svg", {
|
|
1695
1701
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1696
1702
|
fill: "none",
|
|
@@ -1709,7 +1715,7 @@ function be() {
|
|
|
1709
1715
|
})]
|
|
1710
1716
|
});
|
|
1711
1717
|
}
|
|
1712
|
-
function
|
|
1718
|
+
function Te() {
|
|
1713
1719
|
return /* @__PURE__ */ o("svg", {
|
|
1714
1720
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1715
1721
|
fill: "none",
|
|
@@ -1724,7 +1730,7 @@ function xe() {
|
|
|
1724
1730
|
})
|
|
1725
1731
|
});
|
|
1726
1732
|
}
|
|
1727
|
-
function
|
|
1733
|
+
function Ee() {
|
|
1728
1734
|
return /* @__PURE__ */ o("svg", {
|
|
1729
1735
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1730
1736
|
viewBox: "0 0 24 24",
|
|
@@ -1733,7 +1739,7 @@ function Se() {
|
|
|
1733
1739
|
children: /* @__PURE__ */ o("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" })
|
|
1734
1740
|
});
|
|
1735
1741
|
}
|
|
1736
|
-
function
|
|
1742
|
+
function De() {
|
|
1737
1743
|
return /* @__PURE__ */ o("svg", {
|
|
1738
1744
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1739
1745
|
viewBox: "0 0 24 24",
|
|
@@ -1742,7 +1748,7 @@ function Ce() {
|
|
|
1742
1748
|
children: /* @__PURE__ */ o("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" })
|
|
1743
1749
|
});
|
|
1744
1750
|
}
|
|
1745
|
-
function
|
|
1751
|
+
function $() {
|
|
1746
1752
|
return /* @__PURE__ */ o("svg", {
|
|
1747
1753
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1748
1754
|
viewBox: "0 0 24 24",
|
|
@@ -1751,7 +1757,7 @@ function we() {
|
|
|
1751
1757
|
children: /* @__PURE__ */ o("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" })
|
|
1752
1758
|
});
|
|
1753
1759
|
}
|
|
1754
|
-
function
|
|
1760
|
+
function Oe() {
|
|
1755
1761
|
return /* @__PURE__ */ o("svg", {
|
|
1756
1762
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1757
1763
|
viewBox: "0 0 24 24",
|
|
@@ -1760,7 +1766,7 @@ function Te() {
|
|
|
1760
1766
|
children: /* @__PURE__ */ o("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" })
|
|
1761
1767
|
});
|
|
1762
1768
|
}
|
|
1763
|
-
function
|
|
1769
|
+
function ke() {
|
|
1764
1770
|
return /* @__PURE__ */ o("svg", {
|
|
1765
1771
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1766
1772
|
viewBox: "0 0 24 24",
|
|
@@ -1769,34 +1775,34 @@ function Ee() {
|
|
|
1769
1775
|
children: /* @__PURE__ */ o("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" })
|
|
1770
1776
|
});
|
|
1771
1777
|
}
|
|
1772
|
-
var
|
|
1773
|
-
facebook:
|
|
1774
|
-
instagram:
|
|
1775
|
-
twitter:
|
|
1776
|
-
youtube:
|
|
1777
|
-
tiktok:
|
|
1778
|
-
},
|
|
1779
|
-
phone:
|
|
1780
|
-
email:
|
|
1781
|
-
address:
|
|
1782
|
-
hours:
|
|
1778
|
+
var Ae = {
|
|
1779
|
+
facebook: Ee,
|
|
1780
|
+
instagram: De,
|
|
1781
|
+
twitter: $,
|
|
1782
|
+
youtube: Oe,
|
|
1783
|
+
tiktok: ke
|
|
1784
|
+
}, je = {
|
|
1785
|
+
phone: Se,
|
|
1786
|
+
email: Ce,
|
|
1787
|
+
address: we,
|
|
1788
|
+
hours: Te
|
|
1783
1789
|
};
|
|
1784
|
-
function
|
|
1790
|
+
function Me(e) {
|
|
1785
1791
|
if (!e) return null;
|
|
1786
1792
|
if (typeof e == "string") {
|
|
1787
|
-
let t =
|
|
1793
|
+
let t = je[e];
|
|
1788
1794
|
return t ? /* @__PURE__ */ o(t, {}) : null;
|
|
1789
1795
|
}
|
|
1790
1796
|
return e;
|
|
1791
1797
|
}
|
|
1792
|
-
function
|
|
1798
|
+
function Ne(e) {
|
|
1793
1799
|
if (typeof e == "string") {
|
|
1794
|
-
let t =
|
|
1800
|
+
let t = Ae[e];
|
|
1795
1801
|
return t ? /* @__PURE__ */ o(t, {}) : null;
|
|
1796
1802
|
}
|
|
1797
1803
|
return e;
|
|
1798
1804
|
}
|
|
1799
|
-
function
|
|
1805
|
+
function Pe({ logo: e, tagline: t, contactHeading: n = "Kontakty", contacts: r = [], linkGroups: i = [], socialLinks: a = [], copyright: c, bottomLinks: l = [], className: u = "" }) {
|
|
1800
1806
|
let d = (/* @__PURE__ */ new Date()).getFullYear();
|
|
1801
1807
|
return /* @__PURE__ */ s("footer", {
|
|
1802
1808
|
className: ["bg-gray-900 text-gray-300", u].filter(Boolean).join(" "),
|
|
@@ -1821,7 +1827,7 @@ function je({ logo: e, tagline: t, contactHeading: n = "Kontakty", contacts: r =
|
|
|
1821
1827
|
}), /* @__PURE__ */ o("ul", {
|
|
1822
1828
|
className: "space-y-3",
|
|
1823
1829
|
children: r.map((e, t) => {
|
|
1824
|
-
let n =
|
|
1830
|
+
let n = Me(e.icon), r = /* @__PURE__ */ s("div", {
|
|
1825
1831
|
className: "flex items-start gap-2.5",
|
|
1826
1832
|
children: [n && /* @__PURE__ */ o("span", {
|
|
1827
1833
|
className: "mt-0.5 text-primary-400",
|
|
@@ -1846,7 +1852,7 @@ function je({ logo: e, tagline: t, contactHeading: n = "Kontakty", contacts: r =
|
|
|
1846
1852
|
href: e.href,
|
|
1847
1853
|
"aria-label": e.label,
|
|
1848
1854
|
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",
|
|
1849
|
-
children:
|
|
1855
|
+
children: Ne(e.icon)
|
|
1850
1856
|
}, t))
|
|
1851
1857
|
})
|
|
1852
1858
|
]
|
|
@@ -1892,6 +1898,6 @@ function je({ logo: e, tagline: t, contactHeading: n = "Kontakty", contacts: r =
|
|
|
1892
1898
|
});
|
|
1893
1899
|
}
|
|
1894
1900
|
//#endregion
|
|
1895
|
-
export {
|
|
1901
|
+
export { M as Alert, ie as Avatar, O as Badge, ce as BannerCarousel, x as Button, be as CallToAction, te as Card, re as CardBody, k as CardFooter, ne as CardHeader, ae as CategoryTree, F as Checkbox, v as Container, Pe as Footer, W as Header, E as Heading, C as IconButton, w as Input, S as LoadingSpin, y as Main, se as MegaMenu, P as Modal, V as Pagination, Z as ProductCard, he as ProductGrid, T as Select, A as Spinner, D as Text, I as Toggle };
|
|
1896
1902
|
|
|
1897
1903
|
//# sourceMappingURL=index.js.map
|