Skip to content

Commit 1126416

Browse files
authored
docs: add styling API documentation to popover JSDoc (#7531)
1 parent 9f9cf36 commit 1126416

2 files changed

Lines changed: 60 additions & 0 deletions

File tree

‎packages/popover/src/vaadin-popover.d.ts‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,36 @@ export type PopoverEventMap = HTMLElementEventMap & PopoverCustomEventMap;
3333
* Unlike `<vaadin-tooltip>`, the popover supports rich content
3434
* that can be provided by using `renderer` function.
3535
*
36+
* ### Styling
37+
*
38+
* `<vaadin-popover>` uses `<vaadin-popover-overlay>` internal
39+
* themable component as the actual visible overlay.
40+
*
41+
* See [`<vaadin-overlay>`](#/elements/vaadin-overlay) documentation
42+
* for `<vaadin-popover-overlay>` parts.
43+
*
44+
* The following state attributes are available for styling:
45+
*
46+
* Attribute | Description
47+
* -----------------|----------------------------------------
48+
* `position` | Reflects the `position` property value.
49+
*
50+
* Note: the `theme` attribute value set on `<vaadin-popover>` is
51+
* propagated to the internal `<vaadin-popover-overlay>` component.
52+
*
53+
* ### Custom CSS Properties
54+
*
55+
* The following custom CSS properties are available on the `<vaadin-popover>` element:
56+
*
57+
* Custom CSS property | Description
58+
* ---------------------------------|-------------
59+
* `--vaadin-popover-offset-top` | Used as an offset when the popover is aligned vertically below the target
60+
* `--vaadin-popover-offset-bottom` | Used as an offset when the popover is aligned vertically above the target
61+
* `--vaadin-popover-offset-start` | Used as an offset when the popover is aligned horizontally after the target
62+
* `--vaadin-popover-offset-end` | Used as an offset when the popover is aligned horizontally before the target
63+
*
64+
* See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
65+
*
3666
* @fires {CustomEvent} opened-changed - Fired when the `opened` property changes.
3767
*/
3868
declare class Popover extends PopoverPositionMixin(

‎packages/popover/src/vaadin-popover.js‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,36 @@ class PopoverOpenedStateController {
131131
* Unlike `<vaadin-tooltip>`, the popover supports rich content
132132
* that can be provided by using `renderer` function.
133133
*
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+
*
134164
* @fires {CustomEvent} opened-changed - Fired when the `opened` property changes.
135165
*
136166
* @customElement

0 commit comments

Comments
 (0)