@nova-design-system/nova-webcomponents 3.2.0 → 3.3.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 (386) hide show
  1. package/dist/cjs/{index-108ddff0.js → index-c56424e5.js} +16 -184
  2. package/dist/cjs/index-c56424e5.js.map +1 -0
  3. package/dist/cjs/loader.cjs.js +2 -2
  4. package/dist/cjs/native.cjs.js +2 -23
  5. package/dist/cjs/native.cjs.js.map +1 -1
  6. package/dist/cjs/nv-alert.cjs.entry.js +1 -1
  7. package/dist/cjs/nv-avatar.cjs.entry.js +1 -1
  8. package/dist/cjs/nv-badge_2.cjs.entry.js +1 -1
  9. package/dist/cjs/nv-breadcrumb.cjs.entry.js +1 -1
  10. package/dist/cjs/nv-breadcrumbs.cjs.entry.js +1 -1
  11. package/dist/cjs/nv-button.cjs.entry.js +1 -1
  12. package/dist/cjs/nv-calendar.cjs.entry.js +371 -138
  13. package/dist/cjs/nv-calendar.cjs.entry.js.map +1 -1
  14. package/dist/cjs/nv-col.cjs.entry.js +1 -1
  15. package/dist/cjs/nv-datagrid.cjs.entry.js +1 -1
  16. package/dist/cjs/nv-datagridcolumn.cjs.entry.js +1 -1
  17. package/dist/cjs/nv-dialog.cjs.entry.js +1 -1
  18. package/dist/cjs/nv-dialogfooter_2.cjs.entry.js +1 -1
  19. package/dist/cjs/nv-fieldcheckbox.cjs.entry.js +1 -1
  20. package/dist/cjs/nv-fielddate.cjs.entry.js +45 -11
  21. package/dist/cjs/nv-fielddate.cjs.entry.js.map +1 -1
  22. package/dist/cjs/nv-fielddaterange.cjs.entry.js +75 -44
  23. package/dist/cjs/nv-fielddaterange.cjs.entry.js.map +1 -1
  24. package/dist/cjs/nv-fielddropdown.cjs.entry.js +2 -2
  25. package/dist/cjs/nv-fielddropdown.cjs.entry.js.map +1 -1
  26. package/dist/cjs/nv-fielddropdownitem.cjs.entry.js +1 -1
  27. package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +2 -2
  28. package/dist/cjs/nv-fieldmultiselect.cjs.entry.js.map +1 -1
  29. package/dist/cjs/nv-fieldnumber.cjs.entry.js +2 -2
  30. package/dist/cjs/nv-fieldnumber.cjs.entry.js.map +1 -1
  31. package/dist/cjs/nv-fieldpassword.cjs.entry.js +2 -2
  32. package/dist/cjs/nv-fieldpassword.cjs.entry.js.map +1 -1
  33. package/dist/cjs/nv-fieldradio.cjs.entry.js +1 -1
  34. package/dist/cjs/nv-fieldselect.cjs.entry.js +2 -2
  35. package/dist/cjs/nv-fieldselect.cjs.entry.js.map +1 -1
  36. package/dist/cjs/nv-fieldslider.cjs.entry.js +25 -20
  37. package/dist/cjs/nv-fieldslider.cjs.entry.js.map +1 -1
  38. package/dist/cjs/nv-fieldtext.cjs.entry.js +2 -2
  39. package/dist/cjs/nv-fieldtext.cjs.entry.js.map +1 -1
  40. package/dist/cjs/nv-fieldtextarea.cjs.entry.js +2 -2
  41. package/dist/cjs/nv-fieldtextarea.cjs.entry.js.map +1 -1
  42. package/dist/cjs/nv-fieldtime.cjs.entry.js +2 -2
  43. package/dist/cjs/nv-fieldtime.cjs.entry.js.map +1 -1
  44. package/dist/cjs/nv-icon.cjs.entry.js +1 -1
  45. package/dist/cjs/nv-iconbutton_2.cjs.entry.js +1 -1
  46. package/dist/cjs/nv-menu.cjs.entry.js +1 -1
  47. package/dist/cjs/nv-menuitem.cjs.entry.js +1 -1
  48. package/dist/cjs/nv-popover.cjs.entry.js +1 -1
  49. package/dist/cjs/nv-row.cjs.entry.js +1 -1
  50. package/dist/cjs/nv-stack.cjs.entry.js +1 -1
  51. package/dist/cjs/nv-table.cjs.entry.js +1 -1
  52. package/dist/cjs/nv-tablecolumn.cjs.entry.js +1 -1
  53. package/dist/cjs/nv-toggle.cjs.entry.js +1 -1
  54. package/dist/cjs/nv-tooltip.cjs.entry.js +1 -1
  55. package/dist/collection/components/nv-calendar/nv-calendar.js +235 -136
  56. package/dist/collection/components/nv-calendar/nv-calendar.js.map +1 -1
  57. package/dist/collection/components/nv-calendar/nv-calendar.utils.js +12 -3
  58. package/dist/collection/components/nv-calendar/nv-calendar.utils.js.map +1 -1
  59. package/dist/collection/components/nv-calendar/partials/calendar-actions.js +11 -0
  60. package/dist/collection/components/nv-calendar/partials/calendar-actions.js.map +1 -0
  61. package/dist/collection/components/nv-calendar/partials/calendar-grid.js +24 -0
  62. package/dist/collection/components/nv-calendar/partials/calendar-grid.js.map +1 -0
  63. package/dist/collection/components/nv-calendar/partials/calendar-header.js +38 -0
  64. package/dist/collection/components/nv-calendar/partials/calendar-header.js.map +1 -0
  65. package/dist/collection/components/nv-calendar/partials/calendar-shortcuts.js +22 -0
  66. package/dist/collection/components/nv-calendar/partials/calendar-shortcuts.js.map +1 -0
  67. package/dist/collection/components/nv-calendar/partials/day-cell.js +31 -0
  68. package/dist/collection/components/nv-calendar/partials/day-cell.js.map +1 -0
  69. package/dist/collection/components/nv-calendar/partials/index.js +7 -0
  70. package/dist/collection/components/nv-calendar/partials/index.js.map +1 -0
  71. package/dist/collection/components/nv-calendar/partials/week-numbers.js +36 -0
  72. package/dist/collection/components/nv-calendar/partials/week-numbers.js.map +1 -0
  73. package/dist/collection/components/nv-calendar/test/nv-calendar.utils.test.js +692 -651
  74. package/dist/collection/components/nv-calendar/test/nv-calendar.utils.test.js.map +1 -1
  75. package/dist/collection/components/nv-calendar/test/partials/calendar-actions.logic.test.js +169 -0
  76. package/dist/collection/components/nv-calendar/test/partials/calendar-actions.logic.test.js.map +1 -0
  77. package/dist/collection/components/nv-calendar/test/partials/calendar-grid.logic.test.js +262 -0
  78. package/dist/collection/components/nv-calendar/test/partials/calendar-grid.logic.test.js.map +1 -0
  79. package/dist/collection/components/nv-calendar/test/partials/calendar-header.logic.test.js +208 -0
  80. package/dist/collection/components/nv-calendar/test/partials/calendar-header.logic.test.js.map +1 -0
  81. package/dist/collection/components/nv-calendar/test/partials/calendar-shortcuts.logic.test.js +355 -0
  82. package/dist/collection/components/nv-calendar/test/partials/calendar-shortcuts.logic.test.js.map +1 -0
  83. package/dist/collection/components/nv-calendar/test/partials/day-cell.logic.test.js +250 -0
  84. package/dist/collection/components/nv-calendar/test/partials/day-cell.logic.test.js.map +1 -0
  85. package/dist/collection/components/nv-calendar/test/partials/week-numbers.logic.test.js +217 -0
  86. package/dist/collection/components/nv-calendar/test/partials/week-numbers.logic.test.js.map +1 -0
  87. package/dist/collection/components/nv-fielddate/nv-fielddate.js +56 -16
  88. package/dist/collection/components/nv-fielddate/nv-fielddate.js.map +1 -1
  89. package/dist/collection/components/nv-fielddate/styles/nv-fielddate.css +44 -0
  90. package/dist/collection/components/nv-fielddate/test/nv-fielddate.logic.test.js +196 -0
  91. package/dist/collection/components/nv-fielddate/test/nv-fielddate.logic.test.js.map +1 -0
  92. package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js +99 -43
  93. package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js.map +1 -1
  94. package/dist/collection/components/nv-fielddaterange/styles/nv-fielddaterange.css +44 -0
  95. package/dist/collection/components/nv-fielddaterange/test/nv-fielddaterange.logic.test.js +137 -0
  96. package/dist/collection/components/nv-fielddaterange/test/nv-fielddaterange.logic.test.js.map +1 -0
  97. package/dist/collection/components/nv-fielddropdown/styles/nv-fielddropdown.css +46 -0
  98. package/dist/collection/components/nv-fieldmultiselect/styles/nv-fieldmultiselect.css +46 -0
  99. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.css +44 -0
  100. package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.css +44 -0
  101. package/dist/collection/components/nv-fieldselect/nv-fieldselect.css +44 -0
  102. package/dist/collection/components/nv-fieldslider/nv-fieldslider.docs.js +22 -22
  103. package/dist/collection/components/nv-fieldslider/nv-fieldslider.docs.js.map +1 -1
  104. package/dist/collection/components/nv-fieldslider/nv-fieldslider.js +30 -29
  105. package/dist/collection/components/nv-fieldslider/nv-fieldslider.js.map +1 -1
  106. package/dist/collection/components/nv-fieldslider/styles/nv-fieldslider.css +91 -20
  107. package/dist/collection/components/nv-fieldtext/nv-fieldtext.css +44 -0
  108. package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.css +38 -0
  109. package/dist/collection/components/nv-fieldtime/styles/nv-fieldtime.css +44 -0
  110. package/dist/components/index.js +1 -1
  111. package/dist/components/nv-alert.js +2 -2
  112. package/dist/components/nv-avatar.js +2 -2
  113. package/dist/components/nv-badge.js +1 -1
  114. package/dist/components/nv-breadcrumb.js +3 -3
  115. package/dist/components/nv-breadcrumbs.js +1 -1
  116. package/dist/components/nv-button.js +1 -1
  117. package/dist/components/nv-calendar.js +1 -1
  118. package/dist/components/nv-col.js +1 -1
  119. package/dist/components/nv-datagrid.js +3 -3
  120. package/dist/components/nv-datagridcolumn.js +1 -1
  121. package/dist/components/nv-dialog.js +6 -6
  122. package/dist/components/nv-dialogfooter.js +1 -1
  123. package/dist/components/nv-dialogheader.js +1 -1
  124. package/dist/components/nv-fieldcheckbox.js +1 -1
  125. package/dist/components/nv-fielddate.js +53 -25
  126. package/dist/components/nv-fielddate.js.map +1 -1
  127. package/dist/components/nv-fielddaterange.js +85 -61
  128. package/dist/components/nv-fielddaterange.js.map +1 -1
  129. package/dist/components/nv-fielddropdown.js +7 -7
  130. package/dist/components/nv-fielddropdown.js.map +1 -1
  131. package/dist/components/nv-fielddropdownitem.js +1 -1
  132. package/dist/components/nv-fielddropdownitemcheck.js +1 -1
  133. package/dist/components/nv-fieldmultiselect.js +9 -9
  134. package/dist/components/nv-fieldmultiselect.js.map +1 -1
  135. package/dist/components/nv-fieldnumber.js +5 -5
  136. package/dist/components/nv-fieldnumber.js.map +1 -1
  137. package/dist/components/nv-fieldpassword.js +5 -5
  138. package/dist/components/nv-fieldpassword.js.map +1 -1
  139. package/dist/components/nv-fieldradio.js +1 -1
  140. package/dist/components/nv-fieldselect.js +5 -5
  141. package/dist/components/nv-fieldselect.js.map +1 -1
  142. package/dist/components/nv-fieldslider.js +27 -22
  143. package/dist/components/nv-fieldslider.js.map +1 -1
  144. package/dist/components/nv-fieldtext.js +1 -1
  145. package/dist/components/nv-fieldtextarea.js +2 -2
  146. package/dist/components/nv-fieldtextarea.js.map +1 -1
  147. package/dist/components/nv-fieldtime.js +6 -6
  148. package/dist/components/nv-fieldtime.js.map +1 -1
  149. package/dist/components/nv-icon.js +1 -1
  150. package/dist/components/nv-iconbutton.js +1 -1
  151. package/dist/components/nv-loader.js +1 -1
  152. package/dist/components/nv-menu.js +4 -4
  153. package/dist/components/nv-menuitem.js +1 -1
  154. package/dist/components/nv-popover.js +1 -1
  155. package/dist/components/nv-row.js +1 -1
  156. package/dist/components/nv-stack.js +1 -1
  157. package/dist/components/nv-table.js +1 -1
  158. package/dist/components/nv-tablecolumn.js +1 -1
  159. package/dist/components/nv-toggle.js +1 -1
  160. package/dist/components/nv-tooltip.js +1 -1
  161. package/dist/components/{p-d63f1cbe.js → p-2ae214d2.js} +3 -3
  162. package/dist/components/{p-d63f1cbe.js.map → p-2ae214d2.js.map} +1 -1
  163. package/dist/components/{p-c0a91091.js → p-3e32b5a1.js} +3 -3
  164. package/dist/components/{p-c0a91091.js.map → p-3e32b5a1.js.map} +1 -1
  165. package/dist/components/{p-4656efae.js → p-5e90b9b8.js} +376 -165
  166. package/dist/components/p-5e90b9b8.js.map +1 -0
  167. package/dist/components/{p-cbe9521f.js → p-5ee4015d.js} +3 -3
  168. package/dist/components/{p-cbe9521f.js.map → p-5ee4015d.js.map} +1 -1
  169. package/dist/components/{p-33e231f4.js → p-6277f746.js} +2 -2
  170. package/dist/components/{p-33e231f4.js.map → p-6277f746.js.map} +1 -1
  171. package/dist/components/{p-f0a5e7e4.js → p-7935c1cb.js} +4 -4
  172. package/dist/components/{p-f0a5e7e4.js.map → p-7935c1cb.js.map} +1 -1
  173. package/dist/components/{p-f1859ddc.js → p-8d92f0e1.js} +3 -3
  174. package/dist/components/{p-f1859ddc.js.map → p-8d92f0e1.js.map} +1 -1
  175. package/dist/components/{p-cbdc2c8b.js → p-95a7581c.js} +5 -5
  176. package/dist/components/{p-cbdc2c8b.js.map → p-95a7581c.js.map} +1 -1
  177. package/dist/components/{p-dd2273a3.js → p-9e6e26cb.js} +2 -2
  178. package/dist/components/{p-dd2273a3.js.map → p-9e6e26cb.js.map} +1 -1
  179. package/dist/components/{p-76a30bf1.js → p-9fa0de38.js} +2 -2
  180. package/dist/components/{p-76a30bf1.js.map → p-9fa0de38.js.map} +1 -1
  181. package/dist/components/{p-679e0fa9.js → p-aff3ed68.js} +10 -175
  182. package/dist/components/p-aff3ed68.js.map +1 -0
  183. package/dist/components/{p-d19b41d2.js → p-b6d858b2.js} +2 -2
  184. package/dist/components/{p-d19b41d2.js.map → p-b6d858b2.js.map} +1 -1
  185. package/dist/components/{p-83c8873a.js → p-bb6d1e4e.js} +2 -2
  186. package/dist/components/{p-83c8873a.js.map → p-bb6d1e4e.js.map} +1 -1
  187. package/dist/components/{p-581e67cc.js → p-c07c32d2.js} +3 -3
  188. package/dist/components/{p-581e67cc.js.map → p-c07c32d2.js.map} +1 -1
  189. package/dist/components/{p-04cb3a6f.js → p-c9006520.js} +4 -4
  190. package/dist/components/{p-04cb3a6f.js.map → p-c9006520.js.map} +1 -1
  191. package/dist/components/{p-07a89754.js → p-e28c4707.js} +3 -3
  192. package/dist/components/{p-07a89754.js.map → p-e28c4707.js.map} +1 -1
  193. package/dist/components/{p-0ab80d95.js → p-eabbc885.js} +2 -2
  194. package/dist/components/{p-0ab80d95.js.map → p-eabbc885.js.map} +1 -1
  195. package/dist/esm/{constants-b97e736d.js → constants-4faa1fae.js} +2 -2
  196. package/dist/esm/{constants-b97e736d.js.map → constants-4faa1fae.js.map} +1 -1
  197. package/dist/esm/{index-8f0e5f19.js → index-a1936cd0.js} +17 -184
  198. package/dist/esm/index-a1936cd0.js.map +1 -0
  199. package/dist/esm/index.js +1 -1
  200. package/dist/esm/loader.js +3 -3
  201. package/dist/esm/native.js +3 -24
  202. package/dist/esm/native.js.map +1 -1
  203. package/dist/esm/nv-alert.entry.js +2 -2
  204. package/dist/esm/nv-avatar.entry.js +2 -2
  205. package/dist/esm/nv-badge_2.entry.js +1 -1
  206. package/dist/esm/nv-breadcrumb.entry.js +1 -1
  207. package/dist/esm/nv-breadcrumbs.entry.js +1 -1
  208. package/dist/esm/nv-button.entry.js +2 -2
  209. package/dist/esm/nv-calendar.entry.js +372 -139
  210. package/dist/esm/nv-calendar.entry.js.map +1 -1
  211. package/dist/esm/nv-col.entry.js +1 -1
  212. package/dist/esm/nv-datagrid.entry.js +2 -2
  213. package/dist/esm/nv-datagridcolumn.entry.js +1 -1
  214. package/dist/esm/nv-dialog.entry.js +2 -2
  215. package/dist/esm/nv-dialogfooter_2.entry.js +2 -2
  216. package/dist/esm/nv-fieldcheckbox.entry.js +1 -1
  217. package/dist/esm/nv-fielddate.entry.js +45 -11
  218. package/dist/esm/nv-fielddate.entry.js.map +1 -1
  219. package/dist/esm/nv-fielddaterange.entry.js +75 -44
  220. package/dist/esm/nv-fielddaterange.entry.js.map +1 -1
  221. package/dist/esm/nv-fielddropdown.entry.js +2 -2
  222. package/dist/esm/nv-fielddropdown.entry.js.map +1 -1
  223. package/dist/esm/nv-fielddropdownitem.entry.js +1 -1
  224. package/dist/esm/nv-fieldmultiselect.entry.js +2 -2
  225. package/dist/esm/nv-fieldmultiselect.entry.js.map +1 -1
  226. package/dist/esm/nv-fieldnumber.entry.js +2 -2
  227. package/dist/esm/nv-fieldnumber.entry.js.map +1 -1
  228. package/dist/esm/nv-fieldpassword.entry.js +2 -2
  229. package/dist/esm/nv-fieldpassword.entry.js.map +1 -1
  230. package/dist/esm/nv-fieldradio.entry.js +1 -1
  231. package/dist/esm/nv-fieldselect.entry.js +2 -2
  232. package/dist/esm/nv-fieldselect.entry.js.map +1 -1
  233. package/dist/esm/nv-fieldslider.entry.js +25 -20
  234. package/dist/esm/nv-fieldslider.entry.js.map +1 -1
  235. package/dist/esm/nv-fieldtext.entry.js +2 -2
  236. package/dist/esm/nv-fieldtext.entry.js.map +1 -1
  237. package/dist/esm/nv-fieldtextarea.entry.js +2 -2
  238. package/dist/esm/nv-fieldtextarea.entry.js.map +1 -1
  239. package/dist/esm/nv-fieldtime.entry.js +3 -3
  240. package/dist/esm/nv-fieldtime.entry.js.map +1 -1
  241. package/dist/esm/nv-icon.entry.js +2 -2
  242. package/dist/esm/nv-iconbutton_2.entry.js +1 -1
  243. package/dist/esm/nv-menu.entry.js +1 -1
  244. package/dist/esm/nv-menuitem.entry.js +1 -1
  245. package/dist/esm/nv-popover.entry.js +1 -1
  246. package/dist/esm/nv-row.entry.js +1 -1
  247. package/dist/esm/nv-stack.entry.js +1 -1
  248. package/dist/esm/nv-table.entry.js +1 -1
  249. package/dist/esm/nv-tablecolumn.entry.js +1 -1
  250. package/dist/esm/nv-toggle.entry.js +1 -1
  251. package/dist/esm/nv-tooltip.entry.js +1 -1
  252. package/dist/native/index.esm.js +1 -1
  253. package/dist/native/native.css +1 -1
  254. package/dist/native/native.esm.js +1 -1
  255. package/dist/native/native.esm.js.map +1 -1
  256. package/dist/native/p-050d6c6c.entry.js +2 -0
  257. package/dist/native/{p-adc96c3a.entry.js.map → p-050d6c6c.entry.js.map} +1 -1
  258. package/dist/native/{p-519b4819.entry.js → p-08ca678c.entry.js} +2 -2
  259. package/dist/native/p-1a5d3b87.entry.js +2 -0
  260. package/dist/native/{p-7c676f2c.entry.js.map → p-1a5d3b87.entry.js.map} +1 -1
  261. package/dist/native/{p-0323daf6.entry.js → p-1c1ecd38.entry.js} +2 -2
  262. package/dist/native/{p-16a4cdf3.entry.js → p-1d98477d.entry.js} +2 -2
  263. package/dist/native/{p-19fb0fd0.entry.js → p-2006f5d4.entry.js} +2 -2
  264. package/dist/native/p-26cf4938.entry.js +2 -0
  265. package/dist/native/p-26cf4938.entry.js.map +1 -0
  266. package/dist/native/p-3817efb2.entry.js +2 -0
  267. package/dist/native/{p-fb897f7d.entry.js.map → p-3817efb2.entry.js.map} +1 -1
  268. package/dist/native/p-45459dbb.entry.js +2 -0
  269. package/dist/native/{p-5382eab2.entry.js.map → p-45459dbb.entry.js.map} +1 -1
  270. package/dist/native/p-45cbe6e4.entry.js +2 -0
  271. package/dist/native/p-46428304.entry.js +2 -0
  272. package/dist/native/p-46428304.entry.js.map +1 -0
  273. package/dist/native/{p-7092a675.entry.js → p-4f9cdf0b.entry.js} +2 -2
  274. package/dist/native/{p-cfe0a6c6.entry.js → p-58bb90ad.entry.js} +2 -2
  275. package/dist/native/p-59b07b36.entry.js +2 -0
  276. package/dist/native/{p-987c79d8.entry.js.map → p-59b07b36.entry.js.map} +1 -1
  277. package/dist/native/{p-4c0d81b0.entry.js → p-5b6c59e0.entry.js} +2 -2
  278. package/dist/native/p-6029e51b.entry.js +2 -0
  279. package/dist/native/{p-fc3bea07.entry.js.map → p-6029e51b.entry.js.map} +1 -1
  280. package/dist/native/{p-a2c0f1a7.entry.js → p-60c64f2b.entry.js} +2 -2
  281. package/dist/native/{p-3f2b6a22.entry.js → p-64a76565.entry.js} +2 -2
  282. package/dist/native/{p-c930adb7.entry.js → p-83288db0.entry.js} +2 -2
  283. package/dist/native/p-838f7842.entry.js +2 -0
  284. package/dist/native/{p-b0fc08e7.entry.js.map → p-838f7842.entry.js.map} +1 -1
  285. package/dist/native/{p-407fc32d.entry.js → p-86ab23ea.entry.js} +2 -2
  286. package/dist/native/p-87784622.entry.js +2 -0
  287. package/dist/native/p-8fb4e5c0.entry.js +2 -0
  288. package/dist/native/{p-5ba3fc3c.entry.js.map → p-8fb4e5c0.entry.js.map} +1 -1
  289. package/dist/native/{p-05d95d4d.entry.js → p-914da1e1.entry.js} +2 -2
  290. package/dist/native/p-abbe5d69.entry.js +2 -0
  291. package/dist/native/{p-7c6edd1c.entry.js.map → p-abbe5d69.entry.js.map} +1 -1
  292. package/dist/native/p-abc251aa.entry.js +2 -0
  293. package/dist/native/p-abc251aa.entry.js.map +1 -0
  294. package/dist/native/{p-221b8f72.entry.js → p-ad128108.entry.js} +2 -2
  295. package/dist/native/{p-f0ddf60b.entry.js → p-b5b9190a.entry.js} +2 -2
  296. package/dist/native/{p-de2c07a6.entry.js → p-b8f2c1e7.entry.js} +2 -2
  297. package/dist/native/{p-9fba8663.entry.js → p-d040bd61.entry.js} +2 -2
  298. package/dist/native/p-d0a33e64.js +3 -0
  299. package/dist/native/p-d0a33e64.js.map +1 -0
  300. package/dist/native/{p-ed488498.entry.js → p-d21b2da2.entry.js} +3 -3
  301. package/dist/native/{p-0ec1e2e3.entry.js → p-d53e8795.entry.js} +2 -2
  302. package/dist/native/p-dc7dd7f3.entry.js +2 -0
  303. package/dist/native/{p-21e7132f.entry.js.map → p-dc7dd7f3.entry.js.map} +1 -1
  304. package/dist/native/p-e2c1992e.entry.js +2 -0
  305. package/dist/native/{p-60b204ac.entry.js.map → p-e2c1992e.entry.js.map} +1 -1
  306. package/dist/native/{p-f85c08f1.js → p-e2d0a77d.js} +2 -2
  307. package/dist/native/p-ed6019fe.entry.js +2 -0
  308. package/dist/native/p-ed6019fe.entry.js.map +1 -0
  309. package/dist/native/p-f94d7054.entry.js +2 -0
  310. package/dist/native/{p-aa86af25.entry.js.map → p-f94d7054.entry.js.map} +1 -1
  311. package/dist/native/p-fdea17ce.entry.js +2 -0
  312. package/dist/native/{p-ef76178b.entry.js.map → p-fdea17ce.entry.js.map} +1 -1
  313. package/dist/types/components/nv-calendar/nv-calendar.d.ts +25 -45
  314. package/dist/types/components/nv-calendar/partials/calendar-actions.d.ts +19 -0
  315. package/dist/types/components/nv-calendar/partials/calendar-grid.d.ts +46 -0
  316. package/dist/types/components/nv-calendar/partials/calendar-header.d.ts +38 -0
  317. package/dist/types/components/nv-calendar/partials/calendar-shortcuts.d.ts +35 -0
  318. package/dist/types/components/nv-calendar/partials/day-cell.d.ts +35 -0
  319. package/dist/types/components/nv-calendar/partials/index.d.ts +6 -0
  320. package/dist/types/components/nv-calendar/partials/week-numbers.d.ts +30 -0
  321. package/dist/types/components/nv-calendar/test/partials/calendar-actions.logic.test.d.ts +1 -0
  322. package/dist/types/components/nv-calendar/test/partials/calendar-grid.logic.test.d.ts +1 -0
  323. package/dist/types/components/nv-calendar/test/partials/calendar-header.logic.test.d.ts +1 -0
  324. package/dist/types/components/nv-calendar/test/partials/calendar-shortcuts.logic.test.d.ts +1 -0
  325. package/dist/types/components/nv-calendar/test/partials/day-cell.logic.test.d.ts +1 -0
  326. package/dist/types/components/nv-calendar/test/partials/week-numbers.logic.test.d.ts +1 -0
  327. package/dist/types/components/nv-fielddate/nv-fielddate.d.ts +21 -9
  328. package/dist/types/components/nv-fielddate/test/nv-fielddate.logic.test.d.ts +1 -0
  329. package/dist/types/components/nv-fielddaterange/nv-fielddaterange.d.ts +17 -6
  330. package/dist/types/components/nv-fielddaterange/test/nv-fielddaterange.logic.test.d.ts +1 -0
  331. package/dist/types/components/nv-fieldslider/nv-fieldslider.d.ts +5 -6
  332. package/dist/types/components.d.ts +37 -38
  333. package/dist/vscode-data.json +4 -4
  334. package/hydrate/index.js +530 -229
  335. package/hydrate/index.mjs +530 -229
  336. package/package.json +1 -1
  337. package/dist/cjs/index-108ddff0.js.map +0 -1
  338. package/dist/components/p-4656efae.js.map +0 -1
  339. package/dist/components/p-679e0fa9.js.map +0 -1
  340. package/dist/esm/index-8f0e5f19.js.map +0 -1
  341. package/dist/native/p-1e3d3374.entry.js +0 -2
  342. package/dist/native/p-21e7132f.entry.js +0 -2
  343. package/dist/native/p-2805f9f2.entry.js +0 -2
  344. package/dist/native/p-2805f9f2.entry.js.map +0 -1
  345. package/dist/native/p-5382eab2.entry.js +0 -2
  346. package/dist/native/p-5ba3fc3c.entry.js +0 -2
  347. package/dist/native/p-60b204ac.entry.js +0 -2
  348. package/dist/native/p-711a7778.js +0 -3
  349. package/dist/native/p-711a7778.js.map +0 -1
  350. package/dist/native/p-759c9ce4.entry.js +0 -2
  351. package/dist/native/p-759c9ce4.entry.js.map +0 -1
  352. package/dist/native/p-7c676f2c.entry.js +0 -2
  353. package/dist/native/p-7c6edd1c.entry.js +0 -2
  354. package/dist/native/p-987c79d8.entry.js +0 -2
  355. package/dist/native/p-aa86af25.entry.js +0 -2
  356. package/dist/native/p-adc96c3a.entry.js +0 -2
  357. package/dist/native/p-b0fc08e7.entry.js +0 -2
  358. package/dist/native/p-d07ab618.entry.js +0 -2
  359. package/dist/native/p-dac0089b.entry.js +0 -2
  360. package/dist/native/p-dac0089b.entry.js.map +0 -1
  361. package/dist/native/p-ef76178b.entry.js +0 -2
  362. package/dist/native/p-f39803d9.entry.js +0 -2
  363. package/dist/native/p-f39803d9.entry.js.map +0 -1
  364. package/dist/native/p-fb897f7d.entry.js +0 -2
  365. package/dist/native/p-fc3bea07.entry.js +0 -2
  366. /package/dist/native/{p-519b4819.entry.js.map → p-08ca678c.entry.js.map} +0 -0
  367. /package/dist/native/{p-0323daf6.entry.js.map → p-1c1ecd38.entry.js.map} +0 -0
  368. /package/dist/native/{p-16a4cdf3.entry.js.map → p-1d98477d.entry.js.map} +0 -0
  369. /package/dist/native/{p-19fb0fd0.entry.js.map → p-2006f5d4.entry.js.map} +0 -0
  370. /package/dist/native/{p-1e3d3374.entry.js.map → p-45cbe6e4.entry.js.map} +0 -0
  371. /package/dist/native/{p-7092a675.entry.js.map → p-4f9cdf0b.entry.js.map} +0 -0
  372. /package/dist/native/{p-cfe0a6c6.entry.js.map → p-58bb90ad.entry.js.map} +0 -0
  373. /package/dist/native/{p-4c0d81b0.entry.js.map → p-5b6c59e0.entry.js.map} +0 -0
  374. /package/dist/native/{p-a2c0f1a7.entry.js.map → p-60c64f2b.entry.js.map} +0 -0
  375. /package/dist/native/{p-3f2b6a22.entry.js.map → p-64a76565.entry.js.map} +0 -0
  376. /package/dist/native/{p-c930adb7.entry.js.map → p-83288db0.entry.js.map} +0 -0
  377. /package/dist/native/{p-407fc32d.entry.js.map → p-86ab23ea.entry.js.map} +0 -0
  378. /package/dist/native/{p-d07ab618.entry.js.map → p-87784622.entry.js.map} +0 -0
  379. /package/dist/native/{p-05d95d4d.entry.js.map → p-914da1e1.entry.js.map} +0 -0
  380. /package/dist/native/{p-221b8f72.entry.js.map → p-ad128108.entry.js.map} +0 -0
  381. /package/dist/native/{p-f0ddf60b.entry.js.map → p-b5b9190a.entry.js.map} +0 -0
  382. /package/dist/native/{p-de2c07a6.entry.js.map → p-b8f2c1e7.entry.js.map} +0 -0
  383. /package/dist/native/{p-9fba8663.entry.js.map → p-d040bd61.entry.js.map} +0 -0
  384. /package/dist/native/{p-ed488498.entry.js.map → p-d21b2da2.entry.js.map} +0 -0
  385. /package/dist/native/{p-0ec1e2e3.entry.js.map → p-d53e8795.entry.js.map} +0 -0
  386. /package/dist/native/{p-f85c08f1.js.map → p-e2d0a77d.js.map} +0 -0
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-108ddff0.js');
5
+ const index = require('./index-c56424e5.js');
6
6
  const constants = require('./constants-8fb8ccc0.js');
7
7
  const _commonjsHelpers = require('./_commonjsHelpers-b3309d7b.js');
8
8
 
@@ -160,9 +160,18 @@ function isSameOrAfter(date, compareDate, options) {
160
160
  * @returns {number} Week number
161
161
  */
162
162
  function getWeekNumber(date) {
163
- const startOfYear = new Date(date.getFullYear(), 0, 1);
164
- const pastDaysOfYear = (date.getTime() - startOfYear.getTime()) / 86400000;
165
- return Math.ceil((pastDaysOfYear + startOfYear.getDay() + 1) / 7);
163
+ // Create a copy of the date to avoid modifying the original
164
+ const d = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()));
165
+ // Adjust to the same week Thursday (ISO 8601)
166
+ d.setUTCDate(d.getUTCDate() + 3 - ((d.getUTCDay() + 6) % 7));
167
+ // Calculate the first Thursday of the year
168
+ const week1 = new Date(Date.UTC(d.getUTCFullYear(), 0, 4));
169
+ // Calculate the week number
170
+ return (1 +
171
+ Math.round(((d.getTime() - week1.getTime()) / 86400000 -
172
+ 3 +
173
+ ((week1.getUTCDay() + 6) % 7)) /
174
+ 7));
166
175
  }
167
176
  /**
168
177
  * Convert a date string/Date to a Date without timezone offset
@@ -236,6 +245,175 @@ function parseDate(dateInput, dateFormat) {
236
245
  return parsed.toDate();
237
246
  }
238
247
 
248
+ /**
249
+ * Renders a single day cell in the calendar grid
250
+ * @param {DayCellProps} props - Component properties
251
+ * @returns {JSX.Element} JSX element representing a day cell
252
+ */
253
+ const DayCell = props => {
254
+ const { date, dayOfMonth, isCurrentMonth, isSelected, isInRange, isStart, isEnd, isToday, isDisabled, onClick, } = props;
255
+ // Build CSS classes for the day cell
256
+ const dayClasses = [
257
+ 'day',
258
+ isSelected ? 'selected' : '',
259
+ isStart ? 'range-start' : '',
260
+ isEnd ? 'range-end' : '',
261
+ isInRange ? 'in-range' : '',
262
+ isDisabled ? 'disabled' : '',
263
+ !isCurrentMonth ? 'outside-month' : '',
264
+ isToday ? 'is-today' : '',
265
+ ]
266
+ .filter(Boolean)
267
+ .join(' ');
268
+ const handleClick = () => {
269
+ if (!isDisabled && onClick) {
270
+ onClick(date);
271
+ }
272
+ };
273
+ return (
274
+ // eslint-disable-next-line react/jsx-no-bind
275
+ index.h("div", { class: dayClasses, onClick: handleClick, "aria-disabled": isDisabled }, dayOfMonth));
276
+ };
277
+
278
+ /**
279
+ * Renders the action buttons for the calendar (Cancel/OK)
280
+ * @param {CalendarActionsProps} props - Component properties
281
+ * @returns {JSX.Element} JSX element representing the action buttons
282
+ */
283
+ const CalendarActions = props => {
284
+ const { onReset, onConfirm, useSlot = false } = props;
285
+ return (index.h("div", { class: "datepicker-actions" }, useSlot ? (index.h("slot", { name: "actions" },
286
+ index.h("nv-button", { emphasis: "low", size: "xs", onClick: onReset }, "Cancel"),
287
+ index.h("nv-button", { size: "xs", onClick: onConfirm }, "OK"))) : (index.h("div", null,
288
+ index.h("nv-button", { emphasis: "low", size: "xs", onClick: onReset }, "Cancel"),
289
+ index.h("nv-button", { size: "xs", onClick: onConfirm }, "OK")))));
290
+ };
291
+
292
+ /**
293
+ * Renders the week numbers column for the calendar
294
+ * @param {WeekNumbersProps} props - Component properties
295
+ * @returns {JSX.Element} JSX element representing the week numbers
296
+ */
297
+ const WeekNumbers = props => {
298
+ const { weeks, localizedWeekText, selectionType, onWeekSelect, calendarIndex, } = props;
299
+ /**
300
+ * Handles click on a week number for range selection
301
+ * @param {Array<WeekData>} week - Week data
302
+ */
303
+ const handleWeekClick = (week) => {
304
+ if (selectionType === 'range') {
305
+ const dates = week.map(d => d.date);
306
+ onWeekSelect(dates, calendarIndex);
307
+ }
308
+ };
309
+ /**
310
+ * Creates a click handler for a specific week
311
+ * @param {Array<WeekData>} week - Week data
312
+ * @returns {() => void} Click handler function
313
+ */
314
+ const createWeekHandler = (week) => {
315
+ return () => handleWeekClick(week);
316
+ };
317
+ return (index.h("div", { class: "week-numbers" },
318
+ index.h("div", { class: "week-header" }, localizedWeekText),
319
+ weeks.map((week, weekIndex) => {
320
+ var _a;
321
+ const firstDayWithDate = ((_a = week.find(d => d.date)) === null || _a === void 0 ? void 0 : _a.date) || new Date();
322
+ const weekNumber = getWeekNumber(firstDayWithDate);
323
+ const isClickable = selectionType === 'range';
324
+ return (index.h("div", { class: `week-number ${isClickable ? 'clickable' : ''}`, onClick: createWeekHandler(week), key: `week-${weekIndex}`, role: isClickable ? 'button' : undefined, tabindex: isClickable ? 0 : undefined }, weekNumber));
325
+ })));
326
+ };
327
+
328
+ /**
329
+ * Renders the shortcuts for quick date selection
330
+ * @param {CalendarShortcutsProps} props - Component properties
331
+ * @returns {JSX.Element | null} JSX element representing the shortcuts or null if no shortcuts
332
+ */
333
+ const CalendarShortcuts = props => {
334
+ const { shortcuts, placement, onShortcutClick } = props;
335
+ if (!shortcuts || shortcuts.length === 0) {
336
+ return null;
337
+ }
338
+ /**
339
+ * Creates a click handler for a specific shortcut
340
+ * @param {ShortcutData} shortcut - The shortcut data
341
+ * @returns {() => void} Click handler function
342
+ */
343
+ const createShortcutHandler = (shortcut) => {
344
+ return () => onShortcutClick(shortcut);
345
+ };
346
+ return (index.h("div", { class: `shortcuts-container shortcuts-placement-${placement}` }, shortcuts.map((shortcut, index$1) => (index.h("nv-button", { key: `shortcut-${index$1}`, emphasis: "lower", size: "xs", "aria-label": shortcut.label, onClick: createShortcutHandler(shortcut) }, shortcut.label)))));
347
+ };
348
+
349
+ /**
350
+ * Renders the calendar header with navigation and date controls
351
+ * @param {CalendarHeaderProps} props - Component properties
352
+ * @returns {JSX.Element} JSX element representing the calendar header
353
+ */
354
+ const CalendarHeader = props => {
355
+ const { currentDate, months, numberOfCalendars, calendarIndex, monthOffset, onMonthChange, onMonthSelect, onYearChange, } = props;
356
+ /**
357
+ * Creates navigation handler for month change
358
+ * @param {number} direction - Direction of navigation (-1 or 1)
359
+ * @returns {() => void} Navigation handler function
360
+ */
361
+ const createNavigationHandler = (direction) => {
362
+ return () => onMonthChange(direction);
363
+ };
364
+ /**
365
+ * Creates month selection handler
366
+ * @param {number} offset - Month offset
367
+ * @returns {(event: Event) => void} Month selection handler function
368
+ */
369
+ const createMonthSelectHandler = (offset) => {
370
+ return (event) => onMonthSelect(event, offset);
371
+ };
372
+ /**
373
+ * Creates year change handler
374
+ * @param {number} offset - Month offset
375
+ * @returns {(event: Event) => void} Year change handler function
376
+ */
377
+ const createYearChangeHandler = (offset) => {
378
+ return (event) => onYearChange(event, offset);
379
+ };
380
+ const currentMonth = (currentDate.getUTCMonth() + monthOffset) % 12;
381
+ const currentYear = currentDate.getUTCFullYear() +
382
+ Math.floor((currentDate.getUTCMonth() + monthOffset) / 12);
383
+ return (index.h("div", { class: "header" },
384
+ numberOfCalendars > 1 && calendarIndex === 0 && (index.h("nv-iconbutton", { class: "nav-left", emphasis: "lower", name: "chevron-left", onClick: createNavigationHandler(-1) })),
385
+ index.h("div", { class: "date-controls" },
386
+ index.h("select", { class: "month-select mr-4", onChange: createMonthSelectHandler(monthOffset) }, months.map(month => (index.h("option", { key: month.value, value: month.value, selected: month.value === currentMonth }, month.label)))),
387
+ index.h("input", { type: "number", class: "year-input", min: "1950", max: "2100", value: currentYear, onChange: createYearChangeHandler(monthOffset) })),
388
+ numberOfCalendars === 1 && (index.h("div", { class: "nav-buttons" },
389
+ index.h("nv-iconbutton", { emphasis: "lower", name: "chevron-left", onClick: createNavigationHandler(-1) }),
390
+ index.h("nv-iconbutton", { emphasis: "lower", name: "chevron-right", onClick: createNavigationHandler(1) }))),
391
+ numberOfCalendars > 1 && calendarIndex === numberOfCalendars - 1 && (index.h("nv-iconbutton", { emphasis: "lower", name: "chevron-right", onClick: createNavigationHandler(1), class: "nav-right" }))));
392
+ };
393
+
394
+ /**
395
+ * Renders the calendar grid with day headers and day cells
396
+ * @param {CalendarGridProps} props - Component properties
397
+ * @returns {JSX.Element} JSX element representing the calendar grid
398
+ */
399
+ const CalendarGrid = props => {
400
+ const { days, dayNames, selectionType, selectedDate, startDate, endDate, isUTCMode, onDayClick, isDateInRange, isToday, } = props;
401
+ return (index.h("div", { class: "days-container" },
402
+ index.h("div", { class: "days-header" }, dayNames.map((day, index$1) => (index.h("div", { class: "day-header", key: `day-header-${index$1}` }, day)))),
403
+ index.h("div", { class: "days-grid" }, days.map(day => {
404
+ const date = day.date;
405
+ if (!date)
406
+ return null;
407
+ const isSelected = selectionType === 'single' &&
408
+ isSameDate(date, selectedDate, { isUTCMode });
409
+ const isInRange = isDateInRange(date);
410
+ const isStart = isSameDate(date, startDate, { isUTCMode });
411
+ const isEnd = isSameDate(date, endDate, { isUTCMode });
412
+ const isTodayDate = isToday(date);
413
+ return (index.h(DayCell, { date: date, dayOfMonth: day.dayOfMonth, isCurrentMonth: day.isCurrentMonth, isSelected: isSelected, isInRange: isInRange, isStart: isStart, isEnd: isEnd, isToday: isTodayDate, isDisabled: day.isDisabled, selectionType: selectionType, onClick: onDayClick }));
414
+ }))));
415
+ };
416
+
239
417
  const nvCalendarCss = "nv-calendar{display:block}.datepicker-root{display:flex;justify-content:center;align-items:flex-start;width:auto}.datepicker-container{font-family:system-ui, sans-serif;display:flex;flex-direction:column;align-items:stretch;background:var(--components-calendar-background);border-radius:var(--calendar-radius);padding:var(--calendar-padding);box-shadow:0px var(--shadow-y-axis-md-1) var(--shadow-blur-md-1) var(--shadow-spread-md, 0) var(--shadow-color-opacity-0), 0px var(--shadow-y-axis-md-2) var(--shadow-blur-md-2) var(--shadow-spread-md, 0) var(--shadow-color-opacity-2);border:1px solid var(--components-calendar-border);width:auto;max-width:100%}.datepicker-container-single{max-width:300px}.datepicker-container-single .datepicker-wrapper:has(.shortcuts-placement-left),.datepicker-container-single .datepicker-wrapper:has(.shortcuts-placement-right){max-width:410px !important}.datepicker-container-single:has(.shortcuts-placement-left),.datepicker-container-single:has(.shortcuts-placement-right){max-width:410px !important}.datepicker-wrapper{display:flex;justify-content:center;align-items:flex-start;gap:var(--calendar-gap-x);width:auto;overflow-x:hidden}.datepicker-wrapper::-webkit-scrollbar{width:6px;height:6px}.datepicker-wrapper::-webkit-scrollbar-track{background-color:var(--color-level-10-background);border-radius:9999px}.datepicker-wrapper::-webkit-scrollbar-thumb{background-color:var(--color-gray-200);border-radius:9999px}.datepicker-wrapper.single{justify-content:center}.calendar-container{display:flex;flex-direction:column;align-items:center;padding:var(--calendar-padding);width:auto;position:relative}.calendar-separator{width:1px;background:var(--components-calendar-border);height:auto;min-height:100%;margin:0 10px}.header{display:flex;justify-content:start;align-items:center;margin-bottom:var(--calendar-header-margin-bottom);width:100%}.header nv-iconbutton{width:var(--calendar-header-button-size);height:var(--calendar-header-button-size)}.nav-buttons{display:flex;gap:var(--spacing-0);margin-left:auto}.nav-left{order:-1}.date-controls{display:flex;gap:var(--spacing-1);align-items:center;min-height:34px;justify-content:center}.datepicker-container-single .date-controls{justify-content:flex-start}.datepicker-container:not(.datepicker-container-single) .date-controls{justify-content:start;flex-grow:1}.date-controls .month-select,.date-controls .year-input{background:transparent !important}.calendar-wrapper:nth-child(n+2) .datepicker-container{margin-left:42px}.calendar-grid{display:grid;grid-template-columns:auto 1fr;column-gap:var(--calendar-weeks-calendar-gap-x);position:relative}.calendar-grid.slide-left{animation:slideLeft 0.3s ease-out}.calendar-grid.slide-right{animation:slideRight 0.3s ease-out}.week-numbers{display:grid;grid-template-rows:var(--calendar-cell-size) repeat(6, var(--calendar-cell-size));background:var(--components-calendar-weeks-background);color:var(--components-calendar-weeks-text);border-radius:var(--calendar-weeks-radius);width:var(--calendar-weeks-size);row-gap:var(--calendar-grid-gap-y)}.week-numbers .clickable{cursor:pointer}.week-numbers .clickable:hover{background-color:var(--components-calendar-weeks-background-hover);color:var(--components-calendar-weeks-text-hover);border-radius:var(--calendar-radius)}.week-header,.week-number{display:grid;place-items:center;font-size:var(--calendar-cell-font-size)}.week-header{font-weight:700;color:var(--components-calendar-weeks-text)}.week-number{color:var(--components-calendar-cell-text)}.days-container{display:grid;grid-template-rows:auto 1fr;row-gap:var(--calendar-grid-gap-y)}.days-header{display:grid;grid-template-columns:repeat(7, var(--calendar-cell-size));height:var(--calendar-cell-size)}.day-header{display:grid;place-items:center;font-size:var(--calendar-cell-font-size);color:var(--components-calendar-cell-text)}.days-grid{display:grid;grid-template-columns:repeat(7, var(--calendar-cell-size));grid-template-rows:repeat(6, var(--calendar-cell-size));animation:fadeIn 0.2s ease-in;row-gap:var(--calendar-grid-gap-y);z-index:0}.day{display:grid;place-items:center;width:var(--calendar-cell-size);height:var(--calendar-cell-size);font-size:var(--calendar-cell-font-size);border-radius:var(--calendar-cell-radius);cursor:pointer;border:none;background:transparent;transition:all 0.2s ease;text-align:center;animation:scaleIn 0.2s ease-out}.day:hover:not(.disabled,.empty,.selected){background:var(--components-calendar-cell-background-hover);color:var(--components-calendar-cell-text-hover)}.day.selected,.day.selected:hover .day.is-today.selected,.day.is-today.selected:hover{background:var(--components-calendar-cell-background-selected);color:var(--components-calendar-cell-text-selected) !important}.day.disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.day.outside-month{color:var(--components-calendar-cell-text);opacity:var(--opacity-disabled)}.day.outside-month.selected{opacity:1 !important;color:var(--components-calendar-cell-text-selected)}.day.outside-month.in-range{opacity:0.5 !important;background-color:var(--components-calendar-cell-background-in-range);color:var(--components-calendar-cell-text-in-range)}.day.outside-month.in-range:hover{opacity:0.7 !important;background-color:var(--components-calendar-cell-background-in-range)}.day.in-range{background:var(--components-calendar-cell-background-in-range);color:var(--components-calendar-cell-text-in-range);border-radius:0;position:relative}.day.range-start,.day.range-start:focus,.day.range-start:hover,.day.range-end,.day.range-end:focus,.day.range-end:hover{background-color:var(--components-calendar-cell-background-selected) !important;color:var(--components-calendar-cell-text-selected) !important}.day.range-start,.day.range-end,.day.range-start.is-today,.day.range-end.is-today{background:var(--components-calendar-cell-background-selected);color:var(--components-calendar-cell-text-selected);position:relative;border-radius:var(--radius-rounded-full)}.day.range-start:hover,.day.range-end:hover,.day.range-start.is-today:hover,.day.range-end.is-today:hover{color:var(--components-calendar-cell-text-today)}.day.range-start:before,.day.range-end:before,.day.range-start.is-today:before,.day.range-end.is-today:before{content:\"\";position:absolute;bottom:0;left:0;right:0;top:0;z-index:-1;background-color:var(--components-calendar-cell-background-in-range);border-radius:var(--radius-rounded-full);width:auto;height:auto}.day.range-start:has(~.range-end):before,.day.range-start:has(+.in-range):before{border-top-right-radius:0;border-bottom-right-radius:0}.day.range-end:before{border-top-left-radius:0 !important;border-bottom-left-radius:0 !important}.day.outside-month.range-start,.day.outside-month.range-end{opacity:1 !important;background:var(--components-calendar-cell-background-selected) !important;color:var(--components-calendar-cell-text-selected)}.day.is-today{font-weight:700;position:relative;color:var(--components-calendar-cell-text-today)}.day.is-today.range-start,.day.is-today.range-end{color:var(--components-calendar-cell-text-selected)}.day.is-today.range-start:hover,.day.is-today.range-end:hover{color:var(--components-calendar-cell-text-today)}.day.is-today::after{content:\"\";position:absolute;bottom:var(--spacing-1);left:50%;transform:translateX(-50%);width:var(--calendar-cell-dot-size);height:var(--calendar-cell-dot-size);background-color:currentColor;border-radius:50%}.day.is-today.selected::after{color:var(--components-calendar-cell-text-selected)}.day.is-today.selected::after::after{background-color:var(--components-calendar-cell-dot-selected)}.calendar-footer{display:flex;gap:var(--spacing-1);justify-content:flex-start;width:100%;flex-wrap:wrap}.footer-placement-left{justify-content:flex-start}.footer-placement-right{justify-content:flex-end}.footer-placement-center{justify-content:center}.datepicker-controls{display:flex;flex-direction:column;border-top:1px solid var(--components-calendar-border);padding:var(--calendar-controls-padding-top) var(--calendar-padding) var(--calendar-padding);gap:var(--calendar-grid-gap-y);margin-top:var(--calendar-controls-margin-top)}.datepicker-actions{display:flex;justify-content:flex-end;gap:var(--spacing-1);width:100%}.datepicker-actions slot-fb{display:contents !important}.calendar-footer+.datepicker-actions{margin-top:0}.shortcuts-placement-left,.shortcuts-placement-right{display:flex;flex-direction:column;gap:var(--spacing-1);margin-top:var(--spacing-4)}.shortcuts-placement-left{align-items:flex-end}.shortcuts-placement-right{align-items:flex-start}@keyframes slideLeft{from{opacity:0;transform:translateX(20px)}to{opacity:1;transform:translateX(0)}}@keyframes slideRight{from{opacity:0;transform:translateX(-20px)}to{opacity:1;transform:translateX(0)}}@keyframes fadeIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes scaleIn{from{opacity:0;transform:scale(0.9)}to{opacity:1;transform:scale(1)}}";
240
418
  const NvCalendarStyle0 = nvCalendarCss;
241
419
 
@@ -244,18 +422,28 @@ const NvCalendar = class {
244
422
  index.registerInstance(this, hostRef);
245
423
  this.singleDateChange = index.createEvent(this, "singleDateChange", 7);
246
424
  this.rangeDateChange = index.createEvent(this, "rangeDateChange", 7);
425
+ this.valueChanged = index.createEvent(this, "valueChanged", 7);
247
426
  /****************************************************************************/
248
427
  //#region PROPERTIES
249
428
  /**
250
429
  * First day of the week (0 = Sunday, 1 = Monday, etc.)
251
- * @default 0
430
+ * @default 1
252
431
  */
253
- this.firstDayOfWeek = 0;
432
+ this.firstDayOfWeek = 1;
254
433
  /**
255
434
  * Number of calendars to display
256
435
  * @default 1
257
436
  */
258
437
  this.numberOfCalendars = 1;
438
+ /**
439
+ * Selected date value. For single mode: ISO date string. For range mode: comma-separated ISO date strings.
440
+ * Examples:
441
+ * - Single: "2025-03-15"
442
+ * - Range: "2025-03-15,2025-03-20"
443
+ * @default ""
444
+ */
445
+ // eslint-disable-next-line @stencil-community/strict-mutable
446
+ this.value = '';
259
447
  /**
260
448
  * Locale for date formatting
261
449
  * @default 'en-BE'
@@ -293,6 +481,75 @@ const NvCalendar = class {
293
481
  this.endDate = null;
294
482
  /** List of formatted months for the selector */
295
483
  this.months = [];
484
+ /**
485
+ * Parses the unified value prop and synchronizes with internal state
486
+ * @param {string} value - Value to parse
487
+ */
488
+ this.parseUnifiedValue = (value) => {
489
+ if (!value) {
490
+ // Reset all selections
491
+ this.selectedDate = null;
492
+ this.startDate = null;
493
+ this.endDate = null;
494
+ return;
495
+ }
496
+ const values = value
497
+ .split(',')
498
+ .map(v => v.trim())
499
+ .filter(Boolean);
500
+ if (this.selectionType === 'single' && values.length >= 1) {
501
+ const parsedDate = parseDate(values[0], this.dateFormat);
502
+ if (parsedDate) {
503
+ this.selectedDate = parsedDate;
504
+ // Only sync with legacy prop if not using actions (immediate mode)
505
+ if (!this.showActions) {
506
+ this.singleValue = values[0];
507
+ }
508
+ // Navigate to the date if not prevented
509
+ const preventNavigation = this.el.getAttribute('data-prevent-navigation') === 'true';
510
+ if (!preventNavigation) {
511
+ this.currentDate = parsedDate;
512
+ }
513
+ }
514
+ else {
515
+ // Handle malformed date gracefully - reset state
516
+ console.warn(`Invalid date format: ${values[0]}`);
517
+ this.selectedDate = null;
518
+ if (!this.showActions) {
519
+ this.singleValue = '';
520
+ }
521
+ }
522
+ }
523
+ else if (this.selectionType === 'range' && values.length >= 2) {
524
+ const startDate = parseDate(values[0], this.dateFormat);
525
+ const endDate = parseDate(values[1], this.dateFormat);
526
+ if (startDate && endDate) {
527
+ this.startDate = startDate;
528
+ this.endDate = endDate;
529
+ // Only sync with legacy prop if not using actions (immediate mode)
530
+ if (!this.showActions) {
531
+ this.rangeValue = {
532
+ start: values[0],
533
+ end: values[1],
534
+ };
535
+ }
536
+ // Navigate to start date if not prevented
537
+ const preventNavigation = this.el.getAttribute('data-prevent-navigation') === 'true';
538
+ if (!preventNavigation) {
539
+ this.currentDate = startDate;
540
+ }
541
+ }
542
+ else {
543
+ // Handle malformed dates gracefully - reset state
544
+ console.warn(`Invalid date range format: ${values[0]}, ${values[1]}`);
545
+ this.startDate = null;
546
+ this.endDate = null;
547
+ if (!this.showActions) {
548
+ this.rangeValue = { start: '', end: '' };
549
+ }
550
+ }
551
+ }
552
+ };
296
553
  /**
297
554
  * Change the displayed month
298
555
  * @param {number} offset - Month offset (-1 for previous, 1 for next)
@@ -340,7 +597,14 @@ const NvCalendar = class {
340
597
  return;
341
598
  const formattedDate = formatDate(date, { dateFormat: this.dateFormat });
342
599
  this.selectedDate = date;
343
- this.singleDateChange.emit(formattedDate);
600
+ // Update the unified value prop (like nv-fieldslider)
601
+ this.value = formattedDate;
602
+ this.valueChanged.emit(formattedDate);
603
+ // Legacy support (deprecated) - only sync props if not using actions
604
+ if (!this.showActions) {
605
+ this.singleValue = formattedDate;
606
+ this.singleDateChange.emit(formattedDate);
607
+ }
344
608
  };
345
609
  /**
346
610
  * Handles range date selection
@@ -348,18 +612,32 @@ const NvCalendar = class {
348
612
  */
349
613
  this.handleRangeSelection = (date) => {
350
614
  if (!this.startDate || (this.startDate && this.endDate)) {
615
+ // Start new range selection
351
616
  this.startDate = date;
352
617
  this.endDate = null;
353
618
  }
354
619
  else {
620
+ // Complete range selection
355
621
  this.endDate = date;
622
+ // Ensure correct order
356
623
  if (this.startDate > this.endDate) {
357
624
  [this.startDate, this.endDate] = [this.endDate, this.startDate];
358
625
  }
359
- this.rangeDateChange.emit({
360
- start: formatDate(this.startDate, { dateFormat: this.dateFormat }),
361
- end: formatDate(this.endDate, { dateFormat: this.dateFormat }),
626
+ const startFormatted = formatDate(this.startDate, {
627
+ dateFormat: this.dateFormat,
628
+ });
629
+ const endFormatted = formatDate(this.endDate, {
630
+ dateFormat: this.dateFormat,
362
631
  });
632
+ // Update the unified value prop (like nv-fieldslider)
633
+ this.value = `${startFormatted},${endFormatted}`;
634
+ this.valueChanged.emit(this.value);
635
+ // Legacy support (deprecated) - only sync props if not using actions
636
+ if (!this.showActions) {
637
+ const legacyRange = { start: startFormatted, end: endFormatted };
638
+ this.rangeDateChange.emit(legacyRange);
639
+ this.rangeValue = legacyRange;
640
+ }
363
641
  }
364
642
  };
365
643
  /**
@@ -418,23 +696,35 @@ const NvCalendar = class {
418
696
  * @returns {string[]} Array of short day names
419
697
  */
420
698
  this.getDayNames = () => {
699
+ let days;
421
700
  // If we have custom day names for this locale
422
701
  if (constants.CUSTOM_DAY_NAMES[this.locale]) {
423
- const days = [...constants.CUSTOM_DAY_NAMES[this.locale]];
424
- // Reorganize the days based on the first day of the week
425
- const firstDays = days.slice(0, this.firstDayOfWeek);
426
- const remainingDays = days.slice(this.firstDayOfWeek);
427
- return [...remainingDays, ...firstDays];
702
+ // Custom day names are expected to start with Monday (index 0 = Monday)
703
+ days = [...constants.CUSTOM_DAY_NAMES[this.locale]];
704
+ }
705
+ else {
706
+ // Generate days using Intl.DateTimeFormat, starting from Monday
707
+ const formatter = new Intl.DateTimeFormat(this.locale, {
708
+ weekday: 'short',
709
+ });
710
+ // Generate days starting from Monday (2023-01-02 was a Monday)
711
+ days = [...Array(7)].map((_, i) => formatter.format(new Date(2023, 0, i + 2)).toUpperCase());
712
+ }
713
+ // Now reorganize based on firstDayOfWeek
714
+ // 0 = Sunday, 1 = Monday (default), 2 = Tuesday, etc.
715
+ if (this.firstDayOfWeek === 0) {
716
+ // If Sunday is first day, move Sunday (last element) to the beginning
717
+ return [days[6], ...days.slice(0, 6)];
718
+ }
719
+ else if (this.firstDayOfWeek === 1) {
720
+ // If Monday is first day, return as-is (since our array starts with Monday)
721
+ return days;
722
+ }
723
+ else {
724
+ // For other first days (Tuesday=2, Wednesday=3, etc.)
725
+ const offset = this.firstDayOfWeek - 1; // Convert to 0-based offset from Monday
726
+ return [...days.slice(offset), ...days.slice(0, offset)];
428
727
  }
429
- // Otherwise, use the default behavior
430
- const formatter = new Intl.DateTimeFormat(this.locale, {
431
- weekday: 'short',
432
- });
433
- const days = [...Array(7)].map((_, i) => formatter.format(new Date(2023, 0, i + 1)).toUpperCase());
434
- // Reorganize the days based on the first day of the week
435
- const firstDays = days.slice(0, this.firstDayOfWeek);
436
- const remainingDays = days.slice(this.firstDayOfWeek);
437
- return [...remainingDays, ...firstDays];
438
728
  };
439
729
  /**
440
730
  * Generates the days of the current month
@@ -615,8 +905,15 @@ const NvCalendar = class {
615
905
  if (shortcut.singleValue) {
616
906
  const newDate = parseDate(shortcut.singleValue, this.dateFormat);
617
907
  this.selectedDate = newDate;
618
- this.singleDateChange.emit(formatDate(newDate, { dateFormat: this.dateFormat }));
619
- this.singleValue = formatDate(newDate, { dateFormat: this.dateFormat });
908
+ const formattedDate = formatDate(newDate, {
909
+ dateFormat: this.dateFormat,
910
+ });
911
+ // Update the unified value prop (like nv-fieldslider)
912
+ this.value = formattedDate;
913
+ this.valueChanged.emit(formattedDate);
914
+ // Legacy support (deprecated) - sync props
915
+ this.singleValue = formattedDate;
916
+ this.singleDateChange.emit(formattedDate);
620
917
  if (!this.showActions) {
621
918
  const event = new CustomEvent('closePopover', {
622
919
  bubbles: true,
@@ -631,14 +928,18 @@ const NvCalendar = class {
631
928
  const end = parseDate(shortcut.rangeValue.end, this.dateFormat);
632
929
  this.startDate = start;
633
930
  this.endDate = end;
634
- this.rangeDateChange.emit({
635
- start: formatDate(start, { dateFormat: this.dateFormat }),
636
- end: formatDate(end, { dateFormat: this.dateFormat }),
931
+ const startFormatted = formatDate(start, {
932
+ dateFormat: this.dateFormat,
637
933
  });
638
- this.rangeValue = {
639
- start: formatDate(start, { dateFormat: this.dateFormat }),
640
- end: formatDate(end, { dateFormat: this.dateFormat }),
641
- };
934
+ const endFormatted = formatDate(end, { dateFormat: this.dateFormat });
935
+ // Update the unified value prop (like nv-fieldslider)
936
+ this.value = `${startFormatted},${endFormatted}`;
937
+ this.valueChanged.emit(this.value);
938
+ // Legacy support (deprecated) - sync props
939
+ const legacyRange = { start: startFormatted, end: endFormatted };
940
+ this.rangeDateChange.emit(legacyRange);
941
+ // eslint-disable-next-line @stencil-community/strict-mutable
942
+ this.rangeValue = legacyRange;
642
943
  if (!this.showActions) {
643
944
  const event = new CustomEvent('closePopover', {
644
945
  bubbles: true,
@@ -656,79 +957,28 @@ const NvCalendar = class {
656
957
  this.forceCalendarUpdate = newDate => {
657
958
  this.currentDate = new Date(newDate);
658
959
  };
659
- /**
660
- * Handles month change with an offset
661
- * @param {number} direction - Direction (-1 for previous, 1 for next)
662
- * @returns {Function} Change month handler
663
- */
664
- this.getChangeMonthHandler = (direction) => {
665
- return () => this.changeMonth(direction);
666
- };
667
- /**
668
- * Handles month change from an event (ex: dropdown)
669
- * @param {number} offset - Month offset (0 by default)
670
- * @returns {Function} Change month handler
671
- */
672
- this.getHandleMonthChange = (offset) => {
673
- return (event) => this.handleMonthChange(event, offset);
674
- };
675
- /**
676
- * Handles year change from an event (ex: dropdown)
677
- * @param {number} offset - Year offset (0 by default)
678
- * @returns {Function} Change year handler
679
- */
680
- this.getHandleYearChange = (offset) => {
681
- return (event) => this.handleYearChange(event, offset);
682
- };
683
- /**
684
- * Handles day click
685
- * @param {Date} date - Date to handle
686
- * @param {boolean} isDisabled - Whether the date is disabled
687
- * @returns {Function} Day click handler
688
- */
689
- this.getDayClickHandler = (date, isDisabled) => {
690
- return isDisabled ? undefined : () => this.handleDateSelection(date);
691
- };
692
- /**
693
- * Handles shortcut selection
694
- * @param {Object} shortcut - Shortcut to handle
695
- * @param {string | Date} shortcut.singleValue - Selected date value
696
- * @param {Object} shortcut.rangeValue - Start and end date values
697
- * @param {string | Date} shortcut.rangeValue.start - Start date value
698
- * @param {string | Date} shortcut.rangeValue.end - End date value
699
- * @param {string} shortcut.label - Label
700
- * @returns {Function} Shortcut selection handler
701
- */
702
- this.getShortcutHandler = (shortcut) => {
703
- return () => this.applyShortcut(shortcut);
704
- };
705
- /**
706
- * Handles week selection
707
- * @param {Date[]} dates - Dates to handle
708
- * @param {number} index - Calendar index
709
- * @returns {Function} Week selection handler
710
- */
711
- this.getWeekSelectionHandler = (dates, index) => {
712
- return () => {
713
- if (this.selectionType === 'range') {
714
- this.handleWeekSelection(dates, index);
715
- }
716
- };
717
- };
718
960
  /**
719
961
  * Resets the current selection
720
962
  */
721
963
  this.resetSelection = () => {
722
964
  if (this.selectionType === 'single') {
723
965
  this.selectedDate = null;
966
+ // eslint-disable-next-line @stencil-community/strict-mutable
724
967
  this.singleValue = null;
968
+ // eslint-disable-next-line @stencil-community/strict-mutable
969
+ this.value = '';
725
970
  this.singleDateChange.emit('');
971
+ this.valueChanged.emit('');
726
972
  }
727
973
  else {
728
974
  this.startDate = null;
729
975
  this.endDate = null;
976
+ // eslint-disable-next-line @stencil-community/strict-mutable
730
977
  this.rangeValue = null;
978
+ // eslint-disable-next-line @stencil-community/strict-mutable
979
+ this.value = '';
731
980
  this.rangeDateChange.emit({ start: '', end: '' });
981
+ this.valueChanged.emit('');
732
982
  }
733
983
  };
734
984
  /**
@@ -740,6 +990,7 @@ const NvCalendar = class {
740
990
  dateFormat: this.dateFormat,
741
991
  });
742
992
  this.singleDateChange.emit(dateStr);
993
+ // eslint-disable-next-line @stencil-community/strict-mutable
743
994
  this.singleValue = dateStr;
744
995
  const event = new CustomEvent('closePopover', {
745
996
  bubbles: true,
@@ -754,6 +1005,7 @@ const NvCalendar = class {
754
1005
  start: formatDate(this.startDate, { dateFormat: this.dateFormat }),
755
1006
  end: formatDate(this.endDate, { dateFormat: this.dateFormat }),
756
1007
  });
1008
+ // eslint-disable-next-line @stencil-community/strict-mutable
757
1009
  this.rangeValue = {
758
1010
  start: formatDate(this.startDate, { dateFormat: this.dateFormat }),
759
1011
  end: formatDate(this.endDate, { dateFormat: this.dateFormat }),
@@ -776,8 +1028,7 @@ const NvCalendar = class {
776
1028
  * @description Renders the header of the calendar
777
1029
  */
778
1030
  this.renderHeader = (offset, index$1) => {
779
- return (index.h("div", { class: "header" }, this.numberOfCalendars > 1 && index$1 === 0 && (index.h("nv-iconbutton", { class: "nav-left", emphasis: "lower", name: "chevron-left", onClick: this.getChangeMonthHandler(-1) })), index.h("div", { class: "date-controls" }, index.h("select", { class: "month-select mr-4", onChange: this.getHandleMonthChange(offset) }, this.months.map(month => (index.h("option", { key: month.value, value: month.value, selected: month.value === (this.currentDate.getUTCMonth() + offset) % 12 }, month.label)))), index.h("input", { type: "number", class: "year-input", min: "1950", max: "2100", value: this.currentDate.getUTCFullYear() +
780
- Math.floor((this.currentDate.getUTCMonth() + offset) / 12), onChange: this.getHandleYearChange(offset) })), this.numberOfCalendars === 1 && (index.h("div", { class: "nav-buttons" }, index.h("nv-iconbutton", { emphasis: "lower", name: "chevron-left", onClick: this.getChangeMonthHandler(-1) }), index.h("nv-iconbutton", { emphasis: "lower", name: "chevron-right", onClick: this.getChangeMonthHandler(1) }))), this.numberOfCalendars > 1 && index$1 === this.numberOfCalendars - 1 && (index.h("nv-iconbutton", { emphasis: "lower", name: "chevron-right", onClick: this.getChangeMonthHandler(1), class: "nav-right" }))));
1031
+ return (index.h(CalendarHeader, { currentDate: this.currentDate, months: this.months, numberOfCalendars: this.numberOfCalendars, calendarIndex: index$1, monthOffset: offset, onMonthChange: this.changeMonth, onMonthSelect: this.handleMonthChange, onYearChange: this.handleYearChange }));
781
1032
  };
782
1033
  /**
783
1034
  * Renders the week numbers
@@ -791,42 +1042,7 @@ const NvCalendar = class {
791
1042
  weeks,
792
1043
  /** Calendar index */
793
1044
  index$1) => {
794
- return (index.h("div", { class: "week-numbers" }, index.h("div", { class: "week-header" }, this.getLocalizedWeekText()), weeks.map((week, weekIndex) => {
795
- var _a;
796
- const dates = week.map(d => d.date);
797
- return (index.h("div", { class: `week-number ${this.selectionType === 'range' ? 'clickable' : ''}`, onClick: this.getWeekSelectionHandler(dates, index$1), key: `week-${weekIndex}` }, getWeekNumber(((_a = week.find(d => d.date)) === null || _a === void 0 ? void 0 : _a.date) || new Date())));
798
- })));
799
- };
800
- this.renderDaysGrid = (
801
- /** Days to render */
802
- days) => {
803
- return (index.h("div", { class: "days-grid" }, days.map(day => {
804
- const date = day.date;
805
- if (!date)
806
- return null;
807
- const isSelected = this.selectionType === 'single' &&
808
- isSameDate(date, this.selectedDate, { isUTCMode: this.isUTCMode });
809
- const isInRange = this.isDateInRange(date);
810
- const isStart = isSameDate(date, this.startDate, {
811
- isUTCMode: this.isUTCMode,
812
- });
813
- const isEnd = isSameDate(date, this.endDate, {
814
- isUTCMode: this.isUTCMode,
815
- });
816
- const isToday = this.isToday(date);
817
- const isOutsideMonth = !day.isCurrentMonth;
818
- const dayClasses = [
819
- 'day',
820
- isSelected ? 'selected' : '',
821
- isStart ? 'range-start' : '',
822
- isEnd ? 'range-end' : '',
823
- isInRange ? 'in-range' : '',
824
- day.isDisabled ? 'disabled' : '',
825
- isOutsideMonth ? 'outside-month' : '',
826
- isToday ? 'is-today' : '',
827
- ];
828
- return (index.h("div", { class: dayClasses.filter(Boolean).join(' '), onClick: this.getDayClickHandler(date, day.isDisabled), "aria-disabled": day.isDisabled, key: `day-${date.toISOString()}` }, day.dayOfMonth));
829
- })));
1045
+ return (index.h(WeekNumbers, { weeks: weeks, localizedWeekText: this.getLocalizedWeekText(), selectionType: this.selectionType, onWeekSelect: this.handleWeekSelection, calendarIndex: index$1 }));
830
1046
  };
831
1047
  /**
832
1048
  * Renders the calendar
@@ -845,7 +1061,7 @@ const NvCalendar = class {
845
1061
  for (let i = 0; i < days.length; i += 7) {
846
1062
  weeks.push(days.slice(i, i + 7));
847
1063
  }
848
- return (index.h("div", { class: "calendar-wrapper" }, index.h("div", { class: "calendar-container", key: `calendar-${index$1}` }, this.renderHeader(offset, index$1), index.h("div", { class: "calendar-grid" }, this.showWeekNumbers && this.renderWeekNumbers(weeks, index$1), index.h("div", { class: "days-container" }, index.h("div", { class: "days-header" }, this.getDayNames().map(day => (index.h("div", { class: "day-header" }, day)))), this.renderDaysGrid(days)))), index$1 < this.numberOfCalendars - 1 && (index.h("div", { class: "calendar-separator" }))));
1064
+ return (index.h("div", { class: "calendar-wrapper" }, index.h("div", { class: "calendar-container", key: `calendar-${index$1}` }, this.renderHeader(offset, index$1), index.h("div", { class: "calendar-grid" }, this.showWeekNumbers && this.renderWeekNumbers(weeks, index$1), index.h(CalendarGrid, { days: days, dayNames: this.getDayNames(), selectionType: this.selectionType, selectedDate: this.selectedDate, startDate: this.startDate, endDate: this.endDate, isUTCMode: this.isUTCMode, onDayClick: this.handleDateSelection, isDateInRange: this.isDateInRange, isToday: this.isToday }))), index$1 < this.numberOfCalendars - 1 && (index.h("div", { class: "calendar-separator" }))));
849
1065
  };
850
1066
  /**
851
1067
  * Renders the shortcuts
@@ -856,7 +1072,7 @@ const NvCalendar = class {
856
1072
  if (!this.hasShortcuts) {
857
1073
  return null;
858
1074
  }
859
- return (index.h("div", { class: `shortcuts-container shortcuts-placement-${this.shortcutsPlacement}` }, this.shortcuts.map(shortcut => (index.h("nv-button", { emphasis: "lower", size: "xs", "aria-label": shortcut.label, onClick: this.getShortcutHandler(shortcut) }, shortcut.label)))));
1075
+ return (index.h(CalendarShortcuts, { shortcuts: this.shortcuts, placement: this.shortcutsPlacement, onShortcutClick: this.applyShortcut }));
860
1076
  };
861
1077
  /**
862
1078
  * Renders the actions
@@ -865,7 +1081,7 @@ const NvCalendar = class {
865
1081
  * @slot actions - Child content of the component.
866
1082
  */
867
1083
  this.renderActions = () => {
868
- return (index.h("div", { class: "datepicker-actions" }, index.h("slot", { name: "actions" }, index.h("nv-button", { emphasis: "low", size: "xs", onClick: this.resetSelection }, "Cancel"), index.h("nv-button", { size: "xs", onClick: this.confirmSelection }, "OK"))));
1084
+ return (index.h("div", { class: "datepicker-actions" }, index.h("slot", { name: "actions" }, index.h(CalendarActions, { onReset: this.resetSelection, onConfirm: this.confirmSelection, useSlot: false }))));
869
1085
  };
870
1086
  }
871
1087
  //#endregion EVENTS
@@ -929,12 +1145,26 @@ const NvCalendar = class {
929
1145
  }
930
1146
  }
931
1147
  }
1148
+ /**
1149
+ * Watches the changes of the unified value prop
1150
+ * @param {string} newValue - New value
1151
+ * @param {string} oldValue - Old value
1152
+ */
1153
+ onValueChange(newValue, oldValue) {
1154
+ if (newValue !== oldValue) {
1155
+ this.parseUnifiedValue(newValue);
1156
+ }
1157
+ }
932
1158
  //#endregion WATCHERS
933
1159
  /****************************************************************************/
934
1160
  //#region LIFECYCLE
935
1161
  componentWillLoad() {
936
1162
  this.parseDisabledDates();
937
- if (this.selectionType === 'single' && this.singleValue) {
1163
+ // Initialize from unified value prop if provided
1164
+ if (this.value) {
1165
+ this.parseUnifiedValue(this.value);
1166
+ }
1167
+ else if (this.selectionType === 'single' && this.singleValue) {
938
1168
  this.selectedDate = parseDate(this.singleValue, this.dateFormat);
939
1169
  this.currentDate = this.selectedDate;
940
1170
  }
@@ -947,6 +1177,7 @@ const NvCalendar = class {
947
1177
  this.currentDate = startDate;
948
1178
  if (swapped) {
949
1179
  // If dates were swapped, update the rangeValue property
1180
+ // eslint-disable-next-line @stencil-community/strict-mutable
950
1181
  this.rangeValue = {
951
1182
  start: formatDate(startDate, { dateFormat: this.dateFormat }),
952
1183
  end: formatDate(endDate, { dateFormat: this.dateFormat }),
@@ -958,7 +1189,8 @@ const NvCalendar = class {
958
1189
  console.error('Invalid rangeValue:', error);
959
1190
  }
960
1191
  }
961
- else {
1192
+ // Ensure currentDate is always initialized
1193
+ if (!this.currentDate) {
962
1194
  this.currentDate = new Date();
963
1195
  }
964
1196
  this.initializeMonths();
@@ -1028,15 +1260,16 @@ const NvCalendar = class {
1028
1260
  * @slot default - Child content of the component.
1029
1261
  */
1030
1262
  render() {
1031
- return (index.h(index.Host, { key: '9804c486acf32e12f2d88f932a54ca6260365887' }, index.h("div", { key: '8503f585401191b904f2de248ed0c24b1fed1505', class: "datepicker-root" }, index.h("div", { key: '9da71618bd2031b44f5a3fd889d40b2580fcca58', class: `datepicker-container ${this.numberOfCalendars === 1 ? 'datepicker-container-single' : ''}` }, index.h("div", { key: 'fbf71a34b520ca48f1440d8caeec442773b1e57a', class: `datepicker-wrapper ${this.numberOfCalendars === 1 ? 'single' : ''}` }, this.shortcutsPlacement === 'left' && this.renderShortcuts(), Array.from({ length: this.numberOfCalendars }, (_, index) => this.renderCalendar(index, index)), this.shortcutsPlacement === 'right' && this.renderShortcuts()), ((this.hasShortcuts && this.shortcutsPlacement === 'bottom') ||
1032
- this.hasActions) && (index.h("div", { key: '4431e3f1221e9d47807d58af380dcaa91bf05c48', class: "datepicker-controls" }, this.shortcutsPlacement === 'bottom' && this.renderShortcuts(), this.hasActions && this.renderActions())))), index.h("slot", { key: '30386356bda72f4f12a28351084ab498ec95f5b9' })));
1263
+ return (index.h(index.Host, { key: '43d4f3ab9199e9c5f15e853f15283fa59e4a436d' }, index.h("div", { key: 'b9956225cb2c16d997aa44266af8f8c8222ea968', class: "datepicker-root" }, index.h("div", { key: '05b63935bc5ebf500bb52d10688385f994b47fb4', class: `datepicker-container ${this.numberOfCalendars === 1 ? 'datepicker-container-single' : ''}` }, index.h("div", { key: 'd7af15b9ce051026cf841b3be361b32d8db41fc1', class: `datepicker-wrapper ${this.numberOfCalendars === 1 ? 'single' : ''}` }, this.shortcutsPlacement === 'left' && this.renderShortcuts(), Array.from({ length: this.numberOfCalendars }, (_, index) => this.renderCalendar(index, index)), this.shortcutsPlacement === 'right' && this.renderShortcuts()), ((this.hasShortcuts && this.shortcutsPlacement === 'bottom') ||
1264
+ this.hasActions) && (index.h("div", { key: '1765334bf15564bc9886b210c54bddba64c7042e', class: "datepicker-controls" }, this.shortcutsPlacement === 'bottom' && this.renderShortcuts(), this.hasActions && this.renderActions())))), index.h("slot", { key: '0ac3446394b8c23b859e5f0065370b95b6fd05d2' })));
1033
1265
  }
1034
1266
  get el() { return index.getElement(this); }
1035
1267
  static get watchers() { return {
1036
1268
  "numberOfCalendars": ["validateNumberOfCalendars"],
1037
1269
  "rangeValue": ["onRangeValueChange"],
1038
1270
  "disabledDates": ["handleDisabledDatesChange"],
1039
- "singleValue": ["onSingleValueChange"]
1271
+ "singleValue": ["onSingleValueChange"],
1272
+ "value": ["onValueChange"]
1040
1273
  }; }
1041
1274
  };
1042
1275
  NvCalendar.style = NvCalendarStyle0;