UNPKG

@anoki/fse-ui

Version:

FSE UI components library

147 lines (146 loc) 5.43 kB
import { j as e } from "./index.es180.js"; import { Divider as u } from "./index.es202.js"; import { LOGOS as d } from "./index.es24.js"; import { HeaderSlim as N } from "./index.es17.js"; import { clsx as n } from "./index.es182.js"; import { Balancer as w } from "./index.es259.js"; import { Button as y } from "./index.es25.js"; import { Container as I } 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: x = "a", labels: m, navigatonItems: h, supportLink: s, loginLink: j = "/", shortTitle: c, headerTitleClassname: f, children: p, headerLogoUrl2: o }) => { const i = x, b = d.nazionale, v = d[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 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 || t, /* @__PURE__ */ e.jsx("span", { className: "visually-hidden", children: "Vai alla homepage" }) ] } ), p ] } ), /* @__PURE__ */ e.jsxs("header", { className: "bg-white", children: [ /* @__PURE__ */ e.jsxs( l, { py: "x20", gap: "x16", alignItems: "center", justifyContent: "space-between", className: "max-h-x116 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(b, { height: 58 }), r !== "nazionale" && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [ /* @__PURE__ */ e.jsx(u, { bg: "border-divider", direction: "vertical" }), /* @__PURE__ */ e.jsx(v, { width: 58, height: 58 }) ] }) ] }), /* @__PURE__ */ e.jsx("h1", { className: n(f), children: /* @__PURE__ */ e.jsx(w, { 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(y, { size: "2", href: j, asLink: "a", children: [ m.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(I, { className: "base-row align-items-center justify-content-between max-h-x52", children: [ /* @__PURE__ */ e.jsx(l, { as: "ul", className: "list-style-none", role: "list", children: h.map((a, g) => /* @__PURE__ */ e.jsx( "li", { className: n( "py-x12 px-x16 ui-header-desktop-nav-item max-h-x52", 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" }) ] } ) }, g )) }), 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.es213.js.map