@proximus/lavender-modal 1.4.10-alpha.8 → 1.4.10-beta.1

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/Modal.d.ts CHANGED
@@ -10,6 +10,7 @@ export declare const statusValues: string[];
10
10
  export declare class Modal extends HTMLElement {
11
11
  private onOpenClick;
12
12
  private onCloseClick;
13
+ private onDialogCancel;
13
14
  private commandButtonCleanups;
14
15
  private opener;
15
16
  private openerElement;
package/dist/index.es.js CHANGED
@@ -9,7 +9,7 @@ r.replaceSync(a);
9
9
  const l = "px.lavender.modal.close", c = ["", "info", "success", "error", "warning"];
10
10
  class d extends HTMLElement {
11
11
  constructor() {
12
- super(), this.onOpenClick = () => this.show(), this.onCloseClick = () => this.close(), this.commandButtonCleanups = [], this.opener = null, this.openerElement = null, this.closerElement = null, this.template = `<dialog>
12
+ super(), this.onOpenClick = () => this.show(), this.onCloseClick = () => this.close(), this.onDialogCancel = () => this.close(), this.commandButtonCleanups = [], this.opener = null, this.openerElement = null, this.closerElement = null, this.template = `<dialog>
13
13
  <div id="container">
14
14
  <div id="content-container">
15
15
  <px-vstack gap="default" >
@@ -48,7 +48,7 @@ class d extends HTMLElement {
48
48
  }
49
49
  connectedCallback() {
50
50
  var t, e;
51
- this.addEventListenersToCommandButtons(), this.toggleDescriptionVisibility = this.toggleDescriptionVisibility.bind(this), this.toggleCloseButtonSafeArea = this.toggleCloseButtonSafeArea.bind(this), this.hasAttribute("open") && this.show(), this.hasAttribute("openedby") && this.addOpenListener(), this.hasAttribute("closedby") && this.addCloseListener(this.getAttribute("closedby")), this.toggleDescriptionVisibility(), (t = this.$slotDescription) == null || t.addEventListener(
51
+ this.$dialog.addEventListener("cancel", this.onDialogCancel), this.addEventListenersToCommandButtons(), this.toggleDescriptionVisibility = this.toggleDescriptionVisibility.bind(this), this.toggleCloseButtonSafeArea = this.toggleCloseButtonSafeArea.bind(this), this.hasAttribute("open") && this.show(), this.hasAttribute("openedby") && this.addOpenListener(), this.hasAttribute("closedby") && this.addCloseListener(this.getAttribute("closedby")), this.toggleDescriptionVisibility(), (t = this.$slotDescription) == null || t.addEventListener(
52
52
  "slotchange",
53
53
  this.toggleDescriptionVisibility
54
54
  ), this.toggleCloseButtonSafeArea(), (e = this.$slotCloseButton) == null || e.addEventListener(
@@ -83,7 +83,7 @@ class d extends HTMLElement {
83
83
  }
84
84
  disconnectedCallback() {
85
85
  var t, e;
86
- (t = this.$slotDescription) == null || t.removeEventListener(
86
+ this.$dialog.removeEventListener("cancel", this.onDialogCancel), (t = this.$slotDescription) == null || t.removeEventListener(
87
87
  "slotchange",
88
88
  this.toggleDescriptionVisibility
89
89
  ), (e = this.$slotCloseButton) == null || e.removeEventListener(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proximus/lavender-modal",
3
- "version": "1.4.10-alpha.8",
3
+ "version": "1.4.10-beta.1",
4
4
  "description": "",
5
5
  "main": "dist/index.es.js",
6
6
  "types": "dist/index.d.ts",