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

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,11 +1,12 @@
1
1
  {
2
2
  "name": "@vaadin/confirm-dialog",
3
- "version": "23.1.0-alpha3",
3
+ "version": "23.1.0-beta2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
7
  "description": "vaadin-confirm-dialog",
8
8
  "license": "https://raw.githubusercontent.com/vaadin/web-components/master/packages/confirm-dialog/LICENSE",
9
+ "cvdlName": "vaadin-confirm-dialog",
9
10
  "repository": {
10
11
  "type": "git",
11
12
  "url": "https://github.com/vaadin/web-components.git",
@@ -34,19 +35,19 @@
34
35
  ],
35
36
  "dependencies": {
36
37
  "@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",
38
+ "@vaadin/button": "23.1.0-beta2",
39
+ "@vaadin/component-base": "23.1.0-beta2",
40
+ "@vaadin/dialog": "23.1.0-beta2",
40
41
  "@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"
42
+ "@vaadin/vaadin-lumo-styles": "23.1.0-beta2",
43
+ "@vaadin/vaadin-material-styles": "23.1.0-beta2",
44
+ "@vaadin/vaadin-overlay": "23.1.0-beta2",
45
+ "@vaadin/vaadin-themable-mixin": "23.1.0-beta2"
45
46
  },
46
47
  "devDependencies": {
47
48
  "@esm-bundle/chai": "^4.3.4",
48
49
  "@vaadin/testing-helpers": "^0.3.2",
49
50
  "sinon": "^13.0.2"
50
51
  },
51
- "gitHead": "8c9e64e8dfa158dd52a9bf6da351ff038c88ca85"
52
+ "gitHead": "f11f9245a0b5e6bf912725a501c27c24b74e7c8d"
52
53
  }
@@ -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
 
@@ -97,6 +97,10 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
97
97
  return 'vaadin-confirm-dialog';
98
98
  }
99
99
 
100
+ static get cvdlName() {
101
+ return 'vaadin-confirm-dialog';
102
+ }
103
+
100
104
  static get properties() {
101
105
  return {
102
106
  /**
@@ -106,7 +110,7 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
106
110
  opened: {
107
111
  type: Boolean,
108
112
  value: false,
109
- notify: true
113
+ notify: true,
110
114
  },
111
115
 
112
116
  /**
@@ -115,7 +119,7 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
115
119
  */
116
120
  header: {
117
121
  type: String,
118
- value: ''
122
+ value: '',
119
123
  },
120
124
 
121
125
  /**
@@ -123,7 +127,7 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
123
127
  */
124
128
  message: {
125
129
  type: String,
126
- value: ''
130
+ value: '',
127
131
  },
128
132
 
129
133
  /**
@@ -134,7 +138,7 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
134
138
  */
135
139
  confirmText: {
136
140
  type: String,
137
- value: 'Confirm'
141
+ value: 'Confirm',
138
142
  },
139
143
 
140
144
  /**
@@ -145,7 +149,7 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
145
149
  */
146
150
  confirmTheme: {
147
151
  type: String,
148
- value: 'primary'
152
+ value: 'primary',
149
153
  },
150
154
 
151
155
  /**
@@ -155,7 +159,7 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
155
159
  */
156
160
  noCloseOnEsc: {
157
161
  type: Boolean,
158
- value: false
162
+ value: false,
159
163
  },
160
164
 
161
165
  /**
@@ -165,7 +169,7 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
165
169
  reject: {
166
170
  type: Boolean,
167
171
  reflectToAttribute: true,
168
- value: false
172
+ value: false,
169
173
  },
170
174
 
171
175
  /**
@@ -176,7 +180,7 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
176
180
  */
177
181
  rejectText: {
178
182
  type: String,
179
- value: 'Reject'
183
+ value: 'Reject',
180
184
  },
181
185
 
182
186
  /**
@@ -187,7 +191,7 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
187
191
  */
188
192
  rejectTheme: {
189
193
  type: String,
190
- value: 'error tertiary'
194
+ value: 'error tertiary',
191
195
  },
192
196
 
193
197
  /**
@@ -197,7 +201,7 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
197
201
  cancel: {
198
202
  type: Boolean,
199
203
  reflectToAttribute: true,
200
- value: false
204
+ value: false,
201
205
  },
202
206
 
203
207
  /**
@@ -208,7 +212,7 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
208
212
  */
209
213
  cancelText: {
210
214
  type: String,
211
- value: 'Cancel'
215
+ value: 'Cancel',
212
216
  },
213
217
 
214
218
  /**
@@ -219,7 +223,7 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
219
223
  */
220
224
  cancelTheme: {
221
225
  type: String,
222
- value: 'tertiary'
226
+ value: 'tertiary',
223
227
  },
224
228
 
225
229
  /**
@@ -228,7 +232,7 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
228
232
  */
229
233
  _cancelButton: {
230
234
  type: HTMLElement,
231
- observer: '_cancelButtonChanged'
235
+ observer: '_cancelButtonChanged',
232
236
  },
233
237
 
234
238
  /**
@@ -237,7 +241,7 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
237
241
  */
238
242
  _confirmButton: {
239
243
  type: HTMLElement,
240
- observer: '_confirmButtonChanged'
244
+ observer: '_confirmButtonChanged',
241
245
  },
242
246
 
243
247
  /**
@@ -245,7 +249,7 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
245
249
  * @private
246
250
  */
247
251
  _headerNode: {
248
- type: HTMLElement
252
+ type: HTMLElement,
249
253
  },
250
254
 
251
255
  /**
@@ -253,7 +257,7 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
253
257
  * @private
254
258
  */
255
259
  _messageNode: {
256
- type: HTMLElement
260
+ type: HTMLElement,
257
261
  },
258
262
 
259
263
  /**
@@ -262,8 +266,8 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
262
266
  */
263
267
  _rejectButton: {
264
268
  type: HTMLElement,
265
- observer: '_rejectButtonChanged'
266
- }
269
+ observer: '_rejectButtonChanged',
270
+ },
267
271
  };
268
272
  }
269
273
 
@@ -285,7 +289,7 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
285
289
  '__updateCancelButton(_cancelButton, cancelText, cancelTheme, cancel)',
286
290
  '__updateHeaderNode(_headerNode, header)',
287
291
  '__updateMessageNode(_messageNode, message)',
288
- '__updateRejectButton(_rejectButton, rejectText, rejectTheme, reject)'
292
+ '__updateRejectButton(_rejectButton, rejectText, rejectTheme, reject)',
289
293
  ];
290
294
  }
291
295
 
@@ -322,7 +326,7 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
322
326
  const button = document.createElement('vaadin-button');
323
327
  button._isDefaultButton = true;
324
328
  return button;
325
- }
329
+ },
326
330
  };
327
331
  }
328
332
 
@@ -389,7 +393,7 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
389
393
  addedNodes.forEach((node) => {
390
394
  this.__slottedNodes.push(node);
391
395
 
392
- const isElementNode = node.nodeType == Node.ELEMENT_NODE;
396
+ const isElementNode = node.nodeType === Node.ELEMENT_NODE;
393
397
  const slotName = isElementNode ? node.getAttribute('slot') : '';
394
398
 
395
399
  // Handle named slots (header and buttons).
@@ -397,11 +401,11 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
397
401
  if (slotName.indexOf('button') >= 0) {
398
402
  const [button] = slotName.split('-');
399
403
  this[`_${button}Button`] = node;
400
- } else if (slotName == 'header') {
404
+ } else if (slotName === 'header') {
401
405
  this._headerNode = node;
402
406
  }
403
407
  } else {
404
- const isNotEmptyText = node.nodeType == Node.TEXT_NODE && node.textContent.trim() !== '';
408
+ const isNotEmptyText = node.nodeType === Node.TEXT_NODE && node.textContent.trim() !== '';
405
409
  // Handle default slot (message element).
406
410
  if (isNotEmptyText || (isElementNode && node.slot === '')) {
407
411
  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
  );