@vaadin/tooltip 24.2.0-alpha4 → 24.2.0-dev.538d07bdf
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 +9 -9
- package/src/vaadin-tooltip-overlay.js +48 -46
- package/theme/lumo/vaadin-tooltip.js +0 -1
- package/theme/material/vaadin-tooltip.js +0 -1
- package/web-types.json +0 -276
- package/web-types.lit.json +0 -118
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/tooltip",
|
|
3
|
-
"version": "24.2.0-
|
|
3
|
+
"version": "24.2.0-dev.538d07bdf",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -35,21 +35,21 @@
|
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@polymer/polymer": "^3.0.0",
|
|
38
|
-
"@vaadin/a11y-base": "24.2.0-
|
|
39
|
-
"@vaadin/component-base": "24.2.0-
|
|
40
|
-
"@vaadin/overlay": "24.2.0-
|
|
41
|
-
"@vaadin/vaadin-lumo-styles": "24.2.0-
|
|
42
|
-
"@vaadin/vaadin-material-styles": "24.2.0-
|
|
43
|
-
"@vaadin/vaadin-themable-mixin": "24.2.0-
|
|
38
|
+
"@vaadin/a11y-base": "24.2.0-dev.538d07bdf",
|
|
39
|
+
"@vaadin/component-base": "24.2.0-dev.538d07bdf",
|
|
40
|
+
"@vaadin/overlay": "24.2.0-dev.538d07bdf",
|
|
41
|
+
"@vaadin/vaadin-lumo-styles": "24.2.0-dev.538d07bdf",
|
|
42
|
+
"@vaadin/vaadin-material-styles": "24.2.0-dev.538d07bdf",
|
|
43
|
+
"@vaadin/vaadin-themable-mixin": "24.2.0-dev.538d07bdf"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@esm-bundle/chai": "^4.3.4",
|
|
47
|
-
"@vaadin/testing-helpers": "^0.4.
|
|
47
|
+
"@vaadin/testing-helpers": "^0.4.3",
|
|
48
48
|
"sinon": "^13.0.2"
|
|
49
49
|
},
|
|
50
50
|
"web-types": [
|
|
51
51
|
"web-types.json",
|
|
52
52
|
"web-types.lit.json"
|
|
53
53
|
],
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "86c2fd5f37cf1240af98f7c7d752518c8d701db2"
|
|
55
55
|
}
|
|
@@ -3,73 +3,75 @@
|
|
|
3
3
|
* Copyright (c) 2022 - 2023 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
6
|
+
import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
|
|
7
|
+
import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
|
|
8
|
+
import { OverlayMixin } from '@vaadin/overlay/src/vaadin-overlay-mixin.js';
|
|
7
9
|
import { PositionMixin } from '@vaadin/overlay/src/vaadin-overlay-position-mixin.js';
|
|
8
|
-
import {
|
|
10
|
+
import { overlayStyles } from '@vaadin/overlay/src/vaadin-overlay-styles.js';
|
|
11
|
+
import { css, registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
9
12
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
z-index: 1100;
|
|
15
|
-
}
|
|
13
|
+
const tooltipOverlayStyles = css`
|
|
14
|
+
:host {
|
|
15
|
+
z-index: 1100;
|
|
16
|
+
}
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
[part='overlay'] {
|
|
19
|
+
max-width: 40ch;
|
|
20
|
+
}
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
:host([position^='top'][top-aligned]) [part='overlay'],
|
|
23
|
+
:host([position^='bottom'][top-aligned]) [part='overlay'] {
|
|
24
|
+
margin-top: var(--vaadin-tooltip-offset-top, 0);
|
|
25
|
+
}
|
|
25
26
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
:host([position^='top'][bottom-aligned]) [part='overlay'],
|
|
28
|
+
:host([position^='bottom'][bottom-aligned]) [part='overlay'] {
|
|
29
|
+
margin-bottom: var(--vaadin-tooltip-offset-bottom, 0);
|
|
30
|
+
}
|
|
30
31
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
:host([position^='start'][start-aligned]) [part='overlay'],
|
|
33
|
+
:host([position^='end'][start-aligned]) [part='overlay'] {
|
|
34
|
+
margin-inline-start: var(--vaadin-tooltip-offset-start, 0);
|
|
35
|
+
}
|
|
35
36
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
:host([position^='start'][end-aligned]) [part='overlay'],
|
|
38
|
+
:host([position^='end'][end-aligned]) [part='overlay'] {
|
|
39
|
+
margin-inline-end: var(--vaadin-tooltip-offset-end, 0);
|
|
40
|
+
}
|
|
40
41
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
42
|
+
@media (forced-colors: active) {
|
|
43
|
+
[part='overlay'] {
|
|
44
|
+
outline: 1px dashed;
|
|
45
45
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
);
|
|
46
|
+
}
|
|
47
|
+
`;
|
|
49
48
|
|
|
50
|
-
|
|
49
|
+
registerStyles('vaadin-tooltip-overlay', [overlayStyles, tooltipOverlayStyles], {
|
|
50
|
+
moduleId: 'vaadin-tooltip-overlay-styles',
|
|
51
|
+
});
|
|
51
52
|
|
|
52
53
|
/**
|
|
53
54
|
* An element used internally by `<vaadin-tooltip>`. Not intended to be used separately.
|
|
54
55
|
*
|
|
55
|
-
* @extends
|
|
56
|
+
* @extends HTMLElement
|
|
57
|
+
* @mixes DirMixin
|
|
58
|
+
* @mixes OverlayMixin
|
|
59
|
+
* @mixes PositionMixin
|
|
60
|
+
* @mixes ThemableMixin
|
|
56
61
|
* @private
|
|
57
62
|
*/
|
|
58
|
-
class TooltipOverlay extends PositionMixin(
|
|
63
|
+
class TooltipOverlay extends PositionMixin(OverlayMixin(DirMixin(ThemableMixin(PolymerElement)))) {
|
|
59
64
|
static get is() {
|
|
60
65
|
return 'vaadin-tooltip-overlay';
|
|
61
66
|
}
|
|
62
67
|
|
|
63
68
|
static get template() {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
return memoizedTemplate;
|
|
69
|
+
return html`
|
|
70
|
+
<div id="backdrop" part="backdrop" hidden></div>
|
|
71
|
+
<div part="overlay" id="overlay">
|
|
72
|
+
<div part="content" id="content"><slot></slot></div>
|
|
73
|
+
</div>
|
|
74
|
+
`;
|
|
73
75
|
}
|
|
74
76
|
|
|
75
77
|
static get properties() {
|
package/web-types.json
DELETED
|
@@ -1,276 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json.schemastore.org/web-types",
|
|
3
|
-
"name": "@vaadin/tooltip",
|
|
4
|
-
"version": "24.2.0-alpha4",
|
|
5
|
-
"description-markup": "markdown",
|
|
6
|
-
"contributions": {
|
|
7
|
-
"html": {
|
|
8
|
-
"elements": [
|
|
9
|
-
{
|
|
10
|
-
"name": "vaadin-tooltip",
|
|
11
|
-
"description": "`<vaadin-tooltip>` is a Web Component for creating tooltips.\n\n```html\n<button id=\"confirm\">Confirm</button>\n<vaadin-tooltip text=\"Click to save changes\" for=\"confirm\"></vaadin-tooltip>\n```\n\n### Styling\n\n`<vaadin-tooltip>` uses `<vaadin-tooltip-overlay>` internal\nthemable component as the actual visible overlay.\n\nSee [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha4/#/elements/vaadin-overlay) documentation\nfor `<vaadin-tooltip-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-tooltip>` is\npropagated to the internal `<vaadin-tooltip-overlay>` component.\n\n### Custom CSS Properties\n\nThe following custom CSS properties are available on the `<vaadin-tooltip>` element:\n\nCustom CSS property | Description\n---------------------------------|-------------\n`--vaadin-tooltip-offset-top` | Used as an offset when the tooltip is aligned vertically below the target\n`--vaadin-tooltip-offset-bottom` | Used as an offset when the tooltip is aligned vertically above the target\n`--vaadin-tooltip-offset-start` | Used as an offset when the tooltip is aligned horizontally after the target\n`--vaadin-tooltip-offset-end` | Used as an offset when the tooltip is aligned horizontally before the target\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
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
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"name": "focus-delay",
|
|
26
|
-
"description": "The delay in milliseconds before the tooltip\nis opened on keyboard focus, when not in manual mode.",
|
|
27
|
-
"value": {
|
|
28
|
-
"type": [
|
|
29
|
-
"number",
|
|
30
|
-
"null",
|
|
31
|
-
"undefined"
|
|
32
|
-
]
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"name": "for",
|
|
37
|
-
"description": "The id of the element used as a tooltip trigger.\nThe element should be in the DOM by the time when\nthe attribute is set, otherwise a warning is shown.",
|
|
38
|
-
"value": {
|
|
39
|
-
"type": [
|
|
40
|
-
"string",
|
|
41
|
-
"null",
|
|
42
|
-
"undefined"
|
|
43
|
-
]
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
"name": "hide-delay",
|
|
48
|
-
"description": "The delay in milliseconds before the tooltip\nis closed on losing hover, when not in manual mode.\nOn blur, the tooltip is closed immediately.",
|
|
49
|
-
"value": {
|
|
50
|
-
"type": [
|
|
51
|
-
"number",
|
|
52
|
-
"null",
|
|
53
|
-
"undefined"
|
|
54
|
-
]
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
"name": "hover-delay",
|
|
59
|
-
"description": "The delay in milliseconds before the tooltip\nis opened on hover, when not in manual mode.",
|
|
60
|
-
"value": {
|
|
61
|
-
"type": [
|
|
62
|
-
"number",
|
|
63
|
-
"null",
|
|
64
|
-
"undefined"
|
|
65
|
-
]
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
"name": "manual",
|
|
70
|
-
"description": "When true, the tooltip is controlled programmatically\ninstead of reacting to focus and mouse events.",
|
|
71
|
-
"value": {
|
|
72
|
-
"type": [
|
|
73
|
-
"boolean",
|
|
74
|
-
"null",
|
|
75
|
-
"undefined"
|
|
76
|
-
]
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
"name": "opened",
|
|
81
|
-
"description": "When true, the tooltip is opened programmatically.\nOnly works if `manual` is set to `true`.",
|
|
82
|
-
"value": {
|
|
83
|
-
"type": [
|
|
84
|
-
"boolean",
|
|
85
|
-
"null",
|
|
86
|
-
"undefined"
|
|
87
|
-
]
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
"name": "position",
|
|
92
|
-
"description": "Position of the tooltip with respect to its 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`.",
|
|
93
|
-
"value": {
|
|
94
|
-
"type": [
|
|
95
|
-
"string",
|
|
96
|
-
"null",
|
|
97
|
-
"undefined"
|
|
98
|
-
]
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
"name": "text",
|
|
103
|
-
"description": "String used as a tooltip content.",
|
|
104
|
-
"value": {
|
|
105
|
-
"type": [
|
|
106
|
-
"string",
|
|
107
|
-
"null",
|
|
108
|
-
"undefined"
|
|
109
|
-
]
|
|
110
|
-
}
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
"name": "theme",
|
|
114
|
-
"description": "The theme variants to apply to the component.",
|
|
115
|
-
"value": {
|
|
116
|
-
"type": [
|
|
117
|
-
"string",
|
|
118
|
-
"null",
|
|
119
|
-
"undefined"
|
|
120
|
-
]
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
],
|
|
124
|
-
"js": {
|
|
125
|
-
"properties": [
|
|
126
|
-
{
|
|
127
|
-
"name": "overlayClass",
|
|
128
|
-
"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.",
|
|
129
|
-
"value": {
|
|
130
|
-
"type": [
|
|
131
|
-
"string",
|
|
132
|
-
"null",
|
|
133
|
-
"undefined"
|
|
134
|
-
]
|
|
135
|
-
}
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
"name": "context",
|
|
139
|
-
"description": "Object with properties passed to `generator` and\n`shouldShow` functions for generating tooltip text\nor detecting whether to show the tooltip or not.",
|
|
140
|
-
"value": {
|
|
141
|
-
"type": [
|
|
142
|
-
"Object",
|
|
143
|
-
"null",
|
|
144
|
-
"undefined"
|
|
145
|
-
]
|
|
146
|
-
}
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
"name": "focusDelay",
|
|
150
|
-
"description": "The delay in milliseconds before the tooltip\nis opened on keyboard focus, when not in manual mode.",
|
|
151
|
-
"value": {
|
|
152
|
-
"type": [
|
|
153
|
-
"number",
|
|
154
|
-
"null",
|
|
155
|
-
"undefined"
|
|
156
|
-
]
|
|
157
|
-
}
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
"name": "for",
|
|
161
|
-
"description": "The id of the element used as a tooltip trigger.\nThe element should be in the DOM by the time when\nthe attribute is set, otherwise a warning is shown.",
|
|
162
|
-
"value": {
|
|
163
|
-
"type": [
|
|
164
|
-
"string",
|
|
165
|
-
"null",
|
|
166
|
-
"undefined"
|
|
167
|
-
]
|
|
168
|
-
}
|
|
169
|
-
},
|
|
170
|
-
{
|
|
171
|
-
"name": "hideDelay",
|
|
172
|
-
"description": "The delay in milliseconds before the tooltip\nis closed on losing hover, when not in manual mode.\nOn blur, the tooltip is closed immediately.",
|
|
173
|
-
"value": {
|
|
174
|
-
"type": [
|
|
175
|
-
"number",
|
|
176
|
-
"null",
|
|
177
|
-
"undefined"
|
|
178
|
-
]
|
|
179
|
-
}
|
|
180
|
-
},
|
|
181
|
-
{
|
|
182
|
-
"name": "hoverDelay",
|
|
183
|
-
"description": "The delay in milliseconds before the tooltip\nis opened on hover, when not in manual mode.",
|
|
184
|
-
"value": {
|
|
185
|
-
"type": [
|
|
186
|
-
"number",
|
|
187
|
-
"null",
|
|
188
|
-
"undefined"
|
|
189
|
-
]
|
|
190
|
-
}
|
|
191
|
-
},
|
|
192
|
-
{
|
|
193
|
-
"name": "manual",
|
|
194
|
-
"description": "When true, the tooltip is controlled programmatically\ninstead of reacting to focus and mouse events.",
|
|
195
|
-
"value": {
|
|
196
|
-
"type": [
|
|
197
|
-
"boolean",
|
|
198
|
-
"null",
|
|
199
|
-
"undefined"
|
|
200
|
-
]
|
|
201
|
-
}
|
|
202
|
-
},
|
|
203
|
-
{
|
|
204
|
-
"name": "opened",
|
|
205
|
-
"description": "When true, the tooltip is opened programmatically.\nOnly works if `manual` is set to `true`.",
|
|
206
|
-
"value": {
|
|
207
|
-
"type": [
|
|
208
|
-
"boolean",
|
|
209
|
-
"null",
|
|
210
|
-
"undefined"
|
|
211
|
-
]
|
|
212
|
-
}
|
|
213
|
-
},
|
|
214
|
-
{
|
|
215
|
-
"name": "position",
|
|
216
|
-
"description": "Position of the tooltip with respect to its 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`.",
|
|
217
|
-
"value": {
|
|
218
|
-
"type": [
|
|
219
|
-
"string",
|
|
220
|
-
"null",
|
|
221
|
-
"undefined"
|
|
222
|
-
]
|
|
223
|
-
}
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
"name": "shouldShow",
|
|
227
|
-
"description": "Function used to detect whether to show the tooltip based on a condition,\ncalled every time the tooltip is about to be shown on hover and focus.\nThe function takes two parameters: `target` and `context`, which contain\nvalues of the corresponding tooltip properties at the time of calling.\nThe tooltip is only shown when the function invocation returns `true`.",
|
|
228
|
-
"value": {
|
|
229
|
-
"type": [
|
|
230
|
-
"Object",
|
|
231
|
-
"null",
|
|
232
|
-
"undefined"
|
|
233
|
-
]
|
|
234
|
-
}
|
|
235
|
-
},
|
|
236
|
-
{
|
|
237
|
-
"name": "target",
|
|
238
|
-
"description": "Reference to the element used as a tooltip trigger.\nThe target must be placed in the same shadow scope.\nDefaults to an element referenced with `for`.",
|
|
239
|
-
"value": {
|
|
240
|
-
"type": [
|
|
241
|
-
"Object",
|
|
242
|
-
"null",
|
|
243
|
-
"undefined"
|
|
244
|
-
]
|
|
245
|
-
}
|
|
246
|
-
},
|
|
247
|
-
{
|
|
248
|
-
"name": "text",
|
|
249
|
-
"description": "String used as a tooltip content.",
|
|
250
|
-
"value": {
|
|
251
|
-
"type": [
|
|
252
|
-
"string",
|
|
253
|
-
"null",
|
|
254
|
-
"undefined"
|
|
255
|
-
]
|
|
256
|
-
}
|
|
257
|
-
},
|
|
258
|
-
{
|
|
259
|
-
"name": "generator",
|
|
260
|
-
"description": "Function used to generate the tooltip content.\nWhen provided, it overrides the `text` property.\nUse the `context` property to provide argument\nthat can be passed to the generator function.",
|
|
261
|
-
"value": {
|
|
262
|
-
"type": [
|
|
263
|
-
"Object",
|
|
264
|
-
"null",
|
|
265
|
-
"undefined"
|
|
266
|
-
]
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
],
|
|
270
|
-
"events": []
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
]
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
}
|
package/web-types.lit.json
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json.schemastore.org/web-types",
|
|
3
|
-
"name": "@vaadin/tooltip",
|
|
4
|
-
"version": "24.2.0-alpha4",
|
|
5
|
-
"description-markup": "markdown",
|
|
6
|
-
"framework": "lit",
|
|
7
|
-
"framework-config": {
|
|
8
|
-
"enable-when": {
|
|
9
|
-
"node-packages": [
|
|
10
|
-
"lit"
|
|
11
|
-
]
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"contributions": {
|
|
15
|
-
"html": {
|
|
16
|
-
"elements": [
|
|
17
|
-
{
|
|
18
|
-
"name": "vaadin-tooltip",
|
|
19
|
-
"description": "`<vaadin-tooltip>` is a Web Component for creating tooltips.\n\n```html\n<button id=\"confirm\">Confirm</button>\n<vaadin-tooltip text=\"Click to save changes\" for=\"confirm\"></vaadin-tooltip>\n```\n\n### Styling\n\n`<vaadin-tooltip>` uses `<vaadin-tooltip-overlay>` internal\nthemable component as the actual visible overlay.\n\nSee [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha4/#/elements/vaadin-overlay) documentation\nfor `<vaadin-tooltip-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-tooltip>` is\npropagated to the internal `<vaadin-tooltip-overlay>` component.\n\n### Custom CSS Properties\n\nThe following custom CSS properties are available on the `<vaadin-tooltip>` element:\n\nCustom CSS property | Description\n---------------------------------|-------------\n`--vaadin-tooltip-offset-top` | Used as an offset when the tooltip is aligned vertically below the target\n`--vaadin-tooltip-offset-bottom` | Used as an offset when the tooltip is aligned vertically above the target\n`--vaadin-tooltip-offset-start` | Used as an offset when the tooltip is aligned horizontally after the target\n`--vaadin-tooltip-offset-end` | Used as an offset when the tooltip is aligned horizontally before the target\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
20
|
-
"extension": true,
|
|
21
|
-
"attributes": [
|
|
22
|
-
{
|
|
23
|
-
"name": "?manual",
|
|
24
|
-
"description": "When true, the tooltip is controlled programmatically\ninstead of reacting to focus and mouse events.",
|
|
25
|
-
"value": {
|
|
26
|
-
"kind": "expression"
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
"name": "?opened",
|
|
31
|
-
"description": "When true, the tooltip is opened programmatically.\nOnly works if `manual` is set to `true`.",
|
|
32
|
-
"value": {
|
|
33
|
-
"kind": "expression"
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
"name": ".overlayClass",
|
|
38
|
-
"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.",
|
|
39
|
-
"value": {
|
|
40
|
-
"kind": "expression"
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
"name": ".context",
|
|
45
|
-
"description": "Object with properties passed to `generator` and\n`shouldShow` functions for generating tooltip text\nor detecting whether to show the tooltip or not.",
|
|
46
|
-
"value": {
|
|
47
|
-
"kind": "expression"
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"name": ".focusDelay",
|
|
52
|
-
"description": "The delay in milliseconds before the tooltip\nis opened on keyboard focus, when not in manual mode.",
|
|
53
|
-
"value": {
|
|
54
|
-
"kind": "expression"
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
"name": ".for",
|
|
59
|
-
"description": "The id of the element used as a tooltip trigger.\nThe element should be in the DOM by the time when\nthe attribute is set, otherwise a warning is shown.",
|
|
60
|
-
"value": {
|
|
61
|
-
"kind": "expression"
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
"name": ".hideDelay",
|
|
66
|
-
"description": "The delay in milliseconds before the tooltip\nis closed on losing hover, when not in manual mode.\nOn blur, the tooltip is closed immediately.",
|
|
67
|
-
"value": {
|
|
68
|
-
"kind": "expression"
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
"name": ".hoverDelay",
|
|
73
|
-
"description": "The delay in milliseconds before the tooltip\nis opened on hover, when not in manual mode.",
|
|
74
|
-
"value": {
|
|
75
|
-
"kind": "expression"
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
"name": ".position",
|
|
80
|
-
"description": "Position of the tooltip with respect to its 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`.",
|
|
81
|
-
"value": {
|
|
82
|
-
"kind": "expression"
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
"name": ".shouldShow",
|
|
87
|
-
"description": "Function used to detect whether to show the tooltip based on a condition,\ncalled every time the tooltip is about to be shown on hover and focus.\nThe function takes two parameters: `target` and `context`, which contain\nvalues of the corresponding tooltip properties at the time of calling.\nThe tooltip is only shown when the function invocation returns `true`.",
|
|
88
|
-
"value": {
|
|
89
|
-
"kind": "expression"
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
"name": ".target",
|
|
94
|
-
"description": "Reference to the element used as a tooltip trigger.\nThe target must be placed in the same shadow scope.\nDefaults to an element referenced with `for`.",
|
|
95
|
-
"value": {
|
|
96
|
-
"kind": "expression"
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
"name": ".text",
|
|
101
|
-
"description": "String used as a tooltip content.",
|
|
102
|
-
"value": {
|
|
103
|
-
"kind": "expression"
|
|
104
|
-
}
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
"name": ".generator",
|
|
108
|
-
"description": "Function used to generate the tooltip content.\nWhen provided, it overrides the `text` property.\nUse the `context` property to provide argument\nthat can be passed to the generator function.",
|
|
109
|
-
"value": {
|
|
110
|
-
"kind": "expression"
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
]
|
|
114
|
-
}
|
|
115
|
-
]
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}
|