scb-wc 0.1.75 → 0.1.76

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/index.js +20 -20
  2. package/mvc/components/scb-accordion/scb-accordion-item.js +2 -2
  3. package/mvc/components/scb-avatar/scb-avatar.js +2 -2
  4. package/mvc/components/scb-breadcrumb/scb-breadcrumb.js +33 -15
  5. package/mvc/components/scb-button/scb-button.js +80 -41
  6. package/mvc/components/scb-calendar/scb-calendar.js +1 -1
  7. package/mvc/components/scb-calendar-card/scb-calendar-card.js +4 -4
  8. package/mvc/components/scb-card/scb-card.js +3 -3
  9. package/mvc/components/scb-checkbox/scb-checkbox.js +32 -7
  10. package/mvc/components/scb-chip/scb-chip.js +6 -6
  11. package/mvc/components/scb-dialog/scb-dialog.js +1 -1
  12. package/mvc/components/scb-dropdown/scb-dropdown.js +1 -1
  13. package/mvc/components/scb-fab/scb-fab.js +24 -6
  14. package/mvc/components/scb-fact-card/scb-fact-card.js +4 -4
  15. package/mvc/components/scb-header/scb-header.js +474 -124
  16. package/mvc/components/scb-horizontal-scroller/scb-horizontal-scroller.js +1 -1
  17. package/mvc/components/scb-icon-button/scb-icon-button.js +2 -2
  18. package/mvc/components/scb-keyfigure-card/scb-keyfigure-card.js +2 -2
  19. package/mvc/components/scb-link/scb-link.js +14 -10
  20. package/mvc/components/scb-list/scb-list-item.js +5 -5
  21. package/mvc/components/scb-list/scb-list.js +3 -3
  22. package/mvc/components/scb-menu/scb-menu-item.js +2 -2
  23. package/mvc/components/scb-nav/scb-nav.js +1 -1
  24. package/mvc/components/scb-notification-card/scb-notification-card.js +1 -1
  25. package/mvc/components/scb-options-menu/scb-options-menu-item.js +1 -1
  26. package/mvc/components/scb-pagination/scb-pagination.js +1 -1
  27. package/mvc/components/scb-progress-stepper/scb-progress-step.js +1 -1
  28. package/mvc/components/scb-radio-button/scb-radio-button.js +39 -9
  29. package/mvc/components/scb-search/scb-search.js +3 -3
  30. package/mvc/components/scb-segmented-button/scb-segmented-item.js +1 -1
  31. package/mvc/components/scb-select/scb-select-option.js +3 -3
  32. package/mvc/components/scb-select/scb-select.js +1 -1
  33. package/mvc/components/scb-slider/scb-slider.js +58 -4
  34. package/mvc/components/scb-status-pill/scb-status-pill.js +1 -1
  35. package/mvc/components/scb-stepper/scb-step.js +1 -1
  36. package/mvc/components/scb-switch/scb-switch.js +51 -6
  37. package/mvc/components/scb-tabs/scb-primary-tab.js +3 -2
  38. package/mvc/components/scb-tabs/scb-secondary-tab.js +3 -2
  39. package/mvc/components/scb-tabs/scb-tabs.js +11 -2
  40. package/mvc/components/scb-textfield/scb-textfield.js +1 -1
  41. package/mvc/components/scb-toc/scb-toc-item.js +1 -1
  42. package/mvc/components/scb-tooltip/scb-tooltip.js +1 -1
  43. package/mvc/vendor/assist-chip.js +20 -0
  44. package/mvc/vendor/attachable-controller.js +1 -0
  45. package/mvc/vendor/checkbox-validator.js +1 -0
  46. package/mvc/vendor/chip-set.js +2 -0
  47. package/mvc/vendor/chip.js +18 -0
  48. package/mvc/vendor/delegate.js +1 -0
  49. package/mvc/vendor/element-internals.js +1 -0
  50. package/mvc/vendor/elevation.js +2 -0
  51. package/mvc/vendor/filled-icon-button.js +2 -0
  52. package/mvc/vendor/filled-tonal-icon-button.js +2 -0
  53. package/mvc/vendor/filter-chip.js +43 -0
  54. package/mvc/vendor/focusable.js +1 -0
  55. package/mvc/vendor/form-associated.js +1 -0
  56. package/mvc/vendor/form-label-activation.js +1 -0
  57. package/mvc/vendor/form-submitter.js +1 -0
  58. package/mvc/vendor/icon-button.js +2 -0
  59. package/mvc/vendor/icon.js +2 -0
  60. package/mvc/vendor/list.js +8 -0
  61. package/mvc/vendor/md-focus-ring.js +2 -0
  62. package/mvc/vendor/outlined-icon-button.js +2 -0
  63. package/mvc/vendor/redispatch-event.js +1 -0
  64. package/mvc/vendor/ripple.js +2 -0
  65. package/mvc/vendor/rolldown-runtime.js +1 -0
  66. package/mvc/vendor/shared-styles.js +3 -0
  67. package/mvc/vendor/shared-styles2.js +30 -0
  68. package/mvc/vendor/tab-styles.js +17 -0
  69. package/mvc/vendor/validator.js +1 -0
  70. package/package.json +2 -2
  71. package/scb-breadcrumb/scb-breadcrumb.js +38 -21
  72. package/scb-components/scb-header/scb-header.d.ts +11 -4
  73. package/scb-header/scb-header.js +512 -156
  74. package/scb-link/scb-link.js +24 -20
  75. package/scb-wc.bundle.js +602 -232
  76. package/mvc/vendor/vendor-material.js +0 -364
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../scb-drawer/scb-drawer.js","../../vendor/decorate.js","../../vendor/vendor.js","../../vendor/vendor-lit.js","../scb-divider/scb-divider.js","../../vendor/assertClassBrand.js","../scb-menu/scb-menu.js","../scb-menu/scb-menu-item.js","../../vendor/preload-helper.js","../../vendor/scb-chevron.js","../scb-menu/scb-menu-section.js","../scb-menu/scb-sub-menu.js","../scb-dropdown/scb-dropdown.js","../../vendor/vendor-material.js","../scb-button/scb-button.js","../scb-options-menu/scb-options-menu.js","../scb-options-menu/scb-options-menu-item.js","../scb-options-menu/scb-options-sub-menu.js"])))=>i.map(i=>d[i]);
2
- import"../../vendor/vendor-material.js";import{_ as E,b as P,g as I,h as c,m as S,v as _,y as m}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{t as l}from"../../vendor/decorate.js";import"../scb-button/scb-button.js";import{t as T}from"../../vendor/preload-helper.js";import"../scb-icon-button/scb-icon-button.js";import"../scb-search/scb-search.js";import"../scb-grid/scb-grid-item.js";import"../scb-grid/scb-grid.js";import"../scb-skeleton/scb-skeleton.js";(function(){try{var p=typeof globalThis<"u"?globalThis:window;if(!p.__scb_ce_guard_installed__){p.__scb_ce_guard_installed__=!0;var e=customElements.define.bind(customElements);customElements.define=function(t,s,r){try{customElements.get(t)||e(t,s,r)}catch(a){var i=String(a||"");if(i.indexOf("already been used")===-1&&i.indexOf("NotSupportedError")===-1)throw a}}}}catch{}})();var k,C,z=0,D=()=>{if(typeof window>"u"||typeof document>"u"||!("customElements"in window)||document.head.querySelector("style[data-scb-header-pre-upgrade]"))return;const p=document.createElement("style");p.setAttribute("data-scb-header-pre-upgrade",""),p.textContent=`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../../vendor/md-focus-ring.js","../../vendor/rolldown-runtime.js","../../vendor/vendor.js","../../vendor/attachable-controller.js","../../vendor/vendor-lit.js","../scb-drawer/scb-drawer.js","../../vendor/decorate.js","../scb-divider/scb-divider.js","../../vendor/assertClassBrand.js","../scb-menu/scb-menu.js","../scb-menu/scb-menu-item.js","../../vendor/preload-helper.js","../../vendor/scb-chevron.js","../scb-menu/scb-menu-section.js","../scb-menu/scb-sub-menu.js","../scb-search/scb-search.js","../../vendor/icon.js","../../vendor/ripple.js","../scb-dropdown/scb-dropdown.js","../scb-button/scb-button.js","../../vendor/elevation.js","../../vendor/delegate.js","../../vendor/form-submitter.js","../../vendor/element-internals.js","../../vendor/form-label-activation.js","../scb-options-menu/scb-options-menu.js","../scb-options-menu/scb-options-menu-item.js","../scb-options-menu/scb-options-sub-menu.js"])))=>i.map(i=>d[i]);
2
+ import{_ as M,b as E,g as P,h,m as S,v as y,y as m}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{t as l}from"../../vendor/decorate.js";import{t as $}from"../../vendor/preload-helper.js";(function(){try{var b=typeof globalThis<"u"?globalThis:window;if(!b.__scb_ce_guard_installed__){b.__scb_ce_guard_installed__=!0;var e=customElements.define.bind(customElements);customElements.define=function(t,r,s){try{customElements.get(t)||e(t,r,s)}catch(a){var i=String(a||"");if(i.indexOf("already been used")===-1&&i.indexOf("NotSupportedError")===-1)throw a}}}}catch{}})();var A,T,I=0,L=()=>{if(typeof window>"u"||typeof document>"u"||!("customElements"in window)||document.head.querySelector("style[data-scb-header-pre-upgrade]"))return;const b=document.createElement("style");b.setAttribute("data-scb-header-pre-upgrade",""),b.textContent=`
3
3
  scb-header:not(:defined),
4
4
  scb-header[data-upgrading] {
5
5
  display: block;
@@ -50,49 +50,89 @@ import"../../vendor/vendor-material.js";import{_ as E,b as P,g as I,h as c,m as
50
50
  );
51
51
  }
52
52
  }
53
- `,document.head.appendChild(p);const e=n=>{const u=String(n??"").trim();if(u)return/^\d+$/.test(u)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(u,10)))})`:u},t=n=>{const u=String(n??"").trim();if(!u)return!1;try{const b=JSON.parse(u);return Array.isArray(b)&&b.length>0}catch{return!1}},s=n=>n!=null&&!/^(false|0|off|no)$/i.test(n.trim()),r=n=>{for(const u of Array.from(n.children)){const b=u.tagName.toLowerCase();if(b==="scb-header-tab"||b==="scb-dropdown")return!0}return!1},i=n=>{r(n)||t(n.getAttribute("tabs"))||s(n.getAttribute("reserve-tabs"))||s(n.getAttribute("layout-pending"))?n.setAttribute("data-pre-has-tabs",""):n.removeAttribute("data-pre-has-tabs");const u=e(n.getAttribute("spacing")),b=e(n.getAttribute("spacing-top"))??u,v=e(n.getAttribute("spacing-bottom"))??u;b?n.style.setProperty("--scb-header-spacing-block-start",b):n.style.removeProperty("--scb-header-spacing-block-start"),v?n.style.setProperty("--scb-header-spacing-block-end",v):n.style.removeProperty("--scb-header-spacing-block-end");const y=(n.getAttribute("logo-width")??"").trim();y?n.style.setProperty("--scb-header-pre-logo-w",y):n.style.removeProperty("--scb-header-pre-logo-w");const w=(n.getAttribute("logo-height")??"").trim();w?n.style.setProperty("--scb-header-pre-logo-img-h",w):n.style.removeProperty("--scb-header-pre-logo-img-h");const h=(n.getAttribute("search-height")??"").trim();h?n.style.setProperty("--scb-header-pre-control-size",h):n.style.removeProperty("--scb-header-pre-control-size")};document.querySelectorAll("scb-header").forEach(i);const d=new MutationObserver(n=>{for(const u of n){if(u.type==="attributes"){const b=u.target;b instanceof HTMLElement&&b.tagName.toLowerCase()==="scb-header"&&i(b);continue}if(u.type==="childList"){const b=[...Array.from(u.addedNodes),...Array.from(u.removedNodes)];for(const v of b){if(!(v instanceof HTMLElement))continue;if(v.tagName.toLowerCase()==="scb-header"){i(v);continue}const y=v.closest?.("scb-header");y&&i(y)}}}});d.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabs","spacing","spacing-top","spacing-bottom","logo-width","logo-height","logo-aspect-ratio","logo-alt","logotype-text","search-height","reserve-tabs","layout-pending"]}),customElements.whenDefined("scb-header").then(()=>{d.disconnect()})};D();var M={fromAttribute:p=>p==null?!0:!/^(false|0|off|no)$/i.test(p),toAttribute:p=>String(!!p)},$={fromAttribute:p=>p==null?!1:!/^(false|0|off|no)$/i.test(p),toAttribute:p=>p?"":null},N={fromAttribute:p=>p==="small"||p==="large"?p:"medium",toAttribute:p=>{const e=String(p??"");return e==="small"||e==="large"?e:null}},o=(k=class extends E{constructor(){super(),this.maxWidth="1440px",this.size="medium",this.logoText="",this.logotypeText="",this.logoAlt="",this.logoHref="/",this.logoSrc="",this.logoWidth="",this.logoHeight="",this.logoAspectRatio="",this.logoInvertDm=!1,this.banner=!1,this.tabs=[],this.activeTab=null,this.reserveTabs=!1,this.layoutPending=!1,this.utilityItems=[],this.searchButtonLabel="Sök",this.menuButtonLabel="Meny",this.deferDrawer=!1,this.showDrawer=!0,this.alwaysShowMenuButton=!1,this.showSearch=!0,this.includeUtilityInMenu=!1,this.drawerOverlay=!0,this.searchText="",this._drawerId="main-drawer",this._menuExpanded=!1,this._searchId="header-search",this._drawerReady=!1,this._mobileSearchOpen=!1,this._initialUpgradeComplete=!1,this._slotNavItems=[],this._slotUtils=[],this._slotMenu=[],this._measureScheduled=!1,this._scheduleMeasure=()=>{this.layoutPending||this._measureScheduled||(this._measureScheduled=!0,requestAnimationFrame(()=>{this._measureScheduled=!1,this._measure()}))},this._onWindowResize=()=>{window.innerWidth>=this.BP_SM&&this._mobileSearchOpen&&this._setMobileSearchOpen(!1),this._scheduleMeasure()},this._onMenuSelect=t=>{const s=t.detail;this.dispatchEvent(new CustomEvent("scb-menu-select",{detail:s,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("scbmenuselect",{detail:s,bubbles:!0,composed:!0}));const r=s?.item,i=typeof s?.href=="string"?s.href:typeof s?.itemHref=="string"?s.itemHref:typeof s?.item_href=="string"?s.item_href:"",a=r?r.getAttribute("item-href")??r.getAttribute("href")??"":"";String(i||a||"").trim()&&this._closeDrawerNow()},this._collapsed=!1,this._unlockAtWidth=0,this._hideLogoText=!1,this._logoTextUnlockAt=0,this._slotWatchers=[],this._harvestPending=!1,this._harvest=(t={})=>{const s=Array.from(this.children),r=[],i=[],a=[];let d=-1,n=!1;const u=h=>({label:h.getAttribute("label")??"",href:h.getAttribute("href")??void 0,icon:h.getAttribute("icon")??void 0}),b=h=>{h.hasAttribute("role")&&h.removeAttribute("role"),h.getAttribute("aria-hidden")!=="true"&&h.setAttribute("aria-hidden","true")};for(const h of s){const A=h.tagName.toLowerCase();if(A==="scb-header-tab"){const f=h.getAttribute("label")??"",g=h.getAttribute("href"),x=g&&g.trim()!==""?g:void 0;(h.hasAttribute("selected")||h.getAttribute("selected")==="true"||h.getAttribute("active")==="true"||h.getAttribute("aria-current")==="page")&&d===-1&&(d=r.length),r.push({kind:"tab",label:f,href:x});continue}if(A==="scb-badge"){const f=h.querySelector("scb-dropdown");if(f){n=!0;const g=f.getAttribute("label")??"";(f.hasAttribute("selected")||f.getAttribute("selected")==="true"||f.getAttribute("active")==="true"||f.getAttribute("aria-current")==="page")&&d===-1&&(d=r.length);const x=`scb-header-tab-${r.length}`;h.getAttribute("slot")!==x&&h.setAttribute("slot",x),f.hasAttribute("slot")&&f.removeAttribute("slot"),f.hasAttribute("as-tab")||f.setAttribute("as-tab",""),r.push({kind:"dropdown",slotName:x,label:g});continue}}if(A==="scb-dropdown"){n=!0;const f=h.getAttribute("label")??"";(h.hasAttribute("selected")||h.getAttribute("selected")==="true"||h.getAttribute("active")==="true"||h.getAttribute("aria-current")==="page")&&d===-1&&(d=r.length);const g=`scb-header-tab-${r.length}`;h.getAttribute("slot")!==g&&h.setAttribute("slot",g),h.hasAttribute("as-tab")||h.setAttribute("as-tab",""),r.push({kind:"dropdown",slotName:g,label:f});continue}if(A==="scb-header-utility"){b(h),i.push({label:h.getAttribute("label")??"",href:h.getAttribute("href")??"#",target:h.getAttribute("target")??void 0});continue}if(A==="scb-header-menu-group"){const f={label:h.getAttribute("label")??"",icon:h.getAttribute("icon")??void 0,children:[]};h.querySelectorAll("scb-header-menu-item").forEach(g=>f.children.push(u(g))),a.push(f);continue}A==="scb-header-menu-item"&&a.push(u(h))}const v=!this._sameNavItems(this._slotNavItems,r),y=!this._sameUtilityItems(this._slotUtils,i),w=!this._sameMenuNodes(this._slotMenu,a);v&&(this._slotNavItems=r),y&&(this._slotUtils=i),w&&(this._slotMenu=a),n&&this._ensureDropdownReady(),!this.hasAttribute("active-tab")&&d>=0&&this.activeTab!==d&&(this.activeTab=d),(t.scheduleMeasure??!0)&&queueMicrotask(()=>{this.updateComplete.then(()=>{this._scheduleMeasure()})})},this._measure=()=>{if(this.layoutPending)return;const t=this._top,s=this._logoGroup;if(!t||!s)return;const r=window.innerWidth,i=t.clientWidth,a=this._overflows(this._util),d=this._tabsOverflows(),n=r<this.BP_MD||a||d;this._collapsed?!n&&i>=this._unlockAtWidth&&this._setCollapsed(!1):n&&(this._unlockAtWidth=i+this._HYST,this._setCollapsed(!0));let u=!1;if(this.showSearch&&r>=this.BP_SM&&r<this.BP_MD&&this._searchWrap){const v=getComputedStyle(this._searchWrap),y=Math.max(this._num(v.minWidth,this._tokenPx("--scb-header-search-min",250)),this._tokenPx("--scb-header-search-min",250)),w=this._num(getComputedStyle(t).gap,this._tokenPx("--spacing-7",24)),h=this.showDrawer&&(this.alwaysShowMenuButton||r<this.BP_MD||this._collapsed)?this._menuBtn?.getBoundingClientRect().width||this._tokenPx("--icon-size-extra-extra-large",48):0;u=s.getBoundingClientRect().width+w+y+w+h+8>i+.5}this._setHideSearch(u);let b=!1;if(this.showDrawer&&(this.alwaysShowMenuButton||r<this.BP_MD||this._collapsed)&&!this._visible(this._util)&&!this._visible(this._searchWrap)){const v=this._num(getComputedStyle(t).gap,this._tokenPx("--spacing-7",24)),y=this._menuBtn?.getBoundingClientRect().width||this._tokenPx("--icon-size-extra-extra-large",48),w=(this._logoGroup?.getBoundingClientRect().width||0)+v+y;this._hideLogoText?b=!(i>=this._logoTextUnlockAt):w>i+.5&&(b=!0,this._logoTextUnlockAt=i+this._HYST)}else b=!1,this._logoTextUnlockAt=0;this._setHideLogoText(b)},this._onDrawerOpened=()=>{this._menuExpanded=!0,this._syncMenuBtnAria(),this.dispatchEvent(new CustomEvent("drawer-open",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("draweropen",{bubbles:!0,composed:!0}))},this._onDrawerClosed=()=>{this._menuExpanded=!1,this._syncMenuBtnAria(),this.dispatchEvent(new CustomEvent("drawer-close",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("drawerclose",{bubbles:!0,composed:!0}))},this._onMenuClick=async t=>{this.showDrawer&&(this._setMobileSearchOpen(!1),this.dispatchEvent(new CustomEvent("menu-click",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("menuclick",{bubbles:!0,composed:!0})),!this._drawerReady&&(t.stopPropagation(),await this._ensureDrawerReady(),await this.updateComplete,this._openDrawerNow()))},this._onSearchClick=t=>{const s=this._searchEl;if(s?.submit&&typeof s.submit=="function"){s.submit();return}const r=s?.value??"";this.searchText=r,this.dispatchEvent(new CustomEvent("search-click",{detail:{value:r},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("searchclick",{detail:{value:r},bubbles:!0,composed:!0})),s?.focus?.()},this._onMobileSearchToggle=()=>{const t=!this._mobileSearchOpen;this._setMobileSearchOpen(t),t&&this.updateComplete.then(()=>{this.renderRoot.querySelector(".mobile-search-panel scb-search")?.focus?.()})},this._onTabClick=t=>{const s=t.currentTarget;if(!s)return;const r=s.tagName.toLowerCase()==="a";if(r&&(t.defaultPrevented||t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey))return;const i=s.getAttribute("data-index"),a=i!=null?Number(i):0,d=this._getNavItems()[a];if(d?.kind==="dropdown")return;this.activeTab=a;const n=d?.kind==="tab"?d.href??"":"",u=new CustomEvent("tab-change",{detail:{index:a,href:n},bubbles:!0,composed:!0,cancelable:!0}),b=new CustomEvent("tabchange",{detail:{index:a,href:n},bubbles:!0,composed:!0,cancelable:!0});!(this.dispatchEvent(u)&&this.dispatchEvent(b))&&r&&t.preventDefault()},this._onDropdownTabActivate=t=>{const s=t.detail?.dataIndex,r=typeof s=="number"?s:typeof s=="string"?Number(s):this._readTabIndexFromEvent(t);if(r==null||!Number.isFinite(r))return;const i=this._getNavItems();r<0||r>=i.length||i[r]?.kind==="dropdown"&&(this.activeTab=r,this.dispatchEvent(new CustomEvent("tab-change",{detail:{index:r,href:""},bubbles:!0,composed:!0,cancelable:!0})),this.dispatchEvent(new CustomEvent("tabchange",{detail:{index:r,href:""},bubbles:!0,composed:!0,cancelable:!0})))},this._onTabsKeydown=t=>{const s=t.key;if(s!=="ArrowLeft"&&s!=="ArrowRight"&&s!=="Home"&&s!=="End")return;const r=this._getNavItems();if(!r.length)return;const i=this._readTabIndexFromEvent(t);if(i==null)return;let a=Math.max(0,Math.min(r.length-1,i));s==="ArrowRight"?a=(a+1)%r.length:s==="ArrowLeft"?a=(a-1+r.length)%r.length:s==="Home"?a=0:s==="End"&&(a=r.length-1),t.preventDefault(),this._focusTabAtIndex(a)},this._onSearchInput=t=>{this.searchText=t.detail?.value??"",this.dispatchEvent(new CustomEvent("search-input",{detail:{value:this.searchText},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("searchinput",{detail:{value:this.searchText},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("search-text-change",{detail:{value:this.searchText},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("searchtextchange",{detail:{value:this.searchText},bubbles:!0,composed:!0}))},this._onSearchSubmit=t=>{this.searchText=t.detail?.value??"",this.dispatchEvent(new CustomEvent("search-change",{detail:{value:this.searchText,active:t.detail?.active},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("searchchange",{detail:{value:this.searchText,active:t.detail?.active},bubbles:!0,composed:!0}))},this._onSearchClear=()=>{this.searchText="",this.dispatchEvent(new CustomEvent("search-text-change",{detail:{value:""},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("searchtextchange",{detail:{value:""},bubbles:!0,composed:!0}))};const e=++z;this._drawerId=`scb-header-drawer-${e}`,this._searchId=`scb-header-search-${e}`}requestLayout(){this.layoutPending||(this.setAttribute("data-layout-settling",""),this.updateComplete.then(()=>{this.isConnected&&(this._measure(),this.removeAttribute("data-layout-settling"))}))}get _HYST(){return this._tokenPx("--spacing-11",64)}get BP_SM(){return this._tokenPx("--bp-sm",C.BP_SM_DEFAULT)}get BP_MD(){return this._tokenPx("--bp-md",C.BP_MD_DEFAULT)}_scheduleHarvest(){this._harvestPending||(this._harvestPending=!0,queueMicrotask(()=>{this._harvestPending=!1,this._harvest()}))}get _top(){return this.renderRoot.querySelector(".top-row")}get _util(){return this.renderRoot.querySelector(".utility")}get _logoGroup(){return this.renderRoot.querySelector(".logo-wrap")||this.renderRoot.querySelector(".logo-group")}get _searchWrap(){return this.renderRoot.querySelector(".search")}get _menuBtn(){return this.renderRoot.querySelector(".menu-trigger")}get _searchEl(){return this.renderRoot.querySelector(`#${this._searchId}`)}get _tabsNav(){return this.renderRoot.querySelector(".tabs-nav")}_attachSlotObservers(){this._slotMo?.disconnect(),this._slotWatchers.forEach(i=>i.disconnect()),this._slotWatchers=[];const e=["label","href","icon","target","selected","aria-current","active","role"],t=i=>{const a=new MutationObserver(d=>{this._scheduleHarvest()});this._slotWatchers.push(a),a.observe(i,{attributes:!0,attributeFilter:e})},s=()=>{this._slotWatchers.forEach(a=>a.disconnect()),this._slotWatchers=[];const i=Array.from(this.children);for(const a of i){const d=a.tagName.toLowerCase();if((d==="scb-header-tab"||d==="scb-dropdown"||d==="scb-header-utility"||d==="scb-header-menu-item"||d==="scb-header-menu-group"||d==="scb-badge")&&t(a),d==="scb-badge"){const n=a,u=new MutationObserver(v=>{s(),this._scheduleHarvest()});this._slotWatchers.push(u),u.observe(n,{childList:!0});const b=n.querySelector("scb-dropdown");b&&t(b);continue}if(d==="scb-header-menu-group"){const n=a,u=new MutationObserver(b=>{s(),this._scheduleHarvest()});this._slotWatchers.push(u),u.observe(n,{childList:!0,subtree:!0}),n.querySelectorAll("scb-header-menu-item").forEach(b=>t(b))}}},r=new MutationObserver(i=>{let a=!1;for(const d of i)if(d.type==="childList"){a=!0;break}a&&s(),this._scheduleHarvest()});this._slotMo=r,r.observe(this,{childList:!0}),s()}_sameNavItems(e,t){if(e.length!==t.length)return!1;for(let s=0;s<e.length;s+=1){const r=e[s],i=t[s];if(!r||!i||r.kind!==i.kind||r.label!==i.label)return!1;if(r.kind==="tab"&&i.kind==="tab"){if((r.href??"")!==(i.href??""))return!1}else if(r.kind==="dropdown"&&i.kind==="dropdown"&&r.slotName!==i.slotName)return!1}return!0}_sameUtilityItems(e,t){if(e.length!==t.length)return!1;for(let s=0;s<e.length;s+=1){const r=e[s],i=t[s];if(!r||!i||r.label!==i.label||r.href!==i.href||(r.target??"")!==(i.target??""))return!1}return!0}_sameMenuNodes(e,t){if(e.length!==t.length)return!1;for(let s=0;s<e.length;s+=1){const r=e[s],i=t[s];if(!r||!i||r.label!==i.label||(r.href??"")!==(i.href??"")||(r.icon??"")!==(i.icon??"")||!this._sameMenuNodes(r.children??[],i.children??[]))return!1}return!0}_setCollapsed(e){this._collapsed!==e&&(this._collapsed=e,e?this.setAttribute("data-collapsed",""):this.removeAttribute("data-collapsed"))}_setHideSearch(e){e?this.setAttribute("data-hide-search",""):this.removeAttribute("data-hide-search")}_setHideLogoText(e){this._hideLogoText!==e&&(this._hideLogoText=e,e?this.setAttribute("data-hide-logo-text",""):this.removeAttribute("data-hide-logo-text"))}_setMobileSearchOpen(e){this._mobileSearchOpen!==e&&(this._mobileSearchOpen=e,this.toggleAttribute("data-mobile-search-open",e))}_num(e,t){const s=Number.parseFloat(String(e??"").trim());return Number.isFinite(s)?s:t}_tokenPx(e,t){const s=getComputedStyle(this);return this._num(s.getPropertyValue(e),t)}_visible(e){return e?getComputedStyle(e).display!=="none":!1}_overflows(e){return!e||!this._visible(e)?!1:e.scrollWidth>e.clientWidth+1}_tabsOverflows(){const e=this._tabsNav;if(!e||!this._visible(e))return!1;const t=Array.from(e.querySelectorAll(".tab-wrap"));if(t.length===0)return!1;const s=e.getBoundingClientRect();let r=s.left;for(const i of t){const a=i.getBoundingClientRect();a.width<=0||a.right>r&&(r=a.right)}return r-s.left>s.width+1}connectedCallback(){super.connectedCallback(),this._initialUpgradeComplete||this.setAttribute("data-upgrading",""),this._harvest({scheduleMeasure:!1}),this._attachSlotObservers()}_finishInitialUpgrade(){this._initialUpgradeComplete||(this._initialUpgradeComplete=!0,requestAnimationFrame(()=>{this.isConnected&&(this._measure(),this.removeAttribute("data-upgrading"))}))}firstUpdated(){this._syncLandmarkAttributes(),this.showDrawer&&!this.deferDrawer&&this._ensureDrawerReady(),this.updateComplete.then(()=>{this._harvest({scheduleMeasure:!1}),this._attachSlotObservers(),this._syncDropdownTabs(),this._finishInitialUpgrade()});const e=this._top;e&&(this._ro=new ResizeObserver(()=>this._scheduleMeasure()),this._ro.observe(e)),window.addEventListener("resize",this._onWindowResize,{passive:!0})}updated(e){e.has("searchMax")&&this.style.setProperty("--scb-header-search-max",this.searchMax??"380px"),e.has("searchMin")&&this.style.setProperty("--scb-header-search-min",this.searchMin??"250px"),e.has("searchHeight")&&(this.searchHeight&&this.searchHeight.trim()?this.style.setProperty("--scb-search-height",this.searchHeight.trim()):this.style.removeProperty("--scb-search-height")),(e.has("logoWidth")||e.has("logoHeight")||e.has("logoAspectRatio"))&&this._applyLogoSizing(),(e.has("spacing")||e.has("spacingTop")||e.has("spacingBottom"))&&this._applySpacing(),(e.has("banner")||e.has("bannerLabel"))&&this._syncLandmarkAttributes(),(e.has("utilityItems")||e.has("tabs")||e.has("logoText")||e.has("logotypeText")||e.has("logoSrc")||e.has("logoWidth")||e.has("logoHeight")||e.has("logoAspectRatio")||e.has("activeTab")||e.has("_slotNavItems")||e.has("_slotUtils")||e.has("_slotMenu")||e.has("showDrawer")||e.has("alwaysShowMenuButton")||e.has("showSearch")||e.has("layoutPending")||e.has("searchMax")||e.has("searchMin")||e.has("size"))&&this.updateComplete.then(()=>{this._scheduleMeasure()}),(e.has("showDrawer")||e.has("deferDrawer"))&&this.showDrawer&&!this.deferDrawer&&this._ensureDrawerReady(),e.has("showSearch")&&!this.showSearch&&this._setMobileSearchOpen(!1),e.has("layoutPending")&&!this.layoutPending&&this.requestLayout(),(e.has("activeTab")||e.has("_slotNavItems")||e.has("tabs")||e.has("size"))&&this.updateComplete.then(()=>{this._syncDropdownTabs()})}disconnectedCallback(){this._ro?.disconnect(),this._slotMo?.disconnect(),this._slotWatchers.forEach(e=>e.disconnect()),this._slotWatchers=[],window.removeEventListener("resize",this._onWindowResize),super.disconnectedCallback()}_mapSpacingToken(e){if(!e)return;const t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}_applySpacing(){const e=this._mapSpacingToken(this.spacing),t=this._mapSpacingToken(this.spacingTop)??e,s=this._mapSpacingToken(this.spacingBottom)??e;t?this.style.setProperty("--scb-header-spacing-block-start",t):this.style.removeProperty("--scb-header-spacing-block-start"),s?this.style.setProperty("--scb-header-spacing-block-end",s):this.style.removeProperty("--scb-header-spacing-block-end")}_syncLandmarkAttributes(){const e=this.renderRoot.querySelector(".header-landmark");if(!e)return;if(!this.banner){e.removeAttribute("role"),e.removeAttribute("aria-label");return}e.setAttribute("role","banner");const t=(this.bannerLabel??"").trim();t?e.setAttribute("aria-label",t):e.removeAttribute("aria-label")}_applyLogoSizing(){const e=(this.logoWidth??"").trim(),t=(this.logoHeight??"").trim(),s=(this.logoAspectRatio??"").trim();e?this.style.setProperty("--scb-header-logo-img-w",e):this.style.removeProperty("--scb-header-logo-img-w"),t?this.style.setProperty("--scb-header-logo-img-h",t):e?this.style.setProperty("--scb-header-logo-img-h","auto"):this.style.removeProperty("--scb-header-logo-img-h"),s?this.style.setProperty("--scb-header-logo-img-aspect-ratio",s):this.style.removeProperty("--scb-header-logo-img-aspect-ratio")}_closeDrawerNow(){const e=this.renderRoot.querySelector(`#${this._drawerId}`);e&&(e.open=!1)}_openDrawerNow(){const e=this.renderRoot.querySelector(`#${this._drawerId}`);e&&(e.open=!0)}async _ensureDrawerReady(){this._drawerReady||(this._drawerImportPromise??(this._drawerImportPromise=Promise.all([T(()=>import("../scb-drawer/scb-drawer.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),T(()=>import("../scb-menu/scb-menu.js"),__vite__mapDeps([6,5,1,2,3,4,7,8,9,10,11]),import.meta.url)]).then(()=>{})),await this._drawerImportPromise,this._drawerReady=!0)}async _ensureDropdownReady(){customElements.get("scb-dropdown")||(this._dropdownImportPromise??(this._dropdownImportPromise=T(()=>import("../scb-dropdown/scb-dropdown.js").then(()=>{}),__vite__mapDeps([12,1,13,2,3,14,5,9,15,16,4,17]),import.meta.url)),await this._dropdownImportPromise)}_syncMenuBtnAria(){this.renderRoot.querySelectorAll(".menu-trigger").forEach(e=>{e.setAttribute("aria-expanded",String(this._menuExpanded))})}_getNavItems(){return this._slotNavItems.length?this._slotNavItems:(this.tabs??[]).map(e=>({kind:"tab",...e}))}_getDropdownForSlot(e){const t=this.querySelector(`[slot="${e}"]`);return t?t.tagName.toLowerCase()==="scb-dropdown"?t:t.querySelector("scb-dropdown"):null}_syncDropdownTabs(){this._getNavItems().forEach((e,t)=>{if(e.kind!=="dropdown")return;const s=this._getDropdownForSlot(e.slotName);if(!s)return;const r=String(t);s.getAttribute("data-index")!==r&&s.setAttribute("data-index",r),s.hasAttribute("as-tab")||s.setAttribute("as-tab","");const i=this.size,a=s;a?.size!==i&&(a.size=i),t===this.activeTab?s.getAttribute("aria-current")!=="page"&&s.setAttribute("aria-current","page"):s.hasAttribute("aria-current")&&s.removeAttribute("aria-current")})}_readTabIndexFromEvent(e){const t=e.composedPath?e.composedPath():[];for(const s of t){if(!(s instanceof HTMLElement))continue;const r=s.getAttribute("data-index");if(r==null)continue;const i=Number(r);if(Number.isFinite(i))return i}return null}_focusTabAtIndex(e){const t=this._getNavItems()[e];if(t){if(t.kind==="dropdown"){this._getDropdownForSlot(t.slotName)?.focus?.();return}this.renderRoot.querySelector(`.tab-link[data-index="${e}"]`)?.focus?.()}}_renderMenuNodes(e){return!e||e.length===0?m``:m`${e.map(t=>this._renderMenuNode(t))}`}_renderMenuNode(e){const t=Array.isArray(e.children)&&e.children.length>0,s=(e.href??"").trim(),r=(e.icon??"").trim(),i=t?m`
53
+ `,document.head.appendChild(b);const e=n=>{const u=String(n??"").trim();if(u)return/^\d+$/.test(u)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(u,10)))})`:u},t=n=>{const u=String(n??"").trim();if(!u)return!1;try{const p=JSON.parse(u);return Array.isArray(p)&&p.length>0}catch{return!1}},r=n=>n!=null&&!/^(false|0|off|no)$/i.test(n.trim()),s=n=>{for(const u of Array.from(n.children)){const p=u.tagName.toLowerCase();if(p==="scb-header-tab"||p==="scb-dropdown")return!0}return!1},i=n=>{s(n)||t(n.getAttribute("tabs"))||r(n.getAttribute("reserve-tabs"))||r(n.getAttribute("layout-pending"))?n.setAttribute("data-pre-has-tabs",""):n.removeAttribute("data-pre-has-tabs");const u=e(n.getAttribute("spacing")),p=e(n.getAttribute("spacing-top"))??u,v=e(n.getAttribute("spacing-bottom"))??u;p?n.style.setProperty("--scb-header-spacing-block-start",p):n.style.removeProperty("--scb-header-spacing-block-start"),v?n.style.setProperty("--scb-header-spacing-block-end",v):n.style.removeProperty("--scb-header-spacing-block-end");const _=(n.getAttribute("logo-width")??"").trim();_?n.style.setProperty("--scb-header-pre-logo-w",_):n.style.removeProperty("--scb-header-pre-logo-w");const w=(n.getAttribute("logo-height")??"").trim();w?n.style.setProperty("--scb-header-pre-logo-img-h",w):n.style.removeProperty("--scb-header-pre-logo-img-h");const c=(n.getAttribute("search-height")??"").trim();c?n.style.setProperty("--scb-header-pre-control-size",c):n.style.removeProperty("--scb-header-pre-control-size")};document.querySelectorAll("scb-header").forEach(i);const d=new MutationObserver(n=>{for(const u of n){if(u.type==="attributes"){const p=u.target;p instanceof HTMLElement&&p.tagName.toLowerCase()==="scb-header"&&i(p);continue}if(u.type==="childList"){const p=[...Array.from(u.addedNodes),...Array.from(u.removedNodes)];for(const v of p){if(!(v instanceof HTMLElement))continue;if(v.tagName.toLowerCase()==="scb-header"){i(v);continue}const _=v.closest?.("scb-header");_&&i(_)}}}});d.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabs","spacing","spacing-top","spacing-bottom","logo-width","logo-height","logo-aspect-ratio","logo-alt","logotype-text","search-height","reserve-tabs","layout-pending"]}),customElements.whenDefined("scb-header").then(()=>{d.disconnect()})};L();var z={fromAttribute:b=>b==null?!0:!/^(false|0|off|no)$/i.test(b),toAttribute:b=>String(!!b)},C={fromAttribute:b=>b==null?!1:!/^(false|0|off|no)$/i.test(b),toAttribute:b=>b?"":null},R={fromAttribute:b=>b==="small"||b==="large"?b:"medium",toAttribute:b=>{const e=String(b??"");return e==="small"||e==="large"?e:null}},o=(A=class extends M{constructor(){super(),this.maxWidth="1440px",this.size="medium",this.logoText="",this.logotypeText="",this.logoAlt="",this.logoHref="/",this.logoSrc="",this.logoWidth="",this.logoHeight="",this.logoAspectRatio="",this.logoInvertDm=!1,this.banner=!1,this.tabs=[],this.activeTab=null,this.reserveTabs=!1,this.layoutPending=!1,this.utilityItems=[],this.searchButtonLabel="Sök",this.menuButtonLabel="Meny",this.deferDrawer=!1,this.showDrawer=!0,this.alwaysShowMenuButton=!1,this.showSearch=!0,this.includeUtilityInMenu=!1,this.drawerOverlay=!0,this.searchText="",this._drawerId="main-drawer",this._menuExpanded=!1,this._searchId="header-search",this._drawerReady=!1,this._mobileSearchOpen=!1,this._initialUpgradeComplete=!1,this._slotNavItems=[],this._slotUtils=[],this._slotMenu=[],this._measureScheduled=!1,this._scheduleMeasure=()=>{this.layoutPending||this._measureScheduled||(this._measureScheduled=!0,requestAnimationFrame(()=>{this._measureScheduled=!1,this._measure()}))},this._onWindowResize=()=>{window.innerWidth>=this.BP_SM&&this._mobileSearchOpen&&this._setMobileSearchOpen(!1),this._scheduleMeasure()},this._onMenuSelect=t=>{const r=t.detail;this.dispatchEvent(new CustomEvent("scb-menu-select",{detail:r,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("scbmenuselect",{detail:r,bubbles:!0,composed:!0}));const s=r?.item,i=typeof r?.href=="string"?r.href:typeof r?.itemHref=="string"?r.itemHref:typeof r?.item_href=="string"?r.item_href:"",a=s?s.getAttribute("item-href")??s.getAttribute("href")??"":"";String(i||a||"").trim()&&this._closeDrawerNow()},this._collapsed=!1,this._unlockAtWidth=0,this._hideLogoText=!1,this._logoTextUnlockAt=0,this._slotWatchers=[],this._harvestPending=!1,this._harvest=(t={})=>{const r=Array.from(this.children),s=[],i=[],a=[];let d=-1,n=!1;const u=c=>({label:c.getAttribute("label")??"",href:c.getAttribute("href")??void 0,icon:c.getAttribute("icon")??void 0}),p=c=>{c.hasAttribute("role")&&c.removeAttribute("role"),c.getAttribute("aria-hidden")!=="true"&&c.setAttribute("aria-hidden","true")};for(const c of r){const x=c.tagName.toLowerCase();if(x==="scb-header-tab"){const f=c.getAttribute("label")??"",g=c.getAttribute("href"),k=g&&g.trim()!==""?g:void 0;(c.hasAttribute("selected")||c.getAttribute("selected")==="true"||c.getAttribute("active")==="true"||c.getAttribute("aria-current")==="page")&&d===-1&&(d=s.length),s.push({kind:"tab",label:f,href:k});continue}if(x==="scb-badge"){const f=c.querySelector("scb-dropdown");if(f){n=!0;const g=f.getAttribute("label")??"";(f.hasAttribute("selected")||f.getAttribute("selected")==="true"||f.getAttribute("active")==="true"||f.getAttribute("aria-current")==="page")&&d===-1&&(d=s.length);const k=`scb-header-tab-${s.length}`;c.getAttribute("slot")!==k&&c.setAttribute("slot",k),f.hasAttribute("slot")&&f.removeAttribute("slot"),f.hasAttribute("as-tab")||f.setAttribute("as-tab",""),s.push({kind:"dropdown",slotName:k,label:g});continue}}if(x==="scb-dropdown"){n=!0;const f=c.getAttribute("label")??"";(c.hasAttribute("selected")||c.getAttribute("selected")==="true"||c.getAttribute("active")==="true"||c.getAttribute("aria-current")==="page")&&d===-1&&(d=s.length);const g=`scb-header-tab-${s.length}`;c.getAttribute("slot")!==g&&c.setAttribute("slot",g),c.hasAttribute("as-tab")||c.setAttribute("as-tab",""),s.push({kind:"dropdown",slotName:g,label:f});continue}if(x==="scb-header-utility"){p(c),i.push({label:c.getAttribute("label")??"",href:c.getAttribute("href")??"#",target:c.getAttribute("target")??void 0});continue}if(x==="scb-header-menu-group"){const f={label:c.getAttribute("label")??"",icon:c.getAttribute("icon")??void 0,children:[]};c.querySelectorAll("scb-header-menu-item").forEach(g=>f.children.push(u(g))),a.push(f);continue}x==="scb-header-menu-item"&&a.push(u(c))}const v=!this._sameNavItems(this._slotNavItems,s),_=!this._sameUtilityItems(this._slotUtils,i),w=!this._sameMenuNodes(this._slotMenu,a);v&&(this._slotNavItems=s),_&&(this._slotUtils=i),w&&(this._slotMenu=a),n&&this._ensureDropdownReady(),!this.hasAttribute("active-tab")&&d>=0&&this.activeTab!==d&&(this.activeTab=d),(t.scheduleMeasure??!0)&&queueMicrotask(()=>{this.updateComplete.then(()=>{this._scheduleMeasure()})})},this._measure=()=>{if(this.layoutPending)return;const t=this._top,r=this._logoGroup;if(!t||!r)return;const s=window.innerWidth,i=t.clientWidth,a=this._overflows(this._util),d=this._tabsOverflows(),n=s<this.BP_MD||a||d;this._collapsed?!n&&i>=this._unlockAtWidth&&this._setCollapsed(!1):n&&(this._unlockAtWidth=i+this._HYST,this._setCollapsed(!0));let u=!1;if(this.showSearch&&s>=this.BP_SM&&s<this.BP_MD&&this._searchWrap){const v=getComputedStyle(this._searchWrap),_=Math.max(this._num(v.minWidth,this._tokenPx("--scb-header-search-min",250)),this._tokenPx("--scb-header-search-min",250)),w=this._num(getComputedStyle(t).gap,this._tokenPx("--spacing-7",24)),c=this.showDrawer&&(this.alwaysShowMenuButton||s<this.BP_MD||this._collapsed)?this._menuBtn?.getBoundingClientRect().width||this._tokenPx("--icon-size-extra-extra-large",48):0;u=r.getBoundingClientRect().width+w+_+w+c+8>i+.5}this._setHideSearch(u);let p=!1;if(this.showDrawer&&(this.alwaysShowMenuButton||s<this.BP_MD||this._collapsed)&&!this._visible(this._util)&&!this._visible(this._searchWrap)){const v=this._num(getComputedStyle(t).gap,this._tokenPx("--spacing-7",24)),_=this._menuBtn?.getBoundingClientRect().width||this._tokenPx("--icon-size-extra-extra-large",48),w=(this._logoGroup?.getBoundingClientRect().width||0)+v+_;this._hideLogoText?p=!(i>=this._logoTextUnlockAt):w>i+.5&&(p=!0,this._logoTextUnlockAt=i+this._HYST)}else p=!1,this._logoTextUnlockAt=0;this._setHideLogoText(p)},this._onGlobalFocusRingKeydown=t=>{t.key==="Tab"&&(this.toggleAttribute("data-keyboard-focus",!0),this._ensureFocusRingReady())},this._onGlobalFocusRingPointerDown=()=>{this.removeAttribute("data-keyboard-focus")},this._onLocalFocusIn=t=>{const r=t.composedPath()[0];r instanceof HTMLElement&&r.matches(":focus-visible")&&this._ensureFocusRingReady()},this._onDrawerOpened=()=>{this._menuExpanded=!0,this._syncMenuBtnAria(),this.dispatchEvent(new CustomEvent("drawer-open",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("draweropen",{bubbles:!0,composed:!0}))},this._onDrawerClosed=()=>{this._menuExpanded=!1,this._syncMenuBtnAria(),this.dispatchEvent(new CustomEvent("drawer-close",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("drawerclose",{bubbles:!0,composed:!0}))},this._onMenuClick=async t=>{this.showDrawer&&(this._setMobileSearchOpen(!1),this.dispatchEvent(new CustomEvent("menu-click",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("menuclick",{bubbles:!0,composed:!0})),!this._drawerReady&&(t.stopPropagation(),await this._ensureDrawerReady(),await this.updateComplete,this._openDrawerNow()))},this._onMobileSearchToggle=()=>{const t=!this._mobileSearchOpen;this._setMobileSearchOpen(t),t&&this.updateComplete.then(()=>{this.renderRoot.querySelector(".mobile-search-panel .header-search-input")?.focus?.()})},this._onTabClick=t=>{const r=t.currentTarget;if(!r)return;const s=r.tagName.toLowerCase()==="a";if(s&&(t.defaultPrevented||t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey))return;const i=r.getAttribute("data-index"),a=i!=null?Number(i):0,d=this._getNavItems()[a];if(d?.kind==="dropdown")return;this.activeTab=a;const n=d?.kind==="tab"?d.href??"":"",u=new CustomEvent("tab-change",{detail:{index:a,href:n},bubbles:!0,composed:!0,cancelable:!0}),p=new CustomEvent("tabchange",{detail:{index:a,href:n},bubbles:!0,composed:!0,cancelable:!0});!(this.dispatchEvent(u)&&this.dispatchEvent(p))&&s&&t.preventDefault()},this._onDropdownTabActivate=t=>{const r=t.detail?.dataIndex,s=typeof r=="number"?r:typeof r=="string"?Number(r):this._readTabIndexFromEvent(t);if(s==null||!Number.isFinite(s))return;const i=this._getNavItems();s<0||s>=i.length||i[s]?.kind==="dropdown"&&(this.activeTab=s,this.dispatchEvent(new CustomEvent("tab-change",{detail:{index:s,href:""},bubbles:!0,composed:!0,cancelable:!0})),this.dispatchEvent(new CustomEvent("tabchange",{detail:{index:s,href:""},bubbles:!0,composed:!0,cancelable:!0})))},this._onTabsKeydown=t=>{const r=t.key;if(r!=="ArrowLeft"&&r!=="ArrowRight"&&r!=="Home"&&r!=="End")return;const s=this._getNavItems();if(!s.length)return;const i=this._readTabIndexFromEvent(t);if(i==null)return;let a=Math.max(0,Math.min(s.length-1,i));r==="ArrowRight"?a=(a+1)%s.length:r==="ArrowLeft"?a=(a-1+s.length)%s.length:r==="Home"?a=0:r==="End"&&(a=s.length-1),t.preventDefault(),this._focusTabAtIndex(a)},this._onNativeSearchInput=t=>{const r=t.currentTarget;this._emitSearchInput(r?.value??"")},this._onNativeSearchSubmit=t=>{t.preventDefault();const r=t.currentTarget?.querySelector(".header-search-input");this._emitSearchChange(r?.value??"")},this._onSearchClear=()=>{this.searchText="",this.dispatchEvent(new CustomEvent("search-text-change",{detail:{value:""},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("searchtextchange",{detail:{value:""},bubbles:!0,composed:!0}))},this._onNativeSearchClear=t=>{t.preventDefault(),this._onSearchClear(),this.updateComplete.then(()=>{const r=t.currentTarget?.closest("form")?.querySelector(".header-search-input");r&&(r.value=""),r?.focus()})};const e=++I;this._drawerId=`scb-header-drawer-${e}`,this._searchId=`scb-header-search-${e}`}requestLayout(){this.layoutPending||(this.setAttribute("data-layout-settling",""),this.updateComplete.then(()=>{this.isConnected&&(this._measure(),this.removeAttribute("data-layout-settling"))}))}get _HYST(){return this._tokenPx("--spacing-11",64)}get BP_SM(){return this._tokenPx("--bp-sm",T.BP_SM_DEFAULT)}get BP_MD(){return this._tokenPx("--bp-md",T.BP_MD_DEFAULT)}_scheduleHarvest(){this._harvestPending||(this._harvestPending=!0,queueMicrotask(()=>{this._harvestPending=!1,this._harvest()}))}get _top(){return this.renderRoot.querySelector(".top-row")}get _util(){return this.renderRoot.querySelector(".utility")}get _logoGroup(){return this.renderRoot.querySelector(".logo-wrap")||this.renderRoot.querySelector(".logo-group")}get _searchWrap(){return this.renderRoot.querySelector(".search")}get _menuBtn(){return this.renderRoot.querySelector(".menu-trigger")}get _tabsNav(){return this.renderRoot.querySelector(".tabs-nav")}_attachSlotObservers(){this._slotMo?.disconnect(),this._slotWatchers.forEach(i=>i.disconnect()),this._slotWatchers=[];const e=["label","href","icon","target","selected","aria-current","active","role"],t=i=>{const a=new MutationObserver(d=>{this._scheduleHarvest()});this._slotWatchers.push(a),a.observe(i,{attributes:!0,attributeFilter:e})},r=()=>{this._slotWatchers.forEach(a=>a.disconnect()),this._slotWatchers=[];const i=Array.from(this.children);for(const a of i){const d=a.tagName.toLowerCase();if((d==="scb-header-tab"||d==="scb-dropdown"||d==="scb-header-utility"||d==="scb-header-menu-item"||d==="scb-header-menu-group"||d==="scb-badge")&&t(a),d==="scb-badge"){const n=a,u=new MutationObserver(v=>{r(),this._scheduleHarvest()});this._slotWatchers.push(u),u.observe(n,{childList:!0});const p=n.querySelector("scb-dropdown");p&&t(p);continue}if(d==="scb-header-menu-group"){const n=a,u=new MutationObserver(p=>{r(),this._scheduleHarvest()});this._slotWatchers.push(u),u.observe(n,{childList:!0,subtree:!0}),n.querySelectorAll("scb-header-menu-item").forEach(p=>t(p))}}},s=new MutationObserver(i=>{let a=!1;for(const d of i)if(d.type==="childList"){a=!0;break}a&&r(),this._scheduleHarvest()});this._slotMo=s,s.observe(this,{childList:!0}),r()}_sameNavItems(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r+=1){const s=e[r],i=t[r];if(!s||!i||s.kind!==i.kind||s.label!==i.label)return!1;if(s.kind==="tab"&&i.kind==="tab"){if((s.href??"")!==(i.href??""))return!1}else if(s.kind==="dropdown"&&i.kind==="dropdown"&&s.slotName!==i.slotName)return!1}return!0}_sameUtilityItems(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r+=1){const s=e[r],i=t[r];if(!s||!i||s.label!==i.label||s.href!==i.href||(s.target??"")!==(i.target??""))return!1}return!0}_sameMenuNodes(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r+=1){const s=e[r],i=t[r];if(!s||!i||s.label!==i.label||(s.href??"")!==(i.href??"")||(s.icon??"")!==(i.icon??"")||!this._sameMenuNodes(s.children??[],i.children??[]))return!1}return!0}_setCollapsed(e){this._collapsed!==e&&(this._collapsed=e,e?this.setAttribute("data-collapsed",""):this.removeAttribute("data-collapsed"))}_setHideSearch(e){e?this.setAttribute("data-hide-search",""):this.removeAttribute("data-hide-search")}_setHideLogoText(e){this._hideLogoText!==e&&(this._hideLogoText=e,e?this.setAttribute("data-hide-logo-text",""):this.removeAttribute("data-hide-logo-text"))}_setMobileSearchOpen(e){this._mobileSearchOpen!==e&&(this._mobileSearchOpen=e,this.toggleAttribute("data-mobile-search-open",e))}_num(e,t){const r=Number.parseFloat(String(e??"").trim());return Number.isFinite(r)?r:t}_tokenPx(e,t){const r=getComputedStyle(this);return this._num(r.getPropertyValue(e),t)}_visible(e){return e?getComputedStyle(e).display!=="none":!1}_overflows(e){return!e||!this._visible(e)?!1:e.scrollWidth>e.clientWidth+1}_tabsOverflows(){const e=this._tabsNav;if(!e||!this._visible(e))return!1;const t=Array.from(e.querySelectorAll(".tab-wrap"));if(t.length===0)return!1;const r=e.getBoundingClientRect();let s=r.left;for(const i of t){const a=i.getBoundingClientRect();a.width<=0||a.right>s&&(s=a.right)}return s-r.left>r.width+1}connectedCallback(){super.connectedCallback(),window.addEventListener("keydown",this._onGlobalFocusRingKeydown,!0),window.addEventListener("pointerdown",this._onGlobalFocusRingPointerDown,!0),this._initialUpgradeComplete||this.setAttribute("data-upgrading",""),this._harvest({scheduleMeasure:!1}),this._attachSlotObservers()}_finishInitialUpgrade(){this._initialUpgradeComplete||(this._initialUpgradeComplete=!0,requestAnimationFrame(()=>{this.isConnected&&(this._measure(),this.removeAttribute("data-upgrading"))}))}firstUpdated(){this._syncLandmarkAttributes(),this.renderRoot.addEventListener("focusin",this._onLocalFocusIn),this.showDrawer&&!this.deferDrawer&&this._ensureDrawerReady(),this.updateComplete.then(()=>{this._harvest({scheduleMeasure:!1}),this._attachSlotObservers(),this._syncDropdownTabs(),this._finishInitialUpgrade()});const e=this._top;e&&(this._ro=new ResizeObserver(()=>this._scheduleMeasure()),this._ro.observe(e)),window.addEventListener("resize",this._onWindowResize,{passive:!0})}updated(e){e.has("searchMax")&&this.style.setProperty("--scb-header-search-max",this.searchMax??"380px"),e.has("searchMin")&&this.style.setProperty("--scb-header-search-min",this.searchMin??"250px"),e.has("searchHeight")&&(this.searchHeight&&this.searchHeight.trim()?this.style.setProperty("--scb-search-height",this.searchHeight.trim()):this.style.removeProperty("--scb-search-height")),(e.has("logoWidth")||e.has("logoHeight")||e.has("logoAspectRatio"))&&this._applyLogoSizing(),(e.has("spacing")||e.has("spacingTop")||e.has("spacingBottom"))&&this._applySpacing(),(e.has("banner")||e.has("bannerLabel"))&&this._syncLandmarkAttributes(),(e.has("utilityItems")||e.has("tabs")||e.has("logoText")||e.has("logotypeText")||e.has("logoSrc")||e.has("logoWidth")||e.has("logoHeight")||e.has("logoAspectRatio")||e.has("activeTab")||e.has("_slotNavItems")||e.has("_slotUtils")||e.has("_slotMenu")||e.has("showDrawer")||e.has("alwaysShowMenuButton")||e.has("showSearch")||e.has("layoutPending")||e.has("searchMax")||e.has("searchMin")||e.has("size"))&&this.updateComplete.then(()=>{this._scheduleMeasure()}),(e.has("showDrawer")||e.has("deferDrawer"))&&this.showDrawer&&!this.deferDrawer&&this._ensureDrawerReady(),e.has("showSearch")&&!this.showSearch&&this._setMobileSearchOpen(!1),e.has("layoutPending")&&!this.layoutPending&&this.requestLayout(),(e.has("activeTab")||e.has("_slotNavItems")||e.has("tabs")||e.has("size"))&&this.updateComplete.then(()=>{this._syncDropdownTabs()})}disconnectedCallback(){this._ro?.disconnect(),this._slotMo?.disconnect(),this._slotWatchers.forEach(e=>e.disconnect()),this._slotWatchers=[],this.renderRoot.removeEventListener("focusin",this._onLocalFocusIn),window.removeEventListener("keydown",this._onGlobalFocusRingKeydown,!0),window.removeEventListener("pointerdown",this._onGlobalFocusRingPointerDown,!0),window.removeEventListener("resize",this._onWindowResize),super.disconnectedCallback()}_mapSpacingToken(e){if(!e)return;const t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}_applySpacing(){const e=this._mapSpacingToken(this.spacing),t=this._mapSpacingToken(this.spacingTop)??e,r=this._mapSpacingToken(this.spacingBottom)??e;t?this.style.setProperty("--scb-header-spacing-block-start",t):this.style.removeProperty("--scb-header-spacing-block-start"),r?this.style.setProperty("--scb-header-spacing-block-end",r):this.style.removeProperty("--scb-header-spacing-block-end")}_syncLandmarkAttributes(){const e=this.renderRoot.querySelector(".header-landmark");if(!e)return;if(!this.banner){e.removeAttribute("role"),e.removeAttribute("aria-label");return}e.setAttribute("role","banner");const t=(this.bannerLabel??"").trim();t?e.setAttribute("aria-label",t):e.removeAttribute("aria-label")}_applyLogoSizing(){const e=(this.logoWidth??"").trim(),t=(this.logoHeight??"").trim(),r=(this.logoAspectRatio??"").trim();e?this.style.setProperty("--scb-header-logo-img-w",e):this.style.removeProperty("--scb-header-logo-img-w"),t?this.style.setProperty("--scb-header-logo-img-h",t):e?this.style.setProperty("--scb-header-logo-img-h","auto"):this.style.removeProperty("--scb-header-logo-img-h"),r?this.style.setProperty("--scb-header-logo-img-aspect-ratio",r):this.style.removeProperty("--scb-header-logo-img-aspect-ratio")}_closeDrawerNow(){const e=this.renderRoot.querySelector(`#${this._drawerId}`);e&&(e.open=!1)}_openDrawerNow(){const e=this.renderRoot.querySelector(`#${this._drawerId}`);e&&(e.open=!0)}_ensureFocusRingReady(){customElements.get("md-focus-ring")||(this._focusRingImportPromise??(this._focusRingImportPromise=$(()=>import("../../vendor/md-focus-ring.js").then(e=>e.t).then(()=>{}),__vite__mapDeps([0,1,2,3,4]),import.meta.url)),this._focusRingImportPromise)}async _ensureDrawerReady(){this._drawerReady||(this._drawerImportPromise??(this._drawerImportPromise=Promise.all([$(()=>import("../scb-drawer/scb-drawer.js"),__vite__mapDeps([5,6,2,4,7,8]),import.meta.url),$(()=>import("../scb-menu/scb-menu.js"),__vite__mapDeps([9,8,6,2,4,7,10,11,12,13,14]),import.meta.url),$(()=>import("../scb-search/scb-search.js"),__vite__mapDeps([15,6,11,2,0,1,3,4,16,17]),import.meta.url)]).then(()=>{})),await this._drawerImportPromise,this._drawerReady=!0)}async _ensureDropdownReady(){customElements.get("scb-dropdown")||(this._dropdownImportPromise??(this._dropdownImportPromise=$(()=>import("../scb-dropdown/scb-dropdown.js").then(()=>{}),__vite__mapDeps([18,6,2,19,8,20,4,0,1,3,16,21,22,23,24,17,12,25,26,7,27]),import.meta.url)),await this._dropdownImportPromise)}_syncMenuBtnAria(){this.renderRoot.querySelectorAll(".menu-trigger").forEach(e=>{e.setAttribute("aria-expanded",String(this._menuExpanded))})}_getNavItems(){return this._slotNavItems.length?this._slotNavItems:(this.tabs??[]).map(e=>({kind:"tab",...e}))}_getDropdownForSlot(e){const t=this.querySelector(`[slot="${e}"]`);return t?t.tagName.toLowerCase()==="scb-dropdown"?t:t.querySelector("scb-dropdown"):null}_syncDropdownTabs(){this._getNavItems().forEach((e,t)=>{if(e.kind!=="dropdown")return;const r=this._getDropdownForSlot(e.slotName);if(!r)return;const s=String(t);r.getAttribute("data-index")!==s&&r.setAttribute("data-index",s),r.hasAttribute("as-tab")||r.setAttribute("as-tab","");const i=this.size,a=r;a?.size!==i&&(a.size=i),t===this.activeTab?r.getAttribute("aria-current")!=="page"&&r.setAttribute("aria-current","page"):r.hasAttribute("aria-current")&&r.removeAttribute("aria-current")})}_readTabIndexFromEvent(e){const t=e.composedPath?e.composedPath():[];for(const r of t){if(!(r instanceof HTMLElement))continue;const s=r.getAttribute("data-index");if(s==null)continue;const i=Number(s);if(Number.isFinite(i))return i}return null}_focusTabAtIndex(e){const t=this._getNavItems()[e];if(t){if(t.kind==="dropdown"){this._getDropdownForSlot(t.slotName)?.focus?.();return}this.renderRoot.querySelector(`.tab-link[data-index="${e}"]`)?.focus?.()}}_renderMenuNodes(e){return!e||e.length===0?m``:m`${e.map(t=>this._renderMenuNode(t))}`}_renderMenuNode(e){const t=Array.isArray(e.children)&&e.children.length>0,r=(e.href??"").trim(),s=(e.icon??"").trim(),i=t?m`
54
54
  <scb-sub-menu label=${e.label}>
55
55
  ${e.children.map(a=>this._renderMenuNode(a))}
56
56
  </scb-sub-menu>
57
- `:_;return r&&s?m`
58
- <scb-menu-item label=${e.label} ?selected=${!1} leading-icon=${r} item-href=${s}>
57
+ `:y;return s&&r?m`
58
+ <scb-menu-item label=${e.label} ?selected=${!1} leading-icon=${s} item-href=${r}>
59
59
  ${i}
60
60
  </scb-menu-item>
61
- `:r?m`
62
- <scb-menu-item label=${e.label} ?selected=${!1} leading-icon=${r}>
61
+ `:s?m`
62
+ <scb-menu-item label=${e.label} ?selected=${!1} leading-icon=${s}>
63
63
  ${i}
64
64
  </scb-menu-item>
65
- `:s?m`
66
- <scb-menu-item label=${e.label} ?selected=${!1} item-href=${s}>
65
+ `:r?m`
66
+ <scb-menu-item label=${e.label} ?selected=${!1} item-href=${r}>
67
67
  ${i}
68
68
  </scb-menu-item>
69
- `:m`<scb-menu-item label=${e.label} ?selected=${!1}>${i}</scb-menu-item>`}_syncFlags(e,t){this.toggleAttribute("data-no-utility",e),this.toggleAttribute("data-no-search",t)}_renderMenuButton(e="",t=!1){const s=e?`menu-trigger ${e}`:"menu-trigger",r=(this.menuButtonLabel??"").trim()||"Meny",i=this._menuExpanded?"true":"false";return t?m`
70
- <scb-icon-button
71
- class=${s}
72
- icon="menu"
73
- .size=${this.size}
74
- aria-label=${r}
69
+ `:m`<scb-menu-item label=${e.label} ?selected=${!1}>${i}</scb-menu-item>`}_syncFlags(e,t){this.toggleAttribute("data-no-utility",e),this.toggleAttribute("data-no-search",t)}_emitSearchInput(e){this.searchText=e,this.dispatchEvent(new CustomEvent("search-input",{detail:{value:this.searchText},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("searchinput",{detail:{value:this.searchText},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("search-text-change",{detail:{value:this.searchText},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("searchtextchange",{detail:{value:this.searchText},bubbles:!0,composed:!0}))}_emitSearchChange(e,t){this.searchText=e,this.dispatchEvent(new CustomEvent("search-change",{detail:{value:this.searchText,active:t},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("searchchange",{detail:{value:this.searchText,active:t},bubbles:!0,composed:!0}))}_renderMenuButton(e="",t=!1){const r=e?`menu-trigger ${e}`:"menu-trigger",s=(this.menuButtonLabel??"").trim()||"Meny",i=this._menuExpanded?"true":"false";return t?m`
70
+ <button
71
+ type="button"
72
+ class=${`${r} header-icon-button`}
73
+ aria-label=${s}
75
74
  aria-controls=${this._drawerId}
76
75
  aria-haspopup="dialog"
77
76
  aria-expanded=${i}
78
77
  title="Öppna meny"
79
78
  @click=${this._onMenuClick}
80
- ></scb-icon-button>
79
+ >
80
+ <span class="header-symbol" aria-hidden="true">menu</span>
81
+ <md-focus-ring aria-hidden="true"></md-focus-ring>
82
+ </button>
81
83
  `:m`
82
- <scb-button
83
- class=${s}
84
- variant="text"
85
- label=${r}
86
- icon="menu"
87
- trailing-icon
88
- .size=${this.size}
84
+ <button
85
+ type="button"
86
+ class=${`${r} header-text-button`}
89
87
  aria-controls=${this._drawerId}
90
88
  aria-haspopup="dialog"
91
89
  aria-expanded=${i}
92
90
  title="Öppna meny"
93
91
  @click=${this._onMenuClick}
94
- ></scb-button>
95
- `}render(){const e=this._getNavItems(),t=this._slotUtils.length?this._slotUtils:this.utilityItems,s=this._slotMenu.length?this._slotMenu:this.menuData??[],r=this.logoText||this.logotypeText,i=this.logoAlt||r||"Gå till startsidan",a=this.querySelector('[slot="drawer-menu"]')!==null;this._syncFlags(t.length===0,!this.showSearch);const d=this.searchHeight&&this.searchHeight.trim()?`--scb-search-height:${this.searchHeight.trim()}`:"",n=e.length>0||this.reserveTabs||this.layoutPending,u=(this.reserveTabs||this.layoutPending)&&(this.layoutPending||e.length===0),b=this.showDrawer&&(!this.deferDrawer||this._drawerReady),v=typeof window<"u"&&window.innerWidth>=this.BP_MD,y=this.showDrawer&&(v?this.alwaysShowMenuButton||this._collapsed:!0),w=y&&!v,h=y&&v,A=(this.searchButtonLabel??"").trim()||"Sök",f=this.showSearch&&!this._mobileSearchOpen;return m`
92
+ >
93
+ <span>${s}</span>
94
+ <span class="header-symbol" aria-hidden="true">menu</span>
95
+ <md-focus-ring aria-hidden="true"></md-focus-ring>
96
+ </button>
97
+ `}_renderSearchForm(e,t,r=!0,s=!1){const i=this.searchPlaceholder??"",a=i.trim()||e,d=(this.searchText??"").length>0;return m`
98
+ <form
99
+ class=${s?"header-search header-search--mobile":"header-search"}
100
+ style=${t}
101
+ role="search"
102
+ @submit=${this._onNativeSearchSubmit}
103
+ >
104
+ <label class="header-search-field">
105
+ <span class="header-search-icon header-symbol" aria-hidden="true">search</span>
106
+ <span class="sr-only">${a}</span>
107
+ <input
108
+ id=${s?y:this._searchId}
109
+ class="header-search-input"
110
+ type="search"
111
+ .value=${this.searchText}
112
+ placeholder=${i||y}
113
+ aria-label=${a}
114
+ @input=${this._onNativeSearchInput}
115
+ />
116
+ <md-focus-ring class="input-ring" aria-hidden="true"></md-focus-ring>
117
+ <button
118
+ type="button"
119
+ class="header-search-clear"
120
+ aria-label="Rensa sökfält"
121
+ ?hidden=${!d}
122
+ @click=${this._onNativeSearchClear}
123
+ >
124
+ <span class="header-symbol" aria-hidden="true">close</span>
125
+ <md-focus-ring aria-hidden="true"></md-focus-ring>
126
+ </button>
127
+ </label>
128
+ ${r?m`
129
+ <button type="submit" class="search-submit">
130
+ ${e}
131
+ <md-focus-ring aria-hidden="true"></md-focus-ring>
132
+ </button>
133
+ `:y}
134
+ </form>
135
+ `}render(){const e=this._getNavItems(),t=this._slotUtils.length?this._slotUtils:this.utilityItems,r=this._slotMenu.length?this._slotMenu:this.menuData??[],s=this.logoText||this.logotypeText,i=this.logoAlt||s||"Gå till startsidan",a=this.querySelector('[slot="drawer-menu"]')!==null;this._syncFlags(t.length===0,!this.showSearch);const d=this.searchHeight&&this.searchHeight.trim()?`--scb-search-height:${this.searchHeight.trim()}`:"",n=e.length>0||this.reserveTabs||this.layoutPending,u=(this.reserveTabs||this.layoutPending)&&(this.layoutPending||e.length===0),p=this.showDrawer&&(!this.deferDrawer||this._drawerReady),v=typeof window<"u"&&window.innerWidth>=this.BP_MD,_=this.showDrawer&&(v?this.alwaysShowMenuButton||this._collapsed:!0),w=_&&!v,c=_&&v,x=(this.searchButtonLabel??"").trim()||"Sök",f=this.showSearch&&!this._mobileSearchOpen;return m`
96
136
  <slot
97
137
  id="data-slot"
98
138
  @slotchange=${()=>{this._harvest(),this._attachSlotObservers()}}
@@ -100,18 +140,11 @@ import"../../vendor/vendor-material.js";import{_ as E,b as P,g as I,h as c,m as
100
140
  ></slot>
101
141
 
102
142
  <div class="header-landmark">
103
- <scb-grid
104
- cols-compact="4"
105
- cols-medium="8"
106
- cols-expanded="12"
107
- max-width=${this.maxWidth}
108
- gap="0"
143
+ <div
144
+ class="header-grid"
145
+ style=${`--scb-header-max-width:${this.maxWidth||"1440px"}`}
109
146
  >
110
- <scb-grid-item
111
- col-span-compact="4"
112
- col-span-medium="8"
113
- col-span-expanded="12"
114
- >
147
+ <div class="header-grid-item">
115
148
  <div class="top-row">
116
149
  <div class="logo-wrap">
117
150
  <a
@@ -120,84 +153,67 @@ import"../../vendor/vendor-material.js";import{_ as E,b as P,g as I,h as c,m as
120
153
  aria-label=${i}
121
154
  >
122
155
  ${this._renderLogo()}
123
- <span class="logo-text">${r}</span>
156
+ <span class="logo-text">${s}</span>
124
157
  </a>
125
- <md-focus-ring></md-focus-ring>
158
+ <md-focus-ring aria-hidden="true"></md-focus-ring>
126
159
  </div>
127
160
 
128
161
  <div class="actions">
129
162
  <nav class="utility" aria-label="Funktionslänkar">
130
163
  ${t.map(g=>m`
131
- <scb-button
132
- variant="text"
133
- .href=${g.href}
134
- .target=${g.target??""}
135
- label=${g.label}
136
- ></scb-button>
164
+ <a
165
+ class="utility-link"
166
+ href=${g.href}
167
+ target=${g.target||y}
168
+ rel=${g.target==="_blank"?"noopener noreferrer":y}
169
+ >
170
+ ${g.label}
171
+ <md-focus-ring aria-hidden="true"></md-focus-ring>
172
+ </a>
137
173
  `)}
138
174
  </nav>
139
175
 
140
176
  ${this.showSearch?m`
141
177
  <div class="search" style=${d}>
142
- <scb-search
143
- id=${this._searchId}
144
- .size=${this.size}
145
- style=${d}
146
- .value=${this.searchText}
147
- .supportingText=${this.searchPlaceholder??""}
148
- @scb-search-input=${this._onSearchInput}
149
- @scb-search-submit=${this._onSearchSubmit}
150
- @scb-search-clear=${this._onSearchClear}
151
- ></scb-search>
152
- <scb-button
153
- variant="filled-tonal"
154
- label=${A}
155
- .size=${this.size}
156
- @click=${this._onSearchClick}
157
- ></scb-button>
178
+ ${this._renderSearchForm(x,d)}
158
179
  </div>
159
- `:_}
180
+ `:y}
160
181
  ${f?m`
161
- <scb-icon-button
162
- class="mobile-search-trigger"
163
- variant="filled-tonal"
164
- icon="search"
165
- .size=${this.size}
182
+ <button
183
+ type="button"
184
+ class="mobile-search-trigger header-icon-button"
185
+ aria-label=${x}
186
+ title=${x}
166
187
  @click=${this._onMobileSearchToggle}
167
- ></scb-icon-button>
168
- `:_}
169
- ${w?this._renderMenuButton("",!0):_}
188
+ >
189
+ <span class="header-symbol" aria-hidden="true">search</span>
190
+ <md-focus-ring aria-hidden="true"></md-focus-ring>
191
+ </button>
192
+ `:y}
193
+ ${w?this._renderMenuButton("",!0):y}
170
194
  </div>
171
195
 
172
196
  ${this.showSearch&&this._mobileSearchOpen?m`
173
197
  <div class="mobile-search-panel" style=${d}>
174
- <scb-search
175
- .size=${this.size}
176
- style=${d}
177
- .value=${this.searchText}
178
- .supportingText=${this.searchPlaceholder??""}
179
- @scb-search-input=${this._onSearchInput}
180
- @scb-search-submit=${this._onSearchSubmit}
181
- @scb-search-clear=${this._onSearchClear}
182
- ></scb-search>
183
- <scb-icon-button
184
- variant="filled-tonal"
185
- icon="close"
186
- .size=${this.size}
198
+ ${this._renderSearchForm(x,d,!1,!0)}
199
+ <button
200
+ type="button"
201
+ class="mobile-search-close header-icon-button"
202
+ aria-label="Stäng sök"
203
+ title="Stäng sök"
187
204
  @click=${this._onMobileSearchToggle}
188
- ></scb-icon-button>
205
+ >
206
+ <span class="header-symbol" aria-hidden="true">close</span>
207
+ <md-focus-ring aria-hidden="true"></md-focus-ring>
208
+ </button>
189
209
  </div>
190
- `:_}
210
+ `:y}
191
211
 
192
212
  </div>
193
- </scb-grid-item>
213
+ </div>
194
214
 
195
- <scb-grid-item
196
- col-span-compact="4"
197
- col-span-medium="8"
198
- col-span-expanded="12"
199
- >
200
- <div class=${n||h?"tabs-row":"tabs-row tabs-row--empty"}>
215
+ <div class="header-grid-item">
216
+ <div class=${n||c?"tabs-row":"tabs-row tabs-row--empty"}>
201
217
  ${n?u?m`
202
218
  <div class="tabs-inset">
203
219
  <div class="tabs-nav tabs-nav--skeleton" aria-hidden="true">
@@ -212,7 +228,7 @@ import"../../vendor/vendor-material.js";import{_ as E,b as P,g as I,h as c,m as
212
228
  @keydown=${this._onTabsKeydown}
213
229
  @scb-dropdown-tab-activate=${this._onDropdownTabActivate}
214
230
  >
215
- ${e.map((g,x)=>g.kind==="dropdown"?m`
231
+ ${e.map((g,k)=>g.kind==="dropdown"?m`
216
232
  <div class="tab-wrap">
217
233
  <slot name=${g.slotName}></slot>
218
234
  </div>
@@ -221,40 +237,40 @@ import"../../vendor/vendor-material.js";import{_ as E,b as P,g as I,h as c,m as
221
237
  <a
222
238
  class="tab-link"
223
239
  href=${g.href}
224
- data-index=${x}
225
- aria-current=${x===this.activeTab?"page":"false"}
240
+ data-index=${k}
241
+ aria-current=${k===this.activeTab?"page":"false"}
226
242
  @click=${this._onTabClick}
227
243
  >
228
244
  ${g.label}
229
245
  </a>
230
- <md-focus-ring></md-focus-ring>
246
+ <md-focus-ring aria-hidden="true"></md-focus-ring>
231
247
  </div>
232
248
  `:m`
233
249
  <div class="tab-wrap">
234
250
  <button
235
251
  type="button"
236
252
  class="tab-link"
237
- data-index=${x}
238
- aria-current=${x===this.activeTab?"page":"false"}
253
+ data-index=${k}
254
+ aria-current=${k===this.activeTab?"page":"false"}
239
255
  @click=${this._onTabClick}
240
256
  >
241
257
  ${g.label}
242
258
  </button>
243
- <md-focus-ring></md-focus-ring>
259
+ <md-focus-ring aria-hidden="true"></md-focus-ring>
244
260
  </div>
245
261
  `)}
246
262
  </nav>
247
263
  </div>
248
- `:_:_}
264
+ `:y:y}
249
265
 
250
- ${h?this._renderMenuButton("menu-trigger--tabs-right"):_}
266
+ ${c?this._renderMenuButton("menu-trigger--tabs-right"):y}
251
267
  </div>
252
- </scb-grid-item>
253
- </scb-grid>
268
+ </div>
269
+ </div>
254
270
  <div class="divider" role="presentation"></div>
255
271
  </div>
256
272
 
257
- ${b?m`
273
+ ${p?m`
258
274
  <scb-drawer
259
275
  id=${this._drawerId}
260
276
  floating
@@ -269,7 +285,7 @@ import"../../vendor/vendor-material.js";import{_ as E,b as P,g as I,h as c,m as
269
285
  >
270
286
  <slot name="drawer-menu"></slot>
271
287
 
272
- ${a?_:m`
288
+ ${a?y:m`
273
289
  <scb-menu
274
290
  .label=${this.menuLabel??""}
275
291
  .subLabel=${this.menuSubLabel??""}
@@ -283,9 +299,9 @@ import"../../vendor/vendor-material.js";import{_ as E,b as P,g as I,h as c,m as
283
299
  <scb-menu-section
284
300
  .label=${this.menuSectionLabel}
285
301
  ></scb-menu-section>
286
- `:_}
302
+ `:y}
287
303
 
288
- ${this._renderMenuNodes(s)}
304
+ ${this._renderMenuNodes(r)}
289
305
 
290
306
  ${this.includeUtilityInMenu&&(t?.length??0)>0?m`
291
307
  <scb-menu-section label=''></scb-menu-section>
@@ -295,12 +311,12 @@ import"../../vendor/vendor-material.js";import{_ as E,b as P,g as I,h as c,m as
295
311
  item-href=${g.href}
296
312
  ></scb-menu-item>
297
313
  `)}
298
- `:_}
314
+ `:y}
299
315
  </scb-menu>
300
316
  `}
301
317
  </scb-drawer>
302
- `:_}
303
- `}_renderTabSkeletons(){const e=["96px","72px","88px","64px"],t=(this.reserveTabsWidths??"").split(/[\s,]+/).map(a=>a.trim()).filter(Boolean).map(a=>/^\d+(?:\.\d+)?$/.test(a)?`${a}px`:a),s=t.length>0?t:e,r=Number(this.reserveTabsCount),i=Number.isFinite(r)&&r>0?Math.floor(r):t.length>0?t.length:e.length;return m`${Array.from({length:i},(a,d)=>s[d%s.length]).map(a=>m`<scb-skeleton variant="rounded" width=${a} height="16px"></scb-skeleton>`)}`}_renderLogo(){const e=(this.logoSrc??"").trim();return e?m`<img class="logo" src=${e} alt="" aria-hidden="true" />`:m`
318
+ `:y}
319
+ `}_renderTabSkeletons(){const e=["96px","72px","88px","64px"],t=(this.reserveTabsWidths??"").split(/[\s,]+/).map(a=>a.trim()).filter(Boolean).map(a=>/^\d+(?:\.\d+)?$/.test(a)?`${a}px`:a),r=t.length>0?t:e,s=Number(this.reserveTabsCount),i=Number.isFinite(s)&&s>0?Math.floor(s):t.length>0?t.length:e.length;return m`${Array.from({length:i},(a,d)=>r[d%r.length]).map(a=>m`<span class="tab-skeleton" style=${`inline-size:${a}`}></span>`)}`}_renderLogo(){const e=(this.logoSrc??"").trim();return e?m`<img class="logo" src=${e} alt="" aria-hidden="true" />`:m`
304
320
  <svg
305
321
  class="logo"
306
322
  viewBox="0 0 48 54"
@@ -334,7 +350,7 @@ import"../../vendor/vendor-material.js";import{_ as E,b as P,g as I,h as c,m as
334
350
  </clipPath>
335
351
  </defs>
336
352
  </svg>
337
- `}},C=k,k._JSON_ARRAY={fromAttribute:p=>{if(p==null||p==="")return[];try{const e=JSON.parse(p);return Array.isArray(e)?e:[]}catch{return[]}},toAttribute:p=>p==null?null:JSON.stringify(p)},k.BP_SM_DEFAULT=600,k.BP_MD_DEFAULT=840,k.styles=P`
353
+ `}},T=A,A._JSON_ARRAY={fromAttribute:b=>{if(b==null||b==="")return[];try{const e=JSON.parse(b);return Array.isArray(e)?e:[]}catch{return[]}},toAttribute:b=>b==null?null:JSON.stringify(b)},A.BP_SM_DEFAULT=600,A.BP_MD_DEFAULT=840,A.styles=E`
338
354
  :host {
339
355
  display: block;
340
356
  margin-block-start: var(--scb-header-spacing-block-start, 0);
@@ -343,6 +359,12 @@ import"../../vendor/vendor-material.js";import{_ as E,b as P,g as I,h as c,m as
343
359
  color: var(--md-sys-color-on-surface, #1b1b1f);
344
360
  --scb-header-search-max: 380px;
345
361
  --scb-header-search-min: 250px;
362
+ --scb-header-search-padding-x: var(--spacing-4, 12px);
363
+ --scb-header-search-padding-y: var(--spacing-4, 12px);
364
+ --scb-header-search-leading-size: var(--scale-10, 40px);
365
+ --scb-header-search-icon-size: var(--icon-size-medium, 24px);
366
+ --scb-header-search-font-size: var(--md-sys-typescale-body-medium-size, 16px);
367
+ --scb-header-search-line-height: var(--md-sys-typescale-body-medium-line-height, 24px);
346
368
 
347
369
  --scb-header-logo-w: var(--icon-size-extra-extra-large, 48px);
348
370
  --scb-header-logo-h: calc(var(--scb-header-logo-w) * 1.125);
@@ -407,6 +429,13 @@ import"../../vendor/vendor-material.js";import{_ as E,b as P,g as I,h as c,m as
407
429
  --md-sys-typescale-label-small-line-height,
408
430
  1.25rem
409
431
  );
432
+
433
+ --scb-header-search-padding-x: var(--spacing-3, 8px);
434
+ --scb-header-search-padding-y: var(--spacing-3, 8px);
435
+ --scb-header-search-leading-size: var(--scale-09, 36px);
436
+ --scb-header-search-icon-size: var(--icon-size-small, 20px);
437
+ --scb-header-search-font-size: var(--md-sys-typescale-body-small-size, 14px);
438
+ --scb-header-search-line-height: var(--md-sys-typescale-body-small-line-height, 20px);
410
439
  }
411
440
 
412
441
  :host([size='large']) {
@@ -436,18 +465,33 @@ import"../../vendor/vendor-material.js";import{_ as E,b as P,g as I,h as c,m as
436
465
  --md-sys-typescale-title-medium-line-height,
437
466
  1.625rem
438
467
  );
468
+
469
+ --scb-header-search-padding-x: var(--spacing-5, 16px);
470
+ --scb-header-search-padding-y: var(--spacing-5, 16px);
471
+ --scb-header-search-leading-size: var(--scale-11, 48px);
472
+ --scb-header-search-icon-size: var(--icon-size-medium, 24px);
473
+ --scb-header-search-font-size: var(--md-sys-typescale-body-large-size, 18px);
474
+ --scb-header-search-line-height: var(--md-sys-typescale-body-large-line-height, 26px);
439
475
  }
440
476
 
441
- .header-landmark > scb-grid {
477
+ .header-grid {
478
+ box-sizing: border-box;
479
+ inline-size: 100%;
480
+ max-inline-size: var(--scb-header-max-width, 1440px);
481
+ margin-inline: auto;
442
482
  padding-inline: 20px;
443
483
  }
444
484
 
445
485
  @media (min-width: 840px) {
446
- .header-landmark > scb-grid {
486
+ .header-grid {
447
487
  padding-inline: 32px;
448
488
  }
449
489
  }
450
490
 
491
+ .header-grid-item {
492
+ min-inline-size: 0;
493
+ }
494
+
451
495
  .top-row {
452
496
  display: flex;
453
497
  align-items: center;
@@ -466,6 +510,7 @@ import"../../vendor/vendor-material.js";import{_ as E,b as P,g as I,h as c,m as
466
510
  );
467
511
  margin-top: var(--spacing-2, 4px);
468
512
  }
513
+
469
514
  .logo-wrap md-focus-ring {
470
515
  position: absolute;
471
516
  inset: var(--spacing-neg-2, -4px);
@@ -473,6 +518,7 @@ import"../../vendor/vendor-material.js";import{_ as E,b as P,g as I,h as c,m as
473
518
  display: none;
474
519
  border-radius: inherit;
475
520
  }
521
+
476
522
  .logo-group:focus-visible + md-focus-ring {
477
523
  display: block;
478
524
  }
@@ -490,6 +536,7 @@ import"../../vendor/vendor-material.js";import{_ as E,b as P,g as I,h as c,m as
490
536
  .logo-group:focus-visible {
491
537
  outline: none;
492
538
  }
539
+
493
540
  .logo-group svg {
494
541
  width: var(--scb-header-logo-slot-w);
495
542
  height: var(--scb-header-logo-slot-h);
@@ -601,16 +648,123 @@ import"../../vendor/vendor-material.js";import{_ as E,b as P,g as I,h as c,m as
601
648
  max-width: var(--scb-header-search-max);
602
649
  min-width: var(--scb-header-search-min);
603
650
  }
604
- scb-search {
605
- width: 100%;
651
+
652
+ .header-search {
653
+ display: flex;
654
+ align-items: stretch;
655
+ flex: 1 1 auto;
656
+ min-width: 0;
657
+ gap: var(--spacing-3, 8px);
606
658
  }
607
- .search scb-search {
659
+
660
+ .header-search-field {
661
+ position: relative;
608
662
  flex: 1 1 auto;
609
- width: auto;
663
+ min-width: 0;
664
+ }
665
+
666
+ .header-search-input {
667
+ box-sizing: border-box;
668
+ inline-size: 100%;
669
+ min-block-size: var(
670
+ --scb-search-height,
671
+ calc(
672
+ var(--scb-header-search-line-height) +
673
+ var(--scb-header-search-padding-y) +
674
+ var(--scb-header-search-padding-y)
675
+ )
676
+ );
677
+ padding-block: var(--scb-header-search-padding-y);
678
+ padding-inline-start: calc(
679
+ var(--scb-header-search-padding-x) +
680
+ var(--scb-header-search-leading-size) +
681
+ var(--spacing-2, 4px)
682
+ );
683
+ padding-inline-end: calc(
684
+ var(--scb-header-search-padding-x) +
685
+ var(--scb-header-search-leading-size) +
686
+ var(--spacing-2, 4px)
687
+ );
688
+ border: var(--stroke-border, 1px) solid var(--md-sys-color-outline, #808080);
689
+ border-radius: var(--radius-full, 1000px);
690
+ background: transparent;
691
+ color: var(--md-sys-color-on-surface, #1b1b1f);
692
+ font-family: var(--md-sys-typescale-body-large-font, var(--brand-font, Inter), sans-serif);
693
+ font-size: var(--scb-header-search-font-size);
694
+ line-height: var(--scb-header-search-line-height);
695
+ letter-spacing: 0;
696
+ -webkit-appearance: none;
697
+ appearance: none;
698
+ }
699
+
700
+ .header-search-input::placeholder {
701
+ color: var(--md-sys-color-on-surface-variant, #1b1b1f);
702
+ opacity: 1;
703
+ }
704
+
705
+ .header-search-input:hover {
706
+ outline: var(--stroke-border, 1px) solid var(--md-sys-color-outline, #808080);
707
+ outline-offset: 0;
708
+ }
709
+
710
+ .header-search-input:focus {
711
+ outline: none;
712
+ }
713
+
714
+ .header-search-input::-webkit-search-cancel-button {
715
+ -webkit-appearance: none;
716
+ appearance: none;
717
+ display: none;
718
+ }
719
+
720
+ .header-search-icon,
721
+ .header-search-clear {
722
+ position: absolute;
723
+ inset-block-start: 50%;
724
+ transform: translateY(-50%);
725
+ display: inline-flex;
726
+ align-items: center;
727
+ justify-content: center;
728
+ inline-size: var(--scb-header-search-leading-size);
729
+ block-size: var(--scb-header-search-leading-size);
730
+ color: var(--md-sys-color-on-surface-variant, #1b1b1f);
731
+ }
732
+
733
+ .header-search-icon {
734
+ inset-inline-start: var(--scb-header-search-padding-x);
735
+ pointer-events: none;
736
+ }
737
+
738
+ .header-search-clear {
739
+ inset-inline-end: var(--scb-header-search-padding-x);
740
+ border: 0;
741
+ border-radius: var(--radius-full, 1000px);
742
+ padding: 0;
743
+ background: transparent;
744
+ cursor: pointer;
610
745
  }
611
- .search scb-button {
746
+
747
+ .header-search-clear[hidden] {
748
+ display: none;
749
+ }
750
+
751
+ .header-search-field md-focus-ring.input-ring {
752
+ position: absolute;
753
+ inset: 0;
754
+ pointer-events: none;
755
+ display: none;
756
+ border-radius: var(--radius-full, 1000px);
757
+ z-index: 4;
758
+ }
759
+
760
+ :host([data-keyboard-focus]) .header-search-input:focus ~ md-focus-ring.input-ring {
761
+ display: block;
762
+ }
763
+
764
+ .search-submit {
612
765
  flex: 0 0 auto;
613
766
  }
767
+
614
768
  @media (min-width: 600px) {
615
769
  .search {
616
770
  display: flex;
@@ -620,7 +774,6 @@ import"../../vendor/vendor-material.js";import{_ as E,b as P,g as I,h as c,m as
620
774
  .mobile-search-trigger {
621
775
  display: inline-flex;
622
776
  color: var(--md-sys-color-on-surface, #1b1b1f);
623
- --md-sys-color-primary: var(--md-sys-color-on-surface, #1b1b1f);
624
777
  }
625
778
 
626
779
  @media (min-width: 600px) {
@@ -640,7 +793,7 @@ import"../../vendor/vendor-material.js";import{_ as E,b as P,g as I,h as c,m as
640
793
  background: var(--scb-header-background, transparent);
641
794
  }
642
795
 
643
- .mobile-search-panel scb-search {
796
+ .mobile-search-panel .header-search {
644
797
  flex: 1 1 auto;
645
798
  min-width: 0;
646
799
  }
@@ -717,8 +870,17 @@ import"../../vendor/vendor-material.js";import{_ as E,b as P,g as I,h as c,m as
717
870
  align-items: center;
718
871
  }
719
872
 
720
- .tabs-nav--skeleton scb-skeleton {
873
+ .tab-skeleton {
721
874
  flex: 0 0 auto;
875
+ display: inline-block;
876
+ block-size: 16px;
877
+ border-radius: var(--radius-full, 1000px);
878
+ background: linear-gradient(
879
+ 90deg,
880
+ var(--md-sys-color-surface-container-low, #f5f5f5),
881
+ var(--md-sys-color-surface-container, #ebf8ff),
882
+ var(--md-sys-color-surface-container-low, #f5f5f5)
883
+ );
722
884
  }
723
885
 
724
886
  .tab-wrap {
@@ -728,15 +890,14 @@ import"../../vendor/vendor-material.js";import{_ as E,b as P,g as I,h as c,m as
728
890
 
729
891
  }
730
892
 
731
- .tab-wrap md-focus-ring {
893
+ .tab-wrap md-focus-ring {
732
894
  position: absolute;
733
895
  inset-block: var(--spacing-1, 2px);
734
896
  inset-inline: var(--spacing-neg-2, -4px);
735
897
  pointer-events: none;
736
898
  display: none;
737
899
  border-radius: 5px;
738
- }
739
-
900
+ }
740
901
 
741
902
  .tab-link {
742
903
  position: relative;
@@ -788,10 +949,199 @@ import"../../vendor/vendor-material.js";import{_ as E,b as P,g as I,h as c,m as
788
949
  background-color: var(--md-sys-color-primary);
789
950
  }
790
951
 
952
+ .tab-link:focus-visible {
953
+ outline: none;
954
+ }
955
+
791
956
  .tab-link:focus-visible + md-focus-ring {
792
957
  display: block;
793
958
  }
794
959
 
960
+ .utility-link,
961
+ .header-text-button,
962
+ .header-icon-button,
963
+ .search-submit {
964
+ border: 0;
965
+ font: inherit;
966
+ letter-spacing: 0;
967
+ -webkit-tap-highlight-color: transparent;
968
+ position: relative;
969
+ }
970
+
971
+ .utility-link,
972
+ .header-text-button,
973
+ .search-submit {
974
+ box-sizing: border-box;
975
+ display: inline-flex;
976
+ align-items: center;
977
+ justify-content: center;
978
+ min-block-size: calc(
979
+ var(--md-sys-typescale-label-small-line-height, 20px) +
980
+ ((var(--spacing-4, 12px) - var(--spacing-1, 2px)) * 2)
981
+ );
982
+ padding-block: calc(var(--spacing-4, 12px) - var(--spacing-1, 2px));
983
+ padding-inline: var(--spacing-5, 16px);
984
+ border-radius: var(--radius-full, 1000px);
985
+ color: var(--md-sys-color-primary, var(--p-40, #1f44ff));
986
+ font-family: var(--md-sys-typescale-label-small-font, var(--brand-font, Inter), sans-serif);
987
+ font-size: var(--md-sys-typescale-label-small-size, 14px);
988
+ line-height: var(--md-sys-typescale-label-small-line-height, 20px);
989
+ font-weight: var(--md-sys-typescale-label-small-weight, 600);
990
+ text-decoration: none;
991
+ background: transparent;
992
+ cursor: pointer;
993
+ white-space: nowrap;
994
+ }
995
+
996
+ .utility-link:hover,
997
+ .header-text-button:hover {
998
+ background: color-mix(in srgb, var(--md-sys-color-primary, #1f44ff) 8%, transparent);
999
+ }
1000
+
1001
+ .search-submit {
1002
+ min-block-size: var(--scb-search-height, var(--scale-11, 48px));
1003
+ min-inline-size: var(--scale-12, 64px);
1004
+ color: var(--md-sys-color-on-secondary-container, var(--p-30, #1e00be));
1005
+ background: var(--md-sys-color-secondary-container, var(--p-90, #d6f1ff));
1006
+ }
1007
+
1008
+ .search-submit:hover {
1009
+ background: color-mix(
1010
+ in srgb,
1011
+ var(--md-sys-color-secondary-container, #d6f1ff) 92%,
1012
+ var(--md-sys-color-on-secondary-container, #1e00be)
1013
+ );
1014
+ }
1015
+
1016
+ .header-icon-button {
1017
+ position: relative;
1018
+ display: inline-flex;
1019
+ align-items: center;
1020
+ justify-content: center;
1021
+ inline-size: calc(var(--icon-size-medium, 24px) + (var(--spacing-3, 12px) * 2));
1022
+ block-size: calc(var(--icon-size-medium, 24px) + (var(--spacing-3, 12px) * 2));
1023
+ padding: 0;
1024
+ border-radius: var(--radius-full, 1000px);
1025
+ color: var(--md-sys-color-on-surface, #1b1b1f);
1026
+ background: transparent;
1027
+ cursor: pointer;
1028
+ }
1029
+
1030
+ .mobile-search-trigger,
1031
+ .mobile-search-close {
1032
+ color: var(--md-sys-color-on-secondary-container, var(--p-30, #1e00be));
1033
+ background: var(--md-sys-color-secondary-container, var(--p-90, #d6f1ff));
1034
+ }
1035
+
1036
+ @media (min-width: 600px) {
1037
+ .mobile-search-trigger.header-icon-button {
1038
+ display: none;
1039
+ }
1040
+ }
1041
+
1042
+ .header-icon-button:hover,
1043
+ .header-search-clear:hover {
1044
+ background: color-mix(in srgb, currentColor 8%, transparent);
1045
+ }
1046
+
1047
+ .mobile-search-trigger:hover,
1048
+ .mobile-search-close:hover {
1049
+ background: color-mix(
1050
+ in srgb,
1051
+ var(--md-sys-color-secondary-container, #d6f1ff) 92%,
1052
+ var(--md-sys-color-on-secondary-container, #1e00be)
1053
+ );
1054
+ }
1055
+
1056
+ .utility-link:focus,
1057
+ .utility-link:focus-visible,
1058
+ .header-text-button:focus,
1059
+ .header-text-button:focus-visible,
1060
+ .header-icon-button:focus,
1061
+ .header-icon-button:focus-visible,
1062
+ .search-submit:focus,
1063
+ .search-submit:focus-visible,
1064
+ .header-search-clear:focus,
1065
+ .header-search-clear:focus-visible {
1066
+ outline: none;
1067
+ }
1068
+
1069
+ .utility-link:focus-visible,
1070
+ .header-text-button:focus-visible,
1071
+ .header-icon-button:focus-visible,
1072
+ .search-submit:focus-visible,
1073
+ .header-search-clear:focus-visible {
1074
+ outline: none;
1075
+ }
1076
+
1077
+ .utility-link md-focus-ring,
1078
+ .header-text-button md-focus-ring,
1079
+ .header-icon-button md-focus-ring,
1080
+ .search-submit md-focus-ring,
1081
+ .header-search-clear md-focus-ring {
1082
+ position: absolute;
1083
+ inset: var(--spacing-neg-2, -4px);
1084
+ pointer-events: none;
1085
+ display: none;
1086
+ border-radius: inherit;
1087
+ }
1088
+
1089
+ .utility-link:focus-visible md-focus-ring,
1090
+ .header-text-button:focus-visible md-focus-ring,
1091
+ .header-icon-button:focus-visible md-focus-ring,
1092
+ .search-submit:focus-visible md-focus-ring,
1093
+ .header-search-clear:focus-visible md-focus-ring {
1094
+ display: block;
1095
+ }
1096
+
1097
+ .header-text-button {
1098
+ gap: var(--spacing-3, 8px);
1099
+ }
1100
+
1101
+ .header-text-button .header-symbol {
1102
+ inline-size: var(--icon-size-small, 20px);
1103
+ font-size: var(--icon-size-small, 20px);
1104
+ line-height: var(--icon-size-small, 20px);
1105
+ }
1106
+
1107
+ .header-symbol {
1108
+ display: inline-block;
1109
+ inline-size: 1em;
1110
+ overflow: hidden;
1111
+ font-family: 'Material Symbols Outlined';
1112
+ font-size: var(--icon-size-medium, 24px);
1113
+ line-height: 1;
1114
+ text-align: center;
1115
+ white-space: nowrap;
1116
+ text-transform: none;
1117
+ word-wrap: normal;
1118
+ direction: ltr;
1119
+ font-feature-settings: 'liga' 1;
1120
+ font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
1121
+ -webkit-font-smoothing: antialiased;
1122
+ -moz-osx-font-smoothing: grayscale;
1123
+ }
1124
+
1125
+ .header-search-icon.header-symbol {
1126
+ display: inline-flex;
1127
+ align-items: center;
1128
+ justify-content: center;
1129
+ inline-size: var(--scb-header-search-leading-size);
1130
+ font-size: var(--scb-header-search-icon-size);
1131
+ }
1132
+
1133
+ .sr-only {
1134
+ position: absolute;
1135
+ inline-size: 1px;
1136
+ block-size: 1px;
1137
+ padding: 0;
1138
+ margin: -1px;
1139
+ overflow: hidden;
1140
+ clip: rect(0, 0, 0, 0);
1141
+ white-space: nowrap;
1142
+ border: 0;
1143
+ }
1144
+
795
1145
  .divider {
796
1146
  border-bottom: var(--stroke-border, 1px) solid
797
1147
  var(--md-sys-color-outline-variant, #e0e0e0);
@@ -802,4 +1152,4 @@ import"../../vendor/vendor-material.js";import{_ as E,b as P,g as I,h as c,m as
802
1152
  :host([data-hide-logo-text]) .logo-text {
803
1153
  display: none;
804
1154
  }
805
- `,k);l([c({type:String,attribute:"max-width"})],o.prototype,"maxWidth",void 0);l([c({type:String,reflect:!0})],o.prototype,"spacing",void 0);l([c({type:String,attribute:"spacing-top",reflect:!0})],o.prototype,"spacingTop",void 0);l([c({type:String,attribute:"spacing-bottom",reflect:!0})],o.prototype,"spacingBottom",void 0);l([c({type:String,reflect:!0,converter:N})],o.prototype,"size",void 0);l([c({type:String,attribute:"logo-text"})],o.prototype,"logoText",void 0);l([c({type:String,attribute:"logotype-text"})],o.prototype,"logotypeText",void 0);l([c({type:String,attribute:"logo-alt"})],o.prototype,"logoAlt",void 0);l([c({type:String,attribute:"logo-href"})],o.prototype,"logoHref",void 0);l([c({type:String,attribute:"logo-src"})],o.prototype,"logoSrc",void 0);l([c({type:String,attribute:"logo-width"})],o.prototype,"logoWidth",void 0);l([c({type:String,attribute:"logo-height"})],o.prototype,"logoHeight",void 0);l([c({type:String,attribute:"logo-aspect-ratio"})],o.prototype,"logoAspectRatio",void 0);l([c({type:Boolean,attribute:"logo-invert-dm",reflect:!0,converter:$})],o.prototype,"logoInvertDm",void 0);l([c({type:Boolean,reflect:!0})],o.prototype,"banner",void 0);l([c({type:String,attribute:"banner-label"})],o.prototype,"bannerLabel",void 0);l([c({type:Array,attribute:"tabs",converter:o._JSON_ARRAY})],o.prototype,"tabs",void 0);l([c({type:Number,attribute:"active-tab"})],o.prototype,"activeTab",void 0);l([c({type:Boolean,attribute:"reserve-tabs",reflect:!0,converter:$})],o.prototype,"reserveTabs",void 0);l([c({type:Number,attribute:"reserve-tabs-count"})],o.prototype,"reserveTabsCount",void 0);l([c({type:String,attribute:"reserve-tabs-widths"})],o.prototype,"reserveTabsWidths",void 0);l([c({type:Boolean,attribute:"layout-pending",reflect:!0,converter:$})],o.prototype,"layoutPending",void 0);l([c({type:Array,attribute:"utility-items",converter:o._JSON_ARRAY})],o.prototype,"utilityItems",void 0);l([c({type:String,attribute:"search-placeholder"})],o.prototype,"searchPlaceholder",void 0);l([c({type:String,attribute:"search-button-label"})],o.prototype,"searchButtonLabel",void 0);l([c({type:String,attribute:"menu-label"})],o.prototype,"menuLabel",void 0);l([c({type:String,attribute:"menu-button-label"})],o.prototype,"menuButtonLabel",void 0);l([c({type:String,attribute:"menu-sub-label"})],o.prototype,"menuSubLabel",void 0);l([c({type:String,attribute:"menu-section-label"})],o.prototype,"menuSectionLabel",void 0);l([c({type:String,attribute:"menu-search-placeholder"})],o.prototype,"menuSearchPlaceholder",void 0);l([c({type:Array,attribute:"menu-data",converter:o._JSON_ARRAY})],o.prototype,"menuData",void 0);l([c({type:Boolean,attribute:"defer-drawer",reflect:!0,converter:$})],o.prototype,"deferDrawer",void 0);l([c({type:Boolean,attribute:"show-drawer",reflect:!0,converter:M})],o.prototype,"showDrawer",void 0);l([c({type:Boolean,attribute:"always-show-menu-button",reflect:!0,converter:$})],o.prototype,"alwaysShowMenuButton",void 0);l([c({type:Boolean,attribute:"show-search",reflect:!0,converter:M})],o.prototype,"showSearch",void 0);l([c({type:Boolean,attribute:"include-utility-in-menu",reflect:!0,converter:$})],o.prototype,"includeUtilityInMenu",void 0);l([c({type:Boolean,attribute:"drawer-overlay",reflect:!0,converter:M})],o.prototype,"drawerOverlay",void 0);l([c({type:String,attribute:"search-max"})],o.prototype,"searchMax",void 0);l([c({type:String,attribute:"search-min"})],o.prototype,"searchMin",void 0);l([c({type:String,attribute:"search-height"})],o.prototype,"searchHeight",void 0);l([c({type:String,attribute:"search-text",reflect:!0})],o.prototype,"searchText",void 0);l([S()],o.prototype,"_drawerId",void 0);l([S()],o.prototype,"_menuExpanded",void 0);l([S()],o.prototype,"_searchId",void 0);l([S()],o.prototype,"_drawerReady",void 0);l([S()],o.prototype,"_mobileSearchOpen",void 0);l([S()],o.prototype,"_slotNavItems",void 0);l([S()],o.prototype,"_slotUtils",void 0);l([S()],o.prototype,"_slotMenu",void 0);l([S()],o.prototype,"_collapsed",void 0);l([S()],o.prototype,"_hideLogoText",void 0);o=C=l([I("scb-header")],o);
1155
+ `,A);l([h({type:String,attribute:"max-width"})],o.prototype,"maxWidth",void 0);l([h({type:String,reflect:!0})],o.prototype,"spacing",void 0);l([h({type:String,attribute:"spacing-top",reflect:!0})],o.prototype,"spacingTop",void 0);l([h({type:String,attribute:"spacing-bottom",reflect:!0})],o.prototype,"spacingBottom",void 0);l([h({type:String,reflect:!0,converter:R})],o.prototype,"size",void 0);l([h({type:String,attribute:"logo-text"})],o.prototype,"logoText",void 0);l([h({type:String,attribute:"logotype-text"})],o.prototype,"logotypeText",void 0);l([h({type:String,attribute:"logo-alt"})],o.prototype,"logoAlt",void 0);l([h({type:String,attribute:"logo-href"})],o.prototype,"logoHref",void 0);l([h({type:String,attribute:"logo-src"})],o.prototype,"logoSrc",void 0);l([h({type:String,attribute:"logo-width"})],o.prototype,"logoWidth",void 0);l([h({type:String,attribute:"logo-height"})],o.prototype,"logoHeight",void 0);l([h({type:String,attribute:"logo-aspect-ratio"})],o.prototype,"logoAspectRatio",void 0);l([h({type:Boolean,attribute:"logo-invert-dm",reflect:!0,converter:C})],o.prototype,"logoInvertDm",void 0);l([h({type:Boolean,reflect:!0})],o.prototype,"banner",void 0);l([h({type:String,attribute:"banner-label"})],o.prototype,"bannerLabel",void 0);l([h({type:Array,attribute:"tabs",converter:o._JSON_ARRAY})],o.prototype,"tabs",void 0);l([h({type:Number,attribute:"active-tab"})],o.prototype,"activeTab",void 0);l([h({type:Boolean,attribute:"reserve-tabs",reflect:!0,converter:C})],o.prototype,"reserveTabs",void 0);l([h({type:Number,attribute:"reserve-tabs-count"})],o.prototype,"reserveTabsCount",void 0);l([h({type:String,attribute:"reserve-tabs-widths"})],o.prototype,"reserveTabsWidths",void 0);l([h({type:Boolean,attribute:"layout-pending",reflect:!0,converter:C})],o.prototype,"layoutPending",void 0);l([h({type:Array,attribute:"utility-items",converter:o._JSON_ARRAY})],o.prototype,"utilityItems",void 0);l([h({type:String,attribute:"search-placeholder"})],o.prototype,"searchPlaceholder",void 0);l([h({type:String,attribute:"search-button-label"})],o.prototype,"searchButtonLabel",void 0);l([h({type:String,attribute:"menu-label"})],o.prototype,"menuLabel",void 0);l([h({type:String,attribute:"menu-button-label"})],o.prototype,"menuButtonLabel",void 0);l([h({type:String,attribute:"menu-sub-label"})],o.prototype,"menuSubLabel",void 0);l([h({type:String,attribute:"menu-section-label"})],o.prototype,"menuSectionLabel",void 0);l([h({type:String,attribute:"menu-search-placeholder"})],o.prototype,"menuSearchPlaceholder",void 0);l([h({type:Array,attribute:"menu-data",converter:o._JSON_ARRAY})],o.prototype,"menuData",void 0);l([h({type:Boolean,attribute:"defer-drawer",reflect:!0,converter:C})],o.prototype,"deferDrawer",void 0);l([h({type:Boolean,attribute:"show-drawer",reflect:!0,converter:z})],o.prototype,"showDrawer",void 0);l([h({type:Boolean,attribute:"always-show-menu-button",reflect:!0,converter:C})],o.prototype,"alwaysShowMenuButton",void 0);l([h({type:Boolean,attribute:"show-search",reflect:!0,converter:z})],o.prototype,"showSearch",void 0);l([h({type:Boolean,attribute:"include-utility-in-menu",reflect:!0,converter:C})],o.prototype,"includeUtilityInMenu",void 0);l([h({type:Boolean,attribute:"drawer-overlay",reflect:!0,converter:z})],o.prototype,"drawerOverlay",void 0);l([h({type:String,attribute:"search-max"})],o.prototype,"searchMax",void 0);l([h({type:String,attribute:"search-min"})],o.prototype,"searchMin",void 0);l([h({type:String,attribute:"search-height"})],o.prototype,"searchHeight",void 0);l([h({type:String,attribute:"search-text",reflect:!0})],o.prototype,"searchText",void 0);l([S()],o.prototype,"_drawerId",void 0);l([S()],o.prototype,"_menuExpanded",void 0);l([S()],o.prototype,"_searchId",void 0);l([S()],o.prototype,"_drawerReady",void 0);l([S()],o.prototype,"_mobileSearchOpen",void 0);l([S()],o.prototype,"_slotNavItems",void 0);l([S()],o.prototype,"_slotUtils",void 0);l([S()],o.prototype,"_slotMenu",void 0);l([S()],o.prototype,"_collapsed",void 0);l([S()],o.prototype,"_hideLogoText",void 0);o=T=l([P("scb-header")],o);