@vaadin/dialog 24.4.0-alpha2 → 24.4.0-alpha21
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/README.md +0 -1
- package/package.json +10 -10
- package/src/vaadin-dialog.js +1 -2
- package/src/vaadin-lit-dialog.js +2 -8
- package/theme/lumo/vaadin-dialog-styles.d.ts +3 -0
- package/theme/lumo/vaadin-dialog.d.ts +2 -0
- package/theme/lumo/vaadin-lit-dialog.d.ts +2 -0
- package/theme/material/vaadin-dialog-styles.d.ts +4 -0
- package/theme/material/vaadin-dialog.d.ts +2 -0
- package/theme/material/vaadin-lit-dialog.d.ts +2 -0
- package/web-types.json +2 -2
- package/web-types.lit.json +2 -2
package/README.md
CHANGED
|
@@ -5,7 +5,6 @@ A web component for presenting information and user interface elements in an ove
|
|
|
5
5
|
[Documentation + Live Demo ↗](https://vaadin.com/docs/latest/components/dialog)
|
|
6
6
|
|
|
7
7
|
[](https://www.npmjs.com/package/@vaadin/dialog)
|
|
8
|
-
[](https://discord.gg/PHmkCKC)
|
|
9
8
|
|
|
10
9
|
```html
|
|
11
10
|
<vaadin-dialog opened></vaadin-dialog>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/dialog",
|
|
3
|
-
"version": "24.4.0-
|
|
3
|
+
"version": "24.4.0-alpha21",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -39,24 +39,24 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
41
41
|
"@polymer/polymer": "^3.0.0",
|
|
42
|
-
"@vaadin/component-base": "24.4.0-
|
|
43
|
-
"@vaadin/lit-renderer": "24.4.0-
|
|
44
|
-
"@vaadin/overlay": "24.4.0-
|
|
45
|
-
"@vaadin/vaadin-lumo-styles": "24.4.0-
|
|
46
|
-
"@vaadin/vaadin-material-styles": "24.4.0-
|
|
47
|
-
"@vaadin/vaadin-themable-mixin": "24.4.0-
|
|
42
|
+
"@vaadin/component-base": "24.4.0-alpha21",
|
|
43
|
+
"@vaadin/lit-renderer": "24.4.0-alpha21",
|
|
44
|
+
"@vaadin/overlay": "24.4.0-alpha21",
|
|
45
|
+
"@vaadin/vaadin-lumo-styles": "24.4.0-alpha21",
|
|
46
|
+
"@vaadin/vaadin-material-styles": "24.4.0-alpha21",
|
|
47
|
+
"@vaadin/vaadin-themable-mixin": "24.4.0-alpha21",
|
|
48
48
|
"lit": "^3.0.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@esm-bundle/chai": "^4.3.4",
|
|
52
|
-
"@vaadin/a11y-base": "24.4.0-
|
|
52
|
+
"@vaadin/a11y-base": "24.4.0-alpha21",
|
|
53
53
|
"@vaadin/testing-helpers": "^0.6.0",
|
|
54
|
-
"@vaadin/text-area": "24.4.0-
|
|
54
|
+
"@vaadin/text-area": "24.4.0-alpha21",
|
|
55
55
|
"sinon": "^13.0.2"
|
|
56
56
|
},
|
|
57
57
|
"web-types": [
|
|
58
58
|
"web-types.json",
|
|
59
59
|
"web-types.lit.json"
|
|
60
60
|
],
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "2efeeebbeabddfde14c845ee4098f9e62e352ffe"
|
|
62
62
|
}
|
package/src/vaadin-dialog.js
CHANGED
|
@@ -103,6 +103,7 @@ class Dialog extends DialogDraggableMixin(
|
|
|
103
103
|
|
|
104
104
|
<vaadin-dialog-overlay
|
|
105
105
|
id="overlay"
|
|
106
|
+
role="dialog"
|
|
106
107
|
header-title="[[headerTitle]]"
|
|
107
108
|
on-opened-changed="_onOverlayOpened"
|
|
108
109
|
on-mousedown="_bringOverlayToFront"
|
|
@@ -147,8 +148,6 @@ class Dialog extends DialogDraggableMixin(
|
|
|
147
148
|
ready() {
|
|
148
149
|
super.ready();
|
|
149
150
|
|
|
150
|
-
this._overlayElement.setAttribute('role', 'dialog');
|
|
151
|
-
|
|
152
151
|
processTemplates(this);
|
|
153
152
|
}
|
|
154
153
|
|
package/src/vaadin-lit-dialog.js
CHANGED
|
@@ -23,7 +23,7 @@ export { DialogOverlay } from './vaadin-lit-dialog-overlay.js';
|
|
|
23
23
|
*
|
|
24
24
|
* ## Disclaimer
|
|
25
25
|
*
|
|
26
|
-
* This component is an experiment not
|
|
26
|
+
* This component is an experiment and not yet a part of Vaadin platform.
|
|
27
27
|
* There is no ETA regarding specific Vaadin version where it'll land.
|
|
28
28
|
* Feel free to try this code in your apps as per Apache 2.0 license.
|
|
29
29
|
*
|
|
@@ -72,6 +72,7 @@ class Dialog extends DialogDraggableMixin(
|
|
|
72
72
|
return html`
|
|
73
73
|
<vaadin-dialog-overlay
|
|
74
74
|
id="overlay"
|
|
75
|
+
role="dialog"
|
|
75
76
|
.owner="${this}"
|
|
76
77
|
.opened="${this.opened}"
|
|
77
78
|
.headerTitle="${this.headerTitle}"
|
|
@@ -91,13 +92,6 @@ class Dialog extends DialogDraggableMixin(
|
|
|
91
92
|
></vaadin-dialog-overlay>
|
|
92
93
|
`;
|
|
93
94
|
}
|
|
94
|
-
|
|
95
|
-
/** @protected */
|
|
96
|
-
ready() {
|
|
97
|
-
super.ready();
|
|
98
|
-
|
|
99
|
-
this._overlayElement.setAttribute('role', 'dialog');
|
|
100
|
-
}
|
|
101
95
|
}
|
|
102
96
|
|
|
103
97
|
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": "24.4.0-
|
|
4
|
+
"version": "24.4.0-alpha21",
|
|
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\n`<vaadin-dialog>` uses `<vaadin-dialog-overlay>` internal\nthemable component as the actual visible dialog overlay.\n\nSee [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.4.0-
|
|
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\n`<vaadin-dialog>` uses `<vaadin-dialog-overlay>` internal\nthemable component as the actual visible dialog overlay.\n\nSee [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.4.0-alpha21/#/elements/vaadin-overlay) documentation.\nfor `<vaadin-dialog-overlay>` parts.\n\nIn addition to `<vaadin-overlay>` parts, the following parts are available for styling:\n\nPart name | Description\n-----------------|-------------------------------------------\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\nNote: the `theme` attribute value set on `<vaadin-dialog>` is\npropagated to the internal `<vaadin-dialog-overlay>` component.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
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/dialog",
|
|
4
|
-
"version": "24.4.0-
|
|
4
|
+
"version": "24.4.0-alpha21",
|
|
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\n`<vaadin-dialog>` uses `<vaadin-dialog-overlay>` internal\nthemable component as the actual visible dialog overlay.\n\nSee [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.4.0-
|
|
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\n`<vaadin-dialog>` uses `<vaadin-dialog-overlay>` internal\nthemable component as the actual visible dialog overlay.\n\nSee [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.4.0-alpha21/#/elements/vaadin-overlay) documentation.\nfor `<vaadin-dialog-overlay>` parts.\n\nIn addition to `<vaadin-overlay>` parts, the following parts are available for styling:\n\nPart name | Description\n-----------------|-------------------------------------------\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\nNote: the `theme` attribute value set on `<vaadin-dialog>` is\npropagated to the internal `<vaadin-dialog-overlay>` component.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
20
20
|
"extension": true,
|
|
21
21
|
"attributes": [
|
|
22
22
|
{
|