@anoki/fse-marche-ui
Version:
FSE UI components library
139 lines (138 loc) • 5.1 kB
JavaScript
import { j as e } from "./index.es137.js";
import { Divider as g } from "./index.es153.js";
import { LOGOS as c } from "./index.es24.js";
import { HeaderSlim as N } from "./index.es17.js";
import { clsx as n } from "./index.es139.js";
import { Balancer as u } from "./index.es210.js";
import { Button as w } from "./index.es25.js";
import { Container as y } from "./index.es6.js";
import './components/navigations/HeaderDesktop/HeaderDesktop.css';/* empty css */
import { Row as l } from "./index.es9.js";
const O = ({
title: t,
region: r,
asLink: d = "a",
labels: h,
navigatonItems: x,
supportLink: s,
loginLink: m = "/",
shortTitle: o,
headerTitleClassname: f,
children: j
}) => {
const i = d, p = c.nazionale, b = c[r];
return /* @__PURE__ */ e.jsxs("div", { className: "sticky-header bg-white", children: [
/* @__PURE__ */ e.jsxs(
N,
{
pt: "x16",
pb: "x16",
display: "flex",
justifyContent: "space-between",
alignItems: "center",
children: [
/* @__PURE__ */ e.jsxs(
i,
{
href: "/",
className: "text-white fw-semibold text-decoration-none fs-7 hover-underline",
children: [
o || t,
/* @__PURE__ */ e.jsx("span", { className: "visually-hidden", children: "Vai alla homepage" })
]
}
),
j
]
}
),
/* @__PURE__ */ e.jsxs("header", { className: "bg-white", children: [
/* @__PURE__ */ e.jsxs(
l,
{
py: "x20",
gap: "x16",
alignItems: "center",
justifyContent: "space-between",
className: "min-h-x120 ui-container",
children: [
/* @__PURE__ */ e.jsxs(l, { gap: "x16", alignItems: "center", children: [
/* @__PURE__ */ e.jsxs(l, { gap: "x16", alignItems: "center", justifyContent: "center", children: [
/* @__PURE__ */ e.jsx(p, { height: 58 }),
r !== "nazionale" && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
/* @__PURE__ */ e.jsx(g, { bg: "border-divider", direction: "vertical" }),
/* @__PURE__ */ e.jsx(b, { width: 58, height: 58 })
] })
] }),
/* @__PURE__ */ e.jsx("h1", { className: n(f), children: /* @__PURE__ */ e.jsx(u, { children: /* @__PURE__ */ e.jsxs(
i,
{
href: "/",
className: "fs-2 fw-bold text-slate-20 text-decoration-none hover-underline",
children: [
t,
/* @__PURE__ */ e.jsx("span", { className: "visually-hidden", children: "Vai alla homepage" })
]
}
) }) })
] }),
/* @__PURE__ */ e.jsxs(w, { size: "2", href: m, asLink: "a", children: [
h.login,
/* @__PURE__ */ e.jsx("span", { className: "visually-hidden", children: " Accedi con Cohesion" })
] })
]
}
),
/* @__PURE__ */ e.jsx("nav", { "aria-label": "Menu di navigazione", className: "shadow-bottom", children: /* @__PURE__ */ e.jsxs(y, { className: "base-row align-items-center justify-content-between", children: [
/* @__PURE__ */ e.jsx(l, { as: "ul", className: "list-style-none", role: "list", children: x.map((a, v) => /* @__PURE__ */ e.jsx(
"li",
{
className: n(
"py-x12 px-x16 ui-header-desktop-nav-item min-h-x56",
a.active && "active"
),
children: /* @__PURE__ */ e.jsxs(
i,
{
href: a.href,
"aria-label": `Vai alla pagina ${a.label}`,
className: n(
"text-decoration-none fs-custom",
a.active ? "fw-bold text-blue-30" : "fw-semibold text-primary"
),
target: a.isNewTab ? "_blank" : void 0,
rel: a.isNewTab ? "noopener noreferrer" : void 0,
children: [
a.label,
a.active && /* @__PURE__ */ e.jsx("span", { className: "visually-hidden", children: "Attivo" })
]
}
)
},
v
)) }),
s && /* @__PURE__ */ e.jsxs(
i,
{
href: s.href,
"aria-label": `Vai alla pagina ${s.label}`,
className: n(
"text-decoration-none fs-custom py-x12 px-x24",
s.active ? "fw-bold text-blue-30" : "fw-semibold text-primary",
"ui-header-desktop-support-link",
s.active && "active"
),
children: [
s.label,
s.active && /* @__PURE__ */ e.jsx("span", { className: "visually-hidden", children: "Attivo" })
]
}
)
] }) })
] })
] });
};
export {
O as HeaderDesktop
};
//# sourceMappingURL=index.es164.js.map