@aquera/nile-elements 0.1.51 → 0.1.52-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.
Files changed (154) hide show
  1. package/README.md +4 -0
  2. package/demo/index.html +150 -33
  3. package/demo/index.js +0 -1
  4. package/dist/index.cjs.js +1 -1
  5. package/dist/index.esm.js +1 -1
  6. package/dist/index.js +1363 -617
  7. package/dist/internal/form.cjs.js +1 -1
  8. package/dist/internal/form.cjs.js.map +1 -1
  9. package/dist/internal/form.esm.js +1 -1
  10. package/dist/nile-accordion/nile-accordian.test.cjs.js +1 -1
  11. package/dist/nile-auto-complete/index.cjs.js +1 -1
  12. package/dist/nile-auto-complete/index.esm.js +1 -1
  13. package/dist/nile-auto-complete/nile-auto-complete.cjs.js +1 -17
  14. package/dist/nile-auto-complete/nile-auto-complete.cjs.js.map +1 -1
  15. package/dist/nile-auto-complete/nile-auto-complete.esm.js +8 -29
  16. package/dist/nile-auto-complete/nile-auto-complete.test.cjs.js +1 -1
  17. package/dist/nile-auto-complete/nile-auto-complete.test.cjs.js.map +1 -1
  18. package/dist/nile-auto-complete/nile-auto-complete.test.esm.js +1 -1
  19. package/dist/nile-avatar/nile-avatar.test.cjs.js +1 -1
  20. package/dist/nile-badge/nile-badge.test.cjs.js +1 -1
  21. package/dist/nile-button/nile-button.test.cjs.js +1 -1
  22. package/dist/nile-button-toggle-group/nile-button-toggle-group.test.cjs.js +1 -1
  23. package/dist/nile-calendar/nile-calendar.test.cjs.js +1 -1
  24. package/dist/nile-calendar/nile-calendar.test.cjs.js.map +1 -1
  25. package/dist/nile-calendar/nile-calendar.test.esm.js +1 -1
  26. package/dist/nile-card/nile-card.test.cjs.js +1 -1
  27. package/dist/nile-checkbox/nile-checkbox.test.cjs.js +1 -1
  28. package/dist/nile-chip/nile-chip.test.cjs.js +1 -1
  29. package/dist/nile-chip/nile-chip.test.cjs.js.map +1 -1
  30. package/dist/nile-chip/nile-chip.test.esm.js +1 -1
  31. package/dist/nile-dialog/nile-dialog.test.cjs.js +1 -1
  32. package/dist/nile-drawer/nile-drawer.test.cjs.js +1 -1
  33. package/dist/nile-dropdown/nile-dropdown.test.cjs.js +1 -1
  34. package/dist/nile-empty-state/nile-empty-state.test.cjs.js +1 -1
  35. package/dist/nile-error-message/nile-error-message.test.cjs.js +1 -1
  36. package/dist/nile-filter-chip/nile-filter-chip.test.cjs.js +1 -1
  37. package/dist/nile-form-group/nile-form-group.test.cjs.js +1 -1
  38. package/dist/nile-form-help-text/nile-form-help-text.test.cjs.js +1 -1
  39. package/dist/nile-hero/nile-hero.test.cjs.js +1 -1
  40. package/dist/nile-icon/nile-icon.test.cjs.js +1 -1
  41. package/dist/nile-input/nile-input.test.cjs.js +1 -1
  42. package/dist/nile-link/nile-link.test.cjs.js +1 -1
  43. package/dist/nile-loader/nile-loader.test.cjs.js +1 -1
  44. package/dist/nile-option/nile-option.cjs.js +1 -1
  45. package/dist/nile-option/nile-option.cjs.js.map +1 -1
  46. package/dist/nile-option/nile-option.css.cjs.js +1 -1
  47. package/dist/nile-option/nile-option.css.cjs.js.map +1 -1
  48. package/dist/nile-option/nile-option.css.esm.js +1 -1
  49. package/dist/nile-option/nile-option.esm.js +2 -2
  50. package/dist/nile-popover/nile-popover.test.cjs.js +1 -1
  51. package/dist/nile-popup/nile-popup.test.cjs.js +1 -1
  52. package/dist/nile-progress-bar/nile-progress-bar.test.cjs.js +1 -1
  53. package/dist/nile-radio/nile-radio.test.cjs.js +1 -1
  54. package/dist/nile-radio-group/nile-radio-group.test.cjs.js +1 -1
  55. package/dist/nile-select/index.cjs.js +1 -1
  56. package/dist/nile-select/index.esm.js +1 -1
  57. package/dist/nile-select/nile-select.cjs.js +1 -1
  58. package/dist/nile-select/nile-select.cjs.js.map +1 -1
  59. package/dist/nile-select/nile-select.esm.js +2 -2
  60. package/dist/nile-select/nile-select.test.cjs.js +1 -1
  61. package/dist/nile-select/nile-select.test.cjs.js.map +1 -1
  62. package/dist/nile-select/nile-select.test.esm.js +2 -2
  63. package/dist/nile-select/virtual-scroll-helper.cjs.js +2 -0
  64. package/dist/nile-select/virtual-scroll-helper.cjs.js.map +1 -0
  65. package/dist/nile-select/virtual-scroll-helper.esm.js +38 -0
  66. package/dist/nile-slide-toggle/nile-slide-toggle.test.cjs.js +1 -1
  67. package/dist/nile-tab-group/nile-tab-group.test.cjs.js +1 -1
  68. package/dist/nile-textarea/nile-textarea.test.cjs.js +1 -1
  69. package/dist/nile-virtual-select/index.cjs.js +2 -0
  70. package/dist/nile-virtual-select/index.cjs.js.map +1 -0
  71. package/dist/nile-virtual-select/index.esm.js +1 -0
  72. package/dist/nile-virtual-select/nile-virtual-select.cjs.js +2 -0
  73. package/dist/nile-virtual-select/nile-virtual-select.cjs.js.map +1 -0
  74. package/dist/nile-virtual-select/nile-virtual-select.css.cjs.js +2 -0
  75. package/dist/nile-virtual-select/nile-virtual-select.css.cjs.js.map +1 -0
  76. package/dist/nile-virtual-select/nile-virtual-select.css.esm.js +467 -0
  77. package/dist/nile-virtual-select/nile-virtual-select.esm.js +227 -0
  78. package/dist/nile-virtual-select/nile-virtual-select.test.cjs.js +2 -0
  79. package/dist/nile-virtual-select/nile-virtual-select.test.cjs.js.map +1 -0
  80. package/dist/nile-virtual-select/nile-virtual-select.test.esm.js +49 -0
  81. package/dist/nile-virtual-select/renderer.cjs.js +2 -0
  82. package/dist/nile-virtual-select/renderer.cjs.js.map +1 -0
  83. package/dist/nile-virtual-select/renderer.esm.js +18 -0
  84. package/dist/nile-virtual-select/search-manager.cjs.js +2 -0
  85. package/dist/nile-virtual-select/search-manager.cjs.js.map +1 -0
  86. package/dist/nile-virtual-select/search-manager.esm.js +1 -0
  87. package/dist/nile-virtual-select/selection-manager.cjs.js +2 -0
  88. package/dist/nile-virtual-select/selection-manager.cjs.js.map +1 -0
  89. package/dist/nile-virtual-select/selection-manager.esm.js +1 -0
  90. package/dist/nile-virtual-select/types.cjs.js +2 -0
  91. package/dist/nile-virtual-select/types.cjs.js.map +1 -0
  92. package/dist/nile-virtual-select/types.esm.js +1 -0
  93. package/dist/src/index.d.ts +1 -0
  94. package/dist/src/index.js +1 -0
  95. package/dist/src/index.js.map +1 -1
  96. package/dist/src/internal/form.js +2 -2
  97. package/dist/src/internal/form.js.map +1 -1
  98. package/dist/src/nile-option/nile-option.css.js +1 -1
  99. package/dist/src/nile-option/nile-option.css.js.map +1 -1
  100. package/dist/src/nile-option/nile-option.d.ts +5 -1
  101. package/dist/src/nile-option/nile-option.js +21 -6
  102. package/dist/src/nile-option/nile-option.js.map +1 -1
  103. package/dist/src/nile-select/nile-select.d.ts +11 -2
  104. package/dist/src/nile-select/nile-select.js +37 -18
  105. package/dist/src/nile-select/nile-select.js.map +1 -1
  106. package/dist/src/nile-select/virtual-scroll-helper.d.ts +9 -0
  107. package/dist/src/nile-select/virtual-scroll-helper.js +51 -0
  108. package/dist/src/nile-select/virtual-scroll-helper.js.map +1 -0
  109. package/dist/src/nile-virtual-select/index.d.ts +1 -0
  110. package/dist/src/nile-virtual-select/index.js +2 -0
  111. package/dist/src/nile-virtual-select/index.js.map +1 -0
  112. package/dist/src/nile-virtual-select/nile-virtual-select.css.d.ts +12 -0
  113. package/dist/src/nile-virtual-select/nile-virtual-select.css.js +479 -0
  114. package/dist/src/nile-virtual-select/nile-virtual-select.css.js.map +1 -0
  115. package/dist/src/nile-virtual-select/nile-virtual-select.d.ts +263 -0
  116. package/dist/src/nile-virtual-select/nile-virtual-select.js +1183 -0
  117. package/dist/src/nile-virtual-select/nile-virtual-select.js.map +1 -0
  118. package/dist/src/nile-virtual-select/nile-virtual-select.test.d.ts +7 -0
  119. package/dist/src/nile-virtual-select/nile-virtual-select.test.js +341 -0
  120. package/dist/src/nile-virtual-select/nile-virtual-select.test.js.map +1 -0
  121. package/dist/src/nile-virtual-select/renderer.d.ts +11 -0
  122. package/dist/src/nile-virtual-select/renderer.js +51 -0
  123. package/dist/src/nile-virtual-select/renderer.js.map +1 -0
  124. package/dist/src/nile-virtual-select/search-manager.d.ts +12 -0
  125. package/dist/src/nile-virtual-select/search-manager.js +40 -0
  126. package/dist/src/nile-virtual-select/search-manager.js.map +1 -0
  127. package/dist/src/nile-virtual-select/selection-manager.d.ts +12 -0
  128. package/dist/src/nile-virtual-select/selection-manager.js +64 -0
  129. package/dist/src/nile-virtual-select/selection-manager.js.map +1 -0
  130. package/dist/src/nile-virtual-select/types.d.ts +50 -0
  131. package/dist/src/nile-virtual-select/types.js +8 -0
  132. package/dist/src/nile-virtual-select/types.js.map +1 -0
  133. package/dist/tsconfig.tsbuildinfo +1 -1
  134. package/dist/virtualize-a4a40d96.esm.js +22 -0
  135. package/dist/virtualize-b6a2fbe0.cjs.js +18 -0
  136. package/dist/virtualize-b6a2fbe0.cjs.js.map +1 -0
  137. package/package.json +1 -2
  138. package/src/index.ts +3 -1
  139. package/src/internal/form.ts +2 -2
  140. package/src/nile-option/nile-option.css.ts +1 -1
  141. package/src/nile-option/nile-option.ts +17 -3
  142. package/src/nile-select/nile-select.ts +35 -9
  143. package/src/nile-select/virtual-scroll-helper.ts +56 -0
  144. package/src/nile-virtual-select/index.ts +1 -0
  145. package/src/nile-virtual-select/nile-virtual-select.css.ts +481 -0
  146. package/src/nile-virtual-select/nile-virtual-select.test.ts +414 -0
  147. package/src/nile-virtual-select/nile-virtual-select.ts +1268 -0
  148. package/src/nile-virtual-select/renderer.ts +73 -0
  149. package/src/nile-virtual-select/search-manager.ts +50 -0
  150. package/src/nile-virtual-select/selection-manager.ts +75 -0
  151. package/src/nile-virtual-select/types.ts +54 -0
  152. package/vscode-html-custom-data.json +229 -2
  153. package/demo/filenames.txt +0 -1
  154. package/demo/filenames.txt +0 -1
@@ -33,8 +33,11 @@ import type { CSSResultGroup, PropertyValues } from 'lit';
33
33
  import type { NileFormControl } from '../internal/nile-element';
34
34
  import type NileOption from '../nile-option/nile-option';
35
35
  import type NilePopup from '../nile-popup/nile-popup';
36
+ import type { RenderItemConfig } from '../nile-virtual-select/types.js';
36
37
  import { unsafeHTML } from 'lit/directives/unsafe-html.js';
37
38
  import { ifDefined } from 'lit/directives/if-defined.js';
39
+ import '../nile-virtual-select/nile-virtual-select';
40
+ import { VirtualScrollHelper } from './virtual-scroll-helper';
38
41
 
39
42
  type NileRemoveEvent = CustomEvent<Record<PropertyKey, never>>;
40
43
 
@@ -53,6 +56,7 @@ type NileRemoveEvent = CustomEvent<Record<PropertyKey, never>>;
53
56
  * @dependency nile-icon
54
57
  * @dependency nile-popup
55
58
  * @dependency nile-tag
59
+ * @dependency nile-virtual-select
56
60
  *
57
61
  * @slot - The listbox options. Must be `<nile-option>` elements. You can use `<nile-divider>` to group items visually.
58
62
  * @slot label - The input's label. Alternatively, you can use the `label` attribute.
@@ -91,14 +95,15 @@ type NileRemoveEvent = CustomEvent<Record<PropertyKey, never>>;
91
95
  */
92
96
 
93
97
  @customElement('nile-select')
94
- export class NileSelect extends NileElement implements NileFormControl {
98
+ export class NileSelect extends NileElement implements NileFormControl{
95
99
  static styles: CSSResultGroup = styles;
96
100
 
97
101
  // protected override BUBBLES=false;
98
102
 
99
- private readonly formControlController = new FormControlController(this, {
100
- assumeInteractionOn: ['nile-blur', 'nile-input'],
101
- });
103
+ private formControlController: FormControlController | null;
104
+ private virtualScrollHelper!: VirtualScrollHelper;
105
+
106
+
102
107
  private readonly hasSlotController = new HasSlotController(
103
108
  this,
104
109
  'help-text',
@@ -232,6 +237,13 @@ export class NileSelect extends NileElement implements NileFormControl {
232
237
 
233
238
  @property({ type: String }) noResultsMessage: string = 'No results found';
234
239
 
240
+ /** Enhanced configuration for rendering items with support for display text, value, and search text */
241
+ @property({ attribute: false }) renderItemConfig?: RenderItemConfig;
242
+
243
+ @property({ type: Array }) data: any = [];
244
+
245
+ @property({ type: Boolean }) enableVirtualScroll = false;
246
+
235
247
  /** Gets the validity state object */
236
248
  get validity() {
237
249
  return this.valueInput?.validity;
@@ -242,8 +254,18 @@ export class NileSelect extends NileElement implements NileFormControl {
242
254
  return this.valueInput?.validationMessage;
243
255
  }
244
256
 
257
+ constructor() {
258
+ super();
259
+ }
260
+
245
261
  connectedCallback() {
246
262
  super.connectedCallback();
263
+ if(!this.enableVirtualScroll) {
264
+ this.formControlController = new FormControlController(this, {
265
+ assumeInteractionOn: ['nile-blur', 'nile-input'],
266
+ });
267
+ }
268
+ this.virtualScrollHelper = new VirtualScrollHelper(this);
247
269
  this.handleDocumentFocusIn = this.handleDocumentFocusIn.bind(this);
248
270
  this.handleDocumentKeyDown = this.handleDocumentKeyDown.bind(this);
249
271
  this.handleDocumentMouseDown = this.handleDocumentMouseDown.bind(this);
@@ -747,7 +769,7 @@ export class NileSelect extends NileElement implements NileFormControl {
747
769
 
748
770
  // Update validity
749
771
  this.updateComplete.then(() => {
750
- this.formControlController.updateValidity();
772
+ this.formControlController?.updateValidity();
751
773
  });
752
774
 
753
775
  this.calculateTotalWidthOfTags();
@@ -798,8 +820,8 @@ export class NileSelect extends NileElement implements NileFormControl {
798
820
  }
799
821
 
800
822
  private handleInvalid(event: Event) {
801
- this.formControlController.setValidity(false);
802
- this.formControlController.emitInvalidEvent(event);
823
+ this.formControlController?.setValidity(false);
824
+ this.formControlController?.emitInvalidEvent(event);
803
825
  }
804
826
 
805
827
  @watch('disabled', { waitUntilFirstUpdate: true })
@@ -902,7 +924,7 @@ export class NileSelect extends NileElement implements NileFormControl {
902
924
 
903
925
  /** Gets the associated form, if one exists. */
904
926
  getForm(): HTMLFormElement | null {
905
- return this.formControlController.getForm();
927
+ return this.formControlController?.getForm() || null;
906
928
  }
907
929
 
908
930
  /** Checks for validity and shows the browser's validation message if the control is invalid. */
@@ -913,7 +935,7 @@ export class NileSelect extends NileElement implements NileFormControl {
913
935
  /** Sets a custom validation message. Pass an empty string to restore validity. */
914
936
  setCustomValidity(message: string) {
915
937
  this.valueInput.setCustomValidity(message);
916
- this.formControlController.updateValidity();
938
+ this.formControlController?.updateValidity();
917
939
  }
918
940
 
919
941
  /** Sets focus on the control. */
@@ -986,6 +1008,10 @@ export class NileSelect extends NileElement implements NileFormControl {
986
1008
  }
987
1009
 
988
1010
  render() {
1011
+ if(this.enableVirtualScroll) {
1012
+ return this.virtualScrollHelper.renderVirtualizedContent();
1013
+ }
1014
+
989
1015
  const hasLabelSlot = this.hasSlotController.test('label');
990
1016
  const hasHelpTextSlot = this.hasSlotController.test('help-text');
991
1017
  const hasLabelSuffixSlot = this.hasSlotController.test('label-suffix');
@@ -0,0 +1,56 @@
1
+ import { html } from 'lit';
2
+ import type NileElement from '../internal/nile-element';
3
+
4
+ /**
5
+ * Helper class to manage virtual scroll functionality for nile-select component
6
+ */
7
+ export class VirtualScrollHelper {
8
+ private component: NileElement;
9
+
10
+ constructor(component: NileElement) {
11
+ this.component = component;
12
+ }
13
+
14
+ renderVirtualizedContent(): any {
15
+ const component = this.component as any;
16
+
17
+ return html`
18
+ <div class="virtual-select">
19
+ <nile-virtual-select
20
+ .name=${component.name}
21
+ .value=${component.value}
22
+ .placeholder=${component.placeholder}
23
+ .size=${component.size}
24
+ .searchEnabled=${component.searchEnabled}
25
+ .internalSearchPlaceHolder=${component.internalSearchPlaceHolder}
26
+ .disableLocalSearch=${component.disableLocalSearch}
27
+ .optionsLoading=${component.optionsLoading}
28
+ .multiple=${component.multiple}
29
+ .helpText=${component.helpText}
30
+ .errorMessage=${component.errorMessage}
31
+ .warning=${component.warning}
32
+ .error=${component.error}
33
+ .success=${component.success}
34
+ .disabled=${component.disabled}
35
+ .clearable=${component.clearable}
36
+ .hoist=${component.hoist}
37
+ .filled=${component.filled}
38
+ .pill=${component.pill}
39
+ .label=${component.label}
40
+ .placement=${component.placement}
41
+ .form=${component.form}
42
+ .required=${component.required}
43
+ .showNoResults=${component.showNoResults}
44
+ .noResultsMessage=${component.noResultsMessage}
45
+ .renderItemConfig=${component.renderItemConfig}
46
+ .blockValueChange=${component.blockValueChange}
47
+ .noWidthSync=${component.noWidthSync}
48
+ .maxOptionsVisible=${component.maxOptionsVisible}
49
+ .data=${component.data}
50
+ >
51
+ <slot name="prefix" slot="prefix"></slot>
52
+ </nile-virtual-select>
53
+ </div>
54
+ `;
55
+ }
56
+ }
@@ -0,0 +1 @@
1
+ export { NileVirtualSelect } from './nile-virtual-select';
@@ -0,0 +1,481 @@
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
+ * Select_2 CSS
12
+ */
13
+ export const styles = css`
14
+ :host {
15
+ box-sizing: border-box;
16
+ }
17
+
18
+ .virtualized{
19
+ min-width: 110px;
20
+ width: 100%;
21
+ }
22
+
23
+ .virtualized ::slotted(nile-option),
24
+ .virtualized nile-option {
25
+ width: 100%;
26
+ display: block;
27
+ }
28
+
29
+ :host *,
30
+ :host *::before,
31
+ :host *::after {
32
+ box-sizing: inherit;
33
+ }
34
+
35
+ [hidden] {
36
+ display: none !important;
37
+ }
38
+
39
+ .form-control .form-control__label {
40
+ display: none;
41
+ }
42
+
43
+ .form-control .form-control__help-text {
44
+ display: none;
45
+ }
46
+
47
+ /* Label */
48
+ .form-control--has-label .form-control__label {
49
+ display: block;
50
+ margin-bottom: 6px;
51
+ color: var(--nile-colors-dark-900);
52
+ font-family: Colfax-regular;
53
+ font-size: 14px;
54
+ font-style: normal;
55
+ font-weight: 400;
56
+ line-height: 20px;
57
+ letter-spacing: 0.2px;
58
+ }
59
+
60
+ .form-control--has-label.form-control--medium .form-control__label {
61
+ font-size: 14px;
62
+ }
63
+
64
+ :host([required]) .form-control--has-label .form-control__label::after {
65
+ content: '*';
66
+ margin-inline-start: -2px;
67
+ color: var(--nile-colors-red-700);
68
+ }
69
+
70
+ /* Help text */
71
+ .form-control--has-help-text .form-control__help-text {
72
+ display: block;
73
+ color: var(--nile-colors-dark-500);
74
+ margin-top: 0.75rem;
75
+ }
76
+
77
+ .form-control--has-help-text.form-control--medium .form-control__help-text {
78
+ font-size: 0.875rem;
79
+ }
80
+
81
+ .form-control--has-help-text.form-control--radio-group
82
+ .form-control__help-text {
83
+ margin-top: 0.25rem;
84
+ }
85
+
86
+ :host {
87
+ display: block;
88
+ }
89
+
90
+ /** The popup */
91
+ .select {
92
+ flex: 1 1 auto;
93
+ display: inline-flex;
94
+ width: 100%;
95
+ position: relative;
96
+ vertical-align: middle;
97
+ }
98
+
99
+ .select::part(popup) {
100
+ z-index: 9999;
101
+ }
102
+
103
+ .select[data-current-placement^='top']::part(popup) {
104
+ transform-origin: bottom;
105
+ }
106
+
107
+ .select[data-current-placement^='bottom']::part(popup) {
108
+ transform-origin: top;
109
+ }
110
+
111
+ /* Combobox */
112
+ .select__combobox {
113
+ flex: 1;
114
+ display: flex;
115
+ width: 100%;
116
+ min-width: 0;
117
+ position: relative;
118
+ align-items: center;
119
+ justify-content: start;
120
+ font-family: var(--nile-font-family-sans-serif);
121
+ font-weight: 400;
122
+ letter-spacing: normal;
123
+ vertical-align: middle;
124
+ overflow: hidden;
125
+ cursor: pointer;
126
+ transition: 150ms color, 150ms border, 150ms box-shadow,
127
+ 150ms background-color;
128
+ }
129
+
130
+ .select__display-input {
131
+ position: relative;
132
+ width: 100%;
133
+ font: inherit;
134
+ border: none;
135
+ background: none;
136
+ color: var(--nile-colors-dark-900);
137
+ cursor: inherit;
138
+ overflow: hidden;
139
+ padding: 0;
140
+ margin: 0;
141
+ -webkit-appearance: none;
142
+ font-family: var(--nile-font-family-serif);
143
+ }
144
+
145
+ .select__display-input::placeholder {
146
+ font-family: var(--nile-font-family-serif);
147
+ }
148
+
149
+ .select:not(.select--disabled):hover .select__display-input {
150
+ color: var(--nile-colors-dark-900);
151
+ }
152
+
153
+ .select__display-input:focus {
154
+ outline: none;
155
+ }
156
+
157
+ /* Visually hide the display input when multiple is enabled */
158
+ .select--multiple:not(.select--placeholder-visible) .select__display-input {
159
+ position: absolute;
160
+ z-index: -1;
161
+ top: 0;
162
+ left: 0;
163
+ width: 100%;
164
+ height: 100%;
165
+ opacity: 0;
166
+ }
167
+
168
+ .select__value-input {
169
+ position: absolute;
170
+ top: 0;
171
+ left: 0;
172
+ width: 100%;
173
+ height: 100%;
174
+ padding: 0;
175
+ margin: 0;
176
+ opacity: 0;
177
+ z-index: -1;
178
+ }
179
+
180
+ .select__tags {
181
+ display: flex;
182
+ flex: 1;
183
+ align-items: center;
184
+ flex-wrap: no-wrap;
185
+ margin-inline-start: 0.5rem;
186
+ width: 100%;
187
+ overflow: hidden;
188
+ }
189
+
190
+ .select__tags-count {
191
+ color: var(--nile-colors-primary-600);
192
+ font-family: Colfax-regular;
193
+ font-size: 14px;
194
+ font-style: normal;
195
+ font-weight: 400;
196
+ line-height: 14px;
197
+ letter-spacing: 0.2px;
198
+ margin: 6px;
199
+ }
200
+
201
+ .select__tags-count-clearable {
202
+ margin-right: 50px;
203
+ }
204
+
205
+ .select__tags::slotted(nile-tag) {
206
+ cursor: pointer !important;
207
+ }
208
+
209
+ .select--disabled .select__tags,
210
+ .select--disabled .select__tags::slotted(nile-tag) {
211
+ cursor: not-allowed !important;
212
+ }
213
+
214
+ /* Standard selects */
215
+ .select--standard .select__combobox {
216
+ background-color: var(--nile-colors-white-base);
217
+ border: solid 1px var(--nile-colors-neutral-500);
218
+ }
219
+
220
+ .select--standard .select__combobox:hover {
221
+ border: 1px solid var(--nile-colors-dark-900);
222
+ background: var(--nile-colors-white-base);
223
+ }
224
+
225
+ .select--standard.select--disabled .select__combobox {
226
+ background-color: var(--nile-colors-neutral-100);
227
+ border-color: var(--nile-colors-neutral-500);
228
+ color: var(--nile-colors-dark-500);
229
+ opacity: 0.5;
230
+ cursor: not-allowed;
231
+ outline: none;
232
+ }
233
+
234
+ .select--standard:not(.select--disabled).select--open .select__combobox,
235
+ .select--standard:not(.select--disabled).select--focused .select__combobox {
236
+ background-color: var(--nile-colors-neutral-100);
237
+ }
238
+
239
+ .select--warning .select__combobox {
240
+ border-color: var(--nile-colors-yellow-500);
241
+ }
242
+
243
+ .select--error .select__combobox {
244
+ border-color: var(--nile-colors-red-500);
245
+ }
246
+
247
+ .select--success {
248
+ border-color: var(--nile-colors-green-500);
249
+ }
250
+
251
+ /* Filled selects */
252
+ .select--filled .select__combobox {
253
+ border: none;
254
+ background-color: var(--nile-colors-neutral-100);
255
+ color: var(--nile-colors-dark-900);
256
+ }
257
+
258
+ .select--filled:hover:not(.select--disabled) .select__combobox {
259
+ background-color: var(--nile-colors-neutral-100);
260
+ }
261
+
262
+ .select--filled.select--disabled .select__combobox {
263
+ background-color: var(--nile-colors-neutral-100);
264
+ opacity: 0.5;
265
+ cursor: not-allowed;
266
+ }
267
+
268
+ .select--filled:not(.select--disabled).select--open .select__combobox,
269
+ .select--filled:not(.select--disabled).select--focused .select__combobox {
270
+ background-color: var(--nile-colors-neutral-100);
271
+ outline: 3px solid rgba(0, 89, 255, 0.4);
272
+ }
273
+
274
+ .select--medium .select__combobox {
275
+ border-radius: 4px;
276
+ font-size: 14px;
277
+ padding: 12px;
278
+ height: 40px;
279
+ box-sizing: border-box;
280
+ }
281
+
282
+ .select--medium .select__clear {
283
+ margin-inline-start: 0.75rem;
284
+ }
285
+
286
+ .select--medium .select__prefix::slotted(*) {
287
+ margin-inline-end: 0.75rem;
288
+ }
289
+
290
+ .select--medium .select__prefix.multiple::slotted(*) {
291
+ margin-inline-start: 0.75rem;
292
+ }
293
+
294
+ .select--medium.select--multiple:not(.select--placeholder-visible)
295
+ .select__combobox {
296
+ padding-inline-start: 0;
297
+ }
298
+
299
+ .select--medium .select__tags {
300
+ gap: 3px;
301
+ }
302
+
303
+ /* Pills */
304
+ .select--pill.select--medium .select__combobox {
305
+ border-radius: 2.5rem;
306
+ }
307
+
308
+ /* Prefix */
309
+ .select__prefix {
310
+ flex: 0;
311
+ display: inline-flex;
312
+ align-items: center;
313
+ color: var(--nile-colors-dark-500);
314
+ }
315
+
316
+ .select__suffix {
317
+ flex: 0;
318
+ display: inline-flex;
319
+ align-items: center;
320
+ color: var(--nile-colors-dark-500);
321
+ }
322
+
323
+ /* Clear button */
324
+ .select__clear {
325
+ display: inline-flex;
326
+ align-items: center;
327
+ justify-content: center;
328
+ font-size: inherit;
329
+ color: var(--nile-colors-primary-600);
330
+ border: none;
331
+ background: none;
332
+ padding: 0;
333
+ transition: 150ms color;
334
+ cursor: pointer;
335
+ }
336
+
337
+ .select__clear:hover {
338
+ color: var(--nile-colors-dark-500);
339
+ }
340
+
341
+ .select__clear:focus {
342
+ outline: none;
343
+ }
344
+
345
+ /* Expand icon */
346
+ .select__expand-icon {
347
+ flex: 0 0 auto;
348
+ display: flex;
349
+ align-items: center;
350
+ transition: 250ms rotate ease;
351
+ rotate: 0;
352
+ margin-inline-start: 0.25rem;
353
+ }
354
+
355
+ .select--open .select__expand-icon {
356
+ rotate: -180deg;
357
+ }
358
+
359
+ /* Listbox */
360
+ .select__listbox {
361
+ display: block;
362
+ position: relative;
363
+ font-size: 1rem;
364
+ font-weight: 400;
365
+ background: var(--nile-colors-white-base);
366
+ border: solid 1px var(--nile-colors-neutral-500);
367
+ border-radius: 0.25rem;
368
+ padding-block: 0;
369
+ padding-inline: 0;
370
+ overflow: auto;
371
+ overscroll-behavior: none;
372
+ /* Make sure it adheres to the popup's auto size */
373
+ max-width: var(--auto-size-available-width);
374
+ max-height: var(--auto-size-available-height);
375
+ }
376
+
377
+ .select__options {
378
+ font-size: 14px;
379
+ color: rgb(133, 129, 129);
380
+ width: 100%;
381
+ }
382
+
383
+ .select__options__search-enabled {
384
+ padding-top: 10px;
385
+ width: 100%;
386
+ }
387
+
388
+ .select__listbox::slotted(nile-divider) {
389
+ --spacing: 0.25rem;
390
+ }
391
+
392
+ .select__listbox::slotted(small) {
393
+ font-size: 0.875rem;
394
+ font-weight: 600;
395
+ color: var(--nile-colors-dark-500);
396
+ padding-block: 0.25rem;
397
+ padding-inline: 1rem;
398
+ }
399
+
400
+ .select__search {
401
+ position: sticky;
402
+ top: 0px;
403
+ z-index: 1;
404
+ width: calc(100% - 16px);
405
+ padding: 8px;
406
+ background-color: white;
407
+ margin-bottom: -8px;
408
+ }
409
+
410
+ .select__footer {
411
+ position: sticky;
412
+ bottom: 0px;
413
+ background: var(--nile-colors-neutral-100);
414
+ border: 1px solid var(--nile-colors-neutral-400);
415
+ display: flex;
416
+ height: 15px;
417
+ /* Auto layout */
418
+ display: flex;
419
+ flex-direction: row;
420
+ align-items: flex-start;
421
+ padding: 8px 12px 16px;
422
+ gap: 12px;
423
+ justify-content: space-between;
424
+ }
425
+
426
+ .tag__prefix[slot='prefix'] {
427
+ height: 14px;
428
+ display: inline-block;
429
+ overflow: hidden;
430
+ }
431
+
432
+ .tag__prefix[slot='prefix'] img {
433
+ max-height: 100%;
434
+ }
435
+
436
+ .select__loader {
437
+ width: 100%;
438
+ text-align: center;
439
+ display: block;
440
+ }
441
+
442
+ .select__loader--icon {
443
+ margin-top: 20px;
444
+ animation: spin 0.6s linear infinite;
445
+ }
446
+
447
+ .select__no-results {
448
+ padding: 10px;
449
+ }
450
+
451
+ @keyframes spin {
452
+ 0% {
453
+ transform: rotate(0deg);
454
+ }
455
+ 100% {
456
+ transform: rotate(360deg);
457
+ }
458
+ }
459
+
460
+ .select__invisible{
461
+ opacity: 0;
462
+ }
463
+
464
+ .select__prefix--from-options {
465
+ margin-inline-end: 12px;
466
+ }
467
+
468
+ .select__hide-default{
469
+ display: none;
470
+ }
471
+
472
+ .virtualized nile-option[selected] {
473
+ background-color: var(--nile-colors-neutral-100);
474
+ }
475
+
476
+ .virtualized nile-option[selected]::part(base) {
477
+ color: var(--nile-colors-primary-600);
478
+ }
479
+ `;
480
+
481
+ export default [styles];