@govbr-ds/webcomponents 2.3.0 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cem/custom-elements.json +1404 -1387
- package/cem/webcomponents.html-custom-data.json +62 -56
- package/dist/cjs/br-avatar.cjs.entry.js +1 -1
- package/dist/cjs/br-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/br-button_2.cjs.entry.js +2 -2
- package/dist/cjs/br-card.cjs.entry.js +1 -1
- package/dist/cjs/br-carousel-page.cjs.entry.js +1 -1
- package/dist/cjs/br-carousel.cjs.entry.js +1 -1
- package/dist/cjs/br-checkbox-group.cjs.entry.js +1 -1
- package/dist/cjs/br-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/br-collapse_2.cjs.entry.js +2 -2
- package/dist/cjs/br-cookiebar-cookie.cjs.entry.js +1 -1
- package/dist/cjs/br-cookiebar-group.cjs.entry.js +1 -1
- package/dist/cjs/br-cookiebar-header.cjs.entry.js +1 -1
- package/dist/cjs/br-cookiebar-link.cjs.entry.js +1 -1
- package/dist/cjs/br-cookiebar-note-group.cjs.entry.js +1 -1
- package/dist/cjs/br-cookiebar-note.cjs.entry.js +1 -1
- package/dist/cjs/br-cookiebar.cjs.entry.js +1 -1
- package/dist/cjs/br-date-picker_3.cjs.entry.js +868 -516
- package/dist/cjs/br-datetime-picker.cjs.entry.js +1345 -309
- package/dist/cjs/br-divider.cjs.entry.js +1 -1
- package/dist/cjs/br-dropdown_2.cjs.entry.js +248 -129
- package/dist/cjs/br-footer-category.cjs.entry.js +1 -1
- package/dist/cjs/br-footer-item.cjs.entry.js +1 -1
- package/dist/cjs/br-footer-legal.cjs.entry.js +1 -1
- package/dist/cjs/br-footer-logo.cjs.entry.js +1 -1
- package/dist/cjs/br-footer-social.cjs.entry.js +1 -1
- package/dist/cjs/br-footer.cjs.entry.js +1 -1
- package/dist/cjs/br-header-function.cjs.entry.js +1 -1
- package/dist/cjs/br-header-link.cjs.entry.js +1 -1
- package/dist/cjs/br-header-list.cjs.entry.js +1 -1
- package/dist/cjs/br-header-logo.cjs.entry.js +1 -1
- package/dist/cjs/br-header.cjs.entry.js +1 -1
- package/dist/cjs/br-icon.cjs.entry.js +1 -1
- package/dist/cjs/br-input.cjs.entry.js +9 -3
- package/dist/cjs/br-item.cjs.entry.js +1 -1
- package/dist/cjs/br-link.cjs.entry.js +1 -1
- package/dist/cjs/br-loading.cjs.entry.js +1 -1
- package/dist/cjs/br-magic-button.cjs.entry.js +1 -1
- package/dist/cjs/br-menu-group.cjs.entry.js +1 -1
- package/dist/cjs/br-menu-header.cjs.entry.js +1 -1
- package/dist/cjs/br-menu-info.cjs.entry.js +1 -1
- package/dist/cjs/br-menu-item.cjs.entry.js +1 -1
- package/dist/cjs/br-menu-link.cjs.entry.js +1 -1
- package/dist/cjs/br-menu-list.cjs.entry.js +1 -1
- package/dist/cjs/br-menu-logo.cjs.entry.js +1 -1
- package/dist/cjs/br-menu-social.cjs.entry.js +1 -1
- package/dist/cjs/br-menu.cjs.entry.js +1 -1
- package/dist/cjs/br-modal.cjs.entry.js +1 -1
- package/dist/cjs/br-notification-body.cjs.entry.js +1 -1
- package/dist/cjs/br-notification-header.cjs.entry.js +1 -1
- package/dist/cjs/br-notification-item.cjs.entry.js +1 -1
- package/dist/cjs/br-notification.cjs.entry.js +1 -1
- package/dist/cjs/br-pagination.cjs.entry.js +1 -1
- package/dist/cjs/br-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/br-radio.cjs.entry.js +1 -1
- package/dist/cjs/br-scrim.cjs.entry.js +1 -1
- package/dist/cjs/br-select-input_3.cjs.entry.js +282 -98
- package/dist/cjs/br-sign-in.cjs.entry.js +1 -1
- package/dist/cjs/br-skip-link.cjs.entry.js +1 -1
- package/dist/cjs/br-skiplink-item.cjs.entry.js +1 -1
- package/dist/cjs/br-slider.cjs.entry.js +1 -1
- package/dist/cjs/br-step_2.cjs.entry.js +2 -2
- package/dist/cjs/br-switch.cjs.entry.js +1 -1
- package/dist/cjs/br-tab-item.cjs.entry.js +1 -1
- package/dist/cjs/br-tab.cjs.entry.js +1 -1
- package/dist/cjs/br-table-body.cjs.entry.js +1 -1
- package/dist/cjs/br-table-cell.cjs.entry.js +1 -1
- package/dist/cjs/br-table-header-cell.cjs.entry.js +1 -1
- package/dist/cjs/br-table-header.cjs.entry.js +1 -1
- package/dist/cjs/br-table-row.cjs.entry.js +1 -1
- package/dist/cjs/br-table.cjs.entry.js +1 -1
- package/dist/cjs/br-tag.cjs.entry.js +1 -1
- package/dist/cjs/br-textarea.cjs.entry.js +1 -1
- package/dist/cjs/br-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/br-upload.cjs.entry.js +5 -21
- package/dist/cjs/br-wizard-panel.cjs.entry.js +1 -1
- package/dist/cjs/br-wizard.cjs.entry.js +1 -1
- package/dist/cjs/{datetime-picker-constants-B5pWeOn1.js → datetime-picker-constants-CCeI5iW7.js} +20 -5
- package/dist/cjs/format-bytes-Cs8SH2w0.js +24 -0
- package/dist/cjs/index-Bc30P_6z.js +14 -14
- package/dist/cjs/{index-C92n55ch.js → index-C-IpVFDH.js} +13 -13
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/{datetime-picker-props-validation-DmNKSXsy.js → isValid-CduHZTFc.js} +1 -483
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/select.utils-C38f5Kea.js +62 -0
- package/dist/cjs/webcomponents.cjs.js +1 -1
- package/dist/collection/components/avatar/avatar.css +1 -1
- package/dist/collection/components/breadcrumb/breadcrumb.css +1 -1
- package/dist/collection/components/button/button.css +1 -1
- package/dist/collection/components/card/card.css +1 -1
- package/dist/collection/components/carousel/carousel-page/carousel-page.css +1 -1
- package/dist/collection/components/carousel/carousel.css +1 -1
- package/dist/collection/components/checkbox/checkbox.css +1 -1
- package/dist/collection/components/checkbox-group/checkbox-group.css +1 -1
- package/dist/collection/components/collapse/collapse.css +1 -1
- package/dist/collection/components/cookiebar/cookiebar-cookie/cookiebar-cookie.css +1 -1
- package/dist/collection/components/cookiebar/cookiebar-group/cookiebar-group.css +1 -1
- package/dist/collection/components/cookiebar/cookiebar-header/cookiebar-header.css +1 -1
- package/dist/collection/components/cookiebar/cookiebar-link/cookiebar-link.css +1 -1
- package/dist/collection/components/cookiebar/cookiebar-note/cookiebar-note.css +1 -1
- package/dist/collection/components/cookiebar/cookiebar-note-group/cookiebar-note-group.css +1 -1
- package/dist/collection/components/cookiebar/cookiebar.css +1 -1
- package/dist/collection/components/datetime-picker/date-picker/date-picker-locale.js +12 -12
- package/dist/collection/components/datetime-picker/date-picker/date-picker-props-validation.js +14 -13
- package/dist/collection/components/datetime-picker/date-picker/date-picker.css +1 -1
- package/dist/collection/components/datetime-picker/date-picker/date-picker.js +384 -280
- package/dist/collection/components/datetime-picker/datetime-input/datetime-input-constants.js +59 -0
- package/dist/collection/components/datetime-picker/datetime-input/datetime-input-props-validation.js +19 -15
- package/dist/collection/components/datetime-picker/datetime-input/datetime-input.css +1 -1
- package/dist/collection/components/datetime-picker/datetime-input/datetime-input.js +373 -211
- package/dist/collection/components/datetime-picker/datetime-input/datetime-input.types.js +1 -0
- package/dist/collection/components/datetime-picker/datetime-picker-constants.js +19 -5
- package/dist/collection/components/datetime-picker/datetime-picker-form-associated.js +92 -11
- package/dist/collection/components/datetime-picker/datetime-picker-props-validation.js +52 -33
- package/dist/collection/components/datetime-picker/datetime-picker.css +1 -1
- package/dist/collection/components/datetime-picker/datetime-picker.js +915 -362
- package/dist/collection/components/datetime-picker/datetime-picker.utils.js +62 -49
- package/dist/collection/components/datetime-picker/time-picker/time-picker-constants.js +3 -2
- package/dist/collection/components/datetime-picker/time-picker/time-picker.css +1 -1
- package/dist/collection/components/datetime-picker/time-picker/time-picker.js +148 -85
- package/dist/collection/components/divider/divider.css +1 -1
- package/dist/collection/components/dropdown/dropdown.css +1 -1
- package/dist/collection/components/footer/footer-category/footer-category.css +1 -1
- package/dist/collection/components/footer/footer-item/footer-item.css +1 -1
- package/dist/collection/components/footer/footer-legal/footer-legal.css +1 -1
- package/dist/collection/components/footer/footer-logo/footer-logo.css +1 -1
- package/dist/collection/components/footer/footer-social/footer-social.css +1 -1
- package/dist/collection/components/footer/footer.css +1 -1
- package/dist/collection/components/header/header-function/header-function.css +1 -1
- package/dist/collection/components/header/header-link/header-link.css +1 -1
- package/dist/collection/components/header/header-list/header-list.css +1 -1
- package/dist/collection/components/header/header-logo/header-logo.css +1 -1
- package/dist/collection/components/header/header.css +1 -1
- package/dist/collection/components/icon/icon.css +1 -1
- package/dist/collection/components/input/input.css +1 -1
- package/dist/collection/components/input/input.js +29 -2
- package/dist/collection/components/item/item.css +1 -1
- package/dist/collection/components/link/link.css +1 -1
- package/dist/collection/components/list/list.css +1 -1
- package/dist/collection/components/loading/loading.css +1 -1
- package/dist/collection/components/magic-button/magic-button.css +1 -1
- package/dist/collection/components/menu/menu-group/menu-group.css +1 -1
- package/dist/collection/components/menu/menu-header/menu-header.css +1 -1
- package/dist/collection/components/menu/menu-info/menu-info.css +1 -1
- package/dist/collection/components/menu/menu-item/menu-item.css +1 -1
- package/dist/collection/components/menu/menu-link/menu-link.css +1 -1
- package/dist/collection/components/menu/menu-list/menu-list.css +1 -1
- package/dist/collection/components/menu/menu-logo/menu-logo.css +1 -1
- package/dist/collection/components/menu/menu-social/menu-social.css +1 -1
- package/dist/collection/components/menu/menu.css +1 -1
- package/dist/collection/components/message/message.css +1 -1
- package/dist/collection/components/modal/modal.css +1 -1
- package/dist/collection/components/notification/notification-body/notification-body.css +1 -1
- package/dist/collection/components/notification/notification-header/notification-header.css +1 -1
- package/dist/collection/components/notification/notification-item/notification-item.css +1 -1
- package/dist/collection/components/notification/notification.css +1 -1
- package/dist/collection/components/pagination/pagination.css +1 -1
- package/dist/collection/components/radio/radio.css +1 -1
- package/dist/collection/components/radio-group/radio-group.css +1 -1
- package/dist/collection/components/scrim/scrim.css +1 -1
- package/dist/collection/components/select/select-input/select-input.css +1 -1
- package/dist/collection/components/select/select-input/select-input.js +123 -17
- package/dist/collection/components/select/select-list/select-list.css +1 -1
- package/dist/collection/components/select/select-list/select-list.js +218 -66
- package/dist/collection/components/select/select-option/select-option.css +1 -1
- package/dist/collection/components/select/select-option/select-option.js +14 -5
- package/dist/collection/components/select/select.css +1 -1
- package/dist/collection/components/select/select.js +303 -94
- package/dist/collection/components/select/select.utils.js +26 -7
- package/dist/collection/components/sign-in/sign-in.css +1 -1
- package/dist/collection/components/skip-link/skip-link-item/skip-link-item.css +1 -1
- package/dist/collection/components/skip-link/skip-link.css +1 -1
- package/dist/collection/components/slider/slider.css +1 -1
- package/dist/collection/components/step/step-item/step-item.css +1 -1
- package/dist/collection/components/step/step.css +1 -1
- package/dist/collection/components/switch/switch.css +1 -1
- package/dist/collection/components/tab/tab-item/tab-item.css +1 -1
- package/dist/collection/components/tab/tab.css +1 -1
- package/dist/collection/components/table/table-body/table-body.css +1 -1
- package/dist/collection/components/table/table-cell/table-cell.css +1 -1
- package/dist/collection/components/table/table-header/table-header.css +1 -1
- package/dist/collection/components/table/table-header-cell/table-header-cell.css +1 -1
- package/dist/collection/components/table/table-row/table-row.css +1 -1
- package/dist/collection/components/table/table.css +1 -1
- package/dist/collection/components/tag/tag.css +1 -1
- package/dist/collection/components/textarea/textarea.css +1 -1
- package/dist/collection/components/tooltip/tooltip.css +1 -1
- package/dist/collection/components/upload/upload.css +1 -1
- package/dist/collection/components/wizard/wizard-panel/wizard-panel.css +1 -1
- package/dist/collection/components/wizard/wizard.css +1 -1
- package/dist/components/br-avatar.js +1 -1
- package/dist/components/br-breadcrumb.js +1 -1
- package/dist/components/br-button.js +1 -1
- package/dist/components/br-card.js +1 -1
- package/dist/components/br-carousel-page.js +1 -1
- package/dist/components/br-carousel.js +1 -1
- package/dist/components/br-checkbox-group.js +1 -1
- package/dist/components/br-checkbox.js +1 -1
- package/dist/components/br-checkgroup.js +1 -1
- package/dist/components/br-collapse.js +1 -1
- package/dist/components/br-cookiebar-cookie.js +1 -1
- package/dist/components/br-cookiebar-group.js +1 -1
- package/dist/components/br-cookiebar-header.js +1 -1
- package/dist/components/br-cookiebar-link.js +1 -1
- package/dist/components/br-cookiebar-note-group.js +1 -1
- package/dist/components/br-cookiebar-note.js +1 -1
- package/dist/components/br-cookiebar.js +1 -1
- package/dist/components/br-date-picker.js +1 -1
- package/dist/components/br-datetime-input.js +1 -1
- package/dist/components/br-datetime-picker.js +1 -1
- package/dist/components/br-divider.js +1 -1
- package/dist/components/br-dropdown.js +1 -1
- package/dist/components/br-footer-category.js +1 -1
- package/dist/components/br-footer-item.js +1 -1
- package/dist/components/br-footer-legal.js +1 -1
- package/dist/components/br-footer-logo.js +1 -1
- package/dist/components/br-footer-social.js +1 -1
- package/dist/components/br-footer.js +1 -1
- package/dist/components/br-header-function.js +1 -1
- package/dist/components/br-header-link.js +1 -1
- package/dist/components/br-header-list.js +1 -1
- package/dist/components/br-header-logo.js +1 -1
- package/dist/components/br-header.js +1 -1
- package/dist/components/br-icon.js +1 -1
- package/dist/components/br-input.js +1 -1
- package/dist/components/br-item.js +1 -1
- package/dist/components/br-link.js +1 -1
- package/dist/components/br-list.js +1 -1
- package/dist/components/br-loading.js +1 -1
- package/dist/components/br-magic-button.js +1 -1
- package/dist/components/br-menu-group.js +1 -1
- package/dist/components/br-menu-header.js +1 -1
- package/dist/components/br-menu-info.js +1 -1
- package/dist/components/br-menu-item.js +1 -1
- package/dist/components/br-menu-link.js +1 -1
- package/dist/components/br-menu-list.js +1 -1
- package/dist/components/br-menu-logo.js +1 -1
- package/dist/components/br-menu-social.js +1 -1
- package/dist/components/br-menu.js +1 -1
- package/dist/components/br-message.js +1 -1
- package/dist/components/br-modal.js +1 -1
- package/dist/components/br-notification-body.js +1 -1
- package/dist/components/br-notification-header.js +1 -1
- package/dist/components/br-notification-item.js +1 -1
- package/dist/components/br-notification.js +1 -1
- package/dist/components/br-pagination.js +1 -1
- package/dist/components/br-radio-group.js +1 -1
- package/dist/components/br-radio.js +1 -1
- package/dist/components/br-scrim.js +1 -1
- package/dist/components/br-select-input.js +1 -1
- package/dist/components/br-select-list.js +1 -1
- package/dist/components/br-select-option.js +1 -1
- package/dist/components/br-select.js +1 -1
- package/dist/components/br-sign-in.js +1 -1
- package/dist/components/br-skip-link-item.js +1 -1
- package/dist/components/br-skip-link.js +1 -1
- package/dist/components/br-skiplink-item.js +1 -1
- package/dist/components/br-slider.js +1 -1
- package/dist/components/br-step-item.js +1 -1
- package/dist/components/br-step.js +1 -1
- package/dist/components/br-switch.js +1 -1
- package/dist/components/br-tab-item.js +1 -1
- package/dist/components/br-tab.js +1 -1
- package/dist/components/br-table-body.js +1 -1
- package/dist/components/br-table-cell.js +1 -1
- package/dist/components/br-table-header-cell.js +1 -1
- package/dist/components/br-table-header.js +1 -1
- package/dist/components/br-table-row.js +1 -1
- package/dist/components/br-table.js +1 -1
- package/dist/components/br-tag.js +1 -1
- package/dist/components/br-textarea.js +1 -1
- package/dist/components/br-time-picker.js +1 -1
- package/dist/components/br-tooltip.js +1 -1
- package/dist/components/br-upload.js +1 -1
- package/dist/components/br-wizard-panel.js +1 -1
- package/dist/components/br-wizard.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/p-5h-W9_JR.js +5 -0
- package/dist/components/p-848QkYoM.js +5 -0
- package/dist/components/p-B7bNfmgh.js +5 -0
- package/dist/components/p-BFHvuEnN.js +5 -0
- package/dist/components/p-BH6QYnAr.js +5 -0
- package/dist/{webcomponents/p-5f422a69.entry.js → components/p-BcW8O6h2.js} +1 -1
- package/dist/components/p-BicHMcSS.js +5 -0
- package/dist/components/p-Bs7iRQTG.js +5 -0
- package/dist/components/{p-Nze3Utvd.js → p-Bvrw9yWR.js} +1 -1
- package/dist/components/p-BzQFMh9j.js +5 -0
- package/dist/components/p-CBHd0-fF.js +5 -0
- package/dist/components/p-CCPHCJjw.js +5 -0
- package/dist/components/{p-BcqVlof7.js → p-CbgKdASU.js} +1 -1
- package/dist/components/p-CeNELttN.js +5 -0
- package/dist/components/p-CjtmJTLO.js +5 -0
- package/dist/components/{p-CZZVc2gK.js → p-D-3G3Ioq.js} +1 -1
- package/dist/components/p-DDu3JV_r.js +5 -0
- package/dist/components/p-DFWqyfUe.js +5 -0
- package/dist/components/p-DL6xuxGG.js +5 -0
- package/dist/components/p-DOX9Uwk1.js +5 -0
- package/dist/components/p-DUq7uT2-.js +5 -0
- package/dist/components/p-Devw08cc.js +5 -0
- package/dist/components/p-Di96UxvH.js +5 -0
- package/dist/components/p-Dp3MsSXu.js +5 -0
- package/dist/components/p-DsO4F0Cz.js +5 -0
- package/dist/components/p-DuLHFTpa.js +5 -0
- package/dist/components/p-DusornQ0.js +5 -0
- package/dist/components/p-OQpiDEK9.js +5 -0
- package/dist/components/p-PV731d8s.js +5 -0
- package/dist/components/p-XW6Hp_Jk.js +5 -0
- package/dist/components/p-jOb1hCPi.js +5 -0
- package/dist/components/p-rMnkh3Cy.js +5 -0
- package/dist/components/p-ta-24T1Z.js +5 -0
- package/dist/esm/br-avatar.entry.js +1 -1
- package/dist/esm/br-breadcrumb.entry.js +1 -1
- package/dist/esm/br-button_2.entry.js +2 -2
- package/dist/esm/br-card.entry.js +1 -1
- package/dist/esm/br-carousel-page.entry.js +1 -1
- package/dist/esm/br-carousel.entry.js +2 -2
- package/dist/esm/br-checkbox-group.entry.js +1 -1
- package/dist/esm/br-checkbox.entry.js +2 -2
- package/dist/esm/br-collapse_2.entry.js +3 -3
- package/dist/esm/br-cookiebar-cookie.entry.js +1 -1
- package/dist/esm/br-cookiebar-group.entry.js +1 -1
- package/dist/esm/br-cookiebar-header.entry.js +1 -1
- package/dist/esm/br-cookiebar-link.entry.js +1 -1
- package/dist/esm/br-cookiebar-note-group.entry.js +1 -1
- package/dist/esm/br-cookiebar-note.entry.js +1 -1
- package/dist/esm/br-cookiebar.entry.js +2 -2
- package/dist/esm/br-date-picker_3.entry.js +843 -491
- package/dist/esm/br-datetime-picker.entry.js +1314 -278
- package/dist/esm/br-divider.entry.js +1 -1
- package/dist/esm/br-dropdown_2.entry.js +247 -128
- package/dist/esm/br-footer-category.entry.js +1 -1
- package/dist/esm/br-footer-item.entry.js +1 -1
- package/dist/esm/br-footer-legal.entry.js +1 -1
- package/dist/esm/br-footer-logo.entry.js +1 -1
- package/dist/esm/br-footer-social.entry.js +1 -1
- package/dist/esm/br-footer.entry.js +1 -1
- package/dist/esm/br-header-function.entry.js +1 -1
- package/dist/esm/br-header-link.entry.js +1 -1
- package/dist/esm/br-header-list.entry.js +2 -2
- package/dist/esm/br-header-logo.entry.js +1 -1
- package/dist/esm/br-header.entry.js +1 -1
- package/dist/esm/br-icon.entry.js +1 -1
- package/dist/esm/br-input.entry.js +10 -4
- package/dist/esm/br-item.entry.js +1 -1
- package/dist/esm/br-link.entry.js +1 -1
- package/dist/esm/br-loading.entry.js +1 -1
- package/dist/esm/br-magic-button.entry.js +1 -1
- package/dist/esm/br-menu-group.entry.js +1 -1
- package/dist/esm/br-menu-header.entry.js +1 -1
- package/dist/esm/br-menu-info.entry.js +1 -1
- package/dist/esm/br-menu-item.entry.js +1 -1
- package/dist/esm/br-menu-link.entry.js +1 -1
- package/dist/esm/br-menu-list.entry.js +1 -1
- package/dist/esm/br-menu-logo.entry.js +1 -1
- package/dist/esm/br-menu-social.entry.js +1 -1
- package/dist/esm/br-menu.entry.js +2 -2
- package/dist/esm/br-modal.entry.js +1 -1
- package/dist/esm/br-notification-body.entry.js +1 -1
- package/dist/esm/br-notification-header.entry.js +1 -1
- package/dist/esm/br-notification-item.entry.js +1 -1
- package/dist/esm/br-notification.entry.js +2 -2
- package/dist/esm/br-pagination.entry.js +1 -1
- package/dist/esm/br-radio-group.entry.js +2 -2
- package/dist/esm/br-radio.entry.js +2 -2
- package/dist/esm/br-scrim.entry.js +1 -1
- package/dist/esm/br-select-input_3.entry.js +282 -98
- package/dist/esm/br-sign-in.entry.js +1 -1
- package/dist/esm/br-skip-link.entry.js +1 -1
- package/dist/esm/br-skiplink-item.entry.js +1 -1
- package/dist/esm/br-slider.entry.js +2 -2
- package/dist/esm/br-step_2.entry.js +2 -2
- package/dist/esm/br-switch.entry.js +2 -2
- package/dist/esm/br-tab-item.entry.js +1 -1
- package/dist/esm/br-tab.entry.js +1 -1
- package/dist/esm/br-table-body.entry.js +1 -1
- package/dist/esm/br-table-cell.entry.js +1 -1
- package/dist/esm/br-table-header-cell.entry.js +1 -1
- package/dist/esm/br-table-header.entry.js +1 -1
- package/dist/esm/br-table-row.entry.js +1 -1
- package/dist/esm/br-table.entry.js +1 -1
- package/dist/esm/br-tag.entry.js +2 -2
- package/dist/esm/br-textarea.entry.js +2 -2
- package/dist/esm/br-tooltip.entry.js +2 -2
- package/dist/esm/br-upload.entry.js +3 -19
- package/dist/esm/br-wizard-panel.entry.js +1 -1
- package/dist/esm/br-wizard.entry.js +1 -1
- package/dist/esm/{datetime-picker-constants-BtRPYRvA.js → datetime-picker-constants-DDc4sADe.js} +20 -6
- package/dist/esm/{event-CfuJQ1DY.js → event-6Da1SZ3J.js} +1 -1
- package/dist/esm/format-bytes-B7bNfmgh.js +22 -0
- package/dist/esm/index-ConyRdJe.js +14 -14
- package/dist/esm/{index-BQPOWxe5.js → index-CytVKoHT.js} +13 -13
- package/dist/esm/index.js +2 -2
- package/dist/esm/{datetime-picker-props-validation-BeTcUTnE.js → isValid-Bee0Uvqc.js} +2 -477
- package/dist/esm/loader.js +1 -1
- package/dist/esm/select.utils-BYsh2ZdE.js +57 -0
- package/dist/esm/webcomponents.js +1 -1
- package/dist/hydrate/index.js +2979 -1673
- package/dist/hydrate/index.mjs +2979 -1673
- package/dist/types/components/datetime-picker/date-picker/date-picker-locale.d.ts +9 -9
- package/dist/types/components/datetime-picker/date-picker/date-picker-props-validation.d.ts +14 -13
- package/dist/types/components/datetime-picker/date-picker/date-picker.d.ts +264 -161
- package/dist/types/components/datetime-picker/datetime-input/datetime-input-constants.d.ts +14 -0
- package/dist/types/components/datetime-picker/datetime-input/datetime-input-props-validation.d.ts +19 -15
- package/dist/types/components/datetime-picker/datetime-input/datetime-input.d.ts +229 -98
- package/dist/types/components/datetime-picker/datetime-input/datetime-input.types.d.ts +36 -0
- package/dist/types/components/datetime-picker/datetime-picker-constants.d.ts +19 -5
- package/dist/types/components/datetime-picker/datetime-picker-form-associated.d.ts +32 -5
- package/dist/types/components/datetime-picker/datetime-picker-props-validation.d.ts +22 -24
- package/dist/types/components/datetime-picker/datetime-picker.d.ts +508 -235
- package/dist/types/components/datetime-picker/datetime-picker.types.d.ts +75 -21
- package/dist/types/components/datetime-picker/datetime-picker.utils.d.ts +53 -47
- package/dist/types/components/datetime-picker/time-picker/time-picker-constants.d.ts +3 -2
- package/dist/types/components/datetime-picker/time-picker/time-picker.d.ts +126 -55
- package/dist/types/components/input/input.d.ts +9 -1
- package/dist/types/components/input/input.types.d.ts +4 -0
- package/dist/types/components/select/select-input/select-input.d.ts +9 -2
- package/dist/types/components/select/select-list/select-list.d.ts +14 -2
- package/dist/types/components/select/select-option/select-option.d.ts +1 -0
- package/dist/types/components/select/select.d.ts +47 -7
- package/dist/types/components/select/select.types.d.ts +12 -0
- package/dist/types/components/select/select.utils.d.ts +3 -0
- package/dist/types/components.d.ts +387 -300
- package/dist/webcomponents/index.esm.js +1 -1
- package/dist/webcomponents/p-01801ac1.entry.js +5 -0
- package/dist/webcomponents/p-05b459f2.entry.js +5 -0
- package/dist/webcomponents/p-08ac6f09.entry.js +5 -0
- package/dist/webcomponents/p-09c79c1d.entry.js +5 -0
- package/dist/webcomponents/p-0fc112fc.entry.js +5 -0
- package/dist/webcomponents/p-13babfc4.entry.js +5 -0
- package/dist/webcomponents/p-15022ab7.entry.js +5 -0
- package/dist/webcomponents/p-172d42c2.entry.js +5 -0
- package/dist/webcomponents/p-18cf093a.entry.js +5 -0
- package/dist/webcomponents/p-198aa844.entry.js +5 -0
- package/dist/webcomponents/p-1ba60d13.entry.js +5 -0
- package/dist/webcomponents/p-1bb96641.entry.js +5 -0
- package/dist/webcomponents/{p-82759002.entry.js → p-20477061.entry.js} +1 -1
- package/dist/webcomponents/p-21feda62.entry.js +5 -0
- package/dist/webcomponents/p-23a5cfd7.entry.js +5 -0
- package/dist/webcomponents/{p-0b0cf355.entry.js → p-2c8595d3.entry.js} +1 -1
- package/dist/webcomponents/{p-76d51654.entry.js → p-31a4694a.entry.js} +1 -1
- package/dist/webcomponents/p-32ea6342.entry.js +5 -0
- package/dist/webcomponents/p-3658adcf.entry.js +5 -0
- package/dist/webcomponents/p-37914e63.entry.js +5 -0
- package/dist/webcomponents/p-3b0dd0ff.entry.js +5 -0
- package/dist/webcomponents/p-42b60169.entry.js +5 -0
- package/dist/webcomponents/p-42c9c6c5.entry.js +5 -0
- package/dist/{components/p-DOJ1vYOl.js → webcomponents/p-473561f2.entry.js} +1 -1
- package/dist/webcomponents/p-47c490ef.entry.js +5 -0
- package/dist/webcomponents/p-4b01c60f.entry.js +5 -0
- package/dist/webcomponents/p-5a5ed7d8.entry.js +5 -0
- package/dist/webcomponents/p-609cf652.entry.js +5 -0
- package/dist/webcomponents/p-614683d9.entry.js +5 -0
- package/dist/webcomponents/p-67605757.entry.js +5 -0
- package/dist/webcomponents/p-67774920.entry.js +5 -0
- package/dist/webcomponents/p-67d62559.entry.js +5 -0
- package/dist/webcomponents/{p-4118b878.entry.js → p-695dbeb0.entry.js} +1 -1
- package/dist/webcomponents/{p-CfuJQ1DY.js → p-6Da1SZ3J.js} +1 -1
- package/dist/webcomponents/p-6a293be8.entry.js +5 -0
- package/dist/webcomponents/{p-d5d2205c.entry.js → p-6f1a4fbe.entry.js} +1 -1
- package/dist/webcomponents/p-7352d459.entry.js +5 -0
- package/dist/webcomponents/p-745213f7.entry.js +5 -0
- package/dist/webcomponents/p-794b701b.entry.js +5 -0
- package/dist/webcomponents/p-7ee564a1.entry.js +5 -0
- package/dist/webcomponents/{p-6850e98e.entry.js → p-7fda8b89.entry.js} +1 -1
- package/dist/webcomponents/p-8116ee93.entry.js +5 -0
- package/dist/webcomponents/p-821341dc.entry.js +5 -0
- package/dist/webcomponents/p-8aa6f07c.entry.js +5 -0
- package/dist/webcomponents/p-8ddf3ce3.entry.js +5 -0
- package/dist/webcomponents/p-95f3c44a.entry.js +5 -0
- package/dist/webcomponents/p-96dbb585.entry.js +5 -0
- package/dist/webcomponents/p-9815ab95.entry.js +5 -0
- package/dist/webcomponents/{p-b02a7218.entry.js → p-9e0324a7.entry.js} +1 -1
- package/dist/webcomponents/p-B7bNfmgh.js +5 -0
- package/dist/webcomponents/p-BYsh2ZdE.js +5 -0
- package/dist/webcomponents/p-CJipT0in.js +5 -0
- package/dist/webcomponents/{p-BtRPYRvA.js → p-DDc4sADe.js} +1 -1
- package/dist/webcomponents/p-a038be16.entry.js +5 -0
- package/dist/webcomponents/p-a32d17cb.entry.js +5 -0
- package/dist/webcomponents/p-a46f068e.entry.js +5 -0
- package/dist/webcomponents/p-a89b684d.entry.js +5 -0
- package/dist/webcomponents/{p-0d2ca2f7.entry.js → p-ac68355e.entry.js} +1 -1
- package/dist/webcomponents/{p-61977114.entry.js → p-af888d13.entry.js} +1 -1
- package/dist/webcomponents/p-b0124459.entry.js +5 -0
- package/dist/webcomponents/p-b063c12f.entry.js +5 -0
- package/dist/webcomponents/p-b07bfdc5.entry.js +5 -0
- package/dist/webcomponents/{p-c1dafd8d.entry.js → p-b5d25332.entry.js} +1 -1
- package/dist/webcomponents/p-b609b464.entry.js +5 -0
- package/dist/webcomponents/p-b66ab52d.entry.js +5 -0
- package/dist/webcomponents/p-b8d4ace3.entry.js +5 -0
- package/dist/webcomponents/p-c717c745.entry.js +5 -0
- package/dist/webcomponents/p-d08b6266.entry.js +5 -0
- package/dist/webcomponents/p-d6165aa0.entry.js +5 -0
- package/dist/webcomponents/{p-14ff5865.entry.js → p-dacb7e2c.entry.js} +1 -1
- package/dist/webcomponents/p-db309a11.entry.js +5 -0
- package/dist/webcomponents/{p-19a38e20.entry.js → p-dc23cb2e.entry.js} +1 -1
- package/dist/webcomponents/p-e241caf3.entry.js +5 -0
- package/dist/webcomponents/p-e661c024.entry.js +5 -0
- package/dist/webcomponents/p-e7107869.entry.js +5 -0
- package/dist/webcomponents/p-eb94199d.entry.js +5 -0
- package/dist/webcomponents/{p-e07e309d.entry.js → p-f8993ae4.entry.js} +1 -1
- package/dist/webcomponents/{p-513ee754.entry.js → p-f99d8c9c.entry.js} +1 -1
- package/dist/webcomponents/{p-DV-iW9Aj.js → p-fOJu6uZR.js} +1 -1
- package/dist/webcomponents/{p-b16590fc.entry.js → p-fb76b1e0.entry.js} +1 -1
- package/dist/webcomponents/p-fdcb54a3.entry.js +5 -0
- package/dist/webcomponents/{p-94848046.entry.js → p-fed02286.entry.js} +1 -1
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +2 -2
- package/dist/components/p-0qmYp77w.js +0 -5
- package/dist/components/p-5c3rNBXh.js +0 -5
- package/dist/components/p-B8oIvH3q.js +0 -5
- package/dist/components/p-BECz8XWJ.js +0 -5
- package/dist/components/p-BM4Ys6hX.js +0 -5
- package/dist/components/p-BXWh9s7p.js +0 -5
- package/dist/components/p-BblZlUp2.js +0 -5
- package/dist/components/p-Bezou5CQ.js +0 -5
- package/dist/components/p-BjeUETWJ.js +0 -5
- package/dist/components/p-Cd6udSDt.js +0 -5
- package/dist/components/p-Ci0_RqAE.js +0 -5
- package/dist/components/p-CuBgClZm.js +0 -5
- package/dist/components/p-D0QYZSoP.js +0 -5
- package/dist/components/p-D4SWpW6-.js +0 -5
- package/dist/components/p-D579DS7x.js +0 -5
- package/dist/components/p-D8K7rhHd.js +0 -5
- package/dist/components/p-D9nXlCuS.js +0 -5
- package/dist/components/p-DKFO6Q_g.js +0 -5
- package/dist/components/p-DNJSSCNi.js +0 -5
- package/dist/components/p-DYI30IZL.js +0 -5
- package/dist/components/p-DcVldfL0.js +0 -5
- package/dist/components/p-DhvmHPp4.js +0 -5
- package/dist/components/p-DwgiHL0b.js +0 -5
- package/dist/components/p-WxDB6Dk4.js +0 -5
- package/dist/components/p-ZLoeVagg.js +0 -5
- package/dist/components/p-gbYJ9sfc.js +0 -5
- package/dist/components/p-uc8ABlC_.js +0 -5
- package/dist/components/p-v60ypfxD.js +0 -5
- package/dist/webcomponents/p-078bd760.entry.js +0 -5
- package/dist/webcomponents/p-07c2cdff.entry.js +0 -5
- package/dist/webcomponents/p-0d79ca44.entry.js +0 -5
- package/dist/webcomponents/p-0fe3c47b.entry.js +0 -5
- package/dist/webcomponents/p-116b53c9.entry.js +0 -5
- package/dist/webcomponents/p-1240dae7.entry.js +0 -5
- package/dist/webcomponents/p-15743a02.entry.js +0 -5
- package/dist/webcomponents/p-16cebf49.entry.js +0 -5
- package/dist/webcomponents/p-1884b9d3.entry.js +0 -5
- package/dist/webcomponents/p-1d36c8fa.entry.js +0 -5
- package/dist/webcomponents/p-1fa4b5b2.entry.js +0 -5
- package/dist/webcomponents/p-212c069b.entry.js +0 -5
- package/dist/webcomponents/p-23f37cd6.entry.js +0 -5
- package/dist/webcomponents/p-24502b63.entry.js +0 -5
- package/dist/webcomponents/p-27fb81f3.entry.js +0 -5
- package/dist/webcomponents/p-28844490.entry.js +0 -5
- package/dist/webcomponents/p-2b41bdcc.entry.js +0 -5
- package/dist/webcomponents/p-2cb1e09b.entry.js +0 -5
- package/dist/webcomponents/p-2fcda70b.entry.js +0 -5
- package/dist/webcomponents/p-3378300c.entry.js +0 -5
- package/dist/webcomponents/p-3ae9cf69.entry.js +0 -5
- package/dist/webcomponents/p-3b79cd49.entry.js +0 -5
- package/dist/webcomponents/p-3c1513ec.entry.js +0 -5
- package/dist/webcomponents/p-4534a3c3.entry.js +0 -5
- package/dist/webcomponents/p-48abf568.entry.js +0 -5
- package/dist/webcomponents/p-4e5ea05c.entry.js +0 -5
- package/dist/webcomponents/p-521a1076.entry.js +0 -5
- package/dist/webcomponents/p-59fc52c0.entry.js +0 -5
- package/dist/webcomponents/p-5a9f4ea2.entry.js +0 -5
- package/dist/webcomponents/p-71853dfc.entry.js +0 -5
- package/dist/webcomponents/p-77e242f3.entry.js +0 -5
- package/dist/webcomponents/p-7b849472.entry.js +0 -5
- package/dist/webcomponents/p-7dbfb875.entry.js +0 -5
- package/dist/webcomponents/p-7fa7f052.entry.js +0 -5
- package/dist/webcomponents/p-81c65747.entry.js +0 -5
- package/dist/webcomponents/p-91a5329f.entry.js +0 -5
- package/dist/webcomponents/p-966773a9.entry.js +0 -5
- package/dist/webcomponents/p-9abb5a53.entry.js +0 -5
- package/dist/webcomponents/p-9bf2e325.entry.js +0 -5
- package/dist/webcomponents/p-9c943b40.entry.js +0 -5
- package/dist/webcomponents/p-9ec3ca00.entry.js +0 -5
- package/dist/webcomponents/p-B0PbhaxL.js +0 -5
- package/dist/webcomponents/p-ad91f149.entry.js +0 -5
- package/dist/webcomponents/p-aeea1f17.entry.js +0 -5
- package/dist/webcomponents/p-c2ca0289.entry.js +0 -5
- package/dist/webcomponents/p-c8af334e.entry.js +0 -5
- package/dist/webcomponents/p-cac49c6a.entry.js +0 -5
- package/dist/webcomponents/p-cb9ebfbe.entry.js +0 -5
- package/dist/webcomponents/p-d11f95a0.entry.js +0 -5
- package/dist/webcomponents/p-dad03b49.entry.js +0 -5
- package/dist/webcomponents/p-db8e6322.entry.js +0 -5
- package/dist/webcomponents/p-dea8015f.entry.js +0 -5
- package/dist/webcomponents/p-e53d874b.entry.js +0 -5
- package/dist/webcomponents/p-e5540387.entry.js +0 -5
- package/dist/webcomponents/p-e94a52ac.entry.js +0 -5
- package/dist/webcomponents/p-e9be4d3f.entry.js +0 -5
- package/dist/webcomponents/p-e9db9381.entry.js +0 -5
- package/dist/webcomponents/p-edca5de1.entry.js +0 -5
- package/dist/webcomponents/p-ee5b9fc9.entry.js +0 -5
- package/dist/webcomponents/p-f4ef8c63.entry.js +0 -5
|
@@ -16,35 +16,30 @@ import { isSameDay } from "date-fns/isSameDay";
|
|
|
16
16
|
import { isSameMonth } from "date-fns/isSameMonth";
|
|
17
17
|
import { parse } from "date-fns/parse";
|
|
18
18
|
import { set } from "date-fns/set";
|
|
19
|
+
import { startOfDay } from "date-fns/startOfDay";
|
|
19
20
|
import { startOfMonth } from "date-fns/startOfMonth";
|
|
20
21
|
import { startOfWeek } from "date-fns/startOfWeek";
|
|
21
22
|
import { subMonths } from "date-fns/subMonths";
|
|
22
23
|
import { toDate } from "date-fns/toDate";
|
|
23
24
|
import { dispatchNativeFormEvent } from "../../../shared/utils/event";
|
|
24
|
-
import { reportInvalidPropValue } from "../../../shared/utils/prop-warning";
|
|
25
|
-
import { resolveAllowedPropValue } from "../../../shared/utils/props";
|
|
26
25
|
import { resolveSsrLocalDate } from "../../../shared/utils/ssr-date";
|
|
27
26
|
import { DATETIME_PICKER_LOCALE, NAVIGATION_ACTION } from "../datetime-picker-constants";
|
|
28
|
-
import { isValidDatetimePickerDateRange, normalizeDatetimePickerDisabledDates, } from "../datetime-picker-props-validation";
|
|
29
27
|
import { getMonthLabels, getWeekdayLabels, resolveDateFnsLocale } from "./date-picker-locale";
|
|
30
28
|
import { normalizeLocale, normalizeWeekStartsOn } from "./date-picker-props-validation";
|
|
31
29
|
/**
|
|
32
|
-
*
|
|
30
|
+
* O `br-date-picker` é o subcomponente de calendário do `br-datetime-picker`, responsável pela seleção visual de uma data ou de um intervalo.
|
|
33
31
|
*
|
|
34
32
|
* ### Papel na composição
|
|
35
33
|
*
|
|
36
|
-
*
|
|
37
|
-
* - Implementa navegação acessível por teclado WAI-ARIA Grid (setas direcionais para dias e semanas).
|
|
34
|
+
* Exibe a grade mensal, a navegação entre meses e anos e os estados de seleção e bloqueio dos dias. `referenceDate` determina o período exibido, enquanto `value` e os limites do intervalo representam a seleção.
|
|
38
35
|
*
|
|
39
36
|
* ### Regra de uso e relacionamento
|
|
40
37
|
*
|
|
41
|
-
*
|
|
38
|
+
* O `br-datetime-picker` instancia e configura este calendário internamente nos modos `date` e `datetime`, recebendo suas alterações pelo evento `dateStateChange`. Não declare o calendário em um slot do pai.
|
|
42
39
|
*
|
|
43
|
-
*
|
|
40
|
+
* Use diretamente quando precisar de um calendário embutido e permanentemente visível. Nesse caso, a aplicação deve coordenar valores e eventos e implementar a integração com formulários e a validação do fluxo completo. O calendário isolado não fornece o campo textual, o seletor de horários nem a associação ao formulário do orquestrador.
|
|
44
41
|
*
|
|
45
|
-
|
|
46
|
-
* @category Formulários, Seleção
|
|
47
|
-
* @status stable
|
|
42
|
+
* Para a documentação completa de design, incluindo diretrizes de uso, acessibilidade e exemplos visuais, consulte o [Design System do GovBR](https://www.gov.br/ds/components/date-picker?tab=designer).
|
|
48
43
|
*
|
|
49
44
|
* @part container - Parte para o container base do calendário.
|
|
50
45
|
* @part header - Cabeçalho do calendário (contendo navegação e seleção de mês/ano).
|
|
@@ -58,73 +53,73 @@ import { normalizeLocale, normalizeWeekStartsOn } from "./date-picker-props-vali
|
|
|
58
53
|
*/
|
|
59
54
|
export class DatePicker {
|
|
60
55
|
constructor() {
|
|
61
|
-
/**
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
/** Define o índice do dia em que a semana começa na interface do calendário. */
|
|
56
|
+
/**
|
|
57
|
+
* Índice do dia em que a semana começa na interface do calendário.
|
|
58
|
+
* @default 0
|
|
59
|
+
*/
|
|
66
60
|
this.weekStartsOn = 0;
|
|
67
61
|
/**
|
|
68
|
-
* Data usada como base visual para o mês atualmente exibido
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
* @example
|
|
72
|
-
* ```js
|
|
73
|
-
* const calendar = document.querySelector('br-date-picker');
|
|
74
|
-
* calendar.referenceDate = new Date(2026, 8, 1);
|
|
75
|
-
* ```
|
|
62
|
+
* Data usada como base visual para o mês atualmente exibido.
|
|
63
|
+
* @default new Date()
|
|
76
64
|
*/
|
|
77
65
|
this.referenceDate = new Date();
|
|
78
66
|
/**
|
|
79
|
-
* Data
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
* @example
|
|
83
|
-
* ```js
|
|
84
|
-
* const calendar = document.querySelector('br-date-picker');
|
|
85
|
-
* calendar.value = new Date(2026, 8, 7);
|
|
86
|
-
* ```
|
|
67
|
+
* Data atualmente selecionada pelo usuário, ou `null` quando não há seleção.
|
|
68
|
+
* @default null
|
|
87
69
|
*/
|
|
88
70
|
this.value = null;
|
|
89
|
-
/**
|
|
71
|
+
/**
|
|
72
|
+
* Define se a seleção ocorre por data única ou por intervalo.
|
|
73
|
+
* @default 'single'
|
|
74
|
+
*/
|
|
90
75
|
this.selectionMode = 'single';
|
|
91
|
-
/**
|
|
76
|
+
/**
|
|
77
|
+
* Data inicial selecionada quando o calendário opera no modo de intervalo.
|
|
78
|
+
* @default null
|
|
79
|
+
*/
|
|
92
80
|
this.rangeStart = null;
|
|
93
|
-
/**
|
|
81
|
+
/**
|
|
82
|
+
* Data final selecionada quando o calendário opera no modo de intervalo.
|
|
83
|
+
* @default null
|
|
84
|
+
*/
|
|
94
85
|
this.rangeEnd = null;
|
|
95
|
-
/**
|
|
86
|
+
/**
|
|
87
|
+
* Desabilita a interação do calendário quando `true`.
|
|
88
|
+
* @default false
|
|
89
|
+
*/
|
|
96
90
|
this.disabled = false;
|
|
97
91
|
/**
|
|
98
92
|
* Lista de datas indisponíveis para seleção no calendário.
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
* @example
|
|
102
|
-
* ```js
|
|
103
|
-
* const calendar = document.querySelector('br-date-picker');
|
|
104
|
-
* calendar.disabledDates = [new Date(2026, 8, 7), new Date(2026, 8, 8)];
|
|
105
|
-
* ```
|
|
93
|
+
* @default []
|
|
106
94
|
*/
|
|
107
95
|
this.disabledDates = [];
|
|
108
|
-
/**
|
|
96
|
+
/**
|
|
97
|
+
* Locale usado para gerar nomes de meses e dias da semana.
|
|
98
|
+
* @default DATETIME_PICKER_LOCALE.DEFAULT
|
|
99
|
+
*/
|
|
109
100
|
this.locale = DATETIME_PICKER_LOCALE.DEFAULT;
|
|
110
101
|
/**
|
|
111
|
-
*
|
|
112
|
-
* ou variar conforme o mês.
|
|
113
|
-
*
|
|
114
|
-
* Quando `true`, o calendário sempre exibe 6 semanas completas.
|
|
115
|
-
* Quando `false`, o calendário adapta-se ao mês, exibindo apenas as semanas necessárias.
|
|
116
|
-
*
|
|
102
|
+
* Se `true`, o calendário sempre exibe 6 semanas (42 dias); caso contrário, adapta-se ao mês.
|
|
117
103
|
* @default false
|
|
118
104
|
*/
|
|
119
105
|
this.fixedRowCount = false;
|
|
120
|
-
/**
|
|
106
|
+
/**
|
|
107
|
+
* Data atualmente com foco para navegação por teclado.
|
|
108
|
+
* Usada para controlar qual célula do calendário recebe `tabindex=0`.
|
|
109
|
+
* @type {Date}
|
|
110
|
+
* @default new Date()
|
|
111
|
+
* @internal
|
|
112
|
+
*/
|
|
113
|
+
this.focusedDate = new Date();
|
|
114
|
+
/**
|
|
115
|
+
* Sinaliza ao `componentDidRender` que o foco deve ser movido para a célula atual.
|
|
116
|
+
* @internal
|
|
117
|
+
*/
|
|
121
118
|
this.shouldFocusDate = false;
|
|
122
|
-
/** Mantém handlers estáveis por data para evitar recriação a cada renderização. */
|
|
123
|
-
this.dayClickHandlers = new WeakMap();
|
|
124
119
|
/**
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
* @
|
|
120
|
+
* Handler de mudança do seletor de mês.
|
|
121
|
+
* @param event - evento de mudança do `<select>`
|
|
122
|
+
* @internal
|
|
128
123
|
*/
|
|
129
124
|
this.handleMonthChange = (event) => {
|
|
130
125
|
if (this.disabled) {
|
|
@@ -140,12 +135,18 @@ export class DatePicker {
|
|
|
140
135
|
this.emitDateStateChange(date);
|
|
141
136
|
};
|
|
142
137
|
/**
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
* @
|
|
138
|
+
* Trata cliques nos botões de navegação do calendário.
|
|
139
|
+
* @param event - evento de clique
|
|
140
|
+
* @internal
|
|
146
141
|
*/
|
|
147
142
|
this.handleNavigationClick = (event) => {
|
|
148
|
-
|
|
143
|
+
if (this.disabled) {
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
const actionFromPath = event
|
|
147
|
+
.composedPath()
|
|
148
|
+
.find((target) => target instanceof HTMLElement && target.dataset.action !== undefined);
|
|
149
|
+
const action = (actionFromPath?.dataset.action ?? event.currentTarget?.dataset.action);
|
|
149
150
|
if (action === undefined) {
|
|
150
151
|
console.warn('Botão de navegação clicado sem data-action definido');
|
|
151
152
|
return;
|
|
@@ -162,9 +163,10 @@ export class DatePicker {
|
|
|
162
163
|
}
|
|
163
164
|
};
|
|
164
165
|
/**
|
|
165
|
-
*
|
|
166
|
-
*
|
|
167
|
-
* @param event -
|
|
166
|
+
* Handler de alteração do campo ano.
|
|
167
|
+
* Valida o ano antes de aplicar a mudança.
|
|
168
|
+
* @param event - evento de mudança do input de ano
|
|
169
|
+
* @internal
|
|
168
170
|
*/
|
|
169
171
|
this.handleYearChange = (event) => {
|
|
170
172
|
if (this.disabled) {
|
|
@@ -177,22 +179,35 @@ export class DatePicker {
|
|
|
177
179
|
return;
|
|
178
180
|
}
|
|
179
181
|
const date = set(this.baseDate, { year, month: this.baseDate.getMonth(), date: 1 });
|
|
180
|
-
const range = this.
|
|
182
|
+
const range = this.selectionMode === 'range' && this.rangeStart !== null && this.rangeEnd !== null
|
|
181
183
|
? { start: this.rangeStart, end: this.rangeEnd }
|
|
182
184
|
: undefined;
|
|
183
185
|
this.emitDateStateChange(date, this.value, range);
|
|
184
186
|
};
|
|
185
187
|
/**
|
|
186
|
-
*
|
|
187
|
-
*
|
|
188
|
-
*
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
188
|
+
* Trata cliques com um handler compartilhado, lendo a data local da célula.
|
|
189
|
+
* @param event - evento de clique da célula
|
|
190
|
+
* @internal
|
|
191
|
+
*/
|
|
192
|
+
this.handleDayCellClick = (event) => {
|
|
193
|
+
const cell = event.currentTarget;
|
|
194
|
+
if (!(cell instanceof HTMLElement) || cell.dataset.date === undefined) {
|
|
195
|
+
console.warn('Célula de dia clicada sem data-date definido');
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
const date = parse(cell.dataset.date, 'yyyy-MM-dd', this.baseDate);
|
|
199
|
+
if (Number.isNaN(date.getTime())) {
|
|
200
|
+
console.warn(`Data inválida na célula de dia: ${cell.dataset.date}`);
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
this.handleDayClick(date);
|
|
204
|
+
};
|
|
205
|
+
/**
|
|
206
|
+
* Gerencia navegação por teclado dentro da grade de dias.
|
|
207
|
+
* Teclas suportadas: ArrowLeft/Right/Up/Down, PageUp/PageDown, Home/End, Enter/Space.
|
|
208
|
+
* @param event - evento de teclado
|
|
209
|
+
* @returns void
|
|
210
|
+
* @internal
|
|
196
211
|
*/
|
|
197
212
|
this.handleGridKeydown = (event) => {
|
|
198
213
|
const HANDLED_KEYS = [
|
|
@@ -209,12 +224,22 @@ export class DatePicker {
|
|
|
209
224
|
];
|
|
210
225
|
if (!HANDLED_KEYS.includes(event.key))
|
|
211
226
|
return;
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
227
|
+
// O `event.target` pode ser um nó interno (texto) ou o foco pode estar
|
|
228
|
+
// em um container; tentamos localizar a célula com `data-date`.
|
|
229
|
+
const targetEl = event.target?.closest?.('[data-date]');
|
|
230
|
+
// Se encontrarmos a célula, usamos sua data; caso contrário, usamos a
|
|
231
|
+
// data atualmente focada (`focusedDate`) como fallback. Em ambos os casos
|
|
232
|
+
// prevenimos o comportamento padrão para manter consistência.
|
|
233
|
+
let current;
|
|
234
|
+
if (targetEl && targetEl.dataset?.date !== undefined) {
|
|
235
|
+
const dateKey = targetEl.dataset.date;
|
|
236
|
+
event.preventDefault();
|
|
237
|
+
current = parse(dateKey, 'yyyy-MM-dd', new Date());
|
|
238
|
+
}
|
|
239
|
+
else {
|
|
240
|
+
event.preventDefault();
|
|
241
|
+
current = this.getNormalizedFocusedDate();
|
|
242
|
+
}
|
|
218
243
|
if (event.key === 'Enter' || event.key === ' ') {
|
|
219
244
|
if (!this.isDateDisabled(current)) {
|
|
220
245
|
this.handleDayClick(current);
|
|
@@ -253,47 +278,41 @@ export class DatePicker {
|
|
|
253
278
|
this.moveFocusTo(next);
|
|
254
279
|
};
|
|
255
280
|
}
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
281
|
+
/**
|
|
282
|
+
* Observador para a prop `rangeValue` — sincroniza `rangeStart` e `rangeEnd`.
|
|
283
|
+
* @param {DatetimePickerDateRange | undefined} newValue - novo intervalo controlado recebido (`undefined` quando não fornecido)
|
|
284
|
+
* @internal
|
|
285
|
+
*/
|
|
259
286
|
handleRangeValueChange(newValue) {
|
|
260
287
|
if (!newValue)
|
|
261
288
|
return;
|
|
262
|
-
if (!isValidDatetimePickerDateRange(newValue)) {
|
|
263
|
-
reportInvalidPropValue(this.el, 'rangeValue', newValue, 'Informe um objeto com `start` e `end` como Date válido ou null.', 'Ignorando o intervalo inválido e mantendo o último intervalo efetivo.');
|
|
264
|
-
return;
|
|
265
|
-
}
|
|
266
289
|
this.rangeStart = newValue.start;
|
|
267
290
|
this.rangeEnd = newValue.end;
|
|
268
291
|
}
|
|
269
292
|
/**
|
|
270
293
|
* Sincroniza `focusedDate` quando o valor selecionado muda externamente.
|
|
271
294
|
*
|
|
272
|
-
* @param newValue - Novo valor recebido via prop.
|
|
295
|
+
* @param {Date | null} newValue - Novo valor recebido via prop.
|
|
296
|
+
*/
|
|
297
|
+
/**
|
|
298
|
+
* Observador para a prop `value` — atualiza `focusedDate` quando a seleção externa muda.
|
|
299
|
+
* @param {Date | null} newValue - novo valor de seleção (ou `null`)
|
|
300
|
+
* @internal
|
|
273
301
|
*/
|
|
274
302
|
handleValueChange(newValue) {
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
if ((normalizedValue?.getTime() ?? null) !== receivedTime) {
|
|
278
|
-
this.value = normalizedValue;
|
|
279
|
-
return;
|
|
280
|
-
}
|
|
281
|
-
this.focusedDate = toDate(normalizedValue ?? this.referenceDate);
|
|
282
|
-
}
|
|
283
|
-
handleReferenceDateChange(newValue) {
|
|
284
|
-
const normalizedReferenceDate = this.normalizeDateProp(newValue, 'referenceDate', new Date());
|
|
285
|
-
const receivedTime = newValue instanceof Date && !Number.isNaN(newValue.getTime()) ? newValue.getTime() : null;
|
|
286
|
-
if (normalizedReferenceDate.getTime() !== receivedTime) {
|
|
287
|
-
this.referenceDate = normalizedReferenceDate;
|
|
288
|
-
return;
|
|
303
|
+
if (newValue !== null) {
|
|
304
|
+
this.focusedDate = toDate(newValue);
|
|
289
305
|
}
|
|
290
|
-
if (this.value === null)
|
|
291
|
-
this.focusedDate = toDate(normalizedReferenceDate);
|
|
292
306
|
}
|
|
293
307
|
/**
|
|
294
308
|
* Revalida a configuração quando o início da semana muda.
|
|
295
309
|
*
|
|
296
|
-
* @param newValue - Novo valor recebido via prop.
|
|
310
|
+
* @param {number} newValue - Novo valor recebido via prop.
|
|
311
|
+
*/
|
|
312
|
+
/**
|
|
313
|
+
* Observador para `weekStartsOn` — revalida a configuração quando alterada externamente.
|
|
314
|
+
* @param {number} newValue - novo índice do início da semana
|
|
315
|
+
* @internal
|
|
297
316
|
*/
|
|
298
317
|
handleWeekStartsOnChange(newValue) {
|
|
299
318
|
this.ensureValidWeekStartsOn(newValue);
|
|
@@ -301,29 +320,22 @@ export class DatePicker {
|
|
|
301
320
|
/**
|
|
302
321
|
* Revalida o locale quando a prop muda.
|
|
303
322
|
*
|
|
304
|
-
* @param newValue - Novo valor recebido via prop.
|
|
323
|
+
* @param {string} newValue - Novo valor recebido via prop.
|
|
324
|
+
*/
|
|
325
|
+
/**
|
|
326
|
+
* Observador para `locale` — revalida/normaliza o locale informado.
|
|
327
|
+
* @param {string} newValue - nova string de locale
|
|
328
|
+
* @internal
|
|
305
329
|
*/
|
|
306
330
|
handleLocaleChange(newValue) {
|
|
307
331
|
this.ensureValidLocale(newValue);
|
|
308
332
|
}
|
|
309
|
-
handleDisabledDatesChange(newValue) {
|
|
310
|
-
this.normalizedDisabledDates = normalizeDatetimePickerDisabledDates(newValue, 'br-date-picker');
|
|
311
|
-
}
|
|
312
|
-
/**
|
|
313
|
-
* Normaliza os valores públicos antes da primeira renderização.
|
|
314
|
-
*/
|
|
315
333
|
componentWillLoad() {
|
|
316
|
-
this.referenceDate = this.normalizeDateProp(this.referenceDate, 'referenceDate', new Date());
|
|
317
|
-
this.value = this.normalizeDateProp(this.value, 'value', null);
|
|
318
334
|
this.referenceDate = resolveSsrLocalDate(this.el, this.referenceDate);
|
|
319
335
|
this.ensureValidWeekStartsOn();
|
|
320
336
|
this.ensureValidLocale();
|
|
321
|
-
this.handleDisabledDatesChange(this.disabledDates);
|
|
322
337
|
this.focusedDate = toDate(this.value ?? this.referenceDate);
|
|
323
338
|
}
|
|
324
|
-
/**
|
|
325
|
-
* Move o foco para a célula correspondente ao `focusedDate` após re-renderização.
|
|
326
|
-
*/
|
|
327
339
|
componentDidRender() {
|
|
328
340
|
if (!this.shouldFocusDate)
|
|
329
341
|
return;
|
|
@@ -334,9 +346,9 @@ export class DatePicker {
|
|
|
334
346
|
cell?.focus();
|
|
335
347
|
}
|
|
336
348
|
/**
|
|
337
|
-
*
|
|
338
|
-
*
|
|
349
|
+
* Valida e normaliza `weekStartsOn`.
|
|
339
350
|
* @param value - Valor bruto informado pelo consumidor.
|
|
351
|
+
* @internal
|
|
340
352
|
*/
|
|
341
353
|
ensureValidWeekStartsOn(value = this.weekStartsOn) {
|
|
342
354
|
const normalizedWeekStartsOn = normalizeWeekStartsOn(value);
|
|
@@ -344,18 +356,10 @@ export class DatePicker {
|
|
|
344
356
|
this.weekStartsOn = normalizedWeekStartsOn;
|
|
345
357
|
}
|
|
346
358
|
}
|
|
347
|
-
normalizeDateProp(value, propertyName, fallback) {
|
|
348
|
-
if (value === null && fallback === null)
|
|
349
|
-
return null;
|
|
350
|
-
if (value instanceof Date && !Number.isNaN(value.getTime()))
|
|
351
|
-
return toDate(value);
|
|
352
|
-
reportInvalidPropValue(this.el, propertyName, value, 'Informe uma instância de Date válida.', `Aplicando fallback ${fallback === null ? 'null' : 'new Date()'}.`);
|
|
353
|
-
return fallback === null ? null : toDate(fallback);
|
|
354
|
-
}
|
|
355
359
|
/**
|
|
356
|
-
*
|
|
357
|
-
*
|
|
360
|
+
* Valida e normaliza o `locale` informado.
|
|
358
361
|
* @param value - Valor bruto informado pelo consumidor.
|
|
362
|
+
* @internal
|
|
359
363
|
*/
|
|
360
364
|
ensureValidLocale(value = this.locale) {
|
|
361
365
|
const normalizedLocale = normalizeLocale(value);
|
|
@@ -364,16 +368,20 @@ export class DatePicker {
|
|
|
364
368
|
}
|
|
365
369
|
}
|
|
366
370
|
/**
|
|
367
|
-
* Emite
|
|
371
|
+
* Emite `dateStateChange` atualizando `referenceDate`, `value` e `range`.
|
|
372
|
+
* Zera segundos/milissegundos para consistência.
|
|
368
373
|
*
|
|
369
|
-
* @param nextReferenceDate -
|
|
370
|
-
* @param nextValue -
|
|
374
|
+
* @param nextReferenceDate - nova data de referência
|
|
375
|
+
* @param nextValue - data selecionada ou `null` (por padrão, mantém `this.value`)
|
|
376
|
+
* @param nextRange - intervalo de datas quando aplicável
|
|
377
|
+
* @internal
|
|
371
378
|
*/
|
|
372
379
|
emitDateStateChange(nextReferenceDate, nextValue = this.value, nextRange = undefined) {
|
|
373
380
|
// Garantir segundos zerados (componente não manipula segundos)
|
|
374
381
|
const normalizedReference = set(nextReferenceDate, { seconds: 0, milliseconds: 0 });
|
|
375
382
|
const normalizedValue = nextValue === null ? null : set(nextValue, { seconds: 0, milliseconds: 0 });
|
|
376
383
|
const valueChanged = this.value?.getTime() !== normalizedValue?.getTime();
|
|
384
|
+
this.referenceDate = normalizedReference;
|
|
377
385
|
this.value = normalizedValue;
|
|
378
386
|
this.dateStateChange.emit({
|
|
379
387
|
referenceDate: normalizedReference,
|
|
@@ -388,10 +396,10 @@ export class DatePicker {
|
|
|
388
396
|
}
|
|
389
397
|
}
|
|
390
398
|
/**
|
|
391
|
-
* Resolve o ícone
|
|
392
|
-
*
|
|
393
|
-
* @
|
|
394
|
-
* @
|
|
399
|
+
* Resolve o nome do ícone para a ação de navegação.
|
|
400
|
+
* @param action - Ação de navegação
|
|
401
|
+
* @returns Nome do ícone
|
|
402
|
+
* @internal
|
|
395
403
|
*/
|
|
396
404
|
getIconForAction(action) {
|
|
397
405
|
switch (action) {
|
|
@@ -404,9 +412,9 @@ export class DatePicker {
|
|
|
404
412
|
}
|
|
405
413
|
}
|
|
406
414
|
/**
|
|
407
|
-
*
|
|
408
|
-
*
|
|
409
|
-
* @
|
|
415
|
+
* Trata o clique numa célula de dia: aplica seleção ou atualiza intervalo.
|
|
416
|
+
* @param date - dia clicado
|
|
417
|
+
* @internal
|
|
410
418
|
*/
|
|
411
419
|
handleDayClick(date) {
|
|
412
420
|
if (this.disabled || this.isDateDisabled(date)) {
|
|
@@ -418,13 +426,17 @@ export class DatePicker {
|
|
|
418
426
|
seconds: 0,
|
|
419
427
|
milliseconds: 0,
|
|
420
428
|
});
|
|
421
|
-
if (this.
|
|
429
|
+
if (this.selectionMode === 'range') {
|
|
422
430
|
this.handleRangeDayClick(newDate);
|
|
423
431
|
return;
|
|
424
432
|
}
|
|
425
433
|
this.emitDateStateChange(newDate, newDate);
|
|
426
434
|
}
|
|
427
|
-
/**
|
|
435
|
+
/**
|
|
436
|
+
* Atualiza o intervalo selecionado no modo `range`.
|
|
437
|
+
* @param clickedDate - data clicada pelo usuário
|
|
438
|
+
* @internal
|
|
439
|
+
*/
|
|
428
440
|
handleRangeDayClick(clickedDate) {
|
|
429
441
|
const start = this.rangeStart;
|
|
430
442
|
const end = this.rangeEnd;
|
|
@@ -441,66 +453,72 @@ export class DatePicker {
|
|
|
441
453
|
end: normalizedEnd,
|
|
442
454
|
});
|
|
443
455
|
}
|
|
444
|
-
/**
|
|
456
|
+
/**
|
|
457
|
+
* Decrementa o mês exibido e preserva seleção/intervalo quando aplicável.
|
|
458
|
+
* @internal
|
|
459
|
+
*/
|
|
445
460
|
decreaseMonth() {
|
|
446
461
|
if (this.disabled) {
|
|
447
462
|
return;
|
|
448
463
|
}
|
|
449
464
|
const date = set(subMonths(this.baseDate, 1), { date: 1 });
|
|
450
|
-
const range = this.
|
|
465
|
+
const range = this.selectionMode === 'range' && this.rangeStart !== null && this.rangeEnd !== null
|
|
451
466
|
? { start: this.rangeStart, end: this.rangeEnd }
|
|
452
467
|
: undefined;
|
|
453
468
|
this.emitDateStateChange(date, this.value, range);
|
|
454
469
|
}
|
|
455
|
-
/**
|
|
470
|
+
/**
|
|
471
|
+
* Incrementa o mês exibido e preserva seleção/intervalo quando aplicável.
|
|
472
|
+
* @internal
|
|
473
|
+
*/
|
|
456
474
|
increaseMonth() {
|
|
457
475
|
if (this.disabled) {
|
|
458
476
|
return;
|
|
459
477
|
}
|
|
460
478
|
const date = set(addMonths(this.baseDate, 1), { date: 1 });
|
|
461
|
-
const range = this.
|
|
479
|
+
const range = this.selectionMode === 'range' && this.rangeStart !== null && this.rangeEnd !== null
|
|
462
480
|
? { start: this.rangeStart, end: this.rangeEnd }
|
|
463
481
|
: undefined;
|
|
464
482
|
this.emitDateStateChange(date, this.value, range);
|
|
465
483
|
}
|
|
466
|
-
/**
|
|
484
|
+
/**
|
|
485
|
+
* Verifica se uma data está indisponível para seleção.
|
|
486
|
+
* @param date - data a verificar
|
|
487
|
+
* @returns `true` se a data estiver na lista de `disabledDates`
|
|
488
|
+
* @internal
|
|
489
|
+
*/
|
|
467
490
|
isDateDisabled(date) {
|
|
468
|
-
return this.
|
|
491
|
+
return this.disabledDates.some((disabledDate) => isSameDay(disabledDate, date));
|
|
469
492
|
}
|
|
470
|
-
/**
|
|
493
|
+
/**
|
|
494
|
+
* Data base usada para todos os cálculos de calendário.
|
|
495
|
+
* @returns data de referência interna
|
|
496
|
+
* @internal
|
|
497
|
+
*/
|
|
471
498
|
get baseDate() {
|
|
472
499
|
return this.referenceDate;
|
|
473
500
|
}
|
|
474
501
|
/**
|
|
475
|
-
*
|
|
476
|
-
*
|
|
477
|
-
* @
|
|
478
|
-
* @
|
|
479
|
-
*/
|
|
480
|
-
getDayClickHandler(date) {
|
|
481
|
-
let handler = this.dayClickHandlers.get(date);
|
|
482
|
-
if (handler === undefined) {
|
|
483
|
-
handler = () => this.handleDayClick(date);
|
|
484
|
-
this.dayClickHandlers.set(date, handler);
|
|
485
|
-
}
|
|
486
|
-
return handler;
|
|
487
|
-
}
|
|
488
|
-
/** Formata o dia exibido com zero à esquerda. */
|
|
502
|
+
* Formata o dia exibido com zero à esquerda (ex: '01', '09').
|
|
503
|
+
* @param date - data a formatar
|
|
504
|
+
* @returns string com dois dígitos do dia
|
|
505
|
+
* @internal
|
|
506
|
+
*/
|
|
489
507
|
getDayWithLeadingZero(date) {
|
|
490
508
|
return format(date, 'dd');
|
|
491
509
|
}
|
|
492
510
|
/**
|
|
493
|
-
* Constrói o rótulo acessível
|
|
494
|
-
*
|
|
495
|
-
* @
|
|
496
|
-
* @
|
|
511
|
+
* Constrói o rótulo acessível da célula de dia, incluindo estado (selecionado/início/fim).
|
|
512
|
+
* @param date - dia representado pela célula
|
|
513
|
+
* @returns string para `aria-label`
|
|
514
|
+
* @internal
|
|
497
515
|
*/
|
|
498
516
|
getDayCellAriaLabel(date) {
|
|
499
517
|
const fullDate = format(date, "d 'de' MMMM 'de' yyyy", { locale: this.dateFnsLocale });
|
|
500
|
-
const isSelected = this.
|
|
501
|
-
const isRangeStart = this.
|
|
502
|
-
const isRangeEnd = this.
|
|
503
|
-
const isBetween = this.
|
|
518
|
+
const isSelected = this.selectionMode === 'single' && this.value !== null && isSameDay(date, this.value);
|
|
519
|
+
const isRangeStart = this.selectionMode === 'range' && this.rangeStart !== null && isSameDay(date, this.rangeStart);
|
|
520
|
+
const isRangeEnd = this.selectionMode === 'range' && this.rangeEnd !== null && isSameDay(date, this.rangeEnd);
|
|
521
|
+
const isBetween = this.selectionMode === 'range' &&
|
|
504
522
|
this.rangeStart !== null &&
|
|
505
523
|
this.rangeEnd !== null &&
|
|
506
524
|
this.isDateBetweenRange(date, this.rangeStart, this.rangeEnd);
|
|
@@ -514,16 +532,21 @@ export class DatePicker {
|
|
|
514
532
|
return `${fullDate}, no intervalo selecionado`;
|
|
515
533
|
return fullDate;
|
|
516
534
|
}
|
|
517
|
-
/**
|
|
535
|
+
/**
|
|
536
|
+
* Locale do `date-fns` derivado da prop pública `locale`.
|
|
537
|
+
* @internal
|
|
538
|
+
*/
|
|
518
539
|
get dateFnsLocale() {
|
|
519
540
|
return resolveDateFnsLocale(this.locale);
|
|
520
541
|
}
|
|
521
542
|
/**
|
|
522
|
-
* Calcula
|
|
523
|
-
*
|
|
524
|
-
* @param
|
|
543
|
+
* Calcula o mapa de classes CSS da célula do dia.
|
|
544
|
+
* @param date - dia da grade
|
|
545
|
+
* @param today - instante atual compartilhado pela renderização da grade
|
|
546
|
+
* @returns mapa de classes booleanas
|
|
547
|
+
* @internal
|
|
525
548
|
*/
|
|
526
|
-
getDayCssClasses(date) {
|
|
549
|
+
getDayCssClasses(date, today) {
|
|
527
550
|
const selected = this.value;
|
|
528
551
|
const rangeStart = this.rangeStart;
|
|
529
552
|
const rangeEnd = this.rangeEnd;
|
|
@@ -534,60 +557,66 @@ export class DatePicker {
|
|
|
534
557
|
return {
|
|
535
558
|
day: true,
|
|
536
559
|
'outside-month': !isSameMonth(date, this.baseDate),
|
|
537
|
-
today: isSameDay(date,
|
|
538
|
-
selected: this.
|
|
539
|
-
'range-start': this.
|
|
540
|
-
'range-end': this.
|
|
541
|
-
'in-range': this.
|
|
560
|
+
today: isSameDay(date, today),
|
|
561
|
+
selected: this.selectionMode === 'single' && selected !== null && isSameDay(date, selected),
|
|
562
|
+
'range-start': this.selectionMode === 'range' && isRangeStart,
|
|
563
|
+
'range-end': this.selectionMode === 'range' && isRangeEnd,
|
|
564
|
+
'in-range': this.selectionMode === 'range' && isBetweenRange,
|
|
542
565
|
};
|
|
543
566
|
}
|
|
544
|
-
/**
|
|
567
|
+
/**
|
|
568
|
+
* Normaliza os limites do intervalo garantindo ordem cronológica (start <= end).
|
|
569
|
+
* @param start - data de início
|
|
570
|
+
* @param end - data de fim
|
|
571
|
+
* @returns tupla [start, end] na ordem correta
|
|
572
|
+
* @internal
|
|
573
|
+
*/
|
|
545
574
|
normalizeRangeBounds(start, end) {
|
|
546
575
|
return compareAsc(start, end) <= 0 ? [start, end] : [end, start];
|
|
547
576
|
}
|
|
548
|
-
/**
|
|
577
|
+
/**
|
|
578
|
+
* Verifica se uma data está estritamente entre `start` e `end`.
|
|
579
|
+
* @param date - data a verificar
|
|
580
|
+
* @param start - início do intervalo
|
|
581
|
+
* @param end - fim do intervalo
|
|
582
|
+
* @returns `true` se `start < date < end`
|
|
583
|
+
* @internal
|
|
584
|
+
*/
|
|
549
585
|
isDateBetweenRange(date, start, end) {
|
|
550
586
|
return isAfter(date, start) && isBefore(date, end);
|
|
551
587
|
}
|
|
552
|
-
/**
|
|
553
|
-
|
|
588
|
+
/**
|
|
589
|
+
* Calcula os limites da grade do mês, respeitando `fixedRowCount`, sem gerar suas datas.
|
|
590
|
+
* @returns limites inclusivos da grade
|
|
591
|
+
* @internal
|
|
592
|
+
*/
|
|
593
|
+
getMonthViewInterval() {
|
|
554
594
|
const start = startOfWeek(startOfMonth(this.baseDate), { weekStartsOn: this.weekStartsOn });
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
const normalizedDates = eachDayOfInterval({ start, end });
|
|
560
|
-
const currentWeekCount = Math.ceil(normalizedDates.length / 7);
|
|
561
|
-
const targetWeekCount = 6;
|
|
562
|
-
// Se não houver 6 semanas, estende o final para alcançar 42 dias
|
|
563
|
-
if (currentWeekCount < targetWeekCount) {
|
|
564
|
-
const daysToAdd = (targetWeekCount - currentWeekCount) * 7;
|
|
565
|
-
end = addDays(end, daysToAdd);
|
|
566
|
-
}
|
|
567
|
-
}
|
|
568
|
-
return eachDayOfInterval({ start, end });
|
|
595
|
+
const end = this.fixedRowCount
|
|
596
|
+
? addDays(start, 41)
|
|
597
|
+
: endOfWeek(endOfMonth(this.baseDate), { weekStartsOn: this.weekStartsOn });
|
|
598
|
+
return { start, end };
|
|
569
599
|
}
|
|
570
600
|
/**
|
|
571
|
-
* Retorna o `focusedDate` normalizado para estar
|
|
572
|
-
*
|
|
573
|
-
*
|
|
574
|
-
*
|
|
575
|
-
*
|
|
576
|
-
* @returns Data focada normalizada ou primeiro dia da grade.
|
|
601
|
+
* Retorna o `focusedDate` normalizado para estar dentro da grade visível.
|
|
602
|
+
* Se não estiver visível, retorna o primeiro dia da grade.
|
|
603
|
+
* @param interval - limites da grade atual; calculados quando não fornecidos
|
|
604
|
+
* @returns data normalizada para foco
|
|
605
|
+
* @internal
|
|
577
606
|
*/
|
|
578
|
-
getNormalizedFocusedDate() {
|
|
579
|
-
const
|
|
580
|
-
const
|
|
581
|
-
if (
|
|
607
|
+
getNormalizedFocusedDate(interval = this.getMonthViewInterval()) {
|
|
608
|
+
const focusedDay = startOfDay(this.focusedDate).getTime();
|
|
609
|
+
const isVisible = focusedDay >= interval.start.getTime() && focusedDay <= interval.end.getTime();
|
|
610
|
+
if (isVisible) {
|
|
582
611
|
return this.focusedDate;
|
|
583
612
|
}
|
|
584
|
-
return
|
|
613
|
+
return interval.start;
|
|
585
614
|
}
|
|
586
615
|
/**
|
|
587
|
-
* Constrói o rótulo acessível
|
|
588
|
-
*
|
|
589
|
-
* @
|
|
590
|
-
* @
|
|
616
|
+
* Constrói o rótulo acessível para os botões de navegação.
|
|
617
|
+
* @param action - ação de navegação
|
|
618
|
+
* @returns rótulo para `aria-label`
|
|
619
|
+
* @internal
|
|
591
620
|
*/
|
|
592
621
|
getNavigationAriaLabel(action) {
|
|
593
622
|
switch (action) {
|
|
@@ -599,78 +628,127 @@ export class DatePicker {
|
|
|
599
628
|
return 'Navegar';
|
|
600
629
|
}
|
|
601
630
|
}
|
|
602
|
-
/**
|
|
631
|
+
/**
|
|
632
|
+
* Retorna os rótulos dos dias da semana conforme `locale` e `weekStartsOn`.
|
|
633
|
+
* @internal
|
|
634
|
+
*/
|
|
603
635
|
getWeekdayLabels() {
|
|
604
636
|
return getWeekdayLabels(this.locale, this.weekStartsOn);
|
|
605
637
|
}
|
|
606
|
-
/**
|
|
638
|
+
/**
|
|
639
|
+
* Retorna os rótulos dos meses no locale atual.
|
|
640
|
+
* @internal
|
|
641
|
+
*/
|
|
607
642
|
getMonthLabels() {
|
|
608
643
|
return getMonthLabels(this.locale);
|
|
609
644
|
}
|
|
610
645
|
/**
|
|
611
|
-
*
|
|
612
|
-
*
|
|
613
|
-
* @
|
|
646
|
+
* Move o foco de teclado para a data informada e atualiza `referenceDate` se necessário.
|
|
647
|
+
* @param date - data alvo do foco
|
|
648
|
+
* @returns void
|
|
649
|
+
* @internal
|
|
650
|
+
*/
|
|
651
|
+
moveFocusTo(date) {
|
|
652
|
+
this.focusedDate = date;
|
|
653
|
+
this.shouldFocusDate = true;
|
|
654
|
+
if (!isSameMonth(date, this.baseDate)) {
|
|
655
|
+
this.emitDateStateChange(date, this.value);
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
/**
|
|
659
|
+
* Renderiza um botão de navegação consistente para o calendário.
|
|
660
|
+
* @param action - ação do botão
|
|
661
|
+
* @returns elemento JSX do botão de navegação
|
|
662
|
+
* @internal
|
|
614
663
|
*/
|
|
615
664
|
renderNavigationButton(action) {
|
|
616
|
-
return (h("br-button", { emphasis: "tertiary", density: "small", shape: "circle", disabled: this.disabled, "data-action": action, "aria-label": this.getNavigationAriaLabel(action), onClick: this.handleNavigationClick }, h("br-icon", { iconName: this.getIconForAction(action), width: "20", height: "20", "aria-hidden": "true" })));
|
|
665
|
+
return (h("br-button", { type: "button", emphasis: "tertiary", density: "small", shape: "circle", disabled: this.disabled, "data-action": action, "aria-label": this.getNavigationAriaLabel(action), onClick: this.handleNavigationClick }, h("br-icon", { iconName: this.getIconForAction(action), width: "20", height: "20", "aria-hidden": "true" })));
|
|
617
666
|
}
|
|
618
|
-
/**
|
|
667
|
+
/**
|
|
668
|
+
* Renderiza o cabeçalho do calendário (navegação, mês e ano).
|
|
669
|
+
* @returns elemento JSX do cabeçalho
|
|
670
|
+
* @internal
|
|
671
|
+
*/
|
|
619
672
|
renderCalendarHeader() {
|
|
620
673
|
return (h("div", { class: "header", part: "header" }, this.renderNavigationButton(NAVIGATION_ACTION.PREVIOUS_MONTH), this.renderMonthSelection(), this.renderYearSelection(), this.renderNavigationButton(NAVIGATION_ACTION.NEXT_MONTH)));
|
|
621
674
|
}
|
|
622
|
-
/**
|
|
675
|
+
/**
|
|
676
|
+
* Renderiza o seletor de mês com rótulo acessível.
|
|
677
|
+
* @returns elemento JSX do seletor de mês
|
|
678
|
+
* @internal
|
|
679
|
+
*/
|
|
623
680
|
renderMonthSelection() {
|
|
624
681
|
return (h("label", { class: "month-selection" }, h("span", { class: "visually-hidden" }, "Selecionar m\u00EAs"), h("select", { onChange: this.handleMonthChange, "aria-label": "Selecionar m\u00EAs", disabled: this.disabled, part: "month-select" }, this.getMonthLabels().map(this.renderMonthOption, this))));
|
|
625
682
|
}
|
|
626
|
-
/**
|
|
683
|
+
/**
|
|
684
|
+
* Renderiza o campo de ano com rótulo acessível.
|
|
685
|
+
* @returns elemento JSX do campo de ano
|
|
686
|
+
* @internal
|
|
687
|
+
*/
|
|
627
688
|
renderYearSelection() {
|
|
628
689
|
return (h("label", { class: "year-selection" }, h("span", { class: "visually-hidden" }, "Selecionar ano"), h("input", { type: "number", value: this.referenceDate.getFullYear(), onChange: this.handleYearChange, "aria-label": "Selecionar ano", disabled: this.disabled, part: "year-input" })));
|
|
629
690
|
}
|
|
630
|
-
/**
|
|
691
|
+
/**
|
|
692
|
+
* Renderiza uma opção do seletor de meses.
|
|
693
|
+
* @param month - label do mês
|
|
694
|
+
* @param index - índice do mês (0-11)
|
|
695
|
+
* @returns elemento `<option>` para o mês
|
|
696
|
+
* @internal
|
|
697
|
+
*/
|
|
631
698
|
renderMonthOption(month, index) {
|
|
632
699
|
return (h("option", { key: `month-${index}`, value: index, selected: index === this.referenceDate.getMonth() }, month));
|
|
633
700
|
}
|
|
634
|
-
/**
|
|
701
|
+
/**
|
|
702
|
+
* Renderiza a estrutura principal do calendário (grade e cabeçalho).
|
|
703
|
+
* @returns elemento JSX com a grade do calendário
|
|
704
|
+
* @internal
|
|
705
|
+
*/
|
|
635
706
|
renderCalendar() {
|
|
636
707
|
const monthLabel = format(this.baseDate, "MMMM 'de' yyyy", { locale: this.dateFnsLocale });
|
|
637
708
|
return (h("div", { class: "calendar", role: "grid", "aria-label": `Calendário de ${monthLabel}`, part: "calendar" }, this.renderWeekdays(), this.renderMonthGrid()));
|
|
638
709
|
}
|
|
639
|
-
/**
|
|
710
|
+
/**
|
|
711
|
+
* Renderiza os rótulos dos dias da semana.
|
|
712
|
+
* @returns elemento JSX com os cabeçalhos das colunas dos dias
|
|
713
|
+
* @internal
|
|
714
|
+
*/
|
|
640
715
|
renderWeekdays() {
|
|
641
716
|
const labels = this.getWeekdayLabels();
|
|
642
717
|
return (h("div", { class: "weekdays", role: "row", tabIndex: -1, part: "weekdays" }, labels.map((label, index) => (h("div", { key: `weekday-${index}`, class: "weekday", role: "columnheader", tabIndex: -1, "aria-label": label, part: "weekday" }, label)))));
|
|
643
718
|
}
|
|
644
|
-
/**
|
|
719
|
+
/**
|
|
720
|
+
* Renderiza a grade de dias do mês atual.
|
|
721
|
+
* @returns elemento JSX contendo semanas e dias
|
|
722
|
+
* @internal
|
|
723
|
+
*/
|
|
645
724
|
renderMonthGrid() {
|
|
646
|
-
const
|
|
725
|
+
const interval = this.getMonthViewInterval();
|
|
726
|
+
const dates = eachDayOfInterval(interval);
|
|
727
|
+
const normalizedFocusedDate = this.getNormalizedFocusedDate(interval);
|
|
728
|
+
const today = new Date();
|
|
647
729
|
const weeks = Array.from({ length: Math.ceil(dates.length / 7) }, (_, index) => dates.slice(index * 7, index * 7 + 7));
|
|
648
|
-
return (h("div", { class: "monthdays", role: "rowgroup",
|
|
730
|
+
return (h("div", { class: "monthdays", role: "rowgroup", part: "grid" }, weeks.map((week) => (h("div", { key: `week-${format(week[0], 'yyyy-MM-dd')}`, class: "week", role: "row", tabIndex: -1 }, week.map((date) => this.renderDayCell(date, normalizedFocusedDate, today)))))));
|
|
649
731
|
}
|
|
650
732
|
/**
|
|
651
|
-
*
|
|
652
|
-
*
|
|
653
|
-
* @param
|
|
733
|
+
* Renderiza uma célula de dia com estado visual apropriado.
|
|
734
|
+
* @param date - data representada pela célula
|
|
735
|
+
* @param normalizedFocusedDate - data de foco normalizada para a grade atual
|
|
736
|
+
* @param today - instante atual compartilhado pela renderização da grade
|
|
737
|
+
* @returns elemento JSX da célula de dia
|
|
738
|
+
* @internal
|
|
654
739
|
*/
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
this.shouldFocusDate = true;
|
|
658
|
-
if (!isSameMonth(date, this.baseDate)) {
|
|
659
|
-
this.emitDateStateChange(date, this.value);
|
|
660
|
-
}
|
|
661
|
-
}
|
|
662
|
-
/** Renderiza uma célula de dia com estado visual apropriado. */
|
|
663
|
-
renderDayCell(date) {
|
|
740
|
+
renderDayCell(date, normalizedFocusedDate, today) {
|
|
741
|
+
const dateKey = format(date, 'yyyy-MM-dd');
|
|
664
742
|
const disabled = this.disabled || this.isDateDisabled(date);
|
|
665
|
-
const isSelected = this.
|
|
666
|
-
const isRangeStart = this.
|
|
667
|
-
const isRangeEnd = this.
|
|
743
|
+
const isSelected = this.selectionMode === 'single' && this.value !== null && isSameDay(date, this.value);
|
|
744
|
+
const isRangeStart = this.selectionMode === 'range' && this.rangeStart !== null && isSameDay(date, this.rangeStart);
|
|
745
|
+
const isRangeEnd = this.selectionMode === 'range' && this.rangeEnd !== null && isSameDay(date, this.rangeEnd);
|
|
668
746
|
const isActiveDay = isSelected || isRangeStart || isRangeEnd;
|
|
669
|
-
const isFocused = isSameDay(date,
|
|
670
|
-
return (h("div", { key:
|
|
747
|
+
const isFocused = isSameDay(date, normalizedFocusedDate);
|
|
748
|
+
return (h("div", { key: dateKey, role: "gridcell", tabIndex: this.disabled ? undefined : isFocused ? 0 : -1, "data-date": dateKey, class: { ...this.getDayCssClasses(date, today), disabled }, onClick: disabled ? undefined : this.handleDayCellClick, onKeyDown: disabled ? undefined : this.handleGridKeydown, "aria-label": this.getDayCellAriaLabel(date), "aria-selected": isActiveDay ? 'true' : 'false', "aria-disabled": disabled ? 'true' : null, part: "day" }, this.getDayWithLeadingZero(date)));
|
|
671
749
|
}
|
|
672
750
|
render() {
|
|
673
|
-
return (h(Host, { key: '
|
|
751
|
+
return (h(Host, { key: '652b18891338dd9d009e87fb2383dc3c1c78c6ee' }, h("div", { key: '3c441b0df40d69767ee4c3e8166e9403988def5d', class: "br-date-picker", part: "container" }, this.renderCalendarHeader(), this.renderCalendar())));
|
|
674
752
|
}
|
|
675
753
|
static get is() { return "br-date-picker"; }
|
|
676
754
|
static get encapsulation() { return "shadow"; }
|
|
@@ -704,8 +782,11 @@ export class DatePicker {
|
|
|
704
782
|
"required": false,
|
|
705
783
|
"optional": false,
|
|
706
784
|
"docs": {
|
|
707
|
-
"tags": [
|
|
708
|
-
|
|
785
|
+
"tags": [{
|
|
786
|
+
"name": "default",
|
|
787
|
+
"text": "0"
|
|
788
|
+
}],
|
|
789
|
+
"text": "\u00CDndice do dia em que a semana come\u00E7a na interface do calend\u00E1rio."
|
|
709
790
|
},
|
|
710
791
|
"getter": false,
|
|
711
792
|
"setter": false,
|
|
@@ -730,10 +811,10 @@ export class DatePicker {
|
|
|
730
811
|
"optional": false,
|
|
731
812
|
"docs": {
|
|
732
813
|
"tags": [{
|
|
733
|
-
"name": "
|
|
734
|
-
"text": "
|
|
814
|
+
"name": "default",
|
|
815
|
+
"text": "new Date()"
|
|
735
816
|
}],
|
|
736
|
-
"text": "Data usada como base visual para o m\u00EAs atualmente exibido
|
|
817
|
+
"text": "Data usada como base visual para o m\u00EAs atualmente exibido."
|
|
737
818
|
},
|
|
738
819
|
"getter": false,
|
|
739
820
|
"setter": false,
|
|
@@ -756,10 +837,10 @@ export class DatePicker {
|
|
|
756
837
|
"optional": false,
|
|
757
838
|
"docs": {
|
|
758
839
|
"tags": [{
|
|
759
|
-
"name": "
|
|
760
|
-
"text": "
|
|
840
|
+
"name": "default",
|
|
841
|
+
"text": "null"
|
|
761
842
|
}],
|
|
762
|
-
"text": "Data
|
|
843
|
+
"text": "Data atualmente selecionada pelo usu\u00E1rio, ou `null` quando n\u00E3o h\u00E1 sele\u00E7\u00E3o."
|
|
763
844
|
},
|
|
764
845
|
"getter": false,
|
|
765
846
|
"setter": false,
|
|
@@ -783,8 +864,11 @@ export class DatePicker {
|
|
|
783
864
|
"required": false,
|
|
784
865
|
"optional": false,
|
|
785
866
|
"docs": {
|
|
786
|
-
"tags": [
|
|
787
|
-
|
|
867
|
+
"tags": [{
|
|
868
|
+
"name": "default",
|
|
869
|
+
"text": "'single'"
|
|
870
|
+
}],
|
|
871
|
+
"text": "Define se a sele\u00E7\u00E3o ocorre por data \u00FAnica ou por intervalo."
|
|
788
872
|
},
|
|
789
873
|
"getter": false,
|
|
790
874
|
"setter": false,
|
|
@@ -808,7 +892,10 @@ export class DatePicker {
|
|
|
808
892
|
"required": false,
|
|
809
893
|
"optional": false,
|
|
810
894
|
"docs": {
|
|
811
|
-
"tags": [
|
|
895
|
+
"tags": [{
|
|
896
|
+
"name": "default",
|
|
897
|
+
"text": "null"
|
|
898
|
+
}],
|
|
812
899
|
"text": "Data inicial selecionada quando o calend\u00E1rio opera no modo de intervalo."
|
|
813
900
|
},
|
|
814
901
|
"getter": false,
|
|
@@ -831,7 +918,10 @@ export class DatePicker {
|
|
|
831
918
|
"required": false,
|
|
832
919
|
"optional": false,
|
|
833
920
|
"docs": {
|
|
834
|
-
"tags": [
|
|
921
|
+
"tags": [{
|
|
922
|
+
"name": "default",
|
|
923
|
+
"text": "null"
|
|
924
|
+
}],
|
|
835
925
|
"text": "Data final selecionada quando o calend\u00E1rio opera no modo de intervalo."
|
|
836
926
|
},
|
|
837
927
|
"getter": false,
|
|
@@ -857,10 +947,10 @@ export class DatePicker {
|
|
|
857
947
|
"optional": true,
|
|
858
948
|
"docs": {
|
|
859
949
|
"tags": [{
|
|
860
|
-
"name": "
|
|
861
|
-
"text": "
|
|
950
|
+
"name": "default",
|
|
951
|
+
"text": "undefined"
|
|
862
952
|
}],
|
|
863
|
-
"text": "Intervalo controlado no modo `range
|
|
953
|
+
"text": "Intervalo controlado no modo `range`.\nQuando definido, mant\u00E9m `rangeStart` e `rangeEnd` sincronizados."
|
|
864
954
|
},
|
|
865
955
|
"getter": false,
|
|
866
956
|
"setter": false
|
|
@@ -876,8 +966,11 @@ export class DatePicker {
|
|
|
876
966
|
"required": false,
|
|
877
967
|
"optional": false,
|
|
878
968
|
"docs": {
|
|
879
|
-
"tags": [
|
|
880
|
-
|
|
969
|
+
"tags": [{
|
|
970
|
+
"name": "default",
|
|
971
|
+
"text": "false"
|
|
972
|
+
}],
|
|
973
|
+
"text": "Desabilita a intera\u00E7\u00E3o do calend\u00E1rio quando `true`."
|
|
881
974
|
},
|
|
882
975
|
"getter": false,
|
|
883
976
|
"setter": false,
|
|
@@ -902,10 +995,10 @@ export class DatePicker {
|
|
|
902
995
|
"optional": false,
|
|
903
996
|
"docs": {
|
|
904
997
|
"tags": [{
|
|
905
|
-
"name": "
|
|
906
|
-
"text": "
|
|
998
|
+
"name": "default",
|
|
999
|
+
"text": "[]"
|
|
907
1000
|
}],
|
|
908
|
-
"text": "Lista de datas indispon\u00EDveis para sele\u00E7\u00E3o no calend\u00E1rio
|
|
1001
|
+
"text": "Lista de datas indispon\u00EDveis para sele\u00E7\u00E3o no calend\u00E1rio."
|
|
909
1002
|
},
|
|
910
1003
|
"getter": false,
|
|
911
1004
|
"setter": false,
|
|
@@ -922,7 +1015,10 @@ export class DatePicker {
|
|
|
922
1015
|
"required": false,
|
|
923
1016
|
"optional": false,
|
|
924
1017
|
"docs": {
|
|
925
|
-
"tags": [
|
|
1018
|
+
"tags": [{
|
|
1019
|
+
"name": "default",
|
|
1020
|
+
"text": "DATETIME_PICKER_LOCALE.DEFAULT"
|
|
1021
|
+
}],
|
|
926
1022
|
"text": "Locale usado para gerar nomes de meses e dias da semana."
|
|
927
1023
|
},
|
|
928
1024
|
"getter": false,
|
|
@@ -946,7 +1042,7 @@ export class DatePicker {
|
|
|
946
1042
|
"name": "default",
|
|
947
1043
|
"text": "false"
|
|
948
1044
|
}],
|
|
949
|
-
"text": "
|
|
1045
|
+
"text": "Se `true`, o calend\u00E1rio sempre exibe 6 semanas (42 dias); caso contr\u00E1rio, adapta-se ao m\u00EAs."
|
|
950
1046
|
},
|
|
951
1047
|
"getter": false,
|
|
952
1048
|
"setter": false,
|
|
@@ -958,8 +1054,7 @@ export class DatePicker {
|
|
|
958
1054
|
}
|
|
959
1055
|
static get states() {
|
|
960
1056
|
return {
|
|
961
|
-
"focusedDate": {}
|
|
962
|
-
"normalizedDisabledDates": {}
|
|
1057
|
+
"focusedDate": {}
|
|
963
1058
|
};
|
|
964
1059
|
}
|
|
965
1060
|
static get events() {
|
|
@@ -970,12 +1065,27 @@ export class DatePicker {
|
|
|
970
1065
|
"cancelable": true,
|
|
971
1066
|
"composed": true,
|
|
972
1067
|
"docs": {
|
|
973
|
-
"tags": [
|
|
974
|
-
|
|
1068
|
+
"tags": [{
|
|
1069
|
+
"name": "property",
|
|
1070
|
+
"text": "{Date} referenceDate - Data de refer\u00EAncia atual do calend\u00E1rio (segundos/milissegundos zerados)."
|
|
1071
|
+
}, {
|
|
1072
|
+
"name": "property",
|
|
1073
|
+
"text": "{(Date|null)} value - Data selecionada ou `null` quando nenhuma sele\u00E7\u00E3o."
|
|
1074
|
+
}, {
|
|
1075
|
+
"name": "property",
|
|
1076
|
+
"text": "{{start: Date, end: (Date|null)}=} range - Intervalo selecionado quando `selectionMode === 'range'`.\n\nConsumidores usam este evento para sincronizar UI externas e integra\u00E7\u00E3o com formul\u00E1rios."
|
|
1077
|
+
}, {
|
|
1078
|
+
"name": "event",
|
|
1079
|
+
"text": "dateStateChange"
|
|
1080
|
+
}, {
|
|
1081
|
+
"name": "type",
|
|
1082
|
+
"text": "{EventEmitter<DatetimePickerDateState>}"
|
|
1083
|
+
}],
|
|
1084
|
+
"text": "Emite o estado consolidado do componente quando h\u00E1 mudan\u00E7a de refer\u00EAncia/sele\u00E7\u00E3o.\n\nPayload (DatetimePickerDateState):"
|
|
975
1085
|
},
|
|
976
1086
|
"complexType": {
|
|
977
1087
|
"original": "DatetimePickerDateState",
|
|
978
|
-
"resolved": "{ referenceDate: Date; value: Date; range?: DatetimePickerDateRange; rangeDates?: DatetimePickerRangeDateState[]; }",
|
|
1088
|
+
"resolved": "{ referenceDate: Date; value: Date; range?: DatetimePickerDateRange; rangeDates?: DatetimePickerRangeDateState[]; origin?: string; }",
|
|
979
1089
|
"references": {
|
|
980
1090
|
"DatetimePickerDateState": {
|
|
981
1091
|
"location": "import",
|
|
@@ -995,18 +1105,12 @@ export class DatePicker {
|
|
|
995
1105
|
}, {
|
|
996
1106
|
"propName": "value",
|
|
997
1107
|
"methodName": "handleValueChange"
|
|
998
|
-
}, {
|
|
999
|
-
"propName": "referenceDate",
|
|
1000
|
-
"methodName": "handleReferenceDateChange"
|
|
1001
1108
|
}, {
|
|
1002
1109
|
"propName": "weekStartsOn",
|
|
1003
1110
|
"methodName": "handleWeekStartsOnChange"
|
|
1004
1111
|
}, {
|
|
1005
1112
|
"propName": "locale",
|
|
1006
1113
|
"methodName": "handleLocaleChange"
|
|
1007
|
-
}, {
|
|
1008
|
-
"propName": "disabledDates",
|
|
1009
|
-
"methodName": "handleDisabledDatesChange"
|
|
1010
1114
|
}];
|
|
1011
1115
|
}
|
|
1012
1116
|
}
|