@lanaco/lnc-react-ui 4.0.127 → 4.0.129
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 +7 -9
- package/dist/BannerSectionCarousel.js +63 -65
- package/dist/BannerSectionSimple.cjs +26 -7
- package/dist/BannerSectionSimple.js +67 -44
- package/dist/BlogExploreSection.cjs +4 -3
- package/dist/BlogExploreSection.js +77 -74
- package/dist/BlogListSection.cjs +2 -1
- package/dist/BlogListSection.js +1 -0
- package/dist/BlogsSectionDetailed.cjs +4 -4
- package/dist/BlogsSectionDetailed.js +1 -1
- package/dist/BlogsSectionSimple.cjs +2 -2
- package/dist/BlogsSectionSimple.js +1 -1
- package/dist/OverlayGeneralCardsSection.cjs +7 -5
- package/dist/OverlayGeneralCardsSection.js +4 -2
- package/dist/SalesCampaignsSection.cjs +1 -0
- package/dist/SalesCampaignsSection.js +1 -0
- package/package.json +1 -1
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
1
|
+
import { jsxs as a, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as M } from "react";
|
|
3
3
|
import { s as o } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
4
|
import { M as n } from "./consts-BuFChS64.js";
|
|
5
|
-
import
|
|
6
|
-
import { u as
|
|
7
|
-
|
|
5
|
+
import k from "./Button.js";
|
|
6
|
+
import { u as C } from "./useDetectMobile-Bkvj0VMa.js";
|
|
7
|
+
import { l as B } from "./utils-BPdU4_1q.js";
|
|
8
|
+
const I = o.div`
|
|
8
9
|
display: flex;
|
|
9
10
|
border-radius: 0.75rem;
|
|
10
11
|
background-color: ${(e) => e.bgcolor || "transparent"};
|
|
@@ -25,6 +26,14 @@ const C = o.div`
|
|
|
25
26
|
min-height: ${(e) => `${e.height}px` || "22.5rem"};
|
|
26
27
|
}
|
|
27
28
|
|
|
29
|
+
& .header-image {
|
|
30
|
+
max-width: 148px;
|
|
31
|
+
max-height: 148px;
|
|
32
|
+
position: absolute;
|
|
33
|
+
left: 2rem;
|
|
34
|
+
top: 0;
|
|
35
|
+
}
|
|
36
|
+
|
|
28
37
|
${(e) => e.hasBorder === !0 && `border: 1px solid var(--gray-95008, rgba(20, 22, 26, 0.08));
|
|
29
38
|
box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.10), 0px 1px 2px 0px rgba(0, 0, 0, 0.06);
|
|
30
39
|
|
|
@@ -48,13 +57,22 @@ const C = o.div`
|
|
|
48
57
|
max-height: ${(e) => `${e.imgHMob}px` || "12.1rem"};
|
|
49
58
|
min-height: ${(e) => `${e.imgHMob}px` || "12.1rem"};
|
|
50
59
|
}
|
|
60
|
+
|
|
61
|
+
& .header-image {
|
|
62
|
+
max-width: 128px;
|
|
63
|
+
max-height: 128px;
|
|
64
|
+
min-width: 128px;
|
|
65
|
+
position: absolute;
|
|
66
|
+
left: 0;
|
|
67
|
+
}
|
|
51
68
|
}
|
|
52
|
-
`,
|
|
69
|
+
`, N = o.div`
|
|
53
70
|
padding: ${(e) => e.smallPadding === !0 ? "2rem" : "4rem 5rem"};
|
|
54
71
|
display: flex;
|
|
55
72
|
gap: 2rem;
|
|
56
73
|
flex-direction: ${(e) => e.isHorizontalContent === !0 ? "row" : "column"};
|
|
57
74
|
flex: 1;
|
|
75
|
+
z-index: 2;
|
|
58
76
|
|
|
59
77
|
${(e) => e.isHorizontalContent === !0 && "justify-content: space-between;"}
|
|
60
78
|
|
|
@@ -76,6 +94,8 @@ const C = o.div`
|
|
|
76
94
|
@media (max-width: ${n + "px"}) {
|
|
77
95
|
padding: 0;
|
|
78
96
|
flex-direction: column;
|
|
97
|
+
|
|
98
|
+
${(e) => e != null && e.hasHeaderImage ? "padding: 1rem 3rem;" : ""}
|
|
79
99
|
}
|
|
80
100
|
`, W = o.div`
|
|
81
101
|
display: flex;
|
|
@@ -116,68 +136,71 @@ const C = o.div`
|
|
|
116
136
|
letter-spacing: -0.0112rem;
|
|
117
137
|
}
|
|
118
138
|
}
|
|
119
|
-
`,
|
|
139
|
+
`, _ = M((e, s) => {
|
|
120
140
|
const {
|
|
121
|
-
title:
|
|
122
|
-
subtitle:
|
|
123
|
-
buttonText:
|
|
124
|
-
buttonLink:
|
|
141
|
+
title: c,
|
|
142
|
+
subtitle: p,
|
|
143
|
+
buttonText: x,
|
|
144
|
+
buttonLink: f,
|
|
125
145
|
onButtonAction: u = () => {
|
|
126
146
|
},
|
|
127
|
-
imageUrl:
|
|
128
|
-
imagePosition:
|
|
129
|
-
hideImageForMobile:
|
|
130
|
-
sectionHeight:
|
|
131
|
-
imageWidth:
|
|
132
|
-
imageHeightMobile:
|
|
133
|
-
smallPadding:
|
|
134
|
-
isHorizontalContent:
|
|
135
|
-
backgroundColor:
|
|
136
|
-
hasBorder: z = !1
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
147
|
+
imageUrl: m,
|
|
148
|
+
imagePosition: l = "right",
|
|
149
|
+
hideImageForMobile: h = !1,
|
|
150
|
+
sectionHeight: b = "12.65625rem",
|
|
151
|
+
imageWidth: $,
|
|
152
|
+
imageHeightMobile: w,
|
|
153
|
+
smallPadding: y = !1,
|
|
154
|
+
isHorizontalContent: v = !1,
|
|
155
|
+
backgroundColor: H,
|
|
156
|
+
hasBorder: z = !1,
|
|
157
|
+
headerImageUrl: i
|
|
158
|
+
} = e, d = C();
|
|
159
|
+
return /* @__PURE__ */ a(
|
|
160
|
+
I,
|
|
140
161
|
{
|
|
141
|
-
ref:
|
|
142
|
-
bgcolor:
|
|
143
|
-
height:
|
|
144
|
-
imgW:
|
|
145
|
-
imgHMob:
|
|
162
|
+
ref: s,
|
|
163
|
+
bgcolor: H,
|
|
164
|
+
height: b,
|
|
165
|
+
imgW: $,
|
|
166
|
+
imgHMob: w,
|
|
146
167
|
hasBorder: z,
|
|
147
168
|
children: [
|
|
148
|
-
|
|
149
|
-
/* @__PURE__ */
|
|
150
|
-
|
|
169
|
+
i && /* @__PURE__ */ t("img", { src: i, className: "header-image", alt: "Header image" }),
|
|
170
|
+
l !== "right" && !(h === !0 && d === !0) && /* @__PURE__ */ t("img", { src: m, className: "banner-image" }),
|
|
171
|
+
/* @__PURE__ */ a(
|
|
172
|
+
N,
|
|
151
173
|
{
|
|
152
|
-
isHorizontalContent:
|
|
153
|
-
smallPadding:
|
|
174
|
+
isHorizontalContent: v,
|
|
175
|
+
smallPadding: y,
|
|
176
|
+
hasHeaderImage: B(i),
|
|
154
177
|
children: [
|
|
155
|
-
/* @__PURE__ */
|
|
156
|
-
/* @__PURE__ */ t("div", { className: "header-title", children:
|
|
157
|
-
/* @__PURE__ */ t("div", { className: "header-subitle", children:
|
|
178
|
+
/* @__PURE__ */ a(W, { children: [
|
|
179
|
+
/* @__PURE__ */ t("div", { className: "header-title", children: c }),
|
|
180
|
+
/* @__PURE__ */ t("div", { className: "header-subitle", children: p })
|
|
158
181
|
] }),
|
|
159
182
|
/* @__PURE__ */ t(
|
|
160
|
-
|
|
183
|
+
k,
|
|
161
184
|
{
|
|
162
185
|
size: "medium",
|
|
163
186
|
color: "neutral",
|
|
164
187
|
type: "button",
|
|
165
188
|
className: "header-button",
|
|
166
|
-
onClick: (
|
|
167
|
-
var
|
|
168
|
-
(
|
|
189
|
+
onClick: (r) => {
|
|
190
|
+
var g;
|
|
191
|
+
(g = r == null ? void 0 : r.target) == null || g.blur(), u(f);
|
|
169
192
|
},
|
|
170
|
-
children:
|
|
193
|
+
children: x
|
|
171
194
|
}
|
|
172
195
|
)
|
|
173
196
|
]
|
|
174
197
|
}
|
|
175
198
|
),
|
|
176
|
-
|
|
199
|
+
l === "right" && !(h === !0 && d === !0) && /* @__PURE__ */ t("img", { src: m, className: "banner-image" })
|
|
177
200
|
]
|
|
178
201
|
}
|
|
179
202
|
);
|
|
180
203
|
});
|
|
181
204
|
export {
|
|
182
|
-
|
|
205
|
+
_ as default
|
|
183
206
|
};
|
|
@@ -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"),C=require("./utils-DmMdPm9O.cjs"),J=require("./TextInput.cjs"),j=require("./Icon.cjs"),K=require("./Link.cjs"),z=require("./DropdownMenu.cjs"),I=require("./DropdownItem.cjs"),Q=require("./tag-Bov1gw34.cjs"),W=require("./BlogProductCardsSection.cjs"),P=require("./emotion-styled.browser.esm-BtEseadx.cjs"),S=require("./BlogListSection.cjs"),Y=require("./consts-goSZX3xP.cjs"),B=P.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
|
-
`,O=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:_=()=>{},page:s=1,handlePage:c=()=>{},totalPage:r},d)=>{var h,l;const p=()=>{s>1&&(c==null||c(s-1))},f=()=>{s<r&&(c==null||c(s+1))},x=()=>{const t=[];if(r<=7)for(let a=1;a<=r;a++)t.push(a);else s<=3?t.push(1,2,3,"...",r):s>=r-2?t.push(1,"...",r-2,r-1,r):t.push(1,2,3,"...",r);return t==null?void 0:t.map((a,u)=>a==="..."?e.jsx("div",{className:"pagination__page ellipsis",children:a},`pagination-ellipsis__${u}`):e.jsx("div",{onClick:()=>c(a),className:`pagination__page ${s===a?"active":""}`,children:a},`pagination-page__${u}`))};return e.jsxs(B,{className:"pagination",children:[e.jsx(
|
|
82
|
+
`,O=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:_=()=>{},page:s=1,handlePage:c=()=>{},totalPage:r},d)=>{var h,l;const p=()=>{s>1&&(c==null||c(s-1))},f=()=>{s<r&&(c==null||c(s+1))},x=()=>{const t=[];if(r<=7)for(let a=1;a<=r;a++)t.push(a);else s<=3?t.push(1,2,3,"...",r):s>=r-2?t.push(1,"...",r-2,r-1,r):t.push(1,2,3,"...",r);return t==null?void 0:t.map((a,u)=>a==="..."?e.jsx("div",{className:"pagination__page ellipsis",children:a},`pagination-ellipsis__${u}`):e.jsx("div",{onClick:()=>c(a),className:`pagination__page ${s===a?"active":""}`,children:a},`pagination-page__${u}`))};return e.jsxs(B,{className:"pagination",children:[e.jsx(z,{color:"neutral",control:((h=o==null?void 0:o.find(t=>(t==null?void 0:t.code)===m))==null?void 0:h.name)||((l=o[0])==null?void 0:l.name),placement:"bottom",zIndex:1001,className:"pagination__per-page",children:o==null?void 0:o.map((t,a)=>e.jsx(I,{active:(t==null?void 0:t.code)===(m==null?void 0:m.code),className:"sort-by__item",onClick:()=>_(t),children:t==null?void 0:t.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"})}),x(),e.jsx("div",{className:`pagination__page ${s===r?"disabled":""}`,onClick:f,children:e.jsx(j,{icon:" mng-lnc-chevron--right"})})]})]})}),ee=P.styled.div`
|
|
83
83
|
display: flex;
|
|
84
84
|
align-items: flex-start;
|
|
85
85
|
gap: 2rem;
|
|
@@ -255,6 +255,7 @@
|
|
|
255
255
|
font-style: normal;
|
|
256
256
|
font-weight: 500;
|
|
257
257
|
line-height: 1.25rem;
|
|
258
|
+
${C.truncateTextInRows(2)}
|
|
258
259
|
}
|
|
259
260
|
|
|
260
261
|
& .item__description {
|
|
@@ -316,4 +317,4 @@
|
|
|
316
317
|
display: none;
|
|
317
318
|
}
|
|
318
319
|
}
|
|
319
|
-
`,
|
|
320
|
+
`,L=q.forwardRef(({mainTitle:o,sideTitle:m,tags:_,selectedTag:s,handleSelectTag:c=()=>{},blogs:r,miniBlogs:d,products:p,blogsLoading:f=!1,productsLoading:x=!1,sortingOptions:h,sortBy:l,handleSortBy:t=()=>{},allTagText:a="All",searchPlaceholderText:u="Search blogs",timeToReadText:w="{0} min read",getBlogImageUrl:y=()=>{},handleSelectBlog:g=()=>{},handleSelectBlogTag:b=()=>{},handleShareBlog:N=()=>{},handleBookmarkBlog:k=()=>{},showAllButtonLink:$,showAllButtonText:A="Show all products",viewAllButtonText:R="View all (11)",viewAllButtonLink:ne,handleViewAll:D=()=>{},handleShowAll:E=()=>{},handleSelectProduct:M=()=>{},getProductImageUrl:F=()=>{},page:U,handlePage:H=()=>{},perPage:V,handlePerPage:X=()=>{},totalPage:v,perPageOptions:Z,handleSearch:G=()=>{}},re)=>e.jsxs(ee,{children:[e.jsxs("div",{className:"landing__main-content",children:[o&&e.jsx("div",{className:"main-content__title",children:o}),_&&e.jsx(Q.FaqSectionTags,{tags:_,allTagText:a,selectedTagCode:s,onSelectTag:c}),e.jsxs("div",{className:"main-content__actions",children:[e.jsx(J,{className:"main-content__search",placeholder:u,debounceTime:200,prefix:e.jsx(j,{icon:" mng-lnc-search",sizeInUnits:"1.25rem",className:"main-content__search-prefix"}),color:"neutral",onChange:G}),e.jsx(z,{color:"neutral",control:l==null?void 0:l.name,zIndex:1001,className:"main-content__sort-by",children:h==null?void 0:h.map((i,T)=>e.jsx(I,{active:(i==null?void 0:i.code)===(l==null?void 0:l.code),className:"sort-by__item",onClick:()=>t(i),children:i==null?void 0:i.name},`blog-epxlore-section-sorting-option__${T+1}`))})]}),e.jsxs("div",{className:"main-content__items",children:[r&&(r==null?void 0:r.length)>0&&e.jsx(S,{timeToReadText:w,items:r==null?void 0:r.slice(0,5),isLoading:f,getImage:y,onSelectCard:g,onSelectOption:b,onShare:N,onBookmark:k}),e.jsx("div",{className:"main-content__divider"}),p&&(p==null?void 0:p.length)>0&&e.jsx(W,{buttonText:A,buttonLink:$,onButtonAction:E,onSelectCard:M,items:p,isLoading:x,getImage:F,isHighlight:!0}),e.jsx("div",{className:"main-content__divider"}),r&&(r==null?void 0:r.length)>0&&e.jsx(S,{timeToReadText:w,items:r==null?void 0:r.slice(5),isLoading:f,getImage:y,onSelectCard:g,onSelectOption:b,onShare:N,onBookmark:k})]}),v&&v>1&&e.jsx(O,{perPageOptions:Z,perPage:V,handlePerPage:X,page:U,handlePage:H,totalPage:v})]}),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((i,T)=>e.jsxs("div",{className:"side-content__item",onClick:()=>g(i),children:[e.jsx("img",{src:y(i==null?void 0:i.imageUrl,i==null?void 0:i.uuid)||null,alt:`Mini blog ${T+1}`,className:"item__image"}),e.jsxs("div",{className:"item__content",children:[e.jsx("div",{className:"item__title",children:i==null?void 0:i.title}),e.jsx("div",{className:"item__description",children:C.formatLocaleDateString(i==null?void 0:i.publishedAt)})]})]}))}),e.jsx(K,{onClick:D,className:"side-content__link",children:R})]})]})]}));L.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=L;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as l, jsx as n, Fragment as J } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as I } from "react";
|
|
3
3
|
import { P as e } from "./index-CblbdqjE.js";
|
|
4
|
-
import { s as
|
|
5
|
-
import
|
|
4
|
+
import { p as K, s as Q } from "./utils-BPdU4_1q.js";
|
|
5
|
+
import W from "./TextInput.js";
|
|
6
6
|
import N from "./Icon.js";
|
|
7
|
-
import
|
|
7
|
+
import Y from "./Link.js";
|
|
8
8
|
import L from "./DropdownMenu.js";
|
|
9
9
|
import $ from "./DropdownItem.js";
|
|
10
|
-
import { F as
|
|
11
|
-
import
|
|
10
|
+
import { F as B } from "./tag-CtleOqEC.js";
|
|
11
|
+
import O from "./BlogProductCardsSection.js";
|
|
12
12
|
import { s as A } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
13
13
|
import z from "./BlogListSection.js";
|
|
14
|
-
import { M as
|
|
15
|
-
const
|
|
14
|
+
import { M as P } from "./consts-BuFChS64.js";
|
|
15
|
+
const ee = A.div`
|
|
16
16
|
display: flex;
|
|
17
17
|
justify-content: space-between;
|
|
18
18
|
align-items: center;
|
|
@@ -93,7 +93,7 @@ const O = A.div`
|
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
`,
|
|
96
|
+
`, ne = I(
|
|
97
97
|
({
|
|
98
98
|
perPageOptions: o = [
|
|
99
99
|
{ code: 10, name: "Show 10 items" },
|
|
@@ -104,15 +104,15 @@ const O = A.div`
|
|
|
104
104
|
handlePerPage: u = () => {
|
|
105
105
|
},
|
|
106
106
|
page: c = 1,
|
|
107
|
-
handlePage:
|
|
107
|
+
handlePage: s = () => {
|
|
108
108
|
},
|
|
109
109
|
totalPage: t
|
|
110
110
|
}, m) => {
|
|
111
|
-
var _,
|
|
111
|
+
var _, d;
|
|
112
112
|
const h = () => {
|
|
113
|
-
c > 1 && (
|
|
113
|
+
c > 1 && (s == null || s(c - 1));
|
|
114
114
|
}, g = () => {
|
|
115
|
-
c < t && (
|
|
115
|
+
c < t && (s == null || s(c + 1));
|
|
116
116
|
}, v = () => {
|
|
117
117
|
const r = [];
|
|
118
118
|
if (t <= 7)
|
|
@@ -130,19 +130,19 @@ const O = A.div`
|
|
|
130
130
|
) : /* @__PURE__ */ n(
|
|
131
131
|
"div",
|
|
132
132
|
{
|
|
133
|
-
onClick: () =>
|
|
133
|
+
onClick: () => s(a),
|
|
134
134
|
className: `pagination__page ${c === a ? "active" : ""}`,
|
|
135
135
|
children: a
|
|
136
136
|
},
|
|
137
137
|
`pagination-page__${p}`
|
|
138
138
|
));
|
|
139
139
|
};
|
|
140
|
-
return /* @__PURE__ */
|
|
140
|
+
return /* @__PURE__ */ l(ee, { className: "pagination", children: [
|
|
141
141
|
/* @__PURE__ */ n(
|
|
142
142
|
L,
|
|
143
143
|
{
|
|
144
144
|
color: "neutral",
|
|
145
|
-
control: ((_ = o == null ? void 0 : o.find((r) => (r == null ? void 0 : r.code) === f)) == null ? void 0 : _.name) || ((
|
|
145
|
+
control: ((_ = o == null ? void 0 : o.find((r) => (r == null ? void 0 : r.code) === f)) == null ? void 0 : _.name) || ((d = o[0]) == null ? void 0 : d.name),
|
|
146
146
|
placement: "bottom",
|
|
147
147
|
zIndex: 1001,
|
|
148
148
|
className: "pagination__per-page",
|
|
@@ -158,7 +158,7 @@ const O = A.div`
|
|
|
158
158
|
))
|
|
159
159
|
}
|
|
160
160
|
),
|
|
161
|
-
/* @__PURE__ */
|
|
161
|
+
/* @__PURE__ */ l("div", { className: "pagination__pages", children: [
|
|
162
162
|
/* @__PURE__ */ n(
|
|
163
163
|
"div",
|
|
164
164
|
{
|
|
@@ -179,7 +179,7 @@ const O = A.div`
|
|
|
179
179
|
] })
|
|
180
180
|
] });
|
|
181
181
|
}
|
|
182
|
-
),
|
|
182
|
+
), te = A.div`
|
|
183
183
|
display: flex;
|
|
184
184
|
align-items: flex-start;
|
|
185
185
|
gap: 2rem;
|
|
@@ -355,6 +355,7 @@ const O = A.div`
|
|
|
355
355
|
font-style: normal;
|
|
356
356
|
font-weight: 500;
|
|
357
357
|
line-height: 1.25rem;
|
|
358
|
+
${K(2)}
|
|
358
359
|
}
|
|
359
360
|
|
|
360
361
|
& .item__description {
|
|
@@ -369,7 +370,7 @@ const O = A.div`
|
|
|
369
370
|
}
|
|
370
371
|
}
|
|
371
372
|
|
|
372
|
-
@media (max-width: ${
|
|
373
|
+
@media (max-width: ${P + "px"}) {
|
|
373
374
|
flex-direction: column;
|
|
374
375
|
|
|
375
376
|
& .landing__main-content {
|
|
@@ -416,13 +417,13 @@ const O = A.div`
|
|
|
416
417
|
display: none;
|
|
417
418
|
}
|
|
418
419
|
}
|
|
419
|
-
`,
|
|
420
|
+
`, re = I(
|
|
420
421
|
({
|
|
421
422
|
mainTitle: o,
|
|
422
423
|
sideTitle: f,
|
|
423
424
|
tags: u,
|
|
424
425
|
selectedTag: c,
|
|
425
|
-
handleSelectTag:
|
|
426
|
+
handleSelectTag: s = () => {
|
|
426
427
|
},
|
|
427
428
|
blogs: t,
|
|
428
429
|
miniBlogs: m,
|
|
@@ -430,7 +431,7 @@ const O = A.div`
|
|
|
430
431
|
blogsLoading: g = !1,
|
|
431
432
|
productsLoading: v = !1,
|
|
432
433
|
sortingOptions: _,
|
|
433
|
-
sortBy:
|
|
434
|
+
sortBy: d,
|
|
434
435
|
handleSortBy: r = () => {
|
|
435
436
|
},
|
|
436
437
|
allTagText: a = "All",
|
|
@@ -442,24 +443,24 @@ const O = A.div`
|
|
|
442
443
|
},
|
|
443
444
|
handleSelectBlogTag: S = () => {
|
|
444
445
|
},
|
|
445
|
-
handleShareBlog:
|
|
446
|
+
handleShareBlog: T = () => {
|
|
446
447
|
},
|
|
447
|
-
handleBookmarkBlog:
|
|
448
|
+
handleBookmarkBlog: C = () => {
|
|
448
449
|
},
|
|
449
450
|
showAllButtonLink: j,
|
|
450
451
|
showAllButtonText: M = "Show all products",
|
|
451
452
|
viewAllButtonText: D = "View all (11)",
|
|
452
|
-
viewAllButtonLink:
|
|
453
|
+
viewAllButtonLink: ie,
|
|
453
454
|
handleViewAll: E = () => {
|
|
454
455
|
},
|
|
455
456
|
handleShowAll: F = () => {
|
|
456
457
|
},
|
|
457
|
-
handleSelectProduct:
|
|
458
|
+
handleSelectProduct: R = () => {
|
|
458
459
|
},
|
|
459
|
-
getProductImageUrl:
|
|
460
|
+
getProductImageUrl: U = () => {
|
|
460
461
|
},
|
|
461
|
-
page:
|
|
462
|
-
handlePage:
|
|
462
|
+
page: q,
|
|
463
|
+
handlePage: H = () => {
|
|
463
464
|
},
|
|
464
465
|
perPage: V,
|
|
465
466
|
handlePerPage: X = () => {
|
|
@@ -468,21 +469,21 @@ const O = A.div`
|
|
|
468
469
|
perPageOptions: Z,
|
|
469
470
|
handleSearch: G = () => {
|
|
470
471
|
}
|
|
471
|
-
},
|
|
472
|
-
/* @__PURE__ */
|
|
472
|
+
}, ae) => /* @__PURE__ */ l(te, { children: [
|
|
473
|
+
/* @__PURE__ */ l("div", { className: "landing__main-content", children: [
|
|
473
474
|
o && /* @__PURE__ */ n("div", { className: "main-content__title", children: o }),
|
|
474
475
|
u && /* @__PURE__ */ n(
|
|
475
|
-
|
|
476
|
+
B,
|
|
476
477
|
{
|
|
477
478
|
tags: u,
|
|
478
479
|
allTagText: a,
|
|
479
|
-
|
|
480
|
-
onSelectTag:
|
|
480
|
+
selectedTagCode: c,
|
|
481
|
+
onSelectTag: s
|
|
481
482
|
}
|
|
482
483
|
),
|
|
483
|
-
/* @__PURE__ */
|
|
484
|
+
/* @__PURE__ */ l("div", { className: "main-content__actions", children: [
|
|
484
485
|
/* @__PURE__ */ n(
|
|
485
|
-
|
|
486
|
+
W,
|
|
486
487
|
{
|
|
487
488
|
className: "main-content__search",
|
|
488
489
|
placeholder: p,
|
|
@@ -503,13 +504,13 @@ const O = A.div`
|
|
|
503
504
|
L,
|
|
504
505
|
{
|
|
505
506
|
color: "neutral",
|
|
506
|
-
control:
|
|
507
|
+
control: d == null ? void 0 : d.name,
|
|
507
508
|
zIndex: 1001,
|
|
508
509
|
className: "main-content__sort-by",
|
|
509
510
|
children: _ == null ? void 0 : _.map((i, b) => /* @__PURE__ */ n(
|
|
510
511
|
$,
|
|
511
512
|
{
|
|
512
|
-
active: (i == null ? void 0 : i.code) === (
|
|
513
|
+
active: (i == null ? void 0 : i.code) === (d == null ? void 0 : d.code),
|
|
513
514
|
className: "sort-by__item",
|
|
514
515
|
onClick: () => r(i),
|
|
515
516
|
children: i == null ? void 0 : i.name
|
|
@@ -519,7 +520,7 @@ const O = A.div`
|
|
|
519
520
|
}
|
|
520
521
|
)
|
|
521
522
|
] }),
|
|
522
|
-
/* @__PURE__ */
|
|
523
|
+
/* @__PURE__ */ l("div", { className: "main-content__items", children: [
|
|
523
524
|
t && (t == null ? void 0 : t.length) > 0 && /* @__PURE__ */ n(
|
|
524
525
|
z,
|
|
525
526
|
{
|
|
@@ -529,21 +530,21 @@ const O = A.div`
|
|
|
529
530
|
getImage: x,
|
|
530
531
|
onSelectCard: y,
|
|
531
532
|
onSelectOption: S,
|
|
532
|
-
onShare:
|
|
533
|
-
onBookmark:
|
|
533
|
+
onShare: T,
|
|
534
|
+
onBookmark: C
|
|
534
535
|
}
|
|
535
536
|
),
|
|
536
537
|
/* @__PURE__ */ n("div", { className: "main-content__divider" }),
|
|
537
538
|
h && (h == null ? void 0 : h.length) > 0 && /* @__PURE__ */ n(
|
|
538
|
-
|
|
539
|
+
O,
|
|
539
540
|
{
|
|
540
541
|
buttonText: M,
|
|
541
542
|
buttonLink: j,
|
|
542
543
|
onButtonAction: F,
|
|
543
|
-
onSelectCard:
|
|
544
|
+
onSelectCard: R,
|
|
544
545
|
items: h,
|
|
545
546
|
isLoading: v,
|
|
546
|
-
getImage:
|
|
547
|
+
getImage: U,
|
|
547
548
|
isHighlight: !0
|
|
548
549
|
}
|
|
549
550
|
),
|
|
@@ -557,51 +558,53 @@ const O = A.div`
|
|
|
557
558
|
getImage: x,
|
|
558
559
|
onSelectCard: y,
|
|
559
560
|
onSelectOption: S,
|
|
560
|
-
onShare:
|
|
561
|
-
onBookmark:
|
|
561
|
+
onShare: T,
|
|
562
|
+
onBookmark: C
|
|
562
563
|
}
|
|
563
564
|
)
|
|
564
565
|
] }),
|
|
565
566
|
w && w > 1 && /* @__PURE__ */ n(
|
|
566
|
-
|
|
567
|
+
ne,
|
|
567
568
|
{
|
|
568
569
|
perPageOptions: Z,
|
|
569
570
|
perPage: V,
|
|
570
571
|
handlePerPage: X,
|
|
571
|
-
page:
|
|
572
|
-
handlePage:
|
|
572
|
+
page: q,
|
|
573
|
+
handlePage: H,
|
|
573
574
|
totalPage: w
|
|
574
575
|
}
|
|
575
576
|
)
|
|
576
577
|
] }),
|
|
577
|
-
/* @__PURE__ */
|
|
578
|
+
/* @__PURE__ */ l("div", { className: "landing__side-content", children: [
|
|
578
579
|
f && /* @__PURE__ */ n("div", { className: "side-content__title", children: f }),
|
|
579
|
-
|
|
580
|
-
"div",
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
/* @__PURE__ */
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
580
|
+
m && (m == null ? void 0 : m.length) > 0 && /* @__PURE__ */ l(J, { children: [
|
|
581
|
+
/* @__PURE__ */ n("div", { className: "side-content__items", children: m == null ? void 0 : m.map((i, b) => /* @__PURE__ */ l(
|
|
582
|
+
"div",
|
|
583
|
+
{
|
|
584
|
+
className: "side-content__item",
|
|
585
|
+
onClick: () => y(i),
|
|
586
|
+
children: [
|
|
587
|
+
/* @__PURE__ */ n(
|
|
588
|
+
"img",
|
|
589
|
+
{
|
|
590
|
+
src: x(i == null ? void 0 : i.imageUrl, i == null ? void 0 : i.uuid) || null,
|
|
591
|
+
alt: `Mini blog ${b + 1}`,
|
|
592
|
+
className: "item__image"
|
|
593
|
+
}
|
|
594
|
+
),
|
|
595
|
+
/* @__PURE__ */ l("div", { className: "item__content", children: [
|
|
596
|
+
/* @__PURE__ */ n("div", { className: "item__title", children: i == null ? void 0 : i.title }),
|
|
597
|
+
/* @__PURE__ */ n("div", { className: "item__description", children: Q(i == null ? void 0 : i.publishedAt) })
|
|
598
|
+
] })
|
|
599
|
+
]
|
|
600
|
+
}
|
|
601
|
+
)) }),
|
|
602
|
+
/* @__PURE__ */ n(Y, { onClick: E, className: "side-content__link", children: D })
|
|
603
|
+
] })
|
|
601
604
|
] })
|
|
602
605
|
] })
|
|
603
606
|
);
|
|
604
|
-
|
|
607
|
+
re.propTypes = {
|
|
605
608
|
mainTitle: e.string,
|
|
606
609
|
sideTitle: e.string,
|
|
607
610
|
tags: e.array,
|
|
@@ -638,5 +641,5 @@ ne.propTypes = {
|
|
|
638
641
|
handleSearch: e.func
|
|
639
642
|
};
|
|
640
643
|
export {
|
|
641
|
-
|
|
644
|
+
re as default
|
|
642
645
|
};
|
package/dist/BlogListSection.cjs
CHANGED
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
|
|
54
54
|
& .wrapper__tags {
|
|
55
55
|
display: flex;
|
|
56
|
+
flex-wrap: wrap;
|
|
56
57
|
gap: 0.25rem;
|
|
57
58
|
|
|
58
59
|
& .wrapper__tag {
|
|
@@ -178,4 +179,4 @@
|
|
|
178
179
|
bottom: -1.25rem;
|
|
179
180
|
}
|
|
180
181
|
}
|
|
181
|
-
`,
|
|
182
|
+
`,x=p.memo(C),z=p.forwardRef(({timeToReadText:g="{0} min read",items:s,onSelectCard:i=()=>{},onSelectOption:a=()=>{},onShare:n=()=>{},onBookmark:l=()=>{},isLoading:f=!1,getImage:u=()=>{},isSeparated:c=!0},h)=>{const _=p.useMemo(()=>s==null?void 0:s.map((e,d)=>t.jsx(x,{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:g,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,isBookmarked:e==null?void 0:e.isBookmarked,onSelectCard:()=>i==null?void 0:i(e),onSelectOption:w=>a==null?void 0:a(w),onShare:()=>n==null?void 0:n(e),onBookmark:()=>l==null?void 0:l(e),imageUrl:u(e==null?void 0:e.imageUrl,e==null?void 0:e.uuid)||null},`blog-card-item__${d+1}`)),[s]);return t.jsx(P,{className:c?"separated":"",children:t.jsx(q.SuspenseBlogLarge,{isLoading:f,limit:5,keyPrefix:"blog-section",children:_})})});module.exports=z;
|
package/dist/BlogListSection.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),u=require("react"),w=require("./emotion-styled.browser.esm-BtEseadx.cjs"),k=require("./consts-goSZX3xP.cjs"),R=require("./useDetectMobile-zkbzoOGV.cjs"),r=require("./utils-DmMdPm9O.cjs"),
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),u=require("react"),w=require("./emotion-styled.browser.esm-BtEseadx.cjs"),k=require("./consts-goSZX3xP.cjs"),R=require("./useDetectMobile-zkbzoOGV.cjs"),r=require("./utils-DmMdPm9O.cjs"),y=require("./style-C_BRvopE.cjs"),T=require("./Button.cjs"),O=require("./index-DiIeF_76.cjs"),A=w.styled.div`
|
|
2
2
|
display: grid;
|
|
3
3
|
grid-template-columns: ${i=>`repeat(${i.limit}, minmax(0, 1fr))`};
|
|
4
4
|
gap: 1.25rem;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
@media (max-width: ${k.MOBILE_SIZE_PX+"px"}) {
|
|
7
7
|
grid-template-columns: repeat(1, 1fr);
|
|
8
8
|
}
|
|
9
|
-
`,
|
|
9
|
+
`,v=w.styled.div`
|
|
10
10
|
display: flex;
|
|
11
11
|
flex-direction: column;
|
|
12
12
|
width: 100%;
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
& img {
|
|
26
26
|
max-height: 11.0625rem;
|
|
27
27
|
min-height: 11.0625rem;
|
|
28
|
-
object-fit:
|
|
28
|
+
object-fit: fill;
|
|
29
29
|
width: 100%;
|
|
30
30
|
}
|
|
31
31
|
|
|
@@ -110,4 +110,4 @@
|
|
|
110
110
|
align-items: center;
|
|
111
111
|
gap: 1rem;
|
|
112
112
|
}
|
|
113
|
-
`,$=u.forwardRef((i,
|
|
113
|
+
`,$=u.forwardRef((i,a)=>{const{title:s,imageUrl:m,text:o,numberOfLikes:n,numberOfComments:h,timeToRead:p,publishedAt:c,tags:d,onCardClick:j,timeToReadText:f="{0} min read"}=i;return t.jsxs(v,{ref:a,className:"blog-card",onClick:j,children:[t.jsx(O.ProductImageWrapper,{src:m}),t.jsxs(S,{children:[t.jsxs("div",{className:"info-wr",children:[t.jsxs("div",{className:"info-wr-1",children:[t.jsxs("span",{children:[r.formatLocaleDateString(c)," "]}),t.jsx("span",{className:"small-dot",children:"●"}),p&&f?`${r.formatString(f,p)}`:"N/A"]}),t.jsxs("div",{className:"info-wr-2",children:[t.jsxs("span",{className:"info-wr-1",children:[t.jsx("i",{className:"mng mng-lnc-thumbs-up--filled"}),t.jsx("span",{children:r.getRoundedNumber(n)})]}),t.jsxs("span",{className:"info-wr-1",children:[t.jsx("i",{className:"mng mng-lnc-messages-filled"}),t.jsx("span",{children:r.getRoundedNumber(h)})]})]})]}),t.jsx("div",{className:"text-wr-title",children:s}),t.jsx("div",{className:"text-wr",children:o})]}),t.jsx("div",{className:"tags-wr",children:d==null?void 0:d.map((l,b)=>t.jsx(y.BlogTag,{color:l==null?void 0:l.color,children:l==null?void 0:l.name},b))})]})}),D=u.forwardRef(({},i)=>t.jsxs(v,{className:"blog-card",children:[t.jsx("div",{className:"skeleton-img"}),t.jsxs(S,{children:[t.jsx("div",{className:"info-wr"}),t.jsx("div",{className:"skeleton-title"}),t.jsx("div",{className:"info-wr-skeleton"})]})]})),q=({limit:i=3,isLoading:a=!1,keyPrefix:s})=>t.jsx(t.Fragment,{children:Array.from({length:i},(m,o)=>t.jsx(D,{isLoading:a},`${s}-skeleton-product-card-${o}`))}),B=({children:i,fallbackComponent:a=t.jsx(t.Fragment,{}),isLoading:s=!1,limit:m,keyPrefix:o})=>t.jsx(u.Suspense,{fallbackComponent:a,children:s===!0?t.jsx(q,{isLoading:s,limit:m,keyPrefix:o}):i}),N=u.memo($),L=u.forwardRef((i,a)=>{const{icon:s,title:m,onButtonAction:o,items:n,buttonText:h,timeToReadText:p,limit:c=3,onSelectCard:d=()=>{},isLoading:j=!1,buttonLink:f,getImage:l=()=>{}}=i,b=R.useDetectMobile(),C=u.useMemo(()=>t.jsx(t.Fragment,{children:b===!0?n==null?void 0:n.map((e,g)=>t.jsx(N,{title:e==null?void 0:e.title,text:e==null?void 0:e.description,titleSlug:e==null?void 0:e.titleSlug,numberOfLikes:e==null?void 0:e.numberOfLikes,numberOfComments:e==null?void 0:e.numberOfComments,publishedAt:e==null?void 0:e.publishedAt,timeToRead:e==null?void 0:e.timeToRead,timeToReadText:p,tags:e==null?void 0:e.tags,onCardClick:()=>d(e==null?void 0:e.titleSlug),imageUrl:l(e==null?void 0:e.imageUrl,e==null?void 0:e.uuid)||null},g)):n==null?void 0:n.slice(0,c).map((e,g)=>t.jsx(N,{title:e==null?void 0:e.title,imageUrl:l(e==null?void 0:e.imageUrl,e==null?void 0:e.uuid)||null,text:e==null?void 0:e.description,titleSlug:e==null?void 0:e.titleSlug,tags:e==null?void 0:e.tags,numberOfLikes:e==null?void 0:e.numberOfLikes,numberOfComments:e==null?void 0:e.numberOfComments,publishedAt:e==null?void 0:e.publishedAt,timeToRead:e==null?void 0:e.timeToRead,timeToReadText:p,onCardClick:()=>d(e==null?void 0:e.titleSlug)},g))}),[n,b,c,d]);return t.jsxs(y.RegulatTitleSectionWrapper,{ref:a,children:[t.jsxs("div",{className:"regular-title",children:[t.jsxs("div",{className:"regular-title-text",children:[r.isDefinedNotEmptyString(s)&&t.jsx("i",{className:s}),t.jsx("span",{children:m})]}),r.isDefinedNotEmptyString(h)&&r.isDefinedNotEmptyString(f)&&t.jsx(T,{type:"button",btnType:"tinted",color:"neutral",onClick:e=>{var g;(g=e==null?void 0:e.target)==null||g.blur(),o(f)},borderRadius:"curved",className:"button-link",children:h})]}),t.jsx(A,{limit:c,children:t.jsx(B,{isLoading:j,limit:c,keyPrefix:"explore-landing",children:C})})]})});module.exports=L;
|