@vaadin/dialog 25.3.0-alpha6 → 25.3.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.
@@ -796,7 +796,8 @@
796
796
  {
797
797
  "kind": "method",
798
798
  "name": "requestContentUpdate",
799
- "description": "Requests an update for the content of the dialog.\nWhile performing the update, it invokes the renderer passed in the `renderer` property,\nas well as `headerRender` and `footerRenderer` properties, if these are defined.\n\nIt is not guaranteed that the update happens immediately (synchronously) after it is requested."
799
+ "description": "Requests an update for the content of the dialog.\nWhile performing the update, it invokes the renderer passed in the `renderer` property,\nas well as `headerRender` and `footerRenderer` properties, if these are defined.\n\nIt is not guaranteed that the update happens immediately (synchronously) after it is requested.",
800
+ "deprecated": "This method is only used with renderers and will be removed in Vaadin 26"
800
801
  }
801
802
  ],
802
803
  "attributes": [
@@ -1195,6 +1196,7 @@
1195
1196
  "kind": "method",
1196
1197
  "name": "requestContentUpdate",
1197
1198
  "description": "Requests an update for the content of the dialog.\nWhile performing the update, it invokes the renderer passed in the `renderer` property,\nas well as `headerRender` and `footerRenderer` properties, if these are defined.\n\nIt is not guaranteed that the update happens immediately (synchronously) after it is requested.",
1199
+ "deprecated": "This method is only used with renderers and will be removed in Vaadin 26",
1198
1200
  "inheritedFrom": {
1199
1201
  "name": "DialogRendererMixin",
1200
1202
  "module": "src/vaadin-dialog-renderer-mixin.js"
@@ -1307,46 +1309,6 @@
1307
1309
  }
1308
1310
  }
1309
1311
  ],
1310
- "mixins": [
1311
- {
1312
- "name": "DialogSizeMixin",
1313
- "module": "src/vaadin-dialog-size-mixin.js"
1314
- },
1315
- {
1316
- "name": "DialogDraggableMixin",
1317
- "module": "src/vaadin-dialog-draggable-mixin.js"
1318
- },
1319
- {
1320
- "name": "DialogResizableMixin",
1321
- "module": "src/vaadin-dialog-resizable-mixin.js"
1322
- },
1323
- {
1324
- "name": "DialogRendererMixin",
1325
- "module": "src/vaadin-dialog-renderer-mixin.js"
1326
- },
1327
- {
1328
- "name": "DialogBaseMixin",
1329
- "module": "src/vaadin-dialog-base-mixin.js"
1330
- },
1331
- {
1332
- "name": "ThemePropertyMixin",
1333
- "package": "@vaadin/vaadin-themable-mixin/vaadin-theme-property-mixin.js"
1334
- },
1335
- {
1336
- "name": "ElementMixin",
1337
- "package": "@vaadin/component-base/src/element-mixin.js"
1338
- },
1339
- {
1340
- "name": "PolylitMixin",
1341
- "package": "@vaadin/component-base/src/polylit-mixin.js"
1342
- }
1343
- ],
1344
- "superclass": {
1345
- "name": "LitElement",
1346
- "package": "lit"
1347
- },
1348
- "tagName": "vaadin-dialog",
1349
- "customElement": true,
1350
1312
  "attributes": [
1351
1313
  {
1352
1314
  "name": "draggable",
@@ -1532,6 +1494,13 @@
1532
1494
  "module": "src/vaadin-dialog-resizable-mixin.js"
1533
1495
  }
1534
1496
  },
1497
+ {
1498
+ "type": {
1499
+ "text": "string"
1500
+ },
1501
+ "description": "The theme variants to apply to the component.",
1502
+ "name": "theme"
1503
+ },
1535
1504
  {
1536
1505
  "name": "top",
1537
1506
  "type": {
@@ -1556,7 +1525,47 @@
1556
1525
  "module": "src/vaadin-dialog-size-mixin.js"
1557
1526
  }
1558
1527
  }
1559
- ]
1528
+ ],
1529
+ "mixins": [
1530
+ {
1531
+ "name": "DialogSizeMixin",
1532
+ "module": "src/vaadin-dialog-size-mixin.js"
1533
+ },
1534
+ {
1535
+ "name": "DialogDraggableMixin",
1536
+ "module": "src/vaadin-dialog-draggable-mixin.js"
1537
+ },
1538
+ {
1539
+ "name": "DialogResizableMixin",
1540
+ "module": "src/vaadin-dialog-resizable-mixin.js"
1541
+ },
1542
+ {
1543
+ "name": "DialogRendererMixin",
1544
+ "module": "src/vaadin-dialog-renderer-mixin.js"
1545
+ },
1546
+ {
1547
+ "name": "DialogBaseMixin",
1548
+ "module": "src/vaadin-dialog-base-mixin.js"
1549
+ },
1550
+ {
1551
+ "name": "ThemePropertyMixin",
1552
+ "package": "@vaadin/vaadin-themable-mixin/vaadin-theme-property-mixin.js"
1553
+ },
1554
+ {
1555
+ "name": "ElementMixin",
1556
+ "package": "@vaadin/component-base/src/element-mixin.js"
1557
+ },
1558
+ {
1559
+ "name": "PolylitMixin",
1560
+ "package": "@vaadin/component-base/src/polylit-mixin.js"
1561
+ }
1562
+ ],
1563
+ "superclass": {
1564
+ "name": "LitElement",
1565
+ "package": "lit"
1566
+ },
1567
+ "tagName": "vaadin-dialog",
1568
+ "customElement": true
1560
1569
  }
1561
1570
  ],
1562
1571
  "exports": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/dialog",
3
- "version": "25.3.0-alpha6",
3
+ "version": "25.3.0-alpha8",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -37,19 +37,19 @@
37
37
  ],
38
38
  "dependencies": {
39
39
  "@open-wc/dedupe-mixin": "^1.3.0",
40
- "@vaadin/component-base": "25.3.0-alpha6",
41
- "@vaadin/lit-renderer": "25.3.0-alpha6",
42
- "@vaadin/overlay": "25.3.0-alpha6",
43
- "@vaadin/vaadin-themable-mixin": "25.3.0-alpha6",
40
+ "@vaadin/component-base": "25.3.0-alpha8",
41
+ "@vaadin/lit-renderer": "25.3.0-alpha8",
42
+ "@vaadin/overlay": "25.3.0-alpha8",
43
+ "@vaadin/vaadin-themable-mixin": "25.3.0-alpha8",
44
44
  "lit": "^3.0.0"
45
45
  },
46
46
  "devDependencies": {
47
- "@vaadin/a11y-base": "25.3.0-alpha6",
48
- "@vaadin/aura": "25.3.0-alpha6",
49
- "@vaadin/chai-plugins": "25.3.0-alpha6",
50
- "@vaadin/test-runner-commands": "25.3.0-alpha6",
47
+ "@vaadin/a11y-base": "25.3.0-alpha8",
48
+ "@vaadin/aura": "25.3.0-alpha8",
49
+ "@vaadin/chai-plugins": "25.3.0-alpha8",
50
+ "@vaadin/test-runner-commands": "25.3.0-alpha8",
51
51
  "@vaadin/testing-helpers": "^2.0.0",
52
- "@vaadin/vaadin-lumo-styles": "25.3.0-alpha6",
52
+ "@vaadin/vaadin-lumo-styles": "25.3.0-alpha8",
53
53
  "sinon": "^22.0.0"
54
54
  },
55
55
  "customElements": "custom-elements.json",
@@ -57,5 +57,5 @@
57
57
  "web-types.json",
58
58
  "web-types.lit.json"
59
59
  ],
60
- "gitHead": "92c124fb9cff367bc07e734d8e65707facd0bd43"
60
+ "gitHead": "ccbb4aaffb63c745c6da0426b532d4d05e47af29"
61
61
  }
@@ -198,10 +198,11 @@ export const DialogBaseMixin = (superClass) =>
198
198
  }
199
199
 
200
200
  /** @private */
201
- _bringOverlayToFront() {
202
- if (this.modeless) {
203
- this._overlayElement.bringToFront();
201
+ _bringOverlayToFront(event) {
202
+ if (!this.modeless) {
203
+ return;
204
204
  }
205
+ this._overlayElement.bringToFront(event);
205
206
  }
206
207
 
207
208
  /** @private */
@@ -7,6 +7,7 @@ import { html, LitElement } from 'lit';
7
7
  import { defineCustomElement } from '@vaadin/component-base/src/define.js';
8
8
  import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
9
9
  import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
10
+ import { getOverlaysOnTop, isNestedOverlay } from '@vaadin/overlay/src/vaadin-overlay-stack-mixin.js';
10
11
  import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
11
12
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
12
13
  import { dialogOverlayStyles } from './styles/vaadin-dialog-overlay-base-styles.js';
@@ -15,6 +16,7 @@ import { DialogOverlayMixin } from './vaadin-dialog-overlay-mixin.js';
15
16
  /**
16
17
  * An element used internally by `<vaadin-dialog>`. Not intended to be used separately.
17
18
  *
19
+ * @attr {string} theme - The theme variants to apply to the component.
18
20
  * @customElement vaadin-dialog-overlay
19
21
  * @extends HTMLElement
20
22
  * @private
@@ -31,11 +33,11 @@ export class DialogOverlay extends DialogOverlayMixin(
31
33
  }
32
34
 
33
35
  /**
34
- * Override method from OverlayFocusMixin to use owner as focus trap root
36
+ * Override method from OverlayFocusMixin to use owner as focus root
35
37
  * @protected
36
38
  * @override
37
39
  */
38
- get _focusTrapRoot() {
40
+ get _focusRoot() {
39
41
  return this.owner;
40
42
  }
41
43
 
@@ -55,6 +57,29 @@ export class DialogOverlay extends DialogOverlayMixin(
55
57
  </div>
56
58
  `;
57
59
  }
60
+
61
+ /**
62
+ * @param {Event} event
63
+ * @protected
64
+ * @override
65
+ */
66
+ bringToFront(event) {
67
+ if (event instanceof Event) {
68
+ const path = event.composedPath();
69
+
70
+ // Do not bring overlay to front if this method is called
71
+ // on event that originates from a nested dialog content.
72
+ const isNestedDialogEvent = getOverlaysOnTop(this).some(
73
+ (overlay) => path.includes(overlay) && isNestedOverlay(this, overlay) && overlay instanceof DialogOverlay,
74
+ );
75
+
76
+ if (isNestedDialogEvent) {
77
+ return;
78
+ }
79
+ }
80
+
81
+ super.bringToFront();
82
+ }
58
83
  }
59
84
 
60
85
  defineCustomElement(DialogOverlay);
@@ -69,6 +69,8 @@ export declare class DialogRendererMixinClass {
69
69
  * as well as `headerRender` and `footerRenderer` properties, if these are defined.
70
70
  *
71
71
  * It is not guaranteed that the update happens immediately (synchronously) after it is requested.
72
+ *
73
+ * @deprecated This method is only used with renderers and will be removed in Vaadin 26
72
74
  */
73
75
  requestContentUpdate(): void;
74
76
  }
@@ -77,6 +77,8 @@ export const DialogRendererMixin = (superClass) =>
77
77
  * as well as `headerRender` and `footerRenderer` properties, if these are defined.
78
78
  *
79
79
  * It is not guaranteed that the update happens immediately (synchronously) after it is requested.
80
+ *
81
+ * @deprecated This method is only used with renderers and will be removed in Vaadin 26
80
82
  */
81
83
  requestContentUpdate() {
82
84
  if (this._overlayElement) {
@@ -116,6 +116,7 @@ export { DialogOverlay } from './vaadin-dialog-overlay.js';
116
116
  * @fires {CustomEvent} opened-changed - Fired when the `opened` property changes.
117
117
  * @fires {CustomEvent} closed - Fired when the dialog is closed.
118
118
  *
119
+ * @attr {string} theme - The theme variants to apply to the component.
119
120
  * @customElement vaadin-dialog
120
121
  * @extends HTMLElement
121
122
  */
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/dialog",
4
- "version": "25.3.0-alpha6",
4
+ "version": "25.3.0-alpha8",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -123,9 +123,7 @@
123
123
  "description": "The theme variants to apply to the component.",
124
124
  "value": {
125
125
  "type": [
126
- "string",
127
- "null",
128
- "undefined"
126
+ "string"
129
127
  ]
130
128
  }
131
129
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/dialog",
4
- "version": "25.3.0-alpha6",
4
+ "version": "25.3.0-alpha8",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {