@govbr-ds/webcomponents 2.3.0 → 2.5.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/README.md +2 -2
- package/cem/custom-elements.json +1764 -1575
- package/cem/webcomponents.html-custom-data.json +194 -163
- package/dist/cjs/br-avatar.cjs.entry.js +3 -3
- package/dist/cjs/br-breadcrumb-item.cjs.entry.js +1 -1
- package/dist/cjs/br-breadcrumb.cjs.entry.js +3 -3
- package/dist/cjs/br-button_2.cjs.entry.js +4 -4
- package/dist/cjs/br-card.cjs.entry.js +3 -3
- package/dist/cjs/br-carousel-page.cjs.entry.js +2 -2
- package/dist/cjs/br-carousel.cjs.entry.js +2 -2
- package/dist/cjs/br-checkbox-group.cjs.entry.js +3 -3
- package/dist/cjs/br-checkbox.cjs.entry.js +4 -4
- package/dist/cjs/br-checkgroup.cjs.entry.js +1 -1
- package/dist/cjs/br-collapse_2.cjs.entry.js +5 -5
- package/dist/cjs/br-cookiebar-cookie.cjs.entry.js +2 -2
- package/dist/cjs/br-cookiebar-group.cjs.entry.js +2 -2
- package/dist/cjs/br-cookiebar-header.cjs.entry.js +2 -2
- package/dist/cjs/br-cookiebar-link.cjs.entry.js +2 -2
- package/dist/cjs/br-cookiebar-note-group.cjs.entry.js +1 -1
- package/dist/cjs/br-cookiebar-note.cjs.entry.js +2 -2
- package/dist/cjs/br-cookiebar.cjs.entry.js +3 -3
- package/dist/cjs/br-crumb.cjs.entry.js +1 -1
- package/dist/cjs/br-date-picker_3.cjs.entry.js +984 -545
- package/dist/cjs/br-datetime-picker.cjs.entry.js +1346 -310
- package/dist/cjs/br-divider.cjs.entry.js +3 -3
- package/dist/cjs/br-dropdown_2.cjs.entry.js +282 -139
- package/dist/cjs/br-footer-category.cjs.entry.js +3 -3
- package/dist/cjs/br-footer-item.cjs.entry.js +2 -2
- package/dist/cjs/br-footer-legal.cjs.entry.js +2 -2
- package/dist/cjs/br-footer-logo.cjs.entry.js +2 -2
- package/dist/cjs/br-footer-social.cjs.entry.js +2 -2
- package/dist/cjs/br-footer.cjs.entry.js +4 -4
- package/dist/cjs/br-header-function.cjs.entry.js +2 -2
- package/dist/cjs/br-header-link.cjs.entry.js +2 -2
- package/dist/cjs/br-header-list.cjs.entry.js +2 -2
- package/dist/cjs/br-header-logo.cjs.entry.js +2 -2
- package/dist/cjs/br-header.cjs.entry.js +2 -2
- package/dist/cjs/br-icon.cjs.entry.js +3 -3
- package/dist/cjs/br-input.cjs.entry.js +64 -10
- package/dist/cjs/br-item.cjs.entry.js +3 -3
- package/dist/cjs/br-link.cjs.entry.js +8 -8
- package/dist/cjs/br-loading.cjs.entry.js +2 -2
- package/dist/cjs/br-magic-button.cjs.entry.js +2 -2
- package/dist/cjs/br-menu-group.cjs.entry.js +2 -2
- package/dist/cjs/br-menu-header.cjs.entry.js +2 -2
- package/dist/cjs/br-menu-info.cjs.entry.js +2 -2
- package/dist/cjs/br-menu-item.cjs.entry.js +2 -2
- package/dist/cjs/br-menu-link.cjs.entry.js +2 -2
- package/dist/cjs/br-menu-list.cjs.entry.js +1 -1
- package/dist/cjs/br-menu-logo.cjs.entry.js +2 -2
- package/dist/cjs/br-menu-social.cjs.entry.js +1 -1
- package/dist/cjs/br-menu.cjs.entry.js +4 -4
- package/dist/cjs/br-modal.cjs.entry.js +1 -1
- package/dist/cjs/br-notification-body.cjs.entry.js +2 -2
- package/dist/cjs/br-notification-header.cjs.entry.js +2 -2
- package/dist/cjs/br-notification-item.cjs.entry.js +2 -2
- package/dist/cjs/br-notification.cjs.entry.js +3 -3
- package/dist/cjs/br-pagination.cjs.entry.js +3 -3
- package/dist/cjs/br-radio-group.cjs.entry.js +4 -4
- package/dist/cjs/br-radio.cjs.entry.js +4 -4
- package/dist/cjs/br-scrim.cjs.entry.js +3 -3
- package/dist/cjs/br-select-input_3.cjs.entry.js +308 -101
- package/dist/cjs/br-sign-in.cjs.entry.js +3 -3
- package/dist/cjs/br-skip-link-item.cjs.entry.js +1 -1
- package/dist/cjs/br-skip-link.cjs.entry.js +2 -2
- package/dist/cjs/br-skiplink-item.cjs.entry.js +2 -2
- package/dist/cjs/br-slider.cjs.entry.js +3 -3
- package/dist/cjs/br-step_2.cjs.entry.js +6 -6
- package/dist/cjs/br-switch.cjs.entry.js +4 -4
- package/dist/cjs/br-tab-item.cjs.entry.js +2 -2
- package/dist/cjs/br-tab.cjs.entry.js +4 -4
- package/dist/cjs/br-table-body.cjs.entry.js +2 -2
- package/dist/cjs/br-table-cell.cjs.entry.js +2 -2
- package/dist/cjs/br-table-header-cell.cjs.entry.js +2 -2
- package/dist/cjs/br-table-header.cjs.entry.js +2 -2
- package/dist/cjs/br-table-row.cjs.entry.js +2 -2
- package/dist/cjs/br-table.cjs.entry.js +2 -2
- package/dist/cjs/br-tag.cjs.entry.js +4 -4
- package/dist/cjs/br-textarea.cjs.entry.js +3 -3
- package/dist/cjs/br-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/br-upload.cjs.entry.js +8 -24
- package/dist/cjs/br-wizard-panel.cjs.entry.js +2 -2
- package/dist/cjs/br-wizard.cjs.entry.js +2 -2
- package/dist/cjs/{datetime-picker-constants-B5pWeOn1.js → datetime-picker-constants-CTf1kVJ1.js} +21 -5
- package/dist/cjs/format-bytes-Cs8SH2w0.js +24 -0
- package/dist/cjs/{iconify-icon-DfODV9bf.js → iconify-icon-LjavbM-D.js} +103 -57
- package/dist/cjs/index-Bc30P_6z.js +14 -14
- package/dist/cjs/{index-C92n55ch.js → index-Caoez3xb.js} +75 -27
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/{datetime-picker-props-validation-DmNKSXsy.js → isValid-DgJ-noPS.js} +1 -483
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/select.utils-C38f5Kea.js +62 -0
- package/dist/cjs/{slot-DAllytTj.js → slot-CjaqqX7y.js} +1 -1
- package/dist/cjs/webcomponents.cjs.js +1 -1
- package/dist/collection/components/avatar/avatar.css +1 -1
- package/dist/collection/components/avatar/avatar.js +21 -21
- package/dist/collection/components/breadcrumb/breadcrumb-item/breadcrumb-item.js +4 -12
- package/dist/collection/components/breadcrumb/breadcrumb.css +1 -1
- package/dist/collection/components/breadcrumb/breadcrumb.js +32 -27
- package/dist/collection/components/breadcrumb/crumb/crumb.js +2 -13
- package/dist/collection/components/button/button.css +1 -1
- package/dist/collection/components/button/button.js +21 -21
- package/dist/collection/components/card/card.css +1 -1
- package/dist/collection/components/card/card.js +20 -22
- package/dist/collection/components/carousel/carousel-page/carousel-page.css +1 -1
- package/dist/collection/components/carousel/carousel-page/carousel-page.js +3 -13
- package/dist/collection/components/carousel/carousel.css +1 -1
- package/dist/collection/components/carousel/carousel.js +23 -30
- package/dist/collection/components/checkbox/checkbox.css +1 -1
- package/dist/collection/components/checkbox/checkbox.js +18 -24
- package/dist/collection/components/checkbox-group/checkbox-group.css +1 -1
- package/dist/collection/components/checkbox-group/checkbox-group.js +19 -20
- package/dist/collection/components/checkgroup/checkgroup.js +2 -14
- package/dist/collection/components/collapse/collapse.css +1 -1
- package/dist/collection/components/collapse/collapse.js +25 -21
- package/dist/collection/components/cookiebar/cookiebar-cookie/cookiebar-cookie.css +1 -1
- package/dist/collection/components/cookiebar/cookiebar-cookie/cookiebar-cookie.js +3 -16
- package/dist/collection/components/cookiebar/cookiebar-group/cookiebar-group.css +1 -1
- package/dist/collection/components/cookiebar/cookiebar-group/cookiebar-group.js +3 -16
- package/dist/collection/components/cookiebar/cookiebar-header/cookiebar-header.css +1 -1
- package/dist/collection/components/cookiebar/cookiebar-header/cookiebar-header.js +3 -16
- package/dist/collection/components/cookiebar/cookiebar-link/cookiebar-link.css +1 -1
- package/dist/collection/components/cookiebar/cookiebar-link/cookiebar-link.js +3 -15
- package/dist/collection/components/cookiebar/cookiebar-note/cookiebar-note.css +1 -1
- package/dist/collection/components/cookiebar/cookiebar-note/cookiebar-note.js +3 -14
- package/dist/collection/components/cookiebar/cookiebar-note-group/cookiebar-note-group.css +1 -1
- package/dist/collection/components/cookiebar/cookiebar-note-group/cookiebar-note-group.js +2 -13
- package/dist/collection/components/cookiebar/cookiebar.css +1 -1
- package/dist/collection/components/cookiebar/cookiebar.js +32 -27
- package/dist/collection/components/datetime-picker/date-picker/date-picker-locale.js +73 -26
- 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 +474 -321
- 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 +370 -218
- 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 +917 -368
- 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 +145 -92
- package/dist/collection/components/divider/divider.css +1 -1
- package/dist/collection/components/divider/divider.js +15 -19
- package/dist/collection/components/dropdown/dropdown.css +1 -1
- package/dist/collection/components/dropdown/dropdown.js +22 -21
- package/dist/collection/components/footer/footer-category/footer-category.css +1 -1
- package/dist/collection/components/footer/footer-category/footer-category.js +4 -17
- package/dist/collection/components/footer/footer-item/footer-item.css +1 -1
- package/dist/collection/components/footer/footer-item/footer-item.js +3 -16
- package/dist/collection/components/footer/footer-legal/footer-legal.css +1 -1
- package/dist/collection/components/footer/footer-legal/footer-legal.js +2 -16
- package/dist/collection/components/footer/footer-logo/footer-logo.css +1 -1
- package/dist/collection/components/footer/footer-logo/footer-logo.js +3 -16
- package/dist/collection/components/footer/footer-social/footer-social.css +1 -1
- package/dist/collection/components/footer/footer-social/footer-social.js +3 -15
- package/dist/collection/components/footer/footer.css +1 -1
- package/dist/collection/components/footer/footer.js +25 -29
- package/dist/collection/components/header/header-function/header-function.css +1 -1
- package/dist/collection/components/header/header-function/header-function.js +10 -14
- package/dist/collection/components/header/header-link/header-link.css +1 -1
- package/dist/collection/components/header/header-link/header-link.js +3 -16
- package/dist/collection/components/header/header-list/header-list.css +1 -1
- package/dist/collection/components/header/header-list/header-list.js +3 -16
- package/dist/collection/components/header/header-logo/header-logo.css +1 -1
- package/dist/collection/components/header/header-logo/header-logo.js +3 -16
- package/dist/collection/components/header/header.css +1 -1
- package/dist/collection/components/header/header.js +30 -27
- package/dist/collection/components/icon/icon.css +1 -1
- package/dist/collection/components/icon/icon.js +22 -17
- package/dist/collection/components/input/input.css +1 -1
- package/dist/collection/components/input/input.js +125 -30
- package/dist/collection/components/item/item.css +1 -1
- package/dist/collection/components/item/item.js +18 -22
- package/dist/collection/components/link/link.css +1 -1
- package/dist/collection/components/link/link.js +25 -29
- package/dist/collection/components/list/list.css +1 -1
- package/dist/collection/components/list/list.js +17 -21
- package/dist/collection/components/loading/loading.css +1 -1
- package/dist/collection/components/loading/loading.js +17 -24
- package/dist/collection/components/magic-button/magic-button.css +1 -1
- package/dist/collection/components/magic-button/magic-button.js +13 -20
- package/dist/collection/components/menu/menu-group/menu-group.css +1 -1
- package/dist/collection/components/menu/menu-group/menu-group.js +3 -16
- package/dist/collection/components/menu/menu-header/menu-header.css +1 -1
- package/dist/collection/components/menu/menu-header/menu-header.js +3 -16
- package/dist/collection/components/menu/menu-info/menu-info.css +1 -1
- package/dist/collection/components/menu/menu-info/menu-info.js +2 -15
- package/dist/collection/components/menu/menu-item/menu-item.css +1 -1
- package/dist/collection/components/menu/menu-item/menu-item.js +3 -16
- package/dist/collection/components/menu/menu-link/menu-link.css +1 -1
- package/dist/collection/components/menu/menu-link/menu-link.js +5 -17
- package/dist/collection/components/menu/menu-list/menu-list.css +1 -1
- package/dist/collection/components/menu/menu-list/menu-list.js +2 -15
- package/dist/collection/components/menu/menu-logo/menu-logo.css +1 -1
- package/dist/collection/components/menu/menu-logo/menu-logo.js +2 -15
- package/dist/collection/components/menu/menu-social/menu-social.css +1 -1
- package/dist/collection/components/menu/menu-social/menu-social.js +2 -15
- package/dist/collection/components/menu/menu.css +1 -1
- package/dist/collection/components/menu/menu.js +28 -35
- package/dist/collection/components/message/message.css +1 -1
- package/dist/collection/components/message/message.js +22 -25
- package/dist/collection/components/modal/modal.css +1 -1
- package/dist/collection/components/modal/modal.js +18 -21
- package/dist/collection/components/notification/notification-body/notification-body.css +1 -1
- package/dist/collection/components/notification/notification-body/notification-body.js +3 -13
- package/dist/collection/components/notification/notification-header/notification-header.css +1 -1
- package/dist/collection/components/notification/notification-header/notification-header.js +3 -14
- package/dist/collection/components/notification/notification-item/notification-item.css +1 -1
- package/dist/collection/components/notification/notification-item/notification-item.js +3 -16
- package/dist/collection/components/notification/notification.css +1 -1
- package/dist/collection/components/notification/notification.js +20 -29
- package/dist/collection/components/pagination/pagination.css +1 -1
- package/dist/collection/components/pagination/pagination.js +15 -23
- package/dist/collection/components/radio/radio.css +1 -1
- package/dist/collection/components/radio/radio.js +17 -20
- package/dist/collection/components/radio-group/radio-group.css +1 -1
- package/dist/collection/components/radio-group/radio-group.js +20 -20
- package/dist/collection/components/scrim/scrim.css +1 -1
- package/dist/collection/components/scrim/scrim.js +14 -17
- package/dist/collection/components/select/select-input/select-input.css +1 -1
- package/dist/collection/components/select/select-input/select-input.js +157 -27
- package/dist/collection/components/select/select-list/select-list.css +1 -1
- package/dist/collection/components/select/select-list/select-list.js +269 -80
- package/dist/collection/components/select/select-option/select-option.css +1 -1
- package/dist/collection/components/select/select-option/select-option.js +20 -16
- package/dist/collection/components/select/select.css +1 -1
- package/dist/collection/components/select/select.js +367 -180
- 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/sign-in/sign-in.js +12 -16
- package/dist/collection/components/skip-link/skip-link-item/skip-link-item-alias.js +8 -4
- package/dist/collection/components/skip-link/skip-link-item/skip-link-item.css +1 -1
- package/dist/collection/components/skip-link/skip-link-item/skip-link-item.js +5 -15
- package/dist/collection/components/skip-link/skip-link.css +1 -1
- package/dist/collection/components/skip-link/skip-link.js +18 -24
- package/dist/collection/components/slider/slider.css +1 -1
- package/dist/collection/components/slider/slider.js +15 -25
- package/dist/collection/components/step/step-item/step-item.css +1 -1
- package/dist/collection/components/step/step-item/step-item.js +5 -15
- package/dist/collection/components/step/step.css +1 -1
- package/dist/collection/components/step/step.js +16 -25
- package/dist/collection/components/switch/switch.css +1 -1
- package/dist/collection/components/switch/switch.js +16 -20
- package/dist/collection/components/tab/tab-item/tab-item.css +1 -1
- package/dist/collection/components/tab/tab-item/tab-item.js +5 -15
- package/dist/collection/components/tab/tab.css +1 -1
- package/dist/collection/components/tab/tab.js +22 -29
- package/dist/collection/components/table/table-body/table-body.css +1 -1
- package/dist/collection/components/table/table-body/table-body.js +3 -13
- package/dist/collection/components/table/table-cell/table-cell.css +1 -1
- package/dist/collection/components/table/table-cell/table-cell.js +3 -12
- package/dist/collection/components/table/table-header/table-header.css +1 -1
- package/dist/collection/components/table/table-header/table-header.js +3 -13
- package/dist/collection/components/table/table-header-cell/table-header-cell.css +1 -1
- package/dist/collection/components/table/table-header-cell/table-header-cell.js +3 -13
- package/dist/collection/components/table/table-row/table-row.css +1 -1
- package/dist/collection/components/table/table-row/table-row.js +3 -13
- package/dist/collection/components/table/table.css +1 -1
- package/dist/collection/components/table/table.js +25 -32
- package/dist/collection/components/tag/tag.css +1 -1
- package/dist/collection/components/tag/tag.js +17 -26
- package/dist/collection/components/textarea/textarea.css +1 -1
- package/dist/collection/components/textarea/textarea.js +14 -22
- package/dist/collection/components/tooltip/tooltip.css +1 -1
- package/dist/collection/components/tooltip/tooltip.js +13 -19
- package/dist/collection/components/upload/upload.css +1 -1
- package/dist/collection/components/upload/upload.js +36 -29
- package/dist/collection/components/wizard/wizard-panel/wizard-panel.css +1 -1
- package/dist/collection/components/wizard/wizard-panel/wizard-panel.js +3 -13
- package/dist/collection/components/wizard/wizard.css +1 -1
- package/dist/collection/components/wizard/wizard.js +22 -26
- package/dist/collection/pages/components/select/remote-options.js +87 -0
- package/dist/collection/shared/utils/slot.js +1 -1
- package/dist/components/br-avatar.js +1 -1
- package/dist/components/br-breadcrumb-item.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-crumb.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-448Z5r2f.js +5 -0
- package/dist/{webcomponents/p-5f422a69.entry.js → components/p-AhfgJCUp.js} +1 -1
- package/dist/components/p-AoNL6BaW.js +5 -0
- package/dist/components/p-B468MCYC.js +5 -0
- package/dist/components/p-B7bNfmgh.js +5 -0
- package/dist/components/p-B985Ov_x.js +5 -0
- package/dist/components/p-BOWQIHQA.js +5 -0
- package/dist/components/p-BPQrgCRr.js +5 -0
- package/dist/components/p-BwQT0fOJ.js +5 -0
- package/dist/components/p-CAgbUwsx.js +5 -0
- package/dist/components/p-CFXey8i8.js +5 -0
- package/dist/components/p-CVz_akHx.js +5 -0
- package/dist/components/p-CW8xwk6J.js +5 -0
- package/dist/components/p-CYZVdKeO.js +5 -0
- package/dist/components/p-C_DC6oQW.js +16 -0
- package/dist/components/p-CeWbZN7V.js +5 -0
- package/dist/components/p-CyXVsiz9.js +5 -0
- package/dist/components/p-DDe0tQEO.js +5 -0
- package/dist/components/{p-CZZVc2gK.js → p-DJKZ8ktB.js} +1 -1
- package/dist/components/p-DRsZ9GNg.js +5 -0
- package/dist/components/p-DU54cqCf.js +5 -0
- package/dist/components/p-DVJlmlEX.js +5 -0
- package/dist/components/p-DcMjwTqu.js +5 -0
- package/dist/components/p-Dd1qCWAK.js +5 -0
- package/dist/components/p-Dn36Mj2E.js +5 -0
- package/dist/components/p-DoWy_P8b.js +5 -0
- package/dist/components/p-HbhTnepI.js +5 -0
- package/dist/components/{p-BcqVlof7.js → p-JkJjzmGm.js} +1 -1
- package/dist/components/{p-Nze3Utvd.js → p-Or3FLzbz.js} +1 -1
- package/dist/components/p-SWQlgYWR.js +5 -0
- package/dist/components/p-Zb9nyfTY.js +5 -0
- package/dist/components/p-jvKQA6x7.js +5 -0
- package/dist/components/p-pQb-3jFY.js +5 -0
- package/dist/components/p-qX6sHxOk.js +5 -0
- package/dist/esm/br-avatar.entry.js +3 -3
- package/dist/esm/br-breadcrumb-item.entry.js +1 -1
- package/dist/esm/br-breadcrumb.entry.js +3 -3
- package/dist/esm/br-button_2.entry.js +4 -4
- package/dist/esm/br-card.entry.js +3 -3
- package/dist/esm/br-carousel-page.entry.js +2 -2
- package/dist/esm/br-carousel.entry.js +3 -3
- package/dist/esm/br-checkbox-group.entry.js +3 -3
- package/dist/esm/br-checkbox.entry.js +5 -5
- package/dist/esm/br-checkgroup.entry.js +1 -1
- package/dist/esm/br-collapse_2.entry.js +6 -6
- package/dist/esm/br-cookiebar-cookie.entry.js +2 -2
- package/dist/esm/br-cookiebar-group.entry.js +2 -2
- package/dist/esm/br-cookiebar-header.entry.js +2 -2
- package/dist/esm/br-cookiebar-link.entry.js +2 -2
- package/dist/esm/br-cookiebar-note-group.entry.js +1 -1
- package/dist/esm/br-cookiebar-note.entry.js +2 -2
- package/dist/esm/br-cookiebar.entry.js +4 -4
- package/dist/esm/br-crumb.entry.js +1 -1
- package/dist/esm/br-date-picker_3.entry.js +966 -527
- package/dist/esm/br-datetime-picker.entry.js +1316 -280
- package/dist/esm/br-divider.entry.js +3 -3
- package/dist/esm/br-dropdown_2.entry.js +281 -138
- package/dist/esm/br-footer-category.entry.js +3 -3
- package/dist/esm/br-footer-item.entry.js +2 -2
- package/dist/esm/br-footer-legal.entry.js +2 -2
- package/dist/esm/br-footer-logo.entry.js +2 -2
- package/dist/esm/br-footer-social.entry.js +2 -2
- package/dist/esm/br-footer.entry.js +4 -4
- package/dist/esm/br-header-function.entry.js +2 -2
- package/dist/esm/br-header-link.entry.js +2 -2
- package/dist/esm/br-header-list.entry.js +3 -3
- package/dist/esm/br-header-logo.entry.js +2 -2
- package/dist/esm/br-header.entry.js +2 -2
- package/dist/esm/br-icon.entry.js +3 -3
- package/dist/esm/br-input.entry.js +65 -11
- package/dist/esm/br-item.entry.js +3 -3
- package/dist/esm/br-link.entry.js +8 -8
- package/dist/esm/br-loading.entry.js +2 -2
- package/dist/esm/br-magic-button.entry.js +2 -2
- package/dist/esm/br-menu-group.entry.js +2 -2
- package/dist/esm/br-menu-header.entry.js +2 -2
- package/dist/esm/br-menu-info.entry.js +2 -2
- package/dist/esm/br-menu-item.entry.js +2 -2
- package/dist/esm/br-menu-link.entry.js +2 -2
- package/dist/esm/br-menu-list.entry.js +1 -1
- package/dist/esm/br-menu-logo.entry.js +2 -2
- package/dist/esm/br-menu-social.entry.js +1 -1
- package/dist/esm/br-menu.entry.js +5 -5
- package/dist/esm/br-modal.entry.js +1 -1
- package/dist/esm/br-notification-body.entry.js +2 -2
- package/dist/esm/br-notification-header.entry.js +2 -2
- package/dist/esm/br-notification-item.entry.js +2 -2
- package/dist/esm/br-notification.entry.js +4 -4
- package/dist/esm/br-pagination.entry.js +3 -3
- package/dist/esm/br-radio-group.entry.js +5 -5
- package/dist/esm/br-radio.entry.js +5 -5
- package/dist/esm/br-scrim.entry.js +3 -3
- package/dist/esm/br-select-input_3.entry.js +308 -101
- package/dist/esm/br-sign-in.entry.js +3 -3
- package/dist/esm/br-skip-link-item.entry.js +1 -1
- package/dist/esm/br-skip-link.entry.js +2 -2
- package/dist/esm/br-skiplink-item.entry.js +2 -2
- package/dist/esm/br-slider.entry.js +4 -4
- package/dist/esm/br-step_2.entry.js +6 -6
- package/dist/esm/br-switch.entry.js +5 -5
- package/dist/esm/br-tab-item.entry.js +2 -2
- package/dist/esm/br-tab.entry.js +4 -4
- package/dist/esm/br-table-body.entry.js +2 -2
- package/dist/esm/br-table-cell.entry.js +2 -2
- package/dist/esm/br-table-header-cell.entry.js +2 -2
- package/dist/esm/br-table-header.entry.js +2 -2
- package/dist/esm/br-table-row.entry.js +2 -2
- package/dist/esm/br-table.entry.js +2 -2
- package/dist/esm/br-tag.entry.js +5 -5
- package/dist/esm/br-textarea.entry.js +4 -4
- package/dist/esm/br-tooltip.entry.js +3 -3
- package/dist/esm/br-upload.entry.js +6 -22
- package/dist/esm/br-wizard-panel.entry.js +2 -2
- package/dist/esm/br-wizard.entry.js +2 -2
- package/dist/esm/{datetime-picker-constants-BtRPYRvA.js → datetime-picker-constants-1l4_-FEJ.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/{iconify-icon-D3usVJE2.js → iconify-icon-C_DC6oQW.js} +103 -57
- package/dist/esm/{index-BQPOWxe5.js → index-BQRBKuY0.js} +75 -28
- package/dist/esm/index-ConyRdJe.js +14 -14
- package/dist/esm/index.js +2 -2
- package/dist/esm/{datetime-picker-props-validation-BeTcUTnE.js → isValid-wU7S6MI2.js} +2 -477
- package/dist/esm/loader.js +1 -1
- package/dist/esm/select.utils-BYsh2ZdE.js +57 -0
- package/dist/esm/{slot-BIG-yees.js → slot-Bt01zQ7-.js} +1 -1
- package/dist/esm/webcomponents.js +1 -1
- package/dist/hydrate/index.js +4459 -3577
- package/dist/hydrate/index.mjs +4459 -3577
- package/dist/types/components/avatar/avatar.d.ts +20 -20
- package/dist/types/components/breadcrumb/breadcrumb-item/breadcrumb-item.d.ts +3 -11
- package/dist/types/components/breadcrumb/breadcrumb.d.ts +30 -25
- package/dist/types/components/breadcrumb/crumb/crumb.d.ts +1 -12
- package/dist/types/components/button/button.d.ts +20 -20
- package/dist/types/components/card/card.d.ts +19 -21
- package/dist/types/components/carousel/carousel-page/carousel-page.d.ts +2 -12
- package/dist/types/components/carousel/carousel.d.ts +22 -29
- package/dist/types/components/checkbox/checkbox.d.ts +16 -22
- package/dist/types/components/checkbox-group/checkbox-group.d.ts +17 -18
- package/dist/types/components/checkgroup/checkgroup.d.ts +1 -13
- package/dist/types/components/collapse/collapse.d.ts +24 -20
- package/dist/types/components/cookiebar/cookiebar-cookie/cookiebar-cookie.d.ts +2 -15
- package/dist/types/components/cookiebar/cookiebar-group/cookiebar-group.d.ts +2 -15
- package/dist/types/components/cookiebar/cookiebar-header/cookiebar-header.d.ts +2 -15
- package/dist/types/components/cookiebar/cookiebar-link/cookiebar-link.d.ts +2 -14
- package/dist/types/components/cookiebar/cookiebar-note/cookiebar-note.d.ts +2 -13
- package/dist/types/components/cookiebar/cookiebar-note-group/cookiebar-note-group.d.ts +2 -13
- package/dist/types/components/cookiebar/cookiebar.d.ts +30 -25
- package/dist/types/components/datetime-picker/date-picker/date-picker-locale.d.ts +20 -12
- 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 +313 -164
- 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 +226 -105
- 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 +510 -241
- 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 +123 -62
- package/dist/types/components/divider/divider.d.ts +14 -18
- package/dist/types/components/dropdown/dropdown.d.ts +21 -20
- package/dist/types/components/footer/footer-category/footer-category.d.ts +2 -15
- package/dist/types/components/footer/footer-item/footer-item.d.ts +2 -15
- package/dist/types/components/footer/footer-legal/footer-legal.d.ts +1 -15
- package/dist/types/components/footer/footer-logo/footer-logo.d.ts +2 -15
- package/dist/types/components/footer/footer-social/footer-social.d.ts +2 -14
- package/dist/types/components/footer/footer.d.ts +23 -27
- package/dist/types/components/header/header-function/header-function.d.ts +9 -13
- package/dist/types/components/header/header-link/header-link.d.ts +2 -15
- package/dist/types/components/header/header-list/header-list.d.ts +2 -15
- package/dist/types/components/header/header-logo/header-logo.d.ts +2 -15
- package/dist/types/components/header/header.d.ts +29 -26
- package/dist/types/components/icon/icon.d.ts +21 -16
- package/dist/types/components/input/input.d.ts +48 -23
- package/dist/types/components/input/input.types.d.ts +4 -0
- package/dist/types/components/item/item.d.ts +17 -21
- package/dist/types/components/link/link.d.ts +18 -22
- package/dist/types/components/list/list.d.ts +16 -20
- package/dist/types/components/loading/loading.d.ts +16 -23
- package/dist/types/components/magic-button/magic-button.d.ts +12 -19
- package/dist/types/components/menu/menu-group/menu-group.d.ts +2 -15
- package/dist/types/components/menu/menu-header/menu-header.d.ts +2 -15
- package/dist/types/components/menu/menu-info/menu-info.d.ts +1 -14
- package/dist/types/components/menu/menu-item/menu-item.d.ts +2 -15
- package/dist/types/components/menu/menu-link/menu-link.d.ts +4 -16
- package/dist/types/components/menu/menu-list/menu-list.d.ts +2 -15
- package/dist/types/components/menu/menu-logo/menu-logo.d.ts +1 -14
- package/dist/types/components/menu/menu-social/menu-social.d.ts +2 -15
- package/dist/types/components/menu/menu.d.ts +25 -32
- package/dist/types/components/message/message.d.ts +21 -24
- package/dist/types/components/modal/modal.d.ts +18 -21
- package/dist/types/components/notification/notification-body/notification-body.d.ts +2 -12
- package/dist/types/components/notification/notification-header/notification-header.d.ts +2 -13
- package/dist/types/components/notification/notification-item/notification-item.d.ts +2 -15
- package/dist/types/components/notification/notification.d.ts +18 -27
- package/dist/types/components/pagination/pagination.d.ts +13 -21
- package/dist/types/components/radio/radio.d.ts +15 -18
- package/dist/types/components/radio-group/radio-group.d.ts +18 -18
- package/dist/types/components/scrim/scrim.d.ts +12 -15
- package/dist/types/components/select/select-input/select-input.d.ts +20 -12
- package/dist/types/components/select/select-list/select-list.d.ts +27 -14
- package/dist/types/components/select/select-option/select-option.d.ts +6 -10
- package/dist/types/components/select/select.d.ts +75 -87
- 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/sign-in/sign-in.d.ts +11 -15
- package/dist/types/components/skip-link/skip-link-item/skip-link-item-alias.d.ts +7 -3
- package/dist/types/components/skip-link/skip-link-item/skip-link-item.d.ts +4 -14
- package/dist/types/components/skip-link/skip-link.d.ts +17 -23
- package/dist/types/components/slider/slider.d.ts +14 -24
- package/dist/types/components/step/step-item/step-item.d.ts +2 -12
- package/dist/types/components/step/step.d.ts +15 -24
- package/dist/types/components/switch/switch.d.ts +14 -18
- package/dist/types/components/tab/tab-item/tab-item.d.ts +4 -14
- package/dist/types/components/tab/tab.d.ts +19 -26
- package/dist/types/components/table/table-body/table-body.d.ts +2 -12
- package/dist/types/components/table/table-cell/table-cell.d.ts +2 -11
- package/dist/types/components/table/table-header/table-header.d.ts +2 -12
- package/dist/types/components/table/table-header-cell/table-header-cell.d.ts +2 -12
- package/dist/types/components/table/table-row/table-row.d.ts +2 -12
- package/dist/types/components/table/table.d.ts +24 -31
- package/dist/types/components/tag/tag.d.ts +15 -24
- package/dist/types/components/textarea/textarea.d.ts +13 -21
- package/dist/types/components/tooltip/tooltip.d.ts +12 -18
- package/dist/types/components/upload/upload.d.ts +20 -27
- package/dist/types/components/wizard/wizard-panel/wizard-panel.d.ts +2 -12
- package/dist/types/components/wizard/wizard.d.ts +21 -25
- package/dist/types/components.d.ts +3586 -5062
- package/dist/webcomponents/index.esm.js +1 -1
- package/dist/webcomponents/p-031a2256.entry.js +5 -0
- package/dist/webcomponents/p-0602e5b1.entry.js +5 -0
- package/dist/webcomponents/p-079d5f69.entry.js +5 -0
- package/dist/webcomponents/p-087ed5e7.entry.js +5 -0
- package/dist/webcomponents/p-0d5a9ebf.entry.js +5 -0
- package/dist/webcomponents/p-105b4d06.entry.js +5 -0
- package/dist/webcomponents/p-11d4edc5.entry.js +5 -0
- package/dist/webcomponents/p-12dd22af.entry.js +5 -0
- package/dist/webcomponents/p-14aedf0d.entry.js +5 -0
- package/dist/webcomponents/p-152482f9.entry.js +5 -0
- package/dist/webcomponents/p-19b4b1b7.entry.js +5 -0
- package/dist/webcomponents/p-1cd1126e.entry.js +5 -0
- package/dist/webcomponents/{p-BtRPYRvA.js → p-1l4_-FEJ.js} +1 -1
- package/dist/webcomponents/p-21e10074.entry.js +5 -0
- package/dist/webcomponents/p-2271ea84.entry.js +5 -0
- package/dist/webcomponents/p-271b1ede.entry.js +5 -0
- package/dist/webcomponents/p-28f732fc.entry.js +5 -0
- package/dist/webcomponents/{p-c1dafd8d.entry.js → p-2971d38a.entry.js} +1 -1
- package/dist/{components/p-DOJ1vYOl.js → webcomponents/p-2ac48875.entry.js} +1 -1
- package/dist/webcomponents/p-2b1a919c.entry.js +5 -0
- package/dist/webcomponents/p-2da57966.entry.js +5 -0
- package/dist/webcomponents/p-2e81b0b3.entry.js +5 -0
- package/dist/webcomponents/p-2eececed.entry.js +5 -0
- package/dist/webcomponents/{p-513ee754.entry.js → p-2f904c4a.entry.js} +1 -1
- package/dist/webcomponents/p-32414f1c.entry.js +5 -0
- package/dist/webcomponents/{p-5a7c2031.entry.js → p-324afbce.entry.js} +1 -1
- package/dist/webcomponents/p-32ea6342.entry.js +5 -0
- package/dist/webcomponents/p-330ec8ab.entry.js +5 -0
- package/dist/webcomponents/p-374f83b1.entry.js +5 -0
- package/dist/webcomponents/p-3926cc91.entry.js +5 -0
- package/dist/webcomponents/p-39a7826d.entry.js +5 -0
- package/dist/webcomponents/p-3bcc2c58.entry.js +5 -0
- package/dist/webcomponents/p-3c7ce0e4.entry.js +5 -0
- package/dist/webcomponents/p-467842ca.entry.js +5 -0
- package/dist/webcomponents/p-53550e8c.entry.js +5 -0
- package/dist/webcomponents/p-53e71a8a.entry.js +5 -0
- package/dist/webcomponents/p-5528b466.entry.js +5 -0
- package/dist/webcomponents/p-55e0822d.entry.js +5 -0
- package/dist/webcomponents/p-58bacbe1.entry.js +5 -0
- package/dist/webcomponents/p-5a5ed7d8.entry.js +5 -0
- package/dist/webcomponents/p-621f0fa8.entry.js +5 -0
- package/dist/webcomponents/p-6514a75d.entry.js +5 -0
- package/dist/webcomponents/{p-19a38e20.entry.js → p-678b43a6.entry.js} +1 -1
- package/dist/webcomponents/{p-CfuJQ1DY.js → p-6Da1SZ3J.js} +1 -1
- package/dist/webcomponents/p-6b6be415.entry.js +5 -0
- package/dist/webcomponents/{p-0d2ca2f7.entry.js → p-6d58ab4f.entry.js} +1 -1
- package/dist/webcomponents/p-6ff9b26e.entry.js +5 -0
- package/dist/webcomponents/p-84dfbfdd.entry.js +5 -0
- package/dist/webcomponents/{p-d5d2205c.entry.js → p-85c8d060.entry.js} +1 -1
- package/dist/webcomponents/p-913d6f28.entry.js +5 -0
- package/dist/webcomponents/{p-94848046.entry.js → p-975ea5c7.entry.js} +1 -1
- package/dist/webcomponents/p-992167bc.entry.js +5 -0
- package/dist/webcomponents/p-B7bNfmgh.js +5 -0
- package/dist/webcomponents/p-BYsh2ZdE.js +5 -0
- package/dist/webcomponents/p-C_DC6oQW.js +16 -0
- package/dist/webcomponents/{p-DV-iW9Aj.js → p-CpE_G6IZ.js} +1 -1
- package/dist/webcomponents/p-DnwERaeQ.js +5 -0
- package/dist/webcomponents/p-a21872bf.entry.js +5 -0
- package/dist/webcomponents/{p-0b0cf355.entry.js → p-a9f16a65.entry.js} +1 -1
- package/dist/webcomponents/p-b8d4ace3.entry.js +5 -0
- package/dist/webcomponents/{p-6850e98e.entry.js → p-bbcde1ea.entry.js} +1 -1
- package/dist/webcomponents/p-bbf47e78.entry.js +5 -0
- package/dist/webcomponents/p-bf35e506.entry.js +5 -0
- package/dist/webcomponents/{p-b02a7218.entry.js → p-c09af3cd.entry.js} +1 -1
- package/dist/webcomponents/p-c29268b5.entry.js +5 -0
- package/dist/webcomponents/p-c3e61c39.entry.js +5 -0
- package/dist/webcomponents/{p-b16590fc.entry.js → p-c6b2545a.entry.js} +1 -1
- package/dist/webcomponents/{p-b55425b7.entry.js → p-c6f2f17b.entry.js} +1 -1
- package/dist/webcomponents/p-cae39e13.entry.js +5 -0
- package/dist/webcomponents/p-cb1e08b1.entry.js +5 -0
- package/dist/webcomponents/{p-e94a52ac.entry.js → p-cb690a87.entry.js} +1 -1
- package/dist/webcomponents/p-d0be7243.entry.js +5 -0
- package/dist/webcomponents/p-d191c6e3.entry.js +5 -0
- package/dist/webcomponents/p-d205f3fd.entry.js +5 -0
- package/dist/webcomponents/p-d3bd2c40.entry.js +5 -0
- package/dist/webcomponents/{p-61977114.entry.js → p-dbeea64e.entry.js} +1 -1
- package/dist/webcomponents/p-df475129.entry.js +5 -0
- package/dist/webcomponents/p-e0ccf189.entry.js +5 -0
- package/dist/webcomponents/p-e121429a.entry.js +5 -0
- package/dist/webcomponents/p-e4b968b5.entry.js +5 -0
- package/dist/webcomponents/p-e661c024.entry.js +5 -0
- package/dist/webcomponents/p-e6c6f305.entry.js +5 -0
- package/dist/webcomponents/p-e8291be2.entry.js +5 -0
- package/dist/webcomponents/p-eb5806c7.entry.js +5 -0
- package/dist/webcomponents/{p-82759002.entry.js → p-ed3fa8ec.entry.js} +1 -1
- package/dist/webcomponents/p-f9084f16.entry.js +5 -0
- package/dist/webcomponents/{p-4118b878.entry.js → p-fad3aa61.entry.js} +1 -1
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +2 -2
- package/dist/collection/pages/components/select/remote.js +0 -33
- package/dist/collection/pages/components/select/virtualized.js +0 -13
- 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-D3usVJE2.js +0 -16
- 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-09817344.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-14ff5865.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-76d51654.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-D3usVJE2.js +0 -16
- 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-ce3d689c.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-e07e309d.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-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
- /package/dist/components/{p-5z6jgH1D.js → p-BNckUhK6.js} +0 -0
- /package/dist/webcomponents/{p-BIG-yees.js → p-Bt01zQ7-.js} +0 -0
|
@@ -12,99 +12,43 @@ import { reportInvalidPropValue } from "../../shared/utils/prop-warning";
|
|
|
12
12
|
import { resolveAllowedPropValue, resolveDensity, resolveIntegerPropValue, resolveNumberPropValue, } from "../../shared/utils/props";
|
|
13
13
|
import { hasAssignedSlotContent, hasNamedLightDomSlot } from "../../shared/utils/slot";
|
|
14
14
|
import { resolveFormValidator } from "../../shared/utils/validator";
|
|
15
|
-
import { transitionAllSelection, transitionSelection } from "./select.utils";
|
|
15
|
+
import { filterSelectOptions, SELECT_ALL_OPTION_VALUE, transitionAllSelection, transitionSelection, } from "./select.utils";
|
|
16
16
|
const SELECT_SEARCH_MODES = ['local', 'remote'];
|
|
17
17
|
const SELECT_AUTOCOMPLETE_VALUES = ['on', 'off'];
|
|
18
18
|
/**
|
|
19
|
-
* O
|
|
19
|
+
* O `br-select` permite escolher uma ou mais opções em uma lista suspensa expansível com suporte a busca e virtualização.
|
|
20
20
|
*
|
|
21
|
-
*
|
|
21
|
+
* Declare as opções com `<br-select-option>` no slot padrão, ou forneça os dados dinamicamente com o método `setOptions()`. Para seleção múltipla, use `multiple`. Para habilitar busca por digitação, use `filterable`.
|
|
22
22
|
*
|
|
23
|
-
*
|
|
24
|
-
* -
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* -
|
|
23
|
+
* ```html
|
|
24
|
+
* <br-select label="Estado" placeholder="Selecione um estado">
|
|
25
|
+
* <br-select-option value="df" label="Distrito Federal"></br-select-option>
|
|
26
|
+
* <br-select-option value="sp" label="São Paulo"></br-select-option>
|
|
27
|
+
* <br-select-option value="rj" label="Rio de Janeiro"></br-select-option>
|
|
28
|
+
* </br-select>
|
|
29
|
+
* ```
|
|
29
30
|
*
|
|
30
|
-
*
|
|
31
|
+
* Em formulários HTML, o componente integra-se nativamente via `ElementInternals`, enviando os valores selecionados no submit e validando campos obrigatórios com `required`.
|
|
31
32
|
*
|
|
32
|
-
*
|
|
33
|
-
* - O número de opções for moderado a grande (mais de 5 a 7 itens), onde listar todas diretamente na tela consumiria muito espaço visual.
|
|
34
|
-
* - For necessário filtrar opções por texto (digitação em lista longa).
|
|
35
|
-
* - As opções forem carregadas dinamicamente de uma API externa (busca remota/paginada).
|
|
36
|
-
* - O espaço no leiaute for restrito e exigir um controle compacto e expansível.
|
|
37
|
-
* - **Evite e prefira outro componente quando:**
|
|
38
|
-
* - Houver poucas opções fixas (de 2 a 4 opções mutuamente exclusivas): prefira `br-radio` ou `br-radio-group` para manter as alternativas imediatamente visíveis.
|
|
39
|
-
* - Houver uma escolha binária (sim/não, ativo/inativo): prefira `br-switch` ou `br-checkbox`.
|
|
40
|
-
* - Houver seleção múltipla com até 4 alternativas: prefira `br-checkbox` ou um grupo de checkboxes visíveis.
|
|
33
|
+
* ### Quando usar
|
|
41
34
|
*
|
|
42
|
-
*
|
|
35
|
+
* - Listas com 5 ou mais opções que ocupariam muito espaço visível se exibidas abertas.
|
|
36
|
+
* - Seleção que exige filtro ou busca por digitação.
|
|
37
|
+
* - Carregamento dinâmico ou remoto de opções a partir de uma API (`search-mode="remote"`).
|
|
43
38
|
*
|
|
44
|
-
*
|
|
39
|
+
* ### Quando evitar
|
|
45
40
|
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
* | `br-select` | **Orquestrador principal.** Gerencia o valor, ciclo de vida, acessibilidade, busca, formulário e renderização dos elementos internos. | Deve ser o único componente diretamente instanciado no template da aplicação. |
|
|
49
|
-
* | `br-select-input` | **Campo de acionamento.** Exibe o valor selecionado, o rótulo (`label`), o campo de busca/digitação e o botão de expandir/recolher. | Coordenado automaticamente pelo `br-select`; utilize isoladamente apenas em composições arquiteturais avançadas. |
|
|
50
|
-
* | `br-select-list` | **Lista suspensa virtualizada.** Contêiner flutuante que renderiza as opções de forma otimizada com suporte a rolagem e virtualização. | Gerenciada exclusivamente pelo `br-select`; não deve ser usada como controle autônomo. |
|
|
51
|
-
* | `br-select-option` | **Item individual de opção.** Representa um valor selecionável, exibindo texto, estado de seleção e checkbox/radio associado. | Deve ser declarado dentro do slot padrão do `br-select` para cada opção desejada. |
|
|
41
|
+
* - Poucas opções fixas (2 a 4 opções): use `br-radio` ou `br-radio-group`.
|
|
42
|
+
* - Escolha simples de sim/não: use `br-switch` ou `br-checkbox`.
|
|
52
43
|
*
|
|
53
|
-
*
|
|
54
|
-
* - `default`: Slot principal onde são passados os elementos `br-select-option`.
|
|
55
|
-
* - `feedback`: Slot para exibição de mensagens de validação (ex.: `br-message`).
|
|
56
|
-
* - `loading`: Slot para indicador de carregamento durante busca remota.
|
|
57
|
-
* - `validation-loading`: Slot para indicador visual durante validação assíncrona.
|
|
58
|
-
*
|
|
59
|
-
* ### Como fornecer opções
|
|
60
|
-
*
|
|
61
|
-
* O `br-select` possui uma API declarativa canônica e uma API imperativa para atualizações dinâmicas:
|
|
62
|
-
*
|
|
63
|
-
* 1. **Slot com `br-select-option`:** é a forma declarativa canônica para código novo. O pai lê os atributos e o conteúdo de cada opção e os transforma em dados para a lista. Em frameworks, a coleção também pode ser renderizada como vários elementos `br-select-option`.
|
|
64
|
-
* 2. **Método `setOptions()`:** substitui a coleção de forma imperativa e deve ser reservado para dados dinâmicos, especialmente respostas de busca remota. A lista recebe os objetos e cria internamente somente a janela visível de opções.
|
|
65
|
-
*
|
|
66
|
-
* `br-select-input` e `br-select-list` não substituem essas fontes. Eles são peças internas da composição: o primeiro controla o campo de acionamento e busca; o segundo recebe a coleção normalizada e renderiza a lista virtualizada.
|
|
67
|
-
*
|
|
68
|
-
* Evite misturar slot e dados imperativos sem necessidade. Na inicialização, opções declaradas no slot têm precedência quando existem. Depois que `options` é alterada ou `setOptions()` é chamado, a coleção imperativa passa a ser a fonte de dados e alterações posteriores no slot não são sincronizadas.
|
|
69
|
-
*
|
|
70
|
-
* A prop `options` é uma API legada e está depreciada. Ela continua funcionando apenas para preservar compatibilidade: no HTML, recebe uma string JSON; em JavaScript e frameworks, recebe um array por property binding. Não a adote em código novo; use `br-select-option` ou, para respostas dinâmicas/remotas, `setOptions()`.
|
|
71
|
-
*
|
|
72
|
-
* Cada objeto deve conter `value` string e pode conter `label`, `selected`, `disabled`, `indeterminate` e `content`. `content` é renderizado como HTML na lista; não use esse campo com conteúdo não confiável.
|
|
73
|
-
*
|
|
74
|
-
* ### O Conceito "Lego" e a Diferença entre os Componentes {#conceito-lego}
|
|
75
|
-
*
|
|
76
|
-
* O ecossistema de seleção do GovBR-DS foi projetado seguindo o **conceito de peças de Lego**: modular, flexível e combinável:
|
|
77
|
-
*
|
|
78
|
-
* 1. **`br-select` (Componente Principal / Modelo Pronto):**
|
|
79
|
-
* É o **componente principal**. Já vem montado com todas as peças essenciais integradas: o acionador (`br-select-input`), a lista flutuante virtualizada (`br-select-list`), a navegação por teclado e a integração nativa com formulários (`formAssociated`). Na quase totalidade das aplicações (99% dos casos), você deve usar apenas `<br-select>`.
|
|
80
|
-
*
|
|
81
|
-
* 2. **`br-select-option` (Peça de Conteúdo):**
|
|
82
|
-
* É a peça de Lego que você encaixa diretamente no slot padrão do `<br-select>` para definir cada valor selecionável.
|
|
83
|
-
*
|
|
84
|
-
* 3. **`br-select-input` e `br-select-list` (Subcomponentes Internos):**
|
|
85
|
-
* São as peças internas que formam a estrutura do `br-select`. No uso comum, **não devem ser declarados manualmente**, pois o `br-select` já os instancia e os sincroniza automaticamente.
|
|
86
|
-
*
|
|
87
|
-
* #### Quando usar apenas `<br-select>`?
|
|
88
|
-
* Use apenas `<br-select>` em quase todos os fluxos. Para opções fixas, declare os itens `<br-select-option>` no slot padrão; para opções dinâmicas, alimente a coleção com `setOptions()`. A prop `options` permanece disponível somente para compatibilidade legada.
|
|
89
|
-
*
|
|
90
|
-
* #### Quando montar os componentes separadamente?
|
|
91
|
-
* A montagem separada das peças avulsas de Lego (`br-select-input` + `br-select-list` + `br-select-option`) destina-se exclusivamente a **composições arquiteturais avançadas**, onde o leiaute exige desacoplar fisicamente o campo de acionamento da lista suspensa (ex.: campo de busca fixo na barra superior e a lista exibida dentro de um drawer ou modal lateral). Nesse caso, a aplicação precisa implementar manualmente a sincronização de foco, abertura, navegação por teclado e repasse de valor ao formulário.
|
|
92
|
-
*
|
|
93
|
-
* ### Como os subcomponentes se relacionam
|
|
94
|
-
*
|
|
95
|
-
* A arquitetura do `br-select` segue o padrão de **orquestrador centralizado**:
|
|
96
|
-
* 1. **O componente pai coordena o estado:** A aplicação declara o `<br-select>` com múltiplos `<br-select-option>` filhos ou usa `setOptions()` para dados dinâmicos. O `br-select` projeta internamente o `<br-select-input>` e a `<br-select-list>`, garantindo sincronia total de foco, estados de abertura, termos pesquisados e eventos. A prop `options` não é uma alternativa para código novo; existe somente para compatibilidade legada.
|
|
97
|
-
* 2. **Evite montagem manual desarticulada:** Tentar declarar manualmente `br-select-input` e `br-select-list` fora do `br-select` quebra as relações de acessibilidade WAI-ARIA (combobox, controles expandidos, aria-activedescendant) e desvincula o controle da validação nativa de formulários (`ElementInternals`).
|
|
98
|
-
* 3. **Comunicação por eventos:** Para busca remota ou resposta a seleção, a aplicação escuta os eventos disparados diretamente pelo `br-select` (`brSearch`, `change`, `input`), sem precisar interceptar nós internos da lista ou do campo de texto.
|
|
99
|
-
*
|
|
100
|
-
* Para a documentação completa de design, incluindo diretrizes de acessibilidade e especificações visuais, consulte o [Design System do GovBR](https://www.gov.br/ds/components/select?tab=designer).
|
|
44
|
+
* Consulte as [diretrizes de design do GovBR](https://www.gov.br/ds/components/select?tab=designer).
|
|
101
45
|
*
|
|
102
46
|
* @category Formulários, Seleção
|
|
103
47
|
* @status stable
|
|
104
48
|
* @slot default - Opções declaradas com elementos br-select-option.
|
|
105
49
|
* @slot feedback - Mensagem de validação, normalmente um br-message.
|
|
106
50
|
* @slot validation-loading - Indicador exibido durante validação assíncrona.
|
|
107
|
-
* @slot loading - Indicador exibido
|
|
51
|
+
* @slot loading - Indicador exibido na lista enquanto `loading` está ativo. Padrão: spinner com o texto "Pesquisando…"; aceita texto, imagem ou qualquer HTML.
|
|
108
52
|
*
|
|
109
53
|
* @part container - Contêiner visual principal do select.
|
|
110
54
|
* @part input - Campo de seleção e busca.
|
|
@@ -115,6 +59,7 @@ const SELECT_AUTOCOMPLETE_VALUES = ['on', 'off'];
|
|
|
115
59
|
* @part input-icon - Ícone do campo.
|
|
116
60
|
* @part input-action - Botão de abertura e fechamento.
|
|
117
61
|
* @part input-action-button - Botão interno da ação.
|
|
62
|
+
* @part input-clear - Botão de limpar o termo digitado durante a busca.
|
|
118
63
|
* @part list - Lista de opções.
|
|
119
64
|
* @part option - Opção individual.
|
|
120
65
|
* @part option-group - Cabeçalho visual de um grupo de opções.
|
|
@@ -143,6 +88,7 @@ export class Select {
|
|
|
143
88
|
/**
|
|
144
89
|
* Define a densidade visual compartilhada pelo campo e pela lista de opções.
|
|
145
90
|
* Aceita `small`, `medium` ou `large`. Valores inválidos usam `medium`.
|
|
91
|
+
* A opção sintética de selecionar todos permanece com densidade `small`.
|
|
146
92
|
*
|
|
147
93
|
* @default 'medium'
|
|
148
94
|
*/
|
|
@@ -198,6 +144,11 @@ export class Select {
|
|
|
198
144
|
* @default 1
|
|
199
145
|
*/
|
|
200
146
|
this.overscan = 1;
|
|
147
|
+
/**
|
|
148
|
+
* Oculta os divisores entre opções consecutivas, sem alterar a altura das linhas.
|
|
149
|
+
* @default false
|
|
150
|
+
*/
|
|
151
|
+
this.hideDividers = false;
|
|
201
152
|
/**
|
|
202
153
|
* Controla o estado aberto/fechado da lista.
|
|
203
154
|
*
|
|
@@ -244,24 +195,36 @@ export class Select {
|
|
|
244
195
|
this.filterable = true;
|
|
245
196
|
/**
|
|
246
197
|
* Define se as opções são filtradas localmente ou fornecidas por uma busca remota.
|
|
247
|
-
* Em `remote`, o componente emite `brSelectSearch
|
|
248
|
-
*
|
|
198
|
+
* Em `remote`, o componente emite `brSelectSearch` e exibe as opções recebidas
|
|
199
|
+
* sem filtrá-las de novo pelo termo digitado; a aplicação deve buscar, validar e
|
|
200
|
+
* aplicar a resposta com `setOptions()` ou re-renderizando os `br-select-option`.
|
|
201
|
+
* A seleção é preservada mesmo quando não aparece na resposta seguinte.
|
|
249
202
|
* @default 'local'
|
|
250
203
|
*/
|
|
251
204
|
this.searchMode = 'local';
|
|
252
205
|
/**
|
|
253
206
|
* Indica que uma busca remota de opções está pendente.
|
|
254
|
-
* Enquanto ativo,
|
|
255
|
-
*
|
|
207
|
+
* Enquanto ativo, a lista exibe o slot `loading` (padrão: "Pesquisando…") e novas
|
|
208
|
+
* opções não podem ser selecionadas; a aplicação continua responsável por
|
|
209
|
+
* debounce, cancelamento, erros e autenticação.
|
|
256
210
|
* @default false
|
|
257
211
|
*/
|
|
258
212
|
this.loading = false;
|
|
259
213
|
/**
|
|
260
|
-
* Exibe o
|
|
214
|
+
* Exibe a lupa mesmo quando o select não é filtrável; selects com `filterable`
|
|
215
|
+
* já a exibem. A lupa é omitida quando o campo é estreito demais (menos de
|
|
216
|
+
* 128px) para comportar lupa, valor e seta.
|
|
261
217
|
*
|
|
262
218
|
* @default false
|
|
263
219
|
*/
|
|
264
220
|
this.showSearchIcon = false;
|
|
221
|
+
/**
|
|
222
|
+
* Oculta a lupa mesmo quando `filterable` está ativo, sem desabilitar a busca.
|
|
223
|
+
* Tem precedência visual sobre `showSearchIcon` e não altera o comportamento padrão.
|
|
224
|
+
*
|
|
225
|
+
* @default false
|
|
226
|
+
*/
|
|
227
|
+
this.hideSearchIcon = false;
|
|
265
228
|
/**
|
|
266
229
|
* Rótulo apresentado quando todas as opções já estão selecionadas no modo múltiplo.
|
|
267
230
|
*
|
|
@@ -292,6 +255,8 @@ export class Select {
|
|
|
292
255
|
/** Quantidade máxima de opções selecionadas no modo múltiplo. Deve ser um inteiro não negativo; valores inválidos usam 0. */
|
|
293
256
|
this.maxSelections = 0;
|
|
294
257
|
this.shouldRestoreSelectedOptionOnOpen = false;
|
|
258
|
+
this.isSelectInputPointerDown = false;
|
|
259
|
+
this.skipSelectInputClickToggle = false;
|
|
295
260
|
this.pendingOptions = null;
|
|
296
261
|
this.slotElement = null;
|
|
297
262
|
this.handleSlotChange = () => this.slotReconciler.schedule();
|
|
@@ -300,7 +265,15 @@ export class Select {
|
|
|
300
265
|
this.isStateChangeReady = false;
|
|
301
266
|
this.isValueChangeReady = false;
|
|
302
267
|
this.listboxId = `${this.customId}-listbox`;
|
|
268
|
+
this.checkingValidity = false;
|
|
269
|
+
this.showValidationErrors = false;
|
|
270
|
+
this.validationErrorMessage = '';
|
|
303
271
|
this.activeOptionIndex = -1;
|
|
272
|
+
/**
|
|
273
|
+
* Oculta o indicador visual da opção ativa após interação por ponteiro, como `:focus-visible`.
|
|
274
|
+
* O índice ativo e o `aria-activedescendant` são preservados; o teclado volta a exibi-lo.
|
|
275
|
+
*/
|
|
276
|
+
this.isActiveIndicatorHidden = false;
|
|
304
277
|
this.searchTerm = '';
|
|
305
278
|
this.formDisabled = false;
|
|
306
279
|
this.isValidating = false;
|
|
@@ -316,8 +289,9 @@ export class Select {
|
|
|
316
289
|
this.hasImperativeOptions = false;
|
|
317
290
|
this.remoteSelectedOptions = new Map();
|
|
318
291
|
this.selectionInitialized = false;
|
|
292
|
+
this.typeAhead = '';
|
|
293
|
+
this.lastTypeAheadTime = 0;
|
|
319
294
|
this.selectedValues = [];
|
|
320
|
-
this.suppressFocusOpen = false;
|
|
321
295
|
/**
|
|
322
296
|
* Sincroniza as opções declaradas no slot com a lista interna renderizada.
|
|
323
297
|
*
|
|
@@ -341,6 +315,8 @@ export class Select {
|
|
|
341
315
|
this.formDisabled = disabled;
|
|
342
316
|
}
|
|
343
317
|
formResetCallback() {
|
|
318
|
+
this.showValidationErrors = false;
|
|
319
|
+
this.validationErrorMessage = '';
|
|
344
320
|
this.validationRunId++;
|
|
345
321
|
this.validatorMessage = null;
|
|
346
322
|
this.customValidationMessage = '';
|
|
@@ -368,6 +344,13 @@ export class Select {
|
|
|
368
344
|
get effectiveOverscan() {
|
|
369
345
|
return resolveIntegerPropValue(this.el, 'overscan', this.overscan, 0, Number.MAX_SAFE_INTEGER, 1);
|
|
370
346
|
}
|
|
347
|
+
/**
|
|
348
|
+
* Termo repassado à lista. Ela só filtra no modo local; no remoto, usa o termo
|
|
349
|
+
* apenas para exibir a mensagem de lista vazia.
|
|
350
|
+
*/
|
|
351
|
+
get listSearchTerm() {
|
|
352
|
+
return this.filterable ? this.searchTerm : '';
|
|
353
|
+
}
|
|
371
354
|
get effectiveSearchMode() {
|
|
372
355
|
return resolveAllowedPropValue(this.el, 'searchMode', this.searchMode, SELECT_SEARCH_MODES, 'local');
|
|
373
356
|
}
|
|
@@ -476,7 +459,7 @@ export class Select {
|
|
|
476
459
|
const anySelected = selectable.some((option) => Boolean(option.selected));
|
|
477
460
|
return [
|
|
478
461
|
{
|
|
479
|
-
value:
|
|
462
|
+
value: SELECT_ALL_OPTION_VALUE,
|
|
480
463
|
label: allSelected ? this.unselectAllLabel : this.selectAllLabel,
|
|
481
464
|
selected: allSelected,
|
|
482
465
|
indeterminate: anySelected && !allSelected,
|
|
@@ -554,14 +537,33 @@ export class Select {
|
|
|
554
537
|
this.cleanupBlockingSurfaceDismissal?.();
|
|
555
538
|
this.cleanupBlockingSurfaceDismissal = undefined;
|
|
556
539
|
}
|
|
540
|
+
handleSelectFocusOut(event) {
|
|
541
|
+
if (!this.getEventPath(event).includes(this.selectInputElement))
|
|
542
|
+
return;
|
|
543
|
+
// Aguarda o foco atravessar os Shadow Roots antes de decidir se saiu do select.
|
|
544
|
+
queueMicrotask(() => {
|
|
545
|
+
if (!this.el.isConnected || this.el.matches(':focus-within') || this.isDisabled())
|
|
546
|
+
return;
|
|
547
|
+
void this.validate();
|
|
548
|
+
});
|
|
549
|
+
}
|
|
550
|
+
handleSelectInvalid(event) {
|
|
551
|
+
if (event.target !== this.el || this.checkingValidity)
|
|
552
|
+
return;
|
|
553
|
+
this.showValidationErrors = true;
|
|
554
|
+
void this.syncComboboxAccessibility();
|
|
555
|
+
}
|
|
557
556
|
handleSelectInputFocus() {
|
|
558
|
-
this.
|
|
559
|
-
if (this.suppressFocusOpen)
|
|
557
|
+
if (this.effectiveOpen)
|
|
560
558
|
return;
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
559
|
+
this.activeOptionIndex = -1;
|
|
560
|
+
this.skipSelectInputClickToggle = this.isSelectInputPointerDown;
|
|
561
|
+
void this.show();
|
|
562
|
+
}
|
|
563
|
+
handleSelectPointerDown(event) {
|
|
564
|
+
this.isActiveIndicatorHidden = true;
|
|
565
|
+
this.skipSelectInputClickToggle = false;
|
|
566
|
+
this.isSelectInputPointerDown = this.getEventPath(event).includes(this.selectInputElement);
|
|
565
567
|
}
|
|
566
568
|
handleSelectInputValueChange(event) {
|
|
567
569
|
if (!this.filterable || this.isDisabled())
|
|
@@ -575,27 +577,33 @@ export class Select {
|
|
|
575
577
|
* alcance a lista interna. Isso evita depender apenas da remoção/atualização
|
|
576
578
|
* do atributo `search-term` no custom element.
|
|
577
579
|
*/
|
|
578
|
-
void this.getSelectListController()?.setSearchTerm?.(
|
|
580
|
+
void this.getSelectListController()?.setSearchTerm?.(this.listSearchTerm);
|
|
579
581
|
if (!this.effectiveOpen) {
|
|
580
582
|
void this.show();
|
|
581
583
|
}
|
|
582
584
|
}
|
|
583
585
|
handleSelectInputActionClick() {
|
|
586
|
+
// O botão de ação fica dentro do campo: o foco do mesmo clique já abriu a lista.
|
|
587
|
+
if (this.consumeFocusOpenClick())
|
|
588
|
+
return;
|
|
584
589
|
this.toggleOpenFromPointer();
|
|
585
590
|
}
|
|
586
591
|
handleSelectInputClick() {
|
|
592
|
+
if (this.consumeFocusOpenClick())
|
|
593
|
+
return;
|
|
587
594
|
if (this.filterable) {
|
|
588
|
-
if (!this.effectiveOpen)
|
|
589
|
-
this.shouldRestoreSelectedOptionOnOpen = true;
|
|
595
|
+
if (!this.effectiveOpen)
|
|
590
596
|
void this.show();
|
|
591
|
-
}
|
|
592
597
|
return;
|
|
593
598
|
}
|
|
594
|
-
this.
|
|
599
|
+
this.shouldRestoreSelectedOptionOnOpen = true;
|
|
600
|
+
void this.toggleOpenFromPointer();
|
|
595
601
|
}
|
|
596
|
-
handleSelectOptionStateChange(event) {
|
|
602
|
+
handleSelectOptionStateChange(event, restoreFocus = true) {
|
|
597
603
|
event.stopPropagation();
|
|
598
604
|
const detail = event.detail;
|
|
605
|
+
if (detail.disabled)
|
|
606
|
+
return;
|
|
599
607
|
// Use a lista interna para preservar rótulos e opções remotas enquanto as
|
|
600
608
|
// props projetadas aguardam a próxima renderização.
|
|
601
609
|
const listOptions = this.getSelectListController()?.options;
|
|
@@ -608,9 +616,9 @@ export class Select {
|
|
|
608
616
|
// partir do valor do evento evita que esse snapshot reapareça no valor
|
|
609
617
|
// público ou no formulário.
|
|
610
618
|
const selectableValues = sourceOptions
|
|
611
|
-
.filter((option) => !this.
|
|
619
|
+
.filter((option) => !this.isSelectAllOption(option) && !option.disabled)
|
|
612
620
|
.map((option) => option.value);
|
|
613
|
-
const transition = this.
|
|
621
|
+
const transition = this.isSelectAllOption(detail)
|
|
614
622
|
? transitionAllSelection(this.selectedValues, Boolean(detail.selected), selectableValues)
|
|
615
623
|
: transitionSelection({
|
|
616
624
|
currentValues: this.selectedValues,
|
|
@@ -629,15 +637,12 @@ export class Select {
|
|
|
629
637
|
this.syncActiveOptionIndex(event.detail);
|
|
630
638
|
this.emitStateChange(detail);
|
|
631
639
|
this.updateValidity();
|
|
632
|
-
if (!
|
|
633
|
-
return;
|
|
634
|
-
if (!this.effectiveMultiple) {
|
|
635
|
-
this.suppressFocusOpen = true;
|
|
640
|
+
if (!this.effectiveMultiple && restoreFocus) {
|
|
636
641
|
void this.selectInputElement?.setFocus?.();
|
|
637
|
-
void this.close()
|
|
638
|
-
this.suppressFocusOpen = false;
|
|
639
|
-
});
|
|
642
|
+
void this.close();
|
|
640
643
|
}
|
|
644
|
+
if (!transition.changed)
|
|
645
|
+
return;
|
|
641
646
|
dispatchNativeFormEvent(this.el, 'input');
|
|
642
647
|
dispatchNativeFormEvent(this.el, 'change');
|
|
643
648
|
}
|
|
@@ -663,13 +668,31 @@ export class Select {
|
|
|
663
668
|
}
|
|
664
669
|
// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: centraliza a navegação por teclado do componente.
|
|
665
670
|
async handleKeyDown(event) {
|
|
666
|
-
if (this.isDisabled())
|
|
671
|
+
if (this.isDisabled() || event.isComposing)
|
|
667
672
|
return;
|
|
668
673
|
const path = this.getEventPath(event);
|
|
669
674
|
const isFromInput = path.includes(this.selectInputElement);
|
|
670
675
|
const isFromList = path.includes(this.selectListElement);
|
|
671
676
|
if (!isFromInput && !isFromList)
|
|
672
677
|
return;
|
|
678
|
+
this.isActiveIndicatorHidden = false;
|
|
679
|
+
if (event.altKey && event.key === 'ArrowDown') {
|
|
680
|
+
if (!this.effectiveOpen) {
|
|
681
|
+
event.preventDefault();
|
|
682
|
+
await this.show();
|
|
683
|
+
}
|
|
684
|
+
return;
|
|
685
|
+
}
|
|
686
|
+
if (event.altKey && event.key === 'ArrowUp') {
|
|
687
|
+
if (this.effectiveOpen) {
|
|
688
|
+
event.preventDefault();
|
|
689
|
+
await this.close();
|
|
690
|
+
this.activeOptionIndex = -1;
|
|
691
|
+
}
|
|
692
|
+
return;
|
|
693
|
+
}
|
|
694
|
+
if (event.altKey || event.ctrlKey || event.metaKey)
|
|
695
|
+
return;
|
|
673
696
|
switch (event.key) {
|
|
674
697
|
case 'ArrowDown':
|
|
675
698
|
event.preventDefault();
|
|
@@ -680,29 +703,39 @@ export class Select {
|
|
|
680
703
|
await this.openAndFocusBoundary(isFromInput, -1);
|
|
681
704
|
return;
|
|
682
705
|
case 'Home':
|
|
683
|
-
if (
|
|
706
|
+
if (isFromInput && this.filterable)
|
|
684
707
|
return;
|
|
685
708
|
event.preventDefault();
|
|
686
|
-
|
|
709
|
+
if (!this.effectiveOpen)
|
|
710
|
+
await this.show();
|
|
711
|
+
await this.focusOptionByIndex(this.getNavigableOptions().findIndex((option) => !option.disabled));
|
|
687
712
|
return;
|
|
688
713
|
case 'End':
|
|
689
|
-
if (
|
|
714
|
+
if (isFromInput && this.filterable)
|
|
690
715
|
return;
|
|
691
716
|
event.preventDefault();
|
|
692
|
-
|
|
717
|
+
if (!this.effectiveOpen)
|
|
718
|
+
await this.show();
|
|
719
|
+
await this.focusOptionByIndex(this.getNavigableOptions()
|
|
720
|
+
.map((option) => !option.disabled)
|
|
721
|
+
.lastIndexOf(true), true);
|
|
693
722
|
return;
|
|
694
723
|
case 'Enter':
|
|
695
724
|
case ' ':
|
|
696
725
|
if (isFromInput && this.filterable && event.key === ' ') {
|
|
697
726
|
return;
|
|
698
727
|
}
|
|
699
|
-
|
|
728
|
+
// No campo editável fechado, Enter mantém a ação nativa do formulário.
|
|
729
|
+
if (isFromInput && this.filterable && event.key === 'Enter' && !this.effectiveOpen)
|
|
700
730
|
return;
|
|
701
|
-
}
|
|
702
731
|
event.preventDefault();
|
|
703
732
|
if (!this.effectiveOpen) {
|
|
704
733
|
await this.show();
|
|
705
|
-
|
|
734
|
+
return;
|
|
735
|
+
}
|
|
736
|
+
if (this.activeOptionIndex < 0) {
|
|
737
|
+
await this.close();
|
|
738
|
+
this.activeOptionIndex = -1;
|
|
706
739
|
return;
|
|
707
740
|
}
|
|
708
741
|
await this.selectFocusedOption();
|
|
@@ -722,6 +755,10 @@ export class Select {
|
|
|
722
755
|
this.activeOptionIndex = -1;
|
|
723
756
|
return;
|
|
724
757
|
default:
|
|
758
|
+
if (!this.filterable && event.key.length === 1 && event.key !== ' ') {
|
|
759
|
+
event.preventDefault();
|
|
760
|
+
await this.focusOptionByTypedCharacters(event.key);
|
|
761
|
+
}
|
|
725
762
|
return;
|
|
726
763
|
}
|
|
727
764
|
}
|
|
@@ -769,6 +806,7 @@ export class Select {
|
|
|
769
806
|
this.open = false;
|
|
770
807
|
else
|
|
771
808
|
this.isOpen = false;
|
|
809
|
+
this.typeAhead = '';
|
|
772
810
|
this.clearSearch();
|
|
773
811
|
}
|
|
774
812
|
/**
|
|
@@ -817,9 +855,18 @@ export class Select {
|
|
|
817
855
|
await this.selectInputElement?.setFocus?.();
|
|
818
856
|
}
|
|
819
857
|
async checkValidity() {
|
|
820
|
-
|
|
858
|
+
this.checkingValidity = true;
|
|
859
|
+
try {
|
|
860
|
+
return this.elementInternals?.checkValidity?.() ?? true;
|
|
861
|
+
}
|
|
862
|
+
finally {
|
|
863
|
+
this.checkingValidity = false;
|
|
864
|
+
}
|
|
821
865
|
}
|
|
822
866
|
async reportValidity() {
|
|
867
|
+
this.showValidationErrors = true;
|
|
868
|
+
this.updateValidity();
|
|
869
|
+
await this.syncComboboxAccessibility();
|
|
823
870
|
return this.elementInternals?.reportValidity?.() ?? true;
|
|
824
871
|
}
|
|
825
872
|
async setCustomValidity(message) {
|
|
@@ -830,6 +877,9 @@ export class Select {
|
|
|
830
877
|
return getFormValidationState(this.elementInternals);
|
|
831
878
|
}
|
|
832
879
|
async validate() {
|
|
880
|
+
this.showValidationErrors = true;
|
|
881
|
+
this.updateValidity();
|
|
882
|
+
await this.syncComboboxAccessibility();
|
|
833
883
|
const validator = this.resolveValidator();
|
|
834
884
|
if (!validator || this.isDisabled())
|
|
835
885
|
return this.checkValidity();
|
|
@@ -936,11 +986,19 @@ export class Select {
|
|
|
936
986
|
const inner = this.extractInnerTextFromOption(el);
|
|
937
987
|
const content = (el.innerHTML || '').trim();
|
|
938
988
|
const selected = el.hasAttribute('selected') || Boolean(el.selected);
|
|
989
|
+
const disabled = el.hasAttribute('disabled') || Boolean(el.disabled);
|
|
939
990
|
if (!value && inner)
|
|
940
991
|
value = inner.trim();
|
|
941
992
|
if (!label)
|
|
942
993
|
label = inner?.trim() || value;
|
|
943
|
-
return {
|
|
994
|
+
return {
|
|
995
|
+
value: value || '',
|
|
996
|
+
label: label || undefined,
|
|
997
|
+
group,
|
|
998
|
+
selected,
|
|
999
|
+
disabled,
|
|
1000
|
+
content: content || undefined,
|
|
1001
|
+
};
|
|
944
1002
|
}
|
|
945
1003
|
getOptionElementGroup(el) {
|
|
946
1004
|
return String(el.getAttribute('group') ?? el.group ?? '').trim() || undefined;
|
|
@@ -1142,6 +1200,7 @@ export class Select {
|
|
|
1142
1200
|
: '';
|
|
1143
1201
|
nativeSelect.setCustomValidity(this.customValidationMessage || this.validatorMessage || selectionMessage);
|
|
1144
1202
|
syncNativeFormValidity(this.elementInternals, nativeSelect);
|
|
1203
|
+
void this.syncComboboxAccessibility();
|
|
1145
1204
|
}
|
|
1146
1205
|
getNativeSelect() {
|
|
1147
1206
|
return (this.el.shadowRoot?.querySelector('select[part="hidden-select"]') ??
|
|
@@ -1158,10 +1217,38 @@ export class Select {
|
|
|
1158
1217
|
*
|
|
1159
1218
|
* @returns O id da opção ativa ou `undefined` quando a lista está fechada.
|
|
1160
1219
|
*/
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1220
|
+
async syncComboboxAccessibility() {
|
|
1221
|
+
const nativeSelect = this.getNativeSelect();
|
|
1222
|
+
const invalid = this.showValidationErrors && Boolean(nativeSelect && !nativeSelect.validity.valid);
|
|
1223
|
+
const errorMessage = !invalid
|
|
1224
|
+
? ''
|
|
1225
|
+
: nativeSelect?.validity.customError
|
|
1226
|
+
? nativeSelect.validationMessage
|
|
1227
|
+
: nativeSelect?.validity.valueMissing
|
|
1228
|
+
? 'Este campo é obrigatório.'
|
|
1229
|
+
: nativeSelect?.validationMessage || '';
|
|
1230
|
+
this.validationErrorMessage = errorMessage;
|
|
1231
|
+
await this.selectInputElement?.syncCombobox?.({
|
|
1232
|
+
options: this.getNavigableOptions(),
|
|
1233
|
+
activeIndex: this.effectiveOpen ? this.activeOptionIndex : -1,
|
|
1234
|
+
expanded: this.effectiveOpen,
|
|
1235
|
+
multiple: this.effectiveMultiple,
|
|
1236
|
+
label: this.getAccessibleLabel(),
|
|
1237
|
+
loading: this.loading,
|
|
1238
|
+
required: this.required,
|
|
1239
|
+
invalid,
|
|
1240
|
+
errorMessage,
|
|
1241
|
+
});
|
|
1242
|
+
}
|
|
1243
|
+
/**
|
|
1244
|
+
* Indica se o clique atual foi o mesmo que deu foco ao campo e abriu a lista,
|
|
1245
|
+
* limpando o estado do ponteiro. Esse clique não deve alternar a lista de novo.
|
|
1246
|
+
*/
|
|
1247
|
+
consumeFocusOpenClick() {
|
|
1248
|
+
const skip = this.skipSelectInputClickToggle;
|
|
1249
|
+
this.skipSelectInputClickToggle = false;
|
|
1250
|
+
this.isSelectInputPointerDown = false;
|
|
1251
|
+
return skip;
|
|
1165
1252
|
}
|
|
1166
1253
|
toggleOpenFromPointer() {
|
|
1167
1254
|
if (!this.effectiveOpen) {
|
|
@@ -1189,6 +1276,7 @@ export class Select {
|
|
|
1189
1276
|
async openAndFocusBoundary(fromInput, direction) {
|
|
1190
1277
|
if (!this.effectiveOpen) {
|
|
1191
1278
|
await this.show();
|
|
1279
|
+
await this.selectListElement?.open?.();
|
|
1192
1280
|
await this.focusInitialOption(direction);
|
|
1193
1281
|
return;
|
|
1194
1282
|
}
|
|
@@ -1198,17 +1286,55 @@ export class Select {
|
|
|
1198
1286
|
}
|
|
1199
1287
|
await this.moveActiveOption(direction);
|
|
1200
1288
|
}
|
|
1289
|
+
async focusOptionByTypedCharacters(character) {
|
|
1290
|
+
const now = Date.now();
|
|
1291
|
+
this.typeAhead = now - this.lastTypeAheadTime < 700 ? this.typeAhead + character : character;
|
|
1292
|
+
this.lastTypeAheadTime = now;
|
|
1293
|
+
const options = this.getNavigableOptions();
|
|
1294
|
+
if (!options.length)
|
|
1295
|
+
return;
|
|
1296
|
+
const normalize = (value) => value
|
|
1297
|
+
.normalize('NFD')
|
|
1298
|
+
.replace(/[\u0300-\u036f]/g, '')
|
|
1299
|
+
.toLocaleLowerCase('pt-BR');
|
|
1300
|
+
const search = (query) => {
|
|
1301
|
+
for (let offset = 1; offset <= options.length; offset++) {
|
|
1302
|
+
const index = (this.activeOptionIndex + offset + options.length) % options.length;
|
|
1303
|
+
const option = options[index];
|
|
1304
|
+
if (!option.disabled && normalize(this.getOptionLabel(option)).startsWith(normalize(query)))
|
|
1305
|
+
return index;
|
|
1306
|
+
}
|
|
1307
|
+
return -1;
|
|
1308
|
+
};
|
|
1309
|
+
let index = search(this.typeAhead);
|
|
1310
|
+
if (index < 0 && /^(.)(\1)+$/u.test(this.typeAhead))
|
|
1311
|
+
index = search(character);
|
|
1312
|
+
if (index < 0)
|
|
1313
|
+
return;
|
|
1314
|
+
if (!this.effectiveOpen)
|
|
1315
|
+
await this.show();
|
|
1316
|
+
await this.focusOptionByIndex(index);
|
|
1317
|
+
}
|
|
1201
1318
|
/**
|
|
1202
|
-
* Define qual opção deve receber foco ao abrir
|
|
1319
|
+
* Define qual opção deve receber foco ao abrir ou iniciar a navegação pelo teclado.
|
|
1203
1320
|
*
|
|
1204
|
-
* @param direction Direção inicial da navegação. `1`
|
|
1321
|
+
* @param direction Direção inicial da navegação. `1` avança e `-1` recua.
|
|
1205
1322
|
*/
|
|
1206
1323
|
async focusInitialOption(direction) {
|
|
1207
1324
|
const options = this.getNavigableOptions();
|
|
1208
1325
|
if (options.length === 0)
|
|
1209
1326
|
return;
|
|
1210
|
-
const selectedIndex = options.findIndex((option) => Boolean(option.selected));
|
|
1211
|
-
|
|
1327
|
+
const selectedIndex = options.findIndex((option) => !option.disabled && !this.isSelectAllOption(option) && Boolean(option.selected));
|
|
1328
|
+
if (selectedIndex >= 0) {
|
|
1329
|
+
let nextIndex = selectedIndex + direction;
|
|
1330
|
+
while (nextIndex >= 0 && nextIndex < options.length && options[nextIndex].disabled)
|
|
1331
|
+
nextIndex += direction;
|
|
1332
|
+
await this.focusOptionByIndex(nextIndex >= 0 && nextIndex < options.length ? nextIndex : selectedIndex, true);
|
|
1333
|
+
return;
|
|
1334
|
+
}
|
|
1335
|
+
const fallbackIndex = direction > 0
|
|
1336
|
+
? options.findIndex((option) => !option.disabled)
|
|
1337
|
+
: options.map((option) => !option.disabled).lastIndexOf(true);
|
|
1212
1338
|
const initialIndex = selectedIndex >= 0 ? selectedIndex : fallbackIndex;
|
|
1213
1339
|
await this.focusOptionByIndex(initialIndex);
|
|
1214
1340
|
}
|
|
@@ -1217,8 +1343,11 @@ export class Select {
|
|
|
1217
1343
|
if (options.length === 0)
|
|
1218
1344
|
return;
|
|
1219
1345
|
const baseIndex = this.getCurrentActiveIndex();
|
|
1220
|
-
|
|
1221
|
-
|
|
1346
|
+
let nextIndex = baseIndex + step;
|
|
1347
|
+
while (nextIndex >= 0 && nextIndex < options.length && options[nextIndex].disabled)
|
|
1348
|
+
nextIndex += step;
|
|
1349
|
+
if (nextIndex >= 0 && nextIndex < options.length)
|
|
1350
|
+
await this.focusOptionByIndex(nextIndex);
|
|
1222
1351
|
}
|
|
1223
1352
|
/**
|
|
1224
1353
|
* Resolve o índice ativo atual a partir do estado local ou da opção já selecionada.
|
|
@@ -1229,47 +1358,45 @@ export class Select {
|
|
|
1229
1358
|
if (this.activeOptionIndex >= 0)
|
|
1230
1359
|
return this.activeOptionIndex;
|
|
1231
1360
|
const options = this.getNavigableOptions();
|
|
1232
|
-
const selectedIndex = options.findIndex((option) => Boolean(option.selected));
|
|
1361
|
+
const selectedIndex = options.findIndex((option) => !option.disabled && !this.isSelectAllOption(option) && Boolean(option.selected));
|
|
1233
1362
|
return selectedIndex >= 0 ? selectedIndex : 0;
|
|
1234
1363
|
}
|
|
1235
1364
|
/**
|
|
1236
1365
|
* Encaminha o foco lógico para uma opção específica da lista interna.
|
|
1237
1366
|
*
|
|
1238
1367
|
* @param index Índice da opção que deve receber foco.
|
|
1368
|
+
* @param scrollToTop Posiciona a opção no topo da viewport quando verdadeiro.
|
|
1239
1369
|
*/
|
|
1240
|
-
async focusOptionByIndex(index) {
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1370
|
+
async focusOptionByIndex(index, scrollToTop = false) {
|
|
1371
|
+
if (!this.getNavigableOptions()[index] || this.getNavigableOptions()[index].disabled)
|
|
1372
|
+
return;
|
|
1373
|
+
this.activeOptionIndex = index;
|
|
1374
|
+
const listController = this.getSelectListController();
|
|
1375
|
+
if (scrollToTop)
|
|
1376
|
+
await listController?.scrollOptionToTop?.(index);
|
|
1377
|
+
else
|
|
1378
|
+
await listController?.revealOption?.(index);
|
|
1245
1379
|
}
|
|
1246
1380
|
/**
|
|
1247
1381
|
* Seleciona a opção atualmente ativa sem duplicar a lógica de seleção da lista.
|
|
1248
1382
|
*
|
|
1249
1383
|
* @remarks
|
|
1250
|
-
* Em modo simples, a opção ativa
|
|
1384
|
+
* Em modo simples, confirma a opção ativa; no múltiplo, alterna sua seleção.
|
|
1251
1385
|
*/
|
|
1252
|
-
async selectFocusedOption() {
|
|
1386
|
+
async selectFocusedOption(restoreFocus = true) {
|
|
1253
1387
|
const options = this.getNavigableOptions();
|
|
1254
1388
|
if (options.length === 0)
|
|
1255
1389
|
return;
|
|
1256
|
-
const index = this.
|
|
1390
|
+
const index = this.activeOptionIndex;
|
|
1257
1391
|
const option = options[index];
|
|
1258
|
-
|
|
1259
|
-
if (this.effectiveMultiple && index === 0 && option && !this.isSelectAllLabel(this.getOptionLabel(option))) {
|
|
1260
|
-
this.handleSelectOptionStateChange(new CustomEvent('brSelectOptionStateChange', {
|
|
1261
|
-
detail: {
|
|
1262
|
-
value: '__select_all__',
|
|
1263
|
-
label: this.selectAllLabel,
|
|
1264
|
-
selected: true,
|
|
1265
|
-
disabled: false,
|
|
1266
|
-
},
|
|
1267
|
-
}));
|
|
1392
|
+
if (!option || option.disabled)
|
|
1268
1393
|
return;
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1394
|
+
this.handleSelectOptionStateChange(new CustomEvent('brSelectOptionStateChange', {
|
|
1395
|
+
detail: { ...option, selected: this.effectiveMultiple ? !option.selected : true },
|
|
1396
|
+
}), restoreFocus);
|
|
1397
|
+
if (!this.effectiveMultiple && restoreFocus) {
|
|
1398
|
+
await this.close();
|
|
1399
|
+
await this.selectInputElement?.setFocus();
|
|
1273
1400
|
}
|
|
1274
1401
|
}
|
|
1275
1402
|
syncActiveOptionIndex(detail) {
|
|
@@ -1304,13 +1431,13 @@ export class Select {
|
|
|
1304
1431
|
if (!this.effectiveMultiple)
|
|
1305
1432
|
return;
|
|
1306
1433
|
const selectableOptions = slottedOptions.filter((option) => {
|
|
1307
|
-
const optionLabel = (option.label ?? option.value).trim();
|
|
1434
|
+
const optionLabel = (option.label ?? option.value ?? '').trim();
|
|
1308
1435
|
return !this.isSelectAllLabel(optionLabel);
|
|
1309
1436
|
});
|
|
1310
1437
|
const allSelected = selectableOptions.length > 0 && selectableOptions.every((option) => Boolean(option.selected));
|
|
1311
1438
|
const anySelected = selectableOptions.some((option) => Boolean(option.selected));
|
|
1312
1439
|
slottedOptions.forEach((option) => {
|
|
1313
|
-
const optionLabel = (option.label ?? option.value).trim();
|
|
1440
|
+
const optionLabel = (option.label ?? option.value ?? '').trim();
|
|
1314
1441
|
if (!this.isSelectAllLabel(optionLabel))
|
|
1315
1442
|
return;
|
|
1316
1443
|
option.indeterminate = anySelected && !allSelected;
|
|
@@ -1334,9 +1461,7 @@ export class Select {
|
|
|
1334
1461
|
return label === this.selectAllLabel || label === this.unselectAllLabel;
|
|
1335
1462
|
}
|
|
1336
1463
|
isSelectAllOption(option) {
|
|
1337
|
-
return
|
|
1338
|
-
option.value === 'Alternar todos' ||
|
|
1339
|
-
this.isSelectAllLabel(this.getOptionLabel(option)));
|
|
1464
|
+
return option.value === SELECT_ALL_OPTION_VALUE || this.isSelectAllLabel(this.getOptionLabel(option));
|
|
1340
1465
|
}
|
|
1341
1466
|
getSelectAllLabel(selected, indeterminate) {
|
|
1342
1467
|
return selected && !indeterminate ? this.unselectAllLabel : this.selectAllLabel;
|
|
@@ -1416,7 +1541,7 @@ export class Select {
|
|
|
1416
1541
|
* os filhos atuais do host.
|
|
1417
1542
|
*/
|
|
1418
1543
|
getCurrentOptions() {
|
|
1419
|
-
// As opções projetadas são a fonte
|
|
1544
|
+
// As opções projetadas são a fonte principal quando não há coleção
|
|
1420
1545
|
// imperativa: a lista virtualizada pode manter um snapshot enquanto o
|
|
1421
1546
|
// consumidor altera `selected` diretamente no slot.
|
|
1422
1547
|
if (!this.hasImperativeOptions && this.slotElement) {
|
|
@@ -1440,28 +1565,20 @@ export class Select {
|
|
|
1440
1565
|
if (this.pendingOptions) {
|
|
1441
1566
|
return this.getListOptions(this.pendingOptions);
|
|
1442
1567
|
}
|
|
1568
|
+
// Depois de setOptions(), a coleção imperativa é a fonte: uma resposta vazia
|
|
1569
|
+
// não volta a exibir as opções declaradas no HTML.
|
|
1570
|
+
if (this.hasImperativeOptions)
|
|
1571
|
+
return this.getListOptions([]);
|
|
1443
1572
|
const hostOptions = this.applyCanonicalSelection(this.getHostOptions());
|
|
1444
1573
|
return this.getListOptions(hostOptions);
|
|
1445
1574
|
}
|
|
1446
|
-
normalizeSearchText(value) {
|
|
1447
|
-
return value
|
|
1448
|
-
.normalize('NFD')
|
|
1449
|
-
.replace(/[\u0300-\u036f]/g, '')
|
|
1450
|
-
.toLocaleLowerCase('pt-BR')
|
|
1451
|
-
.trim();
|
|
1452
|
-
}
|
|
1453
1575
|
getNavigableOptions() {
|
|
1454
|
-
const
|
|
1455
|
-
const
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
return this.effectiveMultiple;
|
|
1461
|
-
const label = this.normalizeSearchText(this.getOptionLabel(option));
|
|
1462
|
-
const value = this.normalizeSearchText(option.value);
|
|
1463
|
-
return label.includes(normalizedTerm) || value.includes(normalizedTerm);
|
|
1464
|
-
});
|
|
1576
|
+
const currentOptions = this.getCurrentOptions();
|
|
1577
|
+
const hostOptions = this.hasImperativeOptions ? [] : this.getHostOptions();
|
|
1578
|
+
const hostDisabledState = new Map(hostOptions.map((option) => [option.value, Boolean(option.disabled)]));
|
|
1579
|
+
const options = currentOptions.map((option) => hostDisabledState.has(option.value) ? { ...option, disabled: hostDisabledState.get(option.value) } : option);
|
|
1580
|
+
const localSearchTerm = this.effectiveSearchMode === 'local' ? this.listSearchTerm : '';
|
|
1581
|
+
return filterSelectOptions(options, localSearchTerm, this.selectAllLabel, this.unselectAllLabel);
|
|
1465
1582
|
}
|
|
1466
1583
|
clearSearch() {
|
|
1467
1584
|
if (!this.searchTerm)
|
|
@@ -1488,15 +1605,18 @@ export class Select {
|
|
|
1488
1605
|
this.selectListElement?.setMultiple(isMultiple);
|
|
1489
1606
|
}
|
|
1490
1607
|
renderSelectInput() {
|
|
1491
|
-
return (h("br-select-input", { part: "input", exportparts: "container:input-container, input:input-field, label:input-label, group:input-group, icon:input-icon, action:input-action, action-button:input-action-button", ref: (el) => (this.selectInputElement = el), "aria-
|
|
1608
|
+
return (h("br-select-input", { part: "input", exportparts: "container:input-container, input:input-field, label:input-label, group:input-group, icon:input-icon, action:input-action, action-button:input-action-button, clear:input-clear", ref: (el) => (this.selectInputElement = el), "aria-disabled": String(this.isDisabled()), "aria-label": this.getAccessibleLabel(), borderless: this.borderless, density: this.effectiveDensity, "is-inline": this.effectiveInline, "is-open": this.effectiveOpen, label: this.label, name: this.name, placeholder: this.placeholder, required: this.required, disabled: this.isDisabled(), filterable: this.filterable, showSearchIcon: this.showSearchIcon, clearable: this.filterable && this.effectiveOpen, autocomplete: this.effectiveAutocomplete, "input-width": this.inputWidth, value: this.filterable && this.effectiveOpen ? this.searchTerm : this.getRenderedDisplayValue() }));
|
|
1492
1609
|
}
|
|
1493
1610
|
renderSelectList() {
|
|
1494
|
-
return (h("br-select-list", { part: "list",
|
|
1611
|
+
return (h("br-select-list", { part: "list", "aria-hidden": "true", onMouseDown: (event) => {
|
|
1612
|
+
event.preventDefault();
|
|
1613
|
+
void this.selectInputElement?.setFocus();
|
|
1614
|
+
}, options: this.getListOptions(this.getCurrentOptions()), exportparts: "list, option, checkbox, select-all, empty-option, option-checkbox, option-radio, option-group", "active-option-index": this.isActiveIndicatorHidden ? -1 : this.activeOptionIndex, "aria-label": this.getAccessibleLabel(), "aria-multiselectable": this.effectiveMultiple ? 'true' : 'false', density: this.effectiveDensity, id: this.listboxId, "visible-items": this.effectiveVisibleItems, "item-height": this.effectiveItemHeight, overscan: this.effectiveOverscan, hideDividers: this.hideDividers, "search-term": this.listSearchTerm, "search-mode": this.effectiveSearchMode, role: "listbox", "select-all-label": this.selectAllLabel, "unselect-all-label": this.unselectAllLabel, ref: (el) => {
|
|
1495
1615
|
this.selectListElement = el;
|
|
1496
1616
|
this.selectListElement.loading = this.loading;
|
|
1497
1617
|
this.setSelectionMode(this.effectiveMultiple);
|
|
1498
|
-
void this.getSelectListController()?.setSearchTerm?.(this.
|
|
1499
|
-
} }, h("slot", null), h("slot", { name: "loading", slot: "loading" })));
|
|
1618
|
+
void this.getSelectListController()?.setSearchTerm?.(this.listSearchTerm);
|
|
1619
|
+
} }, h("slot", null), h("slot", { name: "loading", slot: "loading" }, h("br-loading", { size: "small", label: "Pesquisando\u2026", labelPosition: "right" }))));
|
|
1500
1620
|
}
|
|
1501
1621
|
renderHiddenSelect() {
|
|
1502
1622
|
const options = this.getFormOptions(this.getCurrentOptions()).filter((option) => !this.isSelectAllLabel(this.getOptionLabel(option)));
|
|
@@ -1535,7 +1655,7 @@ export class Select {
|
|
|
1535
1655
|
return (h("option", { key: option.value, value: option.value, selected: option.selected, disabled: option.disabled }));
|
|
1536
1656
|
}
|
|
1537
1657
|
render() {
|
|
1538
|
-
return (h(Host, { key: '
|
|
1658
|
+
return (h(Host, { key: '6a73a46788b952ed54fc3962563d572b7303222f', "aria-busy": this.isValidating || this.loading ? 'true' : null }, h("div", { key: 'a05db2f095fb30ae9379ec87d8474289d8560a5b', class: this.getCssClassMap(), part: "container" }, this.renderSelectInput(), this.renderSelectList(), h("div", { key: '9218c94b7c8fe9ef170c4b1c9e47559cdae50c16', part: "feedback", hidden: !this.hasFeedbackSlot && !this.validationErrorMessage }, h("slot", { key: '2d74cf5804367c3b8dab39e57a0d050018de84b5', name: "feedback", onSlotchange: (event) => (this.hasFeedbackSlot = hasAssignedSlotContent(event.currentTarget)) }, this.validationErrorMessage ? (h("br-message", { "is-feedback": true, state: "danger", message: this.validationErrorMessage })) : null)), h("div", { key: 'f2e6019a54128ddae642226986ecf13803fce30d', part: "validation-loading", hidden: !this.hasValidationLoadingSlot || !this.isValidating }, h("slot", { key: '3d83e4359c05d95294d1d9ab87fef1d7d068f1f3', name: "validation-loading" })), this.renderHiddenSelect())));
|
|
1539
1659
|
}
|
|
1540
1660
|
static get is() { return "br-select"; }
|
|
1541
1661
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1620,7 +1740,7 @@ export class Select {
|
|
|
1620
1740
|
"name": "default",
|
|
1621
1741
|
"text": "'medium'"
|
|
1622
1742
|
}],
|
|
1623
|
-
"text": "Define a densidade visual compartilhada pelo campo e pela lista de op\u00E7\u00F5es.\nAceita `small`, `medium` ou `large`. Valores inv\u00E1lidos usam `medium`."
|
|
1743
|
+
"text": "Define a densidade visual compartilhada pelo campo e pela lista de op\u00E7\u00F5es.\nAceita `small`, `medium` ou `large`. Valores inv\u00E1lidos usam `medium`.\nA op\u00E7\u00E3o sint\u00E9tica de selecionar todos permanece com densidade `small`."
|
|
1624
1744
|
},
|
|
1625
1745
|
"getter": false,
|
|
1626
1746
|
"setter": false,
|
|
@@ -1839,6 +1959,29 @@ export class Select {
|
|
|
1839
1959
|
"attribute": "overscan",
|
|
1840
1960
|
"defaultValue": "1"
|
|
1841
1961
|
},
|
|
1962
|
+
"hideDividers": {
|
|
1963
|
+
"type": "boolean",
|
|
1964
|
+
"mutable": false,
|
|
1965
|
+
"complexType": {
|
|
1966
|
+
"original": "boolean",
|
|
1967
|
+
"resolved": "boolean",
|
|
1968
|
+
"references": {}
|
|
1969
|
+
},
|
|
1970
|
+
"required": false,
|
|
1971
|
+
"optional": false,
|
|
1972
|
+
"docs": {
|
|
1973
|
+
"tags": [{
|
|
1974
|
+
"name": "default",
|
|
1975
|
+
"text": "false"
|
|
1976
|
+
}],
|
|
1977
|
+
"text": "Oculta os divisores entre op\u00E7\u00F5es consecutivas, sem alterar a altura das linhas."
|
|
1978
|
+
},
|
|
1979
|
+
"getter": false,
|
|
1980
|
+
"setter": false,
|
|
1981
|
+
"reflect": true,
|
|
1982
|
+
"attribute": "hide-dividers",
|
|
1983
|
+
"defaultValue": "false"
|
|
1984
|
+
},
|
|
1842
1985
|
"isOpen": {
|
|
1843
1986
|
"type": "boolean",
|
|
1844
1987
|
"mutable": true,
|
|
@@ -2071,7 +2214,7 @@ export class Select {
|
|
|
2071
2214
|
"name": "default",
|
|
2072
2215
|
"text": "'local'"
|
|
2073
2216
|
}],
|
|
2074
|
-
"text": "Define se as op\u00E7\u00F5es s\u00E3o filtradas localmente ou fornecidas por uma busca remota.\nEm `remote`, o componente emite `brSelectSearch
|
|
2217
|
+
"text": "Define se as op\u00E7\u00F5es s\u00E3o filtradas localmente ou fornecidas por uma busca remota.\nEm `remote`, o componente emite `brSelectSearch` e exibe as op\u00E7\u00F5es recebidas\nsem filtr\u00E1-las de novo pelo termo digitado; a aplica\u00E7\u00E3o deve buscar, validar e\naplicar a resposta com `setOptions()` ou re-renderizando os `br-select-option`.\nA sele\u00E7\u00E3o \u00E9 preservada mesmo quando n\u00E3o aparece na resposta seguinte."
|
|
2075
2218
|
},
|
|
2076
2219
|
"getter": false,
|
|
2077
2220
|
"setter": false,
|
|
@@ -2094,7 +2237,7 @@ export class Select {
|
|
|
2094
2237
|
"name": "default",
|
|
2095
2238
|
"text": "false"
|
|
2096
2239
|
}],
|
|
2097
|
-
"text": "Indica que uma busca remota de op\u00E7\u00F5es est\u00E1 pendente.\nEnquanto ativo,
|
|
2240
|
+
"text": "Indica que uma busca remota de op\u00E7\u00F5es est\u00E1 pendente.\nEnquanto ativo, a lista exibe o slot `loading` (padr\u00E3o: \"Pesquisando\u2026\") e novas\nop\u00E7\u00F5es n\u00E3o podem ser selecionadas; a aplica\u00E7\u00E3o continua respons\u00E1vel por\ndebounce, cancelamento, erros e autentica\u00E7\u00E3o."
|
|
2098
2241
|
},
|
|
2099
2242
|
"getter": false,
|
|
2100
2243
|
"setter": false,
|
|
@@ -2117,7 +2260,7 @@ export class Select {
|
|
|
2117
2260
|
"name": "default",
|
|
2118
2261
|
"text": "false"
|
|
2119
2262
|
}],
|
|
2120
|
-
"text": "Exibe o \
|
|
2263
|
+
"text": "Exibe a lupa mesmo quando o select n\u00E3o \u00E9 filtr\u00E1vel; selects com `filterable`\nj\u00E1 a exibem. A lupa \u00E9 omitida quando o campo \u00E9 estreito demais (menos de\n128px) para comportar lupa, valor e seta."
|
|
2121
2264
|
},
|
|
2122
2265
|
"getter": false,
|
|
2123
2266
|
"setter": false,
|
|
@@ -2125,6 +2268,29 @@ export class Select {
|
|
|
2125
2268
|
"attribute": "show-search-icon",
|
|
2126
2269
|
"defaultValue": "false"
|
|
2127
2270
|
},
|
|
2271
|
+
"hideSearchIcon": {
|
|
2272
|
+
"type": "boolean",
|
|
2273
|
+
"mutable": false,
|
|
2274
|
+
"complexType": {
|
|
2275
|
+
"original": "boolean",
|
|
2276
|
+
"resolved": "boolean",
|
|
2277
|
+
"references": {}
|
|
2278
|
+
},
|
|
2279
|
+
"required": false,
|
|
2280
|
+
"optional": false,
|
|
2281
|
+
"docs": {
|
|
2282
|
+
"tags": [{
|
|
2283
|
+
"name": "default",
|
|
2284
|
+
"text": "false"
|
|
2285
|
+
}],
|
|
2286
|
+
"text": "Oculta a lupa mesmo quando `filterable` est\u00E1 ativo, sem desabilitar a busca.\nTem preced\u00EAncia visual sobre `showSearchIcon` e n\u00E3o altera o comportamento padr\u00E3o."
|
|
2287
|
+
},
|
|
2288
|
+
"getter": false,
|
|
2289
|
+
"setter": false,
|
|
2290
|
+
"reflect": true,
|
|
2291
|
+
"attribute": "hide-search-icon",
|
|
2292
|
+
"defaultValue": "false"
|
|
2293
|
+
},
|
|
2128
2294
|
"unselectAllLabel": {
|
|
2129
2295
|
"type": "string",
|
|
2130
2296
|
"mutable": false,
|
|
@@ -2300,7 +2466,10 @@ export class Select {
|
|
|
2300
2466
|
}
|
|
2301
2467
|
static get states() {
|
|
2302
2468
|
return {
|
|
2469
|
+
"showValidationErrors": {},
|
|
2470
|
+
"validationErrorMessage": {},
|
|
2303
2471
|
"activeOptionIndex": {},
|
|
2472
|
+
"isActiveIndicatorHidden": {},
|
|
2304
2473
|
"displayValue": {},
|
|
2305
2474
|
"searchTerm": {},
|
|
2306
2475
|
"formDisabled": {},
|
|
@@ -2836,11 +3005,29 @@ export class Select {
|
|
|
2836
3005
|
}
|
|
2837
3006
|
static get listeners() {
|
|
2838
3007
|
return [{
|
|
3008
|
+
"name": "focusout",
|
|
3009
|
+
"method": "handleSelectFocusOut",
|
|
3010
|
+
"target": undefined,
|
|
3011
|
+
"capture": false,
|
|
3012
|
+
"passive": false
|
|
3013
|
+
}, {
|
|
3014
|
+
"name": "invalid",
|
|
3015
|
+
"method": "handleSelectInvalid",
|
|
3016
|
+
"target": undefined,
|
|
3017
|
+
"capture": true,
|
|
3018
|
+
"passive": false
|
|
3019
|
+
}, {
|
|
2839
3020
|
"name": "brSelectInputFocus",
|
|
2840
3021
|
"method": "handleSelectInputFocus",
|
|
2841
3022
|
"target": undefined,
|
|
2842
3023
|
"capture": false,
|
|
2843
3024
|
"passive": false
|
|
3025
|
+
}, {
|
|
3026
|
+
"name": "pointerdown",
|
|
3027
|
+
"method": "handleSelectPointerDown",
|
|
3028
|
+
"target": undefined,
|
|
3029
|
+
"capture": false,
|
|
3030
|
+
"passive": true
|
|
2844
3031
|
}, {
|
|
2845
3032
|
"name": "brSelectInputValueChange",
|
|
2846
3033
|
"method": "handleSelectInputValueChange",
|