@vaadin/confirm-dialog 25.4.0-alpha2 → 25.4.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/custom-elements.json
CHANGED
|
@@ -96,6 +96,16 @@
|
|
|
96
96
|
"description": "Set the confirmation dialog title.",
|
|
97
97
|
"attribute": "header"
|
|
98
98
|
},
|
|
99
|
+
{
|
|
100
|
+
"kind": "field",
|
|
101
|
+
"name": "headingLevel",
|
|
102
|
+
"privacy": "public",
|
|
103
|
+
"type": {
|
|
104
|
+
"text": "number"
|
|
105
|
+
},
|
|
106
|
+
"description": "The ARIA heading level, used to set the `aria-level` attribute\non the header element. When not set, defaults to `1`.\n\nThis only affects the default header element, a custom slotted\nheader will not be altered.",
|
|
107
|
+
"attribute": "heading-level"
|
|
108
|
+
},
|
|
99
109
|
{
|
|
100
110
|
"kind": "field",
|
|
101
111
|
"name": "height",
|
|
@@ -268,6 +278,14 @@
|
|
|
268
278
|
"description": "Set the confirmation dialog title.",
|
|
269
279
|
"fieldName": "header"
|
|
270
280
|
},
|
|
281
|
+
{
|
|
282
|
+
"name": "heading-level",
|
|
283
|
+
"type": {
|
|
284
|
+
"text": "number"
|
|
285
|
+
},
|
|
286
|
+
"description": "The ARIA heading level, used to set the `aria-level` attribute\non the header element. When not set, defaults to `1`.\n\nThis only affects the default header element, a custom slotted\nheader will not be altered.",
|
|
287
|
+
"fieldName": "headingLevel"
|
|
288
|
+
},
|
|
271
289
|
{
|
|
272
290
|
"name": "height",
|
|
273
291
|
"type": {
|
|
@@ -472,6 +490,20 @@
|
|
|
472
490
|
"module": "src/vaadin-confirm-dialog-mixin.js"
|
|
473
491
|
}
|
|
474
492
|
},
|
|
493
|
+
{
|
|
494
|
+
"kind": "field",
|
|
495
|
+
"name": "headingLevel",
|
|
496
|
+
"privacy": "public",
|
|
497
|
+
"type": {
|
|
498
|
+
"text": "number"
|
|
499
|
+
},
|
|
500
|
+
"description": "The ARIA heading level, used to set the `aria-level` attribute\non the header element. When not set, defaults to `1`.\n\nThis only affects the default header element, a custom slotted\nheader will not be altered.",
|
|
501
|
+
"attribute": "heading-level",
|
|
502
|
+
"inheritedFrom": {
|
|
503
|
+
"name": "ConfirmDialogMixin",
|
|
504
|
+
"module": "src/vaadin-confirm-dialog-mixin.js"
|
|
505
|
+
}
|
|
506
|
+
},
|
|
475
507
|
{
|
|
476
508
|
"kind": "field",
|
|
477
509
|
"name": "height",
|
|
@@ -587,37 +619,25 @@
|
|
|
587
619
|
],
|
|
588
620
|
"events": [
|
|
589
621
|
{
|
|
590
|
-
"name": "cancel",
|
|
591
622
|
"type": {
|
|
592
|
-
"text": "
|
|
623
|
+
"text": "Event"
|
|
593
624
|
},
|
|
594
625
|
"description": "Fired when Cancel button or Escape key was pressed.",
|
|
595
|
-
"
|
|
596
|
-
"name": "ConfirmDialogMixin",
|
|
597
|
-
"module": "src/vaadin-confirm-dialog-mixin.js"
|
|
598
|
-
}
|
|
626
|
+
"name": "cancel"
|
|
599
627
|
},
|
|
600
628
|
{
|
|
601
|
-
"name": "closed",
|
|
602
629
|
"type": {
|
|
603
630
|
"text": "CustomEvent"
|
|
604
631
|
},
|
|
605
632
|
"description": "Fired when the confirm dialog is closed.",
|
|
606
|
-
"
|
|
607
|
-
"name": "ConfirmDialogMixin",
|
|
608
|
-
"module": "src/vaadin-confirm-dialog-mixin.js"
|
|
609
|
-
}
|
|
633
|
+
"name": "closed"
|
|
610
634
|
},
|
|
611
635
|
{
|
|
612
|
-
"name": "confirm",
|
|
613
636
|
"type": {
|
|
614
|
-
"text": "
|
|
637
|
+
"text": "Event"
|
|
615
638
|
},
|
|
616
639
|
"description": "Fired when Confirm button was pressed.",
|
|
617
|
-
"
|
|
618
|
-
"name": "ConfirmDialogMixin",
|
|
619
|
-
"module": "src/vaadin-confirm-dialog-mixin.js"
|
|
620
|
-
}
|
|
640
|
+
"name": "confirm"
|
|
621
641
|
},
|
|
622
642
|
{
|
|
623
643
|
"type": {
|
|
@@ -627,15 +647,11 @@
|
|
|
627
647
|
"name": "opened-changed"
|
|
628
648
|
},
|
|
629
649
|
{
|
|
630
|
-
"name": "reject",
|
|
631
650
|
"type": {
|
|
632
|
-
"text": "
|
|
651
|
+
"text": "Event"
|
|
633
652
|
},
|
|
634
653
|
"description": "Fired when Reject button was pressed.",
|
|
635
|
-
"
|
|
636
|
-
"name": "ConfirmDialogMixin",
|
|
637
|
-
"module": "src/vaadin-confirm-dialog-mixin.js"
|
|
638
|
-
}
|
|
654
|
+
"name": "reject"
|
|
639
655
|
}
|
|
640
656
|
],
|
|
641
657
|
"attributes": [
|
|
@@ -723,6 +739,18 @@
|
|
|
723
739
|
"module": "src/vaadin-confirm-dialog-mixin.js"
|
|
724
740
|
}
|
|
725
741
|
},
|
|
742
|
+
{
|
|
743
|
+
"name": "heading-level",
|
|
744
|
+
"type": {
|
|
745
|
+
"text": "number"
|
|
746
|
+
},
|
|
747
|
+
"description": "The ARIA heading level, used to set the `aria-level` attribute\non the header element. When not set, defaults to `1`.\n\nThis only affects the default header element, a custom slotted\nheader will not be altered.",
|
|
748
|
+
"fieldName": "headingLevel",
|
|
749
|
+
"inheritedFrom": {
|
|
750
|
+
"name": "ConfirmDialogMixin",
|
|
751
|
+
"module": "src/vaadin-confirm-dialog-mixin.js"
|
|
752
|
+
}
|
|
753
|
+
},
|
|
726
754
|
{
|
|
727
755
|
"name": "height",
|
|
728
756
|
"type": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/confirm-dialog",
|
|
3
|
-
"version": "25.4.0-
|
|
3
|
+
"version": "25.4.0-alpha4",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -35,20 +35,20 @@
|
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
38
|
-
"@vaadin/button": "25.4.0-
|
|
39
|
-
"@vaadin/component-base": "25.4.0-
|
|
40
|
-
"@vaadin/dialog": "25.4.0-
|
|
41
|
-
"@vaadin/overlay": "25.4.0-
|
|
42
|
-
"@vaadin/vaadin-themable-mixin": "25.4.0-
|
|
38
|
+
"@vaadin/button": "25.4.0-alpha4",
|
|
39
|
+
"@vaadin/component-base": "25.4.0-alpha4",
|
|
40
|
+
"@vaadin/dialog": "25.4.0-alpha4",
|
|
41
|
+
"@vaadin/overlay": "25.4.0-alpha4",
|
|
42
|
+
"@vaadin/vaadin-themable-mixin": "25.4.0-alpha4",
|
|
43
43
|
"lit": "^3.0.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@vaadin/a11y-base": "25.4.0-
|
|
47
|
-
"@vaadin/aura": "25.4.0-
|
|
48
|
-
"@vaadin/chai-plugins": "25.4.0-
|
|
49
|
-
"@vaadin/test-runner-commands": "25.4.0-
|
|
46
|
+
"@vaadin/a11y-base": "25.4.0-alpha4",
|
|
47
|
+
"@vaadin/aura": "25.4.0-alpha4",
|
|
48
|
+
"@vaadin/chai-plugins": "25.4.0-alpha4",
|
|
49
|
+
"@vaadin/test-runner-commands": "25.4.0-alpha4",
|
|
50
50
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
51
|
-
"@vaadin/vaadin-lumo-styles": "25.4.0-
|
|
51
|
+
"@vaadin/vaadin-lumo-styles": "25.4.0-alpha4",
|
|
52
52
|
"sinon": "^22.0.0"
|
|
53
53
|
},
|
|
54
54
|
"customElements": "custom-elements.json",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"web-types.json",
|
|
57
57
|
"web-types.lit.json"
|
|
58
58
|
],
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "7809e4c099538333a6dbd11d8da18a0c6ec30dad"
|
|
60
60
|
}
|
|
@@ -58,6 +58,17 @@ export declare class ConfirmDialogMixinClass {
|
|
|
58
58
|
*/
|
|
59
59
|
header: string;
|
|
60
60
|
|
|
61
|
+
/**
|
|
62
|
+
* The ARIA heading level, used to set the `aria-level` attribute
|
|
63
|
+
* on the header element. When not set, defaults to `1`.
|
|
64
|
+
*
|
|
65
|
+
* This only affects the default header element, a custom slotted
|
|
66
|
+
* header will not be altered.
|
|
67
|
+
*
|
|
68
|
+
* @attr {number} heading-level
|
|
69
|
+
*/
|
|
70
|
+
headingLevel: number | null | undefined;
|
|
71
|
+
|
|
61
72
|
/**
|
|
62
73
|
* Set the message or confirmation question.
|
|
63
74
|
*/
|
|
@@ -43,6 +43,19 @@ export const ConfirmDialogMixin = (superClass) =>
|
|
|
43
43
|
value: '',
|
|
44
44
|
},
|
|
45
45
|
|
|
46
|
+
/**
|
|
47
|
+
* The ARIA heading level, used to set the `aria-level` attribute
|
|
48
|
+
* on the header element. When not set, defaults to `1`.
|
|
49
|
+
*
|
|
50
|
+
* This only affects the default header element, a custom slotted
|
|
51
|
+
* header will not be altered.
|
|
52
|
+
*
|
|
53
|
+
* @attr {number} heading-level
|
|
54
|
+
*/
|
|
55
|
+
headingLevel: {
|
|
56
|
+
type: Number,
|
|
57
|
+
},
|
|
58
|
+
|
|
46
59
|
/**
|
|
47
60
|
* Set the message or confirmation question.
|
|
48
61
|
*/
|
|
@@ -187,7 +200,7 @@ export const ConfirmDialogMixin = (superClass) =>
|
|
|
187
200
|
return [
|
|
188
201
|
'__updateConfirmButton(_confirmButton, confirmText, confirmTheme)',
|
|
189
202
|
'__updateCancelButton(_cancelButton, cancelText, cancelTheme, cancelButtonVisible)',
|
|
190
|
-
'__updateHeaderNode(_headerNode, header)',
|
|
203
|
+
'__updateHeaderNode(_headerNode, header, headingLevel)',
|
|
191
204
|
'__updateMessageNodes(_messageNodes, message)',
|
|
192
205
|
'__updateRejectButton(_rejectButton, rejectText, rejectTheme, rejectButtonVisible)',
|
|
193
206
|
'__accessibleDescriptionRefChanged(_messageNodes, accessibleDescriptionRef)',
|
|
@@ -345,10 +358,11 @@ export const ConfirmDialogMixin = (superClass) =>
|
|
|
345
358
|
}
|
|
346
359
|
|
|
347
360
|
/** @private */
|
|
348
|
-
__updateHeaderNode(headerNode, header) {
|
|
349
|
-
// Only update
|
|
361
|
+
__updateHeaderNode(headerNode, header, headingLevel) {
|
|
362
|
+
// Only update the default header node.
|
|
350
363
|
if (headerNode && headerNode === this._headerController.defaultNode) {
|
|
351
364
|
headerNode.textContent = header;
|
|
365
|
+
headerNode.setAttribute('aria-level', headingLevel ?? 1);
|
|
352
366
|
}
|
|
353
367
|
}
|
|
354
368
|
|
|
@@ -48,11 +48,11 @@ class ConfirmDialogOverlay extends OverlayMixin(DirMixin(ThemableMixin(PolylitMi
|
|
|
48
48
|
return html`
|
|
49
49
|
<div part="backdrop" id="backdrop" ?hidden="${!this.withBackdrop}"></div>
|
|
50
50
|
<div part="overlay" id="overlay">
|
|
51
|
-
<header part="header"><slot name="header"></slot></header>
|
|
51
|
+
<header part="header" role="presentation"><slot name="header"></slot></header>
|
|
52
52
|
<div part="content" id="content">
|
|
53
53
|
<div part="message"><slot></slot></div>
|
|
54
54
|
</div>
|
|
55
|
-
<
|
|
55
|
+
<div part="footer" role="toolbar">
|
|
56
56
|
<div part="cancel-button" ?hidden="${!this.cancelButtonVisible}">
|
|
57
57
|
<slot name="cancel-button"></slot>
|
|
58
58
|
</div>
|
|
@@ -62,7 +62,7 @@ class ConfirmDialogOverlay extends OverlayMixin(DirMixin(ThemableMixin(PolylitMi
|
|
|
62
62
|
<div part="confirm-button">
|
|
63
63
|
<slot name="confirm-button"></slot>
|
|
64
64
|
</div>
|
|
65
|
-
</
|
|
65
|
+
</div>
|
|
66
66
|
</div>
|
|
67
67
|
`;
|
|
68
68
|
}
|
package/web-types.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": "25.4.0-
|
|
4
|
+
"version": "25.4.0-alpha4",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -73,6 +73,15 @@
|
|
|
73
73
|
]
|
|
74
74
|
}
|
|
75
75
|
},
|
|
76
|
+
{
|
|
77
|
+
"name": "heading-level",
|
|
78
|
+
"description": "The ARIA heading level, used to set the `aria-level` attribute\non the header element. When not set, defaults to `1`.\n\nThis only affects the default header element, a custom slotted\nheader will not be altered.",
|
|
79
|
+
"value": {
|
|
80
|
+
"type": [
|
|
81
|
+
"number"
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
},
|
|
76
85
|
{
|
|
77
86
|
"name": "height",
|
|
78
87
|
"description": "Set the height of the dialog.\nIf a unitless number is provided, pixels are assumed.",
|
|
@@ -220,6 +229,15 @@
|
|
|
220
229
|
]
|
|
221
230
|
}
|
|
222
231
|
},
|
|
232
|
+
{
|
|
233
|
+
"name": "headingLevel",
|
|
234
|
+
"description": "The ARIA heading level, used to set the `aria-level` attribute\non the header element. When not set, defaults to `1`.\n\nThis only affects the default header element, a custom slotted\nheader will not be altered.",
|
|
235
|
+
"value": {
|
|
236
|
+
"type": [
|
|
237
|
+
"number"
|
|
238
|
+
]
|
|
239
|
+
}
|
|
240
|
+
},
|
|
223
241
|
{
|
|
224
242
|
"name": "height",
|
|
225
243
|
"description": "Set the height of the dialog.\nIf a unitless number is provided, pixels are assumed.",
|
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": "25.4.0-
|
|
4
|
+
"version": "25.4.0-alpha4",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"framework": "lit",
|
|
7
7
|
"framework-config": {
|
|
@@ -68,6 +68,13 @@
|
|
|
68
68
|
"kind": "expression"
|
|
69
69
|
}
|
|
70
70
|
},
|
|
71
|
+
{
|
|
72
|
+
"name": ".headingLevel",
|
|
73
|
+
"description": "The ARIA heading level, used to set the `aria-level` attribute\non the header element. When not set, defaults to `1`.\n\nThis only affects the default header element, a custom slotted\nheader will not be altered.",
|
|
74
|
+
"value": {
|
|
75
|
+
"kind": "expression"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
71
78
|
{
|
|
72
79
|
"name": ".height",
|
|
73
80
|
"description": "Set the height of the dialog.\nIf a unitless number is provided, pixels are assumed.",
|