@lanaco/lnc-react-ui 4.0.50 → 4.0.51
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/DetailedProductsSection.cjs +3 -3
- package/dist/DetailedProductsSection.js +41 -35
- package/dist/SimpleProductsSection.cjs +3 -3
- package/dist/SimpleProductsSection.js +46 -40
- package/dist/UrgentSaleProductsSection.cjs +3 -3
- package/dist/UrgentSaleProductsSection.js +38 -32
- package/dist/{suspense-product-card-detailed-afeJxXGK.cjs → suspense-product-card-detailed-ByYXsGae.cjs} +1 -1
- package/dist/{suspense-product-card-detailed-CCZMvyuP.js → suspense-product-card-detailed-vsxuZbEt.js} +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";const i=require("react/jsx-runtime"),s=require("react"),
|
|
1
|
+
"use strict";const i=require("react/jsx-runtime"),s=require("react"),q=require("./emotion-styled.browser.esm-BtEseadx.cjs"),N=require("./consts-CtNoHdBj.cjs"),D=require("./Button.cjs"),g=require("./utils-NZLCh-J5.cjs"),P=require("./useDetectMobile-D6d5LpdL.cjs"),U=require("./style-C571ywKV.cjs"),y=require("./suspense-product-card-detailed-ByYXsGae.cjs"),k=q.styled.div`
|
|
2
2
|
display: grid;
|
|
3
3
|
grid-template-columns: ${o=>`repeat(${o.limit}, minmax(0, 1fr))`};
|
|
4
4
|
gap: 1.25rem;
|
|
5
5
|
|
|
6
|
-
@media (max-width: ${
|
|
6
|
+
@media (max-width: ${N.MOBILE_SIZE_PX+"px"}) {
|
|
7
7
|
display: flex;
|
|
8
8
|
gap: 1rem;
|
|
9
9
|
overflow-x: auto;
|
|
@@ -22,4 +22,4 @@
|
|
|
22
22
|
/* Safari and Chrome */
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
`,
|
|
25
|
+
`,b=s.memo(y.DetailedProductCard),v=s.forwardRef((o,S)=>{const{icon:l,title:f,buttonLink:a,items:r,buttonText:C,limit:t=4,onSelectCard:c=()=>{},onButtonAction:h=()=>{},isLoading:j=!1,getImage:d=()=>{},negotiableText:u,freeText:m}=o,p=P.useDetectMobile(),w=s.useMemo(()=>i.jsx(i.Fragment,{children:p===!0?r==null?void 0:r.map((e,n)=>i.jsx(b,{title:e==null?void 0:e.name,price:e==null?void 0:e.price,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,isSponsored:e==null?void 0:e.isSponsored,imageComponent:e==null?void 0:e.imageComponent,onSelectCard:()=>c(e==null?void 0:e.uuid),imageUrl:d(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:u,freeText:m},n)):r==null?void 0:r.slice(0,t).map((e,n)=>i.jsx(b,{title:e==null?void 0:e.name,price:e==null?void 0:e.price,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,location:e==null?void 0:e.location,isSponsored:e==null?void 0:e.isSponsored,imageComponent:e==null?void 0:e.imageComponent,onSelectCard:()=>c(e==null?void 0:e.uuid),imageUrl:d(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:u,freeText:m},n))}),[r,p,t]);return i.jsxs(U.RegulatTitleSectionWrapper,{ref:S,children:[i.jsxs("div",{className:"regular-title",children:[i.jsxs("div",{className:"regular-title-text",children:[g.isDefinedNotEmptyString(l)&&i.jsx("i",{className:l}),i.jsx("span",{children:f})]}),g.isDefinedNotEmptyString(a)&&i.jsx(D,{type:"button",btnType:"tinted",color:"gray",onClick:()=>h(a),borderRadius:"curved",children:C})]}),i.jsx(k,{limit:t,children:i.jsx(y.SuspenseDetailedProductCard,{isLoading:j,itemsCount:t,keyPrefix:"explore-landing",children:w})})]})});module.exports=v;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { jsx as i, Fragment as
|
|
2
|
-
import { memo as
|
|
3
|
-
import { s as
|
|
4
|
-
import { M as
|
|
5
|
-
import
|
|
6
|
-
import { k as
|
|
7
|
-
import { u as
|
|
8
|
-
import { R as
|
|
9
|
-
import { D as
|
|
10
|
-
const
|
|
1
|
+
import { jsx as i, Fragment as k, jsxs as a } from "react/jsx-runtime";
|
|
2
|
+
import { memo as N, forwardRef as U, useMemo as v } from "react";
|
|
3
|
+
import { s as P } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
|
+
import { M as D } from "./consts-C1uHV4xc.js";
|
|
5
|
+
import F from "./Button.js";
|
|
6
|
+
import { k as g } from "./utils-DtRLzzTZ.js";
|
|
7
|
+
import { u as M } from "./useDetectMobile-BC6EGaBc.js";
|
|
8
|
+
import { R as T } from "./style-CsMpu4iC.js";
|
|
9
|
+
import { D as E, S as I } from "./suspense-product-card-detailed-vsxuZbEt.js";
|
|
10
|
+
const R = P.div`
|
|
11
11
|
display: grid;
|
|
12
12
|
grid-template-columns: ${(t) => `repeat(${t.limit}, minmax(0, 1fr))`};
|
|
13
13
|
gap: 1.25rem;
|
|
14
14
|
|
|
15
|
-
@media (max-width: ${
|
|
15
|
+
@media (max-width: ${D + "px"}) {
|
|
16
16
|
display: flex;
|
|
17
17
|
gap: 1rem;
|
|
18
18
|
overflow-x: auto;
|
|
@@ -31,23 +31,25 @@ const I = U.div`
|
|
|
31
31
|
/* Safari and Chrome */
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
`,
|
|
34
|
+
`, f = N(E), O = U((t, b) => {
|
|
35
35
|
const {
|
|
36
36
|
icon: n,
|
|
37
|
-
title:
|
|
37
|
+
title: y,
|
|
38
38
|
buttonLink: s,
|
|
39
39
|
items: r,
|
|
40
|
-
buttonText:
|
|
40
|
+
buttonText: S,
|
|
41
41
|
limit: o = 4,
|
|
42
42
|
onSelectCard: d = () => {
|
|
43
43
|
},
|
|
44
|
-
onButtonAction:
|
|
44
|
+
onButtonAction: C = () => {
|
|
45
45
|
},
|
|
46
|
-
isLoading:
|
|
46
|
+
isLoading: h = !1,
|
|
47
47
|
getImage: m = () => {
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
},
|
|
49
|
+
negotiableText: c,
|
|
50
|
+
freeText: u
|
|
51
|
+
} = t, p = M(), w = v(() => /* @__PURE__ */ i(k, { children: p === !0 ? r == null ? void 0 : r.map((e, l) => /* @__PURE__ */ i(
|
|
52
|
+
f,
|
|
51
53
|
{
|
|
52
54
|
title: e == null ? void 0 : e.name,
|
|
53
55
|
price: e == null ? void 0 : e.price,
|
|
@@ -60,11 +62,13 @@ const I = U.div`
|
|
|
60
62
|
onSelectCard: () => d(e == null ? void 0 : e.uuid),
|
|
61
63
|
imageUrl: m(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
|
|
62
64
|
isFree: e == null ? void 0 : e.isFree,
|
|
63
|
-
isNegotiable: e == null ? void 0 : e.isNegotiable
|
|
65
|
+
isNegotiable: e == null ? void 0 : e.isNegotiable,
|
|
66
|
+
negotiableText: c,
|
|
67
|
+
freeText: u
|
|
64
68
|
},
|
|
65
69
|
l
|
|
66
70
|
)) : r == null ? void 0 : r.slice(0, o).map((e, l) => /* @__PURE__ */ i(
|
|
67
|
-
|
|
71
|
+
f,
|
|
68
72
|
{
|
|
69
73
|
title: e == null ? void 0 : e.name,
|
|
70
74
|
price: e == null ? void 0 : e.price,
|
|
@@ -78,39 +82,41 @@ const I = U.div`
|
|
|
78
82
|
onSelectCard: () => d(e == null ? void 0 : e.uuid),
|
|
79
83
|
imageUrl: m(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
|
|
80
84
|
isFree: e == null ? void 0 : e.isFree,
|
|
81
|
-
isNegotiable: e == null ? void 0 : e.isNegotiable
|
|
85
|
+
isNegotiable: e == null ? void 0 : e.isNegotiable,
|
|
86
|
+
negotiableText: c,
|
|
87
|
+
freeText: u
|
|
82
88
|
},
|
|
83
89
|
l
|
|
84
|
-
)) }), [r,
|
|
85
|
-
return /* @__PURE__ */ a(
|
|
90
|
+
)) }), [r, p, o]);
|
|
91
|
+
return /* @__PURE__ */ a(T, { ref: b, children: [
|
|
86
92
|
/* @__PURE__ */ a("div", { className: "regular-title", children: [
|
|
87
93
|
/* @__PURE__ */ a("div", { className: "regular-title-text", children: [
|
|
88
|
-
|
|
89
|
-
/* @__PURE__ */ i("span", { children:
|
|
94
|
+
g(n) && /* @__PURE__ */ i("i", { className: n }),
|
|
95
|
+
/* @__PURE__ */ i("span", { children: y })
|
|
90
96
|
] }),
|
|
91
|
-
|
|
92
|
-
|
|
97
|
+
g(s) && /* @__PURE__ */ i(
|
|
98
|
+
F,
|
|
93
99
|
{
|
|
94
100
|
type: "button",
|
|
95
101
|
btnType: "tinted",
|
|
96
102
|
color: "gray",
|
|
97
|
-
onClick: () =>
|
|
103
|
+
onClick: () => C(s),
|
|
98
104
|
borderRadius: "curved",
|
|
99
|
-
children:
|
|
105
|
+
children: S
|
|
100
106
|
}
|
|
101
107
|
)
|
|
102
108
|
] }),
|
|
103
|
-
/* @__PURE__ */ i(
|
|
104
|
-
|
|
109
|
+
/* @__PURE__ */ i(R, { limit: o, children: /* @__PURE__ */ i(
|
|
110
|
+
I,
|
|
105
111
|
{
|
|
106
|
-
isLoading:
|
|
112
|
+
isLoading: h,
|
|
107
113
|
itemsCount: o,
|
|
108
114
|
keyPrefix: "explore-landing",
|
|
109
|
-
children:
|
|
115
|
+
children: w
|
|
110
116
|
}
|
|
111
117
|
) })
|
|
112
118
|
] });
|
|
113
119
|
});
|
|
114
120
|
export {
|
|
115
|
-
|
|
121
|
+
O as default
|
|
116
122
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const r=require("react/jsx-runtime"),n=require("react"),
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),n=require("react"),S=require("./emotion-styled.browser.esm-BtEseadx.cjs"),k=require("./consts-CtNoHdBj.cjs"),M=require("./useDetectMobile-D6d5LpdL.cjs"),U=require("./index-DtHiKRz3.cjs"),F=require("./index-BxlCwYfi.cjs"),N=require("./suspense-product-card-simple-DsoMkamD.cjs"),v=S.styled.div`
|
|
2
2
|
display: grid;
|
|
3
3
|
grid-template-columns: repeat(6, 1fr);
|
|
4
4
|
gap: 1.25rem;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
margin: auto;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
@media (max-width: ${
|
|
12
|
+
@media (max-width: ${k.MOBILE_SIZE_PX+"px"}) {
|
|
13
13
|
grid-template-columns: repeat(2, 1fr);
|
|
14
14
|
|
|
15
15
|
& .text-block-v1 {
|
|
@@ -28,4 +28,4 @@
|
|
|
28
28
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
`,
|
|
31
|
+
`,m=n.memo(U.SimpleProductCard),T=n.forwardRef((p,g)=>{const{title:b,subtitle:h,description:w,buttonText:q,buttonLink:y,items:i,onButtonAction:P=()=>{},onSelectCard:t=()=>{},isLoading:f=!1,limit:s=6,getImage:o=()=>{},negotiableText:c,freeText:l}=p,d=M.useDetectMobile(),j=n.useMemo(()=>{var a;return r.jsx(r.Fragment,{children:d===!0?(a=i==null?void 0:i.slice(0,4))==null?void 0:a.map((e,u)=>r.jsx(m,{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,onSelectCard:()=>t==null?void 0:t(e==null?void 0:e.uuid),image:o(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,negotiableText:c,freeText:l},u)):i==null?void 0:i.map((e,u)=>r.jsx(m,{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,onSelectCard:()=>t==null?void 0:t(e==null?void 0:e.uuid),image:o(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,negotiableText:c,freeText:l},u))})},[i,d,s]);return r.jsxs(v,{ref:g,limit:s,children:[r.jsx(F.TextBlockV1,{subtitle:h,title:b,description:w,buttonText:q,buttonLink:y,onButtonAction:P,className:"text-block-v1"}),r.jsx(N.SuspenseSimpleProductCard,{isLoading:f,limit:s,keyPrefix:"explore-landing",children:j})]})});module.exports=T;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as t, Fragment as
|
|
2
|
-
import { memo as
|
|
3
|
-
import { s as
|
|
4
|
-
import { M as
|
|
5
|
-
import { u as
|
|
6
|
-
import { S as
|
|
7
|
-
import { T as
|
|
8
|
-
import { S as
|
|
9
|
-
const
|
|
1
|
+
import { jsx as t, Fragment as k, jsxs as M } from "react/jsx-runtime";
|
|
2
|
+
import { memo as U, forwardRef as F, useMemo as N } from "react";
|
|
3
|
+
import { s as T } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
|
+
import { M as v } from "./consts-C1uHV4xc.js";
|
|
5
|
+
import { u as B } from "./useDetectMobile-BC6EGaBc.js";
|
|
6
|
+
import { S as I } from "./index-Nse1QFaT.js";
|
|
7
|
+
import { T as L } from "./index-CpuLfTNK.js";
|
|
8
|
+
import { S as j } from "./suspense-product-card-simple-D8c7FIDz.js";
|
|
9
|
+
const z = T.div`
|
|
10
10
|
display: grid;
|
|
11
11
|
grid-template-columns: repeat(6, 1fr);
|
|
12
12
|
gap: 1.25rem;
|
|
@@ -17,7 +17,7 @@ const T = F.div`
|
|
|
17
17
|
margin: auto;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
@media (max-width: ${
|
|
20
|
+
@media (max-width: ${v + "px"}) {
|
|
21
21
|
grid-template-columns: repeat(2, 1fr);
|
|
22
22
|
|
|
23
23
|
& .text-block-v1 {
|
|
@@ -36,26 +36,28 @@ const T = F.div`
|
|
|
36
36
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
`,
|
|
39
|
+
`, n = U(I), V = F((c, p) => {
|
|
40
40
|
const {
|
|
41
|
-
title:
|
|
42
|
-
subtitle:
|
|
43
|
-
description:
|
|
44
|
-
buttonText:
|
|
45
|
-
buttonLink:
|
|
41
|
+
title: g,
|
|
42
|
+
subtitle: f,
|
|
43
|
+
description: b,
|
|
44
|
+
buttonText: h,
|
|
45
|
+
buttonLink: w,
|
|
46
46
|
items: i,
|
|
47
|
-
onButtonAction:
|
|
47
|
+
onButtonAction: y = () => {
|
|
48
48
|
},
|
|
49
49
|
onSelectCard: r = () => {
|
|
50
50
|
},
|
|
51
|
-
isLoading:
|
|
51
|
+
isLoading: P = !1,
|
|
52
52
|
limit: o = 6,
|
|
53
|
-
getImage:
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
53
|
+
getImage: l = () => {
|
|
54
|
+
},
|
|
55
|
+
negotiableText: m,
|
|
56
|
+
freeText: s
|
|
57
|
+
} = c, d = B(), S = N(() => {
|
|
58
|
+
var a;
|
|
59
|
+
return /* @__PURE__ */ t(k, { children: d === !0 ? (a = i == null ? void 0 : i.slice(0, 4)) == null ? void 0 : a.map((e, u) => /* @__PURE__ */ t(
|
|
60
|
+
n,
|
|
59
61
|
{
|
|
60
62
|
title: e == null ? void 0 : e.name,
|
|
61
63
|
price: e == null ? void 0 : e.price,
|
|
@@ -65,11 +67,13 @@ const T = F.div`
|
|
|
65
67
|
sellerUuid: e == null ? void 0 : e.sellerUuid,
|
|
66
68
|
uuid: e == null ? void 0 : e.uuid,
|
|
67
69
|
onSelectCard: () => r == null ? void 0 : r(e == null ? void 0 : e.uuid),
|
|
68
|
-
image:
|
|
70
|
+
image: l(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
|
|
71
|
+
negotiableText: m,
|
|
72
|
+
freeText: s
|
|
69
73
|
},
|
|
70
74
|
u
|
|
71
75
|
)) : i == null ? void 0 : i.map((e, u) => /* @__PURE__ */ t(
|
|
72
|
-
|
|
76
|
+
n,
|
|
73
77
|
{
|
|
74
78
|
title: e == null ? void 0 : e.name,
|
|
75
79
|
price: e == null ? void 0 : e.price,
|
|
@@ -79,35 +83,37 @@ const T = F.div`
|
|
|
79
83
|
sellerUuid: e == null ? void 0 : e.sellerUuid,
|
|
80
84
|
uuid: e == null ? void 0 : e.uuid,
|
|
81
85
|
onSelectCard: () => r == null ? void 0 : r(e == null ? void 0 : e.uuid),
|
|
82
|
-
image:
|
|
86
|
+
image: l(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
|
|
87
|
+
negotiableText: m,
|
|
88
|
+
freeText: s
|
|
83
89
|
},
|
|
84
90
|
u
|
|
85
91
|
)) });
|
|
86
|
-
}, [i,
|
|
87
|
-
return /* @__PURE__ */
|
|
92
|
+
}, [i, d, o]);
|
|
93
|
+
return /* @__PURE__ */ M(z, { ref: p, limit: o, children: [
|
|
88
94
|
/* @__PURE__ */ t(
|
|
89
|
-
|
|
95
|
+
L,
|
|
90
96
|
{
|
|
91
|
-
subtitle:
|
|
92
|
-
title:
|
|
93
|
-
description:
|
|
94
|
-
buttonText:
|
|
95
|
-
buttonLink:
|
|
96
|
-
onButtonAction:
|
|
97
|
+
subtitle: f,
|
|
98
|
+
title: g,
|
|
99
|
+
description: b,
|
|
100
|
+
buttonText: h,
|
|
101
|
+
buttonLink: w,
|
|
102
|
+
onButtonAction: y,
|
|
97
103
|
className: "text-block-v1"
|
|
98
104
|
}
|
|
99
105
|
),
|
|
100
106
|
/* @__PURE__ */ t(
|
|
101
|
-
|
|
107
|
+
j,
|
|
102
108
|
{
|
|
103
|
-
isLoading:
|
|
109
|
+
isLoading: P,
|
|
104
110
|
limit: o,
|
|
105
111
|
keyPrefix: "explore-landing",
|
|
106
|
-
children:
|
|
112
|
+
children: S
|
|
107
113
|
}
|
|
108
114
|
)
|
|
109
115
|
] });
|
|
110
116
|
});
|
|
111
117
|
export {
|
|
112
|
-
|
|
118
|
+
V as default
|
|
113
119
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const i=require("react/jsx-runtime"),a=require("react"),
|
|
1
|
+
"use strict";const i=require("react/jsx-runtime"),a=require("react"),v=require("./emotion-styled.browser.esm-BtEseadx.cjs"),M=require("./consts-CtNoHdBj.cjs"),P=require("./useDetectMobile-D6d5LpdL.cjs"),q=require("./Button.cjs"),h=require("./suspense-product-card-detailed-ByYXsGae.cjs"),C=v.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))`};
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
@media (max-width: ${
|
|
57
|
+
@media (max-width: ${M.MOBILE_SIZE_PX+"px"}) {
|
|
58
58
|
grid-template-columns: repeat(2, 1fr);
|
|
59
59
|
padding: 2rem 1.25rem;
|
|
60
60
|
gap: 1.19rem;
|
|
@@ -65,4 +65,4 @@
|
|
|
65
65
|
& .img-wrapper {
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
`,
|
|
68
|
+
`,f=a.memo(h.DetailedProductCard),N=a.forwardRef((t,b)=>{const{items:r,limit:o=5,limitMobile:n=6,onSelectCard:s=()=>{},title:w="Urgent sale",showLessText:y="Show less",showMoreText:S="Show more",isLoading:j=!1,getImage:u=()=>{},negotiableText:m,freeText:g}=t,l=P.useDetectMobile(),[d,k]=a.useState(!1),U=a.useMemo(()=>{var p;return i.jsx(i.Fragment,{children:l===!0?(p=r==null?void 0:r.slice(0,d===!0?r==null?void 0:r.length:n))==null?void 0:p.map((e,c)=>i.jsx(f,{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:u(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,negotiableText:m,freeText:g},c)):r==null?void 0:r.slice(0,o).map((e,c)=>i.jsx(f,{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:u(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,negotiableText:m,freeText:g},c))})},[r,l,o,n]);return i.jsxs(C,{ref:b,limit:o,children:[i.jsxs("div",{className:"urgent-tag",children:[i.jsx("i",{className:"mng mng-lnc-bolt-filled"}),i.jsx("span",{children:w})]}),i.jsx(h.SuspenseDetailedProductCard,{isLoading:j,limit:o,keyPrefix:"explore-landing",children:U}),l===!0&&n<(r==null?void 0:r.length)&&i.jsx(q,{className:"show-more",btnType:"basic",type:"button",color:"gray",onClick:()=>k(!d),children:d===!0?y:S})]})});module.exports=N;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as o, Fragment as
|
|
2
|
-
import { memo as
|
|
3
|
-
import { s as
|
|
4
|
-
import { M as
|
|
5
|
-
import { u as
|
|
6
|
-
import
|
|
7
|
-
import { D, S as
|
|
8
|
-
const
|
|
1
|
+
import { jsx as o, Fragment as v, jsxs as p } from "react/jsx-runtime";
|
|
2
|
+
import { memo as M, forwardRef as N, useState as P, useMemo as C } from "react";
|
|
3
|
+
import { s as $ } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
|
+
import { M as F } from "./consts-C1uHV4xc.js";
|
|
5
|
+
import { u as T } from "./useDetectMobile-BC6EGaBc.js";
|
|
6
|
+
import D from "./Button.js";
|
|
7
|
+
import { D as j, S as z } from "./suspense-product-card-detailed-vsxuZbEt.js";
|
|
8
|
+
const I = $.div`
|
|
9
9
|
padding: 1.75rem 3rem;
|
|
10
10
|
display: grid;
|
|
11
11
|
grid-template-columns: ${(i) => `repeat(${i.limit || 5}, minmax(0, 1fr))`};
|
|
@@ -61,7 +61,7 @@ const z = P.div`
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
@media (max-width: ${
|
|
64
|
+
@media (max-width: ${F + "px"}) {
|
|
65
65
|
grid-template-columns: repeat(2, 1fr);
|
|
66
66
|
padding: 2rem 1.25rem;
|
|
67
67
|
gap: 1.19rem;
|
|
@@ -72,23 +72,25 @@ const z = P.div`
|
|
|
72
72
|
& .img-wrapper {
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
`,
|
|
75
|
+
`, f = M(j), O = N((i, h) => {
|
|
76
76
|
const {
|
|
77
77
|
items: r,
|
|
78
78
|
limit: t = 5,
|
|
79
79
|
limitMobile: s = 6,
|
|
80
80
|
onSelectCard: a = () => {
|
|
81
81
|
},
|
|
82
|
-
title:
|
|
83
|
-
showLessText:
|
|
84
|
-
showMoreText:
|
|
85
|
-
isLoading:
|
|
82
|
+
title: b = "Urgent sale",
|
|
83
|
+
showLessText: w = "Show less",
|
|
84
|
+
showMoreText: y = "Show more",
|
|
85
|
+
isLoading: S = !1,
|
|
86
86
|
getImage: m = () => {
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
87
|
+
},
|
|
88
|
+
negotiableText: c,
|
|
89
|
+
freeText: u
|
|
90
|
+
} = i, l = T(), [n, k] = P(!1), U = C(() => {
|
|
91
|
+
var g;
|
|
92
|
+
return /* @__PURE__ */ o(v, { children: l === !0 ? (g = r == null ? void 0 : r.slice(0, n === !0 ? r == null ? void 0 : r.length : s)) == null ? void 0 : g.map((e, d) => /* @__PURE__ */ o(
|
|
93
|
+
f,
|
|
92
94
|
{
|
|
93
95
|
title: e == null ? void 0 : e.name,
|
|
94
96
|
price: e == null ? void 0 : e.price,
|
|
@@ -99,11 +101,13 @@ const z = P.div`
|
|
|
99
101
|
uuid: e == null ? void 0 : e.uuid,
|
|
100
102
|
isSponsored: e == null ? void 0 : e.isSponsored,
|
|
101
103
|
onSelectCard: () => a == null ? void 0 : a(e == null ? void 0 : e.uuid),
|
|
102
|
-
imageUrl: m(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null
|
|
104
|
+
imageUrl: m(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
|
|
105
|
+
negotiableText: c,
|
|
106
|
+
freeText: u
|
|
103
107
|
},
|
|
104
108
|
d
|
|
105
109
|
)) : r == null ? void 0 : r.slice(0, t).map((e, d) => /* @__PURE__ */ o(
|
|
106
|
-
|
|
110
|
+
f,
|
|
107
111
|
{
|
|
108
112
|
title: e == null ? void 0 : e.name,
|
|
109
113
|
price: e == null ? void 0 : e.price,
|
|
@@ -115,38 +119,40 @@ const z = P.div`
|
|
|
115
119
|
location: e == null ? void 0 : e.location,
|
|
116
120
|
isSponsored: e == null ? void 0 : e.isSponsored,
|
|
117
121
|
onSelectCard: () => a == null ? void 0 : a(e == null ? void 0 : e.uuid),
|
|
118
|
-
imageUrl: m(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null
|
|
122
|
+
imageUrl: m(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
|
|
123
|
+
negotiableText: c,
|
|
124
|
+
freeText: u
|
|
119
125
|
},
|
|
120
126
|
d
|
|
121
127
|
)) });
|
|
122
128
|
}, [r, l, t, s]);
|
|
123
|
-
return /* @__PURE__ */
|
|
124
|
-
/* @__PURE__ */
|
|
129
|
+
return /* @__PURE__ */ p(I, { ref: h, limit: t, children: [
|
|
130
|
+
/* @__PURE__ */ p("div", { className: "urgent-tag", children: [
|
|
125
131
|
/* @__PURE__ */ o("i", { className: "mng mng-lnc-bolt-filled" }),
|
|
126
|
-
/* @__PURE__ */ o("span", { children:
|
|
132
|
+
/* @__PURE__ */ o("span", { children: b })
|
|
127
133
|
] }),
|
|
128
134
|
/* @__PURE__ */ o(
|
|
129
|
-
|
|
135
|
+
z,
|
|
130
136
|
{
|
|
131
|
-
isLoading:
|
|
137
|
+
isLoading: S,
|
|
132
138
|
limit: t,
|
|
133
139
|
keyPrefix: "explore-landing",
|
|
134
|
-
children:
|
|
140
|
+
children: U
|
|
135
141
|
}
|
|
136
142
|
),
|
|
137
143
|
l === !0 && s < (r == null ? void 0 : r.length) && /* @__PURE__ */ o(
|
|
138
|
-
|
|
144
|
+
D,
|
|
139
145
|
{
|
|
140
146
|
className: "show-more",
|
|
141
147
|
btnType: "basic",
|
|
142
148
|
type: "button",
|
|
143
149
|
color: "gray",
|
|
144
|
-
onClick: () =>
|
|
145
|
-
children: n === !0 ?
|
|
150
|
+
onClick: () => k(!n),
|
|
151
|
+
children: n === !0 ? w : y
|
|
146
152
|
}
|
|
147
153
|
)
|
|
148
154
|
] });
|
|
149
155
|
});
|
|
150
156
|
export {
|
|
151
|
-
|
|
157
|
+
O as default
|
|
152
158
|
};
|
|
@@ -111,4 +111,4 @@
|
|
|
111
111
|
font-size: 1rem;
|
|
112
112
|
color: var(--warning-500, #F59E0B);
|
|
113
113
|
}
|
|
114
|
-
`,b=o.forwardRef(({sponsoredText:t="Sponsored"},i)=>e.jsxs(N,{ref:i,className:"sponsored-line",children:[e.jsx("i",{className:"mng-lnc-paw2"}),e.jsx("span",{children:t})]})),y=o.forwardRef((t,i)=>{const{uuid:a,title:n,price:s,currency:c,isNegotiable:p,isFree:g,imageUrl:u,sellerUuid:P,location:h,isSponsored:x,imageComponent:d,onSelectCard:f=()=>{},freeText:w="Free",negotiableText:j="Negotiable"}=t;return e.jsxs(m,{className:"product-card",onClick:f,children:[r.isDefined(d)?d:e.jsx(k.ProductImageWrapper,{src:u}),e.jsx("div",{className:"wrapper-card-1",children:e.jsx("div",{className:"card-title",children:n})}),e.jsxs("div",{className:"wrapper-card-2",children:[e.jsxs("div",{className:"price-text",children:[s&&c&&`${r.formatPrice(s)} ${r.GetCurrencySymbol(c)}`,p&&
|
|
114
|
+
`,b=o.forwardRef(({sponsoredText:t="Sponsored"},i)=>e.jsxs(N,{ref:i,className:"sponsored-line",children:[e.jsx("i",{className:"mng-lnc-paw2"}),e.jsx("span",{children:t})]})),y=o.forwardRef((t,i)=>{const{uuid:a,title:n,price:s,currency:c,isNegotiable:p,isFree:g,imageUrl:u,sellerUuid:P,location:h,isSponsored:x,imageComponent:d,onSelectCard:f=()=>{},freeText:w="Free",negotiableText:j="Negotiable"}=t;return e.jsxs(m,{className:"product-card",onClick:f,children:[r.isDefined(d)?d:e.jsx(k.ProductImageWrapper,{src:u}),e.jsx("div",{className:"wrapper-card-1",children:e.jsx("div",{className:"card-title",children:n})}),e.jsxs("div",{className:"wrapper-card-2",children:[e.jsxs("div",{className:"price-text",children:[s&&c&&`${r.formatPrice(s)} ${r.GetCurrencySymbol(c)}`,p&&j,g&&{freeText:w}]}),e.jsx("div",{className:"location-text",children:h})]}),x===!0&&e.jsx(b,{})]})}),$=o.forwardRef(({},t)=>e.jsxs(m,{className:"product-card",children:[e.jsx("img",{className:"skeleton-img"}),e.jsxs("div",{className:"wrapper-card-1",children:[e.jsx("div",{className:"skeleton-title"}),e.jsx("div",{className:"skeleton-tags"})]}),e.jsxs("div",{className:"wrapper-card-1",children:[e.jsx("div",{className:"skeleton-price"}),e.jsx("div",{className:"skeleton-sponsored"})]})]})),S=({limit:t=5,isLoading:i=!1,keyPrefix:a})=>e.jsx(e.Fragment,{children:Array.from({length:t},(n,s)=>e.jsx($,{isLoading:i},`${a}-skeleton-product-card-${s}`))}),C=({children:t,fallbackComponent:i=e.jsx(e.Fragment,{}),isLoading:a=!1,limit:n,keyPrefix:s})=>e.jsx(o.Suspense,{fallbackComponent:i,children:a===!0?e.jsx(S,{isLoading:a,limit:n,keyPrefix:s}):t});exports.DetailedProductCard=y;exports.SuspenseDetailedProductCard=C;
|
|
@@ -146,7 +146,7 @@ const h = g.div`
|
|
|
146
146
|
/* @__PURE__ */ t("div", { className: "wrapper-card-2", children: [
|
|
147
147
|
/* @__PURE__ */ t("div", { className: "price-text", children: [
|
|
148
148
|
a && d && `${P(a)} ${C(d)}`,
|
|
149
|
-
f &&
|
|
149
|
+
f && b,
|
|
150
150
|
u && { freeText: N }
|
|
151
151
|
] }),
|
|
152
152
|
/* @__PURE__ */ e("div", { className: "location-text", children: x })
|