UNPKG

@anoki/fse-ui

Version:

FSE UI components library

3 lines (2 loc) 3.79 kB
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./components/navigations/HeaderDesktop/HeaderDesktop.css');const e=require("./index.cjs244.js"),b=require("./index.cjs137.js"),c=require("./index.cjs27.js"),g=require("./index.cjs17.js"),i=require("./index.cjs246.js"),f=require("./index.cjs256.js"),y=require("./index.cjs28.js"),w=require("./index.cjs6.js");;/* empty css */const a=require("./index.cjs9.js"),N=({title:r,region:x,asLink:d="a",labels:m,navigatonItems:u,supportLink:t,loginLink:j="/",shortTitle:o,headerTitleClassname:h,children:p,headerLogoUrl2:l})=>{const n=d,R=c.LOGOS.nazionale,E=c.LOGOS[x];return e.jsxRuntimeExports.jsxs("div",{className:"sticky-header bg-white",children:[e.jsxRuntimeExports.jsxs(g.HeaderSlim,{pt:"x16",pb:"x16",display:"flex",justifyContent:"space-between",alignItems:"center",children:[e.jsxRuntimeExports.jsxs(n,{href:"/",className:"text-white fw-semibold text-decoration-none fs-7 hover-underline base-row align-items-center justify-content-center gap-x8",children:[l&&e.jsxRuntimeExports.jsx("div",{style:{backgroundImage:`url(${l})`},className:"ui-header-item-image"}),o||r,e.jsxRuntimeExports.jsx("span",{className:"visually-hidden",children:"Vai alla homepage"})]}),p]}),e.jsxRuntimeExports.jsxs("header",{className:"bg-white",children:[e.jsxRuntimeExports.jsxs(a.Row,{py:"x20",gap:"x16",alignItems:"center",justifyContent:"space-between",className:"max-h-x116 ui-container",children:[e.jsxRuntimeExports.jsxs(a.Row,{gap:"x16",alignItems:"center",children:[e.jsxRuntimeExports.jsxs(a.Row,{gap:"x16",alignItems:"center",justifyContent:"center",children:[e.jsxRuntimeExports.jsx(R,{height:44,width:27}),x!=="nazionale"&&e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(b.Divider,{bg:"border-divider",direction:"vertical"}),e.jsxRuntimeExports.jsx(E,{width:44,height:44})]})]}),e.jsxRuntimeExports.jsx("h1",{className:i.clsx(h),children:e.jsxRuntimeExports.jsx(f.Balancer,{children:e.jsxRuntimeExports.jsxs(n,{href:"/",className:" text-decoration-none hover-underline_dark",children:[e.jsxRuntimeExports.jsx("span",{className:"ui-title-line-height",children:r}),e.jsxRuntimeExports.jsx("span",{className:"visually-hidden",children:"Vai alla homepage"})]})})})]}),e.jsxRuntimeExports.jsxs(y.Button,{size:"2",href:j,asLink:"a",children:[e.jsxRuntimeExports.jsxs("span",{style:{fontSize:14},children:[" ",m.login," "]}),e.jsxRuntimeExports.jsx("span",{className:"visually-hidden",children:" Accedi con Cohesion"})]})]}),e.jsxRuntimeExports.jsx("nav",{"aria-label":"Menu di navigazione",className:"shadow-bottom",children:e.jsxRuntimeExports.jsxs(w.Container,{containerClass:"ui-container",className:"base-row align-items-center justify-content-between max-h-x52",children:[e.jsxRuntimeExports.jsx(a.Row,{as:"ul",className:"list-style-none",role:"list",children:u.map((s,v)=>e.jsxRuntimeExports.jsx("li",{className:i.clsx("py-x12 px-x16 ui-header-desktop-nav-item max-h-x52",s.active&&"active"),children:e.jsxRuntimeExports.jsxs(n,{href:s.href,className:i.clsx("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&&e.jsxRuntimeExports.jsx("span",{className:"visually-hidden",children:"Attivo"})]})},v))}),t&&e.jsxRuntimeExports.jsxs(n,{href:t.href,className:i.clsx("text-decoration-none fs-custom py-x12 px-x24",t.active?"fw-bold text-blue-30":"fw-semibold text-primary","ui-header-desktop-support-link",t.active&&"active"),children:[t.label,t.active&&e.jsxRuntimeExports.jsx("span",{className:"visually-hidden",children:"Attivo"})]})]})})]})]})};exports.HeaderDesktop=N; //# sourceMappingURL=index.cjs299.js.map