@ni/nimble-components 24.1.3 → 24.1.5

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.
@@ -3343,7 +3343,7 @@ break
3343
3343
  case la:case da:this.open&&this.valueUpdatedByInput&&(this.valueUpdatedByInput=!1)
3344
3344
  break
3345
3345
  default:return e}return e}focusoutHandler(t){const e=super.focusoutHandler(t)
3346
- return this.open=!1,this.emitChangeIfValueUpdated(),e}registerOption(t){this.options.includes(t)||this.options.push(t)}focusAndScrollOptionIntoView(){this.open&&super.focusAndScrollOptionIntoView()}openChanged(){super.openChanged(),this.dropdownButton&&(this.dropdownButton.checked=this.open)}regionChanged(t,e){this.region&&this.controlWrapper&&(this.region.anchorElement=this.controlWrapper)}controlWrapperChanged(t,e){this.region&&this.controlWrapper&&(this.region.anchorElement=this.controlWrapper)}ariaLabelChanged(t,e){this.updateInputAriaLabel()}maxHeightChanged(){this.updateListboxMaxHeightCssVariable()}updateListboxMaxHeightCssVariable(){this.listbox&&this.listbox.style.setProperty("--ni-private-select-max-height",`${this.maxHeight}px`)}updateInputAriaLabel(){const t=this.shadowRoot?.querySelector(".selected-value")
3346
+ return this.open=!1,this.emitChangeIfValueUpdated(),e}focusAndScrollOptionIntoView(){this.open&&super.focusAndScrollOptionIntoView()}openChanged(){super.openChanged(),this.dropdownButton&&(this.dropdownButton.checked=this.open)}regionChanged(t,e){this.region&&this.controlWrapper&&(this.region.anchorElement=this.controlWrapper)}controlWrapperChanged(t,e){this.region&&this.controlWrapper&&(this.region.anchorElement=this.controlWrapper)}ariaLabelChanged(t,e){this.updateInputAriaLabel()}maxHeightChanged(){this.updateListboxMaxHeightCssVariable()}updateListboxMaxHeightCssVariable(){this.listbox&&this.listbox.style.setProperty("--ni-private-select-max-height",`${this.maxHeight}px`)}updateInputAriaLabel(){const t=this.shadowRoot?.querySelector(".selected-value")
3347
3347
  this.ariaLabel?t?.setAttribute("aria-label",this.ariaLabel):t?.removeAttribute("aria-label")}emitChangeIfValueUpdated(){this.valueUpdatedByInput&&(this.value!==this.valueBeforeTextUpdate&&this.$emit("change"),this.valueUpdatedByInput=!1)}}t([st],cg.prototype,"appearance",void 0),t([g],cg.prototype,"dropdownButton",void 0),t([st({attribute:"error-text"})],cg.prototype,"errorText",void 0),t([st({attribute:"error-visible",mode:"boolean"})],cg.prototype,"errorVisible",void 0),t([g],cg.prototype,"region",void 0),t([g],cg.prototype,"controlWrapper",void 0),t([g],cg.prototype,"hasOverflow",void 0)
3348
3348
  const dg=cg.compose({baseName:"combobox",baseClass:Zn,template:(t,e)=>Z`
3349
3349
  <template
@@ -3729,7 +3729,7 @@ const gg=yt`
3729
3729
  class yg extends Le{constructor(){super(...arguments),this.location=bg,this.preventDismiss=!1,this.closing=!1,this.animationEndHandlerFunction=()=>this.animationEndHandler()}get open(){return void 0!==this.resolveShow}async show(){if(this.open)throw new Error("Drawer is already open")
3730
3730
  return this.openDialog(),new Promise(((t,e)=>{this.resolveShow=t}))}close(t){if(!this.open||this.closing)throw new Error("Drawer is not open or already closing")
3731
3731
  this.closeReason=t,this.closeDialog()}cancelHandler(t){return t.preventDefault(),this.preventDismiss||(this.closeReason=hg,this.closeDialog()),!0}closeHandler(t){t.target===this.dialog&&this.resolveShow&&this.doResolveShow(hg)}doResolveShow(t){if(!this.resolveShow)throw new Error("Do not call doResolveShow unless there is a promise to resolve")
3732
- this.resolveShow(t),this.resolveShow=void 0}openDialog(){this.dialog.showModal(),this.triggerAnimation()}closeDialog(){this.closing=!0,this.triggerAnimation()}triggerAnimation(){this.dialog.classList.add("animating"),this.closing&&this.dialog.classList.add("closing"),this.dialog.addEventListener(sa,this.animationEndHandlerFunction)}animationEndHandler(){this.dialog.removeEventListener(sa,this.animationEndHandlerFunction),this.dialog.classList.remove("animating"),this.closing&&(this.dialog.classList.remove("closing"),this.dialog.close(),this.closing=!1,this.doResolveShow(this.closeReason))}}yg.UserDismissed=hg,t([st],yg.prototype,"location",void 0),t([st({attribute:"prevent-dismiss",mode:"boolean"})],yg.prototype,"preventDismiss",void 0),He(yg,un)
3732
+ this.resolveShow(t),this.resolveShow=void 0}openDialog(){this.dialog.showModal(),this.triggerAnimation()}closeDialog(){this.closing=!0,this.triggerAnimation()}triggerAnimation(){this.dialog.offsetHeight,this.dialog.classList.add("animating"),this.closing&&this.dialog.classList.add("closing"),this.dialog.addEventListener(sa,this.animationEndHandlerFunction)}animationEndHandler(){this.dialog.removeEventListener(sa,this.animationEndHandlerFunction),this.dialog.classList.remove("animating"),this.closing&&(this.dialog.classList.remove("closing"),this.dialog.close(),this.closing=!1,this.doResolveShow(this.closeReason))}}yg.UserDismissed=hg,t([st],yg.prototype,"location",void 0),t([st({attribute:"prevent-dismiss",mode:"boolean"})],yg.prototype,"preventDismiss",void 0),He(yg,un)
3733
3733
  const wg=yg.compose({baseName:"drawer",template:vg,styles:gg})
3734
3734
  bi.getOrCreate().withPrefix("nimble").register(wg())
3735
3735
  lm("icon-add",class extends am{constructor(){super(Fh)}})