@vaadin/popover 24.5.0-alpha8 → 24.5.0-alpha9
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/README.md +1 -1
- package/package.json +10 -10
- package/src/vaadin-popover.d.ts +27 -0
- package/src/vaadin-popover.js +117 -7
- package/theme/lumo/vaadin-popover-styles.js +8 -0
- package/theme/material/vaadin-popover-styles.js +8 -0
- package/web-types.json +30 -8
- package/web-types.lit.json +12 -5
package/README.md
CHANGED
|
@@ -43,7 +43,7 @@ import '@vaadin/popover/src/vaadin-popover.js';
|
|
|
43
43
|
|
|
44
44
|
## Contributing
|
|
45
45
|
|
|
46
|
-
Read the [contributing guide](https://vaadin.com/docs/latest/contributing
|
|
46
|
+
Read the [contributing guide](https://vaadin.com/docs/latest/contributing) to learn about our development process, how to propose bugfixes and improvements, and how to test your changes to Vaadin components.
|
|
47
47
|
|
|
48
48
|
## License
|
|
49
49
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/popover",
|
|
3
|
-
"version": "24.5.0-
|
|
3
|
+
"version": "24.5.0-alpha9",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -37,17 +37,17 @@
|
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
40
|
-
"@vaadin/a11y-base": "24.5.0-
|
|
41
|
-
"@vaadin/component-base": "24.5.0-
|
|
42
|
-
"@vaadin/lit-renderer": "24.5.0-
|
|
43
|
-
"@vaadin/overlay": "24.5.0-
|
|
44
|
-
"@vaadin/vaadin-lumo-styles": "24.5.0-
|
|
45
|
-
"@vaadin/vaadin-material-styles": "24.5.0-
|
|
46
|
-
"@vaadin/vaadin-themable-mixin": "24.5.0-
|
|
40
|
+
"@vaadin/a11y-base": "24.5.0-alpha9",
|
|
41
|
+
"@vaadin/component-base": "24.5.0-alpha9",
|
|
42
|
+
"@vaadin/lit-renderer": "24.5.0-alpha9",
|
|
43
|
+
"@vaadin/overlay": "24.5.0-alpha9",
|
|
44
|
+
"@vaadin/vaadin-lumo-styles": "24.5.0-alpha9",
|
|
45
|
+
"@vaadin/vaadin-material-styles": "24.5.0-alpha9",
|
|
46
|
+
"@vaadin/vaadin-themable-mixin": "24.5.0-alpha9",
|
|
47
47
|
"lit": "^3.0.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@vaadin/chai-plugins": "24.5.0-
|
|
50
|
+
"@vaadin/chai-plugins": "24.5.0-alpha9",
|
|
51
51
|
"@vaadin/testing-helpers": "^1.0.0",
|
|
52
52
|
"sinon": "^18.0.0"
|
|
53
53
|
},
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"web-types.json",
|
|
56
56
|
"web-types.lit.json"
|
|
57
57
|
],
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "804744762f3bec0a2247c4bbcbbb204dbcd78bc0"
|
|
59
59
|
}
|
package/src/vaadin-popover.d.ts
CHANGED
|
@@ -77,6 +77,24 @@ export type PopoverEventMap = HTMLElementEventMap & PopoverCustomEventMap;
|
|
|
77
77
|
declare class Popover extends PopoverPositionMixin(
|
|
78
78
|
PopoverTargetMixin(OverlayClassMixin(ThemePropertyMixin(ElementMixin(HTMLElement)))),
|
|
79
79
|
) {
|
|
80
|
+
/**
|
|
81
|
+
* Sets the default focus delay to be used by all popover instances,
|
|
82
|
+
* except for those that have focus delay configured using property.
|
|
83
|
+
*/
|
|
84
|
+
static setDefaultFocusDelay(focusDelay: number): void;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Sets the default hide delay to be used by all popover instances,
|
|
88
|
+
* except for those that have hide delay configured using property.
|
|
89
|
+
*/
|
|
90
|
+
static setDefaultHideDelay(hideDelay: number): void;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Sets the default hover delay to be used by all popover instances,
|
|
94
|
+
* except for those that have hover delay configured using property.
|
|
95
|
+
*/
|
|
96
|
+
static setDefaultHoverDelay(delay: number): void;
|
|
97
|
+
|
|
80
98
|
/**
|
|
81
99
|
* String used to label the overlay to screen reader users.
|
|
82
100
|
*
|
|
@@ -114,6 +132,9 @@ declare class Popover extends PopoverPositionMixin(
|
|
|
114
132
|
/**
|
|
115
133
|
* The delay in milliseconds before the popover is opened
|
|
116
134
|
* on focus when the corresponding trigger is used.
|
|
135
|
+
*
|
|
136
|
+
* When not specified, the global default (500ms) is used.
|
|
137
|
+
*
|
|
117
138
|
* @attr {number} focus-delay
|
|
118
139
|
*/
|
|
119
140
|
focusDelay: number;
|
|
@@ -122,6 +143,9 @@ declare class Popover extends PopoverPositionMixin(
|
|
|
122
143
|
* The delay in milliseconds before the popover is closed
|
|
123
144
|
* on losing hover, when the corresponding trigger is used.
|
|
124
145
|
* On blur, the popover is closed immediately.
|
|
146
|
+
*
|
|
147
|
+
* When not specified, the global default (500ms) is used.
|
|
148
|
+
*
|
|
125
149
|
* @attr {number} hide-delay
|
|
126
150
|
*/
|
|
127
151
|
hideDelay: number;
|
|
@@ -129,6 +153,9 @@ declare class Popover extends PopoverPositionMixin(
|
|
|
129
153
|
/**
|
|
130
154
|
* The delay in milliseconds before the popover is opened
|
|
131
155
|
* on hover when the corresponding trigger is used.
|
|
156
|
+
*
|
|
157
|
+
* When not specified, the global default (500ms) is used.
|
|
158
|
+
*
|
|
132
159
|
* @attr {number} hover-delay
|
|
133
160
|
*/
|
|
134
161
|
hoverDelay: number;
|
package/src/vaadin-popover.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import './vaadin-popover-overlay.js';
|
|
7
|
-
import { html, LitElement } from 'lit';
|
|
7
|
+
import { css, html, LitElement } from 'lit';
|
|
8
8
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
9
9
|
import {
|
|
10
10
|
getDeepActiveElement,
|
|
@@ -22,6 +22,12 @@ import { ThemePropertyMixin } from '@vaadin/vaadin-themable-mixin/vaadin-theme-p
|
|
|
22
22
|
import { PopoverPositionMixin } from './vaadin-popover-position-mixin.js';
|
|
23
23
|
import { PopoverTargetMixin } from './vaadin-popover-target-mixin.js';
|
|
24
24
|
|
|
25
|
+
const DEFAULT_DELAY = 500;
|
|
26
|
+
|
|
27
|
+
let defaultFocusDelay = DEFAULT_DELAY;
|
|
28
|
+
let defaultHoverDelay = DEFAULT_DELAY;
|
|
29
|
+
let defaultHideDelay = DEFAULT_DELAY;
|
|
30
|
+
|
|
25
31
|
/**
|
|
26
32
|
* Controller for handling popover opened state.
|
|
27
33
|
*/
|
|
@@ -40,17 +46,20 @@ class PopoverOpenedStateController {
|
|
|
40
46
|
|
|
41
47
|
/** @private */
|
|
42
48
|
get __focusDelay() {
|
|
43
|
-
|
|
49
|
+
const popover = this.host;
|
|
50
|
+
return popover.focusDelay != null && popover.focusDelay > 0 ? popover.focusDelay : defaultFocusDelay;
|
|
44
51
|
}
|
|
45
52
|
|
|
46
53
|
/** @private */
|
|
47
54
|
get __hoverDelay() {
|
|
48
|
-
|
|
55
|
+
const popover = this.host;
|
|
56
|
+
return popover.hoverDelay != null && popover.hoverDelay > 0 ? popover.hoverDelay : defaultHoverDelay;
|
|
49
57
|
}
|
|
50
58
|
|
|
51
59
|
/** @private */
|
|
52
60
|
get __hideDelay() {
|
|
53
|
-
|
|
61
|
+
const popover = this.host;
|
|
62
|
+
return popover.hideDelay != null && popover.hideDelay > 0 ? popover.hideDelay : defaultHideDelay;
|
|
54
63
|
}
|
|
55
64
|
|
|
56
65
|
/**
|
|
@@ -178,7 +187,7 @@ class PopoverOpenedStateController {
|
|
|
178
187
|
* @customElement
|
|
179
188
|
* @extends HTMLElement
|
|
180
189
|
* @mixes ElementMixin
|
|
181
|
-
* @mixes
|
|
190
|
+
* @mixes OverlayClassMixin
|
|
182
191
|
* @mixes PopoverPositionMixin
|
|
183
192
|
* @mixes PopoverTargetMixin
|
|
184
193
|
* @mixes ThemePropertyMixin
|
|
@@ -190,6 +199,14 @@ class Popover extends PopoverPositionMixin(
|
|
|
190
199
|
return 'vaadin-popover';
|
|
191
200
|
}
|
|
192
201
|
|
|
202
|
+
static get styles() {
|
|
203
|
+
return css`
|
|
204
|
+
:host {
|
|
205
|
+
display: none !important;
|
|
206
|
+
}
|
|
207
|
+
`;
|
|
208
|
+
}
|
|
209
|
+
|
|
193
210
|
static get properties() {
|
|
194
211
|
return {
|
|
195
212
|
/**
|
|
@@ -239,6 +256,9 @@ class Popover extends PopoverPositionMixin(
|
|
|
239
256
|
/**
|
|
240
257
|
* The delay in milliseconds before the popover is opened
|
|
241
258
|
* on focus when the corresponding trigger is used.
|
|
259
|
+
*
|
|
260
|
+
* When not specified, the global default (500ms) is used.
|
|
261
|
+
*
|
|
242
262
|
* @attr {number} focus-delay
|
|
243
263
|
*/
|
|
244
264
|
focusDelay: {
|
|
@@ -249,6 +269,9 @@ class Popover extends PopoverPositionMixin(
|
|
|
249
269
|
* The delay in milliseconds before the popover is closed
|
|
250
270
|
* on losing hover, when the corresponding trigger is used.
|
|
251
271
|
* On blur, the popover is closed immediately.
|
|
272
|
+
*
|
|
273
|
+
* When not specified, the global default (500ms) is used.
|
|
274
|
+
*
|
|
252
275
|
* @attr {number} hide-delay
|
|
253
276
|
*/
|
|
254
277
|
hideDelay: {
|
|
@@ -258,6 +281,9 @@ class Popover extends PopoverPositionMixin(
|
|
|
258
281
|
/**
|
|
259
282
|
* The delay in milliseconds before the popover is opened
|
|
260
283
|
* on hover when the corresponding trigger is used.
|
|
284
|
+
*
|
|
285
|
+
* When not specified, the global default (500ms) is used.
|
|
286
|
+
*
|
|
261
287
|
* @attr {number} hover-delay
|
|
262
288
|
*/
|
|
263
289
|
hoverDelay: {
|
|
@@ -385,6 +411,36 @@ class Popover extends PopoverPositionMixin(
|
|
|
385
411
|
];
|
|
386
412
|
}
|
|
387
413
|
|
|
414
|
+
/**
|
|
415
|
+
* Sets the default focus delay to be used by all popover instances,
|
|
416
|
+
* except for those that have focus delay configured using property.
|
|
417
|
+
*
|
|
418
|
+
* @param {number} delay
|
|
419
|
+
*/
|
|
420
|
+
static setDefaultFocusDelay(focusDelay) {
|
|
421
|
+
defaultFocusDelay = focusDelay != null && focusDelay >= 0 ? focusDelay : DEFAULT_DELAY;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* Sets the default hide delay to be used by all popover instances,
|
|
426
|
+
* except for those that have hide delay configured using property.
|
|
427
|
+
*
|
|
428
|
+
* @param {number} hideDelay
|
|
429
|
+
*/
|
|
430
|
+
static setDefaultHideDelay(hideDelay) {
|
|
431
|
+
defaultHideDelay = hideDelay != null && hideDelay >= 0 ? hideDelay : DEFAULT_DELAY;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* Sets the default hover delay to be used by all popover instances,
|
|
436
|
+
* except for those that have hover delay configured using property.
|
|
437
|
+
*
|
|
438
|
+
* @param {number} delay
|
|
439
|
+
*/
|
|
440
|
+
static setDefaultHoverDelay(hoverDelay) {
|
|
441
|
+
defaultHoverDelay = hoverDelay != null && hoverDelay >= 0 ? hoverDelay : DEFAULT_DELAY;
|
|
442
|
+
}
|
|
443
|
+
|
|
388
444
|
constructor() {
|
|
389
445
|
super();
|
|
390
446
|
|
|
@@ -424,6 +480,7 @@ class Popover extends PopoverPositionMixin(
|
|
|
424
480
|
?no-vertical-overlap="${this.__computeNoVerticalOverlap(effectivePosition)}"
|
|
425
481
|
.horizontalAlign="${this.__computeHorizontalAlign(effectivePosition)}"
|
|
426
482
|
.verticalAlign="${this.__computeVerticalAlign(effectivePosition)}"
|
|
483
|
+
@mousedown="${this.__onOverlayMouseDown}"
|
|
427
484
|
@mouseenter="${this.__onOverlayMouseEnter}"
|
|
428
485
|
@mouseleave="${this.__onOverlayMouseLeave}"
|
|
429
486
|
@focusin="${this.__onOverlayFocusIn}"
|
|
@@ -639,6 +696,12 @@ class Popover extends PopoverPositionMixin(
|
|
|
639
696
|
__onGlobalShiftTab(event) {
|
|
640
697
|
const overlayPart = this._overlayElement.$.overlay;
|
|
641
698
|
|
|
699
|
+
// Prevent restoring focus after target blur on Shift + Tab
|
|
700
|
+
if (this.target && isElementFocused(this.target) && this.__shouldRestoreFocus) {
|
|
701
|
+
this.__shouldRestoreFocus = false;
|
|
702
|
+
return;
|
|
703
|
+
}
|
|
704
|
+
|
|
642
705
|
// Move focus back to the target on overlay content Shift + Tab
|
|
643
706
|
if (this.target && isElementFocused(overlayPart)) {
|
|
644
707
|
event.preventDefault();
|
|
@@ -692,7 +755,14 @@ class Popover extends PopoverPositionMixin(
|
|
|
692
755
|
|
|
693
756
|
/** @private */
|
|
694
757
|
__onTargetFocusOut(event) {
|
|
695
|
-
if
|
|
758
|
+
// Do not close the popover on overlay focusout if it's not the last one.
|
|
759
|
+
// This covers the case when focus moves to the nested popover opened
|
|
760
|
+
// without focusing parent popover overlay (e.g. using hover trigger).
|
|
761
|
+
if (!isLastOverlay(this._overlayElement)) {
|
|
762
|
+
return;
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
if ((this.__hasTrigger('focus') && this.__mouseDownInside) || this._overlayElement.contains(event.relatedTarget)) {
|
|
696
766
|
return;
|
|
697
767
|
}
|
|
698
768
|
|
|
@@ -714,6 +784,12 @@ class Popover extends PopoverPositionMixin(
|
|
|
714
784
|
|
|
715
785
|
/** @private */
|
|
716
786
|
__onTargetMouseLeave(event) {
|
|
787
|
+
// Do not close the popover on target focusout if the overlay is not the last one.
|
|
788
|
+
// This happens e.g. when opening the nested popover that uses non-modal overlay.
|
|
789
|
+
if (!isLastOverlay(this._overlayElement)) {
|
|
790
|
+
return;
|
|
791
|
+
}
|
|
792
|
+
|
|
717
793
|
if (this._overlayElement.contains(event.relatedTarget)) {
|
|
718
794
|
return;
|
|
719
795
|
}
|
|
@@ -734,13 +810,40 @@ class Popover extends PopoverPositionMixin(
|
|
|
734
810
|
|
|
735
811
|
/** @private */
|
|
736
812
|
__onOverlayFocusOut(event) {
|
|
737
|
-
if
|
|
813
|
+
// Do not close the popover on overlay focusout if it's not the last one.
|
|
814
|
+
// This covers the following cases of nested overlay based components:
|
|
815
|
+
// 1. Moving focus to the nested overlay (e.g. vaadin-select, vaadin-menu-bar)
|
|
816
|
+
// 2. Closing not focused nested overlay on outside (e.g. vaadin-combo-box)
|
|
817
|
+
if (!isLastOverlay(this._overlayElement)) {
|
|
818
|
+
return;
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
if (
|
|
822
|
+
(this.__hasTrigger('focus') && this.__mouseDownInside) ||
|
|
823
|
+
event.relatedTarget === this.target ||
|
|
824
|
+
this._overlayElement.contains(event.relatedTarget)
|
|
825
|
+
) {
|
|
738
826
|
return;
|
|
739
827
|
}
|
|
740
828
|
|
|
741
829
|
this.__handleFocusout();
|
|
742
830
|
}
|
|
743
831
|
|
|
832
|
+
/** @private */
|
|
833
|
+
__onOverlayMouseDown() {
|
|
834
|
+
if (this.__hasTrigger('focus')) {
|
|
835
|
+
this.__mouseDownInside = true;
|
|
836
|
+
|
|
837
|
+
document.addEventListener(
|
|
838
|
+
'mouseup',
|
|
839
|
+
() => {
|
|
840
|
+
this.__mouseDownInside = false;
|
|
841
|
+
},
|
|
842
|
+
{ once: true },
|
|
843
|
+
);
|
|
844
|
+
}
|
|
845
|
+
}
|
|
846
|
+
|
|
744
847
|
/** @private */
|
|
745
848
|
__onOverlayMouseEnter() {
|
|
746
849
|
this.__hoverInside = true;
|
|
@@ -753,6 +856,13 @@ class Popover extends PopoverPositionMixin(
|
|
|
753
856
|
|
|
754
857
|
/** @private */
|
|
755
858
|
__onOverlayMouseLeave(event) {
|
|
859
|
+
// Do not close the popover on overlay focusout if it's not the last one.
|
|
860
|
+
// This happens when opening the nested component that uses "modal" overlay
|
|
861
|
+
// setting `pointer-events: none` on the body (combo-box, date-picker etc).
|
|
862
|
+
if (!isLastOverlay(this._overlayElement)) {
|
|
863
|
+
return;
|
|
864
|
+
}
|
|
865
|
+
|
|
756
866
|
if (event.relatedTarget === this.target) {
|
|
757
867
|
return;
|
|
758
868
|
}
|
|
@@ -15,10 +15,18 @@ const popoverOverlay = css`
|
|
|
15
15
|
--_vaadin-popover-default-offset: var(--lumo-space-xs);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
[part='overlay'] {
|
|
19
|
+
outline: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
18
22
|
[part='content'] {
|
|
19
23
|
padding: var(--lumo-space-xs) var(--lumo-space-s);
|
|
20
24
|
}
|
|
21
25
|
|
|
26
|
+
:host([theme~='no-padding']) [part='content'] {
|
|
27
|
+
padding: 0;
|
|
28
|
+
}
|
|
29
|
+
|
|
22
30
|
:host([theme~='arrow']) {
|
|
23
31
|
--_vaadin-popover-default-offset: calc(var(--lumo-space-s) + var(--vaadin-popover-arrow-size) / 2);
|
|
24
32
|
}
|
|
@@ -12,10 +12,18 @@ const popoverOverlay = css`
|
|
|
12
12
|
--_vaadin-popover-default-offset: 0.25rem;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
[part='overlay'] {
|
|
16
|
+
outline: none;
|
|
17
|
+
}
|
|
18
|
+
|
|
15
19
|
[part='content'] {
|
|
16
20
|
padding: 0.25rem 0.5rem;
|
|
17
21
|
}
|
|
18
22
|
|
|
23
|
+
:host([theme~='no-padding']) [part='content'] {
|
|
24
|
+
padding: 0;
|
|
25
|
+
}
|
|
26
|
+
|
|
19
27
|
:host([theme~='arrow']) {
|
|
20
28
|
--_vaadin-popover-default-offset: calc(0.25rem + var(--vaadin-popover-arrow-size) / 1.25);
|
|
21
29
|
}
|
package/web-types.json
CHANGED
|
@@ -1,15 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/popover",
|
|
4
|
-
"version": "24.5.0-
|
|
4
|
+
"version": "24.5.0-alpha9",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
8
8
|
"elements": [
|
|
9
9
|
{
|
|
10
10
|
"name": "vaadin-popover",
|
|
11
|
-
"description": "`<vaadin-popover>` is a Web Component for creating overlays\nthat are positioned next to specified DOM element (target).\n\nUnlike `<vaadin-tooltip>`, the popover supports rich content\nthat can be provided by using `renderer` function.\n\n### Styling\n\n`<vaadin-popover>` uses `<vaadin-popover-overlay>` internal\nthemable component as the actual visible overlay.\n\nSee [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.5.0-
|
|
11
|
+
"description": "`<vaadin-popover>` is a Web Component for creating overlays\nthat are positioned next to specified DOM element (target).\n\nUnlike `<vaadin-tooltip>`, the popover supports rich content\nthat can be provided by using `renderer` function.\n\n### Styling\n\n`<vaadin-popover>` uses `<vaadin-popover-overlay>` internal\nthemable component as the actual visible overlay.\n\nSee [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.5.0-alpha9/#/elements/vaadin-overlay) documentation\nfor `<vaadin-popover-overlay>` parts.\n\nIn addition to `<vaadin-overlay>` parts, the following parts are available for styling:\n\nPart name | Description\n-----------------|-------------------------------------------\n`arrow` | Optional arrow pointing to the target when using `theme=\"arrow\"`\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n-----------------|----------------------------------------\n`position` | Reflects the `position` property value.\n\nNote: the `theme` attribute value set on `<vaadin-popover>` is\npropagated to the internal `<vaadin-popover-overlay>` component.\n\n### Custom CSS Properties\n\nThe following custom CSS properties are available on the `<vaadin-popover>` element:\n\nCustom CSS property | Description\n---------------------------------|-------------\n`--vaadin-popover-offset-top` | Used as an offset when the popover is aligned vertically below the target\n`--vaadin-popover-offset-bottom` | Used as an offset when the popover is aligned vertically above the target\n`--vaadin-popover-offset-start` | Used as an offset when the popover is aligned horizontally after the target\n`--vaadin-popover-offset-end` | Used as an offset when the popover is aligned horizontally before the target\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
12
12
|
"attributes": [
|
|
13
|
+
{
|
|
14
|
+
"name": "overlay-class",
|
|
15
|
+
"description": "A space-delimited list of CSS class names to set on the overlay element.\nThis property does not affect other CSS class names set manually via JS.\n\nNote, if the CSS class name was set with this property, clearing it will\nremove it from the overlay, even if the same class name was also added\nmanually, e.g. by using `classList.add()` in the `renderer` function.",
|
|
16
|
+
"value": {
|
|
17
|
+
"type": [
|
|
18
|
+
"string",
|
|
19
|
+
"null",
|
|
20
|
+
"undefined"
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
},
|
|
13
24
|
{
|
|
14
25
|
"name": "position",
|
|
15
26
|
"description": "Position of the overlay with respect to the target.\nSupported values: `top-start`, `top`, `top-end`,\n`bottom-start`, `bottom`, `bottom-end`, `start-top`,\n`start`, `start-bottom`, `end-top`, `end`, `end-bottom`.",
|
|
@@ -89,7 +100,7 @@
|
|
|
89
100
|
},
|
|
90
101
|
{
|
|
91
102
|
"name": "focus-delay",
|
|
92
|
-
"description": "The delay in milliseconds before the popover is opened\non focus when the corresponding trigger is used.",
|
|
103
|
+
"description": "The delay in milliseconds before the popover is opened\non focus when the corresponding trigger is used.\n\nWhen not specified, the global default (500ms) is used.",
|
|
93
104
|
"value": {
|
|
94
105
|
"type": [
|
|
95
106
|
"number",
|
|
@@ -100,7 +111,7 @@
|
|
|
100
111
|
},
|
|
101
112
|
{
|
|
102
113
|
"name": "hide-delay",
|
|
103
|
-
"description": "The delay in milliseconds before the popover is closed\non losing hover, when the corresponding trigger is used.\nOn blur, the popover is closed immediately.",
|
|
114
|
+
"description": "The delay in milliseconds before the popover is closed\non losing hover, when the corresponding trigger is used.\nOn blur, the popover is closed immediately.\n\nWhen not specified, the global default (500ms) is used.",
|
|
104
115
|
"value": {
|
|
105
116
|
"type": [
|
|
106
117
|
"number",
|
|
@@ -111,7 +122,7 @@
|
|
|
111
122
|
},
|
|
112
123
|
{
|
|
113
124
|
"name": "hover-delay",
|
|
114
|
-
"description": "The delay in milliseconds before the popover is opened\non hover when the corresponding trigger is used.",
|
|
125
|
+
"description": "The delay in milliseconds before the popover is opened\non hover when the corresponding trigger is used.\n\nWhen not specified, the global default (500ms) is used.",
|
|
115
126
|
"value": {
|
|
116
127
|
"type": [
|
|
117
128
|
"number",
|
|
@@ -200,6 +211,17 @@
|
|
|
200
211
|
],
|
|
201
212
|
"js": {
|
|
202
213
|
"properties": [
|
|
214
|
+
{
|
|
215
|
+
"name": "overlayClass",
|
|
216
|
+
"description": "A space-delimited list of CSS class names to set on the overlay element.\nThis property does not affect other CSS class names set manually via JS.\n\nNote, if the CSS class name was set with this property, clearing it will\nremove it from the overlay, even if the same class name was also added\nmanually, e.g. by using `classList.add()` in the `renderer` function.",
|
|
217
|
+
"value": {
|
|
218
|
+
"type": [
|
|
219
|
+
"string",
|
|
220
|
+
"null",
|
|
221
|
+
"undefined"
|
|
222
|
+
]
|
|
223
|
+
}
|
|
224
|
+
},
|
|
203
225
|
{
|
|
204
226
|
"name": "position",
|
|
205
227
|
"description": "Position of the overlay with respect to the target.\nSupported values: `top-start`, `top`, `top-end`,\n`bottom-start`, `bottom`, `bottom-end`, `start-top`,\n`start`, `start-bottom`, `end-top`, `end`, `end-bottom`.",
|
|
@@ -290,7 +312,7 @@
|
|
|
290
312
|
},
|
|
291
313
|
{
|
|
292
314
|
"name": "focusDelay",
|
|
293
|
-
"description": "The delay in milliseconds before the popover is opened\non focus when the corresponding trigger is used.",
|
|
315
|
+
"description": "The delay in milliseconds before the popover is opened\non focus when the corresponding trigger is used.\n\nWhen not specified, the global default (500ms) is used.",
|
|
294
316
|
"value": {
|
|
295
317
|
"type": [
|
|
296
318
|
"number",
|
|
@@ -301,7 +323,7 @@
|
|
|
301
323
|
},
|
|
302
324
|
{
|
|
303
325
|
"name": "hideDelay",
|
|
304
|
-
"description": "The delay in milliseconds before the popover is closed\non losing hover, when the corresponding trigger is used.\nOn blur, the popover is closed immediately.",
|
|
326
|
+
"description": "The delay in milliseconds before the popover is closed\non losing hover, when the corresponding trigger is used.\nOn blur, the popover is closed immediately.\n\nWhen not specified, the global default (500ms) is used.",
|
|
305
327
|
"value": {
|
|
306
328
|
"type": [
|
|
307
329
|
"number",
|
|
@@ -312,7 +334,7 @@
|
|
|
312
334
|
},
|
|
313
335
|
{
|
|
314
336
|
"name": "hoverDelay",
|
|
315
|
-
"description": "The delay in milliseconds before the popover is opened\non hover when the corresponding trigger is used.",
|
|
337
|
+
"description": "The delay in milliseconds before the popover is opened\non hover when the corresponding trigger is used.\n\nWhen not specified, the global default (500ms) is used.",
|
|
316
338
|
"value": {
|
|
317
339
|
"type": [
|
|
318
340
|
"number",
|
package/web-types.lit.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/popover",
|
|
4
|
-
"version": "24.5.0-
|
|
4
|
+
"version": "24.5.0-alpha9",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"framework": "lit",
|
|
7
7
|
"framework-config": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"elements": [
|
|
17
17
|
{
|
|
18
18
|
"name": "vaadin-popover",
|
|
19
|
-
"description": "`<vaadin-popover>` is a Web Component for creating overlays\nthat are positioned next to specified DOM element (target).\n\nUnlike `<vaadin-tooltip>`, the popover supports rich content\nthat can be provided by using `renderer` function.\n\n### Styling\n\n`<vaadin-popover>` uses `<vaadin-popover-overlay>` internal\nthemable component as the actual visible overlay.\n\nSee [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.5.0-
|
|
19
|
+
"description": "`<vaadin-popover>` is a Web Component for creating overlays\nthat are positioned next to specified DOM element (target).\n\nUnlike `<vaadin-tooltip>`, the popover supports rich content\nthat can be provided by using `renderer` function.\n\n### Styling\n\n`<vaadin-popover>` uses `<vaadin-popover-overlay>` internal\nthemable component as the actual visible overlay.\n\nSee [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.5.0-alpha9/#/elements/vaadin-overlay) documentation\nfor `<vaadin-popover-overlay>` parts.\n\nIn addition to `<vaadin-overlay>` parts, the following parts are available for styling:\n\nPart name | Description\n-----------------|-------------------------------------------\n`arrow` | Optional arrow pointing to the target when using `theme=\"arrow\"`\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n-----------------|----------------------------------------\n`position` | Reflects the `position` property value.\n\nNote: the `theme` attribute value set on `<vaadin-popover>` is\npropagated to the internal `<vaadin-popover-overlay>` component.\n\n### Custom CSS Properties\n\nThe following custom CSS properties are available on the `<vaadin-popover>` element:\n\nCustom CSS property | Description\n---------------------------------|-------------\n`--vaadin-popover-offset-top` | Used as an offset when the popover is aligned vertically below the target\n`--vaadin-popover-offset-bottom` | Used as an offset when the popover is aligned vertically above the target\n`--vaadin-popover-offset-start` | Used as an offset when the popover is aligned horizontally after the target\n`--vaadin-popover-offset-end` | Used as an offset when the popover is aligned horizontally before the target\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
20
20
|
"extension": true,
|
|
21
21
|
"attributes": [
|
|
22
22
|
{
|
|
@@ -61,6 +61,13 @@
|
|
|
61
61
|
"kind": "expression"
|
|
62
62
|
}
|
|
63
63
|
},
|
|
64
|
+
{
|
|
65
|
+
"name": ".overlayClass",
|
|
66
|
+
"description": "A space-delimited list of CSS class names to set on the overlay element.\nThis property does not affect other CSS class names set manually via JS.\n\nNote, if the CSS class name was set with this property, clearing it will\nremove it from the overlay, even if the same class name was also added\nmanually, e.g. by using `classList.add()` in the `renderer` function.",
|
|
67
|
+
"value": {
|
|
68
|
+
"kind": "expression"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
64
71
|
{
|
|
65
72
|
"name": ".position",
|
|
66
73
|
"description": "Position of the overlay with respect to the target.\nSupported values: `top-start`, `top`, `top-end`,\n`bottom-start`, `bottom`, `bottom-end`, `start-top`,\n`start`, `start-bottom`, `end-top`, `end`, `end-bottom`.",
|
|
@@ -112,21 +119,21 @@
|
|
|
112
119
|
},
|
|
113
120
|
{
|
|
114
121
|
"name": ".focusDelay",
|
|
115
|
-
"description": "The delay in milliseconds before the popover is opened\non focus when the corresponding trigger is used.",
|
|
122
|
+
"description": "The delay in milliseconds before the popover is opened\non focus when the corresponding trigger is used.\n\nWhen not specified, the global default (500ms) is used.",
|
|
116
123
|
"value": {
|
|
117
124
|
"kind": "expression"
|
|
118
125
|
}
|
|
119
126
|
},
|
|
120
127
|
{
|
|
121
128
|
"name": ".hideDelay",
|
|
122
|
-
"description": "The delay in milliseconds before the popover is closed\non losing hover, when the corresponding trigger is used.\nOn blur, the popover is closed immediately.",
|
|
129
|
+
"description": "The delay in milliseconds before the popover is closed\non losing hover, when the corresponding trigger is used.\nOn blur, the popover is closed immediately.\n\nWhen not specified, the global default (500ms) is used.",
|
|
123
130
|
"value": {
|
|
124
131
|
"kind": "expression"
|
|
125
132
|
}
|
|
126
133
|
},
|
|
127
134
|
{
|
|
128
135
|
"name": ".hoverDelay",
|
|
129
|
-
"description": "The delay in milliseconds before the popover is opened\non hover when the corresponding trigger is used.",
|
|
136
|
+
"description": "The delay in milliseconds before the popover is opened\non hover when the corresponding trigger is used.\n\nWhen not specified, the global default (500ms) is used.",
|
|
130
137
|
"value": {
|
|
131
138
|
"kind": "expression"
|
|
132
139
|
}
|