@nova-design-system/nova-webcomponents 3.0.0 → 3.1.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 (436) hide show
  1. package/dist/cjs/{constants-bcd6b2e2.js → constants-8fb8ccc0.js} +14 -1
  2. package/dist/cjs/constants-8fb8ccc0.js.map +1 -0
  3. package/dist/cjs/index-9bda5507.js +4 -4
  4. package/dist/cjs/index.cjs.js +4 -471
  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-alert.cjs.entry.js +5 -5
  9. package/dist/cjs/nv-alert.cjs.entry.js.map +1 -1
  10. package/dist/cjs/nv-avatar.cjs.entry.js +1 -1
  11. package/dist/cjs/nv-badge_2.cjs.entry.js +17 -8
  12. package/dist/cjs/nv-badge_2.cjs.entry.js.map +1 -1
  13. package/dist/cjs/nv-button.cjs.entry.js +1 -1
  14. package/dist/cjs/nv-calendar.cjs.entry.js +841 -842
  15. package/dist/cjs/nv-calendar.cjs.entry.js.map +1 -1
  16. package/dist/cjs/nv-datagrid.cjs.entry.js +376 -39
  17. package/dist/cjs/nv-datagrid.cjs.entry.js.map +1 -1
  18. package/dist/cjs/nv-dialog.cjs.entry.js +18 -12
  19. package/dist/cjs/nv-dialog.cjs.entry.js.map +1 -1
  20. package/dist/cjs/nv-dialogfooter_2.cjs.entry.js +1 -1
  21. package/dist/cjs/nv-fielddate.cjs.entry.js +8 -17
  22. package/dist/cjs/nv-fielddate.cjs.entry.js.map +1 -1
  23. package/dist/cjs/nv-fielddaterange.cjs.entry.js +26 -28
  24. package/dist/cjs/nv-fielddaterange.cjs.entry.js.map +1 -1
  25. package/dist/cjs/nv-fielddropdown.cjs.entry.js +12 -5
  26. package/dist/cjs/nv-fielddropdown.cjs.entry.js.map +1 -1
  27. package/dist/cjs/nv-fielddropdownitem.cjs.entry.js +1 -1
  28. package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +10 -4
  29. package/dist/cjs/nv-fieldmultiselect.cjs.entry.js.map +1 -1
  30. package/dist/cjs/nv-fieldnumber.cjs.entry.js +8 -4
  31. package/dist/cjs/nv-fieldnumber.cjs.entry.js.map +1 -1
  32. package/dist/cjs/nv-fieldpassword.cjs.entry.js +8 -4
  33. package/dist/cjs/nv-fieldpassword.cjs.entry.js.map +1 -1
  34. package/dist/cjs/nv-fieldradio.cjs.entry.js +3 -3
  35. package/dist/cjs/nv-fieldselect.cjs.entry.js +10 -6
  36. package/dist/cjs/nv-fieldselect.cjs.entry.js.map +1 -1
  37. package/dist/cjs/nv-fieldtext.cjs.entry.js +8 -4
  38. package/dist/cjs/nv-fieldtext.cjs.entry.js.map +1 -1
  39. package/dist/cjs/nv-fieldtextarea.cjs.entry.js +8 -4
  40. package/dist/cjs/nv-fieldtextarea.cjs.entry.js.map +1 -1
  41. package/dist/cjs/nv-fieldtime.cjs.entry.js +15 -12
  42. package/dist/cjs/nv-fieldtime.cjs.entry.js.map +1 -1
  43. package/dist/cjs/nv-icon.cjs.entry.js +3 -3
  44. package/dist/cjs/nv-icon.cjs.entry.js.map +1 -1
  45. package/dist/cjs/nv-iconbutton_2.cjs.entry.js +2 -2
  46. package/dist/cjs/nv-menu.cjs.entry.js +3 -1
  47. package/dist/cjs/nv-menu.cjs.entry.js.map +1 -1
  48. package/dist/cjs/nv-menuitem.cjs.entry.js +1 -1
  49. package/dist/cjs/nv-popover.cjs.entry.js +1 -1
  50. package/dist/cjs/nv-row.cjs.entry.js +1 -1
  51. package/dist/cjs/nv-stack.cjs.entry.js +1 -1
  52. package/dist/cjs/nv-table.cjs.entry.js +2 -2
  53. package/dist/cjs/nv-table.cjs.entry.js.map +1 -1
  54. package/dist/cjs/nv-toggle.cjs.entry.js +2 -2
  55. package/dist/cjs/nv-tooltip.cjs.entry.js +1 -1
  56. package/dist/collection/components/nv-alert/nv-alert.css +3 -0
  57. package/dist/collection/components/nv-alert/nv-alert.js +6 -11
  58. package/dist/collection/components/nv-alert/nv-alert.js.map +1 -1
  59. package/dist/collection/components/nv-badge/nv-badge.css +181 -1
  60. package/dist/collection/components/nv-badge/nv-badge.docs.js +20 -1
  61. package/dist/collection/components/nv-badge/nv-badge.docs.js.map +1 -1
  62. package/dist/collection/components/nv-badge/nv-badge.js +39 -15
  63. package/dist/collection/components/nv-badge/nv-badge.js.map +1 -1
  64. package/dist/collection/components/nv-breadcrumbs/nv-breadcrumbs.docs.js +0 -1
  65. package/dist/collection/components/nv-breadcrumbs/nv-breadcrumbs.docs.js.map +1 -1
  66. package/dist/collection/components/nv-calendar/nv-calendar.css +19 -0
  67. package/dist/collection/components/nv-calendar/nv-calendar.docs.js +33 -38
  68. package/dist/collection/components/nv-calendar/nv-calendar.docs.js.map +1 -1
  69. package/dist/collection/components/nv-calendar/nv-calendar.js +680 -897
  70. package/dist/collection/components/nv-calendar/nv-calendar.js.map +1 -1
  71. package/dist/collection/components/nv-calendar/nv-calendar.utils.js +202 -0
  72. package/dist/collection/components/nv-calendar/nv-calendar.utils.js.map +1 -0
  73. package/dist/collection/components/nv-calendar/test/nv-calendar.utils.test.js +667 -0
  74. package/dist/collection/components/nv-calendar/test/nv-calendar.utils.test.js.map +1 -0
  75. package/dist/collection/components/nv-datagrid/nv-datagrid.css +98 -0
  76. package/dist/collection/components/nv-datagrid/nv-datagrid.docs.js +103 -5
  77. package/dist/collection/components/nv-datagrid/nv-datagrid.docs.js.map +1 -1
  78. package/dist/collection/components/nv-datagrid/nv-datagrid.js +391 -56
  79. package/dist/collection/components/nv-datagrid/nv-datagrid.js.map +1 -1
  80. package/dist/collection/components/nv-dialog/nv-dialog.css +29 -5
  81. package/dist/collection/components/nv-dialog/nv-dialog.docs.js +0 -1
  82. package/dist/collection/components/nv-dialog/nv-dialog.docs.js.map +1 -1
  83. package/dist/collection/components/nv-dialog/nv-dialog.js +16 -10
  84. package/dist/collection/components/nv-dialog/nv-dialog.js.map +1 -1
  85. package/dist/collection/components/nv-fielddate/nv-fielddate.docs.js +16 -8
  86. package/dist/collection/components/nv-fielddate/nv-fielddate.docs.js.map +1 -1
  87. package/dist/collection/components/nv-fielddate/nv-fielddate.js +48 -39
  88. package/dist/collection/components/nv-fielddate/nv-fielddate.js.map +1 -1
  89. package/dist/collection/components/nv-fielddate/styles/nv-fielddate.css +7 -0
  90. package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.docs.js +12 -15
  91. package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.docs.js.map +1 -1
  92. package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js +75 -64
  93. package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js.map +1 -1
  94. package/dist/collection/components/nv-fielddaterange/styles/nv-fielddaterange.css +13 -11
  95. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.docs.js +8 -0
  96. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.docs.js.map +1 -1
  97. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js +31 -4
  98. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js.map +1 -1
  99. package/dist/collection/components/nv-fielddropdown/styles/nv-fielddropdown.css +5 -0
  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-fieldmultiselect/nv-fieldmultiselect.css +24 -0
  103. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js +8 -1
  104. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js.map +1 -1
  105. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js +29 -3
  106. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js.map +1 -1
  107. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.css +5 -0
  108. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.docs.js +8 -0
  109. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.docs.js.map +1 -1
  110. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js +27 -3
  111. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js.map +1 -1
  112. package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.css +5 -0
  113. package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.docs.js +8 -0
  114. package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.docs.js.map +1 -1
  115. package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js +27 -3
  116. package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js.map +1 -1
  117. package/dist/collection/components/nv-fieldradio/nv-fieldradio.js +3 -3
  118. package/dist/collection/components/nv-fieldselect/nv-fieldselect.css +5 -0
  119. package/dist/collection/components/nv-fieldselect/nv-fieldselect.docs.js +8 -0
  120. package/dist/collection/components/nv-fieldselect/nv-fieldselect.docs.js.map +1 -1
  121. package/dist/collection/components/nv-fieldselect/nv-fieldselect.js +29 -5
  122. package/dist/collection/components/nv-fieldselect/nv-fieldselect.js.map +1 -1
  123. package/dist/collection/components/nv-fieldtext/nv-fieldtext.css +5 -0
  124. package/dist/collection/components/nv-fieldtext/nv-fieldtext.docs.js +8 -0
  125. package/dist/collection/components/nv-fieldtext/nv-fieldtext.docs.js.map +1 -1
  126. package/dist/collection/components/nv-fieldtext/nv-fieldtext.js +27 -3
  127. package/dist/collection/components/nv-fieldtext/nv-fieldtext.js.map +1 -1
  128. package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.css +23 -0
  129. package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.docs.js +8 -0
  130. package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.docs.js.map +1 -1
  131. package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js +27 -3
  132. package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js.map +1 -1
  133. package/dist/collection/components/nv-fieldtime/nv-fieldtime.js +13 -10
  134. package/dist/collection/components/nv-fieldtime/nv-fieldtime.js.map +1 -1
  135. package/dist/collection/components/nv-fieldtime/styles/nv-fieldtime.css +19 -2
  136. package/dist/collection/components/nv-icon/nv-icon.js +1 -1
  137. package/dist/collection/components/nv-icon/nv-icons.js +3 -470
  138. package/dist/collection/components/nv-icon/nv-icons.js.map +1 -1
  139. package/dist/collection/components/nv-iconbutton/nv-iconbutton.js +1 -1
  140. package/dist/collection/components/nv-loader/nv-loader.js +1 -1
  141. package/dist/collection/components/nv-menu/nv-menu.js +3 -1
  142. package/dist/collection/components/nv-menu/nv-menu.js.map +1 -1
  143. package/dist/collection/components/nv-menuitem/nv-menuitem.js +2 -2
  144. package/dist/collection/components/nv-popover/nv-popover.js +1 -1
  145. package/dist/collection/components/nv-row/nv-row.js +1 -1
  146. package/dist/collection/components/nv-stack/nv-stack.js +1 -1
  147. package/dist/collection/components/nv-table/nv-table.js +8 -11
  148. package/dist/collection/components/nv-table/nv-table.js.map +1 -1
  149. package/dist/collection/components/nv-toggle/nv-toggle.js +2 -2
  150. package/dist/collection/components/nv-tooltip/nv-tooltip.js +1 -1
  151. package/dist/collection/index.js.map +1 -1
  152. package/dist/collection/templates/navigation.docs.js +0 -1
  153. package/dist/collection/templates/navigation.docs.js.map +1 -1
  154. package/dist/collection/utils/constants.js +11 -0
  155. package/dist/collection/utils/constants.js.map +1 -1
  156. package/dist/components/index.js +4 -471
  157. package/dist/components/index.js.map +1 -1
  158. package/dist/components/nv-alert.js +6 -6
  159. package/dist/components/nv-alert.js.map +1 -1
  160. package/dist/components/nv-avatar.js +2 -2
  161. package/dist/components/nv-badge.js +1 -1
  162. package/dist/components/nv-breadcrumb.js +2 -2
  163. package/dist/components/nv-button.js +1 -1
  164. package/dist/components/nv-calendar.js +1 -1
  165. package/dist/components/nv-datagrid.js +400 -43
  166. package/dist/components/nv-datagrid.js.map +1 -1
  167. package/dist/components/nv-dialog.js +22 -16
  168. package/dist/components/nv-dialog.js.map +1 -1
  169. package/dist/components/nv-dialogfooter.js +1 -1
  170. package/dist/components/nv-fielddate.js +18 -26
  171. package/dist/components/nv-fielddate.js.map +1 -1
  172. package/dist/components/nv-fielddaterange.js +37 -38
  173. package/dist/components/nv-fielddaterange.js.map +1 -1
  174. package/dist/components/nv-fielddropdown.js +18 -10
  175. package/dist/components/nv-fielddropdown.js.map +1 -1
  176. package/dist/components/nv-fielddropdownitem.js +1 -1
  177. package/dist/components/nv-fielddropdownitemcheck.js +1 -1
  178. package/dist/components/nv-fieldmultiselect.js +17 -10
  179. package/dist/components/nv-fieldmultiselect.js.map +1 -1
  180. package/dist/components/nv-fieldnumber.js +13 -8
  181. package/dist/components/nv-fieldnumber.js.map +1 -1
  182. package/dist/components/nv-fieldpassword.js +12 -7
  183. package/dist/components/nv-fieldpassword.js.map +1 -1
  184. package/dist/components/nv-fieldradio.js +3 -3
  185. package/dist/components/nv-fieldselect.js +14 -9
  186. package/dist/components/nv-fieldselect.js.map +1 -1
  187. package/dist/components/nv-fieldtext.js +1 -158
  188. package/dist/components/nv-fieldtext.js.map +1 -1
  189. package/dist/components/nv-fieldtextarea.js +10 -5
  190. package/dist/components/nv-fieldtextarea.js.map +1 -1
  191. package/dist/components/nv-fieldtime.js +19 -16
  192. package/dist/components/nv-fieldtime.js.map +1 -1
  193. package/dist/components/nv-icon.js +1 -1
  194. package/dist/components/nv-iconbutton.js +1 -1
  195. package/dist/components/nv-loader.js +1 -1
  196. package/dist/components/nv-menu.js +6 -4
  197. package/dist/components/nv-menu.js.map +1 -1
  198. package/dist/components/nv-menuitem.js +1 -1
  199. package/dist/components/nv-popover.js +1 -1
  200. package/dist/components/nv-row.js +1 -1
  201. package/dist/components/nv-stack.js +1 -1
  202. package/dist/components/nv-table.js +2 -2
  203. package/dist/components/nv-table.js.map +1 -1
  204. package/dist/components/nv-toggle.js +2 -2
  205. package/dist/components/nv-tooltip.js +1 -1
  206. package/dist/components/p-0a0f6daf.js +187 -0
  207. package/dist/components/p-0a0f6daf.js.map +1 -0
  208. package/dist/components/{p-b7b78e64.js → p-10b37876.js} +2 -2
  209. package/dist/components/{p-b7b78e64.js.map → p-10b37876.js.map} +1 -1
  210. package/dist/components/{p-dc3faba3.js → p-10faa938.js} +4 -4
  211. package/dist/components/{p-dc3faba3.js.map → p-10faa938.js.map} +1 -1
  212. package/dist/{esm/constants-98e2dcc2.js → components/p-1f505531.js} +15 -2
  213. package/dist/components/p-1f505531.js.map +1 -0
  214. package/dist/components/{p-2012b8ba.js → p-35a70c5e.js} +2 -2
  215. package/dist/components/{p-2012b8ba.js.map → p-35a70c5e.js.map} +1 -1
  216. package/dist/components/{p-6c364a23.js → p-41c56ddc.js} +5 -5
  217. package/dist/components/{p-6c364a23.js.map → p-41c56ddc.js.map} +1 -1
  218. package/dist/components/{p-a30b55fc.js → p-608eb9da.js} +2 -2
  219. package/dist/components/{p-a30b55fc.js.map → p-608eb9da.js.map} +1 -1
  220. package/dist/components/p-76646ce9.js +88 -0
  221. package/dist/components/p-76646ce9.js.map +1 -0
  222. package/dist/components/p-854c32dc.js +1132 -0
  223. package/dist/components/p-854c32dc.js.map +1 -0
  224. package/dist/components/p-9decffb6.js +167 -0
  225. package/dist/components/p-9decffb6.js.map +1 -0
  226. package/dist/components/{p-2d9ba7d3.js → p-a2527411.js} +3 -3
  227. package/dist/components/{p-2d9ba7d3.js.map → p-a2527411.js.map} +1 -1
  228. package/dist/components/{p-f4d86795.js → p-b48d5a94.js} +3 -3
  229. package/dist/components/{p-f4d86795.js.map → p-b48d5a94.js.map} +1 -1
  230. package/dist/components/{p-4d3ec142.js → p-eb632278.js} +3 -3
  231. package/dist/components/{p-4d3ec142.js.map → p-eb632278.js.map} +1 -1
  232. package/dist/components/{p-150daf68.js → p-f5cb0a63.js} +2 -2
  233. package/dist/components/{p-150daf68.js.map → p-f5cb0a63.js.map} +1 -1
  234. package/dist/components/{p-c14f6b8e.js → p-f76bb0c3.js} +3 -3
  235. package/dist/components/{p-c14f6b8e.js.map → p-f76bb0c3.js.map} +1 -1
  236. package/dist/{components/p-8348db09.js → esm/constants-b97e736d.js} +15 -2
  237. package/dist/esm/constants-b97e736d.js.map +1 -0
  238. package/dist/esm/index-1fb7a9a6.js +4 -4
  239. package/dist/esm/index.js +4 -471
  240. package/dist/esm/index.js.map +1 -1
  241. package/dist/esm/loader.js +1 -1
  242. package/dist/esm/native.js +1 -1
  243. package/dist/esm/nv-alert.entry.js +5 -5
  244. package/dist/esm/nv-alert.entry.js.map +1 -1
  245. package/dist/esm/nv-avatar.entry.js +1 -1
  246. package/dist/esm/nv-badge_2.entry.js +17 -8
  247. package/dist/esm/nv-badge_2.entry.js.map +1 -1
  248. package/dist/esm/nv-button.entry.js +1 -1
  249. package/dist/esm/nv-calendar.entry.js +841 -842
  250. package/dist/esm/nv-calendar.entry.js.map +1 -1
  251. package/dist/esm/nv-datagrid.entry.js +376 -39
  252. package/dist/esm/nv-datagrid.entry.js.map +1 -1
  253. package/dist/esm/nv-dialog.entry.js +18 -12
  254. package/dist/esm/nv-dialog.entry.js.map +1 -1
  255. package/dist/esm/nv-dialogfooter_2.entry.js +1 -1
  256. package/dist/esm/nv-fielddate.entry.js +8 -17
  257. package/dist/esm/nv-fielddate.entry.js.map +1 -1
  258. package/dist/esm/nv-fielddaterange.entry.js +26 -28
  259. package/dist/esm/nv-fielddaterange.entry.js.map +1 -1
  260. package/dist/esm/nv-fielddropdown.entry.js +12 -5
  261. package/dist/esm/nv-fielddropdown.entry.js.map +1 -1
  262. package/dist/esm/nv-fielddropdownitem.entry.js +1 -1
  263. package/dist/esm/nv-fieldmultiselect.entry.js +10 -4
  264. package/dist/esm/nv-fieldmultiselect.entry.js.map +1 -1
  265. package/dist/esm/nv-fieldnumber.entry.js +8 -4
  266. package/dist/esm/nv-fieldnumber.entry.js.map +1 -1
  267. package/dist/esm/nv-fieldpassword.entry.js +8 -4
  268. package/dist/esm/nv-fieldpassword.entry.js.map +1 -1
  269. package/dist/esm/nv-fieldradio.entry.js +3 -3
  270. package/dist/esm/nv-fieldselect.entry.js +10 -6
  271. package/dist/esm/nv-fieldselect.entry.js.map +1 -1
  272. package/dist/esm/nv-fieldtext.entry.js +8 -4
  273. package/dist/esm/nv-fieldtext.entry.js.map +1 -1
  274. package/dist/esm/nv-fieldtextarea.entry.js +8 -4
  275. package/dist/esm/nv-fieldtextarea.entry.js.map +1 -1
  276. package/dist/esm/nv-fieldtime.entry.js +15 -12
  277. package/dist/esm/nv-fieldtime.entry.js.map +1 -1
  278. package/dist/esm/nv-icon.entry.js +3 -3
  279. package/dist/esm/nv-icon.entry.js.map +1 -1
  280. package/dist/esm/nv-iconbutton_2.entry.js +2 -2
  281. package/dist/esm/nv-menu.entry.js +3 -1
  282. package/dist/esm/nv-menu.entry.js.map +1 -1
  283. package/dist/esm/nv-menuitem.entry.js +1 -1
  284. package/dist/esm/nv-popover.entry.js +1 -1
  285. package/dist/esm/nv-row.entry.js +1 -1
  286. package/dist/esm/nv-stack.entry.js +1 -1
  287. package/dist/esm/nv-table.entry.js +2 -2
  288. package/dist/esm/nv-table.entry.js.map +1 -1
  289. package/dist/esm/nv-toggle.entry.js +2 -2
  290. package/dist/esm/nv-tooltip.entry.js +1 -1
  291. package/dist/native/index.esm.js +1 -1
  292. package/dist/native/index.esm.js.map +1 -1
  293. package/dist/native/native.css +1 -1
  294. package/dist/native/native.esm.js +1 -1
  295. package/dist/native/native.esm.js.map +1 -1
  296. package/dist/native/{p-b094296d.entry.js → p-08a75cfa.entry.js} +2 -2
  297. package/dist/native/{p-d5cbf5c8.entry.js → p-14c07207.entry.js} +2 -2
  298. package/dist/native/p-1da72182.entry.js +2 -0
  299. package/dist/native/p-1da72182.entry.js.map +1 -0
  300. package/dist/native/p-2523eead.entry.js +2 -0
  301. package/dist/native/p-2523eead.entry.js.map +1 -0
  302. package/dist/native/p-3953464e.entry.js +7 -0
  303. package/dist/native/p-3953464e.entry.js.map +1 -0
  304. package/dist/native/{p-701b5557.entry.js → p-3b7ef609.entry.js} +2 -2
  305. package/dist/native/{p-63e6aed3.entry.js → p-3cd77d82.entry.js} +2 -2
  306. package/dist/native/p-3cd77d82.entry.js.map +1 -0
  307. package/dist/native/p-470588c2.entry.js +13 -0
  308. package/dist/native/p-470588c2.entry.js.map +1 -0
  309. package/dist/native/p-49cac014.entry.js +2 -0
  310. package/dist/native/p-49cac014.entry.js.map +1 -0
  311. package/dist/native/p-4d164ed6.entry.js +2 -0
  312. package/dist/native/p-4d164ed6.entry.js.map +1 -0
  313. package/dist/native/p-4e635fa7.entry.js +2 -0
  314. package/dist/native/p-4e635fa7.entry.js.map +1 -0
  315. package/dist/native/p-5d21532a.entry.js +2 -0
  316. package/dist/native/p-5d21532a.entry.js.map +1 -0
  317. package/dist/native/{p-39bb95ff.entry.js → p-615947e7.entry.js} +2 -2
  318. package/dist/native/{p-bad11367.entry.js → p-656c56f0.entry.js} +2 -2
  319. package/dist/native/p-656c56f0.entry.js.map +1 -0
  320. package/dist/native/{p-fa77a591.entry.js → p-7042ba8a.entry.js} +2 -2
  321. package/dist/native/p-7e154bfd.entry.js +2 -0
  322. package/dist/native/p-7e154bfd.entry.js.map +1 -0
  323. package/dist/native/p-7eba904e.entry.js +2 -0
  324. package/dist/native/p-7eba904e.entry.js.map +1 -0
  325. package/dist/native/{p-6b348684.entry.js → p-7fd4d13d.entry.js} +2 -2
  326. package/dist/native/{p-fb5bddba.entry.js → p-90e6d9dd.entry.js} +2 -2
  327. package/dist/native/p-ae7ab110.entry.js +2 -0
  328. package/dist/native/p-ae7ab110.entry.js.map +1 -0
  329. package/dist/native/{p-f85aca27.entry.js → p-b8b6875d.entry.js} +2 -2
  330. package/dist/native/p-b94d9f0b.entry.js +2 -0
  331. package/dist/native/p-b94d9f0b.entry.js.map +1 -0
  332. package/dist/native/p-c0f79bac.entry.js +2 -0
  333. package/dist/native/p-c0f79bac.entry.js.map +1 -0
  334. package/dist/native/{p-6ff228da.entry.js → p-c67186f8.entry.js} +2 -2
  335. package/dist/native/{p-eee01062.entry.js → p-c71c6f23.entry.js} +2 -2
  336. package/dist/native/p-d9a52884.entry.js +2 -0
  337. package/dist/native/p-d9a52884.entry.js.map +1 -0
  338. package/dist/native/{p-d7a76400.entry.js → p-efe6a46c.entry.js} +2 -2
  339. package/dist/native/p-f2ef6771.entry.js +2 -0
  340. package/dist/native/p-f5f68992.entry.js +2 -0
  341. package/dist/native/p-f5f68992.entry.js.map +1 -0
  342. package/dist/native/{p-59768ee5.js → p-f85c08f1.js} +2 -2
  343. package/dist/native/p-f85c08f1.js.map +1 -0
  344. package/dist/native/p-fc97f071.entry.js +2 -0
  345. package/dist/native/p-fc97f071.entry.js.map +1 -0
  346. package/dist/types/components/nv-alert/nv-alert.d.ts +1 -1
  347. package/dist/types/components/nv-badge/nv-badge.d.ts +11 -3
  348. package/dist/types/components/nv-calendar/nv-calendar.d.ts +69 -107
  349. package/dist/types/components/nv-calendar/nv-calendar.utils.d.ts +60 -0
  350. package/dist/types/components/nv-calendar/test/nv-calendar.utils.test.d.ts +1 -0
  351. package/dist/types/components/nv-datagrid/nv-datagrid.d.ts +47 -10
  352. package/dist/types/components/nv-dialog/nv-dialog.d.ts +4 -0
  353. package/dist/types/components/nv-fielddate/nv-fielddate.d.ts +6 -7
  354. package/dist/types/components/nv-fielddaterange/nv-fielddaterange.d.ts +13 -12
  355. package/dist/types/components/nv-fielddropdown/nv-fielddropdown.d.ts +4 -0
  356. package/dist/types/components/nv-fieldmultiselect/nv-fieldmultiselect.d.ts +4 -0
  357. package/dist/types/components/nv-fieldnumber/nv-fieldnumber.d.ts +4 -0
  358. package/dist/types/components/nv-fieldpassword/nv-fieldpassword.d.ts +4 -0
  359. package/dist/types/components/nv-fieldselect/nv-fieldselect.d.ts +4 -0
  360. package/dist/types/components/nv-fieldtext/nv-fieldtext.d.ts +4 -0
  361. package/dist/types/components/nv-fieldtextarea/nv-fieldtextarea.d.ts +4 -0
  362. package/dist/types/components/nv-icon/nv-icons.d.ts +1 -1
  363. package/dist/types/components/nv-table/nv-table.d.ts +13 -2
  364. package/dist/types/components.d.ts +269 -116
  365. package/dist/types/index.d.ts +0 -2
  366. package/dist/types/utils/constants.d.ts +9 -0
  367. package/dist/vscode-data.json +221 -1587
  368. package/hydrate/index.js +1466 -1063
  369. package/hydrate/index.mjs +1466 -1063
  370. package/package.json +1 -1
  371. package/dist/cjs/constants-bcd6b2e2.js.map +0 -1
  372. package/dist/collection/interfaces/actionEvent.js +0 -2
  373. package/dist/collection/interfaces/actionEvent.js.map +0 -1
  374. package/dist/collection/interfaces/calendarShortcut.js +0 -2
  375. package/dist/collection/interfaces/calendarShortcut.js.map +0 -1
  376. package/dist/collection/interfaces/dateRange.js +0 -2
  377. package/dist/collection/interfaces/dateRange.js.map +0 -1
  378. package/dist/components/p-373926aa.js +0 -177
  379. package/dist/components/p-373926aa.js.map +0 -1
  380. package/dist/components/p-591730e7.js +0 -88
  381. package/dist/components/p-591730e7.js.map +0 -1
  382. package/dist/components/p-8348db09.js.map +0 -1
  383. package/dist/components/p-f331117c.js +0 -1133
  384. package/dist/components/p-f331117c.js.map +0 -1
  385. package/dist/esm/constants-98e2dcc2.js.map +0 -1
  386. package/dist/native/p-0ee428d5.entry.js +0 -2
  387. package/dist/native/p-0ee428d5.entry.js.map +0 -1
  388. package/dist/native/p-2691e02d.entry.js +0 -2
  389. package/dist/native/p-37f0210e.entry.js +0 -2
  390. package/dist/native/p-37f0210e.entry.js.map +0 -1
  391. package/dist/native/p-4a440970.entry.js +0 -2
  392. package/dist/native/p-4a440970.entry.js.map +0 -1
  393. package/dist/native/p-4ae26462.entry.js +0 -7
  394. package/dist/native/p-4ae26462.entry.js.map +0 -1
  395. package/dist/native/p-4d9c4618.entry.js +0 -2
  396. package/dist/native/p-4d9c4618.entry.js.map +0 -1
  397. package/dist/native/p-59768ee5.js.map +0 -1
  398. package/dist/native/p-59e0bd2b.entry.js +0 -2
  399. package/dist/native/p-59e0bd2b.entry.js.map +0 -1
  400. package/dist/native/p-5c00f092.entry.js +0 -2
  401. package/dist/native/p-5c00f092.entry.js.map +0 -1
  402. package/dist/native/p-63e6aed3.entry.js.map +0 -1
  403. package/dist/native/p-7f5eb2ac.entry.js +0 -2
  404. package/dist/native/p-7f5eb2ac.entry.js.map +0 -1
  405. package/dist/native/p-84a73e2a.entry.js +0 -2
  406. package/dist/native/p-84a73e2a.entry.js.map +0 -1
  407. package/dist/native/p-93dc2f47.entry.js +0 -2
  408. package/dist/native/p-93dc2f47.entry.js.map +0 -1
  409. package/dist/native/p-9a267f16.entry.js +0 -13
  410. package/dist/native/p-9a267f16.entry.js.map +0 -1
  411. package/dist/native/p-9d6431c7.entry.js +0 -2
  412. package/dist/native/p-9d6431c7.entry.js.map +0 -1
  413. package/dist/native/p-b2ce83ad.entry.js +0 -2
  414. package/dist/native/p-b2ce83ad.entry.js.map +0 -1
  415. package/dist/native/p-bad11367.entry.js.map +0 -1
  416. package/dist/native/p-e1a4f776.entry.js +0 -2
  417. package/dist/native/p-e1a4f776.entry.js.map +0 -1
  418. package/dist/native/p-e49bbd02.entry.js +0 -2
  419. package/dist/native/p-e49bbd02.entry.js.map +0 -1
  420. package/dist/native/p-f6bdc270.entry.js +0 -2
  421. package/dist/native/p-f6bdc270.entry.js.map +0 -1
  422. package/dist/types/interfaces/actionEvent.d.ts +0 -13
  423. package/dist/types/interfaces/calendarShortcut.d.ts +0 -17
  424. package/dist/types/interfaces/dateRange.d.ts +0 -13
  425. /package/dist/native/{p-b094296d.entry.js.map → p-08a75cfa.entry.js.map} +0 -0
  426. /package/dist/native/{p-d5cbf5c8.entry.js.map → p-14c07207.entry.js.map} +0 -0
  427. /package/dist/native/{p-701b5557.entry.js.map → p-3b7ef609.entry.js.map} +0 -0
  428. /package/dist/native/{p-39bb95ff.entry.js.map → p-615947e7.entry.js.map} +0 -0
  429. /package/dist/native/{p-fa77a591.entry.js.map → p-7042ba8a.entry.js.map} +0 -0
  430. /package/dist/native/{p-6b348684.entry.js.map → p-7fd4d13d.entry.js.map} +0 -0
  431. /package/dist/native/{p-fb5bddba.entry.js.map → p-90e6d9dd.entry.js.map} +0 -0
  432. /package/dist/native/{p-f85aca27.entry.js.map → p-b8b6875d.entry.js.map} +0 -0
  433. /package/dist/native/{p-6ff228da.entry.js.map → p-c67186f8.entry.js.map} +0 -0
  434. /package/dist/native/{p-eee01062.entry.js.map → p-c71c6f23.entry.js.map} +0 -0
  435. /package/dist/native/{p-d7a76400.entry.js.map → p-efe6a46c.entry.js.map} +0 -0
  436. /package/dist/native/{p-2691e02d.entry.js.map → p-f2ef6771.entry.js.map} +0 -0
@@ -11,6 +11,10 @@ nv-fielddaterange {
11
11
  align-items: flex-start;
12
12
  gap: var(--form-gap-y);
13
13
  box-sizing: border-box;
14
+ max-width: 480px;
15
+ }
16
+ nv-fielddaterange[fluid]:not([fluid=false]) {
17
+ max-width: unset;
14
18
  }
15
19
  nv-fielddaterange[readonly]:not([readonly=false]) {
16
20
  --nv-field-border-default: var(--components-form-field-border-readonly);
@@ -90,10 +94,6 @@ nv-fielddaterange .input-wrapper .input-container {
90
94
  opacity: var(--components-form-opacity-default, 1);
91
95
  background: var(--nv-field-background);
92
96
  transition: all 150ms ease-out;
93
- position: relative;
94
- flex: 1;
95
- min-width: 0;
96
- padding-right: 32px;
97
97
  }
98
98
  nv-fielddaterange .input-wrapper .input-container:hover {
99
99
  border-color: var(--nv-field-border-hover);
@@ -125,6 +125,7 @@ nv-fielddaterange .input-wrapper .input-container input {
125
125
  font-weight: 500;
126
126
  line-height: var(--form-field-line-height);
127
127
  width: 100%;
128
+ width: 100%;
128
129
  }
129
130
  nv-fielddaterange .input-wrapper .input-container input:focus {
130
131
  outline: none;
@@ -139,15 +140,17 @@ nv-fielddaterange .input-wrapper .input-container input::placeholder {
139
140
  font-weight: 400;
140
141
  line-height: var(--form-field-line-height);
141
142
  }
143
+ nv-fielddaterange .input-wrapper .input-container > nv-iconbutton {
144
+ border: 0px;
145
+ border-radius: 0px;
146
+ }
147
+ nv-fielddaterange .input-wrapper .input-container > nv-iconbutton:focus-visible {
148
+ border-radius: var(--button-md-border-radius);
149
+ outline-offset: -3px;
150
+ }
142
151
  nv-fielddaterange .input-wrapper .input-container nv-icon.validation {
143
152
  color: var(--nv-field-border-default);
144
153
  }
145
- nv-fielddaterange .input-wrapper .input-container .toggle-calendar-icon {
146
- position: absolute;
147
- right: 0;
148
- top: 50%;
149
- transform: translateY(-50%);
150
- }
151
154
  nv-fielddaterange .description {
152
155
  align-self: stretch;
153
156
  color: var(--components-form-text-description-default);
@@ -169,7 +172,6 @@ nv-fielddaterange .range-inputs {
169
172
  display: flex;
170
173
  align-items: center;
171
174
  gap: 8px;
172
- flex: 1;
173
175
  }
174
176
  nv-fielddaterange .range-inputs input {
175
177
  flex: 1;
@@ -81,6 +81,14 @@ const NvFielddropdownDocs = {
81
81
  },
82
82
  template: (h("nv-fielddropdown", { "data-storybook-args": true }, h("ul", { slot: "content" }, h("nv-fielddropdownitem", { label: "Item 1" })))),
83
83
  },
84
+ {
85
+ name: nameof(x => x.fluid),
86
+ args: {
87
+ label: 'Fluid Dropdown',
88
+ fluid: true,
89
+ },
90
+ template: (h("nv-fielddropdown", { "data-storybook-args": true }, h("ul", { slot: "content" }, h("nv-fielddropdownitem", { label: "Item 1" })))),
91
+ },
84
92
  {
85
93
  name: 'PreSelected',
86
94
  args: {
@@ -1 +1 @@
1
- {"version":3,"file":"nv-fielddropdown.docs.js","sourceRoot":"","sources":["../../../src/components/nv-fielddropdown/nv-fielddropdown.docs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAGlC,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEjD,MAAM,mBAAmB,GAAyC;IAChE,SAAS,EAAE,kBAAkB;IAC7B,aAAa,EAAE,CAAC,sBAAsB,EAAE,WAAW,EAAE,SAAS,CAAC;IAC/D,OAAO,EAAE;QACP;YACE,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,CACR;gBAC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,EAAE,QAAQ,EAAE;iBACrC;aACF;YACD,QAAQ,EAAE,sDAAyD;SACpE;KACF;CACF,CAAC;AAEF,eAAe,mBAAmB,CAAC","sourcesContent":["import { h } from '@stencil/core';\nimport type { NovaDocs } from '../../nova-docs';\nimport { Components } from '../../components';\nimport { nameof } from '../../utils/class.utils';\n\nconst NvFielddropdownDocs: NovaDocs<Components.NvFielddropdown> = {\n component: 'nv-fielddropdown',\n subcomponents: ['nv-fielddropdownitem', 'nv-avatar', 'nv-icon'],\n stories: [\n {\n name: 'Default',\n template: (\n <nv-fielddropdown data-storybook-args>\n <ul slot=\"content\">\n <nv-fielddropdownitem\n value=\"item_1\"\n label=\"Item 1\"\n ></nv-fielddropdownitem>\n <nv-fielddropdownitem\n value=\"item_2\"\n label=\"Item 2\"\n ></nv-fielddropdownitem>\n <nv-fielddropdownitem\n value=\"item_3\"\n label=\"Item 3\"\n ></nv-fielddropdownitem>\n <nv-fielddropdownitem\n value=\"disabled\"\n label=\"Item disabled\"\n disabled\n ></nv-fielddropdownitem>\n </ul>\n </nv-fielddropdown>\n ),\n },\n {\n name: nameof<Components.NvFielddropdown>(x => x.filterable),\n args: {\n label: 'Dropdown Label',\n filterable: true,\n },\n template: (\n <nv-fielddropdown data-storybook-args>\n <ul slot=\"content\">\n <nv-fielddropdownitem label=\"Item 1\"></nv-fielddropdownitem>\n <nv-fielddropdownitem label=\"Item 2\"></nv-fielddropdownitem>\n <nv-fielddropdownitem label=\"Item 3\"></nv-fielddropdownitem>\n <nv-fielddropdownitem\n label=\"Item disabled\"\n disabled\n ></nv-fielddropdownitem>\n </ul>\n </nv-fielddropdown>\n ),\n },\n {\n name: nameof<Components.NvFielddropdown>(x => x.label),\n args: {\n label: 'filterable Dropdown',\n },\n template: (\n <nv-fielddropdown data-storybook-args>\n <ul slot=\"content\">\n <nv-fielddropdownitem label=\"Item 1\"></nv-fielddropdownitem>\n </ul>\n </nv-fielddropdown>\n ),\n },\n {\n name: nameof<Components.NvFielddropdown>(x => x.description),\n args: {\n label: 'Dropdown with Description',\n description: 'Description will show here',\n },\n template: (\n <nv-fielddropdown data-storybook-args>\n <ul slot=\"content\">\n <nv-fielddropdownitem label=\"Item 1\"></nv-fielddropdownitem>\n </ul>\n </nv-fielddropdown>\n ),\n },\n {\n name: nameof<Components.NvFielddropdown>(x => x.placeholder),\n args: {\n label: 'Dropdown with Placeholder',\n placeholder: 'Select an option...',\n },\n template: (\n <nv-fielddropdown data-storybook-args>\n <ul slot=\"content\">\n <nv-fielddropdownitem label=\"Item 1\"></nv-fielddropdownitem>\n </ul>\n </nv-fielddropdown>\n ),\n },\n {\n name: nameof<Components.NvFielddropdown>(x => x.disabled),\n args: {\n label: 'Disabled Dropdown',\n disabled: true,\n },\n template: (\n <nv-fielddropdown data-storybook-args>\n <ul slot=\"content\">\n <nv-fielddropdownitem label=\"Item 1\"></nv-fielddropdownitem>\n </ul>\n </nv-fielddropdown>\n ),\n },\n {\n name: nameof<Components.NvFielddropdown>(x => x.required),\n args: {\n label: 'Required Dropdown',\n required: true,\n },\n template: (\n <nv-fielddropdown data-storybook-args>\n <ul slot=\"content\">\n <nv-fielddropdownitem label=\"Item 1\"></nv-fielddropdownitem>\n </ul>\n </nv-fielddropdown>\n ),\n },\n {\n name: 'Dividers',\n args: {\n label: 'Dropdown with dividers',\n filterable: true,\n },\n template: (\n <nv-fielddropdown data-storybook-args>\n <ul slot=\"content\">\n <nv-fielddropdownitem label=\"Item 1\"></nv-fielddropdownitem>\n <hr />\n <nv-fielddropdownitem label=\"Item 2\"></nv-fielddropdownitem>\n <hr />\n <nv-fielddropdownitem label=\"Item 3\"></nv-fielddropdownitem>\n <nv-fielddropdownitem\n label=\"Item disabled\"\n disabled\n ></nv-fielddropdownitem>\n </ul>\n </nv-fielddropdown>\n ),\n },\n {\n name: nameof<Components.NvFielddropdown>(x => x.error),\n args: {\n label: 'Dropdown with Error',\n error: true,\n },\n template: (\n <nv-fielddropdown data-storybook-args>\n <ul slot=\"content\">\n <nv-fielddropdownitem label=\"Item 1\"></nv-fielddropdownitem>\n </ul>\n </nv-fielddropdown>\n ),\n },\n {\n name: nameof<Components.NvFielddropdown>(x => x.errorDescription),\n args: {\n label: 'Dropdown with Error Description',\n description: 'Ensure you select an option.',\n error: true,\n errorDescription: 'This dropdown has an error.',\n },\n template: (\n <nv-fielddropdown data-storybook-args>\n <ul slot=\"content\">\n <nv-fielddropdownitem label=\"Item 1\"></nv-fielddropdownitem>\n </ul>\n </nv-fielddropdown>\n ),\n },\n {\n name: 'PreSelected',\n args: {\n label: 'Dropdown with Pre-selected Value',\n value: 'Item 2',\n },\n template: (\n <nv-fielddropdown data-storybook-args filterable>\n <ul slot=\"content\">\n <nv-fielddropdownitem\n label=\"Item 1\"\n selected\n ></nv-fielddropdownitem>\n <nv-fielddropdownitem label=\"Item 2\"></nv-fielddropdownitem>\n <nv-fielddropdownitem label=\"Item 3\"></nv-fielddropdownitem>\n <nv-fielddropdownitem\n label=\"Item disabled\"\n disabled\n ></nv-fielddropdownitem>\n </ul>\n </nv-fielddropdown>\n ),\n },\n {\n name: 'DefaultSlot',\n args: {\n label: 'DefaultSlot Dropdown',\n description: 'This is a DefaultSlot dropdown.',\n placeholder: 'Select an option...',\n },\n template: (\n <nv-fielddropdown data-storybook-args>\n <ul slot=\"content\">\n <nv-fielddropdownitem class=\"flex gap-2\" value=\"AB\">\n <nv-avatar initials=\"AB\" size=\"xs\"></nv-avatar>\n <span>Custom Item Text</span>\n </nv-fielddropdownitem>\n <nv-fielddropdownitem class=\"flex gap-2\" value=\"CD\">\n <nv-avatar initials=\"CD\" size=\"xs\"></nv-avatar>\n <span>Custom Item Text</span>\n </nv-fielddropdownitem>\n <nv-fielddropdownitem class=\"flex gap-2\" value=\"EF\">\n <nv-avatar initials=\"EF\" size=\"xs\"></nv-avatar>\n <span>Custom Item Text</span>\n </nv-fielddropdownitem>\n </ul>\n </nv-fielddropdown>\n ),\n },\n {\n name: 'DefaultSlotFiltereable',\n args: {\n label: 'Default Slot Filtereable Dropdown',\n description: 'This is a Default Slot Filtereable dropdown.',\n placeholder: 'Select an option...',\n filterable: true,\n },\n template: (\n <nv-fielddropdown data-storybook-args>\n <ul slot=\"content\">\n <nv-fielddropdownitem class=\"flex gap-2\" value=\"AB\">\n <nv-avatar initials=\"AB\" size=\"xs\"></nv-avatar>\n <span>Custom Item Text</span>\n </nv-fielddropdownitem>\n <nv-fielddropdownitem class=\"flex gap-2\" value=\"CD\">\n <nv-avatar initials=\"CD\" size=\"xs\"></nv-avatar>\n <span>Custom Item Text</span>\n </nv-fielddropdownitem>\n <nv-fielddropdownitem class=\"flex gap-2\" value=\"EF\">\n <nv-avatar initials=\"EF\" size=\"xs\"></nv-avatar>\n <span>Custom Item Text</span>\n </nv-fielddropdownitem>\n </ul>\n </nv-fielddropdown>\n ),\n },\n {\n name: nameof<Components.NvFielddropdown>(x => x.open),\n args: {\n label: 'Dropdown Opened',\n open: true,\n },\n template: (\n <nv-fielddropdown data-storybook-args>\n <ul slot=\"content\">\n <nv-fielddropdownitem label=\"Item 1\"></nv-fielddropdownitem>\n <nv-fielddropdownitem label=\"Item 2\"></nv-fielddropdownitem>\n <nv-fielddropdownitem label=\"Item 3\"></nv-fielddropdownitem>\n </ul>\n </nv-fielddropdown>\n ),\n },\n {\n name: nameof<Components.NvFielddropdown>(x => x.value),\n args: {\n label: 'Dropdown with Pre-selected Value',\n value: 'Item 2',\n },\n template: (\n <nv-fielddropdown data-storybook-args>\n <ul slot=\"content\">\n <nv-fielddropdownitem label=\"Item 1\"></nv-fielddropdownitem>\n <nv-fielddropdownitem label=\"Item 2\"></nv-fielddropdownitem>\n <nv-fielddropdownitem label=\"Item 3\"></nv-fielddropdownitem>\n <nv-fielddropdownitem\n label=\"Item disabled\"\n disabled\n ></nv-fielddropdownitem>\n </ul>\n </nv-fielddropdown>\n ),\n },\n {\n name: nameof<Components.NvFielddropdown>(x => x.readonly),\n args: {\n label: 'Readonly Dropdown',\n readonly: true,\n },\n template: (\n <nv-fielddropdown data-storybook-args>\n <ul slot=\"content\">\n <nv-fielddropdownitem label=\"Item 1\"></nv-fielddropdownitem>\n <nv-fielddropdownitem label=\"Item 2\"></nv-fielddropdownitem>\n <nv-fielddropdownitem label=\"Item 3\"></nv-fielddropdownitem>\n </ul>\n </nv-fielddropdown>\n ),\n },\n {\n name: nameof<Components.NvFielddropdown>(x => x.emptyResult),\n args: {\n label: 'Dropdown with Empty Result Text',\n filterable: true,\n open: true,\n value: 'search for a inexistent item',\n emptyResult: 'No items found',\n },\n template: (\n <nv-fielddropdown data-storybook-args>\n <ul slot=\"content\">\n <nv-fielddropdownitem label=\"Item 1\"></nv-fielddropdownitem>\n </ul>\n </nv-fielddropdown>\n ),\n },\n {\n name: nameof<Components.NvFielddropdown>(x => x.autofocus),\n args: {\n label: 'Autofocus',\n autofocus: true,\n },\n template: <nv-fielddropdown data-storybook-args></nv-fielddropdown>,\n },\n {\n name: 'Options Array',\n args: {\n label: 'Dropdown with Options Array',\n options: [\n { label: 'Paris', value: 'paris' },\n { label: 'London', value: 'london' },\n { label: 'New York', value: 'ny' },\n { label: 'Tokyo', value: 'tokyo', disabled: true },\n { label: 'Berlin', value: 'berlin' },\n ],\n },\n template: <nv-fielddropdown data-storybook-args></nv-fielddropdown>,\n },\n {\n name: 'Options Array Preselected',\n args: {\n label: 'Preselected Item Using Options Array',\n options: [\n { label: 'Paris', value: 'paris' },\n { label: 'London', value: 'london', selected: true },\n { label: 'New York', value: 'ny' },\n { label: 'Tokyo', value: 'tokyo', disabled: true },\n { label: 'Berlin', value: 'berlin' },\n ],\n },\n template: <nv-fielddropdown data-storybook-args></nv-fielddropdown>,\n },\n ],\n};\n\nexport default NvFielddropdownDocs;\n"]}
1
+ {"version":3,"file":"nv-fielddropdown.docs.js","sourceRoot":"","sources":["../../../src/components/nv-fielddropdown/nv-fielddropdown.docs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAGlC,OAAO,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,KAAK,EAAE,QAAQ,EAAE;iBACrC;aACF;YACD,QAAQ,EAAE,sDAAyD;SACpE;QACD;YACE,IAAI,EAAE,2BAA2B;YACjC,IAAI,EAAE;gBACJ,KAAK,EAAE,sCAAsC;gBAC7C,OAAO,EAAE;oBACP,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;oBAClC,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;oBACpD,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE;oBAClC,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE;oBAClD,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;iBACrC;aACF;YACD,QAAQ,EAAE,sDAAyD;SACpE;KACF;CACF,CAAC;AAEF,eAAe,mBAAmB,CAAC","sourcesContent":["import { h } from '@stencil/core';\nimport type { NovaDocs } from '../../nova-docs';\nimport { Components } from '../../components';\nimport { nameof } from '../../utils/class.utils';\n\nconst NvFielddropdownDocs: NovaDocs<Components.NvFielddropdown> = {\n component: 'nv-fielddropdown',\n subcomponents: ['nv-fielddropdownitem', 'nv-avatar', 'nv-icon'],\n stories: [\n {\n name: 'Default',\n template: (\n <nv-fielddropdown data-storybook-args>\n <ul slot=\"content\">\n <nv-fielddropdownitem\n value=\"item_1\"\n label=\"Item 1\"\n ></nv-fielddropdownitem>\n <nv-fielddropdownitem\n value=\"item_2\"\n label=\"Item 2\"\n ></nv-fielddropdownitem>\n <nv-fielddropdownitem\n value=\"item_3\"\n label=\"Item 3\"\n ></nv-fielddropdownitem>\n <nv-fielddropdownitem\n value=\"disabled\"\n label=\"Item disabled\"\n disabled\n ></nv-fielddropdownitem>\n </ul>\n </nv-fielddropdown>\n ),\n },\n {\n name: nameof<Components.NvFielddropdown>(x => x.filterable),\n args: {\n label: 'Dropdown Label',\n filterable: true,\n },\n template: (\n <nv-fielddropdown data-storybook-args>\n <ul slot=\"content\">\n <nv-fielddropdownitem label=\"Item 1\"></nv-fielddropdownitem>\n <nv-fielddropdownitem label=\"Item 2\"></nv-fielddropdownitem>\n <nv-fielddropdownitem label=\"Item 3\"></nv-fielddropdownitem>\n <nv-fielddropdownitem\n label=\"Item disabled\"\n disabled\n ></nv-fielddropdownitem>\n </ul>\n </nv-fielddropdown>\n ),\n },\n {\n name: nameof<Components.NvFielddropdown>(x => x.label),\n args: {\n label: 'filterable Dropdown',\n },\n template: (\n <nv-fielddropdown data-storybook-args>\n <ul slot=\"content\">\n <nv-fielddropdownitem label=\"Item 1\"></nv-fielddropdownitem>\n </ul>\n </nv-fielddropdown>\n ),\n },\n {\n name: nameof<Components.NvFielddropdown>(x => x.description),\n args: {\n label: 'Dropdown with Description',\n description: 'Description will show here',\n },\n template: (\n <nv-fielddropdown data-storybook-args>\n <ul slot=\"content\">\n <nv-fielddropdownitem label=\"Item 1\"></nv-fielddropdownitem>\n </ul>\n </nv-fielddropdown>\n ),\n },\n {\n name: nameof<Components.NvFielddropdown>(x => x.placeholder),\n args: {\n label: 'Dropdown with Placeholder',\n placeholder: 'Select an option...',\n },\n template: (\n <nv-fielddropdown data-storybook-args>\n <ul slot=\"content\">\n <nv-fielddropdownitem label=\"Item 1\"></nv-fielddropdownitem>\n </ul>\n </nv-fielddropdown>\n ),\n },\n {\n name: nameof<Components.NvFielddropdown>(x => x.disabled),\n args: {\n label: 'Disabled Dropdown',\n disabled: true,\n },\n template: (\n <nv-fielddropdown data-storybook-args>\n <ul slot=\"content\">\n <nv-fielddropdownitem label=\"Item 1\"></nv-fielddropdownitem>\n </ul>\n </nv-fielddropdown>\n ),\n },\n {\n name: nameof<Components.NvFielddropdown>(x => x.required),\n args: {\n label: 'Required Dropdown',\n required: true,\n },\n template: (\n <nv-fielddropdown data-storybook-args>\n <ul slot=\"content\">\n <nv-fielddropdownitem label=\"Item 1\"></nv-fielddropdownitem>\n </ul>\n </nv-fielddropdown>\n ),\n },\n {\n name: 'Dividers',\n args: {\n label: 'Dropdown with dividers',\n filterable: true,\n },\n template: (\n <nv-fielddropdown data-storybook-args>\n <ul slot=\"content\">\n <nv-fielddropdownitem label=\"Item 1\"></nv-fielddropdownitem>\n <hr />\n <nv-fielddropdownitem label=\"Item 2\"></nv-fielddropdownitem>\n <hr />\n <nv-fielddropdownitem label=\"Item 3\"></nv-fielddropdownitem>\n <nv-fielddropdownitem\n label=\"Item disabled\"\n disabled\n ></nv-fielddropdownitem>\n </ul>\n </nv-fielddropdown>\n ),\n },\n {\n name: nameof<Components.NvFielddropdown>(x => x.error),\n args: {\n label: 'Dropdown with Error',\n error: true,\n },\n template: (\n <nv-fielddropdown data-storybook-args>\n <ul slot=\"content\">\n <nv-fielddropdownitem label=\"Item 1\"></nv-fielddropdownitem>\n </ul>\n </nv-fielddropdown>\n ),\n },\n {\n name: nameof<Components.NvFielddropdown>(x => x.errorDescription),\n args: {\n label: 'Dropdown with Error Description',\n description: 'Ensure you select an option.',\n error: true,\n errorDescription: 'This dropdown has an error.',\n },\n template: (\n <nv-fielddropdown data-storybook-args>\n <ul slot=\"content\">\n <nv-fielddropdownitem label=\"Item 1\"></nv-fielddropdownitem>\n </ul>\n </nv-fielddropdown>\n ),\n },\n {\n name: nameof<Components.NvFielddropdown>(x => x.fluid),\n args: {\n label: 'Fluid Dropdown',\n fluid: true,\n },\n template: (\n <nv-fielddropdown data-storybook-args>\n <ul slot=\"content\">\n <nv-fielddropdownitem label=\"Item 1\"></nv-fielddropdownitem>\n </ul>\n </nv-fielddropdown>\n ),\n },\n {\n name: 'PreSelected',\n args: {\n label: 'Dropdown with Pre-selected Value',\n value: 'Item 2',\n },\n template: (\n <nv-fielddropdown data-storybook-args filterable>\n <ul slot=\"content\">\n <nv-fielddropdownitem\n label=\"Item 1\"\n selected\n ></nv-fielddropdownitem>\n <nv-fielddropdownitem label=\"Item 2\"></nv-fielddropdownitem>\n <nv-fielddropdownitem label=\"Item 3\"></nv-fielddropdownitem>\n <nv-fielddropdownitem\n label=\"Item disabled\"\n disabled\n ></nv-fielddropdownitem>\n </ul>\n </nv-fielddropdown>\n ),\n },\n {\n name: 'DefaultSlot',\n args: {\n label: 'DefaultSlot Dropdown',\n description: 'This is a DefaultSlot dropdown.',\n placeholder: 'Select an option...',\n },\n template: (\n <nv-fielddropdown data-storybook-args>\n <ul slot=\"content\">\n <nv-fielddropdownitem class=\"flex gap-2\" value=\"AB\">\n <nv-avatar initials=\"AB\" size=\"xs\"></nv-avatar>\n <span>Custom Item Text</span>\n </nv-fielddropdownitem>\n <nv-fielddropdownitem class=\"flex gap-2\" value=\"CD\">\n <nv-avatar initials=\"CD\" size=\"xs\"></nv-avatar>\n <span>Custom Item Text</span>\n </nv-fielddropdownitem>\n <nv-fielddropdownitem class=\"flex gap-2\" value=\"EF\">\n <nv-avatar initials=\"EF\" size=\"xs\"></nv-avatar>\n <span>Custom Item Text</span>\n </nv-fielddropdownitem>\n </ul>\n </nv-fielddropdown>\n ),\n },\n {\n name: 'DefaultSlotFiltereable',\n args: {\n label: 'Default Slot Filtereable Dropdown',\n description: 'This is a Default Slot Filtereable dropdown.',\n placeholder: 'Select an option...',\n filterable: true,\n },\n template: (\n <nv-fielddropdown data-storybook-args>\n <ul slot=\"content\">\n <nv-fielddropdownitem class=\"flex gap-2\" value=\"AB\">\n <nv-avatar initials=\"AB\" size=\"xs\"></nv-avatar>\n <span>Custom Item Text</span>\n </nv-fielddropdownitem>\n <nv-fielddropdownitem class=\"flex gap-2\" value=\"CD\">\n <nv-avatar initials=\"CD\" size=\"xs\"></nv-avatar>\n <span>Custom Item Text</span>\n </nv-fielddropdownitem>\n <nv-fielddropdownitem class=\"flex gap-2\" value=\"EF\">\n <nv-avatar initials=\"EF\" size=\"xs\"></nv-avatar>\n <span>Custom Item Text</span>\n </nv-fielddropdownitem>\n </ul>\n </nv-fielddropdown>\n ),\n },\n {\n name: nameof<Components.NvFielddropdown>(x => x.open),\n args: {\n label: 'Dropdown Opened',\n open: true,\n },\n template: (\n <nv-fielddropdown data-storybook-args>\n <ul slot=\"content\">\n <nv-fielddropdownitem label=\"Item 1\"></nv-fielddropdownitem>\n <nv-fielddropdownitem label=\"Item 2\"></nv-fielddropdownitem>\n <nv-fielddropdownitem label=\"Item 3\"></nv-fielddropdownitem>\n </ul>\n </nv-fielddropdown>\n ),\n },\n {\n name: nameof<Components.NvFielddropdown>(x => x.value),\n args: {\n label: 'Dropdown with Pre-selected Value',\n value: 'Item 2',\n },\n template: (\n <nv-fielddropdown data-storybook-args>\n <ul slot=\"content\">\n <nv-fielddropdownitem label=\"Item 1\"></nv-fielddropdownitem>\n <nv-fielddropdownitem label=\"Item 2\"></nv-fielddropdownitem>\n <nv-fielddropdownitem label=\"Item 3\"></nv-fielddropdownitem>\n <nv-fielddropdownitem\n label=\"Item disabled\"\n disabled\n ></nv-fielddropdownitem>\n </ul>\n </nv-fielddropdown>\n ),\n },\n {\n name: nameof<Components.NvFielddropdown>(x => x.readonly),\n args: {\n label: 'Readonly Dropdown',\n readonly: true,\n },\n template: (\n <nv-fielddropdown data-storybook-args>\n <ul slot=\"content\">\n <nv-fielddropdownitem label=\"Item 1\"></nv-fielddropdownitem>\n <nv-fielddropdownitem label=\"Item 2\"></nv-fielddropdownitem>\n <nv-fielddropdownitem label=\"Item 3\"></nv-fielddropdownitem>\n </ul>\n </nv-fielddropdown>\n ),\n },\n {\n name: nameof<Components.NvFielddropdown>(x => x.emptyResult),\n args: {\n label: 'Dropdown with Empty Result Text',\n filterable: true,\n open: true,\n value: 'search for a inexistent item',\n emptyResult: 'No items found',\n },\n template: (\n <nv-fielddropdown data-storybook-args>\n <ul slot=\"content\">\n <nv-fielddropdownitem label=\"Item 1\"></nv-fielddropdownitem>\n </ul>\n </nv-fielddropdown>\n ),\n },\n {\n name: nameof<Components.NvFielddropdown>(x => x.autofocus),\n args: {\n label: 'Autofocus',\n autofocus: true,\n },\n template: <nv-fielddropdown data-storybook-args></nv-fielddropdown>,\n },\n {\n name: 'Options Array',\n args: {\n label: 'Dropdown with Options Array',\n options: [\n { label: 'Paris', value: 'paris' },\n { label: 'London', value: 'london' },\n { label: 'New York', value: 'ny' },\n { label: 'Tokyo', value: 'tokyo', disabled: true },\n { label: 'Berlin', value: 'berlin' },\n ],\n },\n template: <nv-fielddropdown data-storybook-args></nv-fielddropdown>,\n },\n {\n name: 'Options Array Preselected',\n args: {\n label: 'Preselected Item Using Options Array',\n options: [\n { label: 'Paris', value: 'paris' },\n { label: 'London', value: 'london', selected: true },\n { label: 'New York', value: 'ny' },\n { label: 'Tokyo', value: 'tokyo', disabled: true },\n { label: 'Berlin', value: 'berlin' },\n ],\n },\n template: <nv-fielddropdown data-storybook-args></nv-fielddropdown>,\n },\n ],\n};\n\nexport default NvFielddropdownDocs;\n"]}
@@ -68,6 +68,10 @@ export class NvFielddropdown {
68
68
  * element.
69
69
  */
70
70
  this.autofocus = false;
71
+ /**
72
+ * Allows the field to stretch and fill the entire width of its container.
73
+ */
74
+ this.fluid = false;
71
75
  //#endregion PROPERTIES
72
76
  /****************************************************************************/
73
77
  //#region STATE
@@ -156,7 +160,10 @@ export class NvFielddropdown {
156
160
  this.open = false;
157
161
  }
158
162
  handleOpenChanged(event) {
159
- this.open = event.detail; // Update `open` based on the popover state
163
+ // Stop propagation to prevent the event from affecting parent components like dialogs
164
+ event.stopPropagation();
165
+ // Update `open` based on the popover state
166
+ this.open = event.detail;
160
167
  }
161
168
  watchValueHandler(newValue) {
162
169
  this.valueChanged.emit(newValue);
@@ -324,9 +331,9 @@ export class NvFielddropdown {
324
331
  //#region RENDER
325
332
  render() {
326
333
  var _a;
327
- return (h(Host, { key: '6c23d4cfd361e1f40a2181db66692eb0d6326bfe', role: "combobox", "aria-expanded": this.open.toString(), "aria-haspopup": "listbox", "aria-label": this.label }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: 'db9a30ece9e669c70b18193b3cc7d14967a5e071', htmlFor: this.inputId }, h("slot", { key: 'b7a721b25b82646d34ce141526775f24a9849f4b', name: "label" }, this.label))), h("nv-popover", { key: '724756cb69b4b6ef8837e6f7f53a65eb42a43b5e', ref: el => (this.popoverElement = el), triggerMode: "controlled", placement: "bottom-start", open: this.open }, h("div", { key: '0092cd2b78234ec2e0cdc70433246a2985b7e57f', class: "input-wrapper", slot: "trigger" }, h("slot", { key: '519c1a407c8309861673b9eadb723edb0c70ae68', name: "before-input" }), h("div", { key: 'd88af43846337d9bfd6aeb4f28ab2dc7e56de4e8', class: "input-container", onClick: this.handleInputContainerClick }, h("slot", { key: '8e91459d89acbf7a1cde5e75c520b11b109e810d', name: "leading-input" }), this.filterable || this.disabled || this.readonly ? (h("input", { "data-scope": "focusable", id: this.inputId, type: "search", ref: e => (this.inputElement = e), autofocus: this.autofocus, autocomplete: this.autocomplete, placeholder: this.placeholder, name: this.name, value: this.getSelectedLabel(), required: this.required, disabled: this.disabled, readOnly: this.readonly, onInput: this.handleInput, onFocus: this.handleInputFocus, onClick: this.handleInputFocus, onKeyDown: this.handleKeyDown })) : (h("p", { "data-scope": "focusable", id: this.inputId, class: "non-filterable-text", onClick: this.handleInputContainerClick, tabIndex: this.disabled ? -1 : 0, onKeyDown: this.handleKeyDown, onFocus: this.handleInputFocus }, this.getSelectedLabel() || this.value || this.placeholder)), this.filterable && this.filterText && this.open && (h("nv-iconbutton", { key: '55efb1100997af6b9b4ee41c489a9e628d36b749', name: "x", size: "md", emphasis: "lower", class: "clear-button", onClick: this.clearFilter, "aria-label": "Clear input" })), this.error && (h("nv-icon", { key: '69cfcac7b21d0e9faf9bad7f306bab187a761758', name: "alert-circle", class: "validation", size: "md" })), h("nv-iconbutton", { key: '5b773edca6a5028eb8cedb42632a9c5b6e8b3d36', "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.togglePopover, tabIndex: this.disabled ? -1 : 0 })), h("slot", { key: 'c225279e1ec938e2fbe672ce02e8d2a79cb7ff1e', name: "after-input" })), h("div", { key: '94905d2f6a0b7faae17540139c0bd2458e4c98ae', slot: "content" }, ((_a = this.options) === null || _a === void 0 ? void 0 : _a.length) > 0 ? (h("ul", null, this.options.map(option => (h("nv-fielddropdownitem", { label: option.label, value: option.value, disabled: option.disabled, selected: option.value === this.value }))))) : (h("slot", { name: "content" })))), (this.description ||
328
- this.el.querySelector('[slot="description"]')) && (h("div", { key: '5d0b74de616aefa056d17cb70fab0d36ab9b41c3', class: "description" }, h("slot", { key: 'bab9d8222164d2227c6024ac2bd5675142ccb964', name: "description" }, this.description))), (this.errorDescription ||
329
- this.el.querySelector('[slot="error-description"]')) && (h("div", { key: '58596e0c753e8bb90f9d21432607427b0a029d64', hidden: !this.error, class: "error-description" }, h("slot", { key: '6062d632aee6e825cd2d17a22180cb24d66e2864', name: "error-description" }, this.errorDescription)))));
334
+ return (h(Host, { key: 'cf5547bf05355ee548804c697fd6a3524d68c1ba', role: "combobox", "aria-expanded": this.open.toString(), "aria-haspopup": "listbox", "aria-label": this.label }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: '76d23fc85b18e8bf4288d4f7bcf47a4af283fc23', htmlFor: this.inputId }, h("slot", { key: 'fe4faee394762bb88feeaea26ae508981cf25f95', name: "label" }, this.label))), h("nv-popover", { key: '477a08c8898de641e707bf34fc1584ad217f8beb', ref: el => (this.popoverElement = el), triggerMode: "controlled", placement: "bottom-start", open: this.open }, h("div", { key: '4154ac008b7868eb231eb951e88dd6feba4a758a', class: "input-wrapper", slot: "trigger" }, h("slot", { key: 'c59d39d2f18c2a5a8a40c2c796ca564f4356168c', name: "before-input" }), h("div", { key: '4eb6163061b5daf3aa4d6afe64970e0e5bf551d6', class: "input-container", onClick: this.handleInputContainerClick }, h("slot", { key: 'b183868757274f389a00a4cd8f745a137d6ead44', name: "leading-input" }), this.filterable || this.disabled || this.readonly ? (h("input", { "data-scope": "focusable", id: this.inputId, type: "search", ref: e => (this.inputElement = e), autofocus: this.autofocus, autocomplete: this.autocomplete, placeholder: this.placeholder, name: this.name, value: this.getSelectedLabel(), required: this.required, disabled: this.disabled, readOnly: this.readonly, onInput: this.handleInput, onFocus: this.handleInputFocus, onClick: this.handleInputFocus, onKeyDown: this.handleKeyDown })) : (h("p", { "data-scope": "focusable", id: this.inputId, class: "non-filterable-text", onClick: this.handleInputContainerClick, tabIndex: this.disabled ? -1 : 0, onKeyDown: this.handleKeyDown, onFocus: this.handleInputFocus }, this.getSelectedLabel() || this.value || this.placeholder)), this.filterable && this.filterText && this.open && (h("nv-iconbutton", { key: 'ca073047dfa1cf558c77fbae2d84e77fd5ae33bf', name: "x", size: "md", emphasis: "lower", class: "clear-button", onClick: this.clearFilter, "aria-label": "Clear input" })), this.error && (h("nv-icon", { key: 'b847592deb061bcc9c2ec6649ba66290da54e1d0', name: "alert-circle", class: "validation", size: "md" })), h("nv-iconbutton", { key: 'f30ddb81d582840918866bdaa8055fcf30cdf9dc', "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.togglePopover, tabIndex: this.disabled ? -1 : 0 })), h("slot", { key: '023464c8dc5c2d502abff1e5738d861eccb31cd7', name: "after-input" })), h("div", { key: '7143961a33d624d653e066e5dc3f74865171303f', slot: "content" }, ((_a = this.options) === null || _a === void 0 ? void 0 : _a.length) > 0 ? (h("ul", null, this.options.map(option => (h("nv-fielddropdownitem", { label: option.label, value: option.value, disabled: option.disabled, selected: option.value === this.value }))))) : (h("slot", { name: "content" })))), (this.description ||
335
+ this.el.querySelector('[slot="description"]')) && (h("div", { key: 'afee31c96dade12087ea2a476ef51dd235c34ad7', class: "description" }, h("slot", { key: '53ca646ce1abc0d2d96764b7e7cf08dcdf908909', name: "description" }, this.description))), (this.errorDescription ||
336
+ this.el.querySelector('[slot="error-description"]')) && (h("div", { key: 'f282d962255459043b865d18c95a328cd5c7b2e8', hidden: !this.error, class: "error-description" }, h("slot", { key: 'c01c9c62d1fb43c469b271f1e5f5ac5c401b112e', name: "error-description" }, this.errorDescription)))));
330
337
  }
331
338
  static get is() { return "nv-fielddropdown"; }
332
339
  static get formAssociated() { return true; }
@@ -687,6 +694,26 @@ export class NvFielddropdown {
687
694
  "attribute": "autofocus",
688
695
  "reflect": true,
689
696
  "defaultValue": "false"
697
+ },
698
+ "fluid": {
699
+ "type": "boolean",
700
+ "mutable": false,
701
+ "complexType": {
702
+ "original": "boolean",
703
+ "resolved": "boolean",
704
+ "references": {}
705
+ },
706
+ "required": false,
707
+ "optional": false,
708
+ "docs": {
709
+ "tags": [],
710
+ "text": "Allows the field to stretch and fill the entire width of its container."
711
+ },
712
+ "getter": false,
713
+ "setter": false,
714
+ "attribute": "fluid",
715
+ "reflect": true,
716
+ "defaultValue": "false"
690
717
  }
691
718
  };
692
719
  }
@@ -1 +1 @@
1
- {"version":3,"file":"nv-fielddropdown.js","sourceRoot":"","sources":["../../../src/components/nv-fielddropdown/nv-fielddropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,OAAO,EACP,IAAI,EACJ,KAAK,EACL,MAAM,EACN,KAAK,EAEL,KAAK,EACL,MAAM,GACP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AAIpC;;;;;;;;GAQG;AAOH,MAAM,OAAO,eAAe;IAN5B;QAWE,8EAA8E;QAC9E,oBAAoB;QAEpB;;;;;WAKG;QAEM,YAAO,GAAW,MAAM,EAAE,CAAC;QAoCpC;;WAEG;QAEH,SAAI,GAAY,KAAK,CAAC;QAEtB;;;;;WAKG;QAEM,iBAAY,GAA+B,KAAK,CAAC;QAU1D;;;WAGG;QAEM,aAAQ,GAAY,KAAK,CAAC;QAE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mBAAmB;gBACjD,6DAAM,IAAI,EAAC,mBAAmB,IAAE,IAAI,CAAC,gBAAgB,CAAQ,CACzD,CACP,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import {\n Component,\n Host,\n h,\n Element,\n Prop,\n State,\n Listen,\n Event,\n EventEmitter,\n Watch,\n Method,\n} from '@stencil/core';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport { TextInputAutocomplete } from '../../utils/constants';\n\n/**\n * @slot content - Use a <ul></ul> tag for the slot, and place <nv-dropdownitem> elements inside.\n * @slot leading-input - Content to be placed before the input text, within the input container.\n * @slot before-input - Content to be placed before the input text, outside the input container.\n * @slot after-input - Content to be placed after the input text, outside the input container.\n * @slot label - Content to be placed as the label, will override the label prop.\n * @slot description - Content to be placed as the description, will override the description prop.\n * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.\n */\n@Component({\n tag: 'nv-fielddropdown',\n styleUrl: 'styles/nv-fielddropdown.scss',\n shadow: false,\n formAssociated: true,\n})\nexport class NvFielddropdown {\n @Element() el: HTMLNvFielddropdownElement;\n private inputElement: HTMLInputElement;\n private popoverElement!: HTMLNvPopoverElement;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated\n * to ensure unique identification, facilitating proper label association and\n * accessibility.\n */\n @Prop({ reflect: true })\n readonly inputId: string = uuidv4();\n\n /**\n * Lets you define the text that explains what users should enter in the text\n * input field. It's a crucial element for making forms clear and\n * user-friendly.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Add helpful hints or extra information under the text input field. This is\n * where you can clarify what users should enter or provide additional\n * instructions, making the form easier to fill out correctly.\n */\n @Prop({ reflect: true })\n readonly description: string;\n\n /**\n * Display temporary text inside the input field to give users a hint about\n * what to type. It's a great way to provide examples or suggestions directly\n * in the field before they start typing.\n * The placeholder is displayed only when the filterable option is enabled.\n */\n @Prop({ reflect: true })\n readonly placeholder: string;\n\n /**\n * Defines the name attribute of the input field, which is crucial for form\n * submission. This value is used as the key in the key-value pair sent to\n * the server, representing the input's data in form submissions. It should be\n * unique within the form to avoid conflicts.\n */\n @Prop({ reflect: true })\n readonly name: string;\n\n /**\n * State of the dropdown popover.\n */\n @Prop({ reflect: true, mutable: true })\n open: boolean = false;\n\n /**\n * The autocomplete prop helps users fill out the input field faster by\n * suggesting entries they've used before, like their email or address.\n * You can turn it on to make forms more convenient or off to ensure users\n * always type in fresh data.\n */\n @Prop({ reflect: true })\n readonly autocomplete: `${TextInputAutocomplete}` = 'off';\n\n /**\n * Specifies the value of the input field, which determines the text displayed\n * within the field. This prop is typically used in controlled components\n * where the input's value is managed by the component's state.\n */\n @Prop({ reflect: true, mutable: true })\n value: string;\n\n /**\n * Marks the input field as required, ensuring that the user must fill it out\n * before submitting the form.\n */\n @Prop({ reflect: true })\n readonly required: boolean = false;\n\n /**\n * Alters the input field's appearance to indicate an error, helping users\n * identify fields that need correction.\n * @validator error\n */\n @Prop({ reflect: true })\n readonly error: boolean = false;\n\n /**\n * A description that appears when there is an error related to the dropdown\n * field.\n * @validator message\n */\n @Prop({ reflect: true })\n readonly errorDescription: string;\n\n /**\n * Display the input field's content without allowing users to change it.\n * Users can still click on it, select, and copy the text, but they won't be\n * able to type or delete anything.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * The disabled prop lets you turn off the input field so that users can't\n * type in it. When disabled, the field is grayed out and won't respond to\n * clicks or touches.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * The text to display when no items match the filter.\n */\n @Prop({ reflect: true })\n readonly emptyResult: string = 'No results found';\n\n /**\n * Enables or disables the filtering feature for the dropdown items.\n */\n @Prop({ reflect: true })\n readonly filterable: boolean = false;\n\n /**\n * List of options used to automatically generate dropdown items. This\n * provides an alternative to using the slot manually.\n *\n * @example\n * options=[{\n * \"label\": \"Option 1\",\n * \"value\": \"option1\",\n * \"selected\": true,\n * },\n * {\n * \"label\": \"Option 2\",\n * \"value\": \"option2\",\n * }]\n */\n @Prop({ reflect: false })\n readonly options?: {\n /** Label to display for the option */\n label: string;\n /** Value associated with the option */\n value: string;\n /** Whether this option is disabled */\n disabled?: boolean;\n /** Whether this option is pre-selected */\n selected?: boolean;\n }[];\n\n /**\n * Applies focus to the input field as soon as the component is mounted. This\n * is equivalent to setting the native autofocus attribute on an <input>\n * element.\n */\n @Prop({ reflect: true })\n // eslint-disable-next-line @stencil-community/reserved-member-names\n readonly autofocus: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region STATE\n\n /** The text entered by the user for filtering dropdown items. */\n @State()\n filterText: string = '';\n\n @State()\n selectedValues: Set<string> = new Set();\n\n //#endregion STATE\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the input value changes.\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<string>;\n\n /**\n * Event emitted when an item is clicked.\n */\n @Event()\n dropdownItemSelected: EventEmitter<\n HTMLNvFielddropdownitemElementEventMap['dropdownItemSelected']\n >;\n\n @Listen('dropdownItemSelected')\n handleDropdownItemSelected(\n event: CustomEvent<\n HTMLNvFielddropdownitemElementEventMap['dropdownItemSelected']\n >,\n ) {\n if (this.disabled || this.readonly) return;\n\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitem'),\n ) as HTMLNvFielddropdownitemElement[];\n\n items.forEach(item => {\n if (item !== event.target) {\n item.removeAttribute('selected');\n } else {\n item.setAttribute('selected', 'true');\n }\n });\n\n this.clearFilter();\n this.value = event.detail.value;\n this.open = false;\n }\n\n @Listen('openChanged')\n handleOpenChanged(event: CustomEvent<boolean>) {\n this.open = event.detail; // Update `open` based on the popover state\n }\n\n @Watch('value')\n watchValueHandler(newValue: typeof this.value) {\n this.valueChanged.emit(newValue);\n }\n\n @Watch('options')\n handleOptionsChange(newValue: typeof this.options) {\n if (!newValue) return;\n if (!this.value) {\n const defaultValue = newValue.find(option => option.selected);\n this.value = defaultValue?.value ?? '';\n this.updateSelectedItem(this.value);\n }\n }\n\n @Listen('blur', { capture: true })\n handleBlur(event: FocusEvent) {\n const target = event.relatedTarget;\n if (!(target instanceof Node) || !this.el.contains(target)) {\n this.open = false;\n\n if (this.inputElement) {\n this.filterText = '';\n this.inputElement.value = this.getSelectedLabel();\n setTimeout(() => {\n this.filterItems();\n }, 200);\n }\n }\n }\n\n @Listen('keydown', { passive: false })\n handleKeyDown(event: KeyboardEvent) {\n if (!this.el) return;\n if (!this.open) {\n if (event.key === 'ArrowDown') {\n this.open = true;\n\n event.preventDefault();\n return;\n }\n return;\n }\n\n const items = Array.from(\n this.el.querySelectorAll(\n 'nv-fielddropdownitem:not([disabled]):not([hidden])',\n ),\n ) as HTMLNvFielddropdownitemElement[];\n\n let currentIndex = items.findIndex(item =>\n item.classList.contains('highlighted'),\n );\n\n if (event.key === 'ArrowDown') {\n event.preventDefault();\n currentIndex = (currentIndex + 1) % items.length;\n this.updateHighlightedItem(items, currentIndex);\n } else if (event.key === 'ArrowUp') {\n event.preventDefault();\n currentIndex = (currentIndex - 1 + items.length) % items.length;\n this.updateHighlightedItem(items, currentIndex);\n } else if (event.key === 'Escape') {\n event.preventDefault();\n this.open = false;\n }\n }\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Retrieves the current filter text entered by the user.\n * @returns {string} The filter text.\n */\n @Method()\n async getFilterText(): Promise<string> {\n return this.filterText;\n }\n\n private handleInputContainerClick = (event: MouseEvent) => {\n if (this.disabled || this.readonly) {\n return;\n }\n\n const target = event.target as HTMLElement;\n\n if (target.tagName === 'P' || target.tagName === 'SPAN') {\n this.open = true;\n\n // Simulate focus to trigger \"focus-within\" style\n const inputContainer = this.el.querySelector(\n '.input-container',\n ) as HTMLElement;\n if (inputContainer) {\n inputContainer.classList.add('focus-within');\n\n // Remove the \"focus-within\" class after a delay or when the popover is closed\n const removeFocusWithin = () => {\n inputContainer.classList.remove('focus-within');\n };\n\n // Or remove the class when the popover is closed\n this.popoverElement.addEventListener('hide', removeFocusWithin);\n }\n }\n };\n\n private handleInput = (event: Event) => {\n if (!this.filterable) return;\n if (this.disabled || this.readonly) {\n return;\n }\n\n const input = event.target as HTMLInputElement;\n this.open = true;\n this.filterText = input.value.toLowerCase();\n this.filterItems();\n };\n\n /**\n * Filter dropdown items based on the text entered by the user.\n * If no items are found, display a message indicating no results.\n */\n private filterItems() {\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitem'),\n ) as HTMLNvFielddropdownitemElement[];\n\n // Remove the \"no results found\" item if it exists\n const existingEmptyItem = this.el.querySelector(\n 'nv-fielddropdownitem[data-empty]',\n );\n if (existingEmptyItem) {\n existingEmptyItem.remove();\n }\n\n let hasVisibleItems = false;\n\n // Iterate over all items and adjust their visibility\n items.forEach(item => {\n const textContent = item.textContent?.toLowerCase() || ''; // Get the textual content of the slot\n const value = item.value?.toLowerCase() || ''; // Get the value of the `value` attribute\n\n // Check if the filtered text is present either in the value or in the textual content\n const shouldShow =\n value.includes(this.filterText) ||\n textContent.includes(this.filterText);\n\n if (shouldShow) item.removeAttribute('hidden');\n else item.setAttribute('hidden', '');\n\n if (shouldShow) {\n hasVisibleItems = true;\n }\n });\n\n // If no items are visible, add the \"no results found\" item\n if (!hasVisibleItems) {\n const emptyItem = document.createElement('nv-fielddropdownitem');\n emptyItem.setAttribute('data-empty', 'true');\n emptyItem.setAttribute('disabled', 'true');\n emptyItem.textContent = this.emptyResult;\n this.el.querySelector('ul[slot=\"content\"]')?.appendChild(emptyItem);\n }\n }\n\n /** Reset the filter and make all items visible. */\n private resetFilter() {\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitem'),\n ) as HTMLNvFielddropdownitemElement[];\n\n items.forEach(item => {\n item.style.display = '';\n });\n }\n\n private handleInputFocus = () => {\n if (this.disabled || this.readonly) return;\n this.open = true;\n };\n\n private togglePopover = () => {\n if (this.disabled || this.readonly) return;\n this.open = !this.open;\n };\n\n private updateHighlightedItem(\n items: HTMLNvFielddropdownitemElement[],\n index: number,\n ) {\n items.forEach((item, i) => {\n if (i === index) {\n item.classList.add('highlighted');\n item.focus();\n item.scrollIntoView({ block: 'nearest' });\n } else {\n item.classList.remove('highlighted');\n }\n });\n }\n\n private getSelectedLabel = (): string => {\n if (!this.value) return '';\n\n if (this.options?.length > 1) {\n const matchingItem = this.options.find(\n option => option.value === this.value,\n );\n return matchingItem?.label ?? matchingItem?.value ?? this.value;\n }\n\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitem'),\n ) as HTMLNvFielddropdownitemElement[];\n\n const matchingItem = items.find(item => item.value === this.value);\n\n const selectedLabel = matchingItem\n ? matchingItem.label ??\n matchingItem.textContent?.trim() ??\n matchingItem.value\n : '';\n\n return selectedLabel;\n };\n\n private clearFilter = () => {\n if (!this.filterable) return;\n\n this.filterText = '';\n this.inputElement.value = this.getSelectedLabel();\n this.inputElement.focus();\n this.filterItems();\n };\n\n private updateSelectedItem(value: string) {\n if (!value) return;\n\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitem'),\n ) as HTMLNvFielddropdownitemElement[];\n\n const matchingItem = items.find(item => {\n const itemLabel = item.getAttribute('label');\n const itemValue = item.getAttribute('value');\n const itemText = item.textContent?.trim();\n return itemLabel === value || itemValue === value || itemText === value;\n });\n\n items.forEach(item => {\n if (item === matchingItem) {\n item.setAttribute('selected', '');\n } else {\n item.removeAttribute('selected');\n }\n });\n }\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillLoad() {\n this.resetFilter();\n\n if (this.filterable && this.filterText) {\n this.filterItems();\n }\n if (this.options) {\n this.handleOptionsChange(this.options);\n }\n }\n\n componentDidLoad() {\n if (this.value) {\n this.updateSelectedItem(this.value);\n }\n if (this.inputElement) {\n this.inputElement.value = this.getSelectedLabel();\n }\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host\n role=\"combobox\"\n aria-expanded={this.open.toString()}\n aria-haspopup=\"listbox\"\n aria-label={this.label}\n >\n {(this.label || this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.inputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n <nv-popover\n ref={el => (this.popoverElement = el as HTMLNvPopoverElement)}\n triggerMode=\"controlled\"\n placement=\"bottom-start\"\n open={this.open}\n >\n <div class=\"input-wrapper\" slot=\"trigger\">\n <slot name=\"before-input\"></slot>\n\n <div\n class=\"input-container\"\n onClick={this.handleInputContainerClick}\n >\n <slot name=\"leading-input\"></slot>\n\n {this.filterable || this.disabled || this.readonly ? (\n <input\n data-scope=\"focusable\"\n id={this.inputId}\n type=\"search\"\n ref={e => (this.inputElement = e)}\n autofocus={this.autofocus}\n autocomplete={this.autocomplete}\n placeholder={this.placeholder}\n name={this.name}\n value={this.getSelectedLabel()}\n required={this.required}\n disabled={this.disabled}\n readOnly={this.readonly}\n onInput={this.handleInput}\n onFocus={this.handleInputFocus}\n onClick={this.handleInputFocus}\n onKeyDown={this.handleKeyDown}\n />\n ) : (\n <p\n data-scope=\"focusable\"\n id={this.inputId}\n class=\"non-filterable-text\"\n onClick={this.handleInputContainerClick}\n tabIndex={this.disabled ? -1 : 0}\n onKeyDown={this.handleKeyDown}\n onFocus={this.handleInputFocus}\n >\n {this.getSelectedLabel() || this.value || this.placeholder}\n </p>\n )}\n\n {this.filterable && this.filterText && this.open && (\n <nv-iconbutton\n name=\"x\"\n size=\"md\"\n emphasis=\"lower\"\n class=\"clear-button\"\n onClick={this.clearFilter}\n aria-label=\"Clear input\"\n />\n )}\n\n {this.error && (\n <nv-icon name=\"alert-circle\" class=\"validation\" size=\"md\" />\n )}\n\n <nv-iconbutton\n data-scope=\"toggle-dropdown\"\n name={this.open ? 'chevron-top' : 'chevron-down'}\n size=\"md\"\n emphasis=\"lower\"\n aria-label={this.open ? 'Hide dropdown' : 'Show dropdown'}\n aria-pressed={this.open.toString()}\n onClick={this.togglePopover}\n tabIndex={this.disabled ? -1 : 0}\n />\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\n\n <div slot=\"content\">\n {this.options?.length > 0 ? (\n <ul>\n {this.options.map(option => (\n <nv-fielddropdownitem\n label={option.label}\n value={option.value}\n disabled={option.disabled}\n selected={option.value === this.value}\n />\n ))}\n </ul>\n ) : (\n <slot name=\"content\"></slot>\n )}\n </div>\n </nv-popover>\n\n {(this.description ||\n this.el.querySelector('[slot=\"description\"]')) && (\n <div class=\"description\">\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div hidden={!this.error} class=\"error-description\">\n <slot name=\"error-description\">{this.errorDescription}</slot>\n </div>\n )}\n </Host>\n );\n }\n //#endregion RENDER\n}\n"]}
1
+ {"version":3,"file":"nv-fielddropdown.js","sourceRoot":"","sources":["../../../src/components/nv-fielddropdown/nv-fielddropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,OAAO,EACP,IAAI,EACJ,KAAK,EACL,MAAM,EACN,KA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Listen,\n Event,\n EventEmitter,\n Watch,\n Method,\n} from '@stencil/core';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport { TextInputAutocomplete } from '../../utils/constants';\n\n/**\n * @slot content - Use a <ul></ul> tag for the slot, and place <nv-dropdownitem> elements inside.\n * @slot leading-input - Content to be placed before the input text, within the input container.\n * @slot before-input - Content to be placed before the input text, outside the input container.\n * @slot after-input - Content to be placed after the input text, outside the input container.\n * @slot label - Content to be placed as the label, will override the label prop.\n * @slot description - Content to be placed as the description, will override the description prop.\n * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.\n */\n@Component({\n tag: 'nv-fielddropdown',\n styleUrl: 'styles/nv-fielddropdown.scss',\n shadow: false,\n formAssociated: true,\n})\nexport class NvFielddropdown {\n @Element() el: HTMLNvFielddropdownElement;\n private inputElement: HTMLInputElement;\n private popoverElement!: HTMLNvPopoverElement;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated\n * to ensure unique identification, facilitating proper label association and\n * accessibility.\n */\n @Prop({ reflect: true })\n readonly inputId: string = uuidv4();\n\n /**\n * Lets you define the text that explains what users should enter in the text\n * input field. It's a crucial element for making forms clear and\n * user-friendly.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Add helpful hints or extra information under the text input field. This is\n * where you can clarify what users should enter or provide additional\n * instructions, making the form easier to fill out correctly.\n */\n @Prop({ reflect: true })\n readonly description: string;\n\n /**\n * Display temporary text inside the input field to give users a hint about\n * what to type. It's a great way to provide examples or suggestions directly\n * in the field before they start typing.\n * The placeholder is displayed only when the filterable option is enabled.\n */\n @Prop({ reflect: true })\n readonly placeholder: string;\n\n /**\n * Defines the name attribute of the input field, which is crucial for form\n * submission. This value is used as the key in the key-value pair sent to\n * the server, representing the input's data in form submissions. It should be\n * unique within the form to avoid conflicts.\n */\n @Prop({ reflect: true })\n readonly name: string;\n\n /**\n * State of the dropdown popover.\n */\n @Prop({ reflect: true, mutable: true })\n open: boolean = false;\n\n /**\n * The autocomplete prop helps users fill out the input field faster by\n * suggesting entries they've used before, like their email or address.\n * You can turn it on to make forms more convenient or off to ensure users\n * always type in fresh data.\n */\n @Prop({ reflect: true })\n readonly autocomplete: `${TextInputAutocomplete}` = 'off';\n\n /**\n * Specifies the value of the input field, which determines the text displayed\n * within the field. This prop is typically used in controlled components\n * where the input's value is managed by the component's state.\n */\n @Prop({ reflect: true, mutable: true })\n value: string;\n\n /**\n * Marks the input field as required, ensuring that the user must fill it out\n * before submitting the form.\n */\n @Prop({ reflect: true })\n readonly required: boolean = false;\n\n /**\n * Alters the input field's appearance to indicate an error, helping users\n * identify fields that need correction.\n * @validator error\n */\n @Prop({ reflect: true })\n readonly error: boolean = false;\n\n /**\n * A description that appears when there is an error related to the dropdown\n * field.\n * @validator message\n */\n @Prop({ reflect: true })\n readonly errorDescription: string;\n\n /**\n * Display the input field's content without allowing users to change it.\n * Users can still click on it, select, and copy the text, but they won't be\n * able to type or delete anything.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * The disabled prop lets you turn off the input field so that users can't\n * type in it. When disabled, the field is grayed out and won't respond to\n * clicks or touches.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * The text to display when no items match the filter.\n */\n @Prop({ reflect: true })\n readonly emptyResult: string = 'No results found';\n\n /**\n * Enables or disables the filtering feature for the dropdown items.\n */\n @Prop({ reflect: true })\n readonly filterable: boolean = false;\n\n /**\n * List of options used to automatically generate dropdown items. This\n * provides an alternative to using the slot manually.\n *\n * @example\n * options=[{\n * \"label\": \"Option 1\",\n * \"value\": \"option1\",\n * \"selected\": true,\n * },\n * {\n * \"label\": \"Option 2\",\n * \"value\": \"option2\",\n * }]\n */\n @Prop({ reflect: false })\n readonly options?: {\n /** Label to display for the option */\n label: string;\n /** Value associated with the option */\n value: string;\n /** Whether this option is disabled */\n disabled?: boolean;\n /** Whether this option is pre-selected */\n selected?: boolean;\n }[];\n\n /**\n * Applies focus to the input field as soon as the component is mounted. This\n * is equivalent to setting the native autofocus attribute on an <input>\n * element.\n */\n @Prop({ reflect: true })\n // eslint-disable-next-line @stencil-community/reserved-member-names\n readonly autofocus: boolean = false;\n\n /**\n * Allows the field to stretch and fill the entire width of its container.\n */\n @Prop({ reflect: true })\n readonly fluid: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region STATE\n\n /** The text entered by the user for filtering dropdown items. */\n @State()\n filterText: string = '';\n\n @State()\n selectedValues: Set<string> = new Set();\n\n //#endregion STATE\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the input value changes.\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<string>;\n\n /**\n * Event emitted when an item is clicked.\n */\n @Event()\n dropdownItemSelected: EventEmitter<\n HTMLNvFielddropdownitemElementEventMap['dropdownItemSelected']\n >;\n\n @Listen('dropdownItemSelected')\n handleDropdownItemSelected(\n event: CustomEvent<\n HTMLNvFielddropdownitemElementEventMap['dropdownItemSelected']\n >,\n ) {\n if (this.disabled || this.readonly) return;\n\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitem'),\n ) as HTMLNvFielddropdownitemElement[];\n\n items.forEach(item => {\n if (item !== event.target) {\n item.removeAttribute('selected');\n } else {\n item.setAttribute('selected', 'true');\n }\n });\n\n this.clearFilter();\n this.value = event.detail.value;\n this.open = false;\n }\n\n @Listen('openChanged')\n handleOpenChanged(event: CustomEvent<boolean>) {\n // Stop propagation to prevent the event from affecting parent components like dialogs\n event.stopPropagation();\n\n // Update `open` based on the popover state\n this.open = event.detail;\n }\n\n @Watch('value')\n watchValueHandler(newValue: typeof this.value) {\n this.valueChanged.emit(newValue);\n }\n\n @Watch('options')\n handleOptionsChange(newValue: typeof this.options) {\n if (!newValue) return;\n if (!this.value) {\n const defaultValue = newValue.find(option => option.selected);\n this.value = defaultValue?.value ?? '';\n this.updateSelectedItem(this.value);\n }\n }\n\n @Listen('blur', { capture: true })\n handleBlur(event: FocusEvent) {\n const target = event.relatedTarget;\n if (!(target instanceof Node) || !this.el.contains(target)) {\n this.open = false;\n\n if (this.inputElement) {\n this.filterText = '';\n this.inputElement.value = this.getSelectedLabel();\n setTimeout(() => {\n this.filterItems();\n }, 200);\n }\n }\n }\n\n @Listen('keydown', { passive: false })\n handleKeyDown(event: KeyboardEvent) {\n if (!this.el) return;\n if (!this.open) {\n if (event.key === 'ArrowDown') {\n this.open = true;\n\n event.preventDefault();\n return;\n }\n return;\n }\n\n const items = Array.from(\n this.el.querySelectorAll(\n 'nv-fielddropdownitem:not([disabled]):not([hidden])',\n ),\n ) as HTMLNvFielddropdownitemElement[];\n\n let currentIndex = items.findIndex(item =>\n item.classList.contains('highlighted'),\n );\n\n if (event.key === 'ArrowDown') {\n event.preventDefault();\n currentIndex = (currentIndex + 1) % items.length;\n this.updateHighlightedItem(items, currentIndex);\n } else if (event.key === 'ArrowUp') {\n event.preventDefault();\n currentIndex = (currentIndex - 1 + items.length) % items.length;\n this.updateHighlightedItem(items, currentIndex);\n } else if (event.key === 'Escape') {\n event.preventDefault();\n this.open = false;\n }\n }\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Retrieves the current filter text entered by the user.\n * @returns {string} The filter text.\n */\n @Method()\n async getFilterText(): Promise<string> {\n return this.filterText;\n }\n\n private handleInputContainerClick = (event: MouseEvent) => {\n if (this.disabled || this.readonly) {\n return;\n }\n\n const target = event.target as HTMLElement;\n\n if (target.tagName === 'P' || target.tagName === 'SPAN') {\n this.open = true;\n\n // Simulate focus to trigger \"focus-within\" style\n const inputContainer = this.el.querySelector(\n '.input-container',\n ) as HTMLElement;\n if (inputContainer) {\n inputContainer.classList.add('focus-within');\n\n // Remove the \"focus-within\" class after a delay or when the popover is closed\n const removeFocusWithin = () => {\n inputContainer.classList.remove('focus-within');\n };\n\n // Or remove the class when the popover is closed\n this.popoverElement.addEventListener('hide', removeFocusWithin);\n }\n }\n };\n\n private handleInput = (event: Event) => {\n if (!this.filterable) return;\n if (this.disabled || this.readonly) {\n return;\n }\n\n const input = event.target as HTMLInputElement;\n this.open = true;\n this.filterText = input.value.toLowerCase();\n this.filterItems();\n };\n\n /**\n * Filter dropdown items based on the text entered by the user.\n * If no items are found, display a message indicating no results.\n */\n private filterItems() {\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitem'),\n ) as HTMLNvFielddropdownitemElement[];\n\n // Remove the \"no results found\" item if it exists\n const existingEmptyItem = this.el.querySelector(\n 'nv-fielddropdownitem[data-empty]',\n );\n if (existingEmptyItem) {\n existingEmptyItem.remove();\n }\n\n let hasVisibleItems = false;\n\n // Iterate over all items and adjust their visibility\n items.forEach(item => {\n const textContent = item.textContent?.toLowerCase() || ''; // Get the textual content of the slot\n const value = item.value?.toLowerCase() || ''; // Get the value of the `value` attribute\n\n // Check if the filtered text is present either in the value or in the textual content\n const shouldShow =\n value.includes(this.filterText) ||\n textContent.includes(this.filterText);\n\n if (shouldShow) item.removeAttribute('hidden');\n else item.setAttribute('hidden', '');\n\n if (shouldShow) {\n hasVisibleItems = true;\n }\n });\n\n // If no items are visible, add the \"no results found\" item\n if (!hasVisibleItems) {\n const emptyItem = document.createElement('nv-fielddropdownitem');\n emptyItem.setAttribute('data-empty', 'true');\n emptyItem.setAttribute('disabled', 'true');\n emptyItem.textContent = this.emptyResult;\n this.el.querySelector('ul[slot=\"content\"]')?.appendChild(emptyItem);\n }\n }\n\n /** Reset the filter and make all items visible. */\n private resetFilter() {\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitem'),\n ) as HTMLNvFielddropdownitemElement[];\n\n items.forEach(item => {\n item.style.display = '';\n });\n }\n\n private handleInputFocus = () => {\n if (this.disabled || this.readonly) return;\n this.open = true;\n };\n\n private togglePopover = () => {\n if (this.disabled || this.readonly) return;\n this.open = !this.open;\n };\n\n private updateHighlightedItem(\n items: HTMLNvFielddropdownitemElement[],\n index: number,\n ) {\n items.forEach((item, i) => {\n if (i === index) {\n item.classList.add('highlighted');\n item.focus();\n item.scrollIntoView({ block: 'nearest' });\n } else {\n item.classList.remove('highlighted');\n }\n });\n }\n\n private getSelectedLabel = (): string => {\n if (!this.value) return '';\n\n if (this.options?.length > 1) {\n const matchingItem = this.options.find(\n option => option.value === this.value,\n );\n return matchingItem?.label ?? matchingItem?.value ?? this.value;\n }\n\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitem'),\n ) as HTMLNvFielddropdownitemElement[];\n\n const matchingItem = items.find(item => item.value === this.value);\n\n const selectedLabel = matchingItem\n ? matchingItem.label ??\n matchingItem.textContent?.trim() ??\n matchingItem.value\n : '';\n\n return selectedLabel;\n };\n\n private clearFilter = () => {\n if (!this.filterable) return;\n\n this.filterText = '';\n this.inputElement.value = this.getSelectedLabel();\n this.inputElement.focus();\n this.filterItems();\n };\n\n private updateSelectedItem(value: string) {\n if (!value) return;\n\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitem'),\n ) as HTMLNvFielddropdownitemElement[];\n\n const matchingItem = items.find(item => {\n const itemLabel = item.getAttribute('label');\n const itemValue = item.getAttribute('value');\n const itemText = item.textContent?.trim();\n return itemLabel === value || itemValue === value || itemText === value;\n });\n\n items.forEach(item => {\n if (item === matchingItem) {\n item.setAttribute('selected', '');\n } else {\n item.removeAttribute('selected');\n }\n });\n }\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillLoad() {\n this.resetFilter();\n\n if (this.filterable && this.filterText) {\n this.filterItems();\n }\n if (this.options) {\n this.handleOptionsChange(this.options);\n }\n }\n\n componentDidLoad() {\n if (this.value) {\n this.updateSelectedItem(this.value);\n }\n if (this.inputElement) {\n this.inputElement.value = this.getSelectedLabel();\n }\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host\n role=\"combobox\"\n aria-expanded={this.open.toString()}\n aria-haspopup=\"listbox\"\n aria-label={this.label}\n >\n {(this.label || this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.inputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n <nv-popover\n ref={el => (this.popoverElement = el as HTMLNvPopoverElement)}\n triggerMode=\"controlled\"\n placement=\"bottom-start\"\n open={this.open}\n >\n <div class=\"input-wrapper\" slot=\"trigger\">\n <slot name=\"before-input\"></slot>\n\n <div\n class=\"input-container\"\n onClick={this.handleInputContainerClick}\n >\n <slot name=\"leading-input\"></slot>\n\n {this.filterable || this.disabled || this.readonly ? (\n <input\n data-scope=\"focusable\"\n id={this.inputId}\n type=\"search\"\n ref={e => (this.inputElement = e)}\n autofocus={this.autofocus}\n autocomplete={this.autocomplete}\n placeholder={this.placeholder}\n name={this.name}\n value={this.getSelectedLabel()}\n required={this.required}\n disabled={this.disabled}\n readOnly={this.readonly}\n onInput={this.handleInput}\n onFocus={this.handleInputFocus}\n onClick={this.handleInputFocus}\n onKeyDown={this.handleKeyDown}\n />\n ) : (\n <p\n data-scope=\"focusable\"\n id={this.inputId}\n class=\"non-filterable-text\"\n onClick={this.handleInputContainerClick}\n tabIndex={this.disabled ? -1 : 0}\n onKeyDown={this.handleKeyDown}\n onFocus={this.handleInputFocus}\n >\n {this.getSelectedLabel() || this.value || this.placeholder}\n </p>\n )}\n\n {this.filterable && this.filterText && this.open && (\n <nv-iconbutton\n name=\"x\"\n size=\"md\"\n emphasis=\"lower\"\n class=\"clear-button\"\n onClick={this.clearFilter}\n aria-label=\"Clear input\"\n />\n )}\n\n {this.error && (\n <nv-icon name=\"alert-circle\" class=\"validation\" size=\"md\" />\n )}\n\n <nv-iconbutton\n data-scope=\"toggle-dropdown\"\n name={this.open ? 'chevron-top' : 'chevron-down'}\n size=\"md\"\n emphasis=\"lower\"\n aria-label={this.open ? 'Hide dropdown' : 'Show dropdown'}\n aria-pressed={this.open.toString()}\n onClick={this.togglePopover}\n tabIndex={this.disabled ? -1 : 0}\n />\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\n\n <div slot=\"content\">\n {this.options?.length > 0 ? (\n <ul>\n {this.options.map(option => (\n <nv-fielddropdownitem\n label={option.label}\n value={option.value}\n disabled={option.disabled}\n selected={option.value === this.value}\n />\n ))}\n </ul>\n ) : (\n <slot name=\"content\"></slot>\n )}\n </div>\n </nv-popover>\n\n {(this.description ||\n this.el.querySelector('[slot=\"description\"]')) && (\n <div class=\"description\">\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div hidden={!this.error} class=\"error-description\">\n <slot name=\"error-description\">{this.errorDescription}</slot>\n </div>\n )}\n </Host>\n );\n }\n //#endregion RENDER\n}\n"]}
@@ -11,6 +11,10 @@ nv-fielddropdown {
11
11
  align-items: flex-start;
12
12
  gap: var(--form-gap-y);
13
13
  box-sizing: border-box;
14
+ max-width: 480px;
15
+ }
16
+ nv-fielddropdown[fluid]:not([fluid=false]) {
17
+ max-width: unset;
14
18
  }
15
19
  nv-fielddropdown[readonly]:not([readonly=false]) {
16
20
  --nv-field-border-default: var(--components-form-field-border-readonly);
@@ -128,6 +132,7 @@ nv-fielddropdown .input-container p.non-filterable-text {
128
132
  font-style: normal;
129
133
  font-weight: 500;
130
134
  line-height: var(--form-field-line-height);
135
+ width: 100%;
131
136
  }
132
137
  nv-fielddropdown .input-container input:focus,
133
138
  nv-fielddropdown .input-container p.non-filterable-text:focus {
@@ -53,7 +53,7 @@ export class NvFielddropdownitem {
53
53
  /****************************************************************************/
54
54
  //#region RENDER
55
55
  render() {
56
- return (h(Host, { key: '86699901e52c35392ae5e60013f542427973a626', role: "menuitem", tabindex: '-1', onClick: this.handleSelected }, h("slot", { key: 'f2d893f0692821fc0e918da9283eb174c3429173' }), !this.composed && (h("div", { key: '5e62842ee3b0e79333f99a3ec8d92dd843ebd96e', class: "text-wrapper" }, h("span", { key: 'baa00ac59b5d85d912f34fc16fbf82d87af849e2', "data-scope": "text" }, this.label))), this.selected && (h("nv-icon", { key: 'f9a5082e4cee6b68531809f9861e3da83b3001d6', name: "check", "aria-hidden": "true", "data-scope": "selected" }))));
56
+ return (h(Host, { key: '645ff9487464e30c9f0fc4510301fb1e0f919c1f', role: "menuitem", tabindex: '-1', onClick: this.handleSelected }, h("slot", { key: '4cc5ec9d61f0b0dd63d273af23623434dae0b2c3' }), !this.composed && (h("div", { key: '2b64690c51959e71482603c530d954db0cf4186e', class: "text-wrapper" }, h("span", { key: '5c49245a50249f51ff023d33ccfe541b4684152a', "data-scope": "text" }, this.label))), this.selected && (h("nv-icon", { key: 'ca97f75940f804e5ac3a9152aaee38a9a69e10f8', name: "check", "aria-hidden": "true", "data-scope": "selected" }))));
57
57
  }
58
58
  static get is() { return "nv-fielddropdownitem"; }
59
59
  static get originalStyleUrls() {
@@ -40,7 +40,7 @@ export class NvFielddropdownitemcheck {
40
40
  };
41
41
  }
42
42
  render() {
43
- return (h(Host, { key: '93a97fb36d69bd837b27cdbfa31adc5a7a71dab4', onClick: this.handleClick }, h("nv-fieldcheckbox", { key: '7afd9b55ce6911c327fae658304fa313fc908d45', checked: this.checked, name: this.label || this.value, label: this.label || this.value, "label-placement": "after", description: this.description, disabled: this.disabled, tabindex: "-1", role: "option", onCheckedChanged: this.onFieldcheckboxChanged })));
43
+ return (h(Host, { key: '4defa520c983278534b87cbc632269d1fcf9517e', onClick: this.handleClick }, h("nv-fieldcheckbox", { key: '772ef205d9a14d51193f926ecb8280bce57ca8a9', checked: this.checked, name: this.label || this.value, label: this.label || this.value, "label-placement": "after", description: this.description, disabled: this.disabled, tabindex: "-1", role: "option", onCheckedChanged: this.onFieldcheckboxChanged })));
44
44
  }
45
45
  static get is() { return "nv-fielddropdownitemcheck"; }
46
46
  static get originalStyleUrls() {
@@ -1,3 +1,10 @@
1
+ /**
2
+ * Scrollbar mixin for the Nova Design System
3
+ * This mixin provides consistent scrollbar styling for components
4
+ *
5
+ * Usage:
6
+ * @include scrollbar();
7
+ */
1
8
  nv-fieldmultiselect {
2
9
  --nv-field-border-default: var(--components-form-field-border-default);
3
10
  --nv-field-border-hover: var(--components-form-field-border-hover);
@@ -11,6 +18,10 @@ nv-fieldmultiselect {
11
18
  align-items: flex-start;
12
19
  gap: var(--form-gap-y);
13
20
  box-sizing: border-box;
21
+ max-width: 480px;
22
+ }
23
+ nv-fieldmultiselect[fluid]:not([fluid=false]) {
24
+ max-width: unset;
14
25
  }
15
26
  nv-fieldmultiselect[readonly]:not([readonly=false]) {
16
27
  --nv-field-border-default: var(--components-form-field-border-readonly);
@@ -64,6 +75,18 @@ nv-fieldmultiselect nv-popover [slot=content] {
64
75
  nv-fieldmultiselect nv-popover hr {
65
76
  color: var(--components-list-dropdown-separator);
66
77
  }
78
+ nv-fieldmultiselect div[slot=content]::-webkit-scrollbar {
79
+ width: 6px;
80
+ height: 6px;
81
+ }
82
+ nv-fieldmultiselect div[slot=content]::-webkit-scrollbar-track {
83
+ background-color: var(--color-level-10-background);
84
+ border-radius: 9999px;
85
+ }
86
+ nv-fieldmultiselect div[slot=content]::-webkit-scrollbar-thumb {
87
+ background-color: var(--color-gray-200);
88
+ border-radius: 9999px;
89
+ }
67
90
  nv-fieldmultiselect .input-wrapper-multiselect {
68
91
  display: flex;
69
92
  flex-wrap: wrap;
@@ -135,6 +158,7 @@ nv-fieldmultiselect .input-container-multiselect p.non-filterable-text {
135
158
  font-weight: 500;
136
159
  line-height: var(--form-field-line-height);
137
160
  width: 100%;
161
+ width: 100%;
138
162
  flex-grow: 1;
139
163
  margin: 0;
140
164
  min-height: 100%;
@@ -2,7 +2,6 @@ import { h } from "@stencil/core";
2
2
  import { nameof } from "../../utils/class.utils";
3
3
  const NvFieldmultiselectDocs = {
4
4
  component: 'nv-fieldmultiselect',
5
- badge: 'beta',
6
5
  subcomponents: [
7
6
  'nv-fielddropdownitemcheck',
8
7
  'nv-badge',
@@ -172,6 +171,14 @@ const NvFieldmultiselectDocs = {
172
171
  },
173
172
  template: (h("nv-fieldmultiselect", { "data-storybook-args": true }, h("ul", { slot: "content" }, h("nv-fielddropdownitemcheck", { label: "PHP", value: "php" })))),
174
173
  },
174
+ {
175
+ name: nameof(x => x.fluid),
176
+ args: {
177
+ label: 'Fluid Multiselect',
178
+ fluid: true,
179
+ },
180
+ template: (h("nv-fieldmultiselect", { "data-storybook-args": true }, h("ul", { slot: "content" }, h("nv-fielddropdownitemcheck", { label: "PHP", value: "php" })))),
181
+ },
175
182
  {
176
183
  name: 'PreSelected',
177
184
  template: (h("nv-fieldmultiselect", { "data-storybook-args": true, filterable: true }, h("ul", { slot: "content" }, h("nv-fielddropdownitemcheck", { label: "PHP", value: "php", checked: true }), h("nv-fielddropdownitemcheck", { label: "Java", value: "java" }), h("nv-fielddropdownitemcheck", { label: "Javascript", value: "javascript" }), h("nv-fielddropdownitemcheck", { label: "Item disabled", disabled: true, value: "disabled" })))),