UNPKG

@anoki/fse-ui

Version:

FSE UI components library

3 lines (2 loc) 3.54 kB
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./components/ui/CardDocument/CardDocument.css');const e=require("./index.cjs237.js"),j=require("./index.cjs238.js");;/* empty css */const D=require("./index.cjs72.js"),p=require("./index.cjs106.js"),O=require("./index.cjs219.js"),s=require("./index.cjs116.js"),z=require("./index.cjs198.js"),r=require("./index.cjs61.js"),R=require("./index.cjs32.js"),L=require("./index.cjs189.js"),P=({eventNumber:t,date:E="--/--/--",documentType:f,showBottomActions:i=!0,showFavorite:o=!1,favorite:c=!1,favoriteLabel:h="Preferito",handleFavoriteClick:w,showIsHidden:N=!1,documentTitle:b,label:a,subtitle:d,action:l,CTA:n,handleDownloadDocument:y,hrefDocument:m="#",isLoading:x=!1,openDocumentLabel:q="Apri documento",releaseDateLabel:v="Inserito il",eventLabel:C="Evento n.",asLink:g="a",isLoadingVisibility:u=!1,obscuredLabel:$="Oscurato"})=>{const k=g,I=()=>l?e.jsxRuntimeExports.jsxs(s.Row,{alignItems:"center",className:j.clsx(!x&&"cursor-pointer","text-decoration-none text-primary","ui-document-download-row"),onClick:x?void 0:y,children:[e.jsxRuntimeExports.jsx(L.Download,{}),e.jsxRuntimeExports.jsx("p",{children:l}),e.jsxRuntimeExports.jsx(p.Loader,{loading:x,className:"ml-x8"})]}):null;return e.jsxRuntimeExports.jsxs("div",{className:j.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||o?"space-between":"flex-end",alignItems:"center",px:"x24",className:"ui-document-header",children:[t&&e.jsxRuntimeExports.jsx(s.Row,{children:t?`${C} ${t}`:""}),o&&e.jsxRuntimeExports.jsxs(s.Row,{alignItems:"center",gap:"x8",children:[e.jsxRuntimeExports.jsx(z.Favourite,{filled:c,color:"secondary",onClick:w}),c&&e.jsxRuntimeExports.jsx("div",{children:h})]}),e.jsxRuntimeExports.jsxs(s.Row,{className:"fw-semibold fs-7",children:[v," ",E]})]}),e.jsxRuntimeExports.jsxs("main",{className:"py-x16 px-x24",children:[e.jsxRuntimeExports.jsxs(s.Row,{justifyContent:"space-between",children:[e.jsxRuntimeExports.jsxs(r.Col,{pb:i?"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("p",{className:"fs-4 text-slate-20",children:b}),a&&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:a})})]}),d&&e.jsxRuntimeExports.jsx("p",{className:"fw-regular fs-6 pt-x8",children:d})]}),u?e.jsxRuntimeExports.jsx(p.Loader,{loading:u,className:"m-x16"}):N&&e.jsxRuntimeExports.jsxs(r.Col,{gap:"x4",alignItems:"center",children:[e.jsxRuntimeExports.jsx(O.Obscured,{}),e.jsxRuntimeExports.jsx("div",{className:"fs-7 fw-semibold",children:$})]})]}),i&&e.jsxRuntimeExports.jsx(r.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(R.Button,{fwClassName:"fw-semibold",className:"ui-document-cta",variant:"secondary",size:"5",asLink:k,href:m,children:n}),!n&&e.jsxRuntimeExports.jsx(R.Button,{fwClassName:"fw-semibold",className:"ui-document-open-cta",variant:"secondary",size:"4",asLink:"a",href:m,children:q})]})})]})]})};exports.CardDocument=P; //# sourceMappingURL=index.cjs41.js.map