Socket
Socket
Sign inDemoInstall

@vaadin/overlay

Package Overview
Dependencies
Maintainers
12
Versions
246
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vaadin/overlay - npm Package Compare versions

Comparing version 24.1.1 to 24.2.0-alpha1

src/vaadin-overlay-stack-mixin.d.ts

14

package.json
{
"name": "@vaadin/overlay",
"version": "24.1.1",
"version": "24.2.0-alpha1",
"publishConfig": {

@@ -39,7 +39,7 @@ "access": "public"

"@polymer/polymer": "^3.0.0",
"@vaadin/a11y-base": "~24.1.1",
"@vaadin/component-base": "~24.1.1",
"@vaadin/vaadin-lumo-styles": "~24.1.1",
"@vaadin/vaadin-material-styles": "~24.1.1",
"@vaadin/vaadin-themable-mixin": "~24.1.1"
"@vaadin/a11y-base": "24.2.0-alpha1",
"@vaadin/component-base": "24.2.0-alpha1",
"@vaadin/vaadin-lumo-styles": "24.2.0-alpha1",
"@vaadin/vaadin-material-styles": "24.2.0-alpha1",
"@vaadin/vaadin-themable-mixin": "24.2.0-alpha1"
},

@@ -52,3 +52,3 @@ "devDependencies": {

},
"gitHead": "c3a3d904885bd37ebb07a84b09617a340b4fab7e"
"gitHead": "0dbb118320203ab6c0c07450a3e718815367589f"
}

@@ -113,3 +113,3 @@ /**

*
* See [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.
* See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
*

@@ -167,7 +167,2 @@ * @fires {CustomEvent} opened-changed - Fired when the `opened` property changes.

/**
* Returns true if this is the last one in the opened overlays stack.
*/
protected readonly _last: boolean;
close(sourceEvent?: Event | null): void;

@@ -183,7 +178,2 @@

/**
* Brings the overlay as visually the frontmost one
*/
bringToFront(): void;
addEventListener<K extends keyof OverlayEventMap>(

@@ -190,0 +180,0 @@ type: K,

@@ -13,2 +13,3 @@ /**

import { OverlayFocusMixin } from './vaadin-overlay-focus-mixin.js';
import { OverlayStackMixin } from './vaadin-overlay-stack-mixin.js';

@@ -64,3 +65,3 @@ /**

*
* See [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.
* See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
*

@@ -80,3 +81,3 @@ * @fires {CustomEvent} opened-changed - Fired when the `opened` property changes.

*/
class Overlay extends OverlayFocusMixin(ThemableMixin(DirMixin(PolymerElement))) {
class Overlay extends OverlayStackMixin(OverlayFocusMixin(ThemableMixin(DirMixin(PolymerElement)))) {
static get template() {

@@ -257,12 +258,2 @@ return html`

/**
* 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() {

@@ -281,11 +272,2 @@ 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 */

@@ -624,19 +606,2 @@ ready() {

/** @private */
_enterModalState() {
if (document.body.style.pointerEvents !== 'none') {
// Set body pointer-events to 'none' to disable mouse interactions with
// other document nodes.
this._previousDocumentPointerEvents = document.body.style.pointerEvents;
document.body.style.pointerEvents = 'none';
}
// Disable pointer events in other attached overlays
Overlay.__attachedInstances.forEach((el) => {
if (el !== this) {
el.shadowRoot.querySelector('[part="overlay"]').style.pointerEvents = 'none';
}
});
}
/** @private */
_removeGlobalListeners() {

@@ -649,27 +614,2 @@ document.removeEventListener('mousedown', this._boundMouseDownListener);

/** @private */
_exitModalState() {
if (this._previousDocumentPointerEvents !== undefined) {
// Restore body pointer-events
document.body.style.pointerEvents = this._previousDocumentPointerEvents;
delete this._previousDocumentPointerEvents;
}
// Restore pointer events in the previous overlay(s)
const instances = Overlay.__attachedInstances;
let el;
// Use instances.pop() to ensure the reverse order
while ((el = instances.pop())) {
if (el === this) {
// Skip the current instance
continue;
}
el.shadowRoot.querySelector('[part="overlay"]').style.removeProperty('pointer-events');
if (!el.modeless) {
// Stop after the last modal
break;
}
}
}
/** @private */
_rendererOrDataChanged(renderer, owner, model, opened) {

@@ -700,16 +640,2 @@ const ownerOrModelChanged = this._oldOwner !== owner || this._oldModel !== model;

/**
* Brings the overlay as visually the frontmost one
*/
bringToFront() {
let zIndex = '';
const frontmost = Overlay.__attachedInstances.filter((o) => o !== this).pop();
if (frontmost) {
const frontmostZIndex = frontmost.__zIndex;
zIndex = frontmostZIndex + 1;
}
this.style.zIndex = zIndex;
this.__zIndex = zIndex || parseFloat(getComputedStyle(this).zIndex);
}
/**
* @event vaadin-overlay-open

@@ -716,0 +642,0 @@ * Fired after the overlay is opened.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc