@anoki/fse-marche-ui
Version:
FSE UI components library
129 lines (128 loc) • 3.97 kB
JavaScript
import { j as e } from "./index.es137.js";
import { clsx as d } from "./index.es139.js";
import './components/ui/CardDocument/CardDocument.css';/* empty css */
import { Divider as N } from "./index.es153.js";
import { useIsDesktop as v } from "./index.es174.js";
import { Loader as g } from "./index.es64.js";
import { Row as s } from "./index.es9.js";
import { Col as x } from "./index.es10.js";
import { Button as m } from "./index.es25.js";
const B = ({
eventNumber: t,
date: p = "--/--/--",
documentType: f,
documentTitle: h,
label: n,
subtitle: i,
action: o,
CTA: a,
handleDownloadDocument: j,
hrefDocument: l = "#",
isLoading: r = !1,
openDocumentLabel: u = "Apri documento",
releaseDateLabel: w = "Emesso il",
eventLabel: b = "Evento n."
}) => {
const y = v(), c = () => o ? /* @__PURE__ */ e.jsxs(
s,
{
alignItems: "center",
className: d(
!r && "cursor-pointer",
"text-decoration-none text-primary"
),
onClick: r ? void 0 : j,
children: [
/* @__PURE__ */ e.jsx("p", { children: o }),
/* @__PURE__ */ e.jsx(g, { 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(x, { 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: h }),
/* @__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
}
) })
] }),
i && /* @__PURE__ */ e.jsx("p", { className: "fw-regular fs-6 pt-x8", children: i })
] }),
y ? /* @__PURE__ */ e.jsxs(
s,
{
as: "footer",
justifyContent: "space-between",
alignItems: "center",
children: [
c(),
a && /* @__PURE__ */ e.jsx(
m,
{
className: "filter-button fs-7 text-primary fw-semibold",
variant: "secondary",
size: "3",
asLink: "a",
href: l,
children: a
}
)
]
}
) : /* @__PURE__ */ e.jsxs(x, { as: "footer", gap: "x16", children: [
c(),
/* @__PURE__ */ e.jsx(N, { bg: "border-divider" }),
/* @__PURE__ */ e.jsx(
m,
{
className: "filter-button fs-7 fw-semibold w-full",
variant: "secondary",
size: "3",
asLink: "a",
href: l,
disabled: !0,
children: u
}
)
] })
] })
]
}
);
};
export {
B as CardDocument
};
//# sourceMappingURL=index.es30.js.map