@ni/nimble-components 24.1.3 → 24.1.4
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.
- package/dist/all-components-bundle.js +7 -1
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +1 -1
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/drawer/index.js +6 -0
- package/dist/esm/drawer/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -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)}})
|