UNPKG

@anoki/fse-ui

Version:

FSE UI components library

3 lines (2 loc) 4.54 kB
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./components/navigations/HeaderDesktop/HeaderDesktop.css');const e=require("./index.cjs278.js"),w=require("./index.cjs104.js"),m=require("./index.cjs161.js"),t=require("./index.cjs280.js"),y=require("./index.cjs290.js"),v=require("./index.cjs36.js"),$=require("./index.cjs91.js");;/* empty css */const k=require("./index.cjs164.js"),a=require("./index.cjs219.js"),q=({title:o,region:l,asLink:u="a",labels:h,navigatonItems:p,supportLink:n,loginLink:j="/",shortTitle:c,headerTitleClassname:R,children:E,headerLogoUrl2:d,variant:s="default"})=>{const r=u,g=m.LOGOS.nazionale,b=m.LOGOS[l],x=s==="operator"?"text-white":"text-primary",f=s==="operator"?"text-white":"text-blue-30";return e.jsxRuntimeExports.jsxs("div",{className:t.clsx("sticky-header bg-white",s==="operator"&&"ui-header-desktop-operator"),children:[e.jsxRuntimeExports.jsxs(k.HeaderSlim,{pt:"x16",pb:"x16",display:"flex",justifyContent:"space-between",alignItems:"center",containerClassName:t.clsx(s==="operator"?"ui-slim-operator":"bg-slate-20"),children:[e.jsxRuntimeExports.jsxs(r,{href:"/",className:t.clsx("fw-semibold text-decoration-none fs-7 hover-underline base-row align-items-center justify-content-center gap-x8",s==="default"?"text-white":"text-slate-20"),children:[d&&e.jsxRuntimeExports.jsx("div",{style:{backgroundImage:`url(${d})`},className:"ui-header-item-image"}),c||o,e.jsxRuntimeExports.jsx("span",{className:"visually-hidden",children:"Vai alla homepage"})]}),E]}),e.jsxRuntimeExports.jsxs("header",{className:t.clsx(s==="operator"?"bg-radial":"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(g,{height:44,width:27,variant:s}),l!=="nazionale"&&e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(w.Divider,{bg:"border-divider",direction:"vertical"}),e.jsxRuntimeExports.jsx(b,{width:44,height:44,color:s==="operator"?"lightblue-a03":"white"})]})]}),e.jsxRuntimeExports.jsx("h1",{className:t.clsx(R,"ui-header-title"),children:s==="default"?e.jsxRuntimeExports.jsx(y.Balancer,{children:e.jsxRuntimeExports.jsxs(r,{href:"/",className:"text-decoration-none hover-underline_dark",children:[e.jsxRuntimeExports.jsx("span",{className:"ui-title-line-height",children:o}),e.jsxRuntimeExports.jsx("span",{className:"visually-hidden",children:"Vai alla homepage"})]})}):e.jsxRuntimeExports.jsxs(r,{href:"/",className:"text-decoration-none hover-underline_dark",children:[e.jsxRuntimeExports.jsx("span",{className:"ui-title-line-height",children:o}),e.jsxRuntimeExports.jsx("span",{className:"visually-hidden",children:"Vai alla homepage"})]})})]}),e.jsxRuntimeExports.jsxs(v.Button,{size:"2",href:j,asLink:"a",className:"login-button",variant:s==="operator"?"secondary":"primary",children:[e.jsxRuntimeExports.jsxs("span",{style:{fontSize:14},children:[" ",h.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($.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:p.map((i,N)=>e.jsxRuntimeExports.jsx("li",{className:t.clsx("py-x12 px-x16 ui-header-desktop-nav-item max-h-x52",i.active&&"active"),children:e.jsxRuntimeExports.jsxs(r,{href:i.href,className:t.clsx("text-decoration-none fs-custom",i.active?`fw-bold ${x}`:`fw-semibold ${x}`),target:i.isNewTab?"_blank":void 0,rel:i.isNewTab?"noopener noreferrer":void 0,children:[i.label,i.active&&e.jsxRuntimeExports.jsx("span",{className:"visually-hidden",children:"Attivo"})]})},N))}),n&&e.jsxRuntimeExports.jsxs(r,{href:n.href,className:t.clsx("text-decoration-none fs-custom py-x12 px-x0",n.active?`fw-bold ${f}`:`fw-semibold ${x}`,"ui-header-desktop-support-link",n.active&&(s==="operator"?"active-operator":"active")),children:[n.label,n.active&&e.jsxRuntimeExports.jsx("span",{className:"visually-hidden",children:"Attivo"})]})]})})]})]})};exports.HeaderDesktop=q; //# sourceMappingURL=index.cjs319.js.map