@momentum-design/components 0.82.1 → 0.82.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.
@@ -1466,19 +1466,20 @@
1466
1466
  ${this.subtitle?O`<mdc-text part="subtitle" type="${Qt.SUBTITLE_TYPE}" tagname="${this.subtitleTagName}"
1467
1467
  >${this.subtitle}</mdc-text
1468
1468
  >`:Y}
1469
- </div>`}}return v([T({type:String,attribute:"card-title",reflect:!0})],o.prototype,"cardTitle",2),v([T({type:String,reflect:!0})],o.prototype,"subtitle",2),v([T({type:String,attribute:"image-src",reflect:!0})],o.prototype,"imageSrc",2),v([T({type:String,attribute:"image-alt",reflect:!0})],o.prototype,"imageAlt",2),v([T({type:String,reflect:!0})],o.prototype,"variant",2),v([T({type:String,reflect:!0})],o.prototype,"orientation",2),v([T({type:String,attribute:"title-tag-name",reflect:!0})],o.prototype,"titleTagName",2),v([T({type:String,attribute:"subtitle-tag-name",reflect:!0})],o.prototype,"subtitleTagName",2),v([T({type:String,attribute:"icon-name",reflect:!0})],o.prototype,"iconName",2),o};var ln=l=>{class o extends l{updateFooterButtonColors(s){let a=[...this.footerButtonPrimary||[],...this.footerButtonSecondary||[]];a==null||a.forEach(h=>{s===ql.PROMOTIONAL?h.setAttribute("color",Ci.PROMOTIONAL):h.setAttribute("color",Ci.DEFAULT)})}handleFooterSlot(s,a){var m,b,w;let h=[];s===Qt.LINK&&((m=this.footerLink)!=null&&m.length)?h=this.footerLink:s===Qt.BUTTON&&a===qt.PRIMARY&&((b=this.footerButtonPrimary)!=null&&b.length)?h=this.footerButtonPrimary:s===Qt.BUTTON&&a===qt.SECONDARY&&((w=this.footerButtonSecondary)!=null&&w.length)&&(h=this.footerButtonSecondary);for(let F=1;F<h.length;F+=1)h[F].remove();h.forEach(F=>{F.matches(s)||F.remove(),a&&F.setAttribute("variant",a)})}renderFooter(){return O`<div part="footer">
1469
+ </div>`}}return v([T({type:String,attribute:"card-title",reflect:!0})],o.prototype,"cardTitle",2),v([T({type:String,reflect:!0})],o.prototype,"subtitle",2),v([T({type:String,attribute:"image-src",reflect:!0})],o.prototype,"imageSrc",2),v([T({type:String,attribute:"image-alt",reflect:!0})],o.prototype,"imageAlt",2),v([T({type:String,reflect:!0})],o.prototype,"variant",2),v([T({type:String,reflect:!0})],o.prototype,"orientation",2),v([T({type:String,attribute:"title-tag-name",reflect:!0})],o.prototype,"titleTagName",2),v([T({type:String,attribute:"subtitle-tag-name",reflect:!0})],o.prototype,"subtitleTagName",2),v([T({type:String,attribute:"icon-name",reflect:!0})],o.prototype,"iconName",2),o};var ln=l=>{class o extends l{updateFooterButtonColors(s){let a=[...this.footerButtonPrimary||[],...this.footerButtonSecondary||[]];a==null||a.forEach(h=>{s===ql.PROMOTIONAL?h.setAttribute("color",Ci.PROMOTIONAL):h.setAttribute("color",Ci.DEFAULT)})}handleFooterSlot(s,a){var m,b,w;let h=[];s===Qt.LINK&&((m=this.footerLink)!=null&&m.length)?h=this.footerLink:s===Qt.BUTTON&&a===qt.PRIMARY&&((b=this.footerButtonPrimary)!=null&&b.length)?h=this.footerButtonPrimary:s===Qt.BUTTON&&a===qt.SECONDARY&&((w=this.footerButtonSecondary)!=null&&w.length)&&(h=this.footerButtonSecondary);for(let F=1;F<h.length;F+=1)h[F].remove();h.forEach(F=>{F.matches(s)||F.remove(),a&&F.setAttribute("variant",a)})}renderFooter(){return O`
1470
1470
  <slot name="footer">
1471
- <slot name="footer-link" @slotchange=${()=>this.handleFooterSlot(Qt.LINK)}></slot>
1472
- <slot
1473
- name="footer-button-secondary"
1474
- @slotchange=${()=>this.handleFooterSlot(Qt.BUTTON,qt.SECONDARY)}
1475
- ></slot>
1476
- <slot
1477
- name="footer-button-primary"
1478
- @slotchange=${()=>this.handleFooterSlot(Qt.BUTTON,qt.PRIMARY)}
1479
- ></slot>
1480
- </slot>
1481
- </div>`}}return v([Ot({slot:"footer-link"})],o.prototype,"footerLink",2),v([Ot({slot:"footer-button-primary"})],o.prototype,"footerButtonPrimary",2),v([Ot({slot:"footer-button-secondary"})],o.prototype,"footerButtonSecondary",2),o};var Rs=class extends nn(ln(q)){constructor(){super(...arguments);this.handleIconButtons=()=>{var e;if((e=this.iconButtons)==null||e.forEach(s=>{!s.matches(Qt.BUTTON)&&s.getAttribute("data-btn-type")!=="icon"?s.remove():(s.setAttribute("variant",qt.TERTIARY),s.setAttribute("size","32"))}),this.iconButtons&&this.iconButtons.length>3)for(let s=3;s<this.iconButtons.length;s+=1)this.iconButtons[s].remove()}}update(e){super.update(e),e.has("variant")&&this.updateFooterButtonColors(this.variant)}renderHeader(){return this.cardTitle?O`<div part="header">
1471
+ <div part="footer">
1472
+ <slot name="footer-link" @slotchange=${()=>this.handleFooterSlot(Qt.LINK)}></slot>
1473
+ <slot
1474
+ name="footer-button-secondary"
1475
+ @slotchange=${()=>this.handleFooterSlot(Qt.BUTTON,qt.SECONDARY)}
1476
+ ></slot>
1477
+ <slot
1478
+ name="footer-button-primary"
1479
+ @slotchange=${()=>this.handleFooterSlot(Qt.BUTTON,qt.PRIMARY)}
1480
+ ></slot>
1481
+ </div>
1482
+ </slot>`}}return v([Ot({slot:"footer-link"})],o.prototype,"footerLink",2),v([Ot({slot:"footer-button-primary"})],o.prototype,"footerButtonPrimary",2),v([Ot({slot:"footer-button-secondary"})],o.prototype,"footerButtonSecondary",2),o};var Rs=class extends nn(ln(q)){constructor(){super(...arguments);this.handleIconButtons=()=>{var e;if((e=this.iconButtons)==null||e.forEach(s=>{!s.matches(Qt.BUTTON)&&s.getAttribute("data-btn-type")!=="icon"?s.remove():(s.setAttribute("variant",qt.TERTIARY),s.setAttribute("size","32"))}),this.iconButtons&&this.iconButtons.length>3)for(let s=3;s<this.iconButtons.length;s+=1)this.iconButtons[s].remove()}}update(e){super.update(e),e.has("variant")&&this.updateFooterButtonColors(this.variant)}renderHeader(){return this.cardTitle?O`<div part="header">
1482
1483
  ${this.renderIcon()}
1483
1484
  ${this.renderTitle()}
1484
1485
  <div part="icon-button"><slot name="icon-button" @slotchange=${this.handleIconButtons}></slot></div>