@anoki/fse-ui
Version:
FSE UI components library
3 lines (2 loc) • 3.47 kB
JavaScript
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./components/ui/CardDocument/CardDocument.css');const e=require("./index.cjs244.js"),u=require("./index.cjs246.js");;/* empty css */const $=require("./index.cjs137.js"),I=require("./index.cjs185.js"),j=require("./index.cjs72.js"),k=require("./index.cjs187.js"),s=require("./index.cjs9.js"),x=require("./index.cjs10.js"),p=require("./index.cjs28.js"),D=require("./index.cjs191.js"),O=({eventNumber:t,date:R="--/--/--",documentType:E,showBottomActions:i=!0,showFavorite:o=!1,showIsHidden:f=!1,documentTitle:h,label:c,subtitle:a,action:d,CTA:n,handleDownloadDocument:w,hrefDocument:l="#",isLoading:r=!1,openDocumentLabel:N="Apri documento",releaseDateLabel:b="Inserito il",eventLabel:v="Evento n.",asLink:y="a",isLoadingVisibility:m=!1,obscuredLabel:q="Oscurato"})=>{const g=y,C=()=>d?e.jsxRuntimeExports.jsxs(s.Row,{alignItems:"center",className:u.clsx(!r&&"cursor-pointer","text-decoration-none text-primary","ui-document-download-row"),onClick:r?void 0:w,children:[e.jsxRuntimeExports.jsx(D.Download,{}),e.jsxRuntimeExports.jsx("p",{children:d}),e.jsxRuntimeExports.jsx(j.Loader,{loading:r,className:"ml-x8"})]}):null;return e.jsxRuntimeExports.jsxs("div",{className:u.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?`${v} ${t}`:""}),o&&e.jsxRuntimeExports.jsxs(s.Row,{alignItems:"center",gap:"x8",children:[e.jsxRuntimeExports.jsx(I.Favourite,{filled:!0,color:"secondary"}),e.jsxRuntimeExports.jsx("div",{children:"Preferito"})]}),e.jsxRuntimeExports.jsxs(s.Row,{className:"fw-semibold fs-7",children:[b," ",R]})]}),e.jsxRuntimeExports.jsxs("main",{className:"py-x16 px-x24",children:[e.jsxRuntimeExports.jsxs(s.Row,{justifyContent:"space-between",children:[e.jsxRuntimeExports.jsxs(x.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:E}),e.jsxRuntimeExports.jsx("p",{className:"fs-4 text-slate-20",children:h}),c&&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:c})})]}),a&&e.jsxRuntimeExports.jsx("p",{className:"fw-regular fs-6 pt-x8",children:a})]}),m?e.jsxRuntimeExports.jsx(j.Loader,{loading:m,className:"m-x16"}):f&&e.jsxRuntimeExports.jsxs(x.Col,{gap:"x4",alignItems:"center",children:[e.jsxRuntimeExports.jsx(k.Obscured,{}),e.jsxRuntimeExports.jsx("div",{className:"fs-7 fw-semibold",children:q})]})]}),i&&e.jsxRuntimeExports.jsx(x.Col,{mt:"x16",className:"ui-document-footer",children:e.jsxRuntimeExports.jsxs("div",{className:"ui-document-footer-actions",children:[C(),e.jsxRuntimeExports.jsx($.Divider,{bg:"border-divider",className:"ui-document-divider"}),n&&e.jsxRuntimeExports.jsx(p.Button,{fwClassName:"fw-semibold",className:"ui-document-cta",variant:"secondary",size:"5",asLink:g,href:l,children:n}),!n&&e.jsxRuntimeExports.jsx(p.Button,{fwClassName:"fw-semibold",className:"ui-document-open-cta",variant:"secondary",size:"4",asLink:"a",href:l,children:N})]})})]})]})};exports.CardDocument=O;
//# sourceMappingURL=index.cjs35.js.map