@beeq/core 1.12.14-beta.0 → 1.13.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 (545) hide show
  1. package/dist/beeq/beeq.esm.js +1 -1
  2. package/dist/beeq/beeq.esm.js.map +1 -1
  3. package/dist/beeq/index.esm.js +1 -1
  4. package/dist/beeq/{p-9d1503bd.entry.js → p-0d078519.entry.js} +2 -2
  5. package/dist/beeq/{p-9d1503bd.entry.js.map → p-0d078519.entry.js.map} +1 -1
  6. package/dist/beeq/{p-7f9d895b.entry.js → p-1a2c4878.entry.js} +2 -2
  7. package/dist/beeq/{p-7f9d895b.entry.js.map → p-1a2c4878.entry.js.map} +1 -1
  8. package/dist/beeq/p-21db4f39.entry.js +6 -0
  9. package/dist/beeq/p-21db4f39.entry.js.map +1 -0
  10. package/dist/beeq/{p-f47905ae.entry.js → p-24bb2588.entry.js} +2 -2
  11. package/dist/beeq/{p-f47905ae.entry.js.map → p-24bb2588.entry.js.map} +1 -1
  12. package/dist/beeq/{p-41910dc5.entry.js → p-2a081a54.entry.js} +2 -2
  13. package/dist/beeq/{p-41910dc5.entry.js.map → p-2a081a54.entry.js.map} +1 -1
  14. package/dist/beeq/{p-515a1162.entry.js → p-2e1fffcd.entry.js} +2 -2
  15. package/dist/beeq/{p-515a1162.entry.js.map → p-2e1fffcd.entry.js.map} +1 -1
  16. package/dist/beeq/p-2fd6ea70.entry.js +6 -0
  17. package/dist/beeq/{p-2283258e.entry.js.map → p-2fd6ea70.entry.js.map} +1 -1
  18. package/dist/beeq/{p-7d356cce.entry.js → p-30d1bd84.entry.js} +2 -2
  19. package/dist/beeq/p-30d1bd84.entry.js.map +1 -0
  20. package/dist/beeq/{p-882966dd.entry.js → p-38006c8e.entry.js} +2 -2
  21. package/dist/beeq/p-3d754d97.entry.js +6 -0
  22. package/dist/beeq/p-3d754d97.entry.js.map +1 -0
  23. package/dist/beeq/{p-e9535627.entry.js → p-45ae19aa.entry.js} +2 -2
  24. package/dist/beeq/p-45ae19aa.entry.js.map +1 -0
  25. package/dist/beeq/{p-54bfb042.entry.js → p-56b49d4e.entry.js} +2 -2
  26. package/dist/beeq/{p-54bfb042.entry.js.map → p-56b49d4e.entry.js.map} +1 -1
  27. package/dist/beeq/{p-0d8618d2.entry.js → p-58813f83.entry.js} +2 -2
  28. package/dist/beeq/{p-0d8618d2.entry.js.map → p-58813f83.entry.js.map} +1 -1
  29. package/dist/beeq/{p-050c757b.entry.js → p-5eba392c.entry.js} +2 -2
  30. package/dist/beeq/{p-050c757b.entry.js.map → p-5eba392c.entry.js.map} +1 -1
  31. package/dist/beeq/{p-debcabde.entry.js → p-6a38fcaf.entry.js} +2 -2
  32. package/dist/beeq/{p-debcabde.entry.js.map → p-6a38fcaf.entry.js.map} +1 -1
  33. package/dist/beeq/{p-8dfd0329.entry.js → p-6b0f896f.entry.js} +2 -2
  34. package/dist/beeq/{p-a0ef4135.entry.js → p-6be3f23a.entry.js} +2 -2
  35. package/dist/beeq/{p-a0ef4135.entry.js.map → p-6be3f23a.entry.js.map} +1 -1
  36. package/dist/beeq/{p-ea473f56.entry.js → p-72ff2fe2.entry.js} +2 -2
  37. package/dist/beeq/{p-7527b08d.entry.js → p-79fd999a.entry.js} +2 -2
  38. package/dist/beeq/{p-7527b08d.entry.js.map → p-79fd999a.entry.js.map} +1 -1
  39. package/dist/beeq/{p-0323869d.entry.js → p-7ebe6b9d.entry.js} +2 -2
  40. package/dist/beeq/p-7ebe6b9d.entry.js.map +1 -0
  41. package/dist/beeq/{p-250ee94e.entry.js → p-817f7a5e.entry.js} +2 -2
  42. package/dist/beeq/{p-250ee94e.entry.js.map → p-817f7a5e.entry.js.map} +1 -1
  43. package/dist/beeq/{p-ad419446.entry.js → p-8bd7f4c2.entry.js} +2 -2
  44. package/dist/beeq/{p-e63d6c4f.entry.js → p-8be7ceb5.entry.js} +2 -2
  45. package/dist/beeq/{p-e63d6c4f.entry.js.map → p-8be7ceb5.entry.js.map} +1 -1
  46. package/dist/beeq/{p-42e388d0.entry.js → p-9413a4d3.entry.js} +2 -2
  47. package/dist/beeq/{p-42e388d0.entry.js.map → p-9413a4d3.entry.js.map} +1 -1
  48. package/dist/beeq/{p-c25c20bf.entry.js → p-96f72671.entry.js} +2 -2
  49. package/dist/beeq/p-96f72671.entry.js.map +1 -0
  50. package/dist/beeq/{p-CO2T68hs.js → p-BSSRzVAz.js} +2 -2
  51. package/dist/beeq/p-BSSRzVAz.js.map +1 -0
  52. package/dist/beeq/p-DbxZ8FhA.js +6 -0
  53. package/dist/beeq/p-DbxZ8FhA.js.map +1 -0
  54. package/dist/beeq/p-DdvbF5yL.js.map +1 -1
  55. package/dist/beeq/p-Dx-CEPSQ.js.map +1 -1
  56. package/dist/beeq/p-a0a8ea5b.entry.js +6 -0
  57. package/dist/beeq/p-a0a8ea5b.entry.js.map +1 -0
  58. package/dist/beeq/{p-2e9bc398.entry.js → p-a55354ee.entry.js} +2 -2
  59. package/dist/beeq/{p-2e9bc398.entry.js.map → p-a55354ee.entry.js.map} +1 -1
  60. package/dist/beeq/{p-7adb6e2e.entry.js → p-a72671f9.entry.js} +2 -2
  61. package/dist/beeq/p-a72671f9.entry.js.map +1 -0
  62. package/dist/beeq/{p-40bb4e2c.entry.js → p-bb99b400.entry.js} +2 -2
  63. package/dist/beeq/{p-40bb4e2c.entry.js.map → p-bb99b400.entry.js.map} +1 -1
  64. package/dist/beeq/p-bdb983f9.entry.js +6 -0
  65. package/dist/beeq/{p-bb46524f.entry.js.map → p-bdb983f9.entry.js.map} +1 -1
  66. package/dist/beeq/{p-cfe07fad.entry.js → p-cf2e4d57.entry.js} +2 -2
  67. package/dist/beeq/{p-cfe07fad.entry.js.map → p-cf2e4d57.entry.js.map} +1 -1
  68. package/dist/beeq/{p-6cd90918.entry.js → p-d6c35472.entry.js} +2 -2
  69. package/dist/beeq/{p-6cd90918.entry.js.map → p-d6c35472.entry.js.map} +1 -1
  70. package/dist/beeq/p-d792e3d3.entry.js +6 -0
  71. package/dist/beeq/{p-edc81a31.entry.js.map → p-d792e3d3.entry.js.map} +1 -1
  72. package/dist/beeq/{p-bae91da4.entry.js → p-e91ee0da.entry.js} +2 -2
  73. package/dist/beeq/{p-bae91da4.entry.js.map → p-e91ee0da.entry.js.map} +1 -1
  74. package/dist/beeq/{p-1fb43de2.entry.js → p-e9a1b183.entry.js} +2 -2
  75. package/dist/beeq/{p-580f0a77.entry.js → p-f3184477.entry.js} +2 -2
  76. package/dist/beeq/{p-580f0a77.entry.js.map → p-f3184477.entry.js.map} +1 -1
  77. package/dist/beeq/p-f688d230.entry.js +6 -0
  78. package/dist/beeq/{p-1e675bdc.entry.js.map → p-f688d230.entry.js.map} +1 -1
  79. package/dist/beeq/{p-3c77308c.entry.js → p-f891fb4b.entry.js} +2 -2
  80. package/dist/beeq/{p-40163197.entry.js → p-fa123a10.entry.js} +2 -2
  81. package/dist/beeq/{p-40163197.entry.js.map → p-fa123a10.entry.js.map} +1 -1
  82. package/dist/beeq/p-kY6d9Evy.js +6 -0
  83. package/dist/beeq/p-kY6d9Evy.js.map +1 -0
  84. package/dist/beeq/p-uqkxeAeG.js.map +1 -1
  85. package/dist/beeq/svg/.icons-meta.json +13 -0
  86. package/dist/beeq.html-custom-data.json +2214 -106
  87. package/dist/cjs/beeq.cjs.js +3 -3
  88. package/dist/cjs/beeq.cjs.js.map +1 -1
  89. package/dist/cjs/bq-accordion-group.cjs.entry.js +2 -2
  90. package/dist/cjs/bq-accordion-group.cjs.entry.js.map +1 -1
  91. package/dist/cjs/bq-accordion.cjs.entry.js +3 -3
  92. package/dist/cjs/bq-accordion.cjs.entry.js.map +1 -1
  93. package/dist/cjs/bq-alert.cjs.entry.js +3 -3
  94. package/dist/cjs/bq-alert.cjs.entry.js.map +1 -1
  95. package/dist/cjs/bq-avatar.cjs.entry.js +3 -3
  96. package/dist/cjs/bq-avatar.cjs.entry.js.map +1 -1
  97. package/dist/cjs/bq-badge.cjs.entry.js +3 -3
  98. package/dist/cjs/bq-breadcrumb-item.cjs.entry.js +3 -3
  99. package/dist/cjs/bq-breadcrumb-item.cjs.entry.js.map +1 -1
  100. package/dist/cjs/bq-breadcrumb.cjs.entry.js +2 -2
  101. package/dist/cjs/bq-breadcrumb.cjs.entry.js.map +1 -1
  102. package/dist/cjs/bq-button_2.cjs.entry.js +6 -6
  103. package/dist/cjs/bq-button_2.cjs.entry.js.map +1 -1
  104. package/dist/cjs/bq-card.cjs.entry.js +3 -3
  105. package/dist/cjs/bq-card.cjs.entry.js.map +1 -1
  106. package/dist/cjs/bq-checkbox.cjs.entry.js +35 -22
  107. package/dist/cjs/bq-checkbox.cjs.entry.js.map +1 -1
  108. package/dist/cjs/bq-date-picker.cjs.entry.js +1743 -366
  109. package/dist/cjs/bq-date-picker.cjs.entry.js.map +1 -1
  110. package/dist/cjs/bq-dialog.cjs.entry.js +7 -7
  111. package/dist/cjs/bq-dialog.cjs.entry.js.map +1 -1
  112. package/dist/cjs/bq-divider.cjs.entry.js +7 -7
  113. package/dist/cjs/bq-drawer.cjs.entry.js +7 -7
  114. package/dist/cjs/bq-drawer.cjs.entry.js.map +1 -1
  115. package/dist/cjs/bq-dropdown_2.cjs.entry.js +6 -6
  116. package/dist/cjs/bq-dropdown_2.cjs.entry.js.map +1 -1
  117. package/dist/cjs/bq-empty-state.cjs.entry.js +8 -8
  118. package/dist/cjs/bq-empty-state.cjs.entry.js.map +1 -1
  119. package/dist/cjs/bq-input.cjs.entry.js +17 -10
  120. package/dist/cjs/bq-input.cjs.entry.js.map +1 -1
  121. package/dist/cjs/bq-notification.cjs.entry.js +8 -8
  122. package/dist/cjs/bq-notification.cjs.entry.js.map +1 -1
  123. package/dist/cjs/bq-option-group.cjs.entry.js +3 -3
  124. package/dist/cjs/bq-option-group.cjs.entry.js.map +1 -1
  125. package/dist/cjs/bq-option-list_2.cjs.entry.js +10 -10
  126. package/dist/cjs/bq-option-list_2.cjs.entry.js.map +1 -1
  127. package/dist/cjs/bq-option.cjs.entry.js +5 -5
  128. package/dist/cjs/bq-page-title.cjs.entry.js +6 -6
  129. package/dist/cjs/bq-page-title.cjs.entry.js.map +1 -1
  130. package/dist/cjs/bq-progress.cjs.entry.js +7 -7
  131. package/dist/cjs/bq-progress.cjs.entry.js.map +1 -1
  132. package/dist/cjs/bq-radio-group.cjs.entry.js +8 -12
  133. package/dist/cjs/bq-radio-group.cjs.entry.js.map +1 -1
  134. package/dist/cjs/bq-radio.cjs.entry.js +5 -5
  135. package/dist/cjs/bq-radio.cjs.entry.js.map +1 -1
  136. package/dist/cjs/bq-select.cjs.entry.js +39 -10
  137. package/dist/cjs/bq-select.cjs.entry.js.map +1 -1
  138. package/dist/cjs/bq-side-menu-item.cjs.entry.js +2 -2
  139. package/dist/cjs/bq-side-menu-item.cjs.entry.js.map +1 -1
  140. package/dist/cjs/bq-side-menu.cjs.entry.js +3 -3
  141. package/dist/cjs/bq-slider.cjs.entry.js +4 -4
  142. package/dist/cjs/bq-slider.cjs.entry.js.map +1 -1
  143. package/dist/cjs/bq-spinner.cjs.entry.js +8 -8
  144. package/dist/cjs/bq-spinner.cjs.entry.js.map +1 -1
  145. package/dist/cjs/bq-status.cjs.entry.js +4 -4
  146. package/dist/cjs/bq-status.cjs.entry.js.map +1 -1
  147. package/dist/cjs/bq-step-item.cjs.entry.js +7 -7
  148. package/dist/cjs/bq-step-item.cjs.entry.js.map +1 -1
  149. package/dist/cjs/bq-steps.cjs.entry.js +4 -4
  150. package/dist/cjs/bq-switch.cjs.entry.js +9 -20
  151. package/dist/cjs/bq-switch.cjs.entry.js.map +1 -1
  152. package/dist/cjs/bq-tab-group.cjs.entry.js +5 -5
  153. package/dist/cjs/bq-tab.cjs.entry.js +6 -6
  154. package/dist/cjs/bq-tab.cjs.entry.js.map +1 -1
  155. package/dist/cjs/bq-textarea.cjs.entry.js +17 -15
  156. package/dist/cjs/bq-textarea.cjs.entry.js.map +1 -1
  157. package/dist/cjs/bq-toast.cjs.entry.js +5 -7
  158. package/dist/cjs/bq-toast.cjs.entry.js.map +1 -1
  159. package/dist/cjs/bq-tooltip.cjs.entry.js +6 -6
  160. package/dist/cjs/bq-tooltip.cjs.entry.js.map +1 -1
  161. package/dist/cjs/{cssVariables-exM7Oz37.js → cssVariables-DuVz7KcV.js} +3 -3
  162. package/dist/cjs/cssVariables-DuVz7KcV.js.map +1 -0
  163. package/dist/cjs/event-BhuEFC-I.js.map +1 -1
  164. package/dist/cjs/{index-BSrsKFVG.js → index-J9jJ-fFQ.js} +47 -12
  165. package/dist/cjs/index-J9jJ-fFQ.js.map +1 -0
  166. package/dist/cjs/index.cjs.js +2 -2
  167. package/dist/cjs/loader.cjs.js +2 -2
  168. package/dist/cjs/{props-DzFXZXSF.js → props-BXpv3G-e.js} +6 -5
  169. package/dist/cjs/props-BXpv3G-e.js.map +1 -0
  170. package/dist/cjs/slot-DKWrtk4b.js.map +1 -1
  171. package/dist/cjs/transition-C0S-pYqN.js.map +1 -1
  172. package/dist/collection/collection-manifest.json +1 -1
  173. package/dist/collection/components/accordion-group/scss/bq-accordion-group.css +1 -1
  174. package/dist/collection/components/alert/scss/bq-alert.css +1 -1
  175. package/dist/collection/components/avatar/scss/bq-avatar.css +1 -1
  176. package/dist/collection/components/breadcrumb/scss/bq-breadcrumb.css +1 -1
  177. package/dist/collection/components/breadcrumb-item/bq-breadcrumb-item.js +1 -1
  178. package/dist/collection/components/breadcrumb-item/bq-breadcrumb-item.js.map +1 -1
  179. package/dist/collection/components/breadcrumb-item/scss/bq-breadcrumb-item.css +1 -1
  180. package/dist/collection/components/button/scss/bq-button.css +1 -1
  181. package/dist/collection/components/card/scss/bq-card.css +1 -1
  182. package/dist/collection/components/checkbox/bq-checkbox.js +35 -21
  183. package/dist/collection/components/checkbox/bq-checkbox.js.map +1 -1
  184. package/dist/collection/components/checkbox/scss/bq-checkbox.css +1 -1
  185. package/dist/collection/components/date-picker/bq-date-picker.js +1141 -457
  186. package/dist/collection/components/date-picker/bq-date-picker.js.map +1 -1
  187. package/dist/collection/components/date-picker/bq-date-picker.types.js +29 -0
  188. package/dist/collection/components/date-picker/bq-date-picker.types.js.map +1 -1
  189. package/dist/collection/components/date-picker/components/CalendarDayView.js +96 -0
  190. package/dist/collection/components/date-picker/components/CalendarDayView.js.map +1 -0
  191. package/dist/collection/components/date-picker/components/CalendarHeader.js +18 -0
  192. package/dist/collection/components/date-picker/components/CalendarHeader.js.map +1 -0
  193. package/dist/collection/components/date-picker/components/CalendarMonthView.js +70 -0
  194. package/dist/collection/components/date-picker/components/CalendarMonthView.js.map +1 -0
  195. package/dist/collection/components/date-picker/components/CalendarYearView.js +68 -0
  196. package/dist/collection/components/date-picker/components/CalendarYearView.js.map +1 -0
  197. package/dist/collection/components/date-picker/helper/bounds.js +114 -0
  198. package/dist/collection/components/date-picker/helper/bounds.js.map +1 -0
  199. package/dist/collection/components/date-picker/helper/calendar.js +156 -0
  200. package/dist/collection/components/date-picker/helper/calendar.js.map +1 -0
  201. package/dist/collection/components/date-picker/helper/constants.js +62 -16
  202. package/dist/collection/components/date-picker/helper/constants.js.map +1 -1
  203. package/dist/collection/components/date-picker/helper/input.js +37 -0
  204. package/dist/collection/components/date-picker/helper/input.js.map +1 -0
  205. package/dist/collection/components/date-picker/helper/intl.js +78 -0
  206. package/dist/collection/components/date-picker/helper/intl.js.map +1 -0
  207. package/dist/collection/components/date-picker/helper/labels.js +61 -0
  208. package/dist/collection/components/date-picker/helper/labels.js.map +1 -0
  209. package/dist/collection/components/date-picker/helper/navigation.js +45 -0
  210. package/dist/collection/components/date-picker/helper/navigation.js.map +1 -0
  211. package/dist/collection/components/date-picker/helper/selection.js +167 -0
  212. package/dist/collection/components/date-picker/helper/selection.js.map +1 -0
  213. package/dist/collection/components/date-picker/helper/value.js +49 -0
  214. package/dist/collection/components/date-picker/helper/value.js.map +1 -0
  215. package/dist/collection/components/date-picker/scss/bq-date-picker.css +1 -1
  216. package/dist/collection/components/dialog/bq-dialog.js +4 -4
  217. package/dist/collection/components/dialog/scss/bq-dialog.css +1 -1
  218. package/dist/collection/components/divider/bq-divider.js +4 -4
  219. package/dist/collection/components/drawer/bq-drawer.js +4 -4
  220. package/dist/collection/components/drawer/scss/bq-drawer.css +1 -1
  221. package/dist/collection/components/dropdown/bq-dropdown.js +1 -1
  222. package/dist/collection/components/dropdown/scss/bq-dropdown.css +1 -1
  223. package/dist/collection/components/empty-state/bq-empty-state.js +5 -5
  224. package/dist/collection/components/empty-state/scss/bq-empty-state.css +1 -1
  225. package/dist/collection/components/icon/bq-icon.js +1 -1
  226. package/dist/collection/components/icon/helper/request.js +1 -1
  227. package/dist/collection/components/icon/helper/request.js.map +1 -1
  228. package/dist/collection/components/icon/svg/.icons-meta.json +13 -0
  229. package/dist/collection/components/input/bq-input.js +15 -8
  230. package/dist/collection/components/input/bq-input.js.map +1 -1
  231. package/dist/collection/components/input/scss/bq-input.css +1 -1
  232. package/dist/collection/components/notification/bq-notification.js +5 -5
  233. package/dist/collection/components/notification/bq-notification.js.map +1 -1
  234. package/dist/collection/components/notification/scss/bq-notification.css +1 -1
  235. package/dist/collection/components/option/bq-option.js +4 -4
  236. package/dist/collection/components/option-group/bq-option-group.js +1 -1
  237. package/dist/collection/components/option-group/scss/bq-option-group.css +1 -1
  238. package/dist/collection/components/option-list/bq-option-list.js +1 -1
  239. package/dist/collection/components/option-list/scss/bq-option-list.css +1 -1
  240. package/dist/collection/components/page-title/bq-page-title.js +4 -4
  241. package/dist/collection/components/page-title/scss/bq-page-title.css +1 -1
  242. package/dist/collection/components/panel/bq-panel.js +2 -2
  243. package/dist/collection/components/panel/scss/bq-panel.css +1 -1
  244. package/dist/collection/components/progress/bq-progress.js +4 -4
  245. package/dist/collection/components/progress/scss/bq-progress.css +1 -1
  246. package/dist/collection/components/radio/bq-radio.js +5 -4
  247. package/dist/collection/components/radio/bq-radio.js.map +1 -1
  248. package/dist/collection/components/radio/scss/bq-radio.css +1 -1
  249. package/dist/collection/components/radio-group/bq-radio-group.js +6 -10
  250. package/dist/collection/components/radio-group/bq-radio-group.js.map +1 -1
  251. package/dist/collection/components/select/bq-select.js +59 -10
  252. package/dist/collection/components/select/bq-select.js.map +1 -1
  253. package/dist/collection/components/select/scss/bq-select.css +1 -1
  254. package/dist/collection/components/side-menu/bq-side-menu.js +2 -2
  255. package/dist/collection/components/side-menu-item/scss/bq-side-menu-item.css +1 -1
  256. package/dist/collection/components/slider/bq-slider.js +2 -2
  257. package/dist/collection/components/spinner/bq-spinner.js +4 -4
  258. package/dist/collection/components/spinner/scss/bq-spinner.css +1 -1
  259. package/dist/collection/components/status/bq-status.js +1 -1
  260. package/dist/collection/components/status/scss/bq-status.css +1 -1
  261. package/dist/collection/components/step-item/bq-step-item.js +4 -4
  262. package/dist/collection/components/step-item/scss/bq-step-item.css +1 -1
  263. package/dist/collection/components/steps/bq-steps.js +2 -2
  264. package/dist/collection/components/switch/bq-switch.js +9 -18
  265. package/dist/collection/components/switch/bq-switch.js.map +1 -1
  266. package/dist/collection/components/switch/scss/bq-switch.css +1 -1
  267. package/dist/collection/components/tab/bq-tab.js +3 -3
  268. package/dist/collection/components/tab/scss/bq-tab.css +1 -1
  269. package/dist/collection/components/tab-group/bq-tab-group.js +3 -3
  270. package/dist/collection/components/tag/bq-tag.js +4 -4
  271. package/dist/collection/components/tag/scss/bq-tag.css +1 -1
  272. package/dist/collection/components/textarea/bq-textarea.js +15 -13
  273. package/dist/collection/components/textarea/bq-textarea.js.map +1 -1
  274. package/dist/collection/components/textarea/scss/bq-textarea.css +1 -1
  275. package/dist/collection/components/toast/bq-toast.js +2 -4
  276. package/dist/collection/components/toast/bq-toast.js.map +1 -1
  277. package/dist/collection/components/toast/scss/bq-toast.css +1 -1
  278. package/dist/collection/components/tooltip/bq-tooltip.js +4 -4
  279. package/dist/collection/components/tooltip/scss/bq-tooltip.css +1 -1
  280. package/dist/collection/shared/test-utils/computedStyle.js +24 -24
  281. package/dist/collection/shared/test-utils/computedStyle.js.map +1 -1
  282. package/dist/collection/shared/test-utils/sleep.js +5 -1
  283. package/dist/collection/shared/test-utils/sleep.js.map +1 -1
  284. package/dist/collection/shared/utils/cssVariables.js +1 -1
  285. package/dist/collection/shared/utils/cssVariables.js.map +1 -1
  286. package/dist/collection/shared/utils/event.js.map +1 -1
  287. package/dist/collection/shared/utils/props.js +4 -3
  288. package/dist/collection/shared/utils/props.js.map +1 -1
  289. package/dist/collection/shared/utils/slot.js.map +1 -1
  290. package/dist/collection/shared/utils/transition.js.map +1 -1
  291. package/dist/components/bq-accordion-group.js +1 -1
  292. package/dist/components/bq-accordion.js +1 -1
  293. package/dist/components/bq-alert.js +1 -1
  294. package/dist/components/bq-avatar.js +1 -1
  295. package/dist/components/bq-badge.js +1 -1
  296. package/dist/components/bq-breadcrumb-item.js +1 -1
  297. package/dist/components/bq-breadcrumb-item.js.map +1 -1
  298. package/dist/components/bq-breadcrumb.js +1 -1
  299. package/dist/components/bq-button.js +1 -1
  300. package/dist/components/bq-card.js +1 -1
  301. package/dist/components/bq-checkbox.js +1 -1
  302. package/dist/components/bq-checkbox.js.map +1 -1
  303. package/dist/components/bq-date-picker.js +1 -1
  304. package/dist/components/bq-date-picker.js.map +1 -1
  305. package/dist/components/bq-dialog.js +1 -1
  306. package/dist/components/bq-dialog.js.map +1 -1
  307. package/dist/components/bq-divider.js +1 -1
  308. package/dist/components/bq-drawer.js +1 -1
  309. package/dist/components/bq-drawer.js.map +1 -1
  310. package/dist/components/bq-dropdown.js +1 -1
  311. package/dist/components/bq-empty-state.js +1 -1
  312. package/dist/components/bq-icon.js +1 -1
  313. package/dist/components/bq-input.js +1 -1
  314. package/dist/components/bq-input.js.map +1 -1
  315. package/dist/components/bq-notification.js +1 -1
  316. package/dist/components/bq-notification.js.map +1 -1
  317. package/dist/components/bq-option-group.js +1 -1
  318. package/dist/components/bq-option-group.js.map +1 -1
  319. package/dist/components/bq-option-list.js +1 -1
  320. package/dist/components/bq-option.js +1 -1
  321. package/dist/components/bq-page-title.js +1 -1
  322. package/dist/components/bq-page-title.js.map +1 -1
  323. package/dist/components/bq-panel.js +1 -1
  324. package/dist/components/bq-progress.js +1 -1
  325. package/dist/components/bq-radio-group.js +1 -1
  326. package/dist/components/bq-radio-group.js.map +1 -1
  327. package/dist/components/bq-radio.js +1 -1
  328. package/dist/components/bq-radio.js.map +1 -1
  329. package/dist/components/bq-select.js +1 -1
  330. package/dist/components/bq-select.js.map +1 -1
  331. package/dist/components/bq-side-menu-item.js +1 -1
  332. package/dist/components/bq-side-menu.js +1 -1
  333. package/dist/components/bq-slider.js +1 -1
  334. package/dist/components/bq-spinner.js +1 -1
  335. package/dist/components/bq-status.js +1 -1
  336. package/dist/components/bq-status.js.map +1 -1
  337. package/dist/components/bq-step-item.js +1 -1
  338. package/dist/components/bq-step-item.js.map +1 -1
  339. package/dist/components/bq-steps.js +1 -1
  340. package/dist/components/bq-switch.js +1 -1
  341. package/dist/components/bq-switch.js.map +1 -1
  342. package/dist/components/bq-tab-group.js +1 -1
  343. package/dist/components/bq-tab.js +1 -1
  344. package/dist/components/bq-tag.js +1 -1
  345. package/dist/components/bq-textarea.js +1 -1
  346. package/dist/components/bq-textarea.js.map +1 -1
  347. package/dist/components/bq-toast.js +1 -1
  348. package/dist/components/bq-toast.js.map +1 -1
  349. package/dist/components/bq-tooltip.js +1 -1
  350. package/dist/components/index.js +1 -1
  351. package/dist/components/{p-YjPwN7vu.js → p-2eUC8A3N.js} +2 -2
  352. package/dist/components/p-2eUC8A3N.js.map +1 -0
  353. package/dist/components/{p-D3RCJ1ti.js → p-BBCVL6R0.js} +2 -2
  354. package/dist/components/{p-BY4GkNoQ.js → p-BMHXMsVR.js} +2 -2
  355. package/dist/components/{p-4ksDMBf6.js → p-BS8hIETL.js} +2 -2
  356. package/dist/components/{p-DTsYGX5p.js → p-CWawcXxA.js} +2 -2
  357. package/dist/components/{p-DTsYGX5p.js.map → p-CWawcXxA.js.map} +1 -1
  358. package/dist/components/{p-fdkSHq2G.js → p-D6ngGq0Y.js} +2 -2
  359. package/dist/components/p-D6ngGq0Y.js.map +1 -0
  360. package/dist/components/{p-B99eLANt.js → p-DMKBBBUE.js} +2 -2
  361. package/dist/components/p-DbxZ8FhA.js +6 -0
  362. package/dist/components/p-DbxZ8FhA.js.map +1 -0
  363. package/dist/components/{p-CvvcRGDG.js → p-Dd3v3b2E.js} +2 -2
  364. package/dist/components/p-DdvbF5yL.js.map +1 -1
  365. package/dist/components/p-Dx-CEPSQ.js.map +1 -1
  366. package/dist/components/{p-Dj-mQvqv.js → p-iyX-PhkX.js} +2 -2
  367. package/dist/components/p-kY6d9Evy.js +6 -0
  368. package/dist/components/p-kY6d9Evy.js.map +1 -0
  369. package/dist/components/p-uqkxeAeG.js.map +1 -1
  370. package/dist/{beeq/p-edc81a31.entry.js → components/p-v3c5-Hhf.js} +2 -2
  371. package/dist/components/p-v3c5-Hhf.js.map +1 -0
  372. package/dist/custom-elements.json +25954 -1583
  373. package/dist/esm/beeq.js +4 -4
  374. package/dist/esm/beeq.js.map +1 -1
  375. package/dist/esm/bq-accordion-group.entry.js +2 -2
  376. package/dist/esm/bq-accordion-group.entry.js.map +1 -1
  377. package/dist/esm/bq-accordion.entry.js +3 -3
  378. package/dist/esm/bq-accordion.entry.js.map +1 -1
  379. package/dist/esm/bq-alert.entry.js +3 -3
  380. package/dist/esm/bq-alert.entry.js.map +1 -1
  381. package/dist/esm/bq-avatar.entry.js +3 -3
  382. package/dist/esm/bq-avatar.entry.js.map +1 -1
  383. package/dist/esm/bq-badge.entry.js +3 -3
  384. package/dist/esm/bq-breadcrumb-item.entry.js +3 -3
  385. package/dist/esm/bq-breadcrumb-item.entry.js.map +1 -1
  386. package/dist/esm/bq-breadcrumb.entry.js +2 -2
  387. package/dist/esm/bq-breadcrumb.entry.js.map +1 -1
  388. package/dist/esm/bq-button_2.entry.js +6 -6
  389. package/dist/esm/bq-button_2.entry.js.map +1 -1
  390. package/dist/esm/bq-card.entry.js +3 -3
  391. package/dist/esm/bq-card.entry.js.map +1 -1
  392. package/dist/esm/bq-checkbox.entry.js +35 -22
  393. package/dist/esm/bq-checkbox.entry.js.map +1 -1
  394. package/dist/esm/bq-date-picker.entry.js +1744 -367
  395. package/dist/esm/bq-date-picker.entry.js.map +1 -1
  396. package/dist/esm/bq-dialog.entry.js +7 -7
  397. package/dist/esm/bq-dialog.entry.js.map +1 -1
  398. package/dist/esm/bq-divider.entry.js +7 -7
  399. package/dist/esm/bq-drawer.entry.js +7 -7
  400. package/dist/esm/bq-drawer.entry.js.map +1 -1
  401. package/dist/esm/bq-dropdown_2.entry.js +6 -6
  402. package/dist/esm/bq-dropdown_2.entry.js.map +1 -1
  403. package/dist/esm/bq-empty-state.entry.js +8 -8
  404. package/dist/esm/bq-empty-state.entry.js.map +1 -1
  405. package/dist/esm/bq-input.entry.js +17 -10
  406. package/dist/esm/bq-input.entry.js.map +1 -1
  407. package/dist/esm/bq-notification.entry.js +8 -8
  408. package/dist/esm/bq-notification.entry.js.map +1 -1
  409. package/dist/esm/bq-option-group.entry.js +3 -3
  410. package/dist/esm/bq-option-group.entry.js.map +1 -1
  411. package/dist/esm/bq-option-list_2.entry.js +10 -10
  412. package/dist/esm/bq-option-list_2.entry.js.map +1 -1
  413. package/dist/esm/bq-option.entry.js +5 -5
  414. package/dist/esm/bq-page-title.entry.js +6 -6
  415. package/dist/esm/bq-page-title.entry.js.map +1 -1
  416. package/dist/esm/bq-progress.entry.js +7 -7
  417. package/dist/esm/bq-progress.entry.js.map +1 -1
  418. package/dist/esm/bq-radio-group.entry.js +8 -12
  419. package/dist/esm/bq-radio-group.entry.js.map +1 -1
  420. package/dist/esm/bq-radio.entry.js +5 -5
  421. package/dist/esm/bq-radio.entry.js.map +1 -1
  422. package/dist/esm/bq-select.entry.js +39 -10
  423. package/dist/esm/bq-select.entry.js.map +1 -1
  424. package/dist/esm/bq-side-menu-item.entry.js +2 -2
  425. package/dist/esm/bq-side-menu-item.entry.js.map +1 -1
  426. package/dist/esm/bq-side-menu.entry.js +3 -3
  427. package/dist/esm/bq-slider.entry.js +4 -4
  428. package/dist/esm/bq-slider.entry.js.map +1 -1
  429. package/dist/esm/bq-spinner.entry.js +8 -8
  430. package/dist/esm/bq-spinner.entry.js.map +1 -1
  431. package/dist/esm/bq-status.entry.js +4 -4
  432. package/dist/esm/bq-status.entry.js.map +1 -1
  433. package/dist/esm/bq-step-item.entry.js +7 -7
  434. package/dist/esm/bq-step-item.entry.js.map +1 -1
  435. package/dist/esm/bq-steps.entry.js +4 -4
  436. package/dist/esm/bq-switch.entry.js +9 -20
  437. package/dist/esm/bq-switch.entry.js.map +1 -1
  438. package/dist/esm/bq-tab-group.entry.js +5 -5
  439. package/dist/esm/bq-tab.entry.js +6 -6
  440. package/dist/esm/bq-tab.entry.js.map +1 -1
  441. package/dist/esm/bq-textarea.entry.js +17 -15
  442. package/dist/esm/bq-textarea.entry.js.map +1 -1
  443. package/dist/esm/bq-toast.entry.js +5 -7
  444. package/dist/esm/bq-toast.entry.js.map +1 -1
  445. package/dist/esm/bq-tooltip.entry.js +6 -6
  446. package/dist/esm/bq-tooltip.entry.js.map +1 -1
  447. package/dist/esm/{cssVariables-CyiWA5Ok.js → cssVariables-DhGXeOL_.js} +3 -3
  448. package/dist/esm/cssVariables-DhGXeOL_.js.map +1 -0
  449. package/dist/esm/event-Dx-CEPSQ.js.map +1 -1
  450. package/dist/esm/{index-CO2T68hs.js → index-BSSRzVAz.js} +47 -12
  451. package/dist/esm/index-BSSRzVAz.js.map +1 -0
  452. package/dist/esm/index.js +2 -2
  453. package/dist/esm/loader.js +3 -3
  454. package/dist/esm/{props-zh4P02Kn.js → props-DbxZ8FhA.js} +6 -5
  455. package/dist/esm/props-DbxZ8FhA.js.map +1 -0
  456. package/dist/esm/slot-uqkxeAeG.js.map +1 -1
  457. package/dist/esm/transition-DdvbF5yL.js.map +1 -1
  458. package/dist/hydrate/index.js +2142 -675
  459. package/dist/hydrate/index.mjs +2142 -675
  460. package/dist/stencil.config.js +7 -0
  461. package/dist/stencil.config.js.map +1 -1
  462. package/dist/types/components/checkbox/bq-checkbox.d.ts +4 -3
  463. package/dist/types/components/date-picker/bq-date-picker.d.ts +330 -238
  464. package/dist/types/components/date-picker/bq-date-picker.types.d.ts +30 -39
  465. package/dist/types/components/date-picker/components/CalendarDayView.d.ts +42 -0
  466. package/dist/types/components/date-picker/components/CalendarHeader.d.ts +34 -0
  467. package/dist/types/components/date-picker/components/CalendarMonthView.d.ts +34 -0
  468. package/dist/types/components/date-picker/components/CalendarYearView.d.ts +32 -0
  469. package/dist/types/components/date-picker/helper/bounds.d.ts +49 -0
  470. package/dist/types/components/date-picker/helper/calendar.d.ts +78 -0
  471. package/dist/types/components/date-picker/helper/constants.d.ts +62 -16
  472. package/dist/types/components/date-picker/helper/input.d.ts +23 -0
  473. package/dist/types/components/date-picker/helper/intl.d.ts +38 -0
  474. package/dist/types/components/date-picker/helper/labels.d.ts +29 -0
  475. package/dist/types/components/date-picker/helper/navigation.d.ts +23 -0
  476. package/dist/types/components/date-picker/helper/selection.d.ts +44 -0
  477. package/dist/types/components/date-picker/helper/value.d.ts +31 -0
  478. package/dist/types/components/input/bq-input.d.ts +1 -0
  479. package/dist/types/components/radio/bq-radio.d.ts +2 -1
  480. package/dist/types/components/select/bq-select.d.ts +5 -0
  481. package/dist/types/components/switch/bq-switch.d.ts +2 -3
  482. package/dist/types/components.d.ts +450 -350
  483. package/dist/types/home/runner/work/BEEQ/BEEQ/.stencil/packages/beeq/vitest.config.d.ts +2 -0
  484. package/dist/types/shared/test-utils/computedStyle.d.ts +7 -6
  485. package/dist/types/shared/test-utils/setProperties.d.ts +1 -1
  486. package/dist/types/shared/test-utils/sleep.d.ts +5 -1
  487. package/dist/types/shared/utils/event.d.ts +1 -1
  488. package/dist/types/shared/utils/slot.d.ts +1 -1
  489. package/dist/types/stencil-public-runtime.d.ts +1 -0
  490. package/dist/vitest.config.js +81 -0
  491. package/dist/vitest.config.js.map +1 -0
  492. package/package.json +1 -1
  493. package/dist/beeq/p-0323869d.entry.js.map +0 -1
  494. package/dist/beeq/p-1e675bdc.entry.js +0 -6
  495. package/dist/beeq/p-2283258e.entry.js +0 -6
  496. package/dist/beeq/p-654c7701.entry.js +0 -6
  497. package/dist/beeq/p-654c7701.entry.js.map +0 -1
  498. package/dist/beeq/p-7a6a89f1.entry.js +0 -6
  499. package/dist/beeq/p-7a6a89f1.entry.js.map +0 -1
  500. package/dist/beeq/p-7adb6e2e.entry.js.map +0 -1
  501. package/dist/beeq/p-7d356cce.entry.js.map +0 -1
  502. package/dist/beeq/p-CO2T68hs.js.map +0 -1
  503. package/dist/beeq/p-_RvVpeh2.js +0 -6
  504. package/dist/beeq/p-_RvVpeh2.js.map +0 -1
  505. package/dist/beeq/p-a83ce5aa.entry.js +0 -6
  506. package/dist/beeq/p-a83ce5aa.entry.js.map +0 -1
  507. package/dist/beeq/p-bb46524f.entry.js +0 -6
  508. package/dist/beeq/p-c25c20bf.entry.js.map +0 -1
  509. package/dist/beeq/p-e9535627.entry.js.map +0 -1
  510. package/dist/beeq/p-zh4P02Kn.js +0 -6
  511. package/dist/beeq/p-zh4P02Kn.js.map +0 -1
  512. package/dist/cjs/cssVariables-exM7Oz37.js.map +0 -1
  513. package/dist/cjs/index-BSrsKFVG.js.map +0 -1
  514. package/dist/cjs/props-DzFXZXSF.js.map +0 -1
  515. package/dist/collection/components/date-picker/libs/callyLibrary.js +0 -92
  516. package/dist/collection/components/date-picker/libs/callyLibrary.js.map +0 -1
  517. package/dist/components/p-DnqmdkvK.js +0 -6
  518. package/dist/components/p-DnqmdkvK.js.map +0 -1
  519. package/dist/components/p-YjPwN7vu.js.map +0 -1
  520. package/dist/components/p-_RvVpeh2.js +0 -6
  521. package/dist/components/p-_RvVpeh2.js.map +0 -1
  522. package/dist/components/p-fdkSHq2G.js.map +0 -1
  523. package/dist/components/p-zh4P02Kn.js +0 -6
  524. package/dist/components/p-zh4P02Kn.js.map +0 -1
  525. package/dist/esm/cssVariables-CyiWA5Ok.js.map +0 -1
  526. package/dist/esm/index-CO2T68hs.js.map +0 -1
  527. package/dist/esm/props-zh4P02Kn.js.map +0 -1
  528. package/dist/jest.config.js +0 -23
  529. package/dist/jest.config.js.map +0 -1
  530. package/dist/types/Users/dramos/PROJECTs/ENDAVA/BEEQ-Design-System/.stencil/packages/beeq/jest.config.d.ts +0 -19
  531. package/dist/types/components/date-picker/libs/callyLibrary.d.ts +0 -15
  532. /package/dist/beeq/{p-882966dd.entry.js.map → p-38006c8e.entry.js.map} +0 -0
  533. /package/dist/beeq/{p-8dfd0329.entry.js.map → p-6b0f896f.entry.js.map} +0 -0
  534. /package/dist/beeq/{p-ea473f56.entry.js.map → p-72ff2fe2.entry.js.map} +0 -0
  535. /package/dist/beeq/{p-ad419446.entry.js.map → p-8bd7f4c2.entry.js.map} +0 -0
  536. /package/dist/beeq/{p-1fb43de2.entry.js.map → p-e9a1b183.entry.js.map} +0 -0
  537. /package/dist/beeq/{p-3c77308c.entry.js.map → p-f891fb4b.entry.js.map} +0 -0
  538. /package/dist/components/{p-D3RCJ1ti.js.map → p-BBCVL6R0.js.map} +0 -0
  539. /package/dist/components/{p-BY4GkNoQ.js.map → p-BMHXMsVR.js.map} +0 -0
  540. /package/dist/components/{p-4ksDMBf6.js.map → p-BS8hIETL.js.map} +0 -0
  541. /package/dist/components/{p-B99eLANt.js.map → p-DMKBBBUE.js.map} +0 -0
  542. /package/dist/components/{p-CvvcRGDG.js.map → p-Dd3v3b2E.js.map} +0 -0
  543. /package/dist/components/{p-Dj-mQvqv.js.map → p-iyX-PhkX.js.map} +0 -0
  544. /package/dist/types/{Users/dramos/PROJECTs/ENDAVA/BEEQ-Design-System → home/runner/work/BEEQ/BEEQ}/.stencil/packages/beeq/stencil.config.d.ts +0 -0
  545. /package/dist/types/{Users/dramos/PROJECTs/ENDAVA/BEEQ-Design-System → home/runner/work/BEEQ/BEEQ}/.stencil/tailwind.config.d.ts +0 -0
@@ -4,126 +4,957 @@
4
4
  */
5
5
  'use strict';
6
6
 
7
- var index = require('./index-BSrsKFVG.js');
8
- var isClient = require('./isClient-CrXhXxbA.js');
7
+ var index = require('./index-J9jJ-fFQ.js');
9
8
  var form = require('./form-COLxwVaW.js');
10
9
  var isNil = require('./isNil-CFhdj92S.js');
11
10
  var event = require('./event-BhuEFC-I.js');
12
- var isDefined = require('./isDefined-D24L82z9.js');
13
11
  var isHTMLElement = require('./isHTMLElement-CtkOWsTF.js');
14
- var props = require('./props-DzFXZXSF.js');
12
+ var props = require('./props-BXpv3G-e.js');
15
13
  var slot = require('./slot-DKWrtk4b.js');
14
+ var isDefined = require('./isDefined-D24L82z9.js');
16
15
  require('./isString-CA9m1aBg.js');
17
16
 
17
+ const INPUT_VALIDATION = ['error', 'none', 'success', 'warning'];
18
+
19
+ const DAYS_OF_WEEK = [0, 1, 2, 3, 4, 5, 6];
18
20
  /** The type of the date picker */
19
21
  const DATE_PICKER_TYPE = ['single', 'multi', 'range'];
22
+ /** The calendar view */
23
+ const CALENDAR_VIEW = ['days', 'months', 'years'];
24
+ /** Positioning strategy for the panel. */
25
+ const FLOATING_STRATEGY = ['fixed', 'absolute'];
26
+ /** Placement of the panel — mirrors `@floating-ui/dom` placements. */
27
+ const FLOATING_PLACEMENT = [
28
+ 'top',
29
+ 'top-start',
30
+ 'top-end',
31
+ 'right',
32
+ 'right-start',
33
+ 'right-end',
34
+ 'bottom',
35
+ 'bottom-start',
36
+ 'bottom-end',
37
+ 'left',
38
+ 'left-start',
39
+ 'left-end',
40
+ ];
41
+ /** How the next/previous buttons should step through months. */
42
+ const MONTHS_PER_VIEW = ['single', 'months'];
43
+ /**
44
+ * The precision of the value produced by the date picker.
45
+ * - `day` → `YYYY-MM-DD` (default; drill-down to days)
46
+ * - `month` → `YYYY-MM` (selection commits on the months view)
47
+ * - `year` → `YYYY` (selection commits on the years view)
48
+ */
49
+ const DATE_PRECISION = ['day', 'month', 'year'];
20
50
 
21
51
  /** Default fallback input ID */
22
52
  const DEFAULT_INPUT_ID = 'date-picker';
23
- /** Calendar month shadow DOM parts for common elements */
24
- const CALENDAR_COMMON_EXPORT_PARTS = 'calendar__heading,calendar__table,calendar__tr,calendar__head,calendar__week,calendar__th,calendar__td';
25
- /** Calendar month shadow DOM parts for button elements */
26
- const CALENDAR_BUTTON_EXPORT_PARTS = 'calendar__button,calendar__day,calendar__selected,calendar__today,calendar__disallowed,calendar__outside,calendar__range-start,calendar__range-end,calendar__range-inner';
27
- /** Combined export parts for calendar-month component */
28
- const CALENDAR_MONTH_EXPORT_PARTS = `${CALENDAR_COMMON_EXPORT_PARTS},${CALENDAR_BUTTON_EXPORT_PARTS}`;
29
- /** Export parts for the calendar container component (calendar-date, calendar-range, calendar-multi) */
30
- const CALENDAR_CONTAINER_EXPORT_PARTS = 'container:calendar__container,header:calendar__header,button:calendar__button,previous:calendar__previous,next:calendar__next,disabled:calendar__disabled,heading:calendar__heading';
31
- /** Maps picker type to Cally component tag name */
32
- const CALENDAR_TYPE_MAP = {
33
- single: 'calendar-date',
34
- multi: 'calendar-multi',
35
- range: 'calendar-range',
53
+ /** Default aria labels used by the calendar navigation */
54
+ const DEFAULT_ARIA_LABELS = {
55
+ previousMonth: 'Previous month',
56
+ nextMonth: 'Next month',
57
+ previousYear: 'Previous year',
58
+ nextYear: 'Next year',
59
+ previousDecade: 'Previous decade',
60
+ nextDecade: 'Next decade',
61
+ chooseMonth: 'Choose month',
62
+ chooseYear: 'Choose year',
63
+ chooseDate: 'Choose date',
64
+ };
65
+ /**
66
+ * Shadow DOM parts exposed by the component.
67
+ * Kept as a single list so it is easy to audit against the JSDoc @part list.
68
+ */
69
+ const CALENDAR_PARTS = {
70
+ base: 'base',
71
+ label: 'label',
72
+ control: 'control',
73
+ prefix: 'prefix',
74
+ suffix: 'suffix',
75
+ input: 'input',
76
+ clearBtn: 'clear-btn',
77
+ button: 'button',
78
+ container: 'calendar__container',
79
+ header: 'calendar__header',
80
+ heading: 'calendar__heading',
81
+ previous: 'calendar__previous',
82
+ next: 'calendar__next',
83
+ table: 'calendar__table',
84
+ head: 'calendar__head',
85
+ tr: 'calendar__tr',
86
+ th: 'calendar__th',
87
+ week: 'calendar__week',
88
+ td: 'calendar__td',
89
+ day: 'calendar__day',
90
+ today: 'calendar__today',
91
+ selected: 'calendar__selected',
92
+ outside: 'calendar__outside',
93
+ disallowed: 'calendar__disallowed',
94
+ disabled: 'calendar__disabled',
95
+ rangeStart: 'calendar__range-start',
96
+ rangeEnd: 'calendar__range-end',
97
+ rangeInner: 'calendar__range-inner',
98
+ months: 'calendar__months',
99
+ month: 'calendar__month',
100
+ monthSelected: 'calendar__month-selected',
101
+ years: 'calendar__years',
102
+ year: 'calendar__year',
103
+ yearSelected: 'calendar__year-selected',
104
+ calendarTrigger: 'calendar-trigger',
105
+ };
106
+ /** Number of years shown in the decade view grid. Uses 12 to fill a 3x4 grid. */
107
+ const DECADE_GRID_SIZE = 12;
108
+ /**
109
+ * Maximum number of month panels rendered side-by-side. Range pickers only
110
+ * benefit from up to 2 panels — beyond that the popover overflows most
111
+ * viewports and roving keyboard navigation becomes confusing.
112
+ */
113
+ const MAX_MONTHS_PER_VIEW = 2;
114
+
115
+ /**
116
+ * Bounds predicates for the calendar.
117
+ *
118
+ * `min` and `max` may be at any wire precision (`YYYY`, `YYYY-MM`, or
119
+ * `YYYY-MM-DD`); internal cell values are always full `YYYY-MM-DD` strings.
120
+ * All predicates are pure and rely on lexicographic comparison, which is
121
+ * safe for ISO 8601 dates.
122
+ */
123
+ /**
124
+ * Extract the `YYYY` prefix (as a number) from a bound string.
125
+ * Returns `null` if the string does not begin with a 4-digit year.
126
+ */
127
+ const boundYear = (iso) => {
128
+ if (!iso)
129
+ return null;
130
+ const match = /^(\d{4})/.exec(iso);
131
+ return match ? Number(match[1]) : null;
132
+ };
133
+ /**
134
+ * Extract `{ year, month }` (month is 0-based) from a bound string. Falls
135
+ * back to `null` when the string doesn't contain a `YYYY-MM` prefix.
136
+ */
137
+ const boundYearMonth = (iso) => {
138
+ if (!iso)
139
+ return null;
140
+ const match = /^(\d{4})-(\d{2})/.exec(iso);
141
+ if (!match)
142
+ return null;
143
+ const month = Number(match[2]) - 1;
144
+ if (month < 0 || month > 11)
145
+ return null;
146
+ return { year: Number(match[1]), month };
147
+ };
148
+ /**
149
+ * Whether a given year is within the (inclusive) `min`/`max` range.
150
+ * A year cell is considered in-range when any day inside that year is
151
+ * still selectable — i.e. we compare on the year prefix only, ignoring
152
+ * the month/day components of `min` / `max`.
153
+ */
154
+ const isYearWithinBounds = (year, min, max) => {
155
+ const minYear = boundYear(min);
156
+ const maxYear = boundYear(max);
157
+ if (minYear !== null && year < minYear)
158
+ return false;
159
+ if (maxYear !== null && year > maxYear)
160
+ return false;
161
+ return true;
162
+ };
163
+ /**
164
+ * Whether a `(year, month)` pair sits at-or-after the given lower bound.
165
+ * A `null`/`undefined` bound is treated as "no lower bound".
166
+ */
167
+ const monthAtOrAfter = (year, month, bound) => {
168
+ const ym = boundYearMonth(bound);
169
+ if (ym)
170
+ return year > ym.year || (year === ym.year && month >= ym.month);
171
+ const y = boundYear(bound);
172
+ return y === null || year >= y;
173
+ };
174
+ /** Whether a `(year, month)` pair sits at-or-before the given upper bound. */
175
+ const monthAtOrBefore = (year, month, bound) => {
176
+ const ym = boundYearMonth(bound);
177
+ if (ym)
178
+ return year < ym.year || (year === ym.year && month <= ym.month);
179
+ const y = boundYear(bound);
180
+ return y === null || year <= y;
181
+ };
182
+ /**
183
+ * Whether a given `(year, month)` pair is within the (inclusive) `min`/`max`
184
+ * range. A month cell is considered in-range when any day inside that month
185
+ * would still satisfy the bounds — we compare on the year-month prefix and
186
+ * ignore the day component of `min` / `max`.
187
+ */
188
+ const isMonthWithinBounds = (year, month, min, max) => monthAtOrAfter(year, month, min) && monthAtOrBefore(year, month, max);
189
+ /**
190
+ * Pad a bound string up to full `YYYY-MM-DD` length so it can be lexically
191
+ * compared with a full ISO date. `min` widens down (missing pieces become
192
+ * `-01`), `max` widens up (missing month → `-12`, missing day → last day of
193
+ * that month, honoring leap years).
194
+ */
195
+ const padBound = (iso, kind) => {
196
+ if (!iso)
197
+ return null;
198
+ const yearMatch = /^(\d{4})(?:-(\d{2}))?(?:-(\d{2}))?$/.exec(iso);
199
+ if (!yearMatch)
200
+ return null;
201
+ const year = yearMatch[1];
202
+ const month = yearMatch[2] ?? (kind === 'min' ? '01' : '12');
203
+ const day = yearMatch[3] ??
204
+ (kind === 'min' ? '01' : String(new Date(Number(year), Number(month), 0).getDate()).padStart(2, '0'));
205
+ return `${year}-${month}-${day}`;
36
206
  };
37
207
 
38
208
  /* -------------------------------------------------------------------------- */
39
- /* Cally Library loader helper */
209
+ /* Date parsing */
40
210
  /* -------------------------------------------------------------------------- */
41
- const CALLY_SCRIPT_ATTRIBUTE = 'data-cally-library';
42
- //❗ Make sure to update the version here when the library releases a new version
43
- const CALLY_LIB_VERSION = '0.9.0';
44
- /**
45
- * Make sure to update the hash here if the `CALLY_LIB_VERSION` is updated
46
- * This hash is used to ensure the integrity of the library when loading it
47
- * from a CDN.
48
- * @see https://developer.mozilla.org/en-US/docs/Web/Security/Defenses/Subresource_Integrity#tools_for_generating_sri_hashes
49
- */
50
- const CALLY_LIB_HASH = 'sha384-pM/XA9cWLgX65JRL+wCO7uw2DIwVqcK1WlITykq2OZYbP5vuMspYj0K29Ka6UyFU';
51
- let isLibraryLoaded = false;
52
- let loadingPromise = null;
53
- /**
54
- * Helper function to load a script with given configuration
55
- * @param {Object} config - Script configuration
56
- * @param {string} config.type - The type of the script
57
- * @param {string} config.src - The source URL of the script
58
- * @param {Record<string, string>} [config.attributes] - Additional attributes to set on the script element
59
- * @returns Promise that resolves when the script is loaded
60
- * @throws {Error} If the script fails to load
61
- */
62
- const loadScript = ({ type, src, attributes = {} }) => {
63
- return new Promise((resolve, reject) => {
64
- const script = document.createElement('script');
65
- script.type = type;
66
- script.src = src;
67
- script.onload = () => resolve();
68
- script.onerror = (error) => reject(new Error(`Failed to load script: ${src}, ${error instanceof Error ? error.message : 'Unknown error'}`));
69
- Object.entries(attributes).forEach(([key, value]) => {
70
- script.setAttribute(key, value);
211
+ /**
212
+ * Parse an ISO 8601 date string (`YYYY-MM-DD`) into a local-time `Date`.
213
+ * Returns `null` when the string is missing or invalid.
214
+ */
215
+ const parseISO = (iso) => {
216
+ if (!iso || !/^\d{4}-\d{2}-\d{2}$/.test(iso))
217
+ return null;
218
+ const [y, m, d] = iso.split('-').map(Number);
219
+ const date = new Date(y, m - 1, d);
220
+ if (date.getFullYear() !== y || date.getMonth() !== m - 1 || date.getDate() !== d)
221
+ return null;
222
+ return date;
223
+ };
224
+ /**
225
+ * Convert a `Date` to `YYYY-MM-DD` in local time.
226
+ */
227
+ const toISO = (date) => date.toLocaleDateString(form.ISO_DATE_LOCALE);
228
+ /**
229
+ * Whether the ISO string is a valid `YYYY-MM-DD` date (round-trips through
230
+ * `parseISO`). Convenience predicate for input filtering.
231
+ */
232
+ const isValidISO = (iso) => parseISO(iso) !== null;
233
+ const startOfMonth = (date) => new Date(date.getFullYear(), date.getMonth(), 1);
234
+ const endOfMonth = (date) => new Date(date.getFullYear(), date.getMonth() + 1, 0);
235
+ const addDays = (date, amount) => {
236
+ const next = new Date(date);
237
+ next.setDate(next.getDate() + amount);
238
+ return next;
239
+ };
240
+ const addMonths = (date, amount) => {
241
+ const next = new Date(date.getFullYear(), date.getMonth() + amount, 1);
242
+ // Preserve the day when possible.
243
+ const day = Math.min(date.getDate(), endOfMonth(next).getDate());
244
+ next.setDate(day);
245
+ return next;
246
+ };
247
+ const addYears = (date, amount) => {
248
+ const next = new Date(date);
249
+ next.setFullYear(next.getFullYear() + amount);
250
+ return next;
251
+ };
252
+ /* -------------------------------------------------------------------------- */
253
+ /* Comparators */
254
+ /* -------------------------------------------------------------------------- */
255
+ const isSameDay = (a, b) => !!a && !!b && a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
256
+ /** ISO-string based comparison; safe for `YYYY-MM-DD`. */
257
+ const compareISO = (a, b) => {
258
+ if (a === b)
259
+ return 0;
260
+ return a < b ? -1 : 1;
261
+ };
262
+ /**
263
+ * Build a 6x7 matrix for the given month starting on `firstDayOfWeek`.
264
+ * The matrix always has 42 cells so the calendar keeps a stable height.
265
+ *
266
+ * @param anchor Any date within the target month.
267
+ * @param firstDayOfWeek 0 = Sunday, 1 = Monday, ...
268
+ */
269
+ const buildMonthMatrix = (anchor, firstDayOfWeek) => {
270
+ const start = startOfMonth(anchor);
271
+ const offset = (start.getDay() - firstDayOfWeek + 7) % 7;
272
+ const gridStart = addDays(start, -offset);
273
+ const cells = [];
274
+ for (let i = 0; i < 42; i++) {
275
+ const date = addDays(gridStart, i);
276
+ cells.push({
277
+ date,
278
+ iso: toISO(date),
279
+ outside: date.getMonth() !== anchor.getMonth(),
71
280
  });
72
- document.head.appendChild(script);
73
- });
281
+ }
282
+ const rows = [];
283
+ for (let r = 0; r < 6; r++)
284
+ rows.push(cells.slice(r * 7, r * 7 + 7));
285
+ return rows;
74
286
  };
287
+ /* -------------------------------------------------------------------------- */
288
+ /* Decade grid */
289
+ /* -------------------------------------------------------------------------- */
75
290
  /**
76
- * Checks if the Cally library is already loaded in the document
77
- * @returns {boolean} True if the library is loaded
291
+ * Given any year, return the anchor year of the decade grid.
292
+ *
293
+ * The reference image shows a grid like `2016 – 2027` containing the current
294
+ * year (`2026`). We anchor the grid so the "round" decade start (e.g. 2020,
295
+ * 2010, ...) appears at index 1 - i.e. one extra year before the decade and
296
+ * one extra year after, filling the 3x4 grid cleanly.
78
297
  */
79
- const isCallyLibraryLoaded = () => {
80
- // This might be a bit redundant, but it's a sanity check to ensure the library is actually loaded
81
- return isLibraryLoaded || document.querySelector(`script[${CALLY_SCRIPT_ATTRIBUTE}]`) !== null;
298
+ const getDecadeStart = (year) => Math.floor(year / 10) * 10 - 1;
299
+ /**
300
+ * Clamp a `Date` between an optional min and max. Bounds may be at any
301
+ * ISO precision (`YYYY`, `YYYY-MM`, `YYYY-MM-DD`) and are padded to the
302
+ * widest matching day before comparing (`min` → first day, `max` → last day).
303
+ */
304
+ const clampDate = (date, minISO, maxISO) => {
305
+ const min = parseISO(padBound(minISO, 'min'));
306
+ const max = parseISO(padBound(maxISO, 'max'));
307
+ if (min && date < min)
308
+ return min;
309
+ if (max && date > max)
310
+ return max;
311
+ return date;
312
+ };
313
+ /** Whether the given `Date` is within `[min, max]` ISO bounds (inclusive). */
314
+ const isWithinBounds = (date, minISO, maxISO) => {
315
+ const iso = toISO(date);
316
+ const minPadded = padBound(minISO, 'min');
317
+ const maxPadded = padBound(maxISO, 'max');
318
+ if (minPadded && iso < minPadded)
319
+ return false;
320
+ if (maxPadded && iso > maxPadded)
321
+ return false;
322
+ return true;
82
323
  };
324
+ /** Sort two ISO strings and return `[start, end]`. */
325
+ const sortRange = (a, b) => (a <= b ? [a, b] : [b, a]);
326
+
83
327
  /**
84
- * Loads the Cally library for the date picker component.
85
- * Uses a singleton promise pattern to prevent race conditions when multiple
86
- * date picker components attempt to load the library simultaneously.
328
+ * Cached `Intl.DateTimeFormat` factories.
87
329
  *
88
- * @throws {Error} If the library fails to load
89
- * @return {Promise<void>}
90
- */
91
- const loadCallyLibrary = () => {
92
- // Already loaded, return immediately
93
- if (isLibraryLoaded)
94
- return Promise.resolve();
95
- // If a load is already in progress, wait for it to complete
96
- if (loadingPromise !== null)
97
- return loadingPromise;
98
- // Check if script already exists in DOM (e.g., from a previous session or external source)
99
- if (document.querySelector(`script[${CALLY_SCRIPT_ATTRIBUTE}]`) !== null) {
100
- isLibraryLoaded = true;
101
- return Promise.resolve();
102
- }
103
- // Start loading and store the promise so concurrent calls can await it
104
- loadingPromise = loadScript({
105
- type: 'module',
106
- src: `https://unpkg.com/cally@${CALLY_LIB_VERSION}/dist/cally.js`,
107
- attributes: {
108
- [CALLY_SCRIPT_ATTRIBUTE]: '',
109
- crossOrigin: 'anonymous',
110
- integrity: CALLY_LIB_HASH,
111
- },
112
- })
113
- .then(() => {
114
- isLibraryLoaded = true;
115
- })
116
- .catch((error) => {
117
- // Reset the promise so future attempts can retry
118
- loadingPromise = null;
119
- isLibraryLoaded = false;
120
- throw new Error(`Failed to load the cally library: ${error instanceof Error ? error.message : 'Unknown error'}`);
330
+ * The Intl API is powerful but relatively expensive to instantiate. Since the
331
+ * calendar re-renders on every user interaction we keep a small LRU-ish cache
332
+ * keyed by locale + option shape.
333
+ */
334
+ const cache = new Map();
335
+ /** Prevents unbounded growth in long-running apps. */
336
+ const CACHE_MAX_SIZE = 64;
337
+ const cacheKey = (locale, options) => {
338
+ const localeKey = typeof locale === 'string' ? locale : JSON.stringify(locale ?? '');
339
+ return `${localeKey}|${JSON.stringify(options)}`;
340
+ };
341
+ const getFormatter = (locale, options) => {
342
+ const key = cacheKey(locale, options);
343
+ let formatter = cache.get(key);
344
+ if (!formatter) {
345
+ formatter = new Intl.DateTimeFormat(locale, options);
346
+ cache.set(key, formatter);
347
+ if (cache.size > CACHE_MAX_SIZE) {
348
+ const firstKey = cache.keys().next().value;
349
+ if (firstKey !== undefined)
350
+ cache.delete(firstKey);
351
+ }
352
+ }
353
+ return formatter;
354
+ };
355
+ /**
356
+ * Format a month, e.g. "January 2026" or "Jan".
357
+ */
358
+ const formatMonth = (date, locale, monthStyle = 'long', includeYear = true) => getFormatter(locale, {
359
+ month: monthStyle,
360
+ ...(includeYear ? { year: 'numeric' } : {}),
361
+ }).format(date);
362
+ /**
363
+ * Format a year, e.g. "2026".
364
+ */
365
+ const formatYear = (date, locale) => getFormatter(locale, { year: 'numeric' }).format(date);
366
+ /**
367
+ * Returns the weekday names for the given locale ordered from `firstDayOfWeek`.
368
+ *
369
+ * @param locale The locale used for formatting.
370
+ * @param firstDayOfWeek The first day of the week (0 = Sunday, 1 = Monday, ...).
371
+ * @param style Weekday style (long, short, narrow).
372
+ * @returns An array of `{short, long}` names in display order.
373
+ */
374
+ const getWeekdayNames = (locale, firstDayOfWeek, style = 'short') => {
375
+ const shortFormatter = getFormatter(locale, { weekday: style });
376
+ const longFormatter = getFormatter(locale, { weekday: 'long' });
377
+ // Any known Sunday works as the anchor date. 2024-01-07 is a Sunday.
378
+ const anchor = new Date(2024, 0, 7);
379
+ return Array.from({ length: 7 }, (_, i) => {
380
+ const dayIndex = (firstDayOfWeek + i) % 7;
381
+ const day = new Date(anchor);
382
+ day.setDate(anchor.getDate() + dayIndex);
383
+ return { short: shortFormatter.format(day), long: longFormatter.format(day) };
121
384
  });
122
- return loadingPromise;
385
+ };
386
+ /**
387
+ * Returns the localized month names.
388
+ *
389
+ * @param locale The locale used for formatting.
390
+ * @param style Month style (long, short, narrow).
391
+ */
392
+ const getMonthNames = (locale, style = 'short') => {
393
+ const formatter = getFormatter(locale, { month: style });
394
+ return Array.from({ length: 12 }, (_, month) => formatter.format(new Date(2024, month, 1)));
123
395
  };
124
396
 
125
- const bqDatePickerCss = () => `.border-spacing-0,calendar-month::part(table){--tw-border-spacing-x:0;--tw-border-spacing-y:0}.transform{--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}::backdrop,:root{--bq-blue-100:#e7f0fd;--bq-blue-200:#d0e2fb;--bq-blue-300:#a1c5f7;--bq-blue-400:#73a8f3;--bq-blue-500:#448bef;--bq-blue-600:#156eeb;--bq-blue-700:#1158bc;--bq-blue-800:#0d428d;--bq-blue-900:#082c5e;--bq-blue-1000:#04162f;--bq-corai-100:#fff2f2;--bq-corai-200:#ffe6e6;--bq-corai-300:#ffccce;--bq-corai-400:#ffb3b5;--bq-corai-500:#ff999d;--bq-corai-600:#ff8084;--bq-corai-700:#cc666a;--bq-corai-800:#994d4f;--bq-corai-900:#663335;--bq-corai-1000:#331a1a;--bq-cyan-100:#e8f7fb;--bq-cyan-200:#d2f0f8;--bq-cyan-300:#a5e1f1;--bq-cyan-400:#78d1e9;--bq-cyan-500:#4bc2e2;--bq-cyan-600:#1eb3db;--bq-cyan-700:#188faf;--bq-cyan-800:#126b83;--bq-cyan-900:#0c4858;--bq-cyan-1000:#06242c;--bq-gold-100:#fbf4ec;--bq-gold-200:#f7e9da;--bq-gold-300:#f0d3b6;--bq-gold-400:#e8bc91;--bq-gold-500:#e1a66d;--bq-gold-600:#d99048;--bq-gold-700:#ae733a;--bq-gold-800:#82562b;--bq-gold-900:#573a1d;--bq-gold-1000:#2b1d0e;--bq-green-100:#e8f8ef;--bq-green-200:#d2f1e0;--bq-green-300:#a5e3c1;--bq-green-400:#78d5a1;--bq-green-500:#4bc782;--bq-green-600:#1eb963;--bq-green-700:#18944f;--bq-green-800:#126f3b;--bq-green-900:#0c4a28;--bq-green-1000:#062514;--bq-grey-100:#f1f2f4;--bq-grey-200:#e7e8eb;--bq-grey-300:#caccd2;--bq-grey-400:#a6aab3;--bq-grey-50:#f6f6f8;--bq-grey-500:#898e99;--bq-grey-600:#646a77;--bq-grey-700:#3f4350;--bq-grey-800:#2a2c35;--bq-grey-900:#1c1d23;--bq-grey-950:#15161a;--bq-grey-1000:#0d0e11;--bq-indigo-100:#edecfc;--bq-indigo-200:#dcdafa;--bq-indigo-300:#b9b5f5;--bq-indigo-400:#9590ef;--bq-indigo-500:#726bea;--bq-indigo-600:#4f46e5;--bq-indigo-700:#3f38b7;--bq-indigo-800:#2f2a89;--bq-indigo-900:#201c5c;--bq-indigo-1000:#100e2e;--bq-iris-100:#e9f0ff;--bq-iris-200:#d6e0ff;--bq-iris-300:#b2c0fe;--bq-iris-400:#8691f8;--bq-iris-500:#6061ee;--bq-iris-600:#4f46e5;--bq-iris-700:#413abd;--bq-iris-800:#332e95;--bq-iris-900:#26216d;--bq-iris-1000:#181545;--bq-lime-100:#f5fae8;--bq-lime-200:#ecf6d2;--bq-lime-300:#d9eda5;--bq-lime-400:#c5e379;--bq-lime-500:#b2da4c;--bq-lime-600:#9fd11f;--bq-lime-700:#7fa719;--bq-lime-800:#5f7d13;--bq-lime-900:#40540c;--bq-lime-1000:#202a06;--bq-magenta-100:#fce7f4;--bq-magenta-200:#f9cfea;--bq-magenta-300:#f39fd6;--bq-magenta-400:#ee6fbf;--bq-magenta-500:#e83fab;--bq-magenta-600:#de1395;--bq-magenta-700:#b20f77;--bq-magenta-800:#850c59;--bq-magenta-900:#58083c;--bq-magenta-1000:#2c041e;--bq-neutral-white:#fbfbfc;--bq-neutral-black:#060708;--bq-orange-100:#fbf0e9;--bq-orange-200:#f8e1d4;--bq-orange-300:#f1c2a8;--bq-orange-400:#eaa47d;--bq-orange-500:#e38551;--bq-orange-600:#dc6726;--bq-orange-700:#b0521e;--bq-orange-800:#843e17;--bq-orange-900:#58290f;--bq-orange-1000:#2c1508;--bq-purple-100:#efebf8;--bq-purple-200:#e0d7f2;--bq-purple-300:#c1afe5;--bq-purple-400:#a388d8;--bq-purple-500:#8460cb;--bq-purple-600:#6538be;--bq-purple-700:#512d98;--bq-purple-800:#3d2272;--bq-purple-900:#28164c;--bq-purple-1000:#140b26;--bq-red-100:#fce7ea;--bq-red-200:#f9d1d5;--bq-red-300:#f3a2ac;--bq-red-400:#ed7482;--bq-red-500:#e74559;--bq-red-600:#e1172f;--bq-red-700:#b41226;--bq-red-800:#870e1c;--bq-red-900:#5a0913;--bq-red-1000:#2d0509;--bq-sky-100:#eff4fb;--bq-sky-200:#dfeaf8;--bq-sky-300:#bfd5f1;--bq-sky-400:#9ec1e9;--bq-sky-500:#7eace2;--bq-sky-600:#5e97db;--bq-sky-700:#4b79af;--bq-sky-800:#385b83;--bq-sky-900:#263c58;--bq-sky-1000:#131e2c;--bq-teal-100:#e5f7f5;--bq-teal-200:#ccf0eb;--bq-teal-300:#99e1d8;--bq-teal-400:#66d2c4;--bq-teal-500:#33c3b1;--bq-teal-600:#00b49d;--bq-teal-700:#00907e;--bq-teal-800:#006c5e;--bq-teal-900:#00483f;--bq-teal-1000:#00241f;--bq-volcano-100:#feede7;--bq-volcano-200:#fddbd1;--bq-volcano-300:#fbb8a3;--bq-volcano-400:#fa9474;--bq-volcano-500:#f87146;--bq-volcano-600:#f64d18;--bq-volcano-700:#c53e13;--bq-volcano-800:#942e0e;--bq-volcano-900:#621f0a;--bq-volcano-1000:#310f05;--bq-yellow-100:#fefbe7;--bq-yellow-200:#fcf6d0;--bq-yellow-300:#faeea0;--bq-yellow-400:#f7e571;--bq-yellow-500:#f5dd41;--bq-yellow-600:#f2d412;--bq-yellow-700:#c2aa0e;--bq-yellow-800:#917f0b;--bq-yellow-900:#615507;--bq-yellow-1000:#302a04;--bq-endava-grey-50:#f7f7f8;--bq-endava-grey-100:#e4e6e7;--bq-endava-grey-200:#b5babe;--bq-endava-grey-300:#949ca1;--bq-endava-grey-400:#737d84;--bq-endava-grey-500:#525f67;--bq-endava-grey-600:#30404b;--bq-endava-grey-700:#2b3942;--bq-endava-grey-800:#263139;--bq-endava-grey-900:#192b37;--bq-endava-grey-950:#151b1e;--bq-endava-grey-1000:#0f1316;--bq-endava-neutral-white:#fafbfb;--bq-endava-neutral-black:#060708;--bq-endava-orange-100:#fef3f1;--bq-endava-orange-200:#fbd6d1;--bq-endava-orange-300:#fab7af;--bq-endava-orange-400:#fa988b;--bq-endava-orange-500:#fc7866;--bq-endava-orange-600:#ff5640;--bq-endava-orange-700:#ce4a39;--bq-endava-orange-800:#a03d30;--bq-endava-orange-900:#722e25;--bq-endava-orange-1000:#471e19}*,:after,:before{box-sizing:border-box}*{font:inherit;margin:0}ol[role=list],ul[role=list]{list-style-type:none}html{text-size-adjust:none;font-family:var(--bq-font-family);font-size:var(--bq-font-size--m)}html:focus-within{scroll-behavior:smooth}body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-color:var(--bq-background--primary);color:var(--bq-text--primary);line-height:var(--bq-font-line-height--regular);min-height:100vb;text-rendering:optimizeSpeed}a:not([class]){text-decoration-skip-ink:auto}canvas,img,picture,svg,video{display:block;max-width:100%}button,input,select,textarea{font:inherit}h1,h2,h3,h4,h5,h6,p{overflow-wrap:break-word}@media (prefers-reduced-motion:reduce){html:focus-within{scroll-behavior:auto}*,:after,:before{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto;transition-duration:.01ms!important}}:where(:root){--bq-white:#fff;--bq-black:#060708;--bq-neutral-50:var(--bq-grey-50);--bq-neutral-100:var(--bq-grey-100);--bq-neutral-200:var(--bq-grey-200);--bq-neutral-300:var(--bq-grey-300);--bq-neutral-400:var(--bq-grey-400);--bq-neutral-500:var(--bq-grey-500);--bq-neutral-600:var(--bq-grey-600);--bq-neutral-700:var(--bq-grey-700);--bq-neutral-800:var(--bq-grey-800);--bq-neutral-900:var(--bq-grey-900);--bq-neutral-950:var(--bq-grey-950);--bq-neutral-1000:var(--bq-grey-1000);--bq-brand-light:var(--bq-iris-100);--bq-brand:var(--bq-iris-600);--bq-brand-dark:var(--bq-iris-1000);--bq-accent-light:var(--bq-purple-100);--bq-accent:var(--bq-purple-600);--bq-accent-dark:var(--bq-purple-1000);--bq-success-light:var(--bq-teal-100);--bq-success:var(--bq-teal-600);--bq-success-dark:var(--bq-teal-1000);--bq-danger-light:var(--bq-red-100);--bq-danger:var(--bq-red-600);--bq-danger-dark:var(--bq-red-1000);--bq-warning-light:var(--bq-gold-100);--bq-warning:var(--bq-gold-600);--bq-warning-dark:var(--bq-gold-1000);--bq-info-light:var(--bq-iris-100);--bq-info:var(--bq-iris-600);--bq-info-dark:var(--bq-iris-1000);--bq-focus:var(--bq-iris-600);--bq-data-01:var(--bq-brand);--bq-data-02:var(--bq-purple-600);--bq-data-03:var(--bq-magenta-600);--bq-data-04:var(--bq-cyan-600);--bq-data-05:var(--bq-teal-600);--bq-data-06:var(--bq-orange-600);--bq-data-07:var(--bq-yellow-600);--bq-data-08:var(--bq-red-600);--bq-data-09:var(--bq-blue-600);--bq-data-10:var(--bq-grey-600);--bq-data-11:var(--bq-black);--bq-data-12:var(--bq-white);--bq-radius--none:0;--bq-radius--xs2:0.125rem;--bq-radius--xs:0.25rem;--bq-radius--s:0.5rem;--bq-radius--m:0.75rem;--bq-radius--l:1.5rem;--bq-radius--full:9999px;--bq-box-shadow--xs:0 2px 0 rgba(0,0,0,.016);--bq-box-shadow--s:0 8px 24px rgba(0,0,0,.04);--bq-box-shadow--m:0 10px 48px -16px rgba(0,0,0,.12);--bq-box-shadow--l:0 20px 58px -16px rgba(0,0,0,.16);--bq-font-family:"Outfit",sans-serif;--bq-font-size--xs:0.75rem;--bq-font-size--s:0.875rem;--bq-font-size--m:1rem;--bq-font-size--l:1.125rem;--bq-font-size--xl:1.5rem;--bq-font-size--xxl:2rem;--bq-font-size--xxl2:2.5rem;--bq-font-size--xxl3:3rem;--bq-font-size--xxl4:3.5rem;--bq-font-size--xxl5:4rem;--bq-font-weight--thin:100;--bq-font-weight--light:300;--bq-font-weight--regular:400;--bq-font-weight--medium:500;--bq-font-weight--semibold:600;--bq-font-weight--bold:700;--bq-font-line-height--small:1.2;--bq-font-line-height--regular:1.5;--bq-font-line-height--large:1.5;--bq-spacing-xs3:0.125rem;--bq-spacing-xs2:0.25rem;--bq-spacing-xs:0.5rem;--bq-spacing-s:0.75rem;--bq-spacing-m:1rem;--bq-spacing-l:1.5rem;--bq-spacing-xl:2rem;--bq-spacing-xxl:2.5rem;--bq-spacing-xxl2:3.5rem;--bq-spacing-xxl3:4rem;--bq-spacing-xxl4:4.5rem;--bq-stroke-s:1px;--bq-stroke-m:2px;--bq-stroke-l:3px}.beeq:not([bq-mode]),.light,:root:not([bq-theme]):not([bq-mode]),:root[bq-theme=beeq]:not([bq-mode]),[bq-mode=light]{--bq-background--primary:var(--bq-white);--bq-background--secondary:var(--bq-neutral-100);--bq-background--tertiary:var(--bq-neutral-200);--bq-background--alt:var(--bq-neutral-300);--bq-background--inverse:var(--bq-neutral-900);--bq-background--brand:var(--bq-brand);--bq-background--overlay:var(--bq-neutral-900);--bq-icon--primary:var(--bq-neutral-800);--bq-icon--alt:var(--bq-white);--bq-icon--secondary:var(--bq-neutral-600);--bq-icon--inverse:var(--bq-neutral-50);--bq-icon--brand:var(--bq-brand);--bq-icon--info:var(--bq-brand);--bq-icon--success:var(--bq-success);--bq-icon--warning:var(--bq-warning);--bq-icon--danger:var(--bq-danger);--bq-stroke--primary:var(--bq-neutral-200);--bq-stroke--secondary:var(--bq-neutral-600);--bq-stroke--tertiary:var(--bq-neutral-900);--bq-stroke--inverse:var(--bq-white);--bq-stroke--brand:var(--bq-brand);--bq-stroke--alt:var(--bq-neutral-50);--bq-stroke--success:var(--bq-success);--bq-stroke--warning:var(--bq-warning);--bq-stroke--danger:var(--bq-danger);--bq-stroke--info:var(--bq-brand);--bq-text--primary:var(--bq-neutral-800);--bq-text--secondary:var(--bq-neutral-600);--bq-text--inverse:var(--bq-neutral-50);--bq-text--brand:var(--bq-brand);--bq-text--alt:var(--bq-white);--bq-text--info:var(--bq-brand);--bq-text--success:var(--bq-success);--bq-text--warning:var(--bq-warning);--bq-text--danger:var(--bq-danger);--bq-ui--primary:var(--bq-white);--bq-ui--secondary:var(--bq-neutral-100);--bq-ui--tertiary:var(--bq-neutral-500);--bq-ui--inverse:var(--bq-neutral-900);--bq-ui--brand:var(--bq-brand);--bq-ui--brand-alt:var(--bq-brand-light);--bq-ui--alt:var(--bq-neutral-50);--bq-ui--success:var(--bq-success);--bq-ui--success-alt:var(--bq-success-light);--bq-ui--warning:var(--bq-warning);--bq-ui--warning-alt:var(--bq-warning-light);--bq-ui--danger:var(--bq-danger);--bq-ui--danger-alt:var(--bq-danger-light);--bq-ui--info:var(--bq-brand);--bq-ui--info-alt:var(--bq-brand-light);--bq-hover:#bcbfc5;--bq-active:#444546}.dark,[bq-mode=dark]{--bq-background--primary:var(--bq-neutral-1000);--bq-background--secondary:var(--bq-neutral-950);--bq-background--tertiary:var(--bq-neutral-800);--bq-background--alt:var(--bq-neutral-700);--bq-background--inverse:var(--bq-neutral-600);--bq-background--brand:var(--bq-brand);--bq-background--overlay:var(--bq-neutral-900);--bq-icon--primary:var(--bq-neutral-100);--bq-icon--secondary:var(--bq-neutral-400);--bq-icon--inverse:var(--bq-neutral-800);--bq-icon--brand:var(--bq-brand);--bq-icon--alt:var(--bq-white);--bq-icon--info:var(--bq-brand);--bq-icon--success:var(--bq-success);--bq-icon--warning:var(--bq-warning);--bq-icon--danger:var(--bq-danger);--bq-stroke--primary:var(--bq-neutral-900);--bq-stroke--secondary:var(--bq-neutral-700);--bq-stroke--tertiary:var(--bq-neutral-400);--bq-stroke--inverse:var(--bq-neutral-950);--bq-stroke--brand:var(--bq-brand);--bq-stroke--alt:var(--bq-neutral-1000);--bq-stroke--success:var(--bq-success);--bq-stroke--warning:var(--bq-warning);--bq-stroke--danger:var(--bq-danger);--bq-stroke--info:var(--bq-brand);--bq-text--primary:var(--bq-neutral-100);--bq-text--secondary:var(--bq-neutral-400);--bq-text--inverse:var(--bq-neutral-800);--bq-text--brand:var(--bq-brand);--bq-text--alt:var(--bq-white);--bq-text--info:var(--bq-brand);--bq-text--success:var(--bq-success);--bq-text--warning:var(--bq-warning);--bq-text--danger:var(--bq-danger);--bq-ui--primary:var(--bq-neutral-900);--bq-ui--secondary:var(--bq-neutral-950);--bq-ui--tertiary:var(--bq-neutral-700);--bq-ui--inverse:var(--bq-neutral-100);--bq-ui--brand:var(--bq-brand);--bq-ui--brand-alt:var(--bq-brand-dark);--bq-ui--alt:var(--bq-neutral-950);--bq-ui--success:var(--bq-success);--bq-ui--success-alt:var(--bq-success-dark);--bq-ui--warning:var(--bq-warning);--bq-ui--warning-alt:var(--bq-warning-dark);--bq-ui--danger:var(--bq-danger);--bq-ui--danger-alt:var(--bq-danger-dark);--bq-ui--info:var(--bq-brand);--bq-ui--info-alt:var(--bq-brand-dark);--bq-hover:#444546;--bq-active:#1f2026}:where(.endava),:where([bq-theme=endava]){--bq-font-family:"Poppins",sans-serif;--bq-white:#fafbfb;--bq-black:#030406;--bq-neutral-50:var(--bq-endava-grey-50);--bq-neutral-100:var(--bq-endava-grey-100);--bq-neutral-200:var(--bq-endava-grey-200);--bq-neutral-300:var(--bq-endava-grey-300);--bq-neutral-400:var(--bq-endava-grey-400);--bq-neutral-500:var(--bq-endava-grey-500);--bq-neutral-600:var(--bq-endava-grey-600);--bq-neutral-700:var(--bq-endava-grey-700);--bq-neutral-800:var(--bq-endava-grey-800);--bq-neutral-900:var(--bq-endava-grey-900);--bq-neutral-950:var(--bq-endava-grey-950);--bq-neutral-1000:var(--bq-endava-grey-1000);--bq-brand-light:var(--bq-endava-orange-100);--bq-brand:var(--bq-endava-orange-600);--bq-brand-dark:var(--bq-endava-orange-1000);--bq-accent-light:var(--bq-endava-orange-100);--bq-accent:var(--bq-endava-orange-600);--bq-accent-dark:var(--bq-endava-orange-1000);--bq-success-light:var(--bq-green-100);--bq-success:var(--bq-green-600);--bq-success-dark:var(--bq-green-1000);--bq-danger-light:var(--bq-corai-100);--bq-danger:var(--bq-corai-600);--bq-danger-dark:var(--bq-corai-1000);--bq-warning-light:var(--bq-yellow-100);--bq-warning:var(--bq-yellow-600);--bq-warning-dark:var(--bq-yellow-1000);--bq-info-light:var(--bq-blue-100);--bq-info:var(--bq-blue-600);--bq-info-dark:var(--bq-blue-1000);--bq-focus:var(--bq-endava-orange-600);--bq-data-01:var(--bq-brand);--bq-data-02:#af0cd8;--bq-data-03:#0ca8d8;--bq-data-04:var(--bq-teal-600);--bq-data-05:var(--bq-yellow-600);--bq-data-06:var(--bq-orange-600);--bq-data-07:var(--bq-blue-600);--bq-data-08:var(--bq-red-600);--bq-data-09:var(--bq-purple-600);--bq-data-10:#394b56;--bq-data-11:var(--bq-black);--bq-data-12:var(--bq-white)}.endava.light,.endava:not([bq-mode]),[bq-theme=endava]:not([bq-mode]),[bq-theme=endava][bq-mode=light]{--bq-background--primary:var(--bq-white);--bq-background--secondary:var(--bq-neutral-100);--bq-background--tertiary:var(--bq-neutral-200);--bq-background--alt:var(--bq-neutral-300);--bq-background--inverse:var(--bq-neutral-900);--bq-background--brand:var(--bq-brand);--bq-background--overlay:var(--bq-neutral-900);--bq-icon--primary:var(--bq-neutral-800);--bq-icon--secondary:var(--bq-neutral-600);--bq-icon--inverse:var(--bq-neutral-50);--bq-icon--brand:var(--bq-brand);--bq-icon--alt:var(--bq-white);--bq-icon--info:var(--bq-info);--bq-icon--success:var(--bq-success);--bq-icon--warning:var(--bq-warning);--bq-icon--danger:var(--bq-danger);--bq-stroke--primary:var(--bq-neutral-200);--bq-stroke--secondary:var(--bq-neutral-600);--bq-stroke--tertiary:var(--bq-neutral-900);--bq-stroke--inverse:var(--bq-white);--bq-stroke--brand:var(--bq-brand);--bq-stroke--alt:var(--bq-neutral-50);--bq-stroke--brand-alt:var(--bq-brand-light);--bq-stroke--success:var(--bq-success);--bq-stroke--warning:var(--bq-warning);--bq-stroke--danger:var(--bq-danger);--bq-stroke--info:var(--bq-info);--bq-text--primary:var(--bq-neutral-800);--bq-text--secondary:var(--bq-neutral-600);--bq-text--inverse:var(--bq-neutral-50);--bq-text--brand:var(--bq-brand);--bq-text--alt:var(--bq-white);--bq-text--info:var(--bq-info);--bq-text--success:var(--bq-success);--bq-text--warning:var(--bq-warning);--bq-text--danger:var(--bq-danger);--bq-ui--primary:var(--bq-white);--bq-ui--secondary:var(--bq-neutral-100);--bq-ui--tertiary:var(--bq-neutral-500);--bq-ui--inverse:var(--bq-neutral-900);--bq-ui--alt:var(--bq-neutral-50);--bq-ui--brand-alt:var(--bq-brand-light);--bq-ui--brand:var(--bq-brand);--bq-ui--success:var(--bq-success);--bq-ui--success-alt:var(--bq-success-light);--bq-ui--warning:var(--bq-warning);--bq-ui--warning-alt:var(--bq-warning-light);--bq-ui--danger:var(--bq-danger);--bq-ui--danger-alt:var(--bq-danger-light);--bq-ui--info:var(--bq-info);--bq-ui--info-alt:var(--bq-info-light);--bq-hover:#444546;--bq-active:#1f2026}.endava.dark,[bq-theme=endava][bq-mode=dark]{--bq-background--primary:var(--bq-neutral-1000);--bq-background--secondary:var(--bq-neutral-900);--bq-background--tertiary:var(--bq-neutral-800);--bq-background--alt:var(--bq-neutral-700);--bq-background--inverse:var(--bq-neutral-600);--bq-background--brand:var(--bq-brand);--bq-background--overlay:var(--bq-neutral-900);--bq-icon--primary:var(--bq-neutral-100);--bq-icon--secondary:var(--bq-neutral-400);--bq-icon--inverse:var(--bq-neutral-800);--bq-icon--brand:var(--bq-brand);--bq-icon--alt:var(--bq-white);--bq-icon--info:var(--bq-info);--bq-icon--success:var(--bq-success);--bq-icon--warning:var(--bq-warning);--bq-icon--danger:var(--bq-danger);--bq-stroke--primary:var(--bq-neutral-900);--bq-stroke--secondary:var(--bq-neutral-700);--bq-stroke--tertiary:var(--bq-neutral-400);--bq-stroke--inverse:var(--bq-neutral-950);--bq-stroke--brand:var(--bq-brand);--bq-stroke--brand-alt:var(--bq-brand-dark);--bq-stroke--alt:var(--bq-neutral-1000);--bq-stroke--success:var(--bq-success);--bq-stroke--warning:var(--bq-warning);--bq-stroke--danger:var(--bq-danger);--bq-stroke--info:var(--bq-info);--bq-text--primary:var(--bq-neutral-100);--bq-text--secondary:var(--bq-neutral-400);--bq-text--inverse:var(--bq-neutral-800);--bq-text--brand:var(--bq-brand);--bq-text--alt:var(--bq-neutral-white);--bq-text--info:var(--bq-info);--bq-text--success:var(--bq-success);--bq-text--warning:var(--bq-warning);--bq-text--danger:var(--bq-danger);--bq-ui--primary:var(--bq-neutral-900);--bq-ui--secondary:var(--bq-neutral-950);--bq-ui--tertiary:var(--bq-neutral-700);--bq-ui--inverse:var(--bq-neutral-100);--bq-ui--brand:var(--bq-brand);--bq-ui--brand-alt:var(--bq-brand-dark);--bq-ui--alt:var(--bq-neutral-950);--bq-ui--success:var(--bq-success);--bq-ui--success-alt:var(--bq-success-dark);--bq-ui--warning:var(--bq-warning);--bq-ui--warning-alt:var(--bq-warning-dark);--bq-ui--danger:var(--bq-danger);--bq-ui--danger-alt:var(--bq-danger-dark);--bq-ui--info:var(--bq-info);--bq-ui--info-alt:var(--bq-info-dark);--bq-hover:#444546;--bq-active:#1f2026}.pointer-events-none{pointer-events:none}.me-\\[--bq-date-picker--gap\\]{margin-inline-end:var(--bq-date-picker--gap)}.ms-\\[--bq-date-picker--gap\\]{margin-inline-start:var(--bq-date-picker--gap)}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.table{display:table}.size-\\[--bq-date-picker--day-size\\]{height:var(--bq-date-picker--day-size);width:var(--bq-date-picker--day-size)}.flex-auto{flex:1 1 auto}.flex-grow{flex-grow:1}.border-spacing-0{--tw-border-spacing-x:0px;--tw-border-spacing-y:0px;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}.cursor-inherit{cursor:inherit}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{user-select:none}.appearance-none{appearance:none}.items-center{align-items:center}.justify-center{justify-content:center}.gap-\\[--bq-date-picker--gap\\]{gap:var(--bq-date-picker--gap)}.gap-s{gap:var(--bq-spacing-s)}.rounded-\\[--bq-date-picker--border-radius\\]{border-radius:var(--bq-date-picker--border-radius)}.rounded-none{border-radius:var(--bq-radius--none)}.rounded-s{border-radius:var(--bq-radius--s)}.rounded-ee-none{border-end-end-radius:var(--bq-radius--none)}.rounded-es-none{border-end-start-radius:var(--bq-radius--none)}.rounded-se-none{border-start-end-radius:var(--bq-radius--none)}.rounded-ss-none{border-start-start-radius:var(--bq-radius--none)}.border-0{border-width:0}.border-\\[length\\:--bq-date-picker--border-width\\]{border-width:var(--bq-date-picker--border-width)}.border-\\[length\\:--bq-date-picker--currentDate-border-width\\]{border-width:var(--bq-date-picker--currentDate-border-width)}.border-none{border-style:none}.border-\\[color\\:--bq-date-picker--border-color\\]{border-color:var(--bq-date-picker--border-color)}.border-\\[color\\:--bq-date-picker--currentDate-border-color\\]{border-color:var(--bq-date-picker--currentDate-border-color)}.border-\\[color\\:--bq-focus\\]{border-color:var(--bq-focus)}.border-danger{border-color:var(--bq-stroke--danger)}.border-success{border-color:var(--bq-stroke--success)}.border-warning{border-color:var(--bq-stroke--warning)}.bg-\\[--bq-date-picker--background-color\\]{background-color:var(--bq-date-picker--background-color)}.bg-\\[--bq-date-picker--range-background-color\\]{background-color:var(--bq-date-picker--range-background-color)}.bg-\\[--bq-date-picker--range-inner-background-color\\]{background-color:var(--bq-date-picker--range-inner-background-color)}.bg-inherit{background-color:inherit}.bg-transparent{background-color:transparent}.pe-\\[--bq-date-picker--padding-end\\]{padding-inline-end:var(--bq-date-picker--padding-end)}.ps-\\[--bq-date-picker--padding-start\\]{padding-inline-start:var(--bq-date-picker--padding-start)}.font-default{font-family:var(--bq-font-family)}.font-inherit{font-family:inherit}.text-\\[length\\:--bq-date-picker--label-text-size\\]{font-size:var(--bq-date-picker--label-text-size)}.text-\\[length\\:--bq-date-picker--text-size\\]{font-size:var(--bq-date-picker--text-size)}.text-\\[length\\:_inherit\\],.text-\\[length\\:inherit\\]{font-size:inherit}.text-\\[color\\:--bq-date-picker--label-text-color\\]{color:var(--bq-date-picker--label-text-color)}.text-\\[color\\:--bq-date-picker--text-color\\]{color:var(--bq-date-picker--text-color)}.text-alt{color:var(--bq-text--alt)}.text-primary{color:var(--bq-text--primary)}.text-secondary{color:var(--bq-text--secondary)}.opacity-100{opacity:1}.opacity-60{opacity:.6}.transition-\\[border-color\\2c box-shadow\\]{transition-duration:.15s;transition-property:border-color,box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{transition-duration:.2s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.border-active-danger{border-color:color-mix(in srgb,var(--bq-stroke--danger),var(--bq-active) 20%)}.border-active-success{border-color:color-mix(in srgb,var(--bq-stroke--success),var(--bq-active) 20%)}.border-active-warning{border-color:color-mix(in srgb,var(--bq-stroke--warning),var(--bq-active) 20%)}.is-full{inline-size:100%}.min-is-0{min-inline-size:0}.p-b-0{padding-block:0}.p-b-\\[--bq-date-picker--paddingY\\]{padding-block:var(--bq-date-picker--paddingY)}.p-b-xs2{padding-block:var(--bq-spacing-xs2)}.p-i-0{padding-inline:0}.p-i-xs{padding-inline:var(--bq-spacing-xs)}.m-b-0{margin-block:0}.m-be-\\[--bq-date-picker--label-margin-bottom\\]{margin-block-end:var(--bq-date-picker--label-margin-bottom)}.m-i-0{margin-inline:0}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.focus{outline:var(--bq-ring-width,2px) solid var(--bq-ring-color-focus,var(--bq-focus));outline-offset:var(--bq-ring-offset-width,1px)}@-webkit-keyframes fade-in{0%{opacity:0}}@keyframes fade-in{0%{opacity:0}}@-webkit-keyframes slide-in{0%{-webkit-transform:translateY(10px);transform:translateY(10px)}}@keyframes slide-in{0%{-webkit-transform:translateY(10px);transform:translateY(10px)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}:host{--bq-date-picker--background-color:var(--bq-ui--primary);--bq-date-picker--border-color:var(--bq-stroke--tertiary);--bq-date-picker--border-radius:var(--bq-radius--s);--bq-date-picker--border-style:solid;--bq-date-picker--border-width:var(--bq-stroke-s);--bq-date-picker--currentDate-border-color:var(--bq-stroke--brand);--bq-date-picker--currentDate-border-width:var(--bq-stroke-m);--bq-date-picker--day-size:2.25rem;--bq-date-picker--gap:var(--bq-spacing-xs);--bq-date-picker--icon-size:24px;--bq-date-picker--label-margin-bottom:var(--bq-spacing-xs);--bq-date-picker--label-text-color:var(--bq-text--primary);--bq-date-picker--label-text-size:var(--bq-font-size--s);--bq-date-picker--padding-end:var(--bq-spacing-m);--bq-date-picker--padding-start:var(--bq-spacing-m);--bq-date-picker--paddingY:var(--bq-spacing-s);--bq-date-picker--range-background-color:var(--bq-ui--brand);--bq-date-picker--range-inner-background-color:var(--bq-ui--brand-alt);--bq-date-picker--text-color:var(--bq-text--primary);--bq-date-picker--text-placeholder-color:var(--bq-text--secondary);--bq-date-picker--text-size:var(--bq-font-size--m);display:block;inline-size:100%}.bq-date-picker__label{align-items:center;color:var(--bq-date-picker--label-text-color);display:flex;flex-grow:1;font-size:var(--bq-date-picker--label-text-size);gap:var(--bq-date-picker--gap);margin-block-end:var(--bq-date-picker--label-margin-bottom)}.bq-date-picker__control{align-items:center;border-color:var(--bq-date-picker--border-color);border-radius:var(--bq-date-picker--border-radius);border-style:var(--bq-date-picker--border-style);border-width:var(--bq-date-picker--border-width);color:var(--bq-date-picker--text-color);display:flex;font-size:var(--bq-date-picker--text-size);inline-size:100%;padding-block:var(--bq-date-picker--paddingY);padding-inline-end:var(--bq-date-picker--padding-end);padding-inline-start:var(--bq-date-picker--padding-start);transition-duration:.15s;transition-property:border-color,box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);user-select:none}.bq-date-picker__control::placeholder{color:var(--bq-date-picker--text-placeholder-color)}.bq-date-picker__control:hover:not(.disabled):not(:focus-within){border-color:color-mix(in srgb,var(--bq-stroke--brand),var(--bq-hover) 20%)}.bq-date-picker__control:not(.disabled):focus-within{--bq-ring-width:1px;--bq-ring-offset-width:0;border-color:var(--bq-focus);outline:var(--bq-ring-width,2px) solid var(--bq-ring-color-focus,var(--bq-focus));outline-offset:var(--bq-ring-offset-width,1px)}.bq-date-picker__control:not(.disabled):focus-within .bq-date-picker__control--clear,.bq-date-picker__control:not(.disabled):hover .bq-date-picker__control--clear{display:inline-block}.bq-date-picker__control.disabled{cursor:not-allowed;opacity:.6}.bq-date-picker__control.validation-error{border-color:var(--bq-stroke--danger)}.bq-date-picker__control.validation-error:hover:not(.disabled):not(:focus-within){border-color:color-mix(in srgb,var(--bq-stroke--danger),var(--bq-hover) 20%)}.bq-date-picker__control.validation-error:not(.disabled):focus-within{--bq-ring-color-focus:var(--bq-stroke--danger);border-color:color-mix(in srgb,var(--bq-stroke--danger),var(--bq-active) 20%)}.bq-date-picker__control.validation-success{border-color:var(--bq-stroke--success)}.bq-date-picker__control.validation-success:hover:not(.disabled):not(:focus-within){border-color:color-mix(in srgb,var(--bq-stroke--success),var(--bq-hover) 20%)}.bq-date-picker__control.validation-success:not(.disabled):focus-within{--bq-ring-color-focus:var(--bq-stroke--success);border-color:color-mix(in srgb,var(--bq-stroke--success),var(--bq-active) 20%)}.bq-date-picker__control.validation-warning{border-color:var(--bq-stroke--warning)}.bq-date-picker__control.validation-warning:hover:not(.disabled):not(:focus-within){border-color:color-mix(in srgb,var(--bq-stroke--warning),var(--bq-hover) 20%)}.bq-date-picker__control.validation-warning:not(.disabled):focus-within{--bq-ring-color-focus:var(--bq-stroke--warning);border-color:color-mix(in srgb,var(--bq-stroke--warning),var(--bq-active) 20%)}.bq-date-picker__control--input{appearance:none;background-color:inherit;border-style:none;color:inherit;cursor:inherit;flex:1 1 auto;font-family:inherit;font-size:inherit;margin-block:0;margin-inline:0;min-inline-size:0;padding-block:0;padding-inline:0;user-select:none}.bq-date-picker__control--input:focus{outline:2px solid transparent;outline-offset:2px}.bq-date-picker__control--input:focus-visible{outline:2px solid transparent;outline-offset:2px}.bq-date-picker__control--clear::part(button){--bq-ring-width:initial;--bq-ring-offset-width:initial;--bq-ring-color-focus:initial}.bq-date-picker__control--prefix,.bq-date-picker__control--suffix{align-items:center;color:var(--bq-date-picker--text-color);display:flex;pointer-events:none}.bq-date-picker__control--prefix{margin-inline-end:var(--bq-date-picker--gap)}.bq-date-picker__control--suffix{margin-inline-start:var(--bq-date-picker--gap)}calendar-date::part(header),calendar-multi::part(header),calendar-range::part(header){gap:var(--bq-spacing-s);justify-content:center}calendar-date::part(heading),calendar-multi::part(heading),calendar-range::part(heading){padding-block:var(--bq-spacing-xs2);padding-inline:var(--bq-spacing-xs)}calendar-date::part(button),calendar-multi::part(button),calendar-range::part(button){background-color:transparent;border-radius:var(--bq-radius--s);border-width:0;padding-block:var(--bq-spacing-xs2);padding-inline:var(--bq-spacing-xs2);transition-duration:.2s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}calendar-date::part(button):focus-visible,calendar-multi::part(button):focus-visible,calendar-range::part(button):focus-visible{outline:var(--bq-ring-width,2px) solid var(--bq-ring-color-focus,var(--bq-focus));outline-offset:var(--bq-ring-offset-width,1px)}calendar-date::part(button):hover,calendar-multi::part(button):hover,calendar-range::part(button):hover{background-color:color-mix(in srgb,var(--bq-ui--primary),var(--bq-hover) 20%)}calendar-date::part(container),calendar-multi::part(container),calendar-range::part(container){background-color:var(--bq-date-picker--background-color);padding-block:0;padding-inline:0}calendar-month{--color-accent:var(--bq-ui--brand)}calendar-month::part(button){align-items:center;background-color:transparent;border-radius:var(--bq-radius--s);color:var(--bq-text--primary);display:flex;font-family:var(--bq-font-family);height:var(--bq-date-picker--day-size);justify-content:center;padding-block:0;padding-inline:0;transition-duration:.2s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);width:var(--bq-date-picker--day-size)}calendar-month::part(button):focus-visible{outline:var(--bq-ring-width,2px) solid var(--bq-ring-color-focus,var(--bq-focus));outline-offset:var(--bq-ring-offset-width,1px)}calendar-month::part(button):hover:enabled{background-color:color-mix(in srgb,var(--bq-background--secondary),var(--bq-hover) 20%)}calendar-month::part(button):disabled{cursor:not-allowed}calendar-month::part(button day disallowed){background-color:transparent!important;cursor:not-allowed!important}calendar-month::part(button day selected){background-color:var(--bq-date-picker--range-background-color);border-radius:var(--bq-radius--s);color:var(--bq-text--alt)}calendar-month::part(button day selected):hover:enabled{background-color:color-mix(in srgb,var(--bq-ui--brand),var(--bq-hover) 20%)}calendar-month::part(button day selected range-inner){background-color:var(--bq-date-picker--range-inner-background-color);border-radius:var(--bq-radius--none);color:var(--bq-text--primary)}calendar-month::part(button day selected range-inner):hover{color:var(--bq-text--alt)}calendar-month::part(button day outside){color:var(--bq-text--secondary);cursor:pointer;opacity:1}calendar-month::part(today){border-color:var(--bq-date-picker--currentDate-border-color);border-radius:var(--bq-radius--s);border-style:var(--bq-date-picker--border-style);border-width:var(--bq-date-picker--currentDate-border-width)}calendar-month::part(today selected){color:var(--bq-text--alt)}calendar-month::part(today selected range-inner){color:var(--bq-text--primary)}calendar-month::part(today range-inner){border-radius:var(--bq-radius--none)}calendar-month::part(today range-start){border-end-start-radius:var(--bq-radius--none);border-radius:var(--bq-radius--s)}calendar-month::part(today range-end){border-end-end-radius:var(--bq-radius--none);border-radius:var(--bq-radius--s)}calendar-month::part(range-start){border-end-end-radius:var(--bq-radius--none);border-start-end-radius:var(--bq-radius--none)}calendar-month::part(range-end){border-end-start-radius:var(--bq-radius--none);border-start-start-radius:var(--bq-radius--none)}calendar-month::part(range-start range-end){border-radius:var(--bq-radius--s)}calendar-month::part(table){--tw-border-spacing-x:0px;--tw-border-spacing-y:0px;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y);font-size:inherit}.focus-visible\\:focus:focus-visible{outline:var(--bq-ring-width,2px) solid var(--bq-ring-color-focus,var(--bq-focus));outline-offset:var(--bq-ring-offset-width,1px)}.placeholder\\:text-\\[color\\:--bq-date-picker--text-placeholder-color\\]::placeholder{color:var(--bq-date-picker--text-placeholder-color)}.hover\\:text-alt:hover{color:var(--bq-text--alt)}.hover\\:bg-hover-ui-primary:hover{background-color:color-mix(in srgb,var(--bq-ui--primary),var(--bq-hover) 20%)}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.enabled\\:hover\\:bg-hover-secondary:hover:enabled{background-color:color-mix(in srgb,var(--bq-background--secondary),var(--bq-hover) 20%)}.enabled\\:hover\\:bg-hover-ui-brand:hover:enabled{background-color:color-mix(in srgb,var(--bq-ui--brand),var(--bq-hover) 20%)}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.blur{--tw-blur:blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.\\!hidden{display:none!important}.hidden{display:none}.flex-wrap{flex-wrap:wrap}.gap-\\[--bq-spacing-m\\]{gap:var(--bq-spacing-m)}@media (min-width:640px){.sm\\:block{display:block}}.\\[\\&\\:\\:part\\(button\\)\\]\\:border-none::part(button){border-style:none}.\\[\\&\\:\\:part\\(button\\)\\]\\:p-0::part(button){padding:0}.\\[\\&\\:\\:part\\(panel\\)\\]\\:p-m::part(panel){padding:var(--bq-spacing-m)}.\\[\\&\\:\\:part\\(panel\\)\\]\\:is-auto::part(panel){inline-size:auto}.relative{position:relative}.text-\\[--bq-icon--color\\]{color:var(--bq-icon--color)}.bs-\\[--bq-icon--size\\]{block-size:var(--bq-icon--size)}.is-\\[--bq-icon--size\\]{inline-size:var(--bq-icon--size)}`;
397
+ /* -------------------------------------------------------------------------- */
398
+ /* Wire format parse/serialize */
399
+ /* -------------------------------------------------------------------------- */
400
+ /**
401
+ * Regex matching the wire-format ISO shape for each precision.
402
+ * The internal selection is always `YYYY-MM-DD`; these only apply at the
403
+ * public value boundary.
404
+ */
405
+ const PRECISION_ISO_REGEX = {
406
+ day: /^\d{4}-\d{2}-\d{2}$/,
407
+ month: /^\d{4}-\d{2}$/,
408
+ year: /^\d{4}$/,
409
+ };
410
+ /** Expand a wire-format token to a full `YYYY-MM-DD` ISO date. */
411
+ const expandToken = (token, precision) => {
412
+ if (precision === 'month')
413
+ return `${token}-01`;
414
+ if (precision === 'year')
415
+ return `${token}-01-01`;
416
+ return token;
417
+ };
418
+ /** Truncate a full `YYYY-MM-DD` ISO date to the wire-format for the precision. */
419
+ const truncateISO = (iso, precision) => {
420
+ if (precision === 'month')
421
+ return iso.slice(0, 7);
422
+ if (precision === 'year')
423
+ return iso.slice(0, 4);
424
+ return iso;
425
+ };
426
+ /**
427
+ * Whether the token matches the precision-specific shape *and* is a real date.
428
+ * For month/year we still expand to a full ISO date so `2026-13` / `2026-02-30`
429
+ * style errors are caught by `isValidISO`.
430
+ */
431
+ const isValidToken = (token, precision) => {
432
+ if (!PRECISION_ISO_REGEX[precision].test(token))
433
+ return false;
434
+ return isValidISO(expandToken(token, precision));
435
+ };
436
+ /**
437
+ * Parse a raw `value` string into an internal `TSelection` array.
438
+ *
439
+ * Wire format:
440
+ * - single: `YYYY-MM-DD` (or `YYYY-MM` / `YYYY` at coarser precision)
441
+ * - multi: space-separated tokens
442
+ * - range: `<start>/<end>`
443
+ *
444
+ * Internally the selection is always stored as full `YYYY-MM-DD` — month
445
+ * precision expands to the first day of the month; year precision to Jan 1st.
446
+ *
447
+ * Invalid tokens (malformed strings, impossible dates like `2026-99-99`,
448
+ * non-ISO input) are silently discarded — the returned selection is
449
+ * guaranteed to contain only valid ISO-8601 dates.
450
+ */
451
+ const parseValue = (value, type, precision = 'day') => {
452
+ if (!value)
453
+ return [];
454
+ const trimmed = value.trim();
455
+ if (!trimmed)
456
+ return [];
457
+ if (type === 'range') {
458
+ const parts = trimmed
459
+ .split('/')
460
+ .filter((token) => isValidToken(token, precision))
461
+ .map((token) => expandToken(token, precision));
462
+ if (parts.length === 0)
463
+ return [];
464
+ if (parts.length === 1)
465
+ return [parts[0]];
466
+ const [start, end] = sortRange(parts[0], parts[1]);
467
+ return [start, end];
468
+ }
469
+ if (type === 'multi') {
470
+ const valid = trimmed
471
+ .split(/\s+/)
472
+ .filter((token) => isValidToken(token, precision))
473
+ .map((token) => expandToken(token, precision));
474
+ return Array.from(new Set(valid)).sort(compareISO);
475
+ }
476
+ return isValidToken(trimmed, precision) ? [expandToken(trimmed, precision)] : [];
477
+ };
478
+ /**
479
+ * Serialize an internal `TSelection` array back to the wire format.
480
+ * Truncates each entry to the precision's ISO shape.
481
+ */
482
+ const serializeValue = (selection, type, precision = 'day') => {
483
+ if (!selection.length)
484
+ return '';
485
+ const format = (iso) => truncateISO(iso, precision);
486
+ if (type === 'range') {
487
+ if (selection.length < 2)
488
+ return format(selection[0] ?? '');
489
+ const [start, end] = sortRange(selection[0], selection[1]);
490
+ return `${format(start)}/${format(end)}`;
491
+ }
492
+ if (type === 'multi') {
493
+ return Array.from(new Set(selection.map(format)))
494
+ .sort(compareISO)
495
+ .join(' ');
496
+ }
497
+ return format(selection[0]);
498
+ };
499
+ /* -------------------------------------------------------------------------- */
500
+ /* Predicates */
501
+ /* -------------------------------------------------------------------------- */
502
+ /** Whether the given ISO day is included in the selection. */
503
+ const isSelected = (iso, selection, type) => {
504
+ if (!selection.length)
505
+ return false;
506
+ if (type === 'range') {
507
+ if (selection.length < 2)
508
+ return iso === selection[0];
509
+ const [start, end] = selection;
510
+ return iso >= start && iso <= end;
511
+ }
512
+ return selection.includes(iso);
513
+ };
514
+ /** Whether the ISO day is the start of a range selection. */
515
+ const isRangeStart = (iso, selection, type) => type === 'range' && selection.length === 2 && iso === selection[0];
516
+ /** Whether the ISO day is the end of a range selection. */
517
+ const isRangeEnd = (iso, selection, type) => type === 'range' && selection.length === 2 && iso === selection[1];
518
+ /** Whether the ISO day sits strictly inside the range (not start/end). */
519
+ const isRangeInner = (iso, selection, type) => {
520
+ if (type !== 'range' || selection.length < 2)
521
+ return false;
522
+ const [start, end] = selection;
523
+ return iso > start && iso < end;
524
+ };
525
+ /* -------------------------------------------------------------------------- */
526
+ /* Selection ops */
527
+ /* -------------------------------------------------------------------------- */
528
+ /**
529
+ * Apply a click on `iso` and return the next selection.
530
+ *
531
+ * - single: always replace.
532
+ * - multi: toggle (add if missing, remove if present).
533
+ * - range: if there is no start OR a full range exists, start a new range;
534
+ * otherwise complete the range (auto-sorted).
535
+ */
536
+ const applySelection = (iso, selection, type) => {
537
+ if (type === 'single')
538
+ return [iso];
539
+ if (type === 'multi') {
540
+ return selection.includes(iso) ? selection.filter((v) => v !== iso) : [...selection, iso].sort(compareISO);
541
+ }
542
+ // range
543
+ if (selection.length === 0 || selection.length === 2)
544
+ return [iso];
545
+ const [start, end] = sortRange(selection[0], iso);
546
+ return [start, end];
547
+ };
548
+ /**
549
+ * Build the highlighted range while the user is hovering with an in-progress
550
+ * range selection (`tentative` = the pending start).
551
+ */
552
+ const buildTentativeRange = (tentative, hovered) => {
553
+ if (!tentative || !hovered)
554
+ return [];
555
+ const [start, end] = sortRange(tentative, hovered);
556
+ return [start, end];
557
+ };
558
+
559
+ const buildCellPartList = (state) => {
560
+ const parts = [CALENDAR_PARTS.day];
561
+ if (state.selected)
562
+ parts.push(CALENDAR_PARTS.selected);
563
+ if (state.isToday)
564
+ parts.push(CALENDAR_PARTS.today);
565
+ if (state.outside)
566
+ parts.push(CALENDAR_PARTS.outside);
567
+ if (state.disallowed)
568
+ parts.push(CALENDAR_PARTS.disallowed);
569
+ if (state.outOfBounds)
570
+ parts.push(CALENDAR_PARTS.disabled);
571
+ if (state.rangeStart)
572
+ parts.push(CALENDAR_PARTS.rangeStart);
573
+ if (state.rangeEnd)
574
+ parts.push(CALENDAR_PARTS.rangeEnd);
575
+ if (state.rangeInner)
576
+ parts.push(CALENDAR_PARTS.rangeInner);
577
+ return parts.join(' ');
578
+ };
579
+ const computeCellState = (cell, ctx) => {
580
+ const disallowed = ctx.isDateDisallowed?.(cell.date) ?? false;
581
+ const outOfBounds = !isWithinBounds(cell.date, ctx.minISO, ctx.maxISO);
582
+ return {
583
+ outside: cell.outside,
584
+ disallowed,
585
+ outOfBounds,
586
+ disabled: disallowed || outOfBounds,
587
+ selected: isSelected(cell.iso, ctx.effectiveSelection, ctx.type),
588
+ rangeStart: isRangeStart(cell.iso, ctx.effectiveSelection, ctx.type),
589
+ rangeEnd: isRangeEnd(cell.iso, ctx.effectiveSelection, ctx.type),
590
+ rangeInner: isRangeInner(cell.iso, ctx.effectiveSelection, ctx.type),
591
+ isToday: isSameDay(cell.date, ctx.today),
592
+ isFocused: cell.iso === ctx.focusedISO,
593
+ buttonHidden: cell.outside && !ctx.showOutsideDays,
594
+ };
595
+ };
596
+ const renderCell = (cell, state, cb) => (index.h("td", { key: cell.iso, "aria-selected": state.selected ? 'true' : undefined, class: "bq-date-picker__td", part: CALENDAR_PARTS.td,
597
+ // biome-ignore lint/a11y/noNoninteractiveElementToInteractiveRole: WAI-ARIA date-picker grid pattern.
598
+ role: "gridcell", tabIndex: -1 }, index.h("button", { "aria-current": state.isToday ? 'date' : undefined, "aria-disabled": state.disabled ? 'true' : undefined, class: {
599
+ 'bq-date-picker__day': true,
600
+ 'is-selected': state.selected,
601
+ 'is-today': state.isToday,
602
+ 'is-outside': state.outside,
603
+ 'is-disallowed': state.disallowed,
604
+ 'is-out-of-bounds': state.outOfBounds,
605
+ 'is-range-start': state.rangeStart,
606
+ 'is-range-end': state.rangeEnd,
607
+ 'is-range-inner': state.rangeInner,
608
+ 'is-hidden': state.buttonHidden,
609
+ }, "data-iso": cell.iso, onClick: (ev) => !state.disabled && cb.onDaySelect(cell.iso, ev), onFocus: () => cb.onDayFocus(cell.iso), onMouseEnter: () => cb.onDayHover(cell.iso), onMouseLeave: () => cb.onDayHover(undefined), part: `${CALENDAR_PARTS.button} ${buildCellPartList(state)}`, tabIndex: state.isFocused ? 0 : -1, type: "button" }, cell.date.getDate())));
610
+ /**
611
+ * Day-level calendar view — weekday row + 6x7 grid.
612
+ *
613
+ * The grid is a `<table role="grid">` so it is announced correctly by screen
614
+ * readers, and it uses a roving tabindex so only the "focused" day is in the
615
+ * tab order. Keyboard nav is delegated to the host via `onGridKeyDown`.
616
+ */
617
+ const CalendarDayView = (props) => {
618
+ const { viewDate, selection, tentativeRange, focusedISO, type, locale, firstDayOfWeek, showOutsideDays, minISO, maxISO, isDateDisallowed, onDaySelect, onDayHover, onDayFocus, onGridKeyDown, } = props;
619
+ const weekdays = getWeekdayNames(locale, firstDayOfWeek, 'short');
620
+ const rows = buildMonthMatrix(viewDate, firstDayOfWeek);
621
+ const today = new Date();
622
+ // Localized "Month Year" label used to name the grid for screen readers,
623
+ // e.g. "July 2026". Always computed so the grid is named even when the
624
+ // visible heading is rendered outside this component.
625
+ const gridLabel = formatMonth(viewDate, locale, 'long', true);
626
+ // The effective selection includes the tentative range so hover states
627
+ // preview correctly during range selection.
628
+ const effectiveSelection = type === 'range' && tentativeRange.length === 2 ? tentativeRange : selection;
629
+ return (index.h("div", { class: "bq-date-picker__day-view" }, index.h("table", { "aria-label": gridLabel, class: "bq-date-picker__table", onKeyDown: onGridKeyDown, part: CALENDAR_PARTS.table,
630
+ // biome-ignore lint/a11y/noNoninteractiveElementToInteractiveRole: WAI-ARIA date-picker grid pattern.
631
+ role: "grid" }, index.h("thead", { part: CALENDAR_PARTS.head }, index.h("tr", { part: CALENDAR_PARTS.tr }, weekdays.map((wd) => (index.h("th", { key: wd.long, abbr: wd.long, class: "bq-date-picker__th", part: CALENDAR_PARTS.th, scope: "col" }, wd.short))))), index.h("tbody", null, rows.map((row) => (index.h("tr", { key: row[0].iso, class: "bq-date-picker__week", part: `${CALENDAR_PARTS.tr} ${CALENDAR_PARTS.week}` }, row.map((cell) => {
632
+ const state = computeCellState(cell, {
633
+ effectiveSelection,
634
+ type,
635
+ today,
636
+ focusedISO,
637
+ minISO,
638
+ maxISO,
639
+ isDateDisallowed,
640
+ showOutsideDays,
641
+ });
642
+ return renderCell(cell, state, { onDaySelect, onDayHover, onDayFocus });
643
+ }))))))));
644
+ };
645
+
646
+ /**
647
+ * Calendar header — previous / title / next.
648
+ *
649
+ * The header is rendered once per calendar panel. It exposes the standard
650
+ * `calendar__header`, `calendar__previous`, `calendar__heading`, and
651
+ * `calendar__next` shadow parts so consumers can theme any button.
652
+ */
653
+ const CalendarHeader = ({ view, label, previousLabel, nextLabel, titleLabel, previousDisabled = false, nextDisabled = false, titleInteractive = true, onPrevious, onNext, onTitleClick, }) => (index.h("div", { class: "bq-date-picker__header", part: CALENDAR_PARTS.header }, index.h("bq-button", { appearance: "text", border: "s", class: "bq-date-picker__nav-button", disabled: previousDisabled, label: previousLabel, onlyIcon: true, onBqClick: onPrevious, part: `${CALENDAR_PARTS.button} ${CALENDAR_PARTS.previous}`, size: "small", type: "button" }, index.h("bq-icon", { "aria-hidden": "true", class: "bq-date-picker__nav-icon", name: "caret-left" })), index.h("bq-button", { appearance: "text", "aria-live": "polite", border: "s", class: {
654
+ 'bq-date-picker__heading': true,
655
+ 'bq-date-picker__heading--static': !titleInteractive,
656
+ }, "data-view": view, disabled: !titleInteractive, label: titleLabel, onBqClick: onTitleClick, part: CALENDAR_PARTS.heading, size: "small", type: "button", block: true }, label), index.h("bq-button", { appearance: "text", border: "s", class: "bq-date-picker__nav-button", disabled: nextDisabled, label: nextLabel, onlyIcon: true, onBqClick: onNext, part: `${CALENDAR_PARTS.button} ${CALENDAR_PARTS.next}`, size: "small", type: "button" }, index.h("bq-icon", { "aria-hidden": "true", class: "bq-date-picker__nav-icon", name: "caret-right" }))));
657
+
658
+ /** ISO used to compare a month cell against the internal selection. */
659
+ const monthCellISO = (year, month) => `${year}-${String(month + 1).padStart(2, '0')}-01`;
660
+ const buildMonthParts = (state) => {
661
+ const parts = [CALENDAR_PARTS.month];
662
+ if (state.selected)
663
+ parts.push(CALENDAR_PARTS.monthSelected);
664
+ if (state.rangeStart)
665
+ parts.push(CALENDAR_PARTS.rangeStart);
666
+ if (state.rangeEnd)
667
+ parts.push(CALENDAR_PARTS.rangeEnd);
668
+ if (state.rangeInner)
669
+ parts.push(CALENDAR_PARTS.rangeInner);
670
+ if (state.disabled)
671
+ parts.push(CALENDAR_PARTS.disabled);
672
+ return parts.join(' ');
673
+ };
674
+ const buildMonthCellState = (year, month, focusedMonth, minISO, maxISO, selection, type) => {
675
+ const iso = monthCellISO(year, month);
676
+ const disabled = !isMonthWithinBounds(year, month, minISO, maxISO);
677
+ return {
678
+ iso,
679
+ disabled,
680
+ selected: isSelected(iso, selection, type),
681
+ rangeStart: isRangeStart(iso, selection, type),
682
+ rangeEnd: isRangeEnd(iso, selection, type),
683
+ rangeInner: isRangeInner(iso, selection, type),
684
+ isFocused: focusedMonth === month,
685
+ };
686
+ };
687
+ const chunkMonths = (months, columns) => {
688
+ const rows = [];
689
+ for (let month = 0; month < months.length; month += columns) {
690
+ rows.push(months.slice(month, month + columns).map((name, offset) => ({ month: month + offset, name })));
691
+ }
692
+ return rows;
693
+ };
694
+ const renderMonthCell = ({ month, name, state, onMonthSelect, onMonthFocus, onMonthHover }) => (
695
+ // biome-ignore lint/a11y/useFocusableInteractive: gridcell is a structural ARIA container; focus is managed by the child <button> via roving tabindex
696
+ index.h("div", { "aria-selected": state.selected ? 'true' : undefined, class: "bq-date-picker__month-gridcell", role: "gridcell", key: month }, index.h("button", { "aria-disabled": state.disabled ? 'true' : undefined, class: {
697
+ 'bq-date-picker__month-cell': true,
698
+ 'is-selected': state.selected,
699
+ 'is-range-start': state.rangeStart,
700
+ 'is-range-end': state.rangeEnd,
701
+ 'is-range-inner': state.rangeInner,
702
+ 'is-out-of-bounds': state.disabled,
703
+ }, "data-month": month, disabled: state.disabled, onClick: (ev) => !state.disabled && onMonthSelect(month, ev), onFocus: () => onMonthFocus(month), onMouseEnter: () => onMonthHover(state.iso), onMouseLeave: () => onMonthHover(undefined), part: `${CALENDAR_PARTS.button} ${buildMonthParts(state)}`, tabIndex: state.isFocused ? 0 : -1, type: "button" }, name)));
704
+ /**
705
+ * Month picker — 12 buttons in a 3×4 grid.
706
+ */
707
+ const CalendarMonthView = ({ year, focusedMonth, locale, minISO, maxISO, selection, tentativeRange, type, onMonthSelect, onMonthFocus, onMonthHover, onGridKeyDown, gridColumns, }) => {
708
+ const months = getMonthNames(locale, 'short');
709
+ const effectiveSelection = type === 'range' && tentativeRange.length === 2 ? tentativeRange : selection;
710
+ const rows = chunkMonths(months, gridColumns);
711
+ return (index.h("div", { class: "bq-date-picker__months", "data-grid-columns": String(gridColumns), onKeyDown: onGridKeyDown, part: CALENDAR_PARTS.months, role: "grid", tabIndex: -1 }, rows.map((row) => (
712
+ // biome-ignore lint/a11y/useFocusableInteractive: gridcell is a structural ARIA container; focus is managed by the child <button> via roving tabindex
713
+ index.h("div", { class: "bq-date-picker__month-row", role: "row", key: `month-row-${row.map(({ month }) => month).join('-')}` }, row.map(({ month, name }) => {
714
+ const state = buildMonthCellState(year, month, focusedMonth, minISO, maxISO, effectiveSelection, type);
715
+ return renderMonthCell({ month, name, state, onMonthSelect, onMonthFocus, onMonthHover });
716
+ }))))));
717
+ };
718
+
719
+ /** ISO used to compare a year cell against the internal selection. */
720
+ const yearCellISO = (year) => `${year}-01-01`;
721
+ const buildYearParts = (state) => {
722
+ const parts = [CALENDAR_PARTS.year];
723
+ if (state.selected)
724
+ parts.push(CALENDAR_PARTS.yearSelected);
725
+ if (state.rangeStart)
726
+ parts.push(CALENDAR_PARTS.rangeStart);
727
+ if (state.rangeEnd)
728
+ parts.push(CALENDAR_PARTS.rangeEnd);
729
+ if (state.rangeInner)
730
+ parts.push(CALENDAR_PARTS.rangeInner);
731
+ if (state.disabled)
732
+ parts.push(CALENDAR_PARTS.disabled);
733
+ return parts.join(' ');
734
+ };
735
+ const buildYearCellState = (year, focusedYear, minISO, maxISO, selection, type) => {
736
+ const iso = yearCellISO(year);
737
+ const disabled = !isYearWithinBounds(year, minISO, maxISO);
738
+ return {
739
+ iso,
740
+ disabled,
741
+ selected: isSelected(iso, selection, type),
742
+ rangeStart: isRangeStart(iso, selection, type),
743
+ rangeEnd: isRangeEnd(iso, selection, type),
744
+ rangeInner: isRangeInner(iso, selection, type),
745
+ isFocused: focusedYear === year,
746
+ };
747
+ };
748
+ const chunkYears = (years, columns) => {
749
+ const rows = [];
750
+ for (let index = 0; index < years.length; index += columns) {
751
+ rows.push(years.slice(index, index + columns));
752
+ }
753
+ return rows;
754
+ };
755
+ const renderYearCell = ({ year, state, onYearSelect, onYearFocus, onYearHover }) => (
756
+ // biome-ignore lint/a11y/useFocusableInteractive: gridcell is a structural ARIA container; focus is managed by the child <button> via roving tabindex
757
+ index.h("div", { "aria-selected": state.selected ? 'true' : undefined, class: "bq-date-picker__year-gridcell", key: year, role: "gridcell" }, index.h("button", { "aria-disabled": state.disabled ? 'true' : undefined, class: {
758
+ 'bq-date-picker__year-cell': true,
759
+ 'is-selected': state.selected,
760
+ 'is-range-start': state.rangeStart,
761
+ 'is-range-end': state.rangeEnd,
762
+ 'is-range-inner': state.rangeInner,
763
+ 'is-out-of-bounds': state.disabled,
764
+ }, "data-year": year, disabled: state.disabled, onClick: (ev) => !state.disabled && onYearSelect(year, ev), onFocus: () => onYearFocus(year), onMouseEnter: () => onYearHover(state.iso), onMouseLeave: () => onYearHover(undefined), part: `${CALENDAR_PARTS.button} ${buildYearParts(state)}`, tabIndex: state.isFocused ? 0 : -1, type: "button" }, year)));
765
+ /**
766
+ * Year picker — 12 buttons for a decade grid.
767
+ */
768
+ const CalendarYearView = ({ years, focusedYear, minISO, maxISO, selection, tentativeRange, type, onYearSelect, onYearFocus, onYearHover, onGridKeyDown, gridColumns, }) => {
769
+ const effectiveSelection = type === 'range' && tentativeRange.length === 2 ? tentativeRange : selection;
770
+ const rows = chunkYears(years, gridColumns);
771
+ return (index.h("div", { class: "bq-date-picker__years", "data-grid-columns": String(gridColumns), onKeyDown: onGridKeyDown, part: CALENDAR_PARTS.years, role: "grid", tabIndex: -1 }, rows.map((row) => (
772
+ // biome-ignore lint/a11y/useFocusableInteractive: gridcell is a structural ARIA container; focus is managed by the child <button> via roving tabindex
773
+ index.h("div", { class: "bq-date-picker__year-row", key: `year-row-${row.join('-')}`, role: "row" }, row.map((year) => {
774
+ const state = buildYearCellState(year, focusedYear, minISO, maxISO, effectiveSelection, type);
775
+ return renderYearCell({ year, state, onYearSelect, onYearFocus, onYearHover });
776
+ }))))));
777
+ };
778
+
779
+ /**
780
+ * Precision-aware, bounds-aware parser for the trigger input field.
781
+ * Returns the parsed date as a wire-format string at the configured
782
+ * precision, clamped against `min`/`max`, or `{ invalid: true }` on failure.
783
+ */
784
+ const parseTypedInput = (text, locale, precision, min, max, isDateDisallowed) => {
785
+ const trimmed = text.trim();
786
+ if (!trimmed)
787
+ return { value: undefined };
788
+ const parsed = form.parseDateInput(trimmed, locale);
789
+ if (!parsed || isDateDisallowed?.(parsed))
790
+ return { invalid: true };
791
+ const iso = clampISO(form.toISODateString(parsed), min, max);
792
+ return { value: serializeValue([iso], 'single', precision) };
793
+ };
794
+ /**
795
+ * Lexically clamp a full `YYYY-MM-DD` ISO date to precision-padded bounds.
796
+ * Coarser bounds (`YYYY`, `YYYY-MM`) are padded to the widest matching day
797
+ * before comparing.
798
+ */
799
+ const clampISO = (iso, min, max) => {
800
+ const paddedMin = padBound(min, 'min');
801
+ const paddedMax = padBound(max, 'max');
802
+ if (paddedMin && iso < paddedMin)
803
+ return paddedMin;
804
+ if (paddedMax && iso > paddedMax)
805
+ return paddedMax;
806
+ return iso;
807
+ };
126
808
 
809
+ /**
810
+ * Builds the label shown in the calendar header title button.
811
+ *
812
+ * - `days`: localized "Month Year" for a single panel, or "StartYear – EndYear"
813
+ * when several months are visible at once.
814
+ * - `months`: the localized year currently in focus.
815
+ * - `years`: the closed range spanning the visible decade.
816
+ */
817
+ const getHeaderLabel = ({ view, viewDate, focusedYear, decadeStart, monthCount, locale, }) => {
818
+ if (view === 'days') {
819
+ if (monthCount > 1) {
820
+ const first = startOfMonth(viewDate);
821
+ const last = startOfMonth(addMonths(viewDate, monthCount - 1));
822
+ const startYear = formatYear(first, locale);
823
+ const endYear = formatYear(last, locale);
824
+ return startYear === endYear ? startYear : `${startYear} – ${endYear}`;
825
+ }
826
+ return formatMonth(viewDate, locale, 'long', true);
827
+ }
828
+ if (view === 'months') {
829
+ return formatYear(new Date(focusedYear, 0, 1), locale);
830
+ }
831
+ const end = decadeStart + DECADE_GRID_SIZE - 1;
832
+ return `${decadeStart} – ${end}`;
833
+ };
834
+ /**
835
+ * Aria label announcing what clicking the title switches to.
836
+ * Views cycle days → months → years → back to the base view (days for
837
+ * `precision="day"`, months for `precision="month"`).
838
+ */
839
+ const getHeaderTitleLabel = (view, precision = 'day') => {
840
+ if (view === 'days')
841
+ return DEFAULT_ARIA_LABELS.chooseMonth;
842
+ if (view === 'months')
843
+ return DEFAULT_ARIA_LABELS.chooseYear;
844
+ return precision === 'month' ? DEFAULT_ARIA_LABELS.chooseMonth : DEFAULT_ARIA_LABELS.chooseDate;
845
+ };
846
+ /** Aria label for the "previous" navigation button, per view. */
847
+ const getPreviousLabel = (view) => {
848
+ if (view === 'days')
849
+ return DEFAULT_ARIA_LABELS.previousMonth;
850
+ if (view === 'months')
851
+ return DEFAULT_ARIA_LABELS.previousYear;
852
+ return DEFAULT_ARIA_LABELS.previousDecade;
853
+ };
854
+ /** Aria label for the "next" navigation button, per view. */
855
+ const getNextLabel = (view) => {
856
+ if (view === 'days')
857
+ return DEFAULT_ARIA_LABELS.nextMonth;
858
+ if (view === 'months')
859
+ return DEFAULT_ARIA_LABELS.nextYear;
860
+ return DEFAULT_ARIA_LABELS.nextDecade;
861
+ };
862
+
863
+ /**
864
+ * Advances a focused month cursor by `delta` months, carrying over to the
865
+ * previous or next year as needed. Pure — accepts and returns primitives so
866
+ * it can be unit-tested and reused by keyboard handlers.
867
+ */
868
+ const advanceFocusedMonth = (focusedMonth, focusedYear, delta) => {
869
+ let month = focusedMonth + delta;
870
+ let year = focusedYear;
871
+ while (month < 0) {
872
+ month += 12;
873
+ year -= 1;
874
+ }
875
+ while (month > 11) {
876
+ month -= 12;
877
+ year += 1;
878
+ }
879
+ return { month, year };
880
+ };
881
+ /**
882
+ * Advances a focused year cursor by `delta` years, sliding the visible
883
+ * decade grid so the focused year always stays in view.
884
+ */
885
+ const advanceFocusedYear = (focusedYear, decadeStart, delta) => {
886
+ const year = focusedYear + delta;
887
+ let nextDecadeStart = decadeStart;
888
+ if (year < decadeStart) {
889
+ nextDecadeStart = decadeStart - DECADE_GRID_SIZE;
890
+ }
891
+ else if (year > decadeStart + DECADE_GRID_SIZE - 1) {
892
+ nextDecadeStart = decadeStart + DECADE_GRID_SIZE;
893
+ }
894
+ return { year, decadeStart: nextDecadeStart };
895
+ };
896
+ /**
897
+ * Number of columns used to render the months/years grids. The grids widen
898
+ * from 3 → 4 columns when multiple months are visible, so vertical arrow
899
+ * navigation stride must match.
900
+ */
901
+ const getGridColumns = (monthCount) => (monthCount > 1 ? 4 : 3);
902
+
903
+ /**
904
+ * Normalizes a raw public `value` string against the current picker `type`
905
+ * and `precision`.
906
+ *
907
+ * Runs the value through `parseValue`/`serializeValue` so any invalid ISO
908
+ * tokens are dropped before the value ever reaches the form, the display
909
+ * input, or the visible selection. Returns `undefined` when normalization
910
+ * leaves an empty string, so callers can distinguish "no value" from "empty
911
+ * string value".
912
+ */
913
+ const normalizeValue = (raw, type, precision = 'day') => {
914
+ const serialized = serializeValue(parseValue(raw, type, precision), type, precision);
915
+ return serialized === '' ? undefined : serialized;
916
+ };
917
+ /** Whether a value string is present and non-empty — used to drive UI affordances. */
918
+ const computeHasValue = (value) => isDefined.isDefined(value) && `${value}`.length > 0;
919
+ /**
920
+ * Formats the current value for display in the trigger input. Thin wrapper
921
+ * around `formatDisplayValue` that accepts `undefined` and coerces to an
922
+ * empty string, so callers don't have to repeat the null check.
923
+ *
924
+ * Precision-agnostic: internally the selection is stored as full ISO dates
925
+ * (the first day of the month / January 1st for coarser precisions), so
926
+ * `Intl.DateTimeFormat(locale, formatOptions)` produces the right label
927
+ * whether the user asked for `{ year: 'numeric' }` or `{ dateStyle: 'full' }`.
928
+ */
929
+ const computeDisplayDate = (value, type, locale, formatOptions, precision = 'day') => {
930
+ // Expand precision-truncated wire values back to full ISO so
931
+ // `formatDisplayValue` (which expects YYYY-MM-DD) can parse them.
932
+ const expanded = serializeValue(parseValue(value ?? '', type, precision), type, 'day');
933
+ return form.formatDisplayValue(expanded, type, locale, formatOptions);
934
+ };
935
+ /**
936
+ * Default `Intl.DateTimeFormat` options per precision.
937
+ * Applied when the consumer hasn't explicitly overridden `formatOptions`, so
938
+ * a `precision="month"` picker doesn't show "1 May 2026".
939
+ */
940
+ const DEFAULT_FORMAT_OPTIONS_BY_PRECISION = {
941
+ day: { day: 'numeric', month: 'short', year: 'numeric' },
942
+ month: { month: 'long', year: 'numeric' },
943
+ year: { year: 'numeric' },
944
+ };
945
+
946
+ const bqDatePickerCss = () => `.transform{--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}::backdrop,:root{--bq-blue-100:#e7f0fd;--bq-blue-200:#d0e2fb;--bq-blue-300:#a1c5f7;--bq-blue-400:#73a8f3;--bq-blue-500:#448bef;--bq-blue-600:#156eeb;--bq-blue-700:#1158bc;--bq-blue-800:#0d428d;--bq-blue-900:#082c5e;--bq-blue-1000:#04162f;--bq-corai-100:#fff2f2;--bq-corai-200:#ffe6e6;--bq-corai-300:#ffccce;--bq-corai-400:#ffb3b5;--bq-corai-500:#ff999d;--bq-corai-600:#ff8084;--bq-corai-700:#cc666a;--bq-corai-800:#994d4f;--bq-corai-900:#663335;--bq-corai-1000:#331a1a;--bq-cyan-100:#e8f7fb;--bq-cyan-200:#d2f0f8;--bq-cyan-300:#a5e1f1;--bq-cyan-400:#78d1e9;--bq-cyan-500:#4bc2e2;--bq-cyan-600:#1eb3db;--bq-cyan-700:#188faf;--bq-cyan-800:#126b83;--bq-cyan-900:#0c4858;--bq-cyan-1000:#06242c;--bq-gold-100:#fbf4ec;--bq-gold-200:#f7e9da;--bq-gold-300:#f0d3b6;--bq-gold-400:#e8bc91;--bq-gold-500:#e1a66d;--bq-gold-600:#d99048;--bq-gold-700:#ae733a;--bq-gold-800:#82562b;--bq-gold-900:#573a1d;--bq-gold-1000:#2b1d0e;--bq-green-100:#e8f8ef;--bq-green-200:#d2f1e0;--bq-green-300:#a5e3c1;--bq-green-400:#78d5a1;--bq-green-500:#4bc782;--bq-green-600:#1eb963;--bq-green-700:#18944f;--bq-green-800:#126f3b;--bq-green-900:#0c4a28;--bq-green-1000:#062514;--bq-grey-100:#f1f2f4;--bq-grey-200:#e7e8eb;--bq-grey-300:#caccd2;--bq-grey-400:#a6aab3;--bq-grey-50:#f6f6f8;--bq-grey-500:#898e99;--bq-grey-600:#646a77;--bq-grey-700:#3f4350;--bq-grey-800:#2a2c35;--bq-grey-900:#1c1d23;--bq-grey-950:#15161a;--bq-grey-1000:#0d0e11;--bq-indigo-100:#edecfc;--bq-indigo-200:#dcdafa;--bq-indigo-300:#b9b5f5;--bq-indigo-400:#9590ef;--bq-indigo-500:#726bea;--bq-indigo-600:#4f46e5;--bq-indigo-700:#3f38b7;--bq-indigo-800:#2f2a89;--bq-indigo-900:#201c5c;--bq-indigo-1000:#100e2e;--bq-iris-100:#e9f0ff;--bq-iris-200:#d6e0ff;--bq-iris-300:#b2c0fe;--bq-iris-400:#8691f8;--bq-iris-500:#6061ee;--bq-iris-600:#4f46e5;--bq-iris-700:#413abd;--bq-iris-800:#332e95;--bq-iris-900:#26216d;--bq-iris-1000:#181545;--bq-lime-100:#f5fae8;--bq-lime-200:#ecf6d2;--bq-lime-300:#d9eda5;--bq-lime-400:#c5e379;--bq-lime-500:#b2da4c;--bq-lime-600:#9fd11f;--bq-lime-700:#7fa719;--bq-lime-800:#5f7d13;--bq-lime-900:#40540c;--bq-lime-1000:#202a06;--bq-magenta-100:#fce7f4;--bq-magenta-200:#f9cfea;--bq-magenta-300:#f39fd6;--bq-magenta-400:#ee6fbf;--bq-magenta-500:#e83fab;--bq-magenta-600:#de1395;--bq-magenta-700:#b20f77;--bq-magenta-800:#850c59;--bq-magenta-900:#58083c;--bq-magenta-1000:#2c041e;--bq-neutral-white:#fbfbfc;--bq-neutral-black:#060708;--bq-orange-100:#fbf0e9;--bq-orange-200:#f8e1d4;--bq-orange-300:#f1c2a8;--bq-orange-400:#eaa47d;--bq-orange-500:#e38551;--bq-orange-600:#dc6726;--bq-orange-700:#b0521e;--bq-orange-800:#843e17;--bq-orange-900:#58290f;--bq-orange-1000:#2c1508;--bq-purple-100:#efebf8;--bq-purple-200:#e0d7f2;--bq-purple-300:#c1afe5;--bq-purple-400:#a388d8;--bq-purple-500:#8460cb;--bq-purple-600:#6538be;--bq-purple-700:#512d98;--bq-purple-800:#3d2272;--bq-purple-900:#28164c;--bq-purple-1000:#140b26;--bq-red-100:#fce7ea;--bq-red-200:#f9d1d5;--bq-red-300:#f3a2ac;--bq-red-400:#ed7482;--bq-red-500:#e74559;--bq-red-600:#e1172f;--bq-red-700:#b41226;--bq-red-800:#870e1c;--bq-red-900:#5a0913;--bq-red-1000:#2d0509;--bq-sky-100:#eff4fb;--bq-sky-200:#dfeaf8;--bq-sky-300:#bfd5f1;--bq-sky-400:#9ec1e9;--bq-sky-500:#7eace2;--bq-sky-600:#5e97db;--bq-sky-700:#4b79af;--bq-sky-800:#385b83;--bq-sky-900:#263c58;--bq-sky-1000:#131e2c;--bq-teal-100:#e5f7f5;--bq-teal-200:#ccf0eb;--bq-teal-300:#99e1d8;--bq-teal-400:#66d2c4;--bq-teal-500:#33c3b1;--bq-teal-600:#00b49d;--bq-teal-700:#00907e;--bq-teal-800:#006c5e;--bq-teal-900:#00483f;--bq-teal-1000:#00241f;--bq-volcano-100:#feede7;--bq-volcano-200:#fddbd1;--bq-volcano-300:#fbb8a3;--bq-volcano-400:#fa9474;--bq-volcano-500:#f87146;--bq-volcano-600:#f64d18;--bq-volcano-700:#c53e13;--bq-volcano-800:#942e0e;--bq-volcano-900:#621f0a;--bq-volcano-1000:#310f05;--bq-yellow-100:#fefbe7;--bq-yellow-200:#fcf6d0;--bq-yellow-300:#faeea0;--bq-yellow-400:#f7e571;--bq-yellow-500:#f5dd41;--bq-yellow-600:#f2d412;--bq-yellow-700:#c2aa0e;--bq-yellow-800:#917f0b;--bq-yellow-900:#615507;--bq-yellow-1000:#302a04;--bq-endava-grey-50:#f7f7f8;--bq-endava-grey-100:#e4e6e7;--bq-endava-grey-200:#b5babe;--bq-endava-grey-300:#949ca1;--bq-endava-grey-400:#737d84;--bq-endava-grey-500:#525f67;--bq-endava-grey-600:#30404b;--bq-endava-grey-700:#2b3942;--bq-endava-grey-800:#263139;--bq-endava-grey-900:#192b37;--bq-endava-grey-950:#151b1e;--bq-endava-grey-1000:#0f1316;--bq-endava-neutral-white:#fafbfb;--bq-endava-neutral-black:#060708;--bq-endava-orange-100:#fef3f1;--bq-endava-orange-200:#fbd6d1;--bq-endava-orange-300:#fab7af;--bq-endava-orange-400:#fa988b;--bq-endava-orange-500:#fc7866;--bq-endava-orange-600:#ff5640;--bq-endava-orange-700:#ce4a39;--bq-endava-orange-800:#a03d30;--bq-endava-orange-900:#722e25;--bq-endava-orange-1000:#471e19}*,:after,:before{-webkit-box-sizing:border-box;box-sizing:border-box}*{font:inherit;margin:0}ol[role=list],ul[role=list]{list-style-type:none}html{text-size-adjust:none;font-family:var(--bq-font-family);font-size:var(--bq-font-size--m)}html:focus-within{scroll-behavior:smooth}body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-color:var(--bq-background--primary);color:var(--bq-text--primary);line-height:var(--bq-font-line-height--regular);min-height:100vb;text-rendering:optimizeSpeed}a:not([class]){text-decoration-skip-ink:auto}canvas,img,picture,svg,video{display:block;max-width:100%}button,input,select,textarea{font:inherit}h1,h2,h3,h4,h5,h6,p{overflow-wrap:break-word}@media (prefers-reduced-motion:reduce){html:focus-within{scroll-behavior:auto}*,:after,:before{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto;transition-duration:.01ms!important}}:where(:root){--bq-white:#fff;--bq-black:#060708;--bq-neutral-50:var(--bq-grey-50);--bq-neutral-100:var(--bq-grey-100);--bq-neutral-200:var(--bq-grey-200);--bq-neutral-300:var(--bq-grey-300);--bq-neutral-400:var(--bq-grey-400);--bq-neutral-500:var(--bq-grey-500);--bq-neutral-600:var(--bq-grey-600);--bq-neutral-700:var(--bq-grey-700);--bq-neutral-800:var(--bq-grey-800);--bq-neutral-900:var(--bq-grey-900);--bq-neutral-950:var(--bq-grey-950);--bq-neutral-1000:var(--bq-grey-1000);--bq-brand-light:var(--bq-iris-100);--bq-brand:var(--bq-iris-600);--bq-brand-dark:var(--bq-iris-1000);--bq-accent-light:var(--bq-purple-100);--bq-accent:var(--bq-purple-600);--bq-accent-dark:var(--bq-purple-1000);--bq-success-light:var(--bq-teal-100);--bq-success:var(--bq-teal-600);--bq-success-dark:var(--bq-teal-1000);--bq-danger-light:var(--bq-red-100);--bq-danger:var(--bq-red-600);--bq-danger-dark:var(--bq-red-1000);--bq-warning-light:var(--bq-gold-100);--bq-warning:var(--bq-gold-600);--bq-warning-dark:var(--bq-gold-1000);--bq-info-light:var(--bq-iris-100);--bq-info:var(--bq-iris-600);--bq-info-dark:var(--bq-iris-1000);--bq-focus:var(--bq-iris-600);--bq-data-01:var(--bq-brand);--bq-data-02:var(--bq-purple-600);--bq-data-03:var(--bq-magenta-600);--bq-data-04:var(--bq-cyan-600);--bq-data-05:var(--bq-teal-600);--bq-data-06:var(--bq-orange-600);--bq-data-07:var(--bq-yellow-600);--bq-data-08:var(--bq-red-600);--bq-data-09:var(--bq-blue-600);--bq-data-10:var(--bq-grey-600);--bq-data-11:var(--bq-black);--bq-data-12:var(--bq-white);--bq-radius--none:0;--bq-radius--xs2:0.125rem;--bq-radius--xs:0.25rem;--bq-radius--s:0.5rem;--bq-radius--m:0.75rem;--bq-radius--l:1.5rem;--bq-radius--full:9999px;--bq-box-shadow--xs:0 2px 0 rgba(0,0,0,.016);--bq-box-shadow--s:0 8px 24px rgba(0,0,0,.04);--bq-box-shadow--m:0 10px 48px -16px rgba(0,0,0,.12);--bq-box-shadow--l:0 20px 58px -16px rgba(0,0,0,.16);--bq-font-family:"Outfit",sans-serif;--bq-font-size--xs:0.75rem;--bq-font-size--s:0.875rem;--bq-font-size--m:1rem;--bq-font-size--l:1.125rem;--bq-font-size--xl:1.5rem;--bq-font-size--xxl:2rem;--bq-font-size--xxl2:2.5rem;--bq-font-size--xxl3:3rem;--bq-font-size--xxl4:3.5rem;--bq-font-size--xxl5:4rem;--bq-font-weight--thin:100;--bq-font-weight--light:300;--bq-font-weight--regular:400;--bq-font-weight--medium:500;--bq-font-weight--semibold:600;--bq-font-weight--bold:700;--bq-font-line-height--small:1.2;--bq-font-line-height--regular:1.5;--bq-font-line-height--large:1.5;--bq-spacing-xs3:0.125rem;--bq-spacing-xs2:0.25rem;--bq-spacing-xs:0.5rem;--bq-spacing-s:0.75rem;--bq-spacing-m:1rem;--bq-spacing-l:1.5rem;--bq-spacing-xl:2rem;--bq-spacing-xxl:2.5rem;--bq-spacing-xxl2:3.5rem;--bq-spacing-xxl3:4rem;--bq-spacing-xxl4:4.5rem;--bq-stroke-s:1px;--bq-stroke-m:2px;--bq-stroke-l:3px}.beeq:not([bq-mode]),.light,:root:not([bq-theme]):not([bq-mode]),:root[bq-theme=beeq]:not([bq-mode]),[bq-mode=light]{--bq-background--primary:var(--bq-white);--bq-background--secondary:var(--bq-neutral-100);--bq-background--tertiary:var(--bq-neutral-200);--bq-background--alt:var(--bq-neutral-300);--bq-background--inverse:var(--bq-neutral-900);--bq-background--brand:var(--bq-brand);--bq-background--overlay:var(--bq-neutral-900);--bq-icon--primary:var(--bq-neutral-800);--bq-icon--alt:var(--bq-white);--bq-icon--secondary:var(--bq-neutral-600);--bq-icon--inverse:var(--bq-neutral-50);--bq-icon--brand:var(--bq-brand);--bq-icon--info:var(--bq-brand);--bq-icon--success:var(--bq-success);--bq-icon--warning:var(--bq-warning);--bq-icon--danger:var(--bq-danger);--bq-stroke--primary:var(--bq-neutral-200);--bq-stroke--secondary:var(--bq-neutral-600);--bq-stroke--tertiary:var(--bq-neutral-900);--bq-stroke--inverse:var(--bq-white);--bq-stroke--brand:var(--bq-brand);--bq-stroke--alt:var(--bq-neutral-50);--bq-stroke--success:var(--bq-success);--bq-stroke--warning:var(--bq-warning);--bq-stroke--danger:var(--bq-danger);--bq-stroke--info:var(--bq-brand);--bq-text--primary:var(--bq-neutral-800);--bq-text--secondary:var(--bq-neutral-600);--bq-text--inverse:var(--bq-neutral-50);--bq-text--brand:var(--bq-brand);--bq-text--alt:var(--bq-white);--bq-text--info:var(--bq-brand);--bq-text--success:var(--bq-success);--bq-text--warning:var(--bq-warning);--bq-text--danger:var(--bq-danger);--bq-ui--primary:var(--bq-white);--bq-ui--secondary:var(--bq-neutral-100);--bq-ui--tertiary:var(--bq-neutral-500);--bq-ui--inverse:var(--bq-neutral-900);--bq-ui--brand:var(--bq-brand);--bq-ui--brand-alt:var(--bq-brand-light);--bq-ui--alt:var(--bq-neutral-50);--bq-ui--success:var(--bq-success);--bq-ui--success-alt:var(--bq-success-light);--bq-ui--warning:var(--bq-warning);--bq-ui--warning-alt:var(--bq-warning-light);--bq-ui--danger:var(--bq-danger);--bq-ui--danger-alt:var(--bq-danger-light);--bq-ui--info:var(--bq-brand);--bq-ui--info-alt:var(--bq-brand-light);--bq-hover:#bcbfc5;--bq-active:#444546}.dark,[bq-mode=dark]{--bq-background--primary:var(--bq-neutral-1000);--bq-background--secondary:var(--bq-neutral-950);--bq-background--tertiary:var(--bq-neutral-800);--bq-background--alt:var(--bq-neutral-700);--bq-background--inverse:var(--bq-neutral-600);--bq-background--brand:var(--bq-brand);--bq-background--overlay:var(--bq-neutral-900);--bq-icon--primary:var(--bq-neutral-100);--bq-icon--secondary:var(--bq-neutral-400);--bq-icon--inverse:var(--bq-neutral-800);--bq-icon--brand:var(--bq-brand);--bq-icon--alt:var(--bq-white);--bq-icon--info:var(--bq-brand);--bq-icon--success:var(--bq-success);--bq-icon--warning:var(--bq-warning);--bq-icon--danger:var(--bq-danger);--bq-stroke--primary:var(--bq-neutral-900);--bq-stroke--secondary:var(--bq-neutral-700);--bq-stroke--tertiary:var(--bq-neutral-400);--bq-stroke--inverse:var(--bq-neutral-950);--bq-stroke--brand:var(--bq-brand);--bq-stroke--alt:var(--bq-neutral-1000);--bq-stroke--success:var(--bq-success);--bq-stroke--warning:var(--bq-warning);--bq-stroke--danger:var(--bq-danger);--bq-stroke--info:var(--bq-brand);--bq-text--primary:var(--bq-neutral-100);--bq-text--secondary:var(--bq-neutral-400);--bq-text--inverse:var(--bq-neutral-800);--bq-text--brand:var(--bq-brand);--bq-text--alt:var(--bq-white);--bq-text--info:var(--bq-brand);--bq-text--success:var(--bq-success);--bq-text--warning:var(--bq-warning);--bq-text--danger:var(--bq-danger);--bq-ui--primary:var(--bq-neutral-900);--bq-ui--secondary:var(--bq-neutral-950);--bq-ui--tertiary:var(--bq-neutral-700);--bq-ui--inverse:var(--bq-neutral-100);--bq-ui--brand:var(--bq-brand);--bq-ui--brand-alt:var(--bq-brand-dark);--bq-ui--alt:var(--bq-neutral-950);--bq-ui--success:var(--bq-success);--bq-ui--success-alt:var(--bq-success-dark);--bq-ui--warning:var(--bq-warning);--bq-ui--warning-alt:var(--bq-warning-dark);--bq-ui--danger:var(--bq-danger);--bq-ui--danger-alt:var(--bq-danger-dark);--bq-ui--info:var(--bq-brand);--bq-ui--info-alt:var(--bq-brand-dark);--bq-hover:#444546;--bq-active:#1f2026}:where(.endava),:where([bq-theme=endava]){--bq-font-family:"Poppins",sans-serif;--bq-white:#fafbfb;--bq-black:#030406;--bq-neutral-50:var(--bq-endava-grey-50);--bq-neutral-100:var(--bq-endava-grey-100);--bq-neutral-200:var(--bq-endava-grey-200);--bq-neutral-300:var(--bq-endava-grey-300);--bq-neutral-400:var(--bq-endava-grey-400);--bq-neutral-500:var(--bq-endava-grey-500);--bq-neutral-600:var(--bq-endava-grey-600);--bq-neutral-700:var(--bq-endava-grey-700);--bq-neutral-800:var(--bq-endava-grey-800);--bq-neutral-900:var(--bq-endava-grey-900);--bq-neutral-950:var(--bq-endava-grey-950);--bq-neutral-1000:var(--bq-endava-grey-1000);--bq-brand-light:var(--bq-endava-orange-100);--bq-brand:var(--bq-endava-orange-600);--bq-brand-dark:var(--bq-endava-orange-1000);--bq-accent-light:var(--bq-endava-orange-100);--bq-accent:var(--bq-endava-orange-600);--bq-accent-dark:var(--bq-endava-orange-1000);--bq-success-light:var(--bq-green-100);--bq-success:var(--bq-green-600);--bq-success-dark:var(--bq-green-1000);--bq-danger-light:var(--bq-corai-100);--bq-danger:var(--bq-corai-600);--bq-danger-dark:var(--bq-corai-1000);--bq-warning-light:var(--bq-yellow-100);--bq-warning:var(--bq-yellow-600);--bq-warning-dark:var(--bq-yellow-1000);--bq-info-light:var(--bq-blue-100);--bq-info:var(--bq-blue-600);--bq-info-dark:var(--bq-blue-1000);--bq-focus:var(--bq-endava-orange-600);--bq-data-01:var(--bq-brand);--bq-data-02:#af0cd8;--bq-data-03:#0ca8d8;--bq-data-04:var(--bq-teal-600);--bq-data-05:var(--bq-yellow-600);--bq-data-06:var(--bq-orange-600);--bq-data-07:var(--bq-blue-600);--bq-data-08:var(--bq-red-600);--bq-data-09:var(--bq-purple-600);--bq-data-10:#394b56;--bq-data-11:var(--bq-black);--bq-data-12:var(--bq-white)}.endava.light,.endava:not([bq-mode]),[bq-theme=endava]:not([bq-mode]),[bq-theme=endava][bq-mode=light]{--bq-background--primary:var(--bq-white);--bq-background--secondary:var(--bq-neutral-100);--bq-background--tertiary:var(--bq-neutral-200);--bq-background--alt:var(--bq-neutral-300);--bq-background--inverse:var(--bq-neutral-900);--bq-background--brand:var(--bq-brand);--bq-background--overlay:var(--bq-neutral-900);--bq-icon--primary:var(--bq-neutral-800);--bq-icon--secondary:var(--bq-neutral-600);--bq-icon--inverse:var(--bq-neutral-50);--bq-icon--brand:var(--bq-brand);--bq-icon--alt:var(--bq-white);--bq-icon--info:var(--bq-info);--bq-icon--success:var(--bq-success);--bq-icon--warning:var(--bq-warning);--bq-icon--danger:var(--bq-danger);--bq-stroke--primary:var(--bq-neutral-200);--bq-stroke--secondary:var(--bq-neutral-600);--bq-stroke--tertiary:var(--bq-neutral-900);--bq-stroke--inverse:var(--bq-white);--bq-stroke--brand:var(--bq-brand);--bq-stroke--alt:var(--bq-neutral-50);--bq-stroke--brand-alt:var(--bq-brand-light);--bq-stroke--success:var(--bq-success);--bq-stroke--warning:var(--bq-warning);--bq-stroke--danger:var(--bq-danger);--bq-stroke--info:var(--bq-info);--bq-text--primary:var(--bq-neutral-800);--bq-text--secondary:var(--bq-neutral-600);--bq-text--inverse:var(--bq-neutral-50);--bq-text--brand:var(--bq-brand);--bq-text--alt:var(--bq-white);--bq-text--info:var(--bq-info);--bq-text--success:var(--bq-success);--bq-text--warning:var(--bq-warning);--bq-text--danger:var(--bq-danger);--bq-ui--primary:var(--bq-white);--bq-ui--secondary:var(--bq-neutral-100);--bq-ui--tertiary:var(--bq-neutral-500);--bq-ui--inverse:var(--bq-neutral-900);--bq-ui--alt:var(--bq-neutral-50);--bq-ui--brand-alt:var(--bq-brand-light);--bq-ui--brand:var(--bq-brand);--bq-ui--success:var(--bq-success);--bq-ui--success-alt:var(--bq-success-light);--bq-ui--warning:var(--bq-warning);--bq-ui--warning-alt:var(--bq-warning-light);--bq-ui--danger:var(--bq-danger);--bq-ui--danger-alt:var(--bq-danger-light);--bq-ui--info:var(--bq-info);--bq-ui--info-alt:var(--bq-info-light);--bq-hover:#444546;--bq-active:#1f2026}.endava.dark,[bq-theme=endava][bq-mode=dark]{--bq-background--primary:var(--bq-neutral-1000);--bq-background--secondary:var(--bq-neutral-900);--bq-background--tertiary:var(--bq-neutral-800);--bq-background--alt:var(--bq-neutral-700);--bq-background--inverse:var(--bq-neutral-600);--bq-background--brand:var(--bq-brand);--bq-background--overlay:var(--bq-neutral-900);--bq-icon--primary:var(--bq-neutral-100);--bq-icon--secondary:var(--bq-neutral-400);--bq-icon--inverse:var(--bq-neutral-800);--bq-icon--brand:var(--bq-brand);--bq-icon--alt:var(--bq-white);--bq-icon--info:var(--bq-info);--bq-icon--success:var(--bq-success);--bq-icon--warning:var(--bq-warning);--bq-icon--danger:var(--bq-danger);--bq-stroke--primary:var(--bq-neutral-900);--bq-stroke--secondary:var(--bq-neutral-700);--bq-stroke--tertiary:var(--bq-neutral-400);--bq-stroke--inverse:var(--bq-neutral-950);--bq-stroke--brand:var(--bq-brand);--bq-stroke--brand-alt:var(--bq-brand-dark);--bq-stroke--alt:var(--bq-neutral-1000);--bq-stroke--success:var(--bq-success);--bq-stroke--warning:var(--bq-warning);--bq-stroke--danger:var(--bq-danger);--bq-stroke--info:var(--bq-info);--bq-text--primary:var(--bq-neutral-100);--bq-text--secondary:var(--bq-neutral-400);--bq-text--inverse:var(--bq-neutral-800);--bq-text--brand:var(--bq-brand);--bq-text--alt:var(--bq-neutral-white);--bq-text--info:var(--bq-info);--bq-text--success:var(--bq-success);--bq-text--warning:var(--bq-warning);--bq-text--danger:var(--bq-danger);--bq-ui--primary:var(--bq-neutral-900);--bq-ui--secondary:var(--bq-neutral-950);--bq-ui--tertiary:var(--bq-neutral-700);--bq-ui--inverse:var(--bq-neutral-100);--bq-ui--brand:var(--bq-brand);--bq-ui--brand-alt:var(--bq-brand-dark);--bq-ui--alt:var(--bq-neutral-950);--bq-ui--success:var(--bq-success);--bq-ui--success-alt:var(--bq-success-dark);--bq-ui--warning:var(--bq-warning);--bq-ui--warning-alt:var(--bq-warning-dark);--bq-ui--danger:var(--bq-danger);--bq-ui--danger-alt:var(--bq-danger-dark);--bq-ui--info:var(--bq-info);--bq-ui--info-alt:var(--bq-info-dark);--bq-hover:#444546;--bq-active:#1f2026}.block{display:block}.flex{display:flex}@-webkit-keyframes fade-in{0%{opacity:0}}@keyframes fade-in{0%{opacity:0}}@-webkit-keyframes slide-in{0%{-webkit-transform:translateY(10px);transform:translateY(10px)}}@keyframes slide-in{0%{-webkit-transform:translateY(10px);transform:translateY(10px)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}:host{--bq-date-picker--background-color:var(--bq-ui--primary);--bq-date-picker--border-color:var(--bq-stroke--tertiary);--bq-date-picker--border-color-disabled:var(--bq-stroke--secondary);--bq-date-picker--border-color-focus:var(--bq-stroke--brand);--bq-date-picker--border-radius:var(--bq-radius--s);--bq-date-picker--border-style:solid;--bq-date-picker--border-width:1px;--bq-date-picker--currentDate-border-color:var(--bq-stroke--brand);--bq-date-picker--currentDate-border-width:2px;--bq-date-picker--day-size:2.25rem;--bq-date-picker--gap:var(--bq-spacing-xs);--bq-date-picker--header-title-color:var(--bq-text--primary);--bq-date-picker--icon-size:1.5rem;--bq-date-picker--label-margin-bottom:var(--bq-spacing-xs);--bq-date-picker--label-text-color:var(--bq-text--primary);--bq-date-picker--label-text-size:0.875rem;--bq-date-picker--padding-end:var(--bq-spacing-m);--bq-date-picker--padding-start:var(--bq-spacing-m);--bq-date-picker--paddingY:var(--bq-spacing-s);--bq-date-picker--range-background-color:var(--bq-ui--brand);--bq-date-picker--range-inner-background-color:var(--bq-ui--brand-alt);--bq-date-picker--row-gap:0.125rem;--bq-date-picker--text-color:var(--bq-text--primary);--bq-date-picker--text-placeholder-color:var(--bq-text--secondary);--bq-date-picker--text-size:1rem;--bq-date-picker--view-cell-background-hover:var(--bq-ui--secondary);--bq-date-picker--view-cell-background-selected:var(--bq-ui--brand);--bq-date-picker--view-cell-height:2.75rem;--bq-date-picker--view-cell-radius:0.5rem;--bq-date-picker--view-cell-text-selected:var(--bq-text--alt);-webkit-box-sizing:border-box;box-sizing:border-box;display:block;inline-size:100%}.bq-date-picker__label.is-hidden,.bq-date-picker__prefix.is-hidden{display:none}.bq-date-picker__label{-webkit-box-align:center;-ms-flex-align:center;-webkit-margin-after:var(--bq-date-picker--label-margin-bottom);align-items:center;color:var(--bq-date-picker--label-text-color);display:-webkit-box;display:-ms-flexbox;display:flex;font-size:var(--bq-date-picker--label-text-size);gap:var(--bq-date-picker--gap);margin-block-end:var(--bq-date-picker--label-margin-bottom)}.bq-date-picker__dropdown{display:block;inline-size:100%}.bq-date-picker__dropdown::part(panel){--bq-panel--width:max-content;block-size:auto;inline-size:-webkit-max-content;inline-size:-moz-max-content;inline-size:max-content;max-inline-size:min(100vw - 2rem,100vw);padding:1rem}.bq-date-picker__control{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:var(--bq-date-picker--background-color);border:var(--bq-date-picker--border-width) var(--bq-date-picker--border-style) var(--bq-date-picker--border-color);border-radius:var(--bq-date-picker--border-radius);color:var(--bq-date-picker--text-color);display:-webkit-box;display:-ms-flexbox;display:flex;font-size:var(--bq-date-picker--text-size);inline-size:100%;padding-block:var(--bq-date-picker--paddingY);padding-inline:var(--bq-date-picker--padding-start) var(--bq-date-picker--padding-end);-webkit-transition:border-color .15s ease,-webkit-box-shadow .15s ease;transition:border-color .15s ease,-webkit-box-shadow .15s ease;transition:border-color .15s ease,box-shadow .15s ease;transition:border-color .15s ease,box-shadow .15s ease,-webkit-box-shadow .15s ease;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.bq-date-picker__control:not(.is-disabled,:focus-within,.is-open):hover{border-color:color-mix(in srgb,var(--bq-date-picker--border-color-focus),var(--bq-hover) 20%)}.bq-date-picker__control:not(.is-disabled):is(:focus-within,.is-open){--bq-ring-width:1px;--bq-ring-offset-width:0;--bq-ring-color-focus:var(--bq-focus);border-color:var(--bq-focus);outline:var(--bq-ring-width) solid var(--bq-ring-color-focus);outline-offset:var(--bq-ring-offset-width)}.bq-date-picker__control.is-disabled{--bq-date-picker--border-color:var(--bq-date-picker--border-color-disabled);cursor:not-allowed;opacity:.6}.bq-date-picker__control.validation-error,.bq-date-picker__control.validation-success,.bq-date-picker__control.validation-warning{--bq-date-picker--border-color:var(--bq-date-picker--validation-color)}.bq-date-picker__control.validation-error:not(.is-disabled,:focus-within,.is-open):hover,.bq-date-picker__control.validation-success:not(.is-disabled,:focus-within,.is-open):hover,.bq-date-picker__control.validation-warning:not(.is-disabled,:focus-within,.is-open):hover{border-color:color-mix(in srgb,var(--bq-date-picker--validation-color),var(--bq-hover) 20%)}.bq-date-picker__control.validation-error:not(.is-disabled):is(:focus-within,.is-open),.bq-date-picker__control.validation-success:not(.is-disabled):is(:focus-within,.is-open),.bq-date-picker__control.validation-warning:not(.is-disabled):is(:focus-within,.is-open){--bq-ring-color-focus:var(--bq-date-picker--validation-color);border-color:color-mix(in srgb,var(--bq-date-picker--validation-color),var(--bq-active) 20%)}.bq-date-picker__control.validation-error{--bq-date-picker--validation-color:var(--bq-stroke--danger)}.bq-date-picker__control.validation-success{--bq-date-picker--validation-color:var(--bq-stroke--success)}.bq-date-picker__control.validation-warning{--bq-date-picker--validation-color:var(--bq-stroke--warning)}.bq-date-picker__input{-webkit-box-flex:1;background:transparent;border:none;color:inherit;-ms-flex:1 1 auto;flex:1 1 auto;font:inherit;font-size:inherit;margin:0;min-inline-size:0;padding:0}.bq-date-picker__input::-webkit-input-placeholder{color:var(--bq-date-picker--text-placeholder-color)}.bq-date-picker__input::-moz-placeholder{color:var(--bq-date-picker--text-placeholder-color)}.bq-date-picker__input:-ms-input-placeholder{color:var(--bq-date-picker--text-placeholder-color)}.bq-date-picker__input::-ms-input-placeholder{color:var(--bq-date-picker--text-placeholder-color)}.bq-date-picker__input::placeholder{color:var(--bq-date-picker--text-placeholder-color)}.bq-date-picker__input:focus,.bq-date-picker__input:focus-visible{outline:none}.bq-date-picker__prefix{-webkit-box-align:center;-ms-flex-align:center;-webkit-margin-end:var(--bq-date-picker--gap);align-items:center;color:var(--bq-date-picker--text-color);margin-inline-end:var(--bq-date-picker--gap);pointer-events:none}.bq-date-picker__prefix,.bq-date-picker__prefix bq-icon{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}.bq-date-picker__prefix bq-icon{font-size:var(--bq-date-picker--icon-size)}.bq-date-picker__calendar-trigger,.bq-date-picker__clear{-webkit-margin-start:var(--bq-date-picker--gap);margin-inline-start:var(--bq-date-picker--gap)}.bq-date-picker__calendar-trigger::part(button),.bq-date-picker__clear::part(button){--bq-ring-width:initial;--bq-ring-offset-width:initial;border:none;padding:0}.bq-date-picker__calendar-trigger bq-icon,.bq-date-picker__clear bq-icon{display:-webkit-box;display:-ms-flexbox;display:flex}.bq-date-picker__clear{display:none}.bq-date-picker__control:is(:hover,:focus-within,.is-open):not(.is-disabled) .bq-date-picker__clear{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}.bq-date-picker__calendar-trigger{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}.bq-date-picker__calendar{-webkit-box-orient:vertical;-webkit-box-direction:normal;background-color:var(--bq-date-picker--background-color);color:var(--bq-date-picker--text-color);display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:.75rem;min-inline-size:17.5rem}.bq-date-picker__header{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:grid;gap:.25rem;grid-template-columns:auto 1fr auto}.bq-date-picker__nav-button::part(button){block-size:2rem;inline-size:2rem}.bq-date-picker__heading::part(button){font-weight:600}.bq-date-picker__heading--static{pointer-events:none}.bq-date-picker__panels{-webkit-box-orient:horizontal;-webkit-box-align:start;-ms-flex-align:start;-webkit-box-pack:center;-ms-flex-pack:center;align-items:flex-start;-ms-flex-flow:row wrap;flex-flow:row wrap;gap:1rem;justify-content:center}.bq-date-picker__panel,.bq-date-picker__panels{-webkit-box-direction:normal;display:-webkit-box;display:-ms-flexbox;display:flex}.bq-date-picker__panel{-webkit-box-orient:vertical;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;-ms-flex-direction:column;flex-direction:column;gap:.5rem}.bq-date-picker__month-label{color:var(--bq-date-picker--header-title-color);font-weight:600;text-align:center}@media (width <= 40rem){.bq-date-picker__panels{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column}}.bq-date-picker__table{border-collapse:collapse;border-spacing:0;font-size:inherit;inline-size:100%}.bq-date-picker__th{color:var(--bq-date-picker--text-placeholder-color);font-size:.75rem;font-weight:500;padding-block:.25rem;text-align:center;text-transform:uppercase}.bq-date-picker__td{padding:0;padding-block:var(--bq-date-picker--row-gap);text-align:center}.bq-date-picker__day{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;background:transparent;block-size:var(--bq-date-picker--day-size);border:none;border-radius:var(--bq-date-picker--view-cell-radius);color:inherit;cursor:pointer;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;font:inherit;inline-size:var(--bq-date-picker--day-size);justify-content:center;padding:0;-webkit-transition:background-color .15s ease,color .15s ease;transition:background-color .15s ease,color .15s ease}.bq-date-picker__day:hover:not([aria-disabled=true],.is-selected){background-color:var(--bq-date-picker--view-cell-background-hover)}.bq-date-picker__day:focus-visible{outline:2px solid var(--bq-date-picker--border-color-focus);outline-offset:-2px}.bq-date-picker__day.is-disallowed,.bq-date-picker__day.is-out-of-bounds,.bq-date-picker__day[aria-disabled=true]{cursor:not-allowed;opacity:.35}.bq-date-picker__day.is-outside{color:var(--bq-date-picker--text-placeholder-color)}.bq-date-picker__day.is-hidden{pointer-events:none;visibility:hidden}.bq-date-picker__day.is-today:not(.is-selected){border:var(--bq-date-picker--currentDate-border-width) var(--bq-date-picker--border-style) var(--bq-date-picker--currentDate-border-color)}.bq-date-picker__day.is-selected{color:var(--bq-date-picker--view-cell-text-selected)}.bq-date-picker__day.is-selected,.bq-date-picker__day.is-selected:hover:not([aria-disabled=true]){background-color:var(--bq-date-picker--view-cell-background-selected)}.bq-date-picker__day.is-range-inner{background-color:var(--bq-date-picker--range-inner-background-color);border-radius:0;color:var(--bq-date-picker--text-color)}.bq-date-picker__day.is-range-start{border-end-end-radius:0;border-start-end-radius:0}.bq-date-picker__day.is-range-end,.bq-date-picker__day.is-range-start{background-color:var(--bq-date-picker--range-background-color);color:var(--bq-date-picker--view-cell-text-selected)}.bq-date-picker__day.is-range-end{border-end-start-radius:0;border-start-start-radius:0}.bq-date-picker__day.is-range-start.is-range-end{border-radius:var(--bq-date-picker--view-cell-radius)}.bq-date-picker__view{min-inline-size:calc(var(--bq-date-picker--panel-count, 1)*var(--bq-date-picker--day-size)*7 + max(0,var(--bq-date-picker--panel-count, 1) - 1)*1rem)}.bq-date-picker__months,.bq-date-picker__years{-webkit-box-orient:vertical;-webkit-box-direction:normal;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:.5rem;padding-block:.5rem}.bq-date-picker__month-row,.bq-date-picker__year-row{display:grid;gap:.5rem;grid-template-columns:repeat(3,1fr)}.bq-date-picker__months[data-grid-columns="4"] .bq-date-picker__month-row,.bq-date-picker__years[data-grid-columns="4"] .bq-date-picker__year-row{grid-template-columns:repeat(4,1fr)}.bq-date-picker__month-gridcell,.bq-date-picker__year-gridcell{min-inline-size:0}@media (width <= 40rem){.bq-date-picker__view{min-inline-size:auto}}.bq-date-picker__month-cell,.bq-date-picker__year-cell{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;background:transparent;block-size:var(--bq-date-picker--view-cell-height);border:none;border-radius:var(--bq-date-picker--view-cell-radius);color:inherit;cursor:pointer;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;font:inherit;inline-size:100%;justify-content:center;padding-block:.5rem;padding-inline:.5rem;-webkit-transition:background-color .15s ease,color .15s ease;transition:background-color .15s ease,color .15s ease}.bq-date-picker__month-cell:hover:not(:disabled,.is-selected),.bq-date-picker__year-cell:hover:not(:disabled,.is-selected){background-color:var(--bq-date-picker--view-cell-background-hover)}.bq-date-picker__month-cell:focus-visible,.bq-date-picker__year-cell:focus-visible{outline:2px solid var(--bq-date-picker--border-color-focus);outline-offset:1px}.bq-date-picker__month-cell.is-selected,.bq-date-picker__year-cell.is-selected{background-color:var(--bq-date-picker--view-cell-background-selected);color:var(--bq-date-picker--view-cell-text-selected)}.bq-date-picker__month-cell.is-range-inner,.bq-date-picker__year-cell.is-range-inner{background-color:var(--bq-date-picker--range-inner-background-color);color:var(--bq-date-picker--text-color)}.bq-date-picker__month-cell.is-out-of-bounds,.bq-date-picker__month-cell:disabled,.bq-date-picker__year-cell.is-out-of-bounds,.bq-date-picker__year-cell:disabled{cursor:not-allowed;opacity:.35}@media (prefers-reduced-motion:reduce){.bq-date-picker__control,.bq-date-picker__day,.bq-date-picker__month-cell,.bq-date-picker__year-cell{-webkit-transition:none;transition:none}}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.table{display:table}.grid{display:grid}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.focus{outline:var(--bq-ring-width,2px) solid var(--bq-ring-color-focus,var(--bq-focus));outline-offset:var(--bq-ring-offset-width,1px)}.ms-\\[--bq-date-picker--gap\\]{margin-inline-start:var(--bq-date-picker--gap)}.\\!hidden{display:none!important}.hidden{display:none}.\\[\\&\\:\\:part\\(button\\)\\]\\:border-none::part(button){border-style:none}.\\[\\&\\:\\:part\\(button\\)\\]\\:p-0::part(button){padding:0}`;
947
+
948
+ /** Compose the default constraint-validation message for a set of flags. */
949
+ const defaultValidityMessage = (flags) => {
950
+ if (flags.badInput)
951
+ return 'Please, input or select a valid date';
952
+ if (flags.rangeUnderflow && flags.rangeOverflow)
953
+ return 'Selected value is outside the allowed range';
954
+ if (flags.rangeUnderflow)
955
+ return 'Selected value is before the minimum';
956
+ return 'Selected value is after the maximum';
957
+ };
127
958
  const BqDatePicker = class {
128
959
  constructor(hostRef) {
129
960
  index.registerInstance(this, hostRef);
@@ -131,6 +962,7 @@ const BqDatePicker = class {
131
962
  this.bqChange = index.createEvent(this, "bqChange");
132
963
  this.bqClear = index.createEvent(this, "bqClear");
133
964
  this.bqFocus = index.createEvent(this, "bqFocus");
965
+ this.bqViewChange = index.createEvent(this, "bqViewChange");
134
966
  if (hostRef.$hostElement$["s-ei"]) {
135
967
  this.internals = hostRef.$hostElement$["s-ei"];
136
968
  }
@@ -141,12 +973,24 @@ const BqDatePicker = class {
141
973
  }
142
974
  // Own Properties
143
975
  // ====================
144
- callyElem;
976
+ /**
977
+ * Memoized parsed selection. Key encodes both `value` and `type` so cache
978
+ * misses invalidate correctly. Value derives from `value`; not promoted to
979
+ * `@State()` to preserve a single source of truth.
980
+ */
981
+ cachedSelection;
982
+ /** Sticky flag: last typed input couldn't be parsed. Cleared on next successful commit or `clear()`. */
983
+ hasBadInput = false;
984
+ /** Initial `value` captured at load time, restored on form reset. */
985
+ initialValue;
145
986
  inputElem;
146
- isInternalUpdate = false;
987
+ /** Set while `commitSelection` writes back to `this.value`. */
988
+ isCommittingSelection = false;
147
989
  labelElem;
990
+ /** Pending requestAnimationFrame id used by `focusButton`. */
991
+ pendingFocusRAF;
148
992
  prefixElem;
149
- suffixElem;
993
+ triggerBtnElem;
150
994
  // Reference to host HTML element
151
995
  // ===================================
152
996
  internals;
@@ -154,158 +998,275 @@ const BqDatePicker = class {
154
998
  // State() variables
155
999
  // Inlined decorator, alphabetical order
156
1000
  // =======================================
157
- isCallyLoaded = false;
158
- focusedDate;
1001
+ decadeStart = getDecadeStart(new Date().getFullYear());
159
1002
  displayDate;
1003
+ focusedISO = form.getTodayISO();
1004
+ focusedMonth = new Date().getMonth();
1005
+ focusedYear = new Date().getFullYear();
1006
+ hasConstraintError = false;
160
1007
  hasLabel = false;
161
1008
  hasPrefix = false;
162
- hasRangeEnd = false;
163
- hasSuffix = false;
164
1009
  hasValue = false;
1010
+ tentativeHover;
1011
+ view = 'days';
1012
+ viewDate = new Date();
165
1013
  // Public Property API
166
1014
  // ========================
167
- /** If `true`, the Date picker input will be focused on component render */
168
- autofocus;
169
- /** The clear button aria label */
1015
+ /** If `true`, the Date picker input will be focused on component render. */
1016
+ autofocus = false;
1017
+ /** The clear button aria label. */
170
1018
  clearButtonLabel = 'Clear value';
171
- /** If `true`, the clear button won't be displayed */
1019
+ /** The aria-label for the calendar trigger button. */
1020
+ calendarButtonLabel = 'Open calendar';
1021
+ /** If `true`, the clear button won't be displayed. */
172
1022
  disableClear = false;
173
- /**
174
- * Indicates whether the Date picker input is disabled or not.
175
- * If `true`, the Date picker is disabled and cannot be interacted with.
176
- */
1023
+ /** Indicates whether the Date picker input is disabled or not. */
177
1024
  disabled = false;
178
- /** Represents the distance (gutter or margin) between the Date picker panel and the input element. */
1025
+ /** Distance (gutter) between the Date picker panel and the input element. */
179
1026
  distance = 8;
180
- /** The first day of the week, where Sunday is 0, Monday is 1, etc */
1027
+ /** The first day of the week, where Sunday is 0, Monday is 1, etc. */
181
1028
  firstDayOfWeek = 1;
182
- /** The options to use when formatting the displayed value.
183
- * Details: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat#using_options
1029
+ /**
1030
+ * Options used when formatting the displayed value.
1031
+ *
1032
+ * When omitted, sensible defaults are picked based on `precision`:
1033
+ * - `day` → `{ day: 'numeric', month: 'short', year: 'numeric' }`
1034
+ * - `month` → `{ month: 'long', year: 'numeric' }`
1035
+ * - `year` → `{ year: 'numeric' }`
184
1036
  */
185
- formatOptions = {
186
- day: 'numeric',
187
- month: 'short',
188
- year: 'numeric',
189
- };
190
- /** The ID of the form that the Date picker input belongs to. */
1037
+ formatOptions;
1038
+ /** The ID of the form the input belongs to. */
191
1039
  form;
192
- /** The native form validation message (mandatory if `required` is set) */
1040
+ /** Native form validation message (mandatory if `required` is set). */
193
1041
  formValidationMessage;
194
- /** A function that takes a date and returns true if the date should not be selectable */
1042
+ /** The view opened first when the panel becomes visible. */
1043
+ initialView = 'days';
1044
+ /** Predicate that marks specific dates as unselectable. */
195
1045
  isDateDisallowed;
196
- /** The locale for formatting dates. If not set, will use the browser's locale.
197
- * Details: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument
198
- */
1046
+ /** Locale used for formatting dates. */
199
1047
  locale = 'en-GB';
200
- /** The latest date that can be selected */
1048
+ /** Latest date that can be selected (ISO). */
201
1049
  max;
202
- /** The earliest date that can be selected */
1050
+ /** Earliest date that can be selected (ISO). */
203
1051
  min;
204
- /** Number of months to show when range is `true` */
205
- months;
206
1052
  /**
207
- * Specifies how the next/previous buttons should navigate the calendar.
208
- * - single: The buttons will navigate by a single month at a time.
209
- * - months: The buttons will navigate by the number of months displayed per view.
1053
+ * Number of months to show side by side (range / multi). Capped at 2.
1054
+ * Larger values are silently clamped to keep the popover from overflowing
1055
+ * the viewport and to preserve keyboard navigation semantics.
1056
+ */
1057
+ months = 1;
1058
+ /**
1059
+ * How the next/previous buttons should navigate the calendar.
1060
+ * - single: navigate one month at a time.
1061
+ * - months: navigate by the number of months displayed.
210
1062
  */
211
1063
  monthsPerView = 'single';
212
1064
  /** The Date picker input name. */
213
1065
  name;
214
- /** If `true`, the Date picker panel will be visible. */
1066
+ /** If `true`, the panel is visible. */
215
1067
  open = false;
216
- /** When set, it will override the height of the Date picker panel. */
1068
+ /** Overrides the height of the Date picker panel. */
217
1069
  panelHeight = 'auto';
218
- /** The Date picker input placeholder text value */
1070
+ /** Placeholder text shown when no value is selected. */
219
1071
  placeholder;
220
- /** Position of the Date picker panel */
1072
+ /** Position of the Date picker panel. */
221
1073
  placement = 'bottom-end';
222
- /** Indicates whether or not the Date picker input is required to be filled out before submitting the form. */
223
- required;
224
- /** Represents the skidding between the Date picker panel and the input element. */
1074
+ /**
1075
+ * Precision of the value produced by the picker.
1076
+ *
1077
+ * - `day` → `YYYY-MM-DD` (default). Standard drill-down.
1078
+ * - `month` → `YYYY-MM`. Selection commits on the months view; no days view.
1079
+ * - `year` → `YYYY`. Selection commits on the years view; no months/days view.
1080
+ *
1081
+ * When precision is coarser than day, `initialView` is forced to match and
1082
+ * the header title cycles through the views available for that precision.
1083
+ */
1084
+ precision = 'day';
1085
+ /** Whether a value must be selected before submitting the form. */
1086
+ required = false;
1087
+ /** Skidding between the panel and the input element. */
225
1088
  skidding = 0;
226
- /** Whether to show days outside the month */
1089
+ /** Whether to render days outside the current month. */
227
1090
  showOutsideDays = false;
228
- /** Defines the strategy to position the Date picker panel */
1091
+ /** Positioning strategy for the panel. */
229
1092
  strategy = 'fixed';
230
- /** The date that is tentatively selected e.g. the start of a range selection */
231
- tentative;
232
- /** It defines how the calendar will behave, allowing single date selection, range selection, or multiple date selection */
1093
+ /**
1094
+ * Selection type.
1095
+ * - `single`: single date.
1096
+ * - `multi`: multiple discrete dates.
1097
+ * - `range`: contiguous range.
1098
+ */
233
1099
  type = 'single';
1100
+ /** Validation state applied to the input. */
1101
+ validationStatus = 'none';
234
1102
  /**
235
- * The validation status of the Select input.
1103
+ * Currently selected value, in the precision-aware wire format:
1104
+ * - `precision="day"` → tokens are `YYYY-MM-DD`
1105
+ * - `precision="month"` → tokens are `YYYY-MM`
1106
+ * - `precision="year"` → tokens are `YYYY`
236
1107
  *
237
- * @remarks
238
- * This property is used to indicate the validation status of the select input. It can be set to one of the following values:
239
- * - `'none'`: No validation status is set.
240
- * - `'error'`: The input has a validation error.
241
- * - `'warning'`: The input has a validation warning.
242
- * - `'success'`: The input has passed validation.
1108
+ * How multiple tokens are combined depends on `type`:
1109
+ * - `single` a single token (e.g. `"2025-05-15"`, `"2025-05"`, `"2025"`)
1110
+ * - `range` → `"start/end"` two tokens joined with `/`
1111
+ * - `multi` → space-separated tokens (e.g. `"2025-05-15 2025-05-20"`)
243
1112
  */
244
- validationStatus = 'none';
245
- /** The select input value represents the currently selected date or range and can be used to reset the field to a previous value.
246
- * All dates are expected in ISO-8601 format (YYYY-MM-DD). */
247
1113
  value;
248
1114
  // Prop lifecycle events
249
1115
  // =======================
250
1116
  handleValueChange(newValue, oldValue) {
251
1117
  if (newValue === oldValue)
252
1118
  return;
253
- const { formatOptions, internals, isCallyLoaded, locale, type } = this;
254
- if (!isCallyLoaded)
1119
+ // Normalize invalid tokens before propagating to the form or the UI so
1120
+ // consumers can't submit an invalid wire value while the display shows
1121
+ // nothing. If normalization rewrote the value, reflect it back on the
1122
+ // prop and let the follow-up watcher tick handle the normalized string.
1123
+ const normalized = normalizeValue(newValue, this.type, this.precision);
1124
+ if (normalized !== newValue) {
1125
+ this.value = normalized;
255
1126
  return;
256
- internals.setFormValue(!isNil.isNil(newValue) ? `${newValue}` : undefined);
257
- this.updateFormValidity();
258
- this.hasValue = isDefined.isDefined(newValue);
259
- this.displayDate = form.formatDisplayValue(newValue, type, locale, formatOptions);
260
- this.setFocusedDate();
1127
+ }
1128
+ this.hasBadInput = false;
1129
+ this.syncDerivedFromValue();
1130
+ if (this.isCommittingSelection)
1131
+ return;
1132
+ this.syncViewToValue();
1133
+ }
1134
+ handleFormattingChange() {
1135
+ // Re-format the display without re-parsing the wire value.
1136
+ this.hasValue = computeHasValue(this.value);
1137
+ this.displayDate = computeDisplayDate(this.value, this.type, this.locale, this.effectiveFormatOptions, this.precision);
1138
+ }
1139
+ handleTypeChange() {
1140
+ // `type` affects wire-format parsing, display formatting, and validity.
1141
+ // Re-normalize the current value against the new type; if that rewrites
1142
+ // the value, the `value` watcher takes over. Otherwise refresh derived
1143
+ // state and re-sync the visible calendar range.
1144
+ const normalized = normalizeValue(this.value, this.type, this.precision);
1145
+ if (normalized !== this.value) {
1146
+ this.value = normalized;
1147
+ return;
1148
+ }
1149
+ this.syncDerivedFromValue();
1150
+ this.syncViewToValue();
1151
+ }
1152
+ handlePrecisionChange() {
1153
+ props.validatePropValue(DATE_PRECISION, 'day', this.el, 'precision');
1154
+ // Precision affects both wire format and default view. Force the calendar
1155
+ // to open on the matching view and re-normalize the current value so
1156
+ // trailing day/month segments are dropped or padded consistently.
1157
+ this.view = this.precisionToView(this.precision);
1158
+ const normalized = normalizeValue(this.value, this.type, this.precision);
1159
+ if (normalized !== this.value) {
1160
+ this.value = normalized;
1161
+ return;
1162
+ }
1163
+ this.syncDerivedFromValue();
1164
+ this.syncViewToValue();
1165
+ }
1166
+ handleBoundsChange() {
1167
+ this.syncValidity();
1168
+ this.syncViewToValue();
1169
+ }
1170
+ handleRequiredChange() {
1171
+ this.syncValidity();
261
1172
  }
262
1173
  checkPropValues() {
263
1174
  props.validatePropValue(DATE_PICKER_TYPE, 'single', this.el, 'type');
1175
+ props.validatePropValue(CALENDAR_VIEW, 'days', this.el, 'initialView');
1176
+ props.validatePropValue(DATE_PRECISION, 'day', this.el, 'precision');
1177
+ props.validatePropValue(MONTHS_PER_VIEW, 'single', this.el, 'monthsPerView');
1178
+ props.validatePropValue(FLOATING_STRATEGY, 'fixed', this.el, 'strategy');
1179
+ props.validatePropValue(FLOATING_PLACEMENT, 'bottom-end', this.el, 'placement');
1180
+ props.validatePropValue(INPUT_VALIDATION, 'none', this.el, 'validationStatus');
1181
+ props.validatePropValue(DAYS_OF_WEEK, 1, this.el, 'firstDayOfWeek');
1182
+ }
1183
+ handleMonthsChange() {
1184
+ // Clamp `months` to an integer in [1, MAX_MONTHS_PER_VIEW]. Non-single
1185
+ // pickers may show 1..MAX side-by-side; single pickers ignore the value
1186
+ // in `getMonthCount()`, so we still clamp defensively to keep the prop
1187
+ // reflected value predictable.
1188
+ const clamped = this.clampMonths(this.months);
1189
+ if (clamped !== this.months)
1190
+ this.months = clamped;
1191
+ }
1192
+ handleOpen(open) {
1193
+ if (!open) {
1194
+ this.tentativeHover = undefined;
1195
+ // Return focus to the calendar trigger button after closing the panel,
1196
+ // so keyboard users don't lose their position in the document.
1197
+ requestAnimationFrame(() => this.triggerBtnElem?.shadowRoot?.querySelector('button')?.focus());
1198
+ return;
1199
+ }
1200
+ // Precision locks the initial view; otherwise honor the consumer-provided one.
1201
+ this.view = this.precision === 'day' ? this.initialView : this.precisionToView(this.precision);
1202
+ this.syncViewToValue();
1203
+ // Move keyboard focus into the calendar so screen-reader / keyboard users
1204
+ // land on the focused day (or the equivalent focused cell for
1205
+ // months/years views). Non-modal popup: focus is *moved*, not trapped.
1206
+ this.focusActiveCell();
1207
+ }
1208
+ handleViewChange(next, prev) {
1209
+ if (next === prev)
1210
+ return;
1211
+ this.bqViewChange.emit({ view: next, el: this.el });
264
1212
  }
265
1213
  // Events section
266
1214
  // Requires JSDocs for public API documentation
267
1215
  // ==============================================
268
- /** Callback handler emitted when the input loses focus */
1216
+ /** Callback handler emitted when the input loses focus. */
269
1217
  bqBlur;
270
1218
  /**
271
- * Callback handler emitted when the input value has changed and the input loses focus.
272
- * This handler is called whenever the user finishes typing or pasting text into the input field and then clicks outside of the input field.
1219
+ * Callback handler emitted when the input value changes.
273
1220
  */
274
1221
  bqChange;
275
- /** Callback handler emitted when the input value has been cleared */
1222
+ /** Callback handler emitted when the value is cleared. */
276
1223
  bqClear;
277
- /** Callback handler emitted when the input has received focus */
1224
+ /** Callback handler emitted when the input receives focus. */
278
1225
  bqFocus;
1226
+ /**
1227
+ * Callback handler emitted when the internal calendar view changes
1228
+ * (e.g. from `days` to `months`, or from `years` back to `days`).
1229
+ */
1230
+ bqViewChange;
279
1231
  // Component lifecycle events
280
1232
  // Ordered by their natural call order
281
1233
  // =====================================
282
- async componentWillLoad() {
283
- if (!isClient.isClient() || this.isCallyLoaded)
284
- return;
285
- try {
286
- await loadCallyLibrary();
287
- this.isCallyLoaded = isCallyLibraryLoaded();
288
- }
289
- catch (error) {
290
- console.error(error);
291
- }
1234
+ componentWillLoad() {
1235
+ this.initialValue = this.value;
1236
+ // Precision locks the initial view when set. Otherwise honor `initialView`.
1237
+ // When the picker is rendered with `open` already true, `handleOpen` never
1238
+ // fires — apply the preference here so the initial paint respects it.
1239
+ this.view = this.precision === 'day' ? this.initialView : this.precisionToView(this.precision);
1240
+ this.checkPropValues();
1241
+ this.handleMonthsChange();
1242
+ this.syncViewToValue();
292
1243
  }
293
1244
  componentDidLoad() {
294
1245
  this.handleSlotChange();
295
1246
  this.handleValueChange(this.value, undefined);
1247
+ if (this.autofocus)
1248
+ this.inputElem?.focus();
1249
+ // `@Watch('open')` doesn't run for the initial prop value, so pickers
1250
+ // rendered with `open` never move focus into the calendar. Do it here.
1251
+ if (this.open)
1252
+ this.focusActiveCell();
296
1253
  }
297
- componentDidRender() {
298
- if (this.isInternalUpdate) {
299
- this.isInternalUpdate = false;
1254
+ disconnectedCallback() {
1255
+ if (this.pendingFocusRAF !== undefined) {
1256
+ cancelAnimationFrame(this.pendingFocusRAF);
1257
+ this.pendingFocusRAF = undefined;
300
1258
  }
301
1259
  }
302
1260
  formAssociatedCallback() {
303
- this.updateFormValidity();
1261
+ this.syncValidity();
304
1262
  }
305
1263
  formResetCallback() {
306
- if (isNil.isNil(this.value))
1264
+ // Native form reset should restore the value the field had when the form
1265
+ // was first parsed, not blank it. The `value` watcher takes care of
1266
+ // syncing derived state, form value, and validity.
1267
+ if (this.value === this.initialValue)
307
1268
  return;
308
- this.clear();
1269
+ this.value = this.initialValue;
309
1270
  }
310
1271
  // Listeners
311
1272
  // ==============
@@ -317,15 +1278,6 @@ const BqDatePicker = class {
317
1278
  return;
318
1279
  this.open = open;
319
1280
  }
320
- handleClickOutside(ev) {
321
- const { open, type, hasRangeEnd } = this;
322
- if (!open || type !== 'range' || ev.button !== 0)
323
- return;
324
- if (event.isEventTargetChildOfElement(ev, this.el) || hasRangeEnd)
325
- return;
326
- this.tentative = undefined;
327
- this.hasRangeEnd = false;
328
- }
329
1281
  // Public methods API
330
1282
  // These methods are exposed on the host element.
331
1283
  // Always use two lines.
@@ -333,255 +1285,631 @@ const BqDatePicker = class {
333
1285
  // Requires JSDocs for public API documentation.
334
1286
  // ===============================================
335
1287
  /**
336
- * Clears the selected value.
337
- * @returns {Promise<void>}
1288
+ * Clears the selected value and any pending validation state (bad input,
1289
+ * bounds overflow). Emits `bqClear`. No-op when the component is disabled.
1290
+ *
1291
+ * @returns A promise that resolves once the value has been cleared.
338
1292
  */
339
1293
  async clear() {
340
1294
  if (this.disabled)
341
1295
  return;
342
- this.value = undefined;
343
- this.internals.setFormValue(undefined);
1296
+ this.clearValue();
344
1297
  this.bqClear.emit(this.el);
345
1298
  }
346
1299
  // Local methods
347
1300
  // Internal business logic.
348
1301
  // These methods cannot be called from the host element.
349
1302
  // =======================================================
350
- /**
351
- * Handles the blur event for the date picker input.
352
- * @returns {void}
353
- */
354
1303
  handleBlur = () => {
355
1304
  if (this.disabled)
356
1305
  return;
357
1306
  this.bqBlur.emit(this.el);
358
1307
  };
359
- /**
360
- * Handles the focus event for the date picker input.
361
- * @returns {void}
362
- */
363
1308
  handleFocus = () => {
364
1309
  if (this.disabled)
365
1310
  return;
366
1311
  this.bqFocus.emit(this.el);
367
1312
  };
368
- /**
369
- * Updates the focused date in the calendar component.
370
- * Falls back to today's date if no value is set.
371
- * @returns {void}
372
- */
373
- setFocusedDate = () => {
374
- const { callyElem, isCallyLoaded, value } = this;
375
- if (!callyElem || !isCallyLoaded)
376
- return;
377
- const nextFocused = value ? form.extractFocusedDate(value) : form.getTodayISO();
378
- if (this.focusedDate === nextFocused)
379
- return;
380
- this.focusedDate = nextFocused;
381
- if (callyElem.focusedDate !== this.focusedDate) {
382
- // We need to set the focused date in the calendar component via a ref
383
- // because it doesn't work when passed as a prop (the Cally element does not re-render)
384
- callyElem.focusedDate = this.focusedDate;
385
- }
386
- };
387
- /**
388
- * Handles user input changes with locale-aware date parsing.
389
- * Validates against disallowed dates and min/max constraints.
390
- * @param {Event} ev - The change event.
391
- * @returns {void}
392
- */
393
- handleChange = (ev) => {
1313
+ handleInputChange = (ev) => {
394
1314
  if (this.disabled || !isHTMLElement.isHTMLElement(ev.target, 'input'))
395
1315
  return;
396
1316
  const inputValue = ev.target.value.trim();
397
1317
  if (!inputValue) {
1318
+ this.hasBadInput = false;
398
1319
  this.clearValue();
399
1320
  this.bqChange.emit({ value: this.value, el: this.el });
400
1321
  return;
401
1322
  }
402
- // Try to parse as date with locale awareness
403
- const dateValue = form.parseDateInput(inputValue, this.locale);
404
- if (!dateValue) {
405
- // Invalid date: don't update component value to avoid side effects
406
- this.internals.setFormValue(undefined);
407
- this.updateFormValidity();
408
- this.bqChange.emit({ value: inputValue, el: this.el });
1323
+ const parsed = parseTypedInput(inputValue, this.locale, this.precision, this.min, this.max, this.isDateDisallowed);
1324
+ if (parsed.invalid || parsed.value == null) {
1325
+ // Flag as `badInput` and emit `undefined` — never propagate the raw
1326
+ // typed string, which would break the precision-aware wire contract.
1327
+ this.hasBadInput = true;
1328
+ this.internals.setFormValue(null);
1329
+ this.syncValidity();
1330
+ this.bqChange.emit({ value: undefined, el: this.el });
409
1331
  return;
410
1332
  }
411
- // Check if date is disallowed
412
- if (this.isDateDisallowed?.(dateValue)) {
413
- this.internals.setFormValue(undefined);
414
- this.updateFormValidity();
415
- this.bqChange.emit({ value: inputValue, el: this.el });
416
- return;
417
- }
418
- // Valid date: normalize to ISO format and clamp to range if needed
419
- // Note: clamping is done based on string comparison of ISO dates and only when min/max are set
420
- let isoDate = form.toISODateString(dateValue);
421
- isoDate = form.clampDateToRange(isoDate, this.min, this.max);
422
- this.value = isoDate;
423
- this.displayDate = form.formatDisplayValue(isoDate, this.type, this.locale, this.formatOptions);
424
- this.internals.setFormValue(isoDate);
425
- this.updateFormValidity();
1333
+ this.hasBadInput = false;
1334
+ this.value = parsed.value;
426
1335
  this.bqChange.emit({ value: this.value, el: this.el });
427
1336
  };
428
- /**
429
- * Handles the change event when the user selects a date in the calendar component.
430
- * @param {Event} ev - The change event.
431
- * @returns {void}
432
- */
433
- handleCalendarChange = (ev) => {
434
- if (this.isInternalUpdate)
435
- return;
436
- const shouldStayOpen = this.type === 'multi';
437
- const value = ev.target.value;
438
- if (this.value === value) {
439
- this.open = shouldStayOpen;
440
- return;
441
- }
442
- this.isInternalUpdate = true;
443
- this.value = value;
444
- this.displayDate = form.formatDisplayValue(value, this.type, this.locale, this.formatOptions);
445
- this.inputElem.value = this.displayDate;
446
- this.inputElem.focus();
447
- this.internals.setFormValue(value);
448
- this.bqChange.emit({ value: this.value, el: this.el });
449
- this.open = shouldStayOpen;
450
- };
451
- /**
452
- * Handles the range start event when the user starts selecting a date range
453
- * @param {CustomEvent} ev - The range start event.
454
- * @returns {void}
455
- */
456
- handleCalendarRangeStart = (ev) => {
457
- this.hasRangeEnd = false;
458
- this.tentative = ev.detail;
459
- };
460
- /**
461
- * Handles the range end event when the user finishes selecting a date range
462
- * @returns {void}
463
- */
464
- handleCalendarRangeEnd = () => {
465
- this.hasRangeEnd = true;
466
- };
467
- /**
468
- * Handles the clear click event when the user clicks the clear button
469
- * @param {CustomEvent} ev - The clear click event.
470
- * @returns {void}
471
- */
472
1337
  handleClearClick = (ev) => {
473
1338
  if (this.disabled)
474
1339
  return;
475
- this.inputElem.value = '';
1340
+ if (this.inputElem)
1341
+ this.inputElem.value = '';
476
1342
  this.clearValue();
477
- this.hasRangeEnd = false;
478
1343
  this.bqClear.emit(this.el);
479
1344
  this.bqChange.emit({ value: this.value, el: this.el });
480
- this.inputElem.focus();
1345
+ this.inputElem?.focus();
481
1346
  ev.stopPropagation();
482
1347
  };
1348
+ /** Toggles the calendar panel open/closed when the trigger button is activated. */
1349
+ handleTriggerClick = () => {
1350
+ if (this.disabled)
1351
+ return;
1352
+ this.open = !this.open;
1353
+ };
483
1354
  /**
484
- * Clears the value of the date picker input.
485
- * @returns {void}
1355
+ * Handles keyboard shortcuts on the text input.
1356
+ * - `ArrowDown` / `Alt+ArrowDown` → open panel and focus active cell.
1357
+ * - `Escape` → close panel (focus stays on input).
486
1358
  */
1359
+ handleInputKeyDown = (ev) => {
1360
+ if (this.disabled)
1361
+ return;
1362
+ if (ev.key === 'ArrowDown') {
1363
+ ev.preventDefault();
1364
+ if (!this.open)
1365
+ this.open = true;
1366
+ }
1367
+ else if (ev.key === 'Escape' && this.open) {
1368
+ ev.preventDefault();
1369
+ this.open = false;
1370
+ }
1371
+ };
487
1372
  clearValue = () => {
488
1373
  this.value = undefined;
489
1374
  this.displayDate = undefined;
490
- this.internals.setFormValue(undefined);
1375
+ this.hasBadInput = false;
1376
+ this.internals.setFormValue(null);
1377
+ this.tentativeHover = undefined;
1378
+ };
1379
+ handleSlotChange = () => {
1380
+ this.hasLabel = this.labelElem ? slot.hasSlotContent(this.labelElem) : false;
1381
+ this.hasPrefix = this.prefixElem ? slot.hasSlotContent(this.prefixElem) : false;
1382
+ };
1383
+ updateFormValidity = () => {
1384
+ form.updateFormValidity({
1385
+ internals: this.internals,
1386
+ required: this.required,
1387
+ value: this.value,
1388
+ inputElem: this.inputElem,
1389
+ validationMessage: this.formValidationMessage,
1390
+ defaultMessage: 'Please, input or select a valid date',
1391
+ });
491
1392
  };
492
1393
  /**
493
- * Handles the slot change event when the slots content changes
494
- * @returns {void}
1394
+ * Recompute all state derived from the public `value` (form value,
1395
+ * `hasValue`, formatted display). Called from `value` and any prop that
1396
+ * affects display formatting (`type`, `locale`, `formatOptions`).
495
1397
  */
496
- handleSlotChange = () => {
497
- this.hasLabel = slot.hasSlotContent(this.labelElem);
498
- this.hasPrefix = slot.hasSlotContent(this.prefixElem);
499
- this.hasSuffix = slot.hasSlotContent(this.suffixElem);
1398
+ syncDerivedFromValue = () => {
1399
+ const current = this.value;
1400
+ this.internals.setFormValue(!isNil.isNil(current) ? `${current}` : null);
1401
+ this.syncValidity();
1402
+ this.hasValue = computeHasValue(current);
1403
+ this.displayDate = computeDisplayDate(current, this.type, this.locale, this.effectiveFormatOptions, this.precision);
500
1404
  };
501
1405
  /**
502
- * Generates a calendar month element
503
- * @param {number} offset - The offset of the calendar month.
504
- * @param {string} className - The class name of the calendar month.
505
- * @returns {JSX.Element | null} The calendar month element.
1406
+ * Runs the full form-validity pipeline in a consistent order: `required`
1407
+ * bounds `badInput`. Multiple failing constraints are unioned into a
1408
+ * single `setValidity` call.
506
1409
  */
507
- generateCalendarMonth = (offset, className = '') => {
508
- if (!this.isCallyLoaded)
509
- return null;
510
- return index.h("calendar-month", { class: className, exportparts: CALENDAR_MONTH_EXPORT_PARTS, offset: offset });
1410
+ syncValidity = () => {
1411
+ if (!this.internals)
1412
+ return;
1413
+ this.updateFormValidity();
1414
+ const boundsFlags = this.computeBoundsValidityFlags();
1415
+ const flags = { ...boundsFlags };
1416
+ if (this.hasBadInput)
1417
+ flags.badInput = true;
1418
+ const hasCustomConstraintError = Object.keys(flags).length > 0;
1419
+ if (!hasCustomConstraintError) {
1420
+ this.hasConstraintError = !this.internals.validity.valid;
1421
+ return;
1422
+ }
1423
+ const message = this.formValidationMessage ?? defaultValidityMessage(flags);
1424
+ this.internals.states.delete('valid');
1425
+ this.internals.states.add('invalid');
1426
+ this.internals.setValidity(flags, message, this.inputElem);
1427
+ this.hasConstraintError = true;
1428
+ };
1429
+ /** Returns `rangeUnderflow` / `rangeOverflow` flags for the current selection. */
1430
+ computeBoundsValidityFlags = () => {
1431
+ if (!this.min && !this.max)
1432
+ return {};
1433
+ const selection = parseValue(this.value, this.type, this.precision);
1434
+ if (selection.length === 0)
1435
+ return {};
1436
+ const paddedMin = padBound(this.min, 'min');
1437
+ const paddedMax = padBound(this.max, 'max');
1438
+ let rangeUnderflow = false;
1439
+ let rangeOverflow = false;
1440
+ for (const iso of selection) {
1441
+ if (paddedMin && iso < paddedMin)
1442
+ rangeUnderflow = true;
1443
+ if (paddedMax && iso > paddedMax)
1444
+ rangeOverflow = true;
1445
+ }
1446
+ if (!rangeUnderflow && !rangeOverflow)
1447
+ return {};
1448
+ return { rangeUnderflow, rangeOverflow };
1449
+ };
1450
+ clampMonths = (value) => {
1451
+ const rounded = Math.floor(Number(value));
1452
+ if (!Number.isFinite(rounded) || rounded < 1)
1453
+ return 1;
1454
+ return Math.min(rounded, MAX_MONTHS_PER_VIEW);
511
1455
  };
512
1456
  /**
513
- * Generates an array of Elements representing the calendar months.
1457
+ * Align the internal `viewDate` / `focused*` state with the current value.
1458
+ * Called when the panel opens and whenever an *external* prop change
1459
+ * invalidates the current view (value, type, precision, min/max). Internal
1460
+ * commits skip this via `isCommittingSelection` so the user's navigated
1461
+ * year isn't clobbered by a subsequent multi/range selection.
514
1462
  *
515
- * If the type of the date picker is 'range' or 'multi' and the number of months is specified,
516
- * it generates an array of calendar months with the specified length. Each month will have an offset
517
- * and a class name based on its position in the array. The offset is used to determine the month to display,
518
- * and the class name is used for responsive design.
519
- *
520
- * If the type of the date picker is not 'range' or 'multi', or if the number of months is not specified,
521
- * it generates an array with a single calendar month.
522
- *
523
- * @returns {JSX.Element[]} An array of elements representing the calendar months.
1463
+ * Uses `parseValue` (precision-aware, always returns full ISO dates) rather
1464
+ * than a raw `YYYY-MM-DD` regex so that month/year wire values like
1465
+ * `"2025-05"` or `"2025"` land on the right cell instead of falling back
1466
+ * to today.
1467
+ */
1468
+ syncViewToValue = () => {
1469
+ const parsed = parseValue(this.value, this.type, this.precision);
1470
+ const focusISO = parsed[0] ?? form.getTodayISO();
1471
+ const focus = parseISO(focusISO) ?? new Date();
1472
+ const bounded = clampDate(focus, this.min, this.max);
1473
+ this.focusedISO = toISO(bounded);
1474
+ this.viewDate = startOfMonth(bounded);
1475
+ this.focusedMonth = bounded.getMonth();
1476
+ this.focusedYear = bounded.getFullYear();
1477
+ this.decadeStart = getDecadeStart(bounded.getFullYear());
1478
+ };
1479
+ get selection() {
1480
+ const key = `${this.type}|${this.precision}|${this.value ?? ''}`;
1481
+ if (this.cachedSelection?.key === key)
1482
+ return this.cachedSelection.value;
1483
+ const parsed = parseValue(this.value, this.type, this.precision);
1484
+ this.cachedSelection = { key, value: parsed };
1485
+ return parsed;
1486
+ }
1487
+ /**
1488
+ * Effective `Intl.DateTimeFormatOptions` — user-provided when set, otherwise
1489
+ * the precision-appropriate default. Prevents a `month` picker from
1490
+ * accidentally rendering "1 May 2026" when the consumer just sets
1491
+ * `precision="month"` without overriding `formatOptions`.
524
1492
  */
525
- generateCalendarMonths = () => {
526
- if (!this.isCallyLoaded)
1493
+ get effectiveFormatOptions() {
1494
+ return this.formatOptions ?? DEFAULT_FORMAT_OPTIONS_BY_PRECISION[this.precision];
1495
+ }
1496
+ /** Map a precision value to the calendar view that commits selections. */
1497
+ precisionToView = (precision) => {
1498
+ if (precision === 'month')
1499
+ return 'months';
1500
+ if (precision === 'year')
1501
+ return 'years';
1502
+ return 'days';
1503
+ };
1504
+ get tentativeRange() {
1505
+ if (this.type !== 'range')
527
1506
  return [];
528
- if (this.type === 'range' || (this.type === 'multi' && this.months)) {
529
- return Array.from({ length: this.months }, (_, i) => {
530
- const offset = i > 0 ? i : undefined;
531
- const className = offset ? 'hidden sm:block' : '';
532
- return this.generateCalendarMonth(offset, className);
533
- });
1507
+ const parsed = this.selection;
1508
+ // While the user is completing a range (one endpoint chosen) show the
1509
+ // hover preview between that endpoint and the current hovered day.
1510
+ if (parsed.length === 1)
1511
+ return buildTentativeRange(parsed[0], this.tentativeHover);
1512
+ return [];
1513
+ }
1514
+ /* --------------------------- View transitions -------------------------- */
1515
+ /**
1516
+ * Return the date that view transitions (days ⇄ months ⇄ years) should
1517
+ * center the focus on.
1518
+ *
1519
+ * Priority:
1520
+ * 1. First entry of the current selection — for `range` this is the start
1521
+ * date (selection is sorted on parse), for `multi` it is the earliest.
1522
+ * 2. Otherwise the currently displayed `viewDate` (i.e. the month/year the
1523
+ * user has navigated to with prev/next).
1524
+ */
1525
+ getViewFocusReference = () => {
1526
+ const [first] = this.selection;
1527
+ if (first) {
1528
+ const parsed = parseISO(first);
1529
+ if (parsed)
1530
+ return parsed;
1531
+ }
1532
+ return this.viewDate;
1533
+ };
1534
+ handleHeaderTitleClick = () => {
1535
+ if (this.precision === 'year')
1536
+ return;
1537
+ if (this.view === 'days') {
1538
+ const ref = this.getViewFocusReference();
1539
+ this.focusedMonth = ref.getMonth();
1540
+ this.focusedYear = ref.getFullYear();
1541
+ this.view = 'months';
1542
+ this.focusActiveCell();
1543
+ return;
1544
+ }
1545
+ if (this.view === 'months') {
1546
+ const ref = this.getViewFocusReference();
1547
+ this.focusedYear = ref.getFullYear();
1548
+ this.decadeStart = getDecadeStart(ref.getFullYear());
1549
+ this.view = 'years';
1550
+ this.focusActiveCell();
1551
+ return;
1552
+ }
1553
+ // years view → cycle back to the base view for the current precision
1554
+ this.view = this.precisionToView(this.precision);
1555
+ this.focusActiveCell();
1556
+ };
1557
+ handleHeaderPrev = () => {
1558
+ if (this.view === 'days') {
1559
+ const step = this.monthsPerView === 'months' ? Math.max(1, this.months) : 1;
1560
+ this.viewDate = addMonths(this.viewDate, -step);
1561
+ this.focusedISO = toISO(clampDate(startOfMonth(this.viewDate), this.min, this.max));
1562
+ }
1563
+ else if (this.view === 'months') {
1564
+ this.focusedYear = this.focusedYear - 1;
1565
+ }
1566
+ else {
1567
+ this.decadeStart = this.decadeStart - DECADE_GRID_SIZE;
1568
+ }
1569
+ };
1570
+ handleHeaderNext = () => {
1571
+ if (this.view === 'days') {
1572
+ const step = this.monthsPerView === 'months' ? Math.max(1, this.months) : 1;
1573
+ this.viewDate = addMonths(this.viewDate, step);
1574
+ this.focusedISO = toISO(clampDate(startOfMonth(this.viewDate), this.min, this.max));
1575
+ }
1576
+ else if (this.view === 'months') {
1577
+ this.focusedYear = this.focusedYear + 1;
1578
+ }
1579
+ else {
1580
+ this.decadeStart = this.decadeStart + DECADE_GRID_SIZE;
534
1581
  }
535
- return [this.generateCalendarMonth()];
1582
+ };
1583
+ handleMonthSelect = (month) => {
1584
+ // When precision is `month`, selecting a month commits the value instead
1585
+ // of drilling to the days view. Gate the commit on bounds so keyboard
1586
+ // Enter/Space cannot bypass the click-path disabled check.
1587
+ if (this.precision === 'month') {
1588
+ if (!isMonthWithinBounds(this.focusedYear, month, this.min, this.max))
1589
+ return;
1590
+ this.focusedMonth = month;
1591
+ this.viewDate = new Date(this.focusedYear, month, 1);
1592
+ this.commitSelection(toISO(new Date(this.focusedYear, month, 1)));
1593
+ return;
1594
+ }
1595
+ this.viewDate = new Date(this.focusedYear, month, 1);
1596
+ this.focusedMonth = month;
1597
+ // Preserve day-of-month from the current focus (value or today), clamped
1598
+ // to the last day of the destination month and to min/max bounds.
1599
+ const nextFocus = clampDate(new Date(this.focusedYear, month, Math.min(new Date(this.focusedISO).getDate() || 1, endOfMonth(this.viewDate).getDate())), this.min, this.max);
1600
+ this.focusedISO = toISO(nextFocus);
1601
+ this.view = 'days';
1602
+ this.focusActiveCell();
1603
+ };
1604
+ handleYearSelect = (year) => {
1605
+ // When precision is `year`, selecting a year commits the value instead
1606
+ // of drilling to the months view. Gate the commit on bounds so keyboard
1607
+ // Enter/Space cannot bypass the click-path disabled check.
1608
+ if (this.precision === 'year') {
1609
+ if (!isYearWithinBounds(year, this.min, this.max))
1610
+ return;
1611
+ this.focusedYear = year;
1612
+ this.viewDate = new Date(year, 0, 1);
1613
+ this.commitSelection(toISO(new Date(year, 0, 1)));
1614
+ return;
1615
+ }
1616
+ this.focusedYear = year;
1617
+ this.viewDate = new Date(year, this.focusedMonth, 1);
1618
+ this.view = 'months';
1619
+ this.focusActiveCell();
1620
+ };
1621
+ /* ---------------------------- Day selection ---------------------------- */
1622
+ handleDaySelect = (iso) => {
1623
+ this.commitSelection(iso);
536
1624
  };
537
1625
  /**
538
- * Updates the form validity of the date picker input.
539
- * @returns {void}
1626
+ * Shared commit path used by day / month / year selection. Keeps the
1627
+ * selection logic (single/multi/range) and post-commit behaviour (event,
1628
+ * open state, tentative hover, view sync) identical across precisions.
540
1629
  */
541
- updateFormValidity = () => {
542
- const { formValidationMessage, internals, required, value, inputElem } = this;
543
- form.updateFormValidity({
544
- internals,
545
- required,
546
- value,
547
- inputElem,
548
- validationMessage: formValidationMessage,
549
- defaultMessage: 'Please, input or select a valid date',
1630
+ commitSelection = (iso) => {
1631
+ const next = applySelection(iso, this.selection, this.type);
1632
+ const shouldStayOpen = this.type === 'multi' || (this.type === 'range' && next.length === 1);
1633
+ this.hasBadInput = false;
1634
+ // Guard so `handleValueChange` doesn't re-sync the view back to `parsed[0]`
1635
+ // (would jump multi/range pickers to the earliest selected date) or to
1636
+ // today (when precision truncation leaves no full ISO to extract).
1637
+ this.isCommittingSelection = true;
1638
+ this.value = serializeValue(next, this.type, this.precision);
1639
+ this.isCommittingSelection = false;
1640
+ this.focusedISO = iso;
1641
+ const parsedIso = parseISO(iso);
1642
+ if (parsedIso) {
1643
+ this.viewDate = startOfMonth(parsedIso);
1644
+ this.focusedMonth = parsedIso.getMonth();
1645
+ this.focusedYear = parsedIso.getFullYear();
1646
+ if (this.precision !== 'year') {
1647
+ this.decadeStart = getDecadeStart(parsedIso.getFullYear());
1648
+ }
1649
+ }
1650
+ this.tentativeHover = this.type === 'range' && next.length === 1 ? iso : undefined;
1651
+ this.bqChange.emit({ value: this.value, el: this.el });
1652
+ this.open = shouldStayOpen;
1653
+ };
1654
+ handleDayHover = (iso) => {
1655
+ if (this.type !== 'range')
1656
+ return;
1657
+ this.tentativeHover = iso;
1658
+ };
1659
+ handleDayFocus = (iso) => {
1660
+ if (this.focusedISO === iso)
1661
+ return;
1662
+ this.focusedISO = iso;
1663
+ };
1664
+ /* ------------------------- Grid keyboard nav --------------------------- */
1665
+ getRTLDirection = () => {
1666
+ // Walk up through the composed tree so that dir="rtl" set on <html> or
1667
+ // any ancestor is picked up, not just a direct attribute on the host.
1668
+ const dir = this.el.closest('[dir]')?.dir ?? getComputedStyle(this.el).direction;
1669
+ return dir === 'rtl' ? -1 : 1;
1670
+ };
1671
+ moveFocusedDay = (deltaDays) => {
1672
+ const current = parseISO(this.focusedISO) ?? new Date();
1673
+ const next = clampDate(addDays(current, deltaDays), this.min, this.max);
1674
+ this.focusedISO = toISO(next);
1675
+ if (next.getMonth() !== this.viewDate.getMonth() || next.getFullYear() !== this.viewDate.getFullYear()) {
1676
+ this.viewDate = startOfMonth(next);
1677
+ }
1678
+ this.focusButton(`[data-iso="${this.focusedISO}"]`);
1679
+ };
1680
+ moveFocusedDayHome = () => {
1681
+ const first = this.firstDayOfWeek ?? 1;
1682
+ const dayOfWeek = parseISO(this.focusedISO)?.getDay() ?? 0;
1683
+ this.moveFocusedDay(-((dayOfWeek - first + 7) % 7));
1684
+ };
1685
+ moveFocusedDayEnd = () => {
1686
+ const first = this.firstDayOfWeek ?? 1;
1687
+ const focus = parseISO(this.focusedISO) ?? new Date();
1688
+ const rowIndex = (focus.getDay() - first + 7) % 7;
1689
+ this.moveFocusedDay(6 - rowIndex);
1690
+ };
1691
+ pageFocusedMonth = (direction, byYear) => {
1692
+ this.viewDate = byYear ? addYears(this.viewDate, direction) : addMonths(this.viewDate, direction);
1693
+ this.focusedISO = toISO(clampDate(startOfMonth(this.viewDate), this.min, this.max));
1694
+ };
1695
+ selectFocusedDay = () => {
1696
+ const iso = this.focusedISO;
1697
+ const parsed = parseISO(iso);
1698
+ if (parsed && isWithinBounds(parsed, this.min, this.max) && !this.isDateDisallowed?.(parsed)) {
1699
+ this.handleDaySelect(iso);
1700
+ }
1701
+ };
1702
+ handleDayGridKeyDown = (ev) => {
1703
+ const rtl = this.getRTLDirection();
1704
+ const handlers = {
1705
+ ArrowLeft: () => this.moveFocusedDay(-1 * rtl),
1706
+ ArrowRight: () => this.moveFocusedDay(1 * rtl),
1707
+ ArrowUp: () => this.moveFocusedDay(-7),
1708
+ ArrowDown: () => this.moveFocusedDay(7),
1709
+ Home: () => this.moveFocusedDayHome(),
1710
+ End: () => this.moveFocusedDayEnd(),
1711
+ PageUp: () => this.pageFocusedMonth(-1, ev.shiftKey),
1712
+ PageDown: () => this.pageFocusedMonth(1, ev.shiftKey),
1713
+ Escape: () => {
1714
+ this.open = false;
1715
+ this.inputElem?.focus();
1716
+ },
1717
+ Enter: () => this.selectFocusedDay(),
1718
+ ' ': () => this.selectFocusedDay(),
1719
+ };
1720
+ const handler = handlers[ev.key];
1721
+ if (handler) {
1722
+ ev.preventDefault();
1723
+ handler();
1724
+ }
1725
+ };
1726
+ getGridColumns = () => {
1727
+ // Months/years grids visually expand from 3 to 4 columns in multi-panel
1728
+ // mode. Keep arrow-key stride in sync so vertical navigation still lands
1729
+ // on the row directly above/below the current cell.
1730
+ return getGridColumns(this.getMonthCount());
1731
+ };
1732
+ handleMonthGridKeyDown = (ev) => {
1733
+ const rtl = this.getRTLDirection();
1734
+ const stride = this.getGridColumns();
1735
+ const move = (delta) => {
1736
+ const { month, year } = advanceFocusedMonth(this.focusedMonth, this.focusedYear, delta);
1737
+ this.focusedMonth = month;
1738
+ this.focusedYear = year;
1739
+ this.focusButton(`[data-month="${month}"]`);
1740
+ };
1741
+ switch (ev.key) {
1742
+ case 'ArrowLeft':
1743
+ ev.preventDefault();
1744
+ move(-1 * rtl);
1745
+ return;
1746
+ case 'ArrowRight':
1747
+ ev.preventDefault();
1748
+ move(1 * rtl);
1749
+ return;
1750
+ case 'ArrowUp':
1751
+ ev.preventDefault();
1752
+ move(-stride);
1753
+ return;
1754
+ case 'ArrowDown':
1755
+ ev.preventDefault();
1756
+ move(stride);
1757
+ return;
1758
+ case 'Enter':
1759
+ case ' ':
1760
+ ev.preventDefault();
1761
+ this.handleMonthSelect(this.focusedMonth);
1762
+ return;
1763
+ case 'Escape':
1764
+ ev.preventDefault();
1765
+ this.view = 'days';
1766
+ }
1767
+ };
1768
+ handleYearGridKeyDown = (ev) => {
1769
+ const rtl = this.getRTLDirection();
1770
+ const stride = this.getGridColumns();
1771
+ const move = (delta) => {
1772
+ const { year, decadeStart } = advanceFocusedYear(this.focusedYear, this.decadeStart, delta);
1773
+ this.focusedYear = year;
1774
+ this.decadeStart = decadeStart;
1775
+ this.focusButton(`[data-year="${year}"]`);
1776
+ };
1777
+ switch (ev.key) {
1778
+ case 'ArrowLeft':
1779
+ ev.preventDefault();
1780
+ move(-1 * rtl);
1781
+ return;
1782
+ case 'ArrowRight':
1783
+ ev.preventDefault();
1784
+ move(1 * rtl);
1785
+ return;
1786
+ case 'ArrowUp':
1787
+ ev.preventDefault();
1788
+ move(-stride);
1789
+ return;
1790
+ case 'ArrowDown':
1791
+ ev.preventDefault();
1792
+ move(stride);
1793
+ return;
1794
+ case 'Enter':
1795
+ case ' ':
1796
+ ev.preventDefault();
1797
+ this.handleYearSelect(this.focusedYear);
1798
+ return;
1799
+ case 'Escape':
1800
+ ev.preventDefault();
1801
+ this.view = 'months';
1802
+ }
1803
+ };
1804
+ focusButton = (selector) => {
1805
+ // Cancel any prior pending focus request so rapid state changes don't
1806
+ // race — only the latest target should win.
1807
+ if (this.pendingFocusRAF !== undefined)
1808
+ cancelAnimationFrame(this.pendingFocusRAF);
1809
+ this.pendingFocusRAF = requestAnimationFrame(() => {
1810
+ this.pendingFocusRAF = undefined;
1811
+ const button = this.el.shadowRoot?.querySelector(selector);
1812
+ button?.focus();
550
1813
  });
551
1814
  };
552
1815
  /**
553
- * Returns the Cally calendar component tag name based on the picker type.
554
- * Maps 'single' 'calendar-date', 'multi' 'calendar-multi', 'range' 'calendar-range'
555
- *
556
- * @returns The Cally calendar component tag name.
1816
+ * Focus the currently active cell for the visible view. Called after the
1817
+ * popup opens so keyboard users don't have to tab into the calendar.
557
1818
  */
558
- get calendarType() {
559
- return CALENDAR_TYPE_MAP[this.type] ?? CALENDAR_TYPE_MAP.single;
560
- }
1819
+ focusActiveCell = () => {
1820
+ if (this.view === 'months') {
1821
+ this.focusButton(`[data-month="${this.focusedMonth}"]`);
1822
+ return;
1823
+ }
1824
+ if (this.view === 'years') {
1825
+ this.focusButton(`[data-year="${this.focusedYear}"]`);
1826
+ return;
1827
+ }
1828
+ this.focusButton(`[data-iso="${this.focusedISO}"]`);
1829
+ };
1830
+ /* -------------------------- Header labels ------------------------------ */
1831
+ getMonthCount = () => {
1832
+ if (this.type === 'single')
1833
+ return 1;
1834
+ // `handleMonthsChange` clamps the prop on write, so here we just guard
1835
+ // against the initial value before the first watcher tick.
1836
+ return this.clampMonths(this.months);
1837
+ };
1838
+ getHeaderLabel = () => {
1839
+ return getHeaderLabel({
1840
+ view: this.view,
1841
+ viewDate: this.viewDate,
1842
+ focusedYear: this.focusedYear,
1843
+ decadeStart: this.decadeStart,
1844
+ monthCount: this.getMonthCount(),
1845
+ locale: this.locale,
1846
+ });
1847
+ };
1848
+ getHeaderTitleLabel = () => {
1849
+ return getHeaderTitleLabel(this.view, this.precision);
1850
+ };
1851
+ getPreviousLabel = () => {
1852
+ return getPreviousLabel(this.view);
1853
+ };
1854
+ getNextLabel = () => {
1855
+ return getNextLabel(this.view);
1856
+ };
1857
+ renderDayPanels = () => {
1858
+ const panels = [];
1859
+ const monthCount = this.getMonthCount();
1860
+ for (let i = 0; i < monthCount; i++) {
1861
+ const anchor = addMonths(this.viewDate, i);
1862
+ const anchorKey = toISO(startOfMonth(anchor));
1863
+ panels.push(index.h("div", { key: anchorKey, class: {
1864
+ 'bq-date-picker__panel': true,
1865
+ 'bq-date-picker__panel--extra': i > 0,
1866
+ } }, monthCount > 1 && (index.h("div", { class: "bq-date-picker__month-label", part: CALENDAR_PARTS.heading }, formatMonth(anchor, this.locale, 'long', true))), index.h(CalendarDayView, { viewDate: anchor, selection: this.selection, tentativeRange: this.tentativeRange, focusedISO: this.focusedISO, type: this.type, locale: this.locale, firstDayOfWeek: this.firstDayOfWeek ?? 1, showOutsideDays: this.showOutsideDays, minISO: this.min, maxISO: this.max, isDateDisallowed: this.isDateDisallowed, onDaySelect: (iso) => this.handleDaySelect(iso), onDayHover: (iso) => this.handleDayHover(iso), onDayFocus: (iso) => this.handleDayFocus(iso), onGridKeyDown: this.handleDayGridKeyDown })));
1867
+ }
1868
+ return index.h("div", { class: "bq-date-picker__panels" }, panels);
1869
+ };
1870
+ renderMonthsView = () => {
1871
+ const gridColumns = this.getGridColumns();
1872
+ return (index.h(CalendarMonthView, { year: this.focusedYear, focusedMonth: this.focusedMonth, gridColumns: gridColumns, locale: this.locale, minISO: this.min, maxISO: this.max, selection: this.selection, tentativeRange: this.tentativeRange, type: this.type, onMonthSelect: (month) => this.handleMonthSelect(month), onMonthHover: (iso) => this.handleDayHover(iso), onMonthFocus: (month) => {
1873
+ this.focusedMonth = month;
1874
+ }, onGridKeyDown: this.handleMonthGridKeyDown }));
1875
+ };
1876
+ renderYearsView = () => {
1877
+ const start = this.decadeStart;
1878
+ const end = start + DECADE_GRID_SIZE - 1;
1879
+ const years = Array.from({ length: DECADE_GRID_SIZE }, (_, i) => start + i);
1880
+ const effectiveFocused = this.focusedYear >= start && this.focusedYear <= end ? this.focusedYear : start;
1881
+ const gridColumns = this.getGridColumns();
1882
+ return (index.h(CalendarYearView, { years: years, focusedYear: effectiveFocused, gridColumns: gridColumns, minISO: this.min, maxISO: this.max, selection: this.selection, tentativeRange: this.tentativeRange, type: this.type, onYearSelect: (year) => this.handleYearSelect(year), onYearHover: (iso) => this.handleDayHover(iso), onYearFocus: (year) => {
1883
+ this.focusedYear = year;
1884
+ }, onGridKeyDown: this.handleYearGridKeyDown }));
1885
+ };
1886
+ renderView = () => {
1887
+ if (this.view === 'months')
1888
+ return this.renderMonthsView();
1889
+ if (this.view === 'years')
1890
+ return this.renderYearsView();
1891
+ return this.renderDayPanels();
1892
+ };
561
1893
  // render() function
562
1894
  // Always the last one in the class.
563
1895
  // ===================================
564
1896
  render() {
565
- const CallyCalendar = this.calendarType;
566
1897
  const labelId = `bq-date-picker__label-${this.name || DEFAULT_INPUT_ID}`;
567
- return (index.h("div", { key: 'd3bc7266653e663ceb7d09a7823bc3988ab94a39', class: "bq-date-picker", part: "base" }, index.h("label", { key: 'b36af597441d055958e36c0e3804cd7bcf25e820', "aria-labelledby": labelId, class: { 'bq-date-picker__label': true, '!hidden': !this.hasLabel }, htmlFor: this.name || DEFAULT_INPUT_ID, part: "label", ref: (labelElem) => {
1898
+ const popupId = `bq-date-picker__popup-${this.name || DEFAULT_INPUT_ID}`;
1899
+ return (index.h("div", { key: 'fbfb1d3294161587b4dc1097f472a7c56d42113d', class: "bq-date-picker", part: CALENDAR_PARTS.base }, index.h("label", { key: '653bbad6d53c67fac40fde49fe19eb53dd9058a3', class: { 'bq-date-picker__label': true, 'is-hidden': !this.hasLabel }, htmlFor: this.name || DEFAULT_INPUT_ID, part: CALENDAR_PARTS.label, ref: (labelElem) => {
568
1900
  this.labelElem = labelElem;
569
- } }, index.h("slot", { key: '6a56eb52cf58f8aba43750a154cf8ed81f864960', id: labelId, name: "label", onSlotchange: this.handleSlotChange })), index.h("bq-dropdown", { key: '1b2acccef5b1e12d3d3b4a239df4eda1f0df2e1f', class: "bq-date-picker__dropdown is-full [&::part(panel)]:is-auto [&::part(panel)]:p-m", disabled: this.disabled, distance: this.distance, exportparts: "panel", open: this.open, panelHeight: this.panelHeight, placement: this.placement, skidding: this.skidding, strategy: this.strategy }, index.h("div", { key: 'cbe0e797f421654c647ccf9539d515f1d9d6b515', class: {
1901
+ } }, index.h("slot", { key: '07e94277fbaf22b70bdd99d07159d41890210aa4', id: labelId, name: "label", onSlotchange: this.handleSlotChange })), index.h("bq-dropdown", { key: '41797796782799bb526b0f7848d13142824a6992', class: "bq-date-picker__dropdown", disabled: this.disabled, distance: this.distance, exportparts: "panel", open: this.open, panelHeight: this.panelHeight, placement: this.placement, skidding: this.skidding, strategy: this.strategy }, index.h("div", { key: '34a12c0fedb7ef5e0b01027d6880d76b98aba95c', class: {
570
1902
  'bq-date-picker__control': true,
571
1903
  [`validation-${this.validationStatus}`]: true,
572
- disabled: this.disabled,
573
- }, part: "control", slot: "trigger" }, index.h("span", { key: '8b9a4d62b9682a0b99d41aac5d6a0ef6e919e622', class: { 'bq-date-picker__control--prefix': true, '!hidden': !this.hasPrefix }, part: "prefix", ref: (spanElem) => {
574
- this.prefixElem = spanElem;
575
- } }, index.h("slot", { key: '2cb3a8524d866c584a3cf5141acdb1ad92224e86', name: "prefix", onSlotchange: this.handleSlotChange })), index.h("input", { key: 'a2a3dc60a66e9bb5fea79d58ed5b92583f735f91', "aria-controls": `${this.name}`, "aria-describedby": this.hasLabel ? labelId : null, "aria-disabled": this.disabled ? 'true' : 'false', "aria-invalid": this.validationStatus === 'error' ? 'true' : 'false', "aria-haspopup": "dialog", autoCapitalize: "off", autoComplete: "off", class: "bq-date-picker__control--input", disabled: this.disabled, form: this.form, id: this.name || DEFAULT_INPUT_ID, name: this.name, onBlur: this.handleBlur, onChange: this.handleChange, onFocus: this.handleFocus, part: "input", placeholder: this.placeholder, readonly: this.type !== 'single', ref: (inputElem) => {
576
- this.inputElem = inputElem;
577
- }, required: this.required, spellcheck: false, type: "text", value: this.displayDate }), this.hasValue && !this.disabled && !this.disableClear && (
578
- // The clear button will be visible as long as the input has a value
579
- // and the parent group is hovered or has focus-within
580
- index.h("bq-button", { key: 'd88805afb10746d198428dc0a6da5d550092bdff', appearance: "text", border: "s", class: "bq-date-picker__control--clear ms-[--bq-date-picker--gap] hidden [&::part(button)]:border-none [&::part(button)]:p-0", exportparts: "button", label: this.clearButtonLabel, onBqClick: this.handleClearClick, onlyIcon: true, part: "clear-btn", size: "small" }, index.h("slot", { key: '9e0440b32ae931bbaf731645dff13fa9522f9fa8', name: "clear-icon" }, index.h("bq-icon", { key: '48602de99d51ada0a61ee141276a54054e08264c', "aria-hidden": "true", class: "flex", name: "x-circle" })))), index.h("span", { key: 'f1d346f483c58d0dbd64cf83baf0ef9f018eb94e', class: "bq-date-picker__control--suffix", part: "suffix", ref: (spanElem) => {
581
- this.suffixElem = spanElem;
582
- } }, index.h("slot", { key: '5501e90797705d98883a0a9ec178ae21922407dd', name: "suffix", onSlotchange: this.handleSlotChange }, index.h("bq-icon", { key: '0a7e047ade9014cb9997a0ffcf47098bbe6160eb', class: "flex", name: "calendar-blank" })))), this.isCallyLoaded && (index.h(CallyCalendar, { key: 'cdbb9f9cb40d03b40f743d1086f9cc3c0055c233', "aria-labelledby": labelId, "aria-modal": "true", exportparts: CALENDAR_CONTAINER_EXPORT_PARTS, firstDayOfWeek: this.firstDayOfWeek, isDateDisallowed: this.isDateDisallowed, locale: this.locale, max: this.max, min: this.min, months: this.months, onChange: this.handleCalendarChange, onRangeend: this.handleCalendarRangeEnd, onRangestart: this.handleCalendarRangeStart, pageBy: this.monthsPerView, ref: (elem) => {
583
- this.callyElem = elem;
584
- }, role: "dialog", showOutsideDays: this.showOutsideDays, tentative: this.tentative, value: this.value }, index.h("bq-icon", { key: '4c10bc74c6e248f07b66fc4af28917a9b83bcc48', color: "text--primary", label: "Previous", name: "caret-left", slot: "previous" }), index.h("bq-icon", { key: '4f1875fa4e48db09e83ae5aa5c4c7ab0591cb2d4', color: "text--primary", label: "Next", name: "caret-right", slot: "next" }), index.h("div", { key: '92d856991700e38e8fbf383eae2b8d2c85d0faed', class: "flex flex-wrap justify-center gap-[--bq-spacing-m]" }, this.generateCalendarMonths()))))));
1904
+ 'is-disabled': !!this.disabled,
1905
+ 'is-open': !!this.open,
1906
+ }, part: CALENDAR_PARTS.control, slot: "trigger" }, index.h("span", { key: '074fef90f99a4f04b9dcf93662f32474872fae8d', class: { 'bq-date-picker__prefix': true, 'is-hidden': !this.hasPrefix }, part: CALENDAR_PARTS.prefix, ref: (el) => {
1907
+ this.prefixElem = el;
1908
+ } }, index.h("slot", { key: '040653982a81730279c4115a19415b01dbc24930', name: "prefix", onSlotchange: this.handleSlotChange })), index.h("input", { key: 'a72cc21a3811e27890881cd6b24340f3014bd891', "aria-controls": popupId, "aria-disabled": this.disabled ? 'true' : 'false', "aria-expanded": this.open ? 'true' : 'false', "aria-haspopup": "dialog", "aria-invalid": this.validationStatus === 'error' || this.hasConstraintError ? 'true' : 'false', "aria-labelledby": this.hasLabel ? labelId : undefined, autoCapitalize: "off", autoComplete: "off", class: "bq-date-picker__input", disabled: this.disabled, form: this.form, id: this.name || DEFAULT_INPUT_ID, name: this.name, onBlur: this.handleBlur, onChange: this.handleInputChange, onFocus: this.handleFocus, onKeyDown: this.handleInputKeyDown, part: CALENDAR_PARTS.input, placeholder: this.placeholder, readonly: this.type !== 'single', ref: (el) => {
1909
+ this.inputElem = el;
1910
+ }, required: this.required, role: "combobox", spellcheck: false, type: "text", value: this.displayDate }), this.hasValue && !this.disabled && !this.disableClear && (index.h("bq-button", { key: '4755ef5fd92ad15e4251e8e6b1a0c54fcab70211', appearance: "text", border: "xs", class: "bq-date-picker__clear", exportparts: "button", label: this.clearButtonLabel, onBqClick: this.handleClearClick, onlyIcon: true, part: CALENDAR_PARTS.clearBtn, size: "small" }, index.h("slot", { key: '3822545148e63e70ba3db113f68ef433f8cec557', name: "clear-icon" }, index.h("bq-icon", { key: '68fb241e92345c8ba00234a4549fde7596356244', "aria-hidden": "true", name: "x-circle" })))), index.h("bq-button", { key: 'a0d973454fe7a4a5176ec74cbfd4f53f8b5e502b', appearance: "text", border: "xs", class: "bq-date-picker__calendar-trigger", disabled: this.disabled, exportparts: "button", label: this.calendarButtonLabel, onClick: (ev) => ev.stopPropagation(), onBqClick: this.handleTriggerClick, onlyIcon: true, part: `${CALENDAR_PARTS.button} ${CALENDAR_PARTS.suffix} ${CALENDAR_PARTS.calendarTrigger}`, ref: (el) => {
1911
+ this.triggerBtnElem = el;
1912
+ }, size: "small" }, index.h("slot", { key: '232204777692c2fec6f341bb1839084aa0f333a3', name: "suffix", onSlotchange: this.handleSlotChange }, index.h("bq-icon", { key: '61a8deb36c0a991e7d3a9922150eeb1740494c7e', "aria-hidden": "true", name: "calendar-blank" })))), index.h("div", { key: 'f65869f887710ff537b00812aacf2bbd01ddeb3e', "aria-label": this.hasLabel ? undefined : 'Date picker', "aria-labelledby": this.hasLabel ? labelId : undefined, class: "bq-date-picker__calendar", id: popupId, part: CALENDAR_PARTS.container, role: "dialog", style: { '--bq-date-picker--panel-count': `${this.getMonthCount()}` } }, index.h(CalendarHeader, { key: 'a07e486177b1df9f477de1fe6c0c484356e0d6b9', view: this.view, label: this.getHeaderLabel(), previousLabel: this.getPreviousLabel(), nextLabel: this.getNextLabel(), titleLabel: this.getHeaderTitleLabel(), titleInteractive: this.precision !== 'year', onPrevious: () => this.handleHeaderPrev(), onNext: () => this.handleHeaderNext(), onTitleClick: () => this.handleHeaderTitleClick() }), index.h("div", { key: '00a0802e6eb76113fd68ee8852a98c762dc015bb', class: "bq-date-picker__view" }, this.renderView())))));
585
1913
  }
586
1914
  static get delegatesFocus() { return true; }
587
1915
  static get formAssociated() { return true; }
@@ -589,8 +1917,57 @@ const BqDatePicker = class {
589
1917
  "value": [{
590
1918
  "handleValueChange": 0
591
1919
  }],
1920
+ "formatOptions": [{
1921
+ "handleFormattingChange": 0
1922
+ }],
1923
+ "locale": [{
1924
+ "handleFormattingChange": 0
1925
+ }],
592
1926
  "type": [{
1927
+ "handleTypeChange": 0
1928
+ }, {
1929
+ "checkPropValues": 0
1930
+ }],
1931
+ "precision": [{
1932
+ "handlePrecisionChange": 0
1933
+ }, {
1934
+ "checkPropValues": 0
1935
+ }],
1936
+ "max": [{
1937
+ "handleBoundsChange": 0
1938
+ }],
1939
+ "min": [{
1940
+ "handleBoundsChange": 0
1941
+ }],
1942
+ "required": [{
1943
+ "handleRequiredChange": 0
1944
+ }],
1945
+ "firstDayOfWeek": [{
1946
+ "checkPropValues": 0
1947
+ }],
1948
+ "initialView": [{
1949
+ "checkPropValues": 0
1950
+ }],
1951
+ "monthsPerView": [{
1952
+ "checkPropValues": 0
1953
+ }],
1954
+ "placement": [{
1955
+ "checkPropValues": 0
1956
+ }],
1957
+ "strategy": [{
1958
+ "checkPropValues": 0
1959
+ }],
1960
+ "validationStatus": [{
593
1961
  "checkPropValues": 0
1962
+ }],
1963
+ "months": [{
1964
+ "handleMonthsChange": 0
1965
+ }],
1966
+ "open": [{
1967
+ "handleOpen": 0
1968
+ }],
1969
+ "view": [{
1970
+ "handleViewChange": 0
594
1971
  }]
595
1972
  }; }
596
1973
  };