@lanaco/lnc-react-ui 4.0.87 → 4.0.88
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 +1 -1
- package/dist/BannerSectionCarousel.js +4 -1
- package/dist/BannerSectionSimple.cjs +7 -7
- package/dist/BannerSectionSimple.js +54 -51
- package/dist/BannerSectionWithList.cjs +7 -7
- package/dist/BannerSectionWithList.js +33 -30
- package/dist/BannerSectionWithListImage.cjs +9 -9
- package/dist/BannerSectionWithListImage.js +44 -41
- package/dist/BlogCardsSponsoredSection.cjs +3 -3
- package/dist/BlogCardsSponsoredSection.js +31 -28
- package/dist/BlogsSectionDetailed.cjs +2 -2
- package/dist/BlogsSectionDetailed.js +26 -23
- package/dist/BlogsSectionSimple.cjs +6 -6
- package/dist/BlogsSectionSimple.js +30 -27
- package/dist/BlogsSectionWithFilters.cjs +6 -6
- package/dist/BlogsSectionWithFilters.js +19 -16
- package/dist/DetailedProductsSection.cjs +2 -2
- package/dist/DetailedProductsSection.js +24 -21
- package/dist/FieldOfInterestsMasonrySection.cjs +24 -13
- package/dist/FieldOfInterestsMasonrySection.js +72 -66
- package/dist/FieldOfInterestsWithTagsCardsSection.cjs +1 -0
- package/dist/FieldOfInterestsWithTagsCardsSection.js +1 -0
- package/dist/GeneralWithTagsCardsSection.cjs +4 -3
- package/dist/GeneralWithTagsCardsSection.js +1 -0
- package/dist/GiftCardsSection.cjs +8 -8
- package/dist/GiftCardsSection.js +52 -49
- package/dist/SimpleCategoriesSection.cjs +1 -1
- package/dist/SimpleCategoriesSection.js +15 -12
- package/dist/UrgentSaleProductsSection.cjs +2 -2
- package/dist/UrgentSaleProductsSection.js +33 -30
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
"use strict";const r=require("react/jsx-runtime"),f=require("react"),w=require("./useDetectMobile-zkbzoOGV.cjs"),v=require("./style-xvwWn3Zv.cjs"),
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),f=require("react"),w=require("./useDetectMobile-zkbzoOGV.cjs"),v=require("./style-xvwWn3Zv.cjs"),o=require("./utils-DhRHf5Ed.cjs"),j=require("./Button.cjs"),c=require("./emotion-styled.browser.esm-BtEseadx.cjs"),C=require("./consts-goSZX3xP.cjs"),S=c.styled.div`
|
|
2
2
|
display: grid;
|
|
3
|
-
grid-template-columns: ${
|
|
3
|
+
grid-template-columns: ${a=>`repeat(${a.limit}, minmax(0, 1fr))`};
|
|
4
4
|
gap: 1.25rem;
|
|
5
5
|
|
|
6
6
|
@media (max-width: ${C.MOBILE_SIZE_PX+"px"}) {
|
|
7
7
|
grid-template-columns: repeat(1, 1fr);
|
|
8
8
|
}
|
|
9
|
-
`,G=
|
|
9
|
+
`,G=c.styled.div`
|
|
10
10
|
display: flex;
|
|
11
11
|
flex-direction: column;
|
|
12
12
|
gap: 0.75rem;
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
& .text-wrap {
|
|
22
22
|
text-align: center;
|
|
23
23
|
}
|
|
24
|
-
`,k=
|
|
24
|
+
`,k=c.styled.div`
|
|
25
25
|
width: 100%;
|
|
26
26
|
min-height: 11rem;
|
|
27
27
|
max-height: 11rem;
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
& .skeleton__card {
|
|
34
34
|
height: 100%;
|
|
35
35
|
width: 100%;
|
|
36
|
-
${
|
|
36
|
+
${o.linearGradientAnimation("-90deg")}
|
|
37
37
|
|
|
38
38
|
background: linear-gradient(
|
|
39
39
|
178deg,
|
|
@@ -69,9 +69,9 @@
|
|
|
69
69
|
-webkit-transform: rotate(315deg);
|
|
70
70
|
transform: rotate(315deg);
|
|
71
71
|
}
|
|
72
|
-
`;
|
|
72
|
+
`;c.styled.div`
|
|
73
73
|
width: 100%;
|
|
74
74
|
height: 11.5rem;
|
|
75
75
|
border-radius: 0.75rem;
|
|
76
|
-
background: ${
|
|
77
|
-
`;const p=f.forwardRef((
|
|
76
|
+
background: ${o.linearGradientAnimation("-90deg")};
|
|
77
|
+
`;const p=f.forwardRef((a,d)=>{const{image:s,text:l,price:i,currency:t,onSelectGiftCard:m=()=>{}}=a;return r.jsxs(G,{ref:d,className:"simple-gift-card",onClick:()=>m(i),children:[r.jsxs(k,{children:[r.jsx("div",{className:"price-tag",children:i&&t&&`${o.formatPrice(i)} ${o.GetCurrencySymbol(t)}`}),r.jsx("img",{src:s})]}),r.jsx("div",{className:"text-wrap",children:l})]})}),q=f.forwardRef((a,d)=>{const{icon:s,title:l,buttonLink:i,items:t,buttonText:m,limit:u=4,onSelectCard:g=()=>{},onButtonAction:h=()=>{}}=a,b=w.useDetectMobile();return r.jsxs(v.RegulatTitleSectionWrapper,{ref:d,children:[r.jsxs("div",{className:"regular-title",children:[r.jsxs("div",{className:"regular-title-text",children:[o.isDefinedNotEmptyString(s)&&r.jsx("i",{className:s}),r.jsx("span",{children:l})]}),o.isDefinedNotEmptyString(i)&&r.jsx(j,{type:"button",btnType:"tinted",color:"gray",onClick:e=>{var n;(n=e==null?void 0:e.target)==null||n.blur(),h(i)},borderRadius:"curved",children:m})]}),r.jsx(S,{limit:u,children:b===!0?t==null?void 0:t.map((e,n)=>r.jsx(p,{text:e==null?void 0:e.text,price:e==null?void 0:e.priceTo,currency:e==null?void 0:e.currencyIsoCode,image:e==null?void 0:e.imageUrl,uuid:e==null?void 0:e.uuid,onSelectGiftCard:y=>g(e)},n)):t==null?void 0:t.slice(0,u).map((e,n)=>r.jsx(p,{text:e==null?void 0:e.text,price:e==null?void 0:e.priceTo,currency:e==null?void 0:e.currencyIsoCode,image:e==null?void 0:e.imageUrl,uuid:e==null?void 0:e.uuid,onSelectGiftCard:y=>g(e)},n))})]})});module.exports=q;
|
package/dist/GiftCardsSection.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as n, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as h } from "react";
|
|
3
3
|
import { u as C } from "./useDetectMobile-Bkvj0VMa.js";
|
|
4
4
|
import { R as k } from "./style-sLF37aOA.js";
|
|
5
5
|
import { m as b, n as G, G as S, k as u } from "./utils-BE-UlkKf.js";
|
|
6
6
|
import N from "./Button.js";
|
|
7
|
-
import { s as
|
|
7
|
+
import { s as c } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
8
8
|
import { M as $ } from "./consts-BuFChS64.js";
|
|
9
|
-
const T =
|
|
9
|
+
const T = c.div`
|
|
10
10
|
display: grid;
|
|
11
|
-
grid-template-columns: ${(
|
|
11
|
+
grid-template-columns: ${(a) => `repeat(${a.limit}, minmax(0, 1fr))`};
|
|
12
12
|
gap: 1.25rem;
|
|
13
13
|
|
|
14
14
|
@media (max-width: ${$ + "px"}) {
|
|
15
15
|
grid-template-columns: repeat(1, 1fr);
|
|
16
16
|
}
|
|
17
|
-
`, j =
|
|
17
|
+
`, j = c.div`
|
|
18
18
|
display: flex;
|
|
19
19
|
flex-direction: column;
|
|
20
20
|
gap: 0.75rem;
|
|
@@ -29,7 +29,7 @@ const T = d.div`
|
|
|
29
29
|
& .text-wrap {
|
|
30
30
|
text-align: center;
|
|
31
31
|
}
|
|
32
|
-
`, E =
|
|
32
|
+
`, E = c.div`
|
|
33
33
|
width: 100%;
|
|
34
34
|
min-height: 11rem;
|
|
35
35
|
max-height: 11rem;
|
|
@@ -78,54 +78,54 @@ const T = d.div`
|
|
|
78
78
|
transform: rotate(315deg);
|
|
79
79
|
}
|
|
80
80
|
`;
|
|
81
|
-
|
|
81
|
+
c.div`
|
|
82
82
|
width: 100%;
|
|
83
83
|
height: 11.5rem;
|
|
84
84
|
border-radius: 0.75rem;
|
|
85
85
|
background: ${b("-90deg")};
|
|
86
86
|
`;
|
|
87
|
-
const f = h((
|
|
87
|
+
const f = h((a, m) => {
|
|
88
88
|
const {
|
|
89
|
-
image:
|
|
90
|
-
text:
|
|
89
|
+
image: d,
|
|
90
|
+
text: l,
|
|
91
91
|
price: i,
|
|
92
|
-
currency:
|
|
93
|
-
onSelectGiftCard:
|
|
92
|
+
currency: e,
|
|
93
|
+
onSelectGiftCard: s = () => {
|
|
94
94
|
}
|
|
95
|
-
} =
|
|
96
|
-
return /* @__PURE__ */
|
|
95
|
+
} = a;
|
|
96
|
+
return /* @__PURE__ */ n(
|
|
97
97
|
j,
|
|
98
98
|
{
|
|
99
|
-
ref:
|
|
99
|
+
ref: m,
|
|
100
100
|
className: "simple-gift-card",
|
|
101
|
-
onClick: () =>
|
|
101
|
+
onClick: () => s(i),
|
|
102
102
|
children: [
|
|
103
|
-
/* @__PURE__ */
|
|
104
|
-
/* @__PURE__ */ t("div", { className: "price-tag", children: i &&
|
|
105
|
-
/* @__PURE__ */ t("img", { src:
|
|
103
|
+
/* @__PURE__ */ n(E, { children: [
|
|
104
|
+
/* @__PURE__ */ t("div", { className: "price-tag", children: i && e && `${G(i)} ${S(e)}` }),
|
|
105
|
+
/* @__PURE__ */ t("img", { src: d })
|
|
106
106
|
] }),
|
|
107
|
-
/* @__PURE__ */ t("div", { className: "text-wrap", children:
|
|
107
|
+
/* @__PURE__ */ t("div", { className: "text-wrap", children: l })
|
|
108
108
|
]
|
|
109
109
|
}
|
|
110
110
|
);
|
|
111
|
-
}), D = h((
|
|
111
|
+
}), D = h((a, m) => {
|
|
112
112
|
const {
|
|
113
|
-
icon:
|
|
114
|
-
title:
|
|
113
|
+
icon: d,
|
|
114
|
+
title: l,
|
|
115
115
|
buttonLink: i,
|
|
116
|
-
items:
|
|
117
|
-
buttonText:
|
|
116
|
+
items: e,
|
|
117
|
+
buttonText: s,
|
|
118
118
|
limit: p = 4,
|
|
119
119
|
onSelectCard: g = () => {
|
|
120
120
|
},
|
|
121
121
|
onButtonAction: v = () => {
|
|
122
122
|
}
|
|
123
|
-
} =
|
|
124
|
-
return /* @__PURE__ */
|
|
125
|
-
/* @__PURE__ */
|
|
126
|
-
/* @__PURE__ */
|
|
127
|
-
u(
|
|
128
|
-
/* @__PURE__ */ t("span", { children:
|
|
123
|
+
} = a, w = C();
|
|
124
|
+
return /* @__PURE__ */ n(k, { ref: m, children: [
|
|
125
|
+
/* @__PURE__ */ n("div", { className: "regular-title", children: [
|
|
126
|
+
/* @__PURE__ */ n("div", { className: "regular-title-text", children: [
|
|
127
|
+
u(d) && /* @__PURE__ */ t("i", { className: d }),
|
|
128
|
+
/* @__PURE__ */ t("span", { children: l })
|
|
129
129
|
] }),
|
|
130
130
|
u(i) && /* @__PURE__ */ t(
|
|
131
131
|
N,
|
|
@@ -133,34 +133,37 @@ const f = h((o, c) => {
|
|
|
133
133
|
type: "button",
|
|
134
134
|
btnType: "tinted",
|
|
135
135
|
color: "gray",
|
|
136
|
-
onClick: () =>
|
|
136
|
+
onClick: (r) => {
|
|
137
|
+
var o;
|
|
138
|
+
(o = r == null ? void 0 : r.target) == null || o.blur(), v(i);
|
|
139
|
+
},
|
|
137
140
|
borderRadius: "curved",
|
|
138
|
-
children:
|
|
141
|
+
children: s
|
|
139
142
|
}
|
|
140
143
|
)
|
|
141
144
|
] }),
|
|
142
|
-
/* @__PURE__ */ t(T, { limit: p, children: w === !0 ?
|
|
145
|
+
/* @__PURE__ */ t(T, { limit: p, children: w === !0 ? e == null ? void 0 : e.map((r, o) => /* @__PURE__ */ t(
|
|
143
146
|
f,
|
|
144
147
|
{
|
|
145
|
-
text:
|
|
146
|
-
price:
|
|
147
|
-
currency:
|
|
148
|
-
image:
|
|
149
|
-
uuid:
|
|
150
|
-
onSelectGiftCard: (y) => g(
|
|
148
|
+
text: r == null ? void 0 : r.text,
|
|
149
|
+
price: r == null ? void 0 : r.priceTo,
|
|
150
|
+
currency: r == null ? void 0 : r.currencyIsoCode,
|
|
151
|
+
image: r == null ? void 0 : r.imageUrl,
|
|
152
|
+
uuid: r == null ? void 0 : r.uuid,
|
|
153
|
+
onSelectGiftCard: (y) => g(r)
|
|
151
154
|
},
|
|
152
|
-
|
|
153
|
-
)) :
|
|
155
|
+
o
|
|
156
|
+
)) : e == null ? void 0 : e.slice(0, p).map((r, o) => /* @__PURE__ */ t(
|
|
154
157
|
f,
|
|
155
158
|
{
|
|
156
|
-
text:
|
|
157
|
-
price:
|
|
158
|
-
currency:
|
|
159
|
-
image:
|
|
160
|
-
uuid:
|
|
161
|
-
onSelectGiftCard: (y) => g(
|
|
159
|
+
text: r == null ? void 0 : r.text,
|
|
160
|
+
price: r == null ? void 0 : r.priceTo,
|
|
161
|
+
currency: r == null ? void 0 : r.currencyIsoCode,
|
|
162
|
+
image: r == null ? void 0 : r.imageUrl,
|
|
163
|
+
uuid: r == null ? void 0 : r.uuid,
|
|
164
|
+
onSelectGiftCard: (y) => g(r)
|
|
162
165
|
},
|
|
163
|
-
|
|
166
|
+
o
|
|
164
167
|
)) })
|
|
165
168
|
] });
|
|
166
169
|
});
|
|
@@ -22,4 +22,4 @@
|
|
|
22
22
|
/* Safari and Chrome */
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
`,m=s.memo(p.CategorySimpleCard),E=s.forwardRef((a,g)=>{const{icon:l,title:
|
|
25
|
+
`,m=s.memo(p.CategorySimpleCard),E=s.forwardRef((a,g)=>{const{icon:l,title:b="Shop by category",items:t,buttonText:y="Shop now",buttonLink:c,limit:n=12,onButtonAction:h=()=>{},onSelectCard:i=()=>{},isLoading:f=!1,getImage:u=()=>{}}=a,S=q.useDetectMobile(),j=s.useMemo(()=>r.jsx(r.Fragment,{children:S===!0?t==null?void 0:t.map((e,o)=>r.jsx(m,{uuid:e==null?void 0:e.uuid,image:u(e==null?void 0:e.image)||null,name:e==null?void 0:e.name,onSelectCard:()=>i==null?void 0:i(e==null?void 0:e.uuid)},o)):t==null?void 0:t.slice(0,n).map((e,o)=>r.jsx(m,{uuid:e==null?void 0:e.uuid,image:u(e==null?void 0:e.image)||null,name:e==null?void 0:e.name,onSelectCard:()=>i==null?void 0:i(e)},o))}),[t]);return r.jsxs(k.RegulatTitleSectionWrapper,{ref:g,children:[r.jsxs("div",{className:"regular-title",children:[r.jsxs("div",{className:"regular-title-text",children:[d.isDefinedNotEmptyString(l)&&r.jsx("i",{className:l}),r.jsx("span",{children:b})]}),d.isDefinedNotEmptyString(c)&&r.jsx(v,{type:"button",btnType:"tinted",color:"gray",onClick:e=>{var o;(o=e==null?void 0:e.target)==null||o.blur(),h(c)},borderRadius:"curved",children:y})]}),r.jsx(M,{limit:n,children:r.jsx(p.SuspenseSimpleCategoryCard,{isLoading:f,limit:n,keyPrefix:"explore-landing",children:j})})]})});module.exports=E;
|
|
@@ -31,14 +31,14 @@ const P = M.div`
|
|
|
31
31
|
/* Safari and Chrome */
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
`,
|
|
34
|
+
`, u = C(B), G = k((l, c) => {
|
|
35
35
|
const {
|
|
36
36
|
icon: m,
|
|
37
37
|
title: g = "Shop by category",
|
|
38
38
|
items: o,
|
|
39
39
|
buttonText: f = "Shop now",
|
|
40
40
|
buttonLink: s,
|
|
41
|
-
limit:
|
|
41
|
+
limit: a = 12,
|
|
42
42
|
onButtonAction: b = () => {
|
|
43
43
|
},
|
|
44
44
|
onSelectCard: i = () => {
|
|
@@ -46,26 +46,26 @@ const P = M.div`
|
|
|
46
46
|
isLoading: y = !1,
|
|
47
47
|
getImage: d = () => {
|
|
48
48
|
}
|
|
49
|
-
} = l, h = I(), w = v(() => /* @__PURE__ */ r(S, { children: h === !0 ? o == null ? void 0 : o.map((e,
|
|
50
|
-
|
|
49
|
+
} = l, h = I(), w = v(() => /* @__PURE__ */ r(S, { children: h === !0 ? o == null ? void 0 : o.map((e, t) => /* @__PURE__ */ r(
|
|
50
|
+
u,
|
|
51
51
|
{
|
|
52
52
|
uuid: e == null ? void 0 : e.uuid,
|
|
53
53
|
image: d(e == null ? void 0 : e.image) || null,
|
|
54
54
|
name: e == null ? void 0 : e.name,
|
|
55
55
|
onSelectCard: () => i == null ? void 0 : i(e == null ? void 0 : e.uuid)
|
|
56
56
|
},
|
|
57
|
-
|
|
58
|
-
)) : o == null ? void 0 : o.slice(0,
|
|
59
|
-
|
|
57
|
+
t
|
|
58
|
+
)) : o == null ? void 0 : o.slice(0, a).map((e, t) => /* @__PURE__ */ r(
|
|
59
|
+
u,
|
|
60
60
|
{
|
|
61
61
|
uuid: e == null ? void 0 : e.uuid,
|
|
62
62
|
image: d(e == null ? void 0 : e.image) || null,
|
|
63
63
|
name: e == null ? void 0 : e.name,
|
|
64
64
|
onSelectCard: () => i == null ? void 0 : i(e)
|
|
65
65
|
},
|
|
66
|
-
|
|
66
|
+
t
|
|
67
67
|
)) }), [o]);
|
|
68
|
-
return /* @__PURE__ */ n(N, { ref:
|
|
68
|
+
return /* @__PURE__ */ n(N, { ref: c, children: [
|
|
69
69
|
/* @__PURE__ */ n("div", { className: "regular-title", children: [
|
|
70
70
|
/* @__PURE__ */ n("div", { className: "regular-title-text", children: [
|
|
71
71
|
p(m) && /* @__PURE__ */ r("i", { className: m }),
|
|
@@ -77,17 +77,20 @@ const P = M.div`
|
|
|
77
77
|
type: "button",
|
|
78
78
|
btnType: "tinted",
|
|
79
79
|
color: "gray",
|
|
80
|
-
onClick: () =>
|
|
80
|
+
onClick: (e) => {
|
|
81
|
+
var t;
|
|
82
|
+
(t = e == null ? void 0 : e.target) == null || t.blur(), b(s);
|
|
83
|
+
},
|
|
81
84
|
borderRadius: "curved",
|
|
82
85
|
children: f
|
|
83
86
|
}
|
|
84
87
|
)
|
|
85
88
|
] }),
|
|
86
|
-
/* @__PURE__ */ r(P, { limit:
|
|
89
|
+
/* @__PURE__ */ r(P, { limit: a, children: /* @__PURE__ */ r(
|
|
87
90
|
L,
|
|
88
91
|
{
|
|
89
92
|
isLoading: y,
|
|
90
|
-
limit:
|
|
93
|
+
limit: a,
|
|
91
94
|
keyPrefix: "explore-landing",
|
|
92
95
|
children: w
|
|
93
96
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const i=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";const i=require("react/jsx-runtime"),n=require("react"),P=require("./emotion-styled.browser.esm-BtEseadx.cjs"),f=require("./consts-goSZX3xP.cjs"),v=require("./useDetectMobile-zkbzoOGV.cjs"),q=require("./Button.cjs"),b=require("./suspense-product-card-detailed-DBNlkFiP.cjs"),C=P.styled.div`
|
|
2
2
|
padding: 1.75rem 3rem;
|
|
3
3
|
display: grid;
|
|
4
4
|
grid-template-columns: ${t=>`repeat(${t.limit||5}, minmax(0, 1fr))`};
|
|
@@ -71,4 +71,4 @@
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
`,h=
|
|
74
|
+
`,h=n.memo(b.DetailedProductCard),N=n.forwardRef((t,w)=>{const{items:r,limit:a=5,limitMobile:d=4,onSelectCard:s=()=>{},title:y="Urgent sale",showLessText:S="Show less",showMoreText:j="Show more",isLoading:k=!1,getImage:m=()=>{},negotiableText:g,freeText:p}=t,c=v.useDetectMobile(),[l,M]=n.useState(!1),U=n.useMemo(()=>{var o;return i.jsx(i.Fragment,{children:c===!0?(o=r==null?void 0:r.slice(0,l===!0?r==null?void 0:r.length:d))==null?void 0:o.map((e,u)=>i.jsx(h,{title:e==null?void 0:e.name,price:e==null?void 0:e.price,isFree:e==null?void 0:e.isFree,isNegotiable:e==null?void 0:e.isNegotiable,currency:e==null?void 0:e.currency,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,isSponsored:e==null?void 0:e.isSponsored,onSelectCard:()=>s==null?void 0:s(e==null?void 0:e.uuid),imageUrl:m(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,negotiableText:g,freeText:p},u)):r==null?void 0:r.slice(0,a).map((e,u)=>i.jsx(h,{title:e==null?void 0:e.name,price:e==null?void 0:e.price,isFree:e==null?void 0:e.isFree,isNegotiable:e==null?void 0:e.isNegotiable,currency:e==null?void 0:e.currency,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,location:e==null?void 0:e.location,isSponsored:e==null?void 0:e.isSponsored,onSelectCard:()=>s==null?void 0:s(e==null?void 0:e.uuid),imageUrl:m(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,negotiableText:g,freeText:p},u))})},[r,c,a,d,l]);return i.jsxs(C,{ref:w,limit:a,children:[i.jsxs("div",{className:"urgent-tag",children:[i.jsx("i",{className:"mng mng-lnc-bolt-filled"}),i.jsx("span",{children:y})]}),i.jsx(b.SuspenseDetailedProductCard,{isLoading:k,limit:a,keyPrefix:"explore-landing",children:U}),c===!0&&d<(r==null?void 0:r.length)&&i.jsx(q,{className:"show-more",btnType:"basic",type:"button",color:"gray",onClick:o=>{var e;(e=o==null?void 0:o.target)==null||e.blur(),M(!l)},children:l===!0?S:j})]})});module.exports=N;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as a, Fragment as U, jsxs as g } from "react/jsx-runtime";
|
|
2
2
|
import { memo as v, forwardRef as P, useState as N, useMemo as $ } from "react";
|
|
3
3
|
import { s as C } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
4
|
import { M as L, S as F } from "./consts-BuFChS64.js";
|
|
@@ -81,21 +81,21 @@ const E = C.div`
|
|
|
81
81
|
`, f = v(_), X = P((i, h) => {
|
|
82
82
|
const {
|
|
83
83
|
items: r,
|
|
84
|
-
limit:
|
|
85
|
-
limitMobile:
|
|
86
|
-
onSelectCard:
|
|
84
|
+
limit: l = 5,
|
|
85
|
+
limitMobile: n = 4,
|
|
86
|
+
onSelectCard: o = () => {
|
|
87
87
|
},
|
|
88
88
|
title: b = "Urgent sale",
|
|
89
89
|
showLessText: w = "Show less",
|
|
90
90
|
showMoreText: y = "Show more",
|
|
91
91
|
isLoading: S = !1,
|
|
92
|
-
getImage:
|
|
92
|
+
getImage: c = () => {
|
|
93
93
|
},
|
|
94
|
-
negotiableText:
|
|
95
|
-
freeText:
|
|
96
|
-
} = i,
|
|
97
|
-
var
|
|
98
|
-
return /* @__PURE__ */
|
|
94
|
+
negotiableText: u,
|
|
95
|
+
freeText: p
|
|
96
|
+
} = i, d = I(), [s, k] = N(!1), M = $(() => {
|
|
97
|
+
var t;
|
|
98
|
+
return /* @__PURE__ */ a(U, { children: d === !0 ? (t = r == null ? void 0 : r.slice(0, s === !0 ? r == null ? void 0 : r.length : n)) == null ? void 0 : t.map((e, m) => /* @__PURE__ */ a(
|
|
99
99
|
f,
|
|
100
100
|
{
|
|
101
101
|
title: e == null ? void 0 : e.name,
|
|
@@ -106,13 +106,13 @@ const E = C.div`
|
|
|
106
106
|
sellerUuid: e == null ? void 0 : e.sellerUuid,
|
|
107
107
|
uuid: e == null ? void 0 : e.uuid,
|
|
108
108
|
isSponsored: e == null ? void 0 : e.isSponsored,
|
|
109
|
-
onSelectCard: () =>
|
|
110
|
-
imageUrl:
|
|
111
|
-
negotiableText:
|
|
112
|
-
freeText:
|
|
109
|
+
onSelectCard: () => o == null ? void 0 : o(e == null ? void 0 : e.uuid),
|
|
110
|
+
imageUrl: c(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
|
|
111
|
+
negotiableText: u,
|
|
112
|
+
freeText: p
|
|
113
113
|
},
|
|
114
|
-
|
|
115
|
-
)) : r == null ? void 0 : r.slice(0,
|
|
114
|
+
m
|
|
115
|
+
)) : r == null ? void 0 : r.slice(0, l).map((e, m) => /* @__PURE__ */ a(
|
|
116
116
|
f,
|
|
117
117
|
{
|
|
118
118
|
title: e == null ? void 0 : e.name,
|
|
@@ -124,37 +124,40 @@ const E = C.div`
|
|
|
124
124
|
uuid: e == null ? void 0 : e.uuid,
|
|
125
125
|
location: e == null ? void 0 : e.location,
|
|
126
126
|
isSponsored: e == null ? void 0 : e.isSponsored,
|
|
127
|
-
onSelectCard: () =>
|
|
128
|
-
imageUrl:
|
|
129
|
-
negotiableText:
|
|
130
|
-
freeText:
|
|
127
|
+
onSelectCard: () => o == null ? void 0 : o(e == null ? void 0 : e.uuid),
|
|
128
|
+
imageUrl: c(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
|
|
129
|
+
negotiableText: u,
|
|
130
|
+
freeText: p
|
|
131
131
|
},
|
|
132
|
-
|
|
132
|
+
m
|
|
133
133
|
)) });
|
|
134
|
-
}, [r,
|
|
135
|
-
return /* @__PURE__ */ g(E, { ref: h, limit:
|
|
134
|
+
}, [r, d, l, n, s]);
|
|
135
|
+
return /* @__PURE__ */ g(E, { ref: h, limit: l, children: [
|
|
136
136
|
/* @__PURE__ */ g("div", { className: "urgent-tag", children: [
|
|
137
|
-
/* @__PURE__ */
|
|
138
|
-
/* @__PURE__ */
|
|
137
|
+
/* @__PURE__ */ a("i", { className: "mng mng-lnc-bolt-filled" }),
|
|
138
|
+
/* @__PURE__ */ a("span", { children: b })
|
|
139
139
|
] }),
|
|
140
|
-
/* @__PURE__ */
|
|
140
|
+
/* @__PURE__ */ a(
|
|
141
141
|
D,
|
|
142
142
|
{
|
|
143
143
|
isLoading: S,
|
|
144
|
-
limit:
|
|
144
|
+
limit: l,
|
|
145
145
|
keyPrefix: "explore-landing",
|
|
146
146
|
children: M
|
|
147
147
|
}
|
|
148
148
|
),
|
|
149
|
-
|
|
149
|
+
d === !0 && n < (r == null ? void 0 : r.length) && /* @__PURE__ */ a(
|
|
150
150
|
T,
|
|
151
151
|
{
|
|
152
152
|
className: "show-more",
|
|
153
153
|
btnType: "basic",
|
|
154
154
|
type: "button",
|
|
155
155
|
color: "gray",
|
|
156
|
-
onClick: () =>
|
|
157
|
-
|
|
156
|
+
onClick: (t) => {
|
|
157
|
+
var e;
|
|
158
|
+
(e = t == null ? void 0 : t.target) == null || e.blur(), k(!s);
|
|
159
|
+
},
|
|
160
|
+
children: s === !0 ? w : y
|
|
158
161
|
}
|
|
159
162
|
)
|
|
160
163
|
] });
|