@nova-design-system/nova-webcomponents 3.9.1 → 3.10.0

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 (432) hide show
  1. package/dist/cjs/{constants-8fb8ccc0.js → constants-3b6beb66.js} +15 -1
  2. package/dist/cjs/constants-3b6beb66.js.map +1 -0
  3. package/dist/cjs/index-c56424e5.js +12 -0
  4. package/dist/cjs/index.cjs.js +7 -1
  5. package/dist/cjs/index.cjs.js.map +1 -1
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/cjs/native.cjs.js +1 -1
  8. package/dist/cjs/nv-accordion-item.cjs.entry.js +1 -1
  9. package/dist/cjs/nv-accordion-item.cjs.entry.js.map +1 -1
  10. package/dist/cjs/nv-alert.cjs.entry.js +2 -2
  11. package/dist/cjs/nv-alert.cjs.entry.js.map +1 -1
  12. package/dist/cjs/nv-avatar.cjs.entry.js +1 -1
  13. package/dist/cjs/nv-badge_2.cjs.entry.js +2 -2
  14. package/dist/cjs/nv-badge_2.cjs.entry.js.map +1 -1
  15. package/dist/cjs/nv-breadcrumb.cjs.entry.js +1 -1
  16. package/dist/cjs/nv-breadcrumb.cjs.entry.js.map +1 -1
  17. package/dist/cjs/nv-button.cjs.entry.js +2 -2
  18. package/dist/cjs/nv-button.cjs.entry.js.map +1 -1
  19. package/dist/cjs/nv-buttongroup.cjs.entry.js +198 -0
  20. package/dist/cjs/nv-buttongroup.cjs.entry.js.map +1 -0
  21. package/dist/cjs/nv-calendar.cjs.entry.js +114 -37
  22. package/dist/cjs/nv-calendar.cjs.entry.js.map +1 -1
  23. package/dist/cjs/nv-col.cjs.entry.js +1 -1
  24. package/dist/cjs/nv-datagrid.cjs.entry.js +4 -4
  25. package/dist/cjs/nv-datagrid.cjs.entry.js.map +1 -1
  26. package/dist/cjs/nv-datagridcolumn.cjs.entry.js +1 -1
  27. package/dist/cjs/nv-dialog.cjs.entry.js +2 -2
  28. package/dist/cjs/nv-dialogfooter_2.cjs.entry.js +3 -3
  29. package/dist/cjs/nv-fieldcheckbox.cjs.entry.js +5 -5
  30. package/dist/cjs/nv-fieldcheckbox.cjs.entry.js.map +1 -1
  31. package/dist/cjs/nv-fielddate.cjs.entry.js +6 -6
  32. package/dist/cjs/nv-fielddaterange.cjs.entry.js +6 -6
  33. package/dist/cjs/nv-fielddropdown.cjs.entry.js +3 -3
  34. package/dist/cjs/nv-fielddropdownitem.cjs.entry.js +1 -1
  35. package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +377 -27
  36. package/dist/cjs/nv-fieldmultiselect.cjs.entry.js.map +1 -1
  37. package/dist/cjs/nv-fieldnumber.cjs.entry.js +3 -3
  38. package/dist/cjs/nv-fieldpassword.cjs.entry.js +3 -3
  39. package/dist/cjs/nv-fieldradio.cjs.entry.js +4 -4
  40. package/dist/cjs/nv-fieldradio.cjs.entry.js.map +1 -1
  41. package/dist/cjs/nv-fieldselect.cjs.entry.js +5 -5
  42. package/dist/cjs/nv-fieldslider.cjs.entry.js +3 -3
  43. package/dist/cjs/nv-fieldtext.cjs.entry.js +3 -3
  44. package/dist/cjs/nv-fieldtextarea.cjs.entry.js +3 -3
  45. package/dist/cjs/nv-fieldtime.cjs.entry.js +10 -10
  46. package/dist/cjs/nv-icon.cjs.entry.js +3 -3
  47. package/dist/cjs/nv-icon.cjs.entry.js.map +1 -1
  48. package/dist/cjs/nv-iconbutton_2.cjs.entry.js +3 -3
  49. package/dist/cjs/nv-iconbutton_2.cjs.entry.js.map +1 -1
  50. package/dist/cjs/nv-menu.cjs.entry.js +1 -1
  51. package/dist/cjs/nv-menuitem.cjs.entry.js +1 -1
  52. package/dist/cjs/nv-popover.cjs.entry.js +1 -1
  53. package/dist/cjs/nv-row.cjs.entry.js +1 -1
  54. package/dist/cjs/nv-stack.cjs.entry.js +1 -1
  55. package/dist/cjs/nv-table.cjs.entry.js +2 -2
  56. package/dist/cjs/nv-toggle.cjs.entry.js +3 -3
  57. package/dist/cjs/nv-toggle.cjs.entry.js.map +1 -1
  58. package/dist/cjs/nv-togglebutton.cjs.entry.js +58 -0
  59. package/dist/cjs/nv-togglebutton.cjs.entry.js.map +1 -0
  60. package/dist/cjs/nv-togglebuttongroup.cjs.entry.js +172 -0
  61. package/dist/cjs/nv-togglebuttongroup.cjs.entry.js.map +1 -0
  62. package/dist/cjs/nv-tooltip.cjs.entry.js +1 -1
  63. package/dist/collection/collection-manifest.json +3 -0
  64. package/dist/collection/components/nv-accordion-item/nv-accordion-item.js +1 -1
  65. package/dist/collection/components/nv-accordion-item/nv-accordion-item.js.map +1 -1
  66. package/dist/collection/components/nv-alert/nv-alert.css +5 -0
  67. package/dist/collection/components/nv-badge/nv-badge.css +21 -0
  68. package/dist/collection/components/nv-breadcrumb/nv-breadcrumb.css +2 -0
  69. package/dist/collection/components/nv-button/styles/nv-button.css +8 -0
  70. package/dist/collection/components/nv-buttongroup/nv-buttongroup.docs.js +43 -0
  71. package/dist/collection/components/nv-buttongroup/nv-buttongroup.docs.js.map +1 -0
  72. package/dist/collection/components/nv-buttongroup/nv-buttongroup.js +217 -0
  73. package/dist/collection/components/nv-buttongroup/nv-buttongroup.js.map +1 -0
  74. package/dist/collection/components/nv-buttongroup/nv-buttongroup.utils.js +86 -0
  75. package/dist/collection/components/nv-buttongroup/nv-buttongroup.utils.js.map +1 -0
  76. package/dist/collection/components/nv-buttongroup/styles/nv-buttongroup.css +73 -0
  77. package/dist/collection/components/nv-buttongroup/test/nv-buttongroup.utils.test.js +312 -0
  78. package/dist/collection/components/nv-buttongroup/test/nv-buttongroup.utils.test.js.map +1 -0
  79. package/dist/collection/components/nv-calendar/nv-calendar.css +9 -0
  80. package/dist/collection/components/nv-calendar/nv-calendar.js +37 -24
  81. package/dist/collection/components/nv-calendar/nv-calendar.js.map +1 -1
  82. package/dist/collection/components/nv-calendar/nv-calendar.utils.js +68 -0
  83. package/dist/collection/components/nv-calendar/nv-calendar.utils.js.map +1 -1
  84. package/dist/collection/components/nv-calendar/partials/calendar-grid.js +5 -3
  85. package/dist/collection/components/nv-calendar/partials/calendar-grid.js.map +1 -1
  86. package/dist/collection/components/nv-calendar/partials/day-cell.js +4 -9
  87. package/dist/collection/components/nv-calendar/partials/day-cell.js.map +1 -1
  88. package/dist/collection/components/nv-col/nv-col.js +1 -1
  89. package/dist/collection/components/nv-datagrid/nv-datagrid.css +1 -0
  90. package/dist/collection/components/nv-datagrid/nv-datagrid.js +2 -2
  91. package/dist/collection/components/nv-datagridcolumn/nv-datagridcolumn.js +1 -1
  92. package/dist/collection/components/nv-dialog/nv-dialog.js +1 -1
  93. package/dist/collection/components/nv-dialogfooter/nv-dialogfooter.js +1 -1
  94. package/dist/collection/components/nv-dialogheader/nv-dialogheader.js +1 -1
  95. package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.css +1 -0
  96. package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.js +4 -4
  97. package/dist/collection/components/nv-fielddate/nv-fielddate.js +6 -6
  98. package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js +6 -6
  99. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js +3 -3
  100. package/dist/collection/components/nv-fielddropdownitem/nv-fielddropdownitem.js +1 -1
  101. package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js +1 -1
  102. package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js.map +1 -1
  103. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js +885 -122
  104. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js.map +1 -1
  105. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js +561 -89
  106. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js.map +1 -1
  107. package/dist/collection/components/nv-fieldmultiselect/styles/nv-fieldmultiselect.css +70 -16
  108. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js +3 -3
  109. package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js +3 -3
  110. package/dist/collection/components/nv-fieldradio/nv-fieldradio.css +1 -0
  111. package/dist/collection/components/nv-fieldradio/nv-fieldradio.js +3 -3
  112. package/dist/collection/components/nv-fieldselect/nv-fieldselect.js +5 -5
  113. package/dist/collection/components/nv-fieldslider/nv-fieldslider.js +3 -3
  114. package/dist/collection/components/nv-fieldtext/nv-fieldtext.js +3 -3
  115. package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js +3 -3
  116. package/dist/collection/components/nv-fieldtime/nv-fieldtime.js +9 -9
  117. package/dist/collection/components/nv-icon/nv-icon.js +1 -1
  118. package/dist/collection/components/nv-icon/nv-icons.js +6 -0
  119. package/dist/collection/components/nv-icon/nv-icons.js.map +1 -1
  120. package/dist/collection/components/nv-iconbutton/nv-iconbutton.css +4 -0
  121. package/dist/collection/components/nv-iconbutton/nv-iconbutton.js +1 -1
  122. package/dist/collection/components/nv-loader/nv-loader.js +1 -1
  123. package/dist/collection/components/nv-menu/nv-menu.js +1 -1
  124. package/dist/collection/components/nv-menuitem/nv-menuitem.js +2 -2
  125. package/dist/collection/components/nv-popover/nv-popover.js +1 -1
  126. package/dist/collection/components/nv-row/nv-row.js +1 -1
  127. package/dist/collection/components/nv-stack/nv-stack.js +1 -1
  128. package/dist/collection/components/nv-table/nv-table.js +2 -2
  129. package/dist/collection/components/nv-toggle/nv-toggle.css +1 -0
  130. package/dist/collection/components/nv-toggle/nv-toggle.js +2 -2
  131. package/dist/collection/components/nv-togglebutton/nv-togglebutton.docs.js +6 -0
  132. package/dist/collection/components/nv-togglebutton/nv-togglebutton.docs.js.map +1 -0
  133. package/dist/collection/components/nv-togglebutton/nv-togglebutton.js +191 -0
  134. package/dist/collection/components/nv-togglebutton/nv-togglebutton.js.map +1 -0
  135. package/dist/collection/components/nv-togglebutton/styles/nv-togglebutton.css +135 -0
  136. package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.docs.js +56 -0
  137. package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.docs.js.map +1 -0
  138. package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.js +324 -0
  139. package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.js.map +1 -0
  140. package/dist/collection/components/nv-togglebuttongroup/styles/nv-togglebuttongroup.css +45 -0
  141. package/dist/collection/components/nv-tooltip/nv-tooltip.js +1 -1
  142. package/dist/collection/utils/constants.js +12 -0
  143. package/dist/collection/utils/constants.js.map +1 -1
  144. package/dist/components/index.js +7 -1
  145. package/dist/components/index.js.map +1 -1
  146. package/dist/components/nv-accordion-item.js +1 -1
  147. package/dist/components/nv-accordion.js +4 -4
  148. package/dist/components/nv-alert.js +3 -3
  149. package/dist/components/nv-alert.js.map +1 -1
  150. package/dist/components/nv-avatar.js +2 -2
  151. package/dist/components/nv-badge.js +1 -1
  152. package/dist/components/nv-breadcrumb.js +3 -3
  153. package/dist/components/nv-breadcrumb.js.map +1 -1
  154. package/dist/components/nv-button.js +1 -1
  155. package/dist/components/nv-buttongroup.d.ts +11 -0
  156. package/dist/components/nv-buttongroup.js +221 -0
  157. package/dist/components/nv-buttongroup.js.map +1 -0
  158. package/dist/components/nv-calendar.js +1 -1
  159. package/dist/components/nv-col.js +1 -1
  160. package/dist/components/nv-datagrid.js +6 -6
  161. package/dist/components/nv-datagrid.js.map +1 -1
  162. package/dist/components/nv-datagridcolumn.js +1 -1
  163. package/dist/components/nv-dialog.js +7 -7
  164. package/dist/components/nv-dialogfooter.js +1 -1
  165. package/dist/components/nv-dialogheader.js +1 -1
  166. package/dist/components/nv-fieldcheckbox.js +1 -1
  167. package/dist/components/nv-fielddate.js +12 -12
  168. package/dist/components/nv-fielddaterange.js +12 -12
  169. package/dist/components/nv-fielddropdown.js +8 -8
  170. package/dist/components/nv-fielddropdownitem.js +1 -1
  171. package/dist/components/nv-fielddropdownitemcheck.js +1 -1
  172. package/dist/components/nv-fieldmultiselect.js +399 -41
  173. package/dist/components/nv-fieldmultiselect.js.map +1 -1
  174. package/dist/components/nv-fieldnumber.js +1 -1
  175. package/dist/components/nv-fieldpassword.js +6 -6
  176. package/dist/components/nv-fieldradio.js +4 -4
  177. package/dist/components/nv-fieldradio.js.map +1 -1
  178. package/dist/components/nv-fieldselect.js +8 -8
  179. package/dist/components/nv-fieldslider.js +7 -7
  180. package/dist/components/nv-fieldtext.js +1 -1
  181. package/dist/components/nv-fieldtextarea.js +3 -3
  182. package/dist/components/nv-fieldtime.js +14 -14
  183. package/dist/components/nv-icon.js +1 -1
  184. package/dist/components/nv-iconbutton.js +1 -1
  185. package/dist/components/nv-loader.js +1 -1
  186. package/dist/components/nv-menu.js +4 -4
  187. package/dist/components/nv-menuitem.js +1 -1
  188. package/dist/components/nv-popover.js +1 -1
  189. package/dist/components/nv-row.js +1 -1
  190. package/dist/components/nv-stack.js +1 -1
  191. package/dist/components/nv-table.js +2 -2
  192. package/dist/components/nv-toggle.js +3 -3
  193. package/dist/components/nv-toggle.js.map +1 -1
  194. package/dist/components/nv-togglebutton.d.ts +11 -0
  195. package/dist/components/nv-togglebutton.js +78 -0
  196. package/dist/components/nv-togglebutton.js.map +1 -0
  197. package/dist/components/nv-togglebuttongroup.d.ts +11 -0
  198. package/dist/components/nv-togglebuttongroup.js +196 -0
  199. package/dist/components/nv-togglebuttongroup.js.map +1 -0
  200. package/dist/components/nv-tooltip.js +1 -1
  201. package/dist/components/{p-68ff562f.js → p-0ffb4785.js} +5 -5
  202. package/dist/components/{p-68ff562f.js.map → p-0ffb4785.js.map} +1 -1
  203. package/dist/components/{p-8067d283.js → p-195f46f3.js} +2 -2
  204. package/dist/components/{p-8067d283.js.map → p-195f46f3.js.map} +1 -1
  205. package/dist/components/{p-e4e1a926.js → p-1bb737fa.js} +3 -3
  206. package/dist/components/{p-e4e1a926.js.map → p-1bb737fa.js.map} +1 -1
  207. package/dist/components/{p-db4ba1d9.js → p-2db5d1ab.js} +7 -7
  208. package/dist/components/{p-db4ba1d9.js.map → p-2db5d1ab.js.map} +1 -1
  209. package/dist/components/{p-ba87d9d5.js → p-2ef4fb88.js} +3 -3
  210. package/dist/components/{p-ba87d9d5.js.map → p-2ef4fb88.js.map} +1 -1
  211. package/dist/components/{p-f1df2634.js → p-32e8e42e.js} +2 -2
  212. package/dist/components/{p-f1df2634.js.map → p-32e8e42e.js.map} +1 -1
  213. package/dist/components/{p-6de6866c.js → p-45a625fb.js} +6 -6
  214. package/dist/components/{p-6de6866c.js.map → p-45a625fb.js.map} +1 -1
  215. package/dist/components/{p-025b8a78.js → p-50d0db7b.js} +5 -5
  216. package/dist/components/{p-025b8a78.js.map → p-50d0db7b.js.map} +1 -1
  217. package/dist/components/{p-ed6686a1.js → p-51876ca1.js} +2 -2
  218. package/dist/components/{p-ed6686a1.js.map → p-51876ca1.js.map} +1 -1
  219. package/dist/components/{p-e104c58a.js → p-51a156ff.js} +3 -3
  220. package/dist/components/p-51a156ff.js.map +1 -0
  221. package/dist/components/p-8011513c.js +189 -0
  222. package/dist/components/{p-60064345.js.map → p-8011513c.js.map} +1 -1
  223. package/dist/components/{p-82e5674c.js → p-8aee1010.js} +116 -38
  224. package/dist/components/p-8aee1010.js.map +1 -0
  225. package/dist/components/{p-79e6b6a2.js → p-9fdaea9a.js} +5 -5
  226. package/dist/components/p-9fdaea9a.js.map +1 -0
  227. package/dist/components/{p-6460318d.js → p-a1fe0a5d.js} +4 -4
  228. package/dist/components/p-a1fe0a5d.js.map +1 -0
  229. package/dist/components/{p-1f505531.js → p-a3ddec4c.js} +15 -1
  230. package/dist/components/p-a3ddec4c.js.map +1 -0
  231. package/dist/components/{p-0143cee0.js → p-a5002d14.js} +6 -6
  232. package/dist/components/{p-0143cee0.js.map → p-a5002d14.js.map} +1 -1
  233. package/dist/components/{p-30f970c3.js → p-b659b999.js} +3 -3
  234. package/dist/components/{p-30f970c3.js.map → p-b659b999.js.map} +1 -1
  235. package/dist/components/{p-5d5668f0.js → p-cf06032d.js} +4 -4
  236. package/dist/components/{p-5d5668f0.js.map → p-cf06032d.js.map} +1 -1
  237. package/dist/components/{p-dfd2d4f0.js → p-fda58a76.js} +2 -2
  238. package/dist/components/{p-dfd2d4f0.js.map → p-fda58a76.js.map} +1 -1
  239. package/dist/esm/{constants-4faa1fae.js → constants-23aaef7b.js} +15 -1
  240. package/dist/esm/constants-23aaef7b.js.map +1 -0
  241. package/dist/esm/index-a1936cd0.js +12 -0
  242. package/dist/esm/index.js +7 -1
  243. package/dist/esm/index.js.map +1 -1
  244. package/dist/esm/loader.js +1 -1
  245. package/dist/esm/native.js +1 -1
  246. package/dist/esm/nv-accordion-item.entry.js +1 -1
  247. package/dist/esm/nv-accordion-item.entry.js.map +1 -1
  248. package/dist/esm/nv-alert.entry.js +2 -2
  249. package/dist/esm/nv-alert.entry.js.map +1 -1
  250. package/dist/esm/nv-avatar.entry.js +1 -1
  251. package/dist/esm/nv-badge_2.entry.js +2 -2
  252. package/dist/esm/nv-badge_2.entry.js.map +1 -1
  253. package/dist/esm/nv-breadcrumb.entry.js +1 -1
  254. package/dist/esm/nv-breadcrumb.entry.js.map +1 -1
  255. package/dist/esm/nv-button.entry.js +2 -2
  256. package/dist/esm/nv-button.entry.js.map +1 -1
  257. package/dist/esm/nv-buttongroup.entry.js +194 -0
  258. package/dist/esm/nv-buttongroup.entry.js.map +1 -0
  259. package/dist/esm/nv-calendar.entry.js +114 -37
  260. package/dist/esm/nv-calendar.entry.js.map +1 -1
  261. package/dist/esm/nv-col.entry.js +1 -1
  262. package/dist/esm/nv-datagrid.entry.js +4 -4
  263. package/dist/esm/nv-datagrid.entry.js.map +1 -1
  264. package/dist/esm/nv-datagridcolumn.entry.js +1 -1
  265. package/dist/esm/nv-dialog.entry.js +2 -2
  266. package/dist/esm/nv-dialogfooter_2.entry.js +3 -3
  267. package/dist/esm/nv-fieldcheckbox.entry.js +5 -5
  268. package/dist/esm/nv-fieldcheckbox.entry.js.map +1 -1
  269. package/dist/esm/nv-fielddate.entry.js +6 -6
  270. package/dist/esm/nv-fielddaterange.entry.js +6 -6
  271. package/dist/esm/nv-fielddropdown.entry.js +3 -3
  272. package/dist/esm/nv-fielddropdownitem.entry.js +1 -1
  273. package/dist/esm/nv-fieldmultiselect.entry.js +378 -28
  274. package/dist/esm/nv-fieldmultiselect.entry.js.map +1 -1
  275. package/dist/esm/nv-fieldnumber.entry.js +3 -3
  276. package/dist/esm/nv-fieldpassword.entry.js +3 -3
  277. package/dist/esm/nv-fieldradio.entry.js +4 -4
  278. package/dist/esm/nv-fieldradio.entry.js.map +1 -1
  279. package/dist/esm/nv-fieldselect.entry.js +5 -5
  280. package/dist/esm/nv-fieldslider.entry.js +3 -3
  281. package/dist/esm/nv-fieldtext.entry.js +3 -3
  282. package/dist/esm/nv-fieldtextarea.entry.js +3 -3
  283. package/dist/esm/nv-fieldtime.entry.js +10 -10
  284. package/dist/esm/nv-icon.entry.js +3 -3
  285. package/dist/esm/nv-icon.entry.js.map +1 -1
  286. package/dist/esm/nv-iconbutton_2.entry.js +3 -3
  287. package/dist/esm/nv-iconbutton_2.entry.js.map +1 -1
  288. package/dist/esm/nv-menu.entry.js +1 -1
  289. package/dist/esm/nv-menuitem.entry.js +1 -1
  290. package/dist/esm/nv-popover.entry.js +1 -1
  291. package/dist/esm/nv-row.entry.js +1 -1
  292. package/dist/esm/nv-stack.entry.js +1 -1
  293. package/dist/esm/nv-table.entry.js +2 -2
  294. package/dist/esm/nv-toggle.entry.js +3 -3
  295. package/dist/esm/nv-toggle.entry.js.map +1 -1
  296. package/dist/esm/nv-togglebutton.entry.js +54 -0
  297. package/dist/esm/nv-togglebutton.entry.js.map +1 -0
  298. package/dist/esm/nv-togglebuttongroup.entry.js +168 -0
  299. package/dist/esm/nv-togglebuttongroup.entry.js.map +1 -0
  300. package/dist/esm/nv-tooltip.entry.js +1 -1
  301. package/dist/native/index.esm.js +1 -1
  302. package/dist/native/index.esm.js.map +1 -1
  303. package/dist/native/native.css +1 -1
  304. package/dist/native/native.esm.js +1 -1
  305. package/dist/native/native.esm.js.map +1 -1
  306. package/dist/native/{p-2a6783ca.entry.js → p-0da8f0d1.entry.js} +2 -2
  307. package/dist/native/{p-2a6783ca.entry.js.map → p-0da8f0d1.entry.js.map} +1 -1
  308. package/dist/native/p-0ef94dae.entry.js +2 -0
  309. package/dist/native/{p-1ad1bff9.entry.js.map → p-0ef94dae.entry.js.map} +1 -1
  310. package/dist/native/p-13032ec1.entry.js +2 -0
  311. package/dist/native/p-13032ec1.entry.js.map +1 -0
  312. package/dist/native/p-184032cb.entry.js +2 -0
  313. package/dist/native/{p-a73fa60a.entry.js.map → p-184032cb.entry.js.map} +1 -1
  314. package/dist/native/p-2197ffdf.entry.js +2 -0
  315. package/dist/native/{p-fa81b77f.entry.js.map → p-2197ffdf.entry.js.map} +1 -1
  316. package/dist/native/p-234cfa2e.entry.js +2 -0
  317. package/dist/native/p-2a3325fb.entry.js +2 -0
  318. package/dist/native/p-2a3325fb.entry.js.map +1 -0
  319. package/dist/native/{p-3f139780.entry.js → p-2d647761.entry.js} +2 -2
  320. package/dist/native/{p-ff248eb8.entry.js → p-348c6bb4.entry.js} +2 -2
  321. package/dist/native/p-397c0fca.entry.js +2 -0
  322. package/dist/native/{p-51a57a3a.entry.js.map → p-397c0fca.entry.js.map} +1 -1
  323. package/dist/native/{p-55cd3d62.entry.js → p-3da64006.entry.js} +2 -2
  324. package/dist/native/p-3ed84cd9.entry.js +2 -0
  325. package/dist/native/{p-fcd52432.entry.js.map → p-3ed84cd9.entry.js.map} +1 -1
  326. package/dist/native/{p-3ff7a912.entry.js → p-3fcaac6d.entry.js} +2 -2
  327. package/dist/native/{p-b7ec9a1b.entry.js → p-4302824a.entry.js} +2 -2
  328. package/dist/native/p-43071c3b.entry.js +2 -0
  329. package/dist/native/p-44dd9a4c.entry.js +2 -0
  330. package/dist/native/p-44dd9a4c.entry.js.map +1 -0
  331. package/dist/native/p-464bb197.entry.js +2 -0
  332. package/dist/native/p-464bb197.entry.js.map +1 -0
  333. package/dist/native/{p-916acbd3.entry.js → p-49504fd6.entry.js} +2 -2
  334. package/dist/native/{p-bc77cac1.entry.js → p-553778e6.entry.js} +2 -2
  335. package/dist/native/p-553778e6.entry.js.map +1 -0
  336. package/dist/native/{p-bee62b2b.entry.js → p-5f0776cb.entry.js} +2 -2
  337. package/dist/native/p-62032cd9.entry.js +2 -0
  338. package/dist/native/p-62032cd9.entry.js.map +1 -0
  339. package/dist/native/{p-11012998.entry.js → p-676447d7.entry.js} +3 -3
  340. package/dist/native/{p-16ef7dd4.entry.js → p-681f2bac.entry.js} +2 -2
  341. package/dist/native/{p-4b15cff3.entry.js → p-7f0d576b.entry.js} +2 -2
  342. package/dist/native/{p-68edb2e8.entry.js → p-85f8f11a.entry.js} +2 -2
  343. package/dist/native/{p-0e005d95.entry.js → p-888ad58e.entry.js} +2 -2
  344. package/dist/native/{p-34bf336f.entry.js → p-92931ab8.entry.js} +2 -2
  345. package/dist/native/{p-f00a4552.entry.js → p-94dc9c41.entry.js} +2 -2
  346. package/dist/native/{p-85a54ef2.entry.js → p-9c5d6827.entry.js} +2 -2
  347. package/dist/native/{p-08452012.entry.js → p-9f451b8a.entry.js} +3 -3
  348. package/dist/native/{p-08452012.entry.js.map → p-9f451b8a.entry.js.map} +1 -1
  349. package/dist/native/{p-1f932a4b.entry.js → p-aacd8789.entry.js} +2 -2
  350. package/dist/native/p-ac5496e7.entry.js +2 -0
  351. package/dist/native/{p-9ea3d30d.entry.js → p-ad2cc829.entry.js} +2 -2
  352. package/dist/native/p-b2442d4b.entry.js +2 -0
  353. package/dist/native/{p-a36dc25a.entry.js.map → p-b2442d4b.entry.js.map} +1 -1
  354. package/dist/native/{p-67c34b8c.entry.js → p-b58fb522.entry.js} +2 -2
  355. package/dist/native/p-ba9906b7.entry.js +2 -0
  356. package/dist/native/{p-64cb38e6.entry.js.map → p-ba9906b7.entry.js.map} +1 -1
  357. package/dist/native/{p-f540db71.entry.js → p-dd023fd6.entry.js} +2 -2
  358. package/dist/native/p-f033c4ce.entry.js +2 -0
  359. package/dist/native/p-f033c4ce.entry.js.map +1 -0
  360. package/dist/native/{p-051db87c.entry.js → p-fb672f90.entry.js} +2 -2
  361. package/dist/native/p-fc9564b3.js +2 -0
  362. package/dist/native/p-fc9564b3.js.map +1 -0
  363. package/dist/types/components/nv-buttongroup/nv-buttongroup.d.ts +50 -0
  364. package/dist/types/components/nv-buttongroup/nv-buttongroup.docs.d.ts +4 -0
  365. package/dist/types/components/nv-buttongroup/nv-buttongroup.utils.d.ts +25 -0
  366. package/dist/types/components/nv-buttongroup/test/nv-buttongroup.utils.test.d.ts +1 -0
  367. package/dist/types/components/nv-calendar/nv-calendar.d.ts +11 -1
  368. package/dist/types/components/nv-calendar/nv-calendar.utils.d.ts +31 -0
  369. package/dist/types/components/nv-calendar/partials/calendar-grid.d.ts +11 -1
  370. package/dist/types/components/nv-calendar/partials/day-cell.d.ts +7 -1
  371. package/dist/types/components/nv-fieldmultiselect/nv-fieldmultiselect.d.ts +116 -23
  372. package/dist/types/components/nv-icon/nv-icons.d.ts +1 -1
  373. package/dist/types/components/nv-togglebutton/nv-togglebutton.d.ts +46 -0
  374. package/dist/types/components/nv-togglebutton/nv-togglebutton.docs.d.ts +4 -0
  375. package/dist/types/components/nv-togglebuttongroup/nv-togglebuttongroup.d.ts +80 -0
  376. package/dist/types/components/nv-togglebuttongroup/nv-togglebuttongroup.docs.d.ts +4 -0
  377. package/dist/types/components.d.ts +289 -2
  378. package/dist/types/utils/constants.d.ts +10 -0
  379. package/dist/vscode-data.json +189 -0
  380. package/hydrate/index.js +1058 -154
  381. package/hydrate/index.mjs +1058 -154
  382. package/package.json +14 -2
  383. package/dist/cjs/constants-8fb8ccc0.js.map +0 -1
  384. package/dist/components/p-1f505531.js.map +0 -1
  385. package/dist/components/p-60064345.js +0 -189
  386. package/dist/components/p-6460318d.js.map +0 -1
  387. package/dist/components/p-79e6b6a2.js.map +0 -1
  388. package/dist/components/p-82e5674c.js.map +0 -1
  389. package/dist/components/p-e104c58a.js.map +0 -1
  390. package/dist/esm/constants-4faa1fae.js.map +0 -1
  391. package/dist/native/p-10ce53ea.entry.js +0 -2
  392. package/dist/native/p-1ad1bff9.entry.js +0 -2
  393. package/dist/native/p-4a533dd8.entry.js +0 -2
  394. package/dist/native/p-4a533dd8.entry.js.map +0 -1
  395. package/dist/native/p-51a57a3a.entry.js +0 -2
  396. package/dist/native/p-64cb38e6.entry.js +0 -2
  397. package/dist/native/p-73c08f3b.entry.js +0 -2
  398. package/dist/native/p-73c08f3b.entry.js.map +0 -1
  399. package/dist/native/p-a36dc25a.entry.js +0 -2
  400. package/dist/native/p-a50f3850.entry.js +0 -2
  401. package/dist/native/p-a73fa60a.entry.js +0 -2
  402. package/dist/native/p-b3f9db23.entry.js +0 -2
  403. package/dist/native/p-b3f9db23.entry.js.map +0 -1
  404. package/dist/native/p-bc77cac1.entry.js.map +0 -1
  405. package/dist/native/p-e2d0a77d.js +0 -2
  406. package/dist/native/p-e2d0a77d.js.map +0 -1
  407. package/dist/native/p-ec92ee7a.entry.js +0 -2
  408. package/dist/native/p-fa81b77f.entry.js +0 -2
  409. package/dist/native/p-fcd52432.entry.js +0 -2
  410. /package/dist/native/{p-ec92ee7a.entry.js.map → p-234cfa2e.entry.js.map} +0 -0
  411. /package/dist/native/{p-3f139780.entry.js.map → p-2d647761.entry.js.map} +0 -0
  412. /package/dist/native/{p-ff248eb8.entry.js.map → p-348c6bb4.entry.js.map} +0 -0
  413. /package/dist/native/{p-55cd3d62.entry.js.map → p-3da64006.entry.js.map} +0 -0
  414. /package/dist/native/{p-3ff7a912.entry.js.map → p-3fcaac6d.entry.js.map} +0 -0
  415. /package/dist/native/{p-b7ec9a1b.entry.js.map → p-4302824a.entry.js.map} +0 -0
  416. /package/dist/native/{p-10ce53ea.entry.js.map → p-43071c3b.entry.js.map} +0 -0
  417. /package/dist/native/{p-916acbd3.entry.js.map → p-49504fd6.entry.js.map} +0 -0
  418. /package/dist/native/{p-bee62b2b.entry.js.map → p-5f0776cb.entry.js.map} +0 -0
  419. /package/dist/native/{p-11012998.entry.js.map → p-676447d7.entry.js.map} +0 -0
  420. /package/dist/native/{p-16ef7dd4.entry.js.map → p-681f2bac.entry.js.map} +0 -0
  421. /package/dist/native/{p-4b15cff3.entry.js.map → p-7f0d576b.entry.js.map} +0 -0
  422. /package/dist/native/{p-68edb2e8.entry.js.map → p-85f8f11a.entry.js.map} +0 -0
  423. /package/dist/native/{p-0e005d95.entry.js.map → p-888ad58e.entry.js.map} +0 -0
  424. /package/dist/native/{p-34bf336f.entry.js.map → p-92931ab8.entry.js.map} +0 -0
  425. /package/dist/native/{p-f00a4552.entry.js.map → p-94dc9c41.entry.js.map} +0 -0
  426. /package/dist/native/{p-85a54ef2.entry.js.map → p-9c5d6827.entry.js.map} +0 -0
  427. /package/dist/native/{p-1f932a4b.entry.js.map → p-aacd8789.entry.js.map} +0 -0
  428. /package/dist/native/{p-a50f3850.entry.js.map → p-ac5496e7.entry.js.map} +0 -0
  429. /package/dist/native/{p-9ea3d30d.entry.js.map → p-ad2cc829.entry.js.map} +0 -0
  430. /package/dist/native/{p-67c34b8c.entry.js.map → p-b58fb522.entry.js.map} +0 -0
  431. /package/dist/native/{p-f540db71.entry.js.map → p-dd023fd6.entry.js.map} +0 -0
  432. /package/dist/native/{p-051db87c.entry.js.map → p-fb672f90.entry.js.map} +0 -0
@@ -1,4 +1,4 @@
1
- import { Host, h, } from "@stencil/core";
1
+ import { Host, h, Fragment, } from "@stencil/core";
2
2
  import { v4 as uuidv4 } from "uuid";
3
3
  /**
4
4
  * @slot content - The content of the list.
@@ -11,8 +11,6 @@ import { v4 as uuidv4 } from "uuid";
11
11
  */
12
12
  export class NvFieldmultiselect {
13
13
  constructor() {
14
- /****************************************************************************/
15
- //#region PROPERTIES
16
14
  /**
17
15
  * Sets the ID for the input element and the for attribute of the associated
18
16
  * label. If no ID is provided, a random one will be automatically generated
@@ -27,11 +25,6 @@ export class NvFieldmultiselect {
27
25
  * always type in fresh data.
28
26
  */
29
27
  this.autocomplete = 'off';
30
- /**
31
- * Specifies the selected values of the multiselect field.
32
- * This is the canonical value for the component and is used for form submission.
33
- */
34
- this.value = [];
35
28
  /**
36
29
  * Marks the input field as required.
37
30
  */
@@ -59,13 +52,22 @@ export class NvFieldmultiselect {
59
52
  */
60
53
  this.open = false;
61
54
  /**
62
- * The text to display when no items match the filter.
55
+ * Allows the field to stretch and fill the entire width of its container.
63
56
  */
64
- this.emptyResult = 'No results found';
57
+ this.fluid = false;
58
+ /**
59
+ * Specifies the selected values of the multiselect field.
60
+ * This is the canonical value for the component and is used for form submission.
61
+ */
62
+ this.value = [];
65
63
  /**
66
64
  * Enables or disables the filtering feature for the multiselect items.
67
65
  */
68
66
  this.filterable = false;
67
+ /**
68
+ * The text to display when no items match the filter.
69
+ */
70
+ this.emptyResult = 'No results found';
69
71
  /**
70
72
  * Delay in milliseconds before the search is triggered when typing in the filter input.
71
73
  * @default 300
@@ -77,10 +79,6 @@ export class NvFieldmultiselect {
77
79
  * element.
78
80
  */
79
81
  this.autofocus = false;
80
- /**
81
- * Allows the field to stretch and fill the entire width of its container.
82
- */
83
- this.fluid = false;
84
82
  /**
85
83
  * Text for the badge showing the number of selected items.
86
84
  */
@@ -89,6 +87,18 @@ export class NvFieldmultiselect {
89
87
  * The text entered by the user for filtering multiselect items.
90
88
  */
91
89
  this.filterText = '';
90
+ /**
91
+ * Enables or disables the "Select All / Deselect All" toggle functionality.
92
+ */
93
+ this.enableSelectAll = false;
94
+ /**
95
+ * Text for the "Select All" button.
96
+ */
97
+ this.selectAllLabel = 'Select/deselect all';
98
+ /**
99
+ * Text for the "Deselect All" button.
100
+ */
101
+ this.deselectAllLabel = 'Select/deselect all';
92
102
  //#endregion PROPERTIES
93
103
  /****************************************************************************/
94
104
  //#region STATE
@@ -97,10 +107,22 @@ export class NvFieldmultiselect {
97
107
  */
98
108
  this.sortedOptions = [];
99
109
  this.isHandlingEscape = false;
110
+ /**
111
+ * Indicates whether the current filter has visible results.
112
+ * Used to control the visibility of the "Select All" button.
113
+ */
114
+ this.hasFilterResults = true;
115
+ /**
116
+ * Controls the visibility of the select all section.
117
+ */
118
+ this.isSelectAllSectionVisible = true;
119
+ // Add the flag to the class
120
+ this.preventBlurClose = false;
100
121
  /**
101
122
  * Handle badge close for options mode.
102
123
  */
103
124
  this.handleBadgeCloseOptions = () => {
125
+ console.info('handleBadgeCloseOptions:', this.value);
104
126
  this.value = [];
105
127
  this.valueChanged.emit(this.value);
106
128
  // Uncheck all elements
@@ -118,6 +140,7 @@ export class NvFieldmultiselect {
118
140
  * Handle badge close for slots mode.
119
141
  */
120
142
  this.handleBadgeCloseSlots = () => {
143
+ console.info('handleBadgeCloseSlots:', this.value);
121
144
  this.value = [];
122
145
  this.valueChanged.emit(this.value);
123
146
  // Uncheck all elements
@@ -126,8 +149,11 @@ export class NvFieldmultiselect {
126
149
  item.checked = false;
127
150
  item.style.display = '';
128
151
  });
129
- // Reorder slot content
130
- this.reorderSlotContent();
152
+ // Force DOM update before reordering
153
+ requestAnimationFrame(() => {
154
+ // Reorder slot content
155
+ this.reorderSlotContent();
156
+ });
131
157
  };
132
158
  /**
133
159
  * Handle popover close
@@ -149,12 +175,17 @@ export class NvFieldmultiselect {
149
175
  this.filterText = '';
150
176
  this.filterTextChanged.emit('');
151
177
  this.resetFilter();
178
+ this.hasFilterResults = true;
152
179
  };
153
180
  /**
154
181
  * Handle input blur for options mode.
155
182
  */
156
183
  this.handleInputBlurOptions = () => {
157
184
  setTimeout(() => {
185
+ if (this.preventBlurClose) {
186
+ this.preventBlurClose = false;
187
+ return; // Don't close the popover
188
+ }
158
189
  if (!this.el.contains(document.activeElement)) {
159
190
  // Close the popover without affecting the divider
160
191
  this.open = false;
@@ -301,6 +332,102 @@ export class NvFieldmultiselect {
301
332
  }
302
333
  this.open = !this.open;
303
334
  };
335
+ /**
336
+ * Toggles the selection state of all non-disabled options in options mode.
337
+ * Respects filtering by only selecting/deselecting visible items.
338
+ * @param {boolean} selectAll - Whether to select all items (true) or deselect all (false)
339
+ */
340
+ this.toggleSelectAllOptions = (selectAll) => {
341
+ if (!this.options)
342
+ return;
343
+ // Get visible and enabled option values from DOM
344
+ const visibleOptionValues = this.getVisibleEnabledOptionItems();
345
+ console.info('[SelectAll][Options] toggleSelectAllOptions called. selectAll:', selectAll, 'visibleOptionValues:', visibleOptionValues, 'Current value:', this.value);
346
+ if (selectAll) {
347
+ // Select all visible options - merge with existing selections
348
+ this.value = [...new Set([...this.value, ...visibleOptionValues])];
349
+ }
350
+ else {
351
+ // Deselect only the visible options, keep others that might be filtered out
352
+ this.value = this.value.filter(val => !visibleOptionValues.includes(val));
353
+ }
354
+ console.info('[SelectAll][Options] New value after toggle:', this.value);
355
+ // Emit the change event
356
+ this.valueChanged.emit(this.value);
357
+ // Synchronize child components
358
+ this.syncChildComponents();
359
+ // Reorder content to move selected items to top
360
+ this.reorderOptionsContent();
361
+ };
362
+ /**
363
+ * Toggles the selection state of all non-disabled slot items.
364
+ * @param {boolean} selectAll - Whether to select all items (true) or deselect all (false)
365
+ */
366
+ this.toggleSelectAllSlots = (selectAll) => {
367
+ if (this.options)
368
+ return; // Only for slots mode
369
+ // Get visible and enabled items
370
+ const items = this.getVisibleEnabledSlotItems();
371
+ console.info('[SelectAll][Slots] toggleSelectAllSlots called. selectAll:', selectAll, 'visible slot items:', items.map(item => item.getAttribute('value') || item.getAttribute('label')), 'Current value:', this.value);
372
+ if (selectAll) {
373
+ // Select all visible items
374
+ const allActiveValues = items
375
+ .map(item => item.getAttribute('value') || item.getAttribute('label') || '')
376
+ .filter(value => value !== '');
377
+ this.value = [...new Set([...this.value, ...allActiveValues])];
378
+ }
379
+ else {
380
+ // Deselect only the visible items, keep others that might be filtered out
381
+ const visibleValues = items
382
+ .map(item => item.getAttribute('value') || item.getAttribute('label') || '')
383
+ .filter(value => value !== '');
384
+ this.value = this.value.filter(val => !visibleValues.includes(val));
385
+ }
386
+ console.info('[SelectAll][Slots] New value after toggle:', this.value);
387
+ // Emit the change event
388
+ this.valueChanged.emit(this.value);
389
+ // Force synchronization with a small delay to ensure DOM is updated
390
+ requestAnimationFrame(() => {
391
+ this.syncChildComponents();
392
+ this.reorderSlotContent();
393
+ });
394
+ };
395
+ /**
396
+ * Handle click on the select all checkbox in options mode.
397
+ * @param {Event} event - The click event.
398
+ */
399
+ this.handleSelectAllCheckboxOptionsClick = (event) => {
400
+ event.stopPropagation();
401
+ event.preventDefault();
402
+ console.info('[handleSelectAllCheckboxOptionsClick] event:', event);
403
+ const currentState = this.getSelectAllCheckboxStateOptions();
404
+ console.info('[SelectAll][Options] Checkbox clicked. Current state:', currentState, 'Current value:', this.value);
405
+ // Logic to handle the indeterminate state
406
+ // - unchecked → select all
407
+ // - indeterminate → select all (clicking on indeterminate will change to checked)
408
+ // - checked → deselect all
409
+ const shouldSelectAll = currentState === 'unchecked' || currentState === 'indeterminate';
410
+ console.info('[SelectAll][Options] shouldSelectAll:', shouldSelectAll);
411
+ this.toggleSelectAllOptions(shouldSelectAll);
412
+ };
413
+ /**
414
+ * Handle click on the select all checkbox in slots mode.
415
+ * @param {Event} event - The click event.
416
+ */
417
+ this.handleSelectAllCheckboxSlotsClick = (event) => {
418
+ event.stopPropagation();
419
+ event.preventDefault();
420
+ console.info('[handleSelectAllCheckboxSlotsClick] event:', event);
421
+ const currentState = this.getSelectAllCheckboxStateSlots();
422
+ console.info('[SelectAll][Slots] Checkbox clicked. Current state:', currentState, 'Current value:', this.value);
423
+ // Logic to handle the indeterminate state
424
+ // - unchecked → select all
425
+ // - indeterminate → select all (clicking on indeterminate will change to checked)
426
+ // - checked → deselect all
427
+ const shouldSelectAll = currentState === 'unchecked' || currentState === 'indeterminate';
428
+ console.info('[SelectAll][Slots] shouldSelectAll:', shouldSelectAll);
429
+ this.toggleSelectAllSlots(shouldSelectAll);
430
+ };
304
431
  //#endregion METHODS
305
432
  /****************************************************************************/
306
433
  //#region RENDER
@@ -309,35 +436,83 @@ export class NvFieldmultiselect {
309
436
  * @returns {any} The JSX for options mode
310
437
  */
311
438
  this.renderOptionsMode = () => {
312
- return (h(Host, { "aria-label": this.label, "aria-expanded": this.open.toString() }, (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" }), this.value.length > 0 && (h("nv-badge", { slot: "leading-input", "prevent-auto-close": true, color: "10", dismissible: this.value.length > 0, label: `${this.value.length} ${this.badgeLabel}`, "aria-label": `Clear all ${this.value.length} ${this.badgeLabel} items`, onCloseClicked: this.handleBadgeCloseOptions })), this.filterable || this.disabled || this.readonly ? (h("input", { type: "text", id: this.inputId, ref: e => (this.inputElement = e), autofocus: this.autofocus, autocomplete: this.autocomplete, placeholder: this.placeholder, name: this.name, value: this.filterText, required: this.required, disabled: this.disabled, readOnly: this.readonly, onInput: this.handleInputOptions, onFocus: this.handleInputFocusOptions, onBlur: this.handleInputBlurOptions, onKeyDown: this.handleKeyDown, "data-scope": "focusable" })) : (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, "data-scope": "focusable" }, h("span", null, this.placeholder))), this.error && (h("nv-icon", { name: "alert-circle", class: "validation", size: "md" })), this.filterable && this.filterText.length > 0 && (h("nv-iconbutton", { "data-scope": "clear-filter", name: "x", size: "md", emphasis: "lower", tabindex: "-1", onClick: this.clearFilterText, "aria-label": "Clear filter text" })), h("nv-iconbutton", { "data-scope": "toggle-dropdown", 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: this.maxHeight ? { maxHeight: this.maxHeight } : {} }, h("ul", { role: "content" }, this.options.map(option => (h("nv-fielddropdownitemcheck", { label: option.label, description: option.description, value: option.value, checked: this.value.includes(option.value), disabled: option.disabled }))), h("hr", { class: "multiselect-divider", style: { display: 'none' } })))), this.renderDescriptions()));
439
+ return (h(Host, { "aria-label": this.label }, (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" }), this.value.length > 0 && (h("nv-badge", { slot: "leading-input", "prevent-auto-close": true, color: "10", dismissible: this.value.length > 0, label: `${this.value.length} ${this.badgeLabel}`, "aria-label": `Clear all ${this.value.length} ${this.badgeLabel} items`, onCloseClicked: this.handleBadgeCloseOptions })), this.filterable || this.disabled || this.readonly ? (h("input", { type: "text", id: this.inputId, ref: e => (this.inputElement = e), autofocus: this.autofocus, autocomplete: this.autocomplete, placeholder: this.placeholder, name: this.name, value: this.filterText, required: this.required, disabled: this.disabled, readOnly: this.readonly, onInput: this.handleInputOptions, onFocus: this.handleInputFocusOptions, onBlur: this.handleInputBlurOptions, onKeyDown: this.handleKeyDown, "data-scope": "focusable", "aria-label": this.label, "aria-controls": `${this.inputId}-listbox` })) : (h(Fragment, null, h("input", { id: this.inputId, type: "text", style: {
440
+ position: 'absolute',
441
+ opacity: '0',
442
+ width: '0',
443
+ height: '0',
444
+ pointerEvents: 'none',
445
+ }, tabIndex: -1, "aria-hidden": "true", autoComplete: this.autocomplete, name: this.name, onFocus: this.handleInputFocusOptions }), h("p", { id: this.inputId, class: "non-filterable-text", onClick: this.handleInputContainerClickOptions, tabIndex: 0, onKeyDown: this.handleKeyDown, onFocus: this.handleInputFocusOptions, "aria-label": this.label, "aria-controls": `${this.inputId}-listbox`, "data-scope": "focusable", role: "button" }, h("span", null, this.placeholder)))), this.error && (h("nv-icon", { name: "alert-circle", class: "validation", size: "md" })), this.filterable && this.filterText.length > 0 && (h("nv-iconbutton", { "data-scope": "clear-filter", name: "x", size: "md", emphasis: "lower", "aria-label": "Clear filter text", tabindex: "-1", title: "Clear filter text", onMouseDown: () => {
446
+ this.preventBlurClose = true;
447
+ }, onClick: this.clearFilterText })), h("nv-iconbutton", { "data-scope": "toggle-dropdown", name: this.open ? 'chevron-top' : 'chevron-down', size: "md", emphasis: "lower", "aria-label": this.open ? 'Hide dropdown' : 'Show dropdown', title: this.open ? 'Hide dropdown' : 'Show dropdown', onMouseDown: () => {
448
+ this.preventBlurClose = true;
449
+ }, onClick: this.togglePopoverOptions })), h("slot", { name: "after-input" })), h("div", { id: `${this.inputId}-listbox`, slot: "content", style: this.maxHeight ? { maxHeight: this.maxHeight } : {} }, this.shouldShowToggleAllOptionsButton() && (h("div", { class: "select-all-container" }, h("div", { class: "select-all-header" }, this.isSelectAllSectionVisible && (h("nv-fieldcheckbox", { checked: this.getSelectAllCheckboxStateOptions() === 'checked', indeterminate: this.getSelectAllCheckboxStateOptions() ===
450
+ 'indeterminate', label: this.getSelectAllCheckboxStateOptions() === 'unchecked'
451
+ ? this.selectAllLabel
452
+ : this.deselectAllLabel, onMouseDown: () => {
453
+ this.preventBlurClose = true;
454
+ }, onClick: this.handleSelectAllCheckboxOptionsClick }))))), h("ul", { role: "listbox", "aria-multiselectable": "true" }, this.options.map(option => (h("nv-fielddropdownitemcheck", { role: "option", label: option.label, description: option.description, value: option.value, checked: this.value.includes(option.value), disabled: option.disabled })))))), this.renderDescriptions()));
313
455
  };
314
456
  /**
315
457
  * Renders the component in slots mode
316
458
  * @returns {any} The JSX for slots mode
317
459
  */
318
460
  this.renderSlotsMode = () => {
319
- return (h(Host, { "aria-label": this.label, "aria-expanded": this.open.toString() }, (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" }), this.value.length > 0 && (h("nv-badge", { slot: "leading-input", "prevent-auto-close": true, color: "10", dismissible: this.value.length > 0, label: `${this.value.length} ${this.badgeLabel}`, "aria-label": `Clear all ${this.value.length} ${this.badgeLabel} items`, onCloseClicked: this.handleBadgeCloseSlots })), this.filterable || 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.filterText, required: this.required, disabled: this.disabled, readOnly: this.readonly, onInput: this.handleInputSlots, onFocus: this.handleInputFocusSlots, onBlur: this.handleInputBlurSlots, onKeyDown: this.handleKeyDown, "data-scope": "focusable" })) : (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, "data-scope": "focusable" }, h("span", null, this.placeholder))), this.error && (h("nv-icon", { name: "alert-circle", class: "validation", size: "md" })), this.filterable && this.filterText.length > 0 && (h("nv-iconbutton", { name: "x", size: "md", emphasis: "lower", tabindex: "-1", onClick: this.clearFilterText, "aria-label": "Clear filter text" })), h("nv-iconbutton", { "data-scope": "toggle-dropdown", 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: this.maxHeight ? { maxHeight: this.maxHeight } : {} }, h("slot", { name: "content" }))), this.renderDescriptions()));
461
+ return (h(Host, { "aria-label": this.label }, (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" }), this.value.length > 0 && (h("nv-badge", { slot: "leading-input", "prevent-auto-close": true, color: "10", dismissible: this.value.length > 0, label: `${this.value.length} ${this.badgeLabel}`, "aria-label": `Clear all ${this.value.length} ${this.badgeLabel} items`, onCloseClicked: this.handleBadgeCloseSlots })), this.filterable || 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.filterText, required: this.required, disabled: this.disabled, readOnly: this.readonly, onInput: this.handleInputSlots, onFocus: this.handleInputFocusSlots, onBlur: this.handleInputBlurSlots, onKeyDown: this.handleKeyDown, "data-scope": "focusable", "aria-label": this.label, "aria-controls": `${this.inputId}-listbox` })) : (h(Fragment, null, h("input", { id: this.inputId, type: "text", style: {
462
+ position: 'absolute',
463
+ opacity: '0',
464
+ width: '0',
465
+ height: '0',
466
+ pointerEvents: 'none',
467
+ }, tabIndex: -1, "aria-hidden": "true", autoComplete: this.autocomplete, name: this.name, onFocus: this.handleInputFocusSlots }), h("p", { id: this.inputId, class: "non-filterable-text", "aria-label": this.label, onClick: this.handleInputContainerClickSlots, tabIndex: 0, onKeyDown: this.handleKeyDown, onFocus: this.handleInputFocusSlots, "aria-controls": `${this.inputId}-listbox`, "data-scope": "focusable", role: "button" }, h("span", null, this.placeholder)))), this.error && (h("nv-icon", { name: "alert-circle", class: "validation", size: "md" })), this.filterable && this.filterText.length > 0 && (h("nv-iconbutton", { name: "x", size: "md", emphasis: "lower", tabindex: "-1", onMouseDown: () => {
468
+ this.preventBlurClose = true;
469
+ }, onClick: this.clearFilterText, "aria-label": "Clear filter text" })), h("nv-iconbutton", { "data-scope": "toggle-dropdown", name: this.open ? 'chevron-top' : 'chevron-down', size: "md", emphasis: "lower", "aria-label": this.open ? 'Hide dropdown' : 'Show dropdown', title: this.open ? 'Hide dropdown' : 'Show dropdown', onMouseDown: () => {
470
+ this.preventBlurClose = true;
471
+ }, onClick: this.togglePopoverSlots })), h("slot", { name: "after-input" })), h("div", { id: `${this.inputId}-listbox`, slot: "content", style: this.maxHeight ? { maxHeight: this.maxHeight } : {} }, this.shouldShowToggleAllSlotButton() && (h("div", { class: "select-all-container" }, h("div", { class: "select-all-header" }, this.isSelectAllSectionVisible && (h("nv-fieldcheckbox", { checked: this.getSelectAllCheckboxStateSlots() === 'checked', indeterminate: this.getSelectAllCheckboxStateSlots() ===
472
+ 'indeterminate', label: this.getSelectAllCheckboxStateSlots() === 'unchecked'
473
+ ? this.selectAllLabel
474
+ : this.deselectAllLabel, onMouseDown: () => {
475
+ this.preventBlurClose = true;
476
+ }, onClick: this.handleSelectAllCheckboxSlotsClick }))))), h("slot", { name: "content" }))), this.renderDescriptions()));
320
477
  };
321
478
  }
322
479
  //#endregion EVENTS
323
480
  /****************************************************************************/
324
481
  //#region WATCHERS
325
482
  handleOptionsChange(newValue) {
483
+ console.info('[Watch:options] newValue:', newValue);
484
+ console.info('[Watch:options] current value before update:', this.value);
326
485
  if (!newValue)
327
486
  return;
328
- this.value = newValue
329
- .filter(option => option.checked)
330
- .map(option => option.value);
487
+ // If the parent has set a value prop, use it. Otherwise, derive from checked options.
488
+ // (Assume: if value is undefined, it's not set by parent; if it's an array, it's set.)
489
+ if (this.value === undefined || this.value.length === 0) {
490
+ this.value = newValue
491
+ .filter(option => option.checked)
492
+ .map(option => option.value);
493
+ console.info('[Watch:options] updated value from checked options:', this.value);
494
+ }
495
+ else {
496
+ // If value is set, ensure checked states in options match value
497
+ newValue.forEach(option => {
498
+ option.checked = this.value.includes(option.value);
499
+ });
500
+ console.info('[Watch:options] options checked state synced to value:', newValue);
501
+ }
331
502
  this.reorderOptionsContent();
332
503
  }
333
- /**
334
- * Emitted when the value changes.
335
- */
336
504
  watchValueHandler() {
505
+ console.info('[Watch:value] Value changed:', this.value);
337
506
  // Synchronize child components when value changes programmatically
338
507
  if (this.el && this.el.isConnected) {
339
508
  this.syncChildComponents();
340
509
  }
510
+ // Also, update options checked state if options exist
511
+ if (this.options) {
512
+ this.options.forEach(option => {
513
+ option.checked = this.value.includes(option.value);
514
+ });
515
+ }
341
516
  }
342
517
  //#endregion WATCHERS
343
518
  /****************************************************************************/
@@ -376,6 +551,7 @@ export class NvFieldmultiselect {
376
551
  return;
377
552
  }
378
553
  const { value, checked } = event.detail;
554
+ console.info('[Event:itemChecked] value:', value, 'checked:', checked, 'current value:', this.value);
379
555
  if (value !== undefined && value !== null) {
380
556
  const newValue = [...this.value];
381
557
  const valueIndex = newValue.indexOf(value);
@@ -385,6 +561,7 @@ export class NvFieldmultiselect {
385
561
  else if (!checked && valueIndex > -1) {
386
562
  newValue.splice(valueIndex, 1);
387
563
  }
564
+ console.info('[Event:itemChecked] newValue after update:', newValue);
388
565
  // Always update the state and emit the event when an item is checked/unchecked
389
566
  this.value = newValue;
390
567
  this.valueChanged.emit(this.value);
@@ -397,7 +574,7 @@ export class NvFieldmultiselect {
397
574
  }
398
575
  }
399
576
  else {
400
- console.warn('Received itemChecked event with undefined or null value'); // Warning log
577
+ console.warn('[Event:itemChecked] Received itemChecked event with undefined or null value'); // Warning log
401
578
  }
402
579
  }
403
580
  // Add a listener for the slot content
@@ -419,6 +596,7 @@ export class NvFieldmultiselect {
419
596
  * Subscribe to click outside event.
420
597
  */
421
598
  connectedCallback() {
599
+ console.info('[Lifecycle] connectedCallback - value:', this.value);
422
600
  document.addEventListener('click', this.handleClickOutside.bind(this));
423
601
  }
424
602
  /**
@@ -426,12 +604,15 @@ export class NvFieldmultiselect {
426
604
  */
427
605
  componentWillLoad() {
428
606
  var _a;
607
+ console.info('[Lifecycle] componentWillLoad - value:', this.value, 'options:', this.options);
429
608
  // Don't call handleOptionsChange if we are in slots mode
430
609
  if (this.options) {
431
610
  this.handleOptionsChange(this.options);
432
611
  }
433
612
  // Specific initialization for slots mode
434
613
  if (!this.options) {
614
+ // Initialize value from checked slotted children
615
+ this.initializeValueFromSlots();
435
616
  // Use a microtask to ensure DOM is ready
436
617
  Promise.resolve().then(() => {
437
618
  // Synchronize child components
@@ -450,21 +631,30 @@ export class NvFieldmultiselect {
450
631
  if (!this.filterText) {
451
632
  this.resetFilter();
452
633
  }
634
+ // Initialize filter results state
635
+ this.hasFilterResults = true;
453
636
  }
454
637
  /**
455
638
  * Force reorder if options mode in componentDidLoad because of the initial render not trigger @watch
456
639
  */
457
640
  componentDidLoad() {
641
+ console.info('[Lifecycle] componentDidLoad - value:', this.value, 'options:', this.options);
458
642
  if (this.options) {
459
643
  this.handleOptionsChange(this.options);
460
644
  }
461
645
  // Final synchronization of child components after everything is loaded
462
646
  this.syncChildComponents();
647
+ // For slots mode, ensure value is initialized from checked children if not already
648
+ if (!this.options) {
649
+ this.initializeValueFromSlots();
650
+ this.syncChildComponents();
651
+ }
463
652
  }
464
653
  /**
465
654
  * Unsubscribe from click outside event.
466
655
  */
467
656
  disconnectedCallback() {
657
+ console.info('[Lifecycle] disconnectedCallback - value:', this.value);
468
658
  document.removeEventListener('click', this.handleClickOutside.bind(this));
469
659
  }
470
660
  //#endregion LIFECYCLE
@@ -499,14 +689,67 @@ export class NvFieldmultiselect {
499
689
  this.manageDivider(ul, selectedItems, unselectedItems);
500
690
  }
501
691
  }
692
+ // Reset filter results state
693
+ this.hasFilterResults = true;
502
694
  }
503
695
  /**
504
696
  * Returns the list of selected values.
505
697
  * @returns {string[]} The selected values.
506
698
  */
507
699
  async getSelectedValues() {
700
+ console.info('getSelectedValues:', this.value);
508
701
  return this.value;
509
702
  }
703
+ /**
704
+ * Select all visible and enabled items.
705
+ * Works for both options and slots mode.
706
+ * @returns {Promise<void>}
707
+ */
708
+ async selectAll() {
709
+ if (this.disabled || this.readonly)
710
+ return;
711
+ if (this.options) {
712
+ this.toggleSelectAllOptions(true);
713
+ }
714
+ else {
715
+ this.toggleSelectAllSlots(true);
716
+ }
717
+ }
718
+ /**
719
+ * Deselect all visible and enabled items.
720
+ * Works for both options and slots mode.
721
+ * @returns {Promise<void>}
722
+ */
723
+ async deselectAll() {
724
+ if (this.disabled || this.readonly)
725
+ return;
726
+ if (this.options) {
727
+ this.toggleSelectAllOptions(false);
728
+ }
729
+ else {
730
+ this.toggleSelectAllSlots(false);
731
+ }
732
+ }
733
+ /**
734
+ * Toggle selection state of all visible and enabled items.
735
+ * If all items are selected, deselects all. Otherwise, selects all.
736
+ * Works for both options and slots mode.
737
+ * @returns {Promise<void>}
738
+ */
739
+ async toggleSelectAll() {
740
+ if (this.disabled || this.readonly)
741
+ return;
742
+ const currentState = this.options
743
+ ? this.getSelectAllCheckboxStateOptions()
744
+ : this.getSelectAllCheckboxStateSlots();
745
+ const shouldSelectAll = currentState === 'unchecked' || currentState === 'indeterminate';
746
+ if (this.options) {
747
+ this.toggleSelectAllOptions(shouldSelectAll);
748
+ }
749
+ else {
750
+ this.toggleSelectAllSlots(shouldSelectAll);
751
+ }
752
+ }
510
753
  /**
511
754
  * Reorder the content of the slot.
512
755
  */
@@ -550,7 +793,7 @@ export class NvFieldmultiselect {
550
793
  * Reorder the content for options mode with async handling
551
794
  */
552
795
  reorderOptionsContent() {
553
- const ul = this.el.querySelector('ul[role="content"]');
796
+ const ul = this.el.querySelector('ul');
554
797
  if (!ul)
555
798
  return;
556
799
  const items = Array.from(ul.querySelectorAll('nv-fielddropdownitemcheck')).filter(item => item.style.display !== 'none');
@@ -658,6 +901,7 @@ export class NvFieldmultiselect {
658
901
  this.removeEmptyMessageOption(ul);
659
902
  items.forEach(item => (item.style.display = ''));
660
903
  this.reorderOptionsContent(); // Reorder after reset
904
+ this.hasFilterResults = true; // Reset filter means we have results
661
905
  return;
662
906
  }
663
907
  // Filter the items
@@ -670,6 +914,8 @@ export class NvFieldmultiselect {
670
914
  if (matchesFilter)
671
915
  hasVisibleItems = true;
672
916
  });
917
+ // Update the filter results state
918
+ this.hasFilterResults = hasVisibleItems;
673
919
  // Manage the divider with the visible items
674
920
  const visibleItems = items.filter(item => item.style.display !== 'none');
675
921
  const visibleSelected = visibleItems.filter(item => this.value.includes(item.getAttribute('value') || ''));
@@ -700,6 +946,7 @@ export class NvFieldmultiselect {
700
946
  // If filter text is empty, reset all items visibility
701
947
  if (!this.filterText.trim()) {
702
948
  this.resetFilter();
949
+ this.hasFilterResults = true; // Reset filter means we have results
703
950
  return;
704
951
  }
705
952
  const normalizedFilter = this.normalizeText(this.filterText);
@@ -719,6 +966,8 @@ export class NvFieldmultiselect {
719
966
  if (matchesFilter)
720
967
  hasVisibleItems = true;
721
968
  });
969
+ // Update the filter results state
970
+ this.hasFilterResults = hasVisibleItems;
722
971
  // Get visible items after filtering
723
972
  const visibleItems = items.filter(item => item.style.display !== 'none');
724
973
  const visibleSelectedItems = visibleItems.filter(item => this.value.includes(item.getAttribute('value') || ''));
@@ -929,10 +1178,13 @@ export class NvFieldmultiselect {
929
1178
  return;
930
1179
  }
931
1180
  const items = Array.from(this.el.querySelectorAll('nv-fielddropdownitemcheck'));
1181
+ console.info('[syncChildComponents] value:', this.value);
932
1182
  items.forEach(item => {
933
1183
  // Get the effective value: use explicit value if present, otherwise use label
934
1184
  const itemValue = item.getAttribute('value') || item.getAttribute('label') || '';
935
- if (this.value.includes(itemValue)) {
1185
+ const shouldBeChecked = this.value.includes(itemValue);
1186
+ console.info('[syncChildComponents] itemValue:', itemValue, 'shouldBeChecked:', shouldBeChecked, 'item.checked(before):', item.checked);
1187
+ if (shouldBeChecked) {
936
1188
  item.setAttribute('checked', '');
937
1189
  item.checked = true;
938
1190
  }
@@ -940,7 +1192,105 @@ export class NvFieldmultiselect {
940
1192
  item.removeAttribute('checked');
941
1193
  item.checked = false;
942
1194
  }
1195
+ console.info('[syncChildComponents] itemValue:', itemValue, 'item.checked(after):', item.checked);
1196
+ });
1197
+ }
1198
+ /**
1199
+ * Gets visible and enabled slot items using consistent logic.
1200
+ * @returns {Element[]} Array of visible and enabled items
1201
+ */
1202
+ getVisibleEnabledSlotItems() {
1203
+ const allItems = Array.from(this.el.querySelectorAll('nv-fielddropdownitemcheck'));
1204
+ return allItems.filter(item => {
1205
+ const isHidden = item.style.display === 'none';
1206
+ const isDisabled = item.hasAttribute('disabled');
1207
+ return !isHidden && !isDisabled;
1208
+ });
1209
+ }
1210
+ /**
1211
+ * Gets visible and enabled option items by checking DOM elements.
1212
+ * @returns {string[]} Array of visible and enabled option values
1213
+ */
1214
+ getVisibleEnabledOptionItems() {
1215
+ const allItems = Array.from(this.el.querySelectorAll('nv-fielddropdownitemcheck'));
1216
+ const visibleItems = allItems.filter(item => {
1217
+ const isHidden = item.style.display === 'none';
1218
+ const isDisabled = item.hasAttribute('disabled');
1219
+ return !isHidden && !isDisabled;
1220
+ });
1221
+ return visibleItems
1222
+ .map(item => item.getAttribute('value') || '')
1223
+ .filter(value => value !== '');
1224
+ }
1225
+ /**
1226
+ * Determines if the toggle all button should be shown in options mode.
1227
+ * @returns {boolean} True if there are visible items and no "No results found" message
1228
+ */
1229
+ shouldShowToggleAllOptionsButton() {
1230
+ if (!this.options)
1231
+ return false; // Only for options mode
1232
+ return this.enableSelectAll && this.hasFilterResults;
1233
+ }
1234
+ /**
1235
+ * Gets the checkbox state for the select all checkbox in options mode.
1236
+ * @returns {'checked' | 'unchecked' | 'indeterminate'} The checkbox state
1237
+ */
1238
+ getSelectAllCheckboxStateOptions() {
1239
+ if (!this.options)
1240
+ return 'unchecked';
1241
+ // Get visible and enabled option values from DOM
1242
+ const visibleOptionValues = this.getVisibleEnabledOptionItems();
1243
+ if (visibleOptionValues.length === 0)
1244
+ return 'unchecked';
1245
+ const selectedVisibleOptions = visibleOptionValues.filter(value => this.value.includes(value));
1246
+ if (selectedVisibleOptions.length === 0)
1247
+ return 'unchecked';
1248
+ if (selectedVisibleOptions.length === visibleOptionValues.length)
1249
+ return 'checked';
1250
+ return 'indeterminate';
1251
+ }
1252
+ /**
1253
+ * Gets the checkbox state for the select all checkbox in slots mode.
1254
+ * @returns {'checked' | 'unchecked' | 'indeterminate'} The checkbox state
1255
+ */
1256
+ getSelectAllCheckboxStateSlots() {
1257
+ if (this.options)
1258
+ return 'unchecked';
1259
+ // Get all visible and enabled items
1260
+ const items = this.getVisibleEnabledSlotItems();
1261
+ if (items.length === 0)
1262
+ return 'unchecked';
1263
+ const selectedItems = items.filter(item => {
1264
+ const itemValue = item.getAttribute('value') || item.getAttribute('label') || '';
1265
+ return itemValue !== '' && this.value.includes(itemValue);
943
1266
  });
1267
+ if (selectedItems.length === 0)
1268
+ return 'unchecked';
1269
+ if (selectedItems.length === items.length)
1270
+ return 'checked';
1271
+ return 'indeterminate';
1272
+ }
1273
+ /**
1274
+ * Determines if the toggle all button should be shown in slots mode.
1275
+ * @returns {boolean} True if there are visible items and no "No results found" message
1276
+ */
1277
+ shouldShowToggleAllSlotButton() {
1278
+ if (this.options)
1279
+ return false; // Only for slots mode
1280
+ return this.enableSelectAll && this.hasFilterResults;
1281
+ }
1282
+ /**
1283
+ * Initializes the value array from checked slotted nv-fielddropdownitemcheck elements (slots mode only).
1284
+ */
1285
+ initializeValueFromSlots() {
1286
+ const items = Array.from(this.el.querySelectorAll('nv-fielddropdownitemcheck'));
1287
+ // Values from checked slot children
1288
+ const checkedValues = items
1289
+ .filter(item => item.hasAttribute('checked'))
1290
+ .map(item => item.getAttribute('value') || item.getAttribute('label') || '');
1291
+ // Combine with current this.value (set by code), ensuring uniqueness
1292
+ this.value = Array.from(new Set([...(this.value || []), ...checkedValues]));
1293
+ console.info('[initializeValueFromSlots] checkedValues:', checkedValues, 'combined value:', this.value);
944
1294
  }
945
1295
  /**
946
1296
  * Renders description and error description sections
@@ -974,7 +1324,7 @@ export class NvFieldmultiselect {
974
1324
  }
975
1325
  static get properties() {
976
1326
  return {
977
- "inputId": {
1327
+ "label": {
978
1328
  "type": "string",
979
1329
  "mutable": false,
980
1330
  "complexType": {
@@ -986,15 +1336,14 @@ export class NvFieldmultiselect {
986
1336
  "optional": false,
987
1337
  "docs": {
988
1338
  "tags": [],
989
- "text": "Sets the ID for the input element and the for attribute of the associated\nlabel. If no ID is provided, a random one will be automatically generated\nto ensure unique identification, facilitating proper label association and\naccessibility."
1339
+ "text": "Lets you define the text that explains what users should enter in the text\ninput field. It's a crucial element for making forms clear and user-friendly."
990
1340
  },
991
1341
  "getter": false,
992
1342
  "setter": false,
993
- "attribute": "input-id",
994
- "reflect": true,
995
- "defaultValue": "uuidv4()"
1343
+ "attribute": "label",
1344
+ "reflect": true
996
1345
  },
997
- "name": {
1346
+ "inputId": {
998
1347
  "type": "string",
999
1348
  "mutable": false,
1000
1349
  "complexType": {
@@ -1006,14 +1355,15 @@ export class NvFieldmultiselect {
1006
1355
  "optional": false,
1007
1356
  "docs": {
1008
1357
  "tags": [],
1009
- "text": "Defines the name attribute of the input field, which is crucial for form\nsubmission. This value is used as the key in the key-value pair sent to\nthe server, representing the input's data in form submissions. It should be\nunique within the form to avoid conflicts."
1358
+ "text": "Sets the ID for the input element and the for attribute of the associated\nlabel. If no ID is provided, a random one will be automatically generated\nto ensure unique identification, facilitating proper label association and\naccessibility."
1010
1359
  },
1011
1360
  "getter": false,
1012
1361
  "setter": false,
1013
- "attribute": "name",
1014
- "reflect": true
1362
+ "attribute": "input-id",
1363
+ "reflect": true,
1364
+ "defaultValue": "uuidv4()"
1015
1365
  },
1016
- "label": {
1366
+ "name": {
1017
1367
  "type": "string",
1018
1368
  "mutable": false,
1019
1369
  "complexType": {
@@ -1025,11 +1375,11 @@ export class NvFieldmultiselect {
1025
1375
  "optional": false,
1026
1376
  "docs": {
1027
1377
  "tags": [],
1028
- "text": "Lets you define the text that explains what users should enter in the text\ninput field. It's a crucial element for making forms clear and user-friendly."
1378
+ "text": "Defines the name attribute of the input field, which is crucial for form\nsubmission. This value is used as the key in the key-value pair sent to\nthe server, representing the input's data in form submissions. It should be\nunique within the form to avoid conflicts."
1029
1379
  },
1030
1380
  "getter": false,
1031
1381
  "setter": false,
1032
- "attribute": "label",
1382
+ "attribute": "name",
1033
1383
  "reflect": true
1034
1384
  },
1035
1385
  "description": {
@@ -1096,24 +1446,6 @@ export class NvFieldmultiselect {
1096
1446
  "reflect": true,
1097
1447
  "defaultValue": "'off'"
1098
1448
  },
1099
- "value": {
1100
- "type": "unknown",
1101
- "mutable": true,
1102
- "complexType": {
1103
- "original": "string[]",
1104
- "resolved": "string[]",
1105
- "references": {}
1106
- },
1107
- "required": false,
1108
- "optional": false,
1109
- "docs": {
1110
- "tags": [],
1111
- "text": "Specifies the selected values of the multiselect field.\nThis is the canonical value for the component and is used for form submission."
1112
- },
1113
- "getter": false,
1114
- "setter": false,
1115
- "defaultValue": "[]"
1116
- },
1117
1449
  "required": {
1118
1450
  "type": "boolean",
1119
1451
  "mutable": false,
@@ -1259,25 +1591,63 @@ export class NvFieldmultiselect {
1259
1591
  "reflect": true,
1260
1592
  "defaultValue": "false"
1261
1593
  },
1262
- "emptyResult": {
1263
- "type": "string",
1594
+ "fluid": {
1595
+ "type": "boolean",
1264
1596
  "mutable": false,
1265
1597
  "complexType": {
1266
- "original": "string",
1267
- "resolved": "string",
1598
+ "original": "boolean",
1599
+ "resolved": "boolean",
1268
1600
  "references": {}
1269
1601
  },
1270
1602
  "required": false,
1271
1603
  "optional": false,
1272
1604
  "docs": {
1273
1605
  "tags": [],
1274
- "text": "The text to display when no items match the filter."
1606
+ "text": "Allows the field to stretch and fill the entire width of its container."
1275
1607
  },
1276
1608
  "getter": false,
1277
1609
  "setter": false,
1278
- "attribute": "empty-result",
1610
+ "attribute": "fluid",
1279
1611
  "reflect": true,
1280
- "defaultValue": "'No results found'"
1612
+ "defaultValue": "false"
1613
+ },
1614
+ "options": {
1615
+ "type": "unknown",
1616
+ "mutable": true,
1617
+ "complexType": {
1618
+ "original": "{\n /** Label to display for the option */\n label: string;\n /** Value associated with the option */\n value: string;\n /** Whether this option is a divider */\n isDivider?: boolean;\n /** Whether this option is disabled */\n disabled?: boolean;\n /** Additional description for the option */\n description?: string;\n /** Whether this option is pre-checked */\n checked?: boolean;\n }[]",
1619
+ "resolved": "{ label: string; value: string; isDivider?: boolean; disabled?: boolean; description?: string; checked?: boolean; }[]",
1620
+ "references": {}
1621
+ },
1622
+ "required": false,
1623
+ "optional": true,
1624
+ "docs": {
1625
+ "tags": [{
1626
+ "name": "example",
1627
+ "text": "options=[{\n \"label\": \"Option 1\",\n \"value\": \"option1\",\n},\n{\n \"label\": \"Option 2\",\n \"value\": \"option2\",\n}]"
1628
+ }],
1629
+ "text": "List of options used to automatically generate dropdown items. This\nprovides an alternative to using the slot manually."
1630
+ },
1631
+ "getter": false,
1632
+ "setter": false
1633
+ },
1634
+ "value": {
1635
+ "type": "unknown",
1636
+ "mutable": true,
1637
+ "complexType": {
1638
+ "original": "string[]",
1639
+ "resolved": "string[]",
1640
+ "references": {}
1641
+ },
1642
+ "required": false,
1643
+ "optional": false,
1644
+ "docs": {
1645
+ "tags": [],
1646
+ "text": "Specifies the selected values of the multiselect field.\nThis is the canonical value for the component and is used for form submission."
1647
+ },
1648
+ "getter": false,
1649
+ "setter": false,
1650
+ "defaultValue": "[]"
1281
1651
  },
1282
1652
  "filterable": {
1283
1653
  "type": "boolean",
@@ -1299,25 +1669,25 @@ export class NvFieldmultiselect {
1299
1669
  "reflect": true,
1300
1670
  "defaultValue": "false"
1301
1671
  },
1302
- "options": {
1303
- "type": "unknown",
1304
- "mutable": true,
1672
+ "emptyResult": {
1673
+ "type": "string",
1674
+ "mutable": false,
1305
1675
  "complexType": {
1306
- "original": "{\n /** Label to display for the option */\n label: string;\n /** Value associated with the option */\n value: string;\n /** Whether this option is a divider */\n isDivider?: boolean;\n /** Whether this option is disabled */\n disabled?: boolean;\n /** Additional description for the option */\n description?: string;\n /** Whether this option is pre-checked */\n checked?: boolean;\n }[]",
1307
- "resolved": "{ label: string; value: string; isDivider?: boolean; disabled?: boolean; description?: string; checked?: boolean; }[]",
1676
+ "original": "string",
1677
+ "resolved": "string",
1308
1678
  "references": {}
1309
1679
  },
1310
1680
  "required": false,
1311
- "optional": true,
1681
+ "optional": false,
1312
1682
  "docs": {
1313
- "tags": [{
1314
- "name": "example",
1315
- "text": "options=[{\n \"label\": \"Option 1\",\n \"value\": \"option1\",\n},\n{\n \"label\": \"Option 2\",\n \"value\": \"option2\",\n}]"
1316
- }],
1317
- "text": "List of options used to automatically generate dropdown items. This\nprovides an alternative to using the slot manually."
1683
+ "tags": [],
1684
+ "text": "The text to display when no items match the filter."
1318
1685
  },
1319
1686
  "getter": false,
1320
- "setter": false
1687
+ "setter": false,
1688
+ "attribute": "empty-result",
1689
+ "reflect": true,
1690
+ "defaultValue": "'No results found'"
1321
1691
  },
1322
1692
  "debounceDelay": {
1323
1693
  "type": "number",
@@ -1362,7 +1732,47 @@ export class NvFieldmultiselect {
1362
1732
  "reflect": true,
1363
1733
  "defaultValue": "false"
1364
1734
  },
1365
- "fluid": {
1735
+ "badgeLabel": {
1736
+ "type": "string",
1737
+ "mutable": false,
1738
+ "complexType": {
1739
+ "original": "string",
1740
+ "resolved": "string",
1741
+ "references": {}
1742
+ },
1743
+ "required": false,
1744
+ "optional": false,
1745
+ "docs": {
1746
+ "tags": [],
1747
+ "text": "Text for the badge showing the number of selected items."
1748
+ },
1749
+ "getter": false,
1750
+ "setter": false,
1751
+ "attribute": "badge-label",
1752
+ "reflect": true,
1753
+ "defaultValue": "''"
1754
+ },
1755
+ "filterText": {
1756
+ "type": "string",
1757
+ "mutable": true,
1758
+ "complexType": {
1759
+ "original": "string",
1760
+ "resolved": "string",
1761
+ "references": {}
1762
+ },
1763
+ "required": false,
1764
+ "optional": false,
1765
+ "docs": {
1766
+ "tags": [],
1767
+ "text": "The text entered by the user for filtering multiselect items."
1768
+ },
1769
+ "getter": false,
1770
+ "setter": false,
1771
+ "attribute": "filter-text",
1772
+ "reflect": true,
1773
+ "defaultValue": "''"
1774
+ },
1775
+ "enableSelectAll": {
1366
1776
  "type": "boolean",
1367
1777
  "mutable": false,
1368
1778
  "complexType": {
@@ -1374,15 +1784,15 @@ export class NvFieldmultiselect {
1374
1784
  "optional": false,
1375
1785
  "docs": {
1376
1786
  "tags": [],
1377
- "text": "Allows the field to stretch and fill the entire width of its container."
1787
+ "text": "Enables or disables the \"Select All / Deselect All\" toggle functionality."
1378
1788
  },
1379
1789
  "getter": false,
1380
1790
  "setter": false,
1381
- "attribute": "fluid",
1791
+ "attribute": "enable-select-all",
1382
1792
  "reflect": true,
1383
1793
  "defaultValue": "false"
1384
1794
  },
1385
- "badgeLabel": {
1795
+ "selectAllLabel": {
1386
1796
  "type": "string",
1387
1797
  "mutable": false,
1388
1798
  "complexType": {
@@ -1394,17 +1804,17 @@ export class NvFieldmultiselect {
1394
1804
  "optional": false,
1395
1805
  "docs": {
1396
1806
  "tags": [],
1397
- "text": "Text for the badge showing the number of selected items."
1807
+ "text": "Text for the \"Select All\" button."
1398
1808
  },
1399
1809
  "getter": false,
1400
1810
  "setter": false,
1401
- "attribute": "badge-label",
1811
+ "attribute": "select-all-label",
1402
1812
  "reflect": true,
1403
- "defaultValue": "''"
1813
+ "defaultValue": "'Select/deselect all'"
1404
1814
  },
1405
- "filterText": {
1815
+ "deselectAllLabel": {
1406
1816
  "type": "string",
1407
- "mutable": true,
1817
+ "mutable": false,
1408
1818
  "complexType": {
1409
1819
  "original": "string",
1410
1820
  "resolved": "string",
@@ -1414,20 +1824,22 @@ export class NvFieldmultiselect {
1414
1824
  "optional": false,
1415
1825
  "docs": {
1416
1826
  "tags": [],
1417
- "text": "The text entered by the user for filtering multiselect items."
1827
+ "text": "Text for the \"Deselect All\" button."
1418
1828
  },
1419
1829
  "getter": false,
1420
1830
  "setter": false,
1421
- "attribute": "filter-text",
1831
+ "attribute": "deselect-all-label",
1422
1832
  "reflect": true,
1423
- "defaultValue": "''"
1833
+ "defaultValue": "'Select/deselect all'"
1424
1834
  }
1425
1835
  };
1426
1836
  }
1427
1837
  static get states() {
1428
1838
  return {
1429
1839
  "sortedOptions": {},
1430
- "isHandlingEscape": {}
1840
+ "isHandlingEscape": {},
1841
+ "hasFilterResults": {},
1842
+ "isSelectAllSectionVisible": {}
1431
1843
  };
1432
1844
  }
1433
1845
  static get events() {
@@ -1528,6 +1940,66 @@ export class NvFieldmultiselect {
1528
1940
  "text": "The selected values."
1529
1941
  }]
1530
1942
  }
1943
+ },
1944
+ "selectAll": {
1945
+ "complexType": {
1946
+ "signature": "() => Promise<void>",
1947
+ "parameters": [],
1948
+ "references": {
1949
+ "Promise": {
1950
+ "location": "global",
1951
+ "id": "global::Promise"
1952
+ }
1953
+ },
1954
+ "return": "Promise<void>"
1955
+ },
1956
+ "docs": {
1957
+ "text": "Select all visible and enabled items.\nWorks for both options and slots mode.",
1958
+ "tags": [{
1959
+ "name": "returns",
1960
+ "text": undefined
1961
+ }]
1962
+ }
1963
+ },
1964
+ "deselectAll": {
1965
+ "complexType": {
1966
+ "signature": "() => Promise<void>",
1967
+ "parameters": [],
1968
+ "references": {
1969
+ "Promise": {
1970
+ "location": "global",
1971
+ "id": "global::Promise"
1972
+ }
1973
+ },
1974
+ "return": "Promise<void>"
1975
+ },
1976
+ "docs": {
1977
+ "text": "Deselect all visible and enabled items.\nWorks for both options and slots mode.",
1978
+ "tags": [{
1979
+ "name": "returns",
1980
+ "text": undefined
1981
+ }]
1982
+ }
1983
+ },
1984
+ "toggleSelectAll": {
1985
+ "complexType": {
1986
+ "signature": "() => Promise<void>",
1987
+ "parameters": [],
1988
+ "references": {
1989
+ "Promise": {
1990
+ "location": "global",
1991
+ "id": "global::Promise"
1992
+ }
1993
+ },
1994
+ "return": "Promise<void>"
1995
+ },
1996
+ "docs": {
1997
+ "text": "Toggle selection state of all visible and enabled items.\nIf all items are selected, deselects all. Otherwise, selects all.\nWorks for both options and slots mode.",
1998
+ "tags": [{
1999
+ "name": "returns",
2000
+ "text": undefined
2001
+ }]
2002
+ }
1531
2003
  }
1532
2004
  };
1533
2005
  }