@momentum-design/components 0.134.7 → 0.134.8

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.
@@ -4857,7 +4857,7 @@
4857
4857
  :host([color='contrast'])::part(popover-content) {
4858
4858
  color: var(--mdc-tooltip-text-color-contrast);
4859
4859
  }
4860
- `,Vb=[J0];var ca=class extends nr{constructor(){super(...arguments);this.tooltipType=Ze.TOOLTIP_TYPE;this.onlyShowWhenTriggerOverflows=Ze.ONLY_SHOW_WHEN_TRIGGER_OVERFLOWS}connectedCallback(){super.connectedCallback(),this.role=et.TOOLTIP,this.ariaHidden=Ze.ARIA_HIDDEN,this.backdrop=Ze.BACKDROP,this.delay=this.delay||Ze.DELAY,this.disableAriaExpanded=Ze.DISABLE_ARIA_EXPANDED,this.hideOnBlur=Ze.HIDE_ON_BLUR,this.hideOnEscape=Ze.HIDE_ON_ESCAPE,this.offset=this.offset||Ze.OFFSET,this.placement=this.placement||Ze.PLACEMENT,this.trigger=Ze.TRIGGER,this.closeButton=bt.CLOSE_BUTTON,this.disableFlip=bt.DISABLE_FLIP,this.focusBackToTrigger=bt.FOCUS_BACK,this.focusTrap=bt.FOCUS_TRAP,this.hideOnOutsideClick=bt.HIDE_ON_CLICK_OUTSIDE,this.interactive=bt.INTERACTIVE,this.preventScroll=bt.PREVENT_SCROLL,this.size=bt.SIZE}setTooltipType(t){this.setAttribute("tooltip-type",Object.values(Or).includes(t)?t:Ze.TOOLTIP_TYPE)}async onIdUpdated(){if(this.id.length===0&&(this.id=`mdc-tooltip-${ze()}`),await this.updateComplete,this.triggerElement)switch(this.tooltipType){case Or.DESCRIPTION:this.triggerElement.setAttribute("aria-describedby",this.id);break;case Or.LABEL:this.triggerElement.setAttribute("aria-labelledby",this.id);break;default:break}}onPlacementUpdated(){Object.values(Lt).includes(this.placement)||(this.placement=Ze.PLACEMENT)}onTooltipTypeUpdated(t){let e=t.get("tooltipType");if(Object.values(Or).includes(this.tooltipType)||this.setTooltipType(Ze.TOOLTIP_TYPE),this.triggerElement)switch(this.tooltipType){case Or.DESCRIPTION:e===Or.LABEL&&this.triggerElement.removeAttribute("aria-labelledby"),this.triggerElement.setAttribute("aria-describedby",this.id);break;case Or.LABEL:e===Or.DESCRIPTION&&this.triggerElement.removeAttribute("aria-describedby"),this.triggerElement.setAttribute("aria-labelledby",this.id);break;default:e===Or.DESCRIPTION?this.triggerElement.removeAttribute("aria-describedby"):e===Or.LABEL&&this.triggerElement.removeAttribute("aria-labelledby");break}}async isOpenUpdated(t,e){let{triggerElement:i}=this;t===e||!i||(e||this.depthManager.remove([this]),await super.isOpenUpdated(t,e))}async update(t){super.update(t),t.has("id")&&await this.onIdUpdated(),t.has("placement")&&this.onPlacementUpdated(),t.has("tooltipType")&&this.onTooltipTypeUpdated(t)}show(){this.onlyShowWhenTriggerOverflows&&this.triggerElement&&Ll(this.triggerElement)&&!this.triggerElement.isWidthOverflowing()||super.show()}};ca.styles=[...nr.styles,...Vb],h([u({type:String,attribute:"tooltip-type",reflect:!0})],ca.prototype,"tooltipType",2),h([u({type:Boolean,attribute:"only-show-when-trigger-overflows",reflect:!0})],ca.prototype,"onlyShowWhenTriggerOverflows",2);var Pp=ca;Pp.register(Vn);var tS=Pp;var zb=B.constructTagName("toggle"),zn={DEFAULT:"default",COMPACT:"compact"};var Fp={SIZE:zn.DEFAULT,VALIDATION_MESSAGE:"Please toggle this switch if you want to proceed."};var mi=a=>{class o extends a{constructor(){super(...arguments);this.controlTypeProviderContext=Ie.consume({host:this,context:lp.Context})}willUpdate(){this.controlType&&Dd.includes(this.controlType)||(this.controlTypeProviderContext.value?this.controlType=this.controlTypeProviderContext.value:this.controlType=Rd.CONTROL_TYPE)}}return h([u({type:String,attribute:"control-type",reflect:!0})],o.prototype,"controlType",2),o};var tc=B.constructTagName("menuitemcheckbox"),Bn={NONE:"none",CHECKBOX:"checkbox",CHECKMARK:"checkmark",TOGGLE:"toggle"},Bb={INDICATOR:Bn.CHECKBOX};var eS=H`
4860
+ `,Vb=[J0];var ca=class extends nr{constructor(){super(...arguments);this.tooltipType=Ze.TOOLTIP_TYPE;this.onlyShowWhenTriggerOverflows=Ze.ONLY_SHOW_WHEN_TRIGGER_OVERFLOWS;this.autoGeneratedId=null}connectedCallback(){super.connectedCallback(),this.role=et.TOOLTIP,this.ariaHidden=Ze.ARIA_HIDDEN,this.backdrop=Ze.BACKDROP,this.delay=this.delay||Ze.DELAY,this.disableAriaExpanded=Ze.DISABLE_ARIA_EXPANDED,this.hideOnBlur=Ze.HIDE_ON_BLUR,this.hideOnEscape=Ze.HIDE_ON_ESCAPE,this.offset=this.offset||Ze.OFFSET,this.placement=this.placement||Ze.PLACEMENT,this.trigger=Ze.TRIGGER,this.closeButton=bt.CLOSE_BUTTON,this.disableFlip=bt.DISABLE_FLIP,this.focusBackToTrigger=bt.FOCUS_BACK,this.focusTrap=bt.FOCUS_TRAP,this.hideOnOutsideClick=bt.HIDE_ON_CLICK_OUTSIDE,this.interactive=bt.INTERACTIVE,this.preventScroll=bt.PREVENT_SCROLL,this.size=bt.SIZE}setTooltipType(t){this.setAttribute("tooltip-type",Object.values(Or).includes(t)?t:Ze.TOOLTIP_TYPE)}ensureId(){if(this.id.length>0){this.autoGeneratedId&&this.id!==this.autoGeneratedId&&(this.autoGeneratedId=null);return}this.autoGeneratedId||(this.autoGeneratedId=`mdc-tooltip-${ze()}`),this.id=this.autoGeneratedId}syncTriggerAriaForId(){if(this.triggerElement)switch(this.tooltipType){case Or.DESCRIPTION:this.triggerElement.setAttribute("aria-describedby",this.id);break;case Or.LABEL:this.triggerElement.setAttribute("aria-labelledby",this.id);break;default:break}}onPlacementUpdated(){Object.values(Lt).includes(this.placement)||(this.placement=Ze.PLACEMENT)}onTooltipTypeUpdated(t){let e=t.get("tooltipType");if(Object.values(Or).includes(this.tooltipType)||this.setTooltipType(Ze.TOOLTIP_TYPE),this.triggerElement)switch(this.tooltipType){case Or.DESCRIPTION:e===Or.LABEL&&this.triggerElement.removeAttribute("aria-labelledby"),this.triggerElement.setAttribute("aria-describedby",this.id);break;case Or.LABEL:e===Or.DESCRIPTION&&this.triggerElement.removeAttribute("aria-describedby"),this.triggerElement.setAttribute("aria-labelledby",this.id);break;default:e===Or.DESCRIPTION?this.triggerElement.removeAttribute("aria-describedby"):e===Or.LABEL&&this.triggerElement.removeAttribute("aria-labelledby");break}}async isOpenUpdated(t,e){let{triggerElement:i}=this;t===e||!i||(e||this.depthManager.remove([this]),await super.isOpenUpdated(t,e))}willUpdate(t){super.willUpdate(t);let e=t.has("id");e&&this.ensureId(),t.has("placement")&&this.onPlacementUpdated(),t.has("tooltipType")?this.onTooltipTypeUpdated(t):e&&this.syncTriggerAriaForId()}show(){this.onlyShowWhenTriggerOverflows&&this.triggerElement&&Ll(this.triggerElement)&&!this.triggerElement.isWidthOverflowing()||super.show()}};ca.styles=[...nr.styles,...Vb],h([u({type:String,attribute:"tooltip-type",reflect:!0})],ca.prototype,"tooltipType",2),h([u({type:Boolean,attribute:"only-show-when-trigger-overflows",reflect:!0})],ca.prototype,"onlyShowWhenTriggerOverflows",2);var Pp=ca;Pp.register(Vn);var tS=Pp;var zb=B.constructTagName("toggle"),zn={DEFAULT:"default",COMPACT:"compact"};var Fp={SIZE:zn.DEFAULT,VALIDATION_MESSAGE:"Please toggle this switch if you want to proceed."};var mi=a=>{class o extends a{constructor(){super(...arguments);this.controlTypeProviderContext=Ie.consume({host:this,context:lp.Context})}willUpdate(){this.controlType&&Dd.includes(this.controlType)||(this.controlTypeProviderContext.value?this.controlType=this.controlTypeProviderContext.value:this.controlType=Rd.CONTROL_TYPE)}}return h([u({type:String,attribute:"control-type",reflect:!0})],o.prototype,"controlType",2),o};var tc=B.constructTagName("menuitemcheckbox"),Bn={NONE:"none",CHECKBOX:"checkbox",CHECKMARK:"checkmark",TOGGLE:"toggle"},Bb={INDICATOR:Bn.CHECKBOX};var eS=H`
4861
4861
  :host::part(checkmark-icon) {
4862
4862
  --mdc-icon-fill-color: currentColor;
4863
4863
  }