@govbr-ds/webcomponents 2.4.0 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/cem/custom-elements.json +4438 -1034
- package/cem/webcomponents.html-custom-data.json +491 -160
- package/dist/cjs/br-avatar.cjs.entry.js +4 -4
- package/dist/cjs/br-breadcrumb-item.cjs.entry.js +2 -2
- package/dist/cjs/br-breadcrumb.cjs.entry.js +11 -11
- package/dist/cjs/br-button_2.cjs.entry.js +6 -6
- package/dist/cjs/br-card.cjs.entry.js +4 -4
- package/dist/cjs/br-carousel-page.cjs.entry.js +3 -3
- package/dist/cjs/br-carousel.cjs.entry.js +5 -5
- package/dist/cjs/br-checkbox-group.cjs.entry.js +4 -4
- package/dist/cjs/br-checkbox.cjs.entry.js +5 -5
- package/dist/cjs/br-checkgroup.cjs.entry.js +2 -2
- package/dist/cjs/br-collapse_2.cjs.entry.js +10 -10
- package/dist/cjs/br-cookiebar-cookie.cjs.entry.js +3 -3
- package/dist/cjs/br-cookiebar-group.cjs.entry.js +4 -4
- package/dist/cjs/br-cookiebar-header.cjs.entry.js +3 -3
- package/dist/cjs/br-cookiebar-link.cjs.entry.js +3 -3
- package/dist/cjs/br-cookiebar-note-group.cjs.entry.js +3 -3
- package/dist/cjs/br-cookiebar-note.cjs.entry.js +3 -3
- package/dist/cjs/br-cookiebar.cjs.entry.js +5 -5
- package/dist/cjs/br-crumb.cjs.entry.js +2 -2
- package/dist/cjs/br-date-picker_3.cjs.entry.js +165 -78
- package/dist/cjs/br-datetime-picker.cjs.entry.js +11 -28
- package/dist/cjs/br-divider.cjs.entry.js +4 -4
- package/dist/cjs/br-dropdown.cjs.entry.js +677 -0
- package/dist/cjs/br-footer-category.cjs.entry.js +4 -4
- package/dist/cjs/br-footer-item.cjs.entry.js +3 -3
- package/dist/cjs/br-footer-legal.cjs.entry.js +3 -3
- package/dist/cjs/br-footer-logo.cjs.entry.js +3 -3
- package/dist/cjs/br-footer-social.cjs.entry.js +3 -3
- package/dist/cjs/br-footer.cjs.entry.js +5 -5
- package/dist/cjs/br-header-function.cjs.entry.js +3 -3
- package/dist/cjs/br-header-link.cjs.entry.js +3 -3
- package/dist/cjs/br-header-list.cjs.entry.js +4 -4
- package/dist/cjs/br-header-logo.cjs.entry.js +3 -3
- package/dist/cjs/br-header.cjs.entry.js +6 -6
- package/dist/cjs/br-icon.cjs.entry.js +173 -159
- package/dist/cjs/br-input_2.cjs.entry.js +1427 -0
- package/dist/cjs/br-item.cjs.entry.js +4 -4
- package/dist/cjs/br-link.cjs.entry.js +9 -9
- package/dist/cjs/br-magic-button.cjs.entry.js +11 -12
- package/dist/cjs/br-menu-group.cjs.entry.js +3 -3
- package/dist/cjs/br-menu-header.cjs.entry.js +3 -3
- package/dist/cjs/br-menu-info.cjs.entry.js +3 -3
- package/dist/cjs/br-menu-item.cjs.entry.js +3 -3
- package/dist/cjs/br-menu-link.cjs.entry.js +3 -3
- package/dist/cjs/br-menu-list.cjs.entry.js +2 -2
- package/dist/cjs/br-menu-logo.cjs.entry.js +3 -3
- package/dist/cjs/br-menu-social.cjs.entry.js +2 -2
- package/dist/cjs/br-menu.cjs.entry.js +5 -5
- package/dist/cjs/br-modal.cjs.entry.js +2 -2
- package/dist/cjs/br-notification-body.cjs.entry.js +3 -3
- package/dist/cjs/br-notification-header.cjs.entry.js +3 -3
- package/dist/cjs/br-notification-item.cjs.entry.js +3 -3
- package/dist/cjs/br-notification.cjs.entry.js +4 -4
- package/dist/cjs/br-pagination_2.cjs.entry.js +2578 -0
- package/dist/cjs/br-radio-group.cjs.entry.js +5 -5
- package/dist/cjs/br-radio.cjs.entry.js +5 -5
- package/dist/cjs/br-scrim.cjs.entry.js +4 -4
- package/dist/cjs/br-select-input_3.cjs.entry.js +49 -103
- package/dist/cjs/br-sign-in.cjs.entry.js +4 -4
- package/dist/cjs/br-skip-link-item.cjs.entry.js +2 -2
- package/dist/cjs/br-skip-link.cjs.entry.js +3 -3
- package/dist/cjs/br-skiplink-item.cjs.entry.js +3 -3
- package/dist/cjs/br-slider.cjs.entry.js +4 -4
- package/dist/cjs/br-step_2.cjs.entry.js +7 -7
- package/dist/cjs/br-switch.cjs.entry.js +5 -5
- package/dist/cjs/br-tab-item.cjs.entry.js +3 -3
- package/dist/cjs/br-tab.cjs.entry.js +8 -8
- package/dist/cjs/br-table-action_6.cjs.entry.js +1500 -0
- package/dist/cjs/br-table-body.cjs.entry.js +4 -16
- package/dist/cjs/br-table-header.cjs.entry.js +4 -16
- package/dist/cjs/br-table.cjs.entry.js +2616 -433
- package/dist/cjs/br-tag.cjs.entry.js +5 -5
- package/dist/cjs/br-textarea.cjs.entry.js +4 -4
- package/dist/cjs/br-tooltip.cjs.entry.js +5 -29
- package/dist/cjs/br-upload.cjs.entry.js +5 -5
- package/dist/cjs/br-wizard-panel.cjs.entry.js +3 -3
- package/dist/cjs/br-wizard.cjs.entry.js +3 -3
- package/dist/cjs/{datetime-picker-constants-CCeI5iW7.js → datetime-picker-constants-CTf1kVJ1.js} +1 -0
- package/dist/cjs/helpers-DkkDubv1.js +28 -0
- package/dist/cjs/{icon.utils-DF6kMskA.js → icon.utils-CMs0ukvR.js} +1 -1
- package/dist/cjs/{iconify-icon-DfODV9bf.js → iconify-icon-LjavbM-D.js} +103 -57
- package/dist/cjs/{index-Bc30P_6z.js → index-BP8UIQro.js} +34 -34
- package/dist/cjs/{index-C-IpVFDH.js → index-Caoez3xb.js} +64 -16
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/{isValid-CduHZTFc.js → isValid-DgJ-noPS.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{slot-DAllytTj.js → slot-CjaqqX7y.js} +1 -1
- package/dist/cjs/table.utils-De-9_NgJ.js +749 -0
- package/dist/cjs/webcomponents.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +3 -0
- package/dist/collection/components/avatar/avatar.css +1 -1
- package/dist/collection/components/avatar/avatar.js +21 -21
- package/dist/collection/components/breadcrumb/breadcrumb-item/breadcrumb-item.js +4 -12
- package/dist/collection/components/breadcrumb/breadcrumb.css +1 -1
- package/dist/collection/components/breadcrumb/breadcrumb.js +39 -34
- package/dist/collection/components/breadcrumb/crumb/crumb.js +2 -13
- package/dist/collection/components/button/button.css +1 -1
- package/dist/collection/components/button/button.js +22 -22
- package/dist/collection/components/card/card.css +1 -1
- package/dist/collection/components/card/card.js +20 -22
- package/dist/collection/components/carousel/carousel-page/carousel-page.css +1 -1
- package/dist/collection/components/carousel/carousel-page/carousel-page.js +3 -13
- package/dist/collection/components/carousel/carousel.css +1 -1
- package/dist/collection/components/carousel/carousel.js +25 -32
- package/dist/collection/components/checkbox/checkbox.css +1 -1
- package/dist/collection/components/checkbox/checkbox.js +18 -24
- package/dist/collection/components/checkbox-group/checkbox-group.css +1 -1
- package/dist/collection/components/checkbox-group/checkbox-group.js +19 -20
- package/dist/collection/components/checkgroup/checkgroup.js +2 -14
- package/dist/collection/components/collapse/collapse.css +1 -1
- package/dist/collection/components/collapse/collapse.js +33 -29
- package/dist/collection/components/cookiebar/cookiebar-cookie/cookiebar-cookie.css +1 -1
- package/dist/collection/components/cookiebar/cookiebar-cookie/cookiebar-cookie.js +3 -16
- package/dist/collection/components/cookiebar/cookiebar-group/cookiebar-group.css +1 -1
- package/dist/collection/components/cookiebar/cookiebar-group/cookiebar-group.js +4 -17
- package/dist/collection/components/cookiebar/cookiebar-header/cookiebar-header.css +1 -1
- package/dist/collection/components/cookiebar/cookiebar-header/cookiebar-header.js +3 -16
- package/dist/collection/components/cookiebar/cookiebar-link/cookiebar-link.css +1 -1
- package/dist/collection/components/cookiebar/cookiebar-link/cookiebar-link.js +3 -15
- package/dist/collection/components/cookiebar/cookiebar-note/cookiebar-note.css +1 -1
- package/dist/collection/components/cookiebar/cookiebar-note/cookiebar-note.js +3 -14
- package/dist/collection/components/cookiebar/cookiebar-note-group/cookiebar-note-group.css +1 -1
- package/dist/collection/components/cookiebar/cookiebar-note-group/cookiebar-note-group.js +3 -14
- package/dist/collection/components/cookiebar/cookiebar.css +1 -1
- package/dist/collection/components/cookiebar/cookiebar.js +33 -28
- package/dist/collection/components/datetime-picker/date-picker/date-picker-locale.js +62 -15
- package/dist/collection/components/datetime-picker/date-picker/date-picker.css +1 -1
- package/dist/collection/components/datetime-picker/date-picker/date-picker.js +123 -74
- package/dist/collection/components/datetime-picker/datetime-input/datetime-input.css +1 -1
- package/dist/collection/components/datetime-picker/datetime-input/datetime-input.js +5 -15
- package/dist/collection/components/datetime-picker/datetime-picker.css +1 -1
- package/dist/collection/components/datetime-picker/datetime-picker.js +23 -27
- package/dist/collection/components/datetime-picker/datetime-picker.utils.js +6 -6
- package/dist/collection/components/datetime-picker/time-picker/time-picker.css +1 -1
- package/dist/collection/components/datetime-picker/time-picker/time-picker.js +7 -17
- package/dist/collection/components/divider/divider.css +1 -1
- package/dist/collection/components/divider/divider.js +15 -19
- package/dist/collection/components/dropdown/dropdown.css +1 -1
- package/dist/collection/components/dropdown/dropdown.js +27 -28
- package/dist/collection/components/footer/footer-category/footer-category.css +1 -1
- package/dist/collection/components/footer/footer-category/footer-category.js +4 -17
- package/dist/collection/components/footer/footer-item/footer-item.css +1 -1
- package/dist/collection/components/footer/footer-item/footer-item.js +3 -16
- package/dist/collection/components/footer/footer-legal/footer-legal.css +1 -1
- package/dist/collection/components/footer/footer-legal/footer-legal.js +2 -16
- package/dist/collection/components/footer/footer-logo/footer-logo.css +1 -1
- package/dist/collection/components/footer/footer-logo/footer-logo.js +3 -16
- package/dist/collection/components/footer/footer-social/footer-social.css +1 -1
- package/dist/collection/components/footer/footer-social/footer-social.js +4 -16
- package/dist/collection/components/footer/footer.css +1 -1
- package/dist/collection/components/footer/footer.js +25 -29
- package/dist/collection/components/header/header-function/header-function.css +1 -1
- package/dist/collection/components/header/header-function/header-function.js +10 -14
- package/dist/collection/components/header/header-link/header-link.css +1 -1
- package/dist/collection/components/header/header-link/header-link.js +3 -16
- package/dist/collection/components/header/header-list/header-list.css +1 -1
- package/dist/collection/components/header/header-list/header-list.js +4 -17
- package/dist/collection/components/header/header-logo/header-logo.css +1 -1
- package/dist/collection/components/header/header-logo/header-logo.js +3 -16
- package/dist/collection/components/header/header.css +1 -1
- package/dist/collection/components/header/header.js +33 -30
- package/dist/collection/components/icon/default-icons-cache.js +159 -146
- package/dist/collection/components/icon/icon.css +1 -1
- package/dist/collection/components/icon/icon.js +38 -29
- package/dist/collection/components/icon/icon.utils.js +1 -1
- package/dist/collection/components/input/input.css +1 -1
- package/dist/collection/components/input/input.js +216 -30
- package/dist/collection/components/item/item.css +1 -1
- package/dist/collection/components/item/item.js +18 -22
- package/dist/collection/components/link/link.css +1 -1
- package/dist/collection/components/link/link.js +25 -29
- package/dist/collection/components/list/list.css +1 -1
- package/dist/collection/components/list/list.js +17 -21
- package/dist/collection/components/loading/loading.css +1 -1
- package/dist/collection/components/loading/loading.js +17 -24
- package/dist/collection/components/magic-button/magic-button.css +1 -1
- package/dist/collection/components/magic-button/magic-button.js +21 -29
- package/dist/collection/components/menu/menu-group/menu-group.css +1 -1
- package/dist/collection/components/menu/menu-group/menu-group.js +3 -16
- package/dist/collection/components/menu/menu-header/menu-header.css +1 -1
- package/dist/collection/components/menu/menu-header/menu-header.js +3 -16
- package/dist/collection/components/menu/menu-info/menu-info.css +1 -1
- package/dist/collection/components/menu/menu-info/menu-info.js +2 -15
- package/dist/collection/components/menu/menu-item/menu-item.css +1 -1
- package/dist/collection/components/menu/menu-item/menu-item.js +3 -16
- package/dist/collection/components/menu/menu-link/menu-link.css +1 -1
- package/dist/collection/components/menu/menu-link/menu-link.js +5 -17
- package/dist/collection/components/menu/menu-list/menu-list.css +1 -1
- package/dist/collection/components/menu/menu-list/menu-list.js +2 -15
- package/dist/collection/components/menu/menu-logo/menu-logo.css +1 -1
- package/dist/collection/components/menu/menu-logo/menu-logo.js +2 -15
- package/dist/collection/components/menu/menu-social/menu-social.css +1 -1
- package/dist/collection/components/menu/menu-social/menu-social.js +3 -16
- package/dist/collection/components/menu/menu.css +1 -1
- package/dist/collection/components/menu/menu.js +28 -35
- package/dist/collection/components/message/message.css +1 -1
- package/dist/collection/components/message/message.js +22 -25
- package/dist/collection/components/modal/modal.css +1 -1
- package/dist/collection/components/modal/modal.js +18 -21
- package/dist/collection/components/notification/notification-body/notification-body.css +1 -1
- package/dist/collection/components/notification/notification-body/notification-body.js +3 -13
- package/dist/collection/components/notification/notification-header/notification-header.css +1 -1
- package/dist/collection/components/notification/notification-header/notification-header.js +3 -14
- package/dist/collection/components/notification/notification-item/notification-item.css +1 -1
- package/dist/collection/components/notification/notification-item/notification-item.js +3 -16
- package/dist/collection/components/notification/notification.css +1 -1
- package/dist/collection/components/notification/notification.js +20 -29
- package/dist/collection/components/pagination/pagination.css +1 -1
- package/dist/collection/components/pagination/pagination.js +19 -27
- package/dist/collection/components/radio/radio.css +1 -1
- package/dist/collection/components/radio/radio.js +17 -20
- package/dist/collection/components/radio-group/radio-group.css +1 -1
- package/dist/collection/components/radio-group/radio-group.js +20 -20
- package/dist/collection/components/scrim/scrim.css +1 -1
- package/dist/collection/components/scrim/scrim.js +14 -17
- package/dist/collection/components/select/select-input/select-input.css +1 -1
- package/dist/collection/components/select/select-input/select-input.js +48 -102
- package/dist/collection/components/select/select-list/select-list.css +1 -1
- package/dist/collection/components/select/select-list/select-list.js +52 -15
- package/dist/collection/components/select/select-option/select-option.css +1 -1
- package/dist/collection/components/select/select-option/select-option.js +13 -17
- package/dist/collection/components/select/select.css +1 -1
- package/dist/collection/components/select/select.js +104 -110
- package/dist/collection/components/sign-in/sign-in.css +1 -1
- package/dist/collection/components/sign-in/sign-in.js +12 -16
- package/dist/collection/components/skip-link/skip-link-item/skip-link-item-alias.js +8 -4
- package/dist/collection/components/skip-link/skip-link-item/skip-link-item.css +1 -1
- package/dist/collection/components/skip-link/skip-link-item/skip-link-item.js +5 -15
- package/dist/collection/components/skip-link/skip-link.css +1 -1
- package/dist/collection/components/skip-link/skip-link.js +18 -24
- package/dist/collection/components/slider/slider.css +1 -1
- package/dist/collection/components/slider/slider.js +18 -28
- package/dist/collection/components/step/step-item/step-item.css +1 -1
- package/dist/collection/components/step/step-item/step-item.js +5 -15
- package/dist/collection/components/step/step.css +1 -1
- package/dist/collection/components/step/step.js +16 -25
- package/dist/collection/components/switch/switch.css +1 -1
- package/dist/collection/components/switch/switch.js +16 -20
- package/dist/collection/components/tab/tab-item/tab-item.css +1 -1
- package/dist/collection/components/tab/tab-item/tab-item.js +6 -16
- package/dist/collection/components/tab/tab.css +1 -1
- package/dist/collection/components/tab/tab.js +24 -31
- package/dist/collection/components/table/table-action/table-action.css +1 -0
- package/dist/collection/components/table/table-action/table-action.js +349 -0
- package/dist/collection/components/table/table-bar/table-bar.css +1 -0
- package/dist/collection/components/table/table-bar/table-bar.js +652 -0
- package/dist/collection/components/table/table-body/table-body.css +1 -1
- package/dist/collection/components/table/table-body/table-body.js +11 -26
- package/dist/collection/components/table/table-cell/table-cell.css +1 -1
- package/dist/collection/components/table/table-cell/table-cell.js +555 -91
- package/dist/collection/components/table/table-footer/table-footer.css +1 -0
- package/dist/collection/components/table/table-footer/table-footer.js +233 -0
- package/dist/collection/components/table/table-header/table-header.css +1 -1
- package/dist/collection/components/table/table-header/table-header.js +10 -26
- package/dist/collection/components/table/table-header-cell/table-header-cell.css +1 -1
- package/dist/collection/components/table/table-header-cell/table-header-cell.js +286 -95
- package/dist/collection/components/table/table-row/table-row.css +1 -1
- package/dist/collection/components/table/table-row/table-row.js +311 -66
- package/dist/collection/components/table/table.actions-tooltip.js +33 -0
- package/dist/collection/components/table/{table-constants.js → table.constants.js} +54 -77
- package/dist/collection/components/table/table.css +1 -1
- package/dist/collection/components/table/table.data.js +461 -0
- package/dist/collection/components/table/table.expansion.elements.js +70 -0
- package/dist/collection/components/table/table.expansion.js +179 -0
- package/dist/collection/components/table/table.grouping.js +97 -0
- package/dist/collection/components/table/table.header-height.js +47 -0
- package/dist/collection/components/table/table.js +2499 -625
- package/dist/collection/components/table/table.keyboard.js +340 -0
- package/dist/collection/components/table/table.scroll-shadows.js +36 -0
- package/dist/collection/components/table/table.selection.elements.js +63 -0
- package/dist/collection/components/table/table.selection.js +239 -0
- package/dist/collection/components/table/table.tokens.js +28 -0
- package/dist/collection/components/table/table.types.js +1 -0
- package/dist/collection/components/table/table.utils.js +75 -0
- package/dist/collection/components/table/table.virtual-list.js +342 -0
- package/dist/collection/components/tag/tag.css +1 -1
- package/dist/collection/components/tag/tag.js +17 -26
- package/dist/collection/components/textarea/textarea.css +1 -1
- package/dist/collection/components/textarea/textarea.js +14 -22
- package/dist/collection/components/tooltip/tooltip.css +1 -1
- package/dist/collection/components/tooltip/tooltip.js +15 -45
- package/dist/collection/components/upload/upload.css +1 -1
- package/dist/collection/components/upload/upload.js +36 -29
- package/dist/collection/components/wizard/wizard-panel/wizard-panel.css +1 -1
- package/dist/collection/components/wizard/wizard-panel/wizard-panel.js +3 -13
- package/dist/collection/components/wizard/wizard.css +1 -1
- package/dist/collection/components/wizard/wizard.js +22 -26
- package/dist/collection/pages/components/select/remote-options.js +87 -0
- package/dist/collection/pages/scripts/code-editor.js +28 -3
- package/dist/collection/pages/scripts/pageLoader.js +286 -20
- package/dist/collection/pages/scripts/pageloader-preview.js +3 -1
- package/dist/collection/shared/utils/slot.js +1 -1
- package/dist/components/br-avatar.js +1 -1
- package/dist/components/br-breadcrumb-item.js +1 -1
- package/dist/components/br-breadcrumb.js +1 -1
- package/dist/components/br-button.js +1 -1
- package/dist/components/br-card.js +1 -1
- package/dist/components/br-carousel-page.js +1 -1
- package/dist/components/br-carousel.js +1 -1
- package/dist/components/br-checkbox-group.js +1 -1
- package/dist/components/br-checkbox.js +1 -1
- package/dist/components/br-checkgroup.js +1 -1
- package/dist/components/br-collapse.js +1 -1
- package/dist/components/br-cookiebar-cookie.js +1 -1
- package/dist/components/br-cookiebar-group.js +1 -1
- package/dist/components/br-cookiebar-header.js +1 -1
- package/dist/components/br-cookiebar-link.js +1 -1
- package/dist/components/br-cookiebar-note-group.js +1 -1
- package/dist/components/br-cookiebar-note.js +1 -1
- package/dist/components/br-cookiebar.js +1 -1
- package/dist/components/br-crumb.js +1 -1
- package/dist/components/br-date-picker.js +1 -1
- package/dist/components/br-datetime-input.js +1 -1
- package/dist/components/br-datetime-picker.js +1 -1
- package/dist/components/br-divider.js +1 -1
- package/dist/components/br-dropdown.js +1 -1
- package/dist/components/br-footer-category.js +1 -1
- package/dist/components/br-footer-item.js +1 -1
- package/dist/components/br-footer-legal.js +1 -1
- package/dist/components/br-footer-logo.js +1 -1
- package/dist/components/br-footer-social.js +1 -1
- package/dist/components/br-footer.js +1 -1
- package/dist/components/br-header-function.js +1 -1
- package/dist/components/br-header-link.js +1 -1
- package/dist/components/br-header-list.js +1 -1
- package/dist/components/br-header-logo.js +1 -1
- package/dist/components/br-header.js +1 -1
- package/dist/components/br-icon.js +1 -1
- package/dist/components/br-input.js +1 -1
- package/dist/components/br-item.js +1 -1
- package/dist/components/br-link.js +1 -1
- package/dist/components/br-list.js +1 -1
- package/dist/components/br-loading.js +1 -1
- package/dist/components/br-magic-button.js +1 -1
- package/dist/components/br-menu-group.js +1 -1
- package/dist/components/br-menu-header.js +1 -1
- package/dist/components/br-menu-info.js +1 -1
- package/dist/components/br-menu-item.js +1 -1
- package/dist/components/br-menu-link.js +1 -1
- package/dist/components/br-menu-list.js +1 -1
- package/dist/components/br-menu-logo.js +1 -1
- package/dist/components/br-menu-social.js +1 -1
- package/dist/components/br-menu.js +1 -1
- package/dist/components/br-message.js +1 -1
- package/dist/components/br-modal.js +1 -1
- package/dist/components/br-notification-body.js +1 -1
- package/dist/components/br-notification-header.js +1 -1
- package/dist/components/br-notification-item.js +1 -1
- package/dist/components/br-notification.js +1 -1
- package/dist/components/br-pagination.js +1 -1
- package/dist/components/br-radio-group.js +1 -1
- package/dist/components/br-radio.js +1 -1
- package/dist/components/br-scrim.js +1 -1
- package/dist/components/br-select-input.js +1 -1
- package/dist/components/br-select-list.js +1 -1
- package/dist/components/br-select-option.js +1 -1
- package/dist/components/br-select.js +1 -1
- package/dist/components/br-sign-in.js +1 -1
- package/dist/components/br-skip-link-item.js +1 -1
- package/dist/components/br-skip-link.js +1 -1
- package/dist/components/br-skiplink-item.js +1 -1
- package/dist/components/br-slider.js +1 -1
- package/dist/components/br-step-item.js +1 -1
- package/dist/components/br-step.js +1 -1
- package/dist/components/br-switch.js +1 -1
- package/dist/components/br-tab-item.js +1 -1
- package/dist/components/br-tab.js +1 -1
- package/dist/components/br-table-action.d.ts +11 -0
- package/dist/components/br-table-action.js +5 -0
- package/dist/components/br-table-bar.d.ts +11 -0
- package/dist/components/br-table-bar.js +5 -0
- package/dist/components/br-table-body.js +1 -1
- package/dist/components/br-table-cell.js +1 -1
- package/dist/components/br-table-footer.d.ts +11 -0
- package/dist/components/br-table-footer.js +5 -0
- 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.d.ts +6 -0
- package/dist/components/index.js +1 -1
- package/dist/components/p-082jxuTj.js +5 -0
- package/dist/components/p-381n6AwK.js +5 -0
- package/dist/components/p-B5_zbRAr.js +5 -0
- package/dist/components/p-BE1gDPwC.js +5 -0
- package/dist/components/p-BV-c2pxt.js +5 -0
- package/dist/components/p-BfFbYAuJ.js +5 -0
- package/dist/components/{p-ta-24T1Z.js → p-Bi2E_w9Q.js} +1 -1
- package/dist/components/p-Bk8YcMql.js +5 -0
- package/dist/components/p-C3ISxUGw.js +5 -0
- package/dist/components/p-C3J0TVQO.js +5 -0
- package/dist/components/p-C6m13lCc.js +5 -0
- package/dist/components/{p-DBmwzG9E.js → p-CCWJ-H33.js} +1 -1
- package/dist/components/p-CJuHirYK.js +5 -0
- package/dist/components/{p-PV731d8s.js → p-CKS7ggLM.js} +1 -1
- package/dist/components/p-COSFBwu9.js +5 -0
- package/dist/components/{p-DsO4F0Cz.js → p-CVz_akHx.js} +1 -1
- package/dist/components/p-CWPrXYam.js +5 -0
- package/dist/components/p-C_DC6oQW.js +16 -0
- package/dist/components/p-Ca89D_0s.js +5 -0
- package/dist/components/p-CbN58CFi.js +5 -0
- package/dist/components/p-CjjxTkKb.js +5 -0
- package/dist/components/p-Ck9t4WSb.js +5 -0
- package/dist/components/p-CvfVwD6_.js +5 -0
- package/dist/components/p-D-1sfjhG.js +5 -0
- package/dist/components/p-D-p4vLlP.js +5 -0
- package/dist/components/p-D6DArHGH.js +5 -0
- package/dist/components/p-DD3BItoS.js +5 -0
- package/dist/components/{p-jOb1hCPi.js → p-DEIKwFIf.js} +1 -1
- package/dist/components/p-DHHAIESt.js +5 -0
- package/dist/components/{p-Jk_KQE5V.js → p-DMj5iO7_.js} +1 -1
- package/dist/components/p-DUI-S07G.js +5 -0
- package/dist/components/p-D_K9JH6J.js +5 -0
- package/dist/components/p-DiQp2Lap.js +5 -0
- package/dist/components/{p-rMnkh3Cy.js → p-Dn36Mj2E.js} +1 -1
- package/dist/components/{p-D-3G3Ioq.js → p-Dvbqhybt.js} +1 -1
- package/dist/components/p-Dy7MSvt-.js +5 -0
- package/dist/components/p-DywTXNHQ.js +5 -0
- package/dist/components/p-Ft_P7Roz.js +5 -0
- package/dist/components/{p-CbgKdASU.js → p-JkJjzmGm.js} +1 -1
- package/dist/components/p-KuiFoKDl.js +5 -0
- package/dist/components/p-MiiczSWA.js +5 -0
- package/dist/components/p-Um3K2SHu.js +5 -0
- package/dist/components/p-YxddSP6q.js +5 -0
- package/dist/components/p-Zk91ebVT.js +5 -0
- package/dist/components/p-jv2oG0vH.js +5 -0
- package/dist/components/p-nrG_Gd0c.js +5 -0
- package/dist/components/p-syLEZrcg.js +5 -0
- package/dist/components/p-ydfWTgrA.js +5 -0
- package/dist/esm/br-avatar.entry.js +5 -5
- package/dist/esm/br-breadcrumb-item.entry.js +2 -2
- package/dist/esm/br-breadcrumb.entry.js +12 -12
- package/dist/esm/br-button_2.entry.js +7 -7
- package/dist/esm/br-card.entry.js +4 -4
- package/dist/esm/br-carousel-page.entry.js +3 -3
- package/dist/esm/br-carousel.entry.js +6 -6
- package/dist/esm/br-checkbox-group.entry.js +5 -5
- package/dist/esm/br-checkbox.entry.js +6 -6
- package/dist/esm/br-checkgroup.entry.js +2 -2
- package/dist/esm/br-collapse_2.entry.js +11 -11
- package/dist/esm/br-cookiebar-cookie.entry.js +3 -3
- package/dist/esm/br-cookiebar-group.entry.js +4 -4
- package/dist/esm/br-cookiebar-header.entry.js +3 -3
- package/dist/esm/br-cookiebar-link.entry.js +4 -4
- package/dist/esm/br-cookiebar-note-group.entry.js +3 -3
- package/dist/esm/br-cookiebar-note.entry.js +3 -3
- package/dist/esm/br-cookiebar.entry.js +6 -6
- package/dist/esm/br-crumb.entry.js +2 -2
- package/dist/esm/br-date-picker_3.entry.js +165 -78
- package/dist/esm/br-datetime-picker.entry.js +10 -27
- package/dist/esm/br-divider.entry.js +5 -5
- package/dist/esm/br-dropdown.entry.js +675 -0
- package/dist/esm/br-footer-category.entry.js +4 -4
- package/dist/esm/br-footer-item.entry.js +4 -4
- package/dist/esm/br-footer-legal.entry.js +3 -3
- package/dist/esm/br-footer-logo.entry.js +4 -4
- package/dist/esm/br-footer-social.entry.js +4 -4
- package/dist/esm/br-footer.entry.js +6 -6
- package/dist/esm/br-header-function.entry.js +4 -4
- package/dist/esm/br-header-link.entry.js +4 -4
- package/dist/esm/br-header-list.entry.js +4 -4
- package/dist/esm/br-header-logo.entry.js +4 -4
- package/dist/esm/br-header.entry.js +7 -7
- package/dist/esm/br-icon.entry.js +174 -160
- package/dist/esm/br-input_2.entry.js +1424 -0
- package/dist/esm/br-item.entry.js +5 -5
- package/dist/esm/br-link.entry.js +10 -10
- package/dist/esm/br-magic-button.entry.js +12 -13
- package/dist/esm/br-menu-group.entry.js +3 -3
- package/dist/esm/br-menu-header.entry.js +3 -3
- package/dist/esm/br-menu-info.entry.js +3 -3
- package/dist/esm/br-menu-item.entry.js +4 -4
- package/dist/esm/br-menu-link.entry.js +4 -4
- package/dist/esm/br-menu-list.entry.js +2 -2
- package/dist/esm/br-menu-logo.entry.js +3 -3
- package/dist/esm/br-menu-social.entry.js +3 -3
- package/dist/esm/br-menu.entry.js +6 -6
- package/dist/esm/br-modal.entry.js +3 -3
- package/dist/esm/br-notification-body.entry.js +3 -3
- package/dist/esm/br-notification-header.entry.js +3 -3
- package/dist/esm/br-notification-item.entry.js +4 -4
- package/dist/esm/br-notification.entry.js +5 -5
- package/dist/esm/br-pagination_2.entry.js +2575 -0
- package/dist/esm/br-radio-group.entry.js +6 -6
- package/dist/esm/br-radio.entry.js +6 -6
- package/dist/esm/br-scrim.entry.js +5 -5
- package/dist/esm/br-select-input_3.entry.js +50 -104
- package/dist/esm/br-sign-in.entry.js +5 -5
- package/dist/esm/br-skip-link-item.entry.js +2 -2
- package/dist/esm/br-skip-link.entry.js +4 -4
- package/dist/esm/br-skiplink-item.entry.js +4 -4
- package/dist/esm/br-slider.entry.js +5 -5
- package/dist/esm/br-step_2.entry.js +8 -8
- package/dist/esm/br-switch.entry.js +6 -6
- package/dist/esm/br-tab-item.entry.js +4 -4
- package/dist/esm/br-tab.entry.js +9 -9
- package/dist/esm/br-table-action_6.entry.js +1493 -0
- package/dist/esm/br-table-body.entry.js +4 -16
- package/dist/esm/br-table-header.entry.js +4 -16
- package/dist/esm/br-table.entry.js +2591 -408
- package/dist/esm/br-tag.entry.js +6 -6
- package/dist/esm/br-textarea.entry.js +5 -5
- package/dist/esm/br-tooltip.entry.js +6 -30
- package/dist/esm/br-upload.entry.js +6 -6
- package/dist/esm/br-wizard-panel.entry.js +3 -3
- package/dist/esm/br-wizard.entry.js +4 -4
- package/dist/esm/{datetime-picker-constants-DDc4sADe.js → datetime-picker-constants-1l4_-FEJ.js} +1 -1
- package/dist/esm/helpers-BNW9pAhl.js +26 -0
- package/dist/esm/{icon.utils-zlORkiHQ.js → icon.utils-CXDYKUBz.js} +1 -1
- package/dist/esm/{iconify-icon-D3usVJE2.js → iconify-icon-C_DC6oQW.js} +103 -57
- package/dist/esm/{index-CytVKoHT.js → index-BQRBKuY0.js} +64 -17
- package/dist/esm/{index-ConyRdJe.js → index-CwL52661.js} +34 -35
- package/dist/esm/index.js +2 -2
- package/dist/esm/{isValid-Bee0Uvqc.js → isValid-wU7S6MI2.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{props-D07GjR4_.js → props-BbxNgEcJ.js} +1 -1
- package/dist/esm/{slot-BIG-yees.js → slot-Bt01zQ7-.js} +1 -1
- package/dist/esm/table.utils-CtVdlcgI.js +706 -0
- package/dist/esm/webcomponents.js +3 -3
- package/dist/hydrate/index.js +6573 -3030
- package/dist/hydrate/index.mjs +6573 -3030
- package/dist/types/components/avatar/avatar.d.ts +20 -20
- package/dist/types/components/breadcrumb/breadcrumb-item/breadcrumb-item.d.ts +3 -11
- package/dist/types/components/breadcrumb/breadcrumb.d.ts +30 -25
- package/dist/types/components/breadcrumb/crumb/crumb.d.ts +1 -12
- package/dist/types/components/button/button.d.ts +20 -20
- package/dist/types/components/card/card.d.ts +19 -21
- package/dist/types/components/carousel/carousel-page/carousel-page.d.ts +2 -12
- package/dist/types/components/carousel/carousel.d.ts +22 -29
- package/dist/types/components/checkbox/checkbox.d.ts +16 -22
- package/dist/types/components/checkbox-group/checkbox-group.d.ts +17 -18
- package/dist/types/components/checkgroup/checkgroup.d.ts +1 -13
- package/dist/types/components/collapse/collapse.d.ts +26 -22
- package/dist/types/components/cookiebar/cookiebar-cookie/cookiebar-cookie.d.ts +2 -15
- package/dist/types/components/cookiebar/cookiebar-group/cookiebar-group.d.ts +2 -15
- package/dist/types/components/cookiebar/cookiebar-header/cookiebar-header.d.ts +2 -15
- package/dist/types/components/cookiebar/cookiebar-link/cookiebar-link.d.ts +2 -14
- package/dist/types/components/cookiebar/cookiebar-note/cookiebar-note.d.ts +2 -13
- package/dist/types/components/cookiebar/cookiebar-note-group/cookiebar-note-group.d.ts +2 -13
- package/dist/types/components/cookiebar/cookiebar.d.ts +30 -25
- package/dist/types/components/datetime-picker/date-picker/date-picker-locale.d.ts +12 -4
- package/dist/types/components/datetime-picker/date-picker/date-picker.d.ts +57 -11
- package/dist/types/components/datetime-picker/datetime-input/datetime-input.d.ts +2 -12
- package/dist/types/components/datetime-picker/datetime-picker.d.ts +22 -26
- package/dist/types/components/datetime-picker/time-picker/time-picker.d.ts +3 -13
- package/dist/types/components/divider/divider.d.ts +14 -18
- package/dist/types/components/dropdown/dropdown.d.ts +21 -20
- package/dist/types/components/footer/footer-category/footer-category.d.ts +2 -15
- package/dist/types/components/footer/footer-item/footer-item.d.ts +2 -15
- package/dist/types/components/footer/footer-legal/footer-legal.d.ts +1 -15
- package/dist/types/components/footer/footer-logo/footer-logo.d.ts +2 -15
- package/dist/types/components/footer/footer-social/footer-social.d.ts +4 -17
- package/dist/types/components/footer/footer.d.ts +23 -27
- package/dist/types/components/header/header-function/header-function.d.ts +9 -13
- package/dist/types/components/header/header-link/header-link.d.ts +2 -15
- package/dist/types/components/header/header-list/header-list.d.ts +2 -15
- package/dist/types/components/header/header-logo/header-logo.d.ts +2 -15
- package/dist/types/components/header/header.d.ts +29 -26
- package/dist/types/components/icon/icon.d.ts +27 -22
- package/dist/types/components/icon/icon.utils.d.ts +1 -1
- package/dist/types/components/input/input.d.ts +46 -23
- package/dist/types/components/input/input.types.d.ts +18 -0
- package/dist/types/components/item/item.d.ts +17 -21
- package/dist/types/components/link/link.d.ts +18 -22
- package/dist/types/components/list/list.d.ts +16 -20
- package/dist/types/components/loading/loading.d.ts +16 -23
- package/dist/types/components/magic-button/magic-button.d.ts +17 -25
- package/dist/types/components/menu/menu-group/menu-group.d.ts +2 -15
- package/dist/types/components/menu/menu-header/menu-header.d.ts +2 -15
- package/dist/types/components/menu/menu-info/menu-info.d.ts +1 -14
- package/dist/types/components/menu/menu-item/menu-item.d.ts +2 -15
- package/dist/types/components/menu/menu-link/menu-link.d.ts +4 -16
- package/dist/types/components/menu/menu-list/menu-list.d.ts +2 -15
- package/dist/types/components/menu/menu-logo/menu-logo.d.ts +1 -14
- package/dist/types/components/menu/menu-social/menu-social.d.ts +4 -18
- package/dist/types/components/menu/menu.d.ts +25 -32
- package/dist/types/components/message/message.d.ts +21 -24
- package/dist/types/components/modal/modal.d.ts +18 -21
- package/dist/types/components/notification/notification-body/notification-body.d.ts +2 -12
- package/dist/types/components/notification/notification-header/notification-header.d.ts +2 -13
- package/dist/types/components/notification/notification-item/notification-item.d.ts +2 -15
- package/dist/types/components/notification/notification.d.ts +18 -27
- package/dist/types/components/pagination/pagination.d.ts +13 -21
- package/dist/types/components/radio/radio.d.ts +15 -18
- package/dist/types/components/radio-group/radio-group.d.ts +18 -18
- package/dist/types/components/scrim/scrim.d.ts +12 -15
- package/dist/types/components/select/select-input/select-input.d.ts +12 -14
- package/dist/types/components/select/select-list/select-list.d.ts +13 -12
- package/dist/types/components/select/select-option/select-option.d.ts +8 -11
- package/dist/types/components/select/select.d.ts +42 -94
- package/dist/types/components/sign-in/sign-in.d.ts +11 -15
- package/dist/types/components/skip-link/skip-link-item/skip-link-item-alias.d.ts +7 -3
- package/dist/types/components/skip-link/skip-link-item/skip-link-item.d.ts +4 -14
- package/dist/types/components/skip-link/skip-link.d.ts +17 -23
- package/dist/types/components/slider/slider.d.ts +18 -28
- package/dist/types/components/step/step-item/step-item.d.ts +2 -12
- package/dist/types/components/step/step.d.ts +15 -24
- package/dist/types/components/switch/switch.d.ts +14 -18
- package/dist/types/components/tab/tab-item/tab-item.d.ts +6 -16
- package/dist/types/components/tab/tab.d.ts +20 -27
- package/dist/types/components/table/table-action/table-action.d.ts +107 -0
- package/dist/types/components/table/table-bar/table-bar.d.ts +193 -0
- package/dist/types/components/table/table-body/table-body.d.ts +10 -25
- package/dist/types/components/table/table-cell/table-cell.d.ts +177 -46
- package/dist/types/components/table/table-footer/table-footer.d.ts +40 -0
- package/dist/types/components/table/table-footer/table-footer.types.d.ts +12 -0
- package/dist/types/components/table/table-header/table-header.d.ts +9 -25
- package/dist/types/components/table/table-header-cell/table-header-cell.d.ts +101 -62
- package/dist/types/components/table/table-row/table-row.d.ts +87 -38
- package/dist/types/components/table/table.actions-tooltip.d.ts +11 -0
- package/dist/types/components/table/{table-constants.d.ts → table.constants.d.ts} +50 -77
- package/dist/types/components/table/table.d.ts +601 -229
- package/dist/types/components/table/table.data.d.ts +78 -0
- package/dist/types/components/table/table.expansion.d.ts +65 -0
- package/dist/types/components/table/table.expansion.elements.d.ts +30 -0
- package/dist/types/components/table/table.grouping.d.ts +25 -0
- package/dist/types/components/table/table.header-height.d.ts +17 -0
- package/dist/types/components/table/table.keyboard.d.ts +53 -0
- package/dist/types/components/table/table.scroll-shadows.d.ts +11 -0
- package/dist/types/components/table/table.selection.d.ts +84 -0
- package/dist/types/components/table/table.selection.elements.d.ts +42 -0
- package/dist/types/components/table/table.tokens.d.ts +24 -0
- package/dist/types/components/table/table.types.d.ts +199 -0
- package/dist/types/components/table/table.utils.d.ts +52 -0
- package/dist/types/components/table/table.virtual-list.d.ts +96 -0
- package/dist/types/components/tag/tag.d.ts +15 -24
- package/dist/types/components/textarea/textarea.d.ts +13 -21
- package/dist/types/components/tooltip/tooltip.d.ts +12 -18
- package/dist/types/components/upload/upload.d.ts +20 -27
- package/dist/types/components/wizard/wizard-panel/wizard-panel.d.ts +2 -12
- package/dist/types/components/wizard/wizard.d.ts +21 -25
- package/dist/types/components.d.ts +4646 -5087
- package/dist/webcomponents/index.esm.js +1 -1
- package/dist/webcomponents/{p-6f1a4fbe.entry.js → p-07e80bf8.entry.js} +1 -1
- package/dist/webcomponents/p-10d81622.entry.js +5 -0
- package/dist/webcomponents/p-12d5f533.entry.js +5 -0
- package/dist/webcomponents/p-15699e8a.entry.js +5 -0
- package/dist/webcomponents/{p-7fda8b89.entry.js → p-15e2f5cc.entry.js} +1 -1
- package/dist/webcomponents/{p-198aa844.entry.js → p-16d27d5c.entry.js} +1 -1
- package/dist/webcomponents/p-18d3fab8.entry.js +5 -0
- package/dist/webcomponents/{p-DDc4sADe.js → p-1l4_-FEJ.js} +1 -1
- package/dist/webcomponents/p-23c916d9.entry.js +5 -0
- package/dist/webcomponents/p-2aee69fd.entry.js +5 -0
- package/dist/webcomponents/p-2d3db296.entry.js +5 -0
- package/dist/webcomponents/p-2ed6afdd.entry.js +5 -0
- package/dist/webcomponents/{p-42b60169.entry.js → p-30c865e6.entry.js} +1 -1
- package/dist/webcomponents/p-32afb78c.entry.js +5 -0
- package/dist/webcomponents/p-33d24cbd.entry.js +5 -0
- package/dist/webcomponents/p-35d63edd.entry.js +5 -0
- package/dist/webcomponents/p-3b1ff55e.entry.js +5 -0
- package/dist/webcomponents/p-3c7246cf.entry.js +5 -0
- package/dist/webcomponents/{p-6a293be8.entry.js → p-407e7b69.entry.js} +1 -1
- package/dist/webcomponents/p-41b12e3c.entry.js +5 -0
- package/dist/webcomponents/p-47adc17f.entry.js +5 -0
- package/dist/webcomponents/{p-18cf093a.entry.js → p-48fc8e56.entry.js} +1 -1
- package/dist/webcomponents/p-4a44c8b8.entry.js +5 -0
- package/dist/webcomponents/{p-ac68355e.entry.js → p-4b0f3701.entry.js} +1 -1
- package/dist/webcomponents/p-4b66200c.entry.js +5 -0
- package/dist/webcomponents/{p-5a7c2031.entry.js → p-4c0a1c05.entry.js} +1 -1
- package/dist/webcomponents/p-4c72d706.entry.js +5 -0
- package/dist/webcomponents/p-505173e0.entry.js +5 -0
- package/dist/webcomponents/p-50caea68.entry.js +5 -0
- package/dist/webcomponents/p-5419fd2c.entry.js +5 -0
- package/dist/webcomponents/{p-20477061.entry.js → p-5693e0e7.entry.js} +1 -1
- package/dist/webcomponents/p-58247764.entry.js +5 -0
- package/dist/webcomponents/p-5d0f4851.entry.js +5 -0
- package/dist/webcomponents/p-60c949c8.entry.js +5 -0
- package/dist/webcomponents/p-61b84035.entry.js +5 -0
- package/dist/webcomponents/p-62a74e0a.entry.js +5 -0
- package/dist/webcomponents/p-6450913e.entry.js +5 -0
- package/dist/webcomponents/p-66c8b8d9.entry.js +5 -0
- package/dist/webcomponents/{p-b55425b7.entry.js → p-67281ef1.entry.js} +1 -1
- package/dist/webcomponents/{p-0fc112fc.entry.js → p-6e128c7a.entry.js} +1 -1
- package/dist/webcomponents/p-725e92ab.entry.js +5 -0
- package/dist/webcomponents/{p-09c79c1d.entry.js → p-74726f20.entry.js} +1 -1
- package/dist/webcomponents/p-75bd655b.entry.js +5 -0
- package/dist/webcomponents/p-7bf78e48.entry.js +5 -0
- package/dist/webcomponents/p-7cc28ecf.entry.js +5 -0
- package/dist/webcomponents/p-7ec01a99.entry.js +5 -0
- package/dist/webcomponents/{p-2c8595d3.entry.js → p-7f17dbca.entry.js} +1 -1
- package/dist/webcomponents/p-8120f3ce.entry.js +5 -0
- package/dist/webcomponents/p-8ded7870.entry.js +5 -0
- package/dist/webcomponents/p-9ab989d1.entry.js +5 -0
- package/dist/webcomponents/p-9be642ff.entry.js +5 -0
- package/dist/webcomponents/p-9d41995a.entry.js +5 -0
- package/dist/webcomponents/p-C_DC6oQW.js +16 -0
- package/dist/webcomponents/{p-EbtQZm5s.js → p-CjVabz-h.js} +1 -1
- package/dist/webcomponents/{p-fOJu6uZR.js → p-CpE_G6IZ.js} +1 -1
- package/dist/webcomponents/{p-ConyRdJe.js → p-CwL52661.js} +2 -2
- package/dist/webcomponents/p-DnwERaeQ.js +5 -0
- package/dist/webcomponents/p-Zk91ebVT.js +5 -0
- package/dist/webcomponents/p-_BMaB_68.js +5 -0
- package/dist/webcomponents/p-a150b61d.entry.js +5 -0
- package/dist/webcomponents/p-a264acf6.entry.js +5 -0
- package/dist/webcomponents/p-a5616523.entry.js +5 -0
- package/dist/webcomponents/p-ae3dfb9c.entry.js +5 -0
- package/dist/webcomponents/p-b1aeb805.entry.js +5 -0
- package/dist/webcomponents/p-b8eea3ef.entry.js +5 -0
- package/dist/webcomponents/p-c6952f8d.entry.js +5 -0
- package/dist/webcomponents/p-c743e5c5.entry.js +5 -0
- package/dist/webcomponents/p-d0c659c3.entry.js +5 -0
- package/dist/webcomponents/p-d3dec923.entry.js +5 -0
- package/dist/webcomponents/{p-31a4694a.entry.js → p-d5405bbe.entry.js} +1 -1
- package/dist/webcomponents/{p-794b701b.entry.js → p-d6d3a552.entry.js} +1 -1
- package/dist/webcomponents/p-dab66328.entry.js +5 -0
- package/dist/webcomponents/{p-8116ee93.entry.js → p-db02533d.entry.js} +1 -1
- package/dist/webcomponents/p-dda22999.entry.js +5 -0
- package/dist/webcomponents/p-e2a46f44.entry.js +5 -0
- package/dist/webcomponents/{p-67774920.entry.js → p-e3680ff8.entry.js} +1 -1
- package/dist/webcomponents/p-e5b9652d.entry.js +5 -0
- package/dist/webcomponents/{p-fb76b1e0.entry.js → p-e7f02302.entry.js} +1 -1
- package/dist/webcomponents/p-f0720e23.entry.js +5 -0
- package/dist/webcomponents/p-f244009d.entry.js +5 -0
- package/dist/webcomponents/p-f32c40ee.entry.js +5 -0
- package/dist/webcomponents/p-f697abbd.entry.js +5 -0
- package/dist/webcomponents/p-f7ed35ef.entry.js +5 -0
- package/dist/webcomponents/p-f8576e0a.entry.js +5 -0
- package/dist/webcomponents/p-fcc62731.entry.js +5 -0
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/br-dropdown_2.cjs.entry.js +0 -2299
- package/dist/cjs/br-input.cjs.entry.js +0 -715
- package/dist/cjs/br-loading.cjs.entry.js +0 -567
- package/dist/cjs/br-pagination.cjs.entry.js +0 -916
- package/dist/cjs/br-table-cell.cjs.entry.js +0 -201
- package/dist/cjs/br-table-header-cell.cjs.entry.js +0 -189
- package/dist/cjs/br-table-row.cjs.entry.js +0 -95
- package/dist/cjs/table-constants-BOPSay0B.js +0 -183
- package/dist/collection/components/table/table-tokens.js +0 -50
- package/dist/collection/components/table/table-utils.js +0 -44
- package/dist/collection/pages/components/select/remote.js +0 -33
- package/dist/collection/pages/components/select/virtualized.js +0 -13
- package/dist/components/p-5h-W9_JR.js +0 -5
- package/dist/components/p-848QkYoM.js +0 -5
- package/dist/components/p-BFHvuEnN.js +0 -5
- package/dist/components/p-BH6QYnAr.js +0 -5
- package/dist/components/p-BcW8O6h2.js +0 -5
- package/dist/components/p-BicHMcSS.js +0 -5
- package/dist/components/p-Bs7iRQTG.js +0 -5
- package/dist/components/p-Bvrw9yWR.js +0 -5
- package/dist/components/p-BzQFMh9j.js +0 -5
- package/dist/components/p-CBHd0-fF.js +0 -5
- package/dist/components/p-CCPHCJjw.js +0 -5
- package/dist/components/p-CXMwM9m4.js +0 -5
- package/dist/components/p-CeNELttN.js +0 -5
- package/dist/components/p-CjtmJTLO.js +0 -5
- package/dist/components/p-D3usVJE2.js +0 -16
- package/dist/components/p-DDu3JV_r.js +0 -5
- package/dist/components/p-DFWqyfUe.js +0 -5
- package/dist/components/p-DL6xuxGG.js +0 -5
- package/dist/components/p-DOX9Uwk1.js +0 -5
- package/dist/components/p-DUq7uT2-.js +0 -5
- package/dist/components/p-Devw08cc.js +0 -5
- package/dist/components/p-Di96UxvH.js +0 -5
- package/dist/components/p-DiLI514I.js +0 -5
- package/dist/components/p-Dp3MsSXu.js +0 -5
- package/dist/components/p-DuLHFTpa.js +0 -5
- package/dist/components/p-DusornQ0.js +0 -5
- package/dist/components/p-OQpiDEK9.js +0 -5
- package/dist/components/p-XW6Hp_Jk.js +0 -5
- package/dist/esm/br-dropdown_2.entry.js +0 -2296
- package/dist/esm/br-input.entry.js +0 -713
- package/dist/esm/br-loading.entry.js +0 -565
- package/dist/esm/br-pagination.entry.js +0 -914
- package/dist/esm/br-table-cell.entry.js +0 -199
- package/dist/esm/br-table-header-cell.entry.js +0 -187
- package/dist/esm/br-table-row.entry.js +0 -93
- package/dist/esm/table-constants-CXMwM9m4.js +0 -170
- package/dist/types/components/table/table-tokens.d.ts +0 -46
- package/dist/types/components/table/table-types.d.ts +0 -107
- package/dist/types/components/table/table-utils.d.ts +0 -47
- package/dist/webcomponents/p-01801ac1.entry.js +0 -5
- package/dist/webcomponents/p-05b459f2.entry.js +0 -5
- package/dist/webcomponents/p-08ac6f09.entry.js +0 -5
- package/dist/webcomponents/p-09817344.entry.js +0 -5
- package/dist/webcomponents/p-13babfc4.entry.js +0 -5
- package/dist/webcomponents/p-15022ab7.entry.js +0 -5
- package/dist/webcomponents/p-172d42c2.entry.js +0 -5
- package/dist/webcomponents/p-1ba60d13.entry.js +0 -5
- package/dist/webcomponents/p-1bb96641.entry.js +0 -5
- package/dist/webcomponents/p-21feda62.entry.js +0 -5
- package/dist/webcomponents/p-23a5cfd7.entry.js +0 -5
- package/dist/webcomponents/p-32ea6342.entry.js +0 -5
- package/dist/webcomponents/p-3658adcf.entry.js +0 -5
- package/dist/webcomponents/p-37914e63.entry.js +0 -5
- package/dist/webcomponents/p-3b0dd0ff.entry.js +0 -5
- package/dist/webcomponents/p-42c9c6c5.entry.js +0 -5
- package/dist/webcomponents/p-473561f2.entry.js +0 -5
- package/dist/webcomponents/p-47c490ef.entry.js +0 -5
- package/dist/webcomponents/p-4b01c60f.entry.js +0 -5
- package/dist/webcomponents/p-5a5ed7d8.entry.js +0 -5
- package/dist/webcomponents/p-609cf652.entry.js +0 -5
- package/dist/webcomponents/p-614683d9.entry.js +0 -5
- package/dist/webcomponents/p-67605757.entry.js +0 -5
- package/dist/webcomponents/p-67d62559.entry.js +0 -5
- package/dist/webcomponents/p-695dbeb0.entry.js +0 -5
- package/dist/webcomponents/p-7352d459.entry.js +0 -5
- package/dist/webcomponents/p-745213f7.entry.js +0 -5
- package/dist/webcomponents/p-7ee564a1.entry.js +0 -5
- package/dist/webcomponents/p-821341dc.entry.js +0 -5
- package/dist/webcomponents/p-8aa6f07c.entry.js +0 -5
- package/dist/webcomponents/p-8ddf3ce3.entry.js +0 -5
- package/dist/webcomponents/p-95f3c44a.entry.js +0 -5
- package/dist/webcomponents/p-96dbb585.entry.js +0 -5
- package/dist/webcomponents/p-9815ab95.entry.js +0 -5
- package/dist/webcomponents/p-9e0324a7.entry.js +0 -5
- package/dist/webcomponents/p-CJipT0in.js +0 -5
- package/dist/webcomponents/p-CXMwM9m4.js +0 -5
- package/dist/webcomponents/p-D3usVJE2.js +0 -16
- package/dist/webcomponents/p-a038be16.entry.js +0 -5
- package/dist/webcomponents/p-a32d17cb.entry.js +0 -5
- package/dist/webcomponents/p-a46f068e.entry.js +0 -5
- package/dist/webcomponents/p-a89b684d.entry.js +0 -5
- package/dist/webcomponents/p-af888d13.entry.js +0 -5
- package/dist/webcomponents/p-b0124459.entry.js +0 -5
- package/dist/webcomponents/p-b063c12f.entry.js +0 -5
- package/dist/webcomponents/p-b07bfdc5.entry.js +0 -5
- package/dist/webcomponents/p-b5d25332.entry.js +0 -5
- package/dist/webcomponents/p-b609b464.entry.js +0 -5
- package/dist/webcomponents/p-b66ab52d.entry.js +0 -5
- package/dist/webcomponents/p-b8d4ace3.entry.js +0 -5
- package/dist/webcomponents/p-c717c745.entry.js +0 -5
- package/dist/webcomponents/p-ce3d689c.entry.js +0 -5
- package/dist/webcomponents/p-d08b6266.entry.js +0 -5
- package/dist/webcomponents/p-d6165aa0.entry.js +0 -5
- package/dist/webcomponents/p-dacb7e2c.entry.js +0 -5
- package/dist/webcomponents/p-db309a11.entry.js +0 -5
- package/dist/webcomponents/p-dc23cb2e.entry.js +0 -5
- package/dist/webcomponents/p-e241caf3.entry.js +0 -5
- package/dist/webcomponents/p-e661c024.entry.js +0 -5
- package/dist/webcomponents/p-e7107869.entry.js +0 -5
- package/dist/webcomponents/p-eb94199d.entry.js +0 -5
- package/dist/webcomponents/p-f8993ae4.entry.js +0 -5
- package/dist/webcomponents/p-f99d8c9c.entry.js +0 -5
- package/dist/webcomponents/p-fdcb54a3.entry.js +0 -5
- package/dist/webcomponents/p-fed02286.entry.js +0 -5
- /package/dist/collection/components/table/{table-types.js → table-footer/table-footer.types.js} +0 -0
- /package/dist/components/{p-5z6jgH1D.js → p-BNckUhK6.js} +0 -0
- /package/dist/webcomponents/{p-BIG-yees.js → p-Bt01zQ7-.js} +0 -0
- /package/dist/webcomponents/{p-zlORkiHQ.js → p-CXDYKUBz.js} +0 -0
|
@@ -0,0 +1,1500 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Construído por SERPRO
|
|
3
|
+
* © https://serpro.gov.br/ - MIT License.
|
|
4
|
+
*/
|
|
5
|
+
'use strict';
|
|
6
|
+
|
|
7
|
+
var index = require('./index-BP8UIQro.js');
|
|
8
|
+
var table_utils = require('./table.utils-De-9_NgJ.js');
|
|
9
|
+
var breakpointObserver = require('./breakpoint-observer-P8veqXg7.js');
|
|
10
|
+
var focus = require('./focus-BhfJnFgJ.js');
|
|
11
|
+
|
|
12
|
+
const tableActionCss = () => `*,*::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}.mb-4{margin-bottom:var(--spacing-scale-3x) !important}.pt-half{padding-top:var(--spacing-scale-half) !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)}mark,.mark{background:var(--red-warm-vivid-10);color:var(--color)}*[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:inline-flex;align-items:center}:host-context(br-table-cell) .br-table-action{position:relative;display:inline-flex;align-items:center;justify-content:center;width:var(--table-row-size);height:var(--table-row-size);overflow:visible}:host-context(br-table-cell) br-button{position:absolute;inset:50% auto auto 50%;transform:translate(-50%, -50%)}:host-context(br-table-row[data-selected]) br-button::part(button),:host-context(br-table-row[data-selected]) br-button::part(button):hover,:host-context(br-table-row[data-selected]) br-button::part(button):focus,:host-context(br-table-row[data-selected]) br-button::part(button):active{color:var(--pure-0)}:host-context(br-table-row[data-selected]) br-icon::part(icon){color:var(--pure-0)}`;
|
|
13
|
+
|
|
14
|
+
const TableAction = class {
|
|
15
|
+
constructor(hostRef) {
|
|
16
|
+
index.registerInstance(this, hostRef);
|
|
17
|
+
this.brTableActionClick = index.createEvent(this, "brTableActionClick", 7);
|
|
18
|
+
this.fallbackAriaLabel = 'Ação';
|
|
19
|
+
/**
|
|
20
|
+
* Texto visível e identificação semântica da ação.
|
|
21
|
+
*
|
|
22
|
+
* @default null
|
|
23
|
+
*/
|
|
24
|
+
this.label = null;
|
|
25
|
+
/**
|
|
26
|
+
* Nome do ícone exibido pelo botão.
|
|
27
|
+
*
|
|
28
|
+
* @default null
|
|
29
|
+
*/
|
|
30
|
+
this.iconName = null;
|
|
31
|
+
/**
|
|
32
|
+
* Rótulo acessível. Quando omitido, utiliza `label`.
|
|
33
|
+
*
|
|
34
|
+
* @default null
|
|
35
|
+
*/
|
|
36
|
+
this.ariaLabel = null;
|
|
37
|
+
this.buttonDensity = table_utils.TABLE_DENSITY.MEDIUM;
|
|
38
|
+
this.buttonDisabled = false;
|
|
39
|
+
this.stateObserver = null;
|
|
40
|
+
this.syncButtonState = () => {
|
|
41
|
+
const nextDensity = this.density ?? table_utils.resolveTableDensityFromElement(this.getDensitySource());
|
|
42
|
+
if (this.buttonDensity !== nextDensity)
|
|
43
|
+
this.buttonDensity = nextDensity;
|
|
44
|
+
this.buttonDisabled = this.el.closest('br-table-row')?.hasAttribute('disabled') ?? false;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Interrompe o clique nativo e publica o evento normalizado da tabela.
|
|
48
|
+
*/
|
|
49
|
+
this.handleActionClick = (event) => {
|
|
50
|
+
if (this.buttonDisabled)
|
|
51
|
+
return;
|
|
52
|
+
event.preventDefault();
|
|
53
|
+
event.stopImmediatePropagation();
|
|
54
|
+
event.stopPropagation();
|
|
55
|
+
this.brTableActionClick.emit({
|
|
56
|
+
type: this.getActionType(),
|
|
57
|
+
label: this.label || '',
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
connectedCallback() {
|
|
62
|
+
this.syncButtonState();
|
|
63
|
+
this.observeStateSources();
|
|
64
|
+
}
|
|
65
|
+
componentWillLoad() {
|
|
66
|
+
if (!this.ariaLabel?.trim() && !this.label?.trim()) {
|
|
67
|
+
// eslint-disable-next-line no-console
|
|
68
|
+
console.warn('br-table-action: acessibilidade inválida — nem `label` nem `aria-label` foram encontrados. Aplicando rótulo acessível padrão.', this.el);
|
|
69
|
+
// eslint-disable-next-line no-console
|
|
70
|
+
console.warn(`br-table-action: aplicando rótulo acessível padrão "${this.fallbackAriaLabel}".`);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
componentDidLoad() {
|
|
74
|
+
this.syncButtonState();
|
|
75
|
+
}
|
|
76
|
+
handleDensityChange() {
|
|
77
|
+
this.syncButtonState();
|
|
78
|
+
if (this.el.isConnected)
|
|
79
|
+
this.observeStateSources();
|
|
80
|
+
}
|
|
81
|
+
disconnectedCallback() {
|
|
82
|
+
this.stateObserver?.disconnect();
|
|
83
|
+
this.stateObserver = null;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Informa se a ação pertence a uma célula de dados.
|
|
87
|
+
*/
|
|
88
|
+
isInsideTableCell() {
|
|
89
|
+
return this.el.closest('br-table-cell') !== null;
|
|
90
|
+
}
|
|
91
|
+
getDensitySource() {
|
|
92
|
+
return this.el.closest('br-table-cell, br-table-header-cell');
|
|
93
|
+
}
|
|
94
|
+
observeStateSources() {
|
|
95
|
+
this.stateObserver?.disconnect();
|
|
96
|
+
this.stateObserver = null;
|
|
97
|
+
const row = this.el.closest('br-table-row');
|
|
98
|
+
const managedDensity = this.density !== undefined || this.el.closest('br-table') !== null;
|
|
99
|
+
if (managedDensity && row === null)
|
|
100
|
+
return;
|
|
101
|
+
this.stateObserver = new MutationObserver(this.syncButtonState);
|
|
102
|
+
if (managedDensity) {
|
|
103
|
+
if (row !== null) {
|
|
104
|
+
this.stateObserver.observe(row, { attributes: true, attributeFilter: ['disabled'] });
|
|
105
|
+
}
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
const stateSources = [this.getDensitySource(), row];
|
|
109
|
+
stateSources
|
|
110
|
+
.filter((element) => element !== null)
|
|
111
|
+
.forEach((element) => {
|
|
112
|
+
this.stateObserver?.observe(element, {
|
|
113
|
+
attributes: true,
|
|
114
|
+
attributeFilter: ['style', 'class', 'density', 'disabled'],
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Resolve o contexto da ação a partir do slot e da posição na tabela.
|
|
120
|
+
*/
|
|
121
|
+
getActionType() {
|
|
122
|
+
const slotName = this.el.getAttribute('slot');
|
|
123
|
+
if (slotName === 'global-actions') {
|
|
124
|
+
return 'global';
|
|
125
|
+
}
|
|
126
|
+
if (slotName === 'contextual-actions') {
|
|
127
|
+
return 'contextual';
|
|
128
|
+
}
|
|
129
|
+
return 'row';
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Define o formato visual adequado ao contexto da ação.
|
|
133
|
+
*/
|
|
134
|
+
getButtonShape() {
|
|
135
|
+
const slotName = this.el.getAttribute('slot');
|
|
136
|
+
if (slotName === 'global-actions' || this.isInsideTableCell()) {
|
|
137
|
+
return 'circle';
|
|
138
|
+
}
|
|
139
|
+
return 'pill';
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Define a ênfase visual adequada ao contexto da ação.
|
|
143
|
+
*/
|
|
144
|
+
getButtonEmphasis() {
|
|
145
|
+
const slotName = this.el.getAttribute('slot');
|
|
146
|
+
if (slotName === 'contextual-actions') {
|
|
147
|
+
return 'primary';
|
|
148
|
+
}
|
|
149
|
+
return 'tertiary';
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Resolve o melhor texto disponível para tecnologias assistivas.
|
|
153
|
+
*/
|
|
154
|
+
getButtonAriaLabel() {
|
|
155
|
+
return this.ariaLabel?.trim() || this.label?.trim() || this.fallbackAriaLabel;
|
|
156
|
+
}
|
|
157
|
+
getTooltipLabel() {
|
|
158
|
+
return this.label?.trim() || this.ariaLabel?.trim() || this.fallbackAriaLabel;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Renderiza o botão compartilhado pelas variações circular e pill.
|
|
162
|
+
*/
|
|
163
|
+
renderActionButton(shape, slotName) {
|
|
164
|
+
return (index.h("br-button", { slot: slotName, density: this.buttonDensity, emphasis: this.getButtonEmphasis(), shape: shape, disabled: this.buttonDisabled, "prop:ariaLabel": this.getButtonAriaLabel(), onClick: this.handleActionClick }, this.iconName && index.h("br-icon", { "prop:iconName": this.iconName }), shape !== 'circle' && index.h("span", null, this.label)));
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Renderiza a ação e adiciona tooltip quando o botão é circular.
|
|
168
|
+
*/
|
|
169
|
+
render() {
|
|
170
|
+
const shape = this.getButtonShape();
|
|
171
|
+
return (index.h(index.Host, { key: 'af0b9c1f7a610cb6a79bd059ab9abc9461ce585d' }, index.h("div", { key: '9f82c3fbc30a3135f6ec9b2c520c60805c416ac6', class: "br-table-action" }, shape === 'circle' ? (index.h("br-tooltip", { hideDelay: 3000 }, this.renderActionButton(shape, 'trigger'), index.h("span", { slot: "content" }, this.getTooltipLabel()))) : (this.renderActionButton(shape)))));
|
|
172
|
+
}
|
|
173
|
+
static get delegatesFocus() { return true; }
|
|
174
|
+
get el() { return index.getElement(this); }
|
|
175
|
+
static get watchers() { return {
|
|
176
|
+
"density": [{
|
|
177
|
+
"handleDensityChange": 0
|
|
178
|
+
}]
|
|
179
|
+
}; }
|
|
180
|
+
};
|
|
181
|
+
TableAction.style = tableActionCss();
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Coordena a dica do trigger com o menu de ações das barras e células.
|
|
185
|
+
*/
|
|
186
|
+
class TableActionsTooltip {
|
|
187
|
+
constructor() {
|
|
188
|
+
this.revision = 0;
|
|
189
|
+
this.show = async () => {
|
|
190
|
+
const { dropdown, trigger, tooltip } = this;
|
|
191
|
+
if (!trigger?.isConnected || !tooltip?.isConnected || dropdown?.isOpen)
|
|
192
|
+
return;
|
|
193
|
+
const revision = ++this.revision;
|
|
194
|
+
await tooltip.setTriggerElement(trigger);
|
|
195
|
+
if (revision !== this.revision || !trigger.isConnected || !tooltip.isConnected || dropdown?.isOpen)
|
|
196
|
+
return;
|
|
197
|
+
await tooltip.showTooltip();
|
|
198
|
+
};
|
|
199
|
+
this.hide = async () => {
|
|
200
|
+
const revision = ++this.revision;
|
|
201
|
+
const tooltip = this.tooltip;
|
|
202
|
+
if (!tooltip?.isConnected)
|
|
203
|
+
return;
|
|
204
|
+
// Remove também os listeners de hover registrados por setTriggerElement.
|
|
205
|
+
await tooltip.setTriggerElement(null);
|
|
206
|
+
if (revision !== this.revision || !tooltip.isConnected)
|
|
207
|
+
return;
|
|
208
|
+
await tooltip.hideTooltip();
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
const tableBarCss = () => `*,*::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}.mb-4{margin-bottom:var(--spacing-scale-3x) !important}.pt-half{padding-top:var(--spacing-scale-half) !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)}mark,.mark{background:var(--red-warm-vivid-10);color:var(--color)}*[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}.br-table-bar{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start}.heading-bar,.contextual-bar{display:flex;align-items:center;justify-content:space-between;padding:var(--br-table-bar-padding)}.heading-bar.search-open{position:relative;z-index:1;background:var(--background)}.search-bar{display:flex;align-items:center;width:100%;gap:var(--spacing-scale-base)}.search-bar br-input{flex:1 1 auto;min-width:0;margin-bottom:0}.contextual-bar{color:var(--pure-0);background-color:var(--interactive)}.heading,.selection-count{display:inline-block;font-size:var(--font-size-scale-up-01);font-weight:var(--font-weight-semi-bold);line-height:var(--table-row-size)}.heading{color:var(--interactive)}.global-actions,.contextual-actions{display:flex;align-items:center;justify-content:flex-end;gap:var(--spacing-scale-base);flex-wrap:wrap}.actions-slot-container{display:flex;align-items:center;justify-content:flex-end;gap:var(--spacing-scale-base);flex-wrap:wrap}.actions-slot-container slot::slotted(br-table-action){display:inline-flex}.actions-slot-container.is-hidden{display:none}.global-actions br-dropdown::part(target),.contextual-actions br-dropdown::part(target),.global-actions br-dropdown>br-list[slot=target],.contextual-actions br-dropdown>br-list[slot=target]{background-color:var(--background)}.selection-count{font-size:var(--font-size-scale-base)}`;
|
|
214
|
+
|
|
215
|
+
const TableBar = class {
|
|
216
|
+
constructor(hostRef) {
|
|
217
|
+
index.registerInstance(this, hostRef);
|
|
218
|
+
this.brTableSearch = index.createEvent(this, "brTableSearch", 7);
|
|
219
|
+
/**
|
|
220
|
+
* Título apresentado na barra principal.
|
|
221
|
+
*
|
|
222
|
+
* @default ''
|
|
223
|
+
*/
|
|
224
|
+
this.heading = '';
|
|
225
|
+
/**
|
|
226
|
+
* Limite usado para decidir quando agrupar ações em um menu. Quando o
|
|
227
|
+
* número de ações excede esse valor, as ações são agrupadas no dropdown
|
|
228
|
+
* (atualmente todas são movidas para o menu colapsado).
|
|
229
|
+
*
|
|
230
|
+
* @default 4
|
|
231
|
+
*/
|
|
232
|
+
this.headingActionsLimit = 4;
|
|
233
|
+
/**
|
|
234
|
+
* Limite usado para decidir quando agrupar ações contextuais em um menu.
|
|
235
|
+
* Quando o número de ações excede esse valor, as ações são agrupadas no
|
|
236
|
+
* dropdown (atualmente todas são movidas para o menu colapsado).
|
|
237
|
+
*
|
|
238
|
+
* @default 4
|
|
239
|
+
*/
|
|
240
|
+
this.contextualActionsLimit = 4;
|
|
241
|
+
/**
|
|
242
|
+
* Força a apresentação da barra contextual mesmo sem seleção.
|
|
243
|
+
*
|
|
244
|
+
* @default false
|
|
245
|
+
*/
|
|
246
|
+
this.showContextualBar = false;
|
|
247
|
+
/**
|
|
248
|
+
* Número de linhas atualmente selecionadas.
|
|
249
|
+
*
|
|
250
|
+
* @default 0
|
|
251
|
+
*/
|
|
252
|
+
this.selectedRowsCount = 0;
|
|
253
|
+
/**
|
|
254
|
+
* Indica se o slot de ações globais possui conteúdo.
|
|
255
|
+
*
|
|
256
|
+
* @default false
|
|
257
|
+
*/
|
|
258
|
+
this.hasGlobalActionsContent = false;
|
|
259
|
+
/**
|
|
260
|
+
* Indica se o slot de ações contextuais possui conteúdo.
|
|
261
|
+
*
|
|
262
|
+
* @default false
|
|
263
|
+
*/
|
|
264
|
+
this.hasContextualActionsContent = false;
|
|
265
|
+
/**
|
|
266
|
+
* Disponibiliza a interface de busca controlada pela aplicação.
|
|
267
|
+
*
|
|
268
|
+
* @default false
|
|
269
|
+
*/
|
|
270
|
+
this.hasSearch = false;
|
|
271
|
+
this.globalActions = [];
|
|
272
|
+
this.contextualActions = [];
|
|
273
|
+
this.currentBreakpoint = null;
|
|
274
|
+
this.searchOpen = false;
|
|
275
|
+
this.searchTerm = '';
|
|
276
|
+
this.effectiveDensity = table_utils.TABLE_DENSITY.MEDIUM;
|
|
277
|
+
/** @internal Texto recebido por atributo interno do `br-table`. */
|
|
278
|
+
this.headingActionsTooltipLabel = 'Mais ações';
|
|
279
|
+
/** @internal Texto recebido por atributo interno do `br-table`. */
|
|
280
|
+
this.contextualActionsTooltipLabel = 'Mais ações';
|
|
281
|
+
this.breakpointObserver = null;
|
|
282
|
+
this.globalActionsSlotRef = null;
|
|
283
|
+
this.contextualActionsSlotRef = null;
|
|
284
|
+
this.searchButtonRef = null;
|
|
285
|
+
this.shouldRestoreSearchFocus = false;
|
|
286
|
+
this.actionsTooltips = {
|
|
287
|
+
global: new TableActionsTooltip(),
|
|
288
|
+
contextual: new TableActionsTooltip(),
|
|
289
|
+
};
|
|
290
|
+
this.densityObserver = null;
|
|
291
|
+
this.internalTooltipLabelsObserver = null;
|
|
292
|
+
/**
|
|
293
|
+
* Mantém o breakpoint atual disponível para as decisões de renderização.
|
|
294
|
+
*/
|
|
295
|
+
this.handleBreakpointChange = (breakpoint) => {
|
|
296
|
+
this.currentBreakpoint = breakpoint;
|
|
297
|
+
};
|
|
298
|
+
/**
|
|
299
|
+
* Atualiza a lista de ações globais após mudanças no slot.
|
|
300
|
+
*/
|
|
301
|
+
this.handleGlobalActionsSlotChange = () => {
|
|
302
|
+
this.syncGlobalActions();
|
|
303
|
+
};
|
|
304
|
+
/**
|
|
305
|
+
* Atualiza a lista de ações contextuais após mudanças no slot.
|
|
306
|
+
*/
|
|
307
|
+
this.handleContextualActionsSlotChange = () => {
|
|
308
|
+
this.syncContextualActions();
|
|
309
|
+
};
|
|
310
|
+
this.syncEffectiveDensity = () => {
|
|
311
|
+
const nextDensity = this.density ?? table_utils.resolveTableDensityFromElement(this.el);
|
|
312
|
+
if (this.effectiveDensity !== nextDensity) {
|
|
313
|
+
this.effectiveDensity = nextDensity;
|
|
314
|
+
}
|
|
315
|
+
this.applyDensityToAssignedActions(nextDensity);
|
|
316
|
+
};
|
|
317
|
+
/** Sincroniza as labels internas recebidas do `br-table`. */
|
|
318
|
+
this.syncInternalTooltipLabels = () => {
|
|
319
|
+
this.headingActionsTooltipLabel =
|
|
320
|
+
this.el.getAttribute('data-br-table-heading-actions-tooltip-label')?.trim() || 'Mais ações';
|
|
321
|
+
this.contextualActionsTooltipLabel =
|
|
322
|
+
this.el.getAttribute('data-br-table-contextual-actions-tooltip-label')?.trim() || 'Mais ações';
|
|
323
|
+
};
|
|
324
|
+
this.openSearch = () => {
|
|
325
|
+
this.searchOpen = true;
|
|
326
|
+
};
|
|
327
|
+
this.closeSearch = () => {
|
|
328
|
+
this.shouldRestoreSearchFocus = true;
|
|
329
|
+
this.searchOpen = false;
|
|
330
|
+
this.searchTerm = '';
|
|
331
|
+
this.brTableSearch.emit({ term: '' });
|
|
332
|
+
};
|
|
333
|
+
this.handleSearchInput = (event) => {
|
|
334
|
+
const input = event.target;
|
|
335
|
+
this.searchTerm = input.value ?? '';
|
|
336
|
+
};
|
|
337
|
+
this.submitSearch = (event) => {
|
|
338
|
+
event.preventDefault();
|
|
339
|
+
this.brTableSearch.emit({ term: this.searchTerm });
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* Inicia a observação responsiva sempre que a barra entra no documento.
|
|
344
|
+
*/
|
|
345
|
+
connectedCallback() {
|
|
346
|
+
this.syncInternalTooltipLabels();
|
|
347
|
+
this.observeInternalTooltipLabels();
|
|
348
|
+
if (this.breakpointObserver !== null) {
|
|
349
|
+
return;
|
|
350
|
+
}
|
|
351
|
+
this.breakpointObserver = new breakpointObserver.BreakpointObserver();
|
|
352
|
+
this.breakpointObserver.subscribe(this.handleBreakpointChange);
|
|
353
|
+
this.observeDensitySource();
|
|
354
|
+
this.syncEffectiveDensity();
|
|
355
|
+
}
|
|
356
|
+
/**
|
|
357
|
+
* Lê as ações atribuídas aos slots após a montagem.
|
|
358
|
+
*/
|
|
359
|
+
componentDidLoad() {
|
|
360
|
+
this.syncEffectiveDensity();
|
|
361
|
+
this.syncActionsFromSlots();
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* Interrompe a observação responsiva quando a barra é removida.
|
|
365
|
+
*/
|
|
366
|
+
disconnectedCallback() {
|
|
367
|
+
this.breakpointObserver?.unsubscribe(this.handleBreakpointChange);
|
|
368
|
+
this.breakpointObserver?.destroy();
|
|
369
|
+
this.breakpointObserver = null;
|
|
370
|
+
this.densityObserver?.disconnect();
|
|
371
|
+
this.densityObserver = null;
|
|
372
|
+
this.internalTooltipLabelsObserver?.disconnect();
|
|
373
|
+
this.internalTooltipLabelsObserver = null;
|
|
374
|
+
void this.actionsTooltips.global.hide();
|
|
375
|
+
void this.actionsTooltips.contextual.hide();
|
|
376
|
+
}
|
|
377
|
+
handleDensityChange() {
|
|
378
|
+
this.syncEffectiveDensity();
|
|
379
|
+
if (this.el.isConnected)
|
|
380
|
+
this.observeDensitySource();
|
|
381
|
+
}
|
|
382
|
+
/** Observa alterações nas labels encaminhadas pelo `br-table`. */
|
|
383
|
+
observeInternalTooltipLabels() {
|
|
384
|
+
this.internalTooltipLabelsObserver?.disconnect();
|
|
385
|
+
this.internalTooltipLabelsObserver = new MutationObserver(this.syncInternalTooltipLabels);
|
|
386
|
+
this.internalTooltipLabelsObserver.observe(this.el, {
|
|
387
|
+
attributes: true,
|
|
388
|
+
attributeFilter: [
|
|
389
|
+
'data-br-table-heading-actions-tooltip-label',
|
|
390
|
+
'data-br-table-contextual-actions-tooltip-label',
|
|
391
|
+
],
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
getControlDensity() {
|
|
395
|
+
return this.density ?? this.effectiveDensity;
|
|
396
|
+
}
|
|
397
|
+
observeDensitySource() {
|
|
398
|
+
this.densityObserver?.disconnect();
|
|
399
|
+
this.densityObserver = null;
|
|
400
|
+
if (this.density !== undefined)
|
|
401
|
+
return;
|
|
402
|
+
this.densityObserver = new MutationObserver(this.syncEffectiveDensity);
|
|
403
|
+
this.densityObserver.observe(this.el, { attributes: true, attributeFilter: ['style', 'class', 'density'] });
|
|
404
|
+
}
|
|
405
|
+
applyDensityToAssignedActions(density = this.effectiveDensity) {
|
|
406
|
+
[this.globalActionsSlotRef, this.contextualActionsSlotRef].forEach((slotRef) => {
|
|
407
|
+
slotRef
|
|
408
|
+
?.assignedElements({ flatten: true })
|
|
409
|
+
.filter((element) => element.tagName.toLowerCase() === 'br-table-action')
|
|
410
|
+
.forEach((actionElement) => {
|
|
411
|
+
if (actionElement.getAttribute('density') !== density)
|
|
412
|
+
actionElement.setAttribute('density', density);
|
|
413
|
+
});
|
|
414
|
+
});
|
|
415
|
+
}
|
|
416
|
+
/**
|
|
417
|
+
* Sincroniza simultaneamente os dois grupos de ações.
|
|
418
|
+
*/
|
|
419
|
+
syncActionsFromSlots() {
|
|
420
|
+
this.syncGlobalActions();
|
|
421
|
+
this.syncContextualActions();
|
|
422
|
+
}
|
|
423
|
+
/**
|
|
424
|
+
* Extrai as ações globais atualmente atribuídas.
|
|
425
|
+
*/
|
|
426
|
+
syncGlobalActions() {
|
|
427
|
+
this.globalActions = this.getActionsFromSlot(this.globalActionsSlotRef);
|
|
428
|
+
}
|
|
429
|
+
/**
|
|
430
|
+
* Extrai as ações contextuais atualmente atribuídas.
|
|
431
|
+
*/
|
|
432
|
+
syncContextualActions() {
|
|
433
|
+
this.contextualActions = this.getActionsFromSlot(this.contextualActionsSlotRef);
|
|
434
|
+
}
|
|
435
|
+
/**
|
|
436
|
+
* Converte os elementos atribuídos ao slot em entradas normalizadas.
|
|
437
|
+
*/
|
|
438
|
+
getActionsFromSlot(slotRef) {
|
|
439
|
+
if (slotRef === null) {
|
|
440
|
+
return [];
|
|
441
|
+
}
|
|
442
|
+
const assignedElements = slotRef.assignedElements({ flatten: true });
|
|
443
|
+
const density = this.getControlDensity();
|
|
444
|
+
return assignedElements
|
|
445
|
+
.filter((element) => element.tagName.toLowerCase() === 'br-table-action')
|
|
446
|
+
.map((actionElement, index) => {
|
|
447
|
+
if (actionElement.getAttribute('density') !== density)
|
|
448
|
+
actionElement.setAttribute('density', density);
|
|
449
|
+
return {
|
|
450
|
+
actionElement,
|
|
451
|
+
label: this.getActionLabel(actionElement, index),
|
|
452
|
+
};
|
|
453
|
+
});
|
|
454
|
+
}
|
|
455
|
+
/**
|
|
456
|
+
* Obtém um rótulo utilizável, com fallback baseado na posição.
|
|
457
|
+
*/
|
|
458
|
+
getActionLabel(actionElement, index) {
|
|
459
|
+
const label = actionElement.getAttribute('label')?.trim() || actionElement.getAttribute('aria-label')?.trim();
|
|
460
|
+
if (label !== undefined && label.length > 0) {
|
|
461
|
+
return label;
|
|
462
|
+
}
|
|
463
|
+
return `Ação ${index + 1}`;
|
|
464
|
+
}
|
|
465
|
+
/**
|
|
466
|
+
* Sanitiza o limite informado para garantir um inteiro positivo.
|
|
467
|
+
*/
|
|
468
|
+
getNormalizedActionsLimit(limit) {
|
|
469
|
+
if (!Number.isFinite(limit)) {
|
|
470
|
+
return 4;
|
|
471
|
+
}
|
|
472
|
+
return Math.max(1, Math.floor(limit));
|
|
473
|
+
}
|
|
474
|
+
/**
|
|
475
|
+
* Informa se as ações precisam ser agrupadas em um menu.
|
|
476
|
+
*/
|
|
477
|
+
shouldCollapseActions(actions, limit) {
|
|
478
|
+
if (actions.length === 0) {
|
|
479
|
+
return false;
|
|
480
|
+
}
|
|
481
|
+
if (this.currentBreakpoint === breakpointObserver.BREAKPOINTS.X_SMALL) {
|
|
482
|
+
return true;
|
|
483
|
+
}
|
|
484
|
+
return actions.length > this.getNormalizedActionsLimit(limit);
|
|
485
|
+
}
|
|
486
|
+
/**
|
|
487
|
+
* Cria o detalhe emitido por uma ação selecionada no menu.
|
|
488
|
+
*/
|
|
489
|
+
getCollapsedActionDetail(label, context) {
|
|
490
|
+
return {
|
|
491
|
+
type: context,
|
|
492
|
+
label,
|
|
493
|
+
};
|
|
494
|
+
}
|
|
495
|
+
/**
|
|
496
|
+
* Publica o clique de uma ação que foi agrupada no menu.
|
|
497
|
+
*/
|
|
498
|
+
handleCollapsedActionClick(event, label, context) {
|
|
499
|
+
event.preventDefault();
|
|
500
|
+
event.stopPropagation();
|
|
501
|
+
this.el.dispatchEvent(new CustomEvent('brTableActionClick', {
|
|
502
|
+
bubbles: true,
|
|
503
|
+
composed: true,
|
|
504
|
+
detail: this.getCollapsedActionDetail(label, context),
|
|
505
|
+
}));
|
|
506
|
+
}
|
|
507
|
+
/**
|
|
508
|
+
* Formata a contagem de seleção com singular ou plural.
|
|
509
|
+
*/
|
|
510
|
+
getSelectionCountLabel() {
|
|
511
|
+
const normalizedCount = Math.max(0, this.selectedRowsCount);
|
|
512
|
+
const lineLabel = normalizedCount === 1 ? 'linha selecionada' : 'linhas selecionadas';
|
|
513
|
+
return `${normalizedCount} ${lineLabel}`;
|
|
514
|
+
}
|
|
515
|
+
/**
|
|
516
|
+
* Informa se a barra de título possui conteúdo relevante.
|
|
517
|
+
*/
|
|
518
|
+
shouldRenderHeadingBar() {
|
|
519
|
+
return this.hasSearch || this.heading.trim().length > 0 || this.hasGlobalActionsContent;
|
|
520
|
+
}
|
|
521
|
+
handleHasSearchChange() {
|
|
522
|
+
if (this.hasSearch)
|
|
523
|
+
return;
|
|
524
|
+
this.searchOpen = false;
|
|
525
|
+
this.searchTerm = '';
|
|
526
|
+
}
|
|
527
|
+
componentDidRender() {
|
|
528
|
+
if (!this.shouldRestoreSearchFocus)
|
|
529
|
+
return;
|
|
530
|
+
this.shouldRestoreSearchFocus = false;
|
|
531
|
+
focus.restoreFocus(this.searchButtonRef);
|
|
532
|
+
}
|
|
533
|
+
/**
|
|
534
|
+
* Informa se a barra contextual deve ser exibida.
|
|
535
|
+
*/
|
|
536
|
+
shouldRenderContextualBar() {
|
|
537
|
+
return this.showContextualBar || this.selectedRowsCount > 0;
|
|
538
|
+
}
|
|
539
|
+
/**
|
|
540
|
+
* Renderiza o menu que contém ações excedentes.
|
|
541
|
+
*/
|
|
542
|
+
renderActionsDropdown(actions, context, emphasis) {
|
|
543
|
+
const contextLabel = context === 'global' ? 'globais' : 'contextuais';
|
|
544
|
+
const collapsedActionsTooltipLabel = context === 'global' ? this.headingActionsTooltipLabel : this.contextualActionsTooltipLabel;
|
|
545
|
+
const tooltip = this.actionsTooltips[context];
|
|
546
|
+
return (index.h(index.Fragment, null, index.h("br-dropdown", { placement: "bottom-end", targetZIndex: "var(--z-index-layer-3)", "prop:ariaLabel": `Mais ações ${contextLabel}`, ref: (element) => {
|
|
547
|
+
tooltip.dropdown = element;
|
|
548
|
+
}, onBrDropdownOpenChange: tooltip.hide }, index.h("br-button", { slot: "trigger", shape: "circle", density: this.getControlDensity(), emphasis: emphasis, "prop:ariaLabel": `Abrir menu de ações ${contextLabel}`, ref: (element) => {
|
|
549
|
+
tooltip.trigger = element;
|
|
550
|
+
}, onPointerEnter: tooltip.show, onPointerLeave: tooltip.hide, onFocus: tooltip.show, onBlur: tooltip.hide, onClick: tooltip.hide }, index.h("br-icon", { "attr:iconName": "fa-solid:ellipsis-v" })), index.h("br-list", { slot: "target", "list-title": "A\u00E7\u00F5es", divider: true, style: {
|
|
551
|
+
maxHeight: 'min(180px, 45vh)',
|
|
552
|
+
overflowY: 'auto',
|
|
553
|
+
overscrollBehavior: 'contain',
|
|
554
|
+
} }, actions.map((action) => (index.h("br-item", { isButton: true, type: "button", density: "small", "data-no-selection": true, onBrDidClick: (event) => this.handleCollapsedActionClick(event, action.label, context) }, action.label))))), index.h("br-tooltip", { ref: (element) => {
|
|
555
|
+
tooltip.tooltip = element;
|
|
556
|
+
}, hideDelay: 3000 }, index.h("span", { slot: "content" }, collapsedActionsTooltipLabel))));
|
|
557
|
+
}
|
|
558
|
+
/**
|
|
559
|
+
* Renderiza somente as barras necessárias ao estado atual.
|
|
560
|
+
*/
|
|
561
|
+
render() {
|
|
562
|
+
const shouldRenderHeadingBar = this.shouldRenderHeadingBar();
|
|
563
|
+
const shouldRenderContextualBar = this.shouldRenderContextualBar();
|
|
564
|
+
const shouldRenderBar = shouldRenderHeadingBar || shouldRenderContextualBar;
|
|
565
|
+
const shouldCollapseGlobalActions = this.shouldCollapseActions(this.globalActions, this.headingActionsLimit);
|
|
566
|
+
const shouldCollapseContextualActions = this.shouldCollapseActions(this.contextualActions, this.contextualActionsLimit);
|
|
567
|
+
return (index.h(index.Host, { key: '609cbb49773d966c7458c7c52e7d1d49979ae514' }, shouldRenderBar && (index.h("div", { key: '1b5b124c5fb83dd115429f3a08e7b6f51b7c3d10', class: "br-table-bar" }, shouldRenderHeadingBar && (index.h("div", { key: '8a033a24c1f87c43b9eef06b47505d6410be8bd8', class: { 'heading-bar': true, 'search-open': this.searchOpen } }, !this.searchOpen && index.h("span", { key: '1c43bb18dd0cad2a511c13862023c69134c21f2a', class: "heading" }, this.heading), !this.searchOpen && (index.h("div", { key: 'd6ded3597e55eb3f32db5791c7537a9cb602adeb', class: "global-actions" }, this.hasSearch && (index.h("br-button", { key: 'c521fbadc3a4cb876f10632eaacb9e14cae51191', shape: "circle", density: this.getControlDensity(), emphasis: "tertiary", "prop:ariaLabel": "Buscar na tabela", ref: (element) => (this.searchButtonRef = element), onClick: this.openSearch }, index.h("br-icon", { key: '4446bb81e8ec331d18ffb3b3f6991fa3af767ab1', "attr:iconName": "fa-solid:search" }))), index.h("div", { key: '839fbb2a64146120831b52866b0796de0b720003', class: { 'actions-slot-container': true, 'is-hidden': shouldCollapseGlobalActions } }, index.h("slot", { key: 'e68cf1cd7fffeb7d1c4a223cbb093e5baef449e9', name: "global-actions", ref: (element) => (this.globalActionsSlotRef = element), onSlotchange: this.handleGlobalActionsSlotChange })), shouldCollapseGlobalActions &&
|
|
568
|
+
this.renderActionsDropdown(this.globalActions, 'global', 'tertiary'))), this.searchOpen && (index.h("form", { key: '0e28c4dfb2ebecf4470761257ec951cad230966e', class: "search-bar", role: "search", "aria-label": "Buscar na tabela", onSubmit: this.submitSearch }, index.h("br-input", { key: 'da9c78b38097d4c0ea090fbf40c60d6fb72f1bd8', "prop:value": this.searchTerm, "prop:ariaLabel": "Buscar na tabela", placeholder: "Buscar", autofocus: true, onInput: this.handleSearchInput }, index.h("br-button", { key: 'efc4dd9a0ecb61980a6bfda31db1ca0d23bc5175', slot: "action", type: "submit", density: this.getControlDensity(), "prop:ariaLabel": "Buscar na tabela" }, index.h("br-icon", { key: 'efbae76e6ed305d26b9e08b31ffefe074865d667', "attr:iconName": "fa-solid:search", "aria-hidden": "true" }))), index.h("br-button", { key: '29cab47134777b502cde365cd5570b9aced14291', shape: "circle", density: this.getControlDensity(), emphasis: "tertiary", "prop:ariaLabel": "Fechar busca", onClick: this.closeSearch }, index.h("br-icon", { key: 'de06eee7dc4f16d8ff2030ad3179a22125aa7e8f', "attr:iconName": "fa-solid:times", width: "20", height: "20" })))))), shouldRenderContextualBar && (index.h("div", { key: '03f62470b61d70e40d5f7f9fec943158f3c80094', class: "contextual-bar" }, index.h("span", { key: '65dcc90afc7990e9a43ff1a1c8f315cb9c64f27f', class: "selection-count", role: "status", "aria-live": "polite", "aria-atomic": "true" }, this.getSelectionCountLabel()), index.h("div", { key: 'd88c4522216f3866df845c8a9e938bf461499658', class: "contextual-actions" }, index.h("div", { key: 'fbd6bcbea62a9ab33b22e2a2fc27e146e2664f16', class: { 'actions-slot-container': true, 'is-hidden': shouldCollapseContextualActions } }, index.h("slot", { key: '72849daf5dd9d95cc5145b51291f4ce106b6dca9', name: "contextual-actions", ref: (element) => (this.contextualActionsSlotRef = element), onSlotchange: this.handleContextualActionsSlotChange })), shouldCollapseContextualActions &&
|
|
569
|
+
this.renderActionsDropdown(this.contextualActions, 'contextual', 'primary'))))))));
|
|
570
|
+
}
|
|
571
|
+
get el() { return index.getElement(this); }
|
|
572
|
+
static get watchers() { return {
|
|
573
|
+
"density": [{
|
|
574
|
+
"handleDensityChange": 0
|
|
575
|
+
}],
|
|
576
|
+
"hasSearch": [{
|
|
577
|
+
"handleHasSearchChange": 0
|
|
578
|
+
}]
|
|
579
|
+
}; }
|
|
580
|
+
};
|
|
581
|
+
TableBar.style = tableBarCss();
|
|
582
|
+
|
|
583
|
+
const tableCellCss = () => `*,*::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}.mb-4{margin-bottom:var(--spacing-scale-3x) !important}.pt-half{padding-top:var(--spacing-scale-half) !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)}mark,.mark{background:var(--red-warm-vivid-10);color:var(--color)}*[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{--table-cell-grid-column:auto;--table-cell-grid-row:auto;display:contents}.br-table-cell{position:relative;grid-column:var(--table-cell-grid-column, auto);grid-row:var(--table-cell-grid-row, auto);min-width:0;color:var(--color-light);padding:var(--br-table-density) var(--table-row-size);border-right:calc(var(--br-table-divider-base-width, 0px)*var(--br-table-column-divider-factor, 0)) var(--br-table-divider-style, solid) var(--border-color);border-bottom:calc(var(--br-table-divider-base-width, 0px)*var(--br-table-row-divider-factor, 0)) var(--br-table-divider-style, solid) var(--border-color);background-color:var(--background-light);font-size:var(--font-size-scale-base);font-weight:var(--font-weight-medium)}:host-context(br-table-row[disabled]) .br-table-cell{opacity:var(--surface-opacity-md);box-shadow:var(--surface-shadow-none);cursor:not-allowed;pointer-events:auto}:host-context(br-table-row[disabled]) .br-table-cell-content{pointer-events:none}.br-table-cell:has(br-dropdown[is-open]){z-index:var(--z-index-layer-3, 3)}.br-table-cell:focus-visible{outline:var(--focus) var(--focus-style) var(--focus-width);outline-offset:calc(var(--focus-width)*-1)}.br-table-cell::before{position:absolute;inset:0;background-color:var(--text-color);content:"";opacity:0;pointer-events:none}:host-context(br-table-row[data-row-hover-enabled]:hover) .br-table-cell::before{opacity:var(--surface-opacity-xs)}.br-table-cell-content{position:relative;z-index:1;display:flex;align-items:var(--br-table-vertical-alignment);justify-content:flex-start;min-width:0;height:100%;text-align:left}:host-context(br-table-row[data-selected]) .br-table-cell{background-color:var(--blue-warm-vivid-50);color:var(--pure-0)}:host-context(br-table-row[data-selected]) .br-table-cell br-button::part(button),:host-context(br-table-row[data-selected]) .br-table-cell br-button::part(button):hover,:host-context(br-table-row[data-selected]) .br-table-cell br-button::part(button):focus,:host-context(br-table-row[data-selected]) .br-table-cell br-button::part(button):active{color:var(--pure-0)}:host-context(br-table-row[data-selected]) .br-table-cell br-icon::part(icon){color:var(--pure-0)}:host([data-selection-column]) .br-table-cell,:host([data-expansion-column]) .br-table-cell{padding:var(--br-table-density) var(--spacing-scale-base)}:host([data-selection-column]) .br-table-cell,:host([data-expansion-column]) .br-table-cell{display:flex;align-items:var(--br-table-vertical-alignment);justify-content:var(--br-table-horizontal-alignment)}:host([data-selection-column]) .br-table-cell-content{width:fit-content;height:auto}:host([data-expansion-column]) .br-table-cell-content{width:fit-content;height:auto}:host([data-selection-column]) .br-table-cell-truncate{display:flex;align-items:center;justify-content:inherit;width:fit-content;overflow:visible}:host([data-expansion-column]) .br-table-cell-truncate{display:flex;align-items:center;justify-content:inherit;width:fit-content}:host([data-selection-column]) ::slotted(br-checkbox){flex:0 0 auto;align-self:center}:host-context(br-table-row[disabled]) ::slotted(br-checkbox){--border-color:var(--gray-30, #adadad);--disabled:1}:host([data-expansion-column]) ::slotted(br-table-action){flex:0 0 auto;align-self:center}.br-table-cell-truncate{min-width:0;max-width:100%;overflow:var(--br-table-cell-overflow);text-overflow:var(--br-table-cell-text-overflow);white-space:var(--br-table-cell-white-space);word-break:break-all}.br-table-cell-truncate.has-table-actions{display:flex;align-items:center;justify-content:inherit;gap:var(--spacing-scale-half);overflow:visible;text-overflow:clip;white-space:normal}.br-table-cell br-dropdown:has(br-button[slot=trigger]){position:relative;display:inline-flex;align-items:center;justify-content:center;width:var(--table-row-size);height:var(--table-row-size);overflow:visible}.br-table-cell br-dropdown br-button[slot=trigger]{position:absolute;inset:50% auto auto 50%;transform:translate(-50%, -50%)}.cell-actions-slot-container{display:contents}.cell-actions-slot-container.is-hidden{display:none}.br-table-cell br-dropdown::part(target),br-list.cell-actions-dropdown-list{background-color:var(--background)}br-list.cell-actions-dropdown-list{max-height:min(170px,45vh);overflow-y:auto;overscroll-behavior:contain}:host([data-last-column]) .br-table-cell{border-right:none}:host([data-last-row]) .br-table-cell{border-bottom:none}`;
|
|
584
|
+
|
|
585
|
+
const TableCell = class {
|
|
586
|
+
constructor(hostRef) {
|
|
587
|
+
index.registerInstance(this, hostRef);
|
|
588
|
+
this.brAlignmentChange = index.createEvent(this, "brAlignmentChange", 7);
|
|
589
|
+
this.brOverflowChange = index.createEvent(this, "brOverflowChange", 7);
|
|
590
|
+
/**
|
|
591
|
+
* Quantidade de colunas ocupadas. Inteiro entre 1 e 1000; valores inválidos usam 1.
|
|
592
|
+
* @default 1
|
|
593
|
+
*/
|
|
594
|
+
this.colSpan = 1;
|
|
595
|
+
/**
|
|
596
|
+
* Quantidade de linhas ocupadas no cabeçalho ou grupo. Limitada às linhas
|
|
597
|
+
* disponíveis; aceita inteiros de 1 a 1000 e valores inválidos usam 1.
|
|
598
|
+
* @default 1
|
|
599
|
+
*/
|
|
600
|
+
this.rowSpan = 1;
|
|
601
|
+
/**
|
|
602
|
+
* Identifica um cabeçalho de linha, inclusive rótulos compartilhados por um grupo.
|
|
603
|
+
* @default false
|
|
604
|
+
*/
|
|
605
|
+
this.rowHeader = false;
|
|
606
|
+
/**
|
|
607
|
+
* Texto completo do tooltip do botão de ações agrupadas desta célula.
|
|
608
|
+
* A propriedade `moreActionsLabel` de `br-table` prevalece quando
|
|
609
|
+
* informada. Valores vazios ou compostos apenas por espaços usam "Mais ações".
|
|
610
|
+
* Não altera o nome acessível do botão nem os rótulos das ações.
|
|
611
|
+
* Aceita texto simples por atributo ou propriedade, sem reflexão.
|
|
612
|
+
*
|
|
613
|
+
* @default 'Mais ações'
|
|
614
|
+
*/
|
|
615
|
+
this.moreActionsLabel = 'Mais ações';
|
|
616
|
+
this.isTooltipVisible = false;
|
|
617
|
+
this.tooltipContent = '';
|
|
618
|
+
this.hasTableActionContent = false;
|
|
619
|
+
this.hasOnlyTableActionContent = false;
|
|
620
|
+
this.tableActions = [];
|
|
621
|
+
this.inheritedCellActionsLimit = 4;
|
|
622
|
+
this.effectiveActionDensity = table_utils.TABLE_DENSITY.MEDIUM;
|
|
623
|
+
this.tooltipRef = null;
|
|
624
|
+
this.actionsTooltip = new TableActionsTooltip();
|
|
625
|
+
this.truncateContentRef = null;
|
|
626
|
+
this.contentSlotRef = null;
|
|
627
|
+
this.tableInheritedPropsObserver = null;
|
|
628
|
+
this.densityObserver = null;
|
|
629
|
+
/**
|
|
630
|
+
* Exibe o tooltip somente quando o conteúdo está truncado.
|
|
631
|
+
*/
|
|
632
|
+
this.handleMouseEnter = async () => {
|
|
633
|
+
// Quando as ações foram agrupadas, o dropdown possui seu próprio tooltip.
|
|
634
|
+
// Evita criar um segundo tooltip ancorado no contêiner da célula.
|
|
635
|
+
if (this.shouldCollapseTableActions()) {
|
|
636
|
+
return;
|
|
637
|
+
}
|
|
638
|
+
if (this.resolveTooltipMode() !== table_utils.TABLE_TOOLTIP_MODE.ENABLED) {
|
|
639
|
+
return;
|
|
640
|
+
}
|
|
641
|
+
const truncateContent = this.truncateContentRef;
|
|
642
|
+
if (truncateContent === null) {
|
|
643
|
+
return;
|
|
644
|
+
}
|
|
645
|
+
const hasOverflow = truncateContent.scrollWidth > truncateContent.clientWidth;
|
|
646
|
+
if (!hasOverflow) {
|
|
647
|
+
return;
|
|
648
|
+
}
|
|
649
|
+
this.tooltipContent = this.getFullCellContent();
|
|
650
|
+
if (this.tooltipContent.length === 0) {
|
|
651
|
+
return;
|
|
652
|
+
}
|
|
653
|
+
this.isTooltipVisible = true;
|
|
654
|
+
await table_utils.requestAnimationFramePromise();
|
|
655
|
+
// Entre o pointerenter e o próximo frame a lista virtual pode desmontar a
|
|
656
|
+
// linha. Nunca registra um trigger que já saiu do documento.
|
|
657
|
+
if (!this.el.isConnected || !truncateContent.isConnected) {
|
|
658
|
+
await this.closeContentTooltip();
|
|
659
|
+
return;
|
|
660
|
+
}
|
|
661
|
+
if (this.tooltipRef?.isConnected) {
|
|
662
|
+
await this.tooltipRef.setTriggerElement(truncateContent);
|
|
663
|
+
await this.tooltipRef.showTooltip();
|
|
664
|
+
}
|
|
665
|
+
};
|
|
666
|
+
/**
|
|
667
|
+
* Fecha o tooltip e limpa o estado local. É reutilizado tanto no
|
|
668
|
+
* pointerleave quanto na desconexão causada pela lista virtual.
|
|
669
|
+
*/
|
|
670
|
+
this.closeContentTooltip = async () => {
|
|
671
|
+
const tooltip = this.tooltipRef;
|
|
672
|
+
if (tooltip !== null) {
|
|
673
|
+
try {
|
|
674
|
+
await tooltip.hideTooltip();
|
|
675
|
+
}
|
|
676
|
+
catch {
|
|
677
|
+
// O tooltip pode estar sendo desconectado no mesmo ciclo da linha.
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
this.tooltipRef = null;
|
|
681
|
+
this.isTooltipVisible = false;
|
|
682
|
+
};
|
|
683
|
+
/**
|
|
684
|
+
* Oculta o tooltip ao encerrar a interação com a célula.
|
|
685
|
+
*/
|
|
686
|
+
this.handleMouseLeave = async () => {
|
|
687
|
+
await this.closeContentTooltip();
|
|
688
|
+
};
|
|
689
|
+
this.syncActionDensity = () => {
|
|
690
|
+
const nextDensity = this.actionDensity ?? table_utils.resolveTableDensityFromElement(this.el);
|
|
691
|
+
if (this.effectiveActionDensity !== nextDensity)
|
|
692
|
+
this.effectiveActionDensity = nextDensity;
|
|
693
|
+
};
|
|
694
|
+
}
|
|
695
|
+
/**
|
|
696
|
+
* Retorna a altura renderizada da superfície visual desta célula, em pixels.
|
|
697
|
+
*
|
|
698
|
+
* @returns Altura da superfície da célula; zero se ela ainda não estiver renderizada.
|
|
699
|
+
*/
|
|
700
|
+
async getMeasuredHeight() {
|
|
701
|
+
const surface = this.el.shadowRoot?.querySelector('.br-table-cell');
|
|
702
|
+
return surface?.getBoundingClientRect().height ?? 0;
|
|
703
|
+
}
|
|
704
|
+
/**
|
|
705
|
+
* Ressincroniza a herança sempre que a célula entra na árvore.
|
|
706
|
+
* Isso é necessário porque a lista virtual conecta e desconecta a mesma
|
|
707
|
+
* instância diversas vezes durante o scroll.
|
|
708
|
+
*/
|
|
709
|
+
connectedCallback() {
|
|
710
|
+
this.keyboard?.connect();
|
|
711
|
+
this.syncInheritedTableProps();
|
|
712
|
+
this.observeTableInheritedProps();
|
|
713
|
+
this.syncActionDensity();
|
|
714
|
+
this.observeDensitySources();
|
|
715
|
+
}
|
|
716
|
+
/**
|
|
717
|
+
* Inicializa ações, conteúdo e propriedades herdáveis após a montagem.
|
|
718
|
+
*/
|
|
719
|
+
componentDidLoad() {
|
|
720
|
+
const surface = this.el.shadowRoot?.querySelector('[part="cell"]');
|
|
721
|
+
if (surface !== undefined && surface !== null) {
|
|
722
|
+
this.keyboard = new table_utils.TableCellKeyboard(this.el, surface);
|
|
723
|
+
this.keyboard.connect();
|
|
724
|
+
}
|
|
725
|
+
this.syncInheritedTableProps();
|
|
726
|
+
this.updateHasTableActionContent();
|
|
727
|
+
void table_utils.requestAnimationFramePromise().then(() => this.syncTableActions());
|
|
728
|
+
this.notifyAlignmentChange();
|
|
729
|
+
this.notifyOverflowChange();
|
|
730
|
+
this.syncActionDensity();
|
|
731
|
+
}
|
|
732
|
+
disconnectedCallback() {
|
|
733
|
+
this.keyboard?.disconnect();
|
|
734
|
+
this.tableInheritedPropsObserver?.disconnect();
|
|
735
|
+
this.tableInheritedPropsObserver = null;
|
|
736
|
+
this.densityObserver?.disconnect();
|
|
737
|
+
this.densityObserver = null;
|
|
738
|
+
// A virtualização pode remover a linha sem que pointerleave seja emitido.
|
|
739
|
+
// Fecha explicitamente qualquer tooltip ancorado nesta célula antes que o
|
|
740
|
+
// trigger deixe de existir no DOM.
|
|
741
|
+
void this.closeContentTooltip();
|
|
742
|
+
void this.actionsTooltip.hide();
|
|
743
|
+
}
|
|
744
|
+
/**
|
|
745
|
+
* Solicita o recálculo dos alinhamentos quando uma prop muda.
|
|
746
|
+
*/
|
|
747
|
+
handleAlignmentChange() {
|
|
748
|
+
this.notifyAlignmentChange();
|
|
749
|
+
}
|
|
750
|
+
/**
|
|
751
|
+
* Solicita o recálculo do overflow quando a prop muda.
|
|
752
|
+
*/
|
|
753
|
+
handleOverflowChange() {
|
|
754
|
+
this.notifyOverflowChange();
|
|
755
|
+
}
|
|
756
|
+
handleActionDensityChange() {
|
|
757
|
+
this.syncActionDensity();
|
|
758
|
+
}
|
|
759
|
+
/**
|
|
760
|
+
* Identifica se o slot contém ações e se elas são o único conteúdo.
|
|
761
|
+
*/
|
|
762
|
+
updateHasTableActionContent() {
|
|
763
|
+
if (this.contentSlotRef === null) {
|
|
764
|
+
this.hasTableActionContent = false;
|
|
765
|
+
this.hasOnlyTableActionContent = false;
|
|
766
|
+
return;
|
|
767
|
+
}
|
|
768
|
+
const assignedElements = this.contentSlotRef.assignedElements({ flatten: true });
|
|
769
|
+
this.hasTableActionContent = assignedElements.some((element) => {
|
|
770
|
+
if (element.tagName.toLowerCase() === 'br-table-action') {
|
|
771
|
+
return true;
|
|
772
|
+
}
|
|
773
|
+
return element.querySelector('br-table-action') !== null;
|
|
774
|
+
});
|
|
775
|
+
this.hasOnlyTableActionContent =
|
|
776
|
+
assignedElements.length > 0 &&
|
|
777
|
+
assignedElements.every((element) => element.tagName.toLowerCase() === 'br-table-action');
|
|
778
|
+
}
|
|
779
|
+
/**
|
|
780
|
+
* Normaliza as ações atribuídas ao slot para uso no menu excedente.
|
|
781
|
+
*/
|
|
782
|
+
syncTableActions() {
|
|
783
|
+
if (this.contentSlotRef === null) {
|
|
784
|
+
this.tableActions = [];
|
|
785
|
+
return;
|
|
786
|
+
}
|
|
787
|
+
const assignedElements = this.contentSlotRef.assignedElements({ flatten: true });
|
|
788
|
+
this.tableActions = assignedElements
|
|
789
|
+
.filter((element) => element.tagName.toLowerCase() === 'br-table-action')
|
|
790
|
+
.map((actionElement, index) => ({
|
|
791
|
+
actionElement,
|
|
792
|
+
label: this.getActionLabel(actionElement, index),
|
|
793
|
+
}));
|
|
794
|
+
}
|
|
795
|
+
/**
|
|
796
|
+
* Obtém um rótulo utilizável, com fallback baseado na posição.
|
|
797
|
+
*/
|
|
798
|
+
getActionLabel(actionElement, index) {
|
|
799
|
+
const label = actionElement.getAttribute('label')?.trim() || actionElement.getAttribute('aria-label')?.trim();
|
|
800
|
+
if (label !== undefined && label.length > 0) {
|
|
801
|
+
return label;
|
|
802
|
+
}
|
|
803
|
+
return `Ação ${index + 1}`;
|
|
804
|
+
}
|
|
805
|
+
/**
|
|
806
|
+
* Resolve e sanitiza o limite local ou herdado de ações.
|
|
807
|
+
*/
|
|
808
|
+
getNormalizedActionsLimit() {
|
|
809
|
+
if (this.cellActionsLimit !== undefined && Number.isFinite(this.cellActionsLimit)) {
|
|
810
|
+
return Math.max(1, Math.floor(this.cellActionsLimit));
|
|
811
|
+
}
|
|
812
|
+
return this.inheritedCellActionsLimit;
|
|
813
|
+
}
|
|
814
|
+
/**
|
|
815
|
+
* Resolve o limite herdado da tabela quando a célula não possui override local.
|
|
816
|
+
*/
|
|
817
|
+
syncInheritedCellActionsLimit() {
|
|
818
|
+
const tableElement = this.el.closest('br-table');
|
|
819
|
+
const rawValue = tableElement?.getAttribute('cell-actions-limit');
|
|
820
|
+
const parsedValue = rawValue === null || rawValue === undefined ? Number.NaN : Number(rawValue);
|
|
821
|
+
this.inheritedCellActionsLimit = Number.isFinite(parsedValue) ? Math.max(1, Math.floor(parsedValue)) : 4;
|
|
822
|
+
}
|
|
823
|
+
/**
|
|
824
|
+
* Sincroniza as propriedades herdadas da tabela.
|
|
825
|
+
*/
|
|
826
|
+
syncInheritedTableProps() {
|
|
827
|
+
this.syncInheritedCellActionsLimit();
|
|
828
|
+
this.inheritedMoreActionsLabel = this.el.closest('br-table')?.getAttribute('more-actions-label') ?? undefined;
|
|
829
|
+
}
|
|
830
|
+
/**
|
|
831
|
+
* Observa mudanças em runtime nas propriedades herdadas da tabela.
|
|
832
|
+
*/
|
|
833
|
+
observeTableInheritedProps() {
|
|
834
|
+
const tableElement = this.el.closest('br-table');
|
|
835
|
+
if (tableElement === null)
|
|
836
|
+
return;
|
|
837
|
+
this.tableInheritedPropsObserver?.disconnect();
|
|
838
|
+
this.tableInheritedPropsObserver = new MutationObserver((mutations) => {
|
|
839
|
+
if (mutations.some((mutation) => mutation.attributeName === 'cell-actions-limit')) {
|
|
840
|
+
this.syncInheritedCellActionsLimit();
|
|
841
|
+
}
|
|
842
|
+
if (mutations.some((mutation) => mutation.attributeName === 'more-actions-label')) {
|
|
843
|
+
this.inheritedMoreActionsLabel = tableElement.getAttribute('more-actions-label') ?? undefined;
|
|
844
|
+
}
|
|
845
|
+
});
|
|
846
|
+
this.tableInheritedPropsObserver.observe(tableElement, {
|
|
847
|
+
attributes: true,
|
|
848
|
+
attributeFilter: ['cell-actions-limit', 'more-actions-label'],
|
|
849
|
+
});
|
|
850
|
+
}
|
|
851
|
+
/**
|
|
852
|
+
* Informa se as ações precisam ser agrupadas em um menu.
|
|
853
|
+
*/
|
|
854
|
+
shouldCollapseTableActions() {
|
|
855
|
+
if (!this.hasOnlyTableActionContent) {
|
|
856
|
+
return false;
|
|
857
|
+
}
|
|
858
|
+
return this.tableActions.length > this.getNormalizedActionsLimit();
|
|
859
|
+
}
|
|
860
|
+
/**
|
|
861
|
+
* Cria o detalhe de uma ação selecionada no menu excedente.
|
|
862
|
+
*/
|
|
863
|
+
getCollapsedActionDetail(label) {
|
|
864
|
+
return {
|
|
865
|
+
type: 'row',
|
|
866
|
+
label,
|
|
867
|
+
};
|
|
868
|
+
}
|
|
869
|
+
/**
|
|
870
|
+
* Publica o clique de uma ação agrupada.
|
|
871
|
+
*/
|
|
872
|
+
handleCollapsedActionClick(event, label) {
|
|
873
|
+
event.preventDefault();
|
|
874
|
+
event.stopPropagation();
|
|
875
|
+
this.el.dispatchEvent(new CustomEvent('brTableActionClick', {
|
|
876
|
+
bubbles: true,
|
|
877
|
+
composed: true,
|
|
878
|
+
detail: this.getCollapsedActionDetail(label),
|
|
879
|
+
}));
|
|
880
|
+
}
|
|
881
|
+
/**
|
|
882
|
+
* Extrai o texto completo atribuído ao slot.
|
|
883
|
+
*/
|
|
884
|
+
getFullCellContent() {
|
|
885
|
+
if (this.contentSlotRef === null) {
|
|
886
|
+
return '';
|
|
887
|
+
}
|
|
888
|
+
return this.contentSlotRef
|
|
889
|
+
.assignedNodes({ flatten: true })
|
|
890
|
+
.map((node) => node.textContent?.trim() || '')
|
|
891
|
+
.filter((text) => text.length > 0)
|
|
892
|
+
.join(' ');
|
|
893
|
+
}
|
|
894
|
+
/**
|
|
895
|
+
* Localiza o cabeçalho correspondente ao índice desta célula.
|
|
896
|
+
*/
|
|
897
|
+
getColumnHeader() {
|
|
898
|
+
const table = this.el.closest('br-table');
|
|
899
|
+
if (table === null) {
|
|
900
|
+
return null;
|
|
901
|
+
}
|
|
902
|
+
const row = this.el.closest('br-table-row');
|
|
903
|
+
if (row === null) {
|
|
904
|
+
return null;
|
|
905
|
+
}
|
|
906
|
+
const cells = Array.from(row.querySelectorAll('br-table-cell'));
|
|
907
|
+
const columnIndex = cells.indexOf(this.el);
|
|
908
|
+
if (columnIndex === -1) {
|
|
909
|
+
return null;
|
|
910
|
+
}
|
|
911
|
+
const headers = Array.from(table.querySelectorAll('br-table-header-cell'));
|
|
912
|
+
return headers[columnIndex] ?? null;
|
|
913
|
+
}
|
|
914
|
+
/**
|
|
915
|
+
* Resolve o estado do tooltip seguindo a hierarquia da tabela.
|
|
916
|
+
*/
|
|
917
|
+
resolveTooltipState() {
|
|
918
|
+
const cellValue = this.el.getAttribute('tooltip-state');
|
|
919
|
+
if (cellValue !== null)
|
|
920
|
+
return cellValue;
|
|
921
|
+
const row = this.el.closest('br-table-row');
|
|
922
|
+
const rowValue = row?.getAttribute('tooltip-state');
|
|
923
|
+
if (rowValue !== null)
|
|
924
|
+
return rowValue;
|
|
925
|
+
const columnHeader = this.getColumnHeader();
|
|
926
|
+
const columnValue = columnHeader?.getAttribute('tooltip-state');
|
|
927
|
+
if (columnValue !== null)
|
|
928
|
+
return columnValue;
|
|
929
|
+
const table = this.el.closest('br-table');
|
|
930
|
+
const tableValue = table?.getAttribute('tooltip-state');
|
|
931
|
+
if (tableValue !== null)
|
|
932
|
+
return tableValue;
|
|
933
|
+
return table_utils.TABLE_TOOLTIP_STATE.INFO;
|
|
934
|
+
}
|
|
935
|
+
/**
|
|
936
|
+
* Resolve o modo do tooltip seguindo a hierarquia da tabela.
|
|
937
|
+
*/
|
|
938
|
+
resolveTooltipMode() {
|
|
939
|
+
const cellValue = this.el.getAttribute('tooltip-mode');
|
|
940
|
+
if (cellValue !== null && cellValue !== table_utils.TABLE_TOOLTIP_MODE.INHERIT)
|
|
941
|
+
return cellValue;
|
|
942
|
+
const row = this.el.closest('br-table-row');
|
|
943
|
+
const rowValue = row?.getAttribute('tooltip-mode');
|
|
944
|
+
if (rowValue !== null && rowValue !== table_utils.TABLE_TOOLTIP_MODE.INHERIT)
|
|
945
|
+
return rowValue;
|
|
946
|
+
const columnHeader = this.getColumnHeader();
|
|
947
|
+
const columnValue = columnHeader?.getAttribute('tooltip-mode');
|
|
948
|
+
if (columnValue !== null && columnValue !== table_utils.TABLE_TOOLTIP_MODE.INHERIT)
|
|
949
|
+
return columnValue;
|
|
950
|
+
const table = this.el.closest('br-table');
|
|
951
|
+
const tableValue = table?.getAttribute('tooltip-mode');
|
|
952
|
+
if (tableValue !== null && tableValue !== table_utils.TABLE_TOOLTIP_MODE.INHERIT)
|
|
953
|
+
return tableValue;
|
|
954
|
+
return table_utils.TABLE_TOOLTIP_MODE.DISABLED;
|
|
955
|
+
}
|
|
956
|
+
/**
|
|
957
|
+
* Publica a solicitação de recálculo dos alinhamentos.
|
|
958
|
+
*/
|
|
959
|
+
notifyAlignmentChange() {
|
|
960
|
+
this.brAlignmentChange.emit();
|
|
961
|
+
}
|
|
962
|
+
/**
|
|
963
|
+
* Publica a solicitação de recálculo do overflow.
|
|
964
|
+
*/
|
|
965
|
+
notifyOverflowChange() {
|
|
966
|
+
this.brOverflowChange.emit();
|
|
967
|
+
}
|
|
968
|
+
observeDensitySources() {
|
|
969
|
+
this.densityObserver?.disconnect();
|
|
970
|
+
this.densityObserver = null;
|
|
971
|
+
if (this.el.closest('br-table') !== null)
|
|
972
|
+
return;
|
|
973
|
+
this.densityObserver = new MutationObserver(this.syncActionDensity);
|
|
974
|
+
const densitySources = [
|
|
975
|
+
this.el,
|
|
976
|
+
this.el.closest('br-table-row'),
|
|
977
|
+
this.el.closest('br-table'),
|
|
978
|
+
];
|
|
979
|
+
densitySources
|
|
980
|
+
.filter((element) => element !== null)
|
|
981
|
+
.forEach((element) => {
|
|
982
|
+
this.densityObserver?.observe(element, { attributes: true, attributeFilter: ['style', 'class', 'density'] });
|
|
983
|
+
});
|
|
984
|
+
}
|
|
985
|
+
/**
|
|
986
|
+
* Renderiza o menu que contém as ações excedentes.
|
|
987
|
+
*/
|
|
988
|
+
renderActionsDropdown(actions) {
|
|
989
|
+
const tooltipLabel = (this.inheritedMoreActionsLabel ?? this.moreActionsLabel)?.trim() || 'Mais ações';
|
|
990
|
+
return (index.h(index.Fragment, null, index.h("br-dropdown", { placement: "bottom-end", targetZIndex: "var(--z-index-layer-3)", "prop:ariaLabel": "Mais a\u00E7\u00F5es da linha", ref: (element) => (this.actionsTooltip.dropdown = element), onBrDropdownOpenChange: this.actionsTooltip.hide }, index.h("br-button", { slot: "trigger", shape: "circle", density: this.effectiveActionDensity, emphasis: "tertiary", "prop:ariaLabel": "Abrir menu de a\u00E7\u00F5es", ref: (element) => (this.actionsTooltip.trigger = element), onPointerEnter: this.actionsTooltip.show, onPointerLeave: this.actionsTooltip.hide, onFocus: this.actionsTooltip.show, onBlur: this.actionsTooltip.hide, onClick: this.actionsTooltip.hide }, index.h("br-icon", { "attr:iconName": "fa-solid:ellipsis-v" })), index.h("br-list", { class: "cell-actions-dropdown-list", slot: "target", "list-title": "A\u00E7\u00F5es", divider: true }, actions.map((action) => (index.h("br-item", { isButton: true, type: "button", density: "small", "data-no-selection": true, onBrDidClick: (event) => this.handleCollapsedActionClick(event, action.label) }, action.label))))), index.h("br-tooltip", { ref: (element) => (this.actionsTooltip.tooltip = element), hideDelay: 3000 }, index.h("span", { slot: "content" }, tooltipLabel))));
|
|
991
|
+
}
|
|
992
|
+
/**
|
|
993
|
+
* Renderiza o conteúdo, as ações e o tooltip opcional.
|
|
994
|
+
*/
|
|
995
|
+
render() {
|
|
996
|
+
const shouldCollapseActions = this.shouldCollapseTableActions();
|
|
997
|
+
return (index.h(index.Host, { key: '28336fcb0e7e3da9af094ab3f97dadd7c89afd7c', role: this.rowHeader ? 'rowheader' : 'gridcell' }, index.h("div", { key: '32378da7a8514dc43361557145d0ecda004789b0', class: "br-table-cell", role: "presentation", part: "cell" }, index.h("div", { key: '1a7181e51fb78331493af7514316159a65892092', class: "br-table-cell-content", role: "presentation", part: "content" }, index.h("div", { key: '1360b591b744208041d3ac41ec18a4cf7e33b8bc', class: {
|
|
998
|
+
'br-table-cell-truncate': true,
|
|
999
|
+
'has-table-actions': this.hasTableActionContent,
|
|
1000
|
+
}, role: "presentation", ref: (el) => (this.truncateContentRef = el), onPointerEnter: this.handleMouseEnter, onPointerLeave: this.handleMouseLeave }, index.h("div", { key: '251a8d135461a8dcf774aa1943e7a9b01a9e6eb4', class: { 'cell-actions-slot-container': true, 'is-hidden': shouldCollapseActions } }, index.h("slot", { key: '5e2f00565491bf212659c060d6dacb1176c96004', ref: (el) => (this.contentSlotRef = el), onSlotchange: () => {
|
|
1001
|
+
this.updateHasTableActionContent();
|
|
1002
|
+
this.syncTableActions();
|
|
1003
|
+
} })), shouldCollapseActions && this.renderActionsDropdown(this.tableActions)), this.isTooltipVisible && (index.h("br-tooltip", { key: '4081ef125267a1a8ac2ce501238bf17189c7ec8e', ref: (el) => (this.tooltipRef = el), position: "top", state: this.resolveTooltipState() === table_utils.TABLE_TOOLTIP_STATE.DANGER ? 'danger' : this.resolveTooltipState() }, index.h("span", { key: 'c0f506b336ce0c20e3a493f0d96425baf63666c5', slot: "content" }, this.tooltipContent)))))));
|
|
1004
|
+
}
|
|
1005
|
+
get el() { return index.getElement(this); }
|
|
1006
|
+
static get watchers() { return {
|
|
1007
|
+
"horizontalAlignment": [{
|
|
1008
|
+
"handleAlignmentChange": 0
|
|
1009
|
+
}],
|
|
1010
|
+
"verticalAlignment": [{
|
|
1011
|
+
"handleAlignmentChange": 0
|
|
1012
|
+
}],
|
|
1013
|
+
"overflow": [{
|
|
1014
|
+
"handleOverflowChange": 0
|
|
1015
|
+
}],
|
|
1016
|
+
"actionDensity": [{
|
|
1017
|
+
"handleActionDensityChange": 0
|
|
1018
|
+
}]
|
|
1019
|
+
}; }
|
|
1020
|
+
};
|
|
1021
|
+
TableCell.style = tableCellCss();
|
|
1022
|
+
|
|
1023
|
+
const tableFooterCss = () => `*,*::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}.mb-4{margin-bottom:var(--spacing-scale-3x) !important}.pt-half{padding-top:var(--spacing-scale-half) !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)}mark,.mark{background:var(--red-warm-vivid-10);color:var(--color)}*[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}.br-table-footer{display:flex;align-items:center;padding:var(--br-table-bar-padding)}.br-table-footer br-pagination{flex:1 1 auto;min-width:0}`;
|
|
1024
|
+
|
|
1025
|
+
const TableFooter = class {
|
|
1026
|
+
constructor(hostRef) {
|
|
1027
|
+
index.registerInstance(this, hostRef);
|
|
1028
|
+
this.brInternalTableFooterPageChange = index.createEvent(this, "brInternalTableFooterPageChange", 0);
|
|
1029
|
+
this.brInternalTableFooterPerPageChange = index.createEvent(this, "brInternalTableFooterPerPageChange", 0);
|
|
1030
|
+
/** Página atual exibida pela paginação (1-indexada). */
|
|
1031
|
+
this.currentPage = 1;
|
|
1032
|
+
/** Quantidade de itens exibidos por página. */
|
|
1033
|
+
this.pageSize = 10;
|
|
1034
|
+
/** Opções disponíveis de itens por página. */
|
|
1035
|
+
this.pageSizeOptions = [10, 20, 30];
|
|
1036
|
+
/** Quantidade total de itens do conjunto de dados. */
|
|
1037
|
+
this.totalItems = 0;
|
|
1038
|
+
/** Densidade visual herdada da tabela. */
|
|
1039
|
+
this.density = 'medium';
|
|
1040
|
+
/** Indica que a área de dados da tabela possui rolagem. */
|
|
1041
|
+
this.hasScroll = false;
|
|
1042
|
+
this.handlePageChange = (event) => {
|
|
1043
|
+
this.brInternalTableFooterPageChange.emit(event.detail);
|
|
1044
|
+
};
|
|
1045
|
+
this.handlePerPageChange = (event) => {
|
|
1046
|
+
this.brInternalTableFooterPerPageChange.emit(event.detail);
|
|
1047
|
+
};
|
|
1048
|
+
}
|
|
1049
|
+
render() {
|
|
1050
|
+
return (index.h(index.Host, { key: '3b218f320a144fd8ba674ab206c145b6a4b75753' }, index.h("div", { key: '2749e474e34bfb8d488abf6bf2a698b7e921699c', class: "br-table-footer", part: "container" }, index.h("br-pagination", { key: 'ea83c0270df21d1bdb2d25977ab409f21d9dbbb6', variant: "contextual", ariaLabel: "Pagina\u00E7\u00E3o da tabela", "prop:controlled": true, "prop:density": this.density, "prop:currentPage": this.currentPage, "prop:perPage": this.pageSize, perPageOptions: this.pageSizeOptions, "prop:totalItems": this.totalItems, onBrPaginationPageChange: this.handlePageChange, onBrPaginationPerPageChange: this.handlePerPageChange }))));
|
|
1051
|
+
}
|
|
1052
|
+
get el() { return index.getElement(this); }
|
|
1053
|
+
};
|
|
1054
|
+
TableFooter.style = tableFooterCss();
|
|
1055
|
+
|
|
1056
|
+
/** Publica a altura border-box fora do ciclo de scroll. */
|
|
1057
|
+
class TableHeaderHeightObserver {
|
|
1058
|
+
constructor(host, surface) {
|
|
1059
|
+
this.host = host;
|
|
1060
|
+
this.surface = surface;
|
|
1061
|
+
this.refresh = () => {
|
|
1062
|
+
if (this.observer === undefined && this.host.isConnected) {
|
|
1063
|
+
this.publish(this.surface.getBoundingClientRect().height);
|
|
1064
|
+
}
|
|
1065
|
+
};
|
|
1066
|
+
}
|
|
1067
|
+
connect() {
|
|
1068
|
+
this.disconnect();
|
|
1069
|
+
if (this.host.closest('br-table') === null)
|
|
1070
|
+
return;
|
|
1071
|
+
this.publish(this.surface.getBoundingClientRect().height);
|
|
1072
|
+
if (typeof ResizeObserver === 'undefined')
|
|
1073
|
+
return;
|
|
1074
|
+
this.observer = new ResizeObserver(([entry]) => {
|
|
1075
|
+
if (!this.host.isConnected || entry === undefined)
|
|
1076
|
+
return;
|
|
1077
|
+
const size = entry.borderBoxSize[0];
|
|
1078
|
+
const horizontal = !/^(vertical|sideways)/.test(getComputedStyle(this.surface).writingMode);
|
|
1079
|
+
this.publish(size === undefined
|
|
1080
|
+
? this.surface.getBoundingClientRect().height
|
|
1081
|
+
: horizontal
|
|
1082
|
+
? size.blockSize
|
|
1083
|
+
: size.inlineSize);
|
|
1084
|
+
});
|
|
1085
|
+
this.observer.observe(this.surface, { box: 'border-box' });
|
|
1086
|
+
}
|
|
1087
|
+
disconnect() {
|
|
1088
|
+
this.observer?.disconnect();
|
|
1089
|
+
this.observer = undefined;
|
|
1090
|
+
}
|
|
1091
|
+
publish(height) {
|
|
1092
|
+
this.host.dispatchEvent(new CustomEvent('brInternalTableHeaderHeight', {
|
|
1093
|
+
bubbles: true,
|
|
1094
|
+
composed: false,
|
|
1095
|
+
detail: { host: this.host, height, refresh: this.refresh },
|
|
1096
|
+
}));
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1099
|
+
|
|
1100
|
+
const tableHeaderCellCss = () => `*,*::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}.mb-4{margin-bottom:var(--spacing-scale-3x) !important}.pt-half{padding-top:var(--spacing-scale-half) !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)}mark,.mark{background:var(--red-warm-vivid-10);color:var(--color)}*[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{--table-cell-grid-column:auto;--table-cell-grid-row:auto;display:contents}.br-table-header-cell{position:sticky;top:0;z-index:2;grid-column:var(--table-cell-grid-column, auto);grid-row:var(--table-cell-grid-row, auto);min-width:0;padding:var(--br-table-density) var(--table-row-size);background-color:var(--background-alternative);border-right:calc(var(--br-table-divider-base-width, 0px)*var(--br-table-column-divider-factor, 0)) var(--br-table-divider-style, solid) var(--border-color);color:var(--interactive);font-size:var(--font-size-scale-base);font-weight:var(--font-weight-semi-bold)}.br-table-header-cell.is-sortable{position:sticky;cursor:pointer}.br-table-header-cell:focus-visible{outline:var(--focus) var(--focus-style) var(--focus-width);outline-offset:calc(var(--focus-width)*-1)}.br-table-header-cell.is-sortable::before{position:absolute;z-index:0;inset:0;background-color:var(--interactive);content:"";opacity:0;pointer-events:none}.br-table-header-cell.is-sortable:hover::before{opacity:var(--surface-opacity-xs)}.br-table-header-cell.is-sortable:active::before{opacity:var(--surface-opacity-md)}.br-table-header-cell-content{position:relative;z-index:1;display:flex;align-items:var(--br-table-vertical-alignment);justify-content:flex-start;min-width:0;gap:var(--spacing-scale-base);height:100%}.br-table-header-cell-label{display:flex;flex:1 1 auto;align-items:var(--br-table-vertical-alignment);justify-content:flex-start;min-width:0}:host([data-selection-column]) .br-table-header-cell,:host([data-expansion-column]) .br-table-header-cell{padding:var(--br-table-density) var(--spacing-scale-base)}:host([data-selection-column]) .br-table-header-cell,:host([data-expansion-column]) .br-table-header-cell{display:flex;align-items:var(--br-table-vertical-alignment);justify-content:var(--br-table-horizontal-alignment)}:host([data-selection-column]) .br-table-header-cell-content,:host([data-selection-column]) .br-table-header-cell-label{width:fit-content;height:auto}:host([data-expansion-column]) .br-table-header-cell-content,:host([data-expansion-column]) .br-table-header-cell-label{width:fit-content;height:auto}:host([data-selection-column]) .br-table-header-cell-truncate{display:flex;align-items:center;justify-content:inherit;width:fit-content;overflow:visible}:host([data-expansion-column]) .br-table-header-cell-truncate{display:flex;align-items:center;justify-content:inherit;width:fit-content}:host([data-selection-column]) ::slotted(br-checkbox){flex:0 0 auto;align-self:center}.br-table-header-cell-truncate{min-width:0;max-width:100%;overflow:var(--br-table-cell-overflow);text-overflow:var(--br-table-cell-text-overflow);white-space:var(--br-table-cell-white-space);word-break:break-all}:host([data-last-column]) .br-table-header-cell{border-right:none}.br-table-sort-trigger{width:100%;margin:0;padding:0;border:0;background:rgba(0,0,0,0);color:inherit;font:inherit;text-align:inherit;cursor:pointer}.br-table-sort-trigger:focus-visible{outline:var(--surface-width-md) solid currentcolor;outline-offset:calc(var(--surface-width-sm)*-1)}.sort-icon{display:block;width:var(--spacing-scale-2x);height:var(--spacing-scale-2x);opacity:0}.br-table-header-cell.is-sortable:hover .sort-icon,.br-table-header-cell.is-sortable:focus-within .sort-icon,.br-table-header-cell.is-sortable.is-sorted .sort-icon{opacity:1}.sort-icon-pair{display:flex;align-items:center;justify-content:center}.br-table-header-cell>br-tooltip{position:absolute;inset:0 auto auto 0;width:0;height:0}:host-context(br-table-header[data-multilevel]) .br-table-header-cell{position:relative}`;
|
|
1101
|
+
|
|
1102
|
+
const TableHeaderCell = class {
|
|
1103
|
+
constructor(hostRef) {
|
|
1104
|
+
index.registerInstance(this, hostRef);
|
|
1105
|
+
this.brColumnWidthChange = index.createEvent(this, "brColumnWidthChange", 7);
|
|
1106
|
+
this.brAlignmentChange = index.createEvent(this, "brAlignmentChange", 7);
|
|
1107
|
+
this.brOverflowChange = index.createEvent(this, "brOverflowChange", 7);
|
|
1108
|
+
this.brInternalTableSortRequest = index.createEvent(this, "brInternalTableSortRequest", 4);
|
|
1109
|
+
/**
|
|
1110
|
+
* Quantidade de colunas ocupadas. Inteiro entre 1 e 1000; valores inválidos usam 1.
|
|
1111
|
+
* @default 1
|
|
1112
|
+
*/
|
|
1113
|
+
this.colSpan = 1;
|
|
1114
|
+
/**
|
|
1115
|
+
* Quantidade de linhas ocupadas no cabeçalho ou grupo. Limitada às linhas
|
|
1116
|
+
* disponíveis; aceita inteiros de 1 a 1000 e valores inválidos usam 1.
|
|
1117
|
+
* @default 1
|
|
1118
|
+
*/
|
|
1119
|
+
this.rowSpan = 1;
|
|
1120
|
+
/** Habilita a ordenação desta coluna. */
|
|
1121
|
+
this.sortable = false;
|
|
1122
|
+
this.isTooltipVisible = false;
|
|
1123
|
+
this.tooltipContent = '';
|
|
1124
|
+
this.tooltipRef = null;
|
|
1125
|
+
this.truncateContentRef = null;
|
|
1126
|
+
this.contentSlotRef = null;
|
|
1127
|
+
/**
|
|
1128
|
+
* Exibe o tooltip somente quando o conteúdo está truncado.
|
|
1129
|
+
*/
|
|
1130
|
+
this.handleMouseEnter = async () => {
|
|
1131
|
+
if (this.resolveTooltipMode() !== table_utils.TABLE_TOOLTIP_MODE.ENABLED) {
|
|
1132
|
+
return;
|
|
1133
|
+
}
|
|
1134
|
+
const truncateContent = this.truncateContentRef;
|
|
1135
|
+
if (truncateContent === null) {
|
|
1136
|
+
return;
|
|
1137
|
+
}
|
|
1138
|
+
const hasOverflow = truncateContent.scrollWidth > truncateContent.clientWidth;
|
|
1139
|
+
if (!hasOverflow) {
|
|
1140
|
+
return;
|
|
1141
|
+
}
|
|
1142
|
+
this.tooltipContent = this.getFullCellContent();
|
|
1143
|
+
if (this.tooltipContent.length === 0) {
|
|
1144
|
+
return;
|
|
1145
|
+
}
|
|
1146
|
+
this.isTooltipVisible = true;
|
|
1147
|
+
await table_utils.requestAnimationFramePromise();
|
|
1148
|
+
if (!this.el.isConnected || !truncateContent.isConnected) {
|
|
1149
|
+
await this.closeContentTooltip();
|
|
1150
|
+
return;
|
|
1151
|
+
}
|
|
1152
|
+
if (this.tooltipRef?.isConnected) {
|
|
1153
|
+
await this.tooltipRef.setTriggerElement(truncateContent);
|
|
1154
|
+
await this.tooltipRef.showTooltip();
|
|
1155
|
+
}
|
|
1156
|
+
};
|
|
1157
|
+
this.closeContentTooltip = async () => {
|
|
1158
|
+
const tooltip = this.tooltipRef;
|
|
1159
|
+
if (tooltip !== null) {
|
|
1160
|
+
try {
|
|
1161
|
+
await tooltip.hideTooltip();
|
|
1162
|
+
}
|
|
1163
|
+
catch {
|
|
1164
|
+
// O tooltip pode estar sendo desconectado junto com o host.
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1167
|
+
this.tooltipRef = null;
|
|
1168
|
+
this.isTooltipVisible = false;
|
|
1169
|
+
};
|
|
1170
|
+
/**
|
|
1171
|
+
* Oculta o tooltip ao encerrar a interação com a célula.
|
|
1172
|
+
*/
|
|
1173
|
+
this.handleMouseLeave = async () => {
|
|
1174
|
+
await this.closeContentTooltip();
|
|
1175
|
+
};
|
|
1176
|
+
this.handleSortClick = (event) => {
|
|
1177
|
+
event.preventDefault();
|
|
1178
|
+
event.stopPropagation();
|
|
1179
|
+
this.brInternalTableSortRequest.emit();
|
|
1180
|
+
};
|
|
1181
|
+
}
|
|
1182
|
+
connectedCallback() {
|
|
1183
|
+
this.keyboard?.connect();
|
|
1184
|
+
this.headerHeightObserver?.connect();
|
|
1185
|
+
}
|
|
1186
|
+
/**
|
|
1187
|
+
* Publica o estado inicial após a primeira renderização.
|
|
1188
|
+
*/
|
|
1189
|
+
componentDidLoad() {
|
|
1190
|
+
const surface = this.el.shadowRoot?.querySelector('[part="cell"]');
|
|
1191
|
+
if (surface !== undefined && surface !== null) {
|
|
1192
|
+
this.keyboard = new table_utils.TableCellKeyboard(this.el, surface);
|
|
1193
|
+
this.keyboard.connect();
|
|
1194
|
+
this.headerHeightObserver = new TableHeaderHeightObserver(this.el, surface);
|
|
1195
|
+
this.headerHeightObserver.connect();
|
|
1196
|
+
}
|
|
1197
|
+
this.notifyColumnWidthChange();
|
|
1198
|
+
this.notifyAlignmentChange();
|
|
1199
|
+
this.notifyOverflowChange();
|
|
1200
|
+
}
|
|
1201
|
+
disconnectedCallback() {
|
|
1202
|
+
this.keyboard?.disconnect();
|
|
1203
|
+
this.headerHeightObserver?.disconnect();
|
|
1204
|
+
// Garante limpeza caso o componente seja removido enquanto o tooltip está
|
|
1205
|
+
// aberto. Mantém o mesmo contrato usado pelas células virtualizadas.
|
|
1206
|
+
void this.closeContentTooltip();
|
|
1207
|
+
}
|
|
1208
|
+
/**
|
|
1209
|
+
* Solicita o recálculo do grid quando a largura muda.
|
|
1210
|
+
*/
|
|
1211
|
+
handleColumnWidthChange() {
|
|
1212
|
+
this.notifyColumnWidthChange();
|
|
1213
|
+
}
|
|
1214
|
+
/**
|
|
1215
|
+
* Solicita o recálculo dos alinhamentos quando uma prop muda.
|
|
1216
|
+
*/
|
|
1217
|
+
handleAlignmentChange() {
|
|
1218
|
+
this.notifyAlignmentChange();
|
|
1219
|
+
}
|
|
1220
|
+
/**
|
|
1221
|
+
* Solicita o recálculo do overflow quando a prop muda.
|
|
1222
|
+
*/
|
|
1223
|
+
handleOverflowChange() {
|
|
1224
|
+
this.notifyOverflowChange();
|
|
1225
|
+
}
|
|
1226
|
+
/**
|
|
1227
|
+
* Extrai o texto completo atribuído ao slot.
|
|
1228
|
+
*/
|
|
1229
|
+
getFullCellContent() {
|
|
1230
|
+
if (this.contentSlotRef === null) {
|
|
1231
|
+
return '';
|
|
1232
|
+
}
|
|
1233
|
+
return this.contentSlotRef
|
|
1234
|
+
.assignedNodes({ flatten: true })
|
|
1235
|
+
.map((node) => node.textContent?.trim() || '')
|
|
1236
|
+
.filter((text) => text.length > 0)
|
|
1237
|
+
.join(' ');
|
|
1238
|
+
}
|
|
1239
|
+
/**
|
|
1240
|
+
* Resolve o estado do tooltip seguindo célula, linha e tabela.
|
|
1241
|
+
*/
|
|
1242
|
+
resolveTooltipState() {
|
|
1243
|
+
const cellValue = this.el.getAttribute('tooltip-state');
|
|
1244
|
+
if (cellValue !== null)
|
|
1245
|
+
return cellValue;
|
|
1246
|
+
const row = this.el.closest('br-table-row');
|
|
1247
|
+
const rowValue = row?.getAttribute('tooltip-state');
|
|
1248
|
+
if (rowValue !== null)
|
|
1249
|
+
return rowValue;
|
|
1250
|
+
const table = this.el.closest('br-table');
|
|
1251
|
+
const tableValue = table?.getAttribute('tooltip-state');
|
|
1252
|
+
if (tableValue !== null)
|
|
1253
|
+
return tableValue;
|
|
1254
|
+
return table_utils.TABLE_TOOLTIP_STATE.INFO;
|
|
1255
|
+
}
|
|
1256
|
+
/**
|
|
1257
|
+
* Resolve o modo do tooltip seguindo a hierarquia de configuração.
|
|
1258
|
+
*/
|
|
1259
|
+
resolveTooltipMode() {
|
|
1260
|
+
const cellValue = this.el.getAttribute('tooltip-mode');
|
|
1261
|
+
if (cellValue !== null && cellValue !== table_utils.TABLE_TOOLTIP_MODE.INHERIT)
|
|
1262
|
+
return cellValue;
|
|
1263
|
+
const row = this.el.closest('br-table-row');
|
|
1264
|
+
const rowValue = row?.getAttribute('tooltip-mode');
|
|
1265
|
+
if (rowValue !== null && rowValue !== table_utils.TABLE_TOOLTIP_MODE.INHERIT)
|
|
1266
|
+
return rowValue;
|
|
1267
|
+
const table = this.el.closest('br-table');
|
|
1268
|
+
const tableValue = table?.getAttribute('tooltip-mode');
|
|
1269
|
+
if (tableValue !== null && tableValue !== table_utils.TABLE_TOOLTIP_MODE.INHERIT)
|
|
1270
|
+
return tableValue;
|
|
1271
|
+
return table_utils.TABLE_TOOLTIP_MODE.DISABLED;
|
|
1272
|
+
}
|
|
1273
|
+
/**
|
|
1274
|
+
* Publica a solicitação de recálculo da largura.
|
|
1275
|
+
*/
|
|
1276
|
+
notifyColumnWidthChange() {
|
|
1277
|
+
this.brColumnWidthChange.emit();
|
|
1278
|
+
}
|
|
1279
|
+
/**
|
|
1280
|
+
* Publica a solicitação de recálculo dos alinhamentos.
|
|
1281
|
+
*/
|
|
1282
|
+
notifyAlignmentChange() {
|
|
1283
|
+
this.brAlignmentChange.emit();
|
|
1284
|
+
}
|
|
1285
|
+
/**
|
|
1286
|
+
* Publica a solicitação de recálculo do overflow.
|
|
1287
|
+
*/
|
|
1288
|
+
notifyOverflowChange() {
|
|
1289
|
+
this.brOverflowChange.emit();
|
|
1290
|
+
}
|
|
1291
|
+
getSortAriaLabel() {
|
|
1292
|
+
const columnLabel = this.getFullCellContent() || 'Coluna';
|
|
1293
|
+
if (this.sortDirection === table_utils.TABLE_SORT_DIRECTION.ASC) {
|
|
1294
|
+
return `${columnLabel}: ordenado de forma crescente. Alterar para decrescente`;
|
|
1295
|
+
}
|
|
1296
|
+
if (this.sortDirection === table_utils.TABLE_SORT_DIRECTION.DESC) {
|
|
1297
|
+
return `${columnLabel}: ordenado de forma decrescente. Remover ordenação`;
|
|
1298
|
+
}
|
|
1299
|
+
return `${columnLabel}: sem ordenação. Ordenar de forma crescente`;
|
|
1300
|
+
}
|
|
1301
|
+
renderSortIcons() {
|
|
1302
|
+
if (this.sortDirection === table_utils.TABLE_SORT_DIRECTION.ASC || this.sortDirection === table_utils.TABLE_SORT_DIRECTION.DESC) {
|
|
1303
|
+
const iconName = this.sortDirection === table_utils.TABLE_SORT_DIRECTION.ASC ? 'fa-solid:sort-up' : 'fa-solid:sort-down';
|
|
1304
|
+
return index.h("br-icon", { class: "sort-icon", "prop:iconName": iconName });
|
|
1305
|
+
}
|
|
1306
|
+
// Um único glyph mantém as setas justapostas sem depender de espaçamento manual entre ícones.
|
|
1307
|
+
return (index.h("span", { class: "sort-icon-pair" }, index.h("br-icon", { class: "sort-icon", "prop:iconName": "fa-solid:sort" })));
|
|
1308
|
+
}
|
|
1309
|
+
/**
|
|
1310
|
+
* Renderiza o cabeçalho, seu conteúdo e o tooltip opcional.
|
|
1311
|
+
*/
|
|
1312
|
+
render() {
|
|
1313
|
+
const canSort = this.sortable && table_utils.resolveTableSpan(String(this.colSpan)) === 1;
|
|
1314
|
+
const labelAndIcon = (index.h(index.Fragment, { key: 'e327ea2a7c797ddf0b32b912f8a949c26e54809e' }, index.h("div", { key: '6cfb56797ad5cc29c930234feb9a0354c741d537', class: "br-table-header-cell-label", role: "presentation" }, index.h("div", { key: '597d2e9316228ce200b39a9a2c5a359616fa413d', class: "br-table-header-cell-truncate", role: "presentation", ref: (el) => (this.truncateContentRef = el), onPointerEnter: this.handleMouseEnter, onPointerLeave: this.handleMouseLeave }, index.h("slot", { key: '49a331d81d404684f8778e235350963b1805170d', ref: (el) => (this.contentSlotRef = el) }))), canSort && this.renderSortIcons()));
|
|
1315
|
+
return (index.h(index.Host, { key: '7c219d7b4648522255b1b85d057f0c408e3f0702', role: "columnheader" }, index.h("div", { key: '56e593dddb114f847f99a2d541273a46cdf1a534', class: {
|
|
1316
|
+
'br-table-header-cell': true,
|
|
1317
|
+
'is-sortable': canSort,
|
|
1318
|
+
'is-sorted': this.sortDirection !== undefined,
|
|
1319
|
+
}, role: "presentation", part: "cell" }, canSort ? (
|
|
1320
|
+
// O botão preenche toda a célula para que o clique em qualquer ponto do cabeçalho ordene a coluna.
|
|
1321
|
+
index.h("button", { class: "br-table-header-cell-content br-table-sort-trigger", type: "button", part: "content", "aria-label": this.getSortAriaLabel(), onClick: this.handleSortClick }, labelAndIcon)) : (index.h("div", { class: "br-table-header-cell-content", role: "presentation", part: "content" }, labelAndIcon)), this.isTooltipVisible && (index.h("br-tooltip", { key: 'b1fd2f34e818ed7789d21342b0abcde05c19f6f6', ref: (el) => (this.tooltipRef = el), position: "top", state: this.resolveTooltipState() === table_utils.TABLE_TOOLTIP_STATE.DANGER ? 'danger' : this.resolveTooltipState() }, index.h("span", { key: '3bd5d137c146815d170c1dd21acd06f084c85329', slot: "content" }, this.tooltipContent))))));
|
|
1322
|
+
}
|
|
1323
|
+
get el() { return index.getElement(this); }
|
|
1324
|
+
static get watchers() { return {
|
|
1325
|
+
"columnWidth": [{
|
|
1326
|
+
"handleColumnWidthChange": 0
|
|
1327
|
+
}],
|
|
1328
|
+
"horizontalAlignment": [{
|
|
1329
|
+
"handleAlignmentChange": 0
|
|
1330
|
+
}],
|
|
1331
|
+
"verticalAlignment": [{
|
|
1332
|
+
"handleAlignmentChange": 0
|
|
1333
|
+
}],
|
|
1334
|
+
"overflow": [{
|
|
1335
|
+
"handleOverflowChange": 0
|
|
1336
|
+
}]
|
|
1337
|
+
}; }
|
|
1338
|
+
};
|
|
1339
|
+
TableHeaderCell.style = tableHeaderCellCss();
|
|
1340
|
+
|
|
1341
|
+
const tableRowCss = () => `*,*::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}.mb-4{margin-bottom:var(--spacing-scale-3x) !important}.pt-half{padding-top:var(--spacing-scale-half) !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)}mark,.mark{background:var(--red-warm-vivid-10);color:var(--color)}*[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:contents}.br-table-row{display:contents}.br-table-row-expanded-content{grid-column:1/-1;min-width:0;height:var(--br-table-expanded-content-height, 240px);overflow-y:auto;box-sizing:border-box;padding:var(--br-table-density) var(--table-row-size);background-color:var(--background-light);border-bottom:calc(var(--br-table-divider-base-width, 0px)*var(--br-table-row-divider-factor, 0)) var(--br-table-divider-style, solid) var(--border-color)}.expanded-content-shell{position:relative;grid-row:var(--table-expanded-grid-row, auto);grid-column:1/-1;min-width:0}.expanded-content-inner{display:flow-root}.expanded-content-shell::after{position:absolute;z-index:3;inset:0;background:linear-gradient(to bottom, rgba(0, 0, 0, 0.16), transparent) top/100% var(--table-scroll-shadow-top, 0),linear-gradient(to top, rgba(0, 0, 0, 0.16), transparent) bottom/100% var(--table-scroll-shadow-bottom, 0),linear-gradient(to right, rgba(0, 0, 0, 0.16), transparent) left/var(--table-scroll-shadow-left, 0) 100%,linear-gradient(to left, rgba(0, 0, 0, 0.16), transparent) right/var(--table-scroll-shadow-right, 0) 100%;background-repeat:no-repeat;content:"";pointer-events:none}`;
|
|
1342
|
+
|
|
1343
|
+
const TableRow = class {
|
|
1344
|
+
constructor(hostRef) {
|
|
1345
|
+
index.registerInstance(this, hostRef);
|
|
1346
|
+
this.brAlignmentChange = index.createEvent(this, "brAlignmentChange", 7);
|
|
1347
|
+
this.brOverflowChange = index.createEvent(this, "brOverflowChange", 7);
|
|
1348
|
+
/**
|
|
1349
|
+
* Indica se a linha está selecionada.
|
|
1350
|
+
*
|
|
1351
|
+
* @default false
|
|
1352
|
+
*/
|
|
1353
|
+
this.selected = false;
|
|
1354
|
+
/**
|
|
1355
|
+
* Controla se a expansão é habilitada, desabilitada ou herdada da tabela.
|
|
1356
|
+
*
|
|
1357
|
+
* @default 'inherit'
|
|
1358
|
+
*/
|
|
1359
|
+
this.rowExpansion = table_utils.TABLE_ROW_EXPANSION.INHERIT;
|
|
1360
|
+
/**
|
|
1361
|
+
* Altura visível da área expandida desta linha, em pixels.
|
|
1362
|
+
*
|
|
1363
|
+
* @remarks Quando omitida, herda `virtualExpandedContentHeight` de `br-table`.
|
|
1364
|
+
* @default null
|
|
1365
|
+
*/
|
|
1366
|
+
this.virtualExpandedContentHeight = null;
|
|
1367
|
+
/**
|
|
1368
|
+
* Indica se o conteúdo adicional da linha está visível.
|
|
1369
|
+
*
|
|
1370
|
+
* @default false
|
|
1371
|
+
*/
|
|
1372
|
+
this.expanded = false;
|
|
1373
|
+
}
|
|
1374
|
+
/**
|
|
1375
|
+
* Retorna a maior altura das células desta linha somada à área de expansão, em pixels.
|
|
1376
|
+
*
|
|
1377
|
+
* @returns Altura medida das células diretamente pertencentes à linha e do conteúdo expandido renderizado.
|
|
1378
|
+
*/
|
|
1379
|
+
async getMeasuredHeight() {
|
|
1380
|
+
const cells = Array.from(this.el.querySelectorAll('br-table-cell')).filter((cell) => cell.closest('br-table-row') === this.el);
|
|
1381
|
+
const cellHeights = await Promise.all(cells
|
|
1382
|
+
.filter((cell) => Number(cell.getAttribute('aria-rowspan') ?? 1) <= 1)
|
|
1383
|
+
.map((cell) => cell.getMeasuredHeight()));
|
|
1384
|
+
const group = this.el.parentElement;
|
|
1385
|
+
const trackIndex = group?.hasAttribute('data-table-row-group') ? Array.from(group.children).indexOf(this.el) : -1;
|
|
1386
|
+
const track = trackIndex >= 0 && group ? getComputedStyle(group).gridTemplateRows.split(/\s+/)[trackIndex] : undefined;
|
|
1387
|
+
const trackHeight = track && /^\d+(\.\d+)?px$/.test(track) ? Number.parseFloat(track) : 0;
|
|
1388
|
+
const cellHeight = trackHeight || Math.max(0, ...cellHeights);
|
|
1389
|
+
const expandedContent = this.el.shadowRoot?.querySelector('.br-table-row-expanded-content');
|
|
1390
|
+
return cellHeight + (expandedContent?.getBoundingClientRect().height ?? 0);
|
|
1391
|
+
}
|
|
1392
|
+
/**
|
|
1393
|
+
* Sincroniza as propriedades herdáveis após a primeira renderização.
|
|
1394
|
+
*/
|
|
1395
|
+
connectedCallback() {
|
|
1396
|
+
this.applyExpandedContentHeight();
|
|
1397
|
+
this.syncScrollShadows();
|
|
1398
|
+
}
|
|
1399
|
+
componentDidLoad() {
|
|
1400
|
+
this.applyExpandedContentHeight();
|
|
1401
|
+
this.notifyAlignmentChange();
|
|
1402
|
+
this.notifyOverflowChange();
|
|
1403
|
+
}
|
|
1404
|
+
syncScrollShadows() {
|
|
1405
|
+
const viewport = this.el.shadowRoot?.querySelector('.br-table-row-expanded-content');
|
|
1406
|
+
if (viewport !== this.expandedViewport) {
|
|
1407
|
+
this.scrollShadows?.disconnect();
|
|
1408
|
+
this.scrollShadows = undefined;
|
|
1409
|
+
this.expandedViewport = viewport ?? undefined;
|
|
1410
|
+
const content = viewport?.querySelector('.expanded-content-inner');
|
|
1411
|
+
if (viewport && content && viewport.parentElement) {
|
|
1412
|
+
this.scrollShadows = new table_utils.TableScrollShadows(viewport, content, viewport.parentElement);
|
|
1413
|
+
}
|
|
1414
|
+
}
|
|
1415
|
+
this.scrollShadows?.update();
|
|
1416
|
+
}
|
|
1417
|
+
componentDidRender() {
|
|
1418
|
+
this.syncScrollShadows();
|
|
1419
|
+
}
|
|
1420
|
+
disconnectedCallback() {
|
|
1421
|
+
this.scrollShadows?.disconnect();
|
|
1422
|
+
this.scrollShadows = undefined;
|
|
1423
|
+
this.expandedViewport = undefined;
|
|
1424
|
+
}
|
|
1425
|
+
/**
|
|
1426
|
+
* Notifica a tabela para recalcular os alinhamentos das células.
|
|
1427
|
+
*/
|
|
1428
|
+
handleAlignmentChange() {
|
|
1429
|
+
this.notifyAlignmentChange();
|
|
1430
|
+
}
|
|
1431
|
+
/**
|
|
1432
|
+
* Notifica a tabela para recalcular o overflow das células.
|
|
1433
|
+
*/
|
|
1434
|
+
handleOverflowChange() {
|
|
1435
|
+
this.notifyOverflowChange();
|
|
1436
|
+
}
|
|
1437
|
+
/**
|
|
1438
|
+
* Publica a solicitação de recálculo de alinhamento.
|
|
1439
|
+
*/
|
|
1440
|
+
notifyAlignmentChange() {
|
|
1441
|
+
this.brAlignmentChange.emit();
|
|
1442
|
+
}
|
|
1443
|
+
/**
|
|
1444
|
+
* Publica a solicitação de recálculo de overflow.
|
|
1445
|
+
*/
|
|
1446
|
+
notifyOverflowChange() {
|
|
1447
|
+
this.brOverflowChange.emit();
|
|
1448
|
+
}
|
|
1449
|
+
/** Sincroniza o override local de altura da área expandida. */
|
|
1450
|
+
handleVirtualExpandedContentHeightChange() {
|
|
1451
|
+
this.applyExpandedContentHeight();
|
|
1452
|
+
}
|
|
1453
|
+
applyExpandedContentHeight() {
|
|
1454
|
+
const value = this.virtualExpandedContentHeight;
|
|
1455
|
+
if (value !== null && value !== undefined && Number.isFinite(value) && value > 0) {
|
|
1456
|
+
this.el.style.setProperty('--br-table-expanded-content-height', `${value}px`);
|
|
1457
|
+
return;
|
|
1458
|
+
}
|
|
1459
|
+
// Sem override local, permite que o token definido por br-table seja herdado.
|
|
1460
|
+
this.el.style.removeProperty('--br-table-expanded-content-height');
|
|
1461
|
+
}
|
|
1462
|
+
/**
|
|
1463
|
+
* Indica se a linha está elegível para exibir expansão.
|
|
1464
|
+
*/
|
|
1465
|
+
isExpansionEnabled() {
|
|
1466
|
+
return this.rowExpansion === table_utils.TABLE_ROW_EXPANSION.ENABLED || this.el.hasAttribute('data-row-expansion-enabled');
|
|
1467
|
+
}
|
|
1468
|
+
/**
|
|
1469
|
+
* Renderiza as células e, quando expandida, o conteúdo adicional.
|
|
1470
|
+
*/
|
|
1471
|
+
render() {
|
|
1472
|
+
const standalone = this.el.closest('br-table') === null;
|
|
1473
|
+
const shouldRenderExpandedContent = this.expanded && (standalone || this.isExpansionEnabled());
|
|
1474
|
+
const columnCount = this.el.querySelectorAll(':scope > br-table-cell').length;
|
|
1475
|
+
return (index.h(index.Host, { key: 'ace9d4ad52c20827ec6047c7acf272fa0f79ecd3', role: "row" }, index.h("div", { key: 'c8931561787d0f04332c02d777a083575fa2d6b0', class: "br-table-row", role: "presentation", part: "row" }, index.h("slot", { key: 'ab1b420bfd4a538f66f2fa9997343540b07689ea' }), shouldRenderExpandedContent && (index.h("div", { key: '6a8aab7c4e72c66536b0b479798241b5989bb365', class: "expanded-content-shell", role: "presentation" }, index.h("div", { key: 'ff1585ac5946d727446f4797a25d2a1dc8c9a28a', class: "br-table-row-expanded-content", role: "gridcell", tabIndex: -1, "aria-colspan": columnCount > 1 ? String(columnCount) : undefined, part: "expanded-content" }, index.h("div", { key: '8bdb995415a4eda39d833ea5ef2ef4b928833925', class: "expanded-content-inner" }, index.h("slot", { key: 'd14b1c47734bb192f4d6ac53d34b103b97852a8f', name: "expanded-content" }))))))));
|
|
1476
|
+
}
|
|
1477
|
+
get el() { return index.getElement(this); }
|
|
1478
|
+
static get watchers() { return {
|
|
1479
|
+
"horizontalAlignment": [{
|
|
1480
|
+
"handleAlignmentChange": 0
|
|
1481
|
+
}],
|
|
1482
|
+
"verticalAlignment": [{
|
|
1483
|
+
"handleAlignmentChange": 0
|
|
1484
|
+
}],
|
|
1485
|
+
"overflow": [{
|
|
1486
|
+
"handleOverflowChange": 0
|
|
1487
|
+
}],
|
|
1488
|
+
"virtualExpandedContentHeight": [{
|
|
1489
|
+
"handleVirtualExpandedContentHeightChange": 0
|
|
1490
|
+
}]
|
|
1491
|
+
}; }
|
|
1492
|
+
};
|
|
1493
|
+
TableRow.style = tableRowCss();
|
|
1494
|
+
|
|
1495
|
+
exports.br_table_action = TableAction;
|
|
1496
|
+
exports.br_table_bar = TableBar;
|
|
1497
|
+
exports.br_table_cell = TableCell;
|
|
1498
|
+
exports.br_table_footer = TableFooter;
|
|
1499
|
+
exports.br_table_header_cell = TableHeaderCell;
|
|
1500
|
+
exports.br_table_row = TableRow;
|