@momentum-design/components 0.82.1 → 0.82.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.
- package/dist/browser/index.js +13 -12
- package/dist/browser/index.js.map +2 -2
- package/dist/custom-elements.json +1436 -1436
- package/dist/react/index.d.ts +4 -4
- package/dist/react/index.js +4 -4
- package/dist/utils/mixins/CardAndDialogFooterMixin.js +13 -12
- package/package.json +1 -1
package/dist/browser/index.js
CHANGED
|
@@ -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
|
|
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
|
-
<
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
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>
|