@govbr-ds/webcomponents 2.1.0 → 2.1.2
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 +0 -11
- package/cem/custom-elements.json +272 -71
- package/dist/cjs/app-globals-DcqHuMBv.js +9 -0
- package/dist/cjs/br-avatar.cjs.entry.js +248 -0
- package/dist/cjs/br-breadcrumb-item.cjs.entry.js +45 -0
- package/dist/cjs/br-breadcrumb.cjs.entry.js +443 -0
- package/dist/cjs/br-button_2.cjs.entry.js +280 -0
- package/dist/cjs/br-card.cjs.entry.js +111 -0
- package/dist/cjs/br-carousel-page.cjs.entry.js +80 -0
- package/dist/cjs/br-carousel.cjs.entry.js +565 -0
- package/dist/cjs/br-checkbox-group.cjs.entry.js +118 -0
- package/dist/cjs/br-checkbox.cjs.entry.js +288 -0
- package/dist/cjs/br-checkgroup.cjs.entry.js +20 -0
- package/dist/cjs/br-collapse_2.cjs.entry.js +683 -0
- package/dist/cjs/br-cookiebar-cookie.cjs.entry.js +83 -0
- package/dist/cjs/br-cookiebar-group.cjs.entry.js +309 -0
- package/dist/cjs/br-cookiebar-header.cjs.entry.js +39 -0
- package/dist/cjs/br-cookiebar-link.cjs.entry.js +55 -0
- package/dist/cjs/br-cookiebar-note-group.cjs.entry.js +70 -0
- package/dist/cjs/br-cookiebar-note.cjs.entry.js +25 -0
- package/dist/cjs/br-cookiebar.cjs.entry.js +758 -0
- package/dist/cjs/br-crumb.cjs.entry.js +51 -0
- package/dist/cjs/br-date-picker_3.cjs.entry.js +2447 -0
- package/dist/cjs/br-datetime-picker.cjs.entry.js +1886 -0
- package/dist/cjs/br-divider.cjs.entry.js +225 -0
- package/dist/cjs/br-dropdown_2.cjs.entry.js +2000 -0
- package/dist/cjs/br-footer-category.cjs.entry.js +102 -0
- package/dist/cjs/br-footer-item.cjs.entry.js +52 -0
- package/dist/cjs/br-footer-legal.cjs.entry.js +41 -0
- package/dist/cjs/br-footer-logo.cjs.entry.js +104 -0
- package/dist/cjs/br-footer-social.cjs.entry.js +71 -0
- package/dist/cjs/br-footer.cjs.entry.js +92 -0
- package/dist/cjs/br-header-function.cjs.entry.js +142 -0
- package/dist/cjs/br-header-link.cjs.entry.js +60 -0
- package/dist/cjs/br-header-list.cjs.entry.js +279 -0
- package/dist/cjs/br-header-logo.cjs.entry.js +178 -0
- package/dist/cjs/br-header.cjs.entry.js +642 -0
- package/dist/cjs/br-icon.cjs.entry.js +485 -0
- package/dist/cjs/br-input.cjs.entry.js +599 -0
- package/dist/cjs/br-item.cjs.entry.js +367 -0
- package/dist/cjs/br-link.cjs.entry.js +133 -0
- package/dist/cjs/br-loading.cjs.entry.js +505 -0
- package/dist/cjs/br-magic-button.cjs.entry.js +93 -0
- package/dist/cjs/br-menu-group.cjs.entry.js +23 -0
- package/dist/cjs/br-menu-header.cjs.entry.js +47 -0
- package/dist/cjs/br-menu-info.cjs.entry.js +38 -0
- package/dist/cjs/br-menu-item.cjs.entry.js +79 -0
- package/dist/cjs/br-menu-link.cjs.entry.js +56 -0
- package/dist/cjs/br-menu-list.cjs.entry.js +149 -0
- package/dist/cjs/br-menu-logo.cjs.entry.js +75 -0
- package/dist/cjs/br-menu-social.cjs.entry.js +65 -0
- package/dist/cjs/br-menu.cjs.entry.js +993 -0
- package/dist/cjs/br-modal.cjs.entry.js +496 -0
- package/dist/cjs/br-notification-body.cjs.entry.js +71 -0
- package/dist/cjs/br-notification-header.cjs.entry.js +48 -0
- package/dist/cjs/br-notification-item.cjs.entry.js +110 -0
- package/dist/cjs/br-notification.cjs.entry.js +334 -0
- package/dist/cjs/br-pagination.cjs.entry.js +884 -0
- package/dist/cjs/br-radio-group.cjs.entry.js +428 -0
- package/dist/cjs/br-radio.cjs.entry.js +357 -0
- package/dist/cjs/br-scrim.cjs.entry.js +1336 -0
- package/dist/cjs/br-select-input_3.cjs.entry.js +988 -0
- package/dist/cjs/br-sign-in.cjs.entry.js +126 -0
- package/dist/cjs/br-skip-link-item.cjs.entry.js +20 -0
- package/dist/cjs/br-skip-link.cjs.entry.js +362 -0
- package/dist/cjs/br-skiplink-item.cjs.entry.js +192 -0
- package/dist/cjs/br-slider.cjs.entry.js +687 -0
- package/dist/cjs/br-step_2.cjs.entry.js +628 -0
- package/dist/cjs/br-switch.cjs.entry.js +245 -0
- package/dist/cjs/br-tab-item.cjs.entry.js +185 -0
- package/dist/cjs/br-tab.cjs.entry.js +397 -0
- package/dist/cjs/br-table-body.cjs.entry.js +37 -0
- package/dist/cjs/br-table-cell.cjs.entry.js +184 -0
- package/dist/cjs/br-table-header-cell.cjs.entry.js +173 -0
- package/dist/cjs/br-table-header.cjs.entry.js +37 -0
- package/dist/cjs/br-table-row.cjs.entry.js +81 -0
- package/dist/cjs/br-table.cjs.entry.js +680 -0
- package/dist/cjs/br-tag.cjs.entry.js +493 -0
- package/dist/cjs/br-textarea.cjs.entry.js +306 -0
- package/dist/cjs/br-tooltip.cjs.entry.js +627 -0
- package/dist/cjs/br-upload.cjs.entry.js +581 -0
- package/dist/cjs/br-wizard-panel.cjs.entry.js +54 -0
- package/dist/cjs/br-wizard.cjs.entry.js +708 -0
- package/dist/cjs/breakpoint-observer-P8veqXg7.js +144 -0
- package/dist/cjs/clamp-Co_hWptd.js +25 -0
- package/dist/cjs/cookiebar.utils-CB1gQwZ4.js +18 -0
- package/dist/cjs/datetime-picker-constants-B5pWeOn1.js +3827 -0
- package/dist/cjs/event-CmVdNHxl.js +56 -0
- package/dist/cjs/floating-surface-dismiss-ccdiD0KF.js +63 -0
- package/dist/cjs/floating-ui-MBI1osio.js +136 -0
- package/dist/cjs/floating-ui.dom-BUSTaaxR.js +1715 -0
- package/dist/cjs/focus-DuywwJPR.js +30 -0
- package/dist/cjs/getNextElement-R9l3JtM9.js +31 -0
- package/dist/cjs/iconify-icon-DfODV9bf.js +2307 -0
- package/dist/cjs/id-CjRFMzf6.js +20 -0
- package/dist/cjs/index-C92n55ch.js +678 -0
- package/dist/cjs/index-CRdcutym.js +3287 -0
- package/dist/cjs/index.cjs.js +12 -0
- package/dist/cjs/isNil-DO5zWc3l.js +19 -0
- package/dist/cjs/isValid-Fu3kaWNn.js +3694 -0
- package/dist/cjs/loader.cjs.js +17 -0
- package/dist/cjs/native-dialog--Ewqm4w0.js +49 -0
- package/dist/cjs/navigation-AbzwcRCU.js +25 -0
- package/dist/cjs/parts-D5K3ae2C.js +19 -0
- package/dist/cjs/props-CScmBvKd.js +24 -0
- package/dist/cjs/raf-batcher-yc87a4dS.js +55 -0
- package/dist/cjs/slot-DAllytTj.js +48 -0
- package/dist/cjs/swipe-BU8_XE9f.js +345 -0
- package/dist/cjs/table-constants-BOPSay0B.js +183 -0
- package/dist/cjs/validator-CTCajtT9.js +123 -0
- package/dist/cjs/webcomponents.cjs.js +50 -0
- package/dist/collection/assets/icon-search.svg +6 -0
- package/dist/collection/assets/logo-negative.svg +1 -0
- package/dist/collection/assets/logo-positive.svg +1 -0
- package/dist/collection/assets/wc.svg +1 -0
- package/dist/collection/collection-manifest.json +113 -0
- package/dist/collection/components/avatar/avatar.css +1 -0
- package/dist/collection/components/avatar/avatar.js +589 -0
- package/dist/collection/components/avatar/avatar.types.js +1 -0
- package/dist/collection/components/breadcrumb/breadcrumb-item/breadcrumb-item.js +166 -0
- package/dist/collection/components/breadcrumb/breadcrumb.css +1 -0
- package/dist/collection/components/breadcrumb/breadcrumb.js +619 -0
- package/dist/collection/components/breadcrumb/breadcrumb.types.js +1 -0
- package/dist/collection/components/breadcrumb/crumb/crumb.js +175 -0
- package/dist/collection/components/button/button.css +1 -0
- package/dist/collection/components/button/button.js +546 -0
- package/dist/collection/components/button/button.types.js +1 -0
- package/dist/collection/components/card/card.css +1 -0
- package/dist/collection/components/card/card.js +225 -0
- package/dist/collection/components/carousel/carousel-page/carousel-page.css +1 -0
- package/dist/collection/components/carousel/carousel-page/carousel-page.js +195 -0
- package/dist/collection/components/carousel/carousel.css +1 -0
- package/dist/collection/components/carousel/carousel.js +1217 -0
- package/dist/collection/components/carousel/carousel.types.js +1 -0
- package/dist/collection/components/checkbox/checkbox.css +1 -0
- package/dist/collection/components/checkbox/checkbox.js +823 -0
- package/dist/collection/components/checkbox/checkbox.types.js +1 -0
- package/dist/collection/components/checkbox-group/checkbox-group.css +1 -0
- package/dist/collection/components/checkbox-group/checkbox-group.js +268 -0
- package/dist/collection/components/checkgroup/checkgroup.js +166 -0
- package/dist/collection/components/collapse/collapse.css +1 -0
- package/dist/collection/components/collapse/collapse.js +642 -0
- package/dist/collection/components/collapse/collapse.types.js +1 -0
- package/dist/collection/components/cookiebar/cookiebar-cookie/cookiebar-cookie.css +1 -0
- package/dist/collection/components/cookiebar/cookiebar-cookie/cookiebar-cookie.js +529 -0
- package/dist/collection/components/cookiebar/cookiebar-group/cookiebar-group.css +1 -0
- package/dist/collection/components/cookiebar/cookiebar-group/cookiebar-group.js +628 -0
- package/dist/collection/components/cookiebar/cookiebar-header/cookiebar-header.css +1 -0
- package/dist/collection/components/cookiebar/cookiebar-header/cookiebar-header.js +165 -0
- package/dist/collection/components/cookiebar/cookiebar-link/cookiebar-link.css +1 -0
- package/dist/collection/components/cookiebar/cookiebar-link/cookiebar-link.js +201 -0
- package/dist/collection/components/cookiebar/cookiebar-note/cookiebar-note.css +1 -0
- package/dist/collection/components/cookiebar/cookiebar-note/cookiebar-note.js +100 -0
- package/dist/collection/components/cookiebar/cookiebar-note-group/cookiebar-note-group.css +1 -0
- package/dist/collection/components/cookiebar/cookiebar-note-group/cookiebar-note-group.js +172 -0
- package/dist/collection/components/cookiebar/cookiebar.css +1 -0
- package/dist/collection/components/cookiebar/cookiebar.js +1419 -0
- package/dist/collection/components/cookiebar/cookiebar.types.js +1 -0
- package/dist/collection/components/cookiebar/cookiebar.utils.js +14 -0
- package/dist/collection/components/datetime-picker/date-picker/date-picker-locale.js +94 -0
- package/dist/collection/components/datetime-picker/date-picker/date-picker-props-validation.js +57 -0
- package/dist/collection/components/datetime-picker/date-picker/date-picker.css +1 -0
- package/dist/collection/components/datetime-picker/date-picker/date-picker.js +913 -0
- package/dist/collection/components/datetime-picker/datetime-input/datetime-input-props-validation.js +65 -0
- package/dist/collection/components/datetime-picker/datetime-input/datetime-input.css +1 -0
- package/dist/collection/components/datetime-picker/datetime-input/datetime-input.js +826 -0
- package/dist/collection/components/datetime-picker/datetime-picker-constants.js +36 -0
- package/dist/collection/components/datetime-picker/datetime-picker-form-associated.js +112 -0
- package/dist/collection/components/datetime-picker/datetime-picker-props-validation.js +202 -0
- package/dist/collection/components/datetime-picker/datetime-picker.css +1 -0
- package/dist/collection/components/datetime-picker/datetime-picker.js +1924 -0
- package/dist/collection/components/datetime-picker/datetime-picker.types.js +1 -0
- package/dist/collection/components/datetime-picker/datetime-picker.utils.js +250 -0
- package/dist/collection/components/datetime-picker/time-picker/time-picker-constants.js +13 -0
- package/dist/collection/components/datetime-picker/time-picker/time-picker.css +1 -0
- package/dist/collection/components/datetime-picker/time-picker/time-picker.js +456 -0
- package/dist/collection/components/divider/divider.css +1 -0
- package/dist/collection/components/divider/divider.js +537 -0
- package/dist/collection/components/divider/divider.types.js +1 -0
- package/dist/collection/components/dropdown/dropdown.css +1 -0
- package/dist/collection/components/dropdown/dropdown.js +939 -0
- package/dist/collection/components/dropdown/dropdown.types.js +1 -0
- package/dist/collection/components/footer/footer-category/footer-category.css +1 -0
- package/dist/collection/components/footer/footer-category/footer-category.js +160 -0
- package/dist/collection/components/footer/footer-item/footer-item.css +1 -0
- package/dist/collection/components/footer/footer-item/footer-item.js +154 -0
- package/dist/collection/components/footer/footer-legal/footer-legal.css +1 -0
- package/dist/collection/components/footer/footer-legal/footer-legal.js +75 -0
- package/dist/collection/components/footer/footer-logo/footer-logo.css +1 -0
- package/dist/collection/components/footer/footer-logo/footer-logo.js +342 -0
- package/dist/collection/components/footer/footer-logo/footer-logo.types.js +1 -0
- package/dist/collection/components/footer/footer-social/footer-social.css +1 -0
- package/dist/collection/components/footer/footer-social/footer-social.js +239 -0
- package/dist/collection/components/footer/footer.css +1 -0
- package/dist/collection/components/footer/footer.js +245 -0
- package/dist/collection/components/footer/footer.types.js +1 -0
- package/dist/collection/components/global.types.js +1 -0
- package/dist/collection/components/header/header-function/header-function.css +1 -0
- package/dist/collection/components/header/header-function/header-function.js +311 -0
- package/dist/collection/components/header/header-link/header-link.css +1 -0
- package/dist/collection/components/header/header-link/header-link.js +189 -0
- package/dist/collection/components/header/header-list/header-list.css +1 -0
- package/dist/collection/components/header/header-list/header-list.js +452 -0
- package/dist/collection/components/header/header-logo/header-logo.css +1 -0
- package/dist/collection/components/header/header-logo/header-logo.js +421 -0
- package/dist/collection/components/header/header.css +1 -0
- package/dist/collection/components/header/header.js +1131 -0
- package/dist/collection/components/header/header.types.js +1 -0
- package/dist/collection/components/icon/default-icons-cache.js +233 -0
- package/dist/collection/components/icon/icon.css +1 -0
- package/dist/collection/components/icon/icon.js +598 -0
- package/dist/collection/components/icon/icon.types.js +1 -0
- package/dist/collection/components/icon/icon.utils.js +33 -0
- package/dist/collection/components/input/input.css +1 -0
- package/dist/collection/components/input/input.js +1642 -0
- package/dist/collection/components/input/input.types.js +1 -0
- package/dist/collection/components/item/item.css +1 -0
- package/dist/collection/components/item/item.js +917 -0
- package/dist/collection/components/item/item.types.js +1 -0
- package/dist/collection/components/link/link.css +1 -0
- package/dist/collection/components/link/link.js +699 -0
- package/dist/collection/components/list/list.css +1 -0
- package/dist/collection/components/list/list.js +728 -0
- package/dist/collection/components/loading/loading.css +1 -0
- package/dist/collection/components/loading/loading.js +1169 -0
- package/dist/collection/components/loading/loading.types.js +1 -0
- package/dist/collection/components/magic-button/magic-button.css +1 -0
- package/dist/collection/components/magic-button/magic-button.js +238 -0
- package/dist/collection/components/menu/menu-group/menu-group.css +1 -0
- package/dist/collection/components/menu/menu-group/menu-group.js +77 -0
- package/dist/collection/components/menu/menu-header/menu-header.css +1 -0
- package/dist/collection/components/menu/menu-header/menu-header.js +161 -0
- package/dist/collection/components/menu/menu-info/menu-info.css +1 -0
- package/dist/collection/components/menu/menu-info/menu-info.js +94 -0
- package/dist/collection/components/menu/menu-item/menu-item.css +1 -0
- package/dist/collection/components/menu/menu-item/menu-item.js +306 -0
- package/dist/collection/components/menu/menu-item/menu-item.types.js +1 -0
- package/dist/collection/components/menu/menu-link/menu-link.css +1 -0
- package/dist/collection/components/menu/menu-link/menu-link.js +260 -0
- package/dist/collection/components/menu/menu-list/menu-list.css +1 -0
- package/dist/collection/components/menu/menu-list/menu-list.js +311 -0
- package/dist/collection/components/menu/menu-logo/menu-logo.css +1 -0
- package/dist/collection/components/menu/menu-logo/menu-logo.js +230 -0
- package/dist/collection/components/menu/menu-social/menu-social.css +1 -0
- package/dist/collection/components/menu/menu-social/menu-social.js +263 -0
- package/dist/collection/components/menu/menu.css +1 -0
- package/dist/collection/components/menu/menu.js +1372 -0
- package/dist/collection/components/menu/menu.types.js +1 -0
- package/dist/collection/components/menu/menu.utils.js +279 -0
- package/dist/collection/components/message/message.css +1 -0
- package/dist/collection/components/message/message.js +508 -0
- package/dist/collection/components/modal/modal.css +1 -0
- package/dist/collection/components/modal/modal.js +842 -0
- package/dist/collection/components/modal/modal.types.js +1 -0
- package/dist/collection/components/notification/notification-body/notification-body.css +1 -0
- package/dist/collection/components/notification/notification-body/notification-body.js +153 -0
- package/dist/collection/components/notification/notification-header/notification-header.css +1 -0
- package/dist/collection/components/notification/notification-header/notification-header.js +181 -0
- package/dist/collection/components/notification/notification-item/notification-item.css +1 -0
- package/dist/collection/components/notification/notification-item/notification-item.js +351 -0
- package/dist/collection/components/notification/notification-item/notification-item.types.js +1 -0
- package/dist/collection/components/notification/notification.css +1 -0
- package/dist/collection/components/notification/notification.js +838 -0
- package/dist/collection/components/notification/notification.types.js +1 -0
- package/dist/collection/components/pagination/pagination.css +1 -0
- package/dist/collection/components/pagination/pagination.js +1470 -0
- package/dist/collection/components/pagination/pagination.types.js +1 -0
- package/dist/collection/components/radio/radio.css +1 -0
- package/dist/collection/components/radio/radio.js +847 -0
- package/dist/collection/components/radio/radio.types.js +1 -0
- package/dist/collection/components/radio-group/radio-group.css +1 -0
- package/dist/collection/components/radio-group/radio-group.js +862 -0
- package/dist/collection/components/radio-group/radio-group.types.js +1 -0
- package/dist/collection/components/scrim/scrim.css +1 -0
- package/dist/collection/components/scrim/scrim.js +1825 -0
- package/dist/collection/components/scrim/scrim.types.js +1 -0
- package/dist/collection/components/scrim/scrim.utils.js +132 -0
- package/dist/collection/components/select/select-input/select-input.css +1 -0
- package/dist/collection/components/select/select-input/select-input.js +586 -0
- package/dist/collection/components/select/select-list/select-list.css +1 -0
- package/dist/collection/components/select/select-list/select-list.js +1159 -0
- package/dist/collection/components/select/select-option/select-option.css +1 -0
- package/dist/collection/components/select/select-option/select-option.js +564 -0
- package/dist/collection/components/select/select.constants.js +6 -0
- package/dist/collection/components/select/select.css +1 -0
- package/dist/collection/components/select/select.js +2692 -0
- package/dist/collection/components/select/select.types.js +1 -0
- package/dist/collection/components/select/select.utils.js +34 -0
- package/dist/collection/components/sign-in/sign-in.css +1 -0
- package/dist/collection/components/sign-in/sign-in.js +401 -0
- package/dist/collection/components/sign-in/sign-in.types.js +1 -0
- package/dist/collection/components/skip-link/skip-link-item/skip-link-item-alias.js +103 -0
- package/dist/collection/components/skip-link/skip-link-item/skip-link-item.css +1 -0
- package/dist/collection/components/skip-link/skip-link-item/skip-link-item.js +450 -0
- package/dist/collection/components/skip-link/skip-link.css +1 -0
- package/dist/collection/components/skip-link/skip-link.js +699 -0
- package/dist/collection/components/skip-link/skip-link.types.js +1 -0
- package/dist/collection/components/slider/slider.css +1 -0
- package/dist/collection/components/slider/slider.js +1324 -0
- package/dist/collection/components/slider/slider.types.js +1 -0
- package/dist/collection/components/step/step-item/step-item.css +1 -0
- package/dist/collection/components/step/step-item/step-item.js +604 -0
- package/dist/collection/components/step/step-item/step-item.types.js +1 -0
- package/dist/collection/components/step/step.css +1 -0
- package/dist/collection/components/step/step.js +896 -0
- package/dist/collection/components/step/step.types.js +1 -0
- package/dist/collection/components/switch/switch.css +1 -0
- package/dist/collection/components/switch/switch.js +715 -0
- package/dist/collection/components/switch/switch.types.js +1 -0
- package/dist/collection/components/tab/tab-item/tab-item.css +1 -0
- package/dist/collection/components/tab/tab-item/tab-item.js +425 -0
- package/dist/collection/components/tab/tab.css +1 -0
- package/dist/collection/components/tab/tab.js +724 -0
- package/dist/collection/components/tab/tab.types.js +1 -0
- package/dist/collection/components/table/table-body/table-body.css +1 -0
- package/dist/collection/components/table/table-body/table-body.js +51 -0
- package/dist/collection/components/table/table-cell/table-cell.css +1 -0
- package/dist/collection/components/table/table-cell/table-cell.js +373 -0
- package/dist/collection/components/table/table-constants.js +171 -0
- package/dist/collection/components/table/table-header/table-header.css +1 -0
- package/dist/collection/components/table/table-header/table-header.js +51 -0
- package/dist/collection/components/table/table-header-cell/table-header-cell.css +1 -0
- package/dist/collection/components/table/table-header-cell/table-header-cell.js +402 -0
- package/dist/collection/components/table/table-row/table-row.css +1 -0
- package/dist/collection/components/table/table-row/table-row.js +261 -0
- package/dist/collection/components/table/table-tokens.js +50 -0
- package/dist/collection/components/table/table-types.js +1 -0
- package/dist/collection/components/table/table-utils.js +44 -0
- package/dist/collection/components/table/table.css +1 -0
- package/dist/collection/components/table/table.js +1030 -0
- package/dist/collection/components/tag/tag.css +1 -0
- package/dist/collection/components/tag/tag.js +1152 -0
- package/dist/collection/components/tag/tag.types.js +1 -0
- package/dist/collection/components/textarea/textarea.css +1 -0
- package/dist/collection/components/textarea/textarea.js +985 -0
- package/dist/collection/components/textarea/textarea.types.js +1 -0
- package/dist/collection/components/tooltip/tooltip.css +1 -0
- package/dist/collection/components/tooltip/tooltip.js +1024 -0
- package/dist/collection/components/tooltip/tooltip.types.js +1 -0
- package/dist/collection/components/upload/upload.css +1 -0
- package/dist/collection/components/upload/upload.js +1314 -0
- package/dist/collection/components/upload/upload.types.js +1 -0
- package/dist/collection/components/wizard/wizard-panel/wizard-panel.css +1 -0
- package/dist/collection/components/wizard/wizard-panel/wizard-panel.js +167 -0
- package/dist/collection/components/wizard/wizard.css +1 -0
- package/dist/collection/components/wizard/wizard.js +1228 -0
- package/dist/collection/index.js +14 -0
- package/dist/collection/pages/components/cookiebar/index.js +26 -0
- package/dist/collection/pages/components/link/index.js +29 -0
- package/dist/collection/pages/components/pagination/index.js +12 -0
- package/dist/collection/pages/components/slider/index.js +18 -0
- package/dist/collection/pages/scripts/code-editor.js +101 -0
- package/dist/collection/pages/scripts/component-controls.js +600 -0
- package/dist/collection/pages/scripts/dev-event-console.js +47 -0
- package/dist/collection/pages/scripts/menu.js +192 -0
- package/dist/collection/pages/scripts/pageLoader.js +1422 -0
- package/dist/collection/shared/utils/assetsPath.js +75 -0
- package/dist/collection/shared/utils/breakpoint-observer.js +139 -0
- package/dist/collection/shared/utils/clamp.js +21 -0
- package/dist/collection/shared/utils/css-variables.js +12 -0
- package/dist/collection/shared/utils/cssVariables.js +37 -0
- package/dist/collection/shared/utils/date.js +405 -0
- package/dist/collection/shared/utils/debounce.js +39 -0
- package/dist/collection/shared/utils/event.js +55 -0
- package/dist/collection/shared/utils/floating-surface-dismiss.js +59 -0
- package/dist/collection/shared/utils/floating-ui.js +131 -0
- package/dist/collection/shared/utils/focus.js +24 -0
- package/dist/collection/shared/utils/form.js +82 -0
- package/dist/collection/shared/utils/format-bytes.js +20 -0
- package/dist/collection/shared/utils/getNextElement.js +30 -0
- package/dist/collection/shared/utils/getRandom.js +27 -0
- package/dist/collection/shared/utils/helpers.js +31 -0
- package/dist/collection/shared/utils/id.js +16 -0
- package/dist/collection/shared/utils/index.js +60 -0
- package/dist/collection/shared/utils/interfaces.js +1 -0
- package/dist/collection/shared/utils/isClient.js +14 -0
- package/dist/collection/shared/utils/isDefined.js +19 -0
- package/dist/collection/shared/utils/isEmpty.js +30 -0
- package/dist/collection/shared/utils/isHTMLElement.js +16 -0
- package/dist/collection/shared/utils/isNil.js +15 -0
- package/dist/collection/shared/utils/isString.js +20 -0
- package/dist/collection/shared/utils/native-dialog.js +44 -0
- package/dist/collection/shared/utils/navigation.js +21 -0
- package/dist/collection/shared/utils/parts.js +15 -0
- package/dist/collection/shared/utils/prop-warning.js +7 -0
- package/dist/collection/shared/utils/props.js +37 -0
- package/dist/collection/shared/utils/raf-batcher.js +51 -0
- package/dist/collection/shared/utils/scrollLock.js +141 -0
- package/dist/collection/shared/utils/setRafTimeout.js +38 -0
- package/dist/collection/shared/utils/slot.js +113 -0
- package/dist/collection/shared/utils/ssr-date.js +33 -0
- package/dist/collection/shared/utils/stringToArray.js +29 -0
- package/dist/collection/shared/utils/swipe.js +342 -0
- package/dist/collection/shared/utils/transition.js +127 -0
- package/dist/collection/shared/utils/types.js +1 -0
- package/dist/collection/shared/utils/validator.js +51 -0
- package/dist/collection/value-accessors/angular-value-accessor-config.js +41 -0
- package/dist/collection/value-accessors/index.js +6 -0
- package/dist/collection/value-accessors/vue-model-config.js +43 -0
- package/dist/components/br-avatar.d.ts +11 -0
- package/dist/components/br-avatar.js +5 -0
- package/dist/components/br-breadcrumb-item.d.ts +11 -0
- package/dist/components/br-breadcrumb-item.js +5 -0
- package/dist/components/br-breadcrumb.d.ts +11 -0
- package/dist/components/br-breadcrumb.js +5 -0
- package/dist/components/br-button.d.ts +11 -0
- package/dist/components/br-button.js +5 -0
- package/dist/components/br-card.d.ts +11 -0
- package/dist/components/br-card.js +5 -0
- package/dist/components/br-carousel-page.d.ts +11 -0
- package/dist/components/br-carousel-page.js +5 -0
- package/dist/components/br-carousel.d.ts +11 -0
- package/dist/components/br-carousel.js +5 -0
- package/dist/components/br-checkbox-group.d.ts +11 -0
- package/dist/components/br-checkbox-group.js +5 -0
- package/dist/components/br-checkbox.d.ts +11 -0
- package/dist/components/br-checkbox.js +5 -0
- package/dist/components/br-checkgroup.d.ts +11 -0
- package/dist/components/br-checkgroup.js +5 -0
- package/dist/components/br-collapse.d.ts +11 -0
- package/dist/components/br-collapse.js +5 -0
- package/dist/components/br-cookiebar-cookie.d.ts +11 -0
- package/dist/components/br-cookiebar-cookie.js +5 -0
- package/dist/components/br-cookiebar-group.d.ts +11 -0
- package/dist/components/br-cookiebar-group.js +5 -0
- package/dist/components/br-cookiebar-header.d.ts +11 -0
- package/dist/components/br-cookiebar-header.js +5 -0
- package/dist/components/br-cookiebar-link.d.ts +11 -0
- package/dist/components/br-cookiebar-link.js +5 -0
- package/dist/components/br-cookiebar-note-group.d.ts +11 -0
- package/dist/components/br-cookiebar-note-group.js +5 -0
- package/dist/components/br-cookiebar-note.d.ts +11 -0
- package/dist/components/br-cookiebar-note.js +5 -0
- package/dist/components/br-cookiebar.d.ts +11 -0
- package/dist/components/br-cookiebar.js +5 -0
- package/dist/components/br-crumb.d.ts +11 -0
- package/dist/components/br-crumb.js +5 -0
- package/dist/components/br-date-picker.d.ts +11 -0
- package/dist/components/br-date-picker.js +5 -0
- package/dist/components/br-datetime-input.d.ts +11 -0
- package/dist/components/br-datetime-input.js +5 -0
- package/dist/components/br-datetime-picker.d.ts +11 -0
- package/dist/components/br-datetime-picker.js +5 -0
- package/dist/components/br-divider.d.ts +11 -0
- package/dist/components/br-divider.js +5 -0
- package/dist/components/br-dropdown.d.ts +11 -0
- package/dist/components/br-dropdown.js +5 -0
- package/dist/components/br-footer-category.d.ts +11 -0
- package/dist/components/br-footer-category.js +5 -0
- package/dist/components/br-footer-item.d.ts +11 -0
- package/dist/components/br-footer-item.js +5 -0
- package/dist/components/br-footer-legal.d.ts +11 -0
- package/dist/components/br-footer-legal.js +5 -0
- package/dist/components/br-footer-logo.d.ts +11 -0
- package/dist/components/br-footer-logo.js +5 -0
- package/dist/components/br-footer-social.d.ts +11 -0
- package/dist/components/br-footer-social.js +5 -0
- package/dist/components/br-footer.d.ts +11 -0
- package/dist/components/br-footer.js +5 -0
- package/dist/components/br-header-function.d.ts +11 -0
- package/dist/components/br-header-function.js +5 -0
- package/dist/components/br-header-link.d.ts +11 -0
- package/dist/components/br-header-link.js +5 -0
- package/dist/components/br-header-list.d.ts +11 -0
- package/dist/components/br-header-list.js +5 -0
- package/dist/components/br-header-logo.d.ts +11 -0
- package/dist/components/br-header-logo.js +5 -0
- package/dist/components/br-header.d.ts +11 -0
- package/dist/components/br-header.js +5 -0
- package/dist/components/br-icon.d.ts +11 -0
- package/dist/components/br-icon.js +5 -0
- package/dist/components/br-input.d.ts +11 -0
- package/dist/components/br-input.js +5 -0
- package/dist/components/br-item.d.ts +11 -0
- package/dist/components/br-item.js +5 -0
- package/dist/components/br-link.d.ts +11 -0
- package/dist/components/br-link.js +5 -0
- package/dist/components/br-list.d.ts +11 -0
- package/dist/components/br-list.js +5 -0
- package/dist/components/br-loading.d.ts +11 -0
- package/dist/components/br-loading.js +5 -0
- package/dist/components/br-magic-button.d.ts +11 -0
- package/dist/components/br-magic-button.js +5 -0
- package/dist/components/br-menu-group.d.ts +11 -0
- package/dist/components/br-menu-group.js +5 -0
- package/dist/components/br-menu-header.d.ts +11 -0
- package/dist/components/br-menu-header.js +5 -0
- package/dist/components/br-menu-info.d.ts +11 -0
- package/dist/components/br-menu-info.js +5 -0
- package/dist/components/br-menu-item.d.ts +11 -0
- package/dist/components/br-menu-item.js +5 -0
- package/dist/components/br-menu-link.d.ts +11 -0
- package/dist/components/br-menu-link.js +5 -0
- package/dist/components/br-menu-list.d.ts +11 -0
- package/dist/components/br-menu-list.js +5 -0
- package/dist/components/br-menu-logo.d.ts +11 -0
- package/dist/components/br-menu-logo.js +5 -0
- package/dist/components/br-menu-social.d.ts +11 -0
- package/dist/components/br-menu-social.js +5 -0
- package/dist/components/br-menu.d.ts +11 -0
- package/dist/components/br-menu.js +5 -0
- package/dist/components/br-message.d.ts +11 -0
- package/dist/components/br-message.js +5 -0
- package/dist/components/br-modal.d.ts +11 -0
- package/dist/components/br-modal.js +5 -0
- package/dist/components/br-notification-body.d.ts +11 -0
- package/dist/components/br-notification-body.js +5 -0
- package/dist/components/br-notification-header.d.ts +11 -0
- package/dist/components/br-notification-header.js +5 -0
- package/dist/components/br-notification-item.d.ts +11 -0
- package/dist/components/br-notification-item.js +5 -0
- package/dist/components/br-notification.d.ts +11 -0
- package/dist/components/br-notification.js +5 -0
- package/dist/components/br-pagination.d.ts +11 -0
- package/dist/components/br-pagination.js +5 -0
- package/dist/components/br-radio-group.d.ts +11 -0
- package/dist/components/br-radio-group.js +5 -0
- package/dist/components/br-radio.d.ts +11 -0
- package/dist/components/br-radio.js +5 -0
- package/dist/components/br-scrim.d.ts +11 -0
- package/dist/components/br-scrim.js +5 -0
- package/dist/components/br-select-input.d.ts +11 -0
- package/dist/components/br-select-input.js +5 -0
- package/dist/components/br-select-list.d.ts +11 -0
- package/dist/components/br-select-list.js +5 -0
- package/dist/components/br-select-option.d.ts +11 -0
- package/dist/components/br-select-option.js +5 -0
- package/dist/components/br-select.d.ts +11 -0
- package/dist/components/br-select.js +5 -0
- package/dist/components/br-sign-in.d.ts +11 -0
- package/dist/components/br-sign-in.js +5 -0
- package/dist/components/br-skip-link-item.d.ts +11 -0
- package/dist/components/br-skip-link-item.js +5 -0
- package/dist/components/br-skip-link.d.ts +11 -0
- package/dist/components/br-skip-link.js +5 -0
- package/dist/components/br-skiplink-item.d.ts +11 -0
- package/dist/components/br-skiplink-item.js +5 -0
- package/dist/components/br-slider.d.ts +11 -0
- package/dist/components/br-slider.js +5 -0
- package/dist/components/br-step-item.d.ts +11 -0
- package/dist/components/br-step-item.js +5 -0
- package/dist/components/br-step.d.ts +11 -0
- package/dist/components/br-step.js +5 -0
- package/dist/components/br-switch.d.ts +11 -0
- package/dist/components/br-switch.js +5 -0
- package/dist/components/br-tab-item.d.ts +11 -0
- package/dist/components/br-tab-item.js +5 -0
- package/dist/components/br-tab.d.ts +11 -0
- package/dist/components/br-tab.js +5 -0
- package/dist/components/br-table-body.d.ts +11 -0
- package/dist/components/br-table-body.js +5 -0
- package/dist/components/br-table-cell.d.ts +11 -0
- package/dist/components/br-table-cell.js +5 -0
- package/dist/components/br-table-header-cell.d.ts +11 -0
- package/dist/components/br-table-header-cell.js +5 -0
- package/dist/components/br-table-header.d.ts +11 -0
- package/dist/components/br-table-header.js +5 -0
- package/dist/components/br-table-row.d.ts +11 -0
- package/dist/components/br-table-row.js +5 -0
- package/dist/components/br-table.d.ts +11 -0
- package/dist/components/br-table.js +5 -0
- package/dist/components/br-tag.d.ts +11 -0
- package/dist/components/br-tag.js +5 -0
- package/dist/components/br-textarea.d.ts +11 -0
- package/dist/components/br-textarea.js +5 -0
- package/dist/components/br-time-picker.d.ts +11 -0
- package/dist/components/br-time-picker.js +5 -0
- package/dist/components/br-tooltip.d.ts +11 -0
- package/dist/components/br-tooltip.js +5 -0
- package/dist/components/br-upload.d.ts +11 -0
- package/dist/components/br-upload.js +5 -0
- package/dist/components/br-wizard-panel.d.ts +11 -0
- package/dist/components/br-wizard-panel.js +5 -0
- package/dist/components/br-wizard.d.ts +11 -0
- package/dist/components/br-wizard.js +5 -0
- package/dist/components/index.d.ts +213 -0
- package/dist/components/index.js +5 -0
- package/dist/components/p-34Jfn-U-.js +5 -0
- package/dist/components/p-5z6jgH1D.js +5 -0
- package/dist/components/p-6OdfnwnK.js +5 -0
- package/dist/components/p-9S9bgUT0.js +5 -0
- package/dist/components/p-B-qLmYZC.js +5 -0
- package/dist/components/p-B55qsau4.js +5 -0
- package/dist/components/p-B7Amgxkp.js +5 -0
- package/dist/components/p-BC7f6MK8.js +5 -0
- package/dist/components/p-BKuMQJrQ.js +5 -0
- package/dist/components/p-BPJpHGOW.js +5 -0
- package/dist/components/p-BWXfdbQH.js +5 -0
- package/dist/components/p-Bb-nLtTG.js +5 -0
- package/dist/components/p-BeE7R9nu.js +5 -0
- package/dist/components/p-BkS6ujyf.js +5 -0
- package/dist/components/p-Bo0QYHJO.js +5 -0
- package/dist/components/p-C1yRmdso.js +5 -0
- package/dist/components/p-C2i2c_io.js +5 -0
- package/dist/components/p-C7v0lVlX.js +5 -0
- package/dist/components/p-CMBsvswx.js +5 -0
- package/dist/components/p-CRrimdz6.js +5 -0
- package/dist/components/p-CWORw84-.js +5 -0
- package/dist/components/p-CXMwM9m4.js +5 -0
- package/dist/components/p-CdDwqbBv.js +5 -0
- package/dist/components/p-CvUMXJCl.js +5 -0
- package/dist/components/p-D3usVJE2.js +16 -0
- package/dist/components/p-D6zroLx5.js +5 -0
- package/dist/components/p-DA5GS53D.js +5 -0
- package/dist/components/p-DBP6K_aq.js +5 -0
- package/dist/components/p-DBmwzG9E.js +5 -0
- package/dist/components/p-DCrVo-8T.js +5 -0
- package/dist/components/p-DFUKDNck.js +5 -0
- package/dist/components/p-DHicj0By.js +5 -0
- package/dist/components/p-DIK54tTj.js +5 -0
- package/dist/components/p-DQRSHR-D.js +5 -0
- package/dist/components/p-DRVMm1Py.js +5 -0
- package/dist/components/p-DWPmUV72.js +5 -0
- package/dist/components/p-DXjQyH6s.js +5 -0
- package/dist/components/p-DYA74R1r.js +5 -0
- package/dist/components/p-DmCxdB9P.js +5 -0
- package/dist/components/p-Dmfk7eEe.js +5 -0
- package/dist/components/p-Dp0xy_3n.js +5 -0
- package/dist/components/p-DxZJrIyL.js +5 -0
- package/dist/components/p-JAkkThgf.js +5 -0
- package/dist/components/p-Ud-WB0hx.js +5 -0
- package/dist/components/p-bhULC15U.js +5 -0
- package/dist/components/p-cF3ia5e9.js +5 -0
- package/dist/components/p-fpMNttbg.js +5 -0
- package/dist/components/p-gvnfuTjd.js +5 -0
- package/dist/components/p-qYONSNcf.js +5 -0
- package/dist/components/p-qhhHGJY1.js +5 -0
- package/dist/components/p-ttI0nvv_.js +5 -0
- package/dist/components/p-ukNmfGNP.js +5 -0
- package/dist/components/p-xa8e1kSW.js +5 -0
- package/dist/esm/app-globals-DVjNHTTs.js +7 -0
- package/dist/esm/br-avatar.entry.js +246 -0
- package/dist/esm/br-breadcrumb-item.entry.js +43 -0
- package/dist/esm/br-breadcrumb.entry.js +441 -0
- package/dist/esm/br-button_2.entry.js +277 -0
- package/dist/esm/br-card.entry.js +109 -0
- package/dist/esm/br-carousel-page.entry.js +78 -0
- package/dist/esm/br-carousel.entry.js +563 -0
- package/dist/esm/br-checkbox-group.entry.js +116 -0
- package/dist/esm/br-checkbox.entry.js +286 -0
- package/dist/esm/br-checkgroup.entry.js +18 -0
- package/dist/esm/br-collapse_2.entry.js +680 -0
- package/dist/esm/br-cookiebar-cookie.entry.js +81 -0
- package/dist/esm/br-cookiebar-group.entry.js +307 -0
- package/dist/esm/br-cookiebar-header.entry.js +37 -0
- package/dist/esm/br-cookiebar-link.entry.js +53 -0
- package/dist/esm/br-cookiebar-note-group.entry.js +68 -0
- package/dist/esm/br-cookiebar-note.entry.js +23 -0
- package/dist/esm/br-cookiebar.entry.js +756 -0
- package/dist/esm/br-crumb.entry.js +49 -0
- package/dist/esm/br-date-picker_3.entry.js +2443 -0
- package/dist/esm/br-datetime-picker.entry.js +1884 -0
- package/dist/esm/br-divider.entry.js +223 -0
- package/dist/esm/br-dropdown_2.entry.js +1997 -0
- package/dist/esm/br-footer-category.entry.js +100 -0
- package/dist/esm/br-footer-item.entry.js +50 -0
- package/dist/esm/br-footer-legal.entry.js +39 -0
- package/dist/esm/br-footer-logo.entry.js +102 -0
- package/dist/esm/br-footer-social.entry.js +69 -0
- package/dist/esm/br-footer.entry.js +90 -0
- package/dist/esm/br-header-function.entry.js +140 -0
- package/dist/esm/br-header-link.entry.js +58 -0
- package/dist/esm/br-header-list.entry.js +277 -0
- package/dist/esm/br-header-logo.entry.js +176 -0
- package/dist/esm/br-header.entry.js +640 -0
- package/dist/esm/br-icon.entry.js +483 -0
- package/dist/esm/br-input.entry.js +597 -0
- package/dist/esm/br-item.entry.js +365 -0
- package/dist/esm/br-link.entry.js +131 -0
- package/dist/esm/br-loading.entry.js +503 -0
- package/dist/esm/br-magic-button.entry.js +91 -0
- package/dist/esm/br-menu-group.entry.js +21 -0
- package/dist/esm/br-menu-header.entry.js +45 -0
- package/dist/esm/br-menu-info.entry.js +36 -0
- package/dist/esm/br-menu-item.entry.js +77 -0
- package/dist/esm/br-menu-link.entry.js +54 -0
- package/dist/esm/br-menu-list.entry.js +147 -0
- package/dist/esm/br-menu-logo.entry.js +73 -0
- package/dist/esm/br-menu-social.entry.js +63 -0
- package/dist/esm/br-menu.entry.js +991 -0
- package/dist/esm/br-modal.entry.js +494 -0
- package/dist/esm/br-notification-body.entry.js +69 -0
- package/dist/esm/br-notification-header.entry.js +46 -0
- package/dist/esm/br-notification-item.entry.js +108 -0
- package/dist/esm/br-notification.entry.js +332 -0
- package/dist/esm/br-pagination.entry.js +882 -0
- package/dist/esm/br-radio-group.entry.js +426 -0
- package/dist/esm/br-radio.entry.js +355 -0
- package/dist/esm/br-scrim.entry.js +1334 -0
- package/dist/esm/br-select-input_3.entry.js +984 -0
- package/dist/esm/br-sign-in.entry.js +124 -0
- package/dist/esm/br-skip-link-item.entry.js +18 -0
- package/dist/esm/br-skip-link.entry.js +360 -0
- package/dist/esm/br-skiplink-item.entry.js +190 -0
- package/dist/esm/br-slider.entry.js +685 -0
- package/dist/esm/br-step_2.entry.js +625 -0
- package/dist/esm/br-switch.entry.js +243 -0
- package/dist/esm/br-tab-item.entry.js +183 -0
- package/dist/esm/br-tab.entry.js +395 -0
- package/dist/esm/br-table-body.entry.js +35 -0
- package/dist/esm/br-table-cell.entry.js +182 -0
- package/dist/esm/br-table-header-cell.entry.js +171 -0
- package/dist/esm/br-table-header.entry.js +35 -0
- package/dist/esm/br-table-row.entry.js +79 -0
- package/dist/esm/br-table.entry.js +678 -0
- package/dist/esm/br-tag.entry.js +491 -0
- package/dist/esm/br-textarea.entry.js +304 -0
- package/dist/esm/br-tooltip.entry.js +625 -0
- package/dist/esm/br-upload.entry.js +579 -0
- package/dist/esm/br-wizard-panel.entry.js +52 -0
- package/dist/esm/br-wizard.entry.js +706 -0
- package/dist/esm/breakpoint-observer-DBmwzG9E.js +141 -0
- package/dist/esm/clamp-gvnfuTjd.js +23 -0
- package/dist/esm/cookiebar.utils-DYA74R1r.js +16 -0
- package/dist/esm/datetime-picker-constants-Bfm58jO6.js +3798 -0
- package/dist/esm/event-DFN_so7I.js +48 -0
- package/dist/esm/floating-surface-dismiss-BWXfdbQH.js +61 -0
- package/dist/esm/floating-ui-BavFwMnx.js +134 -0
- package/dist/esm/floating-ui.dom-DIK54tTj.js +1707 -0
- package/dist/esm/focus-DxZJrIyL.js +26 -0
- package/dist/esm/getNextElement-9S9bgUT0.js +28 -0
- package/dist/esm/iconify-icon-D3usVJE2.js +2303 -0
- package/dist/esm/id-BkS6ujyf.js +18 -0
- package/dist/esm/index-Bo-2igoO.js +671 -0
- package/dist/esm/index-C2RBydfd.js +3258 -0
- package/dist/esm/index.js +6 -0
- package/dist/esm/isNil-B-qLmYZC.js +17 -0
- package/dist/esm/isValid-DIUZX1qS.js +3684 -0
- package/dist/esm/loader.js +15 -0
- package/dist/esm/native-dialog-B55qsau4.js +46 -0
- package/dist/esm/navigation-bhULC15U.js +23 -0
- package/dist/esm/parts-Bb5vVlCC.js +17 -0
- package/dist/esm/props-DRVMm1Py.js +22 -0
- package/dist/esm/raf-batcher-cF3ia5e9.js +53 -0
- package/dist/esm/slot-BIG-yees.js +44 -0
- package/dist/esm/swipe-Dmfk7eEe.js +343 -0
- package/dist/esm/table-constants-CXMwM9m4.js +170 -0
- package/dist/esm/validator-D3tVP32U.js +113 -0
- package/dist/esm/webcomponents.js +46 -0
- package/dist/hydrate/index.d.ts +287 -0
- package/dist/hydrate/index.js +67516 -0
- package/dist/hydrate/index.mjs +67506 -0
- package/dist/hydrate/package.json +12 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/loader/cdn.js +5 -0
- package/dist/loader/index.cjs.js +5 -0
- package/dist/loader/index.d.ts +24 -0
- package/dist/loader/index.es2017.js +5 -0
- package/dist/loader/index.js +6 -0
- package/dist/types/components/item/item.d.ts +1 -0
- package/dist/types/components/select/select-list/select-list.d.ts +1 -0
- package/dist/types/components/select/select-option/select-option.d.ts +1 -0
- package/dist/types/components/select/select.d.ts +14 -0
- package/dist/types/components/select/select.types.d.ts +2 -0
- package/dist/types/components/select/select.utils.d.ts +13 -0
- package/dist/webcomponents/index.esm.js +5 -0
- package/dist/webcomponents/p-0196804a.entry.js +5 -0
- package/dist/webcomponents/p-0410186a.entry.js +5 -0
- package/dist/webcomponents/p-0415ef22.entry.js +5 -0
- package/dist/webcomponents/p-0777c7b1.entry.js +5 -0
- package/dist/webcomponents/p-0caa4d12.entry.js +5 -0
- package/dist/webcomponents/p-0d4f718d.entry.js +5 -0
- package/dist/webcomponents/p-0e84c9e8.entry.js +5 -0
- package/dist/webcomponents/p-12286e73.entry.js +5 -0
- package/dist/webcomponents/p-147ac8d3.entry.js +5 -0
- package/dist/webcomponents/p-1580beee.entry.js +5 -0
- package/dist/webcomponents/p-18ee6175.entry.js +5 -0
- package/dist/webcomponents/p-1bca4499.entry.js +5 -0
- package/dist/webcomponents/p-1c303a4e.entry.js +5 -0
- package/dist/webcomponents/p-1d6b0b6f.entry.js +5 -0
- package/dist/webcomponents/p-1d8cb8fd.entry.js +5 -0
- package/dist/webcomponents/p-224daaac.entry.js +5 -0
- package/dist/webcomponents/p-28426d2a.entry.js +5 -0
- package/dist/webcomponents/p-2abd2da0.entry.js +5 -0
- package/dist/webcomponents/p-2fdc51ae.entry.js +5 -0
- package/dist/webcomponents/p-30c428b6.entry.js +5 -0
- package/dist/webcomponents/p-36bbea4e.entry.js +5 -0
- package/dist/webcomponents/p-3907ebfa.entry.js +5 -0
- package/dist/webcomponents/p-39a16f9d.entry.js +5 -0
- package/dist/webcomponents/p-3ebbd2f5.entry.js +5 -0
- package/dist/webcomponents/p-3ef7eac8.entry.js +5 -0
- package/dist/webcomponents/p-45356e9a.entry.js +5 -0
- package/dist/webcomponents/p-46513db4.entry.js +5 -0
- package/dist/webcomponents/p-4c13221a.entry.js +5 -0
- package/dist/webcomponents/p-51ce2c31.entry.js +5 -0
- package/dist/webcomponents/p-52df61cb.entry.js +5 -0
- package/dist/webcomponents/p-569134cf.entry.js +5 -0
- package/dist/webcomponents/p-5ce7db4a.entry.js +5 -0
- package/dist/webcomponents/p-5f373708.entry.js +5 -0
- package/dist/webcomponents/p-5f6afb79.entry.js +5 -0
- package/dist/webcomponents/p-5fc7ba4c.entry.js +5 -0
- package/dist/webcomponents/p-66006312.entry.js +5 -0
- package/dist/webcomponents/p-66b13fd9.entry.js +5 -0
- package/dist/webcomponents/p-6OdfnwnK.js +5 -0
- package/dist/webcomponents/p-750799b7.entry.js +5 -0
- package/dist/webcomponents/p-756ff2ad.entry.js +5 -0
- package/dist/webcomponents/p-765bfe27.entry.js +5 -0
- package/dist/webcomponents/p-7ab96c11.entry.js +5 -0
- package/dist/webcomponents/p-7c2ff8b4.entry.js +5 -0
- package/dist/webcomponents/p-7f7506f0.entry.js +5 -0
- package/dist/webcomponents/p-7fb03a49.entry.js +5 -0
- package/dist/webcomponents/p-82200563.entry.js +5 -0
- package/dist/webcomponents/p-83ff4579.entry.js +5 -0
- package/dist/webcomponents/p-85f8063b.entry.js +5 -0
- package/dist/webcomponents/p-8b558233.entry.js +5 -0
- package/dist/webcomponents/p-8e6c2767.entry.js +5 -0
- package/dist/webcomponents/p-8e819355.entry.js +5 -0
- package/dist/webcomponents/p-92a9b9c4.entry.js +5 -0
- package/dist/webcomponents/p-966ad32f.entry.js +5 -0
- package/dist/webcomponents/p-9679d230.entry.js +5 -0
- package/dist/webcomponents/p-96dd663b.entry.js +5 -0
- package/dist/webcomponents/p-98843fa3.entry.js +5 -0
- package/dist/webcomponents/p-9S9bgUT0.js +5 -0
- package/dist/webcomponents/p-9a375eff.entry.js +5 -0
- package/dist/webcomponents/p-9b358cff.entry.js +5 -0
- package/dist/webcomponents/p-9f7558c7.entry.js +5 -0
- package/dist/webcomponents/p-B-qLmYZC.js +5 -0
- package/dist/webcomponents/p-B55qsau4.js +5 -0
- package/dist/webcomponents/p-BIG-yees.js +5 -0
- package/dist/webcomponents/p-BWXfdbQH.js +5 -0
- package/dist/webcomponents/p-Bb5vVlCC.js +5 -0
- package/dist/webcomponents/p-Bfm58jO6.js +5 -0
- package/dist/webcomponents/p-BhMVJQ4-.js +5 -0
- package/dist/webcomponents/p-BkS6ujyf.js +5 -0
- package/dist/webcomponents/p-C2RBydfd.js +6 -0
- package/dist/webcomponents/p-CO5cOQQU.js +5 -0
- package/dist/webcomponents/p-CXMwM9m4.js +5 -0
- package/dist/webcomponents/p-D3tVP32U.js +5 -0
- package/dist/webcomponents/p-D3usVJE2.js +16 -0
- package/dist/webcomponents/p-DBmwzG9E.js +5 -0
- package/dist/webcomponents/p-DFN_so7I.js +5 -0
- package/dist/webcomponents/p-DIK54tTj.js +5 -0
- package/dist/webcomponents/p-DRVMm1Py.js +5 -0
- package/dist/webcomponents/p-DVjNHTTs.js +5 -0
- package/dist/webcomponents/p-DYA74R1r.js +5 -0
- package/dist/webcomponents/p-Dmfk7eEe.js +5 -0
- package/dist/webcomponents/p-DxZJrIyL.js +5 -0
- package/dist/webcomponents/p-a382e115.entry.js +5 -0
- package/dist/webcomponents/p-a4ae72e3.entry.js +5 -0
- package/dist/webcomponents/p-a994c190.entry.js +5 -0
- package/dist/webcomponents/p-a9ff7c25.entry.js +5 -0
- package/dist/webcomponents/p-bhULC15U.js +5 -0
- package/dist/webcomponents/p-c0b0f531.entry.js +5 -0
- package/dist/webcomponents/p-c211af17.entry.js +5 -0
- package/dist/webcomponents/p-c492d926.entry.js +5 -0
- package/dist/webcomponents/p-c4cfe599.entry.js +5 -0
- package/dist/webcomponents/p-c846e784.entry.js +5 -0
- package/dist/webcomponents/p-c949d993.entry.js +5 -0
- package/dist/webcomponents/p-cF3ia5e9.js +5 -0
- package/dist/webcomponents/p-d1e899cd.entry.js +5 -0
- package/dist/webcomponents/p-d38d82cc.entry.js +5 -0
- package/dist/webcomponents/p-e0ce536a.entry.js +5 -0
- package/dist/webcomponents/p-e1331288.entry.js +5 -0
- package/dist/webcomponents/p-e360a463.entry.js +5 -0
- package/dist/webcomponents/p-f078f972.entry.js +5 -0
- package/dist/webcomponents/p-f26038e2.entry.js +5 -0
- package/dist/webcomponents/p-f303f6b3.entry.js +5 -0
- package/dist/webcomponents/p-f6318e94.entry.js +5 -0
- package/dist/webcomponents/p-f85ee01c.entry.js +5 -0
- package/dist/webcomponents/p-fcd4ae48.entry.js +5 -0
- package/dist/webcomponents/p-ffe0241e.entry.js +5 -0
- package/dist/webcomponents/p-gvnfuTjd.js +5 -0
- package/dist/webcomponents/webcomponents.esm.js +5 -0
- package/package.json +3 -7
- package/cem/.gitkeep +0 -0
|
@@ -0,0 +1,1419 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Construído por SERPRO
|
|
3
|
+
* © https://serpro.gov.br/ - MIT License.
|
|
4
|
+
*/
|
|
5
|
+
import { Host, h, } from "@stencil/core";
|
|
6
|
+
import { BREAKPOINTS, BreakpointObserver } from "../../shared/utils/breakpoint-observer";
|
|
7
|
+
import { isEventTargetInside } from "../../shared/utils/event";
|
|
8
|
+
import { generateUniqueId } from "../../shared/utils/id";
|
|
9
|
+
import { supportsNativeModalDialog, syncNativeModalDialog } from "../../shared/utils/native-dialog";
|
|
10
|
+
import { aggregateSelection } from "./cookiebar.utils";
|
|
11
|
+
/**
|
|
12
|
+
* Componente de gestão de consentimento de cookies (LGPD), obrigatório em sites e aplicativos do
|
|
13
|
+
* Governo Federal que coletam dados de usuários.
|
|
14
|
+
*
|
|
15
|
+
* Apresenta duas etapas visuais:
|
|
16
|
+
* - **default** – barra inferior com texto informativo e botões de ação;
|
|
17
|
+
* - **open** – painel de tela cheia com lista de classes de cookies configuráveis.
|
|
18
|
+
*
|
|
19
|
+
* A persistência do consentimento é responsabilidade do consumidor: ouça o evento
|
|
20
|
+
* `brCookiebarAccept` e armazene o payload onde desejar (localStorage, cookie HTTP, API etc.).
|
|
21
|
+
*
|
|
22
|
+
* Para a documentação completa, consulte o [Design System do GovBR](https://www.gov.br/ds/components/cookiebar?tab=designer).
|
|
23
|
+
*
|
|
24
|
+
* @category Feedback
|
|
25
|
+
* @status stable
|
|
26
|
+
* @slot default - Recebe os subcomponentes `br-cookiebar-group`, `br-cookiebar-note-group` e `br-cookiebar-note`.
|
|
27
|
+
* @slot header - Recebe `br-cookiebar-header` ou HTML livre.
|
|
28
|
+
* @slot links - Recebe links complementares (`br-cookiebar-link` ou elementos `<a>` livres).
|
|
29
|
+
* @slot actions - Recebe botões de ação. Se vazio, o componente renderiza os botões padrão.
|
|
30
|
+
*
|
|
31
|
+
* @part container - Container raiz do componente.
|
|
32
|
+
* @part default-panel - Painel fechado (modo default).
|
|
33
|
+
* @part open-panel - Painel expandido (modo open).
|
|
34
|
+
* @part header - Cabeçalho do painel aberto.
|
|
35
|
+
* @part body - Corpo do painel aberto (com rolagem).
|
|
36
|
+
* @part footer - Rodapé com botões de ação.
|
|
37
|
+
* @part scrim - Camada de sobreposição opcional.
|
|
38
|
+
*/
|
|
39
|
+
export class Cookiebar {
|
|
40
|
+
constructor() {
|
|
41
|
+
/**
|
|
42
|
+
* Descrição do painel `open` espelhada no Shadow DOM para uso em `aria-describedby`.
|
|
43
|
+
* Derivada do `entryText` do `br-cookiebar-header` filho (quando presente).
|
|
44
|
+
* Necessária porque `aria-describedby` não cruza o limite shadow/light DOM.
|
|
45
|
+
*/
|
|
46
|
+
this.openPanelDescription = '';
|
|
47
|
+
/** Indica se há conteúdo no slot `actions`. Controla a exibição da área de ações. */
|
|
48
|
+
this.hasActionsSlot = false;
|
|
49
|
+
/** Indica se há conteúdo no slot `header`. Controla a exibição da área de cabeçalho. */
|
|
50
|
+
this.hasHeaderSlot = false;
|
|
51
|
+
/** Indica se há conteúdo no slot `links`. Controla a exibição da área de links. */
|
|
52
|
+
this.hasLinksSlot = false;
|
|
53
|
+
/** Indica se o viewport está no breakpoint mobile (x-small, ≤575px). */
|
|
54
|
+
this.isMobile = false;
|
|
55
|
+
/**
|
|
56
|
+
* Texto anunciado pela região `aria-live` ao exibir o painel default.
|
|
57
|
+
* Mantido em elemento sr-only separado para não interferir com o foco do container.
|
|
58
|
+
*/
|
|
59
|
+
this.openLiveAnnouncement = '';
|
|
60
|
+
/** Estado atual do checkbox "Selecionar tudo": `true`, `false` ou `'indeterminate'`. */
|
|
61
|
+
this.selectAllState = false;
|
|
62
|
+
/** Identificador único; gerado automaticamente quando omitido. */
|
|
63
|
+
this.customId = generateUniqueId();
|
|
64
|
+
/**
|
|
65
|
+
* Controla a visibilidade do componente.
|
|
66
|
+
* O consumidor é responsável por definir este valor com base na persistência do consentimento
|
|
67
|
+
* (ex: verificar se já existe um cookie de consentimento salvo).
|
|
68
|
+
*/
|
|
69
|
+
this.show = false;
|
|
70
|
+
/**
|
|
71
|
+
* Estado visual atual do painel.
|
|
72
|
+
* - `default`: barra inferior com texto e botões.
|
|
73
|
+
* - `open`: painel de tela cheia com grupos de cookies configuráveis.
|
|
74
|
+
*/
|
|
75
|
+
this.mode = 'default';
|
|
76
|
+
/**
|
|
77
|
+
* Define se o cookiebar opera no padrão opt-out (`true`, recomendado) ou opt-in (`false`).
|
|
78
|
+
* - **opt-out** (`true`): botão secundário "Definir Cookies"; usuário pode configurar cookies.
|
|
79
|
+
* - **opt-in** (`false`): botão secundário "Ver Política de Cookies"; painel é somente leitura.
|
|
80
|
+
*/
|
|
81
|
+
this.allOptOut = true;
|
|
82
|
+
/** Texto do botão primário de aceite. Padrão: `Aceitar`. */
|
|
83
|
+
this.acceptButton = 'Aceitar';
|
|
84
|
+
/**
|
|
85
|
+
* Texto do botão de rejeição dos cookies não obrigatórios.
|
|
86
|
+
* Exibido apenas quando `show-reject-button="true"`.
|
|
87
|
+
*/
|
|
88
|
+
this.rejectButton = 'Rejeitar não obrigatórios';
|
|
89
|
+
/**
|
|
90
|
+
* Quando `true`, exibe o botão "Rejeitar não obrigatórios" nos painéis default e open.
|
|
91
|
+
* Cookies de grupos com `group-opt-out="false"` (sempre ativos) não são afetados.
|
|
92
|
+
*/
|
|
93
|
+
this.showRejectButton = false;
|
|
94
|
+
/** Texto do botão secundário quando `all-opt-out="true"`. */
|
|
95
|
+
this.optOutButton = 'Definir Cookies';
|
|
96
|
+
/** Texto do botão secundário quando `all-opt-out="false"`. */
|
|
97
|
+
this.optInButton = 'Ver Política de Cookies';
|
|
98
|
+
/**
|
|
99
|
+
* `aria-label` do botão fechar exibido no canto do painel expandido (`mode="open"`).
|
|
100
|
+
* Permite traduzir o rótulo para outros idiomas.
|
|
101
|
+
*/
|
|
102
|
+
this.closeLabel = 'Fechar';
|
|
103
|
+
/**
|
|
104
|
+
* `aria-label` do painel expandido (`mode="open"`), que possui `role="dialog"`.
|
|
105
|
+
* Leitores de tela anunciam este texto ao entrar no diálogo modal de configuração de cookies.
|
|
106
|
+
* Deve descrever o propósito do diálogo de forma sucinta (ex: "Configurações de cookies").
|
|
107
|
+
*/
|
|
108
|
+
this.panelLabel = 'Configurações de cookies';
|
|
109
|
+
/**
|
|
110
|
+
* `aria-label` da barra de aviso de cookies (`mode="default"`).
|
|
111
|
+
* Deve descrever o propósito da região de forma sucinta (ex: "Aviso de cookies").
|
|
112
|
+
*/
|
|
113
|
+
this.defaultPanelLabel = 'Aviso de cookies';
|
|
114
|
+
/** Rótulo do título da seção de grupos de cookies. */
|
|
115
|
+
this.cookieGroupsLabel = 'Classes de cookies';
|
|
116
|
+
/**
|
|
117
|
+
* `aria-label` do elemento `<nav>` que envolve os links complementares no painel expandido.
|
|
118
|
+
* Permite traduzir o rótulo para outros idiomas.
|
|
119
|
+
*/
|
|
120
|
+
this.linksLabel = 'Links complementares';
|
|
121
|
+
/**
|
|
122
|
+
* Estado inicial do checkbox "Selecionar tudo".
|
|
123
|
+
* Quando `true`, todos os grupos opt-out iniciam selecionados.
|
|
124
|
+
*/
|
|
125
|
+
this.selectAll = false;
|
|
126
|
+
/** Texto do checkbox geral quando está totalmente selecionado (ação: desselecionar). */
|
|
127
|
+
this.selectAllLabel = 'Selecionar tudo';
|
|
128
|
+
/** Texto do checkbox geral quando está desmarcado ou indeterminado (ação: selecionar). */
|
|
129
|
+
this.unselectAllLabel = 'Desselecionar tudo';
|
|
130
|
+
/**
|
|
131
|
+
* Quando `true`, exibe uma camada semitransparente (scrim) sobre o conteúdo da página
|
|
132
|
+
* abaixo do painel default, sinalizando que o cookiebar requer atenção.
|
|
133
|
+
*
|
|
134
|
+
* **Efeito no foco:** com `scrim=true`, o atributo `inert` é aplicado nos irmãos do
|
|
135
|
+
* cookiebar no DOM, prendendo o foco e o cursor virtual do leitor de tela dentro do
|
|
136
|
+
* painel default enquanto ele estiver visível. Com `scrim=false` (padrão), nenhum trap
|
|
137
|
+
* é ativado — o usuário pode navegar livremente pela página, em conformidade com
|
|
138
|
+
* WCAG 2.1.2 (No Keyboard Trap). Use `scrim=true` apenas quando o cenário de negócio
|
|
139
|
+
* exigir que a decisão sobre cookies seja tomada antes de qualquer outra interação.
|
|
140
|
+
*
|
|
141
|
+
* No modo `open` (diálogo modal), o `inert` é aplicado independentemente do valor de `scrim`.
|
|
142
|
+
*/
|
|
143
|
+
this.scrim = false;
|
|
144
|
+
/**
|
|
145
|
+
* Elemento focado na página antes do cookiebar aparecer.
|
|
146
|
+
* Restaurado quando o componente é ocultado (`show` → false).
|
|
147
|
+
* Referência: WCAG 2.4.3.
|
|
148
|
+
*/
|
|
149
|
+
this.pageTriggerElement = null;
|
|
150
|
+
/**
|
|
151
|
+
* Elemento que disparou a abertura do painel `open` — restaurado ao fechar o diálogo.
|
|
152
|
+
* Referência: WCAG 2.4.3.
|
|
153
|
+
*/
|
|
154
|
+
this.triggerElement = null;
|
|
155
|
+
/**
|
|
156
|
+
* Referência ao painel default — usada para mover o foco ao abrir no modo `default`.
|
|
157
|
+
*/
|
|
158
|
+
this.defaultPanelRef = null;
|
|
159
|
+
/**
|
|
160
|
+
* Flag que sinaliza intenção de focar o painel default após o próximo render.
|
|
161
|
+
* Definida nos `@Watch` e consumida em `componentDidUpdate`, garantindo que
|
|
162
|
+
* `defaultPanelRef` já esteja disponível no DOM.
|
|
163
|
+
*/
|
|
164
|
+
this.pendingFocusDefault = false;
|
|
165
|
+
/**
|
|
166
|
+
* Flag que sinaliza intenção de focar o botão fechar do painel `open` após o próximo render.
|
|
167
|
+
* Definida em `trapFocus()` e consumida em `componentDidUpdate`, garantindo que
|
|
168
|
+
* o botão fechar já esteja disponível no DOM antes de receber o foco.
|
|
169
|
+
*/
|
|
170
|
+
this.pendingFocusOpen = false;
|
|
171
|
+
this.openAnnouncementFrame = null;
|
|
172
|
+
/** Instância do observador de breakpoint para detecção de mobile. */
|
|
173
|
+
this.breakpointObserver = null;
|
|
174
|
+
/**
|
|
175
|
+
* Lista de elementos que receberam `inert` ao abrir o painel.
|
|
176
|
+
* Armazenada para restaurar o estado original ao fechar.
|
|
177
|
+
*/
|
|
178
|
+
this.inertedElements = [];
|
|
179
|
+
this.nativeDialogRef = null;
|
|
180
|
+
this.globalKeydownAttached = false;
|
|
181
|
+
this.slotChangeHandlers = new Map();
|
|
182
|
+
this.handleNativeCancel = (event) => {
|
|
183
|
+
event.preventDefault();
|
|
184
|
+
if (this.mode === 'open')
|
|
185
|
+
this.mode = 'default';
|
|
186
|
+
};
|
|
187
|
+
/** Atualiza `selectAllState` e propaga o novo valor para os grupos (sem emitir evento externo). */
|
|
188
|
+
this.handleSelectAllChange = (event) => {
|
|
189
|
+
const newValue = event.detail;
|
|
190
|
+
this.selectAllState = newValue;
|
|
191
|
+
this.propagateSelectAll(newValue);
|
|
192
|
+
};
|
|
193
|
+
/**
|
|
194
|
+
* Emite `brCookiebarAccept` (void) e em seguida `brCookiebarResponse` (payload completo),
|
|
195
|
+
* construído uma única vez, depois libera o trap de foco e oculta o componente.
|
|
196
|
+
*/
|
|
197
|
+
this.handleAccept = () => {
|
|
198
|
+
this.releaseFocusTrap();
|
|
199
|
+
this.brCookiebarAccept.emit();
|
|
200
|
+
this.brCookiebarResponse.emit(this.buildOutputData());
|
|
201
|
+
this.show = false;
|
|
202
|
+
};
|
|
203
|
+
/**
|
|
204
|
+
* Rejeita todos os cookies opt-out: propaga `false` para grupos com `group-opt-out !== false`,
|
|
205
|
+
* recalcula `selectAllState`, libera o trap de foco, emite `brCookiebarReject` (void) e
|
|
206
|
+
* `brCookiebarResponse` (payload completo, construído uma única vez), depois oculta o componente.
|
|
207
|
+
*/
|
|
208
|
+
this.handleReject = () => {
|
|
209
|
+
this.releaseFocusTrap();
|
|
210
|
+
this.propagateSelectAll(false);
|
|
211
|
+
this.recalculateSelectAll();
|
|
212
|
+
this.brCookiebarReject.emit();
|
|
213
|
+
this.brCookiebarResponse.emit(this.buildOutputData('reject'));
|
|
214
|
+
this.show = false;
|
|
215
|
+
};
|
|
216
|
+
/**
|
|
217
|
+
* Manipula o clique no botão secundário:
|
|
218
|
+
* - **opt-out**: abre o painel de configuração de cookies.
|
|
219
|
+
* - **opt-in**: emite `brCookiebarPolicyClick` para o consumidor navegar à política.
|
|
220
|
+
*/
|
|
221
|
+
this.handleSecondaryButton = () => {
|
|
222
|
+
if (this.allOptOut) {
|
|
223
|
+
this.mode = 'open';
|
|
224
|
+
}
|
|
225
|
+
else {
|
|
226
|
+
this.brCookiebarPolicyClick.emit();
|
|
227
|
+
}
|
|
228
|
+
};
|
|
229
|
+
/** Fecha o painel aberto, retornando ao modo `default`. */
|
|
230
|
+
this.handleClose = () => {
|
|
231
|
+
this.releaseFocusTrap();
|
|
232
|
+
this.mode = 'default';
|
|
233
|
+
};
|
|
234
|
+
/** Atualiza `isMobile` conforme o breakpoint corrente. */
|
|
235
|
+
this.handleBreakpointChange = (breakpoint) => {
|
|
236
|
+
this.isMobile = breakpoint === BREAKPOINTS.X_SMALL;
|
|
237
|
+
};
|
|
238
|
+
/**
|
|
239
|
+
* Handler de trap de foco para o painel default.
|
|
240
|
+
* Ativado automaticamente pelo `scrim`: só prende o foco quando `scrim=true`,
|
|
241
|
+
* quando o modo é `default` e o componente está visível.
|
|
242
|
+
* Referência: WCAG 2.1.2.
|
|
243
|
+
*/
|
|
244
|
+
this.defaultFocusTrapHandler = (event) => {
|
|
245
|
+
if (!this.show || this.mode !== 'default' || !this.scrim)
|
|
246
|
+
return;
|
|
247
|
+
const previewRoot = this.el.closest('.wbc-example-preview');
|
|
248
|
+
if (previewRoot && !event.composedPath().includes(previewRoot))
|
|
249
|
+
return;
|
|
250
|
+
if (!isEventTargetInside(event, this.el)) {
|
|
251
|
+
event.stopImmediatePropagation();
|
|
252
|
+
this.focusDefaultPanel();
|
|
253
|
+
}
|
|
254
|
+
};
|
|
255
|
+
/** Fecha o painel aberto ao pressionar Escape, apenas quando `show=true` e `mode="open"`. */
|
|
256
|
+
this.handleKeyDown = (event) => {
|
|
257
|
+
if (!this.show || this.mode !== 'open')
|
|
258
|
+
return;
|
|
259
|
+
if (this.usesNativeTopLayer && !isEventTargetInside(event, this.el))
|
|
260
|
+
return;
|
|
261
|
+
if (event.key === 'Escape') {
|
|
262
|
+
event.preventDefault();
|
|
263
|
+
event.stopPropagation();
|
|
264
|
+
this.mode = 'default';
|
|
265
|
+
}
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* Observa mudanças em `show`.
|
|
270
|
+
* Ao exibir o componente, garante que o modo inicial seja sempre `default` e emite `brCookiebarShow`.
|
|
271
|
+
* Com `scrim=true`, aplica `inert` nos irmãos e registra o trap de foco.
|
|
272
|
+
* Com `scrim=false`, o usuário pode navegar livremente pela página (WCAG 2.1.2).
|
|
273
|
+
* Ao ocultar, emite `brCookiebarHide`.
|
|
274
|
+
*/
|
|
275
|
+
handleShowChange(newValue) {
|
|
276
|
+
if (newValue) {
|
|
277
|
+
if (this.mode === 'open') {
|
|
278
|
+
this.mode = 'default';
|
|
279
|
+
}
|
|
280
|
+
this.pageTriggerElement = document.activeElement;
|
|
281
|
+
if (this.scrim) {
|
|
282
|
+
this.applyInertSiblings();
|
|
283
|
+
document.addEventListener('focusin', this.defaultFocusTrapHandler, true);
|
|
284
|
+
}
|
|
285
|
+
this.syncGlobalKeydownListener(true);
|
|
286
|
+
this.pendingFocusDefault = true;
|
|
287
|
+
this.brCookiebarShow.emit();
|
|
288
|
+
}
|
|
289
|
+
else {
|
|
290
|
+
this.syncGlobalKeydownListener(false);
|
|
291
|
+
this.releaseDefaultFocusTrap(true);
|
|
292
|
+
this.brCookiebarHide.emit();
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* Observa mudanças em `mode`.
|
|
297
|
+
* Ao entrar em modo `open`, emite `brCookiebarOpen`, aplica `inert` nos irmãos e move o foco
|
|
298
|
+
* para o botão fechar (trap focus modal).
|
|
299
|
+
* Ao sair do modo `open`, emite `brCookiebarClose` e — se `scrim=true` — reaplica `inert`
|
|
300
|
+
* e o listener de trap para o painel default. Sem scrim, nenhum trap é ativado.
|
|
301
|
+
*/
|
|
302
|
+
handleModeChange(newValue) {
|
|
303
|
+
if (newValue === 'open') {
|
|
304
|
+
document.removeEventListener('focusin', this.defaultFocusTrapHandler, true);
|
|
305
|
+
this.brCookiebarOpen.emit();
|
|
306
|
+
this.trapFocus();
|
|
307
|
+
this.openLiveAnnouncement = '';
|
|
308
|
+
this.openPanelDescription = this.buildOpenPanelDescription();
|
|
309
|
+
if (this.openAnnouncementFrame !== null)
|
|
310
|
+
cancelAnimationFrame(this.openAnnouncementFrame);
|
|
311
|
+
this.openAnnouncementFrame = requestAnimationFrame(() => {
|
|
312
|
+
this.openAnnouncementFrame = null;
|
|
313
|
+
if (this.mode !== 'open')
|
|
314
|
+
return;
|
|
315
|
+
this.openLiveAnnouncement = this.buildOpenAnnouncement();
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
else {
|
|
319
|
+
if (this.openAnnouncementFrame !== null) {
|
|
320
|
+
cancelAnimationFrame(this.openAnnouncementFrame);
|
|
321
|
+
this.openAnnouncementFrame = null;
|
|
322
|
+
}
|
|
323
|
+
this.openLiveAnnouncement = '';
|
|
324
|
+
this.brCookiebarClose.emit();
|
|
325
|
+
if (this.show && this.scrim) {
|
|
326
|
+
this.applyInertSiblings();
|
|
327
|
+
document.addEventListener('focusin', this.defaultFocusTrapHandler, true);
|
|
328
|
+
}
|
|
329
|
+
this.pendingFocusDefault = true;
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
handleScrimChange(newValue) {
|
|
333
|
+
this.releaseDefaultFocusTrap(false);
|
|
334
|
+
if (this.show && this.mode === 'default' && newValue) {
|
|
335
|
+
this.applyInertSiblings();
|
|
336
|
+
document.addEventListener('focusin', this.defaultFocusTrapHandler, true);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
* Observa mudanças externas na prop `selectAll`.
|
|
341
|
+
* Sincroniza o estado interno do checkbox e propaga o valor para todos os grupos opt-out.
|
|
342
|
+
*/
|
|
343
|
+
handleSelectAllPropChange(newValue) {
|
|
344
|
+
this.selectAllState = newValue;
|
|
345
|
+
this.propagateSelectAll(newValue);
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* Remove o listener global de teclado quando o componente é removido do DOM,
|
|
349
|
+
* evitando memory leaks.
|
|
350
|
+
*/
|
|
351
|
+
disconnectedCallback() {
|
|
352
|
+
if (this.openAnnouncementFrame !== null)
|
|
353
|
+
cancelAnimationFrame(this.openAnnouncementFrame);
|
|
354
|
+
this.openAnnouncementFrame = null;
|
|
355
|
+
this.syncGlobalKeydownListener(false);
|
|
356
|
+
this.slotChangeHandlers.forEach((handler, slot) => {
|
|
357
|
+
slot.removeEventListener('slotchange', handler);
|
|
358
|
+
});
|
|
359
|
+
this.slotChangeHandlers.clear();
|
|
360
|
+
document.removeEventListener('focusin', this.defaultFocusTrapHandler, true);
|
|
361
|
+
this.restoreInertSiblings();
|
|
362
|
+
this.triggerElement = null;
|
|
363
|
+
this.pageTriggerElement = null;
|
|
364
|
+
this.breakpointObserver?.destroy();
|
|
365
|
+
this.breakpointObserver = null;
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* Inicializa o estado interno do checkbox geral e detecta quais slots estão preenchidos
|
|
369
|
+
* antes da primeira renderização.
|
|
370
|
+
*/
|
|
371
|
+
componentWillLoad() {
|
|
372
|
+
this.selectAllState = this.selectAll;
|
|
373
|
+
this.checkSlots();
|
|
374
|
+
if (!this.selectAll)
|
|
375
|
+
this.recalculateSelectAll();
|
|
376
|
+
if (typeof window !== 'undefined' && typeof window.matchMedia === 'function') {
|
|
377
|
+
this.breakpointObserver = new BreakpointObserver();
|
|
378
|
+
this.breakpointObserver.subscribe(this.handleBreakpointChange);
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* Registra um listener em cada slot para reatualizar a detecção quando o conteúdo muda dinamicamente.
|
|
383
|
+
* Também registra o listener global de teclado para fechar o painel com Escape.
|
|
384
|
+
*/
|
|
385
|
+
componentDidLoad() {
|
|
386
|
+
const slotElements = this.el.shadowRoot?.querySelectorAll('slot');
|
|
387
|
+
slotElements?.forEach((slot) => {
|
|
388
|
+
const handler = () => this.checkSlots();
|
|
389
|
+
this.slotChangeHandlers.set(slot, handler);
|
|
390
|
+
slot.addEventListener('slotchange', handler);
|
|
391
|
+
});
|
|
392
|
+
this.syncGlobalKeydownListener(this.show);
|
|
393
|
+
this.syncNativeDialog();
|
|
394
|
+
if (this.show && this.mode === 'default') {
|
|
395
|
+
this.pageTriggerElement = document.activeElement;
|
|
396
|
+
if (this.scrim) {
|
|
397
|
+
this.applyInertSiblings();
|
|
398
|
+
document.addEventListener('focusin', this.defaultFocusTrapHandler, true);
|
|
399
|
+
}
|
|
400
|
+
this.focusDefaultPanel();
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* Executado após cada re-render. Consome as flags de foco pendente:
|
|
405
|
+
* - `pendingFocusDefault`: foca o painel default (DOM garantidamente pronto).
|
|
406
|
+
* - `pendingFocusOpen`: foca o painel open/dialog (DOM garantidamente pronto).
|
|
407
|
+
*/
|
|
408
|
+
componentDidUpdate() {
|
|
409
|
+
this.syncNativeDialog();
|
|
410
|
+
if (this.pendingFocusDefault) {
|
|
411
|
+
this.pendingFocusDefault = false;
|
|
412
|
+
this.focusDefaultPanel();
|
|
413
|
+
}
|
|
414
|
+
if (this.pendingFocusOpen) {
|
|
415
|
+
this.pendingFocusOpen = false;
|
|
416
|
+
this.focusOpenPanel();
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
/**
|
|
420
|
+
* Escuta o evento `brCookiebarGroupChange` emitido por qualquer `br-cookiebar-group` filho.
|
|
421
|
+
* Apenas recalcula o estado visual do checkbox "Selecionar tudo" — não emite `brCookiebarResponse`.
|
|
422
|
+
* O evento de resposta completo é emitido somente ao clicar em Aceitar ou Rejeitar.
|
|
423
|
+
*/
|
|
424
|
+
handleGroupChange() {
|
|
425
|
+
this.recalculateSelectAll();
|
|
426
|
+
}
|
|
427
|
+
/** Exibe o cookiebar no modo `default` (barra inferior). */
|
|
428
|
+
async openDefault() {
|
|
429
|
+
this.mode = 'default';
|
|
430
|
+
this.show = true;
|
|
431
|
+
}
|
|
432
|
+
/**
|
|
433
|
+
* Exibe o cookiebar diretamente no modo `open` (painel de tela cheia).
|
|
434
|
+
*/
|
|
435
|
+
async openPanel() {
|
|
436
|
+
this.show = true;
|
|
437
|
+
this.mode = 'open';
|
|
438
|
+
}
|
|
439
|
+
/** Oculta o cookiebar. */
|
|
440
|
+
async close() {
|
|
441
|
+
this.show = false;
|
|
442
|
+
}
|
|
443
|
+
/** Retorna o JSON com o estado atual de seleção de todos os grupos e cookies. */
|
|
444
|
+
async getSelectedCookies() {
|
|
445
|
+
return this.buildOutputData();
|
|
446
|
+
}
|
|
447
|
+
get liveAnnouncement() {
|
|
448
|
+
if (this.mode === 'open')
|
|
449
|
+
return this.openLiveAnnouncement;
|
|
450
|
+
return this.show ? [this.defaultPanelLabel, this.infoText].filter(Boolean).join('. ') : '';
|
|
451
|
+
}
|
|
452
|
+
syncGlobalKeydownListener(shouldAttach) {
|
|
453
|
+
if (shouldAttach === this.globalKeydownAttached)
|
|
454
|
+
return;
|
|
455
|
+
if (shouldAttach)
|
|
456
|
+
document.addEventListener('keydown', this.handleKeyDown, true);
|
|
457
|
+
else
|
|
458
|
+
document.removeEventListener('keydown', this.handleKeyDown, true);
|
|
459
|
+
this.globalKeydownAttached = shouldAttach;
|
|
460
|
+
}
|
|
461
|
+
get usesNativeDialog() {
|
|
462
|
+
return this.show && (this.scrim || this.mode === 'open');
|
|
463
|
+
}
|
|
464
|
+
get usesNativeTopLayer() {
|
|
465
|
+
return this.usesNativeDialog && supportsNativeModalDialog();
|
|
466
|
+
}
|
|
467
|
+
syncNativeDialog() {
|
|
468
|
+
syncNativeModalDialog(this.nativeDialogRef, this.usesNativeDialog);
|
|
469
|
+
}
|
|
470
|
+
/** Verifica quais slots (`header`, `links`, `actions`) possuem conteúdo e atualiza os estados correspondentes. */
|
|
471
|
+
checkSlots() {
|
|
472
|
+
this.hasHeaderSlot = !!this.el.querySelector('[slot="header"]');
|
|
473
|
+
this.hasLinksSlot = !!this.el.querySelector('[slot="links"]');
|
|
474
|
+
this.hasActionsSlot = !!this.el.querySelector('[slot="actions"]');
|
|
475
|
+
}
|
|
476
|
+
/** Retorna todos os `br-cookiebar-group` filhos no Light DOM. */
|
|
477
|
+
getGroupElements() {
|
|
478
|
+
return Array.from(this.el.querySelectorAll('br-cookiebar-group'));
|
|
479
|
+
}
|
|
480
|
+
/**
|
|
481
|
+
* Deriva a descrição do painel `open` a partir do `entryText` do `br-cookiebar-header` filho.
|
|
482
|
+
* Usado como conteúdo do elemento sr-only referenciado por `aria-describedby` no diálogo.
|
|
483
|
+
* Retorna string vazia quando não há header ou o conteúdo é livre (sem `entryText`).
|
|
484
|
+
*/
|
|
485
|
+
buildOpenPanelDescription() {
|
|
486
|
+
const header = this.el.querySelector('br-cookiebar-header');
|
|
487
|
+
if (!header)
|
|
488
|
+
return '';
|
|
489
|
+
return header.entryText ?? header.textContent?.trim() ?? '';
|
|
490
|
+
}
|
|
491
|
+
/**
|
|
492
|
+
* Monta o texto anunciado pela região `aria-live` ao entrar no modo `open`.
|
|
493
|
+
*/
|
|
494
|
+
buildOpenAnnouncement() {
|
|
495
|
+
const header = this.el.querySelector('br-cookiebar-header');
|
|
496
|
+
const parts = [this.panelLabel];
|
|
497
|
+
if (header) {
|
|
498
|
+
const title = header.mainTitle ?? header.textContent?.trim() ?? '';
|
|
499
|
+
const text = header.entryText ?? '';
|
|
500
|
+
if (title)
|
|
501
|
+
parts.push(title);
|
|
502
|
+
if (text)
|
|
503
|
+
parts.push(text);
|
|
504
|
+
}
|
|
505
|
+
return parts.filter(Boolean).join('. ');
|
|
506
|
+
}
|
|
507
|
+
/**
|
|
508
|
+
* Recalcula o estado do checkbox "Selecionar tudo" com base nos grupos opt-out.
|
|
509
|
+
* Grupos `always-active` (`group-opt-out="false"`) são ignorados no cálculo.
|
|
510
|
+
* Define `selectAllState` como `true`, `false` ou `'indeterminate'`.
|
|
511
|
+
*/
|
|
512
|
+
recalculateSelectAll() {
|
|
513
|
+
const groups = this.getGroupElements();
|
|
514
|
+
if (groups.length === 0)
|
|
515
|
+
return;
|
|
516
|
+
const optOutGroups = groups.filter((g) => g.groupOptOut !== false);
|
|
517
|
+
if (optOutGroups.length === 0) {
|
|
518
|
+
this.selectAllState = true;
|
|
519
|
+
return;
|
|
520
|
+
}
|
|
521
|
+
const states = optOutGroups.map((group) => this.getGroupSelectionState(group));
|
|
522
|
+
this.selectAllState = aggregateSelection(states);
|
|
523
|
+
}
|
|
524
|
+
/** Calcula a seleção de um grupo a partir de propriedades refletidas ou atributos iniciais. */
|
|
525
|
+
getGroupSelectionState(group) {
|
|
526
|
+
const cookies = Array.from(group.children).filter((element) => element.tagName.toLowerCase() === 'br-cookiebar-cookie');
|
|
527
|
+
const selectableCookies = cookies.filter((cookie) => cookie.getAttribute('cookie-opt-out') !== 'false');
|
|
528
|
+
if (selectableCookies.length === 0) {
|
|
529
|
+
const selectedAttribute = group.getAttribute('group-selected');
|
|
530
|
+
return (selectedAttribute !== null && selectedAttribute !== 'false') || group.groupSelected === true;
|
|
531
|
+
}
|
|
532
|
+
return aggregateSelection(selectableCookies.map((cookie) => cookie.hasAttribute('cookie-selected') && cookie.getAttribute('cookie-selected') !== 'false'));
|
|
533
|
+
}
|
|
534
|
+
/**
|
|
535
|
+
* Propaga um valor booleano para todos os grupos opt-out filhos,
|
|
536
|
+
* atribuindo diretamente à propriedade JS para acionar o `@Watch('groupSelected')` de cada grupo.
|
|
537
|
+
*/
|
|
538
|
+
propagateSelectAll(value) {
|
|
539
|
+
const groups = this.getGroupElements();
|
|
540
|
+
groups.forEach((g) => {
|
|
541
|
+
if (g.groupOptOut !== false) {
|
|
542
|
+
g.groupSelected = value;
|
|
543
|
+
}
|
|
544
|
+
});
|
|
545
|
+
}
|
|
546
|
+
/**
|
|
547
|
+
* Monta o objeto `CookiebarOutputData` percorrendo todos os grupos e seus cookies
|
|
548
|
+
* via atributos refletidos, retornando o estado atual de consentimento.
|
|
549
|
+
*/
|
|
550
|
+
buildOutputData(policy = 'current') {
|
|
551
|
+
const groups = this.getGroupElements();
|
|
552
|
+
const cookieGroups = groups.map((g) => {
|
|
553
|
+
const groupId = g.groupId ?? g.getAttribute('group-id') ?? '';
|
|
554
|
+
const isAlwaysActive = g.groupOptOut === false;
|
|
555
|
+
const indeterminate = g.hasAttribute('data-indeterminate');
|
|
556
|
+
const groupSelected = isAlwaysActive
|
|
557
|
+
? true
|
|
558
|
+
: policy === 'reject'
|
|
559
|
+
? false
|
|
560
|
+
: indeterminate
|
|
561
|
+
? 'indeterminate'
|
|
562
|
+
: g.groupSelected;
|
|
563
|
+
const cookieElements = Array.from(g.querySelectorAll('br-cookiebar-cookie'));
|
|
564
|
+
const cookieList = cookieElements.map((c) => ({
|
|
565
|
+
cookieId: c.cookieId ?? c.getAttribute('cookie-id') ?? '',
|
|
566
|
+
cookieSelected: isAlwaysActive || c.cookieOptOut === false ? true : policy === 'reject' ? false : c.cookieSelected,
|
|
567
|
+
}));
|
|
568
|
+
return { groupId, groupSelected, cookieList };
|
|
569
|
+
});
|
|
570
|
+
return { selectAll: policy === 'reject' ? false : this.selectAllState, cookieGroups };
|
|
571
|
+
}
|
|
572
|
+
/**
|
|
573
|
+
* Move o foco para o primeiro botão focável dentro do painel default.
|
|
574
|
+
* Recai no container do painel (`tabindex="-1"`) se nenhum botão for encontrado.
|
|
575
|
+
*/
|
|
576
|
+
focusDefaultPanel() {
|
|
577
|
+
const panel = this.defaultPanelRef;
|
|
578
|
+
if (!panel)
|
|
579
|
+
return;
|
|
580
|
+
const firstButton = panel.querySelector('br-button');
|
|
581
|
+
const nativeButton = firstButton?.shadowRoot?.querySelector('button');
|
|
582
|
+
if (nativeButton) {
|
|
583
|
+
nativeButton.focus();
|
|
584
|
+
}
|
|
585
|
+
else {
|
|
586
|
+
panel.focus();
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
/**
|
|
590
|
+
* Move o foco para o botão fechar do painel expandido, que é o primeiro elemento
|
|
591
|
+
* interativo do diálogo (WCAG 2.4.3 / padrão ARIA dialog).
|
|
592
|
+
* O botão fechar fica no cabeçalho, antes dos grupos e do rodapé, garantindo que
|
|
593
|
+
* o leitor de tela anuncie "Fechar, botão" ao entrar no diálogo e permita ao usuário
|
|
594
|
+
* percorrer o conteúdo na ordem natural com Tab.
|
|
595
|
+
* Recai no container do painel (`tabindex="-1"`) se o botão não for encontrado.
|
|
596
|
+
*/
|
|
597
|
+
focusOpenPanel() {
|
|
598
|
+
const shadow = this.el.shadowRoot;
|
|
599
|
+
const closeButton = shadow?.querySelector('br-button.cookiebar-close');
|
|
600
|
+
const nativeButton = closeButton?.shadowRoot?.querySelector('button');
|
|
601
|
+
if (nativeButton) {
|
|
602
|
+
nativeButton.focus();
|
|
603
|
+
}
|
|
604
|
+
else {
|
|
605
|
+
const panel = shadow?.querySelector('[part="open-panel"]');
|
|
606
|
+
panel?.focus();
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
/**
|
|
610
|
+
* Remove o listener de trap do painel default, restaura `inert` dos irmãos e,
|
|
611
|
+
* opcionalmente, restaura o foco no elemento que estava ativo antes do cookiebar aparecer.
|
|
612
|
+
*/
|
|
613
|
+
releaseDefaultFocusTrap(restoreFocus = true) {
|
|
614
|
+
document.removeEventListener('focusin', this.defaultFocusTrapHandler, true);
|
|
615
|
+
this.restoreInertSiblings();
|
|
616
|
+
if (restoreFocus) {
|
|
617
|
+
this.pageTriggerElement?.focus();
|
|
618
|
+
}
|
|
619
|
+
this.pageTriggerElement = null;
|
|
620
|
+
}
|
|
621
|
+
/**
|
|
622
|
+
* Remove o `inert` dos irmãos e restaura o foco no elemento disparador.
|
|
623
|
+
* Chamado em `handleClose`, `handleAccept` e `handleReject`.
|
|
624
|
+
*/
|
|
625
|
+
releaseFocusTrap() {
|
|
626
|
+
this.restoreInertSiblings();
|
|
627
|
+
this.triggerElement?.focus();
|
|
628
|
+
this.triggerElement = null;
|
|
629
|
+
}
|
|
630
|
+
/**
|
|
631
|
+
* Aplica `inert` nos irmãos do cookiebar e nos irmãos de cada ancestral até o `<body>`.
|
|
632
|
+
* Preserva os elementos já rastreados em chamadas sucessivas para que uma transição
|
|
633
|
+
* entre os modos `default` e `open` não perca a referência necessária à restauração.
|
|
634
|
+
*
|
|
635
|
+
* Percorre a cadeia de ancestrais de baixo para cima e, em cada nível, inercia todos
|
|
636
|
+
* os irmãos do nó que contém o cookiebar. Como `inert` é herdado por todos os
|
|
637
|
+
* descendentes, isso garante que nenhum elemento fora do cookiebar receba foco — via
|
|
638
|
+
* Tab ou cursor virtual de leitor de tela — independentemente da profundidade de
|
|
639
|
+
* aninhamento do cookiebar no DOM.
|
|
640
|
+
*
|
|
641
|
+
* Referência: WCAG 2.1.2 / ARIA dialog pattern.
|
|
642
|
+
*/
|
|
643
|
+
applyInertSiblings() {
|
|
644
|
+
const previewRoot = this.el.closest('.wbc-example-preview');
|
|
645
|
+
let el = this.el;
|
|
646
|
+
while (el.parentElement) {
|
|
647
|
+
Array.from(el.parentElement.children).forEach((sibling) => {
|
|
648
|
+
if (sibling === el)
|
|
649
|
+
return;
|
|
650
|
+
if (!sibling.inert) {
|
|
651
|
+
sibling.inert = true;
|
|
652
|
+
this.inertedElements.push(sibling);
|
|
653
|
+
}
|
|
654
|
+
});
|
|
655
|
+
if (previewRoot && el.parentElement === previewRoot)
|
|
656
|
+
break;
|
|
657
|
+
if (el.parentElement === document.body)
|
|
658
|
+
break;
|
|
659
|
+
el = el.parentElement;
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
/**
|
|
663
|
+
* Remove `inert` dos elementos que foram marcados por `applyInertSiblings`.
|
|
664
|
+
*/
|
|
665
|
+
restoreInertSiblings() {
|
|
666
|
+
this.inertedElements.forEach((el) => {
|
|
667
|
+
el.inert = false;
|
|
668
|
+
});
|
|
669
|
+
this.inertedElements = [];
|
|
670
|
+
}
|
|
671
|
+
/**
|
|
672
|
+
* Ativa o trap de foco: salva o elemento disparador, inercia todos os
|
|
673
|
+
* filhos diretos de `<body>` exceto o ancestral do cookiebar (bloqueando tab e
|
|
674
|
+
* cursor virtual do leitor de tela em toda a página) e sinaliza foco pendente.
|
|
675
|
+
* O foco efetivo no botão fechar do painel é delegado ao `componentDidUpdate`
|
|
676
|
+
* via `pendingFocusOpen`, garantindo que o AT anuncie "Fechar, botão" ao entrar
|
|
677
|
+
* no diálogo e permita percorrer o conteúdo na ordem natural (WCAG 2.4.3).
|
|
678
|
+
* Referência: WCAG 2.1.2 / 2.4.3.
|
|
679
|
+
*/
|
|
680
|
+
trapFocus() {
|
|
681
|
+
this.triggerElement = document.activeElement;
|
|
682
|
+
this.applyInertSiblings();
|
|
683
|
+
this.pendingFocusOpen = true;
|
|
684
|
+
}
|
|
685
|
+
/** Gera o mapa de classes CSS do container raiz com base no `mode` atual. */
|
|
686
|
+
getCssClassMap() {
|
|
687
|
+
return {
|
|
688
|
+
'br-cookiebar': true,
|
|
689
|
+
[`br-cookiebar--${this.mode}`]: true,
|
|
690
|
+
'br-cookiebar--blocking': this.usesNativeDialog,
|
|
691
|
+
};
|
|
692
|
+
}
|
|
693
|
+
/**
|
|
694
|
+
* Renderiza o checkbox "Selecionar tudo" com seu estado atual e a mensagem de alerta
|
|
695
|
+
* exibida quando nenhum ou apenas alguns grupos estão selecionados.
|
|
696
|
+
*/
|
|
697
|
+
renderSelectAllCheckbox() {
|
|
698
|
+
const isIndeterminate = this.selectAllState === 'indeterminate';
|
|
699
|
+
const isChecked = this.selectAllState === true;
|
|
700
|
+
const label = isChecked ? this.unselectAllLabel : this.selectAllLabel;
|
|
701
|
+
return (h("div", { class: "cookiebar-select-all" }, h("br-checkbox", { name: "cookiebar-select-all", checked: isChecked, indeterminate: isIndeterminate, label: label, onCheckedChange: this.handleSelectAllChange })));
|
|
702
|
+
}
|
|
703
|
+
/**
|
|
704
|
+
* Renderiza o painel no modo `default` (barra inferior) com o texto informativo,
|
|
705
|
+
* o scrim opcional e os botões de ação.
|
|
706
|
+
*/
|
|
707
|
+
renderDefaultPanel() {
|
|
708
|
+
return (h("div", { class: "cookiebar-default-panel", part: "default-panel", role: "region", "aria-label": this.defaultPanelLabel, tabindex: "-1", ref: (el) => (this.defaultPanelRef = el) }, h("div", { class: "cookiebar-default-content" }, h("p", { class: "cookiebar-info-text" }, this.infoText)), h("div", { class: "cookiebar-actions", part: "footer" }, this.hasActionsSlot ? h("slot", { name: "actions" }) : this.renderDefaultActions())));
|
|
709
|
+
}
|
|
710
|
+
/**
|
|
711
|
+
* Renderiza os botões padrão do modo `default` quando o slot `actions` não está preenchido.
|
|
712
|
+
* No modo opt-out, exibe "Definir Cookies" + opcionalmente "Rejeitar não obrigatórios" + "Aceitar".
|
|
713
|
+
* No modo opt-in, exibe "Ver Política de Cookies" + opcionalmente "Rejeitar não obrigatórios" + "Aceitar".
|
|
714
|
+
*/
|
|
715
|
+
renderDefaultActions() {
|
|
716
|
+
const secondaryLabel = this.allOptOut ? this.optOutButton : this.optInButton;
|
|
717
|
+
return (h("div", { class: "cookiebar-default-actions" }, h("br-button", { emphasis: "secondary", density: "small", shape: this.actionShape, "aria-haspopup": this.allOptOut ? 'dialog' : undefined, onClick: this.handleSecondaryButton }, secondaryLabel), this.renderConsentActions()));
|
|
718
|
+
}
|
|
719
|
+
get actionShape() {
|
|
720
|
+
return this.isMobile ? 'block' : undefined;
|
|
721
|
+
}
|
|
722
|
+
/** Renderiza as ações de consentimento compartilhadas pelos dois painéis. */
|
|
723
|
+
renderConsentActions() {
|
|
724
|
+
return [
|
|
725
|
+
this.showRejectButton && (h("br-button", { emphasis: "secondary", density: "small", shape: this.actionShape, onClick: this.handleReject }, this.rejectButton)),
|
|
726
|
+
h("br-button", { emphasis: "primary", density: "small", shape: this.actionShape, onClick: this.handleAccept }, this.acceptButton),
|
|
727
|
+
];
|
|
728
|
+
}
|
|
729
|
+
renderCookieGroupsHeader() {
|
|
730
|
+
return (h("div", { class: "cookiebar-groups-header" }, h("div", { role: "heading", "aria-level": 2, class: "cookiebar-groups-label" }, this.cookieGroupsLabel), this.renderSelectAllCheckbox(), this.renderSelectAllAlert()));
|
|
731
|
+
}
|
|
732
|
+
renderSelectAllAlert() {
|
|
733
|
+
if (!this.allAlertMessage)
|
|
734
|
+
return null;
|
|
735
|
+
if (this.selectAllState !== false && this.selectAllState !== 'indeterminate')
|
|
736
|
+
return null;
|
|
737
|
+
return (h("div", { class: "cookiebar-alert-wrapper" }, h("br-message", { state: "warning", "show-icon": true, "is-feedback": true, message: this.allAlertMessage })));
|
|
738
|
+
}
|
|
739
|
+
/**
|
|
740
|
+
* Renderiza o painel no modo `open` (tela cheia) com as áreas B (cabeçalho),
|
|
741
|
+
* C (grupos de cookies), D (links complementares) e E (botão de aceite).
|
|
742
|
+
*/
|
|
743
|
+
renderOpenPanel() {
|
|
744
|
+
return (h("div", { class: "cookiebar-open-panel", part: "open-panel", role: "dialog", "aria-modal": "true", "aria-label": this.panelLabel, "aria-describedby": this.openPanelDescription ? `${this.customId}-desc` : undefined, tabindex: "-1" }, this.openPanelDescription && (h("span", { id: `${this.customId}-desc`, class: "sr-only" }, this.openPanelDescription)), h("div", { class: "cookiebar-body", part: "body" }, h("div", { class: "cookiebar-header", part: "header" }, this.hasHeaderSlot && h("slot", { name: "header" }), h("br-button", { class: "cookiebar-close", emphasis: "tertiary", shape: "circle", "aria-label": this.closeLabel, onClick: this.handleClose }, h("br-icon", { iconName: "fa6-solid:xmark", width: "16", height: "16" }))), h("div", { class: "cookiebar-groups" }, this.renderCookieGroupsHeader(), h("slot", null)), this.hasLinksSlot && (h("nav", { class: "cookiebar-links", "aria-label": this.linksLabel }, h("slot", { name: "links" })))), h("div", { class: "cookiebar-actions", part: "footer" }, this.hasActionsSlot ? h("slot", { name: "actions" }) : this.renderConsentActions())));
|
|
745
|
+
}
|
|
746
|
+
render() {
|
|
747
|
+
const containerContent = [
|
|
748
|
+
this.mode === 'default' && this.scrim && h("div", { key: 'e032d3e30e9e7a604207e7d5608eed48f602fba0', class: "cookiebar-scrim", part: "scrim", "aria-hidden": "true" }),
|
|
749
|
+
this.mode === 'default' ? this.renderDefaultPanel() : this.renderOpenPanel(),
|
|
750
|
+
];
|
|
751
|
+
return (h(Host, { key: '795000ece30e44b33cd24c2b02dc70f21656f6f6' }, h("div", { key: 'bd11d082c5f2b3dc35bff48a636edda720f8b060', "aria-live": "polite", "aria-atomic": "true", class: "sr-only" }, this.liveAnnouncement), this.show &&
|
|
752
|
+
(this.usesNativeDialog ? (h("dialog", { ref: (el) => (this.nativeDialogRef = el), class: this.getCssClassMap(), part: "container", role: this.usesNativeTopLayer ? undefined : 'dialog', "aria-modal": "true", "aria-label": this.mode === 'open' ? this.panelLabel : this.defaultPanelLabel, "aria-describedby": this.mode === 'open' && this.openPanelDescription ? `${this.customId}-desc` : undefined, onCancel: this.handleNativeCancel }, containerContent)) : (h("div", { ref: () => (this.nativeDialogRef = null), class: this.getCssClassMap(), part: "container" }, containerContent)))));
|
|
753
|
+
}
|
|
754
|
+
static get is() { return "br-cookiebar"; }
|
|
755
|
+
static get encapsulation() { return "shadow"; }
|
|
756
|
+
static get originalStyleUrls() {
|
|
757
|
+
return {
|
|
758
|
+
"$": ["cookiebar.scss"]
|
|
759
|
+
};
|
|
760
|
+
}
|
|
761
|
+
static get styleUrls() {
|
|
762
|
+
return {
|
|
763
|
+
"$": ["cookiebar.css"]
|
|
764
|
+
};
|
|
765
|
+
}
|
|
766
|
+
static get properties() {
|
|
767
|
+
return {
|
|
768
|
+
"customId": {
|
|
769
|
+
"type": "string",
|
|
770
|
+
"mutable": false,
|
|
771
|
+
"complexType": {
|
|
772
|
+
"original": "string",
|
|
773
|
+
"resolved": "string",
|
|
774
|
+
"references": {}
|
|
775
|
+
},
|
|
776
|
+
"required": false,
|
|
777
|
+
"optional": false,
|
|
778
|
+
"docs": {
|
|
779
|
+
"tags": [],
|
|
780
|
+
"text": "Identificador \u00FAnico; gerado automaticamente quando omitido."
|
|
781
|
+
},
|
|
782
|
+
"getter": false,
|
|
783
|
+
"setter": false,
|
|
784
|
+
"reflect": true,
|
|
785
|
+
"attribute": "custom-id",
|
|
786
|
+
"defaultValue": "generateUniqueId()"
|
|
787
|
+
},
|
|
788
|
+
"show": {
|
|
789
|
+
"type": "boolean",
|
|
790
|
+
"mutable": true,
|
|
791
|
+
"complexType": {
|
|
792
|
+
"original": "boolean",
|
|
793
|
+
"resolved": "boolean",
|
|
794
|
+
"references": {}
|
|
795
|
+
},
|
|
796
|
+
"required": false,
|
|
797
|
+
"optional": false,
|
|
798
|
+
"docs": {
|
|
799
|
+
"tags": [],
|
|
800
|
+
"text": "Controla a visibilidade do componente.\nO consumidor \u00E9 respons\u00E1vel por definir este valor com base na persist\u00EAncia do consentimento\n(ex: verificar se j\u00E1 existe um cookie de consentimento salvo)."
|
|
801
|
+
},
|
|
802
|
+
"getter": false,
|
|
803
|
+
"setter": false,
|
|
804
|
+
"reflect": true,
|
|
805
|
+
"attribute": "show",
|
|
806
|
+
"defaultValue": "false"
|
|
807
|
+
},
|
|
808
|
+
"mode": {
|
|
809
|
+
"type": "string",
|
|
810
|
+
"mutable": true,
|
|
811
|
+
"complexType": {
|
|
812
|
+
"original": "CookiebarMode",
|
|
813
|
+
"resolved": "\"default\" | \"open\"",
|
|
814
|
+
"references": {
|
|
815
|
+
"CookiebarMode": {
|
|
816
|
+
"location": "import",
|
|
817
|
+
"path": "./cookiebar.types",
|
|
818
|
+
"id": "src/components/cookiebar/cookiebar.types.ts::CookiebarMode",
|
|
819
|
+
"referenceLocation": "CookiebarMode"
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
},
|
|
823
|
+
"required": false,
|
|
824
|
+
"optional": false,
|
|
825
|
+
"docs": {
|
|
826
|
+
"tags": [],
|
|
827
|
+
"text": "Estado visual atual do painel.\n- `default`: barra inferior com texto e bot\u00F5es.\n- `open`: painel de tela cheia com grupos de cookies configur\u00E1veis."
|
|
828
|
+
},
|
|
829
|
+
"getter": false,
|
|
830
|
+
"setter": false,
|
|
831
|
+
"reflect": true,
|
|
832
|
+
"attribute": "mode",
|
|
833
|
+
"defaultValue": "'default'"
|
|
834
|
+
},
|
|
835
|
+
"allOptOut": {
|
|
836
|
+
"type": "boolean",
|
|
837
|
+
"mutable": false,
|
|
838
|
+
"complexType": {
|
|
839
|
+
"original": "boolean",
|
|
840
|
+
"resolved": "boolean",
|
|
841
|
+
"references": {}
|
|
842
|
+
},
|
|
843
|
+
"required": false,
|
|
844
|
+
"optional": false,
|
|
845
|
+
"docs": {
|
|
846
|
+
"tags": [],
|
|
847
|
+
"text": "Define se o cookiebar opera no padr\u00E3o opt-out (`true`, recomendado) ou opt-in (`false`).\n- **opt-out** (`true`): bot\u00E3o secund\u00E1rio \"Definir Cookies\"; usu\u00E1rio pode configurar cookies.\n- **opt-in** (`false`): bot\u00E3o secund\u00E1rio \"Ver Pol\u00EDtica de Cookies\"; painel \u00E9 somente leitura."
|
|
848
|
+
},
|
|
849
|
+
"getter": false,
|
|
850
|
+
"setter": false,
|
|
851
|
+
"reflect": true,
|
|
852
|
+
"attribute": "all-opt-out",
|
|
853
|
+
"defaultValue": "true"
|
|
854
|
+
},
|
|
855
|
+
"infoText": {
|
|
856
|
+
"type": "string",
|
|
857
|
+
"mutable": false,
|
|
858
|
+
"complexType": {
|
|
859
|
+
"original": "string",
|
|
860
|
+
"resolved": "string",
|
|
861
|
+
"references": {}
|
|
862
|
+
},
|
|
863
|
+
"required": true,
|
|
864
|
+
"optional": false,
|
|
865
|
+
"docs": {
|
|
866
|
+
"tags": [],
|
|
867
|
+
"text": "Texto informativo exibido na barra inferior (modo default), descrevendo a pol\u00EDtica de cookies."
|
|
868
|
+
},
|
|
869
|
+
"getter": false,
|
|
870
|
+
"setter": false,
|
|
871
|
+
"reflect": false,
|
|
872
|
+
"attribute": "info-text"
|
|
873
|
+
},
|
|
874
|
+
"acceptButton": {
|
|
875
|
+
"type": "string",
|
|
876
|
+
"mutable": false,
|
|
877
|
+
"complexType": {
|
|
878
|
+
"original": "string",
|
|
879
|
+
"resolved": "string",
|
|
880
|
+
"references": {}
|
|
881
|
+
},
|
|
882
|
+
"required": false,
|
|
883
|
+
"optional": false,
|
|
884
|
+
"docs": {
|
|
885
|
+
"tags": [],
|
|
886
|
+
"text": "Texto do bot\u00E3o prim\u00E1rio de aceite. Padr\u00E3o: `Aceitar`."
|
|
887
|
+
},
|
|
888
|
+
"getter": false,
|
|
889
|
+
"setter": false,
|
|
890
|
+
"reflect": false,
|
|
891
|
+
"attribute": "accept-button",
|
|
892
|
+
"defaultValue": "'Aceitar'"
|
|
893
|
+
},
|
|
894
|
+
"rejectButton": {
|
|
895
|
+
"type": "string",
|
|
896
|
+
"mutable": false,
|
|
897
|
+
"complexType": {
|
|
898
|
+
"original": "string",
|
|
899
|
+
"resolved": "string",
|
|
900
|
+
"references": {}
|
|
901
|
+
},
|
|
902
|
+
"required": false,
|
|
903
|
+
"optional": false,
|
|
904
|
+
"docs": {
|
|
905
|
+
"tags": [],
|
|
906
|
+
"text": "Texto do bot\u00E3o de rejei\u00E7\u00E3o dos cookies n\u00E3o obrigat\u00F3rios.\nExibido apenas quando `show-reject-button=\"true\"`."
|
|
907
|
+
},
|
|
908
|
+
"getter": false,
|
|
909
|
+
"setter": false,
|
|
910
|
+
"reflect": false,
|
|
911
|
+
"attribute": "reject-button",
|
|
912
|
+
"defaultValue": "'Rejeitar n\u00E3o obrigat\u00F3rios'"
|
|
913
|
+
},
|
|
914
|
+
"showRejectButton": {
|
|
915
|
+
"type": "boolean",
|
|
916
|
+
"mutable": false,
|
|
917
|
+
"complexType": {
|
|
918
|
+
"original": "boolean",
|
|
919
|
+
"resolved": "boolean",
|
|
920
|
+
"references": {}
|
|
921
|
+
},
|
|
922
|
+
"required": false,
|
|
923
|
+
"optional": false,
|
|
924
|
+
"docs": {
|
|
925
|
+
"tags": [],
|
|
926
|
+
"text": "Quando `true`, exibe o bot\u00E3o \"Rejeitar n\u00E3o obrigat\u00F3rios\" nos pain\u00E9is default e open.\nCookies de grupos com `group-opt-out=\"false\"` (sempre ativos) n\u00E3o s\u00E3o afetados."
|
|
927
|
+
},
|
|
928
|
+
"getter": false,
|
|
929
|
+
"setter": false,
|
|
930
|
+
"reflect": false,
|
|
931
|
+
"attribute": "show-reject-button",
|
|
932
|
+
"defaultValue": "false"
|
|
933
|
+
},
|
|
934
|
+
"optOutButton": {
|
|
935
|
+
"type": "string",
|
|
936
|
+
"mutable": false,
|
|
937
|
+
"complexType": {
|
|
938
|
+
"original": "string",
|
|
939
|
+
"resolved": "string",
|
|
940
|
+
"references": {}
|
|
941
|
+
},
|
|
942
|
+
"required": false,
|
|
943
|
+
"optional": false,
|
|
944
|
+
"docs": {
|
|
945
|
+
"tags": [],
|
|
946
|
+
"text": "Texto do bot\u00E3o secund\u00E1rio quando `all-opt-out=\"true\"`."
|
|
947
|
+
},
|
|
948
|
+
"getter": false,
|
|
949
|
+
"setter": false,
|
|
950
|
+
"reflect": false,
|
|
951
|
+
"attribute": "opt-out-button",
|
|
952
|
+
"defaultValue": "'Definir Cookies'"
|
|
953
|
+
},
|
|
954
|
+
"optInButton": {
|
|
955
|
+
"type": "string",
|
|
956
|
+
"mutable": false,
|
|
957
|
+
"complexType": {
|
|
958
|
+
"original": "string",
|
|
959
|
+
"resolved": "string",
|
|
960
|
+
"references": {}
|
|
961
|
+
},
|
|
962
|
+
"required": false,
|
|
963
|
+
"optional": false,
|
|
964
|
+
"docs": {
|
|
965
|
+
"tags": [],
|
|
966
|
+
"text": "Texto do bot\u00E3o secund\u00E1rio quando `all-opt-out=\"false\"`."
|
|
967
|
+
},
|
|
968
|
+
"getter": false,
|
|
969
|
+
"setter": false,
|
|
970
|
+
"reflect": false,
|
|
971
|
+
"attribute": "opt-in-button",
|
|
972
|
+
"defaultValue": "'Ver Pol\u00EDtica de Cookies'"
|
|
973
|
+
},
|
|
974
|
+
"closeLabel": {
|
|
975
|
+
"type": "string",
|
|
976
|
+
"mutable": false,
|
|
977
|
+
"complexType": {
|
|
978
|
+
"original": "string",
|
|
979
|
+
"resolved": "string",
|
|
980
|
+
"references": {}
|
|
981
|
+
},
|
|
982
|
+
"required": false,
|
|
983
|
+
"optional": false,
|
|
984
|
+
"docs": {
|
|
985
|
+
"tags": [],
|
|
986
|
+
"text": "`aria-label` do bot\u00E3o fechar exibido no canto do painel expandido (`mode=\"open\"`).\nPermite traduzir o r\u00F3tulo para outros idiomas."
|
|
987
|
+
},
|
|
988
|
+
"getter": false,
|
|
989
|
+
"setter": false,
|
|
990
|
+
"reflect": false,
|
|
991
|
+
"attribute": "close-label",
|
|
992
|
+
"defaultValue": "'Fechar'"
|
|
993
|
+
},
|
|
994
|
+
"panelLabel": {
|
|
995
|
+
"type": "string",
|
|
996
|
+
"mutable": false,
|
|
997
|
+
"complexType": {
|
|
998
|
+
"original": "string",
|
|
999
|
+
"resolved": "string",
|
|
1000
|
+
"references": {}
|
|
1001
|
+
},
|
|
1002
|
+
"required": false,
|
|
1003
|
+
"optional": false,
|
|
1004
|
+
"docs": {
|
|
1005
|
+
"tags": [],
|
|
1006
|
+
"text": "`aria-label` do painel expandido (`mode=\"open\"`), que possui `role=\"dialog\"`.\nLeitores de tela anunciam este texto ao entrar no di\u00E1logo modal de configura\u00E7\u00E3o de cookies.\nDeve descrever o prop\u00F3sito do di\u00E1logo de forma sucinta (ex: \"Configura\u00E7\u00F5es de cookies\")."
|
|
1007
|
+
},
|
|
1008
|
+
"getter": false,
|
|
1009
|
+
"setter": false,
|
|
1010
|
+
"reflect": false,
|
|
1011
|
+
"attribute": "panel-label",
|
|
1012
|
+
"defaultValue": "'Configura\u00E7\u00F5es de cookies'"
|
|
1013
|
+
},
|
|
1014
|
+
"defaultPanelLabel": {
|
|
1015
|
+
"type": "string",
|
|
1016
|
+
"mutable": false,
|
|
1017
|
+
"complexType": {
|
|
1018
|
+
"original": "string",
|
|
1019
|
+
"resolved": "string",
|
|
1020
|
+
"references": {}
|
|
1021
|
+
},
|
|
1022
|
+
"required": false,
|
|
1023
|
+
"optional": false,
|
|
1024
|
+
"docs": {
|
|
1025
|
+
"tags": [],
|
|
1026
|
+
"text": "`aria-label` da barra de aviso de cookies (`mode=\"default\"`).\nDeve descrever o prop\u00F3sito da regi\u00E3o de forma sucinta (ex: \"Aviso de cookies\")."
|
|
1027
|
+
},
|
|
1028
|
+
"getter": false,
|
|
1029
|
+
"setter": false,
|
|
1030
|
+
"reflect": false,
|
|
1031
|
+
"attribute": "default-panel-label",
|
|
1032
|
+
"defaultValue": "'Aviso de cookies'"
|
|
1033
|
+
},
|
|
1034
|
+
"cookieGroupsLabel": {
|
|
1035
|
+
"type": "string",
|
|
1036
|
+
"mutable": false,
|
|
1037
|
+
"complexType": {
|
|
1038
|
+
"original": "string",
|
|
1039
|
+
"resolved": "string",
|
|
1040
|
+
"references": {}
|
|
1041
|
+
},
|
|
1042
|
+
"required": false,
|
|
1043
|
+
"optional": false,
|
|
1044
|
+
"docs": {
|
|
1045
|
+
"tags": [],
|
|
1046
|
+
"text": "R\u00F3tulo do t\u00EDtulo da se\u00E7\u00E3o de grupos de cookies."
|
|
1047
|
+
},
|
|
1048
|
+
"getter": false,
|
|
1049
|
+
"setter": false,
|
|
1050
|
+
"reflect": false,
|
|
1051
|
+
"attribute": "cookie-groups-label",
|
|
1052
|
+
"defaultValue": "'Classes de cookies'"
|
|
1053
|
+
},
|
|
1054
|
+
"linksLabel": {
|
|
1055
|
+
"type": "string",
|
|
1056
|
+
"mutable": false,
|
|
1057
|
+
"complexType": {
|
|
1058
|
+
"original": "string",
|
|
1059
|
+
"resolved": "string",
|
|
1060
|
+
"references": {}
|
|
1061
|
+
},
|
|
1062
|
+
"required": false,
|
|
1063
|
+
"optional": false,
|
|
1064
|
+
"docs": {
|
|
1065
|
+
"tags": [],
|
|
1066
|
+
"text": "`aria-label` do elemento `<nav>` que envolve os links complementares no painel expandido.\nPermite traduzir o r\u00F3tulo para outros idiomas."
|
|
1067
|
+
},
|
|
1068
|
+
"getter": false,
|
|
1069
|
+
"setter": false,
|
|
1070
|
+
"reflect": false,
|
|
1071
|
+
"attribute": "links-label",
|
|
1072
|
+
"defaultValue": "'Links complementares'"
|
|
1073
|
+
},
|
|
1074
|
+
"selectAll": {
|
|
1075
|
+
"type": "boolean",
|
|
1076
|
+
"mutable": true,
|
|
1077
|
+
"complexType": {
|
|
1078
|
+
"original": "boolean",
|
|
1079
|
+
"resolved": "boolean",
|
|
1080
|
+
"references": {}
|
|
1081
|
+
},
|
|
1082
|
+
"required": false,
|
|
1083
|
+
"optional": false,
|
|
1084
|
+
"docs": {
|
|
1085
|
+
"tags": [],
|
|
1086
|
+
"text": "Estado inicial do checkbox \"Selecionar tudo\".\nQuando `true`, todos os grupos opt-out iniciam selecionados."
|
|
1087
|
+
},
|
|
1088
|
+
"getter": false,
|
|
1089
|
+
"setter": false,
|
|
1090
|
+
"reflect": false,
|
|
1091
|
+
"attribute": "select-all",
|
|
1092
|
+
"defaultValue": "false"
|
|
1093
|
+
},
|
|
1094
|
+
"selectAllLabel": {
|
|
1095
|
+
"type": "string",
|
|
1096
|
+
"mutable": false,
|
|
1097
|
+
"complexType": {
|
|
1098
|
+
"original": "string",
|
|
1099
|
+
"resolved": "string",
|
|
1100
|
+
"references": {}
|
|
1101
|
+
},
|
|
1102
|
+
"required": false,
|
|
1103
|
+
"optional": false,
|
|
1104
|
+
"docs": {
|
|
1105
|
+
"tags": [],
|
|
1106
|
+
"text": "Texto do checkbox geral quando est\u00E1 totalmente selecionado (a\u00E7\u00E3o: desselecionar)."
|
|
1107
|
+
},
|
|
1108
|
+
"getter": false,
|
|
1109
|
+
"setter": false,
|
|
1110
|
+
"reflect": false,
|
|
1111
|
+
"attribute": "select-all-label",
|
|
1112
|
+
"defaultValue": "'Selecionar tudo'"
|
|
1113
|
+
},
|
|
1114
|
+
"unselectAllLabel": {
|
|
1115
|
+
"type": "string",
|
|
1116
|
+
"mutable": false,
|
|
1117
|
+
"complexType": {
|
|
1118
|
+
"original": "string",
|
|
1119
|
+
"resolved": "string",
|
|
1120
|
+
"references": {}
|
|
1121
|
+
},
|
|
1122
|
+
"required": false,
|
|
1123
|
+
"optional": false,
|
|
1124
|
+
"docs": {
|
|
1125
|
+
"tags": [],
|
|
1126
|
+
"text": "Texto do checkbox geral quando est\u00E1 desmarcado ou indeterminado (a\u00E7\u00E3o: selecionar)."
|
|
1127
|
+
},
|
|
1128
|
+
"getter": false,
|
|
1129
|
+
"setter": false,
|
|
1130
|
+
"reflect": false,
|
|
1131
|
+
"attribute": "unselect-all-label",
|
|
1132
|
+
"defaultValue": "'Desselecionar tudo'"
|
|
1133
|
+
},
|
|
1134
|
+
"allAlertMessage": {
|
|
1135
|
+
"type": "string",
|
|
1136
|
+
"mutable": false,
|
|
1137
|
+
"complexType": {
|
|
1138
|
+
"original": "string",
|
|
1139
|
+
"resolved": "string",
|
|
1140
|
+
"references": {}
|
|
1141
|
+
},
|
|
1142
|
+
"required": false,
|
|
1143
|
+
"optional": true,
|
|
1144
|
+
"docs": {
|
|
1145
|
+
"tags": [],
|
|
1146
|
+
"text": "Mensagem exibida abaixo do checkbox geral quando est\u00E1 desmarcado ou com sele\u00E7\u00E3o parcial."
|
|
1147
|
+
},
|
|
1148
|
+
"getter": false,
|
|
1149
|
+
"setter": false,
|
|
1150
|
+
"reflect": false,
|
|
1151
|
+
"attribute": "all-alert-message"
|
|
1152
|
+
},
|
|
1153
|
+
"scrim": {
|
|
1154
|
+
"type": "boolean",
|
|
1155
|
+
"mutable": false,
|
|
1156
|
+
"complexType": {
|
|
1157
|
+
"original": "boolean",
|
|
1158
|
+
"resolved": "boolean",
|
|
1159
|
+
"references": {}
|
|
1160
|
+
},
|
|
1161
|
+
"required": false,
|
|
1162
|
+
"optional": false,
|
|
1163
|
+
"docs": {
|
|
1164
|
+
"tags": [],
|
|
1165
|
+
"text": "Quando `true`, exibe uma camada semitransparente (scrim) sobre o conte\u00FAdo da p\u00E1gina\nabaixo do painel default, sinalizando que o cookiebar requer aten\u00E7\u00E3o.\n\n**Efeito no foco:** com `scrim=true`, o atributo `inert` \u00E9 aplicado nos irm\u00E3os do\ncookiebar no DOM, prendendo o foco e o cursor virtual do leitor de tela dentro do\npainel default enquanto ele estiver vis\u00EDvel. Com `scrim=false` (padr\u00E3o), nenhum trap\n\u00E9 ativado \u2014 o usu\u00E1rio pode navegar livremente pela p\u00E1gina, em conformidade com\nWCAG 2.1.2 (No Keyboard Trap). Use `scrim=true` apenas quando o cen\u00E1rio de neg\u00F3cio\nexigir que a decis\u00E3o sobre cookies seja tomada antes de qualquer outra intera\u00E7\u00E3o.\n\nNo modo `open` (di\u00E1logo modal), o `inert` \u00E9 aplicado independentemente do valor de `scrim`."
|
|
1166
|
+
},
|
|
1167
|
+
"getter": false,
|
|
1168
|
+
"setter": false,
|
|
1169
|
+
"reflect": true,
|
|
1170
|
+
"attribute": "scrim",
|
|
1171
|
+
"defaultValue": "false"
|
|
1172
|
+
}
|
|
1173
|
+
};
|
|
1174
|
+
}
|
|
1175
|
+
static get states() {
|
|
1176
|
+
return {
|
|
1177
|
+
"openPanelDescription": {},
|
|
1178
|
+
"hasActionsSlot": {},
|
|
1179
|
+
"hasHeaderSlot": {},
|
|
1180
|
+
"hasLinksSlot": {},
|
|
1181
|
+
"isMobile": {},
|
|
1182
|
+
"openLiveAnnouncement": {},
|
|
1183
|
+
"selectAllState": {}
|
|
1184
|
+
};
|
|
1185
|
+
}
|
|
1186
|
+
static get events() {
|
|
1187
|
+
return [{
|
|
1188
|
+
"method": "brCookiebarShow",
|
|
1189
|
+
"name": "brCookiebarShow",
|
|
1190
|
+
"bubbles": true,
|
|
1191
|
+
"cancelable": true,
|
|
1192
|
+
"composed": true,
|
|
1193
|
+
"docs": {
|
|
1194
|
+
"tags": [],
|
|
1195
|
+
"text": "Emitido quando o componente se torna vis\u00EDvel (`show` \u2192 true)."
|
|
1196
|
+
},
|
|
1197
|
+
"complexType": {
|
|
1198
|
+
"original": "void",
|
|
1199
|
+
"resolved": "void",
|
|
1200
|
+
"references": {}
|
|
1201
|
+
}
|
|
1202
|
+
}, {
|
|
1203
|
+
"method": "brCookiebarHide",
|
|
1204
|
+
"name": "brCookiebarHide",
|
|
1205
|
+
"bubbles": true,
|
|
1206
|
+
"cancelable": true,
|
|
1207
|
+
"composed": true,
|
|
1208
|
+
"docs": {
|
|
1209
|
+
"tags": [],
|
|
1210
|
+
"text": "Emitido quando o componente \u00E9 ocultado (`show` \u2192 false)."
|
|
1211
|
+
},
|
|
1212
|
+
"complexType": {
|
|
1213
|
+
"original": "void",
|
|
1214
|
+
"resolved": "void",
|
|
1215
|
+
"references": {}
|
|
1216
|
+
}
|
|
1217
|
+
}, {
|
|
1218
|
+
"method": "brCookiebarOpen",
|
|
1219
|
+
"name": "brCookiebarOpen",
|
|
1220
|
+
"bubbles": true,
|
|
1221
|
+
"cancelable": true,
|
|
1222
|
+
"composed": true,
|
|
1223
|
+
"docs": {
|
|
1224
|
+
"tags": [],
|
|
1225
|
+
"text": "Emitido quando o painel expande para modo open."
|
|
1226
|
+
},
|
|
1227
|
+
"complexType": {
|
|
1228
|
+
"original": "void",
|
|
1229
|
+
"resolved": "void",
|
|
1230
|
+
"references": {}
|
|
1231
|
+
}
|
|
1232
|
+
}, {
|
|
1233
|
+
"method": "brCookiebarClose",
|
|
1234
|
+
"name": "brCookiebarClose",
|
|
1235
|
+
"bubbles": true,
|
|
1236
|
+
"cancelable": true,
|
|
1237
|
+
"composed": true,
|
|
1238
|
+
"docs": {
|
|
1239
|
+
"tags": [],
|
|
1240
|
+
"text": "Emitido quando o painel recolhe para modo default."
|
|
1241
|
+
},
|
|
1242
|
+
"complexType": {
|
|
1243
|
+
"original": "void",
|
|
1244
|
+
"resolved": "void",
|
|
1245
|
+
"references": {}
|
|
1246
|
+
}
|
|
1247
|
+
}, {
|
|
1248
|
+
"method": "brCookiebarAccept",
|
|
1249
|
+
"name": "brCookiebarAccept",
|
|
1250
|
+
"bubbles": true,
|
|
1251
|
+
"cancelable": true,
|
|
1252
|
+
"composed": true,
|
|
1253
|
+
"docs": {
|
|
1254
|
+
"tags": [],
|
|
1255
|
+
"text": "Sinal emitido quando o usu\u00E1rio clica em Aceitar.\nN\u00E3o carrega payload \u2014 ou\u00E7a `brCookiebarResponse` para obter o estado completo de consentimento."
|
|
1256
|
+
},
|
|
1257
|
+
"complexType": {
|
|
1258
|
+
"original": "void",
|
|
1259
|
+
"resolved": "void",
|
|
1260
|
+
"references": {}
|
|
1261
|
+
}
|
|
1262
|
+
}, {
|
|
1263
|
+
"method": "brCookiebarReject",
|
|
1264
|
+
"name": "brCookiebarReject",
|
|
1265
|
+
"bubbles": true,
|
|
1266
|
+
"cancelable": true,
|
|
1267
|
+
"composed": true,
|
|
1268
|
+
"docs": {
|
|
1269
|
+
"tags": [],
|
|
1270
|
+
"text": "Sinal emitido quando o usu\u00E1rio clica em \"Rejeitar n\u00E3o obrigat\u00F3rios\".\nN\u00E3o carrega payload \u2014 ou\u00E7a `brCookiebarResponse` para obter o estado completo de consentimento."
|
|
1271
|
+
},
|
|
1272
|
+
"complexType": {
|
|
1273
|
+
"original": "void",
|
|
1274
|
+
"resolved": "void",
|
|
1275
|
+
"references": {}
|
|
1276
|
+
}
|
|
1277
|
+
}, {
|
|
1278
|
+
"method": "brCookiebarResponse",
|
|
1279
|
+
"name": "brCookiebarResponse",
|
|
1280
|
+
"bubbles": true,
|
|
1281
|
+
"cancelable": true,
|
|
1282
|
+
"composed": true,
|
|
1283
|
+
"docs": {
|
|
1284
|
+
"tags": [],
|
|
1285
|
+
"text": "Emitido ap\u00F3s `brCookiebarAccept` ou `brCookiebarReject`, com o estado final de consentimento.\n\u00C9 o \u00FAnico evento que carrega `CookiebarOutputData` \u2014 use-o para persistir o consentimento\n(localStorage, cookie HTTP, API etc.).\nN\u00E3o \u00E9 disparado durante intera\u00E7\u00F5es com checkboxes e switches internos."
|
|
1286
|
+
},
|
|
1287
|
+
"complexType": {
|
|
1288
|
+
"original": "CookiebarOutputData",
|
|
1289
|
+
"resolved": "CookiebarOutputData",
|
|
1290
|
+
"references": {
|
|
1291
|
+
"CookiebarOutputData": {
|
|
1292
|
+
"location": "import",
|
|
1293
|
+
"path": "./cookiebar.types",
|
|
1294
|
+
"id": "src/components/cookiebar/cookiebar.types.ts::CookiebarOutputData",
|
|
1295
|
+
"referenceLocation": "CookiebarOutputData"
|
|
1296
|
+
}
|
|
1297
|
+
}
|
|
1298
|
+
}
|
|
1299
|
+
}, {
|
|
1300
|
+
"method": "brCookiebarPolicyClick",
|
|
1301
|
+
"name": "brCookiebarPolicyClick",
|
|
1302
|
+
"bubbles": true,
|
|
1303
|
+
"cancelable": true,
|
|
1304
|
+
"composed": true,
|
|
1305
|
+
"docs": {
|
|
1306
|
+
"tags": [],
|
|
1307
|
+
"text": "Emitido quando o usu\u00E1rio clica no bot\u00E3o secund\u00E1rio no modo opt-in (`allOptOut=false`).\nO consumidor \u00E9 respons\u00E1vel por navegar para a p\u00E1gina de Pol\u00EDtica de Cookies."
|
|
1308
|
+
},
|
|
1309
|
+
"complexType": {
|
|
1310
|
+
"original": "void",
|
|
1311
|
+
"resolved": "void",
|
|
1312
|
+
"references": {}
|
|
1313
|
+
}
|
|
1314
|
+
}];
|
|
1315
|
+
}
|
|
1316
|
+
static get methods() {
|
|
1317
|
+
return {
|
|
1318
|
+
"openDefault": {
|
|
1319
|
+
"complexType": {
|
|
1320
|
+
"signature": "() => Promise<void>",
|
|
1321
|
+
"parameters": [],
|
|
1322
|
+
"references": {
|
|
1323
|
+
"Promise": {
|
|
1324
|
+
"location": "global",
|
|
1325
|
+
"id": "global::Promise"
|
|
1326
|
+
}
|
|
1327
|
+
},
|
|
1328
|
+
"return": "Promise<void>"
|
|
1329
|
+
},
|
|
1330
|
+
"docs": {
|
|
1331
|
+
"text": "Exibe o cookiebar no modo `default` (barra inferior).",
|
|
1332
|
+
"tags": []
|
|
1333
|
+
}
|
|
1334
|
+
},
|
|
1335
|
+
"openPanel": {
|
|
1336
|
+
"complexType": {
|
|
1337
|
+
"signature": "() => Promise<void>",
|
|
1338
|
+
"parameters": [],
|
|
1339
|
+
"references": {
|
|
1340
|
+
"Promise": {
|
|
1341
|
+
"location": "global",
|
|
1342
|
+
"id": "global::Promise"
|
|
1343
|
+
}
|
|
1344
|
+
},
|
|
1345
|
+
"return": "Promise<void>"
|
|
1346
|
+
},
|
|
1347
|
+
"docs": {
|
|
1348
|
+
"text": "Exibe o cookiebar diretamente no modo `open` (painel de tela cheia).",
|
|
1349
|
+
"tags": []
|
|
1350
|
+
}
|
|
1351
|
+
},
|
|
1352
|
+
"close": {
|
|
1353
|
+
"complexType": {
|
|
1354
|
+
"signature": "() => Promise<void>",
|
|
1355
|
+
"parameters": [],
|
|
1356
|
+
"references": {
|
|
1357
|
+
"Promise": {
|
|
1358
|
+
"location": "global",
|
|
1359
|
+
"id": "global::Promise"
|
|
1360
|
+
}
|
|
1361
|
+
},
|
|
1362
|
+
"return": "Promise<void>"
|
|
1363
|
+
},
|
|
1364
|
+
"docs": {
|
|
1365
|
+
"text": "Oculta o cookiebar.",
|
|
1366
|
+
"tags": []
|
|
1367
|
+
}
|
|
1368
|
+
},
|
|
1369
|
+
"getSelectedCookies": {
|
|
1370
|
+
"complexType": {
|
|
1371
|
+
"signature": "() => Promise<CookiebarOutputData>",
|
|
1372
|
+
"parameters": [],
|
|
1373
|
+
"references": {
|
|
1374
|
+
"Promise": {
|
|
1375
|
+
"location": "global",
|
|
1376
|
+
"id": "global::Promise"
|
|
1377
|
+
},
|
|
1378
|
+
"CookiebarOutputData": {
|
|
1379
|
+
"location": "import",
|
|
1380
|
+
"path": "./cookiebar.types",
|
|
1381
|
+
"id": "src/components/cookiebar/cookiebar.types.ts::CookiebarOutputData",
|
|
1382
|
+
"referenceLocation": "CookiebarOutputData"
|
|
1383
|
+
}
|
|
1384
|
+
},
|
|
1385
|
+
"return": "Promise<CookiebarOutputData>"
|
|
1386
|
+
},
|
|
1387
|
+
"docs": {
|
|
1388
|
+
"text": "Retorna o JSON com o estado atual de sele\u00E7\u00E3o de todos os grupos e cookies.",
|
|
1389
|
+
"tags": []
|
|
1390
|
+
}
|
|
1391
|
+
}
|
|
1392
|
+
};
|
|
1393
|
+
}
|
|
1394
|
+
static get elementRef() { return "el"; }
|
|
1395
|
+
static get watchers() {
|
|
1396
|
+
return [{
|
|
1397
|
+
"propName": "show",
|
|
1398
|
+
"methodName": "handleShowChange"
|
|
1399
|
+
}, {
|
|
1400
|
+
"propName": "mode",
|
|
1401
|
+
"methodName": "handleModeChange"
|
|
1402
|
+
}, {
|
|
1403
|
+
"propName": "scrim",
|
|
1404
|
+
"methodName": "handleScrimChange"
|
|
1405
|
+
}, {
|
|
1406
|
+
"propName": "selectAll",
|
|
1407
|
+
"methodName": "handleSelectAllPropChange"
|
|
1408
|
+
}];
|
|
1409
|
+
}
|
|
1410
|
+
static get listeners() {
|
|
1411
|
+
return [{
|
|
1412
|
+
"name": "brCookiebarGroupChange",
|
|
1413
|
+
"method": "handleGroupChange",
|
|
1414
|
+
"target": undefined,
|
|
1415
|
+
"capture": false,
|
|
1416
|
+
"passive": false
|
|
1417
|
+
}];
|
|
1418
|
+
}
|
|
1419
|
+
}
|