@lanaco/lnc-react-ui 4.0.38 → 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 (30) 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/SimpleCategoriesSection.cjs +9 -9
  20. package/dist/SimpleCategoriesSection.js +89 -58
  21. package/dist/SimpleProductsSection.cjs +3 -3
  22. package/dist/SimpleProductsSection.js +86 -55
  23. package/dist/UrgentSaleProductsSection.cjs +5 -5
  24. package/dist/UrgentSaleProductsSection.js +41 -30
  25. package/dist/{index-CHkb_Sj6.js → index-BN8qgFbe.js} +15 -15
  26. package/dist/{index-Dj5wZCVs.cjs → index-_Db92CJE.cjs} +3 -3
  27. package/dist/suspense-product-card-detailed-BETmfKMT.js +189 -0
  28. package/dist/{index-vXmvgZ2Y.cjs → suspense-product-card-detailed-DtzOxHaH.cjs} +4 -4
  29. package/package.json +1 -1
  30. package/dist/index-D6g5ZqyJ.js +0 -159
@@ -1,12 +1,23 @@
1
- import { jsx as r, Fragment as _, jsxs as d } from "react/jsx-runtime";
2
- import { forwardRef as p } from "react";
3
- import f from "./Button.js";
4
- import { useTheme as x } from "./ThemeProvider.js";
5
- import { n as m } from "./emotion-styled.browser.esm-CjCaF13H.js";
6
- import { m as i, t as s } from "./utils-DtRLzzTZ.js";
7
- import { M as h } from "./consts-C1uHV4xc.js";
8
- import { R as u } from "./style-6tSw9aqK.js";
9
- const v = m.div`
1
+ import { jsxs as i, jsx as e, Fragment as c } from "react/jsx-runtime";
2
+ import { forwardRef as m, Suspense as v, memo as w, useMemo as k } from "react";
3
+ import { n as _ } from "./emotion-styled.browser.esm-CjCaF13H.js";
4
+ import { M as g } from "./consts-C1uHV4xc.js";
5
+ import { R as y } from "./style-6tSw9aqK.js";
6
+ import { useTheme as f } from "./ThemeProvider.js";
7
+ import { m as d, t as h } from "./utils-DtRLzzTZ.js";
8
+ import b from "./Button.js";
9
+ const $ = _.div`
10
+ display: grid;
11
+ grid-template-columns: ${(t) => `repeat(${t.limit}, 1fr)`};
12
+ gap: 1.25rem;
13
+ justify-items: center;
14
+
15
+ @media (max-width: ${g + "px"}) {
16
+ display: flex;
17
+ flex-direction: column;
18
+ gap: 1rem;
19
+ }
20
+ `, u = _.div`
10
21
  display: flex;
11
22
  flex-direction: column;
12
23
  align-items: flex-start;
@@ -37,7 +48,7 @@ const v = m.div`
37
48
  & .wrapper__image--skeleton {
38
49
  width: 100%;
39
50
  border-radius: 0.75rem;
40
- background-color: ${i("-90deg")};
51
+ background-color: ${d("-90deg")};
41
52
  }
42
53
 
43
54
  & .wrapper__text {
@@ -55,7 +66,7 @@ const v = m.div`
55
66
  font-style: normal;
56
67
  font-weight: 500;
57
68
  line-height: 1.5rem;
58
- ${s(2)}
69
+ ${h(2)}
59
70
  }
60
71
 
61
72
  & .text__description {
@@ -64,17 +75,17 @@ const v = m.div`
64
75
  font-style: normal;
65
76
  font-weight: 600;
66
77
  line-height: 1.75rem;
67
- ${s(2)}
78
+ ${h(2)}
68
79
  }
69
80
 
70
81
  & .text__title--skeleton {
71
- background-color: ${i("-90deg")};
82
+ background-color: ${d("-90deg")};
72
83
  height: 1rem;
73
84
  width: 9rem;
74
85
  }
75
86
 
76
87
  & .text__description--skeleton {
77
- background-color: ${i("-90deg")};
88
+ background-color: ${d("-90deg")};
78
89
  height: 1rem;
79
90
  width: 12rem;
80
91
  }
@@ -94,7 +105,7 @@ const v = m.div`
94
105
  }
95
106
 
96
107
  & .text__action--skeleton {
97
- background-color: ${i("-90deg")};
108
+ background-color: ${d("-90deg")};
98
109
  height: 2rem;
99
110
  width: 9rem;
100
111
  position: absolute;
@@ -102,7 +113,7 @@ const v = m.div`
102
113
  left: 1rem;
103
114
  }
104
115
 
105
- @media (max-width: ${h + "px"}) {
116
+ @media (max-width: ${g + "px"}) {
106
117
  max-height: 100%;
107
118
 
108
119
  & .wrapper__overlay {
@@ -121,63 +132,92 @@ const v = m.div`
121
132
  left: 2rem;
122
133
  }
123
134
  }
124
- `, w = p(
135
+ `, N = m(({}, t) => {
136
+ const { theme: a } = f();
137
+ return /* @__PURE__ */ i(u, { theme: a, children: [
138
+ /* @__PURE__ */ e("div", { className: "wrapper__image--skeleton" }),
139
+ /* @__PURE__ */ i("div", { className: "wrapper__text", children: [
140
+ /* @__PURE__ */ e("div", { className: "text__title--skeleton" }),
141
+ /* @__PURE__ */ e("div", { className: "text__description--skeleton" })
142
+ ] }),
143
+ /* @__PURE__ */ e("div", { className: "text__action--skeleton" })
144
+ ] });
145
+ }), S = ({ limit: t = 2, isLoading: a = !1, keyPrefix: o }) => /* @__PURE__ */ e(c, { children: Array.from({ length: t }, (n, l) => /* @__PURE__ */ e(
146
+ N,
147
+ {
148
+ isLoading: a
149
+ },
150
+ `${o}-skeleton-product-card-${l}`
151
+ )) }), C = ({
152
+ children: t,
153
+ fallbackComponent: a = /* @__PURE__ */ e(c, {}),
154
+ isLoading: o = !1,
155
+ limit: n,
156
+ keyPrefix: l
157
+ }) => /* @__PURE__ */ e(v, { fallbackComponent: a, children: o === !0 ? /* @__PURE__ */ e(
158
+ S,
159
+ {
160
+ isLoading: o,
161
+ limit: n,
162
+ keyPrefix: l
163
+ }
164
+ ) : t }), P = m(
125
165
  ({
126
166
  title: t,
127
167
  image: a,
128
- overlay: l,
168
+ overlay: o,
129
169
  description: n,
130
- actionText: c,
131
- actionLink: e,
132
- handleClick: o = () => {
170
+ actionText: l,
171
+ actionLink: x,
172
+ handleClick: s = () => {
133
173
  }
134
- }, y) => {
135
- const { theme: g } = x();
136
- return /* @__PURE__ */ r(_, { children: /* @__PURE__ */ d(v, { theme: g, overlay: l, onClick: o, children: [
137
- /* @__PURE__ */ r("div", { className: "wrapper__overlay", children: /* @__PURE__ */ r("img", { src: a, className: "wrapper__image" }) }),
138
- /* @__PURE__ */ d("div", { className: "wrapper__text", children: [
139
- /* @__PURE__ */ r("div", { className: "text__title", children: t }),
140
- /* @__PURE__ */ r("div", { className: "text__description", children: n })
174
+ }, r) => {
175
+ const { theme: p } = f();
176
+ return /* @__PURE__ */ e(c, { children: /* @__PURE__ */ i(u, { theme: p, overlay: o, onClick: s, children: [
177
+ /* @__PURE__ */ e("div", { className: "wrapper__overlay", children: /* @__PURE__ */ e("img", { src: a, className: "wrapper__image" }) }),
178
+ /* @__PURE__ */ i("div", { className: "wrapper__text", children: [
179
+ /* @__PURE__ */ e("div", { className: "text__title", children: t }),
180
+ /* @__PURE__ */ e("div", { className: "text__description", children: n })
141
181
  ] }),
142
- /* @__PURE__ */ r(
143
- f,
182
+ /* @__PURE__ */ e(
183
+ b,
144
184
  {
145
- text: c,
146
- onClick: o,
185
+ text: l,
186
+ onClick: s,
147
187
  className: "text__action"
148
188
  }
149
189
  )
150
190
  ] }) });
151
191
  }
152
- ), b = m.div`
153
- display: grid;
154
- grid-template-columns: ${(t) => `repeat(${t.limit}, 1fr)`};
155
- gap: 1.25rem;
156
- justify-items: center;
157
-
158
- @media (max-width: ${h + "px"}) {
159
- display: flex;
160
- flex-direction: column;
161
- gap: 1rem;
162
- }
163
- `, j = p(
164
- ({ title: t, items: a, limit: l = 2, onSelectCard: n = () => {
165
- } }, c) => /* @__PURE__ */ d(u, { children: [
166
- /* @__PURE__ */ r("div", { className: "regular-title center", children: /* @__PURE__ */ r("div", { className: "regular-title-text", children: /* @__PURE__ */ r("span", { children: t }) }) }),
167
- /* @__PURE__ */ r(b, { limit: l, children: a && (a == null ? void 0 : a.map((e, o) => /* @__PURE__ */ r(
168
- w,
192
+ ), G = w(P), W = m(
193
+ ({ title: t, items: a, limit: o = 2, onSelectCard: n = () => {
194
+ }, isLoading: l = !1 }, x) => {
195
+ const s = k(() => /* @__PURE__ */ e(c, { children: a && (a == null ? void 0 : a.map((r, p) => /* @__PURE__ */ e(
196
+ G,
169
197
  {
170
- title: e == null ? void 0 : e.title,
171
- image: e == null ? void 0 : e.image,
172
- description: e == null ? void 0 : e.description,
173
- actionText: e == null ? void 0 : e.actionText,
174
- overlay: e == null ? void 0 : e.overlay,
175
- handleClick: () => n(e == null ? void 0 : e.uuid)
198
+ title: r == null ? void 0 : r.title,
199
+ image: r == null ? void 0 : r.image,
200
+ description: r == null ? void 0 : r.description,
201
+ actionText: r == null ? void 0 : r.actionText,
202
+ overlay: r == null ? void 0 : r.overlay,
203
+ handleClick: () => n(r == null ? void 0 : r.uuid)
176
204
  },
177
- `landing-page-overlay-general-card__${o + 1}`
178
- ))) })
179
- ] })
205
+ `landing-page-overlay-general-card__${p + 1}`
206
+ ))) }), [a]);
207
+ return /* @__PURE__ */ i(y, { children: [
208
+ /* @__PURE__ */ e("div", { className: "regular-title center", children: /* @__PURE__ */ e("div", { className: "regular-title-text", children: /* @__PURE__ */ e("span", { children: t }) }) }),
209
+ /* @__PURE__ */ e($, { limit: o, children: /* @__PURE__ */ e(
210
+ C,
211
+ {
212
+ isLoading: l,
213
+ limit: o,
214
+ keyPrefix: "explore-landing",
215
+ children: s
216
+ }
217
+ ) })
218
+ ] });
219
+ }
180
220
  );
181
221
  export {
182
- j as default
222
+ W as default
183
223
  };
@@ -1,4 +1,4 @@
1
- "use strict";const i=require("react/jsx-runtime"),p=require("react"),c=require("./emotion-styled.browser.esm-Cle7tAM9.cjs"),g=require("./consts-CtNoHdBj.cjs"),b=require("./useDetectMobile-D6d5LpdL.cjs"),f=require("./style-BR3tIhP1.cjs"),a=require("./utils-NZLCh-J5.cjs"),j=c.newStyled.div`
1
+ "use strict";const r=require("react/jsx-runtime"),d=require("react"),u=require("./emotion-styled.browser.esm-Cle7tAM9.cjs"),p=require("./consts-CtNoHdBj.cjs"),v=require("./useDetectMobile-D6d5LpdL.cjs"),k=require("./style-BR3tIhP1.cjs"),l=require("./utils-NZLCh-J5.cjs"),y=u.newStyled.div`
2
2
  width: 100%;
3
3
  height: 22.5rem;
4
4
  min-height: 22.5rem;
@@ -15,12 +15,12 @@
15
15
  height: 100%;
16
16
  object-fit: cover;
17
17
  }
18
- `,v=c.newStyled.div`
18
+ `,S=u.newStyled.div`
19
19
  display: grid;
20
- grid-template-columns: ${o=>`repeat(${o.limit}, minmax(0, 1fr))`};
20
+ grid-template-columns: ${t=>`repeat(${t.limit}, minmax(0, 1fr))`};
21
21
  gap: 1.25rem;
22
22
 
23
- @media (max-width: ${g.MOBILE_SIZE_PX+"px"}) {
23
+ @media (max-width: ${p.MOBILE_SIZE_PX+"px"}) {
24
24
  display: flex;
25
25
  gap: 1rem;
26
26
  overflow-x: auto;
@@ -39,7 +39,7 @@
39
39
  /* Safari and Chrome */
40
40
  }
41
41
  }
42
- `,y=c.newStyled.div`
42
+ `,f=u.newStyled.div`
43
43
  display: flex;
44
44
  flex-direction: column;
45
45
  gap: 0.5rem;
@@ -55,7 +55,7 @@
55
55
  & .card-title {
56
56
  font-size: 0.875rem;
57
57
  font-weight: 600;
58
- ${a.truncateTextInRows(2)}
58
+ ${l.truncateTextInRows(2)}
59
59
  }
60
60
 
61
61
  &:hover {
@@ -65,18 +65,18 @@
65
65
  }
66
66
 
67
67
  & .skeleton-img {
68
- background-color: ${a.linearGradientAnimation("-90deg")};
68
+ background-color: ${l.linearGradientAnimation("-90deg")};
69
69
  border-radius: 0.75rem;
70
70
  border: 1px solid white;
71
71
  }
72
72
 
73
73
  & .skeleton-title {
74
- background-color: ${a.linearGradientAnimation("-90deg")};
74
+ background-color: ${l.linearGradientAnimation("-90deg")};
75
75
  width: 100%;
76
76
  height: 1.25rem;
77
77
  }
78
78
 
79
- @media (max-width: ${g.MOBILE_SIZE_PX+"px"}) {
79
+ @media (max-width: ${p.MOBILE_SIZE_PX+"px"}) {
80
80
  & img {
81
81
  width: 8.875rem;
82
82
  height: 8.875rem;
@@ -87,4 +87,4 @@
87
87
  object-fit: cover;
88
88
  }
89
89
  }
90
- `,h=p.forwardRef((o,m)=>{const{uuid:d,title:r,image:n,sellerUuid:u,onSelectCard:t=()=>{},imageComponent:s}=o;return i.jsxs(y,{className:"product-card",onClick:t,children:[a.isDefined(s)?s:i.jsx("img",{src:n}),i.jsx("div",{className:"card-title",children:r})]})}),S=p.forwardRef((o,m)=>{const{icon:d,items:r,limit:n=4,bannerImage:u,onSelectCard:t=()=>{},title:s="Season inspiration"}=o,w=b.useDetectMobile();return i.jsxs(f.RegulatTitleSectionWrapper,{ref:m,children:[i.jsx("div",{className:"regular-title",children:i.jsxs("div",{className:"regular-title-text",children:[a.isDefinedNotEmptyString(d)&&i.jsx("i",{className:d}),i.jsx("span",{children:s})]})}),i.jsx(j,{className:"products-banner",children:i.jsx("img",{src:u})}),i.jsx(v,{limit:n,children:w===!0?r==null?void 0:r.map((e,l)=>i.jsx(h,{title:e==null?void 0:e.title,image:e==null?void 0:e.image,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,onSelectCard:()=>t==null?void 0:t(e==null?void 0:e.uuid)},l)):r==null?void 0:r.slice(0,n).map((e,l)=>i.jsx(h,{title:e==null?void 0:e.title,image:e==null?void 0:e.image,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,onSelectCard:()=>t==null?void 0:t(e==null?void 0:e.uuid)},l))})]})});module.exports=S;
90
+ `,P=d.forwardRef((t,a)=>{const{uuid:o,title:i,image:s,sellerUuid:g,onSelectCard:n=()=>{},imageComponent:c}=t;return r.jsxs(f,{className:"product-card",onClick:n,children:[l.isDefined(c)?c:r.jsx("img",{src:s}),r.jsx("div",{className:"card-title",children:i})]})}),C=d.forwardRef(({},t)=>r.jsxs(f,{className:"product-card",children:[r.jsx("img",{className:"skeleton-img"}),r.jsx("div",{className:"skeleton-title"})]})),N=({limit:t=4,isLoading:a=!1,keyPrefix:o})=>r.jsx(r.Fragment,{children:Array.from({length:t},(i,s)=>r.jsx(C,{isLoading:a},`${o}-skeleton-product-card-${s}`))}),$=({children:t,fallbackComponent:a=r.jsx(r.Fragment,{}),isLoading:o=!1,limit:i,keyPrefix:s})=>r.jsx(d.Suspense,{fallbackComponent:a,children:o===!0?r.jsx(N,{isLoading:o,limit:i,keyPrefix:s}):t}),h=d.memo(P),q=d.forwardRef((t,a)=>{const{icon:o,items:i,limit:s=4,bannerImage:g,onSelectCard:n=()=>{},title:c="Season inspiration",isLoading:w=!1}=t,b=v.useDetectMobile(),j=d.useMemo(()=>r.jsx(r.Fragment,{children:b===!0?i==null?void 0:i.map((e,m)=>r.jsx(h,{title:e==null?void 0:e.title,image:e==null?void 0:e.image,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,onSelectCard:()=>n==null?void 0:n(e==null?void 0:e.uuid)},m)):i==null?void 0:i.slice(0,s).map((e,m)=>r.jsx(h,{title:e==null?void 0:e.title,image:e==null?void 0:e.image,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,onSelectCard:()=>n==null?void 0:n(e==null?void 0:e.uuid)},m))}),[i]);return r.jsxs(k.RegulatTitleSectionWrapper,{ref:a,children:[r.jsx("div",{className:"regular-title",children:r.jsxs("div",{className:"regular-title-text",children:[l.isDefinedNotEmptyString(o)&&r.jsx("i",{className:o}),r.jsx("span",{children:c})]})}),r.jsx(y,{className:"products-banner",children:r.jsx("img",{src:g})}),r.jsx(S,{limit:s,children:r.jsx($,{isLoading:w,limit:s,keyPrefix:"explore-landing",children:j})})]})});module.exports=q;
@@ -1,11 +1,11 @@
1
- import { jsxs as m, jsx as r } from "react/jsx-runtime";
2
- import { forwardRef as g } from "react";
3
- import { n as s } from "./emotion-styled.browser.esm-CjCaF13H.js";
4
- import { M as f } from "./consts-C1uHV4xc.js";
5
- import { u as w } from "./useDetectMobile-BC6EGaBc.js";
6
- import { R as v } from "./style-6tSw9aqK.js";
7
- import { t as k, m as h, l as y, k as N } from "./utils-DtRLzzTZ.js";
8
- const S = s.div`
1
+ import { jsxs as s, jsx as r, Fragment as c } from "react/jsx-runtime";
2
+ import { forwardRef as u, Suspense as S, memo as C, useMemo as N } from "react";
3
+ import { n as p } from "./emotion-styled.browser.esm-CjCaF13H.js";
4
+ import { M as b } from "./consts-C1uHV4xc.js";
5
+ import { u as P } from "./useDetectMobile-BC6EGaBc.js";
6
+ import { R as $ } from "./style-6tSw9aqK.js";
7
+ import { t as M, m as g, l as j, k as E } from "./utils-DtRLzzTZ.js";
8
+ const I = p.div`
9
9
  width: 100%;
10
10
  height: 22.5rem;
11
11
  min-height: 22.5rem;
@@ -22,12 +22,12 @@ const S = s.div`
22
22
  height: 100%;
23
23
  object-fit: cover;
24
24
  }
25
- `, $ = s.div`
25
+ `, U = p.div`
26
26
  display: grid;
27
- grid-template-columns: ${(a) => `repeat(${a.limit}, minmax(0, 1fr))`};
27
+ grid-template-columns: ${(t) => `repeat(${t.limit}, minmax(0, 1fr))`};
28
28
  gap: 1.25rem;
29
29
 
30
- @media (max-width: ${f + "px"}) {
30
+ @media (max-width: ${b + "px"}) {
31
31
  display: flex;
32
32
  gap: 1rem;
33
33
  overflow-x: auto;
@@ -46,7 +46,7 @@ const S = s.div`
46
46
  /* Safari and Chrome */
47
47
  }
48
48
  }
49
- `, j = s.div`
49
+ `, w = p.div`
50
50
  display: flex;
51
51
  flex-direction: column;
52
52
  gap: 0.5rem;
@@ -62,7 +62,7 @@ const S = s.div`
62
62
  & .card-title {
63
63
  font-size: 0.875rem;
64
64
  font-weight: 600;
65
- ${k(2)}
65
+ ${M(2)}
66
66
  }
67
67
 
68
68
  &:hover {
@@ -72,18 +72,18 @@ const S = s.div`
72
72
  }
73
73
 
74
74
  & .skeleton-img {
75
- background-color: ${h("-90deg")};
75
+ background-color: ${g("-90deg")};
76
76
  border-radius: 0.75rem;
77
77
  border: 1px solid white;
78
78
  }
79
79
 
80
80
  & .skeleton-title {
81
- background-color: ${h("-90deg")};
81
+ background-color: ${g("-90deg")};
82
82
  width: 100%;
83
83
  height: 1.25rem;
84
84
  }
85
85
 
86
- @media (max-width: ${f + "px"}) {
86
+ @media (max-width: ${b + "px"}) {
87
87
  & img {
88
88
  width: 8.875rem;
89
89
  height: 8.875rem;
@@ -94,59 +94,90 @@ const S = s.div`
94
94
  object-fit: cover;
95
95
  }
96
96
  }
97
- `, u = g((a, c) => {
97
+ `, W = u((t, d) => {
98
98
  const {
99
- uuid: l,
99
+ uuid: a,
100
100
  title: i,
101
101
  image: o,
102
- sellerUuid: p,
103
- onSelectCard: t = () => {
102
+ sellerUuid: h,
103
+ onSelectCard: n = () => {
104
104
  },
105
- imageComponent: d
106
- } = a;
107
- return /* @__PURE__ */ m(j, { className: "product-card", onClick: t, children: [
108
- y(d) ? d : /* @__PURE__ */ r("img", { src: o }),
105
+ imageComponent: l
106
+ } = t;
107
+ return /* @__PURE__ */ s(w, { className: "product-card", onClick: n, children: [
108
+ j(l) ? l : /* @__PURE__ */ r("img", { src: o }),
109
109
  /* @__PURE__ */ r("div", { className: "card-title", children: i })
110
110
  ] });
111
- }), P = g((a, c) => {
111
+ }), B = u(({}, t) => /* @__PURE__ */ s(w, { className: "product-card", children: [
112
+ /* @__PURE__ */ r("img", { className: "skeleton-img" }),
113
+ /* @__PURE__ */ r("div", { className: "skeleton-title" })
114
+ ] })), R = ({ limit: t = 4, isLoading: d = !1, keyPrefix: a }) => /* @__PURE__ */ r(c, { children: Array.from({ length: t }, (i, o) => /* @__PURE__ */ r(
115
+ B,
116
+ {
117
+ isLoading: d
118
+ },
119
+ `${a}-skeleton-product-card-${o}`
120
+ )) }), z = ({
121
+ children: t,
122
+ fallbackComponent: d = /* @__PURE__ */ r(c, {}),
123
+ isLoading: a = !1,
124
+ limit: i,
125
+ keyPrefix: o
126
+ }) => /* @__PURE__ */ r(S, { fallbackComponent: d, children: a === !0 ? /* @__PURE__ */ r(
127
+ R,
128
+ {
129
+ isLoading: a,
130
+ limit: i,
131
+ keyPrefix: o
132
+ }
133
+ ) : t }), f = C(W), O = u((t, d) => {
112
134
  const {
113
- icon: l,
135
+ icon: a,
114
136
  items: i,
115
137
  limit: o = 4,
116
- bannerImage: p,
117
- onSelectCard: t = () => {
138
+ bannerImage: h,
139
+ onSelectCard: n = () => {
140
+ },
141
+ title: l = "Season inspiration",
142
+ isLoading: k = !1
143
+ } = t, v = P(), y = N(() => /* @__PURE__ */ r(c, { children: v === !0 ? i == null ? void 0 : i.map((e, m) => /* @__PURE__ */ r(
144
+ f,
145
+ {
146
+ title: e == null ? void 0 : e.title,
147
+ image: e == null ? void 0 : e.image,
148
+ sellerUuid: e == null ? void 0 : e.sellerUuid,
149
+ uuid: e == null ? void 0 : e.uuid,
150
+ onSelectCard: () => n == null ? void 0 : n(e == null ? void 0 : e.uuid)
118
151
  },
119
- title: d = "Season inspiration"
120
- } = a, b = w();
121
- return /* @__PURE__ */ m(v, { ref: c, children: [
122
- /* @__PURE__ */ r("div", { className: "regular-title", children: /* @__PURE__ */ m("div", { className: "regular-title-text", children: [
123
- N(l) && /* @__PURE__ */ r("i", { className: l }),
124
- /* @__PURE__ */ r("span", { children: d })
152
+ m
153
+ )) : i == null ? void 0 : i.slice(0, o).map((e, m) => /* @__PURE__ */ r(
154
+ f,
155
+ {
156
+ title: e == null ? void 0 : e.title,
157
+ image: e == null ? void 0 : e.image,
158
+ sellerUuid: e == null ? void 0 : e.sellerUuid,
159
+ uuid: e == null ? void 0 : e.uuid,
160
+ onSelectCard: () => n == null ? void 0 : n(e == null ? void 0 : e.uuid)
161
+ },
162
+ m
163
+ )) }), [i]);
164
+ return /* @__PURE__ */ s($, { ref: d, children: [
165
+ /* @__PURE__ */ r("div", { className: "regular-title", children: /* @__PURE__ */ s("div", { className: "regular-title-text", children: [
166
+ E(a) && /* @__PURE__ */ r("i", { className: a }),
167
+ /* @__PURE__ */ r("span", { children: l })
125
168
  ] }) }),
126
- /* @__PURE__ */ r(S, { className: "products-banner", children: /* @__PURE__ */ r("img", { src: p }) }),
127
- /* @__PURE__ */ r($, { limit: o, children: b === !0 ? i == null ? void 0 : i.map((e, n) => /* @__PURE__ */ r(
128
- u,
129
- {
130
- title: e == null ? void 0 : e.title,
131
- image: e == null ? void 0 : e.image,
132
- sellerUuid: e == null ? void 0 : e.sellerUuid,
133
- uuid: e == null ? void 0 : e.uuid,
134
- onSelectCard: () => t == null ? void 0 : t(e == null ? void 0 : e.uuid)
135
- },
136
- n
137
- )) : i == null ? void 0 : i.slice(0, o).map((e, n) => /* @__PURE__ */ r(
138
- u,
169
+ /* @__PURE__ */ r(I, { className: "products-banner", children: /* @__PURE__ */ r("img", { src: h }) }),
170
+ /* @__PURE__ */ r(U, { limit: o, children: /* @__PURE__ */ r(
171
+ z,
139
172
  {
140
- title: e == null ? void 0 : e.title,
141
- image: e == null ? void 0 : e.image,
142
- sellerUuid: e == null ? void 0 : e.sellerUuid,
143
- uuid: e == null ? void 0 : e.uuid,
144
- onSelectCard: () => t == null ? void 0 : t(e == null ? void 0 : e.uuid)
145
- },
146
- n
147
- )) })
173
+ isLoading: k,
174
+ limit: o,
175
+ keyPrefix: "explore-landing",
176
+ children: y
177
+ }
178
+ ) })
148
179
  ] });
149
180
  });
150
181
  export {
151
- P as default
182
+ O as default
152
183
  };
@@ -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;