@aquera/nile-elements 0.1.67-beta-2.5 → 0.1.67-beta-2.6
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 +182 -9
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +122 -100
- 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.esm.js +2 -2
- package/dist/nile-select/nile-select.cjs.js +1 -1
- package/dist/nile-select/nile-select.cjs.js.map +1 -1
- package/dist/nile-select/nile-select.esm.js +9 -9
- package/dist/nile-table-body/nile-table-body.cjs.js +1 -1
- package/dist/nile-table-body/nile-table-body.cjs.js.map +1 -1
- package/dist/nile-table-body/nile-table-body.esm.js +2 -2
- package/dist/nile-table-row/nile-table-row.cjs.js +1 -1
- package/dist/nile-table-row/nile-table-row.cjs.js.map +1 -1
- package/dist/nile-table-row/nile-table-row.css.cjs.js +1 -1
- package/dist/nile-table-row/nile-table-row.css.cjs.js.map +1 -1
- package/dist/nile-table-row/nile-table-row.css.esm.js +52 -0
- package/dist/nile-table-row/nile-table-row.esm.js +34 -6
- package/dist/src/index.d.ts +0 -1
- package/dist/src/index.js +0 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/nile-option/nile-option.d.ts +0 -1
- package/dist/src/nile-option/nile-option.js +0 -5
- package/dist/src/nile-option/nile-option.js.map +1 -1
- package/dist/src/nile-option-group/nile-option-group.interface.d.ts +1 -0
- package/dist/src/nile-option-group/nile-option-group.interface.js.map +1 -1
- package/dist/src/nile-option-group/nile-option-group.js +7 -7
- package/dist/src/nile-option-group/nile-option-group.js.map +1 -1
- package/dist/src/nile-select/nile-select.d.ts +0 -6
- package/dist/src/nile-select/nile-select.js +1 -59
- package/dist/src/nile-select/nile-select.js.map +1 -1
- package/dist/src/nile-table-body/nile-table-body.d.ts +1 -0
- package/dist/src/nile-table-body/nile-table-body.js +7 -0
- package/dist/src/nile-table-body/nile-table-body.js.map +1 -1
- package/dist/src/nile-table-row/nile-table-row.css.js +52 -0
- package/dist/src/nile-table-row/nile-table-row.css.js.map +1 -1
- package/dist/src/nile-table-row/nile-table-row.d.ts +10 -1
- package/dist/src/nile-table-row/nile-table-row.js +87 -9
- package/dist/src/nile-table-row/nile-table-row.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -4
- package/src/index.ts +1 -2
- package/src/nile-option/nile-option.ts +0 -3
- package/src/nile-select/nile-select.ts +2 -74
- package/src/nile-table-body/nile-table-body.ts +4 -0
- package/src/nile-table-row/nile-table-row.css.ts +52 -0
- package/src/nile-table-row/nile-table-row.ts +84 -5
- package/vscode-html-custom-data.json +25 -29
- package/src/nile-option-group/index.ts +0 -1
- package/src/nile-option-group/nile-option-group.css.ts +0 -60
- package/src/nile-option-group/nile-option-group.interface.ts +0 -24
- package/src/nile-option-group/nile-option-group.ts +0 -84
- package/src/nile-select/nile-select.interface.ts +0 -5
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": "0.1.67-beta-2.
|
6
|
+
"version": "0.1.67-beta-2.6",
|
7
7
|
"main": "dist/src/index.js",
|
8
8
|
"type": "module",
|
9
9
|
"module": "dist/src/index.js",
|
@@ -87,8 +87,7 @@
|
|
87
87
|
"./nile-tour": "./dist/src/nile-tour/index.js",
|
88
88
|
"./nile-table": "./dist/src/nile-table/index.js",
|
89
89
|
"./nile-pagination": "./dist/src/nile-pagination/index.js",
|
90
|
-
"./nile-slider": "./dist/src/nile-slider/index.js"
|
91
|
-
"./nile-option-group": "./dist/src/nile-option-group/index.js"
|
90
|
+
"./nile-slider": "./dist/src/nile-slider/index.js"
|
92
91
|
},
|
93
92
|
"scripts": {
|
94
93
|
"analyze": "cem analyze --litelement",
|
@@ -192,4 +191,4 @@
|
|
192
191
|
"prettier --write"
|
193
192
|
]
|
194
193
|
}
|
195
|
-
}
|
194
|
+
}
|
package/src/index.ts
CHANGED
@@ -81,5 +81,4 @@ export { NileFilterChip } from './nile-filter-chip';
|
|
81
81
|
export {NilePagination } from './nile-pagination';
|
82
82
|
export { NileSlider } from './nile-slider';
|
83
83
|
export { NileFileUpload } from './nile-file-upload';
|
84
|
-
export { NileFilePreview } from './nile-file-preview'
|
85
|
-
export { NileOptionGroup } from './nile-option-group';
|
84
|
+
export { NileFilePreview } from './nile-file-preview'
|
@@ -68,9 +68,6 @@ export class NileOption extends NileElement {
|
|
68
68
|
/** Indicates whether the option is selected. */
|
69
69
|
@property({ type: Boolean, reflect: true }) selected = false;
|
70
70
|
|
71
|
-
/* used to pass group name to the option, so that grouped options can be shown */
|
72
|
-
@property({ type: String, reflect: true }) groupName: string = '';
|
73
|
-
|
74
71
|
connectedCallback() {
|
75
72
|
super.connectedCallback();
|
76
73
|
this.setAttribute('role', 'option');
|
@@ -38,8 +38,6 @@ import { unsafeHTML } from 'lit/directives/unsafe-html.js';
|
|
38
38
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
39
39
|
import '../nile-virtual-select/nile-virtual-select';
|
40
40
|
import { VirtualScrollHelper } from './virtual-scroll-helper';
|
41
|
-
import NileOptionGroup from '../nile-option-group/nile-option-group';
|
42
|
-
import { GroupAttributes } from './nile-select.interface';
|
43
41
|
|
44
42
|
type NileRemoveEvent = CustomEvent<Record<PropertyKey, never>>;
|
45
43
|
|
@@ -260,9 +258,6 @@ export class NileSelect extends NileElement implements NileFormControl{
|
|
260
258
|
|
261
259
|
@property({ type: Boolean }) enableVirtualScroll = false;
|
262
260
|
|
263
|
-
/** To enable the group header in the select */
|
264
|
-
@property({ type: Boolean, reflect: true, attribute: true }) enableGroupHeader = false;
|
265
|
-
|
266
261
|
/** Gets the validity state object */
|
267
262
|
get validity() {
|
268
263
|
return this.valueInput?.validity;
|
@@ -308,10 +303,6 @@ export class NileSelect extends NileElement implements NileFormControl{
|
|
308
303
|
}
|
309
304
|
|
310
305
|
protected firstUpdated(_changedProperties: PropertyValues): void {
|
311
|
-
if(this.enableGroupHeader) {
|
312
|
-
this.handleGroupSearchChange();
|
313
|
-
}
|
314
|
-
|
315
306
|
if(_changedProperties.has('multiple')) {
|
316
307
|
this.setCheckBoxInOption(this.multiple as boolean);
|
317
308
|
}
|
@@ -388,9 +379,6 @@ export class NileSelect extends NileElement implements NileFormControl{
|
|
388
379
|
}
|
389
380
|
});
|
390
381
|
|
391
|
-
if(this.enableGroupHeader) {
|
392
|
-
this.handleGroupShowSelected();
|
393
|
-
}
|
394
382
|
// this.requestUpdate();
|
395
383
|
}
|
396
384
|
|
@@ -404,9 +392,6 @@ export class NileSelect extends NileElement implements NileFormControl{
|
|
404
392
|
el.selected = false;
|
405
393
|
el.hidden = false;
|
406
394
|
});
|
407
|
-
if(this.enableGroupHeader) {
|
408
|
-
this.handleGroupShowSelected();
|
409
|
-
}
|
410
395
|
this.value = '';
|
411
396
|
this.selectionChanged();
|
412
397
|
this.emit('nile-change', { value: this.value, name: this.name });
|
@@ -556,9 +541,6 @@ export class NileSelect extends NileElement implements NileFormControl{
|
|
556
541
|
this.showSelected = false;
|
557
542
|
this.value = '';
|
558
543
|
this.displayInput.focus({ preventScroll: true });
|
559
|
-
if(this.enableGroupHeader) {
|
560
|
-
this.handleGroupShowSelected();
|
561
|
-
}
|
562
544
|
|
563
545
|
// Emit after update
|
564
546
|
this.updateComplete.then(() => {
|
@@ -622,9 +604,7 @@ export class NileSelect extends NileElement implements NileFormControl{
|
|
622
604
|
el.hidden = this.showSelected;
|
623
605
|
}
|
624
606
|
});
|
625
|
-
|
626
|
-
this.handleGroupShowSelected();
|
627
|
-
}
|
607
|
+
|
628
608
|
this.requestUpdate();
|
629
609
|
}
|
630
610
|
}
|
@@ -662,9 +642,6 @@ export class NileSelect extends NileElement implements NileFormControl{
|
|
662
642
|
el.hidden = this.showSelected;
|
663
643
|
}
|
664
644
|
});
|
665
|
-
if(this.enableGroupHeader) {
|
666
|
-
this.handleGroupShowSelected();
|
667
|
-
}
|
668
645
|
|
669
646
|
// Emit after updating
|
670
647
|
this.updateComplete.then(() => {
|
@@ -834,9 +811,6 @@ export class NileSelect extends NileElement implements NileFormControl{
|
|
834
811
|
|
835
812
|
handleSearchChange(e: any) {
|
836
813
|
this.searchValue = e.detail.value;
|
837
|
-
if(this.enableGroupHeader) {
|
838
|
-
this.handleGroupSearchChange();
|
839
|
-
}
|
840
814
|
if (!this.disableLocalSearch) {
|
841
815
|
let filteredOptions = this.filterOptions(this.searchValue);
|
842
816
|
if (filteredOptions.length === 0) {
|
@@ -900,14 +874,8 @@ export class NileSelect extends NileElement implements NileFormControl{
|
|
900
874
|
// Reset the current option
|
901
875
|
this.setCurrentOption(this.selectedOptions[0] || this.getFirstOption());
|
902
876
|
|
877
|
+
// Show
|
903
878
|
this.emit('nile-show', { value: this.value, name: this.name });
|
904
|
-
|
905
|
-
if(this.enableGroupHeader) {
|
906
|
-
this.getAllGroupAttributes().forEach((el: GroupAttributes) => {
|
907
|
-
el.element.classList.remove('nile-group-hidden');
|
908
|
-
});
|
909
|
-
}
|
910
|
-
|
911
879
|
this.addOpenListeners();
|
912
880
|
|
913
881
|
this.showNoResults = !this.getAllOptions()?.length;
|
@@ -953,46 +921,6 @@ export class NileSelect extends NileElement implements NileFormControl{
|
|
953
921
|
}
|
954
922
|
}
|
955
923
|
|
956
|
-
private getAllGroupAttributes() {
|
957
|
-
return Array.from(
|
958
|
-
this.querySelectorAll<NileOptionGroup>('nile-option-group[name]')
|
959
|
-
).map((el: HTMLElement) => ({
|
960
|
-
name: el?.getAttribute('name') || '',
|
961
|
-
data: el?.getAttribute('data'),
|
962
|
-
element: el
|
963
|
-
}));
|
964
|
-
}
|
965
|
-
|
966
|
-
getUniqueGroupNames(arr: NileOption[]) {
|
967
|
-
return Array.from(new Set(arr.map(obj => obj?.groupName)));
|
968
|
-
}
|
969
|
-
|
970
|
-
handleGroupSearchChange() {
|
971
|
-
const filtered = new Set(
|
972
|
-
this.getUniqueGroupNames(this.filterOptions(this.searchValue))
|
973
|
-
);
|
974
|
-
this.getAllGroupAttributes().forEach(({ name, element }) => {
|
975
|
-
element?.classList.toggle('nile-group-hidden', !filtered.has(name));
|
976
|
-
});
|
977
|
-
}
|
978
|
-
|
979
|
-
handleGroupShowSelected() {
|
980
|
-
const visibleGroups = new Set<string>();
|
981
|
-
|
982
|
-
if (this.showSelected) {
|
983
|
-
this.getAllOptions().forEach((option: NileOption) => {
|
984
|
-
if (!option.hidden) visibleGroups.add(option.groupName);
|
985
|
-
});
|
986
|
-
}
|
987
|
-
|
988
|
-
this.getAllGroupAttributes().forEach(({ name, element }) => {
|
989
|
-
element?.classList.toggle(
|
990
|
-
'nile-group-hidden',
|
991
|
-
this.showSelected && !visibleGroups.has(name)
|
992
|
-
);
|
993
|
-
});
|
994
|
-
}
|
995
|
-
|
996
924
|
/** Shows the listbox. */
|
997
925
|
async show() {
|
998
926
|
if (this.open || this.disabled) {
|
@@ -42,6 +42,7 @@ export class NileTableBody extends NileElement {
|
|
42
42
|
@query('slot') defaultSlot: HTMLSlotElement;
|
43
43
|
@queryAssignedNodes({ flatten: true }) _childNodes!: Array<HTMLElement>;
|
44
44
|
@property() type: 'primary' | 'secondary' = 'primary';
|
45
|
+
@property({ type: Boolean, reflect: true, attribute: true }) expandableRows = false;
|
45
46
|
|
46
47
|
@state() private rows_data: any[] = [];
|
47
48
|
@state() private header_rows_data: any[] = [];
|
@@ -77,6 +78,9 @@ export class NileTableBody extends NileElement {
|
|
77
78
|
let row_data: any = [];
|
78
79
|
this._childNodes.forEach((child: any) => {
|
79
80
|
if (child.tagName && child?.tagName?.toLowerCase() === 'nile-table-row') {
|
81
|
+
if (this.expandableRows) {
|
82
|
+
(child as any).expandable = true;
|
83
|
+
}
|
80
84
|
let nilerows = this.getChildren(child, 'nile-table-cell-item');
|
81
85
|
if (nilerows.length > 0) {
|
82
86
|
nilerows.forEach((element: { innerHTML: any }) => {
|
@@ -27,6 +27,58 @@ export const styles = css`
|
|
27
27
|
nile-table-row > slot::slotted(nile-table-cell-item:first-child) {
|
28
28
|
color: red;
|
29
29
|
}
|
30
|
+
|
31
|
+
.row-container {
|
32
|
+
/* display: flex; */
|
33
|
+
/* flex-direction: column; */
|
34
|
+
overflow: hidden;
|
35
|
+
contain: layout style;
|
36
|
+
}
|
37
|
+
|
38
|
+
.row {
|
39
|
+
cursor: default;
|
40
|
+
position: relative;
|
41
|
+
display: flex;
|
42
|
+
align-items: center;
|
43
|
+
}
|
44
|
+
|
45
|
+
.row.expandable {
|
46
|
+
border-bottom: 1px solid var(--nile-table-row-border-color);
|
47
|
+
overflow: hidden;
|
48
|
+
contain: layout style;
|
49
|
+
}
|
50
|
+
|
51
|
+
|
52
|
+
.expanded-content {
|
53
|
+
/* overflow: hidden; */
|
54
|
+
transition: max-height 0.3s ease;
|
55
|
+
}
|
56
|
+
|
57
|
+
.row.expandable .expand-icon {
|
58
|
+
margin-right: 4px;
|
59
|
+
}
|
60
|
+
|
61
|
+
.row ::slotted(nile-table-cell-item),
|
62
|
+
.row ::slotted(nile-table-header-item) {
|
63
|
+
width: 100%;
|
64
|
+
box-sizing: border-box;
|
65
|
+
}
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
.expand-icon {
|
71
|
+
position: absolute;
|
72
|
+
left: 0.40em;
|
73
|
+
top: 50%;
|
74
|
+
transform: translateY(-50%);
|
75
|
+
cursor: pointer;
|
76
|
+
font-size: 1em;
|
77
|
+
line-height: 1;
|
78
|
+
user-select: none;
|
79
|
+
z-index: 1;
|
80
|
+
}
|
81
|
+
|
30
82
|
`;
|
31
83
|
|
32
84
|
export default [styles];
|
@@ -10,6 +10,7 @@ import {
|
|
10
10
|
html,
|
11
11
|
CSSResultArray,
|
12
12
|
TemplateResult,
|
13
|
+
PropertyValues,
|
13
14
|
} from 'lit';
|
14
15
|
import { customElement, query, property } from 'lit/decorators.js';
|
15
16
|
import { styles } from './nile-table-row.css';
|
@@ -31,6 +32,29 @@ export class NileTableRow extends NileElement {
|
|
31
32
|
public static get styles(): CSSResultArray {
|
32
33
|
return [styles];
|
33
34
|
}
|
35
|
+
@property({ type: Boolean, reflect: true , attribute: true}) expandable = false;
|
36
|
+
|
37
|
+
@property({ type: Boolean, reflect: true, attribute: true }) expanded = false;
|
38
|
+
|
39
|
+
@query('slot[name="expanded"]')
|
40
|
+
private _expandedSlot!: HTMLSlotElement;
|
41
|
+
|
42
|
+
@query('slot[name="expandableIcon"]')
|
43
|
+
private _iconSlot!: HTMLSlotElement;
|
44
|
+
|
45
|
+
private tableBodyHasExpandable: any = this.closest('nile-table-body');
|
46
|
+
|
47
|
+
private _fallbackIcon?: HTMLElement | null;
|
48
|
+
|
49
|
+
private toggleExpand(e: MouseEvent): void {
|
50
|
+
this.expanded = !this.expanded;
|
51
|
+
this.dispatchEvent(new CustomEvent('nile-change', {
|
52
|
+
detail: { expanded: this.expanded },
|
53
|
+
bubbles: true,
|
54
|
+
composed: true,
|
55
|
+
}));
|
56
|
+
}
|
57
|
+
|
34
58
|
|
35
59
|
/* #endregion */
|
36
60
|
|
@@ -41,6 +65,10 @@ export class NileTableRow extends NileElement {
|
|
41
65
|
* @slot This is a slot test
|
42
66
|
*/
|
43
67
|
|
68
|
+
protected firstUpdated(): void {
|
69
|
+
this._fallbackIcon = this.renderRoot?.querySelector('nile-icon') ?? null;
|
70
|
+
}
|
71
|
+
|
44
72
|
private handleSortingAlter(event: CustomEvent) {
|
45
73
|
const header_items: any = [
|
46
74
|
...this.querySelectorAll('nile-table-header-item'),
|
@@ -54,15 +82,66 @@ export class NileTableRow extends NileElement {
|
|
54
82
|
}
|
55
83
|
}
|
56
84
|
|
85
|
+
protected updated(changedProperties: PropertyValues): void {
|
86
|
+
if (!changedProperties.has('expandable') || !this._iconSlot) return;
|
87
|
+
|
88
|
+
const assigned = this._iconSlot.assignedElements();
|
89
|
+
const hasAssigned = assigned.length > 0;
|
90
|
+
const displayValue = this.expandable ? '' : 'none';
|
91
|
+
|
92
|
+
if (hasAssigned) {
|
93
|
+
for (const el of assigned) {
|
94
|
+
(el as HTMLElement).style.display = displayValue;
|
95
|
+
}
|
96
|
+
} else if (this._fallbackIcon) {
|
97
|
+
this._fallbackIcon.style.display = displayValue;
|
98
|
+
}
|
99
|
+
}
|
100
|
+
|
57
101
|
public render(): TemplateResult {
|
102
|
+
|
103
|
+
if (!this.expandable && !this.tableBodyHasExpandable.expandableRows) {
|
104
|
+
return html`
|
105
|
+
<slot
|
106
|
+
part="nile-row"
|
107
|
+
@nile-click-sort="${this.handleSortingAlter}"
|
108
|
+
></slot>
|
109
|
+
`;
|
110
|
+
}
|
111
|
+
|
112
|
+
|
58
113
|
return html`
|
59
|
-
<
|
60
|
-
|
61
|
-
|
62
|
-
|
114
|
+
<div part="row-container" class="row-container">
|
115
|
+
<div
|
116
|
+
part="nile-row"
|
117
|
+
class="row expandable ${this.expanded ? 'expanded' : ''}"
|
118
|
+
@nile-click-sort="${this.handleSortingAlter}"
|
119
|
+
>
|
120
|
+
<slot
|
121
|
+
name="expandableIcon"
|
122
|
+
@click=${this.toggleExpand}
|
123
|
+
class="expand-icon"
|
124
|
+
part="expandable-icon"
|
125
|
+
>
|
126
|
+
<nile-icon
|
127
|
+
name="${this.expanded ? 'chevron-up' : 'chevron-down'}"
|
128
|
+
role="button"
|
129
|
+
size="10"
|
130
|
+
aria-label="${this.expanded ? 'Collapse row' : 'Expand row'}">
|
131
|
+
</nile-icon>
|
132
|
+
</slot>
|
133
|
+
<slot></slot>
|
134
|
+
</div>
|
135
|
+
|
136
|
+
${this.expanded && this.expandable
|
137
|
+
? html`
|
138
|
+
<div class="expanded-content" part="expanded-content">
|
139
|
+
<slot name="expanded"></slot>
|
140
|
+
</div>`
|
141
|
+
: null}
|
142
|
+
</div>
|
63
143
|
`;
|
64
144
|
}
|
65
|
-
|
66
145
|
/* #endregion */
|
67
146
|
}
|
68
147
|
|
@@ -2461,24 +2461,9 @@
|
|
2461
2461
|
}
|
2462
2462
|
]
|
2463
2463
|
},
|
2464
|
-
{
|
2465
|
-
"name": "nile-option-group",
|
2466
|
-
"description": "Attributes:\n\n * `name` {`string`} - \n\n * `data` {`OptionGroupData | null`} - \n\nProperties:\n\n * `name` {`string`} - \n\n * `data` {`OptionGroupData | null`} - \n\n * `BUBBLES` {`boolean`} - \n\n * `COMPOSED` {`boolean`} - \n\n * `CANCELABLE` {`boolean`} - ",
|
2467
|
-
"attributes": [
|
2468
|
-
{
|
2469
|
-
"name": "name",
|
2470
|
-
"description": "`name` {`string`} - \n\nProperty: name\n\nDefault: "
|
2471
|
-
},
|
2472
|
-
{
|
2473
|
-
"name": "data",
|
2474
|
-
"description": "`data` {`OptionGroupData | null`} - \n\nProperty: data\n\nDefault: null",
|
2475
|
-
"values": []
|
2476
|
-
}
|
2477
|
-
]
|
2478
|
-
},
|
2479
2464
|
{
|
2480
2465
|
"name": "nile-option",
|
2481
|
-
"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 * `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\
|
2466
|
+
"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 * `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\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 * `BUBBLES` {`boolean`} - \n\n * `COMPOSED` {`boolean`} - \n\n * `CANCELABLE` {`boolean`} - ",
|
2482
2467
|
"attributes": [
|
2483
2468
|
{
|
2484
2469
|
"name": "value",
|
@@ -2498,10 +2483,6 @@
|
|
2498
2483
|
"name": "selected",
|
2499
2484
|
"description": "`selected` {`boolean`} - Indicates whether the option is selected.\n\nProperty: selected\n\nDefault: false",
|
2500
2485
|
"valueSet": "v"
|
2501
|
-
},
|
2502
|
-
{
|
2503
|
-
"name": "groupName",
|
2504
|
-
"description": "`groupName` {`string`} - \n\nProperty: groupName\n\nDefault: "
|
2505
2486
|
}
|
2506
2487
|
]
|
2507
2488
|
},
|
@@ -3008,7 +2989,7 @@
|
|
3008
2989
|
},
|
3009
2990
|
{
|
3010
2991
|
"name": "nile-select",
|
3011
|
-
"description": "Events:\n\n * `nile-change` {} - Emitted when the control's value changes.\n\n * `nile-clear` {} - Emitted when the control's value is cleared.\n\n * `nile-input` {} - Emitted when the control receives input.\n\n * `nile-focus` {} - Emitted when the control gains focus.\n\n * `nile-blur` {} - Emitted when the control loses focus.\n\n * `nile-show` {} - Emitted when the select's menu opens.\n\n * `nile-after-show` {} - Emitted after the select's menu opens and all animations are complete.\n\n * `nile-hide` {} - Emitted when the select's menu closes.\n\n * `nile-after-hide` {} - Emitted after the select's menu closes and all animations are complete.\n\n * `nile-invalid` {} - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n\nSlots:\n\n * ` ` {} - The listbox options. Must be `<nile-option>` elements. You can use `<nile-divider>` to group items visually.\n\n * `label` {} - The input's label. Alternatively, you can use the `label` attribute.\n\n * `prefix` {} - Used to prepend a presentational icon or similar element to the combobox.\n\n * `clear-icon` {} - An icon to use in lieu of the default clear icon.\n\n * `expand-icon` {} - The icon to show when the control is expanded and collapsed. Rotates on open and close.\n\n * `help-text` {} - Text that describes how to use the input. Alternatively, you can use the `help-text` attribute.\n\nAttributes:\n\n * `size` {`\"medium\" | \"small\" | \"large\"`} - The select's size.\n\n * `placeholder` {`string`} - Placeholder text to show as a hint when the select is empty.\n\n * `searchEnabled` {`boolean`} - \n\n * `internal-search-placeholder` {`string`} - \n\n * `blockValueChange` {`boolean`} - \n\n * `disableLocalSearch` {`boolean`} - \n\n * `optionsLoading` {`boolean`} - \n\n * `noWidthSync` {`boolean`} - \n\n * `multiple` {`string | boolean`} - Allows more than one option to be selected.\n\n * `help-text` {`string`} - \n\n * `error-message` {`string`} - \n\n * `warning` {`boolean`} - Sets the input to a warning state, changing its visual appearance.\n\n * `error` {`boolean`} - Sets the input to an error state, changing its visual appearance.\n\n * `success` {`boolean`} - Sets the input to a success state, changing its visual appearance.\n\n * `max-options-visible` {`number`} - The maximum number of selected options to show when `multiple` is true. After the maximum, \"+n\" will be shown to\nindicate the number of additional items that are selected. Set to 0 to remove the limit.\n\n * `clearable` {`boolean`} - Adds a clear button when the select is not empty.\n\n * `open` {`boolean`} - Indicates whether or not the select is open. You can toggle this attribute to show and hide the menu, or you can\nuse the `show()` and `hide()` methods and this attribute will reflect the select's open state.\n\n * `hoist` {`boolean`} - Enable this option to prevent the listbox from being clipped when the component is placed inside a container with\n`overflow: auto|scroll`. Hoisting uses a fixed positioning strategy that works in many, but not all, scenarios.\n\n * `filled` {`boolean`} - Draws a filled select.\n\n * `pill` {`boolean`} - Draws a pill-style select with rounded edges.\n\n * `label` {`string`} - The select's label. If you need to display HTML, use the `label` slot instead.\n\n * `placement` {`\"top\" | \"bottom\"`} - The preferred placement of the select's menu. Note that the actual placement may vary as needed to keep the listbox\ninside of the viewport.\n\n * `showSelected` {`boolean`} - \n\n * `showNoResults` {`boolean`} - \n\n * `noResultsMessage` {`string`} - \n\n * `data` - \n\n * `enableVirtualScroll` {`boolean`} - \n\n * `
|
2992
|
+
"description": "Events:\n\n * `nile-change` {} - Emitted when the control's value changes.\n\n * `nile-clear` {} - Emitted when the control's value is cleared.\n\n * `nile-input` {} - Emitted when the control receives input.\n\n * `nile-focus` {} - Emitted when the control gains focus.\n\n * `nile-blur` {} - Emitted when the control loses focus.\n\n * `nile-show` {} - Emitted when the select's menu opens.\n\n * `nile-after-show` {} - Emitted after the select's menu opens and all animations are complete.\n\n * `nile-hide` {} - Emitted when the select's menu closes.\n\n * `nile-after-hide` {} - Emitted after the select's menu closes and all animations are complete.\n\n * `nile-invalid` {} - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n\nSlots:\n\n * ` ` {} - The listbox options. Must be `<nile-option>` elements. You can use `<nile-divider>` to group items visually.\n\n * `label` {} - The input's label. Alternatively, you can use the `label` attribute.\n\n * `prefix` {} - Used to prepend a presentational icon or similar element to the combobox.\n\n * `clear-icon` {} - An icon to use in lieu of the default clear icon.\n\n * `expand-icon` {} - The icon to show when the control is expanded and collapsed. Rotates on open and close.\n\n * `help-text` {} - Text that describes how to use the input. Alternatively, you can use the `help-text` attribute.\n\nAttributes:\n\n * `size` {`\"medium\" | \"small\" | \"large\"`} - The select's size.\n\n * `placeholder` {`string`} - Placeholder text to show as a hint when the select is empty.\n\n * `searchEnabled` {`boolean`} - \n\n * `internal-search-placeholder` {`string`} - \n\n * `blockValueChange` {`boolean`} - \n\n * `disableLocalSearch` {`boolean`} - \n\n * `optionsLoading` {`boolean`} - \n\n * `noWidthSync` {`boolean`} - \n\n * `multiple` {`string | boolean`} - Allows more than one option to be selected.\n\n * `help-text` {`string`} - \n\n * `error-message` {`string`} - \n\n * `warning` {`boolean`} - Sets the input to a warning state, changing its visual appearance.\n\n * `error` {`boolean`} - Sets the input to an error state, changing its visual appearance.\n\n * `success` {`boolean`} - Sets the input to a success state, changing its visual appearance.\n\n * `max-options-visible` {`number`} - The maximum number of selected options to show when `multiple` is true. After the maximum, \"+n\" will be shown to\nindicate the number of additional items that are selected. Set to 0 to remove the limit.\n\n * `clearable` {`boolean`} - Adds a clear button when the select is not empty.\n\n * `open` {`boolean`} - Indicates whether or not the select is open. You can toggle this attribute to show and hide the menu, or you can\nuse the `show()` and `hide()` methods and this attribute will reflect the select's open state.\n\n * `hoist` {`boolean`} - Enable this option to prevent the listbox from being clipped when the component is placed inside a container with\n`overflow: auto|scroll`. Hoisting uses a fixed positioning strategy that works in many, but not all, scenarios.\n\n * `filled` {`boolean`} - Draws a filled select.\n\n * `pill` {`boolean`} - Draws a pill-style select with rounded edges.\n\n * `label` {`string`} - The select's label. If you need to display HTML, use the `label` slot instead.\n\n * `placement` {`\"top\" | \"bottom\"`} - The preferred placement of the select's menu. Note that the actual placement may vary as needed to keep the listbox\ninside of the viewport.\n\n * `showSelected` {`boolean`} - \n\n * `showNoResults` {`boolean`} - \n\n * `noResultsMessage` {`string`} - \n\n * `data` - \n\n * `enableVirtualScroll` {`boolean`} - \n\n * `name` {`string`} - The name of the select, submitted as a name/value pair with form data.\n\n * `value` {`string | string[]`} - The current value of the select, submitted as a name/value pair with form data. When `multiple` is enabled, the\nvalue will be a space-delimited list of values based on the options selected.\n\n * `disabled` {`boolean`} - Disables the select control.\n\n * `form` {`string`} - By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you\nto place the form control outside of a form and associate it with the form that has this `id`. The form must be in\nthe same document or shadow root for this to work.\n\n * `required` {`boolean`} - The select's required attribute.\n\nProperties:\n\n * `styles` - \n\n * `formControlController` - \n\n * `virtualScrollHelper` - \n\n * `hasSlotController` - \n\n * `typeToSelectString` {`string`} - \n\n * `typeToSelectTimeout` {`number`} - \n\n * `popup` - \n\n * `combobox` {`HTMLSlotElement`} - \n\n * `displayInput` {`HTMLInputElement`} - \n\n * `valueInput` {`HTMLInputElement`} - \n\n * `listbox` {`HTMLSlotElement`} - \n\n * `hasFocus` {`boolean`} - \n\n * `displayLabel` {`string`} - \n\n * `currentOption` - \n\n * `selectedOptions` {`NileOption[]`} - \n\n * `oldValue` {`string | string[]`} - \n\n * `size` {`\"medium\" | \"small\" | \"large\"`} - The select's size.\n\n * `placeholder` {`string`} - Placeholder text to show as a hint when the select is empty.\n\n * `searchValue` {`string`} - Placeholder text to show as a hint when the select is empty.\n\n * `searchEnabled` {`boolean`} - \n\n * `internalSearchPlaceHolder` {`string`} - \n\n * `blockValueChange` {`boolean`} - \n\n * `disableLocalSearch` {`boolean`} - \n\n * `optionsLoading` {`boolean`} - \n\n * `noWidthSync` {`boolean`} - \n\n * `multiple` {`string | boolean`} - Allows more than one option to be selected.\n\n * `helpText` {`string`} - \n\n * `errorMessage` {`string`} - \n\n * `warning` {`boolean`} - Sets the input to a warning state, changing its visual appearance.\n\n * `error` {`boolean`} - Sets the input to an error state, changing its visual appearance.\n\n * `success` {`boolean`} - Sets the input to a success state, changing its visual appearance.\n\n * `maxOptionsVisible` {`number`} - The maximum number of selected options to show when `multiple` is true. After the maximum, \"+n\" will be shown to\nindicate the number of additional items that are selected. Set to 0 to remove the limit.\n\n * `clearable` {`boolean`} - Adds a clear button when the select is not empty.\n\n * `open` {`boolean`} - Indicates whether or not the select is open. You can toggle this attribute to show and hide the menu, or you can\nuse the `show()` and `hide()` methods and this attribute will reflect the select's open state.\n\n * `hoist` {`boolean`} - Enable this option to prevent the listbox from being clipped when the component is placed inside a container with\n`overflow: auto|scroll`. Hoisting uses a fixed positioning strategy that works in many, but not all, scenarios.\n\n * `filled` {`boolean`} - Draws a filled select.\n\n * `pill` {`boolean`} - Draws a pill-style select with rounded edges.\n\n * `label` {`string`} - The select's label. If you need to display HTML, use the `label` slot instead.\n\n * `placement` {`\"top\" | \"bottom\"`} - The preferred placement of the select's menu. Note that the actual placement may vary as needed to keep the listbox\ninside of the viewport.\n\n * `showSelected` {`boolean`} - \n\n * `oldMaxOptionsVisible` {`number`} - \n\n * `showNoResults` {`boolean`} - \n\n * `noResultsMessage` {`string`} - \n\n * `renderItemConfig` {`RenderItemConfig | undefined`} - Enhanced configuration for rendering items with support for display text, value, and search text\n\n * `data` - \n\n * `enableVirtualScroll` {`boolean`} - \n\n * `options` {`NileOption[]`} - \n\n * `name` {`string`} - The name of the select, submitted as a name/value pair with form data.\n\n * `value` {`string | string[]`} - The current value of the select, submitted as a name/value pair with form data. When `multiple` is enabled, the\nvalue will be a space-delimited list of values based on the options selected.\n\n * `disabled` {`boolean`} - Disables the select control.\n\n * `defaultValue` {`string | string[]`} - The default value of the form control. Primarily used for resetting the form control.\n\n * `defaultChecked` {`boolean | undefined`} - \n\n * `form` {`string`} - By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you\nto place the form control outside of a form and associate it with the form that has this `id`. The form must be in\nthe same document or shadow root for this to work.\n\n * `pattern` {`string | undefined`} - \n\n * `min` {`string | number | Date | undefined`} - \n\n * `max` {`string | number | Date | undefined`} - \n\n * `step` {`number | \"any\" | undefined`} - \n\n * `required` {`boolean`} - The select's required attribute.\n\n * `minlength` {`number | undefined`} - \n\n * `maxlength` {`number | undefined`} - \n\n * `validity` {`ValidityState`} - Gets the validity state object\n\n * `validationMessage` {`string`} - Gets the validation message\n\n * `checkValidity` - \n\n * `getForm` - \n\n * `reportValidity` - \n\n * `setCustomValidity` - \n\n * `BUBBLES` {`boolean`} - \n\n * `COMPOSED` {`boolean`} - \n\n * `CANCELABLE` {`boolean`} - ",
|
3012
2993
|
"attributes": [
|
3013
2994
|
{
|
3014
2995
|
"name": "size",
|
@@ -3154,11 +3135,6 @@
|
|
3154
3135
|
"description": "`enableVirtualScroll` {`boolean`} - \n\nProperty: enableVirtualScroll\n\nDefault: false",
|
3155
3136
|
"valueSet": "v"
|
3156
3137
|
},
|
3157
|
-
{
|
3158
|
-
"name": "enableGroupHeader",
|
3159
|
-
"description": "`enableGroupHeader` {`boolean`} - To enable the group header in the select\n\nProperty: enableGroupHeader\n\nDefault: false",
|
3160
|
-
"valueSet": "v"
|
3161
|
-
},
|
3162
3138
|
{
|
3163
3139
|
"name": "name",
|
3164
3140
|
"description": "`name` {`string`} - The name of the select, submitted as a name/value pair with form data.\n\nProperty: name\n\nDefault: "
|
@@ -3676,7 +3652,7 @@
|
|
3676
3652
|
},
|
3677
3653
|
{
|
3678
3654
|
"name": "nile-table-body",
|
3679
|
-
"description": "nile-table-body component.\n\nAttributes:\n\n * `type` {`\"primary\" | \"secondary\"`} - \n\nProperties:\n\n * `defaultSlot` {`HTMLSlotElement`} - The styles for TableBody\n\n * `_childNodes` {`HTMLElement[]`} - \n\n * `type` {`\"primary\" | \"secondary\"`} - \n\n * `rows_data` {`any[]`} - \n\n * `header_rows_data` {`any[]`} - \n\n * `sort__index` {`number`} - \n\n * `search__index` {`number`} - \n\n * `hasResizableColumns` {`boolean`} - \n\n * `BUBBLES` {`boolean`} - \n\n * `COMPOSED` {`boolean`} - \n\n * `CANCELABLE` {`boolean`} - ",
|
3655
|
+
"description": "nile-table-body component.\n\nAttributes:\n\n * `type` {`\"primary\" | \"secondary\"`} - \n\n * `expandableRows` {`boolean`} - \n\nProperties:\n\n * `defaultSlot` {`HTMLSlotElement`} - The styles for TableBody\n\n * `_childNodes` {`HTMLElement[]`} - \n\n * `type` {`\"primary\" | \"secondary\"`} - \n\n * `expandableRows` {`boolean`} - \n\n * `rows_data` {`any[]`} - \n\n * `header_rows_data` {`any[]`} - \n\n * `sort__index` {`number`} - \n\n * `search__index` {`number`} - \n\n * `hasResizableColumns` {`boolean`} - \n\n * `BUBBLES` {`boolean`} - \n\n * `COMPOSED` {`boolean`} - \n\n * `CANCELABLE` {`boolean`} - ",
|
3680
3656
|
"attributes": [
|
3681
3657
|
{
|
3682
3658
|
"name": "type",
|
@@ -3689,6 +3665,11 @@
|
|
3689
3665
|
"name": "secondary"
|
3690
3666
|
}
|
3691
3667
|
]
|
3668
|
+
},
|
3669
|
+
{
|
3670
|
+
"name": "expandableRows",
|
3671
|
+
"description": "`expandableRows` {`boolean`} - \n\nProperty: expandableRows\n\nDefault: false",
|
3672
|
+
"valueSet": "v"
|
3692
3673
|
}
|
3693
3674
|
]
|
3694
3675
|
},
|
@@ -3730,8 +3711,23 @@
|
|
3730
3711
|
},
|
3731
3712
|
{
|
3732
3713
|
"name": "nile-table-row",
|
3733
|
-
"description": "nile-table-row component.\n\nProperties:\n\n * `BUBBLES` {`boolean`} - \n\n * `COMPOSED` {`boolean`} - \n\n * `CANCELABLE` {`boolean`} - ",
|
3734
|
-
"attributes": [
|
3714
|
+
"description": "nile-table-row component.\n\nEvents:\n\n * `nile-change` {`CustomEvent<{ expanded: boolean; }>`} - \n\nAttributes:\n\n * `expandable` {`boolean`} - \n\n * `expanded` {`boolean`} - \n\nProperties:\n\n * `expandable` {`boolean`} - \n\n * `expanded` {`boolean`} - \n\n * `_expandedSlot` {`HTMLSlotElement`} - \n\n * `_iconSlot` {`HTMLSlotElement`} - \n\n * `tableBodyHasExpandable` - \n\n * `_fallbackIcon` {`HTMLElement | null | undefined`} - \n\n * `BUBBLES` {`boolean`} - \n\n * `COMPOSED` {`boolean`} - \n\n * `CANCELABLE` {`boolean`} - ",
|
3715
|
+
"attributes": [
|
3716
|
+
{
|
3717
|
+
"name": "expandable",
|
3718
|
+
"description": "`expandable` {`boolean`} - \n\nProperty: expandable\n\nDefault: false",
|
3719
|
+
"valueSet": "v"
|
3720
|
+
},
|
3721
|
+
{
|
3722
|
+
"name": "expanded",
|
3723
|
+
"description": "`expanded` {`boolean`} - \n\nProperty: expanded\n\nDefault: false",
|
3724
|
+
"valueSet": "v"
|
3725
|
+
},
|
3726
|
+
{
|
3727
|
+
"name": "onnile-change",
|
3728
|
+
"description": "`nile-change` {`CustomEvent<{ expanded: boolean; }>`} - "
|
3729
|
+
}
|
3730
|
+
]
|
3735
3731
|
},
|
3736
3732
|
{
|
3737
3733
|
"name": "nile-table",
|
@@ -1 +0,0 @@
|
|
1
|
-
export { NileOptionGroup } from './nile-option-group';
|
@@ -1,60 +0,0 @@
|
|
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 { css } from 'lit';
|
9
|
-
|
10
|
-
/**
|
11
|
-
* OptionHeader CSS
|
12
|
-
*/
|
13
|
-
export const styles = css`
|
14
|
-
.option-group-header {
|
15
|
-
height: 40px;
|
16
|
-
display: flex;
|
17
|
-
align-items: center;
|
18
|
-
padding: 0px 12px;
|
19
|
-
background-color: var(--nile-colors-dark-200);
|
20
|
-
color: var(--nile-colors-dark-900);
|
21
|
-
font-feature-settings: 'liga' off, 'clig' off;
|
22
|
-
font-family: 'colfax-medium';
|
23
|
-
font-size: 12px;
|
24
|
-
font-weight: 500;
|
25
|
-
width: 100%;
|
26
|
-
box-sizing: border-box;
|
27
|
-
justify-content: space-between;
|
28
|
-
}
|
29
|
-
|
30
|
-
.content-container {
|
31
|
-
display: flex;
|
32
|
-
justify-content: flex-start;
|
33
|
-
align-items: center;
|
34
|
-
}
|
35
|
-
|
36
|
-
.gap-18px {
|
37
|
-
gap: 14px;
|
38
|
-
}
|
39
|
-
|
40
|
-
.option-group-prefix,
|
41
|
-
.option-group-suffix {
|
42
|
-
flex: 0 0 auto;
|
43
|
-
display: flex;
|
44
|
-
align-items: center;
|
45
|
-
}
|
46
|
-
|
47
|
-
.option-group-prefix::slotted(*) {
|
48
|
-
margin-inline-end: 0.5rem;
|
49
|
-
}
|
50
|
-
|
51
|
-
.option-group-suffix::slotted(*) {
|
52
|
-
margin-inline-start: 0.5rem;
|
53
|
-
}
|
54
|
-
|
55
|
-
:host(.nile-group-hidden)::part(option-group-header) {
|
56
|
-
display: none !important;
|
57
|
-
}
|
58
|
-
`;
|
59
|
-
|
60
|
-
export default [styles];
|
@@ -1,24 +0,0 @@
|
|
1
|
-
export interface IconData {
|
2
|
-
name: string;
|
3
|
-
size?: string;
|
4
|
-
color?: string;
|
5
|
-
}
|
6
|
-
|
7
|
-
export interface ImageData {
|
8
|
-
src?: string;
|
9
|
-
height?: string;
|
10
|
-
width?: string;
|
11
|
-
}
|
12
|
-
|
13
|
-
export interface PrefixSuffixData {
|
14
|
-
icon?: IconData;
|
15
|
-
prefixText?: string;
|
16
|
-
suffixText?: string;
|
17
|
-
image?: ImageData;
|
18
|
-
}
|
19
|
-
|
20
|
-
export interface OptionGroupData {
|
21
|
-
prefix?: PrefixSuffixData;
|
22
|
-
suffix?: PrefixSuffixData;
|
23
|
-
textContent?: string;
|
24
|
-
}
|