@vaadin/dialog 24.4.0-dev.b3e1d14600 → 24.5.0-alpha1
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/lit/renderer-directives.d.ts +1 -1
- package/src/lit/renderer-directives.js +1 -1
- package/src/vaadin-dialog-base-mixin.d.ts +1 -1
- package/src/vaadin-dialog-base-mixin.js +1 -1
- package/src/vaadin-dialog-draggable-mixin.d.ts +1 -1
- package/src/vaadin-dialog-draggable-mixin.js +1 -1
- package/src/vaadin-dialog-overlay-mixin.d.ts +1 -1
- package/src/vaadin-dialog-overlay-mixin.js +1 -1
- package/src/vaadin-dialog-overlay.d.ts +1 -1
- package/src/vaadin-dialog-overlay.js +1 -1
- package/src/vaadin-dialog-renderer-mixin.d.ts +1 -1
- package/src/vaadin-dialog-renderer-mixin.js +1 -1
- package/src/vaadin-dialog-resizable-mixin.d.ts +1 -1
- package/src/vaadin-dialog-resizable-mixin.js +1 -1
- package/src/vaadin-dialog-styles.d.ts +1 -1
- package/src/vaadin-dialog-styles.js +1 -1
- package/src/vaadin-dialog-utils.d.ts +1 -1
- package/src/vaadin-dialog-utils.js +1 -1
- package/src/vaadin-dialog.d.ts +1 -1
- package/src/vaadin-dialog.js +2 -3
- package/src/vaadin-lit-dialog-overlay.d.ts +1 -1
- package/src/vaadin-lit-dialog-overlay.js +1 -1
- package/src/vaadin-lit-dialog.d.ts +1 -1
- package/src/vaadin-lit-dialog.js +3 -9
- 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 +243 -0
- package/web-types.lit.json +118 -0
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.
|
|
3
|
+
"version": "24.5.0-alpha1",
|
|
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.
|
|
43
|
-
"@vaadin/lit-renderer": "24.
|
|
44
|
-
"@vaadin/overlay": "24.
|
|
45
|
-
"@vaadin/vaadin-lumo-styles": "24.
|
|
46
|
-
"@vaadin/vaadin-material-styles": "24.
|
|
47
|
-
"@vaadin/vaadin-themable-mixin": "24.
|
|
42
|
+
"@vaadin/component-base": "24.5.0-alpha1",
|
|
43
|
+
"@vaadin/lit-renderer": "24.5.0-alpha1",
|
|
44
|
+
"@vaadin/overlay": "24.5.0-alpha1",
|
|
45
|
+
"@vaadin/vaadin-lumo-styles": "24.5.0-alpha1",
|
|
46
|
+
"@vaadin/vaadin-material-styles": "24.5.0-alpha1",
|
|
47
|
+
"@vaadin/vaadin-themable-mixin": "24.5.0-alpha1",
|
|
48
48
|
"lit": "^3.0.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@esm-bundle/chai": "^4.3.4",
|
|
52
|
-
"@vaadin/a11y-base": "24.
|
|
52
|
+
"@vaadin/a11y-base": "24.5.0-alpha1",
|
|
53
53
|
"@vaadin/testing-helpers": "^0.6.0",
|
|
54
|
-
"@vaadin/text-area": "24.
|
|
54
|
+
"@vaadin/text-area": "24.5.0-alpha1",
|
|
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": "57806caac5468532a3b4e3dbdda730cd0fca193a"
|
|
62
62
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2017 -
|
|
3
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import type { Constructor } from '@open-wc/dedupe-mixin';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2017 -
|
|
3
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import type { Constructor } from '@open-wc/dedupe-mixin';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2017 -
|
|
3
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import { isTouch } from '@vaadin/component-base/src/browser-utils.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2017 -
|
|
3
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import type { Constructor } from '@open-wc/dedupe-mixin';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2017 -
|
|
3
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
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';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2017 -
|
|
3
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2017 -
|
|
3
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2017 -
|
|
3
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import type { Constructor } from '@open-wc/dedupe-mixin';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2017 -
|
|
3
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import type { Constructor } from '@open-wc/dedupe-mixin';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2017 -
|
|
3
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import { eventInWindow, getMouseOrFirstTouchEvent } from './vaadin-dialog-utils.js';
|
package/src/vaadin-dialog.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2017 -
|
|
3
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
package/src/vaadin-dialog.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2017 -
|
|
3
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import './vaadin-dialog-overlay.js';
|
|
@@ -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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2017 -
|
|
3
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import './vaadin-lit-dialog-overlay.js';
|
|
@@ -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
ADDED
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/web-types",
|
|
3
|
+
"name": "@vaadin/dialog",
|
|
4
|
+
"version": "24.5.0-alpha1",
|
|
5
|
+
"description-markup": "markdown",
|
|
6
|
+
"contributions": {
|
|
7
|
+
"html": {
|
|
8
|
+
"elements": [
|
|
9
|
+
{
|
|
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-alpha1/#/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
|
+
"attributes": [
|
|
13
|
+
{
|
|
14
|
+
"name": "opened",
|
|
15
|
+
"description": "True if the overlay is currently displayed.",
|
|
16
|
+
"value": {
|
|
17
|
+
"type": [
|
|
18
|
+
"boolean"
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"name": "no-close-on-outside-click",
|
|
24
|
+
"description": "Set to true to disable closing dialog on outside click",
|
|
25
|
+
"value": {
|
|
26
|
+
"type": [
|
|
27
|
+
"boolean"
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "no-close-on-esc",
|
|
33
|
+
"description": "Set to true to disable closing dialog on Escape press",
|
|
34
|
+
"value": {
|
|
35
|
+
"type": [
|
|
36
|
+
"boolean"
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"name": "modeless",
|
|
42
|
+
"description": "Set to true to remove backdrop and allow click events on background elements.",
|
|
43
|
+
"value": {
|
|
44
|
+
"type": [
|
|
45
|
+
"boolean"
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"name": "draggable",
|
|
51
|
+
"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.",
|
|
52
|
+
"value": {
|
|
53
|
+
"type": [
|
|
54
|
+
"boolean"
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"name": "header-title",
|
|
60
|
+
"description": "String used for rendering a dialog title.\n\nIf both `headerTitle` and `headerRenderer` are defined, the title\nand the elements created by the renderer will be placed next to\neach other, with the title coming first.\n\nWhen `headerTitle` is set, the attribute `has-title` is added to the overlay element.",
|
|
61
|
+
"value": {
|
|
62
|
+
"type": [
|
|
63
|
+
"string",
|
|
64
|
+
"null",
|
|
65
|
+
"undefined"
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"name": "resizable",
|
|
71
|
+
"description": "Set to true to enable resizing the dialog by dragging the corners and edges.",
|
|
72
|
+
"value": {
|
|
73
|
+
"type": [
|
|
74
|
+
"boolean"
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"name": "overlay-class",
|
|
80
|
+
"description": "A space-delimited list of CSS class names to set on the overlay element.\nThis property does not affect other CSS class names set manually via JS.\n\nNote, if the CSS class name was set with this property, clearing it will\nremove it from the overlay, even if the same class name was also added\nmanually, e.g. by using `classList.add()` in the `renderer` function.",
|
|
81
|
+
"value": {
|
|
82
|
+
"type": [
|
|
83
|
+
"string",
|
|
84
|
+
"null",
|
|
85
|
+
"undefined"
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"name": "aria-label",
|
|
91
|
+
"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.",
|
|
92
|
+
"value": {
|
|
93
|
+
"type": [
|
|
94
|
+
"string",
|
|
95
|
+
"null",
|
|
96
|
+
"undefined"
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"name": "theme",
|
|
102
|
+
"description": "The theme variants to apply to the component.",
|
|
103
|
+
"value": {
|
|
104
|
+
"type": [
|
|
105
|
+
"string",
|
|
106
|
+
"null",
|
|
107
|
+
"undefined"
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
],
|
|
112
|
+
"js": {
|
|
113
|
+
"properties": [
|
|
114
|
+
{
|
|
115
|
+
"name": "opened",
|
|
116
|
+
"description": "True if the overlay is currently displayed.",
|
|
117
|
+
"value": {
|
|
118
|
+
"type": [
|
|
119
|
+
"boolean"
|
|
120
|
+
]
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"name": "noCloseOnOutsideClick",
|
|
125
|
+
"description": "Set to true to disable closing dialog on outside click",
|
|
126
|
+
"value": {
|
|
127
|
+
"type": [
|
|
128
|
+
"boolean"
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"name": "noCloseOnEsc",
|
|
134
|
+
"description": "Set to true to disable closing dialog on Escape press",
|
|
135
|
+
"value": {
|
|
136
|
+
"type": [
|
|
137
|
+
"boolean"
|
|
138
|
+
]
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"name": "modeless",
|
|
143
|
+
"description": "Set to true to remove backdrop and allow click events on background elements.",
|
|
144
|
+
"value": {
|
|
145
|
+
"type": [
|
|
146
|
+
"boolean"
|
|
147
|
+
]
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"name": "draggable",
|
|
152
|
+
"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.",
|
|
153
|
+
"value": {
|
|
154
|
+
"type": [
|
|
155
|
+
"boolean"
|
|
156
|
+
]
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"name": "renderer",
|
|
161
|
+
"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.",
|
|
162
|
+
"value": {
|
|
163
|
+
"type": [
|
|
164
|
+
"DialogRenderer",
|
|
165
|
+
"undefined"
|
|
166
|
+
]
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"name": "headerTitle",
|
|
171
|
+
"description": "String used for rendering a dialog title.\n\nIf both `headerTitle` and `headerRenderer` are defined, the title\nand the elements created by the renderer will be placed next to\neach other, with the title coming first.\n\nWhen `headerTitle` is set, the attribute `has-title` is added to the overlay element.",
|
|
172
|
+
"value": {
|
|
173
|
+
"type": [
|
|
174
|
+
"string",
|
|
175
|
+
"null",
|
|
176
|
+
"undefined"
|
|
177
|
+
]
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"name": "headerRenderer",
|
|
182
|
+
"description": "Custom function for rendering the dialog header.\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.\n\nIf both `headerTitle` and `headerRenderer` are defined, the title\nand the elements created by the renderer will be placed next to\neach other, with the title coming first.\n\nWhen `headerRenderer` is set, the attribute `has-header` is added to the overlay element.",
|
|
183
|
+
"value": {
|
|
184
|
+
"type": [
|
|
185
|
+
"DialogRenderer",
|
|
186
|
+
"undefined"
|
|
187
|
+
]
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"name": "footerRenderer",
|
|
192
|
+
"description": "Custom function for rendering the dialog footer.\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.\n\nWhen `footerRenderer` is set, the attribute `has-footer` is added to the overlay element.",
|
|
193
|
+
"value": {
|
|
194
|
+
"type": [
|
|
195
|
+
"DialogRenderer",
|
|
196
|
+
"undefined"
|
|
197
|
+
]
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"name": "resizable",
|
|
202
|
+
"description": "Set to true to enable resizing the dialog by dragging the corners and edges.",
|
|
203
|
+
"value": {
|
|
204
|
+
"type": [
|
|
205
|
+
"boolean"
|
|
206
|
+
]
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"name": "overlayClass",
|
|
211
|
+
"description": "A space-delimited list of CSS class names to set on the overlay element.\nThis property does not affect other CSS class names set manually via JS.\n\nNote, if the CSS class name was set with this property, clearing it will\nremove it from the overlay, even if the same class name was also added\nmanually, e.g. by using `classList.add()` in the `renderer` function.",
|
|
212
|
+
"value": {
|
|
213
|
+
"type": [
|
|
214
|
+
"string",
|
|
215
|
+
"null",
|
|
216
|
+
"undefined"
|
|
217
|
+
]
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"name": "ariaLabel",
|
|
222
|
+
"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.",
|
|
223
|
+
"value": {
|
|
224
|
+
"type": [
|
|
225
|
+
"string",
|
|
226
|
+
"null",
|
|
227
|
+
"undefined"
|
|
228
|
+
]
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
],
|
|
232
|
+
"events": [
|
|
233
|
+
{
|
|
234
|
+
"name": "opened-changed",
|
|
235
|
+
"description": "Fired when the `opened` property changes."
|
|
236
|
+
}
|
|
237
|
+
]
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
]
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/web-types",
|
|
3
|
+
"name": "@vaadin/dialog",
|
|
4
|
+
"version": "24.5.0-alpha1",
|
|
5
|
+
"description-markup": "markdown",
|
|
6
|
+
"framework": "lit",
|
|
7
|
+
"framework-config": {
|
|
8
|
+
"enable-when": {
|
|
9
|
+
"node-packages": [
|
|
10
|
+
"lit"
|
|
11
|
+
]
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"contributions": {
|
|
15
|
+
"html": {
|
|
16
|
+
"elements": [
|
|
17
|
+
{
|
|
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-alpha1/#/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
|
+
"extension": true,
|
|
21
|
+
"attributes": [
|
|
22
|
+
{
|
|
23
|
+
"name": "?opened",
|
|
24
|
+
"description": "True if the overlay is currently displayed.",
|
|
25
|
+
"value": {
|
|
26
|
+
"kind": "expression"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": "?noCloseOnOutsideClick",
|
|
31
|
+
"description": "Set to true to disable closing dialog on outside click",
|
|
32
|
+
"value": {
|
|
33
|
+
"kind": "expression"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"name": "?noCloseOnEsc",
|
|
38
|
+
"description": "Set to true to disable closing dialog on Escape press",
|
|
39
|
+
"value": {
|
|
40
|
+
"kind": "expression"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "?modeless",
|
|
45
|
+
"description": "Set to true to remove backdrop and allow click events on background elements.",
|
|
46
|
+
"value": {
|
|
47
|
+
"kind": "expression"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": "?draggable",
|
|
52
|
+
"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.",
|
|
53
|
+
"value": {
|
|
54
|
+
"kind": "expression"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"name": "?resizable",
|
|
59
|
+
"description": "Set to true to enable resizing the dialog by dragging the corners and edges.",
|
|
60
|
+
"value": {
|
|
61
|
+
"kind": "expression"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"name": ".renderer",
|
|
66
|
+
"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.",
|
|
67
|
+
"value": {
|
|
68
|
+
"kind": "expression"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"name": ".headerTitle",
|
|
73
|
+
"description": "String used for rendering a dialog title.\n\nIf both `headerTitle` and `headerRenderer` are defined, the title\nand the elements created by the renderer will be placed next to\neach other, with the title coming first.\n\nWhen `headerTitle` is set, the attribute `has-title` is added to the overlay element.",
|
|
74
|
+
"value": {
|
|
75
|
+
"kind": "expression"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"name": ".headerRenderer",
|
|
80
|
+
"description": "Custom function for rendering the dialog header.\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.\n\nIf both `headerTitle` and `headerRenderer` are defined, the title\nand the elements created by the renderer will be placed next to\neach other, with the title coming first.\n\nWhen `headerRenderer` is set, the attribute `has-header` is added to the overlay element.",
|
|
81
|
+
"value": {
|
|
82
|
+
"kind": "expression"
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"name": ".footerRenderer",
|
|
87
|
+
"description": "Custom function for rendering the dialog footer.\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.\n\nWhen `footerRenderer` is set, the attribute `has-footer` is added to the overlay element.",
|
|
88
|
+
"value": {
|
|
89
|
+
"kind": "expression"
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"name": ".overlayClass",
|
|
94
|
+
"description": "A space-delimited list of CSS class names to set on the overlay element.\nThis property does not affect other CSS class names set manually via JS.\n\nNote, if the CSS class name was set with this property, clearing it will\nremove it from the overlay, even if the same class name was also added\nmanually, e.g. by using `classList.add()` in the `renderer` function.",
|
|
95
|
+
"value": {
|
|
96
|
+
"kind": "expression"
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"name": ".ariaLabel",
|
|
101
|
+
"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.",
|
|
102
|
+
"value": {
|
|
103
|
+
"kind": "expression"
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"name": "@opened-changed",
|
|
108
|
+
"description": "Fired when the `opened` property changes.",
|
|
109
|
+
"value": {
|
|
110
|
+
"kind": "expression"
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
]
|
|
114
|
+
}
|
|
115
|
+
]
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|