@lanaco/lnc-react-ui 4.0.157 → 4.0.160
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/BlogCardsSponsoredSection.cjs +8 -8
- package/dist/BlogCardsSponsoredSection.js +105 -89
- package/dist/BlogExploreSection.cjs +5 -5
- package/dist/BlogExploreSection.js +88 -84
- package/dist/BlogListSection.cjs +5 -5
- package/dist/BlogListSection.js +139 -126
- package/dist/BlogProductCardsSection.cjs +1 -1
- package/dist/BlogProductCardsSection.js +37 -35
- package/dist/BlogShopCardsSection.cjs +1 -1
- package/dist/BlogShopCardsSection.js +43 -41
- package/dist/BlogSingleSection.cjs +1 -1
- package/dist/BlogSingleSection.js +9 -4
- package/dist/BlogsSectionDetailed.cjs +11 -11
- package/dist/BlogsSectionDetailed.js +122 -108
- package/dist/BlogsSectionLarge.cjs +4 -4
- package/dist/BlogsSectionLarge.js +43 -40
- package/dist/BlogsSectionSimple.cjs +8 -8
- package/dist/BlogsSectionSimple.js +100 -86
- package/dist/BlogsSectionSimpleCentered.cjs +9 -9
- package/dist/BlogsSectionSimpleCentered.js +81 -66
- package/dist/BlogsSectionWithFilters.cjs +11 -11
- package/dist/BlogsSectionWithFilters.js +108 -93
- package/dist/{CustomStyles-Ajyqx0cb.cjs → CustomStyles-BwHfr4iM.cjs} +1 -1
- package/dist/{CustomStyles-DVcu00ul.js → CustomStyles-iconSXFL.js} +0 -1
- package/dist/DetailedProductsInfinitiveSection.cjs +3 -3
- package/dist/DetailedProductsInfinitiveSection.js +29 -27
- package/dist/DetailedProductsSection.cjs +3 -3
- package/dist/DetailedProductsSection.js +76 -65
- package/dist/Dropdown.cjs +1 -1
- package/dist/Dropdown.js +2 -2
- package/dist/DropdownLookup.cjs +1 -1
- package/dist/DropdownLookup.js +1 -1
- package/dist/FieldOfInterestsWithAvatarsCardsSection.cjs +1 -1
- package/dist/FieldOfInterestsWithAvatarsCardsSection.js +1 -1
- package/dist/MultiSelectDropdown.cjs +1 -1
- package/dist/MultiSelectDropdown.js +1 -1
- package/dist/MultiSelectDropdownLookup.cjs +1 -1
- package/dist/MultiSelectDropdownLookup.js +1 -1
- package/dist/ProductsWithBannerSection.cjs +10 -10
- package/dist/ProductsWithBannerSection.js +81 -59
- package/dist/SalesCampaignsSection.cjs +27 -27
- package/dist/SalesCampaignsSection.js +245 -239
- package/dist/ShopCardsSection.cjs +3 -3
- package/dist/ShopCardsSection.js +27 -25
- package/dist/SimpleProductsSection.cjs +3 -3
- package/dist/SimpleProductsSection.js +62 -51
- package/dist/UrgentSaleProductsSection.cjs +6 -6
- package/dist/UrgentSaleProductsSection.js +67 -56
- package/dist/index-1Dm1i6WK.js +52 -0
- package/dist/index-BGTtoLxz.cjs +1 -0
- package/dist/{index-CLoINIGC.cjs → index-DicTpiG0.cjs} +5 -5
- package/dist/{index-BGY3PSA-.js → index-y6sKgrZC.js} +45 -34
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{skeleton-BWFqIToC.js → skeleton-5mO22c5S.js} +94 -84
- package/dist/{skeleton-CanJ6Gr6.cjs → skeleton-Ccd6EDeB.cjs} +8 -8
- package/dist/{suspense-product-card-detailed-BWoxabjZ.js → suspense-product-card-detailed-BZtObEfA.js} +126 -123
- package/dist/{suspense-product-card-detailed-DYyH_jf5.cjs → suspense-product-card-detailed-D-pjVe22.cjs} +7 -7
- package/dist/{suspense-product-card-simple-CrqjSxHI.cjs → suspense-product-card-simple-DJ8UYolb.cjs} +1 -1
- package/dist/{suspense-product-card-simple-CLJjab5B.js → suspense-product-card-simple-ziy0XcLp.js} +1 -1
- package/package.json +1 -1
- package/dist/index-Cm0f72Po.cjs +0 -1
- package/dist/index-DGp7FHms.js +0 -42
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),d=require("react"),u=require("./Button.cjs"),_=require("./skeleton-Ccd6EDeB.cjs"),C=require("./utils-Dl9xPH4c.cjs"),k=require("./emotion-styled.browser.esm-BtEseadx.cjs"),S=require("./consts-goSZX3xP.cjs"),N=k.styled.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
align-items: flex-start;
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
display: none;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
@media (max-width: ${
|
|
86
|
+
@media (max-width: ${S.MOBILE_SIZE_PX+"px"}) {
|
|
87
87
|
& .wrapper__view-all {
|
|
88
88
|
display: unset;
|
|
89
89
|
}
|
|
@@ -126,4 +126,4 @@
|
|
|
126
126
|
}`}
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
|
-
`,
|
|
129
|
+
`,q=d.forwardRef(({title:i,subtitle:o,items:n,limit:g=4,limitForMobile:w=2,buttonText:a="Show More",onSelectCard:f=()=>{},onButtonAction:l=()=>{},icon:p,getImage:h=()=>{},getProductImage:x=()=>{},hideProducts:y=!1,showRating:c=!0,gridView:r=!1,componentName:v},b)=>{var m;return t.jsxs(N,{ref:b,limitCards:g,limitCardsForMobile:w,gridView:r,children:[t.jsxs("div",{className:"wrapper__heading",children:[t.jsxs("div",{className:"wrapper__title",children:[i&&t.jsxs("div",{className:"title__text",children:[C.isDefinedNotEmptyString(p)&&t.jsx("i",{className:p}),t.jsx("span",{children:i})]}),l&&t.jsx(u,{text:a,color:"neutral",borderRadius:"curved",btnType:"tinted",className:`title__action ${r?"grid":""}`,onClick:l})]}),o&&t.jsx("div",{className:"wrapper__subtitle",children:o})]}),t.jsx("div",{className:"wrapper__cards",children:n&&(n==null?void 0:n.length)>0?n==null?void 0:n.map((e,s)=>t.jsx(_.ShopCard,{showRating:c,uuid:e==null?void 0:e.uuid,title:e==null?void 0:e.name,subtitle:e==null?void 0:e.shortDescription,rating:e==null?void 0:e.ratingArithmeticMean,reviewCount:e==null?void 0:e.reviewCount,products:e==null?void 0:e.products,imageComponent:e==null?void 0:e.imageComponent,onSelectCard:($,j)=>f(e==null?void 0:e.uuid,j),image:h(e==null?void 0:e.profileImage,e==null?void 0:e.uuid)||null,getProductImage:x,canAcceptPayments:e==null?void 0:e.canAcceptPayments,hideProducts:y,metadata:{name:v,accessor:e==null?void 0:e.accessor}},`shop-card__${s+1}`)):(m=Array.from("1234"))==null?void 0:m.map((e,s)=>t.jsx(_.ShopCardSkeleton,{},`shop-card-skeleton__${s+1}`))}),r&&l&&t.jsx(u,{text:a,borderRadius:"curved",btnType:"basic",color:"neutral",className:"wrapper__view-all",onClick:l})]})});module.exports=q;
|
package/dist/ShopCardsSection.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsxs as n, jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
2
|
+
import { forwardRef as C } from "react";
|
|
3
3
|
import _ from "./Button.js";
|
|
4
|
-
import { S as
|
|
5
|
-
import { k } from "./utils-BdsZgOUE.js";
|
|
6
|
-
import { s as
|
|
7
|
-
import { M
|
|
8
|
-
const
|
|
4
|
+
import { S as k, a as S } from "./skeleton-5mO22c5S.js";
|
|
5
|
+
import { k as N } from "./utils-BdsZgOUE.js";
|
|
6
|
+
import { s as $ } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
7
|
+
import { M } from "./consts-BuFChS64.js";
|
|
8
|
+
const j = $.div`
|
|
9
9
|
display: flex;
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
align-items: flex-start;
|
|
@@ -90,7 +90,7 @@ const $ = S.div`
|
|
|
90
90
|
display: none;
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
@media (max-width: ${
|
|
93
|
+
@media (max-width: ${M + "px"}) {
|
|
94
94
|
& .wrapper__view-all {
|
|
95
95
|
display: unset;
|
|
96
96
|
}
|
|
@@ -133,17 +133,17 @@ const $ = S.div`
|
|
|
133
133
|
}`}
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
|
-
`,
|
|
136
|
+
`, L = C(
|
|
137
137
|
({
|
|
138
138
|
title: t,
|
|
139
139
|
subtitle: s,
|
|
140
|
-
items:
|
|
140
|
+
items: l,
|
|
141
141
|
limit: g = 4,
|
|
142
142
|
limitForMobile: u = 2,
|
|
143
143
|
buttonText: p = "Show More",
|
|
144
144
|
onSelectCard: w = () => {
|
|
145
145
|
},
|
|
146
|
-
onButtonAction:
|
|
146
|
+
onButtonAction: r = () => {
|
|
147
147
|
},
|
|
148
148
|
icon: m,
|
|
149
149
|
getImage: h = () => {
|
|
@@ -152,13 +152,14 @@ const $ = S.div`
|
|
|
152
152
|
},
|
|
153
153
|
hideProducts: v = !1,
|
|
154
154
|
showRating: x = !0,
|
|
155
|
-
gridView: o = !1
|
|
156
|
-
|
|
155
|
+
gridView: o = !1,
|
|
156
|
+
componentName: b
|
|
157
|
+
}, c) => {
|
|
157
158
|
var f;
|
|
158
159
|
return /* @__PURE__ */ n(
|
|
159
|
-
|
|
160
|
+
j,
|
|
160
161
|
{
|
|
161
|
-
ref:
|
|
162
|
+
ref: c,
|
|
162
163
|
limitCards: g,
|
|
163
164
|
limitCardsForMobile: u,
|
|
164
165
|
gridView: o,
|
|
@@ -166,10 +167,10 @@ const $ = S.div`
|
|
|
166
167
|
/* @__PURE__ */ n("div", { className: "wrapper__heading", children: [
|
|
167
168
|
/* @__PURE__ */ n("div", { className: "wrapper__title", children: [
|
|
168
169
|
t && /* @__PURE__ */ n("div", { className: "title__text", children: [
|
|
169
|
-
|
|
170
|
+
N(m) && /* @__PURE__ */ i("i", { className: m }),
|
|
170
171
|
/* @__PURE__ */ i("span", { children: t })
|
|
171
172
|
] }),
|
|
172
|
-
|
|
173
|
+
r && /* @__PURE__ */ i(
|
|
173
174
|
_,
|
|
174
175
|
{
|
|
175
176
|
text: p,
|
|
@@ -177,14 +178,14 @@ const $ = S.div`
|
|
|
177
178
|
borderRadius: "curved",
|
|
178
179
|
btnType: "tinted",
|
|
179
180
|
className: `title__action ${o ? "grid" : ""}`,
|
|
180
|
-
onClick:
|
|
181
|
+
onClick: r
|
|
181
182
|
}
|
|
182
183
|
)
|
|
183
184
|
] }),
|
|
184
185
|
s && /* @__PURE__ */ i("div", { className: "wrapper__subtitle", children: s })
|
|
185
186
|
] }),
|
|
186
|
-
/* @__PURE__ */ i("div", { className: "wrapper__cards", children:
|
|
187
|
-
|
|
187
|
+
/* @__PURE__ */ i("div", { className: "wrapper__cards", children: l && (l == null ? void 0 : l.length) > 0 ? l == null ? void 0 : l.map((e, a) => /* @__PURE__ */ i(
|
|
188
|
+
k,
|
|
188
189
|
{
|
|
189
190
|
showRating: x,
|
|
190
191
|
uuid: e == null ? void 0 : e.uuid,
|
|
@@ -194,15 +195,16 @@ const $ = S.div`
|
|
|
194
195
|
reviewCount: e == null ? void 0 : e.reviewCount,
|
|
195
196
|
products: e == null ? void 0 : e.products,
|
|
196
197
|
imageComponent: e == null ? void 0 : e.imageComponent,
|
|
197
|
-
onSelectCard: () => w(e == null ? void 0 : e.uuid),
|
|
198
|
+
onSelectCard: (z, d) => w(e == null ? void 0 : e.uuid, d),
|
|
198
199
|
image: h(e == null ? void 0 : e.profileImage, e == null ? void 0 : e.uuid) || null,
|
|
199
200
|
getProductImage: y,
|
|
200
201
|
canAcceptPayments: e == null ? void 0 : e.canAcceptPayments,
|
|
201
|
-
hideProducts: v
|
|
202
|
+
hideProducts: v,
|
|
203
|
+
metadata: { name: b, accessor: e == null ? void 0 : e.accessor }
|
|
202
204
|
},
|
|
203
205
|
`shop-card__${a + 1}`
|
|
204
|
-
)) : (f = Array.from("1234")) == null ? void 0 : f.map((e, a) => /* @__PURE__ */ i(
|
|
205
|
-
o &&
|
|
206
|
+
)) : (f = Array.from("1234")) == null ? void 0 : f.map((e, a) => /* @__PURE__ */ i(S, {}, `shop-card-skeleton__${a + 1}`)) }),
|
|
207
|
+
o && r && /* @__PURE__ */ i(
|
|
206
208
|
_,
|
|
207
209
|
{
|
|
208
210
|
text: p,
|
|
@@ -210,7 +212,7 @@ const $ = S.div`
|
|
|
210
212
|
btnType: "basic",
|
|
211
213
|
color: "neutral",
|
|
212
214
|
className: "wrapper__view-all",
|
|
213
|
-
onClick:
|
|
215
|
+
onClick: r
|
|
214
216
|
}
|
|
215
217
|
)
|
|
216
218
|
]
|
|
@@ -219,5 +221,5 @@ const $ = S.div`
|
|
|
219
221
|
}
|
|
220
222
|
);
|
|
221
223
|
export {
|
|
222
|
-
|
|
224
|
+
L as default
|
|
223
225
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),n=require("react"),N=require("./emotion-styled.browser.esm-BtEseadx.cjs"),U=require("./consts-goSZX3xP.cjs"),F=require("./useDetectMobile-zkbzoOGV.cjs"),v=require("./index-DicTpiG0.cjs"),T=require("./index-CSgGox95.cjs"),_=require("./suspense-product-card-simple-DJ8UYolb.cjs"),B=N.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: ${U.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
|
+
`,b=n.memo(v.SimpleProductCard),I=n.forwardRef((S,h)=>{const{title:w,subtitle:q,description:y,buttonText:P,buttonLink:f,items:i,onButtonAction:j=()=>{},onSelectCard:c=()=>{},isLoading:C=!1,limit:r=6,getImage:o=()=>{},negotiableText:a,freeText:l,componentName:d}=S,m=F.useDetectMobile(),k=n.useMemo(()=>{var p,g;return t.jsx(t.Fragment,{children:m===!0?(p=i==null?void 0:i.slice(0,4))==null?void 0:p.map((e,s)=>t.jsx(b,{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:(M,u)=>c({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug,cardRef:u}),image:o(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,negotiableText:a,freeText:l,metadata:{name:d,accessor:e==null?void 0:e.accessor}},s)):(g=i==null?void 0:i.slice(0,9))==null?void 0:g.map((e,s)=>t.jsx(b,{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:(M,u)=>c({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug,cardRef:u}),image:o(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,negotiableText:a,freeText:l,metadata:{name:d,accessor:e==null?void 0:e.accessor}},s))})},[i,m,r]);return t.jsxs(B,{ref:h,limit:r,children:[t.jsx(T.TextBlockV1,{subtitle:q,title:w,description:y,buttonText:P,buttonLink:f,onButtonAction:j,className:"text-block-v1"}),t.jsx(_.SuspenseSimpleProductCard,{isLoading:C,limit:r,keyPrefix:"explore-landing",children:k})]})});module.exports=I;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as r, 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 r, Fragment as U, jsxs as F } from "react/jsx-runtime";
|
|
2
|
+
import { memo as T, forwardRef as v, useMemo as B } from "react";
|
|
3
|
+
import { s as I } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
|
+
import { M as L } from "./consts-BuFChS64.js";
|
|
5
|
+
import { u as j } from "./useDetectMobile-Bkvj0VMa.js";
|
|
6
|
+
import { S as z } from "./index-y6sKgrZC.js";
|
|
7
|
+
import { T as E } from "./index-DK8dqEUQ.js";
|
|
8
|
+
import { S as _ } from "./suspense-product-card-simple-ziy0XcLp.js";
|
|
9
|
+
const A = I.div`
|
|
10
10
|
display: grid;
|
|
11
11
|
grid-template-columns: repeat(6, 1fr);
|
|
12
12
|
gap: 1.25rem;
|
|
@@ -17,7 +17,7 @@ const z = T.div`
|
|
|
17
17
|
margin: auto;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
@media (max-width: ${
|
|
20
|
+
@media (max-width: ${L + "px"}) {
|
|
21
21
|
grid-template-columns: repeat(2, 1fr);
|
|
22
22
|
|
|
23
23
|
& .text-block-v1 {
|
|
@@ -36,28 +36,29 @@ const z = T.div`
|
|
|
36
36
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
`,
|
|
39
|
+
`, g = T(z), $ = v((f, S) => {
|
|
40
40
|
const {
|
|
41
|
-
title:
|
|
42
|
-
subtitle:
|
|
43
|
-
description:
|
|
44
|
-
buttonText:
|
|
45
|
-
buttonLink:
|
|
41
|
+
title: b,
|
|
42
|
+
subtitle: h,
|
|
43
|
+
description: w,
|
|
44
|
+
buttonText: y,
|
|
45
|
+
buttonLink: P,
|
|
46
46
|
items: i,
|
|
47
|
-
onButtonAction:
|
|
47
|
+
onButtonAction: k = () => {
|
|
48
48
|
},
|
|
49
|
-
onSelectCard:
|
|
49
|
+
onSelectCard: u = () => {
|
|
50
50
|
},
|
|
51
|
-
isLoading:
|
|
51
|
+
isLoading: C = !1,
|
|
52
52
|
limit: t = 6,
|
|
53
|
-
getImage:
|
|
53
|
+
getImage: m = () => {
|
|
54
54
|
},
|
|
55
|
-
negotiableText:
|
|
56
|
-
freeText:
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
55
|
+
negotiableText: l,
|
|
56
|
+
freeText: s,
|
|
57
|
+
componentName: d
|
|
58
|
+
} = f, n = j(), M = B(() => {
|
|
59
|
+
var c, p;
|
|
60
|
+
return /* @__PURE__ */ r(U, { children: n === !0 ? (c = i == null ? void 0 : i.slice(0, 4)) == null ? void 0 : c.map((e, a) => /* @__PURE__ */ r(
|
|
61
|
+
g,
|
|
61
62
|
{
|
|
62
63
|
title: e == null ? void 0 : e.name,
|
|
63
64
|
price: e == null ? void 0 : e.price,
|
|
@@ -66,14 +67,19 @@ const z = T.div`
|
|
|
66
67
|
currency: e == null ? void 0 : e.currency,
|
|
67
68
|
sellerUuid: e == null ? void 0 : e.sellerUuid,
|
|
68
69
|
uuid: e == null ? void 0 : e.uuid,
|
|
69
|
-
onSelectCard: () =>
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
onSelectCard: (N, o) => u({
|
|
71
|
+
uuid: e == null ? void 0 : e.uuid,
|
|
72
|
+
nameSlug: e == null ? void 0 : e.nameSlug,
|
|
73
|
+
cardRef: o
|
|
74
|
+
}),
|
|
75
|
+
image: m(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
|
|
76
|
+
negotiableText: l,
|
|
77
|
+
freeText: s,
|
|
78
|
+
metadata: { name: d, accessor: e == null ? void 0 : e.accessor }
|
|
73
79
|
},
|
|
74
|
-
|
|
75
|
-
)) : (
|
|
76
|
-
|
|
80
|
+
a
|
|
81
|
+
)) : (p = i == null ? void 0 : i.slice(0, 9)) == null ? void 0 : p.map((e, a) => /* @__PURE__ */ r(
|
|
82
|
+
g,
|
|
77
83
|
{
|
|
78
84
|
title: e == null ? void 0 : e.name,
|
|
79
85
|
price: e == null ? void 0 : e.price,
|
|
@@ -82,38 +88,43 @@ const z = T.div`
|
|
|
82
88
|
currency: e == null ? void 0 : e.currency,
|
|
83
89
|
sellerUuid: e == null ? void 0 : e.sellerUuid,
|
|
84
90
|
uuid: e == null ? void 0 : e.uuid,
|
|
85
|
-
onSelectCard: () =>
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
91
|
+
onSelectCard: (N, o) => u({
|
|
92
|
+
uuid: e == null ? void 0 : e.uuid,
|
|
93
|
+
nameSlug: e == null ? void 0 : e.nameSlug,
|
|
94
|
+
cardRef: o
|
|
95
|
+
}),
|
|
96
|
+
image: m(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
|
|
97
|
+
negotiableText: l,
|
|
98
|
+
freeText: s,
|
|
99
|
+
metadata: { name: d, accessor: e == null ? void 0 : e.accessor }
|
|
89
100
|
},
|
|
90
|
-
|
|
101
|
+
a
|
|
91
102
|
)) });
|
|
92
|
-
}, [i,
|
|
93
|
-
return /* @__PURE__ */
|
|
103
|
+
}, [i, n, t]);
|
|
104
|
+
return /* @__PURE__ */ F(A, { ref: S, limit: t, children: [
|
|
94
105
|
/* @__PURE__ */ r(
|
|
95
|
-
|
|
106
|
+
E,
|
|
96
107
|
{
|
|
97
|
-
subtitle:
|
|
98
|
-
title:
|
|
99
|
-
description:
|
|
100
|
-
buttonText:
|
|
101
|
-
buttonLink:
|
|
102
|
-
onButtonAction:
|
|
108
|
+
subtitle: h,
|
|
109
|
+
title: b,
|
|
110
|
+
description: w,
|
|
111
|
+
buttonText: y,
|
|
112
|
+
buttonLink: P,
|
|
113
|
+
onButtonAction: k,
|
|
103
114
|
className: "text-block-v1"
|
|
104
115
|
}
|
|
105
116
|
),
|
|
106
117
|
/* @__PURE__ */ r(
|
|
107
|
-
|
|
118
|
+
_,
|
|
108
119
|
{
|
|
109
|
-
isLoading:
|
|
120
|
+
isLoading: C,
|
|
110
121
|
limit: t,
|
|
111
122
|
keyPrefix: "explore-landing",
|
|
112
|
-
children:
|
|
123
|
+
children: M
|
|
113
124
|
}
|
|
114
125
|
)
|
|
115
126
|
] });
|
|
116
127
|
});
|
|
117
128
|
export {
|
|
118
|
-
|
|
129
|
+
$ as default
|
|
119
130
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const o=require("react/jsx-runtime"),n=require("react"),q=require("./emotion-styled.browser.esm-BtEseadx.cjs"),S=require("./consts-goSZX3xP.cjs"),_=require("./useDetectMobile-zkbzoOGV.cjs"),$=require("./Button.cjs"),y=require("./suspense-product-card-detailed-D-pjVe22.cjs"),D=q.styled.div`
|
|
2
2
|
padding: 1.75rem 3rem;
|
|
3
3
|
display: grid;
|
|
4
|
-
grid-template-columns: ${
|
|
4
|
+
grid-template-columns: ${a=>`repeat(${a.limit||5}, minmax(0, 1fr))`};
|
|
5
5
|
|
|
6
6
|
gap: 2.97rem;
|
|
7
7
|
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
& .product-card {
|
|
37
|
-
max-width: ${
|
|
37
|
+
max-width: ${a=>`calc(${100/a.desktopCols}% - ${(a.desktopCols-1)*a.columnGapRem/a.desktopCols}rem)`};
|
|
38
38
|
|
|
39
39
|
animation-duration: 0.2s;
|
|
40
40
|
animation-name: animate-fade;
|
|
@@ -54,13 +54,13 @@
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
@media (max-width: ${
|
|
57
|
+
@media (max-width: ${S.MOBILE_SIZE_PX+"px"}) {
|
|
58
58
|
grid-template-columns: repeat(2, 1fr);
|
|
59
59
|
padding: 2rem 1.25rem;
|
|
60
60
|
gap: 1.19rem;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
@media (max-width: ${
|
|
63
|
+
@media (max-width: ${S.SMALL_MOBILE_SIZE_PX+"px"}) {
|
|
64
64
|
display: flex;
|
|
65
65
|
flex-direction: column;
|
|
66
66
|
|
|
@@ -71,4 +71,4 @@
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
`,
|
|
74
|
+
`,w=n.memo(y.DetailedProductCard),F=n.forwardRef((a,C)=>{const{items:r,limit:t=5,limitMobile:l=4,onSelectCard:u=()=>{},title:j="Urgent sale",showLessText:L="Show less",showMoreText:M="Show more",isLoading:U=!1,getImage:g=()=>{},negotiableText:p,freeText:b,onBookmark:f=()=>{},bookmarkComponent:k,componentName:h}=a,d=_.useDetectMobile(),[s,P]=n.useState(!1),v=n.useMemo(()=>{var i;return o.jsx(o.Fragment,{children:d===!0?(i=r==null?void 0:r.slice(0,s===!0?r==null?void 0:r.length:l))==null?void 0:i.map((e,c)=>o.jsx(w,{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:(N,m)=>u({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug,cardRef:m}),imageUrl:g(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,negotiableText:p,freeText:b,onBookmark:f,bookmarkComponent:k,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists,metadata:{name:h,accessor:e==null?void 0:e.accessor}},c)):r==null?void 0:r.slice(0,t).map((e,c)=>o.jsx(w,{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:(N,m)=>u({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug,cardRef:m}),imageUrl:g(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,negotiableText:p,freeText:b,onBookmark:f,bookmarkComponent:k,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists,metadata:{name:h,accessor:e==null?void 0:e.accessor}},c))})},[r,d,t,l,s]);return o.jsxs(D,{ref:C,limit:t,children:[o.jsxs("div",{className:"urgent-tag",children:[o.jsx("i",{className:"mng mng-lnc-bolt-filled"}),o.jsx("span",{children:j})]}),o.jsx(y.SuspenseDetailedProductCard,{isLoading:U,limit:t,keyPrefix:"explore-landing",children:v}),d===!0&&l<(r==null?void 0:r.length)&&o.jsx($,{className:"show-more",btnType:"basic",type:"button",color:"neutral",onClick:i=>{var e;(e=i==null?void 0:i.target)==null||e.blur(),P(!s)},children:s===!0?L:M})]})});module.exports=F;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx 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 a, Fragment as P, jsxs as h } from "react/jsx-runtime";
|
|
2
|
+
import { memo as $, forwardRef as F, useState as I, useMemo as T } from "react";
|
|
3
|
+
import { s as _ } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
|
+
import { M as B, S as D } from "./consts-BuFChS64.js";
|
|
5
|
+
import { u as E } from "./useDetectMobile-Bkvj0VMa.js";
|
|
6
|
+
import j from "./Button.js";
|
|
7
|
+
import { D as z, S as A } from "./suspense-product-card-detailed-BZtObEfA.js";
|
|
8
|
+
const G = _.div`
|
|
9
9
|
padding: 1.75rem 3rem;
|
|
10
10
|
display: grid;
|
|
11
11
|
grid-template-columns: ${(o) => `repeat(${o.limit || 5}, minmax(0, 1fr))`};
|
|
@@ -61,13 +61,13 @@ const j = F.div`
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
@media (max-width: ${
|
|
64
|
+
@media (max-width: ${B + "px"}) {
|
|
65
65
|
grid-template-columns: repeat(2, 1fr);
|
|
66
66
|
padding: 2rem 1.25rem;
|
|
67
67
|
gap: 1.19rem;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
@media (max-width: ${
|
|
70
|
+
@media (max-width: ${D + "px"}) {
|
|
71
71
|
display: flex;
|
|
72
72
|
flex-direction: column;
|
|
73
73
|
|
|
@@ -78,28 +78,29 @@ const j = F.div`
|
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
-
`,
|
|
81
|
+
`, S = $(z), J = F((o, w) => {
|
|
82
82
|
const {
|
|
83
83
|
items: r,
|
|
84
84
|
limit: t = 5,
|
|
85
|
-
limitMobile:
|
|
86
|
-
onSelectCard:
|
|
85
|
+
limitMobile: l = 4,
|
|
86
|
+
onSelectCard: c = () => {
|
|
87
87
|
},
|
|
88
|
-
title:
|
|
89
|
-
showLessText:
|
|
90
|
-
showMoreText:
|
|
91
|
-
isLoading:
|
|
88
|
+
title: y = "Urgent sale",
|
|
89
|
+
showLessText: C = "Show less",
|
|
90
|
+
showMoreText: L = "Show more",
|
|
91
|
+
isLoading: M = !1,
|
|
92
92
|
getImage: u = () => {
|
|
93
93
|
},
|
|
94
|
-
negotiableText:
|
|
95
|
-
freeText:
|
|
96
|
-
onBookmark:
|
|
94
|
+
negotiableText: g,
|
|
95
|
+
freeText: p,
|
|
96
|
+
onBookmark: f = () => {
|
|
97
97
|
},
|
|
98
|
-
bookmarkComponent:
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
98
|
+
bookmarkComponent: b,
|
|
99
|
+
componentName: k
|
|
100
|
+
} = o, n = E(), [s, U] = I(!1), v = T(() => {
|
|
101
|
+
var i;
|
|
102
|
+
return /* @__PURE__ */ a(P, { children: n === !0 ? (i = r == null ? void 0 : r.slice(0, s === !0 ? r == null ? void 0 : r.length : l)) == null ? void 0 : i.map((e, m) => /* @__PURE__ */ a(
|
|
103
|
+
S,
|
|
103
104
|
{
|
|
104
105
|
title: e == null ? void 0 : e.name,
|
|
105
106
|
price: e == null ? void 0 : e.price,
|
|
@@ -109,18 +110,23 @@ const j = F.div`
|
|
|
109
110
|
sellerUuid: e == null ? void 0 : e.sellerUuid,
|
|
110
111
|
uuid: e == null ? void 0 : e.uuid,
|
|
111
112
|
isSponsored: e == null ? void 0 : e.isSponsored,
|
|
112
|
-
onSelectCard: () =>
|
|
113
|
+
onSelectCard: (N, d) => c({
|
|
114
|
+
uuid: e == null ? void 0 : e.uuid,
|
|
115
|
+
nameSlug: e == null ? void 0 : e.nameSlug,
|
|
116
|
+
cardRef: d
|
|
117
|
+
}),
|
|
113
118
|
imageUrl: u(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
|
|
114
|
-
negotiableText:
|
|
115
|
-
freeText:
|
|
116
|
-
onBookmark:
|
|
117
|
-
bookmarkComponent:
|
|
119
|
+
negotiableText: g,
|
|
120
|
+
freeText: p,
|
|
121
|
+
onBookmark: f,
|
|
122
|
+
bookmarkComponent: b,
|
|
118
123
|
bookmarked: e == null ? void 0 : e.bookmarked,
|
|
119
|
-
bookmarkLists: e == null ? void 0 : e.bookmarkLists
|
|
124
|
+
bookmarkLists: e == null ? void 0 : e.bookmarkLists,
|
|
125
|
+
metadata: { name: k, accessor: e == null ? void 0 : e.accessor }
|
|
120
126
|
},
|
|
121
|
-
|
|
122
|
-
)) : r == null ? void 0 : r.slice(0, t).map((e,
|
|
123
|
-
|
|
127
|
+
m
|
|
128
|
+
)) : r == null ? void 0 : r.slice(0, t).map((e, m) => /* @__PURE__ */ a(
|
|
129
|
+
S,
|
|
124
130
|
{
|
|
125
131
|
title: e == null ? void 0 : e.name,
|
|
126
132
|
price: e == null ? void 0 : e.price,
|
|
@@ -131,48 +137,53 @@ const j = F.div`
|
|
|
131
137
|
uuid: e == null ? void 0 : e.uuid,
|
|
132
138
|
location: e == null ? void 0 : e.location,
|
|
133
139
|
isSponsored: e == null ? void 0 : e.isSponsored,
|
|
134
|
-
onSelectCard: () =>
|
|
140
|
+
onSelectCard: (N, d) => c({
|
|
141
|
+
uuid: e == null ? void 0 : e.uuid,
|
|
142
|
+
nameSlug: e == null ? void 0 : e.nameSlug,
|
|
143
|
+
cardRef: d
|
|
144
|
+
}),
|
|
135
145
|
imageUrl: u(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
|
|
136
|
-
negotiableText:
|
|
137
|
-
freeText:
|
|
138
|
-
onBookmark:
|
|
139
|
-
bookmarkComponent:
|
|
146
|
+
negotiableText: g,
|
|
147
|
+
freeText: p,
|
|
148
|
+
onBookmark: f,
|
|
149
|
+
bookmarkComponent: b,
|
|
140
150
|
bookmarked: e == null ? void 0 : e.bookmarked,
|
|
141
|
-
bookmarkLists: e == null ? void 0 : e.bookmarkLists
|
|
151
|
+
bookmarkLists: e == null ? void 0 : e.bookmarkLists,
|
|
152
|
+
metadata: { name: k, accessor: e == null ? void 0 : e.accessor }
|
|
142
153
|
},
|
|
143
|
-
|
|
154
|
+
m
|
|
144
155
|
)) });
|
|
145
|
-
}, [r, n, t,
|
|
146
|
-
return /* @__PURE__ */
|
|
147
|
-
/* @__PURE__ */
|
|
148
|
-
/* @__PURE__ */
|
|
149
|
-
/* @__PURE__ */
|
|
156
|
+
}, [r, n, t, l, s]);
|
|
157
|
+
return /* @__PURE__ */ h(G, { ref: w, limit: t, children: [
|
|
158
|
+
/* @__PURE__ */ h("div", { className: "urgent-tag", children: [
|
|
159
|
+
/* @__PURE__ */ a("i", { className: "mng mng-lnc-bolt-filled" }),
|
|
160
|
+
/* @__PURE__ */ a("span", { children: y })
|
|
150
161
|
] }),
|
|
151
|
-
/* @__PURE__ */
|
|
152
|
-
|
|
162
|
+
/* @__PURE__ */ a(
|
|
163
|
+
A,
|
|
153
164
|
{
|
|
154
|
-
isLoading:
|
|
165
|
+
isLoading: M,
|
|
155
166
|
limit: t,
|
|
156
167
|
keyPrefix: "explore-landing",
|
|
157
|
-
children:
|
|
168
|
+
children: v
|
|
158
169
|
}
|
|
159
170
|
),
|
|
160
|
-
n === !0 &&
|
|
161
|
-
|
|
171
|
+
n === !0 && l < (r == null ? void 0 : r.length) && /* @__PURE__ */ a(
|
|
172
|
+
j,
|
|
162
173
|
{
|
|
163
174
|
className: "show-more",
|
|
164
175
|
btnType: "basic",
|
|
165
176
|
type: "button",
|
|
166
177
|
color: "neutral",
|
|
167
|
-
onClick: (
|
|
178
|
+
onClick: (i) => {
|
|
168
179
|
var e;
|
|
169
|
-
(e =
|
|
180
|
+
(e = i == null ? void 0 : i.target) == null || e.blur(), U(!s);
|
|
170
181
|
},
|
|
171
|
-
children:
|
|
182
|
+
children: s === !0 ? C : L
|
|
172
183
|
}
|
|
173
184
|
)
|
|
174
185
|
] });
|
|
175
186
|
});
|
|
176
187
|
export {
|
|
177
|
-
|
|
188
|
+
J as default
|
|
178
189
|
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { jsxs as s, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as d, useRef as f } from "react";
|
|
3
|
+
import { W as b, T as x } from "./skeleton-CQPwIEP0.js";
|
|
4
|
+
import { u as g } from "./useDetectMobile-Bkvj0VMa.js";
|
|
5
|
+
import n from "./Button.js";
|
|
6
|
+
import { P as h } from "./index-CF3HhgvN.js";
|
|
7
|
+
const B = d((l, y) => {
|
|
8
|
+
const { title: a, imageUrl: m, text: p, onCardClick: o, buttonText: t, metadata: e } = l, i = g(), c = f();
|
|
9
|
+
return /* @__PURE__ */ s(
|
|
10
|
+
b,
|
|
11
|
+
{
|
|
12
|
+
ref: c,
|
|
13
|
+
className: "blog-card",
|
|
14
|
+
"data-accessor": e == null ? void 0 : e.accessor,
|
|
15
|
+
name: e == null ? void 0 : e.name,
|
|
16
|
+
onClick: (u) => o(u, c),
|
|
17
|
+
children: [
|
|
18
|
+
/* @__PURE__ */ r(h, { src: m }),
|
|
19
|
+
/* @__PURE__ */ s(x, { children: [
|
|
20
|
+
/* @__PURE__ */ r("div", { className: "text-wr-title", children: a }),
|
|
21
|
+
/* @__PURE__ */ r("div", { className: "text-wr", children: p }),
|
|
22
|
+
i !== !0 && /* @__PURE__ */ r(
|
|
23
|
+
n,
|
|
24
|
+
{
|
|
25
|
+
type: "button",
|
|
26
|
+
btnType: "outline",
|
|
27
|
+
size: "medium",
|
|
28
|
+
color: "gray",
|
|
29
|
+
onClick: o,
|
|
30
|
+
children: t
|
|
31
|
+
}
|
|
32
|
+
)
|
|
33
|
+
] }),
|
|
34
|
+
i === !0 && /* @__PURE__ */ r(
|
|
35
|
+
n,
|
|
36
|
+
{
|
|
37
|
+
className: "action",
|
|
38
|
+
type: "button",
|
|
39
|
+
btnType: "outline",
|
|
40
|
+
size: "medium",
|
|
41
|
+
color: "gray",
|
|
42
|
+
onClick: o,
|
|
43
|
+
children: t
|
|
44
|
+
}
|
|
45
|
+
)
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
});
|
|
50
|
+
export {
|
|
51
|
+
B
|
|
52
|
+
};
|