@lanaco/lnc-react-ui 4.0.186 → 4.0.189
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 +4 -4
- package/dist/BannerSectionCarousel.js +150 -158
- package/dist/BlogCardsSponsoredSection.cjs +5 -5
- package/dist/BlogCardsSponsoredSection.js +55 -51
- package/dist/BlogCategoryCardsSection.cjs +1 -1
- package/dist/BlogCategoryCardsSection.js +1 -1
- package/dist/BlogExploreSection.cjs +5 -5
- package/dist/BlogExploreSection.js +182 -215
- package/dist/BlogListSection.cjs +6 -6
- package/dist/BlogListSection.js +134 -116
- package/dist/BlogProductCardsSection.cjs +1 -1
- package/dist/BlogProductCardsSection.js +26 -24
- package/dist/BlogShopCardsSection.cjs +1 -1
- package/dist/BlogShopCardsSection.js +1 -1
- package/dist/BlogSingleSection.cjs +3 -3
- package/dist/BlogSingleSection.js +21 -19
- package/dist/BlogsSectionDetailed.cjs +4 -4
- package/dist/BlogsSectionDetailed.js +81 -76
- package/dist/BlogsSectionLarge.cjs +6 -6
- package/dist/BlogsSectionLarge.js +34 -31
- package/dist/BlogsSectionSimple.cjs +8 -8
- package/dist/BlogsSectionSimple.js +68 -63
- package/dist/BlogsSectionSimpleCentered.cjs +9 -9
- package/dist/BlogsSectionSimpleCentered.js +67 -54
- package/dist/BlogsSectionWithFilters.cjs +9 -9
- package/dist/BlogsSectionWithFilters.js +98 -84
- package/dist/BrandHitsSection.cjs +7 -7
- package/dist/BrandHitsSection.js +50 -32
- package/dist/{CategorySimpleCard-DRQuoxXu.js → CategorySimpleCard-CEzArySG.js} +18 -17
- package/dist/{CategorySimpleCard-D5N8cx0Z.cjs → CategorySimpleCard-COGlTj06.cjs} +5 -5
- package/dist/DetailedProductsInfinitiveSection.cjs +4 -4
- package/dist/DetailedProductsInfinitiveSection.js +23 -21
- package/dist/DetailedProductsSection.cjs +3 -3
- package/dist/DetailedProductsSection.js +38 -35
- package/dist/FieldOfInterestsMasonrySection.cjs +12 -12
- package/dist/FieldOfInterestsMasonrySection.js +87 -83
- package/dist/FieldOfInterestsWithAvatarsCardsSection.cjs +7 -7
- package/dist/FieldOfInterestsWithAvatarsCardsSection.js +47 -43
- package/dist/FieldOfInterestsWithTagsCardsSection.cjs +6 -6
- package/dist/FieldOfInterestsWithTagsCardsSection.js +87 -62
- package/dist/GeneralWithTagsCardsSection.cjs +4 -4
- package/dist/GeneralWithTagsCardsSection.js +83 -46
- package/dist/GiftCardsSection.cjs +7 -7
- package/dist/GiftCardsSection.js +56 -47
- package/dist/MasonryGeneralCardsSection.cjs +9 -9
- package/dist/MasonryGeneralCardsSection.js +82 -68
- package/dist/OverlayGeneralCardsSection.cjs +5 -5
- package/dist/OverlayGeneralCardsSection.js +58 -50
- package/dist/ProductsWithBannerSection.cjs +10 -10
- package/dist/ProductsWithBannerSection.js +79 -70
- package/dist/QuattroCardsSection.cjs +8 -8
- package/dist/QuattroCardsSection.js +62 -40
- package/dist/ReviewsSection.cjs +8 -8
- package/dist/ReviewsSection.js +92 -67
- package/dist/SalesCampaignsSection.cjs +18 -18
- package/dist/SalesCampaignsSection.js +304 -298
- package/dist/ShopCardsSection.cjs +3 -3
- package/dist/ShopCardsSection.js +25 -23
- package/dist/SimpleCategoriesSection.cjs +4 -4
- package/dist/SimpleCategoriesSection.js +25 -22
- package/dist/SimpleProductsSection.cjs +3 -3
- package/dist/SimpleProductsSection.js +53 -50
- package/dist/UrgentSaleProductsSection.cjs +4 -4
- package/dist/UrgentSaleProductsSection.js +41 -38
- package/dist/{index-CA59z2ge.js → index-9inVkeN6.js} +46 -40
- package/dist/{index-C8QkdNHi.js → index-BB63Jo6p.js} +42 -36
- package/dist/{index-DHV9awrE.cjs → index-BFc3nxYZ.cjs} +3 -3
- package/dist/{index-MiN854X_.cjs → index-BWE-RCPy.cjs} +6 -6
- package/dist/index-Coo0aVuh.cjs +362 -0
- package/dist/{index-BipuzfLW.js → index-DMHtIdm-.js} +39 -29
- package/dist/{index-0p_3g3pT.cjs → index-D_5jNP-o.cjs} +3 -3
- package/dist/{index-DZ8515cZ.js → index-PhMLWAC1.js} +277 -172
- package/package.json +1 -1
- package/dist/index-Bmr3IeZ_.cjs +0 -308
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { s as
|
|
4
|
-
import { M as
|
|
5
|
-
import { u as
|
|
6
|
-
import { o as
|
|
7
|
-
import { T as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { P
|
|
11
|
-
import { S as
|
|
12
|
-
import { S as
|
|
13
|
-
const
|
|
1
|
+
import { jsxs as a, jsx as t, Fragment as _ } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as L, useRef as O, Suspense as j, memo as A, useMemo as E } from "react";
|
|
3
|
+
import { s as w } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
|
+
import { M as $ } from "./consts-BuFChS64.js";
|
|
5
|
+
import { u as U } from "./useDetectMobile-Bkvj0VMa.js";
|
|
6
|
+
import { o as D, k as C } from "./utils-Dc5zIpaz.js";
|
|
7
|
+
import { T as K } from "./style-C7FUSHmS.js";
|
|
8
|
+
import G from "./Button.js";
|
|
9
|
+
import H from "./Link.js";
|
|
10
|
+
import { P } from "./index-C_NnINik.js";
|
|
11
|
+
import { S as X } from "./index-BGiZlEQt.js";
|
|
12
|
+
import { S as Z, a as y, b as s } from "./style-CXMUA6cI.js";
|
|
13
|
+
const q = w.div`
|
|
14
14
|
display: grid;
|
|
15
15
|
grid-template-columns: ${(r) => `repeat(${r.limit}, minmax(0, 1fr))`};
|
|
16
16
|
gap: 1.25rem;
|
|
17
17
|
|
|
18
|
-
@media (max-width: ${
|
|
18
|
+
@media (max-width: ${$ + "px"}) {
|
|
19
19
|
grid-template-columns: repeat(1, 1fr);
|
|
20
20
|
}
|
|
21
|
-
`,
|
|
21
|
+
`, J = w.a`
|
|
22
22
|
text-decoration: none;
|
|
23
23
|
color: var(--gray-950);
|
|
24
24
|
display: flex;
|
|
@@ -51,9 +51,9 @@ const Z = f.div`
|
|
|
51
51
|
margin-top: auto;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
@media (max-width: ${
|
|
54
|
+
@media (max-width: ${$ + "px"}) {
|
|
55
55
|
}
|
|
56
|
-
`,
|
|
56
|
+
`, Q = w.div`
|
|
57
57
|
display: flex;
|
|
58
58
|
flex-direction: column;
|
|
59
59
|
gap: 0.5rem;
|
|
@@ -68,33 +68,44 @@ const Z = f.div`
|
|
|
68
68
|
font-weight: 400;
|
|
69
69
|
font-size: 0.875rem;
|
|
70
70
|
color: var(--gray-700, #4e555f);
|
|
71
|
-
${
|
|
71
|
+
${D(3)}
|
|
72
72
|
}
|
|
73
|
-
`,
|
|
74
|
-
const {
|
|
75
|
-
|
|
73
|
+
`, V = L((r, h) => {
|
|
74
|
+
const {
|
|
75
|
+
title: l,
|
|
76
|
+
imageUrl: m,
|
|
77
|
+
text: n,
|
|
78
|
+
buttonText: u,
|
|
79
|
+
onCardClick: c,
|
|
80
|
+
metadata: o,
|
|
81
|
+
link: d,
|
|
82
|
+
LinkComponent: g
|
|
83
|
+
} = r, f = g || "a", p = O(), b = (k) => {
|
|
84
|
+
c(k, p);
|
|
76
85
|
};
|
|
77
|
-
return /* @__PURE__ */
|
|
78
|
-
|
|
86
|
+
return /* @__PURE__ */ a(
|
|
87
|
+
J,
|
|
79
88
|
{
|
|
80
|
-
ref:
|
|
89
|
+
ref: p,
|
|
81
90
|
name: o == null ? void 0 : o.name,
|
|
82
91
|
"data-accessor": o == null ? void 0 : o.accessor,
|
|
83
92
|
className: "blog-card",
|
|
84
|
-
onClick:
|
|
85
|
-
|
|
93
|
+
onClick: b,
|
|
94
|
+
to: `/${d}`,
|
|
95
|
+
as: f,
|
|
96
|
+
...g ? { to: `/${d}` } : { href: `/${d}` },
|
|
86
97
|
children: [
|
|
87
|
-
/* @__PURE__ */
|
|
98
|
+
/* @__PURE__ */ a(Q, { children: [
|
|
88
99
|
/* @__PURE__ */ t("div", { className: "text-wr-title", children: l }),
|
|
89
|
-
/* @__PURE__ */ t("div", { className: "text-wr", children:
|
|
90
|
-
/* @__PURE__ */ t(
|
|
100
|
+
/* @__PURE__ */ t("div", { className: "text-wr", children: n }),
|
|
101
|
+
/* @__PURE__ */ t(H, { color: "gray", onClick: b, children: u })
|
|
91
102
|
] }),
|
|
92
|
-
/* @__PURE__ */ t(
|
|
103
|
+
/* @__PURE__ */ t(P, { src: m })
|
|
93
104
|
]
|
|
94
105
|
}
|
|
95
106
|
);
|
|
96
|
-
}),
|
|
97
|
-
@media (max-width: ${
|
|
107
|
+
}), Y = w(Z)`
|
|
108
|
+
@media (max-width: ${$ + "px"}) {
|
|
98
109
|
& .skeleton__tags {
|
|
99
110
|
& > div {
|
|
100
111
|
width: 100%;
|
|
@@ -116,8 +127,8 @@ const Z = f.div`
|
|
|
116
127
|
}
|
|
117
128
|
}
|
|
118
129
|
}
|
|
119
|
-
`,
|
|
120
|
-
/* @__PURE__ */
|
|
130
|
+
`, x = ({ keyPrefix: r }) => /* @__PURE__ */ a(Y, { children: [
|
|
131
|
+
/* @__PURE__ */ a(y, { className: "skeleton__tags", children: [
|
|
121
132
|
/* @__PURE__ */ t(
|
|
122
133
|
s,
|
|
123
134
|
{
|
|
@@ -146,7 +157,7 @@ const Z = f.div`
|
|
|
146
157
|
`${r}-3`
|
|
147
158
|
)
|
|
148
159
|
] }),
|
|
149
|
-
/* @__PURE__ */
|
|
160
|
+
/* @__PURE__ */ a(y, { className: "skeleton__cards", children: [
|
|
150
161
|
/* @__PURE__ */ t(
|
|
151
162
|
s,
|
|
152
163
|
{
|
|
@@ -172,100 +183,103 @@ const Z = f.div`
|
|
|
172
183
|
`${r}-6`
|
|
173
184
|
)
|
|
174
185
|
] })
|
|
175
|
-
] }),
|
|
186
|
+
] }), ee = ({
|
|
176
187
|
keyPrefix: r,
|
|
177
|
-
isLoading:
|
|
178
|
-
fallbackComponent: l = /* @__PURE__ */ t(
|
|
179
|
-
children:
|
|
180
|
-
}) => /* @__PURE__ */ t(
|
|
188
|
+
isLoading: h = !1,
|
|
189
|
+
fallbackComponent: l = /* @__PURE__ */ t(_, {}),
|
|
190
|
+
children: m
|
|
191
|
+
}) => /* @__PURE__ */ t(j, { fallbackComponent: l, children: h === !0 ? /* @__PURE__ */ t(x, { keyPrefix: r }) : m }), B = A(V), he = L((r, h) => {
|
|
181
192
|
const {
|
|
182
193
|
icon: l,
|
|
183
|
-
title:
|
|
184
|
-
items:
|
|
185
|
-
buttonText:
|
|
186
|
-
limit:
|
|
194
|
+
title: m,
|
|
195
|
+
items: n,
|
|
196
|
+
buttonText: u,
|
|
197
|
+
limit: c = 3,
|
|
187
198
|
options: o,
|
|
188
|
-
selectedOption:
|
|
189
|
-
onButtonAction:
|
|
199
|
+
selectedOption: d = [],
|
|
200
|
+
onButtonAction: g = () => {
|
|
190
201
|
},
|
|
191
|
-
buttonLink:
|
|
192
|
-
onSelectOption:
|
|
202
|
+
buttonLink: f,
|
|
203
|
+
onSelectOption: p = () => {
|
|
193
204
|
},
|
|
194
|
-
onSelectAll:
|
|
205
|
+
onSelectAll: b = () => {
|
|
195
206
|
},
|
|
196
|
-
isLoading:
|
|
207
|
+
isLoading: k = !1,
|
|
197
208
|
onSelectCard: R = () => {
|
|
198
209
|
},
|
|
199
210
|
productsToolbarName: M = "All",
|
|
200
211
|
allButton: z = !1,
|
|
201
|
-
componentName:
|
|
202
|
-
|
|
212
|
+
componentName: T,
|
|
213
|
+
LinkComponent: N
|
|
214
|
+
} = r, W = U(), I = E(() => {
|
|
203
215
|
var i;
|
|
204
|
-
return /* @__PURE__ */ t(
|
|
205
|
-
|
|
216
|
+
return /* @__PURE__ */ t(_, { children: W === !0 ? n == null ? void 0 : n.map((e, S) => /* @__PURE__ */ t(
|
|
217
|
+
B,
|
|
206
218
|
{
|
|
207
219
|
title: e == null ? void 0 : e.title,
|
|
208
220
|
imageUrl: (e == null ? void 0 : e.image) || null,
|
|
209
221
|
text: e == null ? void 0 : e.text,
|
|
210
222
|
buttonText: e == null ? void 0 : e.buttonText,
|
|
211
|
-
onCardClick: (
|
|
212
|
-
metadata: { name:
|
|
213
|
-
link: e == null ? void 0 : e.link
|
|
223
|
+
onCardClick: (F, v) => R(e, v),
|
|
224
|
+
metadata: { name: T, accessor: e == null ? void 0 : e.accessor },
|
|
225
|
+
link: e == null ? void 0 : e.link,
|
|
226
|
+
LinkComponent: N
|
|
214
227
|
},
|
|
215
|
-
|
|
216
|
-
)) : (i =
|
|
217
|
-
|
|
228
|
+
S
|
|
229
|
+
)) : (i = n == null ? void 0 : n.slice(0, c)) == null ? void 0 : i.map((e, S) => /* @__PURE__ */ t(
|
|
230
|
+
B,
|
|
218
231
|
{
|
|
219
232
|
title: e == null ? void 0 : e.title,
|
|
220
233
|
imageUrl: (e == null ? void 0 : e.image) || null,
|
|
221
234
|
text: e == null ? void 0 : e.text,
|
|
222
235
|
buttonText: e == null ? void 0 : e.buttonText,
|
|
223
|
-
onCardClick: (
|
|
224
|
-
metadata: { name:
|
|
225
|
-
link: e == null ? void 0 : e.link
|
|
236
|
+
onCardClick: (F, v) => R(e, v),
|
|
237
|
+
metadata: { name: T, accessor: e == null ? void 0 : e.accessor },
|
|
238
|
+
link: e == null ? void 0 : e.link,
|
|
239
|
+
LinkComponent: N
|
|
226
240
|
},
|
|
227
|
-
|
|
241
|
+
S
|
|
228
242
|
)) });
|
|
229
|
-
}, [
|
|
230
|
-
return /* @__PURE__ */
|
|
231
|
-
/* @__PURE__ */
|
|
232
|
-
/* @__PURE__ */
|
|
233
|
-
|
|
234
|
-
/* @__PURE__ */ t("span", { children:
|
|
243
|
+
}, [n, W, c]);
|
|
244
|
+
return /* @__PURE__ */ a(K, { ref: h, children: [
|
|
245
|
+
/* @__PURE__ */ a("div", { className: "regular-title", children: [
|
|
246
|
+
/* @__PURE__ */ a("div", { className: "regular-title-text", children: [
|
|
247
|
+
C(l) && /* @__PURE__ */ t("i", { className: l }),
|
|
248
|
+
/* @__PURE__ */ t("span", { children: m })
|
|
235
249
|
] }),
|
|
236
|
-
|
|
237
|
-
|
|
250
|
+
C(u) && C(f) && !k && /* @__PURE__ */ t(
|
|
251
|
+
G,
|
|
238
252
|
{
|
|
239
253
|
type: "button",
|
|
240
254
|
btnType: "tinted",
|
|
241
255
|
color: "neutral",
|
|
242
256
|
onClick: (i) => {
|
|
243
257
|
var e;
|
|
244
|
-
(e = i == null ? void 0 : i.target) == null || e.blur(),
|
|
258
|
+
(e = i == null ? void 0 : i.target) == null || e.blur(), g(f);
|
|
245
259
|
},
|
|
246
260
|
borderRadius: "curved",
|
|
247
|
-
children:
|
|
261
|
+
children: u
|
|
248
262
|
}
|
|
249
263
|
)
|
|
250
264
|
] }),
|
|
251
|
-
/* @__PURE__ */
|
|
252
|
-
|
|
265
|
+
/* @__PURE__ */ a(
|
|
266
|
+
ee,
|
|
253
267
|
{
|
|
254
|
-
isLoading:
|
|
268
|
+
isLoading: k,
|
|
255
269
|
keyPrefix: "blogs-with-filters-skeleton",
|
|
256
270
|
children: [
|
|
257
271
|
(o == null ? void 0 : o.length) > 0 && /* @__PURE__ */ t(
|
|
258
|
-
|
|
272
|
+
X,
|
|
259
273
|
{
|
|
260
274
|
items: o,
|
|
261
|
-
selectedIds:
|
|
275
|
+
selectedIds: d,
|
|
262
276
|
onRemove: (i) => {
|
|
263
|
-
|
|
277
|
+
p(i);
|
|
264
278
|
},
|
|
265
279
|
onSelect: (i) => {
|
|
266
|
-
|
|
280
|
+
p(i);
|
|
267
281
|
},
|
|
268
|
-
onSelectAll:
|
|
282
|
+
onSelectAll: b,
|
|
269
283
|
labelKey: "name",
|
|
270
284
|
valueKey: "code",
|
|
271
285
|
noMargin: !0,
|
|
@@ -273,12 +287,12 @@ const Z = f.div`
|
|
|
273
287
|
allButton: z
|
|
274
288
|
}
|
|
275
289
|
),
|
|
276
|
-
/* @__PURE__ */ t(
|
|
290
|
+
/* @__PURE__ */ t(q, { limit: c, children: I })
|
|
277
291
|
]
|
|
278
292
|
}
|
|
279
293
|
)
|
|
280
294
|
] });
|
|
281
295
|
});
|
|
282
296
|
export {
|
|
283
|
-
|
|
297
|
+
he as default
|
|
284
298
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),p=require("react"),_=require("./utils-RnrgDDZP.cjs"),m=require("./emotion-styled.browser.esm-BtEseadx.cjs"),g=require("./consts-goSZX3xP.cjs"),o=require("./style-BAcV7F53.cjs"),x=m.styled.a`
|
|
2
2
|
text-decoration: none;
|
|
3
3
|
color: var(--gray-950);
|
|
4
4
|
width: 7.5rem;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
height: auto;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
@media (max-width: ${
|
|
17
|
+
@media (max-width: ${g.MOBILE_SIZE_PX+"px"}) {
|
|
18
18
|
width: 4.5rem;
|
|
19
19
|
height: auto;
|
|
20
20
|
max-height: 4.5rem;
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
height: auto;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
`,
|
|
27
|
+
`,u=p.forwardRef(({imageComponent:r,image:n,onSelectCard:a,urlPrefix:i,urlSufix:s,code:l,LinkComponent:d},c)=>{const h=d||"a";return e.jsx(x,{ref:c,onClick:a,as:h,...d?{to:`${i}${l}${s}`}:{href:`${i}${l}${s}`},children:_.isDefined(r)?r:e.jsx("img",{src:n,className:"wrapper__image"})})}),j=m.styled.div`
|
|
28
28
|
display: flex;
|
|
29
29
|
flex-direction: column;
|
|
30
30
|
align-items: flex-start;
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
@media (max-width: ${
|
|
76
|
+
@media (max-width: ${g.MOBILE_SIZE_PX+"px"}) {
|
|
77
77
|
& .wrapper__content {
|
|
78
78
|
align-content: center;
|
|
79
79
|
gap: 1rem;
|
|
@@ -84,9 +84,9 @@
|
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
|
-
`,f=
|
|
88
|
-
@media (max-width: ${
|
|
87
|
+
`,f=m.styled(o.SkeletonRowWrapper)`
|
|
88
|
+
@media (max-width: ${g.MOBILE_SIZE_PX+"px"}) {
|
|
89
89
|
gap: 1rem;
|
|
90
90
|
flex-wrap: wrap;
|
|
91
91
|
}
|
|
92
|
-
|
|
92
|
+
`,$=({keyPrefix:r})=>e.jsxs(f,{justifyContent:"center",alignItems:"center",gap:"3rem",children:[e.jsx(o.SkeletonLinePlaceholder,{height:"4rem",width:"7.5rem",borderRadius:"0.75rem"},`${r}-1`),e.jsx(o.SkeletonLinePlaceholder,{height:"4rem",width:"7.5rem",borderRadius:"0.75rem"},`${r}-2`),e.jsx(o.SkeletonLinePlaceholder,{height:"4rem",width:"7.5rem",borderRadius:"0.75rem"},`${r}-3`),e.jsx(o.SkeletonLinePlaceholder,{height:"4rem",width:"7.5rem",borderRadius:"0.75rem"},`${r}-4`),e.jsx(o.SkeletonLinePlaceholder,{height:"4rem",width:"7.5rem",borderRadius:"0.75rem"},`${r}-5`)]}),y=({keyPrefix:r,isLoading:n=!1,fallbackComponent:a=e.jsx(e.Fragment,{}),children:i})=>e.jsx(p.Suspense,{fallbackComponent:a,children:n===!0?e.jsx($,{keyPrefix:r}):i}),v=p.forwardRef(({title:r,subtitle:n,items:a=[],isLoading:i=!1,onSelectCard:s=()=>{},urlPrefix:l,urlSufix:d,LinkComponent:c},h)=>e.jsxs(j,{ref:h,children:[e.jsxs("div",{className:"wrapper__heading",children:[r&&e.jsx("div",{className:"wrapper__title",children:r}),n&&e.jsx("div",{className:"wrapper__subtitle",children:n})]}),e.jsx(y,{isLoading:i,keyPrefix:"brand-hits-skeleton",children:e.jsx("div",{className:"wrapper__content",children:a==null?void 0:a.map((t,w)=>e.jsx(u,{image:t==null?void 0:t.image,imageComponent:t==null?void 0:t.imageComponent,onSelectCard:()=>s==null?void 0:s(t),className:"wrapper__item",urlPrefix:l,urlSufix:d,code:t==null?void 0:t.card,LinkComponent:c},`brand-hit-card__${w+1}`))})})]}));module.exports=v;
|
package/dist/BrandHitsSection.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { l as
|
|
4
|
-
import { s as
|
|
5
|
-
import { M as
|
|
6
|
-
import { a as
|
|
7
|
-
const
|
|
1
|
+
import { jsx as e, jsxs as h, Fragment as f } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as w, Suspense as u } from "react";
|
|
3
|
+
import { l as x } from "./utils-Dc5zIpaz.js";
|
|
4
|
+
import { s as l } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
5
|
+
import { M as c } from "./consts-BuFChS64.js";
|
|
6
|
+
import { a as $, b as p } from "./style-CXMUA6cI.js";
|
|
7
|
+
const v = l.a`
|
|
8
8
|
text-decoration: none;
|
|
9
9
|
color: var(--gray-950);
|
|
10
10
|
width: 7.5rem;
|
|
@@ -20,7 +20,7 @@ const $ = h.a`
|
|
|
20
20
|
height: auto;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
@media (max-width: ${
|
|
23
|
+
@media (max-width: ${c + "px"}) {
|
|
24
24
|
width: 4.5rem;
|
|
25
25
|
height: auto;
|
|
26
26
|
max-height: 4.5rem;
|
|
@@ -30,9 +30,26 @@ const $ = h.a`
|
|
|
30
30
|
height: auto;
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
`,
|
|
34
|
-
({
|
|
35
|
-
|
|
33
|
+
`, b = w(
|
|
34
|
+
({
|
|
35
|
+
imageComponent: r,
|
|
36
|
+
image: n,
|
|
37
|
+
onSelectCard: t,
|
|
38
|
+
urlPrefix: i,
|
|
39
|
+
urlSufix: o,
|
|
40
|
+
code: s,
|
|
41
|
+
LinkComponent: m
|
|
42
|
+
}, d) => /* @__PURE__ */ e(
|
|
43
|
+
v,
|
|
44
|
+
{
|
|
45
|
+
ref: d,
|
|
46
|
+
onClick: t,
|
|
47
|
+
as: m || "a",
|
|
48
|
+
...m ? { to: `${i}${s}${o}` } : { href: `${i}${s}${o}` },
|
|
49
|
+
children: x(r) ? r : /* @__PURE__ */ e("img", { src: n, className: "wrapper__image" })
|
|
50
|
+
}
|
|
51
|
+
)
|
|
52
|
+
), y = l.div`
|
|
36
53
|
display: flex;
|
|
37
54
|
flex-direction: column;
|
|
38
55
|
align-items: flex-start;
|
|
@@ -81,7 +98,7 @@ const $ = h.a`
|
|
|
81
98
|
}
|
|
82
99
|
}
|
|
83
100
|
|
|
84
|
-
@media (max-width: ${
|
|
101
|
+
@media (max-width: ${c + "px"}) {
|
|
85
102
|
& .wrapper__content {
|
|
86
103
|
align-content: center;
|
|
87
104
|
gap: 1rem;
|
|
@@ -92,12 +109,12 @@ const $ = h.a`
|
|
|
92
109
|
}
|
|
93
110
|
}
|
|
94
111
|
}
|
|
95
|
-
`,
|
|
96
|
-
@media (max-width: ${
|
|
112
|
+
`, R = l($)`
|
|
113
|
+
@media (max-width: ${c + "px"}) {
|
|
97
114
|
gap: 1rem;
|
|
98
115
|
flex-wrap: wrap;
|
|
99
116
|
}
|
|
100
|
-
`,
|
|
117
|
+
`, N = ({ keyPrefix: r }) => /* @__PURE__ */ h(R, { justifyContent: "center", alignItems: "center", gap: "3rem", children: [
|
|
101
118
|
/* @__PURE__ */ e(
|
|
102
119
|
p,
|
|
103
120
|
{
|
|
@@ -143,40 +160,41 @@ const $ = h.a`
|
|
|
143
160
|
},
|
|
144
161
|
`${r}-5`
|
|
145
162
|
)
|
|
146
|
-
] }),
|
|
163
|
+
] }), B = ({
|
|
147
164
|
keyPrefix: r,
|
|
148
|
-
isLoading:
|
|
149
|
-
fallbackComponent: t = /* @__PURE__ */ e(
|
|
150
|
-
children:
|
|
151
|
-
}) => /* @__PURE__ */ e(
|
|
152
|
-
({ title: r, subtitle:
|
|
153
|
-
}, urlPrefix:
|
|
154
|
-
/* @__PURE__ */
|
|
165
|
+
isLoading: n = !1,
|
|
166
|
+
fallbackComponent: t = /* @__PURE__ */ e(f, {}),
|
|
167
|
+
children: i
|
|
168
|
+
}) => /* @__PURE__ */ e(u, { fallbackComponent: t, children: n === !0 ? /* @__PURE__ */ e(N, { keyPrefix: r }) : i }), z = w(
|
|
169
|
+
({ title: r, subtitle: n, items: t = [], isLoading: i = !1, onSelectCard: o = () => {
|
|
170
|
+
}, urlPrefix: s, urlSufix: m, LinkComponent: d }, g) => /* @__PURE__ */ h(y, { ref: g, children: [
|
|
171
|
+
/* @__PURE__ */ h("div", { className: "wrapper__heading", children: [
|
|
155
172
|
r && /* @__PURE__ */ e("div", { className: "wrapper__title", children: r }),
|
|
156
|
-
|
|
173
|
+
n && /* @__PURE__ */ e("div", { className: "wrapper__subtitle", children: n })
|
|
157
174
|
] }),
|
|
158
175
|
/* @__PURE__ */ e(
|
|
159
|
-
|
|
176
|
+
B,
|
|
160
177
|
{
|
|
161
|
-
isLoading:
|
|
178
|
+
isLoading: i,
|
|
162
179
|
keyPrefix: "brand-hits-skeleton",
|
|
163
|
-
children: /* @__PURE__ */ e("div", { className: "wrapper__content", children: t == null ? void 0 : t.map((a,
|
|
164
|
-
|
|
180
|
+
children: /* @__PURE__ */ e("div", { className: "wrapper__content", children: t == null ? void 0 : t.map((a, _) => /* @__PURE__ */ e(
|
|
181
|
+
b,
|
|
165
182
|
{
|
|
166
183
|
image: a == null ? void 0 : a.image,
|
|
167
184
|
imageComponent: a == null ? void 0 : a.imageComponent,
|
|
168
185
|
onSelectCard: () => o == null ? void 0 : o(a),
|
|
169
186
|
className: "wrapper__item",
|
|
170
|
-
urlPrefix:
|
|
187
|
+
urlPrefix: s,
|
|
171
188
|
urlSufix: m,
|
|
172
|
-
code: a == null ? void 0 : a.card
|
|
189
|
+
code: a == null ? void 0 : a.card,
|
|
190
|
+
LinkComponent: d
|
|
173
191
|
},
|
|
174
|
-
`brand-hit-card__${
|
|
192
|
+
`brand-hit-card__${_ + 1}`
|
|
175
193
|
)) })
|
|
176
194
|
}
|
|
177
195
|
)
|
|
178
196
|
] })
|
|
179
197
|
);
|
|
180
198
|
export {
|
|
181
|
-
|
|
199
|
+
z as default
|
|
182
200
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as p, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as g } from "react";
|
|
3
3
|
import { s as l } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
|
-
import { o as
|
|
5
|
-
import { M as
|
|
6
|
-
const
|
|
4
|
+
import { o as a } from "./utils-Dc5zIpaz.js";
|
|
5
|
+
import { M as x } from "./consts-BuFChS64.js";
|
|
6
|
+
const f = l.a`
|
|
7
7
|
text-decoration: none;
|
|
8
8
|
display: flex;
|
|
9
9
|
flex-direction: column;
|
|
@@ -26,11 +26,11 @@ const x = l.a`
|
|
|
26
26
|
|
|
27
27
|
& .card-content {
|
|
28
28
|
padding: 0.75rem;
|
|
29
|
-
${
|
|
29
|
+
${a(2)}
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
& .card-content-2 {
|
|
33
|
-
${
|
|
33
|
+
${a(2)}
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
& img {
|
|
@@ -40,7 +40,7 @@ const x = l.a`
|
|
|
40
40
|
max-height: 8.25rem;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
@media (max-width: ${
|
|
43
|
+
@media (max-width: ${x + "px"}) {
|
|
44
44
|
min-width: 8.75rem;
|
|
45
45
|
max-width: 8.75rem;
|
|
46
46
|
|
|
@@ -50,19 +50,20 @@ const x = l.a`
|
|
|
50
50
|
max-height: 5.375rem;
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
`, y = g((
|
|
54
|
-
const { image:
|
|
55
|
-
} } =
|
|
56
|
-
return /* @__PURE__ */
|
|
57
|
-
|
|
53
|
+
`, y = g((n, m) => {
|
|
54
|
+
const { image: d, name: s, urlPrefix: e, urlSufix: o, code: t, uuid: c, onSelectCard: h = () => {
|
|
55
|
+
}, LinkComponent: i } = n;
|
|
56
|
+
return /* @__PURE__ */ p(
|
|
57
|
+
f,
|
|
58
58
|
{
|
|
59
|
-
ref:
|
|
59
|
+
ref: m,
|
|
60
60
|
className: "simple-category-card",
|
|
61
|
-
onClick: () =>
|
|
62
|
-
|
|
61
|
+
onClick: () => h(c),
|
|
62
|
+
as: i || "a",
|
|
63
|
+
...i ? { to: `${e}${t}${o}` } : { href: `${e}${t}${o}` },
|
|
63
64
|
children: [
|
|
64
|
-
/* @__PURE__ */ r("img", { src:
|
|
65
|
-
/* @__PURE__ */ r("div", { className: "card-content", children: /* @__PURE__ */ r("div", { className: "card-content-2", children:
|
|
65
|
+
/* @__PURE__ */ r("img", { src: d }),
|
|
66
|
+
/* @__PURE__ */ r("div", { className: "card-content", children: /* @__PURE__ */ r("div", { className: "card-content-2", children: s }) })
|
|
66
67
|
]
|
|
67
68
|
}
|
|
68
69
|
);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),x=require("react"),g=require("./emotion-styled.browser.esm-BtEseadx.cjs"),n=require("./utils-RnrgDDZP.cjs"),u=require("./consts-goSZX3xP.cjs"),p=g.styled.a`
|
|
2
2
|
text-decoration: none;
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
|
|
22
22
|
& .card-content {
|
|
23
23
|
padding: 0.75rem;
|
|
24
|
-
${
|
|
24
|
+
${n.truncateTextInRows(2)}
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
& .card-content-2 {
|
|
28
|
-
${
|
|
28
|
+
${n.truncateTextInRows(2)}
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
& img {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
max-height: 8.25rem;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
@media (max-width: ${
|
|
38
|
+
@media (max-width: ${u.MOBILE_SIZE_PX+"px"}) {
|
|
39
39
|
min-width: 8.75rem;
|
|
40
40
|
max-width: 8.75rem;
|
|
41
41
|
|
|
@@ -45,4 +45,4 @@
|
|
|
45
45
|
max-height: 5.375rem;
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
`,
|
|
48
|
+
`,f=x.forwardRef((a,s)=>{const{image:c,name:m,urlPrefix:r,urlSufix:t,code:i,uuid:d,onSelectCard:h=()=>{},LinkComponent:o}=a,l=o||"a";return e.jsxs(p,{ref:s,className:"simple-category-card",onClick:()=>h(d),as:l,...o?{to:`${r}${i}${t}`}:{href:`${r}${i}${t}`},children:[e.jsx("img",{src:c}),e.jsx("div",{className:"card-content",children:e.jsx("div",{className:"card-content-2",children:m})})]})});exports.CategorySimpleCard=f;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),a=require("react"),
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),a=require("react"),B=require("./emotion-styled.browser.esm-BtEseadx.cjs"),E=require("./consts-goSZX3xP.cjs"),I=require("./IconButton.cjs"),L=require("./Button.cjs"),n=require("./utils-RnrgDDZP.cjs"),T=require("./useDetectMobile-zkbzoOGV.cjs"),g=require("./index-Coo0aVuh.cjs"),z=B.styled.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 1.5rem;
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
|
|
24
24
|
& .section__items {
|
|
25
25
|
display: grid;
|
|
26
|
-
grid-template-columns: ${
|
|
26
|
+
grid-template-columns: ${r=>`repeat(${r.limit}, minmax(0, 1fr))`};
|
|
27
27
|
gap: 2rem;
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
white-space: nowrap;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
@media (max-width: ${
|
|
50
|
+
@media (max-width: ${E.MOBILE_SIZE_PX+"px"}) {
|
|
51
51
|
gap: 1.25rem;
|
|
52
52
|
|
|
53
53
|
& .section__items {
|
|
@@ -70,4 +70,4 @@
|
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
`,
|
|
73
|
+
`,R=a.memo(g.DetailedProductCard),U=a.forwardRef((r,p)=>{const{title:l,icon:c,items:i,limit:f=4,isLoading:s=!1,onSelectCard:b=()=>{},onLoadMore:h=()=>{},onButtonAction:w=()=>{},getImage:y=()=>{},viewAllbuttonLink:d,viewAllButonText:m="View all",negotiableText:_,freeText:k,loadMoreButtonIcon:v="angle-down",sponsoredText:C,onBookmark:S=()=>{},actionComponent:N,componentName:j,hasNextPage:q=!1,LinkComponent:P}=r,u=T.useDetectMobile(),D=a.useMemo(()=>i==null?void 0:i.map((e,o)=>t.jsx(R,{name:e==null?void 0:e.name,price:e==null?void 0:e.price,sellingPrice:e==null?void 0:e.sellingPrice,currency:e==null?void 0:e.currency,image:e==null?void 0:e.image,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,sponsored:e==null?void 0:e.sponsored,imageComponent:e==null?void 0:e.imageComponent,onSelectCard:(A,M)=>b({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug,cardRef:M}),nameSlug:e==null?void 0:e.nameSlug,imageUrl:y(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,isFree:e==null?void 0:e.isFree,isNegotiable:e==null?void 0:e.isNegotiable,negotiableText:_,freeText:k,tags:e==null?void 0:e.tags,categoryCode:e==null?void 0:e.categoryCode,condition:e==null?void 0:e.condition,quantity:e==null?void 0:e.quantity,hasQuantities:e==null?void 0:e.hasQuantities,status:e==null?void 0:e.status,trade:e==null?void 0:e.trade,sponsoredText:C,onBookmark:S,actionComponent:N,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists,metadata:{accessor:e==null?void 0:e.accessor,name:j},sellerName:e==null?void 0:e.sellerName,forCart:e==null?void 0:e.forCart,forOrder:e==null?void 0:e.forOrder,contactSeller:e==null?void 0:e.contactSeller,hasVariants:e==null?void 0:e.hasVariants,LinkComponent:P},o)),[i]);return t.jsxs(z,{ref:p,limit:f,children:[t.jsxs("div",{className:"section__heading",children:[n.isDefinedNotEmptyString(l)&&t.jsxs("div",{className:"section__title",children:[n.isDefinedNotEmptyString(c)&&t.jsx("i",{className:c})," ",l]}),u&&n.isDefinedNotEmptyString(d)&&n.isDefinedNotEmptyString(m)&&!s&&t.jsx(L,{type:"button",btnType:"tinted",color:"neutral",onClick:e=>{var o;(o=e==null?void 0:e.target)==null||o.blur(),w(d)},borderRadius:"curved",className:"section__view-all",children:m})]}),t.jsx(g.SuspenseDetailedProductCard,{isLoading:s,keyPrefix:"detailed-product-card-skeleton",children:t.jsx("div",{className:"section__items",children:D})}),!u&&!s&&q&&t.jsx(I,{icon:v,borderRadius:"curved",btnType:"basic",color:"neutral",className:"section__show-more",onClick:h})]})});module.exports=U;
|