@dile/ui 3.6.2 → 3.6.4

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.
@@ -37,6 +37,11 @@ export class DileConfirm extends LitElement {
37
37
  white-space: nowrap;
38
38
  display: inline-block;
39
39
  }
40
+ .actions a.disabled {
41
+ opacity: 0.6;
42
+ cursor: not-allowed;
43
+ pointer-events: none;
44
+ }
40
45
  `;
41
46
  }
42
47
 
@@ -56,6 +61,7 @@ export class DileConfirm extends LitElement {
56
61
  this.cancelLabel = "Cancell";
57
62
  this.opened = false;
58
63
  this.blocking = false;
64
+ this._isProcessing = false;
59
65
  }
60
66
 
61
67
  render() {
@@ -68,10 +74,10 @@ export class DileConfirm extends LitElement {
68
74
  >
69
75
  <slot></slot>
70
76
  <div class="actions">
71
- <a href="#" class="button cancel" @click="${this._cancelHandler}"
77
+ <a href="#" class="button cancel ${this._isProcessing ? 'disabled' : ''}" @click="${this._cancelHandler}"
72
78
  >${this.cancelLabel}</a
73
79
  >
74
- <a href="#" class="button accept" @click="${this._acceptHandler}"
80
+ <a href="#" class="button accept ${this._isProcessing ? 'disabled' : ''}" @click="${this._acceptHandler}"
75
81
  >${this.acceptLabel}</a
76
82
  >
77
83
  </div>
@@ -81,10 +87,14 @@ export class DileConfirm extends LitElement {
81
87
 
82
88
  _cancelHandler(e) {
83
89
  e.preventDefault();
90
+ if (this._isProcessing) return;
91
+ this._isProcessing = true;
84
92
  this.cancel();
85
93
  }
86
94
  _acceptHandler(e) {
87
95
  e.preventDefault();
96
+ if (this._isProcessing) return;
97
+ this._isProcessing = true;
88
98
  this.accept();
89
99
  }
90
100
 
@@ -94,6 +104,7 @@ export class DileConfirm extends LitElement {
94
104
 
95
105
  close() {
96
106
  this.modal.close();
107
+ this._isProcessing = false;
97
108
  }
98
109
 
99
110
  firstUpdated() {
@@ -26,6 +26,8 @@ export class DileTooltip extends LitElement {
26
26
  border-radius: var(--dile-tooltip-border-radius, 6px);;
27
27
  padding: var(--dile-tooltip-padding, 5px);
28
28
  z-index: 10000;
29
+ white-space: normal;
30
+ overflow-wrap: break-word;
29
31
  }
30
32
 
31
33
  .tooltip-top,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dile/ui",
3
- "version": "3.6.2",
3
+ "version": "3.6.4",
4
4
  "description": "UI Core components from dile-components.",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -28,5 +28,5 @@
28
28
  "publishConfig": {
29
29
  "access": "public"
30
30
  },
31
- "gitHead": "c5978f587285d7fd91670ec57f99925c46fb6bd7"
31
+ "gitHead": "6e81c1423870da7d209a2cc421c96fd63008bdb8"
32
32
  }