UNPKG

@anoki/fse-ui

Version:

FSE UI components library

3 lines (2 loc) 3.64 kB
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./components/ui/CardDocument/CardDocument.css');const e=require("./index.cjs278.js"),p=require("./index.cjs280.js");;/* empty css */const D=require("./index.cjs104.js"),R=require("./index.cjs183.js"),O=require("./index.cjs203.js"),s=require("./index.cjs219.js"),z=require("./index.cjs130.js"),o=require("./index.cjs82.js"),h=require("./index.cjs36.js"),L=require("./index.cjs117.js"),P=({eventNumber:t,date:E="--/--/--",documentType:f,showBottomActions:c=!0,showFavorite:d=!1,favorite:a=!1,favoriteLabel:w="Preferito",handleFavoriteClick:N,showIsHidden:y=!1,documentTitle:b,label:l,subtitle:u,action:m,CTA:n,handleDownloadDocument:v,hrefDocument:r="#",isLoading:x=!1,openDocumentLabel:q="Apri documento",releaseDateLabel:C="Inserito il",eventLabel:g="Evento n.",asLink:$="a",isLoadingVisibility:j=!1,obscuredLabel:k="Oscurato"})=>{const i=$,I=()=>m?e.jsxRuntimeExports.jsxs(s.Row,{alignItems:"center",className:p.clsx(!x&&"cursor-pointer","text-decoration-none text-primary","ui-document-download-row"),onClick:x?void 0:v,children:[e.jsxRuntimeExports.jsx(L.Download,{}),e.jsxRuntimeExports.jsx("p",{children:m}),e.jsxRuntimeExports.jsx(R.Loader,{loading:x,className:"ml-x8"})]}):null;return e.jsxRuntimeExports.jsxs("div",{className:p.clsx("ui-card-document shadow br-x4 fw-semibold text-slate-28 fs-7"),children:[e.jsxRuntimeExports.jsxs(s.Row,{"max-h":"x40","min-h":"x40",as:"header",justifyContent:t||d?"space-between":"flex-end",alignItems:"center",px:"x24",className:"ui-document-header",children:[t&&e.jsxRuntimeExports.jsx(s.Row,{children:t?`${g} ${t}`:""}),d&&e.jsxRuntimeExports.jsxs(s.Row,{alignItems:"center",gap:"x8",children:[e.jsxRuntimeExports.jsx(z.Favourite,{filled:a,color:"secondary",onClick:N}),a&&e.jsxRuntimeExports.jsx("div",{children:w})]}),e.jsxRuntimeExports.jsxs(s.Row,{className:"fw-semibold fs-7",children:[C," ",E]})]}),e.jsxRuntimeExports.jsxs("main",{className:"py-x16 px-x24",children:[e.jsxRuntimeExports.jsxs(s.Row,{justifyContent:"space-between",children:[e.jsxRuntimeExports.jsxs(o.Col,{pb:c?"x32":void 0,justifyContent:"space-between",children:[e.jsxRuntimeExports.jsxs("div",{children:[e.jsxRuntimeExports.jsx(s.Row,{className:"fw-semibold",pb:"x8",children:f}),e.jsxRuntimeExports.jsx("h3",{className:"fs-4 text-slate-20 cursor-pointer hover-underline",children:e.jsxRuntimeExports.jsx(i,{className:"link-unstyled",href:r,children:b})}),l&&e.jsxRuntimeExports.jsx(s.Row,{pt:"x8",children:e.jsxRuntimeExports.jsx("div",{className:"bg-secondary text-white rounded py-x4 px-x16",style:{width:"max-content"},children:l})})]}),u&&e.jsxRuntimeExports.jsx("p",{className:"fw-regular fs-6 pt-x8",children:u})]}),j?e.jsxRuntimeExports.jsx(R.Loader,{loading:j,className:"m-x16"}):y&&e.jsxRuntimeExports.jsxs(o.Col,{gap:"x4",alignItems:"center",children:[e.jsxRuntimeExports.jsx(O.Obscured,{}),e.jsxRuntimeExports.jsx("div",{className:"fs-7 fw-semibold",children:k})]})]}),c&&e.jsxRuntimeExports.jsx(o.Col,{mt:"x16",className:"ui-document-footer",children:e.jsxRuntimeExports.jsxs("div",{className:"ui-document-footer-actions",children:[I(),e.jsxRuntimeExports.jsx(D.Divider,{bg:"border-divider",className:"ui-document-divider"}),n&&e.jsxRuntimeExports.jsx(h.Button,{fwClassName:"fw-semibold",className:"ui-document-cta",variant:"secondary",size:"5",asLink:i,href:r,children:n}),!n&&e.jsxRuntimeExports.jsx(h.Button,{fwClassName:"fw-semibold",className:"ui-document-open-cta",variant:"secondary",size:"4",asLink:i,href:r,children:q})]})})]})]})};exports.CardDocument=P; //# sourceMappingURL=index.cjs47.js.map