@lanaco/lnc-react-ui 4.0.37 → 4.0.39

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.
Files changed (32) hide show
  1. package/dist/BlogsSectionDetailed.cjs +11 -11
  2. package/dist/BlogsSectionDetailed.js +124 -87
  3. package/dist/BlogsSectionLarge.cjs +10 -10
  4. package/dist/BlogsSectionLarge.js +87 -60
  5. package/dist/BlogsSectionSimple.cjs +8 -8
  6. package/dist/BlogsSectionSimple.js +98 -72
  7. package/dist/BlogsSectionSimpleCentered.cjs +9 -9
  8. package/dist/BlogsSectionSimpleCentered.js +75 -45
  9. package/dist/BlogsSectionWithFilters.cjs +10 -10
  10. package/dist/BlogsSectionWithFilters.js +105 -77
  11. package/dist/DetailedProductsSection.cjs +4 -4
  12. package/dist/DetailedProductsSection.js +66 -57
  13. package/dist/FieldOfInterestsWithAvatarsCardsSection.cjs +1 -1
  14. package/dist/FieldOfInterestsWithAvatarsCardsSection.js +1 -1
  15. package/dist/OverlayGeneralCardsSection.cjs +20 -20
  16. package/dist/OverlayGeneralCardsSection.js +99 -59
  17. package/dist/ProductsWithBannerSection.cjs +10 -10
  18. package/dist/ProductsWithBannerSection.js +87 -56
  19. package/dist/QuizSection.cjs +1 -1
  20. package/dist/QuizSection.js +25 -25
  21. package/dist/SimpleCategoriesSection.cjs +9 -9
  22. package/dist/SimpleCategoriesSection.js +89 -58
  23. package/dist/SimpleProductsSection.cjs +3 -3
  24. package/dist/SimpleProductsSection.js +86 -55
  25. package/dist/UrgentSaleProductsSection.cjs +5 -5
  26. package/dist/UrgentSaleProductsSection.js +41 -30
  27. package/dist/{index-CHkb_Sj6.js → index-BN8qgFbe.js} +15 -15
  28. package/dist/{index-Dj5wZCVs.cjs → index-_Db92CJE.cjs} +3 -3
  29. package/dist/suspense-product-card-detailed-BETmfKMT.js +189 -0
  30. package/dist/{index-vXmvgZ2Y.cjs → suspense-product-card-detailed-DtzOxHaH.cjs} +4 -4
  31. package/package.json +2 -2
  32. package/dist/index-D6g5ZqyJ.js +0 -159
@@ -1,9 +1,9 @@
1
- "use strict";const r=require("react/jsx-runtime"),h=require("react"),p=require("./emotion-styled.browser.esm-Cle7tAM9.cjs"),w=require("./consts-CtNoHdBj.cjs"),y=require("./useDetectMobile-D6d5LpdL.cjs"),n=require("./utils-NZLCh-J5.cjs"),v=require("./style-BR3tIhP1.cjs"),j=require("./Button.cjs"),S=p.newStyled.div`
1
+ "use strict";const e=require("react/jsx-runtime"),c=require("react"),p=require("./emotion-styled.browser.esm-Cle7tAM9.cjs"),f=require("./consts-CtNoHdBj.cjs"),S=require("./useDetectMobile-D6d5LpdL.cjs"),d=require("./utils-NZLCh-J5.cjs"),k=require("./style-BR3tIhP1.cjs"),x=require("./Button.cjs"),C=p.newStyled.div`
2
2
  display: grid;
3
- grid-template-columns: ${o=>"repeat(6, minmax(0, 1fr))"};
3
+ grid-template-columns: ${i=>"repeat(6, minmax(0, 1fr))"};
4
4
  gap: 2rem;
5
5
 
6
- @media (max-width: ${w.MOBILE_SIZE_PX+"px"}) {
6
+ @media (max-width: ${f.MOBILE_SIZE_PX+"px"}) {
7
7
  display: flex;
8
8
  gap: 1rem;
9
9
  overflow-x: auto;
@@ -22,7 +22,7 @@
22
22
  /* Safari and Chrome */
23
23
  }
24
24
  }
25
- `,k=p.newStyled.div`
25
+ `,w=p.newStyled.div`
26
26
  display: flex;
27
27
  flex-direction: column;
28
28
  gap: 0;
@@ -47,11 +47,11 @@
47
47
 
48
48
  & .card-content {
49
49
  padding: 0.75rem;
50
- ${n.truncateTextInRows(2)}
50
+ ${d.truncateTextInRows(2)}
51
51
  }
52
52
 
53
53
  & .card-content-2 {
54
- ${n.truncateTextInRows(2)}
54
+ ${d.truncateTextInRows(2)}
55
55
  }
56
56
 
57
57
  & img {
@@ -65,10 +65,10 @@
65
65
  width: 100%;
66
66
  min-height: 8.25rem;
67
67
  max-height: 8.25rem;
68
- ${n.linearGradientAnimation("-90deg")}
68
+ ${d.linearGradientAnimation("-90deg")}
69
69
  }
70
70
 
71
- @media (max-width: ${w.MOBILE_SIZE_PX+"px"}) {
71
+ @media (max-width: ${f.MOBILE_SIZE_PX+"px"}) {
72
72
  min-width: 8.75rem;
73
73
  max-width: 8.75rem;
74
74
 
@@ -78,4 +78,4 @@
78
78
  max-height: 5.375rem;
79
79
  }
80
80
  }
81
- `,g=h.forwardRef((o,l)=>{const{uuid:a,image:s,name:i,onSelectCard:c=()=>{}}=o;return r.jsxs(k,{className:"simple-category-card",onClick:()=>c(a),children:[r.jsx("img",{src:s}),r.jsx("div",{className:"card-content",children:r.jsx("div",{className:"card-content-2",children:i})})]})}),R=h.forwardRef((o,l)=>{const{icon:a,title:s="Shop by category",items:i,buttonText:c,buttonLink:m,limit:u=12,onButtonAction:b=()=>{},onSelectCard:t=()=>{}}=o,f=y.useDetectMobile();return r.jsxs(v.RegulatTitleSectionWrapper,{ref:l,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:s})]}),n.isDefinedNotEmptyString(m)&&r.jsx(j,{type:"button",btnType:"tinted",color:"gray",onClick:()=>b(m),borderRadius:"curved",children:c})]}),r.jsx(S,{limit:u,children:f===!0?i==null?void 0:i.map((e,d)=>r.jsx(g,{uuid:e==null?void 0:e.uuid,image:e==null?void 0:e.image,name:e==null?void 0:e.name,onSelectCard:()=>t==null?void 0:t(e==null?void 0:e.uuid)},d)):i==null?void 0:i.slice(0,u).map((e,d)=>r.jsx(g,{uuid:e==null?void 0:e.uuid,image:e==null?void 0:e.image,name:e==null?void 0:e.name,onSelectCard:()=>t==null?void 0:t(e==null?void 0:e.uuid)},d))})]})});module.exports=R;
81
+ `,N=c.forwardRef((i,a)=>{const{uuid:n,image:o,name:t,onSelectCard:l=()=>{}}=i;return e.jsxs(w,{className:"simple-category-card",onClick:()=>l(n),children:[e.jsx("img",{src:o}),e.jsx("div",{className:"card-content",children:e.jsx("div",{className:"card-content-2",children:t})})]})}),R=c.forwardRef(({},i)=>e.jsxs(w,{className:"simple-category-card",children:[e.jsx("div",{className:"skeleton-img"}),e.jsx("div",{className:"card-content"})]})),q=({limit:i=12,isLoading:a=!1,keyPrefix:n})=>e.jsx(e.Fragment,{children:Array.from({length:i},(o,t)=>e.jsx(R,{isLoading:a},`${n}-skeleton-category-card-${t}`))}),$=({children:i,fallbackComponent:a=e.jsx(e.Fragment,{}),isLoading:n=!1,limit:o,keyPrefix:t})=>e.jsx(c.Suspense,{fallbackComponent:a,children:n===!0?e.jsx(q,{isLoading:n,limit:o,keyPrefix:t}):i}),h=c.memo(N),E=c.forwardRef((i,a)=>{const{icon:n,title:o="Shop by category",items:t,buttonText:l,buttonLink:g,limit:m=12,onButtonAction:y=()=>{},onSelectCard:s=()=>{},isLoading:b=!1}=i,j=S.useDetectMobile(),v=c.useMemo(()=>e.jsx(e.Fragment,{children:j===!0?t==null?void 0:t.map((r,u)=>e.jsx(h,{uuid:r==null?void 0:r.uuid,image:r==null?void 0:r.image,name:r==null?void 0:r.name,onSelectCard:()=>s==null?void 0:s(r==null?void 0:r.uuid)},u)):t==null?void 0:t.slice(0,m).map((r,u)=>e.jsx(h,{uuid:r==null?void 0:r.uuid,image:r==null?void 0:r.image,name:r==null?void 0:r.name,onSelectCard:()=>s==null?void 0:s(r==null?void 0:r.uuid)},u))}),[t]);return e.jsxs(k.RegulatTitleSectionWrapper,{ref:a,children:[e.jsxs("div",{className:"regular-title",children:[e.jsxs("div",{className:"regular-title-text",children:[d.isDefinedNotEmptyString(n)&&e.jsx("i",{className:n}),e.jsx("span",{children:o})]}),d.isDefinedNotEmptyString(g)&&e.jsx(x,{type:"button",btnType:"tinted",color:"gray",onClick:()=>y(g),borderRadius:"curved",children:l})]}),e.jsx(C,{limit:m,children:e.jsx($,{isLoading:b,limit:m,keyPrefix:"explore-landing",children:v})})]})});module.exports=E;
@@ -1,17 +1,17 @@
1
- import { jsxs as n, jsx as r } from "react/jsx-runtime";
2
- import { forwardRef as f } from "react";
1
+ import { jsxs as d, jsx as r, Fragment as p } from "react/jsx-runtime";
2
+ import { forwardRef as g, Suspense as $, memo as R, useMemo as M } from "react";
3
3
  import { n as b } from "./emotion-styled.browser.esm-CjCaF13H.js";
4
- import { M as w } from "./consts-C1uHV4xc.js";
5
- import { u as k } from "./useDetectMobile-BC6EGaBc.js";
6
- import { t as h, m as S, k as g } from "./utils-DtRLzzTZ.js";
7
- import { R as N } from "./style-6tSw9aqK.js";
8
- import C from "./Button.js";
9
- const R = b.div`
4
+ import { M as v } from "./consts-C1uHV4xc.js";
5
+ import { u as E } from "./useDetectMobile-BC6EGaBc.js";
6
+ import { t as h, m as I, k as f } from "./utils-DtRLzzTZ.js";
7
+ import { R as P } from "./style-6tSw9aqK.js";
8
+ import T from "./Button.js";
9
+ const j = b.div`
10
10
  display: grid;
11
- grid-template-columns: ${(a) => "repeat(6, minmax(0, 1fr))"};
11
+ grid-template-columns: ${(t) => "repeat(6, minmax(0, 1fr))"};
12
12
  gap: 2rem;
13
13
 
14
- @media (max-width: ${w + "px"}) {
14
+ @media (max-width: ${v + "px"}) {
15
15
  display: flex;
16
16
  gap: 1rem;
17
17
  overflow-x: auto;
@@ -30,7 +30,7 @@ const R = b.div`
30
30
  /* Safari and Chrome */
31
31
  }
32
32
  }
33
- `, $ = b.div`
33
+ `, y = b.div`
34
34
  display: flex;
35
35
  flex-direction: column;
36
36
  gap: 0;
@@ -73,10 +73,10 @@ const R = b.div`
73
73
  width: 100%;
74
74
  min-height: 8.25rem;
75
75
  max-height: 8.25rem;
76
- ${S("-90deg")}
76
+ ${I("-90deg")}
77
77
  }
78
78
 
79
- @media (max-width: ${w + "px"}) {
79
+ @media (max-width: ${v + "px"}) {
80
80
  min-width: 8.75rem;
81
81
  max-width: 8.75rem;
82
82
 
@@ -86,72 +86,103 @@ const R = b.div`
86
86
  max-height: 5.375rem;
87
87
  }
88
88
  }
89
- `, u = f((a, c) => {
90
- const { uuid: o, image: m, name: i, onSelectCard: d = () => {
91
- } } = a;
92
- return /* @__PURE__ */ n(
93
- $,
89
+ `, z = g((t, o) => {
90
+ const { uuid: a, image: n, name: i, onSelectCard: l = () => {
91
+ } } = t;
92
+ return /* @__PURE__ */ d(
93
+ y,
94
94
  {
95
95
  className: "simple-category-card",
96
- onClick: () => d(o),
96
+ onClick: () => l(a),
97
97
  children: [
98
- /* @__PURE__ */ r("img", { src: m }),
98
+ /* @__PURE__ */ r("img", { src: n }),
99
99
  /* @__PURE__ */ r("div", { className: "card-content", children: /* @__PURE__ */ r("div", { className: "card-content-2", children: i }) })
100
100
  ]
101
101
  }
102
102
  );
103
- }), D = f((a, c) => {
103
+ }), A = g(({}, t) => /* @__PURE__ */ d(y, { className: "simple-category-card", children: [
104
+ /* @__PURE__ */ r("div", { className: "skeleton-img" }),
105
+ /* @__PURE__ */ r("div", { className: "card-content" })
106
+ ] })), B = ({ limit: t = 12, isLoading: o = !1, keyPrefix: a }) => /* @__PURE__ */ r(p, { children: Array.from({ length: t }, (n, i) => /* @__PURE__ */ r(
107
+ A,
108
+ {
109
+ isLoading: o
110
+ },
111
+ `${a}-skeleton-category-card-${i}`
112
+ )) }), W = ({
113
+ children: t,
114
+ fallbackComponent: o = /* @__PURE__ */ r(p, {}),
115
+ isLoading: a = !1,
116
+ limit: n,
117
+ keyPrefix: i
118
+ }) => /* @__PURE__ */ r($, { fallbackComponent: o, children: a === !0 ? /* @__PURE__ */ r(
119
+ B,
120
+ {
121
+ isLoading: a,
122
+ limit: n,
123
+ keyPrefix: i
124
+ }
125
+ ) : t }), w = R(z), q = g((t, o) => {
104
126
  const {
105
- icon: o,
106
- title: m = "Shop by category",
127
+ icon: a,
128
+ title: n = "Shop by category",
107
129
  items: i,
108
- buttonText: d,
109
- buttonLink: s,
110
- limit: p = 12,
111
- onButtonAction: v = () => {
130
+ buttonText: l,
131
+ buttonLink: u,
132
+ limit: s = 12,
133
+ onButtonAction: k = () => {
112
134
  },
113
- onSelectCard: t = () => {
114
- }
115
- } = a, y = k();
116
- return /* @__PURE__ */ n(N, { ref: c, children: [
117
- /* @__PURE__ */ n("div", { className: "regular-title", children: [
118
- /* @__PURE__ */ n("div", { className: "regular-title-text", children: [
119
- g(o) && /* @__PURE__ */ r("i", { className: o }),
120
- /* @__PURE__ */ r("span", { children: m })
135
+ onSelectCard: m = () => {
136
+ },
137
+ isLoading: S = !1
138
+ } = t, C = E(), N = M(() => /* @__PURE__ */ r(p, { children: C === !0 ? i == null ? void 0 : i.map((e, c) => /* @__PURE__ */ r(
139
+ w,
140
+ {
141
+ uuid: e == null ? void 0 : e.uuid,
142
+ image: e == null ? void 0 : e.image,
143
+ name: e == null ? void 0 : e.name,
144
+ onSelectCard: () => m == null ? void 0 : m(e == null ? void 0 : e.uuid)
145
+ },
146
+ c
147
+ )) : i == null ? void 0 : i.slice(0, s).map((e, c) => /* @__PURE__ */ r(
148
+ w,
149
+ {
150
+ uuid: e == null ? void 0 : e.uuid,
151
+ image: e == null ? void 0 : e.image,
152
+ name: e == null ? void 0 : e.name,
153
+ onSelectCard: () => m == null ? void 0 : m(e == null ? void 0 : e.uuid)
154
+ },
155
+ c
156
+ )) }), [i]);
157
+ return /* @__PURE__ */ d(P, { ref: o, children: [
158
+ /* @__PURE__ */ d("div", { className: "regular-title", children: [
159
+ /* @__PURE__ */ d("div", { className: "regular-title-text", children: [
160
+ f(a) && /* @__PURE__ */ r("i", { className: a }),
161
+ /* @__PURE__ */ r("span", { children: n })
121
162
  ] }),
122
- g(s) && /* @__PURE__ */ r(
123
- C,
163
+ f(u) && /* @__PURE__ */ r(
164
+ T,
124
165
  {
125
166
  type: "button",
126
167
  btnType: "tinted",
127
168
  color: "gray",
128
- onClick: () => v(s),
169
+ onClick: () => k(u),
129
170
  borderRadius: "curved",
130
- children: d
171
+ children: l
131
172
  }
132
173
  )
133
174
  ] }),
134
- /* @__PURE__ */ r(R, { limit: p, children: y === !0 ? i == null ? void 0 : i.map((e, l) => /* @__PURE__ */ r(
135
- u,
136
- {
137
- uuid: e == null ? void 0 : e.uuid,
138
- image: e == null ? void 0 : e.image,
139
- name: e == null ? void 0 : e.name,
140
- onSelectCard: () => t == null ? void 0 : t(e == null ? void 0 : e.uuid)
141
- },
142
- l
143
- )) : i == null ? void 0 : i.slice(0, p).map((e, l) => /* @__PURE__ */ r(
144
- u,
175
+ /* @__PURE__ */ r(j, { limit: s, children: /* @__PURE__ */ r(
176
+ W,
145
177
  {
146
- uuid: e == null ? void 0 : e.uuid,
147
- image: e == null ? void 0 : e.image,
148
- name: e == null ? void 0 : e.name,
149
- onSelectCard: () => t == null ? void 0 : t(e == null ? void 0 : e.uuid)
150
- },
151
- l
152
- )) })
178
+ isLoading: S,
179
+ limit: s,
180
+ keyPrefix: "explore-landing",
181
+ children: N
182
+ }
183
+ ) })
153
184
  ] });
154
185
  });
155
186
  export {
156
- D as default
187
+ q as default
157
188
  };
@@ -1,4 +1,4 @@
1
- "use strict";const r=require("react/jsx-runtime"),w=require("react"),h=require("./emotion-styled.browser.esm-Cle7tAM9.cjs"),q=require("./consts-CtNoHdBj.cjs"),y=require("./useDetectMobile-D6d5LpdL.cjs"),s=require("./index-Dj5wZCVs.cjs"),S=require("./index-Dit169OA.cjs"),j=h.newStyled.div`
1
+ "use strict";const r=require("react/jsx-runtime"),o=require("react"),k=require("./emotion-styled.browser.esm-Cle7tAM9.cjs"),y=require("./consts-CtNoHdBj.cjs"),P=require("./useDetectMobile-D6d5LpdL.cjs"),g=require("./index-_Db92CJE.cjs"),q=require("./index-Dit169OA.cjs"),M=k.newStyled.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: ${q.MOBILE_SIZE_PX+"px"}) {
12
+ @media (max-width: ${y.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
- `,k=w.forwardRef((n,o)=>{var c;const{title:d,subtitle:l,description:m,buttonText:a,buttonLink:p,items:t,onButtonAction:g=()=>{},onSelectCard:i=()=>{}}=n,b=y.useDetectMobile();return r.jsxs(j,{ref:o,limit:6,children:[r.jsx(S.TextBlockV1,{subtitle:l,title:d,description:m,buttonText:a,buttonLink:p,onButtonAction:g,className:"text-block-v1"}),b===!0?(c=t==null?void 0:t.slice(0,4))==null?void 0:c.map((e,u)=>r.jsx(s.SimpleProductCard,{title:e==null?void 0:e.title,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,onSelectCard:()=>i==null?void 0:i(e==null?void 0:e.uuid)},u)):t==null?void 0:t.map((e,u)=>r.jsx(s.SimpleProductCard,{title:e==null?void 0:e.title,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,onSelectCard:()=>i==null?void 0:i(e==null?void 0:e.uuid)},u))]})});module.exports=k;
31
+ `,_=o.forwardRef((i,s)=>r.jsx(g.SkeletonWrapper,{})),v=({limit:i=6,isLoading:s=!1,keyPrefix:n})=>r.jsx(r.Fragment,{children:Array.from({length:i},(d,c)=>r.jsx(_,{isLoading:s},`${n}-skeleton-product-card-${c}`))}),R=({children:i,fallbackComponent:s=r.jsx(r.Fragment,{}),isLoading:n=!1,limit:d,keyPrefix:c})=>r.jsx(o.Suspense,{fallbackComponent:s,children:n===!0?r.jsx(v,{isLoading:n,limit:d,keyPrefix:c}):i}),p=o.memo(g.SimpleProductCard),U=o.forwardRef((i,s)=>{const{title:n,subtitle:d,description:c,buttonText:j,buttonLink:f,items:t,onButtonAction:h=()=>{},onSelectCard:u=()=>{},isLoading:S=!1,limit:a=6}=i,w=P.useDetectMobile(),b=o.useMemo(()=>{var m;return r.jsx(r.Fragment,{children:w===!0?(m=t==null?void 0:t.slice(0,4))==null?void 0:m.map((e,l)=>r.jsx(p,{title:e==null?void 0:e.title,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,onSelectCard:()=>u==null?void 0:u(e==null?void 0:e.uuid)},l)):t==null?void 0:t.map((e,l)=>r.jsx(p,{title:e==null?void 0:e.title,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,onSelectCard:()=>u==null?void 0:u(e==null?void 0:e.uuid)},l))})},[t]);return r.jsxs(M,{ref:s,limit:a,children:[r.jsx(q.TextBlockV1,{subtitle:d,title:n,description:c,buttonText:j,buttonLink:f,onButtonAction:h,className:"text-block-v1"}),r.jsx(R,{isLoading:S,limit:a,keyPrefix:"explore-landing",children:b})]})});module.exports=U;
@@ -1,11 +1,11 @@
1
- import { jsxs as w, jsx as u } from "react/jsx-runtime";
2
- import { forwardRef as b } from "react";
3
- import { n as h } from "./emotion-styled.browser.esm-CjCaF13H.js";
4
- import { M as y } from "./consts-C1uHV4xc.js";
5
- import { u as k } from "./useDetectMobile-BC6EGaBc.js";
6
- import { S as m } from "./index-CHkb_Sj6.js";
7
- import { T as S } from "./index-DxdBg_r_.js";
8
- const v = h.div`
1
+ import { jsx as r, Fragment as m, jsxs as b } from "react/jsx-runtime";
2
+ import { forwardRef as f, Suspense as y, memo as M, useMemo as v } from "react";
3
+ import { n as U } from "./emotion-styled.browser.esm-CjCaF13H.js";
4
+ import { M as B } from "./consts-C1uHV4xc.js";
5
+ import { u as C } from "./useDetectMobile-BC6EGaBc.js";
6
+ import { S as T, a as _ } from "./index-BN8qgFbe.js";
7
+ import { T as $ } from "./index-DxdBg_r_.js";
8
+ const j = U.div`
9
9
  display: grid;
10
10
  grid-template-columns: repeat(6, 1fr);
11
11
  gap: 1.25rem;
@@ -16,7 +16,7 @@ const v = h.div`
16
16
  margin: auto;
17
17
  }
18
18
 
19
- @media (max-width: ${y + "px"}) {
19
+ @media (max-width: ${B + "px"}) {
20
20
  grid-template-columns: repeat(2, 1fr);
21
21
 
22
22
  & .text-block-v1 {
@@ -35,60 +35,91 @@ const v = h.div`
35
35
 
36
36
  }
37
37
  }
38
- `, I = b((l, c) => {
39
- var o;
38
+ `, z = f((i, o) => /* @__PURE__ */ r(T, {})), A = ({ limit: i = 6, isLoading: o = !1, keyPrefix: u }) => /* @__PURE__ */ r(m, { children: Array.from({ length: i }, (l, d) => /* @__PURE__ */ r(
39
+ z,
40
+ {
41
+ isLoading: o
42
+ },
43
+ `${u}-skeleton-product-card-${d}`
44
+ )) }), E = ({
45
+ children: i,
46
+ fallbackComponent: o = /* @__PURE__ */ r(m, {}),
47
+ isLoading: u = !1,
48
+ limit: l,
49
+ keyPrefix: d
50
+ }) => /* @__PURE__ */ r(y, { fallbackComponent: o, children: u === !0 ? /* @__PURE__ */ r(
51
+ A,
52
+ {
53
+ isLoading: u,
54
+ limit: l,
55
+ keyPrefix: d
56
+ }
57
+ ) : i }), p = M(_), O = f((i, o) => {
40
58
  const {
41
- title: d,
42
- subtitle: a,
43
- description: n,
44
- buttonText: s,
45
- buttonLink: p,
46
- items: e,
47
- onButtonAction: g = () => {
59
+ title: u,
60
+ subtitle: l,
61
+ description: d,
62
+ buttonText: g,
63
+ buttonLink: h,
64
+ items: t,
65
+ onButtonAction: S = () => {
48
66
  },
49
- onSelectCard: i = () => {
50
- }
51
- } = l, f = k();
52
- return /* @__PURE__ */ w(v, { ref: c, limit: 6, children: [
53
- /* @__PURE__ */ u(
54
- S,
67
+ onSelectCard: n = () => {
68
+ },
69
+ isLoading: k = !1,
70
+ limit: s = 6
71
+ } = i, w = C(), P = v(() => {
72
+ var a;
73
+ return /* @__PURE__ */ r(m, { children: w === !0 ? (a = t == null ? void 0 : t.slice(0, 4)) == null ? void 0 : a.map((e, c) => /* @__PURE__ */ r(
74
+ p,
55
75
  {
56
- subtitle: a,
57
- title: d,
58
- description: n,
59
- buttonText: s,
60
- buttonLink: p,
61
- onButtonAction: g,
76
+ title: e == null ? void 0 : e.title,
77
+ price: e == null ? void 0 : e.price,
78
+ currency: e == null ? void 0 : e.currency,
79
+ image: e == null ? void 0 : e.image,
80
+ sellerUuid: e == null ? void 0 : e.sellerUuid,
81
+ uuid: e == null ? void 0 : e.uuid,
82
+ onSelectCard: () => n == null ? void 0 : n(e == null ? void 0 : e.uuid)
83
+ },
84
+ c
85
+ )) : t == null ? void 0 : t.map((e, c) => /* @__PURE__ */ r(
86
+ p,
87
+ {
88
+ title: e == null ? void 0 : e.title,
89
+ price: e == null ? void 0 : e.price,
90
+ currency: e == null ? void 0 : e.currency,
91
+ image: e == null ? void 0 : e.image,
92
+ sellerUuid: e == null ? void 0 : e.sellerUuid,
93
+ uuid: e == null ? void 0 : e.uuid,
94
+ onSelectCard: () => n == null ? void 0 : n(e == null ? void 0 : e.uuid)
95
+ },
96
+ c
97
+ )) });
98
+ }, [t]);
99
+ return /* @__PURE__ */ b(j, { ref: o, limit: s, children: [
100
+ /* @__PURE__ */ r(
101
+ $,
102
+ {
103
+ subtitle: l,
104
+ title: u,
105
+ description: d,
106
+ buttonText: g,
107
+ buttonLink: h,
108
+ onButtonAction: S,
62
109
  className: "text-block-v1"
63
110
  }
64
111
  ),
65
- f === !0 ? (o = e == null ? void 0 : e.slice(0, 4)) == null ? void 0 : o.map((t, r) => /* @__PURE__ */ u(
66
- m,
67
- {
68
- title: t == null ? void 0 : t.title,
69
- price: t == null ? void 0 : t.price,
70
- currency: t == null ? void 0 : t.currency,
71
- image: t == null ? void 0 : t.image,
72
- sellerUuid: t == null ? void 0 : t.sellerUuid,
73
- uuid: t == null ? void 0 : t.uuid,
74
- onSelectCard: () => i == null ? void 0 : i(t == null ? void 0 : t.uuid)
75
- },
76
- r
77
- )) : e == null ? void 0 : e.map((t, r) => /* @__PURE__ */ u(
78
- m,
112
+ /* @__PURE__ */ r(
113
+ E,
79
114
  {
80
- title: t == null ? void 0 : t.title,
81
- price: t == null ? void 0 : t.price,
82
- currency: t == null ? void 0 : t.currency,
83
- image: t == null ? void 0 : t.image,
84
- sellerUuid: t == null ? void 0 : t.sellerUuid,
85
- uuid: t == null ? void 0 : t.uuid,
86
- onSelectCard: () => i == null ? void 0 : i(t == null ? void 0 : t.uuid)
87
- },
88
- r
89
- ))
115
+ isLoading: k,
116
+ limit: s,
117
+ keyPrefix: "explore-landing",
118
+ children: P
119
+ }
120
+ )
90
121
  ] });
91
122
  });
92
123
  export {
93
- I as default
124
+ O as default
94
125
  };
@@ -1,7 +1,7 @@
1
- "use strict";const i=require("react/jsx-runtime"),m=require("react"),b=require("./emotion-styled.browser.esm-Cle7tAM9.cjs"),y=require("./consts-CtNoHdBj.cjs"),S=require("./useDetectMobile-D6d5LpdL.cjs"),k=require("./Button.cjs"),u=require("./index-vXmvgZ2Y.cjs"),j=b.newStyled.div`
1
+ "use strict";const t=require("react/jsx-runtime"),s=require("react"),j=require("./emotion-styled.browser.esm-Cle7tAM9.cjs"),k=require("./consts-CtNoHdBj.cjs"),v=require("./useDetectMobile-D6d5LpdL.cjs"),M=require("./Button.cjs"),p=require("./suspense-product-card-detailed-DtzOxHaH.cjs"),P=j.newStyled.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: ${i=>`repeat(${i.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: ${i=>`calc(${100/i.desktopCols}% - ${(i.desktopCols-1)*i.columnGapRem/i.desktopCols}rem)`};
38
38
 
39
39
  animation-duration: 0.2s;
40
40
  animation-name: animate-fade;
@@ -54,7 +54,7 @@
54
54
  }
55
55
  }
56
56
 
57
- @media (max-width: ${y.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;
@@ -65,4 +65,4 @@
65
65
  & .img-wrapper {
66
66
  }
67
67
  }
68
- `,v=m.forwardRef((t,p)=>{var c;const{items:r,limit:n=5,limitMobile:l=6,onSelectCard:o=()=>{},title:g="Urgent sale",showLessText:f="Show less",showMoreText:h="Show more"}=t,d=S.useDetectMobile(),[a,w]=m.useState(!1);return i.jsxs(j,{ref:p,limit:n,children:[i.jsxs("div",{className:"urgent-tag",children:[i.jsx("i",{className:"mng mng-lnc-bolt-filled"}),i.jsx("span",{children:g})]}),d===!0?(c=r==null?void 0:r.slice(0,a===!0?r==null?void 0:r.length:l))==null?void 0:c.map((e,s)=>i.jsx(u.DetailedProductCard,{title:e==null?void 0:e.title,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,onSelectCard:()=>o==null?void 0:o(e==null?void 0:e.uuid)},s)):r==null?void 0:r.slice(0,n).map((e,s)=>i.jsx(u.DetailedProductCard,{title:e==null?void 0:e.title,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,onSelectCard:()=>o==null?void 0:o(e==null?void 0:e.uuid)},s)),d===!0&&l<(r==null?void 0:r.length)&&i.jsx(k,{className:"show-more",btnType:"basic",type:"button",color:"gray",onClick:()=>w(!a),children:a===!0?f:h})]})});module.exports=v;
68
+ `,u=s.memo(p.DetailedProductCard),q=s.forwardRef((i,g)=>{const{items:r,limit:a=5,limitMobile:d=6,onSelectCard:o=()=>{},title:f="Urgent sale",showLessText:h="Show less",showMoreText:w="Show more",isLoading:b=!1}=i,c=v.useDetectMobile(),[n,y]=s.useState(!1),S=s.useMemo(()=>{var m;return t.jsx(t.Fragment,{children:c===!0?(m=r==null?void 0:r.slice(0,n===!0?r==null?void 0:r.length:d))==null?void 0:m.map((e,l)=>t.jsx(u,{title:e==null?void 0:e.title,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,onSelectCard:()=>o==null?void 0:o(e==null?void 0:e.uuid)},l)):r==null?void 0:r.slice(0,a).map((e,l)=>t.jsx(u,{title:e==null?void 0:e.title,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,onSelectCard:()=>o==null?void 0:o(e==null?void 0:e.uuid)},l))})},[r]);return t.jsxs(P,{ref:g,limit:a,children:[t.jsxs("div",{className:"urgent-tag",children:[t.jsx("i",{className:"mng mng-lnc-bolt-filled"}),t.jsx("span",{children:f})]}),t.jsx(p.SuspenseDetailedProductCard,{isLoading:b,limit:a,keyPrefix:"explore-landing",children:S}),c===!0&&d<(r==null?void 0:r.length)&&t.jsx(M,{className:"show-more",btnType:"basic",type:"button",color:"gray",onClick:()=>y(!n),children:n===!0?h:w})]})});module.exports=q;
@@ -1,11 +1,11 @@
1
- import { jsxs as c, jsx as o } from "react/jsx-runtime";
2
- import { forwardRef as b, useState as y } from "react";
3
- import { n as S } from "./emotion-styled.browser.esm-CjCaF13H.js";
4
- import { M as k } from "./consts-C1uHV4xc.js";
5
- import { u as v } from "./useDetectMobile-BC6EGaBc.js";
6
- import M from "./Button.js";
7
- import { D as u } from "./index-D6g5ZqyJ.js";
8
- const U = S.div`
1
+ import { jsx as o, Fragment as S, jsxs as c } from "react/jsx-runtime";
2
+ import { memo as k, forwardRef as v, useState as M, useMemo as P } from "react";
3
+ import { n as C } from "./emotion-styled.browser.esm-CjCaF13H.js";
4
+ import { M as U } from "./consts-C1uHV4xc.js";
5
+ import { u as $ } from "./useDetectMobile-BC6EGaBc.js";
6
+ import D from "./Button.js";
7
+ import { D as j, S as z } from "./suspense-product-card-detailed-BETmfKMT.js";
8
+ const L = C.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 U = S.div`
61
61
  }
62
62
  }
63
63
 
64
- @media (max-width: ${k + "px"}) {
64
+ @media (max-width: ${U + "px"}) {
65
65
  grid-template-columns: repeat(2, 1fr);
66
66
  padding: 2rem 1.25rem;
67
67
  gap: 1.19rem;
@@ -72,24 +72,20 @@ const U = S.div`
72
72
  & .img-wrapper {
73
73
  }
74
74
  }
75
- `, A = b((i, p) => {
76
- var d;
75
+ `, u = k(j), R = v((i, p) => {
77
76
  const {
78
77
  items: r,
79
- limit: n = 5,
80
- limitMobile: s = 6,
78
+ limit: a = 5,
79
+ limitMobile: l = 6,
81
80
  onSelectCard: t = () => {
82
81
  },
83
82
  title: g = "Urgent sale",
84
83
  showLessText: f = "Show less",
85
- showMoreText: h = "Show more"
86
- } = i, m = v(), [a, w] = y(!1);
87
- return /* @__PURE__ */ c(U, { ref: p, limit: n, children: [
88
- /* @__PURE__ */ c("div", { className: "urgent-tag", children: [
89
- /* @__PURE__ */ o("i", { className: "mng mng-lnc-bolt-filled" }),
90
- /* @__PURE__ */ o("span", { children: g })
91
- ] }),
92
- m === !0 ? (d = r == null ? void 0 : r.slice(0, a === !0 ? r == null ? void 0 : r.length : s)) == null ? void 0 : d.map((e, l) => /* @__PURE__ */ o(
84
+ showMoreText: h = "Show more",
85
+ isLoading: w = !1
86
+ } = i, d = $(), [n, b] = M(!1), y = P(() => {
87
+ var m;
88
+ return /* @__PURE__ */ o(S, { children: d === !0 ? (m = r == null ? void 0 : r.slice(0, n === !0 ? r == null ? void 0 : r.length : l)) == null ? void 0 : m.map((e, s) => /* @__PURE__ */ o(
93
89
  u,
94
90
  {
95
91
  title: e == null ? void 0 : e.title,
@@ -101,8 +97,8 @@ const U = S.div`
101
97
  isSponsored: e == null ? void 0 : e.isSponsored,
102
98
  onSelectCard: () => t == null ? void 0 : t(e == null ? void 0 : e.uuid)
103
99
  },
104
- l
105
- )) : r == null ? void 0 : r.slice(0, n).map((e, l) => /* @__PURE__ */ o(
100
+ s
101
+ )) : r == null ? void 0 : r.slice(0, a).map((e, s) => /* @__PURE__ */ o(
106
102
  u,
107
103
  {
108
104
  title: e == null ? void 0 : e.title,
@@ -115,21 +111,36 @@ const U = S.div`
115
111
  isSponsored: e == null ? void 0 : e.isSponsored,
116
112
  onSelectCard: () => t == null ? void 0 : t(e == null ? void 0 : e.uuid)
117
113
  },
118
- l
119
- )),
120
- m === !0 && s < (r == null ? void 0 : r.length) && /* @__PURE__ */ o(
121
- M,
114
+ s
115
+ )) });
116
+ }, [r]);
117
+ return /* @__PURE__ */ c(L, { ref: p, limit: a, children: [
118
+ /* @__PURE__ */ c("div", { className: "urgent-tag", children: [
119
+ /* @__PURE__ */ o("i", { className: "mng mng-lnc-bolt-filled" }),
120
+ /* @__PURE__ */ o("span", { children: g })
121
+ ] }),
122
+ /* @__PURE__ */ o(
123
+ z,
124
+ {
125
+ isLoading: w,
126
+ limit: a,
127
+ keyPrefix: "explore-landing",
128
+ children: y
129
+ }
130
+ ),
131
+ d === !0 && l < (r == null ? void 0 : r.length) && /* @__PURE__ */ o(
132
+ D,
122
133
  {
123
134
  className: "show-more",
124
135
  btnType: "basic",
125
136
  type: "button",
126
137
  color: "gray",
127
- onClick: () => w(!a),
128
- children: a === !0 ? f : h
138
+ onClick: () => b(!n),
139
+ children: n === !0 ? f : h
129
140
  }
130
141
  )
131
142
  ] });
132
143
  });
133
144
  export {
134
- A as default
145
+ R as default
135
146
  };