@momentum-design/components 0.130.6 → 0.130.7

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.
@@ -3849,7 +3849,7 @@
3849
3849
  scroll-padding-left: 0.25rem;
3850
3850
  scroll-padding-right: 0.25rem;
3851
3851
  }
3852
- `,eg=[dA];var rg=V.constructTagName("list");var aa={VERTICAL:"vertical",HORIZONTAL:"horizontal"},gd={LOOP:"true",INITIAL_FOCUS:0,ORIENTATION:aa.VERTICAL};var Qo=class extends Ws(eo(X)){constructor(){super();this.loop=gd.LOOP;this.initialFocus=gd.INITIAL_FOCUS;this.orientation=gd.ORIENTATION;this.focusWithin=!1;this.handleModifiedEvent=t=>{let r=t.target;switch(t.detail.change){case"enabled":this.itemsStore.add(r);break;case"disabled":this.itemsStore.delete(r);break;default:break}};this.addEventListener(Ht.MODIFIED,this.handleModifiedEvent),this.addEventListener("focusin",this.handleFocusEvent),this.addEventListener("focusout",this.handleFocusEvent),this.itemsStore=new Zr(this,{isValidItem:this.isValidItem,onStoreUpdate:this.onElementStoreUpdate.bind(this)})}connectedCallback(){super.connectedCallback(),this.role=J.LIST}get navItems(){return this.itemsStore.items}onElementStoreUpdate(t,r,s){if(r==="added")t.tabIndex=-1;else if(r==="removed"&&t.tabIndex===0){let d=s+1;d>=this.navItems.length&&(d=s-1),this.resetTabIndexes(d,this.focusWithin)}}handleFocusEvent(t){t.type==="focusout"&&t.relatedTarget===null||(this.focusWithin=t.type==="focusin")}isValidItem(t){return t.matches(`${vd}:not([disabled])`)}render(){return C`
3852
+ `,eg=[dA];var rg=V.constructTagName("list");var aa={VERTICAL:"vertical",HORIZONTAL:"horizontal"},gd={LOOP:"true",INITIAL_FOCUS:0,ORIENTATION:aa.VERTICAL};var Qo=class extends Ws(eo(X)){constructor(){super();this.loop=gd.LOOP;this.initialFocus=gd.INITIAL_FOCUS;this.orientation=gd.ORIENTATION;this.focusWithin=!1;this.handleModifiedEvent=t=>{let r=t.target;switch(t.detail.change){case"enabled":this.itemsStore.add(r);break;case"disabled":this.itemsStore.delete(r);break;default:break}};this.addEventListener(Ht.MODIFIED,this.handleModifiedEvent),this.addEventListener("focusin",this.handleFocusEvent),this.addEventListener("focusout",this.handleFocusEvent),this.itemsStore=new Zr(this,{isValidItem:this.isValidItem,onStoreUpdate:this.onElementStoreUpdate.bind(this)})}connectedCallback(){super.connectedCallback(),this.role=J.LIST}get navItems(){return this.itemsStore.items}onElementStoreUpdate(t,r,s){if(r==="added")t.tabIndex=-1,this.navItems.length===0&&(t.tabIndex=0);else if(r==="removed"&&t.tabIndex===0){let d=s+1;d>=this.navItems.length&&(d=s-1),this.resetTabIndexes(d,this.focusWithin)}}handleFocusEvent(t){t.type==="focusout"&&t.relatedTarget===null||(this.focusWithin=t.type==="focusin")}isValidItem(t){return t.matches(`${vd}:not([disabled])`)}render(){return C`
3853
3853
  <slot name="list-header"></slot>
3854
3854
  <!-- make the container slot role presentation to keep it ignored in a11y tree -->
3855
3855
  <slot part="container" role="presentation"></slot>