@vaadin/overlay
Advanced tools
Comparing version 24.0.0-alpha1 to 24.0.0-alpha10
{ | ||
"name": "@vaadin/overlay", | ||
"version": "24.0.0-alpha1", | ||
"version": "24.0.0-alpha10", | ||
"publishConfig": { | ||
@@ -37,19 +37,16 @@ "access": "public" | ||
"dependencies": { | ||
"@open-wc/dedupe-mixin": "^1.3.0", | ||
"@polymer/polymer": "^3.0.0", | ||
"@vaadin/component-base": "24.0.0-alpha1", | ||
"@vaadin/vaadin-lumo-styles": "24.0.0-alpha1", | ||
"@vaadin/vaadin-material-styles": "24.0.0-alpha1", | ||
"@vaadin/vaadin-themable-mixin": "24.0.0-alpha1" | ||
"@vaadin/component-base": "24.0.0-alpha10", | ||
"@vaadin/vaadin-lumo-styles": "24.0.0-alpha10", | ||
"@vaadin/vaadin-material-styles": "24.0.0-alpha10", | ||
"@vaadin/vaadin-themable-mixin": "24.0.0-alpha10" | ||
}, | ||
"devDependencies": { | ||
"@esm-bundle/chai": "^4.3.4", | ||
"@vaadin/button": "24.0.0-alpha1", | ||
"@vaadin/polymer-legacy-adapter": "24.0.0-alpha1", | ||
"@vaadin/radio-group": "24.0.0-alpha1", | ||
"@vaadin/testing-helpers": "^0.3.2", | ||
"@vaadin/text-field": "24.0.0-alpha1", | ||
"lit": "^2.0.0", | ||
"sinon": "^13.0.2" | ||
}, | ||
"gitHead": "427527c27c4b27822d61fd41d38d7b170134770b" | ||
"gitHead": "2e04534d8b47bcd216f89b5f849bafef1a73b174" | ||
} |
/** | ||
* @license | ||
* Copyright (c) 2017 - 2022 Vaadin Ltd. | ||
* Copyright (c) 2017 - 2023 Vaadin Ltd. | ||
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ | ||
@@ -53,2 +53,4 @@ */ | ||
* the default side defined by this property. | ||
* | ||
* @attr {start|end} horizontal-align | ||
*/ | ||
@@ -66,2 +68,4 @@ horizontalAlign: { | ||
* the default side defined by this property. | ||
* | ||
* @attr {top|bottom} vertical-align | ||
*/ | ||
@@ -76,2 +80,4 @@ verticalAlign: { | ||
* the target element in the x-axis, or be positioned right next to it. | ||
* | ||
* @attr {boolean} no-horizontal-overlap | ||
*/ | ||
@@ -86,2 +92,4 @@ noHorizontalOverlap: { | ||
* the target element in the y-axis, or be positioned right above/below it. | ||
* | ||
* @attr {boolean} no-vertical-overlap | ||
*/ | ||
@@ -177,6 +185,2 @@ noVerticalOverlap: { | ||
get __isRTL() { | ||
return this.getAttribute('dir') === 'rtl'; | ||
} | ||
__positionSettingsChanged() { | ||
@@ -205,5 +209,5 @@ this._updatePosition(); | ||
const shouldAlignStartHorizontally = this.__shouldAlignStartHorizontally(targetRect, this.__isRTL); | ||
const flexStart = | ||
(!this.__isRTL && shouldAlignStartHorizontally) || (this.__isRTL && !shouldAlignStartHorizontally); | ||
const isRTL = this.__isRTL; | ||
const shouldAlignStartHorizontally = this.__shouldAlignStartHorizontally(targetRect, isRTL); | ||
const flexStart = (!isRTL && shouldAlignStartHorizontally) || (isRTL && !shouldAlignStartHorizontally); | ||
this.style.alignItems = flexStart ? 'flex-start' : 'flex-end'; | ||
@@ -210,0 +214,0 @@ |
/** | ||
* @license | ||
* Copyright (c) 2017 - 2022 Vaadin Ltd. | ||
* Copyright (c) 2017 - 2023 Vaadin Ltd. | ||
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ | ||
@@ -5,0 +5,0 @@ */ |
/** | ||
* @license | ||
* Copyright (c) 2017 - 2022 Vaadin Ltd. | ||
* Copyright (c) 2017 - 2023 Vaadin Ltd. | ||
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ | ||
@@ -282,2 +282,12 @@ */ | ||
/** | ||
* Returns all attached overlays in visual stacking order. | ||
* @private | ||
*/ | ||
static get __attachedInstances() { | ||
return Array.from(document.body.children) | ||
.filter((el) => el instanceof Overlay && !el.hasAttribute('closing')) | ||
.sort((a, b) => a.__zIndex - b.__zIndex || 0); | ||
} | ||
constructor() { | ||
@@ -298,2 +308,11 @@ super(); | ||
/** | ||
* Returns true if this is the last one in the opened overlays stack | ||
* @return {boolean} | ||
* @protected | ||
*/ | ||
get _last() { | ||
return this === Overlay.__attachedInstances.pop(); | ||
} | ||
/** @protected */ | ||
@@ -638,21 +657,2 @@ ready() { | ||
/** | ||
* Returns all attached overlays in visual stacking order. | ||
* @private | ||
*/ | ||
static get __attachedInstances() { | ||
return Array.from(document.body.children) | ||
.filter((el) => el instanceof Overlay && !el.hasAttribute('closing')) | ||
.sort((a, b) => a.__zIndex - b.__zIndex || 0); | ||
} | ||
/** | ||
* Returns true if this is the last one in the opened overlays stack | ||
* @return {boolean} | ||
* @protected | ||
*/ | ||
get _last() { | ||
return this === Overlay.__attachedInstances.pop(); | ||
} | ||
/** @private */ | ||
@@ -659,0 +659,0 @@ _modelessChanged(modeless) { |
58955
4
13
1246
6
46306
126
+ Added@open-wc/dedupe-mixin@^1.3.0
+ Added@vaadin/component-base@24.0.0-alpha10(transitive)
+ Added@vaadin/icon@24.0.0-alpha10(transitive)
+ Added@vaadin/vaadin-lumo-styles@24.0.0-alpha10(transitive)
+ Added@vaadin/vaadin-material-styles@24.0.0-alpha10(transitive)
+ Added@vaadin/vaadin-themable-mixin@24.0.0-alpha10(transitive)
- Removed@polymer/iron-flex-layout@3.0.1(transitive)
- Removed@polymer/iron-icon@3.0.1(transitive)
- Removed@polymer/iron-iconset-svg@3.0.1(transitive)
- Removed@polymer/iron-meta@3.0.1(transitive)
- Removed@vaadin/component-base@24.0.0-alpha1(transitive)
- Removed@vaadin/icon@24.0.0-alpha1(transitive)
- Removed@vaadin/vaadin-lumo-styles@24.0.0-alpha1(transitive)
- Removed@vaadin/vaadin-material-styles@24.0.0-alpha1(transitive)
- Removed@vaadin/vaadin-themable-mixin@24.0.0-alpha1(transitive)