@nova-design-system/nova-webcomponents 3.0.0-beta.37 → 3.0.0-beta.39

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 (541) hide show
  1. package/dist/blazor-docs.json +996 -164
  2. package/dist/cjs/app-globals-3a1e7e63.js +7 -0
  3. package/dist/cjs/app-globals-3a1e7e63.js.map +1 -0
  4. package/dist/cjs/{constants-69b40456.js → constants-2ae3d9eb.js} +22 -2
  5. package/dist/cjs/constants-2ae3d9eb.js.map +1 -0
  6. package/dist/cjs/index-5910ba06.js +8 -4
  7. package/dist/cjs/index.cjs.js +24 -1
  8. package/dist/cjs/index.cjs.js.map +1 -1
  9. package/dist/cjs/loader.cjs.js +2 -2
  10. package/dist/cjs/native.cjs.js +2 -2
  11. package/dist/cjs/nv-alert.cjs.entry.js +1 -1
  12. package/dist/cjs/nv-avatar.cjs.entry.js +1 -1
  13. package/dist/cjs/nv-badge_2.cjs.entry.js +2 -2
  14. package/dist/cjs/nv-badge_2.cjs.entry.js.map +1 -1
  15. package/dist/cjs/nv-button.cjs.entry.js +1 -1
  16. package/dist/cjs/nv-calendar.cjs.entry.js +984 -0
  17. package/dist/cjs/nv-calendar.cjs.entry.js.map +1 -0
  18. package/dist/cjs/nv-col.cjs.entry.js +1 -1
  19. package/dist/cjs/nv-datagrid.cjs.entry.js +2 -2
  20. package/dist/cjs/nv-datagrid.cjs.entry.js.map +1 -1
  21. package/dist/cjs/nv-datagridbody.cjs.entry.js +1 -1
  22. package/dist/cjs/nv-datagridcolumn.cjs.entry.js +1 -1
  23. package/dist/cjs/nv-datagriddatacell.cjs.entry.js +1 -1
  24. package/dist/cjs/nv-datagridhead.cjs.entry.js +1 -1
  25. package/dist/cjs/nv-datagridrow.cjs.entry.js +1 -1
  26. package/dist/cjs/nv-dialog.cjs.entry.js +17 -4
  27. package/dist/cjs/nv-dialog.cjs.entry.js.map +1 -1
  28. package/dist/cjs/nv-dialogfooter_2.cjs.entry.js +2 -2
  29. package/dist/cjs/nv-fieldcheckbox.cjs.entry.js +10 -4
  30. package/dist/cjs/nv-fieldcheckbox.cjs.entry.js.map +1 -1
  31. package/dist/cjs/nv-fielddropdown.cjs.entry.js +146 -223
  32. package/dist/cjs/nv-fielddropdown.cjs.entry.js.map +1 -1
  33. package/dist/cjs/nv-fielddropdownitem.cjs.entry.js +37 -32
  34. package/dist/cjs/nv-fielddropdownitem.cjs.entry.js.map +1 -1
  35. package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +12 -11
  36. package/dist/cjs/nv-fieldmultiselect.cjs.entry.js.map +1 -1
  37. package/dist/cjs/nv-fieldnumber.cjs.entry.js +10 -4
  38. package/dist/cjs/nv-fieldnumber.cjs.entry.js.map +1 -1
  39. package/dist/cjs/nv-fieldpassword.cjs.entry.js +10 -4
  40. package/dist/cjs/nv-fieldpassword.cjs.entry.js.map +1 -1
  41. package/dist/cjs/nv-fieldradio.cjs.entry.js +9 -3
  42. package/dist/cjs/nv-fieldradio.cjs.entry.js.map +1 -1
  43. package/dist/cjs/nv-fieldselect.cjs.entry.js +11 -5
  44. package/dist/cjs/nv-fieldselect.cjs.entry.js.map +1 -1
  45. package/dist/cjs/nv-fieldtext.cjs.entry.js +10 -4
  46. package/dist/cjs/nv-fieldtext.cjs.entry.js.map +1 -1
  47. package/dist/cjs/nv-fieldtextarea.cjs.entry.js +9 -3
  48. package/dist/cjs/nv-fieldtextarea.cjs.entry.js.map +1 -1
  49. package/dist/cjs/nv-fieldtime.cjs.entry.js +20 -12
  50. package/dist/cjs/nv-fieldtime.cjs.entry.js.map +1 -1
  51. package/dist/cjs/nv-icon.cjs.entry.js +20 -13
  52. package/dist/cjs/nv-icon.cjs.entry.js.map +1 -1
  53. package/dist/cjs/nv-iconbutton.cjs.entry.js +1 -1
  54. package/dist/cjs/nv-loader.cjs.entry.js +1 -1
  55. package/dist/cjs/nv-menu.cjs.entry.js +1 -1
  56. package/dist/cjs/nv-menuitem.cjs.entry.js +1 -1
  57. package/dist/cjs/nv-popover.cjs.entry.js +2 -2
  58. package/dist/cjs/nv-popover.cjs.entry.js.map +1 -1
  59. package/dist/cjs/nv-row.cjs.entry.js +1 -1
  60. package/dist/cjs/nv-stack.cjs.entry.js +1 -1
  61. package/dist/cjs/nv-table.cjs.entry.js +2 -2
  62. package/dist/cjs/nv-table.cjs.entry.js.map +1 -1
  63. package/dist/cjs/nv-tablebody.cjs.entry.js +1 -1
  64. package/dist/cjs/nv-tablecolumn.cjs.entry.js +1 -1
  65. package/dist/cjs/nv-tabledatacell.cjs.entry.js +1 -1
  66. package/dist/cjs/nv-tablehead.cjs.entry.js +1 -1
  67. package/dist/cjs/nv-tablerow.cjs.entry.js +1 -1
  68. package/dist/cjs/nv-toggle.cjs.entry.js +2 -2
  69. package/dist/cjs/nv-tooltip.cjs.entry.js +1 -1
  70. package/dist/cjs/uri.utils-8523ad2b.js +26 -0
  71. package/dist/cjs/uri.utils-8523ad2b.js.map +1 -0
  72. package/dist/collection/collection-manifest.json +2 -2
  73. package/dist/collection/components/nv-breadcrumbs/nv-breadcrumbs.docs.js +1 -0
  74. package/dist/collection/components/nv-breadcrumbs/nv-breadcrumbs.docs.js.map +1 -1
  75. package/dist/collection/components/nv-calendar/nv-calendar.css +341 -0
  76. package/dist/collection/components/nv-calendar/nv-calendar.docs.js +401 -0
  77. package/dist/collection/components/nv-calendar/nv-calendar.docs.js.map +1 -0
  78. package/dist/collection/components/nv-calendar/nv-calendar.js +1328 -0
  79. package/dist/collection/components/nv-calendar/nv-calendar.js.map +1 -0
  80. package/dist/collection/components/nv-col/nv-col.js +1 -1
  81. package/dist/collection/components/nv-datagrid/nv-datagrid.js +5 -2
  82. package/dist/collection/components/nv-datagrid/nv-datagrid.js.map +1 -1
  83. package/dist/collection/components/nv-datagridbody/nv-datagridbody.js +1 -1
  84. package/dist/collection/components/nv-datagridcolumn/nv-datagridcolumn.js +1 -1
  85. package/dist/collection/components/nv-datagriddatacell/nv-datagriddatacell.js +1 -1
  86. package/dist/collection/components/nv-datagridhead/nv-datagridhead.js +1 -1
  87. package/dist/collection/components/nv-datagridrow/nv-datagridrow.js +1 -1
  88. package/dist/collection/components/nv-dialog/nv-dialog.css +2 -0
  89. package/dist/collection/components/nv-dialog/nv-dialog.docs.js +6 -6
  90. package/dist/collection/components/nv-dialog/nv-dialog.docs.js.map +1 -1
  91. package/dist/collection/components/nv-dialog/nv-dialog.js +16 -3
  92. package/dist/collection/components/nv-dialog/nv-dialog.js.map +1 -1
  93. package/dist/collection/components/nv-dialogfooter/nv-dialogfooter.js +1 -1
  94. package/dist/collection/components/nv-dialogheader/nv-dialogheader.js +1 -1
  95. package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.docs.js +8 -0
  96. package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.docs.js.map +1 -1
  97. package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.js +30 -4
  98. package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.js.map +1 -1
  99. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.docs.js +11 -3
  100. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.docs.js.map +1 -1
  101. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js +197 -252
  102. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js.map +1 -1
  103. package/dist/collection/components/nv-fielddropdown/{nv-fielddropdown.css → styles/nv-fielddropdown.css} +10 -28
  104. package/dist/collection/components/nv-fielddropdownitem/nv-fielddropdownitem.js +55 -47
  105. package/dist/collection/components/nv-fielddropdownitem/nv-fielddropdownitem.js.map +1 -1
  106. package/dist/collection/components/nv-fielddropdownitem/{nv-fielddropdownitem.css → styles/nv-fielddropdownitem.css} +12 -9
  107. package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.css +7 -7
  108. package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js +1 -1
  109. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.css +34 -17
  110. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js +10 -2
  111. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js.map +1 -1
  112. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js +34 -33
  113. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js.map +1 -1
  114. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.css +2 -2
  115. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.docs.js +8 -0
  116. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.docs.js.map +1 -1
  117. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js +29 -3
  118. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js.map +1 -1
  119. package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.css +2 -2
  120. package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.docs.js +8 -0
  121. package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.docs.js.map +1 -1
  122. package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js +30 -4
  123. package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js.map +1 -1
  124. package/dist/collection/components/nv-fieldradio/nv-fieldradio.docs.js +8 -0
  125. package/dist/collection/components/nv-fieldradio/nv-fieldradio.docs.js.map +1 -1
  126. package/dist/collection/components/nv-fieldradio/nv-fieldradio.js +29 -3
  127. package/dist/collection/components/nv-fieldradio/nv-fieldradio.js.map +1 -1
  128. package/dist/collection/components/nv-fieldselect/nv-fieldselect.docs.js +8 -19
  129. package/dist/collection/components/nv-fieldselect/nv-fieldselect.docs.js.map +1 -1
  130. package/dist/collection/components/nv-fieldselect/nv-fieldselect.js +31 -5
  131. package/dist/collection/components/nv-fieldselect/nv-fieldselect.js.map +1 -1
  132. package/dist/collection/components/nv-fieldtext/nv-fieldtext.css +2 -2
  133. package/dist/collection/components/nv-fieldtext/nv-fieldtext.docs.js +8 -0
  134. package/dist/collection/components/nv-fieldtext/nv-fieldtext.docs.js.map +1 -1
  135. package/dist/collection/components/nv-fieldtext/nv-fieldtext.js +30 -4
  136. package/dist/collection/components/nv-fieldtext/nv-fieldtext.js.map +1 -1
  137. package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.docs.js +8 -0
  138. package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.docs.js.map +1 -1
  139. package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js +29 -3
  140. package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js.map +1 -1
  141. package/dist/collection/components/nv-fieldtime/nv-fieldtime.css +27 -24
  142. package/dist/collection/components/nv-fieldtime/nv-fieldtime.docs.js +9 -0
  143. package/dist/collection/components/nv-fieldtime/nv-fieldtime.docs.js.map +1 -1
  144. package/dist/collection/components/nv-fieldtime/nv-fieldtime.js +38 -10
  145. package/dist/collection/components/nv-fieldtime/nv-fieldtime.js.map +1 -1
  146. package/dist/collection/components/nv-icon/nv-icon.js +19 -17
  147. package/dist/collection/components/nv-icon/nv-icon.js.map +1 -1
  148. package/dist/collection/components/nv-icon/nv-icons.js +21 -0
  149. package/dist/collection/components/nv-icon/nv-icons.js.map +1 -1
  150. package/dist/collection/components/nv-iconbutton/nv-iconbutton.js +1 -1
  151. package/dist/collection/components/nv-loader/nv-loader.js +1 -1
  152. package/dist/collection/components/nv-menu/nv-menu.js +1 -1
  153. package/dist/collection/components/nv-menuitem/nv-menuitem.js +2 -2
  154. package/dist/collection/components/nv-popover/nv-popover.css +3 -0
  155. package/dist/collection/components/nv-popover/nv-popover.js +1 -1
  156. package/dist/collection/components/nv-row/nv-row.js +1 -1
  157. package/dist/collection/components/nv-stack/nv-stack.js +1 -1
  158. package/dist/collection/components/nv-table/nv-table.js +5 -2
  159. package/dist/collection/components/nv-table/nv-table.js.map +1 -1
  160. package/dist/collection/components/nv-tablebody/nv-tablebody.js +1 -1
  161. package/dist/collection/components/nv-tablecolumn/nv-tablecolumn.js +1 -1
  162. package/dist/collection/components/nv-tabledatacell/nv-tabledatacell.js +1 -1
  163. package/dist/collection/components/nv-tablehead/nv-tablehead.js +1 -1
  164. package/dist/collection/components/nv-tablerow/nv-tablerow.js +1 -1
  165. package/dist/collection/components/nv-toggle/nv-toggle.js +2 -2
  166. package/dist/collection/components/nv-tooltip/nv-tooltip.js +1 -1
  167. package/dist/collection/index.js +2 -0
  168. package/dist/collection/index.js.map +1 -1
  169. package/dist/collection/interfaces/calendarShortcut.js +2 -0
  170. package/dist/collection/interfaces/calendarShortcut.js.map +1 -0
  171. package/dist/collection/interfaces/dateRange.js +2 -0
  172. package/dist/collection/interfaces/dateRange.js.map +1 -0
  173. package/dist/collection/interfaces/localization.js +2 -0
  174. package/dist/collection/interfaces/localization.js.map +1 -0
  175. package/dist/collection/templates/navigation.docs.js +6 -0
  176. package/dist/collection/templates/navigation.docs.js.map +1 -1
  177. package/dist/collection/utils/constants.js +18 -0
  178. package/dist/collection/utils/constants.js.map +1 -1
  179. package/dist/collection/utils/test/uri.utils.test.js +21 -0
  180. package/dist/collection/utils/test/uri.utils.test.js.map +1 -0
  181. package/dist/collection/utils/uri.utils.js +15 -0
  182. package/dist/collection/utils/uri.utils.js.map +1 -0
  183. package/dist/components/index.js +24 -2
  184. package/dist/components/index.js.map +1 -1
  185. package/dist/components/nv-alert.js +2 -2
  186. package/dist/components/nv-avatar.js +2 -2
  187. package/dist/components/nv-badge.js +1 -1
  188. package/dist/components/nv-breadcrumb.js +2 -2
  189. package/dist/components/nv-button.js +1 -1
  190. package/dist/components/nv-calendar.d.ts +11 -0
  191. package/dist/components/nv-calendar.js +1046 -0
  192. package/dist/components/nv-calendar.js.map +1 -0
  193. package/dist/components/nv-col.js +1 -1
  194. package/dist/components/nv-datagrid.js +2 -2
  195. package/dist/components/nv-datagrid.js.map +1 -1
  196. package/dist/components/nv-datagridbody.js +1 -1
  197. package/dist/components/nv-datagridcolumn.js +1 -1
  198. package/dist/components/nv-datagriddatacell.js +1 -1
  199. package/dist/components/nv-datagridhead.js +1 -1
  200. package/dist/components/nv-datagridrow.js +1 -1
  201. package/dist/components/nv-dialog.js +22 -9
  202. package/dist/components/nv-dialog.js.map +1 -1
  203. package/dist/components/nv-dialogfooter.js +1 -1
  204. package/dist/components/nv-dialogheader.js +1 -1
  205. package/dist/components/nv-fieldcheckbox.js +1 -1
  206. package/dist/components/nv-fielddropdown.js +154 -230
  207. package/dist/components/nv-fielddropdown.js.map +1 -1
  208. package/dist/components/nv-fielddropdownitem.js +1 -1
  209. package/dist/components/nv-fielddropdownitemcheck.js +1 -1
  210. package/dist/components/nv-fieldmultiselect.js +21 -19
  211. package/dist/components/nv-fieldmultiselect.js.map +1 -1
  212. package/dist/components/nv-fieldnumber.js +13 -6
  213. package/dist/components/nv-fieldnumber.js.map +1 -1
  214. package/dist/components/nv-fieldpassword.js +14 -7
  215. package/dist/components/nv-fieldpassword.js.map +1 -1
  216. package/dist/components/nv-fieldradio.js +11 -4
  217. package/dist/components/nv-fieldradio.js.map +1 -1
  218. package/dist/components/nv-fieldselect.js +13 -6
  219. package/dist/components/nv-fieldselect.js.map +1 -1
  220. package/dist/components/nv-fieldtext.js +13 -6
  221. package/dist/components/nv-fieldtext.js.map +1 -1
  222. package/dist/components/nv-fieldtextarea.js +11 -4
  223. package/dist/components/nv-fieldtextarea.js.map +1 -1
  224. package/dist/components/nv-fieldtime.js +25 -16
  225. package/dist/components/nv-fieldtime.js.map +1 -1
  226. package/dist/components/nv-icon.js +1 -1
  227. package/dist/components/nv-iconbutton.js +1 -1
  228. package/dist/components/nv-loader.js +1 -1
  229. package/dist/components/nv-menu.js +4 -4
  230. package/dist/components/nv-menuitem.js +1 -1
  231. package/dist/components/nv-popover.js +1 -1
  232. package/dist/components/nv-row.js +1 -1
  233. package/dist/components/nv-stack.js +1 -1
  234. package/dist/components/nv-table.js +2 -2
  235. package/dist/components/nv-table.js.map +1 -1
  236. package/dist/components/nv-tablebody.js +1 -1
  237. package/dist/components/nv-tablecolumn.js +1 -1
  238. package/dist/components/nv-tabledatacell.js +1 -1
  239. package/dist/components/nv-tablehead.js +1 -1
  240. package/dist/components/nv-tablerow.js +1 -1
  241. package/dist/components/nv-toggle.js +2 -2
  242. package/dist/components/nv-tooltip.js +1 -1
  243. package/dist/components/{p-de8411ee.js → p-17b6705f.js} +5 -5
  244. package/dist/components/{p-de8411ee.js.map → p-17b6705f.js.map} +1 -1
  245. package/dist/components/{p-2768d2c0.js → p-33e07c91.js} +2 -2
  246. package/dist/components/{p-2768d2c0.js.map → p-33e07c91.js.map} +1 -1
  247. package/dist/components/{p-3859dc5c.js → p-48317c2c.js} +4 -4
  248. package/dist/components/p-48317c2c.js.map +1 -0
  249. package/dist/components/{p-a9a52105.js → p-492ad81d.js} +1178 -5
  250. package/dist/components/p-492ad81d.js.map +1 -0
  251. package/dist/components/p-5f5e2bf2.js +88 -0
  252. package/dist/components/p-5f5e2bf2.js.map +1 -0
  253. package/dist/components/{p-e431a0ad.js → p-659a5ae4.js} +4 -4
  254. package/dist/components/{p-e431a0ad.js.map → p-659a5ae4.js.map} +1 -1
  255. package/dist/components/{p-18d221e3.js → p-73e703a1.js} +2 -2
  256. package/dist/components/{p-18d221e3.js.map → p-73e703a1.js.map} +1 -1
  257. package/dist/components/p-7e58e7d1.js +23 -0
  258. package/dist/components/p-7e58e7d1.js.map +1 -0
  259. package/dist/components/{p-16badb3b.js → p-83e1177b.js} +3 -3
  260. package/dist/components/{p-16badb3b.js.map → p-83e1177b.js.map} +1 -1
  261. package/dist/components/{p-2baea6ba.js → p-842afd9a.js} +3 -3
  262. package/dist/components/{p-2baea6ba.js.map → p-842afd9a.js.map} +1 -1
  263. package/dist/components/{p-4938572a.js → p-88165c0e.js} +2 -2
  264. package/dist/components/{p-4938572a.js.map → p-88165c0e.js.map} +1 -1
  265. package/dist/components/{p-91bf0cb6.js → p-8d7a57d1.js} +3 -3
  266. package/dist/components/{p-91bf0cb6.js.map → p-8d7a57d1.js.map} +1 -1
  267. package/dist/components/p-c1765831.js +89 -0
  268. package/dist/components/p-c1765831.js.map +1 -0
  269. package/dist/components/p-f40a7e2f.js +95 -0
  270. package/dist/components/p-f40a7e2f.js.map +1 -0
  271. package/dist/{esm/constants-0181211f.js → components/p-fd65c51f.js} +22 -3
  272. package/dist/components/p-fd65c51f.js.map +1 -0
  273. package/dist/components/{p-98ff0e5f.js → p-fdf57d25.js} +13 -6
  274. package/dist/components/p-fdf57d25.js.map +1 -0
  275. package/dist/docs.json +972 -147
  276. package/dist/esm/app-globals-0f993ce5.js +5 -0
  277. package/dist/esm/app-globals-0f993ce5.js.map +1 -0
  278. package/dist/{components/p-56f71851.js → esm/constants-8243d2ea.js} +22 -3
  279. package/dist/esm/constants-8243d2ea.js.map +1 -0
  280. package/dist/esm/index-fac2d5d2.js +8 -4
  281. package/dist/esm/index.js +23 -1
  282. package/dist/esm/index.js.map +1 -1
  283. package/dist/esm/loader.js +2 -2
  284. package/dist/esm/native.js +2 -2
  285. package/dist/esm/nv-alert.entry.js +1 -1
  286. package/dist/esm/nv-avatar.entry.js +1 -1
  287. package/dist/esm/nv-badge_2.entry.js +2 -2
  288. package/dist/esm/nv-badge_2.entry.js.map +1 -1
  289. package/dist/esm/nv-button.entry.js +1 -1
  290. package/dist/esm/nv-calendar.entry.js +980 -0
  291. package/dist/esm/nv-calendar.entry.js.map +1 -0
  292. package/dist/esm/nv-col.entry.js +1 -1
  293. package/dist/esm/nv-datagrid.entry.js +2 -2
  294. package/dist/esm/nv-datagrid.entry.js.map +1 -1
  295. package/dist/esm/nv-datagridbody.entry.js +1 -1
  296. package/dist/esm/nv-datagridcolumn.entry.js +1 -1
  297. package/dist/esm/nv-datagriddatacell.entry.js +1 -1
  298. package/dist/esm/nv-datagridhead.entry.js +1 -1
  299. package/dist/esm/nv-datagridrow.entry.js +1 -1
  300. package/dist/esm/nv-dialog.entry.js +17 -4
  301. package/dist/esm/nv-dialog.entry.js.map +1 -1
  302. package/dist/esm/nv-dialogfooter_2.entry.js +2 -2
  303. package/dist/esm/nv-fieldcheckbox.entry.js +10 -4
  304. package/dist/esm/nv-fieldcheckbox.entry.js.map +1 -1
  305. package/dist/esm/nv-fielddropdown.entry.js +146 -223
  306. package/dist/esm/nv-fielddropdown.entry.js.map +1 -1
  307. package/dist/esm/nv-fielddropdownitem.entry.js +37 -32
  308. package/dist/esm/nv-fielddropdownitem.entry.js.map +1 -1
  309. package/dist/esm/nv-fieldmultiselect.entry.js +12 -11
  310. package/dist/esm/nv-fieldmultiselect.entry.js.map +1 -1
  311. package/dist/esm/nv-fieldnumber.entry.js +10 -4
  312. package/dist/esm/nv-fieldnumber.entry.js.map +1 -1
  313. package/dist/esm/nv-fieldpassword.entry.js +10 -4
  314. package/dist/esm/nv-fieldpassword.entry.js.map +1 -1
  315. package/dist/esm/nv-fieldradio.entry.js +9 -3
  316. package/dist/esm/nv-fieldradio.entry.js.map +1 -1
  317. package/dist/esm/nv-fieldselect.entry.js +11 -5
  318. package/dist/esm/nv-fieldselect.entry.js.map +1 -1
  319. package/dist/esm/nv-fieldtext.entry.js +10 -4
  320. package/dist/esm/nv-fieldtext.entry.js.map +1 -1
  321. package/dist/esm/nv-fieldtextarea.entry.js +9 -3
  322. package/dist/esm/nv-fieldtextarea.entry.js.map +1 -1
  323. package/dist/esm/nv-fieldtime.entry.js +20 -12
  324. package/dist/esm/nv-fieldtime.entry.js.map +1 -1
  325. package/dist/esm/nv-icon.entry.js +20 -13
  326. package/dist/esm/nv-icon.entry.js.map +1 -1
  327. package/dist/esm/nv-iconbutton.entry.js +1 -1
  328. package/dist/esm/nv-loader.entry.js +1 -1
  329. package/dist/esm/nv-menu.entry.js +1 -1
  330. package/dist/esm/nv-menuitem.entry.js +1 -1
  331. package/dist/esm/nv-popover.entry.js +2 -2
  332. package/dist/esm/nv-popover.entry.js.map +1 -1
  333. package/dist/esm/nv-row.entry.js +1 -1
  334. package/dist/esm/nv-stack.entry.js +1 -1
  335. package/dist/esm/nv-table.entry.js +2 -2
  336. package/dist/esm/nv-table.entry.js.map +1 -1
  337. package/dist/esm/nv-tablebody.entry.js +1 -1
  338. package/dist/esm/nv-tablecolumn.entry.js +1 -1
  339. package/dist/esm/nv-tabledatacell.entry.js +1 -1
  340. package/dist/esm/nv-tablehead.entry.js +1 -1
  341. package/dist/esm/nv-tablerow.entry.js +1 -1
  342. package/dist/esm/nv-toggle.entry.js +2 -2
  343. package/dist/esm/nv-tooltip.entry.js +1 -1
  344. package/dist/esm/uri.utils-4c2a1e4c.js +23 -0
  345. package/dist/esm/uri.utils-4c2a1e4c.js.map +1 -0
  346. package/dist/native/index.esm.js +1 -1
  347. package/dist/native/index.esm.js.map +1 -1
  348. package/dist/native/native.css +1 -1
  349. package/dist/native/native.esm.js +1 -1
  350. package/dist/native/native.esm.js.map +1 -1
  351. package/dist/native/{p-4d0caf4a.entry.js → p-1bae8cdd.entry.js} +2 -2
  352. package/dist/native/{p-4d0caf4a.entry.js.map → p-1bae8cdd.entry.js.map} +1 -1
  353. package/dist/native/{p-8c1a6aa6.entry.js → p-1ca72f74.entry.js} +2 -2
  354. package/dist/native/{p-d67b7502.entry.js → p-2151f564.entry.js} +2 -2
  355. package/dist/native/{p-87083363.entry.js → p-2b99e720.entry.js} +2 -2
  356. package/dist/native/{p-87083363.entry.js.map → p-2b99e720.entry.js.map} +1 -1
  357. package/dist/native/p-3422397d.entry.js +2 -0
  358. package/dist/native/{p-e3827605.entry.js → p-39b4ec02.entry.js} +2 -2
  359. package/dist/native/p-39b4ec02.entry.js.map +1 -0
  360. package/dist/native/{p-9ac790b3.entry.js → p-3b2c7871.entry.js} +2 -2
  361. package/dist/native/{p-9ac790b3.entry.js.map → p-3b2c7871.entry.js.map} +1 -1
  362. package/dist/native/{p-51ad8bcd.entry.js → p-3bfd5a30.entry.js} +2 -2
  363. package/dist/native/p-3bfd5a30.entry.js.map +1 -0
  364. package/dist/native/p-44e7e3e8.entry.js +2 -0
  365. package/dist/native/p-44e7e3e8.entry.js.map +1 -0
  366. package/dist/native/p-46c9aa04.entry.js +2 -0
  367. package/dist/native/p-46c9aa04.entry.js.map +1 -0
  368. package/dist/native/p-4a7fa613.entry.js +2 -0
  369. package/dist/native/{p-96902bb3.entry.js.map → p-4a7fa613.entry.js.map} +1 -1
  370. package/dist/native/{p-e192c25c.entry.js → p-4db7add6.entry.js} +2 -2
  371. package/dist/native/{p-a998f8df.entry.js → p-4eacd598.entry.js} +2 -2
  372. package/dist/native/p-51e0c5d3.entry.js +2 -0
  373. package/dist/native/{p-2aebf31b.entry.js.map → p-51e0c5d3.entry.js.map} +1 -1
  374. package/dist/native/p-57513eb0.entry.js +2 -0
  375. package/dist/native/{p-ab5a8ce5.entry.js.map → p-57513eb0.entry.js.map} +1 -1
  376. package/dist/native/p-5851fbed.entry.js +2 -0
  377. package/dist/native/{p-61d2cb2e.entry.js → p-634b49fe.entry.js} +2 -2
  378. package/dist/native/{p-211f7b19.entry.js → p-63c894f0.entry.js} +2 -2
  379. package/dist/native/p-6acbf729.entry.js +2 -0
  380. package/dist/native/p-6acbf729.entry.js.map +1 -0
  381. package/dist/native/p-7211a3cb.entry.js +7 -0
  382. package/dist/native/p-7211a3cb.entry.js.map +1 -0
  383. package/dist/native/p-79765c7d.entry.js +2 -0
  384. package/dist/native/p-7e58e7d1.js +2 -0
  385. package/dist/native/p-7e58e7d1.js.map +1 -0
  386. package/dist/native/{p-3c004551.entry.js → p-833af1bf.entry.js} +2 -2
  387. package/dist/native/p-833af1bf.entry.js.map +1 -0
  388. package/dist/native/p-87bd53df.entry.js +2 -0
  389. package/dist/native/p-87bd53df.entry.js.map +1 -0
  390. package/dist/native/p-8b323a15.entry.js +2 -0
  391. package/dist/native/{p-10ba289c.entry.js.map → p-8b323a15.entry.js.map} +1 -1
  392. package/dist/native/p-943a19a5.entry.js +2 -0
  393. package/dist/native/{p-8ee30013.entry.js.map → p-943a19a5.entry.js.map} +1 -1
  394. package/dist/native/{p-6d68f133.entry.js → p-9c8eadde.entry.js} +2 -2
  395. package/dist/native/p-9c8eadde.entry.js.map +1 -0
  396. package/dist/native/p-ac81e143.entry.js +2 -0
  397. package/dist/native/p-ac81e143.entry.js.map +1 -0
  398. package/dist/native/{p-99e7a452.entry.js → p-afc16010.entry.js} +2 -2
  399. package/dist/native/p-afc16010.entry.js.map +1 -0
  400. package/dist/native/p-b13b2663.entry.js +2 -0
  401. package/dist/native/p-b13b2663.entry.js.map +1 -0
  402. package/dist/native/p-b2ace8e9.entry.js +2 -0
  403. package/dist/native/p-b2ace8e9.entry.js.map +1 -0
  404. package/dist/native/{p-4f11286d.entry.js → p-bac62e20.entry.js} +2 -2
  405. package/dist/native/{p-46553ffd.entry.js → p-bfb6e22c.entry.js} +2 -2
  406. package/dist/native/p-c29be15d.entry.js +2 -0
  407. package/dist/native/{p-aa2834e2.entry.js.map → p-c29be15d.entry.js.map} +1 -1
  408. package/dist/native/p-cba14168.entry.js +2 -0
  409. package/dist/native/p-cba14168.entry.js.map +1 -0
  410. package/dist/native/p-dbb89408.entry.js +2 -0
  411. package/dist/native/p-e1255160.js +2 -0
  412. package/dist/native/p-e1255160.js.map +1 -0
  413. package/dist/native/p-e1b22ca7.entry.js +2 -0
  414. package/dist/native/p-e1b22ca7.entry.js.map +1 -0
  415. package/dist/native/{p-d776ed48.entry.js → p-ef9b66d4.entry.js} +2 -2
  416. package/dist/native/p-f867541d.entry.js +2 -0
  417. package/dist/native/p-f954a077.entry.js +2 -0
  418. package/dist/native/{p-f30ce086.entry.js.map → p-f954a077.entry.js.map} +1 -1
  419. package/dist/native/{p-d24586ed.entry.js → p-fa33ec18.entry.js} +2 -2
  420. package/dist/native/{p-56f71851.js → p-fd65c51f.js} +2 -2
  421. package/dist/native/p-fd65c51f.js.map +1 -0
  422. package/dist/native/p-ff7eea0e.entry.js +2 -0
  423. package/dist/types/components/nv-calendar/nv-calendar.d.ts +383 -0
  424. package/dist/types/components/nv-calendar/nv-calendar.docs.d.ts +4 -0
  425. package/dist/types/components/nv-datagrid/nv-datagrid.d.ts +3 -0
  426. package/dist/types/components/nv-dialog/nv-dialog.d.ts +8 -0
  427. package/dist/types/components/nv-fieldcheckbox/nv-fieldcheckbox.d.ts +6 -0
  428. package/dist/types/components/nv-fielddropdown/nv-fielddropdown.d.ts +45 -62
  429. package/dist/types/components/nv-fielddropdownitem/nv-fielddropdownitem.d.ts +27 -13
  430. package/dist/types/components/nv-fieldmultiselect/nv-fieldmultiselect.d.ts +7 -10
  431. package/dist/types/components/nv-fieldnumber/nv-fieldnumber.d.ts +6 -0
  432. package/dist/types/components/nv-fieldpassword/nv-fieldpassword.d.ts +6 -0
  433. package/dist/types/components/nv-fieldradio/nv-fieldradio.d.ts +6 -0
  434. package/dist/types/components/nv-fieldselect/nv-fieldselect.d.ts +6 -0
  435. package/dist/types/components/nv-fieldtext/nv-fieldtext.d.ts +6 -0
  436. package/dist/types/components/nv-fieldtextarea/nv-fieldtextarea.d.ts +6 -0
  437. package/dist/types/components/nv-fieldtime/nv-fieldtime.d.ts +6 -0
  438. package/dist/types/components/nv-icon/nv-icon.d.ts +6 -4
  439. package/dist/types/components/nv-icon/nv-icons.d.ts +1 -1
  440. package/dist/types/components/nv-table/nv-table.d.ts +3 -0
  441. package/dist/types/components.d.ts +316 -28
  442. package/dist/types/index.d.ts +4 -0
  443. package/dist/types/interfaces/calendarShortcut.d.ts +17 -0
  444. package/dist/types/interfaces/dateRange.d.ts +13 -0
  445. package/dist/types/interfaces/localization.d.ts +9 -0
  446. package/dist/types/nova-docs.d.ts +1 -0
  447. package/dist/types/utils/constants.d.ts +2 -0
  448. package/dist/types/utils/uri.utils.d.ts +6 -0
  449. package/dist/vscode-data.json +243 -56
  450. package/hydrate/index.js +2545 -1507
  451. package/hydrate/index.mjs +2545 -1507
  452. package/package.json +11 -3
  453. package/dist/cjs/app-globals-bd4d701e.js +0 -11
  454. package/dist/cjs/app-globals-bd4d701e.js.map +0 -1
  455. package/dist/cjs/constants-69b40456.js.map +0 -1
  456. package/dist/collection/components/nv-fielddropdownitem/DropdownItemSelectedEventDetail.js +0 -2
  457. package/dist/collection/components/nv-fielddropdownitem/DropdownItemSelectedEventDetail.js.map +0 -1
  458. package/dist/collection/dev/dev-components.js +0 -3
  459. package/dist/collection/dev/dev-components.js.map +0 -1
  460. package/dist/collection/dev/dev-forms.js +0 -3
  461. package/dist/collection/dev/dev-forms.js.map +0 -1
  462. package/dist/collection/dev/dev-root.js +0 -23
  463. package/dist/collection/dev/dev-root.js.map +0 -1
  464. package/dist/collection/dev/dev-utils.js +0 -54
  465. package/dist/collection/dev/dev-utils.js.map +0 -1
  466. package/dist/collection/global.js +0 -6
  467. package/dist/collection/global.js.map +0 -1
  468. package/dist/components/p-11fcdad9.js +0 -90
  469. package/dist/components/p-11fcdad9.js.map +0 -1
  470. package/dist/components/p-17714233.js +0 -1263
  471. package/dist/components/p-17714233.js.map +0 -1
  472. package/dist/components/p-3859dc5c.js.map +0 -1
  473. package/dist/components/p-56f71851.js.map +0 -1
  474. package/dist/components/p-98ff0e5f.js.map +0 -1
  475. package/dist/components/p-a01bdf02.js +0 -82
  476. package/dist/components/p-a01bdf02.js.map +0 -1
  477. package/dist/components/p-a9a52105.js.map +0 -1
  478. package/dist/esm/app-globals-0a94217b.js +0 -9
  479. package/dist/esm/app-globals-0a94217b.js.map +0 -1
  480. package/dist/esm/constants-0181211f.js.map +0 -1
  481. package/dist/native/p-02bb8184.entry.js +0 -2
  482. package/dist/native/p-10ba289c.entry.js +0 -2
  483. package/dist/native/p-208accf0.entry.js +0 -2
  484. package/dist/native/p-208accf0.entry.js.map +0 -1
  485. package/dist/native/p-2aebf31b.entry.js +0 -2
  486. package/dist/native/p-3a8a9371.entry.js +0 -2
  487. package/dist/native/p-3a8a9371.entry.js.map +0 -1
  488. package/dist/native/p-3c004551.entry.js.map +0 -1
  489. package/dist/native/p-51ad8bcd.entry.js.map +0 -1
  490. package/dist/native/p-56f71851.js.map +0 -1
  491. package/dist/native/p-6d68f133.entry.js.map +0 -1
  492. package/dist/native/p-724ed8d7.entry.js +0 -7
  493. package/dist/native/p-724ed8d7.entry.js.map +0 -1
  494. package/dist/native/p-75b1ea9f.entry.js +0 -2
  495. package/dist/native/p-75b1ea9f.entry.js.map +0 -1
  496. package/dist/native/p-892052c2.entry.js +0 -2
  497. package/dist/native/p-8ee30013.entry.js +0 -2
  498. package/dist/native/p-96902bb3.entry.js +0 -2
  499. package/dist/native/p-99e7a452.entry.js.map +0 -1
  500. package/dist/native/p-9fb5db20.entry.js +0 -2
  501. package/dist/native/p-9fb5db20.entry.js.map +0 -1
  502. package/dist/native/p-aa2834e2.entry.js +0 -2
  503. package/dist/native/p-ab5a8ce5.entry.js +0 -2
  504. package/dist/native/p-bfeda21c.entry.js +0 -2
  505. package/dist/native/p-bfeda21c.entry.js.map +0 -1
  506. package/dist/native/p-c51ee6dc.entry.js +0 -2
  507. package/dist/native/p-c51ee6dc.entry.js.map +0 -1
  508. package/dist/native/p-d4e56727.entry.js +0 -2
  509. package/dist/native/p-d4e56727.entry.js.map +0 -1
  510. package/dist/native/p-dc9dd5a7.entry.js +0 -2
  511. package/dist/native/p-e3827605.entry.js.map +0 -1
  512. package/dist/native/p-e5a7596b.entry.js +0 -2
  513. package/dist/native/p-e6f45df2.entry.js +0 -2
  514. package/dist/native/p-ed47a702.entry.js +0 -2
  515. package/dist/native/p-f30ce086.entry.js +0 -2
  516. package/dist/native/p-f3fbdea6.js +0 -2
  517. package/dist/native/p-f3fbdea6.js.map +0 -1
  518. package/dist/native/p-fd2955dd.entry.js +0 -2
  519. package/dist/native/p-fd2955dd.entry.js.map +0 -1
  520. package/dist/types/components/nv-fielddropdownitem/DropdownItemSelectedEventDetail.d.ts +0 -21
  521. package/dist/types/dev/dev-components.d.ts +0 -2
  522. package/dist/types/dev/dev-forms.d.ts +0 -2
  523. package/dist/types/dev/dev-utils.d.ts +0 -17
  524. package/dist/types/global.d.ts +0 -1
  525. /package/dist/native/{p-8c1a6aa6.entry.js.map → p-1ca72f74.entry.js.map} +0 -0
  526. /package/dist/native/{p-d67b7502.entry.js.map → p-2151f564.entry.js.map} +0 -0
  527. /package/dist/native/{p-dc9dd5a7.entry.js.map → p-3422397d.entry.js.map} +0 -0
  528. /package/dist/native/{p-e192c25c.entry.js.map → p-4db7add6.entry.js.map} +0 -0
  529. /package/dist/native/{p-a998f8df.entry.js.map → p-4eacd598.entry.js.map} +0 -0
  530. /package/dist/native/{p-e5a7596b.entry.js.map → p-5851fbed.entry.js.map} +0 -0
  531. /package/dist/native/{p-61d2cb2e.entry.js.map → p-634b49fe.entry.js.map} +0 -0
  532. /package/dist/native/{p-211f7b19.entry.js.map → p-63c894f0.entry.js.map} +0 -0
  533. /package/dist/native/{p-e6f45df2.entry.js.map → p-79765c7d.entry.js.map} +0 -0
  534. /package/dist/native/{p-4f11286d.entry.js.map → p-bac62e20.entry.js.map} +0 -0
  535. /package/dist/native/{p-46553ffd.entry.js.map → p-bfb6e22c.entry.js.map} +0 -0
  536. /package/dist/native/{p-02bb8184.entry.js.map → p-dbb89408.entry.js.map} +0 -0
  537. /package/dist/native/{p-d776ed48.entry.js.map → p-ef9b66d4.entry.js.map} +0 -0
  538. /package/dist/native/{p-ed47a702.entry.js.map → p-f867541d.entry.js.map} +0 -0
  539. /package/dist/native/{p-d24586ed.entry.js.map → p-fa33ec18.entry.js.map} +0 -0
  540. /package/dist/native/{p-892052c2.entry.js.map → p-ff7eea0e.entry.js.map} +0 -0
  541. /package/dist/types/{dev/dev-root.d.ts → utils/test/uri.utils.test.d.ts} +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,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,EAA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C5B;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 Watch,\n} from '@stencil/core';\nimport clsx from 'clsx';\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\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()\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()\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 //#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 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 <input\n id={this.inputId}\n ref={e => (this.inputElement = e)}\n placeholder={this.placeholder}\n name={this.name}\n type=\"number\"\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 {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 <div class=\"stepper-spacer\"></div>\n <div class=\"stepper\">\n <nv-icon\n name=\"minus\"\n size=\"md\"\n onClick={this.handleMinus}\n class={clsx({ disabled: this.isMinValueReached() })}\n />\n <nv-icon\n name=\"plus\"\n size=\"md\"\n onClick={this.handlePlus}\n class={clsx({ disabled: this.isMaxValueReached() })}\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,IAAI,MAAM,MAAM,CAAC;AACxB,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,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;Q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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 clsx from 'clsx';\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()\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()\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 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 <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 {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 <div class=\"stepper-spacer\"></div>\n <div class=\"stepper\">\n <nv-icon\n name=\"minus\"\n size=\"md\"\n onClick={this.handleMinus}\n class={clsx({ disabled: this.isMinValueReached() })}\n />\n <nv-icon\n name=\"plus\"\n size=\"md\"\n onClick={this.handlePlus}\n class={clsx({ disabled: this.isMaxValueReached() })}\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"]}
@@ -72,7 +72,7 @@ nv-fieldpassword .input-wrapper .input-container {
72
72
  border-width: 1px;
73
73
  border-style: solid;
74
74
  border-color: var(--nv-field-border-default);
75
- opacity: var(--components-form-opacity-default);
75
+ opacity: var(--components-form-opacity-default, 1);
76
76
  background: var(--nv-field-background);
77
77
  transition: all 150ms ease-out;
78
78
  position: relative;
@@ -80,7 +80,7 @@ nv-fieldpassword .input-wrapper .input-container {
80
80
  nv-fieldpassword .input-wrapper .input-container:hover {
81
81
  border-color: var(--nv-field-border-hover);
82
82
  }
83
- nv-fieldpassword .input-wrapper .input-container:focus-within {
83
+ nv-fieldpassword .input-wrapper .input-container:focus-within, nv-fieldpassword .input-wrapper .input-container:focus-within:hover, nv-fieldpassword .input-wrapper .input-container:focus, nv-fieldpassword .input-wrapper .input-container:focus:hover {
84
84
  border-color: var(--nv-field-border-focus);
85
85
  box-shadow: 0px 0px 0px var(--focus-field-stroke) var(--nv-field-focus-box-shadow);
86
86
  }
@@ -131,6 +131,14 @@ const NvFieldpasswordDocs = {
131
131
  },
132
132
  template: h("nv-fieldpassword", { "data-storybook-args": true }),
133
133
  },
134
+ {
135
+ name: nameof(x => x.autofocus),
136
+ args: {
137
+ label: 'Autofocus',
138
+ autofocus: true,
139
+ },
140
+ template: h("nv-fieldpassword", { "data-storybook-args": true }),
141
+ },
134
142
  {
135
143
  name: 'beforeInputSlot',
136
144
  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,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,C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AI,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: '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 slot=\"leading-input\" label=\"Leading\" dismissible></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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,EAAC,aAAa,uBAA6B,CACzC,CACpB;SACF;QACD;YACE,IAAI,EAAE,kBAAkB;YACxB,WAAW,EACT,yEAAyE;YAC3E,IAAI,EAAE;gBACJ,KAAK,EAAE,eAAe;aACvB;YACD,QAAQ,EAAE,CACR;gBACE,gBAAU,IAAI,EAAC,eAAe,EAAC,KAAK,EAAC,SAAS,EAAC,WAAW,SAAY,CACrD,CACpB;SACF;QACD;YACE,IAAI,EAAE,WAAW;YACjB,WAAW,EACT,kEAAkE;YACpE,IAAI,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 slot=\"leading-input\" label=\"Leading\" dismissible></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"]}
@@ -71,6 +71,12 @@ export class NvFieldpassword {
71
71
  * Defines whether the password is visible or not.
72
72
  */
73
73
  this.showPasswordState = this.showPassword;
74
+ /**
75
+ * Applies focus to the input field as soon as the component is mounted. This
76
+ * is equivalent to setting the native autofocus attribute on an <input>
77
+ * element.
78
+ */
79
+ this.autofocus = false;
74
80
  //#endregion EVENTS
75
81
  /****************************************************************************/
76
82
  //#region METHODS
@@ -101,9 +107,9 @@ export class NvFieldpassword {
101
107
  /****************************************************************************/
102
108
  //#region RENDER
103
109
  render() {
104
- return (h(Host, { key: '436b6bf9c16611d50b3cefae0b2380cee3eca0c6' }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: '2411ae48cb83db606a21f3f19bd008974841ad9a', htmlFor: this.inputId }, h("slot", { key: '4b1843af3d0d11cded7eb354c779486e48ad989b', name: "label" }, this.label))), h("div", { key: '0114ed1fa309c1df8be1cab6e18475b3e7fc34dc', class: "input-wrapper" }, h("slot", { key: '4bf039f3e17beb1115ba6099d13e9adb23eca3c2', name: "before-input" }), h("div", { key: 'f23ab3d1a0b28d344a667f99c8dd724d626d82fa', class: "input-container", onClick: this.handleInputContainerClick }, h("slot", { key: '1a6428bda44219a2a98ab93a034a6d69f4ca98cd', name: "leading-input" }), h("input", { key: 'a72a271798bc03a57508ea741d47e1ca85b3fa08', id: this.inputId, ref: e => (this.inputElement = e), 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.hidePasswordIcon && (h("nv-iconbutton", { key: '96366b1566880736596184c6c7dac481d1a190ae', class: "toggle-password-icon", name: this.showPasswordState ? 'eye' : 'eye-off', size: "md", emphasis: "lower", onClick: this.togglePasswordVisibility, onKeyDown: this.handleKeyDown, "aria-label": this.showPasswordState ? 'Hide password' : 'Show password', "aria-pressed": this.showPasswordState.toString() })), (this.success || this.error) && (h("nv-icon", { key: 'e6ec810a41dbbc2361d15e7b806c681e72c0a0f6', name: this.success ? 'circle-check' : 'alert-circle', class: "validation", size: "md" }))), h("slot", { key: 'a76b800fa51332d72b6e70e6a2fe108b465fd386', name: "after-input" })), (this.description ||
105
- this.el.querySelector('[slot="description"]')) && (h("div", { key: 'c6f84e11fd78209c96962878f122ad9968a6565d', class: "description" }, h("slot", { key: '573529d2ea58260e23b3371c34a8c78145bbcab5', name: "description" }, this.description))), (this.errorDescription ||
106
- this.el.querySelector('[slot="error-description"]')) && (h("div", { key: 'eaf73702cd472457cefae98438ba7001f4dddc89', hidden: !this.error, class: "error-description" }, h("slot", { key: '2f1e983d78f4e0f5879b6bd163d76e1511026fb6', name: "error-description" }, this.errorDescription)))));
110
+ return (h(Host, { key: 'a2a75f57ed5aab1871093e0dc8cb1fc69bbcd629' }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: 'ae72e6b94840984218b27a31ad73e0f8045ca7ec', htmlFor: this.inputId }, h("slot", { key: 'ed5944910dcc313d5d714da59335997e940db46a', name: "label" }, this.label))), h("div", { key: '8253dfa7980a3b8296eb87340279e9d7d541dcf5', class: "input-wrapper" }, h("slot", { key: '8175a3cff67ab23147137b2c0eb90011a599fff1', name: "before-input" }), h("div", { key: 'ba8c2cc23f94de4c35682e8fa5d5f03ddc5f682b', class: "input-container", onClick: this.handleInputContainerClick }, h("slot", { key: '086607d8ab45057b91c5c4bce05555df1c2cf908', name: "leading-input" }), h("input", { key: 'acf906ca1704017f77edde85529f06610d434606', 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.hidePasswordIcon && (h("nv-iconbutton", { key: '89c996d184b91cdb27a7d5fc6c8591ef678e4830', class: "toggle-password-icon", name: this.showPasswordState ? 'eye' : 'eye-off', size: "md", emphasis: "lower", onClick: this.togglePasswordVisibility, onKeyDown: this.handleKeyDown, "aria-label": this.showPasswordState ? 'Hide password' : 'Show password', "aria-pressed": this.showPasswordState.toString() })), (this.success || this.error) && (h("nv-icon", { key: '650e6ab57d36aab285b7d3648eeca9272c5967b9', name: this.success ? 'circle-check' : 'alert-circle', class: "validation", size: "md" }))), h("slot", { key: '05cca97a872c4c45e1bf6b76bbf0dfdeaa5dd9d7', name: "after-input" })), (this.description ||
111
+ this.el.querySelector('[slot="description"]')) && (h("div", { key: '4a0816cfb135de9b787e89cfed15d69cd3006674', class: "description" }, h("slot", { key: 'a549520294ab5b05671e1621977001da5dd0b366', name: "description" }, this.description))), (this.errorDescription ||
112
+ this.el.querySelector('[slot="error-description"]')) && (h("div", { key: '0f94385395ad3a178d0567e582c297b7065ada10', hidden: !this.error, class: "error-description" }, h("slot", { key: 'dc1496e3a175192aa15d68985d157687e64828b2', name: "error-description" }, this.errorDescription)))));
107
113
  }
108
114
  static get is() { return "nv-fieldpassword"; }
109
115
  static get formAssociated() { return true; }
@@ -444,7 +450,7 @@ export class NvFieldpassword {
444
450
  "mutable": false,
445
451
  "complexType": {
446
452
  "original": "`${TextInputAutocomplete}`",
447
- "resolved": "\"on\" | \"off\" | \"home\" | \"section-*\" | \"shipping\" | \"billing\" | \"work\" | \"mobile\" | \"fax\" | \"pager\" | \"tel\" | \"tel-country-code\" | \"tel-national\" | \"tel-area-code\" | \"tel-local\" | \"tel-local-prefix\" | \"tel-local-suffix\" | \"tel-extension\" | \"email\" | \"impp\" | \"name\" | \"honorific-prefix\" | \"given-name\" | \"additional-name\" | \"family-name\" | \"honorific-suffix\" | \"nickname\" | \"username\" | \"new-password\" | \"current-password\" | \"one-time-code\" | \"organization-title\" | \"organization\" | \"street-address\" | \"address-line1\" | \"address-line2\" | \"address-line3\" | \"address-level4\" | \"address-level3\" | \"address-level2\" | \"address-level1\" | \"country\" | \"country-name\" | \"postal-code\" | \"cc-name\" | \"cc-given-name\" | \"cc-additional-name\" | \"cc-family-name\" | \"cc-number\" | \"cc-exp\" | \"cc-exp-month\" | \"cc-exp-year\" | \"cc-csc\" | \"cc-type\" | \"transaction-currency\" | \"transaction-amount\" | \"language\" | \"bday\" | \"bday-day\" | \"bday-month\" | \"bday-year\" | \"sex\" | \"url\" | \"photo\"",
453
+ "resolved": "\"on\" | \"off\" | \"section-*\" | \"shipping\" | \"billing\" | \"home\" | \"work\" | \"mobile\" | \"fax\" | \"pager\" | \"tel\" | \"tel-country-code\" | \"tel-national\" | \"tel-area-code\" | \"tel-local\" | \"tel-local-prefix\" | \"tel-local-suffix\" | \"tel-extension\" | \"email\" | \"impp\" | \"name\" | \"honorific-prefix\" | \"given-name\" | \"additional-name\" | \"family-name\" | \"honorific-suffix\" | \"nickname\" | \"username\" | \"new-password\" | \"current-password\" | \"one-time-code\" | \"organization-title\" | \"organization\" | \"street-address\" | \"address-line1\" | \"address-line2\" | \"address-line3\" | \"address-level4\" | \"address-level3\" | \"address-level2\" | \"address-level1\" | \"country\" | \"country-name\" | \"postal-code\" | \"cc-name\" | \"cc-given-name\" | \"cc-additional-name\" | \"cc-family-name\" | \"cc-number\" | \"cc-exp\" | \"cc-exp-month\" | \"cc-exp-year\" | \"cc-csc\" | \"cc-type\" | \"transaction-currency\" | \"transaction-amount\" | \"language\" | \"bday\" | \"bday-day\" | \"bday-month\" | \"bday-year\" | \"sex\" | \"url\" | \"photo\"",
448
454
  "references": {
449
455
  "TextInputAutocomplete": {
450
456
  "location": "import",
@@ -504,6 +510,26 @@ export class NvFieldpassword {
504
510
  "attribute": "show-password",
505
511
  "reflect": true,
506
512
  "defaultValue": "false"
513
+ },
514
+ "autofocus": {
515
+ "type": "boolean",
516
+ "mutable": false,
517
+ "complexType": {
518
+ "original": "boolean",
519
+ "resolved": "boolean",
520
+ "references": {}
521
+ },
522
+ "required": false,
523
+ "optional": false,
524
+ "docs": {
525
+ "tags": [],
526
+ "text": "Applies focus to the input field as soon as the component is mounted. This\nis equivalent to setting the native autofocus attribute on an <input>\nelement."
527
+ },
528
+ "getter": false,
529
+ "setter": false,
530
+ "attribute": "autofocus",
531
+ "reflect": true,
532
+ "defaultValue": "false"
507
533
  }
508
534
  };
509
535
  }
@@ -1 +1 @@
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;AAEvB,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AAEpC;;;;;;;GAOG;AAQH,MAAM,OAAO,eAAe;IAN5B;QAUE,8EAA8E;QAC9E,oBAAoB;QAEpB;;;;;WAKG;QAEM,YAAO,GAAW,MAAM,EAAE,CAAC;QA4CpC;;;;WAIG;QAEM,aAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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';\n\nimport { v4 as uuidv4 } from 'uuid';\nimport { TextInputAutocomplete } from '../../utils/constants';\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\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 = this.showPassword;\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 handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === ' ') {\n event.preventDefault(); // Prevent the space character from being added\n setTimeout(() => {\n this.togglePasswordVisibility();\n }, 0);\n }\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 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 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.hidePasswordIcon && (\n <nv-iconbutton\n class=\"toggle-password-icon\"\n name={this.showPasswordState ? 'eye' : 'eye-off'}\n size=\"md\"\n emphasis=\"lower\"\n onClick={this.togglePasswordVisibility}\n onKeyDown={this.handleKeyDown}\n aria-label={\n this.showPasswordState ? 'Hide password' : 'Show password'\n }\n aria-pressed={this.showPasswordState.toString()}\n />\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 </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,SA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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 = this.showPassword;\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 handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === ' ') {\n event.preventDefault(); // Prevent the space character from being added\n setTimeout(() => {\n this.togglePasswordVisibility();\n }, 0);\n }\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 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.hidePasswordIcon && (\n <nv-iconbutton\n class=\"toggle-password-icon\"\n name={this.showPasswordState ? 'eye' : 'eye-off'}\n size=\"md\"\n emphasis=\"lower\"\n onClick={this.togglePasswordVisibility}\n onKeyDown={this.handleKeyDown}\n aria-label={\n this.showPasswordState ? 'Hide password' : 'Show password'\n }\n aria-pressed={this.showPasswordState.toString()}\n />\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 </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"]}
@@ -78,6 +78,14 @@ const NvFieldradioDocs = {
78
78
  },
79
79
  template: h("nv-fieldradio", { "data-storybook-args": true }),
80
80
  },
81
+ {
82
+ name: nameof(x => x.autofocus),
83
+ args: {
84
+ label: 'Autofocus',
85
+ autofocus: true,
86
+ },
87
+ template: h("nv-fieldradio", { "data-storybook-args": true }),
88
+ },
81
89
  {
82
90
  name: 'DisabledChecked',
83
91
  description: 'Radio button in a disabled state.',
@@ -1 +1 @@
1
- {"version":3,"file":"nv-fieldradio.docs.js","sourceRoot":"","sources":["../../../src/components/nv-fieldradio/nv-fieldradio.docs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAGlC,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEjD,MAAM,gBAAgB,GAAsC;IAC1D,SAAS,EAAE,eAAe;IAC1B,OAAO,EAAE;QACP;YACE,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE;YACxB,QAAQ,EAAE,mDAAmD;SAC9D;QACD;YACE,IAAI,EAAE,MAAM,CAA0B,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;Y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B,WAAW,EACT,gEAAgE;YAClE,IAAI,EAAE;gBACJ,KAAK,EAAE,OAAO;gBACd,KAAK,EAAE,IAAI;gBACX,gBAAgB,EAAE,mBAAmB;aACtC;YACD,QAAQ,EAAE,CACR;gBACE,YAAM,IAAI,EAAC,mBAAmB,+BAAgC,CAChD,CACjB;SACF;KACF;CACF,CAAC;AAEF,eAAe,gBAAgB,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 NvFieldradioDocs: NovaDocs<Components.NvFieldradio> = {\n component: 'nv-fieldradio',\n stories: [\n {\n name: 'Default',\n args: { label: 'Label' },\n template: <nv-fieldradio data-storybook-args></nv-fieldradio>,\n },\n {\n name: nameof<Components.NvFieldradio>(x => x.name),\n args: {\n name: 'group',\n },\n template: (\n <fieldset data-class=\"flex flex-col gap-4\">\n <nv-fieldradio data-storybook-args label=\"Option 1\"></nv-fieldradio>\n <nv-fieldradio data-storybook-args label=\"Option 2\"></nv-fieldradio>\n <nv-fieldradio data-storybook-args label=\"Option 3\"></nv-fieldradio>\n </fieldset>\n ),\n },\n {\n name: nameof<Components.NvFieldradio>(x => x.value),\n args: {\n label: 'Label',\n value: 'value',\n },\n template: <nv-fieldradio data-storybook-args></nv-fieldradio>,\n },\n {\n name: nameof<Components.NvFieldradio>(x => x.label),\n args: {\n label: 'Label',\n },\n template: <nv-fieldradio data-storybook-args></nv-fieldradio>,\n },\n {\n name: nameof<Components.NvFieldradio>(x => x.labelPlacement),\n args: {\n name: 'group',\n },\n template: (\n <div data-class=\"flex gap-4\">\n <nv-fieldradio\n data-storybook-args\n label=\"before\"\n label-placement=\"before\"\n ></nv-fieldradio>\n <nv-fieldradio\n data-storybook-args\n label=\"after\"\n label-placement=\"after\"\n ></nv-fieldradio>\n </div>\n ),\n },\n {\n name: nameof<Components.NvFieldradio>(x => x.description),\n args: {\n label: 'Label',\n description: 'Description',\n },\n template: <nv-fieldradio data-storybook-args></nv-fieldradio>,\n },\n {\n name: nameof<Components.NvFieldradio>(x => x.error),\n args: {\n label: 'Label',\n error: true,\n },\n template: <nv-fieldradio data-storybook-args></nv-fieldradio>,\n },\n {\n name: nameof<Components.NvFieldradio>(x => x.errorDescription),\n args: {\n label: 'Label',\n error: true,\n errorDescription: 'There is an error!',\n },\n template: <nv-fieldradio data-storybook-args></nv-fieldradio>,\n },\n {\n name: nameof<Components.NvFieldradio>(x => x.checked),\n args: {\n label: 'Label',\n checked: true,\n },\n template: <nv-fieldradio data-storybook-args></nv-fieldradio>,\n },\n {\n name: nameof<Components.NvFieldradio>(x => x.disabled),\n args: {\n label: 'Label',\n disabled: true,\n },\n template: <nv-fieldradio data-storybook-args></nv-fieldradio>,\n },\n {\n name: 'DisabledChecked',\n description: 'Radio button in a disabled state.',\n args: {\n label: 'Label',\n disabled: true,\n checked: true,\n },\n template: <nv-fieldradio data-storybook-args></nv-fieldradio>,\n },\n {\n name: 'SlotLabel',\n description: 'Radio button replacing the label with custom html.',\n args: {\n label: 'Label',\n },\n template: (\n <nv-fieldradio data-storybook-args>\n <span slot=\"label\">Custom Label</span>\n </nv-fieldradio>\n ),\n },\n {\n name: 'SlotDescription',\n description: 'Radio button replacing the description with custom html.',\n args: {\n label: 'Label',\n description: 'Description',\n },\n template: (\n <nv-fieldradio data-storybook-args>\n <span slot=\"description\">Custom Description</span>\n </nv-fieldradio>\n ),\n },\n {\n name: 'SlotErrorDescription',\n description:\n 'Radio button replacing the error description with custom html.',\n args: {\n label: 'Label',\n error: true,\n errorDescription: 'Error Description',\n },\n template: (\n <nv-fieldradio data-storybook-args>\n <span slot=\"error-description\">Custom Error Description</span>\n </nv-fieldradio>\n ),\n },\n ],\n};\n\nexport default NvFieldradioDocs;\n"]}
1
+ {"version":3,"file":"nv-fieldradio.docs.js","sourceRoot":"","sources":["../../../src/components/nv-fieldradio/nv-fieldradio.docs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,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E;gBACJ,KAAK,EAAE,OAAO;gBACd,QAAQ,EAAE,IAAI;gBACd,OAAO,EAAE,IAAI;aACd;YACD,QAAQ,EAAE,mDAAmD;SAC9D;QACD;YACE,IAAI,EAAE,WAAW;YACjB,WAAW,EAAE,oDAAoD;YACjE,IAAI,EAAE;gBACJ,KAAK,EAAE,OAAO;aACf;YACD,QAAQ,EAAE,CACR;gBACE,YAAM,IAAI,EAAC,OAAO,mBAAoB,CACxB,CACjB;SACF;QACD;YACE,IAAI,EAAE,iBAAiB;YACvB,WAAW,EAAE,0DAA0D;YACvE,IAAI,EAAE;gBACJ,KAAK,EAAE,OAAO;gBACd,WAAW,EAAE,aAAa;aAC3B;YACD,QAAQ,EAAE,CACR;gBACE,YAAM,IAAI,EAAC,aAAa,yBAA0B,CACpC,CACjB;SACF;QACD;YACE,IAAI,EAAE,sBAAsB;YAC5B,WAAW,EACT,gEAAgE;YAClE,IAAI,EAAE;gBACJ,KAAK,EAAE,OAAO;gBACd,KAAK,EAAE,IAAI;gBACX,gBAAgB,EAAE,mBAAmB;aACtC;YACD,QAAQ,EAAE,CACR;gBACE,YAAM,IAAI,EAAC,mBAAmB,+BAAgC,CAChD,CACjB;SACF;KACF;CACF,CAAC;AAEF,eAAe,gBAAgB,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 NvFieldradioDocs: NovaDocs<Components.NvFieldradio> = {\n component: 'nv-fieldradio',\n stories: [\n {\n name: 'Default',\n args: { label: 'Label' },\n template: <nv-fieldradio data-storybook-args></nv-fieldradio>,\n },\n {\n name: nameof<Components.NvFieldradio>(x => x.name),\n args: {\n name: 'group',\n },\n template: (\n <fieldset data-class=\"flex flex-col gap-4\">\n <nv-fieldradio data-storybook-args label=\"Option 1\"></nv-fieldradio>\n <nv-fieldradio data-storybook-args label=\"Option 2\"></nv-fieldradio>\n <nv-fieldradio data-storybook-args label=\"Option 3\"></nv-fieldradio>\n </fieldset>\n ),\n },\n {\n name: nameof<Components.NvFieldradio>(x => x.value),\n args: {\n label: 'Label',\n value: 'value',\n },\n template: <nv-fieldradio data-storybook-args></nv-fieldradio>,\n },\n {\n name: nameof<Components.NvFieldradio>(x => x.label),\n args: {\n label: 'Label',\n },\n template: <nv-fieldradio data-storybook-args></nv-fieldradio>,\n },\n {\n name: nameof<Components.NvFieldradio>(x => x.labelPlacement),\n args: {\n name: 'group',\n },\n template: (\n <div data-class=\"flex gap-4\">\n <nv-fieldradio\n data-storybook-args\n label=\"before\"\n label-placement=\"before\"\n ></nv-fieldradio>\n <nv-fieldradio\n data-storybook-args\n label=\"after\"\n label-placement=\"after\"\n ></nv-fieldradio>\n </div>\n ),\n },\n {\n name: nameof<Components.NvFieldradio>(x => x.description),\n args: {\n label: 'Label',\n description: 'Description',\n },\n template: <nv-fieldradio data-storybook-args></nv-fieldradio>,\n },\n {\n name: nameof<Components.NvFieldradio>(x => x.error),\n args: {\n label: 'Label',\n error: true,\n },\n template: <nv-fieldradio data-storybook-args></nv-fieldradio>,\n },\n {\n name: nameof<Components.NvFieldradio>(x => x.errorDescription),\n args: {\n label: 'Label',\n error: true,\n errorDescription: 'There is an error!',\n },\n template: <nv-fieldradio data-storybook-args></nv-fieldradio>,\n },\n {\n name: nameof<Components.NvFieldradio>(x => x.checked),\n args: {\n label: 'Label',\n checked: true,\n },\n template: <nv-fieldradio data-storybook-args></nv-fieldradio>,\n },\n {\n name: nameof<Components.NvFieldradio>(x => x.disabled),\n args: {\n label: 'Label',\n disabled: true,\n },\n template: <nv-fieldradio data-storybook-args></nv-fieldradio>,\n },\n {\n name: nameof<Components.NvFieldradio>(x => x.autofocus),\n args: {\n label: 'Autofocus',\n autofocus: true,\n },\n template: <nv-fieldradio data-storybook-args></nv-fieldradio>,\n },\n {\n name: 'DisabledChecked',\n description: 'Radio button in a disabled state.',\n args: {\n label: 'Label',\n disabled: true,\n checked: true,\n },\n template: <nv-fieldradio data-storybook-args></nv-fieldradio>,\n },\n {\n name: 'SlotLabel',\n description: 'Radio button replacing the label with custom html.',\n args: {\n label: 'Label',\n },\n template: (\n <nv-fieldradio data-storybook-args>\n <span slot=\"label\">Custom Label</span>\n </nv-fieldradio>\n ),\n },\n {\n name: 'SlotDescription',\n description: 'Radio button replacing the description with custom html.',\n args: {\n label: 'Label',\n description: 'Description',\n },\n template: (\n <nv-fieldradio data-storybook-args>\n <span slot=\"description\">Custom Description</span>\n </nv-fieldradio>\n ),\n },\n {\n name: 'SlotErrorDescription',\n description:\n 'Radio button replacing the error description with custom html.',\n args: {\n label: 'Label',\n error: true,\n errorDescription: 'Error Description',\n },\n template: (\n <nv-fieldradio data-storybook-args>\n <span slot=\"error-description\">Custom Error Description</span>\n </nv-fieldradio>\n ),\n },\n ],\n};\n\nexport default NvFieldradioDocs;\n"]}
@@ -38,6 +38,12 @@ export class NvFieldradio {
38
38
  * Disables the radio button, making it un-selectable.
39
39
  */
40
40
  this.disabled = false;
41
+ /**
42
+ * Applies focus to the input field as soon as the component is mounted. This
43
+ * is equivalent to setting the native autofocus attribute on an <input>
44
+ * element.
45
+ */
46
+ this.autofocus = false;
41
47
  }
42
48
  componentWillRender() {
43
49
  if (this.message) {
@@ -77,9 +83,9 @@ export class NvFieldradio {
77
83
  /****************************************************************************/
78
84
  //#region RENDER
79
85
  render() {
80
- return (h(Host, { key: '80bb3754db4eeb929cf833fe73a8c7d7c0e6225e', class: clsx(this.labelPlacement === 'before' && 'label-placement-before', this.error && 'error') }, h("input", { key: '838c8436f3ed6d7edfb6cdc56867e9323252288d', type: "radio", id: this.inputId, name: this.name, autocomplete: "off", value: this.value, checked: this.checked, disabled: this.disabled }), h("div", { key: '602a828308bdc83a478d42b6ff46899214b7ed49', class: "text-container" }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: '70da1608dea085bc1cc63bcb3cbc31621aba31b6', htmlFor: this.inputId }, h("slot", { key: '4edd428f00a2ec5633808ce7cf64b7e7833bb864', name: "label" }, this.label))), (this.description ||
81
- this.el.querySelector('[slot="description"]')) && (h("div", { key: 'e377c77bacefcee4f7a23401a32cd9e204b07e47', class: "description" }, h("slot", { key: 'cc2e026dbb9ee463fa83d422ea9df05051e4bf97', name: "description" }, this.description))), (this.errorDescription ||
82
- this.el.querySelector('[slot="error-description"]')) && (h("div", { key: 'da4b39a727577af0417acc8b7c571a7565896187', hidden: !this.error, class: "error-description" }, h("slot", { key: '5d64b003bf9dd756e695685342d8f12af9e04815', name: "error-description" }, this.errorDescription))))));
86
+ return (h(Host, { key: 'cade01b60e51b998455b5c2230a78eea38e0bc37', class: clsx(this.labelPlacement === 'before' && 'label-placement-before', this.error && 'error') }, h("input", { key: '6d8447c0fa3909e02841545d873eea91fa47df4a', 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: '4d5091c83fc3d7252992808957eab4d48f2bc2a2', class: "text-container" }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: '54aec63e1cb36ca4da70217dcbc660566cce5d7b', htmlFor: this.inputId }, h("slot", { key: '90532425375b668ae6626fecb856f8f9ceb81988', name: "label" }, this.label))), (this.description ||
87
+ this.el.querySelector('[slot="description"]')) && (h("div", { key: '54853df7ac2a43e4de04924fabb2270258b663b8', class: "description" }, h("slot", { key: '9e806a6957feff9555ea2a578fd91ea0253d1157', name: "description" }, this.description))), (this.errorDescription ||
88
+ this.el.querySelector('[slot="error-description"]')) && (h("div", { key: 'f3c90009eba0cef54231c9b38b7829d8b9433563', hidden: !this.error, class: "error-description" }, h("slot", { key: '5b517d44167035b867b7d2cbedeab2a5925156b6', name: "error-description" }, this.errorDescription))))));
83
89
  }
84
90
  static get is() { return "nv-fieldradio"; }
85
91
  static get formAssociated() { return true; }
@@ -345,6 +351,26 @@ export class NvFieldradio {
345
351
  "attribute": "disabled",
346
352
  "reflect": true,
347
353
  "defaultValue": "false"
354
+ },
355
+ "autofocus": {
356
+ "type": "boolean",
357
+ "mutable": false,
358
+ "complexType": {
359
+ "original": "boolean",
360
+ "resolved": "boolean",
361
+ "references": {}
362
+ },
363
+ "required": false,
364
+ "optional": false,
365
+ "docs": {
366
+ "tags": [],
367
+ "text": "Applies focus to the input field as soon as the component is mounted. This\nis equivalent to setting the native autofocus attribute on an <input>\nelement."
368
+ },
369
+ "getter": false,
370
+ "setter": false,
371
+ "attribute": "autofocus",
372
+ "reflect": true,
373
+ "defaultValue": "false"
348
374
  }
349
375
  };
350
376
  }
@@ -1 +1 @@
1
- {"version":3,"file":"nv-fieldradio.js","sourceRoot":"","sources":["../../../src/components/nv-fieldradio/nv-fieldradio.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,KAAK,EAEL,MAAM,EACN,KAAK,EACL,OAAO,GACR,MAAM,eAAe,CAAC;AACvB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AAIpC;;;;GAIG;AAOH,MAAM,OAAO,YAAY;IANzB;QAmBE;;;WAGG;QAEM,gBAAW,GAAY,KAAK,CAAC;QAYtC,uBAAuB;QACvB,8EAA8E;QAC9E,oBAAoB;QAEpB;;;;;WAKG;QAEM,YAAO,GAAW,MAAM,EAAE,CAAC;QA0CpC;;;;;WAKG;QAEM,UAAK,GAAY,KAAK,CAAC;QAUhC;;WAEG;QAEH,YAAO,GAAY,KAAK,CAAC;QAEzB;;WAEG;QAEM,aAAQ,GAAY,KAAK,CAAC;KAgGpC;IA1LC,mBAAmB;QACjB,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACjB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC;QAClC,CAAC;QAED,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YACrB,IAAI,CAAC,cAAc,GAAG,QAAQ,CAAC;QACjC,CAAC;IACH,CA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B,CAAC,CAAC,IAAI,CAC1D,8DAAO,OAAO,EAAE,IAAI,CAAC,OAAO;oBAC1B,6DAAM,IAAI,EAAC,OAAO,IAAE,IAAI,CAAC,KAAK,CAAQ,CAChC,CACT;gBAEA,CAAC,IAAI,CAAC,WAAW;oBAChB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,sBAAsB,CAAC,CAAC,IAAI,CAClD,4DAAK,KAAK,EAAC,aAAa;oBACtB,6DAAM,IAAI,EAAC,aAAa,IAAE,IAAI,CAAC,WAAW,CAAQ,CAC9C,CACP;gBAEA,CAAC,IAAI,CAAC,gBAAgB;oBACrB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,4BAA4B,CAAC,CAAC,IAAI,CACxD,4DAAK,MAAM,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,EAAC,mBAAmB;oBACjD,6DAAM,IAAI,EAAC,mBAAmB,IAAE,IAAI,CAAC,gBAAgB,CAAQ,CACzD,CACP,CACG,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGF","sourcesContent":["import {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n Listen,\n Watch,\n Element,\n} from '@stencil/core';\nimport clsx from 'clsx';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport { type LabelPlacement } from '../../utils/constants';\n\n/**\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-fieldradio',\n shadow: false,\n styleUrl: 'nv-fieldradio.scss',\n formAssociated: true,\n})\nexport class NvFieldradio {\n @Element() el: HTMLNvFieldradioElement;\n\n /****************************************************************************/\n //#region DEPRECATED\n\n /**\n * Adds a helpful hint message below the label\n * @deprecated use description instead.\n */\n @Prop()\n readonly message: string;\n\n /**\n * Set the label placement to before the input\n * @deprecated use labelPlacement instead.\n */\n @Prop()\n readonly labelBefore: boolean = false;\n\n componentWillRender() {\n if (this.message) {\n this.description = this.message;\n }\n\n if (this.labelBefore) {\n this.labelPlacement = 'before';\n }\n }\n\n //#endregion DEPRECATED\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the radio button’s input element and the for attribute of\n * the associated label. If no ID is provided, a random one will be\n * automatically generated to ensure unique identification, facilitating\n * proper label association and accessibility.\n */\n @Prop({ reflect: true })\n readonly inputId: string = uuidv4();\n\n /**\n * Use this to assign a group name to your radio buttons. When you have\n * multiple radio buttons with the same name, users will be able to select\n * only one option within that group, making your forms more organized and\n * user-friendly.\n */\n @Prop({ reflect: true })\n readonly name: string;\n\n /**\n * Defines what data will be sent when the radio button is selected.\n * This helps you identify which option the user has chosen in your form,\n * ensuring accurate data collection. When the form is submitted, the data\n * will consist of a name=value pair.\n */\n @Prop({ reflect: true })\n readonly value: string;\n\n /**\n * Sets the text content that is rendered next to the input element of type\n * radio. This label is essential for accessibility and user clarity, as it\n * describes the purpose or option of the radio button.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Defines the position of the label relative to the radio button.\n */\n @Prop({ mutable: true, reflect: true })\n labelPlacement: `${LabelPlacement}`;\n\n /**\n * Adds a helpful hint message below the label. This description provides\n * extra information or context about the radio button option, assisting users\n * in making more informed choices.\n */\n @Prop({ mutable: true, reflect: true })\n description: string;\n\n /**\n * Highlight the radio button with error styling. It helps users quickly\n * identify which option needs attention, improving their form-filling\n * experience by making issues more visible.\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 radio\n * button.\n * @validator message\n */\n @Prop({ reflect: true })\n readonly errorDescription: string;\n\n /**\n * Controls whether the radio button is selected.\n */\n @Prop({ mutable: true, reflect: true })\n checked: boolean = false;\n\n /**\n * Disables the radio button, making it un-selectable.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emits when the checked state changes.\n * @bind checked\n */\n @Event()\n checkedChanged: EventEmitter<boolean>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region WATCHERS\n\n /**\n * Watches for changes to the checked state and emits the new value.\n * @param {boolean} checked - The new value of the checked state.\n */\n @Watch('checked')\n handleCheckedChange(checked: boolean) {\n this.checkedChanged.emit(checked);\n }\n\n /**\n * Listens for the change event on the radio button input element and controls\n * the checked state of the host elements.\n * @param {Event} event - The change event.\n */\n @Listen('change')\n handleChange(event: Event) {\n const target = event.target as HTMLInputElement;\n\n if (target?.type === 'radio') {\n Array.from(document.getElementsByTagName('nv-fieldradio')).forEach(\n element => {\n if (element.name === this.name) {\n element.checked = false;\n }\n },\n );\n\n this.checked = target.checked;\n }\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host\n class={clsx(\n this.labelPlacement === 'before' && 'label-placement-before',\n this.error && 'error',\n )}\n >\n <input\n type=\"radio\"\n id={this.inputId}\n name={this.name}\n autocomplete=\"off\"\n value={this.value}\n checked={this.checked}\n disabled={this.disabled}\n />\n\n <div class=\"text-container\">\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 {(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 </div>\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"]}
1
+ {"version":3,"file":"nv-fieldradio.js","sourceRoot":"","sources":["../../../src/components/nv-fieldradio/nv-fieldradio.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,KAAK,EAEL,MAAM,EACN,KAAK,EACL,OAAO,GACR,MAAM,eAAe,CAAC;AACvB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AAIpC;;;;GAIG;AAOH,MAAM,OAAO,YAAY;IANzB;QAmBE;;;WAGG;QAEM,gBAAW,GAAY,KAAK,CAAC;QAYtC,uBAAuB;QACvB,8EAA8E;QAC9E,oBAAoB;QAEpB;;;;;WAKG;QAEM,YAAO,GAAW,MAAM,EAAE,CAAC;QA0CpC;;;;;WAKG;QAEM,UAAK,GAAY,KAAK,CAAC;QAUhC;;WAEG;QAEH,YAAO,GAAY,KAAK,CAAC;QAEzB;;WAEG;QAEM,aAAQ,GAAY,KAAK,CAAC;QAEnC;;;;WAIG;QAGM,cAAS,GAAY,KAAK,CAAC;KAiGrC;IApMC,mBAAmB;QACjB,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACjB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC;QAClC,CAAC;QAED,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YACrB,IAAI,CAAC,cAAc,GAAG,QAAQ,CAAC;QACjC,CAAC;IACH,CAAC;IAwGD,mBAAmB;IACnB,8EAA8E;IAC9E,kBAAkB;IAElB;;;OAGG;IAEH,mBAAmB,CAAC,OAAgB;QAClC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACpC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K,CAAQ,CAChC,CACT;gBAEA,CAAC,IAAI,CAAC,WAAW;oBAChB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,sBAAsB,CAAC,CAAC,IAAI,CAClD,4DAAK,KAAK,EAAC,aAAa;oBACtB,6DAAM,IAAI,EAAC,aAAa,IAAE,IAAI,CAAC,WAAW,CAAQ,CAC9C,CACP;gBAEA,CAAC,IAAI,CAAC,gBAAgB;oBACrB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,4BAA4B,CAAC,CAAC,IAAI,CACxD,4DAAK,MAAM,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,EAAC,mBAAmB;oBACjD,6DAAM,IAAI,EAAC,mBAAmB,IAAE,IAAI,CAAC,gBAAgB,CAAQ,CACzD,CACP,CACG,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGF","sourcesContent":["import {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n Listen,\n Watch,\n Element,\n} from '@stencil/core';\nimport clsx from 'clsx';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport { type LabelPlacement } from '../../utils/constants';\n\n/**\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-fieldradio',\n shadow: false,\n styleUrl: 'nv-fieldradio.scss',\n formAssociated: true,\n})\nexport class NvFieldradio {\n @Element() el: HTMLNvFieldradioElement;\n\n /****************************************************************************/\n //#region DEPRECATED\n\n /**\n * Adds a helpful hint message below the label\n * @deprecated use description instead.\n */\n @Prop()\n readonly message: string;\n\n /**\n * Set the label placement to before the input\n * @deprecated use labelPlacement instead.\n */\n @Prop()\n readonly labelBefore: boolean = false;\n\n componentWillRender() {\n if (this.message) {\n this.description = this.message;\n }\n\n if (this.labelBefore) {\n this.labelPlacement = 'before';\n }\n }\n\n //#endregion DEPRECATED\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the radio button’s input element and the for attribute of\n * the associated label. If no ID is provided, a random one will be\n * automatically generated to ensure unique identification, facilitating\n * proper label association and accessibility.\n */\n @Prop({ reflect: true })\n readonly inputId: string = uuidv4();\n\n /**\n * Use this to assign a group name to your radio buttons. When you have\n * multiple radio buttons with the same name, users will be able to select\n * only one option within that group, making your forms more organized and\n * user-friendly.\n */\n @Prop({ reflect: true })\n readonly name: string;\n\n /**\n * Defines what data will be sent when the radio button is selected.\n * This helps you identify which option the user has chosen in your form,\n * ensuring accurate data collection. When the form is submitted, the data\n * will consist of a name=value pair.\n */\n @Prop({ reflect: true })\n readonly value: string;\n\n /**\n * Sets the text content that is rendered next to the input element of type\n * radio. This label is essential for accessibility and user clarity, as it\n * describes the purpose or option of the radio button.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Defines the position of the label relative to the radio button.\n */\n @Prop({ mutable: true, reflect: true })\n labelPlacement: `${LabelPlacement}`;\n\n /**\n * Adds a helpful hint message below the label. This description provides\n * extra information or context about the radio button option, assisting users\n * in making more informed choices.\n */\n @Prop({ mutable: true, reflect: true })\n description: string;\n\n /**\n * Highlight the radio button with error styling. It helps users quickly\n * identify which option needs attention, improving their form-filling\n * experience by making issues more visible.\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 radio\n * button.\n * @validator message\n */\n @Prop({ reflect: true })\n readonly errorDescription: string;\n\n /**\n * Controls whether the radio button is selected.\n */\n @Prop({ mutable: true, reflect: true })\n checked: boolean = false;\n\n /**\n * Disables the radio button, making it un-selectable.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\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 * Emits when the checked state changes.\n * @bind checked\n */\n @Event()\n checkedChanged: EventEmitter<boolean>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region WATCHERS\n\n /**\n * Watches for changes to the checked state and emits the new value.\n * @param {boolean} checked - The new value of the checked state.\n */\n @Watch('checked')\n handleCheckedChange(checked: boolean) {\n this.checkedChanged.emit(checked);\n }\n\n /**\n * Listens for the change event on the radio button input element and controls\n * the checked state of the host elements.\n * @param {Event} event - The change event.\n */\n @Listen('change')\n handleChange(event: Event) {\n const target = event.target as HTMLInputElement;\n\n if (target?.type === 'radio') {\n Array.from(document.getElementsByTagName('nv-fieldradio')).forEach(\n element => {\n if (element.name === this.name) {\n element.checked = false;\n }\n },\n );\n\n this.checked = target.checked;\n }\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host\n class={clsx(\n this.labelPlacement === 'before' && 'label-placement-before',\n this.error && 'error',\n )}\n >\n <input\n type=\"radio\"\n id={this.inputId}\n name={this.name}\n autofocus={this.autofocus}\n autocomplete=\"off\"\n value={this.value}\n checked={this.checked}\n disabled={this.disabled}\n />\n\n <div class=\"text-container\">\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 {(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 </div>\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"]}