@govbr-ds/webcomponents 2.2.0 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +75 -24
- package/cem/custom-elements.json +1858 -1712
- package/cem/webcomponents.html-custom-data.json +73 -67
- package/dist/cjs/br-avatar.cjs.entry.js +2 -2
- package/dist/cjs/br-breadcrumb-item.cjs.entry.js +1 -1
- package/dist/cjs/br-breadcrumb.cjs.entry.js +2 -2
- package/dist/cjs/br-button_2.cjs.entry.js +10 -5
- package/dist/cjs/br-card.cjs.entry.js +2 -2
- 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 +2 -2
- package/dist/cjs/br-checkbox.cjs.entry.js +3 -3
- package/dist/cjs/br-checkgroup.cjs.entry.js +1 -1
- package/dist/cjs/br-collapse_2.cjs.entry.js +11 -7
- 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 +2 -2
- package/dist/cjs/br-cookiebar-note.cjs.entry.js +2 -2
- package/dist/cjs/br-cookiebar.cjs.entry.js +2 -2
- package/dist/cjs/br-crumb.cjs.entry.js +1 -1
- package/dist/cjs/br-date-picker_3.cjs.entry.js +869 -517
- package/dist/cjs/br-datetime-picker.cjs.entry.js +1347 -311
- package/dist/cjs/br-divider.cjs.entry.js +2 -2
- package/dist/cjs/br-dropdown_2.cjs.entry.js +282 -165
- package/dist/cjs/br-footer-category.cjs.entry.js +2 -2
- 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 +2 -2
- 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 +27 -23
- package/dist/cjs/br-icon.cjs.entry.js +4 -33
- package/dist/cjs/br-input.cjs.entry.js +31 -6
- package/dist/cjs/br-item.cjs.entry.js +5 -4
- package/dist/cjs/br-link.cjs.entry.js +2 -2
- package/dist/cjs/br-loading.cjs.entry.js +2 -2
- package/dist/cjs/br-magic-button.cjs.entry.js +21 -8
- 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 +2 -2
- package/dist/cjs/br-menu-logo.cjs.entry.js +2 -2
- package/dist/cjs/br-menu-social.cjs.entry.js +2 -2
- package/dist/cjs/br-menu.cjs.entry.js +2 -2
- package/dist/cjs/br-modal.cjs.entry.js +20 -4
- 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 +2 -2
- package/dist/cjs/br-pagination.cjs.entry.js +4 -4
- package/dist/cjs/br-radio-group.cjs.entry.js +3 -3
- package/dist/cjs/br-radio.cjs.entry.js +3 -3
- package/dist/cjs/br-scrim.cjs.entry.js +2 -2
- package/dist/cjs/br-select-input_3.cjs.entry.js +286 -100
- package/dist/cjs/br-sign-in.cjs.entry.js +8 -4
- 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 +3 -3
- package/dist/cjs/br-switch.cjs.entry.js +3 -3
- package/dist/cjs/br-tab-item.cjs.entry.js +3 -3
- package/dist/cjs/br-tab.cjs.entry.js +38 -13
- 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 +3 -3
- 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 +7 -23
- 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-CCeI5iW7.js} +20 -5
- package/dist/cjs/format-bytes-Cs8SH2w0.js +24 -0
- package/dist/cjs/icon.utils-DF6kMskA.js +46 -0
- package/dist/cjs/{index-CGgZBuyy.js → index-Bc30P_6z.js} +33 -27
- package/dist/cjs/{index-C92n55ch.js → index-C-IpVFDH.js} +13 -13
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/{datetime-picker-props-validation-DmNKSXsy.js → isValid-CduHZTFc.js} +1 -483
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/select.utils-C38f5Kea.js +62 -0
- package/dist/cjs/{validator-CTCajtT9.js → validator-GkkueMOx.js} +18 -0
- package/dist/cjs/webcomponents.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/avatar/avatar.css +1 -1
- package/dist/collection/components/breadcrumb/breadcrumb.css +1 -1
- package/dist/collection/components/button/button.css +1 -1
- package/dist/collection/components/button/button.js +8 -3
- package/dist/collection/components/card/card.css +1 -1
- package/dist/collection/components/carousel/carousel-page/carousel-page.css +1 -1
- package/dist/collection/components/carousel/carousel.css +1 -1
- package/dist/collection/components/checkbox/checkbox.css +1 -1
- package/dist/collection/components/checkbox-group/checkbox-group.css +1 -1
- package/dist/collection/components/collapse/collapse.css +1 -1
- package/dist/collection/components/collapse/collapse.js +12 -6
- package/dist/collection/components/cookiebar/cookiebar-cookie/cookiebar-cookie.css +1 -1
- package/dist/collection/components/cookiebar/cookiebar-group/cookiebar-group.css +1 -1
- package/dist/collection/components/cookiebar/cookiebar-header/cookiebar-header.css +1 -1
- package/dist/collection/components/cookiebar/cookiebar-link/cookiebar-link.css +1 -1
- package/dist/collection/components/cookiebar/cookiebar-note/cookiebar-note.css +1 -1
- package/dist/collection/components/cookiebar/cookiebar-note-group/cookiebar-note-group.css +1 -1
- package/dist/collection/components/cookiebar/cookiebar.css +1 -1
- package/dist/collection/components/datetime-picker/date-picker/date-picker-locale.js +12 -12
- package/dist/collection/components/datetime-picker/date-picker/date-picker-props-validation.js +14 -13
- package/dist/collection/components/datetime-picker/date-picker/date-picker.css +1 -1
- package/dist/collection/components/datetime-picker/date-picker/date-picker.js +384 -280
- package/dist/collection/components/datetime-picker/datetime-input/datetime-input-constants.js +59 -0
- package/dist/collection/components/datetime-picker/datetime-input/datetime-input-props-validation.js +19 -15
- package/dist/collection/components/datetime-picker/datetime-input/datetime-input.css +1 -1
- package/dist/collection/components/datetime-picker/datetime-input/datetime-input.js +373 -211
- package/dist/collection/components/datetime-picker/datetime-input/datetime-input.types.js +1 -0
- package/dist/collection/components/datetime-picker/datetime-picker-constants.js +19 -5
- package/dist/collection/components/datetime-picker/datetime-picker-form-associated.js +92 -11
- package/dist/collection/components/datetime-picker/datetime-picker-props-validation.js +52 -33
- package/dist/collection/components/datetime-picker/datetime-picker.css +1 -1
- package/dist/collection/components/datetime-picker/datetime-picker.js +915 -362
- package/dist/collection/components/datetime-picker/datetime-picker.utils.js +62 -49
- package/dist/collection/components/datetime-picker/time-picker/time-picker-constants.js +3 -2
- package/dist/collection/components/datetime-picker/time-picker/time-picker.css +1 -1
- package/dist/collection/components/datetime-picker/time-picker/time-picker.js +148 -85
- package/dist/collection/components/divider/divider.css +1 -1
- package/dist/collection/components/dropdown/dropdown.css +1 -1
- package/dist/collection/components/dropdown/dropdown.js +32 -36
- package/dist/collection/components/footer/footer-category/footer-category.css +1 -1
- package/dist/collection/components/footer/footer-item/footer-item.css +1 -1
- package/dist/collection/components/footer/footer-legal/footer-legal.css +1 -1
- package/dist/collection/components/footer/footer-logo/footer-logo.css +1 -1
- package/dist/collection/components/footer/footer-social/footer-social.css +1 -1
- package/dist/collection/components/footer/footer.css +1 -1
- package/dist/collection/components/header/header-function/header-function.css +1 -1
- package/dist/collection/components/header/header-link/header-link.css +1 -1
- package/dist/collection/components/header/header-list/header-list.css +1 -1
- package/dist/collection/components/header/header-logo/header-logo.css +1 -1
- package/dist/collection/components/header/header.css +1 -1
- package/dist/collection/components/header/header.js +25 -21
- package/dist/collection/components/icon/icon.css +1 -1
- package/dist/collection/components/icon/icon.utils.js +8 -0
- package/dist/collection/components/input/input.css +1 -1
- package/dist/collection/components/input/input.js +50 -4
- package/dist/collection/components/item/item.css +1 -1
- package/dist/collection/components/item/item.js +4 -3
- package/dist/collection/components/link/link.css +1 -1
- package/dist/collection/components/list/list.css +1 -1
- package/dist/collection/components/loading/loading.css +1 -1
- package/dist/collection/components/magic-button/magic-button.css +1 -1
- package/dist/collection/components/magic-button/magic-button.js +20 -6
- package/dist/collection/components/menu/menu-group/menu-group.css +1 -1
- package/dist/collection/components/menu/menu-header/menu-header.css +1 -1
- package/dist/collection/components/menu/menu-info/menu-info.css +1 -1
- package/dist/collection/components/menu/menu-item/menu-item.css +1 -1
- package/dist/collection/components/menu/menu-link/menu-link.css +1 -1
- package/dist/collection/components/menu/menu-list/menu-list.css +1 -1
- package/dist/collection/components/menu/menu-logo/menu-logo.css +1 -1
- package/dist/collection/components/menu/menu-social/menu-social.css +1 -1
- package/dist/collection/components/menu/menu.css +1 -1
- package/dist/collection/components/message/message.css +1 -1
- package/dist/collection/components/modal/modal.css +1 -1
- package/dist/collection/components/modal/modal.js +19 -3
- package/dist/collection/components/notification/notification-body/notification-body.css +1 -1
- package/dist/collection/components/notification/notification-header/notification-header.css +1 -1
- package/dist/collection/components/notification/notification-item/notification-item.css +1 -1
- package/dist/collection/components/notification/notification.css +1 -1
- package/dist/collection/components/pagination/pagination.css +1 -1
- package/dist/collection/components/pagination/pagination.js +4 -2
- package/dist/collection/components/radio/radio.css +1 -1
- package/dist/collection/components/radio-group/radio-group.css +1 -1
- package/dist/collection/components/scrim/scrim.css +1 -1
- package/dist/collection/components/select/select-input/select-input.css +1 -1
- package/dist/collection/components/select/select-input/select-input.js +126 -18
- package/dist/collection/components/select/select-list/select-list.css +1 -1
- package/dist/collection/components/select/select-list/select-list.js +218 -66
- package/dist/collection/components/select/select-option/select-option.css +1 -1
- package/dist/collection/components/select/select-option/select-option.js +14 -5
- package/dist/collection/components/select/select.css +1 -1
- package/dist/collection/components/select/select.js +303 -94
- package/dist/collection/components/select/select.utils.js +29 -8
- package/dist/collection/components/sign-in/sign-in.css +1 -1
- package/dist/collection/components/sign-in/sign-in.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.css +1 -1
- package/dist/collection/components/slider/slider.css +1 -1
- package/dist/collection/components/step/step-item/step-item.css +1 -1
- package/dist/collection/components/step/step.css +1 -1
- package/dist/collection/components/switch/switch.css +1 -1
- package/dist/collection/components/tab/tab-item/tab-item.css +1 -1
- package/dist/collection/components/tab/tab-item/tab-item.js +2 -2
- package/dist/collection/components/tab/tab.css +1 -1
- package/dist/collection/components/tab/tab.js +37 -10
- package/dist/collection/components/table/table-body/table-body.css +1 -1
- package/dist/collection/components/table/table-cell/table-cell.css +1 -1
- package/dist/collection/components/table/table-header/table-header.css +1 -1
- package/dist/collection/components/table/table-header-cell/table-header-cell.css +1 -1
- package/dist/collection/components/table/table-row/table-row.css +1 -1
- package/dist/collection/components/table/table.css +1 -1
- package/dist/collection/components/tag/tag.css +1 -1
- package/dist/collection/components/textarea/textarea.css +1 -1
- package/dist/collection/components/tooltip/tooltip.css +1 -1
- package/dist/collection/components/upload/upload.css +1 -1
- package/dist/collection/components/wizard/wizard-panel/wizard-panel.css +1 -1
- package/dist/collection/components/wizard/wizard.css +1 -1
- package/dist/collection/pages/components/select/remote.js +33 -0
- package/dist/collection/pages/components/select/virtualized.js +13 -0
- package/dist/collection/pages/components/upload/handler.js +25 -0
- package/dist/collection/pages/scripts/component-controls.js +15 -16
- package/dist/collection/pages/scripts/menu.js +0 -1
- package/dist/collection/pages/scripts/pageLoader.js +168 -91
- package/dist/collection/pages/scripts/pageloader-preview.js +37 -28
- package/dist/collection/shared/utils/form.js +17 -0
- 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-5h-W9_JR.js +5 -0
- package/dist/components/p-848QkYoM.js +5 -0
- package/dist/components/p-B7bNfmgh.js +5 -0
- package/dist/components/p-BFHvuEnN.js +5 -0
- package/dist/components/p-BH6QYnAr.js +5 -0
- package/dist/{webcomponents/p-6c2fe5e4.entry.js → components/p-BcW8O6h2.js} +1 -1
- package/dist/components/p-BicHMcSS.js +5 -0
- package/dist/components/p-Bs7iRQTG.js +5 -0
- package/dist/components/{p-DSHbttu9.js → p-Bvrw9yWR.js} +1 -1
- package/dist/components/p-BzQFMh9j.js +5 -0
- package/dist/components/p-CBHd0-fF.js +5 -0
- package/dist/components/p-CCPHCJjw.js +5 -0
- package/dist/components/p-CDTENPaP.js +5 -0
- package/dist/components/{p-BcqVlof7.js → p-CbgKdASU.js} +1 -1
- package/dist/components/p-CeNELttN.js +5 -0
- package/dist/components/p-CjtmJTLO.js +5 -0
- package/dist/components/{p-DTGNra9m.js → p-D-3G3Ioq.js} +1 -1
- package/dist/components/p-DDu3JV_r.js +5 -0
- package/dist/components/p-DFWqyfUe.js +5 -0
- package/dist/components/p-DL6xuxGG.js +5 -0
- package/dist/components/p-DOX9Uwk1.js +5 -0
- package/dist/components/p-DUq7uT2-.js +5 -0
- package/dist/components/p-Devw08cc.js +5 -0
- package/dist/components/p-Di96UxvH.js +5 -0
- package/dist/components/p-Dp3MsSXu.js +5 -0
- package/dist/components/p-DsO4F0Cz.js +5 -0
- package/dist/components/p-DuLHFTpa.js +5 -0
- package/dist/components/p-DusornQ0.js +5 -0
- package/dist/components/{p-Dma14GVa.js → p-Jk_KQE5V.js} +1 -1
- package/dist/components/p-OQpiDEK9.js +5 -0
- package/dist/components/p-PV731d8s.js +5 -0
- package/dist/components/p-XW6Hp_Jk.js +5 -0
- package/dist/components/p-jOb1hCPi.js +5 -0
- package/dist/components/p-rMnkh3Cy.js +5 -0
- package/dist/components/p-ta-24T1Z.js +5 -0
- package/dist/esm/br-avatar.entry.js +2 -2
- package/dist/esm/br-breadcrumb-item.entry.js +1 -1
- package/dist/esm/br-breadcrumb.entry.js +2 -2
- package/dist/esm/br-button_2.entry.js +10 -5
- package/dist/esm/br-card.entry.js +2 -2
- 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 +2 -2
- package/dist/esm/br-checkbox.entry.js +4 -4
- package/dist/esm/br-checkgroup.entry.js +1 -1
- package/dist/esm/br-collapse_2.entry.js +12 -8
- 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 +2 -2
- package/dist/esm/br-cookiebar-note.entry.js +2 -2
- package/dist/esm/br-cookiebar.entry.js +3 -3
- package/dist/esm/br-crumb.entry.js +1 -1
- package/dist/esm/br-date-picker_3.entry.js +844 -492
- package/dist/esm/br-datetime-picker.entry.js +1316 -280
- package/dist/esm/br-divider.entry.js +2 -2
- package/dist/esm/br-dropdown_2.entry.js +281 -164
- package/dist/esm/br-footer-category.entry.js +2 -2
- 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 +2 -2
- 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 +27 -23
- package/dist/esm/br-icon.entry.js +3 -32
- package/dist/esm/br-input.entry.js +32 -7
- package/dist/esm/br-item.entry.js +5 -4
- package/dist/esm/br-link.entry.js +2 -2
- package/dist/esm/br-loading.entry.js +2 -2
- package/dist/esm/br-magic-button.entry.js +21 -8
- 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 +2 -2
- package/dist/esm/br-menu-logo.entry.js +2 -2
- package/dist/esm/br-menu-social.entry.js +2 -2
- package/dist/esm/br-menu.entry.js +3 -3
- package/dist/esm/br-modal.entry.js +21 -5
- 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 +3 -3
- package/dist/esm/br-pagination.entry.js +4 -4
- package/dist/esm/br-radio-group.entry.js +4 -4
- package/dist/esm/br-radio.entry.js +4 -4
- package/dist/esm/br-scrim.entry.js +2 -2
- package/dist/esm/br-select-input_3.entry.js +286 -100
- package/dist/esm/br-sign-in.entry.js +8 -4
- 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 +3 -3
- package/dist/esm/br-switch.entry.js +4 -4
- package/dist/esm/br-tab-item.entry.js +3 -3
- package/dist/esm/br-tab.entry.js +38 -13
- 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 +4 -4
- 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 +5 -21
- 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-DDc4sADe.js} +20 -6
- package/dist/esm/{event-CfuJQ1DY.js → event-6Da1SZ3J.js} +1 -1
- package/dist/esm/format-bytes-B7bNfmgh.js +22 -0
- package/dist/esm/icon.utils-zlORkiHQ.js +43 -0
- package/dist/esm/{index-Dcn7tRST.js → index-ConyRdJe.js} +33 -27
- package/dist/esm/{index-BQPOWxe5.js → index-CytVKoHT.js} +13 -13
- package/dist/esm/index.js +2 -2
- package/dist/esm/{datetime-picker-props-validation-BeTcUTnE.js → isValid-Bee0Uvqc.js} +2 -477
- package/dist/esm/loader.js +3 -3
- package/dist/esm/select.utils-BYsh2ZdE.js +57 -0
- package/dist/esm/{validator-D3tVP32U.js → validator-BkWWrDEr.js} +18 -1
- package/dist/esm/webcomponents.js +4 -4
- package/dist/hydrate/index.js +3314 -1806
- package/dist/hydrate/index.mjs +3314 -1806
- package/dist/types/components/button/button.d.ts +2 -1
- package/dist/types/components/collapse/collapse.d.ts +6 -2
- package/dist/types/components/datetime-picker/date-picker/date-picker-locale.d.ts +9 -9
- package/dist/types/components/datetime-picker/date-picker/date-picker-props-validation.d.ts +14 -13
- package/dist/types/components/datetime-picker/date-picker/date-picker.d.ts +264 -161
- package/dist/types/components/datetime-picker/datetime-input/datetime-input-constants.d.ts +14 -0
- package/dist/types/components/datetime-picker/datetime-input/datetime-input-props-validation.d.ts +19 -15
- package/dist/types/components/datetime-picker/datetime-input/datetime-input.d.ts +229 -98
- package/dist/types/components/datetime-picker/datetime-input/datetime-input.types.d.ts +36 -0
- package/dist/types/components/datetime-picker/datetime-picker-constants.d.ts +19 -5
- package/dist/types/components/datetime-picker/datetime-picker-form-associated.d.ts +32 -5
- package/dist/types/components/datetime-picker/datetime-picker-props-validation.d.ts +22 -24
- package/dist/types/components/datetime-picker/datetime-picker.d.ts +508 -235
- package/dist/types/components/datetime-picker/datetime-picker.types.d.ts +75 -21
- package/dist/types/components/datetime-picker/datetime-picker.utils.d.ts +53 -47
- package/dist/types/components/datetime-picker/time-picker/time-picker-constants.d.ts +3 -2
- package/dist/types/components/datetime-picker/time-picker/time-picker.d.ts +126 -55
- package/dist/types/components/dropdown/dropdown.d.ts +12 -4
- package/dist/types/components/header/header.d.ts +2 -0
- package/dist/types/components/icon/icon.utils.d.ts +6 -0
- package/dist/types/components/input/input.d.ts +18 -1
- package/dist/types/components/input/input.types.d.ts +4 -0
- package/dist/types/components/item/item.d.ts +6 -1
- package/dist/types/components/magic-button/magic-button.d.ts +7 -3
- package/dist/types/components/modal/modal.d.ts +6 -0
- package/dist/types/components/pagination/pagination.d.ts +2 -0
- package/dist/types/components/select/select-input/select-input.d.ts +9 -2
- package/dist/types/components/select/select-list/select-list.d.ts +14 -2
- package/dist/types/components/select/select-option/select-option.d.ts +1 -0
- package/dist/types/components/select/select.d.ts +47 -7
- package/dist/types/components/select/select.types.d.ts +12 -0
- package/dist/types/components/select/select.utils.d.ts +3 -0
- package/dist/types/components/sign-in/sign-in.d.ts +3 -2
- package/dist/types/components/tab/tab-item/tab-item.d.ts +6 -2
- package/dist/types/components/tab/tab.d.ts +7 -0
- package/dist/types/components.d.ts +405 -318
- package/dist/types/shared/utils/form.d.ts +8 -0
- package/dist/types/stencil-public-runtime.d.ts +61 -55
- package/dist/webcomponents/index.esm.js +1 -1
- package/dist/webcomponents/p-01801ac1.entry.js +5 -0
- package/dist/webcomponents/p-05b459f2.entry.js +5 -0
- package/dist/webcomponents/p-08ac6f09.entry.js +5 -0
- package/dist/webcomponents/{p-cff24492.entry.js → p-09817344.entry.js} +1 -1
- package/dist/webcomponents/p-09c79c1d.entry.js +5 -0
- package/dist/webcomponents/p-0fc112fc.entry.js +5 -0
- package/dist/webcomponents/p-13babfc4.entry.js +5 -0
- package/dist/webcomponents/p-15022ab7.entry.js +5 -0
- package/dist/webcomponents/p-172d42c2.entry.js +5 -0
- package/dist/webcomponents/p-18cf093a.entry.js +5 -0
- package/dist/webcomponents/p-198aa844.entry.js +5 -0
- package/dist/webcomponents/p-1ba60d13.entry.js +5 -0
- package/dist/webcomponents/p-1bb96641.entry.js +5 -0
- package/dist/webcomponents/{p-7acf20d3.entry.js → p-20477061.entry.js} +1 -1
- package/dist/webcomponents/p-21feda62.entry.js +5 -0
- package/dist/webcomponents/p-23a5cfd7.entry.js +5 -0
- package/dist/webcomponents/{p-030c02f8.entry.js → p-2c8595d3.entry.js} +1 -1
- package/dist/webcomponents/{p-09770c98.entry.js → p-31a4694a.entry.js} +1 -1
- package/dist/webcomponents/p-32ea6342.entry.js +5 -0
- package/dist/webcomponents/p-3658adcf.entry.js +5 -0
- package/dist/webcomponents/p-37914e63.entry.js +5 -0
- package/dist/webcomponents/p-3b0dd0ff.entry.js +5 -0
- package/dist/webcomponents/p-42b60169.entry.js +5 -0
- package/dist/webcomponents/p-42c9c6c5.entry.js +5 -0
- package/dist/{components/p-SvVnvJdC.js → webcomponents/p-473561f2.entry.js} +1 -1
- package/dist/webcomponents/p-47c490ef.entry.js +5 -0
- package/dist/webcomponents/p-4b01c60f.entry.js +5 -0
- package/dist/webcomponents/p-5a5ed7d8.entry.js +5 -0
- package/dist/webcomponents/{p-c8b7bbab.entry.js → p-5a7c2031.entry.js} +1 -1
- package/dist/webcomponents/p-609cf652.entry.js +5 -0
- package/dist/webcomponents/p-614683d9.entry.js +5 -0
- package/dist/webcomponents/p-67605757.entry.js +5 -0
- package/dist/{components/p-CppRJiyC.js → webcomponents/p-67774920.entry.js} +1 -1
- package/dist/webcomponents/p-67d62559.entry.js +5 -0
- package/dist/webcomponents/p-695dbeb0.entry.js +5 -0
- package/dist/webcomponents/{p-CfuJQ1DY.js → p-6Da1SZ3J.js} +1 -1
- package/dist/webcomponents/p-6a293be8.entry.js +5 -0
- package/dist/webcomponents/{p-03359c92.entry.js → p-6f1a4fbe.entry.js} +1 -1
- package/dist/webcomponents/p-7352d459.entry.js +5 -0
- package/dist/webcomponents/p-745213f7.entry.js +5 -0
- package/dist/webcomponents/p-794b701b.entry.js +5 -0
- package/dist/webcomponents/{p-d826c052.entry.js → p-7ee564a1.entry.js} +1 -1
- package/dist/webcomponents/{p-e20188c0.entry.js → p-7fda8b89.entry.js} +1 -1
- package/dist/webcomponents/p-8116ee93.entry.js +5 -0
- package/dist/webcomponents/p-821341dc.entry.js +5 -0
- package/dist/webcomponents/p-8aa6f07c.entry.js +5 -0
- package/dist/webcomponents/p-8ddf3ce3.entry.js +5 -0
- package/dist/webcomponents/p-95f3c44a.entry.js +5 -0
- package/dist/webcomponents/p-96dbb585.entry.js +5 -0
- package/dist/webcomponents/p-9815ab95.entry.js +5 -0
- package/dist/webcomponents/{p-327f034f.entry.js → p-9e0324a7.entry.js} +1 -1
- package/dist/webcomponents/p-B7bNfmgh.js +5 -0
- package/dist/webcomponents/p-BYsh2ZdE.js +5 -0
- package/dist/webcomponents/p-BkWWrDEr.js +5 -0
- package/dist/webcomponents/p-CJipT0in.js +5 -0
- package/dist/webcomponents/{p-Dcn7tRST.js → p-ConyRdJe.js} +1 -1
- package/dist/webcomponents/{p-BtRPYRvA.js → p-DDc4sADe.js} +1 -1
- package/dist/webcomponents/p-a038be16.entry.js +5 -0
- package/dist/webcomponents/p-a32d17cb.entry.js +5 -0
- package/dist/webcomponents/p-a46f068e.entry.js +5 -0
- package/dist/webcomponents/p-a89b684d.entry.js +5 -0
- package/dist/webcomponents/{p-abaf2365.entry.js → p-ac68355e.entry.js} +1 -1
- package/dist/webcomponents/{p-ed5af0e4.entry.js → p-af888d13.entry.js} +1 -1
- package/dist/webcomponents/p-b0124459.entry.js +5 -0
- package/dist/webcomponents/p-b063c12f.entry.js +5 -0
- package/dist/webcomponents/p-b07bfdc5.entry.js +5 -0
- package/dist/webcomponents/{p-f558d7b9.entry.js → p-b55425b7.entry.js} +1 -1
- package/dist/webcomponents/{p-a0931550.entry.js → p-b5d25332.entry.js} +1 -1
- package/dist/webcomponents/p-b609b464.entry.js +5 -0
- package/dist/webcomponents/p-b66ab52d.entry.js +5 -0
- package/dist/webcomponents/p-b8d4ace3.entry.js +5 -0
- package/dist/webcomponents/p-c717c745.entry.js +5 -0
- package/dist/webcomponents/p-ce3d689c.entry.js +5 -0
- package/dist/webcomponents/p-d08b6266.entry.js +5 -0
- package/dist/webcomponents/p-d6165aa0.entry.js +5 -0
- package/dist/webcomponents/{p-01fb0754.entry.js → p-dacb7e2c.entry.js} +1 -1
- package/dist/webcomponents/p-db309a11.entry.js +5 -0
- package/dist/webcomponents/{p-edc6da0e.entry.js → p-dc23cb2e.entry.js} +1 -1
- package/dist/webcomponents/p-e241caf3.entry.js +5 -0
- package/dist/webcomponents/p-e661c024.entry.js +5 -0
- package/dist/webcomponents/p-e7107869.entry.js +5 -0
- package/dist/webcomponents/p-eb94199d.entry.js +5 -0
- package/dist/webcomponents/p-f8993ae4.entry.js +5 -0
- package/dist/webcomponents/{p-670e8fec.entry.js → p-f99d8c9c.entry.js} +1 -1
- package/dist/webcomponents/{p-DV-iW9Aj.js → p-fOJu6uZR.js} +1 -1
- package/dist/webcomponents/{p-a212fd85.entry.js → p-fb76b1e0.entry.js} +1 -1
- package/dist/webcomponents/p-fdcb54a3.entry.js +5 -0
- package/dist/webcomponents/{p-e3de5bb3.entry.js → p-fed02286.entry.js} +1 -1
- package/dist/webcomponents/p-zlORkiHQ.js +5 -0
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +2 -2
- package/dist/components/p-B0o70fWP.js +0 -5
- package/dist/components/p-B96LROz9.js +0 -5
- package/dist/components/p-BDqef5-y.js +0 -5
- package/dist/components/p-BP5zMCxG.js +0 -5
- package/dist/components/p-BRaphxoP.js +0 -5
- package/dist/components/p-BUzBa9L1.js +0 -5
- package/dist/components/p-BblZlUp2.js +0 -5
- package/dist/components/p-Bc4nAk5i.js +0 -5
- package/dist/components/p-Bezou5CQ.js +0 -5
- package/dist/components/p-BrNh9KdF.js +0 -5
- package/dist/components/p-C5th2dxu.js +0 -5
- package/dist/components/p-CEdUp183.js +0 -5
- package/dist/components/p-CF7t0uxQ.js +0 -5
- package/dist/components/p-CFzHx6zV.js +0 -5
- package/dist/components/p-CG4em0S6.js +0 -5
- package/dist/components/p-CI4D3-pf.js +0 -5
- package/dist/components/p-CIrVPkVg.js +0 -5
- package/dist/components/p-CdDwqbBv.js +0 -5
- package/dist/components/p-Cvk1Ggs5.js +0 -5
- package/dist/components/p-D12US39c.js +0 -5
- package/dist/components/p-DGPJkJsj.js +0 -5
- package/dist/components/p-DX1wAFn4.js +0 -5
- package/dist/components/p-DpRZ4B0d.js +0 -5
- package/dist/components/p-G35qEQZd.js +0 -5
- package/dist/components/p-Ho_IybzR.js +0 -5
- package/dist/components/p-emAWunES.js +0 -5
- package/dist/components/p-fB79wKCm.js +0 -5
- package/dist/components/p-k7p4QJ8a.js +0 -5
- package/dist/webcomponents/p-01baafce.entry.js +0 -5
- package/dist/webcomponents/p-0b9714f1.entry.js +0 -5
- package/dist/webcomponents/p-12aa36a8.entry.js +0 -5
- package/dist/webcomponents/p-130b6e06.entry.js +0 -5
- package/dist/webcomponents/p-144f8c8d.entry.js +0 -5
- package/dist/webcomponents/p-14fe22e2.entry.js +0 -5
- package/dist/webcomponents/p-1ff9210a.entry.js +0 -5
- package/dist/webcomponents/p-2605cdc3.entry.js +0 -5
- package/dist/webcomponents/p-27afaec9.entry.js +0 -5
- package/dist/webcomponents/p-2a50e42d.entry.js +0 -5
- package/dist/webcomponents/p-342650b8.entry.js +0 -5
- package/dist/webcomponents/p-38f6a78b.entry.js +0 -5
- package/dist/webcomponents/p-3920fe3a.entry.js +0 -5
- package/dist/webcomponents/p-3ae97345.entry.js +0 -5
- package/dist/webcomponents/p-3cce767c.entry.js +0 -5
- package/dist/webcomponents/p-3df6c5d2.entry.js +0 -5
- package/dist/webcomponents/p-3e287899.entry.js +0 -5
- package/dist/webcomponents/p-3e5580ba.entry.js +0 -5
- package/dist/webcomponents/p-403637dd.entry.js +0 -5
- package/dist/webcomponents/p-435c8ef2.entry.js +0 -5
- package/dist/webcomponents/p-59da5b55.entry.js +0 -5
- package/dist/webcomponents/p-5dd4314c.entry.js +0 -5
- package/dist/webcomponents/p-646af6a5.entry.js +0 -5
- package/dist/webcomponents/p-68046544.entry.js +0 -5
- package/dist/webcomponents/p-68ec76b8.entry.js +0 -5
- package/dist/webcomponents/p-6c0ea20c.entry.js +0 -5
- package/dist/webcomponents/p-707df9b9.entry.js +0 -5
- package/dist/webcomponents/p-72b839fe.entry.js +0 -5
- package/dist/webcomponents/p-73dcc05b.entry.js +0 -5
- package/dist/webcomponents/p-7b01bddb.entry.js +0 -5
- package/dist/webcomponents/p-7cd38850.entry.js +0 -5
- package/dist/webcomponents/p-82454383.entry.js +0 -5
- package/dist/webcomponents/p-91e959a8.entry.js +0 -5
- package/dist/webcomponents/p-964c01e6.entry.js +0 -5
- package/dist/webcomponents/p-9858e42a.entry.js +0 -5
- package/dist/webcomponents/p-9c4200b0.entry.js +0 -5
- package/dist/webcomponents/p-9d9c87b1.entry.js +0 -5
- package/dist/webcomponents/p-B0PbhaxL.js +0 -5
- package/dist/webcomponents/p-D3tVP32U.js +0 -5
- package/dist/webcomponents/p-a2e75143.entry.js +0 -5
- package/dist/webcomponents/p-a3bb98c9.entry.js +0 -5
- package/dist/webcomponents/p-a8b5dba0.entry.js +0 -5
- package/dist/webcomponents/p-aa909443.entry.js +0 -5
- package/dist/webcomponents/p-aeb16645.entry.js +0 -5
- package/dist/webcomponents/p-b287c384.entry.js +0 -5
- package/dist/webcomponents/p-b506b0a1.entry.js +0 -5
- package/dist/webcomponents/p-b520c08c.entry.js +0 -5
- package/dist/webcomponents/p-b94c3f84.entry.js +0 -5
- package/dist/webcomponents/p-bda62f90.entry.js +0 -5
- package/dist/webcomponents/p-c201ae16.entry.js +0 -5
- package/dist/webcomponents/p-c7e899a1.entry.js +0 -5
- package/dist/webcomponents/p-cbf3e251.entry.js +0 -5
- package/dist/webcomponents/p-d35cf5b4.entry.js +0 -5
- package/dist/webcomponents/p-d45ffe9c.entry.js +0 -5
- package/dist/webcomponents/p-d719a4af.entry.js +0 -5
- package/dist/webcomponents/p-da21a60d.entry.js +0 -5
- package/dist/webcomponents/p-de0c7f26.entry.js +0 -5
- package/dist/webcomponents/p-e27882e1.entry.js +0 -5
- package/dist/webcomponents/p-e624ff04.entry.js +0 -5
- package/dist/webcomponents/p-f24fcf3d.entry.js +0 -5
- package/dist/webcomponents/p-f52ef0dc.entry.js +0 -5
- package/dist/webcomponents/p-fcab1428.entry.js +0 -5
- package/dist/webcomponents/p-fe1729a7.entry.js +0 -5
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
* Construído por SERPRO
|
|
3
3
|
* © https://serpro.gov.br/ - MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
5
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-ConyRdJe.js';
|
|
6
6
|
import { r as resolveAllowedPropValue, a as resolveDensity, b as resolveIntegerPropValue, c as resolveNumberPropValue } from './props-D07GjR4_.js';
|
|
7
7
|
import { r as reportInvalidPropValue } from './prop-warning-BlGV-x0w.js';
|
|
8
8
|
import { c as createRafBatcher } from './raf-batcher-cF3ia5e9.js';
|
|
9
|
+
import { S as SELECT_ALL_OPTION_VALUE, f as filterSelectOptions } from './select.utils-BYsh2ZdE.js';
|
|
10
|
+
import { f as findComposedOwner } from './ownership-CDtFCbKp.js';
|
|
9
11
|
|
|
10
|
-
const selectInputCss = () => `*,*::before,*::after{box-sizing:border-box}:host{line-height:var(--font-line-height-medium);-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%}main{display:block}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace;font-size:1em}a{background-color:rgba(0,0,0,0)}b,strong{font-weight:bolder}code{font-family:monospace;font-size:1em}small{font-size:80%}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:var(--font-line-height-medium);margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{appearance:none}::-webkit-file-upload-button{appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}.d-none{display:none !important}@media (min-width: 576px){.d-sm-block{display:block !important}.d-sm-flex{display:flex !important}}[data-toggle=dropdown]+*{position:absolute}.dropdown{position:relative}.dropdown [data-toggle=dropdown]+*{box-shadow:var(--surface-shadow-sm);left:0;position:absolute;top:100%}.dropdown>.br-notification{left:auto;right:0}.dropdown .br-item{--color:var(--color-light);--color-rgb:var(--color-light-rgb);--text-color:var(--color-light);--interactive:var(--interactive-light);--interactive-rgb:var(--color-rgb);--visited:var(--visited-light);--hover:var(--hover-light);--pressed:var(--pressed-light);--focus-color:var(--focus-color-light);--focus:var(--focus-color-light);--item-padding-y:var(--spacing-scale-2x);background-color:var(--background-light);color:var(--color)}.dropdown .br-item:not(:last-child){border-bottom:1px solid var(--border-color)}.dropdown .br-item.selected{--color:var(--color-dark);--color-rgb:var(--color-dark-rgb);--text-color:var(--color-dark);--interactive:var(--interactive-dark);--interactive-rgb:var(--interactive-dark-rgb);--visited:var(--visited-dark);--hover:var(--hover-dark);--pressed:var(--pressed-dark);--focus-color:var(--focus-color-dark);--focus:var(--focus-color-dark)}.justify-content-start{justify-content:flex-start !important}.justify-content-end{justify-content:flex-end !important}.justify-content-center{justify-content:center !important}.align-items-center{align-items:center !important}.col,[class*=col-]{padding-left:calc(var(--grid-gutter)*.5);padding-right:calc(var(--grid-gutter)*.5);width:100%}.col{flex:1 0 0%;min-width:8.3333333333%}.col-auto{flex:0 0 auto;width:auto}.col-2{flex-basis:16.6666666667%;max-width:16.6666666667%}.container,.container-fluid,.container-lg{--grid-margin:var(--grid-portrait-margin);--grid-maxwidth:var(--grid-portrait-maxwidth);margin-left:auto;margin-right:auto;max-width:var(--grid-maxwidth);padding-left:var(--grid-margin);padding-right:var(--grid-margin);width:100%}.row{--grid-gutter:var(--grid-portrait-gutter);display:flex;flex-wrap:wrap;margin-left:calc(var(--grid-gutter)*-0.5);margin-right:calc(var(--grid-gutter)*-0.5)}@media (min-width: 576px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-tablet-margin)}.row{--grid-gutter:var(--grid-tablet-gutter)}.container{--grid-maxwidth:calc(var(--grid-breakpoint-sm) - var(--grid-tablet-margin))}.col-sm-4{flex-basis:33.3333333333%;max-width:33.3333333333%}}@media (min-width: 992px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-tablet-margin)}.row{--grid-gutter:var(--grid-tablet-gutter)}.container{--grid-maxwidth:calc(var(--grid-breakpoint-md) - var(--grid-tablet-margin))}}@media (min-width: 1280px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-desktop-margin)}.row{--grid-gutter:var(--grid-desktop-gutter)}.container,.container-lg{--grid-maxwidth:calc(var(--grid-breakpoint-lg) - var(--grid-desktop-margin))}.col-lg-3{flex-basis:25%;max-width:25%}}@media (min-width: 1600px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-tv-margin)}.row{--grid-gutter:var(--grid-tv-gutter)}.container,.container-lg{--grid-maxwidth:calc(var(--grid-breakpoint-xl) - var(--grid-tv-margin))}}.ease{animation-timing-function:cubic-bezier(0.25, 0.1, 0.25, 1)}.ease-out{animation-timing-function:cubic-bezier(0, 0, 0.58, 1)}.ease-in-out{animation-timing-function:cubic-bezier(0.42, 0, 0.58, 1)}.fast{animation-duration:var(--duration-fast)}.slow{animation-duration:var(--duration-slow)}.mt-1{margin-top:var(--spacing-scale-half) !important}.mr-1{margin-right:var(--spacing-scale-half) !important}.mb-1{margin-bottom:var(--spacing-scale-half) !important}.ml-1{margin-left:var(--spacing-scale-half) !important}.mx-3{margin-left:var(--spacing-scale-2x) !important;margin-right:var(--spacing-scale-2x) !important}.mb-4{margin-bottom:var(--spacing-scale-3x) !important}.ml-auto{margin-left:auto !important}.pt-half{padding-top:var(--spacing-scale-half) !important}@media (min-width: 576px){.ml-sm-0{margin-left:var(--spacing-scale-default) !important}}.highlight{background:var(--status-highlight-background) linear-gradient(var(--status-highlight-overlay), var(--status-highlight-overlay));color:var(--status-highlight-text);padding:0 var(--spacing-scale-half)}[disabled],.disabled{cursor:not-allowed;opacity:var(--disabled)}[disabled] *,.disabled *{pointer-events:none}fieldset[disabled]{opacity:1}.text-center{text-align:center !important}.text-right{text-align:right !important}.text-nowrap{white-space:nowrap !important}.text-uppercase{text-transform:uppercase !important}.text-bold{font-weight:700 !important}.text-base{font-size:var(--font-size-scale-base) !important}.text-down-01{font-size:var(--font-size-scale-down-01) !important}@media (min-width: 576px){.text-sm-center{text-align:center !important}.text-sm-left{text-align:left !important}.text-sm-right{text-align:right !important}}p{color:var(--color);font-size:var(--font-size-scale-base);font-weight:var(--font-weight-regular);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-2x);margin-top:0}p a{text-decoration:underline}@media (min-width: 576px){p{font-size:var(--font-size-scale-up-01)}}a{--focus-offset:var(--spacing-scale-half)}a:focus{outline:none}a.focus-visible,a:focus-visible{outline-color:var(--focus);outline-offset:var(--focus-offset);outline-style:var(--focus-style);outline-width:var(--focus-width)}a:not(:disabled):hover{background-image:linear-gradient(rgba(var(--interactive-rgb), var(--hover)), rgba(var(--interactive-rgb), var(--hover)))}a:not(:disabled):active{background-image:linear-gradient(rgba(var(--interactive-rgb), var(--pressed)), rgba(var(--interactive-rgb), var(--pressed)))}a{color:var(--interactive);text-decoration:none}.main-content a{text-decoration:underline}button{cursor:pointer}img{max-width:100%;vertical-align:middle}h2,.h2{color:var(--color);font-size:var(--font-size-scale-up-03);font-weight:var(--font-weight-semi-bold);line-height:var(--font-line-height-low);margin-bottom:var(--spacing-scale-2xh);margin-top:var(--spacing-scale-3xh);padding-bottom:var(--spacing-scale-2xh)}@media (min-width: 576px){.h2,h2{font-size:var(--font-size-scale-up-05);font-weight:var(--font-weight-regular)}}ul,ol{margin-bottom:var(--spacing-scale-2x);margin-top:0;padding:0 0 0 var(--spacing-scale-5x)}table{--table-background:var(--background);--table-color:var(--color);--table-border-color:var(--gray-20);--table-border-style:solid;--table-border-width:1px;--table-hover:var(--color-rgb);--table-padding:var(--spacing-scale-3x);--table-font-weight:var(--font-weight-medium);--table-th-background:var(--background-alternative);--table-th-font-weight:var(--font-weight-semi-bold);--table-row-size:var(--spacing-scale-2x);border-collapse:collapse;width:100%}tr.selected,tr.is-selected{--color:var(--color-dark);--color-rgb:var(--color-dark-rgb);--text-color:var(--color-dark);--interactive:var(--interactive-dark);--interactive-rgb:var(--interactive-dark-rgb);--visited:var(--visited-dark);--hover:var(--hover-dark);--pressed:var(--pressed-dark);--focus-color:var(--focus-color-dark);--focus:var(--focus-color-dark)}label,.label{color:var(--color);font-size:var(--font-size-scale-base);font-weight:var(--font-weight-semi-bold);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-half)}fieldset,.fieldset{border:var(--surface-width-none);margin-bottom:var(--spacing-scale-5x);margin-top:0;padding:0}legend,.legend{color:var(--color);font-size:var(--font-size-scale-up-01);font-weight:var(--font-weight-semi-bold);line-height:var(--font-line-height-low);margin-bottom:var(--spacing-scale-2x);margin-top:var(--spacing-scale-2x)}::placeholder,.placeholder{color:var(--color-light);font-size:var(--font-size-scale-base);font-style:italic;font-weight:var(--font-weight-regular);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-half);margin-top:var(--spacing-scale-half);opacity:1}input,textarea,.input{color:var(--color-light);font-size:var(--font-size-scale-up-01);font-weight:var(--font-weight-medium);line-height:var(--font-line-height-low);margin-bottom:var(--spacing-scale-half)}code,.code{background:var(--gray-5);border-radius:4px;color:var(--gray-80);display:inline-block;font-family:monospace;font-size:var(--font-size-scale-base);font-weight:var(--font-weight-medium);line-height:var(--font-line-height-low);padding:var(--spacing-scale-half)}pre,.pre{background:var(--gray-5);margin:var(--spacing-scale-2x) 0 var(--spacing-scale-4x);padding:var(--spacing-scale-2x)}pre code,.pre code{display:inline;padding:0}*[data-toggle=collapse]:not(:disabled):hover{background-image:linear-gradient(rgba(var(--interactive-rgb), var(--hover)), rgba(var(--interactive-rgb), var(--hover)))}*[data-toggle=collapse]:focus{outline:none}*[data-toggle=collapse].focus-visible,*[data-toggle=collapse]:focus-visible{outline-color:var(--focus);outline-offset:var(--focus-offset);outline-style:var(--focus-style);outline-width:var(--focus-width)}@media (prefers-reduced-motion: reduce){:host,:host::before,:host::after,:host *,:host *::before,:host *::after{animation:none !important;scroll-behavior:auto !important;transition:none !important}}:host-context([data-wbc-reduced-motion=true])::before,:host-context([data-wbc-reduced-motion=true])::after,:host-context([data-wbc-reduced-motion=true]) *,:host-context([data-wbc-reduced-motion=true]) *::before,:host-context([data-wbc-reduced-motion=true]) *::after{animation:none !important;scroll-behavior:auto !important;transition:none !important}:host{box-sizing:border-box;display:block;cursor:pointer;max-width:100%;width:100%}br-input{cursor:pointer}:host([disabled]){opacity:1 !important;cursor:default}:host([disabled]) br-input{cursor:default}`;
|
|
12
|
+
const selectInputCss = () => `*,*::before,*::after{box-sizing:border-box}:host{line-height:var(--font-line-height-medium);-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%}main{display:block}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace;font-size:1em}a{background-color:rgba(0,0,0,0)}b,strong{font-weight:bolder}small{font-size:80%}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:var(--font-line-height-medium);margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{appearance:none}::-webkit-file-upload-button{appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}.d-none{display:none !important}@media (min-width: 576px){.d-sm-block{display:block !important}.d-sm-flex{display:flex !important}}[data-toggle=dropdown]+*{position:absolute}.dropdown{position:relative}.dropdown [data-toggle=dropdown]+*{box-shadow:var(--surface-shadow-sm);left:0;position:absolute;top:100%}.dropdown>.br-notification{left:auto;right:0}.dropdown .br-item{--color:var(--color-light);--color-rgb:var(--color-light-rgb);--text-color:var(--color-light);--interactive:var(--interactive-light);--interactive-rgb:var(--color-rgb);--visited:var(--visited-light);--hover:var(--hover-light);--pressed:var(--pressed-light);--focus-color:var(--focus-color-light);--focus:var(--focus-color-light);--item-padding-y:var(--spacing-scale-2x);background-color:var(--background-light);color:var(--color)}.dropdown .br-item:not(:last-child){border-bottom:1px solid var(--border-color)}.dropdown .br-item.selected{--color:var(--color-dark);--color-rgb:var(--color-dark-rgb);--text-color:var(--color-dark);--interactive:var(--interactive-dark);--interactive-rgb:var(--interactive-dark-rgb);--visited:var(--visited-dark);--hover:var(--hover-dark);--pressed:var(--pressed-dark);--focus-color:var(--focus-color-dark);--focus:var(--focus-color-dark)}.justify-content-start{justify-content:flex-start !important}.justify-content-end{justify-content:flex-end !important}.justify-content-center{justify-content:center !important}.align-items-center{align-items:center !important}.col,[class*=col-]{padding-left:calc(var(--grid-gutter)*.5);padding-right:calc(var(--grid-gutter)*.5);width:100%}.col{flex:1 0 0%;min-width:8.3333333333%}.col-auto{flex:0 0 auto;width:auto}.col-2{flex-basis:16.6666666667%;max-width:16.6666666667%}.container,.container-fluid,.container-lg{--grid-margin:var(--grid-portrait-margin);--grid-maxwidth:var(--grid-portrait-maxwidth);margin-left:auto;margin-right:auto;max-width:var(--grid-maxwidth);padding-left:var(--grid-margin);padding-right:var(--grid-margin);width:100%}.row{--grid-gutter:var(--grid-portrait-gutter);display:flex;flex-wrap:wrap;margin-left:calc(var(--grid-gutter)*-0.5);margin-right:calc(var(--grid-gutter)*-0.5)}@media (min-width: 576px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-tablet-margin)}.row{--grid-gutter:var(--grid-tablet-gutter)}.container{--grid-maxwidth:calc(var(--grid-breakpoint-sm) - var(--grid-tablet-margin))}.col-sm-4{flex-basis:33.3333333333%;max-width:33.3333333333%}}@media (min-width: 992px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-tablet-margin)}.row{--grid-gutter:var(--grid-tablet-gutter)}.container{--grid-maxwidth:calc(var(--grid-breakpoint-md) - var(--grid-tablet-margin))}}@media (min-width: 1280px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-desktop-margin)}.row{--grid-gutter:var(--grid-desktop-gutter)}.container,.container-lg{--grid-maxwidth:calc(var(--grid-breakpoint-lg) - var(--grid-desktop-margin))}.col-lg-3{flex-basis:25%;max-width:25%}}@media (min-width: 1600px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-tv-margin)}.row{--grid-gutter:var(--grid-tv-gutter)}.container,.container-lg{--grid-maxwidth:calc(var(--grid-breakpoint-xl) - var(--grid-tv-margin))}}.ease{animation-timing-function:cubic-bezier(0.25, 0.1, 0.25, 1)}.ease-out{animation-timing-function:cubic-bezier(0, 0, 0.58, 1)}.ease-in-out{animation-timing-function:cubic-bezier(0.42, 0, 0.58, 1)}.fast{animation-duration:var(--duration-fast)}.slow{animation-duration:var(--duration-slow)}.mt-1{margin-top:var(--spacing-scale-half) !important}.mr-1{margin-right:var(--spacing-scale-half) !important}.mb-1{margin-bottom:var(--spacing-scale-half) !important}.ml-1{margin-left:var(--spacing-scale-half) !important}.mx-3{margin-left:var(--spacing-scale-2x) !important;margin-right:var(--spacing-scale-2x) !important}.mb-4{margin-bottom:var(--spacing-scale-3x) !important}.ml-auto{margin-left:auto !important}.pt-half{padding-top:var(--spacing-scale-half) !important}@media (min-width: 576px){.ml-sm-0{margin-left:var(--spacing-scale-default) !important}}.highlight{background:var(--status-highlight-background) linear-gradient(var(--status-highlight-overlay), var(--status-highlight-overlay));color:var(--status-highlight-text);padding:0 var(--spacing-scale-half)}[disabled],.disabled{cursor:not-allowed;opacity:var(--disabled)}[disabled] *,.disabled *{pointer-events:none}fieldset[disabled]{opacity:1}.text-center{text-align:center !important}.text-right{text-align:right !important}.text-nowrap{white-space:nowrap !important}.text-uppercase{text-transform:uppercase !important}.text-bold{font-weight:700 !important}.text-base{font-size:var(--font-size-scale-base) !important}.text-down-01{font-size:var(--font-size-scale-down-01) !important}@media (min-width: 576px){.text-sm-center{text-align:center !important}.text-sm-left{text-align:left !important}.text-sm-right{text-align:right !important}}p{color:var(--color);font-size:var(--font-size-scale-base);font-weight:var(--font-weight-regular);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-2x);margin-top:0}p a{text-decoration:underline}@media (min-width: 576px){p{font-size:var(--font-size-scale-up-01)}}a{--focus-offset:var(--spacing-scale-half)}a:focus{outline:none}a.focus-visible,a:focus-visible{outline-color:var(--focus);outline-offset:var(--focus-offset);outline-style:var(--focus-style);outline-width:var(--focus-width)}a:not(:disabled):hover{background-image:linear-gradient(rgba(var(--interactive-rgb), var(--hover)), rgba(var(--interactive-rgb), var(--hover)))}a:not(:disabled):active{background-image:linear-gradient(rgba(var(--interactive-rgb), var(--pressed)), rgba(var(--interactive-rgb), var(--pressed)))}a{color:var(--interactive);text-decoration:none}.main-content a{text-decoration:underline}button{cursor:pointer}img{max-width:100%;vertical-align:middle}h2,.h2{color:var(--color);font-size:var(--font-size-scale-up-03);font-weight:var(--font-weight-semi-bold);line-height:var(--font-line-height-low);margin-bottom:var(--spacing-scale-2xh);margin-top:var(--spacing-scale-3xh);padding-bottom:var(--spacing-scale-2xh)}@media (min-width: 576px){.h2,h2{font-size:var(--font-size-scale-up-05);font-weight:var(--font-weight-regular)}}ul,ol{margin-bottom:var(--spacing-scale-2x);margin-top:0;padding:0 0 0 var(--spacing-scale-5x)}table{--table-background:var(--background);--table-color:var(--color);--table-border-color:var(--gray-20);--table-border-style:solid;--table-border-width:1px;--table-hover:var(--color-rgb);--table-padding:var(--spacing-scale-3x);--table-font-weight:var(--font-weight-medium);--table-th-background:var(--background-alternative);--table-th-font-weight:var(--font-weight-semi-bold);--table-row-size:var(--spacing-scale-2x);border-collapse:collapse;width:100%}tr.selected,tr.is-selected{--color:var(--color-dark);--color-rgb:var(--color-dark-rgb);--text-color:var(--color-dark);--interactive:var(--interactive-dark);--interactive-rgb:var(--interactive-dark-rgb);--visited:var(--visited-dark);--hover:var(--hover-dark);--pressed:var(--pressed-dark);--focus-color:var(--focus-color-dark);--focus:var(--focus-color-dark)}label,.label{color:var(--color);font-size:var(--font-size-scale-base);font-weight:var(--font-weight-semi-bold);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-half)}fieldset,.fieldset{border:var(--surface-width-none);margin-bottom:var(--spacing-scale-5x);margin-top:0;padding:0}legend,.legend{color:var(--color);font-size:var(--font-size-scale-up-01);font-weight:var(--font-weight-semi-bold);line-height:var(--font-line-height-low);margin-bottom:var(--spacing-scale-2x);margin-top:var(--spacing-scale-2x)}::placeholder,.placeholder{color:var(--color-light);font-size:var(--font-size-scale-base);font-style:italic;font-weight:var(--font-weight-regular);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-half);margin-top:var(--spacing-scale-half);opacity:1}input,textarea,.input{color:var(--color-light);font-size:var(--font-size-scale-up-01);font-weight:var(--font-weight-medium);line-height:var(--font-line-height-low);margin-bottom:var(--spacing-scale-half)}pre,.pre{background:var(--gray-5);margin:var(--spacing-scale-2x) 0 var(--spacing-scale-4x);padding:var(--spacing-scale-2x)}*[data-toggle=collapse]:not(:disabled):hover{background-image:linear-gradient(rgba(var(--interactive-rgb), var(--hover)), rgba(var(--interactive-rgb), var(--hover)))}*[data-toggle=collapse]:focus{outline:none}*[data-toggle=collapse].focus-visible,*[data-toggle=collapse]:focus-visible{outline-color:var(--focus);outline-offset:var(--focus-offset);outline-style:var(--focus-style);outline-width:var(--focus-width)}@media (prefers-reduced-motion: reduce){:host,:host::before,:host::after,:host *,:host *::before,:host *::after{animation:none !important;scroll-behavior:auto !important;transition:none !important}}:host-context([data-wbc-reduced-motion=true])::before,:host-context([data-wbc-reduced-motion=true])::after,:host-context([data-wbc-reduced-motion=true]) *,:host-context([data-wbc-reduced-motion=true]) *::before,:host-context([data-wbc-reduced-motion=true]) *::after{animation:none !important;scroll-behavior:auto !important;transition:none !important}:host{box-sizing:border-box;display:block;cursor:pointer;max-width:100%;width:100%}br-input{cursor:pointer}:host([disabled]){opacity:1 !important;cursor:default}:host([disabled]) br-input{cursor:default}`;
|
|
11
13
|
|
|
12
14
|
const SELECT_INPUT_AUTOCOMPLETE_VALUES = ['on', 'off'];
|
|
13
15
|
const SelectInput = class {
|
|
@@ -71,7 +73,19 @@ const SelectInput = class {
|
|
|
71
73
|
const nativeValue = this.inputElement?.shadowRoot?.querySelector('input')?.value;
|
|
72
74
|
this.brSelectInputValueChange.emit(typeof detail === 'string' ? detail : (nativeValue ?? this.inputElement?.value ?? target?.value ?? ''));
|
|
73
75
|
};
|
|
74
|
-
this.handleClick = () => {
|
|
76
|
+
this.handleClick = (event) => {
|
|
77
|
+
if (this.disabled)
|
|
78
|
+
return;
|
|
79
|
+
const isActionClick = event.composedPath().some((target) => {
|
|
80
|
+
if (!(target instanceof HTMLElement))
|
|
81
|
+
return false;
|
|
82
|
+
const parts = target.getAttribute('part')?.split(/\s+/) ?? [];
|
|
83
|
+
return parts.includes('action') || parts.includes('action-button');
|
|
84
|
+
});
|
|
85
|
+
if (isActionClick) {
|
|
86
|
+
this.brSelectInputActionClick.emit();
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
75
89
|
this.brSelectInputClick.emit();
|
|
76
90
|
};
|
|
77
91
|
}
|
|
@@ -83,6 +97,86 @@ const SelectInput = class {
|
|
|
83
97
|
}
|
|
84
98
|
componentDidRender() {
|
|
85
99
|
this.syncNativeCursor();
|
|
100
|
+
this.applyComboboxState();
|
|
101
|
+
}
|
|
102
|
+
async syncCombobox(state) {
|
|
103
|
+
this.comboboxState = state;
|
|
104
|
+
this.applyComboboxState();
|
|
105
|
+
}
|
|
106
|
+
// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: sincroniza a representação acessível do combobox em uma única transação.
|
|
107
|
+
applyComboboxState() {
|
|
108
|
+
const state = this.comboboxState;
|
|
109
|
+
const root = this.inputElement?.shadowRoot;
|
|
110
|
+
const input = root?.querySelector('input');
|
|
111
|
+
if (!state || !root || !input)
|
|
112
|
+
return;
|
|
113
|
+
// A representação acessível compartilha o escopo de IDs do input nativo.
|
|
114
|
+
// A lista visual virtualizada é aria-hidden no orquestrador.
|
|
115
|
+
if (!this.accessibleList || !root.contains(this.accessibleList)) {
|
|
116
|
+
this.accessibleList = document.createElement('div');
|
|
117
|
+
this.accessibleList.id = 'select-accessible-list';
|
|
118
|
+
this.accessibleList.style.cssText =
|
|
119
|
+
'position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0;';
|
|
120
|
+
root.appendChild(this.accessibleList);
|
|
121
|
+
}
|
|
122
|
+
if (!this.accessibleStatus || !root.contains(this.accessibleStatus)) {
|
|
123
|
+
this.accessibleStatus = document.createElement('div');
|
|
124
|
+
this.accessibleStatus.setAttribute('role', 'status');
|
|
125
|
+
this.accessibleStatus.setAttribute('aria-live', 'polite');
|
|
126
|
+
this.accessibleStatus.style.cssText =
|
|
127
|
+
'position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0;';
|
|
128
|
+
root.appendChild(this.accessibleStatus);
|
|
129
|
+
}
|
|
130
|
+
if (!this.accessibleDescription || !root.contains(this.accessibleDescription)) {
|
|
131
|
+
this.accessibleDescription = document.createElement('div');
|
|
132
|
+
this.accessibleDescription.id = 'select-accessible-description';
|
|
133
|
+
this.accessibleDescription.style.cssText =
|
|
134
|
+
'position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0;';
|
|
135
|
+
root.appendChild(this.accessibleDescription);
|
|
136
|
+
}
|
|
137
|
+
const list = this.accessibleList;
|
|
138
|
+
list.setAttribute('role', 'listbox');
|
|
139
|
+
list.setAttribute('aria-label', state.label);
|
|
140
|
+
list.setAttribute('aria-multiselectable', String(state.multiple));
|
|
141
|
+
list.setAttribute('aria-busy', String(state.loading));
|
|
142
|
+
list.hidden = !state.expanded;
|
|
143
|
+
this.accessibleStatus.textContent =
|
|
144
|
+
state.expanded && state.options.length === 0 ? 'Nenhum resultado encontrado' : '';
|
|
145
|
+
list.replaceChildren(...state.options.map((option, index) => {
|
|
146
|
+
const element = document.createElement('div');
|
|
147
|
+
element.id = `select-accessible-option-${index}`;
|
|
148
|
+
element.setAttribute('role', 'option');
|
|
149
|
+
element.setAttribute('aria-selected', String(Boolean(option.selected)));
|
|
150
|
+
element.setAttribute('aria-disabled', String(Boolean(option.disabled)));
|
|
151
|
+
element.setAttribute('aria-posinset', String(index + 1));
|
|
152
|
+
element.setAttribute('aria-setsize', String(state.options.length));
|
|
153
|
+
element.textContent = [option.group, option.label ?? option.value].filter(Boolean).join(': ');
|
|
154
|
+
return element;
|
|
155
|
+
}));
|
|
156
|
+
input.setAttribute('role', 'combobox');
|
|
157
|
+
input.setAttribute('aria-label', state.label);
|
|
158
|
+
input.setAttribute('aria-haspopup', 'listbox');
|
|
159
|
+
input.setAttribute('aria-expanded', String(state.expanded));
|
|
160
|
+
input.setAttribute('aria-controls', list.id);
|
|
161
|
+
input.setAttribute('aria-autocomplete', this.filterable ? 'list' : 'none');
|
|
162
|
+
input.setAttribute('aria-required', String(state.required));
|
|
163
|
+
input.setAttribute('aria-invalid', String(state.invalid));
|
|
164
|
+
const description = state.invalid ? state.errorMessage : '';
|
|
165
|
+
this.accessibleDescription.textContent = description;
|
|
166
|
+
const describedBy = new Set((input.getAttribute('aria-describedby') || '').split(/\s+/).filter(Boolean));
|
|
167
|
+
describedBy.delete(this.accessibleDescription.id);
|
|
168
|
+
if (description)
|
|
169
|
+
describedBy.add(this.accessibleDescription.id);
|
|
170
|
+
if (describedBy.size)
|
|
171
|
+
input.setAttribute('aria-describedby', [...describedBy].join(' '));
|
|
172
|
+
else
|
|
173
|
+
input.removeAttribute('aria-describedby');
|
|
174
|
+
if (state.expanded && state.options[state.activeIndex]) {
|
|
175
|
+
input.setAttribute('aria-activedescendant', `select-accessible-option-${state.activeIndex}`);
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
178
|
+
input.removeAttribute('aria-activedescendant');
|
|
179
|
+
}
|
|
86
180
|
}
|
|
87
181
|
/**
|
|
88
182
|
* Atualiza o ícone para o estado visual de lista aberta.
|
|
@@ -115,10 +209,6 @@ const SelectInput = class {
|
|
|
115
209
|
nativeInput.style.cursor = this.disabled ? 'default' : this.filterable ? 'text' : 'pointer';
|
|
116
210
|
}
|
|
117
211
|
}
|
|
118
|
-
handleActionClick() {
|
|
119
|
-
if (!this.disabled)
|
|
120
|
-
this.brSelectInputActionClick.emit();
|
|
121
|
-
}
|
|
122
212
|
getCssClassMap() {
|
|
123
213
|
return {
|
|
124
214
|
'br-select-input': true,
|
|
@@ -128,12 +218,14 @@ const SelectInput = class {
|
|
|
128
218
|
return h("br-icon", { slot: "icon", iconName: "fa-solid:search", width: "16", height: "16", "aria-hidden": "true" });
|
|
129
219
|
}
|
|
130
220
|
renderDropdownIcon() {
|
|
131
|
-
return (h("br-icon", { "aria-hidden": "true",
|
|
221
|
+
return (h("br-icon", { "aria-hidden": "true",
|
|
222
|
+
// Mesmo par de expandir/recolher do restante do DS (collapse, menu, cookiebar).
|
|
223
|
+
iconName: this.flipped ? 'fa6-solid:chevron-up' : 'fa6-solid:chevron-down', width: "16", height: "16", slot: "action" }));
|
|
132
224
|
}
|
|
133
225
|
render() {
|
|
134
|
-
return (h(Host, { key: '
|
|
226
|
+
return (h(Host, { key: '36a6850e7f9ecb425e8edd62bb693d85c63275c5' }, h("div", { key: '425892a54d2e2efa4470cdef504bc6492ba42c04', class: this.getCssClassMap(), part: "container" }, h("br-input", { key: '036bb76d093fd7026d8575a917199fa455973adb', "aria-label": this.label || this.placeholder || 'Seleção', "action-tab-index": -1, "action-label": this.flipped ? 'Fechar opções' : 'Abrir opções', autocomplete: this.effectiveAutocomplete, borderless: this.borderless, "control-width": this.inputWidth, density: this.effectiveDensity, readonly: !this.filterable, "is-inline": this.isInline, label: this.label, name: this.name, placeholder: this.placeholder, required: this.required, ref: (el) => {
|
|
135
227
|
this.inputElement = el;
|
|
136
|
-
}, value: this.value, disabled: this.disabled, onClick: this.handleClick, onInput: this.handleInput, onFocus: this.handleFocus, exportparts: "container:input, label:label, input:input, group:group, icon:icon, action:action, action-button:action-button" }, this.showSearchIcon && this.renderSearchIcon(), this.renderDropdownIcon()))));
|
|
228
|
+
}, value: this.value, disabled: this.disabled, onClick: this.handleClick, onInput: this.handleInput, onFocus: this.handleFocus, exportparts: "container:input, label:label, input:input, group:group, icon:icon, action:action, action-button:action-button" }, (this.filterable || this.showSearchIcon) && this.renderSearchIcon(), this.renderDropdownIcon()))));
|
|
137
229
|
}
|
|
138
230
|
static get delegatesFocus() { return true; }
|
|
139
231
|
static get formAssociated() { return true; }
|
|
@@ -141,34 +233,14 @@ const SelectInput = class {
|
|
|
141
233
|
};
|
|
142
234
|
SelectInput.style = selectInputCss();
|
|
143
235
|
|
|
144
|
-
/**
|
|
145
|
-
* Calcula os índices inicial e final (exclusivo) da janela virtualizada.
|
|
146
|
-
*
|
|
147
|
-
* Valores inválidos são normalizados para limites seguros para que um estado
|
|
148
|
-
* transitório de layout não interrompa a renderização da lista.
|
|
149
|
-
*/
|
|
150
|
-
function computeVirtualWindow({ totalItems, itemHeight, scrollTop, viewportHeight, overscan, }) {
|
|
151
|
-
const itemCount = Number.isFinite(totalItems) ? Math.max(0, Math.floor(totalItems)) : 0;
|
|
152
|
-
if (itemCount === 0)
|
|
153
|
-
return { startIndex: 0, endIndex: 0 };
|
|
154
|
-
const rowHeight = Number.isFinite(itemHeight) && itemHeight > 0 ? itemHeight : 1;
|
|
155
|
-
const offset = Number.isFinite(scrollTop) ? Math.max(0, scrollTop) : 0;
|
|
156
|
-
const viewport = Number.isFinite(viewportHeight) && viewportHeight > 0 ? viewportHeight : rowHeight;
|
|
157
|
-
const extraItems = Number.isFinite(overscan) ? Math.max(0, Math.floor(overscan)) : 0;
|
|
158
|
-
const firstVisibleIndex = Math.min(itemCount - 1, Math.floor(offset / rowHeight));
|
|
159
|
-
const visibleItemCount = Math.max(1, Math.ceil(viewport / rowHeight));
|
|
160
|
-
const startIndex = Math.max(0, firstVisibleIndex - extraItems);
|
|
161
|
-
const endIndex = Math.min(itemCount, firstVisibleIndex + visibleItemCount + extraItems);
|
|
162
|
-
return { startIndex, endIndex };
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
const selectListCss = () => `*,*::before,*::after{box-sizing:border-box}:host{line-height:var(--font-line-height-medium);-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%}main{display:block}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace;font-size:1em}a{background-color:rgba(0,0,0,0)}b,strong{font-weight:bolder}code{font-family:monospace;font-size:1em}small{font-size:80%}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:var(--font-line-height-medium);margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{appearance:none}::-webkit-file-upload-button{appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}.d-none{display:none !important}@media (min-width: 576px){.d-sm-block{display:block !important}.d-sm-flex{display:flex !important}}[data-toggle=dropdown]+*{position:absolute}.dropdown{position:relative}.dropdown [data-toggle=dropdown]+*{box-shadow:var(--surface-shadow-sm);left:0;position:absolute;top:100%}.dropdown>.br-notification{left:auto;right:0}.dropdown .br-item{--color:var(--color-light);--color-rgb:var(--color-light-rgb);--text-color:var(--color-light);--interactive:var(--interactive-light);--interactive-rgb:var(--color-rgb);--visited:var(--visited-light);--hover:var(--hover-light);--pressed:var(--pressed-light);--focus-color:var(--focus-color-light);--focus:var(--focus-color-light);--item-padding-y:var(--spacing-scale-2x);background-color:var(--background-light);color:var(--color)}.dropdown .br-item:not(:last-child){border-bottom:1px solid var(--border-color)}.dropdown .br-item.selected{--color:var(--color-dark);--color-rgb:var(--color-dark-rgb);--text-color:var(--color-dark);--interactive:var(--interactive-dark);--interactive-rgb:var(--interactive-dark-rgb);--visited:var(--visited-dark);--hover:var(--hover-dark);--pressed:var(--pressed-dark);--focus-color:var(--focus-color-dark);--focus:var(--focus-color-dark)}.justify-content-start{justify-content:flex-start !important}.justify-content-end{justify-content:flex-end !important}.justify-content-center{justify-content:center !important}.align-items-center{align-items:center !important}.col,[class*=col-]{padding-left:calc(var(--grid-gutter)*.5);padding-right:calc(var(--grid-gutter)*.5);width:100%}.col{flex:1 0 0%;min-width:8.3333333333%}.col-auto{flex:0 0 auto;width:auto}.col-2{flex-basis:16.6666666667%;max-width:16.6666666667%}.container,.container-fluid,.container-lg{--grid-margin:var(--grid-portrait-margin);--grid-maxwidth:var(--grid-portrait-maxwidth);margin-left:auto;margin-right:auto;max-width:var(--grid-maxwidth);padding-left:var(--grid-margin);padding-right:var(--grid-margin);width:100%}.row{--grid-gutter:var(--grid-portrait-gutter);display:flex;flex-wrap:wrap;margin-left:calc(var(--grid-gutter)*-0.5);margin-right:calc(var(--grid-gutter)*-0.5)}@media (min-width: 576px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-tablet-margin)}.row{--grid-gutter:var(--grid-tablet-gutter)}.container{--grid-maxwidth:calc(var(--grid-breakpoint-sm) - var(--grid-tablet-margin))}.col-sm-4{flex-basis:33.3333333333%;max-width:33.3333333333%}}@media (min-width: 992px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-tablet-margin)}.row{--grid-gutter:var(--grid-tablet-gutter)}.container{--grid-maxwidth:calc(var(--grid-breakpoint-md) - var(--grid-tablet-margin))}}@media (min-width: 1280px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-desktop-margin)}.row{--grid-gutter:var(--grid-desktop-gutter)}.container,.container-lg{--grid-maxwidth:calc(var(--grid-breakpoint-lg) - var(--grid-desktop-margin))}.col-lg-3{flex-basis:25%;max-width:25%}}@media (min-width: 1600px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-tv-margin)}.row{--grid-gutter:var(--grid-tv-gutter)}.container,.container-lg{--grid-maxwidth:calc(var(--grid-breakpoint-xl) - var(--grid-tv-margin))}}.ease{animation-timing-function:cubic-bezier(0.25, 0.1, 0.25, 1)}.ease-out{animation-timing-function:cubic-bezier(0, 0, 0.58, 1)}.ease-in-out{animation-timing-function:cubic-bezier(0.42, 0, 0.58, 1)}.fast{animation-duration:var(--duration-fast)}.slow{animation-duration:var(--duration-slow)}.mt-1{margin-top:var(--spacing-scale-half) !important}.mr-1{margin-right:var(--spacing-scale-half) !important}.mb-1{margin-bottom:var(--spacing-scale-half) !important}.ml-1{margin-left:var(--spacing-scale-half) !important}.mx-3{margin-left:var(--spacing-scale-2x) !important;margin-right:var(--spacing-scale-2x) !important}.mb-4{margin-bottom:var(--spacing-scale-3x) !important}.ml-auto{margin-left:auto !important}.pt-half{padding-top:var(--spacing-scale-half) !important}@media (min-width: 576px){.ml-sm-0{margin-left:var(--spacing-scale-default) !important}}.highlight{background:var(--status-highlight-background) linear-gradient(var(--status-highlight-overlay), var(--status-highlight-overlay));color:var(--status-highlight-text);padding:0 var(--spacing-scale-half)}[disabled],.disabled{cursor:not-allowed;opacity:var(--disabled)}[disabled] *,.disabled *{pointer-events:none}fieldset[disabled]{opacity:1}.text-center{text-align:center !important}.text-right{text-align:right !important}.text-nowrap{white-space:nowrap !important}.text-uppercase{text-transform:uppercase !important}.text-bold{font-weight:700 !important}.text-base{font-size:var(--font-size-scale-base) !important}.text-down-01{font-size:var(--font-size-scale-down-01) !important}@media (min-width: 576px){.text-sm-center{text-align:center !important}.text-sm-left{text-align:left !important}.text-sm-right{text-align:right !important}}p{color:var(--color);font-size:var(--font-size-scale-base);font-weight:var(--font-weight-regular);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-2x);margin-top:0}p a{text-decoration:underline}@media (min-width: 576px){p{font-size:var(--font-size-scale-up-01)}}a{--focus-offset:var(--spacing-scale-half)}a:focus{outline:none}a.focus-visible,a:focus-visible{outline-color:var(--focus);outline-offset:var(--focus-offset);outline-style:var(--focus-style);outline-width:var(--focus-width)}a:not(:disabled):hover{background-image:linear-gradient(rgba(var(--interactive-rgb), var(--hover)), rgba(var(--interactive-rgb), var(--hover)))}a:not(:disabled):active{background-image:linear-gradient(rgba(var(--interactive-rgb), var(--pressed)), rgba(var(--interactive-rgb), var(--pressed)))}a{color:var(--interactive);text-decoration:none}.main-content a{text-decoration:underline}button{cursor:pointer}img{max-width:100%;vertical-align:middle}h2,.h2{color:var(--color);font-size:var(--font-size-scale-up-03);font-weight:var(--font-weight-semi-bold);line-height:var(--font-line-height-low);margin-bottom:var(--spacing-scale-2xh);margin-top:var(--spacing-scale-3xh);padding-bottom:var(--spacing-scale-2xh)}@media (min-width: 576px){.h2,h2{font-size:var(--font-size-scale-up-05);font-weight:var(--font-weight-regular)}}ul,ol{margin-bottom:var(--spacing-scale-2x);margin-top:0;padding:0 0 0 var(--spacing-scale-5x)}table{--table-background:var(--background);--table-color:var(--color);--table-border-color:var(--gray-20);--table-border-style:solid;--table-border-width:1px;--table-hover:var(--color-rgb);--table-padding:var(--spacing-scale-3x);--table-font-weight:var(--font-weight-medium);--table-th-background:var(--background-alternative);--table-th-font-weight:var(--font-weight-semi-bold);--table-row-size:var(--spacing-scale-2x);border-collapse:collapse;width:100%}tr.selected,tr.is-selected{--color:var(--color-dark);--color-rgb:var(--color-dark-rgb);--text-color:var(--color-dark);--interactive:var(--interactive-dark);--interactive-rgb:var(--interactive-dark-rgb);--visited:var(--visited-dark);--hover:var(--hover-dark);--pressed:var(--pressed-dark);--focus-color:var(--focus-color-dark);--focus:var(--focus-color-dark)}label,.label{color:var(--color);font-size:var(--font-size-scale-base);font-weight:var(--font-weight-semi-bold);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-half)}fieldset,.fieldset{border:var(--surface-width-none);margin-bottom:var(--spacing-scale-5x);margin-top:0;padding:0}legend,.legend{color:var(--color);font-size:var(--font-size-scale-up-01);font-weight:var(--font-weight-semi-bold);line-height:var(--font-line-height-low);margin-bottom:var(--spacing-scale-2x);margin-top:var(--spacing-scale-2x)}::placeholder,.placeholder{color:var(--color-light);font-size:var(--font-size-scale-base);font-style:italic;font-weight:var(--font-weight-regular);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-half);margin-top:var(--spacing-scale-half);opacity:1}input,textarea,.input{color:var(--color-light);font-size:var(--font-size-scale-up-01);font-weight:var(--font-weight-medium);line-height:var(--font-line-height-low);margin-bottom:var(--spacing-scale-half)}code,.code{background:var(--gray-5);border-radius:4px;color:var(--gray-80);display:inline-block;font-family:monospace;font-size:var(--font-size-scale-base);font-weight:var(--font-weight-medium);line-height:var(--font-line-height-low);padding:var(--spacing-scale-half)}pre,.pre{background:var(--gray-5);margin:var(--spacing-scale-2x) 0 var(--spacing-scale-4x);padding:var(--spacing-scale-2x)}pre code,.pre code{display:inline;padding:0}*[data-toggle=collapse]:not(:disabled):hover{background-image:linear-gradient(rgba(var(--interactive-rgb), var(--hover)), rgba(var(--interactive-rgb), var(--hover)))}*[data-toggle=collapse]:focus{outline:none}*[data-toggle=collapse].focus-visible,*[data-toggle=collapse]:focus-visible{outline-color:var(--focus);outline-offset:var(--focus-offset);outline-style:var(--focus-style);outline-width:var(--focus-width)}@media (prefers-reduced-motion: reduce){:host,:host::before,:host::after,:host *,:host *::before,:host *::after{animation:none !important;scroll-behavior:auto !important;transition:none !important}}:host-context([data-wbc-reduced-motion=true])::before,:host-context([data-wbc-reduced-motion=true])::after,:host-context([data-wbc-reduced-motion=true]) *,:host-context([data-wbc-reduced-motion=true]) *::before,:host-context([data-wbc-reduced-motion=true]) *::after{animation:none !important;scroll-behavior:auto !important;transition:none !important}:host{display:block}:host{display:block;left:0;position:absolute;right:0;top:100%;z-index:var(--z-index-layer-1)}.br-select-list{background-color:var(--bg-color);box-shadow:var(--select-shadow);display:none;margin-top:-2px;max-height:404px;overflow:auto;resize:none;width:100%}.br-select-list.is-open{display:block;animation:none}@media (prefers-reduced-motion: no-preference){.br-select-list.is-open{animation:select-list-open var(--duration-fast, 300ms) var(--animation-ease-out, ease-out) both}}.option-group-label{align-items:center;background-color:var(--background-light);border-bottom:1px solid var(--border-color-alternative);color:var(--color);display:flex;font-size:var(--font-size-scale-down-01);font-weight:var(--font-weight-semi-bold);padding:0 var(--spacing-scale-2x)}@keyframes select-list-open{from{opacity:0}to{opacity:1}}`;
|
|
236
|
+
const selectListCss = () => `*,*::before,*::after{box-sizing:border-box}:host{line-height:var(--font-line-height-medium);-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%}main{display:block}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace;font-size:1em}a{background-color:rgba(0,0,0,0)}b,strong{font-weight:bolder}small{font-size:80%}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:var(--font-line-height-medium);margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{appearance:none}::-webkit-file-upload-button{appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}.d-none{display:none !important}@media (min-width: 576px){.d-sm-block{display:block !important}.d-sm-flex{display:flex !important}}[data-toggle=dropdown]+*{position:absolute}.dropdown{position:relative}.dropdown [data-toggle=dropdown]+*{box-shadow:var(--surface-shadow-sm);left:0;position:absolute;top:100%}.dropdown>.br-notification{left:auto;right:0}.dropdown .br-item{--color:var(--color-light);--color-rgb:var(--color-light-rgb);--text-color:var(--color-light);--interactive:var(--interactive-light);--interactive-rgb:var(--color-rgb);--visited:var(--visited-light);--hover:var(--hover-light);--pressed:var(--pressed-light);--focus-color:var(--focus-color-light);--focus:var(--focus-color-light);--item-padding-y:var(--spacing-scale-2x);background-color:var(--background-light);color:var(--color)}.dropdown .br-item:not(:last-child){border-bottom:1px solid var(--border-color)}.dropdown .br-item.selected{--color:var(--color-dark);--color-rgb:var(--color-dark-rgb);--text-color:var(--color-dark);--interactive:var(--interactive-dark);--interactive-rgb:var(--interactive-dark-rgb);--visited:var(--visited-dark);--hover:var(--hover-dark);--pressed:var(--pressed-dark);--focus-color:var(--focus-color-dark);--focus:var(--focus-color-dark)}.justify-content-start{justify-content:flex-start !important}.justify-content-end{justify-content:flex-end !important}.justify-content-center{justify-content:center !important}.align-items-center{align-items:center !important}.col,[class*=col-]{padding-left:calc(var(--grid-gutter)*.5);padding-right:calc(var(--grid-gutter)*.5);width:100%}.col{flex:1 0 0%;min-width:8.3333333333%}.col-auto{flex:0 0 auto;width:auto}.col-2{flex-basis:16.6666666667%;max-width:16.6666666667%}.container,.container-fluid,.container-lg{--grid-margin:var(--grid-portrait-margin);--grid-maxwidth:var(--grid-portrait-maxwidth);margin-left:auto;margin-right:auto;max-width:var(--grid-maxwidth);padding-left:var(--grid-margin);padding-right:var(--grid-margin);width:100%}.row{--grid-gutter:var(--grid-portrait-gutter);display:flex;flex-wrap:wrap;margin-left:calc(var(--grid-gutter)*-0.5);margin-right:calc(var(--grid-gutter)*-0.5)}@media (min-width: 576px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-tablet-margin)}.row{--grid-gutter:var(--grid-tablet-gutter)}.container{--grid-maxwidth:calc(var(--grid-breakpoint-sm) - var(--grid-tablet-margin))}.col-sm-4{flex-basis:33.3333333333%;max-width:33.3333333333%}}@media (min-width: 992px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-tablet-margin)}.row{--grid-gutter:var(--grid-tablet-gutter)}.container{--grid-maxwidth:calc(var(--grid-breakpoint-md) - var(--grid-tablet-margin))}}@media (min-width: 1280px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-desktop-margin)}.row{--grid-gutter:var(--grid-desktop-gutter)}.container,.container-lg{--grid-maxwidth:calc(var(--grid-breakpoint-lg) - var(--grid-desktop-margin))}.col-lg-3{flex-basis:25%;max-width:25%}}@media (min-width: 1600px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-tv-margin)}.row{--grid-gutter:var(--grid-tv-gutter)}.container,.container-lg{--grid-maxwidth:calc(var(--grid-breakpoint-xl) - var(--grid-tv-margin))}}.ease{animation-timing-function:cubic-bezier(0.25, 0.1, 0.25, 1)}.ease-out{animation-timing-function:cubic-bezier(0, 0, 0.58, 1)}.ease-in-out{animation-timing-function:cubic-bezier(0.42, 0, 0.58, 1)}.fast{animation-duration:var(--duration-fast)}.slow{animation-duration:var(--duration-slow)}.mt-1{margin-top:var(--spacing-scale-half) !important}.mr-1{margin-right:var(--spacing-scale-half) !important}.mb-1{margin-bottom:var(--spacing-scale-half) !important}.ml-1{margin-left:var(--spacing-scale-half) !important}.mx-3{margin-left:var(--spacing-scale-2x) !important;margin-right:var(--spacing-scale-2x) !important}.mb-4{margin-bottom:var(--spacing-scale-3x) !important}.ml-auto{margin-left:auto !important}.pt-half{padding-top:var(--spacing-scale-half) !important}@media (min-width: 576px){.ml-sm-0{margin-left:var(--spacing-scale-default) !important}}.highlight{background:var(--status-highlight-background) linear-gradient(var(--status-highlight-overlay), var(--status-highlight-overlay));color:var(--status-highlight-text);padding:0 var(--spacing-scale-half)}[disabled],.disabled{cursor:not-allowed;opacity:var(--disabled)}[disabled] *,.disabled *{pointer-events:none}fieldset[disabled]{opacity:1}.text-center{text-align:center !important}.text-right{text-align:right !important}.text-nowrap{white-space:nowrap !important}.text-uppercase{text-transform:uppercase !important}.text-bold{font-weight:700 !important}.text-base{font-size:var(--font-size-scale-base) !important}.text-down-01{font-size:var(--font-size-scale-down-01) !important}@media (min-width: 576px){.text-sm-center{text-align:center !important}.text-sm-left{text-align:left !important}.text-sm-right{text-align:right !important}}p{color:var(--color);font-size:var(--font-size-scale-base);font-weight:var(--font-weight-regular);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-2x);margin-top:0}p a{text-decoration:underline}@media (min-width: 576px){p{font-size:var(--font-size-scale-up-01)}}a{--focus-offset:var(--spacing-scale-half)}a:focus{outline:none}a.focus-visible,a:focus-visible{outline-color:var(--focus);outline-offset:var(--focus-offset);outline-style:var(--focus-style);outline-width:var(--focus-width)}a:not(:disabled):hover{background-image:linear-gradient(rgba(var(--interactive-rgb), var(--hover)), rgba(var(--interactive-rgb), var(--hover)))}a:not(:disabled):active{background-image:linear-gradient(rgba(var(--interactive-rgb), var(--pressed)), rgba(var(--interactive-rgb), var(--pressed)))}a{color:var(--interactive);text-decoration:none}.main-content a{text-decoration:underline}button{cursor:pointer}img{max-width:100%;vertical-align:middle}h2,.h2{color:var(--color);font-size:var(--font-size-scale-up-03);font-weight:var(--font-weight-semi-bold);line-height:var(--font-line-height-low);margin-bottom:var(--spacing-scale-2xh);margin-top:var(--spacing-scale-3xh);padding-bottom:var(--spacing-scale-2xh)}@media (min-width: 576px){.h2,h2{font-size:var(--font-size-scale-up-05);font-weight:var(--font-weight-regular)}}ul,ol{margin-bottom:var(--spacing-scale-2x);margin-top:0;padding:0 0 0 var(--spacing-scale-5x)}table{--table-background:var(--background);--table-color:var(--color);--table-border-color:var(--gray-20);--table-border-style:solid;--table-border-width:1px;--table-hover:var(--color-rgb);--table-padding:var(--spacing-scale-3x);--table-font-weight:var(--font-weight-medium);--table-th-background:var(--background-alternative);--table-th-font-weight:var(--font-weight-semi-bold);--table-row-size:var(--spacing-scale-2x);border-collapse:collapse;width:100%}tr.selected,tr.is-selected{--color:var(--color-dark);--color-rgb:var(--color-dark-rgb);--text-color:var(--color-dark);--interactive:var(--interactive-dark);--interactive-rgb:var(--interactive-dark-rgb);--visited:var(--visited-dark);--hover:var(--hover-dark);--pressed:var(--pressed-dark);--focus-color:var(--focus-color-dark);--focus:var(--focus-color-dark)}label,.label{color:var(--color);font-size:var(--font-size-scale-base);font-weight:var(--font-weight-semi-bold);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-half)}fieldset,.fieldset{border:var(--surface-width-none);margin-bottom:var(--spacing-scale-5x);margin-top:0;padding:0}legend,.legend{color:var(--color);font-size:var(--font-size-scale-up-01);font-weight:var(--font-weight-semi-bold);line-height:var(--font-line-height-low);margin-bottom:var(--spacing-scale-2x);margin-top:var(--spacing-scale-2x)}::placeholder,.placeholder{color:var(--color-light);font-size:var(--font-size-scale-base);font-style:italic;font-weight:var(--font-weight-regular);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-half);margin-top:var(--spacing-scale-half);opacity:1}input,textarea,.input{color:var(--color-light);font-size:var(--font-size-scale-up-01);font-weight:var(--font-weight-medium);line-height:var(--font-line-height-low);margin-bottom:var(--spacing-scale-half)}pre,.pre{background:var(--gray-5);margin:var(--spacing-scale-2x) 0 var(--spacing-scale-4x);padding:var(--spacing-scale-2x)}*[data-toggle=collapse]:not(:disabled):hover{background-image:linear-gradient(rgba(var(--interactive-rgb), var(--hover)), rgba(var(--interactive-rgb), var(--hover)))}*[data-toggle=collapse]:focus{outline:none}*[data-toggle=collapse].focus-visible,*[data-toggle=collapse]:focus-visible{outline-color:var(--focus);outline-offset:var(--focus-offset);outline-style:var(--focus-style);outline-width:var(--focus-width)}@media (prefers-reduced-motion: reduce){:host,:host::before,:host::after,:host *,:host *::before,:host *::after{animation:none !important;scroll-behavior:auto !important;transition:none !important}}:host-context([data-wbc-reduced-motion=true])::before,:host-context([data-wbc-reduced-motion=true])::after,:host-context([data-wbc-reduced-motion=true]) *,:host-context([data-wbc-reduced-motion=true]) *::before,:host-context([data-wbc-reduced-motion=true]) *::after{animation:none !important;scroll-behavior:auto !important;transition:none !important}:host{display:block}:host{display:block;left:0;position:absolute;right:0;top:100%;z-index:var(--z-index-layer-1)}.br-select-list{background-color:var(--bg-color);box-shadow:var(--select-shadow);display:none;margin-top:0;max-height:404px;overflow:auto;resize:none;width:100%}.br-select-list.is-open{display:block;animation:none}@media (prefers-reduced-motion: no-preference){.br-select-list.is-open{animation:select-list-open var(--duration-fast, 300ms) var(--animation-ease-out, ease-out) both}}.option-group-label{align-items:center;background-color:var(--background-light);border-bottom:1px solid var(--border-color-alternative);color:var(--color);display:flex;font-size:var(--font-size-scale-down-01);font-weight:var(--font-weight-semi-bold);padding:0 var(--spacing-scale-2x)}[part=empty-option]{align-items:center;color:var(--color);display:flex;padding:0 var(--spacing-scale-2x)}@keyframes select-list-open{from{opacity:0}to{opacity:1}}`;
|
|
166
237
|
|
|
167
238
|
const SelectList = class {
|
|
168
239
|
constructor(hostRef) {
|
|
169
240
|
registerInstance(this, hostRef);
|
|
170
241
|
/**
|
|
171
|
-
* Define a densidade visual da lista, das opções e do indicador de carregamento.
|
|
242
|
+
* Define a densidade visual da lista, das opções regulares e do indicador de carregamento.
|
|
243
|
+
* A opção sintética de selecionar todos permanece com densidade `small`.
|
|
172
244
|
* Aceita `small`, `medium` ou `large`. Valores inválidos usam `medium`.
|
|
173
245
|
*
|
|
174
246
|
* @default 'medium'
|
|
@@ -217,6 +289,11 @@ const SelectList = class {
|
|
|
217
289
|
* @default 0
|
|
218
290
|
*/
|
|
219
291
|
this.overscan = 0;
|
|
292
|
+
/**
|
|
293
|
+
* Oculta os divisores entre opções consecutivas, sem alterar a altura das linhas.
|
|
294
|
+
* @default false
|
|
295
|
+
*/
|
|
296
|
+
this.hideDividers = false;
|
|
220
297
|
/**
|
|
221
298
|
* Rótulo apresentado para a ação de selecionar todos no modo múltiplo.
|
|
222
299
|
*
|
|
@@ -242,7 +319,10 @@ const SelectList = class {
|
|
|
242
319
|
this.isMultiple = false;
|
|
243
320
|
this.scrollTop = 0;
|
|
244
321
|
this.measuredItemHeight = null;
|
|
322
|
+
this.measuredSelectAllItemHeight = null;
|
|
245
323
|
this.measurementFrame = null;
|
|
324
|
+
this.measurementInProgress = false;
|
|
325
|
+
this.measurementRequested = false;
|
|
246
326
|
this.filteredOptionsCache = null;
|
|
247
327
|
this.filteredOptionsCacheKey = '';
|
|
248
328
|
this.virtualRowsCache = null;
|
|
@@ -277,6 +357,8 @@ const SelectList = class {
|
|
|
277
357
|
return;
|
|
278
358
|
const selectedByValue = new Map(options.map((option) => [option.value, Boolean(option.selected)]));
|
|
279
359
|
renderedOptions.forEach((option) => {
|
|
360
|
+
if (option.value === undefined)
|
|
361
|
+
return;
|
|
280
362
|
const selected = selectedByValue.get(option.value);
|
|
281
363
|
if (selected !== undefined && option.selected !== selected)
|
|
282
364
|
option.selected = selected;
|
|
@@ -295,7 +377,7 @@ const SelectList = class {
|
|
|
295
377
|
return resolveIntegerPropValue(this.el, 'overscan', this.overscan, 0, Number.MAX_SAFE_INTEGER, 0);
|
|
296
378
|
}
|
|
297
379
|
get effectiveActiveOptionIndex() {
|
|
298
|
-
return
|
|
380
|
+
return Number.isInteger(this.activeOptionIndex) && this.activeOptionIndex >= -1 ? this.activeOptionIndex : -1;
|
|
299
381
|
}
|
|
300
382
|
/**
|
|
301
383
|
* O `br-select` fornece a opção sintética de selecionar todos antes de
|
|
@@ -308,12 +390,15 @@ const SelectList = class {
|
|
|
308
390
|
}
|
|
309
391
|
disconnectedCallback() {
|
|
310
392
|
this.scrollBatch.cancel();
|
|
393
|
+
this.measurementRequested = false;
|
|
311
394
|
if (this.measurementFrame !== null) {
|
|
312
395
|
cancelAnimationFrame(this.measurementFrame);
|
|
313
396
|
this.measurementFrame = null;
|
|
314
397
|
}
|
|
315
398
|
}
|
|
316
399
|
handleSearchTermChange() {
|
|
400
|
+
this.filteredOptionsCache = null;
|
|
401
|
+
this.virtualRowsCache = null;
|
|
317
402
|
this.scrollTop = 0;
|
|
318
403
|
if (this.listElement) {
|
|
319
404
|
this.listElement.scrollTop = 0;
|
|
@@ -366,6 +451,7 @@ const SelectList = class {
|
|
|
366
451
|
this.options = [];
|
|
367
452
|
this.scrollTop = 0;
|
|
368
453
|
this.measuredItemHeight = null;
|
|
454
|
+
this.measuredSelectAllItemHeight = null;
|
|
369
455
|
if (this.listElement) {
|
|
370
456
|
this.listElement.scrollTop = 0;
|
|
371
457
|
}
|
|
@@ -418,11 +504,6 @@ const SelectList = class {
|
|
|
418
504
|
if (nextTerm === this.searchTerm)
|
|
419
505
|
return;
|
|
420
506
|
this.searchTerm = nextTerm;
|
|
421
|
-
this.scrollTop = 0;
|
|
422
|
-
if (this.listElement) {
|
|
423
|
-
this.listElement.scrollTop = 0;
|
|
424
|
-
}
|
|
425
|
-
this.scheduleMeasureItemHeight();
|
|
426
507
|
}
|
|
427
508
|
/**
|
|
428
509
|
* Alterna a lista entre modo simples e múltiplo.
|
|
@@ -463,10 +544,9 @@ const SelectList = class {
|
|
|
463
544
|
const rowIndex = this.getRowIndexForOption(rows, index);
|
|
464
545
|
if (rowIndex < 0)
|
|
465
546
|
return false;
|
|
466
|
-
const rowHeight = this.getRowHeight();
|
|
467
547
|
const viewportHeight = this.getViewportHeight();
|
|
468
|
-
const maxScrollTop = Math.max(0, rows
|
|
469
|
-
const nextScrollTop = Math.min(rowIndex
|
|
548
|
+
const maxScrollTop = Math.max(0, this.getRowsHeight(rows) - viewportHeight);
|
|
549
|
+
const nextScrollTop = Math.min(this.getRowTop(rows, rowIndex), maxScrollTop);
|
|
470
550
|
/*
|
|
471
551
|
* Atualiza primeiro o estado que define a janela virtual. Dessa forma,
|
|
472
552
|
* os itens do novo intervalo são renderizados antes de o viewport nativo
|
|
@@ -510,6 +590,18 @@ const SelectList = class {
|
|
|
510
590
|
await optionElement?.setFocus?.();
|
|
511
591
|
return Boolean(optionElement);
|
|
512
592
|
}
|
|
593
|
+
/** Torna o item ativo visível sem retirar o foco do campo. */
|
|
594
|
+
async revealOption(index) {
|
|
595
|
+
for (let attempt = 0; attempt < 3 && !this.getFilteredOptions()[index]; attempt += 1) {
|
|
596
|
+
await this.waitForNextFrame();
|
|
597
|
+
}
|
|
598
|
+
if (!this.getFilteredOptions()[index])
|
|
599
|
+
return false;
|
|
600
|
+
await this.waitForNextFrame();
|
|
601
|
+
await this.waitForNextFrame();
|
|
602
|
+
await this.ensureOptionVisible(index);
|
|
603
|
+
return Boolean(this.listElement);
|
|
604
|
+
}
|
|
513
605
|
/**
|
|
514
606
|
* Aciona a seleção programática de uma opção específica.
|
|
515
607
|
*
|
|
@@ -564,7 +656,7 @@ const SelectList = class {
|
|
|
564
656
|
this.options = this.options.map((o) => ({ ...o, selected: false }));
|
|
565
657
|
}
|
|
566
658
|
isSelectAllOption(option) {
|
|
567
|
-
if (option.value ===
|
|
659
|
+
if (option.value === SELECT_ALL_OPTION_VALUE)
|
|
568
660
|
return true;
|
|
569
661
|
const optionLabel = (option.label ?? option.value).trim();
|
|
570
662
|
return optionLabel === this.selectAllLabel || optionLabel === this.unselectAllLabel;
|
|
@@ -580,7 +672,7 @@ const SelectList = class {
|
|
|
580
672
|
}
|
|
581
673
|
createSelectAllOption() {
|
|
582
674
|
return {
|
|
583
|
-
value:
|
|
675
|
+
value: SELECT_ALL_OPTION_VALUE,
|
|
584
676
|
label: this.selectAllLabel,
|
|
585
677
|
selected: false,
|
|
586
678
|
indeterminate: false,
|
|
@@ -690,14 +782,7 @@ const SelectList = class {
|
|
|
690
782
|
return this.options;
|
|
691
783
|
}
|
|
692
784
|
this.filteredOptionsCacheKey = cacheKey;
|
|
693
|
-
this.filteredOptionsCache = this.options.
|
|
694
|
-
if (this.isSelectAllOption(option))
|
|
695
|
-
return this.effectiveMultiple;
|
|
696
|
-
const label = this.normalizeSearchText(option.label ?? option.value);
|
|
697
|
-
const group = this.normalizeSearchText(option.group);
|
|
698
|
-
const value = this.normalizeSearchText(option.value);
|
|
699
|
-
return label.includes(normalizedTerm) || group.includes(normalizedTerm) || value.includes(normalizedTerm);
|
|
700
|
-
});
|
|
785
|
+
this.filteredOptionsCache = filterSelectOptions(this.options, this.searchTerm, this.selectAllLabel, this.unselectAllLabel);
|
|
701
786
|
return this.filteredOptionsCache;
|
|
702
787
|
}
|
|
703
788
|
getVirtualRows() {
|
|
@@ -706,6 +791,9 @@ const SelectList = class {
|
|
|
706
791
|
return this.virtualRowsCache;
|
|
707
792
|
}
|
|
708
793
|
const rows = [];
|
|
794
|
+
if (filteredOptions.length === 0 && this.normalizeSearchText(this.searchTerm)) {
|
|
795
|
+
rows.push({ kind: 'empty', key: 'empty' });
|
|
796
|
+
}
|
|
709
797
|
let previousGroup;
|
|
710
798
|
filteredOptions.forEach((option, optionIndex) => {
|
|
711
799
|
const group = option.group?.trim() || undefined;
|
|
@@ -732,27 +820,44 @@ const SelectList = class {
|
|
|
732
820
|
return rows.findIndex((row) => row.kind === 'option' && row.optionIndex === optionIndex);
|
|
733
821
|
}
|
|
734
822
|
getViewportHeight() {
|
|
735
|
-
const
|
|
736
|
-
return
|
|
823
|
+
const rows = this.getVirtualRows();
|
|
824
|
+
return this.getRowsHeight(rows, Math.min(rows.length, this.effectiveVisibleItems));
|
|
737
825
|
}
|
|
738
|
-
getRowHeight() {
|
|
826
|
+
getRowHeight(row) {
|
|
827
|
+
if (row?.kind === 'option' && this.isSelectAllOption(row.option)) {
|
|
828
|
+
return this.measuredSelectAllItemHeight ?? this.effectiveItemHeight;
|
|
829
|
+
}
|
|
739
830
|
return this.measuredItemHeight ?? this.effectiveItemHeight;
|
|
740
831
|
}
|
|
832
|
+
getRowsHeight(rows, endIndex = rows.length) {
|
|
833
|
+
const rowCount = Math.min(rows.length, Math.max(0, endIndex));
|
|
834
|
+
if (rowCount === 0)
|
|
835
|
+
return 0;
|
|
836
|
+
const itemHeight = this.measuredItemHeight ?? this.effectiveItemHeight;
|
|
837
|
+
return this.getRowHeight(rows[0]) + (rowCount - 1) * itemHeight;
|
|
838
|
+
}
|
|
839
|
+
getRowTop(rows, rowIndex) {
|
|
840
|
+
return this.getRowsHeight(rows, rowIndex);
|
|
841
|
+
}
|
|
741
842
|
getVisibleRange() {
|
|
742
843
|
const rows = this.getVirtualRows();
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
844
|
+
if (rows.length === 0)
|
|
845
|
+
return { startIndex: 0, endIndex: 0 };
|
|
846
|
+
const viewportHeight = this.getViewportHeight();
|
|
847
|
+
const viewportBottom = this.scrollTop + viewportHeight;
|
|
848
|
+
const firstRowHeight = this.getRowHeight(rows[0]);
|
|
849
|
+
const itemHeight = this.measuredItemHeight ?? this.effectiveItemHeight;
|
|
850
|
+
const firstVisibleIndex = Math.min(rows.length - 1, this.scrollTop < firstRowHeight ? 0 : 1 + Math.floor((this.scrollTop - firstRowHeight) / itemHeight));
|
|
851
|
+
const endIndex = Math.min(rows.length, Math.max(firstVisibleIndex, 1 + Math.ceil((viewportBottom - firstRowHeight) / itemHeight)));
|
|
852
|
+
return {
|
|
853
|
+
startIndex: Math.max(0, firstVisibleIndex - this.effectiveOverscan),
|
|
854
|
+
endIndex: Math.min(rows.length, endIndex + this.effectiveOverscan),
|
|
855
|
+
};
|
|
751
856
|
}
|
|
752
857
|
clampScrollPosition() {
|
|
753
858
|
if (!this.listElement)
|
|
754
859
|
return;
|
|
755
|
-
const totalHeight = this.
|
|
860
|
+
const totalHeight = this.getRowsHeight(this.getVirtualRows());
|
|
756
861
|
const maxScrollTop = Math.max(0, totalHeight - this.getViewportHeight());
|
|
757
862
|
const nextScrollTop = Math.min(Math.max(0, this.listElement.scrollTop), maxScrollTop);
|
|
758
863
|
if (this.listElement.scrollTop !== nextScrollTop) {
|
|
@@ -767,19 +872,69 @@ const SelectList = class {
|
|
|
767
872
|
return;
|
|
768
873
|
if (this.measurementFrame !== null)
|
|
769
874
|
return;
|
|
875
|
+
if (this.measurementInProgress) {
|
|
876
|
+
this.measurementRequested = true;
|
|
877
|
+
return;
|
|
878
|
+
}
|
|
770
879
|
this.measurementFrame = requestAnimationFrame(async () => {
|
|
771
880
|
this.measurementFrame = null;
|
|
772
|
-
|
|
881
|
+
this.measurementInProgress = true;
|
|
882
|
+
try {
|
|
883
|
+
await this.measureItemHeight();
|
|
884
|
+
}
|
|
885
|
+
finally {
|
|
886
|
+
this.measurementInProgress = false;
|
|
887
|
+
if (this.measurementRequested) {
|
|
888
|
+
this.measurementRequested = false;
|
|
889
|
+
this.scheduleMeasureItemHeight();
|
|
890
|
+
}
|
|
891
|
+
}
|
|
773
892
|
});
|
|
774
893
|
}
|
|
775
894
|
async measureItemHeight() {
|
|
776
|
-
const
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
895
|
+
const renderedOptions = Array.from(this.listElement?.querySelectorAll('br-select-option') ?? []);
|
|
896
|
+
const originalHeights = renderedOptions.map((element) => element.style.height);
|
|
897
|
+
renderedOptions.forEach((element) => {
|
|
898
|
+
element.style.height = 'auto';
|
|
899
|
+
});
|
|
900
|
+
let measurements;
|
|
901
|
+
try {
|
|
902
|
+
await this.waitForNextFrame();
|
|
903
|
+
measurements = await Promise.allSettled(renderedOptions.map((element) => element.getItemHeight?.()));
|
|
904
|
+
}
|
|
905
|
+
finally {
|
|
906
|
+
renderedOptions.forEach((element, index) => {
|
|
907
|
+
element.style.height = originalHeights[index];
|
|
908
|
+
});
|
|
909
|
+
}
|
|
910
|
+
const measuredOptions = measurements.map((measurement, index) => {
|
|
911
|
+
if (measurement.status === 'rejected')
|
|
912
|
+
throw measurement.reason;
|
|
913
|
+
return { element: renderedOptions[index], height: measurement.value };
|
|
914
|
+
});
|
|
915
|
+
const filteredOptions = this.getFilteredOptions();
|
|
916
|
+
const selectAllOption = measuredOptions.find(({ element }) => {
|
|
917
|
+
const optionIndex = Number(element.dataset.optionIndex);
|
|
918
|
+
const option = filteredOptions[optionIndex];
|
|
919
|
+
return Number.isInteger(optionIndex) && option !== undefined && this.isSelectAllOption(option);
|
|
920
|
+
});
|
|
921
|
+
const regularOption = measuredOptions.find(({ element }) => {
|
|
922
|
+
const optionIndex = Number(element.dataset.optionIndex);
|
|
923
|
+
const option = filteredOptions[optionIndex];
|
|
924
|
+
return Number.isInteger(optionIndex) && option !== undefined && !this.isSelectAllOption(option);
|
|
925
|
+
});
|
|
926
|
+
const nextSelectAllHeight = selectAllOption?.height;
|
|
927
|
+
const nextItemHeight = regularOption?.height;
|
|
928
|
+
const hasSelectAllHeight = Boolean(nextSelectAllHeight && nextSelectAllHeight > 0);
|
|
929
|
+
const hasItemHeight = Boolean(nextItemHeight && nextItemHeight > 0);
|
|
930
|
+
if ((!hasSelectAllHeight || nextSelectAllHeight === this.measuredSelectAllItemHeight) &&
|
|
931
|
+
(!hasItemHeight || nextItemHeight === this.measuredItemHeight)) {
|
|
781
932
|
return;
|
|
782
|
-
|
|
933
|
+
}
|
|
934
|
+
if (nextSelectAllHeight && nextSelectAllHeight > 0)
|
|
935
|
+
this.measuredSelectAllItemHeight = nextSelectAllHeight;
|
|
936
|
+
if (nextItemHeight && nextItemHeight > 0)
|
|
937
|
+
this.measuredItemHeight = nextItemHeight;
|
|
783
938
|
this.clampScrollPosition();
|
|
784
939
|
}
|
|
785
940
|
/**
|
|
@@ -798,9 +953,9 @@ const SelectList = class {
|
|
|
798
953
|
const rowIndex = this.getRowIndexForOption(rows, index);
|
|
799
954
|
if (rowIndex < 0)
|
|
800
955
|
return;
|
|
801
|
-
const rowHeight = this.getRowHeight();
|
|
956
|
+
const rowHeight = this.getRowHeight(rows[rowIndex]);
|
|
802
957
|
const viewportHeight = this.getViewportHeight();
|
|
803
|
-
const optionTop = rowIndex
|
|
958
|
+
const optionTop = this.getRowTop(rows, rowIndex);
|
|
804
959
|
const optionBottom = optionTop + rowHeight;
|
|
805
960
|
const viewportTop = this.listElement.scrollTop;
|
|
806
961
|
const viewportBottom = viewportTop + viewportHeight;
|
|
@@ -811,7 +966,7 @@ const SelectList = class {
|
|
|
811
966
|
else if (optionBottom > viewportBottom) {
|
|
812
967
|
nextScrollTop = optionBottom - viewportHeight;
|
|
813
968
|
}
|
|
814
|
-
const maxScrollTop = Math.max(0, rows
|
|
969
|
+
const maxScrollTop = Math.max(0, this.getRowsHeight(rows) - viewportHeight);
|
|
815
970
|
nextScrollTop = Math.min(Math.max(0, nextScrollTop), maxScrollTop);
|
|
816
971
|
if (nextScrollTop === viewportTop)
|
|
817
972
|
return;
|
|
@@ -826,31 +981,30 @@ const SelectList = class {
|
|
|
826
981
|
};
|
|
827
982
|
}
|
|
828
983
|
renderOption(option, optionIndex, rowIndex) {
|
|
829
|
-
const
|
|
830
|
-
const
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
// interno anterior do br-select-option/br-item.
|
|
835
|
-
key: `${option.value}:${option.selected ? 'selected' : 'unselected'}:${option.group ?? ''}`, label: option.label, ref: (element) => {
|
|
984
|
+
const isSelectAllOption = this.isSelectAllOption(option);
|
|
985
|
+
const row = this.getVirtualRows()[rowIndex];
|
|
986
|
+
const rowHeight = this.getRowHeight(row);
|
|
987
|
+
const optionPart = isSelectAllOption ? 'option select-all' : 'option';
|
|
988
|
+
return (h("br-select-option", { part: optionPart, active: optionIndex === this.effectiveActiveOptionIndex, "data-option-index": optionIndex, density: isSelectAllOption ? 'small' : this.effectiveDensity, disabled: option.disabled, id: `${this.el.id || 'br-select-list'}-option-${optionIndex}`, indeterminate: option.indeterminate, key: `${option.value}:${option.selected ? 'selected' : 'unselected'}:${option.group ?? ''}`, label: option.label, ref: (element) => {
|
|
836
989
|
if (element && option.group)
|
|
837
990
|
element.setAttribute('group', option.group);
|
|
838
991
|
}, selected: option.selected, "show-checkbox": this.effectiveMultiple, style: {
|
|
839
992
|
boxSizing: 'border-box',
|
|
840
993
|
height: `${rowHeight}px`,
|
|
841
994
|
position: 'absolute',
|
|
842
|
-
top: `${rowIndex
|
|
995
|
+
top: `${this.getRowTop(this.getVirtualRows(), rowIndex)}px`,
|
|
843
996
|
left: '0',
|
|
844
997
|
right: '0',
|
|
845
998
|
}, value: option.value }, option.content ? h("span", { innerHTML: option.content }) : (option.label ?? option.value)));
|
|
846
999
|
}
|
|
847
1000
|
renderGroup(row, rowIndex) {
|
|
848
|
-
const
|
|
1001
|
+
const rows = this.getVirtualRows();
|
|
1002
|
+
const rowHeight = this.getRowHeight(rows[rowIndex]);
|
|
849
1003
|
return (h("div", { "aria-hidden": "true", class: "option-group-label", key: row.key, part: "option-group", role: "presentation", style: {
|
|
850
1004
|
boxSizing: 'border-box',
|
|
851
1005
|
height: `${rowHeight}px`,
|
|
852
1006
|
position: 'absolute',
|
|
853
|
-
top: `${rowIndex
|
|
1007
|
+
top: `${this.getRowTop(rows, rowIndex)}px`,
|
|
854
1008
|
left: '0',
|
|
855
1009
|
right: '0',
|
|
856
1010
|
} }, row.group));
|
|
@@ -864,7 +1018,7 @@ const SelectList = class {
|
|
|
864
1018
|
}
|
|
865
1019
|
getVirtualSpacerStyle() {
|
|
866
1020
|
return {
|
|
867
|
-
height: `${this.
|
|
1021
|
+
height: `${this.getRowsHeight(this.getVirtualRows())}px`,
|
|
868
1022
|
position: 'relative',
|
|
869
1023
|
};
|
|
870
1024
|
}
|
|
@@ -878,21 +1032,46 @@ const SelectList = class {
|
|
|
878
1032
|
}
|
|
879
1033
|
renderVirtualOptions() {
|
|
880
1034
|
const { startIndex, visibleRows } = this.getVirtualVisibleRows();
|
|
881
|
-
|
|
882
|
-
return (h("div", { part: "empty-option", role: "option", "aria-selected": "false", tabIndex: 0 }, "Nenhum resultado encontrado"));
|
|
883
|
-
}
|
|
884
|
-
return (h("div", { style: this.getVirtualSpacerStyle() }, visibleRows.map((row, relativeIndex) => {
|
|
1035
|
+
const renderedRows = visibleRows.flatMap((row, relativeIndex) => {
|
|
885
1036
|
const rowIndex = startIndex + relativeIndex;
|
|
886
1037
|
if (row.kind === 'group')
|
|
887
|
-
return this.renderGroup(row, rowIndex);
|
|
888
|
-
|
|
889
|
-
|
|
1038
|
+
return [this.renderGroup(row, rowIndex)];
|
|
1039
|
+
if (row.kind === 'empty') {
|
|
1040
|
+
return [
|
|
1041
|
+
h("div", { key: row.key, part: "empty-option", role: "status", style: {
|
|
1042
|
+
boxSizing: 'border-box',
|
|
1043
|
+
height: `${this.getRowHeight(row)}px`,
|
|
1044
|
+
position: 'absolute',
|
|
1045
|
+
top: `${this.getRowTop(this.getVirtualRows(), rowIndex)}px`,
|
|
1046
|
+
left: '0',
|
|
1047
|
+
right: '0',
|
|
1048
|
+
} }, "Nenhum resultado encontrado"),
|
|
1049
|
+
];
|
|
1050
|
+
}
|
|
1051
|
+
const option = this.renderOption(row.option, row.optionIndex, rowIndex);
|
|
1052
|
+
const nextRow = this.getVirtualRows()[rowIndex + 1];
|
|
1053
|
+
if (this.hideDividers || nextRow?.kind !== 'option')
|
|
1054
|
+
return [option];
|
|
1055
|
+
// O divisor ocupa a borda da linha, sem criar um índice ou altura extra.
|
|
1056
|
+
return [
|
|
1057
|
+
option,
|
|
1058
|
+
h("br-divider", { key: `divider-${row.key}`, part: "option-divider", "aria-hidden": "true", orientation: "horizontal", thickness: "small", marginTop: 0, marginBottom: 0, marginLeft: 0, marginRight: 0, style: {
|
|
1059
|
+
position: 'absolute',
|
|
1060
|
+
top: `calc(${this.getRowTop(this.getVirtualRows(), rowIndex + 1)}px - var(--surface-width-sm, 1px))`,
|
|
1061
|
+
left: '0',
|
|
1062
|
+
right: '0',
|
|
1063
|
+
pointerEvents: 'none',
|
|
1064
|
+
zIndex: '1',
|
|
1065
|
+
} }),
|
|
1066
|
+
];
|
|
1067
|
+
});
|
|
1068
|
+
return h("div", { style: this.getVirtualSpacerStyle() }, renderedRows);
|
|
890
1069
|
}
|
|
891
1070
|
renderLoading() {
|
|
892
1071
|
return (h("div", { part: "loading", role: "status", "aria-live": "polite" }, h("slot", { name: "loading" }, h("br-loading", { density: this.effectiveDensity, label: "Buscando op\u00E7\u00F5es" }))));
|
|
893
1072
|
}
|
|
894
1073
|
render() {
|
|
895
|
-
return (h(Host, { key: '
|
|
1074
|
+
return (h(Host, { key: 'c4ea2157dc925805d0542eae1a70b67375fcb12c' }, h("div", { key: 'e55d780af8ef05765173998e781f2cf0a4125988', class: this.getCssClassMap(), part: "list", tabIndex: -1, ref: (el) => (this.listElement = el), onScroll: this.handleScroll, style: this.getVirtualScrollStyle() }, this.loading ? this.renderLoading() : this.renderVirtualOptions())));
|
|
896
1075
|
}
|
|
897
1076
|
get el() { return getElement(this); }
|
|
898
1077
|
static get watchers() { return {
|
|
@@ -912,13 +1091,12 @@ const SelectList = class {
|
|
|
912
1091
|
};
|
|
913
1092
|
SelectList.SELECT_ALL_LABEL = 'Selecionar todos';
|
|
914
1093
|
SelectList.DESELECT_ALL_LABEL = 'Desselecionar todos';
|
|
915
|
-
SelectList.SELECT_ALL_VALUE = 'Alternar todos';
|
|
916
1094
|
SelectList.style = selectListCss();
|
|
917
1095
|
|
|
918
1096
|
const MISSING_VALUE_WARNING = '[br-select-option] `value` nao foi informado. Um fallback sera derivado de `label` ou do conteudo do slot.';
|
|
919
1097
|
const EMPTY_VALUE_WARNING = '[br-select-option] Nao foi possivel resolver um valor para a opcao. Informe `value`, `label` ou conteudo no slot.';
|
|
920
1098
|
|
|
921
|
-
const selectOptionCss = () => `*,*::before,*::after{box-sizing:border-box}:host{line-height:var(--font-line-height-medium);-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%}main{display:block}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace;font-size:1em}a{background-color:rgba(0,0,0,0)}b,strong{font-weight:bolder}code{font-family:monospace;font-size:1em}small{font-size:80%}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:var(--font-line-height-medium);margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{appearance:none}::-webkit-file-upload-button{appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}.d-none{display:none !important}@media (min-width: 576px){.d-sm-block{display:block !important}.d-sm-flex{display:flex !important}}[data-toggle=dropdown]+*{position:absolute}.dropdown{position:relative}.dropdown [data-toggle=dropdown]+*{box-shadow:var(--surface-shadow-sm);left:0;position:absolute;top:100%}.dropdown>.br-notification{left:auto;right:0}.dropdown .br-item{--color:var(--color-light);--color-rgb:var(--color-light-rgb);--text-color:var(--color-light);--interactive:var(--interactive-light);--interactive-rgb:var(--color-rgb);--visited:var(--visited-light);--hover:var(--hover-light);--pressed:var(--pressed-light);--focus-color:var(--focus-color-light);--focus:var(--focus-color-light);--item-padding-y:var(--spacing-scale-2x);background-color:var(--background-light);color:var(--color)}.dropdown .br-item:not(:last-child){border-bottom:1px solid var(--border-color)}.dropdown .br-item.selected{--color:var(--color-dark);--color-rgb:var(--color-dark-rgb);--text-color:var(--color-dark);--interactive:var(--interactive-dark);--interactive-rgb:var(--interactive-dark-rgb);--visited:var(--visited-dark);--hover:var(--hover-dark);--pressed:var(--pressed-dark);--focus-color:var(--focus-color-dark);--focus:var(--focus-color-dark)}.justify-content-start{justify-content:flex-start !important}.justify-content-end{justify-content:flex-end !important}.justify-content-center{justify-content:center !important}.align-items-center{align-items:center !important}.col,[class*=col-]{padding-left:calc(var(--grid-gutter)*.5);padding-right:calc(var(--grid-gutter)*.5);width:100%}.col{flex:1 0 0%;min-width:8.3333333333%}.col-auto{flex:0 0 auto;width:auto}.col-2{flex-basis:16.6666666667%;max-width:16.6666666667%}.container,.container-fluid,.container-lg{--grid-margin:var(--grid-portrait-margin);--grid-maxwidth:var(--grid-portrait-maxwidth);margin-left:auto;margin-right:auto;max-width:var(--grid-maxwidth);padding-left:var(--grid-margin);padding-right:var(--grid-margin);width:100%}.row{--grid-gutter:var(--grid-portrait-gutter);display:flex;flex-wrap:wrap;margin-left:calc(var(--grid-gutter)*-0.5);margin-right:calc(var(--grid-gutter)*-0.5)}@media (min-width: 576px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-tablet-margin)}.row{--grid-gutter:var(--grid-tablet-gutter)}.container{--grid-maxwidth:calc(var(--grid-breakpoint-sm) - var(--grid-tablet-margin))}.col-sm-4{flex-basis:33.3333333333%;max-width:33.3333333333%}}@media (min-width: 992px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-tablet-margin)}.row{--grid-gutter:var(--grid-tablet-gutter)}.container{--grid-maxwidth:calc(var(--grid-breakpoint-md) - var(--grid-tablet-margin))}}@media (min-width: 1280px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-desktop-margin)}.row{--grid-gutter:var(--grid-desktop-gutter)}.container,.container-lg{--grid-maxwidth:calc(var(--grid-breakpoint-lg) - var(--grid-desktop-margin))}.col-lg-3{flex-basis:25%;max-width:25%}}@media (min-width: 1600px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-tv-margin)}.row{--grid-gutter:var(--grid-tv-gutter)}.container,.container-lg{--grid-maxwidth:calc(var(--grid-breakpoint-xl) - var(--grid-tv-margin))}}.ease{animation-timing-function:cubic-bezier(0.25, 0.1, 0.25, 1)}.ease-out{animation-timing-function:cubic-bezier(0, 0, 0.58, 1)}.ease-in-out{animation-timing-function:cubic-bezier(0.42, 0, 0.58, 1)}.fast{animation-duration:var(--duration-fast)}.slow{animation-duration:var(--duration-slow)}.mt-1{margin-top:var(--spacing-scale-half) !important}.mr-1{margin-right:var(--spacing-scale-half) !important}.mb-1{margin-bottom:var(--spacing-scale-half) !important}.ml-1{margin-left:var(--spacing-scale-half) !important}.mx-3{margin-left:var(--spacing-scale-2x) !important;margin-right:var(--spacing-scale-2x) !important}.mb-4{margin-bottom:var(--spacing-scale-3x) !important}.ml-auto{margin-left:auto !important}.pt-half{padding-top:var(--spacing-scale-half) !important}@media (min-width: 576px){.ml-sm-0{margin-left:var(--spacing-scale-default) !important}}.highlight{background:var(--status-highlight-background) linear-gradient(var(--status-highlight-overlay), var(--status-highlight-overlay));color:var(--status-highlight-text);padding:0 var(--spacing-scale-half)}[disabled],.disabled{cursor:not-allowed;opacity:var(--disabled)}[disabled] *,.disabled *{pointer-events:none}fieldset[disabled]{opacity:1}.text-center{text-align:center !important}.text-right{text-align:right !important}.text-nowrap{white-space:nowrap !important}.text-uppercase{text-transform:uppercase !important}.text-bold{font-weight:700 !important}.text-base{font-size:var(--font-size-scale-base) !important}.text-down-01{font-size:var(--font-size-scale-down-01) !important}@media (min-width: 576px){.text-sm-center{text-align:center !important}.text-sm-left{text-align:left !important}.text-sm-right{text-align:right !important}}p{color:var(--color);font-size:var(--font-size-scale-base);font-weight:var(--font-weight-regular);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-2x);margin-top:0}p a{text-decoration:underline}@media (min-width: 576px){p{font-size:var(--font-size-scale-up-01)}}a{--focus-offset:var(--spacing-scale-half)}a:focus{outline:none}a.focus-visible,a:focus-visible{outline-color:var(--focus);outline-offset:var(--focus-offset);outline-style:var(--focus-style);outline-width:var(--focus-width)}a:not(:disabled):hover{background-image:linear-gradient(rgba(var(--interactive-rgb), var(--hover)), rgba(var(--interactive-rgb), var(--hover)))}a:not(:disabled):active{background-image:linear-gradient(rgba(var(--interactive-rgb), var(--pressed)), rgba(var(--interactive-rgb), var(--pressed)))}a{color:var(--interactive);text-decoration:none}.main-content a{text-decoration:underline}button{cursor:pointer}img{max-width:100%;vertical-align:middle}h2,.h2{color:var(--color);font-size:var(--font-size-scale-up-03);font-weight:var(--font-weight-semi-bold);line-height:var(--font-line-height-low);margin-bottom:var(--spacing-scale-2xh);margin-top:var(--spacing-scale-3xh);padding-bottom:var(--spacing-scale-2xh)}@media (min-width: 576px){.h2,h2{font-size:var(--font-size-scale-up-05);font-weight:var(--font-weight-regular)}}ul,ol{margin-bottom:var(--spacing-scale-2x);margin-top:0;padding:0 0 0 var(--spacing-scale-5x)}table{--table-background:var(--background);--table-color:var(--color);--table-border-color:var(--gray-20);--table-border-style:solid;--table-border-width:1px;--table-hover:var(--color-rgb);--table-padding:var(--spacing-scale-3x);--table-font-weight:var(--font-weight-medium);--table-th-background:var(--background-alternative);--table-th-font-weight:var(--font-weight-semi-bold);--table-row-size:var(--spacing-scale-2x);border-collapse:collapse;width:100%}tr.selected,tr.is-selected{--color:var(--color-dark);--color-rgb:var(--color-dark-rgb);--text-color:var(--color-dark);--interactive:var(--interactive-dark);--interactive-rgb:var(--interactive-dark-rgb);--visited:var(--visited-dark);--hover:var(--hover-dark);--pressed:var(--pressed-dark);--focus-color:var(--focus-color-dark);--focus:var(--focus-color-dark)}label,.label{color:var(--color);font-size:var(--font-size-scale-base);font-weight:var(--font-weight-semi-bold);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-half)}fieldset,.fieldset{border:var(--surface-width-none);margin-bottom:var(--spacing-scale-5x);margin-top:0;padding:0}legend,.legend{color:var(--color);font-size:var(--font-size-scale-up-01);font-weight:var(--font-weight-semi-bold);line-height:var(--font-line-height-low);margin-bottom:var(--spacing-scale-2x);margin-top:var(--spacing-scale-2x)}::placeholder,.placeholder{color:var(--color-light);font-size:var(--font-size-scale-base);font-style:italic;font-weight:var(--font-weight-regular);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-half);margin-top:var(--spacing-scale-half);opacity:1}input,textarea,.input{color:var(--color-light);font-size:var(--font-size-scale-up-01);font-weight:var(--font-weight-medium);line-height:var(--font-line-height-low);margin-bottom:var(--spacing-scale-half)}code,.code{background:var(--gray-5);border-radius:4px;color:var(--gray-80);display:inline-block;font-family:monospace;font-size:var(--font-size-scale-base);font-weight:var(--font-weight-medium);line-height:var(--font-line-height-low);padding:var(--spacing-scale-half)}pre,.pre{background:var(--gray-5);margin:var(--spacing-scale-2x) 0 var(--spacing-scale-4x);padding:var(--spacing-scale-2x)}pre code,.pre code{display:inline;padding:0}*[data-toggle=collapse]:not(:disabled):hover{background-image:linear-gradient(rgba(var(--interactive-rgb), var(--hover)), rgba(var(--interactive-rgb), var(--hover)))}*[data-toggle=collapse]:focus{outline:none}*[data-toggle=collapse].focus-visible,*[data-toggle=collapse]:focus-visible{outline-color:var(--focus);outline-offset:var(--focus-offset);outline-style:var(--focus-style);outline-width:var(--focus-width)}@media (prefers-reduced-motion: reduce){:host,:host::before,:host::after,:host *,:host *::before,:host *::after{animation:none !important;scroll-behavior:auto !important;transition:none !important}}:host-context([data-wbc-reduced-motion=true])::before,:host-context([data-wbc-reduced-motion=true])::after,:host-context([data-wbc-reduced-motion=true]) *,:host-context([data-wbc-reduced-motion=true]) *::before,:host-context([data-wbc-reduced-motion=true]) *::after{animation:none !important;scroll-behavior:auto !important;transition:none !important}:host{--br-select-option-bg-color:var(--bg-color, var(--background, var(--background-color, #fff)));contain:paint;display:block;background-color:var(--br-select-option-bg-color);line-height:0;overflow:hidden;position:relative}:host(:focus-within){contain:none;overflow:visible}:host([active]){contain:none;overflow:visible;z-index:1}:host([active])::after{border:var(--focus-width) var(--focus-style) var(--focus);box-sizing:border-box;content:"";inset:0;pointer-events:none;position:absolute}.br-select-option{opacity:1 !important}br-item{--br-item-bg-color:var(--br-select-option-bg-color);background-color:var(--br-select-option-bg-color);display:block;line-height:normal;overflow:visible;width:100%}br-checkbox{--border-color:var(--gray-40, #888);--disabled:1;pointer-events:none}:host(:not([disabled])) br-item::part(item){cursor:pointer}:host([disabled]){background:var(--br-select-option-bg-color) !important;cursor:not-allowed}br-item[disabled]{--br-item-bg-color:var(--br-select-option-bg-color);background:var(--br-select-option-bg-color) !important;cursor:not-allowed}:host([disabled]) ::slotted(*){opacity:var(--disabled) !important}.br-select-option-label{display:block;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host([disabled]) .br-select-option-label{opacity:var(--disabled) !important}.br-select-option-label ::slotted(*){display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}`;
|
|
1099
|
+
const selectOptionCss = () => `*,*::before,*::after{box-sizing:border-box}:host{line-height:var(--font-line-height-medium);-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%}main{display:block}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace;font-size:1em}a{background-color:rgba(0,0,0,0)}b,strong{font-weight:bolder}small{font-size:80%}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:var(--font-line-height-medium);margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{appearance:none}::-webkit-file-upload-button{appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}.d-none{display:none !important}@media (min-width: 576px){.d-sm-block{display:block !important}.d-sm-flex{display:flex !important}}[data-toggle=dropdown]+*{position:absolute}.dropdown{position:relative}.dropdown [data-toggle=dropdown]+*{box-shadow:var(--surface-shadow-sm);left:0;position:absolute;top:100%}.dropdown>.br-notification{left:auto;right:0}.dropdown .br-item{--color:var(--color-light);--color-rgb:var(--color-light-rgb);--text-color:var(--color-light);--interactive:var(--interactive-light);--interactive-rgb:var(--color-rgb);--visited:var(--visited-light);--hover:var(--hover-light);--pressed:var(--pressed-light);--focus-color:var(--focus-color-light);--focus:var(--focus-color-light);--item-padding-y:var(--spacing-scale-2x);background-color:var(--background-light);color:var(--color)}.dropdown .br-item:not(:last-child){border-bottom:1px solid var(--border-color)}.dropdown .br-item.selected{--color:var(--color-dark);--color-rgb:var(--color-dark-rgb);--text-color:var(--color-dark);--interactive:var(--interactive-dark);--interactive-rgb:var(--interactive-dark-rgb);--visited:var(--visited-dark);--hover:var(--hover-dark);--pressed:var(--pressed-dark);--focus-color:var(--focus-color-dark);--focus:var(--focus-color-dark)}.justify-content-start{justify-content:flex-start !important}.justify-content-end{justify-content:flex-end !important}.justify-content-center{justify-content:center !important}.align-items-center{align-items:center !important}.col,[class*=col-]{padding-left:calc(var(--grid-gutter)*.5);padding-right:calc(var(--grid-gutter)*.5);width:100%}.col{flex:1 0 0%;min-width:8.3333333333%}.col-auto{flex:0 0 auto;width:auto}.col-2{flex-basis:16.6666666667%;max-width:16.6666666667%}.container,.container-fluid,.container-lg{--grid-margin:var(--grid-portrait-margin);--grid-maxwidth:var(--grid-portrait-maxwidth);margin-left:auto;margin-right:auto;max-width:var(--grid-maxwidth);padding-left:var(--grid-margin);padding-right:var(--grid-margin);width:100%}.row{--grid-gutter:var(--grid-portrait-gutter);display:flex;flex-wrap:wrap;margin-left:calc(var(--grid-gutter)*-0.5);margin-right:calc(var(--grid-gutter)*-0.5)}@media (min-width: 576px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-tablet-margin)}.row{--grid-gutter:var(--grid-tablet-gutter)}.container{--grid-maxwidth:calc(var(--grid-breakpoint-sm) - var(--grid-tablet-margin))}.col-sm-4{flex-basis:33.3333333333%;max-width:33.3333333333%}}@media (min-width: 992px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-tablet-margin)}.row{--grid-gutter:var(--grid-tablet-gutter)}.container{--grid-maxwidth:calc(var(--grid-breakpoint-md) - var(--grid-tablet-margin))}}@media (min-width: 1280px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-desktop-margin)}.row{--grid-gutter:var(--grid-desktop-gutter)}.container,.container-lg{--grid-maxwidth:calc(var(--grid-breakpoint-lg) - var(--grid-desktop-margin))}.col-lg-3{flex-basis:25%;max-width:25%}}@media (min-width: 1600px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-tv-margin)}.row{--grid-gutter:var(--grid-tv-gutter)}.container,.container-lg{--grid-maxwidth:calc(var(--grid-breakpoint-xl) - var(--grid-tv-margin))}}.ease{animation-timing-function:cubic-bezier(0.25, 0.1, 0.25, 1)}.ease-out{animation-timing-function:cubic-bezier(0, 0, 0.58, 1)}.ease-in-out{animation-timing-function:cubic-bezier(0.42, 0, 0.58, 1)}.fast{animation-duration:var(--duration-fast)}.slow{animation-duration:var(--duration-slow)}.mt-1{margin-top:var(--spacing-scale-half) !important}.mr-1{margin-right:var(--spacing-scale-half) !important}.mb-1{margin-bottom:var(--spacing-scale-half) !important}.ml-1{margin-left:var(--spacing-scale-half) !important}.mx-3{margin-left:var(--spacing-scale-2x) !important;margin-right:var(--spacing-scale-2x) !important}.mb-4{margin-bottom:var(--spacing-scale-3x) !important}.ml-auto{margin-left:auto !important}.pt-half{padding-top:var(--spacing-scale-half) !important}@media (min-width: 576px){.ml-sm-0{margin-left:var(--spacing-scale-default) !important}}.highlight{background:var(--status-highlight-background) linear-gradient(var(--status-highlight-overlay), var(--status-highlight-overlay));color:var(--status-highlight-text);padding:0 var(--spacing-scale-half)}[disabled],.disabled{cursor:not-allowed;opacity:var(--disabled)}[disabled] *,.disabled *{pointer-events:none}fieldset[disabled]{opacity:1}.text-center{text-align:center !important}.text-right{text-align:right !important}.text-nowrap{white-space:nowrap !important}.text-uppercase{text-transform:uppercase !important}.text-bold{font-weight:700 !important}.text-base{font-size:var(--font-size-scale-base) !important}.text-down-01{font-size:var(--font-size-scale-down-01) !important}@media (min-width: 576px){.text-sm-center{text-align:center !important}.text-sm-left{text-align:left !important}.text-sm-right{text-align:right !important}}p{color:var(--color);font-size:var(--font-size-scale-base);font-weight:var(--font-weight-regular);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-2x);margin-top:0}p a{text-decoration:underline}@media (min-width: 576px){p{font-size:var(--font-size-scale-up-01)}}a{--focus-offset:var(--spacing-scale-half)}a:focus{outline:none}a.focus-visible,a:focus-visible{outline-color:var(--focus);outline-offset:var(--focus-offset);outline-style:var(--focus-style);outline-width:var(--focus-width)}a:not(:disabled):hover{background-image:linear-gradient(rgba(var(--interactive-rgb), var(--hover)), rgba(var(--interactive-rgb), var(--hover)))}a:not(:disabled):active{background-image:linear-gradient(rgba(var(--interactive-rgb), var(--pressed)), rgba(var(--interactive-rgb), var(--pressed)))}a{color:var(--interactive);text-decoration:none}.main-content a{text-decoration:underline}button{cursor:pointer}img{max-width:100%;vertical-align:middle}h2,.h2{color:var(--color);font-size:var(--font-size-scale-up-03);font-weight:var(--font-weight-semi-bold);line-height:var(--font-line-height-low);margin-bottom:var(--spacing-scale-2xh);margin-top:var(--spacing-scale-3xh);padding-bottom:var(--spacing-scale-2xh)}@media (min-width: 576px){.h2,h2{font-size:var(--font-size-scale-up-05);font-weight:var(--font-weight-regular)}}ul,ol{margin-bottom:var(--spacing-scale-2x);margin-top:0;padding:0 0 0 var(--spacing-scale-5x)}table{--table-background:var(--background);--table-color:var(--color);--table-border-color:var(--gray-20);--table-border-style:solid;--table-border-width:1px;--table-hover:var(--color-rgb);--table-padding:var(--spacing-scale-3x);--table-font-weight:var(--font-weight-medium);--table-th-background:var(--background-alternative);--table-th-font-weight:var(--font-weight-semi-bold);--table-row-size:var(--spacing-scale-2x);border-collapse:collapse;width:100%}tr.selected,tr.is-selected{--color:var(--color-dark);--color-rgb:var(--color-dark-rgb);--text-color:var(--color-dark);--interactive:var(--interactive-dark);--interactive-rgb:var(--interactive-dark-rgb);--visited:var(--visited-dark);--hover:var(--hover-dark);--pressed:var(--pressed-dark);--focus-color:var(--focus-color-dark);--focus:var(--focus-color-dark)}label,.label{color:var(--color);font-size:var(--font-size-scale-base);font-weight:var(--font-weight-semi-bold);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-half)}fieldset,.fieldset{border:var(--surface-width-none);margin-bottom:var(--spacing-scale-5x);margin-top:0;padding:0}legend,.legend{color:var(--color);font-size:var(--font-size-scale-up-01);font-weight:var(--font-weight-semi-bold);line-height:var(--font-line-height-low);margin-bottom:var(--spacing-scale-2x);margin-top:var(--spacing-scale-2x)}::placeholder,.placeholder{color:var(--color-light);font-size:var(--font-size-scale-base);font-style:italic;font-weight:var(--font-weight-regular);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-half);margin-top:var(--spacing-scale-half);opacity:1}input,textarea,.input{color:var(--color-light);font-size:var(--font-size-scale-up-01);font-weight:var(--font-weight-medium);line-height:var(--font-line-height-low);margin-bottom:var(--spacing-scale-half)}pre,.pre{background:var(--gray-5);margin:var(--spacing-scale-2x) 0 var(--spacing-scale-4x);padding:var(--spacing-scale-2x)}*[data-toggle=collapse]:not(:disabled):hover{background-image:linear-gradient(rgba(var(--interactive-rgb), var(--hover)), rgba(var(--interactive-rgb), var(--hover)))}*[data-toggle=collapse]:focus{outline:none}*[data-toggle=collapse].focus-visible,*[data-toggle=collapse]:focus-visible{outline-color:var(--focus);outline-offset:var(--focus-offset);outline-style:var(--focus-style);outline-width:var(--focus-width)}@media (prefers-reduced-motion: reduce){:host,:host::before,:host::after,:host *,:host *::before,:host *::after{animation:none !important;scroll-behavior:auto !important;transition:none !important}}:host-context([data-wbc-reduced-motion=true])::before,:host-context([data-wbc-reduced-motion=true])::after,:host-context([data-wbc-reduced-motion=true]) *,:host-context([data-wbc-reduced-motion=true]) *::before,:host-context([data-wbc-reduced-motion=true]) *::after{animation:none !important;scroll-behavior:auto !important;transition:none !important}:host{--br-select-option-bg-color:var(--bg-color, var(--background, var(--background-color, #fff)));contain:paint;display:block;background-color:var(--br-select-option-bg-color);line-height:0;overflow:hidden;position:relative}:host(:focus-within){contain:none;overflow:visible}:host([active]){contain:none;overflow:visible;z-index:1}:host([active])::after{border:var(--focus-width) var(--focus-style) var(--focus);box-sizing:border-box;content:"";inset:0;pointer-events:none;position:absolute}:host([part~=select-all]){--br-select-option-bg-color:var(--gray-2)}:host([part~=select-all]) .br-select-option-label{font-weight:var(--font-weight-semi-bold)}.br-select-option{opacity:1 !important}br-item{--br-item-bg-color:var(--br-select-option-bg-color);background-color:var(--br-select-option-bg-color);display:block;line-height:normal;overflow:visible;width:100%}:host(:not([disabled])) br-item:hover{--br-item-bg-color:color-mix(in srgb, var(--color) calc(var(--surface-opacity-xs) * 100%), transparent)}:host(:not([disabled])) br-item:active{--br-item-bg-color:color-mix(in srgb, var(--color) calc(var(--surface-opacity-md) * 100%), transparent)}:host([selected]) br-item,:host([selected]) br-item:hover,:host([selected]) br-item:active{--br-item-bg-color:var(--blue-warm-vivid-50)}:host([selected]:not([disabled])) br-item:active{--br-item-bg-color:color-mix(in srgb, var(--color) calc(var(--surface-opacity-md) * 100%), transparent)}:host([selected]) br-item::part(item){background-color:var(--blue-warm-vivid-50)}:host([selected]:not([disabled])) br-item:active::part(item){background-color:color-mix(in srgb, var(--blue-warm-vivid-50) calc(var(--surface-opacity-md) * 100%), transparent);background-image:none}:host(:not([disabled]):active) br-item::part(item){background-color:color-mix(in srgb, var(--color) calc(var(--surface-opacity-md) * 100%), transparent);box-shadow:var(--surface-shadow-none);cursor:pointer}br-item::part(item){align-items:center}br-checkbox{--border-color:var(--gray-40, #888);--disabled:1;align-self:center;display:inline-flex;align-items:center;margin-block:0;pointer-events:none}:host(:not([disabled])) br-item::part(item){cursor:pointer}:host(:not([disabled])) br-item:active::part(item){box-shadow:var(--surface-shadow-none);cursor:pointer}:host([disabled]){background:var(--br-select-option-bg-color) !important;cursor:not-allowed}br-item[disabled]{--br-item-bg-color:var(--br-select-option-bg-color);background:var(--br-select-option-bg-color) !important;cursor:not-allowed}:host([disabled]) ::slotted(*){opacity:var(--disabled) !important}.br-select-option-label{display:block;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host([disabled]) .br-select-option-label{opacity:var(--disabled) !important}.br-select-option-label ::slotted(*){display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}`;
|
|
922
1100
|
|
|
923
1101
|
const SelectOption = class {
|
|
924
1102
|
constructor(hostRef) {
|
|
@@ -976,13 +1154,17 @@ const SelectOption = class {
|
|
|
976
1154
|
this.handleActivation = () => {
|
|
977
1155
|
if (this.disabled)
|
|
978
1156
|
return;
|
|
979
|
-
const nextSelected = !this.selected;
|
|
980
|
-
if (this.isControlledBySelect)
|
|
1157
|
+
const nextSelected = this.isControlledBySingleSelect && this.selected ? true : !this.selected;
|
|
1158
|
+
if (this.isControlledBySelect) {
|
|
1159
|
+
this.lastStateChangeKey = '';
|
|
981
1160
|
this.emitStateChange(nextSelected);
|
|
1161
|
+
}
|
|
982
1162
|
else
|
|
983
1163
|
this.applySelection(nextSelected);
|
|
984
1164
|
};
|
|
985
1165
|
this.handleKeyDown = (event) => {
|
|
1166
|
+
if (this.isControlledBySelect)
|
|
1167
|
+
return;
|
|
986
1168
|
if (event.key !== 'Enter' && event.key !== ' ')
|
|
987
1169
|
return;
|
|
988
1170
|
event.preventDefault();
|
|
@@ -1033,6 +1215,10 @@ const SelectOption = class {
|
|
|
1033
1215
|
// consolida a seleção e atualiza as demais opções por meio do evento.
|
|
1034
1216
|
this.applySelection(nextSelected);
|
|
1035
1217
|
}
|
|
1218
|
+
get isControlledBySingleSelect() {
|
|
1219
|
+
const owner = findComposedOwner(this.el, 'br-select');
|
|
1220
|
+
return owner !== null && !(owner.multiple ?? owner.isMultiple);
|
|
1221
|
+
}
|
|
1036
1222
|
emitStateChange(selected = this.selected) {
|
|
1037
1223
|
const detail = {
|
|
1038
1224
|
disabled: this.disabled,
|
|
@@ -1069,7 +1255,7 @@ const SelectOption = class {
|
|
|
1069
1255
|
*/
|
|
1070
1256
|
applySelection(selected) {
|
|
1071
1257
|
this.indeterminate = false;
|
|
1072
|
-
this.selected = selected;
|
|
1258
|
+
this.selected = selected ?? false;
|
|
1073
1259
|
this.emitStateChange();
|
|
1074
1260
|
}
|
|
1075
1261
|
getCssClassMap() {
|
|
@@ -1138,7 +1324,7 @@ const SelectOption = class {
|
|
|
1138
1324
|
return this.normalizeText(this.el.textContent || '');
|
|
1139
1325
|
}
|
|
1140
1326
|
render() {
|
|
1141
|
-
return (h(Host, { key: '
|
|
1327
|
+
return (h(Host, { key: '62d927d3fc103d76f2c030c931ac1e1802f5c468', part: this.el.getAttribute('part') || 'option', exportparts: "checkbox:checkbox, checkbox:option-checkbox", "aria-disabled": this.disabled ? 'true' : 'false', "aria-label": this.getAccessibleLabel(), "aria-selected": this.selected ? 'true' : 'false', role: "option", tabindex: "-1", onClickCapture: this.handleActivation, onKeyDown: this.handleKeyDown, onMouseEnter: () => {
|
|
1142
1328
|
this.el.dispatchEvent(new CustomEvent('brInternalSelectOptionHover', {
|
|
1143
1329
|
bubbles: true,
|
|
1144
1330
|
composed: true,
|
|
@@ -1150,7 +1336,7 @@ const SelectOption = class {
|
|
|
1150
1336
|
composed: true,
|
|
1151
1337
|
detail: { label: this.getResolvedLabel(), value: this.getResolvedValue() },
|
|
1152
1338
|
}));
|
|
1153
|
-
} }, h("br-item", { key: '
|
|
1339
|
+
} }, h("br-item", { key: '1c46f284774a8db5e8b805a75cfde08709ae1da9', class: this.getCssClassMap(), density: this.effectiveDensity, disabled: this.disabled, selected: this.selected }, this.showCheckbox && (h("br-checkbox", { key: 'a7164ca2d9f75dff3dde0d882591dd6eb1436a3e', exportparts: "input:checkbox, input:option-checkbox", slot: "start", checked: this.selected, disabled: true, indeterminate: this.indeterminate, name: this.getResolvedValue(), "aria-hidden": "true" })), h("span", { key: '35e6dae591af64c5e077ba5e9c5817a287644093', class: "br-select-option-label" }, h("slot", { key: 'deabf1daf900d9aca934a2c00f5809e2e9862729' }, this.getResolvedLabel())))));
|
|
1154
1340
|
}
|
|
1155
1341
|
static get formAssociated() { return true; }
|
|
1156
1342
|
get el() { return getElement(this); }
|