@govbr-ds/webcomponents 2.2.0 → 2.4.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 (658) hide show
  1. package/README.md +75 -24
  2. package/cem/custom-elements.json +1858 -1712
  3. package/cem/webcomponents.html-custom-data.json +73 -67
  4. package/dist/cjs/br-avatar.cjs.entry.js +2 -2
  5. package/dist/cjs/br-breadcrumb-item.cjs.entry.js +1 -1
  6. package/dist/cjs/br-breadcrumb.cjs.entry.js +2 -2
  7. package/dist/cjs/br-button_2.cjs.entry.js +10 -5
  8. package/dist/cjs/br-card.cjs.entry.js +2 -2
  9. package/dist/cjs/br-carousel-page.cjs.entry.js +2 -2
  10. package/dist/cjs/br-carousel.cjs.entry.js +2 -2
  11. package/dist/cjs/br-checkbox-group.cjs.entry.js +2 -2
  12. package/dist/cjs/br-checkbox.cjs.entry.js +3 -3
  13. package/dist/cjs/br-checkgroup.cjs.entry.js +1 -1
  14. package/dist/cjs/br-collapse_2.cjs.entry.js +11 -7
  15. package/dist/cjs/br-cookiebar-cookie.cjs.entry.js +2 -2
  16. package/dist/cjs/br-cookiebar-group.cjs.entry.js +2 -2
  17. package/dist/cjs/br-cookiebar-header.cjs.entry.js +2 -2
  18. package/dist/cjs/br-cookiebar-link.cjs.entry.js +2 -2
  19. package/dist/cjs/br-cookiebar-note-group.cjs.entry.js +2 -2
  20. package/dist/cjs/br-cookiebar-note.cjs.entry.js +2 -2
  21. package/dist/cjs/br-cookiebar.cjs.entry.js +2 -2
  22. package/dist/cjs/br-crumb.cjs.entry.js +1 -1
  23. package/dist/cjs/br-date-picker_3.cjs.entry.js +869 -517
  24. package/dist/cjs/br-datetime-picker.cjs.entry.js +1347 -311
  25. package/dist/cjs/br-divider.cjs.entry.js +2 -2
  26. package/dist/cjs/br-dropdown_2.cjs.entry.js +282 -165
  27. package/dist/cjs/br-footer-category.cjs.entry.js +2 -2
  28. package/dist/cjs/br-footer-item.cjs.entry.js +2 -2
  29. package/dist/cjs/br-footer-legal.cjs.entry.js +2 -2
  30. package/dist/cjs/br-footer-logo.cjs.entry.js +2 -2
  31. package/dist/cjs/br-footer-social.cjs.entry.js +2 -2
  32. package/dist/cjs/br-footer.cjs.entry.js +2 -2
  33. package/dist/cjs/br-header-function.cjs.entry.js +2 -2
  34. package/dist/cjs/br-header-link.cjs.entry.js +2 -2
  35. package/dist/cjs/br-header-list.cjs.entry.js +2 -2
  36. package/dist/cjs/br-header-logo.cjs.entry.js +2 -2
  37. package/dist/cjs/br-header.cjs.entry.js +27 -23
  38. package/dist/cjs/br-icon.cjs.entry.js +4 -33
  39. package/dist/cjs/br-input.cjs.entry.js +31 -6
  40. package/dist/cjs/br-item.cjs.entry.js +5 -4
  41. package/dist/cjs/br-link.cjs.entry.js +2 -2
  42. package/dist/cjs/br-loading.cjs.entry.js +2 -2
  43. package/dist/cjs/br-magic-button.cjs.entry.js +21 -8
  44. package/dist/cjs/br-menu-group.cjs.entry.js +2 -2
  45. package/dist/cjs/br-menu-header.cjs.entry.js +2 -2
  46. package/dist/cjs/br-menu-info.cjs.entry.js +2 -2
  47. package/dist/cjs/br-menu-item.cjs.entry.js +2 -2
  48. package/dist/cjs/br-menu-link.cjs.entry.js +2 -2
  49. package/dist/cjs/br-menu-list.cjs.entry.js +2 -2
  50. package/dist/cjs/br-menu-logo.cjs.entry.js +2 -2
  51. package/dist/cjs/br-menu-social.cjs.entry.js +2 -2
  52. package/dist/cjs/br-menu.cjs.entry.js +2 -2
  53. package/dist/cjs/br-modal.cjs.entry.js +20 -4
  54. package/dist/cjs/br-notification-body.cjs.entry.js +2 -2
  55. package/dist/cjs/br-notification-header.cjs.entry.js +2 -2
  56. package/dist/cjs/br-notification-item.cjs.entry.js +2 -2
  57. package/dist/cjs/br-notification.cjs.entry.js +2 -2
  58. package/dist/cjs/br-pagination.cjs.entry.js +4 -4
  59. package/dist/cjs/br-radio-group.cjs.entry.js +3 -3
  60. package/dist/cjs/br-radio.cjs.entry.js +3 -3
  61. package/dist/cjs/br-scrim.cjs.entry.js +2 -2
  62. package/dist/cjs/br-select-input_3.cjs.entry.js +286 -100
  63. package/dist/cjs/br-sign-in.cjs.entry.js +8 -4
  64. package/dist/cjs/br-skip-link-item.cjs.entry.js +1 -1
  65. package/dist/cjs/br-skip-link.cjs.entry.js +2 -2
  66. package/dist/cjs/br-skiplink-item.cjs.entry.js +2 -2
  67. package/dist/cjs/br-slider.cjs.entry.js +3 -3
  68. package/dist/cjs/br-step_2.cjs.entry.js +3 -3
  69. package/dist/cjs/br-switch.cjs.entry.js +3 -3
  70. package/dist/cjs/br-tab-item.cjs.entry.js +3 -3
  71. package/dist/cjs/br-tab.cjs.entry.js +38 -13
  72. package/dist/cjs/br-table-body.cjs.entry.js +2 -2
  73. package/dist/cjs/br-table-cell.cjs.entry.js +2 -2
  74. package/dist/cjs/br-table-header-cell.cjs.entry.js +2 -2
  75. package/dist/cjs/br-table-header.cjs.entry.js +2 -2
  76. package/dist/cjs/br-table-row.cjs.entry.js +2 -2
  77. package/dist/cjs/br-table.cjs.entry.js +2 -2
  78. package/dist/cjs/br-tag.cjs.entry.js +3 -3
  79. package/dist/cjs/br-textarea.cjs.entry.js +3 -3
  80. package/dist/cjs/br-tooltip.cjs.entry.js +2 -2
  81. package/dist/cjs/br-upload.cjs.entry.js +7 -23
  82. package/dist/cjs/br-wizard-panel.cjs.entry.js +2 -2
  83. package/dist/cjs/br-wizard.cjs.entry.js +2 -2
  84. package/dist/cjs/{datetime-picker-constants-B5pWeOn1.js → datetime-picker-constants-CCeI5iW7.js} +20 -5
  85. package/dist/cjs/format-bytes-Cs8SH2w0.js +24 -0
  86. package/dist/cjs/icon.utils-DF6kMskA.js +46 -0
  87. package/dist/cjs/{index-CGgZBuyy.js → index-Bc30P_6z.js} +33 -27
  88. package/dist/cjs/{index-C92n55ch.js → index-C-IpVFDH.js} +13 -13
  89. package/dist/cjs/index.cjs.js +2 -2
  90. package/dist/cjs/{datetime-picker-props-validation-DmNKSXsy.js → isValid-CduHZTFc.js} +1 -483
  91. package/dist/cjs/loader.cjs.js +2 -2
  92. package/dist/cjs/select.utils-C38f5Kea.js +62 -0
  93. package/dist/cjs/{validator-CTCajtT9.js → validator-GkkueMOx.js} +18 -0
  94. package/dist/cjs/webcomponents.cjs.js +3 -3
  95. package/dist/collection/collection-manifest.json +1 -1
  96. package/dist/collection/components/avatar/avatar.css +1 -1
  97. package/dist/collection/components/breadcrumb/breadcrumb.css +1 -1
  98. package/dist/collection/components/button/button.css +1 -1
  99. package/dist/collection/components/button/button.js +8 -3
  100. package/dist/collection/components/card/card.css +1 -1
  101. package/dist/collection/components/carousel/carousel-page/carousel-page.css +1 -1
  102. package/dist/collection/components/carousel/carousel.css +1 -1
  103. package/dist/collection/components/checkbox/checkbox.css +1 -1
  104. package/dist/collection/components/checkbox-group/checkbox-group.css +1 -1
  105. package/dist/collection/components/collapse/collapse.css +1 -1
  106. package/dist/collection/components/collapse/collapse.js +12 -6
  107. package/dist/collection/components/cookiebar/cookiebar-cookie/cookiebar-cookie.css +1 -1
  108. package/dist/collection/components/cookiebar/cookiebar-group/cookiebar-group.css +1 -1
  109. package/dist/collection/components/cookiebar/cookiebar-header/cookiebar-header.css +1 -1
  110. package/dist/collection/components/cookiebar/cookiebar-link/cookiebar-link.css +1 -1
  111. package/dist/collection/components/cookiebar/cookiebar-note/cookiebar-note.css +1 -1
  112. package/dist/collection/components/cookiebar/cookiebar-note-group/cookiebar-note-group.css +1 -1
  113. package/dist/collection/components/cookiebar/cookiebar.css +1 -1
  114. package/dist/collection/components/datetime-picker/date-picker/date-picker-locale.js +12 -12
  115. package/dist/collection/components/datetime-picker/date-picker/date-picker-props-validation.js +14 -13
  116. package/dist/collection/components/datetime-picker/date-picker/date-picker.css +1 -1
  117. package/dist/collection/components/datetime-picker/date-picker/date-picker.js +384 -280
  118. package/dist/collection/components/datetime-picker/datetime-input/datetime-input-constants.js +59 -0
  119. package/dist/collection/components/datetime-picker/datetime-input/datetime-input-props-validation.js +19 -15
  120. package/dist/collection/components/datetime-picker/datetime-input/datetime-input.css +1 -1
  121. package/dist/collection/components/datetime-picker/datetime-input/datetime-input.js +373 -211
  122. package/dist/collection/components/datetime-picker/datetime-input/datetime-input.types.js +1 -0
  123. package/dist/collection/components/datetime-picker/datetime-picker-constants.js +19 -5
  124. package/dist/collection/components/datetime-picker/datetime-picker-form-associated.js +92 -11
  125. package/dist/collection/components/datetime-picker/datetime-picker-props-validation.js +52 -33
  126. package/dist/collection/components/datetime-picker/datetime-picker.css +1 -1
  127. package/dist/collection/components/datetime-picker/datetime-picker.js +915 -362
  128. package/dist/collection/components/datetime-picker/datetime-picker.utils.js +62 -49
  129. package/dist/collection/components/datetime-picker/time-picker/time-picker-constants.js +3 -2
  130. package/dist/collection/components/datetime-picker/time-picker/time-picker.css +1 -1
  131. package/dist/collection/components/datetime-picker/time-picker/time-picker.js +148 -85
  132. package/dist/collection/components/divider/divider.css +1 -1
  133. package/dist/collection/components/dropdown/dropdown.css +1 -1
  134. package/dist/collection/components/dropdown/dropdown.js +32 -36
  135. package/dist/collection/components/footer/footer-category/footer-category.css +1 -1
  136. package/dist/collection/components/footer/footer-item/footer-item.css +1 -1
  137. package/dist/collection/components/footer/footer-legal/footer-legal.css +1 -1
  138. package/dist/collection/components/footer/footer-logo/footer-logo.css +1 -1
  139. package/dist/collection/components/footer/footer-social/footer-social.css +1 -1
  140. package/dist/collection/components/footer/footer.css +1 -1
  141. package/dist/collection/components/header/header-function/header-function.css +1 -1
  142. package/dist/collection/components/header/header-link/header-link.css +1 -1
  143. package/dist/collection/components/header/header-list/header-list.css +1 -1
  144. package/dist/collection/components/header/header-logo/header-logo.css +1 -1
  145. package/dist/collection/components/header/header.css +1 -1
  146. package/dist/collection/components/header/header.js +25 -21
  147. package/dist/collection/components/icon/icon.css +1 -1
  148. package/dist/collection/components/icon/icon.utils.js +8 -0
  149. package/dist/collection/components/input/input.css +1 -1
  150. package/dist/collection/components/input/input.js +50 -4
  151. package/dist/collection/components/item/item.css +1 -1
  152. package/dist/collection/components/item/item.js +4 -3
  153. package/dist/collection/components/link/link.css +1 -1
  154. package/dist/collection/components/list/list.css +1 -1
  155. package/dist/collection/components/loading/loading.css +1 -1
  156. package/dist/collection/components/magic-button/magic-button.css +1 -1
  157. package/dist/collection/components/magic-button/magic-button.js +20 -6
  158. package/dist/collection/components/menu/menu-group/menu-group.css +1 -1
  159. package/dist/collection/components/menu/menu-header/menu-header.css +1 -1
  160. package/dist/collection/components/menu/menu-info/menu-info.css +1 -1
  161. package/dist/collection/components/menu/menu-item/menu-item.css +1 -1
  162. package/dist/collection/components/menu/menu-link/menu-link.css +1 -1
  163. package/dist/collection/components/menu/menu-list/menu-list.css +1 -1
  164. package/dist/collection/components/menu/menu-logo/menu-logo.css +1 -1
  165. package/dist/collection/components/menu/menu-social/menu-social.css +1 -1
  166. package/dist/collection/components/menu/menu.css +1 -1
  167. package/dist/collection/components/message/message.css +1 -1
  168. package/dist/collection/components/modal/modal.css +1 -1
  169. package/dist/collection/components/modal/modal.js +19 -3
  170. package/dist/collection/components/notification/notification-body/notification-body.css +1 -1
  171. package/dist/collection/components/notification/notification-header/notification-header.css +1 -1
  172. package/dist/collection/components/notification/notification-item/notification-item.css +1 -1
  173. package/dist/collection/components/notification/notification.css +1 -1
  174. package/dist/collection/components/pagination/pagination.css +1 -1
  175. package/dist/collection/components/pagination/pagination.js +4 -2
  176. package/dist/collection/components/radio/radio.css +1 -1
  177. package/dist/collection/components/radio-group/radio-group.css +1 -1
  178. package/dist/collection/components/scrim/scrim.css +1 -1
  179. package/dist/collection/components/select/select-input/select-input.css +1 -1
  180. package/dist/collection/components/select/select-input/select-input.js +126 -18
  181. package/dist/collection/components/select/select-list/select-list.css +1 -1
  182. package/dist/collection/components/select/select-list/select-list.js +218 -66
  183. package/dist/collection/components/select/select-option/select-option.css +1 -1
  184. package/dist/collection/components/select/select-option/select-option.js +14 -5
  185. package/dist/collection/components/select/select.css +1 -1
  186. package/dist/collection/components/select/select.js +303 -94
  187. package/dist/collection/components/select/select.utils.js +29 -8
  188. package/dist/collection/components/sign-in/sign-in.css +1 -1
  189. package/dist/collection/components/sign-in/sign-in.js +8 -4
  190. package/dist/collection/components/skip-link/skip-link-item/skip-link-item.css +1 -1
  191. package/dist/collection/components/skip-link/skip-link.css +1 -1
  192. package/dist/collection/components/slider/slider.css +1 -1
  193. package/dist/collection/components/step/step-item/step-item.css +1 -1
  194. package/dist/collection/components/step/step.css +1 -1
  195. package/dist/collection/components/switch/switch.css +1 -1
  196. package/dist/collection/components/tab/tab-item/tab-item.css +1 -1
  197. package/dist/collection/components/tab/tab-item/tab-item.js +2 -2
  198. package/dist/collection/components/tab/tab.css +1 -1
  199. package/dist/collection/components/tab/tab.js +37 -10
  200. package/dist/collection/components/table/table-body/table-body.css +1 -1
  201. package/dist/collection/components/table/table-cell/table-cell.css +1 -1
  202. package/dist/collection/components/table/table-header/table-header.css +1 -1
  203. package/dist/collection/components/table/table-header-cell/table-header-cell.css +1 -1
  204. package/dist/collection/components/table/table-row/table-row.css +1 -1
  205. package/dist/collection/components/table/table.css +1 -1
  206. package/dist/collection/components/tag/tag.css +1 -1
  207. package/dist/collection/components/textarea/textarea.css +1 -1
  208. package/dist/collection/components/tooltip/tooltip.css +1 -1
  209. package/dist/collection/components/upload/upload.css +1 -1
  210. package/dist/collection/components/wizard/wizard-panel/wizard-panel.css +1 -1
  211. package/dist/collection/components/wizard/wizard.css +1 -1
  212. package/dist/collection/pages/components/select/remote.js +33 -0
  213. package/dist/collection/pages/components/select/virtualized.js +13 -0
  214. package/dist/collection/pages/components/upload/handler.js +25 -0
  215. package/dist/collection/pages/scripts/component-controls.js +15 -16
  216. package/dist/collection/pages/scripts/menu.js +0 -1
  217. package/dist/collection/pages/scripts/pageLoader.js +168 -91
  218. package/dist/collection/pages/scripts/pageloader-preview.js +37 -28
  219. package/dist/collection/shared/utils/form.js +17 -0
  220. package/dist/components/br-avatar.js +1 -1
  221. package/dist/components/br-breadcrumb-item.js +1 -1
  222. package/dist/components/br-breadcrumb.js +1 -1
  223. package/dist/components/br-button.js +1 -1
  224. package/dist/components/br-card.js +1 -1
  225. package/dist/components/br-carousel-page.js +1 -1
  226. package/dist/components/br-carousel.js +1 -1
  227. package/dist/components/br-checkbox-group.js +1 -1
  228. package/dist/components/br-checkbox.js +1 -1
  229. package/dist/components/br-checkgroup.js +1 -1
  230. package/dist/components/br-collapse.js +1 -1
  231. package/dist/components/br-cookiebar-cookie.js +1 -1
  232. package/dist/components/br-cookiebar-group.js +1 -1
  233. package/dist/components/br-cookiebar-header.js +1 -1
  234. package/dist/components/br-cookiebar-link.js +1 -1
  235. package/dist/components/br-cookiebar-note-group.js +1 -1
  236. package/dist/components/br-cookiebar-note.js +1 -1
  237. package/dist/components/br-cookiebar.js +1 -1
  238. package/dist/components/br-crumb.js +1 -1
  239. package/dist/components/br-date-picker.js +1 -1
  240. package/dist/components/br-datetime-input.js +1 -1
  241. package/dist/components/br-datetime-picker.js +1 -1
  242. package/dist/components/br-divider.js +1 -1
  243. package/dist/components/br-dropdown.js +1 -1
  244. package/dist/components/br-footer-category.js +1 -1
  245. package/dist/components/br-footer-item.js +1 -1
  246. package/dist/components/br-footer-legal.js +1 -1
  247. package/dist/components/br-footer-logo.js +1 -1
  248. package/dist/components/br-footer-social.js +1 -1
  249. package/dist/components/br-footer.js +1 -1
  250. package/dist/components/br-header-function.js +1 -1
  251. package/dist/components/br-header-link.js +1 -1
  252. package/dist/components/br-header-list.js +1 -1
  253. package/dist/components/br-header-logo.js +1 -1
  254. package/dist/components/br-header.js +1 -1
  255. package/dist/components/br-icon.js +1 -1
  256. package/dist/components/br-input.js +1 -1
  257. package/dist/components/br-item.js +1 -1
  258. package/dist/components/br-link.js +1 -1
  259. package/dist/components/br-list.js +1 -1
  260. package/dist/components/br-loading.js +1 -1
  261. package/dist/components/br-magic-button.js +1 -1
  262. package/dist/components/br-menu-group.js +1 -1
  263. package/dist/components/br-menu-header.js +1 -1
  264. package/dist/components/br-menu-info.js +1 -1
  265. package/dist/components/br-menu-item.js +1 -1
  266. package/dist/components/br-menu-link.js +1 -1
  267. package/dist/components/br-menu-list.js +1 -1
  268. package/dist/components/br-menu-logo.js +1 -1
  269. package/dist/components/br-menu-social.js +1 -1
  270. package/dist/components/br-menu.js +1 -1
  271. package/dist/components/br-message.js +1 -1
  272. package/dist/components/br-modal.js +1 -1
  273. package/dist/components/br-notification-body.js +1 -1
  274. package/dist/components/br-notification-header.js +1 -1
  275. package/dist/components/br-notification-item.js +1 -1
  276. package/dist/components/br-notification.js +1 -1
  277. package/dist/components/br-pagination.js +1 -1
  278. package/dist/components/br-radio-group.js +1 -1
  279. package/dist/components/br-radio.js +1 -1
  280. package/dist/components/br-scrim.js +1 -1
  281. package/dist/components/br-select-input.js +1 -1
  282. package/dist/components/br-select-list.js +1 -1
  283. package/dist/components/br-select-option.js +1 -1
  284. package/dist/components/br-select.js +1 -1
  285. package/dist/components/br-sign-in.js +1 -1
  286. package/dist/components/br-skip-link-item.js +1 -1
  287. package/dist/components/br-skip-link.js +1 -1
  288. package/dist/components/br-skiplink-item.js +1 -1
  289. package/dist/components/br-slider.js +1 -1
  290. package/dist/components/br-step-item.js +1 -1
  291. package/dist/components/br-step.js +1 -1
  292. package/dist/components/br-switch.js +1 -1
  293. package/dist/components/br-tab-item.js +1 -1
  294. package/dist/components/br-tab.js +1 -1
  295. package/dist/components/br-table-body.js +1 -1
  296. package/dist/components/br-table-cell.js +1 -1
  297. package/dist/components/br-table-header-cell.js +1 -1
  298. package/dist/components/br-table-header.js +1 -1
  299. package/dist/components/br-table-row.js +1 -1
  300. package/dist/components/br-table.js +1 -1
  301. package/dist/components/br-tag.js +1 -1
  302. package/dist/components/br-textarea.js +1 -1
  303. package/dist/components/br-time-picker.js +1 -1
  304. package/dist/components/br-tooltip.js +1 -1
  305. package/dist/components/br-upload.js +1 -1
  306. package/dist/components/br-wizard-panel.js +1 -1
  307. package/dist/components/br-wizard.js +1 -1
  308. package/dist/components/index.js +1 -1
  309. package/dist/components/p-5h-W9_JR.js +5 -0
  310. package/dist/components/p-848QkYoM.js +5 -0
  311. package/dist/components/p-B7bNfmgh.js +5 -0
  312. package/dist/components/p-BFHvuEnN.js +5 -0
  313. package/dist/components/p-BH6QYnAr.js +5 -0
  314. package/dist/{webcomponents/p-6c2fe5e4.entry.js → components/p-BcW8O6h2.js} +1 -1
  315. package/dist/components/p-BicHMcSS.js +5 -0
  316. package/dist/components/p-Bs7iRQTG.js +5 -0
  317. package/dist/components/{p-DSHbttu9.js → p-Bvrw9yWR.js} +1 -1
  318. package/dist/components/p-BzQFMh9j.js +5 -0
  319. package/dist/components/p-CBHd0-fF.js +5 -0
  320. package/dist/components/p-CCPHCJjw.js +5 -0
  321. package/dist/components/p-CDTENPaP.js +5 -0
  322. package/dist/components/{p-BcqVlof7.js → p-CbgKdASU.js} +1 -1
  323. package/dist/components/p-CeNELttN.js +5 -0
  324. package/dist/components/p-CjtmJTLO.js +5 -0
  325. package/dist/components/{p-DTGNra9m.js → p-D-3G3Ioq.js} +1 -1
  326. package/dist/components/p-DDu3JV_r.js +5 -0
  327. package/dist/components/p-DFWqyfUe.js +5 -0
  328. package/dist/components/p-DL6xuxGG.js +5 -0
  329. package/dist/components/p-DOX9Uwk1.js +5 -0
  330. package/dist/components/p-DUq7uT2-.js +5 -0
  331. package/dist/components/p-Devw08cc.js +5 -0
  332. package/dist/components/p-Di96UxvH.js +5 -0
  333. package/dist/components/p-Dp3MsSXu.js +5 -0
  334. package/dist/components/p-DsO4F0Cz.js +5 -0
  335. package/dist/components/p-DuLHFTpa.js +5 -0
  336. package/dist/components/p-DusornQ0.js +5 -0
  337. package/dist/components/{p-Dma14GVa.js → p-Jk_KQE5V.js} +1 -1
  338. package/dist/components/p-OQpiDEK9.js +5 -0
  339. package/dist/components/p-PV731d8s.js +5 -0
  340. package/dist/components/p-XW6Hp_Jk.js +5 -0
  341. package/dist/components/p-jOb1hCPi.js +5 -0
  342. package/dist/components/p-rMnkh3Cy.js +5 -0
  343. package/dist/components/p-ta-24T1Z.js +5 -0
  344. package/dist/esm/br-avatar.entry.js +2 -2
  345. package/dist/esm/br-breadcrumb-item.entry.js +1 -1
  346. package/dist/esm/br-breadcrumb.entry.js +2 -2
  347. package/dist/esm/br-button_2.entry.js +10 -5
  348. package/dist/esm/br-card.entry.js +2 -2
  349. package/dist/esm/br-carousel-page.entry.js +2 -2
  350. package/dist/esm/br-carousel.entry.js +3 -3
  351. package/dist/esm/br-checkbox-group.entry.js +2 -2
  352. package/dist/esm/br-checkbox.entry.js +4 -4
  353. package/dist/esm/br-checkgroup.entry.js +1 -1
  354. package/dist/esm/br-collapse_2.entry.js +12 -8
  355. package/dist/esm/br-cookiebar-cookie.entry.js +2 -2
  356. package/dist/esm/br-cookiebar-group.entry.js +2 -2
  357. package/dist/esm/br-cookiebar-header.entry.js +2 -2
  358. package/dist/esm/br-cookiebar-link.entry.js +2 -2
  359. package/dist/esm/br-cookiebar-note-group.entry.js +2 -2
  360. package/dist/esm/br-cookiebar-note.entry.js +2 -2
  361. package/dist/esm/br-cookiebar.entry.js +3 -3
  362. package/dist/esm/br-crumb.entry.js +1 -1
  363. package/dist/esm/br-date-picker_3.entry.js +844 -492
  364. package/dist/esm/br-datetime-picker.entry.js +1316 -280
  365. package/dist/esm/br-divider.entry.js +2 -2
  366. package/dist/esm/br-dropdown_2.entry.js +281 -164
  367. package/dist/esm/br-footer-category.entry.js +2 -2
  368. package/dist/esm/br-footer-item.entry.js +2 -2
  369. package/dist/esm/br-footer-legal.entry.js +2 -2
  370. package/dist/esm/br-footer-logo.entry.js +2 -2
  371. package/dist/esm/br-footer-social.entry.js +2 -2
  372. package/dist/esm/br-footer.entry.js +2 -2
  373. package/dist/esm/br-header-function.entry.js +2 -2
  374. package/dist/esm/br-header-link.entry.js +2 -2
  375. package/dist/esm/br-header-list.entry.js +3 -3
  376. package/dist/esm/br-header-logo.entry.js +2 -2
  377. package/dist/esm/br-header.entry.js +27 -23
  378. package/dist/esm/br-icon.entry.js +3 -32
  379. package/dist/esm/br-input.entry.js +32 -7
  380. package/dist/esm/br-item.entry.js +5 -4
  381. package/dist/esm/br-link.entry.js +2 -2
  382. package/dist/esm/br-loading.entry.js +2 -2
  383. package/dist/esm/br-magic-button.entry.js +21 -8
  384. package/dist/esm/br-menu-group.entry.js +2 -2
  385. package/dist/esm/br-menu-header.entry.js +2 -2
  386. package/dist/esm/br-menu-info.entry.js +2 -2
  387. package/dist/esm/br-menu-item.entry.js +2 -2
  388. package/dist/esm/br-menu-link.entry.js +2 -2
  389. package/dist/esm/br-menu-list.entry.js +2 -2
  390. package/dist/esm/br-menu-logo.entry.js +2 -2
  391. package/dist/esm/br-menu-social.entry.js +2 -2
  392. package/dist/esm/br-menu.entry.js +3 -3
  393. package/dist/esm/br-modal.entry.js +21 -5
  394. package/dist/esm/br-notification-body.entry.js +2 -2
  395. package/dist/esm/br-notification-header.entry.js +2 -2
  396. package/dist/esm/br-notification-item.entry.js +2 -2
  397. package/dist/esm/br-notification.entry.js +3 -3
  398. package/dist/esm/br-pagination.entry.js +4 -4
  399. package/dist/esm/br-radio-group.entry.js +4 -4
  400. package/dist/esm/br-radio.entry.js +4 -4
  401. package/dist/esm/br-scrim.entry.js +2 -2
  402. package/dist/esm/br-select-input_3.entry.js +286 -100
  403. package/dist/esm/br-sign-in.entry.js +8 -4
  404. package/dist/esm/br-skip-link-item.entry.js +1 -1
  405. package/dist/esm/br-skip-link.entry.js +2 -2
  406. package/dist/esm/br-skiplink-item.entry.js +2 -2
  407. package/dist/esm/br-slider.entry.js +4 -4
  408. package/dist/esm/br-step_2.entry.js +3 -3
  409. package/dist/esm/br-switch.entry.js +4 -4
  410. package/dist/esm/br-tab-item.entry.js +3 -3
  411. package/dist/esm/br-tab.entry.js +38 -13
  412. package/dist/esm/br-table-body.entry.js +2 -2
  413. package/dist/esm/br-table-cell.entry.js +2 -2
  414. package/dist/esm/br-table-header-cell.entry.js +2 -2
  415. package/dist/esm/br-table-header.entry.js +2 -2
  416. package/dist/esm/br-table-row.entry.js +2 -2
  417. package/dist/esm/br-table.entry.js +2 -2
  418. package/dist/esm/br-tag.entry.js +4 -4
  419. package/dist/esm/br-textarea.entry.js +4 -4
  420. package/dist/esm/br-tooltip.entry.js +3 -3
  421. package/dist/esm/br-upload.entry.js +5 -21
  422. package/dist/esm/br-wizard-panel.entry.js +2 -2
  423. package/dist/esm/br-wizard.entry.js +2 -2
  424. package/dist/esm/{datetime-picker-constants-BtRPYRvA.js → datetime-picker-constants-DDc4sADe.js} +20 -6
  425. package/dist/esm/{event-CfuJQ1DY.js → event-6Da1SZ3J.js} +1 -1
  426. package/dist/esm/format-bytes-B7bNfmgh.js +22 -0
  427. package/dist/esm/icon.utils-zlORkiHQ.js +43 -0
  428. package/dist/esm/{index-Dcn7tRST.js → index-ConyRdJe.js} +33 -27
  429. package/dist/esm/{index-BQPOWxe5.js → index-CytVKoHT.js} +13 -13
  430. package/dist/esm/index.js +2 -2
  431. package/dist/esm/{datetime-picker-props-validation-BeTcUTnE.js → isValid-Bee0Uvqc.js} +2 -477
  432. package/dist/esm/loader.js +3 -3
  433. package/dist/esm/select.utils-BYsh2ZdE.js +57 -0
  434. package/dist/esm/{validator-D3tVP32U.js → validator-BkWWrDEr.js} +18 -1
  435. package/dist/esm/webcomponents.js +4 -4
  436. package/dist/hydrate/index.js +3314 -1806
  437. package/dist/hydrate/index.mjs +3314 -1806
  438. package/dist/types/components/button/button.d.ts +2 -1
  439. package/dist/types/components/collapse/collapse.d.ts +6 -2
  440. package/dist/types/components/datetime-picker/date-picker/date-picker-locale.d.ts +9 -9
  441. package/dist/types/components/datetime-picker/date-picker/date-picker-props-validation.d.ts +14 -13
  442. package/dist/types/components/datetime-picker/date-picker/date-picker.d.ts +264 -161
  443. package/dist/types/components/datetime-picker/datetime-input/datetime-input-constants.d.ts +14 -0
  444. package/dist/types/components/datetime-picker/datetime-input/datetime-input-props-validation.d.ts +19 -15
  445. package/dist/types/components/datetime-picker/datetime-input/datetime-input.d.ts +229 -98
  446. package/dist/types/components/datetime-picker/datetime-input/datetime-input.types.d.ts +36 -0
  447. package/dist/types/components/datetime-picker/datetime-picker-constants.d.ts +19 -5
  448. package/dist/types/components/datetime-picker/datetime-picker-form-associated.d.ts +32 -5
  449. package/dist/types/components/datetime-picker/datetime-picker-props-validation.d.ts +22 -24
  450. package/dist/types/components/datetime-picker/datetime-picker.d.ts +508 -235
  451. package/dist/types/components/datetime-picker/datetime-picker.types.d.ts +75 -21
  452. package/dist/types/components/datetime-picker/datetime-picker.utils.d.ts +53 -47
  453. package/dist/types/components/datetime-picker/time-picker/time-picker-constants.d.ts +3 -2
  454. package/dist/types/components/datetime-picker/time-picker/time-picker.d.ts +126 -55
  455. package/dist/types/components/dropdown/dropdown.d.ts +12 -4
  456. package/dist/types/components/header/header.d.ts +2 -0
  457. package/dist/types/components/icon/icon.utils.d.ts +6 -0
  458. package/dist/types/components/input/input.d.ts +18 -1
  459. package/dist/types/components/input/input.types.d.ts +4 -0
  460. package/dist/types/components/item/item.d.ts +6 -1
  461. package/dist/types/components/magic-button/magic-button.d.ts +7 -3
  462. package/dist/types/components/modal/modal.d.ts +6 -0
  463. package/dist/types/components/pagination/pagination.d.ts +2 -0
  464. package/dist/types/components/select/select-input/select-input.d.ts +9 -2
  465. package/dist/types/components/select/select-list/select-list.d.ts +14 -2
  466. package/dist/types/components/select/select-option/select-option.d.ts +1 -0
  467. package/dist/types/components/select/select.d.ts +47 -7
  468. package/dist/types/components/select/select.types.d.ts +12 -0
  469. package/dist/types/components/select/select.utils.d.ts +3 -0
  470. package/dist/types/components/sign-in/sign-in.d.ts +3 -2
  471. package/dist/types/components/tab/tab-item/tab-item.d.ts +6 -2
  472. package/dist/types/components/tab/tab.d.ts +7 -0
  473. package/dist/types/components.d.ts +405 -318
  474. package/dist/types/shared/utils/form.d.ts +8 -0
  475. package/dist/types/stencil-public-runtime.d.ts +61 -55
  476. package/dist/webcomponents/index.esm.js +1 -1
  477. package/dist/webcomponents/p-01801ac1.entry.js +5 -0
  478. package/dist/webcomponents/p-05b459f2.entry.js +5 -0
  479. package/dist/webcomponents/p-08ac6f09.entry.js +5 -0
  480. package/dist/webcomponents/{p-cff24492.entry.js → p-09817344.entry.js} +1 -1
  481. package/dist/webcomponents/p-09c79c1d.entry.js +5 -0
  482. package/dist/webcomponents/p-0fc112fc.entry.js +5 -0
  483. package/dist/webcomponents/p-13babfc4.entry.js +5 -0
  484. package/dist/webcomponents/p-15022ab7.entry.js +5 -0
  485. package/dist/webcomponents/p-172d42c2.entry.js +5 -0
  486. package/dist/webcomponents/p-18cf093a.entry.js +5 -0
  487. package/dist/webcomponents/p-198aa844.entry.js +5 -0
  488. package/dist/webcomponents/p-1ba60d13.entry.js +5 -0
  489. package/dist/webcomponents/p-1bb96641.entry.js +5 -0
  490. package/dist/webcomponents/{p-7acf20d3.entry.js → p-20477061.entry.js} +1 -1
  491. package/dist/webcomponents/p-21feda62.entry.js +5 -0
  492. package/dist/webcomponents/p-23a5cfd7.entry.js +5 -0
  493. package/dist/webcomponents/{p-030c02f8.entry.js → p-2c8595d3.entry.js} +1 -1
  494. package/dist/webcomponents/{p-09770c98.entry.js → p-31a4694a.entry.js} +1 -1
  495. package/dist/webcomponents/p-32ea6342.entry.js +5 -0
  496. package/dist/webcomponents/p-3658adcf.entry.js +5 -0
  497. package/dist/webcomponents/p-37914e63.entry.js +5 -0
  498. package/dist/webcomponents/p-3b0dd0ff.entry.js +5 -0
  499. package/dist/webcomponents/p-42b60169.entry.js +5 -0
  500. package/dist/webcomponents/p-42c9c6c5.entry.js +5 -0
  501. package/dist/{components/p-SvVnvJdC.js → webcomponents/p-473561f2.entry.js} +1 -1
  502. package/dist/webcomponents/p-47c490ef.entry.js +5 -0
  503. package/dist/webcomponents/p-4b01c60f.entry.js +5 -0
  504. package/dist/webcomponents/p-5a5ed7d8.entry.js +5 -0
  505. package/dist/webcomponents/{p-c8b7bbab.entry.js → p-5a7c2031.entry.js} +1 -1
  506. package/dist/webcomponents/p-609cf652.entry.js +5 -0
  507. package/dist/webcomponents/p-614683d9.entry.js +5 -0
  508. package/dist/webcomponents/p-67605757.entry.js +5 -0
  509. package/dist/{components/p-CppRJiyC.js → webcomponents/p-67774920.entry.js} +1 -1
  510. package/dist/webcomponents/p-67d62559.entry.js +5 -0
  511. package/dist/webcomponents/p-695dbeb0.entry.js +5 -0
  512. package/dist/webcomponents/{p-CfuJQ1DY.js → p-6Da1SZ3J.js} +1 -1
  513. package/dist/webcomponents/p-6a293be8.entry.js +5 -0
  514. package/dist/webcomponents/{p-03359c92.entry.js → p-6f1a4fbe.entry.js} +1 -1
  515. package/dist/webcomponents/p-7352d459.entry.js +5 -0
  516. package/dist/webcomponents/p-745213f7.entry.js +5 -0
  517. package/dist/webcomponents/p-794b701b.entry.js +5 -0
  518. package/dist/webcomponents/{p-d826c052.entry.js → p-7ee564a1.entry.js} +1 -1
  519. package/dist/webcomponents/{p-e20188c0.entry.js → p-7fda8b89.entry.js} +1 -1
  520. package/dist/webcomponents/p-8116ee93.entry.js +5 -0
  521. package/dist/webcomponents/p-821341dc.entry.js +5 -0
  522. package/dist/webcomponents/p-8aa6f07c.entry.js +5 -0
  523. package/dist/webcomponents/p-8ddf3ce3.entry.js +5 -0
  524. package/dist/webcomponents/p-95f3c44a.entry.js +5 -0
  525. package/dist/webcomponents/p-96dbb585.entry.js +5 -0
  526. package/dist/webcomponents/p-9815ab95.entry.js +5 -0
  527. package/dist/webcomponents/{p-327f034f.entry.js → p-9e0324a7.entry.js} +1 -1
  528. package/dist/webcomponents/p-B7bNfmgh.js +5 -0
  529. package/dist/webcomponents/p-BYsh2ZdE.js +5 -0
  530. package/dist/webcomponents/p-BkWWrDEr.js +5 -0
  531. package/dist/webcomponents/p-CJipT0in.js +5 -0
  532. package/dist/webcomponents/{p-Dcn7tRST.js → p-ConyRdJe.js} +1 -1
  533. package/dist/webcomponents/{p-BtRPYRvA.js → p-DDc4sADe.js} +1 -1
  534. package/dist/webcomponents/p-a038be16.entry.js +5 -0
  535. package/dist/webcomponents/p-a32d17cb.entry.js +5 -0
  536. package/dist/webcomponents/p-a46f068e.entry.js +5 -0
  537. package/dist/webcomponents/p-a89b684d.entry.js +5 -0
  538. package/dist/webcomponents/{p-abaf2365.entry.js → p-ac68355e.entry.js} +1 -1
  539. package/dist/webcomponents/{p-ed5af0e4.entry.js → p-af888d13.entry.js} +1 -1
  540. package/dist/webcomponents/p-b0124459.entry.js +5 -0
  541. package/dist/webcomponents/p-b063c12f.entry.js +5 -0
  542. package/dist/webcomponents/p-b07bfdc5.entry.js +5 -0
  543. package/dist/webcomponents/{p-f558d7b9.entry.js → p-b55425b7.entry.js} +1 -1
  544. package/dist/webcomponents/{p-a0931550.entry.js → p-b5d25332.entry.js} +1 -1
  545. package/dist/webcomponents/p-b609b464.entry.js +5 -0
  546. package/dist/webcomponents/p-b66ab52d.entry.js +5 -0
  547. package/dist/webcomponents/p-b8d4ace3.entry.js +5 -0
  548. package/dist/webcomponents/p-c717c745.entry.js +5 -0
  549. package/dist/webcomponents/p-ce3d689c.entry.js +5 -0
  550. package/dist/webcomponents/p-d08b6266.entry.js +5 -0
  551. package/dist/webcomponents/p-d6165aa0.entry.js +5 -0
  552. package/dist/webcomponents/{p-01fb0754.entry.js → p-dacb7e2c.entry.js} +1 -1
  553. package/dist/webcomponents/p-db309a11.entry.js +5 -0
  554. package/dist/webcomponents/{p-edc6da0e.entry.js → p-dc23cb2e.entry.js} +1 -1
  555. package/dist/webcomponents/p-e241caf3.entry.js +5 -0
  556. package/dist/webcomponents/p-e661c024.entry.js +5 -0
  557. package/dist/webcomponents/p-e7107869.entry.js +5 -0
  558. package/dist/webcomponents/p-eb94199d.entry.js +5 -0
  559. package/dist/webcomponents/p-f8993ae4.entry.js +5 -0
  560. package/dist/webcomponents/{p-670e8fec.entry.js → p-f99d8c9c.entry.js} +1 -1
  561. package/dist/webcomponents/{p-DV-iW9Aj.js → p-fOJu6uZR.js} +1 -1
  562. package/dist/webcomponents/{p-a212fd85.entry.js → p-fb76b1e0.entry.js} +1 -1
  563. package/dist/webcomponents/p-fdcb54a3.entry.js +5 -0
  564. package/dist/webcomponents/{p-e3de5bb3.entry.js → p-fed02286.entry.js} +1 -1
  565. package/dist/webcomponents/p-zlORkiHQ.js +5 -0
  566. package/dist/webcomponents/webcomponents.esm.js +1 -1
  567. package/package.json +2 -2
  568. package/dist/components/p-B0o70fWP.js +0 -5
  569. package/dist/components/p-B96LROz9.js +0 -5
  570. package/dist/components/p-BDqef5-y.js +0 -5
  571. package/dist/components/p-BP5zMCxG.js +0 -5
  572. package/dist/components/p-BRaphxoP.js +0 -5
  573. package/dist/components/p-BUzBa9L1.js +0 -5
  574. package/dist/components/p-BblZlUp2.js +0 -5
  575. package/dist/components/p-Bc4nAk5i.js +0 -5
  576. package/dist/components/p-Bezou5CQ.js +0 -5
  577. package/dist/components/p-BrNh9KdF.js +0 -5
  578. package/dist/components/p-C5th2dxu.js +0 -5
  579. package/dist/components/p-CEdUp183.js +0 -5
  580. package/dist/components/p-CF7t0uxQ.js +0 -5
  581. package/dist/components/p-CFzHx6zV.js +0 -5
  582. package/dist/components/p-CG4em0S6.js +0 -5
  583. package/dist/components/p-CI4D3-pf.js +0 -5
  584. package/dist/components/p-CIrVPkVg.js +0 -5
  585. package/dist/components/p-CdDwqbBv.js +0 -5
  586. package/dist/components/p-Cvk1Ggs5.js +0 -5
  587. package/dist/components/p-D12US39c.js +0 -5
  588. package/dist/components/p-DGPJkJsj.js +0 -5
  589. package/dist/components/p-DX1wAFn4.js +0 -5
  590. package/dist/components/p-DpRZ4B0d.js +0 -5
  591. package/dist/components/p-G35qEQZd.js +0 -5
  592. package/dist/components/p-Ho_IybzR.js +0 -5
  593. package/dist/components/p-emAWunES.js +0 -5
  594. package/dist/components/p-fB79wKCm.js +0 -5
  595. package/dist/components/p-k7p4QJ8a.js +0 -5
  596. package/dist/webcomponents/p-01baafce.entry.js +0 -5
  597. package/dist/webcomponents/p-0b9714f1.entry.js +0 -5
  598. package/dist/webcomponents/p-12aa36a8.entry.js +0 -5
  599. package/dist/webcomponents/p-130b6e06.entry.js +0 -5
  600. package/dist/webcomponents/p-144f8c8d.entry.js +0 -5
  601. package/dist/webcomponents/p-14fe22e2.entry.js +0 -5
  602. package/dist/webcomponents/p-1ff9210a.entry.js +0 -5
  603. package/dist/webcomponents/p-2605cdc3.entry.js +0 -5
  604. package/dist/webcomponents/p-27afaec9.entry.js +0 -5
  605. package/dist/webcomponents/p-2a50e42d.entry.js +0 -5
  606. package/dist/webcomponents/p-342650b8.entry.js +0 -5
  607. package/dist/webcomponents/p-38f6a78b.entry.js +0 -5
  608. package/dist/webcomponents/p-3920fe3a.entry.js +0 -5
  609. package/dist/webcomponents/p-3ae97345.entry.js +0 -5
  610. package/dist/webcomponents/p-3cce767c.entry.js +0 -5
  611. package/dist/webcomponents/p-3df6c5d2.entry.js +0 -5
  612. package/dist/webcomponents/p-3e287899.entry.js +0 -5
  613. package/dist/webcomponents/p-3e5580ba.entry.js +0 -5
  614. package/dist/webcomponents/p-403637dd.entry.js +0 -5
  615. package/dist/webcomponents/p-435c8ef2.entry.js +0 -5
  616. package/dist/webcomponents/p-59da5b55.entry.js +0 -5
  617. package/dist/webcomponents/p-5dd4314c.entry.js +0 -5
  618. package/dist/webcomponents/p-646af6a5.entry.js +0 -5
  619. package/dist/webcomponents/p-68046544.entry.js +0 -5
  620. package/dist/webcomponents/p-68ec76b8.entry.js +0 -5
  621. package/dist/webcomponents/p-6c0ea20c.entry.js +0 -5
  622. package/dist/webcomponents/p-707df9b9.entry.js +0 -5
  623. package/dist/webcomponents/p-72b839fe.entry.js +0 -5
  624. package/dist/webcomponents/p-73dcc05b.entry.js +0 -5
  625. package/dist/webcomponents/p-7b01bddb.entry.js +0 -5
  626. package/dist/webcomponents/p-7cd38850.entry.js +0 -5
  627. package/dist/webcomponents/p-82454383.entry.js +0 -5
  628. package/dist/webcomponents/p-91e959a8.entry.js +0 -5
  629. package/dist/webcomponents/p-964c01e6.entry.js +0 -5
  630. package/dist/webcomponents/p-9858e42a.entry.js +0 -5
  631. package/dist/webcomponents/p-9c4200b0.entry.js +0 -5
  632. package/dist/webcomponents/p-9d9c87b1.entry.js +0 -5
  633. package/dist/webcomponents/p-B0PbhaxL.js +0 -5
  634. package/dist/webcomponents/p-D3tVP32U.js +0 -5
  635. package/dist/webcomponents/p-a2e75143.entry.js +0 -5
  636. package/dist/webcomponents/p-a3bb98c9.entry.js +0 -5
  637. package/dist/webcomponents/p-a8b5dba0.entry.js +0 -5
  638. package/dist/webcomponents/p-aa909443.entry.js +0 -5
  639. package/dist/webcomponents/p-aeb16645.entry.js +0 -5
  640. package/dist/webcomponents/p-b287c384.entry.js +0 -5
  641. package/dist/webcomponents/p-b506b0a1.entry.js +0 -5
  642. package/dist/webcomponents/p-b520c08c.entry.js +0 -5
  643. package/dist/webcomponents/p-b94c3f84.entry.js +0 -5
  644. package/dist/webcomponents/p-bda62f90.entry.js +0 -5
  645. package/dist/webcomponents/p-c201ae16.entry.js +0 -5
  646. package/dist/webcomponents/p-c7e899a1.entry.js +0 -5
  647. package/dist/webcomponents/p-cbf3e251.entry.js +0 -5
  648. package/dist/webcomponents/p-d35cf5b4.entry.js +0 -5
  649. package/dist/webcomponents/p-d45ffe9c.entry.js +0 -5
  650. package/dist/webcomponents/p-d719a4af.entry.js +0 -5
  651. package/dist/webcomponents/p-da21a60d.entry.js +0 -5
  652. package/dist/webcomponents/p-de0c7f26.entry.js +0 -5
  653. package/dist/webcomponents/p-e27882e1.entry.js +0 -5
  654. package/dist/webcomponents/p-e624ff04.entry.js +0 -5
  655. package/dist/webcomponents/p-f24fcf3d.entry.js +0 -5
  656. package/dist/webcomponents/p-f52ef0dc.entry.js +0 -5
  657. package/dist/webcomponents/p-fcab1428.entry.js +0 -5
  658. package/dist/webcomponents/p-fe1729a7.entry.js +0 -5
@@ -2,13 +2,12 @@
2
2
  * Construído por SERPRO
3
3
  * © https://serpro.gov.br/ - MIT License.
4
4
  */
5
- import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-Dcn7tRST.js';
6
- import { r as resolveDateFnsLocale, s as startOfWeekExports, a as addDaysExports, g as getWeekdayLabels, b as getMonthLabels } from './index-BQPOWxe5.js';
7
- import { b as requireToDate, c as requireConstructFrom, d as requireDefaultOptions, e as requireNormalizeDates, a as DATETIME_PICKER_LOCALE, N as NAVIGATION_ACTION, f as formatExports, g as requireAddLeadingZeros, D as DATETIME_PICKER_MODE, h as requireConstants } from './datetime-picker-constants-BtRPYRvA.js';
8
- import { s as setExports, p as parseExports, b as isValidDatetimePickerDateRange, t as toDateExports, e as normalizeDatetimePickerDisabledDates, c as resolveSsrLocalDate, h as isSameDayExports, g as eachDayOfIntervalExports, i as isValidExports } from './datetime-picker-props-validation-BeTcUTnE.js';
9
- import { d as dispatchNativeFormEvent } from './event-CfuJQ1DY.js';
10
- import { w as warnInvalidPropValue, r as reportInvalidPropValue } from './prop-warning-BlGV-x0w.js';
11
- import { r as resolveAllowedPropValue } from './props-D07GjR4_.js';
5
+ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-ConyRdJe.js';
6
+ import { r as resolveDateFnsLocale, s as startOfWeekExports, a as addDaysExports, g as getWeekdayLabels, b as getMonthLabels } from './index-CytVKoHT.js';
7
+ import { b as requireToDate, a as requireConstructFrom, g as requireDefaultOptions, h as requireNormalizeDates, i as requireStartOfDay, d as DATETIME_PICKER_LOCALE, N as NAVIGATION_ACTION, f as formatExports, j as requireAddLeadingZeros, D as DATETIME_PICKER_MODE, e as DATETIME_RANGE_ORDER_MESSAGE, c as requireConstants } from './datetime-picker-constants-DDc4sADe.js';
8
+ import { s as setExports, p as parseExports, t as toDateExports, a as resolveSsrLocalDate, b as isSameDayExports, e as eachDayOfIntervalExports, i as isValidExports } from './isValid-Bee0Uvqc.js';
9
+ import { d as dispatchNativeFormEvent } from './event-6Da1SZ3J.js';
10
+ import { w as warnInvalidPropValue } from './prop-warning-BlGV-x0w.js';
12
11
 
13
12
  var addMonths = {};
14
13
 
@@ -393,6 +392,8 @@ function requireIsSameMonth () {
393
392
 
394
393
  var isSameMonthExports = /*@__PURE__*/ requireIsSameMonth();
395
394
 
395
+ var startOfDayExports = /*@__PURE__*/ requireStartOfDay();
396
+
396
397
  var startOfMonth = {};
397
398
 
398
399
  var hasRequiredStartOfMonth;
@@ -487,19 +488,20 @@ var subMonthsExports = /*@__PURE__*/ requireSubMonths();
487
488
 
488
489
  const VALID_WEEK_START_DAYS = [0, 1, 2, 3, 4, 5, 6];
489
490
  /**
490
- * Verifica se o valor informado representa um índice válido de início da semana.
491
+ * Verifica se um valor representa um índice válido para o primeiro dia da semana (0-6).
491
492
  *
492
- * @param value - Valor bruto recebido via prop.
493
- * @returns `true` quando o valor está entre `0` e `6`.
493
+ * @param {number} value Valor a validar (possivelmente vindo de uma `@Prop`).
494
+ * @returns {value is WeekDayIndex} `true` quando `value` é um `WeekDayIndex` válido (0..6).
494
495
  */
495
496
  function isValidWeekStartsOn(value) {
496
497
  return VALID_WEEK_START_DAYS.includes(value);
497
498
  }
498
499
  /**
499
- * Normaliza o índice de início da semana e aplica `0` quando o valor é inválido.
500
+ * Normaliza o índice de início da semana.
501
+ * Quando o valor é inválido, emite um aviso e retorna o fallback `0`.
500
502
  *
501
- * @param value - Valor bruto recebido via prop.
502
- * @returns Índice normalizado para o primeiro dia da semana.
503
+ * @param {number} value Valor informado pelo consumidor.
504
+ * @returns {WeekDayIndex} Índice normalizado (`WeekDayIndex`).
503
505
  */
504
506
  function normalizeWeekStartsOn(value) {
505
507
  if (isValidWeekStartsOn(value))
@@ -508,11 +510,10 @@ function normalizeWeekStartsOn(value) {
508
510
  return 0;
509
511
  }
510
512
  /**
511
- * Valida se o código de locale pode ser resolvido pelo date-fns.
512
- * Retorna true se a resolução for bem-sucedida (inclui fallback).
513
+ * Verifica se um código de `locale` pode ser resolvido pelo date-fns.
513
514
  *
514
- * @param value - Código de locale informado pelo consumidor.
515
- * @returns `true` quando o locale pode ser resolvido com sucesso.
515
+ * @param {string} value Código de locale (ex.: "pt-BR").
516
+ * @returns {boolean} `true` se a resolução for bem-sucedida; `false` caso contrário.
516
517
  */
517
518
  function isValidLocaleCode(value) {
518
519
  try {
@@ -524,10 +525,11 @@ function isValidLocaleCode(value) {
524
525
  }
525
526
  }
526
527
  /**
527
- * Normaliza o locale informado e aplica o default do componente quando necessário.
528
+ * Normaliza o código de `locale` informado pelo consumidor.
529
+ * Se inválido, emite aviso e retorna o `DATETIME_PICKER_LOCALE.DEFAULT`.
528
530
  *
529
- * @param value - Código de locale informado pelo consumidor.
530
- * @returns Locale válido para o date picker.
531
+ * @param {string} value Código de locale informado pelo consumidor.
532
+ * @returns {string} Código de locale validado (ou o default do componente).
531
533
  */
532
534
  function normalizeLocale(value) {
533
535
  if (isValidLocaleCode(value))
@@ -536,79 +538,79 @@ function normalizeLocale(value) {
536
538
  return DATETIME_PICKER_LOCALE.DEFAULT;
537
539
  }
538
540
 
539
- const datePickerCss = () => `*,*::before,*::after{box-sizing:border-box}:host{line-height:var(--font-line-height-medium);-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%}main{display:block}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace;font-size:1em}a{background-color:rgba(0,0,0,0)}b,strong{font-weight:bolder}code{font-family:monospace;font-size:1em}small{font-size:80%}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:var(--font-line-height-medium);margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{appearance:none}::-webkit-file-upload-button{appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}.d-none{display:none !important}@media (min-width: 576px){.d-sm-block{display:block !important}.d-sm-flex{display:flex !important}}[data-toggle=dropdown]+*{position:absolute}.dropdown{position:relative}.dropdown [data-toggle=dropdown]+*{box-shadow:var(--surface-shadow-sm);left:0;position:absolute;top:100%}.dropdown>.br-notification{left:auto;right:0}.dropdown .br-item{--color:var(--color-light);--color-rgb:var(--color-light-rgb);--text-color:var(--color-light);--interactive:var(--interactive-light);--interactive-rgb:var(--color-rgb);--visited:var(--visited-light);--hover:var(--hover-light);--pressed:var(--pressed-light);--focus-color:var(--focus-color-light);--focus:var(--focus-color-light);--item-padding-y:var(--spacing-scale-2x);background-color:var(--background-light);color:var(--color)}.dropdown .br-item:not(:last-child){border-bottom:1px solid var(--border-color)}.dropdown .br-item.selected{--color:var(--color-dark);--color-rgb:var(--color-dark-rgb);--text-color:var(--color-dark);--interactive:var(--interactive-dark);--interactive-rgb:var(--interactive-dark-rgb);--visited:var(--visited-dark);--hover:var(--hover-dark);--pressed:var(--pressed-dark);--focus-color:var(--focus-color-dark);--focus:var(--focus-color-dark)}.justify-content-start{justify-content:flex-start !important}.justify-content-end{justify-content:flex-end !important}.justify-content-center{justify-content:center !important}.align-items-center{align-items:center !important}.col,[class*=col-]{padding-left:calc(var(--grid-gutter)*.5);padding-right:calc(var(--grid-gutter)*.5);width:100%}.col{flex:1 0 0%;min-width:8.3333333333%}.col-auto{flex:0 0 auto;width:auto}.col-2{flex-basis:16.6666666667%;max-width:16.6666666667%}.container,.container-fluid,.container-lg{--grid-margin:var(--grid-portrait-margin);--grid-maxwidth:var(--grid-portrait-maxwidth);margin-left:auto;margin-right:auto;max-width:var(--grid-maxwidth);padding-left:var(--grid-margin);padding-right:var(--grid-margin);width:100%}.row{--grid-gutter:var(--grid-portrait-gutter);display:flex;flex-wrap:wrap;margin-left:calc(var(--grid-gutter)*-0.5);margin-right:calc(var(--grid-gutter)*-0.5)}@media (min-width: 576px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-tablet-margin)}.row{--grid-gutter:var(--grid-tablet-gutter)}.container{--grid-maxwidth:calc(var(--grid-breakpoint-sm) - var(--grid-tablet-margin))}.col-sm-4{flex-basis:33.3333333333%;max-width:33.3333333333%}}@media (min-width: 992px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-tablet-margin)}.row{--grid-gutter:var(--grid-tablet-gutter)}.container{--grid-maxwidth:calc(var(--grid-breakpoint-md) - var(--grid-tablet-margin))}}@media (min-width: 1280px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-desktop-margin)}.row{--grid-gutter:var(--grid-desktop-gutter)}.container,.container-lg{--grid-maxwidth:calc(var(--grid-breakpoint-lg) - var(--grid-desktop-margin))}.col-lg-3{flex-basis:25%;max-width:25%}}@media (min-width: 1600px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-tv-margin)}.row{--grid-gutter:var(--grid-tv-gutter)}.container,.container-lg{--grid-maxwidth:calc(var(--grid-breakpoint-xl) - var(--grid-tv-margin))}}.ease{animation-timing-function:cubic-bezier(0.25, 0.1, 0.25, 1)}.ease-out{animation-timing-function:cubic-bezier(0, 0, 0.58, 1)}.ease-in-out{animation-timing-function:cubic-bezier(0.42, 0, 0.58, 1)}.fast{animation-duration:var(--duration-fast)}.slow{animation-duration:var(--duration-slow)}.mt-1{margin-top:var(--spacing-scale-half) !important}.mr-1{margin-right:var(--spacing-scale-half) !important}.mb-1{margin-bottom:var(--spacing-scale-half) !important}.ml-1{margin-left:var(--spacing-scale-half) !important}.mx-3{margin-left:var(--spacing-scale-2x) !important;margin-right:var(--spacing-scale-2x) !important}.mb-4{margin-bottom:var(--spacing-scale-3x) !important}.ml-auto{margin-left:auto !important}.pt-half{padding-top:var(--spacing-scale-half) !important}@media (min-width: 576px){.ml-sm-0{margin-left:var(--spacing-scale-default) !important}}.highlight{background:var(--status-highlight-background) linear-gradient(var(--status-highlight-overlay), var(--status-highlight-overlay));color:var(--status-highlight-text);padding:0 var(--spacing-scale-half)}[disabled],.disabled{cursor:not-allowed;opacity:var(--disabled)}[disabled] *,.disabled *{pointer-events:none}fieldset[disabled]{opacity:1}.text-center{text-align:center !important}.text-right{text-align:right !important}.text-nowrap{white-space:nowrap !important}.text-uppercase{text-transform:uppercase !important}.text-bold{font-weight:700 !important}.text-base{font-size:var(--font-size-scale-base) !important}.text-down-01{font-size:var(--font-size-scale-down-01) !important}@media (min-width: 576px){.text-sm-center{text-align:center !important}.text-sm-left{text-align:left !important}.text-sm-right{text-align:right !important}}p{color:var(--color);font-size:var(--font-size-scale-base);font-weight:var(--font-weight-regular);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-2x);margin-top:0}p a{text-decoration:underline}@media (min-width: 576px){p{font-size:var(--font-size-scale-up-01)}}a{--focus-offset:var(--spacing-scale-half)}a:focus{outline:none}a.focus-visible,a:focus-visible{outline-color:var(--focus);outline-offset:var(--focus-offset);outline-style:var(--focus-style);outline-width:var(--focus-width)}a:not(:disabled):hover{background-image:linear-gradient(rgba(var(--interactive-rgb), var(--hover)), rgba(var(--interactive-rgb), var(--hover)))}a:not(:disabled):active{background-image:linear-gradient(rgba(var(--interactive-rgb), var(--pressed)), rgba(var(--interactive-rgb), var(--pressed)))}a{color:var(--interactive);text-decoration:none}.main-content a{text-decoration:underline}button{cursor:pointer}img{max-width:100%;vertical-align:middle}h2,.h2{color:var(--color);font-size:var(--font-size-scale-up-03);font-weight:var(--font-weight-semi-bold);line-height:var(--font-line-height-low);margin-bottom:var(--spacing-scale-2xh);margin-top:var(--spacing-scale-3xh);padding-bottom:var(--spacing-scale-2xh)}@media (min-width: 576px){.h2,h2{font-size:var(--font-size-scale-up-05);font-weight:var(--font-weight-regular)}}ul,ol{margin-bottom:var(--spacing-scale-2x);margin-top:0;padding:0 0 0 var(--spacing-scale-5x)}table{--table-background:var(--background);--table-color:var(--color);--table-border-color:var(--gray-20);--table-border-style:solid;--table-border-width:1px;--table-hover:var(--color-rgb);--table-padding:var(--spacing-scale-3x);--table-font-weight:var(--font-weight-medium);--table-th-background:var(--background-alternative);--table-th-font-weight:var(--font-weight-semi-bold);--table-row-size:var(--spacing-scale-2x);border-collapse:collapse;width:100%}tr.selected,tr.is-selected{--color:var(--color-dark);--color-rgb:var(--color-dark-rgb);--text-color:var(--color-dark);--interactive:var(--interactive-dark);--interactive-rgb:var(--interactive-dark-rgb);--visited:var(--visited-dark);--hover:var(--hover-dark);--pressed:var(--pressed-dark);--focus-color:var(--focus-color-dark);--focus:var(--focus-color-dark)}label,.label{color:var(--color);font-size:var(--font-size-scale-base);font-weight:var(--font-weight-semi-bold);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-half)}fieldset,.fieldset{border:var(--surface-width-none);margin-bottom:var(--spacing-scale-5x);margin-top:0;padding:0}legend,.legend{color:var(--color);font-size:var(--font-size-scale-up-01);font-weight:var(--font-weight-semi-bold);line-height:var(--font-line-height-low);margin-bottom:var(--spacing-scale-2x);margin-top:var(--spacing-scale-2x)}::placeholder,.placeholder{color:var(--color-light);font-size:var(--font-size-scale-base);font-style:italic;font-weight:var(--font-weight-regular);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-half);margin-top:var(--spacing-scale-half);opacity:1}input,textarea,.input{color:var(--color-light);font-size:var(--font-size-scale-up-01);font-weight:var(--font-weight-medium);line-height:var(--font-line-height-low);margin-bottom:var(--spacing-scale-half)}code,.code{background:var(--gray-5);border-radius:4px;color:var(--gray-80);display:inline-block;font-family:monospace;font-size:var(--font-size-scale-base);font-weight:var(--font-weight-medium);line-height:var(--font-line-height-low);padding:var(--spacing-scale-half)}pre,.pre{background:var(--gray-5);margin:var(--spacing-scale-2x) 0 var(--spacing-scale-4x);padding:var(--spacing-scale-2x)}pre code,.pre code{display:inline;padding:0}*[data-toggle=collapse]:not(:disabled):hover{background-image:linear-gradient(rgba(var(--interactive-rgb), var(--hover)), rgba(var(--interactive-rgb), var(--hover)))}*[data-toggle=collapse]:focus{outline:none}*[data-toggle=collapse].focus-visible,*[data-toggle=collapse]:focus-visible{outline-color:var(--focus);outline-offset:var(--focus-offset);outline-style:var(--focus-style);outline-width:var(--focus-width)}@media (prefers-reduced-motion: reduce){:host,:host::before,:host::after,:host *,:host *::before,:host *::after{animation:none !important;scroll-behavior:auto !important;transition:none !important}}:host-context([data-wbc-reduced-motion=true])::before,:host-context([data-wbc-reduced-motion=true])::after,:host-context([data-wbc-reduced-motion=true]) *,:host-context([data-wbc-reduced-motion=true]) *::before,:host-context([data-wbc-reduced-motion=true]) *::after{animation:none !important;scroll-behavior:auto !important;transition:none !important}:host{display:block;width:100%;max-width:304px;height:auto;box-sizing:border-box}.header{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--spacing-scale-base);width:100%;box-sizing:border-box}select{appearance:none;border:none;background:rgba(0,0,0,0);padding-right:20px;font-size:var(--font-size-scale-up-01);font-weight:var(--font-weight-semi-bold);color:var(--blue-warm-vivid-70);outline:none;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'><path fill='%231351b4' d='M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L224 285.229l154.706-154.705c9.373-9.373 24.569-9.373 33.941 0l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.373-24.569 9.373-33.942 0z'/></svg>");background-repeat:no-repeat;background-position:right .35rem center;background-size:10px}select option{color:var(--color)}select:focus{outline:none}select:focus-visible{outline:var(--focus) var(--focus-style) var(--focus-width);outline-offset:var(--focus-offset)}select:hover{cursor:pointer}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;white-space:nowrap;border:0}input[type=number]{width:70px;padding:4px;font-size:var(--font-size-scale-up-01);font-weight:var(--font-weight-semi-bold);background-color:var(--gray-0);color:var(--gray-80);text-align:center;border-color:var(--border-color-alternative);border-radius:var(--surface-rounder-sm);border-style:var(--border-style);border-width:var(--border-width)}input[type=number]:hover{background:linear-gradient(rgb(var(--color-rgb), var(--hover)), rgb(var(--color-rgb), var(--hover)))}.weekdays{margin-bottom:var(--spacing-scale-half)}.weekdays,.monthdays{display:grid;grid-template-columns:repeat(7, 1fr);place-items:center center;text-align:center;gap:var(--spacing-scale-half) var(--spacing-scale-half);width:100%;box-sizing:border-box}.weekday{display:flex;align-items:center;justify-content:center;font-weight:var(--font-weight-medium);color:var(--gray-70);width:var(--spacing-scale-4x)}.week{display:contents}.day{display:flex;align-items:center;justify-content:center;justify-self:center;padding:var(--spacing-scale-half);font-weight:var(--font-weight-semi-bold);color:var(--blue-warm-vivid-70);border-radius:50%;width:var(--spacing-scale-4x);height:var(--spacing-scale-4x)}.day:hover{background:var(--hover-effect);cursor:pointer}.day:focus-visible{outline:var(--focus) var(--focus-style) var(--focus-width);outline-offset:var(--focus-offset)}.day.selected{background:var(--blue-warm-vivid-70);color:var(--color-secondary-01);font-weight:var(--font-weight-bold)}.day.in-range{background:var(--blue-warm-vivid-10);color:var(--blue-warm-vivid-70);border-radius:0;place-self:stretch stretch;width:100%;height:100%;overflow:hidden}.day.range-start{background:var(--blue-warm-vivid-70);color:var(--color-secondary-01);font-weight:var(--font-weight-bold);width:100%;height:100%;border-radius:var(--surface-rounder-pill) 0 0 var(--surface-rounder-pill);place-self:stretch stretch;overflow:hidden}.day.range-end{background:var(--blue-warm-vivid-70);color:var(--color-secondary-01);font-weight:var(--font-weight-bold);width:100%;height:100%;border-radius:0 var(--surface-rounder-pill) var(--surface-rounder-pill) 0;place-self:stretch stretch;overflow:hidden}.day.range-start.range-end{border-radius:var(--surface-rounder-pill);height:100%;overflow:hidden}.day.disabled{opacity:.45;cursor:not-allowed;pointer-events:none}.outside-month{font-weight:var(--font-weight-regular);color:var(--gray-70)}.today{background:var(--orange-vivid-5);color:var(--gray-80)}`;
541
+ const datePickerCss = () => `*,*::before,*::after{box-sizing:border-box}:host{line-height:var(--font-line-height-medium);-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%}main{display:block}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace;font-size:1em}a{background-color:rgba(0,0,0,0)}b,strong{font-weight:bolder}small{font-size:80%}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:var(--font-line-height-medium);margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{appearance:none}::-webkit-file-upload-button{appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}.d-none{display:none !important}@media (min-width: 576px){.d-sm-block{display:block !important}.d-sm-flex{display:flex !important}}[data-toggle=dropdown]+*{position:absolute}.dropdown{position:relative}.dropdown [data-toggle=dropdown]+*{box-shadow:var(--surface-shadow-sm);left:0;position:absolute;top:100%}.dropdown>.br-notification{left:auto;right:0}.dropdown .br-item{--color:var(--color-light);--color-rgb:var(--color-light-rgb);--text-color:var(--color-light);--interactive:var(--interactive-light);--interactive-rgb:var(--color-rgb);--visited:var(--visited-light);--hover:var(--hover-light);--pressed:var(--pressed-light);--focus-color:var(--focus-color-light);--focus:var(--focus-color-light);--item-padding-y:var(--spacing-scale-2x);background-color:var(--background-light);color:var(--color)}.dropdown .br-item:not(:last-child){border-bottom:1px solid var(--border-color)}.dropdown .br-item.selected{--color:var(--color-dark);--color-rgb:var(--color-dark-rgb);--text-color:var(--color-dark);--interactive:var(--interactive-dark);--interactive-rgb:var(--interactive-dark-rgb);--visited:var(--visited-dark);--hover:var(--hover-dark);--pressed:var(--pressed-dark);--focus-color:var(--focus-color-dark);--focus:var(--focus-color-dark)}.justify-content-start{justify-content:flex-start !important}.justify-content-end{justify-content:flex-end !important}.justify-content-center{justify-content:center !important}.align-items-center{align-items:center !important}.col,[class*=col-]{padding-left:calc(var(--grid-gutter)*.5);padding-right:calc(var(--grid-gutter)*.5);width:100%}.col{flex:1 0 0%;min-width:8.3333333333%}.col-auto{flex:0 0 auto;width:auto}.col-2{flex-basis:16.6666666667%;max-width:16.6666666667%}.container,.container-fluid,.container-lg{--grid-margin:var(--grid-portrait-margin);--grid-maxwidth:var(--grid-portrait-maxwidth);margin-left:auto;margin-right:auto;max-width:var(--grid-maxwidth);padding-left:var(--grid-margin);padding-right:var(--grid-margin);width:100%}.row{--grid-gutter:var(--grid-portrait-gutter);display:flex;flex-wrap:wrap;margin-left:calc(var(--grid-gutter)*-0.5);margin-right:calc(var(--grid-gutter)*-0.5)}@media (min-width: 576px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-tablet-margin)}.row{--grid-gutter:var(--grid-tablet-gutter)}.container{--grid-maxwidth:calc(var(--grid-breakpoint-sm) - var(--grid-tablet-margin))}.col-sm-4{flex-basis:33.3333333333%;max-width:33.3333333333%}}@media (min-width: 992px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-tablet-margin)}.row{--grid-gutter:var(--grid-tablet-gutter)}.container{--grid-maxwidth:calc(var(--grid-breakpoint-md) - var(--grid-tablet-margin))}}@media (min-width: 1280px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-desktop-margin)}.row{--grid-gutter:var(--grid-desktop-gutter)}.container,.container-lg{--grid-maxwidth:calc(var(--grid-breakpoint-lg) - var(--grid-desktop-margin))}.col-lg-3{flex-basis:25%;max-width:25%}}@media (min-width: 1600px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-tv-margin)}.row{--grid-gutter:var(--grid-tv-gutter)}.container,.container-lg{--grid-maxwidth:calc(var(--grid-breakpoint-xl) - var(--grid-tv-margin))}}.ease{animation-timing-function:cubic-bezier(0.25, 0.1, 0.25, 1)}.ease-out{animation-timing-function:cubic-bezier(0, 0, 0.58, 1)}.ease-in-out{animation-timing-function:cubic-bezier(0.42, 0, 0.58, 1)}.fast{animation-duration:var(--duration-fast)}.slow{animation-duration:var(--duration-slow)}.mt-1{margin-top:var(--spacing-scale-half) !important}.mr-1{margin-right:var(--spacing-scale-half) !important}.mb-1{margin-bottom:var(--spacing-scale-half) !important}.ml-1{margin-left:var(--spacing-scale-half) !important}.mx-3{margin-left:var(--spacing-scale-2x) !important;margin-right:var(--spacing-scale-2x) !important}.mb-4{margin-bottom:var(--spacing-scale-3x) !important}.ml-auto{margin-left:auto !important}.pt-half{padding-top:var(--spacing-scale-half) !important}@media (min-width: 576px){.ml-sm-0{margin-left:var(--spacing-scale-default) !important}}.highlight{background:var(--status-highlight-background) linear-gradient(var(--status-highlight-overlay), var(--status-highlight-overlay));color:var(--status-highlight-text);padding:0 var(--spacing-scale-half)}[disabled],.disabled{cursor:not-allowed;opacity:var(--disabled)}[disabled] *,.disabled *{pointer-events:none}fieldset[disabled]{opacity:1}.text-center{text-align:center !important}.text-right{text-align:right !important}.text-nowrap{white-space:nowrap !important}.text-uppercase{text-transform:uppercase !important}.text-bold{font-weight:700 !important}.text-base{font-size:var(--font-size-scale-base) !important}.text-down-01{font-size:var(--font-size-scale-down-01) !important}@media (min-width: 576px){.text-sm-center{text-align:center !important}.text-sm-left{text-align:left !important}.text-sm-right{text-align:right !important}}p{color:var(--color);font-size:var(--font-size-scale-base);font-weight:var(--font-weight-regular);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-2x);margin-top:0}p a{text-decoration:underline}@media (min-width: 576px){p{font-size:var(--font-size-scale-up-01)}}a{--focus-offset:var(--spacing-scale-half)}a:focus{outline:none}a.focus-visible,a:focus-visible{outline-color:var(--focus);outline-offset:var(--focus-offset);outline-style:var(--focus-style);outline-width:var(--focus-width)}a:not(:disabled):hover{background-image:linear-gradient(rgba(var(--interactive-rgb), var(--hover)), rgba(var(--interactive-rgb), var(--hover)))}a:not(:disabled):active{background-image:linear-gradient(rgba(var(--interactive-rgb), var(--pressed)), rgba(var(--interactive-rgb), var(--pressed)))}a{color:var(--interactive);text-decoration:none}.main-content a{text-decoration:underline}button{cursor:pointer}img{max-width:100%;vertical-align:middle}h2,.h2{color:var(--color);font-size:var(--font-size-scale-up-03);font-weight:var(--font-weight-semi-bold);line-height:var(--font-line-height-low);margin-bottom:var(--spacing-scale-2xh);margin-top:var(--spacing-scale-3xh);padding-bottom:var(--spacing-scale-2xh)}@media (min-width: 576px){.h2,h2{font-size:var(--font-size-scale-up-05);font-weight:var(--font-weight-regular)}}ul,ol{margin-bottom:var(--spacing-scale-2x);margin-top:0;padding:0 0 0 var(--spacing-scale-5x)}table{--table-background:var(--background);--table-color:var(--color);--table-border-color:var(--gray-20);--table-border-style:solid;--table-border-width:1px;--table-hover:var(--color-rgb);--table-padding:var(--spacing-scale-3x);--table-font-weight:var(--font-weight-medium);--table-th-background:var(--background-alternative);--table-th-font-weight:var(--font-weight-semi-bold);--table-row-size:var(--spacing-scale-2x);border-collapse:collapse;width:100%}tr.selected,tr.is-selected{--color:var(--color-dark);--color-rgb:var(--color-dark-rgb);--text-color:var(--color-dark);--interactive:var(--interactive-dark);--interactive-rgb:var(--interactive-dark-rgb);--visited:var(--visited-dark);--hover:var(--hover-dark);--pressed:var(--pressed-dark);--focus-color:var(--focus-color-dark);--focus:var(--focus-color-dark)}label,.label{color:var(--color);font-size:var(--font-size-scale-base);font-weight:var(--font-weight-semi-bold);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-half)}fieldset,.fieldset{border:var(--surface-width-none);margin-bottom:var(--spacing-scale-5x);margin-top:0;padding:0}legend,.legend{color:var(--color);font-size:var(--font-size-scale-up-01);font-weight:var(--font-weight-semi-bold);line-height:var(--font-line-height-low);margin-bottom:var(--spacing-scale-2x);margin-top:var(--spacing-scale-2x)}::placeholder,.placeholder{color:var(--color-light);font-size:var(--font-size-scale-base);font-style:italic;font-weight:var(--font-weight-regular);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-half);margin-top:var(--spacing-scale-half);opacity:1}input,textarea,.input{color:var(--color-light);font-size:var(--font-size-scale-up-01);font-weight:var(--font-weight-medium);line-height:var(--font-line-height-low);margin-bottom:var(--spacing-scale-half)}pre,.pre{background:var(--gray-5);margin:var(--spacing-scale-2x) 0 var(--spacing-scale-4x);padding:var(--spacing-scale-2x)}*[data-toggle=collapse]:not(:disabled):hover{background-image:linear-gradient(rgba(var(--interactive-rgb), var(--hover)), rgba(var(--interactive-rgb), var(--hover)))}*[data-toggle=collapse]:focus{outline:none}*[data-toggle=collapse].focus-visible,*[data-toggle=collapse]:focus-visible{outline-color:var(--focus);outline-offset:var(--focus-offset);outline-style:var(--focus-style);outline-width:var(--focus-width)}@media (prefers-reduced-motion: reduce){:host,:host::before,:host::after,:host *,:host *::before,:host *::after{animation:none !important;scroll-behavior:auto !important;transition:none !important}}:host-context([data-wbc-reduced-motion=true])::before,:host-context([data-wbc-reduced-motion=true])::after,:host-context([data-wbc-reduced-motion=true]) *,:host-context([data-wbc-reduced-motion=true]) *::before,:host-context([data-wbc-reduced-motion=true]) *::after{animation:none !important;scroll-behavior:auto !important;transition:none !important}:host{display:block;width:100%;max-width:304px;height:auto;box-sizing:border-box}.header{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--spacing-scale-base);width:100%;box-sizing:border-box}select{appearance:none;border:none;background:rgba(0,0,0,0);padding-right:20px;font-size:var(--font-size-scale-up-01);font-weight:var(--font-weight-semi-bold);color:var(--blue-warm-vivid-70);outline:none;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'><path fill='%231351b4' d='M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L224 285.229l154.706-154.705c9.373-9.373 24.569-9.373 33.941 0l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.373-24.569 9.373-33.942 0z'/></svg>");background-repeat:no-repeat;background-position:right .35rem center;background-size:10px}select option{color:var(--color)}select:focus{outline:none}select:focus-visible{outline:var(--focus) var(--focus-style) var(--focus-width);outline-offset:var(--focus-offset)}select:hover{cursor:pointer}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;white-space:nowrap;border:0}input[type=number]{width:70px;padding:4px;font-size:var(--font-size-scale-up-01);font-weight:var(--font-weight-semi-bold);background-color:var(--gray-0);color:var(--gray-80);text-align:center;border-color:var(--border-color-alternative);border-radius:var(--surface-rounder-sm);border-style:var(--border-style);border-width:var(--border-width)}input[type=number]:hover{background:linear-gradient(rgb(var(--color-rgb), var(--hover)), rgb(var(--color-rgb), var(--hover)))}.weekdays{margin-bottom:var(--spacing-scale-half)}.weekdays,.monthdays{display:grid;grid-template-columns:repeat(7, 1fr);place-items:center center;text-align:center;gap:var(--spacing-scale-half) var(--spacing-scale-half);width:100%;box-sizing:border-box}.weekday{display:flex;align-items:center;justify-content:center;font-weight:var(--font-weight-medium);color:var(--gray-70);width:var(--spacing-scale-4x)}.week{display:contents}.day{display:flex;align-items:center;justify-content:center;justify-self:center;padding:var(--spacing-scale-half);font-weight:var(--font-weight-semi-bold);color:var(--blue-warm-vivid-70);border-radius:50%;width:var(--spacing-scale-4x);height:var(--spacing-scale-4x)}.day:hover{background:var(--hover-effect);cursor:pointer}.day:focus-visible{outline:var(--focus) var(--focus-style) var(--focus-width);outline-offset:var(--focus-offset)}.day.selected{background:var(--blue-warm-vivid-70);color:var(--color-secondary-01);font-weight:var(--font-weight-bold)}.day.in-range{background:var(--blue-warm-vivid-10);color:var(--blue-warm-vivid-70);border-radius:0;place-self:stretch stretch;width:100%;height:100%;overflow:hidden}.day.range-start{background:var(--blue-warm-vivid-70);color:var(--color-secondary-01);font-weight:var(--font-weight-bold);width:100%;height:100%;border-radius:var(--surface-rounder-pill) 0 0 var(--surface-rounder-pill);place-self:stretch stretch;overflow:hidden}.day.range-end{background:var(--blue-warm-vivid-70);color:var(--color-secondary-01);font-weight:var(--font-weight-bold);width:100%;height:100%;border-radius:0 var(--surface-rounder-pill) var(--surface-rounder-pill) 0;place-self:stretch stretch;overflow:hidden}.day.range-start.range-end{border-radius:var(--surface-rounder-pill);height:100%;overflow:hidden}.day.disabled{opacity:.45;cursor:not-allowed;pointer-events:none}.outside-month{font-weight:var(--font-weight-regular);color:var(--gray-70)}.today{background:var(--orange-vivid-5);color:var(--gray-80)}`;
540
542
 
541
543
  const DatePicker = class {
542
544
  constructor(hostRef) {
543
545
  registerInstance(this, hostRef);
544
546
  this.dateStateChange = createEvent(this, "dateStateChange", 7);
545
- /** Data com foco atual na navegação por teclado do calendário. */
546
- this.focusedDate = new Date();
547
- /** Datas inválidas são removidas da lista antes da comparação com o calendário. */
548
- this.normalizedDisabledDates = [];
549
- /** Define o índice do dia em que a semana começa na interface do calendário. */
547
+ /**
548
+ * Índice do dia em que a semana começa na interface do calendário.
549
+ * @default 0
550
+ */
550
551
  this.weekStartsOn = 0;
551
552
  /**
552
- * Data usada como base visual para o mês atualmente exibido, sem alterar a seleção.
553
- * Recebe uma instância de `Date` por property binding; valores inválidos usam a data atual.
554
- *
555
- * @example
556
- * ```js
557
- * const calendar = document.querySelector('br-date-picker');
558
- * calendar.referenceDate = new Date(2026, 8, 1);
559
- * ```
553
+ * Data usada como base visual para o mês atualmente exibido.
554
+ * @default new Date()
560
555
  */
561
556
  this.referenceDate = new Date();
562
557
  /**
563
- * Data efetivamente selecionada, ou `null` quando não há seleção; é diferente de `referenceDate`, que controla apenas o mês visível.
564
- * Recebe uma instância de `Date` por property binding; datas inválidas usam `null`.
565
- *
566
- * @example
567
- * ```js
568
- * const calendar = document.querySelector('br-date-picker');
569
- * calendar.value = new Date(2026, 8, 7);
570
- * ```
558
+ * Data atualmente selecionada pelo usuário, ou `null` quando não há seleção.
559
+ * @default null
571
560
  */
572
561
  this.value = null;
573
- /** Define se a seleção ocorre por data única ou por intervalo. Valores inválidos usam `single`. */
562
+ /**
563
+ * Define se a seleção ocorre por data única ou por intervalo.
564
+ * @default 'single'
565
+ */
574
566
  this.selectionMode = 'single';
575
- /** Data inicial selecionada quando o calendário opera no modo de intervalo. */
567
+ /**
568
+ * Data inicial selecionada quando o calendário opera no modo de intervalo.
569
+ * @default null
570
+ */
576
571
  this.rangeStart = null;
577
- /** Data final selecionada quando o calendário opera no modo de intervalo. */
572
+ /**
573
+ * Data final selecionada quando o calendário opera no modo de intervalo.
574
+ * @default null
575
+ */
578
576
  this.rangeEnd = null;
579
- /** Desabilita a interação do calendário quando ativo. */
577
+ /**
578
+ * Desabilita a interação do calendário quando `true`.
579
+ * @default false
580
+ */
580
581
  this.disabled = false;
581
582
  /**
582
583
  * Lista de datas indisponíveis para seleção no calendário.
583
- * Recebe instâncias de `Date` por property binding; datas inválidas são ignoradas.
584
- *
585
- * @example
586
- * ```js
587
- * const calendar = document.querySelector('br-date-picker');
588
- * calendar.disabledDates = [new Date(2026, 8, 7), new Date(2026, 8, 8)];
589
- * ```
584
+ * @default []
590
585
  */
591
586
  this.disabledDates = [];
592
- /** Locale usado para gerar nomes de meses e dias da semana. */
587
+ /**
588
+ * Locale usado para gerar nomes de meses e dias da semana.
589
+ * @default DATETIME_PICKER_LOCALE.DEFAULT
590
+ */
593
591
  this.locale = DATETIME_PICKER_LOCALE.DEFAULT;
594
592
  /**
595
- * Define se o calendário deve manter um número fixo de linhas (6 semanas = 42 dias)
596
- * ou variar conforme o mês.
597
- *
598
- * Quando `true`, o calendário sempre exibe 6 semanas completas.
599
- * Quando `false`, o calendário adapta-se ao mês, exibindo apenas as semanas necessárias.
600
- *
593
+ * Se `true`, o calendário sempre exibe 6 semanas (42 dias); caso contrário, adapta-se ao mês.
601
594
  * @default false
602
595
  */
603
596
  this.fixedRowCount = false;
604
- /** Sinaliza ao componentDidRender que deve mover o foco para a célula atual. */
597
+ /**
598
+ * Data atualmente com foco para navegação por teclado.
599
+ * Usada para controlar qual célula do calendário recebe `tabindex=0`.
600
+ * @type {Date}
601
+ * @default new Date()
602
+ * @internal
603
+ */
604
+ this.focusedDate = new Date();
605
+ /**
606
+ * Sinaliza ao `componentDidRender` que o foco deve ser movido para a célula atual.
607
+ * @internal
608
+ */
605
609
  this.shouldFocusDate = false;
606
- /** Mantém handlers estáveis por data para evitar recriação a cada renderização. */
607
- this.dayClickHandlers = new WeakMap();
608
610
  /**
609
- * Atualiza o mês exibido a partir da seleção do usuário.
610
- *
611
- * @param event - Mudança do `<select>` de mês.
611
+ * Handler de mudança do seletor de mês.
612
+ * @param event - evento de mudança do `<select>`
613
+ * @internal
612
614
  */
613
615
  this.handleMonthChange = (event) => {
614
616
  if (this.disabled) {
@@ -624,12 +626,18 @@ const DatePicker = class {
624
626
  this.emitDateStateChange(date);
625
627
  };
626
628
  /**
627
- * Executa a ação de navegação associada ao botão clicado.
628
- *
629
- * @param event - Clique no botão de navegação.
629
+ * Trata cliques nos botões de navegação do calendário.
630
+ * @param event - evento de clique
631
+ * @internal
630
632
  */
631
633
  this.handleNavigationClick = (event) => {
632
- const action = event.currentTarget.dataset.action;
634
+ if (this.disabled) {
635
+ return;
636
+ }
637
+ const actionFromPath = event
638
+ .composedPath()
639
+ .find((target) => target instanceof HTMLElement && target.dataset.action !== undefined);
640
+ const action = (actionFromPath?.dataset.action ?? event.currentTarget?.dataset.action);
633
641
  if (action === undefined) {
634
642
  console.warn('Botão de navegação clicado sem data-action definido');
635
643
  return;
@@ -646,9 +654,10 @@ const DatePicker = class {
646
654
  }
647
655
  };
648
656
  /**
649
- * Atualiza o ano exibido a partir do valor digitado.
650
- *
651
- * @param event - Mudança do campo de ano.
657
+ * Handler de alteração do campo ano.
658
+ * Valida o ano antes de aplicar a mudança.
659
+ * @param event - evento de mudança do input de ano
660
+ * @internal
652
661
  */
653
662
  this.handleYearChange = (event) => {
654
663
  if (this.disabled) {
@@ -661,22 +670,35 @@ const DatePicker = class {
661
670
  return;
662
671
  }
663
672
  const date = setExports.set(this.baseDate, { year, month: this.baseDate.getMonth(), date: 1 });
664
- const range = this.effectiveSelectionMode === 'range' && this.rangeStart !== null && this.rangeEnd !== null
673
+ const range = this.selectionMode === 'range' && this.rangeStart !== null && this.rangeEnd !== null
665
674
  ? { start: this.rangeStart, end: this.rangeEnd }
666
675
  : undefined;
667
676
  this.emitDateStateChange(date, this.value, range);
668
677
  };
669
678
  /**
670
- * Gerencia a navegação por teclado dentro da grade de dias.
671
- *
672
- * Teclas suportadas:
673
- * - `ArrowLeft` / `ArrowRight`: avança ou recua um dia.
674
- * - `ArrowUp` / `ArrowDown`: avança ou recua sete dias (linha inteira).
675
- * - `PageUp` / `PageDown`: navega entre meses.
676
- * - `Home` / `End`: primeiro ou último dia da semana atual.
677
- * - `Enter` / `Space`: seleciona o dia com foco.
678
- *
679
- * @param event - Evento de teclado disparado na grade.
679
+ * Trata cliques com um handler compartilhado, lendo a data local da célula.
680
+ * @param event - evento de clique da célula
681
+ * @internal
682
+ */
683
+ this.handleDayCellClick = (event) => {
684
+ const cell = event.currentTarget;
685
+ if (!(cell instanceof HTMLElement) || cell.dataset.date === undefined) {
686
+ console.warn('Célula de dia clicada sem data-date definido');
687
+ return;
688
+ }
689
+ const date = parseExports.parse(cell.dataset.date, 'yyyy-MM-dd', this.baseDate);
690
+ if (Number.isNaN(date.getTime())) {
691
+ console.warn(`Data inválida na célula de dia: ${cell.dataset.date}`);
692
+ return;
693
+ }
694
+ this.handleDayClick(date);
695
+ };
696
+ /**
697
+ * Gerencia navegação por teclado dentro da grade de dias.
698
+ * Teclas suportadas: ArrowLeft/Right/Up/Down, PageUp/PageDown, Home/End, Enter/Space.
699
+ * @param event - evento de teclado
700
+ * @returns void
701
+ * @internal
680
702
  */
681
703
  this.handleGridKeydown = (event) => {
682
704
  const HANDLED_KEYS = [
@@ -693,12 +715,22 @@ const DatePicker = class {
693
715
  ];
694
716
  if (!HANDLED_KEYS.includes(event.key))
695
717
  return;
696
- const target = event.target;
697
- const dateKey = target.dataset?.date;
698
- if (dateKey === undefined)
699
- return;
700
- event.preventDefault();
701
- const current = parseExports.parse(dateKey, 'yyyy-MM-dd', new Date());
718
+ // O `event.target` pode ser um nó interno (texto) ou o foco pode estar
719
+ // em um container; tentamos localizar a célula com `data-date`.
720
+ const targetEl = event.target?.closest?.('[data-date]');
721
+ // Se encontrarmos a célula, usamos sua data; caso contrário, usamos a
722
+ // data atualmente focada (`focusedDate`) como fallback. Em ambos os casos
723
+ // prevenimos o comportamento padrão para manter consistência.
724
+ let current;
725
+ if (targetEl && targetEl.dataset?.date !== undefined) {
726
+ const dateKey = targetEl.dataset.date;
727
+ event.preventDefault();
728
+ current = parseExports.parse(dateKey, 'yyyy-MM-dd', new Date());
729
+ }
730
+ else {
731
+ event.preventDefault();
732
+ current = this.getNormalizedFocusedDate();
733
+ }
702
734
  if (event.key === 'Enter' || event.key === ' ') {
703
735
  if (!this.isDateDisabled(current)) {
704
736
  this.handleDayClick(current);
@@ -737,47 +769,41 @@ const DatePicker = class {
737
769
  this.moveFocusTo(next);
738
770
  };
739
771
  }
740
- get effectiveSelectionMode() {
741
- return resolveAllowedPropValue(this.el, 'selectionMode', this.selectionMode, ['single', 'range'], 'single');
742
- }
772
+ /**
773
+ * Observador para a prop `rangeValue` — sincroniza `rangeStart` e `rangeEnd`.
774
+ * @param {DatetimePickerDateRange | undefined} newValue - novo intervalo controlado recebido (`undefined` quando não fornecido)
775
+ * @internal
776
+ */
743
777
  handleRangeValueChange(newValue) {
744
778
  if (!newValue)
745
779
  return;
746
- if (!isValidDatetimePickerDateRange(newValue)) {
747
- reportInvalidPropValue(this.el, 'rangeValue', newValue, 'Informe um objeto com `start` e `end` como Date válido ou null.', 'Ignorando o intervalo inválido e mantendo o último intervalo efetivo.');
748
- return;
749
- }
750
780
  this.rangeStart = newValue.start;
751
781
  this.rangeEnd = newValue.end;
752
782
  }
753
783
  /**
754
784
  * Sincroniza `focusedDate` quando o valor selecionado muda externamente.
755
785
  *
756
- * @param newValue - Novo valor recebido via prop.
786
+ * @param {Date | null} newValue - Novo valor recebido via prop.
787
+ */
788
+ /**
789
+ * Observador para a prop `value` — atualiza `focusedDate` quando a seleção externa muda.
790
+ * @param {Date | null} newValue - novo valor de seleção (ou `null`)
791
+ * @internal
757
792
  */
758
793
  handleValueChange(newValue) {
759
- const normalizedValue = this.normalizeDateProp(newValue, 'value', null);
760
- const receivedTime = newValue instanceof Date && !Number.isNaN(newValue.getTime()) ? newValue.getTime() : null;
761
- if ((normalizedValue?.getTime() ?? null) !== receivedTime) {
762
- this.value = normalizedValue;
763
- return;
764
- }
765
- this.focusedDate = toDateExports.toDate(normalizedValue ?? this.referenceDate);
766
- }
767
- handleReferenceDateChange(newValue) {
768
- const normalizedReferenceDate = this.normalizeDateProp(newValue, 'referenceDate', new Date());
769
- const receivedTime = newValue instanceof Date && !Number.isNaN(newValue.getTime()) ? newValue.getTime() : null;
770
- if (normalizedReferenceDate.getTime() !== receivedTime) {
771
- this.referenceDate = normalizedReferenceDate;
772
- return;
794
+ if (newValue !== null) {
795
+ this.focusedDate = toDateExports.toDate(newValue);
773
796
  }
774
- if (this.value === null)
775
- this.focusedDate = toDateExports.toDate(normalizedReferenceDate);
776
797
  }
777
798
  /**
778
799
  * Revalida a configuração quando o início da semana muda.
779
800
  *
780
- * @param newValue - Novo valor recebido via prop.
801
+ * @param {number} newValue - Novo valor recebido via prop.
802
+ */
803
+ /**
804
+ * Observador para `weekStartsOn` — revalida a configuração quando alterada externamente.
805
+ * @param {number} newValue - novo índice do início da semana
806
+ * @internal
781
807
  */
782
808
  handleWeekStartsOnChange(newValue) {
783
809
  this.ensureValidWeekStartsOn(newValue);
@@ -785,29 +811,22 @@ const DatePicker = class {
785
811
  /**
786
812
  * Revalida o locale quando a prop muda.
787
813
  *
788
- * @param newValue - Novo valor recebido via prop.
814
+ * @param {string} newValue - Novo valor recebido via prop.
815
+ */
816
+ /**
817
+ * Observador para `locale` — revalida/normaliza o locale informado.
818
+ * @param {string} newValue - nova string de locale
819
+ * @internal
789
820
  */
790
821
  handleLocaleChange(newValue) {
791
822
  this.ensureValidLocale(newValue);
792
823
  }
793
- handleDisabledDatesChange(newValue) {
794
- this.normalizedDisabledDates = normalizeDatetimePickerDisabledDates(newValue, 'br-date-picker');
795
- }
796
- /**
797
- * Normaliza os valores públicos antes da primeira renderização.
798
- */
799
824
  componentWillLoad() {
800
- this.referenceDate = this.normalizeDateProp(this.referenceDate, 'referenceDate', new Date());
801
- this.value = this.normalizeDateProp(this.value, 'value', null);
802
825
  this.referenceDate = resolveSsrLocalDate(this.el, this.referenceDate);
803
826
  this.ensureValidWeekStartsOn();
804
827
  this.ensureValidLocale();
805
- this.handleDisabledDatesChange(this.disabledDates);
806
828
  this.focusedDate = toDateExports.toDate(this.value ?? this.referenceDate);
807
829
  }
808
- /**
809
- * Move o foco para a célula correspondente ao `focusedDate` após re-renderização.
810
- */
811
830
  componentDidRender() {
812
831
  if (!this.shouldFocusDate)
813
832
  return;
@@ -818,9 +837,9 @@ const DatePicker = class {
818
837
  cell?.focus();
819
838
  }
820
839
  /**
821
- * Garante que o valor de `weekStartsOn` esteja dentro do domínio suportado.
822
- *
840
+ * Valida e normaliza `weekStartsOn`.
823
841
  * @param value - Valor bruto informado pelo consumidor.
842
+ * @internal
824
843
  */
825
844
  ensureValidWeekStartsOn(value = this.weekStartsOn) {
826
845
  const normalizedWeekStartsOn = normalizeWeekStartsOn(value);
@@ -828,18 +847,10 @@ const DatePicker = class {
828
847
  this.weekStartsOn = normalizedWeekStartsOn;
829
848
  }
830
849
  }
831
- normalizeDateProp(value, propertyName, fallback) {
832
- if (value === null && fallback === null)
833
- return null;
834
- if (value instanceof Date && !Number.isNaN(value.getTime()))
835
- return toDateExports.toDate(value);
836
- reportInvalidPropValue(this.el, propertyName, value, 'Informe uma instância de Date válida.', `Aplicando fallback ${fallback === null ? 'null' : 'new Date()'}.`);
837
- return fallback === null ? null : toDateExports.toDate(fallback);
838
- }
839
850
  /**
840
- * Garante que o locale informado seja suportado.
841
- *
851
+ * Valida e normaliza o `locale` informado.
842
852
  * @param value - Valor bruto informado pelo consumidor.
853
+ * @internal
843
854
  */
844
855
  ensureValidLocale(value = this.locale) {
845
856
  const normalizedLocale = normalizeLocale(value);
@@ -848,16 +859,20 @@ const DatePicker = class {
848
859
  }
849
860
  }
850
861
  /**
851
- * Emite o estado consolidado do componente para manter a navegação sincronizada.
862
+ * Emite `dateStateChange` atualizando `referenceDate`, `value` e `range`.
863
+ * Zera segundos/milissegundos para consistência.
852
864
  *
853
- * @param nextReferenceDate - Nova data de referência após a interação.
854
- * @param nextValue - Valor selecionado final; por padrão, mantém a seleção atual.
865
+ * @param nextReferenceDate - nova data de referência
866
+ * @param nextValue - data selecionada ou `null` (por padrão, mantém `this.value`)
867
+ * @param nextRange - intervalo de datas quando aplicável
868
+ * @internal
855
869
  */
856
870
  emitDateStateChange(nextReferenceDate, nextValue = this.value, nextRange = undefined) {
857
871
  // Garantir segundos zerados (componente não manipula segundos)
858
872
  const normalizedReference = setExports.set(nextReferenceDate, { seconds: 0, milliseconds: 0 });
859
873
  const normalizedValue = nextValue === null ? null : setExports.set(nextValue, { seconds: 0, milliseconds: 0 });
860
874
  const valueChanged = this.value?.getTime() !== normalizedValue?.getTime();
875
+ this.referenceDate = normalizedReference;
861
876
  this.value = normalizedValue;
862
877
  this.dateStateChange.emit({
863
878
  referenceDate: normalizedReference,
@@ -872,10 +887,10 @@ const DatePicker = class {
872
887
  }
873
888
  }
874
889
  /**
875
- * Resolve o ícone usado em cada ação de navegação.
876
- *
877
- * @param action - Ação de navegação representada pelo botão.
878
- * @returns Nome do ícone ou um fallback quando a ação não é reconhecida.
890
+ * Resolve o nome do ícone para a ação de navegação.
891
+ * @param action - Ação de navegação
892
+ * @returns Nome do ícone
893
+ * @internal
879
894
  */
880
895
  getIconForAction(action) {
881
896
  switch (action) {
@@ -888,9 +903,9 @@ const DatePicker = class {
888
903
  }
889
904
  }
890
905
  /**
891
- * Aplica a data clicada preservando hora e minuto da referência atual.
892
- *
893
- * @param date - Dia selecionado no calendário.
906
+ * Trata o clique numa célula de dia: aplica seleção ou atualiza intervalo.
907
+ * @param date - dia clicado
908
+ * @internal
894
909
  */
895
910
  handleDayClick(date) {
896
911
  if (this.disabled || this.isDateDisabled(date)) {
@@ -902,13 +917,17 @@ const DatePicker = class {
902
917
  seconds: 0,
903
918
  milliseconds: 0,
904
919
  });
905
- if (this.effectiveSelectionMode === 'range') {
920
+ if (this.selectionMode === 'range') {
906
921
  this.handleRangeDayClick(newDate);
907
922
  return;
908
923
  }
909
924
  this.emitDateStateChange(newDate, newDate);
910
925
  }
911
- /** Atualiza o intervalo selecionado com base no clique atual. */
926
+ /**
927
+ * Atualiza o intervalo selecionado no modo `range`.
928
+ * @param clickedDate - data clicada pelo usuário
929
+ * @internal
930
+ */
912
931
  handleRangeDayClick(clickedDate) {
913
932
  const start = this.rangeStart;
914
933
  const end = this.rangeEnd;
@@ -925,66 +944,72 @@ const DatePicker = class {
925
944
  end: normalizedEnd,
926
945
  });
927
946
  }
928
- /** Decrementa o mês mantendo o primeiro dia do mês exibido e preservando a seleção de range. */
947
+ /**
948
+ * Decrementa o mês exibido e preserva seleção/intervalo quando aplicável.
949
+ * @internal
950
+ */
929
951
  decreaseMonth() {
930
952
  if (this.disabled) {
931
953
  return;
932
954
  }
933
955
  const date = setExports.set(subMonthsExports.subMonths(this.baseDate, 1), { date: 1 });
934
- const range = this.effectiveSelectionMode === 'range' && this.rangeStart !== null && this.rangeEnd !== null
956
+ const range = this.selectionMode === 'range' && this.rangeStart !== null && this.rangeEnd !== null
935
957
  ? { start: this.rangeStart, end: this.rangeEnd }
936
958
  : undefined;
937
959
  this.emitDateStateChange(date, this.value, range);
938
960
  }
939
- /** Incrementa o mês mantendo o primeiro dia do mês exibido e preservando a seleção de range. */
961
+ /**
962
+ * Incrementa o mês exibido e preserva seleção/intervalo quando aplicável.
963
+ * @internal
964
+ */
940
965
  increaseMonth() {
941
966
  if (this.disabled) {
942
967
  return;
943
968
  }
944
969
  const date = setExports.set(addMonthsExports.addMonths(this.baseDate, 1), { date: 1 });
945
- const range = this.effectiveSelectionMode === 'range' && this.rangeStart !== null && this.rangeEnd !== null
970
+ const range = this.selectionMode === 'range' && this.rangeStart !== null && this.rangeEnd !== null
946
971
  ? { start: this.rangeStart, end: this.rangeEnd }
947
972
  : undefined;
948
973
  this.emitDateStateChange(date, this.value, range);
949
974
  }
950
- /** Indica se um dia está indisponível para seleção. */
975
+ /**
976
+ * Verifica se uma data está indisponível para seleção.
977
+ * @param date - data a verificar
978
+ * @returns `true` se a data estiver na lista de `disabledDates`
979
+ * @internal
980
+ */
951
981
  isDateDisabled(date) {
952
- return this.normalizedDisabledDates.some((disabledDate) => isSameDayExports.isSameDay(disabledDate, date));
982
+ return this.disabledDates.some((disabledDate) => isSameDayExports.isSameDay(disabledDate, date));
953
983
  }
954
- /** Data base usada para todos os cálculos de calendário. */
984
+ /**
985
+ * Data base usada para todos os cálculos de calendário.
986
+ * @returns data de referência interna
987
+ * @internal
988
+ */
955
989
  get baseDate() {
956
990
  return this.referenceDate;
957
991
  }
958
992
  /**
959
- * Recupera um handler estável para a célula do dia informado.
960
- *
961
- * @param date - Dia representado pela célula.
962
- * @returns Função de clique reutilizável.
993
+ * Formata o dia exibido com zero à esquerda (ex: '01', '09').
994
+ * @param date - data a formatar
995
+ * @returns string com dois dígitos do dia
996
+ * @internal
963
997
  */
964
- getDayClickHandler(date) {
965
- let handler = this.dayClickHandlers.get(date);
966
- if (handler === undefined) {
967
- handler = () => this.handleDayClick(date);
968
- this.dayClickHandlers.set(date, handler);
969
- }
970
- return handler;
971
- }
972
- /** Formata o dia exibido com zero à esquerda. */
973
998
  getDayWithLeadingZero(date) {
974
999
  return formatExports.format(date, 'dd');
975
1000
  }
976
1001
  /**
977
- * Constrói o rótulo acessível completo da célula de dia.
978
- *
979
- * @param date - Dia representado pela célula.
980
- * @returns Texto anunciado pelo leitor de tela, incluindo estado de seleção.
1002
+ * Constrói o rótulo acessível da célula de dia, incluindo estado (selecionado/início/fim).
1003
+ * @param date - dia representado pela célula
1004
+ * @returns string para `aria-label`
1005
+ * @internal
981
1006
  */
982
1007
  getDayCellAriaLabel(date) {
983
1008
  const fullDate = formatExports.format(date, "d 'de' MMMM 'de' yyyy", { locale: this.dateFnsLocale });
984
- const isSelected = this.effectiveSelectionMode === 'single' && this.value !== null && isSameDayExports.isSameDay(date, this.value);
985
- const isRangeStart = this.effectiveSelectionMode === 'range' && this.rangeStart !== null && isSameDayExports.isSameDay(date, this.rangeStart);
986
- const isRangeEnd = this.effectiveSelectionMode === 'range' && this.rangeEnd !== null && isSameDayExports.isSameDay(date, this.rangeEnd);
987
- const isBetween = this.effectiveSelectionMode === 'range' &&
1009
+ const isSelected = this.selectionMode === 'single' && this.value !== null && isSameDayExports.isSameDay(date, this.value);
1010
+ const isRangeStart = this.selectionMode === 'range' && this.rangeStart !== null && isSameDayExports.isSameDay(date, this.rangeStart);
1011
+ const isRangeEnd = this.selectionMode === 'range' && this.rangeEnd !== null && isSameDayExports.isSameDay(date, this.rangeEnd);
1012
+ const isBetween = this.selectionMode === 'range' &&
988
1013
  this.rangeStart !== null &&
989
1014
  this.rangeEnd !== null &&
990
1015
  this.isDateBetweenRange(date, this.rangeStart, this.rangeEnd);
@@ -998,16 +1023,21 @@ const DatePicker = class {
998
1023
  return `${fullDate}, no intervalo selecionado`;
999
1024
  return fullDate;
1000
1025
  }
1001
- /** Locale do date-fns derivado da prop pública do componente. */
1026
+ /**
1027
+ * Locale do `date-fns` derivado da prop pública `locale`.
1028
+ * @internal
1029
+ */
1002
1030
  get dateFnsLocale() {
1003
1031
  return resolveDateFnsLocale(this.locale);
1004
1032
  }
1005
1033
  /**
1006
- * Calcula as classes CSS da célula do dia com base em seleção, mês e data atual.
1007
- *
1008
- * @param date - Dia da grade do calendário.
1034
+ * Calcula o mapa de classes CSS da célula do dia.
1035
+ * @param date - dia da grade
1036
+ * @param today - instante atual compartilhado pela renderização da grade
1037
+ * @returns mapa de classes booleanas
1038
+ * @internal
1009
1039
  */
1010
- getDayCssClasses(date) {
1040
+ getDayCssClasses(date, today) {
1011
1041
  const selected = this.value;
1012
1042
  const rangeStart = this.rangeStart;
1013
1043
  const rangeEnd = this.rangeEnd;
@@ -1018,60 +1048,66 @@ const DatePicker = class {
1018
1048
  return {
1019
1049
  day: true,
1020
1050
  'outside-month': !isSameMonthExports.isSameMonth(date, this.baseDate),
1021
- today: isSameDayExports.isSameDay(date, toDateExports.toDate(new Date())),
1022
- selected: this.effectiveSelectionMode === 'single' && selected !== null && isSameDayExports.isSameDay(date, selected),
1023
- 'range-start': this.effectiveSelectionMode === 'range' && isRangeStart,
1024
- 'range-end': this.effectiveSelectionMode === 'range' && isRangeEnd,
1025
- 'in-range': this.effectiveSelectionMode === 'range' && isBetweenRange,
1051
+ today: isSameDayExports.isSameDay(date, today),
1052
+ selected: this.selectionMode === 'single' && selected !== null && isSameDayExports.isSameDay(date, selected),
1053
+ 'range-start': this.selectionMode === 'range' && isRangeStart,
1054
+ 'range-end': this.selectionMode === 'range' && isRangeEnd,
1055
+ 'in-range': this.selectionMode === 'range' && isBetweenRange,
1026
1056
  };
1027
1057
  }
1028
- /** Normaliza os limites do intervalo para garantir ordem cronológica. */
1058
+ /**
1059
+ * Normaliza os limites do intervalo garantindo ordem cronológica (start <= end).
1060
+ * @param start - data de início
1061
+ * @param end - data de fim
1062
+ * @returns tupla [start, end] na ordem correta
1063
+ * @internal
1064
+ */
1029
1065
  normalizeRangeBounds(start, end) {
1030
1066
  return compareAscExports.compareAsc(start, end) <= 0 ? [start, end] : [end, start];
1031
1067
  }
1032
- /** Verifica se uma data está estritamente entre início e fim do intervalo. */
1068
+ /**
1069
+ * Verifica se uma data está estritamente entre `start` e `end`.
1070
+ * @param date - data a verificar
1071
+ * @param start - início do intervalo
1072
+ * @param end - fim do intervalo
1073
+ * @returns `true` se `start < date < end`
1074
+ * @internal
1075
+ */
1033
1076
  isDateBetweenRange(date, start, end) {
1034
1077
  return isAfterExports.isAfter(date, start) && isBeforeExports.isBefore(date, end);
1035
1078
  }
1036
- /** Gera a sequência completa de dias visíveis na grade do mês. */
1037
- getMonthViewDates() {
1079
+ /**
1080
+ * Calcula os limites da grade do mês, respeitando `fixedRowCount`, sem gerar suas datas.
1081
+ * @returns limites inclusivos da grade
1082
+ * @internal
1083
+ */
1084
+ getMonthViewInterval() {
1038
1085
  const start = startOfWeekExports.startOfWeek(startOfMonthExports.startOfMonth(this.baseDate), { weekStartsOn: this.weekStartsOn });
1039
- let end = endOfWeekExports.endOfWeek(endOfMonthExports.endOfMonth(this.baseDate), { weekStartsOn: this.weekStartsOn });
1040
- // Se fixedRowCount está ativo, garante sempre 6 semanas (42 dias)
1041
- if (this.fixedRowCount) {
1042
- // Calcula o número de semanas que seriam normalmente geradas
1043
- const normalizedDates = eachDayOfIntervalExports.eachDayOfInterval({ start, end });
1044
- const currentWeekCount = Math.ceil(normalizedDates.length / 7);
1045
- const targetWeekCount = 6;
1046
- // Se não houver 6 semanas, estende o final para alcançar 42 dias
1047
- if (currentWeekCount < targetWeekCount) {
1048
- const daysToAdd = (targetWeekCount - currentWeekCount) * 7;
1049
- end = addDaysExports.addDays(end, daysToAdd);
1050
- }
1051
- }
1052
- return eachDayOfIntervalExports.eachDayOfInterval({ start, end });
1086
+ const end = this.fixedRowCount
1087
+ ? addDaysExports.addDays(start, 41)
1088
+ : endOfWeekExports.endOfWeek(endOfMonthExports.endOfMonth(this.baseDate), { weekStartsOn: this.weekStartsOn });
1089
+ return { start, end };
1053
1090
  }
1054
1091
  /**
1055
- * Retorna o `focusedDate` normalizado para estar sempre dentro da grade visível.
1056
- *
1057
- * Se `focusedDate` não estiver visível no mês atual, retorna o primeiro dia
1058
- * da grade do mês para garantir que sempre haja um elemento com `tabIndex={0}`.
1059
- *
1060
- * @returns Data focada normalizada ou primeiro dia da grade.
1092
+ * Retorna o `focusedDate` normalizado para estar dentro da grade visível.
1093
+ * Se não estiver visível, retorna o primeiro dia da grade.
1094
+ * @param interval - limites da grade atual; calculados quando não fornecidos
1095
+ * @returns data normalizada para foco
1096
+ * @internal
1061
1097
  */
1062
- getNormalizedFocusedDate() {
1063
- const visibleDates = this.getMonthViewDates();
1064
- const isInCurrentMonth = visibleDates.some((d) => isSameDayExports.isSameDay(d, this.focusedDate));
1065
- if (isInCurrentMonth) {
1098
+ getNormalizedFocusedDate(interval = this.getMonthViewInterval()) {
1099
+ const focusedDay = startOfDayExports.startOfDay(this.focusedDate).getTime();
1100
+ const isVisible = focusedDay >= interval.start.getTime() && focusedDay <= interval.end.getTime();
1101
+ if (isVisible) {
1066
1102
  return this.focusedDate;
1067
1103
  }
1068
- return visibleDates[0] ?? this.focusedDate;
1104
+ return interval.start;
1069
1105
  }
1070
1106
  /**
1071
- * Constrói o rótulo acessível dos botões de navegação do mês.
1072
- *
1073
- * @param action - Ação associada ao botão.
1074
- * @returns Texto acessível exibido para leitores de tela.
1107
+ * Constrói o rótulo acessível para os botões de navegação.
1108
+ * @param action - ação de navegação
1109
+ * @returns rótulo para `aria-label`
1110
+ * @internal
1075
1111
  */
1076
1112
  getNavigationAriaLabel(action) {
1077
1113
  switch (action) {
@@ -1083,78 +1119,127 @@ const DatePicker = class {
1083
1119
  return 'Navegar';
1084
1120
  }
1085
1121
  }
1086
- /** Retorna os rótulos das semanas conforme locale e início da semana. */
1122
+ /**
1123
+ * Retorna os rótulos dos dias da semana conforme `locale` e `weekStartsOn`.
1124
+ * @internal
1125
+ */
1087
1126
  getWeekdayLabels() {
1088
1127
  return getWeekdayLabels(this.locale, this.weekStartsOn);
1089
1128
  }
1090
- /** Retorna os rótulos dos meses no locale atual. */
1129
+ /**
1130
+ * Retorna os rótulos dos meses no locale atual.
1131
+ * @internal
1132
+ */
1091
1133
  getMonthLabels() {
1092
1134
  return getMonthLabels(this.locale);
1093
1135
  }
1094
1136
  /**
1095
- * Renderiza um botão consistente de navegação do calendário.
1096
- *
1097
- * @param action - Ação executada pelo botão.
1137
+ * Move o foco de teclado para a data informada e atualiza `referenceDate` se necessário.
1138
+ * @param date - data alvo do foco
1139
+ * @returns void
1140
+ * @internal
1141
+ */
1142
+ moveFocusTo(date) {
1143
+ this.focusedDate = date;
1144
+ this.shouldFocusDate = true;
1145
+ if (!isSameMonthExports.isSameMonth(date, this.baseDate)) {
1146
+ this.emitDateStateChange(date, this.value);
1147
+ }
1148
+ }
1149
+ /**
1150
+ * Renderiza um botão de navegação consistente para o calendário.
1151
+ * @param action - ação do botão
1152
+ * @returns elemento JSX do botão de navegação
1153
+ * @internal
1098
1154
  */
1099
1155
  renderNavigationButton(action) {
1100
- return (h("br-button", { emphasis: "tertiary", density: "small", shape: "circle", disabled: this.disabled, "data-action": action, "aria-label": this.getNavigationAriaLabel(action), onClick: this.handleNavigationClick }, h("br-icon", { iconName: this.getIconForAction(action), width: "20", height: "20", "aria-hidden": "true" })));
1156
+ return (h("br-button", { type: "button", emphasis: "tertiary", density: "small", shape: "circle", disabled: this.disabled, "data-action": action, "aria-label": this.getNavigationAriaLabel(action), onClick: this.handleNavigationClick }, h("br-icon", { iconName: this.getIconForAction(action), width: "20", height: "20", "aria-hidden": "true" })));
1101
1157
  }
1102
- /** Renderiza o cabeçalho do calendário com navegação, mês e ano. */
1158
+ /**
1159
+ * Renderiza o cabeçalho do calendário (navegação, mês e ano).
1160
+ * @returns elemento JSX do cabeçalho
1161
+ * @internal
1162
+ */
1103
1163
  renderCalendarHeader() {
1104
1164
  return (h("div", { class: "header", part: "header" }, this.renderNavigationButton(NAVIGATION_ACTION.PREVIOUS_MONTH), this.renderMonthSelection(), this.renderYearSelection(), this.renderNavigationButton(NAVIGATION_ACTION.NEXT_MONTH)));
1105
1165
  }
1106
- /** Renderiza a seleção de mês com label acessível. */
1166
+ /**
1167
+ * Renderiza o seletor de mês com rótulo acessível.
1168
+ * @returns elemento JSX do seletor de mês
1169
+ * @internal
1170
+ */
1107
1171
  renderMonthSelection() {
1108
1172
  return (h("label", { class: "month-selection" }, h("span", { class: "visually-hidden" }, "Selecionar m\u00EAs"), h("select", { onChange: this.handleMonthChange, "aria-label": "Selecionar m\u00EAs", disabled: this.disabled, part: "month-select" }, this.getMonthLabels().map(this.renderMonthOption, this))));
1109
1173
  }
1110
- /** Renderiza o campo de ano com label acessível. */
1174
+ /**
1175
+ * Renderiza o campo de ano com rótulo acessível.
1176
+ * @returns elemento JSX do campo de ano
1177
+ * @internal
1178
+ */
1111
1179
  renderYearSelection() {
1112
1180
  return (h("label", { class: "year-selection" }, h("span", { class: "visually-hidden" }, "Selecionar ano"), h("input", { type: "number", value: this.referenceDate.getFullYear(), onChange: this.handleYearChange, "aria-label": "Selecionar ano", disabled: this.disabled, part: "year-input" })));
1113
1181
  }
1114
- /** Renderiza uma opção do seletor de meses. */
1182
+ /**
1183
+ * Renderiza uma opção do seletor de meses.
1184
+ * @param month - label do mês
1185
+ * @param index - índice do mês (0-11)
1186
+ * @returns elemento `<option>` para o mês
1187
+ * @internal
1188
+ */
1115
1189
  renderMonthOption(month, index) {
1116
1190
  return (h("option", { key: `month-${index}`, value: index, selected: index === this.referenceDate.getMonth() }, month));
1117
1191
  }
1118
- /** Renderiza a estrutura principal do calendário. */
1192
+ /**
1193
+ * Renderiza a estrutura principal do calendário (grade e cabeçalho).
1194
+ * @returns elemento JSX com a grade do calendário
1195
+ * @internal
1196
+ */
1119
1197
  renderCalendar() {
1120
1198
  const monthLabel = formatExports.format(this.baseDate, "MMMM 'de' yyyy", { locale: this.dateFnsLocale });
1121
1199
  return (h("div", { class: "calendar", role: "grid", "aria-label": `Calendário de ${monthLabel}`, part: "calendar" }, this.renderWeekdays(), this.renderMonthGrid()));
1122
1200
  }
1123
- /** Renderiza a linha de rótulos dos dias da semana. */
1201
+ /**
1202
+ * Renderiza os rótulos dos dias da semana.
1203
+ * @returns elemento JSX com os cabeçalhos das colunas dos dias
1204
+ * @internal
1205
+ */
1124
1206
  renderWeekdays() {
1125
1207
  const labels = this.getWeekdayLabels();
1126
1208
  return (h("div", { class: "weekdays", role: "row", tabIndex: -1, part: "weekdays" }, labels.map((label, index) => (h("div", { key: `weekday-${index}`, class: "weekday", role: "columnheader", tabIndex: -1, "aria-label": label, part: "weekday" }, label)))));
1127
1209
  }
1128
- /** Renderiza a grade com os dias do mês atual. */
1210
+ /**
1211
+ * Renderiza a grade de dias do mês atual.
1212
+ * @returns elemento JSX contendo semanas e dias
1213
+ * @internal
1214
+ */
1129
1215
  renderMonthGrid() {
1130
- const dates = this.getMonthViewDates();
1216
+ const interval = this.getMonthViewInterval();
1217
+ const dates = eachDayOfIntervalExports.eachDayOfInterval(interval);
1218
+ const normalizedFocusedDate = this.getNormalizedFocusedDate(interval);
1219
+ const today = new Date();
1131
1220
  const weeks = Array.from({ length: Math.ceil(dates.length / 7) }, (_, index) => dates.slice(index * 7, index * 7 + 7));
1132
- return (h("div", { class: "monthdays", role: "rowgroup", onKeyDown: this.handleGridKeydown, part: "grid" }, weeks.map((week) => (h("div", { key: `week-${formatExports.format(week[0], 'yyyy-MM-dd')}`, class: "week", role: "row", tabIndex: -1 }, week.map(this.renderDayCell, this))))));
1221
+ return (h("div", { class: "monthdays", role: "rowgroup", part: "grid" }, weeks.map((week) => (h("div", { key: `week-${formatExports.format(week[0], 'yyyy-MM-dd')}`, class: "week", role: "row", tabIndex: -1 }, week.map((date) => this.renderDayCell(date, normalizedFocusedDate, today)))))));
1133
1222
  }
1134
1223
  /**
1135
- * Move o foco de teclado para a data informada, navegando de mês quando necessário.
1136
- *
1137
- * @param date - Data de destino do foco.
1224
+ * Renderiza uma célula de dia com estado visual apropriado.
1225
+ * @param date - data representada pela célula
1226
+ * @param normalizedFocusedDate - data de foco normalizada para a grade atual
1227
+ * @param today - instante atual compartilhado pela renderização da grade
1228
+ * @returns elemento JSX da célula de dia
1229
+ * @internal
1138
1230
  */
1139
- moveFocusTo(date) {
1140
- this.focusedDate = date;
1141
- this.shouldFocusDate = true;
1142
- if (!isSameMonthExports.isSameMonth(date, this.baseDate)) {
1143
- this.emitDateStateChange(date, this.value);
1144
- }
1145
- }
1146
- /** Renderiza uma célula de dia com estado visual apropriado. */
1147
- renderDayCell(date) {
1231
+ renderDayCell(date, normalizedFocusedDate, today) {
1232
+ const dateKey = formatExports.format(date, 'yyyy-MM-dd');
1148
1233
  const disabled = this.disabled || this.isDateDisabled(date);
1149
- const isSelected = this.effectiveSelectionMode === 'single' && this.value !== null && isSameDayExports.isSameDay(date, this.value);
1150
- const isRangeStart = this.effectiveSelectionMode === 'range' && this.rangeStart !== null && isSameDayExports.isSameDay(date, this.rangeStart);
1151
- const isRangeEnd = this.effectiveSelectionMode === 'range' && this.rangeEnd !== null && isSameDayExports.isSameDay(date, this.rangeEnd);
1234
+ const isSelected = this.selectionMode === 'single' && this.value !== null && isSameDayExports.isSameDay(date, this.value);
1235
+ const isRangeStart = this.selectionMode === 'range' && this.rangeStart !== null && isSameDayExports.isSameDay(date, this.rangeStart);
1236
+ const isRangeEnd = this.selectionMode === 'range' && this.rangeEnd !== null && isSameDayExports.isSameDay(date, this.rangeEnd);
1152
1237
  const isActiveDay = isSelected || isRangeStart || isRangeEnd;
1153
- const isFocused = isSameDayExports.isSameDay(date, this.getNormalizedFocusedDate());
1154
- return (h("div", { key: formatExports.format(date, 'yyyy-MM-dd'), role: "gridcell", tabIndex: this.disabled ? undefined : isFocused ? 0 : -1, "data-date": formatExports.format(date, 'yyyy-MM-dd'), class: { ...this.getDayCssClasses(date), disabled }, onClick: disabled ? undefined : this.getDayClickHandler(date), onKeyDown: disabled ? undefined : this.handleGridKeydown, "aria-label": this.getDayCellAriaLabel(date), "aria-selected": isActiveDay ? 'true' : 'false', "aria-disabled": disabled ? 'true' : null, part: "day" }, this.getDayWithLeadingZero(date)));
1238
+ const isFocused = isSameDayExports.isSameDay(date, normalizedFocusedDate);
1239
+ return (h("div", { key: dateKey, role: "gridcell", tabIndex: this.disabled ? undefined : isFocused ? 0 : -1, "data-date": dateKey, class: { ...this.getDayCssClasses(date, today), disabled }, onClick: disabled ? undefined : this.handleDayCellClick, onKeyDown: disabled ? undefined : this.handleGridKeydown, "aria-label": this.getDayCellAriaLabel(date), "aria-selected": isActiveDay ? 'true' : 'false', "aria-disabled": disabled ? 'true' : null, part: "day" }, this.getDayWithLeadingZero(date)));
1155
1240
  }
1156
1241
  render() {
1157
- return (h(Host, { key: 'bf83467d8324a00d3e1d3dc8912bdc732e33ea77' }, h("div", { key: 'e6501b7d8765b032c3681d3d44937631f342bb15', class: "br-date-picker", part: "container" }, this.renderCalendarHeader(), this.renderCalendar())));
1242
+ return (h(Host, { key: '652b18891338dd9d009e87fb2383dc3c1c78c6ee' }, h("div", { key: '3c441b0df40d69767ee4c3e8166e9403988def5d', class: "br-date-picker", part: "container" }, this.renderCalendarHeader(), this.renderCalendar())));
1158
1243
  }
1159
1244
  get el() { return getElement(this); }
1160
1245
  static get watchers() { return {
@@ -1164,17 +1249,11 @@ const DatePicker = class {
1164
1249
  "value": [{
1165
1250
  "handleValueChange": 0
1166
1251
  }],
1167
- "referenceDate": [{
1168
- "handleReferenceDateChange": 0
1169
- }],
1170
1252
  "weekStartsOn": [{
1171
1253
  "handleWeekStartsOnChange": 0
1172
1254
  }],
1173
1255
  "locale": [{
1174
1256
  "handleLocaleChange": 0
1175
- }],
1176
- "disabledDates": [{
1177
- "handleDisabledDatesChange": 0
1178
1257
  }]
1179
1258
  }; }
1180
1259
  };
@@ -1260,6 +1339,62 @@ function requireGetMinutes () {
1260
1339
 
1261
1340
  var getMinutesExports = /*@__PURE__*/ requireGetMinutes();
1262
1341
 
1342
+ /**
1343
+ * Configurações de formato e mensagens usadas por `br-datetime-input`.
1344
+ *
1345
+ * Cada chave representa um modo suportado (`date`, `time`, `datetime`) e
1346
+ * mapeia para um `InputFormatConfig` que descreve máscara de entrada,
1347
+ * contagens de dígitos aceitas, formatos de exibição/parse e mensagens de
1348
+ * validação específicas do modo.
1349
+ *
1350
+ * Mantemos a configuração centralizada para evitar lógica dispersa pelo
1351
+ * componente e permitir alterações de formato em um único local.
1352
+ */
1353
+ const INPUT_FORMAT_CONFIG = {
1354
+ date: {
1355
+ mask: '##/##/####',
1356
+ acceptedDigitCounts: [8],
1357
+ fullDigitCount: 8,
1358
+ displayFormat: 'dd/MM/yyyy',
1359
+ parseFormats: ['dd/MM/yyyy'],
1360
+ messages: {
1361
+ incomplete: 'Complete a data no formato DD/MM/AAAA.',
1362
+ invalid: 'Informe uma data válida.',
1363
+ incompleteRange: 'Complete o intervalo no formato DD/MM/AAAA - DD/MM/AAAA.',
1364
+ invalidRange: 'Informe um intervalo de datas válido.',
1365
+ },
1366
+ rangeFormat: 'DD/MM/AAAA - DD/MM/AAAA',
1367
+ },
1368
+ time: {
1369
+ mask: '##:##',
1370
+ acceptedDigitCounts: [4],
1371
+ fullDigitCount: 4,
1372
+ displayFormat: 'HH:mm',
1373
+ parseFormats: ['HH:mm'],
1374
+ messages: {
1375
+ incomplete: 'Complete o horário no formato HH:MM.',
1376
+ invalid: 'Informe um horário válido.',
1377
+ incompleteRange: 'Complete o intervalo no formato HH:MM - HH:MM.',
1378
+ invalidRange: 'Informe um intervalo de horários válido.',
1379
+ },
1380
+ rangeFormat: 'HH:MM - HH:MM',
1381
+ },
1382
+ datetime: {
1383
+ mask: '##/##/#### ##:##',
1384
+ acceptedDigitCounts: [8, 12],
1385
+ fullDigitCount: 12,
1386
+ displayFormat: 'dd/MM/yyyy HH:mm',
1387
+ parseFormats: ['dd/MM/yyyy HH:mm', 'dd/MM/yyyy'],
1388
+ messages: {
1389
+ incomplete: 'Complete a data e hora no formato DD/MM/AAAA HH:MM.',
1390
+ invalid: 'Informe uma data e hora válidas.',
1391
+ incompleteRange: 'Complete o intervalo no formato DD/MM/AAAA HH:MM - DD/MM/AAAA HH:MM.',
1392
+ invalidRange: 'Informe um intervalo de data e hora válido.',
1393
+ },
1394
+ rangeFormat: 'DD/MM/AAAA HH:MM - DD/MM/AAAA HH:MM',
1395
+ },
1396
+ };
1397
+
1263
1398
  var formatISO = {};
1264
1399
 
1265
1400
  var hasRequiredFormatISO;
@@ -1378,19 +1513,20 @@ function requireFormatISO () {
1378
1513
  var formatISOExports = /*@__PURE__*/ requireFormatISO();
1379
1514
 
1380
1515
  /**
1381
- * Valida se o modo informado pertence ao conjunto suportado pelo datetime-input.
1516
+ * Verifica se `value` é um modo suportado pelo `br-datetime-input`.
1382
1517
  *
1383
- * @param value - Valor recebido via prop/atributo.
1384
- * @returns `true` quando o modo é válido.
1518
+ * @param {string} value - Valor recebido via prop/atributo.
1519
+ * @returns {value is DatetimePickerMode} `true` quando pertence ao conjunto suportado.
1385
1520
  */
1386
1521
  function isValidDatetimeInputMode(value) {
1387
1522
  return Object.values(DATETIME_PICKER_MODE).includes(value);
1388
1523
  }
1389
1524
  /**
1390
- * Normaliza o modo do datetime-input para um valor suportado.
1525
+ * Normaliza o modo do componente, aplicando o valor padrão quando inválido.
1526
+ * Emite um aviso via `warnInvalidPropValue` quando o valor é inválido.
1391
1527
  *
1392
- * @param value - Valor bruto informado via prop.
1393
- * @returns Modo válido, aplicando o padrão quando necessário.
1528
+ * @param {string} value - Valor bruto recebido via prop.
1529
+ * @returns {DatetimePickerMode} - Modo válido (ou `DATETIME_PICKER_MODE.DEFAULT`).
1394
1530
  */
1395
1531
  function normalizeDatetimeInputMode(value) {
1396
1532
  if (isValidDatetimeInputMode(value))
@@ -1399,19 +1535,21 @@ function normalizeDatetimeInputMode(value) {
1399
1535
  return DATETIME_PICKER_MODE.DEFAULT;
1400
1536
  }
1401
1537
  /**
1402
- * Verifica se o valor informado é uma instância de Date válida.
1538
+ * Retorna `true` quando `value` é uma instância válida de `Date`.
1403
1539
  *
1404
- * @param value - Valor recebido via prop.
1405
- * @returns `true` quando é Date válido.
1540
+ * @param {unknown} value - Valor a ser verificado.
1541
+ * @returns {value is Date} - `true` para instâncias de Date válidas.
1406
1542
  */
1407
1543
  function isValidDateInstance(value) {
1408
1544
  return value instanceof Date && !Number.isNaN(value.getTime());
1409
1545
  }
1410
1546
  /**
1411
- * Normaliza a data de referência para evitar valores inválidos.
1547
+ * Normaliza a `referenceDate` garantindo uma `Date` válida.
1548
+ * Quando `value` for inválido, retorna um fallback (data atual) e emite
1549
+ * um warning com o valor sugerido em ISO.
1412
1550
  *
1413
- * @param value - Valor recebido via prop.
1414
- * @returns Date válido para uso interno.
1551
+ * @param {unknown} value - Valor recebido via prop.
1552
+ * @returns {Date} - Data válida para uso interno.
1415
1553
  */
1416
1554
  function normalizeDatetimeInputReferenceDate(value) {
1417
1555
  if (isValidDateInstance(value))
@@ -1421,10 +1559,11 @@ function normalizeDatetimeInputReferenceDate(value) {
1421
1559
  return fallback;
1422
1560
  }
1423
1561
  /**
1424
- * Normaliza o valor selecionado do input (Date válido ou null).
1562
+ * Normaliza o `value` da prop para `Date` válido ou `null`.
1563
+ * Emite warning quando o valor é inválido e retorna `null`.
1425
1564
  *
1426
- * @param value - Valor recebido via prop.
1427
- * @returns Date válido ou null quando o valor é inválido.
1565
+ * @param {unknown} value - Valor recebido via prop.
1566
+ * @returns {Date | null} - Data válida ou `null`.
1428
1567
  */
1429
1568
  function normalizeDatetimeInputValue(value) {
1430
1569
  if (value === null)
@@ -1435,112 +1574,135 @@ function normalizeDatetimeInputValue(value) {
1435
1574
  return null;
1436
1575
  }
1437
1576
 
1438
- const datetimeInputCss = () => `*,*::before,*::after{box-sizing:border-box}:host{line-height:var(--font-line-height-medium);-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%}main{display:block}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace;font-size:1em}a{background-color:rgba(0,0,0,0)}b,strong{font-weight:bolder}code{font-family:monospace;font-size:1em}small{font-size:80%}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:var(--font-line-height-medium);margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{appearance:none}::-webkit-file-upload-button{appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}.d-none{display:none !important}@media (min-width: 576px){.d-sm-block{display:block !important}.d-sm-flex{display:flex !important}}[data-toggle=dropdown]+*{position:absolute}.dropdown{position:relative}.dropdown [data-toggle=dropdown]+*{box-shadow:var(--surface-shadow-sm);left:0;position:absolute;top:100%}.dropdown>.br-notification{left:auto;right:0}.dropdown .br-item{--color:var(--color-light);--color-rgb:var(--color-light-rgb);--text-color:var(--color-light);--interactive:var(--interactive-light);--interactive-rgb:var(--color-rgb);--visited:var(--visited-light);--hover:var(--hover-light);--pressed:var(--pressed-light);--focus-color:var(--focus-color-light);--focus:var(--focus-color-light);--item-padding-y:var(--spacing-scale-2x);background-color:var(--background-light);color:var(--color)}.dropdown .br-item:not(:last-child){border-bottom:1px solid var(--border-color)}.dropdown .br-item.selected{--color:var(--color-dark);--color-rgb:var(--color-dark-rgb);--text-color:var(--color-dark);--interactive:var(--interactive-dark);--interactive-rgb:var(--interactive-dark-rgb);--visited:var(--visited-dark);--hover:var(--hover-dark);--pressed:var(--pressed-dark);--focus-color:var(--focus-color-dark);--focus:var(--focus-color-dark)}.justify-content-start{justify-content:flex-start !important}.justify-content-end{justify-content:flex-end !important}.justify-content-center{justify-content:center !important}.align-items-center{align-items:center !important}.col,[class*=col-]{padding-left:calc(var(--grid-gutter)*.5);padding-right:calc(var(--grid-gutter)*.5);width:100%}.col{flex:1 0 0%;min-width:8.3333333333%}.col-auto{flex:0 0 auto;width:auto}.col-2{flex-basis:16.6666666667%;max-width:16.6666666667%}.container,.container-fluid,.container-lg{--grid-margin:var(--grid-portrait-margin);--grid-maxwidth:var(--grid-portrait-maxwidth);margin-left:auto;margin-right:auto;max-width:var(--grid-maxwidth);padding-left:var(--grid-margin);padding-right:var(--grid-margin);width:100%}.row{--grid-gutter:var(--grid-portrait-gutter);display:flex;flex-wrap:wrap;margin-left:calc(var(--grid-gutter)*-0.5);margin-right:calc(var(--grid-gutter)*-0.5)}@media (min-width: 576px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-tablet-margin)}.row{--grid-gutter:var(--grid-tablet-gutter)}.container{--grid-maxwidth:calc(var(--grid-breakpoint-sm) - var(--grid-tablet-margin))}.col-sm-4{flex-basis:33.3333333333%;max-width:33.3333333333%}}@media (min-width: 992px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-tablet-margin)}.row{--grid-gutter:var(--grid-tablet-gutter)}.container{--grid-maxwidth:calc(var(--grid-breakpoint-md) - var(--grid-tablet-margin))}}@media (min-width: 1280px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-desktop-margin)}.row{--grid-gutter:var(--grid-desktop-gutter)}.container,.container-lg{--grid-maxwidth:calc(var(--grid-breakpoint-lg) - var(--grid-desktop-margin))}.col-lg-3{flex-basis:25%;max-width:25%}}@media (min-width: 1600px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-tv-margin)}.row{--grid-gutter:var(--grid-tv-gutter)}.container,.container-lg{--grid-maxwidth:calc(var(--grid-breakpoint-xl) - var(--grid-tv-margin))}}.ease{animation-timing-function:cubic-bezier(0.25, 0.1, 0.25, 1)}.ease-out{animation-timing-function:cubic-bezier(0, 0, 0.58, 1)}.ease-in-out{animation-timing-function:cubic-bezier(0.42, 0, 0.58, 1)}.fast{animation-duration:var(--duration-fast)}.slow{animation-duration:var(--duration-slow)}.mt-1{margin-top:var(--spacing-scale-half) !important}.mr-1{margin-right:var(--spacing-scale-half) !important}.mb-1{margin-bottom:var(--spacing-scale-half) !important}.ml-1{margin-left:var(--spacing-scale-half) !important}.mx-3{margin-left:var(--spacing-scale-2x) !important;margin-right:var(--spacing-scale-2x) !important}.mb-4{margin-bottom:var(--spacing-scale-3x) !important}.ml-auto{margin-left:auto !important}.pt-half{padding-top:var(--spacing-scale-half) !important}@media (min-width: 576px){.ml-sm-0{margin-left:var(--spacing-scale-default) !important}}.highlight{background:var(--status-highlight-background) linear-gradient(var(--status-highlight-overlay), var(--status-highlight-overlay));color:var(--status-highlight-text);padding:0 var(--spacing-scale-half)}[disabled],.disabled{cursor:not-allowed;opacity:var(--disabled)}[disabled] *,.disabled *{pointer-events:none}fieldset[disabled]{opacity:1}.text-center{text-align:center !important}.text-right{text-align:right !important}.text-nowrap{white-space:nowrap !important}.text-uppercase{text-transform:uppercase !important}.text-bold{font-weight:700 !important}.text-base{font-size:var(--font-size-scale-base) !important}.text-down-01{font-size:var(--font-size-scale-down-01) !important}@media (min-width: 576px){.text-sm-center{text-align:center !important}.text-sm-left{text-align:left !important}.text-sm-right{text-align:right !important}}p{color:var(--color);font-size:var(--font-size-scale-base);font-weight:var(--font-weight-regular);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-2x);margin-top:0}p a{text-decoration:underline}@media (min-width: 576px){p{font-size:var(--font-size-scale-up-01)}}a{--focus-offset:var(--spacing-scale-half)}a:focus{outline:none}a.focus-visible,a:focus-visible{outline-color:var(--focus);outline-offset:var(--focus-offset);outline-style:var(--focus-style);outline-width:var(--focus-width)}a:not(:disabled):hover{background-image:linear-gradient(rgba(var(--interactive-rgb), var(--hover)), rgba(var(--interactive-rgb), var(--hover)))}a:not(:disabled):active{background-image:linear-gradient(rgba(var(--interactive-rgb), var(--pressed)), rgba(var(--interactive-rgb), var(--pressed)))}a{color:var(--interactive);text-decoration:none}.main-content a{text-decoration:underline}button{cursor:pointer}img{max-width:100%;vertical-align:middle}h2,.h2{color:var(--color);font-size:var(--font-size-scale-up-03);font-weight:var(--font-weight-semi-bold);line-height:var(--font-line-height-low);margin-bottom:var(--spacing-scale-2xh);margin-top:var(--spacing-scale-3xh);padding-bottom:var(--spacing-scale-2xh)}@media (min-width: 576px){.h2,h2{font-size:var(--font-size-scale-up-05);font-weight:var(--font-weight-regular)}}ul,ol{margin-bottom:var(--spacing-scale-2x);margin-top:0;padding:0 0 0 var(--spacing-scale-5x)}table{--table-background:var(--background);--table-color:var(--color);--table-border-color:var(--gray-20);--table-border-style:solid;--table-border-width:1px;--table-hover:var(--color-rgb);--table-padding:var(--spacing-scale-3x);--table-font-weight:var(--font-weight-medium);--table-th-background:var(--background-alternative);--table-th-font-weight:var(--font-weight-semi-bold);--table-row-size:var(--spacing-scale-2x);border-collapse:collapse;width:100%}tr.selected,tr.is-selected{--color:var(--color-dark);--color-rgb:var(--color-dark-rgb);--text-color:var(--color-dark);--interactive:var(--interactive-dark);--interactive-rgb:var(--interactive-dark-rgb);--visited:var(--visited-dark);--hover:var(--hover-dark);--pressed:var(--pressed-dark);--focus-color:var(--focus-color-dark);--focus:var(--focus-color-dark)}label,.label{color:var(--color);font-size:var(--font-size-scale-base);font-weight:var(--font-weight-semi-bold);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-half)}fieldset,.fieldset{border:var(--surface-width-none);margin-bottom:var(--spacing-scale-5x);margin-top:0;padding:0}legend,.legend{color:var(--color);font-size:var(--font-size-scale-up-01);font-weight:var(--font-weight-semi-bold);line-height:var(--font-line-height-low);margin-bottom:var(--spacing-scale-2x);margin-top:var(--spacing-scale-2x)}::placeholder,.placeholder{color:var(--color-light);font-size:var(--font-size-scale-base);font-style:italic;font-weight:var(--font-weight-regular);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-half);margin-top:var(--spacing-scale-half);opacity:1}input,textarea,.input{color:var(--color-light);font-size:var(--font-size-scale-up-01);font-weight:var(--font-weight-medium);line-height:var(--font-line-height-low);margin-bottom:var(--spacing-scale-half)}code,.code{background:var(--gray-5);border-radius:4px;color:var(--gray-80);display:inline-block;font-family:monospace;font-size:var(--font-size-scale-base);font-weight:var(--font-weight-medium);line-height:var(--font-line-height-low);padding:var(--spacing-scale-half)}pre,.pre{background:var(--gray-5);margin:var(--spacing-scale-2x) 0 var(--spacing-scale-4x);padding:var(--spacing-scale-2x)}pre code,.pre code{display:inline;padding:0}*[data-toggle=collapse]:not(:disabled):hover{background-image:linear-gradient(rgba(var(--interactive-rgb), var(--hover)), rgba(var(--interactive-rgb), var(--hover)))}*[data-toggle=collapse]:focus{outline:none}*[data-toggle=collapse].focus-visible,*[data-toggle=collapse]:focus-visible{outline-color:var(--focus);outline-offset:var(--focus-offset);outline-style:var(--focus-style);outline-width:var(--focus-width)}@media (prefers-reduced-motion: reduce){:host,:host::before,:host::after,:host *,:host *::before,:host *::after{animation:none !important;scroll-behavior:auto !important;transition:none !important}}:host-context([data-wbc-reduced-motion=true])::before,:host-context([data-wbc-reduced-motion=true])::after,:host-context([data-wbc-reduced-motion=true]) *,:host-context([data-wbc-reduced-motion=true]) *::before,:host-context([data-wbc-reduced-motion=true]) *::after{animation:none !important;scroll-behavior:auto !important;transition:none !important}:host{display:block;width:100%}br-input[disabled]{opacity:1}`;
1577
+ const datetimeInputCss = () => `*,*::before,*::after{box-sizing:border-box}:host{line-height:var(--font-line-height-medium);-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%}main{display:block}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace;font-size:1em}a{background-color:rgba(0,0,0,0)}b,strong{font-weight:bolder}small{font-size:80%}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:var(--font-line-height-medium);margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{appearance:none}::-webkit-file-upload-button{appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}.d-none{display:none !important}@media (min-width: 576px){.d-sm-block{display:block !important}.d-sm-flex{display:flex !important}}[data-toggle=dropdown]+*{position:absolute}.dropdown{position:relative}.dropdown [data-toggle=dropdown]+*{box-shadow:var(--surface-shadow-sm);left:0;position:absolute;top:100%}.dropdown>.br-notification{left:auto;right:0}.dropdown .br-item{--color:var(--color-light);--color-rgb:var(--color-light-rgb);--text-color:var(--color-light);--interactive:var(--interactive-light);--interactive-rgb:var(--color-rgb);--visited:var(--visited-light);--hover:var(--hover-light);--pressed:var(--pressed-light);--focus-color:var(--focus-color-light);--focus:var(--focus-color-light);--item-padding-y:var(--spacing-scale-2x);background-color:var(--background-light);color:var(--color)}.dropdown .br-item:not(:last-child){border-bottom:1px solid var(--border-color)}.dropdown .br-item.selected{--color:var(--color-dark);--color-rgb:var(--color-dark-rgb);--text-color:var(--color-dark);--interactive:var(--interactive-dark);--interactive-rgb:var(--interactive-dark-rgb);--visited:var(--visited-dark);--hover:var(--hover-dark);--pressed:var(--pressed-dark);--focus-color:var(--focus-color-dark);--focus:var(--focus-color-dark)}.justify-content-start{justify-content:flex-start !important}.justify-content-end{justify-content:flex-end !important}.justify-content-center{justify-content:center !important}.align-items-center{align-items:center !important}.col,[class*=col-]{padding-left:calc(var(--grid-gutter)*.5);padding-right:calc(var(--grid-gutter)*.5);width:100%}.col{flex:1 0 0%;min-width:8.3333333333%}.col-auto{flex:0 0 auto;width:auto}.col-2{flex-basis:16.6666666667%;max-width:16.6666666667%}.container,.container-fluid,.container-lg{--grid-margin:var(--grid-portrait-margin);--grid-maxwidth:var(--grid-portrait-maxwidth);margin-left:auto;margin-right:auto;max-width:var(--grid-maxwidth);padding-left:var(--grid-margin);padding-right:var(--grid-margin);width:100%}.row{--grid-gutter:var(--grid-portrait-gutter);display:flex;flex-wrap:wrap;margin-left:calc(var(--grid-gutter)*-0.5);margin-right:calc(var(--grid-gutter)*-0.5)}@media (min-width: 576px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-tablet-margin)}.row{--grid-gutter:var(--grid-tablet-gutter)}.container{--grid-maxwidth:calc(var(--grid-breakpoint-sm) - var(--grid-tablet-margin))}.col-sm-4{flex-basis:33.3333333333%;max-width:33.3333333333%}}@media (min-width: 992px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-tablet-margin)}.row{--grid-gutter:var(--grid-tablet-gutter)}.container{--grid-maxwidth:calc(var(--grid-breakpoint-md) - var(--grid-tablet-margin))}}@media (min-width: 1280px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-desktop-margin)}.row{--grid-gutter:var(--grid-desktop-gutter)}.container,.container-lg{--grid-maxwidth:calc(var(--grid-breakpoint-lg) - var(--grid-desktop-margin))}.col-lg-3{flex-basis:25%;max-width:25%}}@media (min-width: 1600px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-tv-margin)}.row{--grid-gutter:var(--grid-tv-gutter)}.container,.container-lg{--grid-maxwidth:calc(var(--grid-breakpoint-xl) - var(--grid-tv-margin))}}.ease{animation-timing-function:cubic-bezier(0.25, 0.1, 0.25, 1)}.ease-out{animation-timing-function:cubic-bezier(0, 0, 0.58, 1)}.ease-in-out{animation-timing-function:cubic-bezier(0.42, 0, 0.58, 1)}.fast{animation-duration:var(--duration-fast)}.slow{animation-duration:var(--duration-slow)}.mt-1{margin-top:var(--spacing-scale-half) !important}.mr-1{margin-right:var(--spacing-scale-half) !important}.mb-1{margin-bottom:var(--spacing-scale-half) !important}.ml-1{margin-left:var(--spacing-scale-half) !important}.mx-3{margin-left:var(--spacing-scale-2x) !important;margin-right:var(--spacing-scale-2x) !important}.mb-4{margin-bottom:var(--spacing-scale-3x) !important}.ml-auto{margin-left:auto !important}.pt-half{padding-top:var(--spacing-scale-half) !important}@media (min-width: 576px){.ml-sm-0{margin-left:var(--spacing-scale-default) !important}}.highlight{background:var(--status-highlight-background) linear-gradient(var(--status-highlight-overlay), var(--status-highlight-overlay));color:var(--status-highlight-text);padding:0 var(--spacing-scale-half)}[disabled],.disabled{cursor:not-allowed;opacity:var(--disabled)}[disabled] *,.disabled *{pointer-events:none}fieldset[disabled]{opacity:1}.text-center{text-align:center !important}.text-right{text-align:right !important}.text-nowrap{white-space:nowrap !important}.text-uppercase{text-transform:uppercase !important}.text-bold{font-weight:700 !important}.text-base{font-size:var(--font-size-scale-base) !important}.text-down-01{font-size:var(--font-size-scale-down-01) !important}@media (min-width: 576px){.text-sm-center{text-align:center !important}.text-sm-left{text-align:left !important}.text-sm-right{text-align:right !important}}p{color:var(--color);font-size:var(--font-size-scale-base);font-weight:var(--font-weight-regular);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-2x);margin-top:0}p a{text-decoration:underline}@media (min-width: 576px){p{font-size:var(--font-size-scale-up-01)}}a{--focus-offset:var(--spacing-scale-half)}a:focus{outline:none}a.focus-visible,a:focus-visible{outline-color:var(--focus);outline-offset:var(--focus-offset);outline-style:var(--focus-style);outline-width:var(--focus-width)}a:not(:disabled):hover{background-image:linear-gradient(rgba(var(--interactive-rgb), var(--hover)), rgba(var(--interactive-rgb), var(--hover)))}a:not(:disabled):active{background-image:linear-gradient(rgba(var(--interactive-rgb), var(--pressed)), rgba(var(--interactive-rgb), var(--pressed)))}a{color:var(--interactive);text-decoration:none}.main-content a{text-decoration:underline}button{cursor:pointer}img{max-width:100%;vertical-align:middle}h2,.h2{color:var(--color);font-size:var(--font-size-scale-up-03);font-weight:var(--font-weight-semi-bold);line-height:var(--font-line-height-low);margin-bottom:var(--spacing-scale-2xh);margin-top:var(--spacing-scale-3xh);padding-bottom:var(--spacing-scale-2xh)}@media (min-width: 576px){.h2,h2{font-size:var(--font-size-scale-up-05);font-weight:var(--font-weight-regular)}}ul,ol{margin-bottom:var(--spacing-scale-2x);margin-top:0;padding:0 0 0 var(--spacing-scale-5x)}table{--table-background:var(--background);--table-color:var(--color);--table-border-color:var(--gray-20);--table-border-style:solid;--table-border-width:1px;--table-hover:var(--color-rgb);--table-padding:var(--spacing-scale-3x);--table-font-weight:var(--font-weight-medium);--table-th-background:var(--background-alternative);--table-th-font-weight:var(--font-weight-semi-bold);--table-row-size:var(--spacing-scale-2x);border-collapse:collapse;width:100%}tr.selected,tr.is-selected{--color:var(--color-dark);--color-rgb:var(--color-dark-rgb);--text-color:var(--color-dark);--interactive:var(--interactive-dark);--interactive-rgb:var(--interactive-dark-rgb);--visited:var(--visited-dark);--hover:var(--hover-dark);--pressed:var(--pressed-dark);--focus-color:var(--focus-color-dark);--focus:var(--focus-color-dark)}label,.label{color:var(--color);font-size:var(--font-size-scale-base);font-weight:var(--font-weight-semi-bold);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-half)}fieldset,.fieldset{border:var(--surface-width-none);margin-bottom:var(--spacing-scale-5x);margin-top:0;padding:0}legend,.legend{color:var(--color);font-size:var(--font-size-scale-up-01);font-weight:var(--font-weight-semi-bold);line-height:var(--font-line-height-low);margin-bottom:var(--spacing-scale-2x);margin-top:var(--spacing-scale-2x)}::placeholder,.placeholder{color:var(--color-light);font-size:var(--font-size-scale-base);font-style:italic;font-weight:var(--font-weight-regular);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-half);margin-top:var(--spacing-scale-half);opacity:1}input,textarea,.input{color:var(--color-light);font-size:var(--font-size-scale-up-01);font-weight:var(--font-weight-medium);line-height:var(--font-line-height-low);margin-bottom:var(--spacing-scale-half)}pre,.pre{background:var(--gray-5);margin:var(--spacing-scale-2x) 0 var(--spacing-scale-4x);padding:var(--spacing-scale-2x)}*[data-toggle=collapse]:not(:disabled):hover{background-image:linear-gradient(rgba(var(--interactive-rgb), var(--hover)), rgba(var(--interactive-rgb), var(--hover)))}*[data-toggle=collapse]:focus{outline:none}*[data-toggle=collapse].focus-visible,*[data-toggle=collapse]:focus-visible{outline-color:var(--focus);outline-offset:var(--focus-offset);outline-style:var(--focus-style);outline-width:var(--focus-width)}@media (prefers-reduced-motion: reduce){:host,:host::before,:host::after,:host *,:host *::before,:host *::after{animation:none !important;scroll-behavior:auto !important;transition:none !important}}:host-context([data-wbc-reduced-motion=true])::before,:host-context([data-wbc-reduced-motion=true])::after,:host-context([data-wbc-reduced-motion=true]) *,:host-context([data-wbc-reduced-motion=true]) *::before,:host-context([data-wbc-reduced-motion=true]) *::after{animation:none !important;scroll-behavior:auto !important;transition:none !important}:host{display:block;width:100%}br-input[disabled]{opacity:1}`;
1439
1578
 
1440
1579
  const DatetimeInput = class {
1441
1580
  constructor(hostRef) {
1442
1581
  registerInstance(this, hostRef);
1443
1582
  this.dateStateChange = createEvent(this, "dateStateChange", 7);
1444
1583
  this.togglePicker = createEvent(this, "togglePicker", 7);
1445
- /** Valor textual exibido no campo e usado durante a edição manual. */
1446
- this.inputValue = '';
1584
+ this.inputValidationChange = createEvent(this, "inputValidationChange", 7);
1447
1585
  /**
1448
- * Define o placeholder do campo de entrada.
1586
+ * Texto de placeholder exibido quando o campo estiver vazio.
1449
1587
  *
1450
1588
  * @default ''
1451
1589
  */
1452
1590
  this.placeholder = '';
1453
1591
  /**
1454
- * Define o modo de entrada: `date`, `time` ou `datetime`.
1592
+ * Modo de entrada que controla máscara, parser e formato exibido.
1455
1593
  *
1456
1594
  * @default 'datetime'
1457
1595
  */
1458
1596
  this.mode = 'datetime';
1459
1597
  /**
1460
- * Data de referência que orienta a navegação visual do calendário sem alterar a seleção.
1461
- * Recebe uma instância de `Date` por property binding.
1598
+ * Data de referência usada para navegação e preenchimento de valores parciais.
1462
1599
  *
1463
1600
  * @default new Date()
1464
- * @example
1465
- * ```js
1466
- * const input = document.querySelector('br-datetime-input');
1467
- * input.referenceDate = new Date(2026, 8, 1);
1468
- * ```
1469
1601
  */
1470
1602
  this.referenceDate = new Date();
1471
1603
  /**
1472
- * Data efetivamente selecionada, ou `null` quando nada foi escolhido; é diferente
1473
- * de `referenceDate`, que controla apenas a referência visual.
1474
- * Recebe uma instância de `Date` por property binding.
1604
+ * Valor atualmente selecionado pelo componente.
1475
1605
  *
1476
1606
  * @default null
1477
- * @example
1478
- * ```js
1479
- * const input = document.querySelector('br-datetime-input');
1480
- * input.value = new Date(2026, 8, 7, 14, 30);
1481
- * ```
1482
1607
  */
1483
1608
  this.value = null;
1484
1609
  /**
1485
- * Desabilita digitação e abertura do picker quando ativo.
1610
+ * Controla os estados de read-only ou bloqueio de formulário.
1486
1611
  *
1487
1612
  * @default false
1488
1613
  */
1489
1614
  this.disabled = false;
1490
1615
  /**
1491
- * Define se a seleção ocorre por data única ou por intervalo.
1492
- * Aceita `single` ou `range`; valores inválidos usam `single`.
1616
+ * Define o modo de seleção: `single` (valor único) ou `range` (intervalo).
1493
1617
  *
1494
1618
  * @default 'single'
1495
1619
  */
1496
1620
  this.selectionMode = 'single';
1497
1621
  /**
1498
- * Data inicial do intervalo quando em modo range.
1622
+ * Início do intervalo em `selectionMode === 'range'`.
1499
1623
  *
1500
1624
  * @default null
1501
1625
  */
1502
1626
  this.rangeStart = null;
1503
1627
  /**
1504
- * Data final do intervalo quando em modo range.
1628
+ * Fim do intervalo em `selectionMode === 'range'`.
1505
1629
  *
1506
1630
  * @default null
1507
1631
  */
1508
1632
  this.rangeEnd = null;
1633
+ /**
1634
+ * Marcador do último texto confirmado (commit) exibido no input.
1635
+ *
1636
+ * @internal
1637
+ * @type {string | null}
1638
+ * @default null
1639
+ */
1640
+ this.lastCommittedInputText = null;
1641
+ /**
1642
+ * Texto atual do campo usado durante a edição manual.
1643
+ *
1644
+ * @internal Mantido localmente; não faz parte do contrato público do componente.
1645
+ * @type {string}
1646
+ * @default ''
1647
+ */
1648
+ this.inputValue = '';
1649
+ /**
1650
+ * Handler do clique no botão de ação interno.
1651
+ *
1652
+ * @param event - Ativação pública da ação do br-input.
1653
+ * @returns {void}
1654
+ */
1509
1655
  this.handleActionButtonClick = (event) => {
1510
1656
  if (this.disabled)
1511
1657
  return;
1512
1658
  event.stopPropagation();
1659
+ event.detail.originalEvent.stopPropagation();
1513
1660
  this.togglePicker.emit();
1514
1661
  };
1515
1662
  /**
1516
- * Confirma o conteúdo digitado quando o foco sai do input nativo, inclusive
1517
- * quando avança para o botão de calendário dentro do mesmo `br-input`.
1663
+ * Blur handler: consome o evento e confirma o conteúdo atual.
1664
+ *
1665
+ * @param {FocusEvent} event - Evento de blur do input.
1666
+ * @returns {void}
1518
1667
  */
1519
1668
  this.handleInputBlur = (event) => {
1520
- if (!(event.composedPath()[0] instanceof HTMLInputElement)) {
1521
- return;
1522
- }
1523
- if (this.disabled) {
1524
- return;
1525
- }
1526
- this.commitInputValue();
1669
+ event.stopPropagation();
1670
+ this.commitCurrentInput();
1671
+ };
1672
+ /**
1673
+ * Handler para commit disparado pelo `change` do `br-input`.
1674
+ *
1675
+ * @param {Event} event - Evento de change.
1676
+ * @returns {void}
1677
+ */
1678
+ this.handleInputCommit = (event) => {
1679
+ event.stopPropagation();
1680
+ this.commitCurrentInput();
1527
1681
  };
1528
1682
  /**
1529
1683
  * Atualiza o estado local com o valor digitado no campo.
1530
1684
  *
1531
- * @param event - Evento de input disparado pelo campo textual.
1685
+ * @param {Event} event - Evento de input redistribuído pelo `br-input`.
1686
+ * @returns {void}
1532
1687
  */
1533
1688
  this.handleInputChange = (event) => {
1689
+ event.stopPropagation();
1534
1690
  if (this.disabled) {
1535
1691
  return;
1536
1692
  }
1537
1693
  const input = event.target;
1538
- this.inputValue = input.value;
1694
+ this.lastCommittedInputText = null;
1695
+ this.emitInputValidation(null);
1696
+ this.setInternalInputValue(input.value ?? '');
1539
1697
  };
1540
1698
  /**
1541
- * Permite confirmar a digitação pressionando Enter.
1699
+ * Handler de teclado no campo de entrada.
1700
+ *
1701
+ * Suporta atalhos ARIA (Alt+ArrowDown / F4) para abrir/fechar o picker
1702
+ * e Enter para confirmar a edição.
1542
1703
  *
1543
- * @param event - Evento de teclado do campo de entrada.
1704
+ * @param {KeyboardEvent} event - Evento de teclado.
1705
+ * @returns {void}
1544
1706
  */
1545
1707
  this.handleInputKeydown = (event) => {
1546
1708
  if (this.disabled) {
@@ -1552,37 +1714,23 @@ const DatetimeInput = class {
1552
1714
  this.togglePicker.emit();
1553
1715
  return;
1554
1716
  }
1555
- if (event.key === 'Enter') {
1556
- this.commitInputValue();
1557
- }
1558
- };
1559
- /**
1560
- * Evita propagação do clique e solicita a abertura/fechamento do picker.
1561
- *
1562
- * @param event - Evento de clique no ícone de ação.
1563
- */
1564
- this.handleToggleDropdown = (event) => {
1565
- if (this.disabled) {
1566
- return;
1717
+ if (event.key === 'Enter' && event.composedPath().some((target) => target instanceof HTMLInputElement)) {
1718
+ // Previne submissão de formulários e garante deduplicação
1719
+ // usando a mesma rotina que blur/change usam.
1720
+ event.preventDefault();
1721
+ this.commitCurrentInput();
1567
1722
  }
1568
- event.stopPropagation();
1569
- this.togglePicker.emit();
1570
1723
  };
1571
1724
  }
1572
- /** Move o foco para o input interno sem expor a árvore privada ao componente pai. @internal */
1573
- async focusInput() {
1574
- this.el.shadowRoot?.querySelector('br-input')?.focus();
1575
- }
1576
- get effectiveSelectionMode() {
1577
- return resolveAllowedPropValue(this.el, 'selectionMode', this.selectionMode, ['single', 'range'], 'single');
1578
- }
1725
+ /**
1726
+ * Watcher: sincroniza `rangeStart`/`rangeEnd` a partir de `rangeValue` controlado.
1727
+ *
1728
+ * @param {DatetimePickerDateRange | undefined} newValue - Novo intervalo ou `undefined`.
1729
+ * @returns {void}
1730
+ */
1579
1731
  handleRangeValueChange(newValue) {
1580
1732
  if (!newValue)
1581
1733
  return;
1582
- if (!isValidDatetimePickerDateRange(newValue)) {
1583
- reportInvalidPropValue(this.el, 'rangeValue', newValue, 'Informe um objeto com `start` e `end` como Date válido ou null.', 'Ignorando o intervalo inválido e mantendo o último intervalo efetivo.');
1584
- return;
1585
- }
1586
1734
  this.rangeStart = newValue.start;
1587
1735
  this.rangeEnd = newValue.end;
1588
1736
  this.syncInputValueFromProps();
@@ -1592,6 +1740,13 @@ const DatetimeInput = class {
1592
1740
  *
1593
1741
  * @param newValue - Novo valor recebido via prop.
1594
1742
  */
1743
+ /**
1744
+ * Watcher: reage a mudanças externas em `value`, normalizando e sincronizando
1745
+ * o texto exibido no input.
1746
+ *
1747
+ * @param {Date | null} newValue - Novo valor recebido via prop.
1748
+ * @returns {void}
1749
+ */
1595
1750
  handleValueChange(newValue) {
1596
1751
  this.ensureValidValue(newValue);
1597
1752
  this.syncInputValueFromProps();
@@ -1601,6 +1756,12 @@ const DatetimeInput = class {
1601
1756
  *
1602
1757
  * @param newValue - Novo modo recebido via prop.
1603
1758
  */
1759
+ /**
1760
+ * Watcher: aplica normalização do `mode` e atualiza a máscara/valor exibido.
1761
+ *
1762
+ * @param {string} newValue - Novo modo recebido via prop.
1763
+ * @returns {void}
1764
+ */
1604
1765
  handleModeChange(newValue) {
1605
1766
  this.ensureValidMode(newValue);
1606
1767
  this.syncInputValueFromProps();
@@ -1610,6 +1771,12 @@ const DatetimeInput = class {
1610
1771
  *
1611
1772
  * @param newValue - Nova data de referência recebida.
1612
1773
  */
1774
+ /**
1775
+ * Watcher: valida `referenceDate` e resina o input quando não há seleção.
1776
+ *
1777
+ * @param {Date} newValue - Nova data de referência recebida.
1778
+ * @returns {void}
1779
+ */
1613
1780
  handleReferenceDateChange(newValue) {
1614
1781
  this.ensureValidReferenceDate(newValue);
1615
1782
  if (this.value === null) {
@@ -1621,8 +1788,13 @@ const DatetimeInput = class {
1621
1788
  *
1622
1789
  * @param newValue - Nova data inicial do range.
1623
1790
  */
1791
+ /**
1792
+ * Watcher: atualiza a representação textual quando o início do range muda.
1793
+ *
1794
+ * @returns {void}
1795
+ */
1624
1796
  handleRangeStartChange() {
1625
- if (this.effectiveSelectionMode === 'range') {
1797
+ if (this.selectionMode === 'range') {
1626
1798
  this.syncInputValueFromProps();
1627
1799
  }
1628
1800
  }
@@ -1631,8 +1803,13 @@ const DatetimeInput = class {
1631
1803
  *
1632
1804
  * @param newValue - Nova data final do range.
1633
1805
  */
1806
+ /**
1807
+ * Watcher: atualiza a representação textual quando o fim do range muda.
1808
+ *
1809
+ * @returns {void}
1810
+ */
1634
1811
  handleRangeEndChange() {
1635
- if (this.effectiveSelectionMode === 'range') {
1812
+ if (this.selectionMode === 'range') {
1636
1813
  this.syncInputValueFromProps();
1637
1814
  }
1638
1815
  }
@@ -1647,41 +1824,36 @@ const DatetimeInput = class {
1647
1824
  this.syncInputValueFromProps();
1648
1825
  }
1649
1826
  /**
1650
- * Registra os listeners do input nativo e do botão de ação após o DOM estar disponível.
1827
+ * Confirma o conteúdo atual evitando commits duplicados (blur + change).
1651
1828
  *
1652
- * O br-button que envolve o slot "action" é focável. Quando Space/Enter é pressionado,
1653
- * o browser dispara um click sintético. Adicionamos um listener imperativo para
1654
- * garantir que o clique no botão de ação acione o toggle. O blur é observado na raiz
1655
- * interna porque mover o foco do input para essa ação não desfoca o host `br-input`.
1829
+ * @returns {void}
1656
1830
  */
1657
- async componentDidLoad() {
1658
- // Tenta encontrar o br-button dentro do br-input que envolve o slot action
1659
- const brInput = this.el.shadowRoot?.querySelector('br-input');
1660
- if (!brInput)
1661
- return;
1662
- if (!brInput.shadowRoot)
1663
- await brInput.componentOnReady();
1664
- if (!this.el.isConnected || !brInput.shadowRoot)
1831
+ commitCurrentInput() {
1832
+ if (this.disabled)
1665
1833
  return;
1666
- this.inputShadowRoot = brInput.shadowRoot;
1667
- this.inputShadowRoot.addEventListener('blur', this.handleInputBlur, true);
1668
- const actionButton = this.inputShadowRoot.querySelector('br-button.button-transform');
1669
- if (!actionButton)
1834
+ const currentText = this.inputValue.trim();
1835
+ if (this.lastCommittedInputText === currentText)
1670
1836
  return;
1671
- this.actionButton = actionButton;
1672
- // Listener para clique no botão de ação (funciona para mouse e Space/Enter via button nativo)
1673
- actionButton.addEventListener('click', this.handleActionButtonClick);
1837
+ this.lastCommittedInputText = currentText;
1838
+ this.commitInputValue();
1839
+ this.lastCommittedInputText = this.inputValue.trim();
1674
1840
  }
1675
- disconnectedCallback() {
1676
- this.inputShadowRoot?.removeEventListener('blur', this.handleInputBlur, true);
1677
- this.inputShadowRoot = undefined;
1678
- this.actionButton?.removeEventListener('click', this.handleActionButtonClick);
1679
- this.actionButton = undefined;
1841
+ /**
1842
+ * Retorna a máscara delegada ao `br-input` de acordo com o modo atual.
1843
+ *
1844
+ * @returns {string | undefined} - Máscara a ser aplicada, ou `undefined` quando indisponível.
1845
+ */
1846
+ getInputMask() {
1847
+ if (this.selectionMode === 'range') {
1848
+ const boundaryMask = INPUT_FORMAT_CONFIG[this.mode].mask;
1849
+ return `${boundaryMask} - ${boundaryMask}`;
1850
+ }
1851
+ return INPUT_FORMAT_CONFIG[this.mode].mask;
1680
1852
  }
1681
1853
  /**
1682
1854
  * Retorna o rótulo acessível do botão de alternância do picker.
1683
1855
  *
1684
- * @returns Texto anunciado pelo leitor de tela para o ícone de ação.
1856
+ * @returns {string} - Texto anunciado pelo leitor de tela para o ícone de ação.
1685
1857
  */
1686
1858
  getToggleAriaLabel() {
1687
1859
  switch (this.mode) {
@@ -1694,9 +1866,10 @@ const DatetimeInput = class {
1694
1866
  }
1695
1867
  }
1696
1868
  /**
1697
- * Normaliza o modo de operação para um valor suportado.
1869
+ * Normaliza e aplica um modo válido (`date` | `time` | `datetime`).
1698
1870
  *
1699
- * @param value - Modo informado externamente.
1871
+ * @param {string} value - Modo informado externamente.
1872
+ * @returns {void}
1700
1873
  */
1701
1874
  ensureValidMode(value = this.mode) {
1702
1875
  const normalizedMode = normalizeDatetimeInputMode(value);
@@ -1705,9 +1878,10 @@ const DatetimeInput = class {
1705
1878
  }
1706
1879
  }
1707
1880
  /**
1708
- * Garante que a data de referência seja uma instância válida de `Date`.
1881
+ * Garante que `referenceDate` seja uma `Date` válida; caso contrário, normaliza.
1709
1882
  *
1710
- * @param value - Data de referência recebida via prop.
1883
+ * @param {Date} value - Data de referência recebida via prop.
1884
+ * @returns {void}
1711
1885
  */
1712
1886
  ensureValidReferenceDate(value = this.referenceDate) {
1713
1887
  const normalizedReferenceDate = normalizeDatetimeInputReferenceDate(value);
@@ -1718,7 +1892,8 @@ const DatetimeInput = class {
1718
1892
  /**
1719
1893
  * Normaliza o valor selecionado para `Date` válido ou `null`.
1720
1894
  *
1721
- * @param value - Valor recebido via prop.
1895
+ * @param {Date | null} value - Valor recebido via prop.
1896
+ * @returns {void}
1722
1897
  */
1723
1898
  ensureValidValue(value = this.value) {
1724
1899
  const normalizedValue = normalizeDatetimeInputValue(value);
@@ -1728,47 +1903,131 @@ const DatetimeInput = class {
1728
1903
  }
1729
1904
  /**
1730
1905
  * Consolida o texto digitado, tenta analisar e emite o novo estado selecionado.
1906
+ *
1907
+ * Trata modos `single` e `range` e valida mensagens de erro apropriadas.
1908
+ *
1909
+ * @returns {void}
1731
1910
  */
1732
1911
  commitInputValue() {
1733
1912
  const inputText = this.inputValue.trim();
1734
1913
  if (inputText === '') {
1914
+ this.emitInputValidation(true);
1735
1915
  this.value = null;
1736
1916
  this.dateStateChange.emit({
1737
1917
  referenceDate: this.referenceDate,
1738
1918
  value: null,
1919
+ origin: this.el.tagName,
1739
1920
  });
1740
1921
  this.emitNativeValueChange();
1741
1922
  return;
1742
1923
  }
1743
- if (this.effectiveSelectionMode === 'range' && this.mode === 'date') {
1924
+ if (this.selectionMode === 'range') {
1744
1925
  const parsedRange = this.parseRangeInput(inputText);
1745
- if (parsedRange === null)
1926
+ if (parsedRange === null) {
1927
+ this.emitInputValidation(false, this.getRangeValidationMessage(inputText));
1746
1928
  return;
1929
+ }
1930
+ if (this.mode === 'datetime' && compareAscExports.compareAsc(parsedRange.end, parsedRange.start) < 0) {
1931
+ this.emitInputValidation(false, DATETIME_RANGE_ORDER_MESSAGE);
1932
+ return;
1933
+ }
1747
1934
  const normalizedRange = this.normalizeRangeBounds(parsedRange.start, parsedRange.end);
1935
+ this.emitInputValidation(true);
1748
1936
  this.rangeValue = normalizedRange;
1749
- this.inputValue = `${this.formatDateByMode(normalizedRange.start)} - ${this.formatDateByMode(normalizedRange.end)}`;
1937
+ this.setInternalInputValue(`${this.formatDateByMode(normalizedRange.start)} - ${this.formatDateByMode(normalizedRange.end)}`);
1750
1938
  this.value = normalizedRange.end;
1751
1939
  this.dateStateChange.emit({
1752
1940
  referenceDate: normalizedRange.end,
1753
1941
  value: normalizedRange.end,
1754
1942
  range: normalizedRange,
1943
+ origin: this.el.tagName,
1755
1944
  });
1756
1945
  this.emitNativeValueChange();
1757
1946
  return;
1758
1947
  }
1948
+ if (!this.isInputComplete(inputText)) {
1949
+ this.emitInputValidation(false, this.getInputValidationMessage(inputText));
1950
+ return;
1951
+ }
1759
1952
  const parsed = this.parseInputValue(inputText);
1760
- if (parsed === null)
1953
+ if (parsed === null) {
1954
+ this.emitInputValidation(false, this.getInputValidationMessage(inputText));
1761
1955
  return;
1956
+ }
1957
+ this.emitInputValidation(true);
1762
1958
  const newDate = new Date(parsed);
1763
1959
  newDate.setSeconds(0, 0);
1764
- this.inputValue = this.formatDateByMode(newDate);
1960
+ this.setInternalInputValue(this.formatDateByMode(newDate));
1765
1961
  this.value = newDate;
1766
1962
  this.dateStateChange.emit({
1767
1963
  referenceDate: newDate,
1768
1964
  value: newDate,
1965
+ origin: this.el.tagName,
1769
1966
  });
1770
1967
  this.emitNativeValueChange();
1771
1968
  }
1969
+ /**
1970
+ * Emite o resultado da validação textual sem alterar o valor selecionado.
1971
+ *
1972
+ * @param {boolean} valid - Indica se a entrada é válida.
1973
+ * @param {string} [message] - Mensagem de erro quando inválido.
1974
+ * @returns {void}
1975
+ */
1976
+ emitInputValidation(valid, message = '') {
1977
+ this.inputValidationChange.emit({ valid, message: valid ? '' : message, origin: this.el.tagName });
1978
+ }
1979
+ /**
1980
+ * Verifica se a entrada possui a quantidade de dígitos esperada para o modo atual.
1981
+ *
1982
+ * @param {string} value - Texto de entrada a ser verificado.
1983
+ * @returns {boolean} - `true` quando completo.
1984
+ */
1985
+ isInputComplete(value) {
1986
+ const digits = value.replace(/\D/g, '');
1987
+ const config = INPUT_FORMAT_CONFIG[this.mode];
1988
+ return config.acceptedDigitCounts.includes(digits.length);
1989
+ }
1990
+ /**
1991
+ * Retorna mensagem de validação contextual para uma entrada incompleta ou inválida.
1992
+ *
1993
+ * @param {string} value - Texto de entrada a ser avaliado.
1994
+ * @returns {string} - Mensagem de validação apropriada.
1995
+ */
1996
+ getInputValidationMessage(value) {
1997
+ const digits = value.replace(/\D/g, '');
1998
+ const config = INPUT_FORMAT_CONFIG[this.mode];
1999
+ if (!config)
2000
+ return 'Informe um valor válido.';
2001
+ const digitCount = digits.length;
2002
+ if (this.mode === 'datetime' &&
2003
+ config.acceptedDigitCounts.includes(digitCount) &&
2004
+ digitCount < config.fullDigitCount) {
2005
+ return config.messages.invalid;
2006
+ }
2007
+ return digitCount < config.fullDigitCount ? config.messages.incomplete : config.messages.invalid;
2008
+ }
2009
+ /**
2010
+ * Mensagem específica para o formato de intervalo do modo atual.
2011
+ *
2012
+ * @param {string} value - Texto de intervalo informado no input.
2013
+ * @returns {string} - Mensagem de validação do intervalo.
2014
+ */
2015
+ getRangeValidationMessage(value) {
2016
+ const [startRaw = '', endRaw = ''] = value.split(/\s*-\s*/, 2);
2017
+ const startDigits = startRaw.replace(/\D/g, '');
2018
+ const endDigits = endRaw.replace(/\D/g, '');
2019
+ const config = INPUT_FORMAT_CONFIG[this.mode];
2020
+ const expectedDigits = config.fullDigitCount;
2021
+ if (startDigits.length < expectedDigits || endDigits.length < expectedDigits) {
2022
+ return `Complete o intervalo no formato ${config.rangeFormat}.`;
2023
+ }
2024
+ return config.messages.invalidRange;
2025
+ }
2026
+ /**
2027
+ * Dispara eventos nativos `input` e `change` para compatibilidade com forms.
2028
+ *
2029
+ * @returns {void}
2030
+ */
1772
2031
  emitNativeValueChange() {
1773
2032
  dispatchNativeFormEvent(this.el, 'input');
1774
2033
  dispatchNativeFormEvent(this.el, 'change');
@@ -1790,55 +2049,90 @@ const DatetimeInput = class {
1790
2049
  return null;
1791
2050
  }
1792
2051
  const base = this.referenceDate ?? toDateExports.toDate(new Date());
1793
- const parsedStart = this.parseDateInput(startText, base);
1794
- const parsedEnd = this.parseDateInput(endText, base);
2052
+ const parsedStart = this.parseInputValue(startText, this.rangeStart ?? base);
2053
+ const parsedEnd = this.parseInputValue(endText, this.rangeEnd ?? base);
1795
2054
  if (parsedStart === null || parsedEnd === null) {
1796
2055
  return null;
1797
2056
  }
1798
2057
  return { start: parsedStart, end: parsedEnd };
1799
2058
  }
1800
- /** Normaliza os limites do intervalo para garantir ordem cronológica. */
2059
+ /**
2060
+ * Normaliza os limites do intervalo para garantir ordem cronológica.
2061
+ *
2062
+ * - Em `time` e `datetime` mantém os limites informados.
2063
+ * - Em `date` reordena caso necessário.
2064
+ *
2065
+ * @param {Date} start - Data de início.
2066
+ * @param {Date} end - Data de término.
2067
+ * @returns {{ start: Date; end: Date }} - Limites normalizados.
2068
+ */
1801
2069
  normalizeRangeBounds(start, end) {
2070
+ if (this.mode !== 'date')
2071
+ return { start, end };
1802
2072
  return compareAscExports.compareAsc(start, end) <= 0 ? { start, end } : { start: end, end: start };
1803
2073
  }
1804
2074
  /**
1805
- * Sincroniza o texto do campo com as props atuais de valor e modo.
2075
+ * Sincroniza o texto do input com as props `value`/`rangeStart`/`rangeEnd` e `mode`.
2076
+ *
2077
+ * @returns {void}
1806
2078
  */
1807
2079
  syncInputValueFromProps() {
1808
- if (this.effectiveSelectionMode === 'range') {
2080
+ if (this.selectionMode === 'range') {
1809
2081
  if (this.rangeStart === null || this.rangeEnd === null) {
1810
- this.inputValue = '';
2082
+ this.setInternalInputValue('');
1811
2083
  return;
1812
2084
  }
1813
2085
  const startFormatted = this.formatDateByMode(this.rangeStart);
1814
2086
  const endFormatted = this.formatDateByMode(this.rangeEnd);
1815
- this.inputValue = `${startFormatted} - ${endFormatted}`;
2087
+ this.setInternalInputValue(`${startFormatted} - ${endFormatted}`);
1816
2088
  return;
1817
2089
  }
1818
2090
  if (this.value === null) {
1819
- this.inputValue = '';
2091
+ this.setInternalInputValue('');
1820
2092
  return;
1821
2093
  }
1822
- this.inputValue = this.formatDateByMode(this.value);
2094
+ this.setInternalInputValue(this.formatDateByMode(this.value));
2095
+ }
2096
+ /**
2097
+ * Retorna o elemento interno `<br-input>` quando disponível.
2098
+ *
2099
+ * @internal
2100
+ * @returns {HTMLBrInputElement | null} Elemento interno `<br-input>` ou `null` se não estiver disponível.
2101
+ */
2102
+ getBrInputElement() {
2103
+ return this.el.shadowRoot?.querySelector('br-input');
2104
+ }
2105
+ /**
2106
+ * Define o valor interno do input imperativamente.
2107
+ *
2108
+ * @internal Define o valor interno do input sem re-renderizar o host.
2109
+ * @param {string} value Valor a ser definido no input interno.
2110
+ */
2111
+ setInternalInputValue(value) {
2112
+ this.inputValue = value;
2113
+ const br = this.getBrInputElement();
2114
+ if (br) {
2115
+ // atualiza imperativamente o componente filho sem re-renderizar o host
2116
+ try {
2117
+ br.value = value;
2118
+ }
2119
+ catch { }
2120
+ }
1823
2121
  }
1824
2122
  /**
1825
2123
  * Formata uma data de acordo com o modo atual do componente.
1826
2124
  *
1827
- * @param date - Data a ser formatada para exibição no input.
1828
- * @returns Representação textual da data/hora no padrão esperado.
2125
+ * @param {Date} date - Data a ser formatada para exibição no input.
2126
+ * @returns {string} - Representação textual da data/hora no padrão esperado.
1829
2127
  */
1830
2128
  formatDateByMode(date) {
1831
- switch (this.mode) {
1832
- case 'date':
1833
- return formatExports.format(date, 'dd/MM/yyyy');
1834
- case 'time':
1835
- return formatExports.format(date, 'HH:mm');
1836
- default:
1837
- return formatExports.format(date, 'dd/MM/yyyy HH:mm');
1838
- }
2129
+ const config = INPUT_FORMAT_CONFIG[this.mode];
2130
+ return formatExports.format(date, config.displayFormat);
1839
2131
  }
1840
2132
  /**
1841
- * Retorna as classes CSS base aplicadas ao host visual do componente.
2133
+ * Retorna o mapa de classes CSS aplicado ao host do componente.
2134
+ *
2135
+ * @returns {CssClassMap}
1842
2136
  */
1843
2137
  getCssClassMap() {
1844
2138
  return {
@@ -1848,7 +2142,7 @@ const DatetimeInput = class {
1848
2142
  /**
1849
2143
  * Seleciona o ícone do campo conforme o modo de entrada ativo.
1850
2144
  *
1851
- * @returns Nome do ícone usado na ação lateral do input.
2145
+ * @returns {string} - Nome do ícone usado na ação lateral do input.
1852
2146
  */
1853
2147
  getInputIcon() {
1854
2148
  switch (this.mode) {
@@ -1861,11 +2155,11 @@ const DatetimeInput = class {
1861
2155
  /**
1862
2156
  * Converte o texto digitado em `Date` com base no modo configurado.
1863
2157
  *
1864
- * @param value - Texto informado pelo usuário no input.
1865
- * @returns Data convertida em objeto `Date` ou `null` quando inválida.
2158
+ * @param {string} value - Texto informado pelo usuário no input.
2159
+ * @param {Date} [base] - Data base usada para completar valores parciais.
2160
+ * @returns {Date | null} - Data convertida ou `null` quando inválida.
1866
2161
  */
1867
- parseInputValue(value) {
1868
- const base = this.value ?? this.referenceDate ?? toDateExports.toDate(new Date());
2162
+ parseInputValue(value, base = this.value ?? this.referenceDate ?? toDateExports.toDate(new Date())) {
1869
2163
  switch (this.mode) {
1870
2164
  case 'date':
1871
2165
  return this.parseDateInput(value, base);
@@ -1880,12 +2174,14 @@ const DatetimeInput = class {
1880
2174
  /**
1881
2175
  * Faz parse de uma data no formato `dd/MM/yyyy`, preservando hora e minuto base.
1882
2176
  *
1883
- * @param value - Texto de data digitado pelo usuário.
1884
- * @param base - Data base usada para completar informações de tempo.
1885
- * @returns Data válida normalizada ou `null` quando o parse falhar.
2177
+ * @param {string} value - Texto de data digitado pelo usuário.
2178
+ * @param {Date} base - Data base usada para completar informações de tempo.
2179
+ * @returns {Date | null} - Data válida normalizada ou `null` quando o parse falhar.
1886
2180
  */
1887
2181
  parseDateInput(value, base) {
1888
- const parsedDate = parseExports.parse(value, 'dd/MM/yyyy', base);
2182
+ const config = INPUT_FORMAT_CONFIG[this.mode];
2183
+ const datePattern = config.parseFormats[0];
2184
+ const parsedDate = parseExports.parse(value, datePattern, base);
1889
2185
  if (!isValidExports.isValid(parsedDate))
1890
2186
  return null;
1891
2187
  return setExports.set(parsedDate, {
@@ -1898,12 +2194,14 @@ const DatetimeInput = class {
1898
2194
  /**
1899
2195
  * Faz parse de hora no formato `HH:mm`, preservando o dia da data base.
1900
2196
  *
1901
- * @param value - Texto de hora digitado pelo usuário.
1902
- * @param base - Data base usada para manter dia, mês e ano.
1903
- * @returns Data válida com hora ajustada ou `null` quando inválida.
2197
+ * @param {string} value - Texto de hora digitado pelo usuário.
2198
+ * @param {Date} base - Data base usada para manter dia, mês e ano.
2199
+ * @returns {Date | null} - Data válida com hora ajustada ou `null` quando inválida.
1904
2200
  */
1905
2201
  parseTimeInput(value, base) {
1906
- const parsedTime = parseExports.parse(value, 'HH:mm', base);
2202
+ const config = INPUT_FORMAT_CONFIG[this.mode];
2203
+ const timePattern = config.parseFormats[0];
2204
+ const parsedTime = parseExports.parse(value, timePattern, base);
1907
2205
  if (!isValidExports.isValid(parsedTime))
1908
2206
  return null;
1909
2207
  return setExports.set(base, {
@@ -1914,20 +2212,23 @@ const DatetimeInput = class {
1914
2212
  });
1915
2213
  }
1916
2214
  /**
1917
- * Faz parse de data e hora completas, com fallback para entradas parciais.
2215
+ * Faz parse de data e hora completas, aceitando somente a data como fallback.
1918
2216
  *
1919
- * @param value - Texto digitado no input.
1920
- * @param base - Data base usada como contexto para completar o parse.
1921
- * @returns Data válida a partir da entrada ou `null` quando não reconhecida.
2217
+ * @param {string} value - Texto digitado no input.
2218
+ * @param {Date} base - Data base usada como contexto para completar o parse.
2219
+ * @returns {Date | null} - Data válida a partir da entrada ou `null` quando não reconhecida.
1922
2220
  */
1923
2221
  parseDateTimeInput(value, base) {
2222
+ const config = INPUT_FORMAT_CONFIG[this.mode];
2223
+ const fullPattern = config.parseFormats[0];
2224
+ const fallbackDatePattern = config.parseFormats[1];
1924
2225
  // data + hora
1925
- const full = parseExports.parse(value, 'dd/MM/yyyy HH:mm', base);
2226
+ const full = parseExports.parse(value, fullPattern, base);
1926
2227
  if (isValidExports.isValid(full))
1927
2228
  return full;
1928
- // so data -> hora atual
1929
- const date = this.parseDateInput(value, base);
1930
- if (date !== null) {
2229
+ // somente data -> preserva a hora da data base
2230
+ const date = parseExports.parse(value, fallbackDatePattern, base);
2231
+ if (isValidExports.isValid(date)) {
1931
2232
  return setExports.set(date, {
1932
2233
  hours: getHoursExports.getHours(base),
1933
2234
  minutes: getMinutesExports.getMinutes(base),
@@ -1935,14 +2236,7 @@ const DatetimeInput = class {
1935
2236
  milliseconds: 0,
1936
2237
  });
1937
2238
  }
1938
- // so hora -> data atual
1939
- return this.parseTimeInput(value, base);
1940
- }
1941
- /**
1942
- * Renderiza o campo textual e o ícone de ação do datetime input.
1943
- */
1944
- renderInputField() {
1945
- return (h("br-input", { type: "text", value: this.inputValue, placeholder: this.placeholder, disabled: this.disabled, actionLabel: this.getToggleAriaLabel(), onInput: this.handleInputChange, onKeyDown: this.handleInputKeydown, "aria-label": this.getInputAriaLabel(), part: "input" }, h("br-icon", { slot: "action", iconName: this.getInputIcon(), width: "16", height: "16", "aria-hidden": "true", onClick: this.handleToggleDropdown, part: "icon" })));
2239
+ return null;
1946
2240
  }
1947
2241
  /**
1948
2242
  * Retorna o rótulo acessível do campo de entrada de acordo com o modo ativo.
@@ -1959,11 +2253,19 @@ const DatetimeInput = class {
1959
2253
  return 'Campo de data e hora';
1960
2254
  }
1961
2255
  }
2256
+ /**
2257
+ * Renderiza o campo textual e o ícone de ação do datetime input.
2258
+ *
2259
+ * @returns {JSX.Element}
2260
+ */
2261
+ renderInputField() {
2262
+ return (h("br-input", { type: "text", mask: this.getInputMask(), placeholder: this.placeholder, disabled: this.disabled, actionLabel: this.getToggleAriaLabel(), onInput: this.handleInputChange, onChange: this.handleInputCommit, onBlur: this.handleInputBlur, onKeyDown: this.handleInputKeydown, onBrInputActionClick: this.handleActionButtonClick, "aria-label": this.getInputAriaLabel(), part: "input" }, h("br-icon", { slot: "action", iconName: this.getInputIcon(), width: "16", height: "16", "aria-hidden": "true", part: "icon" })));
2263
+ }
1962
2264
  /**
1963
2265
  * Renderização principal do componente.
1964
2266
  */
1965
2267
  render() {
1966
- return (h(Host, { key: '8c5536c6a740ac0d42be7bf89ffc1098d896f895' }, h("div", { key: 'c9a1a995838739f5b6e00fcf39a21bee81362e90', class: this.getCssClassMap(), part: "container" }, this.renderInputField())));
2268
+ return (h(Host, { key: '40033b7b73bd1760cf07c5b4797a86e918fde54b' }, h("div", { key: '31e968efbb7a6f43acb8a67fb225d6e0159af7f9', class: this.getCssClassMap(), part: "container" }, this.renderInputField())));
1967
2269
  }
1968
2270
  static get delegatesFocus() { return true; }
1969
2271
  get el() { return getElement(this); }
@@ -2221,57 +2523,79 @@ function requireSubMinutes () {
2221
2523
  var subMinutesExports = /*@__PURE__*/ requireSubMinutes();
2222
2524
 
2223
2525
  /**
2224
- * Conjunto de campos suportados pelo time picker.
2526
+ * Conjunto imutável dos campos suportados pelo `br-time-picker`.
2225
2527
  *
2226
- * Esses valores são usados como contrato entre a renderização do campo e a lógica de commit.
2528
+ * @readonly
2529
+ * @constant {Readonly<Record<string, string>>}
2227
2530
  */
2228
2531
  const INPUT_TIME_TYPE = {
2229
2532
  HOUR: 'hour',
2230
2533
  MINUTE: 'minute',
2231
2534
  };
2232
2535
 
2233
- const timePickerCss = () => `*,*::before,*::after{box-sizing:border-box}:host{line-height:var(--font-line-height-medium);-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%}main{display:block}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace;font-size:1em}a{background-color:rgba(0,0,0,0)}b,strong{font-weight:bolder}code{font-family:monospace;font-size:1em}small{font-size:80%}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:var(--font-line-height-medium);margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{appearance:none}::-webkit-file-upload-button{appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}.d-none{display:none !important}@media (min-width: 576px){.d-sm-block{display:block !important}.d-sm-flex{display:flex !important}}[data-toggle=dropdown]+*{position:absolute}.dropdown{position:relative}.dropdown [data-toggle=dropdown]+*{box-shadow:var(--surface-shadow-sm);left:0;position:absolute;top:100%}.dropdown>.br-notification{left:auto;right:0}.dropdown .br-item{--color:var(--color-light);--color-rgb:var(--color-light-rgb);--text-color:var(--color-light);--interactive:var(--interactive-light);--interactive-rgb:var(--color-rgb);--visited:var(--visited-light);--hover:var(--hover-light);--pressed:var(--pressed-light);--focus-color:var(--focus-color-light);--focus:var(--focus-color-light);--item-padding-y:var(--spacing-scale-2x);background-color:var(--background-light);color:var(--color)}.dropdown .br-item:not(:last-child){border-bottom:1px solid var(--border-color)}.dropdown .br-item.selected{--color:var(--color-dark);--color-rgb:var(--color-dark-rgb);--text-color:var(--color-dark);--interactive:var(--interactive-dark);--interactive-rgb:var(--interactive-dark-rgb);--visited:var(--visited-dark);--hover:var(--hover-dark);--pressed:var(--pressed-dark);--focus-color:var(--focus-color-dark);--focus:var(--focus-color-dark)}.justify-content-start{justify-content:flex-start !important}.justify-content-end{justify-content:flex-end !important}.justify-content-center{justify-content:center !important}.align-items-center{align-items:center !important}.col,[class*=col-]{padding-left:calc(var(--grid-gutter)*.5);padding-right:calc(var(--grid-gutter)*.5);width:100%}.col{flex:1 0 0%;min-width:8.3333333333%}.col-auto{flex:0 0 auto;width:auto}.col-2{flex-basis:16.6666666667%;max-width:16.6666666667%}.container,.container-fluid,.container-lg{--grid-margin:var(--grid-portrait-margin);--grid-maxwidth:var(--grid-portrait-maxwidth);margin-left:auto;margin-right:auto;max-width:var(--grid-maxwidth);padding-left:var(--grid-margin);padding-right:var(--grid-margin);width:100%}.row{--grid-gutter:var(--grid-portrait-gutter);display:flex;flex-wrap:wrap;margin-left:calc(var(--grid-gutter)*-0.5);margin-right:calc(var(--grid-gutter)*-0.5)}@media (min-width: 576px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-tablet-margin)}.row{--grid-gutter:var(--grid-tablet-gutter)}.container{--grid-maxwidth:calc(var(--grid-breakpoint-sm) - var(--grid-tablet-margin))}.col-sm-4{flex-basis:33.3333333333%;max-width:33.3333333333%}}@media (min-width: 992px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-tablet-margin)}.row{--grid-gutter:var(--grid-tablet-gutter)}.container{--grid-maxwidth:calc(var(--grid-breakpoint-md) - var(--grid-tablet-margin))}}@media (min-width: 1280px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-desktop-margin)}.row{--grid-gutter:var(--grid-desktop-gutter)}.container,.container-lg{--grid-maxwidth:calc(var(--grid-breakpoint-lg) - var(--grid-desktop-margin))}.col-lg-3{flex-basis:25%;max-width:25%}}@media (min-width: 1600px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-tv-margin)}.row{--grid-gutter:var(--grid-tv-gutter)}.container,.container-lg{--grid-maxwidth:calc(var(--grid-breakpoint-xl) - var(--grid-tv-margin))}}.ease{animation-timing-function:cubic-bezier(0.25, 0.1, 0.25, 1)}.ease-out{animation-timing-function:cubic-bezier(0, 0, 0.58, 1)}.ease-in-out{animation-timing-function:cubic-bezier(0.42, 0, 0.58, 1)}.fast{animation-duration:var(--duration-fast)}.slow{animation-duration:var(--duration-slow)}.mt-1{margin-top:var(--spacing-scale-half) !important}.mr-1{margin-right:var(--spacing-scale-half) !important}.mb-1{margin-bottom:var(--spacing-scale-half) !important}.ml-1{margin-left:var(--spacing-scale-half) !important}.mx-3{margin-left:var(--spacing-scale-2x) !important;margin-right:var(--spacing-scale-2x) !important}.mb-4{margin-bottom:var(--spacing-scale-3x) !important}.ml-auto{margin-left:auto !important}.pt-half{padding-top:var(--spacing-scale-half) !important}@media (min-width: 576px){.ml-sm-0{margin-left:var(--spacing-scale-default) !important}}.highlight{background:var(--status-highlight-background) linear-gradient(var(--status-highlight-overlay), var(--status-highlight-overlay));color:var(--status-highlight-text);padding:0 var(--spacing-scale-half)}[disabled],.disabled{cursor:not-allowed;opacity:var(--disabled)}[disabled] *,.disabled *{pointer-events:none}fieldset[disabled]{opacity:1}.text-center{text-align:center !important}.text-right{text-align:right !important}.text-nowrap{white-space:nowrap !important}.text-uppercase{text-transform:uppercase !important}.text-bold{font-weight:700 !important}.text-base{font-size:var(--font-size-scale-base) !important}.text-down-01{font-size:var(--font-size-scale-down-01) !important}@media (min-width: 576px){.text-sm-center{text-align:center !important}.text-sm-left{text-align:left !important}.text-sm-right{text-align:right !important}}p{color:var(--color);font-size:var(--font-size-scale-base);font-weight:var(--font-weight-regular);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-2x);margin-top:0}p a{text-decoration:underline}@media (min-width: 576px){p{font-size:var(--font-size-scale-up-01)}}a{--focus-offset:var(--spacing-scale-half)}a:focus{outline:none}a.focus-visible,a:focus-visible{outline-color:var(--focus);outline-offset:var(--focus-offset);outline-style:var(--focus-style);outline-width:var(--focus-width)}a:not(:disabled):hover{background-image:linear-gradient(rgba(var(--interactive-rgb), var(--hover)), rgba(var(--interactive-rgb), var(--hover)))}a:not(:disabled):active{background-image:linear-gradient(rgba(var(--interactive-rgb), var(--pressed)), rgba(var(--interactive-rgb), var(--pressed)))}a{color:var(--interactive);text-decoration:none}.main-content a{text-decoration:underline}button{cursor:pointer}img{max-width:100%;vertical-align:middle}h2,.h2{color:var(--color);font-size:var(--font-size-scale-up-03);font-weight:var(--font-weight-semi-bold);line-height:var(--font-line-height-low);margin-bottom:var(--spacing-scale-2xh);margin-top:var(--spacing-scale-3xh);padding-bottom:var(--spacing-scale-2xh)}@media (min-width: 576px){.h2,h2{font-size:var(--font-size-scale-up-05);font-weight:var(--font-weight-regular)}}ul,ol{margin-bottom:var(--spacing-scale-2x);margin-top:0;padding:0 0 0 var(--spacing-scale-5x)}table{--table-background:var(--background);--table-color:var(--color);--table-border-color:var(--gray-20);--table-border-style:solid;--table-border-width:1px;--table-hover:var(--color-rgb);--table-padding:var(--spacing-scale-3x);--table-font-weight:var(--font-weight-medium);--table-th-background:var(--background-alternative);--table-th-font-weight:var(--font-weight-semi-bold);--table-row-size:var(--spacing-scale-2x);border-collapse:collapse;width:100%}tr.selected,tr.is-selected{--color:var(--color-dark);--color-rgb:var(--color-dark-rgb);--text-color:var(--color-dark);--interactive:var(--interactive-dark);--interactive-rgb:var(--interactive-dark-rgb);--visited:var(--visited-dark);--hover:var(--hover-dark);--pressed:var(--pressed-dark);--focus-color:var(--focus-color-dark);--focus:var(--focus-color-dark)}label,.label{color:var(--color);font-size:var(--font-size-scale-base);font-weight:var(--font-weight-semi-bold);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-half)}fieldset,.fieldset{border:var(--surface-width-none);margin-bottom:var(--spacing-scale-5x);margin-top:0;padding:0}legend,.legend{color:var(--color);font-size:var(--font-size-scale-up-01);font-weight:var(--font-weight-semi-bold);line-height:var(--font-line-height-low);margin-bottom:var(--spacing-scale-2x);margin-top:var(--spacing-scale-2x)}::placeholder,.placeholder{color:var(--color-light);font-size:var(--font-size-scale-base);font-style:italic;font-weight:var(--font-weight-regular);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-half);margin-top:var(--spacing-scale-half);opacity:1}input,textarea,.input{color:var(--color-light);font-size:var(--font-size-scale-up-01);font-weight:var(--font-weight-medium);line-height:var(--font-line-height-low);margin-bottom:var(--spacing-scale-half)}code,.code{background:var(--gray-5);border-radius:4px;color:var(--gray-80);display:inline-block;font-family:monospace;font-size:var(--font-size-scale-base);font-weight:var(--font-weight-medium);line-height:var(--font-line-height-low);padding:var(--spacing-scale-half)}pre,.pre{background:var(--gray-5);margin:var(--spacing-scale-2x) 0 var(--spacing-scale-4x);padding:var(--spacing-scale-2x)}pre code,.pre code{display:inline;padding:0}*[data-toggle=collapse]:not(:disabled):hover{background-image:linear-gradient(rgba(var(--interactive-rgb), var(--hover)), rgba(var(--interactive-rgb), var(--hover)))}*[data-toggle=collapse]:focus{outline:none}*[data-toggle=collapse].focus-visible,*[data-toggle=collapse]:focus-visible{outline-color:var(--focus);outline-offset:var(--focus-offset);outline-style:var(--focus-style);outline-width:var(--focus-width)}@media (prefers-reduced-motion: reduce){:host,:host::before,:host::after,:host *,:host *::before,:host *::after{animation:none !important;scroll-behavior:auto !important;transition:none !important}}:host-context([data-wbc-reduced-motion=true])::before,:host-context([data-wbc-reduced-motion=true])::after,:host-context([data-wbc-reduced-motion=true]) *,:host-context([data-wbc-reduced-motion=true]) *::before,:host-context([data-wbc-reduced-motion=true]) *::after{animation:none !important;scroll-behavior:auto !important;transition:none !important}:host{display:block;width:100%;max-width:144px;height:116px;margin-inline:auto;box-sizing:border-box}.br-time-picker{display:flex;justify-content:center;align-items:center;width:100%;height:100%;box-sizing:border-box}.timer{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:var(--spacing-scale-sm);width:100%;box-sizing:border-box}.time-field{display:flex;flex-direction:column;align-items:center;justify-content:flex-end}.time-field label{font-size:var(--font-size-scale-down-01);color:var(--gray-70);margin-bottom:4px}.time-field input{width:var(--spacing-scale-6x);height:var(--spacing-scale-6x);padding:4px;font-size:var(--font-size-scale-up-01);font-weight:var(--font-weight-semi-bold);text-align:center;border-color:var(--border-color-alternative);border-radius:var(--surface-rounder-sm);border-style:var(--border-style);border-width:var(--border-width)}.time-field input:hover{background:linear-gradient(rgb(var(--color-rgb), var(--hover)), rgb(var(--color-rgb), var(--hover)))}.time-separator{display:inline-block;font-size:var(--font-size-scale-up-01);font-weight:var(--font-weight-semi-bold);color:var(--gray-70);align-self:center;line-height:1;padding:0 var(--spacing-scale-base)}`;
2536
+ const timePickerCss = () => `*,*::before,*::after{box-sizing:border-box}:host{line-height:var(--font-line-height-medium);-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%}main{display:block}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace;font-size:1em}a{background-color:rgba(0,0,0,0)}b,strong{font-weight:bolder}small{font-size:80%}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:var(--font-line-height-medium);margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{appearance:none}::-webkit-file-upload-button{appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}.d-none{display:none !important}@media (min-width: 576px){.d-sm-block{display:block !important}.d-sm-flex{display:flex !important}}[data-toggle=dropdown]+*{position:absolute}.dropdown{position:relative}.dropdown [data-toggle=dropdown]+*{box-shadow:var(--surface-shadow-sm);left:0;position:absolute;top:100%}.dropdown>.br-notification{left:auto;right:0}.dropdown .br-item{--color:var(--color-light);--color-rgb:var(--color-light-rgb);--text-color:var(--color-light);--interactive:var(--interactive-light);--interactive-rgb:var(--color-rgb);--visited:var(--visited-light);--hover:var(--hover-light);--pressed:var(--pressed-light);--focus-color:var(--focus-color-light);--focus:var(--focus-color-light);--item-padding-y:var(--spacing-scale-2x);background-color:var(--background-light);color:var(--color)}.dropdown .br-item:not(:last-child){border-bottom:1px solid var(--border-color)}.dropdown .br-item.selected{--color:var(--color-dark);--color-rgb:var(--color-dark-rgb);--text-color:var(--color-dark);--interactive:var(--interactive-dark);--interactive-rgb:var(--interactive-dark-rgb);--visited:var(--visited-dark);--hover:var(--hover-dark);--pressed:var(--pressed-dark);--focus-color:var(--focus-color-dark);--focus:var(--focus-color-dark)}.justify-content-start{justify-content:flex-start !important}.justify-content-end{justify-content:flex-end !important}.justify-content-center{justify-content:center !important}.align-items-center{align-items:center !important}.col,[class*=col-]{padding-left:calc(var(--grid-gutter)*.5);padding-right:calc(var(--grid-gutter)*.5);width:100%}.col{flex:1 0 0%;min-width:8.3333333333%}.col-auto{flex:0 0 auto;width:auto}.col-2{flex-basis:16.6666666667%;max-width:16.6666666667%}.container,.container-fluid,.container-lg{--grid-margin:var(--grid-portrait-margin);--grid-maxwidth:var(--grid-portrait-maxwidth);margin-left:auto;margin-right:auto;max-width:var(--grid-maxwidth);padding-left:var(--grid-margin);padding-right:var(--grid-margin);width:100%}.row{--grid-gutter:var(--grid-portrait-gutter);display:flex;flex-wrap:wrap;margin-left:calc(var(--grid-gutter)*-0.5);margin-right:calc(var(--grid-gutter)*-0.5)}@media (min-width: 576px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-tablet-margin)}.row{--grid-gutter:var(--grid-tablet-gutter)}.container{--grid-maxwidth:calc(var(--grid-breakpoint-sm) - var(--grid-tablet-margin))}.col-sm-4{flex-basis:33.3333333333%;max-width:33.3333333333%}}@media (min-width: 992px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-tablet-margin)}.row{--grid-gutter:var(--grid-tablet-gutter)}.container{--grid-maxwidth:calc(var(--grid-breakpoint-md) - var(--grid-tablet-margin))}}@media (min-width: 1280px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-desktop-margin)}.row{--grid-gutter:var(--grid-desktop-gutter)}.container,.container-lg{--grid-maxwidth:calc(var(--grid-breakpoint-lg) - var(--grid-desktop-margin))}.col-lg-3{flex-basis:25%;max-width:25%}}@media (min-width: 1600px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-tv-margin)}.row{--grid-gutter:var(--grid-tv-gutter)}.container,.container-lg{--grid-maxwidth:calc(var(--grid-breakpoint-xl) - var(--grid-tv-margin))}}.ease{animation-timing-function:cubic-bezier(0.25, 0.1, 0.25, 1)}.ease-out{animation-timing-function:cubic-bezier(0, 0, 0.58, 1)}.ease-in-out{animation-timing-function:cubic-bezier(0.42, 0, 0.58, 1)}.fast{animation-duration:var(--duration-fast)}.slow{animation-duration:var(--duration-slow)}.mt-1{margin-top:var(--spacing-scale-half) !important}.mr-1{margin-right:var(--spacing-scale-half) !important}.mb-1{margin-bottom:var(--spacing-scale-half) !important}.ml-1{margin-left:var(--spacing-scale-half) !important}.mx-3{margin-left:var(--spacing-scale-2x) !important;margin-right:var(--spacing-scale-2x) !important}.mb-4{margin-bottom:var(--spacing-scale-3x) !important}.ml-auto{margin-left:auto !important}.pt-half{padding-top:var(--spacing-scale-half) !important}@media (min-width: 576px){.ml-sm-0{margin-left:var(--spacing-scale-default) !important}}.highlight{background:var(--status-highlight-background) linear-gradient(var(--status-highlight-overlay), var(--status-highlight-overlay));color:var(--status-highlight-text);padding:0 var(--spacing-scale-half)}[disabled],.disabled{cursor:not-allowed;opacity:var(--disabled)}[disabled] *,.disabled *{pointer-events:none}fieldset[disabled]{opacity:1}.text-center{text-align:center !important}.text-right{text-align:right !important}.text-nowrap{white-space:nowrap !important}.text-uppercase{text-transform:uppercase !important}.text-bold{font-weight:700 !important}.text-base{font-size:var(--font-size-scale-base) !important}.text-down-01{font-size:var(--font-size-scale-down-01) !important}@media (min-width: 576px){.text-sm-center{text-align:center !important}.text-sm-left{text-align:left !important}.text-sm-right{text-align:right !important}}p{color:var(--color);font-size:var(--font-size-scale-base);font-weight:var(--font-weight-regular);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-2x);margin-top:0}p a{text-decoration:underline}@media (min-width: 576px){p{font-size:var(--font-size-scale-up-01)}}a{--focus-offset:var(--spacing-scale-half)}a:focus{outline:none}a.focus-visible,a:focus-visible{outline-color:var(--focus);outline-offset:var(--focus-offset);outline-style:var(--focus-style);outline-width:var(--focus-width)}a:not(:disabled):hover{background-image:linear-gradient(rgba(var(--interactive-rgb), var(--hover)), rgba(var(--interactive-rgb), var(--hover)))}a:not(:disabled):active{background-image:linear-gradient(rgba(var(--interactive-rgb), var(--pressed)), rgba(var(--interactive-rgb), var(--pressed)))}a{color:var(--interactive);text-decoration:none}.main-content a{text-decoration:underline}button{cursor:pointer}img{max-width:100%;vertical-align:middle}h2,.h2{color:var(--color);font-size:var(--font-size-scale-up-03);font-weight:var(--font-weight-semi-bold);line-height:var(--font-line-height-low);margin-bottom:var(--spacing-scale-2xh);margin-top:var(--spacing-scale-3xh);padding-bottom:var(--spacing-scale-2xh)}@media (min-width: 576px){.h2,h2{font-size:var(--font-size-scale-up-05);font-weight:var(--font-weight-regular)}}ul,ol{margin-bottom:var(--spacing-scale-2x);margin-top:0;padding:0 0 0 var(--spacing-scale-5x)}table{--table-background:var(--background);--table-color:var(--color);--table-border-color:var(--gray-20);--table-border-style:solid;--table-border-width:1px;--table-hover:var(--color-rgb);--table-padding:var(--spacing-scale-3x);--table-font-weight:var(--font-weight-medium);--table-th-background:var(--background-alternative);--table-th-font-weight:var(--font-weight-semi-bold);--table-row-size:var(--spacing-scale-2x);border-collapse:collapse;width:100%}tr.selected,tr.is-selected{--color:var(--color-dark);--color-rgb:var(--color-dark-rgb);--text-color:var(--color-dark);--interactive:var(--interactive-dark);--interactive-rgb:var(--interactive-dark-rgb);--visited:var(--visited-dark);--hover:var(--hover-dark);--pressed:var(--pressed-dark);--focus-color:var(--focus-color-dark);--focus:var(--focus-color-dark)}label,.label{color:var(--color);font-size:var(--font-size-scale-base);font-weight:var(--font-weight-semi-bold);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-half)}fieldset,.fieldset{border:var(--surface-width-none);margin-bottom:var(--spacing-scale-5x);margin-top:0;padding:0}legend,.legend{color:var(--color);font-size:var(--font-size-scale-up-01);font-weight:var(--font-weight-semi-bold);line-height:var(--font-line-height-low);margin-bottom:var(--spacing-scale-2x);margin-top:var(--spacing-scale-2x)}::placeholder,.placeholder{color:var(--color-light);font-size:var(--font-size-scale-base);font-style:italic;font-weight:var(--font-weight-regular);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-half);margin-top:var(--spacing-scale-half);opacity:1}input,textarea,.input{color:var(--color-light);font-size:var(--font-size-scale-up-01);font-weight:var(--font-weight-medium);line-height:var(--font-line-height-low);margin-bottom:var(--spacing-scale-half)}pre,.pre{background:var(--gray-5);margin:var(--spacing-scale-2x) 0 var(--spacing-scale-4x);padding:var(--spacing-scale-2x)}*[data-toggle=collapse]:not(:disabled):hover{background-image:linear-gradient(rgba(var(--interactive-rgb), var(--hover)), rgba(var(--interactive-rgb), var(--hover)))}*[data-toggle=collapse]:focus{outline:none}*[data-toggle=collapse].focus-visible,*[data-toggle=collapse]:focus-visible{outline-color:var(--focus);outline-offset:var(--focus-offset);outline-style:var(--focus-style);outline-width:var(--focus-width)}@media (prefers-reduced-motion: reduce){:host,:host::before,:host::after,:host *,:host *::before,:host *::after{animation:none !important;scroll-behavior:auto !important;transition:none !important}}:host-context([data-wbc-reduced-motion=true])::before,:host-context([data-wbc-reduced-motion=true])::after,:host-context([data-wbc-reduced-motion=true]) *,:host-context([data-wbc-reduced-motion=true]) *::before,:host-context([data-wbc-reduced-motion=true]) *::after{animation:none !important;scroll-behavior:auto !important;transition:none !important}:host{display:block;width:100%;max-width:144px;height:116px;margin-inline:auto;box-sizing:border-box}.br-time-picker{display:flex;justify-content:center;align-items:center;width:100%;height:100%;box-sizing:border-box}.timer{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:var(--spacing-scale-sm);width:100%;box-sizing:border-box}.time-field{display:flex;flex-direction:column;align-items:center;justify-content:flex-end}.time-field label{font-size:var(--font-size-scale-down-01);color:var(--gray-70);margin-bottom:4px}.time-field input{width:var(--spacing-scale-6x);height:var(--spacing-scale-6x);padding:4px;font-size:var(--font-size-scale-up-01);font-weight:var(--font-weight-semi-bold);text-align:center;border-color:var(--border-color-alternative);border-radius:var(--surface-rounder-sm);border-style:var(--border-style);border-width:var(--border-width)}.time-field input:hover{background:linear-gradient(rgb(var(--color-rgb), var(--hover)), rgb(var(--color-rgb), var(--hover)))}.time-separator{display:inline-block;font-size:var(--font-size-scale-up-01);font-weight:var(--font-weight-semi-bold);color:var(--gray-70);align-self:center;line-height:1;padding:0 var(--spacing-scale-base)}`;
2234
2537
 
2235
2538
  const TimePicker = class {
2236
2539
  constructor(hostRef) {
2237
2540
  registerInstance(this, hostRef);
2238
2541
  this.dateStateChange = createEvent(this, "dateStateChange", 7);
2239
- /** Mantém o rascunho digitado por campo para evitar aplicar valor parcial prematuramente. */
2240
- this.timeDraft = {};
2241
2542
  /**
2242
- * Data usada como referência para a navegação de hora e minuto, sem representar necessariamente a seleção.
2243
- * Recebe uma instância de `Date` por property binding; valores inválidos usam a data atual.
2543
+ * Data de referência usada para exibir e ajustar hora e minuto.
2244
2544
  *
2245
- * @example
2246
- * ```js
2247
- * const timePicker = document.querySelector('br-time-picker');
2248
- * timePicker.referenceDate = new Date(2026, 8, 7, 9);
2249
- * ```
2545
+ * @default new Date()
2250
2546
  */
2251
2547
  this.referenceDate = new Date();
2252
2548
  /**
2253
- * Data que contém a hora e o minuto efetivamente selecionados, ou `null` quando vazio.
2254
- * Recebe uma instância de `Date` por property binding; datas inválidas usam `null`.
2549
+ * Valor canônico selecionado pelo usuário.
2255
2550
  *
2256
- * @example
2257
- * ```js
2258
- * const timePicker = document.querySelector('br-time-picker');
2259
- * timePicker.value = new Date(2026, 8, 7, 14, 30);
2260
- * ```
2551
+ * @default null
2261
2552
  */
2262
2553
  this.value = null;
2263
- /** Desabilita todos os controles de navegação e edição de hora/minuto. */
2554
+ /**
2555
+ * Indica se os controles do seletor estão desabilitados.
2556
+ *
2557
+ * @default false
2558
+ */
2264
2559
  this.disabled = false;
2265
- /** Cacheia handlers por tipo de campo para preservar a mesma referência entre renderizações. */
2560
+ /**
2561
+ * Rascunho dos valores digitados por cada campo (`hour` | `minute`).
2562
+ * Mantém entradas parciais até o commit por blur/Enter.
2563
+ */
2564
+ this.timeDraft = {};
2565
+ /**
2566
+ * Mapa memorizado de handlers para o evento `input` por tipo de campo.
2567
+ *
2568
+ * Motivo: evita recriar closures a cada render, reduz alocação e mantém
2569
+ * identidade das funções (útil para comparação/remoção quando necessário).
2570
+ *
2571
+ * @private
2572
+ * @type {Map<InputTimeType, (event: Event) => void>}
2573
+ */
2266
2574
  this.timeInputChangeHandlers = new Map();
2267
- /** Cacheia handlers de commit por tipo de campo. */
2575
+ /**
2576
+ * Mapa memorizado de handlers de commit (blur/confirm) por tipo de campo.
2577
+ *
2578
+ * Contém funções que finalizam o rascunho e aplicam o valor via
2579
+ * `handleTimeInputCommit(type)`.
2580
+ *
2581
+ * @private
2582
+ * @type {Map<InputTimeType, () => void>}
2583
+ */
2268
2584
  this.timeInputCommitHandlers = new Map();
2269
- /** Cacheia handlers de teclado por tipo de campo. */
2585
+ /**
2586
+ * Mapa memorizado de handlers de teclado por tipo de campo.
2587
+ *
2588
+ * Suporta comportamento de `Enter` (confirma) e setas para ajuste.
2589
+ * Memorizar evita recriar closures e melhora performance em re-renders.
2590
+ *
2591
+ * @private
2592
+ * @type {Map<InputTimeType, (event: KeyboardEvent) => void>}
2593
+ */
2270
2594
  this.timeInputKeydownHandlers = new Map();
2271
2595
  /**
2272
2596
  * Executa a navegação associada ao botão clicado.
2273
2597
  *
2274
- * @param event - Clique disparado pelo botão de navegação.
2598
+ * @param {MouseEvent} event - Clique disparado pelo botão de navegação.
2275
2599
  */
2276
2600
  this.handleNavigationClick = (event) => {
2277
2601
  if (this.disabled) {
@@ -2301,8 +2625,8 @@ const TimePicker = class {
2301
2625
  /**
2302
2626
  * Atualiza o rascunho do campo removendo qualquer caractere não numérico.
2303
2627
  *
2304
- * @param event - Evento de input do campo de hora ou minuto.
2305
- * @param type - Campo que está sendo editado.
2628
+ * @param {Event} event - Evento de input do campo de hora ou minuto.
2629
+ * @param {InputTimeType} type - Campo que está sendo editado.
2306
2630
  */
2307
2631
  this.handleTimeInputChange = (event, type) => {
2308
2632
  if (this.disabled) {
@@ -2313,41 +2637,38 @@ const TimePicker = class {
2313
2637
  this.timeDraft = { ...this.timeDraft, [type]: value };
2314
2638
  };
2315
2639
  }
2316
- handleReferenceDateChange(newValue) {
2317
- const normalizedReferenceDate = this.normalizeDateProp(newValue, 'referenceDate', new Date());
2318
- const receivedTime = newValue instanceof Date && !Number.isNaN(newValue.getTime()) ? newValue.getTime() : null;
2319
- if (normalizedReferenceDate.getTime() !== receivedTime)
2320
- this.referenceDate = normalizedReferenceDate;
2321
- }
2640
+ /**
2641
+ * Sincroniza `referenceDate` quando a prop `value` muda.
2642
+ *
2643
+ * Normaliza segundos/milissegundos e restaura rascunhos locais.
2644
+ *
2645
+ * @param {Date | null} newValue - Novo valor vindo da prop `value`.
2646
+ * @returns {void}
2647
+ */
2322
2648
  handleValueChange(newValue) {
2323
- const normalizedValue = this.normalizeDateProp(newValue, 'value', null);
2324
- const receivedTime = newValue instanceof Date && !Number.isNaN(newValue.getTime()) ? newValue.getTime() : null;
2325
- if ((normalizedValue?.getTime() ?? null) !== receivedTime)
2326
- this.value = normalizedValue;
2649
+ if (newValue === null || !(newValue instanceof Date) || Number.isNaN(newValue.getTime())) {
2650
+ return;
2651
+ }
2652
+ const normalizedValue = setExports.set(toDateExports.toDate(newValue), { seconds: 0, milliseconds: 0 });
2653
+ if (this.referenceDate.getTime() !== normalizedValue.getTime()) {
2654
+ this.referenceDate = normalizedValue;
2655
+ }
2656
+ this.timeDraft = {};
2327
2657
  }
2328
2658
  componentWillLoad() {
2329
- this.referenceDate = this.normalizeDateProp(this.referenceDate, 'referenceDate', new Date());
2330
- this.value = this.normalizeDateProp(this.value, 'value', null);
2331
2659
  this.referenceDate = resolveSsrLocalDate(this.el, this.referenceDate);
2332
2660
  }
2333
- normalizeDateProp(value, propertyName, fallback) {
2334
- if (value === null && fallback === null)
2335
- return null;
2336
- if (value instanceof Date && !Number.isNaN(value.getTime()))
2337
- return toDateExports.toDate(value);
2338
- reportInvalidPropValue(this.el, propertyName, value, 'Informe uma instância de Date válida.', `Aplicando fallback ${fallback === null ? 'null' : 'new Date()'}.`);
2339
- return fallback === null ? null : toDateExports.toDate(fallback);
2340
- }
2341
2661
  /**
2342
2662
  * Emite o estado consolidado para manter hora, minuto e data sincronizados.
2343
2663
  *
2344
- * @param nextReferenceDate - Nova data de referência após a interação.
2345
- * @param nextValue - Valor final selecionado; quando omitido, assume a data de referência.
2664
+ * @param {Date} nextReferenceDate - Nova data de referência após a interação.
2665
+ * @param {Date | null} nextValue - Valor final selecionado; quando omitido, assume a data de referência.
2346
2666
  */
2347
2667
  emitDateStateChange(nextReferenceDate, nextValue = toDateExports.toDate(new Date(nextReferenceDate))) {
2348
2668
  // Ao emitir, garantir segundos zerados (componente não controla segundos)
2349
2669
  const normalizedReference = setExports.set(nextReferenceDate, { seconds: 0, milliseconds: 0 });
2350
2670
  const normalizedValue = nextValue === null ? null : setExports.set(nextValue, { seconds: 0, milliseconds: 0 });
2671
+ this.referenceDate = normalizedReference;
2351
2672
  this.value = normalizedValue;
2352
2673
  this.dateStateChange.emit({
2353
2674
  referenceDate: normalizedReference,
@@ -2359,8 +2680,8 @@ const TimePicker = class {
2359
2680
  /**
2360
2681
  * Resolve o ícone associado à ação de navegação.
2361
2682
  *
2362
- * @param action - Ação representada pelo botão.
2363
- * @returns O nome do ícone ou uma string vazia quando a ação não é reconhecida.
2683
+ * @param {NavigationAction} action - Ação representada pelo botão.
2684
+ * @returns {string} O nome do ícone ou uma string vazia quando a ação não é reconhecida.
2364
2685
  */
2365
2686
  getIconForAction(action) {
2366
2687
  switch (action) {
@@ -2377,7 +2698,7 @@ const TimePicker = class {
2377
2698
  /**
2378
2699
  * Aplica o valor digitado ao estado do componente quando o campo é concluído.
2379
2700
  *
2380
- * @param type - Campo que será aplicado.
2701
+ * @param {InputTimeType} type - Campo que será aplicado.
2381
2702
  */
2382
2703
  handleTimeInputCommit(type) {
2383
2704
  if (this.disabled) {
@@ -2407,8 +2728,8 @@ const TimePicker = class {
2407
2728
  /**
2408
2729
  * Constrói o rótulo acessível das ações de navegação com base no valor atual.
2409
2730
  *
2410
- * @param action - Ação que o botão executa.
2411
- * @returns Texto acessível do botão.
2731
+ * @param {NavigationAction} action - Ação que o botão executa.
2732
+ * @returns {string} Texto acessível do botão.
2412
2733
  */
2413
2734
  getNavigationAriaLabel(action) {
2414
2735
  switch (action) {
@@ -2532,6 +2853,13 @@ const TimePicker = class {
2532
2853
  }
2533
2854
  return handler;
2534
2855
  }
2856
+ /**
2857
+ * Ajusta o valor do campo via teclado (ArrowUp/ArrowDown).
2858
+ *
2859
+ * @param event - Evento de teclado que disparou a ação.
2860
+ * @param type - Tipo do campo (`hour` | `minute`) a ser ajustado.
2861
+ * @returns void
2862
+ */
2535
2863
  adjustTimeInputWithKeyboard(event, type) {
2536
2864
  if (event.key !== 'ArrowUp' && event.key !== 'ArrowDown')
2537
2865
  return;
@@ -2542,22 +2870,38 @@ const TimePicker = class {
2542
2870
  }
2543
2871
  type === INPUT_TIME_TYPE.HOUR ? this.decreaseHour() : this.decreaseMinute();
2544
2872
  }
2545
- /** Incrementa a hora mantendo os demais componentes da data intactos. */
2873
+ /**
2874
+ * Incrementa a hora sem alterar os demais componentes da data.
2875
+ *
2876
+ * @returns void
2877
+ */
2546
2878
  increaseHour() {
2547
2879
  const date = addHoursExports.addHours(this.referenceDate, 1);
2548
2880
  this.emitDateStateChange(date);
2549
2881
  }
2550
- /** Incrementa o minuto mantendo os demais componentes da data intactos. */
2882
+ /**
2883
+ * Incrementa o minuto sem alterar os demais componentes da data.
2884
+ *
2885
+ * @returns void
2886
+ */
2551
2887
  increaseMinute() {
2552
2888
  const date = addMinutesExports.addMinutes(this.referenceDate, 1);
2553
2889
  this.emitDateStateChange(date);
2554
2890
  }
2555
- /** Decrementa a hora mantendo os demais componentes da data intactos. */
2891
+ /**
2892
+ * Decrementa a hora sem alterar os demais componentes da data.
2893
+ *
2894
+ * @returns void
2895
+ */
2556
2896
  decreaseHour() {
2557
2897
  const date = subHoursExports.subHours(this.referenceDate, 1);
2558
2898
  this.emitDateStateChange(date);
2559
2899
  }
2560
- /** Decrementa o minuto mantendo os demais componentes da data intactos. */
2900
+ /**
2901
+ * Decrementa o minuto sem alterar os demais componentes da data.
2902
+ *
2903
+ * @returns void
2904
+ */
2561
2905
  decreaseMinute() {
2562
2906
  const date = subMinutesExports.subMinutes(this.referenceDate, 1);
2563
2907
  this.emitDateStateChange(date);
@@ -2565,32 +2909,40 @@ const TimePicker = class {
2565
2909
  /**
2566
2910
  * Renderiza um botão de navegação consistente para hora ou minuto.
2567
2911
  *
2568
- * @param action - Ação que o botão executará.
2912
+ * @param {NavigationAction} action - Ação que o botão executará.
2913
+ * @returns {JSX.Element}
2569
2914
  */
2570
2915
  renderNavigationButton(action) {
2571
2916
  return (h("br-button", { type: "button", emphasis: "tertiary", density: "small", shape: "circle", disabled: this.disabled, "data-action": action, "aria-label": this.getNavigationAriaLabel(action), onClick: this.handleNavigationClick }, h("br-icon", { iconName: this.getIconForAction(action), width: "20", height: "20", "aria-hidden": "true" })));
2572
2917
  }
2573
- /** Renderiza o bloco completo de hora e minuto. */
2918
+ /**
2919
+ * Renderiza o bloco completo de hora e minuto.
2920
+ *
2921
+ * @returns {JSX.Element}
2922
+ */
2574
2923
  renderTimePicker() {
2575
2924
  return (h("div", { class: "timer", role: "group", "aria-label": "Seletor de hora e minuto", part: "timer" }, this.renderTimeField(INPUT_TIME_TYPE.HOUR), h("span", { class: "time-separator", "aria-hidden": "true", part: "separator" }, ":"), this.renderTimeField(INPUT_TIME_TYPE.MINUTE)));
2576
2925
  }
2577
2926
  /**
2578
2927
  * Renderiza um campo de edição com navegação lateral.
2579
2928
  *
2580
- * @param type - Tipo do campo a ser exibido.
2929
+ * @param {InputTimeType} type - Tipo do campo a ser exibido.
2930
+ * @returns {JSX.Element}
2581
2931
  */
2582
2932
  renderTimeField(type) {
2583
2933
  const { nextAction, prevAction } = this.getTimeFieldConfig(type);
2584
2934
  return (h("div", { class: "time-field", part: "field" }, this.renderNavigationButton(nextAction), h("input", { type: "text", inputmode: "numeric", maxLength: 2, value: this.timeDraft[type] ?? this.getTimeFieldValue(type), "aria-label": this.getTimeFieldAriaLabel(type), onInput: this.getTimeInputChangeHandler(type), onBlur: this.getTimeInputCommitHandler(type), onKeyDown: this.getTimeInputKeydownHandler(type), disabled: this.disabled, part: "input" }), this.renderNavigationButton(prevAction)));
2585
2935
  }
2936
+ /**
2937
+ * Render principal do componente.
2938
+ *
2939
+ * @returns {JSX.Element}
2940
+ */
2586
2941
  render() {
2587
- return (h(Host, { key: 'c89413711940ab403593c5e7a61a7cce26e2fc98' }, h("div", { key: '98688b192d54e60106f8420dd932a709470b5379', class: "br-time-picker", part: "container" }, this.renderTimePicker())));
2942
+ return (h(Host, { key: '1957a00098311a26b250bad62c885fc636072b30' }, h("div", { key: '0dd334340ba7da6cbc53d72183b862770d275856', class: "br-time-picker", part: "container" }, this.renderTimePicker())));
2588
2943
  }
2589
2944
  get el() { return getElement(this); }
2590
2945
  static get watchers() { return {
2591
- "referenceDate": [{
2592
- "handleReferenceDateChange": 0
2593
- }],
2594
2946
  "value": [{
2595
2947
  "handleValueChange": 0
2596
2948
  }]