@vaadin/vaadin-overlay 23.3.0-alpha3 → 23.3.0-alpha5

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/vaadin-overlay",
3
- "version": "23.3.0-alpha3",
3
+ "version": "23.3.0-alpha5",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -34,21 +34,7 @@
34
34
  "polymer"
35
35
  ],
36
36
  "dependencies": {
37
- "@polymer/polymer": "^3.0.0",
38
- "@vaadin/component-base": "23.3.0-alpha3",
39
- "@vaadin/vaadin-lumo-styles": "23.3.0-alpha3",
40
- "@vaadin/vaadin-material-styles": "23.3.0-alpha3",
41
- "@vaadin/vaadin-themable-mixin": "23.3.0-alpha3"
37
+ "@vaadin/overlay": "23.3.0-alpha5"
42
38
  },
43
- "devDependencies": {
44
- "@esm-bundle/chai": "^4.3.4",
45
- "@polymer/iron-overlay-behavior": "^3.0.0",
46
- "@vaadin/button": "23.3.0-alpha3",
47
- "@vaadin/radio-group": "23.3.0-alpha3",
48
- "@vaadin/testing-helpers": "^0.3.2",
49
- "@vaadin/text-field": "23.3.0-alpha3",
50
- "lit": "^2.0.0",
51
- "sinon": "^13.0.2"
52
- },
53
- "gitHead": "e86cd2abf3e28bade37711291331415d92c454ec"
39
+ "gitHead": "0b6fdcf444683e97e3efb433d603e1274d5bcd66"
54
40
  }
@@ -3,354 +3,4 @@
3
3
  * Copyright (c) 2017 - 2022 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
- import { getAncestorRootNodes } from '@vaadin/component-base/src/dom-utils.js';
7
-
8
- const PROP_NAMES_VERTICAL = {
9
- start: 'top',
10
- end: 'bottom',
11
- };
12
-
13
- const PROP_NAMES_HORIZONTAL = {
14
- start: 'left',
15
- end: 'right',
16
- };
17
-
18
- const targetResizeObserver = new ResizeObserver((entries) => {
19
- setTimeout(() => {
20
- entries.forEach((entry) => {
21
- if (entry.target.__overlay) {
22
- entry.target.__overlay._updatePosition();
23
- }
24
- });
25
- });
26
- });
27
-
28
- /**
29
- * @polymerMixin
30
- */
31
- export const PositionMixin = (superClass) =>
32
- class PositionMixin extends superClass {
33
- static get properties() {
34
- return {
35
- /**
36
- * The element next to which this overlay should be aligned.
37
- * The position of the overlay relative to the positionTarget can be adjusted
38
- * with properties `horizontalAlign`, `verticalAlign`, `noHorizontalOverlap`
39
- * and `noVerticalOverlap`.
40
- */
41
- positionTarget: {
42
- type: Object,
43
- value: null,
44
- },
45
-
46
- /**
47
- * When `positionTarget` is set, this property defines whether to align the overlay's
48
- * left or right side to the target element by default.
49
- * Possible values are `start` and `end`.
50
- * RTL is taken into account when interpreting the value.
51
- * The overlay is automatically flipped to the opposite side when it doesn't fit into
52
- * the default side defined by this property.
53
- */
54
- horizontalAlign: {
55
- type: String,
56
- value: 'start',
57
- },
58
-
59
- /**
60
- * When `positionTarget` is set, this property defines whether to align the overlay's
61
- * top or bottom side to the target element by default.
62
- * Possible values are `top` and `bottom`.
63
- * The overlay is automatically flipped to the opposite side when it doesn't fit into
64
- * the default side defined by this property.
65
- */
66
- verticalAlign: {
67
- type: String,
68
- value: 'top',
69
- },
70
-
71
- /**
72
- * When `positionTarget` is set, this property defines whether the overlay should overlap
73
- * the target element in the x-axis, or be positioned right next to it.
74
- */
75
- noHorizontalOverlap: {
76
- type: Boolean,
77
- value: false,
78
- },
79
-
80
- /**
81
- * When `positionTarget` is set, this property defines whether the overlay should overlap
82
- * the target element in the y-axis, or be positioned right above/below it.
83
- */
84
- noVerticalOverlap: {
85
- type: Boolean,
86
- value: false,
87
- },
88
- };
89
- }
90
-
91
- static get observers() {
92
- return [
93
- '__positionSettingsChanged(horizontalAlign, verticalAlign, noHorizontalOverlap, noVerticalOverlap)',
94
- '__overlayOpenedChanged(opened, positionTarget)',
95
- ];
96
- }
97
-
98
- constructor() {
99
- super();
100
-
101
- this.__onScroll = this.__onScroll.bind(this);
102
- this._updatePosition = this._updatePosition.bind(this);
103
- }
104
-
105
- /** @protected */
106
- connectedCallback() {
107
- super.connectedCallback();
108
-
109
- if (this.opened) {
110
- this.__addUpdatePositionEventListeners();
111
- }
112
- }
113
-
114
- /** @protected */
115
- disconnectedCallback() {
116
- super.disconnectedCallback();
117
- this.__removeUpdatePositionEventListeners();
118
- }
119
-
120
- /** @private */
121
- __addUpdatePositionEventListeners() {
122
- window.addEventListener('resize', this._updatePosition);
123
-
124
- this.__positionTargetAncestorRootNodes = getAncestorRootNodes(this.positionTarget);
125
- this.__positionTargetAncestorRootNodes.forEach((node) => {
126
- node.addEventListener('scroll', this.__onScroll, true);
127
- });
128
- }
129
-
130
- /** @private */
131
- __removeUpdatePositionEventListeners() {
132
- window.removeEventListener('resize', this._updatePosition);
133
-
134
- if (this.__positionTargetAncestorRootNodes) {
135
- this.__positionTargetAncestorRootNodes.forEach((node) => {
136
- node.removeEventListener('scroll', this.__onScroll, true);
137
- });
138
- this.__positionTargetAncestorRootNodes = null;
139
- }
140
- }
141
-
142
- /** @private */
143
- __overlayOpenedChanged(opened, positionTarget) {
144
- this.__removeUpdatePositionEventListeners();
145
-
146
- if (positionTarget) {
147
- positionTarget.__overlay = null;
148
- targetResizeObserver.unobserve(positionTarget);
149
-
150
- if (opened) {
151
- this.__addUpdatePositionEventListeners();
152
- positionTarget.__overlay = this;
153
- targetResizeObserver.observe(positionTarget);
154
- }
155
- }
156
-
157
- if (opened) {
158
- const computedStyle = getComputedStyle(this);
159
- if (!this.__margins) {
160
- this.__margins = {};
161
- ['top', 'bottom', 'left', 'right'].forEach((propName) => {
162
- this.__margins[propName] = parseInt(computedStyle[propName], 10);
163
- });
164
- }
165
- this.setAttribute('dir', computedStyle.direction);
166
-
167
- this._updatePosition();
168
- // Schedule another position update (to cover virtual keyboard opening for example)
169
- requestAnimationFrame(() => this._updatePosition());
170
- }
171
- }
172
-
173
- get __isRTL() {
174
- return this.getAttribute('dir') === 'rtl';
175
- }
176
-
177
- __positionSettingsChanged() {
178
- this._updatePosition();
179
- }
180
-
181
- /** @private */
182
- __onScroll(e) {
183
- // If the scroll event occurred inside the overlay, ignore it.
184
- if (!this.contains(e.target)) {
185
- this._updatePosition();
186
- }
187
- }
188
-
189
- _updatePosition() {
190
- if (!this.positionTarget || !this.opened) {
191
- return;
192
- }
193
-
194
- const targetRect = this.positionTarget.getBoundingClientRect();
195
-
196
- // Detect the desired alignment and update the layout accordingly
197
- const shouldAlignStartVertically = this.__shouldAlignStartVertically(targetRect);
198
- this.style.justifyContent = shouldAlignStartVertically ? 'flex-start' : 'flex-end';
199
-
200
- const shouldAlignStartHorizontally = this.__shouldAlignStartHorizontally(targetRect, this.__isRTL);
201
- const flexStart =
202
- (!this.__isRTL && shouldAlignStartHorizontally) || (this.__isRTL && !shouldAlignStartHorizontally);
203
- this.style.alignItems = flexStart ? 'flex-start' : 'flex-end';
204
-
205
- // Get the overlay rect after possible overlay alignment changes
206
- const overlayRect = this.getBoundingClientRect();
207
-
208
- // Obtain vertical positioning properties
209
- const verticalProps = this.__calculatePositionInOneDimension(
210
- targetRect,
211
- overlayRect,
212
- this.noVerticalOverlap,
213
- PROP_NAMES_VERTICAL,
214
- this,
215
- shouldAlignStartVertically,
216
- );
217
-
218
- // Obtain horizontal positioning properties
219
- const horizontalProps = this.__calculatePositionInOneDimension(
220
- targetRect,
221
- overlayRect,
222
- this.noHorizontalOverlap,
223
- PROP_NAMES_HORIZONTAL,
224
- this,
225
- shouldAlignStartHorizontally,
226
- );
227
-
228
- // Apply the positioning properties to the overlay
229
- Object.assign(this.style, verticalProps, horizontalProps);
230
-
231
- this.toggleAttribute('bottom-aligned', !shouldAlignStartVertically);
232
- this.toggleAttribute('top-aligned', shouldAlignStartVertically);
233
-
234
- this.toggleAttribute('end-aligned', !flexStart);
235
- this.toggleAttribute('start-aligned', flexStart);
236
- }
237
-
238
- __shouldAlignStartHorizontally(targetRect, rtl) {
239
- // Using previous size to fix a case where window resize may cause the overlay to be squeezed
240
- // smaller than its current space before the fit-calculations.
241
- const contentWidth = Math.max(this.__oldContentWidth || 0, this.$.overlay.offsetWidth);
242
- this.__oldContentWidth = this.$.overlay.offsetWidth;
243
-
244
- const viewportWidth = Math.min(window.innerWidth, document.documentElement.clientWidth);
245
- const defaultAlignLeft = (!rtl && this.horizontalAlign === 'start') || (rtl && this.horizontalAlign === 'end');
246
-
247
- return this.__shouldAlignStart(
248
- targetRect,
249
- contentWidth,
250
- viewportWidth,
251
- this.__margins,
252
- defaultAlignLeft,
253
- this.noHorizontalOverlap,
254
- PROP_NAMES_HORIZONTAL,
255
- );
256
- }
257
-
258
- __shouldAlignStartVertically(targetRect) {
259
- // Using previous size to fix a case where window resize may cause the overlay to be squeezed
260
- // smaller than its current space before the fit-calculations.
261
- const contentHeight = Math.max(this.__oldContentHeight || 0, this.$.overlay.offsetHeight);
262
- this.__oldContentHeight = this.$.overlay.offsetHeight;
263
-
264
- const viewportHeight = Math.min(window.innerHeight, document.documentElement.clientHeight);
265
- const defaultAlignTop = this.verticalAlign === 'top';
266
-
267
- return this.__shouldAlignStart(
268
- targetRect,
269
- contentHeight,
270
- viewportHeight,
271
- this.__margins,
272
- defaultAlignTop,
273
- this.noVerticalOverlap,
274
- PROP_NAMES_VERTICAL,
275
- );
276
- }
277
-
278
- // eslint-disable-next-line max-params
279
- __shouldAlignStart(targetRect, contentSize, viewportSize, margins, defaultAlignStart, noOverlap, propNames) {
280
- const spaceForStartAlignment =
281
- viewportSize - targetRect[noOverlap ? propNames.end : propNames.start] - margins[propNames.end];
282
- const spaceForEndAlignment = targetRect[noOverlap ? propNames.start : propNames.end] - margins[propNames.start];
283
-
284
- const spaceForDefaultAlignment = defaultAlignStart ? spaceForStartAlignment : spaceForEndAlignment;
285
- const spaceForOtherAlignment = defaultAlignStart ? spaceForEndAlignment : spaceForStartAlignment;
286
-
287
- const shouldGoToDefaultSide =
288
- spaceForDefaultAlignment > spaceForOtherAlignment || spaceForDefaultAlignment > contentSize;
289
-
290
- return defaultAlignStart === shouldGoToDefaultSide;
291
- }
292
-
293
- /**
294
- * Returns an adjusted value after resizing the browser window,
295
- * to avoid wrong calculations when e.g. previously set `bottom`
296
- * CSS property value is larger than the updated viewport height.
297
- * See https://github.com/vaadin/web-components/issues/4604
298
- */
299
- __adjustBottomProperty(cssPropNameToSet, propNames, currentValue) {
300
- let adjustedProp;
301
-
302
- if (cssPropNameToSet === propNames.end) {
303
- // Adjust horizontally
304
- if (propNames.end === PROP_NAMES_VERTICAL.end) {
305
- const viewportHeight = Math.min(window.innerHeight, document.documentElement.clientHeight);
306
-
307
- if (currentValue > viewportHeight && this.__oldViewportHeight) {
308
- const heightDiff = this.__oldViewportHeight - viewportHeight;
309
- adjustedProp = currentValue - heightDiff;
310
- }
311
-
312
- this.__oldViewportHeight = viewportHeight;
313
- }
314
-
315
- // Adjust vertically
316
- if (propNames.end === PROP_NAMES_HORIZONTAL.end) {
317
- const viewportWidth = Math.min(window.innerWidth, document.documentElement.clientWidth);
318
-
319
- if (currentValue > viewportWidth && this.__oldViewportWidth) {
320
- const widthDiff = this.__oldViewportWidth - viewportWidth;
321
- adjustedProp = currentValue - widthDiff;
322
- }
323
-
324
- this.__oldViewportWidth = viewportWidth;
325
- }
326
- }
327
-
328
- return adjustedProp;
329
- }
330
-
331
- /**
332
- * Returns an object with CSS position properties to set,
333
- * e.g. { top: "100px" }
334
- */
335
- // eslint-disable-next-line max-params
336
- __calculatePositionInOneDimension(targetRect, overlayRect, noOverlap, propNames, overlay, shouldAlignStart) {
337
- const cssPropNameToSet = shouldAlignStart ? propNames.start : propNames.end;
338
- const cssPropNameToClear = shouldAlignStart ? propNames.end : propNames.start;
339
-
340
- const currentValue = parseFloat(overlay.style[cssPropNameToSet] || getComputedStyle(overlay)[cssPropNameToSet]);
341
- const adjustedValue = this.__adjustBottomProperty(cssPropNameToSet, propNames, currentValue);
342
-
343
- const diff =
344
- overlayRect[shouldAlignStart ? propNames.start : propNames.end] -
345
- targetRect[noOverlap === shouldAlignStart ? propNames.end : propNames.start];
346
-
347
- const valueToSet = adjustedValue
348
- ? `${adjustedValue}px`
349
- : `${currentValue + diff * (shouldAlignStart ? -1 : 1)}px`;
350
-
351
- return {
352
- [cssPropNameToSet]: valueToSet,
353
- [cssPropNameToClear]: '',
354
- };
355
- }
356
- };
6
+ export { PositionMixin } from '@vaadin/overlay/src/vaadin-overlay-position-mixin.js';
@@ -1,251 +1,18 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2017 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2018 - 2022 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
- import { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';
7
- import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
8
- import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
9
-
10
- export type OverlayRenderer = (root: HTMLElement, owner: HTMLElement, model?: object) => void;
11
-
12
- /**
13
- * Fired when the `opened` property changes.
14
- */
15
- export type OverlayOpenedChangedEvent = CustomEvent<{ value: boolean }>;
16
-
17
- /**
18
- * Fired after the overlay is opened.
19
- */
20
- export type OverlayOpenEvent = CustomEvent;
21
-
22
- /**
23
- * Fired before the overlay will be closed.
24
- * If canceled the closing of the overlay is canceled as well.
25
- */
26
- export type OverlayCloseEvent = CustomEvent;
6
+ import type { Overlay } from '@vaadin/overlay/src/vaadin-overlay.js';
27
7
 
28
8
  /**
29
- * Fired when the overlay will be closed.
9
+ * @deprecated Import `Overlay` from `@vaadin/overlay` instead.
30
10
  */
31
- export type OverlayClosingEvent = CustomEvent;
32
-
33
- /**
34
- * Fired before the overlay will be closed on outside click.
35
- * If canceled the closing of the overlay is canceled as well.
36
- */
37
- export type OverlayOutsideClickEvent = CustomEvent<{ sourceEvent: MouseEvent }>;
38
-
39
- /**
40
- * Fired before the overlay will be closed on ESC button press.
41
- * If canceled the closing of the overlay is canceled as well.
42
- */
43
- export type OverlayEscapePressEvent = CustomEvent<{ sourceEvent: KeyboardEvent }>;
44
-
45
- export interface OverlayElementEventMap {
46
- 'opened-changed': OverlayOpenedChangedEvent;
47
- 'vaadin-overlay-open': OverlayOpenEvent;
48
- 'vaadin-overlay-close': OverlayCloseEvent;
49
- 'vaadin-overlay-closing': OverlayClosingEvent;
50
- 'vaadin-overlay-outside-click': OverlayOutsideClickEvent;
51
- 'vaadin-overlay-escape-press': OverlayEscapePressEvent;
52
- }
53
-
54
- export type OverlayEventMap = HTMLElementEventMap & OverlayElementEventMap;
11
+ export type OverlayElement = Overlay;
55
12
 
56
13
  /**
57
- * `<vaadin-overlay>` is a Web Component for creating overlays. The content of the overlay
58
- * can be populated in two ways: imperatively by using renderer callback function and
59
- * declaratively by using Polymer's Templates.
60
- *
61
- * ### Rendering
62
- *
63
- * By default, the overlay uses the content provided by using the renderer callback function.
64
- *
65
- * The renderer function provides `root`, `owner`, `model` arguments when applicable.
66
- * Generate DOM content by using `model` object properties if needed, append it to the `root`
67
- * element and control the state of the host element by accessing `owner`. Before generating new
68
- * content, users are able to check if there is already content in `root` for reusing it.
69
- *
70
- * ```html
71
- * <vaadin-overlay id="overlay"></vaadin-overlay>
72
- * ```
73
- * ```js
74
- * const overlay = document.querySelector('#overlay');
75
- * overlay.renderer = function(root) {
76
- * root.textContent = "Overlay content";
77
- * };
78
- * ```
79
- *
80
- * Renderer is called on the opening of the overlay and each time the related model is updated.
81
- * DOM generated during the renderer call can be reused
82
- * in the next renderer call and will be provided with the `root` argument.
83
- * On first call it will be empty.
84
- *
85
- * **NOTE:** when the renderer property is defined, the `<template>` content is not used.
86
- *
87
- * ### Templating
88
- *
89
- * Alternatively, the content can be provided with Polymer Template.
90
- * Overlay finds the first child template and uses that in case renderer callback function
91
- * is not provided. You can also set a custom template using the `template` property.
92
- *
93
- * After the content from the template is stamped, the `content` property
94
- * points to the content container.
95
- *
96
- * The overlay provides `forwardHostProp` when calling
97
- * `Polymer.Templatize.templatize` for the template, so that the bindings
98
- * from the parent scope propagate to the content.
99
- *
100
- * ```html
101
- * <vaadin-overlay>
102
- * <template>Overlay content</template>
103
- * </vaadin-overlay>
104
- * ```
105
- *
106
- * ### Styling
107
- *
108
- * To style the overlay content, use styles in the parent scope:
109
- *
110
- * - If the overlay is used in a component, then the component styles
111
- * apply the overlay content.
112
- * - If the overlay is used in the global DOM scope, then global styles
113
- * apply to the overlay content.
114
- *
115
- * See examples for styling the overlay content in the live demos.
116
- *
117
- * The following Shadow DOM parts are available for styling the overlay component itself:
118
- *
119
- * Part name | Description
120
- * -----------|---------------------------------------------------------|
121
- * `backdrop` | Backdrop of the overlay
122
- * `overlay` | Container for position/sizing/alignment of the content
123
- * `content` | Content of the overlay
124
- *
125
- * The following state attributes are available for styling:
126
- *
127
- * Attribute | Description | Part
128
- * ---|---|---
129
- * `opening` | Applied just after the overlay is attached to the DOM. You can apply a CSS @keyframe animation for this state. | `:host`
130
- * `closing` | Applied just before the overlay is detached from the DOM. You can apply a CSS @keyframe animation for this state. | `:host`
131
- *
132
- * The following custom CSS properties are available for styling:
133
- *
134
- * Custom CSS property | Description | Default value
135
- * ---|---|---
136
- * `--vaadin-overlay-viewport-bottom` | Bottom offset of the visible viewport area | `0` or detected offset
137
- *
138
- * See [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.
139
- *
140
- * @fires {CustomEvent} opened-changed - Fired when the `opened` property changes.
141
- * @fires {CustomEvent} vaadin-overlay-open - Fired after the overlay is opened.
142
- * @fires {CustomEvent} vaadin-overlay-close - Fired before the overlay will be closed. If canceled the closing of the overlay is canceled as well.
143
- * @fires {CustomEvent} vaadin-overlay-closing - Fired when the overlay will be closed.
144
- * @fires {CustomEvent} vaadin-overlay-outside-click - Fired before the overlay will be closed on outside click. If canceled the closing of the overlay is canceled as well.
145
- * @fires {CustomEvent} vaadin-overlay-escape-press - Fired before the overlay will be closed on ESC button press. If canceled the closing of the overlay is canceled as well.
14
+ * @deprecated Import `Overlay` from `@vaadin/overlay` instead.
146
15
  */
147
- declare class OverlayElement extends ThemableMixin(DirMixin(ControllerMixin(HTMLElement))) {
148
- /**
149
- * When true, the overlay is visible and attached to body.
150
- */
151
- opened: boolean | null | undefined;
152
-
153
- /**
154
- * Owner element passed with renderer function
155
- */
156
- owner: HTMLElement | null;
157
-
158
- /**
159
- * Custom function for rendering the content of the overlay.
160
- * Receives three arguments:
161
- *
162
- * - `root` The root container DOM element. Append your content to it.
163
- * - `owner` The host element of the renderer function.
164
- * - `model` The object with the properties related with rendering.
165
- */
166
- renderer: OverlayRenderer | null | undefined;
167
-
168
- /**
169
- * The template of the overlay content.
170
- */
171
- template: HTMLTemplateElement | null | undefined;
172
-
173
- /**
174
- * References the content container after the template is stamped.
175
- */
176
- content: HTMLElement | undefined;
177
-
178
- /**
179
- * When true the overlay has backdrop on top of content when opened.
180
- */
181
- withBackdrop: boolean;
182
-
183
- /**
184
- * Object with properties that is passed to `renderer` function
185
- */
186
- model: object | null | undefined;
187
-
188
- /**
189
- * When true the overlay won't disable the main content, showing
190
- * it doesn’t change the functionality of the user interface.
191
- */
192
- modeless: boolean;
193
-
194
- /**
195
- * When set to true, the overlay is hidden. This also closes the overlay
196
- * immediately in case there is a closing animation in progress.
197
- */
198
- hidden: boolean;
199
-
200
- /**
201
- * When true move focus to the first focusable element in the overlay,
202
- * or to the overlay if there are no focusable elements.
203
- */
204
- focusTrap: boolean;
205
-
206
- /**
207
- * Set to true to enable restoring of focus when overlay is closed.
208
- */
209
- restoreFocusOnClose: boolean;
210
-
211
- /**
212
- * Set to specify the element which should be focused on overlay close,
213
- * if `restoreFocusOnClose` is set to true.
214
- */
215
- restoreFocusNode?: HTMLElement;
216
-
217
- close(sourceEvent?: Event | null): void;
218
-
219
- /**
220
- * Requests an update for the content of the overlay.
221
- * While performing the update, it invokes the renderer passed in the `renderer` property.
222
- *
223
- * It is not guaranteed that the update happens immediately (synchronously) after it is requested.
224
- */
225
- requestContentUpdate(): void;
226
-
227
- /**
228
- * Brings the overlay as visually the frontmost one
229
- */
230
- bringToFront(): void;
231
-
232
- addEventListener<K extends keyof OverlayEventMap>(
233
- type: K,
234
- listener: (this: OverlayElement, ev: OverlayEventMap[K]) => void,
235
- options?: AddEventListenerOptions | boolean,
236
- ): void;
237
-
238
- removeEventListener<K extends keyof OverlayEventMap>(
239
- type: K,
240
- listener: (this: OverlayElement, ev: OverlayEventMap[K]) => void,
241
- options?: EventListenerOptions | boolean,
242
- ): void;
243
- }
244
-
245
- declare global {
246
- interface HTMLElementTagNameMap {
247
- 'vaadin-overlay': OverlayElement;
248
- }
249
- }
16
+ export const OverlayElement: typeof Overlay;
250
17
 
251
- export { OverlayElement };
18
+ export * from '@vaadin/overlay/src/vaadin-overlay.js';