@vaadin/popover 24.5.0-alpha4 → 24.5.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 +8 -8
- package/src/vaadin-popover.d.ts +33 -0
- package/src/vaadin-popover.js +39 -0
- package/web-types.json +6 -2
- package/web-types.lit.json +9 -2
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-alpha5",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
38
|
-
"@vaadin/a11y-base": "24.5.0-
|
|
39
|
-
"@vaadin/component-base": "24.5.0-
|
|
40
|
-
"@vaadin/overlay": "24.5.0-
|
|
41
|
-
"@vaadin/vaadin-lumo-styles": "24.5.0-
|
|
42
|
-
"@vaadin/vaadin-material-styles": "24.5.0-
|
|
43
|
-
"@vaadin/vaadin-themable-mixin": "24.5.0-
|
|
38
|
+
"@vaadin/a11y-base": "24.5.0-alpha5",
|
|
39
|
+
"@vaadin/component-base": "24.5.0-alpha5",
|
|
40
|
+
"@vaadin/overlay": "24.5.0-alpha5",
|
|
41
|
+
"@vaadin/vaadin-lumo-styles": "24.5.0-alpha5",
|
|
42
|
+
"@vaadin/vaadin-material-styles": "24.5.0-alpha5",
|
|
43
|
+
"@vaadin/vaadin-themable-mixin": "24.5.0-alpha5",
|
|
44
44
|
"lit": "^3.0.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"web-types.json",
|
|
53
53
|
"web-types.lit.json"
|
|
54
54
|
],
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "4e57d240ababf0c2db9d674891b90bdf3812e6ae"
|
|
56
56
|
}
|
package/src/vaadin-popover.d.ts
CHANGED
|
@@ -22,6 +22,8 @@ export type PopoverOpenedChangedEvent = CustomEvent<{ value: boolean }>;
|
|
|
22
22
|
|
|
23
23
|
export interface PopoverCustomEventMap {
|
|
24
24
|
'opened-changed': PopoverOpenedChangedEvent;
|
|
25
|
+
|
|
26
|
+
closed: Event;
|
|
25
27
|
}
|
|
26
28
|
|
|
27
29
|
export type PopoverEventMap = HTMLElementEventMap & PopoverCustomEventMap;
|
|
@@ -33,7 +35,38 @@ export type PopoverEventMap = HTMLElementEventMap & PopoverCustomEventMap;
|
|
|
33
35
|
* Unlike `<vaadin-tooltip>`, the popover supports rich content
|
|
34
36
|
* that can be provided by using `renderer` function.
|
|
35
37
|
*
|
|
38
|
+
* ### Styling
|
|
39
|
+
*
|
|
40
|
+
* `<vaadin-popover>` uses `<vaadin-popover-overlay>` internal
|
|
41
|
+
* themable component as the actual visible overlay.
|
|
42
|
+
*
|
|
43
|
+
* See [`<vaadin-overlay>`](#/elements/vaadin-overlay) documentation
|
|
44
|
+
* for `<vaadin-popover-overlay>` parts.
|
|
45
|
+
*
|
|
46
|
+
* The following state attributes are available for styling:
|
|
47
|
+
*
|
|
48
|
+
* Attribute | Description
|
|
49
|
+
* -----------------|----------------------------------------
|
|
50
|
+
* `position` | Reflects the `position` property value.
|
|
51
|
+
*
|
|
52
|
+
* Note: the `theme` attribute value set on `<vaadin-popover>` is
|
|
53
|
+
* propagated to the internal `<vaadin-popover-overlay>` component.
|
|
54
|
+
*
|
|
55
|
+
* ### Custom CSS Properties
|
|
56
|
+
*
|
|
57
|
+
* The following custom CSS properties are available on the `<vaadin-popover>` element:
|
|
58
|
+
*
|
|
59
|
+
* Custom CSS property | Description
|
|
60
|
+
* ---------------------------------|-------------
|
|
61
|
+
* `--vaadin-popover-offset-top` | Used as an offset when the popover is aligned vertically below the target
|
|
62
|
+
* `--vaadin-popover-offset-bottom` | Used as an offset when the popover is aligned vertically above the target
|
|
63
|
+
* `--vaadin-popover-offset-start` | Used as an offset when the popover is aligned horizontally after the target
|
|
64
|
+
* `--vaadin-popover-offset-end` | Used as an offset when the popover is aligned horizontally before the target
|
|
65
|
+
*
|
|
66
|
+
* See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
|
|
67
|
+
*
|
|
36
68
|
* @fires {CustomEvent} opened-changed - Fired when the `opened` property changes.
|
|
69
|
+
* @fires {CustomEvent} closed - Fired when the popover is closed.
|
|
37
70
|
*/
|
|
38
71
|
declare class Popover extends PopoverPositionMixin(
|
|
39
72
|
PopoverTargetMixin(OverlayClassMixin(ThemePropertyMixin(ElementMixin(HTMLElement)))),
|
package/src/vaadin-popover.js
CHANGED
|
@@ -131,7 +131,38 @@ class PopoverOpenedStateController {
|
|
|
131
131
|
* Unlike `<vaadin-tooltip>`, the popover supports rich content
|
|
132
132
|
* that can be provided by using `renderer` function.
|
|
133
133
|
*
|
|
134
|
+
* ### Styling
|
|
135
|
+
*
|
|
136
|
+
* `<vaadin-popover>` uses `<vaadin-popover-overlay>` internal
|
|
137
|
+
* themable component as the actual visible overlay.
|
|
138
|
+
*
|
|
139
|
+
* See [`<vaadin-overlay>`](#/elements/vaadin-overlay) documentation
|
|
140
|
+
* for `<vaadin-popover-overlay>` parts.
|
|
141
|
+
*
|
|
142
|
+
* The following state attributes are available for styling:
|
|
143
|
+
*
|
|
144
|
+
* Attribute | Description
|
|
145
|
+
* -----------------|----------------------------------------
|
|
146
|
+
* `position` | Reflects the `position` property value.
|
|
147
|
+
*
|
|
148
|
+
* Note: the `theme` attribute value set on `<vaadin-popover>` is
|
|
149
|
+
* propagated to the internal `<vaadin-popover-overlay>` component.
|
|
150
|
+
*
|
|
151
|
+
* ### Custom CSS Properties
|
|
152
|
+
*
|
|
153
|
+
* The following custom CSS properties are available on the `<vaadin-popover>` element:
|
|
154
|
+
*
|
|
155
|
+
* Custom CSS property | Description
|
|
156
|
+
* ---------------------------------|-------------
|
|
157
|
+
* `--vaadin-popover-offset-top` | Used as an offset when the popover is aligned vertically below the target
|
|
158
|
+
* `--vaadin-popover-offset-bottom` | Used as an offset when the popover is aligned vertically above the target
|
|
159
|
+
* `--vaadin-popover-offset-start` | Used as an offset when the popover is aligned horizontally after the target
|
|
160
|
+
* `--vaadin-popover-offset-end` | Used as an offset when the popover is aligned horizontally before the target
|
|
161
|
+
*
|
|
162
|
+
* See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
|
|
163
|
+
*
|
|
134
164
|
* @fires {CustomEvent} opened-changed - Fired when the `opened` property changes.
|
|
165
|
+
* @fires {CustomEvent} closed - Fired when the popover is closed.
|
|
135
166
|
*
|
|
136
167
|
* @customElement
|
|
137
168
|
* @extends HTMLElement
|
|
@@ -685,6 +716,8 @@ class Popover extends PopoverPositionMixin(
|
|
|
685
716
|
if (this.modal && this.target.style.pointerEvents) {
|
|
686
717
|
this.target.style.pointerEvents = '';
|
|
687
718
|
}
|
|
719
|
+
|
|
720
|
+
this.dispatchEvent(new CustomEvent('closed'));
|
|
688
721
|
}
|
|
689
722
|
|
|
690
723
|
/**
|
|
@@ -741,6 +774,12 @@ class Popover extends PopoverPositionMixin(
|
|
|
741
774
|
this.__updateDimension(overlay, 'width', width);
|
|
742
775
|
}
|
|
743
776
|
}
|
|
777
|
+
|
|
778
|
+
/**
|
|
779
|
+
* Fired when the popover is closed.
|
|
780
|
+
*
|
|
781
|
+
* @event closed
|
|
782
|
+
*/
|
|
744
783
|
}
|
|
745
784
|
|
|
746
785
|
defineCustomElement(Popover);
|
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": "24.5.0-
|
|
4
|
+
"version": "24.5.0-alpha5",
|
|
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.",
|
|
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-alpha5/#/elements/vaadin-overlay) documentation\nfor `<vaadin-popover-overlay>` parts.\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": "position",
|
|
@@ -389,6 +389,10 @@
|
|
|
389
389
|
}
|
|
390
390
|
],
|
|
391
391
|
"events": [
|
|
392
|
+
{
|
|
393
|
+
"name": "closed",
|
|
394
|
+
"description": "Fired when the popover is closed."
|
|
395
|
+
},
|
|
392
396
|
{
|
|
393
397
|
"name": "opened-changed",
|
|
394
398
|
"description": "Fired when the `opened` property changes."
|
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-alpha5",
|
|
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.",
|
|
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-alpha5/#/elements/vaadin-overlay) documentation\nfor `<vaadin-popover-overlay>` parts.\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
|
{
|
|
@@ -145,6 +145,13 @@
|
|
|
145
145
|
"kind": "expression"
|
|
146
146
|
}
|
|
147
147
|
},
|
|
148
|
+
{
|
|
149
|
+
"name": "@closed",
|
|
150
|
+
"description": "Fired when the popover is closed.",
|
|
151
|
+
"value": {
|
|
152
|
+
"kind": "expression"
|
|
153
|
+
}
|
|
154
|
+
},
|
|
148
155
|
{
|
|
149
156
|
"name": "@opened-changed",
|
|
150
157
|
"description": "Fired when the `opened` property changes.",
|