@momentum-design/components 0.51.2 → 0.51.3

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.
@@ -2425,7 +2425,7 @@
2425
2425
  :host([color='contrast'])::part(popover-content) {
2426
2426
  color: var(--mdc-tooltip-text-color-contrast);
2427
2427
  }
2428
- `,Yn=[Ad];var sr=class extends tt{constructor(){super(...arguments);this.tooltipType=it.TOOLTIP_TYPE}connectedCallback(){super.connectedCallback(),this.backdrop=!1,this.delay=it.DELAY,this.focusTrap=!1,this.hideOnBlur=!0,this.hideOnEscape=!0,this.interactive=!1,this.offset=it.OFFSET,this.placement=it.PLACEMENT,this.role="tooltip",this.showArrow=!0,this.trigger="mouseenter focusin",this.enabledFocusTrap=!1,this.enabledPreventScroll=!1,this.flip=!0,this.focusTrap=!1,this.preventScroll=!1,this.closeButton=!1,this.hideOnOutsideClick=!1,this.focusBackToTrigger=!1,this.size=!1,this.disableAriaExpanded=!0}getTooltipText(){var e,t;return((t=(e=this.defaultSlotNodes)==null?void 0:e.map(o=>o.textContent).join(" "))==null?void 0:t.trim())||""}setTooltipType(e){this.setAttribute("tooltip-type",Object.values(ie).includes(e)?e:it.TOOLTIP_TYPE)}onIdUpdated(){this.id.length===0&&(this.id=`mdc-tooltip-${Pe()}`);let e=document.getElementById(this.triggerID);if(e)switch(this.tooltipType){case ie.DESCRIPTION:e.setAttribute("aria-describedby",this.id);break;case ie.LABEL:e.setAttribute("aria-labelledby",this.id);break;default:break}}onPlacementUpdated(){Object.values(Be).includes(this.placement)||(this.placement=it.PLACEMENT)}onTooltipTypeUpdated(e){let t=e.get("tooltipType");Object.values(ie).includes(this.tooltipType)||this.setTooltipType(it.TOOLTIP_TYPE);let o=document.getElementById(this.triggerID);if(o){let a=this.getTooltipText();switch(this.tooltipType){case ie.DESCRIPTION:t===ie.LABEL&&o.removeAttribute("aria-labelledby"),o.setAttribute("aria-describedby",this.id);break;case ie.LABEL:t===ie.DESCRIPTION&&o.removeAttribute("aria-describedby"),o.setAttribute("aria-labelledby",this.id);break;default:t===ie.DESCRIPTION?o.removeAttribute("aria-describedby"):t===ie.LABEL&&o.removeAttribute("aria-labelledby");break}a.length>0&&this.tooltipType!==ie.NONE&&!this.ariaLabel&&(this.ariaLabel=a)}}update(e){super.update(e),e.has("id")&&this.onIdUpdated(),e.has("placement")&&this.onPlacementUpdated(),e.has("tooltipType")&&this.onTooltipTypeUpdated(e)}};sr.styles=[...tt.styles,...Yn],l([c({type:String,attribute:"tooltip-type",reflect:!0})],sr.prototype,"tooltipType",2),l([qa()],sr.prototype,"defaultSlotNodes",2);var Qi=sr;Qi.register(Po);var Sd=Qi;var qn="check-bold",Ji="dynamic-option-tooltip-popover",Hr=b.constructTagName("option");var wd=f`
2428
+ `,Yn=[Ad];var sr=class extends tt{constructor(){super(...arguments);this.tooltipType=it.TOOLTIP_TYPE}connectedCallback(){super.connectedCallback(),this.backdrop=!1,this.delay=it.DELAY,this.focusTrap=!1,this.hideOnBlur=!0,this.hideOnEscape=!0,this.interactive=!1,this.offset=it.OFFSET,this.placement=it.PLACEMENT,this.role="tooltip",this.trigger="mouseenter focusin",this.enabledFocusTrap=!1,this.enabledPreventScroll=!1,this.flip=!0,this.focusTrap=!1,this.preventScroll=!1,this.closeButton=!1,this.hideOnOutsideClick=!1,this.focusBackToTrigger=!1,this.size=!1,this.disableAriaExpanded=!0}getTooltipText(){var e,t;return((t=(e=this.defaultSlotNodes)==null?void 0:e.map(o=>o.textContent).join(" "))==null?void 0:t.trim())||""}setTooltipType(e){this.setAttribute("tooltip-type",Object.values(ie).includes(e)?e:it.TOOLTIP_TYPE)}onIdUpdated(){this.id.length===0&&(this.id=`mdc-tooltip-${Pe()}`);let e=document.getElementById(this.triggerID);if(e)switch(this.tooltipType){case ie.DESCRIPTION:e.setAttribute("aria-describedby",this.id);break;case ie.LABEL:e.setAttribute("aria-labelledby",this.id);break;default:break}}onPlacementUpdated(){Object.values(Be).includes(this.placement)||(this.placement=it.PLACEMENT)}onTooltipTypeUpdated(e){let t=e.get("tooltipType");Object.values(ie).includes(this.tooltipType)||this.setTooltipType(it.TOOLTIP_TYPE);let o=document.getElementById(this.triggerID);if(o){let a=this.getTooltipText();switch(this.tooltipType){case ie.DESCRIPTION:t===ie.LABEL&&o.removeAttribute("aria-labelledby"),o.setAttribute("aria-describedby",this.id);break;case ie.LABEL:t===ie.DESCRIPTION&&o.removeAttribute("aria-describedby"),o.setAttribute("aria-labelledby",this.id);break;default:t===ie.DESCRIPTION?o.removeAttribute("aria-describedby"):t===ie.LABEL&&o.removeAttribute("aria-labelledby");break}a.length>0&&this.tooltipType!==ie.NONE&&!this.ariaLabel&&(this.ariaLabel=a)}}update(e){super.update(e),e.has("id")&&this.onIdUpdated(),e.has("placement")&&this.onPlacementUpdated(),e.has("tooltipType")&&this.onTooltipTypeUpdated(e)}};sr.styles=[...tt.styles,...Yn],l([c({type:String,attribute:"tooltip-type",reflect:!0})],sr.prototype,"tooltipType",2),l([qa()],sr.prototype,"defaultSlotNodes",2);var Qi=sr;Qi.register(Po);var Sd=Qi;var qn="check-bold",Ji="dynamic-option-tooltip-popover",Hr=b.constructTagName("option");var wd=f`
2429
2429
  :host {
2430
2430
  --mdc-option-icon-width: 1rem;
2431
2431