@aquera/nile-elements 2.0.7 → 2.0.9
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 +8 -0
- package/dist/index.js +627 -265
- package/dist/nile-chip/nile-chip.css.cjs.js +1 -1
- package/dist/nile-chip/nile-chip.css.cjs.js.map +1 -1
- package/dist/nile-chip/nile-chip.css.esm.js +4 -8
- package/dist/nile-input/nile-input.css.cjs.js +1 -1
- package/dist/nile-input/nile-input.css.cjs.js.map +1 -1
- package/dist/nile-input/nile-input.css.esm.js +4 -5
- package/dist/nile-select/index.cjs.js +1 -1
- package/dist/nile-select/index.esm.js +1 -1
- package/dist/nile-select/nile-select.cjs.js +2 -1
- package/dist/nile-select/nile-select.cjs.js.map +1 -1
- package/dist/nile-select/nile-select.css.cjs.js +1 -1
- package/dist/nile-select/nile-select.css.cjs.js.map +1 -1
- package/dist/nile-select/nile-select.css.esm.js +126 -6
- package/dist/nile-select/nile-select.esm.js +77 -11
- package/dist/nile-select/virtual-scroll-helper.cjs.js +1 -1
- package/dist/nile-select/virtual-scroll-helper.cjs.js.map +1 -1
- package/dist/nile-select/virtual-scroll-helper.esm.js +3 -1
- package/dist/nile-virtual-select/index.cjs.js +1 -1
- package/dist/nile-virtual-select/index.esm.js +1 -1
- package/dist/nile-virtual-select/nile-virtual-select.cjs.js +4 -3
- package/dist/nile-virtual-select/nile-virtual-select.cjs.js.map +1 -1
- package/dist/nile-virtual-select/nile-virtual-select.css.cjs.js +1 -1
- package/dist/nile-virtual-select/nile-virtual-select.css.cjs.js.map +1 -1
- package/dist/nile-virtual-select/nile-virtual-select.css.esm.js +126 -6
- package/dist/nile-virtual-select/nile-virtual-select.esm.js +71 -12
- package/dist/src/nile-chip/nile-chip.css.js +4 -8
- package/dist/src/nile-chip/nile-chip.css.js.map +1 -1
- package/dist/src/nile-input/nile-input.css.js +4 -5
- package/dist/src/nile-input/nile-input.css.js.map +1 -1
- package/dist/src/nile-input/nile-input.test.js +5 -0
- package/dist/src/nile-input/nile-input.test.js.map +1 -1
- package/dist/src/nile-select/nile-select.css.js +126 -6
- package/dist/src/nile-select/nile-select.css.js.map +1 -1
- package/dist/src/nile-select/nile-select.d.ts +43 -5
- package/dist/src/nile-select/nile-select.js +445 -106
- package/dist/src/nile-select/nile-select.js.map +1 -1
- package/dist/src/nile-select/nile-select.test.d.ts +1 -0
- package/dist/src/nile-select/nile-select.test.js +342 -1
- package/dist/src/nile-select/nile-select.test.js.map +1 -1
- package/dist/src/nile-select/virtual-scroll-helper.js +3 -1
- package/dist/src/nile-select/virtual-scroll-helper.js.map +1 -1
- package/dist/src/nile-virtual-select/nile-virtual-select.css.js +126 -6
- package/dist/src/nile-virtual-select/nile-virtual-select.css.js.map +1 -1
- package/dist/src/nile-virtual-select/nile-virtual-select.d.ts +45 -4
- package/dist/src/nile-virtual-select/nile-virtual-select.js +385 -59
- package/dist/src/nile-virtual-select/nile-virtual-select.js.map +1 -1
- package/dist/src/nile-virtual-select/nile-virtual-select.test.js +253 -1
- package/dist/src/nile-virtual-select/nile-virtual-select.test.js.map +1 -1
- 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-chip/nile-chip.css.ts +4 -8
- package/src/nile-input/nile-input.css.ts +4 -5
- package/src/nile-input/nile-input.test.ts +6 -0
- package/src/nile-select/nile-select.css.ts +126 -6
- package/src/nile-select/nile-select.test.ts +478 -1
- package/src/nile-select/nile-select.ts +499 -91
- package/src/nile-select/virtual-scroll-helper.ts +3 -1
- package/src/nile-virtual-select/nile-virtual-select.css.ts +126 -6
- package/src/nile-virtual-select/nile-virtual-select.test.ts +352 -1
- package/src/nile-virtual-select/nile-virtual-select.ts +460 -55
- package/vscode-html-custom-data.json +40 -6
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
import '../nile-icon';
|
|
8
8
|
import '../nile-popup/nile-popup';
|
|
9
9
|
import '../nile-tag/nile-tag';
|
|
10
|
+
import '../nile-lite-tooltip/nile-lite-tooltip';
|
|
10
11
|
import NileElement from '../internal/nile-element';
|
|
11
12
|
import type { CSSResultGroup, PropertyValues } from 'lit';
|
|
12
13
|
import type { NileFormControl } from '../internal/nile-element';
|
|
@@ -83,8 +84,13 @@ export declare class NileSelect extends NileElement implements NileFormControl {
|
|
|
83
84
|
private scrollTimeout;
|
|
84
85
|
private scrolling;
|
|
85
86
|
private options;
|
|
86
|
-
private
|
|
87
|
+
private observedTagsContainer?;
|
|
88
|
+
private resizeController;
|
|
87
89
|
private visibilityManager?;
|
|
90
|
+
private chipFitFrame;
|
|
91
|
+
private lastChipLayout;
|
|
92
|
+
private clippedChips;
|
|
93
|
+
private clipFrame;
|
|
88
94
|
popup: NilePopup;
|
|
89
95
|
combobox: HTMLSlotElement;
|
|
90
96
|
displayInput: HTMLInputElement;
|
|
@@ -95,6 +101,9 @@ export declare class NileSelect extends NileElement implements NileFormControl {
|
|
|
95
101
|
currentOption: NileOption;
|
|
96
102
|
selectedOptions: NileOption[];
|
|
97
103
|
oldValue: string | string[];
|
|
104
|
+
private hiddenChipCount;
|
|
105
|
+
/** Last measured width of the overflow button, in px. */
|
|
106
|
+
private lastOverflowWidth;
|
|
98
107
|
/** The name of the select, submitted as a name/value pair with form data. */
|
|
99
108
|
name: string;
|
|
100
109
|
/**
|
|
@@ -129,6 +138,7 @@ export declare class NileSelect extends NileElement implements NileFormControl {
|
|
|
129
138
|
multiple: boolean | string;
|
|
130
139
|
helpText: string;
|
|
131
140
|
help_text: string;
|
|
141
|
+
/** Re-runs the fitted-chip layout when the control's own width changes. */
|
|
132
142
|
autoResize: boolean;
|
|
133
143
|
errorMessage: string;
|
|
134
144
|
/** Sets the input to a warning state, changing its visual appearance. */
|
|
@@ -141,7 +151,20 @@ export declare class NileSelect extends NileElement implements NileFormControl {
|
|
|
141
151
|
* The maximum number of selected options to show when `multiple` is true. After the maximum, "+n" will be shown to
|
|
142
152
|
* indicate the number of additional items that are selected. Set to 0 to remove the limit.
|
|
143
153
|
*/
|
|
144
|
-
|
|
154
|
+
private _maxOptionsVisible;
|
|
155
|
+
private maxOptionsVisibleExplicit;
|
|
156
|
+
get maxOptionsVisible(): number;
|
|
157
|
+
set maxOptionsVisible(value: number);
|
|
158
|
+
private get chipFittingEnabled();
|
|
159
|
+
/** Minimum width, in px, of a squeezed chip. Needs `showtooltip`. */
|
|
160
|
+
chipMinWidth: number;
|
|
161
|
+
/** Maximum width, in px, of a squeezed chip. Needs `showtooltip`. */
|
|
162
|
+
chipMaxWidth: number;
|
|
163
|
+
/**
|
|
164
|
+
* Shows a chip's full value in a tooltip when its text is clipped, and is
|
|
165
|
+
* what allows a chip to be truncated at all.
|
|
166
|
+
*/
|
|
167
|
+
showTooltip: boolean;
|
|
145
168
|
/** Disables the select control. */
|
|
146
169
|
disabled: boolean;
|
|
147
170
|
/** Adds a clear button when the select is not empty. */
|
|
@@ -176,7 +199,6 @@ export declare class NileSelect extends NileElement implements NileFormControl {
|
|
|
176
199
|
/** The select's required attribute. */
|
|
177
200
|
required: boolean;
|
|
178
201
|
showSelected: boolean;
|
|
179
|
-
oldMaxOptionsVisible: number;
|
|
180
202
|
enableTabClose: boolean;
|
|
181
203
|
showNoResults: boolean;
|
|
182
204
|
noResultsMessage: string;
|
|
@@ -202,6 +224,7 @@ export declare class NileSelect extends NileElement implements NileFormControl {
|
|
|
202
224
|
connectedCallback(): void;
|
|
203
225
|
disconnectedCallback(): void;
|
|
204
226
|
private setupResizeObserver;
|
|
227
|
+
private syncVirtualSelectMaxOptionsVisible;
|
|
205
228
|
protected updated(_changedProperties: PropertyValues): void;
|
|
206
229
|
protected firstUpdated(_changedProperties: PropertyValues): void;
|
|
207
230
|
setCheckBoxInOption(checked: boolean): void;
|
|
@@ -245,7 +268,7 @@ export declare class NileSelect extends NileElement implements NileFormControl {
|
|
|
245
268
|
private handleDefaultSlotChange;
|
|
246
269
|
private handleTagRemove;
|
|
247
270
|
private getAllOptions;
|
|
248
|
-
private
|
|
271
|
+
private getOptionPrefixNodes;
|
|
249
272
|
private getFirstOption;
|
|
250
273
|
private setCurrentOption;
|
|
251
274
|
private setSelectedOptions;
|
|
@@ -282,8 +305,23 @@ export declare class NileSelect extends NileElement implements NileFormControl {
|
|
|
282
305
|
/** Removes focus from the control. */
|
|
283
306
|
blur(): void;
|
|
284
307
|
onInputChange(event: Event): void;
|
|
285
|
-
calculateWidthOfSelectTagsDiv(): number | undefined;
|
|
286
308
|
calculateTotalWidthOfTags(): void;
|
|
309
|
+
private allocateChipWidths;
|
|
310
|
+
private computeChipFit;
|
|
311
|
+
private layoutChips;
|
|
312
|
+
private isChipClipped;
|
|
313
|
+
private refreshClippedChips;
|
|
314
|
+
private scheduleClipCheck;
|
|
315
|
+
/** A chip gets a tooltip only while its text is measured as clipped. */
|
|
316
|
+
private chipTooltipDisabled;
|
|
317
|
+
private destroyChipFit;
|
|
318
|
+
private getChipLabel;
|
|
319
|
+
private handleChipKeyDown;
|
|
320
|
+
/** Moves focus to the next chip, the last chip, or the field after a removal. */
|
|
321
|
+
private restoreFocusAfterChipRemoval;
|
|
322
|
+
private handleOverflowActivate;
|
|
323
|
+
private handleOverflowKeyDown;
|
|
324
|
+
private renderFittedTags;
|
|
287
325
|
handleInputAfterInit(): void;
|
|
288
326
|
render(): any;
|
|
289
327
|
nileInput(value: any): void;
|