@lanaco/lnc-react-ui 4.0.139 → 4.0.141

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.
@@ -1,13 +1,13 @@
1
- "use strict";const i=require("react/jsx-runtime"),s=require("react"),k=require("./emotion-styled.browser.esm-BtEseadx.cjs"),v=require("./consts-goSZX3xP.cjs"),D=require("./Button.cjs"),y=require("./utils-Dl9xPH4c.cjs"),U=require("./useDetectMobile-zkbzoOGV.cjs"),M=require("./style-CyHewQxg.cjs"),C=require("./suspense-product-card-detailed-DXSdrL-5.cjs"),F=require("./index-D0xXo7W6.cjs"),T=k.styled.div`
1
+ "use strict";const t=require("react/jsx-runtime"),a=require("react"),U=require("./emotion-styled.browser.esm-BtEseadx.cjs"),F=require("./consts-goSZX3xP.cjs"),L=require("./Button.cjs"),h=require("./utils-Dl9xPH4c.cjs"),M=require("./useDetectMobile-zkbzoOGV.cjs"),T=require("./style-CyHewQxg.cjs"),j=require("./suspense-product-card-detailed-BA06QK8a.cjs"),B=require("./index-D0xXo7W6.cjs"),E=U.styled.div`
2
2
  display: grid;
3
- grid-template-columns: ${l=>`repeat(${l.limit}, minmax(0, 1fr))`};
3
+ grid-template-columns: ${s=>`repeat(${s.limit}, minmax(0, 1fr))`};
4
4
  gap: 1.25rem;
5
5
 
6
6
  & .button-link {
7
7
  white-space: nowrap;
8
8
  }
9
9
 
10
- @media (max-width: ${v.MOBILE_SIZE_PX+"px"}) {
10
+ @media (max-width: ${F.MOBILE_SIZE_PX+"px"}) {
11
11
  display: flex;
12
12
  gap: 1rem;
13
13
  overflow-x: auto;
@@ -26,4 +26,4 @@
26
26
  /* Safari and Chrome */
27
27
  }
28
28
  }
29
- `,S=s.memo(C.DetailedProductCard),E=s.forwardRef((l,h)=>{const{icon:a,title:f,buttonLink:c,items:t,buttonText:q,limit:o=4,onSelectCard:d=()=>{},onButtonAction:j=()=>{},isLoading:w=!1,getImage:u=()=>{},negotiableText:m,freeText:g,options:n,onSelectOption:p=()=>{},productsToolbarName:P="All"}=l,b=U.useDetectMobile(),N=s.useMemo(()=>i.jsx(i.Fragment,{children:b===!0?t==null?void 0:t.map((e,r)=>i.jsx(S,{title:e==null?void 0:e.title,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,isSponsored:e==null?void 0:e.isSponsored,imageComponent:e==null?void 0:e.imageComponent,onSelectCard:()=>d(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,isFree:e==null?void 0:e.isFree,isNegotiable:e==null?void 0:e.isNegotiable,negotiableText:m,freeText:g,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,trade:e==null?void 0:e.trade},r)):t==null?void 0:t.slice(0,o).map((e,r)=>i.jsx(S,{title:e==null?void 0:e.title,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,location:e==null?void 0:e.location,isSponsored:e==null?void 0:e.isSponsored,imageComponent:e==null?void 0:e.imageComponent,onSelectCard:()=>d(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,isFree:e==null?void 0:e.isFree,isNegotiable:e==null?void 0:e.isNegotiable,negotiableText:m,freeText:g,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,trade:e==null?void 0:e.trade},r))}),[t,b,o]);return i.jsxs(M.TitleWithOptionsSectionWrapper,{ref:h,children:[i.jsxs("div",{className:"regular-title",children:[i.jsxs("div",{className:"regular-title-text",children:[y.isDefinedNotEmptyString(a)&&i.jsx("i",{className:a}),i.jsx("span",{children:f})]}),y.isDefinedNotEmptyString(c)&&i.jsx(D,{type:"button",btnType:"tinted",color:"neutral",onClick:e=>{var r;(r=e==null?void 0:e.target)==null||r.blur(),j(c)},borderRadius:"curved",className:"button-link",children:q})]}),(n==null?void 0:n.length)>0&&i.jsx(F.SelectBar,{items:n,onRemove:e=>{p(e)},onSelect:e=>{p(e)},labelKey:"name",valueKey:"code",noMargin:!0,productsToolbarName:P}),i.jsx(T,{limit:o,children:i.jsx(C.SuspenseDetailedProductCard,{isLoading:w,limit:o,keyPrefix:"explore-landing",children:N})})]})});module.exports=E;
29
+ `,f=a.memo(j.DetailedProductCard),R=a.forwardRef((s,q)=>{const{icon:l,title:S,buttonLink:c,items:i,buttonText:w,limit:o=4,onSelectCard:d=()=>{},onButtonAction:P=()=>{},isLoading:N=!1,getImage:u=()=>{},negotiableText:m,freeText:g,options:n,onSelectOption:p=()=>{},productsToolbarName:v="All",sponsoredText:b,onBookmark:k=()=>{},bookmarkComponent:y=t.jsx(t.Fragment,{})}=s,C=M.useDetectMobile(),D=a.useMemo(()=>t.jsx(t.Fragment,{children:C===!0?i==null?void 0:i.map((e,r)=>t.jsx(f,{title:e==null?void 0:e.title,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:()=>d(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,isFree:e==null?void 0:e.isFree,isNegotiable:e==null?void 0:e.isNegotiable,negotiableText:m,freeText:g,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,trade:e==null?void 0:e.trade,sponsoredText:b,onBookmark:k,bookmarkComponent:y,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists},r)):i==null?void 0:i.slice(0,o).map((e,r)=>t.jsx(f,{title:e==null?void 0:e.title,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,location:e==null?void 0:e.location,sponsored:e==null?void 0:e.sponsored,imageComponent:e==null?void 0:e.imageComponent,onSelectCard:()=>d(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,isFree:e==null?void 0:e.isFree,isNegotiable:e==null?void 0:e.isNegotiable,negotiableText:m,freeText:g,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,trade:e==null?void 0:e.trade,sponsoredText:b,onBookmark:k,bookmarkComponent:y,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists},r))}),[i,C,o]);return t.jsxs(T.TitleWithOptionsSectionWrapper,{ref:q,children:[t.jsxs("div",{className:"regular-title",children:[t.jsxs("div",{className:"regular-title-text",children:[h.isDefinedNotEmptyString(l)&&t.jsx("i",{className:l}),t.jsx("span",{children:S})]}),h.isDefinedNotEmptyString(c)&&t.jsx(L,{type:"button",btnType:"tinted",color:"neutral",onClick:e=>{var r;(r=e==null?void 0:e.target)==null||r.blur(),P(c)},borderRadius:"curved",className:"button-link",children:w})]}),(n==null?void 0:n.length)>0&&t.jsx(B.SelectBar,{items:n,onRemove:e=>{p(e)},onSelect:e=>{p(e)},labelKey:"name",valueKey:"code",noMargin:!0,productsToolbarName:v}),t.jsx(E,{limit:o,children:t.jsx(j.SuspenseDetailedProductCard,{isLoading:N,limit:o,keyPrefix:"explore-landing",children:D})})]})});module.exports=R;
@@ -1,14 +1,14 @@
1
- import { jsx as i, Fragment as v, jsxs as l } from "react/jsx-runtime";
2
- import { memo as U, forwardRef as M, useMemo as T } from "react";
3
- import { s as D } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
- import { M as F } from "./consts-BuFChS64.js";
5
- import q from "./Button.js";
6
- import { k as f } from "./utils-BdsZgOUE.js";
7
- import { u as B } from "./useDetectMobile-Bkvj0VMa.js";
8
- import { T as E } from "./style-DFPWLJBr.js";
9
- import { D as I, S as L } from "./suspense-product-card-detailed-DIWv_91e.js";
10
- import { S as O } from "./index-Dweo-G3H.js";
11
- const R = D.div`
1
+ import { jsx as o, Fragment as C, jsxs as l } from "react/jsx-runtime";
2
+ import { memo as M, forwardRef as D, useMemo as F } from "react";
3
+ import { s as B } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
+ import { M as q } from "./consts-BuFChS64.js";
5
+ import E from "./Button.js";
6
+ import { k as h } from "./utils-BdsZgOUE.js";
7
+ import { u as I } from "./useDetectMobile-Bkvj0VMa.js";
8
+ import { T as O } from "./style-DFPWLJBr.js";
9
+ import { D as R, S as W } from "./suspense-product-card-detailed-CUd-EI3U.js";
10
+ import { S as $ } from "./index-Dweo-G3H.js";
11
+ const j = B.div`
12
12
  display: grid;
13
13
  grid-template-columns: ${(n) => `repeat(${n.limit}, minmax(0, 1fr))`};
14
14
  gap: 1.25rem;
@@ -17,7 +17,7 @@ const R = D.div`
17
17
  white-space: nowrap;
18
18
  }
19
19
 
20
- @media (max-width: ${F + "px"}) {
20
+ @media (max-width: ${q + "px"}) {
21
21
  display: flex;
22
22
  gap: 1rem;
23
23
  overflow-x: auto;
@@ -36,29 +36,33 @@ const R = D.div`
36
36
  /* Safari and Chrome */
37
37
  }
38
38
  }
39
- `, y = U(I), H = M((n, S) => {
39
+ `, S = M(R), V = D((n, w) => {
40
40
  const {
41
41
  icon: s,
42
- title: C,
42
+ title: P,
43
43
  buttonLink: d,
44
- items: t,
45
- buttonText: h,
46
- limit: o = 4,
47
- onSelectCard: c = () => {
44
+ items: i,
45
+ buttonText: N,
46
+ limit: t = 4,
47
+ onSelectCard: m = () => {
48
48
  },
49
- onButtonAction: w = () => {
49
+ onButtonAction: v = () => {
50
50
  },
51
- isLoading: P = !1,
52
- getImage: m = () => {
51
+ isLoading: T = !1,
52
+ getImage: c = () => {
53
53
  },
54
54
  negotiableText: u,
55
55
  freeText: p,
56
56
  options: a,
57
57
  onSelectOption: g = () => {
58
58
  },
59
- productsToolbarName: k = "All"
60
- } = n, b = B(), N = T(() => /* @__PURE__ */ i(v, { children: b === !0 ? t == null ? void 0 : t.map((e, r) => /* @__PURE__ */ i(
61
- y,
59
+ productsToolbarName: U = "All",
60
+ sponsoredText: b,
61
+ onBookmark: k = () => {
62
+ },
63
+ bookmarkComponent: f = /* @__PURE__ */ o(C, {})
64
+ } = n, y = I(), L = F(() => /* @__PURE__ */ o(C, { children: y === !0 ? i == null ? void 0 : i.map((e, r) => /* @__PURE__ */ o(
65
+ S,
62
66
  {
63
67
  title: e == null ? void 0 : e.title,
64
68
  price: e == null ? void 0 : e.price,
@@ -67,10 +71,10 @@ const R = D.div`
67
71
  image: e == null ? void 0 : e.image,
68
72
  sellerUuid: e == null ? void 0 : e.sellerUuid,
69
73
  uuid: e == null ? void 0 : e.uuid,
70
- isSponsored: e == null ? void 0 : e.isSponsored,
74
+ sponsored: e == null ? void 0 : e.sponsored,
71
75
  imageComponent: e == null ? void 0 : e.imageComponent,
72
- onSelectCard: () => c(e == null ? void 0 : e.uuid),
73
- imageUrl: m(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
76
+ onSelectCard: () => m(e == null ? void 0 : e.uuid),
77
+ imageUrl: c(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
74
78
  isFree: e == null ? void 0 : e.isFree,
75
79
  isNegotiable: e == null ? void 0 : e.isNegotiable,
76
80
  negotiableText: u,
@@ -79,11 +83,16 @@ const R = D.div`
79
83
  categoryCode: e == null ? void 0 : e.categoryCode,
80
84
  condition: e == null ? void 0 : e.condition,
81
85
  quantity: e == null ? void 0 : e.quantity,
82
- trade: e == null ? void 0 : e.trade
86
+ trade: e == null ? void 0 : e.trade,
87
+ sponsoredText: b,
88
+ onBookmark: k,
89
+ bookmarkComponent: f,
90
+ bookmarked: e == null ? void 0 : e.bookmarked,
91
+ bookmarkLists: e == null ? void 0 : e.bookmarkLists
83
92
  },
84
93
  r
85
- )) : t == null ? void 0 : t.slice(0, o).map((e, r) => /* @__PURE__ */ i(
86
- y,
94
+ )) : i == null ? void 0 : i.slice(0, t).map((e, r) => /* @__PURE__ */ o(
95
+ S,
87
96
  {
88
97
  title: e == null ? void 0 : e.title,
89
98
  price: e == null ? void 0 : e.price,
@@ -93,10 +102,10 @@ const R = D.div`
93
102
  sellerUuid: e == null ? void 0 : e.sellerUuid,
94
103
  uuid: e == null ? void 0 : e.uuid,
95
104
  location: e == null ? void 0 : e.location,
96
- isSponsored: e == null ? void 0 : e.isSponsored,
105
+ sponsored: e == null ? void 0 : e.sponsored,
97
106
  imageComponent: e == null ? void 0 : e.imageComponent,
98
- onSelectCard: () => c(e == null ? void 0 : e.uuid),
99
- imageUrl: m(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
107
+ onSelectCard: () => m(e == null ? void 0 : e.uuid),
108
+ imageUrl: c(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
100
109
  isFree: e == null ? void 0 : e.isFree,
101
110
  isNegotiable: e == null ? void 0 : e.isNegotiable,
102
111
  negotiableText: u,
@@ -105,34 +114,39 @@ const R = D.div`
105
114
  categoryCode: e == null ? void 0 : e.categoryCode,
106
115
  condition: e == null ? void 0 : e.condition,
107
116
  quantity: e == null ? void 0 : e.quantity,
108
- trade: e == null ? void 0 : e.trade
117
+ trade: e == null ? void 0 : e.trade,
118
+ sponsoredText: b,
119
+ onBookmark: k,
120
+ bookmarkComponent: f,
121
+ bookmarked: e == null ? void 0 : e.bookmarked,
122
+ bookmarkLists: e == null ? void 0 : e.bookmarkLists
109
123
  },
110
124
  r
111
- )) }), [t, b, o]);
112
- return /* @__PURE__ */ l(E, { ref: S, children: [
125
+ )) }), [i, y, t]);
126
+ return /* @__PURE__ */ l(O, { ref: w, children: [
113
127
  /* @__PURE__ */ l("div", { className: "regular-title", children: [
114
128
  /* @__PURE__ */ l("div", { className: "regular-title-text", children: [
115
- f(s) && /* @__PURE__ */ i("i", { className: s }),
116
- /* @__PURE__ */ i("span", { children: C })
129
+ h(s) && /* @__PURE__ */ o("i", { className: s }),
130
+ /* @__PURE__ */ o("span", { children: P })
117
131
  ] }),
118
- f(d) && /* @__PURE__ */ i(
119
- q,
132
+ h(d) && /* @__PURE__ */ o(
133
+ E,
120
134
  {
121
135
  type: "button",
122
136
  btnType: "tinted",
123
137
  color: "neutral",
124
138
  onClick: (e) => {
125
139
  var r;
126
- (r = e == null ? void 0 : e.target) == null || r.blur(), w(d);
140
+ (r = e == null ? void 0 : e.target) == null || r.blur(), v(d);
127
141
  },
128
142
  borderRadius: "curved",
129
143
  className: "button-link",
130
- children: h
144
+ children: N
131
145
  }
132
146
  )
133
147
  ] }),
134
- (a == null ? void 0 : a.length) > 0 && /* @__PURE__ */ i(
135
- O,
148
+ (a == null ? void 0 : a.length) > 0 && /* @__PURE__ */ o(
149
+ $,
136
150
  {
137
151
  items: a,
138
152
  onRemove: (e) => {
@@ -144,20 +158,20 @@ const R = D.div`
144
158
  labelKey: "name",
145
159
  valueKey: "code",
146
160
  noMargin: !0,
147
- productsToolbarName: k
161
+ productsToolbarName: U
148
162
  }
149
163
  ),
150
- /* @__PURE__ */ i(R, { limit: o, children: /* @__PURE__ */ i(
151
- L,
164
+ /* @__PURE__ */ o(j, { limit: t, children: /* @__PURE__ */ o(
165
+ W,
152
166
  {
153
- isLoading: P,
154
- limit: o,
167
+ isLoading: T,
168
+ limit: t,
155
169
  keyPrefix: "explore-landing",
156
- children: N
170
+ children: L
157
171
  }
158
172
  ) })
159
173
  ] });
160
174
  });
161
175
  export {
162
- H as default
176
+ V as default
163
177
  };
@@ -1,7 +1,7 @@
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-DXSdrL-5.cjs"),C=P.styled.div`
1
+ "use strict";const i=require("react/jsx-runtime"),l=require("react"),v=require("./emotion-styled.browser.esm-BtEseadx.cjs"),k=require("./consts-goSZX3xP.cjs"),C=require("./useDetectMobile-zkbzoOGV.cjs"),q=require("./Button.cjs"),w=require("./suspense-product-card-detailed-BA06QK8a.cjs"),N=v.styled.div`
2
2
  padding: 1.75rem 3rem;
3
3
  display: grid;
4
- grid-template-columns: ${t=>`repeat(${t.limit||5}, minmax(0, 1fr))`};
4
+ grid-template-columns: ${o=>`repeat(${o.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: ${t=>`calc(${100/t.desktopCols}% - ${(t.desktopCols-1)*t.columnGapRem/t.desktopCols}rem)`};
37
+ max-width: ${o=>`calc(${100/o.desktopCols}% - ${(o.desktopCols-1)*o.columnGapRem/o.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: ${f.MOBILE_SIZE_PX+"px"}) {
57
+ @media (max-width: ${k.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: ${f.SMALL_MOBILE_SIZE_PX+"px"}) {
63
+ @media (max-width: ${k.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
- `,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:"neutral",onClick:o=>{var e;(e=o==null?void 0:o.target)==null||e.blur(),M(!l)},children:l===!0?S:j})]})});module.exports=N;
74
+ `,h=l.memo(w.DetailedProductCard),_=l.forwardRef((o,y)=>{const{items:r,limit:a=5,limitMobile:d=4,onSelectCard:t=()=>{},title:S="Urgent sale",showLessText:j="Show less",showMoreText:L="Show more",isLoading:M=!1,getImage:u=()=>{},negotiableText:g,freeText:p,onBookmark:b=()=>{},bookmarkComponent:f=i.jsx(i.Fragment,{})}=o,m=C.useDetectMobile(),[n,U]=l.useState(!1),P=l.useMemo(()=>{var s;return i.jsx(i.Fragment,{children:m===!0?(s=r==null?void 0:r.slice(0,n===!0?r==null?void 0:r.length:d))==null?void 0:s.map((e,c)=>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:()=>t==null?void 0:t(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:g,freeText:p,onBookmark:b,bookmarkComponent:f,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists},c)):r==null?void 0:r.slice(0,a).map((e,c)=>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:()=>t==null?void 0:t(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:g,freeText:p,onBookmark:b,bookmarkComponent:f,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists},c))})},[r,m,a,d,n]);return i.jsxs(N,{ref:y,limit:a,children:[i.jsxs("div",{className:"urgent-tag",children:[i.jsx("i",{className:"mng mng-lnc-bolt-filled"}),i.jsx("span",{children:S})]}),i.jsx(w.SuspenseDetailedProductCard,{isLoading:M,limit:a,keyPrefix:"explore-landing",children:P}),m===!0&&d<(r==null?void 0:r.length)&&i.jsx(q,{className:"show-more",btnType:"basic",type:"button",color:"neutral",onClick:s=>{var e;(e=s==null?void 0:s.target)==null||e.blur(),U(!n)},children:n===!0?j:L})]})});module.exports=_;
@@ -1,14 +1,14 @@
1
- import { jsx as a, Fragment as U, jsxs as g } from "react/jsx-runtime";
2
- import { memo as v, forwardRef as P, useState as N, useMemo as $ } from "react";
3
- import { s as C } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
- import { M as L, S as F } from "./consts-BuFChS64.js";
5
- import { u as I } from "./useDetectMobile-Bkvj0VMa.js";
6
- import T from "./Button.js";
7
- import { D as _, S as D } from "./suspense-product-card-detailed-DIWv_91e.js";
8
- const E = C.div`
1
+ import { jsx as i, Fragment as b, jsxs as k } from "react/jsx-runtime";
2
+ import { memo as P, forwardRef as C, useState as N, useMemo as $ } from "react";
3
+ import { s as F } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
+ import { M as I, S as T } from "./consts-BuFChS64.js";
5
+ import { u as _ } from "./useDetectMobile-Bkvj0VMa.js";
6
+ import B from "./Button.js";
7
+ import { D, S as E } from "./suspense-product-card-detailed-CUd-EI3U.js";
8
+ const j = F.div`
9
9
  padding: 1.75rem 3rem;
10
10
  display: grid;
11
- grid-template-columns: ${(i) => `repeat(${i.limit || 5}, minmax(0, 1fr))`};
11
+ grid-template-columns: ${(o) => `repeat(${o.limit || 5}, minmax(0, 1fr))`};
12
12
 
13
13
  gap: 2.97rem;
14
14
 
@@ -41,7 +41,7 @@ const E = C.div`
41
41
  }
42
42
 
43
43
  & .product-card {
44
- max-width: ${(i) => `calc(${100 / i.desktopCols}% - ${(i.desktopCols - 1) * i.columnGapRem / i.desktopCols}rem)`};
44
+ max-width: ${(o) => `calc(${100 / o.desktopCols}% - ${(o.desktopCols - 1) * o.columnGapRem / o.desktopCols}rem)`};
45
45
 
46
46
  animation-duration: 0.2s;
47
47
  animation-name: animate-fade;
@@ -61,13 +61,13 @@ const E = C.div`
61
61
  }
62
62
  }
63
63
 
64
- @media (max-width: ${L + "px"}) {
64
+ @media (max-width: ${I + "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: ${F + "px"}) {
70
+ @media (max-width: ${T + "px"}) {
71
71
  display: flex;
72
72
  flex-direction: column;
73
73
 
@@ -78,25 +78,28 @@ const E = C.div`
78
78
  }
79
79
  }
80
80
  }
81
- `, f = v(_), X = P((i, h) => {
81
+ `, h = P(D), W = C((o, w) => {
82
82
  const {
83
83
  items: r,
84
- limit: l = 5,
84
+ limit: s = 5,
85
85
  limitMobile: n = 4,
86
- onSelectCard: o = () => {
86
+ onSelectCard: a = () => {
87
87
  },
88
- title: b = "Urgent sale",
89
- showLessText: w = "Show less",
90
- showMoreText: S = "Show more",
91
- isLoading: y = !1,
88
+ title: S = "Urgent sale",
89
+ showLessText: y = "Show less",
90
+ showMoreText: L = "Show more",
91
+ isLoading: M = !1,
92
92
  getImage: c = () => {
93
93
  },
94
94
  negotiableText: u,
95
- freeText: p
96
- } = i, d = I(), [s, k] = N(!1), M = $(() => {
95
+ freeText: p,
96
+ onBookmark: g = () => {
97
+ },
98
+ bookmarkComponent: f = /* @__PURE__ */ i(b, {})
99
+ } = o, d = _(), [l, U] = N(!1), v = $(() => {
97
100
  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
- f,
101
+ return /* @__PURE__ */ i(b, { children: d === !0 ? (t = r == null ? void 0 : r.slice(0, l === !0 ? r == null ? void 0 : r.length : n)) == null ? void 0 : t.map((e, m) => /* @__PURE__ */ i(
102
+ h,
100
103
  {
101
104
  title: e == null ? void 0 : e.name,
102
105
  price: e == null ? void 0 : e.price,
@@ -106,14 +109,18 @@ const E = C.div`
106
109
  sellerUuid: e == null ? void 0 : e.sellerUuid,
107
110
  uuid: e == null ? void 0 : e.uuid,
108
111
  isSponsored: e == null ? void 0 : e.isSponsored,
109
- onSelectCard: () => o == null ? void 0 : o(e == null ? void 0 : e.uuid),
112
+ onSelectCard: () => a == null ? void 0 : a(e == null ? void 0 : e.uuid),
110
113
  imageUrl: c(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
111
114
  negotiableText: u,
112
- freeText: p
115
+ freeText: p,
116
+ onBookmark: g,
117
+ bookmarkComponent: f,
118
+ bookmarked: e == null ? void 0 : e.bookmarked,
119
+ bookmarkLists: e == null ? void 0 : e.bookmarkLists
113
120
  },
114
121
  m
115
- )) : r == null ? void 0 : r.slice(0, l).map((e, m) => /* @__PURE__ */ a(
116
- f,
122
+ )) : r == null ? void 0 : r.slice(0, s).map((e, m) => /* @__PURE__ */ i(
123
+ h,
117
124
  {
118
125
  title: e == null ? void 0 : e.name,
119
126
  price: e == null ? void 0 : e.price,
@@ -124,30 +131,34 @@ const E = C.div`
124
131
  uuid: e == null ? void 0 : e.uuid,
125
132
  location: e == null ? void 0 : e.location,
126
133
  isSponsored: e == null ? void 0 : e.isSponsored,
127
- onSelectCard: () => o == null ? void 0 : o(e == null ? void 0 : e.uuid),
134
+ onSelectCard: () => a == null ? void 0 : a(e == null ? void 0 : e.uuid),
128
135
  imageUrl: c(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
129
136
  negotiableText: u,
130
- freeText: p
137
+ freeText: p,
138
+ onBookmark: g,
139
+ bookmarkComponent: f,
140
+ bookmarked: e == null ? void 0 : e.bookmarked,
141
+ bookmarkLists: e == null ? void 0 : e.bookmarkLists
131
142
  },
132
143
  m
133
144
  )) });
134
- }, [r, d, l, n, s]);
135
- return /* @__PURE__ */ g(E, { ref: h, limit: l, children: [
136
- /* @__PURE__ */ g("div", { className: "urgent-tag", children: [
137
- /* @__PURE__ */ a("i", { className: "mng mng-lnc-bolt-filled" }),
138
- /* @__PURE__ */ a("span", { children: b })
145
+ }, [r, d, s, n, l]);
146
+ return /* @__PURE__ */ k(j, { ref: w, limit: s, children: [
147
+ /* @__PURE__ */ k("div", { className: "urgent-tag", children: [
148
+ /* @__PURE__ */ i("i", { className: "mng mng-lnc-bolt-filled" }),
149
+ /* @__PURE__ */ i("span", { children: S })
139
150
  ] }),
140
- /* @__PURE__ */ a(
141
- D,
151
+ /* @__PURE__ */ i(
152
+ E,
142
153
  {
143
- isLoading: y,
144
- limit: l,
154
+ isLoading: M,
155
+ limit: s,
145
156
  keyPrefix: "explore-landing",
146
- children: M
157
+ children: v
147
158
  }
148
159
  ),
149
- d === !0 && n < (r == null ? void 0 : r.length) && /* @__PURE__ */ a(
150
- T,
160
+ d === !0 && n < (r == null ? void 0 : r.length) && /* @__PURE__ */ i(
161
+ B,
151
162
  {
152
163
  className: "show-more",
153
164
  btnType: "basic",
@@ -155,13 +166,13 @@ const E = C.div`
155
166
  color: "neutral",
156
167
  onClick: (t) => {
157
168
  var e;
158
- (e = t == null ? void 0 : t.target) == null || e.blur(), k(!s);
169
+ (e = t == null ? void 0 : t.target) == null || e.blur(), U(!l);
159
170
  },
160
- children: s === !0 ? w : S
171
+ children: l === !0 ? y : L
161
172
  }
162
173
  )
163
174
  ] });
164
175
  });
165
176
  export {
166
- X as default
177
+ W as default
167
178
  };