@vaadin/dialog 25.0.0-alpha8 → 25.0.0-alpha9
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 +10 -10
- package/src/styles/vaadin-dialog-overlay-base-styles.js +4 -0
- package/src/vaadin-dialog-base-mixin.d.ts +1 -1
- package/src/vaadin-dialog-base-mixin.js +15 -2
- package/src/vaadin-dialog-overlay-mixin.js +27 -8
- package/src/vaadin-dialog.d.ts +4 -17
- package/src/vaadin-dialog.js +28 -28
- package/web-types.json +4 -26
- package/web-types.lit.json +3 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/dialog",
|
|
3
|
-
"version": "25.0.0-
|
|
3
|
+
"version": "25.0.0-alpha9",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -39,17 +39,17 @@
|
|
|
39
39
|
],
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
42
|
-
"@vaadin/component-base": "25.0.0-
|
|
43
|
-
"@vaadin/lit-renderer": "25.0.0-
|
|
44
|
-
"@vaadin/overlay": "25.0.0-
|
|
45
|
-
"@vaadin/vaadin-lumo-styles": "25.0.0-
|
|
46
|
-
"@vaadin/vaadin-themable-mixin": "25.0.0-
|
|
42
|
+
"@vaadin/component-base": "25.0.0-alpha9",
|
|
43
|
+
"@vaadin/lit-renderer": "25.0.0-alpha9",
|
|
44
|
+
"@vaadin/overlay": "25.0.0-alpha9",
|
|
45
|
+
"@vaadin/vaadin-lumo-styles": "25.0.0-alpha9",
|
|
46
|
+
"@vaadin/vaadin-themable-mixin": "25.0.0-alpha9",
|
|
47
47
|
"lit": "^3.0.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@vaadin/a11y-base": "25.0.0-
|
|
51
|
-
"@vaadin/chai-plugins": "25.0.0-
|
|
52
|
-
"@vaadin/test-runner-commands": "25.0.0-
|
|
50
|
+
"@vaadin/a11y-base": "25.0.0-alpha9",
|
|
51
|
+
"@vaadin/chai-plugins": "25.0.0-alpha9",
|
|
52
|
+
"@vaadin/test-runner-commands": "25.0.0-alpha9",
|
|
53
53
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
54
54
|
"sinon": "^18.0.0"
|
|
55
55
|
},
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"web-types.json",
|
|
58
58
|
"web-types.lit.json"
|
|
59
59
|
],
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "bbe4720721e0955ffc87a79b412bee38b1f0eb1e"
|
|
61
61
|
}
|
|
@@ -64,6 +64,10 @@ export const dialogOverlayBase = css`
|
|
|
64
64
|
padding: var(--vaadin-dialog-padding, var(--vaadin-padding));
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
+
:host([theme~='no-padding']) [part='content'] {
|
|
68
|
+
padding: 0 !important;
|
|
69
|
+
}
|
|
70
|
+
|
|
67
71
|
:host(:is([has-header], [has-title])) [part='content'] {
|
|
68
72
|
padding-top: 0;
|
|
69
73
|
}
|
|
@@ -33,7 +33,7 @@ export declare class DialogBaseMixinClass {
|
|
|
33
33
|
modeless: boolean;
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
|
-
* The `role` attribute value to be set on the
|
|
36
|
+
* The `role` attribute value to be set on the dialog. Defaults to "dialog".
|
|
37
37
|
*
|
|
38
38
|
* @attr {string} overlay-role
|
|
39
39
|
*/
|
|
@@ -17,6 +17,7 @@ export const DialogBaseMixin = (superClass) =>
|
|
|
17
17
|
*/
|
|
18
18
|
opened: {
|
|
19
19
|
type: Boolean,
|
|
20
|
+
reflectToAttribute: true,
|
|
20
21
|
value: false,
|
|
21
22
|
notify: true,
|
|
22
23
|
sync: true,
|
|
@@ -76,13 +77,12 @@ export const DialogBaseMixin = (superClass) =>
|
|
|
76
77
|
},
|
|
77
78
|
|
|
78
79
|
/**
|
|
79
|
-
* The `role` attribute value to be set on the
|
|
80
|
+
* The `role` attribute value to be set on the dialog. Defaults to "dialog".
|
|
80
81
|
*
|
|
81
82
|
* @attr {string} overlay-role
|
|
82
83
|
*/
|
|
83
84
|
overlayRole: {
|
|
84
85
|
type: String,
|
|
85
|
-
value: 'dialog',
|
|
86
86
|
},
|
|
87
87
|
};
|
|
88
88
|
}
|
|
@@ -102,6 +102,19 @@ export const DialogBaseMixin = (superClass) =>
|
|
|
102
102
|
overlay.addEventListener('vaadin-overlay-closed', this.__handleOverlayClosed.bind(this));
|
|
103
103
|
|
|
104
104
|
this._overlayElement = overlay;
|
|
105
|
+
|
|
106
|
+
if (!this.hasAttribute('role')) {
|
|
107
|
+
this.role = 'dialog';
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/** @protected */
|
|
112
|
+
updated(props) {
|
|
113
|
+
super.updated(props);
|
|
114
|
+
|
|
115
|
+
if (props.has('overlayRole')) {
|
|
116
|
+
this.role = this.overlayRole || 'dialog';
|
|
117
|
+
}
|
|
105
118
|
}
|
|
106
119
|
|
|
107
120
|
/** @private */
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import { OverlayMixin } from '@vaadin/overlay/src/vaadin-overlay-mixin.js';
|
|
7
|
+
import { setOverlayStateAttribute } from '@vaadin/overlay/src/vaadin-overlay-utils.js';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* @polymerMixin
|
|
@@ -43,6 +44,24 @@ export const DialogOverlayMixin = (superClass) =>
|
|
|
43
44
|
];
|
|
44
45
|
}
|
|
45
46
|
|
|
47
|
+
/**
|
|
48
|
+
* Override method from OverlayFocusMixin to use owner as content root
|
|
49
|
+
* @protected
|
|
50
|
+
* @override
|
|
51
|
+
*/
|
|
52
|
+
get _contentRoot() {
|
|
53
|
+
return this.owner;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Override method from OverlayFocusMixin to use owner as modal root
|
|
58
|
+
* @protected
|
|
59
|
+
* @override
|
|
60
|
+
*/
|
|
61
|
+
get _modalRoot() {
|
|
62
|
+
return this.owner;
|
|
63
|
+
}
|
|
64
|
+
|
|
46
65
|
/** @protected */
|
|
47
66
|
ready() {
|
|
48
67
|
super.ready();
|
|
@@ -99,8 +118,8 @@ export const DialogOverlayMixin = (superClass) =>
|
|
|
99
118
|
this._oldOpenedFooterHeader = opened;
|
|
100
119
|
|
|
101
120
|
// Set attributes here to update styles before detecting content overflow
|
|
102
|
-
this
|
|
103
|
-
this
|
|
121
|
+
setOverlayStateAttribute(this, 'has-header', !!headerRenderer);
|
|
122
|
+
setOverlayStateAttribute(this, 'has-footer', !!footerRenderer);
|
|
104
123
|
|
|
105
124
|
if (headerRendererChanged) {
|
|
106
125
|
if (headerRenderer) {
|
|
@@ -134,7 +153,7 @@ export const DialogOverlayMixin = (superClass) =>
|
|
|
134
153
|
|
|
135
154
|
/** @private */
|
|
136
155
|
_headerTitleChanged(headerTitle, opened) {
|
|
137
|
-
this
|
|
156
|
+
setOverlayStateAttribute(this, 'has-title', !!headerTitle);
|
|
138
157
|
|
|
139
158
|
if (opened && (headerTitle || this._oldHeaderTitle)) {
|
|
140
159
|
this.requestContentUpdate();
|
|
@@ -150,7 +169,7 @@ export const DialogOverlayMixin = (superClass) =>
|
|
|
150
169
|
this.headerTitleElement.setAttribute('slot', 'title');
|
|
151
170
|
this.headerTitleElement.classList.add('draggable');
|
|
152
171
|
}
|
|
153
|
-
this.appendChild(this.headerTitleElement);
|
|
172
|
+
this.owner.appendChild(this.headerTitleElement);
|
|
154
173
|
this.headerTitleElement.textContent = this.headerTitle;
|
|
155
174
|
} else if (this.headerTitleElement) {
|
|
156
175
|
this.headerTitleElement.remove();
|
|
@@ -167,7 +186,7 @@ export const DialogOverlayMixin = (superClass) =>
|
|
|
167
186
|
if (this.headerContainer) {
|
|
168
187
|
// If a new renderer has been set, make sure to reattach the container
|
|
169
188
|
if (!this.headerContainer.parentElement) {
|
|
170
|
-
this.appendChild(this.headerContainer);
|
|
189
|
+
this.owner.appendChild(this.headerContainer);
|
|
171
190
|
}
|
|
172
191
|
|
|
173
192
|
if (this.headerRenderer) {
|
|
@@ -179,7 +198,7 @@ export const DialogOverlayMixin = (superClass) =>
|
|
|
179
198
|
if (this.footerContainer) {
|
|
180
199
|
// If a new renderer has been set, make sure to reattach the container
|
|
181
200
|
if (!this.footerContainer.parentElement) {
|
|
182
|
-
this.appendChild(this.footerContainer);
|
|
201
|
+
this.owner.appendChild(this.footerContainer);
|
|
183
202
|
}
|
|
184
203
|
|
|
185
204
|
if (this.footerRenderer) {
|
|
@@ -227,9 +246,9 @@ export const DialogOverlayMixin = (superClass) =>
|
|
|
227
246
|
|
|
228
247
|
const value = overflow.trim();
|
|
229
248
|
if (value.length > 0 && this.getAttribute('overflow') !== value) {
|
|
230
|
-
this
|
|
249
|
+
setOverlayStateAttribute(this, 'overflow', value);
|
|
231
250
|
} else if (value.length === 0 && this.hasAttribute('overflow')) {
|
|
232
|
-
this
|
|
251
|
+
setOverlayStateAttribute(this, 'overflow', null);
|
|
233
252
|
}
|
|
234
253
|
}
|
|
235
254
|
};
|
package/src/vaadin-dialog.d.ts
CHANGED
|
@@ -91,16 +91,13 @@ export type DialogEventMap = DialogCustomEventMap & HTMLElementEventMap;
|
|
|
91
91
|
*
|
|
92
92
|
* ### Styling
|
|
93
93
|
*
|
|
94
|
-
*
|
|
95
|
-
* themable component as the actual visible dialog overlay.
|
|
96
|
-
*
|
|
97
|
-
* See [`<vaadin-overlay>`](#/elements/vaadin-overlay) documentation.
|
|
98
|
-
* for `<vaadin-dialog-overlay>` parts.
|
|
99
|
-
*
|
|
100
|
-
* In addition to `<vaadin-overlay>` parts, the following parts are available for styling:
|
|
94
|
+
* The following shadow DOM parts are available for styling:
|
|
101
95
|
*
|
|
102
96
|
* Part name | Description
|
|
103
97
|
* -----------------|-------------------------------------------
|
|
98
|
+
* `backdrop` | Backdrop of the overlay
|
|
99
|
+
* `overlay` | The overlay container
|
|
100
|
+
* `content` | The overlay content
|
|
104
101
|
* `header` | Element wrapping title and header content
|
|
105
102
|
* `header-content` | Element wrapping the header content slot
|
|
106
103
|
* `title` | Element wrapping the title slot
|
|
@@ -115,9 +112,6 @@ export type DialogEventMap = DialogCustomEventMap & HTMLElementEventMap;
|
|
|
115
112
|
* `has-footer` | Set when the element has footer renderer
|
|
116
113
|
* `overflow` | Set to `top`, `bottom`, none or both
|
|
117
114
|
*
|
|
118
|
-
* Note: the `theme` attribute value set on `<vaadin-dialog>` is
|
|
119
|
-
* propagated to the internal `<vaadin-dialog-overlay>` component.
|
|
120
|
-
*
|
|
121
115
|
* See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
|
|
122
116
|
*
|
|
123
117
|
* @fires {CustomEvent} resize - Fired when the dialog resize is finished.
|
|
@@ -132,13 +126,6 @@ declare class Dialog extends DialogSizeMixin(
|
|
|
132
126
|
),
|
|
133
127
|
),
|
|
134
128
|
) {
|
|
135
|
-
/**
|
|
136
|
-
* Set the `aria-label` attribute for assistive technologies like
|
|
137
|
-
* screen readers. An empty string value for this property (the
|
|
138
|
-
* default) means that the `aria-label` attribute is not present.
|
|
139
|
-
*/
|
|
140
|
-
ariaLabel: string;
|
|
141
|
-
|
|
142
129
|
addEventListener<K extends keyof DialogEventMap>(
|
|
143
130
|
type: K,
|
|
144
131
|
listener: (this: Dialog, ev: DialogEventMap[K]) => void,
|
package/src/vaadin-dialog.js
CHANGED
|
@@ -48,16 +48,13 @@ export { DialogOverlay } from './vaadin-dialog-overlay.js';
|
|
|
48
48
|
*
|
|
49
49
|
* ### Styling
|
|
50
50
|
*
|
|
51
|
-
*
|
|
52
|
-
* themable component as the actual visible dialog overlay.
|
|
53
|
-
*
|
|
54
|
-
* See [`<vaadin-overlay>`](#/elements/vaadin-overlay) documentation.
|
|
55
|
-
* for `<vaadin-dialog-overlay>` parts.
|
|
56
|
-
*
|
|
57
|
-
* In addition to `<vaadin-overlay>` parts, the following parts are available for styling:
|
|
51
|
+
* The following shadow DOM parts are available for styling:
|
|
58
52
|
*
|
|
59
53
|
* Part name | Description
|
|
60
54
|
* -----------------|-------------------------------------------
|
|
55
|
+
* `backdrop` | Backdrop of the overlay
|
|
56
|
+
* `overlay` | The overlay container
|
|
57
|
+
* `content` | The overlay content
|
|
61
58
|
* `header` | Element wrapping title and header content
|
|
62
59
|
* `header-content` | Element wrapping the header content slot
|
|
63
60
|
* `title` | Element wrapping the title slot
|
|
@@ -72,9 +69,6 @@ export { DialogOverlay } from './vaadin-dialog-overlay.js';
|
|
|
72
69
|
* `has-footer` | Set when the element has footer renderer
|
|
73
70
|
* `overflow` | Set to `top`, `bottom`, none or both
|
|
74
71
|
*
|
|
75
|
-
* Note: the `theme` attribute value set on `<vaadin-dialog>` is
|
|
76
|
-
* propagated to the internal `<vaadin-dialog-overlay>` component.
|
|
77
|
-
*
|
|
78
72
|
* See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
|
|
79
73
|
*
|
|
80
74
|
* @fires {CustomEvent} resize - Fired when the dialog resize is finished.
|
|
@@ -108,32 +102,24 @@ class Dialog extends DialogSizeMixin(
|
|
|
108
102
|
|
|
109
103
|
static get styles() {
|
|
110
104
|
return css`
|
|
111
|
-
:host
|
|
105
|
+
:host([opened]),
|
|
106
|
+
:host([opening]),
|
|
107
|
+
:host([closing]) {
|
|
108
|
+
display: contents !important;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
:host,
|
|
112
|
+
:host([hidden]) {
|
|
112
113
|
display: none !important;
|
|
113
114
|
}
|
|
114
115
|
`;
|
|
115
116
|
}
|
|
116
117
|
|
|
117
|
-
static get properties() {
|
|
118
|
-
return {
|
|
119
|
-
/**
|
|
120
|
-
* Set the `aria-label` attribute for assistive technologies like
|
|
121
|
-
* screen readers. An empty string value for this property (the
|
|
122
|
-
* default) means that the `aria-label` attribute is not present.
|
|
123
|
-
*/
|
|
124
|
-
ariaLabel: {
|
|
125
|
-
type: String,
|
|
126
|
-
value: '',
|
|
127
|
-
},
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
|
|
131
118
|
/** @protected */
|
|
132
119
|
render() {
|
|
133
120
|
return html`
|
|
134
121
|
<vaadin-dialog-overlay
|
|
135
122
|
id="overlay"
|
|
136
|
-
role="${this.overlayRole}"
|
|
137
123
|
.owner="${this}"
|
|
138
124
|
.opened="${this.opened}"
|
|
139
125
|
.headerTitle="${this.headerTitle}"
|
|
@@ -144,15 +130,29 @@ class Dialog extends DialogSizeMixin(
|
|
|
144
130
|
@mousedown="${this._bringOverlayToFront}"
|
|
145
131
|
@touchstart="${this._bringOverlayToFront}"
|
|
146
132
|
theme="${ifDefined(this._theme)}"
|
|
147
|
-
aria-label="${ifDefined(this.ariaLabel || this.headerTitle)}"
|
|
148
133
|
.modeless="${this.modeless}"
|
|
149
134
|
.withBackdrop="${!this.modeless}"
|
|
150
135
|
?resizable="${this.resizable}"
|
|
151
136
|
restore-focus-on-close
|
|
152
137
|
focus-trap
|
|
153
|
-
|
|
138
|
+
exportparts="backdrop, overlay, header, title, header-content, content, footer"
|
|
139
|
+
>
|
|
140
|
+
<slot name="title" slot="title"></slot>
|
|
141
|
+
<slot name="header-content" slot="header-content"></slot>
|
|
142
|
+
<slot name="footer" slot="footer"></slot>
|
|
143
|
+
<slot></slot>
|
|
144
|
+
</vaadin-dialog-overlay>
|
|
154
145
|
`;
|
|
155
146
|
}
|
|
147
|
+
|
|
148
|
+
/** @protected */
|
|
149
|
+
updated(props) {
|
|
150
|
+
super.updated(props);
|
|
151
|
+
|
|
152
|
+
if (props.has('headerTitle')) {
|
|
153
|
+
this.ariaLabel = this.headerTitle;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
defineCustomElement(Dialog);
|
package/web-types.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/dialog",
|
|
4
|
-
"version": "25.0.0-
|
|
4
|
+
"version": "25.0.0-alpha9",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
8
8
|
"elements": [
|
|
9
9
|
{
|
|
10
10
|
"name": "vaadin-dialog",
|
|
11
|
-
"description": "`<vaadin-dialog>` is a Web Component for creating customized modal dialogs.\n\n### Rendering\n\nThe content of the dialog can be populated by using the renderer callback function.\n\nThe renderer function provides `root`, `dialog` arguments.\nGenerate DOM content, append it to the `root` element and control the state\nof the host element by accessing `dialog`. Before generating new content,\nusers are able to check if there is already content in `root` for reusing it.\n\n```html\n<vaadin-dialog id=\"dialog\"></vaadin-dialog>\n```\n```js\nconst dialog = document.querySelector('#dialog');\ndialog.renderer = function(root, dialog) {\n root.textContent = \"Sample dialog\";\n};\n```\n\nRenderer is called on the opening of the dialog.\nDOM generated during the renderer call can be reused\nin the next renderer call and will be provided with the `root` argument.\nOn first call it will be empty.\n\n### Styling\n\
|
|
11
|
+
"description": "`<vaadin-dialog>` is a Web Component for creating customized modal dialogs.\n\n### Rendering\n\nThe content of the dialog can be populated by using the renderer callback function.\n\nThe renderer function provides `root`, `dialog` arguments.\nGenerate DOM content, append it to the `root` element and control the state\nof the host element by accessing `dialog`. Before generating new content,\nusers are able to check if there is already content in `root` for reusing it.\n\n```html\n<vaadin-dialog id=\"dialog\"></vaadin-dialog>\n```\n```js\nconst dialog = document.querySelector('#dialog');\ndialog.renderer = function(root, dialog) {\n root.textContent = \"Sample dialog\";\n};\n```\n\nRenderer is called on the opening of the dialog.\nDOM generated during the renderer call can be reused\nin the next renderer call and will be provided with the `root` argument.\nOn first call it will be empty.\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n-----------------|-------------------------------------------\n`backdrop` | Backdrop of the overlay\n`overlay` | The overlay container\n`content` | The overlay content\n`header` | Element wrapping title and header content\n`header-content` | Element wrapping the header content slot\n`title` | Element wrapping the title slot\n`footer` | Element wrapping the footer slot\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n-----------------|--------------------------------------------\n`has-title` | Set when the element has a title\n`has-header` | Set when the element has header renderer\n`has-footer` | Set when the element has footer renderer\n`overflow` | Set to `top`, `bottom`, none or both\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
12
12
|
"attributes": [
|
|
13
13
|
{
|
|
14
14
|
"name": "opened",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
},
|
|
71
71
|
{
|
|
72
72
|
"name": "overlay-role",
|
|
73
|
-
"description": "The `role` attribute value to be set on the
|
|
73
|
+
"description": "The `role` attribute value to be set on the dialog. Defaults to \"dialog\".",
|
|
74
74
|
"value": {
|
|
75
75
|
"type": [
|
|
76
76
|
"string",
|
|
@@ -141,17 +141,6 @@
|
|
|
141
141
|
]
|
|
142
142
|
}
|
|
143
143
|
},
|
|
144
|
-
{
|
|
145
|
-
"name": "aria-label",
|
|
146
|
-
"description": "Set the `aria-label` attribute for assistive technologies like\nscreen readers. An empty string value for this property (the\ndefault) means that the `aria-label` attribute is not present.",
|
|
147
|
-
"value": {
|
|
148
|
-
"type": [
|
|
149
|
-
"string",
|
|
150
|
-
"null",
|
|
151
|
-
"undefined"
|
|
152
|
-
]
|
|
153
|
-
}
|
|
154
|
-
},
|
|
155
144
|
{
|
|
156
145
|
"name": "theme",
|
|
157
146
|
"description": "The theme variants to apply to the component.",
|
|
@@ -226,7 +215,7 @@
|
|
|
226
215
|
},
|
|
227
216
|
{
|
|
228
217
|
"name": "overlayRole",
|
|
229
|
-
"description": "The `role` attribute value to be set on the
|
|
218
|
+
"description": "The `role` attribute value to be set on the dialog. Defaults to \"dialog\".",
|
|
230
219
|
"value": {
|
|
231
220
|
"type": [
|
|
232
221
|
"string",
|
|
@@ -326,17 +315,6 @@
|
|
|
326
315
|
"undefined"
|
|
327
316
|
]
|
|
328
317
|
}
|
|
329
|
-
},
|
|
330
|
-
{
|
|
331
|
-
"name": "ariaLabel",
|
|
332
|
-
"description": "Set the `aria-label` attribute for assistive technologies like\nscreen readers. An empty string value for this property (the\ndefault) means that the `aria-label` attribute is not present.",
|
|
333
|
-
"value": {
|
|
334
|
-
"type": [
|
|
335
|
-
"string",
|
|
336
|
-
"null",
|
|
337
|
-
"undefined"
|
|
338
|
-
]
|
|
339
|
-
}
|
|
340
318
|
}
|
|
341
319
|
],
|
|
342
320
|
"events": [
|
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/dialog",
|
|
4
|
-
"version": "25.0.0-
|
|
4
|
+
"version": "25.0.0-alpha9",
|
|
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-dialog",
|
|
19
|
-
"description": "`<vaadin-dialog>` is a Web Component for creating customized modal dialogs.\n\n### Rendering\n\nThe content of the dialog can be populated by using the renderer callback function.\n\nThe renderer function provides `root`, `dialog` arguments.\nGenerate DOM content, append it to the `root` element and control the state\nof the host element by accessing `dialog`. Before generating new content,\nusers are able to check if there is already content in `root` for reusing it.\n\n```html\n<vaadin-dialog id=\"dialog\"></vaadin-dialog>\n```\n```js\nconst dialog = document.querySelector('#dialog');\ndialog.renderer = function(root, dialog) {\n root.textContent = \"Sample dialog\";\n};\n```\n\nRenderer is called on the opening of the dialog.\nDOM generated during the renderer call can be reused\nin the next renderer call and will be provided with the `root` argument.\nOn first call it will be empty.\n\n### Styling\n\
|
|
19
|
+
"description": "`<vaadin-dialog>` is a Web Component for creating customized modal dialogs.\n\n### Rendering\n\nThe content of the dialog can be populated by using the renderer callback function.\n\nThe renderer function provides `root`, `dialog` arguments.\nGenerate DOM content, append it to the `root` element and control the state\nof the host element by accessing `dialog`. Before generating new content,\nusers are able to check if there is already content in `root` for reusing it.\n\n```html\n<vaadin-dialog id=\"dialog\"></vaadin-dialog>\n```\n```js\nconst dialog = document.querySelector('#dialog');\ndialog.renderer = function(root, dialog) {\n root.textContent = \"Sample dialog\";\n};\n```\n\nRenderer is called on the opening of the dialog.\nDOM generated during the renderer call can be reused\nin the next renderer call and will be provided with the `root` argument.\nOn first call it will be empty.\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n-----------------|-------------------------------------------\n`backdrop` | Backdrop of the overlay\n`overlay` | The overlay container\n`content` | The overlay content\n`header` | Element wrapping title and header content\n`header-content` | Element wrapping the header content slot\n`title` | Element wrapping the title slot\n`footer` | Element wrapping the footer slot\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n-----------------|--------------------------------------------\n`has-title` | Set when the element has a title\n`has-header` | Set when the element has header renderer\n`has-footer` | Set when the element has footer renderer\n`overflow` | Set to `top`, `bottom`, none or both\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
20
20
|
"extension": true,
|
|
21
21
|
"attributes": [
|
|
22
22
|
{
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
},
|
|
78
78
|
{
|
|
79
79
|
"name": ".overlayRole",
|
|
80
|
-
"description": "The `role` attribute value to be set on the
|
|
80
|
+
"description": "The `role` attribute value to be set on the dialog. Defaults to \"dialog\".",
|
|
81
81
|
"value": {
|
|
82
82
|
"kind": "expression"
|
|
83
83
|
}
|
|
@@ -131,13 +131,6 @@
|
|
|
131
131
|
"kind": "expression"
|
|
132
132
|
}
|
|
133
133
|
},
|
|
134
|
-
{
|
|
135
|
-
"name": ".ariaLabel",
|
|
136
|
-
"description": "Set the `aria-label` attribute for assistive technologies like\nscreen readers. An empty string value for this property (the\ndefault) means that the `aria-label` attribute is not present.",
|
|
137
|
-
"value": {
|
|
138
|
-
"kind": "expression"
|
|
139
|
-
}
|
|
140
|
-
},
|
|
141
134
|
{
|
|
142
135
|
"name": "@closed",
|
|
143
136
|
"description": "Fired when the dialog is closed.",
|