@aquera/nile-elements 0.1.52-beta-1.2 → 0.1.52-beta-1.5

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 (168) hide show
  1. package/README.md +2 -3
  2. package/demo/index.html +33 -150
  3. package/dist/index.cjs.js +1 -1
  4. package/dist/index.esm.js +1 -1
  5. package/dist/index.js +639 -1385
  6. package/dist/internal/form.cjs.js +1 -1
  7. package/dist/internal/form.cjs.js.map +1 -1
  8. package/dist/internal/form.esm.js +1 -1
  9. package/dist/nile-accordion/nile-accordian.test.cjs.js +1 -1
  10. package/dist/nile-auto-complete/index.cjs.js +1 -1
  11. package/dist/nile-auto-complete/index.esm.js +1 -1
  12. package/dist/nile-auto-complete/nile-auto-complete.cjs.js +17 -1
  13. package/dist/nile-auto-complete/nile-auto-complete.cjs.js.map +1 -1
  14. package/dist/nile-auto-complete/nile-auto-complete.esm.js +29 -8
  15. package/dist/nile-auto-complete/nile-auto-complete.test.cjs.js +1 -1
  16. package/dist/nile-auto-complete/nile-auto-complete.test.cjs.js.map +1 -1
  17. package/dist/nile-auto-complete/nile-auto-complete.test.esm.js +1 -1
  18. package/dist/nile-avatar/nile-avatar.test.cjs.js +1 -1
  19. package/dist/nile-badge/nile-badge.test.cjs.js +1 -1
  20. package/dist/nile-button/nile-button.test.cjs.js +1 -1
  21. package/dist/nile-button-toggle-group/nile-button-toggle-group.test.cjs.js +1 -1
  22. package/dist/nile-calendar/nile-calendar.test.cjs.js +1 -1
  23. package/dist/nile-calendar/nile-calendar.test.cjs.js.map +1 -1
  24. package/dist/nile-calendar/nile-calendar.test.esm.js +1 -1
  25. package/dist/nile-card/nile-card.test.cjs.js +1 -1
  26. package/dist/nile-checkbox/nile-checkbox.test.cjs.js +1 -1
  27. package/dist/nile-chip/nile-chip.test.cjs.js +1 -1
  28. package/dist/nile-chip/nile-chip.test.cjs.js.map +1 -1
  29. package/dist/nile-chip/nile-chip.test.esm.js +1 -1
  30. package/dist/nile-code-editor/extensionSetup.cjs.js +5 -5
  31. package/dist/nile-code-editor/extensionSetup.cjs.js.map +1 -1
  32. package/dist/nile-code-editor/extensionSetup.esm.js +1 -1
  33. package/dist/nile-code-editor/nile-code-editor.cjs.js +2 -2
  34. package/dist/nile-code-editor/nile-code-editor.cjs.js.map +1 -1
  35. package/dist/nile-code-editor/nile-code-editor.esm.js +3 -3
  36. package/dist/nile-code-editor/theme.cjs.js +1 -1
  37. package/dist/nile-code-editor/theme.cjs.js.map +1 -1
  38. package/dist/nile-code-editor/theme.esm.js +1 -1
  39. package/dist/nile-dialog/nile-dialog.test.cjs.js +1 -1
  40. package/dist/nile-drawer/nile-drawer.test.cjs.js +1 -1
  41. package/dist/nile-dropdown/nile-dropdown.test.cjs.js +1 -1
  42. package/dist/nile-empty-state/nile-empty-state.test.cjs.js +1 -1
  43. package/dist/nile-error-message/nile-error-message.test.cjs.js +1 -1
  44. package/dist/nile-filter-chip/nile-filter-chip.test.cjs.js +1 -1
  45. package/dist/nile-form-group/nile-form-group.test.cjs.js +1 -1
  46. package/dist/nile-form-help-text/nile-form-help-text.test.cjs.js +1 -1
  47. package/dist/nile-hero/nile-hero.test.cjs.js +1 -1
  48. package/dist/nile-icon/nile-icon.test.cjs.js +1 -1
  49. package/dist/nile-input/nile-input.test.cjs.js +1 -1
  50. package/dist/nile-link/nile-link.test.cjs.js +1 -1
  51. package/dist/nile-loader/nile-loader.test.cjs.js +1 -1
  52. package/dist/nile-option/nile-option.cjs.js +1 -1
  53. package/dist/nile-option/nile-option.cjs.js.map +1 -1
  54. package/dist/nile-option/nile-option.css.cjs.js +1 -1
  55. package/dist/nile-option/nile-option.css.cjs.js.map +1 -1
  56. package/dist/nile-option/nile-option.css.esm.js +1 -1
  57. package/dist/nile-option/nile-option.esm.js +2 -2
  58. package/dist/nile-popover/nile-popover.test.cjs.js +1 -1
  59. package/dist/nile-popup/nile-popup.test.cjs.js +1 -1
  60. package/dist/nile-progress-bar/nile-progress-bar.test.cjs.js +1 -1
  61. package/dist/nile-radio/nile-radio.test.cjs.js +1 -1
  62. package/dist/nile-radio-group/nile-radio-group.test.cjs.js +1 -1
  63. package/dist/nile-select/index.cjs.js +1 -1
  64. package/dist/nile-select/index.esm.js +1 -1
  65. package/dist/nile-select/nile-select.cjs.js +1 -1
  66. package/dist/nile-select/nile-select.cjs.js.map +1 -1
  67. package/dist/nile-select/nile-select.esm.js +2 -2
  68. package/dist/nile-select/nile-select.test.cjs.js +1 -1
  69. package/dist/nile-select/nile-select.test.cjs.js.map +1 -1
  70. package/dist/nile-select/nile-select.test.esm.js +2 -2
  71. package/dist/nile-slide-toggle/nile-slide-toggle.test.cjs.js +1 -1
  72. package/dist/nile-tab-group/nile-tab-group.test.cjs.js +1 -1
  73. package/dist/nile-textarea/nile-textarea.test.cjs.js +1 -1
  74. package/dist/src/index.d.ts +0 -1
  75. package/dist/src/index.js +0 -1
  76. package/dist/src/index.js.map +1 -1
  77. package/dist/src/internal/form.js +2 -2
  78. package/dist/src/internal/form.js.map +1 -1
  79. package/dist/src/nile-code-editor/nile-code-editor.d.ts +2 -0
  80. package/dist/src/nile-code-editor/nile-code-editor.js +46 -4
  81. package/dist/src/nile-code-editor/nile-code-editor.js.map +1 -1
  82. package/dist/src/nile-code-editor/theme.d.ts +68 -0
  83. package/dist/src/nile-code-editor/theme.js +68 -0
  84. package/dist/src/nile-code-editor/theme.js.map +1 -1
  85. package/dist/src/nile-option/nile-option.css.js +1 -1
  86. package/dist/src/nile-option/nile-option.css.js.map +1 -1
  87. package/dist/src/nile-option/nile-option.d.ts +1 -5
  88. package/dist/src/nile-option/nile-option.js +6 -21
  89. package/dist/src/nile-option/nile-option.js.map +1 -1
  90. package/dist/src/nile-select/nile-select.d.ts +2 -11
  91. package/dist/src/nile-select/nile-select.js +18 -37
  92. package/dist/src/nile-select/nile-select.js.map +1 -1
  93. package/dist/tsconfig.tsbuildinfo +1 -1
  94. package/package.json +4 -1
  95. package/src/index.ts +1 -3
  96. package/src/internal/form.ts +2 -2
  97. package/src/nile-code-editor/nile-code-editor.ts +53 -4
  98. package/src/nile-code-editor/theme.ts +69 -0
  99. package/src/nile-option/nile-option.css.ts +1 -1
  100. package/src/nile-option/nile-option.ts +3 -17
  101. package/src/nile-select/nile-select.ts +9 -35
  102. package/vscode-html-custom-data.json +8 -230
  103. package/dist/nile-select/virtual-scroll-helper.cjs.js +0 -2
  104. package/dist/nile-select/virtual-scroll-helper.cjs.js.map +0 -1
  105. package/dist/nile-select/virtual-scroll-helper.esm.js +0 -38
  106. package/dist/nile-virtual-select/index.cjs.js +0 -2
  107. package/dist/nile-virtual-select/index.cjs.js.map +0 -1
  108. package/dist/nile-virtual-select/index.esm.js +0 -1
  109. package/dist/nile-virtual-select/nile-virtual-select.cjs.js +0 -2
  110. package/dist/nile-virtual-select/nile-virtual-select.cjs.js.map +0 -1
  111. package/dist/nile-virtual-select/nile-virtual-select.css.cjs.js +0 -2
  112. package/dist/nile-virtual-select/nile-virtual-select.css.cjs.js.map +0 -1
  113. package/dist/nile-virtual-select/nile-virtual-select.css.esm.js +0 -467
  114. package/dist/nile-virtual-select/nile-virtual-select.esm.js +0 -227
  115. package/dist/nile-virtual-select/nile-virtual-select.test.cjs.js +0 -2
  116. package/dist/nile-virtual-select/nile-virtual-select.test.cjs.js.map +0 -1
  117. package/dist/nile-virtual-select/nile-virtual-select.test.esm.js +0 -49
  118. package/dist/nile-virtual-select/renderer.cjs.js +0 -2
  119. package/dist/nile-virtual-select/renderer.cjs.js.map +0 -1
  120. package/dist/nile-virtual-select/renderer.esm.js +0 -18
  121. package/dist/nile-virtual-select/search-manager.cjs.js +0 -2
  122. package/dist/nile-virtual-select/search-manager.cjs.js.map +0 -1
  123. package/dist/nile-virtual-select/search-manager.esm.js +0 -1
  124. package/dist/nile-virtual-select/selection-manager.cjs.js +0 -2
  125. package/dist/nile-virtual-select/selection-manager.cjs.js.map +0 -1
  126. package/dist/nile-virtual-select/selection-manager.esm.js +0 -1
  127. package/dist/nile-virtual-select/types.cjs.js +0 -2
  128. package/dist/nile-virtual-select/types.cjs.js.map +0 -1
  129. package/dist/nile-virtual-select/types.esm.js +0 -1
  130. package/dist/src/nile-select/virtual-scroll-helper.d.ts +0 -9
  131. package/dist/src/nile-select/virtual-scroll-helper.js +0 -51
  132. package/dist/src/nile-select/virtual-scroll-helper.js.map +0 -1
  133. package/dist/src/nile-virtual-select/index.d.ts +0 -1
  134. package/dist/src/nile-virtual-select/index.js +0 -2
  135. package/dist/src/nile-virtual-select/index.js.map +0 -1
  136. package/dist/src/nile-virtual-select/nile-virtual-select.css.d.ts +0 -12
  137. package/dist/src/nile-virtual-select/nile-virtual-select.css.js +0 -479
  138. package/dist/src/nile-virtual-select/nile-virtual-select.css.js.map +0 -1
  139. package/dist/src/nile-virtual-select/nile-virtual-select.d.ts +0 -263
  140. package/dist/src/nile-virtual-select/nile-virtual-select.js +0 -1183
  141. package/dist/src/nile-virtual-select/nile-virtual-select.js.map +0 -1
  142. package/dist/src/nile-virtual-select/nile-virtual-select.test.d.ts +0 -7
  143. package/dist/src/nile-virtual-select/nile-virtual-select.test.js +0 -341
  144. package/dist/src/nile-virtual-select/nile-virtual-select.test.js.map +0 -1
  145. package/dist/src/nile-virtual-select/renderer.d.ts +0 -11
  146. package/dist/src/nile-virtual-select/renderer.js +0 -51
  147. package/dist/src/nile-virtual-select/renderer.js.map +0 -1
  148. package/dist/src/nile-virtual-select/search-manager.d.ts +0 -12
  149. package/dist/src/nile-virtual-select/search-manager.js +0 -40
  150. package/dist/src/nile-virtual-select/search-manager.js.map +0 -1
  151. package/dist/src/nile-virtual-select/selection-manager.d.ts +0 -12
  152. package/dist/src/nile-virtual-select/selection-manager.js +0 -64
  153. package/dist/src/nile-virtual-select/selection-manager.js.map +0 -1
  154. package/dist/src/nile-virtual-select/types.d.ts +0 -50
  155. package/dist/src/nile-virtual-select/types.js +0 -8
  156. package/dist/src/nile-virtual-select/types.js.map +0 -1
  157. package/dist/virtualize-a4a40d96.esm.js +0 -22
  158. package/dist/virtualize-b6a2fbe0.cjs.js +0 -18
  159. package/dist/virtualize-b6a2fbe0.cjs.js.map +0 -1
  160. package/src/nile-select/virtual-scroll-helper.ts +0 -56
  161. package/src/nile-virtual-select/index.ts +0 -1
  162. package/src/nile-virtual-select/nile-virtual-select.css.ts +0 -481
  163. package/src/nile-virtual-select/nile-virtual-select.test.ts +0 -414
  164. package/src/nile-virtual-select/nile-virtual-select.ts +0 -1268
  165. package/src/nile-virtual-select/renderer.ts +0 -73
  166. package/src/nile-virtual-select/search-manager.ts +0 -50
  167. package/src/nile-virtual-select/selection-manager.ts +0 -75
  168. package/src/nile-virtual-select/types.ts +0 -54
@@ -1 +1 @@
1
- {"version":3,"file":"theme.js","sourceRoot":"","sources":["../../../src/nile-code-editor/theme.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,GAAG,EAAE;QACH,QAAQ,EAAE,MAAM;QAChB,UAAU,EAAE,gBAAgB;QAC5B,UAAU,EAAE,KAAK;KAClB;IACD,aAAa,EAAE,EAAE;IACjB,cAAc,EAAE;QACd,cAAc,EAAC,MAAM;KACtB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,GAAG,EAAE;QACH,QAAQ,EAAE,SAAS;QACnB,SAAS,EAAE,SAAS;QACpB,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE,SAAS;QACrB,UAAU,EAAC,SAAS;QACpB,aAAa,EAAC,SAAS;KACxB;IAED,aAAa,EAAE;QACb,QAAQ,EAAE,SAAS;QACnB,SAAS,EAAE,SAAS;QACpB,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE,SAAS;QACrB,UAAU,EAAC,SAAS;QACpB,aAAa,EAAC,SAAS;KACxB;IAED,cAAc,EAAC;QACb,UAAU,EAAE,SAAS;KACtB;IAED,aAAa,EAAE;QACb,UAAU,EAAE,SAAS,EAAE,iCAAiC;KACzD;CACF,CAAC","sourcesContent":["export const Theme = {\n '&': {\n fontSize: '14px',\n fontFamily: 'Colfax-regular',\n fontWeight: '400',\n },\n '.cm-content': {},\n \".cm-scroller\": {\n scrollbarWidth:'thin',\n },\n};\n\nexport const CustomTheme = {\n '&': {\n fontSize: 'inherit',\n fontStyle: 'inherit',\n fontFamily: 'inherit',\n fontWeight: 'inherit',\n lineHeight:'inherit',\n letterSpacing:'inherit'\n },\n \n '.cm-content': {\n fontSize: 'inherit',\n fontStyle: 'inherit',\n fontFamily: 'inherit',\n fontWeight: 'inherit',\n lineHeight:'inherit',\n letterSpacing:'inherit'\n },\n\n \".cm-scroller\":{\n fontFamily: 'inherit'\n },\n\n \".cm-gutters\": {\n fontFamily: 'inherit', // Ensure the gutter font matches\n },\n};"]}
1
+ {"version":3,"file":"theme.js","sourceRoot":"","sources":["../../../src/nile-code-editor/theme.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,GAAG,EAAE;QACH,QAAQ,EAAE,MAAM;QAChB,UAAU,EAAE,gBAAgB;QAC5B,UAAU,EAAE,KAAK;KAClB;IACD,aAAa,EAAE,EAAE;IACjB,cAAc,EAAE;QACd,cAAc,EAAC,MAAM;KACtB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,GAAG,EAAE;QACH,QAAQ,EAAE,SAAS;QACnB,SAAS,EAAE,SAAS;QACpB,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE,SAAS;QACrB,UAAU,EAAC,SAAS;QACpB,aAAa,EAAC,SAAS;KACxB;IAED,aAAa,EAAE;QACb,QAAQ,EAAE,SAAS;QACnB,SAAS,EAAE,SAAS;QACpB,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE,SAAS;QACrB,UAAU,EAAC,SAAS;QACpB,aAAa,EAAC,SAAS;KACxB;IAED,cAAc,EAAC;QACb,UAAU,EAAE,SAAS;KACtB;IAED,aAAa,EAAE;QACb,UAAU,EAAE,SAAS,EAAE,iCAAiC;KACzD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E;QAClD,OAAO,EAAE,m4DAAm4D;QAC54D,QAAQ,EAAE,UAAU;QACpB,GAAG,EAAE,KAAK;QACV,IAAI,EAAE,KAAK;KACZ;IACD,qBAAqB,EAAE;QACrB,WAAW,EAAE,MAAM;KACpB;CACF,CAAC","sourcesContent":["export const Theme = {\n '&': {\n fontSize: '14px',\n fontFamily: 'Colfax-regular',\n fontWeight: '400',\n },\n '.cm-content': {},\n \".cm-scroller\": {\n scrollbarWidth:'thin',\n },\n};\n\nexport const CustomTheme = {\n '&': {\n fontSize: 'inherit',\n fontStyle: 'inherit',\n fontFamily: 'inherit',\n fontWeight: 'inherit',\n lineHeight:'inherit',\n letterSpacing:'inherit'\n },\n \n '.cm-content': {\n fontSize: 'inherit',\n fontStyle: 'inherit',\n fontFamily: 'inherit',\n fontWeight: 'inherit',\n lineHeight:'inherit',\n letterSpacing:'inherit'\n },\n\n \".cm-scroller\":{\n fontFamily: 'inherit'\n },\n\n \".cm-gutters\": {\n fontFamily: 'inherit', // Ensure the gutter font matches\n },\n};\n\nexport const CustomThemeCSS = {\n '.cm-tooltip-autocomplete': {\n padding: '9px 12px',\n backgroundColor: 'white',\n display: 'block',\n fontSize: '16px',\n background: 'white',\n border: 'solid 1px #C7CED4',\n borderRadius: '0.25rem',\n paddingBlock: '0',\n paddingInline: '0',\n overflow: 'auto',\n overscrollBehavior: 'none',\n color: 'hsl(240 5.3% 26.1%)',\n },\n '.cm-tooltip.cm-tooltip-autocomplete > ul': {\n fontFamily: 'colfax-regular',\n fontWeight: '400',\n },\n '.cm-tooltip.cm-tooltip-autocomplete > ul > li': {\n padding: '9px 12px'\n },\n '.cm-tooltip.cm-tooltip-autocomplete > ul > li:hover': {\n backgroundColor: '#005ea61a',\n color: 'rgb(0, 0, 0)',\n },\n '.cm-tooltip.cm-tooltip-autocomplete > ul > li[aria-selected=\"true\"]': {\n backgroundColor: '#005ea61a',\n color: '#005EA6',\n },\n '.cm-tooltip.cm-tooltip-autocomplete > ul > li[aria-selected=\"true\"]:hover': {\n color: '#005EA6',\n },\n '.cm-completionIcon': {\n display: 'block',\n position: 'relative',\n },\n '.cm-completionMatchedText' : {\n textDecoration: 'none',\n },\n '.cm-completionIcon.cm-completionIcon-property::after': {\n content: 'url(\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHZpZXdCb3g9IjAgMCAxNCAxNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTcuMDAwOTIgMTJDNi4zMTI5NCAxMiA1LjY2NTI2IDExLjg2ODggNS4wNTc4OSAxMS42MDYzQzQuNDUwNTMgMTEuMzQzOSAzLjkyMDMxIDEwLjk4NjIgMy40NjcyNCAxMC41MzM0QzMuMDE0MjUgMTAuMDgwNSAyLjY1NjQ1IDkuNTUwNTMgMi4zOTM4MiA4Ljk0MzQyQzIuMTMxMjcgOC4zMzYzMiAyIDcuNjg4ODIgMiA3LjAwMDkyQzIgNi4zMDkzNCAyLjEzMTIzIDUuNjU5MyAyLjM5MzY4IDUuMDUwNzlDMi42NTYxNCA0LjQ0MjI4IDMuMDEzNzcgMy45MTI5OCAzLjQ2NjU4IDMuNDYyODlDMy45MTk0NyAzLjAxMjgxIDQuNDQ5NDcgMi42NTY0NSA1LjA1NjU4IDIuMzkzODJDNS42NjM2OCAyLjEzMTI3IDYuMzExMTggMiA2Ljk5OTA4IDJDNy42OTA2NiAyIDguMzQwNyAyLjEzMTIzIDguOTQ5MjEgMi4zOTM2OEM5LjU1NzcyIDIuNjU2MTQgMTAuMDg3IDMuMDEyMzIgMTAuNTM3MSAzLjQ2MjI0QzEwLjk4NzIgMy45MTIxNSAxMS4zNDM2IDQuNDQxMjMgMTEuNjA2MiA1LjA0OTQ3QzExLjg2ODcgNS42NTc3MiAxMiA2LjMwNzU5IDEyIDYuOTk5MDhDMTIgNy42ODcwNiAxMS44Njg4IDguMzM0NzQgMTEuNjA2My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.cm-completionLabel': {\n paddingLeft: '16px',\n }\n};"]}
@@ -33,7 +33,7 @@ export const styles = css `
33
33
  }
34
34
 
35
35
  .option--single-select {
36
- padding: 8px 12px;
36
+ padding: 9px 12px;
37
37
  }
38
38
 
39
39
  .option--hover:not(.option--current):not(.option--disabled) {
@@ -1 +1 @@
1
- {"version":3,"file":"nile-option.css.js","sourceRoot":"","sources":["../../../src/nile-option/nile-option.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8FxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit';\n\n/**\n * Option_2 CSS\n */\nexport const styles = css`\n :host {\n display: block;\n user-select: none;\n }\n\n :host(:focus) {\n outline: none;\n }\n\n .option {\n position: relative;\n display: flex;\n align-items: center;\n font-size: 1rem;\n font-weight: 400;\n line-height: 1.8;\n letter-spacing: normal;\n color: hsl(240 5.3% 26.1%);\n padding: 6px 0;\n transition: 150ms fill;\n cursor: pointer;\n }\n\n .option--single-select {\n padding: 8px 12px;\n }\n\n .option--hover:not(.option--current):not(.option--disabled) {\n background-color: rgba(0, 94, 166, 0.1);\n color: hsl(0, 0%, 0%);\n }\n\n .option--current,\n .option--current.option--disabled {\n background-color: rgba(0, 94, 166, 0.1);\n color: var(--nile-colors-primary-600);\n opacity: 1;\n }\n\n .option--disabled {\n outline: none;\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .option__label {\n flex: 1 1 auto;\n display: inline-block;\n line-height: 1.4;\n word-break: break-all;\n }\n\n .option .option__check {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n justify-content: center;\n visibility: hidden;\n padding-inline-end: 0.25rem;\n }\n\n .option--selected .option__check {\n visibility: visible;\n }\n\n .option__prefix,\n .option__suffix {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n }\n\n .option__prefix::slotted(*) {\n margin-inline-end: 0.5rem;\n }\n\n .option__suffix::slotted(*) {\n margin-inline-start: 0.5rem;\n }\n\n .option--checkbox{\n pointer-events: none;\n margin-left: 12px;\n margin-right: 12px;\n width:auto;\n }\n\n @media (forced-colors: active) {\n :host(:hover:not([aria-disabled='true'])) .option {\n outline: dashed 1px SelectedItem;\n outline-offset: -1px;\n }\n }\n`;\n\nexport default [styles];\n"]}
1
+ {"version":3,"file":"nile-option.css.js","sourceRoot":"","sources":["../../../src/nile-option/nile-option.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8FxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit';\n\n/**\n * Option_2 CSS\n */\nexport const styles = css`\n :host {\n display: block;\n user-select: none;\n }\n\n :host(:focus) {\n outline: none;\n }\n\n .option {\n position: relative;\n display: flex;\n align-items: center;\n font-size: 1rem;\n font-weight: 400;\n line-height: 1.8;\n letter-spacing: normal;\n color: hsl(240 5.3% 26.1%);\n padding: 6px 0;\n transition: 150ms fill;\n cursor: pointer;\n }\n\n .option--single-select {\n padding: 9px 12px;\n }\n\n .option--hover:not(.option--current):not(.option--disabled) {\n background-color: rgba(0, 94, 166, 0.1);\n color: hsl(0, 0%, 0%);\n }\n\n .option--current,\n .option--current.option--disabled {\n background-color: rgba(0, 94, 166, 0.1);\n color: var(--nile-colors-primary-600);\n opacity: 1;\n }\n\n .option--disabled {\n outline: none;\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .option__label {\n flex: 1 1 auto;\n display: inline-block;\n line-height: 1.4;\n word-break: break-all;\n }\n\n .option .option__check {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n justify-content: center;\n visibility: hidden;\n padding-inline-end: 0.25rem;\n }\n\n .option--selected .option__check {\n visibility: visible;\n }\n\n .option__prefix,\n .option__suffix {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n }\n\n .option__prefix::slotted(*) {\n margin-inline-end: 0.5rem;\n }\n\n .option__suffix::slotted(*) {\n margin-inline-start: 0.5rem;\n }\n\n .option--checkbox{\n pointer-events: none;\n margin-left: 12px;\n margin-right: 12px;\n width:auto;\n }\n\n @media (forced-colors: active) {\n :host(:hover:not([aria-disabled='true'])) .option {\n outline: dashed 1px SelectedItem;\n outline-offset: -1px;\n }\n }\n`;\n\nexport default [styles];\n"]}
@@ -36,6 +36,7 @@ export declare class NileOption extends NileElement {
36
36
  private cachedTextLabel;
37
37
  defaultSlot: HTMLSlotElement;
38
38
  current: boolean;
39
+ selected: boolean;
39
40
  hasHover: boolean;
40
41
  hidden: boolean;
41
42
  isMultipleSelect: boolean;
@@ -48,10 +49,6 @@ export declare class NileOption extends NileElement {
48
49
  showCheckbox: boolean;
49
50
  /** Draws the option in a disabled state, preventing selection. */
50
51
  disabled: boolean;
51
- /** Forces the option to display in multiple select mode with checkboxes. */
52
- multiple: boolean;
53
- /** Indicates whether the option is selected. */
54
- selected: boolean;
55
52
  connectedCallback(): void;
56
53
  protected updated(_changedProperties: PropertyValues): void;
57
54
  private handleDefaultSlotChange;
@@ -59,7 +56,6 @@ export declare class NileOption extends NileElement {
59
56
  private handleMouseLeave;
60
57
  handleDisabledChange(): void;
61
58
  handleSelectedChange(): void;
62
- handleMultipleChange(): void;
63
59
  handleValueChange(): void;
64
60
  /** Returns a plain text label based on the option's content. */
65
61
  getTextLabel(): string;
@@ -39,6 +39,7 @@ let NileOption = class NileOption extends NileElement {
39
39
  constructor() {
40
40
  super(...arguments);
41
41
  this.current = false; // the user has keyed into the option, but hasn't selected it yet (shows a highlight)
42
+ this.selected = false; // the option is selected and has aria-selected="true"
42
43
  this.hasHover = false; // we need this because Safari doesn't honor :hover styles while dragging
43
44
  this.hidden = false; // the option is hidden
44
45
  this.isMultipleSelect = false;
@@ -51,17 +52,13 @@ let NileOption = class NileOption extends NileElement {
51
52
  this.showCheckbox = false;
52
53
  /** Draws the option in a disabled state, preventing selection. */
53
54
  this.disabled = false;
54
- /** Forces the option to display in multiple select mode with checkboxes. */
55
- this.multiple = false;
56
- /** Indicates whether the option is selected. */
57
- this.selected = false;
58
55
  }
59
56
  connectedCallback() {
60
57
  super.connectedCallback();
61
58
  this.setAttribute('role', 'option');
62
59
  this.setAttribute('aria-selected', 'false');
63
- // Find the closest parent 'nile-select' or 'nile-virtual-select' element
64
- const parentSelect = this.closest('nile-select') || this.closest('nile-virtual-select');
60
+ // Find the closest parent 'nile-select' element
61
+ const parentSelect = this.closest('nile-select');
65
62
  // Check if the parent has the 'multiple' attribute
66
63
  if (parentSelect && parentSelect.hasAttribute('multiple')) {
67
64
  let multipleValue = parentSelect.getAttribute('multiple');
@@ -72,9 +69,6 @@ let NileOption = class NileOption extends NileElement {
72
69
  this.isMultipleSelect = Boolean(multipleValue);
73
70
  }
74
71
  }
75
- if (this.multiple) {
76
- this.isMultipleSelect = true;
77
- }
78
72
  }
79
73
  updated(_changedProperties) {
80
74
  if (_changedProperties.has('showCheckbox')) {
@@ -106,9 +100,6 @@ let NileOption = class NileOption extends NileElement {
106
100
  handleSelectedChange() {
107
101
  this.setAttribute('aria-selected', this.selected ? 'true' : 'false');
108
102
  }
109
- handleMultipleChange() {
110
- this.isMultipleSelect = this.multiple;
111
- }
112
103
  handleValueChange() {
113
104
  // Ensure the value is a string. This ensures the next line doesn't error and allows framework users to pass numbers
114
105
  // instead of requiring them to cast the value to a string.
@@ -172,6 +163,9 @@ __decorate([
172
163
  __decorate([
173
164
  state()
174
165
  ], NileOption.prototype, "current", void 0);
166
+ __decorate([
167
+ state()
168
+ ], NileOption.prototype, "selected", void 0);
175
169
  __decorate([
176
170
  state()
177
171
  ], NileOption.prototype, "hasHover", void 0);
@@ -190,21 +184,12 @@ __decorate([
190
184
  __decorate([
191
185
  property({ type: Boolean, reflect: true })
192
186
  ], NileOption.prototype, "disabled", void 0);
193
- __decorate([
194
- property({ type: Boolean, reflect: true })
195
- ], NileOption.prototype, "multiple", void 0);
196
- __decorate([
197
- property({ type: Boolean, reflect: true })
198
- ], NileOption.prototype, "selected", void 0);
199
187
  __decorate([
200
188
  watch('disabled')
201
189
  ], NileOption.prototype, "handleDisabledChange", null);
202
190
  __decorate([
203
191
  watch('selected')
204
192
  ], NileOption.prototype, "handleSelectedChange", null);
205
- __decorate([
206
- watch('multiple')
207
- ], NileOption.prototype, "handleMultipleChange", null);
208
193
  __decorate([
209
194
  watch('value')
210
195
  ], NileOption.prototype, "handleValueChange", null);
@@ -1 +1 @@
1
- {"version":3,"file":"nile-option.js","sourceRoot":"","sources":["../../../src/nile-option/nile-option.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,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;;;iBAGvC;YACT,CAAC,CAAC,EAAE;KACP,CAAC;IACJ,CAAC;;AA9JM,iBAAM,GAAmB,MAAM,AAAzB,CAA0B;AAId;IAAxB,KAAK,CAAC,gBAAgB,CAAC;+CAA8B;AAE7C;IAAR,KAAK,EAAE;2CAAiB;AAChB;IAAR,KAAK,EAAE;4CAAkB;AACjB;IAAR,KAAK,EAAE;0CAAgB;AACf;IAAR,KAAK,EAAE;oDAA0B;AAOL;IAA5B,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCAAY;AAEX;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;gDAA+B;AAGf;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;4CAAkB;AAGjB;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;4CAAkB;AAGjB;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;4CAAkB;AAyD7D;IADC,KAAK,CAAC,UAAU,CAAC;sDAGjB;AAGD;IADC,KAAK,CAAC,UAAU,CAAC;sDAGjB;AAGD;IADC,KAAK,CAAC,UAAU,CAAC;sDAGjB;AAGD;IADC,KAAK,CAAC,OAAO,CAAC;mDAed;AAlHU,UAAU;IADtB,aAAa,CAAC,aAAa,CAAC;GAChB,UAAU,CAgKtB;;AAED,eAAe,UAAU,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { LitElement, CSSResultArray, TemplateResult } from 'lit';\nimport { styles } from './nile-option.css';\nimport '../nile-icon';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { customElement, property, query, state } from 'lit/decorators.js';\nimport { html } from 'lit';\nimport { watch } from '../internal/watch';\nimport type { CSSResultGroup, PropertyValues } from 'lit';\nimport NileElement from '../internal/nile-element';\nimport '../nile-checkbox';\n\n/**\n * Nile icon component.\n *\n * @tag nile-option\n *\n */\n\n/**\n * @summary Options define the selectable items within various form controls such as [select](/components/select).\n * @status stable\n *\n * @dependency nile-icon\n *\n * @slot - The option's label.\n * @slot prefix - Used to prepend an icon or similar element to the menu item.\n * @slot suffix - Used to append an icon or similar element to the menu item.\n *\n * @csspart checked-icon - The checked icon, an `<nile-icon>` element.\n * @csspart base - The component's base wrapper.\n * @csspart label - The option's label.\n * @csspart prefix - The container that wraps the prefix.\n * @csspart suffix - The container that wraps the suffix.\n */\n\n@customElement('nile-option')\nexport class NileOption extends NileElement {\n static styles: CSSResultGroup = styles;\n\n private cachedTextLabel: string;\n\n @query('.option__label') defaultSlot: HTMLSlotElement;\n\n @state() current = false; // the user has keyed into the option, but hasn't selected it yet (shows a highlight)\n @state() hasHover = false; // we need this because Safari doesn't honor :hover styles while dragging\n @state() hidden = false; // the option is hidden\n @state() isMultipleSelect = false;\n\n /**\n * The option's value. When selected, the containing form control will receive this value. The value must be unique\n * from other options in the same group. Values may not contain spaces, as spaces are used as delimiters when listing\n * multiple values.\n */\n @property({ reflect: true }) value = '';\n\n @property({ type: Boolean }) showCheckbox: boolean = false;\n\n /** Draws the option in a disabled state, preventing selection. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /** Forces the option to display in multiple select mode with checkboxes. */\n @property({ type: Boolean, reflect: true }) multiple = false;\n\n /** Indicates whether the option is selected. */\n @property({ type: Boolean, reflect: true }) selected = false;\n\n connectedCallback() {\n super.connectedCallback();\n this.setAttribute('role', 'option');\n this.setAttribute('aria-selected', 'false');\n\n // Find the closest parent 'nile-select' or 'nile-virtual-select' element\n const parentSelect = this.closest('nile-select') || this.closest('nile-virtual-select');\n\n // Check if the parent has the 'multiple' attribute\n if (parentSelect && parentSelect.hasAttribute('multiple')) {\n let multipleValue = parentSelect.getAttribute('multiple');\n if (multipleValue !== 'false') {\n if(multipleValue === ''){\n multipleValue = 'true';\n }\n this.isMultipleSelect = Boolean(multipleValue);\n }\n }\n\n if (this.multiple) {\n this.isMultipleSelect = true;\n }\n }\n\n protected updated(_changedProperties: PropertyValues): void {\n if(_changedProperties.has('showCheckbox')) {\n this.isMultipleSelect = this.showCheckbox;\n }\n }\n\n private handleDefaultSlotChange() {\n const textLabel = this.getTextLabel();\n\n // Ignore the first time the label is set\n if (typeof this.cachedTextLabel === 'undefined') {\n this.cachedTextLabel = textLabel;\n return;\n }\n\n // When the label changes, emit a slotchange event so parent controls see it\n if (textLabel !== this.cachedTextLabel) {\n this.cachedTextLabel = textLabel;\n this.emit('slotchange');\n }\n }\n\n private handleMouseEnter() {\n this.hasHover = true;\n }\n\n private handleMouseLeave() {\n this.hasHover = false;\n }\n\n @watch('disabled')\n handleDisabledChange() {\n this.setAttribute('aria-disabled', this.disabled ? 'true' : 'false');\n }\n\n @watch('selected')\n handleSelectedChange() {\n this.setAttribute('aria-selected', this.selected ? 'true' : 'false');\n }\n\n @watch('multiple')\n handleMultipleChange() {\n this.isMultipleSelect = this.multiple;\n }\n\n @watch('value')\n handleValueChange() {\n // Ensure the value is a string. This ensures the next line doesn't error and allows framework users to pass numbers\n // instead of requiring them to cast the value to a string.\n if (typeof this.value !== 'string') {\n this.value = String(this.value);\n }\n\n // if (this.value.includes(' ')) {\n // console.error(\n // `Option values cannot include a space. All spaces have been replaced with underscores.`,\n // this\n // );\n // this.value = this.value.replace(/ /g, '_');\n // }\n }\n\n /** Returns a plain text label based on the option's content. */\n getTextLabel() {\n // Search for a label element inside the component\n const labelElement = this.querySelector('label');\n\n // If a label element is found, return its text content\n if (labelElement) {\n return labelElement.textContent?.trim() ?? '';\n }\n\n // If no label element is found, return the existing behavior\n return (this.textContent ?? '').trim();\n }\n\n render() {\n return html`\n ${!this.hidden\n ? html` <div\n part=\"base\"\n class=${classMap({\n option: true,\n 'option--single-select': !this.isMultipleSelect,\n 'option--current': this.selected && !this.isMultipleSelect,\n 'option--disabled': this.disabled,\n 'option--selected': this.selected && !this.isMultipleSelect,\n 'option--hover': this.hasHover,\n })}\n @mouseenter=${this.handleMouseEnter}\n @mouseleave=${this.handleMouseLeave}\n >\n\n ${this.isMultipleSelect ? html`<nile-checkbox class=\"option--checkbox\" .checked=${this.selected}></nile-checkbox>` : ''}\n\n <slot part=\"prefix\" name=\"prefix\" class=\"option__prefix\"></slot>\n <slot\n part=\"label\"\n class=\"option__label\"\n @slotchange=${this.handleDefaultSlotChange}\n ></slot>\n <slot part=\"suffix\" name=\"suffix\" class=\"option__suffix\"></slot>\n </div>`\n : ''}\n `;\n }\n}\n\nexport default NileOption;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-option': NileOption;\n }\n}\n"]}
1
+ {"version":3,"file":"nile-option.js","sourceRoot":"","sources":["../../../src/nile-option/nile-option.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,kBAAkB,CAAC;AAE1B;;;;;GAKG;AAEH;;;;;;;;;;;;;;;GAeG;AAGI,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,WAAW;IAApC;;QAOI,YAAO,GAAG,KAAK,CAAC,CAAC,qFAAqF;QACtG,aAAQ,GAAG,KAAK,CAAC,CAAC,sDAAsD;QACxE,aAAQ,GAAG,KAAK,CAAC,CAAC,yEAAyE;QAC3F,WAAM,GAAG,KAAK,CAAC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AK,CAAC,UAAU,CAAC;sDAGjB;AAGD;IADC,KAAK,CAAC,OAAO,CAAC;mDAed;AApGU,UAAU;IADtB,aAAa,CAAC,aAAa,CAAC;GAChB,UAAU,CAkJtB;;AAED,eAAe,UAAU,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { LitElement, CSSResultArray, TemplateResult } from 'lit';\nimport { styles } from './nile-option.css';\nimport '../nile-icon';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { customElement, property, query, state } from 'lit/decorators.js';\nimport { html } from 'lit';\nimport { watch } from '../internal/watch';\nimport type { CSSResultGroup, PropertyValues } from 'lit';\nimport NileElement from '../internal/nile-element';\nimport '../nile-checkbox';\n\n/**\n * Nile icon component.\n *\n * @tag nile-option\n *\n */\n\n/**\n * @summary Options define the selectable items within various form controls such as [select](/components/select).\n * @status stable\n *\n * @dependency nile-icon\n *\n * @slot - The option's label.\n * @slot prefix - Used to prepend an icon or similar element to the menu item.\n * @slot suffix - Used to append an icon or similar element to the menu item.\n *\n * @csspart checked-icon - The checked icon, an `<nile-icon>` element.\n * @csspart base - The component's base wrapper.\n * @csspart label - The option's label.\n * @csspart prefix - The container that wraps the prefix.\n * @csspart suffix - The container that wraps the suffix.\n */\n\n@customElement('nile-option')\nexport class NileOption extends NileElement {\n static styles: CSSResultGroup = styles;\n\n private cachedTextLabel: string;\n\n @query('.option__label') defaultSlot: HTMLSlotElement;\n\n @state() current = false; // the user has keyed into the option, but hasn't selected it yet (shows a highlight)\n @state() selected = false; // the option is selected and has aria-selected=\"true\"\n @state() hasHover = false; // we need this because Safari doesn't honor :hover styles while dragging\n @state() hidden = false; // the option is hidden\n @state() isMultipleSelect = false;\n\n /**\n * The option's value. When selected, the containing form control will receive this value. The value must be unique\n * from other options in the same group. Values may not contain spaces, as spaces are used as delimiters when listing\n * multiple values.\n */\n @property({ reflect: true }) value = '';\n\n @property({ type: Boolean }) showCheckbox: boolean = false;\n\n /** Draws the option in a disabled state, preventing selection. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n connectedCallback() {\n super.connectedCallback();\n this.setAttribute('role', 'option');\n this.setAttribute('aria-selected', 'false');\n\n // Find the closest parent 'nile-select' element\n const parentSelect = this.closest('nile-select');\n\n // Check if the parent has the 'multiple' attribute\n if (parentSelect && parentSelect.hasAttribute('multiple')) {\n let multipleValue = parentSelect.getAttribute('multiple');\n if (multipleValue !== 'false') {\n if(multipleValue === ''){\n multipleValue = 'true';\n }\n this.isMultipleSelect = Boolean(multipleValue);\n }\n }\n }\n\n protected updated(_changedProperties: PropertyValues): void {\n if(_changedProperties.has('showCheckbox')) {\n this.isMultipleSelect = this.showCheckbox;\n }\n }\n\n private handleDefaultSlotChange() {\n const textLabel = this.getTextLabel();\n\n // Ignore the first time the label is set\n if (typeof this.cachedTextLabel === 'undefined') {\n this.cachedTextLabel = textLabel;\n return;\n }\n\n // When the label changes, emit a slotchange event so parent controls see it\n if (textLabel !== this.cachedTextLabel) {\n this.cachedTextLabel = textLabel;\n this.emit('slotchange');\n }\n }\n\n private handleMouseEnter() {\n this.hasHover = true;\n }\n\n private handleMouseLeave() {\n this.hasHover = false;\n }\n\n @watch('disabled')\n handleDisabledChange() {\n this.setAttribute('aria-disabled', this.disabled ? 'true' : 'false');\n }\n\n @watch('selected')\n handleSelectedChange() {\n this.setAttribute('aria-selected', this.selected ? 'true' : 'false');\n }\n\n @watch('value')\n handleValueChange() {\n // Ensure the value is a string. This ensures the next line doesn't error and allows framework users to pass numbers\n // instead of requiring them to cast the value to a string.\n if (typeof this.value !== 'string') {\n this.value = String(this.value);\n }\n\n // if (this.value.includes(' ')) {\n // console.error(\n // `Option values cannot include a space. All spaces have been replaced with underscores.`,\n // this\n // );\n // this.value = this.value.replace(/ /g, '_');\n // }\n }\n\n /** Returns a plain text label based on the option's content. */\n getTextLabel() {\n // Search for a label element inside the component\n const labelElement = this.querySelector('label');\n\n // If a label element is found, return its text content\n if (labelElement) {\n return labelElement.textContent?.trim() ?? '';\n }\n\n // If no label element is found, return the existing behavior\n return (this.textContent ?? '').trim();\n }\n\n render() {\n return html`\n ${!this.hidden\n ? html` <div\n part=\"base\"\n class=${classMap({\n option: true,\n 'option--single-select': !this.isMultipleSelect,\n 'option--current': this.selected && !this.isMultipleSelect,\n 'option--disabled': this.disabled,\n 'option--selected': this.selected && !this.isMultipleSelect,\n 'option--hover': this.hasHover,\n })}\n @mouseenter=${this.handleMouseEnter}\n @mouseleave=${this.handleMouseLeave}\n >\n\n ${this.isMultipleSelect ? html`<nile-checkbox class=\"option--checkbox\" .checked=${this.selected}></nile-checkbox>` : ''}\n\n <slot part=\"prefix\" name=\"prefix\" class=\"option__prefix\"></slot>\n <slot\n part=\"label\"\n class=\"option__label\"\n @slotchange=${this.handleDefaultSlotChange}\n ></slot>\n <slot part=\"suffix\" name=\"suffix\" class=\"option__suffix\"></slot>\n </div>`\n : ''}\n `;\n }\n}\n\nexport default NileOption;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-option': NileOption;\n }\n}\n"]}
@@ -12,8 +12,6 @@ import type { CSSResultGroup, PropertyValues } from 'lit';
12
12
  import type { NileFormControl } from '../internal/nile-element';
13
13
  import type NileOption from '../nile-option/nile-option';
14
14
  import type NilePopup from '../nile-popup/nile-popup';
15
- import type { RenderItemConfig } from '../nile-virtual-select/types.js';
16
- import '../nile-virtual-select/nile-virtual-select';
17
15
  /**
18
16
  * Nile icon component.
19
17
  *
@@ -28,7 +26,6 @@ import '../nile-virtual-select/nile-virtual-select';
28
26
  * @dependency nile-icon
29
27
  * @dependency nile-popup
30
28
  * @dependency nile-tag
31
- * @dependency nile-virtual-select
32
29
  *
33
30
  * @slot - The listbox options. Must be `<nile-option>` elements. You can use `<nile-divider>` to group items visually.
34
31
  * @slot label - The input's label. Alternatively, you can use the `label` attribute.
@@ -67,8 +64,7 @@ import '../nile-virtual-select/nile-virtual-select';
67
64
  */
68
65
  export declare class NileSelect extends NileElement implements NileFormControl {
69
66
  static styles: CSSResultGroup;
70
- private formControlController;
71
- private virtualScrollHelper;
67
+ private readonly formControlController;
72
68
  private readonly hasSlotController;
73
69
  private typeToSelectString;
74
70
  private typeToSelectTimeout;
@@ -155,15 +151,10 @@ export declare class NileSelect extends NileElement implements NileFormControl {
155
151
  oldMaxOptionsVisible: number;
156
152
  showNoResults: boolean;
157
153
  noResultsMessage: string;
158
- /** Enhanced configuration for rendering items with support for display text, value, and search text */
159
- renderItemConfig?: RenderItemConfig;
160
- data: any;
161
- enableVirtualScroll: boolean;
162
154
  /** Gets the validity state object */
163
155
  get validity(): ValidityState;
164
156
  /** Gets the validation message */
165
157
  get validationMessage(): string;
166
- constructor();
167
158
  connectedCallback(): void;
168
159
  disconnectedCallback(): void;
169
160
  protected updated(_changedProperties: PropertyValues): void;
@@ -231,7 +222,7 @@ export declare class NileSelect extends NileElement implements NileFormControl {
231
222
  onInputChange(event: Event): void;
232
223
  calculateWidthOfSelectTagsDiv(): number | undefined;
233
224
  calculateTotalWidthOfTags(): void;
234
- render(): any;
225
+ render(): import("lit-html").TemplateResult<1>;
235
226
  nileInput(value: any): void;
236
227
  nileChange(value: any): void;
237
228
  }
@@ -24,8 +24,6 @@ import { watch } from '../internal/watch';
24
24
  import NileElement from '../internal/nile-element';
25
25
  import { unsafeHTML } from 'lit/directives/unsafe-html.js';
26
26
  import { ifDefined } from 'lit/directives/if-defined.js';
27
- import '../nile-virtual-select/nile-virtual-select';
28
- import { VirtualScrollHelper } from './virtual-scroll-helper';
29
27
  /**
30
28
  * Nile icon component.
31
29
  *
@@ -40,7 +38,6 @@ import { VirtualScrollHelper } from './virtual-scroll-helper';
40
38
  * @dependency nile-icon
41
39
  * @dependency nile-popup
42
40
  * @dependency nile-tag
43
- * @dependency nile-virtual-select
44
41
  *
45
42
  * @slot - The listbox options. Must be `<nile-option>` elements. You can use `<nile-divider>` to group items visually.
46
43
  * @slot label - The input's label. Alternatively, you can use the `label` attribute.
@@ -78,16 +75,12 @@ import { VirtualScrollHelper } from './virtual-scroll-helper';
78
75
  * @csspart expand-icon - The container that wraps the expand icon.
79
76
  */
80
77
  let NileSelect = class NileSelect extends NileElement {
81
- /** Gets the validity state object */
82
- get validity() {
83
- return this.valueInput?.validity;
84
- }
85
- /** Gets the validation message */
86
- get validationMessage() {
87
- return this.valueInput?.validationMessage;
88
- }
89
78
  constructor() {
90
- super();
79
+ super(...arguments);
80
+ // protected override BUBBLES=false;
81
+ this.formControlController = new FormControlController(this, {
82
+ assumeInteractionOn: ['nile-blur', 'nile-input'],
83
+ });
91
84
  this.hasSlotController = new HasSlotController(this, 'help-text', 'label');
92
85
  this.typeToSelectString = '';
93
86
  this.hasFocus = false;
@@ -167,17 +160,17 @@ let NileSelect = class NileSelect extends NileElement {
167
160
  this.oldMaxOptionsVisible = 1;
168
161
  this.showNoResults = false;
169
162
  this.noResultsMessage = 'No results found';
170
- this.data = [];
171
- this.enableVirtualScroll = false;
163
+ }
164
+ /** Gets the validity state object */
165
+ get validity() {
166
+ return this.valueInput?.validity;
167
+ }
168
+ /** Gets the validation message */
169
+ get validationMessage() {
170
+ return this.valueInput?.validationMessage;
172
171
  }
173
172
  connectedCallback() {
174
173
  super.connectedCallback();
175
- if (!this.enableVirtualScroll) {
176
- this.formControlController = new FormControlController(this, {
177
- assumeInteractionOn: ['nile-blur', 'nile-input'],
178
- });
179
- }
180
- this.virtualScrollHelper = new VirtualScrollHelper(this);
181
174
  this.handleDocumentFocusIn = this.handleDocumentFocusIn.bind(this);
182
175
  this.handleDocumentKeyDown = this.handleDocumentKeyDown.bind(this);
183
176
  this.handleDocumentMouseDown = this.handleDocumentMouseDown.bind(this);
@@ -594,7 +587,7 @@ let NileSelect = class NileSelect extends NileElement {
594
587
  }
595
588
  // Update validity
596
589
  this.updateComplete.then(() => {
597
- this.formControlController?.updateValidity();
590
+ this.formControlController.updateValidity();
598
591
  });
599
592
  this.calculateTotalWidthOfTags();
600
593
  }
@@ -636,8 +629,8 @@ let NileSelect = class NileSelect extends NileElement {
636
629
  return filteredOptions;
637
630
  }
638
631
  handleInvalid(event) {
639
- this.formControlController?.setValidity(false);
640
- this.formControlController?.emitInvalidEvent(event);
632
+ this.formControlController.setValidity(false);
633
+ this.formControlController.emitInvalidEvent(event);
641
634
  }
642
635
  handleDisabledChange() {
643
636
  // Close the listbox when the control is disabled
@@ -719,7 +712,7 @@ let NileSelect = class NileSelect extends NileElement {
719
712
  }
720
713
  /** Gets the associated form, if one exists. */
721
714
  getForm() {
722
- return this.formControlController?.getForm() || null;
715
+ return this.formControlController.getForm();
723
716
  }
724
717
  /** Checks for validity and shows the browser's validation message if the control is invalid. */
725
718
  reportValidity() {
@@ -728,7 +721,7 @@ let NileSelect = class NileSelect extends NileElement {
728
721
  /** Sets a custom validation message. Pass an empty string to restore validity. */
729
722
  setCustomValidity(message) {
730
723
  this.valueInput.setCustomValidity(message);
731
- this.formControlController?.updateValidity();
724
+ this.formControlController.updateValidity();
732
725
  }
733
726
  /** Sets focus on the control. */
734
727
  focus(options) {
@@ -787,9 +780,6 @@ let NileSelect = class NileSelect extends NileElement {
787
780
  }, 1);
788
781
  }
789
782
  render() {
790
- if (this.enableVirtualScroll) {
791
- return this.virtualScrollHelper.renderVirtualizedContent();
792
- }
793
783
  const hasLabelSlot = this.hasSlotController.test('label');
794
784
  const hasHelpTextSlot = this.hasSlotController.test('help-text');
795
785
  const hasLabelSuffixSlot = this.hasSlotController.test('label-suffix');
@@ -1249,15 +1239,6 @@ __decorate([
1249
1239
  __decorate([
1250
1240
  property({ type: String })
1251
1241
  ], NileSelect.prototype, "noResultsMessage", void 0);
1252
- __decorate([
1253
- property({ attribute: false })
1254
- ], NileSelect.prototype, "renderItemConfig", void 0);
1255
- __decorate([
1256
- property({ type: Array })
1257
- ], NileSelect.prototype, "data", void 0);
1258
- __decorate([
1259
- property({ type: Boolean })
1260
- ], NileSelect.prototype, "enableVirtualScroll", void 0);
1261
1242
  __decorate([
1262
1243
  watch('disabled', { waitUntilFirstUpdate: true })
1263
1244
  ], NileSelect.prototype, "handleDisabledChange", null);