@momentum-design/components 0.135.1 → 0.135.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.
@@ -7434,7 +7434,7 @@
7434
7434
  :host::part(toast-header) {
7435
7435
  display: -webkit-box;
7436
7436
  -webkit-box-orient: vertical;
7437
- -webkit-line-clamp: 2;
7437
+ -webkit-line-clamp: 3;
7438
7438
  align-self: stretch;
7439
7439
  overflow: hidden;
7440
7440
  text-overflow: ellipsis;
@@ -7451,7 +7451,7 @@
7451
7451
  }
7452
7452
 
7453
7453
  :host([data-expanded='true'])::part(toast-header) {
7454
- -webkit-line-clamp: unset;
7454
+ -webkit-line-clamp: 6;
7455
7455
  }
7456
7456
 
7457
7457
  :host::part(footer) {
@@ -7473,9 +7473,9 @@
7473
7473
  mdc-text::part(text) {
7474
7474
  margin: 0;
7475
7475
  }
7476
- `,sE=[EI];var Re=class extends Ws(Q){constructor(){super(...arguments);this.variant=mr.VARIANT;this.headerTagName=mr.HEADER_TAG_NAME;this.ariaLabel=null;this.isDetailVisible=!1;this.hasDetailedSlot=!1;this.hasOverflowingHeaderText=!1;this.hasFooterButtons=""}closeToast(){let t=new CustomEvent("close",{bubbles:!0,composed:!0,detail:{id:this.id}});this.dispatchEvent(t)}toggleDetailVisibility(){this.isDetailVisible=!this.isDetailVisible,this.isDetailVisible?this.setAttribute("data-expanded","true"):this.removeAttribute("data-expanded")}updateDetailedSlotPresence(){var t,e;this.hasDetailedSlot=(e=(t=this.detailedElements)==null?void 0:t.some(i=>{var n;return(n=i.textContent)==null?void 0:n.trim()}))!=null?e:!1}updateFooterButtonsPresence(){var t,e,i,n;this.hasFooterButtons=((e=(t=this.footerButtonPrimary)==null?void 0:t.length)!=null?e:0)>0||((n=(i=this.footerButtonSecondary)==null?void 0:i.length)!=null?n:0)>0||this.shouldRenderToggleButton()?"has-footer-buttons":""}async firstUpdated(t){super.firstUpdated(t),this.updateDetailedSlotPresence(),await this.updateComplete,Fl(this.headerTextElement)&&(this.hasOverflowingHeaderText=this.headerTextElement.isHeightOverflowing())}renderIcon(t){return t?S`
7476
+ `,sE=[EI];var Re=class extends Ws(Q){constructor(){super(...arguments);this.variant=mr.VARIANT;this.headerTagName=mr.HEADER_TAG_NAME;this.ariaLabel=null;this.isDetailVisible=!1;this.hasDetailedSlot=!1;this.hasOverflowingHeaderText=!1;this.hasFooterButtons=""}closeToast(){let t=new CustomEvent("close",{bubbles:!0,composed:!0,detail:{id:this.id}});this.dispatchEvent(t)}updateDataExpanded(){this.isDetailVisible||!this.canRenderToggleButton()?this.setAttribute("data-expanded","true"):this.removeAttribute("data-expanded")}toggleDetailVisibility(){this.isDetailVisible=!this.isDetailVisible,this.updateDataExpanded()}updateDetailedSlotPresence(){var t,e;this.hasDetailedSlot=(e=(t=this.detailedElements)==null?void 0:t.some(i=>{var n;return(n=i.textContent)==null?void 0:n.trim()}))!=null?e:!1}updateFooterButtonsPresence(){var t,e,i,n;this.hasFooterButtons=((e=(t=this.footerButtonPrimary)==null?void 0:t.length)!=null?e:0)>0||((n=(i=this.footerButtonSecondary)==null?void 0:i.length)!=null?n:0)>0||this.shouldRenderToggleButton()?"has-footer-buttons":""}async firstUpdated(t){super.firstUpdated(t),this.updateDetailedSlotPresence(),this.updateDataExpanded(),await this.updateComplete,Fl(this.headerTextElement)&&(this.hasOverflowingHeaderText=this.headerTextElement.isHeightOverflowing())}updated(t){(t.has("showMoreText")||t.has("showLessText"))&&this.updateDataExpanded()}renderIcon(t){return t?S`
7477
7477
  <mdc-icon name="${t}" size="${mr.PREFIX_ICON_SIZE}" part="toast-prefix-icon"></mdc-icon>
7478
- `:K}shouldRenderToggleButton(){return(this.hasDetailedSlot||this.hasOverflowingHeaderText)&&this.showMoreText&&this.showLessText}renderToggleDetailButton(){return this.shouldRenderToggleButton()?S`
7478
+ `:K}canRenderToggleButton(){return!!(this.showMoreText&&this.showLessText)}shouldRenderToggleButton(){return this.canRenderToggleButton()&&(this.hasDetailedSlot||this.hasOverflowingHeaderText)}renderToggleDetailButton(){return this.shouldRenderToggleButton()?S`
7479
7479
  <mdc-button
7480
7480
  variant="tertiary"
7481
7481
  part="footer-button-toggle"