@vaadin/dialog 25.0.0-alpha7 → 25.0.0-alpha8

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/dialog",
3
- "version": "25.0.0-alpha7",
3
+ "version": "25.0.0-alpha8",
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-alpha7",
43
- "@vaadin/lit-renderer": "25.0.0-alpha7",
44
- "@vaadin/overlay": "25.0.0-alpha7",
45
- "@vaadin/vaadin-lumo-styles": "25.0.0-alpha7",
46
- "@vaadin/vaadin-themable-mixin": "25.0.0-alpha7",
42
+ "@vaadin/component-base": "25.0.0-alpha8",
43
+ "@vaadin/lit-renderer": "25.0.0-alpha8",
44
+ "@vaadin/overlay": "25.0.0-alpha8",
45
+ "@vaadin/vaadin-lumo-styles": "25.0.0-alpha8",
46
+ "@vaadin/vaadin-themable-mixin": "25.0.0-alpha8",
47
47
  "lit": "^3.0.0"
48
48
  },
49
49
  "devDependencies": {
50
- "@vaadin/a11y-base": "25.0.0-alpha7",
51
- "@vaadin/chai-plugins": "25.0.0-alpha7",
52
- "@vaadin/test-runner-commands": "25.0.0-alpha7",
50
+ "@vaadin/a11y-base": "25.0.0-alpha8",
51
+ "@vaadin/chai-plugins": "25.0.0-alpha8",
52
+ "@vaadin/test-runner-commands": "25.0.0-alpha8",
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": "87f72707ce6866892f8be5782fa0da008e87dcbc"
60
+ "gitHead": "ebf53673d5f639d2b1b6f2b31f640f530643ee2f"
61
61
  }
@@ -8,208 +8,204 @@ import { css } from 'lit';
8
8
  import { overlayStyles } from '@vaadin/overlay/src/styles/vaadin-overlay-base-styles.js';
9
9
 
10
10
  export const dialogOverlayBase = css`
11
- @layer base {
12
- /* Optical centering */
13
- :host::before,
14
- :host::after {
15
- content: '';
16
- flex-basis: 0;
17
- flex-grow: 1;
18
- }
19
-
20
- :host::after {
21
- flex-grow: 1.1;
22
- }
23
-
24
- :host {
25
- cursor: default;
26
- }
27
-
28
- [part='overlay']:focus-visible {
29
- outline: var(--vaadin-focus-ring-width) solid var(--vaadin-focus-ring-color);
30
- }
31
-
32
- [part='overlay'] {
33
- background: var(--vaadin-dialog-background, var(--vaadin-background-color));
34
- background-origin: border-box;
35
- border: 0;
36
- box-shadow:
37
- 0 0 0 var(--vaadin-dialog-border-width, 1px) var(--vaadin-dialog-border-color, rgba(0, 0, 0, 0.1)),
38
- var(--vaadin-dialog-box-shadow, 0 8px 24px -4px rgba(0, 0, 0, 0.3));
39
- border-radius: var(--vaadin-dialog-border-radius, var(--vaadin-radius-l));
40
- width: max-content;
41
- min-width: min(var(--vaadin-dialog-min-width, 4em), 100%);
42
- max-width: var(--vaadin-dialog-max-width, 100%);
43
- max-height: 100%;
44
- }
45
-
46
- [part='header'],
47
- [part='header-content'],
48
- [part='footer'] {
49
- display: flex;
50
- align-items: center;
51
- flex-wrap: wrap;
52
- flex: none;
53
- pointer-events: none;
54
- z-index: 1;
55
- gap: var(--vaadin-dialog-toolbar-gap, var(--vaadin-gap-container-inline));
56
- }
57
-
58
- ::slotted(*) {
59
- pointer-events: auto;
60
- }
61
-
62
- [part='header'],
63
- [part='content'],
64
- [part='footer'] {
65
- padding: var(--vaadin-dialog-padding, var(--vaadin-padding));
66
- }
67
-
68
- :host(:is([has-header], [has-title])) [part='content'] {
69
- padding-top: 0;
70
- }
71
-
72
- :host([has-footer]) [part='content'] {
73
- padding-bottom: 0;
74
- }
75
-
76
- [part='header'] {
77
- flex-wrap: nowrap;
78
- }
79
-
80
- ::slotted([slot='header-content']),
81
- ::slotted([slot='title']),
82
- ::slotted([slot='footer']) {
83
- display: contents;
84
- }
85
-
86
- ::slotted([slot='title']) {
87
- font: inherit !important;
88
- color: inherit !important;
89
- overflow-wrap: anywhere;
90
- }
91
-
92
- [part='title'] {
93
- color: var(--vaadin-dialog-title-color, var(--vaadin-color));
94
- font-weight: var(--vaadin-dialog-title-font-weight, 600);
95
- font-size: var(--vaadin-dialog-title-font-size, 1em);
96
- line-height: var(--vaadin-dialog-title-line-height, inherit);
97
- }
98
-
99
- [part='header-content'] {
100
- flex: 1;
101
- }
102
-
103
- :host([has-title]) [part='header-content'],
104
- [part='footer'] {
105
- justify-content: flex-end;
106
- }
107
-
108
- :host(:not([has-title]):not([has-header])) [part='header'],
109
- :host(:not([has-header])) [part='header-content'],
110
- :host(:not([has-title])) [part='title'],
111
- :host(:not([has-footer])) [part='footer'] {
112
- display: none !important;
113
- }
11
+ /* Optical centering */
12
+ :host::before,
13
+ :host::after {
14
+ content: '';
15
+ flex-basis: 0;
16
+ flex-grow: 1;
17
+ }
18
+
19
+ :host::after {
20
+ flex-grow: 1.1;
21
+ }
22
+
23
+ :host {
24
+ cursor: default;
25
+ }
26
+
27
+ [part='overlay']:focus-visible {
28
+ outline: var(--vaadin-focus-ring-width) solid var(--vaadin-focus-ring-color);
29
+ }
30
+
31
+ [part='overlay'] {
32
+ background: var(--vaadin-dialog-background, var(--vaadin-background-color));
33
+ background-origin: border-box;
34
+ border: 0;
35
+ box-shadow:
36
+ 0 0 0 var(--vaadin-dialog-border-width, 1px) var(--vaadin-dialog-border-color, rgba(0, 0, 0, 0.1)),
37
+ var(--vaadin-dialog-box-shadow, 0 8px 24px -4px rgba(0, 0, 0, 0.3));
38
+ border-radius: var(--vaadin-dialog-border-radius, var(--vaadin-radius-l));
39
+ width: max-content;
40
+ min-width: min(var(--vaadin-dialog-min-width, 4em), 100%);
41
+ max-width: var(--vaadin-dialog-max-width, 100%);
42
+ max-height: 100%;
43
+ }
44
+
45
+ [part='header'],
46
+ [part='header-content'],
47
+ [part='footer'] {
48
+ display: flex;
49
+ align-items: center;
50
+ flex-wrap: wrap;
51
+ flex: none;
52
+ pointer-events: none;
53
+ z-index: 1;
54
+ gap: var(--vaadin-dialog-toolbar-gap, var(--vaadin-gap-container-inline));
55
+ }
56
+
57
+ ::slotted(*) {
58
+ pointer-events: auto;
59
+ }
60
+
61
+ [part='header'],
62
+ [part='content'],
63
+ [part='footer'] {
64
+ padding: var(--vaadin-dialog-padding, var(--vaadin-padding));
65
+ }
66
+
67
+ :host(:is([has-header], [has-title])) [part='content'] {
68
+ padding-top: 0;
69
+ }
70
+
71
+ :host([has-footer]) [part='content'] {
72
+ padding-bottom: 0;
73
+ }
74
+
75
+ [part='header'] {
76
+ flex-wrap: nowrap;
77
+ }
78
+
79
+ ::slotted([slot='header-content']),
80
+ ::slotted([slot='title']),
81
+ ::slotted([slot='footer']) {
82
+ display: contents;
83
+ }
84
+
85
+ ::slotted([slot='title']) {
86
+ font: inherit !important;
87
+ color: inherit !important;
88
+ overflow-wrap: anywhere;
89
+ }
90
+
91
+ [part='title'] {
92
+ color: var(--vaadin-dialog-title-color, var(--vaadin-color));
93
+ font-weight: var(--vaadin-dialog-title-font-weight, 600);
94
+ font-size: var(--vaadin-dialog-title-font-size, 1em);
95
+ line-height: var(--vaadin-dialog-title-line-height, inherit);
96
+ }
97
+
98
+ [part='header-content'] {
99
+ flex: 1;
100
+ }
101
+
102
+ :host([has-title]) [part='header-content'],
103
+ [part='footer'] {
104
+ justify-content: flex-end;
105
+ }
106
+
107
+ :host(:not([has-title]):not([has-header])) [part='header'],
108
+ :host(:not([has-header])) [part='header-content'],
109
+ :host(:not([has-title])) [part='title'],
110
+ :host(:not([has-footer])) [part='footer'] {
111
+ display: none !important;
114
112
  }
115
113
  `;
116
114
 
117
115
  const dialogResizableOverlay = css`
118
- @layer base {
119
- [part='overlay'] {
120
- position: relative;
121
- overflow: visible;
122
- display: flex;
123
- }
124
-
125
- :host([has-bounds-set]) [part='overlay'] {
126
- min-width: 0;
127
- max-width: none;
128
- max-height: none;
129
- }
130
-
131
- /* Content part scrolls by default */
132
- [part='content'] {
133
- flex: 1;
134
- min-height: 0;
135
- }
136
-
137
- :host([overflow]) [part='content'] {
138
- overflow: auto;
139
- overscroll-behavior: contain;
140
- }
141
-
142
- .resizer-container {
143
- display: flex;
144
- flex-direction: column;
145
- flex-grow: 1;
146
- border-radius: inherit;
147
- max-width: 100%;
148
- }
149
-
150
- :host(:not([resizable])) .resizer {
151
- display: none;
152
- }
153
-
154
- .resizer {
155
- position: absolute;
156
- height: 16px;
157
- width: 16px;
158
- }
159
-
160
- .resizer.edge {
161
- height: 8px;
162
- width: 8px;
163
- inset: -4px;
164
- }
165
-
166
- .resizer.edge.n {
167
- width: auto;
168
- bottom: auto;
169
- cursor: ns-resize;
170
- }
171
-
172
- .resizer.ne {
173
- top: -4px;
174
- right: -4px;
175
- cursor: nesw-resize;
176
- }
177
-
178
- .resizer.edge.e {
179
- height: auto;
180
- left: auto;
181
- cursor: ew-resize;
182
- }
183
-
184
- .resizer.se {
185
- bottom: -4px;
186
- right: -4px;
187
- cursor: nwse-resize;
188
- }
189
-
190
- .resizer.edge.s {
191
- width: auto;
192
- top: auto;
193
- cursor: ns-resize;
194
- }
195
-
196
- .resizer.sw {
197
- bottom: -4px;
198
- left: -4px;
199
- cursor: nesw-resize;
200
- }
201
-
202
- .resizer.edge.w {
203
- height: auto;
204
- right: auto;
205
- cursor: ew-resize;
206
- }
207
-
208
- .resizer.nw {
209
- top: -4px;
210
- left: -4px;
211
- cursor: nwse-resize;
212
- }
116
+ [part='overlay'] {
117
+ position: relative;
118
+ overflow: visible;
119
+ display: flex;
120
+ }
121
+
122
+ :host([has-bounds-set]) [part='overlay'] {
123
+ min-width: 0;
124
+ max-width: none;
125
+ max-height: none;
126
+ }
127
+
128
+ /* Content part scrolls by default */
129
+ [part='content'] {
130
+ flex: 1;
131
+ min-height: 0;
132
+ }
133
+
134
+ :host([overflow]) [part='content'] {
135
+ overflow: auto;
136
+ overscroll-behavior: contain;
137
+ }
138
+
139
+ .resizer-container {
140
+ display: flex;
141
+ flex-direction: column;
142
+ flex-grow: 1;
143
+ border-radius: inherit;
144
+ max-width: 100%;
145
+ }
146
+
147
+ :host(:not([resizable])) .resizer {
148
+ display: none;
149
+ }
150
+
151
+ .resizer {
152
+ position: absolute;
153
+ height: 16px;
154
+ width: 16px;
155
+ }
156
+
157
+ .resizer.edge {
158
+ height: 8px;
159
+ width: 8px;
160
+ inset: -4px;
161
+ }
162
+
163
+ .resizer.edge.n {
164
+ width: auto;
165
+ bottom: auto;
166
+ cursor: ns-resize;
167
+ }
168
+
169
+ .resizer.ne {
170
+ top: -4px;
171
+ right: -4px;
172
+ cursor: nesw-resize;
173
+ }
174
+
175
+ .resizer.edge.e {
176
+ height: auto;
177
+ left: auto;
178
+ cursor: ew-resize;
179
+ }
180
+
181
+ .resizer.se {
182
+ bottom: -4px;
183
+ right: -4px;
184
+ cursor: nwse-resize;
185
+ }
186
+
187
+ .resizer.edge.s {
188
+ width: auto;
189
+ top: auto;
190
+ cursor: ns-resize;
191
+ }
192
+
193
+ .resizer.sw {
194
+ bottom: -4px;
195
+ left: -4px;
196
+ cursor: nesw-resize;
197
+ }
198
+
199
+ .resizer.edge.w {
200
+ height: auto;
201
+ right: auto;
202
+ cursor: ew-resize;
203
+ }
204
+
205
+ .resizer.nw {
206
+ top: -4px;
207
+ left: -4px;
208
+ cursor: nwse-resize;
213
209
  }
214
210
  `;
215
211
 
@@ -58,16 +58,4 @@ export declare class DialogBaseMixinClass {
58
58
  * overlay from stretching all the way to the left of the viewport).
59
59
  */
60
60
  left: string;
61
-
62
- /**
63
- * Set the width of the overlay.
64
- * If a unitless number is provided, pixels are assumed.
65
- */
66
- width: string | null;
67
-
68
- /**
69
- * Set the height of the overlay.
70
- * If a unitless number is provided, pixels are assumed.
71
- */
72
- height: string | null;
73
61
  }
@@ -75,22 +75,6 @@ export const DialogBaseMixin = (superClass) =>
75
75
  type: String,
76
76
  },
77
77
 
78
- /**
79
- * Set the width of the overlay.
80
- * If a unitless number is provided, pixels are assumed.
81
- */
82
- width: {
83
- type: String,
84
- },
85
-
86
- /**
87
- * Set the height of the overlay.
88
- * If a unitless number is provided, pixels are assumed.
89
- */
90
- height: {
91
- type: String,
92
- },
93
-
94
78
  /**
95
79
  * The `role` attribute value to be set on the overlay. Defaults to "dialog".
96
80
  *
@@ -104,7 +88,7 @@ export const DialogBaseMixin = (superClass) =>
104
88
  }
105
89
 
106
90
  static get observers() {
107
- return ['__positionChanged(top, left)', '__sizeChanged(width, height)'];
91
+ return ['__positionChanged(top, left)'];
108
92
  }
109
93
 
110
94
  /** @protected */
@@ -23,7 +23,7 @@ import { DialogOverlayMixin } from './vaadin-dialog-overlay-mixin.js';
23
23
  * @private
24
24
  */
25
25
  export class DialogOverlay extends DialogOverlayMixin(
26
- DirMixin(ThemableMixin(LumoInjectionMixin(PolylitMixin(LitElement)))),
26
+ DirMixin(ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement)))),
27
27
  ) {
28
28
  static get is() {
29
29
  return 'vaadin-dialog-overlay';
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2017 - 2025 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
+ */
6
+ import type { Constructor } from '@open-wc/dedupe-mixin';
7
+
8
+ export declare function DialogSizeMixin<T extends Constructor<HTMLElement>>(
9
+ base: T,
10
+ ): Constructor<DialogSizeMixinClass> & T;
11
+
12
+ export declare class DialogSizeMixinClass {
13
+ /**
14
+ * Set the width of the overlay.
15
+ * If a unitless number is provided, pixels are assumed.
16
+ */
17
+ width: string | null;
18
+
19
+ /**
20
+ * Set the height of the overlay.
21
+ * If a unitless number is provided, pixels are assumed.
22
+ */
23
+ height: string | null;
24
+ }
@@ -0,0 +1,40 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2017 - 2025 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
+ */
6
+
7
+ /**
8
+ * @polymerMixin
9
+ */
10
+ export const DialogSizeMixin = (superClass) =>
11
+ class DialogSizeMixinClass extends superClass {
12
+ static get properties() {
13
+ return {
14
+ /**
15
+ * Set the width of the overlay.
16
+ * If a unitless number is provided, pixels are assumed.
17
+ */
18
+ width: {
19
+ type: String,
20
+ },
21
+
22
+ /**
23
+ * Set the height of the overlay.
24
+ * If a unitless number is provided, pixels are assumed.
25
+ */
26
+ height: {
27
+ type: String,
28
+ },
29
+ };
30
+ }
31
+
32
+ static get observers() {
33
+ return ['__sizeChanged(width, height)'];
34
+ }
35
+
36
+ /** @private */
37
+ __sizeChanged(width, height) {
38
+ requestAnimationFrame(() => this.$.overlay.setBounds({ width, height }, false));
39
+ }
40
+ };
@@ -10,6 +10,7 @@ import { DialogBaseMixin } from './vaadin-dialog-base-mixin.js';
10
10
  import { DialogDraggableMixin } from './vaadin-dialog-draggable-mixin.js';
11
11
  import { DialogRendererMixin } from './vaadin-dialog-renderer-mixin.js';
12
12
  import { DialogResizableMixin } from './vaadin-dialog-resizable-mixin.js';
13
+ import { DialogSizeMixin } from './vaadin-dialog-size-mixin.js';
13
14
 
14
15
  export { DialogOverlay, DialogOverlayBounds } from './vaadin-dialog-overlay.js';
15
16
 
@@ -124,9 +125,11 @@ export type DialogEventMap = DialogCustomEventMap & HTMLElementEventMap;
124
125
  * @fires {CustomEvent} opened-changed - Fired when the `opened` property changes.
125
126
  * @fires {CustomEvent} closed - Fired when the dialog is closed.
126
127
  */
127
- declare class Dialog extends DialogDraggableMixin(
128
- DialogResizableMixin(
129
- DialogRendererMixin(DialogBaseMixin(OverlayClassMixin(ThemePropertyMixin(ElementMixin(HTMLElement))))),
128
+ declare class Dialog extends DialogSizeMixin(
129
+ DialogDraggableMixin(
130
+ DialogResizableMixin(
131
+ DialogRendererMixin(DialogBaseMixin(OverlayClassMixin(ThemePropertyMixin(ElementMixin(HTMLElement))))),
132
+ ),
130
133
  ),
131
134
  ) {
132
135
  /**
@@ -15,6 +15,7 @@ import { DialogBaseMixin } from './vaadin-dialog-base-mixin.js';
15
15
  import { DialogDraggableMixin } from './vaadin-dialog-draggable-mixin.js';
16
16
  import { DialogRendererMixin } from './vaadin-dialog-renderer-mixin.js';
17
17
  import { DialogResizableMixin } from './vaadin-dialog-resizable-mixin.js';
18
+ import { DialogSizeMixin } from './vaadin-dialog-size-mixin.js';
18
19
 
19
20
  export { DialogOverlay } from './vaadin-dialog-overlay.js';
20
21
 
@@ -89,11 +90,16 @@ export { DialogOverlay } from './vaadin-dialog-overlay.js';
89
90
  * @mixes DialogDraggableMixin
90
91
  * @mixes DialogRendererMixin
91
92
  * @mixes DialogResizableMixin
93
+ * @mixes DialogSizeMixin
92
94
  * @mixes OverlayClassMixin
93
95
  */
94
- class Dialog extends DialogDraggableMixin(
95
- DialogResizableMixin(
96
- DialogRendererMixin(DialogBaseMixin(OverlayClassMixin(ThemePropertyMixin(ElementMixin(PolylitMixin(LitElement)))))),
96
+ class Dialog extends DialogSizeMixin(
97
+ DialogDraggableMixin(
98
+ DialogResizableMixin(
99
+ DialogRendererMixin(
100
+ DialogBaseMixin(OverlayClassMixin(ThemePropertyMixin(ElementMixin(PolylitMixin(LitElement))))),
101
+ ),
102
+ ),
97
103
  ),
98
104
  ) {
99
105
  static get is() {
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-alpha7",
4
+ "version": "25.0.0-alpha8",
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/25.0.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.",
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/25.0.0-alpha8/#/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",
@@ -69,8 +69,8 @@
69
69
  }
70
70
  },
71
71
  {
72
- "name": "width",
73
- "description": "Set the width of the overlay.\nIf a unitless number is provided, pixels are assumed.",
72
+ "name": "overlay-role",
73
+ "description": "The `role` attribute value to be set on the overlay. Defaults to \"dialog\".",
74
74
  "value": {
75
75
  "type": [
76
76
  "string",
@@ -80,19 +80,17 @@
80
80
  }
81
81
  },
82
82
  {
83
- "name": "height",
84
- "description": "Set the height of the overlay.\nIf a unitless number is provided, pixels are assumed.",
83
+ "name": "draggable",
84
+ "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.",
85
85
  "value": {
86
86
  "type": [
87
- "string",
88
- "null",
89
- "undefined"
87
+ "boolean"
90
88
  ]
91
89
  }
92
90
  },
93
91
  {
94
- "name": "overlay-role",
95
- "description": "The `role` attribute value to be set on the overlay. Defaults to \"dialog\".",
92
+ "name": "header-title",
93
+ "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.",
96
94
  "value": {
97
95
  "type": [
98
96
  "string",
@@ -102,8 +100,8 @@
102
100
  }
103
101
  },
104
102
  {
105
- "name": "draggable",
106
- "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.",
103
+ "name": "resizable",
104
+ "description": "Set to true to enable resizing the dialog by dragging the corners and edges.",
107
105
  "value": {
108
106
  "type": [
109
107
  "boolean"
@@ -111,8 +109,8 @@
111
109
  }
112
110
  },
113
111
  {
114
- "name": "header-title",
115
- "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.",
112
+ "name": "width",
113
+ "description": "Set the width of the overlay.\nIf a unitless number is provided, pixels are assumed.",
116
114
  "value": {
117
115
  "type": [
118
116
  "string",
@@ -122,11 +120,13 @@
122
120
  }
123
121
  },
124
122
  {
125
- "name": "resizable",
126
- "description": "Set to true to enable resizing the dialog by dragging the corners and edges.",
123
+ "name": "height",
124
+ "description": "Set the height of the overlay.\nIf a unitless number is provided, pixels are assumed.",
127
125
  "value": {
128
126
  "type": [
129
- "boolean"
127
+ "string",
128
+ "null",
129
+ "undefined"
130
130
  ]
131
131
  }
132
132
  },
@@ -224,28 +224,6 @@
224
224
  ]
225
225
  }
226
226
  },
227
- {
228
- "name": "width",
229
- "description": "Set the width of the overlay.\nIf a unitless number is provided, pixels are assumed.",
230
- "value": {
231
- "type": [
232
- "string",
233
- "null",
234
- "undefined"
235
- ]
236
- }
237
- },
238
- {
239
- "name": "height",
240
- "description": "Set the height of the overlay.\nIf a unitless number is provided, pixels are assumed.",
241
- "value": {
242
- "type": [
243
- "string",
244
- "null",
245
- "undefined"
246
- ]
247
- }
248
- },
249
227
  {
250
228
  "name": "overlayRole",
251
229
  "description": "The `role` attribute value to be set on the overlay. Defaults to \"dialog\".",
@@ -316,6 +294,28 @@
316
294
  ]
317
295
  }
318
296
  },
297
+ {
298
+ "name": "width",
299
+ "description": "Set the width of the overlay.\nIf a unitless number is provided, pixels are assumed.",
300
+ "value": {
301
+ "type": [
302
+ "string",
303
+ "null",
304
+ "undefined"
305
+ ]
306
+ }
307
+ },
308
+ {
309
+ "name": "height",
310
+ "description": "Set the height of the overlay.\nIf a unitless number is provided, pixels are assumed.",
311
+ "value": {
312
+ "type": [
313
+ "string",
314
+ "null",
315
+ "undefined"
316
+ ]
317
+ }
318
+ },
319
319
  {
320
320
  "name": "overlayClass",
321
321
  "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.",
@@ -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-alpha7",
4
+ "version": "25.0.0-alpha8",
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/25.0.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.",
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/25.0.0-alpha8/#/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
  {
@@ -75,20 +75,6 @@
75
75
  "kind": "expression"
76
76
  }
77
77
  },
78
- {
79
- "name": ".width",
80
- "description": "Set the width of the overlay.\nIf a unitless number is provided, pixels are assumed.",
81
- "value": {
82
- "kind": "expression"
83
- }
84
- },
85
- {
86
- "name": ".height",
87
- "description": "Set the height of the overlay.\nIf a unitless number is provided, pixels are assumed.",
88
- "value": {
89
- "kind": "expression"
90
- }
91
- },
92
78
  {
93
79
  "name": ".overlayRole",
94
80
  "description": "The `role` attribute value to be set on the overlay. Defaults to \"dialog\".",
@@ -124,6 +110,20 @@
124
110
  "kind": "expression"
125
111
  }
126
112
  },
113
+ {
114
+ "name": ".width",
115
+ "description": "Set the width of the overlay.\nIf a unitless number is provided, pixels are assumed.",
116
+ "value": {
117
+ "kind": "expression"
118
+ }
119
+ },
120
+ {
121
+ "name": ".height",
122
+ "description": "Set the height of the overlay.\nIf a unitless number is provided, pixels are assumed.",
123
+ "value": {
124
+ "kind": "expression"
125
+ }
126
+ },
127
127
  {
128
128
  "name": ".overlayClass",
129
129
  "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.",