@nova-design-system/nova-webcomponents 3.18.0-beta.0 → 3.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (304) hide show
  1. package/dist/cjs/index.cjs.js +33 -2
  2. package/dist/cjs/index.cjs.js.map +1 -1
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/native.cjs.js +1 -1
  5. package/dist/cjs/nv-badge_2.cjs.entry.js +1 -1
  6. package/dist/cjs/nv-fielddate.cjs.entry.js +10 -6
  7. package/dist/cjs/nv-fielddate.cjs.entry.js.map +1 -1
  8. package/dist/cjs/nv-fielddaterange.cjs.entry.js +11 -7
  9. package/dist/cjs/nv-fielddaterange.cjs.entry.js.map +1 -1
  10. package/dist/cjs/nv-fielddropdown.cjs.entry.js +193 -209
  11. package/dist/cjs/nv-fielddropdown.cjs.entry.js.map +1 -1
  12. package/dist/cjs/nv-fielddropdownitem.cjs.entry.js +7 -4
  13. package/dist/cjs/nv-fielddropdownitem.cjs.entry.js.map +1 -1
  14. package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +4 -0
  15. package/dist/cjs/nv-fieldmultiselect.cjs.entry.js.map +1 -1
  16. package/dist/cjs/nv-fieldnumber.cjs.entry.js +3 -3
  17. package/dist/cjs/nv-fieldpassword.cjs.entry.js +3 -3
  18. package/dist/cjs/nv-fieldradio.cjs.entry.js +3 -3
  19. package/dist/cjs/nv-fieldselect.cjs.entry.js +5 -5
  20. package/dist/cjs/nv-fieldslider.cjs.entry.js +3 -3
  21. package/dist/cjs/nv-fieldtext.cjs.entry.js +3 -3
  22. package/dist/cjs/nv-fieldtextarea.cjs.entry.js +3 -3
  23. package/dist/cjs/nv-fieldtime.cjs.entry.js +557 -496
  24. package/dist/cjs/nv-fieldtime.cjs.entry.js.map +1 -1
  25. package/dist/cjs/nv-icon.cjs.entry.js +2 -2
  26. package/dist/cjs/nv-icon.cjs.entry.js.map +1 -1
  27. package/dist/cjs/nv-iconbutton_2.cjs.entry.js +2 -2
  28. package/dist/cjs/nv-menu.cjs.entry.js +2 -2
  29. package/dist/cjs/nv-menu.cjs.entry.js.map +1 -1
  30. package/dist/cjs/nv-menuitem.cjs.entry.js +1 -1
  31. package/dist/cjs/nv-notification.cjs.entry.js +1 -1
  32. package/dist/cjs/nv-notificationcontainer.cjs.entry.js +1 -1
  33. package/dist/cjs/nv-popover.cjs.entry.js +2 -2
  34. package/dist/cjs/nv-popover.cjs.entry.js.map +1 -1
  35. package/dist/cjs/nv-row.cjs.entry.js +1 -1
  36. package/dist/cjs/nv-split.cjs.entry.js +1 -1
  37. package/dist/cjs/nv-stack.cjs.entry.js +1 -1
  38. package/dist/cjs/nv-table.cjs.entry.js +1 -1
  39. package/dist/cjs/nv-toggle.cjs.entry.js +2 -2
  40. package/dist/cjs/nv-togglebutton.cjs.entry.js +1 -1
  41. package/dist/cjs/nv-togglebuttongroup.cjs.entry.js +1 -1
  42. package/dist/cjs/nv-tooltip.cjs.entry.js +1 -1
  43. package/dist/collection/components/nv-fielddate/nv-fielddate.js +10 -6
  44. package/dist/collection/components/nv-fielddate/nv-fielddate.js.map +1 -1
  45. package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js +10 -6
  46. package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js.map +1 -1
  47. package/dist/collection/components/nv-fielddaterange/styles/nv-fielddaterange.css +2 -0
  48. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.docs.js +31 -13
  49. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.docs.js.map +1 -1
  50. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js +310 -245
  51. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js.map +1 -1
  52. package/dist/collection/components/nv-fielddropdownitem/nv-fielddropdownitem.js +29 -6
  53. package/dist/collection/components/nv-fielddropdownitem/nv-fielddropdownitem.js.map +1 -1
  54. package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js +1 -1
  55. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js +4 -0
  56. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js.map +1 -1
  57. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js +3 -3
  58. package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js +3 -3
  59. package/dist/collection/components/nv-fieldradio/nv-fieldradio.js +3 -3
  60. package/dist/collection/components/nv-fieldselect/nv-fieldselect.js +5 -5
  61. package/dist/collection/components/nv-fieldslider/nv-fieldslider.js +3 -3
  62. package/dist/collection/components/nv-fieldtext/nv-fieldtext.js +3 -3
  63. package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js +3 -3
  64. package/dist/collection/components/nv-fieldtime/nv-fieldtime.docs.js +6 -0
  65. package/dist/collection/components/nv-fieldtime/nv-fieldtime.docs.js.map +1 -1
  66. package/dist/collection/components/nv-fieldtime/nv-fieldtime.js +332 -497
  67. package/dist/collection/components/nv-fieldtime/nv-fieldtime.js.map +1 -1
  68. package/dist/collection/components/nv-fieldtime/styles/nv-fieldtime.css +1 -0
  69. package/dist/collection/components/nv-fieldtime/utils/format-utils.js +236 -0
  70. package/dist/collection/components/nv-fieldtime/utils/format-utils.js.map +1 -0
  71. package/dist/collection/components/nv-icon/nv-icon.js +1 -1
  72. package/dist/collection/components/nv-icon/nv-icons.js +13 -0
  73. package/dist/collection/components/nv-icon/nv-icons.js.map +1 -1
  74. package/dist/collection/components/nv-iconbutton/nv-iconbutton.js +1 -1
  75. package/dist/collection/components/nv-loader/nv-loader.js +1 -1
  76. package/dist/collection/components/nv-menu/nv-menu.js +3 -3
  77. package/dist/collection/components/nv-menu/nv-menu.js.map +1 -1
  78. package/dist/collection/components/nv-menuitem/nv-menuitem.js +2 -2
  79. package/dist/collection/components/nv-notification/nv-notification.js +1 -1
  80. package/dist/collection/components/nv-notificationcontainer/nv-notificationcontainer.js +1 -1
  81. package/dist/collection/components/nv-popover/nv-popover.js +2 -2
  82. package/dist/collection/components/nv-popover/nv-popover.js.map +1 -1
  83. package/dist/collection/components/nv-row/nv-row.js +1 -1
  84. package/dist/collection/components/nv-split/nv-split.js +1 -1
  85. package/dist/collection/components/nv-stack/nv-stack.js +1 -1
  86. package/dist/collection/components/nv-table/nv-table.js +1 -1
  87. package/dist/collection/components/nv-toggle/nv-toggle.js +2 -2
  88. package/dist/collection/components/nv-togglebutton/nv-togglebutton.js +1 -1
  89. package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.js +1 -1
  90. package/dist/collection/components/nv-tooltip/nv-tooltip.js +1 -1
  91. package/dist/components/index.js +33 -2
  92. package/dist/components/index.js.map +1 -1
  93. package/dist/components/nv-accordion-item.js +1 -1
  94. package/dist/components/nv-accordion.js +4 -4
  95. package/dist/components/nv-alert.js +1 -1
  96. package/dist/components/nv-avatar.js +1 -1
  97. package/dist/components/nv-badge.js +1 -1
  98. package/dist/components/nv-breadcrumb.js +2 -2
  99. package/dist/components/nv-button.js +1 -1
  100. package/dist/components/nv-datagrid.js +2 -2
  101. package/dist/components/nv-dialog.js +4 -4
  102. package/dist/components/nv-dialogfooter.js +1 -1
  103. package/dist/components/nv-fielddate.js +14 -10
  104. package/dist/components/nv-fielddate.js.map +1 -1
  105. package/dist/components/nv-fielddaterange.js +15 -11
  106. package/dist/components/nv-fielddaterange.js.map +1 -1
  107. package/dist/components/nv-fielddropdown.js +207 -220
  108. package/dist/components/nv-fielddropdown.js.map +1 -1
  109. package/dist/components/nv-fielddropdownitem.js +1 -1
  110. package/dist/components/nv-fielddropdownitemcheck.js +1 -1
  111. package/dist/components/nv-fieldmultiselect.js +10 -6
  112. package/dist/components/nv-fieldmultiselect.js.map +1 -1
  113. package/dist/components/nv-fieldnumber.js +1 -1
  114. package/dist/components/nv-fieldpassword.js +6 -6
  115. package/dist/components/nv-fieldradio.js +3 -3
  116. package/dist/components/nv-fieldselect.js +8 -8
  117. package/dist/components/nv-fieldslider.js +7 -7
  118. package/dist/components/nv-fieldtext.js +1 -1
  119. package/dist/components/nv-fieldtextarea.js +3 -3
  120. package/dist/components/nv-fieldtime.js +563 -501
  121. package/dist/components/nv-fieldtime.js.map +1 -1
  122. package/dist/components/nv-icon.js +1 -1
  123. package/dist/components/nv-iconbutton.js +1 -1
  124. package/dist/components/nv-loader.js +1 -1
  125. package/dist/components/nv-menu.js +5 -5
  126. package/dist/components/nv-menu.js.map +1 -1
  127. package/dist/components/nv-menuitem.js +1 -1
  128. package/dist/components/nv-notification.js +2 -2
  129. package/dist/components/nv-notificationcontainer.js +1 -1
  130. package/dist/components/nv-popover.js +1 -1
  131. package/dist/components/nv-row.js +1 -1
  132. package/dist/components/nv-split.js +1 -1
  133. package/dist/components/nv-stack.js +1 -1
  134. package/dist/components/nv-table.js +1 -1
  135. package/dist/components/nv-toggle.js +2 -2
  136. package/dist/components/nv-togglebutton.js +1 -1
  137. package/dist/components/nv-togglebuttongroup.js +1 -1
  138. package/dist/components/nv-tooltip.js +1 -1
  139. package/dist/components/{p-811c9225.js → p-18f50d91.js} +2 -2
  140. package/dist/components/{p-811c9225.js.map → p-18f50d91.js.map} +1 -1
  141. package/dist/components/{p-98429fd7.js → p-222136c2.js} +2 -2
  142. package/dist/components/{p-98429fd7.js.map → p-222136c2.js.map} +1 -1
  143. package/dist/components/{p-ec31af69.js → p-2ac6f42d.js} +3 -3
  144. package/dist/components/{p-ec31af69.js.map → p-2ac6f42d.js.map} +1 -1
  145. package/dist/components/{p-47a33f6b.js → p-334e19d3.js} +4 -4
  146. package/dist/components/{p-47a33f6b.js.map → p-334e19d3.js.map} +1 -1
  147. package/dist/components/{p-766a3f49.js → p-45a3cf85.js} +11 -7
  148. package/dist/components/p-45a3cf85.js.map +1 -0
  149. package/dist/components/{p-63595ea1.js → p-4799b6c3.js} +3 -3
  150. package/dist/components/p-4799b6c3.js.map +1 -0
  151. package/dist/components/{p-6e67bfc0.js → p-49205084.js} +5 -5
  152. package/dist/components/{p-6e67bfc0.js.map → p-49205084.js.map} +1 -1
  153. package/dist/components/{p-7684ad27.js → p-5a5db065.js} +4 -4
  154. package/dist/components/{p-7684ad27.js.map → p-5a5db065.js.map} +1 -1
  155. package/dist/components/{p-e43a36c4.js → p-60083982.js} +4 -4
  156. package/dist/components/{p-e43a36c4.js.map → p-60083982.js.map} +1 -1
  157. package/dist/components/{p-6f2b257e.js → p-81d915ef.js} +3 -3
  158. package/dist/components/{p-6f2b257e.js.map → p-81d915ef.js.map} +1 -1
  159. package/dist/components/p-946a047c.js +88 -0
  160. package/dist/components/p-946a047c.js.map +1 -0
  161. package/dist/components/{p-715e5235.js → p-a6c29711.js} +2 -2
  162. package/dist/components/{p-715e5235.js.map → p-a6c29711.js.map} +1 -1
  163. package/dist/components/{p-147cefeb.js → p-e0eb748c.js} +7 -7
  164. package/dist/components/{p-147cefeb.js.map → p-e0eb748c.js.map} +1 -1
  165. package/dist/components/{p-9e7468e3.js → p-e1b2eba2.js} +2 -2
  166. package/dist/components/{p-9e7468e3.js.map → p-e1b2eba2.js.map} +1 -1
  167. package/dist/esm/index.js +33 -2
  168. package/dist/esm/index.js.map +1 -1
  169. package/dist/esm/loader.js +1 -1
  170. package/dist/esm/native.js +1 -1
  171. package/dist/esm/nv-badge_2.entry.js +1 -1
  172. package/dist/esm/nv-fielddate.entry.js +10 -6
  173. package/dist/esm/nv-fielddate.entry.js.map +1 -1
  174. package/dist/esm/nv-fielddaterange.entry.js +11 -7
  175. package/dist/esm/nv-fielddaterange.entry.js.map +1 -1
  176. package/dist/esm/nv-fielddropdown.entry.js +193 -209
  177. package/dist/esm/nv-fielddropdown.entry.js.map +1 -1
  178. package/dist/esm/nv-fielddropdownitem.entry.js +7 -4
  179. package/dist/esm/nv-fielddropdownitem.entry.js.map +1 -1
  180. package/dist/esm/nv-fieldmultiselect.entry.js +4 -0
  181. package/dist/esm/nv-fieldmultiselect.entry.js.map +1 -1
  182. package/dist/esm/nv-fieldnumber.entry.js +3 -3
  183. package/dist/esm/nv-fieldpassword.entry.js +3 -3
  184. package/dist/esm/nv-fieldradio.entry.js +3 -3
  185. package/dist/esm/nv-fieldselect.entry.js +5 -5
  186. package/dist/esm/nv-fieldslider.entry.js +3 -3
  187. package/dist/esm/nv-fieldtext.entry.js +3 -3
  188. package/dist/esm/nv-fieldtextarea.entry.js +3 -3
  189. package/dist/esm/nv-fieldtime.entry.js +558 -497
  190. package/dist/esm/nv-fieldtime.entry.js.map +1 -1
  191. package/dist/esm/nv-icon.entry.js +2 -2
  192. package/dist/esm/nv-icon.entry.js.map +1 -1
  193. package/dist/esm/nv-iconbutton_2.entry.js +2 -2
  194. package/dist/esm/nv-menu.entry.js +2 -2
  195. package/dist/esm/nv-menu.entry.js.map +1 -1
  196. package/dist/esm/nv-menuitem.entry.js +1 -1
  197. package/dist/esm/nv-notification.entry.js +1 -1
  198. package/dist/esm/nv-notificationcontainer.entry.js +1 -1
  199. package/dist/esm/nv-popover.entry.js +2 -2
  200. package/dist/esm/nv-popover.entry.js.map +1 -1
  201. package/dist/esm/nv-row.entry.js +1 -1
  202. package/dist/esm/nv-split.entry.js +1 -1
  203. package/dist/esm/nv-stack.entry.js +1 -1
  204. package/dist/esm/nv-table.entry.js +1 -1
  205. package/dist/esm/nv-toggle.entry.js +2 -2
  206. package/dist/esm/nv-togglebutton.entry.js +1 -1
  207. package/dist/esm/nv-togglebuttongroup.entry.js +1 -1
  208. package/dist/esm/nv-tooltip.entry.js +1 -1
  209. package/dist/native/index.esm.js +1 -1
  210. package/dist/native/index.esm.js.map +1 -1
  211. package/dist/native/native.esm.js +1 -1
  212. package/dist/native/native.esm.js.map +1 -1
  213. package/dist/native/{p-acada158.entry.js → p-0177409b.entry.js} +2 -2
  214. package/dist/native/{p-91fab6c2.entry.js → p-075d231e.entry.js} +2 -2
  215. package/dist/native/{p-d878e90a.entry.js → p-144d0f8a.entry.js} +2 -2
  216. package/dist/native/p-144d0f8a.entry.js.map +1 -0
  217. package/dist/native/{p-b4c15f25.entry.js → p-17666092.entry.js} +2 -2
  218. package/dist/native/{p-107e80c6.entry.js → p-218135b1.entry.js} +2 -2
  219. package/dist/native/p-218135b1.entry.js.map +1 -0
  220. package/dist/native/p-2a7f80f4.entry.js +2 -0
  221. package/dist/native/p-2a7f80f4.entry.js.map +1 -0
  222. package/dist/native/{p-14e622e1.entry.js → p-445221dc.entry.js} +2 -2
  223. package/dist/native/{p-52d2c0ae.entry.js → p-44a78545.entry.js} +2 -2
  224. package/dist/native/p-57420a2f.entry.js +2 -0
  225. package/dist/native/{p-2364aefa.entry.js → p-587d94f3.entry.js} +2 -2
  226. package/dist/native/{p-95184ea2.entry.js → p-6a418ec4.entry.js} +2 -2
  227. package/dist/native/{p-5039ceb8.entry.js → p-859bf9ad.entry.js} +2 -2
  228. package/dist/native/{p-5039ceb8.entry.js.map → p-859bf9ad.entry.js.map} +1 -1
  229. package/dist/native/{p-9d7e099f.entry.js → p-9950e075.entry.js} +2 -2
  230. package/dist/native/{p-2dfd786f.entry.js → p-9c432751.entry.js} +2 -2
  231. package/dist/native/p-a026654f.entry.js +2 -0
  232. package/dist/native/p-a026654f.entry.js.map +1 -0
  233. package/dist/native/{p-638967bf.entry.js → p-a2f58133.entry.js} +2 -2
  234. package/dist/native/{p-d94bf052.entry.js → p-b02c896a.entry.js} +2 -2
  235. package/dist/native/{p-9613087c.entry.js → p-b4382c94.entry.js} +2 -2
  236. package/dist/native/{p-835abdb9.entry.js → p-b626ef47.entry.js} +2 -2
  237. package/dist/native/{p-23ee0384.entry.js → p-c0de4bb0.entry.js} +2 -2
  238. package/dist/native/{p-278613a3.entry.js → p-c9fea0df.entry.js} +2 -2
  239. package/dist/native/{p-278613a3.entry.js.map → p-c9fea0df.entry.js.map} +1 -1
  240. package/dist/native/{p-ce97ce24.entry.js → p-d62869ff.entry.js} +2 -2
  241. package/dist/native/p-d63689da.entry.js +2 -0
  242. package/dist/native/p-d63689da.entry.js.map +1 -0
  243. package/dist/native/p-d8f3cf92.entry.js +2 -0
  244. package/dist/native/p-d8f3cf92.entry.js.map +1 -0
  245. package/dist/native/{p-cb0293ec.entry.js → p-dfb6b65e.entry.js} +2 -2
  246. package/dist/native/{p-230af58a.entry.js → p-e6f24210.entry.js} +2 -2
  247. package/dist/native/p-e6f24210.entry.js.map +1 -0
  248. package/dist/native/{p-647a0765.entry.js → p-eb74feb7.entry.js} +2 -2
  249. package/dist/native/{p-6d427897.entry.js → p-fa3e588e.entry.js} +2 -2
  250. package/dist/native/{p-112d096c.entry.js → p-fffbd3c1.entry.js} +2 -2
  251. package/dist/types/components/nv-fielddropdown/nv-fielddropdown.d.ts +54 -35
  252. package/dist/types/components/nv-fielddropdownitem/nv-fielddropdownitem.d.ts +7 -0
  253. package/dist/types/components/nv-fieldtime/nv-fieldtime.d.ts +50 -2
  254. package/dist/types/components/nv-fieldtime/utils/format-utils.d.ts +63 -0
  255. package/dist/types/components/nv-icon/nv-icons.d.ts +1 -1
  256. package/dist/types/components.d.ts +79 -16
  257. package/dist/vscode-data.json +52 -5
  258. package/hydrate/index.js +843 -791
  259. package/hydrate/index.mjs +843 -791
  260. package/package.json +1 -1
  261. package/dist/cjs/string.utils-9c581350.js +0 -25
  262. package/dist/cjs/string.utils-9c581350.js.map +0 -1
  263. package/dist/components/p-63595ea1.js.map +0 -1
  264. package/dist/components/p-766a3f49.js.map +0 -1
  265. package/dist/components/p-a5c8eee9.js +0 -22
  266. package/dist/components/p-a5c8eee9.js.map +0 -1
  267. package/dist/components/p-be6e2884.js +0 -88
  268. package/dist/components/p-be6e2884.js.map +0 -1
  269. package/dist/esm/string.utils-16aed4a7.js +0 -22
  270. package/dist/esm/string.utils-16aed4a7.js.map +0 -1
  271. package/dist/native/p-107e80c6.entry.js.map +0 -1
  272. package/dist/native/p-230af58a.entry.js.map +0 -1
  273. package/dist/native/p-74572fce.entry.js +0 -2
  274. package/dist/native/p-74572fce.entry.js.map +0 -1
  275. package/dist/native/p-a5c8eee9.js +0 -2
  276. package/dist/native/p-a5c8eee9.js.map +0 -1
  277. package/dist/native/p-bcf41cd0.entry.js +0 -2
  278. package/dist/native/p-d7f444fb.entry.js +0 -2
  279. package/dist/native/p-d7f444fb.entry.js.map +0 -1
  280. package/dist/native/p-d878e90a.entry.js.map +0 -1
  281. package/dist/native/p-ddc41f1f.entry.js +0 -2
  282. package/dist/native/p-ddc41f1f.entry.js.map +0 -1
  283. package/dist/native/p-f30e0be6.entry.js +0 -2
  284. package/dist/native/p-f30e0be6.entry.js.map +0 -1
  285. /package/dist/native/{p-acada158.entry.js.map → p-0177409b.entry.js.map} +0 -0
  286. /package/dist/native/{p-91fab6c2.entry.js.map → p-075d231e.entry.js.map} +0 -0
  287. /package/dist/native/{p-b4c15f25.entry.js.map → p-17666092.entry.js.map} +0 -0
  288. /package/dist/native/{p-14e622e1.entry.js.map → p-445221dc.entry.js.map} +0 -0
  289. /package/dist/native/{p-52d2c0ae.entry.js.map → p-44a78545.entry.js.map} +0 -0
  290. /package/dist/native/{p-bcf41cd0.entry.js.map → p-57420a2f.entry.js.map} +0 -0
  291. /package/dist/native/{p-2364aefa.entry.js.map → p-587d94f3.entry.js.map} +0 -0
  292. /package/dist/native/{p-95184ea2.entry.js.map → p-6a418ec4.entry.js.map} +0 -0
  293. /package/dist/native/{p-9d7e099f.entry.js.map → p-9950e075.entry.js.map} +0 -0
  294. /package/dist/native/{p-2dfd786f.entry.js.map → p-9c432751.entry.js.map} +0 -0
  295. /package/dist/native/{p-638967bf.entry.js.map → p-a2f58133.entry.js.map} +0 -0
  296. /package/dist/native/{p-d94bf052.entry.js.map → p-b02c896a.entry.js.map} +0 -0
  297. /package/dist/native/{p-9613087c.entry.js.map → p-b4382c94.entry.js.map} +0 -0
  298. /package/dist/native/{p-835abdb9.entry.js.map → p-b626ef47.entry.js.map} +0 -0
  299. /package/dist/native/{p-23ee0384.entry.js.map → p-c0de4bb0.entry.js.map} +0 -0
  300. /package/dist/native/{p-ce97ce24.entry.js.map → p-d62869ff.entry.js.map} +0 -0
  301. /package/dist/native/{p-cb0293ec.entry.js.map → p-dfb6b65e.entry.js.map} +0 -0
  302. /package/dist/native/{p-647a0765.entry.js.map → p-eb74feb7.entry.js.map} +0 -0
  303. /package/dist/native/{p-6d427897.entry.js.map → p-fa3e588e.entry.js.map} +0 -0
  304. /package/dist/native/{p-112d096c.entry.js.map → p-fffbd3c1.entry.js.map} +0 -0
@@ -1,13 +1,247 @@
1
- import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-5829b9f7.js';
2
- import { a as startsWithIgnoreCase } from './p-a5c8eee9.js';
1
+ import { p as proxyCustomElement, H, c as createEvent, f as forceUpdate, h, d as Host } from './p-5829b9f7.js';
3
2
  import { g as TimeType } from './p-51602221.js';
4
- import { d as defineCustomElement$5 } from './p-be6e2884.js';
5
- import { d as defineCustomElement$4 } from './p-7684ad27.js';
6
- import { d as defineCustomElement$3 } from './p-98429fd7.js';
7
- import { d as defineCustomElement$2 } from './p-63595ea1.js';
3
+ import { d as defineCustomElement$5 } from './p-946a047c.js';
4
+ import { d as defineCustomElement$4 } from './p-5a5db065.js';
5
+ import { d as defineCustomElement$3 } from './p-222136c2.js';
6
+ import { d as defineCustomElement$2 } from './p-4799b6c3.js';
8
7
  import { v as v4 } from './p-f5ff676c.js';
9
8
 
10
- const nvFieldtimeCss = "nv-fieldslider .slider-container .track-container:has(.thumb:hover) .track-range{background:var(--components-slider-track-filled-hover)}nv-fieldslider .slider-container .track-container:has(.thumb:hover) .thumb{border-color:var(--components-slider-track-filled-hover)}nv-fieldslider .slider-container .track-container:has(.thumb:focus) .track-range{background:var(--components-slider-track-filled-focus)}nv-fieldslider .slider-container .track-container:has(.thumb:focus) .thumb{border-color:var(--components-slider-track-filled-focus)}nv-fieldslider[error] .slider-container .track-container .track .track-range{background:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb{border-color:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb:hover{border-color:var(--components-slider-track-filled-error);outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);outline-offset:calc(var(--focus-outline-offset) * 1);background-color:var(--components-slider-handler-background-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb:focus{border-color:var(--components-slider-track-filled-error);outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);outline-offset:calc(var(--focus-outline-offset) * 1);background-color:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .track-range{background:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .thumb{border-color:var(--components-slider-track-filled-error)}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;max-width:480px}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-in-field)}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:var(--font-weight-high-emphasis)}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:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-label-font-size);font-style:normal;font-weight:var(--font-weight-medium-emphasis);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;justify-content:center;align-items:center;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;padding-left:var(--form-field-padding-x)}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);padding:var(--form-field-padding-y) var(--form-field-padding-x);font-size:var(--form-field-font-size);font-style:normal;font-weight:var(--font-weight-medium-emphasis);line-height:var(--form-field-line-height);width:100%;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:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-field-font-size);font-style:normal;font-weight:var(--font-weight-low-emphasis);line-height:var(--form-field-line-height)}nv-fieldtime .input-container input.time-input[type=password]::-ms-clear,nv-fieldtime .input-container input.time-input[type=password]::-ms-reveal{display:none;width:0;height:0}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>nv-iconbutton{border:0px;border-radius:0px;margin-left:auto}nv-fieldtime .input-container>nv-iconbutton:focus-visible{border-radius:var(--button-md-border-radius);outline-offset:-3px}nv-fieldtime .input-container>nv-iconbutton:last-of-type{border-top-right-radius:var(--form-field-radius);border-bottom-right-radius:var(--form-field-radius)}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{display:flex;align-items:center;align-self:stretch;gap:var(--spacing-1);color:var(--components-form-text-description-default);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height)}nv-fieldtime .error-description{display:flex;align-items:center;align-self:stretch;gap:var(--spacing-1);color:var(--components-form-text-description-default);font-family:var(--font-family-default), var(--font-family-fallback), 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}nv-fieldtime .time-dropdown{width:100%}nv-fieldtime .time-dropdown .time-columns{display:flex;justify-content:flex-start;align-items:center}nv-fieldtime .time-dropdown .time-columns .time-column{flex:1;text-align:center;max-height:200px;overflow-y:auto;scroll-behavior:smooth;scrollbar-gutter:stable both-edges;scrollbar-gutter:auto}nv-fieldtime .time-dropdown .time-columns .time-column::-webkit-scrollbar{width:6px;height:6px}nv-fieldtime .time-dropdown .time-columns .time-column::-webkit-scrollbar-track{background-color:var(--color-level-10-background);border-radius:9999px}nv-fieldtime .time-dropdown .time-columns .time-column::-webkit-scrollbar-thumb{background-color:var(--color-gray-200);border-radius:9999px}nv-fieldtime .time-dropdown .time-columns .time-column:last-child{border-right:none}nv-fieldtime .time-dropdown .time-columns .time-column .time-option{padding:var(--calendar-padding);text-align:center;cursor:pointer;transition:background-color 0.2s;border-radius:var(--list-dropdown-item-radius);color:var(--components-calendar-cell-text);font-size:var(--font-size-sm);display:flex;justify-content:center;align-items:center}nv-fieldtime .time-dropdown .time-columns .time-column .time-option:hover{background-color:var(--components-calendar-cell-background-hover);color:var(--components-calendar-cell-text-hover)}nv-fieldtime .time-dropdown .time-columns .time-column .time-option:focus,nv-fieldtime .time-dropdown .time-columns .time-column .time-option:focus-within{background-color:var(--components-calendar-cell-background-hover);color:var(--components-calendar-cell-text-hover)}nv-fieldtime .time-dropdown .time-columns .time-column .time-option.selected{background-color:var(--components-calendar-cell-background-selected);color:var(--components-calendar-cell-text-selected)}nv-fieldtime .time-dropdown .time-columns .time-column .time-option.highlighted{background-color:var(--components-calendar-cell-background-hover);color:var(--components-menu-contextual-item-content-hover)}";
9
+ /**
10
+ * Format configurations for all supported time formats
11
+ */
12
+ const FORMAT_CONFIGS = {
13
+ 'HH': {
14
+ pattern: /^([0-1]?[0-9]|2[0-3])$/,
15
+ parts: [TimeType.Hours],
16
+ defaultValue: '00',
17
+ maxLength: 2,
18
+ },
19
+ 'HH:mm': {
20
+ pattern: /^([0-1]?[0-9]|2[0-3]):([0-5]?[0-9])$/,
21
+ parts: [TimeType.Hours, TimeType.Minutes],
22
+ defaultValue: '00:00',
23
+ maxLength: 5,
24
+ },
25
+ 'HH:mm:ss': {
26
+ pattern: /^([0-1]?[0-9]|2[0-3]):([0-5]?[0-9]):([0-5]?[0-9])$/,
27
+ parts: [TimeType.Hours, TimeType.Minutes, TimeType.Seconds],
28
+ defaultValue: '00:00:00',
29
+ maxLength: 8,
30
+ },
31
+ 'hh': {
32
+ pattern: /^(0?[1-9]|1[0-2])$/,
33
+ parts: [TimeType.Hours],
34
+ defaultValue: '01',
35
+ maxLength: 2,
36
+ },
37
+ 'hh:mm': {
38
+ pattern: /^(0?[1-9]|1[0-2]):([0-5]?[0-9])$/,
39
+ parts: [TimeType.Hours, TimeType.Minutes],
40
+ defaultValue: '01:00',
41
+ maxLength: 5,
42
+ },
43
+ 'hh:mm:ss': {
44
+ pattern: /^(0?[1-9]|1[0-2]):([0-5]?[0-9]):([0-5]?[0-9])$/,
45
+ parts: [TimeType.Hours, TimeType.Minutes, TimeType.Seconds],
46
+ defaultValue: '01:00:00',
47
+ maxLength: 8,
48
+ },
49
+ };
50
+ /**
51
+ * Returns the visible time types for a given format
52
+ * @param {string} format - The time format string
53
+ * @returns {TimeType[]} Array of TimeType values that should be visible
54
+ */
55
+ function getVisibleTimeTypes(format) {
56
+ const config = FORMAT_CONFIGS[format];
57
+ if (!config) {
58
+ // Fallback for unknown formats
59
+ return [TimeType.Hours, TimeType.Minutes, TimeType.Seconds];
60
+ }
61
+ return config.parts;
62
+ }
63
+ /**
64
+ * Validates if a given value string matches the expected format pattern
65
+ * @param {string} value - The time value string to validate
66
+ * @param {string} format - The expected time format
67
+ * @returns {boolean} True if the value matches the format, false otherwise
68
+ */
69
+ function isValidFormatValue(value, format) {
70
+ if (!value || !format) {
71
+ return false;
72
+ }
73
+ const config = FORMAT_CONFIGS[format];
74
+ if (!config) {
75
+ return false;
76
+ }
77
+ return config.pattern.test(value);
78
+ }
79
+ /**
80
+ * Parses a time value string according to the specified format
81
+ * Handles both full and partial time strings with backward compatibility
82
+ * @param {string} value - The time value string to parse
83
+ * @param {string} format - The target time format
84
+ * @returns {TimeComponents} TimeComponents object with parsed hours, minutes, and seconds
85
+ */
86
+ function parseValueByFormat(value, format) {
87
+ const config = FORMAT_CONFIGS[format];
88
+ const defaultComponents = {
89
+ hours: format.startsWith('hh') ? '01' : '00',
90
+ minutes: '00',
91
+ seconds: '00',
92
+ };
93
+ if (!value || !config) {
94
+ return defaultComponents;
95
+ }
96
+ // Clean the input value - remove non-numeric characters except colons
97
+ const cleanValue = value.replace(/[^0-9:]/g, '');
98
+ // Try to match the exact format first
99
+ const exactMatch = cleanValue.match(config.pattern);
100
+ if (exactMatch) {
101
+ return extractComponentsFromMatch(exactMatch, format);
102
+ }
103
+ // Handle backward compatibility - parse full format values when format is shorter
104
+ const fullFormatPattern = /^([0-1]?[0-9]|2[0-3]):([0-5]?[0-9]):([0-5]?[0-9])$/;
105
+ const fullMatch = cleanValue.match(fullFormatPattern);
106
+ if (fullMatch) {
107
+ const fullComponents = extractComponentsFromMatch(fullMatch, 'HH:mm:ss');
108
+ return extractRelevantComponents(fullComponents, format);
109
+ }
110
+ // Handle partial format values - try to parse what we can
111
+ const parts = cleanValue.split(':');
112
+ const result = Object.assign({}, defaultComponents);
113
+ if (parts.length >= 1 && parts[0]) {
114
+ const hours = parseInt(parts[0], 10);
115
+ if (!isNaN(hours)) {
116
+ if (format.startsWith('hh')) {
117
+ // 12-hour format validation
118
+ if (hours >= 1 && hours <= 12) {
119
+ result.hours = hours.toString().padStart(2, '0');
120
+ }
121
+ else {
122
+ // Invalid hour for 12-hour format, keep default
123
+ result.hours = defaultComponents.hours;
124
+ }
125
+ }
126
+ else {
127
+ // 24-hour format validation
128
+ if (hours >= 0 && hours <= 23) {
129
+ result.hours = hours.toString().padStart(2, '0');
130
+ }
131
+ else {
132
+ // Invalid hour for 24-hour format, keep default
133
+ result.hours = defaultComponents.hours;
134
+ }
135
+ }
136
+ }
137
+ }
138
+ if (parts.length >= 2 &&
139
+ parts[1] &&
140
+ config.parts.includes(TimeType.Minutes)) {
141
+ const minutes = parseInt(parts[1], 10);
142
+ if (!isNaN(minutes) && minutes >= 0 && minutes <= 59) {
143
+ result.minutes = minutes.toString().padStart(2, '0');
144
+ }
145
+ }
146
+ if (parts.length >= 3 &&
147
+ parts[2] &&
148
+ config.parts.includes(TimeType.Seconds)) {
149
+ const seconds = parseInt(parts[2], 10);
150
+ if (!isNaN(seconds) && seconds >= 0 && seconds <= 59) {
151
+ result.seconds = seconds.toString().padStart(2, '0');
152
+ }
153
+ }
154
+ return result;
155
+ }
156
+ /**
157
+ * Extracts time components from a regex match result
158
+ * @param {RegExpMatchArray} match - The regex match result
159
+ * @param {string} format - The format that was matched
160
+ * @returns {TimeComponents} TimeComponents object
161
+ */
162
+ function extractComponentsFromMatch(match, format) {
163
+ const result = {
164
+ hours: format.startsWith('hh') ? '01' : '00',
165
+ minutes: '00',
166
+ seconds: '00',
167
+ };
168
+ if (match[1]) {
169
+ result.hours = parseInt(match[1], 10).toString().padStart(2, '0');
170
+ }
171
+ if (match[2]) {
172
+ result.minutes = parseInt(match[2], 10).toString().padStart(2, '0');
173
+ }
174
+ if (match[3]) {
175
+ result.seconds = parseInt(match[3], 10).toString().padStart(2, '0');
176
+ }
177
+ return result;
178
+ }
179
+ /**
180
+ * Extracts only the relevant components based on the target format
181
+ * @param {TimeComponents} components - Full time components
182
+ * @param {string} format - Target format to extract components for
183
+ * @returns {TimeComponents} TimeComponents with only relevant parts
184
+ */
185
+ function extractRelevantComponents(components, format) {
186
+ const config = FORMAT_CONFIGS[format];
187
+ const result = {
188
+ hours: format.startsWith('hh') ? '01' : '00',
189
+ minutes: '00',
190
+ seconds: '00',
191
+ };
192
+ if (config.parts.includes(TimeType.Hours)) {
193
+ // Validate hours for the target format
194
+ const hours = parseInt(components.hours, 10);
195
+ if (format.startsWith('hh')) {
196
+ // 12-hour format validation
197
+ if (hours >= 1 && hours <= 12) {
198
+ result.hours = components.hours;
199
+ }
200
+ // If invalid, keep the default '01'
201
+ }
202
+ else {
203
+ // 24-hour format validation
204
+ if (hours >= 0 && hours <= 23) {
205
+ result.hours = components.hours;
206
+ }
207
+ // If invalid, keep the default '00'
208
+ }
209
+ }
210
+ if (config.parts.includes(TimeType.Minutes)) {
211
+ result.minutes = components.minutes;
212
+ }
213
+ if (config.parts.includes(TimeType.Seconds)) {
214
+ result.seconds = components.seconds;
215
+ }
216
+ return result;
217
+ }
218
+ /**
219
+ * Reconstructs a time string from components according to the specified format
220
+ * @param {TimeComponents} components - Time components to reconstruct
221
+ * @param {string} format - Target format for reconstruction
222
+ * @returns {string} Formatted time string
223
+ */
224
+ function reconstructTimeByFormat(components, format) {
225
+ const config = FORMAT_CONFIGS[format];
226
+ if (!config) {
227
+ return `${components.hours}:${components.minutes}:${components.seconds}`;
228
+ }
229
+ switch (format) {
230
+ case 'HH':
231
+ case 'hh':
232
+ return components.hours;
233
+ case 'HH:mm':
234
+ case 'hh:mm':
235
+ return `${components.hours}:${components.minutes}`;
236
+ case 'HH:mm:ss':
237
+ case 'hh:mm:ss':
238
+ return `${components.hours}:${components.minutes}:${components.seconds}`;
239
+ default:
240
+ return `${components.hours}:${components.minutes}:${components.seconds}`;
241
+ }
242
+ }
243
+
244
+ const nvFieldtimeCss = "nv-fieldslider .slider-container .track-container:has(.thumb:hover) .track-range{background:var(--components-slider-track-filled-hover)}nv-fieldslider .slider-container .track-container:has(.thumb:hover) .thumb{border-color:var(--components-slider-track-filled-hover)}nv-fieldslider .slider-container .track-container:has(.thumb:focus) .track-range{background:var(--components-slider-track-filled-focus)}nv-fieldslider .slider-container .track-container:has(.thumb:focus) .thumb{border-color:var(--components-slider-track-filled-focus)}nv-fieldslider[error] .slider-container .track-container .track .track-range{background:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb{border-color:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb:hover{border-color:var(--components-slider-track-filled-error);outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);outline-offset:calc(var(--focus-outline-offset) * 1);background-color:var(--components-slider-handler-background-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb:focus{border-color:var(--components-slider-track-filled-error);outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);outline-offset:calc(var(--focus-outline-offset) * 1);background-color:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .track-range{background:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .thumb{border-color:var(--components-slider-track-filled-error)}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;max-width:480px}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-in-field)}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:var(--font-weight-high-emphasis)}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:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-label-font-size);font-style:normal;font-weight:var(--font-weight-medium-emphasis);line-height:var(--form-label-line-height)}nv-fieldtime nv-popover{width:100%;display:block;z-index:9999}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;justify-content:center;align-items:center;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;padding-left:var(--form-field-padding-x)}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);padding:var(--form-field-padding-y) var(--form-field-padding-x);font-size:var(--form-field-font-size);font-style:normal;font-weight:var(--font-weight-medium-emphasis);line-height:var(--form-field-line-height);width:100%;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:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-field-font-size);font-style:normal;font-weight:var(--font-weight-low-emphasis);line-height:var(--form-field-line-height)}nv-fieldtime .input-container input.time-input[type=password]::-ms-clear,nv-fieldtime .input-container input.time-input[type=password]::-ms-reveal{display:none;width:0;height:0}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>nv-iconbutton{border:0px;border-radius:0px;margin-left:auto}nv-fieldtime .input-container>nv-iconbutton:focus-visible{border-radius:var(--button-md-border-radius);outline-offset:-3px}nv-fieldtime .input-container>nv-iconbutton:last-of-type{border-top-right-radius:var(--form-field-radius);border-bottom-right-radius:var(--form-field-radius)}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{display:flex;align-items:center;align-self:stretch;gap:var(--spacing-1);color:var(--components-form-text-description-default);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height)}nv-fieldtime .error-description{display:flex;align-items:center;align-self:stretch;gap:var(--spacing-1);color:var(--components-form-text-description-default);font-family:var(--font-family-default), var(--font-family-fallback), 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}nv-fieldtime .time-dropdown{width:100%}nv-fieldtime .time-dropdown .time-columns{display:flex;justify-content:flex-start;align-items:center}nv-fieldtime .time-dropdown .time-columns .time-column{flex:1;text-align:center;max-height:200px;overflow-y:auto;scroll-behavior:smooth;scrollbar-gutter:stable both-edges;scrollbar-gutter:auto}nv-fieldtime .time-dropdown .time-columns .time-column::-webkit-scrollbar{width:6px;height:6px}nv-fieldtime .time-dropdown .time-columns .time-column::-webkit-scrollbar-track{background-color:var(--color-level-10-background);border-radius:9999px}nv-fieldtime .time-dropdown .time-columns .time-column::-webkit-scrollbar-thumb{background-color:var(--color-gray-200);border-radius:9999px}nv-fieldtime .time-dropdown .time-columns .time-column:last-child{border-right:none}nv-fieldtime .time-dropdown .time-columns .time-column .time-option{padding:var(--calendar-padding);text-align:center;cursor:pointer;transition:background-color 0.2s;border-radius:var(--list-dropdown-item-radius);color:var(--components-calendar-cell-text);font-size:var(--font-size-sm);display:flex;justify-content:center;align-items:center}nv-fieldtime .time-dropdown .time-columns .time-column .time-option:hover{background-color:var(--components-calendar-cell-background-hover);color:var(--components-calendar-cell-text-hover)}nv-fieldtime .time-dropdown .time-columns .time-column .time-option:focus,nv-fieldtime .time-dropdown .time-columns .time-column .time-option:focus-within{background-color:var(--components-calendar-cell-background-hover);color:var(--components-calendar-cell-text-hover)}nv-fieldtime .time-dropdown .time-columns .time-column .time-option.selected{background-color:var(--components-calendar-cell-background-selected);color:var(--components-calendar-cell-text-selected)}nv-fieldtime .time-dropdown .time-columns .time-column .time-option.highlighted{background-color:var(--components-calendar-cell-background-hover);color:var(--components-menu-contextual-item-content-hover)}";
11
245
  const NvFieldtimeStyle0 = nvFieldtimeCss;
12
246
 
13
247
  const NvFieldtime$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldtime extends H {
@@ -68,6 +302,10 @@ const NvFieldtime$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldtime extends
68
302
  * - hh: 12-hour format (01-12)
69
303
  * - hh:mm: 12-hour format with minutes (01:00-12:59)
70
304
  * - hh:mm:ss: 12-hour format with minutes and seconds (01:00:00-12:59:59)
305
+ *
306
+ * The component automatically shows only the relevant input fields based on the selected format.
307
+ * When the format changes dynamically, the component re-parses the current value and updates
308
+ * the visible fields accordingly.
71
309
  */
72
310
  this.format = 'HH:mm:ss';
73
311
  /**
@@ -96,7 +334,7 @@ const NvFieldtime$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldtime extends
96
334
  this.open = event.detail;
97
335
  }
98
336
  handleKeyDown(event) {
99
- var _a, _b, _c, _d;
337
+ var _a, _b;
100
338
  if (!this.open) {
101
339
  if (event.key === 'ArrowDown') {
102
340
  this.open = true;
@@ -131,27 +369,42 @@ const NvFieldtime$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldtime extends
131
369
  else if (event.key === 'Enter' && currentIndex >= 0) {
132
370
  event.preventDefault();
133
371
  items[currentIndex].click();
134
- if (this.typeFocused === TimeType.Hours) {
135
- (_a = this.inputElements[TimeType.Minutes]) === null || _a === void 0 ? void 0 : _a.focus();
136
- (_b = this.inputElements[TimeType.Minutes]) === null || _b === void 0 ? void 0 : _b.select();
137
- }
138
- else if (this.typeFocused === TimeType.Minutes ||
139
- this.typeFocused === TimeType.Seconds) {
140
- (_c = this.inputElements[TimeType.Seconds]) === null || _c === void 0 ? void 0 : _c.focus();
141
- (_d = this.inputElements[TimeType.Seconds]) === null || _d === void 0 ? void 0 : _d.select();
372
+ // Navigate to the next visible field
373
+ const visibleTypes = getVisibleTimeTypes(this.format);
374
+ const currentTypeIndex = visibleTypes.indexOf(this.typeFocused);
375
+ const nextTypeIndex = currentTypeIndex + 1;
376
+ if (nextTypeIndex < visibleTypes.length) {
377
+ const nextType = visibleTypes[nextTypeIndex];
378
+ (_a = this.inputElements[nextType]) === null || _a === void 0 ? void 0 : _a.focus();
379
+ (_b = this.inputElements[nextType]) === null || _b === void 0 ? void 0 : _b.select();
142
380
  }
143
381
  }
144
382
  else if (event.key === 'Escape') {
145
383
  event.preventDefault();
146
- if (this.inputElements[TimeType.Hours]) {
147
- this.inputElements[TimeType.Hours].blur();
384
+ const visibleTypes = getVisibleTimeTypes(this.format);
385
+ const firstVisibleType = visibleTypes[0];
386
+ if (firstVisibleType && this.inputElements[firstVisibleType]) {
387
+ this.inputElements[firstVisibleType].blur();
148
388
  }
389
+ this.open = false;
149
390
  }
150
391
  }
151
392
  //#endregion LISTENERS
152
393
  /****************************************************************************/
153
394
  //#region WATCHERS
154
395
  handleValueChange(newValue) {
396
+ // Parse the new value and ensure it's in the correct format
397
+ if (newValue) {
398
+ const components = parseValueByFormat(newValue, this.format);
399
+ const formattedValue = reconstructTimeByFormat(components, this.format);
400
+ // Only emit if the formatted value is different from what we received
401
+ // This prevents infinite loops while ensuring format consistency
402
+ if (formattedValue !== newValue) {
403
+ this.value = formattedValue;
404
+ return; // The watcher will be called again with the formatted value
405
+ }
406
+ }
407
+ // Emit the value in the correct format
155
408
  this.valueChanged.emit(newValue);
156
409
  }
157
410
  handleOpenChange(newOpen) {
@@ -166,12 +419,36 @@ const NvFieldtime$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldtime extends
166
419
  this.updateColumnHighlight(secondsSelector, this.seconds);
167
420
  }
168
421
  }
422
+ handleFormatChange(newFormat, oldFormat) {
423
+ if (newFormat === oldFormat) {
424
+ return; // No change, nothing to do
425
+ }
426
+ // Re-parse the current value with the new format
427
+ const currentValue = this.value || this.reconstructTime();
428
+ // Parse the current value using the old format to get the time components
429
+ const components = parseValueByFormat(currentValue, oldFormat || 'HH:mm:ss');
430
+ // Update the component state with the parsed components
431
+ this.hours = components.hours;
432
+ this.minutes = components.minutes;
433
+ this.seconds = components.seconds;
434
+ // Reconstruct the time value in the new format
435
+ const newValue = reconstructTimeByFormat(components, newFormat);
436
+ // Update the value, which will trigger the value watcher and emit the event
437
+ this.value = newValue;
438
+ // Force a re-render to update the visible input fields
439
+ forceUpdate(this.el);
440
+ }
169
441
  //#endregion WATCHERS
170
442
  /****************************************************************************/
171
443
  //#region METHODS
172
444
  handleInputChange(e, type) {
173
445
  const inputElement = e.target;
174
446
  const inputValue = inputElement.value.replace(/[^0-9]/g, ''); // Only keep numeric input
447
+ // Check if this field is visible for the current format
448
+ const visibleTypes = getVisibleTimeTypes(this.format);
449
+ if (!visibleTypes.includes(type)) {
450
+ return; // Don't process input for non-visible fields
451
+ }
175
452
  // Update the time value based on the type
176
453
  switch (type) {
177
454
  case TimeType.Hours:
@@ -184,489 +461,230 @@ const NvFieldtime$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldtime extends
184
461
  this.handleSecondsChange(inputValue, type);
185
462
  break;
186
463
  }
187
- // Reconstruct time from inputs
188
- const currentValue = this.reconstructTime();
189
- this.value = currentValue;
464
+ // Reconstruct time from inputs in the correct format
465
+ const reconstructedValue = this.reconstructTime();
466
+ // Update the value, which will trigger the watcher and emit the event
467
+ this.value = reconstructedValue;
190
468
  }
191
469
  handleHoursChange(inputValue, type) {
192
- var _a, _b, _c, _d;
470
+ var _a, _b;
193
471
  const isHHFormat = this.format.startsWith('HH');
194
472
  const maxHours = isHHFormat ? 24 : 12;
195
- let reputedToZero = false;
196
- const maxHour = this.parseHour(this.max, this.format) ||
197
- (this.format.startsWith('hh') ? '12' : '24');
198
- const minHour = this.parseHour(this.min, this.format) || '00';
473
+ // Handle empty input
474
+ if (inputValue.length === 0) {
475
+ this.hours = '00';
476
+ return;
477
+ }
199
478
  if (inputValue.length === 1) {
200
479
  this.inputZeroAdded[type] = true;
201
480
  const newInputValue = inputValue.padStart(2, '0');
202
- if (maxHour && parseInt(newInputValue, 10) > parseInt(maxHour, 10)) {
203
- if (minHour && parseInt(newInputValue, 10) < parseInt(minHour, 10)) {
204
- this.hours = minHour;
205
- }
206
- else {
207
- this.hours = '00';
208
- reputedToZero = true;
209
- }
210
- }
211
- else {
212
- if (minHour && parseInt(newInputValue, 10) < parseInt(minHour, 10)) {
213
- this.hours = minHour;
214
- }
215
- else {
216
- this.hours = newInputValue;
217
- }
218
- }
481
+ this.hours = newInputValue;
219
482
  }
220
483
  else if (this.inputZeroAdded[type]) {
221
484
  this.inputZeroAdded[type] = false;
222
485
  const newInputValue = inputValue.slice(1, 3).padStart(2, '0');
223
486
  const parsedNewInputValue = parseInt(newInputValue, 10) || 0;
487
+ // Only apply format validation (not min/max constraints)
224
488
  if (parsedNewInputValue >= maxHours) {
225
- if (minHour && parseInt(newInputValue, 10) < parseInt(minHour, 10)) {
226
- this.hours = minHour;
227
- }
228
- else {
229
- this.hours = '00';
230
- reputedToZero = true;
231
- }
489
+ this.hours = '00';
232
490
  }
233
491
  else {
234
- if (maxHour && parseInt(newInputValue, 10) > parseInt(maxHour, 10)) {
235
- if (minHour && parseInt(newInputValue, 10) < parseInt(minHour, 10)) {
236
- this.hours = minHour;
237
- }
238
- else {
239
- this.hours = '00';
240
- reputedToZero = true;
241
- }
242
- }
243
- else {
244
- if (minHour && parseInt(newInputValue, 10) < parseInt(minHour, 10)) {
245
- this.hours = minHour;
246
- }
247
- else {
248
- this.hours = newInputValue;
249
- }
250
- }
492
+ this.hours = newInputValue;
251
493
  }
252
494
  }
253
495
  else if (inputValue.length > 2) {
254
496
  if (inputValue.startsWith('00')) {
255
497
  this.inputZeroAdded[type] = true;
256
498
  const newInputValue = inputValue.slice(1, 3).padStart(2, '0');
257
- if (maxHour && parseInt(newInputValue, 10) > parseInt(maxHour, 10)) {
258
- if (minHour && parseInt(newInputValue, 10) < parseInt(minHour, 10)) {
259
- this.hours = minHour;
260
- }
261
- else {
262
- this.hours = '00';
263
- reputedToZero = true;
264
- }
265
- }
266
- else {
267
- if (minHour && parseInt(newInputValue, 10) < parseInt(minHour, 10)) {
268
- this.hours = minHour;
269
- }
270
- else {
271
- this.hours = newInputValue;
272
- }
273
- }
499
+ this.hours = newInputValue;
274
500
  }
275
501
  else {
276
502
  const newInputValue = inputValue.slice(1, 3).padStart(2, '0');
277
503
  const parsedNewInputValue = parseInt(newInputValue, 10) || 0;
504
+ // Only apply format validation (not min/max constraints)
278
505
  if (parsedNewInputValue >= maxHours) {
279
- if (minHour && parseInt(newInputValue, 10) < parseInt(minHour, 10)) {
280
- this.hours = minHour;
281
- reputedToZero = true;
282
- }
283
- else {
284
- this.hours = '00';
285
- reputedToZero = true;
286
- }
506
+ this.hours = '00';
287
507
  }
288
508
  else {
289
- if (maxHour && parsedNewInputValue > parseInt(maxHour, 10)) {
290
- if (minHour &&
291
- parseInt(newInputValue, 10) < parseInt(minHour, 10)) {
292
- this.hours = minHour;
293
- }
294
- else {
295
- this.hours = '00';
296
- reputedToZero = true;
297
- }
298
- }
299
- else {
300
- if (minHour && parsedNewInputValue < parseInt(minHour, 10)) {
301
- this.hours = minHour;
302
- }
303
- else {
304
- this.hours = parsedNewInputValue.toString();
305
- }
306
- }
509
+ this.hours = parsedNewInputValue.toString();
307
510
  }
308
511
  }
309
512
  }
310
513
  else {
311
- const newInputValue = inputValue.padStart(2, '0');
312
- const parsedNewInputValue = parseInt(newInputValue, 10) || 0;
514
+ const parsedNewInputValue = parseInt(inputValue, 10) || 0;
515
+ // Only apply format validation (not min/max constraints)
313
516
  if (parsedNewInputValue >= maxHours) {
314
- if (minHour && parseInt(newInputValue, 10) < parseInt(minHour, 10)) {
315
- this.hours = minHour;
316
- }
317
- else {
318
- this.hours = '00';
319
- reputedToZero = true;
320
- }
517
+ this.hours = '00';
321
518
  }
322
519
  else {
323
- if (maxHour && parsedNewInputValue > parseInt(maxHour, 10)) {
324
- this.hours = '00';
325
- reputedToZero = true;
326
- }
327
- else {
328
- if (minHour && parsedNewInputValue < parseInt(minHour, 10)) {
329
- this.hours = minHour;
330
- }
331
- else {
332
- this.hours = parsedNewInputValue.toString();
333
- }
334
- }
520
+ // For direct input, remove unnecessary leading zeros (e.g., '01' becomes '1')
521
+ this.hours = parsedNewInputValue.toString();
335
522
  }
336
523
  }
337
- if (this.hours.length === 2 &&
338
- !this.inputZeroAdded[type] &&
339
- !reputedToZero) {
340
- (_a = this.inputElements[TimeType.Minutes]) === null || _a === void 0 ? void 0 : _a.focus();
341
- (_b = this.inputElements[TimeType.Minutes]) === null || _b === void 0 ? void 0 : _b.select();
342
- }
343
- else if (reputedToZero) {
344
- (_c = this.inputElements[TimeType.Hours]) === null || _c === void 0 ? void 0 : _c.focus();
345
- (_d = this.inputElements[TimeType.Hours]) === null || _d === void 0 ? void 0 : _d.select();
524
+ // Auto-navigation to next field when input is complete
525
+ if (this.hours.length >= 1 && !this.inputZeroAdded[type]) {
526
+ const visibleTypes = getVisibleTimeTypes(this.format);
527
+ const currentTypeIndex = visibleTypes.indexOf(TimeType.Hours);
528
+ const nextTypeIndex = currentTypeIndex + 1;
529
+ if (nextTypeIndex < visibleTypes.length) {
530
+ const nextType = visibleTypes[nextTypeIndex];
531
+ (_a = this.inputElements[nextType]) === null || _a === void 0 ? void 0 : _a.focus();
532
+ (_b = this.inputElements[nextType]) === null || _b === void 0 ? void 0 : _b.select();
533
+ }
346
534
  }
347
535
  }
348
536
  handleMinutesChange(inputValue, type) {
349
- var _a, _b, _c, _d, _e, _f;
537
+ var _a, _b;
350
538
  const maxMinutes = 60;
351
- let reputedToZero = false;
352
- const minMinute = (_a = this.parseMinute(this.min)) !== null && _a !== void 0 ? _a : 0;
353
- const maxMinute = (_b = this.parseMinute(this.max)) !== null && _b !== void 0 ? _b : 59;
539
+ // Handle empty input
540
+ if (inputValue.length === 0) {
541
+ this.minutes = '00';
542
+ return;
543
+ }
354
544
  if (inputValue.length === 1) {
355
545
  this.inputZeroAdded[type] = true;
356
546
  const newInputValue = inputValue.padStart(2, '0');
357
- if (maxMinute && parseInt(newInputValue, 10) > maxMinute) {
358
- if (minMinute && parseInt(newInputValue, 10) < minMinute) {
359
- this.minutes = minMinute.toString().padStart(2, '0');
360
- }
361
- else {
362
- this.minutes = '00';
363
- reputedToZero = true;
364
- }
365
- }
366
- else {
367
- if (minMinute && parseInt(newInputValue, 10) < minMinute) {
368
- this.minutes = minMinute.toString().padStart(2, '0');
369
- }
370
- else {
371
- this.minutes = newInputValue;
372
- }
373
- }
547
+ this.minutes = newInputValue;
374
548
  }
375
549
  else if (this.inputZeroAdded[type]) {
376
550
  this.inputZeroAdded[type] = false;
377
551
  const newInputValue = inputValue.slice(1, 3).padStart(2, '0');
378
552
  const parsedNewInputValue = parseInt(newInputValue, 10) || 0;
553
+ // Only apply format validation (not min/max constraints)
379
554
  if (parsedNewInputValue >= maxMinutes) {
380
- if (minMinute && parseInt(newInputValue, 10) < minMinute) {
381
- this.minutes = minMinute.toString().padStart(2, '0');
382
- }
383
- else {
384
- this.minutes = '00';
385
- reputedToZero = true;
386
- }
555
+ this.minutes = '00';
387
556
  }
388
557
  else {
389
- if (maxMinute && parsedNewInputValue > maxMinute) {
390
- if (minMinute && parseInt(newInputValue, 10) < minMinute) {
391
- this.minutes = minMinute.toString().padStart(2, '0');
392
- }
393
- else {
394
- this.minutes = '00';
395
- reputedToZero = true;
396
- }
397
- }
398
- else {
399
- if (minMinute && parsedNewInputValue < minMinute) {
400
- this.minutes = minMinute.toString().padStart(2, '0');
401
- }
402
- else {
403
- this.minutes = newInputValue;
404
- }
405
- }
558
+ this.minutes = newInputValue;
406
559
  }
407
560
  }
408
561
  else if (inputValue.length > 2) {
409
562
  if (inputValue.startsWith('00')) {
410
563
  this.inputZeroAdded[type] = true;
411
564
  const newInputValue = inputValue.slice(1, 3).padStart(2, '0');
412
- if (maxMinute && parseInt(newInputValue, 10) > maxMinute) {
413
- if (minMinute && parseInt(newInputValue, 10) < minMinute) {
414
- this.minutes = minMinute.toString().padStart(2, '0');
415
- }
416
- else {
417
- this.minutes = '00';
418
- reputedToZero = true;
419
- }
420
- }
421
- else {
422
- if (minMinute && parseInt(newInputValue, 10) < minMinute) {
423
- this.minutes = minMinute.toString().padStart(2, '0');
424
- }
425
- else {
426
- this.minutes = newInputValue;
427
- }
428
- }
565
+ this.minutes = newInputValue;
429
566
  }
430
567
  else {
431
568
  const newInputValue = inputValue.slice(1, 3).padStart(2, '0');
432
569
  const parsedNewInputValue = parseInt(newInputValue, 10) || 0;
570
+ // Only apply format validation (not min/max constraints)
433
571
  if (parsedNewInputValue >= maxMinutes) {
434
- if (minMinute && parseInt(newInputValue, 10) < minMinute) {
435
- this.minutes = minMinute.toString().padStart(2, '0');
436
- }
437
- else {
438
- this.minutes = '00';
439
- reputedToZero = true;
440
- }
572
+ this.minutes = '00';
441
573
  }
442
574
  else {
443
- if (maxMinute && parsedNewInputValue > maxMinute) {
444
- if (minMinute && parseInt(newInputValue, 10) < minMinute) {
445
- this.minutes = minMinute.toString().padStart(2, '0');
446
- }
447
- else {
448
- this.minutes = '00';
449
- reputedToZero = true;
450
- }
451
- }
452
- else {
453
- if (minMinute && parsedNewInputValue < minMinute) {
454
- this.minutes = minMinute.toString().padStart(2, '0');
455
- }
456
- else {
457
- this.minutes = parsedNewInputValue.toString();
458
- }
459
- }
575
+ this.minutes = parsedNewInputValue.toString();
460
576
  }
461
577
  }
462
578
  }
463
579
  else {
464
- const newInputValue = inputValue.padStart(2, '0');
465
- const parsedNewInputValue = parseInt(newInputValue, 10) || 0;
580
+ const parsedNewInputValue = parseInt(inputValue, 10) || 0;
581
+ // Only apply format validation (not min/max constraints)
466
582
  if (parsedNewInputValue >= maxMinutes) {
467
- if (minMinute && parseInt(newInputValue, 10) < minMinute) {
468
- this.minutes = minMinute.toString().padStart(2, '0');
469
- }
470
- else {
471
- this.minutes = '00';
472
- reputedToZero = true;
473
- }
583
+ this.minutes = '00';
474
584
  }
475
585
  else {
476
- if (maxMinute && parsedNewInputValue > maxMinute) {
477
- if (minMinute && parseInt(newInputValue, 10) < minMinute) {
478
- this.minutes = minMinute.toString().padStart(2, '0');
479
- }
480
- else {
481
- this.minutes = '00';
482
- reputedToZero = true;
483
- }
484
- }
485
- else {
486
- if (minMinute && parsedNewInputValue < minMinute) {
487
- this.minutes = minMinute.toString().padStart(2, '0');
488
- }
489
- else {
490
- this.minutes = parsedNewInputValue.toString();
491
- }
492
- }
586
+ // For direct input, remove unnecessary leading zeros (e.g., '01' becomes '1')
587
+ this.minutes = parsedNewInputValue.toString();
493
588
  }
494
589
  }
495
- if (this.minutes.length === 2 &&
496
- !this.inputZeroAdded[type] &&
497
- !reputedToZero) {
498
- (_c = this.inputElements[TimeType.Seconds]) === null || _c === void 0 ? void 0 : _c.focus();
499
- (_d = this.inputElements[TimeType.Seconds]) === null || _d === void 0 ? void 0 : _d.select();
500
- }
501
- else if (reputedToZero) {
502
- (_e = this.inputElements[TimeType.Minutes]) === null || _e === void 0 ? void 0 : _e.focus();
503
- (_f = this.inputElements[TimeType.Minutes]) === null || _f === void 0 ? void 0 : _f.select();
590
+ // Auto-navigation to next field when input is complete
591
+ if (this.minutes.length >= 1 && !this.inputZeroAdded[type]) {
592
+ const visibleTypes = getVisibleTimeTypes(this.format);
593
+ const currentTypeIndex = visibleTypes.indexOf(TimeType.Minutes);
594
+ const nextTypeIndex = currentTypeIndex + 1;
595
+ if (nextTypeIndex < visibleTypes.length) {
596
+ const nextType = visibleTypes[nextTypeIndex];
597
+ (_a = this.inputElements[nextType]) === null || _a === void 0 ? void 0 : _a.focus();
598
+ (_b = this.inputElements[nextType]) === null || _b === void 0 ? void 0 : _b.select();
599
+ }
504
600
  }
505
601
  }
506
602
  handleSecondsChange(inputValue, type) {
507
- var _a, _b, _c, _d;
508
603
  const maxSeconds = 60;
509
- let reputedToZero = false;
510
- const minSecond = (_a = this.parseSecond(this.min)) !== null && _a !== void 0 ? _a : 0;
511
- const maxSecond = (_b = this.parseSecond(this.max)) !== null && _b !== void 0 ? _b : 59;
604
+ // Handle empty input
605
+ if (inputValue.length === 0) {
606
+ this.seconds = '00';
607
+ return;
608
+ }
512
609
  if (inputValue.length === 1) {
513
610
  this.inputZeroAdded[type] = true;
514
611
  const newInputValue = inputValue.padStart(2, '0');
515
- if (maxSecond && parseInt(newInputValue, 10) > maxSecond) {
516
- if (minSecond && parseInt(newInputValue, 10) < minSecond) {
517
- this.seconds = minSecond.toString().padStart(2, '0');
518
- }
519
- else {
520
- this.seconds = '00';
521
- reputedToZero = true;
522
- }
523
- }
524
- else {
525
- if (minSecond && parseInt(newInputValue, 10) < minSecond) {
526
- this.seconds = minSecond.toString().padStart(2, '0');
527
- }
528
- else {
529
- this.seconds = newInputValue;
530
- }
531
- }
612
+ this.seconds = newInputValue;
532
613
  }
533
614
  else if (this.inputZeroAdded[type]) {
534
615
  this.inputZeroAdded[type] = false;
535
616
  const newInputValue = inputValue.slice(1, 3).padStart(2, '0');
536
617
  const parsedNewInputValue = parseInt(newInputValue, 10) || 0;
618
+ // Only apply format validation (not min/max constraints)
537
619
  if (parsedNewInputValue >= maxSeconds) {
538
- if (minSecond && parseInt(newInputValue, 10) < minSecond) {
539
- this.seconds = minSecond.toString().padStart(2, '0');
540
- }
541
- else {
542
- this.seconds = '00';
543
- reputedToZero = true;
544
- }
620
+ this.seconds = '00';
545
621
  }
546
622
  else {
547
- if (maxSecond && parsedNewInputValue > maxSecond) {
548
- if (minSecond && parseInt(newInputValue, 10) < minSecond) {
549
- this.seconds = minSecond.toString().padStart(2, '0');
550
- }
551
- else {
552
- this.seconds = '00';
553
- reputedToZero = true;
554
- }
555
- }
556
- else {
557
- if (minSecond && parsedNewInputValue < minSecond) {
558
- this.seconds = minSecond.toString().padStart(2, '0');
559
- }
560
- else {
561
- this.seconds = newInputValue;
562
- }
563
- }
623
+ this.seconds = newInputValue;
564
624
  }
565
625
  }
566
626
  else if (inputValue.length > 2) {
567
627
  const newInputValue = inputValue.slice(1, 3).padStart(2, '0');
568
628
  const parsedNewInputValue = parseInt(newInputValue, 10) || 0;
629
+ // Only apply format validation (not min/max constraints)
569
630
  if (parsedNewInputValue >= maxSeconds) {
570
- if (minSecond && parseInt(newInputValue, 10) < minSecond) {
571
- this.seconds = minSecond.toString().padStart(2, '0');
572
- }
573
- else {
574
- this.seconds = '00';
575
- reputedToZero = true;
576
- }
631
+ this.seconds = '00';
577
632
  }
578
633
  else {
579
- if (maxSecond && parsedNewInputValue > maxSecond) {
580
- if (minSecond && parseInt(newInputValue, 10) < minSecond) {
581
- this.seconds = minSecond.toString().padStart(2, '0');
582
- }
583
- else {
584
- this.seconds = '00';
585
- reputedToZero = true;
586
- }
587
- }
588
- else {
589
- if (minSecond && parsedNewInputValue < minSecond) {
590
- this.seconds = minSecond.toString().padStart(2, '0');
591
- }
592
- else {
593
- this.seconds = parsedNewInputValue.toString();
594
- }
595
- }
634
+ this.seconds = parsedNewInputValue.toString();
596
635
  }
597
636
  }
598
637
  else {
599
- const newInputValue = inputValue.padStart(2, '0');
600
- const parsedNewInputValue = parseInt(newInputValue, 10) || 0;
638
+ const parsedNewInputValue = parseInt(inputValue, 10) || 0;
639
+ // Only apply format validation (not min/max constraints)
601
640
  if (parsedNewInputValue >= maxSeconds) {
602
- if (minSecond && parseInt(newInputValue, 10) < minSecond) {
603
- this.seconds = minSecond.toString().padStart(2, '0');
604
- }
605
- else {
606
- this.seconds = '00';
607
- reputedToZero = true;
608
- }
641
+ this.seconds = '00';
609
642
  }
610
643
  else {
611
- if (maxSecond && parsedNewInputValue > maxSecond) {
612
- if (minSecond && parseInt(newInputValue, 10) < minSecond) {
613
- this.seconds = minSecond.toString().padStart(2, '0');
614
- }
615
- else {
616
- this.seconds = '00';
617
- reputedToZero = true;
618
- }
619
- }
620
- else {
621
- if (minSecond && parsedNewInputValue < minSecond) {
622
- this.seconds = minSecond.toString().padStart(2, '0');
623
- }
624
- else {
625
- this.seconds = parsedNewInputValue.toString();
626
- }
627
- }
644
+ // For direct input, remove unnecessary leading zeros (e.g., '01' becomes '1')
645
+ this.seconds = parsedNewInputValue.toString();
628
646
  }
629
647
  }
630
- if (reputedToZero) {
631
- (_c = this.inputElements[TimeType.Seconds]) === null || _c === void 0 ? void 0 : _c.focus();
632
- (_d = this.inputElements[TimeType.Seconds]) === null || _d === void 0 ? void 0 : _d.select();
633
- }
648
+ // No auto-navigation for seconds field as it's typically the last field
634
649
  }
635
- // Parse a continuous time string (e.g., "123456") into hours, minutes, and seconds
650
+ // Parse a time string according to the current format
636
651
  parseTime(timeString) {
637
652
  if (!timeString) {
638
653
  return;
639
654
  }
640
- const cleanedTime = timeString.replace(/[^0-9]/g, '').padStart(6, '0');
641
- const hour = cleanedTime.slice(0, 2);
642
- const minute = cleanedTime.slice(2, 4);
643
- const second = cleanedTime.slice(4, 6);
644
- const minHour = this.parseHour(this.min, this.format) || hour;
645
- const minMinute = this.parseMinute(this.min) || minute;
646
- const minSecond = this.parseSecond(this.min) || second;
647
- this.hours = minHour.padStart(2, '0');
648
- this.minutes = minMinute.toString().padStart(2, '0');
649
- this.seconds = minSecond.toString().padStart(2, '0');
655
+ // Use format-aware parsing without constraint application
656
+ const components = parseValueByFormat(timeString, this.format);
657
+ // Set the parsed values without applying min/max constraints
658
+ this.hours = components.hours;
659
+ this.minutes = components.minutes;
660
+ this.seconds = components.seconds;
650
661
  }
651
662
  reconstructTime() {
652
- if (this.format === 'HH' || this.format === 'hh') {
653
- return this.hours;
654
- }
655
- else if (this.format === 'HH:mm' || this.format === 'hh:mm') {
656
- return `${this.hours}:${this.minutes}`;
657
- }
658
- else if (this.format === 'HH:mm:ss' || this.format === 'hh:mm:ss') {
659
- return `${this.hours}:${this.minutes}:${this.seconds}`;
660
- }
661
- else {
662
- return `${this.hours}:${this.minutes}:${this.seconds}`;
663
+ const components = {
664
+ hours: this.hours,
665
+ minutes: this.minutes,
666
+ seconds: this.seconds,
667
+ };
668
+ // Ensure the reconstructed time is in the correct format
669
+ const reconstructedTime = reconstructTimeByFormat(components, this.format);
670
+ // Validate that the reconstructed time matches the expected format
671
+ if (!isValidFormatValue(reconstructedTime, this.format)) {
672
+ // If invalid, return the default value for this format
673
+ const config = FORMAT_CONFIGS[this.format];
674
+ return config ? config.defaultValue : reconstructedTime;
663
675
  }
676
+ return reconstructedTime;
664
677
  }
665
678
  handleFocus(type) {
666
679
  var _a, _b, _c, _d;
667
680
  if (this.readonly || this.disabled) {
668
681
  return;
669
682
  }
683
+ // Check if this field is visible for the current format
684
+ const visibleTypes = getVisibleTimeTypes(this.format);
685
+ if (!visibleTypes.includes(type)) {
686
+ return; // Don't handle focus for non-visible fields
687
+ }
670
688
  if (!this.open) {
671
689
  this.open = true; // Force the popover to open
672
690
  }
@@ -679,33 +697,23 @@ const NvFieldtime$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldtime extends
679
697
  this.typeFocused = type;
680
698
  }
681
699
  HandleDropdownIconClick() {
682
- var _a, _b, _c, _d, _e, _f;
700
+ var _a, _b;
683
701
  if (this.disabled || this.readonly) {
684
702
  return; // Do not toggle if disabled or read-only
685
703
  }
686
- if (this.open && this.inputElements[TimeType.Hours]) {
687
- this.open = false; // Close the popover if it is open
688
- }
689
- else if (this.open && this.inputElements[TimeType.Minutes]) {
690
- this.open = false; // Close the popover if it is open
691
- }
692
- else if (this.open && this.inputElements[TimeType.Seconds]) {
704
+ const visibleTypes = getVisibleTimeTypes(this.format);
705
+ const firstVisibleType = visibleTypes[0];
706
+ if (this.open) {
693
707
  this.open = false; // Close the popover if it is open
694
708
  }
695
- else if (!this.open && this.inputElements[TimeType.Hours]) {
696
- (_a = this.inputElements[TimeType.Hours]) === null || _a === void 0 ? void 0 : _a.focus(); // Focus will open the popover
697
- (_b = this.inputElements[TimeType.Hours]) === null || _b === void 0 ? void 0 : _b.select();
698
- }
699
- else if (!this.open && this.inputElements[TimeType.Minutes]) {
700
- (_c = this.inputElements[TimeType.Minutes]) === null || _c === void 0 ? void 0 : _c.focus(); // Focus will open the popover
701
- (_d = this.inputElements[TimeType.Minutes]) === null || _d === void 0 ? void 0 : _d.select();
702
- }
703
- else if (!this.open && this.inputElements[TimeType.Seconds]) {
704
- (_e = this.inputElements[TimeType.Seconds]) === null || _e === void 0 ? void 0 : _e.focus(); // Focus will open the popover
705
- (_f = this.inputElements[TimeType.Seconds]) === null || _f === void 0 ? void 0 : _f.select();
709
+ else if (!this.open &&
710
+ firstVisibleType &&
711
+ this.inputElements[firstVisibleType]) {
712
+ (_a = this.inputElements[firstVisibleType]) === null || _a === void 0 ? void 0 : _a.focus(); // Focus will open the popover
713
+ (_b = this.inputElements[firstVisibleType]) === null || _b === void 0 ? void 0 : _b.select();
706
714
  }
707
715
  else {
708
- console.warn('nv-fieldtime -> No input elements found to focus or to blur');
716
+ console.warn('nv-fieldtime -> No visible input elements found to focus');
709
717
  }
710
718
  }
711
719
  updateHighlightedItem(items, index) {
@@ -724,6 +732,8 @@ const NvFieldtime$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldtime extends
724
732
  }
725
733
  handleTimeOptionClick(event, type) {
726
734
  const option = parseInt(event.target.textContent || '0', 10);
735
+ // Update the time component directly without constraint validation
736
+ // Dropdown options are already filtered by constraints during generation
727
737
  if (type === TimeType.Hours) {
728
738
  this.hours = option.toString().padStart(2, '0');
729
739
  }
@@ -733,8 +743,9 @@ const NvFieldtime$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldtime extends
733
743
  else if (type === TimeType.Seconds) {
734
744
  this.seconds = option.toString().padStart(2, '0');
735
745
  }
736
- const reconstructTime = this.reconstructTime();
737
- this.value = reconstructTime;
746
+ // Reconstruct time in the correct format and update value
747
+ const reconstructedTime = this.reconstructTime();
748
+ this.value = reconstructedTime;
738
749
  }
739
750
  handleInputBlur() {
740
751
  // Use a delay to check if the focus is still within the popover
@@ -793,17 +804,29 @@ const NvFieldtime$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldtime extends
793
804
  }
794
805
  generateHourOptions(stepInSeconds) {
795
806
  const hourStep = Math.max(1, Math.floor(stepInSeconds / 3600)); // Prevent step < 1
796
- const maxHour = this.parseHour(this.max, this.format) ||
797
- (this.format.startsWith('hh') ? '12' : '24');
798
- const minHour = this.parseHour(this.min, this.format) || '00';
799
- const maxHourValue = parseInt(maxHour, 10);
800
- const minHourValue = parseInt(minHour, 10);
807
+ const is12HourFormat = this.format.startsWith('hh');
808
+ // Set proper hour ranges based on format
809
+ const defaultMaxHour = is12HourFormat ? 12 : 23;
810
+ const defaultMinHour = is12HourFormat ? 1 : 0;
811
+ const maxHour = this.parseHour(this.max, this.format);
812
+ const minHour = this.parseHour(this.min, this.format);
813
+ const maxHourValue = maxHour ? parseInt(maxHour, 10) : defaultMaxHour;
814
+ const minHourValue = minHour ? parseInt(minHour, 10) : defaultMinHour;
801
815
  const values = [];
802
- for (let i = minHourValue; i < maxHourValue; i += hourStep) {
803
- values.push(i.toString().padStart(2, '0'));
816
+ for (let i = minHourValue; i <= maxHourValue; i += hourStep) {
817
+ const hourStr = i.toString().padStart(2, '0');
818
+ values.push(hourStr);
804
819
  }
805
820
  return values;
806
821
  }
822
+ /**
823
+ * Parse hour value from min/max constraint strings for dropdown generation only.
824
+ * This method is used exclusively for filtering dropdown options and should not
825
+ * affect input values or validation.
826
+ * @param {string} value - The time string to parse (e.g., "14:30" or "02:30")
827
+ * @param {string} format - The time format string (e.g., "HH:mm" or "hh:mm")
828
+ * @returns {string} The parsed hour string or null if invalid
829
+ */
807
830
  parseHour(value, format) {
808
831
  if (!value)
809
832
  return null;
@@ -821,13 +844,21 @@ const NvFieldtime$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldtime extends
821
844
  const minMinute = (_a = this.parseMinute(this.min)) !== null && _a !== void 0 ? _a : 0;
822
845
  const maxMinute = (_b = this.parseMinute(this.max)) !== null && _b !== void 0 ? _b : 59;
823
846
  if (minMinute === 0 && maxMinute === 0)
824
- return ['00']; // Handle edge case for zero seconds
847
+ return ['00']; // Handle edge case for zero minutes
825
848
  const values = [];
826
849
  for (let i = minMinute; i <= maxMinute; i += minuteStep) {
827
- values.push(i.toString().padStart(2, '0'));
850
+ const minuteStr = i.toString().padStart(2, '0');
851
+ values.push(minuteStr);
828
852
  }
829
853
  return values;
830
854
  }
855
+ /**
856
+ * Parse minute value from min/max constraint strings for dropdown generation only.
857
+ * This method is used exclusively for filtering dropdown options and should not
858
+ * affect input values or validation.
859
+ * @param {string} value - The time string to parse (e.g., "14:30" or "02:30")
860
+ * @returns {number} The parsed minute number or null if invalid
861
+ */
831
862
  parseMinute(value) {
832
863
  if (!value)
833
864
  return null;
@@ -846,10 +877,18 @@ const NvFieldtime$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldtime extends
846
877
  return ['00']; // Handle edge case for zero seconds
847
878
  const values = [];
848
879
  for (let i = minSecond; i <= maxSecond; i += secondStep) {
849
- values.push(i.toString().padStart(2, '0'));
880
+ const secondStr = i.toString().padStart(2, '0');
881
+ values.push(secondStr);
850
882
  }
851
883
  return values;
852
884
  }
885
+ /**
886
+ * Parse second value from min/max constraint strings for dropdown generation only.
887
+ * This method is used exclusively for filtering dropdown options and should not
888
+ * affect input values or validation.
889
+ * @param {string} value - The time string to parse (e.g., "14:30:45" or "02:30:45")
890
+ * @returns {number} The parsed second number or null if invalid
891
+ */
853
892
  parseSecond(value) {
854
893
  if (!value)
855
894
  return null;
@@ -866,10 +905,6 @@ const NvFieldtime$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldtime extends
866
905
  const repetitions = Math.ceil(300 / totalOptions);
867
906
  return Array(repetitions).fill(options).flat();
868
907
  }
869
- getCurrentTime() {
870
- const currentTime = new Date();
871
- return currentTime.toLocaleTimeString(); // Returns the time in the locale's format
872
- }
873
908
  updateColumnHighlight(selector, value) {
874
909
  const items = Array.from(this.el.querySelectorAll(selector));
875
910
  const index = items.findIndex(x => x.textContent === value);
@@ -887,8 +922,13 @@ const NvFieldtime$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldtime extends
887
922
  }
888
923
  if (!this.open) {
889
924
  if (this.inputElements) {
890
- (_a = this.inputElements[TimeType.Hours]) === null || _a === void 0 ? void 0 : _a.focus();
891
- (_b = this.inputElements[TimeType.Hours]) === null || _b === void 0 ? void 0 : _b.select();
925
+ // Focus on the first visible field based on format
926
+ const visibleTypes = getVisibleTimeTypes(this.format);
927
+ const firstVisibleType = visibleTypes[0];
928
+ if (firstVisibleType && this.inputElements[firstVisibleType]) {
929
+ (_a = this.inputElements[firstVisibleType]) === null || _a === void 0 ? void 0 : _a.focus();
930
+ (_b = this.inputElements[firstVisibleType]) === null || _b === void 0 ? void 0 : _b.select();
931
+ }
892
932
  }
893
933
  event.preventDefault();
894
934
  }
@@ -898,17 +938,23 @@ const NvFieldtime$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldtime extends
898
938
  //#region LIFECYCLE
899
939
  componentWillLoad() {
900
940
  document.addEventListener('click', this.handleClickOutside.bind(this));
901
- // If an initial value is passed, parse it
941
+ // Initialize component state based on format and value
902
942
  if (this.value) {
943
+ // Parse the provided value using format-aware parsing without constraint application
903
944
  this.parseTime(this.value);
904
945
  }
905
946
  else {
906
- const minHour = this.parseHour(this.min, this.format) || '00';
907
- const minMinute = this.parseMinute(this.min) || 0;
908
- const minSecond = this.parseSecond(this.min) || 0;
909
- this.hours = minHour.padStart(2, '0');
910
- this.minutes = minMinute.toString().padStart(2, '0');
911
- this.seconds = minSecond.toString().padStart(2, '0');
947
+ // Initialize with format-appropriate default values without any constraint application
948
+ // Use format-specific defaults: '01' for 12-hour formats, '00' for 24-hour formats
949
+ const defaultComponents = parseValueByFormat('', this.format);
950
+ // Set default values directly without any min/max constraint validation
951
+ this.hours = defaultComponents.hours;
952
+ this.minutes = defaultComponents.minutes;
953
+ this.seconds = defaultComponents.seconds;
954
+ // Set the initial value in the correct format without constraint validation
955
+ // This ensures the component has a proper initial state for the value watcher
956
+ const initialValue = reconstructTimeByFormat(defaultComponents, this.format);
957
+ this.value = initialValue;
912
958
  }
913
959
  }
914
960
  connectedCallback() {
@@ -918,63 +964,94 @@ const NvFieldtime$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldtime extends
918
964
  document.removeEventListener('click', this.handleClickOutside.bind(this));
919
965
  }
920
966
  componentDidLoad() {
921
- if (!this.value) {
922
- const currentTime = this.getCurrentTime();
923
- // Split time into components
924
- // eslint-disable-next-line prefer-const
925
- let [hour, minute, secondAmPm] = currentTime.split(':');
926
- let second, amPm;
927
- // Check if AM/PM is present and split accordingly
928
- if (secondAmPm.includes(' ')) {
929
- [second, amPm] = secondAmPm.split(' ');
930
- }
931
- else {
932
- second = secondAmPm;
967
+ // Initialize dropdown highlighting based on current component state
968
+ // This ensures proper visual feedback without applying any constraints
969
+ // Update highlighted items for hours based on current state
970
+ const hourSelector = `.time-column.time-column-hours div`;
971
+ this.updateColumnHighlight(hourSelector, this.hours);
972
+ // Update highlighted items for minutes based on current state
973
+ const minuteSelector = `.time-column.time-column-minutes div`;
974
+ this.updateColumnHighlight(minuteSelector, this.minutes);
975
+ // Update highlighted items for seconds based on current state
976
+ const secondSelector = `.time-column.time-column-seconds div`;
977
+ this.updateColumnHighlight(secondSelector, this.seconds);
978
+ }
979
+ //#endregion LIFECYCLE
980
+ /****************************************************************************/
981
+ //#region RENDER
982
+ /**
983
+ * Renders input fields based on the current format
984
+ * Only shows fields that are relevant to the selected format
985
+ * @returns {HTMLElement[]} Array of HTML elements for time input fields
986
+ */
987
+ renderTimeInputFields() {
988
+ const visibleTypes = getVisibleTimeTypes(this.format);
989
+ const elements = [];
990
+ visibleTypes.forEach((type, index) => {
991
+ // Add separator colon before minutes and seconds (but not before the first field)
992
+ if (index > 0) {
993
+ elements.push(h("span", null, ":"));
933
994
  }
934
- // Parse hour as integer for calculations
935
- let parsedHour = parseInt(hour, 10);
936
- // Convert hour to 24-hour format based on AM/PM (if present)
937
- if (amPm) {
938
- if (amPm === 'PM' && parsedHour < 12) {
939
- parsedHour += 12; // Convert PM to 24-hour
940
- }
941
- else if (amPm === 'AM' && parsedHour === 12) {
942
- parsedHour = 0; // Midnight in 24-hour format
943
- }
995
+ // Add the input field for this time type
996
+ elements.push(this.renderTimeInputField(type));
997
+ });
998
+ return elements;
999
+ }
1000
+ /**
1001
+ * Renders a single time input field for the specified type
1002
+ * @param {TimeType} type - The time type to render input for
1003
+ * @returns {HTMLInputElement} HTML input element for the specified time type
1004
+ */
1005
+ renderTimeInputField(type) {
1006
+ const getValue = () => {
1007
+ switch (type) {
1008
+ case TimeType.Hours:
1009
+ return this.hours;
1010
+ case TimeType.Minutes:
1011
+ return this.minutes;
1012
+ case TimeType.Seconds:
1013
+ return this.seconds;
1014
+ default:
1015
+ return '00';
944
1016
  }
945
- // Adjust for 12-hour format if necessary
946
- if (this.format.startsWith('hh')) {
947
- if (parsedHour === 0) {
948
- hour = '12'; // Midnight in 12-hour format
949
- }
950
- else if (parsedHour > 12) {
951
- hour = (parsedHour - 12).toString(); // Convert 24-hour to 12-hour
952
- }
953
- else {
954
- hour = parsedHour.toString();
955
- }
1017
+ };
1018
+ const getPlaceholder = () => {
1019
+ switch (type) {
1020
+ case TimeType.Hours:
1021
+ return this.format.includes('hh') ? 'hh' : 'HH';
1022
+ case TimeType.Minutes:
1023
+ return 'mm';
1024
+ case TimeType.Seconds:
1025
+ return 'ss';
1026
+ default:
1027
+ return '';
956
1028
  }
957
- else {
958
- hour = parsedHour.toString(); // Use 24-hour format directly
1029
+ };
1030
+ const getId = () => {
1031
+ switch (type) {
1032
+ case TimeType.Hours:
1033
+ return this.inputId;
1034
+ case TimeType.Minutes:
1035
+ return `${this.inputId}-minutes`;
1036
+ case TimeType.Seconds:
1037
+ return `${this.inputId}-seconds`;
1038
+ default:
1039
+ return this.inputId;
959
1040
  }
960
- // Pad hour, minute, and second to ensure two digits
961
- hour = hour.padStart(2, '0');
962
- minute = minute.padStart(2, '0');
963
- second = second.padStart(2, '0');
964
- // Update highlighted items for hours
965
- const hourSelector = `.time-column.time-column-hours div`;
966
- this.updateColumnHighlight(hourSelector, hour);
967
- // Update highlighted items for minutes
968
- const minuteSelector = `.time-column.time-column-minutes div`;
969
- this.updateColumnHighlight(minuteSelector, minute);
970
- // Update highlighted items for seconds
971
- const secondSelector = `.time-column.time-column-seconds div`;
972
- this.updateColumnHighlight(secondSelector, second);
973
- }
1041
+ };
1042
+ // Remove min/max constraints from input elements to allow native stepper behavior
1043
+ // Constraints are only applied to dropdown options, not input steppers
1044
+ return (h("input", { ref: el => (this.inputElements[type] = el), type: "number", autofocus: this.autofocus && type === getVisibleTimeTypes(this.format)[0], class: "time-input", pattern: "[0-9]*", maxlength: "3", value: getValue(), onInput: e => this.handleInputChange(e, type), placeholder: getPlaceholder(), inputMode: "numeric", onFocus: () => this.handleFocus(type), name: this.name ? `${type}-${this.name}` : type, id: getId(), readonly: this.readonly, disabled: this.disabled, required: this.required, onKeyDown: e => this.handleKeyDown(e), onBlur: () => this.handleInputBlur() }));
1045
+ }
1046
+ /**
1047
+ * Renders dropdown columns based on the current format
1048
+ * Only shows columns that are relevant to the selected format
1049
+ * @returns {HTMLElement[]} Array of HTML elements for time dropdown columns
1050
+ */
1051
+ renderTimeDropdownColumns() {
1052
+ const visibleTypes = getVisibleTimeTypes(this.format);
1053
+ return visibleTypes.map(type => this.RenderTimeOptionsColumn(type));
974
1054
  }
975
- //#endregion LIFECYCLE
976
- /****************************************************************************/
977
- //#region RENDER
978
1055
  RenderTimeOptionsColumn(type) {
979
1056
  return (h("div", { class: `time-column time-column-${type}`, onScroll: e => this.handleScroll(e, type) }, this.generateInfiniteTimeOptions(type).map((option, index) => (h("div", { class: {
980
1057
  'time-option': true,
@@ -984,32 +1061,16 @@ const NvFieldtime$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldtime extends
984
1061
  }, key: `${option}-${index}`, onClick: e => this.handleTimeOptionClick(e, type) }, option)))));
985
1062
  }
986
1063
  render() {
987
- return (h(Host, { key: 'ef5f12cdbd62c18033f57ff176775b5ee62ebb85', onclick: e => this.handleHostClick(e) }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: '64e20904debf287e69e5717f2d28ac4a700b7f15', htmlFor: this.inputId }, h("slot", { key: 'e0644a80e23854ca06baf8b52b00649a0e6f1ed9', name: "label" }, this.label))), h("nv-popover", { key: '98d71eeb73ce93c16c488e80f79bbe269a44ddc3', ref: el => (this.popoverElement = el), triggerMode: "controlled", placement: "bottom-start", open: this.open }, h("div", { key: '9a7d256f3c64aed3314338c8306540d92dddaad0', class: "input-wrapper", slot: "trigger" }, h("slot", { key: 'ac0e04737b86e4767e4c249ee95e4b69a41ea387', name: "before-input" }), h("div", { key: '1f04ff2f539048eb00500b2fbbeaf86ce1698065', class: "input-container" }, h("slot", { key: '60ee3a49ea9ca9509224c57dc64f3ccab7f89312', name: "leading-input" }), startsWithIgnoreCase(this.format, 'HH') && [
988
- h("input", { key: 'cb8a979ce6e4d83074e0c9046bbf3a60821e5262', 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
989
- ? `${TimeType.Hours}-${this.name}`
990
- : TimeType.Hours, id: this.inputId, readonly: this.readonly, disabled: this.disabled, required: this.required, onKeyDown: e => this.handleKeyDown(e), onBlur: () => this.handleInputBlur() }),
991
- ], this.format.includes('mm') && [
992
- h("span", { key: '74f9604ffd54e0c0bbd88996e32fdcb08f2c3645' }, ":"),
993
- h("input", { key: '52f9b637bba804cac6fadff06e8b077bb2f5748a', 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
994
- ? `${TimeType.Minutes}-${this.name}`
995
- : TimeType.Minutes, id: `${this.inputId}-minutes`, readonly: this.readonly, disabled: this.disabled, required: this.required, onKeyDown: e => this.handleKeyDown(e), onBlur: () => this.handleInputBlur() }),
996
- ], this.format.includes('ss') && [
997
- h("span", { key: '878bc9ce7557e9cf9471803a86956a9184d0ccb5' }, ":"),
998
- h("input", { key: 'b074d4d3ef80f66e7dbe051b6bc53f151661f409', 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
999
- ? `${TimeType.Seconds}-${this.name}`
1000
- : TimeType.Seconds, id: `${this.inputId}-seconds`, readonly: this.readonly, disabled: this.disabled, required: this.required, onKeyDown: e => this.handleKeyDown(e), onBlur: () => this.handleInputBlur() }),
1001
- ], h("nv-iconbutton", { key: '3f5d78116ee60d1874a4629d9cf36a06d52b7df4', name: 'clock', size: "md", emphasis: "lower", "aria-label": this.open ? 'Hide time picker' : 'Show time picker', onClick: () => this.HandleDropdownIconClick() }), this.error && (h("nv-icon", { key: '4b2356cf95131af213a4e98feede16fc8c4963db', name: "alert-circle", class: "validation", size: "sm" })), this.success && (h("nv-icon", { key: 'f9b0e61037049a36ac900d1af9ecc71b211ebd88', name: "circle-check", class: "validation", size: "sm" }))), h("slot", { key: '6177abde559c57f2b0586368ead1a61d7b543838', name: "after-input" })), h("div", { key: 'f6d5205a5011411550179f9337143163cb547fb1', class: "time-dropdown", slot: "content" }, h("div", { key: '9f0b3e1423bef197b269c5b11ce744cabc2bd6c4', class: "time-columns" }, startsWithIgnoreCase(this.format, 'HH') &&
1002
- this.RenderTimeOptionsColumn(TimeType.Hours), this.format.includes('mm') &&
1003
- this.RenderTimeOptionsColumn(TimeType.Minutes), this.format.includes('ss') &&
1004
- this.RenderTimeOptionsColumn(TimeType.Seconds)))), (this.description ||
1005
- this.el.querySelector('[slot="description"]')) && (h("div", { key: '1076ded73b32ff9afbd0f02184febcc82f8d839e', class: "description" }, h("slot", { key: '479d09b299d0e380533a6cd689ce7f03aa92ea8e', name: "description" }, this.description))), (this.errorDescription ||
1006
- this.el.querySelector('[slot="error-description"]')) && (h("div", { key: '5615246dbd797c300be357be37d3b9d0aee56e31', hidden: !this.error, class: "error-description" }, h("slot", { key: '6568ea3f9e0bdf85dd280c645956f8e0bb592e35', name: "error-description" }, this.errorDescription)))));
1064
+ return (h(Host, { key: 'f66fe2a29f23a0bc967821a0c9bca4347b622286', onclick: (e) => this.handleHostClick(e), "aria-expanded": this.open ? 'true' : 'false' }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: 'f01ce1b034b1b547cbdde5814db9357ee1913e04', htmlFor: this.inputId }, h("slot", { key: 'd81dcb20883b93280db6e76e0299f679f1f9ed84', name: "label" }, this.label))), h("nv-popover", { key: '8c9e83002edcfba89ca4ca282fc82db714ed2f43', ref: el => (this.popoverElement = el), triggerMode: "controlled", placement: "bottom-start", open: this.open }, h("div", { key: '3a5b26e4be67f277ead2a9fe2f04e5d12a4bd596', class: "input-wrapper", slot: "trigger" }, h("slot", { key: '2ea5f8269c6f0892c53a002a298ca3ceed8f8a00', name: "before-input" }), h("div", { key: 'ab97bbbf183118d7b510f82c800b4a3fa1fefda3', class: "input-container" }, h("slot", { key: 'a80d2f68b24d4226c18bf0df18ebf13ac6e0873e', name: "leading-input" }), this.renderTimeInputFields(), h("nv-iconbutton", { key: '1f7aacf1ab073c0c6ef10b50e948a7ecbca4dd75', name: 'clock', size: "md", emphasis: "lower", "aria-label": this.open ? 'Hide time picker' : 'Show time picker', onClick: () => this.HandleDropdownIconClick() }), this.error && (h("nv-icon", { key: '8f414a3b3daae6f0625b3c62b920621bf8698db3', name: "alert-circle", class: "validation", size: "sm" })), this.success && (h("nv-icon", { key: '13b5671664466b6bb50f2561b5cffb96517a1068', name: "circle-check", class: "validation", size: "sm" }))), h("slot", { key: 'b5d6085a9864ef84d4113062a0b1cb8a807ab241', name: "after-input" })), h("div", { key: '2950c5fac3a0f219e5db2e3a7e9f605d86e50aa2', class: "time-dropdown", slot: "content" }, h("div", { key: 'c5b7ff3818a05e1f6d7ca76657f57b85bb595345', class: "time-columns" }, this.renderTimeDropdownColumns()))), (this.description ||
1065
+ this.el.querySelector('[slot="description"]')) && (h("div", { key: 'c8cb90fad74721a9b5eb0ab50980f3fd7c587e62', class: "description" }, h("slot", { key: '641d1a6a9dbf580267664831d5b371a601afb039', name: "description" }, this.description))), (this.errorDescription ||
1066
+ this.el.querySelector('[slot="error-description"]')) && (h("div", { key: '5721b81d7a16b626bfa7c3af20897f33b7c37080', hidden: !this.error, class: "error-description" }, h("slot", { key: '84cef1043666ab6dd86f70d4ba0054d7f33ca589', name: "error-description" }, this.errorDescription)))));
1007
1067
  }
1008
1068
  static get formAssociated() { return true; }
1009
1069
  get el() { return this; }
1010
1070
  static get watchers() { return {
1011
1071
  "value": ["handleValueChange"],
1012
- "open": ["handleOpenChange"]
1072
+ "open": ["handleOpenChange"],
1073
+ "format": ["handleFormatChange"]
1013
1074
  }; }
1014
1075
  static get style() { return NvFieldtimeStyle0; }
1015
1076
  }, [68, "nv-fieldtime", {
@@ -1035,7 +1096,8 @@ const NvFieldtime$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldtime extends
1035
1096
  "seconds": [32]
1036
1097
  }, [[0, "openChanged", "handleOpenChanged"], [0, "keydown", "handleKeyDown"]], {
1037
1098
  "value": ["handleValueChange"],
1038
- "open": ["handleOpenChange"]
1099
+ "open": ["handleOpenChange"],
1100
+ "format": ["handleFormatChange"]
1039
1101
  }]);
1040
1102
  function defineCustomElement$1() {
1041
1103
  if (typeof customElements === "undefined") {