@lanaco/lnc-react-ui 4.0.162 → 4.0.164
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/BlogExploreSection.cjs +43 -8
- package/dist/BlogExploreSection.js +303 -210
- package/dist/{CustomStyles-BwHfr4iM.cjs → CustomStyles-Q6et9atl.cjs} +4 -4
- package/dist/{CustomStyles-iconSXFL.js → CustomStyles-SyQRnjuy.js} +95 -95
- 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/FaqSection.cjs +1 -1
- package/dist/FaqSection.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/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{tag-cRMfP-SZ.js → tag-BtS5lWJ0.js} +15 -14
- package/dist/{tag-yputMSpE.cjs → tag-CmeZsPQt.cjs} +9 -8
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),x=require("react"),r=require("./index-BpbMKBf_.cjs"),oe=require("./useDetectMobile-zkbzoOGV.cjs"),P=require("./utils-Dl9xPH4c.cjs"),ce=require("./TextInput.cjs"),k=require("./Icon.cjs"),le=require("./Link.cjs"),$=require("./IconButton.cjs"),M=require("./DropdownMenu.cjs"),R=require("./DropdownItem.cjs"),de=require("./tag-CmeZsPQt.cjs"),me=require("./BlogProductCardsSection.cjs"),V=require("./emotion-styled.browser.esm-BtEseadx.cjs"),he=require("./index-BueKsXT8.cjs"),D=require("./BlogListSection.cjs"),pe=require("./consts-goSZX3xP.cjs"),ue=V.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
|
+
`,_e=x.forwardRef(({perPageOptions:l=[{code:10,name:"Show 10 items"},{code:25,name:"Show 25 items"},{code:50,name:"Show 50 items"}],perPage:u,handlePerPage:g=()=>{},page:s=1,handlePage:d=()=>{},totalPage:t},p)=>{var f,m;const _=()=>{s>1&&(d==null||d(s-1))},y=()=>{s<t&&(d==null||d(s+1))},b=()=>{const i=[];if(t<=7)for(let a=1;a<=t;a++)i.push(a);else s<=3?i.push(1,2,3,"...",t):s>=t-2?i.push(1,"...",t-2,t-1,t):i.push(1,2,3,"...",t);return i==null?void 0:i.map((a,v)=>a==="..."?e.jsx("div",{className:"pagination__page ellipsis",children:a},`pagination-ellipsis__${v}`):e.jsx("div",{onClick:()=>d(a),className:`pagination__page ${s===a?"active":""}`,children:a},`pagination-page__${v}`))};return e.jsxs(ue,{className:"pagination",children:[e.jsx(M,{color:"neutral",control:((f=l==null?void 0:l.find(i=>(i==null?void 0:i.code)===u))==null?void 0:f.name)||((m=l[0])==null?void 0:m.name),placement:"bottom",zIndex:1001,className:"pagination__per-page",children:l==null?void 0:l.map((i,a)=>e.jsx(R,{active:(i==null?void 0:i.code)===(u==null?void 0:u.code),className:"sort-by__item",onClick:()=>g(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:_,children:e.jsx(k,{icon:" mng-lnc-chevron--left"})}),b(),e.jsx("div",{className:`pagination__page ${s===t?"disabled":""}`,onClick:y,children:e.jsx(k,{icon:" mng-lnc-chevron--right"})})]})]})}),fe=V.styled.div`
|
|
83
83
|
display: flex;
|
|
84
84
|
align-items: flex-start;
|
|
85
85
|
gap: 2rem;
|
|
@@ -96,18 +96,44 @@
|
|
|
96
96
|
flex-direction: column;
|
|
97
97
|
align-items: flex-start;
|
|
98
98
|
gap: 1.5rem;
|
|
99
|
+
max-width: 50rem;
|
|
99
100
|
|
|
100
101
|
border-right: 1px solid var(--gray-200, #dddfe4);
|
|
101
102
|
padding-right: 2rem;
|
|
102
103
|
|
|
103
104
|
& .section__tags {
|
|
104
|
-
flex-wrap:
|
|
105
|
+
flex-wrap: nowrap;
|
|
106
|
+
width: 100%;
|
|
107
|
+
overflow-x: hidden;
|
|
108
|
+
white-space: nowrap;
|
|
105
109
|
}
|
|
106
110
|
|
|
107
111
|
& .pagination {
|
|
108
112
|
padding: 1.25rem 0;
|
|
109
113
|
}
|
|
110
114
|
|
|
115
|
+
& .main-content__heading {
|
|
116
|
+
display: flex;
|
|
117
|
+
justify-content: space-between;
|
|
118
|
+
width: 100%;
|
|
119
|
+
|
|
120
|
+
& .main-content__tags-nav {
|
|
121
|
+
display: flex;
|
|
122
|
+
gap: 0.25rem;
|
|
123
|
+
|
|
124
|
+
& .main-content__tag-nav {
|
|
125
|
+
&:not(:disabled) {
|
|
126
|
+
color: var(--gray-950, #14161a);
|
|
127
|
+
background: var(--neutral-95004, rgba(20, 22, 26, 0.04));
|
|
128
|
+
|
|
129
|
+
&:hover {
|
|
130
|
+
background: var(--neutral-95008, rgba(20, 22, 26, 0.08));
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
111
137
|
& .main-content__title {
|
|
112
138
|
color: var(--gray-950, #14161a);
|
|
113
139
|
font-size: 1.5rem;
|
|
@@ -118,7 +144,11 @@
|
|
|
118
144
|
|
|
119
145
|
& .tags__item {
|
|
120
146
|
&:not(.active) {
|
|
121
|
-
background: var(--neutral-
|
|
147
|
+
background: var(--neutral-95004, rgba(20, 22, 26, 0.04));
|
|
148
|
+
|
|
149
|
+
&:hover {
|
|
150
|
+
background: var(--neutral-95008, rgba(20, 22, 26, 0.08));
|
|
151
|
+
}
|
|
122
152
|
}
|
|
123
153
|
}
|
|
124
154
|
|
|
@@ -255,7 +285,7 @@
|
|
|
255
285
|
font-style: normal;
|
|
256
286
|
font-weight: 500;
|
|
257
287
|
line-height: 1.25rem;
|
|
258
|
-
${
|
|
288
|
+
${P.truncateTextInRows(2)}
|
|
259
289
|
}
|
|
260
290
|
|
|
261
291
|
& .item__description {
|
|
@@ -270,16 +300,19 @@
|
|
|
270
300
|
}
|
|
271
301
|
}
|
|
272
302
|
|
|
273
|
-
@media (max-width: ${
|
|
303
|
+
@media (max-width: ${pe.MOBILE_SIZE_PX+"px"}) {
|
|
274
304
|
flex-direction: column;
|
|
275
305
|
|
|
276
306
|
& .landing__main-content {
|
|
277
307
|
width: 100%;
|
|
308
|
+
max-width: 100%;
|
|
278
309
|
padding-right: 0;
|
|
279
310
|
border-right: none;
|
|
280
311
|
|
|
281
312
|
& .section__tags {
|
|
282
|
-
|
|
313
|
+
width: 100%;
|
|
314
|
+
overflow-x: auto;
|
|
315
|
+
white-space: nowrap;
|
|
283
316
|
}
|
|
284
317
|
|
|
285
318
|
& .main-content__actions {
|
|
@@ -287,6 +320,8 @@
|
|
|
287
320
|
}
|
|
288
321
|
|
|
289
322
|
& .main-content__items {
|
|
323
|
+
width: 100%;
|
|
324
|
+
|
|
290
325
|
& .main-content__divider {
|
|
291
326
|
display: none;
|
|
292
327
|
}
|
|
@@ -317,4 +352,4 @@
|
|
|
317
352
|
display: none;
|
|
318
353
|
}
|
|
319
354
|
}
|
|
320
|
-
`,
|
|
355
|
+
`,W=x.forwardRef(({mainTitle:l,sideTitle:u,tags:g,selectedTag:s,handleSelectTag:d=()=>{},blogs:t,miniBlogs:p,products:_,blogsLoading:y=!1,productsLoading:b=!1,sortingOptions:f,sortBy:m,handleSortBy:i=()=>{},allTagText:a="All",searchPlaceholderText:v="Search blogs",timeToReadText:C="{0} min read",getBlogImageUrl:w=()=>{},handleSelectBlog:T=()=>{},handleSelectBlogTag:q=()=>{},handleShareBlog:L=()=>{},showAllButtonLink:E,showAllButtonText:F="Show all products",viewAllButtonText:U="View all (11)",handleViewAll:H=()=>{},handleShowAll:X=()=>{},handleSelectProduct:Z=()=>{},getProductImageUrl:G=()=>{},page:J,handlePage:j=()=>{},perPage:K,handlePerPage:Q=()=>{},totalPage:N,perPageOptions:Y,handleSearch:B=()=>{},onBookmark:A=()=>{},bookmarkComponent:z=e.jsx(e.Fragment,{}),componentName:S},O)=>{const ee=n=>{document.getElementById("landing__container").scrollIntoView({behavior:"smooth",block:"start"}),j==null||j(n)},o=x.useRef(null),ne=oe.useDetectMobile(),[h,re]=x.useState({arrowsVisible:!1,leftArrowDisabled:!1,rightArrowDisabled:!1});x.useEffect(()=>{const n=o==null?void 0:o.current;if(!n)return;const c=()=>{const ae=n.scrollWidth-n.clientWidth;re(se=>({...se,arrowsVisible:n.clientWidth<n.scrollWidth,leftArrowDisabled:n.scrollLeft<=0,rightArrowDisabled:n.scrollLeft>=ae}))},I=new ResizeObserver(c);return I.observe(n),c(),n.addEventListener("scroll",c),()=>{I.disconnect(),n.removeEventListener("scroll",c)}},[]);const te=()=>{var n;(n=o==null?void 0:o.current)==null||n.scrollBy({left:100,behavior:"smooth"})},ie=()=>{var n;(n=o==null?void 0:o.current)==null||n.scrollBy({left:-100,behavior:"smooth"})};return e.jsxs(fe,{ref:O,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:l}),!ne&&(h==null?void 0:h.arrowsVisible)&&e.jsxs("div",{className:"main-content__tags-nav",children:[e.jsx($,{icon:"chevron-left",borderRadius:"curved",btnType:"tinted",color:"neutral",disabled:h==null?void 0:h.leftArrowDisabled,className:"main-content__tag-nav",onClick:ie}),e.jsx($,{icon:"chevron-right",borderRadius:"curved",btnType:"tinted",color:"neutral",disabled:h==null?void 0:h.rightArrowDisabled,className:"main-content__tag-nav",onClick:te})]})]}),g&&e.jsx(de.FaqSectionTags,{ref:o,tags:g,allTagText:a,selectedTagCode:s,onSelectTag:d}),e.jsxs("div",{className:"main-content__actions",children:[e.jsx(ce,{className:"main-content__search",placeholder:v,debounceTime:200,prefix:e.jsx(k,{icon:" mng-lnc-search",sizeInUnits:"1.25rem",className:"main-content__search-prefix"}),color:"neutral",onChange:B}),e.jsx(M,{color:"neutral",control:m==null?void 0:m.name,zIndex:1001,className:"main-content__sort-by",children:f==null?void 0:f.map((n,c)=>e.jsx(R,{active:(n==null?void 0:n.code)===(m==null?void 0:m.code),className:"sort-by__item",onClick:()=>i(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(D,{timeToReadText:C,items:t==null?void 0:t.slice(0,5),isLoading:y,getImage:w,onSelectCard:T,onSelectOption:q,onShare:L,onBookmark:A,bookmarkComponent:z,componentName:S}),e.jsx("div",{className:"main-content__divider"}),_&&(_==null?void 0:_.length)>0&&e.jsx(me,{buttonText:F,buttonLink:E,onButtonAction:X,onSelectCard:Z,items:_,isLoading:b,getImage:G,isHighlight:!0,componentName:S}),e.jsx("div",{className:"main-content__divider"}),t&&(t==null?void 0:t.length)>0&&e.jsx(D,{timeToReadText:C,items:t==null?void 0:t.slice(5),isLoading:y,getImage:w,onSelectCard:T,onSelectOption:q,onShare:L,onBookmark:A,bookmarkComponent:z,componentName:S})]}),N&&N>1&&e.jsx(_e,{perPageOptions:Y,perPage:K,handlePerPage:Q,page:J,handlePage:ee,totalPage:N})]}),e.jsxs("div",{className:"landing__side-content",children:[u&&e.jsx("div",{className:"side-content__title",children:u}),p&&(p==null?void 0:p.length)>0&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"side-content__items",children:p==null?void 0:p.map((n,c)=>e.jsx(x.Fragment,{children:e.jsxs("div",{className:"side-content__item",onClick:()=>T(n),children:[e.jsx(he.ProductImageWrapper,{src:w(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:P.formatLocaleDateString(n==null?void 0:n.publishedAt)})]})]})},`mini_blg_${c}`))}),e.jsx(le,{onClick:H,className:"side-content__link",children:U})]})]})]})});W.propTypes={mainTitle:r.PropTypes.string,sideTitle:r.PropTypes.string,tags:r.PropTypes.array,selectedTag:r.PropTypes.any,handleSelectTag:r.PropTypes.func,blogs:r.PropTypes.array,miniBlogs:r.PropTypes.array,products:r.PropTypes.array,blogsLoading:r.PropTypes.bool,productsLoading:r.PropTypes.bool,sortingOptions:r.PropTypes.array,sortBy:r.PropTypes.any,handleSortBy:r.PropTypes.func,allTagText:r.PropTypes.string,searchPlaceholderText:r.PropTypes.string,timeToReadText:r.PropTypes.string,getBlogImageUrl:r.PropTypes.func,handleSelectBlog:r.PropTypes.func,handleSelectBlogTag:r.PropTypes.func,handleShareBlog:r.PropTypes.func,handleBookmarkBlog:r.PropTypes.func,showAllButtonLink:r.PropTypes.string,showAllButtonText:r.PropTypes.string,viewAllButtonText:r.PropTypes.string,handleShowAll:r.PropTypes.func,handleSelectProduct:r.PropTypes.func,getProductImageUrl:r.PropTypes.func,page:r.PropTypes.number,handlePage:r.PropTypes.func,perPage:r.PropTypes.any,handlePerPage:r.PropTypes.func,totalPage:r.PropTypes.number,perPageOptions:r.PropTypes.array,handleSearch:r.PropTypes.func};module.exports=W;
|