@vaadin/popover 24.8.0-alpha9 → 25.0.0-alpha1
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 +0 -23
- package/package.json +10 -11
- package/web-types.json +2 -2
- package/web-types.lit.json +2 -2
- package/theme/material/vaadin-popover-styles.d.ts +0 -1
- package/theme/material/vaadin-popover-styles.js +0 -108
- package/theme/material/vaadin-popover.d.ts +0 -2
- package/theme/material/vaadin-popover.js +0 -2
package/README.md
CHANGED
|
@@ -20,29 +20,6 @@ Once installed, import the component in your application:
|
|
|
20
20
|
import '@vaadin/popover';
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
## Themes
|
|
24
|
-
|
|
25
|
-
Vaadin components come with two built-in [themes](https://vaadin.com/docs/latest/styling), Lumo and Material.
|
|
26
|
-
The [main entrypoint](https://github.com/vaadin/web-components/blob/main/packages/popover/vaadin-popover.js) of the package uses Lumo theme.
|
|
27
|
-
|
|
28
|
-
To use the Material theme, import the component from the `theme/material` folder:
|
|
29
|
-
|
|
30
|
-
```js
|
|
31
|
-
import '@vaadin/popover/theme/material/vaadin-popover.js';
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
You can also import the Lumo version of the component explicitly:
|
|
35
|
-
|
|
36
|
-
```js
|
|
37
|
-
import '@vaadin/popover/theme/lumo/vaadin-popover.js';
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
Finally, you can import the un-themed component from the `src` folder to get a minimal starting point:
|
|
41
|
-
|
|
42
|
-
```js
|
|
43
|
-
import '@vaadin/popover/src/vaadin-popover.js';
|
|
44
|
-
```
|
|
45
|
-
|
|
46
23
|
## Contributing
|
|
47
24
|
|
|
48
25
|
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.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/popover",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "25.0.0-alpha1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -37,18 +37,17 @@
|
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
40
|
-
"@vaadin/a11y-base": "
|
|
41
|
-
"@vaadin/component-base": "
|
|
42
|
-
"@vaadin/lit-renderer": "
|
|
43
|
-
"@vaadin/overlay": "
|
|
44
|
-
"@vaadin/vaadin-lumo-styles": "
|
|
45
|
-
"@vaadin/vaadin-
|
|
46
|
-
"@vaadin/vaadin-themable-mixin": "24.8.0-alpha9",
|
|
40
|
+
"@vaadin/a11y-base": "25.0.0-alpha1",
|
|
41
|
+
"@vaadin/component-base": "25.0.0-alpha1",
|
|
42
|
+
"@vaadin/lit-renderer": "25.0.0-alpha1",
|
|
43
|
+
"@vaadin/overlay": "25.0.0-alpha1",
|
|
44
|
+
"@vaadin/vaadin-lumo-styles": "25.0.0-alpha1",
|
|
45
|
+
"@vaadin/vaadin-themable-mixin": "25.0.0-alpha1",
|
|
47
46
|
"lit": "^3.0.0"
|
|
48
47
|
},
|
|
49
48
|
"devDependencies": {
|
|
50
|
-
"@vaadin/chai-plugins": "
|
|
51
|
-
"@vaadin/test-runner-commands": "
|
|
49
|
+
"@vaadin/chai-plugins": "25.0.0-alpha1",
|
|
50
|
+
"@vaadin/test-runner-commands": "25.0.0-alpha1",
|
|
52
51
|
"@vaadin/testing-helpers": "^1.1.0",
|
|
53
52
|
"sinon": "^18.0.0"
|
|
54
53
|
},
|
|
@@ -56,5 +55,5 @@
|
|
|
56
55
|
"web-types.json",
|
|
57
56
|
"web-types.lit.json"
|
|
58
57
|
],
|
|
59
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "b8c22a4a0c64156210d0daac96b43ae4e5526d49"
|
|
60
59
|
}
|
package/web-types.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/popover",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "25.0.0-alpha1",
|
|
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/
|
|
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/25.0.0-alpha1/#/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
13
|
{
|
|
14
14
|
"name": "overlay-class",
|
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": "
|
|
4
|
+
"version": "25.0.0-alpha1",
|
|
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/
|
|
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/25.0.0-alpha1/#/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
|
{
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import '@vaadin/vaadin-material-styles/color.js';
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import '@vaadin/vaadin-material-styles/color.js';
|
|
2
|
-
import { overlay } from '@vaadin/vaadin-material-styles/mixins/overlay.js';
|
|
3
|
-
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
4
|
-
|
|
5
|
-
const popoverOverlay = css`
|
|
6
|
-
:host {
|
|
7
|
-
--vaadin-popover-offset-top: var(--_vaadin-popover-default-offset);
|
|
8
|
-
--vaadin-popover-offset-bottom: var(--_vaadin-popover-default-offset);
|
|
9
|
-
--vaadin-popover-offset-start: var(--_vaadin-popover-default-offset);
|
|
10
|
-
--vaadin-popover-offset-end: var(--_vaadin-popover-default-offset);
|
|
11
|
-
--vaadin-popover-arrow-size: 0.5rem;
|
|
12
|
-
--_vaadin-popover-default-offset: 0.25rem;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
[part='overlay'] {
|
|
16
|
-
outline: none;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
[part='content'] {
|
|
20
|
-
padding: 0.25rem 0.5rem;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
:host([theme~='no-padding']) [part='content'] {
|
|
24
|
-
padding: 0;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
:host([theme~='arrow']) {
|
|
28
|
-
--_vaadin-popover-default-offset: calc(0.25rem + var(--vaadin-popover-arrow-size) / 1.25);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/* top / bottom position */
|
|
32
|
-
:host([theme~='arrow'][position^='top']) [part='arrow'],
|
|
33
|
-
:host([theme~='arrow'][position^='bottom']) [part='arrow'] {
|
|
34
|
-
border-left: var(--vaadin-popover-arrow-size) solid transparent;
|
|
35
|
-
border-right: var(--vaadin-popover-arrow-size) solid transparent;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
:host([theme~='arrow'][position^='bottom'][bottom-aligned]) [part='arrow'],
|
|
39
|
-
:host([theme~='arrow'][position^='top'][bottom-aligned]) [part='arrow'] {
|
|
40
|
-
bottom: calc(var(--vaadin-popover-arrow-size) * -1);
|
|
41
|
-
border-top: var(--vaadin-popover-arrow-size) solid var(--material-background-color);
|
|
42
|
-
filter: drop-shadow(0 2px 1px rgba(0, 0, 0, 0.14));
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
:host([theme~='arrow'][position^='bottom'][top-aligned]) [part='arrow'],
|
|
46
|
-
:host([theme~='arrow'][position^='top'][top-aligned]) [part='arrow'] {
|
|
47
|
-
top: calc(var(--vaadin-popover-arrow-size) * -1);
|
|
48
|
-
border-bottom: var(--vaadin-popover-arrow-size) solid var(--material-background-color);
|
|
49
|
-
filter: drop-shadow(0 -2px 1px rgba(0, 0, 0, 0.14));
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
:host([theme~='arrow'][position^='bottom'][start-aligned]) [part='arrow'],
|
|
53
|
-
:host([theme~='arrow'][position^='top'][start-aligned]) [part='arrow'] {
|
|
54
|
-
transform: translateX(-50%);
|
|
55
|
-
inset-inline-start: 1.5rem;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
:host([theme~='arrow'][position^='bottom'][end-aligned]) [part='arrow'],
|
|
59
|
-
:host([theme~='arrow'][position^='top'][end-aligned]) [part='arrow'] {
|
|
60
|
-
transform: translateX(50%);
|
|
61
|
-
inset-inline-end: 1.5rem;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
:host([theme~='arrow'][position^='bottom'][arrow-centered]) [part='arrow'],
|
|
65
|
-
:host([theme~='arrow'][position^='top'][arrow-centered]) [part='arrow'] {
|
|
66
|
-
transform: translateX(-50%);
|
|
67
|
-
inset-inline-start: 50%;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/* start / end position */
|
|
71
|
-
:host([theme~='arrow'][position^='start']) [part='arrow'],
|
|
72
|
-
:host([theme~='arrow'][position^='end']) [part='arrow'] {
|
|
73
|
-
border-top: var(--vaadin-popover-arrow-size) solid transparent;
|
|
74
|
-
border-bottom: var(--vaadin-popover-arrow-size) solid transparent;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
:host([theme~='arrow'][position^='start'][start-aligned]) [part='arrow'],
|
|
78
|
-
:host([theme~='arrow'][position^='end'][start-aligned]) [part='arrow'] {
|
|
79
|
-
inset-inline-start: calc(var(--vaadin-popover-arrow-size) * -1);
|
|
80
|
-
border-right: var(--vaadin-popover-arrow-size) solid var(--material-background-color);
|
|
81
|
-
filter: drop-shadow(-2px 0 1px rgba(0, 0, 0, 0.14));
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
:host([theme~='arrow'][position^='start'][end-aligned]) [part='arrow'],
|
|
85
|
-
:host([theme~='arrow'][position^='end'][end-aligned]) [part='arrow'] {
|
|
86
|
-
inset-inline-end: calc(var(--vaadin-popover-arrow-size) * -1);
|
|
87
|
-
border-left: var(--vaadin-popover-arrow-size) solid var(--material-background-color);
|
|
88
|
-
filter: drop-shadow(2px 0 1px rgba(0, 0, 0, 0.14));
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
:host([theme~='arrow'][position^='start'][top-aligned]) [part='arrow'],
|
|
92
|
-
:host([theme~='arrow'][position^='end'][top-aligned]) [part='arrow'] {
|
|
93
|
-
top: 0.5rem;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
:host([theme~='arrow'][position='start'][top-aligned]) [part='arrow'],
|
|
97
|
-
:host([theme~='arrow'][position='end'][top-aligned]) [part='arrow'] {
|
|
98
|
-
top: 50%;
|
|
99
|
-
transform: translateY(-50%);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
:host([theme~='arrow'][position^='start'][bottom-aligned]) [part='arrow'],
|
|
103
|
-
:host([theme~='arrow'][position^='end'][bottom-aligned]) [part='arrow'] {
|
|
104
|
-
bottom: 0.5rem;
|
|
105
|
-
}
|
|
106
|
-
`;
|
|
107
|
-
|
|
108
|
-
registerStyles('vaadin-popover-overlay', [overlay, popoverOverlay], { moduleId: 'material-popover-overlay' });
|