@anoki/fse-ui
Version:
FSE UI components library
125 lines (124 loc) • 4.39 kB
JavaScript
import { j as e } from "./index.es278.js";
import { LOGOS as a } from "./index.es161.js";
import { clsx as o } from "./index.es280.js";
import { Divider as c } from "./index.es104.js";
import './components/navigations/HeaderPostLogin/HeaderPostLogin.css';/* empty css */
import { CirlceLeftArrow as y } from "./index.es78.js";
import { CircleRightArrow as C } from "./index.es77.js";
import { Col as x } from "./index.es82.js";
import { Row as A } from "./index.es219.js";
const G = ({
shortTitle: m,
region: p,
asLink: h = "a",
navigationItems: s,
generalClassName: f,
navItemsClassName: d,
isExpanded: t = !0,
expandTitle: j = "Apri",
subtitle: l = "",
variant: i = "default",
toggleExpand: u
}) => {
const g = h, v = a.nazionale, b = a[p], N = i === "default" ? t ? "p-x40" : "py-x40" : t ? "p-x20" : "pt-x12 pb-x40";
return /* @__PURE__ */ e.jsxs(
"nav",
{
role: "navigation",
className: o(
"ui-hpl-menu",
f,
t ? "expanded" : "closed"
),
style: {
"--navbar-elements": s.length ?? 0
},
children: [
/* @__PURE__ */ e.jsxs(
x,
{
pt: "x80",
px: t ? "x40" : i === "default" ? "x20" : "x16",
gap: "x16",
justifyContent: "center",
className: "position-relative",
children: [
/* @__PURE__ */ e.jsxs(
A,
{
gap: t ? "x24" : "x12",
alignItems: "center",
justifyContent: "center",
children: [
/* @__PURE__ */ e.jsx(
v,
{
width: t ? 27 : 20,
height: t ? 44 : 37
}
),
/* @__PURE__ */ e.jsx(c, { bg: "border-divider", direction: "vertical" }),
/* @__PURE__ */ e.jsx(
b,
{
width: t ? 44 : 37,
height: t ? 44 : 37
}
)
]
}
),
/* @__PURE__ */ e.jsx("h1", { className: o("shortTitle fs-custom fw-normal text-slate-20 text-align-center"), children: m }),
l && /* @__PURE__ */ e.jsx("p", { className: "fs-7 fw-semibold text-slate-52 text-center", children: l })
]
}
),
/* @__PURE__ */ e.jsx("div", { className: N, children: /* @__PURE__ */ e.jsx(c, { bg: "border-divider" }) }),
/* @__PURE__ */ e.jsx(
x,
{
as: "ul",
gap: "x12",
className: o("list-style-none ui-hpl-list", d),
role: "list",
children: s.map((r, w) => {
const n = r == null ? void 0 : r.icon;
return /* @__PURE__ */ e.jsx(
"li",
{
className: o("ui-hpl-list-item", r.active && "active"),
children: /* @__PURE__ */ e.jsxs(
g,
{
href: r.href,
className: o(
"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: [
n && /* @__PURE__ */ e.jsx(n, { 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" })
]
}
)
},
w
);
})
}
),
/* @__PURE__ */ e.jsxs("button", { onClick: u, className: "ui-toggle-menu-button py-x24", children: [
t ? /* @__PURE__ */ e.jsx(y, {}) : /* @__PURE__ */ e.jsx(C, {}),
j
] })
]
}
);
};
export {
G as HeaderPostLogin
};
//# sourceMappingURL=index.es163.js.map