@vaadin/confirm-dialog 24.0.0-alpha1 → 24.0.0-alpha3
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 +9 -9
- package/src/vaadin-confirm-dialog.d.ts +2 -2
- package/src/vaadin-confirm-dialog.js +70 -119
- package/web-types.json +2 -2
- package/web-types.lit.json +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/confirm-dialog",
|
|
3
|
-
"version": "24.0.0-
|
|
3
|
+
"version": "24.0.0-alpha3",
|
|
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-
|
|
40
|
-
"@vaadin/component-base": "24.0.0-
|
|
41
|
-
"@vaadin/dialog": "24.0.0-
|
|
42
|
-
"@vaadin/overlay": "24.0.0-
|
|
43
|
-
"@vaadin/vaadin-lumo-styles": "24.0.0-
|
|
44
|
-
"@vaadin/vaadin-material-styles": "24.0.0-
|
|
45
|
-
"@vaadin/vaadin-themable-mixin": "24.0.0-
|
|
39
|
+
"@vaadin/button": "24.0.0-alpha3",
|
|
40
|
+
"@vaadin/component-base": "24.0.0-alpha3",
|
|
41
|
+
"@vaadin/dialog": "24.0.0-alpha3",
|
|
42
|
+
"@vaadin/overlay": "24.0.0-alpha3",
|
|
43
|
+
"@vaadin/vaadin-lumo-styles": "24.0.0-alpha3",
|
|
44
|
+
"@vaadin/vaadin-material-styles": "24.0.0-alpha3",
|
|
45
|
+
"@vaadin/vaadin-themable-mixin": "24.0.0-alpha3"
|
|
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": "
|
|
56
|
+
"gitHead": "7a013a3c5a56abd61dd4f7773c6ec77c3541bdf2"
|
|
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
|
|
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 {
|
|
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
|
|
62
|
+
* @mixes ControllerMixin
|
|
63
63
|
* @mixes ElementMixin
|
|
64
64
|
* @mixes ThemePropertyMixin
|
|
65
65
|
*/
|
|
66
|
-
class ConfirmDialog extends
|
|
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:
|
|
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:
|
|
239
|
-
observer: '_confirmButtonChanged',
|
|
237
|
+
type: Object,
|
|
240
238
|
},
|
|
241
239
|
|
|
242
240
|
/**
|
|
@@ -244,7 +242,7 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
|
|
|
244
242
|
* @private
|
|
245
243
|
*/
|
|
246
244
|
_headerNode: {
|
|
247
|
-
type:
|
|
245
|
+
type: Object,
|
|
248
246
|
},
|
|
249
247
|
|
|
250
248
|
/**
|
|
@@ -252,7 +250,7 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
|
|
|
252
250
|
* @private
|
|
253
251
|
*/
|
|
254
252
|
_messageNode: {
|
|
255
|
-
type:
|
|
253
|
+
type: Object,
|
|
256
254
|
},
|
|
257
255
|
|
|
258
256
|
/**
|
|
@@ -260,8 +258,7 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
|
|
|
260
258
|
* @private
|
|
261
259
|
*/
|
|
262
260
|
_rejectButton: {
|
|
263
|
-
type:
|
|
264
|
-
observer: '_rejectButtonChanged',
|
|
261
|
+
type: Object,
|
|
265
262
|
},
|
|
266
263
|
};
|
|
267
264
|
}
|
|
@@ -276,59 +273,22 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
|
|
|
276
273
|
];
|
|
277
274
|
}
|
|
278
275
|
|
|
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
276
|
constructor() {
|
|
317
277
|
super();
|
|
318
|
-
|
|
319
|
-
this.
|
|
320
|
-
|
|
321
|
-
|
|
278
|
+
|
|
279
|
+
this.__cancel = this.__cancel.bind(this);
|
|
280
|
+
this.__confirm = this.__confirm.bind(this);
|
|
281
|
+
this.__reject = this.__reject.bind(this);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
get __slottedNodes() {
|
|
285
|
+
return [this._headerNode, this._messageNode, this._cancelButton, this._confirmButton, this._rejectButton];
|
|
322
286
|
}
|
|
323
287
|
|
|
324
288
|
/** @protected */
|
|
325
289
|
ready() {
|
|
326
290
|
super.ready();
|
|
327
291
|
|
|
328
|
-
this.__boundCancel = this._cancel.bind(this);
|
|
329
|
-
this.__boundConfirm = this._confirm.bind(this);
|
|
330
|
-
this.__boundReject = this._reject.bind(this);
|
|
331
|
-
|
|
332
292
|
this._overlayElement = this.$.dialog.$.overlay;
|
|
333
293
|
this._overlayElement.addEventListener('vaadin-overlay-escape-press', this._escPressed.bind(this));
|
|
334
294
|
this._overlayElement.addEventListener('vaadin-overlay-open', () => this.__onDialogOpened());
|
|
@@ -339,6 +299,42 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
|
|
|
339
299
|
this._setDimension(name, this._dimensions[name]);
|
|
340
300
|
});
|
|
341
301
|
}
|
|
302
|
+
|
|
303
|
+
this._headerController = new SlotController(this, 'header', 'h3', {
|
|
304
|
+
initializer: (node) => {
|
|
305
|
+
this._headerNode = node;
|
|
306
|
+
},
|
|
307
|
+
});
|
|
308
|
+
this.addController(this._headerController);
|
|
309
|
+
|
|
310
|
+
this._messageController = new SlotController(this, '', 'div', {
|
|
311
|
+
initializer: (node) => {
|
|
312
|
+
this._messageNode = node;
|
|
313
|
+
},
|
|
314
|
+
});
|
|
315
|
+
this.addController(this._messageController);
|
|
316
|
+
|
|
317
|
+
// NOTE: order in which buttons are added should match the order of slots in template
|
|
318
|
+
this._cancelController = new SlotController(this, 'cancel-button', 'vaadin-button', {
|
|
319
|
+
initializer: (button) => {
|
|
320
|
+
this.__setupSlottedButton('cancel', button);
|
|
321
|
+
},
|
|
322
|
+
});
|
|
323
|
+
this.addController(this._cancelController);
|
|
324
|
+
|
|
325
|
+
this._rejectController = new SlotController(this, 'reject-button', 'vaadin-button', {
|
|
326
|
+
initializer: (button) => {
|
|
327
|
+
this.__setupSlottedButton('reject', button);
|
|
328
|
+
},
|
|
329
|
+
});
|
|
330
|
+
this.addController(this._rejectController);
|
|
331
|
+
|
|
332
|
+
this._confirmController = new SlotController(this, 'confirm-button', 'vaadin-button', {
|
|
333
|
+
initializer: (button) => {
|
|
334
|
+
this.__setupSlottedButton('confirm', button);
|
|
335
|
+
},
|
|
336
|
+
});
|
|
337
|
+
this.addController(this._confirmController);
|
|
342
338
|
}
|
|
343
339
|
|
|
344
340
|
/** @private */
|
|
@@ -358,73 +354,29 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
|
|
|
358
354
|
|
|
359
355
|
/** @private */
|
|
360
356
|
__onDialogClosed() {
|
|
361
|
-
const nodes = this.__slottedNodes;
|
|
362
|
-
|
|
363
|
-
// Reset the list of nodes, it will be re-created.
|
|
364
|
-
this.__slottedNodes = [];
|
|
365
|
-
|
|
366
357
|
// Move nodes from the overlay back to the host.
|
|
367
|
-
|
|
358
|
+
this.__slottedNodes.forEach((node) => {
|
|
368
359
|
this.appendChild(node);
|
|
369
360
|
});
|
|
370
361
|
}
|
|
371
362
|
|
|
372
363
|
/** @private */
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
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
|
-
}
|
|
364
|
+
__setupSlottedButton(type, button) {
|
|
365
|
+
const property = `_${type}Button`;
|
|
366
|
+
const listener = `__${type}`;
|
|
414
367
|
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
if (currentButton && currentButton.parentElement) {
|
|
418
|
-
currentButton.remove();
|
|
368
|
+
if (this[property] && this[property] !== button) {
|
|
369
|
+
this[property].remove();
|
|
419
370
|
}
|
|
420
371
|
|
|
421
|
-
|
|
372
|
+
button.addEventListener('click', this[listener]);
|
|
373
|
+
this[property] = button;
|
|
422
374
|
}
|
|
423
375
|
|
|
424
376
|
/** @private */
|
|
425
377
|
__updateCancelButton(button, cancelText, cancelTheme, showCancel) {
|
|
426
378
|
if (button) {
|
|
427
|
-
if (button.
|
|
379
|
+
if (button === this._cancelController.defaultNode) {
|
|
428
380
|
button.textContent = cancelText;
|
|
429
381
|
button.setAttribute('theme', cancelTheme);
|
|
430
382
|
}
|
|
@@ -434,7 +386,7 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
|
|
|
434
386
|
|
|
435
387
|
/** @private */
|
|
436
388
|
__updateConfirmButton(button, confirmText, confirmTheme) {
|
|
437
|
-
if (button && button.
|
|
389
|
+
if (button && button === this._confirmController.defaultNode) {
|
|
438
390
|
button.textContent = confirmText;
|
|
439
391
|
button.setAttribute('theme', confirmTheme);
|
|
440
392
|
}
|
|
@@ -443,15 +395,14 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
|
|
|
443
395
|
/** @private */
|
|
444
396
|
__updateHeaderNode(headerNode, header) {
|
|
445
397
|
// Only update text content for the default header node.
|
|
446
|
-
if (headerNode && headerNode === this.
|
|
398
|
+
if (headerNode && headerNode === this._headerController.defaultNode) {
|
|
447
399
|
headerNode.textContent = header;
|
|
448
400
|
}
|
|
449
401
|
}
|
|
450
402
|
|
|
451
403
|
/** @private */
|
|
452
404
|
__updateMessageNode(messageNode, message) {
|
|
453
|
-
|
|
454
|
-
if (messageNode && messageNode === this.__defaultMessage) {
|
|
405
|
+
if (messageNode && messageNode === this._messageController.defaultNode) {
|
|
455
406
|
messageNode.textContent = message;
|
|
456
407
|
}
|
|
457
408
|
}
|
|
@@ -459,7 +410,7 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
|
|
|
459
410
|
/** @private */
|
|
460
411
|
__updateRejectButton(button, rejectText, rejectTheme, showReject) {
|
|
461
412
|
if (button) {
|
|
462
|
-
if (button.
|
|
413
|
+
if (button === this._rejectController.defaultNode) {
|
|
463
414
|
button.textContent = rejectText;
|
|
464
415
|
button.setAttribute('theme', rejectTheme);
|
|
465
416
|
}
|
|
@@ -470,24 +421,24 @@ class ConfirmDialog extends SlotMixin(ElementMixin(ThemePropertyMixin(PolymerEle
|
|
|
470
421
|
/** @private */
|
|
471
422
|
_escPressed(event) {
|
|
472
423
|
if (!event.defaultPrevented) {
|
|
473
|
-
this.
|
|
424
|
+
this.__cancel();
|
|
474
425
|
}
|
|
475
426
|
}
|
|
476
427
|
|
|
477
428
|
/** @private */
|
|
478
|
-
|
|
429
|
+
__confirm() {
|
|
479
430
|
this.dispatchEvent(new CustomEvent('confirm'));
|
|
480
431
|
this.opened = false;
|
|
481
432
|
}
|
|
482
433
|
|
|
483
434
|
/** @private */
|
|
484
|
-
|
|
435
|
+
__cancel() {
|
|
485
436
|
this.dispatchEvent(new CustomEvent('cancel'));
|
|
486
437
|
this.opened = false;
|
|
487
438
|
}
|
|
488
439
|
|
|
489
440
|
/** @private */
|
|
490
|
-
|
|
441
|
+
__reject() {
|
|
491
442
|
this.dispatchEvent(new CustomEvent('reject'));
|
|
492
443
|
this.opened = false;
|
|
493
444
|
}
|
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-
|
|
4
|
+
"version": "24.0.0-alpha3",
|
|
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-
|
|
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-alpha3/#/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",
|
package/web-types.lit.json
CHANGED
|
@@ -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-
|
|
4
|
+
"version": "24.0.0-alpha3",
|
|
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-
|
|
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-alpha3/#/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
|
{
|