@lanaco/lnc-react-ui 4.0.39 → 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.
- package/dist/BannerSectionBasic.cjs +9 -9
- package/dist/BannerSectionBasic.js +20 -20
- package/dist/BannerSectionCarousel.cjs +13 -5
- package/dist/BannerSectionCarousel.js +29 -21
- package/dist/BannerSectionGrid.cjs +1 -1
- package/dist/BannerSectionGrid.js +6 -6
- package/dist/BannerSectionSimple.cjs +4 -4
- package/dist/BannerSectionSimple.js +41 -38
- package/dist/BannerSectionWithList.cjs +4 -4
- package/dist/BannerSectionWithList.js +17 -17
- package/dist/BannerSectionWithListImage.cjs +5 -5
- package/dist/BannerSectionWithListImage.js +41 -38
- package/dist/BlogsSectionDetailed.cjs +10 -10
- package/dist/BlogsSectionDetailed.js +32 -33
- package/dist/BlogsSectionLarge.cjs +2 -2
- package/dist/BlogsSectionLarge.js +2 -2
- package/dist/BlogsSectionSimple.cjs +2 -2
- package/dist/BlogsSectionSimple.js +20 -20
- package/dist/BlogsSectionSimpleCentered.cjs +6 -6
- package/dist/BlogsSectionSimpleCentered.js +9 -9
- package/dist/BlogsSectionWithFilters.cjs +10 -10
- package/dist/BlogsSectionWithFilters.js +65 -64
- package/dist/BrandHitsSection.cjs +12 -7
- package/dist/BrandHitsSection.js +10 -5
- package/dist/CalorieCalculatorSection.cjs +7 -8
- package/dist/CalorieCalculatorSection.js +31 -32
- package/dist/CustomLoanMapSection.cjs +2 -2
- package/dist/CustomLoanMapSection.js +13 -13
- package/dist/DetailedProductsSection.cjs +1 -1
- package/dist/DetailedProductsSection.js +1 -1
- package/dist/FieldOfInterestsWithAvatarsCardsSection.cjs +8 -8
- package/dist/FieldOfInterestsWithAvatarsCardsSection.js +9 -8
- package/dist/FieldOfInterestsWithTagsCardsSection.cjs +14 -6
- package/dist/FieldOfInterestsWithTagsCardsSection.js +12 -4
- package/dist/GeneralWithTagsCardsSection.cjs +18 -6
- package/dist/GeneralWithTagsCardsSection.js +44 -31
- package/dist/GiftCardsSection.cjs +9 -5
- package/dist/GiftCardsSection.js +21 -17
- package/dist/LocationSearchSection.cjs +1 -1
- package/dist/LocationSearchSection.js +1 -1
- package/dist/MasonryGeneralCardsSection.cjs +21 -1
- package/dist/MasonryGeneralCardsSection.js +20 -0
- package/dist/OverlayGeneralCardsSection.cjs +52 -96
- package/dist/OverlayGeneralCardsSection.js +116 -165
- package/dist/ProductsWithBannerSection.cjs +5 -5
- package/dist/ProductsWithBannerSection.js +26 -26
- package/dist/SalesCampaignsSection.cjs +17 -17
- package/dist/SalesCampaignsSection.js +81 -81
- package/dist/ShopCardsSection.cjs +19 -9
- package/dist/ShopCardsSection.js +54 -40
- package/dist/SimpleCategoriesSection.cjs +1 -1
- package/dist/SimpleCategoriesSection.js +1 -1
- package/dist/SimpleProductsSection.cjs +1 -1
- package/dist/SimpleProductsSection.js +1 -1
- package/dist/{index-CT6_7UFb.js → index-5cttM4t7.js} +119 -124
- package/dist/{index-BN8qgFbe.js → index-BT55M3t6.js} +8 -7
- package/dist/{index-_Db92CJE.cjs → index-DHJmdMN8.cjs} +5 -4
- package/dist/index-Dn5tPLgP.cjs +95 -0
- package/dist/{style-6tSw9aqK.js → style-CiePxaJ_.js} +6 -6
- package/dist/{style-BR3tIhP1.cjs → style-DN1qT8BE.cjs} +6 -6
- package/package.json +1 -1
- package/dist/index-Q_i-aqsF.cjs +0 -95
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const r=require("react/jsx-runtime"),
|
|
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;
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
& .card-title {
|
|
56
56
|
font-size: 0.875rem;
|
|
57
57
|
font-weight: 600;
|
|
58
|
-
${
|
|
58
|
+
${d.truncateTextInRows(2)}
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
&:hover {
|
|
@@ -65,13 +65,13 @@
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
& .skeleton-img {
|
|
68
|
-
background-color: ${
|
|
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: ${
|
|
74
|
+
background-color: ${d.linearGradientAnimation("-90deg")};
|
|
75
75
|
width: 100%;
|
|
76
76
|
height: 1.25rem;
|
|
77
77
|
}
|
|
@@ -87,4 +87,4 @@
|
|
|
87
87
|
object-fit: cover;
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
|
-
`,P=
|
|
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;
|
|
@@ -3,9 +3,9 @@ import { forwardRef as u, Suspense as S, memo as C, useMemo as N } from "react";
|
|
|
3
3
|
import { n as p } from "./emotion-styled.browser.esm-CjCaF13H.js";
|
|
4
4
|
import { M as b } from "./consts-C1uHV4xc.js";
|
|
5
5
|
import { u as P } from "./useDetectMobile-BC6EGaBc.js";
|
|
6
|
-
import { R as $ } from "./style-
|
|
7
|
-
import { t as M, m as g, l as
|
|
8
|
-
const
|
|
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,7 +22,7 @@ const I = p.div`
|
|
|
22
22
|
height: 100%;
|
|
23
23
|
object-fit: cover;
|
|
24
24
|
}
|
|
25
|
-
`,
|
|
25
|
+
`, W = p.div`
|
|
26
26
|
display: grid;
|
|
27
27
|
grid-template-columns: ${(t) => `repeat(${t.limit}, minmax(0, 1fr))`};
|
|
28
28
|
gap: 1.25rem;
|
|
@@ -94,51 +94,51 @@ const I = p.div`
|
|
|
94
94
|
object-fit: cover;
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
|
-
`,
|
|
97
|
+
`, B = u((t, n) => {
|
|
98
98
|
const {
|
|
99
99
|
uuid: a,
|
|
100
100
|
title: i,
|
|
101
101
|
image: o,
|
|
102
102
|
sellerUuid: h,
|
|
103
|
-
onSelectCard:
|
|
103
|
+
onSelectCard: l = () => {
|
|
104
104
|
},
|
|
105
|
-
imageComponent:
|
|
105
|
+
imageComponent: d
|
|
106
106
|
} = t;
|
|
107
|
-
return /* @__PURE__ */ s(w, { className: "product-card", onClick:
|
|
108
|
-
|
|
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
|
-
}),
|
|
111
|
+
}), I = u(({}, t) => /* @__PURE__ */ s(w, { className: "product-card", children: [
|
|
112
112
|
/* @__PURE__ */ r("img", { className: "skeleton-img" }),
|
|
113
113
|
/* @__PURE__ */ r("div", { className: "skeleton-title" })
|
|
114
|
-
] })), R = ({ limit: t = 4, isLoading:
|
|
115
|
-
|
|
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
116
|
{
|
|
117
|
-
isLoading:
|
|
117
|
+
isLoading: n
|
|
118
118
|
},
|
|
119
119
|
`${a}-skeleton-product-card-${o}`
|
|
120
120
|
)) }), z = ({
|
|
121
121
|
children: t,
|
|
122
|
-
fallbackComponent:
|
|
122
|
+
fallbackComponent: n = /* @__PURE__ */ r(c, {}),
|
|
123
123
|
isLoading: a = !1,
|
|
124
124
|
limit: i,
|
|
125
125
|
keyPrefix: o
|
|
126
|
-
}) => /* @__PURE__ */ r(S, { fallbackComponent:
|
|
126
|
+
}) => /* @__PURE__ */ r(S, { fallbackComponent: n, children: a === !0 ? /* @__PURE__ */ r(
|
|
127
127
|
R,
|
|
128
128
|
{
|
|
129
129
|
isLoading: a,
|
|
130
130
|
limit: i,
|
|
131
131
|
keyPrefix: o
|
|
132
132
|
}
|
|
133
|
-
) : t }), f = C(
|
|
133
|
+
) : t }), f = C(B), O = u((t, n) => {
|
|
134
134
|
const {
|
|
135
135
|
icon: a,
|
|
136
136
|
items: i,
|
|
137
137
|
limit: o = 4,
|
|
138
|
-
|
|
139
|
-
onSelectCard:
|
|
138
|
+
imageUrl: h,
|
|
139
|
+
onSelectCard: l = () => {
|
|
140
140
|
},
|
|
141
|
-
title:
|
|
141
|
+
title: d = "Season inspiration",
|
|
142
142
|
isLoading: k = !1
|
|
143
143
|
} = t, v = P(), y = N(() => /* @__PURE__ */ r(c, { children: v === !0 ? i == null ? void 0 : i.map((e, m) => /* @__PURE__ */ r(
|
|
144
144
|
f,
|
|
@@ -147,7 +147,7 @@ const I = p.div`
|
|
|
147
147
|
image: e == null ? void 0 : e.image,
|
|
148
148
|
sellerUuid: e == null ? void 0 : e.sellerUuid,
|
|
149
149
|
uuid: e == null ? void 0 : e.uuid,
|
|
150
|
-
onSelectCard: () =>
|
|
150
|
+
onSelectCard: () => l == null ? void 0 : l(e == null ? void 0 : e.uuid)
|
|
151
151
|
},
|
|
152
152
|
m
|
|
153
153
|
)) : i == null ? void 0 : i.slice(0, o).map((e, m) => /* @__PURE__ */ r(
|
|
@@ -157,17 +157,17 @@ const I = p.div`
|
|
|
157
157
|
image: e == null ? void 0 : e.image,
|
|
158
158
|
sellerUuid: e == null ? void 0 : e.sellerUuid,
|
|
159
159
|
uuid: e == null ? void 0 : e.uuid,
|
|
160
|
-
onSelectCard: () =>
|
|
160
|
+
onSelectCard: () => l == null ? void 0 : l(e == null ? void 0 : e.uuid)
|
|
161
161
|
},
|
|
162
162
|
m
|
|
163
163
|
)) }), [i]);
|
|
164
|
-
return /* @__PURE__ */ s($, { ref:
|
|
164
|
+
return /* @__PURE__ */ s($, { ref: n, children: [
|
|
165
165
|
/* @__PURE__ */ r("div", { className: "regular-title", children: /* @__PURE__ */ s("div", { className: "regular-title-text", children: [
|
|
166
|
-
|
|
167
|
-
/* @__PURE__ */ r("span", { children:
|
|
166
|
+
j(a) && /* @__PURE__ */ r("i", { className: a }),
|
|
167
|
+
/* @__PURE__ */ r("span", { children: d })
|
|
168
168
|
] }) }),
|
|
169
|
-
/* @__PURE__ */ r(
|
|
170
|
-
/* @__PURE__ */ r(
|
|
169
|
+
/* @__PURE__ */ r(E, { className: "products-banner", children: /* @__PURE__ */ r("img", { src: h }) }),
|
|
170
|
+
/* @__PURE__ */ r(W, { limit: o, children: /* @__PURE__ */ r(
|
|
171
171
|
z,
|
|
172
172
|
{
|
|
173
173
|
isLoading: k,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";const r=require("react/jsx-runtime"),s=require("react"),u=require("./emotion-styled.browser.esm-Cle7tAM9.cjs"),
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),s=require("react"),u=require("./emotion-styled.browser.esm-Cle7tAM9.cjs"),S=require("./utils-NZLCh-J5.cjs"),I=require("./consts-CtNoHdBj.cjs"),K=require("./motion-B_VPZaJq.cjs"),i=require("./index-BPVoEhTF.cjs"),Q=require("./Icon.cjs"),ee=require("./Badge.cjs"),M=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),G=require("./useDetectMobile-D6d5LpdL.cjs"),re=require("./FlexBox.cjs"),q=require("./index-Cb_AeN9A.cjs"),z=require("./IconButton.cjs"),te=u.newStyled.div`
|
|
2
2
|
cursor: pointer;
|
|
3
3
|
display: flex;
|
|
4
4
|
gap: 1rem;
|
|
5
5
|
padding: 1.25rem;
|
|
6
|
-
border-radius:
|
|
7
|
-
border: 1px solid var(--gray-
|
|
6
|
+
border-radius: 20px;
|
|
7
|
+
border: 1px solid var(--gray-95008, #14161a14);
|
|
8
8
|
|
|
9
9
|
@media (max-width: ${I.MOBILE_SIZE_PX+"px"}) {
|
|
10
10
|
flex-direction: column;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
border-radius: 0;
|
|
15
15
|
}
|
|
16
16
|
`,oe=u.newStyled.div`
|
|
17
|
-
border-radius: ${e=>
|
|
17
|
+
border-radius: ${e=>S.getBorderRadiusValueWithUnits(e.theme,"edged")};
|
|
18
18
|
height: 15rem;
|
|
19
19
|
width: 15rem;
|
|
20
20
|
min-width: 15rem;
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
font-weight: 500;
|
|
136
136
|
font-size: 0.875rem;
|
|
137
137
|
line-height: 1.25rem;
|
|
138
|
-
border-radius: ${e=>
|
|
138
|
+
border-radius: ${e=>S.getBorderRadiusValueWithUnits(e.theme,"slight")};
|
|
139
139
|
transition: all 0.25s ease;
|
|
140
140
|
|
|
141
141
|
& .logo-wrapper {
|
|
@@ -192,7 +192,7 @@
|
|
|
192
192
|
display: flex;
|
|
193
193
|
gap: 0.25rem;
|
|
194
194
|
`,le=e=>`var(--${e}-700)`,ce=u.newStyled.div`
|
|
195
|
-
border-radius: ${e=>
|
|
195
|
+
border-radius: ${e=>S.getBorderRadiusValueWithUnits(e.theme,e.borderRadius||"slight")};
|
|
196
196
|
background-color: ${e=>le(e==null?void 0:e.color)};
|
|
197
197
|
color: white;
|
|
198
198
|
height: 1.5rem;
|
|
@@ -207,7 +207,7 @@
|
|
|
207
207
|
& i {
|
|
208
208
|
font-size: 0.813rem;
|
|
209
209
|
}
|
|
210
|
-
`,X=e=>{const{uuid:o,hasPermission:c=!0,isUser:n,image:m,name:a,notifications:d=0,color:x="primary",size:w="large",style:
|
|
210
|
+
`,X=e=>{const{uuid:o,hasPermission:c=!0,isUser:n,image:m,name:a,notifications:d=0,color:x="primary",size:w="large",style:j,disabled:l,onSelect:g=()=>{},isActive:y,className:b,themeData:f}=e,T={theme:M.useTheme(),color:x,size:w,style:j,disabled:l};return s.createElement(se,{onClick:t=>{t.stopPropagation(),c===!0&&(g==null||g())},...T,key:a,animate:{y:0,opacity:1},className:`profile-item ${b}`,exit:{opacity:0},hasPermission:c,initial:{y:-10,opacity:0},isActive:y,themeColor:(f==null?void 0:f.code)||"transparent"},r.jsx("div",{className:"logo-wrapper",children:m}),r.jsx("div",{className:"name",children:a}),d>0&&r.jsx("div",{className:"notifications-number",children:r.jsx(ee,{className:"badge",color:"danger",size:"small",children:d>99?"99+":d})}))};X.propTypes={id:i.PropTypes.any,isUserProfile:i.PropTypes.bool,themeColor:i.PropTypes.string,image:i.PropTypes.any,name:i.PropTypes.string,notifications:i.PropTypes.number,style:i.PropTypes.object,className:i.PropTypes.string,color:i.PropTypes.oneOf(["primary","secondary","success","warning","danger","information","neutral"]),size:i.PropTypes.oneOf(["large"]),onSelect:i.PropTypes.func,hasPermission:i.PropTypes.bool};const H=(e,o)=>{if(!e||!o)return null;let c=Math.floor((e==null?void 0:e.getTime())-(o==null?void 0:o.getTime())),n=1e3*60*60*24;return Math.ceil(c/n)},Y=e=>{const o=M.useTheme(),{uuid:c,shopUuid:n,title:m="",description:a,badges:d,coverPhoto:x,onSelect:w,status:j,startDate:l,endDate:g,salesPackages:y,shopName:b,shopImage:f,onSelectCard:h=()=>{},onSelectShop:T=()=>{},campaignSingleText:t,salesCampaignTypes:$=[],startsInPrefixTextPlural:P,startsinSuffixTextPlural:F,startsInPrefixTextSingular:k,startsinSuffixTextSingular:A,themeData:O,...R}=e,p=l?new Date(l)<=new Date:!1;H(g?new Date(g):null,l?new Date(l):null);const v=H(l?new Date(l):null,new Date);return r.jsxs(te,{theme:o,onClick:h,...R,children:[r.jsxs(oe,{theme:o,onClick:()=>w==null?void 0:w(),children:[r.jsx("img",{src:x}),r.jsx(ae,{children:y==null?void 0:y.map((C,E)=>{var N,W;return r.jsx(ce,{color:(N=$==null?void 0:$.find(B=>B.value===C))==null?void 0:N.color,theme:o,children:r.jsx(Q,{icon:(W=$==null?void 0:$.find(B=>B.value===C))==null?void 0:W.icon})},`package__${E}`)})})]}),r.jsxs(ie,{theme:o,children:[r.jsxs("div",{className:"text-block-wrapper",children:[r.jsxs("div",{className:"title-block-wrapper",children:[r.jsx("div",{className:"campaign-title",children:t}),r.jsx("div",{className:"campaign-title-text",children:m}),r.jsx("div",{className:"timestamp-text",children:p?"":v===1?`${k} ${v} ${A}`:`${P} ${v} ${F}`})]}),r.jsx("div",{children:a})]}),r.jsx(X,{hasPermission:!0,image:r.jsx("img",{src:f,className:`${f?"":"no-image"}`}),themeData:O,isActive:!0,isUser:!1,name:b,onClick:()=>T(n)})]})]})};Y.propTypes={title:i.PropTypes.oneOfType([i.PropTypes.string,i.PropTypes.element]),numberOfListings:i.PropTypes.number,dropdown:i.PropTypes.any,color:i.PropTypes.string};const de=u.newStyled.div`
|
|
211
211
|
display: flex;
|
|
212
212
|
flex-direction: column;
|
|
213
213
|
gap: 1.5rem;
|
|
@@ -218,7 +218,7 @@
|
|
|
218
218
|
position: absolute;
|
|
219
219
|
top: 50%;
|
|
220
220
|
left: 1.5rem;
|
|
221
|
-
z-index: ${e=>
|
|
221
|
+
z-index: ${e=>S.isDefined(e.arrowsZIndex)?e.arrowsZIndex:20};
|
|
222
222
|
}
|
|
223
223
|
|
|
224
224
|
& .hover-right-arrow {
|
|
@@ -226,7 +226,7 @@
|
|
|
226
226
|
position: absolute;
|
|
227
227
|
top: 50%;
|
|
228
228
|
right: 1.5rem;
|
|
229
|
-
z-index: ${e=>
|
|
229
|
+
z-index: ${e=>S.isDefined(e.arrowsZIndex)?e.arrowsZIndex:20};
|
|
230
230
|
}
|
|
231
231
|
|
|
232
232
|
& .clip-loader-wrapper {
|
|
@@ -241,7 +241,7 @@
|
|
|
241
241
|
display: flex;
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
|
-
`,
|
|
244
|
+
`,ge=u.newStyled.div`
|
|
245
245
|
display: flex;
|
|
246
246
|
align-items: center;
|
|
247
247
|
|
|
@@ -262,7 +262,7 @@
|
|
|
262
262
|
display: none;
|
|
263
263
|
}
|
|
264
264
|
}
|
|
265
|
-
`,
|
|
265
|
+
`,he=u.newStyled.div`
|
|
266
266
|
position: relative;
|
|
267
267
|
padding: ${e=>e.padding};
|
|
268
268
|
|
|
@@ -340,7 +340,7 @@
|
|
|
340
340
|
right: 0;
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
|
-
`,pe=(e,o)=>{const[c,n]=s.useState({trigger:null,direction:null}),m=a=>a.touches||a.originalEvent.touches;return s.useEffect(()=>{const a=typeof e=="string"||e instanceof String?document.getElementById(e):e.current;let d=null,x=null;if(a){const w=l=>{const
|
|
343
|
+
`,pe=(e,o)=>{const[c,n]=s.useState({trigger:null,direction:null}),m=a=>a.touches||a.originalEvent.touches;return s.useEffect(()=>{const a=typeof e=="string"||e instanceof String?document.getElementById(e):e.current;let d=null,x=null;if(a){const w=l=>{const g=m(l)[0];d=g.clientX,x=g.clientY},j=l=>{if(!d||!x)return;const g=l.touches[0].clientX,y=l.touches[0].clientY,b=d-g,f=x-y;Math.abs(b)>Math.abs(f)?b>0?n(h=>({trigger:!h.trigger,direction:_.LEFT})):n(h=>({trigger:!h.trigger,direction:_.RIGHT})):f>0?n(h=>({trigger:!h.trigger,direction:_.UP})):n(h=>({trigger:!h.trigger,direction:_.DOWN})),d=null,x=null};return a.addEventListener("touchstart",w),a.addEventListener("touchmove",j),()=>{a.removeEventListener("touchstart",w),a.addEventListener("touchmove",j)}}},[]),c},_={UP:"up",DOWN:"down",RIGHT:"right",LEFT:"left"},J=s.forwardRef(({title:e,columnGap:o="2rem",rowGap:c="1.25rem",scrollBySize:n=300,wrapForMobile:m=!1,wrap:a=!1,children:d,methodsRef:x,arrowsVisibleOnHover:w=!0,rightAlignArrows:j=!1,padding:l="0",showTimesBtn:g,noArrows:y,onShowEnd:b,arrowsZIndex:f,...h},T)=>{const t=G.useDetectMobile(),$=M.useTheme(),[P,F]=s.useState(!1),[k,A]=s.useState(!1),[O,R]=s.useState(!0),p=s.useRef(),v=pe(p);s.useEffect(()=>{(v==null?void 0:v.direction)===_.RIGHT&&k!==!0?E():(v==null?void 0:v.direction)===_.LEFT&&P!==!0&&C()},[v]);const C=()=>{var D;(D=p.current)==null||D.scrollBy(n,0)},E=()=>{var D;(D=p.current)==null||D.scrollBy(-n,0)},[N,W]=s.useState(!1);s.useEffect(()=>{var D,U;W(((D=p==null?void 0:p.current)==null?void 0:D.scrollWidth)>((U=p==null?void 0:p.current)==null?void 0:U.clientWidth))},[d]),s.useImperativeHandle(x,()=>({scrollToEnd(){B()},scrollLeft(){E()},scrollRight(){C()}}));const B=()=>{p.current.scrollLeft=p.current.scrollWidth};return r.jsxs(de,{arrowsZIndex:f,children:[r.jsxs(ge,{children:[r.jsx("div",{children:e}),r.jsxs("div",{className:"btns-group",children:[r.jsx(z,{borderRadius:"curved",btnType:"tinted",className:"scroll-arrow-left",color:"neutral",disabled:k,icon:"angle-left",onClick:E}),r.jsx(z,{borderRadius:"curved",btnType:"tinted",className:"scroll-arrow-right",color:"neutral",disabled:P,icon:"angle-right",onClick:C})]})]}),r.jsx(z,{borderRadius:"curved",btnType:"tinted",className:"hover-left-arrow scroll-arrow-left",color:"neutral",disabled:k,icon:"angle-left",onClick:E}),r.jsx(z,{borderRadius:"curved",btnType:"tinted",className:"hover-right-arrow scroll-arrow-right",color:"neutral",disabled:P,icon:"angle-right",onClick:C}),r.jsx(he,{ref:T,arrowsVisibleOnHover:w,hasOverflow:N,noArrows:y,padding:l,rightAlignArrows:j,showTimesBtn:g,theme:$,...h,children:r.jsxs(re,{ref:p,className:"scrollable-container",columnGap:o,rowGap:c,wrap:a||m&&t?"Wrap":"NoWrap",children:[r.jsx(q.InfiniteScrollEndElement,{isHorizontal:!0,onIsNotVisible:()=>{k===!0&&A(!1)},onIsVisible:()=>{k===!1&&A(!0)}}),d,r.jsx(q.InfiniteScrollEndElement,{isHorizontal:!0,onIsNotVisible:()=>{P===!0&&F(!1),R(!0)},onIsVisible:()=>{P===!1&&F(!0),R(!1),b==null||b()}}),O&&N&&r.jsx("div",{className:"gradient"})]})})]})});J.propTypes={title:i.PropTypes.string,rowGap:i.PropTypes.string,columnGap:i.PropTypes.string,scrollBySize:i.PropTypes.number,wrapForMobile:i.PropTypes.bool,wrap:i.PropTypes.bool,methodsRef:i.PropTypes.any,arrowsVisibleOnHover:i.PropTypes.bool,rightAlignArrows:i.PropTypes.bool,padding:i.PropTypes.string};const ue=u.newStyled.div`
|
|
344
344
|
display: flex;
|
|
345
345
|
flex-direction: column;
|
|
346
346
|
gap: 1.5rem;
|
|
@@ -375,14 +375,14 @@
|
|
|
375
375
|
height: ${e=>(e.heightCoeff||1)*1.125}rem;
|
|
376
376
|
background-color: var(--gray-200, #dddfe4);
|
|
377
377
|
|
|
378
|
-
${
|
|
378
|
+
${S.linearGradientAnimation("-90deg")}
|
|
379
379
|
`,fe=u.newStyled.div`
|
|
380
380
|
display: flex;
|
|
381
381
|
flex-direction: ${e=>e!=null&&e.row?"row":"column"};
|
|
382
382
|
gap: ${e=>(e==null?void 0:e.gap)??"0.5rem"};
|
|
383
383
|
width: ${e=>(e==null?void 0:e.width)??"100%"};
|
|
384
384
|
`,Z=u.newStyled.div`
|
|
385
|
-
border-radius: ${e=>
|
|
385
|
+
border-radius: ${e=>S.getBorderRadiusValueWithUnits(e.theme,(e==null?void 0:e.borderRadius)??"regular")};
|
|
386
386
|
background: var(--gray-200, #dddfe4);
|
|
387
387
|
position: relative;
|
|
388
388
|
max-height: ${e=>(e==null?void 0:e.height)??"5rem"};
|
|
@@ -391,10 +391,10 @@
|
|
|
391
391
|
width: ${e=>(e==null?void 0:e.width)??"5rem"};
|
|
392
392
|
flex-shrink: 0;
|
|
393
393
|
|
|
394
|
-
${
|
|
394
|
+
${S.linearGradientAnimation()}
|
|
395
395
|
`,me=u.newStyled.div`
|
|
396
396
|
background: var(--white, #fff);
|
|
397
|
-
border-radius:
|
|
397
|
+
border-radius: ${e=>S.getBorderRadiusValueWithUnits(e.theme,"edged")};
|
|
398
398
|
box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1), 0px 1px 2px rgba(0, 0, 0, 0.06);
|
|
399
399
|
border: 1px solid var(--gray-95012, #14161a1f);
|
|
400
400
|
|
|
@@ -420,4 +420,4 @@
|
|
|
420
420
|
align-items: center;
|
|
421
421
|
gap: 0.5rem;
|
|
422
422
|
}
|
|
423
|
-
`,xe=s.forwardRef(({},e)=>{const o=M.useTheme();return r.jsxs(me,{ref:e,theme:o,children:[r.jsx("div",{className:"campaign__left-section",children:r.jsx(Z,{theme:o,width:"15rem",height:"15rem",borderRadius:"edged"})}),r.jsxs("div",{className:"campaign__right-section",children:[r.jsxs(fe,{theme:o,children:[r.jsx(L,{heightCoeff:.75,theme:o,width:"35%"}),r.jsx(L,{heightCoeff:1.25,theme:o}),r.jsx(L,{heightCoeff:3,theme:o})]}),r.jsxs("div",{className:"campaign__user",children:[r.jsx(Z,{theme:o,width:"2.5rem",height:"2.5rem",borderRadius:"curved"}),r.jsx(L,{theme:o,width:"75%"})]})]})]})}),we=({itemsCount:e=5,keyPrefix:o})=>r.jsx(r.Fragment,{children:Array.from({length:e},(c,n)=>r.jsx(xe,{},`${o}-skeleton-campaign-card-${n}`))}),be=({children:e,fallbackComponent:o=r.jsx(r.Fragment,{}),isLoading:c=!1,itemsCount:n=5,keyPrefix:m})=>r.jsx(s.Suspense,{fallback:o,children:c===!0?r.jsx(we,{itemsCount:n,keyPrefix:m}):e}),ye=s.memo(Y),ve=s.forwardRef(({sellerType:e="Shop",items:o=[],title:c,isLoading:n,onSelectCard:m=()=>{},onSelectShop:a=()=>{},customScrollSize:d,campaignSingleText:x,salesCampaignTypes:w=[],startsInPrefixTextPlural:
|
|
423
|
+
`,xe=s.forwardRef(({},e)=>{const o=M.useTheme();return r.jsxs(me,{ref:e,theme:o,children:[r.jsx("div",{className:"campaign__left-section",children:r.jsx(Z,{theme:o,width:"15rem",height:"15rem",borderRadius:"edged"})}),r.jsxs("div",{className:"campaign__right-section",children:[r.jsxs(fe,{theme:o,children:[r.jsx(L,{heightCoeff:.75,theme:o,width:"35%"}),r.jsx(L,{heightCoeff:1.25,theme:o}),r.jsx(L,{heightCoeff:3,theme:o})]}),r.jsxs("div",{className:"campaign__user",children:[r.jsx(Z,{theme:o,width:"2.5rem",height:"2.5rem",borderRadius:"curved"}),r.jsx(L,{theme:o,width:"75%"})]})]})]})}),we=({itemsCount:e=5,keyPrefix:o})=>r.jsx(r.Fragment,{children:Array.from({length:e},(c,n)=>r.jsx(xe,{},`${o}-skeleton-campaign-card-${n}`))}),be=({children:e,fallbackComponent:o=r.jsx(r.Fragment,{}),isLoading:c=!1,itemsCount:n=5,keyPrefix:m})=>r.jsx(s.Suspense,{fallback:o,children:c===!0?r.jsx(we,{itemsCount:n,keyPrefix:m}):e}),ye=s.memo(Y),ve=s.forwardRef(({sellerType:e="Shop",items:o=[],title:c,isLoading:n,onSelectCard:m=()=>{},onSelectShop:a=()=>{},customScrollSize:d,campaignSingleText:x,salesCampaignTypes:w=[],startsInPrefixTextPlural:j,startsinSuffixTextPlural:l,startsInPrefixTextSingular:g,startsinSuffixTextSingular:y},b)=>{const f=s.useRef(),h=G.useDetectMobile(),T=s.useMemo(()=>o==null?void 0:o.map((t,$)=>r.jsx(ye,{className:"campaign-item",coverPhoto:t==null?void 0:t.coverPhoto,description:t==null?void 0:t.description,endDate:t==null?void 0:t.endDate,salesPackages:t==null?void 0:t.salesPackages,sellerType:e,shopImage:t==null?void 0:t.profileImage,shopName:t==null?void 0:t.shopName,shopUuid:t==null?void 0:t.shopUuid,startDate:t==null?void 0:t.startDate,title:t==null?void 0:t.name,uuid:t==null?void 0:t.campaignUuid,onSelectCard:()=>m(t==null?void 0:t.campaignUuid,t==null?void 0:t.shopUuid),onSelectShop:()=>a(t==null?void 0:t.shopUuid),campaignSingleText:x,salesCampaignTypes:w,startsInPrefixTextPlural:j,startsinSuffixTextPlural:l,startsInPrefixTextSingular:g,startsinSuffixTextSingular:y,themeData:t==null?void 0:t.themeData},`campaign__item__${$}__${t==null?void 0:t.startDate}___${t==null?void 0:t.endDate}`)),[o]);return r.jsx(r.Fragment,{children:(o==null?void 0:o.length)>0&&r.jsx(ue,{ref:b,className:"row-section-scroll",children:r.jsx(J,{arrowsVisibleOnHover:!1,columnGap:"0",methodsRef:f,mobileHoverScrollButtons:!0,noArrows:!0,padding:"0.25rem 0",rightAlignArrows:!0,scrollBySize:h?window.innerWidth:d>0?d:window.innerWidth,showTimesBtn:!1,title:c,onShowEnd:()=>{},arrowsZIndex:11,children:r.jsx(be,{isLoading:n,itemsCount:2,keyPrefix:"sales-camp",children:T})})})})});module.exports=ve;
|