@vaadin/overlay 24.5.0-alpha1 → 24.5.0-alpha10
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/overlay",
|
|
3
|
-
"version": "24.5.0-
|
|
3
|
+
"version": "24.5.0-alpha10",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -36,17 +36,17 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
38
38
|
"@polymer/polymer": "^3.0.0",
|
|
39
|
-
"@vaadin/a11y-base": "24.5.0-
|
|
40
|
-
"@vaadin/component-base": "24.5.0-
|
|
41
|
-
"@vaadin/vaadin-lumo-styles": "24.5.0-
|
|
42
|
-
"@vaadin/vaadin-material-styles": "24.5.0-
|
|
43
|
-
"@vaadin/vaadin-themable-mixin": "24.5.0-
|
|
39
|
+
"@vaadin/a11y-base": "24.5.0-alpha10",
|
|
40
|
+
"@vaadin/component-base": "24.5.0-alpha10",
|
|
41
|
+
"@vaadin/vaadin-lumo-styles": "24.5.0-alpha10",
|
|
42
|
+
"@vaadin/vaadin-material-styles": "24.5.0-alpha10",
|
|
43
|
+
"@vaadin/vaadin-themable-mixin": "24.5.0-alpha10",
|
|
44
44
|
"lit": "^3.0.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@
|
|
48
|
-
"@vaadin/testing-helpers": "^0.
|
|
49
|
-
"sinon": "^
|
|
47
|
+
"@vaadin/chai-plugins": "24.5.0-alpha10",
|
|
48
|
+
"@vaadin/testing-helpers": "^1.0.0",
|
|
49
|
+
"sinon": "^18.0.0"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "6f9c37308031af872a98017bfab4de89aeacda51"
|
|
52
52
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { AriaModalController } from '@vaadin/a11y-base/src/aria-modal-controller.js';
|
|
7
7
|
import { FocusRestorationController } from '@vaadin/a11y-base/src/focus-restoration-controller.js';
|
|
8
8
|
import { FocusTrapController } from '@vaadin/a11y-base/src/focus-trap-controller.js';
|
|
9
|
-
import { getDeepActiveElement } from '@vaadin/a11y-base/src/focus-utils.js';
|
|
9
|
+
import { getDeepActiveElement, isKeyboardActive } from '@vaadin/a11y-base/src/focus-utils.js';
|
|
10
10
|
import { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';
|
|
11
11
|
|
|
12
12
|
/**
|
|
@@ -76,7 +76,8 @@ export const OverlayFocusMixin = (superClass) =>
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
if (this.restoreFocusOnClose && this._shouldRestoreFocus()) {
|
|
79
|
-
|
|
79
|
+
const preventScroll = !isKeyboardActive();
|
|
80
|
+
this.__focusRestorationController.restoreFocus({ preventScroll });
|
|
80
81
|
}
|
|
81
82
|
}
|
|
82
83
|
|
|
@@ -203,7 +203,6 @@ export const PositionMixin = (superClass) =>
|
|
|
203
203
|
this.__margins[propName] = parseInt(computedStyle[propName], 10);
|
|
204
204
|
});
|
|
205
205
|
}
|
|
206
|
-
this.setAttribute('dir', computedStyle.direction);
|
|
207
206
|
|
|
208
207
|
this._updatePosition();
|
|
209
208
|
// Schedule another position update (to cover virtual keyboard opening for example)
|
|
@@ -320,7 +319,7 @@ export const PositionMixin = (superClass) =>
|
|
|
320
319
|
);
|
|
321
320
|
}
|
|
322
321
|
|
|
323
|
-
// eslint-disable-next-line max-params
|
|
322
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
324
323
|
__shouldAlignStart(targetRect, contentSize, viewportSize, margins, defaultAlignStart, noOverlap, propNames) {
|
|
325
324
|
const spaceForStartAlignment =
|
|
326
325
|
viewportSize - targetRect[noOverlap ? propNames.end : propNames.start] - margins[propNames.end];
|
|
@@ -377,7 +376,7 @@ export const PositionMixin = (superClass) =>
|
|
|
377
376
|
* Returns an object with CSS position properties to set,
|
|
378
377
|
* e.g. { top: "100px" }
|
|
379
378
|
*/
|
|
380
|
-
// eslint-disable-next-line max-params
|
|
379
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
381
380
|
__calculatePositionInOneDimension(targetRect, overlayRect, noOverlap, propNames, overlay, shouldAlignStart) {
|
|
382
381
|
const cssPropNameToSet = shouldAlignStart ? propNames.start : propNames.end;
|
|
383
382
|
const cssPropNameToClear = shouldAlignStart ? propNames.end : propNames.start;
|