@vaadin/dialog 24.5.0-alpha5 → 24.5.0-alpha7
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/vaadin-dialog-base-mixin.d.ts +7 -0
- package/src/vaadin-dialog-base-mixin.js +10 -0
- package/src/vaadin-dialog.js +1 -1
- package/src/vaadin-lit-dialog.js +1 -1
- package/theme/lumo/vaadin-dialog-styles.js +3 -1
- package/web-types.json +24 -2
- package/web-types.lit.json +9 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/dialog",
|
|
3
|
-
"version": "24.5.0-
|
|
3
|
+
"version": "24.5.0-alpha7",
|
|
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.5.0-
|
|
43
|
-
"@vaadin/lit-renderer": "24.5.0-
|
|
44
|
-
"@vaadin/overlay": "24.5.0-
|
|
45
|
-
"@vaadin/vaadin-lumo-styles": "24.5.0-
|
|
46
|
-
"@vaadin/vaadin-material-styles": "24.5.0-
|
|
47
|
-
"@vaadin/vaadin-themable-mixin": "24.5.0-
|
|
42
|
+
"@vaadin/component-base": "24.5.0-alpha7",
|
|
43
|
+
"@vaadin/lit-renderer": "24.5.0-alpha7",
|
|
44
|
+
"@vaadin/overlay": "24.5.0-alpha7",
|
|
45
|
+
"@vaadin/vaadin-lumo-styles": "24.5.0-alpha7",
|
|
46
|
+
"@vaadin/vaadin-material-styles": "24.5.0-alpha7",
|
|
47
|
+
"@vaadin/vaadin-themable-mixin": "24.5.0-alpha7",
|
|
48
48
|
"lit": "^3.0.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@esm-bundle/chai": "^4.3.4",
|
|
52
|
-
"@vaadin/a11y-base": "24.5.0-
|
|
52
|
+
"@vaadin/a11y-base": "24.5.0-alpha7",
|
|
53
53
|
"@vaadin/testing-helpers": "^0.6.0",
|
|
54
|
-
"@vaadin/text-area": "24.5.0-
|
|
54
|
+
"@vaadin/text-area": "24.5.0-alpha7",
|
|
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": "89f77a69ae0eba6247f2b3084941f9395d7134e1"
|
|
62
62
|
}
|
|
@@ -31,4 +31,11 @@ export declare class DialogBaseMixinClass {
|
|
|
31
31
|
* Set to true to remove backdrop and allow click events on background elements.
|
|
32
32
|
*/
|
|
33
33
|
modeless: boolean;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* The `role` attribute value to be set on the overlay. Defaults to "dialog".
|
|
37
|
+
*
|
|
38
|
+
* @attr {string} overlay-role
|
|
39
|
+
*/
|
|
40
|
+
overlayRole: string;
|
|
34
41
|
}
|
|
@@ -49,6 +49,16 @@ export const DialogBaseMixin = (superClass) =>
|
|
|
49
49
|
type: Boolean,
|
|
50
50
|
value: false,
|
|
51
51
|
},
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* The `role` attribute value to be set on the overlay. Defaults to "dialog".
|
|
55
|
+
*
|
|
56
|
+
* @attr {string} overlay-role
|
|
57
|
+
*/
|
|
58
|
+
overlayRole: {
|
|
59
|
+
type: String,
|
|
60
|
+
value: 'dialog',
|
|
61
|
+
},
|
|
52
62
|
};
|
|
53
63
|
}
|
|
54
64
|
|
package/src/vaadin-dialog.js
CHANGED
|
@@ -104,7 +104,7 @@ class Dialog extends DialogDraggableMixin(
|
|
|
104
104
|
|
|
105
105
|
<vaadin-dialog-overlay
|
|
106
106
|
id="overlay"
|
|
107
|
-
role
|
|
107
|
+
role$="[[overlayRole]]"
|
|
108
108
|
header-title="[[headerTitle]]"
|
|
109
109
|
on-opened-changed="_onOverlayOpened"
|
|
110
110
|
on-mousedown="_bringOverlayToFront"
|
package/src/vaadin-lit-dialog.js
CHANGED
|
@@ -17,7 +17,9 @@ const dialogOverlay = css`
|
|
|
17
17
|
|
|
18
18
|
[part='overlay'] {
|
|
19
19
|
border-radius: var(--lumo-border-radius-l);
|
|
20
|
-
box-shadow:
|
|
20
|
+
box-shadow:
|
|
21
|
+
0 0 0 1px var(--lumo-shade-5pct),
|
|
22
|
+
var(--lumo-box-shadow-xl);
|
|
21
23
|
background-image: none;
|
|
22
24
|
outline: none;
|
|
23
25
|
-webkit-tap-highlight-color: transparent;
|
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.5.0-
|
|
4
|
+
"version": "24.5.0-alpha7",
|
|
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.5.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.5.0-alpha7/#/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",
|
|
@@ -46,6 +46,17 @@
|
|
|
46
46
|
]
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
|
+
{
|
|
50
|
+
"name": "overlay-role",
|
|
51
|
+
"description": "The `role` attribute value to be set on the overlay. Defaults to \"dialog\".",
|
|
52
|
+
"value": {
|
|
53
|
+
"type": [
|
|
54
|
+
"string",
|
|
55
|
+
"null",
|
|
56
|
+
"undefined"
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
},
|
|
49
60
|
{
|
|
50
61
|
"name": "draggable",
|
|
51
62
|
"description": "Set to true to enable repositioning the dialog by clicking and dragging.\n\nBy default, only the overlay area can be used to drag the element. But,\na child element can be marked as a draggable area by adding a\n\"`draggable`\" class to it, this will by default make all of its children draggable also.\nIf you want a child element to be draggable\nbut still have its children non-draggable (by default), mark it with\n\"`draggable-leaf-only`\" class name.",
|
|
@@ -147,6 +158,17 @@
|
|
|
147
158
|
]
|
|
148
159
|
}
|
|
149
160
|
},
|
|
161
|
+
{
|
|
162
|
+
"name": "overlayRole",
|
|
163
|
+
"description": "The `role` attribute value to be set on the overlay. Defaults to \"dialog\".",
|
|
164
|
+
"value": {
|
|
165
|
+
"type": [
|
|
166
|
+
"string",
|
|
167
|
+
"null",
|
|
168
|
+
"undefined"
|
|
169
|
+
]
|
|
170
|
+
}
|
|
171
|
+
},
|
|
150
172
|
{
|
|
151
173
|
"name": "draggable",
|
|
152
174
|
"description": "Set to true to enable repositioning the dialog by clicking and dragging.\n\nBy default, only the overlay area can be used to drag the element. But,\na child element can be marked as a draggable area by adding a\n\"`draggable`\" class to it, this will by default make all of its children draggable also.\nIf you want a child element to be draggable\nbut still have its children non-draggable (by default), mark it with\n\"`draggable-leaf-only`\" class name.",
|
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.5.0-
|
|
4
|
+
"version": "24.5.0-alpha7",
|
|
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.5.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.5.0-alpha7/#/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
|
{
|
|
@@ -61,6 +61,13 @@
|
|
|
61
61
|
"kind": "expression"
|
|
62
62
|
}
|
|
63
63
|
},
|
|
64
|
+
{
|
|
65
|
+
"name": ".overlayRole",
|
|
66
|
+
"description": "The `role` attribute value to be set on the overlay. Defaults to \"dialog\".",
|
|
67
|
+
"value": {
|
|
68
|
+
"kind": "expression"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
64
71
|
{
|
|
65
72
|
"name": ".renderer",
|
|
66
73
|
"description": "Custom function for rendering the content of the dialog.\nReceives two arguments:\n\n- `root` The root container DOM element. Append your content to it.\n- `dialog` The reference to the `<vaadin-dialog>` element.",
|