@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.
- package/demo/index.html +68 -9
- package/dist/internal/animate.cjs.js +1 -1
- package/dist/internal/animate.cjs.js.map +1 -1
- package/dist/internal/animate.esm.js +1 -1
- package/dist/nile-tooltip/index.cjs.js +1 -1
- package/dist/nile-tooltip/index.esm.js +1 -1
- package/dist/nile-tooltip/nile-tooltip.cjs.js +1 -1
- package/dist/nile-tooltip/nile-tooltip.cjs.js.map +1 -1
- package/dist/nile-tooltip/nile-tooltip.css.cjs.js +1 -1
- package/dist/nile-tooltip/nile-tooltip.css.cjs.js.map +1 -1
- package/dist/nile-tooltip/nile-tooltip.css.esm.js +115 -56
- package/dist/nile-tooltip/nile-tooltip.esm.js +13 -30
- package/dist/src/nile-tooltip/nile-tooltip.css.js +113 -54
- package/dist/src/nile-tooltip/nile-tooltip.css.js.map +1 -1
- package/dist/src/nile-tooltip/nile-tooltip.d.ts +22 -62
- package/dist/src/nile-tooltip/nile-tooltip.js +179 -244
- package/dist/src/nile-tooltip/nile-tooltip.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/nile-tooltip/nile-tooltip.css.ts +113 -54
- package/src/nile-tooltip/nile-tooltip.ts +204 -267
- package/vscode-html-custom-data.json +15 -15
@@ -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
|
-
|
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
|
-
|
49
|
-
|
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
|
-
|
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
|
-
|
99
|
-
|
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
|
-
|
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
|
-
|
121
|
-
|
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
|
-
|
130
|
-
|
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
|
138
|
-
|
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
|
144
|
-
|
145
|
-
|
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
|
154
|
-
if (this.
|
155
|
-
|
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
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
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
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
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
|
-
|
178
|
-
if (
|
179
|
-
|
180
|
-
|
181
|
-
)
|
182
|
-
|
183
|
-
|
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
|
-
|
188
|
-
|
189
|
-
|
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
|
-
|
200
|
-
|
149
|
+
|
150
|
+
finalPlacement = finalAlignment ? `${finalBasePlacement}-${finalAlignment}` : finalBasePlacement;
|
201
151
|
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
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
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
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
|
-
|
216
|
-
|
217
|
-
|
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
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
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
|
-
|
236
|
-
|
237
|
-
|
238
|
-
this.
|
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
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
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
|
-
|
253
|
-
|
254
|
-
|
255
|
-
return undefined;
|
228
|
+
private handleFocus = () => {
|
229
|
+
if (this.trigger.includes('focus')) {
|
230
|
+
this.showTooltip();
|
256
231
|
}
|
232
|
+
};
|
257
233
|
|
258
|
-
|
259
|
-
|
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
|
-
<
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
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": "
|
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`} -
|
3752
|
+
"description": "`content` {`string`} - \n\nProperty: content\n\nDefault: "
|
3753
3753
|
},
|
3754
3754
|
{
|
3755
3755
|
"name": "size",
|
3756
|
-
"description": "`size` {`\"small\" | \"large\"`} -
|
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\"`} -
|
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`} -
|
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`} -
|
3815
|
+
"description": "`open` {`boolean`} - \n\nProperty: open\n\nDefault: false",
|
3820
3816
|
"valueSet": "v"
|
3821
3817
|
},
|
3822
3818
|
{
|
3823
|
-
"name": "
|
3824
|
-
"description": "`
|
3819
|
+
"name": "trigger",
|
3820
|
+
"description": "`trigger` {`string`} - \n\nProperty: trigger\n\nDefault: hover focus"
|
3825
3821
|
},
|
3826
3822
|
{
|
3827
|
-
"name": "
|
3828
|
-
"description": "`
|
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`} -
|
3832
|
+
"description": "`hoist` {`boolean`} - \n\nProperty: hoist\n\nDefault: false",
|
3833
3833
|
"valueSet": "v"
|
3834
3834
|
}
|
3835
3835
|
]
|