@aquera/nile-elements 1.2.7-beta-1.0 → 1.2.7-beta-1.1
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 +253 -25
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +6 -6
- package/dist/nile-light-tooltip/index.cjs.js +1 -1
- package/dist/nile-light-tooltip/index.esm.js +1 -1
- package/dist/nile-light-tooltip/nile-light-tooltip.cjs.js +1 -1
- package/dist/nile-light-tooltip/nile-light-tooltip.cjs.js.map +1 -1
- package/dist/nile-light-tooltip/nile-light-tooltip.esm.js +1 -1
- package/dist/nile-light-tooltip/utils.cjs.js +2 -0
- package/dist/nile-light-tooltip/utils.cjs.js.map +1 -0
- package/dist/nile-light-tooltip/utils.esm.js +1 -0
- package/dist/src/nile-light-tooltip/nile-light-tooltip.d.ts +37 -16
- package/dist/src/nile-light-tooltip/nile-light-tooltip.js +221 -48
- package/dist/src/nile-light-tooltip/nile-light-tooltip.js.map +1 -1
- package/dist/src/nile-light-tooltip/utils.d.ts +2 -0
- package/dist/src/nile-light-tooltip/utils.js +29 -0
- package/dist/src/nile-light-tooltip/utils.js.map +1 -0
- package/dist/src/version.js +1 -1
- package/dist/src/version.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/nile-light-tooltip/nile-light-tooltip.ts +246 -56
- package/src/nile-light-tooltip/utils.ts +33 -0
- package/vscode-html-custom-data.json +106 -8
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Webcomponent nile-elements following open-wc recommendations",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "nile-elements",
|
|
6
|
-
"version": "1.2.7-beta-1.
|
|
6
|
+
"version": "1.2.7-beta-1.1",
|
|
7
7
|
"main": "dist/src/index.js",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"module": "dist/src/index.js",
|
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright Aquera Inc 2025
|
|
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 { html, CSSResultArray, TemplateResult, PropertyValues } from 'lit';
|
|
9
1
|
import { customElement, property } from 'lit/decorators.js';
|
|
2
|
+
import { CSSResultArray, PropertyValues } from 'lit';
|
|
10
3
|
import { styles } from './nile-light-tooltip.css';
|
|
11
4
|
import NileElement from '../internal/nile-element';
|
|
12
|
-
import tippy, { Instance, Props } from 'tippy.js';
|
|
5
|
+
import tippy, { Instance, Props, followCursor, roundArrow } from 'tippy.js';
|
|
6
|
+
import { parseFollowCursor, parseDuration } from './utils';
|
|
13
7
|
|
|
14
8
|
/**
|
|
15
9
|
* Nile light-tooltip component.
|
|
10
|
+
*
|
|
11
|
+
* Supports wrapper and sibling (for) modes.
|
|
12
|
+
* Aligns with Tippy.js props and Nile design system.
|
|
16
13
|
*
|
|
17
14
|
* @tag nile-light-tooltip
|
|
18
15
|
*/
|
|
@@ -23,84 +20,277 @@ export class NileLightTooltip extends NileElement {
|
|
|
23
20
|
}
|
|
24
21
|
|
|
25
22
|
protected createRenderRoot() {
|
|
26
|
-
|
|
27
|
-
return this;
|
|
23
|
+
return this; // Light DOM
|
|
28
24
|
}
|
|
29
25
|
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
// ───────────── Props ─────────────
|
|
27
|
+
/** ID of the target element (for sibling mode) */
|
|
28
|
+
@property({ type: String, attribute: 'for' }) for: string | null = null;
|
|
29
|
+
|
|
30
|
+
/** Tooltip content text or HTML */
|
|
31
|
+
@property({ type: String, reflect: true }) content = '';
|
|
32
|
+
|
|
33
|
+
/** Tooltip size (applies CSS class) */
|
|
34
|
+
@property({ type: String, reflect: true }) size: 'small' | 'large' = 'small';
|
|
35
|
+
|
|
36
|
+
/** Animation duration for show/hide (ms). Can be a single value or [show, hide]. */
|
|
37
|
+
@property({ type: String, reflect: true }) duration: string | number | [number, number] = 200;
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
/** Placement of the tooltip */
|
|
42
|
+
@property({ type: String })
|
|
43
|
+
placement:
|
|
44
|
+
| 'top'
|
|
45
|
+
| 'top-start'
|
|
46
|
+
| 'top-end'
|
|
47
|
+
| 'right'
|
|
48
|
+
| 'right-start'
|
|
49
|
+
| 'right-end'
|
|
50
|
+
| 'bottom'
|
|
51
|
+
| 'bottom-start'
|
|
52
|
+
| 'bottom-end'
|
|
53
|
+
| 'left'
|
|
54
|
+
| 'left-start'
|
|
55
|
+
| 'left-end'
|
|
56
|
+
| 'auto'
|
|
57
|
+
| 'auto-start'
|
|
58
|
+
| 'auto-end' = 'top';
|
|
59
|
+
|
|
60
|
+
/** Disabled state */
|
|
61
|
+
@property({ type: Boolean }) disabled = false;
|
|
62
|
+
|
|
63
|
+
/** Distance (Popper offset Y or main axis) */
|
|
64
|
+
@property({ type: Number }) distance = 8;
|
|
32
65
|
|
|
33
|
-
/**
|
|
34
|
-
@property({ type:
|
|
66
|
+
/** Skidding (Popper offset X or cross axis) */
|
|
67
|
+
@property({ type: Number }) skidding = 0;
|
|
35
68
|
|
|
36
|
-
/** Whether tooltip
|
|
69
|
+
/** Whether tooltip is open (controlled mode) */
|
|
70
|
+
@property({ type: Boolean, reflect: true }) open = false;
|
|
71
|
+
|
|
72
|
+
/** Trigger behavior */
|
|
37
73
|
@property({ type: String }) trigger: Props['trigger'] = 'mouseenter focus';
|
|
38
74
|
|
|
39
|
-
|
|
75
|
+
/** Hoist the tooltip to body (avoid clipping) */
|
|
76
|
+
@property({ type: Boolean, reflect: true }) hoist = false;
|
|
77
|
+
|
|
78
|
+
/** Allow HTML content rendering */
|
|
79
|
+
@property({ type: Boolean, reflect: true }) allowHTML = false;
|
|
80
|
+
|
|
81
|
+
/** Cursor following mode */
|
|
82
|
+
@property({ type: String, reflect: true, attribute: true })
|
|
83
|
+
followCursor:
|
|
84
|
+
| boolean
|
|
85
|
+
| 'initial'
|
|
86
|
+
| 'horizontal'
|
|
87
|
+
| 'vertical'
|
|
88
|
+
| 'true'
|
|
89
|
+
| 'false' = false;
|
|
90
|
+
|
|
91
|
+
/** Arrow type for tooltip */
|
|
92
|
+
@property({ type: String, reflect: true, attribute: true })
|
|
93
|
+
arrow: 'default' | 'round' | 'large' | 'small' | 'wide' | 'narrow' | 'none' =
|
|
94
|
+
'default';
|
|
95
|
+
|
|
96
|
+
private tooltipInstances?: Instance[];
|
|
97
|
+
private singleInstance?: Instance;
|
|
98
|
+
private targetEl?: HTMLElement | null;
|
|
99
|
+
private generatedId?: string;
|
|
100
|
+
private prevDescribedby?: string | null;
|
|
40
101
|
|
|
41
102
|
constructor() {
|
|
42
103
|
super();
|
|
43
104
|
this.injectTippyStyles();
|
|
44
105
|
}
|
|
45
106
|
|
|
46
|
-
|
|
47
|
-
* Injects Tippy.js base styles into the Light DOM (document.head)
|
|
48
|
-
* if not already present.
|
|
49
|
-
*/
|
|
107
|
+
// Inject custom styles for tooltips
|
|
50
108
|
private injectTippyStyles(): void {
|
|
51
|
-
const STYLE_ID = 'nile-
|
|
52
|
-
if (document.getElementById(STYLE_ID)) return;
|
|
109
|
+
const STYLE_ID = 'nile-light-tooltip-styles';
|
|
110
|
+
if (document.getElementById(STYLE_ID)) return;
|
|
53
111
|
|
|
54
112
|
const style = document.createElement('style');
|
|
55
113
|
style.id = STYLE_ID;
|
|
56
114
|
style.textContent = `
|
|
57
|
-
.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}
|
|
58
|
-
[data-tippy-root]{max-width:calc(100vw - 10px)}
|
|
59
|
-
.tippy-box{
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
115
|
+
.tippy-box[data-animation=fade][data-state=hidden] { opacity: 0; }
|
|
116
|
+
[data-tippy-root] { max-width: calc(100vw - 10px); }
|
|
117
|
+
.tippy-box {
|
|
118
|
+
position: relative;
|
|
119
|
+
background-color: #333;
|
|
120
|
+
color: #fff;
|
|
121
|
+
border-radius: 4px;
|
|
122
|
+
font-size: 14px;
|
|
123
|
+
line-height: 1.4;
|
|
124
|
+
white-space: normal;
|
|
125
|
+
outline: 0;
|
|
126
|
+
transition-property: transform, visibility, opacity;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/* Placement-specific arrows */
|
|
130
|
+
.tippy-box[data-placement^=top] > .tippy-arrow { bottom: 0; }
|
|
131
|
+
.tippy-box[data-placement^=top] > .tippy-arrow:before {
|
|
132
|
+
bottom: -7px;
|
|
133
|
+
border-width: 8px 8px 0;
|
|
134
|
+
border-top-color: initial;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.tippy-box[data-placement^=bottom] > .tippy-arrow { top: 0; }
|
|
138
|
+
.tippy-box[data-placement^=bottom] > .tippy-arrow:before {
|
|
139
|
+
top: -7px;
|
|
140
|
+
border-width: 0 8px 8px;
|
|
141
|
+
border-bottom-color: initial;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.tippy-box[data-placement^=left] > .tippy-arrow { right: 0; }
|
|
145
|
+
.tippy-box[data-placement^=left] > .tippy-arrow:before {
|
|
146
|
+
right: -7px;
|
|
147
|
+
border-width: 8px 0 8px 8px;
|
|
148
|
+
border-left-color: initial;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.tippy-box[data-placement^=right] > .tippy-arrow { left: 0; }
|
|
152
|
+
.tippy-box[data-placement^=right] > .tippy-arrow:before {
|
|
153
|
+
left: -7px;
|
|
154
|
+
border-width: 8px 8px 8px 0;
|
|
155
|
+
border-right-color: initial;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.tippy-box[data-inertia][data-state=visible] {
|
|
159
|
+
transition-timing-function: cubic-bezier(.54, 1.5, .38, 1.11);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.tippy-box.large { font-size: 16px; padding: 8px 12px; }
|
|
163
|
+
.tippy-arrow { width: 16px; height: 16px; color: #333; }
|
|
164
|
+
.tippy-arrow:before {
|
|
165
|
+
content: "";
|
|
166
|
+
position: absolute;
|
|
167
|
+
border-color: transparent;
|
|
168
|
+
border-style: solid;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.tippy-content {
|
|
172
|
+
position: relative;
|
|
173
|
+
padding: 5px 9px;
|
|
174
|
+
z-index: 1;
|
|
175
|
+
}
|
|
176
|
+
.tippy-box[data-placement^=top]>.tippy-svg-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-svg-arrow:after,.tippy-box[data-placement^=top]>.tippy-svg-arrow>svg{top:16px;transform:rotate(180deg)}.tippy-box[data-placement^=bottom]>.tippy-svg-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-svg-arrow>svg{bottom:16px}.tippy-box[data-placement^=left]>.tippy-svg-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-svg-arrow:after,.tippy-box[data-placement^=left]>.tippy-svg-arrow>svg{transform:rotate(90deg);top:calc(50% - 3px);left:11px}.tippy-box[data-placement^=right]>.tippy-svg-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-svg-arrow:after,.tippy-box[data-placement^=right]>.tippy-svg-arrow>svg{transform:rotate(-90deg);top:calc(50% - 3px);right:11px}.tippy-svg-arrow{width:16px;height:16px;fill:#333;text-align:initial}.tippy-svg-arrow,.tippy-svg-arrow>svg{position:absolute}
|
|
72
177
|
`;
|
|
73
178
|
document.head.appendChild(style);
|
|
74
179
|
}
|
|
75
180
|
|
|
76
181
|
firstUpdated(): void {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
182
|
+
this.attachTooltip();
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
private attachTooltip(): void {
|
|
189
|
+
this.destroyTooltips();
|
|
190
|
+
if (this.disabled) return;
|
|
191
|
+
|
|
192
|
+
const options: Partial<Props> = {
|
|
193
|
+
content: this.content,
|
|
194
|
+
placement: this.placement,
|
|
195
|
+
trigger: this.trigger,
|
|
196
|
+
offset: [this.skidding, this.distance],
|
|
197
|
+
theme: 'light',
|
|
198
|
+
animation: 'fade',
|
|
199
|
+
duration: parseDuration(this.duration),
|
|
200
|
+
allowHTML: this.allowHTML,
|
|
201
|
+
appendTo: this.hoist ? document.body : undefined,
|
|
202
|
+
followCursor: parseFollowCursor(this.followCursor),
|
|
203
|
+
plugins: parseFollowCursor(this.followCursor) ? [followCursor] : [],
|
|
204
|
+
arrow: roundArrow,
|
|
205
|
+
onShow: instance => { this.open = true; return undefined; },
|
|
206
|
+
onHide: instance => { this.open = false; return undefined; }
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
// Sibling mode
|
|
210
|
+
if (this.for) {
|
|
211
|
+
this.targetEl = document.getElementById(this.for);
|
|
212
|
+
if (!this.targetEl) return;
|
|
213
|
+
|
|
214
|
+
if (!this.id) {
|
|
215
|
+
this.generatedId = `nile-tooltip-${Math.random().toString(36).slice(2, 9)}`;
|
|
216
|
+
this.id = this.generatedId;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
this.prevDescribedby = this.targetEl.getAttribute('aria-describedby');
|
|
220
|
+
const describedby = this.prevDescribedby
|
|
221
|
+
? `${this.prevDescribedby} ${this.id}`
|
|
222
|
+
: this.id;
|
|
223
|
+
this.targetEl.setAttribute('aria-describedby', describedby);
|
|
224
|
+
|
|
225
|
+
this.singleInstance = tippy(this.targetEl, options);
|
|
226
|
+
if (this.size)
|
|
227
|
+
this.singleInstance.popper
|
|
228
|
+
.querySelector('.tippy-box')
|
|
229
|
+
?.classList.add(this.size);
|
|
230
|
+
if (this.open) {
|
|
231
|
+
queueMicrotask(() => this.singleInstance?.show());
|
|
232
|
+
}
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
// Wrapper mode
|
|
237
|
+
const children = this.querySelectorAll('*');
|
|
238
|
+
if (children.length > 0) {
|
|
239
|
+
this.tooltipInstances = tippy(children, options);
|
|
240
|
+
this.tooltipInstances.forEach(t =>
|
|
241
|
+
t.popper.querySelector('.tippy-box')?.classList.add(this.size)
|
|
242
|
+
);
|
|
243
|
+
if (this.open) this.tooltipInstances.forEach(t => t.show());
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
private destroyTooltips(): void {
|
|
248
|
+
this.tooltipInstances?.forEach(t => t.destroy());
|
|
249
|
+
this.singleInstance?.destroy();
|
|
250
|
+
this.tooltipInstances = undefined;
|
|
251
|
+
this.singleInstance = undefined;
|
|
252
|
+
|
|
253
|
+
if (this.targetEl && this.id) {
|
|
254
|
+
const current = this.targetEl
|
|
255
|
+
.getAttribute('aria-describedby')
|
|
256
|
+
?.split(' ')
|
|
257
|
+
.filter(id => id !== this.id)
|
|
258
|
+
.join(' ')
|
|
259
|
+
.trim();
|
|
260
|
+
if (current) {
|
|
261
|
+
this.targetEl.setAttribute('aria-describedby', current);
|
|
262
|
+
} else {
|
|
263
|
+
this.targetEl.removeAttribute('aria-describedby');
|
|
264
|
+
}
|
|
86
265
|
}
|
|
87
266
|
}
|
|
88
267
|
|
|
89
268
|
disconnectedCallback(): void {
|
|
90
269
|
super.disconnectedCallback();
|
|
91
|
-
this.
|
|
270
|
+
this.destroyTooltips();
|
|
92
271
|
}
|
|
93
272
|
|
|
94
|
-
updated(
|
|
95
|
-
super.updated(
|
|
96
|
-
|
|
97
|
-
|
|
273
|
+
updated(changed: PropertyValues): void {
|
|
274
|
+
super.updated(changed);
|
|
275
|
+
|
|
276
|
+
if (
|
|
277
|
+
['for', 'content', 'placement', 'distance', 'skidding', 'trigger', 'disabled', 'hoist', 'size', 'arrow']
|
|
278
|
+
.some(p => changed.has(p))
|
|
279
|
+
) {
|
|
280
|
+
this.attachTooltip();
|
|
98
281
|
}
|
|
99
|
-
|
|
100
|
-
}
|
|
101
|
-
|
|
102
282
|
|
|
103
|
-
|
|
283
|
+
// Controlled open/close
|
|
284
|
+
if (changed.has('open')) {
|
|
285
|
+
if (this.open) {
|
|
286
|
+
this.singleInstance?.show();
|
|
287
|
+
this.tooltipInstances?.forEach(t => t.show());
|
|
288
|
+
} else {
|
|
289
|
+
this.singleInstance?.hide();
|
|
290
|
+
this.tooltipInstances?.forEach(t => t.hide());
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
|
104
294
|
}
|
|
105
295
|
|
|
106
296
|
export default NileLightTooltip;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
|
|
2
|
+
export function parseFollowCursor(
|
|
3
|
+
value: boolean | 'initial' | 'horizontal' | 'vertical' | 'true' | 'false'
|
|
4
|
+
): boolean | 'initial' | 'horizontal' | 'vertical' {
|
|
5
|
+
if (value === true || value === 'true') return true;
|
|
6
|
+
if (value === false || value === 'false') return false;
|
|
7
|
+
if (['initial', 'horizontal', 'vertical'].includes(String(value))) {
|
|
8
|
+
return value as 'initial' | 'horizontal' | 'vertical';
|
|
9
|
+
}
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
export function parseDuration(
|
|
15
|
+
value: string | number | [number, number] | undefined
|
|
16
|
+
): number | [number, number] {
|
|
17
|
+
if (Array.isArray(value)) return value;
|
|
18
|
+
if (typeof value === 'number') return value;
|
|
19
|
+
|
|
20
|
+
if (typeof value === 'string') {
|
|
21
|
+
// Handle comma-separated (e.g. "200,100")
|
|
22
|
+
if (value.includes(',')) {
|
|
23
|
+
const parts = value.split(',').map(v => parseInt(v.trim(), 10));
|
|
24
|
+
return parts as [number, number];
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// Single numeric string
|
|
28
|
+
const num = parseInt(value, 10);
|
|
29
|
+
if (!isNaN(num)) return num;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return 200; // default fallback
|
|
33
|
+
}
|
|
@@ -2550,15 +2550,37 @@
|
|
|
2550
2550
|
},
|
|
2551
2551
|
{
|
|
2552
2552
|
"name": "nile-light-tooltip",
|
|
2553
|
-
"description": "Nile light-tooltip component.\n\nAttributes:\n\n * `content` {`string`} - Tooltip text
|
|
2553
|
+
"description": "Nile light-tooltip component.\n\nSupports wrapper and sibling (for) modes.\nAligns with Tippy.js props and Nile design system.\n\nAttributes:\n\n * `for` {`string | null`} - ID of the target element (for sibling mode)\n\n * `content` {`string`} - Tooltip content text or HTML\n\n * `size` {`\"small\" | \"large\"`} - Tooltip size (applies CSS class)\n\n * `duration` {`string | number | [number, number]`} - Animation duration for show/hide (ms). Can be a single value or [show, hide].\n\n * `placement` {`\"left\" | \"right\" | \"top\" | \"top-start\" | \"top-end\" | \"right-start\" | \"right-end\" | \"bottom\" | \"bottom-start\" | \"bottom-end\" | \"left-start\" | \"left-end\" | \"auto\" | \"auto-start\" | \"auto-end\"`} - Placement of the tooltip\n\n * `disabled` {`boolean`} - Disabled state\n\n * `distance` {`number`} - Distance (Popper offset Y or main axis)\n\n * `skidding` {`number`} - Skidding (Popper offset X or cross axis)\n\n * `open` {`boolean`} - Whether tooltip is open (controlled mode)\n\n * `trigger` {`string`} - Trigger behavior\n\n * `hoist` {`boolean`} - Hoist the tooltip to body (avoid clipping)\n\n * `allowHTML` {`boolean`} - Allow HTML content rendering\n\n * `followCursor` {`boolean | \"false\" | \"true\" | \"initial\" | \"horizontal\" | \"vertical\"`} - Cursor following mode\n\n * `arrow` {`\"small\" | \"none\" | \"large\" | \"narrow\" | \"default\" | \"round\" | \"wide\"`} - Arrow type for tooltip\n\nProperties:\n\n * `for` {`string | null`} - ID of the target element (for sibling mode)\n\n * `content` {`string`} - Tooltip content text or HTML\n\n * `size` {`\"small\" | \"large\"`} - Tooltip size (applies CSS class)\n\n * `duration` {`string | number | [number, number]`} - Animation duration for show/hide (ms). Can be a single value or [show, hide].\n\n * `placement` {`\"left\" | \"right\" | \"top\" | \"top-start\" | \"top-end\" | \"right-start\" | \"right-end\" | \"bottom\" | \"bottom-start\" | \"bottom-end\" | \"left-start\" | \"left-end\" | \"auto\" | \"auto-start\" | \"auto-end\"`} - Placement of the tooltip\n\n * `disabled` {`boolean`} - Disabled state\n\n * `distance` {`number`} - Distance (Popper offset Y or main axis)\n\n * `skidding` {`number`} - Skidding (Popper offset X or cross axis)\n\n * `open` {`boolean`} - Whether tooltip is open (controlled mode)\n\n * `trigger` {`string`} - Trigger behavior\n\n * `hoist` {`boolean`} - Hoist the tooltip to body (avoid clipping)\n\n * `allowHTML` {`boolean`} - Allow HTML content rendering\n\n * `followCursor` {`boolean | \"false\" | \"true\" | \"initial\" | \"horizontal\" | \"vertical\"`} - Cursor following mode\n\n * `arrow` {`\"small\" | \"none\" | \"large\" | \"narrow\" | \"default\" | \"round\" | \"wide\"`} - Arrow type for tooltip\n\n * `tooltipInstances` {`Instance<Props>[] | undefined`} - \n\n * `singleInstance` {`Instance<Props> | undefined`} - \n\n * `targetEl` {`HTMLElement | null | undefined`} - \n\n * `generatedId` {`string | undefined`} - \n\n * `prevDescribedby` {`string | null | undefined`} - \n\n * `BUBBLES` {`boolean`} - \n\n * `COMPOSED` {`boolean`} - \n\n * `CANCELABLE` {`boolean`} - ",
|
|
2554
2554
|
"attributes": [
|
|
2555
|
+
{
|
|
2556
|
+
"name": "for",
|
|
2557
|
+
"description": "`for` {`string | null`} - ID of the target element (for sibling mode)\n\nProperty: for\n\nDefault: null",
|
|
2558
|
+
"values": []
|
|
2559
|
+
},
|
|
2555
2560
|
{
|
|
2556
2561
|
"name": "content",
|
|
2557
|
-
"description": "`content` {`string`} - Tooltip text
|
|
2562
|
+
"description": "`content` {`string`} - Tooltip content text or HTML\n\nProperty: content\n\nDefault: "
|
|
2563
|
+
},
|
|
2564
|
+
{
|
|
2565
|
+
"name": "size",
|
|
2566
|
+
"description": "`size` {`\"small\" | \"large\"`} - Tooltip size (applies CSS class)\n\nProperty: size\n\nDefault: small",
|
|
2567
|
+
"values": [
|
|
2568
|
+
{
|
|
2569
|
+
"name": "small"
|
|
2570
|
+
},
|
|
2571
|
+
{
|
|
2572
|
+
"name": "large"
|
|
2573
|
+
}
|
|
2574
|
+
]
|
|
2575
|
+
},
|
|
2576
|
+
{
|
|
2577
|
+
"name": "duration",
|
|
2578
|
+
"description": "`duration` {`string | number | [number, number]`} - Animation duration for show/hide (ms). Can be a single value or [show, hide].\n\nProperty: duration\n\nDefault: 200",
|
|
2579
|
+
"values": []
|
|
2558
2580
|
},
|
|
2559
2581
|
{
|
|
2560
2582
|
"name": "placement",
|
|
2561
|
-
"description": "`placement` {
|
|
2583
|
+
"description": "`placement` {`\"left\" | \"right\" | \"top\" | \"top-start\" | \"top-end\" | \"right-start\" | \"right-end\" | \"bottom\" | \"bottom-start\" | \"bottom-end\" | \"left-start\" | \"left-end\" | \"auto\" | \"auto-start\" | \"auto-end\"`} - Placement of the tooltip\n\nProperty: placement\n\nDefault: top",
|
|
2562
2584
|
"values": [
|
|
2563
2585
|
{
|
|
2564
2586
|
"name": "left"
|
|
@@ -2607,9 +2629,85 @@
|
|
|
2607
2629
|
}
|
|
2608
2630
|
]
|
|
2609
2631
|
},
|
|
2632
|
+
{
|
|
2633
|
+
"name": "disabled",
|
|
2634
|
+
"description": "`disabled` {`boolean`} - Disabled state\n\nProperty: disabled\n\nDefault: false",
|
|
2635
|
+
"valueSet": "v"
|
|
2636
|
+
},
|
|
2637
|
+
{
|
|
2638
|
+
"name": "distance",
|
|
2639
|
+
"description": "`distance` {`number`} - Distance (Popper offset Y or main axis)\n\nProperty: distance\n\nDefault: 8"
|
|
2640
|
+
},
|
|
2641
|
+
{
|
|
2642
|
+
"name": "skidding",
|
|
2643
|
+
"description": "`skidding` {`number`} - Skidding (Popper offset X or cross axis)\n\nProperty: skidding\n\nDefault: 0"
|
|
2644
|
+
},
|
|
2645
|
+
{
|
|
2646
|
+
"name": "open",
|
|
2647
|
+
"description": "`open` {`boolean`} - Whether tooltip is open (controlled mode)\n\nProperty: open\n\nDefault: false",
|
|
2648
|
+
"valueSet": "v"
|
|
2649
|
+
},
|
|
2610
2650
|
{
|
|
2611
2651
|
"name": "trigger",
|
|
2612
|
-
"description": "`trigger` {`string`} -
|
|
2652
|
+
"description": "`trigger` {`string`} - Trigger behavior\n\nProperty: trigger\n\nDefault: mouseenter focus"
|
|
2653
|
+
},
|
|
2654
|
+
{
|
|
2655
|
+
"name": "hoist",
|
|
2656
|
+
"description": "`hoist` {`boolean`} - Hoist the tooltip to body (avoid clipping)\n\nProperty: hoist\n\nDefault: false",
|
|
2657
|
+
"valueSet": "v"
|
|
2658
|
+
},
|
|
2659
|
+
{
|
|
2660
|
+
"name": "allowHTML",
|
|
2661
|
+
"description": "`allowHTML` {`boolean`} - Allow HTML content rendering\n\nProperty: allowHTML\n\nDefault: false",
|
|
2662
|
+
"valueSet": "v"
|
|
2663
|
+
},
|
|
2664
|
+
{
|
|
2665
|
+
"name": "followCursor",
|
|
2666
|
+
"description": "`followCursor` {`boolean | \"false\" | \"true\" | \"initial\" | \"horizontal\" | \"vertical\"`} - Cursor following mode\n\nProperty: followCursor\n\nDefault: false",
|
|
2667
|
+
"values": [
|
|
2668
|
+
{
|
|
2669
|
+
"name": "false"
|
|
2670
|
+
},
|
|
2671
|
+
{
|
|
2672
|
+
"name": "true"
|
|
2673
|
+
},
|
|
2674
|
+
{
|
|
2675
|
+
"name": "initial"
|
|
2676
|
+
},
|
|
2677
|
+
{
|
|
2678
|
+
"name": "horizontal"
|
|
2679
|
+
},
|
|
2680
|
+
{
|
|
2681
|
+
"name": "vertical"
|
|
2682
|
+
}
|
|
2683
|
+
]
|
|
2684
|
+
},
|
|
2685
|
+
{
|
|
2686
|
+
"name": "arrow",
|
|
2687
|
+
"description": "`arrow` {`\"small\" | \"none\" | \"large\" | \"narrow\" | \"default\" | \"round\" | \"wide\"`} - Arrow type for tooltip\n\nProperty: arrow\n\nDefault: default",
|
|
2688
|
+
"values": [
|
|
2689
|
+
{
|
|
2690
|
+
"name": "small"
|
|
2691
|
+
},
|
|
2692
|
+
{
|
|
2693
|
+
"name": "none"
|
|
2694
|
+
},
|
|
2695
|
+
{
|
|
2696
|
+
"name": "large"
|
|
2697
|
+
},
|
|
2698
|
+
{
|
|
2699
|
+
"name": "narrow"
|
|
2700
|
+
},
|
|
2701
|
+
{
|
|
2702
|
+
"name": "default"
|
|
2703
|
+
},
|
|
2704
|
+
{
|
|
2705
|
+
"name": "round"
|
|
2706
|
+
},
|
|
2707
|
+
{
|
|
2708
|
+
"name": "wide"
|
|
2709
|
+
}
|
|
2710
|
+
]
|
|
2613
2711
|
}
|
|
2614
2712
|
]
|
|
2615
2713
|
},
|
|
@@ -2991,7 +3089,7 @@
|
|
|
2991
3089
|
},
|
|
2992
3090
|
{
|
|
2993
3091
|
"name": "nile-popup",
|
|
2994
|
-
"description": "Nile icon component.\n\nAttributes:\n\n * `anchor` {`string | Element`} - The element the popup will be anchored to. If the anchor lives outside of the popup, you can provide its `id` or a\nreference to it here. If the anchor lives inside the popup, use the `anchor` slot instead.\n\n * `active` {`boolean`} - Activates the positioning logic and shows the popup. When this attribute is removed, the positioning logic is torn\ndown and the popup will be hidden.\n\n * `placement` {`TooltipPosition`} - The preferred placement of the popup. Note that the actual placement will vary as configured to keep the\npanel inside of the viewport.\n\n * `strategy` {`\"absolute\" | \"fixed\"`} - Determines how the popup is positioned. The `absolute` strategy works well in most cases, but if overflow is\nclipped, using a `fixed` position strategy can often workaround it.\n\n * `distance` {`number`} - The distance in pixels from which to offset the panel away from its anchor.\n\n * `skidding` {`number`} - The distance in pixels from which to offset the panel along its anchor.\n\n * `arrow` {`boolean`} - Attaches an arrow to the popup. The arrow's size and color can be customized using the `--arrow-size` and\n`--arrow-color` custom properties. For additional customizations, you can also target the arrow using\n`::part(arrow)` in your stylesheet.\n\n * `arrow-placement` {`\"end\" | \"start\" | \"center\" | \"anchor\"`} - The placement of the arrow. The default is `anchor`, which will align the arrow as close to the center of the\nanchor as possible, considering available space and `arrow-padding`. A value of `start`, `end`, or `center` will\nalign the arrow to the start, end, or center of the popover instead.\n\n * `arrow-padding` {`number`} - The amount of padding between the arrow and the edges of the popup. If the popup has a border-radius, for example,\nthis will prevent it from overflowing the corners.\n\n * `flip` {`boolean`} - When set, placement of the popup will flip to the opposite site to keep it in view. You can use\n`flipFallbackPlacements` to further configure how the fallback placement is determined.\n\n * `flip-fallback-placements` {`string`} - If the preferred placement doesn't fit, popup will be tested in these fallback placements until one fits. Must be a\nstring of any number of placements separated by a space, e.g. \"top bottom left\". If no placement fits, the flip\nfallback strategy will be used instead.\n\n * `flip-fallback-strategy` {`\"
|
|
3092
|
+
"description": "Nile icon component.\n\nAttributes:\n\n * `anchor` {`string | Element`} - The element the popup will be anchored to. If the anchor lives outside of the popup, you can provide its `id` or a\nreference to it here. If the anchor lives inside the popup, use the `anchor` slot instead.\n\n * `active` {`boolean`} - Activates the positioning logic and shows the popup. When this attribute is removed, the positioning logic is torn\ndown and the popup will be hidden.\n\n * `placement` {`TooltipPosition`} - The preferred placement of the popup. Note that the actual placement will vary as configured to keep the\npanel inside of the viewport.\n\n * `strategy` {`\"absolute\" | \"fixed\"`} - Determines how the popup is positioned. The `absolute` strategy works well in most cases, but if overflow is\nclipped, using a `fixed` position strategy can often workaround it.\n\n * `distance` {`number`} - The distance in pixels from which to offset the panel away from its anchor.\n\n * `skidding` {`number`} - The distance in pixels from which to offset the panel along its anchor.\n\n * `arrow` {`boolean`} - Attaches an arrow to the popup. The arrow's size and color can be customized using the `--arrow-size` and\n`--arrow-color` custom properties. For additional customizations, you can also target the arrow using\n`::part(arrow)` in your stylesheet.\n\n * `arrow-placement` {`\"end\" | \"start\" | \"center\" | \"anchor\"`} - The placement of the arrow. The default is `anchor`, which will align the arrow as close to the center of the\nanchor as possible, considering available space and `arrow-padding`. A value of `start`, `end`, or `center` will\nalign the arrow to the start, end, or center of the popover instead.\n\n * `arrow-padding` {`number`} - The amount of padding between the arrow and the edges of the popup. If the popup has a border-radius, for example,\nthis will prevent it from overflowing the corners.\n\n * `flip` {`boolean`} - When set, placement of the popup will flip to the opposite site to keep it in view. You can use\n`flipFallbackPlacements` to further configure how the fallback placement is determined.\n\n * `flip-fallback-placements` {`string`} - If the preferred placement doesn't fit, popup will be tested in these fallback placements until one fits. Must be a\nstring of any number of placements separated by a space, e.g. \"top bottom left\". If no placement fits, the flip\nfallback strategy will be used instead.\n\n * `flip-fallback-strategy` {`\"initial\" | \"best-fit\"`} - When neither the preferred placement nor the fallback placements fit, this value will be used to determine whether\nthe popup should be positioned using the best available fit based on available space or as it was initially\npreferred.\n\n * `flipBoundary` {`Element | Element[]`} - The flip boundary describes clipping element(s) that overflow will be checked relative to when flipping. By\ndefault, the boundary includes overflow ancestors that will cause the element to be clipped. If needed, you can\nchange the boundary by passing a reference to one or more elements to this property.\n\n * `flip-padding` {`number`} - The amount of padding, in pixels, to exceed before the flip behavior will occur.\n\n * `shift` {`boolean`} - Moves the popup along the axis to keep it in view when clipped.\n\n * `shiftBoundary` {`Element | Element[]`} - The shift boundary describes clipping element(s) that overflow will be checked relative to when shifting. By\ndefault, the boundary includes overflow ancestors that will cause the element to be clipped. If needed, you can\nchange the boundary by passing a reference to one or more elements to this property.\n\n * `shift-padding` {`number`} - The amount of padding, in pixels, to exceed before the shift behavior will occur.\n\n * `auto-size` {`\"both\" | \"horizontal\" | \"vertical\"`} - When set, this will cause the popup to automatically resize itself to prevent it from overflowing.\n\n * `sync` {`\"width\" | \"height\" | \"both\"`} - Syncs the popup's width or height to that of the anchor element.\n\n * `autoSizeBoundary` {`Element | Element[]`} - The auto-size boundary describes clipping element(s) that overflow will be checked relative to when resizing. By\ndefault, the boundary includes overflow ancestors that will cause the element to be clipped. If needed, you can\nchange the boundary by passing a reference to one or more elements to this property.\n\n * `auto-size-padding` {`number`} - The amount of padding, in pixels, to exceed before the auto-size behavior will occur.\n\nProperties:\n\n * `styles` - \n\n * `anchorEl` {`Element | null`} - \n\n * `cleanup` - \n\n * `popup` {`HTMLElement`} - A reference to the internal popup container. Useful for animating and styling the popup with JavaScript.\n\n * `arrowEl` {`HTMLElement`} - \n\n * `anchor` {`string | Element`} - The element the popup will be anchored to. If the anchor lives outside of the popup, you can provide its `id` or a\nreference to it here. If the anchor lives inside the popup, use the `anchor` slot instead.\n\n * `active` {`boolean`} - Activates the positioning logic and shows the popup. When this attribute is removed, the positioning logic is torn\ndown and the popup will be hidden.\n\n * `placement` {`TooltipPosition`} - The preferred placement of the popup. Note that the actual placement will vary as configured to keep the\npanel inside of the viewport.\n\n * `strategy` {`\"absolute\" | \"fixed\"`} - Determines how the popup is positioned. The `absolute` strategy works well in most cases, but if overflow is\nclipped, using a `fixed` position strategy can often workaround it.\n\n * `distance` {`number`} - The distance in pixels from which to offset the panel away from its anchor.\n\n * `skidding` {`number`} - The distance in pixels from which to offset the panel along its anchor.\n\n * `arrow` {`boolean`} - Attaches an arrow to the popup. The arrow's size and color can be customized using the `--arrow-size` and\n`--arrow-color` custom properties. For additional customizations, you can also target the arrow using\n`::part(arrow)` in your stylesheet.\n\n * `arrowPlacement` {`\"end\" | \"start\" | \"center\" | \"anchor\"`} - The placement of the arrow. The default is `anchor`, which will align the arrow as close to the center of the\nanchor as possible, considering available space and `arrow-padding`. A value of `start`, `end`, or `center` will\nalign the arrow to the start, end, or center of the popover instead.\n\n * `arrowPadding` {`number`} - The amount of padding between the arrow and the edges of the popup. If the popup has a border-radius, for example,\nthis will prevent it from overflowing the corners.\n\n * `flip` {`boolean`} - When set, placement of the popup will flip to the opposite site to keep it in view. You can use\n`flipFallbackPlacements` to further configure how the fallback placement is determined.\n\n * `flipFallbackPlacements` {`string`} - If the preferred placement doesn't fit, popup will be tested in these fallback placements until one fits. Must be a\nstring of any number of placements separated by a space, e.g. \"top bottom left\". If no placement fits, the flip\nfallback strategy will be used instead.\n\n * `flipFallbackStrategy` {`\"initial\" | \"best-fit\"`} - When neither the preferred placement nor the fallback placements fit, this value will be used to determine whether\nthe popup should be positioned using the best available fit based on available space or as it was initially\npreferred.\n\n * `flipBoundary` {`Element | Element[]`} - The flip boundary describes clipping element(s) that overflow will be checked relative to when flipping. By\ndefault, the boundary includes overflow ancestors that will cause the element to be clipped. If needed, you can\nchange the boundary by passing a reference to one or more elements to this property.\n\n * `flipPadding` {`number`} - The amount of padding, in pixels, to exceed before the flip behavior will occur.\n\n * `shift` {`boolean`} - Moves the popup along the axis to keep it in view when clipped.\n\n * `shiftBoundary` {`Element | Element[]`} - The shift boundary describes clipping element(s) that overflow will be checked relative to when shifting. By\ndefault, the boundary includes overflow ancestors that will cause the element to be clipped. If needed, you can\nchange the boundary by passing a reference to one or more elements to this property.\n\n * `shiftPadding` {`number`} - The amount of padding, in pixels, to exceed before the shift behavior will occur.\n\n * `autoSize` {`\"both\" | \"horizontal\" | \"vertical\"`} - When set, this will cause the popup to automatically resize itself to prevent it from overflowing.\n\n * `sync` {`\"width\" | \"height\" | \"both\"`} - Syncs the popup's width or height to that of the anchor element.\n\n * `autoSizeBoundary` {`Element | Element[]`} - The auto-size boundary describes clipping element(s) that overflow will be checked relative to when resizing. By\ndefault, the boundary includes overflow ancestors that will cause the element to be clipped. If needed, you can\nchange the boundary by passing a reference to one or more elements to this property.\n\n * `autoSizePadding` {`number`} - The amount of padding, in pixels, to exceed before the auto-size behavior will occur.\n\n * `BUBBLES` {`boolean`} - \n\n * `COMPOSED` {`boolean`} - \n\n * `CANCELABLE` {`boolean`} - ",
|
|
2995
3093
|
"attributes": [
|
|
2996
3094
|
{
|
|
2997
3095
|
"name": "anchor",
|
|
@@ -3103,13 +3201,13 @@
|
|
|
3103
3201
|
},
|
|
3104
3202
|
{
|
|
3105
3203
|
"name": "flip-fallback-strategy",
|
|
3106
|
-
"description": "`flip-fallback-strategy` {`\"
|
|
3204
|
+
"description": "`flip-fallback-strategy` {`\"initial\" | \"best-fit\"`} - When neither the preferred placement nor the fallback placements fit, this value will be used to determine whether\nthe popup should be positioned using the best available fit based on available space or as it was initially\npreferred.\n\nProperty: flipFallbackStrategy\n\nDefault: best-fit",
|
|
3107
3205
|
"values": [
|
|
3108
3206
|
{
|
|
3109
|
-
"name": "
|
|
3207
|
+
"name": "initial"
|
|
3110
3208
|
},
|
|
3111
3209
|
{
|
|
3112
|
-
"name": "
|
|
3210
|
+
"name": "best-fit"
|
|
3113
3211
|
}
|
|
3114
3212
|
]
|
|
3115
3213
|
},
|