@lanaco/lnc-react-ui 4.0.38 → 4.0.40

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 (67) hide show
  1. package/dist/BannerSectionBasic.cjs +9 -9
  2. package/dist/BannerSectionBasic.js +20 -20
  3. package/dist/BannerSectionCarousel.cjs +13 -5
  4. package/dist/BannerSectionCarousel.js +29 -21
  5. package/dist/BannerSectionGrid.cjs +1 -1
  6. package/dist/BannerSectionGrid.js +6 -6
  7. package/dist/BannerSectionSimple.cjs +4 -4
  8. package/dist/BannerSectionSimple.js +41 -38
  9. package/dist/BannerSectionWithList.cjs +4 -4
  10. package/dist/BannerSectionWithList.js +17 -17
  11. package/dist/BannerSectionWithListImage.cjs +5 -5
  12. package/dist/BannerSectionWithListImage.js +41 -38
  13. package/dist/BlogsSectionDetailed.cjs +15 -15
  14. package/dist/BlogsSectionDetailed.js +128 -92
  15. package/dist/BlogsSectionLarge.cjs +10 -10
  16. package/dist/BlogsSectionLarge.js +87 -60
  17. package/dist/BlogsSectionSimple.cjs +8 -8
  18. package/dist/BlogsSectionSimple.js +98 -72
  19. package/dist/BlogsSectionSimpleCentered.cjs +10 -10
  20. package/dist/BlogsSectionSimpleCentered.js +76 -46
  21. package/dist/BlogsSectionWithFilters.cjs +11 -11
  22. package/dist/BlogsSectionWithFilters.js +102 -73
  23. package/dist/BrandHitsSection.cjs +12 -7
  24. package/dist/BrandHitsSection.js +10 -5
  25. package/dist/CalorieCalculatorSection.cjs +7 -8
  26. package/dist/CalorieCalculatorSection.js +31 -32
  27. package/dist/CustomLoanMapSection.cjs +2 -2
  28. package/dist/CustomLoanMapSection.js +13 -13
  29. package/dist/DetailedProductsSection.cjs +4 -4
  30. package/dist/DetailedProductsSection.js +66 -57
  31. package/dist/FieldOfInterestsWithAvatarsCardsSection.cjs +8 -8
  32. package/dist/FieldOfInterestsWithAvatarsCardsSection.js +9 -8
  33. package/dist/FieldOfInterestsWithTagsCardsSection.cjs +14 -6
  34. package/dist/FieldOfInterestsWithTagsCardsSection.js +12 -4
  35. package/dist/GeneralWithTagsCardsSection.cjs +18 -6
  36. package/dist/GeneralWithTagsCardsSection.js +44 -31
  37. package/dist/GiftCardsSection.cjs +9 -5
  38. package/dist/GiftCardsSection.js +21 -17
  39. package/dist/LocationSearchSection.cjs +1 -1
  40. package/dist/LocationSearchSection.js +1 -1
  41. package/dist/MasonryGeneralCardsSection.cjs +21 -1
  42. package/dist/MasonryGeneralCardsSection.js +20 -0
  43. package/dist/OverlayGeneralCardsSection.cjs +60 -104
  44. package/dist/OverlayGeneralCardsSection.js +138 -147
  45. package/dist/ProductsWithBannerSection.cjs +10 -10
  46. package/dist/ProductsWithBannerSection.js +85 -54
  47. package/dist/SalesCampaignsSection.cjs +17 -17
  48. package/dist/SalesCampaignsSection.js +81 -81
  49. package/dist/ShopCardsSection.cjs +19 -9
  50. package/dist/ShopCardsSection.js +54 -40
  51. package/dist/SimpleCategoriesSection.cjs +9 -9
  52. package/dist/SimpleCategoriesSection.js +89 -58
  53. package/dist/SimpleProductsSection.cjs +3 -3
  54. package/dist/SimpleProductsSection.js +86 -55
  55. package/dist/UrgentSaleProductsSection.cjs +5 -5
  56. package/dist/UrgentSaleProductsSection.js +41 -30
  57. package/dist/{index-CT6_7UFb.js → index-5cttM4t7.js} +119 -124
  58. package/dist/{index-CHkb_Sj6.js → index-BT55M3t6.js} +16 -15
  59. package/dist/{index-Dj5wZCVs.cjs → index-DHJmdMN8.cjs} +6 -5
  60. package/dist/index-Dn5tPLgP.cjs +95 -0
  61. package/dist/{style-6tSw9aqK.js → style-CiePxaJ_.js} +6 -6
  62. package/dist/{style-BR3tIhP1.cjs → style-DN1qT8BE.cjs} +6 -6
  63. package/dist/suspense-product-card-detailed-BETmfKMT.js +189 -0
  64. package/dist/{index-vXmvgZ2Y.cjs → suspense-product-card-detailed-DtzOxHaH.cjs} +4 -4
  65. package/package.json +1 -1
  66. package/dist/index-D6g5ZqyJ.js +0 -159
  67. package/dist/index-Q_i-aqsF.cjs +0 -95
@@ -1,183 +1,174 @@
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";
1
+ import { jsx as r, Fragment as d, jsxs as c } from "react/jsx-runtime";
2
+ import { forwardRef as p, Suspense as f, memo as x, useMemo as v } from "react";
3
+ import { n as g } from "./emotion-styled.browser.esm-CjCaF13H.js";
7
4
  import { M as h } from "./consts-C1uHV4xc.js";
8
- import { R as u } from "./style-6tSw9aqK.js";
9
- const v = m.div`
10
- display: flex;
11
- flex-direction: column;
12
- align-items: flex-start;
13
- border-radius: 0.75rem;
5
+ import { R as y } from "./style-CiePxaJ_.js";
6
+ import { t as w, m as k } from "./utils-DtRLzzTZ.js";
7
+ import $ from "./Button.js";
8
+ import { useTheme as b } from "./ThemeProvider.js";
9
+ const N = g.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: ${h + "px"}) {
16
+ display: flex;
17
+ flex-direction: column;
18
+ gap: 1rem;
19
+ }
20
+ `, m = g.div`
21
+ width: 100%;
22
+ overflow: hidden;
14
23
  position: relative;
15
- max-height: 28.75rem;
16
24
 
17
- & .wrapper__overlay {
18
- position: relative;
25
+ border-radius: 0.75rem;
26
+ background: ${(t) => t == null ? void 0 : t.overlay};
27
+ cursor: pointer;
19
28
 
20
- &::after {
21
- content: "";
22
- position: absolute;
23
- border-radius: 0.75rem;
24
- left: 0;
25
- top: 0;
26
- width: 100%;
27
- height: 99%;
28
- max-height: 28.75rem;
29
- background: ${(t) => t == null ? void 0 : t.overlay};
30
- }
29
+ & .content-wrapper {
30
+ position: absolute;
31
+ right: 0;
32
+ top: 0;
33
+ padding: 2.25rem;
34
+ display: flex;
35
+ flex-direction: column;
36
+ gap: 1rem;
37
+ justify-content: space-between;
38
+ height: 100%;
39
+ width: 100%;
31
40
  }
32
41
 
33
- & .wrapper__image {
34
- border-radius: 0.75rem;
35
- }
42
+ & button {
43
+ width: fit-content;
44
+ color: var(--gray-950, #14161a);
36
45
 
37
- & .wrapper__image--skeleton {
38
- width: 100%;
39
- border-radius: 0.75rem;
40
- background-color: ${i("-90deg")};
46
+ &:hover {
47
+ color: var(--gray-700, #4e555f);
48
+ }
41
49
  }
42
50
 
43
- & .wrapper__text {
51
+ & .content-text {
44
52
  display: flex;
45
53
  flex-direction: column;
46
- align-items: flex-start;
47
- padding: 1rem;
48
- position: absolute;
49
- top: 0;
50
- left: 0;
51
-
52
- & .text__title {
53
- color: var(--white);
54
- font-size: 1rem;
55
- font-style: normal;
56
- font-weight: 500;
57
- line-height: 1.5rem;
58
- ${s(2)}
59
- }
54
+ gap: 1rem;
55
+ color: var(--white, #fff);
56
+ font-size: 1rem;
57
+ font-weight: 500;
60
58
 
61
- & .text__description {
62
- color: var(--white);
63
- font-size: 1.375rem;
64
- font-style: normal;
59
+ & .content-text-title {
65
60
  font-weight: 600;
66
- line-height: 1.75rem;
67
- ${s(2)}
68
- }
69
-
70
- & .text__title--skeleton {
71
- background-color: ${i("-90deg")};
72
- height: 1rem;
73
- width: 9rem;
74
- }
75
-
76
- & .text__description--skeleton {
77
- background-color: ${i("-90deg")};
78
- height: 1rem;
79
- width: 12rem;
61
+ ${w(2)}
80
62
  }
81
63
  }
82
64
 
83
- & .text__action {
84
- background: var(--white);
85
- color: var(--black);
86
- position: absolute;
87
- bottom: 1rem;
88
- left: 1rem;
89
-
90
- &:hover {
91
- background: var(--primary-500, #f59e0b);
92
- color: var(--white);
93
- }
65
+ & img {
66
+ aspect-ratio: 1 / 1;
67
+ mix-blend-mode: multiply;
68
+ width: 100%;
69
+ object-fit: cover;
94
70
  }
95
71
 
96
- & .text__action--skeleton {
97
- background-color: ${i("-90deg")};
98
- height: 2rem;
99
- width: 9rem;
100
- position: absolute;
101
- bottom: 1rem;
102
- left: 1rem;
72
+ & .img-skeleton {
73
+ background-color: ${k("-90deg")};
74
+ min-height: 28.75rem;
103
75
  }
104
76
 
105
- @media (max-width: ${h + "px"}) {
106
- max-height: 100%;
107
-
108
- & .wrapper__overlay {
109
- &::after {
110
- max-height: 100%;
111
- }
112
- }
113
-
114
- & .wrapper__text {
115
- top: 1rem;
116
- left: 1rem;
77
+ &:hover {
78
+ & .content-text {
79
+ color: var(--primary-500, #f59e0b);
117
80
  }
81
+ }
118
82
 
119
- & .text__action {
120
- bottom: 2rem;
121
- left: 2rem;
83
+ @media (max-width: ${h + "px"}) {
84
+ & img,
85
+ .img.skeleton {
86
+ aspect-ratio: unset;
87
+ min-height: 28.75rem;
88
+ max-height: 28.75rem;
122
89
  }
123
90
  }
124
- `, w = p(
125
- ({
126
- title: t,
127
- image: a,
128
- overlay: l,
129
- description: n,
130
- actionText: c,
131
- actionLink: e,
132
- handleClick: o = () => {
133
- }
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 })
141
- ] }),
142
- /* @__PURE__ */ r(
143
- f,
144
- {
145
- text: c,
146
- onClick: o,
147
- className: "text__action"
148
- }
149
- )
150
- ] }) });
91
+ `, P = p(({}, t) => /* @__PURE__ */ r(m, { ref: t, children: /* @__PURE__ */ r("div", { className: "img-skeleton" }) })), S = ({ limit: t = 2, isLoading: n = !1, keyPrefix: o }) => /* @__PURE__ */ r(d, { children: Array.from({ length: t }, (a, l) => /* @__PURE__ */ r(
92
+ P,
93
+ {
94
+ isLoading: n
95
+ },
96
+ `${o}-skeleton-product-card-${l}`
97
+ )) }), _ = ({
98
+ children: t,
99
+ fallbackComponent: n = /* @__PURE__ */ r(d, {}),
100
+ isLoading: o = !1,
101
+ limit: a,
102
+ keyPrefix: l
103
+ }) => /* @__PURE__ */ r(f, { fallbackComponent: n, children: o === !0 ? /* @__PURE__ */ r(
104
+ S,
105
+ {
106
+ isLoading: o,
107
+ limit: a,
108
+ keyPrefix: l
151
109
  }
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;
110
+ ) : t }), C = p(
111
+ ({ title: t, image: n, overlay: o, description: a, actionText: l, handleClick: i = () => {
112
+ } }, s) => {
113
+ const { theme: e } = b();
114
+ return /* @__PURE__ */ r(d, { children: /* @__PURE__ */ c(
115
+ m,
116
+ {
117
+ ref: s,
118
+ theme: e,
119
+ overlay: o,
120
+ onClick: i,
121
+ children: [
122
+ /* @__PURE__ */ r("img", { src: n }),
123
+ /* @__PURE__ */ c("div", { className: "content-wrapper", children: [
124
+ /* @__PURE__ */ c("div", { className: "content-text", children: [
125
+ /* @__PURE__ */ r("div", { children: t }),
126
+ /* @__PURE__ */ r("div", { className: "content-text-title", children: a })
127
+ ] }),
128
+ /* @__PURE__ */ r(
129
+ $,
130
+ {
131
+ text: l,
132
+ onClick: i,
133
+ className: "text__action",
134
+ size: "medium",
135
+ color: "gray"
136
+ }
137
+ )
138
+ ] })
139
+ ]
140
+ }
141
+ ) });
162
142
  }
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,
143
+ ), j = x(C), A = p(
144
+ ({ title: t, items: n, limit: o = 2, onSelectCard: a = () => {
145
+ }, isLoading: l = !1 }, i) => {
146
+ const s = v(() => /* @__PURE__ */ r(d, { children: n && (n == null ? void 0 : n.map((e, u) => /* @__PURE__ */ r(
147
+ j,
169
148
  {
170
149
  title: e == null ? void 0 : e.title,
171
150
  image: e == null ? void 0 : e.image,
172
151
  description: e == null ? void 0 : e.description,
173
152
  actionText: e == null ? void 0 : e.actionText,
174
153
  overlay: e == null ? void 0 : e.overlay,
175
- handleClick: () => n(e == null ? void 0 : e.uuid)
154
+ handleClick: () => a(e == null ? void 0 : e.uuid)
176
155
  },
177
- `landing-page-overlay-general-card__${o + 1}`
178
- ))) })
179
- ] })
156
+ `landing-page-overlay-general-card__${u + 1}`
157
+ ))) }), [n, a]);
158
+ return /* @__PURE__ */ c(y, { ref: i, children: [
159
+ /* @__PURE__ */ r("div", { className: "regular-title center", children: /* @__PURE__ */ r("div", { className: "regular-title-text", children: /* @__PURE__ */ r("span", { children: t }) }) }),
160
+ /* @__PURE__ */ r(N, { limit: o, children: /* @__PURE__ */ r(
161
+ _,
162
+ {
163
+ isLoading: l,
164
+ limit: o,
165
+ keyPrefix: "explore-landing",
166
+ children: s
167
+ }
168
+ ) })
169
+ ] });
170
+ }
180
171
  );
181
172
  export {
182
- j as default
173
+ A as default
183
174
  };
@@ -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"),l=require("react"),u=require("./emotion-styled.browser.esm-Cle7tAM9.cjs"),p=require("./consts-CtNoHdBj.cjs"),v=require("./useDetectMobile-D6d5LpdL.cjs"),k=require("./style-DN1qT8BE.cjs"),d=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
+ ${d.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: ${d.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: ${d.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=l.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:[d.isDefined(c)?c:r.jsx("img",{src:s}),r.jsx("div",{className:"card-title",children:i})]})}),C=l.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(l.Suspense,{fallbackComponent:a,children:o===!0?r.jsx(N,{isLoading:o,limit:i,keyPrefix:s}):t}),h=l.memo(P),q=l.forwardRef((t,a)=>{const{icon:o,items:i,limit:s=4,imageUrl:g,onSelectCard:n=()=>{},title:c="Season inspiration",isLoading:w=!1}=t,j=v.useDetectMobile(),b=l.useMemo(()=>r.jsx(r.Fragment,{children:j===!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:[d.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:b})})]})});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-CiePxaJ_.js";
7
+ import { t as M, m as g, l as U, k as j } from "./utils-DtRLzzTZ.js";
8
+ const E = 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
+ `, W = 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
+ `, B = u((t, n) => {
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: l = () => {
104
104
  },
105
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 }),
106
+ } = t;
107
+ return /* @__PURE__ */ s(w, { className: "product-card", onClick: l, children: [
108
+ U(d) ? d : /* @__PURE__ */ r("img", { src: o }),
109
109
  /* @__PURE__ */ r("div", { className: "card-title", children: i })
110
110
  ] });
111
- }), P = g((a, c) => {
111
+ }), I = 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: n = !1, keyPrefix: a }) => /* @__PURE__ */ r(c, { children: Array.from({ length: t }, (i, o) => /* @__PURE__ */ r(
115
+ I,
116
+ {
117
+ isLoading: n
118
+ },
119
+ `${a}-skeleton-product-card-${o}`
120
+ )) }), z = ({
121
+ children: t,
122
+ fallbackComponent: n = /* @__PURE__ */ r(c, {}),
123
+ isLoading: a = !1,
124
+ limit: i,
125
+ keyPrefix: o
126
+ }) => /* @__PURE__ */ r(S, { fallbackComponent: n, children: a === !0 ? /* @__PURE__ */ r(
127
+ R,
128
+ {
129
+ isLoading: a,
130
+ limit: i,
131
+ keyPrefix: o
132
+ }
133
+ ) : t }), f = C(B), O = u((t, n) => {
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
+ imageUrl: h,
139
+ onSelectCard: l = () => {
140
+ },
141
+ title: d = "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: () => l == null ? void 0 : l(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 }),
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: () => l == null ? void 0 : l(e == null ? void 0 : e.uuid)
161
+ },
162
+ m
163
+ )) }), [i]);
164
+ return /* @__PURE__ */ s($, { ref: n, children: [
165
+ /* @__PURE__ */ r("div", { className: "regular-title", children: /* @__PURE__ */ s("div", { className: "regular-title-text", children: [
166
+ j(a) && /* @__PURE__ */ r("i", { className: a }),
124
167
  /* @__PURE__ */ r("span", { children: d })
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(E, { className: "products-banner", children: /* @__PURE__ */ r("img", { src: h }) }),
170
+ /* @__PURE__ */ r(W, { 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
  };