@shopito/design-system-fe 0.1.6 → 0.1.7
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/QuantityInput/QuantityInput.d.ts +18 -0
- package/dist/common/QuantityInput/QuantityInput.d.ts.map +1 -0
- package/dist/common/QuantityInput/index.d.ts +3 -0
- package/dist/common/QuantityInput/index.d.ts.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +591 -483
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { forwardRef as e, useCallback as t, useEffect as n,
|
|
2
|
-
import { Fragment as
|
|
3
|
-
import { createPortal as
|
|
1
|
+
import { forwardRef as e, useCallback as t, useEffect as n, useId as r, useRef as i, useState as a } from "react";
|
|
2
|
+
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
3
|
+
import { createPortal as l } from "react-dom";
|
|
4
4
|
//#region \0rolldown/runtime.js
|
|
5
|
-
var
|
|
6
|
-
if (t && typeof t == "object" || typeof t == "function") for (var i =
|
|
5
|
+
var u = Object.create, d = Object.defineProperty, f = Object.getOwnPropertyDescriptor, p = Object.getOwnPropertyNames, m = Object.getPrototypeOf, h = Object.prototype.hasOwnProperty, g = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), _ = (e, t, n, r) => {
|
|
6
|
+
if (t && typeof t == "object" || typeof t == "function") for (var i = p(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !h.call(e, s) && s !== n && d(e, s, {
|
|
7
7
|
get: ((e) => t[e]).bind(null, s),
|
|
8
|
-
enumerable: !(r =
|
|
8
|
+
enumerable: !(r = f(t, s)) || r.enumerable
|
|
9
9
|
});
|
|
10
10
|
return e;
|
|
11
|
-
},
|
|
11
|
+
}, v = (e, t, n) => (n = e == null ? {} : u(m(e)), _(t || !e || !e.__esModule ? d(n, "default", {
|
|
12
12
|
value: e,
|
|
13
13
|
enumerable: !0
|
|
14
|
-
}) : n, e)),
|
|
14
|
+
}) : n, e)), y = ({ children: e }) => /* @__PURE__ */ s("div", {
|
|
15
15
|
className: "container",
|
|
16
16
|
children: e
|
|
17
|
-
}),
|
|
17
|
+
}), b = ({ children: e }) => /* @__PURE__ */ s("main", {
|
|
18
18
|
className: "main",
|
|
19
19
|
children: e
|
|
20
|
-
}),
|
|
20
|
+
}), x = /* @__PURE__ */ v((/* @__PURE__ */ g(((e, t) => {
|
|
21
21
|
(function() {
|
|
22
22
|
var e = {}.hasOwnProperty;
|
|
23
23
|
function n() {
|
|
@@ -43,137 +43,137 @@ var l = Object.create, u = Object.defineProperty, d = Object.getOwnPropertyDescr
|
|
|
43
43
|
return n;
|
|
44
44
|
}) : window.classNames = n;
|
|
45
45
|
})();
|
|
46
|
-
})))(), 1),
|
|
46
|
+
})))(), 1), S = e(({ variant: e = "primary", size: t = "md", loading: n = !1, fullWidth: r = !1, disabled: i, children: a, className: o = "", ...l }, u) => /* @__PURE__ */ c("button", {
|
|
47
47
|
ref: u,
|
|
48
48
|
disabled: i || n,
|
|
49
|
-
className: (0,
|
|
49
|
+
className: (0, x.default)("btn", e && `btn-${e}`, t && `btn-${t}`, r && "w-full", o),
|
|
50
50
|
...l,
|
|
51
|
-
children: [n && /* @__PURE__ */
|
|
51
|
+
children: [n && /* @__PURE__ */ c("svg", {
|
|
52
52
|
className: "animate-spin h-4 w-4 shrink-0",
|
|
53
53
|
xmlns: "http://www.w3.org/2000/svg",
|
|
54
54
|
fill: "none",
|
|
55
55
|
viewBox: "0 0 24 24",
|
|
56
|
-
children: [/* @__PURE__ */
|
|
56
|
+
children: [/* @__PURE__ */ s("circle", {
|
|
57
57
|
className: "opacity-25",
|
|
58
58
|
cx: "12",
|
|
59
59
|
cy: "12",
|
|
60
60
|
r: "10",
|
|
61
61
|
stroke: "currentColor",
|
|
62
62
|
strokeWidth: "4"
|
|
63
|
-
}), /* @__PURE__ */
|
|
63
|
+
}), /* @__PURE__ */ s("path", {
|
|
64
64
|
className: "opacity-75",
|
|
65
65
|
fill: "currentColor",
|
|
66
66
|
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"
|
|
67
67
|
})]
|
|
68
68
|
}), a]
|
|
69
69
|
}));
|
|
70
|
-
|
|
70
|
+
S.displayName = "Button";
|
|
71
71
|
//#endregion
|
|
72
72
|
//#region src/components/common/LoadingSpin/LoadingSpin.tsx
|
|
73
|
-
var
|
|
74
|
-
className: (0,
|
|
73
|
+
var C = ({ size: e = "md" }) => /* @__PURE__ */ c("svg", {
|
|
74
|
+
className: (0, x.default)("loading-spin", `loading-spin-${e}`),
|
|
75
75
|
xmlns: "http://www.w3.org/2000/svg",
|
|
76
76
|
fill: "none",
|
|
77
77
|
viewBox: "0 0 24 24",
|
|
78
|
-
children: [/* @__PURE__ */
|
|
78
|
+
children: [/* @__PURE__ */ s("circle", {
|
|
79
79
|
className: "opacity-25",
|
|
80
80
|
cx: "12",
|
|
81
81
|
cy: "12",
|
|
82
82
|
r: "10",
|
|
83
83
|
stroke: "currentColor",
|
|
84
84
|
strokeWidth: "4"
|
|
85
|
-
}), /* @__PURE__ */
|
|
85
|
+
}), /* @__PURE__ */ s("path", {
|
|
86
86
|
className: "opacity-75",
|
|
87
87
|
fill: "currentColor",
|
|
88
88
|
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"
|
|
89
89
|
})]
|
|
90
|
-
}),
|
|
90
|
+
}), w = e(({ icon: e, label: t, variant: n = "ghost", size: r = "md", loading: i = !1, disabled: a, className: o = "", ...c }, l) => /* @__PURE__ */ s("button", {
|
|
91
91
|
ref: l,
|
|
92
92
|
disabled: a || i,
|
|
93
93
|
"aria-label": t,
|
|
94
94
|
title: t,
|
|
95
|
-
className: (0,
|
|
95
|
+
className: (0, x.default)("icon-button", `icon-button-${n}`, `icon-button-${r}`, o),
|
|
96
96
|
...c,
|
|
97
|
-
children: i ? /* @__PURE__ */
|
|
97
|
+
children: i ? /* @__PURE__ */ s(C, { size: r }) : e
|
|
98
98
|
}));
|
|
99
|
-
|
|
99
|
+
w.displayName = "IconButton";
|
|
100
100
|
//#endregion
|
|
101
101
|
//#region src/components/common/Input/Input.tsx
|
|
102
|
-
var
|
|
102
|
+
var T = e(({ label: e, error: t, hint: n, leftIcon: r, rightIcon: i, fullWidth: a = !1, className: o = "", id: l, ...u }, d) => {
|
|
103
103
|
let f = l ?? e?.toLowerCase().replace(/\s+/g, "-");
|
|
104
|
-
return /* @__PURE__ */
|
|
104
|
+
return /* @__PURE__ */ c("div", {
|
|
105
105
|
className: a ? "w-full" : "inline-block",
|
|
106
106
|
children: [
|
|
107
|
-
e && /* @__PURE__ */
|
|
107
|
+
e && /* @__PURE__ */ s("label", {
|
|
108
108
|
htmlFor: f,
|
|
109
109
|
className: "input-label",
|
|
110
110
|
children: e
|
|
111
111
|
}),
|
|
112
|
-
/* @__PURE__ */
|
|
112
|
+
/* @__PURE__ */ c("div", {
|
|
113
113
|
className: "relative",
|
|
114
114
|
children: [
|
|
115
|
-
r && /* @__PURE__ */
|
|
115
|
+
r && /* @__PURE__ */ s("span", {
|
|
116
116
|
className: "left-icon",
|
|
117
117
|
children: r
|
|
118
118
|
}),
|
|
119
|
-
/* @__PURE__ */
|
|
119
|
+
/* @__PURE__ */ s("input", {
|
|
120
120
|
ref: d,
|
|
121
121
|
id: f,
|
|
122
|
-
className: (0,
|
|
122
|
+
className: (0, x.default)("input", t && "has-error", !!r && "with-left-icon", !!i && "with-right-icon", a && "w-full", o),
|
|
123
123
|
...u
|
|
124
124
|
}),
|
|
125
|
-
i && /* @__PURE__ */
|
|
125
|
+
i && /* @__PURE__ */ s("span", {
|
|
126
126
|
className: "right-icon",
|
|
127
127
|
children: i
|
|
128
128
|
})
|
|
129
129
|
]
|
|
130
130
|
}),
|
|
131
|
-
(t || n) && /* @__PURE__ */
|
|
132
|
-
className: (0,
|
|
131
|
+
(t || n) && /* @__PURE__ */ s("p", {
|
|
132
|
+
className: (0, x.default)("helper-text", t && "has-error"),
|
|
133
133
|
children: t ?? n
|
|
134
134
|
})
|
|
135
135
|
]
|
|
136
136
|
});
|
|
137
137
|
});
|
|
138
|
-
|
|
138
|
+
T.displayName = "Input";
|
|
139
139
|
//#endregion
|
|
140
140
|
//#region src/components/common/Select/Select.tsx
|
|
141
|
-
var
|
|
141
|
+
var E = e(({ label: e, error: t, hint: n, options: r, placeholder: i, fullWidth: a = !0, className: o = "", id: l, ...u }, d) => {
|
|
142
142
|
let f = l ?? e?.toLowerCase().replace(/\s+/g, "-");
|
|
143
|
-
return /* @__PURE__ */
|
|
144
|
-
className: (0,
|
|
143
|
+
return /* @__PURE__ */ c("div", {
|
|
144
|
+
className: (0, x.default)("select-wrapper", a && "w-full"),
|
|
145
145
|
children: [
|
|
146
|
-
e && /* @__PURE__ */
|
|
146
|
+
e && /* @__PURE__ */ s("label", {
|
|
147
147
|
htmlFor: f,
|
|
148
148
|
className: "select-label",
|
|
149
149
|
children: e
|
|
150
150
|
}),
|
|
151
|
-
/* @__PURE__ */
|
|
151
|
+
/* @__PURE__ */ c("div", {
|
|
152
152
|
className: "relative",
|
|
153
|
-
children: [/* @__PURE__ */
|
|
153
|
+
children: [/* @__PURE__ */ c("select", {
|
|
154
154
|
ref: d,
|
|
155
155
|
id: f,
|
|
156
|
-
className: (0,
|
|
156
|
+
className: (0, x.default)("select", t && "has-error", a && "w-full", o),
|
|
157
157
|
...u,
|
|
158
|
-
children: [i && /* @__PURE__ */
|
|
158
|
+
children: [i && /* @__PURE__ */ s("option", {
|
|
159
159
|
value: "",
|
|
160
160
|
disabled: !0,
|
|
161
161
|
children: i
|
|
162
|
-
}), r.map((e) => /* @__PURE__ */
|
|
162
|
+
}), r.map((e) => /* @__PURE__ */ s("option", {
|
|
163
163
|
value: e.value,
|
|
164
164
|
disabled: e.disabled,
|
|
165
165
|
children: e.label
|
|
166
166
|
}, e.value))]
|
|
167
|
-
}), /* @__PURE__ */
|
|
167
|
+
}), /* @__PURE__ */ s("span", {
|
|
168
168
|
className: "select-chevron-icon",
|
|
169
|
-
children: /* @__PURE__ */
|
|
169
|
+
children: /* @__PURE__ */ s("svg", {
|
|
170
170
|
xmlns: "http://www.w3.org/2000/svg",
|
|
171
171
|
fill: "none",
|
|
172
172
|
viewBox: "0 0 24 24",
|
|
173
173
|
strokeWidth: 2,
|
|
174
174
|
stroke: "currentColor",
|
|
175
175
|
className: "w-4 h-4",
|
|
176
|
-
children: /* @__PURE__ */
|
|
176
|
+
children: /* @__PURE__ */ s("path", {
|
|
177
177
|
strokeLinecap: "round",
|
|
178
178
|
strokeLinejoin: "round",
|
|
179
179
|
d: "M19.5 8.25l-7.5 7.5-7.5-7.5"
|
|
@@ -181,71 +181,71 @@ var T = e(({ label: e, error: t, hint: n, options: r, placeholder: i, fullWidth:
|
|
|
181
181
|
})
|
|
182
182
|
})]
|
|
183
183
|
}),
|
|
184
|
-
(t || n) && /* @__PURE__ */
|
|
185
|
-
className: (0,
|
|
184
|
+
(t || n) && /* @__PURE__ */ s("p", {
|
|
185
|
+
className: (0, x.default)("select-helper", t && "has-error"),
|
|
186
186
|
children: t ?? n
|
|
187
187
|
})
|
|
188
188
|
]
|
|
189
189
|
});
|
|
190
190
|
});
|
|
191
|
-
|
|
191
|
+
E.displayName = "Select";
|
|
192
192
|
//#endregion
|
|
193
193
|
//#region src/components/common/Typography/Heading.tsx
|
|
194
|
-
var
|
|
195
|
-
className: (0,
|
|
194
|
+
var D = ({ as: e, level: t = 1, color: n = "default", className: r = "", children: i, ...a }) => /* @__PURE__ */ s(e ?? `h${t}`, {
|
|
195
|
+
className: (0, x.default)(`text-color-${n}`, `heading-size-${t}`, r),
|
|
196
196
|
...a,
|
|
197
197
|
children: i
|
|
198
|
-
}),
|
|
199
|
-
className: (0,
|
|
198
|
+
}), O = ({ variant: e = "body", color: t = "default", as: n = "p", className: r = "", children: i, ...a }) => /* @__PURE__ */ s(n, {
|
|
199
|
+
className: (0, x.default)(`text-color-${t}`, `text-variant-${e}`, r),
|
|
200
200
|
...a,
|
|
201
201
|
children: i
|
|
202
202
|
});
|
|
203
203
|
//#endregion
|
|
204
204
|
//#region src/components/common/Badge/Badge.tsx
|
|
205
|
-
function
|
|
206
|
-
return /* @__PURE__ */
|
|
207
|
-
className: (0,
|
|
205
|
+
function k({ variant: e = "default", size: t = "md", dot: n = !1, className: r, children: i, ...a }) {
|
|
206
|
+
return /* @__PURE__ */ c("span", {
|
|
207
|
+
className: (0, x.default)("badge", `badge-${e}`, `badge-${t}`, r),
|
|
208
208
|
...a,
|
|
209
|
-
children: [n && /* @__PURE__ */
|
|
209
|
+
children: [n && /* @__PURE__ */ s("span", { className: (0, x.default)("badge-dot", `badge-dot-${e}`) }), i]
|
|
210
210
|
});
|
|
211
211
|
}
|
|
212
212
|
//#endregion
|
|
213
213
|
//#region src/components/common/Card/Card.tsx
|
|
214
|
-
var
|
|
214
|
+
var A = {
|
|
215
215
|
none: "",
|
|
216
216
|
sm: "p-4",
|
|
217
217
|
md: "p-6",
|
|
218
218
|
lg: "p-8"
|
|
219
219
|
};
|
|
220
|
-
function
|
|
221
|
-
return /* @__PURE__ */
|
|
220
|
+
function j({ children: e, padding: t = "md", shadow: n = !0, border: r = !0, className: i = "", ...a }) {
|
|
221
|
+
return /* @__PURE__ */ s("div", {
|
|
222
222
|
className: [
|
|
223
223
|
"bg-white rounded-xl overflow-hidden",
|
|
224
224
|
r ? "border border-gray-200" : "",
|
|
225
225
|
n ? "shadow-sm" : "",
|
|
226
|
-
|
|
226
|
+
A[t],
|
|
227
227
|
i
|
|
228
228
|
].filter(Boolean).join(" "),
|
|
229
229
|
...a,
|
|
230
230
|
children: e
|
|
231
231
|
});
|
|
232
232
|
}
|
|
233
|
-
function
|
|
234
|
-
return /* @__PURE__ */
|
|
233
|
+
function M({ children: e, className: t = "", ...n }) {
|
|
234
|
+
return /* @__PURE__ */ s("div", {
|
|
235
235
|
className: ["px-6 py-4 border-b border-gray-100", t].filter(Boolean).join(" "),
|
|
236
236
|
...n,
|
|
237
237
|
children: e
|
|
238
238
|
});
|
|
239
239
|
}
|
|
240
|
-
function
|
|
241
|
-
return /* @__PURE__ */
|
|
240
|
+
function ee({ children: e, className: t = "", ...n }) {
|
|
241
|
+
return /* @__PURE__ */ s("div", {
|
|
242
242
|
className: ["p-6", t].filter(Boolean).join(" "),
|
|
243
243
|
...n,
|
|
244
244
|
children: e
|
|
245
245
|
});
|
|
246
246
|
}
|
|
247
|
-
function
|
|
248
|
-
return /* @__PURE__ */
|
|
247
|
+
function te({ children: e, className: t = "", ...n }) {
|
|
248
|
+
return /* @__PURE__ */ s("div", {
|
|
249
249
|
className: ["px-6 py-4 border-t border-gray-100 bg-gray-50", t].filter(Boolean).join(" "),
|
|
250
250
|
...n,
|
|
251
251
|
children: e
|
|
@@ -253,13 +253,13 @@ function j({ children: e, className: t = "", ...n }) {
|
|
|
253
253
|
}
|
|
254
254
|
//#endregion
|
|
255
255
|
//#region src/components/common/Spinner/Spinner.tsx
|
|
256
|
-
function
|
|
257
|
-
return /* @__PURE__ */
|
|
256
|
+
function N({ size: e = "md", color: t = "primary", label: n = "Loading…", className: r = "", ...i }) {
|
|
257
|
+
return /* @__PURE__ */ c("span", {
|
|
258
258
|
role: "status",
|
|
259
259
|
"aria-label": n,
|
|
260
|
-
className: (0,
|
|
260
|
+
className: (0, x.default)("spinner-wrapper", r),
|
|
261
261
|
...i,
|
|
262
|
-
children: [/* @__PURE__ */
|
|
262
|
+
children: [/* @__PURE__ */ s("span", { className: (0, x.default)("spinner", `spinner-${e}`, `spinner-${t}`) }), /* @__PURE__ */ s("span", {
|
|
263
263
|
className: "sr-only",
|
|
264
264
|
children: n
|
|
265
265
|
})]
|
|
@@ -267,65 +267,65 @@ function ne({ size: e = "md", color: t = "primary", label: n = "Loading…", cla
|
|
|
267
267
|
}
|
|
268
268
|
//#endregion
|
|
269
269
|
//#region src/components/common/Alert/Alert.tsx
|
|
270
|
-
var
|
|
271
|
-
info: /* @__PURE__ */
|
|
270
|
+
var P = {
|
|
271
|
+
info: /* @__PURE__ */ s("path", {
|
|
272
272
|
strokeLinecap: "round",
|
|
273
273
|
strokeLinejoin: "round",
|
|
274
274
|
d: "M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z"
|
|
275
275
|
}),
|
|
276
|
-
success: /* @__PURE__ */
|
|
276
|
+
success: /* @__PURE__ */ s("path", {
|
|
277
277
|
strokeLinecap: "round",
|
|
278
278
|
strokeLinejoin: "round",
|
|
279
279
|
d: "M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
280
280
|
}),
|
|
281
|
-
warning: /* @__PURE__ */
|
|
281
|
+
warning: /* @__PURE__ */ s("path", {
|
|
282
282
|
strokeLinecap: "round",
|
|
283
283
|
strokeLinejoin: "round",
|
|
284
284
|
d: "M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"
|
|
285
285
|
}),
|
|
286
|
-
danger: /* @__PURE__ */
|
|
286
|
+
danger: /* @__PURE__ */ s("path", {
|
|
287
287
|
strokeLinecap: "round",
|
|
288
288
|
strokeLinejoin: "round",
|
|
289
289
|
d: "M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z"
|
|
290
290
|
})
|
|
291
291
|
};
|
|
292
|
-
function
|
|
293
|
-
return /* @__PURE__ */
|
|
292
|
+
function ne({ variant: e = "info", title: t, children: n, onClose: r, className: i = "", ...a }) {
|
|
293
|
+
return /* @__PURE__ */ c("div", {
|
|
294
294
|
role: "alert",
|
|
295
|
-
className: (0,
|
|
295
|
+
className: (0, x.default)("alert", `alert-${e}`, "w-full", i),
|
|
296
296
|
...a,
|
|
297
297
|
children: [
|
|
298
|
-
/* @__PURE__ */
|
|
298
|
+
/* @__PURE__ */ s("svg", {
|
|
299
299
|
xmlns: "http://www.w3.org/2000/svg",
|
|
300
300
|
fill: "none",
|
|
301
301
|
viewBox: "0 0 24 24",
|
|
302
302
|
strokeWidth: 1.5,
|
|
303
303
|
stroke: "currentColor",
|
|
304
|
-
className: (0,
|
|
305
|
-
children:
|
|
304
|
+
className: (0, x.default)("alert-icon", `alert-icon-${e}`),
|
|
305
|
+
children: P[e]
|
|
306
306
|
}),
|
|
307
|
-
/* @__PURE__ */
|
|
307
|
+
/* @__PURE__ */ c("div", {
|
|
308
308
|
className: "flex-1 min-w-0",
|
|
309
|
-
children: [t && /* @__PURE__ */
|
|
309
|
+
children: [t && /* @__PURE__ */ s("p", {
|
|
310
310
|
className: "alert-title",
|
|
311
311
|
children: t
|
|
312
|
-
}), /* @__PURE__ */
|
|
312
|
+
}), /* @__PURE__ */ s("div", {
|
|
313
313
|
className: "alert-text",
|
|
314
314
|
children: n
|
|
315
315
|
})]
|
|
316
316
|
}),
|
|
317
|
-
r && /* @__PURE__ */
|
|
317
|
+
r && /* @__PURE__ */ s("button", {
|
|
318
318
|
onClick: r,
|
|
319
319
|
className: "alert-close-btn",
|
|
320
320
|
"aria-label": "Close",
|
|
321
|
-
children: /* @__PURE__ */
|
|
321
|
+
children: /* @__PURE__ */ s("svg", {
|
|
322
322
|
xmlns: "http://www.w3.org/2000/svg",
|
|
323
323
|
fill: "none",
|
|
324
324
|
viewBox: "0 0 24 24",
|
|
325
325
|
strokeWidth: 1.5,
|
|
326
326
|
stroke: "currentColor",
|
|
327
327
|
className: "w-4 h-4",
|
|
328
|
-
children: /* @__PURE__ */
|
|
328
|
+
children: /* @__PURE__ */ s("path", {
|
|
329
329
|
strokeLinecap: "round",
|
|
330
330
|
strokeLinejoin: "round",
|
|
331
331
|
d: "M6 18L18 6M6 6l12 12"
|
|
@@ -337,15 +337,15 @@ function M({ 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 re = {
|
|
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
|
|
348
|
-
let f =
|
|
347
|
+
function F({ open: e, onClose: t, title: r, children: a, footer: o, size: u = "md", closeOnBackdrop: d = !0 }) {
|
|
348
|
+
let f = i(null);
|
|
349
349
|
return n(() => {
|
|
350
350
|
if (!e) return;
|
|
351
351
|
let t = document.body.style.overflow;
|
|
@@ -358,36 +358,36 @@ function P({ open: e, onClose: t, title: i, children: a, footer: l, size: u = "m
|
|
|
358
358
|
e.key === "Escape" && t();
|
|
359
359
|
};
|
|
360
360
|
return document.addEventListener("keydown", n), () => document.removeEventListener("keydown", n);
|
|
361
|
-
}, [e, t]), e ?
|
|
361
|
+
}, [e, t]), e ? l(/* @__PURE__ */ s("div", {
|
|
362
362
|
ref: f,
|
|
363
363
|
className: "fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/50 backdrop-blur-sm",
|
|
364
364
|
onClick: (e) => {
|
|
365
365
|
d && e.target === f.current && t();
|
|
366
366
|
},
|
|
367
|
-
children: /* @__PURE__ */
|
|
367
|
+
children: /* @__PURE__ */ c("div", {
|
|
368
368
|
role: "dialog",
|
|
369
369
|
"aria-modal": "true",
|
|
370
|
-
"aria-labelledby":
|
|
371
|
-
className: ["relative w-full bg-white rounded-xl shadow-xl flex flex-col max-h-[90vh]",
|
|
370
|
+
"aria-labelledby": r ? "modal-title" : void 0,
|
|
371
|
+
className: ["relative w-full bg-white rounded-xl shadow-xl flex flex-col max-h-[90vh]", re[u]].join(" "),
|
|
372
372
|
children: [
|
|
373
|
-
|
|
373
|
+
r && /* @__PURE__ */ c("div", {
|
|
374
374
|
className: "flex items-center justify-between px-6 py-4 border-b border-gray-100 shrink-0",
|
|
375
|
-
children: [/* @__PURE__ */
|
|
375
|
+
children: [/* @__PURE__ */ s("h2", {
|
|
376
376
|
id: "modal-title",
|
|
377
377
|
className: "text-lg font-semibold text-gray-900",
|
|
378
|
-
children:
|
|
379
|
-
}), /* @__PURE__ */
|
|
378
|
+
children: r
|
|
379
|
+
}), /* @__PURE__ */ s("button", {
|
|
380
380
|
onClick: t,
|
|
381
381
|
className: "text-gray-400 hover:text-gray-600 transition-colors",
|
|
382
382
|
"aria-label": "Close modal",
|
|
383
|
-
children: /* @__PURE__ */
|
|
383
|
+
children: /* @__PURE__ */ s("svg", {
|
|
384
384
|
xmlns: "http://www.w3.org/2000/svg",
|
|
385
385
|
fill: "none",
|
|
386
386
|
viewBox: "0 0 24 24",
|
|
387
387
|
strokeWidth: 1.5,
|
|
388
388
|
stroke: "currentColor",
|
|
389
389
|
className: "w-5 h-5",
|
|
390
|
-
children: /* @__PURE__ */
|
|
390
|
+
children: /* @__PURE__ */ s("path", {
|
|
391
391
|
strokeLinecap: "round",
|
|
392
392
|
strokeLinejoin: "round",
|
|
393
393
|
d: "M6 18L18 6M6 6l12 12"
|
|
@@ -395,13 +395,13 @@ function P({ open: e, onClose: t, title: i, children: a, footer: l, size: u = "m
|
|
|
395
395
|
})
|
|
396
396
|
})]
|
|
397
397
|
}),
|
|
398
|
-
/* @__PURE__ */
|
|
398
|
+
/* @__PURE__ */ s("div", {
|
|
399
399
|
className: "flex-1 overflow-y-auto px-6 py-4",
|
|
400
400
|
children: a
|
|
401
401
|
}),
|
|
402
|
-
|
|
402
|
+
o && /* @__PURE__ */ s("div", {
|
|
403
403
|
className: "px-6 py-4 border-t border-gray-100 shrink-0 bg-gray-50 rounded-b-xl",
|
|
404
|
-
children:
|
|
404
|
+
children: o
|
|
405
405
|
})
|
|
406
406
|
]
|
|
407
407
|
})
|
|
@@ -409,73 +409,73 @@ function P({ open: e, onClose: t, title: i, children: a, footer: l, size: u = "m
|
|
|
409
409
|
}
|
|
410
410
|
//#endregion
|
|
411
411
|
//#region src/components/common/Checkbox/Checkbox.tsx
|
|
412
|
-
var
|
|
412
|
+
var I = e(({ label: e, description: t, error: n, indeterminate: r, className: i = "", id: a, ...o }, l) => {
|
|
413
413
|
let u = a ?? e?.toLowerCase().replace(/\s+/g, "-");
|
|
414
|
-
return /* @__PURE__ */
|
|
415
|
-
className: (0,
|
|
416
|
-
children: [/* @__PURE__ */
|
|
414
|
+
return /* @__PURE__ */ c("div", {
|
|
415
|
+
className: (0, x.default)("checkbox-wrapper", i),
|
|
416
|
+
children: [/* @__PURE__ */ s("div", {
|
|
417
417
|
className: "checkbox-wrapper-inner",
|
|
418
|
-
children: /* @__PURE__ */
|
|
418
|
+
children: /* @__PURE__ */ s("input", {
|
|
419
419
|
ref: (e) => {
|
|
420
420
|
e && (e.indeterminate = r ?? !1), typeof l == "function" ? l(e) : l && (l.current = e);
|
|
421
421
|
},
|
|
422
422
|
id: u,
|
|
423
423
|
type: "checkbox",
|
|
424
|
-
className: (0,
|
|
425
|
-
...
|
|
424
|
+
className: (0, x.default)("checkbox", n && "has-error"),
|
|
425
|
+
...o
|
|
426
426
|
})
|
|
427
|
-
}), (e || t) && /* @__PURE__ */
|
|
428
|
-
e && /* @__PURE__ */
|
|
427
|
+
}), (e || t) && /* @__PURE__ */ c("div", { children: [
|
|
428
|
+
e && /* @__PURE__ */ s("label", {
|
|
429
429
|
htmlFor: u,
|
|
430
430
|
className: "checkbox-label",
|
|
431
431
|
children: e
|
|
432
432
|
}),
|
|
433
|
-
t && /* @__PURE__ */
|
|
433
|
+
t && /* @__PURE__ */ s("p", {
|
|
434
434
|
className: "checkbox-description",
|
|
435
435
|
children: t
|
|
436
436
|
}),
|
|
437
|
-
n && /* @__PURE__ */
|
|
437
|
+
n && /* @__PURE__ */ s("p", {
|
|
438
438
|
className: "checkbox-error",
|
|
439
439
|
children: n
|
|
440
440
|
})
|
|
441
441
|
] })]
|
|
442
442
|
});
|
|
443
443
|
});
|
|
444
|
-
|
|
444
|
+
I.displayName = "Checkbox";
|
|
445
445
|
//#endregion
|
|
446
446
|
//#region src/components/common/Toggle/Toggle.tsx
|
|
447
|
-
var
|
|
447
|
+
var L = e(({ label: e, description: t, size: n = "md", className: r = "", id: i, ...a }, o) => {
|
|
448
448
|
let l = i ?? e?.toLowerCase().replace(/\s+/g, "-");
|
|
449
|
-
return /* @__PURE__ */
|
|
449
|
+
return /* @__PURE__ */ c("label", {
|
|
450
450
|
htmlFor: l,
|
|
451
|
-
className: (0,
|
|
452
|
-
children: [/* @__PURE__ */
|
|
453
|
-
className: (0,
|
|
451
|
+
className: (0, x.default)("toggle", a.disabled && "toggle-disabled", r),
|
|
452
|
+
children: [/* @__PURE__ */ c("div", {
|
|
453
|
+
className: (0, x.default)("toggle-wrapper", `toggle-wrapper-${n}`),
|
|
454
454
|
children: [
|
|
455
|
-
/* @__PURE__ */
|
|
456
|
-
ref:
|
|
455
|
+
/* @__PURE__ */ s("input", {
|
|
456
|
+
ref: o,
|
|
457
457
|
id: l,
|
|
458
458
|
type: "checkbox",
|
|
459
459
|
role: "switch",
|
|
460
460
|
className: "sr-only peer",
|
|
461
461
|
...a
|
|
462
462
|
}),
|
|
463
|
-
/* @__PURE__ */
|
|
464
|
-
/* @__PURE__ */
|
|
463
|
+
/* @__PURE__ */ s("div", { className: "toggle-track" }),
|
|
464
|
+
/* @__PURE__ */ s("div", { className: (0, x.default)("toggle-thumb", `toggle-thumb-${n}`) })
|
|
465
465
|
]
|
|
466
|
-
}), (e || t) && /* @__PURE__ */
|
|
466
|
+
}), (e || t) && /* @__PURE__ */ c("div", { children: [e && /* @__PURE__ */ s("span", {
|
|
467
467
|
className: "toggle-label",
|
|
468
468
|
children: e
|
|
469
|
-
}), t && /* @__PURE__ */
|
|
469
|
+
}), t && /* @__PURE__ */ s("span", {
|
|
470
470
|
className: "toggle-description",
|
|
471
471
|
children: t
|
|
472
472
|
})] })]
|
|
473
473
|
});
|
|
474
474
|
});
|
|
475
|
-
|
|
475
|
+
L.displayName = "Toggle";
|
|
476
476
|
//#endregion
|
|
477
477
|
//#region src/components/common/Avatar/Avatar.tsx
|
|
478
|
-
var
|
|
478
|
+
var R = [
|
|
479
479
|
"bg-red-500",
|
|
480
480
|
"bg-orange-500",
|
|
481
481
|
"bg-amber-500",
|
|
@@ -487,37 +487,37 @@ var L = [
|
|
|
487
487
|
"bg-pink-500"
|
|
488
488
|
];
|
|
489
489
|
function ie({ src: e, alt: t, name: n, size: r = "md", className: i, ...a }) {
|
|
490
|
-
let
|
|
490
|
+
let o = [
|
|
491
491
|
"avatar",
|
|
492
492
|
`avatar-${r}`,
|
|
493
493
|
i
|
|
494
494
|
], c = (e) => {
|
|
495
495
|
let t = 0;
|
|
496
496
|
for (let n = 0; n < e.length; n++) t += e.charCodeAt(n);
|
|
497
|
-
return
|
|
497
|
+
return R[t % R.length];
|
|
498
498
|
}, l = (e) => e.split(" ").slice(0, 2).map((e) => e[0]).join("").toUpperCase();
|
|
499
|
-
return e ? /* @__PURE__ */
|
|
500
|
-
className: (0,
|
|
499
|
+
return e ? /* @__PURE__ */ s("span", {
|
|
500
|
+
className: (0, x.default)(o),
|
|
501
501
|
...a,
|
|
502
|
-
children: /* @__PURE__ */
|
|
502
|
+
children: /* @__PURE__ */ s("img", {
|
|
503
503
|
src: e,
|
|
504
504
|
alt: t ?? n ?? "",
|
|
505
505
|
className: "w-full h-full object-cover"
|
|
506
506
|
})
|
|
507
|
-
}) : n ? /* @__PURE__ */
|
|
508
|
-
className: (0,
|
|
507
|
+
}) : n ? /* @__PURE__ */ s("span", {
|
|
508
|
+
className: (0, x.default)(o, c(n)),
|
|
509
509
|
"aria-label": n,
|
|
510
510
|
...a,
|
|
511
511
|
children: l(n)
|
|
512
|
-
}) : /* @__PURE__ */
|
|
513
|
-
className: (0,
|
|
512
|
+
}) : /* @__PURE__ */ s("span", {
|
|
513
|
+
className: (0, x.default)(o, "avatar-fallback"),
|
|
514
514
|
...a,
|
|
515
|
-
children: /* @__PURE__ */
|
|
515
|
+
children: /* @__PURE__ */ s("svg", {
|
|
516
516
|
xmlns: "http://www.w3.org/2000/svg",
|
|
517
517
|
fill: "currentColor",
|
|
518
518
|
viewBox: "0 0 24 24",
|
|
519
519
|
className: "w-3/5 h-3/5",
|
|
520
|
-
children: /* @__PURE__ */
|
|
520
|
+
children: /* @__PURE__ */ s("path", {
|
|
521
521
|
fillRule: "evenodd",
|
|
522
522
|
d: "M7.5 6a4.5 4.5 0 119 0 4.5 4.5 0 01-9 0zM3.751 20.105a8.25 8.25 0 0116.498 0 .75.75 0 01-.437.695A18.683 18.683 0 0112 22.5c-2.786 0-5.433-.608-7.812-1.7a.75.75 0 01-.437-.695z",
|
|
523
523
|
clipRule: "evenodd"
|
|
@@ -527,8 +527,8 @@ function ie({ 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 ae = ({ direction: e = "row", gap: t, alignItems: n = "start", justifyItems: r = "start", children: i }) => /* @__PURE__ */
|
|
531
|
-
className: (0,
|
|
530
|
+
var ae = ({ direction: e = "row", gap: t, alignItems: n = "start", justifyItems: r = "start", children: i }) => /* @__PURE__ */ s("div", {
|
|
531
|
+
className: (0, x.default)("stack", `stack-${e}`, t && `gap-${t}`, {
|
|
532
532
|
start: "items-start",
|
|
533
533
|
end: "items-end",
|
|
534
534
|
center: "items-center",
|
|
@@ -541,75 +541,183 @@ var ae = ({ direction: e = "row", gap: t, alignItems: n = "start", justifyItems:
|
|
|
541
541
|
stretch: "justify-items-stretch"
|
|
542
542
|
}[r]),
|
|
543
543
|
children: i
|
|
544
|
-
}),
|
|
545
|
-
|
|
544
|
+
}), z = ({ value: e, onChange: t, min: o = 1, max: l = 999, step: u = 1, disabled: d = !1, label: f, error: p, hint: m, id: h, className: g }) => {
|
|
545
|
+
let _ = r(), v = h ?? _, y = i(null), [b, S] = a(String(e));
|
|
546
|
+
n(() => {
|
|
547
|
+
document.activeElement !== y.current && S(String(e));
|
|
548
|
+
}, [e]);
|
|
549
|
+
let C = (e) => Math.min(l, Math.max(o, e)), w = (n) => {
|
|
550
|
+
let r = parseInt(n, 10), i = isNaN(r) ? e : C(r);
|
|
551
|
+
S(String(i)), i !== e && t(i);
|
|
552
|
+
}, T = (e) => {
|
|
553
|
+
let n = e.target.value.replace(/[^0-9]/g, "");
|
|
554
|
+
S(n);
|
|
555
|
+
let r = parseInt(n, 10);
|
|
556
|
+
isNaN(r) || t(C(r));
|
|
557
|
+
}, E = () => w(b), D = (e) => {
|
|
558
|
+
if (e.key === "Enter") {
|
|
559
|
+
w(b), y.current?.blur();
|
|
560
|
+
return;
|
|
561
|
+
}
|
|
562
|
+
![
|
|
563
|
+
"Backspace",
|
|
564
|
+
"Delete",
|
|
565
|
+
"Tab",
|
|
566
|
+
"Escape",
|
|
567
|
+
"ArrowLeft",
|
|
568
|
+
"ArrowRight",
|
|
569
|
+
"Home",
|
|
570
|
+
"End"
|
|
571
|
+
].includes(e.key) && !/^[0-9]$/.test(e.key) && !e.metaKey && !e.ctrlKey && e.preventDefault();
|
|
572
|
+
}, O = () => t(C(e - u)), k = () => t(C(e + u)), A = e - u >= o, j = e + u <= l;
|
|
573
|
+
return /* @__PURE__ */ c("div", {
|
|
574
|
+
className: (0, x.default)("quantity-input-wrapper", g),
|
|
575
|
+
children: [
|
|
576
|
+
f && /* @__PURE__ */ s("label", {
|
|
577
|
+
htmlFor: v,
|
|
578
|
+
className: "input-label",
|
|
579
|
+
children: f
|
|
580
|
+
}),
|
|
581
|
+
/* @__PURE__ */ c("div", {
|
|
582
|
+
className: (0, x.default)("quantity-input", p && "has-error", d && "is-disabled"),
|
|
583
|
+
children: [
|
|
584
|
+
/* @__PURE__ */ s("button", {
|
|
585
|
+
type: "button",
|
|
586
|
+
className: "quantity-btn",
|
|
587
|
+
onClick: O,
|
|
588
|
+
disabled: d || !A,
|
|
589
|
+
"aria-label": "Snížit množství",
|
|
590
|
+
tabIndex: -1,
|
|
591
|
+
children: /* @__PURE__ */ s(oe, {})
|
|
592
|
+
}),
|
|
593
|
+
/* @__PURE__ */ s("input", {
|
|
594
|
+
ref: y,
|
|
595
|
+
id: v,
|
|
596
|
+
type: "text",
|
|
597
|
+
inputMode: "numeric",
|
|
598
|
+
className: "quantity-field",
|
|
599
|
+
value: b,
|
|
600
|
+
onChange: T,
|
|
601
|
+
onBlur: E,
|
|
602
|
+
onKeyDown: D,
|
|
603
|
+
disabled: d,
|
|
604
|
+
"aria-label": f ?? "Množství",
|
|
605
|
+
"aria-valuemin": o,
|
|
606
|
+
"aria-valuemax": l,
|
|
607
|
+
"aria-valuenow": e
|
|
608
|
+
}),
|
|
609
|
+
/* @__PURE__ */ s("button", {
|
|
610
|
+
type: "button",
|
|
611
|
+
className: "quantity-btn",
|
|
612
|
+
onClick: k,
|
|
613
|
+
disabled: d || !j,
|
|
614
|
+
"aria-label": "Zvýšit množství",
|
|
615
|
+
tabIndex: -1,
|
|
616
|
+
children: /* @__PURE__ */ s(se, {})
|
|
617
|
+
})
|
|
618
|
+
]
|
|
619
|
+
}),
|
|
620
|
+
(p || m) && /* @__PURE__ */ s("p", {
|
|
621
|
+
className: (0, x.default)("helper-text", p && "has-error"),
|
|
622
|
+
children: p ?? m
|
|
623
|
+
})
|
|
624
|
+
]
|
|
625
|
+
});
|
|
626
|
+
};
|
|
627
|
+
z.displayName = "QuantityInput";
|
|
628
|
+
var oe = () => /* @__PURE__ */ s("svg", {
|
|
629
|
+
width: "12",
|
|
630
|
+
height: "2",
|
|
631
|
+
viewBox: "0 0 12 2",
|
|
632
|
+
fill: "none",
|
|
633
|
+
"aria-hidden": "true",
|
|
634
|
+
children: /* @__PURE__ */ s("path", {
|
|
635
|
+
d: "M1 1H11",
|
|
636
|
+
stroke: "currentColor",
|
|
637
|
+
strokeWidth: "1.5",
|
|
638
|
+
strokeLinecap: "round"
|
|
639
|
+
})
|
|
640
|
+
}), se = () => /* @__PURE__ */ s("svg", {
|
|
641
|
+
width: "12",
|
|
642
|
+
height: "12",
|
|
643
|
+
viewBox: "0 0 12 12",
|
|
644
|
+
fill: "none",
|
|
645
|
+
"aria-hidden": "true",
|
|
646
|
+
children: /* @__PURE__ */ s("path", {
|
|
647
|
+
d: "M6 1V11M1 6H11",
|
|
648
|
+
stroke: "currentColor",
|
|
649
|
+
strokeWidth: "1.5",
|
|
650
|
+
strokeLinecap: "round"
|
|
651
|
+
})
|
|
652
|
+
}), B = (e, t) => Array.from({ length: t - e + 1 }, (t, n) => e + n), V = (e, t, n) => {
|
|
653
|
+
if (t <= n * 2 + 5) return B(1, t);
|
|
546
654
|
let r = Math.max(e - n, 1), i = Math.min(e + n, t), a = r > 2, o = i < t - 1;
|
|
547
655
|
return !a && o ? [
|
|
548
|
-
...
|
|
656
|
+
...B(1, 3 + n * 2),
|
|
549
657
|
"…",
|
|
550
658
|
t
|
|
551
659
|
] : a && !o ? [
|
|
552
660
|
1,
|
|
553
661
|
"…",
|
|
554
|
-
...
|
|
662
|
+
...B(t - (2 + n * 2), t)
|
|
555
663
|
] : [
|
|
556
664
|
1,
|
|
557
665
|
"…",
|
|
558
|
-
...
|
|
666
|
+
...B(r, i),
|
|
559
667
|
"…",
|
|
560
668
|
t
|
|
561
669
|
];
|
|
562
|
-
},
|
|
670
|
+
}, H = ({ active: e, disabled: t, children: n, ...r }) => /* @__PURE__ */ s("button", {
|
|
563
671
|
disabled: t,
|
|
564
|
-
className: (0,
|
|
672
|
+
className: (0, x.default)("pagination-button", `pagination-button-${e ? "active" : "inactive"}`),
|
|
565
673
|
...r,
|
|
566
674
|
children: n
|
|
567
|
-
}),
|
|
568
|
-
let i =
|
|
569
|
-
return /* @__PURE__ */
|
|
675
|
+
}), U = ({ page: e, totalPages: t, onPageChange: n, siblingsCount: r = 1 }) => {
|
|
676
|
+
let i = V(e, t, r);
|
|
677
|
+
return /* @__PURE__ */ c("nav", {
|
|
570
678
|
"aria-label": "Pagination",
|
|
571
679
|
className: "pagination",
|
|
572
680
|
children: [
|
|
573
|
-
/* @__PURE__ */
|
|
681
|
+
/* @__PURE__ */ s(H, {
|
|
574
682
|
disabled: e <= 1,
|
|
575
683
|
onClick: () => n(e - 1),
|
|
576
684
|
"aria-label": "Previous page",
|
|
577
|
-
children: /* @__PURE__ */
|
|
685
|
+
children: /* @__PURE__ */ s("svg", {
|
|
578
686
|
xmlns: "http://www.w3.org/2000/svg",
|
|
579
687
|
fill: "none",
|
|
580
688
|
viewBox: "0 0 24 24",
|
|
581
689
|
strokeWidth: 2,
|
|
582
690
|
stroke: "currentColor",
|
|
583
691
|
className: "w-4 h-4",
|
|
584
|
-
children: /* @__PURE__ */
|
|
692
|
+
children: /* @__PURE__ */ s("path", {
|
|
585
693
|
strokeLinecap: "round",
|
|
586
694
|
strokeLinejoin: "round",
|
|
587
695
|
d: "M15.75 19.5L8.25 12l7.5-7.5"
|
|
588
696
|
})
|
|
589
697
|
})
|
|
590
698
|
}),
|
|
591
|
-
i.map((t, r) => t === "…" ? /* @__PURE__ */
|
|
699
|
+
i.map((t, r) => t === "…" ? /* @__PURE__ */ s("span", {
|
|
592
700
|
className: "pagination-dots",
|
|
593
701
|
children: "…"
|
|
594
|
-
}, `dots-${r}`) : /* @__PURE__ */
|
|
702
|
+
}, `dots-${r}`) : /* @__PURE__ */ s(H, {
|
|
595
703
|
active: t === e,
|
|
596
704
|
onClick: () => n(t),
|
|
597
705
|
"aria-label": `Page ${t}`,
|
|
598
706
|
"aria-current": t === e ? "page" : void 0,
|
|
599
707
|
children: t
|
|
600
708
|
}, t)),
|
|
601
|
-
/* @__PURE__ */
|
|
709
|
+
/* @__PURE__ */ s(H, {
|
|
602
710
|
disabled: e >= t,
|
|
603
711
|
onClick: () => n(e + 1),
|
|
604
712
|
"aria-label": "Next page",
|
|
605
|
-
children: /* @__PURE__ */
|
|
713
|
+
children: /* @__PURE__ */ s("svg", {
|
|
606
714
|
xmlns: "http://www.w3.org/2000/svg",
|
|
607
715
|
fill: "none",
|
|
608
716
|
viewBox: "0 0 24 24",
|
|
609
717
|
strokeWidth: 2,
|
|
610
718
|
stroke: "currentColor",
|
|
611
719
|
className: "w-4 h-4",
|
|
612
|
-
children: /* @__PURE__ */
|
|
720
|
+
children: /* @__PURE__ */ s("path", {
|
|
613
721
|
strokeLinecap: "round",
|
|
614
722
|
strokeLinejoin: "round",
|
|
615
723
|
d: "M8.25 4.5l7.5 7.5-7.5 7.5"
|
|
@@ -621,9 +729,9 @@ var ae = ({ direction: e = "row", gap: t, alignItems: n = "start", justifyItems:
|
|
|
621
729
|
};
|
|
622
730
|
//#endregion
|
|
623
731
|
//#region src/components/Header/Header.tsx
|
|
624
|
-
function
|
|
625
|
-
let [l, u] =
|
|
626
|
-
return /* @__PURE__ */
|
|
732
|
+
function W({ trigger: e, items: t, onSelect: n, getKey: r, renderItem: o }) {
|
|
733
|
+
let [l, u] = a(!1), d = i(null), f = () => u(!1);
|
|
734
|
+
return /* @__PURE__ */ c("div", {
|
|
627
735
|
ref: d,
|
|
628
736
|
className: "relative",
|
|
629
737
|
onBlur: (e) => {
|
|
@@ -632,62 +740,62 @@ function H({ trigger: e, items: t, onSelect: n, getKey: a, renderItem: c }) {
|
|
|
632
740
|
onKeyDown: (e) => {
|
|
633
741
|
e.key === "Escape" && f();
|
|
634
742
|
},
|
|
635
|
-
children: [/* @__PURE__ */
|
|
743
|
+
children: [/* @__PURE__ */ s("div", {
|
|
636
744
|
role: "button",
|
|
637
745
|
tabIndex: 0,
|
|
638
746
|
onClick: () => u((e) => !e),
|
|
639
747
|
onKeyDown: (e) => e.key === "Enter" && u((e) => !e),
|
|
640
748
|
className: "cursor-pointer",
|
|
641
749
|
children: e
|
|
642
|
-
}), l && /* @__PURE__ */
|
|
750
|
+
}), l && /* @__PURE__ */ s("ul", {
|
|
643
751
|
role: "menu",
|
|
644
752
|
className: "absolute right-0 top-full mt-1 z-50 min-w-28 bg-white rounded-lg shadow-lg border border-gray-100 py-1 text-sm",
|
|
645
|
-
children: t.map((e) => /* @__PURE__ */
|
|
753
|
+
children: t.map((e) => /* @__PURE__ */ s("li", {
|
|
646
754
|
role: "none",
|
|
647
|
-
children: /* @__PURE__ */
|
|
755
|
+
children: /* @__PURE__ */ s("button", {
|
|
648
756
|
role: "menuitem",
|
|
649
757
|
className: "w-full px-3 py-1.5 text-left hover:bg-gray-50 text-gray-700 whitespace-nowrap",
|
|
650
758
|
onClick: () => {
|
|
651
759
|
n(e), f();
|
|
652
760
|
},
|
|
653
|
-
children:
|
|
761
|
+
children: o ? o(e) : e.label
|
|
654
762
|
})
|
|
655
|
-
},
|
|
763
|
+
}, r(e)))
|
|
656
764
|
})]
|
|
657
765
|
});
|
|
658
766
|
}
|
|
659
|
-
function
|
|
660
|
-
return /* @__PURE__ */
|
|
767
|
+
function G() {
|
|
768
|
+
return /* @__PURE__ */ s("svg", {
|
|
661
769
|
xmlns: "http://www.w3.org/2000/svg",
|
|
662
770
|
fill: "none",
|
|
663
771
|
viewBox: "0 0 24 24",
|
|
664
772
|
strokeWidth: 1.5,
|
|
665
773
|
stroke: "currentColor",
|
|
666
774
|
className: "w-4 h-4",
|
|
667
|
-
children: /* @__PURE__ */
|
|
775
|
+
children: /* @__PURE__ */ s("path", {
|
|
668
776
|
strokeLinecap: "round",
|
|
669
777
|
strokeLinejoin: "round",
|
|
670
778
|
d: "M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 15.803a7.5 7.5 0 0010.607 10.607z"
|
|
671
779
|
})
|
|
672
780
|
});
|
|
673
781
|
}
|
|
674
|
-
function
|
|
675
|
-
let [y, b] =
|
|
676
|
-
return /* @__PURE__ */
|
|
782
|
+
function K({ logo: e, searchPlaceholder: t = "Hledat produkty…", onSearch: n, cartItemCount: r = 0, onCartClick: i, isLoggedIn: l = !1, customerName: u, onCustomerClick: d, currencies: f = [], selectedCurrency: p, onCurrencyChange: m, locales: h = [], selectedLocale: g, onLocaleChange: _, rightSlot: v }) {
|
|
783
|
+
let [y, b] = a(""), x = f.find((e) => e.code === p), S = h.find((e) => e.code === g);
|
|
784
|
+
return /* @__PURE__ */ s("header", {
|
|
677
785
|
className: "bg-white border-b border-gray-200 sticky top-0 z-40",
|
|
678
|
-
children: /* @__PURE__ */
|
|
786
|
+
children: /* @__PURE__ */ c("div", {
|
|
679
787
|
className: "max-w-7xl mx-auto px-4 h-16 flex items-center gap-4",
|
|
680
788
|
children: [
|
|
681
|
-
/* @__PURE__ */
|
|
789
|
+
/* @__PURE__ */ s("div", {
|
|
682
790
|
className: "shrink-0",
|
|
683
|
-
children: e ?? /* @__PURE__ */
|
|
791
|
+
children: e ?? /* @__PURE__ */ s("span", {
|
|
684
792
|
className: "text-xl font-bold text-primary-600 tracking-tight",
|
|
685
793
|
children: "shopito"
|
|
686
794
|
})
|
|
687
795
|
}),
|
|
688
|
-
/* @__PURE__ */
|
|
796
|
+
/* @__PURE__ */ s("div", {
|
|
689
797
|
className: "flex-1 max-w-xl",
|
|
690
|
-
children: /* @__PURE__ */
|
|
798
|
+
children: /* @__PURE__ */ s(T, {
|
|
691
799
|
fullWidth: !0,
|
|
692
800
|
placeholder: t,
|
|
693
801
|
value: y,
|
|
@@ -695,21 +803,21 @@ function W({ logo: e, searchPlaceholder: t = "Hledat produkty…", onSearch: n,
|
|
|
695
803
|
onKeyDown: (e) => {
|
|
696
804
|
e.key === "Enter" && n?.(y);
|
|
697
805
|
},
|
|
698
|
-
leftIcon: /* @__PURE__ */
|
|
699
|
-
rightIcon: y ? /* @__PURE__ */
|
|
806
|
+
leftIcon: /* @__PURE__ */ s(G, {}),
|
|
807
|
+
rightIcon: y ? /* @__PURE__ */ s("button", {
|
|
700
808
|
onClick: () => {
|
|
701
809
|
b(""), n?.("");
|
|
702
810
|
},
|
|
703
811
|
className: "hover:text-gray-600 transition-colors",
|
|
704
812
|
"aria-label": "Clear search",
|
|
705
|
-
children: /* @__PURE__ */
|
|
813
|
+
children: /* @__PURE__ */ s("svg", {
|
|
706
814
|
xmlns: "http://www.w3.org/2000/svg",
|
|
707
815
|
fill: "none",
|
|
708
816
|
viewBox: "0 0 24 24",
|
|
709
817
|
strokeWidth: 2,
|
|
710
818
|
stroke: "currentColor",
|
|
711
819
|
className: "w-3.5 h-3.5",
|
|
712
|
-
children: /* @__PURE__ */
|
|
820
|
+
children: /* @__PURE__ */ s("path", {
|
|
713
821
|
strokeLinecap: "round",
|
|
714
822
|
strokeLinejoin: "round",
|
|
715
823
|
d: "M6 18L18 6M6 6l12 12"
|
|
@@ -718,85 +826,85 @@ function W({ logo: e, searchPlaceholder: t = "Hledat produkty…", onSearch: n,
|
|
|
718
826
|
}) : void 0
|
|
719
827
|
})
|
|
720
828
|
}),
|
|
721
|
-
/* @__PURE__ */
|
|
829
|
+
/* @__PURE__ */ c("div", {
|
|
722
830
|
className: "flex items-center gap-1 shrink-0 ml-auto",
|
|
723
831
|
children: [
|
|
724
|
-
f.length > 0 && /* @__PURE__ */
|
|
725
|
-
trigger: /* @__PURE__ */
|
|
832
|
+
f.length > 0 && /* @__PURE__ */ s(W, {
|
|
833
|
+
trigger: /* @__PURE__ */ c("button", {
|
|
726
834
|
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",
|
|
727
835
|
children: [
|
|
728
|
-
/* @__PURE__ */
|
|
729
|
-
/* @__PURE__ */
|
|
836
|
+
/* @__PURE__ */ s("span", { children: x?.symbol ?? p }),
|
|
837
|
+
/* @__PURE__ */ s("span", {
|
|
730
838
|
className: "text-xs text-gray-400",
|
|
731
839
|
children: x?.code ?? p
|
|
732
840
|
}),
|
|
733
|
-
/* @__PURE__ */
|
|
841
|
+
/* @__PURE__ */ s(q, { className: "w-3 h-3 text-gray-400" })
|
|
734
842
|
]
|
|
735
843
|
}),
|
|
736
844
|
items: f,
|
|
737
845
|
getKey: (e) => e.code,
|
|
738
846
|
onSelect: (e) => m?.(e.code),
|
|
739
|
-
renderItem: (e) => /* @__PURE__ */
|
|
847
|
+
renderItem: (e) => /* @__PURE__ */ c("span", {
|
|
740
848
|
className: "flex items-center gap-2",
|
|
741
|
-
children: [/* @__PURE__ */
|
|
849
|
+
children: [/* @__PURE__ */ s("span", {
|
|
742
850
|
className: "w-6 text-center font-medium text-gray-500",
|
|
743
851
|
children: e.symbol
|
|
744
|
-
}), /* @__PURE__ */
|
|
852
|
+
}), /* @__PURE__ */ s("span", { children: e.label })]
|
|
745
853
|
})
|
|
746
854
|
}),
|
|
747
|
-
h.length > 0 && /* @__PURE__ */
|
|
748
|
-
trigger: /* @__PURE__ */
|
|
855
|
+
h.length > 0 && /* @__PURE__ */ s(W, {
|
|
856
|
+
trigger: /* @__PURE__ */ c("button", {
|
|
749
857
|
className: "flex items-center gap-1 px-2 py-1.5 rounded-md text-sm text-gray-600 hover:bg-gray-50 transition-colors",
|
|
750
858
|
children: [
|
|
751
|
-
S?.flag && /* @__PURE__ */
|
|
859
|
+
S?.flag && /* @__PURE__ */ s("span", {
|
|
752
860
|
className: "text-base leading-none",
|
|
753
861
|
children: S.flag
|
|
754
862
|
}),
|
|
755
|
-
/* @__PURE__ */
|
|
863
|
+
/* @__PURE__ */ s("span", {
|
|
756
864
|
className: "font-medium uppercase",
|
|
757
865
|
children: S?.code ?? g
|
|
758
866
|
}),
|
|
759
|
-
/* @__PURE__ */
|
|
867
|
+
/* @__PURE__ */ s(q, { className: "w-3 h-3 text-gray-400" })
|
|
760
868
|
]
|
|
761
869
|
}),
|
|
762
870
|
items: h,
|
|
763
871
|
getKey: (e) => e.code,
|
|
764
872
|
onSelect: (e) => _?.(e.code),
|
|
765
|
-
renderItem: (e) => /* @__PURE__ */
|
|
873
|
+
renderItem: (e) => /* @__PURE__ */ c("span", {
|
|
766
874
|
className: "flex items-center gap-2",
|
|
767
|
-
children: [e.flag && /* @__PURE__ */
|
|
875
|
+
children: [e.flag && /* @__PURE__ */ s("span", {
|
|
768
876
|
className: "text-base",
|
|
769
877
|
children: e.flag
|
|
770
|
-
}), /* @__PURE__ */
|
|
878
|
+
}), /* @__PURE__ */ s("span", { children: e.label })]
|
|
771
879
|
})
|
|
772
880
|
}),
|
|
773
|
-
(f.length > 0 || h.length > 0) && /* @__PURE__ */
|
|
774
|
-
/* @__PURE__ */
|
|
881
|
+
(f.length > 0 || h.length > 0) && /* @__PURE__ */ s("div", { className: "w-px h-5 bg-gray-200 mx-1" }),
|
|
882
|
+
/* @__PURE__ */ s("button", {
|
|
775
883
|
onClick: d,
|
|
776
884
|
className: "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",
|
|
777
885
|
"aria-label": l ? "My account" : "Sign in",
|
|
778
|
-
children: l ? /* @__PURE__ */
|
|
886
|
+
children: l ? /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s("div", {
|
|
779
887
|
className: "w-6 h-6 rounded-full bg-primary-600 text-white flex items-center justify-center text-xs font-bold",
|
|
780
888
|
children: (u ?? "U")[0].toUpperCase()
|
|
781
|
-
}), u && /* @__PURE__ */
|
|
889
|
+
}), u && /* @__PURE__ */ s("span", {
|
|
782
890
|
className: "hidden sm:block font-medium max-w-32 truncate",
|
|
783
891
|
children: u
|
|
784
|
-
})] }) : /* @__PURE__ */
|
|
892
|
+
})] }) : /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s(ce, { className: "w-5 h-5" }), /* @__PURE__ */ s("span", {
|
|
785
893
|
className: "hidden sm:block font-medium",
|
|
786
894
|
children: "Přihlásit se"
|
|
787
895
|
})] })
|
|
788
896
|
}),
|
|
789
|
-
/* @__PURE__ */
|
|
790
|
-
onClick:
|
|
897
|
+
/* @__PURE__ */ c("button", {
|
|
898
|
+
onClick: i,
|
|
791
899
|
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",
|
|
792
900
|
"aria-label": `Cart, ${r} items`,
|
|
793
901
|
children: [
|
|
794
|
-
/* @__PURE__ */
|
|
795
|
-
/* @__PURE__ */
|
|
902
|
+
/* @__PURE__ */ s(le, { className: "w-5 h-5" }),
|
|
903
|
+
/* @__PURE__ */ s("span", {
|
|
796
904
|
className: "hidden sm:block font-medium",
|
|
797
905
|
children: "Košík"
|
|
798
906
|
}),
|
|
799
|
-
r > 0 && /* @__PURE__ */
|
|
907
|
+
r > 0 && /* @__PURE__ */ s("span", {
|
|
800
908
|
className: "absolute -top-0.5 -right-0.5 min-w-4.5 h-4.5 flex items-center justify-center rounded-full bg-primary-600 text-white text-[10px] font-bold leading-none px-1",
|
|
801
909
|
children: r > 99 ? "99+" : r
|
|
802
910
|
})
|
|
@@ -809,45 +917,45 @@ function W({ logo: e, searchPlaceholder: t = "Hledat produkty…", onSearch: n,
|
|
|
809
917
|
})
|
|
810
918
|
});
|
|
811
919
|
}
|
|
812
|
-
function
|
|
813
|
-
return /* @__PURE__ */
|
|
920
|
+
function q({ className: e }) {
|
|
921
|
+
return /* @__PURE__ */ s("svg", {
|
|
814
922
|
xmlns: "http://www.w3.org/2000/svg",
|
|
815
923
|
fill: "none",
|
|
816
924
|
viewBox: "0 0 24 24",
|
|
817
925
|
strokeWidth: 2,
|
|
818
926
|
stroke: "currentColor",
|
|
819
927
|
className: e,
|
|
820
|
-
children: /* @__PURE__ */
|
|
928
|
+
children: /* @__PURE__ */ s("path", {
|
|
821
929
|
strokeLinecap: "round",
|
|
822
930
|
strokeLinejoin: "round",
|
|
823
931
|
d: "M19.5 8.25l-7.5 7.5-7.5-7.5"
|
|
824
932
|
})
|
|
825
933
|
});
|
|
826
934
|
}
|
|
827
|
-
function
|
|
828
|
-
return /* @__PURE__ */
|
|
935
|
+
function ce({ className: e }) {
|
|
936
|
+
return /* @__PURE__ */ s("svg", {
|
|
829
937
|
xmlns: "http://www.w3.org/2000/svg",
|
|
830
938
|
fill: "none",
|
|
831
939
|
viewBox: "0 0 24 24",
|
|
832
940
|
strokeWidth: 1.5,
|
|
833
941
|
stroke: "currentColor",
|
|
834
942
|
className: e,
|
|
835
|
-
children: /* @__PURE__ */
|
|
943
|
+
children: /* @__PURE__ */ s("path", {
|
|
836
944
|
strokeLinecap: "round",
|
|
837
945
|
strokeLinejoin: "round",
|
|
838
946
|
d: "M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.501 20.118a7.5 7.5 0 0114.998 0A17.933 17.933 0 0112 21.75c-2.676 0-5.216-.584-7.499-1.632z"
|
|
839
947
|
})
|
|
840
948
|
});
|
|
841
949
|
}
|
|
842
|
-
function
|
|
843
|
-
return /* @__PURE__ */
|
|
950
|
+
function le({ className: e }) {
|
|
951
|
+
return /* @__PURE__ */ s("svg", {
|
|
844
952
|
xmlns: "http://www.w3.org/2000/svg",
|
|
845
953
|
fill: "none",
|
|
846
954
|
viewBox: "0 0 24 24",
|
|
847
955
|
strokeWidth: 1.5,
|
|
848
956
|
stroke: "currentColor",
|
|
849
957
|
className: e,
|
|
850
|
-
children: /* @__PURE__ */
|
|
958
|
+
children: /* @__PURE__ */ s("path", {
|
|
851
959
|
strokeLinecap: "round",
|
|
852
960
|
strokeLinejoin: "round",
|
|
853
961
|
d: "M2.25 3h1.386c.51 0 .955.343 1.087.835l.383 1.437M7.5 14.25a3 3 0 00-3 3h15.75m-12.75-3h11.218c1.121-2.3 2.1-4.684 2.924-7.138a60.114 60.114 0 00-16.536-1.84M7.5 14.25L5.106 5.272M6 20.25a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm12.75 0a.75.75 0 11-1.5 0 .75.75 0 011.5 0z"
|
|
@@ -856,16 +964,16 @@ function q({ className: e }) {
|
|
|
856
964
|
}
|
|
857
965
|
//#endregion
|
|
858
966
|
//#region src/components/CategoryTree/CategoryTree.tsx
|
|
859
|
-
function J({ node: e, activeId: t, onSelect: n, showCounts: r, depth:
|
|
860
|
-
let l = e.children && e.children.length > 0, [u, d] =
|
|
861
|
-
return /* @__PURE__ */
|
|
967
|
+
function J({ node: e, activeId: t, onSelect: n, showCounts: r, depth: i, defaultExpandAll: o }) {
|
|
968
|
+
let l = e.children && e.children.length > 0, [u, d] = a(o || Y(e, t)), f = e.id === t;
|
|
969
|
+
return /* @__PURE__ */ c("li", { children: [/* @__PURE__ */ c("div", {
|
|
862
970
|
className: [
|
|
863
971
|
"group flex items-center gap-1.5 rounded-lg px-2 py-1.5 cursor-pointer select-none",
|
|
864
972
|
"transition-colors text-sm",
|
|
865
973
|
f ? "bg-primary-50 text-primary-700 font-medium" : "text-gray-700 hover:bg-gray-50 hover:text-gray-900",
|
|
866
|
-
|
|
974
|
+
i > 0 ? `ml-${Math.min(i * 4, 8)}` : ""
|
|
867
975
|
].filter(Boolean).join(" "),
|
|
868
|
-
style:
|
|
976
|
+
style: i > 0 ? { marginLeft: i * 16 } : void 0,
|
|
869
977
|
onClick: () => {
|
|
870
978
|
n(e), l && d((e) => !e);
|
|
871
979
|
},
|
|
@@ -876,60 +984,60 @@ function J({ node: e, activeId: t, onSelect: n, showCounts: r, depth: a, default
|
|
|
876
984
|
},
|
|
877
985
|
"aria-expanded": l ? u : void 0,
|
|
878
986
|
children: [
|
|
879
|
-
l ? /* @__PURE__ */
|
|
987
|
+
l ? /* @__PURE__ */ s("span", {
|
|
880
988
|
className: `shrink-0 text-gray-400 transition-transform duration-150 ${u ? "rotate-90" : ""}`,
|
|
881
|
-
children: /* @__PURE__ */
|
|
989
|
+
children: /* @__PURE__ */ s("svg", {
|
|
882
990
|
xmlns: "http://www.w3.org/2000/svg",
|
|
883
991
|
fill: "none",
|
|
884
992
|
viewBox: "0 0 24 24",
|
|
885
993
|
strokeWidth: 2,
|
|
886
994
|
stroke: "currentColor",
|
|
887
995
|
className: "w-3.5 h-3.5",
|
|
888
|
-
children: /* @__PURE__ */
|
|
996
|
+
children: /* @__PURE__ */ s("path", {
|
|
889
997
|
strokeLinecap: "round",
|
|
890
998
|
strokeLinejoin: "round",
|
|
891
999
|
d: "M8.25 4.5l7.5 7.5-7.5 7.5"
|
|
892
1000
|
})
|
|
893
1001
|
})
|
|
894
|
-
}) : /* @__PURE__ */
|
|
895
|
-
e.icon && /* @__PURE__ */
|
|
1002
|
+
}) : /* @__PURE__ */ s("span", { className: "w-3.5 shrink-0" }),
|
|
1003
|
+
e.icon && /* @__PURE__ */ s("span", {
|
|
896
1004
|
className: "text-base leading-none",
|
|
897
1005
|
children: e.icon
|
|
898
1006
|
}),
|
|
899
|
-
/* @__PURE__ */
|
|
1007
|
+
/* @__PURE__ */ s("span", {
|
|
900
1008
|
className: "flex-1 truncate",
|
|
901
1009
|
children: e.label
|
|
902
1010
|
}),
|
|
903
|
-
r && e.count !== void 0 && /* @__PURE__ */
|
|
1011
|
+
r && e.count !== void 0 && /* @__PURE__ */ s("span", {
|
|
904
1012
|
className: `text-xs rounded-full px-1.5 py-0.5 font-medium ${f ? "bg-primary-100 text-primary-600" : "bg-gray-100 text-gray-500"}`,
|
|
905
1013
|
children: e.count
|
|
906
1014
|
})
|
|
907
1015
|
]
|
|
908
|
-
}), l && u && /* @__PURE__ */
|
|
1016
|
+
}), l && u && /* @__PURE__ */ s("ul", {
|
|
909
1017
|
role: "group",
|
|
910
|
-
children: e.children.map((e) => /* @__PURE__ */
|
|
1018
|
+
children: e.children.map((e) => /* @__PURE__ */ s(J, {
|
|
911
1019
|
node: e,
|
|
912
1020
|
activeId: t,
|
|
913
1021
|
onSelect: n,
|
|
914
1022
|
showCounts: r,
|
|
915
|
-
depth:
|
|
916
|
-
defaultExpandAll:
|
|
1023
|
+
depth: i + 1,
|
|
1024
|
+
defaultExpandAll: o
|
|
917
1025
|
}, e.id))
|
|
918
1026
|
})] });
|
|
919
1027
|
}
|
|
920
1028
|
function Y(e, t) {
|
|
921
1029
|
return !t || !e.children ? !1 : e.children.some((e) => e.id === t || Y(e, t));
|
|
922
1030
|
}
|
|
923
|
-
function
|
|
1031
|
+
function ue({ categories: e, activeId: t, onSelect: n, showCounts: r = !0, defaultExpandAll: i = !1, className: a = "", ...o }) {
|
|
924
1032
|
let c = (e) => n?.(e);
|
|
925
|
-
return /* @__PURE__ */
|
|
1033
|
+
return /* @__PURE__ */ s("nav", {
|
|
926
1034
|
"aria-label": "Category navigation",
|
|
927
1035
|
className: ["w-full", a].filter(Boolean).join(" "),
|
|
928
|
-
...
|
|
929
|
-
children: /* @__PURE__ */
|
|
1036
|
+
...o,
|
|
1037
|
+
children: /* @__PURE__ */ s("ul", {
|
|
930
1038
|
role: "tree",
|
|
931
1039
|
className: "space-y-0.5",
|
|
932
|
-
children: e.map((e) => /* @__PURE__ */
|
|
1040
|
+
children: e.map((e) => /* @__PURE__ */ s(J, {
|
|
933
1041
|
node: e,
|
|
934
1042
|
activeId: t,
|
|
935
1043
|
onSelect: c,
|
|
@@ -942,59 +1050,59 @@ function oe({ categories: e, activeId: t, onSelect: n, showCounts: r = !0, defau
|
|
|
942
1050
|
}
|
|
943
1051
|
//#endregion
|
|
944
1052
|
//#region src/components/MegaMenu/MegaMenu.tsx
|
|
945
|
-
function
|
|
946
|
-
return e.columns?.length ? /* @__PURE__ */
|
|
1053
|
+
function X({ item: e, onNavigate: t, onClose: n }) {
|
|
1054
|
+
return e.columns?.length ? /* @__PURE__ */ s("div", {
|
|
947
1055
|
className: "absolute left-0 right-0 top-full z-50 bg-white border-b border-gray-200 shadow-lg",
|
|
948
|
-
children: /* @__PURE__ */
|
|
1056
|
+
children: /* @__PURE__ */ c("div", {
|
|
949
1057
|
className: "max-w-7xl mx-auto px-4 py-6 flex gap-8",
|
|
950
|
-
children: [/* @__PURE__ */
|
|
1058
|
+
children: [/* @__PURE__ */ s("div", {
|
|
951
1059
|
className: "flex-1 grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-6",
|
|
952
|
-
children: e.columns.map((e, r) => /* @__PURE__ */
|
|
1060
|
+
children: e.columns.map((e, r) => /* @__PURE__ */ c("div", { children: [e.heading && /* @__PURE__ */ s("p", {
|
|
953
1061
|
className: "text-xs font-semibold uppercase tracking-wider text-gray-400 mb-2",
|
|
954
1062
|
children: e.heading
|
|
955
|
-
}), /* @__PURE__ */
|
|
1063
|
+
}), /* @__PURE__ */ s("ul", {
|
|
956
1064
|
className: "space-y-1",
|
|
957
|
-
children: e.items.map((e) => /* @__PURE__ */
|
|
1065
|
+
children: e.items.map((e) => /* @__PURE__ */ s("li", { children: /* @__PURE__ */ c("button", {
|
|
958
1066
|
className: "flex items-center gap-1.5 text-sm text-gray-700 hover:text-primary-600 transition-colors py-0.5",
|
|
959
1067
|
onClick: () => {
|
|
960
1068
|
t(e), n();
|
|
961
1069
|
},
|
|
962
|
-
children: [e.label, e.badge && /* @__PURE__ */
|
|
1070
|
+
children: [e.label, e.badge && /* @__PURE__ */ s("span", {
|
|
963
1071
|
className: "text-[10px] font-semibold px-1.5 py-0.5 rounded-full bg-danger-50 text-danger-600 leading-none",
|
|
964
1072
|
children: e.badge
|
|
965
1073
|
})]
|
|
966
1074
|
}) }, e.id))
|
|
967
1075
|
})] }, r))
|
|
968
|
-
}), e.featured && /* @__PURE__ */
|
|
1076
|
+
}), e.featured && /* @__PURE__ */ s("div", {
|
|
969
1077
|
className: "w-52 shrink-0",
|
|
970
|
-
children: /* @__PURE__ */
|
|
1078
|
+
children: /* @__PURE__ */ c("button", {
|
|
971
1079
|
className: "group block w-full rounded-xl overflow-hidden border border-gray-100 text-left hover:shadow-md transition-shadow",
|
|
972
1080
|
onClick: () => {
|
|
973
1081
|
t(e), n();
|
|
974
1082
|
},
|
|
975
|
-
children: [e.featured.image ? /* @__PURE__ */
|
|
1083
|
+
children: [e.featured.image ? /* @__PURE__ */ s("img", {
|
|
976
1084
|
src: e.featured.image,
|
|
977
1085
|
alt: e.featured.title,
|
|
978
1086
|
className: "w-full h-28 object-cover"
|
|
979
|
-
}) : /* @__PURE__ */
|
|
1087
|
+
}) : /* @__PURE__ */ s("div", {
|
|
980
1088
|
className: "w-full h-28 bg-linear-to-br from-primary-100 to-primary-200 flex items-center justify-center text-4xl",
|
|
981
1089
|
children: e.icon ?? "🛍️"
|
|
982
|
-
}), /* @__PURE__ */
|
|
1090
|
+
}), /* @__PURE__ */ c("div", {
|
|
983
1091
|
className: "p-3",
|
|
984
1092
|
children: [
|
|
985
|
-
e.featured.eyebrow && /* @__PURE__ */
|
|
1093
|
+
e.featured.eyebrow && /* @__PURE__ */ s("p", {
|
|
986
1094
|
className: "text-[10px] font-semibold uppercase tracking-wider text-primary-500 mb-0.5",
|
|
987
1095
|
children: e.featured.eyebrow
|
|
988
1096
|
}),
|
|
989
|
-
/* @__PURE__ */
|
|
1097
|
+
/* @__PURE__ */ s("p", {
|
|
990
1098
|
className: "text-sm font-semibold text-gray-900 group-hover:text-primary-600 transition-colors",
|
|
991
1099
|
children: e.featured.title
|
|
992
1100
|
}),
|
|
993
|
-
e.featured.description && /* @__PURE__ */
|
|
1101
|
+
e.featured.description && /* @__PURE__ */ s("p", {
|
|
994
1102
|
className: "text-xs text-gray-500 mt-0.5 line-clamp-2",
|
|
995
1103
|
children: e.featured.description
|
|
996
1104
|
}),
|
|
997
|
-
e.featured.cta && /* @__PURE__ */
|
|
1105
|
+
e.featured.cta && /* @__PURE__ */ c("span", {
|
|
998
1106
|
className: "inline-block mt-2 text-xs font-medium text-primary-600",
|
|
999
1107
|
children: [e.featured.cta, " →"]
|
|
1000
1108
|
})
|
|
@@ -1005,56 +1113,56 @@ function se({ item: e, onNavigate: t, onClose: n }) {
|
|
|
1005
1113
|
})
|
|
1006
1114
|
}) : null;
|
|
1007
1115
|
}
|
|
1008
|
-
function
|
|
1009
|
-
let [
|
|
1010
|
-
l.current && clearTimeout(l.current),
|
|
1116
|
+
function de({ items: e, activeId: t, onNavigate: n }) {
|
|
1117
|
+
let [r, o] = a(null), l = i(null), u = (e) => {
|
|
1118
|
+
l.current && clearTimeout(l.current), o(e);
|
|
1011
1119
|
}, d = () => {
|
|
1012
|
-
l.current = setTimeout(() =>
|
|
1120
|
+
l.current = setTimeout(() => o(null), 120);
|
|
1013
1121
|
}, f = () => {
|
|
1014
1122
|
l.current && clearTimeout(l.current);
|
|
1015
|
-
}, p = e.find((e) => e.id ===
|
|
1016
|
-
return /* @__PURE__ */
|
|
1123
|
+
}, p = e.find((e) => e.id === r);
|
|
1124
|
+
return /* @__PURE__ */ c("nav", {
|
|
1017
1125
|
"aria-label": "Main navigation",
|
|
1018
1126
|
className: "relative bg-white border-b border-gray-100",
|
|
1019
1127
|
onMouseLeave: d,
|
|
1020
|
-
children: [/* @__PURE__ */
|
|
1128
|
+
children: [/* @__PURE__ */ s("div", {
|
|
1021
1129
|
className: "max-w-7xl mx-auto px-4",
|
|
1022
|
-
children: /* @__PURE__ */
|
|
1130
|
+
children: /* @__PURE__ */ s("ul", {
|
|
1023
1131
|
className: "flex items-center gap-0",
|
|
1024
1132
|
role: "menubar",
|
|
1025
1133
|
children: e.map((e) => {
|
|
1026
|
-
let
|
|
1027
|
-
return /* @__PURE__ */
|
|
1134
|
+
let i = !!e.columns?.length, a = r === e.id, l = t === e.id;
|
|
1135
|
+
return /* @__PURE__ */ s("li", {
|
|
1028
1136
|
role: "none",
|
|
1029
|
-
children: /* @__PURE__ */
|
|
1137
|
+
children: /* @__PURE__ */ c("button", {
|
|
1030
1138
|
role: "menuitem",
|
|
1031
|
-
"aria-haspopup":
|
|
1032
|
-
"aria-expanded":
|
|
1139
|
+
"aria-haspopup": i ? "true" : void 0,
|
|
1140
|
+
"aria-expanded": i ? a : void 0,
|
|
1033
1141
|
className: [
|
|
1034
1142
|
"flex items-center gap-1.5 px-4 py-3.5 text-sm font-medium transition-colors relative",
|
|
1035
1143
|
"outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary-500",
|
|
1036
|
-
l ||
|
|
1037
|
-
|
|
1144
|
+
l || a ? "text-primary-600" : "text-gray-700 hover:text-gray-900",
|
|
1145
|
+
a ? "after:absolute after:bottom-0 after:left-0 after:right-0 after:h-0.5 after:bg-primary-600" : ""
|
|
1038
1146
|
].filter(Boolean).join(" "),
|
|
1039
|
-
onMouseEnter: () =>
|
|
1040
|
-
onFocus: () =>
|
|
1147
|
+
onMouseEnter: () => i ? u(e.id) : o(null),
|
|
1148
|
+
onFocus: () => i && u(e.id),
|
|
1041
1149
|
onClick: () => {
|
|
1042
|
-
|
|
1150
|
+
i || (n?.(e), o(null));
|
|
1043
1151
|
},
|
|
1044
1152
|
children: [
|
|
1045
|
-
e.icon && /* @__PURE__ */
|
|
1153
|
+
e.icon && /* @__PURE__ */ s("span", {
|
|
1046
1154
|
className: "text-base leading-none",
|
|
1047
1155
|
children: e.icon
|
|
1048
1156
|
}),
|
|
1049
1157
|
e.label,
|
|
1050
|
-
|
|
1158
|
+
i && /* @__PURE__ */ s("svg", {
|
|
1051
1159
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1052
1160
|
fill: "none",
|
|
1053
1161
|
viewBox: "0 0 24 24",
|
|
1054
1162
|
strokeWidth: 2,
|
|
1055
1163
|
stroke: "currentColor",
|
|
1056
|
-
className: `w-3.5 h-3.5 transition-transform duration-150 ${
|
|
1057
|
-
children: /* @__PURE__ */
|
|
1164
|
+
className: `w-3.5 h-3.5 transition-transform duration-150 ${a ? "rotate-180" : ""}`,
|
|
1165
|
+
children: /* @__PURE__ */ s("path", {
|
|
1058
1166
|
strokeLinecap: "round",
|
|
1059
1167
|
strokeLinejoin: "round",
|
|
1060
1168
|
d: "M19.5 8.25l-7.5 7.5-7.5-7.5"
|
|
@@ -1065,35 +1173,35 @@ function ce({ items: e, activeId: t, onNavigate: n }) {
|
|
|
1065
1173
|
}, e.id);
|
|
1066
1174
|
})
|
|
1067
1175
|
})
|
|
1068
|
-
}), p?.columns?.length && /* @__PURE__ */
|
|
1176
|
+
}), p?.columns?.length && /* @__PURE__ */ s("div", {
|
|
1069
1177
|
onMouseEnter: f,
|
|
1070
1178
|
onMouseLeave: d,
|
|
1071
|
-
children: /* @__PURE__ */
|
|
1179
|
+
children: /* @__PURE__ */ s(X, {
|
|
1072
1180
|
item: p,
|
|
1073
1181
|
onNavigate: (e) => n?.(e),
|
|
1074
|
-
onClose: () =>
|
|
1182
|
+
onClose: () => o(null)
|
|
1075
1183
|
})
|
|
1076
1184
|
})]
|
|
1077
1185
|
});
|
|
1078
1186
|
}
|
|
1079
1187
|
//#endregion
|
|
1080
1188
|
//#region src/components/BannerCarousel/BannerCarousel.tsx
|
|
1081
|
-
function
|
|
1082
|
-
let [m, h] =
|
|
1189
|
+
function fe({ banners: e, autoPlay: r = !0, autoPlayInterval: l = 5e3, arrows: u = !0, dots: d = !0, className: f = "", aspectRatio: p = "3 / 1" }) {
|
|
1190
|
+
let [m, h] = a(0), [g, _] = a(!1), v = i(null), y = i(null), b = e.length, x = t((e) => {
|
|
1083
1191
|
h((e % b + b) % b);
|
|
1084
1192
|
}, [b]), S = () => x(m - 1), C = t(() => x(m + 1), [m, x]);
|
|
1085
1193
|
n(() => {
|
|
1086
|
-
if (!(!
|
|
1194
|
+
if (!(!r || g || b <= 1)) return v.current = setInterval(C, l), () => {
|
|
1087
1195
|
v.current && clearInterval(v.current);
|
|
1088
1196
|
};
|
|
1089
1197
|
}, [
|
|
1090
|
-
|
|
1198
|
+
r,
|
|
1091
1199
|
g,
|
|
1092
1200
|
l,
|
|
1093
1201
|
C,
|
|
1094
1202
|
b
|
|
1095
1203
|
]);
|
|
1096
|
-
let w =
|
|
1204
|
+
let w = i(null), T = (e) => {
|
|
1097
1205
|
w.current = e.touches[0].clientX;
|
|
1098
1206
|
}, E = (e) => {
|
|
1099
1207
|
if (w.current === null) return;
|
|
@@ -1102,7 +1210,7 @@ function X({ banners: e, autoPlay: c = !0, autoPlayInterval: l = 5e3, arrows: u
|
|
|
1102
1210
|
};
|
|
1103
1211
|
if (b === 0) return null;
|
|
1104
1212
|
let D = e[m], O = D.textColor === "light" || !D.textColor;
|
|
1105
|
-
return /* @__PURE__ */
|
|
1213
|
+
return /* @__PURE__ */ c("div", {
|
|
1106
1214
|
className: ["relative overflow-hidden rounded-xl", f].filter(Boolean).join(" "),
|
|
1107
1215
|
style: { aspectRatio: p },
|
|
1108
1216
|
onMouseEnter: () => _(!0),
|
|
@@ -1110,41 +1218,41 @@ function X({ banners: e, autoPlay: c = !0, autoPlayInterval: l = 5e3, arrows: u
|
|
|
1110
1218
|
onTouchStart: T,
|
|
1111
1219
|
onTouchEnd: E,
|
|
1112
1220
|
children: [
|
|
1113
|
-
/* @__PURE__ */
|
|
1221
|
+
/* @__PURE__ */ s("div", {
|
|
1114
1222
|
ref: y,
|
|
1115
1223
|
className: "relative w-full h-full",
|
|
1116
|
-
children: e.map((e, t) => /* @__PURE__ */
|
|
1224
|
+
children: e.map((e, t) => /* @__PURE__ */ c("div", {
|
|
1117
1225
|
"aria-hidden": t !== m,
|
|
1118
1226
|
className: ["absolute inset-0 transition-opacity duration-700", t === m ? "opacity-100 z-10" : "opacity-0 z-0"].join(" "),
|
|
1119
1227
|
style: { background: e.backgroundImage ? `url(${e.backgroundImage}) center/cover no-repeat` : e.backgroundColor ?? "linear-gradient(135deg, #1d4ed8 0%, #7c3aed 100%)" },
|
|
1120
|
-
children: [e.backgroundImage && /* @__PURE__ */
|
|
1228
|
+
children: [e.backgroundImage && /* @__PURE__ */ s("div", { className: "absolute inset-0 bg-gradient-to-r from-black/50 via-black/20 to-transparent" }), /* @__PURE__ */ c("div", {
|
|
1121
1229
|
className: "relative z-10 h-full flex items-center px-8 md:px-12 gap-8",
|
|
1122
|
-
children: [/* @__PURE__ */
|
|
1230
|
+
children: [/* @__PURE__ */ c("div", {
|
|
1123
1231
|
className: "flex-1 max-w-lg",
|
|
1124
1232
|
children: [
|
|
1125
|
-
e.eyebrow && /* @__PURE__ */
|
|
1233
|
+
e.eyebrow && /* @__PURE__ */ s("p", {
|
|
1126
1234
|
className: `text-xs font-semibold uppercase tracking-widest mb-2 ${O ? "text-white/70" : "text-gray-500"}`,
|
|
1127
1235
|
children: e.eyebrow
|
|
1128
1236
|
}),
|
|
1129
|
-
/* @__PURE__ */
|
|
1237
|
+
/* @__PURE__ */ s("h2", {
|
|
1130
1238
|
className: `text-2xl md:text-3xl lg:text-4xl font-bold leading-tight ${O ? "text-white" : "text-gray-900"}`,
|
|
1131
1239
|
children: e.title
|
|
1132
1240
|
}),
|
|
1133
|
-
e.subtitle && /* @__PURE__ */
|
|
1241
|
+
e.subtitle && /* @__PURE__ */ s("p", {
|
|
1134
1242
|
className: `mt-2 text-sm md:text-base ${O ? "text-white/80" : "text-gray-600"}`,
|
|
1135
1243
|
children: e.subtitle
|
|
1136
1244
|
}),
|
|
1137
|
-
e.ctaLabel && /* @__PURE__ */
|
|
1245
|
+
e.ctaLabel && /* @__PURE__ */ c("button", {
|
|
1138
1246
|
onClick: e.onCtaClick,
|
|
1139
1247
|
className: ["mt-5 inline-flex items-center gap-2 px-5 py-2.5 rounded-lg text-sm font-semibold transition-all", O ? "bg-white text-gray-900 hover:bg-gray-100" : "bg-primary-600 text-white hover:bg-primary-700"].join(" "),
|
|
1140
|
-
children: [e.ctaLabel, /* @__PURE__ */
|
|
1248
|
+
children: [e.ctaLabel, /* @__PURE__ */ s("svg", {
|
|
1141
1249
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1142
1250
|
fill: "none",
|
|
1143
1251
|
viewBox: "0 0 24 24",
|
|
1144
1252
|
strokeWidth: 2,
|
|
1145
1253
|
stroke: "currentColor",
|
|
1146
1254
|
className: "w-4 h-4",
|
|
1147
|
-
children: /* @__PURE__ */
|
|
1255
|
+
children: /* @__PURE__ */ s("path", {
|
|
1148
1256
|
strokeLinecap: "round",
|
|
1149
1257
|
strokeLinejoin: "round",
|
|
1150
1258
|
d: "M8.25 4.5l7.5 7.5-7.5 7.5"
|
|
@@ -1152,9 +1260,9 @@ function X({ banners: e, autoPlay: c = !0, autoPlayInterval: l = 5e3, arrows: u
|
|
|
1152
1260
|
})]
|
|
1153
1261
|
})
|
|
1154
1262
|
]
|
|
1155
|
-
}), e.sideImage && /* @__PURE__ */
|
|
1263
|
+
}), e.sideImage && /* @__PURE__ */ s("div", {
|
|
1156
1264
|
className: "hidden md:block flex-1 h-full flex items-end justify-end overflow-hidden",
|
|
1157
|
-
children: /* @__PURE__ */
|
|
1265
|
+
children: /* @__PURE__ */ s("img", {
|
|
1158
1266
|
src: e.sideImage,
|
|
1159
1267
|
alt: "",
|
|
1160
1268
|
className: "h-full w-auto object-contain object-bottom drop-shadow-2xl"
|
|
@@ -1163,52 +1271,52 @@ function X({ banners: e, autoPlay: c = !0, autoPlayInterval: l = 5e3, arrows: u
|
|
|
1163
1271
|
})]
|
|
1164
1272
|
}, e.id))
|
|
1165
1273
|
}),
|
|
1166
|
-
u && b > 1 && /* @__PURE__ */
|
|
1274
|
+
u && b > 1 && /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s("button", {
|
|
1167
1275
|
onClick: S,
|
|
1168
1276
|
className: "absolute left-3 top-1/2 -translate-y-1/2 z-20 w-9 h-9 flex items-center justify-center rounded-full bg-black/30 text-white hover:bg-black/50 transition-colors backdrop-blur-sm",
|
|
1169
1277
|
"aria-label": "Previous banner",
|
|
1170
|
-
children: /* @__PURE__ */
|
|
1278
|
+
children: /* @__PURE__ */ s("svg", {
|
|
1171
1279
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1172
1280
|
fill: "none",
|
|
1173
1281
|
viewBox: "0 0 24 24",
|
|
1174
1282
|
strokeWidth: 2,
|
|
1175
1283
|
stroke: "currentColor",
|
|
1176
1284
|
className: "w-5 h-5",
|
|
1177
|
-
children: /* @__PURE__ */
|
|
1285
|
+
children: /* @__PURE__ */ s("path", {
|
|
1178
1286
|
strokeLinecap: "round",
|
|
1179
1287
|
strokeLinejoin: "round",
|
|
1180
1288
|
d: "M15.75 19.5L8.25 12l7.5-7.5"
|
|
1181
1289
|
})
|
|
1182
1290
|
})
|
|
1183
|
-
}), /* @__PURE__ */
|
|
1291
|
+
}), /* @__PURE__ */ s("button", {
|
|
1184
1292
|
onClick: C,
|
|
1185
1293
|
className: "absolute right-3 top-1/2 -translate-y-1/2 z-20 w-9 h-9 flex items-center justify-center rounded-full bg-black/30 text-white hover:bg-black/50 transition-colors backdrop-blur-sm",
|
|
1186
1294
|
"aria-label": "Next banner",
|
|
1187
|
-
children: /* @__PURE__ */
|
|
1295
|
+
children: /* @__PURE__ */ s("svg", {
|
|
1188
1296
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1189
1297
|
fill: "none",
|
|
1190
1298
|
viewBox: "0 0 24 24",
|
|
1191
1299
|
strokeWidth: 2,
|
|
1192
1300
|
stroke: "currentColor",
|
|
1193
1301
|
className: "w-5 h-5",
|
|
1194
|
-
children: /* @__PURE__ */
|
|
1302
|
+
children: /* @__PURE__ */ s("path", {
|
|
1195
1303
|
strokeLinecap: "round",
|
|
1196
1304
|
strokeLinejoin: "round",
|
|
1197
1305
|
d: "M8.25 4.5l7.5 7.5-7.5 7.5"
|
|
1198
1306
|
})
|
|
1199
1307
|
})
|
|
1200
1308
|
})] }),
|
|
1201
|
-
d && b > 1 && /* @__PURE__ */
|
|
1309
|
+
d && b > 1 && /* @__PURE__ */ s("div", {
|
|
1202
1310
|
className: "absolute bottom-3 left-1/2 -translate-x-1/2 z-20 flex gap-1.5",
|
|
1203
|
-
children: e.map((e, t) => /* @__PURE__ */
|
|
1311
|
+
children: e.map((e, t) => /* @__PURE__ */ s("button", {
|
|
1204
1312
|
onClick: () => x(t),
|
|
1205
1313
|
"aria-label": `Go to slide ${t + 1}`,
|
|
1206
1314
|
className: ["rounded-full transition-all duration-300", t === m ? "w-5 h-2 bg-white" : "w-2 h-2 bg-white/50 hover:bg-white/80"].join(" ")
|
|
1207
1315
|
}, t))
|
|
1208
1316
|
}),
|
|
1209
|
-
|
|
1317
|
+
r && b > 1 && /* @__PURE__ */ s("div", {
|
|
1210
1318
|
className: "absolute bottom-0 left-0 right-0 h-0.5 bg-white/20 z-20",
|
|
1211
|
-
children: /* @__PURE__ */
|
|
1319
|
+
children: /* @__PURE__ */ s("div", {
|
|
1212
1320
|
className: `h-full bg-white/60 ${g ? "" : "animate-progress"}`,
|
|
1213
1321
|
style: { animation: g ? "none" : `progress ${l}ms linear` }
|
|
1214
1322
|
}, `${m}-${g}`)
|
|
@@ -1218,23 +1326,23 @@ function X({ banners: e, autoPlay: c = !0, autoPlayInterval: l = 5e3, arrows: u
|
|
|
1218
1326
|
}
|
|
1219
1327
|
//#endregion
|
|
1220
1328
|
//#region src/components/ProductCard/ProductCard.tsx
|
|
1221
|
-
function
|
|
1222
|
-
return /* @__PURE__ */
|
|
1329
|
+
function pe({ filled: e }) {
|
|
1330
|
+
return /* @__PURE__ */ s("svg", {
|
|
1223
1331
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1224
1332
|
viewBox: "0 0 24 24",
|
|
1225
1333
|
className: `w-3.5 h-3.5 ${e ? "fill-amber-400 stroke-amber-400" : "fill-gray-200 stroke-gray-300"}`,
|
|
1226
1334
|
strokeWidth: 1,
|
|
1227
|
-
children: /* @__PURE__ */
|
|
1335
|
+
children: /* @__PURE__ */ s("path", {
|
|
1228
1336
|
strokeLinecap: "round",
|
|
1229
1337
|
strokeLinejoin: "round",
|
|
1230
1338
|
d: "M11.48 3.499a.562.562 0 011.04 0l2.125 5.111a.563.563 0 00.475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 00-.182.557l1.285 5.385a.562.562 0 01-.84.61l-4.725-2.885a.563.563 0 00-.586 0L6.982 20.54a.562.562 0 01-.84-.61l1.285-5.386a.562.562 0 00-.182-.557l-4.204-3.602a.563.563 0 01.321-.988l5.518-.442a.563.563 0 00.475-.345L11.48 3.5z"
|
|
1231
1339
|
})
|
|
1232
1340
|
});
|
|
1233
1341
|
}
|
|
1234
|
-
function
|
|
1235
|
-
return /* @__PURE__ */
|
|
1342
|
+
function me({ value: e, count: t }) {
|
|
1343
|
+
return /* @__PURE__ */ c("div", {
|
|
1236
1344
|
className: "flex items-center gap-1",
|
|
1237
|
-
children: [/* @__PURE__ */
|
|
1345
|
+
children: [/* @__PURE__ */ s("div", {
|
|
1238
1346
|
className: "flex gap-0.5",
|
|
1239
1347
|
children: [
|
|
1240
1348
|
1,
|
|
@@ -1242,8 +1350,8 @@ function ue({ value: e, count: t }) {
|
|
|
1242
1350
|
3,
|
|
1243
1351
|
4,
|
|
1244
1352
|
5
|
|
1245
|
-
].map((t) => /* @__PURE__ */
|
|
1246
|
-
}), t !== void 0 && /* @__PURE__ */
|
|
1353
|
+
].map((t) => /* @__PURE__ */ s(pe, { filled: t <= Math.round(e) }, t))
|
|
1354
|
+
}), t !== void 0 && /* @__PURE__ */ c("span", {
|
|
1247
1355
|
className: "text-xs text-gray-400",
|
|
1248
1356
|
children: [
|
|
1249
1357
|
"(",
|
|
@@ -1253,54 +1361,54 @@ function ue({ value: e, count: t }) {
|
|
|
1253
1361
|
})]
|
|
1254
1362
|
});
|
|
1255
1363
|
}
|
|
1256
|
-
function
|
|
1364
|
+
function he(e) {
|
|
1257
1365
|
let t = e.toLowerCase();
|
|
1258
1366
|
return t === "sale" || t === "akce" ? "danger" : t === "new" || t === "nové" ? "primary" : t === "hot" ? "warning" : "default";
|
|
1259
1367
|
}
|
|
1260
1368
|
function Z(e, t = "Kč") {
|
|
1261
1369
|
return `${e.toLocaleString("cs-CZ")} ${t}`;
|
|
1262
1370
|
}
|
|
1263
|
-
function
|
|
1371
|
+
function ge(e, t) {
|
|
1264
1372
|
return Math.round((1 - t / e) * 100);
|
|
1265
1373
|
}
|
|
1266
|
-
function Q({ product: e, onAddToCart: t, onWishlistToggle: n, isWishlisted: r = !1, onProductClick:
|
|
1267
|
-
let [u, d] =
|
|
1268
|
-
return /* @__PURE__ */
|
|
1374
|
+
function Q({ product: e, onAddToCart: t, onWishlistToggle: n, isWishlisted: r = !1, onProductClick: i, size: o = "default", className: l = "" }) {
|
|
1375
|
+
let [u, d] = a(!1), [f, p] = a(!1), m = e.originalPrice !== void 0 && e.originalPrice > e.price;
|
|
1376
|
+
return /* @__PURE__ */ c("article", {
|
|
1269
1377
|
className: [
|
|
1270
1378
|
"group relative flex flex-col bg-white rounded-xl border border-gray-200",
|
|
1271
1379
|
"hover:shadow-md transition-shadow duration-200 overflow-hidden cursor-pointer",
|
|
1272
1380
|
l
|
|
1273
1381
|
].filter(Boolean).join(" "),
|
|
1274
|
-
onClick: () =>
|
|
1382
|
+
onClick: () => i?.(e),
|
|
1275
1383
|
onMouseEnter: () => d(!0),
|
|
1276
1384
|
onMouseLeave: () => d(!1),
|
|
1277
|
-
children: [/* @__PURE__ */
|
|
1278
|
-
className: `relative overflow-hidden bg-gray-50 ${
|
|
1385
|
+
children: [/* @__PURE__ */ c("div", {
|
|
1386
|
+
className: `relative overflow-hidden bg-gray-50 ${o === "compact" ? "aspect-square" : "aspect-4/3"}`,
|
|
1279
1387
|
children: [
|
|
1280
|
-
e.image ? /* @__PURE__ */
|
|
1388
|
+
e.image ? /* @__PURE__ */ s("img", {
|
|
1281
1389
|
src: u && e.imageHover ? e.imageHover : e.image,
|
|
1282
1390
|
alt: e.name,
|
|
1283
1391
|
className: "w-full h-full object-contain p-4 transition-transform duration-300 group-hover:scale-105"
|
|
1284
|
-
}) : /* @__PURE__ */
|
|
1392
|
+
}) : /* @__PURE__ */ s("div", {
|
|
1285
1393
|
className: "w-full h-full flex items-center justify-center text-5xl bg-linear-to-br from-gray-100 to-gray-200",
|
|
1286
1394
|
children: "🛍️"
|
|
1287
1395
|
}),
|
|
1288
|
-
e.badge && /* @__PURE__ */
|
|
1396
|
+
e.badge && /* @__PURE__ */ s("div", {
|
|
1289
1397
|
className: "absolute top-2 left-2",
|
|
1290
|
-
children: /* @__PURE__ */
|
|
1291
|
-
variant:
|
|
1398
|
+
children: /* @__PURE__ */ s(k, {
|
|
1399
|
+
variant: he(e.badge),
|
|
1292
1400
|
size: "sm",
|
|
1293
|
-
children: e.badge === "sale" && m ? `-${
|
|
1401
|
+
children: e.badge === "sale" && m ? `-${ge(e.originalPrice, e.price)}%` : e.badge
|
|
1294
1402
|
})
|
|
1295
1403
|
}),
|
|
1296
|
-
e.inStock === !1 && /* @__PURE__ */
|
|
1404
|
+
e.inStock === !1 && /* @__PURE__ */ s("div", {
|
|
1297
1405
|
className: "absolute inset-0 bg-white/70 flex items-center justify-center",
|
|
1298
|
-
children: /* @__PURE__ */
|
|
1406
|
+
children: /* @__PURE__ */ s("span", {
|
|
1299
1407
|
className: "text-sm font-semibold text-gray-500 bg-white/90 px-3 py-1 rounded-full border border-gray-200",
|
|
1300
1408
|
children: "Vyprodáno"
|
|
1301
1409
|
})
|
|
1302
1410
|
}),
|
|
1303
|
-
/* @__PURE__ */
|
|
1411
|
+
/* @__PURE__ */ s("button", {
|
|
1304
1412
|
onClick: (t) => {
|
|
1305
1413
|
t.stopPropagation(), n?.(e);
|
|
1306
1414
|
},
|
|
@@ -1311,22 +1419,22 @@ function Q({ product: e, onAddToCart: t, onWishlistToggle: n, isWishlisted: r =
|
|
|
1311
1419
|
"opacity-0 group-hover:opacity-100 focus:opacity-100",
|
|
1312
1420
|
r ? "text-danger-500" : "text-gray-400 hover:text-danger-400"
|
|
1313
1421
|
].join(" "),
|
|
1314
|
-
children: /* @__PURE__ */
|
|
1422
|
+
children: /* @__PURE__ */ s("svg", {
|
|
1315
1423
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1316
1424
|
viewBox: "0 0 24 24",
|
|
1317
1425
|
strokeWidth: 1.5,
|
|
1318
1426
|
stroke: "currentColor",
|
|
1319
1427
|
className: `w-4 h-4 ${r ? "fill-current" : "fill-none"}`,
|
|
1320
|
-
children: /* @__PURE__ */
|
|
1428
|
+
children: /* @__PURE__ */ s("path", {
|
|
1321
1429
|
strokeLinecap: "round",
|
|
1322
1430
|
strokeLinejoin: "round",
|
|
1323
1431
|
d: "M21 8.25c0-2.485-2.099-4.5-4.688-4.5-1.935 0-3.597 1.126-4.312 2.733-.715-1.607-2.377-2.733-4.313-2.733C5.1 3.75 3 5.765 3 8.25c0 7.22 9 12 9 12s9-4.78 9-12z"
|
|
1324
1432
|
})
|
|
1325
1433
|
})
|
|
1326
1434
|
}),
|
|
1327
|
-
/* @__PURE__ */
|
|
1435
|
+
/* @__PURE__ */ s("div", {
|
|
1328
1436
|
className: ["absolute bottom-0 left-0 right-0 p-2 transition-transform duration-200", u ? "translate-y-0" : "translate-y-full"].join(" "),
|
|
1329
|
-
children: /* @__PURE__ */
|
|
1437
|
+
children: /* @__PURE__ */ s(S, {
|
|
1330
1438
|
variant: "primary",
|
|
1331
1439
|
size: "sm",
|
|
1332
1440
|
fullWidth: !0,
|
|
@@ -1336,16 +1444,16 @@ function Q({ product: e, onAddToCart: t, onWishlistToggle: n, isWishlisted: r =
|
|
|
1336
1444
|
n.stopPropagation(), t?.(e), p(!0), setTimeout(() => p(!1), 1500);
|
|
1337
1445
|
},
|
|
1338
1446
|
className: "shadow-lg",
|
|
1339
|
-
children: f ? /* @__PURE__ */
|
|
1447
|
+
children: f ? /* @__PURE__ */ c("span", {
|
|
1340
1448
|
className: "flex items-center gap-1.5",
|
|
1341
|
-
children: [/* @__PURE__ */
|
|
1449
|
+
children: [/* @__PURE__ */ s("svg", {
|
|
1342
1450
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1343
1451
|
fill: "none",
|
|
1344
1452
|
viewBox: "0 0 24 24",
|
|
1345
1453
|
strokeWidth: 2,
|
|
1346
1454
|
stroke: "currentColor",
|
|
1347
1455
|
className: "w-4 h-4",
|
|
1348
|
-
children: /* @__PURE__ */
|
|
1456
|
+
children: /* @__PURE__ */ s("path", {
|
|
1349
1457
|
strokeLinecap: "round",
|
|
1350
1458
|
strokeLinejoin: "round",
|
|
1351
1459
|
d: "M4.5 12.75l6 6 9-13.5"
|
|
@@ -1355,34 +1463,34 @@ function Q({ product: e, onAddToCart: t, onWishlistToggle: n, isWishlisted: r =
|
|
|
1355
1463
|
})
|
|
1356
1464
|
})
|
|
1357
1465
|
]
|
|
1358
|
-
}), /* @__PURE__ */
|
|
1359
|
-
className: `flex flex-col gap-1.5 ${
|
|
1466
|
+
}), /* @__PURE__ */ c("div", {
|
|
1467
|
+
className: `flex flex-col gap-1.5 ${o === "compact" ? "p-3" : "p-4"}`,
|
|
1360
1468
|
children: [
|
|
1361
|
-
e.variants && e.variants.length > 0 && /* @__PURE__ */
|
|
1469
|
+
e.variants && e.variants.length > 0 && /* @__PURE__ */ c("div", {
|
|
1362
1470
|
className: "flex gap-1",
|
|
1363
|
-
children: [e.variants.slice(0, 5).map((e) => /* @__PURE__ */
|
|
1471
|
+
children: [e.variants.slice(0, 5).map((e) => /* @__PURE__ */ s("span", {
|
|
1364
1472
|
title: e.label,
|
|
1365
1473
|
className: "w-4 h-4 rounded-full border border-gray-300 shrink-0",
|
|
1366
1474
|
style: { backgroundColor: e.color ?? "#ccc" }
|
|
1367
|
-
}, e.id)), e.variants.length > 5 && /* @__PURE__ */
|
|
1475
|
+
}, e.id)), e.variants.length > 5 && /* @__PURE__ */ c("span", {
|
|
1368
1476
|
className: "text-xs text-gray-400",
|
|
1369
1477
|
children: ["+", e.variants.length - 5]
|
|
1370
1478
|
})]
|
|
1371
1479
|
}),
|
|
1372
|
-
/* @__PURE__ */
|
|
1373
|
-
className: `font-medium text-gray-900 leading-snug line-clamp-2 group-hover:text-primary-600 transition-colors ${
|
|
1480
|
+
/* @__PURE__ */ s("h3", {
|
|
1481
|
+
className: `font-medium text-gray-900 leading-snug line-clamp-2 group-hover:text-primary-600 transition-colors ${o === "compact" ? "text-xs" : "text-sm"}`,
|
|
1374
1482
|
children: e.name
|
|
1375
1483
|
}),
|
|
1376
|
-
e.rating !== void 0 && /* @__PURE__ */
|
|
1484
|
+
e.rating !== void 0 && /* @__PURE__ */ s(me, {
|
|
1377
1485
|
value: e.rating,
|
|
1378
1486
|
count: e.reviewCount
|
|
1379
1487
|
}),
|
|
1380
|
-
/* @__PURE__ */
|
|
1488
|
+
/* @__PURE__ */ c("div", {
|
|
1381
1489
|
className: "flex items-baseline gap-2 mt-auto pt-1",
|
|
1382
|
-
children: [/* @__PURE__ */
|
|
1383
|
-
className: `font-bold text-gray-900 ${
|
|
1490
|
+
children: [/* @__PURE__ */ s("span", {
|
|
1491
|
+
className: `font-bold text-gray-900 ${o === "compact" ? "text-base" : "text-lg"}`,
|
|
1384
1492
|
children: Z(e.price, e.currency)
|
|
1385
|
-
}), m && /* @__PURE__ */
|
|
1493
|
+
}), m && /* @__PURE__ */ s("span", {
|
|
1386
1494
|
className: "text-sm text-gray-400 line-through",
|
|
1387
1495
|
children: Z(e.originalPrice, e.currency)
|
|
1388
1496
|
})]
|
|
@@ -1398,7 +1506,7 @@ var $ = {
|
|
|
1398
1506
|
3: "grid-cols-2 md:grid-cols-3",
|
|
1399
1507
|
4: "grid-cols-2 sm:grid-cols-3 lg:grid-cols-4",
|
|
1400
1508
|
5: "grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5"
|
|
1401
|
-
},
|
|
1509
|
+
}, _e = [
|
|
1402
1510
|
{
|
|
1403
1511
|
value: "newest",
|
|
1404
1512
|
label: "Nejnovější"
|
|
@@ -1420,50 +1528,50 @@ var $ = {
|
|
|
1420
1528
|
label: "Bestsellery"
|
|
1421
1529
|
}
|
|
1422
1530
|
];
|
|
1423
|
-
function
|
|
1424
|
-
return /* @__PURE__ */
|
|
1531
|
+
function ve() {
|
|
1532
|
+
return /* @__PURE__ */ c("div", {
|
|
1425
1533
|
className: "rounded-xl border border-gray-100 overflow-hidden animate-pulse",
|
|
1426
|
-
children: [/* @__PURE__ */
|
|
1534
|
+
children: [/* @__PURE__ */ s("div", { className: "aspect-4/3 bg-gray-200" }), /* @__PURE__ */ c("div", {
|
|
1427
1535
|
className: "p-4 space-y-2",
|
|
1428
1536
|
children: [
|
|
1429
|
-
/* @__PURE__ */
|
|
1430
|
-
/* @__PURE__ */
|
|
1431
|
-
/* @__PURE__ */
|
|
1537
|
+
/* @__PURE__ */ s("div", { className: "h-3 bg-gray-200 rounded w-3/4" }),
|
|
1538
|
+
/* @__PURE__ */ s("div", { className: "h-3 bg-gray-200 rounded w-1/2" }),
|
|
1539
|
+
/* @__PURE__ */ s("div", { className: "h-5 bg-gray-200 rounded w-1/3 mt-2" })
|
|
1432
1540
|
]
|
|
1433
1541
|
})]
|
|
1434
1542
|
});
|
|
1435
1543
|
}
|
|
1436
|
-
function
|
|
1544
|
+
function ye({ products: e, totalCount: t, page: n = 1, onPageChange: r, perPage: i = 20, columns: a = 4, sortOptions: o = _e, selectedSort: l, onSortChange: u, activeFilters: d = [], onRemoveFilter: f, onClearFilters: p, loading: m = !1, emptyState: h, onAddToCart: g, onWishlistToggle: _, onProductClick: v, wishlisted: y = [], className: b = "" }) {
|
|
1437
1545
|
let x = t ? Math.ceil(t / i) : void 0, S = a >= 5 ? "compact" : "default";
|
|
1438
|
-
return /* @__PURE__ */
|
|
1546
|
+
return /* @__PURE__ */ c("div", {
|
|
1439
1547
|
className: ["w-full", b].filter(Boolean).join(" "),
|
|
1440
1548
|
children: [
|
|
1441
|
-
/* @__PURE__ */
|
|
1549
|
+
/* @__PURE__ */ c("div", {
|
|
1442
1550
|
className: "flex flex-wrap items-center justify-between gap-3 mb-4",
|
|
1443
|
-
children: [/* @__PURE__ */
|
|
1551
|
+
children: [/* @__PURE__ */ c("div", {
|
|
1444
1552
|
className: "flex flex-wrap items-center gap-2",
|
|
1445
1553
|
children: [
|
|
1446
|
-
t !== void 0 && /* @__PURE__ */
|
|
1554
|
+
t !== void 0 && /* @__PURE__ */ c("span", {
|
|
1447
1555
|
className: "text-sm text-gray-500",
|
|
1448
|
-
children: [/* @__PURE__ */
|
|
1556
|
+
children: [/* @__PURE__ */ s("span", {
|
|
1449
1557
|
className: "font-semibold text-gray-900",
|
|
1450
1558
|
children: t
|
|
1451
1559
|
}), " produktů"]
|
|
1452
1560
|
}),
|
|
1453
|
-
d.map((e) => /* @__PURE__ */
|
|
1561
|
+
d.map((e) => /* @__PURE__ */ c("span", {
|
|
1454
1562
|
className: "inline-flex items-center gap-1 text-xs bg-primary-50 text-primary-700 border border-primary-200 rounded-full px-2.5 py-1",
|
|
1455
|
-
children: [e, /* @__PURE__ */
|
|
1563
|
+
children: [e, /* @__PURE__ */ s("button", {
|
|
1456
1564
|
onClick: () => f?.(e),
|
|
1457
1565
|
"aria-label": `Remove filter ${e}`,
|
|
1458
1566
|
className: "hover:text-primary-900 transition-colors",
|
|
1459
|
-
children: /* @__PURE__ */
|
|
1567
|
+
children: /* @__PURE__ */ s("svg", {
|
|
1460
1568
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1461
1569
|
fill: "none",
|
|
1462
1570
|
viewBox: "0 0 24 24",
|
|
1463
1571
|
strokeWidth: 2,
|
|
1464
1572
|
stroke: "currentColor",
|
|
1465
1573
|
className: "w-3 h-3",
|
|
1466
|
-
children: /* @__PURE__ */
|
|
1574
|
+
children: /* @__PURE__ */ s("path", {
|
|
1467
1575
|
strokeLinecap: "round",
|
|
1468
1576
|
strokeLinejoin: "round",
|
|
1469
1577
|
d: "M6 18L18 6M6 6l12 12"
|
|
@@ -1471,50 +1579,50 @@ function he({ products: e, totalCount: t, page: n = 1, onPageChange: r, perPage:
|
|
|
1471
1579
|
})
|
|
1472
1580
|
})]
|
|
1473
1581
|
}, e)),
|
|
1474
|
-
d.length > 1 && /* @__PURE__ */
|
|
1582
|
+
d.length > 1 && /* @__PURE__ */ s("button", {
|
|
1475
1583
|
onClick: p,
|
|
1476
1584
|
className: "text-xs text-gray-400 hover:text-gray-600 underline underline-offset-2 transition-colors",
|
|
1477
1585
|
children: "Zrušit vše"
|
|
1478
1586
|
})
|
|
1479
1587
|
]
|
|
1480
|
-
}), /* @__PURE__ */
|
|
1481
|
-
options:
|
|
1588
|
+
}), /* @__PURE__ */ s(E, {
|
|
1589
|
+
options: o,
|
|
1482
1590
|
value: l ?? "",
|
|
1483
1591
|
onChange: (e) => u?.(e.target.value),
|
|
1484
1592
|
"aria-label": "Sort products",
|
|
1485
1593
|
className: "text-sm"
|
|
1486
1594
|
})]
|
|
1487
1595
|
}),
|
|
1488
|
-
m ? /* @__PURE__ */
|
|
1596
|
+
m ? /* @__PURE__ */ s("div", {
|
|
1489
1597
|
className: `grid gap-4 ${$[a]}`,
|
|
1490
|
-
children: Array.from({ length: i > 12 ? 12 : i }).map((e, t) => /* @__PURE__ */
|
|
1491
|
-
}) : e.length === 0 ? /* @__PURE__ */
|
|
1598
|
+
children: Array.from({ length: i > 12 ? 12 : i }).map((e, t) => /* @__PURE__ */ s(ve, {}, t))
|
|
1599
|
+
}) : e.length === 0 ? /* @__PURE__ */ s("div", {
|
|
1492
1600
|
className: "py-16 text-center",
|
|
1493
|
-
children: h ?? /* @__PURE__ */
|
|
1601
|
+
children: h ?? /* @__PURE__ */ c("div", {
|
|
1494
1602
|
className: "space-y-2",
|
|
1495
1603
|
children: [
|
|
1496
|
-
/* @__PURE__ */
|
|
1604
|
+
/* @__PURE__ */ s("p", {
|
|
1497
1605
|
className: "text-4xl",
|
|
1498
1606
|
children: "🔍"
|
|
1499
1607
|
}),
|
|
1500
|
-
/* @__PURE__ */
|
|
1608
|
+
/* @__PURE__ */ s("p", {
|
|
1501
1609
|
className: "font-semibold text-gray-900",
|
|
1502
1610
|
children: "Žádné produkty nenalezeny"
|
|
1503
1611
|
}),
|
|
1504
|
-
/* @__PURE__ */
|
|
1612
|
+
/* @__PURE__ */ s("p", {
|
|
1505
1613
|
className: "text-sm text-gray-500",
|
|
1506
1614
|
children: "Zkuste upravit filtry nebo hledat jinak."
|
|
1507
1615
|
}),
|
|
1508
|
-
d.length > 0 && /* @__PURE__ */
|
|
1616
|
+
d.length > 0 && /* @__PURE__ */ s("button", {
|
|
1509
1617
|
onClick: p,
|
|
1510
1618
|
className: "mt-3 text-sm text-primary-600 hover:underline",
|
|
1511
1619
|
children: "Zrušit všechny filtry"
|
|
1512
1620
|
})
|
|
1513
1621
|
]
|
|
1514
1622
|
})
|
|
1515
|
-
}) : /* @__PURE__ */
|
|
1623
|
+
}) : /* @__PURE__ */ s("div", {
|
|
1516
1624
|
className: `grid gap-4 ${$[a]}`,
|
|
1517
|
-
children: e.map((e) => /* @__PURE__ */
|
|
1625
|
+
children: e.map((e) => /* @__PURE__ */ s(Q, {
|
|
1518
1626
|
product: e,
|
|
1519
1627
|
size: S,
|
|
1520
1628
|
onAddToCart: g,
|
|
@@ -1523,9 +1631,9 @@ function he({ products: e, totalCount: t, page: n = 1, onPageChange: r, perPage:
|
|
|
1523
1631
|
isWishlisted: y.includes(e.id)
|
|
1524
1632
|
}, e.id))
|
|
1525
1633
|
}),
|
|
1526
|
-
x && x > 1 && r && /* @__PURE__ */
|
|
1634
|
+
x && x > 1 && r && /* @__PURE__ */ s("div", {
|
|
1527
1635
|
className: "flex justify-center mt-8",
|
|
1528
|
-
children: /* @__PURE__ */
|
|
1636
|
+
children: /* @__PURE__ */ s(U, {
|
|
1529
1637
|
page: n,
|
|
1530
1638
|
totalPages: x,
|
|
1531
1639
|
onPageChange: r
|
|
@@ -1536,14 +1644,14 @@ function he({ products: e, totalCount: t, page: n = 1, onPageChange: r, perPage:
|
|
|
1536
1644
|
}
|
|
1537
1645
|
//#endregion
|
|
1538
1646
|
//#region src/components/CallToAction/CallToAction.tsx
|
|
1539
|
-
var
|
|
1647
|
+
var be = {
|
|
1540
1648
|
default: "bg-gray-50 border border-gray-200",
|
|
1541
1649
|
primary: "bg-primary-600",
|
|
1542
1650
|
dark: "bg-gray-900",
|
|
1543
1651
|
gradient: "bg-linear-to-br from-primary-600 via-primary-700 to-violet-700",
|
|
1544
1652
|
outline: "bg-white border-2 border-primary-600",
|
|
1545
1653
|
image: "relative overflow-hidden"
|
|
1546
|
-
},
|
|
1654
|
+
}, xe = {
|
|
1547
1655
|
default: {
|
|
1548
1656
|
eyebrow: "text-primary-600",
|
|
1549
1657
|
title: "text-gray-900",
|
|
@@ -1574,7 +1682,7 @@ var ge = {
|
|
|
1574
1682
|
title: "text-white",
|
|
1575
1683
|
description: "text-white/80"
|
|
1576
1684
|
}
|
|
1577
|
-
},
|
|
1685
|
+
}, Se = {
|
|
1578
1686
|
sm: {
|
|
1579
1687
|
wrapper: "px-6 py-6 rounded-xl",
|
|
1580
1688
|
title: "text-xl font-bold",
|
|
@@ -1599,7 +1707,7 @@ var ge = {
|
|
|
1599
1707
|
description: "text-xl",
|
|
1600
1708
|
eyebrow: "text-sm"
|
|
1601
1709
|
}
|
|
1602
|
-
},
|
|
1710
|
+
}, Ce = {
|
|
1603
1711
|
left: {
|
|
1604
1712
|
wrapper: "items-start text-left",
|
|
1605
1713
|
actions: "justify-start"
|
|
@@ -1613,8 +1721,8 @@ var ge = {
|
|
|
1613
1721
|
actions: "justify-end"
|
|
1614
1722
|
}
|
|
1615
1723
|
};
|
|
1616
|
-
function
|
|
1617
|
-
let h =
|
|
1724
|
+
function we({ eyebrow: e, title: t, description: n, actions: r = [], align: i = "center", layout: a = "stacked", size: o = "md", variant: l = "default", background: u, backgroundImage: d, media: f, className: p = "", style: m }) {
|
|
1725
|
+
let h = xe[l], g = Se[o], _ = Ce[i], v = a === "inline", y = {
|
|
1618
1726
|
...u ? { background: u } : {},
|
|
1619
1727
|
...d ? {
|
|
1620
1728
|
backgroundImage: `url(${d})`,
|
|
@@ -1623,48 +1731,48 @@ function be({ eyebrow: e, title: t, description: n, actions: r = [], align: i =
|
|
|
1623
1731
|
} : {},
|
|
1624
1732
|
...m
|
|
1625
1733
|
};
|
|
1626
|
-
return /* @__PURE__ */
|
|
1734
|
+
return /* @__PURE__ */ c("div", {
|
|
1627
1735
|
className: [
|
|
1628
1736
|
"w-full",
|
|
1629
|
-
|
|
1737
|
+
be[l],
|
|
1630
1738
|
g.wrapper,
|
|
1631
1739
|
p
|
|
1632
1740
|
].filter(Boolean).join(" "),
|
|
1633
1741
|
style: Object.keys(y).length ? y : void 0,
|
|
1634
|
-
children: [(l === "image" || d) && /* @__PURE__ */
|
|
1742
|
+
children: [(l === "image" || d) && /* @__PURE__ */ s("div", { className: "absolute inset-0 bg-black/50" }), /* @__PURE__ */ c("div", {
|
|
1635
1743
|
className: `relative ${v ? "flex flex-wrap items-center justify-between gap-6" : `flex flex-col gap-4 ${_.wrapper}`}`,
|
|
1636
1744
|
children: [
|
|
1637
|
-
/* @__PURE__ */
|
|
1745
|
+
/* @__PURE__ */ c("div", {
|
|
1638
1746
|
className: `flex flex-col gap-2 ${v ? "flex-1 min-w-0" : _.wrapper}`,
|
|
1639
1747
|
children: [
|
|
1640
|
-
e && /* @__PURE__ */
|
|
1748
|
+
e && /* @__PURE__ */ s("p", {
|
|
1641
1749
|
className: `font-semibold uppercase tracking-widest ${g.eyebrow} ${h.eyebrow}`,
|
|
1642
1750
|
children: e
|
|
1643
1751
|
}),
|
|
1644
|
-
/* @__PURE__ */
|
|
1752
|
+
/* @__PURE__ */ s("h2", {
|
|
1645
1753
|
className: `${g.title} ${h.title}`,
|
|
1646
1754
|
children: t
|
|
1647
1755
|
}),
|
|
1648
|
-
n && /* @__PURE__ */
|
|
1756
|
+
n && /* @__PURE__ */ s("p", {
|
|
1649
1757
|
className: `max-w-2xl ${g.description} ${h.description}`,
|
|
1650
1758
|
children: n
|
|
1651
1759
|
})
|
|
1652
1760
|
]
|
|
1653
1761
|
}),
|
|
1654
|
-
f && !v && /* @__PURE__ */
|
|
1762
|
+
f && !v && /* @__PURE__ */ s("div", {
|
|
1655
1763
|
className: "mt-2",
|
|
1656
1764
|
children: f
|
|
1657
1765
|
}),
|
|
1658
|
-
r.length > 0 && /* @__PURE__ */
|
|
1766
|
+
r.length > 0 && /* @__PURE__ */ s("div", {
|
|
1659
1767
|
className: `flex flex-wrap gap-3 ${v ? "shrink-0" : _.actions}`,
|
|
1660
1768
|
children: r.map((e, t) => {
|
|
1661
|
-
let n = /* @__PURE__ */
|
|
1662
|
-
variant: e.variant ?? (t === 0 ?
|
|
1663
|
-
size: e.size ?? (
|
|
1769
|
+
let n = /* @__PURE__ */ s(S, {
|
|
1770
|
+
variant: e.variant ?? (t === 0 ? Te(l) : "outline"),
|
|
1771
|
+
size: e.size ?? (o === "sm" ? "sm" : o === "xl" ? "lg" : "md"),
|
|
1664
1772
|
onClick: e.onClick,
|
|
1665
1773
|
children: e.label
|
|
1666
1774
|
}, t);
|
|
1667
|
-
return e.href ? /* @__PURE__ */
|
|
1775
|
+
return e.href ? /* @__PURE__ */ s("a", {
|
|
1668
1776
|
href: e.href,
|
|
1669
1777
|
className: "contents",
|
|
1670
1778
|
children: n
|
|
@@ -1675,233 +1783,233 @@ function be({ eyebrow: e, title: t, description: n, actions: r = [], align: i =
|
|
|
1675
1783
|
})]
|
|
1676
1784
|
});
|
|
1677
1785
|
}
|
|
1678
|
-
function
|
|
1786
|
+
function Te(e) {
|
|
1679
1787
|
return e === "default" || e === "outline" ? "primary" : "secondary";
|
|
1680
1788
|
}
|
|
1681
1789
|
//#endregion
|
|
1682
1790
|
//#region src/components/Footer/Footer.tsx
|
|
1683
|
-
function
|
|
1684
|
-
return /* @__PURE__ */
|
|
1791
|
+
function Ee() {
|
|
1792
|
+
return /* @__PURE__ */ s("svg", {
|
|
1685
1793
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1686
1794
|
fill: "none",
|
|
1687
1795
|
viewBox: "0 0 24 24",
|
|
1688
1796
|
strokeWidth: 1.5,
|
|
1689
1797
|
stroke: "currentColor",
|
|
1690
1798
|
className: "w-4 h-4 shrink-0",
|
|
1691
|
-
children: /* @__PURE__ */
|
|
1799
|
+
children: /* @__PURE__ */ s("path", {
|
|
1692
1800
|
strokeLinecap: "round",
|
|
1693
1801
|
strokeLinejoin: "round",
|
|
1694
1802
|
d: "M2.25 6.75c0 8.284 6.716 15 15 15h2.25a2.25 2.25 0 002.25-2.25v-1.372c0-.516-.351-.966-.852-1.091l-4.423-1.106c-.44-.11-.902.055-1.173.417l-.97 1.293c-.282.376-.769.542-1.21.38a12.035 12.035 0 01-7.143-7.143c-.162-.441.004-.928.38-1.21l1.293-.97c.363-.271.527-.734.417-1.173L6.963 3.102a1.125 1.125 0 00-1.091-.852H4.5A2.25 2.25 0 002.25 4.5v2.25z"
|
|
1695
1803
|
})
|
|
1696
1804
|
});
|
|
1697
1805
|
}
|
|
1698
|
-
function
|
|
1699
|
-
return /* @__PURE__ */
|
|
1806
|
+
function De() {
|
|
1807
|
+
return /* @__PURE__ */ s("svg", {
|
|
1700
1808
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1701
1809
|
fill: "none",
|
|
1702
1810
|
viewBox: "0 0 24 24",
|
|
1703
1811
|
strokeWidth: 1.5,
|
|
1704
1812
|
stroke: "currentColor",
|
|
1705
1813
|
className: "w-4 h-4 shrink-0",
|
|
1706
|
-
children: /* @__PURE__ */
|
|
1814
|
+
children: /* @__PURE__ */ s("path", {
|
|
1707
1815
|
strokeLinecap: "round",
|
|
1708
1816
|
strokeLinejoin: "round",
|
|
1709
1817
|
d: "M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75"
|
|
1710
1818
|
})
|
|
1711
1819
|
});
|
|
1712
1820
|
}
|
|
1713
|
-
function
|
|
1714
|
-
return /* @__PURE__ */
|
|
1821
|
+
function Oe() {
|
|
1822
|
+
return /* @__PURE__ */ c("svg", {
|
|
1715
1823
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1716
1824
|
fill: "none",
|
|
1717
1825
|
viewBox: "0 0 24 24",
|
|
1718
1826
|
strokeWidth: 1.5,
|
|
1719
1827
|
stroke: "currentColor",
|
|
1720
1828
|
className: "w-4 h-4 shrink-0",
|
|
1721
|
-
children: [/* @__PURE__ */
|
|
1829
|
+
children: [/* @__PURE__ */ s("path", {
|
|
1722
1830
|
strokeLinecap: "round",
|
|
1723
1831
|
strokeLinejoin: "round",
|
|
1724
1832
|
d: "M15 10.5a3 3 0 11-6 0 3 3 0 016 0z"
|
|
1725
|
-
}), /* @__PURE__ */
|
|
1833
|
+
}), /* @__PURE__ */ s("path", {
|
|
1726
1834
|
strokeLinecap: "round",
|
|
1727
1835
|
strokeLinejoin: "round",
|
|
1728
1836
|
d: "M19.5 10.5c0 7.142-7.5 11.25-7.5 11.25S4.5 17.642 4.5 10.5a7.5 7.5 0 1115 0z"
|
|
1729
1837
|
})]
|
|
1730
1838
|
});
|
|
1731
1839
|
}
|
|
1732
|
-
function
|
|
1733
|
-
return /* @__PURE__ */
|
|
1840
|
+
function ke() {
|
|
1841
|
+
return /* @__PURE__ */ s("svg", {
|
|
1734
1842
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1735
1843
|
fill: "none",
|
|
1736
1844
|
viewBox: "0 0 24 24",
|
|
1737
1845
|
strokeWidth: 1.5,
|
|
1738
1846
|
stroke: "currentColor",
|
|
1739
1847
|
className: "w-4 h-4 shrink-0",
|
|
1740
|
-
children: /* @__PURE__ */
|
|
1848
|
+
children: /* @__PURE__ */ s("path", {
|
|
1741
1849
|
strokeLinecap: "round",
|
|
1742
1850
|
strokeLinejoin: "round",
|
|
1743
1851
|
d: "M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
1744
1852
|
})
|
|
1745
1853
|
});
|
|
1746
1854
|
}
|
|
1747
|
-
function
|
|
1748
|
-
return /* @__PURE__ */
|
|
1855
|
+
function Ae() {
|
|
1856
|
+
return /* @__PURE__ */ s("svg", {
|
|
1749
1857
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1750
1858
|
viewBox: "0 0 24 24",
|
|
1751
1859
|
fill: "currentColor",
|
|
1752
1860
|
className: "w-4 h-4",
|
|
1753
|
-
children: /* @__PURE__ */
|
|
1861
|
+
children: /* @__PURE__ */ s("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" })
|
|
1754
1862
|
});
|
|
1755
1863
|
}
|
|
1756
|
-
function
|
|
1757
|
-
return /* @__PURE__ */
|
|
1864
|
+
function je() {
|
|
1865
|
+
return /* @__PURE__ */ s("svg", {
|
|
1758
1866
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1759
1867
|
viewBox: "0 0 24 24",
|
|
1760
1868
|
fill: "currentColor",
|
|
1761
1869
|
className: "w-4 h-4",
|
|
1762
|
-
children: /* @__PURE__ */
|
|
1870
|
+
children: /* @__PURE__ */ s("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" })
|
|
1763
1871
|
});
|
|
1764
1872
|
}
|
|
1765
|
-
function
|
|
1766
|
-
return /* @__PURE__ */
|
|
1873
|
+
function Me() {
|
|
1874
|
+
return /* @__PURE__ */ s("svg", {
|
|
1767
1875
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1768
1876
|
viewBox: "0 0 24 24",
|
|
1769
1877
|
fill: "currentColor",
|
|
1770
1878
|
className: "w-4 h-4",
|
|
1771
|
-
children: /* @__PURE__ */
|
|
1879
|
+
children: /* @__PURE__ */ s("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" })
|
|
1772
1880
|
});
|
|
1773
1881
|
}
|
|
1774
|
-
function
|
|
1775
|
-
return /* @__PURE__ */
|
|
1882
|
+
function Ne() {
|
|
1883
|
+
return /* @__PURE__ */ s("svg", {
|
|
1776
1884
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1777
1885
|
viewBox: "0 0 24 24",
|
|
1778
1886
|
fill: "currentColor",
|
|
1779
1887
|
className: "w-4 h-4",
|
|
1780
|
-
children: /* @__PURE__ */
|
|
1888
|
+
children: /* @__PURE__ */ s("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" })
|
|
1781
1889
|
});
|
|
1782
1890
|
}
|
|
1783
|
-
function
|
|
1784
|
-
return /* @__PURE__ */
|
|
1891
|
+
function Pe() {
|
|
1892
|
+
return /* @__PURE__ */ s("svg", {
|
|
1785
1893
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1786
1894
|
viewBox: "0 0 24 24",
|
|
1787
1895
|
fill: "currentColor",
|
|
1788
1896
|
className: "w-4 h-4",
|
|
1789
|
-
children: /* @__PURE__ */
|
|
1897
|
+
children: /* @__PURE__ */ s("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" })
|
|
1790
1898
|
});
|
|
1791
1899
|
}
|
|
1792
|
-
var
|
|
1793
|
-
facebook:
|
|
1794
|
-
instagram:
|
|
1795
|
-
twitter:
|
|
1796
|
-
youtube:
|
|
1797
|
-
tiktok:
|
|
1798
|
-
},
|
|
1799
|
-
phone:
|
|
1800
|
-
email:
|
|
1801
|
-
address:
|
|
1802
|
-
hours:
|
|
1900
|
+
var Fe = {
|
|
1901
|
+
facebook: Ae,
|
|
1902
|
+
instagram: je,
|
|
1903
|
+
twitter: Me,
|
|
1904
|
+
youtube: Ne,
|
|
1905
|
+
tiktok: Pe
|
|
1906
|
+
}, Ie = {
|
|
1907
|
+
phone: Ee,
|
|
1908
|
+
email: De,
|
|
1909
|
+
address: Oe,
|
|
1910
|
+
hours: ke
|
|
1803
1911
|
};
|
|
1804
|
-
function
|
|
1912
|
+
function Le(e) {
|
|
1805
1913
|
if (!e) return null;
|
|
1806
1914
|
if (typeof e == "string") {
|
|
1807
|
-
let t =
|
|
1808
|
-
return t ? /* @__PURE__ */
|
|
1915
|
+
let t = Ie[e];
|
|
1916
|
+
return t ? /* @__PURE__ */ s(t, {}) : null;
|
|
1809
1917
|
}
|
|
1810
1918
|
return e;
|
|
1811
1919
|
}
|
|
1812
|
-
function
|
|
1920
|
+
function Re(e) {
|
|
1813
1921
|
if (typeof e == "string") {
|
|
1814
|
-
let t =
|
|
1815
|
-
return t ? /* @__PURE__ */
|
|
1922
|
+
let t = Fe[e];
|
|
1923
|
+
return t ? /* @__PURE__ */ s(t, {}) : null;
|
|
1816
1924
|
}
|
|
1817
1925
|
return e;
|
|
1818
1926
|
}
|
|
1819
|
-
function
|
|
1927
|
+
function ze({ logo: e, tagline: t, contactHeading: n = "Kontakty", contacts: r = [], linkGroups: i = [], socialLinks: a = [], copyright: o, bottomLinks: l = [], className: u = "" }) {
|
|
1820
1928
|
let d = (/* @__PURE__ */ new Date()).getFullYear();
|
|
1821
|
-
return /* @__PURE__ */
|
|
1929
|
+
return /* @__PURE__ */ c("footer", {
|
|
1822
1930
|
className: ["bg-gray-900 text-gray-300", u].filter(Boolean).join(" "),
|
|
1823
|
-
children: [/* @__PURE__ */
|
|
1931
|
+
children: [/* @__PURE__ */ c("div", {
|
|
1824
1932
|
className: "max-w-7xl mx-auto px-4 py-12 grid grid-cols-1 md:grid-cols-2 gap-10 lg:gap-16",
|
|
1825
|
-
children: [/* @__PURE__ */
|
|
1933
|
+
children: [/* @__PURE__ */ c("div", {
|
|
1826
1934
|
className: "flex flex-col gap-6",
|
|
1827
1935
|
children: [
|
|
1828
|
-
/* @__PURE__ */
|
|
1936
|
+
/* @__PURE__ */ c("div", { children: [e ? /* @__PURE__ */ s("div", {
|
|
1829
1937
|
className: "mb-3",
|
|
1830
1938
|
children: e
|
|
1831
|
-
}) : /* @__PURE__ */
|
|
1939
|
+
}) : /* @__PURE__ */ s("span", {
|
|
1832
1940
|
className: "text-xl font-bold text-white tracking-tight mb-3 block",
|
|
1833
1941
|
children: "shopito"
|
|
1834
|
-
}), t && /* @__PURE__ */
|
|
1942
|
+
}), t && /* @__PURE__ */ s("p", {
|
|
1835
1943
|
className: "text-sm text-gray-400 max-w-xs",
|
|
1836
1944
|
children: t
|
|
1837
1945
|
})] }),
|
|
1838
|
-
r.length > 0 && /* @__PURE__ */
|
|
1946
|
+
r.length > 0 && /* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("h3", {
|
|
1839
1947
|
className: "text-xs font-semibold uppercase tracking-widest text-gray-500 mb-3",
|
|
1840
1948
|
children: n
|
|
1841
|
-
}), /* @__PURE__ */
|
|
1949
|
+
}), /* @__PURE__ */ s("ul", {
|
|
1842
1950
|
className: "space-y-3",
|
|
1843
1951
|
children: r.map((e, t) => {
|
|
1844
|
-
let n =
|
|
1952
|
+
let n = Le(e.icon), r = /* @__PURE__ */ c("div", {
|
|
1845
1953
|
className: "flex items-start gap-2.5",
|
|
1846
|
-
children: [n && /* @__PURE__ */
|
|
1954
|
+
children: [n && /* @__PURE__ */ s("span", {
|
|
1847
1955
|
className: "mt-0.5 text-primary-400",
|
|
1848
1956
|
children: n
|
|
1849
|
-
}), /* @__PURE__ */
|
|
1957
|
+
}), /* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("p", {
|
|
1850
1958
|
className: "text-xs text-gray-500 leading-none mb-0.5",
|
|
1851
1959
|
children: e.label
|
|
1852
|
-
}), /* @__PURE__ */
|
|
1960
|
+
}), /* @__PURE__ */ s("p", {
|
|
1853
1961
|
className: `text-sm text-gray-200 ${e.href ? "hover:text-white transition-colors" : ""}`,
|
|
1854
1962
|
children: e.value
|
|
1855
1963
|
})] })]
|
|
1856
1964
|
});
|
|
1857
|
-
return /* @__PURE__ */
|
|
1965
|
+
return /* @__PURE__ */ s("li", { children: e.href ? /* @__PURE__ */ s("a", {
|
|
1858
1966
|
href: e.href,
|
|
1859
1967
|
children: r
|
|
1860
1968
|
}) : r }, t);
|
|
1861
1969
|
})
|
|
1862
1970
|
})] }),
|
|
1863
|
-
a.length > 0 && /* @__PURE__ */
|
|
1971
|
+
a.length > 0 && /* @__PURE__ */ s("div", {
|
|
1864
1972
|
className: "flex gap-2 flex-wrap",
|
|
1865
|
-
children: a.map((e, t) => /* @__PURE__ */
|
|
1973
|
+
children: a.map((e, t) => /* @__PURE__ */ s("a", {
|
|
1866
1974
|
href: e.href,
|
|
1867
1975
|
"aria-label": e.label,
|
|
1868
1976
|
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",
|
|
1869
|
-
children:
|
|
1977
|
+
children: Re(e.icon)
|
|
1870
1978
|
}, t))
|
|
1871
1979
|
})
|
|
1872
1980
|
]
|
|
1873
|
-
}), i.length > 0 && /* @__PURE__ */
|
|
1981
|
+
}), i.length > 0 && /* @__PURE__ */ s("div", {
|
|
1874
1982
|
className: `grid gap-8 ${i.length === 1 ? "grid-cols-1" : i.length === 2 ? "grid-cols-2" : "grid-cols-2 sm:grid-cols-3"}`,
|
|
1875
|
-
children: i.map((e, t) => /* @__PURE__ */
|
|
1983
|
+
children: i.map((e, t) => /* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("h3", {
|
|
1876
1984
|
className: "text-xs font-semibold uppercase tracking-widest text-gray-500 mb-3",
|
|
1877
1985
|
children: e.heading
|
|
1878
|
-
}), /* @__PURE__ */
|
|
1986
|
+
}), /* @__PURE__ */ s("ul", {
|
|
1879
1987
|
className: "space-y-2",
|
|
1880
|
-
children: e.links.map((e, t) => /* @__PURE__ */
|
|
1988
|
+
children: e.links.map((e, t) => /* @__PURE__ */ s("li", { children: e.href ? /* @__PURE__ */ s("a", {
|
|
1881
1989
|
href: e.href,
|
|
1882
1990
|
className: "text-sm text-gray-400 hover:text-white transition-colors",
|
|
1883
1991
|
children: e.label
|
|
1884
|
-
}) : /* @__PURE__ */
|
|
1992
|
+
}) : /* @__PURE__ */ s("button", {
|
|
1885
1993
|
onClick: e.onClick,
|
|
1886
1994
|
className: "text-sm text-gray-400 hover:text-white transition-colors text-left",
|
|
1887
1995
|
children: e.label
|
|
1888
1996
|
}) }, t))
|
|
1889
1997
|
})] }, t))
|
|
1890
1998
|
})]
|
|
1891
|
-
}), /* @__PURE__ */
|
|
1999
|
+
}), /* @__PURE__ */ s("div", {
|
|
1892
2000
|
className: "border-t border-gray-800",
|
|
1893
|
-
children: /* @__PURE__ */
|
|
2001
|
+
children: /* @__PURE__ */ c("div", {
|
|
1894
2002
|
className: "max-w-7xl mx-auto px-4 py-4 flex flex-wrap items-center justify-between gap-3",
|
|
1895
|
-
children: [/* @__PURE__ */
|
|
2003
|
+
children: [/* @__PURE__ */ s("p", {
|
|
1896
2004
|
className: "text-xs text-gray-500",
|
|
1897
|
-
children:
|
|
1898
|
-
}), l.length > 0 && /* @__PURE__ */
|
|
2005
|
+
children: o ?? `© ${d} Shopito. Všechna práva vyhrazena.`
|
|
2006
|
+
}), l.length > 0 && /* @__PURE__ */ s("nav", {
|
|
1899
2007
|
className: "flex flex-wrap gap-4",
|
|
1900
|
-
children: l.map((e, t) => e.href ? /* @__PURE__ */
|
|
2008
|
+
children: l.map((e, t) => e.href ? /* @__PURE__ */ s("a", {
|
|
1901
2009
|
href: e.href,
|
|
1902
2010
|
className: "text-xs text-gray-500 hover:text-gray-300 transition-colors",
|
|
1903
2011
|
children: e.label
|
|
1904
|
-
}, t) : /* @__PURE__ */
|
|
2012
|
+
}, t) : /* @__PURE__ */ s("button", {
|
|
1905
2013
|
onClick: e.onClick,
|
|
1906
2014
|
className: "text-xs text-gray-500 hover:text-gray-300 transition-colors",
|
|
1907
2015
|
children: e.label
|
|
@@ -1912,6 +2020,6 @@ function Fe({ logo: e, tagline: t, contactHeading: n = "Kontakty", contacts: r =
|
|
|
1912
2020
|
});
|
|
1913
2021
|
}
|
|
1914
2022
|
//#endregion
|
|
1915
|
-
export {
|
|
2023
|
+
export { ne as Alert, ie as Avatar, k as Badge, fe as BannerCarousel, S as Button, we as CallToAction, j as Card, ee as CardBody, te as CardFooter, M as CardHeader, ue as CategoryTree, I as Checkbox, y as Container, ze as Footer, K as Header, D as Heading, w as IconButton, T as Input, C as LoadingSpin, b as Main, de as MegaMenu, F as Modal, U as Pagination, Q as ProductCard, ye as ProductGrid, z as QuantityInput, E as Select, N as Spinner, ae as Stack, O as Text, L as Toggle };
|
|
1916
2024
|
|
|
1917
2025
|
//# sourceMappingURL=index.js.map
|