@lanaco/lnc-react-ui 4.0.186 → 4.0.189
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 +4 -4
- package/dist/BannerSectionCarousel.js +150 -158
- package/dist/BlogCardsSponsoredSection.cjs +5 -5
- package/dist/BlogCardsSponsoredSection.js +55 -51
- package/dist/BlogCategoryCardsSection.cjs +1 -1
- package/dist/BlogCategoryCardsSection.js +1 -1
- package/dist/BlogExploreSection.cjs +5 -5
- package/dist/BlogExploreSection.js +182 -215
- package/dist/BlogListSection.cjs +6 -6
- package/dist/BlogListSection.js +134 -116
- package/dist/BlogProductCardsSection.cjs +1 -1
- package/dist/BlogProductCardsSection.js +26 -24
- package/dist/BlogShopCardsSection.cjs +1 -1
- package/dist/BlogShopCardsSection.js +1 -1
- package/dist/BlogSingleSection.cjs +3 -3
- package/dist/BlogSingleSection.js +21 -19
- package/dist/BlogsSectionDetailed.cjs +4 -4
- package/dist/BlogsSectionDetailed.js +81 -76
- package/dist/BlogsSectionLarge.cjs +6 -6
- package/dist/BlogsSectionLarge.js +34 -31
- package/dist/BlogsSectionSimple.cjs +8 -8
- package/dist/BlogsSectionSimple.js +68 -63
- package/dist/BlogsSectionSimpleCentered.cjs +9 -9
- package/dist/BlogsSectionSimpleCentered.js +67 -54
- package/dist/BlogsSectionWithFilters.cjs +9 -9
- package/dist/BlogsSectionWithFilters.js +98 -84
- package/dist/BrandHitsSection.cjs +7 -7
- package/dist/BrandHitsSection.js +50 -32
- package/dist/{CategorySimpleCard-DRQuoxXu.js → CategorySimpleCard-CEzArySG.js} +18 -17
- package/dist/{CategorySimpleCard-D5N8cx0Z.cjs → CategorySimpleCard-COGlTj06.cjs} +5 -5
- package/dist/DetailedProductsInfinitiveSection.cjs +4 -4
- package/dist/DetailedProductsInfinitiveSection.js +23 -21
- package/dist/DetailedProductsSection.cjs +3 -3
- package/dist/DetailedProductsSection.js +38 -35
- package/dist/FieldOfInterestsMasonrySection.cjs +12 -12
- package/dist/FieldOfInterestsMasonrySection.js +87 -83
- package/dist/FieldOfInterestsWithAvatarsCardsSection.cjs +7 -7
- package/dist/FieldOfInterestsWithAvatarsCardsSection.js +47 -43
- package/dist/FieldOfInterestsWithTagsCardsSection.cjs +6 -6
- package/dist/FieldOfInterestsWithTagsCardsSection.js +87 -62
- package/dist/GeneralWithTagsCardsSection.cjs +4 -4
- package/dist/GeneralWithTagsCardsSection.js +83 -46
- package/dist/GiftCardsSection.cjs +7 -7
- package/dist/GiftCardsSection.js +56 -47
- package/dist/MasonryGeneralCardsSection.cjs +9 -9
- package/dist/MasonryGeneralCardsSection.js +82 -68
- package/dist/OverlayGeneralCardsSection.cjs +5 -5
- package/dist/OverlayGeneralCardsSection.js +58 -50
- package/dist/ProductsWithBannerSection.cjs +10 -10
- package/dist/ProductsWithBannerSection.js +79 -70
- package/dist/QuattroCardsSection.cjs +8 -8
- package/dist/QuattroCardsSection.js +62 -40
- package/dist/ReviewsSection.cjs +8 -8
- package/dist/ReviewsSection.js +92 -67
- package/dist/SalesCampaignsSection.cjs +18 -18
- package/dist/SalesCampaignsSection.js +304 -298
- package/dist/ShopCardsSection.cjs +3 -3
- package/dist/ShopCardsSection.js +25 -23
- package/dist/SimpleCategoriesSection.cjs +4 -4
- package/dist/SimpleCategoriesSection.js +25 -22
- package/dist/SimpleProductsSection.cjs +3 -3
- package/dist/SimpleProductsSection.js +53 -50
- package/dist/UrgentSaleProductsSection.cjs +4 -4
- package/dist/UrgentSaleProductsSection.js +41 -38
- package/dist/{index-CA59z2ge.js → index-9inVkeN6.js} +46 -40
- package/dist/{index-C8QkdNHi.js → index-BB63Jo6p.js} +42 -36
- package/dist/{index-DHV9awrE.cjs → index-BFc3nxYZ.cjs} +3 -3
- package/dist/{index-MiN854X_.cjs → index-BWE-RCPy.cjs} +6 -6
- package/dist/index-Coo0aVuh.cjs +362 -0
- package/dist/{index-BipuzfLW.js → index-DMHtIdm-.js} +39 -29
- package/dist/{index-0p_3g3pT.cjs → index-D_5jNP-o.cjs} +3 -3
- package/dist/{index-DZ8515cZ.js → index-PhMLWAC1.js} +277 -172
- package/package.json +1 -1
- package/dist/index-Bmr3IeZ_.cjs +0 -308
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsxs as a, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { o as
|
|
4
|
-
import
|
|
5
|
-
import { B as
|
|
6
|
-
import { P as
|
|
7
|
-
import { s as
|
|
8
|
-
import { M as
|
|
9
|
-
import
|
|
10
|
-
import { S as
|
|
11
|
-
const
|
|
2
|
+
import { forwardRef as z, useRef as I, memo as R, useMemo as B } from "react";
|
|
3
|
+
import { o as S, q as C, s as O, v as N, k as b } from "./utils-Dc5zIpaz.js";
|
|
4
|
+
import v from "./Icon.js";
|
|
5
|
+
import { B as U } from "./style-C7FUSHmS.js";
|
|
6
|
+
import { P as M } from "./index-C_NnINik.js";
|
|
7
|
+
import { s as $ } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
8
|
+
import { M as k } from "./consts-BuFChS64.js";
|
|
9
|
+
import P from "./Button.js";
|
|
10
|
+
import { S as T } from "./index-BSpdEGFd.js";
|
|
11
|
+
const E = $.a`
|
|
12
12
|
text-decoration: none;
|
|
13
13
|
color: var(--gray-950);
|
|
14
14
|
display: flex;
|
|
@@ -75,7 +75,7 @@ const T = S.a`
|
|
|
75
75
|
font-weight: 600;
|
|
76
76
|
line-height: 1.5rem;
|
|
77
77
|
letter-spacing: 0.1px;
|
|
78
|
-
${
|
|
78
|
+
${S(2)}
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
& .wrapper__tags {
|
|
@@ -107,7 +107,7 @@ const T = S.a`
|
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
@media (max-width: ${
|
|
110
|
+
@media (max-width: ${k + "px"}) {
|
|
111
111
|
flex-direction: column;
|
|
112
112
|
padding: 0;
|
|
113
113
|
|
|
@@ -133,52 +133,54 @@ const T = S.a`
|
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
|
-
`,
|
|
136
|
+
`, W = z(
|
|
137
137
|
({
|
|
138
138
|
title: t,
|
|
139
139
|
imageUrl: m,
|
|
140
140
|
options: s,
|
|
141
141
|
publishedAt: d,
|
|
142
142
|
timeToReadText: c = "{0} min read",
|
|
143
|
-
timeToRead:
|
|
143
|
+
timeToRead: h = 0,
|
|
144
144
|
numberOfLikes: n = 0,
|
|
145
145
|
numberOfComments: p = 0,
|
|
146
146
|
isSponsored: l = !1,
|
|
147
147
|
onSelectCard: f = () => {
|
|
148
148
|
},
|
|
149
149
|
metadata: o,
|
|
150
|
-
titleSlug:
|
|
151
|
-
|
|
152
|
-
|
|
150
|
+
titleSlug: g,
|
|
151
|
+
LinkComponent: _
|
|
152
|
+
}, y) => {
|
|
153
|
+
const w = _ || "a", i = I();
|
|
153
154
|
return /* @__PURE__ */ a(
|
|
154
|
-
|
|
155
|
+
E,
|
|
155
156
|
{
|
|
156
|
-
ref:
|
|
157
|
+
ref: i,
|
|
157
158
|
isSponsored: l,
|
|
158
159
|
"data-accessor": o == null ? void 0 : o.accessor,
|
|
159
160
|
name: o == null ? void 0 : o.name,
|
|
160
|
-
onClick: (
|
|
161
|
-
|
|
161
|
+
onClick: (e) => f(e, i),
|
|
162
|
+
as: w,
|
|
163
|
+
..._ ? { to: `/blog/${g}` } : { href: `/blog/${g}` },
|
|
162
164
|
children: [
|
|
163
|
-
l && /* @__PURE__ */ r("div", { className: "wrapper__sponsored", children: /* @__PURE__ */ r(
|
|
164
|
-
/* @__PURE__ */ r(
|
|
165
|
+
l && /* @__PURE__ */ r("div", { className: "wrapper__sponsored", children: /* @__PURE__ */ r(v, { icon: " mng-lnc-paw", sizeInUnits: "1.5rem" }) }),
|
|
166
|
+
/* @__PURE__ */ r(M, { src: m, className: "wrapper__image" }),
|
|
165
167
|
/* @__PURE__ */ a("div", { className: "wrapper__content", children: [
|
|
166
168
|
/* @__PURE__ */ a("div", { className: "wrapper__subcontent", children: [
|
|
167
169
|
/* @__PURE__ */ r("div", { className: "wrapper__title", children: t }),
|
|
168
|
-
/* @__PURE__ */ r("div", { className: "wrapper__tags", children: s && (s == null ? void 0 : s.map((
|
|
170
|
+
/* @__PURE__ */ r("div", { className: "wrapper__tags", children: s && (s == null ? void 0 : s.map((e, u) => /* @__PURE__ */ r(U, { color: e == null ? void 0 : e.color, children: e == null ? void 0 : e.name }, u))) })
|
|
169
171
|
] }),
|
|
170
172
|
/* @__PURE__ */ a("div", { className: "wrapper__info", children: [
|
|
171
|
-
/* @__PURE__ */ r("div", { className: "info__text", children: `${
|
|
173
|
+
/* @__PURE__ */ r("div", { className: "info__text", children: `${C(
|
|
172
174
|
d
|
|
173
|
-
)} • ${
|
|
175
|
+
)} • ${O(c, h)}` }),
|
|
174
176
|
/* @__PURE__ */ a("div", { className: "info__text", children: [
|
|
175
177
|
/* @__PURE__ */ a("div", { children: [
|
|
176
|
-
/* @__PURE__ */ r(
|
|
177
|
-
|
|
178
|
+
/* @__PURE__ */ r(v, { icon: " mng-lnc-thumbs-up--filled", sizeInUnits: "1rem" }),
|
|
179
|
+
N(n)
|
|
178
180
|
] }),
|
|
179
181
|
/* @__PURE__ */ a("div", { children: [
|
|
180
|
-
/* @__PURE__ */ r(
|
|
181
|
-
|
|
182
|
+
/* @__PURE__ */ r(v, { icon: " mng-lnc-messages-filled", sizeInUnits: "1rem" }),
|
|
183
|
+
N(p)
|
|
182
184
|
] })
|
|
183
185
|
] })
|
|
184
186
|
] })
|
|
@@ -187,7 +189,7 @@ const T = S.a`
|
|
|
187
189
|
}
|
|
188
190
|
);
|
|
189
191
|
}
|
|
190
|
-
),
|
|
192
|
+
), D = $.div`
|
|
191
193
|
display: flex;
|
|
192
194
|
flex-direction: column;
|
|
193
195
|
align-items: flex-start;
|
|
@@ -205,7 +207,7 @@ const T = S.a`
|
|
|
205
207
|
|
|
206
208
|
& .title__text {
|
|
207
209
|
color: var(--gray-950, #14161a);
|
|
208
|
-
${
|
|
210
|
+
${S(2)}
|
|
209
211
|
|
|
210
212
|
font-size: 1.5rem;
|
|
211
213
|
font-style: normal;
|
|
@@ -257,7 +259,7 @@ const T = S.a`
|
|
|
257
259
|
width: 100%;
|
|
258
260
|
}
|
|
259
261
|
|
|
260
|
-
@media (max-width: ${
|
|
262
|
+
@media (max-width: ${k + "px"}) {
|
|
261
263
|
gap: 1.25rem;
|
|
262
264
|
|
|
263
265
|
& .wrapper__title {
|
|
@@ -271,14 +273,14 @@ const T = S.a`
|
|
|
271
273
|
gap: 1.5rem;
|
|
272
274
|
}
|
|
273
275
|
}
|
|
274
|
-
`,
|
|
276
|
+
`, q = R(W), A = z(
|
|
275
277
|
({
|
|
276
278
|
title: t,
|
|
277
279
|
subtitle: m,
|
|
278
280
|
icon: s,
|
|
279
281
|
buttonText: d,
|
|
280
282
|
buttonLink: c,
|
|
281
|
-
timeToReadText:
|
|
283
|
+
timeToReadText: h = "{0} min read",
|
|
282
284
|
items: n,
|
|
283
285
|
onButtonAction: p = () => {
|
|
284
286
|
},
|
|
@@ -287,38 +289,40 @@ const T = S.a`
|
|
|
287
289
|
isLoading: f = !1,
|
|
288
290
|
getImage: o = () => {
|
|
289
291
|
},
|
|
290
|
-
componentName:
|
|
291
|
-
|
|
292
|
-
|
|
292
|
+
componentName: g,
|
|
293
|
+
LinkComponent: _
|
|
294
|
+
}, y) => {
|
|
295
|
+
const w = B(() => {
|
|
293
296
|
var i;
|
|
294
|
-
return (i = n == null ? void 0 : n.slice(0, 4)) == null ? void 0 : i.map((e,
|
|
295
|
-
|
|
297
|
+
return (i = n == null ? void 0 : n.slice(0, 4)) == null ? void 0 : i.map((e, u) => /* @__PURE__ */ r(
|
|
298
|
+
q,
|
|
296
299
|
{
|
|
297
300
|
title: e == null ? void 0 : e.title,
|
|
298
301
|
titleSlug: e == null ? void 0 : e.titleSlug,
|
|
299
302
|
options: e == null ? void 0 : e.options,
|
|
300
303
|
publishedAt: e == null ? void 0 : e.publishedAt,
|
|
301
|
-
timeToReadText:
|
|
304
|
+
timeToReadText: h,
|
|
302
305
|
timeToRead: e == null ? void 0 : e.timeToRead,
|
|
303
306
|
numberOfLikes: e == null ? void 0 : e.numberOfLikes,
|
|
304
307
|
numberOfComments: e == null ? void 0 : e.numberOfComments,
|
|
305
308
|
isSponsored: e == null ? void 0 : e.isSponsored,
|
|
306
|
-
onSelectCard: (L,
|
|
309
|
+
onSelectCard: (L, j) => l == null ? void 0 : l(e, j),
|
|
307
310
|
imageUrl: o(e == null ? void 0 : e.imageUrl, e == null ? void 0 : e.uuid) || null,
|
|
308
|
-
metadata: { name:
|
|
311
|
+
metadata: { name: g, accessor: e == null ? void 0 : e.accessor },
|
|
312
|
+
LinkComponent: _
|
|
309
313
|
},
|
|
310
|
-
`blog-card-sponsored__${
|
|
314
|
+
`blog-card-sponsored__${u + 1}`
|
|
311
315
|
));
|
|
312
316
|
}, [n]);
|
|
313
|
-
return /* @__PURE__ */ a(
|
|
317
|
+
return /* @__PURE__ */ a(D, { ref: y, children: [
|
|
314
318
|
/* @__PURE__ */ a("div", { className: "wrapper__heading", children: [
|
|
315
319
|
/* @__PURE__ */ a("div", { className: "wrapper__title", children: [
|
|
316
320
|
t && /* @__PURE__ */ a("div", { className: "title__text", children: [
|
|
317
|
-
|
|
321
|
+
b(s) && /* @__PURE__ */ r("i", { className: s }),
|
|
318
322
|
/* @__PURE__ */ r("span", { children: t })
|
|
319
323
|
] }),
|
|
320
|
-
|
|
321
|
-
|
|
324
|
+
b(d) && b(c) && !f && /* @__PURE__ */ r(
|
|
325
|
+
P,
|
|
322
326
|
{
|
|
323
327
|
text: d,
|
|
324
328
|
borderRadius: "curved",
|
|
@@ -335,16 +339,16 @@ const T = S.a`
|
|
|
335
339
|
m && /* @__PURE__ */ r("div", { className: "wrapper__subtitle", children: m })
|
|
336
340
|
] }),
|
|
337
341
|
/* @__PURE__ */ r(
|
|
338
|
-
|
|
342
|
+
T,
|
|
339
343
|
{
|
|
340
344
|
isLoading: f,
|
|
341
345
|
keyPrefix: "blog-cards-sponsored-skeleton",
|
|
342
|
-
children: /* @__PURE__ */ r("div", { className: "wrapper__cards", children:
|
|
346
|
+
children: /* @__PURE__ */ r("div", { className: "wrapper__cards", children: w })
|
|
343
347
|
}
|
|
344
348
|
)
|
|
345
349
|
] });
|
|
346
350
|
}
|
|
347
351
|
);
|
|
348
352
|
export {
|
|
349
|
-
|
|
353
|
+
A as default
|
|
350
354
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const a=require("react/jsx-runtime"),s=require("react"),c=require("./CategorySimpleCard-
|
|
1
|
+
"use strict";const a=require("react/jsx-runtime"),s=require("react"),c=require("./CategorySimpleCard-COGlTj06.cjs"),d=require("./style-BTTXJFJN.cjs"),g=s.memo(c.CategorySimpleCard),l=s.forwardRef(({items:r,onSelectCard:i=()=>{},isLoading:p=!1,limit:C=4,isHighlight:t=!1},u)=>{const m=s.useMemo(()=>{var o;return(o=r==null?void 0:r.slice(0,4))==null?void 0:o.map((e,n)=>a.jsx(g,{uuid:e==null?void 0:e.uuid,image:e==null?void 0:e.image,name:e==null?void 0:e.name,onSelectCard:()=>i==null?void 0:i(e==null?void 0:e.uuid)},n))},[r]);return a.jsx(d.Wrapper,{ref:u,className:t?"highlight":"",children:a.jsx("div",{className:"wrapper__grid",children:m})})});module.exports=l;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { memo as g, forwardRef as l, useMemo as t } from "react";
|
|
3
|
-
import { C as u } from "./CategorySimpleCard-
|
|
3
|
+
import { C as u } from "./CategorySimpleCard-CEzArySG.js";
|
|
4
4
|
import { W as f } from "./style-tw6KjI2J.js";
|
|
5
5
|
const n = g(u), M = l(
|
|
6
6
|
({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),x=require("react"),
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),x=require("react"),se=require("./useDetectMobile-zkbzoOGV.cjs"),M=require("./utils-RnrgDDZP.cjs"),ce=require("./TextInput.cjs"),q=require("./Icon.cjs"),oe=require("./Link.cjs"),L=require("./IconButton.cjs"),V=require("./DropdownMenu.cjs"),W=require("./DropdownItem.cjs"),le=require("./tag-CmeZsPQt.cjs"),de=require("./BlogProductCardsSection.cjs"),E=require("./emotion-styled.browser.esm-BtEseadx.cjs"),me=require("./index-uwl7BjRF.cjs"),T=require("./BlogListSection.cjs"),_e=require("./consts-goSZX3xP.cjs"),he=E.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
|
+
`,ue=x.forwardRef(({perPageOptions:o=[{code:10,name:"Show 10 items"},{code:25,name:"Show 25 items"},{code:50,name:"Show 50 items"}],perPage:h,handlePerPage:v=()=>{},page:a=1,handlePage:l=()=>{},totalPage:t},_)=>{var f,d;const u=()=>{a>1&&(l==null||l(a-1))},g=()=>{a<t&&(l==null||l(a+1))},w=()=>{const r=[];if(t<=7)for(let i=1;i<=t;i++)r.push(i);else a<=3?r.push(1,2,3,"...",t):a>=t-2?r.push(1,"...",t-2,t-1,t):r.push(1,2,3,"...",t);return r==null?void 0:r.map((i,p)=>i==="..."?e.jsx("div",{className:"pagination__page ellipsis",children:i},`pagination-ellipsis__${p}`):e.jsx("div",{onClick:()=>l(i),className:`pagination__page ${a===i?"active":""}`,children:i},`pagination-page__${p}`))};return e.jsxs(he,{className:"pagination",children:[e.jsx(V,{color:"neutral",control:((f=o==null?void 0:o.find(r=>(r==null?void 0:r.code)===h))==null?void 0:f.name)||((d=o[0])==null?void 0:d.name),placement:"bottom",zIndex:1001,className:"pagination__per-page",children:o==null?void 0:o.map((r,i)=>e.jsx(W,{active:(r==null?void 0:r.code)===(h==null?void 0:h.code),className:"sort-by__item",onClick:()=>v(r),children:r==null?void 0:r.name},`blog-epxlore-section-per-page-option__${i+1}`))}),e.jsxs("div",{className:"pagination__pages",children:[e.jsx("div",{className:`pagination__page ${a===1?"disabled":""}`,onClick:u,children:e.jsx(q,{icon:" mng-lnc-chevron--left"})}),w(),e.jsx("div",{className:`pagination__page ${a===t?"disabled":""}`,onClick:g,children:e.jsx(q,{icon:" mng-lnc-chevron--right"})})]})]})}),fe=E.styled.div`
|
|
83
83
|
display: flex;
|
|
84
84
|
align-items: flex-start;
|
|
85
85
|
gap: 2rem;
|
|
@@ -285,7 +285,7 @@
|
|
|
285
285
|
font-style: normal;
|
|
286
286
|
font-weight: 500;
|
|
287
287
|
line-height: 1.25rem;
|
|
288
|
-
${
|
|
288
|
+
${M.truncateTextInRows(2)}
|
|
289
289
|
}
|
|
290
290
|
|
|
291
291
|
& .item__description {
|
|
@@ -300,7 +300,7 @@
|
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
302
|
|
|
303
|
-
@media (max-width: ${
|
|
303
|
+
@media (max-width: ${_e.MOBILE_SIZE_PX+"px"}) {
|
|
304
304
|
flex-direction: column;
|
|
305
305
|
|
|
306
306
|
& .landing__main-content {
|
|
@@ -352,4 +352,4 @@
|
|
|
352
352
|
display: none;
|
|
353
353
|
}
|
|
354
354
|
}
|
|
355
|
-
`,
|
|
355
|
+
`,xe=x.forwardRef(({mainTitle:o,sideTitle:h,tags:v,selectedTag:a,handleSelectTag:l=()=>{},blogs:t,miniBlogs:_,products:u,blogsLoading:g=!1,productsLoading:w=!1,sortingOptions:f,sortBy:d,handleSortBy:r=()=>{},allTagText:i="All",searchPlaceholderText:p="Search blogs",timeToReadText:C="{0} min read",getBlogImageUrl:b=()=>{},handleSelectBlog:y=()=>{},handleSelectBlogTag:z=()=>{},handleShareBlog:$=()=>{},showAllButtonLink:F,showAllButtonText:R="Show all products",viewAllButtonText:H="View all (11)",handleViewAll:X=()=>{},handleShowAll:Z=()=>{},handleSelectProduct:G=()=>{},getProductImageUrl:J=()=>{},page:K,handlePage:j=()=>{},perPage:Q,handlePerPage:U=()=>{},totalPage:N,perPageOptions:Y,handleSearch:O=()=>{},onBookmark:D=()=>{},bookmarkComponent:I=e.jsx(e.Fragment,{}),componentName:k,LinkComponent:S},B)=>{const P=n=>{document.getElementById("landing__container").scrollIntoView({behavior:"smooth",block:"start"}),j==null||j(n)},s=x.useRef(null),ee=se.useDetectMobile(),[m,ne]=x.useState({arrowsVisible:!1,leftArrowDisabled:!1,rightArrowDisabled:!1});x.useEffect(()=>{const n=s==null?void 0:s.current;if(!n)return;const c=()=>{const ie=n.scrollWidth-n.clientWidth;ne(ae=>({...ae,arrowsVisible:n.clientWidth<n.scrollWidth,leftArrowDisabled:n.scrollLeft<=0,rightArrowDisabled:n.scrollLeft>=ie}))},A=new ResizeObserver(c);return A.observe(n),c(),n.addEventListener("scroll",c),()=>{A.disconnect(),n.removeEventListener("scroll",c)}},[]);const te=()=>{var n;(n=s==null?void 0:s.current)==null||n.scrollBy({left:100,behavior:"smooth"})},re=()=>{var n;(n=s==null?void 0:s.current)==null||n.scrollBy({left:-100,behavior:"smooth"})};return e.jsxs(fe,{ref:B,id:"landing__container",children:[e.jsxs("div",{className:"landing__main-content",children:[e.jsxs("div",{className:"main-content__heading",children:[e.jsx("div",{className:"main-content__title",children:o}),!ee&&(m==null?void 0:m.arrowsVisible)&&e.jsxs("div",{className:"main-content__tags-nav",children:[e.jsx(L,{icon:"chevron-left",borderRadius:"curved",btnType:"tinted",color:"neutral",disabled:m==null?void 0:m.leftArrowDisabled,className:"main-content__tag-nav",onClick:re}),e.jsx(L,{icon:"chevron-right",borderRadius:"curved",btnType:"tinted",color:"neutral",disabled:m==null?void 0:m.rightArrowDisabled,className:"main-content__tag-nav",onClick:te})]})]}),v&&e.jsx(le.FaqSectionTags,{ref:s,tags:v,allTagText:i,selectedTagCode:a,onSelectTag:l}),e.jsxs("div",{className:"main-content__actions",children:[e.jsx(ce,{className:"main-content__search",placeholder:p,debounceTime:200,prefix:e.jsx(q,{icon:" mng-lnc-search",sizeInUnits:"1.25rem",className:"main-content__search-prefix"}),color:"neutral",onChange:O}),e.jsx(V,{color:"neutral",control:d==null?void 0:d.name,zIndex:1001,className:"main-content__sort-by",children:f==null?void 0:f.map((n,c)=>e.jsx(W,{active:(n==null?void 0:n.code)===(d==null?void 0:d.code),className:"sort-by__item",onClick:()=>r(n),children:n==null?void 0:n.name},`blog-epxlore-section-sorting-option__${c+1}`))})]}),e.jsxs("div",{className:"main-content__items",children:[t&&(t==null?void 0:t.length)>0&&e.jsx(T,{timeToReadText:C,items:t==null?void 0:t.slice(0,5),isLoading:g,getImage:b,onSelectCard:y,onSelectOption:z,onShare:$,onBookmark:D,bookmarkComponent:I,componentName:k,LinkComponent:S}),e.jsx("div",{className:"main-content__divider"}),u&&(u==null?void 0:u.length)>0&&e.jsx(de,{buttonText:R,buttonLink:F,onButtonAction:Z,onSelectCard:G,items:u,isLoading:w,getImage:J,isHighlight:!0,componentName:k,LinkComponent:S}),e.jsx("div",{className:"main-content__divider"}),t&&(t==null?void 0:t.length)>0&&e.jsx(T,{timeToReadText:C,items:t==null?void 0:t.slice(5),isLoading:g,getImage:b,onSelectCard:y,onSelectOption:z,onShare:$,onBookmark:D,bookmarkComponent:I,componentName:k,LinkComponent:S})]}),N&&N>1&&e.jsx(ue,{perPageOptions:Y,perPage:Q,handlePerPage:U,page:K,handlePage:P,totalPage:N})]}),e.jsxs("div",{className:"landing__side-content",children:[h&&e.jsx("div",{className:"side-content__title",children:h}),_&&(_==null?void 0:_.length)>0&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"side-content__items",children:_==null?void 0:_.map((n,c)=>e.jsx(x.Fragment,{children:e.jsxs("div",{className:"side-content__item",onClick:()=>y(n),children:[e.jsx(me.ProductImageWrapper,{src:b(n==null?void 0:n.imageUrl,n==null?void 0:n.uuid)||null,alt:`Mini blog ${c+1}`,className:"item__image"}),e.jsxs("div",{className:"item__content",children:[e.jsx("div",{className:"item__title",children:n==null?void 0:n.title}),e.jsx("div",{className:"item__description",children:M.formatLocaleDateString(n==null?void 0:n.publishedAt)})]})]})},`mini_blg_${c}`))}),e.jsx(oe,{onClick:X,className:"side-content__link",children:H})]})]})]})});module.exports=xe;
|