@vaadin/popover 25.0.0-alpha10 → 25.0.0-alpha11
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 +10 -13
- package/src/lit/renderer-directives.d.ts +1 -1
- package/src/lit/renderer-directives.js +1 -1
- package/src/vaadin-popover-overlay.js +1 -1
- package/src/vaadin-popover.d.ts +3 -0
- package/src/vaadin-popover.js +3 -0
- package/vaadin-popover.js +1 -1
- package/web-types.json +1 -1
- package/web-types.lit.json +1 -1
- package/src/styles/vaadin-popover-overlay-core-styles.d.ts +0 -8
- package/src/styles/vaadin-popover-overlay-core-styles.js +0 -74
- package/theme/lumo/vaadin-popover-styles.d.ts +0 -4
- package/theme/lumo/vaadin-popover-styles.js +0 -107
- package/theme/lumo/vaadin-popover.d.ts +0 -2
- package/theme/lumo/vaadin-popover.js +0 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/popover",
|
|
3
|
-
"version": "25.0.0-
|
|
3
|
+
"version": "25.0.0-alpha11",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -23,9 +23,6 @@
|
|
|
23
23
|
"lit.d.ts",
|
|
24
24
|
"lit.js",
|
|
25
25
|
"src",
|
|
26
|
-
"!src/styles/*-base-styles.d.ts",
|
|
27
|
-
"!src/styles/*-base-styles.js",
|
|
28
|
-
"theme",
|
|
29
26
|
"vaadin-*.d.ts",
|
|
30
27
|
"vaadin-*.js",
|
|
31
28
|
"web-types.json",
|
|
@@ -39,23 +36,23 @@
|
|
|
39
36
|
],
|
|
40
37
|
"dependencies": {
|
|
41
38
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
42
|
-
"@vaadin/a11y-base": "25.0.0-
|
|
43
|
-
"@vaadin/component-base": "25.0.0-
|
|
44
|
-
"@vaadin/lit-renderer": "25.0.0-
|
|
45
|
-
"@vaadin/overlay": "25.0.0-
|
|
46
|
-
"@vaadin/vaadin-
|
|
47
|
-
"@vaadin/vaadin-themable-mixin": "25.0.0-alpha10",
|
|
39
|
+
"@vaadin/a11y-base": "25.0.0-alpha11",
|
|
40
|
+
"@vaadin/component-base": "25.0.0-alpha11",
|
|
41
|
+
"@vaadin/lit-renderer": "25.0.0-alpha11",
|
|
42
|
+
"@vaadin/overlay": "25.0.0-alpha11",
|
|
43
|
+
"@vaadin/vaadin-themable-mixin": "25.0.0-alpha11",
|
|
48
44
|
"lit": "^3.0.0"
|
|
49
45
|
},
|
|
50
46
|
"devDependencies": {
|
|
51
|
-
"@vaadin/chai-plugins": "25.0.0-
|
|
52
|
-
"@vaadin/test-runner-commands": "25.0.0-
|
|
47
|
+
"@vaadin/chai-plugins": "25.0.0-alpha11",
|
|
48
|
+
"@vaadin/test-runner-commands": "25.0.0-alpha11",
|
|
53
49
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
50
|
+
"@vaadin/vaadin-lumo-styles": "25.0.0-alpha11",
|
|
54
51
|
"sinon": "^18.0.0"
|
|
55
52
|
},
|
|
56
53
|
"web-types": [
|
|
57
54
|
"web-types.json",
|
|
58
55
|
"web-types.lit.json"
|
|
59
56
|
],
|
|
60
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "abfd315ba5a7484a613e0768635a4e8fe945a44b"
|
|
61
58
|
}
|
|
@@ -27,7 +27,7 @@ export class PopoverRendererDirective extends LitRendererDirective<Popover, Popo
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
|
-
* A Lit directive for populating the content of the `<vaadin-popover
|
|
30
|
+
* A Lit directive for populating the content of the `<vaadin-popover>` element.
|
|
31
31
|
*
|
|
32
32
|
* The directive accepts a renderer callback returning a Lit template and assigns it to the popover
|
|
33
33
|
* via the `renderer` property. The renderer is called once to populate the content when assigned
|
|
@@ -32,7 +32,7 @@ export class PopoverRendererDirective extends LitRendererDirective {
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
|
-
* A Lit directive for populating the content of the `<vaadin-popover
|
|
35
|
+
* A Lit directive for populating the content of the `<vaadin-popover>` element.
|
|
36
36
|
*
|
|
37
37
|
* The directive accepts a renderer callback returning a Lit template and assigns it to the popover
|
|
38
38
|
* via the `renderer` property. The renderer is called once to populate the content when assigned
|
|
@@ -10,7 +10,7 @@ import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
|
|
|
10
10
|
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
11
11
|
import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
|
|
12
12
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
13
|
-
import { popoverOverlayStyles } from './styles/vaadin-popover-overlay-
|
|
13
|
+
import { popoverOverlayStyles } from './styles/vaadin-popover-overlay-base-styles.js';
|
|
14
14
|
import { PopoverOverlayMixin } from './vaadin-popover-overlay-mixin.js';
|
|
15
15
|
|
|
16
16
|
/**
|
package/src/vaadin-popover.d.ts
CHANGED
|
@@ -93,6 +93,7 @@ declare class Popover extends PopoverPositionMixin(
|
|
|
93
93
|
* String used to label the popover to screen reader users.
|
|
94
94
|
*
|
|
95
95
|
* @attr {string} accessible-name
|
|
96
|
+
* @deprecated Use `aria-label` attribute on the popover instead
|
|
96
97
|
*/
|
|
97
98
|
accessibleName: string | null | undefined;
|
|
98
99
|
|
|
@@ -100,6 +101,7 @@ declare class Popover extends PopoverPositionMixin(
|
|
|
100
101
|
* Id of the element used as label of the popover to screen reader users.
|
|
101
102
|
*
|
|
102
103
|
* @attr {string} accessible-name-ref
|
|
104
|
+
* @deprecated Use `aria-labelledby` attribute on the popover instead
|
|
103
105
|
*/
|
|
104
106
|
accessibleNameRef: string | null | undefined;
|
|
105
107
|
|
|
@@ -161,6 +163,7 @@ declare class Popover extends PopoverPositionMixin(
|
|
|
161
163
|
* The `role` attribute value to be set on the overlay.
|
|
162
164
|
*
|
|
163
165
|
* @attr {string} overlay-role
|
|
166
|
+
* @deprecated Use standard `role` attribute on the popover instead
|
|
164
167
|
*/
|
|
165
168
|
overlayRole: string;
|
|
166
169
|
|
package/src/vaadin-popover.js
CHANGED
|
@@ -229,6 +229,7 @@ class Popover extends PopoverPositionMixin(
|
|
|
229
229
|
* String used to label the popover to screen reader users.
|
|
230
230
|
*
|
|
231
231
|
* @attr {string} accessible-name
|
|
232
|
+
* @deprecated Use `aria-label` attribute on the popover instead
|
|
232
233
|
*/
|
|
233
234
|
accessibleName: {
|
|
234
235
|
type: String,
|
|
@@ -238,6 +239,7 @@ class Popover extends PopoverPositionMixin(
|
|
|
238
239
|
* Id of the element used as label of the popover to screen reader users.
|
|
239
240
|
*
|
|
240
241
|
* @attr {string} accessible-name-ref
|
|
242
|
+
* @deprecated Use `aria-labelledby` attribute on the popover instead
|
|
241
243
|
*/
|
|
242
244
|
accessibleNameRef: {
|
|
243
245
|
type: String,
|
|
@@ -327,6 +329,7 @@ class Popover extends PopoverPositionMixin(
|
|
|
327
329
|
* The `role` attribute value to be set on the overlay.
|
|
328
330
|
*
|
|
329
331
|
* @attr {string} overlay-role
|
|
332
|
+
* @deprecated Use standard `role` attribute on the popover instead
|
|
330
333
|
*/
|
|
331
334
|
overlayRole: {
|
|
332
335
|
type: String,
|
package/vaadin-popover.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import './
|
|
1
|
+
import './src/vaadin-popover.js';
|
|
2
2
|
export * from './src/vaadin-popover.js';
|
package/web-types.json
CHANGED
package/web-types.lit.json
CHANGED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (c) 2024 - 2025 Vaadin Ltd.
|
|
4
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
-
*/
|
|
6
|
-
import { css } from 'lit';
|
|
7
|
-
import { overlayStyles } from '@vaadin/overlay/src/styles/vaadin-overlay-core-styles.js';
|
|
8
|
-
|
|
9
|
-
const popoverOverlay = css`
|
|
10
|
-
:host {
|
|
11
|
-
--_default-offset: 0;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
:host([modeless][with-backdrop]) [part='backdrop'] {
|
|
15
|
-
pointer-events: none;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
:host([position^='top'][top-aligned]) [part='overlay'],
|
|
19
|
-
:host([position^='bottom'][top-aligned]) [part='overlay'] {
|
|
20
|
-
margin-top: var(--vaadin-popover-offset-top, var(--_default-offset));
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
[part='overlay'] {
|
|
24
|
-
position: relative;
|
|
25
|
-
overflow: visible;
|
|
26
|
-
max-height: 100%;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
[part='content'] {
|
|
30
|
-
overflow: auto;
|
|
31
|
-
box-sizing: border-box;
|
|
32
|
-
max-height: 100%;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/* Increase the area of the popover so the pointer can go from the target directly to it. */
|
|
36
|
-
[part='overlay']::before {
|
|
37
|
-
position: absolute;
|
|
38
|
-
content: '';
|
|
39
|
-
inset-block: calc(var(--vaadin-popover-offset-top, var(--_default-offset)) * -1)
|
|
40
|
-
calc(var(--vaadin-popover-offset-bottom, var(--_default-offset)) * -1);
|
|
41
|
-
inset-inline: calc(var(--vaadin-popover-offset-start, var(--_default-offset)) * -1)
|
|
42
|
-
calc(var(--vaadin-popover-offset-end, var(--_default-offset)) * -1);
|
|
43
|
-
z-index: -1;
|
|
44
|
-
pointer-events: auto;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
:host([position^='top'][bottom-aligned]) [part='overlay'],
|
|
48
|
-
:host([position^='bottom'][bottom-aligned]) [part='overlay'] {
|
|
49
|
-
margin-bottom: var(--vaadin-popover-offset-bottom, var(--_default-offset));
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
:host([position^='start'][start-aligned]) [part='overlay'],
|
|
53
|
-
:host([position^='end'][start-aligned]) [part='overlay'] {
|
|
54
|
-
margin-inline-start: var(--vaadin-popover-offset-start, var(--_default-offset));
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
:host([position^='start'][end-aligned]) [part='overlay'],
|
|
58
|
-
:host([position^='end'][end-aligned]) [part='overlay'] {
|
|
59
|
-
margin-inline-end: var(--vaadin-popover-offset-end, var(--_default-offset));
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
[part='arrow'] {
|
|
63
|
-
display: none;
|
|
64
|
-
position: absolute;
|
|
65
|
-
height: 0;
|
|
66
|
-
width: 0;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
:host([theme~='arrow']) [part='arrow'] {
|
|
70
|
-
display: block;
|
|
71
|
-
}
|
|
72
|
-
`;
|
|
73
|
-
|
|
74
|
-
export const popoverOverlayStyles = [overlayStyles, popoverOverlay];
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import '@vaadin/vaadin-lumo-styles/color.js';
|
|
2
|
-
import '@vaadin/vaadin-lumo-styles/spacing.js';
|
|
3
|
-
import '@vaadin/vaadin-lumo-styles/style.js';
|
|
4
|
-
import '@vaadin/vaadin-lumo-styles/typography.js';
|
|
5
|
-
import { overlay } from '@vaadin/vaadin-lumo-styles/mixins/overlay.js';
|
|
6
|
-
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
7
|
-
|
|
8
|
-
const popoverOverlay = css`
|
|
9
|
-
:host {
|
|
10
|
-
--vaadin-popover-arrow-size: 0.5rem;
|
|
11
|
-
--_default-offset: var(--lumo-space-xs);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
[part='overlay'] {
|
|
15
|
-
outline: none;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
[part='content'] {
|
|
19
|
-
padding: var(--lumo-space-xs) var(--lumo-space-s);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
:host([theme~='no-padding']) [part='content'] {
|
|
23
|
-
padding: 0 !important;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
:host([theme~='arrow']) {
|
|
27
|
-
--_default-offset: calc(var(--lumo-space-s) + var(--vaadin-popover-arrow-size) / 2);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/* top / bottom position */
|
|
31
|
-
:host([theme~='arrow'][position^='top']) [part='arrow'],
|
|
32
|
-
:host([theme~='arrow'][position^='bottom']) [part='arrow'] {
|
|
33
|
-
border-left: var(--vaadin-popover-arrow-size) solid transparent;
|
|
34
|
-
border-right: var(--vaadin-popover-arrow-size) solid transparent;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
:host([theme~='arrow'][position^='bottom'][bottom-aligned]) [part='arrow'],
|
|
38
|
-
:host([theme~='arrow'][position^='top'][bottom-aligned]) [part='arrow'] {
|
|
39
|
-
bottom: calc(var(--vaadin-popover-arrow-size) * -1);
|
|
40
|
-
border-top: var(--vaadin-popover-arrow-size) solid var(--lumo-base-color);
|
|
41
|
-
filter: drop-shadow(0 2px 1px var(--lumo-shade-10pct));
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
:host([theme~='arrow'][position^='bottom'][top-aligned]) [part='arrow'],
|
|
45
|
-
:host([theme~='arrow'][position^='top'][top-aligned]) [part='arrow'] {
|
|
46
|
-
top: calc(var(--vaadin-popover-arrow-size) * -1);
|
|
47
|
-
border-bottom: var(--vaadin-popover-arrow-size) solid var(--lumo-base-color);
|
|
48
|
-
filter: drop-shadow(0 -2px 1px var(--lumo-shade-10pct));
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
:host([theme~='arrow'][position^='bottom'][start-aligned]) [part='arrow'],
|
|
52
|
-
:host([theme~='arrow'][position^='top'][start-aligned]) [part='arrow'] {
|
|
53
|
-
transform: translateX(-50%);
|
|
54
|
-
inset-inline-start: 1.5rem;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
:host([theme~='arrow'][position^='bottom'][end-aligned]) [part='arrow'],
|
|
58
|
-
:host([theme~='arrow'][position^='top'][end-aligned]) [part='arrow'] {
|
|
59
|
-
transform: translateX(50%);
|
|
60
|
-
inset-inline-end: 1.5rem;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
:host([theme~='arrow'][position^='bottom'][arrow-centered]) [part='arrow'],
|
|
64
|
-
:host([theme~='arrow'][position^='top'][arrow-centered]) [part='arrow'] {
|
|
65
|
-
transform: translateX(-50%);
|
|
66
|
-
inset-inline-start: 50%;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/* start / end position */
|
|
70
|
-
:host([theme~='arrow'][position^='start']) [part='arrow'],
|
|
71
|
-
:host([theme~='arrow'][position^='end']) [part='arrow'] {
|
|
72
|
-
border-top: var(--vaadin-popover-arrow-size) solid transparent;
|
|
73
|
-
border-bottom: var(--vaadin-popover-arrow-size) solid transparent;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
:host([theme~='arrow'][position^='start'][start-aligned]) [part='arrow'],
|
|
77
|
-
:host([theme~='arrow'][position^='end'][start-aligned]) [part='arrow'] {
|
|
78
|
-
inset-inline-start: calc(var(--vaadin-popover-arrow-size) * -1);
|
|
79
|
-
border-right: var(--vaadin-popover-arrow-size) solid var(--lumo-base-color);
|
|
80
|
-
filter: drop-shadow(-2px 0 1px var(--lumo-shade-10pct));
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
:host([theme~='arrow'][position^='start'][end-aligned]) [part='arrow'],
|
|
84
|
-
:host([theme~='arrow'][position^='end'][end-aligned]) [part='arrow'] {
|
|
85
|
-
inset-inline-end: calc(var(--vaadin-popover-arrow-size) * -1);
|
|
86
|
-
border-left: var(--vaadin-popover-arrow-size) solid var(--lumo-base-color);
|
|
87
|
-
filter: drop-shadow(2px 0 1px var(--lumo-shade-10pct));
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
:host([theme~='arrow'][position^='start'][top-aligned]) [part='arrow'],
|
|
91
|
-
:host([theme~='arrow'][position^='end'][top-aligned]) [part='arrow'] {
|
|
92
|
-
top: 0.5rem;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
:host([theme~='arrow'][position='start'][top-aligned]) [part='arrow'],
|
|
96
|
-
:host([theme~='arrow'][position='end'][top-aligned]) [part='arrow'] {
|
|
97
|
-
top: 50%;
|
|
98
|
-
transform: translateY(-50%);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
:host([theme~='arrow'][position^='start'][bottom-aligned]) [part='arrow'],
|
|
102
|
-
:host([theme~='arrow'][position^='end'][bottom-aligned]) [part='arrow'] {
|
|
103
|
-
bottom: 0.5rem;
|
|
104
|
-
}
|
|
105
|
-
`;
|
|
106
|
-
|
|
107
|
-
registerStyles('vaadin-popover-overlay', [overlay, popoverOverlay], { moduleId: 'lumo-popover-overlay' });
|