UNPKG

@anoki/fse-ui

Version:

FSE UI components library

3 lines (2 loc) 2.58 kB
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./components/ui/CardCategory/CardCategory.css');const s=require("./index.cjs278.js"),C=require("./index.cjs21.js"),r=require("./index.cjs280.js");;/* empty css */const q=require("./index.cjs82.js"),b=require("./index.cjs219.js"),k=require("./index.cjs128.js"),p=require("./index.cjs218.js"),$=({image:t,title:u,titleTag:h="h1",href:o,description:a,description2:R,isExternal:e=!1,showIcon:f=!1,goToLabel:n,asLink:v="a",asImage:y="img",className:E,classNameTitle:i,classNameDescription:x,classNameDescriptionTitle:d,maxLinesTitle:c=void 0,maxLinesDescription:l=void 0,handleOnClick:j})=>{const m=y,w=v;return s.jsxRuntimeExports.jsxs(w,{className:r.clsx("ui-card-category shadow br-x4 bg-white",E,j&&"cursor-pointer"),href:o,target:e?"_blank":void 0,rel:e?"noreferrer noopener":void 0,onClick:j??void 0,children:[(t==null?void 0:t.src)&&s.jsxRuntimeExports.jsx("header",{className:"ui-card-category-header",children:s.jsxRuntimeExports.jsx(m,{src:t==null?void 0:t.src,alt:t==null?void 0:t.alt,title:t==null?void 0:t.title})}),s.jsxRuntimeExports.jsxs(q.Col,{className:r.clsx(t!=null&&t.src?"ui-card-category-content-with-image ui-mt-negative":"ui-card-category-content","gap-x8 br-x4 bg-white"),children:[s.jsxRuntimeExports.jsxs(b.Row,{alignItems:"center",justifyContent:"space-between",gap:"x4",children:[s.jsxRuntimeExports.jsxs(h,{className:r.clsx("flex-1 cursor-pointer hover-underline",i||"text-primary fs-5 md-fs-custom-2",c&&"clamped"),style:{"--max-lines":c},title:c?u:void 0,children:[u,e&&s.jsxRuntimeExports.jsx("span",{className:"visually-hidden",children:"(si apre in una nuova finestra)"})]}),f&&s.jsxRuntimeExports.jsx("span",{children:s.jsxRuntimeExports.jsx(k.ExternalLink,{width:24,height:24,color:"primary",className:"ui-external-link"})})]}),s.jsxRuntimeExports.jsxs("div",{className:r.clsx(x,!l&&(x==null?void 0:x.includes("max-h-"))&&"pb-x24"),children:[s.jsxRuntimeExports.jsx("div",{className:r.clsx(d||"fs-6 md-fs-custom text-slate-20"),children:s.jsxRuntimeExports.jsx(p.RichText,{description:a,maxLines:l,useShowToggle:!1})}),s.jsxRuntimeExports.jsx("div",{className:"fs-6 md-fs-custom fw-regular text-slate-28",children:s.jsxRuntimeExports.jsx(p.RichText,{description:R})})]})]}),n&&o&&s.jsxRuntimeExports.jsx("footer",{className:"ui-card-category-footer bg-white",children:s.jsxRuntimeExports.jsx(C.ArrowLink,{href:o??"#",isExternal:e,children:n==null?void 0:n.toUpperCase()})})]})};exports.CardCategory=$; //# sourceMappingURL=index.cjs42.js.map