@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
@@ -1 +1 @@
1
- {"version":3,"file":"nv-fieldnumber.js","sourceRoot":"","sources":["../../../src/components/nv-fieldnumber/nv-fieldnumber.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,OAAO,EACP,KAAK,EAEL,CAAC,EACD,IAAI,EACJ,KAAK,GACN,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AAEpC;;;;;;;GAOG;AAOH,MAAM,OAAO,aAAa;IAN1B;QA2BE,uBAAuB;QACvB,8EAA8E;QAC9E,oBAAoB;QAEpB;;;;;WAKG;QAEM,YAAO,GAAW,MAAM,EAAE,CAAC;QAmCpC;;;;WAIG;QAEM,aAAQ,GAAY,KAAK,CAAC;QAEnC;;;;WAIG;QAEM,aAAQ,GAAY,KAAK,CAAC;QAEnC;;;WAGG;QAEM,aAAQ,GAAY,KAAK,CAAC;QAEnC;;;;WAIG;QAEH,UAAK,GAAY,KAAK,CAAC;QAWvB;;;WAGG;QAEM,YAAO,GAAY,KAAK,CAAC;QAgBlC;;;WAGG;QAEM,SAAI,GAAW,CAAC,CAAC;QAU1B;;;;WAIG;QAGM,cAAS,GAAY,KAAK,CAAC;QAsBpC,qBAAqB;QACrB,8EAA8E;QAC9E,iBAAiB;QAET,gBAAW,GAAG,CAAC,KAAY,EAAE,EAAE;YACrC,MAAM,KAAK,GAA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,mBAAmB;gBACjD,6DAAM,IAAI,EAAC,mBAAmB,IAAE,IAAI,CAAC,gBAAgB,CAAQ,CACzD,CACP,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGF","sourcesContent":["import {\n Component,\n Prop,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Watch,\n} from '@stencil/core';\nimport { v4 as uuidv4 } from 'uuid';\n\n/**\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-fieldnumber',\n styleUrl: 'nv-fieldnumber.scss',\n shadow: false,\n formAssociated: true,\n})\nexport class NvFieldnumber {\n @Element() el: HTMLNvFieldnumberElement;\n private inputElement!: HTMLInputElement;\n\n /****************************************************************************/\n //#region DEPRECATED\n\n /**\n * Message defines a 'hint ' message for the number field.\n * @deprecated Use `description` instead.\n */\n @Prop({ reflect: true })\n readonly message: string;\n\n /**\n * Add the message to the validation state.\n * @deprecated Use `errorDescription` and set the error prop instead.\n */\n @Prop({ reflect: true })\n readonly validation: string;\n\n //#endregion DEPRECATED\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, mutable: true })\n 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 */\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 * 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 * 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 * 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, mutable: true })\n error: boolean = false;\n\n /**\n * Show a helpful message under the input field when there’s a problem. It\n * explains what’s wrong and how users can fix it, making the error easier to\n * understand and resolve.\n * @validator message\n */\n @Prop({ reflect: true, mutable: true })\n errorDescription: string;\n\n /**\n * Changes the input field’s appearance to indicate successful input or\n * validation.\n */\n @Prop({ reflect: true })\n readonly success: boolean = false;\n\n /**\n * The maximum value that the input field can accept. Use this in combination\n * with min to create a range of valid values.\n */\n @Prop({ reflect: true })\n readonly max: number;\n\n /**\n * The minimum value that the input field can accept. Use this in combination\n * with max to create a range of valid values.\n */\n @Prop({ reflect: true })\n readonly min: number;\n\n /**\n * Define the increment value for the input field. It determines how much the\n * value will increase or decrease when the user clicks the stepper buttons.\n */\n @Prop({ reflect: true })\n readonly step: number = 1;\n\n /**\n * The value of the input field. It’s the text that users type in or the value\n * that you set programmatically. This is the main way to interact with the\n * input field, and it’s essential for creating forms that users can fill out.\n */\n @Prop({ reflect: true, mutable: true })\n value: number;\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 EVENTS\n\n /**\n * Emitted when the input value changes.\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<number>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region WATCHERS\n\n @Watch('value')\n watchValueHandler(newValue: number) {\n this.valueChanged.emit(newValue);\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region METHODS\n\n private handleInput = (event: Event) => {\n const input = event.target as HTMLInputElement;\n this.value = Number(input.value);\n };\n\n private handleInputContainerClick = () => {\n this.inputElement.focus();\n };\n\n private handlePlus = () => {\n this.inputElement.stepUp();\n this.value = Number(this.inputElement.value);\n };\n\n private handleMinus = () => {\n this.inputElement.stepDown();\n this.value = Number(this.inputElement.value);\n };\n\n // prevents text selection when clicking the buttons multiple times\n private preventSelection = (event: Event) => {\n event.preventDefault();\n };\n\n private isMinValueReached = (): boolean => {\n return this.min !== undefined && this.value <= this.min;\n };\n\n private isMaxValueReached = (): boolean => {\n return this.max !== undefined && this.value >= this.max;\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillRender() {\n if (this.message) {\n this.description = this.message;\n }\n\n if (this.validation) {\n this.errorDescription = this.validation;\n this.error = true;\n }\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n {(this.label || this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.inputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n\n <div class=\"input-wrapper\">\n <slot name=\"before-input\"></slot>\n\n <div class=\"input-container\" onClick={this.handleInputContainerClick}>\n <slot name=\"leading-input\"></slot>\n\n <input\n id={this.inputId}\n ref={e => (this.inputElement = e)}\n placeholder={this.placeholder}\n name={this.name}\n type=\"number\"\n autofocus={this.autofocus}\n required={this.required}\n max={this.max}\n min={this.min}\n step={this.step}\n value={this.value}\n disabled={this.disabled}\n readOnly={this.readonly}\n onInput={this.handleInput}\n />\n\n {this.error && (\n <nv-icon name=\"alert-circle\" class=\"validation\" size=\"md\" />\n )}\n {this.success && (\n <nv-icon name=\"circle-check\" class=\"validation\" size=\"md\" />\n )}\n\n <div class=\"stepper\">\n <nv-iconbutton\n size=\"md\"\n name=\"minus\"\n emphasis=\"lower\"\n onClick={this.handleMinus}\n disabled={this.isMinValueReached()}\n onMouseDown={this.preventSelection}\n tabindex=\"-1\"\n ></nv-iconbutton>\n <nv-iconbutton\n size=\"md\"\n name=\"plus\"\n emphasis=\"lower\"\n onClick={this.handlePlus}\n disabled={this.isMaxValueReached()}\n onMouseDown={this.preventSelection}\n tabindex=\"-1\"\n />\n </div>\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\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\n //#endregion RENDER\n}\n"]}
1
+ {"version":3,"file":"nv-fieldnumber.js","sourceRoot":"","sources":["../../../src/components/nv-fieldnumber/nv-fieldnumber.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,OAAO,EACP,KAAK,EAEL,CAAC,EACD,IAAI,EACJ,KAAK,GACN,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AAEpC;;;;;;;GAOG;AAOH,MAAM,OAAO,aAAa;IAN1B;QA2BE,uBAAuB;QACvB,8EAA8E;QAC9E,oBAAoB;QAEpB;;;;;WAKG;QAEM,YAAO,GAAW,MAAM,EAAE,CAAC;QAmCpC;;;;WAIG;QAEM,aAAQ,GAAY,KAAK,CAAC;QAEnC;;;;WAIG;QAEM,aAAQ,GAAY,KAAK,CAAC;QAEnC;;;WAGG;QAEM,aAAQ,GAAY,KAAK,CAAC;QAEnC;;;;WAIG;QAEH,UAAK,GAAY,KAAK,CAAC;QAWvB;;;WAGG;QAEM,YAAO,GAAY,KAAK,CAAC;QAgBlC;;;WAGG;QAEM,SAAI,GAAW,CAAC,CAAC;QAU1B;;;;WAIG;QAGM,cAAS,GAAY,KAAK,CAAC;QAEpC;;WAEG;QAEM,UAAK,GAAY,KAAK,CAAC;QAsBhC,qBAAqB;QACrB,8EAA8E;QAC9E,iBAAiB;QAET,gBAAW,GAAG,CAAC,KAAY,EAAE,EAAE;YACrC,MAAM,KAAK,GAAG,KAAK,CAAC,MAA0B,CAAC;YAC/C,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACnC,CAAC,CAAC;QAEM,8BAAyB,GAAG,GAAG,EAAE;YACvC,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC;QAC5B,CAAC,CAAC;QAEM,eAAU,GAAG,GAAG,EAAE;YACxB,IAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGF","sourcesContent":["import {\n Component,\n Prop,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Watch,\n} from '@stencil/core';\nimport { v4 as uuidv4 } from 'uuid';\n\n/**\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-fieldnumber',\n styleUrl: 'nv-fieldnumber.scss',\n shadow: false,\n formAssociated: true,\n})\nexport class NvFieldnumber {\n @Element() el: HTMLNvFieldnumberElement;\n private inputElement!: HTMLInputElement;\n\n /****************************************************************************/\n //#region DEPRECATED\n\n /**\n * Message defines a 'hint ' message for the number field.\n * @deprecated Use `description` instead.\n */\n @Prop({ reflect: true })\n readonly message: string;\n\n /**\n * Add the message to the validation state.\n * @deprecated Use `errorDescription` and set the error prop instead.\n */\n @Prop({ reflect: true })\n readonly validation: string;\n\n //#endregion DEPRECATED\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, mutable: true })\n 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 */\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 * 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 * 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 * 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, mutable: true })\n error: boolean = false;\n\n /**\n * Show a helpful message under the input field when there’s a problem. It\n * explains what’s wrong and how users can fix it, making the error easier to\n * understand and resolve.\n * @validator message\n */\n @Prop({ reflect: true, mutable: true })\n errorDescription: string;\n\n /**\n * Changes the input field’s appearance to indicate successful input or\n * validation.\n */\n @Prop({ reflect: true })\n readonly success: boolean = false;\n\n /**\n * The maximum value that the input field can accept. Use this in combination\n * with min to create a range of valid values.\n */\n @Prop({ reflect: true })\n readonly max: number;\n\n /**\n * The minimum value that the input field can accept. Use this in combination\n * with max to create a range of valid values.\n */\n @Prop({ reflect: true })\n readonly min: number;\n\n /**\n * Define the increment value for the input field. It determines how much the\n * value will increase or decrease when the user clicks the stepper buttons.\n */\n @Prop({ reflect: true })\n readonly step: number = 1;\n\n /**\n * The value of the input field. It’s the text that users type in or the value\n * that you set programmatically. This is the main way to interact with the\n * input field, and it’s essential for creating forms that users can fill out.\n */\n @Prop({ reflect: true, mutable: true })\n value: number;\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 EVENTS\n\n /**\n * Emitted when the input value changes.\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<number>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region WATCHERS\n\n @Watch('value')\n watchValueHandler(newValue: number) {\n this.valueChanged.emit(newValue);\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region METHODS\n\n private handleInput = (event: Event) => {\n const input = event.target as HTMLInputElement;\n this.value = Number(input.value);\n };\n\n private handleInputContainerClick = () => {\n this.inputElement.focus();\n };\n\n private handlePlus = () => {\n this.inputElement.stepUp();\n this.value = Number(this.inputElement.value);\n };\n\n private handleMinus = () => {\n this.inputElement.stepDown();\n this.value = Number(this.inputElement.value);\n };\n\n // prevents text selection when clicking the buttons multiple times\n private preventSelection = (event: Event) => {\n event.preventDefault();\n };\n\n private isMinValueReached = (): boolean => {\n return this.min !== undefined && this.value <= this.min;\n };\n\n private isMaxValueReached = (): boolean => {\n return this.max !== undefined && this.value >= this.max;\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillRender() {\n if (this.message) {\n this.description = this.message;\n }\n\n if (this.validation) {\n this.errorDescription = this.validation;\n this.error = true;\n }\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n {(this.label || this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.inputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n\n <div class=\"input-wrapper\">\n <slot name=\"before-input\"></slot>\n\n <div class=\"input-container\" onClick={this.handleInputContainerClick}>\n <slot name=\"leading-input\"></slot>\n\n <input\n id={this.inputId}\n ref={e => (this.inputElement = e)}\n placeholder={this.placeholder}\n name={this.name}\n type=\"number\"\n autofocus={this.autofocus}\n required={this.required}\n max={this.max}\n min={this.min}\n step={this.step}\n value={this.value}\n disabled={this.disabled}\n readOnly={this.readonly}\n onInput={this.handleInput}\n />\n\n {this.error && (\n <nv-icon name=\"alert-circle\" class=\"validation\" size=\"md\" />\n )}\n {this.success && (\n <nv-icon name=\"circle-check\" class=\"validation\" size=\"md\" />\n )}\n\n <div class=\"stepper\">\n <nv-iconbutton\n size=\"md\"\n name=\"minus\"\n emphasis=\"lower\"\n onClick={this.handleMinus}\n disabled={this.isMinValueReached()}\n onMouseDown={this.preventSelection}\n tabindex=\"-1\"\n ></nv-iconbutton>\n <nv-iconbutton\n size=\"md\"\n name=\"plus\"\n emphasis=\"lower\"\n onClick={this.handlePlus}\n disabled={this.isMaxValueReached()}\n onMouseDown={this.preventSelection}\n tabindex=\"-1\"\n />\n </div>\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\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\n //#endregion RENDER\n}\n"]}
@@ -11,6 +11,10 @@ nv-fieldpassword {
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-fieldpassword[fluid]:not([fluid=false]) {
17
+ max-width: unset;
14
18
  }
15
19
  nv-fieldpassword[readonly]:not([readonly=false]) {
16
20
  --nv-field-border-default: var(--components-form-field-border-readonly);
@@ -104,6 +108,7 @@ nv-fieldpassword .input-wrapper .input-container input {
104
108
  font-style: normal;
105
109
  font-weight: 500;
106
110
  line-height: var(--form-field-line-height);
111
+ width: 100%;
107
112
  }
108
113
  nv-fieldpassword .input-wrapper .input-container input:focus {
109
114
  outline: none;
@@ -139,6 +139,14 @@ const NvFieldpasswordDocs = {
139
139
  },
140
140
  template: h("nv-fieldpassword", { "data-storybook-args": true }),
141
141
  },
142
+ {
143
+ name: nameof(x => x.fluid),
144
+ args: {
145
+ label: 'Fluid',
146
+ fluid: true,
147
+ },
148
+ template: h("nv-fieldpassword", { "data-storybook-args": true }),
149
+ },
142
150
  {
143
151
  name: 'beforeInputSlot',
144
152
  description: 'Content to be placed before the input text, outside the input container.',
@@ -1 +1 @@
1
- {"version":3,"file":"nv-fieldpassword.docs.js","sourceRoot":"","sources":["../../../src/components/nv-fieldpassword/nv-fieldpassword.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,WAAW,EAAE,UAAU,CAAC;IACxC,OAAO,EAAE;QACP;YACE,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,sDAAyD;SACpE;QACD;YACE,IAAI,EAAE,MAAM,CAA6B,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;YACtD,IAAI,EAAE;gBACJ,KAAK,EAAE,gBAAgB;aACxB;YACD,QAAQ,EAAE,sDAAyD;SACpE;QACD;YACE,IAAI,EAAE,MAAM,CAA6B,CAAC,CAAC,EAAE,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EAAE;gBACJ,KAAK,EAAE,gBAAgB;aACxB;YACD,QAAQ,EAAE,CACR;gBACE,YAAM,IAAI,EAAC,OAAO,mBAAoB,CACrB,CACpB;SACF;QACD;YACE,IAAI,EAAE,iBAAiB;YACvB,WAAW,EACT,8EAA8E;YAChF,IAAI,EAAE;gBACJ,KAAK,EAAE,kBAAkB;gBACzB,WAAW,EAAE,sBAAsB;aACpC;YACD,QAAQ,EAAE,CACR;gBACE,YAAM,IAAI,EAAC,aAAa,yBAA0B,CACjC,CACpB;SACF;QACD;YACE,IAAI,EAAE,sBAAsB;YAC5B,WAAW,EACT,yFAAyF;YAC3F,IAAI,EAAE;gBACJ,KAAK,EAAE,wBAAwB;gBAC/B,gBAAgB,EAAE,4BAA4B;gBAC9C,KAAK,EAAE,IAAI;aACZ;YACD,QAAQ,EAAE,CACR;gBACE,YAAM,IAAI,EAAC,mBAAmB,+BAAgC,CAC7C,CACpB;SACF;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 NvFieldpasswordDocs: NovaDocs<Components.NvFieldpassword> = {\n component: 'nv-fieldpassword',\n subcomponents: ['nv-button', 'nv-badge'],\n stories: [\n {\n name: 'Default',\n template: <nv-fieldpassword data-storybook-args></nv-fieldpassword>,\n },\n {\n name: nameof<Components.NvFieldpassword>(x => x.label),\n args: {\n label: 'Password Label',\n },\n template: <nv-fieldpassword data-storybook-args></nv-fieldpassword>,\n },\n {\n name: nameof<Components.NvFieldpassword>(x => x.description),\n args: {\n label: 'Password Description',\n description: 'Enter a strong password.',\n },\n template: <nv-fieldpassword data-storybook-args></nv-fieldpassword>,\n },\n {\n name: nameof<Components.NvFieldpassword>(x => x.placeholder),\n args: {\n label: 'Password Placeholder',\n placeholder: 'Enter your password...',\n },\n template: <nv-fieldpassword data-storybook-args></nv-fieldpassword>,\n },\n {\n name: nameof<Components.NvFieldpassword>(x => x.name),\n args: {\n label: 'Password Name',\n name: 'password',\n },\n template: <nv-fieldpassword data-storybook-args></nv-fieldpassword>,\n },\n {\n name: nameof<Components.NvFieldpassword>(x => x.value),\n args: {\n label: 'Password Value',\n value: 'password123',\n },\n template: <nv-fieldpassword data-storybook-args></nv-fieldpassword>,\n },\n {\n name: nameof<Components.NvFieldpassword>(x => x.disabled),\n args: {\n label: 'Password Disabled',\n disabled: true,\n },\n template: <nv-fieldpassword data-storybook-args></nv-fieldpassword>,\n },\n {\n name: nameof<Components.NvFieldpassword>(x => x.readonly),\n args: {\n label: 'Password Readonly',\n readonly: true,\n value: 'readonlypassword',\n },\n template: <nv-fieldpassword data-storybook-args></nv-fieldpassword>,\n },\n {\n name: nameof<Components.NvFieldpassword>(x => x.required),\n args: {\n label: 'Password Required',\n required: true,\n },\n template: <nv-fieldpassword data-storybook-args></nv-fieldpassword>,\n },\n {\n name: nameof<Components.NvFieldpassword>(x => x.error),\n args: {\n label: 'Password Error',\n error: true,\n },\n template: <nv-fieldpassword data-storybook-args></nv-fieldpassword>,\n },\n {\n name: nameof<Components.NvFieldpassword>(x => x.errorDescription),\n args: {\n label: 'Password Error Description',\n description: 'Ensure your password is correct.',\n error: true,\n errorDescription: 'This password is incorrect.',\n },\n template: <nv-fieldpassword data-storybook-args></nv-fieldpassword>,\n },\n {\n name: nameof<Components.NvFieldpassword>(x => x.success),\n args: {\n label: 'Password Success',\n success: true,\n },\n template: <nv-fieldpassword data-storybook-args></nv-fieldpassword>,\n },\n {\n name: nameof<Components.NvFieldpassword>(x => x.maxlength),\n args: {\n label: 'Password Max Length (max 4 characters)',\n maxlength: 4,\n },\n template: <nv-fieldpassword data-storybook-args></nv-fieldpassword>,\n },\n {\n name: nameof<Components.NvFieldpassword>(x => x.minlength),\n args: {\n label: 'Password Min Length (min 4 characters)',\n minlength: 4,\n },\n template: <nv-fieldpassword data-storybook-args></nv-fieldpassword>,\n },\n {\n name: nameof<Components.NvFieldpassword>(x => x.hidePasswordIcon),\n args: {\n label: 'Password Hide Icon',\n hidePasswordIcon: true,\n },\n template: <nv-fieldpassword data-storybook-args></nv-fieldpassword>,\n },\n {\n name: nameof<Components.NvFieldpassword>(x => x.showPassword),\n args: {\n label: 'Password Show Text',\n value: 'password123',\n showPassword: true,\n },\n template: <nv-fieldpassword data-storybook-args></nv-fieldpassword>,\n },\n {\n name: nameof<Components.NvFieldpassword>(x => x.autofocus),\n args: {\n label: 'Autofocus',\n autofocus: true,\n },\n template: <nv-fieldpassword data-storybook-args></nv-fieldpassword>,\n },\n {\n name: 'beforeInputSlot',\n description:\n 'Content to be placed before the input text, outside the input container.',\n args: {\n label: 'Before Input Slot',\n description: 'This is placed before the password field',\n },\n template: (\n <nv-fieldpassword data-storybook-args>\n <nv-button slot=\"before-input\">Before Input Slot</nv-button>\n </nv-fieldpassword>\n ),\n },\n {\n name: 'afterInputSlot',\n description:\n 'Content to be placed after the input text, outside the input container.',\n args: {\n label: 'After Input Slot',\n description: 'This is placed after the password field',\n },\n template: (\n <nv-fieldpassword data-storybook-args>\n <nv-button slot=\"after-input\">After Input Slot</nv-button>\n </nv-fieldpassword>\n ),\n },\n {\n name: 'leadingInputSlot',\n description:\n 'Content to be placed before the input text, within the input container.',\n args: {\n label: 'Leading Input',\n },\n template: (\n <nv-fieldpassword data-storybook-args>\n <nv-badge\n slot=\"leading-input\"\n label=\"Leading\"\n dismissible\n data-class=\"ml-1\"\n ></nv-badge>\n </nv-fieldpassword>\n ),\n },\n {\n name: 'labelSlot',\n description:\n 'Content to be placed as the label, will override the label prop.',\n args: {\n label: 'Original Label',\n },\n template: (\n <nv-fieldpassword data-storybook-args>\n <span slot=\"label\">Custom Label</span>\n </nv-fieldpassword>\n ),\n },\n {\n name: 'descriptionSlot',\n description:\n 'Content to be placed as the description, will override the description prop.',\n args: {\n label: 'Description Slot',\n description: 'Original description',\n },\n template: (\n <nv-fieldpassword data-storybook-args>\n <span slot=\"description\">Custom Description</span>\n </nv-fieldpassword>\n ),\n },\n {\n name: 'errorDescriptionSlot',\n description:\n 'Content to be placed as the error description, will override the errorDescription prop.',\n args: {\n label: 'Error Description Slot',\n errorDescription: 'Original error description',\n error: true,\n },\n template: (\n <nv-fieldpassword data-storybook-args>\n <span slot=\"error-description\">Custom Error Description</span>\n </nv-fieldpassword>\n ),\n },\n ],\n};\n\nexport default NvFieldpasswordDocs;\n"]}
1
+ {"version":3,"file":"nv-fieldpassword.docs.js","sourceRoot":"","sources":["../../../src/components/nv-fieldpassword/nv-fieldpassword.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,WAAW,EAAE,UAAU,CAAC;IACxC,OAAO,EAAE;QACP;YACE,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,sDAAyD;SACpE;QACD;YACE,IAAI,EAAE,MAAM,CAA6B,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;YACtD,IAAI,EAAE;gBACJ,KAAK,EAAE,gBAAgB;aACxB;YACD,QAAQ,EAAE,sDAAyD;SACpE;QACD;YACE,IAAI,EAAE,MAAM,CAA6B,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC;YAC5D,IAAI,EAAE;gBACJ,KAAK,EAAE,sBAAsB;gBAC7B,WAAW,EAAE,0BAA0B;aACxC;YACD,QAAQ,EAAE,sDAAyD;SACpE;QACD;YACE,IAAI,EAAE,MAAM,CAA6B,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC;YAC5D,IAAI,EAAE;gBACJ,KAAK,EAAE,sBAAsB;gBAC7B,WAAW,EAAE,wBAAwB;aACtC;YACD,QAAQ,EAAE,sDAAyD;SACpE;QACD;YACE,IAAI,EA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E;YAChF,IAAI,EAAE;gBACJ,KAAK,EAAE,kBAAkB;gBACzB,WAAW,EAAE,sBAAsB;aACpC;YACD,QAAQ,EAAE,CACR;gBACE,YAAM,IAAI,EAAC,aAAa,yBAA0B,CACjC,CACpB;SACF;QACD;YACE,IAAI,EAAE,sBAAsB;YAC5B,WAAW,EACT,yFAAyF;YAC3F,IAAI,EAAE;gBACJ,KAAK,EAAE,wBAAwB;gBAC/B,gBAAgB,EAAE,4BAA4B;gBAC9C,KAAK,EAAE,IAAI;aACZ;YACD,QAAQ,EAAE,CACR;gBACE,YAAM,IAAI,EAAC,mBAAmB,+BAAgC,CAC7C,CACpB;SACF;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 NvFieldpasswordDocs: NovaDocs<Components.NvFieldpassword> = {\n component: 'nv-fieldpassword',\n subcomponents: ['nv-button', 'nv-badge'],\n stories: [\n {\n name: 'Default',\n template: <nv-fieldpassword data-storybook-args></nv-fieldpassword>,\n },\n {\n name: nameof<Components.NvFieldpassword>(x => x.label),\n args: {\n label: 'Password Label',\n },\n template: <nv-fieldpassword data-storybook-args></nv-fieldpassword>,\n },\n {\n name: nameof<Components.NvFieldpassword>(x => x.description),\n args: {\n label: 'Password Description',\n description: 'Enter a strong password.',\n },\n template: <nv-fieldpassword data-storybook-args></nv-fieldpassword>,\n },\n {\n name: nameof<Components.NvFieldpassword>(x => x.placeholder),\n args: {\n label: 'Password Placeholder',\n placeholder: 'Enter your password...',\n },\n template: <nv-fieldpassword data-storybook-args></nv-fieldpassword>,\n },\n {\n name: nameof<Components.NvFieldpassword>(x => x.name),\n args: {\n label: 'Password Name',\n name: 'password',\n },\n template: <nv-fieldpassword data-storybook-args></nv-fieldpassword>,\n },\n {\n name: nameof<Components.NvFieldpassword>(x => x.value),\n args: {\n label: 'Password Value',\n value: 'password123',\n },\n template: <nv-fieldpassword data-storybook-args></nv-fieldpassword>,\n },\n {\n name: nameof<Components.NvFieldpassword>(x => x.disabled),\n args: {\n label: 'Password Disabled',\n disabled: true,\n },\n template: <nv-fieldpassword data-storybook-args></nv-fieldpassword>,\n },\n {\n name: nameof<Components.NvFieldpassword>(x => x.readonly),\n args: {\n label: 'Password Readonly',\n readonly: true,\n value: 'readonlypassword',\n },\n template: <nv-fieldpassword data-storybook-args></nv-fieldpassword>,\n },\n {\n name: nameof<Components.NvFieldpassword>(x => x.required),\n args: {\n label: 'Password Required',\n required: true,\n },\n template: <nv-fieldpassword data-storybook-args></nv-fieldpassword>,\n },\n {\n name: nameof<Components.NvFieldpassword>(x => x.error),\n args: {\n label: 'Password Error',\n error: true,\n },\n template: <nv-fieldpassword data-storybook-args></nv-fieldpassword>,\n },\n {\n name: nameof<Components.NvFieldpassword>(x => x.errorDescription),\n args: {\n label: 'Password Error Description',\n description: 'Ensure your password is correct.',\n error: true,\n errorDescription: 'This password is incorrect.',\n },\n template: <nv-fieldpassword data-storybook-args></nv-fieldpassword>,\n },\n {\n name: nameof<Components.NvFieldpassword>(x => x.success),\n args: {\n label: 'Password Success',\n success: true,\n },\n template: <nv-fieldpassword data-storybook-args></nv-fieldpassword>,\n },\n {\n name: nameof<Components.NvFieldpassword>(x => x.maxlength),\n args: {\n label: 'Password Max Length (max 4 characters)',\n maxlength: 4,\n },\n template: <nv-fieldpassword data-storybook-args></nv-fieldpassword>,\n },\n {\n name: nameof<Components.NvFieldpassword>(x => x.minlength),\n args: {\n label: 'Password Min Length (min 4 characters)',\n minlength: 4,\n },\n template: <nv-fieldpassword data-storybook-args></nv-fieldpassword>,\n },\n {\n name: nameof<Components.NvFieldpassword>(x => x.hidePasswordIcon),\n args: {\n label: 'Password Hide Icon',\n hidePasswordIcon: true,\n },\n template: <nv-fieldpassword data-storybook-args></nv-fieldpassword>,\n },\n {\n name: nameof<Components.NvFieldpassword>(x => x.showPassword),\n args: {\n label: 'Password Show Text',\n value: 'password123',\n showPassword: true,\n },\n template: <nv-fieldpassword data-storybook-args></nv-fieldpassword>,\n },\n {\n name: nameof<Components.NvFieldpassword>(x => x.autofocus),\n args: {\n label: 'Autofocus',\n autofocus: true,\n },\n template: <nv-fieldpassword data-storybook-args></nv-fieldpassword>,\n },\n {\n name: nameof<Components.NvFieldpassword>(x => x.fluid),\n args: {\n label: 'Fluid',\n fluid: true,\n },\n template: <nv-fieldpassword data-storybook-args></nv-fieldpassword>,\n },\n {\n name: 'beforeInputSlot',\n description:\n 'Content to be placed before the input text, outside the input container.',\n args: {\n label: 'Before Input Slot',\n description: 'This is placed before the password field',\n },\n template: (\n <nv-fieldpassword data-storybook-args>\n <nv-button slot=\"before-input\">Before Input Slot</nv-button>\n </nv-fieldpassword>\n ),\n },\n {\n name: 'afterInputSlot',\n description:\n 'Content to be placed after the input text, outside the input container.',\n args: {\n label: 'After Input Slot',\n description: 'This is placed after the password field',\n },\n template: (\n <nv-fieldpassword data-storybook-args>\n <nv-button slot=\"after-input\">After Input Slot</nv-button>\n </nv-fieldpassword>\n ),\n },\n {\n name: 'leadingInputSlot',\n description:\n 'Content to be placed before the input text, within the input container.',\n args: {\n label: 'Leading Input',\n },\n template: (\n <nv-fieldpassword data-storybook-args>\n <nv-badge\n slot=\"leading-input\"\n label=\"Leading\"\n dismissible\n data-class=\"ml-1\"\n ></nv-badge>\n </nv-fieldpassword>\n ),\n },\n {\n name: 'labelSlot',\n description:\n 'Content to be placed as the label, will override the label prop.',\n args: {\n label: 'Original Label',\n },\n template: (\n <nv-fieldpassword data-storybook-args>\n <span slot=\"label\">Custom Label</span>\n </nv-fieldpassword>\n ),\n },\n {\n name: 'descriptionSlot',\n description:\n 'Content to be placed as the description, will override the description prop.',\n args: {\n label: 'Description Slot',\n description: 'Original description',\n },\n template: (\n <nv-fieldpassword data-storybook-args>\n <span slot=\"description\">Custom Description</span>\n </nv-fieldpassword>\n ),\n },\n {\n name: 'errorDescriptionSlot',\n description:\n 'Content to be placed as the error description, will override the errorDescription prop.',\n args: {\n label: 'Error Description Slot',\n errorDescription: 'Original error description',\n error: true,\n },\n template: (\n <nv-fieldpassword data-storybook-args>\n <span slot=\"error-description\">Custom Error Description</span>\n </nv-fieldpassword>\n ),\n },\n ],\n};\n\nexport default NvFieldpasswordDocs;\n"]}
@@ -73,6 +73,10 @@ export class NvFieldpassword {
73
73
  * element.
74
74
  */
75
75
  this.autofocus = false;
76
+ /**
77
+ * Allows the field to stretch and fill the entire width of its container.
78
+ */
79
+ this.fluid = false;
76
80
  //#endregion EVENTS
77
81
  /****************************************************************************/
78
82
  //#region METHODS
@@ -101,9 +105,9 @@ export class NvFieldpassword {
101
105
  /****************************************************************************/
102
106
  //#region RENDER
103
107
  render() {
104
- return (h(Host, { key: '4a6de90f24bd6607293d616d60f6d742c46b04a9' }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: '715f5935de3aa0f0f7b6aa9aa72c409a3875a849', htmlFor: this.inputId }, h("slot", { key: 'da11187833b12acfae578024bb67d717efbafaa1', name: "label" }, this.label))), h("div", { key: 'a669823e6c5aea5b4e0aacf0bfc1c8f7dbe67bab', class: "input-wrapper" }, h("slot", { key: '98b2b6eaaa867228a667bec2920c640ff0b829c7', name: "before-input" }), h("div", { key: 'fc896f9018563e80ea0f2aa1e2eb7992fd4a854c', class: "input-container", onClick: this.handleInputContainerClick }, h("slot", { key: '715814e77d1ba40463253d12751129f2c0d05407', name: "leading-input" }), h("input", { key: '8101af836f80da56ac9e2b859ab9fd5b6d254b91', id: this.inputId, ref: e => (this.inputElement = e), autofocus: this.autofocus, autocomplete: this.autocomplete, placeholder: this.placeholder, name: this.name, type: this.showPasswordState ? 'text' : 'password', inputMode: this.mode, value: this.value, required: this.required, maxlength: this.maxlength, minlength: this.minlength, pattern: this.pattern, disabled: this.disabled, readOnly: this.readonly, onInput: this.handleInput }), (this.success || this.error) && (h("nv-icon", { key: 'fdf5caa936a43961bd3f00f5d50635124b57ff0b', name: this.success ? 'circle-check' : 'alert-circle', class: "validation", size: "md" })), !this.hidePasswordIcon && (h("nv-iconbutton", { key: '9b9e70d855fca2ea1ff2769609af05fc7d3fd1c2', name: this.showPasswordState ? 'eye' : 'eye-off', size: "md", emphasis: "lower", onClick: this.togglePasswordVisibility, "aria-label": this.showPasswordState ? 'Hide password' : 'Show password', "aria-pressed": this.showPasswordState.toString() }))), h("slot", { key: '4458e83104562509b53b05faf3a316a5502b76b7', name: "after-input" })), (this.description ||
105
- this.el.querySelector('[slot="description"]')) && (h("div", { key: '91dcddd8a80abccaaffda9cd583759bebf376456', class: "description" }, h("slot", { key: 'fe6da6eb725b3866faf138e848f89152f0f24a00', name: "description" }, this.description))), (this.errorDescription ||
106
- this.el.querySelector('[slot="error-description"]')) && (h("div", { key: 'bfe57a6b0f199c3b371a2036a7b8787f40f639a4', hidden: !this.error, class: "error-description" }, h("slot", { key: '529e34f2197c64ac768df11251bb285fec1f2cd5', name: "error-description" }, this.errorDescription)))));
108
+ return (h(Host, { key: '79c3035769b9053d53d62526b2e0d430d5f944ae' }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: '2341f2b9ae8c5acb8ce48e15caae8a629a1c0333', htmlFor: this.inputId }, h("slot", { key: 'ad2301f92adf58c460d4ca76681330b133db2f33', name: "label" }, this.label))), h("div", { key: 'c12f8401a41c6761686b74e725dd91911eaafbb0', class: "input-wrapper" }, h("slot", { key: 'badd6d65663029bc3252ef0818bb1c6220d01ddf', name: "before-input" }), h("div", { key: '0ffb2332657f893c00fe2ca68f4bbbd622bb31f1', class: "input-container", onClick: this.handleInputContainerClick }, h("slot", { key: 'afa1daa6fab0f2a46ab46f0c99e4e4cf10d7a1fe', name: "leading-input" }), h("input", { key: 'cc567c4a7fe51a24a99c7a471294d7f6086d8b2d', id: this.inputId, ref: e => (this.inputElement = e), autofocus: this.autofocus, autocomplete: this.autocomplete, placeholder: this.placeholder, name: this.name, type: this.showPasswordState ? 'text' : 'password', inputMode: this.mode, value: this.value, required: this.required, maxlength: this.maxlength, minlength: this.minlength, pattern: this.pattern, disabled: this.disabled, readOnly: this.readonly, onInput: this.handleInput }), (this.success || this.error) && (h("nv-icon", { key: '7087d6e35b30de786f3ded46fc74dc9987af6afa', name: this.success ? 'circle-check' : 'alert-circle', class: "validation", size: "md" })), !this.hidePasswordIcon && (h("nv-iconbutton", { key: '6fe5e3936ef42c79ed8a5b8a959a22ecbbe52fd6', name: this.showPasswordState ? 'eye' : 'eye-off', size: "md", emphasis: "lower", onClick: this.togglePasswordVisibility, "aria-label": this.showPasswordState ? 'Hide password' : 'Show password', "aria-pressed": this.showPasswordState.toString() }))), h("slot", { key: 'eab04665ad3394860ad30e366eaf18ae4aee445a', name: "after-input" })), (this.description ||
109
+ this.el.querySelector('[slot="description"]')) && (h("div", { key: '5bc5bd055301bf5fe1b801c2091cd3307c79104f', class: "description" }, h("slot", { key: '133ebfcb219aaa0c5fd64e4442c1125b26c623b4', name: "description" }, this.description))), (this.errorDescription ||
110
+ this.el.querySelector('[slot="error-description"]')) && (h("div", { key: '2a319732006d29becaa602ae16f2d8e885214931', hidden: !this.error, class: "error-description" }, h("slot", { key: 'e6e75fe487745820b1b8d3de1ed52df8aa9652d4', name: "error-description" }, this.errorDescription)))));
107
111
  }
108
112
  static get is() { return "nv-fieldpassword"; }
109
113
  static get formAssociated() { return true; }
@@ -524,6 +528,26 @@ export class NvFieldpassword {
524
528
  "attribute": "autofocus",
525
529
  "reflect": true,
526
530
  "defaultValue": "false"
531
+ },
532
+ "fluid": {
533
+ "type": "boolean",
534
+ "mutable": false,
535
+ "complexType": {
536
+ "original": "boolean",
537
+ "resolved": "boolean",
538
+ "references": {}
539
+ },
540
+ "required": false,
541
+ "optional": false,
542
+ "docs": {
543
+ "tags": [],
544
+ "text": "Allows the field to stretch and fill the entire width of its container."
545
+ },
546
+ "getter": false,
547
+ "setter": false,
548
+ "attribute": "fluid",
549
+ "reflect": true,
550
+ "defaultValue": "false"
527
551
  }
528
552
  };
529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;gBACrB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,4BAA4B,CAAC,CAAC,IAAI,CACxD,4DAAK,MAAM,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,EAAC,mBAAmB;gBACjD,6DAAM,IAAI,EAAC,mBAAmB,IAAE,IAAI,CAAC,gBAAgB,CAAQ,CACzD,CACP,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGF","sourcesContent":["import {\n Component,\n Prop,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n State,\n Watch,\n} from '@stencil/core';\nimport { v4 as uuidv4 } from 'uuid';\nimport { TextInputAutocomplete } from '../../utils/constants';\n\n/**\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-fieldpassword',\n styleUrl: 'nv-fieldpassword.scss',\n shadow: false,\n formAssociated: true,\n})\nexport class NvFieldpassword {\n @Element() el: HTMLNvFieldpasswordElement;\n private inputElement!: HTMLInputElement;\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 // eslint-disable-next-line @stencil-community/strict-mutable\n @Prop({ reflect: true, mutable: true })\n 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 */\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 * 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 * 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 * 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 * 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 password\n * field.\n * @validator message\n */\n @Prop({ reflect: true })\n readonly errorDescription: string;\n\n /**\n * Changes the input field’s appearance to indicate successful input or\n * validation.\n */\n @Prop({ reflect: true })\n readonly success: boolean = false;\n\n /**\n * Limits how many characters users can type into the input field. It’s\n * helpful for making sure users don’t enter too much information, keeping\n * their input within the allowed limit.\n */\n @Prop({ reflect: true })\n readonly maxlength: number;\n\n /**\n * Ensures that users type at least a certain number of characters into the\n * input field. It’s a way to make sure users provide enough information\n * before moving on.\n */\n @Prop({ reflect: true })\n readonly minlength: number;\n\n /**\n * Set rules for how the input should be formatted. For example, you can\n * require that a phone number includes only digits or that an email address\n * has the correct format. If users don’t follow these rules, they’ll get a\n * prompt to correct their input on form submission.\n * the rules are applied to the input value via regexes.\n */\n @Prop({ reflect: true })\n readonly pattern: string;\n\n /**\n * Defines the type of the input.\n * @default 'text'\n */\n @Prop({ reflect: true })\n readonly mode: 'text' | 'number' = 'text';\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 * Hide the button to show/hide the password.\n */\n @Prop({ reflect: true })\n readonly hidePasswordIcon: boolean = false;\n\n /**\n * Show/hide the password programmatically.\n */\n @Prop({ reflect: true })\n readonly showPassword: boolean = false;\n\n /**\n * Defines whether the password is visible or not.\n */\n @State()\n showPasswordState: boolean;\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 EVENTS\n\n /**\n * Emitted when the input value changes.\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<string>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region METHODS\n\n private handleInputContainerClick = () => {\n this.inputElement.focus();\n };\n\n @Watch('showPassword')\n handleShowPasswordChange(newValue: boolean) {\n this.showPasswordState = newValue;\n }\n\n private togglePasswordVisibility = () => {\n this.showPasswordState = !this.showPasswordState;\n };\n\n private handleInput = (event: Event) => {\n const input = event.target as HTMLInputElement;\n this.value = input.value; // Update the input value without worrying about the space\n this.valueChanged.emit(input.value);\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillLoad() {\n this.showPasswordState = this.showPassword;\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n {(this.label || this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.inputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n\n <div class=\"input-wrapper\">\n <slot name=\"before-input\"></slot>\n\n <div class=\"input-container\" onClick={this.handleInputContainerClick}>\n <slot name=\"leading-input\"></slot>\n\n <input\n id={this.inputId}\n ref={e => (this.inputElement = e)}\n autofocus={this.autofocus}\n autocomplete={this.autocomplete}\n placeholder={this.placeholder}\n name={this.name}\n type={this.showPasswordState ? 'text' : 'password'}\n inputMode={this.mode}\n value={this.value}\n required={this.required}\n maxlength={this.maxlength}\n minlength={this.minlength}\n pattern={this.pattern}\n disabled={this.disabled}\n readOnly={this.readonly}\n onInput={this.handleInput}\n />\n\n {(this.success || this.error) && (\n <nv-icon\n name={this.success ? 'circle-check' : 'alert-circle'}\n class=\"validation\"\n size=\"md\"\n />\n )}\n\n {!this.hidePasswordIcon && (\n <nv-iconbutton\n name={this.showPasswordState ? 'eye' : 'eye-off'}\n size=\"md\"\n emphasis=\"lower\"\n onClick={this.togglePasswordVisibility}\n aria-label={\n this.showPasswordState ? 'Hide password' : 'Show password'\n }\n aria-pressed={this.showPasswordState.toString()}\n />\n )}\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\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\n //#endregion RENDER\n}\n"]}
1
+ {"version":3,"file":"nv-fieldpassword.js","sourceRoot":"","sources":["../../../src/components/nv-fieldpassword/nv-fieldpassword.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,OAAO,EACP,KAAK,EAEL,CAAC,EACD,IAAI,EACJ,KAAK,EACL,KAAK,GACN,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AAGpC;;;;;;;GAOG;AAOH,MAAM,OAAO,eAAe;IAN5B;QAUE,8EAA8E;QAC9E,oBAAoB;QAEpB;;;;;WAKG;QAEM,YAAO,GAAW,MAAM,EAAE,CAAC;QA4CpC;;;;WAIG;QAEM,aAAQ,GAAY,KAAK,CAAC;QAEnC;;;;WAIG;QAEM,aAAQ,GAAY,KAAK,CAAC;QAEnC;;;WAGG;QAEM,aAAQ,GAAY,KAAK,CAAC;QAEnC;;;;WAIG;QAEM,UAAK,GAAY,KAAK,CAAC;QAUhC;;;WAGG;QAEM,YAAO,GAAY,KAAK,CAAC;QA4BlC;;;WAGG;QAEM,SAAI,GAAsB,MAAM,CAAC;QAE1C;;;;;WAKG;QAEM,iBAAY,GAA+B,KAAK,CAAC;QAE1D;;WAEG;QAEM,qBAAgB,GAAY,KAAK,CAAC;QAE3C;;WAEG;QAEM,iBAAY,GAAY,KAAK,CAAC;QAQvC;;;;WAIG;QAGM,cAAS,GAAY,KAAK,CAAC;QAEpC;;WAEG;QAEM,UAAK,GAAY,KAAK,CAAC;QAahC,mBAAmB;QACnB,8EAA8E;QAC9E,iBAAi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AM,IAAI,EAAC,aAAa,GAAQ,CAC5B;YAEL,CAAC,IAAI,CAAC,WAAW;gBAChB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,sBAAsB,CAAC,CAAC,IAAI,CAClD,4DAAK,KAAK,EAAC,aAAa;gBACtB,6DAAM,IAAI,EAAC,aAAa,IAAE,IAAI,CAAC,WAAW,CAAQ,CAC9C,CACP;YAEA,CAAC,IAAI,CAAC,gBAAgB;gBACrB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,4BAA4B,CAAC,CAAC,IAAI,CACxD,4DAAK,MAAM,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,EAAC,mBAAmB;gBACjD,6DAAM,IAAI,EAAC,mBAAmB,IAAE,IAAI,CAAC,gBAAgB,CAAQ,CACzD,CACP,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGF","sourcesContent":["import {\n Component,\n Prop,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n State,\n Watch,\n} from '@stencil/core';\nimport { v4 as uuidv4 } from 'uuid';\nimport { TextInputAutocomplete } from '../../utils/constants';\n\n/**\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-fieldpassword',\n styleUrl: 'nv-fieldpassword.scss',\n shadow: false,\n formAssociated: true,\n})\nexport class NvFieldpassword {\n @Element() el: HTMLNvFieldpasswordElement;\n private inputElement!: HTMLInputElement;\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 // eslint-disable-next-line @stencil-community/strict-mutable\n @Prop({ reflect: true, mutable: true })\n 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 */\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 * 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 * 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 * 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 * 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 password\n * field.\n * @validator message\n */\n @Prop({ reflect: true })\n readonly errorDescription: string;\n\n /**\n * Changes the input field’s appearance to indicate successful input or\n * validation.\n */\n @Prop({ reflect: true })\n readonly success: boolean = false;\n\n /**\n * Limits how many characters users can type into the input field. It’s\n * helpful for making sure users don’t enter too much information, keeping\n * their input within the allowed limit.\n */\n @Prop({ reflect: true })\n readonly maxlength: number;\n\n /**\n * Ensures that users type at least a certain number of characters into the\n * input field. It’s a way to make sure users provide enough information\n * before moving on.\n */\n @Prop({ reflect: true })\n readonly minlength: number;\n\n /**\n * Set rules for how the input should be formatted. For example, you can\n * require that a phone number includes only digits or that an email address\n * has the correct format. If users don’t follow these rules, they’ll get a\n * prompt to correct their input on form submission.\n * the rules are applied to the input value via regexes.\n */\n @Prop({ reflect: true })\n readonly pattern: string;\n\n /**\n * Defines the type of the input.\n * @default 'text'\n */\n @Prop({ reflect: true })\n readonly mode: 'text' | 'number' = 'text';\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 * Hide the button to show/hide the password.\n */\n @Prop({ reflect: true })\n readonly hidePasswordIcon: boolean = false;\n\n /**\n * Show/hide the password programmatically.\n */\n @Prop({ reflect: true })\n readonly showPassword: boolean = false;\n\n /**\n * Defines whether the password is visible or not.\n */\n @State()\n showPasswordState: boolean;\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 EVENTS\n\n /**\n * Emitted when the input value changes.\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<string>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region METHODS\n\n private handleInputContainerClick = () => {\n this.inputElement.focus();\n };\n\n @Watch('showPassword')\n handleShowPasswordChange(newValue: boolean) {\n this.showPasswordState = newValue;\n }\n\n private togglePasswordVisibility = () => {\n this.showPasswordState = !this.showPasswordState;\n };\n\n private handleInput = (event: Event) => {\n const input = event.target as HTMLInputElement;\n this.value = input.value; // Update the input value without worrying about the space\n this.valueChanged.emit(input.value);\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillLoad() {\n this.showPasswordState = this.showPassword;\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n {(this.label || this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.inputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n\n <div class=\"input-wrapper\">\n <slot name=\"before-input\"></slot>\n\n <div class=\"input-container\" onClick={this.handleInputContainerClick}>\n <slot name=\"leading-input\"></slot>\n\n <input\n id={this.inputId}\n ref={e => (this.inputElement = e)}\n autofocus={this.autofocus}\n autocomplete={this.autocomplete}\n placeholder={this.placeholder}\n name={this.name}\n type={this.showPasswordState ? 'text' : 'password'}\n inputMode={this.mode}\n value={this.value}\n required={this.required}\n maxlength={this.maxlength}\n minlength={this.minlength}\n pattern={this.pattern}\n disabled={this.disabled}\n readOnly={this.readonly}\n onInput={this.handleInput}\n />\n\n {(this.success || this.error) && (\n <nv-icon\n name={this.success ? 'circle-check' : 'alert-circle'}\n class=\"validation\"\n size=\"md\"\n />\n )}\n\n {!this.hidePasswordIcon && (\n <nv-iconbutton\n name={this.showPasswordState ? 'eye' : 'eye-off'}\n size=\"md\"\n emphasis=\"lower\"\n onClick={this.togglePasswordVisibility}\n aria-label={\n this.showPasswordState ? 'Hide password' : 'Show password'\n }\n aria-pressed={this.showPasswordState.toString()}\n />\n )}\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\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\n //#endregion RENDER\n}\n"]}
@@ -83,9 +83,9 @@ export class NvFieldradio {
83
83
  /****************************************************************************/
84
84
  //#region RENDER
85
85
  render() {
86
- return (h(Host, { key: 'e1a92204a7d3e07de9485873906ed57dc2f4dfb1', class: clsx(this.labelPlacement === 'before' && 'label-placement-before', this.error && 'error') }, h("input", { key: '8161b36c31b960a4ca4f7a1291a9cdbdd830429c', type: "radio", id: this.inputId, name: this.name, autofocus: this.autofocus, autocomplete: "off", value: this.value, checked: this.checked, disabled: this.disabled }), h("div", { key: '8d5ff5b5742a96dc9d1167298859a7a97347eeab', class: "text-container" }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: '7417fe1c5041e20fd63abca907fd75fe7d3b49d2', htmlFor: this.inputId }, h("slot", { key: 'e29a092dbd19c912c496e1ae56d9f46bcb44208c', name: "label" }, this.label))), (this.description ||
87
- this.el.querySelector('[slot="description"]')) && (h("div", { key: 'a894108a6e5235010d18547a39daf526e066e432', class: "description" }, h("slot", { key: 'c67b5b5a5d2ef1f27e69eb251e9a15c98909db85', name: "description" }, this.description))), (this.errorDescription ||
88
- this.el.querySelector('[slot="error-description"]')) && (h("div", { key: '18ea2ae58994289900f28c0e6220e113b45b2a92', hidden: !this.error, class: "error-description" }, h("slot", { key: '52a10763fb7bf688e5a1de5e854aa0d80bc996f4', name: "error-description" }, this.errorDescription))))));
86
+ return (h(Host, { key: '544fc138c91a08a1359ec0d30e89a9bda07eae94', class: clsx(this.labelPlacement === 'before' && 'label-placement-before', this.error && 'error') }, h("input", { key: '479908232ade17970c3310f3fec173a86ccea67d', type: "radio", id: this.inputId, name: this.name, autofocus: this.autofocus, autocomplete: "off", value: this.value, checked: this.checked, disabled: this.disabled }), h("div", { key: '624094a1d3819f627bdd6f554ee07200ecd4d03f', class: "text-container" }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: '8df4721447e7de7d5c1c51880eb5b5a62041910d', htmlFor: this.inputId }, h("slot", { key: '0e14392a7e6a87804d0975a38b6b011f519457ae', name: "label" }, this.label))), (this.description ||
87
+ this.el.querySelector('[slot="description"]')) && (h("div", { key: 'ad635756eb65ebaa6e939d6e1870d196d3bafe2c', class: "description" }, h("slot", { key: '13f720591e43b8532dfc5367089c17dccd9c4e77', name: "description" }, this.description))), (this.errorDescription ||
88
+ this.el.querySelector('[slot="error-description"]')) && (h("div", { key: '597cee5e36cd63c209b60b8a533b4c6de8d5ba0e', hidden: !this.error, class: "error-description" }, h("slot", { key: '49e1f0deac817a5c49738110862a7b081672510f', name: "error-description" }, this.errorDescription))))));
89
89
  }
90
90
  static get is() { return "nv-fieldradio"; }
91
91
  static get formAssociated() { return true; }
@@ -11,6 +11,10 @@ nv-fieldselect {
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-fieldselect[fluid]:not([fluid=false]) {
17
+ max-width: unset;
14
18
  }
15
19
  nv-fieldselect[readonly]:not([readonly=false]) {
16
20
  --nv-field-border-default: var(--components-form-field-border-readonly);
@@ -128,6 +132,7 @@ nv-fieldselect .select-wrapper .select-container input {
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-fieldselect .select-wrapper .select-container input:focus {
133
138
  outline: none;
@@ -113,6 +113,14 @@ const NvFieldselectDocs = {
113
113
  description: 'You can use the `label` slot to customize the content of the label.',
114
114
  template: (h("nv-fieldselect", { "data-storybook-args": true }, h("span", { slot: "label" }, "Label"), h("option", { value: "1" }, "Option 1"), h("option", { value: "2" }, "Option 2"), h("option", { value: "3" }, "Option 3"), h("option", { value: "4" }, "Option 4"))),
115
115
  },
116
+ {
117
+ name: nameof(x => x.fluid),
118
+ args: {
119
+ label: 'Fluid',
120
+ fluid: true,
121
+ },
122
+ template: (h("nv-fieldselect", { "data-storybook-args": true }, h("option", { value: "1" }, "Option 1"), h("option", { value: "2" }, "Option 2"), h("option", { value: "3" }, "Option 3"), h("option", { value: "4" }, "Option 4"))),
123
+ },
116
124
  {
117
125
  name: 'SlotDescription',
118
126
  description: 'You can use the `description` slot to customize the content of the description.',
@@ -1 +1 @@
1
- {"version":3,"file":"nv-fieldselect.docs.js","sourceRoot":"","sources":["../../../src/components/nv-fieldselect/nv-fieldselect.docs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAGlC,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEjD,MAAM,iBAAiB,GAAuC;IAC5D,SAAS,EAAE,gBAAgB;IAC3B,aAAa,EAAE,CAAC,UAAU,EAAE,WAAW,CAAC;IACxC,OAAO,EAAE;QACP;YACE,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,sDAAsD;YACnE,QAAQ,EAAE,CACR;gBACE,cAAQ,KAAK,EAAC,GAAG,eAAkB;gBACnC,cAAQ,KAAK,EAAC,GAAG,eAAkB;gBACnC,cAAQ,KAAK,EAAC,G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AAE,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,CAAC;aACH;YACD,QAAQ,EAAE,oDAAqD;SAChE;KACF;CACF,CAAC;AAEF,eAAe,iBAAiB,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 NvFieldselectDocs: NovaDocs<Components.NvFieldselect> = {\n component: 'nv-fieldselect',\n subcomponents: ['nv-badge', 'nv-button'],\n stories: [\n {\n name: 'Default',\n description: 'A default nv-fieldselect with no specific props set.',\n template: (\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: nameof<Components.NvFieldselect>(x => x.label),\n args: {\n label: 'Select Label',\n },\n template: (\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: nameof<Components.NvFieldselect>(x => x.description),\n args: {\n label: 'Select with Description',\n description: 'This is a description.',\n },\n template: (\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: 'Placeholder',\n description:\n 'Display temporary text inside the select field to give users a hint about what to choose.',\n args: {\n label: 'Select with Placeholder',\n },\n template: (\n <nv-fieldselect data-storybook-args>\n <option value=\"\" disabled>\n Choose an option...\n </option>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: nameof<Components.NvFieldselect>(x => x.value),\n args: {\n label: 'Select Value',\n value: '2',\n },\n template: (\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: nameof<Components.NvFieldselect>(x => x.disabled),\n args: {\n label: 'Disabled Select',\n disabled: true,\n value: '3',\n },\n template: (\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: nameof<Components.NvFieldselect>(x => x.readonly),\n args: {\n label: 'Readonly Select',\n readonly: true,\n value: '1',\n },\n template: (\n <div data-class=\"flex flex-col gap-2\">\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n <nv-fieldselect data-storybook-args multiple={true}>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n </div>\n ),\n },\n {\n name: nameof<Components.NvFieldselect>(x => x.displayValue),\n args: {\n label: 'Readonly Select with Display Label',\n readonly: true,\n displayValue: true,\n value: '1',\n },\n template: (\n <div data-class=\"flex flex-col gap-2\">\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n </nv-fieldselect>\n <nv-fieldselect data-storybook-args multiple={true}>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n </nv-fieldselect>\n </div>\n ),\n },\n {\n name: nameof<Components.NvFieldselect>(x => x.required),\n args: {\n label: 'Required Field',\n required: true,\n },\n template: (\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: nameof<Components.NvFieldselect>(x => x.error),\n args: {\n label: 'Error State',\n error: true,\n },\n template: (\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: nameof<Components.NvFieldselect>(x => x.success),\n args: {\n label: 'Success State',\n success: true,\n },\n template: (\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: nameof<Components.NvFieldselect>(x => x.multiple),\n args: {\n label: 'Multiple Select',\n multiple: true,\n },\n template: (\n <div data-class=\"flex flex-col gap-2\">\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n <nv-fieldselect value=\"1, 2\" data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n </div>\n ),\n },\n {\n name: nameof<Components.NvFieldselect>(x => x.autofocus),\n args: {\n label: 'Autofocus',\n autofocus: true,\n },\n template: (\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: 'SlotLabel',\n description:\n 'You can use the `label` slot to customize the content of the label.',\n template: (\n <nv-fieldselect data-storybook-args>\n <span slot=\"label\">Label</span>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: 'SlotDescription',\n description:\n 'You can use the `description` slot to customize the content of the description.',\n args: {\n label: 'Select with Description',\n description: 'This is a description.',\n },\n template: (\n <nv-fieldselect data-storybook-args>\n <span slot=\"description\">Description</span>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: 'SlotBefore',\n description:\n 'You can use the `before` slot to customize the content before the select.',\n template: (\n <nv-fieldselect data-storybook-args>\n <span slot=\"before\">Before</span>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: 'SlotAfter',\n description:\n 'You can use the `after` slot to customize the content after the select.',\n template: (\n <nv-fieldselect data-storybook-args>\n <span slot=\"after\">After</span>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: 'SlotErrorDescription',\n description:\n 'You can use the `error-description` slot to customize the content of the error description.',\n args: {\n label: 'Select with Error',\n error: true,\n errorDescription: 'This is an error.',\n },\n template: (\n <nv-fieldselect data-storybook-args>\n <span slot=\"error-description\">Error Description</span>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: 'Options JSON',\n args: {\n label: 'Select with JSON Options',\n options: JSON.stringify([\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-fieldselect data-storybook-args></nv-fieldselect>,\n },\n {\n name: 'Options JSON Preselected',\n args: {\n label: 'Select with Preselected JSON Option',\n options: JSON.stringify([\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-fieldselect data-storybook-args></nv-fieldselect>,\n },\n ],\n};\n\nexport default NvFieldselectDocs;\n"]}
1
+ {"version":3,"file":"nv-fieldselect.docs.js","sourceRoot":"","sources":["../../../src/components/nv-fieldselect/nv-fieldselect.docs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAGlC,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEjD,MAAM,iBAAiB,GAAuC;IAC5D,SAAS,EAAE,gBAAgB;IAC3B,aAAa,EAAE,CAAC,UAAU,EAAE,WAAW,CAAC;IACxC,OAAO,EAAE;QACP;YACE,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,sDAAsD;YACnE,QAAQ,EAAE,CACR;gBACE,cAAQ,KAAK,EAAC,GAAG,eAAkB;gBACnC,cAAQ,KAAK,EAAC,GAAG,eAAkB;gBACnC,cAAQ,KAAK,EAAC,GAAG,eAAkB;gBACnC,cAAQ,KAAK,EAAC,GAAG,eAAkB,CACpB,CAClB;SACF;QACD;YACE,IAAI,EAAE,MAAM,CAA2B,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;YACpD,IAAI,EAAE;gBACJ,KAAK,EAAE,cAAc;aACtB;YACD,QAAQ,EAAE,CACR;gBACE,cAAQ,KAAK,EAAC,GAAG,eAAkB;gBACnC,cAAQ,KAAK,EAAC,GAAG,eAAkB;gBACnC,cAAQ,KAAK,EAAC,GAAG,eAAkB;gBACn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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,CAAC;aACH;YACD,QAAQ,EAAE,oDAAqD;SAChE;KACF;CACF,CAAC;AAEF,eAAe,iBAAiB,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 NvFieldselectDocs: NovaDocs<Components.NvFieldselect> = {\n component: 'nv-fieldselect',\n subcomponents: ['nv-badge', 'nv-button'],\n stories: [\n {\n name: 'Default',\n description: 'A default nv-fieldselect with no specific props set.',\n template: (\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: nameof<Components.NvFieldselect>(x => x.label),\n args: {\n label: 'Select Label',\n },\n template: (\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: nameof<Components.NvFieldselect>(x => x.description),\n args: {\n label: 'Select with Description',\n description: 'This is a description.',\n },\n template: (\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: 'Placeholder',\n description:\n 'Display temporary text inside the select field to give users a hint about what to choose.',\n args: {\n label: 'Select with Placeholder',\n },\n template: (\n <nv-fieldselect data-storybook-args>\n <option value=\"\" disabled>\n Choose an option...\n </option>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: nameof<Components.NvFieldselect>(x => x.value),\n args: {\n label: 'Select Value',\n value: '2',\n },\n template: (\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: nameof<Components.NvFieldselect>(x => x.disabled),\n args: {\n label: 'Disabled Select',\n disabled: true,\n value: '3',\n },\n template: (\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: nameof<Components.NvFieldselect>(x => x.readonly),\n args: {\n label: 'Readonly Select',\n readonly: true,\n value: '1',\n },\n template: (\n <div data-class=\"flex flex-col gap-2\">\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n <nv-fieldselect data-storybook-args multiple={true}>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n </div>\n ),\n },\n {\n name: nameof<Components.NvFieldselect>(x => x.displayValue),\n args: {\n label: 'Readonly Select with Display Label',\n readonly: true,\n displayValue: true,\n value: '1',\n },\n template: (\n <div data-class=\"flex flex-col gap-2\">\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n </nv-fieldselect>\n <nv-fieldselect data-storybook-args multiple={true}>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n </nv-fieldselect>\n </div>\n ),\n },\n {\n name: nameof<Components.NvFieldselect>(x => x.required),\n args: {\n label: 'Required Field',\n required: true,\n },\n template: (\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: nameof<Components.NvFieldselect>(x => x.error),\n args: {\n label: 'Error State',\n error: true,\n },\n template: (\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: nameof<Components.NvFieldselect>(x => x.success),\n args: {\n label: 'Success State',\n success: true,\n },\n template: (\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: nameof<Components.NvFieldselect>(x => x.multiple),\n args: {\n label: 'Multiple Select',\n multiple: true,\n },\n template: (\n <div data-class=\"flex flex-col gap-2\">\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n <nv-fieldselect value=\"1, 2\" data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n </div>\n ),\n },\n {\n name: nameof<Components.NvFieldselect>(x => x.autofocus),\n args: {\n label: 'Autofocus',\n autofocus: true,\n },\n template: (\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: 'SlotLabel',\n description:\n 'You can use the `label` slot to customize the content of the label.',\n template: (\n <nv-fieldselect data-storybook-args>\n <span slot=\"label\">Label</span>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: nameof<Components.NvFieldtextarea>(x => x.fluid),\n args: {\n label: 'Fluid',\n fluid: true,\n },\n template: (\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: 'SlotDescription',\n description:\n 'You can use the `description` slot to customize the content of the description.',\n args: {\n label: 'Select with Description',\n description: 'This is a description.',\n },\n template: (\n <nv-fieldselect data-storybook-args>\n <span slot=\"description\">Description</span>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: 'SlotBefore',\n description:\n 'You can use the `before` slot to customize the content before the select.',\n template: (\n <nv-fieldselect data-storybook-args>\n <span slot=\"before\">Before</span>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: 'SlotAfter',\n description:\n 'You can use the `after` slot to customize the content after the select.',\n template: (\n <nv-fieldselect data-storybook-args>\n <span slot=\"after\">After</span>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: 'SlotErrorDescription',\n description:\n 'You can use the `error-description` slot to customize the content of the error description.',\n args: {\n label: 'Select with Error',\n error: true,\n errorDescription: 'This is an error.',\n },\n template: (\n <nv-fieldselect data-storybook-args>\n <span slot=\"error-description\">Error Description</span>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: 'Options JSON',\n args: {\n label: 'Select with JSON Options',\n options: JSON.stringify([\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-fieldselect data-storybook-args></nv-fieldselect>,\n },\n {\n name: 'Options JSON Preselected',\n args: {\n label: 'Select with Preselected JSON Option',\n options: JSON.stringify([\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-fieldselect data-storybook-args></nv-fieldselect>,\n },\n ],\n};\n\nexport default NvFieldselectDocs;\n"]}
@@ -80,6 +80,10 @@ export class NvFieldselect {
80
80
  * element.
81
81
  */
82
82
  this.autofocus = false;
83
+ /**
84
+ * Allows the field to stretch and fill the entire width of its container.
85
+ */
86
+ this.fluid = false;
83
87
  //#endregion WATCHERS
84
88
  /****************************************************************************/
85
89
  //#region METHODS
@@ -343,13 +347,13 @@ export class NvFieldselect {
343
347
  * @returns {HTMLStencilElement} The HTML element to render.
344
348
  */
345
349
  render() {
346
- return (h(Host, { key: '38cb85c6698c5541793a1e5d34b36417cd743759' }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: 'd81b9837c43c1a19a2d87b51cede9e7c32bda50c', htmlFor: this.inputId }, h("slot", { key: '9d7c10281b117f2006ca1997f91e4e0b99fc5ab5', name: "label" }, this.label))), h("div", { key: '2796a31f2aac0604054c4542564fca77c2ac4272', class: "select-wrapper" }, h("slot", { key: '0407c6379597b09e1bb11ee6b43110b1d5fb98ea', name: "before-input" }), h("div", { key: 'c0ae999fc017fb0352b0a1cfe2ff75e313955f23', class: "select-container", onClick: this.handleSelectContainerClick }, h("slot", { key: 'ea2b63ddb3b70521b63e15efd1c3daf06c38cc0a', name: "leading-input" }), this.internalReadonly && (h("input", { key: 'f543f67c0360ac315ed873eb14a93af35dd90670', id: this.inputId + '-readonly', type: "text", value: this.computedDisplayValue, readonly: true, class: "readonly-input", "aria-readonly": "true", "aria-label": this.label, "aria-describedby": this.error
350
+ return (h(Host, { key: '06d38dd360011d4310d1c63851dc254e8ae47411' }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: 'a0e46209c73e704d8d0f630baace2b1ce0eaed9c', htmlFor: this.inputId }, h("slot", { key: '6a43c979383647415044931d7a4e4d3a24f65921', name: "label" }, this.label))), h("div", { key: 'f2cee6021f85e64bd9d73d984e208903e3fda4c7', class: "select-wrapper" }, h("slot", { key: 'cae1c527e55c18f3e54d9c73390d6f17ccebce77', name: "before-input" }), h("div", { key: 'acb5dcbea269eb7dca558942f36b05c552924cbc', class: "select-container", onClick: this.handleSelectContainerClick }, h("slot", { key: 'e5c2a508a1297796f2693c76338c5b5f8e3e149e', name: "leading-input" }), this.internalReadonly && (h("input", { key: '28c38079050912f7d3b744de66ed48351dd890c3', id: this.inputId + '-readonly', type: "text", value: this.computedDisplayValue, readonly: true, class: "readonly-input", "aria-readonly": "true", "aria-label": this.label, "aria-describedby": this.error
347
351
  ? `${this.inputId}-error`
348
- : `${this.inputId}-description` })), h("select", { key: 'b2ae3854c40ea798069417127cd763c8a0db040e', id: this.inputId, ref: el => (this.selectElement = el), name: this.name, autofocus: this.autofocus, disabled: this.disabled, required: this.required, multiple: this.multiple, onChange: this.handleSelectChange, class: this.internalReadonly ? 'hidden' : '', "aria-label": this.label, "aria-describedby": this.error
352
+ : `${this.inputId}-description` })), h("select", { key: 'c409a9e0a26797981640092eb67b949c7d8f0cff', id: this.inputId, ref: el => (this.selectElement = el), name: this.name, autofocus: this.autofocus, disabled: this.disabled, required: this.required, multiple: this.multiple, onChange: this.handleSelectChange, class: this.internalReadonly ? 'hidden' : '', "aria-label": this.label, "aria-describedby": this.error
349
353
  ? `${this.inputId}-error`
350
- : `${this.inputId}-description` }, this.parsedOptions.length > 0 ? (this.parsedOptions.map(option => (h("option", { value: option.value, selected: option.selected, disabled: option.disabled }, option.label)))) : (h("slot", null))), h("div", { key: 'dd59af14105272eaa77218136f5b7b0b40a5b40b', class: "select-icons" }, this.error && (h("nv-icon", { key: '719e239472f6b697298682cc8d1b10933d3504ec', name: "alert-circle", class: "validation", size: "md" })), this.success && (h("nv-icon", { key: '5d63d5ddbcd8f46296bc067afd45f3921f4f3917', name: "circle-check", class: "validation", size: "md" })), !this.multiple && (h("nv-iconbutton", { key: '978a540682409a88ce55d2219dbeb9f2fc82cd51', name: "chevron-down", size: "md", emphasis: "lower", tabindex: -1 })))), h("slot", { key: '3483846a9f38be08caaf6f2b02332caefae0cbed', name: "after-input" })), (this.description ||
351
- this.el.querySelector('[slot="description"]')) && (h("div", { key: '5b47c05942549b6e2238696132ab2f3c9af5b7f0', class: "description", id: `${this.inputId}-description` }, h("slot", { key: '46b7f053ae343949b540240e1ec438850bb9a015', name: "description" }, this.description))), (this.errorDescription ||
352
- this.el.querySelector('[slot="error-description"]')) && (h("div", { key: '6126ab6967fc430c6a1d3ddfb191a98a8c2ecce9', class: "error-description", id: `${this.inputId}-error` }, h("slot", { key: 'afc6a0443c6fe1175213d36a2c59ffefe2923eab', name: "error-description" }, this.errorDescription)))));
354
+ : `${this.inputId}-description` }, this.parsedOptions.length > 0 ? (this.parsedOptions.map(option => (h("option", { value: option.value, selected: option.selected, disabled: option.disabled }, option.label)))) : (h("slot", null))), h("div", { key: 'a2402ea8d832e5612510dce7a3f50148b4edf39f', class: "select-icons" }, this.error && (h("nv-icon", { key: 'e291bff25fa6f06d3b27c3aaa805b46f674e1614', name: "alert-circle", class: "validation", size: "md" })), this.success && (h("nv-icon", { key: 'ce98cb12347722926677d9c3fc6f02e35a9c84e4', name: "circle-check", class: "validation", size: "md" })), !this.multiple && (h("nv-iconbutton", { key: 'e7fe760a5fa84ab0548ebd736a44da04908a4c07', name: "chevron-down", size: "md", emphasis: "lower", tabindex: -1 })))), h("slot", { key: 'd6253e2d56d4095bbe9ab12ca34ff28e06bd6b6d', name: "after-input" })), (this.description ||
355
+ this.el.querySelector('[slot="description"]')) && (h("div", { key: '703ad3ad8538ceab3c9eb03ae90c3552e1b6bf23', class: "description", id: `${this.inputId}-description` }, h("slot", { key: '010bbb23d2b947ed55c219ac64532f7dfd4f43cc', name: "description" }, this.description))), (this.errorDescription ||
356
+ this.el.querySelector('[slot="error-description"]')) && (h("div", { key: '70b696ec8f8badd4e064506eeba268755c9f2c09', class: "error-description", id: `${this.inputId}-error` }, h("slot", { key: '2ec5af60d2fca9a8f5baf59406a4661905aeab05', name: "error-description" }, this.errorDescription)))));
353
357
  }
354
358
  static get is() { return "nv-fieldselect"; }
355
359
  static get formAssociated() { return true; }
@@ -709,6 +713,26 @@ export class NvFieldselect {
709
713
  "attribute": "autofocus",
710
714
  "reflect": true,
711
715
  "defaultValue": "false"
716
+ },
717
+ "fluid": {
718
+ "type": "boolean",
719
+ "mutable": false,
720
+ "complexType": {
721
+ "original": "boolean",
722
+ "resolved": "boolean",
723
+ "references": {}
724
+ },
725
+ "required": false,
726
+ "optional": false,
727
+ "docs": {
728
+ "tags": [],
729
+ "text": "Allows the field to stretch and fill the entire width of its container."
730
+ },
731
+ "getter": false,
732
+ "setter": false,
733
+ "attribute": "fluid",
734
+ "reflect": true,
735
+ "defaultValue": "false"
712
736
  }
713
737
  };
714
738
  }