@vaadin/confirm-dialog 23.1.0-alpha3 → 23.1.0-alpha4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/confirm-dialog",
3
- "version": "23.1.0-alpha3",
3
+ "version": "23.1.0-alpha4",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -34,19 +34,19 @@
34
34
  ],
35
35
  "dependencies": {
36
36
  "@polymer/polymer": "^3.0.0",
37
- "@vaadin/button": "23.1.0-alpha3",
38
- "@vaadin/component-base": "23.1.0-alpha3",
39
- "@vaadin/dialog": "23.1.0-alpha3",
37
+ "@vaadin/button": "23.1.0-alpha4",
38
+ "@vaadin/component-base": "23.1.0-alpha4",
39
+ "@vaadin/dialog": "23.1.0-alpha4",
40
40
  "@vaadin/vaadin-license-checker": "^2.1.0",
41
- "@vaadin/vaadin-lumo-styles": "23.1.0-alpha3",
42
- "@vaadin/vaadin-material-styles": "23.1.0-alpha3",
43
- "@vaadin/vaadin-overlay": "23.1.0-alpha3",
44
- "@vaadin/vaadin-themable-mixin": "23.1.0-alpha3"
41
+ "@vaadin/vaadin-lumo-styles": "23.1.0-alpha4",
42
+ "@vaadin/vaadin-material-styles": "23.1.0-alpha4",
43
+ "@vaadin/vaadin-overlay": "23.1.0-alpha4",
44
+ "@vaadin/vaadin-themable-mixin": "23.1.0-alpha4"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@esm-bundle/chai": "^4.3.4",
48
48
  "@vaadin/testing-helpers": "^0.3.2",
49
49
  "sinon": "^13.0.2"
50
50
  },
51
- "gitHead": "8c9e64e8dfa158dd52a9bf6da351ff038c88ca85"
51
+ "gitHead": "aacdb7fe09811894751f0378ff7fb66071892c71"
52
52
  }
@@ -20,17 +20,12 @@ registerStyles(
20
20
  height: var(--_vaadin-confirm-dialog-content-height);
21
21
  }
22
22
 
23
- /* Override display: contents */
24
- :host([has-header]) ::slotted([slot='header']) {
25
- display: block;
26
- }
27
-
28
23
  /* Make buttons clickable */
29
24
  [part='footer'] > * {
30
25
  pointer-events: all;
31
26
  }
32
27
  `,
33
- { moduleId: 'vaadin-confirm-dialog-overlay-styles' }
28
+ { moduleId: 'vaadin-confirm-dialog-overlay-styles' },
34
29
  );
35
30
 
36
31
  let memoizedTemplate;
@@ -149,13 +149,13 @@ declare class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(HT
149
149
  addEventListener<K extends keyof ConfirmDialogEventMap>(
150
150
  type: K,
151
151
  listener: (this: ConfirmDialog, ev: ConfirmDialogEventMap[K]) => void,
152
- options?: boolean | AddEventListenerOptions
152
+ options?: boolean | AddEventListenerOptions,
153
153
  ): void;
154
154
 
155
155
  removeEventListener<K extends keyof ConfirmDialogEventMap>(
156
156
  type: K,
157
157
  listener: (this: ConfirmDialog, ev: ConfirmDialogEventMap[K]) => void,
158
- options?: boolean | EventListenerOptions
158
+ options?: boolean | EventListenerOptions,
159
159
  ): void;
160
160
  }
161
161
 
@@ -106,7 +106,7 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
106
106
  opened: {
107
107
  type: Boolean,
108
108
  value: false,
109
- notify: true
109
+ notify: true,
110
110
  },
111
111
 
112
112
  /**
@@ -115,7 +115,7 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
115
115
  */
116
116
  header: {
117
117
  type: String,
118
- value: ''
118
+ value: '',
119
119
  },
120
120
 
121
121
  /**
@@ -123,7 +123,7 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
123
123
  */
124
124
  message: {
125
125
  type: String,
126
- value: ''
126
+ value: '',
127
127
  },
128
128
 
129
129
  /**
@@ -134,7 +134,7 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
134
134
  */
135
135
  confirmText: {
136
136
  type: String,
137
- value: 'Confirm'
137
+ value: 'Confirm',
138
138
  },
139
139
 
140
140
  /**
@@ -145,7 +145,7 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
145
145
  */
146
146
  confirmTheme: {
147
147
  type: String,
148
- value: 'primary'
148
+ value: 'primary',
149
149
  },
150
150
 
151
151
  /**
@@ -155,7 +155,7 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
155
155
  */
156
156
  noCloseOnEsc: {
157
157
  type: Boolean,
158
- value: false
158
+ value: false,
159
159
  },
160
160
 
161
161
  /**
@@ -165,7 +165,7 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
165
165
  reject: {
166
166
  type: Boolean,
167
167
  reflectToAttribute: true,
168
- value: false
168
+ value: false,
169
169
  },
170
170
 
171
171
  /**
@@ -176,7 +176,7 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
176
176
  */
177
177
  rejectText: {
178
178
  type: String,
179
- value: 'Reject'
179
+ value: 'Reject',
180
180
  },
181
181
 
182
182
  /**
@@ -187,7 +187,7 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
187
187
  */
188
188
  rejectTheme: {
189
189
  type: String,
190
- value: 'error tertiary'
190
+ value: 'error tertiary',
191
191
  },
192
192
 
193
193
  /**
@@ -197,7 +197,7 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
197
197
  cancel: {
198
198
  type: Boolean,
199
199
  reflectToAttribute: true,
200
- value: false
200
+ value: false,
201
201
  },
202
202
 
203
203
  /**
@@ -208,7 +208,7 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
208
208
  */
209
209
  cancelText: {
210
210
  type: String,
211
- value: 'Cancel'
211
+ value: 'Cancel',
212
212
  },
213
213
 
214
214
  /**
@@ -219,7 +219,7 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
219
219
  */
220
220
  cancelTheme: {
221
221
  type: String,
222
- value: 'tertiary'
222
+ value: 'tertiary',
223
223
  },
224
224
 
225
225
  /**
@@ -228,7 +228,7 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
228
228
  */
229
229
  _cancelButton: {
230
230
  type: HTMLElement,
231
- observer: '_cancelButtonChanged'
231
+ observer: '_cancelButtonChanged',
232
232
  },
233
233
 
234
234
  /**
@@ -237,7 +237,7 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
237
237
  */
238
238
  _confirmButton: {
239
239
  type: HTMLElement,
240
- observer: '_confirmButtonChanged'
240
+ observer: '_confirmButtonChanged',
241
241
  },
242
242
 
243
243
  /**
@@ -245,7 +245,7 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
245
245
  * @private
246
246
  */
247
247
  _headerNode: {
248
- type: HTMLElement
248
+ type: HTMLElement,
249
249
  },
250
250
 
251
251
  /**
@@ -253,7 +253,7 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
253
253
  * @private
254
254
  */
255
255
  _messageNode: {
256
- type: HTMLElement
256
+ type: HTMLElement,
257
257
  },
258
258
 
259
259
  /**
@@ -262,8 +262,8 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
262
262
  */
263
263
  _rejectButton: {
264
264
  type: HTMLElement,
265
- observer: '_rejectButtonChanged'
266
- }
265
+ observer: '_rejectButtonChanged',
266
+ },
267
267
  };
268
268
  }
269
269
 
@@ -285,7 +285,7 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
285
285
  '__updateCancelButton(_cancelButton, cancelText, cancelTheme, cancel)',
286
286
  '__updateHeaderNode(_headerNode, header)',
287
287
  '__updateMessageNode(_messageNode, message)',
288
- '__updateRejectButton(_rejectButton, rejectText, rejectTheme, reject)'
288
+ '__updateRejectButton(_rejectButton, rejectText, rejectTheme, reject)',
289
289
  ];
290
290
  }
291
291
 
@@ -322,7 +322,7 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
322
322
  const button = document.createElement('vaadin-button');
323
323
  button._isDefaultButton = true;
324
324
  return button;
325
- }
325
+ },
326
326
  };
327
327
  }
328
328
 
@@ -389,7 +389,7 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
389
389
  addedNodes.forEach((node) => {
390
390
  this.__slottedNodes.push(node);
391
391
 
392
- const isElementNode = node.nodeType == Node.ELEMENT_NODE;
392
+ const isElementNode = node.nodeType === Node.ELEMENT_NODE;
393
393
  const slotName = isElementNode ? node.getAttribute('slot') : '';
394
394
 
395
395
  // Handle named slots (header and buttons).
@@ -397,11 +397,11 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
397
397
  if (slotName.indexOf('button') >= 0) {
398
398
  const [button] = slotName.split('-');
399
399
  this[`_${button}Button`] = node;
400
- } else if (slotName == 'header') {
400
+ } else if (slotName === 'header') {
401
401
  this._headerNode = node;
402
402
  }
403
403
  } else {
404
- const isNotEmptyText = node.nodeType == Node.TEXT_NODE && node.textContent.trim() !== '';
404
+ const isNotEmptyText = node.nodeType === Node.TEXT_NODE && node.textContent.trim() !== '';
405
405
  // Handle default slot (message element).
406
406
  if (isNotEmptyText || (isElementNode && node.slot === '')) {
407
407
  this._messageNode = node;
@@ -5,7 +5,7 @@ import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themab
5
5
  registerStyles(
6
6
  'vaadin-confirm-dialog-overlay',
7
7
  css`
8
- :host([has-header]) [part='header'] ::slotted(h3) {
8
+ [part='header'] ::slotted(h3) {
9
9
  margin-top: 0 !important;
10
10
  margin-bottom: 0 !important;
11
11
  margin-inline-start: calc(var(--lumo-space-l) - var(--lumo-space-m));
@@ -27,7 +27,7 @@ registerStyles(
27
27
  }
28
28
 
29
29
  @media (max-width: 360px) {
30
- :host([has-footer]) [part='footer'] {
30
+ [part='footer'] {
31
31
  flex-direction: column-reverse;
32
32
  align-items: stretch;
33
33
  padding: var(--lumo-space-s) var(--lumo-space-l);
@@ -40,5 +40,5 @@ registerStyles(
40
40
  }
41
41
  }
42
42
  `,
43
- { moduleId: 'lumo-confirm-dialog-overlay' }
43
+ { moduleId: 'lumo-confirm-dialog-overlay' },
44
44
  );
@@ -31,5 +31,5 @@ registerStyles(
31
31
  }
32
32
  }
33
33
  `,
34
- { moduleId: 'material-confirm-dialog-overlay' }
34
+ { moduleId: 'material-confirm-dialog-overlay' },
35
35
  );