@vaadin/confirm-dialog 24.0.0-alpha2 → 24.0.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": "24.0.0-alpha2",
3
+ "version": "24.0.0-alpha4",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -36,13 +36,13 @@
36
36
  ],
37
37
  "dependencies": {
38
38
  "@polymer/polymer": "^3.0.0",
39
- "@vaadin/button": "24.0.0-alpha2",
40
- "@vaadin/component-base": "24.0.0-alpha2",
41
- "@vaadin/dialog": "24.0.0-alpha2",
42
- "@vaadin/overlay": "24.0.0-alpha2",
43
- "@vaadin/vaadin-lumo-styles": "24.0.0-alpha2",
44
- "@vaadin/vaadin-material-styles": "24.0.0-alpha2",
45
- "@vaadin/vaadin-themable-mixin": "24.0.0-alpha2"
39
+ "@vaadin/button": "24.0.0-alpha4",
40
+ "@vaadin/component-base": "24.0.0-alpha4",
41
+ "@vaadin/dialog": "24.0.0-alpha4",
42
+ "@vaadin/overlay": "24.0.0-alpha4",
43
+ "@vaadin/vaadin-lumo-styles": "24.0.0-alpha4",
44
+ "@vaadin/vaadin-material-styles": "24.0.0-alpha4",
45
+ "@vaadin/vaadin-themable-mixin": "24.0.0-alpha4"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@esm-bundle/chai": "^4.3.4",
@@ -53,5 +53,5 @@
53
53
  "web-types.json",
54
54
  "web-types.lit.json"
55
55
  ],
56
- "gitHead": "0c16c01a6807e629a84f5a982793afecc1a7ced0"
56
+ "gitHead": "66be46e82c4d0a673859fbc9bdb1581dd89f360c"
57
57
  }
@@ -3,8 +3,8 @@
3
3
  * Copyright (c) 2018 - 2022 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
+ import { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';
6
7
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
7
- import { SlotMixin } from '@vaadin/component-base/src/slot-mixin.js';
8
8
  import { ThemePropertyMixin } from '@vaadin/vaadin-themable-mixin/vaadin-theme-property-mixin.js';
9
9
 
10
10
  /**
@@ -72,7 +72,7 @@ export type ConfirmDialogEventMap = ConfirmDialogCustomEventMap & HTMLElementEve
72
72
  * @fires {Event} reject - Fired when Reject button was pressed.
73
73
  * @fires {CustomEvent} opened-changed - Fired when the `opened` property changes.
74
74
  */
75
- declare class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(HTMLElement))) {
75
+ declare class ConfirmDialog extends ElementMixin(ThemePropertyMixin(ControllerMixin(HTMLElement))) {
76
76
  /**
77
77
  * True if the overlay is currently displayed.
78
78
  */
@@ -4,10 +4,10 @@
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import './vaadin-confirm-dialog-overlay.js';
7
- import { FlattenedNodesObserver } from '@polymer/polymer/lib/utils/flattened-nodes-observer.js';
8
7
  import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
8
+ import { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';
9
9
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
10
- import { SlotMixin } from '@vaadin/component-base/src/slot-mixin.js';
10
+ import { SlotController } from '@vaadin/component-base/src/slot-controller.js';
11
11
  import { ThemePropertyMixin } from '@vaadin/vaadin-themable-mixin/vaadin-theme-property-mixin.js';
12
12
 
13
13
  /**
@@ -59,11 +59,11 @@ import { ThemePropertyMixin } from '@vaadin/vaadin-themable-mixin/vaadin-theme-p
59
59
  * @fires {CustomEvent} opened-changed - Fired when the `opened` property changes.
60
60
  *
61
61
  * @extends HTMLElement
62
- * @mixes SlotMixin
62
+ * @mixes ControllerMixin
63
63
  * @mixes ElementMixin
64
64
  * @mixes ThemePropertyMixin
65
65
  */
66
- class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerElement))) {
66
+ class ConfirmDialog extends ElementMixin(ThemePropertyMixin(ControllerMixin(PolymerElement))) {
67
67
  static get template() {
68
68
  return html`
69
69
  <style>
@@ -226,8 +226,7 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
226
226
  * @private
227
227
  */
228
228
  _cancelButton: {
229
- type: HTMLElement,
230
- observer: '_cancelButtonChanged',
229
+ type: Object,
231
230
  },
232
231
 
233
232
  /**
@@ -235,8 +234,7 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
235
234
  * @private
236
235
  */
237
236
  _confirmButton: {
238
- type: HTMLElement,
239
- observer: '_confirmButtonChanged',
237
+ type: Object,
240
238
  },
241
239
 
242
240
  /**
@@ -244,15 +242,16 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
244
242
  * @private
245
243
  */
246
244
  _headerNode: {
247
- type: HTMLElement,
245
+ type: Object,
248
246
  },
249
247
 
250
248
  /**
251
- * A reference to the message which will be placed in the overlay default slot.
249
+ * A list of message nodes which will be placed in the overlay default slot.
252
250
  * @private
253
251
  */
254
- _messageNode: {
255
- type: HTMLElement,
252
+ _messageNodes: {
253
+ type: Array,
254
+ value: () => [],
256
255
  },
257
256
 
258
257
  /**
@@ -260,8 +259,7 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
260
259
  * @private
261
260
  */
262
261
  _rejectButton: {
263
- type: HTMLElement,
264
- observer: '_rejectButtonChanged',
262
+ type: Object,
265
263
  },
266
264
  };
267
265
  }
@@ -271,64 +269,27 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
271
269
  '__updateConfirmButton(_confirmButton, confirmText, confirmTheme)',
272
270
  '__updateCancelButton(_cancelButton, cancelText, cancelTheme, cancel)',
273
271
  '__updateHeaderNode(_headerNode, header)',
274
- '__updateMessageNode(_messageNode, message)',
272
+ '__updateMessageNodes(_messageNodes, message)',
275
273
  '__updateRejectButton(_rejectButton, rejectText, rejectTheme, reject)',
276
274
  ];
277
275
  }
278
276
 
279
- /** @protected */
280
- get slots() {
281
- // NOTE: order in which slots are listed matches the template.
282
- return {
283
- ...super.slots,
284
- header: () => {
285
- const h3 = document.createElement('h3');
286
- this.__defaultHeader = h3;
287
- return h3;
288
- },
289
- '': () => {
290
- const div = document.createElement('div');
291
- this.__defaultMessage = div;
292
- return div;
293
- },
294
- 'cancel-button': () => {
295
- const button = document.createElement('vaadin-button');
296
- button.setAttribute('theme', this.cancelTheme);
297
- button.textContent = this.cancelText;
298
- button._isDefaultButton = true;
299
- return button;
300
- },
301
- 'reject-button': () => {
302
- const button = document.createElement('vaadin-button');
303
- button.setAttribute('theme', this.rejectTheme);
304
- button.textContent = this.rejectText;
305
- button._isDefaultButton = true;
306
- return button;
307
- },
308
- 'confirm-button': () => {
309
- const button = document.createElement('vaadin-button');
310
- button._isDefaultButton = true;
311
- return button;
312
- },
313
- };
314
- }
315
-
316
277
  constructor() {
317
278
  super();
318
- this.__slottedNodes = [];
319
- this._observer = new FlattenedNodesObserver(this, (info) => {
320
- this.__onDomChange(info.addedNodes);
321
- });
279
+
280
+ this.__cancel = this.__cancel.bind(this);
281
+ this.__confirm = this.__confirm.bind(this);
282
+ this.__reject = this.__reject.bind(this);
283
+ }
284
+
285
+ get __slottedNodes() {
286
+ return [this._headerNode, ...this._messageNodes, this._cancelButton, this._confirmButton, this._rejectButton];
322
287
  }
323
288
 
324
289
  /** @protected */
325
290
  ready() {
326
291
  super.ready();
327
292
 
328
- this.__boundCancel = this._cancel.bind(this);
329
- this.__boundConfirm = this._confirm.bind(this);
330
- this.__boundReject = this._reject.bind(this);
331
-
332
293
  this._overlayElement = this.$.dialog.$.overlay;
333
294
  this._overlayElement.addEventListener('vaadin-overlay-escape-press', this._escPressed.bind(this));
334
295
  this._overlayElement.addEventListener('vaadin-overlay-open', () => this.__onDialogOpened());
@@ -339,6 +300,45 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
339
300
  this._setDimension(name, this._dimensions[name]);
340
301
  });
341
302
  }
303
+
304
+ this._headerController = new SlotController(this, 'header', 'h3', {
305
+ initializer: (node) => {
306
+ this._headerNode = node;
307
+ },
308
+ });
309
+ this.addController(this._headerController);
310
+
311
+ this._messageController = new SlotController(this, '', 'div', {
312
+ // Allow providing multiple custom nodes in the default slot
313
+ multiple: true,
314
+ observe: false,
315
+ initializer: (node) => {
316
+ this._messageNodes = [...this._messageNodes, node];
317
+ },
318
+ });
319
+ this.addController(this._messageController);
320
+
321
+ // NOTE: order in which buttons are added should match the order of slots in template
322
+ this._cancelController = new SlotController(this, 'cancel-button', 'vaadin-button', {
323
+ initializer: (button) => {
324
+ this.__setupSlottedButton('cancel', button);
325
+ },
326
+ });
327
+ this.addController(this._cancelController);
328
+
329
+ this._rejectController = new SlotController(this, 'reject-button', 'vaadin-button', {
330
+ initializer: (button) => {
331
+ this.__setupSlottedButton('reject', button);
332
+ },
333
+ });
334
+ this.addController(this._rejectController);
335
+
336
+ this._confirmController = new SlotController(this, 'confirm-button', 'vaadin-button', {
337
+ initializer: (button) => {
338
+ this.__setupSlottedButton('confirm', button);
339
+ },
340
+ });
341
+ this.addController(this._confirmController);
342
342
  }
343
343
 
344
344
  /** @private */
@@ -358,73 +358,29 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
358
358
 
359
359
  /** @private */
360
360
  __onDialogClosed() {
361
- const nodes = this.__slottedNodes;
362
-
363
- // Reset the list of nodes, it will be re-created.
364
- this.__slottedNodes = [];
365
-
366
361
  // Move nodes from the overlay back to the host.
367
- nodes.forEach((node) => {
362
+ this.__slottedNodes.forEach((node) => {
368
363
  this.appendChild(node);
369
364
  });
370
365
  }
371
366
 
372
367
  /** @private */
373
- __onDomChange(addedNodes) {
374
- // TODO: restore default element when a corresponding slotted element is removed.
375
- // Consider creating a controller to reuse custom helper logic from FieldMixin.
376
- addedNodes.forEach((node) => {
377
- this.__slottedNodes.push(node);
378
-
379
- const isElementNode = node.nodeType === Node.ELEMENT_NODE;
380
- const slotName = isElementNode ? node.getAttribute('slot') : '';
381
-
382
- // Handle named slots (header and buttons).
383
- if (slotName) {
384
- if (slotName.indexOf('button') >= 0) {
385
- const [button] = slotName.split('-');
386
- this[`_${button}Button`] = node;
387
- } else if (slotName === 'header') {
388
- this._headerNode = node;
389
- }
390
- } else {
391
- const isNotEmptyText = node.nodeType === Node.TEXT_NODE && node.textContent.trim() !== '';
392
- // Handle default slot (message element).
393
- if (isNotEmptyText || (isElementNode && node.slot === '')) {
394
- this._messageNode = node;
395
- }
396
- }
397
- });
398
- }
399
-
400
- /** @private */
401
- _cancelButtonChanged(button, oldButton) {
402
- this.__setupSlottedButton(button, oldButton, this.__boundCancel);
403
- }
404
-
405
- /** @private */
406
- _confirmButtonChanged(button, oldButton) {
407
- this.__setupSlottedButton(button, oldButton, this.__boundConfirm);
408
- }
409
-
410
- /** @private */
411
- _rejectButtonChanged(button, oldButton) {
412
- this.__setupSlottedButton(button, oldButton, this.__boundReject);
413
- }
368
+ __setupSlottedButton(type, button) {
369
+ const property = `_${type}Button`;
370
+ const listener = `__${type}`;
414
371
 
415
- /** @private */
416
- __setupSlottedButton(slottedButton, currentButton, clickListener) {
417
- if (currentButton && currentButton.parentElement) {
418
- currentButton.remove();
372
+ if (this[property] && this[property] !== button) {
373
+ this[property].remove();
419
374
  }
420
375
 
421
- slottedButton.addEventListener('click', clickListener);
376
+ button.addEventListener('click', this[listener]);
377
+ this[property] = button;
422
378
  }
423
379
 
424
380
  /** @private */
425
381
  __updateCancelButton(button, cancelText, cancelTheme, showCancel) {
426
382
  if (button) {
427
- if (button._isDefaultButton) {
383
+ if (button === this._cancelController.defaultNode) {
428
384
  button.textContent = cancelText;
429
385
  button.setAttribute('theme', cancelTheme);
430
386
  }
@@ -434,7 +390,7 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
434
390
 
435
391
  /** @private */
436
392
  __updateConfirmButton(button, confirmText, confirmTheme) {
437
- if (button && button._isDefaultButton) {
393
+ if (button && button === this._confirmController.defaultNode) {
438
394
  button.textContent = confirmText;
439
395
  button.setAttribute('theme', confirmTheme);
440
396
  }
@@ -443,23 +399,25 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
443
399
  /** @private */
444
400
  __updateHeaderNode(headerNode, header) {
445
401
  // Only update text content for the default header node.
446
- if (headerNode && headerNode === this.__defaultHeader) {
402
+ if (headerNode && headerNode === this._headerController.defaultNode) {
447
403
  headerNode.textContent = header;
448
404
  }
449
405
  }
450
406
 
451
407
  /** @private */
452
- __updateMessageNode(messageNode, message) {
453
- // Only update text content for the default message node.
454
- if (messageNode && messageNode === this.__defaultMessage) {
455
- messageNode.textContent = message;
408
+ __updateMessageNodes(nodes, message) {
409
+ if (nodes && nodes.length > 0) {
410
+ const defaultNode = nodes.find((node) => node === this._messageController.defaultNode);
411
+ if (defaultNode) {
412
+ defaultNode.textContent = message;
413
+ }
456
414
  }
457
415
  }
458
416
 
459
417
  /** @private */
460
418
  __updateRejectButton(button, rejectText, rejectTheme, showReject) {
461
419
  if (button) {
462
- if (button._isDefaultButton) {
420
+ if (button === this._rejectController.defaultNode) {
463
421
  button.textContent = rejectText;
464
422
  button.setAttribute('theme', rejectTheme);
465
423
  }
@@ -470,24 +428,24 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
470
428
  /** @private */
471
429
  _escPressed(event) {
472
430
  if (!event.defaultPrevented) {
473
- this._cancel();
431
+ this.__cancel();
474
432
  }
475
433
  }
476
434
 
477
435
  /** @private */
478
- _confirm() {
436
+ __confirm() {
479
437
  this.dispatchEvent(new CustomEvent('confirm'));
480
438
  this.opened = false;
481
439
  }
482
440
 
483
441
  /** @private */
484
- _cancel() {
442
+ __cancel() {
485
443
  this.dispatchEvent(new CustomEvent('cancel'));
486
444
  this.opened = false;
487
445
  }
488
446
 
489
447
  /** @private */
490
- _reject() {
448
+ __reject() {
491
449
  this.dispatchEvent(new CustomEvent('reject'));
492
450
  this.opened = false;
493
451
  }
package/web-types.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/confirm-dialog",
4
- "version": "24.0.0-alpha2",
4
+ "version": "24.0.0-alpha4",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "elements": [
9
9
  {
10
10
  "name": "vaadin-confirm-dialog",
11
- "description": "`<vaadin-confirm-dialog>` is a Web Component for showing alerts and asking for user confirmation.\n\n```\n<vaadin-confirm-dialog cancel>\n There are unsaved changes. Do you really want to leave?\n</vaadin-confirm-dialog>\n```\n\n### Styling\n\nThe `<vaadin-confirm-dialog>` is not themable. Apply styles to `<vaadin-confirm-dialog-overlay>`\ncomponent and use its shadow parts for styling.\nSee [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha2/#/elements/vaadin-overlay) for the overlay styling documentation.\n\nIn addition to `<vaadin-overlay>` parts, the following parts are available for theming:\n\nPart name | Description\n-----------------|-------------------------------------------\n`header` | The header element wrapper\n`message` | The message element wrapper\n`footer` | The footer element that wraps the buttons\n`cancel-button` | The \"Cancel\" button wrapper\n`confirm-button` | The \"Confirm\" button wrapper\n`reject-button` | The \"Reject\" button wrapper\n\nUse `confirmTheme`, `cancelTheme` and `rejectTheme` properties to customize buttons theme.\nAlso, the `theme` attribute value set on `<vaadin-confirm-dialog>` is propagated to the\n`<vaadin-confirm-dialog-overlay>` component.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.\n\n### Custom content\n\nThe following slots are available for providing custom content:\n\nSlot name | Description\n------------------|---------------------------\n`header` | Slot for header element\n`cancel-button` | Slot for \"Cancel\" button\n`confirm-button` | Slot for \"Confirm\" button\n`reject-button` | Slot for \"Reject\" button",
11
+ "description": "`<vaadin-confirm-dialog>` is a Web Component for showing alerts and asking for user confirmation.\n\n```\n<vaadin-confirm-dialog cancel>\n There are unsaved changes. Do you really want to leave?\n</vaadin-confirm-dialog>\n```\n\n### Styling\n\nThe `<vaadin-confirm-dialog>` is not themable. Apply styles to `<vaadin-confirm-dialog-overlay>`\ncomponent and use its shadow parts for styling.\nSee [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha4/#/elements/vaadin-overlay) for the overlay styling documentation.\n\nIn addition to `<vaadin-overlay>` parts, the following parts are available for theming:\n\nPart name | Description\n-----------------|-------------------------------------------\n`header` | The header element wrapper\n`message` | The message element wrapper\n`footer` | The footer element that wraps the buttons\n`cancel-button` | The \"Cancel\" button wrapper\n`confirm-button` | The \"Confirm\" button wrapper\n`reject-button` | The \"Reject\" button wrapper\n\nUse `confirmTheme`, `cancelTheme` and `rejectTheme` properties to customize buttons theme.\nAlso, the `theme` attribute value set on `<vaadin-confirm-dialog>` is propagated to the\n`<vaadin-confirm-dialog-overlay>` component.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.\n\n### Custom content\n\nThe following slots are available for providing custom content:\n\nSlot name | Description\n------------------|---------------------------\n`header` | Slot for header element\n`cancel-button` | Slot for \"Cancel\" button\n`confirm-button` | Slot for \"Confirm\" button\n`reject-button` | Slot for \"Reject\" button",
12
12
  "attributes": [
13
13
  {
14
14
  "name": "opened",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/confirm-dialog",
4
- "version": "24.0.0-alpha2",
4
+ "version": "24.0.0-alpha4",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -16,7 +16,7 @@
16
16
  "elements": [
17
17
  {
18
18
  "name": "vaadin-confirm-dialog",
19
- "description": "`<vaadin-confirm-dialog>` is a Web Component for showing alerts and asking for user confirmation.\n\n```\n<vaadin-confirm-dialog cancel>\n There are unsaved changes. Do you really want to leave?\n</vaadin-confirm-dialog>\n```\n\n### Styling\n\nThe `<vaadin-confirm-dialog>` is not themable. Apply styles to `<vaadin-confirm-dialog-overlay>`\ncomponent and use its shadow parts for styling.\nSee [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha2/#/elements/vaadin-overlay) for the overlay styling documentation.\n\nIn addition to `<vaadin-overlay>` parts, the following parts are available for theming:\n\nPart name | Description\n-----------------|-------------------------------------------\n`header` | The header element wrapper\n`message` | The message element wrapper\n`footer` | The footer element that wraps the buttons\n`cancel-button` | The \"Cancel\" button wrapper\n`confirm-button` | The \"Confirm\" button wrapper\n`reject-button` | The \"Reject\" button wrapper\n\nUse `confirmTheme`, `cancelTheme` and `rejectTheme` properties to customize buttons theme.\nAlso, the `theme` attribute value set on `<vaadin-confirm-dialog>` is propagated to the\n`<vaadin-confirm-dialog-overlay>` component.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.\n\n### Custom content\n\nThe following slots are available for providing custom content:\n\nSlot name | Description\n------------------|---------------------------\n`header` | Slot for header element\n`cancel-button` | Slot for \"Cancel\" button\n`confirm-button` | Slot for \"Confirm\" button\n`reject-button` | Slot for \"Reject\" button",
19
+ "description": "`<vaadin-confirm-dialog>` is a Web Component for showing alerts and asking for user confirmation.\n\n```\n<vaadin-confirm-dialog cancel>\n There are unsaved changes. Do you really want to leave?\n</vaadin-confirm-dialog>\n```\n\n### Styling\n\nThe `<vaadin-confirm-dialog>` is not themable. Apply styles to `<vaadin-confirm-dialog-overlay>`\ncomponent and use its shadow parts for styling.\nSee [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha4/#/elements/vaadin-overlay) for the overlay styling documentation.\n\nIn addition to `<vaadin-overlay>` parts, the following parts are available for theming:\n\nPart name | Description\n-----------------|-------------------------------------------\n`header` | The header element wrapper\n`message` | The message element wrapper\n`footer` | The footer element that wraps the buttons\n`cancel-button` | The \"Cancel\" button wrapper\n`confirm-button` | The \"Confirm\" button wrapper\n`reject-button` | The \"Reject\" button wrapper\n\nUse `confirmTheme`, `cancelTheme` and `rejectTheme` properties to customize buttons theme.\nAlso, the `theme` attribute value set on `<vaadin-confirm-dialog>` is propagated to the\n`<vaadin-confirm-dialog-overlay>` component.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.\n\n### Custom content\n\nThe following slots are available for providing custom content:\n\nSlot name | Description\n------------------|---------------------------\n`header` | Slot for header element\n`cancel-button` | Slot for \"Cancel\" button\n`confirm-button` | Slot for \"Confirm\" button\n`reject-button` | Slot for \"Reject\" button",
20
20
  "extension": true,
21
21
  "attributes": [
22
22
  {