@lanaco/lnc-react-ui 4.0.156 → 4.0.160

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 (70) hide show
  1. package/dist/BlogCardsSponsoredSection.cjs +8 -8
  2. package/dist/BlogCardsSponsoredSection.js +105 -89
  3. package/dist/BlogExploreSection.cjs +5 -5
  4. package/dist/BlogExploreSection.js +88 -84
  5. package/dist/BlogListSection.cjs +5 -5
  6. package/dist/BlogListSection.js +139 -126
  7. package/dist/BlogProductCardsSection.cjs +1 -1
  8. package/dist/BlogProductCardsSection.js +37 -35
  9. package/dist/BlogShopCardsSection.cjs +1 -1
  10. package/dist/BlogShopCardsSection.js +43 -41
  11. package/dist/BlogSingleSection.cjs +1 -1
  12. package/dist/BlogSingleSection.js +9 -4
  13. package/dist/BlogsSectionDetailed.cjs +11 -11
  14. package/dist/BlogsSectionDetailed.js +122 -108
  15. package/dist/BlogsSectionLarge.cjs +4 -4
  16. package/dist/BlogsSectionLarge.js +43 -40
  17. package/dist/BlogsSectionSimple.cjs +8 -8
  18. package/dist/BlogsSectionSimple.js +100 -86
  19. package/dist/BlogsSectionSimpleCentered.cjs +9 -9
  20. package/dist/BlogsSectionSimpleCentered.js +81 -66
  21. package/dist/BlogsSectionWithFilters.cjs +11 -11
  22. package/dist/BlogsSectionWithFilters.js +108 -93
  23. package/dist/{CustomStyles-Ajyqx0cb.cjs → CustomStyles-BwHfr4iM.cjs} +1 -1
  24. package/dist/{CustomStyles-DVcu00ul.js → CustomStyles-iconSXFL.js} +0 -1
  25. package/dist/DetailedProductsInfinitiveSection.cjs +8 -3
  26. package/dist/DetailedProductsInfinitiveSection.js +63 -51
  27. package/dist/DetailedProductsSection.cjs +3 -3
  28. package/dist/DetailedProductsSection.js +76 -65
  29. package/dist/Dropdown.cjs +1 -1
  30. package/dist/Dropdown.js +2 -2
  31. package/dist/DropdownLookup.cjs +1 -1
  32. package/dist/DropdownLookup.js +1 -1
  33. package/dist/FieldOfInterestsWithAvatarsCardsSection.cjs +1 -1
  34. package/dist/FieldOfInterestsWithAvatarsCardsSection.js +1 -1
  35. package/dist/GiftCardsSection.cjs +1 -1
  36. package/dist/GiftCardsSection.js +1 -1
  37. package/dist/MultiSelectDropdown.cjs +1 -1
  38. package/dist/MultiSelectDropdown.js +1 -1
  39. package/dist/MultiSelectDropdownLookup.cjs +1 -1
  40. package/dist/MultiSelectDropdownLookup.js +1 -1
  41. package/dist/ProductsWithBannerSection.cjs +10 -10
  42. package/dist/ProductsWithBannerSection.js +81 -59
  43. package/dist/SalesCampaignsSection.cjs +27 -27
  44. package/dist/SalesCampaignsSection.js +281 -272
  45. package/dist/ShopCardsSection.cjs +3 -3
  46. package/dist/ShopCardsSection.js +27 -25
  47. package/dist/SimpleCategoriesSection.cjs +1 -1
  48. package/dist/SimpleCategoriesSection.js +1 -1
  49. package/dist/SimpleProductsSection.cjs +3 -3
  50. package/dist/SimpleProductsSection.js +62 -51
  51. package/dist/UrgentSaleProductsSection.cjs +6 -6
  52. package/dist/UrgentSaleProductsSection.js +67 -56
  53. package/dist/index-1Dm1i6WK.js +52 -0
  54. package/dist/index-BGTtoLxz.cjs +1 -0
  55. package/dist/{index-CLoINIGC.cjs → index-DicTpiG0.cjs} +5 -5
  56. package/dist/{index-BGY3PSA-.js → index-y6sKgrZC.js} +45 -34
  57. package/dist/index.cjs +1 -1
  58. package/dist/index.js +1 -1
  59. package/dist/{skeleton-BWFqIToC.js → skeleton-5mO22c5S.js} +94 -84
  60. package/dist/{skeleton-CanJ6Gr6.cjs → skeleton-Ccd6EDeB.cjs} +8 -8
  61. package/dist/{style-DFPWLJBr.js → style-BLuyU97E.js} +4 -0
  62. package/dist/{style-CyHewQxg.cjs → style-lSjkOR95.cjs} +6 -2
  63. package/dist/{suspense-product-card-detailed-YJVsf2-a.js → suspense-product-card-detailed-BZtObEfA.js} +191 -162
  64. package/dist/suspense-product-card-detailed-D-pjVe22.cjs +300 -0
  65. package/dist/{suspense-product-card-simple-CrqjSxHI.cjs → suspense-product-card-simple-DJ8UYolb.cjs} +1 -1
  66. package/dist/{suspense-product-card-simple-CLJjab5B.js → suspense-product-card-simple-ziy0XcLp.js} +1 -1
  67. package/package.json +1 -1
  68. package/dist/index-Cm0f72Po.cjs +0 -1
  69. package/dist/index-DGp7FHms.js +0 -42
  70. package/dist/suspense-product-card-detailed-mCJwteOy.cjs +0 -265
@@ -1,4 +1,4 @@
1
- "use strict";const r=require("react/jsx-runtime"),o=require("react"),u=require("./emotion-styled.browser.esm-BtEseadx.cjs"),g=require("./consts-goSZX3xP.cjs"),k=require("./useDetectMobile-zkbzoOGV.cjs"),v=require("./style-CyHewQxg.cjs"),d=require("./utils-Dl9xPH4c.cjs"),y=require("./index-BueKsXT8.cjs"),C=u.styled.div`
1
+ "use strict";const r=require("react/jsx-runtime"),d=require("react"),f=require("./emotion-styled.browser.esm-BtEseadx.cjs"),j=require("./consts-goSZX3xP.cjs"),y=require("./useDetectMobile-zkbzoOGV.cjs"),P=require("./style-lSjkOR95.cjs"),l=require("./utils-Dl9xPH4c.cjs"),N=require("./index-BueKsXT8.cjs"),I=f.styled.div`
2
2
  width: 100%;
3
3
  height: 22.5rem;
4
4
  min-height: 22.5rem;
@@ -16,18 +16,18 @@
16
16
  object-fit: cover;
17
17
  }
18
18
 
19
- @media (max-width: ${g.MOBILE_SIZE_PX+"px"}) {
19
+ @media (max-width: ${j.MOBILE_SIZE_PX+"px"}) {
20
20
  height: 100%;
21
21
  min-height: 100%;
22
22
  max-height: 100%;
23
23
  aspect-ratio: 1 / 1;
24
24
  }
25
- `,P=u.styled.div`
25
+ `,$=f.styled.div`
26
26
  display: grid;
27
27
  grid-template-columns: ${t=>`repeat(${t.limit}, minmax(0, 1fr))`};
28
28
  gap: 1.25rem;
29
29
 
30
- @media (max-width: ${g.MOBILE_SIZE_PX+"px"}) {
30
+ @media (max-width: ${j.MOBILE_SIZE_PX+"px"}) {
31
31
  display: flex;
32
32
  gap: 1rem;
33
33
  overflow-x: auto;
@@ -46,7 +46,7 @@
46
46
  /* Safari and Chrome */
47
47
  }
48
48
  }
49
- `,w=u.styled.div`
49
+ `,k=f.styled.div`
50
50
  display: flex;
51
51
  flex-direction: column;
52
52
  gap: 0.5rem;
@@ -62,22 +62,22 @@
62
62
  & .card-title {
63
63
  font-size: 0.875rem;
64
64
  font-weight: 600;
65
- ${d.truncateTextInRows(2)}
65
+ ${l.truncateTextInRows(2)}
66
66
  }
67
67
 
68
68
  & .skeleton-img {
69
- background-color: ${d.linearGradientAnimation("-90deg")};
69
+ background-color: ${l.linearGradientAnimation("-90deg")};
70
70
  border-radius: 0.75rem;
71
71
  border: 1px solid white;
72
72
  }
73
73
 
74
74
  & .skeleton-title {
75
- background-color: ${d.linearGradientAnimation("-90deg")};
75
+ background-color: ${l.linearGradientAnimation("-90deg")};
76
76
  width: 100%;
77
77
  height: 1.25rem;
78
78
  }
79
79
 
80
- @media (max-width: ${g.MOBILE_SIZE_PX+"px"}) {
80
+ @media (max-width: ${j.MOBILE_SIZE_PX+"px"}) {
81
81
  & img {
82
82
  width: 8.875rem;
83
83
  height: 8.875rem;
@@ -88,4 +88,4 @@
88
88
  object-fit: cover;
89
89
  }
90
90
  }
91
- `,I=o.forwardRef((t,a)=>{const{uuid:n,title:i,image:s,sellerUuid:h,onSelectCard:l=()=>{},imageComponent:c}=t;return r.jsxs(w,{ref:a,className:"product-card",onClick:l,children:[d.isDefined(c)?c:r.jsx(y.ProductImageWrapper,{src:s}),r.jsx("div",{className:"card-title",children:i})]})}),N=o.forwardRef(({},t)=>r.jsxs(w,{className:"product-card",children:[r.jsx("img",{className:"skeleton-img"}),r.jsx("div",{className:"skeleton-title"})]})),$=({limit:t=4,isLoading:a=!1,keyPrefix:n})=>r.jsx(r.Fragment,{children:Array.from({length:t},(i,s)=>r.jsx(N,{isLoading:a},`${n}-skeleton-product-card-${s}`))}),_=({children:t,fallbackComponent:a=r.jsx(r.Fragment,{}),isLoading:n=!1,limit:i,keyPrefix:s})=>r.jsx(o.Suspense,{fallbackComponent:a,children:n===!0?r.jsx($,{isLoading:n,limit:i,keyPrefix:s}):t}),j=o.memo(I),q=o.forwardRef((t,a)=>{const{icon:n,items:i,limit:s=4,imageUrl:h,onSelectCard:l=()=>{},title:c="Season inspiration",isLoading:b=!1,getImage:p=()=>{}}=t,f=k.useDetectMobile(),S=o.useMemo(()=>r.jsx(r.Fragment,{children:f===!0?i==null?void 0:i.map((e,m)=>r.jsx(j,{title:e==null?void 0:e.name,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,onSelectCard:()=>l({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug}),image:p(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null},m)):i==null?void 0:i.slice(0,s).map((e,m)=>r.jsx(j,{title:e==null?void 0:e.name,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,onSelectCard:()=>l({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug}),image:p(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null},m))}),[i,f,s]);return r.jsxs(v.RegulatTitleSectionWrapper,{ref:a,children:[r.jsx("div",{className:"regular-title",children:r.jsxs("div",{className:"regular-title-text",children:[d.isDefinedNotEmptyString(n)&&r.jsx("i",{className:n}),r.jsx("span",{children:c})]})}),r.jsx(C,{className:"products-banner",children:r.jsx("img",{src:h})}),r.jsx(P,{limit:s,children:r.jsx(_,{isLoading:b,limit:s,keyPrefix:"explore-landing",children:S})})]})});module.exports=q;
91
+ `,R=d.forwardRef((t,o)=>{const{uuid:a,title:i,image:s,sellerUuid:w,onSelectCard:c=()=>{},imageComponent:m,metadata:n}=t,u=d.useRef(null);return r.jsxs(k,{ref:u,className:"product-card",name:n==null?void 0:n.name,"data-accessor":n==null?void 0:n.accessor,onClick:g=>c(g,o),children:[l.isDefined(m)?m:r.jsx(N.ProductImageWrapper,{src:s}),r.jsx("div",{className:"card-title",children:i})]})}),_=d.forwardRef(({},t)=>r.jsxs(k,{className:"product-card",children:[r.jsx("img",{className:"skeleton-img"}),r.jsx("div",{className:"skeleton-title"})]})),q=({limit:t=4,isLoading:o=!1,keyPrefix:a})=>r.jsx(r.Fragment,{children:Array.from({length:t},(i,s)=>r.jsx(_,{isLoading:o},`${a}-skeleton-product-card-${s}`))}),E=({children:t,fallbackComponent:o=r.jsx(r.Fragment,{}),isLoading:a=!1,limit:i,keyPrefix:s})=>r.jsx(d.Suspense,{fallbackComponent:o,children:a===!0?r.jsx(q,{isLoading:a,limit:i,keyPrefix:s}):t}),S=d.memo(R),M=d.forwardRef((t,o)=>{const{icon:a,items:i,limit:s=4,imageUrl:w,onSelectCard:c=()=>{},title:m="Season inspiration",isLoading:n=!1,getImage:u=()=>{},componentName:g}=t,b=y.useDetectMobile(),v=d.useMemo(()=>r.jsx(r.Fragment,{children:b===!0?i==null?void 0:i.map((e,h)=>r.jsx(S,{title:e==null?void 0:e.name,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,onSelectCard:(C,p)=>c({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug,cardRef:p}),image:u(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,metadata:{name:g,accessor:e==null?void 0:e.accessor}},h)):i==null?void 0:i.slice(0,s).map((e,h)=>r.jsx(S,{title:e==null?void 0:e.name,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,onSelectCard:(C,p)=>c({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug,cardRef:p}),image:u(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,metadata:{name:g,accessor:e==null?void 0:e.accessor}},h))}),[i,b,s]);return r.jsxs(P.RegulatTitleSectionWrapper,{ref:o,children:[r.jsx("div",{className:"regular-title",children:r.jsxs("div",{className:"regular-title-text",children:[l.isDefinedNotEmptyString(a)&&r.jsx("i",{className:a}),r.jsx("span",{children:m})]})}),r.jsx(I,{className:"products-banner",children:r.jsx("img",{src:w})}),r.jsx($,{limit:s,children:r.jsx(E,{isLoading:n,limit:s,keyPrefix:"explore-landing",children:v})})]})});module.exports=M;
@@ -1,12 +1,12 @@
1
- import { jsxs as s, jsx as r, Fragment as c } from "react/jsx-runtime";
2
- import { forwardRef as u, Suspense as P, memo as y, useMemo as N } from "react";
3
- import { s as p } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
- import { M as g } from "./consts-BuFChS64.js";
5
- import { u as $ } from "./useDetectMobile-Bkvj0VMa.js";
6
- import { R as U } from "./style-DFPWLJBr.js";
7
- import { p as I, o as w, l as M, k as W } from "./utils-BdsZgOUE.js";
8
- import { P as j } from "./index-CF3HhgvN.js";
9
- const E = p.div`
1
+ import { jsxs as u, jsx as r, Fragment as h } from "react/jsx-runtime";
2
+ import { forwardRef as f, useRef as $, Suspense as U, memo as I, useMemo as M } from "react";
3
+ import { s as b } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
+ import { M as w } from "./consts-BuFChS64.js";
5
+ import { u as R } from "./useDetectMobile-Bkvj0VMa.js";
6
+ import { R as W } from "./style-BLuyU97E.js";
7
+ import { p as j, o as v, l as E, k as z } from "./utils-BdsZgOUE.js";
8
+ import { P as B } from "./index-CF3HhgvN.js";
9
+ const D = b.div`
10
10
  width: 100%;
11
11
  height: 22.5rem;
12
12
  min-height: 22.5rem;
@@ -24,18 +24,18 @@ const E = p.div`
24
24
  object-fit: cover;
25
25
  }
26
26
 
27
- @media (max-width: ${g + "px"}) {
27
+ @media (max-width: ${w + "px"}) {
28
28
  height: 100%;
29
29
  min-height: 100%;
30
30
  max-height: 100%;
31
31
  aspect-ratio: 1 / 1;
32
32
  }
33
- `, R = p.div`
33
+ `, _ = b.div`
34
34
  display: grid;
35
35
  grid-template-columns: ${(t) => `repeat(${t.limit}, minmax(0, 1fr))`};
36
36
  gap: 1.25rem;
37
37
 
38
- @media (max-width: ${g + "px"}) {
38
+ @media (max-width: ${w + "px"}) {
39
39
  display: flex;
40
40
  gap: 1rem;
41
41
  overflow-x: auto;
@@ -54,7 +54,7 @@ const E = p.div`
54
54
  /* Safari and Chrome */
55
55
  }
56
56
  }
57
- `, k = p.div`
57
+ `, P = b.div`
58
58
  display: flex;
59
59
  flex-direction: column;
60
60
  gap: 0.5rem;
@@ -70,22 +70,22 @@ const E = p.div`
70
70
  & .card-title {
71
71
  font-size: 0.875rem;
72
72
  font-weight: 600;
73
- ${I(2)}
73
+ ${j(2)}
74
74
  }
75
75
 
76
76
  & .skeleton-img {
77
- background-color: ${w("-90deg")};
77
+ background-color: ${v("-90deg")};
78
78
  border-radius: 0.75rem;
79
79
  border: 1px solid white;
80
80
  }
81
81
 
82
82
  & .skeleton-title {
83
- background-color: ${w("-90deg")};
83
+ background-color: ${v("-90deg")};
84
84
  width: 100%;
85
85
  height: 1.25rem;
86
86
  }
87
87
 
88
- @media (max-width: ${g + "px"}) {
88
+ @media (max-width: ${w + "px"}) {
89
89
  & img {
90
90
  width: 8.875rem;
91
91
  height: 8.875rem;
@@ -96,92 +96,114 @@ const E = p.div`
96
96
  object-fit: cover;
97
97
  }
98
98
  }
99
- `, z = u((t, l) => {
99
+ `, A = f((t, l) => {
100
100
  const {
101
101
  uuid: o,
102
102
  title: i,
103
103
  image: a,
104
- sellerUuid: h,
104
+ sellerUuid: S,
105
105
  onSelectCard: d = () => {
106
106
  },
107
- imageComponent: n
108
- } = t;
109
- return /* @__PURE__ */ s(k, { ref: l, className: "product-card", onClick: d, children: [
110
- M(n) ? n : /* @__PURE__ */ r(j, { src: a }),
111
- /* @__PURE__ */ r("div", { className: "card-title", children: i })
112
- ] });
113
- }), B = u(({}, t) => /* @__PURE__ */ s(k, { className: "product-card", children: [
107
+ imageComponent: s,
108
+ metadata: n
109
+ } = t, m = $(null);
110
+ return /* @__PURE__ */ u(
111
+ P,
112
+ {
113
+ ref: m,
114
+ className: "product-card",
115
+ name: n == null ? void 0 : n.name,
116
+ "data-accessor": n == null ? void 0 : n.accessor,
117
+ onClick: (c) => d(c, l),
118
+ children: [
119
+ E(s) ? s : /* @__PURE__ */ r(B, { src: a }),
120
+ /* @__PURE__ */ r("div", { className: "card-title", children: i })
121
+ ]
122
+ }
123
+ );
124
+ }), F = f(({}, t) => /* @__PURE__ */ u(P, { className: "product-card", children: [
114
125
  /* @__PURE__ */ r("img", { className: "skeleton-img" }),
115
126
  /* @__PURE__ */ r("div", { className: "skeleton-title" })
116
- ] })), D = ({ limit: t = 4, isLoading: l = !1, keyPrefix: o }) => /* @__PURE__ */ r(c, { children: Array.from({ length: t }, (i, a) => /* @__PURE__ */ r(
117
- B,
127
+ ] })), G = ({ limit: t = 4, isLoading: l = !1, keyPrefix: o }) => /* @__PURE__ */ r(h, { children: Array.from({ length: t }, (i, a) => /* @__PURE__ */ r(
128
+ F,
118
129
  {
119
130
  isLoading: l
120
131
  },
121
132
  `${o}-skeleton-product-card-${a}`
122
- )) }), _ = ({
133
+ )) }), T = ({
123
134
  children: t,
124
- fallbackComponent: l = /* @__PURE__ */ r(c, {}),
135
+ fallbackComponent: l = /* @__PURE__ */ r(h, {}),
125
136
  isLoading: o = !1,
126
137
  limit: i,
127
138
  keyPrefix: a
128
- }) => /* @__PURE__ */ r(P, { fallbackComponent: l, children: o === !0 ? /* @__PURE__ */ r(
129
- D,
139
+ }) => /* @__PURE__ */ r(U, { fallbackComponent: l, children: o === !0 ? /* @__PURE__ */ r(
140
+ G,
130
141
  {
131
142
  isLoading: o,
132
143
  limit: i,
133
144
  keyPrefix: a
134
145
  }
135
- ) : t }), S = y(z), q = u((t, l) => {
146
+ ) : t }), C = I(A), Q = f((t, l) => {
136
147
  const {
137
148
  icon: o,
138
149
  items: i,
139
150
  limit: a = 4,
140
- imageUrl: h,
151
+ imageUrl: S,
141
152
  onSelectCard: d = () => {
142
153
  },
143
- title: n = "Season inspiration",
144
- isLoading: v = !1,
145
- getImage: f = () => {
146
- }
147
- } = t, b = $(), C = N(() => /* @__PURE__ */ r(c, { children: b === !0 ? i == null ? void 0 : i.map((e, m) => /* @__PURE__ */ r(
148
- S,
154
+ title: s = "Season inspiration",
155
+ isLoading: n = !1,
156
+ getImage: m = () => {
157
+ },
158
+ componentName: c
159
+ } = t, k = R(), N = M(() => /* @__PURE__ */ r(h, { children: k === !0 ? i == null ? void 0 : i.map((e, p) => /* @__PURE__ */ r(
160
+ C,
149
161
  {
150
162
  title: e == null ? void 0 : e.name,
151
163
  sellerUuid: e == null ? void 0 : e.sellerUuid,
152
164
  uuid: e == null ? void 0 : e.uuid,
153
- onSelectCard: () => d({ uuid: e == null ? void 0 : e.uuid, nameSlug: e == null ? void 0 : e.nameSlug }),
154
- image: f(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null
165
+ onSelectCard: (y, g) => d({
166
+ uuid: e == null ? void 0 : e.uuid,
167
+ nameSlug: e == null ? void 0 : e.nameSlug,
168
+ cardRef: g
169
+ }),
170
+ image: m(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
171
+ metadata: { name: c, accessor: e == null ? void 0 : e.accessor }
155
172
  },
156
- m
157
- )) : i == null ? void 0 : i.slice(0, a).map((e, m) => /* @__PURE__ */ r(
158
- S,
173
+ p
174
+ )) : i == null ? void 0 : i.slice(0, a).map((e, p) => /* @__PURE__ */ r(
175
+ C,
159
176
  {
160
177
  title: e == null ? void 0 : e.name,
161
178
  sellerUuid: e == null ? void 0 : e.sellerUuid,
162
179
  uuid: e == null ? void 0 : e.uuid,
163
- onSelectCard: () => d({ uuid: e == null ? void 0 : e.uuid, nameSlug: e == null ? void 0 : e.nameSlug }),
164
- image: f(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null
180
+ onSelectCard: (y, g) => d({
181
+ uuid: e == null ? void 0 : e.uuid,
182
+ nameSlug: e == null ? void 0 : e.nameSlug,
183
+ cardRef: g
184
+ }),
185
+ image: m(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
186
+ metadata: { name: c, accessor: e == null ? void 0 : e.accessor }
165
187
  },
166
- m
167
- )) }), [i, b, a]);
168
- return /* @__PURE__ */ s(U, { ref: l, children: [
169
- /* @__PURE__ */ r("div", { className: "regular-title", children: /* @__PURE__ */ s("div", { className: "regular-title-text", children: [
170
- W(o) && /* @__PURE__ */ r("i", { className: o }),
171
- /* @__PURE__ */ r("span", { children: n })
188
+ p
189
+ )) }), [i, k, a]);
190
+ return /* @__PURE__ */ u(W, { ref: l, children: [
191
+ /* @__PURE__ */ r("div", { className: "regular-title", children: /* @__PURE__ */ u("div", { className: "regular-title-text", children: [
192
+ z(o) && /* @__PURE__ */ r("i", { className: o }),
193
+ /* @__PURE__ */ r("span", { children: s })
172
194
  ] }) }),
173
- /* @__PURE__ */ r(E, { className: "products-banner", children: /* @__PURE__ */ r("img", { src: h }) }),
174
- /* @__PURE__ */ r(R, { limit: a, children: /* @__PURE__ */ r(
175
- _,
195
+ /* @__PURE__ */ r(D, { className: "products-banner", children: /* @__PURE__ */ r("img", { src: S }) }),
196
+ /* @__PURE__ */ r(_, { limit: a, children: /* @__PURE__ */ r(
197
+ T,
176
198
  {
177
- isLoading: v,
199
+ isLoading: n,
178
200
  limit: a,
179
201
  keyPrefix: "explore-landing",
180
- children: C
202
+ children: N
181
203
  }
182
204
  ) })
183
205
  ] });
184
206
  });
185
207
  export {
186
- q as default
208
+ Q as default
187
209
  };
@@ -1,4 +1,4 @@
1
- "use strict";const t=require("react/jsx-runtime"),d=require("react"),p=require("./emotion-styled.browser.esm-BtEseadx.cjs"),x=require("./utils-Dl9xPH4c.cjs"),$=require("./consts-goSZX3xP.cjs"),se=require("./motion-B_VPZaJq.cjs"),a=require("./index-BpbMKBf_.cjs"),oe=require("./Icon.cjs"),Q=require("./ShopAvatar-CV3lj34D.cjs"),ve=require("./Badge.cjs"),Z=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),ee=require("./IconButton.cjs"),ie=require("./useDetectMobile-zkbzoOGV.cjs"),_e=p.styled.div`
1
+ "use strict";const t=require("react/jsx-runtime"),c=require("react"),m=require("./emotion-styled.browser.esm-BtEseadx.cjs"),x=require("./utils-Dl9xPH4c.cjs"),P=require("./consts-goSZX3xP.cjs"),ce=require("./motion-B_VPZaJq.cjs"),s=require("./index-BpbMKBf_.cjs"),de=require("./Icon.cjs"),ne=require("./ShopAvatar-CV3lj34D.cjs"),je=require("./Badge.cjs"),Y=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),se=require("./IconButton.cjs"),ge=require("./useDetectMobile-zkbzoOGV.cjs"),Te=m.styled.div`
2
2
  cursor: pointer;
3
3
  display: flex;
4
4
  gap: 1rem;
@@ -6,12 +6,12 @@
6
6
  border-radius: 1.25rem;
7
7
  border: 1px solid var(--gray-200, #e4e9f0);
8
8
 
9
- @media (max-width: ${$.MOBILE_SIZE_PX+"px"}) {
9
+ @media (max-width: ${P.MOBILE_SIZE_PX+"px"}) {
10
10
  flex-direction: column;
11
11
  padding: 1rem;
12
12
  gap: 0;
13
13
  }
14
- `,je=p.styled.div`
14
+ `,Se=m.styled.div`
15
15
  border-radius: ${e=>x.getBorderRadiusValueWithUnits(e.theme,"edged")};
16
16
  height: 13.75rem;
17
17
  width: 13.75rem;
@@ -34,7 +34,7 @@
34
34
  transform: scale(1.25);
35
35
  }
36
36
  }
37
- `,Te=p.styled.div`
37
+ `,$e=m.styled.div`
38
38
  flex: 1;
39
39
  display: flex;
40
40
  flex-direction: column;
@@ -117,7 +117,7 @@
117
117
  color: var(--gray-600, #676e79);
118
118
  }
119
119
 
120
- @media (max-width: ${$.MOBILE_SIZE_PX+"px"}) {
120
+ @media (max-width: ${P.MOBILE_SIZE_PX+"px"}) {
121
121
  padding: 1rem 0 0 0;
122
122
 
123
123
  & .campaign-title-text {
@@ -142,13 +142,13 @@
142
142
  gap: 0.25rem;
143
143
  }
144
144
  }
145
- `,re=(e=!1,n=!1,s=!1)=>`
145
+ `,ae=(e=!1,n=!1,a=!1)=>`
146
146
  display: flex;
147
147
  ${n?"flex-wrap: wrap;":""}
148
148
  ${n?"":"flex-wrap: nowrap;"}
149
149
  ${e?"align-items: center;":""}
150
- ${s?"justify-content: center;":""}
151
- `,Se=p.styled(se.motion.div)`
150
+ ${a?"justify-content: center;":""}
151
+ `,Pe=m.styled(ce.motion.div)`
152
152
  text-decoration: none;
153
153
  ${e=>e.hasPermission===!0&&"cursor: pointer"};
154
154
 
@@ -165,7 +165,7 @@
165
165
  text-decoration: none;
166
166
  }
167
167
 
168
- ${re(!0)}
168
+ ${ae(!0)}
169
169
  gap: 0.5rem;
170
170
  padding: 0.5rem;
171
171
  color: var(--gray-950, #14161a);
@@ -181,7 +181,7 @@
181
181
  font-weight: 400;
182
182
  }
183
183
  & .logo-wrapper {
184
- ${re(!0,!1,!0)}
184
+ ${ae(!0,!1,!0)}
185
185
  flex-shrink: 0;
186
186
  border-radius: 999px;
187
187
 
@@ -220,17 +220,17 @@
220
220
  background-color: var(--gray-95080, #14161acc);
221
221
  }
222
222
 
223
- @media (max-width: ${$.MOBILE_SIZE_PX+"px"}) {
223
+ @media (max-width: ${P.MOBILE_SIZE_PX+"px"}) {
224
224
  padding: 0;
225
225
  font-size: 0.875rem;
226
226
  }
227
- `,$e=p.styled.div`
227
+ `,Ie=m.styled.div`
228
228
  position: absolute;
229
229
  top: 0.5rem;
230
230
  ${e=>e.alignToLeft===!0?"left: 0.5rem;":"right: 0.5rem;"}
231
231
  display: flex;
232
232
  gap: 0.25rem;
233
- `,Pe=p.styled.div`
233
+ `,Ce=m.styled.div`
234
234
  border-radius: ${e=>x.getBorderRadiusValueWithUnits(e.theme,e.borderRadius||"slight")};
235
235
  background-color: ${e=>e==null?void 0:e.color};
236
236
  color: white;
@@ -246,7 +246,7 @@
246
246
  & i {
247
247
  font-size: 0.813rem;
248
248
  }
249
- `,Ie=d.forwardRef(({src:e,...n},s)=>{const o=d.useRef();return d.useEffect(()=>{var u;const l=i=>{i.target.src=Q.DefaultShopImage,i.onerror=null};return(u=o==null?void 0:o.current)==null||u.addEventListener("error",l),()=>{var i;(i=o==null?void 0:o.current)==null||i.removeEventListener("error",l)}},[]),t.jsx(d.Fragment,{ref:s,children:x.isDefinedNotEmptyString(e)?t.jsx("img",{ref:o,src:e,...n}):t.jsx("img",{src:Q.DefaultShopImage,...n})})}),le=e=>{const{uuid:n,hasPermission:s=!0,isUser:o,image:l,imageComponent:u,name:i,notifications:m=0,color:c="primary",size:y="large",style:P,disabled:I,onClick:_=()=>{},isActive:C,className:w,shopCategory:b,themeData:v}=e,T={theme:Z.useTheme(),color:c,size:y,style:P,disabled:I};return d.createElement(Se,{onClick:g=>{g.stopPropagation(),s===!0&&(_==null||_())},...T,key:i,className:`profile-item ${w}`,hasPermission:s,isActive:C,themeColor:(v==null?void 0:v.code)||"transparent"},t.jsx("div",{className:"logo-wrapper",children:x.isDefined(u)?u:l}),t.jsxs("div",{children:[t.jsx("div",{className:"name",children:i}),!o&&t.jsx("div",{className:"description",children:b}),m>0&&t.jsx("div",{className:"notifications-number",children:t.jsx(ve,{className:"badge",color:"danger",size:"small",children:m>99?"99+":m})})]}))};le.propTypes={id:a.PropTypes.any,isUserProfile:a.PropTypes.bool,themeColor:a.PropTypes.string,image:a.PropTypes.any,name:a.PropTypes.string,notifications:a.PropTypes.number,style:a.PropTypes.object,className:a.PropTypes.string,color:a.PropTypes.oneOf(["primary","secondary","success","warning","danger","information","neutral"]),size:a.PropTypes.oneOf(["large"]),onSelect:a.PropTypes.func,hasPermission:a.PropTypes.bool};const te=(e,n)=>{if(!e||!n)return null;const s=e.getTime()-n.getTime(),o=24*60*60*1e3;return s>=0?Math.ceil(s/o):Math.floor(s/o)},ne=e=>{if(e!==void 0){const n=new Date(e),s=n.getFullYear(),o=n.getMonth()+1;return`${String(n.getDate()).padStart(2)}. ${o}. ${s}.`}},ce=d.forwardRef((e,n)=>{var K;const s=Z.useTheme(),{shopUuid:o,title:l="",coverPhoto:u,onSelect:i,startDate:m,endDate:c,salesPackages:y,shopName:P,shopCategory:I,shopImage:_,shopImageComponent:C,className:w,onSelectCard:b=()=>{},onSelectShop:v=()=>{},upcoming:k=!1,upcomingCampaignText:T,campaignSingleText:g,salesCampaignTypes:h=[],startsInPrefixTextPlural:U,startsinSuffixTextPlural:B,startsInPrefixTextSingular:q,startsinSuffixTextSingular:A,endsInPrefixTextPlural:W,endsinSuffixTextPlural:G,endsInPrefixTextSingular:N,endsinSuffixTextSingular:V,themeData:E,numberOfListings:r,numberOfListingsTextSingular:F,numberOfListingsTextPlural:me,...pe}=e,H=m?new Date(m)<=new Date:!1,he=te(m?new Date(m):null,new Date),M=te(c?new Date(c):null,new Date),ue=M!==null&&M<=2&&M>0,Y=c?new Date(c).getTime():null,fe=Date.now(),X=Y!==null?Y-fe:null,z=X!==null&&X>0&&X<24*60*60*1e3,J=(j,R,f,D,S)=>f===1?`${j} ${f} ${D}`:`${R} ${f} ${S}`,xe=()=>{if(!c)return null;const j=ye,f=new Date(c).getTime()-j.getTime();if(f<=0)return null;const D=Math.floor(f/(1e3*60*60)),S=Math.floor(f%(1e3*60*60)/(1e3*60)),be=Math.floor(f%(1e3*60)/1e3);return{hours:D,minutes:S,seconds:be}},[ye,we]=d.useState(new Date);d.useEffect(()=>{if(!z)return;const j=setInterval(()=>{we(new Date)},1e3);return()=>clearInterval(j)},[z]);const L=z?xe():null;return t.jsxs(_e,{ref:n,theme:s,className:w,onClick:b,...pe,children:[t.jsxs(je,{theme:s,onClick:()=>i==null?void 0:i(),children:[t.jsx("img",{src:u}),t.jsx($e,{children:y==null?void 0:y.map((j,R)=>{var f,D;return t.jsx(Pe,{color:(f=h==null?void 0:h.find(S=>S.value===j))==null?void 0:f.color,theme:s,children:t.jsx(oe,{icon:(D=h==null?void 0:h.find(S=>S.value===j))==null?void 0:D.icon})},`package__${R}`)})})]}),t.jsxs(Te,{theme:s,children:[t.jsx("div",{className:"text-block-wrapper",children:t.jsxs("div",{className:"title-block-wrapper",children:[t.jsx("div",{className:"campaign-title",children:(K=k?T:g)==null?void 0:K.toUpperCase()}),t.jsx("div",{className:"campaign-title-text",children:l}),c&&m&&t.jsxs("div",{className:"campaign-date",children:[ne(m)," - ",ne(c)]}),t.jsxs("div",{className:"timestamp-text",children:[r>0&&t.jsxs("span",{className:"listings-text",children:[r," ",r===1?F:me," ","∙"," "]}),t.jsx("span",{className:`duration-text ${ue?"urgent":""} ${H?"":"starts-in"}`,children:z&&L?t.jsxs("div",{className:"countdown-timer",children:[N," ",L.hours.toString().padStart(2,"0"),":",L.minutes.toString().padStart(2,"0"),":",L.seconds.toString().padStart(2,"0")]}):H?J(N,W,M,V,G):J(q,U,he,A,B)})]})]})}),t.jsx(le,{hasPermission:!0,image:t.jsx(Ie,{src:_}),imageComponent:C,themeData:E,isActive:!0,isUser:!1,name:P,shopCategory:I,onClick:()=>v(o)})]})]})});ce.propTypes={title:a.PropTypes.oneOfType([a.PropTypes.string,a.PropTypes.element]),numberOfListings:a.PropTypes.number,dropdown:a.PropTypes.any,color:a.PropTypes.string};p.styled.div`
249
+ `,ke=c.forwardRef(({src:e,...n},a)=>{const o=c.useRef();return c.useEffect(()=>{var u;const l=i=>{i.target.src=ne.DefaultShopImage,i.onerror=null};return(u=o==null?void 0:o.current)==null||u.addEventListener("error",l),()=>{var i;(i=o==null?void 0:o.current)==null||i.removeEventListener("error",l)}},[]),t.jsx(c.Fragment,{ref:a,children:x.isDefinedNotEmptyString(e)?t.jsx("img",{ref:o,src:e,...n}):t.jsx("img",{src:ne.DefaultShopImage,...n})})}),pe=e=>{const{uuid:n,hasPermission:a=!0,isUser:o,image:l,imageComponent:u,name:i,notifications:p=0,color:d="primary",size:w="large",style:I,disabled:C,onClick:j=()=>{},isActive:k,className:b,shopCategory:v,themeData:_}=e,T={theme:Y.useTheme(),color:d,size:w,style:I,disabled:C};return c.createElement(Pe,{onClick:g=>{g.stopPropagation(),a===!0&&(j==null||j())},...T,key:i,className:`profile-item ${b}`,hasPermission:a,isActive:k,themeColor:(_==null?void 0:_.code)||"transparent"},t.jsx("div",{className:"logo-wrapper",children:x.isDefined(u)?u:l}),t.jsxs("div",{children:[t.jsx("div",{className:"name",children:i}),!o&&t.jsx("div",{className:"description",children:v}),p>0&&t.jsx("div",{className:"notifications-number",children:t.jsx(je,{className:"badge",color:"danger",size:"small",children:p>99?"99+":p})})]}))};pe.propTypes={id:s.PropTypes.any,isUserProfile:s.PropTypes.bool,themeColor:s.PropTypes.string,image:s.PropTypes.any,name:s.PropTypes.string,notifications:s.PropTypes.number,style:s.PropTypes.object,className:s.PropTypes.string,color:s.PropTypes.oneOf(["primary","secondary","success","warning","danger","information","neutral"]),size:s.PropTypes.oneOf(["large"]),onSelect:s.PropTypes.func,hasPermission:s.PropTypes.bool};const oe=(e,n)=>{if(!e||!n)return null;const a=e.getTime()-n.getTime(),o=24*60*60*1e3;return Math.floor(a/o)},ie=e=>{if(e!==void 0){const n=new Date(e),a=n.getFullYear(),o=n.getMonth()+1;return`${String(n.getDate()).padStart(2)}. ${o}. ${a}.`}},me=c.forwardRef((e,n)=>{var te;const a=Y.useTheme(),{shopUuid:o,title:l="",coverPhoto:u,onSelect:i,startDate:p,endDate:d,salesPackages:w,shopName:I,shopCategory:C,shopImage:j,shopImageComponent:k,className:b,onSelectCard:v=()=>{},onSelectShop:_=()=>{},upcoming:N=!1,upcomingCampaignText:T,campaignSingleText:g,salesCampaignTypes:h=[],startsInPrefixTextPlural:B,startsinSuffixTextPlural:q,startsInPrefixTextSingular:W,startsinSuffixTextSingular:J,endsInPrefixTextPlural:V,endsinSuffixTextPlural:F,endsInPrefixTextSingular:X,endsinSuffixTextSingular:M,themeData:Z,numberOfListings:D,numberOfListingsTextSingular:r,numberOfListingsTextPlural:A,metadata:S,...G}=e,K=c.useRef(),Q=p?new Date(p)<=new Date:!1,fe=oe(p?new Date(p):null,new Date),z=oe(d?new Date(d):null,new Date),xe=z!==null&&z<=2&&z>0,ee=d?new Date(d).getTime():null,ye=Date.now(),H=ee!==null?ee-ye:null,R=H!==null&&H>0&&H<24*60*60*1e3,re=(y,O,f,E,$)=>f===1?`${y} ${f} ${E}`:`${O} ${f} ${$}`,we=()=>{if(!d)return null;const y=be,f=new Date(d).getTime()-y.getTime();if(f<=0)return null;const E=Math.floor(f/(1e3*60*60)),$=Math.floor(f%(1e3*60*60)/(1e3*60)),_e=Math.floor(f%(1e3*60)/1e3);return{hours:E,minutes:$,seconds:_e}},[be,ve]=c.useState(new Date);c.useEffect(()=>{if(!R)return;const y=setInterval(()=>{ve(new Date)},1e3);return()=>clearInterval(y)},[R]);const L=R?we():null;return t.jsxs(Te,{ref:K,theme:a,className:b,name:S==null?void 0:S.name,"data-accessor":S==null?void 0:S.accessor,onClick:y=>v(y,K),...G,children:[t.jsxs(Se,{theme:a,onClick:()=>i==null?void 0:i(),children:[t.jsx("img",{src:u}),t.jsx(Ie,{children:w==null?void 0:w.map((y,O)=>{var f,E;return t.jsx(Ce,{color:(f=h==null?void 0:h.find($=>$.value===y))==null?void 0:f.color,theme:a,children:t.jsx(de,{icon:(E=h==null?void 0:h.find($=>$.value===y))==null?void 0:E.icon})},`package__${O}`)})})]}),t.jsxs($e,{theme:a,children:[t.jsx("div",{className:"text-block-wrapper",children:t.jsxs("div",{className:"title-block-wrapper",children:[t.jsx("div",{className:"campaign-title",children:(te=N?T:g)==null?void 0:te.toUpperCase()}),t.jsx("div",{className:"campaign-title-text",children:l}),d&&p&&t.jsxs("div",{className:"campaign-date",children:[ie(p)," - ",ie(d)]}),t.jsxs("div",{className:"timestamp-text",children:[D>0&&t.jsxs("span",{className:"listings-text",children:[D," ",D===1?r:A," ","∙"," "]}),t.jsx("span",{className:`duration-text ${xe?"urgent":""} ${Q?"":"starts-in"}`,children:R&&L?t.jsxs("div",{className:"countdown-timer",children:[X," ",L.hours.toString().padStart(2,"0"),":",L.minutes.toString().padStart(2,"0"),":",L.seconds.toString().padStart(2,"0")]}):Q?re(X,V,z,M,F):re(W,B,fe,J,q)})]})]})}),t.jsx(pe,{hasPermission:!0,image:t.jsx(ke,{src:j}),imageComponent:k,themeData:Z,isActive:!0,isUser:!1,name:I,shopCategory:C,onClick:()=>_(o)})]})]})});me.propTypes={title:s.PropTypes.oneOfType([s.PropTypes.string,s.PropTypes.element]),numberOfListings:s.PropTypes.number,dropdown:s.PropTypes.any,color:s.PropTypes.string};m.styled.div`
250
250
  display: flex;
251
251
  flex-direction: column;
252
252
  gap: 1.5rem;
@@ -277,25 +277,25 @@
277
277
  }
278
278
  }
279
279
 
280
- @media (max-width: ${$.MOBILE_SIZE_PX+"px"}) {
280
+ @media (max-width: ${P.MOBILE_SIZE_PX+"px"}) {
281
281
  & .campaign-item {
282
282
  min-width: 100%;
283
283
  width: 100%;
284
284
  margin-right: 0;
285
285
  }
286
286
  }
287
- `;const O=p.styled.div`
287
+ `;const U=m.styled.div`
288
288
  width: ${e=>e.width||"100%"};
289
289
  height: ${e=>(e.heightCoeff||1)*1.125}rem;
290
290
  background-color: var(--gray-200, #dddfe4);
291
291
 
292
292
  ${x.linearGradientAnimation("-90deg")}
293
- `,Ce=p.styled.div`
293
+ `,Ne=m.styled.div`
294
294
  display: flex;
295
295
  flex-direction: ${e=>e!=null&&e.row?"row":"column"};
296
296
  gap: ${e=>(e==null?void 0:e.gap)??"0.5rem"};
297
297
  width: ${e=>(e==null?void 0:e.width)??"100%"};
298
- `,ae=p.styled.div`
298
+ `,le=m.styled.div`
299
299
  border-radius: ${e=>x.getBorderRadiusValueWithUnits(e.theme,(e==null?void 0:e.borderRadius)??"regular")};
300
300
  background: var(--gray-200, #dddfe4);
301
301
  position: relative;
@@ -306,7 +306,7 @@
306
306
  flex-shrink: 0;
307
307
 
308
308
  ${x.linearGradientAnimation()}
309
- `,ke=p.styled.div`
309
+ `,De=m.styled.div`
310
310
  background: var(--white, #fff);
311
311
  border-radius: ${e=>x.getBorderRadiusValueWithUnits(e.theme,"edged")};
312
312
  box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1), 0px 1px 2px rgba(0, 0, 0, 0.06);
@@ -335,17 +335,17 @@
335
335
  gap: 0.5rem;
336
336
  }
337
337
 
338
- @media (max-width: ${$.MOBILE_SIZE_PX+"px"}) {
338
+ @media (max-width: ${P.MOBILE_SIZE_PX+"px"}) {
339
339
  flex-direction: column;
340
340
 
341
341
  & .campaign__user {
342
342
  margin-top: 1rem;
343
343
  }
344
344
  }
345
- `,Ne=p.styled.div`
345
+ `,Ee=m.styled.div`
346
346
  display: flex;
347
347
  gap: 1.5rem;
348
- `,De=d.forwardRef(({},e)=>{const n=Z.useTheme();return t.jsxs(ke,{ref:e,theme:n,children:[t.jsx("div",{className:"campaign__left-section",children:t.jsx(ae,{theme:n,width:"15rem",height:"15rem",borderRadius:"edged"})}),t.jsxs("div",{className:"campaign__right-section",children:[t.jsxs(Ce,{theme:n,children:[t.jsx(O,{heightCoeff:.75,theme:n,width:"35%"}),t.jsx(O,{heightCoeff:1.25,theme:n}),t.jsx(O,{heightCoeff:3,theme:n})]}),t.jsxs("div",{className:"campaign__user",children:[t.jsx(ae,{theme:n,width:"2.5rem",height:"2.5rem",borderRadius:"curved"}),t.jsx(O,{theme:n,width:"75%"})]})]})]})}),Ee=({itemsCount:e=5,keyPrefix:n})=>t.jsx(Ne,{children:Array.from({length:e},(s,o)=>t.jsx(De,{},`${n}-skeleton-campaign-card-${o}`))}),Me=({children:e,fallbackComponent:n=t.jsx(t.Fragment,{}),isLoading:s=!1,itemsCount:o=5,keyPrefix:l})=>t.jsx(d.Suspense,{fallback:n,children:s===!0?t.jsx(Ee,{itemsCount:o,keyPrefix:l}):e}),ze=p.styled.div`
348
+ `,Me=c.forwardRef(({},e)=>{const n=Y.useTheme();return t.jsxs(De,{ref:e,theme:n,children:[t.jsx("div",{className:"campaign__left-section",children:t.jsx(le,{theme:n,width:"15rem",height:"15rem",borderRadius:"edged"})}),t.jsxs("div",{className:"campaign__right-section",children:[t.jsxs(Ne,{theme:n,children:[t.jsx(U,{heightCoeff:.75,theme:n,width:"35%"}),t.jsx(U,{heightCoeff:1.25,theme:n}),t.jsx(U,{heightCoeff:3,theme:n})]}),t.jsxs("div",{className:"campaign__user",children:[t.jsx(le,{theme:n,width:"2.5rem",height:"2.5rem",borderRadius:"curved"}),t.jsx(U,{theme:n,width:"75%"})]})]})]})}),ze=({itemsCount:e=5,keyPrefix:n})=>t.jsx(Ee,{children:Array.from({length:e},(a,o)=>t.jsx(Me,{},`${n}-skeleton-campaign-card-${o}`))}),Re=({children:e,fallbackComponent:n=t.jsx(t.Fragment,{}),isLoading:a=!1,itemsCount:o=5,keyPrefix:l})=>t.jsx(c.Suspense,{fallback:n,children:a===!0?t.jsx(ze,{itemsCount:o,keyPrefix:l}):e}),Le=m.styled.div`
349
349
  margin: 0 auto;
350
350
  display: flex;
351
351
  flex-direction: column;
@@ -384,7 +384,7 @@
384
384
  right: 0;
385
385
  }
386
386
 
387
- @media (max-width: ${$.MOBILE_SIZE_PX+"px"}) {
387
+ @media (max-width: ${P.MOBILE_SIZE_PX+"px"}) {
388
388
  & .scrollable-section__header {
389
389
  & .scrollable-section__title {
390
390
  & .title__text {
@@ -394,13 +394,13 @@
394
394
  }
395
395
  }
396
396
  }
397
- `,Le=p.styled(se.motion.div)`
397
+ `,Oe=m.styled(ce.motion.div)`
398
398
  display: grid;
399
399
  grid-template-columns: repeat(${e=>e==null?void 0:e.numOfColumns}, 1fr);
400
400
  gap: 1.5rem;
401
401
  width: 100%;
402
402
 
403
- @media (max-width: ${$.MOBILE_SIZE_PX+"px"}) {
403
+ @media (max-width: ${P.MOBILE_SIZE_PX+"px"}) {
404
404
  display: flex;
405
405
  flex-wrap: nowrap;
406
406
  overflow-x: scroll;
@@ -422,7 +422,7 @@
422
422
  /* Safari and Chrome */
423
423
  }
424
424
  }
425
- `,de=d.forwardRef(({icon:e,title:n,numOfSlides:s=2,showNavigation:o=!0,children:l},u)=>{const[i,m]=d.useState(0),[c,y]=d.useState(1),[P,I]=d.useState(null),[_,C]=d.useState(null),w=ie.useDetectMobile(),b=(l==null?void 0:l.length)??1;d.useEffect(()=>{const g=()=>{y(s)};return window.addEventListener("resize",g),g(),()=>window.removeEventListener("resize",g)},[]);const v=w?l:l==null?void 0:l.slice(i,i+c),k=g=>{var h;(h=g==null?void 0:g.target)==null||h.blur(),i+c<b&&m(i+c)},T=g=>{var h;(h=g==null?void 0:g.target)==null||h.blur(),i-c>=0&&m(i-c)};return t.jsxs(ze,{ref:u,children:[t.jsx("div",{className:"scrollable-section__header",children:t.jsxs("div",{className:"scrollable-section__title",children:[x.isDefinedNotEmptyString(e)&&t.jsx(oe,{icon:e,color:"primary",sizeInUnits:"1.5rem",className:"title__icon"}),x.isDefinedNotEmptyString(n)&&t.jsx("div",{className:"title__text",children:n})]})}),t.jsx(Le,{numOfColumns:s,...!w&&{animate:{x:0,opacity:1},initial:{x:10,opacity:0}},children:v},`scrollable-section__content-${i}`),o&&b>c&&!w&&t.jsxs("div",{className:"scrollable-section__navigation",children:[t.jsx(ee,{icon:"angle-left",borderRadius:"curved",btnType:"tinted",color:"neutral",className:"navigation__arrow",disabled:i===0,onClick:T}),t.jsx(ee,{icon:"angle-right",borderRadius:"curved",btnType:"tinted",color:"neutral",className:"navigation__arrow",disabled:i+c>=b,onClick:k})]})]})});de.propTypes={icon:a.PropTypes.string,title:a.PropTypes.string,numOfSlides:a.PropTypes.number,numOfSlidesForMobile:a.PropTypes.number,showNavigation:a.PropTypes.bool};const Re=p.styled.div`
425
+ `,he=c.forwardRef(({icon:e,title:n,numOfSlides:a=2,showNavigation:o=!0,children:l},u)=>{const[i,p]=c.useState(0),[d,w]=c.useState(1),[I,C]=c.useState(null),[j,k]=c.useState(null),b=ge.useDetectMobile(),v=(l==null?void 0:l.length)??1;c.useEffect(()=>{const g=()=>{w(a)};return window.addEventListener("resize",g),g(),()=>window.removeEventListener("resize",g)},[]);const _=b?l:l==null?void 0:l.slice(i,i+d),N=g=>{var h;(h=g==null?void 0:g.target)==null||h.blur(),i+d<v&&p(i+d)},T=g=>{var h;(h=g==null?void 0:g.target)==null||h.blur(),i-d>=0&&p(i-d)};return t.jsxs(Le,{ref:u,children:[t.jsx("div",{className:"scrollable-section__header",children:t.jsxs("div",{className:"scrollable-section__title",children:[x.isDefinedNotEmptyString(e)&&t.jsx(de,{icon:e,color:"primary",sizeInUnits:"1.5rem",className:"title__icon"}),x.isDefinedNotEmptyString(n)&&t.jsxs("div",{className:"title__text",children:[" ",n]})]})}),t.jsx(Oe,{numOfColumns:a,...!b&&{animate:{x:0,opacity:1},initial:{x:10,opacity:0}},children:_},`scrollable-section__content-${i}`),o&&v>d&&!b&&t.jsxs("div",{className:"scrollable-section__navigation",children:[t.jsx(se,{icon:"angle-left",borderRadius:"curved",btnType:"tinted",color:"neutral",className:"navigation__arrow",disabled:i===0,onClick:T}),t.jsx(se,{icon:"angle-right",borderRadius:"curved",btnType:"tinted",color:"neutral",className:"navigation__arrow",disabled:i+d>=v,onClick:N})]})]})});he.propTypes={icon:s.PropTypes.string,title:s.PropTypes.string,numOfSlides:s.PropTypes.number,numOfSlidesForMobile:s.PropTypes.number,showNavigation:s.PropTypes.bool};const Ue=m.styled.div`
426
426
  display: flex;
427
427
  flex: 1;
428
428
  width: 100%;
@@ -439,4 +439,4 @@
439
439
  border-radius: 1.25rem;
440
440
  object-fit: cover;
441
441
  }
442
- `,ge=d.forwardRef(({sectionName:e,imageUrl:n,maxHeight:s="16.25rem",className:o="",handleClick:l=()=>{}},u)=>t.jsx(Re,{ref:u,maxHeight:s,onClick:l,className:`itemless-banner ${o}`,children:t.jsx("img",{src:n,alt:`itemless-banner__${e}`})}));ge.propTypes={sectionName:a.PropTypes.string,imageUrl:a.PropTypes.string,maxHeight:a.PropTypes.string,className:a.PropTypes.string,handleClick:a.PropTypes.func};const Oe=d.memo(ce),Ue=d.forwardRef(({sellerType:e="Shop",items:n=[],title:s,icon:o,isLoading:l,onSelectCard:u=()=>{},onSelectShop:i=()=>{},getImage:m=()=>{},campaignSingleText:c,upcomingCampaignText:y,salesCampaignTypes:P=[],startsInPrefixTextPlural:I,startsinSuffixTextPlural:_,startsInPrefixTextSingular:C,startsinSuffixTextSingular:w,endsInPrefixTextPlural:b,endsinSuffixTextPlural:v,endsInPrefixTextSingular:k,endsinSuffixTextSingular:T,numOfSlides:g=2,showNavigation:h=!0,numberOfListingsTextSingular:U,numberOfListingsTextPlural:B,itemlessImageUrl:q,itemlessLink:A,handleItemlessLink:W=()=>{}},G)=>{const N=ie.useDetectMobile(),V=d.useMemo(()=>{let E=n==null?void 0:n.map((r,F)=>t.jsx(Oe,{className:"campaign-item",coverPhoto:m(r==null?void 0:r.coverPhoto,(r==null?void 0:r.uuid)||(r==null?void 0:r.campaignUuid)),description:r==null?void 0:r.description,endDate:r==null?void 0:r.endDate,salesPackages:r==null?void 0:r.salesPackages,sellerType:e,shopImage:r==null?void 0:r.profileImage,shopImageComponent:r==null?void 0:r.profileImageComponent,shopName:r==null?void 0:r.shopName,shopUuid:r==null?void 0:r.shopUuid,shopCategory:r==null?void 0:r.shopCategory,startDate:r==null?void 0:r.startDate,title:r==null?void 0:r.name,uuid:r==null?void 0:r.campaignUuid,onSelectCard:()=>u(r==null?void 0:r.campaignUuid,r==null?void 0:r.shopUuid),onSelectShop:()=>i(r==null?void 0:r.shopUuid),campaignSingleText:c,upcomingCampaignText:y,upcoming:r==null?void 0:r.upcoming,salesCampaignTypes:P,startsInPrefixTextPlural:I,startsinSuffixTextPlural:_,startsInPrefixTextSingular:C,startsinSuffixTextSingular:w,endsInPrefixTextPlural:b,endsinSuffixTextPlural:v,endsInPrefixTextSingular:k,endsinSuffixTextSingular:T,themeData:r==null?void 0:r.themeData,numberOfListings:r==null?void 0:r.numberOfListings,numberOfListingsTextSingular:U,numberOfListingsTextPlural:B},`campaign__item__${F}__${r==null?void 0:r.startDate}___${r==null?void 0:r.endDate}`));return(n==null?void 0:n.length)<2&&!N?[...E,t.jsx(ge,{imageUrl:q,className:"campaign-item",handleClick:W})]:E},[n]);return t.jsx(Me,{isLoading:l,itemsCount:N?1:2,keyPrefix:"sales-camp",children:t.jsx(de,{icon:o,title:s,numOfSlides:g,showNavigation:h,children:V},`sales-campaign-section__${N}`)})});module.exports=Ue;
442
+ `,ue=c.forwardRef(({sectionName:e,imageUrl:n,maxHeight:a="16.25rem",className:o="",handleClick:l=()=>{}},u)=>t.jsx(Ue,{ref:u,maxHeight:a,onClick:l,className:`itemless-banner ${o}`,children:t.jsx("img",{src:n,alt:`itemless-banner__${e}`})}));ue.propTypes={sectionName:s.PropTypes.string,imageUrl:s.PropTypes.string,maxHeight:s.PropTypes.string,className:s.PropTypes.string,handleClick:s.PropTypes.func};const Be=c.memo(me),qe=c.forwardRef(({sellerType:e="Shop",items:n=[],title:a,icon:o,isLoading:l,onSelectCard:u=()=>{},onSelectShop:i=()=>{},getImage:p=()=>{},campaignSingleText:d,upcomingCampaignText:w,salesCampaignTypes:I=[],startsInPrefixTextPlural:C,startsinSuffixTextPlural:j,startsInPrefixTextSingular:k,startsinSuffixTextSingular:b,endsInPrefixTextPlural:v,endsinSuffixTextPlural:_,endsInPrefixTextSingular:N,endsinSuffixTextSingular:T,numOfSlides:g=2,showNavigation:h=!0,numberOfListingsTextSingular:B,numberOfListingsTextPlural:q,itemlessImageUrl:W,itemlessLink:J,handleItemlessLink:V=()=>{},componentName:F},X)=>{const M=ge.useDetectMobile(),Z=c.useMemo(()=>{let D=n==null?void 0:n.map((r,A)=>t.jsx(Be,{className:"campaign-item",coverPhoto:p(r==null?void 0:r.coverPhoto,(r==null?void 0:r.uuid)||(r==null?void 0:r.campaignUuid)),description:r==null?void 0:r.description,endDate:r==null?void 0:r.endDate,salesPackages:r==null?void 0:r.salesPackages,sellerType:e,shopImage:r==null?void 0:r.profileImage,shopImageComponent:r==null?void 0:r.profileImageComponent,shopName:r==null?void 0:r.shopName,shopUuid:r==null?void 0:r.shopUuid,shopCategory:r==null?void 0:r.shopCategory,startDate:r==null?void 0:r.startDate,title:r==null?void 0:r.name,uuid:r==null?void 0:r.campaignUuid,onSelectCard:(S,G)=>u(r==null?void 0:r.campaignUuid,r==null?void 0:r.shopUuid,G),onSelectShop:()=>i(r==null?void 0:r.shopUuid),campaignSingleText:d,upcomingCampaignText:w,upcoming:r==null?void 0:r.upcoming,salesCampaignTypes:I,startsInPrefixTextPlural:C,startsinSuffixTextPlural:j,startsInPrefixTextSingular:k,startsinSuffixTextSingular:b,endsInPrefixTextPlural:v,endsinSuffixTextPlural:_,endsInPrefixTextSingular:N,endsinSuffixTextSingular:T,themeData:r==null?void 0:r.themeData,numberOfListings:r==null?void 0:r.numberOfListings,numberOfListingsTextSingular:B,numberOfListingsTextPlural:q,metadata:{name:F,accessor:r==null?void 0:r.accessor}},`campaign__item__${A}__${r==null?void 0:r.startDate}___${r==null?void 0:r.endDate}`));return(n==null?void 0:n.length)<2&&!M?[...D,t.jsx(ue,{imageUrl:W,className:"campaign-item",handleClick:V},"itemless-campaign-section-banner")]:D},[n]);return t.jsx(Re,{isLoading:l,itemsCount:M?1:2,keyPrefix:"sales-camp",children:t.jsx(he,{icon:o,title:a,numOfSlides:g,showNavigation:h,children:Z},`sales-campaign-section__${M}`)})});module.exports=qe;