scb-wc-test 0.1.172 → 0.1.174

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.
@@ -1,4 +1,4 @@
1
- import{a as f,n,i as y,E as b,x as u,t as v}from"../../vendor/vendor.js";import"../../vendor/vendor-material.js";import"./scb-checkbox-group.js";(function(){try{var t=typeof globalThis<"u"?globalThis:window;if(!t.__scb_ce_guard_installed__){t.__scb_ce_guard_installed__=!0;var i=customElements.define.bind(customElements);customElements.define=function(e,r,s){try{customElements.get(e)||i(e,r,s)}catch(l){var o=String(l||"");if(o.indexOf("already been used")===-1&&o.indexOf("NotSupportedError")===-1)throw l}}}}catch{}})();var _=Object.defineProperty,k=Object.getOwnPropertyDescriptor,g=t=>{throw TypeError(t)},c=(t,i,e,r)=>{for(var s=r>1?void 0:r?k(i,e):i,o=t.length-1,l;o>=0;o--)(l=t[o])&&(s=(r?l(i,e,s):l(s))||s);return r&&s&&_(i,e,s),s},x=(t,i,e)=>i.has(t)||g("Cannot "+e),w=(t,i,e)=>i.has(t)?g("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(t):i.set(t,e),p=(t,i,e)=>(x(t,i,"access private method"),e),h,m,d;let a=class extends y{constructor(){super(),w(this,h),this._internals=null,this.disabled=!1,this.indeterminate=!1,this.checked=!1,this.label="",this.supportingText="",this.ariaLabel="",this.name="",this.value="on",this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._form=null,this._formResetHandler=null,this._initialChecked=!1,this._checkboxId="","attachInternals"in this&&(this._internals=this.attachInternals())}connectedCallback(){super.connectedCallback(),this._checkboxId=this.id||`scb-checkbox-${Math.random().toString(36).slice(2,11)}`,this._initialChecked=this.checked,this._form=this.closest("form"),this._form&&(this._formResetHandler=()=>{this.checked=this._initialChecked,this.indeterminate=!1,this.__syncFormValue()},this._form.addEventListener("reset",this._formResetHandler,!0)),this.__syncFormValue()}disconnectedCallback(){super.disconnectedCallback(),this._form&&this._formResetHandler&&this._form.removeEventListener("reset",this._formResetHandler,!0)}firstUpdated(){const t=this.shadowRoot?.querySelector("md-checkbox");t&&t.addEventListener("change",()=>{const e=t,r=!!e.checked,s=!!e.indeterminate;this.checked=r,this.indeterminate=s,this.dispatchEvent(new CustomEvent("change",{detail:{checked:r,indeterminate:s},bubbles:!0,composed:!0}))}),this.shadowRoot?.querySelector("label.wrap")?.addEventListener("click",e=>{if(this.disabled)return;if(!e.composedPath().some(o=>{const l=o;return l?.tagName?.toLowerCase?.()==="md-checkbox"||l?.classList?.contains("box-wrap")})){e.preventDefault();const o=this.shadowRoot.querySelector("md-checkbox");o&&(o.checked=!o.checked,o.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})))}}),this.__syncInnerAria(),p(this,h,m).call(this)}updated(t){super.updated(t),t.has("disabled")&&this.toggleAttribute("aria-disabled",this.disabled),(t.has("label")||t.has("supportingText")||t.has("ariaLabel"))&&this.__syncInnerAria(),(t.has("checked")||t.has("disabled")||t.has("value"))&&this.__syncFormValue(),(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom")||t.has("spacingLeft")||t.has("spacingRight"))&&p(this,h,m).call(this)}formDisabledCallback(t){this.disabled=t}__syncInnerAria(){const i=this.shadowRoot?.querySelector("md-checkbox")?.shadowRoot;if(!i)return;const e=i.querySelector('[role="checkbox"]')||i.querySelector('input[type="checkbox"]');if(!e)return;const r=!!this.label?.trim(),s=r?`${this._checkboxId}-label`:"",o=this.supportingText?`${this._checkboxId}-supporting-text`:"";r&&s?(e.setAttribute("aria-labelledby",s),e.removeAttribute("aria-label")):(e.removeAttribute("aria-labelledby"),this.ariaLabel?.trim()?e.setAttribute("aria-label",this.ariaLabel.trim()):e.removeAttribute("aria-label")),o?e.setAttribute("aria-describedby",o):e.removeAttribute("aria-describedby")}__syncFormValue(){if(!this._internals)return;const t=this.disabled||!this.checked?null:this.value;this._internals.setFormValue(t)}render(){const t=this.supportingText?`${this._checkboxId}-supporting-text`:void 0,i=!!this.label?.trim(),e=i?b:this.ariaLabel||b;return u`
1
+ import{a as g,n,i as y,E as b,x as u,t as v}from"../../vendor/vendor.js";import"../../vendor/vendor-material.js";import"./scb-checkbox-group.js";(function(){try{var t=typeof globalThis<"u"?globalThis:window;if(!t.__scb_ce_guard_installed__){t.__scb_ce_guard_installed__=!0;var i=customElements.define.bind(customElements);customElements.define=function(e,a,s){try{customElements.get(e)||i(e,a,s)}catch(l){var o=String(l||"");if(o.indexOf("already been used")===-1&&o.indexOf("NotSupportedError")===-1)throw l}}}}catch{}})();var _=Object.defineProperty,k=Object.getOwnPropertyDescriptor,f=t=>{throw TypeError(t)},c=(t,i,e,a)=>{for(var s=a>1?void 0:a?k(i,e):i,o=t.length-1,l;o>=0;o--)(l=t[o])&&(s=(a?l(i,e,s):l(s))||s);return a&&s&&_(i,e,s),s},x=(t,i,e)=>i.has(t)||f("Cannot "+e),w=(t,i,e)=>i.has(t)?f("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(t):i.set(t,e),p=(t,i,e)=>(x(t,i,"access private method"),e),h,m,d;let r=class extends y{constructor(){super(),w(this,h),this._internals=null,this.disabled=!1,this.indeterminate=!1,this.checked=!1,this.label="",this.supportingText="",this.ariaLabel="",this.name="",this.value="on",this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._form=null,this._formResetHandler=null,this._initialChecked=!1,this._checkboxId="","attachInternals"in this&&(this._internals=this.attachInternals())}connectedCallback(){super.connectedCallback(),this._checkboxId=this.id||`scb-checkbox-${Math.random().toString(36).slice(2,11)}`,this._initialChecked=this.checked,this._form=this.closest("form"),this._form&&(this._formResetHandler=()=>{this.checked=this._initialChecked,this.indeterminate=!1,this.__syncFormValue()},this._form.addEventListener("reset",this._formResetHandler,!0)),this.__syncFormValue()}disconnectedCallback(){super.disconnectedCallback(),this._form&&this._formResetHandler&&this._form.removeEventListener("reset",this._formResetHandler,!0)}firstUpdated(){const t=this.shadowRoot?.querySelector("md-checkbox");t&&t.addEventListener("change",()=>{const e=t,a=!!e.checked,s=!!e.indeterminate;this.checked=a,this.indeterminate=s,this.dispatchEvent(new CustomEvent("change",{detail:{checked:a,indeterminate:s},bubbles:!0,composed:!0}))}),this.shadowRoot?.querySelector("label.wrap")?.addEventListener("click",e=>{if(this.disabled)return;if(!e.composedPath().some(o=>{const l=o;return l?.tagName?.toLowerCase?.()==="md-checkbox"||l?.classList?.contains("box-wrap")})){e.preventDefault();const o=this.shadowRoot.querySelector("md-checkbox");o&&(o.checked=!o.checked,o.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})))}}),this.__syncInnerAria(),p(this,h,m).call(this)}updated(t){super.updated(t),t.has("disabled")&&this.toggleAttribute("aria-disabled",this.disabled),(t.has("label")||t.has("supportingText")||t.has("ariaLabel"))&&this.__syncInnerAria(),(t.has("checked")||t.has("disabled")||t.has("value"))&&this.__syncFormValue(),(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom")||t.has("spacingLeft")||t.has("spacingRight"))&&p(this,h,m).call(this)}formDisabledCallback(t){this.disabled=t}__syncInnerAria(){const i=this.shadowRoot?.querySelector("md-checkbox")?.shadowRoot;if(!i)return;const e=i.querySelector('[role="checkbox"]')||i.querySelector('input[type="checkbox"]');if(!e)return;const a=!!this.label?.trim(),s=a?`${this._checkboxId}-label`:"",o=this.supportingText?`${this._checkboxId}-supporting-text`:"";a&&s?(e.setAttribute("aria-labelledby",s),e.removeAttribute("aria-label")):(e.removeAttribute("aria-labelledby"),this.ariaLabel?.trim()?e.setAttribute("aria-label",this.ariaLabel.trim()):e.removeAttribute("aria-label")),o?e.setAttribute("aria-describedby",o):e.removeAttribute("aria-describedby")}__syncFormValue(){if(!this._internals)return;const t=this.disabled||!this.checked?null:this.value;this._internals.setFormValue(t)}render(){const t=this.supportingText?`${this._checkboxId}-supporting-text`:void 0,i=!!this.label?.trim(),e=i?b:this.ariaLabel||b;return u`
2
2
  <label class="wrap">
3
3
  <div class="box-wrap">
4
4
  <md-checkbox
@@ -16,7 +16,7 @@ import{a as f,n,i as y,E as b,x as u,t as v}from"../../vendor/vendor.js";import"
16
16
  ${this.supportingText}
17
17
  </div>`:b}
18
18
  <slot></slot>
19
- `}};h=new WeakSet;m=function(){const t=p(this,h,d).call(this,this.spacing),i=p(this,h,d).call(this,this.spacingTop)??t,e=p(this,h,d).call(this,this.spacingBottom)??t,r=p(this,h,d).call(this,this.spacingLeft),s=p(this,h,d).call(this,this.spacingRight);i?this.style.setProperty("--scb-checkbox-spacing-block-start",i):this.style.removeProperty("--scb-checkbox-spacing-block-start"),e?this.style.setProperty("--scb-checkbox-spacing-block-end",e):this.style.removeProperty("--scb-checkbox-spacing-block-end"),r?this.style.setProperty("--scb-checkbox-spacing-inline-start",r):this.style.removeProperty("--scb-checkbox-spacing-inline-start"),s?this.style.setProperty("--scb-checkbox-spacing-inline-end",s):this.style.removeProperty("--scb-checkbox-spacing-inline-end")};d=function(t){if(!t)return;const i=String(t).trim();if(i)return/^\d+$/.test(i)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(i,10)))})`:i};a.formAssociated=!0;a.styles=f`
19
+ `}};h=new WeakSet;m=function(){const t=p(this,h,d).call(this,this.spacing),i=p(this,h,d).call(this,this.spacingTop)??t,e=p(this,h,d).call(this,this.spacingBottom)??t,a=p(this,h,d).call(this,this.spacingLeft),s=p(this,h,d).call(this,this.spacingRight);i?this.style.setProperty("--scb-checkbox-spacing-block-start",i):this.style.removeProperty("--scb-checkbox-spacing-block-start"),e?this.style.setProperty("--scb-checkbox-spacing-block-end",e):this.style.removeProperty("--scb-checkbox-spacing-block-end"),a?this.style.setProperty("--scb-checkbox-spacing-inline-start",a):this.style.removeProperty("--scb-checkbox-spacing-inline-start"),s?this.style.setProperty("--scb-checkbox-spacing-inline-end",s):this.style.removeProperty("--scb-checkbox-spacing-inline-end")};d=function(t){if(!t)return;const i=String(t).trim();if(i)return/^\d+$/.test(i)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(i,10)))})`:i};r.formAssociated=!0;r.styles=g`
20
20
  :host {
21
21
  display: inline-grid;
22
22
  grid-template-columns: auto;
@@ -40,7 +40,6 @@ import{a as f,n,i as y,E as b,x as u,t as v}from"../../vendor/vendor.js";import"
40
40
  gap: var(--spacing-5, 16px);
41
41
  cursor: pointer;
42
42
  overflow: visible;
43
- padding: var(--spacing-2, 4px);
44
43
  }
45
44
 
46
45
  :host([disabled]) .wrap {
@@ -91,4 +90,4 @@ import{a as f,n,i as y,E as b,x as u,t as v}from"../../vendor/vendor.js";import"
91
90
  color: var(--md-sys-color-on-surface-variant);
92
91
  }
93
92
  }
94
- `;c([n({type:Boolean,reflect:!0})],a.prototype,"disabled",2);c([n({type:Boolean,reflect:!0})],a.prototype,"indeterminate",2);c([n({type:Boolean,reflect:!0})],a.prototype,"checked",2);c([n({type:String})],a.prototype,"label",2);c([n({type:String,attribute:"supporting-text"})],a.prototype,"supportingText",2);c([n({type:String,reflect:!0,attribute:"aria-label"})],a.prototype,"ariaLabel",2);c([n({type:String})],a.prototype,"name",2);c([n({type:String})],a.prototype,"value",2);c([n({type:String,reflect:!0})],a.prototype,"spacing",2);c([n({type:String,attribute:"spacing-top",reflect:!0})],a.prototype,"spacingTop",2);c([n({type:String,attribute:"spacing-bottom",reflect:!0})],a.prototype,"spacingBottom",2);c([n({type:String,attribute:"spacing-left",reflect:!0})],a.prototype,"spacingLeft",2);c([n({type:String,attribute:"spacing-right",reflect:!0})],a.prototype,"spacingRight",2);a=c([v("scb-checkbox")],a);export{a as ScbCheckbox};
93
+ `;c([n({type:Boolean,reflect:!0})],r.prototype,"disabled",2);c([n({type:Boolean,reflect:!0})],r.prototype,"indeterminate",2);c([n({type:Boolean,reflect:!0})],r.prototype,"checked",2);c([n({type:String})],r.prototype,"label",2);c([n({type:String,attribute:"supporting-text"})],r.prototype,"supportingText",2);c([n({type:String,reflect:!0,attribute:"aria-label"})],r.prototype,"ariaLabel",2);c([n({type:String})],r.prototype,"name",2);c([n({type:String})],r.prototype,"value",2);c([n({type:String,reflect:!0})],r.prototype,"spacing",2);c([n({type:String,attribute:"spacing-top",reflect:!0})],r.prototype,"spacingTop",2);c([n({type:String,attribute:"spacing-bottom",reflect:!0})],r.prototype,"spacingBottom",2);c([n({type:String,attribute:"spacing-left",reflect:!0})],r.prototype,"spacingLeft",2);c([n({type:String,attribute:"spacing-right",reflect:!0})],r.prototype,"spacingRight",2);r=c([v("scb-checkbox")],r);export{r as ScbCheckbox};
@@ -1,4 +1,4 @@
1
- import{a as f,n as a,i as u,E as d,x as _,t as p}from"../../vendor/vendor.js";import"../scb-divider/scb-divider.js";(function(){try{var e=typeof globalThis<"u"?globalThis:window;if(!e.__scb_ce_guard_installed__){e.__scb_ce_guard_installed__=!0;var o=customElements.define.bind(customElements);customElements.define=function(r,l,i){try{customElements.get(r)||o(r,l,i)}catch(c){var s=String(c||"");if(s.indexOf("already been used")===-1&&s.indexOf("NotSupportedError")===-1)throw c}}}}catch{}})();var h=Object.defineProperty,v=Object.getOwnPropertyDescriptor,n=(e,o,r,l)=>{for(var i=l>1?void 0:l?v(o,r):o,s=e.length-1,c;s>=0;s--)(c=e[s])&&(i=(l?c(o,r,i):c(i))||i);return l&&i&&h(o,r,i),i};let t=class extends u{constructor(){super(...arguments),this.floating=!0,this.left=!0,this.right=!1,this.open=!1,this.overlay=!1,this.lockScroll=!1,this.closeOnOverlay=!0,this.modal=!1,this.__lastTriggerEl=null,this.__onDocumentClick=e=>{const o=this.__getActionFromEvent(e);if(o){o==="open"&&this.__setOpen(!0),o==="close"&&this.__setOpen(!1),o==="toggle"&&this.__setOpen(!this.open),e.stopPropagation();return}this.floating&&this.open&&!this.overlay&&(e.composedPath().includes(this)||this.__setOpen(!1))},this.__onDocumentKeydown=e=>{if(this.open){if(e.key==="Escape"){this.__setOpen(!1);return}if(this.overlay&&e.key==="Tab"){const o=this.__getFocusable();if(o.length===0)return;const r=o[0],l=o[o.length-1],i=this.renderRoot,s=i.activeElement||document.activeElement;e.shiftKey?(s===r||!i.contains(s))&&(e.preventDefault(),l.focus()):(s===l||!i.contains(s))&&(e.preventDefault(),r.focus())}}}}static __ensureOverlayStyles(){if(typeof document>"u"||document.getElementById("scb-drawer-overlay-styles"))return;const e=document.createElement("style");e.id="scb-drawer-overlay-styles",e.textContent=`
1
+ import{a as f,n as a,i as _,E as d,x as u,t as h}from"../../vendor/vendor.js";import"../scb-divider/scb-divider.js";(function(){try{var e=typeof globalThis<"u"?globalThis:window;if(!e.__scb_ce_guard_installed__){e.__scb_ce_guard_installed__=!0;var o=customElements.define.bind(customElements);customElements.define=function(i,l,r){try{customElements.get(i)||o(i,l,r)}catch(c){var s=String(c||"");if(s.indexOf("already been used")===-1&&s.indexOf("NotSupportedError")===-1)throw c}}}}catch{}})();var p=Object.defineProperty,v=Object.getOwnPropertyDescriptor,n=(e,o,i,l)=>{for(var r=l>1?void 0:l?v(o,i):o,s=e.length-1,c;s>=0;s--)(c=e[s])&&(r=(l?c(o,i,r):c(r))||r);return l&&r&&p(o,i,r),r};let t=class extends _{constructor(){super(...arguments),this.floating=!0,this.left=!0,this.right=!1,this.open=!1,this.overlay=!1,this.lockScroll=!1,this.closeOnOverlay=!0,this.modal=!1,this.__effectiveSide="left",this.__lastTriggerEl=null,this.__onDocumentClick=e=>{const o=this.__getActionFromEvent(e);if(o){o==="open"&&this.__setOpen(!0),o==="close"&&this.__setOpen(!1),o==="toggle"&&this.__setOpen(!this.open),e.stopPropagation();return}this.floating&&this.open&&!this.overlay&&(e.composedPath().includes(this)||this.__setOpen(!1))},this.__onDocumentKeydown=e=>{if(this.open){if(e.key==="Escape"){this.__setOpen(!1);return}if(this.overlay&&e.key==="Tab"){const o=this.__getFocusable();if(o.length===0)return;const i=o[0],l=o[o.length-1],r=this.renderRoot,s=r.activeElement||document.activeElement;e.shiftKey?(s===i||!r.contains(s))&&(e.preventDefault(),l.focus()):(s===l||!r.contains(s))&&(e.preventDefault(),i.focus())}}}}static __ensureOverlayStyles(){if(typeof document>"u"||document.getElementById("scb-drawer-overlay-styles"))return;const e=document.createElement("style");e.id="scb-drawer-overlay-styles",e.textContent=`
2
2
  .scb-drawer-global-overlay {
3
3
  position: fixed;
4
4
  inset: 0;
@@ -15,7 +15,7 @@ import{a as f,n as a,i as u,E as d,x as _,t as p}from"../../vendor/vendor.js";im
15
15
  @media (prefers-reduced-motion: reduce) {
16
16
  .scb-drawer-global-overlay { transition: none; }
17
17
  }
18
- `,document.head.appendChild(e)}static __ensureOverlay(){if(typeof document>"u"||t.__overlayEl)return;t.__ensureOverlayStyles();const e=document.createElement("div");e.className="scb-drawer-global-overlay",e.addEventListener("pointerdown",()=>{const o=t.__overlayStack[t.__overlayStack.length-1];o&&o.closeOnOverlay&&o.__setOpen(!1)},{passive:!0}),document.body.appendChild(e),t.__overlayEl=e}static __showOverlay(e){t.__ensureOverlay(),t.__overlayEl&&(t.__overlayStack.includes(e)||t.__overlayStack.push(e),t.__overlayEl.classList.add("is-visible"))}static __hideOverlay(e){const o=t.__overlayStack.indexOf(e);o>=0&&t.__overlayStack.splice(o,1),t.__overlayStack.length===0&&t.__overlayEl&&t.__overlayEl.classList.remove("is-visible")}static __lockScrollEnable(){typeof document>"u"||(t.__lockedCount===0&&(t.__prevDocOverflow=document.documentElement.style.overflow||"",t.__prevBodyOverflow=document.body.style.overflow||"",document.documentElement.style.overflow="hidden",document.body.style.overflow="hidden"),t.__lockedCount++)}static __lockScrollDisable(){typeof document>"u"||(t.__lockedCount=Math.max(0,t.__lockedCount-1),t.__lockedCount===0&&(document.documentElement.style.overflow=t.__prevDocOverflow??"",document.body.style.overflow=t.__prevBodyOverflow??""))}render(){const e=this.modal&&this.overlay&&this.floating;return _`
18
+ `,document.head.appendChild(e)}static __ensureOverlay(){if(typeof document>"u"||t.__overlayEl)return;t.__ensureOverlayStyles();const e=document.createElement("div");e.className="scb-drawer-global-overlay",e.addEventListener("pointerdown",()=>{const o=t.__overlayStack[t.__overlayStack.length-1];o&&o.closeOnOverlay&&o.__setOpen(!1)},{passive:!0}),document.body.appendChild(e),t.__overlayEl=e}static __showOverlay(e){t.__ensureOverlay(),t.__overlayEl&&(t.__overlayStack.includes(e)||t.__overlayStack.push(e),t.__overlayEl.classList.add("is-visible"))}static __hideOverlay(e){const o=t.__overlayStack.indexOf(e);o>=0&&t.__overlayStack.splice(o,1),t.__overlayStack.length===0&&t.__overlayEl&&t.__overlayEl.classList.remove("is-visible")}static __lockScrollEnable(){typeof document>"u"||(t.__lockedCount===0&&(t.__prevDocOverflow=document.documentElement.style.overflow||"",t.__prevBodyOverflow=document.body.style.overflow||"",document.documentElement.style.overflow="hidden",document.body.style.overflow="hidden"),t.__lockedCount++)}static __lockScrollDisable(){typeof document>"u"||(t.__lockedCount=Math.max(0,t.__lockedCount-1),t.__lockedCount===0&&(document.documentElement.style.overflow=t.__prevDocOverflow??"",document.body.style.overflow=t.__prevBodyOverflow??""))}render(){const e=this.modal&&this.overlay&&this.floating;return u`
19
19
  <div
20
20
  role=${e?"dialog":d}
21
21
  aria-modal=${e?"true":d}
@@ -24,7 +24,7 @@ import{a as f,n as a,i as u,E as d,x as _,t as p}from"../../vendor/vendor.js";im
24
24
  <slot></slot>
25
25
  </div>
26
26
  </div>
27
- `}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.__onDocumentClick,!1)}disconnectedCallback(){document.removeEventListener("click",this.__onDocumentClick,!1),document.removeEventListener("keydown",this.__onDocumentKeydown,!0),this.overlay&&(t.__hideOverlay(this),this.lockScroll&&t.__lockScrollDisable()),super.disconnectedCallback()}__getActionFromEvent(e){if(!this.id)return null;const o=e.composedPath();for(const r of o)if(r instanceof Element){if(r.getAttribute("data-drawer-open")===this.id)return this.__lastTriggerEl=r,"open";if(r.getAttribute("data-drawer-close")===this.id)return this.__lastTriggerEl=r,"close";if(r.getAttribute("data-drawer-toggle")===this.id)return this.__lastTriggerEl=r,"toggle";if(r.getAttribute("aria-controls")===this.id)return this.__lastTriggerEl=r,"toggle"}return null}__getFocusable(){const e=this.renderRoot;return Array.from(e.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter(o=>!o.hasAttribute("disabled")&&o.tabIndex>=0)}__setOpen(e){this.open=e}updated(e){if(e.has("open")){const o=!!e.get("open");this.__applyOpenSideEffects(o,this.open)}e.has("right")&&this.right&&this.left&&(this.left=!1),e.has("left")&&this.left&&this.right&&(this.right=!1)}__applyOpenSideEffects(e,o){o&&!e?(this.floating&&this.overlay&&(t.__showOverlay(this),this.lockScroll&&t.__lockScrollEnable()),document.addEventListener("keydown",this.__onDocumentKeydown,!0),this.updateComplete.then(()=>{this.__getFocusable()[0]?.focus?.()}),this.dispatchEvent(new CustomEvent("scb-drawer-opened",{bubbles:!0,composed:!0}))):!o&&e&&(this.floating&&this.overlay&&(t.__hideOverlay(this),this.lockScroll&&t.__lockScrollDisable()),document.removeEventListener("keydown",this.__onDocumentKeydown,!0),this.__lastTriggerEl?.focus?.(),this.dispatchEvent(new CustomEvent("scb-drawer-closed",{bubbles:!0,composed:!0})))}};t.__overlayEl=null;t.__overlayStack=[];t.__lockedCount=0;t.__prevDocOverflow=null;t.__prevBodyOverflow=null;t.styles=f`
27
+ `}connectedCallback(){super.connectedCallback(),this.__syncEffectiveSide(new Map),document.addEventListener("click",this.__onDocumentClick,!1)}disconnectedCallback(){document.removeEventListener("click",this.__onDocumentClick,!1),document.removeEventListener("keydown",this.__onDocumentKeydown,!0),this.overlay&&(t.__hideOverlay(this),this.lockScroll&&t.__lockScrollDisable()),super.disconnectedCallback()}__getActionFromEvent(e){if(!this.id)return null;const o=e.composedPath();for(const i of o)if(i instanceof Element){if(i.getAttribute("data-drawer-open")===this.id)return this.__lastTriggerEl=i,"open";if(i.getAttribute("data-drawer-close")===this.id)return this.__lastTriggerEl=i,"close";if(i.getAttribute("data-drawer-toggle")===this.id)return this.__lastTriggerEl=i,"toggle";if(i.getAttribute("aria-controls")===this.id)return this.__lastTriggerEl=i,"toggle"}return null}__getFocusable(){const e=this.renderRoot;return Array.from(e.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter(o=>!o.hasAttribute("disabled")&&o.tabIndex>=0)}__setOpen(e){this.open=e}__syncEffectiveSide(e){const o=this.left&&this.right;let i;o?e.has("left")&&this.left&&!e.has("right")?i="left":i="right":this.right?i="right":i="left",this.__effectiveSide!==i&&(this.__effectiveSide=i),this.getAttribute("data-side")!==i&&this.setAttribute("data-side",i)}willUpdate(e){this.__syncEffectiveSide(e)}updated(e){if(e.has("open")){const o=!!e.get("open");this.__applyOpenSideEffects(o,this.open)}}__applyOpenSideEffects(e,o){o&&!e?(this.floating&&this.overlay&&(t.__showOverlay(this),this.lockScroll&&t.__lockScrollEnable()),document.addEventListener("keydown",this.__onDocumentKeydown,!0),this.updateComplete.then(()=>{this.__getFocusable()[0]?.focus?.()}),this.dispatchEvent(new CustomEvent("scb-drawer-opened",{bubbles:!0,composed:!0}))):!o&&e&&(this.floating&&this.overlay&&(t.__hideOverlay(this),this.lockScroll&&t.__lockScrollDisable()),document.removeEventListener("keydown",this.__onDocumentKeydown,!0),this.__lastTriggerEl?.focus?.(),this.dispatchEvent(new CustomEvent("scb-drawer-closed",{bubbles:!0,composed:!0})))}};t.__overlayEl=null;t.__overlayStack=[];t.__lockedCount=0;t.__prevDocOverflow=null;t.__prevBodyOverflow=null;t.styles=f`
28
28
  :host {
29
29
  display: block;
30
30
  color: var(--md-sys-color-on-surface);
@@ -65,18 +65,18 @@ import{a as f,n as a,i as u,E as d,x as _,t as p}from"../../vendor/vendor.js";im
65
65
  }
66
66
  }
67
67
 
68
- :host([floating][left]) {
68
+ :host([floating][data-side="left"]) {
69
69
  left: 0;
70
70
  transform: translateX(-100%);
71
71
  }
72
- :host([floating][left][open]) {
72
+ :host([floating][data-side="left"][open]) {
73
73
  transform: translateX(0);
74
74
  opacity: 1;
75
75
  visibility: visible;
76
76
  pointer-events: auto;
77
77
  }
78
78
 
79
- :host([floating][right]) {
79
+ :host([floating][data-side="right"]) {
80
80
  right: 0;
81
81
  transform: translateX(100%);
82
82
  box-shadow: var(
@@ -84,7 +84,7 @@ import{a as f,n as a,i as u,E as d,x as _,t as p}from"../../vendor/vendor.js";im
84
84
  -2px 0 12px rgba(0, 0, 0, 0.15)
85
85
  );
86
86
  }
87
- :host([floating][right][open]) {
87
+ :host([floating][data-side="right"][open]) {
88
88
  transform: translateX(0);
89
89
  opacity: 1;
90
90
  visibility: visible;
@@ -97,4 +97,4 @@ import{a as f,n as a,i as u,E as d,x as _,t as p}from"../../vendor/vendor.js";im
97
97
  content-visibility: auto;
98
98
  contain-intrinsic-size: 0 600px;
99
99
  }
100
- `;n([a({type:Boolean,reflect:!0})],t.prototype,"floating",2);n([a({type:Boolean,reflect:!0})],t.prototype,"left",2);n([a({type:Boolean,reflect:!0})],t.prototype,"right",2);n([a({type:Boolean,reflect:!0})],t.prototype,"open",2);n([a({type:Boolean,reflect:!0})],t.prototype,"overlay",2);n([a({type:Boolean,reflect:!0,attribute:"lock-scroll"})],t.prototype,"lockScroll",2);n([a({type:Boolean,reflect:!0,attribute:"close-on-overlay"})],t.prototype,"closeOnOverlay",2);n([a({type:Boolean,reflect:!0})],t.prototype,"modal",2);t=n([p("scb-drawer")],t);
100
+ `;n([a({type:Boolean,reflect:!0})],t.prototype,"floating",2);n([a({type:Boolean,reflect:!0})],t.prototype,"left",2);n([a({type:Boolean,reflect:!0})],t.prototype,"right",2);n([a({type:Boolean,reflect:!0})],t.prototype,"open",2);n([a({type:Boolean,reflect:!0})],t.prototype,"overlay",2);n([a({type:Boolean,reflect:!0,attribute:"lock-scroll"})],t.prototype,"lockScroll",2);n([a({type:Boolean,reflect:!0,attribute:"close-on-overlay"})],t.prototype,"closeOnOverlay",2);n([a({type:Boolean,reflect:!0})],t.prototype,"modal",2);t=n([h("scb-drawer")],t);
@@ -1,4 +1,4 @@
1
- import{a as w,n as h,r as y,i as x,x as b,E as m,t as S}from"../../vendor/vendor.js";import"../../vendor/vendor-material.js";import"../scb-grid/scb-grid-item.js";import"../scb-grid/scb-grid.js";import"../scb-link/scb-link.js";import"../scb-icon-button/scb-icon-button.js";import"../scb-button/scb-button.js";import"../scb-search/scb-search.js";import"../scb-drawer/scb-drawer.js";import"../scb-menu/scb-menu.js";import"../scb-dropdown/scb-dropdown.js";import"../scb-grid/scb-stack.js";import"../../vendor/preload-helper.js";import"../scb-tooltip/scb-tooltip.js";import"../scb-list/scb-list.js";import"../scb-list/scb-list-item.js";import"../scb-divider/scb-divider.js";import"../scb-menu/scb-menu-item.js";import"../scb-menu/scb-menu-section.js";import"../scb-menu/scb-sub-menu.js";import"../scb-options-menu/scb-options-menu.js";import"../scb-options-menu/scb-options-menu-item.js";import"../scb-options-menu/scb-options-sub-menu.js";(function(){try{var e=typeof globalThis<"u"?globalThis:window;if(!e.__scb_ce_guard_installed__){e.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(s,i,o){try{customElements.get(s)||t(s,i,o)}catch(a){var d=String(a||"");if(d.indexOf("already been used")===-1&&d.indexOf("NotSupportedError")===-1)throw a}}}}catch{}})();var k=Object.defineProperty,A=Object.getOwnPropertyDescriptor,n=(e,t,s,i)=>{for(var o=i>1?void 0:i?A(t,s):t,d=e.length-1,a;d>=0;d--)(a=e[d])&&(o=(i?a(t,s,o):a(o))||o);return i&&o&&k(t,s,o),o};const C=()=>{if(typeof window>"u"||typeof document>"u"||!("customElements"in window)||document.head.querySelector("style[data-scb-header-pre-upgrade]"))return;const e=document.createElement("style");e.setAttribute("data-scb-header-pre-upgrade",""),e.textContent=`
1
+ import{a as x,n as c,r as y,i as S,x as u,E as m,t as k}from"../../vendor/vendor.js";import"../../vendor/vendor-material.js";import"../scb-grid/scb-grid-item.js";import"../scb-grid/scb-grid.js";import"../scb-link/scb-link.js";import"../scb-icon-button/scb-icon-button.js";import"../scb-button/scb-button.js";import"../scb-search/scb-search.js";import"../scb-drawer/scb-drawer.js";import"../scb-menu/scb-menu.js";import"../scb-dropdown/scb-dropdown.js";import"../scb-skeleton/scb-skeleton.js";import"../scb-grid/scb-stack.js";import"../../vendor/preload-helper.js";import"../scb-tooltip/scb-tooltip.js";import"../scb-list/scb-list.js";import"../scb-list/scb-list-item.js";import"../scb-divider/scb-divider.js";import"../scb-menu/scb-menu-item.js";import"../scb-menu/scb-menu-section.js";import"../scb-menu/scb-sub-menu.js";import"../scb-options-menu/scb-options-menu.js";import"../scb-options-menu/scb-options-menu-item.js";import"../scb-options-menu/scb-options-sub-menu.js";(function(){try{var e=typeof globalThis<"u"?globalThis:window;if(!e.__scb_ce_guard_installed__){e.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(s,a,o){try{customElements.get(s)||t(s,a,o)}catch(r){var d=String(r||"");if(d.indexOf("already been used")===-1&&d.indexOf("NotSupportedError")===-1)throw r}}}}catch{}})();var A=Object.defineProperty,C=Object.getOwnPropertyDescriptor,n=(e,t,s,a)=>{for(var o=a>1?void 0:a?C(t,s):t,d=e.length-1,r;d>=0;d--)(r=e[d])&&(o=(a?r(t,s,o):r(o))||o);return a&&o&&A(t,s,o),o};const T=()=>{if(typeof window>"u"||typeof document>"u"||!("customElements"in window)||document.head.querySelector("style[data-scb-header-pre-upgrade]"))return;const e=document.createElement("style");e.setAttribute("data-scb-header-pre-upgrade",""),e.textContent=`
2
2
  scb-header:not(:defined) {
3
3
  display: block;
4
4
  margin-block-start: var(--scb-header-spacing-block-start, 0);
@@ -43,26 +43,26 @@ import{a as w,n as h,r as y,i as x,x as b,E as m,t as S}from"../../vendor/vendor
43
43
  );
44
44
  }
45
45
  }
46
- `,document.head.appendChild(e);const t=l=>{const c=String(l??"").trim();if(c)return/^\d+$/.test(c)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(c,10)))})`:c},s=l=>{const c=String(l??"").trim();if(!c)return!1;try{const u=JSON.parse(c);return Array.isArray(u)&&u.length>0}catch{return!1}},i=l=>{for(const c of Array.from(l.children)){const u=c.tagName.toLowerCase();if(u==="scb-header-tab"||u==="scb-dropdown")return!0}return!1},o=l=>{i(l)||s(l.getAttribute("tabs"))?l.setAttribute("data-pre-has-tabs",""):l.removeAttribute("data-pre-has-tabs");const u=t(l.getAttribute("spacing")),p=t(l.getAttribute("spacing-top"))??u,g=t(l.getAttribute("spacing-bottom"))??u;p?l.style.setProperty("--scb-header-spacing-block-start",p):l.style.removeProperty("--scb-header-spacing-block-start"),g?l.style.setProperty("--scb-header-spacing-block-end",g):l.style.removeProperty("--scb-header-spacing-block-end");const v=(l.getAttribute("logo-height")??"").trim();v?l.style.setProperty("--scb-header-pre-logo-img-h",v):l.style.removeProperty("--scb-header-pre-logo-img-h");const _=(l.getAttribute("search-height")??"").trim();_?l.style.setProperty("--scb-header-pre-control-size",_):l.style.removeProperty("--scb-header-pre-control-size")};(()=>{document.querySelectorAll("scb-header").forEach(o)})();const a=new MutationObserver(l=>{for(const c of l){if(c.type==="attributes"){const u=c.target;u instanceof HTMLElement&&u.tagName.toLowerCase()==="scb-header"&&o(u);continue}if(c.type==="childList"){const u=[...Array.from(c.addedNodes),...Array.from(c.removedNodes)];for(const p of u){if(!(p instanceof HTMLElement))continue;if(p.tagName.toLowerCase()==="scb-header"){o(p);continue}const g=p.closest?.("scb-header");g&&o(g)}}}});a.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabs","spacing","spacing-top","spacing-bottom","logo-height","search-height"]}),customElements.whenDefined("scb-header").then(()=>{a.disconnect()})};C();const f={fromAttribute:e=>e==null?!0:!/^(false|0|off|no)$/i.test(e),toAttribute:e=>String(!!e)},T={fromAttribute:e=>e==="small"||e==="large"?e:"medium",toAttribute:e=>{const t=String(e??"");return t==="small"||t==="large"?t:null}};let r=class extends x{constructor(){super(...arguments),this.maxWidth="1440px",this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.size="medium",this.logoText="",this.logoHref="/",this.logoSrc="",this.logoHeight="",this.logoInvertDm=!1,this.banner=!1,this.tabs=[],this.activeTab=null,this.utilityItems=[],this.showDrawer=!0,this.showSearch=!0,this.includeUtilityInMenu=!1,this.drawerOverlay=!0,this.searchText="",this._drawerId="main-drawer",this._menuExpanded=!1,this._searchId="header-search",this._slotNavItems=[],this._slotUtils=[],this._slotMenu=[],this._measureScheduled=!1,this._scheduleMeasure=()=>{this._measureScheduled||(this._measureScheduled=!0,requestAnimationFrame(()=>{this._measureScheduled=!1,this._measure()}))},this._onWindowResize=()=>{this._scheduleMeasure()},this._onMenuSelect=e=>{this.dispatchEvent(new CustomEvent("scb-menu-select",{detail:e.detail,bubbles:!0,composed:!0})),this._closeDrawerNow()},this._collapsed=!1,this._unlockAtWidth=0,this._hideLogoText=!1,this._logoTextUnlockAt=0,this._harvestPending=!1,this._harvest=()=>{const e=Array.from(this.children),t=[],s=[],i=[];let o=-1;const d=a=>({label:a.getAttribute("label")??"",href:a.getAttribute("href")??void 0,icon:a.getAttribute("icon")??void 0});for(const a of e){const l=a.tagName.toLowerCase();if(l==="scb-header-tab"){const c=a.getAttribute("label")??"",u=a.getAttribute("href"),p=u&&u.trim()!==""?u:void 0;(a.hasAttribute("selected")||a.getAttribute("selected")==="true"||a.getAttribute("active")==="true"||a.getAttribute("aria-current")==="page")&&o===-1&&(o=t.length),t.push({kind:"tab",label:c,href:p});continue}if(l==="scb-dropdown"){const c=a.getAttribute("label")??"";(a.hasAttribute("selected")||a.getAttribute("selected")==="true"||a.getAttribute("active")==="true"||a.getAttribute("aria-current")==="page")&&o===-1&&(o=t.length);const p=`scb-header-tab-${t.length}`;a.getAttribute("slot")!==p&&a.setAttribute("slot",p),a.hasAttribute("as-tab")||a.setAttribute("as-tab",""),t.push({kind:"dropdown",slotName:p,label:c});continue}if(l==="scb-header-utility"){s.push({label:a.getAttribute("label")??"",href:a.getAttribute("href")??"#",target:a.getAttribute("target")??void 0});continue}if(l==="scb-header-menu-group"){const c={label:a.getAttribute("label")??"",icon:a.getAttribute("icon")??void 0,children:[]};a.querySelectorAll("scb-header-menu-item").forEach(p=>c.children.push(d(p))),i.push(c);continue}l==="scb-header-menu-item"&&i.push(d(a))}this._slotNavItems=t,this._slotUtils=s,this._slotMenu=i,!this.hasAttribute("active-tab")&&o>=0&&(this.activeTab=o),queueMicrotask(()=>{this.updateComplete.then(()=>{this._scheduleMeasure()})})},this._measure=()=>{const e=this._top,t=this._logoGroup;if(!e||!t)return;const s=window.innerWidth,i=e.clientWidth,o=this._overflows(this._util),d=this._overflows(this._tabsNav),a=s<this.BP_MD||o||d;this._collapsed?!a&&i>=this._unlockAtWidth&&this._setCollapsed(!1):a&&(this._unlockAtWidth=i+this._HYST,this._setCollapsed(!0));let l=!1;if(this.showSearch&&s>=this.BP_SM&&s<this.BP_MD&&this._searchWrap){const p=getComputedStyle(this._searchWrap),g=Math.max(this._num(p.minWidth,this._tokenPx("--scb-header-search-min",320)),this._tokenPx("--scb-header-search-min",320)),v=this._num(getComputedStyle(e).gap,this._tokenPx("--spacing-7",24)),_=this.showDrawer&&(s<this.BP_MD||this._collapsed)?this._menuBtn?.getBoundingClientRect().width||this._tokenPx("--icon-size-large",48):0;l=t.getBoundingClientRect().width+v+g+v+_+8>i+.5}this._setHideSearch(l);let c=!1;if(this.showDrawer&&(s<this.BP_MD||this._collapsed)&&!this._visible(this._util)&&!this._visible(this._searchWrap)){const p=this._num(getComputedStyle(e).gap,this._tokenPx("--spacing-7",24)),g=this._menuBtn?.getBoundingClientRect().width||this._tokenPx("--icon-size-large",48),v=(this._logoGroup?.getBoundingClientRect().width||0)+p+g;this._hideLogoText?c=!(i>=this._logoTextUnlockAt):v>i+.5&&(c=!0,this._logoTextUnlockAt=i+this._HYST)}else c=!1,this._logoTextUnlockAt=0;this._setHideLogoText(c)},this._onMenuClick=async e=>{e.preventDefault(),e.stopPropagation(),this.showDrawer&&(this.dispatchEvent(new CustomEvent("menu-click",{bubbles:!0,composed:!0})),await r._nextFrame(),await r._nextFrame(),this._openDrawerNow())},this._onSearchClick=e=>{const t=this._searchEl;if(t?.submit&&typeof t.submit=="function"){t.submit();return}const s=t?.value??"";this.searchText=s,this.dispatchEvent(new CustomEvent("search-click",{detail:{value:s},bubbles:!0,composed:!0})),t?.focus?.()},this._onTabClick=e=>{const t=e.currentTarget;if(!t)return;const s=t.tagName.toLowerCase()==="a";if(s&&(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey))return;const i=t.getAttribute("data-index"),o=i!=null?Number(i):0,a=this._getNavItems()[o];if(a?.kind==="dropdown")return;this.activeTab=o;const l=a?.kind==="tab"?a.href??"":"",c=new CustomEvent("tab-change",{detail:{index:o,href:l},bubbles:!0,composed:!0,cancelable:!0});!this.dispatchEvent(c)&&s&&e.preventDefault()},this._onDropdownTabActivate=e=>{const t=e.detail?.dataIndex,s=typeof t=="number"?t:typeof t=="string"?Number(t):this._readTabIndexFromEvent(e);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._onTabsKeydown=e=>{const t=e.key;if(t!=="ArrowLeft"&&t!=="ArrowRight"&&t!=="Home"&&t!=="End")return;const s=this._getNavItems();if(!s.length)return;const i=this._readTabIndexFromEvent(e);if(i==null)return;let o=Math.max(0,Math.min(s.length-1,i));t==="ArrowRight"?o=(o+1)%s.length:t==="ArrowLeft"?o=(o-1+s.length)%s.length:t==="Home"?o=0:t==="End"&&(o=s.length-1),e.preventDefault(),this._focusTabAtIndex(o)},this._onSearchInput=e=>{this.searchText=e.detail?.value??"",this.dispatchEvent(new CustomEvent("search-input",{detail:{value:this.searchText},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("search-text-change",{detail:{value:this.searchText},bubbles:!0,composed:!0}))},this._onSearchSubmit=e=>{this.searchText=e.detail?.value??"",this.dispatchEvent(new CustomEvent("search-change",{detail:{value:this.searchText,active:e.detail?.active},bubbles:!0,composed:!0}))},this._onSearchClear=()=>{this.searchText="",this.dispatchEvent(new CustomEvent("search-text-change",{detail:{value:""},bubbles:!0,composed:!0}))}}get _HYST(){return this._tokenPx("--spacing-11",64)}get BP_SM(){return this._tokenPx("--bp-sm",r.BP_SM_DEFAULT)}get BP_MD(){return this._tokenPx("--bp-md",r.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();const e=new MutationObserver(t=>{this._scheduleHarvest()});this._slotMo=e,e.observe(this,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["label","href","icon","target","selected","aria-current","active"]})}_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"))}_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}firstUpdated(){this.updateComplete.then(()=>{this._harvest(),this._attachSlotObservers()});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??"480px"),e.has("searchMin")&&this.style.setProperty("--scb-header-search-min",this.searchMin??"320px"),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("logoHeight")&&(this.logoHeight&&this.logoHeight.trim()?this.style.setProperty("--scb-header-logo-img-h",this.logoHeight.trim()):this.style.removeProperty("--scb-header-logo-img-h")),(e.has("spacing")||e.has("spacingTop")||e.has("spacingBottom"))&&this._applySpacing(),(e.has("utilityItems")||e.has("tabs")||e.has("logoText")||e.has("logoSrc")||e.has("logoHeight")||e.has("activeTab")||e.has("_slotNavItems")||e.has("_slotUtils")||e.has("_slotMenu")||e.has("showDrawer")||e.has("showSearch")||e.has("searchMax")||e.has("searchMin")||e.has("size"))&&this.updateComplete.then(()=>{this._scheduleMeasure()}),(e.has("activeTab")||e.has("_slotNavItems")||e.has("tabs"))&&this.updateComplete.then(()=>{this._syncDropdownTabs()})}disconnectedCallback(){this._ro?.disconnect(),this._slotMo?.disconnect(),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")}_openDrawerNow(){const e=this.renderRoot.querySelector(`#${this._drawerId}`);e&&(e.open=!0,e.setAttribute("open",""),e.show?.(),e.openDrawer?.(),this._menuExpanded=!0,this._syncMenuBtnAria(),this.dispatchEvent(new CustomEvent("drawer-open",{bubbles:!0,composed:!0})))}_closeDrawerNow(){const e=this.renderRoot.querySelector(`#${this._drawerId}`);e&&(e.open=!1),this._menuExpanded=!1,this._syncMenuBtnAria(),this.dispatchEvent(new CustomEvent("drawer-close",{bubbles:!0,composed:!0}))}_syncMenuBtnAria(){const e=this.renderRoot.querySelector(".menu-trigger");e&&e.setAttribute("aria-expanded",String(this._menuExpanded))}_getNavItems(){return this._slotNavItems.length?this._slotNavItems:(this.tabs??[]).map(e=>({kind:"tab",...e}))}_syncDropdownTabs(){this._getNavItems().forEach((t,s)=>{if(t.kind!=="dropdown")return;const i=this.querySelector(`scb-dropdown[slot="${t.slotName}"]`);if(!i)return;const o=String(s);i.getAttribute("data-index")!==o&&i.setAttribute("data-index",o),i.hasAttribute("as-tab")||i.setAttribute("as-tab",""),s===this.activeTab?i.getAttribute("aria-current")!=="page"&&i.setAttribute("aria-current","page"):i.hasAttribute("aria-current")&&i.removeAttribute("aria-current")})}_readTabIndexFromEvent(e){const t=e.composedPath?e.composedPath():[];for(const s of t){if(!(s instanceof HTMLElement))continue;const i=s.getAttribute("data-index");if(i==null)continue;const o=Number(i);if(Number.isFinite(o))return o}return null}_focusTabAtIndex(e){const s=this._getNavItems()[e];if(!s)return;if(s.kind==="dropdown"){this.querySelector(`scb-dropdown[slot="${s.slotName}"]`)?.focus?.();return}this.renderRoot.querySelector(`.tab-link[data-index="${e}"]`)?.focus?.()}_renderMenuNodes(e){return!e||e.length===0?b``:b`${e.map(t=>{const s=Array.isArray(t.children)&&t.children.length>0;return b`
46
+ `,document.head.appendChild(e);const t=l=>{const h=String(l??"").trim();if(h)return/^\d+$/.test(h)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(h,10)))})`:h},s=l=>{const h=String(l??"").trim();if(!h)return!1;try{const p=JSON.parse(h);return Array.isArray(p)&&p.length>0}catch{return!1}},a=l=>{for(const h of Array.from(l.children)){const p=h.tagName.toLowerCase();if(p==="scb-header-tab"||p==="scb-dropdown")return!0}return!1},o=l=>{a(l)||s(l.getAttribute("tabs"))?l.setAttribute("data-pre-has-tabs",""):l.removeAttribute("data-pre-has-tabs");const p=t(l.getAttribute("spacing")),b=t(l.getAttribute("spacing-top"))??p,g=t(l.getAttribute("spacing-bottom"))??p;b?l.style.setProperty("--scb-header-spacing-block-start",b):l.style.removeProperty("--scb-header-spacing-block-start"),g?l.style.setProperty("--scb-header-spacing-block-end",g):l.style.removeProperty("--scb-header-spacing-block-end");const v=(l.getAttribute("logo-width")??"").trim();v?l.style.setProperty("--scb-header-pre-logo-w",v):l.style.removeProperty("--scb-header-pre-logo-w");const _=(l.getAttribute("logo-height")??"").trim();_?l.style.setProperty("--scb-header-pre-logo-img-h",_):l.style.removeProperty("--scb-header-pre-logo-img-h");const w=(l.getAttribute("search-height")??"").trim();w?l.style.setProperty("--scb-header-pre-control-size",w):l.style.removeProperty("--scb-header-pre-control-size")};(()=>{document.querySelectorAll("scb-header").forEach(o)})();const r=new MutationObserver(l=>{for(const h of l){if(h.type==="attributes"){const p=h.target;p instanceof HTMLElement&&p.tagName.toLowerCase()==="scb-header"&&o(p);continue}if(h.type==="childList"){const p=[...Array.from(h.addedNodes),...Array.from(h.removedNodes)];for(const b of p){if(!(b instanceof HTMLElement))continue;if(b.tagName.toLowerCase()==="scb-header"){o(b);continue}const g=b.closest?.("scb-header");g&&o(g)}}}});r.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabs","spacing","spacing-top","spacing-bottom","logo-width","logo-height","logo-aspect-ratio","search-height"]}),customElements.whenDefined("scb-header").then(()=>{r.disconnect()})};T();const f={fromAttribute:e=>e==null?!0:!/^(false|0|off|no)$/i.test(e),toAttribute:e=>String(!!e)},$={fromAttribute:e=>e==null?!1:!/^(false|0|off|no)$/i.test(e),toAttribute:e=>String(!!e)},M={fromAttribute:e=>e==="small"||e==="large"?e:"medium",toAttribute:e=>{const t=String(e??"");return t==="small"||t==="large"?t:null}};let i=class extends S{constructor(){super(...arguments),this.maxWidth="1440px",this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.size="medium",this.logoText="",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.utilityItems=[],this.showDrawer=!0,this.showSearch=!0,this.includeUtilityInMenu=!1,this.drawerOverlay=!0,this.searchText="",this._drawerId="main-drawer",this._menuExpanded=!1,this._searchId="header-search",this._slotNavItems=[],this._slotUtils=[],this._slotMenu=[],this._measureScheduled=!1,this._scheduleMeasure=()=>{this._measureScheduled||(this._measureScheduled=!0,requestAnimationFrame(()=>{this._measureScheduled=!1,this._measure()}))},this._onWindowResize=()=>{this._scheduleMeasure()},this._onMenuSelect=e=>{this.dispatchEvent(new CustomEvent("scb-menu-select",{detail:e.detail,bubbles:!0,composed:!0})),this._closeDrawerNow()},this._collapsed=!1,this._unlockAtWidth=0,this._hideLogoText=!1,this._logoTextUnlockAt=0,this._harvestPending=!1,this._harvest=()=>{const e=Array.from(this.children),t=[],s=[],a=[];let o=-1;const d=r=>({label:r.getAttribute("label")??"",href:r.getAttribute("href")??void 0,icon:r.getAttribute("icon")??void 0});for(const r of e){const l=r.tagName.toLowerCase();if(l==="scb-header-tab"){const h=r.getAttribute("label")??"",p=r.getAttribute("href"),b=p&&p.trim()!==""?p:void 0;(r.hasAttribute("selected")||r.getAttribute("selected")==="true"||r.getAttribute("active")==="true"||r.getAttribute("aria-current")==="page")&&o===-1&&(o=t.length),t.push({kind:"tab",label:h,href:b});continue}if(l==="scb-dropdown"){const h=r.getAttribute("label")??"";(r.hasAttribute("selected")||r.getAttribute("selected")==="true"||r.getAttribute("active")==="true"||r.getAttribute("aria-current")==="page")&&o===-1&&(o=t.length);const b=`scb-header-tab-${t.length}`;r.getAttribute("slot")!==b&&r.setAttribute("slot",b),r.hasAttribute("as-tab")||r.setAttribute("as-tab",""),t.push({kind:"dropdown",slotName:b,label:h});continue}if(l==="scb-header-utility"){s.push({label:r.getAttribute("label")??"",href:r.getAttribute("href")??"#",target:r.getAttribute("target")??void 0});continue}if(l==="scb-header-menu-group"){const h={label:r.getAttribute("label")??"",icon:r.getAttribute("icon")??void 0,children:[]};r.querySelectorAll("scb-header-menu-item").forEach(b=>h.children.push(d(b))),a.push(h);continue}l==="scb-header-menu-item"&&a.push(d(r))}this._slotNavItems=t,this._slotUtils=s,this._slotMenu=a,!this.hasAttribute("active-tab")&&o>=0&&(this.activeTab=o),queueMicrotask(()=>{this.updateComplete.then(()=>{this._scheduleMeasure()})})},this._measure=()=>{const e=this._top,t=this._logoGroup;if(!e||!t)return;const s=window.innerWidth,a=e.clientWidth,o=this._overflows(this._util),d=this._overflows(this._tabsNav),r=s<this.BP_MD||o||d;this._collapsed?!r&&a>=this._unlockAtWidth&&this._setCollapsed(!1):r&&(this._unlockAtWidth=a+this._HYST,this._setCollapsed(!0));let l=!1;if(this.showSearch&&s>=this.BP_SM&&s<this.BP_MD&&this._searchWrap){const b=getComputedStyle(this._searchWrap),g=Math.max(this._num(b.minWidth,this._tokenPx("--scb-header-search-min",320)),this._tokenPx("--scb-header-search-min",320)),v=this._num(getComputedStyle(e).gap,this._tokenPx("--spacing-7",24)),_=this.showDrawer&&(s<this.BP_MD||this._collapsed)?this._menuBtn?.getBoundingClientRect().width||this._tokenPx("--icon-size-large",48):0;l=t.getBoundingClientRect().width+v+g+v+_+8>a+.5}this._setHideSearch(l);let h=!1;if(this.showDrawer&&(s<this.BP_MD||this._collapsed)&&!this._visible(this._util)&&!this._visible(this._searchWrap)){const b=this._num(getComputedStyle(e).gap,this._tokenPx("--spacing-7",24)),g=this._menuBtn?.getBoundingClientRect().width||this._tokenPx("--icon-size-large",48),v=(this._logoGroup?.getBoundingClientRect().width||0)+b+g;this._hideLogoText?h=!(a>=this._logoTextUnlockAt):v>a+.5&&(h=!0,this._logoTextUnlockAt=a+this._HYST)}else h=!1,this._logoTextUnlockAt=0;this._setHideLogoText(h)},this._onMenuClick=async e=>{e.preventDefault(),e.stopPropagation(),this.showDrawer&&(this.dispatchEvent(new CustomEvent("menu-click",{bubbles:!0,composed:!0})),await i._nextFrame(),await i._nextFrame(),this._openDrawerNow())},this._onSearchClick=e=>{const t=this._searchEl;if(t?.submit&&typeof t.submit=="function"){t.submit();return}const s=t?.value??"";this.searchText=s,this.dispatchEvent(new CustomEvent("search-click",{detail:{value:s},bubbles:!0,composed:!0})),t?.focus?.()},this._onTabClick=e=>{const t=e.currentTarget;if(!t)return;const s=t.tagName.toLowerCase()==="a";if(s&&(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey))return;const a=t.getAttribute("data-index"),o=a!=null?Number(a):0,r=this._getNavItems()[o];if(r?.kind==="dropdown")return;this.activeTab=o;const l=r?.kind==="tab"?r.href??"":"",h=new CustomEvent("tab-change",{detail:{index:o,href:l},bubbles:!0,composed:!0,cancelable:!0});!this.dispatchEvent(h)&&s&&e.preventDefault()},this._onDropdownTabActivate=e=>{const t=e.detail?.dataIndex,s=typeof t=="number"?t:typeof t=="string"?Number(t):this._readTabIndexFromEvent(e);if(s==null||!Number.isFinite(s))return;const a=this._getNavItems();s<0||s>=a.length||a[s]?.kind==="dropdown"&&(this.activeTab=s,this.dispatchEvent(new CustomEvent("tab-change",{detail:{index:s,href:""},bubbles:!0,composed:!0,cancelable:!0})))},this._onTabsKeydown=e=>{const t=e.key;if(t!=="ArrowLeft"&&t!=="ArrowRight"&&t!=="Home"&&t!=="End")return;const s=this._getNavItems();if(!s.length)return;const a=this._readTabIndexFromEvent(e);if(a==null)return;let o=Math.max(0,Math.min(s.length-1,a));t==="ArrowRight"?o=(o+1)%s.length:t==="ArrowLeft"?o=(o-1+s.length)%s.length:t==="Home"?o=0:t==="End"&&(o=s.length-1),e.preventDefault(),this._focusTabAtIndex(o)},this._onSearchInput=e=>{this.searchText=e.detail?.value??"",this.dispatchEvent(new CustomEvent("search-input",{detail:{value:this.searchText},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("search-text-change",{detail:{value:this.searchText},bubbles:!0,composed:!0}))},this._onSearchSubmit=e=>{this.searchText=e.detail?.value??"",this.dispatchEvent(new CustomEvent("search-change",{detail:{value:this.searchText,active:e.detail?.active},bubbles:!0,composed:!0}))},this._onSearchClear=()=>{this.searchText="",this.dispatchEvent(new CustomEvent("search-text-change",{detail:{value:""},bubbles:!0,composed:!0}))}}get _HYST(){return this._tokenPx("--spacing-11",64)}get BP_SM(){return this._tokenPx("--bp-sm",i.BP_SM_DEFAULT)}get BP_MD(){return this._tokenPx("--bp-md",i.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();const e=new MutationObserver(t=>{this._scheduleHarvest()});this._slotMo=e,e.observe(this,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["label","href","icon","target","selected","aria-current","active"]})}_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"))}_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}firstUpdated(){this.updateComplete.then(()=>{this._harvest(),this._attachSlotObservers()});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??"480px"),e.has("searchMin")&&this.style.setProperty("--scb-header-search-min",this.searchMin??"320px"),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("utilityItems")||e.has("tabs")||e.has("logoText")||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("showSearch")||e.has("searchMax")||e.has("searchMin")||e.has("size"))&&this.updateComplete.then(()=>{this._scheduleMeasure()}),(e.has("activeTab")||e.has("_slotNavItems")||e.has("tabs"))&&this.updateComplete.then(()=>{this._syncDropdownTabs()})}disconnectedCallback(){this._ro?.disconnect(),this._slotMo?.disconnect(),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")}_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")}_openDrawerNow(){const e=this.renderRoot.querySelector(`#${this._drawerId}`);e&&(e.open=!0,e.setAttribute("open",""),e.show?.(),e.openDrawer?.(),this._menuExpanded=!0,this._syncMenuBtnAria(),this.dispatchEvent(new CustomEvent("drawer-open",{bubbles:!0,composed:!0})))}_closeDrawerNow(){const e=this.renderRoot.querySelector(`#${this._drawerId}`);e&&(e.open=!1),this._menuExpanded=!1,this._syncMenuBtnAria(),this.dispatchEvent(new CustomEvent("drawer-close",{bubbles:!0,composed:!0}))}_syncMenuBtnAria(){const e=this.renderRoot.querySelector(".menu-trigger");e&&e.setAttribute("aria-expanded",String(this._menuExpanded))}_getNavItems(){return this._slotNavItems.length?this._slotNavItems:(this.tabs??[]).map(e=>({kind:"tab",...e}))}_syncDropdownTabs(){this._getNavItems().forEach((t,s)=>{if(t.kind!=="dropdown")return;const a=this.querySelector(`scb-dropdown[slot="${t.slotName}"]`);if(!a)return;const o=String(s);a.getAttribute("data-index")!==o&&a.setAttribute("data-index",o),a.hasAttribute("as-tab")||a.setAttribute("as-tab",""),s===this.activeTab?a.getAttribute("aria-current")!=="page"&&a.setAttribute("aria-current","page"):a.hasAttribute("aria-current")&&a.removeAttribute("aria-current")})}_readTabIndexFromEvent(e){const t=e.composedPath?e.composedPath():[];for(const s of t){if(!(s instanceof HTMLElement))continue;const a=s.getAttribute("data-index");if(a==null)continue;const o=Number(a);if(Number.isFinite(o))return o}return null}_focusTabAtIndex(e){const s=this._getNavItems()[e];if(!s)return;if(s.kind==="dropdown"){this.querySelector(`scb-dropdown[slot="${s.slotName}"]`)?.focus?.();return}this.renderRoot.querySelector(`.tab-link[data-index="${e}"]`)?.focus?.()}_renderMenuNodes(e){return!e||e.length===0?u``:u`${e.map(t=>{const s=Array.isArray(t.children)&&t.children.length>0;return u`
47
47
  <scb-menu-item
48
48
  label=${t.label}
49
49
  ?selected=${!1}
50
50
  leading-icon=${t.icon??""}
51
51
  item-href=${t.href??""}
52
52
  >
53
- ${s?b`
53
+ ${s?u`
54
54
  <scb-sub-menu label=${t.label}>
55
- ${t.children.map(i=>b`
55
+ ${t.children.map(a=>u`
56
56
  <scb-menu-item
57
- label=${i.label}
58
- item-href=${i.href??""}
59
- leading-icon=${i.icon??""}
57
+ label=${a.label}
58
+ item-href=${a.href??""}
59
+ leading-icon=${a.icon??""}
60
60
  ></scb-menu-item>
61
61
  `)}
62
62
  </scb-sub-menu>
63
63
  `:m}
64
64
  </scb-menu-item>
65
- `})}`}_syncFlags(e,t){this.toggleAttribute("data-no-utility",e),this.toggleAttribute("data-no-search",t)}render(){const e=this._getNavItems(),t=this._slotUtils.length?this._slotUtils:this.utilityItems,s=this._slotMenu.length?this._slotMenu:this.menuData??[];this._syncFlags(t.length===0,!this.showSearch);const i=this.searchHeight&&this.searchHeight.trim()?`--scb-search-height:${this.searchHeight.trim()}`:m,o=e.length>0;return b`
65
+ `})}`}_syncFlags(e,t){this.toggleAttribute("data-no-utility",e),this.toggleAttribute("data-no-search",t)}render(){const e=this._getNavItems(),t=this._slotUtils.length?this._slotUtils:this.utilityItems,s=this._slotMenu.length?this._slotMenu:this.menuData??[];this._syncFlags(t.length===0,!this.showSearch);const a=this.searchHeight&&this.searchHeight.trim()?`--scb-search-height:${this.searchHeight.trim()}`:m,o=e.length>0||this.reserveTabs;return u`
66
66
  <slot
67
67
  id="data-slot"
68
68
  @slotchange=${()=>{this._harvest(),this._attachSlotObservers()}}
@@ -101,7 +101,7 @@ import{a as w,n as h,r as y,i as x,x as b,E as m,t as S}from"../../vendor/vendor
101
101
 
102
102
  <div class="actions">
103
103
  <nav class="utility" aria-label="Funktionslänkar">
104
- ${t.map(d=>b`
104
+ ${t.map(d=>u`
105
105
  <scb-link
106
106
  .href=${d.href}
107
107
  .target=${d.target??void 0}
@@ -110,12 +110,12 @@ import{a as w,n as h,r as y,i as x,x as b,E as m,t as S}from"../../vendor/vendor
110
110
  `)}
111
111
  </nav>
112
112
 
113
- ${this.showSearch?b`
114
- <div class="search" style=${i}>
113
+ ${this.showSearch?u`
114
+ <div class="search" style=${a}>
115
115
  <scb-search
116
116
  id=${this._searchId}
117
117
  size="compact"
118
- style=${i}
118
+ style=${a}
119
119
  .value=${this.searchText}
120
120
  .supportingText=${this.searchPlaceholder??""}
121
121
  @scb-search-input=${this._onSearchInput}
@@ -131,7 +131,7 @@ import{a as w,n as h,r as y,i as x,x as b,E as m,t as S}from"../../vendor/vendor
131
131
  `:m}
132
132
  </div>
133
133
 
134
- ${this.showDrawer?b`
134
+ ${this.showDrawer?u`
135
135
  <scb-icon-button
136
136
  class="menu-trigger"
137
137
  aria-label="Meny"
@@ -153,54 +153,60 @@ import{a as w,n as h,r as y,i as x,x as b,E as m,t as S}from"../../vendor/vendor
153
153
  col-span-medium="8"
154
154
  col-span-expanded="12"
155
155
  >
156
- ${o?b`
157
- <div class="tabs-inset">
158
- <nav
159
- class="tabs-nav"
160
- aria-label="Huvudnavigering"
161
- @keydown=${this._onTabsKeydown}
162
- @scb-dropdown-tab-activate=${this._onDropdownTabActivate}
163
- >
164
- ${e.map((d,a)=>d.kind==="dropdown"?b`
165
- <div class="tab-wrap">
166
- <slot name=${d.slotName}></slot>
167
- </div>
168
- `:d.href?b`
169
- <div class="tab-wrap">
170
- <a
171
- class="tab-link"
172
- href=${d.href}
173
- data-index=${a}
174
- aria-current=${a===this.activeTab?"page":m}
175
- @click=${this._onTabClick}
176
- >
177
- ${d.label}
178
- </a>
179
- <md-focus-ring></md-focus-ring>
180
- </div>
181
- `:b`
182
- <div class="tab-wrap">
183
- <button
184
- type="button"
185
- class="tab-link"
186
- data-index=${a}
187
- aria-current=${a===this.activeTab?"page":m}
188
- @click=${this._onTabClick}
189
- >
190
- ${d.label}
191
- </button>
192
- <md-focus-ring></md-focus-ring>
193
- </div>
194
- `)}
195
- </nav>
196
- </div>
197
- `:m}
156
+ ${o?e.length?u`
157
+ <div class="tabs-inset">
158
+ <nav
159
+ class="tabs-nav"
160
+ aria-label="Huvudnavigering"
161
+ @keydown=${this._onTabsKeydown}
162
+ @scb-dropdown-tab-activate=${this._onDropdownTabActivate}
163
+ >
164
+ ${e.map((d,r)=>d.kind==="dropdown"?u`
165
+ <div class="tab-wrap">
166
+ <slot name=${d.slotName}></slot>
167
+ </div>
168
+ `:d.href?u`
169
+ <div class="tab-wrap">
170
+ <a
171
+ class="tab-link"
172
+ href=${d.href}
173
+ data-index=${r}
174
+ aria-current=${r===this.activeTab?"page":m}
175
+ @click=${this._onTabClick}
176
+ >
177
+ ${d.label}
178
+ </a>
179
+ <md-focus-ring></md-focus-ring>
180
+ </div>
181
+ `:u`
182
+ <div class="tab-wrap">
183
+ <button
184
+ type="button"
185
+ class="tab-link"
186
+ data-index=${r}
187
+ aria-current=${r===this.activeTab?"page":m}
188
+ @click=${this._onTabClick}
189
+ >
190
+ ${d.label}
191
+ </button>
192
+ <md-focus-ring></md-focus-ring>
193
+ </div>
194
+ `)}
195
+ </nav>
196
+ </div>
197
+ `:u`
198
+ <div class="tabs-inset">
199
+ <div class="tabs-nav tabs-nav--skeleton" aria-hidden="true">
200
+ ${this._renderTabSkeletons()}
201
+ </div>
202
+ </div>
203
+ `:m}
198
204
  <div class="divider" role="presentation"></div>
199
205
  </scb-grid-item>
200
206
  </scb-grid>
201
207
  </div>
202
208
 
203
- ${this.showDrawer?b`
209
+ ${this.showDrawer?u`
204
210
  <scb-drawer
205
211
  id=${this._drawerId}
206
212
  floating
@@ -220,7 +226,7 @@ import{a as w,n as h,r as y,i as x,x as b,E as m,t as S}from"../../vendor/vendor
220
226
  ></scb-search>
221
227
  </div>
222
228
 
223
- ${this.menuSectionLabel?b`
229
+ ${this.menuSectionLabel?u`
224
230
  <scb-menu-section
225
231
  .label=${this.menuSectionLabel}
226
232
  ></scb-menu-section>
@@ -228,9 +234,9 @@ import{a as w,n as h,r as y,i as x,x as b,E as m,t as S}from"../../vendor/vendor
228
234
 
229
235
  ${this._renderMenuNodes(s)}
230
236
 
231
- ${this.includeUtilityInMenu&&(t?.length??0)>0?b`
237
+ ${this.includeUtilityInMenu&&(t?.length??0)>0?u`
232
238
  <scb-menu-section label=''></scb-menu-section>
233
- ${t.map(d=>b`
239
+ ${t.map(d=>u`
234
240
  <scb-menu-item
235
241
  label=${d.label}
236
242
  item-href=${d.href}
@@ -240,7 +246,7 @@ import{a as w,n as h,r as y,i as x,x as b,E as m,t as S}from"../../vendor/vendor
240
246
  </scb-menu>
241
247
  </scb-drawer>
242
248
  `:m}
243
- `}_renderLogo(){const e=(this.logoSrc??"").trim();return e?b`<img class="logo" src=${e} alt="" aria-hidden="true" />`:b`
249
+ `}_renderTabSkeletons(){const e=["96px","72px","88px","64px"],t=(this.reserveTabsWidths??"").split(/[\s,]+/).map(r=>r.trim()).filter(Boolean).map(r=>/^\d+(?:\.\d+)?$/.test(r)?`${r}px`:r),s=t.length>0?t:e,a=Number(this.reserveTabsCount),o=Number.isFinite(a)&&a>0?Math.floor(a):t.length>0?t.length:e.length,d=Array.from({length:o},(r,l)=>s[l%s.length]);return u`${d.map(r=>u`<scb-skeleton variant="rounded" width=${r} height="16px"></scb-skeleton>`)}`}_renderLogo(){const e=(this.logoSrc??"").trim();return e?u`<img class="logo" src=${e} alt="" aria-hidden="true" />`:u`
244
250
  <svg
245
251
  class="logo"
246
252
  viewBox="0 0 48 54"
@@ -274,7 +280,7 @@ import{a as w,n as h,r as y,i as x,x as b,E as m,t as S}from"../../vendor/vendor
274
280
  </clipPath>
275
281
  </defs>
276
282
  </svg>
277
- `}};r._JSON_ARRAY={fromAttribute:e=>{if(e==null||e==="")return[];try{const t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{return[]}},toAttribute:e=>e==null?null:JSON.stringify(e)};r.BP_SM_DEFAULT=600;r.BP_MD_DEFAULT=840;r.styles=w`
283
+ `}};i._JSON_ARRAY={fromAttribute:e=>{if(e==null||e==="")return[];try{const t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{return[]}},toAttribute:e=>e==null?null:JSON.stringify(e)};i.BP_SM_DEFAULT=600;i.BP_MD_DEFAULT=840;i.styles=x`
278
284
  :host {
279
285
  display: block;
280
286
  margin-block-start: var(--scb-header-spacing-block-start, 0);
@@ -287,6 +293,11 @@ import{a as w,n as h,r as y,i as x,x as b,E as m,t as S}from"../../vendor/vendor
287
293
  --scb-header-logo-w: var(--icon-size-large, 40px);
288
294
  --scb-header-logo-h: calc(var(--scb-header-logo-w) * 1.125);
289
295
 
296
+
297
+ --scb-header-logo-slot-w: var(--scb-header-logo-img-w, auto);
298
+ --scb-header-logo-slot-h: var(--scb-header-logo-img-h, var(--scb-header-logo-h));
299
+ --scb-header-logo-slot-aspect-ratio: var(--scb-header-logo-img-aspect-ratio, 48 / 54);
300
+
290
301
  --scb-header-logo-text-font-size: var(
291
302
  --md-sys-typescale-body-medium-size,
292
303
  1rem
@@ -415,17 +426,18 @@ import{a as w,n as h,r as y,i as x,x as b,E as m,t as S}from"../../vendor/vendor
415
426
  outline: none;
416
427
  }
417
428
  .logo-group svg {
418
- width: var(--scb-header-logo-w);
419
- height: var(--scb-header-logo-h);
429
+ width: var(--scb-header-logo-slot-w);
430
+ height: var(--scb-header-logo-slot-h);
431
+ aspect-ratio: var(--scb-header-logo-slot-aspect-ratio);
420
432
  display: block;
421
433
  color: var(--md-sys-color-on-surface);
422
- aspect-ratio: 48 / 54;
423
434
  }
424
435
 
425
436
 
426
437
  .logo-group img {
427
- width: auto;
428
- height: var(--scb-header-logo-img-h, var(--scb-header-logo-h));
438
+ width: var(--scb-header-logo-slot-w);
439
+ height: var(--scb-header-logo-slot-h);
440
+ aspect-ratio: var(--scb-header-logo-slot-aspect-ratio);
429
441
  display: block;
430
442
  object-fit: contain;
431
443
  }
@@ -573,6 +585,14 @@ import{a as w,n as h,r as y,i as x,x as b,E as m,t as S}from"../../vendor/vendor
573
585
  position: relative;
574
586
  }
575
587
 
588
+ .tabs-nav--skeleton {
589
+ align-items: center;
590
+ }
591
+
592
+ .tabs-nav--skeleton scb-skeleton {
593
+ flex: 0 0 auto;
594
+ }
595
+
576
596
  .tab-wrap {
577
597
  position: relative;
578
598
  display: inline-flex;
@@ -654,4 +674,4 @@ import{a as w,n as h,r as y,i as x,x as b,E as m,t as S}from"../../vendor/vendor
654
674
  :host([data-hide-logo-text]) .logo-text {
655
675
  display: none;
656
676
  }
657
- `;r._nextFrame=()=>new Promise(e=>requestAnimationFrame(()=>e()));n([h({type:String,attribute:"max-width"})],r.prototype,"maxWidth",2);n([h({type:String,reflect:!0})],r.prototype,"spacing",2);n([h({type:String,attribute:"spacing-top",reflect:!0})],r.prototype,"spacingTop",2);n([h({type:String,attribute:"spacing-bottom",reflect:!0})],r.prototype,"spacingBottom",2);n([h({type:String,reflect:!0,converter:T})],r.prototype,"size",2);n([h({type:String,attribute:"logo-text"})],r.prototype,"logoText",2);n([h({type:String,attribute:"logo-href"})],r.prototype,"logoHref",2);n([h({type:String,attribute:"logo-src"})],r.prototype,"logoSrc",2);n([h({type:String,attribute:"logo-height"})],r.prototype,"logoHeight",2);n([h({attribute:"logo-invert-dm",reflect:!0,converter:f})],r.prototype,"logoInvertDm",2);n([h({type:Boolean,reflect:!0})],r.prototype,"banner",2);n([h({type:String,attribute:"banner-label"})],r.prototype,"bannerLabel",2);n([h({attribute:"tabs",converter:r._JSON_ARRAY})],r.prototype,"tabs",2);n([h({type:Number,attribute:"active-tab"})],r.prototype,"activeTab",2);n([h({attribute:"utility-items",converter:r._JSON_ARRAY})],r.prototype,"utilityItems",2);n([h({type:String,attribute:"search-placeholder"})],r.prototype,"searchPlaceholder",2);n([h({type:String,attribute:"menu-label"})],r.prototype,"menuLabel",2);n([h({type:String,attribute:"menu-sub-label"})],r.prototype,"menuSubLabel",2);n([h({type:String,attribute:"menu-section-label"})],r.prototype,"menuSectionLabel",2);n([h({type:String,attribute:"menu-search-placeholder"})],r.prototype,"menuSearchPlaceholder",2);n([h({attribute:"menu-data",converter:r._JSON_ARRAY})],r.prototype,"menuData",2);n([h({attribute:"show-drawer",reflect:!0,converter:f})],r.prototype,"showDrawer",2);n([h({attribute:"show-search",reflect:!0,converter:f})],r.prototype,"showSearch",2);n([h({attribute:"include-utility-in-menu",reflect:!0,converter:f})],r.prototype,"includeUtilityInMenu",2);n([h({attribute:"drawer-overlay",reflect:!0,converter:f})],r.prototype,"drawerOverlay",2);n([h({type:String,attribute:"search-max"})],r.prototype,"searchMax",2);n([h({type:String,attribute:"search-min"})],r.prototype,"searchMin",2);n([h({type:String,attribute:"search-height"})],r.prototype,"searchHeight",2);n([h({type:String,attribute:"search-text",reflect:!0})],r.prototype,"searchText",2);n([y()],r.prototype,"_drawerId",2);n([y()],r.prototype,"_menuExpanded",2);n([y()],r.prototype,"_searchId",2);n([y()],r.prototype,"_slotNavItems",2);n([y()],r.prototype,"_slotUtils",2);n([y()],r.prototype,"_slotMenu",2);n([y()],r.prototype,"_collapsed",2);n([y()],r.prototype,"_hideLogoText",2);r=n([S("scb-header")],r);
677
+ `;i._nextFrame=()=>new Promise(e=>requestAnimationFrame(()=>e()));n([c({type:String,attribute:"max-width"})],i.prototype,"maxWidth",2);n([c({type:String,reflect:!0})],i.prototype,"spacing",2);n([c({type:String,attribute:"spacing-top",reflect:!0})],i.prototype,"spacingTop",2);n([c({type:String,attribute:"spacing-bottom",reflect:!0})],i.prototype,"spacingBottom",2);n([c({type:String,reflect:!0,converter:M})],i.prototype,"size",2);n([c({type:String,attribute:"logo-text"})],i.prototype,"logoText",2);n([c({type:String,attribute:"logo-href"})],i.prototype,"logoHref",2);n([c({type:String,attribute:"logo-src"})],i.prototype,"logoSrc",2);n([c({type:String,attribute:"logo-width"})],i.prototype,"logoWidth",2);n([c({type:String,attribute:"logo-height"})],i.prototype,"logoHeight",2);n([c({type:String,attribute:"logo-aspect-ratio"})],i.prototype,"logoAspectRatio",2);n([c({attribute:"logo-invert-dm",reflect:!0,converter:f})],i.prototype,"logoInvertDm",2);n([c({type:Boolean,reflect:!0})],i.prototype,"banner",2);n([c({type:String,attribute:"banner-label"})],i.prototype,"bannerLabel",2);n([c({attribute:"tabs",converter:i._JSON_ARRAY})],i.prototype,"tabs",2);n([c({type:Number,attribute:"active-tab"})],i.prototype,"activeTab",2);n([c({attribute:"reserve-tabs",reflect:!0,converter:$})],i.prototype,"reserveTabs",2);n([c({type:Number,attribute:"reserve-tabs-count"})],i.prototype,"reserveTabsCount",2);n([c({type:String,attribute:"reserve-tabs-widths"})],i.prototype,"reserveTabsWidths",2);n([c({attribute:"utility-items",converter:i._JSON_ARRAY})],i.prototype,"utilityItems",2);n([c({type:String,attribute:"search-placeholder"})],i.prototype,"searchPlaceholder",2);n([c({type:String,attribute:"menu-label"})],i.prototype,"menuLabel",2);n([c({type:String,attribute:"menu-sub-label"})],i.prototype,"menuSubLabel",2);n([c({type:String,attribute:"menu-section-label"})],i.prototype,"menuSectionLabel",2);n([c({type:String,attribute:"menu-search-placeholder"})],i.prototype,"menuSearchPlaceholder",2);n([c({attribute:"menu-data",converter:i._JSON_ARRAY})],i.prototype,"menuData",2);n([c({attribute:"show-drawer",reflect:!0,converter:f})],i.prototype,"showDrawer",2);n([c({attribute:"show-search",reflect:!0,converter:f})],i.prototype,"showSearch",2);n([c({attribute:"include-utility-in-menu",reflect:!0,converter:f})],i.prototype,"includeUtilityInMenu",2);n([c({attribute:"drawer-overlay",reflect:!0,converter:f})],i.prototype,"drawerOverlay",2);n([c({type:String,attribute:"search-max"})],i.prototype,"searchMax",2);n([c({type:String,attribute:"search-min"})],i.prototype,"searchMin",2);n([c({type:String,attribute:"search-height"})],i.prototype,"searchHeight",2);n([c({type:String,attribute:"search-text",reflect:!0})],i.prototype,"searchText",2);n([y()],i.prototype,"_drawerId",2);n([y()],i.prototype,"_menuExpanded",2);n([y()],i.prototype,"_searchId",2);n([y()],i.prototype,"_slotNavItems",2);n([y()],i.prototype,"_slotUtils",2);n([y()],i.prototype,"_slotMenu",2);n([y()],i.prototype,"_collapsed",2);n([y()],i.prototype,"_hideLogoText",2);i=n([k("scb-header")],i);
@@ -1,8 +1,8 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../../vendor/vendor-material.js","../../vendor/vendor.js","../scb-icon-button/scb-icon-button.js","../../vendor/preload-helper.js","../scb-tooltip/scb-tooltip.js","../scb-button/scb-button.js"])))=>i.map(i=>d[i]);
2
- import{_ as u}from"../../vendor/preload-helper.js";import{a as p,n as l,r as b,i as h,E as m,x as c,t as _}from"../../vendor/vendor.js";(function(){try{var e=typeof globalThis<"u"?globalThis:window;if(!e.__scb_ce_guard_installed__){e.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(i,s,o){try{customElements.get(i)||t(i,s,o)}catch(d){var r=String(d||"");if(r.indexOf("already been used")===-1&&r.indexOf("NotSupportedError")===-1)throw d}}}}catch{}})();var f=Object.defineProperty,g=Object.getOwnPropertyDescriptor,a=(e,t,i,s)=>{for(var o=s>1?void 0:s?g(t,i):t,r=e.length-1,d;r>=0;r--)(d=e[r])&&(o=(s?d(t,i,o):d(o))||o);return s&&o&&f(t,i,o),o};let n=class extends h{constructor(){super(...arguments),this.label="",this.selected=!1,this.leadingIcon="",this.itemHref="",this.hasSlotContent=!1,this.expanded=!1,this.__submenuId=`sub-${Math.random().toString(36).slice(2)}`,this.__focusId=`f-${Math.random().toString(36).slice(2)}`,this._toggleExpand=e=>{e&&e.stopPropagation(),this.hasSlotContent&&this.__setExpanded(!this.expanded)},this._onButtonClick=e=>{e.stopPropagation(),this._dispatchSelect(),this._toggleExpand()},this._onLinkClick=()=>{this._dispatchSelect()},this._onKeyDown=e=>{const t=Array.from(this.parentElement?.querySelectorAll("scb-menu-item")||[]),i=t.indexOf(this);switch(e.key){case"ArrowDown":{e.preventDefault(),(t[i+1]||t[0]).shadowRoot?.querySelector(".scb-menu-label-text")?.focus();break}case"ArrowUp":{e.preventDefault(),(t[i-1]||t[t.length-1]).shadowRoot?.querySelector(".scb-menu-label-text")?.focus();break}case"Home":{e.preventDefault(),t[0].shadowRoot?.querySelector(".scb-menu-label-text")?.focus();break}case"End":{e.preventDefault(),t[t.length-1].shadowRoot?.querySelector(".scb-menu-label-text")?.focus();break}}}}get __submenuEl(){return this.renderRoot.querySelector(`#${this.__submenuId}`)}async __ensureDepsLoaded(){n.__rippleLoaded||(await u(()=>import("../../vendor/vendor-material.js").then(e=>e.r),__vite__mapDeps([0,1]),import.meta.url),n.__rippleLoaded=!0),n.__focusRingLoaded||(await u(()=>import("../../vendor/vendor-material.js").then(e=>e.m),__vite__mapDeps([0,1]),import.meta.url),n.__focusRingLoaded=!0),this.leadingIcon&&!n.__iconLoaded&&(await u(()=>import("../../vendor/vendor-material.js").then(e=>e.i),__vite__mapDeps([0,1]),import.meta.url),n.__iconLoaded=!0),this.hasSlotContent&&!n.__iconButtonLoaded&&(await u(()=>import("../scb-icon-button/scb-icon-button.js"),__vite__mapDeps([2,3,1,4,5,0]),import.meta.url),n.__iconButtonLoaded=!0)}_onSlotChange(e){const i=e.target.assignedElements({flatten:!0});this.hasSlotContent=i.length>0&&i.every(s=>s.tagName==="SCB-SUB-MENU")}__setExpanded(e){this.hasSlotContent&&(this.expanded=e,this.dispatchEvent(new CustomEvent("scb-menu-expand",{bubbles:!0,composed:!0,detail:{item:this,expanded:e}})))}_dispatchSelect(){this.dispatchEvent(new CustomEvent("scb-menu-select",{bubbles:!0,composed:!0,detail:{item:this}}))}async firstUpdated(){const e=this.renderRoot.querySelector("slot");if(e){const t=e.assignedElements({flatten:!0});this.hasSlotContent=t.length>0&&t.every(i=>i.tagName==="SCB-SUB-MENU")}await this.__ensureDepsLoaded()}updated(e){e.has("leadingIcon")&&this.leadingIcon&&this.__ensureDepsLoaded(),e.has("hasSlotContent")&&this.hasSlotContent&&this.__ensureDepsLoaded(),e.has("expanded")&&this.__applyInert()}__applyInert(){const e=this.__submenuEl;e&&(this.expanded?(e.removeAttribute("inert"),e.setAttribute("aria-hidden","false")):(e.setAttribute("inert",""),e.setAttribute("aria-hidden","true")))}render(){const e=!!this.leadingIcon,t=!!this.itemHref,i=this.hasSlotContent;return c`
2
+ import{_ as u}from"../../vendor/preload-helper.js";import{a as p,n as l,r as b,i as h,E as m,x as d,t as _}from"../../vendor/vendor.js";(function(){try{var e=typeof globalThis<"u"?globalThis:window;if(!e.__scb_ce_guard_installed__){e.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(i,s,o){try{customElements.get(i)||t(i,s,o)}catch(c){var r=String(c||"");if(r.indexOf("already been used")===-1&&r.indexOf("NotSupportedError")===-1)throw c}}}}catch{}})();var f=Object.defineProperty,g=Object.getOwnPropertyDescriptor,a=(e,t,i,s)=>{for(var o=s>1?void 0:s?g(t,i):t,r=e.length-1,c;r>=0;r--)(c=e[r])&&(o=(s?c(t,i,o):c(o))||o);return s&&o&&f(t,i,o),o};let n=class extends h{constructor(){super(...arguments),this.label="",this.selected=!1,this.leadingIcon="",this.itemHref="",this.hasSlotContent=!1,this.expanded=!1,this.__submenuId=`sub-${Math.random().toString(36).slice(2)}`,this.__focusId=`f-${Math.random().toString(36).slice(2)}`,this._toggleExpand=e=>{e&&e.stopPropagation(),this.hasSlotContent&&this.__setExpanded(!this.expanded)},this._onButtonClick=e=>{e.stopPropagation(),this._dispatchSelect(),this._toggleExpand()},this._onLinkClick=()=>{this._dispatchSelect()},this._onKeyDown=e=>{const t=Array.from(this.parentElement?.querySelectorAll("scb-menu-item")||[]),i=t.indexOf(this);switch(e.key){case"ArrowDown":{e.preventDefault(),(t[i+1]||t[0]).shadowRoot?.querySelector(".scb-menu-label-text")?.focus();break}case"ArrowUp":{e.preventDefault(),(t[i-1]||t[t.length-1]).shadowRoot?.querySelector(".scb-menu-label-text")?.focus();break}case"Home":{e.preventDefault(),t[0].shadowRoot?.querySelector(".scb-menu-label-text")?.focus();break}case"End":{e.preventDefault(),t[t.length-1].shadowRoot?.querySelector(".scb-menu-label-text")?.focus();break}}}}get __submenuEl(){return this.renderRoot.querySelector(`#${this.__submenuId}`)}async __ensureDepsLoaded(){n.__rippleLoaded||(await u(()=>import("../../vendor/vendor-material.js").then(e=>e.r),__vite__mapDeps([0,1]),import.meta.url),n.__rippleLoaded=!0),n.__focusRingLoaded||(await u(()=>import("../../vendor/vendor-material.js").then(e=>e.m),__vite__mapDeps([0,1]),import.meta.url),n.__focusRingLoaded=!0),this.leadingIcon&&!n.__iconLoaded&&(await u(()=>import("../../vendor/vendor-material.js").then(e=>e.i),__vite__mapDeps([0,1]),import.meta.url),n.__iconLoaded=!0),this.hasSlotContent&&!n.__iconButtonLoaded&&(await u(()=>import("../scb-icon-button/scb-icon-button.js"),__vite__mapDeps([2,3,1,4,5,0]),import.meta.url),n.__iconButtonLoaded=!0)}__syncHasSlotContentFromLightDom(){const e=Array.from(this.children);this.hasSlotContent=e.length>0&&e.every(t=>t.tagName==="SCB-SUB-MENU")}connectedCallback(){super.connectedCallback(),this.__syncHasSlotContentFromLightDom()}_onSlotChange(e){const i=e.target.assignedElements({flatten:!0});this.hasSlotContent=i.length>0&&i.every(s=>s.tagName==="SCB-SUB-MENU")}__setExpanded(e){this.hasSlotContent&&(this.expanded=e,this.dispatchEvent(new CustomEvent("scb-menu-expand",{bubbles:!0,composed:!0,detail:{item:this,expanded:e}})))}_dispatchSelect(){this.dispatchEvent(new CustomEvent("scb-menu-select",{bubbles:!0,composed:!0,detail:{item:this}}))}async firstUpdated(){await this.__ensureDepsLoaded()}updated(e){e.has("leadingIcon")&&this.leadingIcon&&this.__ensureDepsLoaded(),e.has("hasSlotContent")&&this.hasSlotContent&&this.__ensureDepsLoaded(),e.has("expanded")&&this.__applyInert()}__applyInert(){const e=this.__submenuEl;e&&(this.expanded?(e.removeAttribute("inert"),e.setAttribute("aria-hidden","false")):(e.setAttribute("inert",""),e.setAttribute("aria-hidden","true")))}render(){const e=!!this.leadingIcon,t=!!this.itemHref,i=this.hasSlotContent;return d`
3
3
  <div class="scb-menu-item">
4
4
  <div class="scb-menu-item-label" ?selected=${this.selected}>
5
- ${t?c`
5
+ ${t?d`
6
6
  <a
7
7
  id=${this.__focusId}
8
8
  class="scb-menu-label-text"
@@ -14,12 +14,12 @@ import{_ as u}from"../../vendor/preload-helper.js";import{a as p,n as l,r as b,i
14
14
  >
15
15
  <span class="scb-menu-click ${e?"has-icon":""}">
16
16
  <md-ripple></md-ripple>
17
- ${e?c`<md-icon>${this.leadingIcon}</md-icon>`:""}
17
+ ${e?d`<md-icon>${this.leadingIcon}</md-icon>`:""}
18
18
  ${this.label}
19
19
  </span>
20
20
  </a>
21
21
  <md-focus-ring for=${this.__focusId} inward></md-focus-ring>
22
- `:c`
22
+ `:d`
23
23
  <button
24
24
  id=${this.__focusId}
25
25
  type="button"
@@ -31,13 +31,13 @@ import{_ as u}from"../../vendor/preload-helper.js";import{a as p,n as l,r as b,i
31
31
  >
32
32
  <span class="scb-menu-click ${e?"has-icon":""}">
33
33
  <md-ripple></md-ripple>
34
- ${e?c`<md-icon>${this.leadingIcon}</md-icon>`:""}
34
+ ${e?d`<md-icon>${this.leadingIcon}</md-icon>`:""}
35
35
  ${this.label}
36
36
  </span>
37
37
  </button>
38
38
  <md-focus-ring for=${this.__focusId} inward></md-focus-ring>
39
39
  `}
40
- ${i?c`
40
+ ${i?d`
41
41
  <scb-icon-button
42
42
  class="menu-chevron"
43
43
  icon="keyboard_arrow_down"
@@ -39,7 +39,6 @@ import{a as p,n as l,i as h,x as c,t as u}from"../../vendor/vendor.js";import"..
39
39
  .wrap {
40
40
  display: inline-flex;
41
41
  align-items: center;
42
- padding: var(--spacing-2, 4px);
43
42
  gap: var(--spacing-5, 16px);
44
43
  cursor: pointer;
45
44
  overflow: visible;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scb-wc-test",
3
- "version": "0.1.172",
3
+ "version": "0.1.174",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -373,5 +373,5 @@
373
373
  },
374
374
  "./mvc/*": "./mvc/*"
375
375
  },
376
- "buildHash": "FD47BE08B5EC8F7F84AA6B97E2B5F42E5295E9DE67BA5593C907A1B80DD1BF32"
376
+ "buildHash": "40AA5D936FB88FB263ADC417E7EDEBCFBCCFD1586D1C961761075340FD3A8CCB"
377
377
  }
@@ -130,7 +130,6 @@ r.styles = _`
130
130
  gap: var(--spacing-5, 16px);
131
131
  cursor: pointer;
132
132
  overflow: visible;
133
- padding: var(--spacing-2, 4px);
134
133
  }
135
134
 
136
135
  :host([disabled]) .wrap {