@lanaco/lnc-react-ui 4.0.217 → 4.0.218

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.
@@ -1,4 +1,4 @@
1
- "use strict";const e=require("react/jsx-runtime"),x=require("react"),se=require("./useDetectMobile-DYV6V1yw.cjs"),M=require("./utils-CITgSxXe.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-DSnhWWHE.cjs"),de=require("./BlogProductCardsSection.cjs"),F=require("./emotion-styled.browser.esm-BtEseadx.cjs"),me=require("./index-DsINTjQk.cjs"),T=require("./BlogListSection.cjs"),_e=require("./breakpoints-CcVm-gVm.cjs"),he=F.styled.div`
1
+ "use strict";const e=require("react/jsx-runtime"),x=require("react"),ce=require("./useDetectMobile-DYV6V1yw.cjs"),M=require("./utils-CITgSxXe.cjs"),oe=require("./TextInput.cjs"),S=require("./Icon.cjs"),le=require("./Link.cjs"),L=require("./IconButton.cjs"),V=require("./DropdownMenu.cjs"),W=require("./DropdownItem.cjs"),de=require("./tag-DSnhWWHE.cjs"),me=require("./BlogProductCardsSection.cjs"),F=require("./emotion-styled.browser.esm-BtEseadx.cjs"),_e=require("./index-DsINTjQk.cjs"),T=require("./BlogListSection.cjs"),he=require("./breakpoints-CcVm-gVm.cjs"),ue=F.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
- `,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=F.styled.div`
82
+ `,fe=x.forwardRef(({perPageOptions:o=[{code:10,name:"Show 10 items"},{code:25,name:"Show 25 items"},{code:50,name:"Show 50 items"}],perPage:u,handlePerPage:g=()=>{},page:a=1,handlePage:l=()=>{},totalPage:t},_)=>{var d,b;const f=()=>{a>1&&(l==null||l(a-1))},p=()=>{a<t&&(l==null||l(a+1))},h=(()=>{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,v)=>i==="..."?e.jsx("div",{className:"pagination__page ellipsis",children:i},`pagination-ellipsis__${v}`):e.jsx("div",{onClick:()=>l(i),className:`pagination__page ${a===i?"active":""}`,children:i},`pagination-page__${v}`))})();return e.jsxs(ue,{className:"pagination",children:[e.jsx(V,{color:"neutral",control:((d=o==null?void 0:o.find(r=>(r==null?void 0:r.code)===u))==null?void 0:d.name)||((b=o[0])==null?void 0:b.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)===(u==null?void 0:u.code),className:"sort-by__item",onClick:()=>g(r),children:r==null?void 0:r.name},`blog-epxlore-section-per-page-option__${i+1}`))}),(h==null?void 0:h.length)>0&&e.jsxs("div",{className:"pagination__pages",children:[e.jsx("div",{className:`pagination__page ${a===1?"disabled":""}`,onClick:f,children:e.jsx(S,{icon:" mng-lnc-chevron--left"})}),h,e.jsx("div",{className:`pagination__page ${a===t?"disabled":""}`,onClick:p,children:e.jsx(S,{icon:" mng-lnc-chevron--right"})})]})]})}),xe=F.styled.div`
83
83
  display: flex;
84
84
  align-items: flex-start;
85
85
  gap: 2rem;
@@ -300,7 +300,7 @@
300
300
  }
301
301
  }
302
302
 
303
- @media ${_e.down("S")} {
303
+ @media ${he.down("S")} {
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
- `,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:R,showAllButtonText:E="Show all products",viewAllButtonText:H="View all (11)",handleViewAll:G=()=>{},handleShowAll:J=()=>{},handleSelectProduct:K=()=>{},getProductImageUrl:Q=()=>{},page:U,handlePage:j=()=>{},perPage:X,handlePerPage:Y=()=>{},totalPage:N,perPageOptions:Z,handleSearch:O=()=>{},onBookmark:D=()=>{},bookmarkComponent:A=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}))},I=new ResizeObserver(c);return I.observe(n),c(),n.addEventListener("scroll",c),()=>{I.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:A,componentName:k,LinkComponent:S}),e.jsx("div",{className:"main-content__divider"}),u&&(u==null?void 0:u.length)>0&&e.jsx(de,{buttonText:E,buttonLink:R,onButtonAction:J,onSelectCard:K,items:u,isLoading:w,getImage:Q,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:A,componentName:k,LinkComponent:S})]}),N&&N>1&&e.jsx(ue,{perPageOptions:Z,perPage:X,handlePerPage:Y,page:U,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:G,className:"side-content__link",children:H})]})]})]})});module.exports=xe;
355
+ `,ve=x.forwardRef(({mainTitle:o,sideTitle:u,tags:g,selectedTag:a,handleSelectTag:l=()=>{},blogs:t,miniBlogs:_,products:f,blogsLoading:p=!1,productsLoading:q=!1,sortingOptions:h,sortBy:d,handleSortBy:b=()=>{},allTagText:r="All",searchPlaceholderText:i="Search blogs",timeToReadText:v="{0} min read",getBlogImageUrl:w=()=>{},handleSelectBlog:y=()=>{},handleSelectBlogTag:C=()=>{},handleShareBlog:z=()=>{},showAllButtonLink:R,showAllButtonText:E="Show all products",viewAllButtonText:H="View all (11)",handleViewAll:G=()=>{},handleShowAll:J=()=>{},handleSelectProduct:K=()=>{},getProductImageUrl:Q=()=>{},page:U,handlePage:j=()=>{},perPage:X,handlePerPage:Y=()=>{},totalPage:$=0,perPageOptions:Z,handleSearch:O=()=>{},onBookmark:D=()=>{},bookmarkComponent:A=e.jsx(e.Fragment,{}),componentName:N,LinkComponent:k,showPerPage:B=!1},P)=>{const ee=n=>{document.getElementById("landing__container").scrollIntoView({behavior:"smooth",block:"start"}),j==null||j(n)},s=x.useRef(null),ne=ce.useDetectMobile(),[m,te]=x.useState({arrowsVisible:!1,leftArrowDisabled:!1,rightArrowDisabled:!1});x.useEffect(()=>{const n=s==null?void 0:s.current;if(!n)return;const c=()=>{const ae=n.scrollWidth-n.clientWidth;te(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 re=()=>{var n;(n=s==null?void 0:s.current)==null||n.scrollBy({left:100,behavior:"smooth"})},ie=()=>{var n;(n=s==null?void 0:s.current)==null||n.scrollBy({left:-100,behavior:"smooth"})};return e.jsxs(xe,{ref:P,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}),!ne&&(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:ie}),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:re})]})]}),g&&e.jsx(de.FaqSectionTags,{ref:s,tags:g,allTagText:r,selectedTagCode:a,onSelectTag:l}),e.jsxs("div",{className:"main-content__actions",children:[e.jsx(oe,{className:"main-content__search",placeholder:i,debounceTime:200,prefix:e.jsx(S,{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:h==null?void 0:h.map((n,c)=>e.jsx(W,{active:(n==null?void 0:n.code)===(d==null?void 0:d.code),className:"sort-by__item",onClick:()=>b(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:v,items:t==null?void 0:t.slice(0,5),isLoading:p,getImage:w,onSelectCard:y,onSelectOption:C,onShare:z,onBookmark:D,bookmarkComponent:A,componentName:N,LinkComponent:k}),e.jsx("div",{className:"main-content__divider"}),f&&(f==null?void 0:f.length)>0&&e.jsx(me,{buttonText:E,buttonLink:R,onButtonAction:J,onSelectCard:K,items:f,isLoading:q,getImage:Q,isHighlight:!0,componentName:N,LinkComponent:k}),e.jsx("div",{className:"main-content__divider"}),t&&(t==null?void 0:t.length)>0&&e.jsx(T,{timeToReadText:v,items:t==null?void 0:t.slice(5),isLoading:p,getImage:w,onSelectCard:y,onSelectOption:C,onShare:z,onBookmark:D,bookmarkComponent:A,componentName:N,LinkComponent:k})]}),($>1||B)&&e.jsx(fe,{perPageOptions:Z,perPage:X,handlePerPage:Y,page:U,handlePage:ee,totalPage:$})]}),e.jsxs("div",{className:"landing__side-content",children:[u&&e.jsx("div",{className:"side-content__title",children:u}),_&&(_==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(_e.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:M.formatLocaleDateString(n==null?void 0:n.publishedAt)})]})]})},`mini_blg_${c}`))}),e.jsx(le,{onClick:G,className:"side-content__link",children:H})]})]})]})});module.exports=ve;
@@ -1,20 +1,20 @@
1
1
  import { jsxs as a, jsx as n, Fragment as I } from "react/jsx-runtime";
2
- import { forwardRef as W, useRef as oe, useState as le, useEffect as se, Fragment as de } from "react";
3
- import { u as me } from "./useDetectMobile-CcVo3PNi.js";
4
- import { n as he, q as _e } from "./utils-B2fsQ6PS.js";
5
- import fe from "./TextInput.js";
6
- import z from "./Icon.js";
7
- import ue from "./Link.js";
2
+ import { forwardRef as W, useRef as le, useState as se, useEffect as de, Fragment as me } from "react";
3
+ import { u as he } from "./useDetectMobile-CcVo3PNi.js";
4
+ import { n as _e, q as fe } from "./utils-B2fsQ6PS.js";
5
+ import ue from "./TextInput.js";
6
+ import C from "./Icon.js";
7
+ import ve from "./Link.js";
8
8
  import F from "./IconButton.js";
9
9
  import M from "./DropdownMenu.js";
10
10
  import q from "./DropdownItem.js";
11
- import { F as ve } from "./tag-Bi8gg6hJ.js";
12
- import pe from "./BlogProductCardsSection.js";
11
+ import { F as pe } from "./tag-Bi8gg6hJ.js";
12
+ import ge from "./BlogProductCardsSection.js";
13
13
  import { s as E } from "./emotion-styled.browser.esm-BNN1dTl3.js";
14
- import { P as ge } from "./index-BvMY2TbK.js";
14
+ import { P as xe } from "./index-BvMY2TbK.js";
15
15
  import V from "./BlogListSection.js";
16
- import { d as xe } from "./breakpoints-ff0SIcV3.js";
17
- const we = E.div`
16
+ import { d as we } from "./breakpoints-ff0SIcV3.js";
17
+ const be = E.div`
18
18
  display: flex;
19
19
  justify-content: space-between;
20
20
  align-items: center;
@@ -95,40 +95,40 @@ const we = E.div`
95
95
  }
96
96
  }
97
97
  }
98
- `, be = W(
98
+ `, ye = W(
99
99
  ({
100
100
  perPageOptions: s = [
101
101
  { code: 10, name: "Show 10 items" },
102
102
  { code: 25, name: "Show 25 items" },
103
103
  { code: 50, name: "Show 50 items" }
104
104
  ],
105
- perPage: f,
106
- handlePerPage: p = () => {
105
+ perPage: u,
106
+ handlePerPage: g = () => {
107
107
  },
108
108
  page: c = 1,
109
109
  handlePage: d = () => {
110
110
  },
111
111
  totalPage: t
112
112
  }, _) => {
113
- var v, m;
114
- const u = () => {
113
+ var m, w;
114
+ const v = () => {
115
115
  c > 1 && (d == null || d(c - 1));
116
- }, g = () => {
116
+ }, x = () => {
117
117
  c < t && (d == null || d(c + 1));
118
- }, w = () => {
118
+ }, f = (() => {
119
119
  const r = [];
120
120
  if (t <= 7)
121
121
  for (let i = 1; i <= t; i++)
122
122
  r.push(i);
123
123
  else
124
124
  c <= 3 ? r.push(1, 2, 3, "...", t) : c >= t - 2 ? r.push(1, "...", t - 2, t - 1, t) : r.push(1, 2, 3, "...", t);
125
- return r == null ? void 0 : r.map((i, x) => i === "..." ? /* @__PURE__ */ n(
125
+ return r == null ? void 0 : r.map((i, p) => i === "..." ? /* @__PURE__ */ n(
126
126
  "div",
127
127
  {
128
128
  className: "pagination__page ellipsis",
129
129
  children: i
130
130
  },
131
- `pagination-ellipsis__${x}`
131
+ `pagination-ellipsis__${p}`
132
132
  ) : /* @__PURE__ */ n(
133
133
  "div",
134
134
  {
@@ -136,52 +136,52 @@ const we = E.div`
136
136
  className: `pagination__page ${c === i ? "active" : ""}`,
137
137
  children: i
138
138
  },
139
- `pagination-page__${x}`
139
+ `pagination-page__${p}`
140
140
  ));
141
- };
142
- return /* @__PURE__ */ a(we, { className: "pagination", children: [
141
+ })();
142
+ return /* @__PURE__ */ a(be, { className: "pagination", children: [
143
143
  /* @__PURE__ */ n(
144
144
  M,
145
145
  {
146
146
  color: "neutral",
147
- control: ((v = s == null ? void 0 : s.find((r) => (r == null ? void 0 : r.code) === f)) == null ? void 0 : v.name) || ((m = s[0]) == null ? void 0 : m.name),
147
+ control: ((m = s == null ? void 0 : s.find((r) => (r == null ? void 0 : r.code) === u)) == null ? void 0 : m.name) || ((w = s[0]) == null ? void 0 : w.name),
148
148
  placement: "bottom",
149
149
  zIndex: 1001,
150
150
  className: "pagination__per-page",
151
151
  children: s == null ? void 0 : s.map((r, i) => /* @__PURE__ */ n(
152
152
  q,
153
153
  {
154
- active: (r == null ? void 0 : r.code) === (f == null ? void 0 : f.code),
154
+ active: (r == null ? void 0 : r.code) === (u == null ? void 0 : u.code),
155
155
  className: "sort-by__item",
156
- onClick: () => p(r),
156
+ onClick: () => g(r),
157
157
  children: r == null ? void 0 : r.name
158
158
  },
159
159
  `blog-epxlore-section-per-page-option__${i + 1}`
160
160
  ))
161
161
  }
162
162
  ),
163
- /* @__PURE__ */ a("div", { className: "pagination__pages", children: [
163
+ (f == null ? void 0 : f.length) > 0 && /* @__PURE__ */ a("div", { className: "pagination__pages", children: [
164
164
  /* @__PURE__ */ n(
165
165
  "div",
166
166
  {
167
167
  className: `pagination__page ${c === 1 ? "disabled" : ""}`,
168
- onClick: u,
169
- children: /* @__PURE__ */ n(z, { icon: " mng-lnc-chevron--left" })
168
+ onClick: v,
169
+ children: /* @__PURE__ */ n(C, { icon: " mng-lnc-chevron--left" })
170
170
  }
171
171
  ),
172
- w(),
172
+ f,
173
173
  /* @__PURE__ */ n(
174
174
  "div",
175
175
  {
176
176
  className: `pagination__page ${c === t ? "disabled" : ""}`,
177
- onClick: g,
178
- children: /* @__PURE__ */ n(z, { icon: " mng-lnc-chevron--right" })
177
+ onClick: x,
178
+ children: /* @__PURE__ */ n(C, { icon: " mng-lnc-chevron--right" })
179
179
  }
180
180
  )
181
181
  ] })
182
182
  ] });
183
183
  }
184
- ), ye = E.div`
184
+ ), Ne = E.div`
185
185
  display: flex;
186
186
  align-items: flex-start;
187
187
  gap: 2rem;
@@ -387,7 +387,7 @@ const we = E.div`
387
387
  font-style: normal;
388
388
  font-weight: 500;
389
389
  line-height: 1.25rem;
390
- ${he(2)}
390
+ ${_e(2)}
391
391
  }
392
392
 
393
393
  & .item__description {
@@ -402,7 +402,7 @@ const we = E.div`
402
402
  }
403
403
  }
404
404
 
405
- @media ${xe("S")} {
405
+ @media ${we("S")} {
406
406
  flex-direction: column;
407
407
 
408
408
  & .landing__main-content {
@@ -454,33 +454,33 @@ const we = E.div`
454
454
  display: none;
455
455
  }
456
456
  }
457
- `, qe = W(
457
+ `, Ee = W(
458
458
  ({
459
459
  mainTitle: s,
460
- sideTitle: f,
461
- tags: p,
460
+ sideTitle: u,
461
+ tags: g,
462
462
  selectedTag: c,
463
463
  handleSelectTag: d = () => {
464
464
  },
465
465
  blogs: t,
466
466
  miniBlogs: _,
467
- products: u,
468
- blogsLoading: g = !1,
469
- productsLoading: w = !1,
470
- sortingOptions: v,
467
+ products: v,
468
+ blogsLoading: x = !1,
469
+ productsLoading: z = !1,
470
+ sortingOptions: f,
471
471
  sortBy: m,
472
- handleSortBy: r = () => {
472
+ handleSortBy: w = () => {
473
473
  },
474
- allTagText: i = "All",
475
- searchPlaceholderText: x = "Search blogs",
476
- timeToReadText: $ = "{0} min read",
474
+ allTagText: r = "All",
475
+ searchPlaceholderText: i = "Search blogs",
476
+ timeToReadText: p = "{0} min read",
477
477
  getBlogImageUrl: b = () => {
478
478
  },
479
479
  handleSelectBlog: y = () => {
480
480
  },
481
- handleSelectBlogTag: A = () => {
481
+ handleSelectBlogTag: $ = () => {
482
482
  },
483
- handleShareBlog: D = () => {
483
+ handleShareBlog: A = () => {
484
484
  },
485
485
  // handleBookmarkBlog = () => {},
486
486
  showAllButtonLink: H,
@@ -501,51 +501,52 @@ const we = E.div`
501
501
  perPage: Y,
502
502
  handlePerPage: Z = () => {
503
503
  },
504
- totalPage: k,
504
+ totalPage: D = 0,
505
505
  perPageOptions: O,
506
506
  handleSearch: B = () => {
507
507
  },
508
508
  onBookmark: L = () => {
509
509
  },
510
510
  bookmarkComponent: T = /* @__PURE__ */ n(I, {}),
511
- componentName: S,
512
- LinkComponent: C
513
- }, P) => {
514
- const ee = (e) => {
511
+ componentName: k,
512
+ LinkComponent: S,
513
+ showPerPage: P = !1
514
+ }, ee) => {
515
+ const ne = (e) => {
515
516
  document.getElementById("landing__container").scrollIntoView({ behavior: "smooth", block: "start" }), N == null || N(e);
516
- }, o = oe(null), ne = me(), [h, te] = le({
517
+ }, o = le(null), te = he(), [h, re] = se({
517
518
  arrowsVisible: !1,
518
519
  leftArrowDisabled: !1,
519
520
  rightArrowDisabled: !1
520
521
  });
521
- se(() => {
522
+ de(() => {
522
523
  const e = o == null ? void 0 : o.current;
523
524
  if (!e) return;
524
525
  const l = () => {
525
- const ae = e.scrollWidth - e.clientWidth;
526
- te((ce) => ({
527
- ...ce,
526
+ const ce = e.scrollWidth - e.clientWidth;
527
+ re((oe) => ({
528
+ ...oe,
528
529
  arrowsVisible: e.clientWidth < e.scrollWidth,
529
530
  leftArrowDisabled: e.scrollLeft <= 0,
530
- rightArrowDisabled: e.scrollLeft >= ae
531
+ rightArrowDisabled: e.scrollLeft >= ce
531
532
  }));
532
533
  }, j = new ResizeObserver(l);
533
534
  return j.observe(e), l(), e.addEventListener("scroll", l), () => {
534
535
  j.disconnect(), e.removeEventListener("scroll", l);
535
536
  };
536
537
  }, []);
537
- const re = () => {
538
+ const ie = () => {
538
539
  var e;
539
540
  (e = o == null ? void 0 : o.current) == null || e.scrollBy({ left: 100, behavior: "smooth" });
540
- }, ie = () => {
541
+ }, ae = () => {
541
542
  var e;
542
543
  (e = o == null ? void 0 : o.current) == null || e.scrollBy({ left: -100, behavior: "smooth" });
543
544
  };
544
- return /* @__PURE__ */ a(ye, { ref: P, id: "landing__container", children: [
545
+ return /* @__PURE__ */ a(Ne, { ref: ee, id: "landing__container", children: [
545
546
  /* @__PURE__ */ a("div", { className: "landing__main-content", children: [
546
547
  /* @__PURE__ */ a("div", { className: "main-content__heading", children: [
547
548
  /* @__PURE__ */ n("div", { className: "main-content__title", children: s }),
548
- !ne && (h == null ? void 0 : h.arrowsVisible) && /* @__PURE__ */ a("div", { className: "main-content__tags-nav", children: [
549
+ !te && (h == null ? void 0 : h.arrowsVisible) && /* @__PURE__ */ a("div", { className: "main-content__tags-nav", children: [
549
550
  /* @__PURE__ */ n(
550
551
  F,
551
552
  {
@@ -555,7 +556,7 @@ const we = E.div`
555
556
  color: "neutral",
556
557
  disabled: h == null ? void 0 : h.leftArrowDisabled,
557
558
  className: "main-content__tag-nav",
558
- onClick: ie
559
+ onClick: ae
559
560
  }
560
561
  ),
561
562
  /* @__PURE__ */ n(
@@ -567,30 +568,30 @@ const we = E.div`
567
568
  color: "neutral",
568
569
  disabled: h == null ? void 0 : h.rightArrowDisabled,
569
570
  className: "main-content__tag-nav",
570
- onClick: re
571
+ onClick: ie
571
572
  }
572
573
  )
573
574
  ] })
574
575
  ] }),
575
- p && /* @__PURE__ */ n(
576
- ve,
576
+ g && /* @__PURE__ */ n(
577
+ pe,
577
578
  {
578
579
  ref: o,
579
- tags: p,
580
- allTagText: i,
580
+ tags: g,
581
+ allTagText: r,
581
582
  selectedTagCode: c,
582
583
  onSelectTag: d
583
584
  }
584
585
  ),
585
586
  /* @__PURE__ */ a("div", { className: "main-content__actions", children: [
586
587
  /* @__PURE__ */ n(
587
- fe,
588
+ ue,
588
589
  {
589
590
  className: "main-content__search",
590
- placeholder: x,
591
+ placeholder: i,
591
592
  debounceTime: 200,
592
593
  prefix: /* @__PURE__ */ n(
593
- z,
594
+ C,
594
595
  {
595
596
  icon: " mng-lnc-search",
596
597
  sizeInUnits: "1.25rem",
@@ -608,12 +609,12 @@ const we = E.div`
608
609
  control: m == null ? void 0 : m.name,
609
610
  zIndex: 1001,
610
611
  className: "main-content__sort-by",
611
- children: v == null ? void 0 : v.map((e, l) => /* @__PURE__ */ n(
612
+ children: f == null ? void 0 : f.map((e, l) => /* @__PURE__ */ n(
612
613
  q,
613
614
  {
614
615
  active: (e == null ? void 0 : e.code) === (m == null ? void 0 : m.code),
615
616
  className: "sort-by__item",
616
- onClick: () => r(e),
617
+ onClick: () => w(e),
617
618
  children: e == null ? void 0 : e.name
618
619
  },
619
620
  `blog-epxlore-section-sorting-option__${l + 1}`
@@ -625,76 +626,76 @@ const we = E.div`
625
626
  t && (t == null ? void 0 : t.length) > 0 && /* @__PURE__ */ n(
626
627
  V,
627
628
  {
628
- timeToReadText: $,
629
+ timeToReadText: p,
629
630
  items: t == null ? void 0 : t.slice(0, 5),
630
- isLoading: g,
631
+ isLoading: x,
631
632
  getImage: b,
632
633
  onSelectCard: y,
633
- onSelectOption: A,
634
- onShare: D,
634
+ onSelectOption: $,
635
+ onShare: A,
635
636
  onBookmark: L,
636
637
  bookmarkComponent: T,
637
- componentName: S,
638
- LinkComponent: C
638
+ componentName: k,
639
+ LinkComponent: S
639
640
  }
640
641
  ),
641
642
  /* @__PURE__ */ n("div", { className: "main-content__divider" }),
642
- u && (u == null ? void 0 : u.length) > 0 && /* @__PURE__ */ n(
643
- pe,
643
+ v && (v == null ? void 0 : v.length) > 0 && /* @__PURE__ */ n(
644
+ ge,
644
645
  {
645
646
  buttonText: R,
646
647
  buttonLink: H,
647
648
  onButtonAction: K,
648
649
  onSelectCard: Q,
649
- items: u,
650
- isLoading: w,
650
+ items: v,
651
+ isLoading: z,
651
652
  getImage: U,
652
653
  isHighlight: !0,
653
- componentName: S,
654
- LinkComponent: C
654
+ componentName: k,
655
+ LinkComponent: S
655
656
  }
656
657
  ),
657
658
  /* @__PURE__ */ n("div", { className: "main-content__divider" }),
658
659
  t && (t == null ? void 0 : t.length) > 0 && /* @__PURE__ */ n(
659
660
  V,
660
661
  {
661
- timeToReadText: $,
662
+ timeToReadText: p,
662
663
  items: t == null ? void 0 : t.slice(5),
663
- isLoading: g,
664
+ isLoading: x,
664
665
  getImage: b,
665
666
  onSelectCard: y,
666
- onSelectOption: A,
667
- onShare: D,
667
+ onSelectOption: $,
668
+ onShare: A,
668
669
  onBookmark: L,
669
670
  bookmarkComponent: T,
670
- componentName: S,
671
- LinkComponent: C
671
+ componentName: k,
672
+ LinkComponent: S
672
673
  }
673
674
  )
674
675
  ] }),
675
- k && k > 1 && /* @__PURE__ */ n(
676
- be,
676
+ (D > 1 || P) && /* @__PURE__ */ n(
677
+ ye,
677
678
  {
678
679
  perPageOptions: O,
679
680
  perPage: Y,
680
681
  handlePerPage: Z,
681
682
  page: X,
682
- handlePage: ee,
683
- totalPage: k
683
+ handlePage: ne,
684
+ totalPage: D
684
685
  }
685
686
  )
686
687
  ] }),
687
688
  /* @__PURE__ */ a("div", { className: "landing__side-content", children: [
688
- f && /* @__PURE__ */ n("div", { className: "side-content__title", children: f }),
689
+ u && /* @__PURE__ */ n("div", { className: "side-content__title", children: u }),
689
690
  _ && (_ == null ? void 0 : _.length) > 0 && /* @__PURE__ */ a(I, { children: [
690
- /* @__PURE__ */ n("div", { className: "side-content__items", children: _ == null ? void 0 : _.map((e, l) => /* @__PURE__ */ n(de, { children: /* @__PURE__ */ a(
691
+ /* @__PURE__ */ n("div", { className: "side-content__items", children: _ == null ? void 0 : _.map((e, l) => /* @__PURE__ */ n(me, { children: /* @__PURE__ */ a(
691
692
  "div",
692
693
  {
693
694
  className: "side-content__item",
694
695
  onClick: () => y(e),
695
696
  children: [
696
697
  /* @__PURE__ */ n(
697
- ge,
698
+ xe,
698
699
  {
699
700
  src: b(e == null ? void 0 : e.imageUrl, e == null ? void 0 : e.uuid) || null,
700
701
  alt: `Mini blog ${l + 1}`,
@@ -703,17 +704,17 @@ const we = E.div`
703
704
  ),
704
705
  /* @__PURE__ */ a("div", { className: "item__content", children: [
705
706
  /* @__PURE__ */ n("div", { className: "item__title", children: e == null ? void 0 : e.title }),
706
- /* @__PURE__ */ n("div", { className: "item__description", children: _e(e == null ? void 0 : e.publishedAt) })
707
+ /* @__PURE__ */ n("div", { className: "item__description", children: fe(e == null ? void 0 : e.publishedAt) })
707
708
  ] })
708
709
  ]
709
710
  }
710
711
  ) }, `mini_blg_${l}`)) }),
711
- /* @__PURE__ */ n(ue, { onClick: J, className: "side-content__link", children: G })
712
+ /* @__PURE__ */ n(ve, { onClick: J, className: "side-content__link", children: G })
712
713
  ] })
713
714
  ] })
714
715
  ] });
715
716
  }
716
717
  );
717
718
  export {
718
- qe as default
719
+ Ee as default
719
720
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lanaco/lnc-react-ui",
3
- "version": "4.0.217",
3
+ "version": "4.0.218",
4
4
  "description": "React component library",
5
5
  "type": "module",
6
6
  "keywords": [