UNPKG

@anoki/fse-ui

Version:

FSE UI components library

3 lines (2 loc) 3.37 kB
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./components/ui/CardScreening/CardScreening.css');const e=require("./index.cjs278.js"),x=require("./index.cjs280.js");;/* empty css */const N=require("./index.cjs174.js"),v=require("./index.cjs119.js"),E=require("./index.cjs82.js"),n=require("./index.cjs219.js"),y=require("./index.cjs183.js"),C=require("./index.cjs104.js"),b=require("./index.cjs36.js"),q=({title:a,infobox:l,badge:i,date:c=void 0,address:t=void 0,description:u=void 0,footer:s,isLoading:r=!1,asLink:w="a"})=>{var m,j,p,R,h,g;const d=w;return e.jsxRuntimeExports.jsxs("div",{className:x.clsx("ui-card-screening shadow fw-semibold text-slate-28 fs-7 py-x16 px-x24"),children:[e.jsxRuntimeExports.jsxs(E.Col,{justifyContent:"space-between",gap:"x8",children:[e.jsxRuntimeExports.jsxs(n.Row,{alignItems:"center",gap:"x8",children:[e.jsxRuntimeExports.jsx("h3",{className:x.clsx("ui-card-screening-title fs-4 text-slate-20","cursor-pointer hover-underline"),children:e.jsxRuntimeExports.jsx(d,{className:"link-unstyled",href:((m=s==null?void 0:s.ctaRight)==null?void 0:m.href)??"#",children:a})}),l&&e.jsxRuntimeExports.jsx(N.InfoPopup,{title:a,description:l})]}),e.jsxRuntimeExports.jsx(n.Row,{justifyContent:"flex-start",alignItems:"center",children:(i==null?void 0:i.text)&&e.jsxRuntimeExports.jsx("div",{className:x.clsx("rounded py-x4 px-x16"),style:{backgroundColor:i.color||"#000",color:"#fff",width:"max-content"},children:i.text})}),c&&e.jsxRuntimeExports.jsxs(n.Row,{className:"fw-regular gap-x4 body-text-screening-card",children:[e.jsxRuntimeExports.jsxs("span",{className:"fw-semibold",children:[c.label,":"]}),e.jsxRuntimeExports.jsx("span",{children:c.value})]}),t&&e.jsxRuntimeExports.jsxs(n.Row,{className:"fw-regular gap-x4 body-text-screening-card",children:[e.jsxRuntimeExports.jsxs("span",{className:"fw-semibold",children:[t.label,":"]}),e.jsxRuntimeExports.jsx("span",{children:t.value})]}),u&&e.jsxRuntimeExports.jsx("p",{className:"fw-regular body-text-screening-card",children:u})]}),s&&e.jsxRuntimeExports.jsx(E.Col,{className:"ui-card-screening-footer",children:e.jsxRuntimeExports.jsxs(n.Row,{className:"ui-card-screening-footer-actions",justifyContent:s!=null&&s.ctaLeft?"space-between":"flex-end",alignItems:"center",children:[(s==null?void 0:s.ctaLeft)&&e.jsxRuntimeExports.jsxs(n.Row,{alignItems:"center",className:x.clsx(!r&&"cursor-pointer","text-decoration-none text-primary","ui-card-screening-download-row gap-x8"),onClick:r||(j=s==null?void 0:s.ctaLeft)==null?void 0:j.clickCta,children:[e.jsxRuntimeExports.jsx(v.EditPencil,{}),e.jsxRuntimeExports.jsx("p",{children:(p=s==null?void 0:s.ctaLeft)==null?void 0:p.label}),e.jsxRuntimeExports.jsx(y.Loader,{loading:r,className:"ml-x8"})]}),(s==null?void 0:s.ctaRight)&&((R=s==null?void 0:s.ctaRight)==null?void 0:R.href)&&e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(C.Divider,{bg:"border-divider",className:"ui-document-divider"}),e.jsxRuntimeExports.jsx(b.Button,{fwClassName:"fw-semibold",className:"ui-card-screening-cta px-x12",variant:"secondary",size:"5",asLink:d,href:((h=s==null?void 0:s.ctaRight)==null?void 0:h.href)??void 0,children:(g=s==null?void 0:s.ctaRight)==null?void 0:g.label})]})]})})]})};exports.CardScreening=q; //# sourceMappingURL=index.cjs60.js.map