@aquera/nile-elements 0.1.28-beta-1.4 → 0.1.28-beta-1.5

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.
@@ -1,324 +1,261 @@
1
- /**
2
- * Copyright Aquera Inc 2023
3
- *
4
- * This source code is licensed under the BSD-3-Clause license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
-
8
- import { LitElement, CSSResultArray, TemplateResult } from 'lit';
9
- import { styles } from './nile-tooltip.css';
10
- import '../nile-popup/nile-popup';
11
- import { animateTo, parseDuration, stopAnimations } from '../internal/animate';
12
- import { classMap } from 'lit/directives/class-map.js';
1
+ import { LitElement, html, css, CSSResultArray } from 'lit';
13
2
  import { customElement, property, query } from 'lit/decorators.js';
14
- import {
15
- getAnimation,
16
- setDefaultAnimation,
17
- } from '../utilities/animation-registry';
18
- import { html } from 'lit';
19
- // import { LocalizeController } from '../utilities/localize';
20
- import { waitForEvent } from '../internal/event';
21
- import { watch } from '../internal/watch';
3
+ import { classMap } from 'lit/directives/class-map.js';
4
+ import { styles } from './nile-tooltip.css';
22
5
  import NileElement from '../internal/nile-element';
23
- import type { CSSResultGroup } from 'lit';
24
- import type NilePopup from '../nile-popup/nile-popup';
25
- /**
26
- * Nile icon component.
27
- *
28
- * @tag nile-tooltip
29
- *
30
- */
31
- @customElement('nile-tooltip')
32
- export class NileTooltip extends NileElement {
33
- /**
34
- * The styles for Tooltip
35
- * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
36
- */
37
- public static get styles(): CSSResultArray {
38
- return [styles];
39
- }
40
-
41
- private hoverTimeout: number;
42
- // private readonly localize = new LocalizeController(this);
43
-
44
- @query('slot:not([name])') defaultSlot: HTMLSlotElement;
45
- @query('.tooltip__body') body: HTMLElement;
46
- @query('nile-popup') popup: NilePopup;
47
6
 
48
- /** The tooltip's content. If you need to display HTML, use the `content` slot instead. */
49
- @property({ type: String, reflect: true }) content = '';
7
+ type TooltipPlacement =
8
+ | 'top' | 'top-start' | 'top-end'
9
+ | 'right' | 'right-start' | 'right-end'
10
+ | 'bottom' | 'bottom-start' | 'bottom-end'
11
+ | 'left' | 'left-start' | 'left-end';
50
12
 
51
- /** Size Property to decide the tool tip size */
13
+ // CSS Anchor positiong
14
+ @customElement('nile-tooltip')
15
+ export class NileTooltip extends NileElement {
16
+ @property({ type: String }) content = '';
52
17
  @property({ reflect: true }) size: 'small' | 'large' = 'small';
53
-
54
- /**
55
- * The preferred placement of the tooltip. Note that the actual placement may vary as needed to keep the tooltip
56
- * inside of the viewport.
57
- */
58
- @property() placement:
59
- | 'top'
60
- | 'top-start'
61
- | 'top-end'
62
- | 'right'
63
- | 'right-start'
64
- | 'right-end'
65
- | 'bottom'
66
- | 'bottom-start'
67
- | 'bottom-end'
68
- | 'left'
69
- | 'left-start'
70
- | 'left-end' = 'top';
71
-
72
- /** Disables the tooltip so it won't show when triggered. */
18
+ @property({ type: String }) placement: TooltipPlacement = 'top';
73
19
  @property({ type: Boolean, reflect: true }) disabled = false;
74
-
75
- /** The distance in pixels from which to offset the tooltip away from its target. */
76
- @property({ type: Number }) distance = 8;
77
-
78
- /** Indicates whether or not the tooltip is open. You can use this in lieu of the show/hide methods. */
79
20
  @property({ type: Boolean, reflect: true }) open = false;
80
-
81
- /** The distance in pixels from which to offset the tooltip along its target. */
82
- @property({ type: Number }) skidding = 0;
83
-
84
- /**
85
- * Controls how the tooltip is activated. Possible options include `click`, `hover`, `focus`, and `manual`. Multiple
86
- * options can be passed by separating them with a space. When manual is used, the tooltip must be activated
87
- * programmatically.
88
- */
89
21
  @property() trigger = 'hover focus';
90
-
91
- /**
92
- * Enable this option to prevent the tooltip from being clipped when the component is placed inside a container with
93
- * `overflow: auto|hidden|scroll`. Hoisting uses a fixed positioning strategy that works in many, but not all,
94
- * scenarios.
95
- */
22
+ @property({ type: Number }) distance = 8;
23
+ @property({ type: Number }) skidding = 0;
96
24
  @property({ type: Boolean }) hoist = false;
97
25
 
98
- connectedCallback() {
99
- super.connectedCallback();
100
- this.handleBlur = this.handleBlur.bind(this);
101
- this.handleClick = this.handleClick.bind(this);
102
- this.handleFocus = this.handleFocus.bind(this);
103
- this.handleKeyDown = this.handleKeyDown.bind(this);
104
- this.handleMouseOver = this.handleMouseOver.bind(this);
105
- this.handleMouseOut = this.handleMouseOut.bind(this);
26
+ @query('.tooltip') tooltip!: HTMLElement;
27
+ @query('slot') slotElement!: HTMLSlotElement;
106
28
 
107
- this.updateComplete.then(() => {
108
- this.addEventListener('blur', this.handleBlur, true);
109
- this.addEventListener('focus', this.handleFocus, true);
110
- this.addEventListener('click', this.handleClick);
111
- this.addEventListener('keydown', this.handleKeyDown);
112
- this.addEventListener('mouseover', this.handleMouseOver);
113
- this.addEventListener('mouseout', this.handleMouseOut);
114
- });
115
- }
116
-
117
- firstUpdated() {
118
- this.body.hidden = !this.open;
29
+ private hoverTimeout: number;
119
30
 
120
- // If the tooltip is visible on init, update its position
121
- if (this.open) {
122
- this.popup.active = true;
123
- this.popup.reposition();
31
+ public static get styles(): CSSResultArray {
32
+ return [styles];
124
33
  }
34
+
35
+
36
+
37
+
38
+ connectedCallback() {
39
+ super.connectedCallback();
40
+ window.addEventListener('resize', this.updateTooltipPosition);
41
+ window.addEventListener('scroll', this.updateTooltipPosition, true);
125
42
  }
126
43
 
127
44
  disconnectedCallback() {
128
45
  super.disconnectedCallback();
129
- this.removeEventListener('blur', this.handleBlur, true);
130
- this.removeEventListener('focus', this.handleFocus, true);
131
- this.removeEventListener('click', this.handleClick);
132
- this.removeEventListener('keydown', this.handleKeyDown);
133
- this.removeEventListener('mouseover', this.handleMouseOver);
134
- this.removeEventListener('mouseout', this.handleMouseOut);
46
+ window.removeEventListener('resize', this.updateTooltipPosition);
47
+ window.removeEventListener('scroll', this.updateTooltipPosition, true);
135
48
  }
136
49
 
137
- private handleBlur() {
138
- if (this.hasTrigger('focus')) {
139
- this.hide();
140
- }
50
+ private getBasePlacement(placement: TooltipPlacement): 'top' | 'right' | 'bottom' | 'left' {
51
+ return placement.split('-')[0] as 'top' | 'right' | 'bottom' | 'left';
141
52
  }
142
53
 
143
- private handleClick() {
144
- if (this.hasTrigger('click')) {
145
- if (this.open) {
146
- this.hide();
147
- } else {
148
- this.show();
149
- }
150
- }
54
+ private getAlignmentModifier(placement: TooltipPlacement): 'start' | 'end' | null {
55
+ const parts = placement.split('-');
56
+ return parts.length > 1 ? parts[1] as 'start' | 'end' : null;
151
57
  }
152
58
 
153
- private handleFocus() {
154
- if (this.hasTrigger('focus')) {
155
- this.show();
59
+ private updateTooltipPosition = () => {
60
+ if (!this.tooltip || !this.open) return;
61
+
62
+ const triggerEl = this.slotElement.assignedElements()[0] as HTMLElement;
63
+ if (!triggerEl) return;
64
+
65
+
66
+
67
+ const triggerRect = triggerEl.getBoundingClientRect();
68
+ const tooltipRect = this.tooltip.getBoundingClientRect();
69
+ const viewportWidth = window.innerWidth;
70
+ const viewportHeight = window.innerHeight;
71
+
72
+ let top = 0, left = 0;
73
+ let finalPlacement = this.placement;
74
+ const basePlacement = this.getBasePlacement(this.placement);
75
+ const alignment = this.getAlignmentModifier(this.placement);
76
+
77
+
78
+ const fitsLeft = triggerRect.left - tooltipRect.width - this.distance > 0;
79
+ const fitsRight = triggerRect.right + tooltipRect.width + this.distance < viewportWidth;
80
+ const fitsBottom = triggerRect.bottom + tooltipRect.height + this.distance < viewportHeight;
81
+ const fitsTop = triggerRect.top - tooltipRect.height - this.distance > 0;
82
+
83
+
84
+ let finalBasePlacement = basePlacement;
85
+
86
+
87
+ if ((basePlacement === 'left' && !fitsLeft) || (basePlacement === 'right' && !fitsRight)) {
88
+ finalBasePlacement = fitsBottom ? 'bottom' : (fitsTop ? 'top' : 'bottom');
89
+ }
90
+
91
+ else if (basePlacement === 'top' && !fitsTop) {
92
+ finalBasePlacement = fitsBottom ? 'bottom' : (fitsLeft ? 'left' : 'right');
93
+ } else if (basePlacement === 'bottom' && !fitsBottom) {
94
+ finalBasePlacement = fitsTop ? 'top' : (fitsLeft ? 'left' : 'right');
156
95
  }
157
- }
158
96
 
159
- private handleKeyDown(event: KeyboardEvent) {
160
- // Pressing escape when the target element has focus should dismiss the tooltip
161
- if (this.open && event.key === 'Escape') {
162
- event.stopPropagation();
163
- this.hide();
97
+
98
+ let finalAlignment = alignment;
99
+
100
+
101
+ if ((basePlacement === 'left' || basePlacement === 'right') &&
102
+ (finalBasePlacement === 'top' || finalBasePlacement === 'bottom')) {
103
+
104
+ if (alignment === 'start') {
105
+ finalAlignment = 'start';
106
+ } else if (alignment === 'end') {
107
+ finalAlignment = 'end';
108
+ }
164
109
  }
165
- }
166
110
 
167
- private handleMouseOver() {
168
- if (this.hasTrigger('hover')) {
169
- const delay = parseDuration(
170
- getComputedStyle(this).getPropertyValue('--show-delay')
171
- );
172
- clearTimeout(this.hoverTimeout);
173
- this.hoverTimeout = window.setTimeout(() => this.show(), delay);
111
+
112
+ switch (finalBasePlacement) {
113
+ case 'left':
114
+ top = triggerRect.top + (triggerRect.height - tooltipRect.height) / 2 + this.skidding;
115
+ left = triggerRect.left - tooltipRect.width - this.distance;
116
+ break;
117
+ case 'right':
118
+ top = triggerRect.top + (triggerRect.height - tooltipRect.height) / 2 + this.skidding;
119
+ left = triggerRect.right + this.distance;
120
+ break;
121
+ case 'top':
122
+ top = triggerRect.top - tooltipRect.height - this.distance;
123
+ left = triggerRect.left + (triggerRect.width - tooltipRect.width) / 2 + this.skidding;
124
+ break;
125
+ case 'bottom':
126
+ top = triggerRect.bottom + this.distance;
127
+ left = triggerRect.left + (triggerRect.width - tooltipRect.width) / 2 + this.skidding;
128
+ break;
174
129
  }
175
- }
176
130
 
177
- private handleMouseOut() {
178
- if (this.hasTrigger('hover')) {
179
- const delay = parseDuration(
180
- getComputedStyle(this).getPropertyValue('--hide-delay')
181
- );
182
- clearTimeout(this.hoverTimeout);
183
- this.hoverTimeout = window.setTimeout(() => this.hide(), delay);
131
+
132
+ if ((finalBasePlacement === 'top' || finalBasePlacement === 'bottom') && finalAlignment) {
133
+ if (finalAlignment === 'start') {
134
+ left = triggerRect.left + this.skidding;
135
+ } else if (finalAlignment === 'end') {
136
+ left = triggerRect.right - tooltipRect.width + this.skidding;
137
+ }
184
138
  }
185
- }
186
-
187
- private hasTrigger(triggerType: string) {
188
- const triggers = this.trigger.split(' ');
189
- return triggers.includes(triggerType);
190
- }
191
-
192
- @watch('open', { waitUntilFirstUpdate: true })
193
- async handleOpenChange() {
194
- if (this.open) {
195
- if (this.disabled) {
196
- return;
139
+
140
+
141
+ if ((finalBasePlacement === 'left' || finalBasePlacement === 'right') && finalAlignment) {
142
+ if (finalAlignment === 'start') {
143
+ top = triggerRect.top + this.skidding;
144
+ } else if (finalAlignment === 'end') {
145
+ top = triggerRect.bottom - tooltipRect.height + this.skidding;
197
146
  }
147
+ }
198
148
 
199
- // Show
200
- this.emit('nile-show');
149
+
150
+ finalPlacement = finalAlignment ? `${finalBasePlacement}-${finalAlignment}` : finalBasePlacement;
201
151
 
202
- await stopAnimations(this.body);
203
- this.body.hidden = false;
204
- this.popup.active = true;
205
- const { keyframes, options } = getAnimation(this, 'tooltip.show', {
206
- dir: '',
207
- });
208
- await animateTo(this.popup.popup, keyframes, options);
152
+
153
+ if (left < 0) left = 5;
154
+ if (left + tooltipRect.width > viewportWidth) left = viewportWidth - tooltipRect.width - 5;
155
+ if (top < 0) top = 5;
156
+ if (top + tooltipRect.height > viewportHeight) top = viewportHeight - tooltipRect.height - 5;
209
157
 
210
- this.emit('nile-after-show');
211
- } else {
212
- // Hide
213
- this.emit('nile-hide');
158
+
159
+ this.tooltip.style.top = `${top}px`;
160
+ this.tooltip.style.left = `${left}px`;
161
+ this.tooltip.setAttribute('data-placement', finalPlacement as string);
162
+ };
214
163
 
215
- await stopAnimations(this.body);
216
- const { keyframes, options } = getAnimation(this, 'tooltip.hide', {
217
- dir: '',
164
+ private showTooltip = () => {
165
+ if (!this.disabled) {
166
+ this.open = true;
167
+ this.emit('nile-show');
168
+ this.updateComplete.then(() => {
169
+ this.updateTooltipPosition();
170
+
171
+
172
+ this.tooltip.addEventListener('transitionend', this.handleAfterShow, { once: true });
218
173
  });
219
- await animateTo(this.popup.popup, keyframes, options);
220
- this.popup.active = false;
221
- this.body.hidden = true;
222
-
223
- this.emit('nile-after-hide');
224
174
  }
225
- }
226
-
227
- @watch(['content', 'distance', 'hoist', 'placement', 'skidding'])
228
- async handleOptionsChange() {
229
- if (this.hasUpdated) {
230
- await this.updateComplete;
231
- this.popup.reposition();
175
+ };
176
+
177
+ private handleAfterShow = () => {
178
+ this.emit('nile-after-show');
179
+ };
180
+
181
+
182
+ private hideTooltip = () => {
183
+ if (!this.open) return;
184
+
185
+ this.emit('nile-hide');
186
+ this.open = false;
187
+
188
+ this.tooltip.addEventListener('transitionend', this.handleAfterHide, { once: true });
189
+ };
190
+
191
+ private handleAfterHide = () => {
192
+ this.emit('nile-after-hide');
193
+ };
194
+
195
+ private handleMouseOver = () => {
196
+ if (this.trigger.includes('hover')) {
197
+ clearTimeout(this.hoverTimeout);
198
+ this.hoverTimeout = window.setTimeout(() => this.showTooltip(), 150);
232
199
  }
233
- }
200
+ };
234
201
 
235
- @watch('disabled')
236
- handleDisabledChange() {
237
- if (this.disabled && this.open) {
238
- this.hide();
202
+ private handleMouseOut = () => {
203
+ if (this.trigger.includes('hover')) {
204
+ clearTimeout(this.hoverTimeout);
205
+ this.hoverTimeout = window.setTimeout(() => this.hideTooltip(), 0);
239
206
  }
240
- }
207
+ };
241
208
 
242
- /** Shows the tooltip. */
243
- async show() {
244
- if (this.open || !this.content?.trim().length) {
245
- return undefined;
209
+ private handleClick = () => {
210
+ if (this.trigger.includes('click')) {
211
+ this.open = !this.open;
212
+ this.emit('nile-show');
213
+ this.updateComplete.then(() => this.updateTooltipPosition());
214
+ }
215
+ };
216
+
217
+ updated(changedProperties: Map<string, any>) {
218
+ super.updated(changedProperties);
219
+
220
+
221
+ if (changedProperties.has('open') || changedProperties.has('hoist')) {
222
+ if (this.open && this.hoist) {
223
+
224
+ }
246
225
  }
247
-
248
- this.open = true;
249
- return waitForEvent(this, 'nile-after-show');
250
226
  }
251
227
 
252
- /** Hides the tooltip */
253
- async hide() {
254
- if (!this.open) {
255
- return undefined;
228
+ private handleFocus = () => {
229
+ if (this.trigger.includes('focus')) {
230
+ this.showTooltip();
256
231
  }
232
+ };
257
233
 
258
- this.open = false;
259
- return waitForEvent(this, 'nile-after-hide');
260
- }
234
+ private handleBlur = () => {
235
+ if (this.trigger.includes('focus')) {
236
+ this.hideTooltip();
237
+ }
238
+ };
261
239
 
262
240
  render() {
263
241
  return html`
264
- <nile-popup
265
- part="base"
266
- exportparts="
267
- popup:base__popup,
268
- arrow:base__arrow
269
- "
270
- class=${classMap({
271
- tooltip: true,
272
- 'tooltip--open': this.open,
273
- })}
274
- placement=${this.placement}
275
- distance=${this.distance}
276
- skidding=${this.skidding}
277
- strategy=${this.hoist ? 'fixed' : 'absolute'}
278
- flip
279
- shift
280
- arrow
281
- >
282
- <slot slot="anchor" aria-describedby="tooltip"></slot>
283
-
284
- <slot
285
- name="content"
286
- part="body"
287
- id="tooltip"
288
- class=${classMap({
289
- tooltip__body: true,
290
- 'tooltip__body--large': this.size === 'large',
291
- })}
292
- role="tooltip"
293
- aria-live=${this.open ? 'polite' : 'off'}
294
- >
295
- ${this.content}
296
- </slot>
297
- </nile-popup>
242
+ <div class=${classMap({ tooltip: true, 'tooltip__body--large': this.size === 'large' })}>
243
+ ${this.content}
244
+ </div>
245
+ <slot
246
+ @mouseover=${this.handleMouseOver}
247
+ @mouseout=${this.handleMouseOut}
248
+ @click=${this.handleClick}
249
+ @focus=${this.handleFocus}
250
+ @blur=${this.handleBlur}
251
+ aria-describedby="tooltip"
252
+ ></slot>
298
253
  `;
299
254
  }
300
255
  }
301
256
 
302
- setDefaultAnimation('tooltip.show', {
303
- keyframes: [
304
- { opacity: 0, scale: 0.8 },
305
- { opacity: 1, scale: 1 },
306
- ],
307
- options: { duration: 150, easing: 'ease' },
308
- });
309
-
310
- setDefaultAnimation('tooltip.hide', {
311
- keyframes: [
312
- { opacity: 1, scale: 1 },
313
- { opacity: 0, scale: 0.8 },
314
- ],
315
- options: { duration: 150, easing: 'ease' },
316
- });
317
-
318
- export default NileTooltip;
319
-
320
257
  declare global {
321
258
  interface HTMLElementTagNameMap {
322
259
  'nile-tooltip': NileTooltip;
323
260
  }
324
- }
261
+ }
@@ -3745,15 +3745,15 @@
3745
3745
  },
3746
3746
  {
3747
3747
  "name": "nile-tooltip",
3748
- "description": "Nile icon component.\n\nAttributes:\n\n * `content` {`string`} - The tooltip's content. If you need to display HTML, use the `content` slot instead.\n\n * `size` {`\"small\" | \"large\"`} - Size Property to decide the tool tip size\n\n * `placement` {`\"left\" | \"right\" | \"top\" | \"bottom\" | \"top-start\" | \"top-end\" | \"bottom-start\" | \"bottom-end\" | \"right-start\" | \"right-end\" | \"left-start\" | \"left-end\"`} - The preferred placement of the tooltip. Note that the actual placement may vary as needed to keep the tooltip\ninside of the viewport.\n\n * `disabled` {`boolean`} - Disables the tooltip so it won't show when triggered.\n\n * `distance` {`number`} - The distance in pixels from which to offset the tooltip away from its target.\n\n * `open` {`boolean`} - Indicates whether or not the tooltip is open. You can use this in lieu of the show/hide methods.\n\n * `skidding` {`number`} - The distance in pixels from which to offset the tooltip along its target.\n\n * `trigger` {`string`} - Controls how the tooltip is activated. Possible options include `click`, `hover`, `focus`, and `manual`. Multiple\noptions can be passed by separating them with a space. When manual is used, the tooltip must be activated\nprogrammatically.\n\n * `hoist` {`boolean`} - Enable this option to prevent the tooltip from being clipped when the component is placed inside a container with\n`overflow: auto|hidden|scroll`. Hoisting uses a fixed positioning strategy that works in many, but not all,\nscenarios.\n\nProperties:\n\n * `hoverTimeout` {`number`} - \n\n * `defaultSlot` {`HTMLSlotElement`} - \n\n * `body` {`HTMLElement`} - \n\n * `popup` - \n\n * `content` {`string`} - The tooltip's content. If you need to display HTML, use the `content` slot instead.\n\n * `size` {`\"small\" | \"large\"`} - Size Property to decide the tool tip size\n\n * `placement` {`\"left\" | \"right\" | \"top\" | \"bottom\" | \"top-start\" | \"top-end\" | \"bottom-start\" | \"bottom-end\" | \"right-start\" | \"right-end\" | \"left-start\" | \"left-end\"`} - The preferred placement of the tooltip. Note that the actual placement may vary as needed to keep the tooltip\ninside of the viewport.\n\n * `disabled` {`boolean`} - Disables the tooltip so it won't show when triggered.\n\n * `distance` {`number`} - The distance in pixels from which to offset the tooltip away from its target.\n\n * `open` {`boolean`} - Indicates whether or not the tooltip is open. You can use this in lieu of the show/hide methods.\n\n * `skidding` {`number`} - The distance in pixels from which to offset the tooltip along its target.\n\n * `trigger` {`string`} - Controls how the tooltip is activated. Possible options include `click`, `hover`, `focus`, and `manual`. Multiple\noptions can be passed by separating them with a space. When manual is used, the tooltip must be activated\nprogrammatically.\n\n * `hoist` {`boolean`} - Enable this option to prevent the tooltip from being clipped when the component is placed inside a container with\n`overflow: auto|hidden|scroll`. Hoisting uses a fixed positioning strategy that works in many, but not all,\nscenarios.\n\n * `BUBBLES` {`boolean`} - \n\n * `COMPOSED` {`boolean`} - \n\n * `CANCELABLE` {`boolean`} - ",
3748
+ "description": "Attributes:\n\n * `content` {`string`} - \n\n * `size` {`\"small\" | \"large\"`} - \n\n * `placement` {`\"left\" | \"right\" | \"top\" | \"bottom\" | \"top-start\" | \"top-end\" | \"bottom-start\" | \"bottom-end\" | \"right-start\" | \"right-end\" | \"left-start\" | \"left-end\"`} - \n\n * `disabled` {`boolean`} - \n\n * `open` {`boolean`} - \n\n * `trigger` {`string`} - \n\n * `distance` {`number`} - \n\n * `skidding` {`number`} - \n\n * `hoist` {`boolean`} - \n\nProperties:\n\n * `content` {`string`} - \n\n * `size` {`\"small\" | \"large\"`} - \n\n * `placement` {`\"left\" | \"right\" | \"top\" | \"bottom\" | \"top-start\" | \"top-end\" | \"bottom-start\" | \"bottom-end\" | \"right-start\" | \"right-end\" | \"left-start\" | \"left-end\"`} - \n\n * `disabled` {`boolean`} - \n\n * `open` {`boolean`} - \n\n * `trigger` {`string`} - \n\n * `distance` {`number`} - \n\n * `skidding` {`number`} - \n\n * `hoist` {`boolean`} - \n\n * `tooltip` {`HTMLElement`} - \n\n * `slotElement` {`HTMLSlotElement`} - \n\n * `hoverTimeout` {`number`} - \n\n * `updateTooltipPosition` - \n\n * `showTooltip` - \n\n * `handleAfterShow` - \n\n * `hideTooltip` - \n\n * `handleAfterHide` - \n\n * `handleMouseOver` - \n\n * `handleMouseOut` - \n\n * `handleClick` - \n\n * `handleFocus` - \n\n * `handleBlur` - \n\n * `BUBBLES` {`boolean`} - \n\n * `COMPOSED` {`boolean`} - \n\n * `CANCELABLE` {`boolean`} - ",
3749
3749
  "attributes": [
3750
3750
  {
3751
3751
  "name": "content",
3752
- "description": "`content` {`string`} - The tooltip's content. If you need to display HTML, use the `content` slot instead.\n\nProperty: content\n\nDefault: "
3752
+ "description": "`content` {`string`} - \n\nProperty: content\n\nDefault: "
3753
3753
  },
3754
3754
  {
3755
3755
  "name": "size",
3756
- "description": "`size` {`\"small\" | \"large\"`} - Size Property to decide the tool tip size\n\nProperty: size\n\nDefault: small",
3756
+ "description": "`size` {`\"small\" | \"large\"`} - \n\nProperty: size\n\nDefault: small",
3757
3757
  "values": [
3758
3758
  {
3759
3759
  "name": "small"
@@ -3765,7 +3765,7 @@
3765
3765
  },
3766
3766
  {
3767
3767
  "name": "placement",
3768
- "description": "`placement` {`\"left\" | \"right\" | \"top\" | \"bottom\" | \"top-start\" | \"top-end\" | \"bottom-start\" | \"bottom-end\" | \"right-start\" | \"right-end\" | \"left-start\" | \"left-end\"`} - The preferred placement of the tooltip. Note that the actual placement may vary as needed to keep the tooltip\ninside of the viewport.\n\nProperty: placement\n\nDefault: top",
3768
+ "description": "`placement` {`\"left\" | \"right\" | \"top\" | \"bottom\" | \"top-start\" | \"top-end\" | \"bottom-start\" | \"bottom-end\" | \"right-start\" | \"right-end\" | \"left-start\" | \"left-end\"`} - \n\nProperty: placement\n\nDefault: top",
3769
3769
  "values": [
3770
3770
  {
3771
3771
  "name": "left"
@@ -3807,29 +3807,29 @@
3807
3807
  },
3808
3808
  {
3809
3809
  "name": "disabled",
3810
- "description": "`disabled` {`boolean`} - Disables the tooltip so it won't show when triggered.\n\nProperty: disabled\n\nDefault: false",
3810
+ "description": "`disabled` {`boolean`} - \n\nProperty: disabled\n\nDefault: false",
3811
3811
  "valueSet": "v"
3812
3812
  },
3813
- {
3814
- "name": "distance",
3815
- "description": "`distance` {`number`} - The distance in pixels from which to offset the tooltip away from its target.\n\nProperty: distance\n\nDefault: 8"
3816
- },
3817
3813
  {
3818
3814
  "name": "open",
3819
- "description": "`open` {`boolean`} - Indicates whether or not the tooltip is open. You can use this in lieu of the show/hide methods.\n\nProperty: open\n\nDefault: false",
3815
+ "description": "`open` {`boolean`} - \n\nProperty: open\n\nDefault: false",
3820
3816
  "valueSet": "v"
3821
3817
  },
3822
3818
  {
3823
- "name": "skidding",
3824
- "description": "`skidding` {`number`} - The distance in pixels from which to offset the tooltip along its target.\n\nProperty: skidding\n\nDefault: 0"
3819
+ "name": "trigger",
3820
+ "description": "`trigger` {`string`} - \n\nProperty: trigger\n\nDefault: hover focus"
3825
3821
  },
3826
3822
  {
3827
- "name": "trigger",
3828
- "description": "`trigger` {`string`} - Controls how the tooltip is activated. Possible options include `click`, `hover`, `focus`, and `manual`. Multiple\noptions can be passed by separating them with a space. When manual is used, the tooltip must be activated\nprogrammatically.\n\nProperty: trigger\n\nDefault: hover focus"
3823
+ "name": "distance",
3824
+ "description": "`distance` {`number`} - \n\nProperty: distance\n\nDefault: 8"
3825
+ },
3826
+ {
3827
+ "name": "skidding",
3828
+ "description": "`skidding` {`number`} - \n\nProperty: skidding\n\nDefault: 0"
3829
3829
  },
3830
3830
  {
3831
3831
  "name": "hoist",
3832
- "description": "`hoist` {`boolean`} - Enable this option to prevent the tooltip from being clipped when the component is placed inside a container with\n`overflow: auto|hidden|scroll`. Hoisting uses a fixed positioning strategy that works in many, but not all,\nscenarios.\n\nProperty: hoist\n\nDefault: false",
3832
+ "description": "`hoist` {`boolean`} - \n\nProperty: hoist\n\nDefault: false",
3833
3833
  "valueSet": "v"
3834
3834
  }
3835
3835
  ]