@govtechsg/sgds-web-component 1.3.1 → 1.4.0

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/index.umd.js CHANGED
@@ -3520,7 +3520,7 @@
3520
3520
  };
3521
3521
  }
3522
3522
 
3523
- var css_248z$D = css`:host{--accordion-item-padding-y:1rem;--accordion-item-padding-x:1.5rem;--accordion-item-border-radius:0.25rem;--accordion-item-font-weight:700;--accordion-item-line-height:2rem}.accordion-body{line-height:var(--accordion-item-line-height);overflow:hidden;padding:0}.accordion-content{display:block;padding:0 var(--accordion-item-padding-x) var(--accordion-item-padding-y)}.accordion-button{line-height:var(--accordion-item-line-height)}.accordion-button:not(.collapsed){color:var(--accordion-active-color)}.accordion-button svg.bi-chevron-down{height:1.3rem;margin-left:auto;transition:transform .2s ease-in-out;width:1.3rem}.accordion-button:not(.collapsed){box-shadow:none;font-weight:var(--accordion-item-font-weight)}.accordion-button:not(.collapsed) svg.bi-chevron-down{transform:rotate(-180deg)}.accordion-button:after{content:unset}:host([first-of-type]) .accordion-item{border-radius:var(--accordion-item-border-radius) var(--accordion-item-border-radius) 0 0}:host([nth-of-type]) .accordion-item{border-radius:0;border-top:0}:host([last-of-type]) .accordion-item{border-radius:0 0 var(--accordion-item-border-radius) var(--accordion-item-border-radius);border-top:0}.hidden{display:none}`;
3523
+ var css_248z$D = css`:host{--accordion-item-padding-y:1rem;--accordion-item-padding-x:1.5rem;--accordion-item-border-radius:0.25rem;--accordion-item-font-weight:700;--accordion-item-line-height:2rem}.accordion-body{line-height:var(--accordion-item-line-height);overflow:hidden;padding:0}.accordion-content{display:block;padding:0 var(--accordion-item-padding-x) var(--accordion-item-padding-y)}.accordion-button{line-height:var(--accordion-item-line-height)}.accordion-button:not(.collapsed){color:var(--accordion-active-color,var(--sgds-primary))}.accordion-button svg.bi-chevron-down{height:1.3rem;margin-left:auto;transition:transform .2s ease-in-out;width:1.3rem}.accordion-button:not(.collapsed){box-shadow:none;font-weight:var(--accordion-item-font-weight)}.accordion-button:not(.collapsed) svg.bi-chevron-down{transform:rotate(-180deg)}.accordion-button:after{content:unset}:host([first-of-type]) .accordion-item{border-radius:var(--accordion-item-border-radius) var(--accordion-item-border-radius) 0 0}:host([nth-of-type]) .accordion-item{border-radius:0;border-top:0}:host([last-of-type]) .accordion-item{border-radius:0 0 var(--accordion-item-border-radius) var(--accordion-item-border-radius);border-top:0}.hidden{display:none}`;
3524
3524
 
3525
3525
  /**
3526
3526
  *
@@ -21740,6 +21740,8 @@
21740
21740
  this.centeredAlignVariant = false;
21741
21741
  /** Removes the default animation when opening and closing of modal */
21742
21742
  this.noAnimation = false;
21743
+ /** Removes the close button from modal header */
21744
+ this.noCloseButton = false;
21743
21745
  }
21744
21746
  connectedCallback() {
21745
21747
  super.connectedCallback();
@@ -21896,16 +21898,18 @@
21896
21898
  >
21897
21899
  ${this.titleIcon ? withLabelIcon : ""} ${this.title}
21898
21900
  </h3>
21899
- <button
21900
- class=${classMap({
21901
- "modal-close": true,
21902
- "btn-sm": true,
21903
- "btn-close": true,
21904
- centered: this.centeredAlignVariant
21905
- })}
21906
- @click="${() => this.requestClose("close-button")}"
21907
- aria-label="close modal"
21908
- ></button>
21901
+ ${this.noCloseButton
21902
+ ? nothing
21903
+ : html$1 `<button
21904
+ class=${classMap({
21905
+ "modal-close": true,
21906
+ "btn-sm": true,
21907
+ "btn-close": true,
21908
+ centered: this.centeredAlignVariant
21909
+ })}
21910
+ @click="${() => this.requestClose("close-button")}"
21911
+ aria-label="close modal"
21912
+ ></button>`}
21909
21913
  </div>
21910
21914
  `
21911
21915
  : ""}
@@ -21968,6 +21972,9 @@
21968
21972
  __decorate([
21969
21973
  property({ type: Boolean, reflect: true })
21970
21974
  ], SgdsModal.prototype, "noAnimation", void 0);
21975
+ __decorate([
21976
+ property({ type: Boolean, reflect: true })
21977
+ ], SgdsModal.prototype, "noCloseButton", void 0);
21971
21978
  __decorate([
21972
21979
  watch("open", { waitUntilFirstUpdate: true })
21973
21980
  ], SgdsModal.prototype, "handleOpenChange", null);