@vaadin/dialog 25.2.0-beta1 → 25.2.0-rc1

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.
@@ -281,6 +281,42 @@
281
281
  }
282
282
  ]
283
283
  },
284
+ {
285
+ "kind": "javascript-module",
286
+ "path": "src/vaadin-dialog-overflow-controller.js",
287
+ "declarations": [
288
+ {
289
+ "kind": "class",
290
+ "description": "A controller that detects if the content part of a dialog overlay overflows\nits scrolling viewport vertically, and sets the `overflow` attribute on the\noverlay (and its owner) with `top`, `bottom`, or `top bottom` accordingly, so\nthat overflow indicators can be styled in CSS.",
291
+ "name": "DialogOverflowController",
292
+ "members": [
293
+ {
294
+ "kind": "field",
295
+ "name": "host",
296
+ "description": "The overlay element that hosts the controller.",
297
+ "type": {
298
+ "text": "HTMLElement"
299
+ },
300
+ "default": "host"
301
+ },
302
+ {
303
+ "kind": "method",
304
+ "name": "hostConnected"
305
+ }
306
+ ]
307
+ }
308
+ ],
309
+ "exports": [
310
+ {
311
+ "kind": "js",
312
+ "name": "DialogOverflowController",
313
+ "declaration": {
314
+ "name": "DialogOverflowController",
315
+ "module": "src/vaadin-dialog-overflow-controller.js"
316
+ }
317
+ }
318
+ ]
319
+ },
284
320
  {
285
321
  "kind": "javascript-module",
286
322
  "path": "src/vaadin-dialog-overlay-mixin.js",
@@ -946,7 +982,7 @@
946
982
  "declarations": [
947
983
  {
948
984
  "kind": "class",
949
- "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\nThe following custom CSS properties are available for styling:\n\nCustom CSS property |\n:----------------------------------------|\n|`--vaadin-dialog-background` |\n|`--vaadin-dialog-border-color` |\n|`--vaadin-dialog-border-radius` |\n|`--vaadin-dialog-border-width` |\n|`--vaadin-dialog-max-width` |\n|`--vaadin-dialog-min-width` |\n|`--vaadin-dialog-padding` |\n|`--vaadin-dialog-shadow` |\n|`--vaadin-dialog-text-color` |\n|`--vaadin-dialog-title-color` |\n|`--vaadin-dialog-title-font-size` |\n|`--vaadin-dialog-title-font-weight` |\n|`--vaadin-dialog-title-line-height` |\n|`--vaadin-overlay-backdrop-background` |\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
985
+ "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\nThe following custom CSS properties are available for styling:\n\nCustom CSS property |\n:--------------------------------------------|\n|`--vaadin-dialog-background` |\n|`--vaadin-dialog-border-color` |\n|`--vaadin-dialog-border-radius` |\n|`--vaadin-dialog-border-width` |\n|`--vaadin-dialog-max-width` |\n|`--vaadin-dialog-min-width` |\n|`--vaadin-dialog-overflow-indicator-color` |\n|`--vaadin-dialog-overflow-indicator-height` |\n|`--vaadin-dialog-padding` |\n|`--vaadin-dialog-shadow` |\n|`--vaadin-dialog-text-color` |\n|`--vaadin-dialog-title-color` |\n|`--vaadin-dialog-title-font-size` |\n|`--vaadin-dialog-title-font-weight` |\n|`--vaadin-dialog-title-line-height` |\n|`--vaadin-overlay-backdrop-background` |\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
950
986
  "name": "Dialog",
951
987
  "members": [
952
988
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/dialog",
3
- "version": "25.2.0-beta1",
3
+ "version": "25.2.0-rc1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -37,25 +37,25 @@
37
37
  ],
38
38
  "dependencies": {
39
39
  "@open-wc/dedupe-mixin": "^1.3.0",
40
- "@vaadin/component-base": "25.2.0-beta1",
41
- "@vaadin/lit-renderer": "25.2.0-beta1",
42
- "@vaadin/overlay": "25.2.0-beta1",
43
- "@vaadin/vaadin-themable-mixin": "25.2.0-beta1",
40
+ "@vaadin/component-base": "25.2.0-rc1",
41
+ "@vaadin/lit-renderer": "25.2.0-rc1",
42
+ "@vaadin/overlay": "25.2.0-rc1",
43
+ "@vaadin/vaadin-themable-mixin": "25.2.0-rc1",
44
44
  "lit": "^3.0.0"
45
45
  },
46
46
  "devDependencies": {
47
- "@vaadin/a11y-base": "25.2.0-beta1",
48
- "@vaadin/aura": "25.2.0-beta1",
49
- "@vaadin/chai-plugins": "25.2.0-beta1",
50
- "@vaadin/test-runner-commands": "25.2.0-beta1",
47
+ "@vaadin/a11y-base": "25.2.0-rc1",
48
+ "@vaadin/aura": "25.2.0-rc1",
49
+ "@vaadin/chai-plugins": "25.2.0-rc1",
50
+ "@vaadin/test-runner-commands": "25.2.0-rc1",
51
51
  "@vaadin/testing-helpers": "^2.0.0",
52
- "@vaadin/vaadin-lumo-styles": "25.2.0-beta1",
53
- "sinon": "^21.0.2"
52
+ "@vaadin/vaadin-lumo-styles": "25.2.0-rc1",
53
+ "sinon": "^22.0.0"
54
54
  },
55
55
  "customElements": "custom-elements.json",
56
56
  "web-types": [
57
57
  "web-types.json",
58
58
  "web-types.lit.json"
59
59
  ],
60
- "gitHead": "471a23f60d1eb725f98a33f62cb9664d9c0a4163"
60
+ "gitHead": "7c581b396dbb889f75c8073d6b4d25537a65b873"
61
61
  }
@@ -22,6 +22,8 @@ export const dialogOverlayBase = css`
22
22
 
23
23
  :host {
24
24
  cursor: default;
25
+ --_overflow-indicator-height: var(--vaadin-dialog-overflow-indicator-height, 1px);
26
+ --_overflow-indicator-color: var(--vaadin-dialog-overflow-indicator-color, var(--vaadin-border-color-secondary));
25
27
  }
26
28
 
27
29
  [part='overlay']:focus-visible {
@@ -114,6 +116,38 @@ export const dialogOverlayBase = css`
114
116
  :host(:not([has-footer])) [part='footer'] {
115
117
  display: none !important;
116
118
  }
119
+
120
+ [part='header'],
121
+ [part='footer'] {
122
+ position: relative;
123
+
124
+ &::after {
125
+ content: '';
126
+ opacity: 0;
127
+ position: absolute;
128
+ pointer-events: none;
129
+ height: var(--_overflow-indicator-height);
130
+ top: 100%;
131
+ inset-inline: 0;
132
+ background: linear-gradient(
133
+ var(--_overflow-indicator-dir, to bottom),
134
+ var(--_overflow-indicator-color),
135
+ var(--_overflow-indicator-color) 1px,
136
+ transparent
137
+ );
138
+ }
139
+ }
140
+
141
+ [part='footer']::after {
142
+ top: auto;
143
+ bottom: 100%;
144
+ --_overflow-indicator-dir: to top;
145
+ }
146
+
147
+ :host([overflow~='top']) [part='header']::after,
148
+ :host([overflow~='bottom']) [part='footer']::after {
149
+ opacity: 1;
150
+ }
117
151
  `;
118
152
 
119
153
  const dialogResizableOverlay = css`
@@ -0,0 +1,29 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2017 - 2026 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
+ */
6
+ import type { ReactiveController } from 'lit';
7
+
8
+ /**
9
+ * A controller that detects if the content part of a dialog overlay overflows
10
+ * its scrolling viewport vertically, and sets the `overflow` attribute on the
11
+ * overlay (and its owner) with `top`, `bottom`, or `top bottom` accordingly, so
12
+ * that overflow indicators can be styled in CSS.
13
+ */
14
+ export class DialogOverflowController implements ReactiveController {
15
+ /**
16
+ * The overlay element that hosts the controller.
17
+ */
18
+ host: HTMLElement;
19
+
20
+ constructor(host: HTMLElement);
21
+
22
+ hostConnected(): void;
23
+
24
+ /**
25
+ * Forces a synchronous overflow update. Call after changing content that
26
+ * affects whether the content part overflows.
27
+ */
28
+ update(): void;
29
+ }
@@ -0,0 +1,89 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2017 - 2026 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
+ */
6
+ import { setOverlayStateAttribute } from '@vaadin/overlay/src/vaadin-overlay-utils.js';
7
+
8
+ /**
9
+ * A controller that detects if the content part of a dialog overlay overflows
10
+ * its scrolling viewport vertically, and sets the `overflow` attribute on the
11
+ * overlay (and its owner) with `top`, `bottom`, or `top bottom` accordingly, so
12
+ * that overflow indicators can be styled in CSS.
13
+ */
14
+ export class DialogOverflowController {
15
+ constructor(host) {
16
+ /**
17
+ * The overlay element that hosts the controller.
18
+ * @type {HTMLElement}
19
+ */
20
+ this.host = host;
21
+ }
22
+
23
+ hostConnected() {
24
+ if (!this.__initialized) {
25
+ this.__initialized = true;
26
+
27
+ const { host } = this;
28
+
29
+ // Update overflow attribute on resize
30
+ this.__resizeObserver = new ResizeObserver(() => this.__updateState());
31
+ this.__resizeObserver.observe(host.$.resizerContainer);
32
+
33
+ // Update overflow attribute on scroll
34
+ host.$.content.addEventListener('scroll', () => this.__updateState(true));
35
+
36
+ // Update overflow attribute on content change
37
+ host.shadowRoot.addEventListener('slotchange', () => this.__updateState(true));
38
+ }
39
+ }
40
+
41
+ /**
42
+ * Forces a synchronous overflow update. Call after changing content that
43
+ * affects whether the content part overflows.
44
+ */
45
+ update() {
46
+ this.__updateState(true);
47
+ }
48
+
49
+ /** @private */
50
+ __updateState(sync = false) {
51
+ cancelAnimationFrame(this.__updateRaf);
52
+
53
+ if (sync) {
54
+ this.__writeState(this.__readState());
55
+ } else {
56
+ // Defer reading until the animation frame so that layout has settled
57
+ // after a resize (some browsers report stale metrics synchronously).
58
+ this.__updateRaf = requestAnimationFrame(() => this.__writeState(this.__readState()));
59
+ }
60
+ }
61
+
62
+ /** @private */
63
+ __readState() {
64
+ const content = this.host.$.content;
65
+
66
+ let overflow = '';
67
+
68
+ if (content.scrollTop > 0) {
69
+ overflow += ' top';
70
+ }
71
+
72
+ if (content.scrollTop < content.scrollHeight - content.clientHeight) {
73
+ overflow += ' bottom';
74
+ }
75
+
76
+ return overflow.trim();
77
+ }
78
+
79
+ /** @private */
80
+ __writeState(value) {
81
+ const { host } = this;
82
+
83
+ if (value.length > 0) {
84
+ setOverlayStateAttribute(host, 'overflow', value);
85
+ } else {
86
+ setOverlayStateAttribute(host, 'overflow', null);
87
+ }
88
+ }
89
+ }
@@ -6,6 +6,7 @@
6
6
  import { SlotObserver } from '@vaadin/component-base/src/slot-observer.js';
7
7
  import { OverlayMixin } from '@vaadin/overlay/src/vaadin-overlay-mixin.js';
8
8
  import { setOverlayStateAttribute } from '@vaadin/overlay/src/vaadin-overlay-utils.js';
9
+ import { DialogOverflowController } from './vaadin-dialog-overflow-controller.js';
9
10
 
10
11
  export const DialogOverlayMixin = (superClass) =>
11
12
  class DialogOverlayMixin extends OverlayMixin(superClass) {
@@ -78,36 +79,29 @@ export const DialogOverlayMixin = (superClass) =>
78
79
  ready() {
79
80
  super.ready();
80
81
 
81
- // Update overflow attribute on resize
82
+ // Detect overflow of the content part and toggle the `overflow` attribute
83
+ this.__overflowController = new DialogOverflowController(this);
84
+ this.addController(this.__overflowController);
85
+
86
+ // Adjust the position on resize to keep the overlay within the viewport
82
87
  this.__resizeObserver = new ResizeObserver(() => {
83
88
  requestAnimationFrame(() => {
84
89
  this.__adjustPosition();
85
- this.__updateOverflow();
86
90
  });
87
91
  });
88
92
  this.__resizeObserver.observe(this.$.resizerContainer);
89
93
 
90
- // Update overflow attribute on scroll
91
- this.$.content.addEventListener('scroll', () => {
92
- this.__updateOverflow();
93
- });
94
-
95
- // Update overflow attribute on content change
96
- this.shadowRoot.addEventListener('slotchange', () => {
97
- this.__updateOverflow();
98
- });
99
-
100
94
  // Observe header-content and footer slots for dynamic content
101
95
  const headerSlot = this.shadowRoot.querySelector('slot[name="header-content"]');
102
96
  this.__headerSlotObserver = new SlotObserver(headerSlot, ({ currentNodes }) => {
103
97
  setOverlayStateAttribute(this, 'has-header', currentNodes.length > 0);
104
- this.__updateOverflow();
98
+ this.__overflowController.update();
105
99
  });
106
100
 
107
101
  const footerSlot = this.shadowRoot.querySelector('slot[name="footer"]');
108
102
  this.__footerSlotObserver = new SlotObserver(footerSlot, ({ currentNodes }) => {
109
103
  setOverlayStateAttribute(this, 'has-footer', currentNodes.length > 0);
110
- this.__updateOverflow();
104
+ this.__overflowController.update();
111
105
  });
112
106
 
113
107
  this.__handleWindowResize = this.__handleWindowResize.bind(this);
@@ -235,7 +229,9 @@ export const DialogOverlayMixin = (superClass) =>
235
229
 
236
230
  this._headerTitleRenderer();
237
231
 
238
- this.__updateOverflow();
232
+ // May run via observers before the controller is set up in `ready()`;
233
+ // the initial overflow state is then detected by the resize observer.
234
+ this.__overflowController?.update();
239
235
  }
240
236
 
241
237
  /**
@@ -261,28 +257,6 @@ export const DialogOverlayMixin = (superClass) =>
261
257
  this.__adjustPosition();
262
258
  }
263
259
 
264
- /** @private */
265
- __updateOverflow() {
266
- let overflow = '';
267
-
268
- const content = this.$.content;
269
-
270
- if (content.scrollTop > 0) {
271
- overflow += ' top';
272
- }
273
-
274
- if (content.scrollTop < content.scrollHeight - content.clientHeight) {
275
- overflow += ' bottom';
276
- }
277
-
278
- const value = overflow.trim();
279
- if (value.length > 0 && this.getAttribute('overflow') !== value) {
280
- setOverlayStateAttribute(this, 'overflow', value);
281
- } else if (value.length === 0 && this.hasAttribute('overflow')) {
282
- setOverlayStateAttribute(this, 'overflow', null);
283
- }
284
- }
285
-
286
260
  /** @private */
287
261
  __handleWindowResize() {
288
262
  this.__adjustPosition();
@@ -127,22 +127,24 @@ export type DialogEventMap = DialogCustomEventMap & HTMLElementEventMap;
127
127
  *
128
128
  * The following custom CSS properties are available for styling:
129
129
  *
130
- * Custom CSS property |
131
- * :----------------------------------------|
132
- * |`--vaadin-dialog-background` |
133
- * |`--vaadin-dialog-border-color` |
134
- * |`--vaadin-dialog-border-radius` |
135
- * |`--vaadin-dialog-border-width` |
136
- * |`--vaadin-dialog-max-width` |
137
- * |`--vaadin-dialog-min-width` |
138
- * |`--vaadin-dialog-padding` |
139
- * |`--vaadin-dialog-shadow` |
140
- * |`--vaadin-dialog-text-color` |
141
- * |`--vaadin-dialog-title-color` |
142
- * |`--vaadin-dialog-title-font-size` |
143
- * |`--vaadin-dialog-title-font-weight` |
144
- * |`--vaadin-dialog-title-line-height` |
145
- * |`--vaadin-overlay-backdrop-background` |
130
+ * Custom CSS property |
131
+ * :--------------------------------------------|
132
+ * |`--vaadin-dialog-background` |
133
+ * |`--vaadin-dialog-border-color` |
134
+ * |`--vaadin-dialog-border-radius` |
135
+ * |`--vaadin-dialog-border-width` |
136
+ * |`--vaadin-dialog-max-width` |
137
+ * |`--vaadin-dialog-min-width` |
138
+ * |`--vaadin-dialog-overflow-indicator-color` |
139
+ * |`--vaadin-dialog-overflow-indicator-height` |
140
+ * |`--vaadin-dialog-padding` |
141
+ * |`--vaadin-dialog-shadow` |
142
+ * |`--vaadin-dialog-text-color` |
143
+ * |`--vaadin-dialog-title-color` |
144
+ * |`--vaadin-dialog-title-font-size` |
145
+ * |`--vaadin-dialog-title-font-weight` |
146
+ * |`--vaadin-dialog-title-line-height` |
147
+ * |`--vaadin-overlay-backdrop-background` |
146
148
  *
147
149
  * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
148
150
  *
@@ -70,22 +70,24 @@ export { DialogOverlay } from './vaadin-dialog-overlay.js';
70
70
  *
71
71
  * The following custom CSS properties are available for styling:
72
72
  *
73
- * Custom CSS property |
74
- * :----------------------------------------|
75
- * |`--vaadin-dialog-background` |
76
- * |`--vaadin-dialog-border-color` |
77
- * |`--vaadin-dialog-border-radius` |
78
- * |`--vaadin-dialog-border-width` |
79
- * |`--vaadin-dialog-max-width` |
80
- * |`--vaadin-dialog-min-width` |
81
- * |`--vaadin-dialog-padding` |
82
- * |`--vaadin-dialog-shadow` |
83
- * |`--vaadin-dialog-text-color` |
84
- * |`--vaadin-dialog-title-color` |
85
- * |`--vaadin-dialog-title-font-size` |
86
- * |`--vaadin-dialog-title-font-weight` |
87
- * |`--vaadin-dialog-title-line-height` |
88
- * |`--vaadin-overlay-backdrop-background` |
73
+ * Custom CSS property |
74
+ * :--------------------------------------------|
75
+ * |`--vaadin-dialog-background` |
76
+ * |`--vaadin-dialog-border-color` |
77
+ * |`--vaadin-dialog-border-radius` |
78
+ * |`--vaadin-dialog-border-width` |
79
+ * |`--vaadin-dialog-max-width` |
80
+ * |`--vaadin-dialog-min-width` |
81
+ * |`--vaadin-dialog-overflow-indicator-color` |
82
+ * |`--vaadin-dialog-overflow-indicator-height` |
83
+ * |`--vaadin-dialog-padding` |
84
+ * |`--vaadin-dialog-shadow` |
85
+ * |`--vaadin-dialog-text-color` |
86
+ * |`--vaadin-dialog-title-color` |
87
+ * |`--vaadin-dialog-title-font-size` |
88
+ * |`--vaadin-dialog-title-font-weight` |
89
+ * |`--vaadin-dialog-title-line-height` |
90
+ * |`--vaadin-overlay-backdrop-background` |
89
91
  *
90
92
  * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
91
93
  *
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.2.0-beta1",
4
+ "version": "25.2.0-rc1",
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\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\nThe following custom CSS properties are available for styling:\n\nCustom CSS property |\n:----------------------------------------|\n|`--vaadin-dialog-background` |\n|`--vaadin-dialog-border-color` |\n|`--vaadin-dialog-border-radius` |\n|`--vaadin-dialog-border-width` |\n|`--vaadin-dialog-max-width` |\n|`--vaadin-dialog-min-width` |\n|`--vaadin-dialog-padding` |\n|`--vaadin-dialog-shadow` |\n|`--vaadin-dialog-text-color` |\n|`--vaadin-dialog-title-color` |\n|`--vaadin-dialog-title-font-size` |\n|`--vaadin-dialog-title-font-weight` |\n|`--vaadin-dialog-title-line-height` |\n|`--vaadin-overlay-backdrop-background` |\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\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\nThe following custom CSS properties are available for styling:\n\nCustom CSS property |\n:--------------------------------------------|\n|`--vaadin-dialog-background` |\n|`--vaadin-dialog-border-color` |\n|`--vaadin-dialog-border-radius` |\n|`--vaadin-dialog-border-width` |\n|`--vaadin-dialog-max-width` |\n|`--vaadin-dialog-min-width` |\n|`--vaadin-dialog-overflow-indicator-color` |\n|`--vaadin-dialog-overflow-indicator-height` |\n|`--vaadin-dialog-padding` |\n|`--vaadin-dialog-shadow` |\n|`--vaadin-dialog-text-color` |\n|`--vaadin-dialog-title-color` |\n|`--vaadin-dialog-title-font-size` |\n|`--vaadin-dialog-title-font-weight` |\n|`--vaadin-dialog-title-line-height` |\n|`--vaadin-overlay-backdrop-background` |\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
12
12
  "attributes": [
13
13
  {
14
14
  "name": "draggable",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/dialog",
4
- "version": "25.2.0-beta1",
4
+ "version": "25.2.0-rc1",
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\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\nThe following custom CSS properties are available for styling:\n\nCustom CSS property |\n:----------------------------------------|\n|`--vaadin-dialog-background` |\n|`--vaadin-dialog-border-color` |\n|`--vaadin-dialog-border-radius` |\n|`--vaadin-dialog-border-width` |\n|`--vaadin-dialog-max-width` |\n|`--vaadin-dialog-min-width` |\n|`--vaadin-dialog-padding` |\n|`--vaadin-dialog-shadow` |\n|`--vaadin-dialog-text-color` |\n|`--vaadin-dialog-title-color` |\n|`--vaadin-dialog-title-font-size` |\n|`--vaadin-dialog-title-font-weight` |\n|`--vaadin-dialog-title-line-height` |\n|`--vaadin-overlay-backdrop-background` |\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\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\nThe following custom CSS properties are available for styling:\n\nCustom CSS property |\n:--------------------------------------------|\n|`--vaadin-dialog-background` |\n|`--vaadin-dialog-border-color` |\n|`--vaadin-dialog-border-radius` |\n|`--vaadin-dialog-border-width` |\n|`--vaadin-dialog-max-width` |\n|`--vaadin-dialog-min-width` |\n|`--vaadin-dialog-overflow-indicator-color` |\n|`--vaadin-dialog-overflow-indicator-height` |\n|`--vaadin-dialog-padding` |\n|`--vaadin-dialog-shadow` |\n|`--vaadin-dialog-text-color` |\n|`--vaadin-dialog-title-color` |\n|`--vaadin-dialog-title-font-size` |\n|`--vaadin-dialog-title-font-weight` |\n|`--vaadin-dialog-title-line-height` |\n|`--vaadin-overlay-backdrop-background` |\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
20
20
  "extension": true,
21
21
  "attributes": [
22
22
  {