@anoki/fse-ui
Version:
FSE UI components library
156 lines (155 loc) • 5.8 kB
JavaScript
import { j as e } from "./index.es244.js";
import { Divider as g } from "./index.es137.js";
import { LOGOS as d } from "./index.es27.js";
import { HeaderSlim as N } from "./index.es17.js";
import { clsx as n } from "./index.es246.js";
import { Balancer as y } from "./index.es256.js";
import { Button as w } from "./index.es28.js";
import { Container as C } from "./index.es6.js";
import './components/navigations/HeaderDesktop/HeaderDesktop.css';/* empty css */
import { Row as t } from "./index.es9.js";
const V = ({
title: r,
region: l,
asLink: x = "a",
labels: h,
navigatonItems: m,
supportLink: a,
loginLink: j = "/",
shortTitle: c,
headerTitleClassname: p,
children: f,
headerLogoUrl2: o
}) => {
const i = x, v = d.nazionale, u = d[l];
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 base-row align-items-center justify-content-center gap-x8",
children: [
o && /* @__PURE__ */ e.jsx(
"div",
{
style: { backgroundImage: `url(${o})` },
className: "ui-header-item-image"
}
),
c || r,
/* @__PURE__ */ e.jsx("span", { className: "visually-hidden", children: "Vai alla homepage" })
]
}
),
f
]
}
),
/* @__PURE__ */ e.jsxs("header", { className: "bg-white", children: [
/* @__PURE__ */ e.jsxs(
t,
{
py: "x20",
gap: "x16",
alignItems: "center",
justifyContent: "space-between",
className: "max-h-x116 ui-container",
children: [
/* @__PURE__ */ e.jsxs(t, { gap: "x16", alignItems: "center", children: [
/* @__PURE__ */ e.jsxs(t, { gap: "x16", alignItems: "center", justifyContent: "center", children: [
/* @__PURE__ */ e.jsx(v, { height: 44, width: 27 }),
l !== "nazionale" && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
/* @__PURE__ */ e.jsx(g, { bg: "border-divider", direction: "vertical" }),
/* @__PURE__ */ e.jsx(u, { width: 44, height: 44 })
] })
] }),
/* @__PURE__ */ e.jsx("h1", { className: n(p), children: /* @__PURE__ */ e.jsx(y, { children: /* @__PURE__ */ e.jsxs(
i,
{
href: "/",
className: " text-decoration-none hover-underline_dark",
children: [
/* @__PURE__ */ e.jsx("span", { className: "ui-title-line-height", children: r }),
/* @__PURE__ */ e.jsx("span", { className: "visually-hidden", children: "Vai alla homepage" })
]
}
) }) })
] }),
/* @__PURE__ */ e.jsxs(w, { size: "2", href: j, asLink: "a", children: [
/* @__PURE__ */ e.jsxs("span", { style: { fontSize: 14 }, 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(
C,
{
containerClass: "ui-container",
className: "base-row align-items-center justify-content-between max-h-x52",
children: [
/* @__PURE__ */ e.jsx(t, { as: "ul", className: "list-style-none", role: "list", children: m.map((s, b) => /* @__PURE__ */ e.jsx(
"li",
{
className: n(
"py-x12 px-x16 ui-header-desktop-nav-item max-h-x52",
s.active && "active"
),
children: /* @__PURE__ */ e.jsxs(
i,
{
href: s.href,
className: n(
"text-decoration-none fs-custom",
s.active ? "fw-bold text-primary" : "fw-semibold text-primary"
),
target: s.isNewTab ? "_blank" : void 0,
rel: s.isNewTab ? "noopener noreferrer" : void 0,
children: [
s.label,
s.active && /* @__PURE__ */ e.jsx("span", { className: "visually-hidden", children: "Attivo" })
]
}
)
},
b
)) }),
a && /* @__PURE__ */ e.jsxs(
i,
{
href: a.href,
className: n(
"text-decoration-none fs-custom py-x12 px-x24",
a.active ? "fw-bold text-blue-30" : "fw-semibold text-primary",
"ui-header-desktop-support-link",
a.active && "active"
),
children: [
a.label,
a.active && /* @__PURE__ */ e.jsx("span", { className: "visually-hidden", children: "Attivo" })
]
}
)
]
}
) })
] })
] });
};
export {
V as HeaderDesktop
};
//# sourceMappingURL=index.es299.js.map