@momentum-design/components 0.102.9 → 0.102.10

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.
@@ -2187,7 +2187,7 @@
2187
2187
  background: transparent;
2188
2188
  z-index: ${this.popover.zIndex-1};
2189
2189
  }
2190
- `,t.appendChild(o),(i=this.popover.parentElement)==null||i.appendChild(t),this.popover.backdropElement=t}}removeBackdrop(){this.popover.backdropElement&&(this.popover.backdropElement.remove(),this.popover.backdropElement=null)}};var _t=class _t extends sl(ol(j)){constructor(){super();this.id="";this.triggerID="";this.trigger=Lt.TRIGGER;this.placement=Lt.PLACEMENT;this.color=Lt.COLOR;this.visible=Lt.VISIBLE;this.offset=Lt.OFFSET;this.boundary=Lt.BOUNDARY;this.boundaryRoot=Lt.BOUNDARY_ROOT;this.focusTrap=Lt.FOCUS_TRAP;this.preventScroll=Lt.PREVENT_SCROLL;this.showArrow=Lt.ARROW;this.closeButton=Lt.CLOSE_BUTTON;this.interactive=Lt.INTERACTIVE;this.delay=Lt.DELAY;this.hideOnEscape=Lt.HIDE_ON_ESCAPE;this.propagateEventOnEscape=Lt.PROPAGATE_EVENT_ON_ESCAPE;this.hideOnBlur=Lt.HIDE_ON_BLUR;this.hideOnOutsideClick=Lt.HIDE_ON_CLICK_OUTSIDE;this.focusBackToTrigger=Lt.FOCUS_BACK;this.backdrop=Lt.BACKDROP;this.flip=Lt.FLIP;this.size=Lt.SIZE;this.zIndex=Lt.Z_INDEX;this.closeButtonAriaLabel=null;this.role=Lt.ROLE;this.ariaLabelledby=null;this.ariaDescribedby=null;this.disableAriaExpanded=Lt.DISABLE_ARIA_EXPANDED;this.disableAriaHasPopup=Lt.DISABLE_ARIA_HAS_POPUP;this.keepConnectedTooltipClosed=Lt.KEEP_CONNECTED_TOOLTIP_CLOSED;this.arrowElement=null;this.triggerElement=null;this.triggerElementOriginalStyle={zIndex:"",position:""};this.hoverTimer=null;this.isHovered=!1;this.openDelay=0;this.closeDelay=0;this.floatingUICleanupFunction=null;this.shouldSupressOpening=!1;this.backdropElement=null;this.connectedTooltip=null;this.storeConnectedTooltip=()=>{let t=this.getRootNode().querySelectorAll(`mdc-tooltip[triggerID="${this.triggerID}"]`);for(let o of t)if(o!==this){this.connectedTooltip=o;return}this.connectedTooltip=null};this.cleanupTrigger=()=>{var h;let a=(((h=this.trigger)==null?void 0:h.split(" "))||[]).filter(m=>Object.values(oo).includes(m)).length>0?this.trigger:Lt.TRIGGER;a==="mouseenter"&&(this.interactive?a="mouseenter click":a="mouseenter focusin"),this.trigger=a};this.setupTriggerListeners=()=>{if(this.triggerElement){if(this.trigger.includes("click")&&this.triggerElement.addEventListener("click",this.togglePopoverVisible),this.trigger.includes("mouseenter")){let t=this.renderRoot.querySelector(".popover-hover-bridge");t==null||t.addEventListener("mouseenter",this.show),this.triggerElement.addEventListener("mouseenter",this.handleMouseEnter),this.triggerElement.addEventListener("mouseleave",this.handleMouseLeave),this.addEventListener("mouseenter",this.cancelCloseDelay),this.addEventListener("mouseleave",this.startCloseDelay)}this.trigger.includes("focusin")&&(this.triggerElement.addEventListener("focusin",this.show),this.interactive||this.triggerElement.addEventListener("focusout",this.handleFocusOut))}};this.removeTriggerListeners=()=>{var o,a,h,m,T;(o=this.triggerElement)==null||o.removeEventListener("click",this.togglePopoverVisible);let t=this.renderRoot.querySelector(".popover-hover-bridge");t==null||t.removeEventListener("mouseenter",this.show),(a=this.triggerElement)==null||a.removeEventListener("mouseenter",this.handleMouseEnter),(h=this.triggerElement)==null||h.removeEventListener("mouseleave",this.handleMouseLeave),this.removeEventListener("mouseenter",this.cancelCloseDelay),this.removeEventListener("mouseleave",this.startCloseDelay),(m=this.triggerElement)==null||m.removeEventListener("focusin",this.show),(T=this.triggerElement)==null||T.removeEventListener("focusout",this.handleFocusOut)};this.removeAllListeners=()=>{var t;this.removeTriggerListeners(),this.hideOnOutsideClick&&document.removeEventListener("click",this.onOutsidePopoverClick),this.hideOnEscape&&(this.removeEventListener("keydown",this.onEscapeKeydown),(t=this.triggerElement)==null||t.removeEventListener("keydown",this.onEscapeKeydown)),this.hideOnBlur&&this.removeEventListener("focusout",this.onPopoverFocusOut)};this.onOutsidePopoverClick=t=>{if(ye.peek()!==this)return;let o=t.composedPath(),a=this.contains(t.target)||o.includes(this.triggerElement)||o.includes(this),h=this.backdropElement?o.includes(this.backdropElement):!1;(!a||h)&&(this.hide(),Jr.onClickOutside(this))};this.onEscapeKeydown=t=>{!this.visible||t.code!=="Escape"||(this.propagateEventOnEscape||t.stopPropagation(),t.preventDefault(),this.hide(),Jr.onEscapeKeyPressed(this))};this.onPopoverFocusOut=t=>{this.contains(t.relatedTarget)||this.hide()};this.handleMouseEnter=()=>{this.isHovered=!0,this.show()};this.handleMouseLeave=()=>{this.isHovered=!1,this.startCloseDelay()};this.handleFocusOut=()=>{this.isHovered||this.hide()};this.startCloseDelay=()=>{this.interactive?this.hoverTimer=window.setTimeout(()=>{this.visible=!1},this.closeDelay):this.hide()};this.cancelCloseDelay=()=>{this.hoverTimer&&(window.clearTimeout(this.hoverTimer),this.hoverTimer=null)};this.show=()=>{this.visible||this.shouldSupressOpening||(this.cancelCloseDelay(),this.openDelay>0?setTimeout(()=>{this.visible=!0},this.openDelay):this.visible=!0)};this.hide=()=>{this.closeDelay?setTimeout(()=>{this.visible=!1},this.closeDelay):this.visible=!1};this.togglePopoverVisible=()=>{this.visible?this.hide():this.show()};this.positionPopover=()=>{if(!this.triggerElement)return;let t=[du({boundary:!this.boundary||this.boundary==="clippingAncestors"?"clippingAncestors":Array.from(document.querySelectorAll(this.boundary)),rootBoundary:this.boundaryRoot,padding:this.boundaryPadding})],o=this.offset;if(this.flip&&t.push(hu()),this.size){let a=m=>{this.style.setProperty("--mdc-popover-internal-available-height",`${m}px`)},h=this.renderRoot.querySelector('[part="popover-content"]');t.push(pu({apply({availableHeight:m}){h&&(Object.assign(h.style,{maxHeight:`${m}px`,overflowY:"auto"}),a(m))},padding:50}))}if(this.showArrow&&(this.arrowElement=this.renderRoot.querySelector(".popover-arrow"),this.arrowElement)){let a=this.arrowElement.offsetHeight,h=Math.sqrt(2*a**2)/2;o+=h,t.push(mu({element:this.arrowElement,padding:12}))}t.push(cu(o)),this.floatingUICleanupFunction=lu(this.triggerElement,this,async()=>{if(!this.triggerElement)return;let{x:a,y:h,middlewareData:m,placement:T}=await uu(this.triggerElement,this,{placement:this.placement,middleware:t});this.utils.updatePopoverStyle(a,h),m.arrow&&this.arrowElement&&this.utils.updateArrowStyle(m.arrow,T),this.trigger.includes("mouseenter")&&this.interactive&&this.utils.setupHoverBridge(T)})};this.findClosestPopover=t=>{let o=t;for(;o&&!(o instanceof _t);)o=o.parentElement;return o};this.utils=new al(this)}setupTriggerRelatedElement(){this.triggerElement=this.getRootNode().querySelector(`[id="${this.triggerID}"]`),this.storeConnectedTooltip()}async firstUpdated(t){super.firstUpdated(t),this.utils.setupAppendTo(),[this.openDelay,this.closeDelay]=this.utils.setupDelay(),this.setupTriggerRelatedElement(),this.cleanupTrigger(),this.setupTriggerListeners(),this.style.zIndex=`${this.zIndex}`,Jr.onCreatedPopover(this)}async disconnectedCallback(){var t,o;super.disconnectedCallback(),this.removeAllListeners(),(t=this.deactivateFocusTrap)==null||t.call(this),this.deactivatePreventScroll(),this.utils.removeBackdrop(),(o=this.floatingUICleanupFunction)==null||o.call(this),this.cancelCloseDelay(),this.keepConnectedTooltipClosed&&this.connectedTooltip&&(this.connectedTooltip.shouldSupressOpening=!1),Jr.onDestroyedPopover(this),ye.remove(this)}async updated(t){if(super.updated(t),t.has("visible")){let o=t.get("visible")||!1;await this.isOpenUpdated(o,this.visible),this.utils.updateAriaExpandedAttribute()}t.has("trigger")&&(this.cleanupTrigger(),this.removeTriggerListeners(),this.setupTriggerListeners()),t.has("placement")&&this.setAttribute("placement",Object.values(Ut).includes(this.placement)?this.placement:Lt.PLACEMENT),t.has("delay")&&([this.openDelay,this.closeDelay]=this.utils.setupDelay()),t.has("color")&&this.setAttribute("color",Object.values(so).includes(this.color)?this.color:Lt.COLOR),t.has("zIndex")&&this.setAttribute("z-index",`${this.zIndex}`),t.has("append-to")&&this.utils.setupAppendTo(),(t.has("interactive")||t.has("aria-label")||t.has("aria-labelledby"))&&this.utils.updateAriaLabels(),t.has("role")&&(this.role===""&&(this.role=null),this.utils.updateAriaModal()),t.has("disableAriaExpanded")&&this.utils.updateAriaExpandedAttribute(),(t.has("interactive")||t.has("disableAriaHasPopup"))&&this.utils.updateAriaHasPopupAttribute(),t.has("focusTrap")&&!this.focusTrap&&this.visible&&this.deactivateFocusTrap(),t.has("preventScroll")&&(!this.preventScroll&&this.visible?this.deactivatePreventScroll():this.preventScroll&&this.visible&&this.activatePreventScroll())}async isOpenUpdated(t,o){var a,h,m,T,R;t===o||!this.triggerElement||(o&&!this.shouldSupressOpening?(ye.peek()!==this&&ye.push(this),this.keepConnectedTooltipClosed&&this.connectedTooltip&&(this.connectedTooltip.visible=!1,this.connectedTooltip.shouldSupressOpening=!0),this.backdrop&&(this.utils.createBackdrop(),this.triggerElementOriginalStyle={position:this.triggerElement.style.position,zIndex:this.triggerElement.style.zIndex},this.triggerElement.style.position="relative",this.triggerElement.style.zIndex=`${this.zIndex}`),this.positionPopover(),this.hideOnBlur&&(this.addEventListener("focusout",this.onPopoverFocusOut),this.trigger==="click"&&(this.triggerElement.style.pointerEvents="none")),this.hideOnEscape&&(this.addEventListener("keydown",this.onEscapeKeydown),(a=this.triggerElement)==null||a.addEventListener("keydown",this.onEscapeKeydown)),this.activatePreventScroll(),this.hideOnOutsideClick&&document.addEventListener("click",this.onOutsidePopoverClick),setTimeout(()=>{var $,q;this.interactive&&this.focusTrap&&(($=this.activateFocusTrap)==null||$.call(this),(q=this.setInitialFocus)==null||q.call(this))},0),Jr.onShowPopover(this)):(ye.peek()===this&&ye.pop(),(h=this.floatingUICleanupFunction)==null||h.call(this),this.backdrop&&(this.triggerElement.style.position=this.triggerElementOriginalStyle.position,this.triggerElement.style.zIndex=this.triggerElementOriginalStyle.zIndex,this.utils.removeBackdrop()),this.hideOnBlur&&(this.removeEventListener("focusout",this.onPopoverFocusOut),this.trigger==="click"&&(this.triggerElement.style.pointerEvents="")),this.hideOnOutsideClick&&document.removeEventListener("click",this.onOutsidePopoverClick),this.hideOnEscape&&(this.removeEventListener("keydown",this.onEscapeKeydown),(m=this.triggerElement)==null||m.removeEventListener("keydown",this.onEscapeKeydown)),this.disableAriaExpanded&&this.triggerElement.removeAttribute("aria-expanded"),this.interactive||this.triggerElement.removeAttribute("aria-haspopup"),this.deactivatePreventScroll(),(T=this.deactivateFocusTrap)==null||T.call(this),this.focusBackToTrigger&&((R=this.triggerElement)==null||R.focus()),this.keepConnectedTooltipClosed&&this.connectedTooltip&&(this.connectedTooltip.shouldSupressOpening=!1),Jr.onHidePopover(this)))}render(){return C`
2190
+ `,t.appendChild(o),(i=this.popover.parentElement)==null||i.appendChild(t),this.popover.backdropElement=t}}removeBackdrop(){this.popover.backdropElement&&(this.popover.backdropElement.remove(),this.popover.backdropElement=null)}};var _t=class _t extends sl(ol(j)){constructor(){super();this.id="";this.triggerID="";this.trigger=Lt.TRIGGER;this.placement=Lt.PLACEMENT;this.color=Lt.COLOR;this.visible=Lt.VISIBLE;this.offset=Lt.OFFSET;this.boundary=Lt.BOUNDARY;this.boundaryRoot=Lt.BOUNDARY_ROOT;this.focusTrap=Lt.FOCUS_TRAP;this.preventScroll=Lt.PREVENT_SCROLL;this.showArrow=Lt.ARROW;this.closeButton=Lt.CLOSE_BUTTON;this.interactive=Lt.INTERACTIVE;this.delay=Lt.DELAY;this.hideOnEscape=Lt.HIDE_ON_ESCAPE;this.propagateEventOnEscape=Lt.PROPAGATE_EVENT_ON_ESCAPE;this.hideOnBlur=Lt.HIDE_ON_BLUR;this.hideOnOutsideClick=Lt.HIDE_ON_CLICK_OUTSIDE;this.focusBackToTrigger=Lt.FOCUS_BACK;this.backdrop=Lt.BACKDROP;this.flip=Lt.FLIP;this.size=Lt.SIZE;this.zIndex=Lt.Z_INDEX;this.closeButtonAriaLabel=null;this.role=Lt.ROLE;this.ariaLabelledby=null;this.ariaDescribedby=null;this.disableAriaExpanded=Lt.DISABLE_ARIA_EXPANDED;this.disableAriaHasPopup=Lt.DISABLE_ARIA_HAS_POPUP;this.keepConnectedTooltipClosed=Lt.KEEP_CONNECTED_TOOLTIP_CLOSED;this.arrowElement=null;this.triggerElement=null;this.triggerElementOriginalStyle={zIndex:"",position:""};this.hoverTimer=null;this.isHovered=!1;this.openDelay=0;this.closeDelay=0;this.floatingUICleanupFunction=null;this.shouldSupressOpening=!1;this.backdropElement=null;this.connectedTooltip=null;this.storeConnectedTooltip=()=>{let t=this.getRootNode().querySelectorAll(`mdc-tooltip[triggerID="${this.triggerID}"]`);for(let o of t)if(o!==this){this.connectedTooltip=o;return}this.connectedTooltip=null};this.cleanupTrigger=()=>{var h;let a=(((h=this.trigger)==null?void 0:h.split(" "))||[]).filter(m=>Object.values(oo).includes(m)).length>0?this.trigger:Lt.TRIGGER;a==="mouseenter"&&(this.interactive?a="mouseenter click":a="mouseenter focusin"),this.trigger=a};this.setupTriggerListeners=()=>{if(this.triggerElement){if(this.trigger.includes("click")&&this.triggerElement.addEventListener("click",this.togglePopoverVisible),this.trigger.includes("mouseenter")){let t=this.renderRoot.querySelector(".popover-hover-bridge");t==null||t.addEventListener("mouseenter",this.show),this.triggerElement.addEventListener("mouseenter",this.handleMouseEnter),this.triggerElement.addEventListener("mouseleave",this.handleMouseLeave),this.addEventListener("mouseenter",this.cancelCloseDelay),this.addEventListener("mouseleave",this.startCloseDelay)}this.trigger.includes("focusin")&&(this.triggerElement.addEventListener("focusin",this.handleFocusIn),this.interactive||this.triggerElement.addEventListener("focusout",this.handleFocusOut))}};this.removeTriggerListeners=()=>{var o,a,h,m,T;(o=this.triggerElement)==null||o.removeEventListener("click",this.togglePopoverVisible);let t=this.renderRoot.querySelector(".popover-hover-bridge");t==null||t.removeEventListener("mouseenter",this.show),(a=this.triggerElement)==null||a.removeEventListener("mouseenter",this.handleMouseEnter),(h=this.triggerElement)==null||h.removeEventListener("mouseleave",this.handleMouseLeave),this.removeEventListener("mouseenter",this.cancelCloseDelay),this.removeEventListener("mouseleave",this.startCloseDelay),(m=this.triggerElement)==null||m.removeEventListener("focusin",this.handleFocusIn),(T=this.triggerElement)==null||T.removeEventListener("focusout",this.handleFocusOut)};this.removeAllListeners=()=>{var t;this.removeTriggerListeners(),this.hideOnOutsideClick&&document.removeEventListener("click",this.onOutsidePopoverClick),this.hideOnEscape&&(this.removeEventListener("keydown",this.onEscapeKeydown),(t=this.triggerElement)==null||t.removeEventListener("keydown",this.onEscapeKeydown)),this.hideOnBlur&&this.removeEventListener("focusout",this.onPopoverFocusOut)};this.onOutsidePopoverClick=t=>{if(ye.peek()!==this)return;let o=t.composedPath(),a=this.contains(t.target)||o.includes(this.triggerElement)||o.includes(this),h=this.backdropElement?o.includes(this.backdropElement):!1;(!a||h)&&(this.hide(),Jr.onClickOutside(this))};this.onEscapeKeydown=t=>{!this.visible||t.code!=="Escape"||(this.propagateEventOnEscape||t.stopPropagation(),t.preventDefault(),this.hide(),Jr.onEscapeKeyPressed(this))};this.onPopoverFocusOut=t=>{this.contains(t.relatedTarget)||this.hide()};this.handleMouseEnter=()=>{this.isHovered=!0,this.show()};this.handleMouseLeave=()=>{this.isHovered=!1,this.startCloseDelay()};this.handleFocusOut=()=>{this.isHovered||this.hide()};this.handleFocusIn=()=>{var t;((t=this.triggerElement)!=null&&t.matches(":focus-visible")||this.isHovered)&&this.show()};this.startCloseDelay=()=>{this.interactive?this.hoverTimer=window.setTimeout(()=>{this.visible=!1},this.closeDelay):this.hide()};this.cancelCloseDelay=()=>{this.hoverTimer&&(window.clearTimeout(this.hoverTimer),this.hoverTimer=null)};this.show=()=>{this.visible||this.shouldSupressOpening||(this.cancelCloseDelay(),this.openDelay>0?setTimeout(()=>{this.visible=!0},this.openDelay):this.visible=!0)};this.hide=()=>{this.closeDelay?setTimeout(()=>{this.visible=!1},this.closeDelay):this.visible=!1};this.togglePopoverVisible=()=>{this.visible?this.hide():this.show()};this.positionPopover=()=>{if(!this.triggerElement)return;let t=[du({boundary:!this.boundary||this.boundary==="clippingAncestors"?"clippingAncestors":Array.from(document.querySelectorAll(this.boundary)),rootBoundary:this.boundaryRoot,padding:this.boundaryPadding})],o=this.offset;if(this.flip&&t.push(hu()),this.size){let a=m=>{this.style.setProperty("--mdc-popover-internal-available-height",`${m}px`)},h=this.renderRoot.querySelector('[part="popover-content"]');t.push(pu({apply({availableHeight:m}){h&&(Object.assign(h.style,{maxHeight:`${m}px`,overflowY:"auto"}),a(m))},padding:50}))}if(this.showArrow&&(this.arrowElement=this.renderRoot.querySelector(".popover-arrow"),this.arrowElement)){let a=this.arrowElement.offsetHeight,h=Math.sqrt(2*a**2)/2;o+=h,t.push(mu({element:this.arrowElement,padding:12}))}t.push(cu(o)),this.floatingUICleanupFunction=lu(this.triggerElement,this,async()=>{if(!this.triggerElement)return;let{x:a,y:h,middlewareData:m,placement:T}=await uu(this.triggerElement,this,{placement:this.placement,middleware:t});this.utils.updatePopoverStyle(a,h),m.arrow&&this.arrowElement&&this.utils.updateArrowStyle(m.arrow,T),this.trigger.includes("mouseenter")&&this.interactive&&this.utils.setupHoverBridge(T)})};this.findClosestPopover=t=>{let o=t;for(;o&&!(o instanceof _t);)o=o.parentElement;return o};this.utils=new al(this)}setupTriggerRelatedElement(){this.triggerElement=this.getRootNode().querySelector(`[id="${this.triggerID}"]`),this.storeConnectedTooltip()}async firstUpdated(t){super.firstUpdated(t),this.utils.setupAppendTo(),[this.openDelay,this.closeDelay]=this.utils.setupDelay(),this.setupTriggerRelatedElement(),this.cleanupTrigger(),this.setupTriggerListeners(),this.style.zIndex=`${this.zIndex}`,Jr.onCreatedPopover(this)}async disconnectedCallback(){var t,o;super.disconnectedCallback(),this.removeAllListeners(),(t=this.deactivateFocusTrap)==null||t.call(this),this.deactivatePreventScroll(),this.utils.removeBackdrop(),(o=this.floatingUICleanupFunction)==null||o.call(this),this.cancelCloseDelay(),this.keepConnectedTooltipClosed&&this.connectedTooltip&&(this.connectedTooltip.shouldSupressOpening=!1),Jr.onDestroyedPopover(this),ye.remove(this)}async updated(t){if(super.updated(t),t.has("visible")){let o=t.get("visible")||!1;await this.isOpenUpdated(o,this.visible),this.utils.updateAriaExpandedAttribute()}t.has("trigger")&&(this.cleanupTrigger(),this.removeTriggerListeners(),this.setupTriggerListeners()),t.has("placement")&&this.setAttribute("placement",Object.values(Ut).includes(this.placement)?this.placement:Lt.PLACEMENT),t.has("delay")&&([this.openDelay,this.closeDelay]=this.utils.setupDelay()),t.has("color")&&this.setAttribute("color",Object.values(so).includes(this.color)?this.color:Lt.COLOR),t.has("zIndex")&&this.setAttribute("z-index",`${this.zIndex}`),t.has("append-to")&&this.utils.setupAppendTo(),(t.has("interactive")||t.has("aria-label")||t.has("aria-labelledby"))&&this.utils.updateAriaLabels(),t.has("role")&&(this.role===""&&(this.role=null),this.utils.updateAriaModal()),t.has("disableAriaExpanded")&&this.utils.updateAriaExpandedAttribute(),(t.has("interactive")||t.has("disableAriaHasPopup"))&&this.utils.updateAriaHasPopupAttribute(),t.has("focusTrap")&&!this.focusTrap&&this.visible&&this.deactivateFocusTrap(),t.has("preventScroll")&&(!this.preventScroll&&this.visible?this.deactivatePreventScroll():this.preventScroll&&this.visible&&this.activatePreventScroll())}async isOpenUpdated(t,o){var a,h,m,T,R;t===o||!this.triggerElement||(o&&!this.shouldSupressOpening?(ye.peek()!==this&&ye.push(this),this.keepConnectedTooltipClosed&&this.connectedTooltip&&(this.connectedTooltip.visible=!1,this.connectedTooltip.shouldSupressOpening=!0),this.backdrop&&(this.utils.createBackdrop(),this.triggerElementOriginalStyle={position:this.triggerElement.style.position,zIndex:this.triggerElement.style.zIndex},this.triggerElement.style.position="relative",this.triggerElement.style.zIndex=`${this.zIndex}`),this.positionPopover(),this.hideOnBlur&&(this.addEventListener("focusout",this.onPopoverFocusOut),this.trigger==="click"&&(this.triggerElement.style.pointerEvents="none")),this.hideOnEscape&&(this.addEventListener("keydown",this.onEscapeKeydown),(a=this.triggerElement)==null||a.addEventListener("keydown",this.onEscapeKeydown)),this.activatePreventScroll(),this.hideOnOutsideClick&&document.addEventListener("click",this.onOutsidePopoverClick),setTimeout(()=>{var $,q;this.interactive&&this.focusTrap&&(($=this.activateFocusTrap)==null||$.call(this),(q=this.setInitialFocus)==null||q.call(this))},0),Jr.onShowPopover(this)):(ye.peek()===this&&ye.pop(),(h=this.floatingUICleanupFunction)==null||h.call(this),this.backdrop&&(this.triggerElement.style.position=this.triggerElementOriginalStyle.position,this.triggerElement.style.zIndex=this.triggerElementOriginalStyle.zIndex,this.utils.removeBackdrop()),this.hideOnBlur&&(this.removeEventListener("focusout",this.onPopoverFocusOut),this.trigger==="click"&&(this.triggerElement.style.pointerEvents="")),this.hideOnOutsideClick&&document.removeEventListener("click",this.onOutsidePopoverClick),this.hideOnEscape&&(this.removeEventListener("keydown",this.onEscapeKeydown),(m=this.triggerElement)==null||m.removeEventListener("keydown",this.onEscapeKeydown)),this.disableAriaExpanded&&this.triggerElement.removeAttribute("aria-expanded"),this.interactive||this.triggerElement.removeAttribute("aria-haspopup"),this.deactivatePreventScroll(),(T=this.deactivateFocusTrap)==null||T.call(this),this.focusBackToTrigger&&((R=this.triggerElement)==null||R.focus()),this.keepConnectedTooltipClosed&&this.connectedTooltip&&(this.connectedTooltip.shouldSupressOpening=!1),Jr.onHidePopover(this)))}render(){return C`
2191
2191
  <div class="popover-hover-bridge"></div>
2192
2192
  ${this.closeButton?C` <mdc-button
2193
2193
  class="popover-close"