@vaadin/tooltip 24.3.0-alpha1 → 24.3.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.
@@ -0,0 +1,2 @@
1
+ import './vaadin-tooltip-styles.js';
2
+ import '../../src/vaadin-lit-tooltip.js';
@@ -0,0 +1,2 @@
1
+ import './vaadin-tooltip-styles.js';
2
+ import '../../src/vaadin-lit-tooltip.js';
@@ -0,0 +1 @@
1
+ export * from './src/vaadin-tooltip.js';
@@ -0,0 +1,3 @@
1
+ import './theme/lumo/vaadin-lit-tooltip.js';
2
+
3
+ export * from './src/vaadin-lit-tooltip.js';
package/web-types.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/tooltip",
4
- "version": "24.3.0-alpha1",
4
+ "version": "24.3.0-alpha11",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "elements": [
9
9
  {
10
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.3.0-alpha1/#/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.",
11
+ "description": "LitElement based version of `<vaadin-tooltip>` web component.\n\n## Disclaimer\n\nThis component is an experiment not intended for publishing to npm.\nThere is no ETA regarding specific Vaadin version where it'll land.\nFeel free to try this code in your apps as per Apache 2.0 license.",
12
12
  "attributes": [
13
13
  {
14
14
  "name": "overlay-class",
@@ -178,6 +178,17 @@
178
178
  ]
179
179
  }
180
180
  },
181
+ {
182
+ "name": "generator",
183
+ "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.",
184
+ "value": {
185
+ "type": [
186
+ "Object",
187
+ "null",
188
+ "undefined"
189
+ ]
190
+ }
191
+ },
181
192
  {
182
193
  "name": "hideDelay",
183
194
  "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.",
@@ -265,6 +276,182 @@
265
276
  "undefined"
266
277
  ]
267
278
  }
279
+ }
280
+ ],
281
+ "events": []
282
+ }
283
+ },
284
+ {
285
+ "name": "vaadin-tooltip",
286
+ "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.3.0-alpha11/#/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.",
287
+ "attributes": [
288
+ {
289
+ "name": "overlay-class",
290
+ "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.",
291
+ "value": {
292
+ "type": [
293
+ "string",
294
+ "null",
295
+ "undefined"
296
+ ]
297
+ }
298
+ },
299
+ {
300
+ "name": "focus-delay",
301
+ "description": "The delay in milliseconds before the tooltip\nis opened on keyboard focus, when not in manual mode.",
302
+ "value": {
303
+ "type": [
304
+ "number",
305
+ "null",
306
+ "undefined"
307
+ ]
308
+ }
309
+ },
310
+ {
311
+ "name": "for",
312
+ "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.",
313
+ "value": {
314
+ "type": [
315
+ "string",
316
+ "null",
317
+ "undefined"
318
+ ]
319
+ }
320
+ },
321
+ {
322
+ "name": "hide-delay",
323
+ "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.",
324
+ "value": {
325
+ "type": [
326
+ "number",
327
+ "null",
328
+ "undefined"
329
+ ]
330
+ }
331
+ },
332
+ {
333
+ "name": "hover-delay",
334
+ "description": "The delay in milliseconds before the tooltip\nis opened on hover, when not in manual mode.",
335
+ "value": {
336
+ "type": [
337
+ "number",
338
+ "null",
339
+ "undefined"
340
+ ]
341
+ }
342
+ },
343
+ {
344
+ "name": "manual",
345
+ "description": "When true, the tooltip is controlled programmatically\ninstead of reacting to focus and mouse events.",
346
+ "value": {
347
+ "type": [
348
+ "boolean",
349
+ "null",
350
+ "undefined"
351
+ ]
352
+ }
353
+ },
354
+ {
355
+ "name": "opened",
356
+ "description": "When true, the tooltip is opened programmatically.\nOnly works if `manual` is set to `true`.",
357
+ "value": {
358
+ "type": [
359
+ "boolean",
360
+ "null",
361
+ "undefined"
362
+ ]
363
+ }
364
+ },
365
+ {
366
+ "name": "position",
367
+ "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`.",
368
+ "value": {
369
+ "type": [
370
+ "string",
371
+ "null",
372
+ "undefined"
373
+ ]
374
+ }
375
+ },
376
+ {
377
+ "name": "text",
378
+ "description": "String used as a tooltip content.",
379
+ "value": {
380
+ "type": [
381
+ "string",
382
+ "null",
383
+ "undefined"
384
+ ]
385
+ }
386
+ },
387
+ {
388
+ "name": "theme",
389
+ "description": "The theme variants to apply to the component.",
390
+ "value": {
391
+ "type": [
392
+ "string",
393
+ "null",
394
+ "undefined"
395
+ ]
396
+ }
397
+ }
398
+ ],
399
+ "js": {
400
+ "properties": [
401
+ {
402
+ "name": "overlayClass",
403
+ "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.",
404
+ "value": {
405
+ "type": [
406
+ "string",
407
+ "null",
408
+ "undefined"
409
+ ]
410
+ }
411
+ },
412
+ {
413
+ "name": "ariaTarget",
414
+ "description": "Element used to link with the `aria-describedby`\nattribute. Supports array of multiple elements.\nWhen not set, defaults to `target`.",
415
+ "value": {
416
+ "type": [
417
+ "Object",
418
+ "null",
419
+ "undefined"
420
+ ]
421
+ }
422
+ },
423
+ {
424
+ "name": "context",
425
+ "description": "Object with properties passed to `generator` and\n`shouldShow` functions for generating tooltip text\nor detecting whether to show the tooltip or not.",
426
+ "value": {
427
+ "type": [
428
+ "Object",
429
+ "null",
430
+ "undefined"
431
+ ]
432
+ }
433
+ },
434
+ {
435
+ "name": "focusDelay",
436
+ "description": "The delay in milliseconds before the tooltip\nis opened on keyboard focus, when not in manual mode.",
437
+ "value": {
438
+ "type": [
439
+ "number",
440
+ "null",
441
+ "undefined"
442
+ ]
443
+ }
444
+ },
445
+ {
446
+ "name": "for",
447
+ "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.",
448
+ "value": {
449
+ "type": [
450
+ "string",
451
+ "null",
452
+ "undefined"
453
+ ]
454
+ }
268
455
  },
269
456
  {
270
457
  "name": "generator",
@@ -276,6 +463,94 @@
276
463
  "undefined"
277
464
  ]
278
465
  }
466
+ },
467
+ {
468
+ "name": "hideDelay",
469
+ "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.",
470
+ "value": {
471
+ "type": [
472
+ "number",
473
+ "null",
474
+ "undefined"
475
+ ]
476
+ }
477
+ },
478
+ {
479
+ "name": "hoverDelay",
480
+ "description": "The delay in milliseconds before the tooltip\nis opened on hover, when not in manual mode.",
481
+ "value": {
482
+ "type": [
483
+ "number",
484
+ "null",
485
+ "undefined"
486
+ ]
487
+ }
488
+ },
489
+ {
490
+ "name": "manual",
491
+ "description": "When true, the tooltip is controlled programmatically\ninstead of reacting to focus and mouse events.",
492
+ "value": {
493
+ "type": [
494
+ "boolean",
495
+ "null",
496
+ "undefined"
497
+ ]
498
+ }
499
+ },
500
+ {
501
+ "name": "opened",
502
+ "description": "When true, the tooltip is opened programmatically.\nOnly works if `manual` is set to `true`.",
503
+ "value": {
504
+ "type": [
505
+ "boolean",
506
+ "null",
507
+ "undefined"
508
+ ]
509
+ }
510
+ },
511
+ {
512
+ "name": "position",
513
+ "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`.",
514
+ "value": {
515
+ "type": [
516
+ "string",
517
+ "null",
518
+ "undefined"
519
+ ]
520
+ }
521
+ },
522
+ {
523
+ "name": "shouldShow",
524
+ "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`.",
525
+ "value": {
526
+ "type": [
527
+ "Object",
528
+ "null",
529
+ "undefined"
530
+ ]
531
+ }
532
+ },
533
+ {
534
+ "name": "target",
535
+ "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`.",
536
+ "value": {
537
+ "type": [
538
+ "Object",
539
+ "null",
540
+ "undefined"
541
+ ]
542
+ }
543
+ },
544
+ {
545
+ "name": "text",
546
+ "description": "String used as a tooltip content.",
547
+ "value": {
548
+ "type": [
549
+ "string",
550
+ "null",
551
+ "undefined"
552
+ ]
553
+ }
279
554
  }
280
555
  ],
281
556
  "events": []
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/tooltip",
4
- "version": "24.3.0-alpha1",
4
+ "version": "24.3.0-alpha11",
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-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.3.0-alpha1/#/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.",
19
+ "description": "LitElement based version of `<vaadin-tooltip>` web component.\n\n## Disclaimer\n\nThis component is an experiment not intended for publishing to npm.\nThere is no ETA regarding specific Vaadin version where it'll land.\nFeel free to try this code in your apps as per Apache 2.0 license.",
20
20
  "extension": true,
21
21
  "attributes": [
22
22
  {
@@ -68,6 +68,13 @@
68
68
  "kind": "expression"
69
69
  }
70
70
  },
71
+ {
72
+ "name": ".generator",
73
+ "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.",
74
+ "value": {
75
+ "kind": "expression"
76
+ }
77
+ },
71
78
  {
72
79
  "name": ".hideDelay",
73
80
  "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.",
@@ -109,6 +116,62 @@
109
116
  "value": {
110
117
  "kind": "expression"
111
118
  }
119
+ }
120
+ ]
121
+ },
122
+ {
123
+ "name": "vaadin-tooltip",
124
+ "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.3.0-alpha11/#/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.",
125
+ "extension": true,
126
+ "attributes": [
127
+ {
128
+ "name": "?manual",
129
+ "description": "When true, the tooltip is controlled programmatically\ninstead of reacting to focus and mouse events.",
130
+ "value": {
131
+ "kind": "expression"
132
+ }
133
+ },
134
+ {
135
+ "name": "?opened",
136
+ "description": "When true, the tooltip is opened programmatically.\nOnly works if `manual` is set to `true`.",
137
+ "value": {
138
+ "kind": "expression"
139
+ }
140
+ },
141
+ {
142
+ "name": ".overlayClass",
143
+ "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.",
144
+ "value": {
145
+ "kind": "expression"
146
+ }
147
+ },
148
+ {
149
+ "name": ".ariaTarget",
150
+ "description": "Element used to link with the `aria-describedby`\nattribute. Supports array of multiple elements.\nWhen not set, defaults to `target`.",
151
+ "value": {
152
+ "kind": "expression"
153
+ }
154
+ },
155
+ {
156
+ "name": ".context",
157
+ "description": "Object with properties passed to `generator` and\n`shouldShow` functions for generating tooltip text\nor detecting whether to show the tooltip or not.",
158
+ "value": {
159
+ "kind": "expression"
160
+ }
161
+ },
162
+ {
163
+ "name": ".focusDelay",
164
+ "description": "The delay in milliseconds before the tooltip\nis opened on keyboard focus, when not in manual mode.",
165
+ "value": {
166
+ "kind": "expression"
167
+ }
168
+ },
169
+ {
170
+ "name": ".for",
171
+ "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.",
172
+ "value": {
173
+ "kind": "expression"
174
+ }
112
175
  },
113
176
  {
114
177
  "name": ".generator",
@@ -116,6 +179,48 @@
116
179
  "value": {
117
180
  "kind": "expression"
118
181
  }
182
+ },
183
+ {
184
+ "name": ".hideDelay",
185
+ "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.",
186
+ "value": {
187
+ "kind": "expression"
188
+ }
189
+ },
190
+ {
191
+ "name": ".hoverDelay",
192
+ "description": "The delay in milliseconds before the tooltip\nis opened on hover, when not in manual mode.",
193
+ "value": {
194
+ "kind": "expression"
195
+ }
196
+ },
197
+ {
198
+ "name": ".position",
199
+ "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`.",
200
+ "value": {
201
+ "kind": "expression"
202
+ }
203
+ },
204
+ {
205
+ "name": ".shouldShow",
206
+ "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`.",
207
+ "value": {
208
+ "kind": "expression"
209
+ }
210
+ },
211
+ {
212
+ "name": ".target",
213
+ "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`.",
214
+ "value": {
215
+ "kind": "expression"
216
+ }
217
+ },
218
+ {
219
+ "name": ".text",
220
+ "description": "String used as a tooltip content.",
221
+ "value": {
222
+ "kind": "expression"
223
+ }
119
224
  }
120
225
  ]
121
226
  }