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