@lanaco/lnc-react-ui 4.0.130 → 4.0.132
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/BannerSectionCarousel.cjs +12 -8
- package/dist/BannerSectionCarousel.js +14 -10
- package/dist/BlogCardsSponsoredSection.cjs +7 -20
- package/dist/BlogCardsSponsoredSection.js +70 -99
- package/dist/BlogExploreSection.cjs +5 -5
- package/dist/BlogExploreSection.js +198 -192
- package/dist/BlogListSection.cjs +4 -18
- package/dist/BlogListSection.js +70 -93
- package/dist/BlogSingleSection.js +1 -1
- package/dist/BlogsSectionDetailed.cjs +2 -5
- package/dist/BlogsSectionDetailed.js +22 -25
- package/dist/BlogsSectionLarge.js +1 -1
- package/dist/BlogsSectionSimple.cjs +14 -7
- package/dist/BlogsSectionSimple.js +83 -72
- package/dist/DetailedProductsSection.cjs +1 -1
- package/dist/DetailedProductsSection.js +1 -1
- package/dist/UrgentSaleProductsSection.cjs +1 -1
- package/dist/UrgentSaleProductsSection.js +1 -1
- package/dist/{index-EE-IJbC3.js → index-DJ545v7b.js} +1 -7
- package/dist/{suspense-product-card-detailed-Crkoym56.js → suspense-product-card-detailed-BP1opdKD.js} +70 -57
- package/dist/suspense-product-card-detailed-D0jNIBlf.cjs +131 -0
- package/package.json +1 -1
- package/dist/suspense-product-card-detailed-ByW7-U8H.cjs +0 -118
|
@@ -59,6 +59,13 @@
|
|
|
59
59
|
position: relative;
|
|
60
60
|
overflow: hidden;
|
|
61
61
|
|
|
62
|
+
& .section__image {
|
|
63
|
+
width: 100%;
|
|
64
|
+
height: 100%;
|
|
65
|
+
object-fit: cover;
|
|
66
|
+
display: block;
|
|
67
|
+
}
|
|
68
|
+
|
|
62
69
|
& .card__content {
|
|
63
70
|
position: absolute;
|
|
64
71
|
top: 0;
|
|
@@ -111,13 +118,6 @@
|
|
|
111
118
|
}
|
|
112
119
|
}
|
|
113
120
|
|
|
114
|
-
& .section__image {
|
|
115
|
-
width: 100%;
|
|
116
|
-
height: 100%;
|
|
117
|
-
object-fit: cover;
|
|
118
|
-
display: block;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
121
|
@media (max-width: 464px) {
|
|
122
122
|
& .carousel-item {
|
|
123
123
|
padding-right: 0.5rem;
|
|
@@ -127,6 +127,10 @@
|
|
|
127
127
|
height: 23.4375rem;
|
|
128
128
|
border-radius: 0.5rem;
|
|
129
129
|
|
|
130
|
+
& .section__image {
|
|
131
|
+
object-fit: fill;
|
|
132
|
+
}
|
|
133
|
+
|
|
130
134
|
& .card__content {
|
|
131
135
|
display: none;
|
|
132
136
|
}
|
|
@@ -139,4 +143,4 @@
|
|
|
139
143
|
}
|
|
140
144
|
}
|
|
141
145
|
}
|
|
142
|
-
`,pt=x.forwardRef(({items:o=[],onSelectItem:i=()=>{},onButtonAction:t=()=>{}},e)=>{const r={desktop:{breakpoint:{max:3e3,min:1024},items:1,partialVisibilityGutter:0},tablet:{breakpoint:{max:1024,min:464},items:1,partialVisibilityGutter:0},mobile:{breakpoint:{max:464,min:0},items:1,partialVisibilityGutter:64}},a=mt.useDetectMobile();return P.jsx(oe,{ref:e,children:P.jsx(ie,{responsive:r,removeArrowOnDeviceType:"mobile",infinite:!a,keyBoardControl:!0,autoPlay:!0,partialVisible:!0,customTransition:"transform
|
|
146
|
+
`,pt=x.forwardRef(({items:o=[],onSelectItem:i=()=>{},onButtonAction:t=()=>{}},e)=>{const r={desktop:{breakpoint:{max:3e3,min:1024},items:1,partialVisibilityGutter:0},tablet:{breakpoint:{max:1024,min:464},items:1,partialVisibilityGutter:0},mobile:{breakpoint:{max:464,min:0},items:1,partialVisibilityGutter:64}},a=mt.useDetectMobile();return P.jsx(oe,{ref:e,children:P.jsx(ie,{responsive:r,removeArrowOnDeviceType:["tablet","mobile"],infinite:!a,keyBoardControl:!0,autoPlay:!0,partialVisible:!0,customTransition:"transform 500ms ease-in-out",transitionDuration:1e3,sliderClass:"carousel-slider",itemClass:"carousel-item",containerClass:"carousel-container",children:o==null?void 0:o.map((n,s)=>P.jsxs("div",{className:"section__card",onClick:()=>i(n),children:[P.jsx("img",{src:n==null?void 0:n.imageUrl,alt:`Slide ${s+1}`,className:"section__image"}),P.jsxs("div",{className:"card__content",children:[P.jsxs("div",{className:"card__text",children:[(n==null?void 0:n.title)&&P.jsx("div",{className:"card__title",children:n==null?void 0:n.title}),(n==null?void 0:n.title)&&P.jsx("div",{className:"card__description",children:n==null?void 0:n.description})]}),(n==null?void 0:n.buttonText)&&P.jsx(ft,{text:n==null?void 0:n.buttonText,className:"card__action",size:"medium",onClick:l=>{l==null||l.stopPropagation(),t(n)}})]})]},`banner-section-carousel-item__${s+1}`))})},`banner-section-carousel__${a}`)});pt.propTypes={items:z.PropTypes.array,onSelectItem:z.PropTypes.func,onButtonAction:z.PropTypes.func};module.exports=pt;
|
|
@@ -557,6 +557,13 @@ const re = /* @__PURE__ */ mt(oe), ne = yt.div`
|
|
|
557
557
|
position: relative;
|
|
558
558
|
overflow: hidden;
|
|
559
559
|
|
|
560
|
+
& .section__image {
|
|
561
|
+
width: 100%;
|
|
562
|
+
height: 100%;
|
|
563
|
+
object-fit: cover;
|
|
564
|
+
display: block;
|
|
565
|
+
}
|
|
566
|
+
|
|
560
567
|
& .card__content {
|
|
561
568
|
position: absolute;
|
|
562
569
|
top: 0;
|
|
@@ -609,13 +616,6 @@ const re = /* @__PURE__ */ mt(oe), ne = yt.div`
|
|
|
609
616
|
}
|
|
610
617
|
}
|
|
611
618
|
|
|
612
|
-
& .section__image {
|
|
613
|
-
width: 100%;
|
|
614
|
-
height: 100%;
|
|
615
|
-
object-fit: cover;
|
|
616
|
-
display: block;
|
|
617
|
-
}
|
|
618
|
-
|
|
619
619
|
@media (max-width: 464px) {
|
|
620
620
|
& .carousel-item {
|
|
621
621
|
padding-right: 0.5rem;
|
|
@@ -625,6 +625,10 @@ const re = /* @__PURE__ */ mt(oe), ne = yt.div`
|
|
|
625
625
|
height: 23.4375rem;
|
|
626
626
|
border-radius: 0.5rem;
|
|
627
627
|
|
|
628
|
+
& .section__image {
|
|
629
|
+
object-fit: fill;
|
|
630
|
+
}
|
|
631
|
+
|
|
628
632
|
& .card__content {
|
|
629
633
|
display: none;
|
|
630
634
|
}
|
|
@@ -662,13 +666,13 @@ const re = /* @__PURE__ */ mt(oe), ne = yt.div`
|
|
|
662
666
|
re,
|
|
663
667
|
{
|
|
664
668
|
responsive: r,
|
|
665
|
-
removeArrowOnDeviceType: "mobile",
|
|
669
|
+
removeArrowOnDeviceType: ["tablet", "mobile"],
|
|
666
670
|
infinite: !a,
|
|
667
671
|
keyBoardControl: !0,
|
|
668
672
|
autoPlay: !0,
|
|
669
673
|
partialVisible: !0,
|
|
670
|
-
customTransition: "transform
|
|
671
|
-
transitionDuration:
|
|
674
|
+
customTransition: "transform 500ms ease-in-out",
|
|
675
|
+
transitionDuration: 1e3,
|
|
672
676
|
sliderClass: "carousel-slider",
|
|
673
677
|
itemClass: "carousel-item",
|
|
674
678
|
containerClass: "carousel-container",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"use strict";const r=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),c=require("react"),s=require("./utils-DmMdPm9O.cjs"),h=require("./Icon.cjs"),j=require("./style-C_BRvopE.cjs"),N=require("./index-DiIeF_76.cjs"),b=require("./emotion-styled.browser.esm-BtEseadx.cjs"),v=require("./consts-goSZX3xP.cjs"),x=require("./suspense-large-PHdzP1Ln.cjs"),S=require("./Button.cjs"),z=b.styled.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
padding: 1rem;
|
|
4
4
|
align-items: center;
|
|
5
5
|
gap: 1.25rem;
|
|
6
6
|
border-radius: 1.25rem;
|
|
7
7
|
align-items: stretch;
|
|
8
|
-
border: ${
|
|
8
|
+
border: ${t=>t!=null&&t.isSponsored?"2px solid var(--yellow-500, #f59e0b)":"1px solid var(--neutral-9508, rgba(20, 22, 26, 0.08))"};
|
|
9
9
|
background: var(--white, #fff);
|
|
10
10
|
min-height: 10.5rem;
|
|
11
11
|
position: relative;
|
|
@@ -62,26 +62,13 @@
|
|
|
62
62
|
font-weight: 600;
|
|
63
63
|
line-height: 1.5rem;
|
|
64
64
|
letter-spacing: 0.1px;
|
|
65
|
-
${
|
|
65
|
+
${s.truncateTextInRows(2)}
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
& .wrapper__tags {
|
|
69
69
|
display: flex;
|
|
70
70
|
gap: 0.25rem;
|
|
71
|
-
|
|
72
|
-
& .wrapper__tag {
|
|
73
|
-
font-size: 0.75rem;
|
|
74
|
-
font-style: normal;
|
|
75
|
-
font-weight: 500;
|
|
76
|
-
line-height: 1rem;
|
|
77
|
-
letter-spacing: 0.5px;
|
|
78
|
-
padding: 0.125rem 0.5rem;
|
|
79
|
-
justify-content: center;
|
|
80
|
-
align-items: center;
|
|
81
|
-
gap: 0.25rem;
|
|
82
|
-
height: 1.25rem;
|
|
83
|
-
border: 1px solid;
|
|
84
|
-
}
|
|
71
|
+
flex-wrap: wrap;
|
|
85
72
|
}
|
|
86
73
|
}
|
|
87
74
|
|
|
@@ -132,7 +119,7 @@
|
|
|
132
119
|
}
|
|
133
120
|
}
|
|
134
121
|
}
|
|
135
|
-
`,
|
|
122
|
+
`,I=c.forwardRef(({title:t,imageUrl:p,options:i,publishedAt:m,timeToReadText:g="{0} min read",timeToRead:_=0,numberOfLikes:n=0,numberOfComments:l=0,isSponsored:o=!1,onSelectCard:f=()=>{}},w)=>r.jsxs(z,{isSponsored:o,onClick:f,children:[o&&r.jsx("div",{className:"wrapper__sponsored",children:r.jsx(h,{icon:" mng-lnc-paw",sizeInUnits:"1.5rem"})}),r.jsx(N.ProductImageWrapper,{src:p,className:"wrapper__image"}),r.jsxs("div",{className:"wrapper__content",children:[r.jsxs("div",{className:"wrapper__subcontent",children:[r.jsx("div",{className:"wrapper__title",children:t}),r.jsx("div",{className:"wrapper__tags",children:i&&(i==null?void 0:i.map((a,u)=>r.jsx(j.BlogTag,{color:a==null?void 0:a.color,children:a==null?void 0:a.name},u)))})]}),r.jsxs("div",{className:"wrapper__info",children:[r.jsx("div",{className:"info__text",children:`${s.formatLocaleDateString(m)} • ${s.formatString(g,_)}`}),r.jsxs("div",{className:"info__text",children:[r.jsxs("div",{children:[r.jsx(h,{icon:" mng-lnc-thumbs-up--filled",sizeInUnits:"1rem"}),s.getRoundedNumber(n)]}),r.jsxs("div",{children:[r.jsx(h,{icon:" mng-lnc-messages-filled",sizeInUnits:"1rem"}),s.getRoundedNumber(l)]})]})]})]})]})),R=b.styled.div`
|
|
136
123
|
display: flex;
|
|
137
124
|
flex-direction: column;
|
|
138
125
|
align-items: flex-start;
|
|
@@ -150,7 +137,7 @@
|
|
|
150
137
|
|
|
151
138
|
& .title__text {
|
|
152
139
|
color: var(--gray-950, #14161a);
|
|
153
|
-
${
|
|
140
|
+
${s.truncateTextInRows(2)}
|
|
154
141
|
|
|
155
142
|
font-size: 1.5rem;
|
|
156
143
|
font-style: normal;
|
|
@@ -214,4 +201,4 @@
|
|
|
214
201
|
gap: 1rem;
|
|
215
202
|
}
|
|
216
203
|
}
|
|
217
|
-
`,
|
|
204
|
+
`,q=c.memo(I),k=c.forwardRef(({title:t,subtitle:p,icon:i,buttonText:m,buttonLink:g,timeToReadText:_="{0} min read",items:n,onButtonAction:l=()=>{},onSelectCard:o=()=>{},isLoading:f=!1,getImage:w=()=>{}},a)=>{const u=c.useMemo(()=>{var d;return(d=n==null?void 0:n.slice(0,4))==null?void 0:d.map((e,y)=>r.jsx(q,{title:e==null?void 0:e.title,titleSlug:e==null?void 0:e.titleSlug,options:e==null?void 0:e.options,publishedAt:e==null?void 0:e.publishedAt,timeToReadText:_,timeToRead:e==null?void 0:e.timeToRead,numberOfLikes:e==null?void 0:e.numberOfLikes,numberOfComments:e==null?void 0:e.numberOfComments,isSponsored:e==null?void 0:e.isSponsored,onSelectCard:()=>o==null?void 0:o(e),imageUrl:w(e==null?void 0:e.imageUrl,e==null?void 0:e.uuid)||null},`blog-card-sponsored__${y+1}`))},[n]);return r.jsxs(R,{children:[r.jsxs("div",{className:"wrapper__heading",children:[r.jsxs("div",{className:"wrapper__title",children:[t&&r.jsxs("div",{className:"title__text",children:[s.isDefinedNotEmptyString(i)&&r.jsx("i",{className:i}),r.jsx("span",{children:t})]}),l&&r.jsx(S,{text:m,borderRadius:"curved",btnType:"tinted",className:"title__action",color:"neutral",onClick:d=>{var e;(e=d==null?void 0:d.target)==null||e.blur(),l==null||l(g)}})]}),p&&r.jsx("div",{className:"wrapper__subtitle",children:p})]}),r.jsx("div",{className:"wrapper__cards",children:r.jsx(x.SuspenseBlogLarge,{isLoading:f,limit:4,keyPrefix:"blog-section",children:u})})]})});module.exports=k;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { jsxs as a, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { p as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { P } from "./index-3TFXgZHA.js";
|
|
7
|
-
import { s as
|
|
8
|
-
import { M as
|
|
9
|
-
import { S as
|
|
10
|
-
import
|
|
11
|
-
const
|
|
2
|
+
import { forwardRef as b, memo as S, useMemo as k } from "react";
|
|
3
|
+
import { p as v, s as $, v as j, w as u, k as I } from "./utils-BPdU4_1q.js";
|
|
4
|
+
import h from "./Icon.js";
|
|
5
|
+
import { B as R } from "./style-XXDQBreL.js";
|
|
6
|
+
import { P as L } from "./index-3TFXgZHA.js";
|
|
7
|
+
import { s as y } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
8
|
+
import { M as N } from "./consts-BuFChS64.js";
|
|
9
|
+
import { S as O } from "./suspense-large-DrD8xVZi.js";
|
|
10
|
+
import T from "./Button.js";
|
|
11
|
+
const U = y.div`
|
|
12
12
|
display: flex;
|
|
13
13
|
padding: 1rem;
|
|
14
14
|
align-items: center;
|
|
15
15
|
gap: 1.25rem;
|
|
16
16
|
border-radius: 1.25rem;
|
|
17
17
|
align-items: stretch;
|
|
18
|
-
border: ${(
|
|
18
|
+
border: ${(i) => i != null && i.isSponsored ? "2px solid var(--yellow-500, #f59e0b)" : "1px solid var(--neutral-9508, rgba(20, 22, 26, 0.08))"};
|
|
19
19
|
background: var(--white, #fff);
|
|
20
20
|
min-height: 10.5rem;
|
|
21
21
|
position: relative;
|
|
@@ -72,26 +72,13 @@ const T = N.div`
|
|
|
72
72
|
font-weight: 600;
|
|
73
73
|
line-height: 1.5rem;
|
|
74
74
|
letter-spacing: 0.1px;
|
|
75
|
-
${
|
|
75
|
+
${v(2)}
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
& .wrapper__tags {
|
|
79
79
|
display: flex;
|
|
80
80
|
gap: 0.25rem;
|
|
81
|
-
|
|
82
|
-
& .wrapper__tag {
|
|
83
|
-
font-size: 0.75rem;
|
|
84
|
-
font-style: normal;
|
|
85
|
-
font-weight: 500;
|
|
86
|
-
line-height: 1rem;
|
|
87
|
-
letter-spacing: 0.5px;
|
|
88
|
-
padding: 0.125rem 0.5rem;
|
|
89
|
-
justify-content: center;
|
|
90
|
-
align-items: center;
|
|
91
|
-
gap: 0.25rem;
|
|
92
|
-
height: 1.25rem;
|
|
93
|
-
border: 1px solid;
|
|
94
|
-
}
|
|
81
|
+
flex-wrap: wrap;
|
|
95
82
|
}
|
|
96
83
|
}
|
|
97
84
|
|
|
@@ -117,7 +104,7 @@ const T = N.div`
|
|
|
117
104
|
}
|
|
118
105
|
}
|
|
119
106
|
|
|
120
|
-
@media (max-width: ${
|
|
107
|
+
@media (max-width: ${N + "px"}) {
|
|
121
108
|
flex-direction: column;
|
|
122
109
|
padding: 0;
|
|
123
110
|
|
|
@@ -142,58 +129,45 @@ const T = N.div`
|
|
|
142
129
|
}
|
|
143
130
|
}
|
|
144
131
|
}
|
|
145
|
-
`,
|
|
132
|
+
`, B = b(
|
|
146
133
|
({
|
|
147
|
-
title:
|
|
148
|
-
imageUrl:
|
|
149
|
-
options:
|
|
150
|
-
publishedAt:
|
|
151
|
-
timeToReadText:
|
|
152
|
-
timeToRead:
|
|
134
|
+
title: i,
|
|
135
|
+
imageUrl: m,
|
|
136
|
+
options: t,
|
|
137
|
+
publishedAt: d,
|
|
138
|
+
timeToReadText: c = "{0} min read",
|
|
139
|
+
timeToRead: g = 0,
|
|
153
140
|
numberOfLikes: n = 0,
|
|
154
|
-
numberOfComments:
|
|
141
|
+
numberOfComments: s = 0,
|
|
155
142
|
isSponsored: o = !1,
|
|
156
|
-
onSelectCard:
|
|
157
|
-
},
|
|
158
|
-
onSelectOption: _ = () => {
|
|
143
|
+
onSelectCard: f = () => {
|
|
159
144
|
}
|
|
160
|
-
},
|
|
161
|
-
o && /* @__PURE__ */ r("div", { className: "wrapper__sponsored", children: /* @__PURE__ */ r(
|
|
162
|
-
/* @__PURE__ */ r(
|
|
145
|
+
}, w) => /* @__PURE__ */ a(U, { isSponsored: o, onClick: f, children: [
|
|
146
|
+
o && /* @__PURE__ */ r("div", { className: "wrapper__sponsored", children: /* @__PURE__ */ r(h, { icon: " mng-lnc-paw", sizeInUnits: "1.5rem" }) }),
|
|
147
|
+
/* @__PURE__ */ r(L, { src: m, className: "wrapper__image" }),
|
|
163
148
|
/* @__PURE__ */ a("div", { className: "wrapper__content", children: [
|
|
164
149
|
/* @__PURE__ */ a("div", { className: "wrapper__subcontent", children: [
|
|
165
|
-
/* @__PURE__ */ r("div", { className: "wrapper__title", children:
|
|
166
|
-
/* @__PURE__ */ r("div", { className: "wrapper__tags", children:
|
|
167
|
-
L,
|
|
168
|
-
{
|
|
169
|
-
label: i == null ? void 0 : i.name,
|
|
170
|
-
color: i == null ? void 0 : i.color,
|
|
171
|
-
className: "wrapper__tag",
|
|
172
|
-
onClick: (t) => {
|
|
173
|
-
t == null || t.stopPropagation(), _(i == null ? void 0 : i.code);
|
|
174
|
-
}
|
|
175
|
-
},
|
|
176
|
-
`blog-card-sponsored-option__${h + 1}`
|
|
177
|
-
))) })
|
|
150
|
+
/* @__PURE__ */ r("div", { className: "wrapper__title", children: i }),
|
|
151
|
+
/* @__PURE__ */ r("div", { className: "wrapper__tags", children: t && (t == null ? void 0 : t.map((l, _) => /* @__PURE__ */ r(R, { color: l == null ? void 0 : l.color, children: l == null ? void 0 : l.name }, _))) })
|
|
178
152
|
] }),
|
|
179
153
|
/* @__PURE__ */ a("div", { className: "wrapper__info", children: [
|
|
180
|
-
/* @__PURE__ */ r("div", { className: "info__text", children: `${
|
|
181
|
-
|
|
182
|
-
)} • ${
|
|
154
|
+
/* @__PURE__ */ r("div", { className: "info__text", children: `${$(
|
|
155
|
+
d
|
|
156
|
+
)} • ${j(c, g)}` }),
|
|
183
157
|
/* @__PURE__ */ a("div", { className: "info__text", children: [
|
|
184
158
|
/* @__PURE__ */ a("div", { children: [
|
|
185
|
-
/* @__PURE__ */ r(
|
|
186
|
-
|
|
159
|
+
/* @__PURE__ */ r(h, { icon: " mng-lnc-thumbs-up--filled", sizeInUnits: "1rem" }),
|
|
160
|
+
u(n)
|
|
187
161
|
] }),
|
|
188
162
|
/* @__PURE__ */ a("div", { children: [
|
|
189
|
-
/* @__PURE__ */ r(
|
|
190
|
-
|
|
163
|
+
/* @__PURE__ */ r(h, { icon: " mng-lnc-messages-filled", sizeInUnits: "1rem" }),
|
|
164
|
+
u(s)
|
|
191
165
|
] })
|
|
192
166
|
] })
|
|
193
167
|
] })
|
|
194
168
|
] })
|
|
195
169
|
] })
|
|
196
|
-
),
|
|
170
|
+
), C = y.div`
|
|
197
171
|
display: flex;
|
|
198
172
|
flex-direction: column;
|
|
199
173
|
align-items: flex-start;
|
|
@@ -211,7 +185,7 @@ const T = N.div`
|
|
|
211
185
|
|
|
212
186
|
& .title__text {
|
|
213
187
|
color: var(--gray-950, #14161a);
|
|
214
|
-
${
|
|
188
|
+
${v(2)}
|
|
215
189
|
|
|
216
190
|
font-size: 1.5rem;
|
|
217
191
|
font-style: normal;
|
|
@@ -263,7 +237,7 @@ const T = N.div`
|
|
|
263
237
|
width: 100%;
|
|
264
238
|
}
|
|
265
239
|
|
|
266
|
-
@media (max-width: ${
|
|
240
|
+
@media (max-width: ${N + "px"}) {
|
|
267
241
|
& .wrapper__title {
|
|
268
242
|
& .title__text {
|
|
269
243
|
font-size: 1.375rem;
|
|
@@ -275,82 +249,79 @@ const T = N.div`
|
|
|
275
249
|
gap: 1rem;
|
|
276
250
|
}
|
|
277
251
|
}
|
|
278
|
-
`,
|
|
252
|
+
`, M = S(B), J = b(
|
|
279
253
|
({
|
|
280
|
-
title:
|
|
281
|
-
subtitle:
|
|
282
|
-
icon:
|
|
283
|
-
buttonText:
|
|
284
|
-
buttonLink:
|
|
285
|
-
timeToReadText:
|
|
254
|
+
title: i,
|
|
255
|
+
subtitle: m,
|
|
256
|
+
icon: t,
|
|
257
|
+
buttonText: d,
|
|
258
|
+
buttonLink: c,
|
|
259
|
+
timeToReadText: g = "{0} min read",
|
|
286
260
|
items: n,
|
|
287
|
-
onButtonAction:
|
|
261
|
+
onButtonAction: s = () => {
|
|
288
262
|
},
|
|
289
263
|
onSelectCard: o = () => {
|
|
290
264
|
},
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
isLoading: _ = !1,
|
|
294
|
-
getImage: u = () => {
|
|
265
|
+
isLoading: f = !1,
|
|
266
|
+
getImage: w = () => {
|
|
295
267
|
}
|
|
296
|
-
},
|
|
297
|
-
const
|
|
298
|
-
var
|
|
299
|
-
return (
|
|
300
|
-
|
|
268
|
+
}, l) => {
|
|
269
|
+
const _ = k(() => {
|
|
270
|
+
var p;
|
|
271
|
+
return (p = n == null ? void 0 : n.slice(0, 4)) == null ? void 0 : p.map((e, z) => /* @__PURE__ */ r(
|
|
272
|
+
M,
|
|
301
273
|
{
|
|
302
274
|
title: e == null ? void 0 : e.title,
|
|
303
275
|
titleSlug: e == null ? void 0 : e.titleSlug,
|
|
304
276
|
options: e == null ? void 0 : e.options,
|
|
305
277
|
publishedAt: e == null ? void 0 : e.publishedAt,
|
|
306
|
-
timeToReadText:
|
|
278
|
+
timeToReadText: g,
|
|
307
279
|
timeToRead: e == null ? void 0 : e.timeToRead,
|
|
308
280
|
numberOfLikes: e == null ? void 0 : e.numberOfLikes,
|
|
309
281
|
numberOfComments: e == null ? void 0 : e.numberOfComments,
|
|
310
282
|
isSponsored: e == null ? void 0 : e.isSponsored,
|
|
311
283
|
onSelectCard: () => o == null ? void 0 : o(e),
|
|
312
|
-
|
|
313
|
-
imageUrl: u(e == null ? void 0 : e.imageUrl, e == null ? void 0 : e.uuid) || null
|
|
284
|
+
imageUrl: w(e == null ? void 0 : e.imageUrl, e == null ? void 0 : e.uuid) || null
|
|
314
285
|
},
|
|
315
|
-
`blog-card-sponsored__${
|
|
286
|
+
`blog-card-sponsored__${z + 1}`
|
|
316
287
|
));
|
|
317
288
|
}, [n]);
|
|
318
|
-
return /* @__PURE__ */ a(
|
|
289
|
+
return /* @__PURE__ */ a(C, { children: [
|
|
319
290
|
/* @__PURE__ */ a("div", { className: "wrapper__heading", children: [
|
|
320
291
|
/* @__PURE__ */ a("div", { className: "wrapper__title", children: [
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
/* @__PURE__ */ r("span", { children:
|
|
292
|
+
i && /* @__PURE__ */ a("div", { className: "title__text", children: [
|
|
293
|
+
I(t) && /* @__PURE__ */ r("i", { className: t }),
|
|
294
|
+
/* @__PURE__ */ r("span", { children: i })
|
|
324
295
|
] }),
|
|
325
|
-
|
|
326
|
-
|
|
296
|
+
s && /* @__PURE__ */ r(
|
|
297
|
+
T,
|
|
327
298
|
{
|
|
328
|
-
text:
|
|
299
|
+
text: d,
|
|
329
300
|
borderRadius: "curved",
|
|
330
301
|
btnType: "tinted",
|
|
331
302
|
className: "title__action",
|
|
332
303
|
color: "neutral",
|
|
333
|
-
onClick: (
|
|
304
|
+
onClick: (p) => {
|
|
334
305
|
var e;
|
|
335
|
-
(e =
|
|
306
|
+
(e = p == null ? void 0 : p.target) == null || e.blur(), s == null || s(c);
|
|
336
307
|
}
|
|
337
308
|
}
|
|
338
309
|
)
|
|
339
310
|
] }),
|
|
340
|
-
|
|
311
|
+
m && /* @__PURE__ */ r("div", { className: "wrapper__subtitle", children: m })
|
|
341
312
|
] }),
|
|
342
313
|
/* @__PURE__ */ r("div", { className: "wrapper__cards", children: /* @__PURE__ */ r(
|
|
343
|
-
|
|
314
|
+
O,
|
|
344
315
|
{
|
|
345
|
-
isLoading:
|
|
316
|
+
isLoading: f,
|
|
346
317
|
limit: 4,
|
|
347
318
|
keyPrefix: "blog-section",
|
|
348
|
-
children:
|
|
319
|
+
children: _
|
|
349
320
|
}
|
|
350
321
|
) })
|
|
351
322
|
] });
|
|
352
323
|
}
|
|
353
324
|
);
|
|
354
325
|
export {
|
|
355
|
-
|
|
326
|
+
J as default
|
|
356
327
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),q=require("react"),n=require("./index-BpbMKBf_.cjs"),
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),q=require("react"),n=require("./index-BpbMKBf_.cjs"),I=require("./utils-DmMdPm9O.cjs"),J=require("./TextInput.cjs"),j=require("./Icon.cjs"),K=require("./Link.cjs"),z=require("./DropdownMenu.cjs"),$=require("./DropdownItem.cjs"),Q=require("./tag-Bov1gw34.cjs"),Y=require("./BlogProductCardsSection.cjs"),L=require("./emotion-styled.browser.esm-BtEseadx.cjs"),B=require("./index-DiIeF_76.cjs"),C=require("./BlogListSection.cjs"),O=require("./consts-goSZX3xP.cjs"),ee=L.styled.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
justify-content: space-between;
|
|
4
4
|
align-items: center;
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
-
`,
|
|
82
|
+
`,ne=q.forwardRef(({perPageOptions:o=[{code:10,name:"Show 10 items"},{code:25,name:"Show 25 items"},{code:50,name:"Show 50 items"}],perPage:m,handlePerPage:h=()=>{},page:s=1,handlePage:c=()=>{},totalPage:r},d)=>{var _,l;const p=()=>{s>1&&(c==null||c(s-1))},u=()=>{s<r&&(c==null||c(s+1))},g=()=>{const i=[];if(r<=7)for(let a=1;a<=r;a++)i.push(a);else s<=3?i.push(1,2,3,"...",r):s>=r-2?i.push(1,"...",r-2,r-1,r):i.push(1,2,3,"...",r);return i==null?void 0:i.map((a,f)=>a==="..."?e.jsx("div",{className:"pagination__page ellipsis",children:a},`pagination-ellipsis__${f}`):e.jsx("div",{onClick:()=>c(a),className:`pagination__page ${s===a?"active":""}`,children:a},`pagination-page__${f}`))};return e.jsxs(ee,{className:"pagination",children:[e.jsx(z,{color:"neutral",control:((_=o==null?void 0:o.find(i=>(i==null?void 0:i.code)===m))==null?void 0:_.name)||((l=o[0])==null?void 0:l.name),placement:"bottom",zIndex:1001,className:"pagination__per-page",children:o==null?void 0:o.map((i,a)=>e.jsx($,{active:(i==null?void 0:i.code)===(m==null?void 0:m.code),className:"sort-by__item",onClick:()=>h(i),children:i==null?void 0:i.name},`blog-epxlore-section-per-page-option__${a+1}`))}),e.jsxs("div",{className:"pagination__pages",children:[e.jsx("div",{className:`pagination__page ${s===1?"disabled":""}`,onClick:p,children:e.jsx(j,{icon:" mng-lnc-chevron--left"})}),g(),e.jsx("div",{className:`pagination__page ${s===r?"disabled":""}`,onClick:u,children:e.jsx(j,{icon:" mng-lnc-chevron--right"})})]})]})}),re=L.styled.div`
|
|
83
83
|
display: flex;
|
|
84
84
|
align-items: flex-start;
|
|
85
85
|
gap: 2rem;
|
|
@@ -255,7 +255,7 @@
|
|
|
255
255
|
font-style: normal;
|
|
256
256
|
font-weight: 500;
|
|
257
257
|
line-height: 1.25rem;
|
|
258
|
-
${
|
|
258
|
+
${I.truncateTextInRows(2)}
|
|
259
259
|
}
|
|
260
260
|
|
|
261
261
|
& .item__description {
|
|
@@ -270,7 +270,7 @@
|
|
|
270
270
|
}
|
|
271
271
|
}
|
|
272
272
|
|
|
273
|
-
@media (max-width: ${
|
|
273
|
+
@media (max-width: ${O.MOBILE_SIZE_PX+"px"}) {
|
|
274
274
|
flex-direction: column;
|
|
275
275
|
|
|
276
276
|
& .landing__main-content {
|
|
@@ -317,4 +317,4 @@
|
|
|
317
317
|
display: none;
|
|
318
318
|
}
|
|
319
319
|
}
|
|
320
|
-
`,
|
|
320
|
+
`,P=q.forwardRef(({mainTitle:o,sideTitle:m,tags:h,selectedTag:s,handleSelectTag:c=()=>{},blogs:r,miniBlogs:d,products:p,blogsLoading:u=!1,productsLoading:g=!1,sortingOptions:_,sortBy:l,handleSortBy:i=()=>{},allTagText:a="All",searchPlaceholderText:f="Search blogs",timeToReadText:b="{0} min read",getBlogImageUrl:y=()=>{},handleSelectBlog:v=()=>{},handleSelectBlogTag:N=()=>{},handleShareBlog:k=()=>{},handleBookmarkBlog:S=()=>{},showAllButtonLink:A,showAllButtonText:R="Show all products",viewAllButtonText:E="View all (11)",viewAllButtonLink:te,handleViewAll:D=()=>{},handleShowAll:M=()=>{},handleSelectProduct:F=()=>{},getProductImageUrl:U=()=>{},page:V,handlePage:T=()=>{},perPage:H,handlePerPage:W=()=>{},totalPage:w,perPageOptions:X,handleSearch:Z=()=>{}},ie)=>{const G=t=>{document.getElementById("landing__container").scrollIntoView({behavior:"smooth",block:"start"}),T==null||T(t)};return e.jsxs(re,{id:"landing__container",children:[e.jsxs("div",{className:"landing__main-content",children:[o&&e.jsx("div",{className:"main-content__title",children:o}),h&&e.jsx(Q.FaqSectionTags,{tags:h,allTagText:a,selectedTagCode:s,onSelectTag:c}),e.jsxs("div",{className:"main-content__actions",children:[e.jsx(J,{className:"main-content__search",placeholder:f,debounceTime:200,prefix:e.jsx(j,{icon:" mng-lnc-search",sizeInUnits:"1.25rem",className:"main-content__search-prefix"}),color:"neutral",onChange:Z}),e.jsx(z,{color:"neutral",control:l==null?void 0:l.name,zIndex:1001,className:"main-content__sort-by",children:_==null?void 0:_.map((t,x)=>e.jsx($,{active:(t==null?void 0:t.code)===(l==null?void 0:l.code),className:"sort-by__item",onClick:()=>i(t),children:t==null?void 0:t.name},`blog-epxlore-section-sorting-option__${x+1}`))})]}),e.jsxs("div",{className:"main-content__items",children:[r&&(r==null?void 0:r.length)>0&&e.jsx(C,{timeToReadText:b,items:r==null?void 0:r.slice(0,5),isLoading:u,getImage:y,onSelectCard:v,onSelectOption:N,onShare:k,onBookmark:S}),e.jsx("div",{className:"main-content__divider"}),p&&(p==null?void 0:p.length)>0&&e.jsx(Y,{buttonText:R,buttonLink:A,onButtonAction:M,onSelectCard:F,items:p,isLoading:g,getImage:U,isHighlight:!0}),e.jsx("div",{className:"main-content__divider"}),r&&(r==null?void 0:r.length)>0&&e.jsx(C,{timeToReadText:b,items:r==null?void 0:r.slice(5),isLoading:u,getImage:y,onSelectCard:v,onSelectOption:N,onShare:k,onBookmark:S})]}),w&&w>1&&e.jsx(ne,{perPageOptions:X,perPage:H,handlePerPage:W,page:V,handlePage:G,totalPage:w})]}),e.jsxs("div",{className:"landing__side-content",children:[m&&e.jsx("div",{className:"side-content__title",children:m}),d&&(d==null?void 0:d.length)>0&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"side-content__items",children:d==null?void 0:d.map((t,x)=>e.jsxs("div",{className:"side-content__item",onClick:()=>v(t),children:[e.jsx(B.ProductImageWrapper,{src:y(t==null?void 0:t.imageUrl,t==null?void 0:t.uuid)||null,alt:`Mini blog ${x+1}`,className:"item__image"}),e.jsxs("div",{className:"item__content",children:[e.jsx("div",{className:"item__title",children:t==null?void 0:t.title}),e.jsx("div",{className:"item__description",children:I.formatLocaleDateString(t==null?void 0:t.publishedAt)})]})]}))}),e.jsx(K,{onClick:D,className:"side-content__link",children:E})]})]})]})});P.propTypes={mainTitle:n.PropTypes.string,sideTitle:n.PropTypes.string,tags:n.PropTypes.array,selectedTag:n.PropTypes.any,handleSelectTag:n.PropTypes.func,blogs:n.PropTypes.array,miniBlogs:n.PropTypes.array,products:n.PropTypes.array,blogsLoading:n.PropTypes.bool,productsLoading:n.PropTypes.bool,sortingOptions:n.PropTypes.array,sortBy:n.PropTypes.any,handleSortBy:n.PropTypes.func,allTagText:n.PropTypes.string,searchPlaceholderText:n.PropTypes.string,timeToReadText:n.PropTypes.string,getBlogImageUrl:n.PropTypes.func,handleSelectBlog:n.PropTypes.func,handleSelectBlogTag:n.PropTypes.func,handleShareBlog:n.PropTypes.func,handleBookmarkBlog:n.PropTypes.func,showAllButtonLink:n.PropTypes.string,showAllButtonText:n.PropTypes.string,viewAllButtonText:n.PropTypes.string,handleShowAll:n.PropTypes.func,handleSelectProduct:n.PropTypes.func,getProductImageUrl:n.PropTypes.func,page:n.PropTypes.number,handlePage:n.PropTypes.func,perPage:n.PropTypes.any,handlePerPage:n.PropTypes.func,totalPage:n.PropTypes.number,perPageOptions:n.PropTypes.array,handleSearch:n.PropTypes.func};module.exports=P;
|