UNPKG

@anoki/fse-ui

Version:

FSE UI components library

132 lines (131 loc) 4.08 kB
import { j as e } from "./index.es180.js"; import { clsx as d } from "./index.es182.js"; import './components/ui/CardDocument/CardDocument.css';/* empty css */ import { Divider as g } from "./index.es202.js"; import { useIsDesktop as k } from "./index.es223.js"; import { Download as C } from "./index.es144.js"; import { Loader as D } from "./index.es64.js"; import { Row as s } from "./index.es9.js"; import { Col as m } from "./index.es10.js"; import { Button as x } from "./index.es25.js"; const G = ({ eventNumber: t, date: p = "--/--/--", documentType: f, documentTitle: j, label: n, subtitle: o, action: i, CTA: a, handleDownloadDocument: h, hrefDocument: c = "#", isLoading: r = !1, openDocumentLabel: u = "Apri documento", releaseDateLabel: w = "Emesso il", eventLabel: b = "Evento n.", asLink: y = "a" }) => { const N = y, v = k(), l = () => i ? /* @__PURE__ */ e.jsxs( s, { alignItems: "center", className: d( !r && "cursor-pointer", "text-decoration-none text-primary", "ui-document-download-row" ), onClick: r ? void 0 : h, children: [ /* @__PURE__ */ e.jsx(C, {}), /* @__PURE__ */ e.jsx("p", { children: i }), /* @__PURE__ */ e.jsx(D, { loading: r, className: "ml-x8" }) ] } ) : null; return /* @__PURE__ */ e.jsxs( "div", { className: d( "ui-card-document shadow br-x4 fw-semibold text-slate-28 fs-7" ), children: [ /* @__PURE__ */ e.jsxs( s, { as: "header", justifyContent: "space-between", alignItems: "center", py: "x8", px: "x24", className: "ui-document-header", children: [ /* @__PURE__ */ e.jsx(s, { children: t ? `${b} ${t}` : "" }), /* @__PURE__ */ e.jsxs(s, { children: [ w, " ", p ] }) ] } ), /* @__PURE__ */ e.jsxs("main", { className: "p-x16", children: [ /* @__PURE__ */ e.jsxs(m, { pb: "x32", justifyContent: "space-between", children: [ /* @__PURE__ */ e.jsxs("div", { children: [ /* @__PURE__ */ e.jsx(s, { pb: "x8", children: f }), /* @__PURE__ */ e.jsx("h4", { className: "fs-5 text-slate-20", children: j }), /* @__PURE__ */ e.jsx(s, { pt: "x8", children: n && /* @__PURE__ */ e.jsx( "div", { className: "bg-secondary text-white rounded py-x4 px-x16", style: { width: "max-content" }, children: n } ) }) ] }), o && /* @__PURE__ */ e.jsx("p", { className: "fw-regular fs-6 pt-x8", children: o }) ] }), v ? /* @__PURE__ */ e.jsxs( s, { as: "footer", justifyContent: "space-between", alignItems: "center", children: [ l(), a && /* @__PURE__ */ e.jsx( x, { className: "filter-button fs-7 text-primary fw-semibold", variant: "secondary", size: "3", asLink: N, href: c, children: a } ) ] } ) : /* @__PURE__ */ e.jsxs(m, { as: "footer", gap: "x16", children: [ l(), /* @__PURE__ */ e.jsx(g, { bg: "border-divider" }), /* @__PURE__ */ e.jsx( x, { className: "filter-button fs-7 fw-semibold w-full", variant: "secondary", size: "3", asLink: "a", href: c, children: u } ) ] }) ] }) ] } ); }; export { G as CardDocument }; //# sourceMappingURL=index.es30.js.map