@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.
@@ -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"),n=require("./utils-DhRHf5Ed.cjs"),j=require("./Button.cjs"),s=require("./emotion-styled.browser.esm-BtEseadx.cjs"),C=require("./consts-goSZX3xP.cjs"),S=s.styled.div`
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: ${o=>`repeat(${o.limit}, minmax(0, 1fr))`};
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=s.styled.div`
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=s.styled.div`
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
- ${n.linearGradientAnimation("-90deg")}
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
- `;s.styled.div`
72
+ `;c.styled.div`
73
73
  width: 100%;
74
74
  height: 11.5rem;
75
75
  border-radius: 0.75rem;
76
- background: ${n.linearGradientAnimation("-90deg")};
77
- `;const p=f.forwardRef((o,c)=>{const{image:a,text:d,price:i,currency:t,onSelectGiftCard:l=()=>{}}=o;return r.jsxs(G,{ref:c,className:"simple-gift-card",onClick:()=>l(i),children:[r.jsxs(k,{children:[r.jsx("div",{className:"price-tag",children:i&&t&&`${n.formatPrice(i)} ${n.GetCurrencySymbol(t)}`}),r.jsx("img",{src:a})]}),r.jsx("div",{className:"text-wrap",children:d})]})}),q=f.forwardRef((o,c)=>{const{icon:a,title:d,buttonLink:i,items:t,buttonText:l,limit:u=4,onSelectCard:g=()=>{},onButtonAction:h=()=>{}}=o,b=w.useDetectMobile();return r.jsxs(v.RegulatTitleSectionWrapper,{ref:c,children:[r.jsxs("div",{className:"regular-title",children:[r.jsxs("div",{className:"regular-title-text",children:[n.isDefinedNotEmptyString(a)&&r.jsx("i",{className:a}),r.jsx("span",{children:d})]}),n.isDefinedNotEmptyString(i)&&r.jsx(j,{type:"button",btnType:"tinted",color:"gray",onClick:()=>h(i),borderRadius:"curved",children:l})]}),r.jsx(S,{limit:u,children:b===!0?t==null?void 0:t.map((e,m)=>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)},m)):t==null?void 0:t.slice(0,u).map((e,m)=>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)},m))})]})});module.exports=q;
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;
@@ -1,20 +1,20 @@
1
- import { jsxs as a, jsx as t } from "react/jsx-runtime";
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 d } from "./emotion-styled.browser.esm-BNN1dTl3.js";
7
+ import { s as c } from "./emotion-styled.browser.esm-BNN1dTl3.js";
8
8
  import { M as $ } from "./consts-BuFChS64.js";
9
- const T = d.div`
9
+ const T = c.div`
10
10
  display: grid;
11
- grid-template-columns: ${(o) => `repeat(${o.limit}, minmax(0, 1fr))`};
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 = d.div`
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 = d.div`
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
- d.div`
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((o, c) => {
87
+ const f = h((a, m) => {
88
88
  const {
89
- image: n,
90
- text: m,
89
+ image: d,
90
+ text: l,
91
91
  price: i,
92
- currency: r,
93
- onSelectGiftCard: l = () => {
92
+ currency: e,
93
+ onSelectGiftCard: s = () => {
94
94
  }
95
- } = o;
96
- return /* @__PURE__ */ a(
95
+ } = a;
96
+ return /* @__PURE__ */ n(
97
97
  j,
98
98
  {
99
- ref: c,
99
+ ref: m,
100
100
  className: "simple-gift-card",
101
- onClick: () => l(i),
101
+ onClick: () => s(i),
102
102
  children: [
103
- /* @__PURE__ */ a(E, { children: [
104
- /* @__PURE__ */ t("div", { className: "price-tag", children: i && r && `${G(i)} ${S(r)}` }),
105
- /* @__PURE__ */ t("img", { src: n })
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: m })
107
+ /* @__PURE__ */ t("div", { className: "text-wrap", children: l })
108
108
  ]
109
109
  }
110
110
  );
111
- }), D = h((o, c) => {
111
+ }), D = h((a, m) => {
112
112
  const {
113
- icon: n,
114
- title: m,
113
+ icon: d,
114
+ title: l,
115
115
  buttonLink: i,
116
- items: r,
117
- buttonText: l,
116
+ items: e,
117
+ buttonText: s,
118
118
  limit: p = 4,
119
119
  onSelectCard: g = () => {
120
120
  },
121
121
  onButtonAction: v = () => {
122
122
  }
123
- } = o, w = C();
124
- return /* @__PURE__ */ a(k, { ref: c, children: [
125
- /* @__PURE__ */ a("div", { className: "regular-title", children: [
126
- /* @__PURE__ */ a("div", { className: "regular-title-text", children: [
127
- u(n) && /* @__PURE__ */ t("i", { className: n }),
128
- /* @__PURE__ */ t("span", { children: m })
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: () => v(i),
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: l
141
+ children: s
139
142
  }
140
143
  )
141
144
  ] }),
142
- /* @__PURE__ */ t(T, { limit: p, children: w === !0 ? r == null ? void 0 : r.map((e, s) => /* @__PURE__ */ t(
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: e == null ? void 0 : e.text,
146
- price: e == null ? void 0 : e.priceTo,
147
- currency: e == null ? void 0 : e.currencyIsoCode,
148
- image: e == null ? void 0 : e.imageUrl,
149
- uuid: e == null ? void 0 : e.uuid,
150
- onSelectGiftCard: (y) => g(e)
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
- s
153
- )) : r == null ? void 0 : r.slice(0, p).map((e, s) => /* @__PURE__ */ t(
155
+ o
156
+ )) : e == null ? void 0 : e.slice(0, p).map((r, o) => /* @__PURE__ */ t(
154
157
  f,
155
158
  {
156
- text: e == null ? void 0 : e.text,
157
- price: e == null ? void 0 : e.priceTo,
158
- currency: e == null ? void 0 : e.currencyIsoCode,
159
- image: e == null ? void 0 : e.imageUrl,
160
- uuid: e == null ? void 0 : e.uuid,
161
- onSelectGiftCard: (y) => g(e)
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
- s
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:y="Shop by category",items:t,buttonText:b="Shop now",buttonLink:c,limit:o=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,n)=>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)},n)):t==null?void 0:t.slice(0,o).map((e,n)=>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)},n))}),[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:y})]}),d.isDefinedNotEmptyString(c)&&r.jsx(v,{type:"button",btnType:"tinted",color:"gray",onClick:()=>h(c),borderRadius:"curved",children:b})]}),r.jsx(M,{limit:o,children:r.jsx(p.SuspenseSimpleCategoryCard,{isLoading:f,limit:o,keyPrefix:"explore-landing",children:j})})]})});module.exports=E;
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
- `, c = C(B), G = k((l, u) => {
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: t = 12,
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, a) => /* @__PURE__ */ r(
50
- c,
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
- a
58
- )) : o == null ? void 0 : o.slice(0, t).map((e, a) => /* @__PURE__ */ r(
59
- c,
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
- a
66
+ t
67
67
  )) }), [o]);
68
- return /* @__PURE__ */ n(N, { ref: u, children: [
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: () => b(s),
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: t, children: /* @__PURE__ */ r(
89
+ /* @__PURE__ */ r(P, { limit: a, children: /* @__PURE__ */ r(
87
90
  L,
88
91
  {
89
92
  isLoading: y,
90
- limit: t,
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"),l=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`
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=l.memo(b.DetailedProductCard),N=l.forwardRef((t,w)=>{const{items:r,limit:o=5,limitMobile:n=4,onSelectCard:s=()=>{},title:y="Urgent sale",showLessText:S="Show less",showMoreText:j="Show more",isLoading:k=!1,getImage:u=()=>{},negotiableText:m,freeText:g}=t,d=v.useDetectMobile(),[a,M]=l.useState(!1),U=l.useMemo(()=>{var p;return i.jsx(i.Fragment,{children:d===!0?(p=r==null?void 0:r.slice(0,a===!0?r==null?void 0:r.length:n))==null?void 0:p.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:()=>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(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: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,d,o,n,a]);return i.jsxs(C,{ref:w,limit:o,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:o,keyPrefix:"explore-landing",children:U}),d===!0&&n<(r==null?void 0:r.length)&&i.jsx(q,{className:"show-more",btnType:"basic",type:"button",color:"gray",onClick:()=>M(!a),children:a===!0?S:j})]})});module.exports=N;
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 o, Fragment as U, jsxs as g } from "react/jsx-runtime";
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: t = 5,
85
- limitMobile: s = 4,
86
- onSelectCard: a = () => {
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: m = () => {
92
+ getImage: c = () => {
93
93
  },
94
- negotiableText: c,
95
- freeText: u
96
- } = i, n = I(), [l, k] = N(!1), M = $(() => {
97
- var p;
98
- return /* @__PURE__ */ o(U, { children: n === !0 ? (p = r == null ? void 0 : r.slice(0, l === !0 ? r == null ? void 0 : r.length : s)) == null ? void 0 : p.map((e, d) => /* @__PURE__ */ o(
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: () => a == null ? void 0 : a(e == null ? void 0 : e.uuid),
110
- imageUrl: m(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
111
- negotiableText: c,
112
- freeText: u
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
- d
115
- )) : r == null ? void 0 : r.slice(0, t).map((e, d) => /* @__PURE__ */ o(
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: () => a == null ? void 0 : a(e == null ? void 0 : e.uuid),
128
- imageUrl: m(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
129
- negotiableText: c,
130
- freeText: u
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
- d
132
+ m
133
133
  )) });
134
- }, [r, n, t, s, l]);
135
- return /* @__PURE__ */ g(E, { ref: h, limit: t, children: [
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__ */ o("i", { className: "mng mng-lnc-bolt-filled" }),
138
- /* @__PURE__ */ o("span", { children: b })
137
+ /* @__PURE__ */ a("i", { className: "mng mng-lnc-bolt-filled" }),
138
+ /* @__PURE__ */ a("span", { children: b })
139
139
  ] }),
140
- /* @__PURE__ */ o(
140
+ /* @__PURE__ */ a(
141
141
  D,
142
142
  {
143
143
  isLoading: S,
144
- limit: t,
144
+ limit: l,
145
145
  keyPrefix: "explore-landing",
146
146
  children: M
147
147
  }
148
148
  ),
149
- n === !0 && s < (r == null ? void 0 : r.length) && /* @__PURE__ */ o(
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: () => k(!l),
157
- children: l === !0 ? w : y
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
  ] });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lanaco/lnc-react-ui",
3
- "version": "4.0.87",
3
+ "version": "4.0.88",
4
4
  "description": "React component library",
5
5
  "type": "module",
6
6
  "keywords": [