@vaadin/dialog 22.0.0-rc1 → 23.0.0-alpha2
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": "
|
|
3
|
+
"version": "23.0.0-alpha2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -35,18 +35,18 @@
|
|
|
35
35
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
36
36
|
"@polymer/iron-resizable-behavior": "^3.0.0",
|
|
37
37
|
"@polymer/polymer": "^3.0.0",
|
|
38
|
-
"@vaadin/component-base": "
|
|
39
|
-
"@vaadin/vaadin-lumo-styles": "
|
|
40
|
-
"@vaadin/vaadin-material-styles": "
|
|
41
|
-
"@vaadin/vaadin-overlay": "
|
|
42
|
-
"@vaadin/vaadin-themable-mixin": "
|
|
38
|
+
"@vaadin/component-base": "23.0.0-alpha2",
|
|
39
|
+
"@vaadin/vaadin-lumo-styles": "23.0.0-alpha2",
|
|
40
|
+
"@vaadin/vaadin-material-styles": "23.0.0-alpha2",
|
|
41
|
+
"@vaadin/vaadin-overlay": "23.0.0-alpha2",
|
|
42
|
+
"@vaadin/vaadin-themable-mixin": "23.0.0-alpha2"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@esm-bundle/chai": "^4.3.4",
|
|
46
|
-
"@vaadin/polymer-legacy-adapter": "
|
|
46
|
+
"@vaadin/polymer-legacy-adapter": "23.0.0-alpha2",
|
|
47
47
|
"@vaadin/testing-helpers": "^0.3.2",
|
|
48
|
-
"@vaadin/text-area": "
|
|
48
|
+
"@vaadin/text-area": "23.0.0-alpha2",
|
|
49
49
|
"sinon": "^9.2.1"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "070f586dead02ca41b66717820c647f48bf1665f"
|
|
52
52
|
}
|
|
@@ -71,12 +71,14 @@ export const DialogDraggableMixin = (superClass) =>
|
|
|
71
71
|
const isContentPart = e.target === this.$.overlay.$.content;
|
|
72
72
|
|
|
73
73
|
const isDraggable = e.composedPath().some((node, index) => {
|
|
74
|
-
if (node.classList) {
|
|
75
|
-
|
|
76
|
-
const isDraggableLeafOnly = node.classList.contains('draggable-leaf-only');
|
|
77
|
-
const isLeafNode = index === 0;
|
|
78
|
-
return (isDraggableLeafOnly && isLeafNode) || (isDraggableNode && (!isDraggableLeafOnly || isLeafNode));
|
|
74
|
+
if (!node.classList) {
|
|
75
|
+
return false;
|
|
79
76
|
}
|
|
77
|
+
|
|
78
|
+
const isDraggableNode = node.classList.contains(this.__dragHandleClassName || 'draggable');
|
|
79
|
+
const isDraggableLeafOnly = node.classList.contains('draggable-leaf-only');
|
|
80
|
+
const isLeafNode = index === 0;
|
|
81
|
+
return (isDraggableLeafOnly && isLeafNode) || (isDraggableNode && (!isDraggableLeafOnly || isLeafNode));
|
|
80
82
|
});
|
|
81
83
|
|
|
82
84
|
if ((isResizerContainer && !isResizerContainerScrollbar) || isContentPart || isDraggable) {
|
package/src/vaadin-dialog.d.ts
CHANGED
|
@@ -4,10 +4,16 @@
|
|
|
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';
|
|
7
|
+
import { OverlayElement } from '@vaadin/vaadin-overlay/src/vaadin-overlay.js';
|
|
7
8
|
import { ThemePropertyMixin } from '@vaadin/vaadin-themable-mixin/vaadin-theme-property-mixin.js';
|
|
8
9
|
import { DialogDraggableMixin } from './vaadin-dialog-draggable-mixin.js';
|
|
9
10
|
import { DialogResizableMixin } from './vaadin-dialog-resizable-mixin.js';
|
|
10
11
|
|
|
12
|
+
/**
|
|
13
|
+
* An element used internally by `<vaadin-dialog>`. Not intended to be used separately.
|
|
14
|
+
*/
|
|
15
|
+
export class DialogOverlay extends OverlayElement {}
|
|
16
|
+
|
|
11
17
|
export type DialogRenderer = (root: HTMLElement, dialog?: Dialog) => void;
|
|
12
18
|
|
|
13
19
|
export type DialogResizableDirection = 'n' | 'e' | 's' | 'w' | 'nw' | 'ne' | 'se' | 'sw';
|
|
@@ -159,6 +165,7 @@ declare class Dialog extends ThemePropertyMixin(ElementMixin(DialogDraggableMixi
|
|
|
159
165
|
declare global {
|
|
160
166
|
interface HTMLElementTagNameMap {
|
|
161
167
|
'vaadin-dialog': Dialog;
|
|
168
|
+
'vaadin-dialog-overlay': DialogOverlay;
|
|
162
169
|
}
|
|
163
170
|
}
|
|
164
171
|
|
package/src/vaadin-dialog.js
CHANGED
|
@@ -40,7 +40,7 @@ let memoizedTemplate;
|
|
|
40
40
|
* @extends OverlayElement
|
|
41
41
|
* @private
|
|
42
42
|
*/
|
|
43
|
-
class DialogOverlay extends mixinBehaviors(IronResizableBehavior, OverlayElement) {
|
|
43
|
+
export class DialogOverlay extends mixinBehaviors(IronResizableBehavior, OverlayElement) {
|
|
44
44
|
static get is() {
|
|
45
45
|
return 'vaadin-dialog-overlay';
|
|
46
46
|
}
|
|
@@ -73,7 +73,7 @@ class DialogOverlay extends mixinBehaviors(IronResizableBehavior, OverlayElement
|
|
|
73
73
|
*/
|
|
74
74
|
setBounds(bounds) {
|
|
75
75
|
const overlay = this.$.overlay;
|
|
76
|
-
const parsedBounds =
|
|
76
|
+
const parsedBounds = { ...bounds };
|
|
77
77
|
|
|
78
78
|
if (overlay.style.position !== 'absolute') {
|
|
79
79
|
overlay.style.position = 'absolute';
|