@lanaco/lnc-react-ui 4.0.226 → 4.0.227
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/BannerSectionCarousel.cjs +3 -3
- package/dist/BannerSectionCarousel.js +18 -11
- package/dist/BlogCardsSponsoredSection.cjs +1 -1
- package/dist/BlogCardsSponsoredSection.js +1 -1
- package/dist/BlogListSection.cjs +7 -7
- package/dist/BlogListSection.js +157 -207
- package/dist/BlogSingleSection.cjs +2 -11
- package/dist/BlogSingleSection.js +19 -35
- package/dist/BlogsSectionDetailed.cjs +1 -1
- package/dist/BlogsSectionDetailed.js +1 -1
- package/dist/BlogsSectionLarge.cjs +8 -16
- package/dist/BlogsSectionLarge.js +40 -58
- package/dist/BlogsSectionSimple.cjs +1 -1
- package/dist/BlogsSectionSimple.js +1 -1
- package/dist/BlogsSectionSimpleCentered.cjs +12 -25
- package/dist/BlogsSectionSimpleCentered.js +64 -98
- package/dist/BlogsSectionWithFilters.cjs +10 -21
- package/dist/BlogsSectionWithFilters.js +106 -154
- package/dist/BrandHitsSection.cjs +7 -7
- package/dist/BrandHitsSection.js +41 -87
- package/dist/DetailedProductsInfinitiveSection.cjs +1 -1
- package/dist/DetailedProductsInfinitiveSection.js +2 -2
- package/dist/DetailedProductsSection.cjs +1 -1
- package/dist/DetailedProductsSection.js +2 -2
- package/dist/FieldOfInterestsMasonrySection.cjs +13 -13
- package/dist/FieldOfInterestsMasonrySection.js +105 -159
- package/dist/FieldOfInterestsWithAvatarsCardsSection.cjs +8 -8
- package/dist/FieldOfInterestsWithAvatarsCardsSection.js +93 -124
- package/dist/FieldOfInterestsWithTagsCardsSection.cjs +1 -1
- package/dist/FieldOfInterestsWithTagsCardsSection.js +1 -1
- package/dist/GeneralWithTagsCardsSection.cjs +1 -1
- package/dist/GeneralWithTagsCardsSection.js +1 -1
- package/dist/GiftCardsSection.cjs +10 -14
- package/dist/GiftCardsSection.js +76 -146
- package/dist/MasonryGeneralCardsSection.cjs +10 -10
- package/dist/MasonryGeneralCardsSection.js +45 -44
- package/dist/OverlayGeneralCardsSection.cjs +1 -1
- package/dist/OverlayGeneralCardsSection.js +1 -1
- package/dist/ProductsWithBannerSection.cjs +13 -13
- package/dist/ProductsWithBannerSection.js +87 -168
- package/dist/QuattroCardsSection.cjs +1 -1
- package/dist/QuattroCardsSection.js +1 -1
- package/dist/ReviewsSection.cjs +18 -22
- package/dist/ReviewsSection.js +101 -163
- package/dist/SalesCampaignsSection.cjs +14 -14
- package/dist/SalesCampaignsSection.js +299 -330
- package/dist/ShopCardsSection.cjs +6 -19
- package/dist/ShopCardsSection.js +54 -100
- package/dist/SimpleCategoriesSection.cjs +3 -3
- package/dist/SimpleCategoriesSection.js +64 -67
- package/dist/SimpleProductsSection.cjs +7 -7
- package/dist/SimpleProductsSection.js +65 -138
- package/dist/UrgentSaleProductsSection.cjs +1 -1
- package/dist/UrgentSaleProductsSection.js +1 -1
- package/dist/index-B7fBsitY.js +45 -0
- package/dist/index-BMAvJQBG.cjs +9 -0
- package/dist/index-BUdvfHpp.cjs +5 -0
- package/dist/index-BXT1eY2D.js +753 -0
- package/dist/index-C6amCwRZ.js +25 -0
- package/dist/index-C8R9lsWG.cjs +1 -0
- package/dist/index-CeQvy566.cjs +11 -0
- package/dist/index-Cyt4EUZ6.js +20 -0
- package/dist/index-D3QZziO_.cjs +368 -0
- package/dist/index-VTkAaA-n.js +18 -0
- package/dist/style-BFPpppS9.js +73 -0
- package/dist/style-CQdEALKR.cjs +59 -0
- package/package.json +1 -1
- package/dist/index-BGNavrtB.cjs +0 -368
- package/dist/index-BHcrzV2G.js +0 -54
- package/dist/index-Bj1KWOV4.cjs +0 -11
- package/dist/index-BsAddfgC.cjs +0 -1
- package/dist/index-Cn4bq6ZX.js +0 -84
- package/dist/index-CuRcxKQH.js +0 -42
- package/dist/index-DB1J-G6Z.js +0 -38
- package/dist/index-DkPva6Gr.cjs +0 -20
- package/dist/index-fzBXDy05.cjs +0 -16
- package/dist/index-gFZSZLba.js +0 -882
- package/dist/style-DvkivBNg.js +0 -74
- package/dist/style-Ito6YFqi.cjs +0 -64
package/dist/ReviewsSection.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { s as
|
|
4
|
-
import { d as
|
|
5
|
-
import { u as
|
|
6
|
-
import { t as
|
|
1
|
+
import { jsxs as p, jsx as r, Fragment as S } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as w, Suspense as C, memo as k, useMemo as y } from "react";
|
|
3
|
+
import { s as n } from "./emotion-styled.browser.esm-DfbrHHed.js";
|
|
4
|
+
import { d as u } from "./breakpoints-BubDitvo.js";
|
|
5
|
+
import { u as R } from "./useDetectMobile-B0Jog4jQ.js";
|
|
6
|
+
import { t as N, n as z, c as M, g as P } from "./utils-MoGhNMmj.js";
|
|
7
7
|
import { useTheme as j } from "./ThemeProvider.js";
|
|
8
|
-
import { P as
|
|
9
|
-
import {
|
|
10
|
-
const
|
|
8
|
+
import { P as L } from "./index-DEypPQRI.js";
|
|
9
|
+
import { S as W, e as A, d as E, a as f } from "./style-BFPpppS9.js";
|
|
10
|
+
const F = n.div`
|
|
11
11
|
display: flex;
|
|
12
12
|
flex-direction: column;
|
|
13
13
|
color: var(--darkest-950);
|
|
@@ -17,28 +17,28 @@ const I = d.div`
|
|
|
17
17
|
font-weight: 600;
|
|
18
18
|
font-size: 1.5rem;
|
|
19
19
|
}
|
|
20
|
-
`,
|
|
20
|
+
`, I = n.div`
|
|
21
21
|
display: grid;
|
|
22
22
|
grid-template-columns: ${(t) => `repeat(${t.limit}, minmax(0, 1fr))`};
|
|
23
23
|
gap: 1.25rem;
|
|
24
24
|
|
|
25
|
-
@media ${
|
|
25
|
+
@media ${u("M")} {
|
|
26
26
|
grid-template-columns: repeat(2, 1fr);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
@media ${
|
|
29
|
+
@media ${u("S")} {
|
|
30
30
|
grid-template-columns: repeat(2, 1fr);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
@media ${
|
|
33
|
+
@media ${u("XS")} {
|
|
34
34
|
grid-template-columns: repeat(1, 1fr);
|
|
35
35
|
}
|
|
36
|
-
`,
|
|
36
|
+
`, T = n.a`
|
|
37
37
|
padding-top: 5rem;
|
|
38
38
|
overflow: hidden;
|
|
39
39
|
text-decoration: none;
|
|
40
40
|
color: var(--gray-950);
|
|
41
|
-
`,
|
|
41
|
+
`, x = n.div`
|
|
42
42
|
position: relative;
|
|
43
43
|
cursor: pointer;
|
|
44
44
|
display: flex;
|
|
@@ -70,11 +70,11 @@ const I = d.div`
|
|
|
70
70
|
font-size: 1.375rem;
|
|
71
71
|
font-weight: 600;
|
|
72
72
|
color: var(--gray-950, #14161a);
|
|
73
|
-
${
|
|
73
|
+
${N()}
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
& .cont-text {
|
|
77
|
-
${
|
|
77
|
+
${z(2)}
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
|
|
@@ -94,15 +94,15 @@ const I = d.div`
|
|
|
94
94
|
box-shadow: 0px 10px 15px -3px rgba(0, 0, 0, 0.1),
|
|
95
95
|
0px 4px 6px -2px rgba(0, 0, 0, 0.05);
|
|
96
96
|
}
|
|
97
|
-
`,
|
|
97
|
+
`, b = (t, o) => P(
|
|
98
98
|
t.theme,
|
|
99
99
|
"StarRating",
|
|
100
100
|
t.color,
|
|
101
101
|
t.disabled === !0 ? "disabled" : "enabled",
|
|
102
|
-
|
|
103
|
-
),
|
|
104
|
-
font-size: ${(t) =>
|
|
105
|
-
line-height: ${(t) =>
|
|
102
|
+
o
|
|
103
|
+
), V = n.div`
|
|
104
|
+
font-size: ${(t) => b(t, "fontSize")};
|
|
105
|
+
line-height: ${(t) => b(t, "lineHeight")};
|
|
106
106
|
line-height: 1.5rem;
|
|
107
107
|
width: fit-content;
|
|
108
108
|
display: flex;
|
|
@@ -121,7 +121,7 @@ const I = d.div`
|
|
|
121
121
|
line-height: 1.5rem;
|
|
122
122
|
color: ${(t) => t.color};
|
|
123
123
|
}
|
|
124
|
-
`,
|
|
124
|
+
`, q = n.span`
|
|
125
125
|
position: absolute;
|
|
126
126
|
z-index: 1;
|
|
127
127
|
display: block;
|
|
@@ -130,212 +130,150 @@ const I = d.div`
|
|
|
130
130
|
overflow: hidden;
|
|
131
131
|
width: ${(t) => t.width}%;
|
|
132
132
|
|
|
133
|
-
color: ${(t) =>
|
|
133
|
+
color: ${(t) => M(
|
|
134
134
|
t.theme,
|
|
135
135
|
"StarRating",
|
|
136
136
|
t.color,
|
|
137
137
|
t.disabled === !0 ? "disabled" : "enabled",
|
|
138
138
|
"filledColor"
|
|
139
139
|
)};
|
|
140
|
-
`, D =
|
|
140
|
+
`, D = n.span`
|
|
141
141
|
padding: 0;
|
|
142
142
|
display: block;
|
|
143
143
|
z-index: 0;
|
|
144
144
|
color: ${(t) => t.color};
|
|
145
|
-
`,
|
|
145
|
+
`, G = w((t, o) => {
|
|
146
146
|
const {
|
|
147
|
-
rating:
|
|
147
|
+
rating: a = 0,
|
|
148
148
|
reviewCount: i = null,
|
|
149
|
-
disabled:
|
|
150
|
-
tabIndex:
|
|
151
|
-
className:
|
|
152
|
-
style:
|
|
153
|
-
color:
|
|
154
|
-
size:
|
|
155
|
-
} = t, { theme: e } = j(),
|
|
149
|
+
disabled: l = !1,
|
|
150
|
+
tabIndex: s = 0,
|
|
151
|
+
className: h = "",
|
|
152
|
+
style: m = {},
|
|
153
|
+
color: d = "primary",
|
|
154
|
+
size: g = "large"
|
|
155
|
+
} = t, { theme: e } = j(), c = {
|
|
156
156
|
theme: e,
|
|
157
|
-
color:
|
|
158
|
-
size:
|
|
159
|
-
style:
|
|
160
|
-
disabled:
|
|
161
|
-
},
|
|
162
|
-
return /* @__PURE__ */
|
|
163
|
-
|
|
157
|
+
color: d,
|
|
158
|
+
size: g,
|
|
159
|
+
style: m,
|
|
160
|
+
disabled: l
|
|
161
|
+
}, $ = a / 5 * 100;
|
|
162
|
+
return /* @__PURE__ */ p(
|
|
163
|
+
V,
|
|
164
164
|
{
|
|
165
|
-
ref:
|
|
166
|
-
tabIndex:
|
|
167
|
-
...
|
|
168
|
-
className: `star-rating ${
|
|
165
|
+
ref: o,
|
|
166
|
+
tabIndex: s,
|
|
167
|
+
...c,
|
|
168
|
+
className: `star-rating ${h}`,
|
|
169
169
|
children: [
|
|
170
|
-
/* @__PURE__ */
|
|
170
|
+
/* @__PURE__ */ p("div", { className: "rating", children: [
|
|
171
171
|
/* @__PURE__ */ r(
|
|
172
|
-
|
|
172
|
+
q,
|
|
173
173
|
{
|
|
174
174
|
className: "filled-stars",
|
|
175
|
-
...
|
|
176
|
-
width:
|
|
175
|
+
...c,
|
|
176
|
+
width: $,
|
|
177
177
|
children: "★★★★★"
|
|
178
178
|
}
|
|
179
179
|
),
|
|
180
|
-
/* @__PURE__ */ r(D, { ...
|
|
180
|
+
/* @__PURE__ */ r(D, { ...c, children: "★★★★★" })
|
|
181
181
|
] }),
|
|
182
182
|
!isNaN(i) && Number.isFinite(i) && /* @__PURE__ */ r("div", { className: "review-count", children: `(${i.toLocaleString()})` })
|
|
183
183
|
]
|
|
184
184
|
}
|
|
185
185
|
);
|
|
186
|
-
}),
|
|
186
|
+
}), H = w((t, o) => {
|
|
187
187
|
const {
|
|
188
|
-
image:
|
|
188
|
+
image: a,
|
|
189
189
|
text: i,
|
|
190
|
-
title:
|
|
191
|
-
link:
|
|
192
|
-
rating:
|
|
193
|
-
onSelectCard:
|
|
190
|
+
title: l,
|
|
191
|
+
link: s,
|
|
192
|
+
rating: h,
|
|
193
|
+
onSelectCard: m = () => {
|
|
194
194
|
},
|
|
195
|
-
LinkComponent:
|
|
195
|
+
LinkComponent: d
|
|
196
196
|
} = t;
|
|
197
197
|
return /* @__PURE__ */ r(
|
|
198
|
-
|
|
198
|
+
T,
|
|
199
199
|
{
|
|
200
|
-
ref:
|
|
200
|
+
ref: o,
|
|
201
201
|
className: "review-card",
|
|
202
|
-
onClick:
|
|
203
|
-
as:
|
|
204
|
-
...
|
|
205
|
-
to: `/${
|
|
202
|
+
onClick: m,
|
|
203
|
+
as: d || "a",
|
|
204
|
+
...d ? {
|
|
205
|
+
to: `/${s}`
|
|
206
206
|
} : {
|
|
207
|
-
href: `/${
|
|
207
|
+
href: `/${s}`
|
|
208
208
|
},
|
|
209
|
-
children: /* @__PURE__ */
|
|
210
|
-
/* @__PURE__ */ r(
|
|
211
|
-
/* @__PURE__ */
|
|
212
|
-
/* @__PURE__ */ r("span", { className: "cont-title", children:
|
|
209
|
+
children: /* @__PURE__ */ p(x, { children: [
|
|
210
|
+
/* @__PURE__ */ r(L, { src: a }),
|
|
211
|
+
/* @__PURE__ */ p("div", { className: "cont", children: [
|
|
212
|
+
/* @__PURE__ */ r("span", { className: "cont-title", children: l }),
|
|
213
213
|
/* @__PURE__ */ r("div", { className: "cont-text", children: i })
|
|
214
214
|
] }),
|
|
215
|
-
/* @__PURE__ */ r(
|
|
215
|
+
/* @__PURE__ */ r(G, { color: "warning", rating: h })
|
|
216
216
|
] })
|
|
217
217
|
}
|
|
218
218
|
);
|
|
219
|
-
}),
|
|
220
|
-
@media ${
|
|
219
|
+
}), X = n(W)`
|
|
220
|
+
@media ${u("S")} {
|
|
221
221
|
flex-direction: column;
|
|
222
222
|
|
|
223
223
|
& > div {
|
|
224
224
|
flex-direction: column;
|
|
225
|
-
|
|
226
|
-
& > div {
|
|
227
|
-
${E}
|
|
228
|
-
}
|
|
229
225
|
}
|
|
230
226
|
}
|
|
231
|
-
`,
|
|
232
|
-
/* @__PURE__ */
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
borderRadius: "0.75rem"
|
|
239
|
-
}
|
|
240
|
-
),
|
|
241
|
-
/* @__PURE__ */ r(o, { height: "2rem", borderRadius: "0.75rem" }),
|
|
242
|
-
/* @__PURE__ */ r(o, { height: "1rem", borderRadius: "0.75rem" }),
|
|
243
|
-
/* @__PURE__ */ r(o, { height: "1rem", borderRadius: "0.75rem" }),
|
|
244
|
-
/* @__PURE__ */ r(
|
|
245
|
-
o,
|
|
246
|
-
{
|
|
247
|
-
height: "1rem",
|
|
248
|
-
borderRadius: "0.75rem",
|
|
249
|
-
width: "6rem"
|
|
250
|
-
}
|
|
251
|
-
)
|
|
252
|
-
] }, `${t}-1`),
|
|
253
|
-
/* @__PURE__ */ a(b, { noGradient: !0, children: [
|
|
254
|
-
/* @__PURE__ */ r(
|
|
255
|
-
w,
|
|
256
|
-
{
|
|
257
|
-
height: "6.25rem",
|
|
258
|
-
width: "6.25rem",
|
|
259
|
-
borderRadius: "0.75rem"
|
|
260
|
-
}
|
|
261
|
-
),
|
|
262
|
-
/* @__PURE__ */ r(o, { height: "2rem", borderRadius: "0.75rem" }),
|
|
263
|
-
/* @__PURE__ */ r(o, { height: "1rem", borderRadius: "0.75rem" }),
|
|
264
|
-
/* @__PURE__ */ r(o, { height: "1rem", borderRadius: "0.75rem" }),
|
|
265
|
-
/* @__PURE__ */ r(
|
|
266
|
-
o,
|
|
267
|
-
{
|
|
268
|
-
height: "1rem",
|
|
269
|
-
borderRadius: "0.75rem",
|
|
270
|
-
width: "6rem"
|
|
271
|
-
}
|
|
272
|
-
)
|
|
273
|
-
] }, `${t}-2`),
|
|
274
|
-
/* @__PURE__ */ a(b, { noGradient: !0, children: [
|
|
275
|
-
/* @__PURE__ */ r(
|
|
276
|
-
w,
|
|
277
|
-
{
|
|
278
|
-
height: "6.25rem",
|
|
279
|
-
width: "6.25rem",
|
|
280
|
-
borderRadius: "0.75rem"
|
|
281
|
-
}
|
|
282
|
-
),
|
|
283
|
-
/* @__PURE__ */ r(o, { height: "2rem", borderRadius: "0.75rem" }),
|
|
284
|
-
/* @__PURE__ */ r(o, { height: "1rem", borderRadius: "0.75rem" }),
|
|
285
|
-
/* @__PURE__ */ r(o, { height: "1rem", borderRadius: "0.75rem" }),
|
|
286
|
-
/* @__PURE__ */ r(
|
|
287
|
-
o,
|
|
288
|
-
{
|
|
289
|
-
height: "1rem",
|
|
290
|
-
borderRadius: "0.75rem",
|
|
291
|
-
width: "6rem"
|
|
292
|
-
}
|
|
293
|
-
)
|
|
294
|
-
] }, `${t}-3`)
|
|
295
|
-
] }), K = ({
|
|
227
|
+
`, B = ({ keyPrefix: t }) => /* @__PURE__ */ r(X, { children: [1, 2, 3].map((o) => /* @__PURE__ */ p(A, { children: [
|
|
228
|
+
/* @__PURE__ */ r(E, { size: "6.25rem" }),
|
|
229
|
+
/* @__PURE__ */ r(f, { width: "100%", height: "2rem", borderRadius: "0.75rem" }),
|
|
230
|
+
/* @__PURE__ */ r(f, { width: "100%", height: "1rem", borderRadius: "0.75rem" }),
|
|
231
|
+
/* @__PURE__ */ r(f, { width: "100%", height: "1rem", borderRadius: "0.75rem" }),
|
|
232
|
+
/* @__PURE__ */ r(f, { height: "1rem", borderRadius: "0.75rem", width: "6rem" })
|
|
233
|
+
] }, `${t}-${o}`)) }), J = ({
|
|
296
234
|
keyPrefix: t,
|
|
297
|
-
isLoading:
|
|
298
|
-
fallbackComponent:
|
|
235
|
+
isLoading: o = !1,
|
|
236
|
+
fallbackComponent: a = /* @__PURE__ */ r(S, {}),
|
|
299
237
|
children: i
|
|
300
|
-
}) => /* @__PURE__ */ r(C, { fallbackComponent:
|
|
238
|
+
}) => /* @__PURE__ */ r(C, { fallbackComponent: a, children: o === !0 ? /* @__PURE__ */ r(B, { keyPrefix: t }) : i }), v = k(H), re = w((t, o) => {
|
|
301
239
|
const {
|
|
302
|
-
title:
|
|
240
|
+
title: a = "Electronics reviews",
|
|
303
241
|
items: i,
|
|
304
|
-
limit:
|
|
305
|
-
onSelectCard:
|
|
242
|
+
limit: l = 3,
|
|
243
|
+
onSelectCard: s = () => {
|
|
306
244
|
},
|
|
307
|
-
isLoading:
|
|
308
|
-
LinkComponent:
|
|
309
|
-
} = t,
|
|
310
|
-
|
|
245
|
+
isLoading: h = !1,
|
|
246
|
+
LinkComponent: m
|
|
247
|
+
} = t, d = R(), g = y(() => /* @__PURE__ */ r(S, { children: d === !0 ? i == null ? void 0 : i.map((e, c) => /* @__PURE__ */ r(
|
|
248
|
+
v,
|
|
311
249
|
{
|
|
312
250
|
text: e == null ? void 0 : e.text,
|
|
313
251
|
title: e == null ? void 0 : e.title,
|
|
314
252
|
image: e == null ? void 0 : e.image,
|
|
315
253
|
link: e == null ? void 0 : e.link,
|
|
316
254
|
rating: e == null ? void 0 : e.ratingArithmeticMean,
|
|
317
|
-
onSelectCard: () =>
|
|
318
|
-
LinkComponent:
|
|
255
|
+
onSelectCard: () => s(e),
|
|
256
|
+
LinkComponent: m
|
|
319
257
|
},
|
|
320
|
-
|
|
321
|
-
)) : i == null ? void 0 : i.slice(0,
|
|
322
|
-
|
|
258
|
+
c
|
|
259
|
+
)) : i == null ? void 0 : i.slice(0, l).map((e, c) => /* @__PURE__ */ r(
|
|
260
|
+
v,
|
|
323
261
|
{
|
|
324
262
|
text: e == null ? void 0 : e.text,
|
|
325
263
|
title: e == null ? void 0 : e.title,
|
|
326
264
|
image: e == null ? void 0 : e.image,
|
|
327
265
|
link: e == null ? void 0 : e.link,
|
|
328
266
|
rating: e == null ? void 0 : e.ratingArithmeticMean,
|
|
329
|
-
onSelectCard: () =>
|
|
330
|
-
LinkComponent:
|
|
267
|
+
onSelectCard: () => s(e),
|
|
268
|
+
LinkComponent: m
|
|
331
269
|
},
|
|
332
|
-
|
|
333
|
-
)) }), [i,
|
|
334
|
-
return /* @__PURE__ */
|
|
335
|
-
/* @__PURE__ */ r("div", { className: "container-title", children:
|
|
336
|
-
/* @__PURE__ */ r(
|
|
270
|
+
c
|
|
271
|
+
)) }), [i, d, l]);
|
|
272
|
+
return /* @__PURE__ */ p(F, { ref: o, children: [
|
|
273
|
+
/* @__PURE__ */ r("div", { className: "container-title", children: a }),
|
|
274
|
+
/* @__PURE__ */ r(J, { isLoading: h, keyPrefix: "reviews-skeleton", children: /* @__PURE__ */ r(I, { limit: l, children: g }) })
|
|
337
275
|
] });
|
|
338
276
|
});
|
|
339
277
|
export {
|
|
340
|
-
|
|
278
|
+
re as default
|
|
341
279
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const r=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),s=require("react"),S=require("./emotion-styled.browser.esm-DwHBgTPn.cjs"),x=require("./utils-CITgSxXe.cjs"),N=require("./breakpoints-CcVm-gVm.cjs"),me=require("./Icon.cjs"),ce=require("./ShopAvatar-CV3lj34D.cjs"),$e=require("./Badge.cjs"),fe=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),de=require("./IconButton.cjs"),he=require("./useDetectMobile-DYV6V1yw.cjs"),_e=require("./index-DMbNpyIV.cjs"),ke=require("./motion-B_VPZaJq.cjs"),w=require("./style-CQdEALKR.cjs"),Ce=S.styled.a`
|
|
2
2
|
text-decoration: none;
|
|
3
3
|
color: var(--gray-950);
|
|
4
4
|
cursor: pointer;
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
`,Ie=
|
|
45
|
-
border-radius: ${n=>
|
|
44
|
+
`,Ie=S.styled.div`
|
|
45
|
+
border-radius: ${n=>x.getBorderRadiusValueWithUnits(n.theme,"edged")};
|
|
46
46
|
cursor: pointer;
|
|
47
47
|
|
|
48
48
|
position: relative;
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
@media ${N.down("S")} {
|
|
66
66
|
width: 14.5rem;
|
|
67
67
|
}
|
|
68
|
-
`,Ne=
|
|
68
|
+
`,Ne=S.styled.div`
|
|
69
69
|
flex: 1;
|
|
70
70
|
display: flex;
|
|
71
71
|
flex-direction: column;
|
|
@@ -179,7 +179,7 @@
|
|
|
179
179
|
${t?"":"flex-wrap: nowrap;"}
|
|
180
180
|
${n?"align-items: center;":""}
|
|
181
181
|
${a?"justify-content: center;":""}
|
|
182
|
-
`,De=
|
|
182
|
+
`,De=S.styled.a`
|
|
183
183
|
text-decoration: none;
|
|
184
184
|
color: var(--gray-950);
|
|
185
185
|
${n=>n.hasPermission===!0&&"cursor: pointer"};
|
|
@@ -203,7 +203,7 @@
|
|
|
203
203
|
font-weight: 500;
|
|
204
204
|
font-size: 1rem;
|
|
205
205
|
line-height: 1.5rem;
|
|
206
|
-
border-radius: ${n=>
|
|
206
|
+
border-radius: ${n=>x.getBorderRadiusValueWithUnits(n.theme,"slight")};
|
|
207
207
|
transition: all 0.25s ease;
|
|
208
208
|
& .description {
|
|
209
209
|
font-size: 0.85rem;
|
|
@@ -255,14 +255,14 @@
|
|
|
255
255
|
padding: 0;
|
|
256
256
|
font-size: 0.875rem;
|
|
257
257
|
}
|
|
258
|
-
`,
|
|
258
|
+
`,ze=S.styled.div`
|
|
259
259
|
position: absolute;
|
|
260
260
|
top: 0.5rem;
|
|
261
261
|
${n=>n.alignToLeft===!0?"left: 0.5rem;":"right: 0.5rem;"}
|
|
262
262
|
display: flex;
|
|
263
263
|
gap: 0.25rem;
|
|
264
|
-
`,
|
|
265
|
-
border-radius: ${n=>
|
|
264
|
+
`,Te=S.styled.div`
|
|
265
|
+
border-radius: ${n=>x.getBorderRadiusValueWithUnits(n.theme,n.borderRadius||"slight")};
|
|
266
266
|
background-color: ${n=>n==null?void 0:n.color};
|
|
267
267
|
color: white;
|
|
268
268
|
height: 1.5rem;
|
|
@@ -277,7 +277,7 @@
|
|
|
277
277
|
& i {
|
|
278
278
|
font-size: 0.813rem;
|
|
279
279
|
}
|
|
280
|
-
`,
|
|
280
|
+
`,Re=s.forwardRef(({src:n,...t},a)=>{const o=s.useRef();return s.useEffect(()=>{var m;const i=f=>{f.target.src=ce.DefaultShopImage,f.onerror=null};return(m=o==null?void 0:o.current)==null||m.addEventListener("error",i),()=>{var f;(f=o==null?void 0:o.current)==null||f.removeEventListener("error",i)}},[]),r.jsx(s.Fragment,{ref:a,children:x.isDefinedNotEmptyString(n)?r.jsx("img",{ref:o,src:n,...t}):r.jsx("img",{src:ce.DefaultShopImage,...t})})}),Pe=n=>{const{uuid:t,hasPermission:a=!0,isUser:o,image:i,imageComponent:m,name:f,notifications:j=0,color:l="primary",size:h="large",style:c,disabled:k,onClick:u=()=>{},isActive:D,className:v,shopCategory:y,themeData:$,LinkComponent:C}=n,z=C||"a",p={theme:fe.useTheme(),color:l,size:h,style:c,disabled:k};return s.createElement(De,{onClick:g=>{g==null||g.preventDefault(),g.stopPropagation(),a===!0&&(u==null||u())},...p,key:f,className:`profile-item ${v}`,hasPermission:a,isActive:D,themeColor:($==null?void 0:$.code)||"transparent",as:z,...C?{to:`/${o?"user":"shop"}/${t}`}:{href:`/${o?"user":"shop"}/${t}`}},r.jsx("div",{className:"logo-wrapper",children:x.isDefined(m)?m:i}),r.jsxs("div",{children:[r.jsx("div",{className:"name",children:f}),!o&&r.jsx("div",{className:"description",children:y}),j>0&&r.jsx("div",{className:"notifications-number",children:r.jsx($e,{className:"badge",color:"danger",size:"small",children:j>99?"99+":j})})]}))},ue=n=>{if(n!==void 0){const t=new Date(n),a=t.getFullYear(),o=t.getMonth()+1;return`${String(t.getDate()).padStart(2)}. ${o}. ${a}.`}},Ee=s.forwardRef((n,t)=>{var le;const a=fe.useTheme(),{uuid:o,shopUuid:i,title:m="",coverPhoto:f,onSelect:j,startDate:l,endDate:h,salesPackages:c,shopName:k,shopCategory:u,shopImage:D,shopImageComponent:v,className:y,onSelectCard:$=()=>{},onSelectShop:C=()=>{},upcoming:z=!1,upcomingCampaignText:d,campaignSingleText:p,salesCampaignTypes:g=[],startsInPrefixTextPlural:V,startsinSuffixTextPlural:W,startsInPrefixTextSingular:A,startsinSuffixTextSingular:F,endsInPrefixTextPlural:H,endsinSuffixTextPlural:Y,endsInPrefixTextSingular:L,endsinSuffixTextSingular:Z,endedText:G,themeData:re,numberOfListings:T,numberOfListingsTextSingular:J,numberOfListingsTextPlural:q,metadata:e,LinkComponent:M,sponsored:te,...K}=n,pe=M||"a",oe=s.useRef(),U=x.getDayNumberPrecise(l,h),Q=U!==-1&&(U==null?void 0:U.isEnded)===!0,X=U!==-1&&!Q,ee=x.calcDaysUntil(l),P=x.calcDaysRemaining(h),xe=P!==null&&P<=2&&P>0,ae=x.normalizeDate(h),se=ae?new Date(ae):null,be=new Date,ne=se?se.getTime()-be.getTime():null,O=ne!==null&&ne>0&&ne<24*60*60*1e3,ie=(b,E,I,_,R)=>I===1?`${b} ${I} ${_}`:`${E} ${I} ${R}`,we=()=>{if(!h)return null;const b=x.normalizeDate(h),E=b?new Date(b):null;if(!E)return null;const I=ve,_=E.getTime()-I.getTime();if(_<=0)return null;const R=Math.floor(_/(1e3*60*60)),Se=Math.floor(_%(1e3*60*60)/(1e3*60)),je=Math.floor(_%(1e3*60)/1e3);return{hours:R,minutes:Se,seconds:je}},[ve,ye]=s.useState(new Date);s.useEffect(()=>{if(!O)return;const b=setInterval(()=>{ye(new Date)},1e3);return()=>clearInterval(b)},[O]);const B=O?we():null;return r.jsxs(Ce,{ref:oe,theme:a,className:y,name:e==null?void 0:e.name,"data-accessor":e==null?void 0:e.accessor,onClick:b=>$(b,oe),as:pe,...M?{to:`/shop/${i}/campaign/${o}`}:{href:`/shop/${i}/campaign/${o}`},sponsored:te,...K,children:[r.jsxs(Ie,{theme:a,children:[r.jsx("img",{src:f}),r.jsx(ze,{children:c==null?void 0:c.map((b,E)=>{var I,_;return r.jsx(Te,{color:(I=g==null?void 0:g.find(R=>R.value===b))==null?void 0:I.color,theme:a,children:r.jsx(me,{icon:(_=g==null?void 0:g.find(R=>R.value===b))==null?void 0:_.icon})},`package__${E}`)})})]}),r.jsxs(Ne,{theme:a,children:[r.jsx("div",{className:"text-block-wrapper",children:r.jsxs("div",{className:"title-block-wrapper",children:[r.jsx("div",{className:"campaign-title",children:(le=z?d:p)==null?void 0:le.toUpperCase()}),r.jsx("div",{className:"campaign-title-text",children:m}),h&&l&&r.jsxs("div",{className:"campaign-date",children:[ue(l)," - ",ue(h)]}),r.jsxs("div",{className:"timestamp-text",children:[T>0&&r.jsxs("span",{className:"listings-text",children:[T," ",T===1?J:q," ","∙"," "]}),r.jsx("span",{className:`duration-text ${xe?"urgent":""} ${X?"":"starts-in"}`,children:O&&B?r.jsxs("div",{className:"countdown-timer",children:[L," ",B.hours.toString().padStart(2,"0"),":",B.minutes.toString().padStart(2,"0"),":",B.seconds.toString().padStart(2,"0")]}):X&&!Q&&P!==null&&P>0?ie(L,H,P,Z,Y):Q?G||"Završena":!X&&ee!==null&&ee>0?ie(A,V,ee,F,W):null})]})]})}),r.jsx(Pe,{hasPermission:!0,image:r.jsx(Re,{src:D}),imageComponent:v,themeData:re,isActive:!0,isUser:!1,name:k,shopCategory:u,uuid:i,onClick:()=>C(i)})]})]})}),Ue=S.styled.div`
|
|
281
281
|
margin: 0 auto;
|
|
282
282
|
display: flex;
|
|
283
283
|
flex-direction: column;
|
|
@@ -340,7 +340,7 @@
|
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
|
-
`,
|
|
343
|
+
`,Le=S.styled(ke.motion.div)`
|
|
344
344
|
display: grid;
|
|
345
345
|
grid-template-columns: repeat(${n=>n==null?void 0:n.numOfColumns}, 1fr);
|
|
346
346
|
gap: 1.5rem;
|
|
@@ -372,7 +372,7 @@
|
|
|
372
372
|
/* Safari and Chrome */
|
|
373
373
|
}
|
|
374
374
|
}
|
|
375
|
-
`,qe=
|
|
375
|
+
`,qe=s.forwardRef(({icon:n,title:t,numOfSlides:a=4,tabletNumOfSlides:o,showNavigation:i=!0,hasNextPage:m=!1,className:f="",handleFetchNextPage:j=()=>{},children:l},h)=>{const[c,k]=s.useState(0),[u,D]=s.useState(1),v=he.useDetectMobile(),y=(l==null?void 0:l.length)??1;s.useEffect(()=>{const d=()=>{D(a)};return window.addEventListener("resize",d),d(),()=>window.removeEventListener("resize",d)},[]);const $=v?l:l==null?void 0:l.slice(c,c+u),C=d=>{var g;(g=d==null?void 0:d.target)==null||g.blur();const p=c+u;p<y&&k(p),p+u>=y&&m&&j()},z=d=>{var p;(p=d==null?void 0:d.target)==null||p.blur(),c-u>=0&&k(c-u)};return r.jsxs(Ue,{ref:h,className:f,children:[r.jsx("div",{className:"scrollable-section__header",children:r.jsxs("div",{className:"scrollable-section__title",children:[x.isDefinedNotEmptyString(n)&&r.jsx(me,{icon:n,color:"primary",sizeInUnits:"1.5rem",className:"title__icon"}),x.isDefinedNotEmptyString(t)&&r.jsxs("div",{className:"title__text",children:[" ",t]})]})}),r.jsxs(Le,{numOfColumns:a,tabletNumOfColumns:o,...!v&&{animate:{x:0,opacity:1},initial:{x:10,opacity:0}},className:"scrollable-section__content",children:[$,v&&m&&r.jsx(_e.InfiniteScrollEndElement,{onIsVisible:j})]},`scrollable-section__content-${c}`),i&&y>u&&!v&&r.jsxs("div",{className:"scrollable-section__navigation",children:[r.jsx(de,{icon:"angle-left",borderRadius:"curved",btnType:"tinted",color:"neutral",className:"navigation__arrow",disabled:c===0,onClick:z}),r.jsx(de,{icon:"angle-right",borderRadius:"curved",btnType:"tinted",color:"neutral",className:"navigation__arrow",disabled:c+u>=y,onClick:C})]})]})}),Me=S.styled.div`
|
|
376
376
|
display: flex;
|
|
377
377
|
flex: 1;
|
|
378
378
|
width: 100%;
|
|
@@ -389,7 +389,7 @@
|
|
|
389
389
|
border-radius: 1.25rem;
|
|
390
390
|
object-fit: cover;
|
|
391
391
|
}
|
|
392
|
-
`,
|
|
392
|
+
`,Oe=s.forwardRef(({sectionName:n,imageUrl:t,maxHeight:a="16.25rem",className:o="",handleClick:i=()=>{}},m)=>r.jsx(Me,{ref:m,maxHeight:a,onClick:i,className:`itemless-banner ${o}`,children:r.jsx("img",{src:t,alt:`itemless-banner__${n}`})})),Be=S.styled(w.SkeletonAnimationContainer)`
|
|
393
393
|
@media ${N.down("S")} {
|
|
394
394
|
flex-direction: column;
|
|
395
395
|
|
|
@@ -404,4 +404,4 @@
|
|
|
404
404
|
}
|
|
405
405
|
}
|
|
406
406
|
}
|
|
407
|
-
`,
|
|
407
|
+
`,Ve=({keyPrefix:n})=>r.jsx(Be,{children:[1,2].map(t=>r.jsxs(w.SkeletonContainer,{children:[r.jsx(w.SkeletonSquare,{size:"13.75rem",className:"skeleton__image"}),r.jsxs(w.SkeletonColumnContainer,{children:[r.jsx(w.SkeletonRect,{width:"100%",height:"1rem"}),r.jsx(w.SkeletonRect,{width:"100%",height:"1.75rem"}),r.jsx(w.SkeletonRect,{width:"100%",height:"1.25rem"}),r.jsx(w.SkeletonRect,{width:"100%",height:"2rem"}),r.jsxs(w.SkeletonContainer,{alignItems:"center",children:[r.jsx(w.SkeletonCircle,{size:"2.5rem"}),r.jsx(w.SkeletonRect,{width:"5rem",height:"1.25rem"})]})]})]},`${n}-${t}`))}),We=({keyPrefix:n,isLoading:t=!1,fallbackComponent:a=r.jsx(r.Fragment,{}),children:o})=>r.jsx(s.Suspense,{fallbackComponent:a,children:t===!0?r.jsx(Ve,{keyPrefix:n}):o}),Ae=s.memo(Ee),Fe=s.forwardRef(({sellerType:n="Shop",items:t=[],title:a,icon:o,isLoading:i,onSelectCard:m=()=>{},onSelectShop:f=()=>{},getImage:j=()=>{},campaignSingleText:l,upcomingCampaignText:h,salesCampaignTypes:c=[],startsInPrefixTextPlural:k,startsinSuffixTextPlural:u,startsInPrefixTextSingular:D,startsinSuffixTextSingular:v,endsInPrefixTextPlural:y,endsinSuffixTextPlural:$,endsInPrefixTextSingular:C,endsinSuffixTextSingular:z,endedText:d,numOfSlides:p=4,showNavigation:g=!0,numberOfListingsTextSingular:V,numberOfListingsTextPlural:W,itemlessImageUrl:A,itemlessMaxHeight:F,handleItemlessLink:H=()=>{},componentName:Y,hasNextPage:L=!1,handleFetchNextPage:Z=()=>{},LinkComponent:G},re)=>{const T=he.useDetectMobile(),J=s.useMemo(()=>{let q=t==null?void 0:t.map((e,M)=>r.jsx(Ae,{className:`campaign-item ${(t==null?void 0:t.length)===1?"horizontal-campaign-item":""}`,coverPhoto:j(e==null?void 0:e.coverPhoto,(e==null?void 0:e.uuid)||(e==null?void 0:e.campaignUuid)),description:e==null?void 0:e.description,endDate:e==null?void 0:e.endDate,salesPackages:e==null?void 0:e.salesPackages,sellerType:n,shopImage:e==null?void 0:e.profileImage,shopImageComponent:e==null?void 0:e.profileImageComponent,shopName:e==null?void 0:e.shopName,shopUuid:e==null?void 0:e.shopUuid,shopCategory:e==null?void 0:e.shopCategory,startDate:e==null?void 0:e.startDate,title:e==null?void 0:e.name,uuid:e==null?void 0:e.campaignUuid,onSelectCard:(te,K)=>m(e==null?void 0:e.campaignUuid,e==null?void 0:e.shopUuid,K),onSelectShop:()=>f(e==null?void 0:e.shopUuid),campaignSingleText:l,upcomingCampaignText:h,upcoming:e==null?void 0:e.upcoming,salesCampaignTypes:c,startsInPrefixTextPlural:k,startsinSuffixTextPlural:u,startsInPrefixTextSingular:D,startsinSuffixTextSingular:v,endsInPrefixTextPlural:y,endsinSuffixTextPlural:$,endsInPrefixTextSingular:C,endsinSuffixTextSingular:z,endedText:d,themeData:e==null?void 0:e.themeData,numberOfListings:e==null?void 0:e.numberOfListings,numberOfListingsTextSingular:V,numberOfListingsTextPlural:W,metadata:{name:Y,accessor:e==null?void 0:e.accessor},LinkComponent:G,sponsored:e==null?void 0:e.sponsored},`campaign__item__${M}__${e==null?void 0:e.startDate}___${e==null?void 0:e.endDate}`));return(t==null?void 0:t.length)<4&&!T?[...q,r.jsx(Oe,{imageUrl:A,className:"campaign-item",maxHeight:F,handleClick:H},"itemless-campaign-section-banner")]:q},[t]);return r.jsx(We,{isLoading:i,keyPrefix:"sales-campaign-skeleton",children:r.jsx(qe,{icon:o,title:a,numOfSlides:p,tabletNumOfSlides:2,showNavigation:g,hasNextPage:L,handleFetchNextPage:Z,className:(t==null?void 0:t.length)<4&&!T?"itemless":"",children:J},`sales-campaign-section__${T}`)})});module.exports=Fe;
|