@nova-design-system/nova-webcomponents 3.0.0-beta.34 → 3.0.0-beta.35

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 (226) hide show
  1. package/dist/blazor-docs.json +1402 -175
  2. package/dist/cjs/index-ddc37f87.js +12 -12
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/native.cjs.js +1 -1
  5. package/dist/cjs/{nv-badge.cjs.entry.js → nv-badge_2.cjs.entry.js} +43 -1
  6. package/dist/cjs/nv-badge_2.cjs.entry.js.map +1 -0
  7. package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +1067 -0
  8. package/dist/cjs/nv-fieldmultiselect.cjs.entry.js.map +1 -0
  9. package/dist/cjs/nv-fieldnumber.cjs.entry.js +3 -3
  10. package/dist/cjs/nv-fieldpassword.cjs.entry.js +3 -3
  11. package/dist/cjs/nv-fieldradio.cjs.entry.js +3 -3
  12. package/dist/cjs/nv-fieldselect.cjs.entry.js +5 -5
  13. package/dist/cjs/nv-fieldtext.cjs.entry.js +3 -3
  14. package/dist/cjs/nv-fieldtextarea.cjs.entry.js +3 -3
  15. package/dist/cjs/nv-fieldtoggle.cjs.entry.js +2 -2
  16. package/dist/cjs/nv-icon.cjs.entry.js +1 -1
  17. package/dist/cjs/{nv-iconbutton.cjs.entry.js → nv-iconbutton_2.cjs.entry.js} +28 -2
  18. package/dist/cjs/nv-iconbutton_2.cjs.entry.js.map +1 -0
  19. package/dist/cjs/nv-menu.cjs.entry.js +1 -1
  20. package/dist/cjs/nv-menuitem.cjs.entry.js +1 -1
  21. package/dist/cjs/nv-popover.cjs.entry.js +1 -1
  22. package/dist/cjs/nv-row.cjs.entry.js +1 -1
  23. package/dist/cjs/nv-stack.cjs.entry.js +1 -1
  24. package/dist/cjs/nv-table.cjs.entry.js +2 -2
  25. package/dist/cjs/nv-tablebody.cjs.entry.js +1 -1
  26. package/dist/cjs/nv-tablecolumn.cjs.entry.js +1 -1
  27. package/dist/cjs/nv-tabledatacell.cjs.entry.js +1 -1
  28. package/dist/cjs/nv-tablehead.cjs.entry.js +1 -1
  29. package/dist/cjs/nv-tablerow.cjs.entry.js +1 -1
  30. package/dist/cjs/nv-tooltip.cjs.entry.js +1 -1
  31. package/dist/collection/collection-manifest.json +2 -0
  32. package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.css +12 -0
  33. package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.docs.js +6 -0
  34. package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.docs.js.map +1 -0
  35. package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js +185 -0
  36. package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js.map +1 -0
  37. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.css +204 -0
  38. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js +249 -0
  39. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js.map +1 -0
  40. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js +1651 -0
  41. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js.map +1 -0
  42. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js +3 -3
  43. package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js +3 -3
  44. package/dist/collection/components/nv-fieldradio/nv-fieldradio.js +3 -3
  45. package/dist/collection/components/nv-fieldselect/nv-fieldselect.js +5 -5
  46. package/dist/collection/components/nv-fieldtext/nv-fieldtext.js +3 -3
  47. package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js +3 -3
  48. package/dist/collection/components/nv-fieldtoggle/nv-fieldtoggle.js +2 -2
  49. package/dist/collection/components/nv-icon/nv-icon.js +1 -1
  50. package/dist/collection/components/nv-iconbutton/nv-iconbutton.js +1 -1
  51. package/dist/collection/components/nv-loader/nv-loader.js +1 -1
  52. package/dist/collection/components/nv-menu/nv-menu.js +1 -1
  53. package/dist/collection/components/nv-menuitem/nv-menuitem.js +1 -1
  54. package/dist/collection/components/nv-popover/nv-popover.js +1 -1
  55. package/dist/collection/components/nv-row/nv-row.js +1 -1
  56. package/dist/collection/components/nv-stack/nv-stack.js +1 -1
  57. package/dist/collection/components/nv-table/nv-table.js +2 -2
  58. package/dist/collection/components/nv-tablebody/nv-tablebody.js +1 -1
  59. package/dist/collection/components/nv-tablecolumn/nv-tablecolumn.js +1 -1
  60. package/dist/collection/components/nv-tabledatacell/nv-tabledatacell.js +1 -1
  61. package/dist/collection/components/nv-tablehead/nv-tablehead.js +1 -1
  62. package/dist/collection/components/nv-tablerow/nv-tablerow.js +1 -1
  63. package/dist/collection/components/nv-tooltip/nv-tooltip.js +1 -1
  64. package/dist/components/nv-alert.js +1 -1
  65. package/dist/components/nv-avatar.js +1 -1
  66. package/dist/components/nv-badge.js +1 -173
  67. package/dist/components/nv-badge.js.map +1 -1
  68. package/dist/components/nv-breadcrumb.js +3 -3
  69. package/dist/components/nv-button.js +1 -1
  70. package/dist/components/nv-fieldcheckbox.js +1 -152
  71. package/dist/components/nv-fieldcheckbox.js.map +1 -1
  72. package/dist/components/nv-fielddropdown.js +5 -5
  73. package/dist/components/nv-fielddropdownitem.js +1 -1
  74. package/dist/components/nv-fielddropdownitemcheck.d.ts +11 -0
  75. package/dist/components/nv-fielddropdownitemcheck.js +8 -0
  76. package/dist/components/nv-fielddropdownitemcheck.js.map +1 -0
  77. package/dist/components/nv-fieldmultiselect.d.ts +11 -0
  78. package/dist/components/nv-fieldmultiselect.js +1159 -0
  79. package/dist/components/nv-fieldmultiselect.js.map +1 -0
  80. package/dist/components/nv-fieldnumber.js +4 -4
  81. package/dist/components/nv-fieldpassword.js +6 -6
  82. package/dist/components/nv-fieldradio.js +3 -3
  83. package/dist/components/nv-fieldselect.js +6 -6
  84. package/dist/components/nv-fieldtext.js +4 -4
  85. package/dist/components/nv-fieldtextarea.js +3 -3
  86. package/dist/components/nv-fieldtoggle.js +2 -2
  87. package/dist/components/nv-icon.js +1 -1
  88. package/dist/components/nv-iconbutton.js +1 -1
  89. package/dist/components/nv-loader.js +1 -1
  90. package/dist/components/nv-menu.js +2 -2
  91. package/dist/components/nv-menuitem.js +2 -2
  92. package/dist/components/nv-popover.js +1 -1
  93. package/dist/components/nv-row.js +1 -1
  94. package/dist/components/nv-stack.js +1 -1
  95. package/dist/components/nv-table.js +2 -2
  96. package/dist/components/nv-tablebody.js +1 -1
  97. package/dist/components/nv-tablecolumn.js +1 -1
  98. package/dist/components/nv-tabledatacell.js +1 -1
  99. package/dist/components/nv-tablehead.js +1 -1
  100. package/dist/components/nv-tablerow.js +1 -1
  101. package/dist/components/nv-tooltip.js +1 -1
  102. package/dist/components/{p-b7462fc2.js → p-0b30dd1b.js} +2 -2
  103. package/dist/components/{p-b7462fc2.js.map → p-0b30dd1b.js.map} +1 -1
  104. package/dist/{esm/nv-badge.entry.js → components/p-2abfadb8.js} +48 -12
  105. package/dist/components/p-2abfadb8.js.map +1 -0
  106. package/dist/components/{p-a61d9ce8.js → p-5b98036c.js} +2 -2
  107. package/dist/components/{p-a61d9ce8.js.map → p-5b98036c.js.map} +1 -1
  108. package/dist/components/p-63afc71f.js +74 -0
  109. package/dist/components/p-63afc71f.js.map +1 -0
  110. package/dist/components/{p-ce67d70c.js → p-78e7c594.js} +2 -2
  111. package/dist/components/{p-ce67d70c.js.map → p-78e7c594.js.map} +1 -1
  112. package/dist/components/{p-09a2a880.js → p-7a19fef7.js} +2 -2
  113. package/dist/components/{p-09a2a880.js.map → p-7a19fef7.js.map} +1 -1
  114. package/dist/components/{p-e7131c30.js → p-7c0db67e.js} +3 -3
  115. package/dist/components/{p-e7131c30.js.map → p-7c0db67e.js.map} +1 -1
  116. package/dist/components/p-afa1c98e.js +156 -0
  117. package/dist/components/p-afa1c98e.js.map +1 -0
  118. package/dist/components/{p-0cdf2cc7.js → p-d3b1c116.js} +4 -4
  119. package/dist/components/{p-0cdf2cc7.js.map → p-d3b1c116.js.map} +1 -1
  120. package/dist/docs.json +1394 -183
  121. package/dist/esm/index-cd557d0a.js +12 -12
  122. package/dist/esm/loader.js +1 -1
  123. package/dist/esm/native.js +1 -1
  124. package/dist/esm/nv-badge_2.entry.js +182 -0
  125. package/dist/esm/nv-badge_2.entry.js.map +1 -0
  126. package/dist/esm/nv-fieldmultiselect.entry.js +1063 -0
  127. package/dist/esm/nv-fieldmultiselect.entry.js.map +1 -0
  128. package/dist/esm/nv-fieldnumber.entry.js +3 -3
  129. package/dist/esm/nv-fieldpassword.entry.js +3 -3
  130. package/dist/esm/nv-fieldradio.entry.js +3 -3
  131. package/dist/esm/nv-fieldselect.entry.js +5 -5
  132. package/dist/esm/nv-fieldtext.entry.js +3 -3
  133. package/dist/esm/nv-fieldtextarea.entry.js +3 -3
  134. package/dist/esm/nv-fieldtoggle.entry.js +2 -2
  135. package/dist/esm/nv-icon.entry.js +1 -1
  136. package/dist/esm/{nv-iconbutton.entry.js → nv-iconbutton_2.entry.js} +28 -3
  137. package/dist/esm/nv-iconbutton_2.entry.js.map +1 -0
  138. package/dist/esm/nv-menu.entry.js +1 -1
  139. package/dist/esm/nv-menuitem.entry.js +1 -1
  140. package/dist/esm/nv-popover.entry.js +1 -1
  141. package/dist/esm/nv-row.entry.js +1 -1
  142. package/dist/esm/nv-stack.entry.js +1 -1
  143. package/dist/esm/nv-table.entry.js +2 -2
  144. package/dist/esm/nv-tablebody.entry.js +1 -1
  145. package/dist/esm/nv-tablecolumn.entry.js +1 -1
  146. package/dist/esm/nv-tabledatacell.entry.js +1 -1
  147. package/dist/esm/nv-tablehead.entry.js +1 -1
  148. package/dist/esm/nv-tablerow.entry.js +1 -1
  149. package/dist/esm/nv-tooltip.entry.js +1 -1
  150. package/dist/native/native.css +1 -1
  151. package/dist/native/native.esm.js +1 -1
  152. package/dist/native/native.esm.js.map +1 -1
  153. package/dist/native/{p-b902c7c0.entry.js → p-0a9a738c.entry.js} +2 -2
  154. package/dist/native/{p-f1545844.entry.js → p-18b227b5.entry.js} +2 -2
  155. package/dist/native/p-18b227b5.entry.js.map +1 -0
  156. package/dist/native/{p-3e9521a0.entry.js → p-1e2bd4e3.entry.js} +2 -2
  157. package/dist/native/p-225962f2.entry.js +2 -0
  158. package/dist/native/{p-bbc45099.entry.js.map → p-225962f2.entry.js.map} +1 -1
  159. package/dist/native/{p-f2ea8aa9.entry.js → p-3283505f.entry.js} +2 -2
  160. package/dist/native/{p-c59e3500.entry.js → p-3adf0c45.entry.js} +2 -2
  161. package/dist/native/{p-0710efd7.entry.js → p-4e056cd8.entry.js} +2 -2
  162. package/dist/native/p-4ffd5c51.entry.js +2 -0
  163. package/dist/native/{p-6c1b9c89.entry.js.map → p-4ffd5c51.entry.js.map} +1 -1
  164. package/dist/native/{p-ee78addb.entry.js → p-552e7ea4.entry.js} +2 -2
  165. package/dist/native/{p-74778f5f.entry.js → p-575ea40b.entry.js} +2 -2
  166. package/dist/native/p-5f160072.entry.js +2 -0
  167. package/dist/native/{p-10a06059.entry.js → p-6bb2c88f.entry.js} +2 -2
  168. package/dist/native/{p-e56d3715.entry.js → p-6ea62d17.entry.js} +2 -2
  169. package/dist/native/{p-45aa0c68.entry.js → p-788712dd.entry.js} +2 -2
  170. package/dist/native/{p-9cef006d.entry.js → p-7dfb4a60.entry.js} +2 -2
  171. package/dist/native/p-826f1d28.entry.js +2 -0
  172. package/dist/native/p-826f1d28.entry.js.map +1 -0
  173. package/dist/native/p-8ae9aaf1.entry.js +2 -0
  174. package/dist/native/p-967f1aee.entry.js +2 -0
  175. package/dist/native/p-967f1aee.entry.js.map +1 -0
  176. package/dist/native/{p-f4ecacf6.entry.js → p-cd251f91.entry.js} +2 -2
  177. package/dist/native/p-e8d181e6.entry.js +2 -0
  178. package/dist/native/{p-e390557d.entry.js → p-ed825c80.entry.js} +2 -2
  179. package/dist/native/{p-d0f83d1f.entry.js → p-f79752ca.entry.js} +2 -2
  180. package/dist/native/p-fc8cad13.entry.js +2 -0
  181. package/dist/types/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.d.ts +56 -0
  182. package/dist/types/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.docs.d.ts +4 -0
  183. package/dist/types/components/nv-fieldmultiselect/nv-fieldmultiselect.d.ts +404 -0
  184. package/dist/types/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.d.ts +4 -0
  185. package/dist/types/components.d.ts +329 -0
  186. package/dist/vscode-data.json +324 -0
  187. package/hydrate/index.js +1201 -38
  188. package/hydrate/index.mjs +1201 -38
  189. package/package.json +10 -2
  190. package/dist/cjs/nv-badge.cjs.entry.js.map +0 -1
  191. package/dist/cjs/nv-iconbutton.cjs.entry.js.map +0 -1
  192. package/dist/cjs/nv-loader.cjs.entry.js +0 -35
  193. package/dist/cjs/nv-loader.cjs.entry.js.map +0 -1
  194. package/dist/esm/nv-badge.entry.js.map +0 -1
  195. package/dist/esm/nv-iconbutton.entry.js.map +0 -1
  196. package/dist/esm/nv-loader.entry.js +0 -31
  197. package/dist/esm/nv-loader.entry.js.map +0 -1
  198. package/dist/native/p-132b8588.entry.js +0 -2
  199. package/dist/native/p-132b8588.entry.js.map +0 -1
  200. package/dist/native/p-5d67a825.entry.js +0 -2
  201. package/dist/native/p-6c1b9c89.entry.js +0 -2
  202. package/dist/native/p-907c3eda.entry.js +0 -2
  203. package/dist/native/p-91d4b4d7.entry.js +0 -2
  204. package/dist/native/p-a9b6461b.entry.js +0 -2
  205. package/dist/native/p-a9b6461b.entry.js.map +0 -1
  206. package/dist/native/p-bbc45099.entry.js +0 -2
  207. package/dist/native/p-f1545844.entry.js.map +0 -1
  208. package/dist/native/p-f42e87b5.entry.js +0 -2
  209. /package/dist/native/{p-b902c7c0.entry.js.map → p-0a9a738c.entry.js.map} +0 -0
  210. /package/dist/native/{p-3e9521a0.entry.js.map → p-1e2bd4e3.entry.js.map} +0 -0
  211. /package/dist/native/{p-f2ea8aa9.entry.js.map → p-3283505f.entry.js.map} +0 -0
  212. /package/dist/native/{p-c59e3500.entry.js.map → p-3adf0c45.entry.js.map} +0 -0
  213. /package/dist/native/{p-0710efd7.entry.js.map → p-4e056cd8.entry.js.map} +0 -0
  214. /package/dist/native/{p-ee78addb.entry.js.map → p-552e7ea4.entry.js.map} +0 -0
  215. /package/dist/native/{p-74778f5f.entry.js.map → p-575ea40b.entry.js.map} +0 -0
  216. /package/dist/native/{p-5d67a825.entry.js.map → p-5f160072.entry.js.map} +0 -0
  217. /package/dist/native/{p-10a06059.entry.js.map → p-6bb2c88f.entry.js.map} +0 -0
  218. /package/dist/native/{p-e56d3715.entry.js.map → p-6ea62d17.entry.js.map} +0 -0
  219. /package/dist/native/{p-45aa0c68.entry.js.map → p-788712dd.entry.js.map} +0 -0
  220. /package/dist/native/{p-9cef006d.entry.js.map → p-7dfb4a60.entry.js.map} +0 -0
  221. /package/dist/native/{p-907c3eda.entry.js.map → p-8ae9aaf1.entry.js.map} +0 -0
  222. /package/dist/native/{p-f4ecacf6.entry.js.map → p-cd251f91.entry.js.map} +0 -0
  223. /package/dist/native/{p-f42e87b5.entry.js.map → p-e8d181e6.entry.js.map} +0 -0
  224. /package/dist/native/{p-e390557d.entry.js.map → p-ed825c80.entry.js.map} +0 -0
  225. /package/dist/native/{p-d0f83d1f.entry.js.map → p-f79752ca.entry.js.map} +0 -0
  226. /package/dist/native/{p-91d4b4d7.entry.js.map → p-fc8cad13.entry.js.map} +0 -0
@@ -0,0 +1,1159 @@
1
+ import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-3b209e94.js';
2
+ import { d as defineCustomElement$8 } from './p-2abfadb8.js';
3
+ import { d as defineCustomElement$7 } from './p-afa1c98e.js';
4
+ import { d as defineCustomElement$6 } from './p-63afc71f.js';
5
+ import { d as defineCustomElement$5 } from './p-5b98036c.js';
6
+ import { d as defineCustomElement$4 } from './p-d3b1c116.js';
7
+ import { d as defineCustomElement$3 } from './p-0b30dd1b.js';
8
+ import { d as defineCustomElement$2 } from './p-78e7c594.js';
9
+ import { v as v4 } from './p-f5ff676c.js';
10
+
11
+ const nvFieldmultiselectCss = "nv-fieldmultiselect{--nv-field-border-default:var(--components-form-field-border-default);--nv-field-border-hover:var(--components-form-field-border-hover);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--components-form-field-border-default);--nv-field-border-readonly:var(--components-form-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-brand);--nv-field-background:var(--components-form-field-background-default);display:flex;flex-direction:column;align-items:flex-start;gap:var(--form-gap-y);box-sizing:border-box}nv-fieldmultiselect[readonly]:not([readonly=false]){--nv-field-border-default:var(--components-form-field-border-readonly);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-background:var(--components-form-field-background-readonly)}nv-fieldmultiselect[error]:not([error=false]){--nv-field-border-default:var(--components-form-field-border-error);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-destructive)}nv-fieldmultiselect[required]:not([required=false])>label::after{content:\"*\";color:var(--components-form-text-required);font-weight:700}nv-fieldmultiselect label{display:flex;align-items:center;gap:var(--form-label-gap);align-self:stretch;color:var(--components-form-text-label-default);font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-label-font-size);font-style:normal;font-weight:500;line-height:var(--form-label-line-height)}nv-fieldmultiselect nv-popover{width:100%;display:block}nv-fieldmultiselect .input-wrapper-multiselect{display:flex;flex-wrap:wrap;gap:var(--form-gap-x);align-items:stretch;align-self:stretch;width:100%}nv-fieldmultiselect .input-container-multiselect{display:flex;flex-grow:1;padding:calc(var(--form-field-padding-y) - 1px) var(--form-field-padding-x);justify-content:center;align-items:center;gap:var(--form-field-gap);align-self:stretch;border-radius:var(--form-field-radius);border-width:1px;border-style:solid;border-color:var(--nv-field-border-default);opacity:var(--components-form-opacity-default);background:var(--nv-field-background);transition:all 150ms ease-out;display:flex;align-items:center;position:relative;width:100%;min-height:40px}nv-fieldmultiselect .input-container-multiselect:hover{border-color:var(--nv-field-border-hover)}nv-fieldmultiselect .input-container-multiselect:focus-within{border-color:var(--nv-field-border-focus);box-shadow:0px 0px 0px var(--focus-field-stroke) var(--nv-field-focus-box-shadow)}nv-fieldmultiselect .input-container-multiselect:has(input:read-only){opacity:0.5;background-color:var(--components-form-field-background-readonly);border-color:var(--nv-field-border-readonly)}nv-fieldmultiselect .input-container-multiselect:has(input:disabled){opacity:0.5;background-color:var(--components-form-field-background-disabled);border-color:var(--nv-field-border-disabled)}nv-fieldmultiselect .input-container-multiselect input,nv-fieldmultiselect .input-container-multiselect p.non-filterable-text{display:flex;align-items:center;flex:1 0 0;overflow:hidden;background-color:transparent;color:var(--components-form-field-content-text);text-overflow:ellipsis;font-size:var(--form-field-font-size);font-style:normal;font-weight:500;line-height:var(--form-field-line-height);width:100%;padding-right:2rem;flex-grow:1;margin:0;min-height:100%;box-sizing:border-box}nv-fieldmultiselect .input-container-multiselect input:focus,nv-fieldmultiselect .input-container-multiselect p.non-filterable-text:focus{outline:none}nv-fieldmultiselect .input-container-multiselect input::placeholder,nv-fieldmultiselect .input-container-multiselect p.non-filterable-text::placeholder{overflow:hidden;color:var(--components-form-field-content-placeholder);text-overflow:ellipsis;font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-field-font-size);font-style:normal;font-weight:400;line-height:var(--form-field-line-height)}nv-fieldmultiselect .input-container-multiselect .toggle-dropdown-icon{position:absolute;right:0;top:50%;transform:translateY(-50%);z-index:2}nv-fieldmultiselect .input-container-multiselect nv-icon.validation{color:var(--nv-field-border-default);position:absolute;right:50px}nv-fieldmultiselect .input-container-multiselect.focus-within,nv-fieldmultiselect .input-container-multiselect:hover{border-color:var(--nv-field-border-focus);box-shadow:0px 0px 0px var(--focus-field-stroke) var(--nv-field-focus-box-shadow)}nv-fieldmultiselect .non-filterable-text{display:block;border-radius:var(--form-field-radius);background-color:var(--nv-field-background);color:var(--components-form-field-content-text);font-size:var(--form-field-font-size);font-weight:500;line-height:var(--form-field-line-height);box-sizing:border-box;cursor:pointer;height:100%;min-height:40px}nv-fieldmultiselect .non-filterable-text span{display:inline-block;width:100%;overflow:hidden;text-overflow:ellipsis}nv-fieldmultiselect .description{align-self:stretch;color:var(--components-form-text-description-default);font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height)}nv-fieldmultiselect .error-description{align-self:stretch;color:var(--components-form-text-description-default);font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height);color:var(--components-form-text-description-error)}.input-container-multiselect.focus-within,.input-container-multiselect:hover{border-color:var(--nv-field-border-focus);box-shadow:0px 0px 0px var(--focus-field-stroke) var(--nv-field-focus-box-shadow)}.no-results-message{text-align:center;padding:10px;color:var(--nv-field-error-text, #999)}.multiselect-divider{display:block;width:100%;height:1px;background-color:var(--multiselect-divider-color, #ccc);margin:8px 0}";
12
+ const NvFieldmultiselectStyle0 = nvFieldmultiselectCss;
13
+
14
+ const NvFieldmultiselect$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldmultiselect extends H {
15
+ constructor() {
16
+ super();
17
+ this.__registerHost();
18
+ this.dropdownItemSelected = createEvent(this, "dropdownItemSelected", 7);
19
+ this.valueChanged = createEvent(this, "valueChanged", 7);
20
+ this.multiselectChange = createEvent(this, "multiselectChange", 7);
21
+ /****************************************************************************/
22
+ //#region PROPERTIES
23
+ /**
24
+ * Sets the ID for the input element and the for attribute of the associated
25
+ * label. If no ID is provided, a random one will be automatically generated
26
+ * to ensure unique identification, facilitating proper label association and
27
+ * accessibility.
28
+ */
29
+ this.inputId = v4();
30
+ /**
31
+ * Defines the maximum height of the multiselect list when open.
32
+ */
33
+ this.maxHeight = '200px';
34
+ /**
35
+ * Text for the badge showing the number of selected items.
36
+ */
37
+ this.badgeLabel = '';
38
+ /**
39
+ * The text to display when no items match the filter.
40
+ */
41
+ this.emptyresult = 'No results found';
42
+ /**
43
+ * Marks the input field as required.
44
+ */
45
+ this.required = false;
46
+ /**
47
+ * Alters the input field's appearance to indicate an error.
48
+ */
49
+ this.error = false;
50
+ /**
51
+ * Display the input field's content without allowing users to change it.
52
+ */
53
+ this.readonly = false;
54
+ /**
55
+ * Disables the input field.
56
+ */
57
+ this.disabled = false;
58
+ /**
59
+ * The autocomplete prop for faster input filling.
60
+ */
61
+ this.autocomplete = 'off';
62
+ /**
63
+ * Enables or disables the filtering feature for the multiselect items.
64
+ */
65
+ this.filterable = false;
66
+ /**
67
+ * State of the multiselect popover.
68
+ */
69
+ this.open = false;
70
+ /**
71
+ * Options configuration for the multiselect items.
72
+ */
73
+ this.parsedOptions = [];
74
+ /**
75
+ * List of selected values in the multiselect.
76
+ */
77
+ this.selectedValues = [];
78
+ /**
79
+ * Sorted options for display.
80
+ */
81
+ this.sortedOptions = [];
82
+ /**
83
+ * The text entered by the user for filtering multiselect items.
84
+ */
85
+ this.filterText = '';
86
+ /**
87
+ * Determines whether the multiselect is filterable.
88
+ */
89
+ this.isFilterable = this.filterable;
90
+ /**
91
+ * Delay in milliseconds before the search is triggered when typing in the filter input.
92
+ * @default 300
93
+ */
94
+ this.debounceDelay = 300;
95
+ /**
96
+ * State for the mode of the multiselect.
97
+ * @type {'options' | 'slots'}
98
+ * @default 'options'
99
+ */
100
+ this.modeState = 'options'; // Default value
101
+ this.isHandlingEscape = false;
102
+ /**x
103
+ * Handle badge close for options mode.
104
+ */
105
+ this.handleBadgeCloseOptions = () => {
106
+ this.selectedValues = [];
107
+ this.multiselectChange.emit(this.selectedValues);
108
+ // Uncheck all elements
109
+ const items = Array.from(this.el.querySelectorAll('nv-fielddropdownitemcheck'));
110
+ items.forEach(item => {
111
+ item.checked = false;
112
+ item.style.display = '';
113
+ });
114
+ // Reorder options without the divider since there are no selected elements
115
+ this.parsedOptions = this.parsedOptions.filter(option => !option.isDivider);
116
+ // Reorder options without the divider since there are no selected elements
117
+ this.reorderOptionsContent();
118
+ };
119
+ /**
120
+ * Handle badge close for slots mode.
121
+ */
122
+ this.handleBadgeCloseSlots = () => {
123
+ this.selectedValues = [];
124
+ this.multiselectChange.emit(this.selectedValues);
125
+ // Uncheck all elements
126
+ const items = Array.from(this.el.querySelectorAll('nv-fielddropdownitemcheck'));
127
+ items.forEach(item => {
128
+ item.checked = false;
129
+ item.style.display = '';
130
+ });
131
+ // Reorder slot content
132
+ this.reorderSlotContent();
133
+ };
134
+ /**
135
+ * Handle popover close
136
+ */
137
+ this.handlePopoverClose = () => {
138
+ // If we are handling Escape, ignore this event
139
+ if (this.isHandlingEscape) {
140
+ return;
141
+ }
142
+ this.open = false;
143
+ this.filterText = '';
144
+ // Only reorder based on the mode
145
+ if (this.modeState === 'options') {
146
+ this.reorderOptionsContent();
147
+ }
148
+ else {
149
+ this.reorderSlotContent();
150
+ }
151
+ // Reset filter if needed
152
+ if (this.filterable) {
153
+ this.resetFilter();
154
+ }
155
+ };
156
+ /**
157
+ * Handle input blur for options mode.
158
+ */
159
+ this.handleInputBlurOptions = () => {
160
+ setTimeout(() => {
161
+ if (!this.el.contains(document.activeElement)) {
162
+ // Close the popover without affecting the divider
163
+ this.open = false;
164
+ this.popoverElement.hide();
165
+ // Reset filter if needed
166
+ if (this.filterable) {
167
+ this.filterText = '';
168
+ this.resetFilter();
169
+ }
170
+ }
171
+ }, 150);
172
+ };
173
+ /**
174
+ * Handle click on the input container for options mode.
175
+ * @param {MouseEvent} event - The click event.
176
+ */
177
+ this.handleInputContainerClickOptions = (event) => {
178
+ if (this.disabled || this.readonly) {
179
+ return;
180
+ }
181
+ const target = event.target;
182
+ if (target.tagName === 'P' || target.tagName === 'SPAN') {
183
+ this.open = true;
184
+ this.popoverElement.show();
185
+ const inputContainer = this.el.querySelector('.input-container');
186
+ if (inputContainer) {
187
+ inputContainer.classList.add('focus-within');
188
+ const removeFocusWithin = () => {
189
+ inputContainer.classList.remove('focus-within');
190
+ };
191
+ this.popoverElement.addEventListener('hide', removeFocusWithin);
192
+ }
193
+ }
194
+ };
195
+ /**
196
+ * Handle click on the input container for slots mode.
197
+ * @param {MouseEvent} event - The click event.
198
+ */
199
+ this.handleInputContainerClickSlots = (event) => {
200
+ if (this.disabled || this.readonly) {
201
+ return;
202
+ }
203
+ const target = event.target;
204
+ if (target.tagName === 'P' || target.tagName === 'SPAN') {
205
+ this.open = true;
206
+ this.popoverElement.show();
207
+ const inputContainer = this.el.querySelector('.input-container');
208
+ if (inputContainer) {
209
+ inputContainer.classList.add('focus-within');
210
+ const removeFocusWithin = () => {
211
+ inputContainer.classList.remove('focus-within');
212
+ };
213
+ this.popoverElement.addEventListener('hide', removeFocusWithin);
214
+ }
215
+ }
216
+ };
217
+ /**
218
+ * Handle input change for options mode.
219
+ * @param {Event} event - The input event.
220
+ */
221
+ this.handleInputOptions = (event) => {
222
+ if (!this.filterable)
223
+ return;
224
+ if (this.disabled || this.readonly) {
225
+ return;
226
+ }
227
+ const input = event.target;
228
+ this.value = input.value;
229
+ this.valueChanged.emit(this.value);
230
+ // Clear any existing timer
231
+ if (this.debounceTimer) {
232
+ window.clearTimeout(this.debounceTimer);
233
+ }
234
+ // Set a new timer for filtering
235
+ this.debounceTimer = window.setTimeout(() => {
236
+ this.filterText = input.value.toLowerCase();
237
+ this.filterItemsOption();
238
+ }, this.debounceDelay);
239
+ };
240
+ /**
241
+ * Handle input change for slots mode
242
+ * @param {Event} event - The input event.
243
+ */
244
+ this.handleInputSlots = (event) => {
245
+ if (!this.filterable)
246
+ return;
247
+ if (this.disabled || this.readonly)
248
+ return;
249
+ const input = event.target;
250
+ this.value = input.value;
251
+ this.valueChanged.emit(this.value);
252
+ // Clear any existing timer
253
+ if (this.debounceTimer) {
254
+ window.clearTimeout(this.debounceTimer);
255
+ }
256
+ // Set a new timer for filtering
257
+ this.debounceTimer = window.setTimeout(() => {
258
+ this.filterText = input.value.toLowerCase();
259
+ this.filterSlotsItems();
260
+ }, this.debounceDelay);
261
+ };
262
+ /**
263
+ * Handle input focus for options mode.
264
+ */
265
+ this.handleInputFocusOptions = () => {
266
+ if (this.disabled || this.readonly) {
267
+ return;
268
+ }
269
+ this.open = true;
270
+ };
271
+ /**
272
+ * Handle input focus for slots mode.
273
+ */
274
+ this.handleInputFocusSlots = () => {
275
+ if (this.disabled || this.readonly) {
276
+ return;
277
+ }
278
+ this.open = true;
279
+ };
280
+ /**
281
+ * Handle input blur for slots mode.
282
+ */
283
+ this.handleInputBlurSlots = () => {
284
+ setTimeout(() => {
285
+ if (!this.el.contains(document.activeElement)) {
286
+ // Fermer le popover sans affecter le divider
287
+ this.open = false;
288
+ this.popoverElement.hide();
289
+ // Reset filter if needed
290
+ if (this.filterable) {
291
+ this.filterText = '';
292
+ this.resetFilter();
293
+ }
294
+ }
295
+ }, 150);
296
+ };
297
+ /**
298
+ * Toggle the multiselect popover for options mode.
299
+ */
300
+ this.togglePopoverOptions = () => {
301
+ if (this.disabled || this.readonly) {
302
+ return;
303
+ }
304
+ if (this.open) {
305
+ this.handlePopoverClose();
306
+ }
307
+ else {
308
+ this.open = true;
309
+ this.popoverElement.show();
310
+ if (!this.filterable) {
311
+ this.focusFirstItem();
312
+ }
313
+ }
314
+ };
315
+ /**
316
+ * Toggle the multiselect popover for slots mode.
317
+ */
318
+ this.togglePopoverSlots = () => {
319
+ if (this.disabled || this.readonly) {
320
+ return;
321
+ }
322
+ if (this.open) {
323
+ this.handlePopoverClose();
324
+ }
325
+ else {
326
+ this.open = true;
327
+ this.popoverElement.show();
328
+ if (!this.filterable) {
329
+ this.focusFirstItem();
330
+ }
331
+ }
332
+ };
333
+ }
334
+ //#endregion PROPERTIES
335
+ /****************************************************************************/
336
+ //#region LIFECYCLE
337
+ /**
338
+ * Subscribe to click outside event.
339
+ */
340
+ connectedCallback() {
341
+ document.addEventListener('click', this.handleClickOutside.bind(this));
342
+ }
343
+ /**
344
+ * Set the mode state and handle options change.
345
+ */
346
+ componentWillLoad() {
347
+ this.modeState = this.mode;
348
+ // Don't call handleOptionsChange if we are in slots mode
349
+ if (this.modeState === 'options') {
350
+ this.handleOptionsChange(this.options);
351
+ }
352
+ // Add the listener for the hide event
353
+ requestAnimationFrame(() => {
354
+ if (this.popoverElement) {
355
+ this.popoverElement.addEventListener('hide', () => {
356
+ this.handlePopoverClose();
357
+ });
358
+ }
359
+ });
360
+ // Specific initialization for slots mode
361
+ if (this.modeState === 'slots') {
362
+ Promise.resolve().then(() => {
363
+ const items = Array.from(this.el.querySelectorAll('nv-fielddropdownitemcheck'));
364
+ // Initialize selectedValues with checked items
365
+ this.selectedValues = items
366
+ .filter(item => item.hasAttribute('checked'))
367
+ .map(item => item.getAttribute('value') || '');
368
+ // Force a reorder after initialization
369
+ requestAnimationFrame(() => {
370
+ this.reorderSlotContent();
371
+ });
372
+ });
373
+ }
374
+ // Initialize the sorted options array with the parsed options for initial rendering
375
+ if (this.modeState === 'options') {
376
+ this.sortedOptions = [...this.parsedOptions];
377
+ }
378
+ // Apply filtering if the multiselect is filterable and there is a value
379
+ if (this.filterable && this.value) {
380
+ this.filterText = String(this.value).toLocaleLowerCase();
381
+ this.filterItems();
382
+ }
383
+ else {
384
+ // Reset visibility state of all dropdown items
385
+ this.resetFilter();
386
+ }
387
+ }
388
+ /**
389
+ * Force reorder if options mode in componentDidLoad because of the initial render not trigger @watch
390
+ */
391
+ componentDidLoad() {
392
+ if (this.modeState === 'options') {
393
+ requestAnimationFrame(() => {
394
+ this.reorderOptionsContent();
395
+ });
396
+ }
397
+ }
398
+ /**
399
+ * Unsubscribe from click outside event.
400
+ */
401
+ disconnectedCallback() {
402
+ document.removeEventListener('click', this.handleClickOutside.bind(this));
403
+ // Remove the listener for the hide event
404
+ if (this.popoverElement) {
405
+ this.popoverElement.removeEventListener('hide', () => {
406
+ this.handlePopoverClose();
407
+ });
408
+ }
409
+ }
410
+ /**
411
+ * Emitted when the input loses focus.
412
+ * @param {CustomEvent<boolean>} event - The event object containing the focus state.
413
+ */
414
+ handleOpenChanged(event) {
415
+ // Update the open state of popover
416
+ this.open = event.detail;
417
+ if (this.open) {
418
+ if (this.filterText) {
419
+ this.filterItems();
420
+ }
421
+ }
422
+ else if (this.modeState === 'options') {
423
+ this.reorderOptionsContent();
424
+ }
425
+ else {
426
+ this.reorderSlotContent();
427
+ }
428
+ }
429
+ /**
430
+ * Listen for the `itemChecked` event emitted by child items.
431
+ * @param {CustomEvent<{ value: string; checked: boolean }>} event - The event object containing the selected value and its checked state.
432
+ */
433
+ handleItemChecked(event) {
434
+ if (this.disabled || this.readonly) {
435
+ return;
436
+ }
437
+ const { value, checked } = event.detail;
438
+ if (value !== undefined && value !== null) {
439
+ const newSelectedValues = [...this.selectedValues];
440
+ const valueIndex = newSelectedValues.indexOf(value);
441
+ if (checked && valueIndex === -1) {
442
+ newSelectedValues.push(value);
443
+ }
444
+ else if (!checked && valueIndex > -1) {
445
+ newSelectedValues.splice(valueIndex, 1);
446
+ }
447
+ // Update the state and emit the event only if the selection has changed
448
+ if (JSON.stringify(this.selectedValues) !==
449
+ JSON.stringify(newSelectedValues)) {
450
+ this.selectedValues = newSelectedValues;
451
+ // Use requestAnimationFrame to ensure the state is updated before emitting the event
452
+ requestAnimationFrame(() => {
453
+ this.multiselectChange.emit(this.selectedValues);
454
+ });
455
+ }
456
+ }
457
+ else {
458
+ console.warn('Received itemChecked event with undefined or null value'); // Warning log
459
+ }
460
+ }
461
+ /**
462
+ * Emitted when the options change.
463
+ * @param {string | Array<{label: string, value: string, isDivider?: boolean, disabled?: boolean, description?: string, checked?: boolean}>} newValue - The new value of the options.
464
+ */
465
+ handleOptionsChange(newValue) {
466
+ if (typeof newValue === 'string') {
467
+ try {
468
+ const parsedOpts = JSON.parse(newValue);
469
+ this.selectedValues = parsedOpts
470
+ .filter(option => option.checked)
471
+ .map(option => option.value);
472
+ this.parsedOptions = [...parsedOpts];
473
+ }
474
+ catch (error) {
475
+ console.error('Error parsing options:', error);
476
+ this.parsedOptions = [];
477
+ }
478
+ }
479
+ else if (Array.isArray(newValue)) {
480
+ this.selectedValues = newValue
481
+ .filter(option => option.checked)
482
+ .map(option => option.value);
483
+ this.parsedOptions = [...newValue];
484
+ }
485
+ else {
486
+ this.parsedOptions = [];
487
+ }
488
+ // Wait for the options to be fully loaded
489
+ Promise.resolve().then(() => {
490
+ requestAnimationFrame(() => {
491
+ if (this.modeState === 'options') {
492
+ this.reorderOptionsContent();
493
+ }
494
+ });
495
+ });
496
+ }
497
+ /**
498
+ * Emitted when the value changes.
499
+ */
500
+ watchValueHandler() {
501
+ // Handle value change and update the corresponding multiselect item if it exists
502
+ this.setInitialSelection();
503
+ }
504
+ /**
505
+ * Emitted when the filterable property changes.
506
+ * @param {boolean} newValue - The new value of the filterable property.
507
+ */
508
+ watchFilterableHandler(newValue) {
509
+ this.isFilterable = newValue;
510
+ this.filterable = newValue;
511
+ }
512
+ // Add a listener for the slot content
513
+ handleSlotChange(event) {
514
+ // Check: we only want to reorder if it's the "content" slot
515
+ const slot = event.target;
516
+ if (slot && slot.name === 'content') {
517
+ // To give other platforms (VueJS, React, etc.) time to insert all their items,
518
+ // we place the reorder in a requestAnimationFrame
519
+ requestAnimationFrame(() => {
520
+ this.reorderSlotContent();
521
+ });
522
+ }
523
+ }
524
+ //#endregion EVENTS
525
+ /****************************************************************************/
526
+ //#region METHODS
527
+ /**
528
+ * Retrieves the current filter text entered by the user.
529
+ * @returns {string} The filter text.
530
+ */
531
+ async getFilterText() {
532
+ return this.filterText;
533
+ }
534
+ /**
535
+ * Set the initial selection based on the current value and update the inputElement value.
536
+ */
537
+ setInitialSelection() {
538
+ var _a;
539
+ const items = Array.from(this.el.querySelectorAll('nv-fielddropdownitem'));
540
+ const selectedItem = items.find(item => {
541
+ var _a;
542
+ return item.getAttribute('label') === this.value ||
543
+ item.getAttribute('value') === this.value ||
544
+ ((_a = item.textContent) === null || _a === void 0 ? void 0 : _a.trim()) === this.value;
545
+ });
546
+ // Remove 'selected' from all items first to reset the state
547
+ items.forEach(item => {
548
+ item.removeAttribute('selected');
549
+ item.classList.remove('selected');
550
+ });
551
+ if (selectedItem) {
552
+ // Add the `selected` attribute and `selected` class for visual styling
553
+ selectedItem.setAttribute('selected', 'true');
554
+ selectedItem.classList.add('selected');
555
+ // Update the value and inputElement value to reflect the pre-selected item
556
+ this.value =
557
+ selectedItem.getAttribute('label') ||
558
+ selectedItem.getAttribute('value') ||
559
+ ((_a = selectedItem.textContent) === null || _a === void 0 ? void 0 : _a.trim()) ||
560
+ '';
561
+ if (this.inputElement) {
562
+ this.inputElement.value = this.value;
563
+ }
564
+ }
565
+ }
566
+ /**
567
+ * Reset the filter and make all items visible.
568
+ */
569
+ async resetFilter() {
570
+ const items = Array.from(this.el.querySelectorAll('nv-fielddropdownitemcheck'));
571
+ // Reset visibility state of all dropdown items
572
+ items.forEach(item => {
573
+ item.style.display = '';
574
+ });
575
+ // Clean up filter-related UI elements
576
+ const ul = this.el.querySelector('ul');
577
+ if (ul) {
578
+ const emptyMessage = ul.querySelector('[data-empty]');
579
+ if (emptyMessage)
580
+ emptyMessage.remove();
581
+ // Reorder with divider if needed
582
+ const selectedItems = items.filter(item => this.selectedValues.includes(item.getAttribute('value') || ''));
583
+ const unselectedItems = items.filter(item => !this.selectedValues.includes(item.getAttribute('value') || ''));
584
+ if (selectedItems.length > 0) {
585
+ this.manageDivider(ul, selectedItems, unselectedItems);
586
+ }
587
+ }
588
+ }
589
+ /**
590
+ * Returns the list of selected values.
591
+ * @returns {string[]} The selected values.
592
+ */
593
+ async getSelectedValues() {
594
+ return this.selectedValues;
595
+ }
596
+ /**
597
+ * Reorder the content of the slot.
598
+ */
599
+ reorderSlotContent() {
600
+ if (this.modeState === 'options')
601
+ return;
602
+ const ul = this.el.querySelector('ul');
603
+ if (!ul)
604
+ return;
605
+ // Remove all existing <hr class="multiselect-divider">
606
+ ul.querySelectorAll('hr.multiselect-divider').forEach(divider => divider.remove());
607
+ // Retrieve all items (not hidden)
608
+ const items = Array.from(this.el.querySelectorAll('nv-fielddropdownitemcheck')).filter(item => item.style.display !== 'none');
609
+ // If you possibly have a "No results" message:
610
+ const hasEmptyMessage = ul.querySelector('[data-empty]');
611
+ if (hasEmptyMessage) {
612
+ // if there is a "No results found" message, do not reorder
613
+ return;
614
+ }
615
+ // Separate checked vs unchecked
616
+ const selectedItems = items.filter(item => this.selectedValues.includes(item.getAttribute('value') || ''));
617
+ const unselectedItems = items.filter(item => !this.selectedValues.includes(item.getAttribute('value') || ''));
618
+ // Reinsert CHECKED items FIRST
619
+ // appendChild() moves the element without recreating it
620
+ // this is not trigger a re-rendering of the component in the platforms
621
+ selectedItems.forEach(item => {
622
+ ul.appendChild(item); // <-- The <li> (or <nv-fielddropdownitemcheck>) is just "moved" to the end of the list
623
+ });
624
+ // Add a divider if needed
625
+ if (selectedItems.length > 0 && unselectedItems.length > 0) {
626
+ const divider = document.createElement('hr');
627
+ divider.className = 'multiselect-divider';
628
+ ul.appendChild(divider);
629
+ }
630
+ // Reinsert UNCHECKED items at the end
631
+ unselectedItems.forEach(item => {
632
+ ul.appendChild(item);
633
+ });
634
+ }
635
+ /**
636
+ * Reorder the content for options mode with async handling
637
+ */
638
+ reorderOptionsContent() {
639
+ const ul = this.el.querySelector('ul[role="content"]');
640
+ if (!ul)
641
+ return;
642
+ const items = Array.from(ul.querySelectorAll('nv-fielddropdownitemcheck')).filter(item => item.style.display !== 'none');
643
+ const selectedItems = items.filter(item => this.selectedValues.includes(item.getAttribute('value') || ''));
644
+ const unselectedItems = items.filter(item => !this.selectedValues.includes(item.getAttribute('value') || ''));
645
+ // Reorder the elements
646
+ selectedItems.forEach(item => ul.appendChild(item));
647
+ unselectedItems.forEach(item => ul.appendChild(item));
648
+ // Manage the divider after the reordering
649
+ this.manageDivider(ul, selectedItems, unselectedItems);
650
+ }
651
+ /**
652
+ * Filter multiselect items based on the text entered by the user.
653
+ */
654
+ filterItems() {
655
+ const ul = this.el.querySelector('ul');
656
+ if (!ul)
657
+ return;
658
+ // Remove existing empty message if any
659
+ const existingEmptyMessage = ul.querySelector('[data-empty]');
660
+ if (existingEmptyMessage) {
661
+ existingEmptyMessage.remove();
662
+ }
663
+ if (!this.filterText.trim()) {
664
+ if (this.parsedOptions && this.parsedOptions.length > 0) {
665
+ // Reset options display
666
+ const items = Array.from(ul.querySelectorAll('nv-fielddropdownitemcheck'));
667
+ items.forEach(item => {
668
+ item.style.display = '';
669
+ });
670
+ }
671
+ else {
672
+ // Reset slot items display
673
+ const items = Array.from(this.el.querySelectorAll('nv-fielddropdownitemcheck'));
674
+ items.forEach(item => {
675
+ item.style.display = '';
676
+ });
677
+ }
678
+ // Reorder with divider
679
+ const items = Array.from(ul.querySelectorAll('nv-fielddropdownitemcheck'));
680
+ const selectedItems = items.filter(item => this.selectedValues.includes(item.getAttribute('value') || ''));
681
+ const unselectedItems = items.filter(item => !this.selectedValues.includes(item.getAttribute('value') || ''));
682
+ this.manageDivider(ul, selectedItems, unselectedItems);
683
+ return;
684
+ }
685
+ const normalizedFilter = this.normalizeText(this.filterText);
686
+ let hasVisibleItems = false;
687
+ if (this.parsedOptions && this.parsedOptions.length > 0) {
688
+ // Filter options mode
689
+ const items = Array.from(ul.querySelectorAll('nv-fielddropdownitemcheck'));
690
+ items.forEach(item => {
691
+ const option = this.parsedOptions.find(opt => opt.value === item.getAttribute('value'));
692
+ if (option && !option.isDivider) {
693
+ const matchesFilter = this.normalizeText(option.label).includes(normalizedFilter) ||
694
+ this.normalizeText(option.value).includes(normalizedFilter);
695
+ item.style.display = matchesFilter ? '' : 'none';
696
+ if (matchesFilter)
697
+ hasVisibleItems = true;
698
+ }
699
+ });
700
+ // Manage the divider with the visible items
701
+ const visibleItems = items.filter(item => item.style.display !== 'none');
702
+ const visibleSelected = visibleItems.filter(item => this.selectedValues.includes(item.getAttribute('value') || ''));
703
+ const visibleUnselected = visibleItems.filter(item => !this.selectedValues.includes(item.getAttribute('value') || ''));
704
+ this.manageDivider(ul, visibleSelected, visibleUnselected);
705
+ }
706
+ else {
707
+ // Filter slot items mode
708
+ const items = Array.from(this.el.querySelectorAll('nv-fielddropdownitemcheck'));
709
+ items.forEach(item => {
710
+ const label = item.getAttribute('label') || '';
711
+ const value = item.getAttribute('value') || '';
712
+ const textContent = item.textContent || '';
713
+ const matchesFilter = this.normalizeText(label).includes(normalizedFilter) ||
714
+ this.normalizeText(value).includes(normalizedFilter) ||
715
+ this.normalizeText(textContent).includes(normalizedFilter);
716
+ item.style.display = matchesFilter ? '' : 'none';
717
+ if (matchesFilter)
718
+ hasVisibleItems = true;
719
+ });
720
+ }
721
+ // Add empty message if no items match the filter
722
+ if (!hasVisibleItems) {
723
+ const emptyMessage = document.createElement('li');
724
+ emptyMessage.setAttribute('data-empty', 'true');
725
+ emptyMessage.textContent = this.emptyresult;
726
+ emptyMessage.classList.add('no-results-message');
727
+ ul.appendChild(emptyMessage);
728
+ }
729
+ this.reorderSlotContent();
730
+ }
731
+ /**
732
+ * Filter multiselect items in options mode.
733
+ */
734
+ filterItemsOption() {
735
+ const ul = this.el.querySelector('ul');
736
+ if (!ul)
737
+ return;
738
+ const normalizedFilter = this.normalizeText(this.filterText);
739
+ let hasVisibleItems = false;
740
+ const items = Array.from(ul.querySelectorAll('nv-fielddropdownitemcheck'));
741
+ // Reset items if the filter text is empty
742
+ if (!this.filterText.trim()) {
743
+ // Remove the empty message if it exists
744
+ this.removeEmptyMessageOption(ul);
745
+ items.forEach(item => (item.style.display = ''));
746
+ this.reorderOptionsContent(); // Reorder after reset
747
+ return;
748
+ }
749
+ // Filter the items
750
+ items.forEach(item => {
751
+ const label = item.getAttribute('label') || '';
752
+ const value = item.getAttribute('value') || '';
753
+ const matchesFilter = this.normalizeText(label).includes(normalizedFilter) ||
754
+ this.normalizeText(value).includes(normalizedFilter);
755
+ item.style.display = matchesFilter ? '' : 'none';
756
+ if (matchesFilter)
757
+ hasVisibleItems = true;
758
+ });
759
+ // Manage the divider with the visible items
760
+ const visibleItems = items.filter(item => item.style.display !== 'none');
761
+ const visibleSelected = visibleItems.filter(item => this.selectedValues.includes(item.getAttribute('value') || ''));
762
+ const visibleUnselected = visibleItems.filter(item => !this.selectedValues.includes(item.getAttribute('value') || ''));
763
+ this.manageDivider(ul, visibleSelected, visibleUnselected);
764
+ // Add or remove the empty message based on the case
765
+ if (!hasVisibleItems) {
766
+ this.addEmptyMessageOption(ul);
767
+ }
768
+ else {
769
+ this.removeEmptyMessageOption(ul);
770
+ }
771
+ }
772
+ /**
773
+ * Filter multiselect items in slots mode
774
+ */
775
+ filterSlotsItems() {
776
+ if (this.modeState === 'options')
777
+ return;
778
+ const ul = this.el.querySelector('ul');
779
+ if (!ul)
780
+ return;
781
+ // Remove existing empty message if any
782
+ const existingEmptyMessage = ul.querySelector('[data-empty]');
783
+ if (existingEmptyMessage) {
784
+ existingEmptyMessage.remove();
785
+ }
786
+ // If filter text is empty, reset all items visibility
787
+ if (!this.filterText.trim()) {
788
+ this.resetFilter();
789
+ return;
790
+ }
791
+ const normalizedFilter = this.normalizeText(this.filterText);
792
+ let hasVisibleItems = false;
793
+ // Get all items and preserve them in the DOM
794
+ const items = Array.from(this.el.querySelectorAll('nv-fielddropdownitemcheck'));
795
+ // Instead of removing/reordering, just hide/show items
796
+ items.forEach(item => {
797
+ var _a;
798
+ const label = item.getAttribute('label') || '';
799
+ const value = item.getAttribute('value') || '';
800
+ const textContent = ((_a = item.textContent) === null || _a === void 0 ? void 0 : _a.trim()) || '';
801
+ const matchesFilter = this.normalizeText(label).includes(normalizedFilter) ||
802
+ this.normalizeText(value).includes(normalizedFilter) ||
803
+ this.normalizeText(textContent).includes(normalizedFilter);
804
+ item.style.display = matchesFilter ? '' : 'none';
805
+ if (matchesFilter)
806
+ hasVisibleItems = true;
807
+ });
808
+ // Get visible items after filtering
809
+ const visibleItems = items.filter(item => item.style.display !== 'none');
810
+ const visibleSelectedItems = visibleItems.filter(item => this.selectedValues.includes(item.getAttribute('value') || ''));
811
+ this.manageDivider(ul, visibleSelectedItems, visibleItems.filter(item => !this.selectedValues.includes(item.getAttribute('value') || '')));
812
+ // Add empty message if no items match the filter
813
+ if (!hasVisibleItems) {
814
+ const emptyMessage = document.createElement('li');
815
+ emptyMessage.setAttribute('data-empty', 'true');
816
+ emptyMessage.textContent = this.emptyresult;
817
+ emptyMessage.classList.add('no-results-message');
818
+ ul.appendChild(emptyMessage);
819
+ }
820
+ }
821
+ /**
822
+ * Normalizes text by removing accents and converting to lowercase
823
+ * @param {string} text - The text to normalize
824
+ * @returns {string} The normalized text
825
+ *
826
+ * @example
827
+ * normalizeText("Café Latte") => "cafe latte"
828
+ *
829
+ * @description
830
+ * This function performs text normalization in three steps:
831
+ * 1. Decomposes characters into their base form and combining characters (NFD)
832
+ * 2. Removes all diacritical marks (accents, umlauts, etc.)
833
+ * 3. Converts to lowercase and trims whitespace
834
+ *
835
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize} - MDN documentation on String.normalize()
836
+ * @see {@link https://en.wikipedia.org/wiki/Unicode_equivalence#Normal_forms} - More info about Unicode normalization forms
837
+ */
838
+ normalizeText(text) {
839
+ return text
840
+ .normalize('NFD') // Decompose characters into base + combining characters (e.g., é => e + ´)
841
+ .replace(/[\u0300-\u036f]/g, '') // Remove all diacritical marks (Unicode range for combining characters)
842
+ .toLowerCase() // Convert to lowercase
843
+ .trim(); // Remove leading and trailing whitespace
844
+ }
845
+ /**
846
+ * Handle click outside the component.
847
+ * @param {MouseEvent} event - The click event.
848
+ */
849
+ handleClickOutside(event) {
850
+ if (this.el.contains(event.target) ||
851
+ (this.inputElement && this.inputElement.contains(event.target))) {
852
+ return;
853
+ }
854
+ // Use handlePopoverClose for all cases
855
+ this.handlePopoverClose();
856
+ }
857
+ /**
858
+ * Handle keyboard events & arrow key navigation.
859
+ * If the multiselect is not open, opens it and focuses on the first item if the list is not filterable.
860
+ * If the multiselect is open, handles arrow key navigation and closes it if the focus is outside the component.
861
+ * @param {KeyboardEvent} event - The keyboard event.
862
+ */
863
+ async handleKeyDown(event) {
864
+ if (!this.open) {
865
+ if (event.key === 'ArrowDown') {
866
+ this.open = true;
867
+ this.popoverElement.show();
868
+ // Focus on the first item if the list is not filterable
869
+ if (!this.filterable) {
870
+ requestAnimationFrame(() => {
871
+ this.focusFirstItem();
872
+ });
873
+ }
874
+ event.preventDefault();
875
+ return;
876
+ }
877
+ return;
878
+ }
879
+ const items = Array.from(this.el.querySelectorAll('nv-fielddropdownitemcheck:not([style*="display: none"])'));
880
+ if (items.length === 0) {
881
+ console.warn('No visible items found to navigate');
882
+ return;
883
+ }
884
+ let currentIndex = items.findIndex(item => item.classList.contains('highlighted'));
885
+ if (event.key === 'ArrowDown') {
886
+ event.preventDefault();
887
+ currentIndex =
888
+ currentIndex === -1 ? 0 : (currentIndex + 1) % items.length;
889
+ this.updateHighlightedItem(items, currentIndex);
890
+ }
891
+ else if (event.key === 'ArrowUp') {
892
+ event.preventDefault();
893
+ currentIndex =
894
+ currentIndex === -1
895
+ ? items.length - 1
896
+ : (currentIndex - 1 + items.length) % items.length;
897
+ this.updateHighlightedItem(items, currentIndex);
898
+ }
899
+ else if (event.key === 'Enter' && currentIndex >= 0) {
900
+ event.preventDefault();
901
+ const selectedItem = items[currentIndex];
902
+ // Toggle the checked state
903
+ const isCurrentlyChecked = selectedItem.hasAttribute('checked');
904
+ selectedItem.checked = !isCurrentlyChecked;
905
+ // Trigger a click event to ensure proper event handling
906
+ selectedItem.dispatchEvent(new MouseEvent('click', {
907
+ view: window,
908
+ bubbles: true,
909
+ cancelable: true,
910
+ }));
911
+ }
912
+ else if (event.key === 'Escape') {
913
+ event.preventDefault();
914
+ event.stopPropagation(); // Prevent the event from propagating to the popover
915
+ // Do the reorder and wait a bit before closing
916
+ const handleEscape = async () => {
917
+ this.isHandlingEscape = true; // Disable the hide listener
918
+ if (this.modeState === 'options') {
919
+ this.reorderOptionsContent();
920
+ }
921
+ else {
922
+ this.reorderSlotContent();
923
+ }
924
+ // Wait for the reorder to be applied
925
+ await new Promise(resolve => setTimeout(resolve, 100));
926
+ // Reactivate the hide listener after a short delay
927
+ setTimeout(() => {
928
+ this.isHandlingEscape = false;
929
+ this.open = false;
930
+ this.popoverElement.hide();
931
+ }, 150);
932
+ if (this.inputElement) {
933
+ this.inputElement.blur();
934
+ }
935
+ };
936
+ await handleEscape();
937
+ }
938
+ }
939
+ /**
940
+ * Updates the highlighted item in the dropdown list.
941
+ *
942
+ * @param {(HTMLNvFielddropdownitemElement | HTMLNvFielddropdownitemcheckElement)[]} items - The items to update.
943
+ * @param {number} index - The index of the item to highlight.
944
+ */
945
+ updateHighlightedItem(items, index) {
946
+ items.forEach((item, i) => {
947
+ if (i === index) {
948
+ item.classList.add('highlighted');
949
+ item.setAttribute('tabindex', '0');
950
+ item.scrollIntoView({ block: 'nearest' });
951
+ // Focus on the nv-fieldcheckbox inside
952
+ const checkbox = item.querySelector('nv-fieldcheckbox');
953
+ if (checkbox) {
954
+ checkbox.focus();
955
+ }
956
+ }
957
+ else {
958
+ item.classList.remove('highlighted');
959
+ item.setAttribute('tabindex', '-1');
960
+ }
961
+ });
962
+ }
963
+ /**
964
+ * Focus on the first item in the dropdown list.
965
+ */
966
+ focusFirstItem() {
967
+ const firstItem = this.el.querySelector('nv-fielddropdownitemcheck:not([style*="display: none"])');
968
+ if (firstItem) {
969
+ firstItem.setAttribute('tabindex', '0');
970
+ firstItem.classList.add('highlighted');
971
+ firstItem.scrollIntoView({ block: 'nearest' });
972
+ // Focus on the nv-fieldcheckbox inside
973
+ const checkbox = firstItem.querySelector('nv-fieldcheckbox');
974
+ if (checkbox) {
975
+ checkbox.focus();
976
+ }
977
+ }
978
+ else {
979
+ console.warn('No visible first item found to focus');
980
+ }
981
+ }
982
+ addEmptyMessageOption(ul) {
983
+ const existingMessage = ul.querySelector('[data-empty]');
984
+ if (existingMessage)
985
+ return;
986
+ const emptyMessage = document.createElement('li');
987
+ emptyMessage.setAttribute('data-empty', 'true');
988
+ emptyMessage.textContent = this.emptyresult;
989
+ emptyMessage.classList.add('no-results-message');
990
+ ul.appendChild(emptyMessage);
991
+ }
992
+ removeEmptyMessageOption(ul) {
993
+ const existingMessage = ul.querySelector('[data-empty]');
994
+ if (existingMessage)
995
+ existingMessage.remove();
996
+ }
997
+ /**
998
+ * Watch for changes in the mode prop and update modeState accordingly
999
+ * @param {string} newValue - The new mode value
1000
+ */
1001
+ handleModeChange(newValue) {
1002
+ this.modeState = newValue;
1003
+ }
1004
+ manageDivider(ul, selectedItems, unselectedItems) {
1005
+ let divider = ul.querySelector('hr.multiselect-divider');
1006
+ if (!divider) {
1007
+ divider = document.createElement('hr');
1008
+ divider.className = 'multiselect-divider';
1009
+ ul.appendChild(divider);
1010
+ }
1011
+ const shouldShowDivider = selectedItems.length > 0 && unselectedItems.length > 0;
1012
+ if (shouldShowDivider) {
1013
+ // Place the divider after the last selected item
1014
+ const lastSelectedItem = selectedItems[selectedItems.length - 1];
1015
+ lastSelectedItem.after(divider);
1016
+ divider.style.display = '';
1017
+ }
1018
+ else {
1019
+ divider.style.display = 'none';
1020
+ }
1021
+ }
1022
+ //#endregion METHODS
1023
+ /****************************************************************************/
1024
+ //#region RENDER
1025
+ /**
1026
+ * Renders the component in options mode
1027
+ * @returns {any} The JSX for options mode
1028
+ */
1029
+ renderOptionsMode() {
1030
+ return (h(Host, null, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { htmlFor: this.inputId }, h("slot", { name: "label" }, this.label))), h("nv-popover", { ref: el => (this.popoverElement = el), triggerMode: "controlled", placement: "bottom-start", open: this.open }, h("div", { class: "input-wrapper-multiselect", slot: "trigger" }, h("slot", { name: "before-input" }), h("div", { class: "input-container-multiselect" }, h("slot", { name: "leading-input" }), h("nv-badge", { slot: "leading-input", "prevent-auto-close": "true", color: "10", dismissible: this.selectedValues.length > 0, hidden: this.selectedValues.length <= 0, label: `${this.selectedValues.length} ${this.badgeLabel}`, "aria-label": `Clear all ${this.selectedValues.length} ${this.badgeLabel} items`, onCloseClicked: this.handleBadgeCloseOptions }), this.isFilterable || this.disabled || this.readonly ? (h("input", { id: this.inputId, ref: e => (this.inputElement = e), autocomplete: this.autocomplete, placeholder: this.placeholder, name: this.name, value: this.value, required: this.required, disabled: this.disabled, readOnly: this.readonly, onInput: this.handleInputOptions, onFocus: this.handleInputFocusOptions, onBlur: this.handleInputBlurOptions, onKeyDown: this.handleKeyDown })) : (h("p", { id: this.inputId, class: "non-filterable-text", onClick: this.handleInputContainerClickOptions, tabIndex: 0, onKeyDown: this.handleKeyDown, onFocus: this.handleInputFocusOptions, role: "combobox", "aria-expanded": this.open }, h("span", null, this.value || this.placeholder))), h("nv-iconbutton", { class: "toggle-dropdown-icon", name: this.open ? 'chevron-top' : 'chevron-down', size: "md", emphasis: "lower", "aria-label": this.open ? 'Hide dropdown' : 'Show dropdown', "aria-pressed": this.open.toString(), onClick: this.togglePopoverOptions })), h("slot", { name: "after-input" })), h("div", { slot: "content", role: "listbox", "aria-multiselectable": "true", style: { 'max-height': this.maxHeight, 'overflow-y': 'auto' } }, h("ul", { role: "content" }, this.parsedOptions.map(option => (h("nv-fielddropdownitemcheck", { label: option.label, description: option.description, value: option.value, checked: this.selectedValues.includes(option.value), disabled: option.disabled }))), h("hr", { class: "multiselect-divider", style: { display: 'none' } })))), this.renderDescriptions()));
1031
+ }
1032
+ /**
1033
+ * Renders the component in slots mode
1034
+ * @returns {any} The JSX for slots mode
1035
+ */
1036
+ renderSlotsMode() {
1037
+ return (h(Host, null, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { htmlFor: this.inputId }, h("slot", { name: "label" }, this.label))), h("nv-popover", { ref: el => (this.popoverElement = el), triggerMode: "controlled", placement: "bottom-start", open: this.open }, h("div", { class: "input-wrapper-multiselect", slot: "trigger" }, h("slot", { name: "before-input" }), h("div", { class: "input-container-multiselect", onClick: this.handleInputContainerClickSlots }, h("slot", { name: "leading-input" }, h("p", null, "No leading input")), h("nv-badge", { slot: "leading-input", "prevent-auto-close": "true", color: "10", dismissible: this.selectedValues.length > 0, hidden: this.selectedValues.length <= 0, label: `${this.selectedValues.length} ${this.badgeLabel}`, "aria-label": `Clear all ${this.selectedValues.length} ${this.badgeLabel} items`, onCloseClicked: this.handleBadgeCloseSlots }), this.isFilterable || this.disabled || this.readonly ? (h("input", { id: this.inputId, ref: e => (this.inputElement = e), autocomplete: this.autocomplete, placeholder: this.placeholder, name: this.name, value: this.value, required: this.required, disabled: this.disabled, readOnly: this.readonly, onInput: this.handleInputSlots, onFocus: this.handleInputFocusSlots, onBlur: this.handleInputBlurSlots, onKeyDown: this.handleKeyDown })) : (h("p", { id: this.inputId, class: "non-filterable-text", onClick: this.handleInputContainerClickSlots, tabIndex: 0, onKeyDown: this.handleKeyDown, onFocus: this.handleInputFocusSlots, role: "combobox", "aria-expanded": this.open }, h("span", null, this.value || this.placeholder))), h("nv-iconbutton", { class: "toggle-dropdown-icon", name: this.open ? 'chevron-top' : 'chevron-down', size: "md", emphasis: "lower", "aria-label": this.open ? 'Hide dropdown' : 'Show dropdown', "aria-pressed": this.open.toString(), onClick: this.togglePopoverSlots })), h("slot", { name: "after-input" })), h("div", { slot: "content", role: "listbox", "aria-multiselectable": "true", style: { 'max-height': this.maxHeight, 'overflow-y': 'auto' } }, h("slot", { name: "content" }))), this.renderDescriptions()));
1038
+ }
1039
+ /**
1040
+ * Renders description and error description sections
1041
+ * @returns {any} The JSX for descriptions
1042
+ */
1043
+ renderDescriptions() {
1044
+ return [
1045
+ (this.description || this.el.querySelector('[slot="description"]')) && (h("div", { class: "description" }, h("slot", { name: "description" }, this.description))),
1046
+ (this.errorDescription ||
1047
+ this.el.querySelector('[slot="error-description"]')) && (h("div", { hidden: !this.error, class: "error-description" }, h("slot", { name: "error-description" }, this.errorDescription))),
1048
+ ];
1049
+ }
1050
+ /**
1051
+ * Main render method that decides which mode to render
1052
+ * @returns {any} The JSX for the component
1053
+ */
1054
+ render() {
1055
+ return this.modeState === 'options'
1056
+ ? this.renderOptionsMode()
1057
+ : this.renderSlotsMode();
1058
+ }
1059
+ get el() { return this; }
1060
+ static get watchers() { return {
1061
+ "options": ["handleOptionsChange"],
1062
+ "value": ["watchValueHandler"],
1063
+ "filterable": ["watchFilterableHandler"],
1064
+ "mode": ["handleModeChange"]
1065
+ }; }
1066
+ static get style() { return NvFieldmultiselectStyle0; }
1067
+ }, [4, "nv-fieldmultiselect", {
1068
+ "inputId": [513, "input-id"],
1069
+ "name": [513],
1070
+ "label": [513],
1071
+ "description": [513],
1072
+ "placeholder": [513],
1073
+ "maxHeight": [513, "max-height"],
1074
+ "badgeLabel": [513, "badge-label"],
1075
+ "emptyresult": [513],
1076
+ "required": [516],
1077
+ "error": [516],
1078
+ "errorDescription": [513, "error-description"],
1079
+ "readonly": [516],
1080
+ "disabled": [516],
1081
+ "autocomplete": [513],
1082
+ "filterable": [1540],
1083
+ "value": [1537],
1084
+ "open": [1540],
1085
+ "mode": [513],
1086
+ "options": [513],
1087
+ "debounceDelay": [514, "debounce-delay"],
1088
+ "parsedOptions": [32],
1089
+ "selectedValues": [32],
1090
+ "sortedOptions": [32],
1091
+ "filterText": [32],
1092
+ "isFilterable": [32],
1093
+ "modeState": [32],
1094
+ "isHandlingEscape": [32],
1095
+ "getFilterText": [64],
1096
+ "resetFilter": [64],
1097
+ "getSelectedValues": [64]
1098
+ }, [[0, "openChanged", "handleOpenChanged"], [0, "itemChecked", "handleItemChecked"], [0, "slotchange", "handleSlotChange"], [0, "keydown", "handleKeyDown"]], {
1099
+ "options": ["handleOptionsChange"],
1100
+ "value": ["watchValueHandler"],
1101
+ "filterable": ["watchFilterableHandler"],
1102
+ "mode": ["handleModeChange"]
1103
+ }]);
1104
+ function defineCustomElement$1() {
1105
+ if (typeof customElements === "undefined") {
1106
+ return;
1107
+ }
1108
+ const components = ["nv-fieldmultiselect", "nv-badge", "nv-fieldcheckbox", "nv-fielddropdownitemcheck", "nv-icon", "nv-iconbutton", "nv-loader", "nv-popover"];
1109
+ components.forEach(tagName => { switch (tagName) {
1110
+ case "nv-fieldmultiselect":
1111
+ if (!customElements.get(tagName)) {
1112
+ customElements.define(tagName, NvFieldmultiselect$1);
1113
+ }
1114
+ break;
1115
+ case "nv-badge":
1116
+ if (!customElements.get(tagName)) {
1117
+ defineCustomElement$8();
1118
+ }
1119
+ break;
1120
+ case "nv-fieldcheckbox":
1121
+ if (!customElements.get(tagName)) {
1122
+ defineCustomElement$7();
1123
+ }
1124
+ break;
1125
+ case "nv-fielddropdownitemcheck":
1126
+ if (!customElements.get(tagName)) {
1127
+ defineCustomElement$6();
1128
+ }
1129
+ break;
1130
+ case "nv-icon":
1131
+ if (!customElements.get(tagName)) {
1132
+ defineCustomElement$5();
1133
+ }
1134
+ break;
1135
+ case "nv-iconbutton":
1136
+ if (!customElements.get(tagName)) {
1137
+ defineCustomElement$4();
1138
+ }
1139
+ break;
1140
+ case "nv-loader":
1141
+ if (!customElements.get(tagName)) {
1142
+ defineCustomElement$3();
1143
+ }
1144
+ break;
1145
+ case "nv-popover":
1146
+ if (!customElements.get(tagName)) {
1147
+ defineCustomElement$2();
1148
+ }
1149
+ break;
1150
+ } });
1151
+ }
1152
+ defineCustomElement$1();
1153
+
1154
+ const NvFieldmultiselect = NvFieldmultiselect$1;
1155
+ const defineCustomElement = defineCustomElement$1;
1156
+
1157
+ export { NvFieldmultiselect, defineCustomElement };
1158
+
1159
+ //# sourceMappingURL=nv-fieldmultiselect.js.map