@aquera/nile-elements 2.0.25 → 2.0.27

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 (123) hide show
  1. package/README.md +12 -0
  2. package/demo/index.html +12 -2
  3. package/demo/index.js +17 -0
  4. package/demo/nxtgen-classes.css +12 -2
  5. package/demo/nxtgen-dark.css +8 -0
  6. package/demo/nxtgen-properties.css +2 -2
  7. package/demo/nxtgen-utilities.css +12 -2
  8. package/demo/nxtgen.css +4 -2
  9. package/demo/utilities.css +2 -2
  10. package/demo/variables.css +2 -2
  11. package/dist/index.cjs.js +1 -1
  12. package/dist/index.esm.js +1 -1
  13. package/dist/index.js +475 -450
  14. package/dist/nile-app-shell/nile-app-shell.cjs.js +1 -1
  15. package/dist/nile-app-shell/nile-app-shell.cjs.js.map +1 -1
  16. package/dist/nile-app-shell/nile-app-shell.esm.js +2 -0
  17. package/dist/nile-calendar/nile-calendar.cjs.js +1 -1
  18. package/dist/nile-calendar/nile-calendar.cjs.js.map +1 -1
  19. package/dist/nile-calendar/nile-calendar.esm.js +1 -1
  20. package/dist/nile-code-editor/nile-code-editor.cjs.js +2 -2
  21. package/dist/nile-code-editor/nile-code-editor.cjs.js.map +1 -1
  22. package/dist/nile-code-editor/nile-code-editor.esm.js +5 -5
  23. package/dist/nile-code-editor/theme.cjs.js +1 -1
  24. package/dist/nile-code-editor/theme.cjs.js.map +1 -1
  25. package/dist/nile-code-editor/theme.esm.js +1 -1
  26. package/dist/nile-combobox/nile-combobox.cjs.js +1 -1
  27. package/dist/nile-combobox/nile-combobox.cjs.js.map +1 -1
  28. package/dist/nile-combobox/nile-combobox.css.cjs.js +1 -1
  29. package/dist/nile-combobox/nile-combobox.css.cjs.js.map +1 -1
  30. package/dist/nile-combobox/nile-combobox.css.esm.js +2 -0
  31. package/dist/nile-combobox/nile-combobox.esm.js +1 -1
  32. package/dist/nile-detail/nile-detail.cjs.js +1 -1
  33. package/dist/nile-detail/nile-detail.cjs.js.map +1 -1
  34. package/dist/nile-detail/nile-detail.esm.js +6 -5
  35. package/dist/nile-lite-tooltip/nile-lite-tooltip.cjs.js +1 -1
  36. package/dist/nile-lite-tooltip/nile-lite-tooltip.cjs.js.map +1 -1
  37. package/dist/nile-lite-tooltip/nile-lite-tooltip.css.cjs.js +1 -1
  38. package/dist/nile-lite-tooltip/nile-lite-tooltip.css.cjs.js.map +1 -1
  39. package/dist/nile-lite-tooltip/nile-lite-tooltip.css.esm.js +2 -2
  40. package/dist/nile-lite-tooltip/nile-lite-tooltip.esm.js +1 -1
  41. package/dist/nile-select/index.cjs.js +1 -1
  42. package/dist/nile-select/index.esm.js +1 -1
  43. package/dist/nile-select/nile-select.cjs.js +1 -1
  44. package/dist/nile-select/nile-select.cjs.js.map +1 -1
  45. package/dist/nile-select/nile-select.esm.js +1 -1
  46. package/dist/nile-tooltip/nile-tooltip.css.cjs.js +1 -1
  47. package/dist/nile-tooltip/nile-tooltip.css.cjs.js.map +1 -1
  48. package/dist/nile-tooltip/nile-tooltip.css.esm.js +4 -4
  49. package/dist/nile-virtual-select/index.cjs.js +1 -1
  50. package/dist/nile-virtual-select/index.esm.js +1 -1
  51. package/dist/nile-virtual-select/nile-virtual-select.cjs.js +4 -4
  52. package/dist/nile-virtual-select/nile-virtual-select.cjs.js.map +1 -1
  53. package/dist/nile-virtual-select/nile-virtual-select.css.cjs.js +1 -1
  54. package/dist/nile-virtual-select/nile-virtual-select.css.cjs.js.map +1 -1
  55. package/dist/nile-virtual-select/nile-virtual-select.css.esm.js +19 -5
  56. package/dist/nile-virtual-select/nile-virtual-select.esm.js +5 -5
  57. package/dist/nile-virtual-select/renderer.cjs.js +1 -1
  58. package/dist/nile-virtual-select/renderer.cjs.js.map +1 -1
  59. package/dist/nile-virtual-select/renderer.esm.js +23 -22
  60. package/dist/src/nile-app-shell/nile-app-shell.js +2 -0
  61. package/dist/src/nile-app-shell/nile-app-shell.js.map +1 -1
  62. package/dist/src/nile-calendar/nile-calendar.d.ts +4 -0
  63. package/dist/src/nile-calendar/nile-calendar.js +18 -2
  64. package/dist/src/nile-calendar/nile-calendar.js.map +1 -1
  65. package/dist/src/nile-calendar/nile-calendar.test.js +50 -0
  66. package/dist/src/nile-calendar/nile-calendar.test.js.map +1 -1
  67. package/dist/src/nile-code-editor/nile-code-editor.d.ts +12 -0
  68. package/dist/src/nile-code-editor/nile-code-editor.js +92 -0
  69. package/dist/src/nile-code-editor/nile-code-editor.js.map +1 -1
  70. package/dist/src/nile-code-editor/theme.d.ts +63 -0
  71. package/dist/src/nile-code-editor/theme.js +70 -7
  72. package/dist/src/nile-code-editor/theme.js.map +1 -1
  73. package/dist/src/nile-combobox/nile-combobox.css.js +2 -0
  74. package/dist/src/nile-combobox/nile-combobox.css.js.map +1 -1
  75. package/dist/src/nile-combobox/nile-combobox.d.ts +1 -0
  76. package/dist/src/nile-combobox/nile-combobox.js +12 -1
  77. package/dist/src/nile-combobox/nile-combobox.js.map +1 -1
  78. package/dist/src/nile-combobox/nile-combobox.test.js +375 -0
  79. package/dist/src/nile-combobox/nile-combobox.test.js.map +1 -1
  80. package/dist/src/nile-detail/nile-detail.d.ts +4 -0
  81. package/dist/src/nile-detail/nile-detail.js +35 -3
  82. package/dist/src/nile-detail/nile-detail.js.map +1 -1
  83. package/dist/src/nile-lite-tooltip/nile-lite-tooltip.css.js +2 -2
  84. package/dist/src/nile-lite-tooltip/nile-lite-tooltip.css.js.map +1 -1
  85. package/dist/src/nile-lite-tooltip/nile-lite-tooltip.d.ts +2 -0
  86. package/dist/src/nile-lite-tooltip/nile-lite-tooltip.js +7 -0
  87. package/dist/src/nile-lite-tooltip/nile-lite-tooltip.js.map +1 -1
  88. package/dist/src/nile-tooltip/nile-tooltip.css.js +4 -4
  89. package/dist/src/nile-tooltip/nile-tooltip.css.js.map +1 -1
  90. package/dist/src/nile-virtual-select/nile-virtual-select.css.js +19 -5
  91. package/dist/src/nile-virtual-select/nile-virtual-select.css.js.map +1 -1
  92. package/dist/src/nile-virtual-select/nile-virtual-select.d.ts +29 -0
  93. package/dist/src/nile-virtual-select/nile-virtual-select.js +120 -13
  94. package/dist/src/nile-virtual-select/nile-virtual-select.js.map +1 -1
  95. package/dist/src/nile-virtual-select/nile-virtual-select.test.js +187 -2
  96. package/dist/src/nile-virtual-select/nile-virtual-select.test.js.map +1 -1
  97. package/dist/src/nile-virtual-select/renderer.d.ts +1 -1
  98. package/dist/src/nile-virtual-select/renderer.js +11 -4
  99. package/dist/src/nile-virtual-select/renderer.js.map +1 -1
  100. package/dist/src/version.js +1 -1
  101. package/dist/src/version.js.map +1 -1
  102. package/dist/tsconfig.tsbuildinfo +1 -1
  103. package/dist/version.cjs.js +1 -1
  104. package/dist/version.cjs.js.map +1 -1
  105. package/dist/version.esm.js +1 -1
  106. package/package.json +1 -1
  107. package/src/nile-app-shell/nile-app-shell.ts +2 -0
  108. package/src/nile-calendar/nile-calendar.test.ts +54 -0
  109. package/src/nile-calendar/nile-calendar.ts +17 -3
  110. package/src/nile-code-editor/nile-code-editor.ts +82 -0
  111. package/src/nile-code-editor/theme.ts +70 -7
  112. package/src/nile-combobox/nile-combobox.css.ts +2 -0
  113. package/src/nile-combobox/nile-combobox.test.ts +416 -0
  114. package/src/nile-combobox/nile-combobox.ts +11 -1
  115. package/src/nile-detail/nile-detail.ts +34 -3
  116. package/src/nile-lite-tooltip/nile-lite-tooltip.css.ts +2 -2
  117. package/src/nile-lite-tooltip/nile-lite-tooltip.ts +6 -0
  118. package/src/nile-tooltip/nile-tooltip.css.ts +4 -4
  119. package/src/nile-virtual-select/nile-virtual-select.css.ts +19 -5
  120. package/src/nile-virtual-select/nile-virtual-select.test.ts +230 -2
  121. package/src/nile-virtual-select/nile-virtual-select.ts +117 -11
  122. package/src/nile-virtual-select/renderer.ts +12 -5
  123. package/vscode-html-custom-data.json +20 -5
@@ -12,5 +12,5 @@ export declare class VirtualSelectRenderer {
12
12
  * Determines whether to use virtualizer based on dataset size
13
13
  * For small datasets (less than 5 items), use regular rendering for better sizing
14
14
  */
15
- private static shouldUseVirtualizer;
15
+ static shouldUseVirtualizer(data: any[]): boolean;
16
16
  }
@@ -8,8 +8,14 @@ import { html } from 'lit';
8
8
  import { virtualize } from '@lit-labs/virtualizer/virtualize.js';
9
9
  import { unsafeHTML } from 'lit/directives/unsafe-html.js';
10
10
  import { classMap } from 'lit/directives/class-map.js';
11
+ import { keyed } from 'lit/directives/keyed.js';
12
+ import { styleMap } from 'lit/directives/style-map.js';
11
13
  export class VirtualSelectRenderer {
12
14
  static getVirtualizedContent(data, searchEnabled, renderItemFunction, value, multiple, getDisplayText, getItemValue, getItemDescription, getItemPrefix, getItemSuffix, showNoResults, noResultsMessage, loading, onScroll, allowHtmlLabel, enableDescription, tickOnSelect, legacy) {
15
+ // The list element is keyed on the virtualizer threshold: crossing it recreates the element. Reusing one
16
+ // element would leave the virtualizer attached with its inline min-height/contain, which shows as blank
17
+ // space once a short list renders as plain options.
18
+ const useVirtualizer = VirtualSelectRenderer.shouldUseVirtualizer(data);
13
19
  return html `
14
20
  <div part="select-options" class="select__options ${searchEnabled ? 'select__options__search-enabled' : ``} ${loading ? 'loading' : ''}">
15
21
  ${showNoResults && !loading
@@ -19,12 +25,13 @@ export class VirtualSelectRenderer {
19
25
  </div>
20
26
  `
21
27
  : html `
22
- <div
23
- class="virtualized"
28
+ ${keyed(useVirtualizer, html `<div
29
+ class="virtualized ${useVirtualizer ? 'virtualized--scroller' : ''}"
24
30
  part="virtualized"
31
+ style=${styleMap(useVirtualizer ? { minHeight: '0' } : {})}
25
32
  @scroll=${onScroll}
26
33
  >
27
- ${VirtualSelectRenderer.shouldUseVirtualizer(data)
34
+ ${useVirtualizer
28
35
  ? html `
29
36
  ${virtualize({
30
37
  items: data,
@@ -35,7 +42,7 @@ export class VirtualSelectRenderer {
35
42
  : html `
36
43
  ${data.map((item) => VirtualSelectRenderer.getItemRenderFunction(item, renderItemFunction, value, multiple, getDisplayText, getItemValue, getItemDescription, getItemPrefix, getItemSuffix, allowHtmlLabel, enableDescription, tickOnSelect, legacy))}
37
44
  `}
38
- </div>
45
+ </div>`)}
39
46
  `}
40
47
  </div>`;
41
48
  }
@@ -1 +1 @@
1
- {"version":3,"file":"renderer.js","sourceRoot":"","sources":["../../../src/nile-virtual-select/renderer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,IAAI,EAAuB,MAAM,KAAK,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAEvD,MAAM,OAAO,qBAAqB;IAChC,MAAM,CAAC,qBAAqB,CAC1B,IAAW,EACX,aAAsB,EACtB,kBAAyC,EACzC,KAAwB,EACxB,QAAiB,EACjB,cAAsC,EACtC,YAAoC,EACpC,kBAA0C,EAC1C,aAAqC,EACrC,aAAqC,EACrC,aAAuB,EACvB,gBAAyB,EACzB,OAAiB,EACjB,QAA6B,EAC7B,cAAwB,EACxB,iBAA2B,EAC3B,YAAsB,EACtB,MAAgB;QAEhB,OAAO,IAAI,CAAA;0DAEP,aAAa,CAAC,CAAC,CAAC,iCAAiC,CAAC,CAAC,CAAC,EACtD,IAAI,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE;UACxB,aAAa,IAAI,CAAC,OAAO;YACzB,CAAC,CAAC,IAAI,CAAA;;kBAEE,gBAAgB,IAAI,kBAAkB;;aAE3C;YACH,CAAC,CAAC,IAAI,CAAA;;;;0BAIU,QAAQ;;kBAEhB,qBAAqB,CAAC,oBAAoB,CAAC,IAAI,CAAC;gBAChD,CAAC,CAAC,IAAI,CAAA;wBACA,UAAU,CAAC;oBACX,KAAK,EAAE,IAAI;oBACX,UAAU,EAAE,CAAC,IAAS,EAAkB,EAAE,CACxC,qBAAqB,CAAC,qBAAqB,CAAC,IAAI,EAAE,k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AC;;KAEvB,CAAC;IACJ,CAAC;IAED;;;OAGG;IACK,MAAM,CAAC,oBAAoB,CAAC,IAAW;QAC7C,OAAO,IAAI,CAAC,MAAM,IAAI,CAAC,CAAC;IAC1B,CAAC;CACF","sourcesContent":["/**\n * Copyright Aquera Inc 2025\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 { html, type TemplateResult } from 'lit';\nimport { virtualize } from '@lit-labs/virtualizer/virtualize.js';\nimport { unsafeHTML } from 'lit/directives/unsafe-html.js';\nimport { classMap } from 'lit/directives/class-map.js';\n\nexport class VirtualSelectRenderer {\n static getVirtualizedContent(\n data: any[], \n searchEnabled: boolean, \n renderItemFunction: (item: any) => string,\n value: string | string[],\n multiple: boolean,\n getDisplayText?: (item: any) => string,\n getItemValue?: (item: any) => string,\n getItemDescription?: (item: any) => string,\n getItemPrefix?: (item: any) => string,\n getItemSuffix?: (item: any) => string,\n showNoResults?: boolean,\n noResultsMessage?: string,\n loading?: boolean,\n onScroll?: (e: Event) => void,\n allowHtmlLabel?: boolean,\n enableDescription?: boolean,\n tickOnSelect?: boolean,\n legacy?: boolean\n ): TemplateResult {\n return html`\n <div part=\"select-options\" class=\"select__options ${\n searchEnabled ? 'select__options__search-enabled' : ``\n } ${loading ? 'loading' : ''}\">\n ${showNoResults && !loading\n ? html`\n <div part=\"select-no-results\" class=\"select__no-results\">\n ${noResultsMessage || 'No results found'}\n </div>\n `\n : html`\n <div\n class=\"virtualized\"\n part=\"virtualized\"\n @scroll=${onScroll}\n >\n ${VirtualSelectRenderer.shouldUseVirtualizer(data)\n ? html`\n ${virtualize({\n items: data,\n renderItem: (item: any): TemplateResult =>\n VirtualSelectRenderer.getItemRenderFunction(item, renderItemFunction, value, multiple, getDisplayText, getItemValue, getItemDescription, getItemPrefix, getItemSuffix, allowHtmlLabel, enableDescription, tickOnSelect, legacy),\n scroller: true,\n })}\n `\n : html`\n ${data.map((item: any) => \n VirtualSelectRenderer.getItemRenderFunction(item, renderItemFunction, value, multiple, getDisplayText, getItemValue, getItemDescription, getItemPrefix, getItemSuffix, allowHtmlLabel, enableDescription, tickOnSelect, legacy)\n )}\n `}\n </div>\n `}\n </div>`;\n }\n\n static getItemRenderFunction(\n item: any, \n renderItemFunction: (item: any) => string, \n value: string | string[], \n multiple: boolean,\n getDisplayText?: (item: any) => string,\n getItemValue?: (item: any) => string,\n getItemDescription?: (item: any) => string,\n getItemPrefix?: (item: any) => string,\n getItemSuffix?: (item: any) => string,\n allowHtmlLabel?: boolean,\n enableDescription?: boolean,\n tickOnSelect?: boolean,\n legacy?: boolean,\n ): TemplateResult {\n if(!item) {\n return html``;\n }\n const displayTextFn = getDisplayText || renderItemFunction;\n const valueFn = getItemValue || ((item: any) => item?.value || item);\n \n const optionValue = valueFn(item);\n const displayText = displayTextFn(item);\n const isDisabled = item?.disabled || false;\n const className = item?.className;\n const description = (getItemDescription ? getItemDescription(item) : item?.description) ?? '';\n const prefix = (getItemPrefix ? getItemPrefix(item) : item?.prefix) ?? '';\n const suffix = (getItemSuffix ? getItemSuffix(item) : item?.suffix) ?? '';\n \n let isSelected = false;\n if (multiple) {\n isSelected = Array.isArray(value) && value.some(v => String(v) === String(optionValue));\n } else {\n isSelected = (Array.isArray(value) ? value[0] : value) === optionValue;\n }\n\n return html`\n <nile-option\n value=${optionValue} \n .selected=${isSelected} \n .disabled=${isDisabled}\n .showCheckbox=${multiple}\n .tickOnSelect=${tickOnSelect ?? false}\n .legacy=${legacy ?? false}\n exportparts=\"base:option__base, label:option__label, prefix:option__prefix, suffix:option__suffix, checked-icon:option__checked-icon, checkbox:option__checkbox, option_label_container:option__label_container, option_description:option__description\"\n class=${classMap({\n option: enableDescription ?? false,\n [className ?? '']: !!className,\n })}\n .description=${description}\n .isDescriptionEnabled=${enableDescription}\n >\n ${unsafeHTML(prefix)}\n ${allowHtmlLabel ? unsafeHTML(displayText) : displayText}\n ${unsafeHTML(suffix)}\n </nile-option>\n `;\n }\n\n /**\n * Determines whether to use virtualizer based on dataset size\n * For small datasets (less than 5 items), use regular rendering for better sizing\n */\n private static shouldUseVirtualizer(data: any[]): boolean {\n return data.length >= 5;\n }\n} \n"]}
1
+ {"version":3,"file":"renderer.js","sourceRoot":"","sources":["../../../src/nile-virtual-select/renderer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,IAAI,EAAuB,MAAM,KAAK,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAEvD,MAAM,OAAO,qBAAqB;IAChC,MAAM,CAAC,qBAAqB,CAC1B,IAAW,EACX,aAAsB,EACtB,kBAAyC,EACzC,KAAwB,EACxB,QAAiB,EACjB,cAAsC,EACtC,YAAoC,EACpC,kBAA0C,EAC1C,aAAqC,EACrC,aAAqC,EACrC,aAAuB,EACvB,gBAAyB,EACzB,OAAiB,EACjB,QAA6B,EAC7B,cAAwB,EACxB,iBAA2B,EAC3B,YAAsB,EACtB,MAAgB;QAEhB,yGAAyG;QACzG,wGAAwG;QACxG,oDAAoD;QACpD,MAAM,cAAc,GAAG,qBAAqB,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC;QACxE,OAAO,IAAI,CAAA;0DAEP,aAAa,CAAC,CAAC,CAAC,iCAAiC,CAAC,CAAC,CAAC,EACtD,IAAI,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE;UACxB,aAAa,IAAI,CAAC,OAAO;YACzB,CAAC,CAAC,IAAI,CAAA;;kBAEE,gBAAgB,IAAI,kBAAkB;;aAE3C;YACH,CAAC,CAAC,IAAI,CAAA;gBACA,KAAK,C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AA;;gBAEC,WAAW;oBACP,UAAU;oBACV,UAAU;wBACN,QAAQ;wBACR,YAAY,IAAI,KAAK;kBAC3B,MAAM,IAAI,KAAK;;gBAEjB,QAAQ,CAAC;YACf,MAAM,EAAE,iBAAiB,IAAI,KAAK;YAClC,CAAC,SAAS,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,SAAS;SAC/B,CAAC;uBACa,WAAW;gCACF,iBAAiB;;UAEvC,UAAU,CAAC,MAAM,CAAC;UAClB,cAAc,CAAC,CAAC,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW;UACtD,UAAU,CAAC,MAAM,CAAC;;KAEvB,CAAC;IACJ,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,oBAAoB,CAAC,IAAW;QACrC,OAAO,IAAI,CAAC,MAAM,IAAI,CAAC,CAAC;IAC1B,CAAC;CACF","sourcesContent":["/**\n * Copyright Aquera Inc 2025\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 { html, type TemplateResult } from 'lit';\nimport { virtualize } from '@lit-labs/virtualizer/virtualize.js';\nimport { unsafeHTML } from 'lit/directives/unsafe-html.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { keyed } from 'lit/directives/keyed.js';\nimport { styleMap } from 'lit/directives/style-map.js';\n\nexport class VirtualSelectRenderer {\n static getVirtualizedContent(\n data: any[], \n searchEnabled: boolean, \n renderItemFunction: (item: any) => string,\n value: string | string[],\n multiple: boolean,\n getDisplayText?: (item: any) => string,\n getItemValue?: (item: any) => string,\n getItemDescription?: (item: any) => string,\n getItemPrefix?: (item: any) => string,\n getItemSuffix?: (item: any) => string,\n showNoResults?: boolean,\n noResultsMessage?: string,\n loading?: boolean,\n onScroll?: (e: Event) => void,\n allowHtmlLabel?: boolean,\n enableDescription?: boolean,\n tickOnSelect?: boolean,\n legacy?: boolean\n ): TemplateResult {\n // The list element is keyed on the virtualizer threshold: crossing it recreates the element. Reusing one\n // element would leave the virtualizer attached with its inline min-height/contain, which shows as blank\n // space once a short list renders as plain options.\n const useVirtualizer = VirtualSelectRenderer.shouldUseVirtualizer(data);\n return html`\n <div part=\"select-options\" class=\"select__options ${\n searchEnabled ? 'select__options__search-enabled' : ``\n } ${loading ? 'loading' : ''}\">\n ${showNoResults && !loading\n ? html`\n <div part=\"select-no-results\" class=\"select__no-results\">\n ${noResultsMessage || 'No results found'}\n </div>\n `\n : html`\n ${keyed(useVirtualizer, html`<div\n class=\"virtualized ${useVirtualizer ? 'virtualized--scroller' : ''}\"\n part=\"virtualized\"\n style=${styleMap(useVirtualizer ? { minHeight: '0' } : {})}\n @scroll=${onScroll}\n >\n ${useVirtualizer\n ? html`\n ${virtualize({\n items: data,\n renderItem: (item: any): TemplateResult =>\n VirtualSelectRenderer.getItemRenderFunction(item, renderItemFunction, value, multiple, getDisplayText, getItemValue, getItemDescription, getItemPrefix, getItemSuffix, allowHtmlLabel, enableDescription, tickOnSelect, legacy),\n scroller: true,\n })}\n `\n : html`\n ${data.map((item: any) => \n VirtualSelectRenderer.getItemRenderFunction(item, renderItemFunction, value, multiple, getDisplayText, getItemValue, getItemDescription, getItemPrefix, getItemSuffix, allowHtmlLabel, enableDescription, tickOnSelect, legacy)\n )}\n `}\n </div>`)}\n `}\n </div>`;\n }\n\n static getItemRenderFunction(\n item: any, \n renderItemFunction: (item: any) => string, \n value: string | string[], \n multiple: boolean,\n getDisplayText?: (item: any) => string,\n getItemValue?: (item: any) => string,\n getItemDescription?: (item: any) => string,\n getItemPrefix?: (item: any) => string,\n getItemSuffix?: (item: any) => string,\n allowHtmlLabel?: boolean,\n enableDescription?: boolean,\n tickOnSelect?: boolean,\n legacy?: boolean,\n ): TemplateResult {\n if(!item) {\n return html``;\n }\n const displayTextFn = getDisplayText || renderItemFunction;\n const valueFn = getItemValue || ((item: any) => item?.value || item);\n \n const optionValue = valueFn(item);\n const displayText = displayTextFn(item);\n const isDisabled = item?.disabled || false;\n const className = item?.className;\n const description = (getItemDescription ? getItemDescription(item) : item?.description) ?? '';\n const prefix = (getItemPrefix ? getItemPrefix(item) : item?.prefix) ?? '';\n const suffix = (getItemSuffix ? getItemSuffix(item) : item?.suffix) ?? '';\n \n let isSelected = false;\n if (multiple) {\n isSelected = Array.isArray(value) && value.some(v => String(v) === String(optionValue));\n } else {\n isSelected = (Array.isArray(value) ? value[0] : value) === optionValue;\n }\n\n return html`\n <nile-option\n value=${optionValue} \n .selected=${isSelected} \n .disabled=${isDisabled}\n .showCheckbox=${multiple}\n .tickOnSelect=${tickOnSelect ?? false}\n .legacy=${legacy ?? false}\n exportparts=\"base:option__base, label:option__label, prefix:option__prefix, suffix:option__suffix, checked-icon:option__checked-icon, checkbox:option__checkbox, option_label_container:option__label_container, option_description:option__description\"\n class=${classMap({\n option: enableDescription ?? false,\n [className ?? '']: !!className,\n })}\n .description=${description}\n .isDescriptionEnabled=${enableDescription}\n >\n ${unsafeHTML(prefix)}\n ${allowHtmlLabel ? unsafeHTML(displayText) : displayText}\n ${unsafeHTML(suffix)}\n </nile-option>\n `;\n }\n\n /**\n * Determines whether to use virtualizer based on dataset size\n * For small datasets (less than 5 items), use regular rendering for better sizing\n */\n static shouldUseVirtualizer(data: any[]): boolean {\n return data.length >= 5;\n }\n} \n"]}
@@ -12,7 +12,7 @@
12
12
  // @aquera/nile/lib/version.js into dist/index.js, so on the CDN build it is
13
13
  // frozen at this package's build time. The stylesheet is the live source.
14
14
  import { NILE_VERSION as BUILT_IN_NILE_VERSION } from '@aquera/nile/lib/version.js';
15
- export const NILE_ELEMENTS_VERSION = '2.0.25';
15
+ export const NILE_ELEMENTS_VERSION = '2.0.27';
16
16
  function readStylesheetNileVersion() {
17
17
  if (typeof window === 'undefined' || typeof getComputedStyle !== 'function') {
18
18
  return null;
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,mBAAmB;AACnB,EAAE;AACF,+EAA+E;AAC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AAO,GAAI,MAAc,CAAC,OAAO,IAAI;QACnD,GAAG,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE;KAChC,CAAC;AACJ,CAAC","sourcesContent":["// Version utility.\n//\n// NILE_ELEMENTS_VERSION is this package's own version and is still substituted\n// at build time by scripts/replace-version.cjs.\n//\n// The tokens version is read from the loaded Nile stylesheet's --nile-version\n// custom property (stamped by @aquera/nile's scripts/stamp-css-version.mjs),\n// falling back to the @aquera/nile installed alongside this package.\n//\n// Reading the stylesheet is what makes a tokens-only release visible. The\n// imported constant alone is not enough: rollup.config.js bundles\n// @aquera/nile/lib/version.js into dist/index.js, so on the CDN build it is\n// frozen at this package's build time. The stylesheet is the live source.\nimport { NILE_VERSION as BUILT_IN_NILE_VERSION } from '@aquera/nile/lib/version.js';\n\nexport const NILE_ELEMENTS_VERSION = '2.0.25';\n\nfunction readStylesheetNileVersion(): string | null {\n if (typeof window === 'undefined' || typeof getComputedStyle !== 'function') {\n return null;\n }\n\n try {\n const value = getComputedStyle(document.documentElement)\n .getPropertyValue('--nile-version')\n .trim()\n .replace(/^[\"']|[\"']$/g, '');\n\n return value || null;\n } catch {\n return null;\n }\n}\n\n/**\n * The version of @aquera/nile (tokens/stylesheets) whose CSS is loaded in the\n * page, falling back to the @aquera/nile bundled into this package when no\n * stamped stylesheet is present.\n *\n * This is the canonical runtime API. It resolves on every call rather than\n * caching, so it is correct even when the Nile stylesheet is added to the page\n * after this module evaluates - which is the common case, and why no\n * module-evaluation-time snapshot of it is exported.\n */\nexport function getNileVersion(): string {\n return readStylesheetNileVersion() ?? BUILT_IN_NILE_VERSION;\n}\n\n// Set global versions for runtime access\nif (typeof window !== 'undefined') {\n (window as any).nileElementsVersion = NILE_ELEMENTS_VERSION;\n\n // A getter rather than a value, so window.nileVersion reflects whichever\n // stylesheet is loaded at read time regardless of script/style ordering.\n let override: string | null = null;\n Object.defineProperty(window, 'nileVersion', {\n configurable: true,\n get: () => override ?? getNileVersion(),\n set: (value: string) => {\n override = value;\n },\n });\n\n (window as any).process = (window as any).process || {\n env: { NODE_ENV: 'production' },\n };\n}\n"]}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,mBAAmB;AACnB,EAAE;AACF,+EAA+E;AAC/E,gDAAgD;AAChD,EAAE;AACF,8EAA8E;AAC9E,6EAA6E;AAC7E,qEAAqE;AACrE,EAAE;AACF,0EAA0E;AAC1E,kEAAkE;AAClE,4EAA4E;AAC5E,0EAA0E;AAC1E,OAAO,EAAE,YAAY,IAAI,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEpF,MAAM,CAAC,MAAM,qBAAqB,GAAG,2BAA2B,CAAC;AAEjE,SAAS,yBAAyB;IAChC,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,OAAO,gBAAgB,KAAK,UAAU,EAAE,CAAC;QAC5E,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,gBAAgB,CAAC,QAAQ,CAAC,eAAe,CAAC;aACrD,gBAAgB,CAAC,gBAAgB,CAAC;aAClC,IAAI,EAAE;aACN,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;QAE/B,OAAO,KAAK,IAAI,IAAI,CAAC;IACvB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,cAAc;IAC5B,OAAO,yBAAyB,EAAE,IAAI,qBAAqB,CAAC;AAC9D,CAAC;AAED,yCAAyC;AACzC,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;IACjC,MAAc,CAAC,mBAAmB,GAAG,qBAAqB,CAAC;IAE5D,yEAAyE;IACzE,yEAAyE;IACzE,IAAI,QAAQ,GAAkB,IAAI,CAAC;IACnC,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,aAAa,EAAE;QAC3C,YAAY,EAAE,IAAI;QAClB,GAAG,EAAE,GAAG,EAAE,CAAC,QAAQ,IAAI,cAAc,EAAE;QACvC,GAAG,EAAE,CAAC,KAAa,EAAE,EAAE;YACrB,QAAQ,GAAG,KAAK,CAAC;QACnB,CAAC;KACF,CAAC,CAAC;IAEF,MAAc,CAAC,OAAO,GAAI,MAAc,CAAC,OAAO,IAAI;QACnD,GAAG,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE;KAChC,CAAC;AACJ,CAAC","sourcesContent":["// Version utility.\n//\n// NILE_ELEMENTS_VERSION is this package's own version and is still substituted\n// at build time by scripts/replace-version.cjs.\n//\n// The tokens version is read from the loaded Nile stylesheet's --nile-version\n// custom property (stamped by @aquera/nile's scripts/stamp-css-version.mjs),\n// falling back to the @aquera/nile installed alongside this package.\n//\n// Reading the stylesheet is what makes a tokens-only release visible. The\n// imported constant alone is not enough: rollup.config.js bundles\n// @aquera/nile/lib/version.js into dist/index.js, so on the CDN build it is\n// frozen at this package's build time. The stylesheet is the live source.\nimport { NILE_VERSION as BUILT_IN_NILE_VERSION } from '@aquera/nile/lib/version.js';\n\nexport const NILE_ELEMENTS_VERSION = '2.0.27';\n\nfunction readStylesheetNileVersion(): string | null {\n if (typeof window === 'undefined' || typeof getComputedStyle !== 'function') {\n return null;\n }\n\n try {\n const value = getComputedStyle(document.documentElement)\n .getPropertyValue('--nile-version')\n .trim()\n .replace(/^[\"']|[\"']$/g, '');\n\n return value || null;\n } catch {\n return null;\n }\n}\n\n/**\n * The version of @aquera/nile (tokens/stylesheets) whose CSS is loaded in the\n * page, falling back to the @aquera/nile bundled into this package when no\n * stamped stylesheet is present.\n *\n * This is the canonical runtime API. It resolves on every call rather than\n * caching, so it is correct even when the Nile stylesheet is added to the page\n * after this module evaluates - which is the common case, and why no\n * module-evaluation-time snapshot of it is exported.\n */\nexport function getNileVersion(): string {\n return readStylesheetNileVersion() ?? BUILT_IN_NILE_VERSION;\n}\n\n// Set global versions for runtime access\nif (typeof window !== 'undefined') {\n (window as any).nileElementsVersion = NILE_ELEMENTS_VERSION;\n\n // A getter rather than a value, so window.nileVersion reflects whichever\n // stylesheet is loaded at read time regardless of script/style ordering.\n let override: string | null = null;\n Object.defineProperty(window, 'nileVersion', {\n configurable: true,\n get: () => override ?? getNileVersion(),\n set: (value: string) => {\n override = value;\n },\n });\n\n (window as any).process = (window as any).process || {\n env: { NODE_ENV: 'production' },\n };\n}\n"]}