@lanaco/lnc-react-ui 4.0.134 → 4.0.135
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 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"),v=require("./style-DaT7Beup.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
|
+
`,y=w.styled.div`
|
|
10
10
|
display: flex;
|
|
11
11
|
flex-direction: column;
|
|
12
12
|
width: 100%;
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
& img {
|
|
25
25
|
max-height: 11.0625rem;
|
|
26
26
|
min-height: 11.0625rem;
|
|
27
|
-
object-fit:
|
|
27
|
+
object-fit: cover;
|
|
28
28
|
width: 100%;
|
|
29
29
|
}
|
|
30
30
|
|
|
@@ -107,4 +107,4 @@
|
|
|
107
107
|
align-items: center;
|
|
108
108
|
gap: 1rem;
|
|
109
109
|
}
|
|
110
|
-
`,$=u.forwardRef((i,o)=>{const{title:s,imageUrl:m,text:d,numberOfLikes:n,numberOfComments:h,timeToRead:p,publishedAt:c,tags:a,onCardClick:j,timeToReadText:f="{0} min read"}=i;return t.jsxs(
|
|
110
|
+
`,$=u.forwardRef((i,o)=>{const{title:s,imageUrl:m,text:d,numberOfLikes:n,numberOfComments:h,timeToRead:p,publishedAt:c,tags:a,onCardClick:j,timeToReadText:f="{0} min read"}=i;return t.jsxs(y,{ref:o,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:d})]}),a&&t.jsx("div",{className:"tags-wr",children:a==null?void 0:a.map((l,b)=>t.jsx(v.BlogTag,{color:l==null?void 0:l.color,children:l==null?void 0:l.name},b))})]})}),D=u.forwardRef(({},i)=>t.jsxs(y,{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:o=!1,keyPrefix:s})=>t.jsx(t.Fragment,{children:Array.from({length:i},(m,d)=>t.jsx(D,{isLoading:o},`${s}-skeleton-product-card-${d}`))}),B=({children:i,fallbackComponent:o=t.jsx(t.Fragment,{}),isLoading:s=!1,limit:m,keyPrefix:d})=>t.jsx(u.Suspense,{fallbackComponent:o,children:s===!0?t.jsx(q,{isLoading:s,limit:m,keyPrefix:d}):i}),N=u.memo($),L=u.forwardRef((i,o)=>{const{icon:s,title:m,onButtonAction:d,items:n,buttonText:h,timeToReadText:p,limit:c=3,onSelectCard:a=()=>{},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:()=>a(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:()=>a(e==null?void 0:e.titleSlug)},g))}),[n,b,c,a]);return t.jsxs(v.RegulatTitleSectionWrapper,{ref:o,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(),d(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;
|