UNPKG

@anoki/fse-ui

Version:

FSE UI components library

122 lines (121 loc) 4.14 kB
import { j as e } from "./index.es237.js"; import { LOGOS as i } from "./index.es9.js"; import { clsx as t } from "./index.es239.js"; import { Divider as n } from "./index.es72.js"; import './components/navigations/HeaderPostLogin/HeaderPostLogin.css';/* empty css */ import { CirlceLeftArrow as b } from "./index.es176.js"; import { CircleRightArrow as N } from "./index.es177.js"; import { Col as a } from "./index.es61.js"; import { Row as w } from "./index.es116.js"; const z = ({ shortTitle: c, region: x, asLink: m = "a", navigationItems: s, generalClassName: h, navItemsClassName: p, isExpanded: o = !0, expandTitle: j = "Apri", toggleExpand: f }) => { const u = m, g = i.nazionale, d = i[x]; return /* @__PURE__ */ e.jsxs( "nav", { role: "navigation", className: t( "ui-hpl-menu", h, o ? "expanded" : "closed" ), style: { "--navbar-elements": s.length ?? 0 }, children: [ /* @__PURE__ */ e.jsxs( a, { pt: "x80", px: o ? "x40" : "x20", gap: "x16", justifyContent: "center", className: "position-relative", children: [ /* @__PURE__ */ e.jsxs( w, { gap: o ? "x24" : "x12", alignItems: "center", justifyContent: "center", children: [ /* @__PURE__ */ e.jsx( g, { width: o ? 27 : 20, height: o ? 44 : 37 } ), /* @__PURE__ */ e.jsx(n, { bg: "border-divider", direction: "vertical" }), /* @__PURE__ */ e.jsx( d, { width: o ? 44 : 37, height: o ? 44 : 37 } ) ] } ), /* @__PURE__ */ e.jsx("h1", { className: "shortTitle fs-custom fw-normal text-slate-20 text-align-center", children: c }) ] } ), /* @__PURE__ */ e.jsx("div", { className: o ? "p-x40" : "py-x40", children: /* @__PURE__ */ e.jsx(n, { bg: "border-divider" }) }), /* @__PURE__ */ e.jsx( a, { as: "ul", gap: "x12", className: t("list-style-none ui-hpl-list", p), role: "list", children: s.map((r, v) => { const l = r == null ? void 0 : r.icon; return /* @__PURE__ */ e.jsx( "li", { className: t("ui-hpl-list-item", r.active && "active"), children: /* @__PURE__ */ e.jsxs( u, { href: r.href, className: t( "text-decoration-none text-primary fs-custom base-row gap-x16 align-items-center pr-x8", r.active ? "fw-bold" : "fw-normal" ), target: r.isNewTab ? "_blank" : void 0, rel: r.isNewTab ? "noopener noreferrer" : void 0, children: [ l && /* @__PURE__ */ e.jsx(l, { color: "primary", filled: r.active }), /* @__PURE__ */ e.jsx("span", { className: "ui-hpl-text", children: r.label }), r.active && /* @__PURE__ */ e.jsx("span", { className: "visually-hidden", children: "Attivo" }) ] } ) }, v ); }) } ), /* @__PURE__ */ e.jsxs("button", { onClick: f, className: "ui-toggle-menu-button py-x24", children: [ o ? /* @__PURE__ */ e.jsx(b, {}) : /* @__PURE__ */ e.jsx(N, {}), j ] }) ] } ); }; export { z as HeaderPostLogin }; //# sourceMappingURL=index.es10.js.map