@vaadin/vaadin-overlay 22.0.0-alpha6 → 22.0.0-alpha7

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,10 +1,29 @@
1
1
  {
2
2
  "name": "@vaadin/vaadin-overlay",
3
- "version": "22.0.0-alpha6",
3
+ "version": "22.0.0-alpha7",
4
+ "publishConfig": {
5
+ "access": "public"
6
+ },
4
7
  "description": "vaadin-overlay",
8
+ "license": "Apache-2.0",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/vaadin/web-components.git",
12
+ "directory": "packages/vaadin-overlay"
13
+ },
14
+ "author": "Vaadin Ltd",
15
+ "homepage": "https://vaadin.com/components",
16
+ "bugs": {
17
+ "url": "https://github.com/vaadin/vaadin-overlay/issues"
18
+ },
5
19
  "main": "vaadin-overlay.js",
6
20
  "module": "vaadin-overlay.js",
7
- "repository": "vaadin/vaadin-overlay",
21
+ "files": [
22
+ "src",
23
+ "theme",
24
+ "vaadin-*.d.ts",
25
+ "vaadin-*.js"
26
+ ],
8
27
  "keywords": [
9
28
  "Vaadin",
10
29
  "vaadin-overlay",
@@ -13,37 +32,22 @@
13
32
  "web-component",
14
33
  "polymer"
15
34
  ],
16
- "author": "Vaadin Ltd",
17
- "license": "Apache-2.0",
18
- "bugs": {
19
- "url": "https://github.com/vaadin/vaadin-overlay/issues"
20
- },
21
- "homepage": "https://vaadin.com/components",
22
- "files": [
23
- "vaadin-*.d.ts",
24
- "vaadin-*.js",
25
- "src",
26
- "theme"
27
- ],
28
35
  "dependencies": {
29
36
  "@polymer/polymer": "^3.0.0",
30
- "@vaadin/vaadin-element-mixin": "^22.0.0-alpha6",
31
- "@vaadin/vaadin-lumo-styles": "^22.0.0-alpha6",
32
- "@vaadin/vaadin-material-styles": "^22.0.0-alpha6",
33
- "@vaadin/vaadin-themable-mixin": "^22.0.0-alpha6"
37
+ "@vaadin/component-base": "22.0.0-alpha7",
38
+ "@vaadin/vaadin-lumo-styles": "22.0.0-alpha7",
39
+ "@vaadin/vaadin-material-styles": "22.0.0-alpha7",
40
+ "@vaadin/vaadin-themable-mixin": "22.0.0-alpha7"
34
41
  },
35
42
  "devDependencies": {
36
43
  "@esm-bundle/chai": "^4.3.4",
37
44
  "@polymer/iron-overlay-behavior": "^3.0.0",
38
- "@vaadin/button": "^22.0.0-alpha6",
39
- "@vaadin/radio-group": "^22.0.0-alpha6",
45
+ "@vaadin/button": "22.0.0-alpha7",
46
+ "@vaadin/radio-group": "22.0.0-alpha7",
40
47
  "@vaadin/testing-helpers": "^0.3.0",
41
- "@vaadin/vaadin-text-field": "^22.0.0-alpha6",
42
- "lit": "^2.0.0-rc.1",
48
+ "@vaadin/text-field": "22.0.0-alpha7",
49
+ "lit": "^2.0.0",
43
50
  "sinon": "^9.2.1"
44
51
  },
45
- "publishConfig": {
46
- "access": "public"
47
- },
48
- "gitHead": "4b136b1c7da8942960e7255f40c27859125b3a45"
52
+ "gitHead": "8e89419c6b44a1d225d5859e180d7b35e47ddb52"
49
53
  }
@@ -107,7 +107,7 @@ export const PositionMixin = (superClass) =>
107
107
  this.__margins[propName] = parseInt(computedStyle[propName], 10);
108
108
  });
109
109
  }
110
- this.__isRTL = computedStyle.direction === 'rtl';
110
+ this.setAttribute('dir', computedStyle.direction);
111
111
 
112
112
  this._updatePosition();
113
113
  // Schedule another position update (to cover virtual keyboard opening for example)
@@ -115,6 +115,10 @@ export const PositionMixin = (superClass) =>
115
115
  }
116
116
  }
117
117
 
118
+ get __isRTL() {
119
+ return this.getAttribute('dir') === 'rtl';
120
+ }
121
+
118
122
  __positionSettingsChanged() {
119
123
  this._updatePosition();
120
124
  }
@@ -160,6 +164,12 @@ export const PositionMixin = (superClass) =>
160
164
 
161
165
  // Apply the positioning properties to the overlay
162
166
  Object.assign(this.style, verticalProps, horizontalProps);
167
+
168
+ this.toggleAttribute('bottom-aligned', !shouldAlignStartVertically);
169
+ this.toggleAttribute('top-aligned', shouldAlignStartVertically);
170
+
171
+ this.toggleAttribute('end-aligned', !flexStart);
172
+ this.toggleAttribute('start-aligned', flexStart);
163
173
  }
164
174
 
165
175
  __shouldAlignStartHorizontally(targetRect, rtl) {
@@ -1,6 +1,6 @@
1
- import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
1
+ import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
2
2
 
3
- import { DirMixin } from '@vaadin/vaadin-element-mixin/vaadin-dir-mixin.js';
3
+ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
4
4
 
5
5
  import { OverlayEventMap, OverlayRenderer } from './interfaces';
6
6
 
@@ -7,8 +7,8 @@ import { PolymerElement, html } from '@polymer/polymer/polymer-element.js';
7
7
  import { templatize } from '@polymer/polymer/lib/utils/templatize.js';
8
8
  import { afterNextRender } from '@polymer/polymer/lib/utils/render-status.js';
9
9
  import { FlattenedNodesObserver } from '@polymer/polymer/lib/utils/flattened-nodes-observer.js';
10
+ import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
10
11
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
11
- import { DirMixin } from '@vaadin/vaadin-element-mixin/vaadin-dir-mixin.js';
12
12
  import { FocusablesHelper } from './vaadin-focusables-helper.js';
13
13
 
14
14
  /**