@anoki/fse-ui
Version:
FSE UI components library
3 lines (2 loc) • 2.68 kB
JavaScript
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./components/ui/CardDocument/CardDocument.css');const e=require("./index.cjs180.js"),d=require("./index.cjs182.js");;/* empty css */const q=require("./index.cjs202.js"),v=require("./index.cjs223.js"),N=require("./index.cjs144.js"),g=require("./index.cjs64.js"),s=require("./index.cjs9.js"),u=require("./index.cjs10.js"),l=require("./index.cjs25.js"),C=({eventNumber:n,date:m="--/--/--",documentType:j,documentTitle:p,label:r,subtitle:i,action:o,CTA:x,handleDownloadDocument:R,hrefDocument:c="#",isLoading:t=!1,openDocumentLabel:h="Apri documento",releaseDateLabel:E="Emesso il",eventLabel:w="Evento n.",asLink:f="a"})=>{const b=f,y=v.useIsDesktop(),a=()=>o?e.jsxRuntimeExports.jsxs(s.Row,{alignItems:"center",className:d.clsx(!t&&"cursor-pointer","text-decoration-none text-primary","ui-document-download-row"),onClick:t?void 0:R,children:[e.jsxRuntimeExports.jsx(N.Download,{}),e.jsxRuntimeExports.jsx("p",{children:o}),e.jsxRuntimeExports.jsx(g.Loader,{loading:t,className:"ml-x8"})]}):null;return e.jsxRuntimeExports.jsxs("div",{className:d.clsx("ui-card-document shadow br-x4 fw-semibold text-slate-28 fs-7"),children:[e.jsxRuntimeExports.jsxs(s.Row,{as:"header",justifyContent:"space-between",alignItems:"center",py:"x8",px:"x24",className:"ui-document-header",children:[e.jsxRuntimeExports.jsx(s.Row,{children:n?`${w} ${n}`:""}),e.jsxRuntimeExports.jsxs(s.Row,{children:[E," ",m]})]}),e.jsxRuntimeExports.jsxs("main",{className:"p-x16",children:[e.jsxRuntimeExports.jsxs(u.Col,{pb:"x32",justifyContent:"space-between",children:[e.jsxRuntimeExports.jsxs("div",{children:[e.jsxRuntimeExports.jsx(s.Row,{pb:"x8",children:j}),e.jsxRuntimeExports.jsx("h4",{className:"fs-5 text-slate-20",children:p}),e.jsxRuntimeExports.jsx(s.Row,{pt:"x8",children:r&&e.jsxRuntimeExports.jsx("div",{className:"bg-secondary text-white rounded py-x4 px-x16",style:{width:"max-content"},children:r})})]}),i&&e.jsxRuntimeExports.jsx("p",{className:"fw-regular fs-6 pt-x8",children:i})]}),y?e.jsxRuntimeExports.jsxs(s.Row,{as:"footer",justifyContent:"space-between",alignItems:"center",children:[a(),x&&e.jsxRuntimeExports.jsx(l.Button,{className:"filter-button fs-7 text-primary fw-semibold",variant:"secondary",size:"3",asLink:b,href:c,children:x})]}):e.jsxRuntimeExports.jsxs(u.Col,{as:"footer",gap:"x16",children:[a(),e.jsxRuntimeExports.jsx(q.Divider,{bg:"border-divider"}),e.jsxRuntimeExports.jsx(l.Button,{className:"filter-button fs-7 fw-semibold w-full",variant:"secondary",size:"3",asLink:"a",href:c,children:h})]})]})]})};exports.CardDocument=C;
//# sourceMappingURL=index.cjs30.js.map