@aquera/nile-elements 1.4.8-beta-1.0 → 1.4.8-beta-1.2
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/README.md +4 -0
- package/demo/index.html +133 -33
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +98 -71
- package/dist/nile-file-preview/nile-file-preview.css.cjs.js +1 -1
- package/dist/nile-file-preview/nile-file-preview.css.cjs.js.map +1 -1
- package/dist/nile-file-preview/nile-file-preview.css.esm.js +7 -3
- package/dist/nile-file-preview/nile-file-preview.template.cjs.js +1 -1
- package/dist/nile-file-preview/nile-file-preview.template.cjs.js.map +1 -1
- package/dist/nile-file-preview/nile-file-preview.template.esm.js +73 -64
- package/dist/nile-lite-tooltip/nile-lite-tooltip.cjs.js +1 -1
- package/dist/nile-lite-tooltip/nile-lite-tooltip.cjs.js.map +1 -1
- package/dist/nile-lite-tooltip/nile-lite-tooltip.esm.js +1 -1
- package/dist/nile-option/nile-option.cjs.js +1 -1
- package/dist/nile-option/nile-option.cjs.js.map +1 -1
- package/dist/nile-option/nile-option.css.cjs.js +1 -1
- package/dist/nile-option/nile-option.css.cjs.js.map +1 -1
- package/dist/nile-option/nile-option.css.esm.js +10 -0
- package/dist/nile-option/nile-option.esm.js +10 -7
- package/dist/nile-side-bar-action/index.cjs.js +1 -1
- package/dist/nile-side-bar-action/index.esm.js +1 -1
- package/dist/nile-side-bar-action/nile-side-bar-action.cjs.js +1 -1
- package/dist/nile-side-bar-action/nile-side-bar-action.cjs.js.map +1 -1
- package/dist/nile-side-bar-action/nile-side-bar-action.esm.js +4 -3
- package/dist/nile-side-bar-action/portal-manager.cjs.js +2 -0
- package/dist/nile-side-bar-action/portal-manager.cjs.js.map +1 -0
- package/dist/nile-side-bar-action/portal-manager.esm.js +1 -0
- package/dist/nile-side-bar-action/portal-utils.cjs.js +2 -0
- package/dist/nile-side-bar-action/portal-utils.cjs.js.map +1 -0
- package/dist/nile-side-bar-action/portal-utils.esm.js +1 -0
- package/dist/src/nile-file-preview/nile-file-preview.css.js +7 -3
- package/dist/src/nile-file-preview/nile-file-preview.css.js.map +1 -1
- package/dist/src/nile-file-preview/nile-file-preview.template.js +46 -37
- package/dist/src/nile-file-preview/nile-file-preview.template.js.map +1 -1
- package/dist/src/nile-lite-tooltip/nile-lite-tooltip.d.ts +2 -0
- package/dist/src/nile-lite-tooltip/nile-lite-tooltip.js +15 -0
- package/dist/src/nile-lite-tooltip/nile-lite-tooltip.js.map +1 -1
- package/dist/src/nile-option/nile-option.css.js +10 -0
- package/dist/src/nile-option/nile-option.css.js.map +1 -1
- package/dist/src/nile-option/nile-option.d.ts +1 -0
- package/dist/src/nile-option/nile-option.js +13 -5
- package/dist/src/nile-option/nile-option.js.map +1 -1
- package/dist/src/nile-side-bar-action/nile-side-bar-action.d.ts +8 -1
- package/dist/src/nile-side-bar-action/nile-side-bar-action.js +66 -12
- package/dist/src/nile-side-bar-action/nile-side-bar-action.js.map +1 -1
- package/dist/src/nile-side-bar-action/portal-manager.d.ts +43 -0
- package/dist/src/nile-side-bar-action/portal-manager.js +374 -0
- package/dist/src/nile-side-bar-action/portal-manager.js.map +1 -0
- package/dist/src/nile-side-bar-action/portal-utils.d.ts +32 -0
- package/dist/src/nile-side-bar-action/portal-utils.js +212 -0
- package/dist/src/nile-side-bar-action/portal-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-file-preview/nile-file-preview.css.ts +7 -3
- package/src/nile-file-preview/nile-file-preview.template.ts +46 -37
- package/src/nile-lite-tooltip/nile-lite-tooltip.ts +15 -0
- package/src/nile-option/nile-option.css.ts +10 -0
- package/src/nile-option/nile-option.ts +11 -5
- package/src/nile-side-bar-action/nile-side-bar-action.ts +74 -15
- package/src/nile-side-bar-action/portal-manager.ts +489 -0
- package/src/nile-side-bar-action/portal-utils.ts +270 -0
- package/vscode-html-custom-data.json +22 -3
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type Placement,
|
|
3
|
+
type MiddlewareData
|
|
4
|
+
} from '@floating-ui/dom';
|
|
5
|
+
|
|
6
|
+
export class PortalUtils {
|
|
7
|
+
static calculateAvailableSpace(referenceElement: HTMLElement): {
|
|
8
|
+
spaceAbove: number;
|
|
9
|
+
spaceBelow: number;
|
|
10
|
+
spaceLeft: number;
|
|
11
|
+
spaceRight: number;
|
|
12
|
+
viewportHeight: number;
|
|
13
|
+
viewportWidth: number;
|
|
14
|
+
} {
|
|
15
|
+
const rect = referenceElement.getBoundingClientRect();
|
|
16
|
+
const viewportHeight = window.innerHeight;
|
|
17
|
+
const viewportWidth = window.innerWidth;
|
|
18
|
+
const spaceBelow = viewportHeight - rect.bottom;
|
|
19
|
+
const spaceAbove = rect.top;
|
|
20
|
+
const spaceRight = viewportWidth - rect.right;
|
|
21
|
+
const spaceLeft = rect.left;
|
|
22
|
+
|
|
23
|
+
return { spaceAbove, spaceBelow, spaceLeft, spaceRight, viewportHeight, viewportWidth };
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
static getOptimalPlacement(referenceElement: HTMLElement): Placement {
|
|
27
|
+
const { spaceAbove, spaceBelow, spaceLeft, spaceRight } = this.calculateAvailableSpace(referenceElement);
|
|
28
|
+
|
|
29
|
+
if (spaceBelow >= 200 && spaceBelow >= spaceAbove) {
|
|
30
|
+
return 'bottom';
|
|
31
|
+
} else if (spaceAbove >= 200 && spaceAbove > spaceBelow) {
|
|
32
|
+
return 'top';
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
if (spaceRight >= 200 && spaceRight >= spaceLeft) {
|
|
36
|
+
return 'right';
|
|
37
|
+
} else if (spaceLeft >= 200) {
|
|
38
|
+
return 'left';
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return 'bottom';
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
static findBoundaryElements(component: HTMLElement): Element[] | undefined {
|
|
45
|
+
const boundaryElements: Element[] = [];
|
|
46
|
+
|
|
47
|
+
let currentElement = component.parentElement;
|
|
48
|
+
|
|
49
|
+
while (currentElement && currentElement !== document.body) {
|
|
50
|
+
const computedStyle = window.getComputedStyle(currentElement);
|
|
51
|
+
const overflow = computedStyle.overflow;
|
|
52
|
+
const overflowY = computedStyle.overflowY;
|
|
53
|
+
const overflowX = computedStyle.overflowX;
|
|
54
|
+
|
|
55
|
+
if (overflow === 'auto' || overflow === 'scroll' ||
|
|
56
|
+
overflowY === 'auto' || overflowY === 'scroll' ||
|
|
57
|
+
overflowX === 'auto' || overflowX === 'scroll') {
|
|
58
|
+
boundaryElements.push(currentElement);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
if (currentElement.hasAttribute('data-floating-boundary') ||
|
|
62
|
+
currentElement.classList.contains('floating-boundary') ||
|
|
63
|
+
currentElement.classList.contains('scroll-container')) {
|
|
64
|
+
boundaryElements.push(currentElement);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
currentElement = currentElement.parentElement;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return boundaryElements.length > 0 ? boundaryElements : undefined;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
static calculateOptimalHeight(
|
|
74
|
+
referenceRect: { x: number; y: number; width: number; height: number },
|
|
75
|
+
viewportHeight: number,
|
|
76
|
+
placement: Placement
|
|
77
|
+
): number {
|
|
78
|
+
const spaceBelow = viewportHeight - (referenceRect.y + referenceRect.height);
|
|
79
|
+
const spaceAbove = referenceRect.y;
|
|
80
|
+
|
|
81
|
+
if (placement.startsWith('top')) {
|
|
82
|
+
return Math.max(spaceAbove - 20, 100);
|
|
83
|
+
} else if (placement.startsWith('bottom')) {
|
|
84
|
+
return Math.max(spaceBelow - 20, 100);
|
|
85
|
+
} else if (placement.startsWith('left') || placement.startsWith('right')) {
|
|
86
|
+
return Math.max(Math.min(spaceAbove, spaceBelow) - 20, 100);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
return Math.max(Math.min(spaceAbove, spaceBelow) - 20, 100);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
static extractStylesAsCSS(styles: any): string {
|
|
93
|
+
if (typeof styles === 'string') {
|
|
94
|
+
return styles;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
if (Array.isArray(styles)) {
|
|
98
|
+
return styles.map(style => this.extractStylesAsCSS(style)).join('\n');
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
if (styles && typeof styles === 'object' && styles.cssText) {
|
|
102
|
+
return styles.cssText;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
return '';
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
static generateStyleId(): string {
|
|
109
|
+
return `nile-dropdown-styles-${Math.random().toString(36).substring(2, 11)}`;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
static isPositioningOptimal(
|
|
113
|
+
placement: Placement,
|
|
114
|
+
referenceElement: HTMLElement
|
|
115
|
+
): boolean {
|
|
116
|
+
const { spaceAbove, spaceBelow, spaceLeft, spaceRight } = this.calculateAvailableSpace(referenceElement);
|
|
117
|
+
|
|
118
|
+
const isAbove = placement.startsWith('top');
|
|
119
|
+
const isBelow = placement.startsWith('bottom');
|
|
120
|
+
const isLeft = placement.startsWith('left');
|
|
121
|
+
const isRight = placement.startsWith('right');
|
|
122
|
+
|
|
123
|
+
if (isAbove && spaceBelow > spaceAbove) return false;
|
|
124
|
+
if (isBelow && spaceAbove > spaceBelow) return false;
|
|
125
|
+
if (isLeft && spaceRight > spaceLeft) return false;
|
|
126
|
+
if (isRight && spaceLeft > spaceRight) return false;
|
|
127
|
+
|
|
128
|
+
return true;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
static applyCollisionData(
|
|
132
|
+
element: HTMLElement,
|
|
133
|
+
middlewareData: MiddlewareData,
|
|
134
|
+
placement: Placement
|
|
135
|
+
): void {
|
|
136
|
+
if (middlewareData.flip) {
|
|
137
|
+
const { overflows } = middlewareData.flip;
|
|
138
|
+
|
|
139
|
+
element.setAttribute('data-placement', placement);
|
|
140
|
+
|
|
141
|
+
if (overflows && overflows.length > 0) {
|
|
142
|
+
const overflowPlacements = overflows.map(overflow => overflow.placement).join(',');
|
|
143
|
+
element.setAttribute('data-overflow', overflowPlacements);
|
|
144
|
+
} else {
|
|
145
|
+
element.removeAttribute('data-overflow');
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
if (middlewareData.shift) {
|
|
150
|
+
const { x, y } = middlewareData.shift;
|
|
151
|
+
|
|
152
|
+
if (x !== undefined && y !== undefined && (x !== 0 || y !== 0)) {
|
|
153
|
+
element.setAttribute('data-shift', `${x},${y}`);
|
|
154
|
+
} else {
|
|
155
|
+
element.removeAttribute('data-shift');
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
if (middlewareData.size) {
|
|
160
|
+
const { availableWidth, availableHeight } = middlewareData.size;
|
|
161
|
+
|
|
162
|
+
if (availableWidth !== undefined) {
|
|
163
|
+
element.setAttribute('data-available-width', availableWidth.toString());
|
|
164
|
+
}
|
|
165
|
+
if (availableHeight !== undefined) {
|
|
166
|
+
element.setAttribute('data-available-height', availableHeight.toString());
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export class PortalContentUtils {
|
|
173
|
+
static createPortalPanel(component: any): HTMLElement {
|
|
174
|
+
// Find the panel slot content (typically a nile-menu)
|
|
175
|
+
const panelSlot = component.shadowRoot?.querySelector('.dropdown__panel') as HTMLSlotElement;
|
|
176
|
+
if (!panelSlot) {
|
|
177
|
+
// Fallback: try to find in light DOM
|
|
178
|
+
const slot = component.querySelector('[slot]');
|
|
179
|
+
if (!slot || slot.getAttribute('slot') === 'trigger') {
|
|
180
|
+
return document.createElement('div');
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// Get assigned elements from the slot
|
|
185
|
+
let assignedElements: Element[] = panelSlot?.assignedElements({ flatten: true }) as Element[] || [];
|
|
186
|
+
|
|
187
|
+
// If no assigned elements, try direct children that aren't in trigger slot
|
|
188
|
+
if (assignedElements.length === 0) {
|
|
189
|
+
const children = Array.from(component.children) as Element[];
|
|
190
|
+
assignedElements = children.filter(child => {
|
|
191
|
+
const slot = child.getAttribute('slot');
|
|
192
|
+
return !slot || slot !== 'trigger';
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
// Create a container for the cloned panel
|
|
197
|
+
const panelContainer = document.createElement('div');
|
|
198
|
+
panelContainer.className = 'dropdown__panel';
|
|
199
|
+
panelContainer.setAttribute('part', 'panel');
|
|
200
|
+
panelContainer.setAttribute('aria-hidden', 'false');
|
|
201
|
+
panelContainer.setAttribute('aria-labelledby', 'dropdown');
|
|
202
|
+
|
|
203
|
+
// Clone all assigned elements
|
|
204
|
+
assignedElements.forEach((element: Element) => {
|
|
205
|
+
const clonedElement = element.cloneNode(true) as HTMLElement;
|
|
206
|
+
panelContainer.appendChild(clonedElement);
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
return panelContainer;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
static updatePortalPanel(clonedPanel: HTMLElement, component: any): void {
|
|
213
|
+
if (!clonedPanel) return;
|
|
214
|
+
|
|
215
|
+
// Clear existing content
|
|
216
|
+
clonedPanel.innerHTML = '';
|
|
217
|
+
|
|
218
|
+
// Re-clone the panel content
|
|
219
|
+
const panelSlot = component.shadowRoot?.querySelector('.dropdown__panel') as HTMLSlotElement;
|
|
220
|
+
let assignedElements: Element[] = panelSlot?.assignedElements({ flatten: true }) as Element[] || [];
|
|
221
|
+
|
|
222
|
+
if (assignedElements.length === 0) {
|
|
223
|
+
const children = Array.from(component.children) as Element[];
|
|
224
|
+
assignedElements = children.filter(child => {
|
|
225
|
+
const slot = child.getAttribute('slot');
|
|
226
|
+
return !slot || slot !== 'trigger';
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
assignedElements.forEach((element: Element) => {
|
|
231
|
+
const clonedElement = element.cloneNode(true) as HTMLElement;
|
|
232
|
+
clonedPanel.appendChild(clonedElement);
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
export class PortalEventUtils {
|
|
238
|
+
static setupPortalEventListeners(clonedPanel: HTMLElement, component: any): void {
|
|
239
|
+
if (!clonedPanel) return;
|
|
240
|
+
|
|
241
|
+
this.setupMenuSelectListeners(clonedPanel, component);
|
|
242
|
+
this.setupKeyDownListeners(clonedPanel, component);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
static setupMenuSelectListeners(clonedPanel: HTMLElement, component: any): void {
|
|
246
|
+
if (!clonedPanel) return;
|
|
247
|
+
|
|
248
|
+
// Listen for nile-select events from menu items
|
|
249
|
+
clonedPanel.addEventListener('nile-select', (event: Event) => {
|
|
250
|
+
const customEvent = event as CustomEvent;
|
|
251
|
+
// Forward the event to the original component
|
|
252
|
+
if (component.handlePanelSelect) {
|
|
253
|
+
component.handlePanelSelect(customEvent);
|
|
254
|
+
}
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
static setupKeyDownListeners(clonedPanel: HTMLElement, component: any): void {
|
|
259
|
+
if (!clonedPanel) return;
|
|
260
|
+
|
|
261
|
+
// Listen for keydown events (like Escape)
|
|
262
|
+
clonedPanel.addEventListener('keydown', (event: KeyboardEvent) => {
|
|
263
|
+
if (component.handleKeyDown) {
|
|
264
|
+
component.handleKeyDown(event);
|
|
265
|
+
}
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
|
|
@@ -2861,7 +2861,7 @@
|
|
|
2861
2861
|
},
|
|
2862
2862
|
{
|
|
2863
2863
|
"name": "nile-lite-tooltip",
|
|
2864
|
-
"description": "Nile lite-tooltip component.\n\nSupports wrapper, sibling (for), and singleton modes.\nAligns with Tippy.js props and Nile design system.\n\nEvents:\n\n * `nile-show` {`CustomEvent<{ instance: Instance<Props>; target: ReferenceElement<Props>; }>`} - \n\n * `nile-toggle` {`CustomEvent<{ open: boolean; instance: Instance<Props>; target: ReferenceElement<Props>; }>`} - \n\n * `nile-hide` {`CustomEvent<{ instance: Instance<Props>; target: ReferenceElement<Props>; }>`} - \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 * `interactive` {`boolean`} - Interactive mode\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`} - \n\n * `distance` {`number`} - \n\n * `skidding` {`number`} - \n\n * `open` {`boolean`} - \n\n * `trigger` {`string`} - \n\n * `allowHTML` {`boolean`} - \n\n * `followCursor` {`boolean | \"false\" | \"true\" | \"initial\" | \"horizontal\" | \"vertical\"`} - \n\n * `arrow` {`\"small\" | \"none\" | \"default\" | \"large\" | \"narrow\" | \"round\" | \"wide\"`} - \n\n * `singleton` {`boolean`} - \n\n * `enableRecursiveMode` {`boolean`} - \n\n * `delay` {`number | [number, number]`} - Not added in Doc\n\n * `maxWidth` {`string | number`} - \n\n * `zIndex` {`number`} - \n\n * `hideOnClick` {`boolean | \"toggle\"`} - \n\n * `inertia` {`boolean`} - \n\n * `interactiveBorder` {`number`} - \n\n * `enableVisibilityEffect` {`boolean`} - \n\n * `enableTabClose` {`boolean`} - \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 * `interactive` {`boolean`} - Interactive mode\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`} - \n\n * `distance` {`number`} - \n\n * `skidding` {`number`} - \n\n * `open` {`boolean`} - \n\n * `trigger` {`string`} - \n\n * `allowHTML` {`boolean`} - \n\n * `followCursor` {`boolean | \"false\" | \"true\" | \"initial\" | \"horizontal\" | \"vertical\"`} - \n\n * `arrow` {`\"small\" | \"none\" | \"default\" | \"large\" | \"narrow\" | \"round\" | \"wide\"`} - \n\n * `singleton` {`boolean`} - \n\n * `enableRecursiveMode` {`boolean`} - \n\n * `delay` {`number | [number, number]`} - Not added in Doc\n\n * `maxWidth` {`string | number`} - \n\n * `zIndex` {`number`} - \n\n * `hideOnClick` {`boolean | \"toggle\"`} - \n\n * `inertia` {`boolean`} - \n\n * `interactiveBorder` {`number`} - \n\n * `visibilityManager` - \n\n * `enableVisibilityEffect` {`boolean`} - \n\n * `enableTabClose` {`boolean`} - \n\n * `tooltipInstances` {`Instance<Props>[] | undefined`} - \n\n * `singleInstance` {`Instance<Props> | undefined`} - \n\n * `singletonInstance` {`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`} - ",
|
|
2864
|
+
"description": "Nile lite-tooltip component.\n\nSupports wrapper, sibling (for), and singleton modes.\nAligns with Tippy.js props and Nile design system.\n\nEvents:\n\n * `nile-show` {`CustomEvent<{ instance: Instance<Props>; target: ReferenceElement<Props>; }>`} - \n\n * `nile-toggle` {`CustomEvent<{ open: boolean; instance: Instance<Props>; target: ReferenceElement<Props>; }>`} - \n\n * `nile-hide` {`CustomEvent<{ instance: Instance<Props>; target: ReferenceElement<Props>; }>`} - \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 * `interactive` {`boolean`} - Interactive mode\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`} - \n\n * `distance` {`number`} - \n\n * `skidding` {`number`} - \n\n * `open` {`boolean`} - \n\n * `trigger` {`string`} - \n\n * `allowHTML` {`boolean`} - \n\n * `followCursor` {`boolean | \"false\" | \"true\" | \"initial\" | \"horizontal\" | \"vertical\"`} - \n\n * `arrow` {`\"small\" | \"none\" | \"default\" | \"large\" | \"narrow\" | \"round\" | \"wide\"`} - \n\n * `singleton` {`boolean`} - \n\n * `enableRecursiveMode` {`boolean`} - \n\n * `delay` {`number | [number, number]`} - Not added in Doc\n\n * `maxWidth` {`string | number`} - \n\n * `zIndex` {`number`} - \n\n * `hideOnClick` {`boolean | \"toggle\"`} - \n\n * `inertia` {`boolean`} - \n\n * `interactiveBorder` {`number`} - \n\n * `enableVisibilityEffect` {`boolean`} - \n\n * `enableTabClose` {`boolean`} - \n\n * `width` {`string | undefined`} - \n\n * `height` {`string | undefined`} - \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 * `interactive` {`boolean`} - Interactive mode\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`} - \n\n * `distance` {`number`} - \n\n * `skidding` {`number`} - \n\n * `open` {`boolean`} - \n\n * `trigger` {`string`} - \n\n * `allowHTML` {`boolean`} - \n\n * `followCursor` {`boolean | \"false\" | \"true\" | \"initial\" | \"horizontal\" | \"vertical\"`} - \n\n * `arrow` {`\"small\" | \"none\" | \"default\" | \"large\" | \"narrow\" | \"round\" | \"wide\"`} - \n\n * `singleton` {`boolean`} - \n\n * `enableRecursiveMode` {`boolean`} - \n\n * `delay` {`number | [number, number]`} - Not added in Doc\n\n * `maxWidth` {`string | number`} - \n\n * `zIndex` {`number`} - \n\n * `hideOnClick` {`boolean | \"toggle\"`} - \n\n * `inertia` {`boolean`} - \n\n * `interactiveBorder` {`number`} - \n\n * `visibilityManager` - \n\n * `enableVisibilityEffect` {`boolean`} - \n\n * `enableTabClose` {`boolean`} - \n\n * `width` {`string | undefined`} - \n\n * `height` {`string | undefined`} - \n\n * `tooltipInstances` {`Instance<Props>[] | undefined`} - \n\n * `singleInstance` {`Instance<Props> | undefined`} - \n\n * `singletonInstance` {`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`} - ",
|
|
2865
2865
|
"attributes": [
|
|
2866
2866
|
{
|
|
2867
2867
|
"name": "for",
|
|
@@ -3072,6 +3072,16 @@
|
|
|
3072
3072
|
"description": "`enableTabClose` {`boolean`} - \n\nProperty: enableTabClose\n\nDefault: false",
|
|
3073
3073
|
"valueSet": "v"
|
|
3074
3074
|
},
|
|
3075
|
+
{
|
|
3076
|
+
"name": "width",
|
|
3077
|
+
"description": "`width` {`string | undefined`} - \n\nProperty: width",
|
|
3078
|
+
"values": []
|
|
3079
|
+
},
|
|
3080
|
+
{
|
|
3081
|
+
"name": "height",
|
|
3082
|
+
"description": "`height` {`string | undefined`} - \n\nProperty: height",
|
|
3083
|
+
"values": []
|
|
3084
|
+
},
|
|
3075
3085
|
{
|
|
3076
3086
|
"name": "onnile-show",
|
|
3077
3087
|
"description": "`nile-show` {`CustomEvent<{ instance: Instance<Props>; target: ReferenceElement<Props>; }>`} - "
|
|
@@ -3231,7 +3241,7 @@
|
|
|
3231
3241
|
},
|
|
3232
3242
|
{
|
|
3233
3243
|
"name": "nile-option",
|
|
3234
|
-
"description": "Slots:\n\n * ` ` {} - The option's label.\n\n * `prefix` {} - Used to prepend an icon or similar element to the menu item.\n\n * `suffix` {} - Used to append an icon or similar element to the menu item.\n\nAttributes:\n\n * `hidden` {`boolean`} - \n\n * `value` {`string`} - The option's value. When selected, the containing form control will receive this value. The value must be unique\nfrom other options in the same group. Values may not contain spaces, as spaces are used as delimiters when listing\nmultiple values.\n\n * `showCheckbox` {`boolean`} - \n\n * `disabled` {`boolean`} - Draws the option in a disabled state, preventing selection.\n\n * `selected` {`boolean`} - Indicates whether the option is selected.\n\n * `groupName` {`string`} - \n\nProperties:\n\n * `styles` - \n\n * `cachedTextLabel` {`string`} - \n\n * `defaultSlot` {`HTMLSlotElement`} - \n\n * `current` {`boolean`} - \n\n * `hasHover` {`boolean`} - \n\n * `hidden` {`boolean`} - \n\n * `isMultipleSelect` {`boolean`} - \n\n * `value` {`string`} - The option's value. When selected, the containing form control will receive this value. The value must be unique\nfrom other options in the same group. Values may not contain spaces, as spaces are used as delimiters when listing\nmultiple values.\n\n * `showCheckbox` {`boolean`} - \n\n * `disabled` {`boolean`} - Draws the option in a disabled state, preventing selection.\n\n * `selected` {`boolean`} - Indicates whether the option is selected.\n\n * `groupName` {`string`} - \n\n * `BUBBLES` {`boolean`} - \n\n * `COMPOSED` {`boolean`} - \n\n * `CANCELABLE` {`boolean`} - ",
|
|
3244
|
+
"description": "Slots:\n\n * ` ` {} - The option's label.\n\n * `prefix` {} - Used to prepend an icon or similar element to the menu item.\n\n * `suffix` {} - Used to append an icon or similar element to the menu item.\n\nAttributes:\n\n * `hidden` {`boolean`} - \n\n * `value` {`string`} - The option's value. When selected, the containing form control will receive this value. The value must be unique\nfrom other options in the same group. Values may not contain spaces, as spaces are used as delimiters when listing\nmultiple values.\n\n * `showCheckbox` {`boolean`} - \n\n * `disabled` {`boolean`} - Draws the option in a disabled state, preventing selection.\n\n * `selected` {`boolean`} - Indicates whether the option is selected.\n\n * `groupName` {`string`} - \n\n * `description` {`string`} - \n\nProperties:\n\n * `styles` - \n\n * `cachedTextLabel` {`string`} - \n\n * `defaultSlot` {`HTMLSlotElement`} - \n\n * `current` {`boolean`} - \n\n * `hasHover` {`boolean`} - \n\n * `hidden` {`boolean`} - \n\n * `isMultipleSelect` {`boolean`} - \n\n * `value` {`string`} - The option's value. When selected, the containing form control will receive this value. The value must be unique\nfrom other options in the same group. Values may not contain spaces, as spaces are used as delimiters when listing\nmultiple values.\n\n * `showCheckbox` {`boolean`} - \n\n * `disabled` {`boolean`} - Draws the option in a disabled state, preventing selection.\n\n * `selected` {`boolean`} - Indicates whether the option is selected.\n\n * `groupName` {`string`} - \n\n * `description` {`string`} - \n\n * `BUBBLES` {`boolean`} - \n\n * `COMPOSED` {`boolean`} - \n\n * `CANCELABLE` {`boolean`} - ",
|
|
3235
3245
|
"attributes": [
|
|
3236
3246
|
{
|
|
3237
3247
|
"name": "hidden",
|
|
@@ -3260,6 +3270,10 @@
|
|
|
3260
3270
|
{
|
|
3261
3271
|
"name": "groupName",
|
|
3262
3272
|
"description": "`groupName` {`string`} - \n\nProperty: groupName\n\nDefault: "
|
|
3273
|
+
},
|
|
3274
|
+
{
|
|
3275
|
+
"name": "description",
|
|
3276
|
+
"description": "`description` {`string`} - \n\nProperty: description\n\nDefault: "
|
|
3263
3277
|
}
|
|
3264
3278
|
]
|
|
3265
3279
|
},
|
|
@@ -4341,7 +4355,7 @@
|
|
|
4341
4355
|
},
|
|
4342
4356
|
{
|
|
4343
4357
|
"name": "nile-side-bar-action",
|
|
4344
|
-
"description": "Nile side-bar-action component.\n\nEvents:\n\n * `nile-show` {} - Fired when dropdown opens.\n\n * `nile-after-show` {} - Fired after dropdown + animations.\n\n * `nile-hide` {} - Fired when dropdown closes.\n\n * `nile-after-hide` {} - Fired after dropdown closes + animations.\n\nSlots:\n\n * `trigger` {} - The clickable trigger (icon/button).\n\n * ` ` {} - The dropdown panel content (menu, custom content).\n\nAttributes:\n\n * `open` {`boolean`} - Whether the dropdown is open\n\n * `placement` {`TooltipPosition`} - Preferred placement relative to trigger\n\n * `disabled` {`boolean`} - Disable interaction\n\n * `stay-open-on-select` {`boolean`} - Keep open on select\n\n * `distance` {`number`} - Offsets\n\n * `skidding` {`number`} - \n\n * `sync` {`\"width\" | \"height\" | \"both\"`} - Sync size with trigger\n\n * `hoist` {`boolean`} - Hoist above scroll containers\n\n * `triggerDropdown` {`\"click\" | \"hover\"`} - \n\nProperties:\n\n * `styles` {`CSSResultArray`} - \n\n * `popup` - \n\n * `trigger` {`HTMLSlotElement`} - \n\n * `panel` {`HTMLSlotElement`} - \n\n * `open` {`boolean`} - Whether the dropdown is open\n\n * `placement` {`TooltipPosition`} - Preferred placement relative to trigger\n\n * `disabled` {`boolean`} - Disable interaction\n\n * `stayOpenOnSelect` {`boolean`} - Keep open on select\n\n * `containingElement` {`HTMLElement | undefined`} - External containing element (default: self)\n\n * `distance` {`number`} - Offsets\n\n * `skidding` {`number`} - \n\n * `sync` {`\"width\" | \"height\" | \"both\"`} - Sync size with trigger\n\n * `hoist` {`boolean`} - Hoist above scroll containers\n\n * `triggerDropdown` {`\"click\" | \"hover\"`} - \n\n * `hoverTimeout` {`number | undefined`} - \n\n * `BUBBLES` {`boolean`} - \n\n * `COMPOSED` {`boolean`} - \n\n * `CANCELABLE` {`boolean`} - ",
|
|
4358
|
+
"description": "Nile side-bar-action component.\n\nEvents:\n\n * `nile-show` {} - Fired when dropdown opens.\n\n * `nile-after-show` {} - Fired after dropdown + animations.\n\n * `nile-hide` {} - Fired when dropdown closes.\n\n * `nile-after-hide` {} - Fired after dropdown closes + animations.\n\nSlots:\n\n * `trigger` {} - The clickable trigger (icon/button).\n\n * ` ` {} - The dropdown panel content (menu, custom content).\n\nAttributes:\n\n * `open` {`boolean`} - Whether the dropdown is open\n\n * `placement` {`TooltipPosition`} - Preferred placement relative to trigger\n\n * `disabled` {`boolean`} - Disable interaction\n\n * `stay-open-on-select` {`boolean`} - Keep open on select\n\n * `distance` {`number`} - Offsets\n\n * `skidding` {`number`} - \n\n * `sync` {`\"width\" | \"height\" | \"both\"`} - Sync size with trigger\n\n * `hoist` {`boolean`} - Hoist above scroll containers\n\n * `portal` {`boolean`} - Enable portal mode to render the dropdown panel in a portal outside the component's DOM tree.\nThis provides better positioning control and prevents clipping issues in complex layouts.\n\n * `triggerDropdown` {`\"click\" | \"hover\"`} - \n\nProperties:\n\n * `styles` {`CSSResultArray`} - \n\n * `popup` - \n\n * `trigger` {`HTMLSlotElement`} - \n\n * `panel` {`HTMLSlotElement`} - \n\n * `open` {`boolean`} - Whether the dropdown is open\n\n * `placement` {`TooltipPosition`} - Preferred placement relative to trigger\n\n * `disabled` {`boolean`} - Disable interaction\n\n * `stayOpenOnSelect` {`boolean`} - Keep open on select\n\n * `containingElement` {`HTMLElement | undefined`} - External containing element (default: self)\n\n * `distance` {`number`} - Offsets\n\n * `skidding` {`number`} - \n\n * `sync` {`\"width\" | \"height\" | \"both\"`} - Sync size with trigger\n\n * `hoist` {`boolean`} - Hoist above scroll containers\n\n * `portal` {`boolean`} - Enable portal mode to render the dropdown panel in a portal outside the component's DOM tree.\nThis provides better positioning control and prevents clipping issues in complex layouts.\n\n * `portalManager` - \n\n * `triggerDropdown` {`\"click\" | \"hover\"`} - \n\n * `hoverTimeout` {`number | undefined`} - \n\n * `BUBBLES` {`boolean`} - \n\n * `COMPOSED` {`boolean`} - \n\n * `CANCELABLE` {`boolean`} - ",
|
|
4345
4359
|
"attributes": [
|
|
4346
4360
|
{
|
|
4347
4361
|
"name": "open",
|
|
@@ -4428,6 +4442,11 @@
|
|
|
4428
4442
|
"description": "`hoist` {`boolean`} - Hoist above scroll containers\n\nProperty: hoist\n\nDefault: false",
|
|
4429
4443
|
"valueSet": "v"
|
|
4430
4444
|
},
|
|
4445
|
+
{
|
|
4446
|
+
"name": "portal",
|
|
4447
|
+
"description": "`portal` {`boolean`} - Enable portal mode to render the dropdown panel in a portal outside the component's DOM tree.\nThis provides better positioning control and prevents clipping issues in complex layouts.\n\nProperty: portal\n\nDefault: false",
|
|
4448
|
+
"valueSet": "v"
|
|
4449
|
+
},
|
|
4431
4450
|
{
|
|
4432
4451
|
"name": "triggerDropdown",
|
|
4433
4452
|
"description": "`triggerDropdown` {`\"click\" | \"hover\"`} - \n\nProperty: triggerDropdown\n\nDefault: click",
|