UNPKG

@anoki/fse-ui

Version:

FSE UI components library

120 lines (119 loc) 4.95 kB
import { j as n } from "./index.es278.js"; import { clsx as c } from "./index.es280.js"; import './components/ui/CardScreening/CardScreening.css';/* empty css */ import { InfoPopup as y } from "./index.es174.js"; import { EditPencil as C } from "./index.es119.js"; import { Col as w } from "./index.es82.js"; import { Row as i } from "./index.es219.js"; import { Loader as b } from "./index.es183.js"; import { Divider as R } from "./index.es104.js"; import { Button as k } from "./index.es36.js"; const A = ({ title: x, infobox: d, badge: e, date: a = void 0, address: l = void 0, description: m = void 0, footer: s, isLoading: r = !1, asLink: v = "a" }) => { var p, h, j, u, g, N; const t = v; return /* @__PURE__ */ n.jsxs( "div", { className: c( "ui-card-screening shadow fw-semibold text-slate-28 fs-7 py-x16 px-x24" ), children: [ /* @__PURE__ */ n.jsxs( w, { justifyContent: "space-between", gap: "x8", children: [ /* @__PURE__ */ n.jsxs(i, { alignItems: "center", gap: "x8", children: [ /* @__PURE__ */ n.jsx( "h3", { className: c( "ui-card-screening-title fs-4 text-slate-20", "cursor-pointer hover-underline" ), children: /* @__PURE__ */ n.jsx(t, { className: "link-unstyled", href: ((p = s == null ? void 0 : s.ctaRight) == null ? void 0 : p.href) ?? "#", children: x }) } ), d && /* @__PURE__ */ n.jsx(y, { title: x, description: d }) ] }), /* @__PURE__ */ n.jsx(i, { justifyContent: "flex-start", alignItems: "center", children: (e == null ? void 0 : e.text) && /* @__PURE__ */ n.jsx( "div", { className: c( "rounded py-x4 px-x16" ), style: { backgroundColor: e.color || "#000", color: "#fff", width: "max-content" }, children: e.text } ) }), a && /* @__PURE__ */ n.jsxs(i, { className: "fw-regular gap-x4 body-text-screening-card", children: [ /* @__PURE__ */ n.jsxs("span", { className: "fw-semibold", children: [ a.label, ":" ] }), /* @__PURE__ */ n.jsx("span", { children: a.value }) ] }), l && /* @__PURE__ */ n.jsxs(i, { className: "fw-regular gap-x4 body-text-screening-card", children: [ /* @__PURE__ */ n.jsxs("span", { className: "fw-semibold", children: [ l.label, ":" ] }), /* @__PURE__ */ n.jsx("span", { children: l.value }) ] }), m && /* @__PURE__ */ n.jsx("p", { className: "fw-regular body-text-screening-card", children: m }) ] } ), s && /* @__PURE__ */ n.jsx(w, { className: "ui-card-screening-footer", children: /* @__PURE__ */ n.jsxs(i, { className: "ui-card-screening-footer-actions", justifyContent: s != null && s.ctaLeft ? "space-between" : "flex-end", alignItems: "center", children: [ (s == null ? void 0 : s.ctaLeft) && /* @__PURE__ */ n.jsxs( i, { alignItems: "center", className: c( !r && "cursor-pointer", "text-decoration-none text-primary", "ui-card-screening-download-row gap-x8" ), onClick: r || (h = s == null ? void 0 : s.ctaLeft) == null ? void 0 : h.clickCta, children: [ /* @__PURE__ */ n.jsx(C, {}), /* @__PURE__ */ n.jsx("p", { children: (j = s == null ? void 0 : s.ctaLeft) == null ? void 0 : j.label }), /* @__PURE__ */ n.jsx(b, { loading: r, className: "ml-x8" }) ] } ), (s == null ? void 0 : s.ctaRight) && ((u = s == null ? void 0 : s.ctaRight) == null ? void 0 : u.href) && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [ /* @__PURE__ */ n.jsx(R, { bg: "border-divider", className: "ui-document-divider" }), /* @__PURE__ */ n.jsx( k, { fwClassName: "fw-semibold", className: "ui-card-screening-cta px-x12", variant: "secondary", size: "5", asLink: t, href: ((g = s == null ? void 0 : s.ctaRight) == null ? void 0 : g.href) ?? void 0, children: (N = s == null ? void 0 : s.ctaRight) == null ? void 0 : N.label } ) ] }) ] }) }) ] } ); }; export { A as CardScreening }; //# sourceMappingURL=index.es60.js.map