@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
- {"file":"nv-fieldselect.js","mappings":";;;;AAAA,MAAM,gBAAgB,GAAG,8oNAA8oN,CAAC;AACxqN,4BAAe,gBAAgB;;MC2BlBA,eAAa;IAN1B;;;;;;;QAiCU,yBAAoB,GAAW,EAAE,CAAC;QAGlC,qBAAgB,GAAY,KAAK,CAAC;;;;QAalC,kBAAa,GAiBhB,EAAE,CAAC;;;;;;;;;;QAaC,YAAO,GAAWC,EAAM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a,EAAC,EAAE,EAAE,GAAG,IAAI,CAAC,OAAO,cAAc,IACxD,6DAAM,IAAI,EAAC,aAAa,IAAE,IAAI,CAAC,WAAW,CAAQ,CAC9C,CACP,EAEA,CAAC,IAAI,CAAC,gBAAgB;YACrB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,4BAA4B,CAAC,MACnD,4DAAK,KAAK,EAAC,mBAAmB,EAAC,EAAE,EAAE,GAAG,IAAI,CAAC,OAAO,QAAQ,IACxD,6DAAM,IAAI,EAAC,mBAAmB,IAAE,IAAI,CAAC,gBAAgB,CAAQ,CACzD,CACP,CACI,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["NvFieldselect","uuidv4"],"sources":["src/components/nv-fieldselect/nv-fieldselect.scss?tag=nv-fieldselect","src/components/nv-fieldselect/nv-fieldselect.tsx"],"sourcesContent":["@import \"../../styles/form-field\";\n\n@mixin form-field-select-wrapper() {\n display: flex;\n flex-wrap: wrap;\n gap: var(--form-gap-x);\n align-items: stretch;\n align-self: stretch;\n}\n\n@mixin form-field-select-container() {\n display: flex;\n flex-grow: 1;\n padding: calc(var(--form-field-padding-y) - 1px) var(--form-field-padding-x);\n justify-content: center;\n align-items: center;\n gap: var(--form-field-gap);\n align-self: stretch;\n border-radius: var(--form-field-radius);\n border-width: 1px;\n border-style: solid;\n border-color: var(--nv-field-border-default);\n opacity: var(--components-form-opacity-default);\n background: var(--nv-field-background);\n transition: all 150ms ease-out;\n\n &:hover {\n border-color: var(--nv-field-border-hover);\n }\n\n &:focus-within {\n border-color: var(--nv-field-border-focus);\n box-shadow: 0 0 0 var(--focus-field-stroke) var(--nv-field-focus-box-shadow);\n }\n\n &:has(select:disabled) {\n // opacity: var(--components-form-opacity-disabled, 0.5); broken token generation, is 50px instead of 0.5\n opacity: 0.5;\n background-color: var(--components-form-field-background-disabled);\n border-color: var(--nv-field-border-disabled);\n }\n}\n\n@mixin form-field-select() {\n display: flex;\n align-items: center;\n flex: 1 0 0;\n overflow: hidden;\n background-color: transparent;\n color: var(--components-form-field-content-text);\n text-overflow: ellipsis;\n font-size: var(--form-field-font-size);\n font-style: normal;\n font-weight: 500;\n line-height: var(--form-field-line-height);\n\n &:focus {\n outline: none;\n }\n\n &::placeholder {\n overflow: hidden;\n color: var(--components-form-field-content-placeholder);\n text-overflow: ellipsis;\n font-family: \"TT Norms Pro\", sans-serif;\n font-size: var(--form-field-font-size);\n font-style: normal;\n font-weight: 400;\n line-height: var(--form-field-line-height);\n }\n}\n\nnv-fieldselect {\n @include form-field-variables();\n @include form-field-root();\n\n &[readonly]:not([readonly=\"false\"]) {\n @include form-field-readonly-variables();\n }\n\n &[display-value]:not([display-value=\"false\"]) {\n @include form-field-readonly-variables();\n }\n\n &[error]:not([error=\"false\"]) {\n @include form-field-error-variables();\n }\n\n &[success]:not([success=\"false\"]) {\n @include form-field-success-variables();\n }\n\n &[required]:not([required=\"false\"]) label {\n @include form-field-label-required();\n }\n\n label {\n @include form-field-label();\n }\n\n .select-wrapper {\n @include form-field-select-wrapper();\n\n .select-container {\n @include form-field-select-container();\n\n input {\n @include form-field-input();\n\n &:read-only {\n // opacity: var(--components-form-opacity-disabled, 0.5); broken token generation, is 50px instead of 0.5\n opacity: 0.5;\n background-color: var(--components-form-field-background-readonly, rgb(0 0 0 / 10%));\n border-color: var(--nv-field-border-readonly);\n }\n }\n\n select {\n @include form-field-select();\n\n & option {\n background-color: var(--nv-field-background);\n color: var(--components-form-field-content-text, #1d1d1d);\n font-size: var(--form-field-font-size, 16px);\n font-style: normal;\n font-weight: 500;\n line-height: var(--form-field-line-height, 24px);\n\n &:checked {\n background-color: var(--color-orange-500);\n color: var(--color-content-high-text);\n font-size: var(--form-field-font-size, 16px);\n font-style: normal;\n font-weight: 500;\n line-height: var(--form-field-line-height, 24px);\n }\n }\n\n &.hidden {\n display: none;\n }\n }\n\n nv-icon.readonly-icon {\n @include form-field-icon();\n }\n\n nv-icon.validation {\n @include form-field-icon();\n }\n }\n }\n\n .description {\n @include form-field-description();\n }\n\n .error-description {\n @include form-field-error-description();\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n Watch,\n Element,\n State,\n} from '@stencil/core';\nimport { v4 as uuidv4 } from 'uuid';\n\n/**\n * @slot default - Content to be placed inside the select element.\n * @slot leading-input - Content to be placed before the select input, within the select container.\n * @slot before-input - Content to be placed before the select input, outside the select container.\n * @slot after-input - Content to be placed after the select input, outside the select 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-fieldselect',\n shadow: false,\n formAssociated: true,\n styleUrl: 'nv-fieldselect.scss',\n})\nexport class NvFieldselect {\n @Element() el: HTMLNvFieldselectElement;\n private selectElement!: HTMLSelectElement;\n private internals: ElementInternals;\n\n /****************************************************************************/\n //#region DEPRECATED\n\n /**\n * Message defines a 'hint ' message for the Select 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 STATES\n\n @State()\n private computedDisplayValue: string = '';\n\n @State()\n private internalReadonly: boolean = false;\n\n /**\n * Options to display in the select. Can be passed as a JSON string.\n * Format: [{ label: string, value: string, selected?: boolean, disabled?: boolean }]\n */\n @Prop()\n readonly options?: string;\n\n /**\n * Parsed options stored internally\n */\n @State()\n private parsedOptions: Array<{\n /**\n * The label of the option\n */\n label: string;\n /**\n * The value of the option\n */\n value: string;\n /**\n * Whether the option is selected\n */\n selected?: boolean;\n /**\n * Whether the option is disabled\n */\n disabled?: boolean;\n }> = [];\n\n //#endregion STATES\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the select 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 choose in the\n * select 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 select field. This is\n * where you can clarify what users should choose 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 * Defines the name attribute of the select 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 selected 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 select field so that users can’t\n * choose something. 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 select 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 change or delete anything.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * Marks the select 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 select 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 select 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 select field’s appearance to indicate successful input or\n * validation.\n */\n @Prop({ reflect: true })\n readonly success: boolean = false;\n\n /**\n * When enabled, allows the select to handle multiple selections.\n */\n @Prop({ reflect: true })\n readonly multiple: boolean = false;\n\n /**\n * The value of the select field.\n * - If `multiple` is `false`, it's a single string.\n * - If `multiple` is `true`, it's a comma-separated string of selected values.\n */\n @Prop({ reflect: true, mutable: true })\n value: string = '';\n\n /**\n * When enabled, displays the value element instead of the label when readonly.\n * By default, the label is displayed in readonly mode. Also it automatically\n * sets the component to readonly.\n */\n @Prop({ reflect: true })\n readonly displayValue: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the selected value changes.\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<string>; // Emit as a string\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region WATCHERS\n\n /**\n * Updates the display value when the value property changes. This watcher is\n * used to update the display value when the selected value changes. This is\n * necessary for readonly select fields to display the selected value.\n * @internal This watcher is not intended to be called outside of the component.\n * @param {string} newValue - The new value of the select field.\n */\n @Watch('value')\n updateDisplayValueWatcher(newValue: string) {\n this.updateDisplayValue();\n\n if (this.selectElement) {\n const selectedValues = newValue.split(',').map(val => val.trim());\n const options = this.selectElement.options;\n\n if (options) {\n Array.from(options).forEach(option => {\n option.selected = this.multiple\n ? selectedValues.includes(option.value)\n : option.value === selectedValues[0];\n });\n\n if (!this.multiple) {\n this.selectElement.value = newValue; // Only set when not multiple\n }\n } else {\n this.selectElement.value = selectedValues[0] || '';\n }\n }\n\n // Update form value\n this.setFormValue();\n }\n\n /**\n * Watcher for the displayValue prop to ensure internalReadonly is true when displayValue is true.\n * @param {boolean} newValue - The new value of displayValue.\n */\n @Watch('displayValue')\n handleDisplayValueChange(newValue: boolean) {\n this.internalReadonly = newValue; // Set internalReadonly to true if displayValue is true\n\n if (this.readonly) {\n this.internalReadonly = true;\n }\n }\n\n /**\n * Watcher for the readonly prop to ensure internalReadonly is true when readonly is true.\n * @param {boolean} newValue - The new value of readonly.\n */\n @Watch('readonly')\n handleReadonlyChange(newValue: boolean) {\n this.internalReadonly = newValue; // Set internalReadonly to true if displayValue is true\n\n if (this.displayValue) {\n this.internalReadonly = true;\n }\n }\n\n /**\n * Parse options and update the internal state\n * @param {string} newValue - The new value of options\n */\n @Watch('options')\n handleOptionsChange(newValue: string) {\n if (typeof newValue === 'string') {\n try {\n const parsedOpts = JSON.parse(newValue);\n this.parsedOptions = [...parsedOpts];\n\n // Update the value if an option is pre-selected\n const selectedOption = parsedOpts.find(opt => opt.selected);\n if (selectedOption) {\n this.value = selectedOption.value;\n }\n } catch (error) {\n console.error('Error parsing options:', error);\n this.parsedOptions = [];\n }\n }\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Handles the change event on the select element. This method is used to\n * update the value property when the selected options change. It is also\n * used to emit the selectChanged event when the selected value changes.\n * @param {Event} event - The change event on the select element.\n * @emits selectChanged\n */\n private readonly handleSelectChange = (event: Event) => {\n const select = event.target as HTMLSelectElement;\n let selectedValues: string[] = Array.from(select.selectedOptions).map(\n option => option.value,\n );\n\n if (!this.multiple) {\n selectedValues = selectedValues.slice(0, 1);\n }\n\n this.value = this.multiple\n ? selectedValues.join(', ')\n : selectedValues[0] || '';\n this.valueChanged.emit(this.value);\n\n // Update form value\n this.setFormValue();\n };\n\n /**\n * Handles focus when the select container is clicked.\n */\n private readonly handleSelectContainerClick = () => {\n if (!this.internalReadonly && this.selectElement) {\n this.selectElement.focus();\n }\n };\n\n /**\n * Updates the display value of the select field. This method is used to\n * update the display value when the selected value changes. This is necessary\n * for readonly select fields to display the selected value. This method is\n * called in the componentDidLoad lifecycle hook and the updateDisplayValueWatcher\n * watcher.\n * @internal This method is not intended to be called outside of the component.\n */\n private updateDisplayValue(): void {\n if (this.internalReadonly && !this.displayValue) {\n if (this.multiple) {\n const selectedLabels = this.value\n .split(',')\n .map(key => key.trim())\n .map(key => this.getLabelFromId(key) || '')\n .filter(label => label !== '');\n this.computedDisplayValue = selectedLabels.join(', ') || '';\n } else {\n this.computedDisplayValue = this.getLabelFromId(this.value) || '';\n }\n } else if (this.internalReadonly && this.displayValue) {\n this.computedDisplayValue = this.value || '';\n }\n }\n\n /**\n * Retrieves the label from the <option> elements based on the provided key (value).\n * This method uses the id or value attribute directly from the <select> options.\n * @param {string} key - The key (value) for which to find the corresponding label.\n * @returns {string} The label if found; otherwise, an empty string.\n */\n private getLabelFromId(key: string): string {\n this.ensureSelectElement();\n if (!this.selectElement) {\n return '';\n }\n\n // Cache the option list\n const options = this.selectElement.options;\n\n if (options) {\n const option = Array.from(options).find(option => option.value === key);\n return option ? option.textContent.trim() || '' : '';\n } else {\n return '';\n }\n }\n\n /**\n * Sets the value of the form element for form submission. This method is\n * called when the selected value changes or when the value property is set.\n * @internal This method is not intended to be called outside of the component.\n */\n private setFormValue(): void {\n this.internals.setFormValue(this.value);\n }\n\n /**\n * Ensures the select element is available. This method is used to ensure\n * the select element is available before attempting to access it.\n * @internal This method is not intended to be called outside of the component.\n */\n private ensureSelectElement(): void {\n if (!this.selectElement) {\n this.selectElement = this.el.querySelector('select') as HTMLSelectElement;\n }\n }\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillRender() {\n this.updateDisplayValue(); // Ensure display value is updated before render\n\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 /**\n * Lifecycle method that is called before the component is rendered. This is\n * where the internal state is set up before rendering occurs.\n */\n componentWillLoad() {\n // Set internalReadonly based on the readonly prop\n this.internalReadonly = this.readonly;\n\n // Ensure internalReadonly is true if displayValue is true during loading\n if (this.displayValue) {\n this.internalReadonly = true;\n }\n\n if ('attachInternals' in this.el) {\n this.internals = (\n this.el as HTMLElement & {\n /**\n * Attach the element to the form internals.\n * @returns {ElementInternals} - The element internals object.\n */\n attachInternals: () => ElementInternals;\n }\n ).attachInternals();\n } else {\n // Fallback logic for browsers without attachInternals support\n this.internals = {\n setFormValue: (value: string) => {\n const formElement = this.el.closest('form');\n if (formElement) {\n const input = document.createElement('input');\n input.type = 'hidden';\n input.name = this.name;\n input.value = value;\n formElement.appendChild(input);\n }\n },\n } as ElementInternals;\n }\n\n // Initialize value as an empty string if multiple is true\n if (this.multiple && typeof this.value !== 'string') {\n this.value = '';\n }\n\n // Parse initial options if present\n if (this.options) {\n this.handleOptionsChange(this.options);\n }\n }\n\n /**\n * Lifecycle method that is called after the component has been rendered.\n * This is where the display value is updated and the initial select element's\n * state is set.\n */\n componentDidLoad() {\n this.updateDisplayValue();\n\n if (this.selectElement) {\n // Only set the value for single selection, skip for multiple\n if (!this.multiple) {\n this.selectElement.value = this.value;\n }\n\n const selectedValues = this.multiple\n ? this.value.split(',').map(v => v.trim())\n : [this.value];\n\n const options = this.selectElement.options;\n\n if (options) {\n Array.from(options).forEach(option => {\n option.selected = this.multiple\n ? selectedValues.includes(option.value)\n : option.value === selectedValues[0];\n });\n } else {\n // Handle case where there are no options\n this.selectElement.value = selectedValues[0] || '';\n }\n }\n\n // Set the initial form value\n this.setFormValue();\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDERING\n\n /**\n * The render method creates the HTML structure for the component, including\n * the label, select element, and any error or description messages. It also\n * applies the appropriate CSS classes based on the readonly state and\n * displayValue prop. This method is called when the component is rendered.\n * @returns {HTMLStencilElement} The HTML element to 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=\"select-wrapper\">\n <slot name=\"before-input\"></slot>\n\n <div\n class=\"select-container\"\n onClick={this.handleSelectContainerClick}\n >\n <slot name=\"leading-input\"></slot>\n\n {this.internalReadonly && (\n <input\n id={this.inputId + '-readonly'}\n type=\"text\"\n value={this.computedDisplayValue}\n readonly\n class=\"readonly-input\"\n aria-readonly=\"true\"\n aria-label={this.label}\n aria-describedby={\n this.error\n ? `${this.inputId}-error`\n : `${this.inputId}-description`\n }\n />\n )}\n\n <select\n id={this.inputId}\n ref={el => (this.selectElement = el)}\n name={this.name}\n disabled={this.disabled}\n required={this.required}\n multiple={this.multiple}\n onChange={this.handleSelectChange}\n class={this.internalReadonly ? 'hidden' : ''}\n aria-label={this.label}\n aria-describedby={\n this.error\n ? `${this.inputId}-error`\n : `${this.inputId}-description`\n }\n >\n {this.parsedOptions.length > 0 ? (\n this.parsedOptions.map(option => (\n <option\n value={option.value}\n selected={option.selected}\n disabled={option.disabled}\n >\n {option.label}\n </option>\n ))\n ) : (\n <slot />\n )}\n </select>\n\n {this.internalReadonly && (\n <nv-icon name=\"chevron-down\" class=\"readonly-icon\" size=\"sm\" />\n )}\n {this.error && (\n <nv-icon name=\"alert-circle\" class=\"validation\" size=\"sm\" />\n )}\n {this.success && (\n <nv-icon name=\"circle-check\" class=\"validation\" size=\"sm\" />\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\" id={`${this.inputId}-description`}>\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div class=\"error-description\" id={`${this.inputId}-error`}>\n <slot name=\"error-description\">{this.errorDescription}</slot>\n </div>\n )}\n </Host>\n );\n }\n\n //#endregion RENDERING\n}\n"],"version":3}
1
+ {"file":"nv-fieldselect.js","mappings":";;;;AAAA,MAAM,gBAAgB,GAAG,8oNAA8oN,CAAC;AACxqN,4BAAe,gBAAgB;;MC2BlBA,eAAa;IAN1B;;;;;;;QAiCU,yBAAoB,GAAW,EAAE,CAAC;QAGlC,qBAAgB,GAAY,KAAK,CAAC;;;;QAalC,kBAAa,GAiBhB,EAAE,CAAC;;;;;;;;;;QAaC,YAAO,GAAWC,EAAM,EAAE,CAAC;;;;;;QAiC3B,aAAQ,GAAY,KAAK,CAAC;;;;;;QAQ1B,aAAQ,GAAY,KAAK,CAAC;;;;;QAO1B,aAAQ,GAAY,KAAK,CAAC;;;;;;QAQnC,UAAK,GAAY,KAAK,CAAC;;;;;QAgBd,YAAO,GAAY,KAAK,CAAC;;;;QAMzB,aAAQ,GAAY,KAAK,CAAC;;;;;;QAQnC,UAAK,GAAW,EA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CAAC,4BAA4B,CAAC,MACnD,4DAAK,KAAK,EAAC,mBAAmB,EAAC,EAAE,EAAE,GAAG,IAAI,CAAC,OAAO,QAAQ,IACxD,6DAAM,IAAI,EAAC,mBAAmB,IAAE,IAAI,CAAC,gBAAgB,CAAQ,CACzD,CACP,CACI,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["NvFieldselect","uuidv4"],"sources":["src/components/nv-fieldselect/nv-fieldselect.scss?tag=nv-fieldselect","src/components/nv-fieldselect/nv-fieldselect.tsx"],"sourcesContent":["@import \"../../styles/form-field\";\n\n@mixin form-field-select-wrapper() {\n display: flex;\n flex-wrap: wrap;\n gap: var(--form-gap-x);\n align-items: stretch;\n align-self: stretch;\n}\n\n@mixin form-field-select-container() {\n display: flex;\n flex-grow: 1;\n padding: calc(var(--form-field-padding-y) - 1px) var(--form-field-padding-x);\n justify-content: center;\n align-items: center;\n gap: var(--form-field-gap);\n align-self: stretch;\n border-radius: var(--form-field-radius);\n border-width: 1px;\n border-style: solid;\n border-color: var(--nv-field-border-default);\n opacity: var(--components-form-opacity-default);\n background: var(--nv-field-background);\n transition: all 150ms ease-out;\n\n &:hover {\n border-color: var(--nv-field-border-hover);\n }\n\n &:focus-within {\n border-color: var(--nv-field-border-focus);\n box-shadow: 0 0 0 var(--focus-field-stroke) var(--nv-field-focus-box-shadow);\n }\n\n &:has(select:disabled) {\n // opacity: var(--components-form-opacity-disabled, 0.5); broken token generation, is 50px instead of 0.5\n opacity: 0.5;\n background-color: var(--components-form-field-background-disabled);\n border-color: var(--nv-field-border-disabled);\n }\n}\n\n@mixin form-field-select() {\n display: flex;\n align-items: center;\n flex: 1 0 0;\n overflow: hidden;\n background-color: transparent;\n color: var(--components-form-field-content-text);\n text-overflow: ellipsis;\n font-size: var(--form-field-font-size);\n font-style: normal;\n font-weight: 500;\n line-height: var(--form-field-line-height);\n\n &:focus {\n outline: none;\n }\n\n &::placeholder {\n overflow: hidden;\n color: var(--components-form-field-content-placeholder);\n text-overflow: ellipsis;\n font-family: \"TT Norms Pro\", sans-serif;\n font-size: var(--form-field-font-size);\n font-style: normal;\n font-weight: 400;\n line-height: var(--form-field-line-height);\n }\n}\n\nnv-fieldselect {\n @include form-field-variables();\n @include form-field-root();\n\n &[readonly]:not([readonly=\"false\"]) {\n @include form-field-readonly-variables();\n }\n\n &[display-value]:not([display-value=\"false\"]) {\n @include form-field-readonly-variables();\n }\n\n &[error]:not([error=\"false\"]) {\n @include form-field-error-variables();\n }\n\n &[success]:not([success=\"false\"]) {\n @include form-field-success-variables();\n }\n\n &[required]:not([required=\"false\"]) label {\n @include form-field-label-required();\n }\n\n label {\n @include form-field-label();\n }\n\n .select-wrapper {\n @include form-field-select-wrapper();\n\n .select-container {\n @include form-field-select-container();\n\n input {\n @include form-field-input();\n\n &:read-only {\n // opacity: var(--components-form-opacity-disabled, 0.5); broken token generation, is 50px instead of 0.5\n opacity: 0.5;\n background-color: var(--components-form-field-background-readonly, rgb(0 0 0 / 10%));\n border-color: var(--nv-field-border-readonly);\n }\n }\n\n select {\n @include form-field-select();\n\n & option {\n background-color: var(--nv-field-background);\n color: var(--components-form-field-content-text, #1d1d1d);\n font-size: var(--form-field-font-size, 16px);\n font-style: normal;\n font-weight: 500;\n line-height: var(--form-field-line-height, 24px);\n\n &:checked {\n background-color: var(--color-orange-500);\n color: var(--color-content-high-text);\n font-size: var(--form-field-font-size, 16px);\n font-style: normal;\n font-weight: 500;\n line-height: var(--form-field-line-height, 24px);\n }\n }\n\n &.hidden {\n display: none;\n }\n }\n\n nv-icon.readonly-icon {\n @include form-field-icon();\n }\n\n nv-icon.validation {\n @include form-field-icon();\n }\n }\n }\n\n .description {\n @include form-field-description();\n }\n\n .error-description {\n @include form-field-error-description();\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n Watch,\n Element,\n State,\n} from '@stencil/core';\nimport { v4 as uuidv4 } from 'uuid';\n\n/**\n * @slot default - Content to be placed inside the select element.\n * @slot leading-input - Content to be placed before the select input, within the select container.\n * @slot before-input - Content to be placed before the select input, outside the select container.\n * @slot after-input - Content to be placed after the select input, outside the select 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-fieldselect',\n shadow: false,\n formAssociated: true,\n styleUrl: 'nv-fieldselect.scss',\n})\nexport class NvFieldselect {\n @Element() el: HTMLNvFieldselectElement;\n private selectElement!: HTMLSelectElement;\n private internals: ElementInternals;\n\n /****************************************************************************/\n //#region DEPRECATED\n\n /**\n * Message defines a 'hint ' message for the Select 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 STATES\n\n @State()\n private computedDisplayValue: string = '';\n\n @State()\n private internalReadonly: boolean = false;\n\n /**\n * Options to display in the select. Can be passed as a JSON string.\n * Format: [{ label: string, value: string, selected?: boolean, disabled?: boolean }]\n */\n @Prop()\n readonly options?: string;\n\n /**\n * Parsed options stored internally\n */\n @State()\n private parsedOptions: Array<{\n /**\n * The label of the option\n */\n label: string;\n /**\n * The value of the option\n */\n value: string;\n /**\n * Whether the option is selected\n */\n selected?: boolean;\n /**\n * Whether the option is disabled\n */\n disabled?: boolean;\n }> = [];\n\n //#endregion STATES\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the select 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 choose in the\n * select 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 select field. This is\n * where you can clarify what users should choose 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 * Defines the name attribute of the select 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 selected 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 select field so that users can’t\n * choose something. 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 select 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 change or delete anything.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * Marks the select 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 select 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 select 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 select field’s appearance to indicate successful input or\n * validation.\n */\n @Prop({ reflect: true })\n readonly success: boolean = false;\n\n /**\n * When enabled, allows the select to handle multiple selections.\n */\n @Prop({ reflect: true })\n readonly multiple: boolean = false;\n\n /**\n * The value of the select field.\n * - If `multiple` is `false`, it's a single string.\n * - If `multiple` is `true`, it's a comma-separated string of selected values.\n */\n @Prop({ reflect: true, mutable: true })\n value: string = '';\n\n /**\n * When enabled, displays the value element instead of the label when readonly.\n * By default, the label is displayed in readonly mode. Also it automatically\n * sets the component to readonly.\n */\n @Prop({ reflect: true })\n readonly displayValue: 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 a <select>\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 selected value changes.\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<string>; // Emit as a string\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region WATCHERS\n\n /**\n * Updates the display value when the value property changes. This watcher is\n * used to update the display value when the selected value changes. This is\n * necessary for readonly select fields to display the selected value.\n * @internal This watcher is not intended to be called outside of the component.\n * @param {string} newValue - The new value of the select field.\n */\n @Watch('value')\n updateDisplayValueWatcher(newValue: string) {\n this.updateDisplayValue();\n\n if (this.selectElement) {\n const selectedValues = newValue.split(',').map(val => val.trim());\n const options = this.selectElement.options;\n\n if (options) {\n Array.from(options).forEach(option => {\n option.selected = this.multiple\n ? selectedValues.includes(option.value)\n : option.value === selectedValues[0];\n });\n\n if (!this.multiple) {\n this.selectElement.value = newValue; // Only set when not multiple\n }\n } else {\n this.selectElement.value = selectedValues[0] || '';\n }\n }\n\n // Update form value\n this.setFormValue();\n }\n\n /**\n * Watcher for the displayValue prop to ensure internalReadonly is true when displayValue is true.\n * @param {boolean} newValue - The new value of displayValue.\n */\n @Watch('displayValue')\n handleDisplayValueChange(newValue: boolean) {\n this.internalReadonly = newValue; // Set internalReadonly to true if displayValue is true\n\n if (this.readonly) {\n this.internalReadonly = true;\n }\n }\n\n /**\n * Watcher for the readonly prop to ensure internalReadonly is true when readonly is true.\n * @param {boolean} newValue - The new value of readonly.\n */\n @Watch('readonly')\n handleReadonlyChange(newValue: boolean) {\n this.internalReadonly = newValue; // Set internalReadonly to true if displayValue is true\n\n if (this.displayValue) {\n this.internalReadonly = true;\n }\n }\n\n /**\n * Parse options and update the internal state\n * @param {string} newValue - The new value of options\n */\n @Watch('options')\n handleOptionsChange(newValue: string) {\n if (typeof newValue === 'string') {\n try {\n const parsedOpts = JSON.parse(newValue);\n this.parsedOptions = [...parsedOpts];\n\n // Update the value if an option is pre-selected\n const selectedOption = parsedOpts.find(opt => opt.selected);\n if (selectedOption) {\n this.value = selectedOption.value;\n }\n } catch (error) {\n console.error('Error parsing options:', error);\n this.parsedOptions = [];\n }\n }\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Handles the change event on the select element. This method is used to\n * update the value property when the selected options change. It is also\n * used to emit the selectChanged event when the selected value changes.\n * @param {Event} event - The change event on the select element.\n * @emits selectChanged\n */\n private readonly handleSelectChange = (event: Event) => {\n const select = event.target as HTMLSelectElement;\n let selectedValues: string[] = Array.from(select.selectedOptions).map(\n option => option.value,\n );\n\n if (!this.multiple) {\n selectedValues = selectedValues.slice(0, 1);\n }\n\n this.value = this.multiple\n ? selectedValues.join(', ')\n : selectedValues[0] || '';\n this.valueChanged.emit(this.value);\n\n // Update form value\n this.setFormValue();\n };\n\n /**\n * Handles focus when the select container is clicked.\n */\n private readonly handleSelectContainerClick = () => {\n if (!this.internalReadonly && this.selectElement) {\n this.selectElement.focus();\n }\n };\n\n /**\n * Updates the display value of the select field. This method is used to\n * update the display value when the selected value changes. This is necessary\n * for readonly select fields to display the selected value. This method is\n * called in the componentDidLoad lifecycle hook and the updateDisplayValueWatcher\n * watcher.\n * @internal This method is not intended to be called outside of the component.\n */\n private updateDisplayValue(): void {\n if (this.internalReadonly && !this.displayValue) {\n if (this.multiple) {\n const selectedLabels = this.value\n .split(',')\n .map(key => key.trim())\n .map(key => this.getLabelFromId(key) || '')\n .filter(label => label !== '');\n this.computedDisplayValue = selectedLabels.join(', ') || '';\n } else {\n this.computedDisplayValue = this.getLabelFromId(this.value) || '';\n }\n } else if (this.internalReadonly && this.displayValue) {\n this.computedDisplayValue = this.value || '';\n }\n }\n\n /**\n * Retrieves the label from the <option> elements based on the provided key (value).\n * This method uses the id or value attribute directly from the <select> options.\n * @param {string} key - The key (value) for which to find the corresponding label.\n * @returns {string} The label if found; otherwise, an empty string.\n */\n private getLabelFromId(key: string): string {\n this.ensureSelectElement();\n if (!this.selectElement) {\n return '';\n }\n\n // Cache the option list\n const options = this.selectElement.options;\n\n if (options) {\n const option = Array.from(options).find(option => option.value === key);\n return option ? option.textContent.trim() || '' : '';\n } else {\n return '';\n }\n }\n\n /**\n * Sets the value of the form element for form submission. This method is\n * called when the selected value changes or when the value property is set.\n * @internal This method is not intended to be called outside of the component.\n */\n private setFormValue(): void {\n this.internals.setFormValue(this.value);\n }\n\n /**\n * Ensures the select element is available. This method is used to ensure\n * the select element is available before attempting to access it.\n * @internal This method is not intended to be called outside of the component.\n */\n private ensureSelectElement(): void {\n if (!this.selectElement) {\n this.selectElement = this.el.querySelector('select') as HTMLSelectElement;\n }\n }\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillRender() {\n this.updateDisplayValue(); // Ensure display value is updated before render\n\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 /**\n * Lifecycle method that is called before the component is rendered. This is\n * where the internal state is set up before rendering occurs.\n */\n componentWillLoad() {\n // Set internalReadonly based on the readonly prop\n this.internalReadonly = this.readonly;\n\n // Ensure internalReadonly is true if displayValue is true during loading\n if (this.displayValue) {\n this.internalReadonly = true;\n }\n\n if ('attachInternals' in this.el) {\n this.internals = (\n this.el as HTMLElement & {\n /**\n * Attach the element to the form internals.\n * @returns {ElementInternals} - The element internals object.\n */\n attachInternals: () => ElementInternals;\n }\n ).attachInternals();\n } else {\n // Fallback logic for browsers without attachInternals support\n this.internals = {\n setFormValue: (value: string) => {\n const formElement = this.el.closest('form');\n if (formElement) {\n const input = document.createElement('input');\n input.type = 'hidden';\n input.name = this.name;\n input.value = value;\n formElement.appendChild(input);\n }\n },\n } as ElementInternals;\n }\n\n // Initialize value as an empty string if multiple is true\n if (this.multiple && typeof this.value !== 'string') {\n this.value = '';\n }\n\n // Parse initial options if present\n if (this.options) {\n this.handleOptionsChange(this.options);\n }\n }\n\n /**\n * Lifecycle method that is called after the component has been rendered.\n * This is where the display value is updated and the initial select element's\n * state is set.\n */\n componentDidLoad() {\n this.updateDisplayValue();\n\n if (this.selectElement) {\n // Only set the value for single selection, skip for multiple\n if (!this.multiple) {\n this.selectElement.value = this.value;\n }\n\n const selectedValues = this.multiple\n ? this.value.split(',').map(v => v.trim())\n : [this.value];\n\n const options = this.selectElement.options;\n\n if (options) {\n Array.from(options).forEach(option => {\n option.selected = this.multiple\n ? selectedValues.includes(option.value)\n : option.value === selectedValues[0];\n });\n } else {\n // Handle case where there are no options\n this.selectElement.value = selectedValues[0] || '';\n }\n }\n\n // Set the initial form value\n this.setFormValue();\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDERING\n\n /**\n * The render method creates the HTML structure for the component, including\n * the label, select element, and any error or description messages. It also\n * applies the appropriate CSS classes based on the readonly state and\n * displayValue prop. This method is called when the component is rendered.\n * @returns {HTMLStencilElement} The HTML element to 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=\"select-wrapper\">\n <slot name=\"before-input\"></slot>\n\n <div\n class=\"select-container\"\n onClick={this.handleSelectContainerClick}\n >\n <slot name=\"leading-input\"></slot>\n\n {this.internalReadonly && (\n <input\n id={this.inputId + '-readonly'}\n type=\"text\"\n value={this.computedDisplayValue}\n readonly\n class=\"readonly-input\"\n aria-readonly=\"true\"\n aria-label={this.label}\n aria-describedby={\n this.error\n ? `${this.inputId}-error`\n : `${this.inputId}-description`\n }\n />\n )}\n\n <select\n id={this.inputId}\n ref={el => (this.selectElement = el)}\n name={this.name}\n autofocus={this.autofocus}\n disabled={this.disabled}\n required={this.required}\n multiple={this.multiple}\n onChange={this.handleSelectChange}\n class={this.internalReadonly ? 'hidden' : ''}\n aria-label={this.label}\n aria-describedby={\n this.error\n ? `${this.inputId}-error`\n : `${this.inputId}-description`\n }\n >\n {this.parsedOptions.length > 0 ? (\n this.parsedOptions.map(option => (\n <option\n value={option.value}\n selected={option.selected}\n disabled={option.disabled}\n >\n {option.label}\n </option>\n ))\n ) : (\n <slot />\n )}\n </select>\n\n {this.internalReadonly && (\n <nv-icon name=\"chevron-down\" class=\"readonly-icon\" size=\"sm\" />\n )}\n {this.error && (\n <nv-icon name=\"alert-circle\" class=\"validation\" size=\"sm\" />\n )}\n {this.success && (\n <nv-icon name=\"circle-check\" class=\"validation\" size=\"sm\" />\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\" id={`${this.inputId}-description`}>\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div class=\"error-description\" id={`${this.inputId}-error`}>\n <slot name=\"error-description\">{this.errorDescription}</slot>\n </div>\n )}\n </Host>\n );\n }\n\n //#endregion RENDERING\n}\n"],"version":3}
@@ -1,8 +1,8 @@
1
1
  import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-77d0fedc.js';
2
- import { d as defineCustomElement$2 } from './p-a01bdf02.js';
2
+ import { d as defineCustomElement$2 } from './p-5f5e2bf2.js';
3
3
  import { v as v4 } from './p-f5ff676c.js';
4
4
 
5
- const nvFieldtextCss = "nv-fieldtext{--nv-field-border-default:var(--components-form-field-border-default);--nv-field-border-hover:var(--components-form-field-border-hover);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--components-form-field-border-default);--nv-field-border-readonly:var(--components-form-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-brand);--nv-field-background:var(--components-form-field-background-default);display:flex;flex-direction:column;align-items:flex-start;gap:var(--form-gap-y);box-sizing:border-box}nv-fieldtext[readonly]:not([readonly=false]){--nv-field-border-default:var(--components-form-field-border-readonly);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-background:var(--components-form-field-background-readonly)}nv-fieldtext[error]:not([error=false]){--nv-field-border-default:var(--components-form-field-border-error);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-destructive)}nv-fieldtext[success]:not([success=false]){--nv-field-border-default:var(--components-form-field-border-success);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-success)}nv-fieldtext[required]:not([required=false]) label::after{content:\"*\";color:var(--components-form-text-required);font-weight:700}nv-fieldtext label{display:flex;align-items:center;gap:var(--form-label-gap);align-self:stretch;color:var(--components-form-text-label-default);font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-label-font-size);font-style:normal;font-weight:500;line-height:var(--form-label-line-height)}nv-fieldtext .input-wrapper{display:flex;flex-wrap:wrap;gap:var(--form-gap-x);align-items:stretch;align-self:stretch}nv-fieldtext .input-wrapper .input-container{display:flex;flex-grow:1;padding:calc(var(--form-field-padding-y) - 1px) var(--form-field-padding-x);justify-content:center;align-items:center;gap:var(--form-field-gap);align-self:stretch;border-radius:var(--form-field-radius);border-width:1px;border-style:solid;border-color:var(--nv-field-border-default);opacity:var(--components-form-opacity-default);background:var(--nv-field-background);transition:all 150ms ease-out}nv-fieldtext .input-wrapper .input-container:hover{border-color:var(--nv-field-border-hover)}nv-fieldtext .input-wrapper .input-container:focus-within{border-color:var(--nv-field-border-focus);box-shadow:0px 0px 0px var(--focus-field-stroke) var(--nv-field-focus-box-shadow)}nv-fieldtext .input-wrapper .input-container:has(input:read-only){opacity:0.5;background-color:var(--components-form-field-background-readonly);border-color:var(--nv-field-border-readonly)}nv-fieldtext .input-wrapper .input-container:has(input:disabled){opacity:0.5;background-color:var(--components-form-field-background-disabled);border-color:var(--nv-field-border-disabled)}nv-fieldtext .input-wrapper .input-container input{display:flex;align-items:center;flex:1 0 0;overflow:hidden;background-color:transparent;color:var(--components-form-field-content-text);text-overflow:ellipsis;font-size:var(--form-field-font-size);font-style:normal;font-weight:500;line-height:var(--form-field-line-height)}nv-fieldtext .input-wrapper .input-container input:focus{outline:none}nv-fieldtext .input-wrapper .input-container input::placeholder{overflow:hidden;color:var(--components-form-field-content-placeholder);text-overflow:ellipsis;font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-field-font-size);font-style:normal;font-weight:400;line-height:var(--form-field-line-height)}nv-fieldtext .input-wrapper .input-container nv-icon.validation{color:var(--nv-field-border-default)}nv-fieldtext .description{align-self:stretch;color:var(--components-form-text-description-default);font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height)}nv-fieldtext .error-description{align-self:stretch;color:var(--components-form-text-description-default);font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height);color:var(--components-form-text-description-error)}";
5
+ const nvFieldtextCss = "nv-fieldtext{--nv-field-border-default:var(--components-form-field-border-default);--nv-field-border-hover:var(--components-form-field-border-hover);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--components-form-field-border-default);--nv-field-border-readonly:var(--components-form-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-brand);--nv-field-background:var(--components-form-field-background-default);display:flex;flex-direction:column;align-items:flex-start;gap:var(--form-gap-y);box-sizing:border-box}nv-fieldtext[readonly]:not([readonly=false]){--nv-field-border-default:var(--components-form-field-border-readonly);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-background:var(--components-form-field-background-readonly)}nv-fieldtext[error]:not([error=false]){--nv-field-border-default:var(--components-form-field-border-error);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-destructive)}nv-fieldtext[success]:not([success=false]){--nv-field-border-default:var(--components-form-field-border-success);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-success)}nv-fieldtext[required]:not([required=false]) label::after{content:\"*\";color:var(--components-form-text-required);font-weight:700}nv-fieldtext label{display:flex;align-items:center;gap:var(--form-label-gap);align-self:stretch;color:var(--components-form-text-label-default);font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-label-font-size);font-style:normal;font-weight:500;line-height:var(--form-label-line-height)}nv-fieldtext .input-wrapper{display:flex;flex-wrap:wrap;gap:var(--form-gap-x);align-items:stretch;align-self:stretch}nv-fieldtext .input-wrapper .input-container{display:flex;flex-grow:1;padding:calc(var(--form-field-padding-y) - 1px) var(--form-field-padding-x);justify-content:center;align-items:center;gap:var(--form-field-gap);align-self:stretch;border-radius:var(--form-field-radius);border-width:1px;border-style:solid;border-color:var(--nv-field-border-default);opacity:var(--components-form-opacity-default, 1);background:var(--nv-field-background);transition:all 150ms ease-out}nv-fieldtext .input-wrapper .input-container:hover{border-color:var(--nv-field-border-hover)}nv-fieldtext .input-wrapper .input-container:focus-within,nv-fieldtext .input-wrapper .input-container:focus-within:hover,nv-fieldtext .input-wrapper .input-container:focus,nv-fieldtext .input-wrapper .input-container:focus:hover{border-color:var(--nv-field-border-focus);box-shadow:0px 0px 0px var(--focus-field-stroke) var(--nv-field-focus-box-shadow)}nv-fieldtext .input-wrapper .input-container:has(input:read-only){opacity:0.5;background-color:var(--components-form-field-background-readonly);border-color:var(--nv-field-border-readonly)}nv-fieldtext .input-wrapper .input-container:has(input:disabled){opacity:0.5;background-color:var(--components-form-field-background-disabled);border-color:var(--nv-field-border-disabled)}nv-fieldtext .input-wrapper .input-container input{display:flex;align-items:center;flex:1 0 0;overflow:hidden;background-color:transparent;color:var(--components-form-field-content-text);text-overflow:ellipsis;font-size:var(--form-field-font-size);font-style:normal;font-weight:500;line-height:var(--form-field-line-height)}nv-fieldtext .input-wrapper .input-container input:focus{outline:none}nv-fieldtext .input-wrapper .input-container input::placeholder{overflow:hidden;color:var(--components-form-field-content-placeholder);text-overflow:ellipsis;font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-field-font-size);font-style:normal;font-weight:400;line-height:var(--form-field-line-height)}nv-fieldtext .input-wrapper .input-container nv-icon.validation{color:var(--nv-field-border-default)}nv-fieldtext .description{align-self:stretch;color:var(--components-form-text-description-default);font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height)}nv-fieldtext .error-description{align-self:stretch;color:var(--components-form-text-description-default);font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height);color:var(--components-form-text-description-error)}";
6
6
  const NvFieldtextStyle0 = nvFieldtextCss;
7
7
 
8
8
  const NvFieldtext$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldtext extends H {
@@ -61,6 +61,12 @@ const NvFieldtext$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldtext extends
61
61
  * each one with a comma, allowing the form to handle multiple recipients.
62
62
  */
63
63
  this.multiple = false;
64
+ /**
65
+ * Applies focus to the input field as soon as the component is mounted. This
66
+ * is equivalent to setting the native autofocus attribute on an <input>
67
+ * element.
68
+ */
69
+ this.autofocus = false;
64
70
  //#endregion EVENTS
65
71
  /****************************************************************************/
66
72
  //#region METHODS
@@ -100,9 +106,9 @@ const NvFieldtext$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldtext extends
100
106
  /****************************************************************************/
101
107
  //#region RENDER
102
108
  render() {
103
- return (h(Host, { key: '22f5979300679cebfff9a85a1f18604e36fd0374' }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: 'fa372b6988a1ff568e72ec3b8a2352a21dc49a16', htmlFor: this.inputId }, h("slot", { key: 'ecddd18263c8ab7f3309173d0ebbf32f3c8d1cde', name: "label" }, this.label))), h("div", { key: '0d93f2b0fdfb4ab92cb272ee1f9da62018524a3d', class: "input-wrapper" }, h("slot", { key: 'a699b48dc7b439699c36596dc9f55382262eef91', name: "before-input" }), h("div", { key: '95d6c530662c5495f505de64dd4538491a6a9b8e', class: "input-container", onClick: this.handleInputContainerClick }, h("slot", { key: 'e3febd47df3ac5dec70dc3b94e39ed6d7e16215d', name: "leading-input" }), h("input", { key: '746258b2a7f87f1e913781e2651d73e30f316006', id: this.inputId, ref: e => (this.inputElement = e), placeholder: this.placeholder, name: this.name, type: this.type, disabled: this.disabled, readOnly: this.readonly, required: this.required, maxlength: this.maxlength, minlength: this.minlength, pattern: this.pattern, autocomplete: this.autocomplete, multiple: this.multiple, value: this.value, onInput: this.handleInput }), this.error && (h("nv-icon", { key: '314149ea256ac09298980d2b1405b23d6084030e', name: "alert-circle", class: "validation", size: "sm" })), this.success && (h("nv-icon", { key: 'ba160abd983eaa494df96fc19d3815479aebc332', name: "circle-check", class: "validation", size: "sm" }))), h("slot", { key: '9f3e7aa524bb5fffbf380307638cd93169bd5912', name: "after-input" })), (this.description ||
104
- this.el.querySelector('[slot="description"]')) && (h("div", { key: '532613985e992508eaa3b56e2aa8facba4db6962', class: "description" }, h("slot", { key: '5ee29888f417f7c6fce352299a01dcd81169c387', name: "description" }, this.description))), (this.errorDescription ||
105
- this.el.querySelector('[slot="error-description"]')) && (h("div", { key: '73d6fd4eaf67278462c19812de9355afaf037c18', hidden: !this.error, class: "error-description" }, h("slot", { key: '3ba736958ccef0a3bd32d8e1dff213a2e2a160d6', name: "error-description" }, this.errorDescription)))));
109
+ return (h(Host, { key: '23efa0e56d020cce567f970f342bb0512ae3dd83' }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: '1ffe8dfcd0eb29232f3f4e2a39f0b18e92acced0', htmlFor: this.inputId }, h("slot", { key: '95625aebb5e3464ff2afc1d9c947db28fe7b0ddd', name: "label" }, this.label))), h("div", { key: 'a0754ba8ac030290cc354cbbc287049b890c92da', class: "input-wrapper" }, h("slot", { key: '761147017de57353a2d52bac615330b6bb09401d', name: "before-input" }), h("div", { key: '5e2bc20105f6a4587e1f39a81a04527e36b51e4e', class: "input-container", onClick: this.handleInputContainerClick }, h("slot", { key: '96d2c58b85692f5a184b8086d048876e1b5b8c28', name: "leading-input" }), h("input", { key: '40e3d073b307dcd09c3b4f5c07f82e06aa1f6b11', id: this.inputId, ref: e => (this.inputElement = e), placeholder: this.placeholder, name: this.name, type: this.type, disabled: this.disabled, readOnly: this.readonly, required: this.required, maxlength: this.maxlength, minlength: this.minlength, pattern: this.pattern, autofocus: this.autofocus, autocomplete: this.autocomplete, multiple: this.multiple, value: this.value, onInput: this.handleInput }), this.error && (h("nv-icon", { key: '62e3ae1bf3147ccd2869cd8d47b63bedcf3c8739', name: "alert-circle", class: "validation", size: "sm" })), this.success && (h("nv-icon", { key: '9fabf9beb89950a67b67b3fb98878faae431a633', name: "circle-check", class: "validation", size: "sm" }))), h("slot", { key: '18c99b85da3243c1cf0c58aa8e53d54fb70aae42', name: "after-input" })), (this.description ||
110
+ this.el.querySelector('[slot="description"]')) && (h("div", { key: 'ec83f041aacae7255c7008fc2f842ef7423bb84a', class: "description" }, h("slot", { key: '8051ac72735b0d53dee7a1eac3fee70c87bbd6ef', name: "description" }, this.description))), (this.errorDescription ||
111
+ this.el.querySelector('[slot="error-description"]')) && (h("div", { key: 'd04500341a2a0845476d1fd2bcfdd2da1f930272', hidden: !this.error, class: "error-description" }, h("slot", { key: '3e3063574e7a8efa37150c69e1cbd44641229e20', name: "error-description" }, this.errorDescription)))));
106
112
  }
107
113
  static get formAssociated() { return true; }
108
114
  get el() { return this; }
@@ -128,7 +134,8 @@ const NvFieldtext$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldtext extends
128
134
  "minlength": [514],
129
135
  "pattern": [513],
130
136
  "autocomplete": [513],
131
- "multiple": [516]
137
+ "multiple": [516],
138
+ "autofocus": [516]
132
139
  }]);
133
140
  function defineCustomElement$1() {
134
141
  if (typeof customElements === "undefined") {
@@ -1 +1 @@
1
- {"file":"nv-fieldtext.js","mappings":";;;;AAAA,MAAM,cAAc,GAAG,0tJAA0tJ,CAAC;AAClvJ,0BAAe,cAAc;;MC0BhBA,aAAW;IANxB;;;;;;;;;;;;;QA6CW,YAAO,GAAWC,EAAM,EAAE,CAAC;;;;;;;QAkDpC,SAAI,GAA6B,MAAM,CAAC;;;;;;QAQ/B,aAAQ,GAAY,KAAK,CAAC;;;;;;QAQ1B,aAAQ,GAAY,KAAK,CAAC;;;;;QAO1B,aAAQ,GAAY,KAAK,CAAC;;;;;;QAQnC,UAAK,GAAY,KAAK,CAAC;;;;;QAed,YAAO,GAAY,KAAK,CAAC;;;;;;QA0CzB,aAAQ,GAAY,KAAK,CAAC;;;;;;;;;QAsB3B,gBAAW,GAAG,CAAC,KAAY;YACjC,MAAM,KAAK,GAAG,KAAK,CAAC,MAA0B,CAAC;YAC/C,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;YACzB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;SACrC,CAAC;;;;QAKM,8BAAyB,GAAG;YAClC,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC;SAC3B,CAAC;KAuFH;;;;IAjFC,mBAAmB;QACjB,IAAI,IAAI,CAAC,aAAa,EAAE;YACtB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC;SAChC;QAED,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,IAAI,CAAC,WAAW,GA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AI,EAAC,cAAc,EAAC,KAAK,EAAC,YAAY,EAAC,IAAI,EAAC,IAAI,GAAG,CAC7D,EACA,IAAI,CAAC,OAAO,KACX,gEAAS,IAAI,EAAC,cAAc,EAAC,KAAK,EAAC,YAAY,EAAC,IAAI,EAAC,IAAI,GAAG,CAC7D,CACG,EAEN,6DAAM,IAAI,EAAC,aAAa,GAAQ,CAC5B,EAEL,CAAC,IAAI,CAAC,WAAW;YAChB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,sBAAsB,CAAC,MAC7C,4DAAK,KAAK,EAAC,aAAa,IACtB,6DAAM,IAAI,EAAC,aAAa,IAAE,IAAI,CAAC,WAAW,CAAQ,CAC9C,CACP,EAEA,CAAC,IAAI,CAAC,gBAAgB;YACrB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,4BAA4B,CAAC,MACnD,4DAAK,MAAM,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,EAAC,mBAAmB,IACjD,6DAAM,IAAI,EAAC,mBAAmB,IAAE,IAAI,CAAC,gBAAgB,CAAQ,CACzD,CACP,CACI,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["NvFieldtext","uuidv4"],"sources":["src/components/nv-fieldtext/nv-fieldtext.scss?tag=nv-fieldtext","src/components/nv-fieldtext/nv-fieldtext.tsx"],"sourcesContent":["@import \"../../styles/form-field\";\n\nnv-fieldtext {\n @include form-field-variables();\n @include form-field-root();\n\n &[readonly]:not([readonly=\"false\"]) {\n @include form-field-readonly-variables();\n }\n\n &[error]:not([error=\"false\"]) {\n @include form-field-error-variables();\n }\n\n &[success]:not([success=\"false\"]) {\n @include form-field-success-variables();\n }\n\n &[required]:not([required=\"false\"]) label {\n @include form-field-label-required();\n }\n\n label {\n @include form-field-label();\n }\n\n .input-wrapper {\n @include form-field-input-wrapper();\n\n .input-container {\n @include form-field-input-container();\n\n input {\n @include form-field-input();\n }\n\n nv-icon.validation {\n @include form-field-icon();\n }\n }\n }\n\n .description {\n @include form-field-description();\n }\n\n .error-description {\n @include form-field-error-description();\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n Element,\n} from '@stencil/core';\nimport { v4 as uuidv4 } from 'uuid';\n\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-fieldtext',\n shadow: false,\n formAssociated: true,\n styleUrl: 'nv-fieldtext.scss',\n})\nexport class NvFieldtext {\n @Element() el: HTMLNvFieldtextElement;\n private inputElement!: HTMLInputElement;\n\n /****************************************************************************/\n //#region DEPRECATED\n\n /**\n * Message defines a 'hint ' message for the Text 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 /**\n * Type of the input.\n * @deprecated use type instead.\n */\n @Prop()\n readonly textInputType: 'text' | 'tel' | 'email';\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 * 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 type prop lets you specify what kind of information the input field\n * should accept. Choose 'text' for general words or sentences, 'tel' for\n * phone numbers, or 'email' for email addresses. This makes sure users get\n * the right keyboard and validation for what they need to enter.\n */\n @Prop({ reflect: true, mutable: true })\n type: 'text' | 'tel' | 'email' = 'text';\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 * A description that appears when there is an error related to the textfield\n * field.\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 * 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 after the form is submitted.\n */\n @Prop({ reflect: true })\n readonly pattern: string;\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}`;\n\n /**\n * When used with the email input type, this prop enables the field to accept\n * multiple email addresses. Users can enter several addresses, separating\n * each one with a comma, allowing the form to handle multiple recipients.\n */\n @Prop({ reflect: true })\n readonly multiple: 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 /**\n * Handles the input event on the input element.\n * Emits the inputChanged event with the new value.\n * @param {Event} event - Event object of the input event.\n */\n private handleInput = (event: Event) => {\n const input = event.target as HTMLInputElement;\n this.value = input.value;\n this.valueChanged.emit(input.value);\n };\n\n /**\n * Handles focus when the input container is clicked.\n */\n private handleInputContainerClick = () => {\n this.inputElement.focus();\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillRender() {\n if (this.textInputType) {\n this.type = this.textInputType;\n }\n\n if (this.message) {\n this.description = this.message;\n }\n\n if (this.validation) {\n this.errorDescription = this.validation;\n this.error = true;\n }\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n {(this.label || this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.inputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n\n <div class=\"input-wrapper\">\n <slot name=\"before-input\"></slot>\n\n <div class=\"input-container\" onClick={this.handleInputContainerClick}>\n <slot name=\"leading-input\"></slot>\n\n <input\n id={this.inputId}\n ref={e => (this.inputElement = e)}\n placeholder={this.placeholder}\n name={this.name}\n type={this.type}\n disabled={this.disabled}\n readOnly={this.readonly}\n required={this.required}\n maxlength={this.maxlength}\n minlength={this.minlength}\n pattern={this.pattern}\n autocomplete={this.autocomplete}\n multiple={this.multiple}\n value={this.value}\n onInput={this.handleInput}\n />\n\n {this.error && (\n <nv-icon name=\"alert-circle\" class=\"validation\" size=\"sm\" />\n )}\n {this.success && (\n <nv-icon name=\"circle-check\" class=\"validation\" size=\"sm\" />\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"],"version":3}
1
+ {"file":"nv-fieldtext.js","mappings":";;;;AAAA,MAAM,cAAc,GAAG,y4JAAy4J,CAAC;AACj6J,0BAAe,cAAc;;MC0BhBA,aAAW;IANxB;;;;;;;;;;;;;QA6CW,YAAO,GAAWC,EAAM,EAAE,CAAC;;;;;;;QAkDpC,SAAI,GAA6B,MAAM,CAAC;;;;;;QAQ/B,aAAQ,GAAY,KAAK,CAAC;;;;;;QAQ1B,aAAQ,GAAY,KAAK,CAAC;;;;;QAO1B,aAAQ,GAAY,KAAK,CAAC;;;;;;QAQnC,UAAK,GAAY,KAAK,CAAC;;;;;QAed,YAAO,GAAY,KAAK,CAAC;;;;;;QA0CzB,aAAQ,GAAY,KAAK,CAAC;;;;;;QAS1B,cAAS,GAAY,KAAK,CAAC;;;;;;;;;QAsB5B,gBAAW,GAAG,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;;;;;;;;;;;;;;;;;;;;;;;;;","names":["NvFieldtext","uuidv4"],"sources":["src/components/nv-fieldtext/nv-fieldtext.scss?tag=nv-fieldtext","src/components/nv-fieldtext/nv-fieldtext.tsx"],"sourcesContent":["@import \"../../styles/form-field\";\n\nnv-fieldtext {\n @include form-field-variables();\n @include form-field-root();\n\n &[readonly]:not([readonly=\"false\"]) {\n @include form-field-readonly-variables();\n }\n\n &[error]:not([error=\"false\"]) {\n @include form-field-error-variables();\n }\n\n &[success]:not([success=\"false\"]) {\n @include form-field-success-variables();\n }\n\n &[required]:not([required=\"false\"]) label {\n @include form-field-label-required();\n }\n\n label {\n @include form-field-label();\n }\n\n .input-wrapper {\n @include form-field-input-wrapper();\n\n .input-container {\n @include form-field-input-container();\n\n input {\n @include form-field-input();\n }\n\n nv-icon.validation {\n @include form-field-icon();\n }\n }\n }\n\n .description {\n @include form-field-description();\n }\n\n .error-description {\n @include form-field-error-description();\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n Element,\n} from '@stencil/core';\nimport { v4 as uuidv4 } from 'uuid';\n\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-fieldtext',\n shadow: false,\n formAssociated: true,\n styleUrl: 'nv-fieldtext.scss',\n})\nexport class NvFieldtext {\n @Element() el: HTMLNvFieldtextElement;\n private inputElement!: HTMLInputElement;\n\n /****************************************************************************/\n //#region DEPRECATED\n\n /**\n * Message defines a 'hint ' message for the Text 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 /**\n * Type of the input.\n * @deprecated use type instead.\n */\n @Prop()\n readonly textInputType: 'text' | 'tel' | 'email';\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 * 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 type prop lets you specify what kind of information the input field\n * should accept. Choose 'text' for general words or sentences, 'tel' for\n * phone numbers, or 'email' for email addresses. This makes sure users get\n * the right keyboard and validation for what they need to enter.\n */\n @Prop({ reflect: true, mutable: true })\n type: 'text' | 'tel' | 'email' = 'text';\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 * A description that appears when there is an error related to the textfield\n * field.\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 * 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 after the form is submitted.\n */\n @Prop({ reflect: true })\n readonly pattern: string;\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}`;\n\n /**\n * When used with the email input type, this prop enables the field to accept\n * multiple email addresses. Users can enter several addresses, separating\n * each one with a comma, allowing the form to handle multiple recipients.\n */\n @Prop({ reflect: true })\n readonly multiple: 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 * 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 /**\n * Handles the input event on the input element.\n * Emits the inputChanged event with the new value.\n * @param {Event} event - Event object of the input event.\n */\n private handleInput = (event: Event) => {\n const input = event.target as HTMLInputElement;\n this.value = input.value;\n this.valueChanged.emit(input.value);\n };\n\n /**\n * Handles focus when the input container is clicked.\n */\n private handleInputContainerClick = () => {\n this.inputElement.focus();\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillRender() {\n if (this.textInputType) {\n this.type = this.textInputType;\n }\n\n if (this.message) {\n this.description = this.message;\n }\n\n if (this.validation) {\n this.errorDescription = this.validation;\n this.error = true;\n }\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n {(this.label || this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.inputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n\n <div class=\"input-wrapper\">\n <slot name=\"before-input\"></slot>\n\n <div class=\"input-container\" onClick={this.handleInputContainerClick}>\n <slot name=\"leading-input\"></slot>\n\n <input\n id={this.inputId}\n ref={e => (this.inputElement = e)}\n placeholder={this.placeholder}\n name={this.name}\n type={this.type}\n disabled={this.disabled}\n readOnly={this.readonly}\n required={this.required}\n maxlength={this.maxlength}\n minlength={this.minlength}\n pattern={this.pattern}\n autofocus={this.autofocus}\n autocomplete={this.autocomplete}\n multiple={this.multiple}\n value={this.value}\n onInput={this.handleInput}\n />\n\n {this.error && (\n <nv-icon name=\"alert-circle\" class=\"validation\" size=\"sm\" />\n )}\n {this.success && (\n <nv-icon name=\"circle-check\" class=\"validation\" size=\"sm\" />\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"],"version":3}
@@ -67,6 +67,12 @@ const NvFieldtextarea$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldtextarea
67
67
  * can still be allowed if desired.
68
68
  */
69
69
  this.autosize = false;
70
+ /**
71
+ * Applies focus to the input field as soon as the component is mounted. This
72
+ * is equivalent to setting the native autofocus attribute on a <textarea>
73
+ * element.
74
+ */
75
+ this.autofocus = false;
70
76
  //#endregion WATCHERS
71
77
  /****************************************************************************/
72
78
  //#region METHODS
@@ -169,9 +175,9 @@ const NvFieldtextarea$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldtextarea
169
175
  /****************************************************************************/
170
176
  //#region RENDER
171
177
  render() {
172
- return (h(Host, { key: '3ec76c8ddc56c9e438e74bff45ab3e3aeb4a891f' }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: '7588ee9f4c4b3ca4ecfa255ad6ab56e87542b008', htmlFor: this.inputId }, h("slot", { key: '4f6c5b8d1e02a36c208904e5aa54bd4eebc78efd', name: "label" }, this.label))), h("div", { key: 'd9a2bf3f9ec4c94bbe15c1422a962eb9e84fa76c', class: "textarea-wrapper" }, h("div", { key: 'f822c353ab8ab98405201b690f420069ea3b358a', class: "textarea-container", onClick: this.handleTextareaContainerClick }, h("textarea", { key: '6d105939ceaf1ae29a899a3f5aab1bed84aaa2e7', id: this.inputId, ref: e => (this.textareaElement = e), placeholder: this.placeholder, name: this.name, disabled: this.disabled, readOnly: this.readonly, required: this.required, maxlength: this.maxlength, minlength: this.minlength, autocomplete: "off", value: this.value, onInput: this.handleTextarea, rows: this.rows, class: clsx(this.resize === 'none' && 'resize-none', this.resize === 'vertical' && 'resize-y', this.resize === 'horizontal' && 'resize-x', this.resize === 'both' && 'resize') }))), (this.description ||
173
- this.el.querySelector('[slot="description"]')) && (h("div", { key: '13b3ad16dc84db2770d411d117f35fec9da7b4de', class: "description" }, h("slot", { key: '7b6f82a8369d09300a57ae8ff0855fc471e5c32b', name: "description" }, this.description))), (this.errorDescription ||
174
- this.el.querySelector('[slot="error-description"]')) && (h("div", { key: '7fbc2fc5b232b3bb3602104ecf1937fc5f32be60', hidden: !this.error, class: "error-description" }, h("slot", { key: '0d0e539ce9f6cfabfbe73709f6f58b7edeef0210', name: "error-description" }, this.errorDescription)))));
178
+ return (h(Host, { key: '331d328227b95cd763286de8919e514d836bb084' }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: 'a6513b1dad621ba2d9bd1fcec79900393ec1adb7', htmlFor: this.inputId }, h("slot", { key: '8c8ce8a47093b6353ece69bae4b7203765a4fb36', name: "label" }, this.label))), h("div", { key: 'a283ef8642118b2fb0aed16b745928be4079cea6', class: "textarea-wrapper" }, h("div", { key: 'a40abe6cda9712052c0203aef387f4d4feed4832', class: "textarea-container", onClick: this.handleTextareaContainerClick }, h("textarea", { key: '67dc245ba0abefad9d1c23aad454c5bb4f72b609', id: this.inputId, ref: e => (this.textareaElement = e), placeholder: this.placeholder, autofocus: this.autofocus, name: this.name, disabled: this.disabled, readOnly: this.readonly, required: this.required, maxlength: this.maxlength, minlength: this.minlength, autocomplete: "off", value: this.value, onInput: this.handleTextarea, rows: this.rows, class: clsx(this.resize === 'none' && 'resize-none', this.resize === 'vertical' && 'resize-y', this.resize === 'horizontal' && 'resize-x', this.resize === 'both' && 'resize') }))), (this.description ||
179
+ this.el.querySelector('[slot="description"]')) && (h("div", { key: '7b5676446b1152bacb9ecabbed9d807474141726', class: "description" }, h("slot", { key: 'cd59404bf0cecbc7da8a0e6d80f97b23fd28c869', name: "description" }, this.description))), (this.errorDescription ||
180
+ this.el.querySelector('[slot="error-description"]')) && (h("div", { key: '9ccbb4d29eca26eee0118fa329cac63c552b2656', hidden: !this.error, class: "error-description" }, h("slot", { key: '5295afeb285a7479b6813c29f0097c8a81ca919a', name: "error-description" }, this.errorDescription)))));
175
181
  }
176
182
  static get formAssociated() { return true; }
177
183
  get el() { return this; }
@@ -200,7 +206,8 @@ const NvFieldtextarea$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldtextarea
200
206
  "minlength": [514],
201
207
  "rows": [514],
202
208
  "resize": [513],
203
- "autosize": [516]
209
+ "autosize": [516],
210
+ "autofocus": [516]
204
211
  }, undefined, {
205
212
  "rows": ["rowsChanged"],
206
213
  "autosize": ["autosizeChanged"],
@@ -1 +1 @@
1
- {"file":"nv-fieldtextarea.js","mappings":";;;;AAAA,MAAM,kBAAkB,GAAG,o2JAAo2J,CAAC;AACh4J,8BAAe,kBAAkB;;MCuBpBA,iBAAe;IAN5B;;;;;;;;;;;;;QAsCW,YAAO,GAAWC,EAAM,EAAE,CAAC;;;;;;QAiD3B,aAAQ,GAAY,KAAK,CAAC;;;;;;QAQ1B,aAAQ,GAAY,KAAK,CAAC;;;;;QAO1B,aAAQ,GAAY,KAAK,CAAC;;;;;;QAQnC,UAAK,GAAY,KAAK,CAAC;;;;;QAgBd,YAAO,GAAY,KAAK,CAAC;;;;;;;QAyBzB,SAAI,GAAW,CAAC,CAAC;;;;;QAOjB,WAAM,GAAgD,UAAU,CAAC;;;;;;;QASjE,aAAQ,GAAY,KAAK,CAAC;;;;QAwD3B,mBAAc,GAAG,CAAC,KAAY;YACpC,MAAM,QAAQ,GAAG,KAAK,CAAC,MAA6B,CAAC;YACrD,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC;YAC5B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;SACxC,CAAC;QAEM,iCAA4B,GAAG;YACrC,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,CAAC;SAC9B,CAAC;KA2HH;;;;;;;;IArKC,WAAW;QACT,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,IAAI,CAAC,oBAAoB,EAAE,CAA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AAc,EAC5B,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,KAAK,EAAE,IAAI,CACT,IAAI,CAAC,MAAM,KAAK,MAAM,IAAI,aAAa,EACvC,IAAI,CAAC,MAAM,KAAK,UAAU,IAAI,UAAU,EACxC,IAAI,CAAC,MAAM,KAAK,YAAY,IAAI,UAAU,EAC1C,IAAI,CAAC,MAAM,KAAK,MAAM,IAAI,QAAQ,CACnC,GACD,CACE,CACF,EAEL,CAAC,IAAI,CAAC,WAAW;YAChB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,sBAAsB,CAAC,MAC7C,4DAAK,KAAK,EAAC,aAAa,IACtB,6DAAM,IAAI,EAAC,aAAa,IAAE,IAAI,CAAC,WAAW,CAAQ,CAC9C,CACP,EAEA,CAAC,IAAI,CAAC,gBAAgB;YACrB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,4BAA4B,CAAC,MACnD,4DAAK,MAAM,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,EAAC,mBAAmB,IACjD,6DAAM,IAAI,EAAC,mBAAmB,IAAE,IAAI,CAAC,gBAAgB,CAAQ,CACzD,CACP,CACI,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["NvFieldtextarea","uuidv4"],"sources":["src/components/nv-fieldtextarea/nv-fieldtextarea.scss?tag=nv-fieldtextarea","src/components/nv-fieldtextarea/nv-fieldtextarea.tsx"],"sourcesContent":["@import \"../../styles/form-field\";\n\n@mixin form-field-textarea-wrapper() {\n display: flex;\n flex-wrap: wrap;\n gap: var(--form-gap-x);\n align-items: stretch;\n align-self: stretch;\n}\n\n@mixin form-field-textarea-container() {\n display: flex;\n flex-grow: 1;\n padding: calc(var(--form-field-padding-y) - 1px) var(--form-field-padding-x);\n justify-content: center;\n align-items: center;\n gap: var(--form-field-gap);\n align-self: stretch;\n border-radius: var(--form-field-radius);\n border-width: 1px;\n border-style: solid;\n border-color: var(--nv-field-border-default);\n opacity: var(--components-form-opacity-default);\n background: var(--nv-field-background);\n transition: all 150ms ease-out;\n\n &:hover {\n border-color: var(--nv-field-border-hover);\n }\n\n &:focus-within {\n border-color: var(--nv-field-border-focus);\n box-shadow: 0 0 0 var(--focus-field-stroke) var(--nv-field-focus-box-shadow);\n }\n // Keep ReadOnly before Disabled\n &:has(textarea:read-only) {\n // opacity: var(--components-form-opacity-readonly, 0.5); broken token generation, is 50px instead of 0.5\n opacity: 0.5;\n background-color: var(--components-form-field-background-readonly);\n border-color: var(--nv-field-border-readonly);\n }\n\n &:has(textarea:disabled) {\n // opacity: var(--components-form-opacity-disabled, 0.5); broken token generation, is 50px instead of 0.5\n opacity: 0.5;\n background-color: var(--components-form-field-background-disabled);\n border-color: var(--nv-field-border-disabled);\n }\n}\n\n@mixin form-field-textarea() {\n display: flex;\n align-items: center;\n flex: 1 0 0;\n overflow: hidden;\n background-color: transparent;\n color: var(--components-form-field-content-text);\n text-overflow: ellipsis;\n font-size: var(--form-field-font-size);\n font-style: normal;\n font-weight: 500;\n line-height: var(--form-field-line-height);\n\n &:focus {\n outline: none;\n }\n\n &::placeholder {\n overflow: hidden;\n color: var(--components-form-field-content-placeholder);\n text-overflow: ellipsis;\n font-family: \"TT Norms Pro\", sans-serif;\n font-size: var(--form-field-font-size);\n font-style: normal;\n font-weight: 400;\n line-height: var(--form-field-line-height);\n }\n}\n\nnv-fieldtextarea {\n @include form-field-variables();\n @include form-field-root();\n\n &[readonly]:not([readonly=\"false\"]) {\n @include form-field-readonly-variables();\n }\n\n &[error]:not([error=\"false\"]) {\n @include form-field-error-variables();\n }\n\n &[success]:not([success=\"false\"]) {\n @include form-field-success-variables();\n }\n\n &[required]:not([required=\"false\"]) label {\n @include form-field-label-required();\n }\n\n label {\n @include form-field-label();\n }\n\n .textarea-wrapper {\n @include form-field-textarea-wrapper();\n\n .textarea-container {\n @include form-field-textarea-container();\n\n textarea {\n @include form-field-textarea();\n }\n\n nv-icon.validation {\n @include form-field-icon();\n }\n }\n }\n\n .description {\n @include form-field-description();\n }\n\n .error-description {\n @include form-field-error-description();\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n Element,\n Watch,\n} from '@stencil/core';\nimport { v4 as uuidv4 } from 'uuid';\nimport clsx from 'clsx';\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-fieldtextarea',\n shadow: false,\n formAssociated: true,\n styleUrl: 'nv-fieldtextarea.scss',\n})\nexport class NvFieldtextarea {\n @Element() el: HTMLNvFieldtextareaElement;\n private textareaElement!: HTMLTextAreaElement;\n\n /****************************************************************************/\n //#region DEPRECATED\n\n /**\n * Message defines a 'hint ' message for the Text 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 * textarea 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 textarea 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 textarea 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 textarea 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 textarea’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 textarea field, which determines the text displayed\n * within the field. This prop is typically used in controlled components\n * where the textarea’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 textarea 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 textarea 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 textarea 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 textarea 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 textarea 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 textarea field’s appearance to indicate successful textarea 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 textarea field. It’s\n * helpful for making sure users don’t enter too much information, keeping\n * their textarea 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 * textarea 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 * The number of visible text lines for the control. The default is 3. This\n * can be useful when you want to limit the size of the textarea field or when\n * you want to make the textarea field smaller to fit a specific layout. The\n * textarea field will expand vertically to fit the text as the user types.\n */\n @Prop({ reflect: true })\n readonly rows: number = 3;\n\n /**\n * Controls the resize property of a textarea. It can be set to none, both,\n * horizontal, or vertical. The default is vertical.\n */\n @Prop({ reflect: true })\n readonly resize: 'none' | 'both' | 'horizontal' | 'vertical' = 'vertical';\n\n /**\n * Enable this to make the textarea automatically resize as the user types,\n * adjusting the height to fit the content. For the best experience, avoid\n * vertical resizing, as it’s controlled by this feature. Horizontal resizing\n * can still be allowed if desired.\n */\n @Prop({ reflect: true })\n readonly autosize: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the textarea value changes.\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<string>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region WATCHERS\n\n /**\n * If autosize is true, we need to make sure to update the min-height when\n * the rows change.\n */\n @Watch('rows')\n rowsChanged() {\n if (this.autosize) {\n this.adjustTextareaHeight();\n }\n }\n\n /**\n * If autosize is true, we need to make sure to update the height and\n * min-height, if false, we need to remove the height property.\n */\n @Watch('autosize')\n autosizeChanged() {\n if (this.autosize) {\n this.adjustTextareaHeight();\n } else {\n this.textareaElement?.style.removeProperty('height');\n }\n }\n\n /**\n * Make sure to adjust the height of the textarea when the value changes\n * programmatically or by typing when autosize is on.\n */\n @Watch('value')\n handleValueChange() {\n if (this.autosize) {\n this.adjustTextareaHeight();\n }\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region METHODS\n\n private handleTextarea = (event: Event) => {\n const textarea = event.target as HTMLTextAreaElement;\n this.value = textarea.value;\n this.valueChanged.emit(textarea.value);\n };\n\n private handleTextareaContainerClick = () => {\n this.textareaElement.focus();\n };\n\n private adjustTextareaHeight() {\n if (this.textareaElement && this.autosize) {\n /**\n * The first requestAnimationFrame ensures that the DOM has applied any\n * pending changes (e.g., value updates or attribute changes) before\n * proceeding to the next frame.\n */\n requestAnimationFrame(() => {\n /**\n * The second requestAnimationFrame ensures that the browser has fully\n * recalculated layout and styles based on the updated DOM, such as\n * recalculating scrollHeight for the textarea after the new value is\n * rendered.\n */\n requestAnimationFrame(() => {\n this.textareaElement.style.height = 'auto';\n\n const computedStyle = window.getComputedStyle(this.textareaElement);\n const lineHeight = parseFloat(computedStyle.lineHeight);\n const paddingTop = parseFloat(computedStyle.paddingTop);\n const paddingBottom = parseFloat(computedStyle.paddingBottom);\n const borderTopWidth = parseFloat(computedStyle.borderTopWidth);\n const borderBottomWidth = parseFloat(computedStyle.borderBottomWidth);\n\n // Calculate min-height based on rows\n const minHeight =\n lineHeight * this.rows +\n paddingTop +\n paddingBottom +\n borderTopWidth +\n borderBottomWidth;\n\n this.textareaElement.style.minHeight = `${minHeight}px`;\n this.textareaElement.style.height =\n this.textareaElement.scrollHeight + 'px';\n });\n });\n }\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 componentDidLoad() {\n if (this.autosize) {\n this.adjustTextareaHeight();\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=\"textarea-wrapper\">\n <div\n class=\"textarea-container\"\n onClick={this.handleTextareaContainerClick}\n >\n <textarea\n id={this.inputId}\n ref={e => (this.textareaElement = e)}\n placeholder={this.placeholder}\n name={this.name}\n disabled={this.disabled}\n readOnly={this.readonly}\n required={this.required}\n maxlength={this.maxlength}\n minlength={this.minlength}\n autocomplete=\"off\"\n value={this.value}\n onInput={this.handleTextarea}\n rows={this.rows}\n class={clsx(\n this.resize === 'none' && 'resize-none',\n this.resize === 'vertical' && 'resize-y',\n this.resize === 'horizontal' && 'resize-x',\n this.resize === 'both' && 'resize',\n )}\n />\n </div>\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"],"version":3}
1
+ {"file":"nv-fieldtextarea.js","mappings":";;;;AAAA,MAAM,kBAAkB,GAAG,o2JAAo2J,CAAC;AACh4J,8BAAe,kBAAkB;;MCuBpBA,iBAAe;IAN5B;;;;;;;;;;;;;QAsCW,YAAO,GAAWC,EAAM,EAAE,CAAC;;;;;;QAiD3B,aAAQ,GAAY,KAAK,CAAC;;;;;;QAQ1B,aAAQ,GAAY,KAAK,CAAC;;;;;QAO1B,aAAQ,GAAY,KAAK,CAAC;;;;;;QAQnC,UAAK,GAAY,KAAK,CAAC;;;;;QAgBd,YAAO,GAAY,KAAK,CAAC;;;;;;;QAyBzB,SAAI,GAAW,CAAC,CAAC;;;;;QAOjB,WAAM,GAAgD,UAAU,CAAC;;;;;;;QASjE,aAAQ,GAAY,KAAK,CAAC;;;;;;QAS1B,cAAS,GAAY,KAAK,CAAC;;;;QAwD5B,mBAAc,GAAG,CAAC,KAAY;YACpC,MAAM,QAAQ,GAAG,KAAK,CAAC,MAA6B,CAAC;YACrD,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC;YAC5B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;SACxC,CAAC;QAEM,iCAA4B,GAAG;YACrC,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,CAAC;SAC9B,CAAC;KA4HH;;;;;;;;IAtKC,WAAW;QACT,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,IAAI,CAAC,oBAAoB,EAAE,CAAC;SAC7B;KACF;;;;;IAOD,eAAe;;QACb,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,IAAI,CAAC,oBAAoB,EAAE,CA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T,IAAI,CAAC,MAAM,KAAK,MAAM,IAAI,aAAa,EACvC,IAAI,CAAC,MAAM,KAAK,UAAU,IAAI,UAAU,EACxC,IAAI,CAAC,MAAM,KAAK,YAAY,IAAI,UAAU,EAC1C,IAAI,CAAC,MAAM,KAAK,MAAM,IAAI,QAAQ,CACnC,GACD,CACE,CACF,EAEL,CAAC,IAAI,CAAC,WAAW;YAChB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,sBAAsB,CAAC,MAC7C,4DAAK,KAAK,EAAC,aAAa,IACtB,6DAAM,IAAI,EAAC,aAAa,IAAE,IAAI,CAAC,WAAW,CAAQ,CAC9C,CACP,EAEA,CAAC,IAAI,CAAC,gBAAgB;YACrB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,4BAA4B,CAAC,MACnD,4DAAK,MAAM,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,EAAC,mBAAmB,IACjD,6DAAM,IAAI,EAAC,mBAAmB,IAAE,IAAI,CAAC,gBAAgB,CAAQ,CACzD,CACP,CACI,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["NvFieldtextarea","uuidv4"],"sources":["src/components/nv-fieldtextarea/nv-fieldtextarea.scss?tag=nv-fieldtextarea","src/components/nv-fieldtextarea/nv-fieldtextarea.tsx"],"sourcesContent":["@import \"../../styles/form-field\";\n\n@mixin form-field-textarea-wrapper() {\n display: flex;\n flex-wrap: wrap;\n gap: var(--form-gap-x);\n align-items: stretch;\n align-self: stretch;\n}\n\n@mixin form-field-textarea-container() {\n display: flex;\n flex-grow: 1;\n padding: calc(var(--form-field-padding-y) - 1px) var(--form-field-padding-x);\n justify-content: center;\n align-items: center;\n gap: var(--form-field-gap);\n align-self: stretch;\n border-radius: var(--form-field-radius);\n border-width: 1px;\n border-style: solid;\n border-color: var(--nv-field-border-default);\n opacity: var(--components-form-opacity-default);\n background: var(--nv-field-background);\n transition: all 150ms ease-out;\n\n &:hover {\n border-color: var(--nv-field-border-hover);\n }\n\n &:focus-within {\n border-color: var(--nv-field-border-focus);\n box-shadow: 0 0 0 var(--focus-field-stroke) var(--nv-field-focus-box-shadow);\n }\n // Keep ReadOnly before Disabled\n &:has(textarea:read-only) {\n // opacity: var(--components-form-opacity-readonly, 0.5); broken token generation, is 50px instead of 0.5\n opacity: 0.5;\n background-color: var(--components-form-field-background-readonly);\n border-color: var(--nv-field-border-readonly);\n }\n\n &:has(textarea:disabled) {\n // opacity: var(--components-form-opacity-disabled, 0.5); broken token generation, is 50px instead of 0.5\n opacity: 0.5;\n background-color: var(--components-form-field-background-disabled);\n border-color: var(--nv-field-border-disabled);\n }\n}\n\n@mixin form-field-textarea() {\n display: flex;\n align-items: center;\n flex: 1 0 0;\n overflow: hidden;\n background-color: transparent;\n color: var(--components-form-field-content-text);\n text-overflow: ellipsis;\n font-size: var(--form-field-font-size);\n font-style: normal;\n font-weight: 500;\n line-height: var(--form-field-line-height);\n\n &:focus {\n outline: none;\n }\n\n &::placeholder {\n overflow: hidden;\n color: var(--components-form-field-content-placeholder);\n text-overflow: ellipsis;\n font-family: \"TT Norms Pro\", sans-serif;\n font-size: var(--form-field-font-size);\n font-style: normal;\n font-weight: 400;\n line-height: var(--form-field-line-height);\n }\n}\n\nnv-fieldtextarea {\n @include form-field-variables();\n @include form-field-root();\n\n &[readonly]:not([readonly=\"false\"]) {\n @include form-field-readonly-variables();\n }\n\n &[error]:not([error=\"false\"]) {\n @include form-field-error-variables();\n }\n\n &[success]:not([success=\"false\"]) {\n @include form-field-success-variables();\n }\n\n &[required]:not([required=\"false\"]) label {\n @include form-field-label-required();\n }\n\n label {\n @include form-field-label();\n }\n\n .textarea-wrapper {\n @include form-field-textarea-wrapper();\n\n .textarea-container {\n @include form-field-textarea-container();\n\n textarea {\n @include form-field-textarea();\n }\n\n nv-icon.validation {\n @include form-field-icon();\n }\n }\n }\n\n .description {\n @include form-field-description();\n }\n\n .error-description {\n @include form-field-error-description();\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n Element,\n Watch,\n} from '@stencil/core';\nimport { v4 as uuidv4 } from 'uuid';\nimport clsx from 'clsx';\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-fieldtextarea',\n shadow: false,\n formAssociated: true,\n styleUrl: 'nv-fieldtextarea.scss',\n})\nexport class NvFieldtextarea {\n @Element() el: HTMLNvFieldtextareaElement;\n private textareaElement!: HTMLTextAreaElement;\n\n /****************************************************************************/\n //#region DEPRECATED\n\n /**\n * Message defines a 'hint ' message for the Text 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 * textarea 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 textarea 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 textarea 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 textarea 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 textarea’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 textarea field, which determines the text displayed\n * within the field. This prop is typically used in controlled components\n * where the textarea’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 textarea 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 textarea 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 textarea 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 textarea 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 textarea 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 textarea field’s appearance to indicate successful textarea 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 textarea field. It’s\n * helpful for making sure users don’t enter too much information, keeping\n * their textarea 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 * textarea 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 * The number of visible text lines for the control. The default is 3. This\n * can be useful when you want to limit the size of the textarea field or when\n * you want to make the textarea field smaller to fit a specific layout. The\n * textarea field will expand vertically to fit the text as the user types.\n */\n @Prop({ reflect: true })\n readonly rows: number = 3;\n\n /**\n * Controls the resize property of a textarea. It can be set to none, both,\n * horizontal, or vertical. The default is vertical.\n */\n @Prop({ reflect: true })\n readonly resize: 'none' | 'both' | 'horizontal' | 'vertical' = 'vertical';\n\n /**\n * Enable this to make the textarea automatically resize as the user types,\n * adjusting the height to fit the content. For the best experience, avoid\n * vertical resizing, as it’s controlled by this feature. Horizontal resizing\n * can still be allowed if desired.\n */\n @Prop({ reflect: true })\n readonly autosize: 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 a <textarea>\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 textarea value changes.\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<string>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region WATCHERS\n\n /**\n * If autosize is true, we need to make sure to update the min-height when\n * the rows change.\n */\n @Watch('rows')\n rowsChanged() {\n if (this.autosize) {\n this.adjustTextareaHeight();\n }\n }\n\n /**\n * If autosize is true, we need to make sure to update the height and\n * min-height, if false, we need to remove the height property.\n */\n @Watch('autosize')\n autosizeChanged() {\n if (this.autosize) {\n this.adjustTextareaHeight();\n } else {\n this.textareaElement?.style.removeProperty('height');\n }\n }\n\n /**\n * Make sure to adjust the height of the textarea when the value changes\n * programmatically or by typing when autosize is on.\n */\n @Watch('value')\n handleValueChange() {\n if (this.autosize) {\n this.adjustTextareaHeight();\n }\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region METHODS\n\n private handleTextarea = (event: Event) => {\n const textarea = event.target as HTMLTextAreaElement;\n this.value = textarea.value;\n this.valueChanged.emit(textarea.value);\n };\n\n private handleTextareaContainerClick = () => {\n this.textareaElement.focus();\n };\n\n private adjustTextareaHeight() {\n if (this.textareaElement && this.autosize) {\n /**\n * The first requestAnimationFrame ensures that the DOM has applied any\n * pending changes (e.g., value updates or attribute changes) before\n * proceeding to the next frame.\n */\n requestAnimationFrame(() => {\n /**\n * The second requestAnimationFrame ensures that the browser has fully\n * recalculated layout and styles based on the updated DOM, such as\n * recalculating scrollHeight for the textarea after the new value is\n * rendered.\n */\n requestAnimationFrame(() => {\n this.textareaElement.style.height = 'auto';\n\n const computedStyle = window.getComputedStyle(this.textareaElement);\n const lineHeight = parseFloat(computedStyle.lineHeight);\n const paddingTop = parseFloat(computedStyle.paddingTop);\n const paddingBottom = parseFloat(computedStyle.paddingBottom);\n const borderTopWidth = parseFloat(computedStyle.borderTopWidth);\n const borderBottomWidth = parseFloat(computedStyle.borderBottomWidth);\n\n // Calculate min-height based on rows\n const minHeight =\n lineHeight * this.rows +\n paddingTop +\n paddingBottom +\n borderTopWidth +\n borderBottomWidth;\n\n this.textareaElement.style.minHeight = `${minHeight}px`;\n this.textareaElement.style.height =\n this.textareaElement.scrollHeight + 'px';\n });\n });\n }\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 componentDidLoad() {\n if (this.autosize) {\n this.adjustTextareaHeight();\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=\"textarea-wrapper\">\n <div\n class=\"textarea-container\"\n onClick={this.handleTextareaContainerClick}\n >\n <textarea\n id={this.inputId}\n ref={e => (this.textareaElement = e)}\n placeholder={this.placeholder}\n autofocus={this.autofocus}\n name={this.name}\n disabled={this.disabled}\n readOnly={this.readonly}\n required={this.required}\n maxlength={this.maxlength}\n minlength={this.minlength}\n autocomplete=\"off\"\n value={this.value}\n onInput={this.handleTextarea}\n rows={this.rows}\n class={clsx(\n this.resize === 'none' && 'resize-none',\n this.resize === 'vertical' && 'resize-y',\n this.resize === 'horizontal' && 'resize-x',\n this.resize === 'both' && 'resize',\n )}\n />\n </div>\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"],"version":3}
@@ -1,13 +1,13 @@
1
1
  import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-77d0fedc.js';
2
2
  import { a as startsWithIgnoreCase } from './p-a5c8eee9.js';
3
- import { T as TimeType } from './p-56f71851.js';
4
- import { d as defineCustomElement$5 } from './p-a01bdf02.js';
5
- import { d as defineCustomElement$4 } from './p-e431a0ad.js';
6
- import { d as defineCustomElement$3 } from './p-18d221e3.js';
7
- import { d as defineCustomElement$2 } from './p-a9a52105.js';
3
+ import { T as TimeType } from './p-fd65c51f.js';
4
+ import { d as defineCustomElement$5 } from './p-5f5e2bf2.js';
5
+ import { d as defineCustomElement$4 } from './p-659a5ae4.js';
6
+ import { d as defineCustomElement$3 } from './p-73e703a1.js';
7
+ import { d as defineCustomElement$2 } from './p-492ad81d.js';
8
8
  import { v as v4 } from './p-f5ff676c.js';
9
9
 
10
- const nvFieldtimeCss = "nv-fieldtime{--nv-field-border-default:var(--components-form-field-border-default);--nv-field-border-hover:var(--components-form-field-border-hover);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--components-form-field-border-default);--nv-field-border-readonly:var(--components-form-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-brand);--nv-field-background:var(--components-form-field-background-default);display:flex;flex-direction:column;align-items:flex-start;gap:var(--form-gap-y);box-sizing:border-box}nv-fieldtime[readonly]:not([readonly=false]){--nv-field-border-default:var(--components-form-field-border-readonly);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-background:var(--components-form-field-background-readonly)}nv-fieldtime[error]:not([error=false]){--nv-field-border-default:var(--components-form-field-border-error);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-destructive)}nv-fieldtime[success]:not([success=false]){--nv-field-border-default:var(--components-form-field-border-success);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-success)}nv-fieldtime[required]:not([required=false]) label::after{content:\"*\";color:var(--components-form-text-required);font-weight:700}nv-fieldtime label{display:flex;align-items:center;gap:var(--form-label-gap);align-self:stretch;color:var(--components-form-text-label-default);font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-label-font-size);font-style:normal;font-weight:500;line-height:var(--form-label-line-height)}nv-fieldtime nv-popover{width:100%;display:block}nv-fieldtime nv-popover [data-scope=popover]{padding:var(--list-custom-padding);background-color:var(--components-list-custom-background);border:1px solid var(--components-list-custom-border);width:100%}nv-fieldtime .input-wrapper{display:flex;flex-wrap:wrap;gap:var(--form-gap-x);align-items:stretch;align-self:stretch;width:100%}nv-fieldtime .input-container{display:flex;flex-grow:1;padding:calc(var(--form-field-padding-y) - 1px) var(--form-field-padding-x);justify-content:center;align-items:center;gap:var(--form-field-gap);align-self:stretch;border-radius:var(--form-field-radius);border-width:1px;border-style:solid;border-color:var(--nv-field-border-default);opacity:var(--components-form-opacity-default);background:var(--nv-field-background);transition:all 150ms ease-out;display:flex;justify-content:flex-start;align-items:center;position:relative;width:100%;min-height:40px;gap:0}nv-fieldtime .input-container:hover{border-color:var(--nv-field-border-hover)}nv-fieldtime .input-container:focus-within{border-color:var(--nv-field-border-focus);box-shadow:0px 0px 0px var(--focus-field-stroke) var(--nv-field-focus-box-shadow)}nv-fieldtime .input-container:has(input:read-only){opacity:0.5;background-color:var(--components-form-field-background-readonly);border-color:var(--nv-field-border-readonly)}nv-fieldtime .input-container:has(input:disabled){opacity:0.5;background-color:var(--components-form-field-background-disabled);border-color:var(--nv-field-border-disabled)}nv-fieldtime .input-container input.time-input{display:flex;align-items:center;flex:1 0 0;overflow:hidden;background-color:transparent;color:var(--components-form-field-content-text);text-overflow:ellipsis;font-size:var(--form-field-font-size);font-style:normal;font-weight:500;line-height:var(--form-field-line-height);width:100%;min-width:24px;flex:0 0 24px;text-align:center;padding:0;margin:0}nv-fieldtime .input-container input.time-input:focus{outline:none}nv-fieldtime .input-container input.time-input::placeholder{overflow:hidden;color:var(--components-form-field-content-placeholder);text-overflow:ellipsis;font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-field-font-size);font-style:normal;font-weight:400;line-height:var(--form-field-line-height)}nv-fieldtime .input-container input.time-input::-webkit-inner-spin-button,nv-fieldtime .input-container input.time-input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}nv-fieldtime .input-container span{width:100%;text-align:center;min-width:24px;flex:0 0 24px;padding:0 4px;color:var(--components-form-field-content-text)}nv-fieldtime .input-container .toggle-time-icon{position:absolute;right:0;top:50%;transform:translateY(-50%);margin-left:auto}nv-fieldtime .input-container nv-icon.validation{color:var(--nv-field-border-default);position:absolute;right:50px;top:50%;transform:translateY(-50%)}nv-fieldtime .input-container.focus-within,nv-fieldtime .input-container:hover{border-color:var(--nv-field-border-focus);box-shadow:0px 0px 0px var(--focus-field-stroke) var(--nv-field-focus-box-shadow)}nv-fieldtime .description{align-self:stretch;color:var(--components-form-text-description-default);font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height)}nv-fieldtime .error-description{align-self:stretch;color:var(--components-form-text-description-default);font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height);color:var(--components-form-text-description-error)}nv-fieldtime hr{border:none;border-top:1px solid var(--dropdown-divider-color, #ccc);margin:0.5rem 0}.input-container.focus-within,.input-container:hover{border-color:var(--nv-field-border-focus);box-shadow:0px 0px 0px var(--focus-field-stroke) var(--nv-field-focus-box-shadow)}.time-dropdown{position:absolute;top:calc(100% + 4px);left:0;width:100%;border-radius:4px;box-shadow:0 2px 8px rgba(0, 0, 0, 0.1);z-index:1000}.time-dropdown .time-columns{display:flex;justify-content:flex-start;align-items:center}.time-dropdown .time-columns .time-column{flex:1;text-align:center;max-height:200px;overflow-y:auto;scroll-behavior:smooth}.time-dropdown .time-columns .time-column::-webkit-scrollbar{width:4px}.time-dropdown .time-columns .time-column::-webkit-scrollbar-thumb{border-radius:4px}.time-dropdown .time-columns .time-column:last-child{border-right:none}.time-dropdown .time-columns .time-column .time-option{padding:8px;text-align:center;cursor:pointer;transition:background-color 0.2s;height:40px;display:flex;justify-content:center;align-items:center}.time-dropdown .time-columns .time-column .time-option:hover{border-width:1px;border-style:solid;border-color:var(--color-rainbow-10-background)}.time-dropdown .time-columns .time-column .time-option:hover,.time-dropdown .time-columns .time-column .time-option:focus,.time-dropdown .time-columns .time-column .time-option:focus-within{background-color:var(--components-list-custom-item-background-hover);color:var(--components-menu-contextual-item-content-hover)}.time-dropdown .time-columns .time-column .time-option.selected{background:var(--color-rainbow-10-background);color:var(--color-rainbow-10-text)}.time-dropdown .time-columns .time-column .time-option.highlighted{background-color:var(--components-list-custom-item-background-hover);color:var(--components-menu-contextual-item-content-hover)}";
10
+ const nvFieldtimeCss = "nv-fieldtime{--nv-field-border-default:var(--components-form-field-border-default);--nv-field-border-hover:var(--components-form-field-border-hover);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--components-form-field-border-default);--nv-field-border-readonly:var(--components-form-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-brand);--nv-field-background:var(--components-form-field-background-default);display:flex;flex-direction:column;align-items:flex-start;gap:var(--form-gap-y);box-sizing:border-box}nv-fieldtime[readonly]:not([readonly=false]){--nv-field-border-default:var(--components-form-field-border-readonly);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-background:var(--components-form-field-background-readonly)}nv-fieldtime[error]:not([error=false]){--nv-field-border-default:var(--components-form-field-border-error);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-destructive)}nv-fieldtime[success]:not([success=false]){--nv-field-border-default:var(--components-form-field-border-success);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-success)}nv-fieldtime[required]:not([required=false]) label::after{content:\"*\";color:var(--components-form-text-required);font-weight:700}nv-fieldtime label{display:flex;align-items:center;gap:var(--form-label-gap);align-self:stretch;color:var(--components-form-text-label-default);font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-label-font-size);font-style:normal;font-weight:500;line-height:var(--form-label-line-height)}nv-fieldtime nv-popover{width:100%;display:block}nv-fieldtime nv-popover [data-scope=popover]{padding:var(--list-dropdown-padding);background-color:var(--components-list-dropdown-background);border:1px solid var(--components-list-dropdown-border);width:100%}nv-fieldtime .input-wrapper{display:flex;flex-wrap:wrap;gap:var(--form-gap-x);align-items:stretch;align-self:stretch;width:100%}nv-fieldtime .input-container{display:flex;flex-grow:1;padding:calc(var(--form-field-padding-y) - 1px) var(--form-field-padding-x);justify-content:center;align-items:center;gap:var(--form-field-gap);align-self:stretch;border-radius:var(--form-field-radius);border-width:1px;border-style:solid;border-color:var(--nv-field-border-default);opacity:var(--components-form-opacity-default, 1);background:var(--nv-field-background);transition:all 150ms ease-out;display:flex;justify-content:flex-start;align-items:center;position:relative;width:100%;min-height:40px;gap:0}nv-fieldtime .input-container:hover{border-color:var(--nv-field-border-hover)}nv-fieldtime .input-container:focus-within,nv-fieldtime .input-container:focus-within:hover,nv-fieldtime .input-container:focus,nv-fieldtime .input-container:focus:hover{border-color:var(--nv-field-border-focus);box-shadow:0px 0px 0px var(--focus-field-stroke) var(--nv-field-focus-box-shadow)}nv-fieldtime .input-container:has(input:read-only){opacity:0.5;background-color:var(--components-form-field-background-readonly);border-color:var(--nv-field-border-readonly)}nv-fieldtime .input-container:has(input:disabled){opacity:0.5;background-color:var(--components-form-field-background-disabled);border-color:var(--nv-field-border-disabled)}nv-fieldtime .input-container input.time-input{display:flex;align-items:center;flex:1 0 0;overflow:hidden;background-color:transparent;color:var(--components-form-field-content-text);text-overflow:ellipsis;font-size:var(--form-field-font-size);font-style:normal;font-weight:500;line-height:var(--form-field-line-height);width:100%;min-width:24px;flex:0 0 24px;text-align:center;padding:0;margin:0}nv-fieldtime .input-container input.time-input:focus{outline:none}nv-fieldtime .input-container input.time-input::placeholder{overflow:hidden;color:var(--components-form-field-content-placeholder);text-overflow:ellipsis;font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-field-font-size);font-style:normal;font-weight:400;line-height:var(--form-field-line-height)}nv-fieldtime .input-container input.time-input::-webkit-inner-spin-button,nv-fieldtime .input-container input.time-input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}nv-fieldtime .input-container span{width:100%;text-align:center;min-width:24px;flex:0 0 24px;padding:0 4px;color:var(--components-form-field-content-text)}nv-fieldtime .input-container .toggle-time-icon{position:absolute;right:0;top:50%;transform:translateY(-50%);margin-left:auto}nv-fieldtime .input-container nv-icon.validation{color:var(--nv-field-border-default);position:absolute;right:50px;top:50%;transform:translateY(-50%)}nv-fieldtime .input-container:focus,nv-fieldtime .input-container:focus-within{border-color:var(--color-focus-brand);box-shadow:0px 0px 0px var(--focus-field-stroke) var(--color-focus-brand)}nv-fieldtime .description{align-self:stretch;color:var(--components-form-text-description-default);font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height)}nv-fieldtime .error-description{align-self:stretch;color:var(--components-form-text-description-default);font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height);color:var(--components-form-text-description-error)}nv-fieldtime hr{border:none;border-top:1px solid var(--dropdown-divider-color, #ccc);margin:0.5rem 0}.input-container:focus-within,.input-container:focus{border-color:var(--color-focus-brand);box-shadow:0px 0px 0px var(--focus-field-stroke) var(--color-focus-brand)}.time-dropdown{position:absolute;top:calc(100% + 4px);left:0;width:100%;z-index:1000}.time-dropdown .time-columns{display:flex;justify-content:flex-start;align-items:center}.time-dropdown .time-columns .time-column{flex:1;text-align:center;max-height:200px;overflow-y:auto;scroll-behavior:smooth}.time-dropdown .time-columns .time-column::-webkit-scrollbar{width:4px}.time-dropdown .time-columns .time-column::-webkit-scrollbar-thumb{border-radius:4px}.time-dropdown .time-columns .time-column:last-child{border-right:none}.time-dropdown .time-columns .time-column .time-option{padding:var(--list-dropdown-item-padding-y) var(--list-dropdown-item-padding-x);text-align:center;cursor:pointer;transition:background-color 0.2s;height:40px;border-radius:var(--list-dropdown-item-radius);display:flex;justify-content:center;align-items:center}.time-dropdown .time-columns .time-column .time-option:hover{background-color:var(--components-list-dropdown-item-background-hover);color:var(--components-list-dropdown-item-label-hover)}.time-dropdown .time-columns .time-column .time-option:focus,.time-dropdown .time-columns .time-column .time-option:focus-within{background-color:var(--components-list-dropdown-item-background-hover);color:var(--components-list-dropdown-item-label-hover)}.time-dropdown .time-columns .time-column .time-option.selected{background-color:var(--components-list-dropdown-item-background-active);color:var(--components-list-dropdown-item-label-active);border-width:1px;border-style:solid;border-color:var(--components-list-dropdown-item-border-active)}.time-dropdown .time-columns .time-column .time-option.highlighted{background-color:var(--components-list-dropdown-item-background-hover);color:var(--components-menu-contextual-item-content-hover)}";
11
11
  const NvFieldtimeStyle0 = nvFieldtimeCss;
12
12
 
13
13
  const NvFieldtime$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldtime extends H {
@@ -79,6 +79,12 @@ const NvFieldtime$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldtime extends
79
79
  * This affects how the time changes when using arrow keys or spinners.
80
80
  */
81
81
  this.step = 60000; // In secondes
82
+ /**
83
+ * Applies focus to the input field as soon as the component is mounted. This
84
+ * is equivalent to setting the native autofocus attribute on an <input>
85
+ * element.
86
+ */
87
+ this.autofocus = false;
82
88
  }
83
89
  //#endregion EVENTS
84
90
  /****************************************************************************/
@@ -957,30 +963,32 @@ const NvFieldtime$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldtime extends
957
963
  RenderTimeOptionsColumn(type) {
958
964
  return (h("div", { class: `time-column time-column-${type}`, onScroll: e => this.handleScroll(e, type) }, this.generateInfiniteTimeOptions(type).map((option, index) => (h("div", { class: {
959
965
  'time-option': true,
960
- 'selected': option === this.hours,
966
+ 'selected': (type === TimeType.Hours && option === this.hours) ||
967
+ (type === TimeType.Minutes && option === this.minutes) ||
968
+ (type === TimeType.Seconds && option === this.seconds),
961
969
  }, key: `${option}-${index}`, onClick: e => this.handleTimeOptionClick(e, type) }, option)))));
962
970
  }
963
971
  render() {
964
- return (h(Host, { key: '4eefb9bb8c2bfd63cc229cb9d3f5e51dbe2f5351', onclick: e => this.handleHostClick(e) }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: '8b191f1bca869f85b6186a3cfa66d8f9d886dc07', htmlFor: this.inputId }, h("slot", { key: '84438c62746d81ccf65d76a40ac62e8d445adcf0', name: "label" }, this.label))), h("nv-popover", { key: '1cc212b0ae814a50a288c195d1b7aa7b378f452a', ref: el => (this.popoverElement = el), triggerMode: "controlled", placement: "bottom-start", open: this.open }, h("div", { key: '1584b3842cbd13989cdd5492baa0588a8aa0015e', class: "input-wrapper", slot: "trigger" }, h("slot", { key: '3f747181762dee542935fa5ee614a315e1aa8413', name: "before-input" }), h("div", { key: '93f2329aa6a09bad318d2a461e87d69fcff8df30', class: "input-container" }, h("slot", { key: '13d2b3f6e3868065cf982690f35996f2f652403b', name: "leading-input" }), startsWithIgnoreCase(this.format, 'HH') && [
965
- h("input", { key: 'a15dd9dab27ed4918b81680718601d57bac56f2c', ref: el => (this.inputElements[TimeType.Hours] = el), type: "number", class: "time-input", pattern: "[0-9]*", maxlength: "3", value: this.hours, onInput: e => this.handleInputChange(e, TimeType.Hours), placeholder: this.format.includes('hh') ? 'hh' : 'HH', inputMode: "numeric", onFocus: () => this.handleFocus(TimeType.Hours), name: this.name
972
+ return (h(Host, { key: '35ff4b2a7eb1eb3f2503eec2216f0acf8a4087b7', onclick: e => this.handleHostClick(e) }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: 'a137feb35c8ac11429c0ec5226ce02a4ad8c188f', htmlFor: this.inputId }, h("slot", { key: 'cdffe9bec4c87fabe1fd37dba0783d2d1389393d', name: "label" }, this.label))), h("nv-popover", { key: '9735238d52307520ab18519f85c7b91e29095564', ref: el => (this.popoverElement = el), triggerMode: "controlled", placement: "bottom-start", open: this.open }, h("div", { key: '7b15d62b4a49ad6dc1cb6f487bd9e32678aab32b', class: "input-wrapper", slot: "trigger" }, h("slot", { key: '6d29417ed7997302d22ab883b8e16eea576a6970', name: "before-input" }), h("div", { key: '0ea68d72d9360a76dbbd9670dcc76ed40df7d817', class: "input-container" }, h("slot", { key: '145986a835cc308f6691df969411a23bca0765ab', name: "leading-input" }), startsWithIgnoreCase(this.format, 'HH') && [
973
+ h("input", { key: '62f50adf4dd6bd8a1daa795808443a73ba907910', ref: el => (this.inputElements[TimeType.Hours] = el), type: "number", autofocus: this.autofocus, class: "time-input", pattern: "[0-9]*", maxlength: "3", value: this.hours, onInput: e => this.handleInputChange(e, TimeType.Hours), placeholder: this.format.includes('hh') ? 'hh' : 'HH', inputMode: "numeric", onFocus: () => this.handleFocus(TimeType.Hours), name: this.name
966
974
  ? `${TimeType.Hours}-${this.name}`
967
975
  : TimeType.Hours, id: this.inputId, readonly: this.readonly, disabled: this.disabled, required: this.required, onKeyDown: e => this.handleKeyDown(e), onBlur: () => this.handleInputBlur() }),
968
976
  ], this.format.includes('mm') && [
969
- h("span", { key: '0cae25476bdb8a8d70c2d0bb94bffa20e23879a7' }, ":"),
970
- h("input", { key: 'bc6b4ff8a8eda66d51726d34d6aedc43e304c670', ref: el => (this.inputElements[TimeType.Minutes] = el), type: "number", class: "time-input", pattern: "[0-9]*", maxlength: "3", value: this.minutes, onInput: e => this.handleInputChange(e, TimeType.Minutes), placeholder: "mm", inputMode: "numeric", onFocus: () => this.handleFocus(TimeType.Minutes), name: this.name
977
+ h("span", { key: '9b58e67ba5e138f78feebc5e84c67506c6d3a3c2' }, ":"),
978
+ h("input", { key: '5c2e673f5a3f34c6e1c4619e793ac0e042bdc2f2', ref: el => (this.inputElements[TimeType.Minutes] = el), type: "number", autofocus: this.autofocus, class: "time-input", pattern: "[0-9]*", maxlength: "3", value: this.minutes, onInput: e => this.handleInputChange(e, TimeType.Minutes), placeholder: "mm", inputMode: "numeric", onFocus: () => this.handleFocus(TimeType.Minutes), name: this.name
971
979
  ? `${TimeType.Minutes}-${this.name}`
972
980
  : TimeType.Minutes, id: `${this.inputId}-minutes`, readonly: this.readonly, disabled: this.disabled, required: this.required, onKeyDown: e => this.handleKeyDown(e), onBlur: () => this.handleInputBlur() }),
973
981
  ], this.format.includes('ss') && [
974
- h("span", { key: 'b4faefcaa20ffc346757e6a7454fa6474a5aeb97' }, ":"),
975
- h("input", { key: 'd94a79e3120bad51df44cb3528ac36bb0a39783d', ref: el => (this.inputElements[TimeType.Seconds] = el), type: "number", class: "time-input", pattern: "[0-9]*", maxlength: "3", value: this.seconds, onInput: e => this.handleInputChange(e, TimeType.Seconds), placeholder: "ss", inputMode: "numeric", onFocus: () => this.handleFocus(TimeType.Seconds), name: this.name
982
+ h("span", { key: '52c86d913b1d312cda254b24f22e5c0fe3f7ff3b' }, ":"),
983
+ h("input", { key: 'b882cb0061bcebc3c487857e2d1f4907a9c82a92', ref: el => (this.inputElements[TimeType.Seconds] = el), type: "number", autofocus: this.autofocus, class: "time-input", pattern: "[0-9]*", maxlength: "3", value: this.seconds, onInput: e => this.handleInputChange(e, TimeType.Seconds), placeholder: "ss", inputMode: "numeric", onFocus: () => this.handleFocus(TimeType.Seconds), name: this.name
976
984
  ? `${TimeType.Seconds}-${this.name}`
977
985
  : TimeType.Seconds, id: `${this.inputId}-seconds`, readonly: this.readonly, disabled: this.disabled, required: this.required, onKeyDown: e => this.handleKeyDown(e), onBlur: () => this.handleInputBlur() }),
978
- ], h("nv-iconbutton", { key: '791265d0c8ce93514a5d1972784f824723dc66b8', class: "toggle-time-icon", name: this.open ? 'chevron-top' : 'chevron-down', size: "md", emphasis: "lower", "aria-label": this.open ? 'Hide time picker' : 'Show time picker', "aria-pressed": this.open.toString(), onClick: () => this.HandleDropdownIconClick() }), this.error && (h("nv-icon", { key: '9c19922e738549938040f36b015bb7c85b09453c', name: "alert-circle", class: "validation", size: "sm" })), this.success && (h("nv-icon", { key: '4669516002acd3d1936d3beec1e91950fbdca647', name: "circle-check", class: "validation", size: "sm" }))), h("slot", { key: '263ec0dc7d5cbe1f6360522975d74a41a2ad73a8', name: "after-input" })), h("div", { key: '7ced75636f91d7079f11ecabe31f4cc9150c6771', class: "time-dropdown", slot: "content" }, h("div", { key: '719a8d6720ca4d17a90d614a955d5449f4334e89', class: "time-columns" }, startsWithIgnoreCase(this.format, 'HH') &&
986
+ ], h("nv-iconbutton", { key: 'b6916d20ca835471169d2c8bc9c9506b5896d14d', class: "toggle-time-icon", name: this.open ? 'chevron-top' : 'chevron-down', size: "md", emphasis: "lower", "aria-label": this.open ? 'Hide time picker' : 'Show time picker', "aria-pressed": this.open.toString(), onClick: () => this.HandleDropdownIconClick() }), this.error && (h("nv-icon", { key: 'a40f6ca94e578c85d30fb59ea7f8719ed18b9feb', name: "alert-circle", class: "validation", size: "sm" })), this.success && (h("nv-icon", { key: '9e042ce055d8369d74d09f3c1fb483b69693a348', name: "circle-check", class: "validation", size: "sm" }))), h("slot", { key: '47ac01deec7af0b6632ed424ab772713bfc3ce50', name: "after-input" })), h("div", { key: '654b9176d6f04161a855c249f086aa6f40389977', class: "time-dropdown", slot: "content" }, h("div", { key: '422b4c774aa084fa2a8062b9b53ff37abf9c2296', class: "time-columns" }, startsWithIgnoreCase(this.format, 'HH') &&
979
987
  this.RenderTimeOptionsColumn(TimeType.Hours), this.format.includes('mm') &&
980
988
  this.RenderTimeOptionsColumn(TimeType.Minutes), this.format.includes('ss') &&
981
989
  this.RenderTimeOptionsColumn(TimeType.Seconds)))), (this.description ||
982
- this.el.querySelector('[slot="description"]')) && (h("div", { key: 'f1845d065526c7b73cd95fb66278dcff001c477b', class: "description" }, h("slot", { key: 'b4d4c050815f36cdbae73eb0ccd99a12040d5cd9', name: "description" }, this.description))), (this.errorDescription ||
983
- this.el.querySelector('[slot="error-description"]')) && (h("div", { key: '4b5a39a8d8b6370ffe13dd0db969348e283701ae', hidden: !this.error, class: "error-description" }, h("slot", { key: 'f07ca5b51fe39ff8d7c64b674515aa0c57c04a6e', name: "error-description" }, this.errorDescription)))));
990
+ this.el.querySelector('[slot="description"]')) && (h("div", { key: 'f66ec4ddce5d506f6bf845dd77257d8c401fd9d8', class: "description" }, h("slot", { key: '454bd29d86f8f100062db5ff81bb3f31df225d72', name: "description" }, this.description))), (this.errorDescription ||
991
+ this.el.querySelector('[slot="error-description"]')) && (h("div", { key: 'e170ea292e2b4b90f78dcaa82e2b9985634d7aec', hidden: !this.error, class: "error-description" }, h("slot", { key: '57a04082aaf4869e8f63db68975208e64769bc07', name: "error-description" }, this.errorDescription)))));
984
992
  }
985
993
  static get formAssociated() { return true; }
986
994
  get el() { return this; }
@@ -1005,6 +1013,7 @@ const NvFieldtime$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldtime extends
1005
1013
  "step": [514],
1006
1014
  "max": [513],
1007
1015
  "min": [513],
1016
+ "autofocus": [516],
1008
1017
  "hours": [32],
1009
1018
  "minutes": [32],
1010
1019
  "seconds": [32]