@govbr-ds/webcomponents 2.1.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cem/custom-elements.json +63 -63
- 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 +54 -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 +2446 -0
- package/dist/cjs/br-datetime-picker.cjs.entry.js +1887 -0
- package/dist/cjs/br-divider.cjs.entry.js +225 -0
- package/dist/cjs/br-dropdown_2.cjs.entry.js +1856 -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 +177 -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 +356 -0
- package/dist/cjs/br-link.cjs.entry.js +132 -0
- package/dist/cjs/br-loading.cjs.entry.js +505 -0
- package/dist/cjs/br-magic-button.cjs.entry.js +92 -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 +55 -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 +954 -0
- package/dist/cjs/br-sign-in.cjs.entry.js +125 -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 +688 -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 +494 -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 +582 -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 +200 -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 +825 -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 +1925 -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 +420 -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 +906 -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 +698 -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 +237 -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 +259 -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 +585 -0
- package/dist/collection/components/select/select-list/select-list.css +1 -0
- package/dist/collection/components/select/select-list/select-list.js +1147 -0
- package/dist/collection/components/select/select-option/select-option.css +1 -0
- package/dist/collection/components/select/select-option/select-option.js +543 -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 +2575 -0
- package/dist/collection/components/select/select.types.js +1 -0
- package/dist/collection/components/sign-in/sign-in.css +1 -0
- package/dist/collection/components/sign-in/sign-in.js +400 -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 +1325 -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 +1153 -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 +1315 -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 +591 -0
- package/dist/collection/pages/scripts/dev-event-console.js +47 -0
- package/dist/collection/pages/scripts/menu.js +183 -0
- package/dist/collection/pages/scripts/pageLoader.js +1420 -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-0IYmyaTi.js +5 -0
- package/dist/components/p-41XwlWiS.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-B-sbd1_h.js +5 -0
- package/dist/components/p-B55qsau4.js +5 -0
- package/dist/components/p-BC7f6MK8.js +5 -0
- package/dist/components/p-BPJpHGOW.js +5 -0
- package/dist/components/p-BW0_ORNA.js +5 -0
- package/dist/components/p-BWXfdbQH.js +5 -0
- package/dist/components/p-Bb-nLtTG.js +5 -0
- package/dist/components/p-BkS6ujyf.js +5 -0
- package/dist/components/p-Bm0ECvfB.js +5 -0
- package/dist/components/p-C1yRmdso.js +5 -0
- package/dist/components/p-C3LQSQpc.js +5 -0
- package/dist/components/p-C98-mHmV.js +5 -0
- package/dist/components/p-CDZFuUlU.js +5 -0
- package/dist/components/p-CRfi23Rd.js +5 -0
- package/dist/components/p-CUI5zWGf.js +5 -0
- package/dist/components/p-CXMwM9m4.js +5 -0
- package/dist/components/p-CdDwqbBv.js +5 -0
- package/dist/components/p-CxviDiCr.js +5 -0
- package/dist/components/p-D3usVJE2.js +16 -0
- package/dist/components/p-D6zroLx5.js +5 -0
- package/dist/components/p-D9SpD3Ay.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-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-DYA74R1r.js +5 -0
- package/dist/components/p-DYnkGWii.js +5 -0
- package/dist/components/p-D_CSvOY9.js +5 -0
- package/dist/components/p-DaeGwqw0.js +5 -0
- package/dist/components/p-Dkg2scYZ.js +5 -0
- package/dist/components/p-Dmfk7eEe.js +5 -0
- package/dist/components/p-DoXNfcTT.js +5 -0
- package/dist/components/p-DvrdmqoQ.js +5 -0
- package/dist/components/p-DxZJrIyL.js +5 -0
- package/dist/components/p-LmeJrLxH.js +5 -0
- package/dist/components/p-TFWd_UBV.js +5 -0
- package/dist/components/p-aF8bGN3t.js +5 -0
- package/dist/components/p-bhULC15U.js +5 -0
- package/dist/components/p-cF3ia5e9.js +5 -0
- package/dist/components/p-cfPt-vKA.js +5 -0
- package/dist/components/p-gvnfuTjd.js +5 -0
- package/dist/components/p-nJOJGpyl.js +5 -0
- package/dist/components/p-ttI0nvv_.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 +52 -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 +2442 -0
- package/dist/esm/br-datetime-picker.entry.js +1885 -0
- package/dist/esm/br-divider.entry.js +223 -0
- package/dist/esm/br-dropdown_2.entry.js +1853 -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 +175 -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 +354 -0
- package/dist/esm/br-link.entry.js +130 -0
- package/dist/esm/br-loading.entry.js +503 -0
- package/dist/esm/br-magic-button.entry.js +90 -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 +53 -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 +950 -0
- package/dist/esm/br-sign-in.entry.js +123 -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 +686 -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 +492 -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 +580 -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 +67323 -0
- package/dist/hydrate/index.mjs +67313 -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/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-059c3d6c.entry.js +5 -0
- package/dist/webcomponents/p-0b8f39bc.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-1b138f1c.entry.js +5 -0
- package/dist/webcomponents/p-1bca4499.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-22443c08.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-4fe12a72.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-5b257a4b.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-60cc820c.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-6c5f6cb6.entry.js +5 -0
- package/dist/webcomponents/p-6f1c4425.entry.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-7cf9f4e5.entry.js +5 -0
- package/dist/webcomponents/p-7e1856e4.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-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-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-a9ff7c25.entry.js +5 -0
- package/dist/webcomponents/p-bba9fc09.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-cF3ia5e9.js +5 -0
- package/dist/webcomponents/p-cedb8eea.entry.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-dba376cb.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-e80a1eb0.entry.js +5 -0
- package/dist/webcomponents/p-f078f972.entry.js +5 -0
- package/dist/webcomponents/p-f6318e94.entry.js +5 -0
- package/dist/webcomponents/p-fcd4ae48.entry.js +5 -0
- package/dist/webcomponents/p-gvnfuTjd.js +5 -0
- package/dist/webcomponents/webcomponents.esm.js +5 -0
- package/package.json +1 -1
- package/cem/.gitkeep +0 -0
|
@@ -0,0 +1,2575 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Construído por SERPRO
|
|
3
|
+
* © https://serpro.gov.br/ - MIT License.
|
|
4
|
+
*/
|
|
5
|
+
import { Host, h, } from "@stencil/core";
|
|
6
|
+
import { dispatchNativeFormEvent } from "../../shared/utils/event";
|
|
7
|
+
import { listenForExternalBlockingSurface } from "../../shared/utils/floating-surface-dismiss";
|
|
8
|
+
import { getFormValidationState, isFormControlDisabled, safeSetFormValue, syncNativeFormValidity, } from "../../shared/utils/form";
|
|
9
|
+
import { hasAssignedSlotContent, hasNamedLightDomSlot } from "../../shared/utils/slot";
|
|
10
|
+
import { resolveFormValidator } from "../../shared/utils/validator";
|
|
11
|
+
let selectId = 0;
|
|
12
|
+
/**
|
|
13
|
+
* ## Design System
|
|
14
|
+
*
|
|
15
|
+
* Para a documentação completa de design, incluindo diretrizes de uso, acessibilidade e exemplos visuais, consulte o [Design System do GovBR](https://www.gov.br/ds/components/select?tab=designer).
|
|
16
|
+
*
|
|
17
|
+
* @category Formulários
|
|
18
|
+
* @status stable
|
|
19
|
+
* @slot default - Opções declaradas com elementos br-select-option.
|
|
20
|
+
* @slot feedback - Mensagem de validação, normalmente um br-message.
|
|
21
|
+
* @slot validation-loading - Indicador exibido durante validação assíncrona.
|
|
22
|
+
* @slot loading - Indicador exibido durante a busca remota de opções.
|
|
23
|
+
*
|
|
24
|
+
* @part container - Contêiner visual principal do select.
|
|
25
|
+
* @part input - Campo de seleção e busca.
|
|
26
|
+
* @part input-container - Contêiner visual do campo.
|
|
27
|
+
* @part input-label - Rótulo do campo.
|
|
28
|
+
* @part input-field - Campo input nativo.
|
|
29
|
+
* @part input-group - Grupo visual do campo.
|
|
30
|
+
* @part input-icon - Ícone do campo.
|
|
31
|
+
* @part input-action - Botão de abertura e fechamento.
|
|
32
|
+
* @part input-action-button - Botão interno da ação.
|
|
33
|
+
* @part list - Lista de opções.
|
|
34
|
+
* @part option - Opção individual.
|
|
35
|
+
* @part select-all - Alias legado para a opção de selecionar todos.
|
|
36
|
+
* @part empty-option - Alias legado para a opção vazia da lista.
|
|
37
|
+
* @part option-checkbox - Alias legado para o checkbox da opção.
|
|
38
|
+
* @part option-radio - Alias legado para o radio da opção.
|
|
39
|
+
* @part hidden-select - Select nativo invisível usado na integração com formulários.
|
|
40
|
+
* @part feedback - Área de mensagem de validação.
|
|
41
|
+
* @part validation-loading - Área do indicador de validação assíncrona.
|
|
42
|
+
*/
|
|
43
|
+
export class Select {
|
|
44
|
+
constructor() {
|
|
45
|
+
/**
|
|
46
|
+
* Remove a borda do input quando o componente não está em foco.
|
|
47
|
+
*
|
|
48
|
+
* @default false
|
|
49
|
+
*/
|
|
50
|
+
this.borderless = false;
|
|
51
|
+
/**
|
|
52
|
+
* Desativa toda a interação do select.
|
|
53
|
+
*
|
|
54
|
+
* @default false
|
|
55
|
+
*/
|
|
56
|
+
this.disabled = false;
|
|
57
|
+
/**
|
|
58
|
+
* Exibe label e campo na mesma linha.
|
|
59
|
+
*
|
|
60
|
+
* @default false
|
|
61
|
+
* @deprecated Use `inline`.
|
|
62
|
+
*/
|
|
63
|
+
this.isInline = false;
|
|
64
|
+
/**
|
|
65
|
+
* Habilita o modo de seleção múltipla.
|
|
66
|
+
*
|
|
67
|
+
* @default false
|
|
68
|
+
* @deprecated Use `multiple`.
|
|
69
|
+
*/
|
|
70
|
+
this.isMultiple = false;
|
|
71
|
+
/**
|
|
72
|
+
* Mantém a lista aberta depois de uma seleção.
|
|
73
|
+
*
|
|
74
|
+
* @default false
|
|
75
|
+
* @deprecated O comportamento atual usa o fechamento padrão do select; mantenha esta prop
|
|
76
|
+
* apenas para compatibilidade com integrações legadas.
|
|
77
|
+
*/
|
|
78
|
+
this.keepOpenOnSelect = false;
|
|
79
|
+
/**
|
|
80
|
+
* Define quantas opções ficam visíveis na janela da lista.
|
|
81
|
+
*
|
|
82
|
+
* @default 6
|
|
83
|
+
*/
|
|
84
|
+
this.visibleItems = 6;
|
|
85
|
+
/**
|
|
86
|
+
* Informa a altura base de cada opção para o cálculo de virtual scroll.
|
|
87
|
+
*
|
|
88
|
+
* @default 40
|
|
89
|
+
*/
|
|
90
|
+
this.itemHeight = 40;
|
|
91
|
+
/**
|
|
92
|
+
* Controla a largura do campo de entrada.
|
|
93
|
+
*
|
|
94
|
+
* @type {string}
|
|
95
|
+
* @example '20rem'
|
|
96
|
+
*/
|
|
97
|
+
this.inputWidth = undefined;
|
|
98
|
+
/**
|
|
99
|
+
* Define quantas opções extras são renderizadas antes e depois da área visível no virtual scroll.
|
|
100
|
+
*
|
|
101
|
+
* @default 1
|
|
102
|
+
*/
|
|
103
|
+
this.overscan = 1;
|
|
104
|
+
/**
|
|
105
|
+
* Controla o estado aberto/fechado da lista.
|
|
106
|
+
*
|
|
107
|
+
* @default false
|
|
108
|
+
* @deprecated Use `open`.
|
|
109
|
+
*/
|
|
110
|
+
this.isOpen = false;
|
|
111
|
+
/**
|
|
112
|
+
* Valor público do select baseado nas opções atualmente selecionadas.
|
|
113
|
+
*
|
|
114
|
+
* @type {string | string[] | undefined}
|
|
115
|
+
* @remarks Em modo múltiplo, o valor público é um array de strings.
|
|
116
|
+
*/
|
|
117
|
+
this.value = '';
|
|
118
|
+
/**
|
|
119
|
+
* Texto exibido quando não há seleção.
|
|
120
|
+
*
|
|
121
|
+
* @type {string | undefined}
|
|
122
|
+
*/
|
|
123
|
+
this.placeholder = '';
|
|
124
|
+
/**
|
|
125
|
+
* Indica que o preenchimento do select é obrigatório.
|
|
126
|
+
*
|
|
127
|
+
* @default false
|
|
128
|
+
*/
|
|
129
|
+
this.required = false;
|
|
130
|
+
/**
|
|
131
|
+
* Rótulo apresentado para a opção de selecionar todos no modo múltiplo.
|
|
132
|
+
*
|
|
133
|
+
* @default 'Selecionar todos'
|
|
134
|
+
*/
|
|
135
|
+
this.selectAllLabel = Select.SELECT_ALL_LABEL;
|
|
136
|
+
/**
|
|
137
|
+
* Habilita a filtragem textual das opções por rótulo ou valor.
|
|
138
|
+
*
|
|
139
|
+
* @default true
|
|
140
|
+
*/
|
|
141
|
+
this.filterable = true;
|
|
142
|
+
/**
|
|
143
|
+
* Define se as opções são filtradas localmente ou fornecidas por uma busca remota.
|
|
144
|
+
* Em `remote`, o componente emite `brSelectSearch`; a aplicação deve buscar,
|
|
145
|
+
* validar e aplicar as opções por `setOptions()`.
|
|
146
|
+
* @default 'local'
|
|
147
|
+
*/
|
|
148
|
+
this.searchMode = 'local';
|
|
149
|
+
/**
|
|
150
|
+
* Indica que uma busca remota de opções está pendente.
|
|
151
|
+
* Enquanto ativo, novas opções não podem ser selecionadas; a aplicação
|
|
152
|
+
* continua responsável por debounce, cancelamento, erros e autenticação.
|
|
153
|
+
* @default false
|
|
154
|
+
*/
|
|
155
|
+
this.loading = false;
|
|
156
|
+
/**
|
|
157
|
+
* Exibe o ícone de busca no campo de entrada.
|
|
158
|
+
*
|
|
159
|
+
* @default false
|
|
160
|
+
*/
|
|
161
|
+
this.showSearchIcon = false;
|
|
162
|
+
/**
|
|
163
|
+
* Rótulo apresentado quando todas as opções já estão selecionadas no modo múltiplo.
|
|
164
|
+
*
|
|
165
|
+
* @default 'Desselecionar todos'
|
|
166
|
+
*/
|
|
167
|
+
this.unselectAllLabel = Select.DESELECT_ALL_LABEL;
|
|
168
|
+
/**
|
|
169
|
+
* Opções fornecidas como array ou JSON, além das opções projetadas por slot.
|
|
170
|
+
*
|
|
171
|
+
* @deprecated O formato de opções tipado atual é preferível; o formato legado permanece aceito.
|
|
172
|
+
*/
|
|
173
|
+
this.options = [];
|
|
174
|
+
/** Identificador público do controle. */
|
|
175
|
+
this.customId = `br-select-${selectId++}`;
|
|
176
|
+
/** Quantidade mínima de opções selecionadas no modo múltiplo. */
|
|
177
|
+
this.minSelections = 0;
|
|
178
|
+
/** Quantidade máxima de opções selecionadas no modo múltiplo. */
|
|
179
|
+
this.maxSelections = 0;
|
|
180
|
+
this.shouldRestoreSelectedOptionOnOpen = false;
|
|
181
|
+
this.pendingOptions = null;
|
|
182
|
+
this.slotElement = null;
|
|
183
|
+
this.handleSlotChange = () => this.syncOptionsFromSlot();
|
|
184
|
+
this.lastEmittedStateKey = '';
|
|
185
|
+
this.isStateChangeReady = false;
|
|
186
|
+
this.isValueChangeReady = false;
|
|
187
|
+
this.listboxId = `${this.customId}-listbox`;
|
|
188
|
+
this.activeOptionIndex = -1;
|
|
189
|
+
this.searchTerm = '';
|
|
190
|
+
this.formDisabled = false;
|
|
191
|
+
this.isValidating = false;
|
|
192
|
+
this.validatorMessage = null;
|
|
193
|
+
this.hasFeedbackSlot = false;
|
|
194
|
+
this.hasValidationLoadingSlot = false;
|
|
195
|
+
this.customValidationMessage = '';
|
|
196
|
+
this.validationRunId = 0;
|
|
197
|
+
this.lastAnnouncedOpen = false;
|
|
198
|
+
this.isApplyingExternalValue = false;
|
|
199
|
+
this.suppressValueChange = false;
|
|
200
|
+
this.hasImperativeOptions = false;
|
|
201
|
+
this.remoteSelectedOptions = new Map();
|
|
202
|
+
/**
|
|
203
|
+
* Sincroniza as opções declaradas no slot com a lista interna renderizada.
|
|
204
|
+
*
|
|
205
|
+
* @remarks
|
|
206
|
+
* Esse passo mantém alinhados o estado visual da lista e o texto exibido no input
|
|
207
|
+
* quando as opções são adicionadas, removidas ou alteradas dinamicamente.
|
|
208
|
+
*/
|
|
209
|
+
this.syncOptionsFromSlot = (updateDisplayValue = true) => {
|
|
210
|
+
if (this.hasImperativeOptions)
|
|
211
|
+
return;
|
|
212
|
+
const nodes = this.slotElement?.assignedNodes({ flatten: true }) ?? [];
|
|
213
|
+
const options = nodes.map((n) => this.nodeToOption(n)).filter((o) => Boolean(o));
|
|
214
|
+
// Envia opções para o br-select-list
|
|
215
|
+
this.selectListElement?.setOptions(options);
|
|
216
|
+
if (updateDisplayValue)
|
|
217
|
+
this.syncDisplayValue(options);
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
formDisabledCallback(disabled) {
|
|
221
|
+
this.formDisabled = disabled;
|
|
222
|
+
}
|
|
223
|
+
formResetCallback() {
|
|
224
|
+
this.validationRunId++;
|
|
225
|
+
this.validatorMessage = null;
|
|
226
|
+
this.customValidationMessage = '';
|
|
227
|
+
this.applySelectedValue(this.initialValue);
|
|
228
|
+
}
|
|
229
|
+
formStateRestoreCallback(state) {
|
|
230
|
+
if (typeof state !== 'string' || state === '')
|
|
231
|
+
return;
|
|
232
|
+
try {
|
|
233
|
+
this.applySelectedValue(JSON.parse(state));
|
|
234
|
+
}
|
|
235
|
+
catch {
|
|
236
|
+
this.applySelectedValue(state);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
componentWillLoad() {
|
|
240
|
+
this.hasFeedbackSlot = hasNamedLightDomSlot(this.el, 'feedback');
|
|
241
|
+
this.hasValidationLoadingSlot = hasNamedLightDomSlot(this.el, 'validation-loading');
|
|
242
|
+
this.setSelectionMode(this.effectiveMultiple);
|
|
243
|
+
const initialOptions = this.getHostOptions();
|
|
244
|
+
const propOptions = this.getOptionsProp();
|
|
245
|
+
if (initialOptions.length === 0 && propOptions.length > 0) {
|
|
246
|
+
this.pendingOptions = propOptions;
|
|
247
|
+
this.syncDisplayValue(propOptions);
|
|
248
|
+
}
|
|
249
|
+
else {
|
|
250
|
+
this.syncDisplayValue(initialOptions);
|
|
251
|
+
}
|
|
252
|
+
this.initialValue = Array.isArray(this.value) ? [...this.value] : this.value;
|
|
253
|
+
this.syncFormState();
|
|
254
|
+
}
|
|
255
|
+
componentDidLoad() {
|
|
256
|
+
this.lastEmittedStateKey = this.getStateChangeKey();
|
|
257
|
+
this.isStateChangeReady = true;
|
|
258
|
+
this.setSelectionMode(this.effectiveMultiple);
|
|
259
|
+
// Inicializa sincronização de opções a partir do slot
|
|
260
|
+
this.slotElement = this.el.shadowRoot?.querySelector('slot:not([name])');
|
|
261
|
+
if (this.slotElement) {
|
|
262
|
+
this.syncOptionsFromSlot(false);
|
|
263
|
+
this.slotElement.addEventListener('slotchange', this.handleSlotChange);
|
|
264
|
+
}
|
|
265
|
+
if (this.pendingOptions && this.selectListElement) {
|
|
266
|
+
this.selectListElement.setOptions(this.pendingOptions);
|
|
267
|
+
this.pendingOptions = null;
|
|
268
|
+
}
|
|
269
|
+
this.isValueChangeReady = true;
|
|
270
|
+
this.lastAnnouncedOpen = this.effectiveOpen;
|
|
271
|
+
if (this.effectiveOpen)
|
|
272
|
+
this.attachBlockingSurfaceListener();
|
|
273
|
+
this.updateValidity();
|
|
274
|
+
}
|
|
275
|
+
disconnectedCallback() {
|
|
276
|
+
if (this.slotElement) {
|
|
277
|
+
this.slotElement.removeEventListener('slotchange', this.handleSlotChange);
|
|
278
|
+
this.slotElement = null;
|
|
279
|
+
}
|
|
280
|
+
this.detachBlockingSurfaceListener();
|
|
281
|
+
}
|
|
282
|
+
get effectiveMultiple() {
|
|
283
|
+
return this.multiple ?? this.isMultiple;
|
|
284
|
+
}
|
|
285
|
+
get effectiveInline() {
|
|
286
|
+
return this.inline ?? this.isInline;
|
|
287
|
+
}
|
|
288
|
+
get effectiveOpen() {
|
|
289
|
+
return this.open ?? this.isOpen;
|
|
290
|
+
}
|
|
291
|
+
isDisabled() {
|
|
292
|
+
return isFormControlDisabled(this.disabled, this.formDisabled);
|
|
293
|
+
}
|
|
294
|
+
handleDisabledChange(isDisabled) {
|
|
295
|
+
if (isDisabled && this.effectiveOpen) {
|
|
296
|
+
this.close();
|
|
297
|
+
return;
|
|
298
|
+
}
|
|
299
|
+
this.emitStateChange();
|
|
300
|
+
}
|
|
301
|
+
handleIsOpenChange(isOpen) {
|
|
302
|
+
if (this.open === undefined)
|
|
303
|
+
this.syncOpenState(isOpen);
|
|
304
|
+
}
|
|
305
|
+
handleFilterableChange(filterable) {
|
|
306
|
+
if (!filterable) {
|
|
307
|
+
this.clearSearch();
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
handleLoadingChange(loading) {
|
|
311
|
+
if (this.selectListElement)
|
|
312
|
+
this.selectListElement.loading = loading;
|
|
313
|
+
}
|
|
314
|
+
handleIsMultipleChange(isMultiple) {
|
|
315
|
+
if (this.multiple === undefined)
|
|
316
|
+
this.setSelectionMode(isMultiple);
|
|
317
|
+
this.syncDisplayValue();
|
|
318
|
+
}
|
|
319
|
+
handleMultipleChange(multiple) {
|
|
320
|
+
if (multiple !== undefined)
|
|
321
|
+
this.setSelectionMode(multiple);
|
|
322
|
+
this.syncDisplayValue();
|
|
323
|
+
}
|
|
324
|
+
handleOpenChange(open) {
|
|
325
|
+
if (open !== undefined)
|
|
326
|
+
this.syncOpenState(open);
|
|
327
|
+
}
|
|
328
|
+
handleExternalValueChange(value) {
|
|
329
|
+
if (this.isApplyingExternalValue)
|
|
330
|
+
return;
|
|
331
|
+
this.applySelectedValue(value);
|
|
332
|
+
}
|
|
333
|
+
handleOptionsChange() {
|
|
334
|
+
const options = this.getOptionsProp();
|
|
335
|
+
void this.setOptions(options);
|
|
336
|
+
}
|
|
337
|
+
syncOpenState(isOpen) {
|
|
338
|
+
if (this.lastAnnouncedOpen !== isOpen) {
|
|
339
|
+
(isOpen ? this.opened : this.closed).emit();
|
|
340
|
+
this.lastAnnouncedOpen = isOpen;
|
|
341
|
+
}
|
|
342
|
+
if (isOpen) {
|
|
343
|
+
this.attachBlockingSurfaceListener();
|
|
344
|
+
this.selectInputElement?.flipUp();
|
|
345
|
+
void this.openListAndRestorePointerFocus();
|
|
346
|
+
}
|
|
347
|
+
else {
|
|
348
|
+
this.detachBlockingSurfaceListener();
|
|
349
|
+
this.selectInputElement?.flipDown();
|
|
350
|
+
void this.selectListElement?.close();
|
|
351
|
+
}
|
|
352
|
+
this.emitStateChange();
|
|
353
|
+
}
|
|
354
|
+
attachBlockingSurfaceListener() {
|
|
355
|
+
this.cleanupBlockingSurfaceDismissal ?? (this.cleanupBlockingSurfaceDismissal = listenForExternalBlockingSurface(this.el, () => void this.close()));
|
|
356
|
+
}
|
|
357
|
+
detachBlockingSurfaceListener() {
|
|
358
|
+
this.cleanupBlockingSurfaceDismissal?.();
|
|
359
|
+
this.cleanupBlockingSurfaceDismissal = undefined;
|
|
360
|
+
}
|
|
361
|
+
handleSelectInputFocus() {
|
|
362
|
+
this.activeOptionIndex = -1;
|
|
363
|
+
if (this.filterable && !this.effectiveOpen) {
|
|
364
|
+
this.clearSearch();
|
|
365
|
+
void this.show();
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
handleSelectInputValueChange(event) {
|
|
369
|
+
if (!this.filterable || this.isDisabled())
|
|
370
|
+
return;
|
|
371
|
+
const nextSearchTerm = event.detail ?? '';
|
|
372
|
+
this.searchTerm = nextSearchTerm;
|
|
373
|
+
this.activeOptionIndex = -1;
|
|
374
|
+
this.brSelectSearch.emit({ query: nextSearchTerm });
|
|
375
|
+
/*
|
|
376
|
+
* A chamada imperativa garante que a transição para string vazia também
|
|
377
|
+
* alcance a lista interna. Isso evita depender apenas da remoção/atualização
|
|
378
|
+
* do atributo `search-term` no custom element.
|
|
379
|
+
*/
|
|
380
|
+
void this.getSelectListController()?.setSearchTerm?.(nextSearchTerm);
|
|
381
|
+
if (!this.effectiveOpen) {
|
|
382
|
+
void this.show();
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
handleSelectInputActionClick() {
|
|
386
|
+
this.toggleOpenFromPointer();
|
|
387
|
+
}
|
|
388
|
+
handleSelectInputClick() {
|
|
389
|
+
if (this.filterable) {
|
|
390
|
+
if (!this.effectiveOpen) {
|
|
391
|
+
this.shouldRestoreSelectedOptionOnOpen = true;
|
|
392
|
+
void this.show();
|
|
393
|
+
}
|
|
394
|
+
return;
|
|
395
|
+
}
|
|
396
|
+
this.toggleOpenFromPointer();
|
|
397
|
+
}
|
|
398
|
+
handleSelectOptionStateChange(event) {
|
|
399
|
+
this.syncSlottedOptionSelection(event.detail);
|
|
400
|
+
this.rememberRemoteSelections(this.getCurrentOptions());
|
|
401
|
+
this.syncDisplayValue();
|
|
402
|
+
this.syncActiveOptionIndex(event.detail);
|
|
403
|
+
event.stopPropagation();
|
|
404
|
+
const detail = { selected: event.detail.selected, value: event.detail.value };
|
|
405
|
+
this.emitStateChange(detail);
|
|
406
|
+
this.updateValidity();
|
|
407
|
+
if (!this.keepOpenOnSelect && !this.effectiveMultiple)
|
|
408
|
+
void this.close();
|
|
409
|
+
dispatchNativeFormEvent(this.el, 'input');
|
|
410
|
+
dispatchNativeFormEvent(this.el, 'change');
|
|
411
|
+
}
|
|
412
|
+
handleSelectOptionHover(event) {
|
|
413
|
+
this.optionHover.emit(event.detail);
|
|
414
|
+
}
|
|
415
|
+
// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: centraliza a navegação por teclado do componente.
|
|
416
|
+
async handleKeyDown(event) {
|
|
417
|
+
if (this.isDisabled())
|
|
418
|
+
return;
|
|
419
|
+
const path = this.getEventPath(event);
|
|
420
|
+
const isFromInput = path.includes(this.selectInputElement);
|
|
421
|
+
const isFromList = path.includes(this.selectListElement);
|
|
422
|
+
if (!isFromInput && !isFromList)
|
|
423
|
+
return;
|
|
424
|
+
switch (event.key) {
|
|
425
|
+
case 'ArrowDown':
|
|
426
|
+
event.preventDefault();
|
|
427
|
+
await this.openAndFocusBoundary(isFromInput, 1);
|
|
428
|
+
return;
|
|
429
|
+
case 'ArrowUp':
|
|
430
|
+
event.preventDefault();
|
|
431
|
+
await this.openAndFocusBoundary(isFromInput, -1);
|
|
432
|
+
return;
|
|
433
|
+
case 'Home':
|
|
434
|
+
if (!this.effectiveOpen)
|
|
435
|
+
return;
|
|
436
|
+
event.preventDefault();
|
|
437
|
+
await this.focusOptionByIndex(0);
|
|
438
|
+
return;
|
|
439
|
+
case 'End':
|
|
440
|
+
if (!this.effectiveOpen)
|
|
441
|
+
return;
|
|
442
|
+
event.preventDefault();
|
|
443
|
+
await this.focusOptionByIndex(this.getNavigableOptions().length - 1);
|
|
444
|
+
return;
|
|
445
|
+
case 'Enter':
|
|
446
|
+
case ' ':
|
|
447
|
+
if (isFromInput && this.filterable && event.key === ' ') {
|
|
448
|
+
return;
|
|
449
|
+
}
|
|
450
|
+
if (isFromList) {
|
|
451
|
+
return;
|
|
452
|
+
}
|
|
453
|
+
event.preventDefault();
|
|
454
|
+
if (!this.effectiveOpen) {
|
|
455
|
+
await this.show();
|
|
456
|
+
await this.focusInitialOption(1);
|
|
457
|
+
return;
|
|
458
|
+
}
|
|
459
|
+
await this.selectFocusedOption();
|
|
460
|
+
return;
|
|
461
|
+
case 'Escape':
|
|
462
|
+
if (!this.effectiveOpen)
|
|
463
|
+
return;
|
|
464
|
+
event.preventDefault();
|
|
465
|
+
await this.close();
|
|
466
|
+
this.activeOptionIndex = -1;
|
|
467
|
+
await this.selectInputElement?.setFocus?.();
|
|
468
|
+
return;
|
|
469
|
+
case 'Tab':
|
|
470
|
+
if (!this.effectiveOpen)
|
|
471
|
+
return;
|
|
472
|
+
await this.close();
|
|
473
|
+
this.activeOptionIndex = -1;
|
|
474
|
+
return;
|
|
475
|
+
default:
|
|
476
|
+
return;
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
handleWindowClick(ev) {
|
|
480
|
+
this.handleOutsideClick(ev);
|
|
481
|
+
}
|
|
482
|
+
/**
|
|
483
|
+
* Habilita o select para interação do usuário.
|
|
484
|
+
*
|
|
485
|
+
* @returns Uma promise concluída após a atualização do estado.
|
|
486
|
+
*/
|
|
487
|
+
async enable() {
|
|
488
|
+
this.disabled = false;
|
|
489
|
+
}
|
|
490
|
+
/**
|
|
491
|
+
* Desabilita o select e impede novas interações.
|
|
492
|
+
*
|
|
493
|
+
* @returns Uma promise concluída após a atualização do estado.
|
|
494
|
+
*/
|
|
495
|
+
async disable() {
|
|
496
|
+
this.disabled = true;
|
|
497
|
+
}
|
|
498
|
+
/**
|
|
499
|
+
* Abre a lista de opções quando o componente está habilitado.
|
|
500
|
+
*
|
|
501
|
+
* @returns Uma promise concluída após a atualização do estado.
|
|
502
|
+
*/
|
|
503
|
+
async show() {
|
|
504
|
+
if (this.isDisabled())
|
|
505
|
+
return;
|
|
506
|
+
if (this.open !== undefined)
|
|
507
|
+
this.open = true;
|
|
508
|
+
else
|
|
509
|
+
this.isOpen = true;
|
|
510
|
+
}
|
|
511
|
+
/**
|
|
512
|
+
* Fecha a lista de opções quando o componente está habilitado.
|
|
513
|
+
*
|
|
514
|
+
* @returns Uma promise concluída após a atualização do estado.
|
|
515
|
+
*/
|
|
516
|
+
async close() {
|
|
517
|
+
if (this.isDisabled())
|
|
518
|
+
return;
|
|
519
|
+
if (this.open !== undefined)
|
|
520
|
+
this.open = false;
|
|
521
|
+
else
|
|
522
|
+
this.isOpen = false;
|
|
523
|
+
this.clearSearch();
|
|
524
|
+
}
|
|
525
|
+
/**
|
|
526
|
+
* Alterna entre os estados aberto e fechado do select.
|
|
527
|
+
*
|
|
528
|
+
* @returns {Promise<void>} Uma promise concluída após a atualização do estado.
|
|
529
|
+
*/
|
|
530
|
+
async toggleOpen() {
|
|
531
|
+
if (this.isDisabled())
|
|
532
|
+
return;
|
|
533
|
+
if (this.open !== undefined)
|
|
534
|
+
this.open = !this.open;
|
|
535
|
+
else
|
|
536
|
+
this.isOpen = !this.isOpen;
|
|
537
|
+
}
|
|
538
|
+
/**
|
|
539
|
+
* Limpa a seleção atual.
|
|
540
|
+
*
|
|
541
|
+
* @deprecated Use `setValue('')` ou a API de formulário.
|
|
542
|
+
*/
|
|
543
|
+
async clear() {
|
|
544
|
+
await this.setValue(this.effectiveMultiple ? [] : '');
|
|
545
|
+
}
|
|
546
|
+
/**
|
|
547
|
+
* Retorna o valor público atual.
|
|
548
|
+
*
|
|
549
|
+
* @deprecated Leia a propriedade `value` diretamente.
|
|
550
|
+
*/
|
|
551
|
+
async getValue() {
|
|
552
|
+
return this.value ?? (this.effectiveMultiple ? [] : '');
|
|
553
|
+
}
|
|
554
|
+
/**
|
|
555
|
+
* Define o valor público do select.
|
|
556
|
+
*
|
|
557
|
+
* @deprecated Atribua a propriedade `value` diretamente.
|
|
558
|
+
*/
|
|
559
|
+
async setValue(value) {
|
|
560
|
+
this.applySelectedValue(value);
|
|
561
|
+
}
|
|
562
|
+
/**
|
|
563
|
+
* Move o foco para o campo interno.
|
|
564
|
+
*
|
|
565
|
+
* @deprecated Use o foco nativo do componente quando possível.
|
|
566
|
+
*/
|
|
567
|
+
async setFocus() {
|
|
568
|
+
await this.selectInputElement?.setFocus?.();
|
|
569
|
+
}
|
|
570
|
+
async checkValidity() {
|
|
571
|
+
return this.elementInternals?.checkValidity?.() ?? true;
|
|
572
|
+
}
|
|
573
|
+
async reportValidity() {
|
|
574
|
+
return this.elementInternals?.reportValidity?.() ?? true;
|
|
575
|
+
}
|
|
576
|
+
async setCustomValidity(message) {
|
|
577
|
+
this.customValidationMessage = message;
|
|
578
|
+
this.updateValidity();
|
|
579
|
+
}
|
|
580
|
+
async getValidationState() {
|
|
581
|
+
return getFormValidationState(this.elementInternals);
|
|
582
|
+
}
|
|
583
|
+
async validate() {
|
|
584
|
+
const validator = this.resolveValidator();
|
|
585
|
+
if (!validator || this.isDisabled())
|
|
586
|
+
return this.checkValidity();
|
|
587
|
+
const runId = ++this.validationRunId;
|
|
588
|
+
this.isValidating = true;
|
|
589
|
+
this.validatorMessage = null;
|
|
590
|
+
this.updateValidity();
|
|
591
|
+
this.brSelectValidationChange.emit({ validating: true, valid: null, message: null });
|
|
592
|
+
let message = null;
|
|
593
|
+
try {
|
|
594
|
+
const currentValue = this.effectiveMultiple
|
|
595
|
+
? [...(Array.isArray(this.value) ? this.value : [])]
|
|
596
|
+
: String(this.value ?? '');
|
|
597
|
+
message = (await validator(currentValue)) || null;
|
|
598
|
+
}
|
|
599
|
+
catch {
|
|
600
|
+
message = 'Não foi possível validar a seleção.';
|
|
601
|
+
}
|
|
602
|
+
if (runId !== this.validationRunId)
|
|
603
|
+
return false;
|
|
604
|
+
this.validatorMessage = message;
|
|
605
|
+
this.isValidating = false;
|
|
606
|
+
this.updateValidity();
|
|
607
|
+
const valid = message === null && (await this.checkValidity());
|
|
608
|
+
this.brSelectValidationChange.emit({ validating: false, valid, message });
|
|
609
|
+
return valid;
|
|
610
|
+
}
|
|
611
|
+
/**
|
|
612
|
+
* Substitui a coleção atual de opções por uma nova lista.
|
|
613
|
+
*
|
|
614
|
+
* @param options Opções que devem ser exibidas pela lista interna.
|
|
615
|
+
* Em `search-mode="remote"`, a seleção atual é preservada mesmo quando não
|
|
616
|
+
* aparece na resposta recebida.
|
|
617
|
+
* @returns Uma promise concluída após a sincronização das opções.
|
|
618
|
+
*/
|
|
619
|
+
async setOptions(options) {
|
|
620
|
+
this.hasImperativeOptions = true;
|
|
621
|
+
const nextOptions = this.searchMode === 'remote' ? this.applyRemoteSelection(options) : options;
|
|
622
|
+
this.suppressValueChange = true;
|
|
623
|
+
try {
|
|
624
|
+
if (this.selectListElement) {
|
|
625
|
+
await this.selectListElement.setOptions(nextOptions);
|
|
626
|
+
}
|
|
627
|
+
else {
|
|
628
|
+
this.pendingOptions = nextOptions;
|
|
629
|
+
}
|
|
630
|
+
this.syncDisplayValue(nextOptions);
|
|
631
|
+
}
|
|
632
|
+
finally {
|
|
633
|
+
this.suppressValueChange = false;
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
/**
|
|
637
|
+
* Adiciona ou atualiza uma única opção na coleção interna.
|
|
638
|
+
*
|
|
639
|
+
* @param option Opção que deve ser inserida ou atualizada.
|
|
640
|
+
* @returns Uma promise concluída após a sincronização da opção.
|
|
641
|
+
*/
|
|
642
|
+
async setOption(option) {
|
|
643
|
+
this.hasImperativeOptions = true;
|
|
644
|
+
if (this.selectListElement) {
|
|
645
|
+
await this.selectListElement.setOption(option);
|
|
646
|
+
}
|
|
647
|
+
else if (this.pendingOptions) {
|
|
648
|
+
const index = this.pendingOptions.findIndex((currentOption) => currentOption.value === option.value);
|
|
649
|
+
if (index !== -1)
|
|
650
|
+
this.pendingOptions[index] = option;
|
|
651
|
+
else
|
|
652
|
+
this.pendingOptions.push(option);
|
|
653
|
+
}
|
|
654
|
+
else {
|
|
655
|
+
this.pendingOptions = [option];
|
|
656
|
+
}
|
|
657
|
+
this.syncDisplayValue();
|
|
658
|
+
}
|
|
659
|
+
getHostOptions() {
|
|
660
|
+
return Array.from(this.el.childNodes)
|
|
661
|
+
.map((node) => this.nodeToOption(node))
|
|
662
|
+
.filter((option) => Boolean(option));
|
|
663
|
+
}
|
|
664
|
+
nodeToOption(node) {
|
|
665
|
+
if (node.nodeType === Node.ELEMENT_NODE)
|
|
666
|
+
return this.elementToOption(node);
|
|
667
|
+
if (node.nodeType === Node.TEXT_NODE)
|
|
668
|
+
return this.textNodeToOption(node);
|
|
669
|
+
return null;
|
|
670
|
+
}
|
|
671
|
+
elementToOption(el) {
|
|
672
|
+
if (el.tagName.toLowerCase() === 'br-select-option')
|
|
673
|
+
return this.optionElementToData(el);
|
|
674
|
+
const text = (el.textContent || '').trim();
|
|
675
|
+
return text ? { value: text, label: text } : null;
|
|
676
|
+
}
|
|
677
|
+
textNodeToOption(textNode) {
|
|
678
|
+
const text = (textNode.textContent || '').trim();
|
|
679
|
+
return text ? { value: text, label: text } : null;
|
|
680
|
+
}
|
|
681
|
+
optionElementToData(el) {
|
|
682
|
+
const rawValue = el.getAttribute('value') ?? el.value ?? '';
|
|
683
|
+
const rawLabel = el.getAttribute('label') ?? el.label ?? '';
|
|
684
|
+
let value = String(rawValue || '').trim();
|
|
685
|
+
let label = String(rawLabel || '').trim();
|
|
686
|
+
const selected = el.hasAttribute('selected') || Boolean(el.selected);
|
|
687
|
+
if (!value) {
|
|
688
|
+
const inner = this.extractInnerTextFromOption(el);
|
|
689
|
+
if (inner)
|
|
690
|
+
value = inner.trim();
|
|
691
|
+
}
|
|
692
|
+
if (!label)
|
|
693
|
+
label = value;
|
|
694
|
+
return { value: value || '', label: label || undefined, selected };
|
|
695
|
+
}
|
|
696
|
+
extractInnerTextFromOption(el) {
|
|
697
|
+
const fromSlot = this.getAssignedSlotText(el);
|
|
698
|
+
if (fromSlot)
|
|
699
|
+
return fromSlot;
|
|
700
|
+
const fallback = (el.textContent || '').trim();
|
|
701
|
+
return fallback || null;
|
|
702
|
+
}
|
|
703
|
+
getAssignedSlotText(el) {
|
|
704
|
+
try {
|
|
705
|
+
const innerSlot = el.shadowRoot?.querySelector('slot:not([name])');
|
|
706
|
+
if (!innerSlot?.assignedNodes)
|
|
707
|
+
return null;
|
|
708
|
+
const text = innerSlot
|
|
709
|
+
.assignedNodes({ flatten: true })
|
|
710
|
+
.map((node) => (node.textContent || '').trim())
|
|
711
|
+
.filter(Boolean)
|
|
712
|
+
.join(' ')
|
|
713
|
+
.trim();
|
|
714
|
+
return text || null;
|
|
715
|
+
}
|
|
716
|
+
catch (_e) {
|
|
717
|
+
return null;
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
getOptionLabel(option) {
|
|
721
|
+
return (option.label ?? option.value).trim();
|
|
722
|
+
}
|
|
723
|
+
getDisplayValue(options = this.getCurrentOptions()) {
|
|
724
|
+
const selectedOptions = options.filter((option) => {
|
|
725
|
+
if (!option.selected)
|
|
726
|
+
return false;
|
|
727
|
+
const optionLabel = this.getOptionLabel(option);
|
|
728
|
+
return !this.isSelectAllLabel(optionLabel);
|
|
729
|
+
});
|
|
730
|
+
if (selectedOptions.length === 0)
|
|
731
|
+
return '';
|
|
732
|
+
if (!this.effectiveMultiple) {
|
|
733
|
+
return this.getOptionLabel(selectedOptions[0]);
|
|
734
|
+
}
|
|
735
|
+
const [firstSelected, ...otherSelected] = selectedOptions;
|
|
736
|
+
const firstLabel = this.getOptionLabel(firstSelected);
|
|
737
|
+
if (otherSelected.length === 0)
|
|
738
|
+
return firstLabel;
|
|
739
|
+
return `${firstLabel} + (${otherSelected.length})`;
|
|
740
|
+
}
|
|
741
|
+
syncDisplayValue(options) {
|
|
742
|
+
const resolvedOptions = this.getFormOptions(options ?? this.getCurrentOptions());
|
|
743
|
+
this.displayValue = this.getDisplayValue(resolvedOptions);
|
|
744
|
+
this.syncValue(resolvedOptions);
|
|
745
|
+
}
|
|
746
|
+
syncValue(options) {
|
|
747
|
+
const nextValue = this.getSerializedValue(options);
|
|
748
|
+
this.syncFormState(options);
|
|
749
|
+
if (this.value === nextValue)
|
|
750
|
+
return;
|
|
751
|
+
this.isApplyingExternalValue = true;
|
|
752
|
+
this.value = nextValue;
|
|
753
|
+
this.isApplyingExternalValue = false;
|
|
754
|
+
if (!this.isValueChangeReady || this.suppressValueChange)
|
|
755
|
+
return;
|
|
756
|
+
this.valueChange.emit(Array.isArray(nextValue) ? nextValue.join(',') : nextValue);
|
|
757
|
+
}
|
|
758
|
+
getSerializedValue(options) {
|
|
759
|
+
const selectedValues = options
|
|
760
|
+
.filter((option) => {
|
|
761
|
+
if (!option.selected)
|
|
762
|
+
return false;
|
|
763
|
+
const optionLabel = this.getOptionLabel(option);
|
|
764
|
+
return !this.isSelectAllLabel(optionLabel);
|
|
765
|
+
})
|
|
766
|
+
.map((option) => option.value);
|
|
767
|
+
if (this.effectiveMultiple)
|
|
768
|
+
return selectedValues;
|
|
769
|
+
if (selectedValues.length === 0)
|
|
770
|
+
return '';
|
|
771
|
+
return selectedValues[0];
|
|
772
|
+
}
|
|
773
|
+
getOptionsProp() {
|
|
774
|
+
if (Array.isArray(this.options))
|
|
775
|
+
return this.options;
|
|
776
|
+
try {
|
|
777
|
+
const parsed = JSON.parse(this.options || '[]');
|
|
778
|
+
return Array.isArray(parsed) ? parsed : [];
|
|
779
|
+
}
|
|
780
|
+
catch {
|
|
781
|
+
return [];
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
applySelectedValue(value) {
|
|
785
|
+
const currentOptions = this.getCurrentOptions();
|
|
786
|
+
const options = currentOptions.map((option) => ({
|
|
787
|
+
...option,
|
|
788
|
+
selected: this.effectiveMultiple ? Array.isArray(value) && value.includes(option.value) : value === option.value,
|
|
789
|
+
}));
|
|
790
|
+
this.isApplyingExternalValue = true;
|
|
791
|
+
if (this.selectListElement)
|
|
792
|
+
void this.selectListElement.setOptions(options);
|
|
793
|
+
else
|
|
794
|
+
this.pendingOptions = options;
|
|
795
|
+
this.value = value;
|
|
796
|
+
this.isApplyingExternalValue = false;
|
|
797
|
+
this.remoteSelectedOptions.clear();
|
|
798
|
+
this.rememberRemoteSelections(options);
|
|
799
|
+
if (this.searchMode === 'remote') {
|
|
800
|
+
const selectedValues = new Set(Array.isArray(value) ? value : [value ?? '']);
|
|
801
|
+
selectedValues.forEach((selectedValue) => {
|
|
802
|
+
if (selectedValue && !currentOptions.some((option) => option.value === selectedValue)) {
|
|
803
|
+
this.remoteSelectedOptions.set(selectedValue, {
|
|
804
|
+
value: selectedValue,
|
|
805
|
+
label: selectedValue,
|
|
806
|
+
selected: true,
|
|
807
|
+
});
|
|
808
|
+
}
|
|
809
|
+
});
|
|
810
|
+
this.syncDisplayValue(this.getCurrentOptions());
|
|
811
|
+
return;
|
|
812
|
+
}
|
|
813
|
+
this.syncDisplayValue(options);
|
|
814
|
+
}
|
|
815
|
+
applyRemoteSelection(options) {
|
|
816
|
+
this.rememberRemoteSelections(this.getCurrentOptions());
|
|
817
|
+
const selectedValues = new Set(Array.isArray(this.value) ? this.value : [this.value ?? '']);
|
|
818
|
+
const nextOptions = options.map((option) => ({
|
|
819
|
+
...option,
|
|
820
|
+
selected: selectedValues.has(option.value) || Boolean(option.selected),
|
|
821
|
+
}));
|
|
822
|
+
this.rememberRemoteSelections(nextOptions);
|
|
823
|
+
return nextOptions;
|
|
824
|
+
}
|
|
825
|
+
rememberRemoteSelections(options) {
|
|
826
|
+
if (this.searchMode !== 'remote')
|
|
827
|
+
return;
|
|
828
|
+
const visibleValues = new Set(options.map((option) => option.value));
|
|
829
|
+
options.forEach((option) => {
|
|
830
|
+
if (option.selected)
|
|
831
|
+
this.remoteSelectedOptions.set(option.value, { ...option, selected: true });
|
|
832
|
+
else if (visibleValues.has(option.value))
|
|
833
|
+
this.remoteSelectedOptions.delete(option.value);
|
|
834
|
+
});
|
|
835
|
+
}
|
|
836
|
+
getFormOptions(options) {
|
|
837
|
+
if (this.searchMode !== 'remote')
|
|
838
|
+
return options;
|
|
839
|
+
const result = options.map((option) => ({ ...option }));
|
|
840
|
+
const existingValues = new Set(result.map((option) => option.value));
|
|
841
|
+
this.remoteSelectedOptions.forEach((option, value) => {
|
|
842
|
+
if (!existingValues.has(value))
|
|
843
|
+
result.push({ ...option, selected: true });
|
|
844
|
+
});
|
|
845
|
+
return result;
|
|
846
|
+
}
|
|
847
|
+
syncFormState(options = this.getCurrentOptions()) {
|
|
848
|
+
const selected = this.getFormOptions(options).filter((option) => option.selected && !this.isSelectAllLabel(this.getOptionLabel(option)));
|
|
849
|
+
const selectedValues = selected.map((option) => option.value);
|
|
850
|
+
const formValue = this.effectiveMultiple ? JSON.stringify(selectedValues) : (selectedValues[0] ?? null);
|
|
851
|
+
safeSetFormValue(this.elementInternals, formValue);
|
|
852
|
+
if (this.nativeSelect) {
|
|
853
|
+
this.nativeSelect.value = selectedValues[0] ?? '';
|
|
854
|
+
const selectedSet = new Set(selectedValues);
|
|
855
|
+
const optionNodes = Array.from(this.nativeSelect.options);
|
|
856
|
+
selectedSet.forEach((value) => {
|
|
857
|
+
if (optionNodes.some((option) => option.value === value))
|
|
858
|
+
return;
|
|
859
|
+
const option = document.createElement('option');
|
|
860
|
+
option.value = value;
|
|
861
|
+
this.nativeSelect?.append(option);
|
|
862
|
+
});
|
|
863
|
+
optionNodes.forEach((option) => {
|
|
864
|
+
if (option.value !== '' && !selectedSet.has(option.value))
|
|
865
|
+
option.remove();
|
|
866
|
+
else
|
|
867
|
+
option.selected = selectedSet.has(option.value);
|
|
868
|
+
});
|
|
869
|
+
this.nativeSelect.value = selectedValues[0] ?? '';
|
|
870
|
+
}
|
|
871
|
+
this.updateValidity();
|
|
872
|
+
}
|
|
873
|
+
updateValidity() {
|
|
874
|
+
if (!this.nativeSelect)
|
|
875
|
+
return;
|
|
876
|
+
const selectedCount = this.getFormOptions(this.getCurrentOptions()).filter((option) => option.selected).length;
|
|
877
|
+
const selectionMessage = this.effectiveMultiple && this.minSelections > 0 && selectedCount < this.minSelections
|
|
878
|
+
? `Selecione pelo menos ${this.minSelections} opções.`
|
|
879
|
+
: this.effectiveMultiple && this.maxSelections > 0 && selectedCount > this.maxSelections
|
|
880
|
+
? `Selecione no máximo ${this.maxSelections} opções.`
|
|
881
|
+
: '';
|
|
882
|
+
this.nativeSelect.setCustomValidity(this.customValidationMessage || this.validatorMessage || selectionMessage);
|
|
883
|
+
syncNativeFormValidity(this.elementInternals, this.nativeSelect);
|
|
884
|
+
}
|
|
885
|
+
resolveValidator() {
|
|
886
|
+
return resolveFormValidator(this.validator);
|
|
887
|
+
}
|
|
888
|
+
getRenderedDisplayValue() {
|
|
889
|
+
return this.displayValue ?? this.getDisplayValue();
|
|
890
|
+
}
|
|
891
|
+
/**
|
|
892
|
+
* Retorna o id da opção atualmente ativa para consumo do `aria-activedescendant`.
|
|
893
|
+
*
|
|
894
|
+
* @returns O id da opção ativa ou `undefined` quando a lista está fechada.
|
|
895
|
+
*/
|
|
896
|
+
getActiveDescendant() {
|
|
897
|
+
if (!this.effectiveOpen || this.activeOptionIndex < 0)
|
|
898
|
+
return undefined;
|
|
899
|
+
return `${this.listboxId}-option-${this.activeOptionIndex}`;
|
|
900
|
+
}
|
|
901
|
+
toggleOpenFromPointer() {
|
|
902
|
+
if (!this.effectiveOpen) {
|
|
903
|
+
this.shouldRestoreSelectedOptionOnOpen = true;
|
|
904
|
+
}
|
|
905
|
+
void this.toggleOpen();
|
|
906
|
+
}
|
|
907
|
+
async openListAndRestorePointerFocus() {
|
|
908
|
+
await this.selectListElement?.open();
|
|
909
|
+
if (!this.shouldRestoreSelectedOptionOnOpen)
|
|
910
|
+
return;
|
|
911
|
+
this.shouldRestoreSelectedOptionOnOpen = false;
|
|
912
|
+
await this.scrollFirstSelectedOptionToTop();
|
|
913
|
+
}
|
|
914
|
+
async scrollFirstSelectedOptionToTop() {
|
|
915
|
+
const options = this.getNavigableOptions();
|
|
916
|
+
const firstSelectedIndex = options.findIndex((option) => !this.isSelectAllLabel(this.getOptionLabel(option)) && Boolean(option.selected));
|
|
917
|
+
if (firstSelectedIndex < 0)
|
|
918
|
+
return;
|
|
919
|
+
const didScroll = await this.getSelectListController()?.scrollFirstSelectedOptionToTop?.();
|
|
920
|
+
if (didScroll) {
|
|
921
|
+
this.activeOptionIndex = firstSelectedIndex;
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
async openAndFocusBoundary(fromInput, direction) {
|
|
925
|
+
if (!this.effectiveOpen) {
|
|
926
|
+
await this.show();
|
|
927
|
+
await this.focusInitialOption(direction);
|
|
928
|
+
return;
|
|
929
|
+
}
|
|
930
|
+
if (fromInput && this.activeOptionIndex < 0) {
|
|
931
|
+
await this.focusInitialOption(direction);
|
|
932
|
+
return;
|
|
933
|
+
}
|
|
934
|
+
await this.moveActiveOption(direction);
|
|
935
|
+
}
|
|
936
|
+
/**
|
|
937
|
+
* Define qual opção deve receber foco ao abrir o select pelo teclado.
|
|
938
|
+
*
|
|
939
|
+
* @param direction Direção inicial da navegação. `1` abre do topo para baixo e `-1` do fim para cima.
|
|
940
|
+
*/
|
|
941
|
+
async focusInitialOption(direction) {
|
|
942
|
+
const options = this.getNavigableOptions();
|
|
943
|
+
if (options.length === 0)
|
|
944
|
+
return;
|
|
945
|
+
const selectedIndex = options.findIndex((option) => Boolean(option.selected));
|
|
946
|
+
const fallbackIndex = direction > 0 ? 0 : options.length - 1;
|
|
947
|
+
const initialIndex = selectedIndex >= 0 ? selectedIndex : fallbackIndex;
|
|
948
|
+
await this.focusOptionByIndex(initialIndex);
|
|
949
|
+
}
|
|
950
|
+
async moveActiveOption(step) {
|
|
951
|
+
const options = this.getNavigableOptions();
|
|
952
|
+
if (options.length === 0)
|
|
953
|
+
return;
|
|
954
|
+
const baseIndex = this.getCurrentActiveIndex();
|
|
955
|
+
const nextIndex = Math.min(options.length - 1, Math.max(0, baseIndex + step));
|
|
956
|
+
await this.focusOptionByIndex(nextIndex);
|
|
957
|
+
}
|
|
958
|
+
/**
|
|
959
|
+
* Resolve o índice ativo atual a partir do estado local ou da opção já selecionada.
|
|
960
|
+
*
|
|
961
|
+
* @returns O índice que deve servir como base para a próxima navegação por teclado.
|
|
962
|
+
*/
|
|
963
|
+
getCurrentActiveIndex() {
|
|
964
|
+
if (this.activeOptionIndex >= 0)
|
|
965
|
+
return this.activeOptionIndex;
|
|
966
|
+
const options = this.getNavigableOptions();
|
|
967
|
+
const selectedIndex = options.findIndex((option) => Boolean(option.selected));
|
|
968
|
+
return selectedIndex >= 0 ? selectedIndex : 0;
|
|
969
|
+
}
|
|
970
|
+
/**
|
|
971
|
+
* Encaminha o foco lógico para uma opção específica da lista interna.
|
|
972
|
+
*
|
|
973
|
+
* @param index Índice da opção que deve receber foco.
|
|
974
|
+
*/
|
|
975
|
+
async focusOptionByIndex(index) {
|
|
976
|
+
const didFocus = await this.getSelectListController()?.focusOption?.(index);
|
|
977
|
+
if (didFocus) {
|
|
978
|
+
this.activeOptionIndex = index;
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
/**
|
|
982
|
+
* Seleciona a opção atualmente ativa sem duplicar a lógica de seleção da lista.
|
|
983
|
+
*
|
|
984
|
+
* @remarks
|
|
985
|
+
* Em modo simples, a opção ativa é sempre marcada. Em modo múltiplo, a seleção é alternada.
|
|
986
|
+
*/
|
|
987
|
+
async selectFocusedOption() {
|
|
988
|
+
const options = this.getNavigableOptions();
|
|
989
|
+
if (options.length === 0)
|
|
990
|
+
return;
|
|
991
|
+
const index = this.getCurrentActiveIndex();
|
|
992
|
+
const option = options[index];
|
|
993
|
+
const nextSelected = this.effectiveMultiple ? !option?.selected : true;
|
|
994
|
+
const didSelect = await this.getSelectListController()?.setOptionSelected?.(index, nextSelected);
|
|
995
|
+
if (didSelect) {
|
|
996
|
+
this.activeOptionIndex = index;
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
syncActiveOptionIndex(detail) {
|
|
1000
|
+
const options = this.getNavigableOptions();
|
|
1001
|
+
const optionIndex = options.findIndex((option) => option.value === detail.value);
|
|
1002
|
+
if (optionIndex >= 0) {
|
|
1003
|
+
this.activeOptionIndex = optionIndex;
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
/**
|
|
1007
|
+
* Reflete no slot a seleção que foi consolidada pela lista interna.
|
|
1008
|
+
*
|
|
1009
|
+
* @param detail Estado emitido pela opção que disparou a mudança.
|
|
1010
|
+
* @remarks
|
|
1011
|
+
* Essa sincronização mantém as props/atributos das opções declaradas pelo consumidor em
|
|
1012
|
+
* conformidade com o estado calculado internamente, inclusive no caso do "selecionar todos".
|
|
1013
|
+
*/
|
|
1014
|
+
syncSlottedOptionSelection(detail) {
|
|
1015
|
+
if (!this.slotElement || !detail?.value)
|
|
1016
|
+
return;
|
|
1017
|
+
const slottedOptions = this.slotElement
|
|
1018
|
+
.assignedElements({ flatten: true })
|
|
1019
|
+
.filter((el) => el.tagName.toLowerCase() === 'br-select-option');
|
|
1020
|
+
if (slottedOptions.length === 0)
|
|
1021
|
+
return;
|
|
1022
|
+
const detailLabel = (detail.label ?? detail.value).trim();
|
|
1023
|
+
const isSelectAll = this.isSelectAllLabel(detailLabel);
|
|
1024
|
+
if (this.effectiveMultiple && isSelectAll) {
|
|
1025
|
+
slottedOptions.forEach((option) => {
|
|
1026
|
+
const optionLabel = (option.label ?? option.value).trim();
|
|
1027
|
+
const isSelectAllOption = this.isSelectAllLabel(optionLabel);
|
|
1028
|
+
if (isSelectAllOption) {
|
|
1029
|
+
option.indeterminate = false;
|
|
1030
|
+
option.selected = Boolean(detail.selected);
|
|
1031
|
+
this.normalizeSelectAllState(option);
|
|
1032
|
+
if (option.selected)
|
|
1033
|
+
option.setAttribute('selected', '');
|
|
1034
|
+
else
|
|
1035
|
+
option.removeAttribute('selected');
|
|
1036
|
+
return;
|
|
1037
|
+
}
|
|
1038
|
+
option.selected = Boolean(detail.selected);
|
|
1039
|
+
if (option.selected)
|
|
1040
|
+
option.setAttribute('selected', '');
|
|
1041
|
+
else
|
|
1042
|
+
option.removeAttribute('selected');
|
|
1043
|
+
});
|
|
1044
|
+
return;
|
|
1045
|
+
}
|
|
1046
|
+
slottedOptions.forEach((option) => {
|
|
1047
|
+
const isTarget = option.value === detail.value;
|
|
1048
|
+
const nextSelected = this.effectiveMultiple ? (isTarget ? Boolean(detail.selected) : option.selected) : isTarget;
|
|
1049
|
+
if (isTarget) {
|
|
1050
|
+
option.indeterminate = false;
|
|
1051
|
+
}
|
|
1052
|
+
option.selected = nextSelected;
|
|
1053
|
+
if (nextSelected) {
|
|
1054
|
+
option.setAttribute('selected', '');
|
|
1055
|
+
}
|
|
1056
|
+
else {
|
|
1057
|
+
option.removeAttribute('selected');
|
|
1058
|
+
}
|
|
1059
|
+
if (!this.effectiveMultiple && !isTarget) {
|
|
1060
|
+
option.selected = false;
|
|
1061
|
+
option.removeAttribute('selected');
|
|
1062
|
+
}
|
|
1063
|
+
});
|
|
1064
|
+
if (!this.effectiveMultiple)
|
|
1065
|
+
return;
|
|
1066
|
+
const selectableOptions = slottedOptions.filter((option) => {
|
|
1067
|
+
const optionLabel = (option.label ?? option.value).trim();
|
|
1068
|
+
return !this.isSelectAllLabel(optionLabel);
|
|
1069
|
+
});
|
|
1070
|
+
const allSelected = selectableOptions.length > 0 && selectableOptions.every((option) => Boolean(option.selected));
|
|
1071
|
+
const anySelected = selectableOptions.some((option) => Boolean(option.selected));
|
|
1072
|
+
slottedOptions.forEach((option) => {
|
|
1073
|
+
const optionLabel = (option.label ?? option.value).trim();
|
|
1074
|
+
if (!this.isSelectAllLabel(optionLabel))
|
|
1075
|
+
return;
|
|
1076
|
+
option.indeterminate = anySelected && !allSelected;
|
|
1077
|
+
option.selected = allSelected;
|
|
1078
|
+
this.normalizeSelectAllState(option);
|
|
1079
|
+
if (option.selected)
|
|
1080
|
+
option.setAttribute('selected', '');
|
|
1081
|
+
else
|
|
1082
|
+
option.removeAttribute('selected');
|
|
1083
|
+
});
|
|
1084
|
+
}
|
|
1085
|
+
isSelectAllLabel(label) {
|
|
1086
|
+
return label === this.selectAllLabel || label === this.unselectAllLabel;
|
|
1087
|
+
}
|
|
1088
|
+
getSelectAllLabel(selected, indeterminate) {
|
|
1089
|
+
return selected && !indeterminate ? this.unselectAllLabel : this.selectAllLabel;
|
|
1090
|
+
}
|
|
1091
|
+
normalizeSelectAllState(option) {
|
|
1092
|
+
const selected = Boolean(option.selected) && !option.indeterminate;
|
|
1093
|
+
const indeterminate = Boolean(option.indeterminate);
|
|
1094
|
+
option.selected = selected;
|
|
1095
|
+
option.indeterminate = indeterminate;
|
|
1096
|
+
option.label = this.getSelectAllLabel(selected, indeterminate);
|
|
1097
|
+
}
|
|
1098
|
+
handleOutsideClick(ev) {
|
|
1099
|
+
if (!this.effectiveOpen)
|
|
1100
|
+
return;
|
|
1101
|
+
const clickPath = this.getEventPath(ev);
|
|
1102
|
+
const isClickInsideSelect = clickPath.includes(this.el);
|
|
1103
|
+
if (isClickInsideSelect)
|
|
1104
|
+
return;
|
|
1105
|
+
this.close();
|
|
1106
|
+
}
|
|
1107
|
+
emitStateChange(option) {
|
|
1108
|
+
const payload = this.getStateChangeDetail(option);
|
|
1109
|
+
const nextStateKey = JSON.stringify(payload);
|
|
1110
|
+
if (!this.isStateChangeReady) {
|
|
1111
|
+
this.lastEmittedStateKey = nextStateKey;
|
|
1112
|
+
return;
|
|
1113
|
+
}
|
|
1114
|
+
if (this.lastEmittedStateKey === nextStateKey)
|
|
1115
|
+
return;
|
|
1116
|
+
this.lastEmittedStateKey = nextStateKey;
|
|
1117
|
+
this.brSelectStateChange.emit(payload);
|
|
1118
|
+
}
|
|
1119
|
+
getStateChangeDetail(optionChange) {
|
|
1120
|
+
const payload = {
|
|
1121
|
+
isOpen: this.effectiveOpen,
|
|
1122
|
+
};
|
|
1123
|
+
const currentOptions = this.getFormOptions(this.getCurrentOptions());
|
|
1124
|
+
if (this.effectiveMultiple) {
|
|
1125
|
+
payload.options = currentOptions
|
|
1126
|
+
.filter((option) => !this.isSelectAllLabel((option.label ?? option.value).trim()))
|
|
1127
|
+
.map((option) => this.normalizeOptionForOutput(option));
|
|
1128
|
+
return payload;
|
|
1129
|
+
}
|
|
1130
|
+
const selectedOption = currentOptions.find((option) => Boolean(option.selected));
|
|
1131
|
+
if (selectedOption) {
|
|
1132
|
+
payload.option = this.normalizeOptionForOutput(selectedOption);
|
|
1133
|
+
return payload;
|
|
1134
|
+
}
|
|
1135
|
+
if (optionChange?.value) {
|
|
1136
|
+
const { disabled: _disabled, ...normalizedOption } = optionChange;
|
|
1137
|
+
payload.option = {
|
|
1138
|
+
...normalizedOption,
|
|
1139
|
+
label: optionChange.label ?? optionChange.value,
|
|
1140
|
+
};
|
|
1141
|
+
}
|
|
1142
|
+
return payload;
|
|
1143
|
+
}
|
|
1144
|
+
normalizeOptionForOutput(option) {
|
|
1145
|
+
const optionLabel = (option.label ?? option.value).trim();
|
|
1146
|
+
const isSelectAll = this.isSelectAllLabel(optionLabel);
|
|
1147
|
+
const { disabled: _disabled, ...optionWithoutDisabled } = option;
|
|
1148
|
+
if (isSelectAll) {
|
|
1149
|
+
return optionWithoutDisabled;
|
|
1150
|
+
}
|
|
1151
|
+
const { indeterminate, ...normalized } = optionWithoutDisabled;
|
|
1152
|
+
return normalized;
|
|
1153
|
+
}
|
|
1154
|
+
getStateChangeKey() {
|
|
1155
|
+
return JSON.stringify(this.getStateChangeDetail());
|
|
1156
|
+
}
|
|
1157
|
+
/**
|
|
1158
|
+
* Obtém o snapshot atual das opções respeitando a fonte mais atual disponível.
|
|
1159
|
+
*
|
|
1160
|
+
* @returns A coleção de opções normalizadas para leitura do estado público.
|
|
1161
|
+
* @remarks
|
|
1162
|
+
* A precedência é: lista interna, opções pendentes, conteúdo do slot e, por último,
|
|
1163
|
+
* os filhos atuais do host.
|
|
1164
|
+
*/
|
|
1165
|
+
getCurrentOptions() {
|
|
1166
|
+
// As opções projetadas são a fonte canônica quando não há coleção
|
|
1167
|
+
// imperativa: a lista virtualizada pode manter um snapshot enquanto o
|
|
1168
|
+
// consumidor altera `selected` diretamente no slot.
|
|
1169
|
+
if (!this.hasImperativeOptions && this.slotElement) {
|
|
1170
|
+
const nodes = this.slotElement.assignedNodes({ flatten: true }) ?? [];
|
|
1171
|
+
const slotOptions = nodes
|
|
1172
|
+
.map((node) => this.nodeToOption(node))
|
|
1173
|
+
.filter((option) => Boolean(option));
|
|
1174
|
+
if (slotOptions.length > 0)
|
|
1175
|
+
return slotOptions;
|
|
1176
|
+
}
|
|
1177
|
+
const listOptions = this.getSelectListController()?.options;
|
|
1178
|
+
if (Array.isArray(listOptions) && listOptions.length > 0) {
|
|
1179
|
+
const normalizedListOptions = listOptions.map((option) => ({ ...option }));
|
|
1180
|
+
const hasRealOptions = normalizedListOptions.some((option) => !this.isSelectAllLabel(this.getOptionLabel(option)));
|
|
1181
|
+
if (hasRealOptions) {
|
|
1182
|
+
return normalizedListOptions;
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1185
|
+
if (this.pendingOptions) {
|
|
1186
|
+
return this.pendingOptions.map((option) => ({ ...option }));
|
|
1187
|
+
}
|
|
1188
|
+
return this.getHostOptions();
|
|
1189
|
+
}
|
|
1190
|
+
normalizeSearchText(value) {
|
|
1191
|
+
return value
|
|
1192
|
+
.normalize('NFD')
|
|
1193
|
+
.replace(/[\u0300-\u036f]/g, '')
|
|
1194
|
+
.toLocaleLowerCase('pt-BR')
|
|
1195
|
+
.trim();
|
|
1196
|
+
}
|
|
1197
|
+
getNavigableOptions() {
|
|
1198
|
+
const options = this.getCurrentOptions();
|
|
1199
|
+
const normalizedTerm = this.normalizeSearchText(this.searchTerm);
|
|
1200
|
+
if (!this.filterable || this.searchMode === 'remote' || !normalizedTerm)
|
|
1201
|
+
return options;
|
|
1202
|
+
return options.filter((option) => {
|
|
1203
|
+
if (this.isSelectAllLabel(this.getOptionLabel(option)))
|
|
1204
|
+
return this.effectiveMultiple;
|
|
1205
|
+
const label = this.normalizeSearchText(this.getOptionLabel(option));
|
|
1206
|
+
const value = this.normalizeSearchText(option.value);
|
|
1207
|
+
return label.includes(normalizedTerm) || value.includes(normalizedTerm);
|
|
1208
|
+
});
|
|
1209
|
+
}
|
|
1210
|
+
clearSearch() {
|
|
1211
|
+
if (!this.searchTerm)
|
|
1212
|
+
return;
|
|
1213
|
+
this.searchTerm = '';
|
|
1214
|
+
this.activeOptionIndex = -1;
|
|
1215
|
+
void this.getSelectListController()?.setSearchTerm?.('');
|
|
1216
|
+
}
|
|
1217
|
+
getEventPath(ev) {
|
|
1218
|
+
return ev.composedPath ? ev.composedPath() : (ev.path ?? []);
|
|
1219
|
+
}
|
|
1220
|
+
getSelectListController() {
|
|
1221
|
+
return this.selectListElement;
|
|
1222
|
+
}
|
|
1223
|
+
getCssClassMap() {
|
|
1224
|
+
return {
|
|
1225
|
+
'br-select': true,
|
|
1226
|
+
};
|
|
1227
|
+
}
|
|
1228
|
+
getAccessibleLabel() {
|
|
1229
|
+
return this.label?.trim() || this.placeholder?.trim() || 'Selecao';
|
|
1230
|
+
}
|
|
1231
|
+
setSelectionMode(isMultiple) {
|
|
1232
|
+
this.selectListElement?.setMultiple(isMultiple);
|
|
1233
|
+
}
|
|
1234
|
+
renderSelectInput() {
|
|
1235
|
+
return (h("br-select-input", { part: "input", exportparts: "container:input-container, input:input-field, label:input-label, group:input-group, icon:input-icon, action:input-action, action-button:input-action-button", ref: (el) => (this.selectInputElement = el), "aria-activedescendant": this.getActiveDescendant(), "aria-controls": this.listboxId, "aria-disabled": String(this.isDisabled()), "aria-expanded": String(this.effectiveOpen), "aria-haspopup": "listbox", "aria-label": this.getAccessibleLabel(), "aria-required": String(this.required), borderless: this.borderless, "is-inline": this.effectiveInline, "is-open": this.effectiveOpen, label: this.label, name: this.name, placeholder: this.placeholder, required: this.required, disabled: this.isDisabled(), filterable: this.filterable, showSearchIcon: this.showSearchIcon, autocomplete: this.autocomplete, "input-width": this.inputWidth, role: "combobox", value: this.filterable && this.effectiveOpen ? this.searchTerm : this.getRenderedDisplayValue() }));
|
|
1236
|
+
}
|
|
1237
|
+
renderSelectList() {
|
|
1238
|
+
return (h("br-select-list", { part: "list", exportparts: "list, option, checkbox, select-all, empty-option, option-checkbox, option-radio", "active-option-index": this.activeOptionIndex, "aria-label": this.getAccessibleLabel(), "aria-multiselectable": this.effectiveMultiple ? 'true' : 'false', id: this.listboxId, "visible-items": this.visibleItems, "item-height": this.itemHeight, overscan: this.overscan, "search-term": this.filterable && this.searchMode === 'local' ? this.searchTerm : '', role: "listbox", "select-all-label": this.selectAllLabel, "unselect-all-label": this.unselectAllLabel, ref: (el) => {
|
|
1239
|
+
this.selectListElement = el;
|
|
1240
|
+
this.selectListElement.loading = this.loading;
|
|
1241
|
+
this.setSelectionMode(this.effectiveMultiple);
|
|
1242
|
+
void this.getSelectListController()?.setSearchTerm?.(this.filterable ? this.searchTerm : '');
|
|
1243
|
+
} }, h("slot", null), h("slot", { name: "loading", slot: "loading" })));
|
|
1244
|
+
}
|
|
1245
|
+
renderHiddenSelect() {
|
|
1246
|
+
const selectedOptions = this.getFormOptions(this.getCurrentOptions())
|
|
1247
|
+
.filter((option) => !this.isSelectAllLabel(this.getOptionLabel(option)))
|
|
1248
|
+
.filter((option) => option.selected);
|
|
1249
|
+
return (h("select", { ref: (el) => (this.nativeSelect = el), part: "hidden-select", name: this.name, autocomplete: this.autocomplete, multiple: this.effectiveMultiple, required: this.required, disabled: this.isDisabled(), tabIndex: -1, "aria-hidden": "true", style: {
|
|
1250
|
+
position: 'absolute',
|
|
1251
|
+
width: '1px',
|
|
1252
|
+
height: '1px',
|
|
1253
|
+
padding: '0',
|
|
1254
|
+
margin: '-1px',
|
|
1255
|
+
overflow: 'hidden',
|
|
1256
|
+
clip: 'rect(0, 0, 0, 0)',
|
|
1257
|
+
whiteSpace: 'nowrap',
|
|
1258
|
+
border: '0',
|
|
1259
|
+
}, onChange: (event) => event.preventDefault() }, h("option", { value: "", selected: selectedOptions.length === 0 }), selectedOptions.map((option) => (h("option", { key: option.value, value: option.value, selected: option.selected, disabled: option.disabled })))));
|
|
1260
|
+
}
|
|
1261
|
+
render() {
|
|
1262
|
+
return (h(Host, { key: 'acca9307d38da5b977fa8eac160bdd2b74eb573c', "aria-busy": this.isValidating || this.loading ? 'true' : null }, h("div", { key: 'b6a55059b9948c89c40415297315af9fa40939de', class: this.getCssClassMap(), part: "container" }, this.renderSelectInput(), this.renderSelectList(), h("div", { key: '789c2752631fed675dfe4f24e703a04a6012681f', part: "feedback", hidden: !this.hasFeedbackSlot && !this.validatorMessage }, h("slot", { key: '13f7245f98ee7c5529881b12d400180316e439f0', name: "feedback", onSlotchange: (event) => (this.hasFeedbackSlot = hasAssignedSlotContent(event.currentTarget)) }, this.validatorMessage)), h("div", { key: '3e2076875f4a9d7fd717151b918011b6ea89455e', part: "validation-loading", hidden: !this.hasValidationLoadingSlot || !this.isValidating }, h("slot", { key: 'cb51e859372eb703c4eed65e157bbefe7ab9e844', name: "validation-loading" })), this.renderHiddenSelect())));
|
|
1263
|
+
}
|
|
1264
|
+
static get is() { return "br-select"; }
|
|
1265
|
+
static get encapsulation() { return "shadow"; }
|
|
1266
|
+
static get formAssociated() { return true; }
|
|
1267
|
+
static get originalStyleUrls() {
|
|
1268
|
+
return {
|
|
1269
|
+
"$": ["select.scss"]
|
|
1270
|
+
};
|
|
1271
|
+
}
|
|
1272
|
+
static get styleUrls() {
|
|
1273
|
+
return {
|
|
1274
|
+
"$": ["select.css"]
|
|
1275
|
+
};
|
|
1276
|
+
}
|
|
1277
|
+
static get properties() {
|
|
1278
|
+
return {
|
|
1279
|
+
"borderless": {
|
|
1280
|
+
"type": "boolean",
|
|
1281
|
+
"mutable": false,
|
|
1282
|
+
"complexType": {
|
|
1283
|
+
"original": "boolean",
|
|
1284
|
+
"resolved": "boolean",
|
|
1285
|
+
"references": {}
|
|
1286
|
+
},
|
|
1287
|
+
"required": false,
|
|
1288
|
+
"optional": false,
|
|
1289
|
+
"docs": {
|
|
1290
|
+
"tags": [{
|
|
1291
|
+
"name": "default",
|
|
1292
|
+
"text": "false"
|
|
1293
|
+
}],
|
|
1294
|
+
"text": "Remove a borda do input quando o componente n\u00E3o est\u00E1 em foco."
|
|
1295
|
+
},
|
|
1296
|
+
"getter": false,
|
|
1297
|
+
"setter": false,
|
|
1298
|
+
"reflect": true,
|
|
1299
|
+
"attribute": "borderless",
|
|
1300
|
+
"defaultValue": "false"
|
|
1301
|
+
},
|
|
1302
|
+
"disabled": {
|
|
1303
|
+
"type": "boolean",
|
|
1304
|
+
"mutable": false,
|
|
1305
|
+
"complexType": {
|
|
1306
|
+
"original": "boolean",
|
|
1307
|
+
"resolved": "boolean",
|
|
1308
|
+
"references": {}
|
|
1309
|
+
},
|
|
1310
|
+
"required": false,
|
|
1311
|
+
"optional": false,
|
|
1312
|
+
"docs": {
|
|
1313
|
+
"tags": [{
|
|
1314
|
+
"name": "default",
|
|
1315
|
+
"text": "false"
|
|
1316
|
+
}],
|
|
1317
|
+
"text": "Desativa toda a intera\u00E7\u00E3o do select."
|
|
1318
|
+
},
|
|
1319
|
+
"getter": false,
|
|
1320
|
+
"setter": false,
|
|
1321
|
+
"reflect": true,
|
|
1322
|
+
"attribute": "disabled",
|
|
1323
|
+
"defaultValue": "false"
|
|
1324
|
+
},
|
|
1325
|
+
"isInline": {
|
|
1326
|
+
"type": "boolean",
|
|
1327
|
+
"mutable": false,
|
|
1328
|
+
"complexType": {
|
|
1329
|
+
"original": "boolean",
|
|
1330
|
+
"resolved": "boolean",
|
|
1331
|
+
"references": {}
|
|
1332
|
+
},
|
|
1333
|
+
"required": false,
|
|
1334
|
+
"optional": false,
|
|
1335
|
+
"docs": {
|
|
1336
|
+
"tags": [{
|
|
1337
|
+
"name": "default",
|
|
1338
|
+
"text": "false"
|
|
1339
|
+
}, {
|
|
1340
|
+
"name": "deprecated",
|
|
1341
|
+
"text": "Use `inline`."
|
|
1342
|
+
}],
|
|
1343
|
+
"text": "Exibe label e campo na mesma linha."
|
|
1344
|
+
},
|
|
1345
|
+
"getter": false,
|
|
1346
|
+
"setter": false,
|
|
1347
|
+
"reflect": true,
|
|
1348
|
+
"attribute": "is-inline",
|
|
1349
|
+
"defaultValue": "false"
|
|
1350
|
+
},
|
|
1351
|
+
"inline": {
|
|
1352
|
+
"type": "boolean",
|
|
1353
|
+
"mutable": false,
|
|
1354
|
+
"complexType": {
|
|
1355
|
+
"original": "boolean",
|
|
1356
|
+
"resolved": "boolean",
|
|
1357
|
+
"references": {}
|
|
1358
|
+
},
|
|
1359
|
+
"required": false,
|
|
1360
|
+
"optional": true,
|
|
1361
|
+
"docs": {
|
|
1362
|
+
"tags": [],
|
|
1363
|
+
"text": "Exibe r\u00F3tulo e controle em linha. Quando informada, tem preced\u00EAncia sobre `isInline`."
|
|
1364
|
+
},
|
|
1365
|
+
"getter": false,
|
|
1366
|
+
"setter": false,
|
|
1367
|
+
"reflect": true,
|
|
1368
|
+
"attribute": "inline"
|
|
1369
|
+
},
|
|
1370
|
+
"isMultiple": {
|
|
1371
|
+
"type": "boolean",
|
|
1372
|
+
"mutable": false,
|
|
1373
|
+
"complexType": {
|
|
1374
|
+
"original": "boolean",
|
|
1375
|
+
"resolved": "boolean",
|
|
1376
|
+
"references": {}
|
|
1377
|
+
},
|
|
1378
|
+
"required": false,
|
|
1379
|
+
"optional": false,
|
|
1380
|
+
"docs": {
|
|
1381
|
+
"tags": [{
|
|
1382
|
+
"name": "default",
|
|
1383
|
+
"text": "false"
|
|
1384
|
+
}, {
|
|
1385
|
+
"name": "deprecated",
|
|
1386
|
+
"text": "Use `multiple`."
|
|
1387
|
+
}],
|
|
1388
|
+
"text": "Habilita o modo de sele\u00E7\u00E3o m\u00FAltipla."
|
|
1389
|
+
},
|
|
1390
|
+
"getter": false,
|
|
1391
|
+
"setter": false,
|
|
1392
|
+
"reflect": true,
|
|
1393
|
+
"attribute": "is-multiple",
|
|
1394
|
+
"defaultValue": "false"
|
|
1395
|
+
},
|
|
1396
|
+
"multiple": {
|
|
1397
|
+
"type": "boolean",
|
|
1398
|
+
"mutable": false,
|
|
1399
|
+
"complexType": {
|
|
1400
|
+
"original": "boolean",
|
|
1401
|
+
"resolved": "boolean",
|
|
1402
|
+
"references": {}
|
|
1403
|
+
},
|
|
1404
|
+
"required": false,
|
|
1405
|
+
"optional": true,
|
|
1406
|
+
"docs": {
|
|
1407
|
+
"tags": [],
|
|
1408
|
+
"text": "Habilita sele\u00E7\u00E3o m\u00FAltipla. Quando informada, tem preced\u00EAncia sobre `isMultiple`."
|
|
1409
|
+
},
|
|
1410
|
+
"getter": false,
|
|
1411
|
+
"setter": false,
|
|
1412
|
+
"reflect": true,
|
|
1413
|
+
"attribute": "multiple"
|
|
1414
|
+
},
|
|
1415
|
+
"keepOpenOnSelect": {
|
|
1416
|
+
"type": "boolean",
|
|
1417
|
+
"mutable": false,
|
|
1418
|
+
"complexType": {
|
|
1419
|
+
"original": "boolean",
|
|
1420
|
+
"resolved": "boolean",
|
|
1421
|
+
"references": {}
|
|
1422
|
+
},
|
|
1423
|
+
"required": false,
|
|
1424
|
+
"optional": false,
|
|
1425
|
+
"docs": {
|
|
1426
|
+
"tags": [{
|
|
1427
|
+
"name": "default",
|
|
1428
|
+
"text": "false"
|
|
1429
|
+
}, {
|
|
1430
|
+
"name": "deprecated",
|
|
1431
|
+
"text": "O comportamento atual usa o fechamento padr\u00E3o do select; mantenha esta prop\napenas para compatibilidade com integra\u00E7\u00F5es legadas."
|
|
1432
|
+
}],
|
|
1433
|
+
"text": "Mant\u00E9m a lista aberta depois de uma sele\u00E7\u00E3o."
|
|
1434
|
+
},
|
|
1435
|
+
"getter": false,
|
|
1436
|
+
"setter": false,
|
|
1437
|
+
"reflect": true,
|
|
1438
|
+
"attribute": "keep-open-on-select",
|
|
1439
|
+
"defaultValue": "false"
|
|
1440
|
+
},
|
|
1441
|
+
"visibleItems": {
|
|
1442
|
+
"type": "number",
|
|
1443
|
+
"mutable": false,
|
|
1444
|
+
"complexType": {
|
|
1445
|
+
"original": "number",
|
|
1446
|
+
"resolved": "number",
|
|
1447
|
+
"references": {}
|
|
1448
|
+
},
|
|
1449
|
+
"required": false,
|
|
1450
|
+
"optional": false,
|
|
1451
|
+
"docs": {
|
|
1452
|
+
"tags": [{
|
|
1453
|
+
"name": "default",
|
|
1454
|
+
"text": "6"
|
|
1455
|
+
}],
|
|
1456
|
+
"text": "Define quantas op\u00E7\u00F5es ficam vis\u00EDveis na janela da lista."
|
|
1457
|
+
},
|
|
1458
|
+
"getter": false,
|
|
1459
|
+
"setter": false,
|
|
1460
|
+
"reflect": true,
|
|
1461
|
+
"attribute": "visible-items",
|
|
1462
|
+
"defaultValue": "6"
|
|
1463
|
+
},
|
|
1464
|
+
"itemHeight": {
|
|
1465
|
+
"type": "number",
|
|
1466
|
+
"mutable": false,
|
|
1467
|
+
"complexType": {
|
|
1468
|
+
"original": "number",
|
|
1469
|
+
"resolved": "number",
|
|
1470
|
+
"references": {}
|
|
1471
|
+
},
|
|
1472
|
+
"required": false,
|
|
1473
|
+
"optional": false,
|
|
1474
|
+
"docs": {
|
|
1475
|
+
"tags": [{
|
|
1476
|
+
"name": "default",
|
|
1477
|
+
"text": "40"
|
|
1478
|
+
}],
|
|
1479
|
+
"text": "Informa a altura base de cada op\u00E7\u00E3o para o c\u00E1lculo de virtual scroll."
|
|
1480
|
+
},
|
|
1481
|
+
"getter": false,
|
|
1482
|
+
"setter": false,
|
|
1483
|
+
"reflect": true,
|
|
1484
|
+
"attribute": "item-height",
|
|
1485
|
+
"defaultValue": "40"
|
|
1486
|
+
},
|
|
1487
|
+
"inputWidth": {
|
|
1488
|
+
"type": "string",
|
|
1489
|
+
"mutable": false,
|
|
1490
|
+
"complexType": {
|
|
1491
|
+
"original": "string | undefined",
|
|
1492
|
+
"resolved": "string",
|
|
1493
|
+
"references": {}
|
|
1494
|
+
},
|
|
1495
|
+
"required": false,
|
|
1496
|
+
"optional": false,
|
|
1497
|
+
"docs": {
|
|
1498
|
+
"tags": [{
|
|
1499
|
+
"name": "type",
|
|
1500
|
+
"text": "{string}"
|
|
1501
|
+
}, {
|
|
1502
|
+
"name": "example",
|
|
1503
|
+
"text": "'20rem'"
|
|
1504
|
+
}],
|
|
1505
|
+
"text": "Controla a largura do campo de entrada."
|
|
1506
|
+
},
|
|
1507
|
+
"getter": false,
|
|
1508
|
+
"setter": false,
|
|
1509
|
+
"reflect": true,
|
|
1510
|
+
"attribute": "input-width",
|
|
1511
|
+
"defaultValue": "undefined"
|
|
1512
|
+
},
|
|
1513
|
+
"overscan": {
|
|
1514
|
+
"type": "number",
|
|
1515
|
+
"mutable": false,
|
|
1516
|
+
"complexType": {
|
|
1517
|
+
"original": "number",
|
|
1518
|
+
"resolved": "number",
|
|
1519
|
+
"references": {}
|
|
1520
|
+
},
|
|
1521
|
+
"required": false,
|
|
1522
|
+
"optional": false,
|
|
1523
|
+
"docs": {
|
|
1524
|
+
"tags": [{
|
|
1525
|
+
"name": "default",
|
|
1526
|
+
"text": "1"
|
|
1527
|
+
}],
|
|
1528
|
+
"text": "Define quantas op\u00E7\u00F5es extras s\u00E3o renderizadas antes e depois da \u00E1rea vis\u00EDvel no virtual scroll."
|
|
1529
|
+
},
|
|
1530
|
+
"getter": false,
|
|
1531
|
+
"setter": false,
|
|
1532
|
+
"reflect": true,
|
|
1533
|
+
"attribute": "overscan",
|
|
1534
|
+
"defaultValue": "1"
|
|
1535
|
+
},
|
|
1536
|
+
"isOpen": {
|
|
1537
|
+
"type": "boolean",
|
|
1538
|
+
"mutable": true,
|
|
1539
|
+
"complexType": {
|
|
1540
|
+
"original": "boolean",
|
|
1541
|
+
"resolved": "boolean",
|
|
1542
|
+
"references": {}
|
|
1543
|
+
},
|
|
1544
|
+
"required": false,
|
|
1545
|
+
"optional": false,
|
|
1546
|
+
"docs": {
|
|
1547
|
+
"tags": [{
|
|
1548
|
+
"name": "default",
|
|
1549
|
+
"text": "false"
|
|
1550
|
+
}, {
|
|
1551
|
+
"name": "deprecated",
|
|
1552
|
+
"text": "Use `open`."
|
|
1553
|
+
}],
|
|
1554
|
+
"text": "Controla o estado aberto/fechado da lista."
|
|
1555
|
+
},
|
|
1556
|
+
"getter": false,
|
|
1557
|
+
"setter": false,
|
|
1558
|
+
"reflect": true,
|
|
1559
|
+
"attribute": "is-open",
|
|
1560
|
+
"defaultValue": "false"
|
|
1561
|
+
},
|
|
1562
|
+
"open": {
|
|
1563
|
+
"type": "boolean",
|
|
1564
|
+
"mutable": false,
|
|
1565
|
+
"complexType": {
|
|
1566
|
+
"original": "boolean",
|
|
1567
|
+
"resolved": "boolean",
|
|
1568
|
+
"references": {}
|
|
1569
|
+
},
|
|
1570
|
+
"required": false,
|
|
1571
|
+
"optional": true,
|
|
1572
|
+
"docs": {
|
|
1573
|
+
"tags": [],
|
|
1574
|
+
"text": "Controla o estado aberto. Quando informada, tem preced\u00EAncia sobre `isOpen`."
|
|
1575
|
+
},
|
|
1576
|
+
"getter": false,
|
|
1577
|
+
"setter": false,
|
|
1578
|
+
"reflect": true,
|
|
1579
|
+
"attribute": "open"
|
|
1580
|
+
},
|
|
1581
|
+
"label": {
|
|
1582
|
+
"type": "string",
|
|
1583
|
+
"mutable": false,
|
|
1584
|
+
"complexType": {
|
|
1585
|
+
"original": "string",
|
|
1586
|
+
"resolved": "string",
|
|
1587
|
+
"references": {}
|
|
1588
|
+
},
|
|
1589
|
+
"required": false,
|
|
1590
|
+
"optional": true,
|
|
1591
|
+
"docs": {
|
|
1592
|
+
"tags": [{
|
|
1593
|
+
"name": "type",
|
|
1594
|
+
"text": "{string | undefined}"
|
|
1595
|
+
}],
|
|
1596
|
+
"text": "Texto exibido como r\u00F3tulo do campo."
|
|
1597
|
+
},
|
|
1598
|
+
"getter": false,
|
|
1599
|
+
"setter": false,
|
|
1600
|
+
"reflect": true,
|
|
1601
|
+
"attribute": "label"
|
|
1602
|
+
},
|
|
1603
|
+
"name": {
|
|
1604
|
+
"type": "string",
|
|
1605
|
+
"mutable": false,
|
|
1606
|
+
"complexType": {
|
|
1607
|
+
"original": "string",
|
|
1608
|
+
"resolved": "string",
|
|
1609
|
+
"references": {}
|
|
1610
|
+
},
|
|
1611
|
+
"required": false,
|
|
1612
|
+
"optional": true,
|
|
1613
|
+
"docs": {
|
|
1614
|
+
"tags": [{
|
|
1615
|
+
"name": "type",
|
|
1616
|
+
"text": "{string | undefined}"
|
|
1617
|
+
}],
|
|
1618
|
+
"text": "Nome do campo para integra\u00E7\u00E3o com formul\u00E1rios."
|
|
1619
|
+
},
|
|
1620
|
+
"getter": false,
|
|
1621
|
+
"setter": false,
|
|
1622
|
+
"reflect": true,
|
|
1623
|
+
"attribute": "name"
|
|
1624
|
+
},
|
|
1625
|
+
"value": {
|
|
1626
|
+
"type": "string",
|
|
1627
|
+
"mutable": true,
|
|
1628
|
+
"complexType": {
|
|
1629
|
+
"original": "string | string[]",
|
|
1630
|
+
"resolved": "string | string[]",
|
|
1631
|
+
"references": {}
|
|
1632
|
+
},
|
|
1633
|
+
"required": false,
|
|
1634
|
+
"optional": true,
|
|
1635
|
+
"docs": {
|
|
1636
|
+
"tags": [{
|
|
1637
|
+
"name": "type",
|
|
1638
|
+
"text": "{string | string[] | undefined}"
|
|
1639
|
+
}, {
|
|
1640
|
+
"name": "remarks",
|
|
1641
|
+
"text": "Em modo m\u00FAltiplo, o valor p\u00FAblico \u00E9 um array de strings."
|
|
1642
|
+
}],
|
|
1643
|
+
"text": "Valor p\u00FAblico do select baseado nas op\u00E7\u00F5es atualmente selecionadas."
|
|
1644
|
+
},
|
|
1645
|
+
"getter": false,
|
|
1646
|
+
"setter": false,
|
|
1647
|
+
"reflect": false,
|
|
1648
|
+
"attribute": "value",
|
|
1649
|
+
"defaultValue": "''"
|
|
1650
|
+
},
|
|
1651
|
+
"placeholder": {
|
|
1652
|
+
"type": "string",
|
|
1653
|
+
"mutable": false,
|
|
1654
|
+
"complexType": {
|
|
1655
|
+
"original": "string",
|
|
1656
|
+
"resolved": "string",
|
|
1657
|
+
"references": {}
|
|
1658
|
+
},
|
|
1659
|
+
"required": false,
|
|
1660
|
+
"optional": false,
|
|
1661
|
+
"docs": {
|
|
1662
|
+
"tags": [{
|
|
1663
|
+
"name": "type",
|
|
1664
|
+
"text": "{string | undefined}"
|
|
1665
|
+
}],
|
|
1666
|
+
"text": "Texto exibido quando n\u00E3o h\u00E1 sele\u00E7\u00E3o."
|
|
1667
|
+
},
|
|
1668
|
+
"getter": false,
|
|
1669
|
+
"setter": false,
|
|
1670
|
+
"reflect": true,
|
|
1671
|
+
"attribute": "placeholder",
|
|
1672
|
+
"defaultValue": "''"
|
|
1673
|
+
},
|
|
1674
|
+
"required": {
|
|
1675
|
+
"type": "boolean",
|
|
1676
|
+
"mutable": false,
|
|
1677
|
+
"complexType": {
|
|
1678
|
+
"original": "boolean",
|
|
1679
|
+
"resolved": "boolean",
|
|
1680
|
+
"references": {}
|
|
1681
|
+
},
|
|
1682
|
+
"required": false,
|
|
1683
|
+
"optional": false,
|
|
1684
|
+
"docs": {
|
|
1685
|
+
"tags": [{
|
|
1686
|
+
"name": "default",
|
|
1687
|
+
"text": "false"
|
|
1688
|
+
}],
|
|
1689
|
+
"text": "Indica que o preenchimento do select \u00E9 obrigat\u00F3rio."
|
|
1690
|
+
},
|
|
1691
|
+
"getter": false,
|
|
1692
|
+
"setter": false,
|
|
1693
|
+
"reflect": true,
|
|
1694
|
+
"attribute": "required",
|
|
1695
|
+
"defaultValue": "false"
|
|
1696
|
+
},
|
|
1697
|
+
"selectAllLabel": {
|
|
1698
|
+
"type": "string",
|
|
1699
|
+
"mutable": false,
|
|
1700
|
+
"complexType": {
|
|
1701
|
+
"original": "string",
|
|
1702
|
+
"resolved": "string",
|
|
1703
|
+
"references": {}
|
|
1704
|
+
},
|
|
1705
|
+
"required": false,
|
|
1706
|
+
"optional": false,
|
|
1707
|
+
"docs": {
|
|
1708
|
+
"tags": [{
|
|
1709
|
+
"name": "default",
|
|
1710
|
+
"text": "'Selecionar todos'"
|
|
1711
|
+
}],
|
|
1712
|
+
"text": "R\u00F3tulo apresentado para a op\u00E7\u00E3o de selecionar todos no modo m\u00FAltiplo."
|
|
1713
|
+
},
|
|
1714
|
+
"getter": false,
|
|
1715
|
+
"setter": false,
|
|
1716
|
+
"reflect": true,
|
|
1717
|
+
"attribute": "select-all-label",
|
|
1718
|
+
"defaultValue": "Select.SELECT_ALL_LABEL"
|
|
1719
|
+
},
|
|
1720
|
+
"filterable": {
|
|
1721
|
+
"type": "boolean",
|
|
1722
|
+
"mutable": false,
|
|
1723
|
+
"complexType": {
|
|
1724
|
+
"original": "boolean",
|
|
1725
|
+
"resolved": "boolean",
|
|
1726
|
+
"references": {}
|
|
1727
|
+
},
|
|
1728
|
+
"required": false,
|
|
1729
|
+
"optional": false,
|
|
1730
|
+
"docs": {
|
|
1731
|
+
"tags": [{
|
|
1732
|
+
"name": "default",
|
|
1733
|
+
"text": "true"
|
|
1734
|
+
}],
|
|
1735
|
+
"text": "Habilita a filtragem textual das op\u00E7\u00F5es por r\u00F3tulo ou valor."
|
|
1736
|
+
},
|
|
1737
|
+
"getter": false,
|
|
1738
|
+
"setter": false,
|
|
1739
|
+
"reflect": true,
|
|
1740
|
+
"attribute": "filterable",
|
|
1741
|
+
"defaultValue": "true"
|
|
1742
|
+
},
|
|
1743
|
+
"searchMode": {
|
|
1744
|
+
"type": "string",
|
|
1745
|
+
"mutable": false,
|
|
1746
|
+
"complexType": {
|
|
1747
|
+
"original": "SelectSearchMode",
|
|
1748
|
+
"resolved": "\"local\" | \"remote\"",
|
|
1749
|
+
"references": {
|
|
1750
|
+
"SelectSearchMode": {
|
|
1751
|
+
"location": "import",
|
|
1752
|
+
"path": "./select.types",
|
|
1753
|
+
"id": "src/components/select/select.types.ts::SelectSearchMode",
|
|
1754
|
+
"referenceLocation": "SelectSearchMode"
|
|
1755
|
+
}
|
|
1756
|
+
}
|
|
1757
|
+
},
|
|
1758
|
+
"required": false,
|
|
1759
|
+
"optional": false,
|
|
1760
|
+
"docs": {
|
|
1761
|
+
"tags": [{
|
|
1762
|
+
"name": "default",
|
|
1763
|
+
"text": "'local'"
|
|
1764
|
+
}],
|
|
1765
|
+
"text": "Define se as op\u00E7\u00F5es s\u00E3o filtradas localmente ou fornecidas por uma busca remota.\nEm `remote`, o componente emite `brSelectSearch`; a aplica\u00E7\u00E3o deve buscar,\nvalidar e aplicar as op\u00E7\u00F5es por `setOptions()`."
|
|
1766
|
+
},
|
|
1767
|
+
"getter": false,
|
|
1768
|
+
"setter": false,
|
|
1769
|
+
"reflect": true,
|
|
1770
|
+
"attribute": "search-mode",
|
|
1771
|
+
"defaultValue": "'local'"
|
|
1772
|
+
},
|
|
1773
|
+
"loading": {
|
|
1774
|
+
"type": "boolean",
|
|
1775
|
+
"mutable": false,
|
|
1776
|
+
"complexType": {
|
|
1777
|
+
"original": "boolean",
|
|
1778
|
+
"resolved": "boolean",
|
|
1779
|
+
"references": {}
|
|
1780
|
+
},
|
|
1781
|
+
"required": false,
|
|
1782
|
+
"optional": false,
|
|
1783
|
+
"docs": {
|
|
1784
|
+
"tags": [{
|
|
1785
|
+
"name": "default",
|
|
1786
|
+
"text": "false"
|
|
1787
|
+
}],
|
|
1788
|
+
"text": "Indica que uma busca remota de op\u00E7\u00F5es est\u00E1 pendente.\nEnquanto ativo, novas op\u00E7\u00F5es n\u00E3o podem ser selecionadas; a aplica\u00E7\u00E3o\ncontinua respons\u00E1vel por debounce, cancelamento, erros e autentica\u00E7\u00E3o."
|
|
1789
|
+
},
|
|
1790
|
+
"getter": false,
|
|
1791
|
+
"setter": false,
|
|
1792
|
+
"reflect": true,
|
|
1793
|
+
"attribute": "loading",
|
|
1794
|
+
"defaultValue": "false"
|
|
1795
|
+
},
|
|
1796
|
+
"showSearchIcon": {
|
|
1797
|
+
"type": "boolean",
|
|
1798
|
+
"mutable": false,
|
|
1799
|
+
"complexType": {
|
|
1800
|
+
"original": "boolean",
|
|
1801
|
+
"resolved": "boolean",
|
|
1802
|
+
"references": {}
|
|
1803
|
+
},
|
|
1804
|
+
"required": false,
|
|
1805
|
+
"optional": false,
|
|
1806
|
+
"docs": {
|
|
1807
|
+
"tags": [{
|
|
1808
|
+
"name": "default",
|
|
1809
|
+
"text": "false"
|
|
1810
|
+
}],
|
|
1811
|
+
"text": "Exibe o \u00EDcone de busca no campo de entrada."
|
|
1812
|
+
},
|
|
1813
|
+
"getter": false,
|
|
1814
|
+
"setter": false,
|
|
1815
|
+
"reflect": true,
|
|
1816
|
+
"attribute": "show-search-icon",
|
|
1817
|
+
"defaultValue": "false"
|
|
1818
|
+
},
|
|
1819
|
+
"unselectAllLabel": {
|
|
1820
|
+
"type": "string",
|
|
1821
|
+
"mutable": false,
|
|
1822
|
+
"complexType": {
|
|
1823
|
+
"original": "string",
|
|
1824
|
+
"resolved": "string",
|
|
1825
|
+
"references": {}
|
|
1826
|
+
},
|
|
1827
|
+
"required": false,
|
|
1828
|
+
"optional": false,
|
|
1829
|
+
"docs": {
|
|
1830
|
+
"tags": [{
|
|
1831
|
+
"name": "default",
|
|
1832
|
+
"text": "'Desselecionar todos'"
|
|
1833
|
+
}],
|
|
1834
|
+
"text": "R\u00F3tulo apresentado quando todas as op\u00E7\u00F5es j\u00E1 est\u00E3o selecionadas no modo m\u00FAltiplo."
|
|
1835
|
+
},
|
|
1836
|
+
"getter": false,
|
|
1837
|
+
"setter": false,
|
|
1838
|
+
"reflect": true,
|
|
1839
|
+
"attribute": "unselect-all-label",
|
|
1840
|
+
"defaultValue": "Select.DESELECT_ALL_LABEL"
|
|
1841
|
+
},
|
|
1842
|
+
"options": {
|
|
1843
|
+
"type": "string",
|
|
1844
|
+
"mutable": false,
|
|
1845
|
+
"complexType": {
|
|
1846
|
+
"original": "string | { label: string; value: string; selected?: boolean }[] | SelectOptionData[]",
|
|
1847
|
+
"resolved": "SelectOptionData[] | string | { label: string; value: string; selected?: boolean; }[]",
|
|
1848
|
+
"references": {
|
|
1849
|
+
"SelectOptionData": {
|
|
1850
|
+
"location": "import",
|
|
1851
|
+
"path": "./select.types",
|
|
1852
|
+
"id": "src/components/select/select.types.ts::SelectOptionData",
|
|
1853
|
+
"referenceLocation": "SelectOptionData"
|
|
1854
|
+
}
|
|
1855
|
+
}
|
|
1856
|
+
},
|
|
1857
|
+
"required": false,
|
|
1858
|
+
"optional": false,
|
|
1859
|
+
"docs": {
|
|
1860
|
+
"tags": [{
|
|
1861
|
+
"name": "deprecated",
|
|
1862
|
+
"text": "O formato de op\u00E7\u00F5es tipado atual \u00E9 prefer\u00EDvel; o formato legado permanece aceito."
|
|
1863
|
+
}],
|
|
1864
|
+
"text": "Op\u00E7\u00F5es fornecidas como array ou JSON, al\u00E9m das op\u00E7\u00F5es projetadas por slot."
|
|
1865
|
+
},
|
|
1866
|
+
"getter": false,
|
|
1867
|
+
"setter": false,
|
|
1868
|
+
"reflect": false,
|
|
1869
|
+
"attribute": "options",
|
|
1870
|
+
"defaultValue": "[]"
|
|
1871
|
+
},
|
|
1872
|
+
"autocomplete": {
|
|
1873
|
+
"type": "string",
|
|
1874
|
+
"mutable": false,
|
|
1875
|
+
"complexType": {
|
|
1876
|
+
"original": "InputToggle",
|
|
1877
|
+
"resolved": "\"off\" | \"on\"",
|
|
1878
|
+
"references": {
|
|
1879
|
+
"InputToggle": {
|
|
1880
|
+
"location": "import",
|
|
1881
|
+
"path": "../input/input.types",
|
|
1882
|
+
"id": "src/components/input/input.types.ts::InputToggle",
|
|
1883
|
+
"referenceLocation": "InputToggle"
|
|
1884
|
+
}
|
|
1885
|
+
}
|
|
1886
|
+
},
|
|
1887
|
+
"required": false,
|
|
1888
|
+
"optional": true,
|
|
1889
|
+
"docs": {
|
|
1890
|
+
"tags": [],
|
|
1891
|
+
"text": "Controla o autocomplete do campo de busca interno."
|
|
1892
|
+
},
|
|
1893
|
+
"getter": false,
|
|
1894
|
+
"setter": false,
|
|
1895
|
+
"reflect": true,
|
|
1896
|
+
"attribute": "autocomplete"
|
|
1897
|
+
},
|
|
1898
|
+
"customId": {
|
|
1899
|
+
"type": "string",
|
|
1900
|
+
"mutable": false,
|
|
1901
|
+
"complexType": {
|
|
1902
|
+
"original": "string",
|
|
1903
|
+
"resolved": "string",
|
|
1904
|
+
"references": {}
|
|
1905
|
+
},
|
|
1906
|
+
"required": false,
|
|
1907
|
+
"optional": false,
|
|
1908
|
+
"docs": {
|
|
1909
|
+
"tags": [],
|
|
1910
|
+
"text": "Identificador p\u00FAblico do controle."
|
|
1911
|
+
},
|
|
1912
|
+
"getter": false,
|
|
1913
|
+
"setter": false,
|
|
1914
|
+
"reflect": true,
|
|
1915
|
+
"attribute": "custom-id",
|
|
1916
|
+
"defaultValue": "`br-select-${selectId++}`"
|
|
1917
|
+
},
|
|
1918
|
+
"minSelections": {
|
|
1919
|
+
"type": "number",
|
|
1920
|
+
"mutable": false,
|
|
1921
|
+
"complexType": {
|
|
1922
|
+
"original": "number",
|
|
1923
|
+
"resolved": "number",
|
|
1924
|
+
"references": {}
|
|
1925
|
+
},
|
|
1926
|
+
"required": false,
|
|
1927
|
+
"optional": false,
|
|
1928
|
+
"docs": {
|
|
1929
|
+
"tags": [],
|
|
1930
|
+
"text": "Quantidade m\u00EDnima de op\u00E7\u00F5es selecionadas no modo m\u00FAltiplo."
|
|
1931
|
+
},
|
|
1932
|
+
"getter": false,
|
|
1933
|
+
"setter": false,
|
|
1934
|
+
"reflect": true,
|
|
1935
|
+
"attribute": "min-selections",
|
|
1936
|
+
"defaultValue": "0"
|
|
1937
|
+
},
|
|
1938
|
+
"maxSelections": {
|
|
1939
|
+
"type": "number",
|
|
1940
|
+
"mutable": false,
|
|
1941
|
+
"complexType": {
|
|
1942
|
+
"original": "number",
|
|
1943
|
+
"resolved": "number",
|
|
1944
|
+
"references": {}
|
|
1945
|
+
},
|
|
1946
|
+
"required": false,
|
|
1947
|
+
"optional": false,
|
|
1948
|
+
"docs": {
|
|
1949
|
+
"tags": [],
|
|
1950
|
+
"text": "Quantidade m\u00E1xima de op\u00E7\u00F5es selecionadas no modo m\u00FAltiplo."
|
|
1951
|
+
},
|
|
1952
|
+
"getter": false,
|
|
1953
|
+
"setter": false,
|
|
1954
|
+
"reflect": true,
|
|
1955
|
+
"attribute": "max-selections",
|
|
1956
|
+
"defaultValue": "0"
|
|
1957
|
+
},
|
|
1958
|
+
"validator": {
|
|
1959
|
+
"type": "string",
|
|
1960
|
+
"mutable": false,
|
|
1961
|
+
"complexType": {
|
|
1962
|
+
"original": "SelectValidator | string",
|
|
1963
|
+
"resolved": "((value: string | string[]) => string | Promise<string>) | string",
|
|
1964
|
+
"references": {
|
|
1965
|
+
"SelectValidator": {
|
|
1966
|
+
"location": "import",
|
|
1967
|
+
"path": "./select.types",
|
|
1968
|
+
"id": "src/components/select/select.types.ts::SelectValidator",
|
|
1969
|
+
"referenceLocation": "SelectValidator"
|
|
1970
|
+
}
|
|
1971
|
+
}
|
|
1972
|
+
},
|
|
1973
|
+
"required": false,
|
|
1974
|
+
"optional": true,
|
|
1975
|
+
"docs": {
|
|
1976
|
+
"tags": [],
|
|
1977
|
+
"text": "Valida\u00E7\u00E3o s\u00EDncrona ou ass\u00EDncrona executada no m\u00E9todo `validate()`."
|
|
1978
|
+
},
|
|
1979
|
+
"getter": false,
|
|
1980
|
+
"setter": false,
|
|
1981
|
+
"reflect": false,
|
|
1982
|
+
"attribute": "validator"
|
|
1983
|
+
}
|
|
1984
|
+
};
|
|
1985
|
+
}
|
|
1986
|
+
static get states() {
|
|
1987
|
+
return {
|
|
1988
|
+
"activeOptionIndex": {},
|
|
1989
|
+
"displayValue": {},
|
|
1990
|
+
"searchTerm": {},
|
|
1991
|
+
"formDisabled": {},
|
|
1992
|
+
"isValidating": {},
|
|
1993
|
+
"validatorMessage": {},
|
|
1994
|
+
"hasFeedbackSlot": {},
|
|
1995
|
+
"hasValidationLoadingSlot": {}
|
|
1996
|
+
};
|
|
1997
|
+
}
|
|
1998
|
+
static get events() {
|
|
1999
|
+
return [{
|
|
2000
|
+
"method": "brSelectStateChange",
|
|
2001
|
+
"name": "brSelectStateChange",
|
|
2002
|
+
"bubbles": true,
|
|
2003
|
+
"cancelable": true,
|
|
2004
|
+
"composed": true,
|
|
2005
|
+
"docs": {
|
|
2006
|
+
"tags": [{
|
|
2007
|
+
"name": "event",
|
|
2008
|
+
"text": "brSelectStateChange"
|
|
2009
|
+
}, {
|
|
2010
|
+
"name": "type",
|
|
2011
|
+
"text": "{EventEmitter<SelectStateChangeDetail>}"
|
|
2012
|
+
}, {
|
|
2013
|
+
"name": "remarks",
|
|
2014
|
+
"text": "O payload consolidado informa abertura, desabilita\u00E7\u00E3o e sele\u00E7\u00E3o atual."
|
|
2015
|
+
}],
|
|
2016
|
+
"text": "Evento emitido quando o estado p\u00FAblico do select muda."
|
|
2017
|
+
},
|
|
2018
|
+
"complexType": {
|
|
2019
|
+
"original": "SelectStateChangeDetail",
|
|
2020
|
+
"resolved": "{ isOpen: boolean; option?: SelectOptionData; options?: SelectOptionData[]; }",
|
|
2021
|
+
"references": {
|
|
2022
|
+
"SelectStateChangeDetail": {
|
|
2023
|
+
"location": "import",
|
|
2024
|
+
"path": "./select.types",
|
|
2025
|
+
"id": "src/components/select/select.types.ts::SelectStateChangeDetail",
|
|
2026
|
+
"referenceLocation": "SelectStateChangeDetail"
|
|
2027
|
+
}
|
|
2028
|
+
}
|
|
2029
|
+
}
|
|
2030
|
+
}, {
|
|
2031
|
+
"method": "valueChange",
|
|
2032
|
+
"name": "valueChange",
|
|
2033
|
+
"bubbles": true,
|
|
2034
|
+
"cancelable": true,
|
|
2035
|
+
"composed": true,
|
|
2036
|
+
"docs": {
|
|
2037
|
+
"tags": [{
|
|
2038
|
+
"name": "deprecated",
|
|
2039
|
+
"text": "Use os eventos nativos `input` e `change`."
|
|
2040
|
+
}],
|
|
2041
|
+
"text": "Evento emitido quando o valor p\u00FAblico do select \u00E9 alterado."
|
|
2042
|
+
},
|
|
2043
|
+
"complexType": {
|
|
2044
|
+
"original": "string",
|
|
2045
|
+
"resolved": "string",
|
|
2046
|
+
"references": {}
|
|
2047
|
+
}
|
|
2048
|
+
}, {
|
|
2049
|
+
"method": "optionHover",
|
|
2050
|
+
"name": "optionHover",
|
|
2051
|
+
"bubbles": true,
|
|
2052
|
+
"cancelable": true,
|
|
2053
|
+
"composed": true,
|
|
2054
|
+
"docs": {
|
|
2055
|
+
"tags": [{
|
|
2056
|
+
"name": "deprecated",
|
|
2057
|
+
"text": "Use a navega\u00E7\u00E3o e os eventos de estado atuais."
|
|
2058
|
+
}],
|
|
2059
|
+
"text": "Emite a op\u00E7\u00E3o que recebeu foco ou hover."
|
|
2060
|
+
},
|
|
2061
|
+
"complexType": {
|
|
2062
|
+
"original": "{ label: string; value: string }",
|
|
2063
|
+
"resolved": "{ label: string; value: string; }",
|
|
2064
|
+
"references": {}
|
|
2065
|
+
}
|
|
2066
|
+
}, {
|
|
2067
|
+
"method": "brSelectSearch",
|
|
2068
|
+
"name": "brSelectSearch",
|
|
2069
|
+
"bubbles": true,
|
|
2070
|
+
"cancelable": false,
|
|
2071
|
+
"composed": true,
|
|
2072
|
+
"docs": {
|
|
2073
|
+
"tags": [],
|
|
2074
|
+
"text": "Emitido uma vez por edi\u00E7\u00E3o do campo de busca, inclusive ao limpar a consulta.\nO `detail` cont\u00E9m `{ query }`; o evento \u00E9 informativo e n\u00E3o cancel\u00E1vel.\nA aplica\u00E7\u00E3o deve controlar debounce, transporte e ciclo de vida da busca."
|
|
2075
|
+
},
|
|
2076
|
+
"complexType": {
|
|
2077
|
+
"original": "SelectSearchDetail",
|
|
2078
|
+
"resolved": "{ query: string; }",
|
|
2079
|
+
"references": {
|
|
2080
|
+
"SelectSearchDetail": {
|
|
2081
|
+
"location": "import",
|
|
2082
|
+
"path": "./select.types",
|
|
2083
|
+
"id": "src/components/select/select.types.ts::SelectSearchDetail",
|
|
2084
|
+
"referenceLocation": "SelectSearchDetail"
|
|
2085
|
+
}
|
|
2086
|
+
}
|
|
2087
|
+
}
|
|
2088
|
+
}, {
|
|
2089
|
+
"method": "opened",
|
|
2090
|
+
"name": "opened",
|
|
2091
|
+
"bubbles": true,
|
|
2092
|
+
"cancelable": true,
|
|
2093
|
+
"composed": true,
|
|
2094
|
+
"docs": {
|
|
2095
|
+
"tags": [{
|
|
2096
|
+
"name": "deprecated",
|
|
2097
|
+
"text": "Use `brSelectStateChange`."
|
|
2098
|
+
}],
|
|
2099
|
+
"text": "Emitido quando a lista \u00E9 aberta."
|
|
2100
|
+
},
|
|
2101
|
+
"complexType": {
|
|
2102
|
+
"original": "void",
|
|
2103
|
+
"resolved": "void",
|
|
2104
|
+
"references": {}
|
|
2105
|
+
}
|
|
2106
|
+
}, {
|
|
2107
|
+
"method": "closed",
|
|
2108
|
+
"name": "closed",
|
|
2109
|
+
"bubbles": true,
|
|
2110
|
+
"cancelable": true,
|
|
2111
|
+
"composed": true,
|
|
2112
|
+
"docs": {
|
|
2113
|
+
"tags": [{
|
|
2114
|
+
"name": "deprecated",
|
|
2115
|
+
"text": "Use `brSelectStateChange`."
|
|
2116
|
+
}],
|
|
2117
|
+
"text": "Emitido quando a lista \u00E9 fechada."
|
|
2118
|
+
},
|
|
2119
|
+
"complexType": {
|
|
2120
|
+
"original": "void",
|
|
2121
|
+
"resolved": "void",
|
|
2122
|
+
"references": {}
|
|
2123
|
+
}
|
|
2124
|
+
}, {
|
|
2125
|
+
"method": "brSelectValidationChange",
|
|
2126
|
+
"name": "brSelectValidationChange",
|
|
2127
|
+
"bubbles": true,
|
|
2128
|
+
"cancelable": true,
|
|
2129
|
+
"composed": true,
|
|
2130
|
+
"docs": {
|
|
2131
|
+
"tags": [],
|
|
2132
|
+
"text": "Informa o in\u00EDcio e o resultado de uma valida\u00E7\u00E3o s\u00EDncrona ou ass\u00EDncrona.\nO `detail` cont\u00E9m `validating`, `valid` e `message`."
|
|
2133
|
+
},
|
|
2134
|
+
"complexType": {
|
|
2135
|
+
"original": "{\n validating: boolean;\n valid: boolean | null;\n message: string | null;\n }",
|
|
2136
|
+
"resolved": "{ validating: boolean; valid: boolean; message: string; }",
|
|
2137
|
+
"references": {}
|
|
2138
|
+
}
|
|
2139
|
+
}];
|
|
2140
|
+
}
|
|
2141
|
+
static get methods() {
|
|
2142
|
+
return {
|
|
2143
|
+
"enable": {
|
|
2144
|
+
"complexType": {
|
|
2145
|
+
"signature": "() => Promise<void>",
|
|
2146
|
+
"parameters": [],
|
|
2147
|
+
"references": {
|
|
2148
|
+
"Promise": {
|
|
2149
|
+
"location": "global",
|
|
2150
|
+
"id": "global::Promise"
|
|
2151
|
+
}
|
|
2152
|
+
},
|
|
2153
|
+
"return": "Promise<void>"
|
|
2154
|
+
},
|
|
2155
|
+
"docs": {
|
|
2156
|
+
"text": "Habilita o select para intera\u00E7\u00E3o do usu\u00E1rio.",
|
|
2157
|
+
"tags": [{
|
|
2158
|
+
"name": "returns",
|
|
2159
|
+
"text": "Uma promise conclu\u00EDda ap\u00F3s a atualiza\u00E7\u00E3o do estado."
|
|
2160
|
+
}]
|
|
2161
|
+
}
|
|
2162
|
+
},
|
|
2163
|
+
"disable": {
|
|
2164
|
+
"complexType": {
|
|
2165
|
+
"signature": "() => Promise<void>",
|
|
2166
|
+
"parameters": [],
|
|
2167
|
+
"references": {
|
|
2168
|
+
"Promise": {
|
|
2169
|
+
"location": "global",
|
|
2170
|
+
"id": "global::Promise"
|
|
2171
|
+
}
|
|
2172
|
+
},
|
|
2173
|
+
"return": "Promise<void>"
|
|
2174
|
+
},
|
|
2175
|
+
"docs": {
|
|
2176
|
+
"text": "Desabilita o select e impede novas intera\u00E7\u00F5es.",
|
|
2177
|
+
"tags": [{
|
|
2178
|
+
"name": "returns",
|
|
2179
|
+
"text": "Uma promise conclu\u00EDda ap\u00F3s a atualiza\u00E7\u00E3o do estado."
|
|
2180
|
+
}]
|
|
2181
|
+
}
|
|
2182
|
+
},
|
|
2183
|
+
"show": {
|
|
2184
|
+
"complexType": {
|
|
2185
|
+
"signature": "() => Promise<void>",
|
|
2186
|
+
"parameters": [],
|
|
2187
|
+
"references": {
|
|
2188
|
+
"Promise": {
|
|
2189
|
+
"location": "global",
|
|
2190
|
+
"id": "global::Promise"
|
|
2191
|
+
}
|
|
2192
|
+
},
|
|
2193
|
+
"return": "Promise<void>"
|
|
2194
|
+
},
|
|
2195
|
+
"docs": {
|
|
2196
|
+
"text": "Abre a lista de op\u00E7\u00F5es quando o componente est\u00E1 habilitado.",
|
|
2197
|
+
"tags": [{
|
|
2198
|
+
"name": "returns",
|
|
2199
|
+
"text": "Uma promise conclu\u00EDda ap\u00F3s a atualiza\u00E7\u00E3o do estado."
|
|
2200
|
+
}]
|
|
2201
|
+
}
|
|
2202
|
+
},
|
|
2203
|
+
"close": {
|
|
2204
|
+
"complexType": {
|
|
2205
|
+
"signature": "() => Promise<void>",
|
|
2206
|
+
"parameters": [],
|
|
2207
|
+
"references": {
|
|
2208
|
+
"Promise": {
|
|
2209
|
+
"location": "global",
|
|
2210
|
+
"id": "global::Promise"
|
|
2211
|
+
}
|
|
2212
|
+
},
|
|
2213
|
+
"return": "Promise<void>"
|
|
2214
|
+
},
|
|
2215
|
+
"docs": {
|
|
2216
|
+
"text": "Fecha a lista de op\u00E7\u00F5es quando o componente est\u00E1 habilitado.",
|
|
2217
|
+
"tags": [{
|
|
2218
|
+
"name": "returns",
|
|
2219
|
+
"text": "Uma promise conclu\u00EDda ap\u00F3s a atualiza\u00E7\u00E3o do estado."
|
|
2220
|
+
}]
|
|
2221
|
+
}
|
|
2222
|
+
},
|
|
2223
|
+
"toggleOpen": {
|
|
2224
|
+
"complexType": {
|
|
2225
|
+
"signature": "() => Promise<void>",
|
|
2226
|
+
"parameters": [],
|
|
2227
|
+
"references": {
|
|
2228
|
+
"Promise": {
|
|
2229
|
+
"location": "global",
|
|
2230
|
+
"id": "global::Promise"
|
|
2231
|
+
}
|
|
2232
|
+
},
|
|
2233
|
+
"return": "Promise<void>"
|
|
2234
|
+
},
|
|
2235
|
+
"docs": {
|
|
2236
|
+
"text": "Alterna entre os estados aberto e fechado do select.",
|
|
2237
|
+
"tags": [{
|
|
2238
|
+
"name": "returns",
|
|
2239
|
+
"text": "Uma promise conclu\u00EDda ap\u00F3s a atualiza\u00E7\u00E3o do estado."
|
|
2240
|
+
}]
|
|
2241
|
+
}
|
|
2242
|
+
},
|
|
2243
|
+
"clear": {
|
|
2244
|
+
"complexType": {
|
|
2245
|
+
"signature": "() => Promise<void>",
|
|
2246
|
+
"parameters": [],
|
|
2247
|
+
"references": {
|
|
2248
|
+
"Promise": {
|
|
2249
|
+
"location": "global",
|
|
2250
|
+
"id": "global::Promise"
|
|
2251
|
+
}
|
|
2252
|
+
},
|
|
2253
|
+
"return": "Promise<void>"
|
|
2254
|
+
},
|
|
2255
|
+
"docs": {
|
|
2256
|
+
"text": "Limpa a sele\u00E7\u00E3o atual.",
|
|
2257
|
+
"tags": [{
|
|
2258
|
+
"name": "deprecated",
|
|
2259
|
+
"text": "Use `setValue('')` ou a API de formul\u00E1rio."
|
|
2260
|
+
}]
|
|
2261
|
+
}
|
|
2262
|
+
},
|
|
2263
|
+
"getValue": {
|
|
2264
|
+
"complexType": {
|
|
2265
|
+
"signature": "() => Promise<string | string[]>",
|
|
2266
|
+
"parameters": [],
|
|
2267
|
+
"references": {
|
|
2268
|
+
"Promise": {
|
|
2269
|
+
"location": "global",
|
|
2270
|
+
"id": "global::Promise"
|
|
2271
|
+
}
|
|
2272
|
+
},
|
|
2273
|
+
"return": "Promise<string | string[]>"
|
|
2274
|
+
},
|
|
2275
|
+
"docs": {
|
|
2276
|
+
"text": "Retorna o valor p\u00FAblico atual.",
|
|
2277
|
+
"tags": [{
|
|
2278
|
+
"name": "deprecated",
|
|
2279
|
+
"text": "Leia a propriedade `value` diretamente."
|
|
2280
|
+
}]
|
|
2281
|
+
}
|
|
2282
|
+
},
|
|
2283
|
+
"setValue": {
|
|
2284
|
+
"complexType": {
|
|
2285
|
+
"signature": "(value: string | string[]) => Promise<void>",
|
|
2286
|
+
"parameters": [{
|
|
2287
|
+
"name": "value",
|
|
2288
|
+
"type": "string | string[]",
|
|
2289
|
+
"docs": ""
|
|
2290
|
+
}],
|
|
2291
|
+
"references": {
|
|
2292
|
+
"Promise": {
|
|
2293
|
+
"location": "global",
|
|
2294
|
+
"id": "global::Promise"
|
|
2295
|
+
}
|
|
2296
|
+
},
|
|
2297
|
+
"return": "Promise<void>"
|
|
2298
|
+
},
|
|
2299
|
+
"docs": {
|
|
2300
|
+
"text": "Define o valor p\u00FAblico do select.",
|
|
2301
|
+
"tags": [{
|
|
2302
|
+
"name": "deprecated",
|
|
2303
|
+
"text": "Atribua a propriedade `value` diretamente."
|
|
2304
|
+
}]
|
|
2305
|
+
}
|
|
2306
|
+
},
|
|
2307
|
+
"setFocus": {
|
|
2308
|
+
"complexType": {
|
|
2309
|
+
"signature": "() => Promise<void>",
|
|
2310
|
+
"parameters": [],
|
|
2311
|
+
"references": {
|
|
2312
|
+
"Promise": {
|
|
2313
|
+
"location": "global",
|
|
2314
|
+
"id": "global::Promise"
|
|
2315
|
+
}
|
|
2316
|
+
},
|
|
2317
|
+
"return": "Promise<void>"
|
|
2318
|
+
},
|
|
2319
|
+
"docs": {
|
|
2320
|
+
"text": "Move o foco para o campo interno.",
|
|
2321
|
+
"tags": [{
|
|
2322
|
+
"name": "deprecated",
|
|
2323
|
+
"text": "Use o foco nativo do componente quando poss\u00EDvel."
|
|
2324
|
+
}]
|
|
2325
|
+
}
|
|
2326
|
+
},
|
|
2327
|
+
"checkValidity": {
|
|
2328
|
+
"complexType": {
|
|
2329
|
+
"signature": "() => Promise<boolean>",
|
|
2330
|
+
"parameters": [],
|
|
2331
|
+
"references": {
|
|
2332
|
+
"Promise": {
|
|
2333
|
+
"location": "global",
|
|
2334
|
+
"id": "global::Promise"
|
|
2335
|
+
}
|
|
2336
|
+
},
|
|
2337
|
+
"return": "Promise<boolean>"
|
|
2338
|
+
},
|
|
2339
|
+
"docs": {
|
|
2340
|
+
"text": "",
|
|
2341
|
+
"tags": []
|
|
2342
|
+
}
|
|
2343
|
+
},
|
|
2344
|
+
"reportValidity": {
|
|
2345
|
+
"complexType": {
|
|
2346
|
+
"signature": "() => Promise<boolean>",
|
|
2347
|
+
"parameters": [],
|
|
2348
|
+
"references": {
|
|
2349
|
+
"Promise": {
|
|
2350
|
+
"location": "global",
|
|
2351
|
+
"id": "global::Promise"
|
|
2352
|
+
}
|
|
2353
|
+
},
|
|
2354
|
+
"return": "Promise<boolean>"
|
|
2355
|
+
},
|
|
2356
|
+
"docs": {
|
|
2357
|
+
"text": "",
|
|
2358
|
+
"tags": []
|
|
2359
|
+
}
|
|
2360
|
+
},
|
|
2361
|
+
"setCustomValidity": {
|
|
2362
|
+
"complexType": {
|
|
2363
|
+
"signature": "(message: string) => Promise<void>",
|
|
2364
|
+
"parameters": [{
|
|
2365
|
+
"name": "message",
|
|
2366
|
+
"type": "string",
|
|
2367
|
+
"docs": ""
|
|
2368
|
+
}],
|
|
2369
|
+
"references": {
|
|
2370
|
+
"Promise": {
|
|
2371
|
+
"location": "global",
|
|
2372
|
+
"id": "global::Promise"
|
|
2373
|
+
}
|
|
2374
|
+
},
|
|
2375
|
+
"return": "Promise<void>"
|
|
2376
|
+
},
|
|
2377
|
+
"docs": {
|
|
2378
|
+
"text": "",
|
|
2379
|
+
"tags": []
|
|
2380
|
+
}
|
|
2381
|
+
},
|
|
2382
|
+
"getValidationState": {
|
|
2383
|
+
"complexType": {
|
|
2384
|
+
"signature": "() => Promise<FormValidationState>",
|
|
2385
|
+
"parameters": [],
|
|
2386
|
+
"references": {
|
|
2387
|
+
"Promise": {
|
|
2388
|
+
"location": "global",
|
|
2389
|
+
"id": "global::Promise"
|
|
2390
|
+
},
|
|
2391
|
+
"FormValidationState": {
|
|
2392
|
+
"location": "import",
|
|
2393
|
+
"path": "../../shared/utils/form",
|
|
2394
|
+
"id": "src/shared/utils/form.ts::FormValidationState",
|
|
2395
|
+
"referenceLocation": "FormValidationState"
|
|
2396
|
+
}
|
|
2397
|
+
},
|
|
2398
|
+
"return": "Promise<FormValidationState>"
|
|
2399
|
+
},
|
|
2400
|
+
"docs": {
|
|
2401
|
+
"text": "",
|
|
2402
|
+
"tags": []
|
|
2403
|
+
}
|
|
2404
|
+
},
|
|
2405
|
+
"validate": {
|
|
2406
|
+
"complexType": {
|
|
2407
|
+
"signature": "() => Promise<boolean>",
|
|
2408
|
+
"parameters": [],
|
|
2409
|
+
"references": {
|
|
2410
|
+
"Promise": {
|
|
2411
|
+
"location": "global",
|
|
2412
|
+
"id": "global::Promise"
|
|
2413
|
+
}
|
|
2414
|
+
},
|
|
2415
|
+
"return": "Promise<boolean>"
|
|
2416
|
+
},
|
|
2417
|
+
"docs": {
|
|
2418
|
+
"text": "",
|
|
2419
|
+
"tags": []
|
|
2420
|
+
}
|
|
2421
|
+
},
|
|
2422
|
+
"setOptions": {
|
|
2423
|
+
"complexType": {
|
|
2424
|
+
"signature": "(options: SelectOptionData[]) => Promise<void>",
|
|
2425
|
+
"parameters": [{
|
|
2426
|
+
"name": "options",
|
|
2427
|
+
"type": "SelectOptionData[]",
|
|
2428
|
+
"docs": "Op\u00E7\u00F5es que devem ser exibidas pela lista interna.\nEm `search-mode=\"remote\"`, a sele\u00E7\u00E3o atual \u00E9 preservada mesmo quando n\u00E3o\naparece na resposta recebida."
|
|
2429
|
+
}],
|
|
2430
|
+
"references": {
|
|
2431
|
+
"Promise": {
|
|
2432
|
+
"location": "global",
|
|
2433
|
+
"id": "global::Promise"
|
|
2434
|
+
},
|
|
2435
|
+
"SelectOptionData": {
|
|
2436
|
+
"location": "import",
|
|
2437
|
+
"path": "./select.types",
|
|
2438
|
+
"id": "src/components/select/select.types.ts::SelectOptionData",
|
|
2439
|
+
"referenceLocation": "SelectOptionData"
|
|
2440
|
+
}
|
|
2441
|
+
},
|
|
2442
|
+
"return": "Promise<void>"
|
|
2443
|
+
},
|
|
2444
|
+
"docs": {
|
|
2445
|
+
"text": "Substitui a cole\u00E7\u00E3o atual de op\u00E7\u00F5es por uma nova lista.",
|
|
2446
|
+
"tags": [{
|
|
2447
|
+
"name": "param",
|
|
2448
|
+
"text": "options Op\u00E7\u00F5es que devem ser exibidas pela lista interna.\nEm `search-mode=\"remote\"`, a sele\u00E7\u00E3o atual \u00E9 preservada mesmo quando n\u00E3o\naparece na resposta recebida."
|
|
2449
|
+
}, {
|
|
2450
|
+
"name": "returns",
|
|
2451
|
+
"text": "Uma promise conclu\u00EDda ap\u00F3s a sincroniza\u00E7\u00E3o das op\u00E7\u00F5es."
|
|
2452
|
+
}]
|
|
2453
|
+
}
|
|
2454
|
+
},
|
|
2455
|
+
"setOption": {
|
|
2456
|
+
"complexType": {
|
|
2457
|
+
"signature": "(option: SelectOptionData) => Promise<void>",
|
|
2458
|
+
"parameters": [{
|
|
2459
|
+
"name": "option",
|
|
2460
|
+
"type": "{ disabled?: boolean; indeterminate?: boolean; label?: string; selected?: boolean; value: string; }",
|
|
2461
|
+
"docs": "Op\u00E7\u00E3o que deve ser inserida ou atualizada."
|
|
2462
|
+
}],
|
|
2463
|
+
"references": {
|
|
2464
|
+
"Promise": {
|
|
2465
|
+
"location": "global",
|
|
2466
|
+
"id": "global::Promise"
|
|
2467
|
+
},
|
|
2468
|
+
"SelectOptionData": {
|
|
2469
|
+
"location": "import",
|
|
2470
|
+
"path": "./select.types",
|
|
2471
|
+
"id": "src/components/select/select.types.ts::SelectOptionData",
|
|
2472
|
+
"referenceLocation": "SelectOptionData"
|
|
2473
|
+
}
|
|
2474
|
+
},
|
|
2475
|
+
"return": "Promise<void>"
|
|
2476
|
+
},
|
|
2477
|
+
"docs": {
|
|
2478
|
+
"text": "Adiciona ou atualiza uma \u00FAnica op\u00E7\u00E3o na cole\u00E7\u00E3o interna.",
|
|
2479
|
+
"tags": [{
|
|
2480
|
+
"name": "param",
|
|
2481
|
+
"text": "option Op\u00E7\u00E3o que deve ser inserida ou atualizada."
|
|
2482
|
+
}, {
|
|
2483
|
+
"name": "returns",
|
|
2484
|
+
"text": "Uma promise conclu\u00EDda ap\u00F3s a sincroniza\u00E7\u00E3o da op\u00E7\u00E3o."
|
|
2485
|
+
}]
|
|
2486
|
+
}
|
|
2487
|
+
}
|
|
2488
|
+
};
|
|
2489
|
+
}
|
|
2490
|
+
static get elementRef() { return "el"; }
|
|
2491
|
+
static get watchers() {
|
|
2492
|
+
return [{
|
|
2493
|
+
"propName": "disabled",
|
|
2494
|
+
"methodName": "handleDisabledChange"
|
|
2495
|
+
}, {
|
|
2496
|
+
"propName": "isOpen",
|
|
2497
|
+
"methodName": "handleIsOpenChange"
|
|
2498
|
+
}, {
|
|
2499
|
+
"propName": "filterable",
|
|
2500
|
+
"methodName": "handleFilterableChange"
|
|
2501
|
+
}, {
|
|
2502
|
+
"propName": "loading",
|
|
2503
|
+
"methodName": "handleLoadingChange"
|
|
2504
|
+
}, {
|
|
2505
|
+
"propName": "isMultiple",
|
|
2506
|
+
"methodName": "handleIsMultipleChange"
|
|
2507
|
+
}, {
|
|
2508
|
+
"propName": "multiple",
|
|
2509
|
+
"methodName": "handleMultipleChange"
|
|
2510
|
+
}, {
|
|
2511
|
+
"propName": "open",
|
|
2512
|
+
"methodName": "handleOpenChange"
|
|
2513
|
+
}, {
|
|
2514
|
+
"propName": "value",
|
|
2515
|
+
"methodName": "handleExternalValueChange"
|
|
2516
|
+
}, {
|
|
2517
|
+
"propName": "options",
|
|
2518
|
+
"methodName": "handleOptionsChange"
|
|
2519
|
+
}];
|
|
2520
|
+
}
|
|
2521
|
+
static get listeners() {
|
|
2522
|
+
return [{
|
|
2523
|
+
"name": "brSelectInputFocus",
|
|
2524
|
+
"method": "handleSelectInputFocus",
|
|
2525
|
+
"target": undefined,
|
|
2526
|
+
"capture": false,
|
|
2527
|
+
"passive": false
|
|
2528
|
+
}, {
|
|
2529
|
+
"name": "brSelectInputValueChange",
|
|
2530
|
+
"method": "handleSelectInputValueChange",
|
|
2531
|
+
"target": undefined,
|
|
2532
|
+
"capture": false,
|
|
2533
|
+
"passive": false
|
|
2534
|
+
}, {
|
|
2535
|
+
"name": "brSelectInputActionClick",
|
|
2536
|
+
"method": "handleSelectInputActionClick",
|
|
2537
|
+
"target": undefined,
|
|
2538
|
+
"capture": false,
|
|
2539
|
+
"passive": false
|
|
2540
|
+
}, {
|
|
2541
|
+
"name": "brSelectInputClick",
|
|
2542
|
+
"method": "handleSelectInputClick",
|
|
2543
|
+
"target": undefined,
|
|
2544
|
+
"capture": false,
|
|
2545
|
+
"passive": false
|
|
2546
|
+
}, {
|
|
2547
|
+
"name": "brSelectOptionStateChange",
|
|
2548
|
+
"method": "handleSelectOptionStateChange",
|
|
2549
|
+
"target": undefined,
|
|
2550
|
+
"capture": false,
|
|
2551
|
+
"passive": false
|
|
2552
|
+
}, {
|
|
2553
|
+
"name": "brInternalSelectOptionHover",
|
|
2554
|
+
"method": "handleSelectOptionHover",
|
|
2555
|
+
"target": undefined,
|
|
2556
|
+
"capture": false,
|
|
2557
|
+
"passive": false
|
|
2558
|
+
}, {
|
|
2559
|
+
"name": "keydown",
|
|
2560
|
+
"method": "handleKeyDown",
|
|
2561
|
+
"target": undefined,
|
|
2562
|
+
"capture": false,
|
|
2563
|
+
"passive": false
|
|
2564
|
+
}, {
|
|
2565
|
+
"name": "click",
|
|
2566
|
+
"method": "handleWindowClick",
|
|
2567
|
+
"target": "window",
|
|
2568
|
+
"capture": false,
|
|
2569
|
+
"passive": false
|
|
2570
|
+
}];
|
|
2571
|
+
}
|
|
2572
|
+
static get attachInternalsMemberName() { return "elementInternals"; }
|
|
2573
|
+
}
|
|
2574
|
+
Select.SELECT_ALL_LABEL = 'Selecionar todos';
|
|
2575
|
+
Select.DESELECT_ALL_LABEL = 'Desselecionar todos';
|