@momentum-design/components 0.70.0 → 0.70.2

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.
@@ -1198,9 +1198,11 @@
1198
1198
  --mdc-button-primary-disabled-color: var(--mds-color-theme-inverted-text-primary-disabled);
1199
1199
  }
1200
1200
  `,zn=[jd];var Jr=i=>{let t=i.split("-"),e=["bold","filled","regular","light"];return t.filter(r=>!e.includes(r)).join("-")};var Ye=class extends qo(se){constructor(){super(...arguments);this.size=le.SIZE;this.inverted=le.INVERTED;this.role="button"}update(e){super.update(e),e.has("active")&&this.inferFilledIconName(this.active),e.has("size")&&this.setSize(this.size),e.has("variant")&&(this.setVariant(this.variant),this.setSize(this.size)),e.has("color")&&this.setColor(this.color),e.has("typeInternal")&&this.setSize(this.size),(e.has("prefixIcon")||e.has("postfixIcon"))&&(this.inferFilledIconName(this.active),this.inferButtonType())}inferFilledIconName(e){e?(this.prefixIcon&&(this.prefixFilledIconName=`${Jr(this.prefixIcon)}-filled`),this.postfixIcon&&(this.postfixFilledIconName=`${Jr(this.postfixIcon)}-filled`)):(this.prefixFilledIconName=this.prefixIcon,this.postfixFilledIconName=this.postfixIcon)}render(){return m`
1201
- ${this.prefixFilledIconName?m` <mdc-icon name="${this.prefixFilledIconName}" part="prefix-icon"></mdc-icon>`:""}
1201
+ ${this.prefixFilledIconName?m` <mdc-icon name="${this.prefixFilledIconName}"
1202
+ part="prefix-icon" length-unit="rem"></mdc-icon>`:""}
1202
1203
  <slot @slotchange=${this.inferButtonType}></slot>
1203
- ${this.postfixFilledIconName?m` <mdc-icon name="${this.postfixFilledIconName}" part="postfix-icon"></mdc-icon>`:""}
1204
+ ${this.postfixFilledIconName?m` <mdc-icon name="${this.postfixFilledIconName}"
1205
+ part="postfix-icon" length-unit="rem"></mdc-icon>`:""}
1204
1206
  `}};Ye.styles=[...se.styles,...zn],n([l({type:Number})],Ye.prototype,"size",2),n([l({type:Boolean,reflect:!0})],Ye.prototype,"inverted",2),n([l({type:String,reflect:!0})],Ye.prototype,"role",2),n([L()],Ye.prototype,"prefixFilledIconName",2),n([L()],Ye.prototype,"postfixFilledIconName",2);var kt=Ye;kt.register(It);var Qd=kt;var Pn=f.constructTagName("linksimple"),ma={INLINE:!1,INVERTED:!1};var Jd=[N,u`
1205
1207
  :host {
1206
1208
  --mdc-link-border-radius: 0.25rem;
@@ -1271,9 +1273,11 @@
1271
1273
  `,..._()],Un=Jd;var We=class extends P(Re(v)){constructor(){super(...arguments);this.inline=ma.INLINE;this.inverted=ma.INVERTED;this.href="#";this.target="_self";this.prevTabindex=0;this.handleNavigation=e=>{if((e.type==="click"||e instanceof KeyboardEvent&&e.key==="Enter")&&this.href){if(this.disabled)return;window.open(this.href,this.target,this.rel)}}}connectedCallback(){super.connectedCallback(),this.setAttribute("role","link"),this.addEventListener("click",this.handleNavigation),this.addEventListener("keydown",this.handleNavigation)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.handleNavigation),this.removeEventListener("keydown",this.handleNavigation)}setDisabled(e){e?(this.setAttribute("aria-disabled","true"),this.prevTabindex=this.tabIndex,this.tabIndex=-1):(this.tabIndex===-1&&(this.tabIndex=this.prevTabindex),this.removeAttribute("aria-disabled"))}update(e){super.update(e),e.has("disabled")&&this.setDisabled(this.disabled)}render(){return m`
1272
1274
  <slot></slot>
1273
1275
  `}};We.styles=[...v.styles,...Un],n([l({type:Boolean,reflect:!0})],We.prototype,"inline",2),n([l({type:Boolean,reflect:!0})],We.prototype,"inverted",2),n([l({type:String,reflect:!0})],We.prototype,"href",2),n([l({type:String,reflect:!0})],We.prototype,"target",2),n([l({type:String,reflect:!0})],We.prototype,"rel",2);var mt=We;var ur=class extends qo(mt){constructor(){super(...arguments);this.size=le.SIZE}setSoftDisabled(e,r){r?e.setAttribute("aria-disabled","true"):e.removeAttribute("aria-disabled")}update(e){super.update(e),e.has("softDisabled")&&this.setSoftDisabled(this,this.softDisabled),e.has("size")&&this.setSize(this.size),e.has("variant")&&(this.setVariant(this.variant),this.setSize(this.size)),e.has("color")&&this.setColor(this.color),e.has("typeInternal")&&this.setSize(this.size),(e.has("prefixIcon")||e.has("postfixIcon"))&&this.inferButtonType()}render(){return m`
1274
- ${this.prefixIcon?m` <mdc-icon name="${this.prefixIcon}" part="prefix-icon"></mdc-icon>`:""}
1276
+ ${this.prefixIcon?m` <mdc-icon name="${this.prefixIcon}"
1277
+ part="prefix-icon" length-unit="rem"></mdc-icon>`:""}
1275
1278
  <slot @slotchange=${this.inferButtonType}></slot>
1276
- ${this.postfixIcon?m` <mdc-icon name="${this.postfixIcon}" part="postfix-icon"></mdc-icon>`:""}
1279
+ ${this.postfixIcon?m` <mdc-icon name="${this.postfixIcon}"
1280
+ part="postfix-icon" length-unit="rem"></mdc-icon>`:""}
1277
1281
  `}};ur.styles=[...kt.styles],n([l({type:Number,reflect:!0})],ur.prototype,"size",2),n([l({type:Boolean,attribute:"soft-disabled",reflect:!0})],ur.prototype,"softDisabled",2);var pa=ur;var Vn=f.constructTagName("buttonlink");pa.register(Vn);var em=pa;var tm=u`
1278
1282
  :host {
1279
1283
  align-items: flex-start;
@@ -2089,6 +2093,7 @@
2089
2093
  }
2090
2094
 
2091
2095
  .popover-close {
2096
+ box-sizing: border-box;
2092
2097
  position: absolute;
2093
2098
  right: 0.75rem;
2094
2099
  top: 0.75rem;
@@ -3084,10 +3089,10 @@
3084
3089
  }
3085
3090
  `,lc=[vp];var Gt=class extends ce(Je){constructor(){super(...arguments);this.selected=!1;this.ariaLabel=null}connectedCallback(){super.connectedCallback(),this.role="option",this.variant=po.INSET_RECTANGLE,this.updateAttribute("aria-selected",`${this.selected}`),this.updateAttribute("aria-disabled",`${!!this.disabled}`),this.name=void 0,this.secondaryLabel=void 0,this.sideHeaderText=void 0,this.sublineText=void 0}handleDefaultSlotChange(){var r,o,a;let e=(r=this.shadowRoot)==null?void 0:r.querySelector("slot");e&&!this.label&&(this.label=(a=(o=e.assignedNodes()[0])==null?void 0:o.textContent)==null?void 0:a.trim())}updateAttribute(e,r){this.setAttribute(e,r)}update(e){super.update(e),e.has("selected")&&this.updateAttribute("aria-selected",`${this.selected}`)}render(){let e=this.prefixIcon?m`
3086
3091
  <div part="leading-icon">
3087
- <mdc-icon slot="leading-controls" name="${A(this.prefixIcon)}"></mdc-icon>
3092
+ <mdc-icon length-unit="rem" slot="leading-controls" name="${A(this.prefixIcon)}"></mdc-icon>
3088
3093
  </div>
3089
3094
  `:g,r=this.selected?m`
3090
- <mdc-icon slot="trailing-controls" name="${nc}"></mdc-icon>
3095
+ <mdc-icon length-unit="rem" slot="trailing-controls" name="${nc}"></mdc-icon>
3091
3096
  `:g;return m`
3092
3097
  ${e}
3093
3098
  <div part="leading-text">