@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.
- package/dist/BlogCardsSponsoredSection.cjs +8 -8
- package/dist/BlogCardsSponsoredSection.js +105 -89
- package/dist/BlogExploreSection.cjs +5 -5
- package/dist/BlogExploreSection.js +88 -84
- package/dist/BlogListSection.cjs +5 -5
- package/dist/BlogListSection.js +139 -126
- package/dist/BlogProductCardsSection.cjs +1 -1
- package/dist/BlogProductCardsSection.js +37 -35
- package/dist/BlogShopCardsSection.cjs +1 -1
- package/dist/BlogShopCardsSection.js +43 -41
- package/dist/BlogSingleSection.cjs +1 -1
- package/dist/BlogSingleSection.js +9 -4
- package/dist/BlogsSectionDetailed.cjs +11 -11
- package/dist/BlogsSectionDetailed.js +122 -108
- package/dist/BlogsSectionLarge.cjs +4 -4
- package/dist/BlogsSectionLarge.js +43 -40
- package/dist/BlogsSectionSimple.cjs +8 -8
- package/dist/BlogsSectionSimple.js +100 -86
- package/dist/BlogsSectionSimpleCentered.cjs +9 -9
- package/dist/BlogsSectionSimpleCentered.js +81 -66
- package/dist/BlogsSectionWithFilters.cjs +11 -11
- package/dist/BlogsSectionWithFilters.js +108 -93
- package/dist/{CustomStyles-Ajyqx0cb.cjs → CustomStyles-BwHfr4iM.cjs} +1 -1
- package/dist/{CustomStyles-DVcu00ul.js → CustomStyles-iconSXFL.js} +0 -1
- package/dist/DetailedProductsInfinitiveSection.cjs +8 -3
- package/dist/DetailedProductsInfinitiveSection.js +63 -51
- package/dist/DetailedProductsSection.cjs +3 -3
- package/dist/DetailedProductsSection.js +76 -65
- package/dist/Dropdown.cjs +1 -1
- package/dist/Dropdown.js +2 -2
- package/dist/DropdownLookup.cjs +1 -1
- package/dist/DropdownLookup.js +1 -1
- package/dist/FieldOfInterestsWithAvatarsCardsSection.cjs +1 -1
- package/dist/FieldOfInterestsWithAvatarsCardsSection.js +1 -1
- package/dist/GiftCardsSection.cjs +1 -1
- package/dist/GiftCardsSection.js +1 -1
- package/dist/MultiSelectDropdown.cjs +1 -1
- package/dist/MultiSelectDropdown.js +1 -1
- package/dist/MultiSelectDropdownLookup.cjs +1 -1
- package/dist/MultiSelectDropdownLookup.js +1 -1
- package/dist/ProductsWithBannerSection.cjs +10 -10
- package/dist/ProductsWithBannerSection.js +81 -59
- package/dist/SalesCampaignsSection.cjs +27 -27
- package/dist/SalesCampaignsSection.js +281 -272
- package/dist/ShopCardsSection.cjs +3 -3
- package/dist/ShopCardsSection.js +27 -25
- package/dist/SimpleCategoriesSection.cjs +1 -1
- package/dist/SimpleCategoriesSection.js +1 -1
- package/dist/SimpleProductsSection.cjs +3 -3
- package/dist/SimpleProductsSection.js +62 -51
- package/dist/UrgentSaleProductsSection.cjs +6 -6
- package/dist/UrgentSaleProductsSection.js +67 -56
- package/dist/index-1Dm1i6WK.js +52 -0
- package/dist/index-BGTtoLxz.cjs +1 -0
- package/dist/{index-CLoINIGC.cjs → index-DicTpiG0.cjs} +5 -5
- package/dist/{index-BGY3PSA-.js → index-y6sKgrZC.js} +45 -34
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{skeleton-BWFqIToC.js → skeleton-5mO22c5S.js} +94 -84
- package/dist/{skeleton-CanJ6Gr6.cjs → skeleton-Ccd6EDeB.cjs} +8 -8
- package/dist/{style-DFPWLJBr.js → style-BLuyU97E.js} +4 -0
- package/dist/{style-CyHewQxg.cjs → style-lSjkOR95.cjs} +6 -2
- package/dist/{suspense-product-card-detailed-YJVsf2-a.js → suspense-product-card-detailed-BZtObEfA.js} +191 -162
- package/dist/suspense-product-card-detailed-D-pjVe22.cjs +300 -0
- package/dist/{suspense-product-card-simple-CrqjSxHI.cjs → suspense-product-card-simple-DJ8UYolb.cjs} +1 -1
- package/dist/{suspense-product-card-simple-CLJjab5B.js → suspense-product-card-simple-ziy0XcLp.js} +1 -1
- package/package.json +1 -1
- package/dist/index-Cm0f72Po.cjs +0 -1
- package/dist/index-DGp7FHms.js +0 -42
- package/dist/suspense-product-card-detailed-mCJwteOy.cjs +0 -265
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"use strict";const r=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),d=require("react"),l=require("./utils-Dl9xPH4c.cjs"),w=require("./Icon.cjs"),R=require("./style-lSjkOR95.cjs"),x=require("./index-BueKsXT8.cjs"),v=require("./emotion-styled.browser.esm-BtEseadx.cjs"),y=require("./consts-goSZX3xP.cjs"),S=require("./suspense-large-CFmcSzX-.cjs"),z=require("./Button.cjs"),I=v.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: ${s=>s!=null&&s.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;
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
font-weight: 600;
|
|
64
64
|
line-height: 1.5rem;
|
|
65
65
|
letter-spacing: 0.1px;
|
|
66
|
-
${
|
|
66
|
+
${l.truncateTextInRows(2)}
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
& .wrapper__tags {
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
@media (max-width: ${
|
|
98
|
+
@media (max-width: ${y.MOBILE_SIZE_PX+"px"}) {
|
|
99
99
|
flex-direction: column;
|
|
100
100
|
padding: 0;
|
|
101
101
|
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
|
-
`,
|
|
124
|
+
`,q=d.forwardRef(({title:s,imageUrl:m,options:n,publishedAt:_,timeToReadText:f="{0} min read",timeToRead:u=0,numberOfLikes:o=0,numberOfComments:c=0,isSponsored:p=!1,onSelectCard:h=()=>{},metadata:t},b)=>{const g=d.useRef();return r.jsxs(I,{ref:g,isSponsored:p,"data-accessor":t==null?void 0:t.accessor,name:t==null?void 0:t.name,onClick:i=>h(i,g),children:[p&&r.jsx("div",{className:"wrapper__sponsored",children:r.jsx(w,{icon:" mng-lnc-paw",sizeInUnits:"1.5rem"})}),r.jsx(x.ProductImageWrapper,{src:m,className:"wrapper__image"}),r.jsxs("div",{className:"wrapper__content",children:[r.jsxs("div",{className:"wrapper__subcontent",children:[r.jsx("div",{className:"wrapper__title",children:s}),r.jsx("div",{className:"wrapper__tags",children:n&&(n==null?void 0:n.map((i,a)=>r.jsx(R.BlogTag,{color:i==null?void 0:i.color,children:i==null?void 0:i.name},a)))})]}),r.jsxs("div",{className:"wrapper__info",children:[r.jsx("div",{className:"info__text",children:`${l.formatLocaleDateString(_)} • ${l.formatString(f,u)}`}),r.jsxs("div",{className:"info__text",children:[r.jsxs("div",{children:[r.jsx(w,{icon:" mng-lnc-thumbs-up--filled",sizeInUnits:"1rem"}),l.getRoundedNumber(o)]}),r.jsxs("div",{children:[r.jsx(w,{icon:" mng-lnc-messages-filled",sizeInUnits:"1rem"}),l.getRoundedNumber(c)]})]})]})]})]})}),k=v.styled.div`
|
|
125
125
|
display: flex;
|
|
126
126
|
flex-direction: column;
|
|
127
127
|
align-items: flex-start;
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
|
|
140
140
|
& .title__text {
|
|
141
141
|
color: var(--gray-950, #14161a);
|
|
142
|
-
${
|
|
142
|
+
${l.truncateTextInRows(2)}
|
|
143
143
|
|
|
144
144
|
font-size: 1.5rem;
|
|
145
145
|
font-style: normal;
|
|
@@ -191,7 +191,7 @@
|
|
|
191
191
|
width: 100%;
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
-
@media (max-width: ${
|
|
194
|
+
@media (max-width: ${y.MOBILE_SIZE_PX+"px"}) {
|
|
195
195
|
& .wrapper__title {
|
|
196
196
|
& .title__text {
|
|
197
197
|
font-size: 1.375rem;
|
|
@@ -203,4 +203,4 @@
|
|
|
203
203
|
gap: 1rem;
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
|
-
|
|
206
|
+
`,$=d.memo(q),L=d.forwardRef(({title:s,subtitle:m,icon:n,buttonText:_,buttonLink:f,timeToReadText:u="{0} min read",items:o,onButtonAction:c=()=>{},onSelectCard:p=()=>{},isLoading:h=!1,getImage:t=()=>{},componentName:b},g)=>{const i=d.useMemo(()=>{var a;return(a=o==null?void 0:o.slice(0,4))==null?void 0:a.map((e,j)=>r.jsx($,{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:u,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,N)=>p==null?void 0:p(e,N),imageUrl:t(e==null?void 0:e.imageUrl,e==null?void 0:e.uuid)||null,metadata:{name:b,accessor:e==null?void 0:e.accessor}},`blog-card-sponsored__${j+1}`))},[o]);return r.jsxs(k,{ref:g,children:[r.jsxs("div",{className:"wrapper__heading",children:[r.jsxs("div",{className:"wrapper__title",children:[s&&r.jsxs("div",{className:"title__text",children:[l.isDefinedNotEmptyString(n)&&r.jsx("i",{className:n}),r.jsx("span",{children:s})]}),c&&r.jsx(z,{text:_,borderRadius:"curved",btnType:"tinted",className:"title__action",color:"neutral",onClick:a=>{var e;(e=a==null?void 0:a.target)==null||e.blur(),c==null||c(f)}})]}),m&&r.jsx("div",{className:"wrapper__subtitle",children:m})]}),r.jsx("div",{className:"wrapper__cards",children:r.jsx(S.SuspenseBlogLarge,{isLoading:h,limit:4,keyPrefix:"blog-section",children:i})})]})});module.exports=L;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { p as
|
|
1
|
+
import { jsxs as i, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as v, useRef as $, memo as j, useMemo as I } from "react";
|
|
3
|
+
import { p as y, s as R, v as L, w as b, k as O } from "./utils-BdsZgOUE.js";
|
|
4
4
|
import w from "./Icon.js";
|
|
5
|
-
import { B as
|
|
6
|
-
import { P as
|
|
7
|
-
import { s as
|
|
8
|
-
import { M as
|
|
9
|
-
import { S as
|
|
10
|
-
import
|
|
11
|
-
const
|
|
5
|
+
import { B as T } from "./style-BLuyU97E.js";
|
|
6
|
+
import { P as U } from "./index-CF3HhgvN.js";
|
|
7
|
+
import { s as N } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
8
|
+
import { M as z } from "./consts-BuFChS64.js";
|
|
9
|
+
import { S as B } from "./suspense-large-BMO7JH52.js";
|
|
10
|
+
import C from "./Button.js";
|
|
11
|
+
const M = N.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: ${(t) => t != null && t.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;
|
|
@@ -73,7 +73,7 @@ const U = y.div`
|
|
|
73
73
|
font-weight: 600;
|
|
74
74
|
line-height: 1.5rem;
|
|
75
75
|
letter-spacing: 0.1px;
|
|
76
|
-
${
|
|
76
|
+
${y(2)}
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
& .wrapper__tags {
|
|
@@ -105,7 +105,7 @@ const U = y.div`
|
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
@media (max-width: ${
|
|
108
|
+
@media (max-width: ${z + "px"}) {
|
|
109
109
|
flex-direction: column;
|
|
110
110
|
padding: 0;
|
|
111
111
|
|
|
@@ -131,45 +131,59 @@ const U = y.div`
|
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
|
-
`,
|
|
134
|
+
`, P = v(
|
|
135
135
|
({
|
|
136
|
-
title:
|
|
137
|
-
imageUrl:
|
|
136
|
+
title: t,
|
|
137
|
+
imageUrl: d,
|
|
138
138
|
options: l,
|
|
139
|
-
publishedAt:
|
|
140
|
-
timeToReadText:
|
|
141
|
-
timeToRead:
|
|
142
|
-
numberOfLikes:
|
|
143
|
-
numberOfComments:
|
|
144
|
-
isSponsored:
|
|
145
|
-
onSelectCard:
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
/* @__PURE__ */
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
/* @__PURE__ */
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
139
|
+
publishedAt: f,
|
|
140
|
+
timeToReadText: g = "{0} min read",
|
|
141
|
+
timeToRead: _ = 0,
|
|
142
|
+
numberOfLikes: o = 0,
|
|
143
|
+
numberOfComments: p = 0,
|
|
144
|
+
isSponsored: m = !1,
|
|
145
|
+
onSelectCard: h = () => {
|
|
146
|
+
},
|
|
147
|
+
metadata: s
|
|
148
|
+
}, u) => {
|
|
149
|
+
const c = $();
|
|
150
|
+
return /* @__PURE__ */ i(
|
|
151
|
+
M,
|
|
152
|
+
{
|
|
153
|
+
ref: c,
|
|
154
|
+
isSponsored: m,
|
|
155
|
+
"data-accessor": s == null ? void 0 : s.accessor,
|
|
156
|
+
name: s == null ? void 0 : s.name,
|
|
157
|
+
onClick: (a) => h(a, c),
|
|
158
|
+
children: [
|
|
159
|
+
m && /* @__PURE__ */ r("div", { className: "wrapper__sponsored", children: /* @__PURE__ */ r(w, { icon: " mng-lnc-paw", sizeInUnits: "1.5rem" }) }),
|
|
160
|
+
/* @__PURE__ */ r(U, { src: d, className: "wrapper__image" }),
|
|
161
|
+
/* @__PURE__ */ i("div", { className: "wrapper__content", children: [
|
|
162
|
+
/* @__PURE__ */ i("div", { className: "wrapper__subcontent", children: [
|
|
163
|
+
/* @__PURE__ */ r("div", { className: "wrapper__title", children: t }),
|
|
164
|
+
/* @__PURE__ */ r("div", { className: "wrapper__tags", children: l && (l == null ? void 0 : l.map((a, n) => /* @__PURE__ */ r(T, { color: a == null ? void 0 : a.color, children: a == null ? void 0 : a.name }, n))) })
|
|
165
|
+
] }),
|
|
166
|
+
/* @__PURE__ */ i("div", { className: "wrapper__info", children: [
|
|
167
|
+
/* @__PURE__ */ r("div", { className: "info__text", children: `${R(
|
|
168
|
+
f
|
|
169
|
+
)} • ${L(g, _)}` }),
|
|
170
|
+
/* @__PURE__ */ i("div", { className: "info__text", children: [
|
|
171
|
+
/* @__PURE__ */ i("div", { children: [
|
|
172
|
+
/* @__PURE__ */ r(w, { icon: " mng-lnc-thumbs-up--filled", sizeInUnits: "1rem" }),
|
|
173
|
+
b(o)
|
|
174
|
+
] }),
|
|
175
|
+
/* @__PURE__ */ i("div", { children: [
|
|
176
|
+
/* @__PURE__ */ r(w, { icon: " mng-lnc-messages-filled", sizeInUnits: "1rem" }),
|
|
177
|
+
b(p)
|
|
178
|
+
] })
|
|
179
|
+
] })
|
|
180
|
+
] })
|
|
167
181
|
] })
|
|
168
|
-
]
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
),
|
|
182
|
+
]
|
|
183
|
+
}
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
), E = N.div`
|
|
173
187
|
display: flex;
|
|
174
188
|
flex-direction: column;
|
|
175
189
|
align-items: flex-start;
|
|
@@ -187,7 +201,7 @@ const U = y.div`
|
|
|
187
201
|
|
|
188
202
|
& .title__text {
|
|
189
203
|
color: var(--gray-950, #14161a);
|
|
190
|
-
${
|
|
204
|
+
${y(2)}
|
|
191
205
|
|
|
192
206
|
font-size: 1.5rem;
|
|
193
207
|
font-style: normal;
|
|
@@ -239,7 +253,7 @@ const U = y.div`
|
|
|
239
253
|
width: 100%;
|
|
240
254
|
}
|
|
241
255
|
|
|
242
|
-
@media (max-width: ${
|
|
256
|
+
@media (max-width: ${z + "px"}) {
|
|
243
257
|
& .wrapper__title {
|
|
244
258
|
& .title__text {
|
|
245
259
|
font-size: 1.375rem;
|
|
@@ -251,79 +265,81 @@ const U = y.div`
|
|
|
251
265
|
gap: 1rem;
|
|
252
266
|
}
|
|
253
267
|
}
|
|
254
|
-
`,
|
|
268
|
+
`, W = j(P), Y = v(
|
|
255
269
|
({
|
|
256
|
-
title:
|
|
257
|
-
subtitle:
|
|
270
|
+
title: t,
|
|
271
|
+
subtitle: d,
|
|
258
272
|
icon: l,
|
|
259
|
-
buttonText:
|
|
260
|
-
buttonLink:
|
|
261
|
-
timeToReadText:
|
|
262
|
-
items:
|
|
263
|
-
onButtonAction:
|
|
273
|
+
buttonText: f,
|
|
274
|
+
buttonLink: g,
|
|
275
|
+
timeToReadText: _ = "{0} min read",
|
|
276
|
+
items: o,
|
|
277
|
+
onButtonAction: p = () => {
|
|
264
278
|
},
|
|
265
|
-
onSelectCard:
|
|
279
|
+
onSelectCard: m = () => {
|
|
266
280
|
},
|
|
267
|
-
isLoading:
|
|
268
|
-
getImage:
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
281
|
+
isLoading: h = !1,
|
|
282
|
+
getImage: s = () => {
|
|
283
|
+
},
|
|
284
|
+
componentName: u
|
|
285
|
+
}, c) => {
|
|
286
|
+
const a = I(() => {
|
|
287
|
+
var n;
|
|
288
|
+
return (n = o == null ? void 0 : o.slice(0, 4)) == null ? void 0 : n.map((e, S) => /* @__PURE__ */ r(
|
|
289
|
+
W,
|
|
275
290
|
{
|
|
276
291
|
title: e == null ? void 0 : e.title,
|
|
277
292
|
titleSlug: e == null ? void 0 : e.titleSlug,
|
|
278
293
|
options: e == null ? void 0 : e.options,
|
|
279
294
|
publishedAt: e == null ? void 0 : e.publishedAt,
|
|
280
|
-
timeToReadText:
|
|
295
|
+
timeToReadText: _,
|
|
281
296
|
timeToRead: e == null ? void 0 : e.timeToRead,
|
|
282
297
|
numberOfLikes: e == null ? void 0 : e.numberOfLikes,
|
|
283
298
|
numberOfComments: e == null ? void 0 : e.numberOfComments,
|
|
284
299
|
isSponsored: e == null ? void 0 : e.isSponsored,
|
|
285
|
-
onSelectCard: () =>
|
|
286
|
-
imageUrl:
|
|
300
|
+
onSelectCard: (D, k) => m == null ? void 0 : m(e, k),
|
|
301
|
+
imageUrl: s(e == null ? void 0 : e.imageUrl, e == null ? void 0 : e.uuid) || null,
|
|
302
|
+
metadata: { name: u, accessor: e == null ? void 0 : e.accessor }
|
|
287
303
|
},
|
|
288
|
-
`blog-card-sponsored__${
|
|
304
|
+
`blog-card-sponsored__${S + 1}`
|
|
289
305
|
));
|
|
290
|
-
}, [
|
|
291
|
-
return /* @__PURE__ */
|
|
292
|
-
/* @__PURE__ */
|
|
293
|
-
/* @__PURE__ */
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
/* @__PURE__ */ r("span", { children:
|
|
306
|
+
}, [o]);
|
|
307
|
+
return /* @__PURE__ */ i(E, { ref: c, children: [
|
|
308
|
+
/* @__PURE__ */ i("div", { className: "wrapper__heading", children: [
|
|
309
|
+
/* @__PURE__ */ i("div", { className: "wrapper__title", children: [
|
|
310
|
+
t && /* @__PURE__ */ i("div", { className: "title__text", children: [
|
|
311
|
+
O(l) && /* @__PURE__ */ r("i", { className: l }),
|
|
312
|
+
/* @__PURE__ */ r("span", { children: t })
|
|
297
313
|
] }),
|
|
298
|
-
|
|
299
|
-
|
|
314
|
+
p && /* @__PURE__ */ r(
|
|
315
|
+
C,
|
|
300
316
|
{
|
|
301
|
-
text:
|
|
317
|
+
text: f,
|
|
302
318
|
borderRadius: "curved",
|
|
303
319
|
btnType: "tinted",
|
|
304
320
|
className: "title__action",
|
|
305
321
|
color: "neutral",
|
|
306
|
-
onClick: (
|
|
322
|
+
onClick: (n) => {
|
|
307
323
|
var e;
|
|
308
|
-
(e =
|
|
324
|
+
(e = n == null ? void 0 : n.target) == null || e.blur(), p == null || p(g);
|
|
309
325
|
}
|
|
310
326
|
}
|
|
311
327
|
)
|
|
312
328
|
] }),
|
|
313
|
-
|
|
329
|
+
d && /* @__PURE__ */ r("div", { className: "wrapper__subtitle", children: d })
|
|
314
330
|
] }),
|
|
315
331
|
/* @__PURE__ */ r("div", { className: "wrapper__cards", children: /* @__PURE__ */ r(
|
|
316
|
-
|
|
332
|
+
B,
|
|
317
333
|
{
|
|
318
|
-
isLoading:
|
|
334
|
+
isLoading: h,
|
|
319
335
|
limit: 4,
|
|
320
336
|
keyPrefix: "blog-section",
|
|
321
|
-
children:
|
|
337
|
+
children: a
|
|
322
338
|
}
|
|
323
339
|
) })
|
|
324
340
|
] });
|
|
325
341
|
}
|
|
326
342
|
);
|
|
327
343
|
export {
|
|
328
|
-
|
|
344
|
+
Y as default
|
|
329
345
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),b=require("react"),n=require("./index-BpbMKBf_.cjs"),z=require("./utils-Dl9xPH4c.cjs"),Y=require("./TextInput.cjs"),N=require("./Icon.cjs"),B=require("./Link.cjs"),L=require("./DropdownMenu.cjs"),P=require("./DropdownItem.cjs"),O=require("./tag-yputMSpE.cjs"),ee=require("./BlogProductCardsSection.cjs"),A=require("./emotion-styled.browser.esm-BtEseadx.cjs"),ne=require("./index-BueKsXT8.cjs"),$=require("./BlogListSection.cjs"),re=require("./consts-goSZX3xP.cjs"),te=A.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
|
+
`,ie=b.forwardRef(({perPageOptions:c=[{code:10,name:"Show 10 items"},{code:25,name:"Show 25 items"},{code:50,name:"Show 50 items"}],perPage:m,handlePerPage:u=()=>{},page:s=1,handlePage:o=()=>{},totalPage:r},d)=>{var _,l;const p=()=>{s>1&&(o==null||o(s-1))},f=()=>{s<r&&(o==null||o(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,x)=>a==="..."?e.jsx("div",{className:"pagination__page ellipsis",children:a},`pagination-ellipsis__${x}`):e.jsx("div",{onClick:()=>o(a),className:`pagination__page ${s===a?"active":""}`,children:a},`pagination-page__${x}`))};return e.jsxs(te,{className:"pagination",children:[e.jsx(L,{color:"neutral",control:((_=c==null?void 0:c.find(i=>(i==null?void 0:i.code)===m))==null?void 0:_.name)||((l=c[0])==null?void 0:l.name),placement:"bottom",zIndex:1001,className:"pagination__per-page",children:c==null?void 0:c.map((i,a)=>e.jsx(P,{active:(i==null?void 0:i.code)===(m==null?void 0:m.code),className:"sort-by__item",onClick:()=>u(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(N,{icon:" mng-lnc-chevron--left"})}),g(),e.jsx("div",{className:`pagination__page ${s===r?"disabled":""}`,onClick:f,children:e.jsx(N,{icon:" mng-lnc-chevron--right"})})]})]})}),ae=A.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
|
+
${z.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: ${re.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
|
+
`,R=b.forwardRef(({mainTitle:c,sideTitle:m,tags:u,selectedTag:s,handleSelectTag:o=()=>{},blogs:r,miniBlogs:d,products:p,blogsLoading:f=!1,productsLoading:g=!1,sortingOptions:_,sortBy:l,handleSortBy:i=()=>{},allTagText:a="All",searchPlaceholderText:x="Search blogs",timeToReadText:S="{0} min read",getBlogImageUrl:y=()=>{},handleSelectBlog:v=()=>{},handleSelectBlogTag:k=()=>{},handleShareBlog:q=()=>{},showAllButtonLink:E,showAllButtonText:F="Show all products",viewAllButtonText:D="View all (11)",viewAllButtonLink:se,handleViewAll:M=()=>{},handleShowAll:U=()=>{},handleSelectProduct:V=()=>{},getProductImageUrl:H=()=>{},page:W,handlePage:T=()=>{},perPage:X,handlePerPage:Z=()=>{},totalPage:j,perPageOptions:G,handleSearch:J=()=>{},onBookmark:C=()=>{},bookmarkComponent:I=e.jsx(e.Fragment,{children:" "}),componentName:w},K)=>{const Q=t=>{document.getElementById("landing__container").scrollIntoView({behavior:"smooth",block:"start"}),T==null||T(t)};return e.jsxs(ae,{ref:K,id:"landing__container",children:[e.jsxs("div",{className:"landing__main-content",children:[c&&e.jsx("div",{className:"main-content__title",children:c}),u&&e.jsx(O.FaqSectionTags,{tags:u,allTagText:a,selectedTagCode:s,onSelectTag:o}),e.jsxs("div",{className:"main-content__actions",children:[e.jsx(Y,{className:"main-content__search",placeholder:x,debounceTime:200,prefix:e.jsx(N,{icon:" mng-lnc-search",sizeInUnits:"1.25rem",className:"main-content__search-prefix"}),color:"neutral",onChange:J}),e.jsx(L,{color:"neutral",control:l==null?void 0:l.name,zIndex:1001,className:"main-content__sort-by",children:_==null?void 0:_.map((t,h)=>e.jsx(P,{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__${h+1}`))})]}),e.jsxs("div",{className:"main-content__items",children:[r&&(r==null?void 0:r.length)>0&&e.jsx($,{timeToReadText:S,items:r==null?void 0:r.slice(0,5),isLoading:f,getImage:y,onSelectCard:v,onSelectOption:k,onShare:q,onBookmark:C,bookmarkComponent:I,componentName:w}),e.jsx("div",{className:"main-content__divider"}),p&&(p==null?void 0:p.length)>0&&e.jsx(ee,{buttonText:F,buttonLink:E,onButtonAction:U,onSelectCard:V,items:p,isLoading:g,getImage:H,isHighlight:!0,componentName:w}),e.jsx("div",{className:"main-content__divider"}),r&&(r==null?void 0:r.length)>0&&e.jsx($,{timeToReadText:S,items:r==null?void 0:r.slice(5),isLoading:f,getImage:y,onSelectCard:v,onSelectOption:k,onShare:q,onBookmark:C,bookmarkComponent:I,componentName:w})]}),j&&j>1&&e.jsx(ie,{perPageOptions:G,perPage:X,handlePerPage:Z,page:W,handlePage:Q,totalPage:j})]}),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,h)=>e.jsx(b.Fragment,{children:e.jsxs("div",{className:"side-content__item",onClick:()=>v(t),children:[e.jsx(ne.ProductImageWrapper,{src:y(t==null?void 0:t.imageUrl,t==null?void 0:t.uuid)||null,alt:`Mini blog ${h+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:z.formatLocaleDateString(t==null?void 0:t.publishedAt)})]})]})},`mini_blg_${h}`))}),e.jsx(B,{onClick:M,className:"side-content__link",children:D})]})]})]})});R.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=R;
|