@govbr-ds/webcomponents 2.1.0 → 2.1.1

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 (858) hide show
  1. package/cem/custom-elements.json +63 -63
  2. package/dist/cjs/app-globals-DcqHuMBv.js +9 -0
  3. package/dist/cjs/br-avatar.cjs.entry.js +248 -0
  4. package/dist/cjs/br-breadcrumb-item.cjs.entry.js +45 -0
  5. package/dist/cjs/br-breadcrumb.cjs.entry.js +443 -0
  6. package/dist/cjs/br-button_2.cjs.entry.js +280 -0
  7. package/dist/cjs/br-card.cjs.entry.js +111 -0
  8. package/dist/cjs/br-carousel-page.cjs.entry.js +80 -0
  9. package/dist/cjs/br-carousel.cjs.entry.js +565 -0
  10. package/dist/cjs/br-checkbox-group.cjs.entry.js +118 -0
  11. package/dist/cjs/br-checkbox.cjs.entry.js +288 -0
  12. package/dist/cjs/br-checkgroup.cjs.entry.js +20 -0
  13. package/dist/cjs/br-collapse_2.cjs.entry.js +683 -0
  14. package/dist/cjs/br-cookiebar-cookie.cjs.entry.js +83 -0
  15. package/dist/cjs/br-cookiebar-group.cjs.entry.js +309 -0
  16. package/dist/cjs/br-cookiebar-header.cjs.entry.js +39 -0
  17. package/dist/cjs/br-cookiebar-link.cjs.entry.js +54 -0
  18. package/dist/cjs/br-cookiebar-note-group.cjs.entry.js +70 -0
  19. package/dist/cjs/br-cookiebar-note.cjs.entry.js +25 -0
  20. package/dist/cjs/br-cookiebar.cjs.entry.js +758 -0
  21. package/dist/cjs/br-crumb.cjs.entry.js +51 -0
  22. package/dist/cjs/br-date-picker_3.cjs.entry.js +2446 -0
  23. package/dist/cjs/br-datetime-picker.cjs.entry.js +1887 -0
  24. package/dist/cjs/br-divider.cjs.entry.js +225 -0
  25. package/dist/cjs/br-dropdown_2.cjs.entry.js +1856 -0
  26. package/dist/cjs/br-footer-category.cjs.entry.js +102 -0
  27. package/dist/cjs/br-footer-item.cjs.entry.js +52 -0
  28. package/dist/cjs/br-footer-legal.cjs.entry.js +41 -0
  29. package/dist/cjs/br-footer-logo.cjs.entry.js +104 -0
  30. package/dist/cjs/br-footer-social.cjs.entry.js +71 -0
  31. package/dist/cjs/br-footer.cjs.entry.js +92 -0
  32. package/dist/cjs/br-header-function.cjs.entry.js +142 -0
  33. package/dist/cjs/br-header-link.cjs.entry.js +60 -0
  34. package/dist/cjs/br-header-list.cjs.entry.js +279 -0
  35. package/dist/cjs/br-header-logo.cjs.entry.js +177 -0
  36. package/dist/cjs/br-header.cjs.entry.js +642 -0
  37. package/dist/cjs/br-icon.cjs.entry.js +485 -0
  38. package/dist/cjs/br-input.cjs.entry.js +599 -0
  39. package/dist/cjs/br-item.cjs.entry.js +356 -0
  40. package/dist/cjs/br-link.cjs.entry.js +132 -0
  41. package/dist/cjs/br-loading.cjs.entry.js +505 -0
  42. package/dist/cjs/br-magic-button.cjs.entry.js +92 -0
  43. package/dist/cjs/br-menu-group.cjs.entry.js +23 -0
  44. package/dist/cjs/br-menu-header.cjs.entry.js +47 -0
  45. package/dist/cjs/br-menu-info.cjs.entry.js +38 -0
  46. package/dist/cjs/br-menu-item.cjs.entry.js +79 -0
  47. package/dist/cjs/br-menu-link.cjs.entry.js +55 -0
  48. package/dist/cjs/br-menu-list.cjs.entry.js +149 -0
  49. package/dist/cjs/br-menu-logo.cjs.entry.js +75 -0
  50. package/dist/cjs/br-menu-social.cjs.entry.js +65 -0
  51. package/dist/cjs/br-menu.cjs.entry.js +993 -0
  52. package/dist/cjs/br-modal.cjs.entry.js +496 -0
  53. package/dist/cjs/br-notification-body.cjs.entry.js +71 -0
  54. package/dist/cjs/br-notification-header.cjs.entry.js +48 -0
  55. package/dist/cjs/br-notification-item.cjs.entry.js +110 -0
  56. package/dist/cjs/br-notification.cjs.entry.js +334 -0
  57. package/dist/cjs/br-pagination.cjs.entry.js +884 -0
  58. package/dist/cjs/br-radio-group.cjs.entry.js +428 -0
  59. package/dist/cjs/br-radio.cjs.entry.js +357 -0
  60. package/dist/cjs/br-scrim.cjs.entry.js +1336 -0
  61. package/dist/cjs/br-select-input_3.cjs.entry.js +954 -0
  62. package/dist/cjs/br-sign-in.cjs.entry.js +125 -0
  63. package/dist/cjs/br-skip-link-item.cjs.entry.js +20 -0
  64. package/dist/cjs/br-skip-link.cjs.entry.js +362 -0
  65. package/dist/cjs/br-skiplink-item.cjs.entry.js +192 -0
  66. package/dist/cjs/br-slider.cjs.entry.js +688 -0
  67. package/dist/cjs/br-step_2.cjs.entry.js +628 -0
  68. package/dist/cjs/br-switch.cjs.entry.js +245 -0
  69. package/dist/cjs/br-tab-item.cjs.entry.js +185 -0
  70. package/dist/cjs/br-tab.cjs.entry.js +397 -0
  71. package/dist/cjs/br-table-body.cjs.entry.js +37 -0
  72. package/dist/cjs/br-table-cell.cjs.entry.js +184 -0
  73. package/dist/cjs/br-table-header-cell.cjs.entry.js +173 -0
  74. package/dist/cjs/br-table-header.cjs.entry.js +37 -0
  75. package/dist/cjs/br-table-row.cjs.entry.js +81 -0
  76. package/dist/cjs/br-table.cjs.entry.js +680 -0
  77. package/dist/cjs/br-tag.cjs.entry.js +494 -0
  78. package/dist/cjs/br-textarea.cjs.entry.js +306 -0
  79. package/dist/cjs/br-tooltip.cjs.entry.js +627 -0
  80. package/dist/cjs/br-upload.cjs.entry.js +582 -0
  81. package/dist/cjs/br-wizard-panel.cjs.entry.js +54 -0
  82. package/dist/cjs/br-wizard.cjs.entry.js +708 -0
  83. package/dist/cjs/breakpoint-observer-P8veqXg7.js +144 -0
  84. package/dist/cjs/clamp-Co_hWptd.js +25 -0
  85. package/dist/cjs/cookiebar.utils-CB1gQwZ4.js +18 -0
  86. package/dist/cjs/datetime-picker-constants-B5pWeOn1.js +3827 -0
  87. package/dist/cjs/event-CmVdNHxl.js +56 -0
  88. package/dist/cjs/floating-surface-dismiss-ccdiD0KF.js +63 -0
  89. package/dist/cjs/floating-ui-MBI1osio.js +136 -0
  90. package/dist/cjs/floating-ui.dom-BUSTaaxR.js +1715 -0
  91. package/dist/cjs/focus-DuywwJPR.js +30 -0
  92. package/dist/cjs/getNextElement-R9l3JtM9.js +31 -0
  93. package/dist/cjs/iconify-icon-DfODV9bf.js +2307 -0
  94. package/dist/cjs/id-CjRFMzf6.js +20 -0
  95. package/dist/cjs/index-C92n55ch.js +678 -0
  96. package/dist/cjs/index-CRdcutym.js +3287 -0
  97. package/dist/cjs/index.cjs.js +12 -0
  98. package/dist/cjs/isNil-DO5zWc3l.js +19 -0
  99. package/dist/cjs/isValid-Fu3kaWNn.js +3694 -0
  100. package/dist/cjs/loader.cjs.js +17 -0
  101. package/dist/cjs/native-dialog--Ewqm4w0.js +49 -0
  102. package/dist/cjs/navigation-AbzwcRCU.js +25 -0
  103. package/dist/cjs/parts-D5K3ae2C.js +19 -0
  104. package/dist/cjs/props-CScmBvKd.js +24 -0
  105. package/dist/cjs/raf-batcher-yc87a4dS.js +55 -0
  106. package/dist/cjs/slot-DAllytTj.js +48 -0
  107. package/dist/cjs/swipe-BU8_XE9f.js +345 -0
  108. package/dist/cjs/table-constants-BOPSay0B.js +183 -0
  109. package/dist/cjs/validator-CTCajtT9.js +123 -0
  110. package/dist/cjs/webcomponents.cjs.js +50 -0
  111. package/dist/collection/assets/icon-search.svg +6 -0
  112. package/dist/collection/assets/logo-negative.svg +1 -0
  113. package/dist/collection/assets/logo-positive.svg +1 -0
  114. package/dist/collection/assets/wc.svg +1 -0
  115. package/dist/collection/collection-manifest.json +113 -0
  116. package/dist/collection/components/avatar/avatar.css +1 -0
  117. package/dist/collection/components/avatar/avatar.js +589 -0
  118. package/dist/collection/components/avatar/avatar.types.js +1 -0
  119. package/dist/collection/components/breadcrumb/breadcrumb-item/breadcrumb-item.js +166 -0
  120. package/dist/collection/components/breadcrumb/breadcrumb.css +1 -0
  121. package/dist/collection/components/breadcrumb/breadcrumb.js +619 -0
  122. package/dist/collection/components/breadcrumb/breadcrumb.types.js +1 -0
  123. package/dist/collection/components/breadcrumb/crumb/crumb.js +175 -0
  124. package/dist/collection/components/button/button.css +1 -0
  125. package/dist/collection/components/button/button.js +546 -0
  126. package/dist/collection/components/button/button.types.js +1 -0
  127. package/dist/collection/components/card/card.css +1 -0
  128. package/dist/collection/components/card/card.js +225 -0
  129. package/dist/collection/components/carousel/carousel-page/carousel-page.css +1 -0
  130. package/dist/collection/components/carousel/carousel-page/carousel-page.js +195 -0
  131. package/dist/collection/components/carousel/carousel.css +1 -0
  132. package/dist/collection/components/carousel/carousel.js +1217 -0
  133. package/dist/collection/components/carousel/carousel.types.js +1 -0
  134. package/dist/collection/components/checkbox/checkbox.css +1 -0
  135. package/dist/collection/components/checkbox/checkbox.js +823 -0
  136. package/dist/collection/components/checkbox/checkbox.types.js +1 -0
  137. package/dist/collection/components/checkbox-group/checkbox-group.css +1 -0
  138. package/dist/collection/components/checkbox-group/checkbox-group.js +268 -0
  139. package/dist/collection/components/checkgroup/checkgroup.js +166 -0
  140. package/dist/collection/components/collapse/collapse.css +1 -0
  141. package/dist/collection/components/collapse/collapse.js +642 -0
  142. package/dist/collection/components/collapse/collapse.types.js +1 -0
  143. package/dist/collection/components/cookiebar/cookiebar-cookie/cookiebar-cookie.css +1 -0
  144. package/dist/collection/components/cookiebar/cookiebar-cookie/cookiebar-cookie.js +529 -0
  145. package/dist/collection/components/cookiebar/cookiebar-group/cookiebar-group.css +1 -0
  146. package/dist/collection/components/cookiebar/cookiebar-group/cookiebar-group.js +628 -0
  147. package/dist/collection/components/cookiebar/cookiebar-header/cookiebar-header.css +1 -0
  148. package/dist/collection/components/cookiebar/cookiebar-header/cookiebar-header.js +165 -0
  149. package/dist/collection/components/cookiebar/cookiebar-link/cookiebar-link.css +1 -0
  150. package/dist/collection/components/cookiebar/cookiebar-link/cookiebar-link.js +200 -0
  151. package/dist/collection/components/cookiebar/cookiebar-note/cookiebar-note.css +1 -0
  152. package/dist/collection/components/cookiebar/cookiebar-note/cookiebar-note.js +100 -0
  153. package/dist/collection/components/cookiebar/cookiebar-note-group/cookiebar-note-group.css +1 -0
  154. package/dist/collection/components/cookiebar/cookiebar-note-group/cookiebar-note-group.js +172 -0
  155. package/dist/collection/components/cookiebar/cookiebar.css +1 -0
  156. package/dist/collection/components/cookiebar/cookiebar.js +1419 -0
  157. package/dist/collection/components/cookiebar/cookiebar.types.js +1 -0
  158. package/dist/collection/components/cookiebar/cookiebar.utils.js +14 -0
  159. package/dist/collection/components/datetime-picker/date-picker/date-picker-locale.js +94 -0
  160. package/dist/collection/components/datetime-picker/date-picker/date-picker-props-validation.js +57 -0
  161. package/dist/collection/components/datetime-picker/date-picker/date-picker.css +1 -0
  162. package/dist/collection/components/datetime-picker/date-picker/date-picker.js +913 -0
  163. package/dist/collection/components/datetime-picker/datetime-input/datetime-input-props-validation.js +65 -0
  164. package/dist/collection/components/datetime-picker/datetime-input/datetime-input.css +1 -0
  165. package/dist/collection/components/datetime-picker/datetime-input/datetime-input.js +825 -0
  166. package/dist/collection/components/datetime-picker/datetime-picker-constants.js +36 -0
  167. package/dist/collection/components/datetime-picker/datetime-picker-form-associated.js +112 -0
  168. package/dist/collection/components/datetime-picker/datetime-picker-props-validation.js +202 -0
  169. package/dist/collection/components/datetime-picker/datetime-picker.css +1 -0
  170. package/dist/collection/components/datetime-picker/datetime-picker.js +1925 -0
  171. package/dist/collection/components/datetime-picker/datetime-picker.types.js +1 -0
  172. package/dist/collection/components/datetime-picker/datetime-picker.utils.js +250 -0
  173. package/dist/collection/components/datetime-picker/time-picker/time-picker-constants.js +13 -0
  174. package/dist/collection/components/datetime-picker/time-picker/time-picker.css +1 -0
  175. package/dist/collection/components/datetime-picker/time-picker/time-picker.js +456 -0
  176. package/dist/collection/components/divider/divider.css +1 -0
  177. package/dist/collection/components/divider/divider.js +537 -0
  178. package/dist/collection/components/divider/divider.types.js +1 -0
  179. package/dist/collection/components/dropdown/dropdown.css +1 -0
  180. package/dist/collection/components/dropdown/dropdown.js +939 -0
  181. package/dist/collection/components/dropdown/dropdown.types.js +1 -0
  182. package/dist/collection/components/footer/footer-category/footer-category.css +1 -0
  183. package/dist/collection/components/footer/footer-category/footer-category.js +160 -0
  184. package/dist/collection/components/footer/footer-item/footer-item.css +1 -0
  185. package/dist/collection/components/footer/footer-item/footer-item.js +154 -0
  186. package/dist/collection/components/footer/footer-legal/footer-legal.css +1 -0
  187. package/dist/collection/components/footer/footer-legal/footer-legal.js +75 -0
  188. package/dist/collection/components/footer/footer-logo/footer-logo.css +1 -0
  189. package/dist/collection/components/footer/footer-logo/footer-logo.js +342 -0
  190. package/dist/collection/components/footer/footer-logo/footer-logo.types.js +1 -0
  191. package/dist/collection/components/footer/footer-social/footer-social.css +1 -0
  192. package/dist/collection/components/footer/footer-social/footer-social.js +239 -0
  193. package/dist/collection/components/footer/footer.css +1 -0
  194. package/dist/collection/components/footer/footer.js +245 -0
  195. package/dist/collection/components/footer/footer.types.js +1 -0
  196. package/dist/collection/components/global.types.js +1 -0
  197. package/dist/collection/components/header/header-function/header-function.css +1 -0
  198. package/dist/collection/components/header/header-function/header-function.js +311 -0
  199. package/dist/collection/components/header/header-link/header-link.css +1 -0
  200. package/dist/collection/components/header/header-link/header-link.js +189 -0
  201. package/dist/collection/components/header/header-list/header-list.css +1 -0
  202. package/dist/collection/components/header/header-list/header-list.js +452 -0
  203. package/dist/collection/components/header/header-logo/header-logo.css +1 -0
  204. package/dist/collection/components/header/header-logo/header-logo.js +420 -0
  205. package/dist/collection/components/header/header.css +1 -0
  206. package/dist/collection/components/header/header.js +1131 -0
  207. package/dist/collection/components/header/header.types.js +1 -0
  208. package/dist/collection/components/icon/default-icons-cache.js +233 -0
  209. package/dist/collection/components/icon/icon.css +1 -0
  210. package/dist/collection/components/icon/icon.js +598 -0
  211. package/dist/collection/components/icon/icon.types.js +1 -0
  212. package/dist/collection/components/icon/icon.utils.js +33 -0
  213. package/dist/collection/components/input/input.css +1 -0
  214. package/dist/collection/components/input/input.js +1642 -0
  215. package/dist/collection/components/input/input.types.js +1 -0
  216. package/dist/collection/components/item/item.css +1 -0
  217. package/dist/collection/components/item/item.js +906 -0
  218. package/dist/collection/components/item/item.types.js +1 -0
  219. package/dist/collection/components/link/link.css +1 -0
  220. package/dist/collection/components/link/link.js +698 -0
  221. package/dist/collection/components/list/list.css +1 -0
  222. package/dist/collection/components/list/list.js +728 -0
  223. package/dist/collection/components/loading/loading.css +1 -0
  224. package/dist/collection/components/loading/loading.js +1169 -0
  225. package/dist/collection/components/loading/loading.types.js +1 -0
  226. package/dist/collection/components/magic-button/magic-button.css +1 -0
  227. package/dist/collection/components/magic-button/magic-button.js +237 -0
  228. package/dist/collection/components/menu/menu-group/menu-group.css +1 -0
  229. package/dist/collection/components/menu/menu-group/menu-group.js +77 -0
  230. package/dist/collection/components/menu/menu-header/menu-header.css +1 -0
  231. package/dist/collection/components/menu/menu-header/menu-header.js +161 -0
  232. package/dist/collection/components/menu/menu-info/menu-info.css +1 -0
  233. package/dist/collection/components/menu/menu-info/menu-info.js +94 -0
  234. package/dist/collection/components/menu/menu-item/menu-item.css +1 -0
  235. package/dist/collection/components/menu/menu-item/menu-item.js +306 -0
  236. package/dist/collection/components/menu/menu-item/menu-item.types.js +1 -0
  237. package/dist/collection/components/menu/menu-link/menu-link.css +1 -0
  238. package/dist/collection/components/menu/menu-link/menu-link.js +259 -0
  239. package/dist/collection/components/menu/menu-list/menu-list.css +1 -0
  240. package/dist/collection/components/menu/menu-list/menu-list.js +311 -0
  241. package/dist/collection/components/menu/menu-logo/menu-logo.css +1 -0
  242. package/dist/collection/components/menu/menu-logo/menu-logo.js +230 -0
  243. package/dist/collection/components/menu/menu-social/menu-social.css +1 -0
  244. package/dist/collection/components/menu/menu-social/menu-social.js +263 -0
  245. package/dist/collection/components/menu/menu.css +1 -0
  246. package/dist/collection/components/menu/menu.js +1372 -0
  247. package/dist/collection/components/menu/menu.types.js +1 -0
  248. package/dist/collection/components/menu/menu.utils.js +279 -0
  249. package/dist/collection/components/message/message.css +1 -0
  250. package/dist/collection/components/message/message.js +508 -0
  251. package/dist/collection/components/modal/modal.css +1 -0
  252. package/dist/collection/components/modal/modal.js +842 -0
  253. package/dist/collection/components/modal/modal.types.js +1 -0
  254. package/dist/collection/components/notification/notification-body/notification-body.css +1 -0
  255. package/dist/collection/components/notification/notification-body/notification-body.js +153 -0
  256. package/dist/collection/components/notification/notification-header/notification-header.css +1 -0
  257. package/dist/collection/components/notification/notification-header/notification-header.js +181 -0
  258. package/dist/collection/components/notification/notification-item/notification-item.css +1 -0
  259. package/dist/collection/components/notification/notification-item/notification-item.js +351 -0
  260. package/dist/collection/components/notification/notification-item/notification-item.types.js +1 -0
  261. package/dist/collection/components/notification/notification.css +1 -0
  262. package/dist/collection/components/notification/notification.js +838 -0
  263. package/dist/collection/components/notification/notification.types.js +1 -0
  264. package/dist/collection/components/pagination/pagination.css +1 -0
  265. package/dist/collection/components/pagination/pagination.js +1470 -0
  266. package/dist/collection/components/pagination/pagination.types.js +1 -0
  267. package/dist/collection/components/radio/radio.css +1 -0
  268. package/dist/collection/components/radio/radio.js +847 -0
  269. package/dist/collection/components/radio/radio.types.js +1 -0
  270. package/dist/collection/components/radio-group/radio-group.css +1 -0
  271. package/dist/collection/components/radio-group/radio-group.js +862 -0
  272. package/dist/collection/components/radio-group/radio-group.types.js +1 -0
  273. package/dist/collection/components/scrim/scrim.css +1 -0
  274. package/dist/collection/components/scrim/scrim.js +1825 -0
  275. package/dist/collection/components/scrim/scrim.types.js +1 -0
  276. package/dist/collection/components/scrim/scrim.utils.js +132 -0
  277. package/dist/collection/components/select/select-input/select-input.css +1 -0
  278. package/dist/collection/components/select/select-input/select-input.js +585 -0
  279. package/dist/collection/components/select/select-list/select-list.css +1 -0
  280. package/dist/collection/components/select/select-list/select-list.js +1147 -0
  281. package/dist/collection/components/select/select-option/select-option.css +1 -0
  282. package/dist/collection/components/select/select-option/select-option.js +543 -0
  283. package/dist/collection/components/select/select.constants.js +6 -0
  284. package/dist/collection/components/select/select.css +1 -0
  285. package/dist/collection/components/select/select.js +2575 -0
  286. package/dist/collection/components/select/select.types.js +1 -0
  287. package/dist/collection/components/sign-in/sign-in.css +1 -0
  288. package/dist/collection/components/sign-in/sign-in.js +400 -0
  289. package/dist/collection/components/sign-in/sign-in.types.js +1 -0
  290. package/dist/collection/components/skip-link/skip-link-item/skip-link-item-alias.js +103 -0
  291. package/dist/collection/components/skip-link/skip-link-item/skip-link-item.css +1 -0
  292. package/dist/collection/components/skip-link/skip-link-item/skip-link-item.js +450 -0
  293. package/dist/collection/components/skip-link/skip-link.css +1 -0
  294. package/dist/collection/components/skip-link/skip-link.js +699 -0
  295. package/dist/collection/components/skip-link/skip-link.types.js +1 -0
  296. package/dist/collection/components/slider/slider.css +1 -0
  297. package/dist/collection/components/slider/slider.js +1325 -0
  298. package/dist/collection/components/slider/slider.types.js +1 -0
  299. package/dist/collection/components/step/step-item/step-item.css +1 -0
  300. package/dist/collection/components/step/step-item/step-item.js +604 -0
  301. package/dist/collection/components/step/step-item/step-item.types.js +1 -0
  302. package/dist/collection/components/step/step.css +1 -0
  303. package/dist/collection/components/step/step.js +896 -0
  304. package/dist/collection/components/step/step.types.js +1 -0
  305. package/dist/collection/components/switch/switch.css +1 -0
  306. package/dist/collection/components/switch/switch.js +715 -0
  307. package/dist/collection/components/switch/switch.types.js +1 -0
  308. package/dist/collection/components/tab/tab-item/tab-item.css +1 -0
  309. package/dist/collection/components/tab/tab-item/tab-item.js +425 -0
  310. package/dist/collection/components/tab/tab.css +1 -0
  311. package/dist/collection/components/tab/tab.js +724 -0
  312. package/dist/collection/components/tab/tab.types.js +1 -0
  313. package/dist/collection/components/table/table-body/table-body.css +1 -0
  314. package/dist/collection/components/table/table-body/table-body.js +51 -0
  315. package/dist/collection/components/table/table-cell/table-cell.css +1 -0
  316. package/dist/collection/components/table/table-cell/table-cell.js +373 -0
  317. package/dist/collection/components/table/table-constants.js +171 -0
  318. package/dist/collection/components/table/table-header/table-header.css +1 -0
  319. package/dist/collection/components/table/table-header/table-header.js +51 -0
  320. package/dist/collection/components/table/table-header-cell/table-header-cell.css +1 -0
  321. package/dist/collection/components/table/table-header-cell/table-header-cell.js +402 -0
  322. package/dist/collection/components/table/table-row/table-row.css +1 -0
  323. package/dist/collection/components/table/table-row/table-row.js +261 -0
  324. package/dist/collection/components/table/table-tokens.js +50 -0
  325. package/dist/collection/components/table/table-types.js +1 -0
  326. package/dist/collection/components/table/table-utils.js +44 -0
  327. package/dist/collection/components/table/table.css +1 -0
  328. package/dist/collection/components/table/table.js +1030 -0
  329. package/dist/collection/components/tag/tag.css +1 -0
  330. package/dist/collection/components/tag/tag.js +1153 -0
  331. package/dist/collection/components/tag/tag.types.js +1 -0
  332. package/dist/collection/components/textarea/textarea.css +1 -0
  333. package/dist/collection/components/textarea/textarea.js +985 -0
  334. package/dist/collection/components/textarea/textarea.types.js +1 -0
  335. package/dist/collection/components/tooltip/tooltip.css +1 -0
  336. package/dist/collection/components/tooltip/tooltip.js +1024 -0
  337. package/dist/collection/components/tooltip/tooltip.types.js +1 -0
  338. package/dist/collection/components/upload/upload.css +1 -0
  339. package/dist/collection/components/upload/upload.js +1315 -0
  340. package/dist/collection/components/upload/upload.types.js +1 -0
  341. package/dist/collection/components/wizard/wizard-panel/wizard-panel.css +1 -0
  342. package/dist/collection/components/wizard/wizard-panel/wizard-panel.js +167 -0
  343. package/dist/collection/components/wizard/wizard.css +1 -0
  344. package/dist/collection/components/wizard/wizard.js +1228 -0
  345. package/dist/collection/index.js +14 -0
  346. package/dist/collection/pages/components/cookiebar/index.js +26 -0
  347. package/dist/collection/pages/components/link/index.js +29 -0
  348. package/dist/collection/pages/components/pagination/index.js +12 -0
  349. package/dist/collection/pages/components/slider/index.js +18 -0
  350. package/dist/collection/pages/scripts/code-editor.js +101 -0
  351. package/dist/collection/pages/scripts/component-controls.js +591 -0
  352. package/dist/collection/pages/scripts/dev-event-console.js +47 -0
  353. package/dist/collection/pages/scripts/menu.js +183 -0
  354. package/dist/collection/pages/scripts/pageLoader.js +1420 -0
  355. package/dist/collection/shared/utils/assetsPath.js +75 -0
  356. package/dist/collection/shared/utils/breakpoint-observer.js +139 -0
  357. package/dist/collection/shared/utils/clamp.js +21 -0
  358. package/dist/collection/shared/utils/css-variables.js +12 -0
  359. package/dist/collection/shared/utils/cssVariables.js +37 -0
  360. package/dist/collection/shared/utils/date.js +405 -0
  361. package/dist/collection/shared/utils/debounce.js +39 -0
  362. package/dist/collection/shared/utils/event.js +55 -0
  363. package/dist/collection/shared/utils/floating-surface-dismiss.js +59 -0
  364. package/dist/collection/shared/utils/floating-ui.js +131 -0
  365. package/dist/collection/shared/utils/focus.js +24 -0
  366. package/dist/collection/shared/utils/form.js +82 -0
  367. package/dist/collection/shared/utils/format-bytes.js +20 -0
  368. package/dist/collection/shared/utils/getNextElement.js +30 -0
  369. package/dist/collection/shared/utils/getRandom.js +27 -0
  370. package/dist/collection/shared/utils/helpers.js +31 -0
  371. package/dist/collection/shared/utils/id.js +16 -0
  372. package/dist/collection/shared/utils/index.js +60 -0
  373. package/dist/collection/shared/utils/interfaces.js +1 -0
  374. package/dist/collection/shared/utils/isClient.js +14 -0
  375. package/dist/collection/shared/utils/isDefined.js +19 -0
  376. package/dist/collection/shared/utils/isEmpty.js +30 -0
  377. package/dist/collection/shared/utils/isHTMLElement.js +16 -0
  378. package/dist/collection/shared/utils/isNil.js +15 -0
  379. package/dist/collection/shared/utils/isString.js +20 -0
  380. package/dist/collection/shared/utils/native-dialog.js +44 -0
  381. package/dist/collection/shared/utils/navigation.js +21 -0
  382. package/dist/collection/shared/utils/parts.js +15 -0
  383. package/dist/collection/shared/utils/prop-warning.js +7 -0
  384. package/dist/collection/shared/utils/props.js +37 -0
  385. package/dist/collection/shared/utils/raf-batcher.js +51 -0
  386. package/dist/collection/shared/utils/scrollLock.js +141 -0
  387. package/dist/collection/shared/utils/setRafTimeout.js +38 -0
  388. package/dist/collection/shared/utils/slot.js +113 -0
  389. package/dist/collection/shared/utils/ssr-date.js +33 -0
  390. package/dist/collection/shared/utils/stringToArray.js +29 -0
  391. package/dist/collection/shared/utils/swipe.js +342 -0
  392. package/dist/collection/shared/utils/transition.js +127 -0
  393. package/dist/collection/shared/utils/types.js +1 -0
  394. package/dist/collection/shared/utils/validator.js +51 -0
  395. package/dist/collection/value-accessors/angular-value-accessor-config.js +41 -0
  396. package/dist/collection/value-accessors/index.js +6 -0
  397. package/dist/collection/value-accessors/vue-model-config.js +43 -0
  398. package/dist/components/br-avatar.d.ts +11 -0
  399. package/dist/components/br-avatar.js +5 -0
  400. package/dist/components/br-breadcrumb-item.d.ts +11 -0
  401. package/dist/components/br-breadcrumb-item.js +5 -0
  402. package/dist/components/br-breadcrumb.d.ts +11 -0
  403. package/dist/components/br-breadcrumb.js +5 -0
  404. package/dist/components/br-button.d.ts +11 -0
  405. package/dist/components/br-button.js +5 -0
  406. package/dist/components/br-card.d.ts +11 -0
  407. package/dist/components/br-card.js +5 -0
  408. package/dist/components/br-carousel-page.d.ts +11 -0
  409. package/dist/components/br-carousel-page.js +5 -0
  410. package/dist/components/br-carousel.d.ts +11 -0
  411. package/dist/components/br-carousel.js +5 -0
  412. package/dist/components/br-checkbox-group.d.ts +11 -0
  413. package/dist/components/br-checkbox-group.js +5 -0
  414. package/dist/components/br-checkbox.d.ts +11 -0
  415. package/dist/components/br-checkbox.js +5 -0
  416. package/dist/components/br-checkgroup.d.ts +11 -0
  417. package/dist/components/br-checkgroup.js +5 -0
  418. package/dist/components/br-collapse.d.ts +11 -0
  419. package/dist/components/br-collapse.js +5 -0
  420. package/dist/components/br-cookiebar-cookie.d.ts +11 -0
  421. package/dist/components/br-cookiebar-cookie.js +5 -0
  422. package/dist/components/br-cookiebar-group.d.ts +11 -0
  423. package/dist/components/br-cookiebar-group.js +5 -0
  424. package/dist/components/br-cookiebar-header.d.ts +11 -0
  425. package/dist/components/br-cookiebar-header.js +5 -0
  426. package/dist/components/br-cookiebar-link.d.ts +11 -0
  427. package/dist/components/br-cookiebar-link.js +5 -0
  428. package/dist/components/br-cookiebar-note-group.d.ts +11 -0
  429. package/dist/components/br-cookiebar-note-group.js +5 -0
  430. package/dist/components/br-cookiebar-note.d.ts +11 -0
  431. package/dist/components/br-cookiebar-note.js +5 -0
  432. package/dist/components/br-cookiebar.d.ts +11 -0
  433. package/dist/components/br-cookiebar.js +5 -0
  434. package/dist/components/br-crumb.d.ts +11 -0
  435. package/dist/components/br-crumb.js +5 -0
  436. package/dist/components/br-date-picker.d.ts +11 -0
  437. package/dist/components/br-date-picker.js +5 -0
  438. package/dist/components/br-datetime-input.d.ts +11 -0
  439. package/dist/components/br-datetime-input.js +5 -0
  440. package/dist/components/br-datetime-picker.d.ts +11 -0
  441. package/dist/components/br-datetime-picker.js +5 -0
  442. package/dist/components/br-divider.d.ts +11 -0
  443. package/dist/components/br-divider.js +5 -0
  444. package/dist/components/br-dropdown.d.ts +11 -0
  445. package/dist/components/br-dropdown.js +5 -0
  446. package/dist/components/br-footer-category.d.ts +11 -0
  447. package/dist/components/br-footer-category.js +5 -0
  448. package/dist/components/br-footer-item.d.ts +11 -0
  449. package/dist/components/br-footer-item.js +5 -0
  450. package/dist/components/br-footer-legal.d.ts +11 -0
  451. package/dist/components/br-footer-legal.js +5 -0
  452. package/dist/components/br-footer-logo.d.ts +11 -0
  453. package/dist/components/br-footer-logo.js +5 -0
  454. package/dist/components/br-footer-social.d.ts +11 -0
  455. package/dist/components/br-footer-social.js +5 -0
  456. package/dist/components/br-footer.d.ts +11 -0
  457. package/dist/components/br-footer.js +5 -0
  458. package/dist/components/br-header-function.d.ts +11 -0
  459. package/dist/components/br-header-function.js +5 -0
  460. package/dist/components/br-header-link.d.ts +11 -0
  461. package/dist/components/br-header-link.js +5 -0
  462. package/dist/components/br-header-list.d.ts +11 -0
  463. package/dist/components/br-header-list.js +5 -0
  464. package/dist/components/br-header-logo.d.ts +11 -0
  465. package/dist/components/br-header-logo.js +5 -0
  466. package/dist/components/br-header.d.ts +11 -0
  467. package/dist/components/br-header.js +5 -0
  468. package/dist/components/br-icon.d.ts +11 -0
  469. package/dist/components/br-icon.js +5 -0
  470. package/dist/components/br-input.d.ts +11 -0
  471. package/dist/components/br-input.js +5 -0
  472. package/dist/components/br-item.d.ts +11 -0
  473. package/dist/components/br-item.js +5 -0
  474. package/dist/components/br-link.d.ts +11 -0
  475. package/dist/components/br-link.js +5 -0
  476. package/dist/components/br-list.d.ts +11 -0
  477. package/dist/components/br-list.js +5 -0
  478. package/dist/components/br-loading.d.ts +11 -0
  479. package/dist/components/br-loading.js +5 -0
  480. package/dist/components/br-magic-button.d.ts +11 -0
  481. package/dist/components/br-magic-button.js +5 -0
  482. package/dist/components/br-menu-group.d.ts +11 -0
  483. package/dist/components/br-menu-group.js +5 -0
  484. package/dist/components/br-menu-header.d.ts +11 -0
  485. package/dist/components/br-menu-header.js +5 -0
  486. package/dist/components/br-menu-info.d.ts +11 -0
  487. package/dist/components/br-menu-info.js +5 -0
  488. package/dist/components/br-menu-item.d.ts +11 -0
  489. package/dist/components/br-menu-item.js +5 -0
  490. package/dist/components/br-menu-link.d.ts +11 -0
  491. package/dist/components/br-menu-link.js +5 -0
  492. package/dist/components/br-menu-list.d.ts +11 -0
  493. package/dist/components/br-menu-list.js +5 -0
  494. package/dist/components/br-menu-logo.d.ts +11 -0
  495. package/dist/components/br-menu-logo.js +5 -0
  496. package/dist/components/br-menu-social.d.ts +11 -0
  497. package/dist/components/br-menu-social.js +5 -0
  498. package/dist/components/br-menu.d.ts +11 -0
  499. package/dist/components/br-menu.js +5 -0
  500. package/dist/components/br-message.d.ts +11 -0
  501. package/dist/components/br-message.js +5 -0
  502. package/dist/components/br-modal.d.ts +11 -0
  503. package/dist/components/br-modal.js +5 -0
  504. package/dist/components/br-notification-body.d.ts +11 -0
  505. package/dist/components/br-notification-body.js +5 -0
  506. package/dist/components/br-notification-header.d.ts +11 -0
  507. package/dist/components/br-notification-header.js +5 -0
  508. package/dist/components/br-notification-item.d.ts +11 -0
  509. package/dist/components/br-notification-item.js +5 -0
  510. package/dist/components/br-notification.d.ts +11 -0
  511. package/dist/components/br-notification.js +5 -0
  512. package/dist/components/br-pagination.d.ts +11 -0
  513. package/dist/components/br-pagination.js +5 -0
  514. package/dist/components/br-radio-group.d.ts +11 -0
  515. package/dist/components/br-radio-group.js +5 -0
  516. package/dist/components/br-radio.d.ts +11 -0
  517. package/dist/components/br-radio.js +5 -0
  518. package/dist/components/br-scrim.d.ts +11 -0
  519. package/dist/components/br-scrim.js +5 -0
  520. package/dist/components/br-select-input.d.ts +11 -0
  521. package/dist/components/br-select-input.js +5 -0
  522. package/dist/components/br-select-list.d.ts +11 -0
  523. package/dist/components/br-select-list.js +5 -0
  524. package/dist/components/br-select-option.d.ts +11 -0
  525. package/dist/components/br-select-option.js +5 -0
  526. package/dist/components/br-select.d.ts +11 -0
  527. package/dist/components/br-select.js +5 -0
  528. package/dist/components/br-sign-in.d.ts +11 -0
  529. package/dist/components/br-sign-in.js +5 -0
  530. package/dist/components/br-skip-link-item.d.ts +11 -0
  531. package/dist/components/br-skip-link-item.js +5 -0
  532. package/dist/components/br-skip-link.d.ts +11 -0
  533. package/dist/components/br-skip-link.js +5 -0
  534. package/dist/components/br-skiplink-item.d.ts +11 -0
  535. package/dist/components/br-skiplink-item.js +5 -0
  536. package/dist/components/br-slider.d.ts +11 -0
  537. package/dist/components/br-slider.js +5 -0
  538. package/dist/components/br-step-item.d.ts +11 -0
  539. package/dist/components/br-step-item.js +5 -0
  540. package/dist/components/br-step.d.ts +11 -0
  541. package/dist/components/br-step.js +5 -0
  542. package/dist/components/br-switch.d.ts +11 -0
  543. package/dist/components/br-switch.js +5 -0
  544. package/dist/components/br-tab-item.d.ts +11 -0
  545. package/dist/components/br-tab-item.js +5 -0
  546. package/dist/components/br-tab.d.ts +11 -0
  547. package/dist/components/br-tab.js +5 -0
  548. package/dist/components/br-table-body.d.ts +11 -0
  549. package/dist/components/br-table-body.js +5 -0
  550. package/dist/components/br-table-cell.d.ts +11 -0
  551. package/dist/components/br-table-cell.js +5 -0
  552. package/dist/components/br-table-header-cell.d.ts +11 -0
  553. package/dist/components/br-table-header-cell.js +5 -0
  554. package/dist/components/br-table-header.d.ts +11 -0
  555. package/dist/components/br-table-header.js +5 -0
  556. package/dist/components/br-table-row.d.ts +11 -0
  557. package/dist/components/br-table-row.js +5 -0
  558. package/dist/components/br-table.d.ts +11 -0
  559. package/dist/components/br-table.js +5 -0
  560. package/dist/components/br-tag.d.ts +11 -0
  561. package/dist/components/br-tag.js +5 -0
  562. package/dist/components/br-textarea.d.ts +11 -0
  563. package/dist/components/br-textarea.js +5 -0
  564. package/dist/components/br-time-picker.d.ts +11 -0
  565. package/dist/components/br-time-picker.js +5 -0
  566. package/dist/components/br-tooltip.d.ts +11 -0
  567. package/dist/components/br-tooltip.js +5 -0
  568. package/dist/components/br-upload.d.ts +11 -0
  569. package/dist/components/br-upload.js +5 -0
  570. package/dist/components/br-wizard-panel.d.ts +11 -0
  571. package/dist/components/br-wizard-panel.js +5 -0
  572. package/dist/components/br-wizard.d.ts +11 -0
  573. package/dist/components/br-wizard.js +5 -0
  574. package/dist/components/index.d.ts +213 -0
  575. package/dist/components/index.js +5 -0
  576. package/dist/components/p-0IYmyaTi.js +5 -0
  577. package/dist/components/p-41XwlWiS.js +5 -0
  578. package/dist/components/p-5z6jgH1D.js +5 -0
  579. package/dist/components/p-6OdfnwnK.js +5 -0
  580. package/dist/components/p-9S9bgUT0.js +5 -0
  581. package/dist/components/p-B-qLmYZC.js +5 -0
  582. package/dist/components/p-B-sbd1_h.js +5 -0
  583. package/dist/components/p-B55qsau4.js +5 -0
  584. package/dist/components/p-BC7f6MK8.js +5 -0
  585. package/dist/components/p-BPJpHGOW.js +5 -0
  586. package/dist/components/p-BW0_ORNA.js +5 -0
  587. package/dist/components/p-BWXfdbQH.js +5 -0
  588. package/dist/components/p-Bb-nLtTG.js +5 -0
  589. package/dist/components/p-BkS6ujyf.js +5 -0
  590. package/dist/components/p-Bm0ECvfB.js +5 -0
  591. package/dist/components/p-C1yRmdso.js +5 -0
  592. package/dist/components/p-C3LQSQpc.js +5 -0
  593. package/dist/components/p-C98-mHmV.js +5 -0
  594. package/dist/components/p-CDZFuUlU.js +5 -0
  595. package/dist/components/p-CRfi23Rd.js +5 -0
  596. package/dist/components/p-CUI5zWGf.js +5 -0
  597. package/dist/components/p-CXMwM9m4.js +5 -0
  598. package/dist/components/p-CdDwqbBv.js +5 -0
  599. package/dist/components/p-CxviDiCr.js +5 -0
  600. package/dist/components/p-D3usVJE2.js +16 -0
  601. package/dist/components/p-D6zroLx5.js +5 -0
  602. package/dist/components/p-D9SpD3Ay.js +5 -0
  603. package/dist/components/p-DA5GS53D.js +5 -0
  604. package/dist/components/p-DBP6K_aq.js +5 -0
  605. package/dist/components/p-DBmwzG9E.js +5 -0
  606. package/dist/components/p-DCrVo-8T.js +5 -0
  607. package/dist/components/p-DIK54tTj.js +5 -0
  608. package/dist/components/p-DQRSHR-D.js +5 -0
  609. package/dist/components/p-DRVMm1Py.js +5 -0
  610. package/dist/components/p-DWPmUV72.js +5 -0
  611. package/dist/components/p-DYA74R1r.js +5 -0
  612. package/dist/components/p-DYnkGWii.js +5 -0
  613. package/dist/components/p-D_CSvOY9.js +5 -0
  614. package/dist/components/p-DaeGwqw0.js +5 -0
  615. package/dist/components/p-Dkg2scYZ.js +5 -0
  616. package/dist/components/p-Dmfk7eEe.js +5 -0
  617. package/dist/components/p-DoXNfcTT.js +5 -0
  618. package/dist/components/p-DvrdmqoQ.js +5 -0
  619. package/dist/components/p-DxZJrIyL.js +5 -0
  620. package/dist/components/p-LmeJrLxH.js +5 -0
  621. package/dist/components/p-TFWd_UBV.js +5 -0
  622. package/dist/components/p-aF8bGN3t.js +5 -0
  623. package/dist/components/p-bhULC15U.js +5 -0
  624. package/dist/components/p-cF3ia5e9.js +5 -0
  625. package/dist/components/p-cfPt-vKA.js +5 -0
  626. package/dist/components/p-gvnfuTjd.js +5 -0
  627. package/dist/components/p-nJOJGpyl.js +5 -0
  628. package/dist/components/p-ttI0nvv_.js +5 -0
  629. package/dist/esm/app-globals-DVjNHTTs.js +7 -0
  630. package/dist/esm/br-avatar.entry.js +246 -0
  631. package/dist/esm/br-breadcrumb-item.entry.js +43 -0
  632. package/dist/esm/br-breadcrumb.entry.js +441 -0
  633. package/dist/esm/br-button_2.entry.js +277 -0
  634. package/dist/esm/br-card.entry.js +109 -0
  635. package/dist/esm/br-carousel-page.entry.js +78 -0
  636. package/dist/esm/br-carousel.entry.js +563 -0
  637. package/dist/esm/br-checkbox-group.entry.js +116 -0
  638. package/dist/esm/br-checkbox.entry.js +286 -0
  639. package/dist/esm/br-checkgroup.entry.js +18 -0
  640. package/dist/esm/br-collapse_2.entry.js +680 -0
  641. package/dist/esm/br-cookiebar-cookie.entry.js +81 -0
  642. package/dist/esm/br-cookiebar-group.entry.js +307 -0
  643. package/dist/esm/br-cookiebar-header.entry.js +37 -0
  644. package/dist/esm/br-cookiebar-link.entry.js +52 -0
  645. package/dist/esm/br-cookiebar-note-group.entry.js +68 -0
  646. package/dist/esm/br-cookiebar-note.entry.js +23 -0
  647. package/dist/esm/br-cookiebar.entry.js +756 -0
  648. package/dist/esm/br-crumb.entry.js +49 -0
  649. package/dist/esm/br-date-picker_3.entry.js +2442 -0
  650. package/dist/esm/br-datetime-picker.entry.js +1885 -0
  651. package/dist/esm/br-divider.entry.js +223 -0
  652. package/dist/esm/br-dropdown_2.entry.js +1853 -0
  653. package/dist/esm/br-footer-category.entry.js +100 -0
  654. package/dist/esm/br-footer-item.entry.js +50 -0
  655. package/dist/esm/br-footer-legal.entry.js +39 -0
  656. package/dist/esm/br-footer-logo.entry.js +102 -0
  657. package/dist/esm/br-footer-social.entry.js +69 -0
  658. package/dist/esm/br-footer.entry.js +90 -0
  659. package/dist/esm/br-header-function.entry.js +140 -0
  660. package/dist/esm/br-header-link.entry.js +58 -0
  661. package/dist/esm/br-header-list.entry.js +277 -0
  662. package/dist/esm/br-header-logo.entry.js +175 -0
  663. package/dist/esm/br-header.entry.js +640 -0
  664. package/dist/esm/br-icon.entry.js +483 -0
  665. package/dist/esm/br-input.entry.js +597 -0
  666. package/dist/esm/br-item.entry.js +354 -0
  667. package/dist/esm/br-link.entry.js +130 -0
  668. package/dist/esm/br-loading.entry.js +503 -0
  669. package/dist/esm/br-magic-button.entry.js +90 -0
  670. package/dist/esm/br-menu-group.entry.js +21 -0
  671. package/dist/esm/br-menu-header.entry.js +45 -0
  672. package/dist/esm/br-menu-info.entry.js +36 -0
  673. package/dist/esm/br-menu-item.entry.js +77 -0
  674. package/dist/esm/br-menu-link.entry.js +53 -0
  675. package/dist/esm/br-menu-list.entry.js +147 -0
  676. package/dist/esm/br-menu-logo.entry.js +73 -0
  677. package/dist/esm/br-menu-social.entry.js +63 -0
  678. package/dist/esm/br-menu.entry.js +991 -0
  679. package/dist/esm/br-modal.entry.js +494 -0
  680. package/dist/esm/br-notification-body.entry.js +69 -0
  681. package/dist/esm/br-notification-header.entry.js +46 -0
  682. package/dist/esm/br-notification-item.entry.js +108 -0
  683. package/dist/esm/br-notification.entry.js +332 -0
  684. package/dist/esm/br-pagination.entry.js +882 -0
  685. package/dist/esm/br-radio-group.entry.js +426 -0
  686. package/dist/esm/br-radio.entry.js +355 -0
  687. package/dist/esm/br-scrim.entry.js +1334 -0
  688. package/dist/esm/br-select-input_3.entry.js +950 -0
  689. package/dist/esm/br-sign-in.entry.js +123 -0
  690. package/dist/esm/br-skip-link-item.entry.js +18 -0
  691. package/dist/esm/br-skip-link.entry.js +360 -0
  692. package/dist/esm/br-skiplink-item.entry.js +190 -0
  693. package/dist/esm/br-slider.entry.js +686 -0
  694. package/dist/esm/br-step_2.entry.js +625 -0
  695. package/dist/esm/br-switch.entry.js +243 -0
  696. package/dist/esm/br-tab-item.entry.js +183 -0
  697. package/dist/esm/br-tab.entry.js +395 -0
  698. package/dist/esm/br-table-body.entry.js +35 -0
  699. package/dist/esm/br-table-cell.entry.js +182 -0
  700. package/dist/esm/br-table-header-cell.entry.js +171 -0
  701. package/dist/esm/br-table-header.entry.js +35 -0
  702. package/dist/esm/br-table-row.entry.js +79 -0
  703. package/dist/esm/br-table.entry.js +678 -0
  704. package/dist/esm/br-tag.entry.js +492 -0
  705. package/dist/esm/br-textarea.entry.js +304 -0
  706. package/dist/esm/br-tooltip.entry.js +625 -0
  707. package/dist/esm/br-upload.entry.js +580 -0
  708. package/dist/esm/br-wizard-panel.entry.js +52 -0
  709. package/dist/esm/br-wizard.entry.js +706 -0
  710. package/dist/esm/breakpoint-observer-DBmwzG9E.js +141 -0
  711. package/dist/esm/clamp-gvnfuTjd.js +23 -0
  712. package/dist/esm/cookiebar.utils-DYA74R1r.js +16 -0
  713. package/dist/esm/datetime-picker-constants-Bfm58jO6.js +3798 -0
  714. package/dist/esm/event-DFN_so7I.js +48 -0
  715. package/dist/esm/floating-surface-dismiss-BWXfdbQH.js +61 -0
  716. package/dist/esm/floating-ui-BavFwMnx.js +134 -0
  717. package/dist/esm/floating-ui.dom-DIK54tTj.js +1707 -0
  718. package/dist/esm/focus-DxZJrIyL.js +26 -0
  719. package/dist/esm/getNextElement-9S9bgUT0.js +28 -0
  720. package/dist/esm/iconify-icon-D3usVJE2.js +2303 -0
  721. package/dist/esm/id-BkS6ujyf.js +18 -0
  722. package/dist/esm/index-Bo-2igoO.js +671 -0
  723. package/dist/esm/index-C2RBydfd.js +3258 -0
  724. package/dist/esm/index.js +6 -0
  725. package/dist/esm/isNil-B-qLmYZC.js +17 -0
  726. package/dist/esm/isValid-DIUZX1qS.js +3684 -0
  727. package/dist/esm/loader.js +15 -0
  728. package/dist/esm/native-dialog-B55qsau4.js +46 -0
  729. package/dist/esm/navigation-bhULC15U.js +23 -0
  730. package/dist/esm/parts-Bb5vVlCC.js +17 -0
  731. package/dist/esm/props-DRVMm1Py.js +22 -0
  732. package/dist/esm/raf-batcher-cF3ia5e9.js +53 -0
  733. package/dist/esm/slot-BIG-yees.js +44 -0
  734. package/dist/esm/swipe-Dmfk7eEe.js +343 -0
  735. package/dist/esm/table-constants-CXMwM9m4.js +170 -0
  736. package/dist/esm/validator-D3tVP32U.js +113 -0
  737. package/dist/esm/webcomponents.js +46 -0
  738. package/dist/hydrate/index.d.ts +287 -0
  739. package/dist/hydrate/index.js +67323 -0
  740. package/dist/hydrate/index.mjs +67313 -0
  741. package/dist/hydrate/package.json +12 -0
  742. package/dist/index.cjs.js +1 -0
  743. package/dist/index.js +1 -0
  744. package/dist/loader/cdn.js +5 -0
  745. package/dist/loader/index.cjs.js +5 -0
  746. package/dist/loader/index.d.ts +24 -0
  747. package/dist/loader/index.es2017.js +5 -0
  748. package/dist/loader/index.js +6 -0
  749. package/dist/webcomponents/index.esm.js +5 -0
  750. package/dist/webcomponents/p-0196804a.entry.js +5 -0
  751. package/dist/webcomponents/p-0410186a.entry.js +5 -0
  752. package/dist/webcomponents/p-0415ef22.entry.js +5 -0
  753. package/dist/webcomponents/p-059c3d6c.entry.js +5 -0
  754. package/dist/webcomponents/p-0b8f39bc.entry.js +5 -0
  755. package/dist/webcomponents/p-0caa4d12.entry.js +5 -0
  756. package/dist/webcomponents/p-0d4f718d.entry.js +5 -0
  757. package/dist/webcomponents/p-0e84c9e8.entry.js +5 -0
  758. package/dist/webcomponents/p-12286e73.entry.js +5 -0
  759. package/dist/webcomponents/p-147ac8d3.entry.js +5 -0
  760. package/dist/webcomponents/p-1580beee.entry.js +5 -0
  761. package/dist/webcomponents/p-1b138f1c.entry.js +5 -0
  762. package/dist/webcomponents/p-1bca4499.entry.js +5 -0
  763. package/dist/webcomponents/p-1d6b0b6f.entry.js +5 -0
  764. package/dist/webcomponents/p-1d8cb8fd.entry.js +5 -0
  765. package/dist/webcomponents/p-22443c08.entry.js +5 -0
  766. package/dist/webcomponents/p-224daaac.entry.js +5 -0
  767. package/dist/webcomponents/p-28426d2a.entry.js +5 -0
  768. package/dist/webcomponents/p-2abd2da0.entry.js +5 -0
  769. package/dist/webcomponents/p-2fdc51ae.entry.js +5 -0
  770. package/dist/webcomponents/p-30c428b6.entry.js +5 -0
  771. package/dist/webcomponents/p-36bbea4e.entry.js +5 -0
  772. package/dist/webcomponents/p-3907ebfa.entry.js +5 -0
  773. package/dist/webcomponents/p-39a16f9d.entry.js +5 -0
  774. package/dist/webcomponents/p-3ebbd2f5.entry.js +5 -0
  775. package/dist/webcomponents/p-3ef7eac8.entry.js +5 -0
  776. package/dist/webcomponents/p-45356e9a.entry.js +5 -0
  777. package/dist/webcomponents/p-46513db4.entry.js +5 -0
  778. package/dist/webcomponents/p-4fe12a72.entry.js +5 -0
  779. package/dist/webcomponents/p-52df61cb.entry.js +5 -0
  780. package/dist/webcomponents/p-569134cf.entry.js +5 -0
  781. package/dist/webcomponents/p-5b257a4b.entry.js +5 -0
  782. package/dist/webcomponents/p-5ce7db4a.entry.js +5 -0
  783. package/dist/webcomponents/p-5f373708.entry.js +5 -0
  784. package/dist/webcomponents/p-5f6afb79.entry.js +5 -0
  785. package/dist/webcomponents/p-5fc7ba4c.entry.js +5 -0
  786. package/dist/webcomponents/p-60cc820c.entry.js +5 -0
  787. package/dist/webcomponents/p-66006312.entry.js +5 -0
  788. package/dist/webcomponents/p-66b13fd9.entry.js +5 -0
  789. package/dist/webcomponents/p-6OdfnwnK.js +5 -0
  790. package/dist/webcomponents/p-6c5f6cb6.entry.js +5 -0
  791. package/dist/webcomponents/p-6f1c4425.entry.js +5 -0
  792. package/dist/webcomponents/p-750799b7.entry.js +5 -0
  793. package/dist/webcomponents/p-756ff2ad.entry.js +5 -0
  794. package/dist/webcomponents/p-765bfe27.entry.js +5 -0
  795. package/dist/webcomponents/p-7ab96c11.entry.js +5 -0
  796. package/dist/webcomponents/p-7c2ff8b4.entry.js +5 -0
  797. package/dist/webcomponents/p-7cf9f4e5.entry.js +5 -0
  798. package/dist/webcomponents/p-7e1856e4.entry.js +5 -0
  799. package/dist/webcomponents/p-7f7506f0.entry.js +5 -0
  800. package/dist/webcomponents/p-7fb03a49.entry.js +5 -0
  801. package/dist/webcomponents/p-82200563.entry.js +5 -0
  802. package/dist/webcomponents/p-85f8063b.entry.js +5 -0
  803. package/dist/webcomponents/p-8b558233.entry.js +5 -0
  804. package/dist/webcomponents/p-8e6c2767.entry.js +5 -0
  805. package/dist/webcomponents/p-966ad32f.entry.js +5 -0
  806. package/dist/webcomponents/p-9679d230.entry.js +5 -0
  807. package/dist/webcomponents/p-96dd663b.entry.js +5 -0
  808. package/dist/webcomponents/p-98843fa3.entry.js +5 -0
  809. package/dist/webcomponents/p-9S9bgUT0.js +5 -0
  810. package/dist/webcomponents/p-9a375eff.entry.js +5 -0
  811. package/dist/webcomponents/p-9b358cff.entry.js +5 -0
  812. package/dist/webcomponents/p-9f7558c7.entry.js +5 -0
  813. package/dist/webcomponents/p-B-qLmYZC.js +5 -0
  814. package/dist/webcomponents/p-B55qsau4.js +5 -0
  815. package/dist/webcomponents/p-BIG-yees.js +5 -0
  816. package/dist/webcomponents/p-BWXfdbQH.js +5 -0
  817. package/dist/webcomponents/p-Bb5vVlCC.js +5 -0
  818. package/dist/webcomponents/p-Bfm58jO6.js +5 -0
  819. package/dist/webcomponents/p-BhMVJQ4-.js +5 -0
  820. package/dist/webcomponents/p-BkS6ujyf.js +5 -0
  821. package/dist/webcomponents/p-C2RBydfd.js +6 -0
  822. package/dist/webcomponents/p-CO5cOQQU.js +5 -0
  823. package/dist/webcomponents/p-CXMwM9m4.js +5 -0
  824. package/dist/webcomponents/p-D3tVP32U.js +5 -0
  825. package/dist/webcomponents/p-D3usVJE2.js +16 -0
  826. package/dist/webcomponents/p-DBmwzG9E.js +5 -0
  827. package/dist/webcomponents/p-DFN_so7I.js +5 -0
  828. package/dist/webcomponents/p-DIK54tTj.js +5 -0
  829. package/dist/webcomponents/p-DRVMm1Py.js +5 -0
  830. package/dist/webcomponents/p-DVjNHTTs.js +5 -0
  831. package/dist/webcomponents/p-DYA74R1r.js +5 -0
  832. package/dist/webcomponents/p-Dmfk7eEe.js +5 -0
  833. package/dist/webcomponents/p-DxZJrIyL.js +5 -0
  834. package/dist/webcomponents/p-a382e115.entry.js +5 -0
  835. package/dist/webcomponents/p-a9ff7c25.entry.js +5 -0
  836. package/dist/webcomponents/p-bba9fc09.entry.js +5 -0
  837. package/dist/webcomponents/p-bhULC15U.js +5 -0
  838. package/dist/webcomponents/p-c0b0f531.entry.js +5 -0
  839. package/dist/webcomponents/p-c211af17.entry.js +5 -0
  840. package/dist/webcomponents/p-c492d926.entry.js +5 -0
  841. package/dist/webcomponents/p-c4cfe599.entry.js +5 -0
  842. package/dist/webcomponents/p-c846e784.entry.js +5 -0
  843. package/dist/webcomponents/p-cF3ia5e9.js +5 -0
  844. package/dist/webcomponents/p-cedb8eea.entry.js +5 -0
  845. package/dist/webcomponents/p-d1e899cd.entry.js +5 -0
  846. package/dist/webcomponents/p-d38d82cc.entry.js +5 -0
  847. package/dist/webcomponents/p-dba376cb.entry.js +5 -0
  848. package/dist/webcomponents/p-e0ce536a.entry.js +5 -0
  849. package/dist/webcomponents/p-e1331288.entry.js +5 -0
  850. package/dist/webcomponents/p-e360a463.entry.js +5 -0
  851. package/dist/webcomponents/p-e80a1eb0.entry.js +5 -0
  852. package/dist/webcomponents/p-f078f972.entry.js +5 -0
  853. package/dist/webcomponents/p-f6318e94.entry.js +5 -0
  854. package/dist/webcomponents/p-fcd4ae48.entry.js +5 -0
  855. package/dist/webcomponents/p-gvnfuTjd.js +5 -0
  856. package/dist/webcomponents/webcomponents.esm.js +5 -0
  857. package/package.json +1 -1
  858. package/cem/.gitkeep +0 -0
@@ -0,0 +1,2446 @@
1
+ /*!
2
+ * Construído por SERPRO
3
+ * © https://serpro.gov.br/ - MIT License.
4
+ */
5
+ 'use strict';
6
+
7
+ var index$1 = require('./index-CRdcutym.js');
8
+ var index = require('./index-C92n55ch.js');
9
+ var datetimePickerConstants = require('./datetime-picker-constants-B5pWeOn1.js');
10
+ var isValid = require('./isValid-Fu3kaWNn.js');
11
+ var event = require('./event-CmVdNHxl.js');
12
+
13
+ var addMonths = {};
14
+
15
+ var hasRequiredAddMonths;
16
+
17
+ function requireAddMonths () {
18
+ if (hasRequiredAddMonths) return addMonths;
19
+ hasRequiredAddMonths = 1;
20
+ addMonths.addMonths = addMonths$1;
21
+ var _index = /*@__PURE__*/ datetimePickerConstants.requireConstructFrom();
22
+ var _index2 = /*@__PURE__*/ datetimePickerConstants.requireToDate();
23
+
24
+ /**
25
+ * The {@link addMonths} function options.
26
+ */
27
+
28
+ /**
29
+ * @name addMonths
30
+ * @category Month Helpers
31
+ * @summary Add the specified number of months to the given date.
32
+ *
33
+ * @description
34
+ * Add the specified number of months to the given date.
35
+ *
36
+ * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
37
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
38
+ *
39
+ * @param date - The date to be changed
40
+ * @param amount - The amount of months to be added.
41
+ * @param options - The options object
42
+ *
43
+ * @returns The new date with the months added
44
+ *
45
+ * @example
46
+ * // Add 5 months to 1 September 2014:
47
+ * const result = addMonths(new Date(2014, 8, 1), 5)
48
+ * //=> Sun Feb 01 2015 00:00:00
49
+ *
50
+ * // Add one month to 30 January 2023:
51
+ * const result = addMonths(new Date(2023, 0, 30), 1)
52
+ * //=> Tue Feb 28 2023 00:00:00
53
+ */
54
+ function addMonths$1(date, amount, options) {
55
+ const _date = (0, _index2.toDate)(date, options?.in);
56
+ if (isNaN(amount)) return (0, _index.constructFrom)(options?.in || date, NaN);
57
+ if (!amount) {
58
+ // If 0 months, no-op to avoid changing times in the hour before end of DST
59
+ return _date;
60
+ }
61
+ const dayOfMonth = _date.getDate();
62
+
63
+ // The JS Date object supports date math by accepting out-of-bounds values for
64
+ // month, day, etc. For example, new Date(2020, 0, 0) returns 31 Dec 2019 and
65
+ // new Date(2020, 13, 1) returns 1 Feb 2021. This is *almost* the behavior we
66
+ // want except that dates will wrap around the end of a month, meaning that
67
+ // new Date(2020, 13, 31) will return 3 Mar 2021 not 28 Feb 2021 as desired. So
68
+ // we'll default to the end of the desired month by adding 1 to the desired
69
+ // month and using a date of 0 to back up one day to the end of the desired
70
+ // month.
71
+ const endOfDesiredMonth = (0, _index.constructFrom)(
72
+ options?.in || date,
73
+ _date.getTime(),
74
+ );
75
+ endOfDesiredMonth.setMonth(_date.getMonth() + amount + 1, 0);
76
+ const daysInMonth = endOfDesiredMonth.getDate();
77
+ if (dayOfMonth >= daysInMonth) {
78
+ // If we're already at the end of the month, then this is the correct date
79
+ // and we're done.
80
+ return endOfDesiredMonth;
81
+ } else {
82
+ // Otherwise, we now know that setting the original day-of-month value won't
83
+ // cause an overflow, so set the desired day-of-month. Note that we can't
84
+ // just set the date of `endOfDesiredMonth` because that object may have had
85
+ // its time changed in the unusual case where where a DST transition was on
86
+ // the last day of the month and its local time was in the hour skipped or
87
+ // repeated next to a DST transition. So we use `date` instead which is
88
+ // guaranteed to still have the original time.
89
+ _date.setFullYear(
90
+ endOfDesiredMonth.getFullYear(),
91
+ endOfDesiredMonth.getMonth(),
92
+ dayOfMonth,
93
+ );
94
+ return _date;
95
+ }
96
+ }
97
+ return addMonths;
98
+ }
99
+
100
+ var addMonthsExports = /*@__PURE__*/ requireAddMonths();
101
+
102
+ var compareAsc = {};
103
+
104
+ var hasRequiredCompareAsc;
105
+
106
+ function requireCompareAsc () {
107
+ if (hasRequiredCompareAsc) return compareAsc;
108
+ hasRequiredCompareAsc = 1;
109
+ compareAsc.compareAsc = compareAsc$1;
110
+ var _index = /*@__PURE__*/ datetimePickerConstants.requireToDate();
111
+
112
+ /**
113
+ * @name compareAsc
114
+ * @category Common Helpers
115
+ * @summary Compare the two dates and return -1, 0 or 1.
116
+ *
117
+ * @description
118
+ * Compare the two dates and return 1 if the first date is after the second,
119
+ * -1 if the first date is before the second or 0 if dates are equal.
120
+ *
121
+ * @param dateLeft - The first date to compare
122
+ * @param dateRight - The second date to compare
123
+ *
124
+ * @returns The result of the comparison
125
+ *
126
+ * @example
127
+ * // Compare 11 February 1987 and 10 July 1989:
128
+ * const result = compareAsc(new Date(1987, 1, 11), new Date(1989, 6, 10))
129
+ * //=> -1
130
+ *
131
+ * @example
132
+ * // Sort the array of dates:
133
+ * const result = [
134
+ * new Date(1995, 6, 2),
135
+ * new Date(1987, 1, 11),
136
+ * new Date(1989, 6, 10)
137
+ * ].sort(compareAsc)
138
+ * //=> [
139
+ * // Wed Feb 11 1987 00:00:00,
140
+ * // Mon Jul 10 1989 00:00:00,
141
+ * // Sun Jul 02 1995 00:00:00
142
+ * // ]
143
+ */
144
+ function compareAsc$1(dateLeft, dateRight) {
145
+ const diff = +(0, _index.toDate)(dateLeft) - +(0, _index.toDate)(dateRight);
146
+
147
+ if (diff < 0) return -1;
148
+ else if (diff > 0) return 1;
149
+
150
+ // Return 0 if diff is 0; return NaN if diff is NaN
151
+ return diff;
152
+ }
153
+ return compareAsc;
154
+ }
155
+
156
+ var compareAscExports = /*@__PURE__*/ requireCompareAsc();
157
+
158
+ var endOfMonth = {};
159
+
160
+ var hasRequiredEndOfMonth;
161
+
162
+ function requireEndOfMonth () {
163
+ if (hasRequiredEndOfMonth) return endOfMonth;
164
+ hasRequiredEndOfMonth = 1;
165
+ endOfMonth.endOfMonth = endOfMonth$1;
166
+ var _index = /*@__PURE__*/ datetimePickerConstants.requireToDate();
167
+
168
+ /**
169
+ * The {@link endOfMonth} function options.
170
+ */
171
+
172
+ /**
173
+ * @name endOfMonth
174
+ * @category Month Helpers
175
+ * @summary Return the end of a month for the given date.
176
+ *
177
+ * @description
178
+ * Return the end of a month for the given date.
179
+ * The result will be in the local timezone.
180
+ *
181
+ * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
182
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
183
+ *
184
+ * @param date - The original date
185
+ * @param options - An object with options
186
+ *
187
+ * @returns The end of a month
188
+ *
189
+ * @example
190
+ * // The end of a month for 2 September 2014 11:55:00:
191
+ * const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))
192
+ * //=> Tue Sep 30 2014 23:59:59.999
193
+ */
194
+ function endOfMonth$1(date, options) {
195
+ const _date = (0, _index.toDate)(date, options?.in);
196
+ const month = _date.getMonth();
197
+ _date.setFullYear(_date.getFullYear(), month + 1, 0);
198
+ _date.setHours(23, 59, 59, 999);
199
+ return _date;
200
+ }
201
+ return endOfMonth;
202
+ }
203
+
204
+ var endOfMonthExports = /*@__PURE__*/ requireEndOfMonth();
205
+
206
+ var endOfWeek = {};
207
+
208
+ var hasRequiredEndOfWeek;
209
+
210
+ function requireEndOfWeek () {
211
+ if (hasRequiredEndOfWeek) return endOfWeek;
212
+ hasRequiredEndOfWeek = 1;
213
+ endOfWeek.endOfWeek = endOfWeek$1;
214
+ var _index = /*@__PURE__*/ datetimePickerConstants.requireDefaultOptions();
215
+ var _index2 = /*@__PURE__*/ datetimePickerConstants.requireToDate();
216
+
217
+ /**
218
+ * The {@link endOfWeek} function options.
219
+ */
220
+
221
+ /**
222
+ * @name endOfWeek
223
+ * @category Week Helpers
224
+ * @summary Return the end of a week for the given date.
225
+ *
226
+ * @description
227
+ * Return the end of a week for the given date.
228
+ * The result will be in the local timezone.
229
+ *
230
+ * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
231
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
232
+ *
233
+ * @param date - The original date
234
+ * @param options - An object with options
235
+ *
236
+ * @returns The end of a week
237
+ *
238
+ * @example
239
+ * // The end of a week for 2 September 2014 11:55:00:
240
+ * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0))
241
+ * //=> Sat Sep 06 2014 23:59:59.999
242
+ *
243
+ * @example
244
+ * // If the week starts on Monday, the end of the week for 2 September 2014 11:55:00:
245
+ * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })
246
+ * //=> Sun Sep 07 2014 23:59:59.999
247
+ */
248
+ function endOfWeek$1(date, options) {
249
+ const defaultOptions = (0, _index.getDefaultOptions)();
250
+ const weekStartsOn =
251
+ options?.weekStartsOn ??
252
+ options?.locale?.options?.weekStartsOn ??
253
+ defaultOptions.weekStartsOn ??
254
+ defaultOptions.locale?.options?.weekStartsOn ??
255
+ 0;
256
+
257
+ const _date = (0, _index2.toDate)(date, options?.in);
258
+ const day = _date.getDay();
259
+ const diff = (day < weekStartsOn ? -7 : 0) + 6 - (day - weekStartsOn);
260
+
261
+ _date.setDate(_date.getDate() + diff);
262
+ _date.setHours(23, 59, 59, 999);
263
+ return _date;
264
+ }
265
+ return endOfWeek;
266
+ }
267
+
268
+ var endOfWeekExports = /*@__PURE__*/ requireEndOfWeek();
269
+
270
+ var isAfter = {};
271
+
272
+ var hasRequiredIsAfter;
273
+
274
+ function requireIsAfter () {
275
+ if (hasRequiredIsAfter) return isAfter;
276
+ hasRequiredIsAfter = 1;
277
+ isAfter.isAfter = isAfter$1;
278
+ var _index = /*@__PURE__*/ datetimePickerConstants.requireToDate();
279
+
280
+ /**
281
+ * @name isAfter
282
+ * @category Common Helpers
283
+ * @summary Is the first date after the second one?
284
+ *
285
+ * @description
286
+ * Is the first date after the second one?
287
+ *
288
+ * @param date - The date that should be after the other one to return true
289
+ * @param dateToCompare - The date to compare with
290
+ *
291
+ * @returns The first date is after the second date
292
+ *
293
+ * @example
294
+ * // Is 10 July 1989 after 11 February 1987?
295
+ * const result = isAfter(new Date(1989, 6, 10), new Date(1987, 1, 11))
296
+ * //=> true
297
+ */
298
+ function isAfter$1(date, dateToCompare) {
299
+ return +(0, _index.toDate)(date) > +(0, _index.toDate)(dateToCompare);
300
+ }
301
+ return isAfter;
302
+ }
303
+
304
+ var isAfterExports = /*@__PURE__*/ requireIsAfter();
305
+
306
+ var isBefore = {};
307
+
308
+ var hasRequiredIsBefore;
309
+
310
+ function requireIsBefore () {
311
+ if (hasRequiredIsBefore) return isBefore;
312
+ hasRequiredIsBefore = 1;
313
+ isBefore.isBefore = isBefore$1;
314
+ var _index = /*@__PURE__*/ datetimePickerConstants.requireToDate();
315
+
316
+ /**
317
+ * @name isBefore
318
+ * @category Common Helpers
319
+ * @summary Is the first date before the second one?
320
+ *
321
+ * @description
322
+ * Is the first date before the second one?
323
+ *
324
+ * @param date - The date that should be before the other one to return true
325
+ * @param dateToCompare - The date to compare with
326
+ *
327
+ * @returns The first date is before the second date
328
+ *
329
+ * @example
330
+ * // Is 10 July 1989 before 11 February 1987?
331
+ * const result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11))
332
+ * //=> false
333
+ */
334
+ function isBefore$1(date, dateToCompare) {
335
+ return +(0, _index.toDate)(date) < +(0, _index.toDate)(dateToCompare);
336
+ }
337
+ return isBefore;
338
+ }
339
+
340
+ var isBeforeExports = /*@__PURE__*/ requireIsBefore();
341
+
342
+ var isSameMonth = {};
343
+
344
+ var hasRequiredIsSameMonth;
345
+
346
+ function requireIsSameMonth () {
347
+ if (hasRequiredIsSameMonth) return isSameMonth;
348
+ hasRequiredIsSameMonth = 1;
349
+ isSameMonth.isSameMonth = isSameMonth$1;
350
+ var _index = /*@__PURE__*/ datetimePickerConstants.requireNormalizeDates();
351
+
352
+ /**
353
+ * The {@link isSameMonth} function options.
354
+ */
355
+
356
+ /**
357
+ * @name isSameMonth
358
+ * @category Month Helpers
359
+ * @summary Are the given dates in the same month (and year)?
360
+ *
361
+ * @description
362
+ * Are the given dates in the same month (and year)?
363
+ *
364
+ * @param laterDate - The first date to check
365
+ * @param earlierDate - The second date to check
366
+ * @param options - An object with options
367
+ *
368
+ * @returns The dates are in the same month (and year)
369
+ *
370
+ * @example
371
+ * // Are 2 September 2014 and 25 September 2014 in the same month?
372
+ * const result = isSameMonth(new Date(2014, 8, 2), new Date(2014, 8, 25))
373
+ * //=> true
374
+ *
375
+ * @example
376
+ * // Are 2 September 2014 and 25 September 2015 in the same month?
377
+ * const result = isSameMonth(new Date(2014, 8, 2), new Date(2015, 8, 25))
378
+ * //=> false
379
+ */
380
+ function isSameMonth$1(laterDate, earlierDate, options) {
381
+ const [laterDate_, earlierDate_] = (0, _index.normalizeDates)(
382
+ options?.in,
383
+ laterDate,
384
+ earlierDate,
385
+ );
386
+ return (
387
+ laterDate_.getFullYear() === earlierDate_.getFullYear() &&
388
+ laterDate_.getMonth() === earlierDate_.getMonth()
389
+ );
390
+ }
391
+ return isSameMonth;
392
+ }
393
+
394
+ var isSameMonthExports = /*@__PURE__*/ requireIsSameMonth();
395
+
396
+ var startOfMonth = {};
397
+
398
+ var hasRequiredStartOfMonth;
399
+
400
+ function requireStartOfMonth () {
401
+ if (hasRequiredStartOfMonth) return startOfMonth;
402
+ hasRequiredStartOfMonth = 1;
403
+ startOfMonth.startOfMonth = startOfMonth$1;
404
+ var _index = /*@__PURE__*/ datetimePickerConstants.requireToDate();
405
+
406
+ /**
407
+ * The {@link startOfMonth} function options.
408
+ */
409
+
410
+ /**
411
+ * @name startOfMonth
412
+ * @category Month Helpers
413
+ * @summary Return the start of a month for the given date.
414
+ *
415
+ * @description
416
+ * Return the start of a month for the given date. The result will be in the local timezone.
417
+ *
418
+ * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments.
419
+ * Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
420
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed,
421
+ * or inferred from the arguments.
422
+ *
423
+ * @param date - The original date
424
+ * @param options - An object with options
425
+ *
426
+ * @returns The start of a month
427
+ *
428
+ * @example
429
+ * // The start of a month for 2 September 2014 11:55:00:
430
+ * const result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))
431
+ * //=> Mon Sep 01 2014 00:00:00
432
+ */
433
+ function startOfMonth$1(date, options) {
434
+ const _date = (0, _index.toDate)(date, options?.in);
435
+ _date.setDate(1);
436
+ _date.setHours(0, 0, 0, 0);
437
+ return _date;
438
+ }
439
+ return startOfMonth;
440
+ }
441
+
442
+ var startOfMonthExports = /*@__PURE__*/ requireStartOfMonth();
443
+
444
+ var subMonths = {};
445
+
446
+ var hasRequiredSubMonths;
447
+
448
+ function requireSubMonths () {
449
+ if (hasRequiredSubMonths) return subMonths;
450
+ hasRequiredSubMonths = 1;
451
+ subMonths.subMonths = subMonths$1;
452
+ var _index = /*@__PURE__*/ requireAddMonths();
453
+
454
+ /**
455
+ * The subMonths function options.
456
+ */
457
+
458
+ /**
459
+ * @name subMonths
460
+ * @category Month Helpers
461
+ * @summary Subtract the specified number of months from the given date.
462
+ *
463
+ * @description
464
+ * Subtract the specified number of months from the given date.
465
+ *
466
+ * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
467
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
468
+ *
469
+ * @param date - The date to be changed
470
+ * @param amount - The amount of months to be subtracted.
471
+ * @param options - An object with options
472
+ *
473
+ * @returns The new date with the months subtracted
474
+ *
475
+ * @example
476
+ * // Subtract 5 months from 1 February 2015:
477
+ * const result = subMonths(new Date(2015, 1, 1), 5)
478
+ * //=> Mon Sep 01 2014 00:00:00
479
+ */
480
+ function subMonths$1(date, amount, options) {
481
+ return (0, _index.addMonths)(date, -amount, options);
482
+ }
483
+ return subMonths;
484
+ }
485
+
486
+ var subMonthsExports = /*@__PURE__*/ requireSubMonths();
487
+
488
+ const VALID_WEEK_START_DAYS = [0, 1, 2, 3, 4, 5, 6];
489
+ /**
490
+ * Verifica se o valor informado representa um índice válido de início da semana.
491
+ *
492
+ * @param value - Valor bruto recebido via prop.
493
+ * @returns `true` quando o valor está entre `0` e `6`.
494
+ */
495
+ function isValidWeekStartsOn(value) {
496
+ return VALID_WEEK_START_DAYS.includes(value);
497
+ }
498
+ /**
499
+ * Normaliza o índice de início da semana e aplica `0` quando o valor é inválido.
500
+ *
501
+ * @param value - Valor bruto recebido via prop.
502
+ * @returns Índice normalizado para o primeiro dia da semana.
503
+ */
504
+ function normalizeWeekStartsOn(value) {
505
+ if (isValidWeekStartsOn(value))
506
+ return value;
507
+ isValid.warnInvalidPropValue('br-date-picker', 'weekStartsOn', String(value), '0');
508
+ return 0;
509
+ }
510
+ /**
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
+ *
514
+ * @param value - Código de locale informado pelo consumidor.
515
+ * @returns `true` quando o locale pode ser resolvido com sucesso.
516
+ */
517
+ function isValidLocaleCode(value) {
518
+ try {
519
+ index.resolveDateFnsLocale(value);
520
+ return true;
521
+ }
522
+ catch {
523
+ return false;
524
+ }
525
+ }
526
+ /**
527
+ * Normaliza o locale informado e aplica o default do componente quando necessário.
528
+ *
529
+ * @param value - Código de locale informado pelo consumidor.
530
+ * @returns Locale válido para o date picker.
531
+ */
532
+ function normalizeLocale(value) {
533
+ if (isValidLocaleCode(value))
534
+ return value;
535
+ isValid.warnInvalidPropValue('br-date-picker', 'locale', value, datetimePickerConstants.DATETIME_PICKER_LOCALE.DEFAULT);
536
+ return datetimePickerConstants.DATETIME_PICKER_LOCALE.DEFAULT;
537
+ }
538
+
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}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,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))}}@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))}}@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-in-out{animation-timing-function:cubic-bezier(0.42, 0, 0.58, 1)}.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}.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)}.help{font-size:var(--font-size-scale-base)}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)}*[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)}: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
+
541
+ const DatePicker = class {
542
+ constructor(hostRef) {
543
+ index$1.registerInstance(this, hostRef);
544
+ this.dateStateChange = index$1.createEvent(this, "dateStateChange", 7);
545
+ /** Data com foco atual na navegação por teclado do calendário. */
546
+ this.focusedDate = new Date();
547
+ /** Define o índice do dia em que a semana começa na interface do calendário. */
548
+ this.weekStartsOn = 0;
549
+ /** Data usada como base visual para o mês atualmente exibido. */
550
+ this.referenceDate = new Date();
551
+ /** Data atualmente selecionada pelo usuário, ou `null` quando não há seleção. */
552
+ this.value = null;
553
+ /** Define se a seleção ocorre por data única ou por intervalo. */
554
+ this.selectionMode = 'single';
555
+ /** Data inicial selecionada quando o calendário opera no modo de intervalo. */
556
+ this.rangeStart = null;
557
+ /** Data final selecionada quando o calendário opera no modo de intervalo. */
558
+ this.rangeEnd = null;
559
+ /** Desabilita a interação do calendário quando ativo. */
560
+ this.disabled = false;
561
+ /** Lista de datas indisponíveis para seleção no calendário. */
562
+ this.disabledDates = [];
563
+ /** Locale usado para gerar nomes de meses e dias da semana. */
564
+ this.locale = datetimePickerConstants.DATETIME_PICKER_LOCALE.DEFAULT;
565
+ /**
566
+ * Define se o calendário deve manter um número fixo de linhas (6 semanas = 42 dias)
567
+ * ou variar conforme o mês.
568
+ *
569
+ * Quando `true`, o calendário sempre exibe 6 semanas completas.
570
+ * Quando `false`, o calendário adapta-se ao mês, exibindo apenas as semanas necessárias.
571
+ *
572
+ * @default false
573
+ */
574
+ this.fixedRowCount = false;
575
+ /** Sinaliza ao componentDidRender que deve mover o foco para a célula atual. */
576
+ this.shouldFocusDate = false;
577
+ /** Mantém handlers estáveis por data para evitar recriação a cada renderização. */
578
+ this.dayClickHandlers = new WeakMap();
579
+ /**
580
+ * Atualiza o mês exibido a partir da seleção do usuário.
581
+ *
582
+ * @param event - Mudança do `<select>` de mês.
583
+ */
584
+ this.handleMonthChange = (event) => {
585
+ if (this.disabled) {
586
+ return;
587
+ }
588
+ const select = event.currentTarget;
589
+ const monthIndex = Number(select.value);
590
+ if (Number.isNaN(monthIndex) || monthIndex < 0 || monthIndex > 11) {
591
+ console.warn(`Índice de mês inválido selecionado: ${select.value}`);
592
+ return;
593
+ }
594
+ const date = isValid.setExports.set(this.baseDate, { month: monthIndex, date: 1 });
595
+ this.emitDateStateChange(date);
596
+ };
597
+ /**
598
+ * Executa a ação de navegação associada ao botão clicado.
599
+ *
600
+ * @param event - Clique no botão de navegação.
601
+ */
602
+ this.handleNavigationClick = (event) => {
603
+ const action = event.currentTarget.dataset.action;
604
+ if (action === undefined) {
605
+ console.warn('Botão de navegação clicado sem data-action definido');
606
+ return;
607
+ }
608
+ switch (action) {
609
+ case datetimePickerConstants.NAVIGATION_ACTION.PREVIOUS_MONTH:
610
+ this.decreaseMonth();
611
+ break;
612
+ case datetimePickerConstants.NAVIGATION_ACTION.NEXT_MONTH:
613
+ this.increaseMonth();
614
+ break;
615
+ default:
616
+ console.warn(`Ação de navegação desconhecida: ${action}`);
617
+ }
618
+ };
619
+ /**
620
+ * Atualiza o ano exibido a partir do valor digitado.
621
+ *
622
+ * @param event - Mudança do campo de ano.
623
+ */
624
+ this.handleYearChange = (event) => {
625
+ if (this.disabled) {
626
+ return;
627
+ }
628
+ const input = event.currentTarget;
629
+ const year = Number(input.value);
630
+ if (Number.isNaN(year) || year < 1 || year > 9999) {
631
+ console.warn(`Ano inválido digitado: ${input.value}`);
632
+ return;
633
+ }
634
+ const date = isValid.setExports.set(this.baseDate, { year, month: this.baseDate.getMonth(), date: 1 });
635
+ const range = this.selectionMode === 'range' && this.rangeStart !== null && this.rangeEnd !== null
636
+ ? { start: this.rangeStart, end: this.rangeEnd }
637
+ : undefined;
638
+ this.emitDateStateChange(date, this.value, range);
639
+ };
640
+ /**
641
+ * Gerencia a navegação por teclado dentro da grade de dias.
642
+ *
643
+ * Teclas suportadas:
644
+ * - `ArrowLeft` / `ArrowRight`: avança ou recua um dia.
645
+ * - `ArrowUp` / `ArrowDown`: avança ou recua sete dias (linha inteira).
646
+ * - `PageUp` / `PageDown`: navega entre meses.
647
+ * - `Home` / `End`: primeiro ou último dia da semana atual.
648
+ * - `Enter` / `Space`: seleciona o dia com foco.
649
+ *
650
+ * @param event - Evento de teclado disparado na grade.
651
+ */
652
+ this.handleGridKeydown = (event) => {
653
+ const HANDLED_KEYS = [
654
+ 'ArrowLeft',
655
+ 'ArrowRight',
656
+ 'ArrowUp',
657
+ 'ArrowDown',
658
+ 'PageUp',
659
+ 'PageDown',
660
+ 'Home',
661
+ 'End',
662
+ 'Enter',
663
+ ' ',
664
+ ];
665
+ if (!HANDLED_KEYS.includes(event.key))
666
+ return;
667
+ const target = event.target;
668
+ const dateKey = target.dataset?.date;
669
+ if (dateKey === undefined)
670
+ return;
671
+ event.preventDefault();
672
+ const current = isValid.parseExports.parse(dateKey, 'yyyy-MM-dd', new Date());
673
+ if (event.key === 'Enter' || event.key === ' ') {
674
+ if (!this.isDateDisabled(current)) {
675
+ this.handleDayClick(current);
676
+ }
677
+ return;
678
+ }
679
+ let next;
680
+ switch (event.key) {
681
+ case 'ArrowLeft':
682
+ next = index.addDaysExports.addDays(current, -1);
683
+ break;
684
+ case 'ArrowRight':
685
+ next = index.addDaysExports.addDays(current, 1);
686
+ break;
687
+ case 'ArrowUp':
688
+ next = index.addDaysExports.addDays(current, -7);
689
+ break;
690
+ case 'ArrowDown':
691
+ next = index.addDaysExports.addDays(current, 7);
692
+ break;
693
+ case 'PageUp':
694
+ next = addMonthsExports.addMonths(current, -1);
695
+ break;
696
+ case 'PageDown':
697
+ next = addMonthsExports.addMonths(current, 1);
698
+ break;
699
+ case 'Home':
700
+ next = index.startOfWeekExports.startOfWeek(current, { weekStartsOn: this.weekStartsOn });
701
+ break;
702
+ case 'End':
703
+ next = endOfWeekExports.endOfWeek(current, { weekStartsOn: this.weekStartsOn });
704
+ break;
705
+ default:
706
+ return;
707
+ }
708
+ this.moveFocusTo(next);
709
+ };
710
+ }
711
+ handleRangeValueChange(newValue) {
712
+ if (!newValue)
713
+ return;
714
+ this.rangeStart = newValue.start;
715
+ this.rangeEnd = newValue.end;
716
+ }
717
+ /**
718
+ * Sincroniza `focusedDate` quando o valor selecionado muda externamente.
719
+ *
720
+ * @param newValue - Novo valor recebido via prop.
721
+ */
722
+ handleValueChange(newValue) {
723
+ if (newValue !== null) {
724
+ this.focusedDate = isValid.toDateExports.toDate(newValue);
725
+ }
726
+ }
727
+ /**
728
+ * Revalida a configuração quando o início da semana muda.
729
+ *
730
+ * @param newValue - Novo valor recebido via prop.
731
+ */
732
+ handleWeekStartsOnChange(newValue) {
733
+ this.ensureValidWeekStartsOn(newValue);
734
+ }
735
+ /**
736
+ * Revalida o locale quando a prop muda.
737
+ *
738
+ * @param newValue - Novo valor recebido via prop.
739
+ */
740
+ handleLocaleChange(newValue) {
741
+ this.ensureValidLocale(newValue);
742
+ }
743
+ /**
744
+ * Normaliza os valores públicos antes da primeira renderização.
745
+ */
746
+ componentWillLoad() {
747
+ this.referenceDate = isValid.resolveSsrLocalDate(this.el, this.referenceDate);
748
+ this.ensureValidWeekStartsOn();
749
+ this.ensureValidLocale();
750
+ this.focusedDate = isValid.toDateExports.toDate(this.value ?? this.referenceDate);
751
+ }
752
+ /**
753
+ * Move o foco para a célula correspondente ao `focusedDate` após re-renderização.
754
+ */
755
+ componentDidRender() {
756
+ if (!this.shouldFocusDate)
757
+ return;
758
+ this.shouldFocusDate = false;
759
+ const normalizedDate = this.getNormalizedFocusedDate();
760
+ const dateKey = datetimePickerConstants.formatExports.format(normalizedDate, 'yyyy-MM-dd');
761
+ const cell = this.el.shadowRoot?.querySelector(`[data-date="${dateKey}"]`);
762
+ cell?.focus();
763
+ }
764
+ /**
765
+ * Garante que o valor de `weekStartsOn` esteja dentro do domínio suportado.
766
+ *
767
+ * @param value - Valor bruto informado pelo consumidor.
768
+ */
769
+ ensureValidWeekStartsOn(value = this.weekStartsOn) {
770
+ const normalizedWeekStartsOn = normalizeWeekStartsOn(value);
771
+ if (normalizedWeekStartsOn !== value) {
772
+ this.weekStartsOn = normalizedWeekStartsOn;
773
+ }
774
+ }
775
+ /**
776
+ * Garante que o locale informado seja suportado.
777
+ *
778
+ * @param value - Valor bruto informado pelo consumidor.
779
+ */
780
+ ensureValidLocale(value = this.locale) {
781
+ const normalizedLocale = normalizeLocale(value);
782
+ if (normalizedLocale !== value) {
783
+ this.locale = normalizedLocale;
784
+ }
785
+ }
786
+ /**
787
+ * Emite o estado consolidado do componente para manter a navegação sincronizada.
788
+ *
789
+ * @param nextReferenceDate - Nova data de referência após a interação.
790
+ * @param nextValue - Valor selecionado final; por padrão, mantém a seleção atual.
791
+ */
792
+ emitDateStateChange(nextReferenceDate, nextValue = this.value, nextRange = undefined) {
793
+ // Garantir segundos zerados (componente não manipula segundos)
794
+ const normalizedReference = isValid.setExports.set(nextReferenceDate, { seconds: 0, milliseconds: 0 });
795
+ const normalizedValue = nextValue === null ? null : isValid.setExports.set(nextValue, { seconds: 0, milliseconds: 0 });
796
+ const valueChanged = this.value?.getTime() !== normalizedValue?.getTime();
797
+ this.value = normalizedValue;
798
+ this.dateStateChange.emit({
799
+ referenceDate: normalizedReference,
800
+ value: normalizedValue,
801
+ range: nextRange,
802
+ });
803
+ if (nextRange)
804
+ this.rangeValue = nextRange;
805
+ if (valueChanged || nextRange !== undefined) {
806
+ event.dispatchNativeFormEvent(this.el, 'input');
807
+ event.dispatchNativeFormEvent(this.el, 'change');
808
+ }
809
+ }
810
+ /**
811
+ * Resolve o ícone usado em cada ação de navegação.
812
+ *
813
+ * @param action - Ação de navegação representada pelo botão.
814
+ * @returns Nome do ícone ou um fallback quando a ação não é reconhecida.
815
+ */
816
+ getIconForAction(action) {
817
+ switch (action) {
818
+ case datetimePickerConstants.NAVIGATION_ACTION.PREVIOUS_MONTH:
819
+ return 'fa6-solid:chevron-left';
820
+ case datetimePickerConstants.NAVIGATION_ACTION.NEXT_MONTH:
821
+ return 'fa6-solid:chevron-right';
822
+ default:
823
+ return 'fa6-solid:question';
824
+ }
825
+ }
826
+ /**
827
+ * Aplica a data clicada preservando hora e minuto da referência atual.
828
+ *
829
+ * @param date - Dia selecionado no calendário.
830
+ */
831
+ handleDayClick(date) {
832
+ if (this.disabled || this.isDateDisabled(date)) {
833
+ return;
834
+ }
835
+ const newDate = isValid.setExports.set(date, {
836
+ hours: this.referenceDate.getHours(),
837
+ minutes: this.referenceDate.getMinutes(),
838
+ seconds: 0,
839
+ milliseconds: 0,
840
+ });
841
+ if (this.selectionMode === 'range') {
842
+ this.handleRangeDayClick(newDate);
843
+ return;
844
+ }
845
+ this.emitDateStateChange(newDate, newDate);
846
+ }
847
+ /** Atualiza o intervalo selecionado com base no clique atual. */
848
+ handleRangeDayClick(clickedDate) {
849
+ const start = this.rangeStart;
850
+ const end = this.rangeEnd;
851
+ if (start === null || end !== null) {
852
+ this.emitDateStateChange(clickedDate, clickedDate, {
853
+ start: clickedDate,
854
+ end: null,
855
+ });
856
+ return;
857
+ }
858
+ const [normalizedStart, normalizedEnd] = this.normalizeRangeBounds(start, clickedDate);
859
+ this.emitDateStateChange(clickedDate, normalizedEnd, {
860
+ start: normalizedStart,
861
+ end: normalizedEnd,
862
+ });
863
+ }
864
+ /** Decrementa o mês mantendo o primeiro dia do mês exibido e preservando a seleção de range. */
865
+ decreaseMonth() {
866
+ if (this.disabled) {
867
+ return;
868
+ }
869
+ const date = isValid.setExports.set(subMonthsExports.subMonths(this.baseDate, 1), { date: 1 });
870
+ const range = this.selectionMode === 'range' && this.rangeStart !== null && this.rangeEnd !== null
871
+ ? { start: this.rangeStart, end: this.rangeEnd }
872
+ : undefined;
873
+ this.emitDateStateChange(date, this.value, range);
874
+ }
875
+ /** Incrementa o mês mantendo o primeiro dia do mês exibido e preservando a seleção de range. */
876
+ increaseMonth() {
877
+ if (this.disabled) {
878
+ return;
879
+ }
880
+ const date = isValid.setExports.set(addMonthsExports.addMonths(this.baseDate, 1), { date: 1 });
881
+ const range = this.selectionMode === 'range' && this.rangeStart !== null && this.rangeEnd !== null
882
+ ? { start: this.rangeStart, end: this.rangeEnd }
883
+ : undefined;
884
+ this.emitDateStateChange(date, this.value, range);
885
+ }
886
+ /** Indica se um dia está indisponível para seleção. */
887
+ isDateDisabled(date) {
888
+ return this.disabledDates.some((disabledDate) => isValid.isSameDayExports.isSameDay(disabledDate, date));
889
+ }
890
+ /** Data base usada para todos os cálculos de calendário. */
891
+ get baseDate() {
892
+ return this.referenceDate;
893
+ }
894
+ /**
895
+ * Recupera um handler estável para a célula do dia informado.
896
+ *
897
+ * @param date - Dia representado pela célula.
898
+ * @returns Função de clique reutilizável.
899
+ */
900
+ getDayClickHandler(date) {
901
+ let handler = this.dayClickHandlers.get(date);
902
+ if (handler === undefined) {
903
+ handler = () => this.handleDayClick(date);
904
+ this.dayClickHandlers.set(date, handler);
905
+ }
906
+ return handler;
907
+ }
908
+ /** Formata o dia exibido com zero à esquerda. */
909
+ getDayWithLeadingZero(date) {
910
+ return datetimePickerConstants.formatExports.format(date, 'dd');
911
+ }
912
+ /**
913
+ * Constrói o rótulo acessível completo da célula de dia.
914
+ *
915
+ * @param date - Dia representado pela célula.
916
+ * @returns Texto anunciado pelo leitor de tela, incluindo estado de seleção.
917
+ */
918
+ getDayCellAriaLabel(date) {
919
+ const fullDate = datetimePickerConstants.formatExports.format(date, "d 'de' MMMM 'de' yyyy", { locale: this.dateFnsLocale });
920
+ const isSelected = this.selectionMode === 'single' && this.value !== null && isValid.isSameDayExports.isSameDay(date, this.value);
921
+ const isRangeStart = this.selectionMode === 'range' && this.rangeStart !== null && isValid.isSameDayExports.isSameDay(date, this.rangeStart);
922
+ const isRangeEnd = this.selectionMode === 'range' && this.rangeEnd !== null && isValid.isSameDayExports.isSameDay(date, this.rangeEnd);
923
+ const isBetween = this.selectionMode === 'range' &&
924
+ this.rangeStart !== null &&
925
+ this.rangeEnd !== null &&
926
+ this.isDateBetweenRange(date, this.rangeStart, this.rangeEnd);
927
+ if (isSelected)
928
+ return `${fullDate}, selecionado`;
929
+ if (isRangeStart)
930
+ return `${fullDate}, início do intervalo`;
931
+ if (isRangeEnd)
932
+ return `${fullDate}, fim do intervalo`;
933
+ if (isBetween)
934
+ return `${fullDate}, no intervalo selecionado`;
935
+ return fullDate;
936
+ }
937
+ /** Locale do date-fns derivado da prop pública do componente. */
938
+ get dateFnsLocale() {
939
+ return index.resolveDateFnsLocale(this.locale);
940
+ }
941
+ /**
942
+ * Calcula as classes CSS da célula do dia com base em seleção, mês e data atual.
943
+ *
944
+ * @param date - Dia da grade do calendário.
945
+ */
946
+ getDayCssClasses(date) {
947
+ const selected = this.value;
948
+ const rangeStart = this.rangeStart;
949
+ const rangeEnd = this.rangeEnd;
950
+ const hasRange = rangeStart !== null && rangeEnd !== null;
951
+ const isRangeStart = rangeStart !== null && isValid.isSameDayExports.isSameDay(date, rangeStart);
952
+ const isRangeEnd = rangeEnd !== null && isValid.isSameDayExports.isSameDay(date, rangeEnd);
953
+ const isBetweenRange = hasRange && this.isDateBetweenRange(date, rangeStart, rangeEnd);
954
+ return {
955
+ day: true,
956
+ 'outside-month': !isSameMonthExports.isSameMonth(date, this.baseDate),
957
+ today: isValid.isSameDayExports.isSameDay(date, isValid.toDateExports.toDate(new Date())),
958
+ selected: this.selectionMode === 'single' && selected !== null && isValid.isSameDayExports.isSameDay(date, selected),
959
+ 'range-start': this.selectionMode === 'range' && isRangeStart,
960
+ 'range-end': this.selectionMode === 'range' && isRangeEnd,
961
+ 'in-range': this.selectionMode === 'range' && isBetweenRange,
962
+ };
963
+ }
964
+ /** Normaliza os limites do intervalo para garantir ordem cronológica. */
965
+ normalizeRangeBounds(start, end) {
966
+ return compareAscExports.compareAsc(start, end) <= 0 ? [start, end] : [end, start];
967
+ }
968
+ /** Verifica se uma data está estritamente entre início e fim do intervalo. */
969
+ isDateBetweenRange(date, start, end) {
970
+ return isAfterExports.isAfter(date, start) && isBeforeExports.isBefore(date, end);
971
+ }
972
+ /** Gera a sequência completa de dias visíveis na grade do mês. */
973
+ getMonthViewDates() {
974
+ const start = index.startOfWeekExports.startOfWeek(startOfMonthExports.startOfMonth(this.baseDate), { weekStartsOn: this.weekStartsOn });
975
+ let end = endOfWeekExports.endOfWeek(endOfMonthExports.endOfMonth(this.baseDate), { weekStartsOn: this.weekStartsOn });
976
+ // Se fixedRowCount está ativo, garante sempre 6 semanas (42 dias)
977
+ if (this.fixedRowCount) {
978
+ // Calcula o número de semanas que seriam normalmente geradas
979
+ const normalizedDates = isValid.eachDayOfIntervalExports.eachDayOfInterval({ start, end });
980
+ const currentWeekCount = Math.ceil(normalizedDates.length / 7);
981
+ const targetWeekCount = 6;
982
+ // Se não houver 6 semanas, estende o final para alcançar 42 dias
983
+ if (currentWeekCount < targetWeekCount) {
984
+ const daysToAdd = (targetWeekCount - currentWeekCount) * 7;
985
+ end = index.addDaysExports.addDays(end, daysToAdd);
986
+ }
987
+ }
988
+ return isValid.eachDayOfIntervalExports.eachDayOfInterval({ start, end });
989
+ }
990
+ /**
991
+ * Retorna o `focusedDate` normalizado para estar sempre dentro da grade visível.
992
+ *
993
+ * Se `focusedDate` não estiver visível no mês atual, retorna o primeiro dia
994
+ * da grade do mês para garantir que sempre haja um elemento com `tabIndex={0}`.
995
+ *
996
+ * @returns Data focada normalizada ou primeiro dia da grade.
997
+ */
998
+ getNormalizedFocusedDate() {
999
+ const visibleDates = this.getMonthViewDates();
1000
+ const isInCurrentMonth = visibleDates.some((d) => isValid.isSameDayExports.isSameDay(d, this.focusedDate));
1001
+ if (isInCurrentMonth) {
1002
+ return this.focusedDate;
1003
+ }
1004
+ return visibleDates[0] ?? this.focusedDate;
1005
+ }
1006
+ /**
1007
+ * Constrói o rótulo acessível dos botões de navegação do mês.
1008
+ *
1009
+ * @param action - Ação associada ao botão.
1010
+ * @returns Texto acessível exibido para leitores de tela.
1011
+ */
1012
+ getNavigationAriaLabel(action) {
1013
+ switch (action) {
1014
+ case datetimePickerConstants.NAVIGATION_ACTION.PREVIOUS_MONTH:
1015
+ return `Ir para o mês anterior, ${datetimePickerConstants.formatExports.format(addMonthsExports.addMonths(this.referenceDate, -1), 'MMMM', { locale: this.dateFnsLocale })}`;
1016
+ case datetimePickerConstants.NAVIGATION_ACTION.NEXT_MONTH:
1017
+ return `Ir para o próximo mês, ${datetimePickerConstants.formatExports.format(addMonthsExports.addMonths(this.referenceDate, 1), 'MMMM', { locale: this.dateFnsLocale })}`;
1018
+ default:
1019
+ return 'Navegar';
1020
+ }
1021
+ }
1022
+ /** Retorna os rótulos das semanas conforme locale e início da semana. */
1023
+ getWeekdayLabels() {
1024
+ return index.getWeekdayLabels(this.locale, this.weekStartsOn);
1025
+ }
1026
+ /** Retorna os rótulos dos meses no locale atual. */
1027
+ getMonthLabels() {
1028
+ return index.getMonthLabels(this.locale);
1029
+ }
1030
+ /**
1031
+ * Renderiza um botão consistente de navegação do calendário.
1032
+ *
1033
+ * @param action - Ação executada pelo botão.
1034
+ */
1035
+ renderNavigationButton(action) {
1036
+ return (index$1.h("br-button", { emphasis: "tertiary", density: "small", shape: "circle", disabled: this.disabled, "data-action": action, "aria-label": this.getNavigationAriaLabel(action), onClick: this.handleNavigationClick }, index$1.h("br-icon", { iconName: this.getIconForAction(action), width: "20", height: "20", "aria-hidden": "true" })));
1037
+ }
1038
+ /** Renderiza o cabeçalho do calendário com navegação, mês e ano. */
1039
+ renderCalendarHeader() {
1040
+ return (index$1.h("div", { class: "header", part: "header" }, this.renderNavigationButton(datetimePickerConstants.NAVIGATION_ACTION.PREVIOUS_MONTH), this.renderMonthSelection(), this.renderYearSelection(), this.renderNavigationButton(datetimePickerConstants.NAVIGATION_ACTION.NEXT_MONTH)));
1041
+ }
1042
+ /** Renderiza a seleção de mês com label acessível. */
1043
+ renderMonthSelection() {
1044
+ return (index$1.h("label", { class: "month-selection" }, index$1.h("span", { class: "visually-hidden" }, "Selecionar m\u00EAs"), index$1.h("select", { onChange: this.handleMonthChange, "aria-label": "Selecionar m\u00EAs", disabled: this.disabled, part: "month-select" }, this.getMonthLabels().map(this.renderMonthOption, this))));
1045
+ }
1046
+ /** Renderiza o campo de ano com label acessível. */
1047
+ renderYearSelection() {
1048
+ return (index$1.h("label", { class: "year-selection" }, index$1.h("span", { class: "visually-hidden" }, "Selecionar ano"), index$1.h("input", { type: "number", value: this.referenceDate.getFullYear(), onChange: this.handleYearChange, "aria-label": "Selecionar ano", disabled: this.disabled, part: "year-input" })));
1049
+ }
1050
+ /** Renderiza uma opção do seletor de meses. */
1051
+ renderMonthOption(month, index) {
1052
+ return (index$1.h("option", { key: `month-${index}`, value: index, selected: index === this.referenceDate.getMonth() }, month));
1053
+ }
1054
+ /** Renderiza a estrutura principal do calendário. */
1055
+ renderCalendar() {
1056
+ const monthLabel = datetimePickerConstants.formatExports.format(this.baseDate, "MMMM 'de' yyyy", { locale: this.dateFnsLocale });
1057
+ return (index$1.h("div", { class: "calendar", role: "grid", "aria-label": `Calendário de ${monthLabel}`, part: "calendar" }, this.renderWeekdays(), this.renderMonthGrid()));
1058
+ }
1059
+ /** Renderiza a linha de rótulos dos dias da semana. */
1060
+ renderWeekdays() {
1061
+ const labels = this.getWeekdayLabels();
1062
+ return (index$1.h("div", { class: "weekdays", role: "row", tabIndex: -1, part: "weekdays" }, labels.map((label, index) => (index$1.h("div", { key: `weekday-${index}`, class: "weekday", role: "columnheader", tabIndex: -1, "aria-label": label, part: "weekday" }, label)))));
1063
+ }
1064
+ /** Renderiza a grade com os dias do mês atual. */
1065
+ renderMonthGrid() {
1066
+ const dates = this.getMonthViewDates();
1067
+ const weeks = Array.from({ length: Math.ceil(dates.length / 7) }, (_, index) => dates.slice(index * 7, index * 7 + 7));
1068
+ return (index$1.h("div", { class: "monthdays", role: "rowgroup", onKeyDown: this.handleGridKeydown, part: "grid" }, weeks.map((week) => (index$1.h("div", { key: `week-${datetimePickerConstants.formatExports.format(week[0], 'yyyy-MM-dd')}`, class: "week", role: "row", tabIndex: -1 }, week.map(this.renderDayCell, this))))));
1069
+ }
1070
+ /**
1071
+ * Move o foco de teclado para a data informada, navegando de mês quando necessário.
1072
+ *
1073
+ * @param date - Data de destino do foco.
1074
+ */
1075
+ moveFocusTo(date) {
1076
+ this.focusedDate = date;
1077
+ this.shouldFocusDate = true;
1078
+ if (!isSameMonthExports.isSameMonth(date, this.baseDate)) {
1079
+ this.emitDateStateChange(date, this.value);
1080
+ }
1081
+ }
1082
+ /** Renderiza uma célula de dia com estado visual apropriado. */
1083
+ renderDayCell(date) {
1084
+ const disabled = this.disabled || this.isDateDisabled(date);
1085
+ const isSelected = this.selectionMode === 'single' && this.value !== null && isValid.isSameDayExports.isSameDay(date, this.value);
1086
+ const isRangeStart = this.selectionMode === 'range' && this.rangeStart !== null && isValid.isSameDayExports.isSameDay(date, this.rangeStart);
1087
+ const isRangeEnd = this.selectionMode === 'range' && this.rangeEnd !== null && isValid.isSameDayExports.isSameDay(date, this.rangeEnd);
1088
+ const isActiveDay = isSelected || isRangeStart || isRangeEnd;
1089
+ const isFocused = isValid.isSameDayExports.isSameDay(date, this.getNormalizedFocusedDate());
1090
+ return (index$1.h("div", { key: datetimePickerConstants.formatExports.format(date, 'yyyy-MM-dd'), role: "gridcell", tabIndex: this.disabled ? undefined : isFocused ? 0 : -1, "data-date": datetimePickerConstants.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)));
1091
+ }
1092
+ render() {
1093
+ return (index$1.h(index$1.Host, { key: 'b2bba9b38a0b935e0599348dbb8492a7bb3fa7ac' }, index$1.h("div", { key: '101d12846aa77d98e3a926bd43a1cdbc779de202', class: "br-date-picker", part: "container" }, this.renderCalendarHeader(), this.renderCalendar())));
1094
+ }
1095
+ get el() { return index$1.getElement(this); }
1096
+ static get watchers() { return {
1097
+ "rangeValue": [{
1098
+ "handleRangeValueChange": 0
1099
+ }],
1100
+ "value": [{
1101
+ "handleValueChange": 0
1102
+ }],
1103
+ "weekStartsOn": [{
1104
+ "handleWeekStartsOnChange": 0
1105
+ }],
1106
+ "locale": [{
1107
+ "handleLocaleChange": 0
1108
+ }]
1109
+ }; }
1110
+ };
1111
+ DatePicker.style = datePickerCss();
1112
+
1113
+ var getHours = {};
1114
+
1115
+ var hasRequiredGetHours;
1116
+
1117
+ function requireGetHours () {
1118
+ if (hasRequiredGetHours) return getHours;
1119
+ hasRequiredGetHours = 1;
1120
+ getHours.getHours = getHours$1;
1121
+ var _index = /*@__PURE__*/ datetimePickerConstants.requireToDate();
1122
+
1123
+ /**
1124
+ * The {@link getHours} function options.
1125
+ */
1126
+
1127
+ /**
1128
+ * @name getHours
1129
+ * @category Hour Helpers
1130
+ * @summary Get the hours of the given date.
1131
+ *
1132
+ * @description
1133
+ * Get the hours of the given date.
1134
+ *
1135
+ * @param date - The given date
1136
+ * @param options - An object with options
1137
+ *
1138
+ * @returns The hours
1139
+ *
1140
+ * @example
1141
+ * // Get the hours of 29 February 2012 11:45:00:
1142
+ * const result = getHours(new Date(2012, 1, 29, 11, 45))
1143
+ * //=> 11
1144
+ */
1145
+ function getHours$1(date, options) {
1146
+ return (0, _index.toDate)(date, options?.in).getHours();
1147
+ }
1148
+ return getHours;
1149
+ }
1150
+
1151
+ var getHoursExports = /*@__PURE__*/ requireGetHours();
1152
+
1153
+ var getMinutes = {};
1154
+
1155
+ var hasRequiredGetMinutes;
1156
+
1157
+ function requireGetMinutes () {
1158
+ if (hasRequiredGetMinutes) return getMinutes;
1159
+ hasRequiredGetMinutes = 1;
1160
+ getMinutes.getMinutes = getMinutes$1;
1161
+ var _index = /*@__PURE__*/ datetimePickerConstants.requireToDate();
1162
+
1163
+ /**
1164
+ * The {@link getMinutes} function options.
1165
+ */
1166
+
1167
+ /**
1168
+ * @name getMinutes
1169
+ * @category Minute Helpers
1170
+ * @summary Get the minutes of the given date.
1171
+ *
1172
+ * @description
1173
+ * Get the minutes of the given date.
1174
+ *
1175
+ * @param date - The given date
1176
+ * @param options - The options
1177
+ *
1178
+ * @returns The minutes
1179
+ *
1180
+ * @example
1181
+ * // Get the minutes of 29 February 2012 11:45:05:
1182
+ * const result = getMinutes(new Date(2012, 1, 29, 11, 45, 5))
1183
+ * //=> 45
1184
+ */
1185
+ function getMinutes$1(date, options) {
1186
+ return (0, _index.toDate)(date, options?.in).getMinutes();
1187
+ }
1188
+ return getMinutes;
1189
+ }
1190
+
1191
+ var getMinutesExports = /*@__PURE__*/ requireGetMinutes();
1192
+
1193
+ var formatISO = {};
1194
+
1195
+ var hasRequiredFormatISO;
1196
+
1197
+ function requireFormatISO () {
1198
+ if (hasRequiredFormatISO) return formatISO;
1199
+ hasRequiredFormatISO = 1;
1200
+ formatISO.formatISO = formatISO$1;
1201
+ var _index = /*@__PURE__*/ datetimePickerConstants.requireAddLeadingZeros();
1202
+ var _index2 = /*@__PURE__*/ datetimePickerConstants.requireToDate();
1203
+
1204
+ /**
1205
+ * The {@link formatISO} function options.
1206
+ */
1207
+
1208
+ /**
1209
+ * @name formatISO
1210
+ * @category Common Helpers
1211
+ * @summary Format the date according to the ISO 8601 standard (https://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a003169814.htm).
1212
+ *
1213
+ * @description
1214
+ * Return the formatted date string in ISO 8601 format. Options may be passed to control the parts and notations of the date.
1215
+ *
1216
+ * @param date - The original date
1217
+ * @param options - An object with options.
1218
+ *
1219
+ * @returns The formatted date string (in local time zone)
1220
+ *
1221
+ * @throws `date` must not be Invalid Date
1222
+ *
1223
+ * @example
1224
+ * // Represent 18 September 2019 in ISO 8601 format (local time zone is UTC):
1225
+ * const result = formatISO(new Date(2019, 8, 18, 19, 0, 52))
1226
+ * //=> '2019-09-18T19:00:52Z'
1227
+ *
1228
+ * @example
1229
+ * // Represent 18 September 2019 in ISO 8601, short format (local time zone is UTC):
1230
+ * const result = formatISO(new Date(2019, 8, 18, 19, 0, 52), { format: 'basic' })
1231
+ * //=> '20190918T190052'
1232
+ *
1233
+ * @example
1234
+ * // Represent 18 September 2019 in ISO 8601 format, date only:
1235
+ * const result = formatISO(new Date(2019, 8, 18, 19, 0, 52), { representation: 'date' })
1236
+ * //=> '2019-09-18'
1237
+ *
1238
+ * @example
1239
+ * // Represent 18 September 2019 in ISO 8601 format, time only (local time zone is UTC):
1240
+ * const result = formatISO(new Date(2019, 8, 18, 19, 0, 52), { representation: 'time' })
1241
+ * //=> '19:00:52Z'
1242
+ */
1243
+ function formatISO$1(date, options) {
1244
+ const date_ = (0, _index2.toDate)(date, options?.in);
1245
+
1246
+ if (isNaN(+date_)) {
1247
+ throw new RangeError("Invalid time value");
1248
+ }
1249
+
1250
+ const format = options?.format ?? "extended";
1251
+ const representation = options?.representation ?? "complete";
1252
+
1253
+ let result = "";
1254
+ let tzOffset = "";
1255
+
1256
+ const dateDelimiter = format === "extended" ? "-" : "";
1257
+ const timeDelimiter = format === "extended" ? ":" : "";
1258
+
1259
+ // Representation is either 'date' or 'complete'
1260
+ if (representation !== "time") {
1261
+ const day = (0, _index.addLeadingZeros)(date_.getDate(), 2);
1262
+ const month = (0, _index.addLeadingZeros)(date_.getMonth() + 1, 2);
1263
+ const year = (0, _index.addLeadingZeros)(date_.getFullYear(), 4);
1264
+
1265
+ // yyyyMMdd or yyyy-MM-dd.
1266
+ result = `${year}${dateDelimiter}${month}${dateDelimiter}${day}`;
1267
+ }
1268
+
1269
+ // Representation is either 'time' or 'complete'
1270
+ if (representation !== "date") {
1271
+ // Add the timezone.
1272
+ const offset = date_.getTimezoneOffset();
1273
+
1274
+ if (offset !== 0) {
1275
+ const absoluteOffset = Math.abs(offset);
1276
+ const hourOffset = (0, _index.addLeadingZeros)(
1277
+ Math.trunc(absoluteOffset / 60),
1278
+ 2,
1279
+ );
1280
+ const minuteOffset = (0, _index.addLeadingZeros)(absoluteOffset % 60, 2);
1281
+ // If less than 0, the sign is +, because it is ahead of time.
1282
+ const sign = offset < 0 ? "+" : "-";
1283
+
1284
+ tzOffset = `${sign}${hourOffset}:${minuteOffset}`;
1285
+ } else {
1286
+ tzOffset = "Z";
1287
+ }
1288
+
1289
+ const hour = (0, _index.addLeadingZeros)(date_.getHours(), 2);
1290
+ const minute = (0, _index.addLeadingZeros)(date_.getMinutes(), 2);
1291
+ const second = (0, _index.addLeadingZeros)(date_.getSeconds(), 2);
1292
+
1293
+ // If there's also date, separate it with time with 'T'
1294
+ const separator = result === "" ? "" : "T";
1295
+
1296
+ // Creates a time string consisting of hour, minute, and second, separated by delimiters, if defined.
1297
+ const time = [hour, minute, second].join(timeDelimiter);
1298
+
1299
+ // HHmmss or HH:mm:ss.
1300
+ result = `${result}${separator}${time}${tzOffset}`;
1301
+ }
1302
+
1303
+ return result;
1304
+ }
1305
+ return formatISO;
1306
+ }
1307
+
1308
+ var formatISOExports = /*@__PURE__*/ requireFormatISO();
1309
+
1310
+ /**
1311
+ * Valida se o modo informado pertence ao conjunto suportado pelo datetime-input.
1312
+ *
1313
+ * @param value - Valor recebido via prop/atributo.
1314
+ * @returns `true` quando o modo é válido.
1315
+ */
1316
+ function isValidDatetimeInputMode(value) {
1317
+ return Object.values(datetimePickerConstants.DATETIME_PICKER_MODE).includes(value);
1318
+ }
1319
+ /**
1320
+ * Normaliza o modo do datetime-input para um valor suportado.
1321
+ *
1322
+ * @param value - Valor bruto informado via prop.
1323
+ * @returns Modo válido, aplicando o padrão quando necessário.
1324
+ */
1325
+ function normalizeDatetimeInputMode(value) {
1326
+ if (isValidDatetimeInputMode(value))
1327
+ return value;
1328
+ isValid.warnInvalidPropValue('br-datetime-input', 'mode', value, datetimePickerConstants.DATETIME_PICKER_MODE.DEFAULT);
1329
+ return datetimePickerConstants.DATETIME_PICKER_MODE.DEFAULT;
1330
+ }
1331
+ /**
1332
+ * Verifica se o valor informado é uma instância de Date válida.
1333
+ *
1334
+ * @param value - Valor recebido via prop.
1335
+ * @returns `true` quando é Date válido.
1336
+ */
1337
+ function isValidDateInstance(value) {
1338
+ return value instanceof Date && !Number.isNaN(value.getTime());
1339
+ }
1340
+ /**
1341
+ * Normaliza a data de referência para evitar valores inválidos.
1342
+ *
1343
+ * @param value - Valor recebido via prop.
1344
+ * @returns Date válido para uso interno.
1345
+ */
1346
+ function normalizeDatetimeInputReferenceDate(value) {
1347
+ if (isValidDateInstance(value))
1348
+ return value;
1349
+ const fallback = isValid.toDateExports.toDate(new Date());
1350
+ isValid.warnInvalidPropValue('br-datetime-input', 'referenceDate', value, formatISOExports.formatISO(fallback));
1351
+ return fallback;
1352
+ }
1353
+ /**
1354
+ * Normaliza o valor selecionado do input (Date válido ou null).
1355
+ *
1356
+ * @param value - Valor recebido via prop.
1357
+ * @returns Date válido ou null quando o valor é inválido.
1358
+ */
1359
+ function normalizeDatetimeInputValue(value) {
1360
+ if (value === null)
1361
+ return null;
1362
+ if (isValidDateInstance(value))
1363
+ return value;
1364
+ isValid.warnInvalidPropValue('br-datetime-input', 'value', value, 'null');
1365
+ return null;
1366
+ }
1367
+
1368
+ 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}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,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))}}@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))}}@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-in-out{animation-timing-function:cubic-bezier(0.42, 0, 0.58, 1)}.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}.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)}.help{font-size:var(--font-size-scale-base)}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)}*[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)}:host{display:block;width:100%}br-input[disabled]{opacity:1}`;
1369
+
1370
+ const DatetimeInput = class {
1371
+ constructor(hostRef) {
1372
+ index$1.registerInstance(this, hostRef);
1373
+ this.dateStateChange = index$1.createEvent(this, "dateStateChange", 7);
1374
+ this.togglePicker = index$1.createEvent(this, "togglePicker", 7);
1375
+ /** Valor textual exibido no campo e usado durante a edição manual. */
1376
+ this.inputValue = '';
1377
+ /**
1378
+ * Define o placeholder do campo de entrada.
1379
+ *
1380
+ * @default ''
1381
+ */
1382
+ this.placeholder = '';
1383
+ /**
1384
+ * Define o modo de entrada: `date`, `time` ou `datetime`.
1385
+ *
1386
+ * @default 'datetime'
1387
+ */
1388
+ this.mode = 'datetime';
1389
+ /**
1390
+ * Data de referência que orienta a navegação visual do calendário.
1391
+ *
1392
+ * @default new Date()
1393
+ */
1394
+ this.referenceDate = new Date();
1395
+ /**
1396
+ * Valor selecionado pelo usuário, ou `null` quando nada foi escolhido.
1397
+ *
1398
+ * @default null
1399
+ */
1400
+ this.value = null;
1401
+ /**
1402
+ * Desabilita digitação e abertura do picker quando ativo.
1403
+ *
1404
+ * @default false
1405
+ */
1406
+ this.disabled = false;
1407
+ /**
1408
+ * Define se a seleção ocorre por data única ou por intervalo.
1409
+ *
1410
+ * @default 'single'
1411
+ */
1412
+ this.selectionMode = 'single';
1413
+ /**
1414
+ * Data inicial do intervalo quando em modo range.
1415
+ *
1416
+ * @default null
1417
+ */
1418
+ this.rangeStart = null;
1419
+ /**
1420
+ * Data final do intervalo quando em modo range.
1421
+ *
1422
+ * @default null
1423
+ */
1424
+ this.rangeEnd = null;
1425
+ this.handleActionButtonClick = (event) => {
1426
+ if (this.disabled)
1427
+ return;
1428
+ event.stopPropagation();
1429
+ this.togglePicker.emit();
1430
+ };
1431
+ /**
1432
+ * Confirma o conteúdo digitado ao perder foco.
1433
+ */
1434
+ this.handleInputBlur = () => {
1435
+ if (this.disabled) {
1436
+ return;
1437
+ }
1438
+ this.commitInputValue();
1439
+ };
1440
+ /**
1441
+ * Atualiza o estado local com o valor digitado no campo.
1442
+ *
1443
+ * @param event - Evento de input disparado pelo campo textual.
1444
+ */
1445
+ this.handleInputChange = (event) => {
1446
+ if (this.disabled) {
1447
+ return;
1448
+ }
1449
+ const input = event.target;
1450
+ this.inputValue = input.value;
1451
+ };
1452
+ /**
1453
+ * Permite confirmar a digitação pressionando Enter.
1454
+ *
1455
+ * @param event - Evento de teclado do campo de entrada.
1456
+ */
1457
+ this.handleInputKeydown = (event) => {
1458
+ if (this.disabled) {
1459
+ return;
1460
+ }
1461
+ // Alt+ArrowDown ou F4 abre/fecha o picker (padrão ARIA combobox)
1462
+ if ((event.key === 'ArrowDown' && event.altKey) || event.key === 'F4') {
1463
+ event.preventDefault();
1464
+ this.togglePicker.emit();
1465
+ return;
1466
+ }
1467
+ if (event.key === 'Enter') {
1468
+ this.commitInputValue();
1469
+ }
1470
+ };
1471
+ /**
1472
+ * Evita propagação do clique e solicita a abertura/fechamento do picker.
1473
+ *
1474
+ * @param event - Evento de clique no ícone de ação.
1475
+ */
1476
+ this.handleToggleDropdown = (event) => {
1477
+ if (this.disabled) {
1478
+ return;
1479
+ }
1480
+ event.stopPropagation();
1481
+ this.togglePicker.emit();
1482
+ };
1483
+ }
1484
+ handleRangeValueChange(newValue) {
1485
+ if (!newValue)
1486
+ return;
1487
+ this.rangeStart = newValue.start;
1488
+ this.rangeEnd = newValue.end;
1489
+ this.syncInputValueFromProps();
1490
+ }
1491
+ /**
1492
+ * Revalida e reflete no input mudanças externas em `value`.
1493
+ *
1494
+ * @param newValue - Novo valor recebido via prop.
1495
+ */
1496
+ handleValueChange(newValue) {
1497
+ this.ensureValidValue(newValue);
1498
+ this.syncInputValueFromProps();
1499
+ }
1500
+ /**
1501
+ * Garante modo suportado e ajusta máscara/valor textual exibido.
1502
+ *
1503
+ * @param newValue - Novo modo recebido via prop.
1504
+ */
1505
+ handleModeChange(newValue) {
1506
+ this.ensureValidMode(newValue);
1507
+ this.syncInputValueFromProps();
1508
+ }
1509
+ /**
1510
+ * Valida a data de referência e sincroniza o campo quando não há seleção.
1511
+ *
1512
+ * @param newValue - Nova data de referência recebida.
1513
+ */
1514
+ handleReferenceDateChange(newValue) {
1515
+ this.ensureValidReferenceDate(newValue);
1516
+ if (this.value === null) {
1517
+ this.syncInputValueFromProps();
1518
+ }
1519
+ }
1520
+ /**
1521
+ * Sincroniza o input quando o início do range muda.
1522
+ *
1523
+ * @param newValue - Nova data inicial do range.
1524
+ */
1525
+ handleRangeStartChange() {
1526
+ if (this.selectionMode === 'range') {
1527
+ this.syncInputValueFromProps();
1528
+ }
1529
+ }
1530
+ /**
1531
+ * Sincroniza o input quando o fim do range muda.
1532
+ *
1533
+ * @param newValue - Nova data final do range.
1534
+ */
1535
+ handleRangeEndChange() {
1536
+ if (this.selectionMode === 'range') {
1537
+ this.syncInputValueFromProps();
1538
+ }
1539
+ }
1540
+ /**
1541
+ * Valida props iniciais e sincroniza o texto exibido no input.
1542
+ */
1543
+ componentWillLoad() {
1544
+ this.referenceDate = isValid.resolveSsrLocalDate(this.el, this.referenceDate);
1545
+ this.ensureValidMode();
1546
+ this.ensureValidReferenceDate();
1547
+ this.ensureValidValue();
1548
+ this.syncInputValueFromProps();
1549
+ }
1550
+ /**
1551
+ * Registra o listener de teclado no botão de ação após o DOM estar disponível.
1552
+ *
1553
+ * O br-button que envolve o slot "action" é focável. Quando Space/Enter é pressionado,
1554
+ * o browser dispara um click sintético. Adicionamos um listener imperativo para
1555
+ * garantir que o clique no botão de ação acione o toggle.
1556
+ */
1557
+ componentDidLoad() {
1558
+ // Tenta encontrar o br-button dentro do br-input que envolve o slot action
1559
+ const brInput = this.el.shadowRoot?.querySelector('br-input');
1560
+ if (!brInput?.shadowRoot)
1561
+ return;
1562
+ const actionButton = brInput.shadowRoot.querySelector('br-button.button-transform');
1563
+ if (!actionButton)
1564
+ return;
1565
+ this.actionButton = actionButton;
1566
+ // Listener para clique no botão de ação (funciona para mouse e Space/Enter via button nativo)
1567
+ actionButton.addEventListener('click', this.handleActionButtonClick);
1568
+ }
1569
+ disconnectedCallback() {
1570
+ this.actionButton?.removeEventListener('click', this.handleActionButtonClick);
1571
+ this.actionButton = undefined;
1572
+ }
1573
+ /**
1574
+ * Retorna o rótulo acessível do botão de alternância do picker.
1575
+ *
1576
+ * @returns Texto anunciado pelo leitor de tela para o ícone de ação.
1577
+ */
1578
+ getToggleAriaLabel() {
1579
+ switch (this.mode) {
1580
+ case 'date':
1581
+ return 'Abrir calendário';
1582
+ case 'time':
1583
+ return 'Abrir seletor de hora';
1584
+ default:
1585
+ return 'Abrir seletor de data e hora';
1586
+ }
1587
+ }
1588
+ /**
1589
+ * Normaliza o modo de operação para um valor suportado.
1590
+ *
1591
+ * @param value - Modo informado externamente.
1592
+ */
1593
+ ensureValidMode(value = this.mode) {
1594
+ const normalizedMode = normalizeDatetimeInputMode(value);
1595
+ if (normalizedMode !== value) {
1596
+ this.mode = normalizedMode;
1597
+ }
1598
+ }
1599
+ /**
1600
+ * Garante que a data de referência seja uma instância válida de `Date`.
1601
+ *
1602
+ * @param value - Data de referência recebida via prop.
1603
+ */
1604
+ ensureValidReferenceDate(value = this.referenceDate) {
1605
+ const normalizedReferenceDate = normalizeDatetimeInputReferenceDate(value);
1606
+ if (!(value instanceof Date) || Number.isNaN(value.getTime())) {
1607
+ this.referenceDate = normalizedReferenceDate;
1608
+ }
1609
+ }
1610
+ /**
1611
+ * Normaliza o valor selecionado para `Date` válido ou `null`.
1612
+ *
1613
+ * @param value - Valor recebido via prop.
1614
+ */
1615
+ ensureValidValue(value = this.value) {
1616
+ const normalizedValue = normalizeDatetimeInputValue(value);
1617
+ if (value !== normalizedValue) {
1618
+ this.value = normalizedValue;
1619
+ }
1620
+ }
1621
+ /**
1622
+ * Consolida o texto digitado, tenta analisar e emite o novo estado selecionado.
1623
+ */
1624
+ commitInputValue() {
1625
+ const inputText = this.inputValue.trim();
1626
+ if (inputText === '') {
1627
+ this.value = null;
1628
+ this.dateStateChange.emit({
1629
+ referenceDate: this.referenceDate,
1630
+ value: null,
1631
+ });
1632
+ this.emitNativeValueChange();
1633
+ return;
1634
+ }
1635
+ if (this.selectionMode === 'range' && this.mode === 'date') {
1636
+ const parsedRange = this.parseRangeInput(inputText);
1637
+ if (parsedRange === null)
1638
+ return;
1639
+ const normalizedRange = this.normalizeRangeBounds(parsedRange.start, parsedRange.end);
1640
+ this.rangeValue = normalizedRange;
1641
+ this.inputValue = `${this.formatDateByMode(normalizedRange.start)} - ${this.formatDateByMode(normalizedRange.end)}`;
1642
+ this.value = normalizedRange.end;
1643
+ this.dateStateChange.emit({
1644
+ referenceDate: normalizedRange.end,
1645
+ value: normalizedRange.end,
1646
+ range: normalizedRange,
1647
+ });
1648
+ this.emitNativeValueChange();
1649
+ return;
1650
+ }
1651
+ const parsed = this.parseInputValue(inputText);
1652
+ if (parsed === null)
1653
+ return;
1654
+ const newDate = new Date(parsed);
1655
+ newDate.setSeconds(0, 0);
1656
+ this.inputValue = this.formatDateByMode(newDate);
1657
+ this.value = newDate;
1658
+ this.dateStateChange.emit({
1659
+ referenceDate: newDate,
1660
+ value: newDate,
1661
+ });
1662
+ this.emitNativeValueChange();
1663
+ }
1664
+ emitNativeValueChange() {
1665
+ event.dispatchNativeFormEvent(this.el, 'input');
1666
+ event.dispatchNativeFormEvent(this.el, 'change');
1667
+ }
1668
+ /**
1669
+ * Analisa o intervalo no formato `dd/MM/yyyy - dd/MM/yyyy`.
1670
+ *
1671
+ * @param value - Texto de intervalo informado no input.
1672
+ * @returns Intervalo analisado ou `null` quando inválido.
1673
+ */
1674
+ parseRangeInput(value) {
1675
+ const rangeMatch = value.match(/^(.*?)\s*-\s*(.*?)$/);
1676
+ if (rangeMatch === null) {
1677
+ return null;
1678
+ }
1679
+ const startText = rangeMatch[1]?.trim() ?? '';
1680
+ const endText = rangeMatch[2]?.trim() ?? '';
1681
+ if (startText === '' || endText === '') {
1682
+ return null;
1683
+ }
1684
+ const base = this.referenceDate ?? isValid.toDateExports.toDate(new Date());
1685
+ const parsedStart = this.parseDateInput(startText, base);
1686
+ const parsedEnd = this.parseDateInput(endText, base);
1687
+ if (parsedStart === null || parsedEnd === null) {
1688
+ return null;
1689
+ }
1690
+ return { start: parsedStart, end: parsedEnd };
1691
+ }
1692
+ /** Normaliza os limites do intervalo para garantir ordem cronológica. */
1693
+ normalizeRangeBounds(start, end) {
1694
+ return compareAscExports.compareAsc(start, end) <= 0 ? { start, end } : { start: end, end: start };
1695
+ }
1696
+ /**
1697
+ * Sincroniza o texto do campo com as props atuais de valor e modo.
1698
+ */
1699
+ syncInputValueFromProps() {
1700
+ if (this.selectionMode === 'range') {
1701
+ if (this.rangeStart === null || this.rangeEnd === null) {
1702
+ this.inputValue = '';
1703
+ return;
1704
+ }
1705
+ const startFormatted = this.formatDateByMode(this.rangeStart);
1706
+ const endFormatted = this.formatDateByMode(this.rangeEnd);
1707
+ this.inputValue = `${startFormatted} - ${endFormatted}`;
1708
+ return;
1709
+ }
1710
+ if (this.value === null) {
1711
+ this.inputValue = '';
1712
+ return;
1713
+ }
1714
+ this.inputValue = this.formatDateByMode(this.value);
1715
+ }
1716
+ /**
1717
+ * Formata uma data de acordo com o modo atual do componente.
1718
+ *
1719
+ * @param date - Data a ser formatada para exibição no input.
1720
+ * @returns Representação textual da data/hora no padrão esperado.
1721
+ */
1722
+ formatDateByMode(date) {
1723
+ switch (this.mode) {
1724
+ case 'date':
1725
+ return datetimePickerConstants.formatExports.format(date, 'dd/MM/yyyy');
1726
+ case 'time':
1727
+ return datetimePickerConstants.formatExports.format(date, 'HH:mm');
1728
+ default:
1729
+ return datetimePickerConstants.formatExports.format(date, 'dd/MM/yyyy HH:mm');
1730
+ }
1731
+ }
1732
+ /**
1733
+ * Retorna as classes CSS base aplicadas ao host visual do componente.
1734
+ */
1735
+ getCssClassMap() {
1736
+ return {
1737
+ 'br-datetime-input': true,
1738
+ };
1739
+ }
1740
+ /**
1741
+ * Seleciona o ícone do campo conforme o modo de entrada ativo.
1742
+ *
1743
+ * @returns Nome do ícone usado na ação lateral do input.
1744
+ */
1745
+ getInputIcon() {
1746
+ switch (this.mode) {
1747
+ case 'time':
1748
+ return 'fa7-solid:clock';
1749
+ default:
1750
+ return 'fa6-solid:calendar-days';
1751
+ }
1752
+ }
1753
+ /**
1754
+ * Converte o texto digitado em `Date` com base no modo configurado.
1755
+ *
1756
+ * @param value - Texto informado pelo usuário no input.
1757
+ * @returns Data convertida em objeto `Date` ou `null` quando inválida.
1758
+ */
1759
+ parseInputValue(value) {
1760
+ const base = this.value ?? this.referenceDate ?? isValid.toDateExports.toDate(new Date());
1761
+ switch (this.mode) {
1762
+ case 'date':
1763
+ return this.parseDateInput(value, base);
1764
+ case 'time':
1765
+ return this.parseTimeInput(value, base);
1766
+ case 'datetime':
1767
+ return this.parseDateTimeInput(value, base);
1768
+ default:
1769
+ return null;
1770
+ }
1771
+ }
1772
+ /**
1773
+ * Faz parse de uma data no formato `dd/MM/yyyy`, preservando hora e minuto base.
1774
+ *
1775
+ * @param value - Texto de data digitado pelo usuário.
1776
+ * @param base - Data base usada para completar informações de tempo.
1777
+ * @returns Data válida normalizada ou `null` quando o parse falhar.
1778
+ */
1779
+ parseDateInput(value, base) {
1780
+ const parsedDate = isValid.parseExports.parse(value, 'dd/MM/yyyy', base);
1781
+ if (!isValid.isValidExports.isValid(parsedDate))
1782
+ return null;
1783
+ return isValid.setExports.set(parsedDate, {
1784
+ hours: getHoursExports.getHours(base),
1785
+ minutes: getMinutesExports.getMinutes(base),
1786
+ seconds: 0,
1787
+ milliseconds: 0,
1788
+ });
1789
+ }
1790
+ /**
1791
+ * Faz parse de hora no formato `HH:mm`, preservando o dia da data base.
1792
+ *
1793
+ * @param value - Texto de hora digitado pelo usuário.
1794
+ * @param base - Data base usada para manter dia, mês e ano.
1795
+ * @returns Data válida com hora ajustada ou `null` quando inválida.
1796
+ */
1797
+ parseTimeInput(value, base) {
1798
+ const parsedTime = isValid.parseExports.parse(value, 'HH:mm', base);
1799
+ if (!isValid.isValidExports.isValid(parsedTime))
1800
+ return null;
1801
+ return isValid.setExports.set(base, {
1802
+ hours: getHoursExports.getHours(parsedTime),
1803
+ minutes: getMinutesExports.getMinutes(parsedTime),
1804
+ seconds: 0,
1805
+ milliseconds: 0,
1806
+ });
1807
+ }
1808
+ /**
1809
+ * Faz parse de data e hora completas, com fallback para entradas parciais.
1810
+ *
1811
+ * @param value - Texto digitado no input.
1812
+ * @param base - Data base usada como contexto para completar o parse.
1813
+ * @returns Data válida a partir da entrada ou `null` quando não reconhecida.
1814
+ */
1815
+ parseDateTimeInput(value, base) {
1816
+ // data + hora
1817
+ const full = isValid.parseExports.parse(value, 'dd/MM/yyyy HH:mm', base);
1818
+ if (isValid.isValidExports.isValid(full))
1819
+ return full;
1820
+ // so data -> hora atual
1821
+ const date = this.parseDateInput(value, base);
1822
+ if (date !== null) {
1823
+ return isValid.setExports.set(date, {
1824
+ hours: getHoursExports.getHours(base),
1825
+ minutes: getMinutesExports.getMinutes(base),
1826
+ seconds: 0,
1827
+ milliseconds: 0,
1828
+ });
1829
+ }
1830
+ // so hora -> data atual
1831
+ return this.parseTimeInput(value, base);
1832
+ }
1833
+ /**
1834
+ * Renderiza o campo textual e o ícone de ação do datetime input.
1835
+ */
1836
+ renderInputField() {
1837
+ return (index$1.h("br-input", { type: "text", value: this.inputValue, placeholder: this.placeholder, disabled: this.disabled, actionLabel: this.getToggleAriaLabel(), onInput: this.handleInputChange, onBlur: this.handleInputBlur, onKeyDown: this.handleInputKeydown, "aria-label": this.getInputAriaLabel(), part: "input" }, index$1.h("br-icon", { slot: "action", iconName: this.getInputIcon(), width: "16", height: "16", "aria-hidden": "true", onClick: this.handleToggleDropdown, part: "icon" })));
1838
+ }
1839
+ /**
1840
+ * Retorna o rótulo acessível do campo de entrada de acordo com o modo ativo.
1841
+ *
1842
+ * @returns Texto anunciado pelo leitor de tela para identificar o campo.
1843
+ */
1844
+ getInputAriaLabel() {
1845
+ switch (this.mode) {
1846
+ case 'date':
1847
+ return 'Campo de data';
1848
+ case 'time':
1849
+ return 'Campo de horário';
1850
+ default:
1851
+ return 'Campo de data e hora';
1852
+ }
1853
+ }
1854
+ /**
1855
+ * Renderização principal do componente.
1856
+ */
1857
+ render() {
1858
+ return (index$1.h(index$1.Host, { key: '81cb75473b92df9e9026cae60361b30243f81e7c' }, index$1.h("div", { key: '009535a00998695c36ba186dba1410dac4459250', class: this.getCssClassMap(), part: "container" }, this.renderInputField())));
1859
+ }
1860
+ get el() { return index$1.getElement(this); }
1861
+ static get watchers() { return {
1862
+ "rangeValue": [{
1863
+ "handleRangeValueChange": 0
1864
+ }],
1865
+ "value": [{
1866
+ "handleValueChange": 0
1867
+ }],
1868
+ "mode": [{
1869
+ "handleModeChange": 0
1870
+ }],
1871
+ "referenceDate": [{
1872
+ "handleReferenceDateChange": 0
1873
+ }],
1874
+ "rangeStart": [{
1875
+ "handleRangeStartChange": 0
1876
+ }],
1877
+ "rangeEnd": [{
1878
+ "handleRangeEndChange": 0
1879
+ }]
1880
+ }; }
1881
+ };
1882
+ DatetimeInput.style = datetimeInputCss();
1883
+
1884
+ var addHours = {};
1885
+
1886
+ var addMilliseconds = {};
1887
+
1888
+ var hasRequiredAddMilliseconds;
1889
+
1890
+ function requireAddMilliseconds () {
1891
+ if (hasRequiredAddMilliseconds) return addMilliseconds;
1892
+ hasRequiredAddMilliseconds = 1;
1893
+ addMilliseconds.addMilliseconds = addMilliseconds$1;
1894
+ var _index = /*@__PURE__*/ datetimePickerConstants.requireConstructFrom();
1895
+ var _index2 = /*@__PURE__*/ datetimePickerConstants.requireToDate();
1896
+
1897
+ /**
1898
+ * The {@link addMilliseconds} function options.
1899
+ */
1900
+
1901
+ /**
1902
+ * @name addMilliseconds
1903
+ * @category Millisecond Helpers
1904
+ * @summary Add the specified number of milliseconds to the given date.
1905
+ *
1906
+ * @description
1907
+ * Add the specified number of milliseconds to the given date.
1908
+ *
1909
+ * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
1910
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
1911
+ *
1912
+ * @param date - The date to be changed
1913
+ * @param amount - The amount of milliseconds to be added.
1914
+ * @param options - The options object
1915
+ *
1916
+ * @returns The new date with the milliseconds added
1917
+ *
1918
+ * @example
1919
+ * // Add 750 milliseconds to 10 July 2014 12:45:30.000:
1920
+ * const result = addMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)
1921
+ * //=> Thu Jul 10 2014 12:45:30.750
1922
+ */
1923
+ function addMilliseconds$1(date, amount, options) {
1924
+ return (0, _index.constructFrom)(
1925
+ options?.in || date,
1926
+ +(0, _index2.toDate)(date) + amount,
1927
+ );
1928
+ }
1929
+ return addMilliseconds;
1930
+ }
1931
+
1932
+ var hasRequiredAddHours;
1933
+
1934
+ function requireAddHours () {
1935
+ if (hasRequiredAddHours) return addHours;
1936
+ hasRequiredAddHours = 1;
1937
+ addHours.addHours = addHours$1;
1938
+ var _index = /*@__PURE__*/ requireAddMilliseconds();
1939
+ var _index2 = /*@__PURE__*/ datetimePickerConstants.requireConstants();
1940
+
1941
+ /**
1942
+ * The {@link addHours} function options.
1943
+ */
1944
+
1945
+ /**
1946
+ * @name addHours
1947
+ * @category Hour Helpers
1948
+ * @summary Add the specified number of hours to the given date.
1949
+ *
1950
+ * @description
1951
+ * Add the specified number of hours to the given date.
1952
+ *
1953
+ * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
1954
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
1955
+ *
1956
+ * @param date - The date to be changed
1957
+ * @param amount - The amount of hours to be added
1958
+ * @param options - An object with options
1959
+ *
1960
+ * @returns The new date with the hours added
1961
+ *
1962
+ * @example
1963
+ * // Add 2 hours to 10 July 2014 23:00:00:
1964
+ * const result = addHours(new Date(2014, 6, 10, 23, 0), 2)
1965
+ * //=> Fri Jul 11 2014 01:00:00
1966
+ */
1967
+ function addHours$1(date, amount, options) {
1968
+ return (0, _index.addMilliseconds)(
1969
+ date,
1970
+ amount * _index2.millisecondsInHour,
1971
+ options,
1972
+ );
1973
+ }
1974
+ return addHours;
1975
+ }
1976
+
1977
+ var addHoursExports = /*@__PURE__*/ requireAddHours();
1978
+
1979
+ var addMinutes = {};
1980
+
1981
+ var hasRequiredAddMinutes;
1982
+
1983
+ function requireAddMinutes () {
1984
+ if (hasRequiredAddMinutes) return addMinutes;
1985
+ hasRequiredAddMinutes = 1;
1986
+ addMinutes.addMinutes = addMinutes$1;
1987
+ var _index = /*@__PURE__*/ datetimePickerConstants.requireConstants();
1988
+ var _index2 = /*@__PURE__*/ datetimePickerConstants.requireToDate();
1989
+
1990
+ /**
1991
+ * The {@link addMinutes} function options.
1992
+ */
1993
+
1994
+ /**
1995
+ * @name addMinutes
1996
+ * @category Minute Helpers
1997
+ * @summary Add the specified number of minutes to the given date.
1998
+ *
1999
+ * @description
2000
+ * Add the specified number of minutes to the given date.
2001
+ *
2002
+ * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
2003
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
2004
+ *
2005
+ * @param date - The date to be changed
2006
+ * @param amount - The amount of minutes to be added.
2007
+ * @param options - An object with options
2008
+ *
2009
+ * @returns The new date with the minutes added
2010
+ *
2011
+ * @example
2012
+ * // Add 30 minutes to 10 July 2014 12:00:00:
2013
+ * const result = addMinutes(new Date(2014, 6, 10, 12, 0), 30)
2014
+ * //=> Thu Jul 10 2014 12:30:00
2015
+ */
2016
+ function addMinutes$1(date, amount, options) {
2017
+ const _date = (0, _index2.toDate)(date, options?.in);
2018
+ _date.setTime(_date.getTime() + amount * _index.millisecondsInMinute);
2019
+ return _date;
2020
+ }
2021
+ return addMinutes;
2022
+ }
2023
+
2024
+ var addMinutesExports = /*@__PURE__*/ requireAddMinutes();
2025
+
2026
+ var subHours = {};
2027
+
2028
+ var hasRequiredSubHours;
2029
+
2030
+ function requireSubHours () {
2031
+ if (hasRequiredSubHours) return subHours;
2032
+ hasRequiredSubHours = 1;
2033
+ subHours.subHours = subHours$1;
2034
+ var _index = /*@__PURE__*/ requireAddHours();
2035
+
2036
+ /**
2037
+ * The {@link subHours} function options.
2038
+ */
2039
+
2040
+ /**
2041
+ * @name subHours
2042
+ * @category Hour Helpers
2043
+ * @summary Subtract the specified number of hours from the given date.
2044
+ *
2045
+ * @description
2046
+ * Subtract the specified number of hours from the given date.
2047
+ *
2048
+ * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
2049
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
2050
+ *
2051
+ * @param date - The date to be changed
2052
+ * @param amount - The amount of hours to be subtracted.
2053
+ * @param options - The options
2054
+ *
2055
+ * @returns The new date with the hours subtracted
2056
+ *
2057
+ * @example
2058
+ * // Subtract 2 hours from 11 July 2014 01:00:00:
2059
+ * const result = subHours(new Date(2014, 6, 11, 1, 0), 2)
2060
+ * //=> Thu Jul 10 2014 23:00:00
2061
+ */
2062
+ function subHours$1(date, amount, options) {
2063
+ return (0, _index.addHours)(date, -amount, options);
2064
+ }
2065
+ return subHours;
2066
+ }
2067
+
2068
+ var subHoursExports = /*@__PURE__*/ requireSubHours();
2069
+
2070
+ var subMinutes = {};
2071
+
2072
+ var hasRequiredSubMinutes;
2073
+
2074
+ function requireSubMinutes () {
2075
+ if (hasRequiredSubMinutes) return subMinutes;
2076
+ hasRequiredSubMinutes = 1;
2077
+ subMinutes.subMinutes = subMinutes$1;
2078
+ var _index = /*@__PURE__*/ requireAddMinutes();
2079
+
2080
+ /**
2081
+ * The {@link subMinutes} function options.
2082
+ */
2083
+
2084
+ /**
2085
+ * @name subMinutes
2086
+ * @category Minute Helpers
2087
+ * @summary Subtract the specified number of minutes from the given date.
2088
+ *
2089
+ * @description
2090
+ * Subtract the specified number of minutes from the given date.
2091
+ *
2092
+ * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
2093
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
2094
+ *
2095
+ * @param date - The date to be changed
2096
+ * @param amount - The amount of minutes to be subtracted.
2097
+ * @param options - An object with options
2098
+ *
2099
+ * @returns The new date with the minutes subtracted
2100
+ *
2101
+ * @example
2102
+ * // Subtract 30 minutes from 10 July 2014 12:00:00:
2103
+ * const result = subMinutes(new Date(2014, 6, 10, 12, 0), 30)
2104
+ * //=> Thu Jul 10 2014 11:30:00
2105
+ */
2106
+ function subMinutes$1(date, amount, options) {
2107
+ return (0, _index.addMinutes)(date, -amount, options);
2108
+ }
2109
+ return subMinutes;
2110
+ }
2111
+
2112
+ var subMinutesExports = /*@__PURE__*/ requireSubMinutes();
2113
+
2114
+ /**
2115
+ * Conjunto de campos suportados pelo time picker.
2116
+ *
2117
+ * Esses valores são usados como contrato entre a renderização do campo e a lógica de commit.
2118
+ */
2119
+ const INPUT_TIME_TYPE = {
2120
+ HOUR: 'hour',
2121
+ MINUTE: 'minute',
2122
+ };
2123
+
2124
+ 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}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,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))}}@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))}}@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-in-out{animation-timing-function:cubic-bezier(0.42, 0, 0.58, 1)}.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}.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)}.help{font-size:var(--font-size-scale-base)}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)}*[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)}: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)}`;
2125
+
2126
+ const TimePicker = class {
2127
+ constructor(hostRef) {
2128
+ index$1.registerInstance(this, hostRef);
2129
+ this.dateStateChange = index$1.createEvent(this, "dateStateChange", 7);
2130
+ /** Mantém o rascunho digitado por campo para evitar aplicar valor parcial prematuramente. */
2131
+ this.timeDraft = {};
2132
+ /** Data de referência usada para exibir e ajustar hora e minuto. */
2133
+ this.referenceDate = new Date();
2134
+ /** Valor atualmente selecionado pelo usuário, ou `null` quando vazio. */
2135
+ this.value = null;
2136
+ /** Desabilita todos os controles de navegação e edição de hora/minuto. */
2137
+ this.disabled = false;
2138
+ /** Cacheia handlers por tipo de campo para preservar a mesma referência entre renderizações. */
2139
+ this.timeInputChangeHandlers = new Map();
2140
+ /** Cacheia handlers de commit por tipo de campo. */
2141
+ this.timeInputCommitHandlers = new Map();
2142
+ /** Cacheia handlers de teclado por tipo de campo. */
2143
+ this.timeInputKeydownHandlers = new Map();
2144
+ /**
2145
+ * Executa a navegação associada ao botão clicado.
2146
+ *
2147
+ * @param event - Clique disparado pelo botão de navegação.
2148
+ */
2149
+ this.handleNavigationClick = (event) => {
2150
+ if (this.disabled) {
2151
+ return;
2152
+ }
2153
+ const actionFromPath = event
2154
+ .composedPath()
2155
+ .find((target) => target instanceof HTMLElement && target.dataset.action !== undefined);
2156
+ const action = (actionFromPath?.dataset.action ?? event.currentTarget.dataset.action);
2157
+ if (action === undefined)
2158
+ return;
2159
+ switch (action) {
2160
+ case datetimePickerConstants.NAVIGATION_ACTION.PREVIOUS_HOUR:
2161
+ this.decreaseHour();
2162
+ break;
2163
+ case datetimePickerConstants.NAVIGATION_ACTION.PREVIOUS_MINUTE:
2164
+ this.decreaseMinute();
2165
+ break;
2166
+ case datetimePickerConstants.NAVIGATION_ACTION.NEXT_HOUR:
2167
+ this.increaseHour();
2168
+ break;
2169
+ case datetimePickerConstants.NAVIGATION_ACTION.NEXT_MINUTE:
2170
+ this.increaseMinute();
2171
+ break;
2172
+ }
2173
+ };
2174
+ /**
2175
+ * Atualiza o rascunho do campo removendo qualquer caractere não numérico.
2176
+ *
2177
+ * @param event - Evento de input do campo de hora ou minuto.
2178
+ * @param type - Campo que está sendo editado.
2179
+ */
2180
+ this.handleTimeInputChange = (event, type) => {
2181
+ if (this.disabled) {
2182
+ return;
2183
+ }
2184
+ const input = event.target;
2185
+ const value = input.value.replace(/\D/g, '');
2186
+ this.timeDraft = { ...this.timeDraft, [type]: value };
2187
+ };
2188
+ }
2189
+ componentWillLoad() {
2190
+ this.referenceDate = isValid.resolveSsrLocalDate(this.el, this.referenceDate);
2191
+ }
2192
+ /**
2193
+ * Emite o estado consolidado para manter hora, minuto e data sincronizados.
2194
+ *
2195
+ * @param nextReferenceDate - Nova data de referência após a interação.
2196
+ * @param nextValue - Valor final selecionado; quando omitido, assume a data de referência.
2197
+ */
2198
+ emitDateStateChange(nextReferenceDate, nextValue = isValid.toDateExports.toDate(new Date(nextReferenceDate))) {
2199
+ // Ao emitir, garantir segundos zerados (componente não controla segundos)
2200
+ const normalizedReference = isValid.setExports.set(nextReferenceDate, { seconds: 0, milliseconds: 0 });
2201
+ const normalizedValue = nextValue === null ? null : isValid.setExports.set(nextValue, { seconds: 0, milliseconds: 0 });
2202
+ this.value = normalizedValue;
2203
+ this.dateStateChange.emit({
2204
+ referenceDate: normalizedReference,
2205
+ value: normalizedValue,
2206
+ });
2207
+ event.dispatchNativeFormEvent(this.el, 'input');
2208
+ event.dispatchNativeFormEvent(this.el, 'change');
2209
+ }
2210
+ /**
2211
+ * Resolve o ícone associado à ação de navegação.
2212
+ *
2213
+ * @param action - Ação representada pelo botão.
2214
+ * @returns O nome do ícone ou uma string vazia quando a ação não é reconhecida.
2215
+ */
2216
+ getIconForAction(action) {
2217
+ switch (action) {
2218
+ case datetimePickerConstants.NAVIGATION_ACTION.PREVIOUS_HOUR:
2219
+ case datetimePickerConstants.NAVIGATION_ACTION.PREVIOUS_MINUTE:
2220
+ return 'fa6-solid:chevron-down';
2221
+ case datetimePickerConstants.NAVIGATION_ACTION.NEXT_HOUR:
2222
+ case datetimePickerConstants.NAVIGATION_ACTION.NEXT_MINUTE:
2223
+ return 'fa6-solid:chevron-up';
2224
+ default:
2225
+ return '';
2226
+ }
2227
+ }
2228
+ /**
2229
+ * Aplica o valor digitado ao estado do componente quando o campo é concluído.
2230
+ *
2231
+ * @param type - Campo que será aplicado.
2232
+ */
2233
+ handleTimeInputCommit(type) {
2234
+ if (this.disabled) {
2235
+ return;
2236
+ }
2237
+ const draft = this.timeDraft[type];
2238
+ if (draft == null || draft === '')
2239
+ return;
2240
+ const numeric = Number(draft);
2241
+ if (Number.isNaN(numeric))
2242
+ return;
2243
+ let date = isValid.toDateExports.toDate(new Date(this.referenceDate));
2244
+ if (type === INPUT_TIME_TYPE.HOUR) {
2245
+ if (numeric < 0 || numeric > 23)
2246
+ return;
2247
+ date = isValid.setExports.set(date, { hours: numeric });
2248
+ }
2249
+ if (type === INPUT_TIME_TYPE.MINUTE) {
2250
+ if (numeric < 0 || numeric > 59)
2251
+ return;
2252
+ date = isValid.setExports.set(date, { minutes: numeric });
2253
+ }
2254
+ this.emitDateStateChange(date);
2255
+ const { [type]: _discarded, ...remainingDraft } = this.timeDraft;
2256
+ this.timeDraft = remainingDraft;
2257
+ }
2258
+ /**
2259
+ * Constrói o rótulo acessível das ações de navegação com base no valor atual.
2260
+ *
2261
+ * @param action - Ação que o botão executa.
2262
+ * @returns Texto acessível do botão.
2263
+ */
2264
+ getNavigationAriaLabel(action) {
2265
+ switch (action) {
2266
+ case datetimePickerConstants.NAVIGATION_ACTION.PREVIOUS_HOUR:
2267
+ return `Ir para a hora anterior, ${getHoursExports.getHours(subHoursExports.subHours(this.referenceDate, 1))}`;
2268
+ case datetimePickerConstants.NAVIGATION_ACTION.PREVIOUS_MINUTE:
2269
+ return `Ir para o minuto anterior, ${getMinutesExports.getMinutes(subMinutesExports.subMinutes(this.referenceDate, 1))}`;
2270
+ case datetimePickerConstants.NAVIGATION_ACTION.NEXT_HOUR:
2271
+ return `Ir para a próxima hora, ${getHoursExports.getHours(addHoursExports.addHours(this.referenceDate, 1))}`;
2272
+ case datetimePickerConstants.NAVIGATION_ACTION.NEXT_MINUTE:
2273
+ return `Ir para o próximo minuto, ${getMinutesExports.getMinutes(addMinutesExports.addMinutes(this.referenceDate, 1))}`;
2274
+ default:
2275
+ return '';
2276
+ }
2277
+ }
2278
+ /**
2279
+ * Retorna o rótulo acessível do campo exibido.
2280
+ *
2281
+ * @param type - Tipo do campo, hora ou minuto.
2282
+ * @returns O texto exibido ao leitor de tela.
2283
+ */
2284
+ getTimeFieldAriaLabel(type) {
2285
+ switch (type) {
2286
+ case INPUT_TIME_TYPE.HOUR:
2287
+ return 'Hora';
2288
+ case INPUT_TIME_TYPE.MINUTE:
2289
+ return 'Minuto';
2290
+ default:
2291
+ return '';
2292
+ }
2293
+ }
2294
+ /**
2295
+ * Resolve o valor, a ação anterior e a próxima ação para o campo solicitado.
2296
+ *
2297
+ * @param type - Tipo do campo a ser renderizado.
2298
+ * @returns Configuração de navegação e valor do campo.
2299
+ */
2300
+ getTimeFieldConfig(type) {
2301
+ switch (type) {
2302
+ case INPUT_TIME_TYPE.HOUR:
2303
+ return {
2304
+ value: getHoursExports.getHours(this.referenceDate),
2305
+ nextAction: datetimePickerConstants.NAVIGATION_ACTION.NEXT_HOUR,
2306
+ prevAction: datetimePickerConstants.NAVIGATION_ACTION.PREVIOUS_HOUR,
2307
+ };
2308
+ case INPUT_TIME_TYPE.MINUTE:
2309
+ return {
2310
+ value: getMinutesExports.getMinutes(this.referenceDate),
2311
+ nextAction: datetimePickerConstants.NAVIGATION_ACTION.NEXT_MINUTE,
2312
+ prevAction: datetimePickerConstants.NAVIGATION_ACTION.PREVIOUS_MINUTE,
2313
+ };
2314
+ default:
2315
+ return {
2316
+ value: 0,
2317
+ nextAction: datetimePickerConstants.NAVIGATION_ACTION.NEXT_HOUR,
2318
+ prevAction: datetimePickerConstants.NAVIGATION_ACTION.PREVIOUS_HOUR,
2319
+ };
2320
+ }
2321
+ }
2322
+ /**
2323
+ * Formata o valor exibido no campo como dois dígitos.
2324
+ *
2325
+ * @param type - Tipo do campo a ser lido.
2326
+ * @returns Hora ou minuto formatado.
2327
+ */
2328
+ getTimeFieldValue(type) {
2329
+ switch (type) {
2330
+ case INPUT_TIME_TYPE.HOUR:
2331
+ return getHoursExports.getHours(this.referenceDate).toString().padStart(2, '0');
2332
+ case INPUT_TIME_TYPE.MINUTE:
2333
+ return getMinutesExports.getMinutes(this.referenceDate).toString().padStart(2, '0');
2334
+ default:
2335
+ return '00';
2336
+ }
2337
+ }
2338
+ /**
2339
+ * Recupera um handler estável para o evento de input de um campo específico.
2340
+ *
2341
+ * @param type - Tipo do campo.
2342
+ * @returns Função reutilizável para o evento de input.
2343
+ */
2344
+ getTimeInputChangeHandler(type) {
2345
+ let handler = this.timeInputChangeHandlers.get(type);
2346
+ if (handler === undefined) {
2347
+ handler = (event) => this.handleTimeInputChange(event, type);
2348
+ this.timeInputChangeHandlers.set(type, handler);
2349
+ }
2350
+ return handler;
2351
+ }
2352
+ /**
2353
+ * Recupera um handler estável para o commit de um campo específico.
2354
+ *
2355
+ * @param type - Tipo do campo.
2356
+ * @returns Função reutilizável para blur ou confirmação.
2357
+ */
2358
+ getTimeInputCommitHandler(type) {
2359
+ let handler = this.timeInputCommitHandlers.get(type);
2360
+ if (handler === undefined) {
2361
+ handler = () => this.handleTimeInputCommit(type);
2362
+ this.timeInputCommitHandlers.set(type, handler);
2363
+ }
2364
+ return handler;
2365
+ }
2366
+ /**
2367
+ * Recupera um handler estável para confirmar o valor com a tecla Enter.
2368
+ *
2369
+ * @param type - Tipo do campo.
2370
+ * @returns Função reutilizável para eventos de teclado.
2371
+ */
2372
+ getTimeInputKeydownHandler(type) {
2373
+ let handler = this.timeInputKeydownHandlers.get(type);
2374
+ if (handler === undefined) {
2375
+ handler = (event) => {
2376
+ if (event.key === 'Enter') {
2377
+ this.handleTimeInputCommit(type);
2378
+ return;
2379
+ }
2380
+ this.adjustTimeInputWithKeyboard(event, type);
2381
+ };
2382
+ this.timeInputKeydownHandlers.set(type, handler);
2383
+ }
2384
+ return handler;
2385
+ }
2386
+ adjustTimeInputWithKeyboard(event, type) {
2387
+ if (event.key !== 'ArrowUp' && event.key !== 'ArrowDown')
2388
+ return;
2389
+ event.preventDefault();
2390
+ if (event.key === 'ArrowUp') {
2391
+ type === INPUT_TIME_TYPE.HOUR ? this.increaseHour() : this.increaseMinute();
2392
+ return;
2393
+ }
2394
+ type === INPUT_TIME_TYPE.HOUR ? this.decreaseHour() : this.decreaseMinute();
2395
+ }
2396
+ /** Incrementa a hora mantendo os demais componentes da data intactos. */
2397
+ increaseHour() {
2398
+ const date = addHoursExports.addHours(this.referenceDate, 1);
2399
+ this.emitDateStateChange(date);
2400
+ }
2401
+ /** Incrementa o minuto mantendo os demais componentes da data intactos. */
2402
+ increaseMinute() {
2403
+ const date = addMinutesExports.addMinutes(this.referenceDate, 1);
2404
+ this.emitDateStateChange(date);
2405
+ }
2406
+ /** Decrementa a hora mantendo os demais componentes da data intactos. */
2407
+ decreaseHour() {
2408
+ const date = subHoursExports.subHours(this.referenceDate, 1);
2409
+ this.emitDateStateChange(date);
2410
+ }
2411
+ /** Decrementa o minuto mantendo os demais componentes da data intactos. */
2412
+ decreaseMinute() {
2413
+ const date = subMinutesExports.subMinutes(this.referenceDate, 1);
2414
+ this.emitDateStateChange(date);
2415
+ }
2416
+ /**
2417
+ * Renderiza um botão de navegação consistente para hora ou minuto.
2418
+ *
2419
+ * @param action - Ação que o botão executará.
2420
+ */
2421
+ renderNavigationButton(action) {
2422
+ return (index$1.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 }, index$1.h("br-icon", { iconName: this.getIconForAction(action), width: "20", height: "20", "aria-hidden": "true" })));
2423
+ }
2424
+ /** Renderiza o bloco completo de hora e minuto. */
2425
+ renderTimePicker() {
2426
+ return (index$1.h("div", { class: "timer", role: "group", "aria-label": "Seletor de hora e minuto", part: "timer" }, this.renderTimeField(INPUT_TIME_TYPE.HOUR), index$1.h("span", { class: "time-separator", "aria-hidden": "true", part: "separator" }, ":"), this.renderTimeField(INPUT_TIME_TYPE.MINUTE)));
2427
+ }
2428
+ /**
2429
+ * Renderiza um campo de edição com navegação lateral.
2430
+ *
2431
+ * @param type - Tipo do campo a ser exibido.
2432
+ */
2433
+ renderTimeField(type) {
2434
+ const { nextAction, prevAction } = this.getTimeFieldConfig(type);
2435
+ return (index$1.h("div", { class: "time-field", part: "field" }, this.renderNavigationButton(nextAction), index$1.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)));
2436
+ }
2437
+ render() {
2438
+ return (index$1.h(index$1.Host, { key: '59ed47bc0825e6dc4c9568aefd5effe81d151525' }, index$1.h("div", { key: 'c8acccd2dfe328626346731c7c3f02984db60f4f', class: "br-time-picker", part: "container" }, this.renderTimePicker())));
2439
+ }
2440
+ get el() { return index$1.getElement(this); }
2441
+ };
2442
+ TimePicker.style = timePickerCss();
2443
+
2444
+ exports.br_date_picker = DatePicker;
2445
+ exports.br_datetime_input = DatetimeInput;
2446
+ exports.br_time_picker = TimePicker;